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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
18,500
|
CacheHierarchy::outputCacheStats(std::basic_ofstream<char, std::char_traits<char>>&, char const*) const
|
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MainMulCache.cpp
|
void outputCacheStats(std::ofstream& csvFile, const char* level) const {
auto& stats = l1cache->statistics;
float missRate = static_cast<float>(stats.numMiss) /
(stats.numHit + stats.numMiss) * 100;
csvFile << level << ","
<< stats.numRead << ","
<< stats.numWrite << ","
<< stats.numHit << ","
<< stats.numMiss << ","
<< missRate << ","
<< stats.totalCycles << "\n";
}
|
O1
|
cpp
|
CacheHierarchy::outputCacheStats(std::basic_ofstream<char, std::char_traits<char>>&, char const*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq 0x8(%rdi), %r15
movl 0x10(%r15), %r12d
movl 0x14(%r15), %ebp
testq %rdx, %rdx
je 0x2c03
movq %rdx, %rbx
movq %rdx, %rdi
callq 0x20e0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x21e0
jmp 0x2c1b
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x22a0
movl %ebp, %eax
cvtsi2ss %rax, %xmm1
addl %ebp, %r12d
cvtsi2ss %r12, %xmm0
divss %xmm0, %xmm1
mulss 0x240a(%rip), %xmm1 # 0x5040
movss %xmm1, 0xc(%rsp)
leaq 0x24b8(%rip), %rbx # 0x50fb
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21e0
movl 0x8(%r15), %esi
movq %r14, %rdi
callq 0x2140
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21e0
movl 0xc(%r15), %esi
movq %r14, %rdi
callq 0x2140
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21e0
movl 0x10(%r15), %esi
movq %r14, %rdi
callq 0x2140
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21e0
movl 0x14(%r15), %esi
movq %r14, %rdi
callq 0x2140
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21e0
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
movq %r14, %rdi
callq 0x2270
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21e0
movq 0x18(%r15), %rsi
movq %r14, %rdi
callq 0x2140
leaq 0x2546(%rip), %rsi # 0x524c
movl $0x1, %edx
movq %rax, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x21e0
nop
|
_ZNK14CacheHierarchy16outputCacheStatsERSt14basic_ofstreamIcSt11char_traitsIcEEPKc:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r14, rsi
mov r15, [rdi+8]
mov r12d, [r15+10h]
mov ebp, [r15+14h]
test rdx, rdx
jz short loc_2C03
mov rbx, rdx
mov rdi, rdx
call _strlen
mov rdi, r14
mov rsi, rbx
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_2C1B
loc_2C03:
mov rax, [r14]
mov rax, [rax-18h]
lea rdi, [r14+rax]
mov esi, [r14+rax+20h]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_2C1B:
mov eax, ebp
cvtsi2ss xmm1, rax
add r12d, ebp
cvtsi2ss xmm0, r12
divss xmm1, xmm0
mulss xmm1, cs:dword_5040
movss [rsp+38h+var_2C], xmm1
lea rbx, asc_50FB; ","
mov edx, 1
mov rdi, r14
mov rsi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [r15+8]
mov rdi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
mov edx, 1
mov rdi, rax
mov rsi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [r15+0Ch]
mov rdi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
mov edx, 1
mov rdi, rax
mov rsi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [r15+10h]
mov rdi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
mov edx, 1
mov rdi, rax
mov rsi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [r15+14h]
mov rdi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
mov edx, 1
mov rdi, rax
mov rsi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
xorps xmm0, xmm0
cvtss2sd xmm0, [rsp+38h+var_2C]
mov rdi, r14
call __ZNSo9_M_insertIdEERSoT_; std::ostream::_M_insert<double>(double)
mov r14, rax
mov edx, 1
mov rdi, rax
mov rsi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r15+18h]
mov rdi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, aMemoryPages_0+0Eh; "\n"
mov edx, 1
mov rdi, rax
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
|
long long CacheHierarchy::outputCacheStats(long long a1, _QWORD *a2, long long a3)
{
long long v3; // r15
int v4; // r12d
int v5; // ebp
long long v7; // rax
long long v8; // r14
long long v9; // r14
long long v10; // r14
long long v11; // r14
long long v12; // r14
long long v13; // rax
v3 = *(_QWORD *)(a1 + 8);
v4 = *(_DWORD *)(v3 + 16);
v5 = *(_DWORD *)(v3 + 20);
if ( a3 )
{
v7 = strlen(a3);
std::__ostream_insert<char,std::char_traits<char>>(a2, a3, v7);
}
else
{
std::ios::clear((char *)a2 + *(_QWORD *)(*a2 - 24LL), *(_DWORD *)((char *)a2 + *(_QWORD *)(*a2 - 24LL) + 32) | 1u);
}
std::__ostream_insert<char,std::char_traits<char>>(a2, ",", 1LL);
v8 = std::ostream::_M_insert<unsigned long>(a2, *(unsigned int *)(v3 + 8));
std::__ostream_insert<char,std::char_traits<char>>(v8, ",", 1LL);
v9 = std::ostream::_M_insert<unsigned long>(v8, *(unsigned int *)(v3 + 12));
std::__ostream_insert<char,std::char_traits<char>>(v9, ",", 1LL);
v10 = std::ostream::_M_insert<unsigned long>(v9, *(unsigned int *)(v3 + 16));
std::__ostream_insert<char,std::char_traits<char>>(v10, ",", 1LL);
v11 = std::ostream::_M_insert<unsigned long>(v10, *(unsigned int *)(v3 + 20));
std::__ostream_insert<char,std::char_traits<char>>(v11, ",", 1LL);
v12 = std::ostream::_M_insert<double>(v11, (float)((float)((float)v5 / (float)(v5 + v4)) * 100.0));
std::__ostream_insert<char,std::char_traits<char>>(v12, ",", 1LL);
v13 = std::ostream::_M_insert<unsigned long>(v12, *(_QWORD *)(v3 + 24));
return std::__ostream_insert<char,std::char_traits<char>>(v13, "\n", 1LL);
}
|
outputCacheStats:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV R15,qword ptr [RDI + 0x8]
MOV R12D,dword ptr [R15 + 0x10]
MOV EBP,dword ptr [R15 + 0x14]
TEST RDX,RDX
JZ 0x00102c03
MOV RBX,RDX
MOV RDI,RDX
CALL 0x001020e0
MOV RDI,R14
MOV RSI,RBX
MOV RDX,RAX
CALL 0x001021e0
JMP 0x00102c1b
LAB_00102c03:
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + -0x18]
LEA RDI,[R14 + RAX*0x1]
MOV ESI,dword ptr [R14 + RAX*0x1 + 0x20]
OR ESI,0x1
CALL 0x001022a0
LAB_00102c1b:
MOV EAX,EBP
CVTSI2SS XMM1,RAX
ADD R12D,EBP
CVTSI2SS XMM0,R12
DIVSS XMM1,XMM0
MULSS XMM1,dword ptr [0x00105040]
MOVSS dword ptr [RSP + 0xc],XMM1
LEA RBX,[0x1050fb]
MOV EDX,0x1
MOV RDI,R14
MOV RSI,RBX
CALL 0x001021e0
MOV ESI,dword ptr [R15 + 0x8]
MOV RDI,R14
CALL 0x00102140
MOV R14,RAX
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001021e0
MOV ESI,dword ptr [R15 + 0xc]
MOV RDI,R14
CALL 0x00102140
MOV R14,RAX
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001021e0
MOV ESI,dword ptr [R15 + 0x10]
MOV RDI,R14
CALL 0x00102140
MOV R14,RAX
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001021e0
MOV ESI,dword ptr [R15 + 0x14]
MOV RDI,R14
CALL 0x00102140
MOV R14,RAX
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001021e0
XORPS XMM0,XMM0
CVTSS2SD XMM0,dword ptr [RSP + 0xc]
MOV RDI,R14
CALL 0x00102270
MOV R14,RAX
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001021e0
MOV RSI,qword ptr [R15 + 0x18]
MOV RDI,R14
CALL 0x00102140
LEA RSI,[0x10524c]
MOV EDX,0x1
MOV RDI,RAX
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x001021e0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CacheHierarchy::outputCacheStats(std::ofstream&, char const*) const */
void __thiscall
CacheHierarchy::outputCacheStats(CacheHierarchy *this,ofstream *param_1,char *param_2)
{
int iVar1;
uint uVar2;
size_t sVar3;
ostream *poVar4;
float fVar5;
iVar1 = *(int *)(*(long *)(this + 8) + 0x10);
uVar2 = *(uint *)(*(long *)(this + 8) + 0x14);
if (param_2 == (char *)0x0) {
std::ios::clear(param_1 + *(long *)(*(long *)param_1 + -0x18),
*(uint *)(param_1 + *(long *)(*(long *)param_1 + -0x18) + 0x20) | 1);
}
else {
sVar3 = strlen(param_2);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_1,param_2,sVar3);
}
fVar5 = ((float)uVar2 / (float)(iVar1 + uVar2)) * _DAT_00105040;
std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_1,",",1);
poVar4 = std::ostream::_M_insert<unsigned_long>((ulong)param_1);
std::__ostream_insert<char,std::char_traits<char>>(poVar4,",",1);
poVar4 = std::ostream::_M_insert<unsigned_long>((ulong)poVar4);
std::__ostream_insert<char,std::char_traits<char>>(poVar4,",",1);
poVar4 = std::ostream::_M_insert<unsigned_long>((ulong)poVar4);
std::__ostream_insert<char,std::char_traits<char>>(poVar4,",",1);
poVar4 = std::ostream::_M_insert<unsigned_long>((ulong)poVar4);
std::__ostream_insert<char,std::char_traits<char>>(poVar4,",",1);
poVar4 = std::ostream::_M_insert<double>((double)fVar5);
std::__ostream_insert<char,std::char_traits<char>>(poVar4,",",1);
poVar4 = std::ostream::_M_insert<unsigned_long>((ulong)poVar4);
std::__ostream_insert<char,std::char_traits<char>>(poVar4,"\n",1);
return;
}
|
|
18,501
|
CacheHierarchy::outputCacheStats(std::basic_ofstream<char, std::char_traits<char>>&, char const*) const
|
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MainMulCache.cpp
|
void outputCacheStats(std::ofstream& csvFile, const char* level) const {
auto& stats = l1cache->statistics;
float missRate = static_cast<float>(stats.numMiss) /
(stats.numHit + stats.numMiss) * 100;
csvFile << level << ","
<< stats.numRead << ","
<< stats.numWrite << ","
<< stats.numHit << ","
<< stats.numMiss << ","
<< missRate << ","
<< stats.totalCycles << "\n";
}
|
O2
|
cpp
|
CacheHierarchy::outputCacheStats(std::basic_ofstream<char, std::char_traits<char>>&, char const*) const:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r14
movl 0x14(%r14), %eax
cvtsi2ss %rax, %xmm1
movl 0x10(%r14), %ecx
addl %eax, %ecx
cvtsi2ss %rcx, %xmm0
movq %rsi, %rdi
divss %xmm0, %xmm1
mulss 0x26b3(%rip), %xmm1 # 0x5040
movss %xmm1, 0x4(%rsp)
movq %rdx, %rsi
callq 0x2190
leaq 0x2759(%rip), %rbx # 0x50fb
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2190
movl 0x8(%r14), %esi
movq %rax, %rdi
callq 0x2130
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2190
movl 0xc(%r14), %esi
movq %rax, %rdi
callq 0x2130
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2190
movl 0x10(%r14), %esi
movq %rax, %rdi
callq 0x2130
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2190
movl 0x14(%r14), %esi
movq %rax, %rdi
callq 0x2130
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2190
movq %rax, %rdi
movss 0x4(%rsp), %xmm0
callq 0x2150
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2190
movq 0x18(%r14), %rsi
movq %rax, %rdi
callq 0x2130
leaq 0x2817(%rip), %rsi # 0x524c
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2190
|
_ZNK14CacheHierarchy16outputCacheStatsERSt14basic_ofstreamIcSt11char_traitsIcEEPKc:
push r14
push rbx
push rax
mov r14, [rdi+8]
mov eax, [r14+14h]
cvtsi2ss xmm1, rax
mov ecx, [r14+10h]
add ecx, eax
cvtsi2ss xmm0, rcx
mov rdi, rsi
divss xmm1, xmm0
mulss xmm1, cs:dword_5040
movss [rsp+18h+var_14], xmm1
mov rsi, rdx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rbx, asc_50FB; ","
mov rdi, rax
mov rsi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov esi, [r14+8]
mov rdi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rdi, rax
mov rsi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov esi, [r14+0Ch]
mov rdi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rdi, rax
mov rsi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov esi, [r14+10h]
mov rdi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rdi, rax
mov rsi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov esi, [r14+14h]
mov rdi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rdi, rax
mov rsi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
movss xmm0, [rsp+18h+var_14]
call __ZNSolsEf; std::ostream::operator<<(float)
mov rdi, rax
mov rsi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [r14+18h]
mov rdi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, aMemoryPages_0+0Eh; "\n"
mov rdi, rax
add rsp, 8
pop rbx
pop r14
jmp __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
|
long long CacheHierarchy::outputCacheStats(long long a1, long long a2, long long a3)
{
long long v3; // r14
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rax
long long v11; // rax
long long v12; // rax
long long v13; // rax
long long v14; // rax
long long v15; // rax
long long v16; // rax
float v18; // [rsp+0h] [rbp-14h]
v3 = *(_QWORD *)(a1 + 8);
v18 = (float)((float)*(int *)(v3 + 20) / (float)(*(_DWORD *)(v3 + 20) + *(_DWORD *)(v3 + 16))) * 100.0;
v4 = std::operator<<<std::char_traits<char>>(a2, a3);
v5 = std::operator<<<std::char_traits<char>>(v4, ",");
v6 = std::ostream::_M_insert<unsigned long>(v5, *(unsigned int *)(v3 + 8));
v7 = std::operator<<<std::char_traits<char>>(v6, ",");
v8 = std::ostream::_M_insert<unsigned long>(v7, *(unsigned int *)(v3 + 12));
v9 = std::operator<<<std::char_traits<char>>(v8, ",");
v10 = std::ostream::_M_insert<unsigned long>(v9, *(unsigned int *)(v3 + 16));
v11 = std::operator<<<std::char_traits<char>>(v10, ",");
v12 = std::ostream::_M_insert<unsigned long>(v11, *(unsigned int *)(v3 + 20));
v13 = std::operator<<<std::char_traits<char>>(v12, ",");
v14 = std::ostream::operator<<(v13, v18);
v15 = std::operator<<<std::char_traits<char>>(v14, ",");
v16 = std::ostream::_M_insert<unsigned long>(v15, *(_QWORD *)(v3 + 24));
return std::operator<<<std::char_traits<char>>(v16, "\n");
}
|
outputCacheStats:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,qword ptr [RDI + 0x8]
MOV EAX,dword ptr [R14 + 0x14]
CVTSI2SS XMM1,RAX
MOV ECX,dword ptr [R14 + 0x10]
ADD ECX,EAX
CVTSI2SS XMM0,RCX
MOV RDI,RSI
DIVSS XMM1,XMM0
MULSS XMM1,dword ptr [0x00105040]
MOVSS dword ptr [RSP + 0x4],XMM1
MOV RSI,RDX
CALL 0x00102190
LEA RBX,[0x1050fb]
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00102190
MOV ESI,dword ptr [R14 + 0x8]
MOV RDI,RAX
CALL 0x00102130
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00102190
MOV ESI,dword ptr [R14 + 0xc]
MOV RDI,RAX
CALL 0x00102130
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00102190
MOV ESI,dword ptr [R14 + 0x10]
MOV RDI,RAX
CALL 0x00102130
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00102190
MOV ESI,dword ptr [R14 + 0x14]
MOV RDI,RAX
CALL 0x00102130
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00102190
MOV RDI,RAX
MOVSS XMM0,dword ptr [RSP + 0x4]
CALL 0x00102150
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00102190
MOV RSI,qword ptr [R14 + 0x18]
MOV RDI,RAX
CALL 0x00102130
LEA RSI,[0x10524c]
MOV RDI,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00102190
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CacheHierarchy::outputCacheStats(std::ofstream&, char const*) const */
void __thiscall
CacheHierarchy::outputCacheStats(CacheHierarchy *this,ofstream *param_1,char *param_2)
{
uint uVar1;
ostream *poVar2;
float fVar3;
uVar1 = *(uint *)(*(long *)(this + 8) + 0x14);
fVar3 = ((float)uVar1 / (float)(*(int *)(*(long *)(this + 8) + 0x10) + uVar1)) * _DAT_00105040;
poVar2 = std::operator<<((ostream *)param_1,param_2);
poVar2 = std::operator<<(poVar2,",");
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
poVar2 = std::operator<<(poVar2,",");
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
poVar2 = std::operator<<(poVar2,",");
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
poVar2 = std::operator<<(poVar2,",");
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
poVar2 = std::operator<<(poVar2,",");
poVar2 = (ostream *)std::ostream::operator<<(poVar2,fVar3);
poVar2 = std::operator<<(poVar2,",");
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::operator<<(poVar2,"\n");
return;
}
|
|
18,502
|
mi_seq_search
|
eloqsql/storage/myisam/mi_search.c
|
int _mi_seq_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint key_len, uint comp_flag, uchar **ret_pos,
uchar *buff, my_bool *last_key)
{
int UNINIT_VAR(flag);
uint nod_flag,UNINIT_VAR(length),not_used[2];
uchar t_buff[HA_MAX_KEY_BUFF],*end;
DBUG_ENTER("_mi_seq_search");
end= page+mi_getint(page);
nod_flag=mi_test_if_nod(page);
page+=2+nod_flag;
*ret_pos=page;
t_buff[0]=0; /* Avoid bugs */
while (page < end)
{
length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,t_buff);
if (length == 0 || page > end)
{
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
DBUG_PRINT("error",
("Found wrong key: length: %u page: %p end: %p",
length, page, end));
DBUG_RETURN(MI_FOUND_WRONG_KEY);
}
if ((flag=ha_key_cmp(keyinfo->seg,t_buff,key,key_len,comp_flag,
not_used)) >= 0)
break;
#ifdef EXTRA_DEBUG
DBUG_PRINT("loop",("page: 0x%lx key: '%s' flag: %d", (long) page, t_buff,
flag));
#endif
memcpy(buff,t_buff,length);
*ret_pos=page;
}
if (flag == 0)
memcpy(buff,t_buff,length); /* Result is first key */
*last_key= page == end;
DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos));
DBUG_RETURN(flag);
}
|
O3
|
c
|
mi_seq_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x508, %rsp # imm = 0x508
movl %r9d, -0x508(%rbp)
movl %r8d, -0x504(%rbp)
movq %rcx, -0x520(%rbp)
movq %rsi, -0x510(%rbp)
movq 0x10(%rbp), %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movzbl 0x1(%rdx), %ecx
movzbl (%rdx), %r9d
movl %r9d, %eax
andl $0x7f, %eax
shll $0x8, %eax
orq %rcx, %rax
xorl %esi, %esi
testb %r9b, %r9b
jns 0x4db7c
movq (%rdi), %rcx
movl 0x17c(%rcx), %esi
movq %rdi, -0x518(%rbp)
leaq (%rdx,%rax), %rcx
movq %rcx, -0x500(%rbp)
leal 0x2(%rsi), %ecx
addq %rcx, %rdx
movq %rdx, -0x4f8(%rbp)
movq %rdx, (%rbx)
movb $0x0, -0x4f0(%rbp)
cmpl %ecx, %eax
jbe 0x4dc8b
leaq -0x4f0(%rbp), %rcx
movq -0x510(%rbp), %rdi
movq %rsi, %r12
leaq -0x4f8(%rbp), %rdx
movq %rcx, %r13
callq *0x48(%rdi)
testl %eax, %eax
je 0x4dc45
movl %eax, %r15d
movq -0x500(%rbp), %rax
cmpq %rax, -0x4f8(%rbp)
ja 0x4dc45
movq -0x510(%rbp), %rax
movq 0x28(%rax), %rdi
movq %r13, %rsi
movq -0x520(%rbp), %rdx
movl -0x504(%rbp), %ecx
movl -0x508(%rbp), %r8d
leaq -0x528(%rbp), %r9
callq 0x6ebce
movl %eax, %r14d
testl %eax, %eax
jns 0x4dc73
movl %r15d, %edx
movq 0x18(%rbp), %rdi
movq %r13, %rsi
callq 0x292f0
movq -0x4f8(%rbp), %rax
movq %rax, (%rbx)
cmpq -0x500(%rbp), %rax
movq %r12, %rsi
movq %r13, %rcx
jb 0x4dbb4
jmp 0x4dc8b
movq -0x518(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x43e1a
callq 0x721fe
movl $0x7e, (%rax)
movl $0x7fffffff, %r14d # imm = 0x7FFFFFFF
jmp 0x4dca0
jne 0x4dc8b
movl %r15d, %edx
leaq -0x4f0(%rbp), %rsi
movq 0x18(%rbp), %rdi
callq 0x292f0
xorl %r14d, %r14d
movq -0x500(%rbp), %rax
cmpq %rax, -0x4f8(%rbp)
movq 0x20(%rbp), %rax
sete (%rax)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x4dcc4
movl %r14d, %eax
addq $0x508, %rsp # imm = 0x508
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29470
|
_mi_seq_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 508h
mov [rbp+var_508], r9d
mov [rbp+var_504], r8d
mov [rbp+var_520], rcx
mov [rbp+var_510], rsi
mov rbx, [rbp+arg_0]
mov rax, fs:28h
mov [rbp+var_30], rax
movzx ecx, byte ptr [rdx+1]
movzx r9d, byte ptr [rdx]
mov eax, r9d
and eax, 7Fh
shl eax, 8
or rax, rcx
xor esi, esi
test r9b, r9b
jns short loc_4DB7C
mov rcx, [rdi]
mov esi, [rcx+17Ch]
loc_4DB7C:
mov [rbp+var_518], rdi
lea rcx, [rdx+rax]
mov [rbp+var_500], rcx
lea ecx, [rsi+2]
add rdx, rcx
mov [rbp+var_4F8], rdx
mov [rbx], rdx
mov [rbp+var_4F0], 0
cmp eax, ecx
jbe loc_4DC8B
lea rcx, [rbp+var_4F0]
loc_4DBB4:
mov rdi, [rbp+var_510]
mov r12, rsi
lea rdx, [rbp+var_4F8]
mov r13, rcx
call qword ptr [rdi+48h]
test eax, eax
jz short loc_4DC45
mov r15d, eax
mov rax, [rbp+var_500]
cmp [rbp+var_4F8], rax
ja short loc_4DC45
mov rax, [rbp+var_510]
mov rdi, [rax+28h]
mov rsi, r13
mov rdx, [rbp+var_520]
mov ecx, [rbp+var_504]
mov r8d, [rbp+var_508]
lea r9, [rbp+var_528]
call ha_key_cmp
mov r14d, eax
test eax, eax
jns short loc_4DC73
mov edx, r15d
mov rdi, [rbp+arg_8]
mov rsi, r13
call _memcpy
mov rax, [rbp+var_4F8]
mov [rbx], rax
cmp rax, [rbp+var_500]
mov rsi, r12
mov rcx, r13
jb loc_4DBB4
jmp short loc_4DC8B
loc_4DC45:
mov rax, [rbp+var_518]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov r14d, 7FFFFFFFh
jmp short loc_4DCA0
loc_4DC73:
jnz short loc_4DC8B
mov edx, r15d
lea rsi, [rbp+var_4F0]
mov rdi, [rbp+arg_8]
call _memcpy
xor r14d, r14d
loc_4DC8B:
mov rax, [rbp+var_500]
cmp [rbp+var_4F8], rax
mov rax, [rbp+arg_10]
setz byte ptr [rax]
loc_4DCA0:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_4DCC4
mov eax, r14d
add rsp, 508h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4DCC4:
call ___stack_chk_fail
|
long long mi_seq_search(
long long a1,
long long a2,
char *a3,
long long a4,
unsigned int a5,
unsigned int a6,
char **a7,
long long a8,
bool *a9)
{
unsigned int v9; // r14d
unsigned long long v10; // rax
long long v11; // rsi
long long v12; // rcx
_BYTE *v13; // rcx
_BYTE *v14; // r13
unsigned int v15; // eax
unsigned int v16; // r15d
int v17; // eax
char *v18; // rax
const char *v19; // rsi
char v21[8]; // [rsp+8h] [rbp-528h] BYREF
long long v22; // [rsp+10h] [rbp-520h]
long long v23; // [rsp+18h] [rbp-518h]
long long v24; // [rsp+20h] [rbp-510h]
unsigned int v25; // [rsp+28h] [rbp-508h]
unsigned int v26; // [rsp+2Ch] [rbp-504h]
char *v27; // [rsp+30h] [rbp-500h]
char *v28; // [rsp+38h] [rbp-4F8h] BYREF
_BYTE v29[1216]; // [rsp+40h] [rbp-4F0h] BYREF
unsigned long long v30; // [rsp+500h] [rbp-30h]
v25 = a6;
v26 = a5;
v22 = a4;
v24 = a2;
v30 = __readfsqword(0x28u);
v10 = (unsigned __int8)a3[1] | (unsigned long long)((unsigned __int8)(*a3 & 0x7F) << 8);
v11 = 0LL;
if ( *a3 < 0 )
v11 = *(unsigned int *)(*(_QWORD *)a1 + 380LL);
v23 = a1;
v27 = &a3[v10];
v12 = (unsigned int)(v11 + 2);
v28 = &a3[v12];
*a7 = &a3[v12];
v29[0] = 0;
if ( (unsigned int)v10 > (unsigned int)v12 )
{
v13 = v29;
while ( 1 )
{
v14 = v13;
v15 = (*(long long ( **)(long long, long long, char **))(v24 + 72))(v24, v11, &v28);
if ( !v15 || (v16 = v15, v28 > v27) )
{
v19 = *(const char **)(*(_QWORD *)v23 + 616LL);
mi_report_error(126, (long long)v19);
*(_DWORD *)my_thread_var(126LL, v19) = 126;
return 0x7FFFFFFF;
}
v17 = ha_key_cmp(*(_QWORD *)(v24 + 40), v14, v22, v26, v25, v21);
v9 = v17;
if ( v17 >= 0 )
break;
memcpy(a8, v14, v16);
v18 = v28;
*a7 = v28;
v13 = v14;
if ( v18 >= v27 )
goto LABEL_13;
}
if ( !v17 )
{
memcpy(a8, v29, v16);
v9 = 0;
}
}
LABEL_13:
*a9 = v28 == v27;
return v9;
}
|
_mi_seq_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x508
MOV dword ptr [RBP + -0x508],R9D
MOV dword ptr [RBP + -0x504],R8D
MOV qword ptr [RBP + -0x520],RCX
MOV qword ptr [RBP + -0x510],RSI
MOV RBX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOVZX ECX,byte ptr [RDX + 0x1]
MOVZX R9D,byte ptr [RDX]
MOV EAX,R9D
AND EAX,0x7f
SHL EAX,0x8
OR RAX,RCX
XOR ESI,ESI
TEST R9B,R9B
JNS 0x0014db7c
MOV RCX,qword ptr [RDI]
MOV ESI,dword ptr [RCX + 0x17c]
LAB_0014db7c:
MOV qword ptr [RBP + -0x518],RDI
LEA RCX,[RDX + RAX*0x1]
MOV qword ptr [RBP + -0x500],RCX
LEA ECX,[RSI + 0x2]
ADD RDX,RCX
MOV qword ptr [RBP + -0x4f8],RDX
MOV qword ptr [RBX],RDX
MOV byte ptr [RBP + -0x4f0],0x0
CMP EAX,ECX
JBE 0x0014dc8b
LEA RCX,[RBP + -0x4f0]
LAB_0014dbb4:
MOV RDI,qword ptr [RBP + -0x510]
MOV R12,RSI
LEA RDX,[RBP + -0x4f8]
MOV R13,RCX
CALL qword ptr [RDI + 0x48]
TEST EAX,EAX
JZ 0x0014dc45
MOV R15D,EAX
MOV RAX,qword ptr [RBP + -0x500]
CMP qword ptr [RBP + -0x4f8],RAX
JA 0x0014dc45
MOV RAX,qword ptr [RBP + -0x510]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,R13
MOV RDX,qword ptr [RBP + -0x520]
MOV ECX,dword ptr [RBP + -0x504]
MOV R8D,dword ptr [RBP + -0x508]
LEA R9,[RBP + -0x528]
CALL 0x0016ebce
MOV R14D,EAX
TEST EAX,EAX
JNS 0x0014dc73
MOV EDX,R15D
MOV RDI,qword ptr [RBP + 0x18]
MOV RSI,R13
CALL 0x001292f0
MOV RAX,qword ptr [RBP + -0x4f8]
MOV qword ptr [RBX],RAX
CMP RAX,qword ptr [RBP + -0x500]
MOV RSI,R12
MOV RCX,R13
JC 0x0014dbb4
JMP 0x0014dc8b
LAB_0014dc45:
MOV RAX,qword ptr [RBP + -0x518]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x00143e1a
CALL 0x001721fe
MOV dword ptr [RAX],0x7e
MOV R14D,0x7fffffff
JMP 0x0014dca0
LAB_0014dc73:
JNZ 0x0014dc8b
MOV EDX,R15D
LEA RSI,[RBP + -0x4f0]
MOV RDI,qword ptr [RBP + 0x18]
CALL 0x001292f0
XOR R14D,R14D
LAB_0014dc8b:
MOV RAX,qword ptr [RBP + -0x500]
CMP qword ptr [RBP + -0x4f8],RAX
MOV RAX,qword ptr [RBP + 0x20]
SETZ byte ptr [RAX]
LAB_0014dca0:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0014dcc4
MOV EAX,R14D
ADD RSP,0x508
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014dcc4:
CALL 0x00129470
|
int _mi_seq_search(long *param_1,long param_2,byte *param_3,int8 param_4,int4 param_5,
int4 param_6,int8 *param_7,void *param_8,int8 param_9)
{
uint uVar1;
ulong uVar2;
int4 *puVar3;
int iVar4;
int unaff_R14D;
long in_FS_OFFSET;
int1 local_530 [8];
int8 local_528;
long *local_520;
long local_518;
int4 local_510;
int4 local_50c;
byte *local_508;
byte *local_500;
int1 local_4f8 [1216];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar2 = (ulong)((*param_3 & 0x7f) << 8) | (ulong)param_3[1];
iVar4 = 0;
if ((char)*param_3 < '\0') {
iVar4 = *(int *)(*param_1 + 0x17c);
}
local_508 = param_3 + uVar2;
local_500 = param_3 + (iVar4 + 2U);
*param_7 = local_500;
local_4f8[0] = 0;
local_528 = param_4;
local_520 = param_1;
local_518 = param_2;
local_510 = param_6;
local_50c = param_5;
if (iVar4 + 2U < (uint)uVar2) {
do {
uVar1 = (**(code **)(local_518 + 0x48))(local_518,iVar4,&local_500);
if ((uVar1 == 0) || (local_508 < local_500)) {
mi_report_error(0x7e,*(int8 *)(*local_520 + 0x268));
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x7e;
unaff_R14D = 0x7fffffff;
goto LAB_0014dca0;
}
unaff_R14D = ha_key_cmp(*(int8 *)(local_518 + 0x28),local_4f8,local_528,local_50c,
local_510,local_530);
if (-1 < unaff_R14D) {
if (unaff_R14D == 0) {
memcpy(param_8,local_4f8,(ulong)uVar1);
unaff_R14D = 0;
}
break;
}
memcpy(param_8,local_4f8,(ulong)uVar1);
*param_7 = local_500;
} while (local_500 < local_508);
}
*(bool *)param_9 = local_500 == local_508;
LAB_0014dca0:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return unaff_R14D;
}
|
|
18,503
|
bool rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::StringEqual<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> const&) const
|
mnn-tts/MNN/3rd_party/rapidjson/document.h
|
bool StringEqual(const GenericValue<Encoding, SourceAllocator>& rhs) const {
RAPIDJSON_ASSERT(IsString());
RAPIDJSON_ASSERT(rhs.IsString());
const SizeType len1 = GetStringLength();
const SizeType len2 = rhs.GetStringLength();
if(len1 != len2) { return false; }
const Ch* const str1 = GetString();
const Ch* const str2 = rhs.GetString();
if(str1 == str2) { return true; } // fast path for constant string
return (std::memcmp(str1, str2, sizeof(Ch) * len1) == 0);
}
|
O0
|
c
|
bool rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::StringEqual<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> const&) const:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x1e290
testb $0x1, %al
jne 0x1e3e2
jmp 0x1e3e4
jmp 0x1e403
leaq 0x6d49(%rip), %rdi # 0x25134
leaq 0x5299(%rip), %rsi # 0x2368b
movl $0x82c, %edx # imm = 0x82C
leaq 0x6e6b(%rip), %rcx # 0x25269
callq 0x4100
movq 0x20(%rsp), %rdi
callq 0x1e290
testb $0x1, %al
jne 0x1e413
jmp 0x1e415
jmp 0x1e434
leaq 0x6f42(%rip), %rdi # 0x2535e
leaq 0x5268(%rip), %rsi # 0x2368b
movl $0x82d, %edx # imm = 0x82D
leaq 0x6e3a(%rip), %rcx # 0x25269
callq 0x4100
movq (%rsp), %rdi
callq 0x1e530
movl %eax, 0x1c(%rsp)
movq 0x20(%rsp), %rdi
callq 0x1e530
movl %eax, 0x18(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x18(%rsp), %eax
je 0x1e460
movb $0x0, 0x37(%rsp)
jmp 0x1e4b5
movq (%rsp), %rdi
callq 0x8070
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x8070
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
jne 0x1e490
movb $0x1, 0x37(%rsp)
jmp 0x1e4b5
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl 0x1c(%rsp), %eax
movl %eax, %edx
shlq $0x0, %rdx
callq 0x44b0
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movb %al, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
|
_ZNK9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE11StringEqualIS5_EEbRKNS0_IS2_T_EE:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rdi, [rsp+38h+var_10]
mov [rsp+38h+var_38], rdi
call _ZNK9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE8IsStringEv; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::IsString(void)
test al, 1
jnz short loc_1E3E2
jmp short loc_1E3E4
loc_1E3E2:
jmp short loc_1E403
loc_1E3E4:
lea rdi, aNameIsstring+5; "IsString()"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/mnn-tt"...
mov edx, 82Ch
lea rcx, aBoolRapidjsonG_0; "bool rapidjson::GenericValue<rapidjson:"...
call ___assert_fail
loc_1E403:
mov rdi, [rsp+38h+var_18]
call _ZNK9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE8IsStringEv; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::IsString(void)
test al, 1
jnz short loc_1E413
jmp short loc_1E415
loc_1E413:
jmp short loc_1E434
loc_1E415:
lea rdi, aRhsIsstring; "rhs.IsString()"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/mnn-tt"...
mov edx, 82Dh
lea rcx, aBoolRapidjsonG_0; "bool rapidjson::GenericValue<rapidjson:"...
call ___assert_fail
loc_1E434:
mov rdi, [rsp+38h+var_38]
call _ZNK9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE15GetStringLengthEv; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GetStringLength(void)
mov [rsp+38h+var_1C], eax
mov rdi, [rsp+38h+var_18]
call _ZNK9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE15GetStringLengthEv; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GetStringLength(void)
mov [rsp+38h+var_20], eax
mov eax, [rsp+38h+var_1C]
cmp eax, [rsp+38h+var_20]
jz short loc_1E460
mov [rsp+38h+var_1], 0
jmp short loc_1E4B5
loc_1E460:
mov rdi, [rsp+38h+var_38]
call _ZNK9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE9GetStringEv; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GetString(void)
mov [rsp+38h+var_28], rax
mov rdi, [rsp+38h+var_18]
call _ZNK9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE9GetStringEv; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GetString(void)
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_28]
cmp rax, [rsp+38h+var_30]
jnz short loc_1E490
mov [rsp+38h+var_1], 1
jmp short loc_1E4B5
loc_1E490:
mov rdi, [rsp+38h+var_28]
mov rsi, [rsp+38h+var_30]
mov eax, [rsp+38h+var_1C]
mov edx, eax
shl rdx, 0
call _memcmp
cmp eax, 0
setz al
and al, 1
mov [rsp+38h+var_1], al
loc_1E4B5:
mov al, [rsp+38h+var_1]
and al, 1
add rsp, 38h
retn
|
bool rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::StringEqual<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>(
long long a1,
long long a2)
{
long long v2; // rcx
long long v3; // r8
long long v4; // r9
long long v6; // [rsp+8h] [rbp-30h]
long long String; // [rsp+10h] [rbp-28h]
unsigned int StringLength; // [rsp+1Ch] [rbp-1Ch]
if ( !rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::IsString(a1) )
__assert_fail(
"IsString()",
"/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/document.h",
2092LL,
"bool rapidjson::GenericValue<rapidjson::UTF8<>>::StringEqual(const GenericValue<Encoding, SourceAllocator> &) cons"
"t [Encoding = rapidjson::UTF8<>, Allocator = rapidjson::MemoryPoolAllocator<>, SourceAllocator = rapidjson::Memory"
"PoolAllocator<>]");
if ( !rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::IsString(a2) )
__assert_fail(
"rhs.IsString()",
"/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/document.h",
2093LL,
"bool rapidjson::GenericValue<rapidjson::UTF8<>>::StringEqual(const GenericValue<Encoding, SourceAllocator> &) cons"
"t [Encoding = rapidjson::UTF8<>, Allocator = rapidjson::MemoryPoolAllocator<>, SourceAllocator = rapidjson::Memory"
"PoolAllocator<>]");
StringLength = rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GetStringLength(a1);
if ( StringLength == (unsigned int)rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GetStringLength(a2) )
{
String = rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GetString(a1);
v6 = rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GetString(a2);
return String == v6 || (unsigned int)memcmp(String, v6, StringLength, v2, v3, v4, a1, v6, String) == 0;
}
else
{
return 0;
}
}
|
StringEqual<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RDI,qword ptr [RSP + 0x28]
MOV qword ptr [RSP],RDI
CALL 0x0011e290
TEST AL,0x1
JNZ 0x0011e3e2
JMP 0x0011e3e4
LAB_0011e3e2:
JMP 0x0011e403
LAB_0011e3e4:
LEA RDI,[0x125134]
LEA RSI,[0x12368b]
MOV EDX,0x82c
LEA RCX,[0x125269]
CALL 0x00104100
LAB_0011e403:
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x0011e290
TEST AL,0x1
JNZ 0x0011e413
JMP 0x0011e415
LAB_0011e413:
JMP 0x0011e434
LAB_0011e415:
LEA RDI,[0x12535e]
LEA RSI,[0x12368b]
MOV EDX,0x82d
LEA RCX,[0x125269]
CALL 0x00104100
LAB_0011e434:
MOV RDI,qword ptr [RSP]
CALL 0x0011e530
MOV dword ptr [RSP + 0x1c],EAX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x0011e530
MOV dword ptr [RSP + 0x18],EAX
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,dword ptr [RSP + 0x18]
JZ 0x0011e460
MOV byte ptr [RSP + 0x37],0x0
JMP 0x0011e4b5
LAB_0011e460:
MOV RDI,qword ptr [RSP]
CALL 0x00108070
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00108070
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,qword ptr [RSP + 0x8]
JNZ 0x0011e490
MOV byte ptr [RSP + 0x37],0x1
JMP 0x0011e4b5
LAB_0011e490:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x1c]
MOV EDX,EAX
SHL RDX,0x0
CALL 0x001044b0
CMP EAX,0x0
SETZ AL
AND AL,0x1
MOV byte ptr [RSP + 0x37],AL
LAB_0011e4b5:
MOV AL,byte ptr [RSP + 0x37]
AND AL,0x1
ADD RSP,0x38
RET
|
/* bool rapidjson::GenericValue<rapidjson::UTF8<char>,
rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>
>::StringEqual<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>
>(rapidjson::GenericValue<rapidjson::UTF8<char>,
rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > const&) const */
bool __thiscall
rapidjson::
GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::
StringEqual<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
(GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*this,GenericValue *param_1)
{
uint uVar1;
uint uVar2;
int iVar3;
ulong uVar4;
void *__s1;
void *__s2;
bool local_1;
uVar4 = IsString(this);
if ((uVar4 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("IsString()",
"/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/document.h",
0x82c,
"bool rapidjson::GenericValue<rapidjson::UTF8<>>::StringEqual(const GenericValue<Encoding, SourceAllocator> &) const [Encoding = rapidjson::UTF8<>, Allocator = rapidjson::MemoryPoolAllocator<>, SourceAllocator = rapidjson::MemoryPoolAllocator<>]"
);
}
uVar4 = IsString((GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*)param_1);
if ((uVar4 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("rhs.IsString()",
"/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/document.h",
0x82d,
"bool rapidjson::GenericValue<rapidjson::UTF8<>>::StringEqual(const GenericValue<Encoding, SourceAllocator> &) const [Encoding = rapidjson::UTF8<>, Allocator = rapidjson::MemoryPoolAllocator<>, SourceAllocator = rapidjson::MemoryPoolAllocator<>]"
);
}
uVar1 = GetStringLength(this);
uVar2 = GetStringLength((GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*)param_1);
if (uVar1 == uVar2) {
__s1 = (void *)GetString(this);
__s2 = (void *)GetString((GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*)param_1);
if (__s1 == __s2) {
local_1 = true;
}
else {
iVar3 = memcmp(__s1,__s2,(ulong)uVar1);
local_1 = iVar3 == 0;
}
}
else {
local_1 = false;
}
return local_1;
}
|
|
18,504
|
ggml_get_i32_1d
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c
|
int32_t ggml_get_i32_1d(const struct ggml_tensor * tensor, int i) {
if (!ggml_is_contiguous(tensor)) {
int64_t id[4] = { 0, 0, 0, 0 };
ggml_unravel_index(tensor, i, &id[0], &id[1], &id[2], &id[3]);
return ggml_get_i32_nd(tensor, id[0], id[1], id[2], id[3]);
}
switch (tensor->type) {
case GGML_TYPE_I8:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int8_t));
return ((int8_t *)(tensor->data))[i];
}
case GGML_TYPE_I16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int16_t));
return ((int16_t *)(tensor->data))[i];
}
case GGML_TYPE_I32:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int32_t));
return ((int32_t *)(tensor->data))[i];
}
case GGML_TYPE_F16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(ggml_fp16_t));
return GGML_FP16_TO_FP32(((ggml_fp16_t *)(tensor->data))[i]);
}
case GGML_TYPE_BF16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(ggml_bf16_t));
return GGML_BF16_TO_FP32(((ggml_bf16_t *)(tensor->data))[i]);
}
case GGML_TYPE_F32:
{
GGML_ASSERT(tensor->nb[0] == sizeof(float));
return ((float *)(tensor->data))[i];
}
default:
{
GGML_ABORT("fatal error");
}
}
}
|
O1
|
c
|
ggml_get_i32_1d:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0xa230
testb %al, %al
je 0xc8ba
movl (%rbx), %eax
leal -0x18(%rax), %ecx
cmpl $0x6, %ecx
ja 0xc906
leaq 0x3c84a(%rip), %rax # 0x490e0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpq $0x1, 0x30(%rbx)
jne 0xc9d5
movq 0xf8(%rbx), %rax
movslq %ebp, %rcx
movsbl (%rax,%rcx), %eax
jmp 0xc8fd
vxorps %xmm0, %xmm0, %xmm0
leaq 0x8(%rsp), %rcx
vmovups %ymm0, -0x8(%rcx)
movslq %ebp, %rsi
leaq 0x10(%rsp), %r8
leaq 0x18(%rsp), %r9
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rdx
vzeroupper
callq 0xa6e0
movl (%r14), %esi
movl 0x8(%r14), %edx
movl 0x10(%r14), %ecx
movl 0x18(%r14), %r8d
movq %rbx, %rdi
callq 0xa6a0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
testl %eax, %eax
je 0xc99c
cmpl $0x1, %eax
jne 0xc9bb
cmpq $0x2, 0x30(%rbx)
jne 0xca64
movq 0xf8(%rbx), %rax
movslq %ebp, %rcx
movzwl (%rax,%rcx,2), %eax
movq 0x4f629(%rip), %rcx # 0x5bf60
vcvttss2si (%rcx,%rax,4), %eax
jmp 0xc8fd
cmpq $0x2, 0x30(%rbx)
jne 0xc9f4
movq 0xf8(%rbx), %rax
movslq %ebp, %rcx
movswl (%rax,%rcx,2), %eax
jmp 0xc8fd
cmpq $0x4, 0x30(%rbx)
jne 0xca10
movq 0xf8(%rbx), %rax
movslq %ebp, %rcx
movl (%rax,%rcx,4), %eax
jmp 0xc8fd
cmpq $0x2, 0x30(%rbx)
jne 0xca2c
movq 0xf8(%rbx), %rax
movslq %ebp, %rcx
movzwl (%rax,%rcx,2), %eax
shll $0x10, %eax
vmovd %eax, %xmm0
vcvttss2si %xmm0, %eax
jmp 0xc8fd
cmpq $0x4, 0x30(%rbx)
jne 0xca48
movq 0xf8(%rbx), %rax
movslq %ebp, %rcx
vcvttss2si (%rax,%rcx,4), %eax
jmp 0xc8fd
leaq 0x3cb50(%rip), %rdi # 0x49512
leaq 0x3ccb7(%rip), %rdx # 0x49680
movl $0x3a9, %esi # imm = 0x3A9
xorl %eax, %eax
callq 0xaf40
leaq 0x3cb36(%rip), %rdi # 0x49512
leaq 0x3cb87(%rip), %rdx # 0x4956a
leaq 0x3cca2(%rip), %rcx # 0x4968c
movl $0x38b, %esi # imm = 0x38B
jmp 0xca7e
leaq 0x3cb17(%rip), %rdi # 0x49512
leaq 0x3cb68(%rip), %rdx # 0x4956a
leaq 0x3cca3(%rip), %rcx # 0x496ac
movl $0x390, %esi # imm = 0x390
jmp 0xca7e
leaq 0x3cafb(%rip), %rdi # 0x49512
leaq 0x3cb4c(%rip), %rdx # 0x4956a
leaq 0x3cca8(%rip), %rcx # 0x496cd
movl $0x395, %esi # imm = 0x395
jmp 0xca7e
leaq 0x3cadf(%rip), %rdi # 0x49512
leaq 0x3cb30(%rip), %rdx # 0x4956a
leaq 0x3ccd2(%rip), %rcx # 0x49713
movl $0x39f, %esi # imm = 0x39F
jmp 0xca7e
leaq 0x3cac3(%rip), %rdi # 0x49512
leaq 0x3cb14(%rip), %rdx # 0x4956a
leaq 0x3ccdb(%rip), %rcx # 0x49738
movl $0x3a4, %esi # imm = 0x3A4
jmp 0xca7e
leaq 0x3caa7(%rip), %rdi # 0x49512
leaq 0x3caf8(%rip), %rdx # 0x4956a
leaq 0x3cc75(%rip), %rcx # 0x496ee
movl $0x39a, %esi # imm = 0x39A
xorl %eax, %eax
callq 0xaf40
|
ggml_get_i32_1d:
push rbp
push r14
push rbx
sub rsp, 20h
mov ebp, esi
mov rbx, rdi
call _ggml_is_contiguous
test al, al
jz short loc_C8BA
mov eax, [rbx]
lea ecx, [rax-18h]; switch 7 cases
cmp ecx, 6
ja short def_C89D; jumptable 000000000000C89D default case
lea rax, jpt_C89D
movsxd rcx, ds:(jpt_C89D - 490E0h)[rax+rcx*4]
add rcx, rax
jmp rcx; switch jump
loc_C89F:
cmp qword ptr [rbx+30h], 1; jumptable 000000000000C89D case 24
jnz loc_C9D5
mov rax, [rbx+0F8h]
movsxd rcx, ebp
movsx eax, byte ptr [rax+rcx]
jmp short loc_C8FD
loc_C8BA:
vxorps xmm0, xmm0, xmm0
lea rcx, [rsp+38h+var_30]
vmovups ymmword ptr [rcx-8], ymm0
movsxd rsi, ebp
lea r8, [rsp+38h+var_28]
lea r9, [rsp+38h+var_20]
mov r14, rsp
mov rdi, rbx
mov rdx, r14
vzeroupper
call _ggml_unravel_index
mov esi, [r14]
mov edx, [r14+8]
mov ecx, [r14+10h]
mov r8d, [r14+18h]
mov rdi, rbx
call _ggml_get_i32_nd
loc_C8FD:
add rsp, 20h
pop rbx
pop r14
pop rbp
retn
def_C89D:
test eax, eax; jumptable 000000000000C89D default case
jz loc_C99C
cmp eax, 1
jnz loc_C9BB; jumptable 000000000000C89D cases 27-29
cmp qword ptr [rbx+30h], 2
jnz loc_CA64
mov rax, [rbx+0F8h]
movsxd rcx, ebp
movzx eax, word ptr [rax+rcx*2]
mov rcx, cs:ggml_table_f32_f16_ptr
vcvttss2si eax, dword ptr [rcx+rax*4]
jmp short loc_C8FD
loc_C93E:
cmp qword ptr [rbx+30h], 2; jumptable 000000000000C89D case 25
jnz loc_C9F4
mov rax, [rbx+0F8h]
movsxd rcx, ebp
movsx eax, word ptr [rax+rcx*2]
jmp short loc_C8FD
loc_C959:
cmp qword ptr [rbx+30h], 4; jumptable 000000000000C89D case 26
jnz loc_CA10
mov rax, [rbx+0F8h]
movsxd rcx, ebp
mov eax, [rax+rcx*4]
jmp short loc_C8FD
loc_C973:
cmp qword ptr [rbx+30h], 2; jumptable 000000000000C89D case 30
jnz loc_CA2C
mov rax, [rbx+0F8h]
movsxd rcx, ebp
movzx eax, word ptr [rax+rcx*2]
shl eax, 10h
vmovd xmm0, eax
vcvttss2si eax, xmm0
jmp loc_C8FD
loc_C99C:
cmp qword ptr [rbx+30h], 4
jnz loc_CA48
mov rax, [rbx+0F8h]
movsxd rcx, ebp
vcvttss2si eax, dword ptr [rax+rcx*4]
jmp loc_C8FD
loc_C9BB:
lea rdi, aWorkspaceLlm4b_0; jumptable 000000000000C89D cases 27-29
lea rdx, aFatalError; "fatal error"
mov esi, 3A9h
xor eax, eax
call _ggml_abort
loc_C9D5:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo; "tensor->nb[0] == sizeof(int8_t)"
mov esi, 38Bh
jmp loc_CA7E
loc_C9F4:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_0; "tensor->nb[0] == sizeof(int16_t)"
mov esi, 390h
jmp short loc_CA7E
loc_CA10:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_1; "tensor->nb[0] == sizeof(int32_t)"
mov esi, 395h
jmp short loc_CA7E
loc_CA2C:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_2; "tensor->nb[0] == sizeof(ggml_bf16_t)"
mov esi, 39Fh
jmp short loc_CA7E
loc_CA48:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_3; "tensor->nb[0] == sizeof(float)"
mov esi, 3A4h
jmp short loc_CA7E
loc_CA64:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNb0Sizeo_4; "tensor->nb[0] == sizeof(ggml_fp16_t)"
mov esi, 39Ah
loc_CA7E:
xor eax, eax
call _ggml_abort
|
int ggml_get_i32_1d(int *a1, int a2, __m128 _XMM0)
{
int v4; // eax
int result; // eax
unsigned int v14; // [rsp+0h] [rbp-38h] BYREF
unsigned int v15; // [rsp+8h] [rbp-30h] BYREF
unsigned int v16; // [rsp+10h] [rbp-28h] BYREF
_DWORD v17[8]; // [rsp+18h] [rbp-20h] BYREF
if ( (unsigned __int8)ggml_is_contiguous() )
{
v4 = *a1;
switch ( *a1 )
{
case 24:
if ( *((_QWORD *)a1 + 6) != 1LL )
goto LABEL_19;
return *(char *)(*((_QWORD *)a1 + 31) + a2);
case 25:
if ( *((_QWORD *)a1 + 6) != 2LL )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c",
912LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(int16_t)");
goto LABEL_25;
}
return *(__int16 *)(*((_QWORD *)a1 + 31) + 2LL * a2);
case 26:
if ( *((_QWORD *)a1 + 6) != 4LL )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c",
917LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(int32_t)");
goto LABEL_25;
}
return *(_DWORD *)(*((_QWORD *)a1 + 31) + 4LL * a2);
case 27:
case 28:
case 29:
goto LABEL_18;
case 30:
if ( *((_QWORD *)a1 + 6) == 2LL )
{
_EAX = *(unsigned __int16 *)(*((_QWORD *)a1 + 31) + 2LL * a2) << 16;
__asm
{
vmovd xmm0, eax
vcvttss2si eax, xmm0
}
return result;
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c",
927LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(ggml_bf16_t)");
goto LABEL_25;
default:
if ( v4 )
{
if ( v4 == 1 )
{
if ( *((_QWORD *)a1 + 6) == 2LL )
{
_RAX = *(unsigned __int16 *)(*((_QWORD *)a1 + 31) + 2LL * a2);
_RCX = &ggml_table_f32_f16;
__asm { vcvttss2si eax, dword ptr [rcx+rax*4] }
return result;
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c",
922LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(ggml_fp16_t)");
}
else
{
LABEL_18:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c",
937LL,
"fatal error");
LABEL_19:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c",
907LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(int8_t)");
}
}
else
{
if ( *((_QWORD *)a1 + 6) == 4LL )
{
_RAX = *((_QWORD *)a1 + 31);
_RCX = a2;
__asm { vcvttss2si eax, dword ptr [rax+rcx*4] }
return result;
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c",
932LL,
"GGML_ASSERT(%s) failed",
"tensor->nb[0] == sizeof(float)");
}
LABEL_25:
result = ggml_get_i32_nd();
break;
}
}
else
{
__asm { vxorps xmm0, xmm0, xmm0 }
_RCX = &v15;
__asm
{
vmovups ymmword ptr [rcx-8], ymm0
vzeroupper
}
ggml_unravel_index(a1, a2, &v14, &v15, &v16, v17, *(double *)&_XMM0);
return ggml_get_i32_nd(a1, v14, v15, v16, v17[0]);
}
return result;
}
|
ggml_get_i32_1d:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV EBP,ESI
MOV RBX,RDI
CALL 0x0010a230
TEST AL,AL
JZ 0x0010c8ba
MOV EAX,dword ptr [RBX]
LEA ECX,[RAX + -0x18]
CMP ECX,0x6
JA 0x0010c906
LEA RAX,[0x1490e0]
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_18:
CMP qword ptr [RBX + 0x30],0x1
JNZ 0x0010c9d5
MOV RAX,qword ptr [RBX + 0xf8]
MOVSXD RCX,EBP
MOVSX EAX,byte ptr [RAX + RCX*0x1]
JMP 0x0010c8fd
LAB_0010c8ba:
VXORPS XMM0,XMM0,XMM0
LEA RCX,[RSP + 0x8]
VMOVUPS ymmword ptr [RCX + -0x8],YMM0
MOVSXD RSI,EBP
LEA R8,[RSP + 0x10]
LEA R9,[RSP + 0x18]
MOV R14,RSP
MOV RDI,RBX
MOV RDX,R14
VZEROUPPER
CALL 0x0010a6e0
MOV ESI,dword ptr [R14]
MOV EDX,dword ptr [R14 + 0x8]
MOV ECX,dword ptr [R14 + 0x10]
MOV R8D,dword ptr [R14 + 0x18]
MOV RDI,RBX
CALL 0x0010a6a0
LAB_0010c8fd:
ADD RSP,0x20
POP RBX
POP R14
POP RBP
RET
default:
TEST EAX,EAX
JZ 0x0010c99c
CMP EAX,0x1
JNZ 0x0010c9bb
CMP qword ptr [RBX + 0x30],0x2
JNZ 0x0010ca64
MOV RAX,qword ptr [RBX + 0xf8]
MOVSXD RCX,EBP
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [0x0015bf60]
VCVTTSS2SI EAX,dword ptr [RCX + RAX*0x4]
JMP 0x0010c8fd
caseD_19:
CMP qword ptr [RBX + 0x30],0x2
JNZ 0x0010c9f4
MOV RAX,qword ptr [RBX + 0xf8]
MOVSXD RCX,EBP
MOVSX EAX,word ptr [RAX + RCX*0x2]
JMP 0x0010c8fd
caseD_1a:
CMP qword ptr [RBX + 0x30],0x4
JNZ 0x0010ca10
MOV RAX,qword ptr [RBX + 0xf8]
MOVSXD RCX,EBP
MOV EAX,dword ptr [RAX + RCX*0x4]
JMP 0x0010c8fd
caseD_1e:
CMP qword ptr [RBX + 0x30],0x2
JNZ 0x0010ca2c
MOV RAX,qword ptr [RBX + 0xf8]
MOVSXD RCX,EBP
MOVZX EAX,word ptr [RAX + RCX*0x2]
SHL EAX,0x10
VMOVD XMM0,EAX
VCVTTSS2SI EAX,XMM0
JMP 0x0010c8fd
LAB_0010c99c:
CMP qword ptr [RBX + 0x30],0x4
JNZ 0x0010ca48
MOV RAX,qword ptr [RBX + 0xf8]
MOVSXD RCX,EBP
VCVTTSS2SI EAX,dword ptr [RAX + RCX*0x4]
JMP 0x0010c8fd
caseD_1b:
LEA RDI,[0x149512]
LEA RDX,[0x149680]
MOV ESI,0x3a9
XOR EAX,EAX
CALL 0x0010af40
LAB_0010c9d5:
LEA RDI,[0x149512]
LEA RDX,[0x14956a]
LEA RCX,[0x14968c]
MOV ESI,0x38b
JMP 0x0010ca7e
LAB_0010c9f4:
LEA RDI,[0x149512]
LEA RDX,[0x14956a]
LEA RCX,[0x1496ac]
MOV ESI,0x390
JMP 0x0010ca7e
LAB_0010ca10:
LEA RDI,[0x149512]
LEA RDX,[0x14956a]
LEA RCX,[0x1496cd]
MOV ESI,0x395
JMP 0x0010ca7e
LAB_0010ca2c:
LEA RDI,[0x149512]
LEA RDX,[0x14956a]
LEA RCX,[0x149713]
MOV ESI,0x39f
JMP 0x0010ca7e
LAB_0010ca48:
LEA RDI,[0x149512]
LEA RDX,[0x14956a]
LEA RCX,[0x149738]
MOV ESI,0x3a4
JMP 0x0010ca7e
LAB_0010ca64:
LEA RDI,[0x149512]
LEA RDX,[0x14956a]
LEA RCX,[0x1496ee]
MOV ESI,0x39a
LAB_0010ca7e:
XOR EAX,EAX
CALL 0x0010af40
|
ulong ggml_get_i32_1d(int *param_1,int param_2)
{
int iVar1;
char cVar2;
ulong uVar3;
char *pcVar4;
int8 uVar5;
ulong local_38;
ulong uStack_30;
ulong uStack_28;
ulong uStack_20;
cVar2 = ggml_is_contiguous();
if (cVar2 == '\0') {
local_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
ggml_unravel_index(param_1,(long)param_2,&local_38,&uStack_30,&uStack_28,&uStack_20);
uVar3 = ggml_get_i32_nd(param_1,local_38 & 0xffffffff,uStack_30 & 0xffffffff,
uStack_28 & 0xffffffff,uStack_20 & 0xffffffff);
}
else {
iVar1 = *param_1;
switch(iVar1) {
case 0x18:
if (*(long *)(param_1 + 0xc) != 1) {
pcVar4 = "tensor->nb[0] == sizeof(int8_t)";
uVar5 = 0x38b;
LAB_0010ca7e:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c"
,uVar5,"GGML_ASSERT(%s) failed",pcVar4);
}
uVar3 = (ulong)(uint)(int)*(char *)(*(long *)(param_1 + 0x3e) + (long)param_2);
break;
case 0x19:
if (*(long *)(param_1 + 0xc) != 2) {
pcVar4 = "tensor->nb[0] == sizeof(int16_t)";
uVar5 = 0x390;
goto LAB_0010ca7e;
}
uVar3 = (ulong)(uint)(int)*(short *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 2);
break;
case 0x1a:
if (*(long *)(param_1 + 0xc) != 4) {
pcVar4 = "tensor->nb[0] == sizeof(int32_t)";
uVar5 = 0x395;
goto LAB_0010ca7e;
}
uVar3 = (ulong)*(uint *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 4);
break;
case 0x1b:
case 0x1c:
case 0x1d:
switchD_0010c89d_caseD_1b:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c"
,0x3a9,"fatal error");
case 0x1e:
if (*(long *)(param_1 + 0xc) != 2) {
pcVar4 = "tensor->nb[0] == sizeof(ggml_bf16_t)";
uVar5 = 0x39f;
goto LAB_0010ca7e;
}
uVar3 = (ulong)(uint)(int)(float)((uint)*(ushort *)
(*(long *)(param_1 + 0x3e) + (long)param_2 * 2) <<
0x10);
break;
default:
if (iVar1 == 0) {
if (*(long *)(param_1 + 0xc) != 4) {
pcVar4 = "tensor->nb[0] == sizeof(float)";
uVar5 = 0x3a4;
goto LAB_0010ca7e;
}
uVar3 = CONCAT44((int)((ulong)*(long *)(param_1 + 0x3e) >> 0x20),
(int)*(float *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 4));
}
else {
if (iVar1 != 1) goto switchD_0010c89d_caseD_1b;
if (*(long *)(param_1 + 0xc) != 2) {
pcVar4 = "tensor->nb[0] == sizeof(ggml_fp16_t)";
uVar5 = 0x39a;
goto LAB_0010ca7e;
}
uVar3 = (ulong)(uint)(int)*(float *)(PTR_ggml_table_f32_f16_0015bf60 +
(ulong)*(ushort *)
(*(long *)(param_1 + 0x3e) + (long)param_2 * 2)
* 4);
}
}
}
return uVar3;
}
|
|
18,505
|
testing::internal::XmlUnitTestResultPrinter::OutputXmlCDataSection(std::ostream*, char const*)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
void XmlUnitTestResultPrinter::OutputXmlCDataSection(::std::ostream* stream,
const char* data) {
const char* segment = data;
*stream << "<![CDATA[";
for (;;) {
const char* const next_segment = strstr(segment, "]]>");
if (next_segment != nullptr) {
stream->write(segment,
static_cast<std::streamsize>(next_segment - segment));
*stream << "]]>]]><![CDATA[";
segment = next_segment + strlen("]]>");
} else {
*stream << segment;
break;
}
}
*stream << "]]>";
}
|
O0
|
cpp
|
testing::internal::XmlUnitTestResultPrinter::OutputXmlCDataSection(std::ostream*, char const*):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x4810b(%rip), %rsi # 0x11d9cf
callq 0x166e0
movq 0x10(%rsp), %rdi
leaq 0x480ed(%rip), %rsi # 0x11d9c2
callq 0x16110
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0xd5924
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rax
subq %rax, %rdx
callq 0x169a0
movq 0x20(%rsp), %rdi
leaq 0x480b7(%rip), %rsi # 0x11d9c6
callq 0x166e0
movq 0x8(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x10(%rsp)
jmp 0xd5935
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x166e0
jmp 0xd5937
jmp 0xd58c9
movq 0x20(%rsp), %rdi
leaq 0x4807f(%rip), %rsi # 0x11d9c2
callq 0x166e0
addq $0x28, %rsp
retq
nopl (%rax)
|
_ZN7testing8internal24XmlUnitTestResultPrinter21OutputXmlCDataSectionEPSoPKc:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_18], rax
mov rdi, [rsp+28h+var_8]
lea rsi, aGtCdata+9; "<![CDATA["
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_D58C9:
mov rdi, [rsp+28h+var_18]
lea rsi, asc_11D9C2; "]]>"
call _strstr
mov [rsp+28h+var_20], rax
cmp [rsp+28h+var_20], 0
jz short loc_D5924
mov rdi, [rsp+28h+var_8]; this
mov rsi, [rsp+28h+var_18]; char *
mov rdx, [rsp+28h+var_20]
mov rax, [rsp+28h+var_18]
sub rdx, rax; __int64
call __ZNSo5writeEPKcl; std::ostream::write(char const*,long)
mov rdi, [rsp+28h+var_8]
lea rsi, aGtCdata; "]]>]]><![CDATA["
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rax, [rsp+28h+var_20]
add rax, 3
mov [rsp+28h+var_18], rax
jmp short loc_D5935
loc_D5924:
mov rdi, [rsp+28h+var_8]
mov rsi, [rsp+28h+var_18]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short loc_D5937
loc_D5935:
jmp short loc_D58C9
loc_D5937:
mov rdi, [rsp+28h+var_8]
lea rsi, asc_11D9C2; "]]>"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
add rsp, 28h
retn
|
long long testing::internal::XmlUnitTestResultPrinter::OutputXmlCDataSection(
testing::internal::XmlUnitTestResultPrinter *this,
std::ostream *a2,
const char *a3)
{
long long i; // rax
long long v5; // [rsp+8h] [rbp-20h]
char *v6; // [rsp+10h] [rbp-18h]
v6 = (char *)a2;
std::operator<<<std::char_traits<char>>(this, "<![CDATA[");
for ( i = strstr(a2, "]]>"); ; i = strstr(v5 + 3, "]]>") )
{
v5 = i;
if ( !i )
break;
std::ostream::write(this, v6, i - (_QWORD)v6);
std::operator<<<std::char_traits<char>>(this, "]]>]]><![CDATA[");
v6 = (char *)(v5 + 3);
}
std::operator<<<std::char_traits<char>>(this, v6);
return std::operator<<<std::char_traits<char>>(this, "]]>");
}
|
OutputXmlCDataSection:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x21d9cf]
CALL 0x001166e0
LAB_001d58c9:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[0x21d9c2]
CALL 0x00116110
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JZ 0x001d5924
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
SUB RDX,RAX
CALL 0x001169a0
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x21d9c6]
CALL 0x001166e0
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x3
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001d5935
LAB_001d5924:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001166e0
JMP 0x001d5937
LAB_001d5935:
JMP 0x001d58c9
LAB_001d5937:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x21d9c2]
CALL 0x001166e0
ADD RSP,0x28
RET
|
/* testing::internal::XmlUnitTestResultPrinter::OutputXmlCDataSection(std::ostream*, char const*) */
void testing::internal::XmlUnitTestResultPrinter::OutputXmlCDataSection
(ostream *param_1,char *param_2)
{
char *pcVar1;
char *local_18;
std::operator<<(param_1,"<![CDATA[");
local_18 = param_2;
while( true ) {
pcVar1 = strstr(local_18,"]]>");
if (pcVar1 == (char *)0x0) break;
std::ostream::write((char *)param_1,(long)local_18);
std::operator<<(param_1,"]]>]]><![CDATA[");
local_18 = pcVar1 + 3;
}
std::operator<<(param_1,local_18);
std::operator<<(param_1,"]]>");
return;
}
|
|
18,506
|
google::protobuf::compiler::java::RepeatedImmutableStringFieldGenerator::GenerateHashCode(google::protobuf::io::Printer*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/string_field.cc
|
void RepeatedImmutableStringFieldGenerator::GenerateHashCode(
io::Printer* printer) const {
printer->Print(
variables_,
"if (get$capitalized_name$Count() > 0) {\n"
" hash = (37 * hash) + $constant_name$;\n"
" hash = (53 * hash) + get$capitalized_name$List().hashCode();\n"
"}\n");
}
|
O3
|
cpp
|
google::protobuf::compiler::java::RepeatedImmutableStringFieldGenerator::GenerateHashCode(google::protobuf::io::Printer*) const:
movq %rsi, %rax
leaq 0x18(%rdi), %rsi
leaq 0xf4204(%rip), %rdx # 0x1dcc1c
movq %rax, %rdi
jmp 0x16cd32
|
_ZNK6google8protobuf8compiler4java37RepeatedImmutableStringFieldGenerator16GenerateHashCodeEPNS0_2io7PrinterE:
mov rax, rsi
lea rsi, [rdi+18h]
lea rdx, aIfGetCapitaliz_1; "if (get$capitalized_name$Count() > 0) {"...
mov rdi, rax; this
jmp _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
|
long long google::protobuf::compiler::java::RepeatedImmutableStringFieldGenerator::GenerateHashCode(
google::protobuf::compiler::java::RepeatedImmutableStringFieldGenerator *this,
google::protobuf::io::Printer *a2,
long long a3,
long long a4,
long long a5,
long long a6,
void *a7,
int a8,
char a9,
int a10,
int a11,
int a12,
int a13,
int a14,
int a15,
void *a16,
int a17,
char a18)
{
return google::protobuf::io::Printer::Print(a2, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18);
}
|
GenerateHashCode:
MOV RAX,RSI
LEA RSI,[RDI + 0x18]
LEA RDX,[0x2dcc1c]
MOV RDI,RAX
JMP 0x0026cd32
|
/* google::protobuf::compiler::java::RepeatedImmutableStringFieldGenerator::GenerateHashCode(google::protobuf::io::Printer*)
const */
void __thiscall
google::protobuf::compiler::java::RepeatedImmutableStringFieldGenerator::GenerateHashCode
(RepeatedImmutableStringFieldGenerator *this,Printer *param_1)
{
io::Printer::Print(param_1,(map *)(this + 0x18),
"if (get$capitalized_name$Count() > 0) {\n hash = (37 * hash) + $constant_name$;\n hash = (53 * hash) + get$capitalized_name$List().hashCode();\n}\n"
);
return;
}
|
|
18,507
|
long minja::Value::get<long>() const
|
monkey531[P]llama/common/minja.hpp
|
T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
}
|
O1
|
cpp
|
long minja::Value::get<long>() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
jne 0xb5995
cmpq $0x0, 0x20(%r14)
jne 0xb5995
cmpq $0x0, 0x30(%r14)
jne 0xb5995
addq $0x40, %r14
movq %rsp, %rbx
movl $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb5a4e
movl (%rbx), %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x1d5b0
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xab4e2
leaq 0x62866(%rip), %rsi # 0x118223
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x9d29f
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1e420
xorl %ebp, %ebp
movq 0xa3607(%rip), %rsi # 0x158fe8
movq 0xa3570(%rip), %rdx # 0x158f58
movq %rbx, %rdi
callq 0x1e5a0
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb5a16
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1dc40
jmp 0xb5a16
movq %rax, %r14
movb $0x1, %bpl
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb5a39
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1dc40
jmp 0xb5a39
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xb5a46
movq %rbx, %rdi
callq 0x1d8b0
movq %r14, %rdi
callq 0x1e650
|
_ZNK5minja5Value3getIiEET_v:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
cmp qword ptr [rdi+10h], 0
jnz short loc_B5995
cmp qword ptr [r14+20h], 0
jnz short loc_B5995
cmp qword ptr [r14+30h], 0
jnz short loc_B5995
add r14, 40h ; '@'
mov rbx, rsp
mov dword ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
mov eax, [rbx]
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_B5995:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+58h+var_38]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"...
mov rdi, rsp
lea rdx, [rsp+58h+var_38]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
mov rsi, rsp
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B5A16
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_B5A16
mov r14, rax
mov bpl, 1
loc_B5A16:
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B5A39
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_B5A39
mov r14, rax
mov bpl, 1
loc_B5A39:
test bpl, bpl
jz short loc_B5A46
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B5A46:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::get<int>(_QWORD *a1)
{
void *exception; // rbx
_DWORD v3[4]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v4[16]; // [rsp+20h] [rbp-38h] BYREF
if ( a1[2] || a1[4] || a1[6] )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v4, (long long)a1, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v3, (long long)"get<T> not defined for this value type: ", (long long)v4);
std::runtime_error::runtime_error(exception, v3);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3[0] = 0;
ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
a1 + 8,
v3);
return v3[0];
}
|
get<int>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP qword ptr [RDI + 0x10],0x0
JNZ 0x001b5995
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x001b5995
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x001b5995
ADD R14,0x40
MOV RBX,RSP
MOV dword ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x001b5a4e
MOV EAX,dword ptr [RBX]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_001b5995:
MOV EDI,0x10
CALL 0x0011d5b0
MOV RBX,RAX
LAB_001b59a2:
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001ab4e2
LAB_001b59b6:
LEA RSI,[0x218223]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x0019d29f
MOV BPL,0x1
LAB_001b59cd:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x0011e420
XOR EBP,EBP
MOV RSI,qword ptr [0x00258fe8]
MOV RDX,qword ptr [0x00258f58]
MOV RDI,RBX
CALL 0x0011e5a0
|
/* int minja::Value::get<int>() const */
int __thiscall minja::Value::get<int>(Value *this)
{
runtime_error *this_00;
int local_58 [8];
int1 local_38 [32];
if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) &&
(*(long *)(this + 0x30) == 0)) {
local_58[0] = 0;
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(this + 0x40,local_58);
return local_58[0];
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001b59a2 to 001b59b5 has its CatchHandler @ 001b5a33 */
dump_abi_cxx11_((int)local_38,SUB81(this,0));
/* try { // try from 001b59b6 to 001b59c9 has its CatchHandler @ 001b5a10 */
std::operator+((char *)local_58,(string *)"get<T> not defined for this value type: ");
/* try { // try from 001b59cd to 001b59ef has its CatchHandler @ 001b59f0 */
std::runtime_error::runtime_error(this_00,(string *)local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00258fe8,PTR__runtime_error_00258f58);
}
|
|
18,508
|
long minja::Value::get<long>() const
|
monkey531[P]llama/common/minja.hpp
|
T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
}
|
O2
|
cpp
|
long minja::Value::get<long>() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
callq 0x7f8b0
testb %al, %al
je 0x80266
addq $0x40, %r14
movq %r14, %rdi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x8044c
pushq $0x10
popq %rdi
callq 0x265e0
movq %rax, %rbx
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x7f8c0
leaq 0x51e8b(%rip), %rsi # 0xd2113
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x74fe2
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x27450
xorl %ebp, %ebp
movq 0xa1d42(%rip), %rsi # 0x121ff0
movq 0xa1ca3(%rip), %rdx # 0x121f58
movq %rbx, %rdi
callq 0x275b0
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x27998
jmp 0x802d2
movq %rax, %r14
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x27998
testb %bpl, %bpl
jne 0x802e4
jmp 0x802ec
movq %rax, %r14
movq %rbx, %rdi
callq 0x268f0
movq %r14, %rdi
callq 0x27660
|
_ZNK5minja5Value3getIbEET_v:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void)
test al, al
jz short loc_80266
add r14, 40h ; '@'
mov rdi, r14
add rsp, 40h
pop rbx
pop r14
pop rbp
jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIbTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
loc_80266:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"...
lea rdi, [rsp+58h+var_38]
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+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+58h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_802D2
mov r14, rax
mov bpl, 1
loc_802D2:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_802E4
jmp short loc_802EC
mov r14, rax
loc_802E4:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_802EC:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::get<bool>(minja::Value *a1)
{
void *exception; // rbx
_BYTE v3[32]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v4[56]; // [rsp+20h] [rbp-38h] BYREF
if ( !minja::Value::is_primitive(a1) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v4, (long long)"get<T> not defined for this value type: ", (long long)v3);
std::runtime_error::runtime_error(exception, v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIbTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE((char *)a1 + 64);
}
|
get<bool>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CALL 0x0017f8b0
TEST AL,AL
JZ 0x00180266
ADD R14,0x40
MOV RDI,R14
ADD RSP,0x40
POP RBX
POP R14
POP RBP
JMP 0x0018044c
LAB_00180266:
PUSH 0x10
POP RDI
CALL 0x001265e0
MOV RBX,RAX
LAB_00180271:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0017f8c0
LAB_00180281:
LEA RSI,[0x1d2113]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00174fe2
MOV BPL,0x1
LAB_00180298:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00127450
XOR EBP,EBP
MOV RSI,qword ptr [0x00221ff0]
MOV RDX,qword ptr [0x00221f58]
MOV RDI,RBX
CALL 0x001275b0
|
/* bool minja::Value::get<bool>() const */
bool __thiscall minja::Value::get<bool>(Value *this)
{
runtime_error *this_00;
char cVar1;
bool bVar2;
int1 auStack_58 [32];
string local_38 [32];
cVar1 = is_primitive(this);
if (cVar1 != '\0') {
bVar2 = (bool)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIbTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(this + 0x40);
return bVar2;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00180271 to 00180280 has its CatchHandler @ 001802e1 */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 00180281 to 00180294 has its CatchHandler @ 001802cc */
std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: ");
/* try { // try from 00180298 to 001802bc has its CatchHandler @ 001802bd */
std::runtime_error::runtime_error(this_00,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00221ff0,PTR__runtime_error_00221f58);
}
|
|
18,509
|
harvest_pins
|
eloqsql/mysys/lf_alloc-pin.c
|
static int harvest_pins(LF_PINS *el, struct st_harvester *hv)
{
int i;
LF_PINS *el_end= el+MY_MIN(hv->npins, LF_DYNARRAY_LEVEL_LENGTH);
for (; el < el_end; el++)
{
for (i= 0; i < LF_PINBOX_PINS; i++)
{
void *p= el->pin[i];
if (p)
*hv->granary++= p;
}
}
/*
hv->npins may become negative below, but it means that
we're on the last dynarray page and harvest_pins() won't be
called again. We don't bother to make hv->npins() correct
(that is 0) in this case.
*/
hv->npins-= LF_DYNARRAY_LEVEL_LENGTH;
return 0;
}
|
O3
|
c
|
harvest_pins:
movl 0x8(%rsi), %eax
movl $0x100, %ecx # imm = 0x100
cmpl %ecx, %eax
cmovll %eax, %ecx
testl %eax, %eax
jle 0xa597d
pushq %rbp
movq %rsp, %rbp
movslq %ecx, %rax
imulq $0x78, %rax, %rax
addq %rdi, %rax
xorl %ecx, %ecx
movq (%rdi,%rcx,8), %rdx
testq %rdx, %rdx
je 0xa5967
movq (%rsi), %r8
leaq 0x8(%r8), %r9
movq %r9, (%rsi)
movq %rdx, (%r8)
incq %rcx
cmpq $0x4, %rcx
jne 0xa5951
addq $0x78, %rdi
cmpq %rax, %rdi
jb 0xa594f
movl 0x8(%rsi), %eax
popq %rbp
addl $0xffffff00, %eax # imm = 0xFFFFFF00
movl %eax, 0x8(%rsi)
xorl %eax, %eax
retq
|
harvest_pins:
mov eax, [rsi+8]
mov ecx, 100h
cmp eax, ecx
cmovl ecx, eax
test eax, eax
jle short loc_A597D
push rbp
mov rbp, rsp
movsxd rax, ecx
imul rax, 78h ; 'x'
add rax, rdi
loc_A594F:
xor ecx, ecx
loc_A5951:
mov rdx, [rdi+rcx*8]
test rdx, rdx
jz short loc_A5967
mov r8, [rsi]
lea r9, [r8+8]
mov [rsi], r9
mov [r8], rdx
loc_A5967:
inc rcx
cmp rcx, 4
jnz short loc_A5951
add rdi, 78h ; 'x'
cmp rdi, rax
jb short loc_A594F
mov eax, [rsi+8]
pop rbp
loc_A597D:
add eax, 0FFFFFF00h
mov [rsi+8], eax
xor eax, eax
retn
|
long long harvest_pins(unsigned long long a1, long long a2)
{
int v2; // eax
int v3; // ecx
unsigned long long v4; // rax
long long i; // rcx
long long v6; // rdx
_QWORD *v7; // r8
v2 = *(_DWORD *)(a2 + 8);
v3 = 256;
if ( v2 < 256 )
v3 = *(_DWORD *)(a2 + 8);
if ( v2 > 0 )
{
v4 = a1 + 120LL * v3;
do
{
for ( i = 0LL; i != 4; ++i )
{
v6 = *(_QWORD *)(a1 + 8 * i);
if ( v6 )
{
v7 = *(_QWORD **)a2;
*(_QWORD *)a2 += 8LL;
*v7 = v6;
}
}
a1 += 120LL;
}
while ( a1 < v4 );
v2 = *(_DWORD *)(a2 + 8);
}
*(_DWORD *)(a2 + 8) = v2 - 256;
return 0LL;
}
|
harvest_pins:
MOV EAX,dword ptr [RSI + 0x8]
MOV ECX,0x100
CMP EAX,ECX
CMOVL ECX,EAX
TEST EAX,EAX
JLE 0x001a597d
PUSH RBP
MOV RBP,RSP
MOVSXD RAX,ECX
IMUL RAX,RAX,0x78
ADD RAX,RDI
LAB_001a594f:
XOR ECX,ECX
LAB_001a5951:
MOV RDX,qword ptr [RDI + RCX*0x8]
TEST RDX,RDX
JZ 0x001a5967
MOV R8,qword ptr [RSI]
LEA R9,[R8 + 0x8]
MOV qword ptr [RSI],R9
MOV qword ptr [R8],RDX
LAB_001a5967:
INC RCX
CMP RCX,0x4
JNZ 0x001a5951
ADD RDI,0x78
CMP RDI,RAX
JC 0x001a594f
MOV EAX,dword ptr [RSI + 0x8]
POP RBP
LAB_001a597d:
ADD EAX,0xffffff00
MOV dword ptr [RSI + 0x8],EAX
XOR EAX,EAX
RET
|
int8 harvest_pins(ulong param_1,long *param_2)
{
long lVar1;
long *plVar2;
int iVar3;
ulong uVar4;
int iVar5;
long lVar6;
iVar3 = (int)param_2[1];
iVar5 = 0x100;
if (iVar3 < 0x100) {
iVar5 = iVar3;
}
if (0 < iVar3) {
uVar4 = (long)iVar5 * 0x78 + param_1;
do {
lVar6 = 0;
do {
lVar1 = *(long *)(param_1 + lVar6 * 8);
if (lVar1 != 0) {
plVar2 = (long *)*param_2;
*param_2 = (long)(plVar2 + 1);
*plVar2 = lVar1;
}
lVar6 = lVar6 + 1;
} while (lVar6 != 4);
param_1 = param_1 + 0x78;
} while (param_1 < uVar4);
iVar3 = (int)param_2[1];
}
*(int *)(param_2 + 1) = iVar3 + -0x100;
return 0;
}
|
|
18,510
|
minja::Parser::parseIdentifier()
|
llama.cpp/common/minja/minja.hpp
|
std::shared_ptr<VariableExpr> parseIdentifier() {
static std::regex ident_regex(R"((?!(?:not|is|and|or|del)\b)[a-zA-Z_]\w*)");
auto location = get_location();
auto ident = consumeToken(ident_regex);
if (ident.empty())
return nullptr;
return std::make_shared<VariableExpr>(location, ident);
}
|
O3
|
cpp
|
minja::Parser::parseIdentifier():
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x842ea(%rip), %rax # 0x163680
movb (%rax), %al
testb %al, %al
je 0xdf457
movq (%r15), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0xdf3cb
movq 0x82bdb(%rip), %rcx # 0x161f98
cmpb $0x0, (%rcx)
je 0xdf3c7
incl 0x8(%rax)
jmp 0xdf3cb
lock
incl 0x8(%rax)
leaq 0x30(%rsp), %r14
movq 0x20(%r15), %rax
subq 0x10(%r15), %rax
movq %rax, 0x8(%r14)
leaq 0x8427d(%rip), %rdx # 0x163660
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl $0x1, %ecx
callq 0xdec6e
cmpq $0x0, 0x10(%rsp)
je 0xdf421
movq $0x0, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x7(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %rbx, %rsi
callq 0xee586
jmp 0xdf427
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdf442
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
movq %r14, %rdi
callq 0x70982
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x84222(%rip), %rdi # 0x163680
callq 0x20590
testl %eax, %eax
je 0xdf3a0
leaq 0x841ee(%rip), %rdi # 0x163660
leaq 0x42930(%rip), %rsi # 0x121da9
movl $0x10, %edx
callq 0x6629c
leaq -0x79142(%rip), %rdi # 0x66348
leaq 0x841cf(%rip), %rsi # 0x163660
leaq 0x835c0(%rip), %rdx # 0x162a58
callq 0x20ed0
leaq 0x841dc(%rip), %rdi # 0x163680
callq 0x20950
jmp 0xdf3a0
movq %rax, %rbx
leaq 0x841c8(%rip), %rdi # 0x163680
callq 0x206c0
jmp 0xdf4ea
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdf4e2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0xdf4e2
movq %rax, %rbx
movq %r14, %rdi
callq 0x70982
movq %rbx, %rdi
callq 0x20ae0
|
_ZN5minja6Parser15parseIdentifierEv:
push r15
push r14
push rbx
sub rsp, 40h
mov r15, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; `guard variable for'minja::Parser::parseIdentifier(void)::ident_regex
mov al, [rax]
test al, al
jz loc_DF457
loc_DF3A0:
mov rax, [r15]
mov [rsp+58h+var_30], rax
mov rax, [r15+8]
mov [rsp+58h+var_28], rax
test rax, rax
jz short loc_DF3CB
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_DF3C7
inc dword ptr [rax+8]
jmp short loc_DF3CB
loc_DF3C7:
lock inc dword ptr [rax+8]
loc_DF3CB:
lea r14, [rsp+58h+var_28]
mov rax, [r15+20h]
sub rax, [r15+10h]
mov [r14+8], rax
lea rdx, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; int
lea rdi, [rsp+58h+var_50]; int
mov rsi, r15; int
mov ecx, 1; int
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
cmp [rsp+58h+var_48], 0
jz short loc_DF421
mov qword ptr [rbx], 0
lea rdi, [rbx+8]
lea rdx, [rsp+58h+var_51]
lea rcx, [rsp+58h+var_30]
lea r8, [rsp+58h+var_50]
mov rsi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja12VariableExprESaIvEJRNS4_8LocationERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::VariableExpr,std::allocator<void>,minja::Location &,std::string &>(minja::VariableExpr *&,std::_Sp_alloc_shared_tag<std::allocator<void>>,minja::Location &,std::string &)
jmp short loc_DF427
loc_DF421:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_DF427:
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_DF442
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DF442:
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop r15
retn
loc_DF457:
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_DF3A0
lea rdi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rsi, aNotIsAndOrDelB; "(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\"...
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, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_DF3A0
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_DF4EA
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_DF4E2
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_DF4E2
mov rbx, rax
loc_DF4E2:
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_DF4EA:
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseIdentifier(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
char v4; // [rsp+7h] [rbp-51h] BYREF
void *v5[2]; // [rsp+8h] [rbp-50h] BYREF
long long v6; // [rsp+18h] [rbp-40h] BYREF
long long v7; // [rsp+28h] [rbp-30h] BYREF
volatile signed __int32 *v8[5]; // [rsp+30h] [rbp-28h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
(long long)"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]);
}
v7 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v8[0] = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v8[1] = (volatile signed __int32 *)(a2[4] - a2[2]);
minja::Parser::consumeToken(
v5,
(long long)a2,
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
1u);
if ( v5[1] )
{
*(_QWORD *)this = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::VariableExpr,std::allocator<void>,minja::Location &,std::string &>(
(char *)this + 8,
this,
&v4,
&v7,
v5);
}
else
{
*(_OWORD *)this = 0LL;
}
if ( v5[0] != &v6 )
operator delete(v5[0], v6 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v8);
return this;
}
|
parseIdentifier:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R15,RSI
MOV RBX,RDI
LEA RAX,[0x263680]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001df457
LAB_001df3a0:
MOV RAX,qword ptr [R15]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RSP + 0x30],RAX
TEST RAX,RAX
JZ 0x001df3cb
MOV RCX,qword ptr [0x00261f98]
CMP byte ptr [RCX],0x0
JZ 0x001df3c7
INC dword ptr [RAX + 0x8]
JMP 0x001df3cb
LAB_001df3c7:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001df3cb:
LEA R14,[RSP + 0x30]
MOV RAX,qword ptr [R15 + 0x20]
SUB RAX,qword ptr [R15 + 0x10]
MOV qword ptr [R14 + 0x8],RAX
LAB_001df3dc:
LEA RDX,[0x263660]
LEA RDI,[RSP + 0x8]
MOV RSI,R15
MOV ECX,0x1
CALL 0x001dec6e
CMP qword ptr [RSP + 0x10],0x0
JZ 0x001df421
MOV qword ptr [RBX],0x0
LEA RDI,[RBX + 0x8]
LAB_001df408:
LEA RDX,[RSP + 0x7]
LEA RCX,[RSP + 0x28]
LEA R8,[RSP + 0x8]
MOV RSI,RBX
CALL 0x001ee586
JMP 0x001df427
LAB_001df421:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_001df427:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001df442
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00120180
LAB_001df442:
MOV RDI,R14
CALL 0x00170982
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
LAB_001df457:
LEA RDI,[0x263680]
CALL 0x00120590
TEST EAX,EAX
JZ 0x001df3a0
LAB_001df46b:
LEA RDI,[0x263660]
LEA RSI,[0x221da9]
MOV EDX,0x10
CALL 0x0016629c
LAB_001df483:
LEA RDI,[0x166348]
LEA RSI,[0x263660]
LEA RDX,[0x262a58]
CALL 0x00120ed0
LEA RDI,[0x263680]
CALL 0x00120950
JMP 0x001df3a0
|
/* minja::Parser::parseIdentifier() */
void minja::Parser::parseIdentifier(void)
{
int iVar1;
int8 *in_RSI;
int8 *in_RDI;
long *local_50;
long local_48;
long local_40 [2];
int8 local_30;
long local_28;
long local_20;
if (parseIdentifier()::ident_regex_abi_cxx11_ == '\0') {
iVar1 = __cxa_guard_acquire(&parseIdentifier()::ident_regex_abi_cxx11_);
if (iVar1 != 0) {
/* try { // try from 001df46b to 001df482 has its CatchHandler @ 001df4ae */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseIdentifier()::ident_regex_abi_cxx11_,
"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseIdentifier()::ident_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseIdentifier()::ident_regex_abi_cxx11_);
}
}
local_30 = *in_RSI;
local_28 = in_RSI[1];
if (local_28 != 0) {
if (*PTR___libc_single_threaded_00261f98 == '\0') {
LOCK();
*(int *)(local_28 + 8) = *(int *)(local_28 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_28 + 8) = *(int *)(local_28 + 8) + 1;
}
}
local_20 = in_RSI[4] - in_RSI[2];
/* try { // try from 001df3dc to 001df3f4 has its CatchHandler @ 001df4df */
consumeToken(&local_50);
if (local_48 == 0) {
*in_RDI = 0;
in_RDI[1] = 0;
}
else {
*in_RDI = 0;
/* try { // try from 001df408 to 001df41e has its CatchHandler @ 001df4bf */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::VariableExpr,std::allocator<void>,minja::Location&,std::__cxx11::string&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(in_RDI + 1));
}
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_28);
return;
}
|
|
18,511
|
OpenURL
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
|
void OpenURL(const char *url)
{
// Security check to (partially) avoid malicious code
if (strchr(url, '\'') != NULL) TRACELOG(LOG_WARNING, "SYSTEM: Provided URL could be potentially malicious, avoid [\'] character");
else
{
char *cmd = (char *)RL_CALLOC(strlen(url) + 32, sizeof(char));
#if defined(_WIN32)
sprintf(cmd, "explorer \"%s\"", url);
#endif
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
sprintf(cmd, "xdg-open '%s'", url); // Alternatives: firefox, x-www-browser
#endif
#if defined(__APPLE__)
sprintf(cmd, "open '%s'", url);
#endif
int result = system(cmd);
if (result == -1) TRACELOG(LOG_WARNING, "OpenURL() child process could not be created");
RL_FREE(cmd);
}
}
|
O0
|
c
|
OpenURL:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x27, %esi
callq 0xa1e0
cmpq $0x0, %rax
je 0xca7f5
movl $0x4, %edi
leaq 0xeadd0(%rip), %rsi # 0x1b55bc
movb $0x0, %al
callq 0x182c40
jmp 0xca857
movq -0x8(%rbp), %rdi
callq 0xa230
movq %rax, %rdi
addq $0x20, %rdi
movl $0x1, %esi
callq 0xa340
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rdx
leaq 0xeade3(%rip), %rsi # 0x1b5605
movb $0x0, %al
callq 0xa0f0
movq -0x10(%rbp), %rdi
callq 0xa430
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
jne 0xca84e
movl $0x4, %edi
leaq 0xeadcc(%rip), %rsi # 0x1b5613
movb $0x0, %al
callq 0x182c40
movq -0x10(%rbp), %rdi
callq 0xa640
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
OpenURL:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov esi, 27h ; '''
call _strchr
cmp rax, 0
jz short loc_CA7F5
mov edi, 4
lea rsi, aSystemProvided; "SYSTEM: Provided URL could be potential"...
mov al, 0
call TraceLog
jmp short loc_CA857
loc_CA7F5:
mov rdi, [rbp+var_8]
call _strlen
mov rdi, rax
add rdi, 20h ; ' '
mov esi, 1
call _calloc
mov [rbp+var_10], rax
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_8]
lea rsi, aXdgOpenS; "xdg-open '%s'"
mov al, 0
call _sprintf
mov rdi, [rbp+var_10]
call _system
mov [rbp+var_14], eax
cmp [rbp+var_14], 0FFFFFFFFh
jnz short loc_CA84E
mov edi, 4
lea rsi, aOpenurlChildPr; "OpenURL() child process could not be cr"...
mov al, 0
call TraceLog
loc_CA84E:
mov rdi, [rbp+var_10]
call _free
loc_CA857:
add rsp, 20h
pop rbp
retn
|
long long OpenURL(const char *a1)
{
int v1; // edx
int v2; // ecx
int v3; // r8d
int v4; // r9d
long long v6; // rax
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v11; // [rsp+10h] [rbp-10h]
if ( strchr(a1, 39LL) )
return TraceLog(
4,
(unsigned int)"SYSTEM: Provided URL could be potentially malicious, avoid ['] character",
v1,
v2,
v3,
v4);
v6 = strlen(a1);
v11 = calloc(v6 + 32, 1LL);
sprintf(v11, "xdg-open '%s'", a1);
if ( (unsigned int)system(v11) == -1 )
TraceLog(4, (unsigned int)"OpenURL() child process could not be created", v7, v8, v9, v10);
return free(v11);
}
|
OpenURL:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x27
CALL 0x0010a1e0
CMP RAX,0x0
JZ 0x001ca7f5
MOV EDI,0x4
LEA RSI,[0x2b55bc]
MOV AL,0x0
CALL 0x00282c40
JMP 0x001ca857
LAB_001ca7f5:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0010a230
MOV RDI,RAX
ADD RDI,0x20
MOV ESI,0x1
CALL 0x0010a340
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
LEA RSI,[0x2b5605]
MOV AL,0x0
CALL 0x0010a0f0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0010a430
MOV dword ptr [RBP + -0x14],EAX
CMP dword ptr [RBP + -0x14],-0x1
JNZ 0x001ca84e
MOV EDI,0x4
LEA RSI,[0x2b5613]
MOV AL,0x0
CALL 0x00282c40
LAB_001ca84e:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0010a640
LAB_001ca857:
ADD RSP,0x20
POP RBP
RET
|
void OpenURL(char *param_1)
{
int iVar1;
char *pcVar2;
size_t sVar3;
pcVar2 = strchr(param_1,0x27);
if (pcVar2 == (char *)0x0) {
sVar3 = strlen(param_1);
pcVar2 = (char *)calloc(sVar3 + 0x20,1);
sprintf(pcVar2,"xdg-open \'%s\'",param_1);
iVar1 = system(pcVar2);
if (iVar1 == -1) {
TraceLog(4,"OpenURL() child process could not be created");
}
free(pcVar2);
}
else {
TraceLog(4,"SYSTEM: Provided URL could be potentially malicious, avoid [\'] character");
}
return;
}
|
|
18,512
|
ImPlot::SetupAxisTicks(int, double, double, int, char const* const*, bool)
|
zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp
|
void SetupAxisTicks(ImAxis idx, double v_min, double v_max, int n_ticks, const char* const labels[], bool show_default) {
ImPlotContext& gp = *GImPlot;
IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked,
"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!");
n_ticks = n_ticks < 2 ? 2 : n_ticks;
FillRange(gp.TempDouble1, n_ticks, v_min, v_max);
SetupAxisTicks(idx, gp.TempDouble1.Data, n_ticks, labels, show_default);
}
|
O1
|
cpp
|
ImPlot::SetupAxisTicks(int, double, double, int, char const* const*, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movl %esi, %r15d
movl %edi, %r14d
movq 0x27e458(%rip), %r13 # 0x336ca0
movq 0x50(%r13), %rax
testq %rax, %rax
je 0xb885a
cmpb $0x1, 0x9de(%rax)
jne 0xb887e
leaq 0x1dc6e3(%rip), %rdi # 0x294f44
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
callq 0x2161f4
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
cmpl $0x3, %r15d
movl $0x2, %r12d
cmovgel %r15d, %r12d
leaq 0x418(%r13), %rdi
movl %r12d, %esi
callq 0xc8a97
movq 0x420(%r13), %rsi
movzbl %bpl, %r8d
movl %r14d, %edi
movl %r12d, %edx
movq %rbx, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb8745
|
_ZN6ImPlot14SetupAxisTicksEiddiPKPKcb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebp, ecx
mov rbx, rdx
mov r15d, esi
mov r14d, edi
mov r13, cs:GImPlot
mov rax, [r13+50h]
test rax, rax
jz short loc_B885A
cmp byte ptr [rax+9DEh], 1
jnz short loc_B887E
loc_B885A:
lea rdi, aSetupNeedsToBe; "Setup needs to be called after BeginPlo"...
movsd [rsp+48h+var_38], xmm1
movsd [rsp+48h+var_40], xmm0
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
movsd xmm0, [rsp+48h+var_40]
movsd xmm1, [rsp+48h+var_38]
loc_B887E:
cmp r15d, 3
mov r12d, 2
cmovge r12d, r15d
lea rdi, [r13+418h]
mov esi, r12d
call _ZN6ImPlot9FillRangeIdEEvR8ImVectorIT_EiS2_S2_; ImPlot::FillRange<double>(ImVector<double> &,int,double,double)
mov rsi, [r13+420h]; int
movzx r8d, bpl; char **
mov edi, r14d; this
mov edx, r12d; double *
mov rcx, rbx; int
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _ZN6ImPlot14SetupAxisTicksEiPKdiPKPKcb; ImPlot::SetupAxisTicks(int,double const*,int,char const* const*,bool)
|
long long ImPlot::SetupAxisTicks(
ImPlot *this,
double *a2,
double a3,
double a4,
const double *a5,
const char *const *a6)
{
unsigned __int8 v6; // bp
ImGui *v8; // r13
long long v9; // rax
unsigned int v10; // r12d
v6 = (unsigned __int8)a6;
v8 = GImPlot;
v9 = *((_QWORD *)GImPlot + 10);
if ( !v9 || *(_BYTE *)(v9 + 2526) == 1 )
ImGui::ErrorLog(
(ImGui *)"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!",
(const char *)a2);
v10 = 2;
if ( (int)a2 >= 3 )
v10 = (unsigned int)a2;
ImPlot::FillRange<double>((char *)v8 + 1048, v10, a3, a4);
return ImPlot::SetupAxisTicks(
(ImPlot *)(unsigned int)this,
*((char **)v8 + 132),
(const double *)v10,
a5,
(const char *const *)v6);
}
|
SetupAxisTicks:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBP,ECX
MOV RBX,RDX
MOV R15D,ESI
MOV R14D,EDI
MOV R13,qword ptr [0x00436ca0]
MOV RAX,qword ptr [R13 + 0x50]
TEST RAX,RAX
JZ 0x001b885a
CMP byte ptr [RAX + 0x9de],0x1
JNZ 0x001b887e
LAB_001b885a:
LEA RDI,[0x394f44]
MOVSD qword ptr [RSP + 0x10],XMM1
MOVSD qword ptr [RSP + 0x8],XMM0
CALL 0x003161f4
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVSD XMM1,qword ptr [RSP + 0x10]
LAB_001b887e:
CMP R15D,0x3
MOV R12D,0x2
CMOVGE R12D,R15D
LEA RDI,[R13 + 0x418]
MOV ESI,R12D
CALL 0x001c8a97
MOV RSI,qword ptr [R13 + 0x420]
MOVZX R8D,BPL
MOV EDI,R14D
MOV EDX,R12D
MOV RCX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001b8745
|
/* ImPlot::SetupAxisTicks(int, double, double, int, char const* const*, bool) */
void ImPlot::SetupAxisTicks
(int param_1,double param_2,double param_3,int param_4,char **param_5,bool param_6)
{
long lVar1;
int iVar2;
lVar1 = GImPlot;
if ((*(long *)(GImPlot + 0x50) == 0) || (*(char *)(*(long *)(GImPlot + 0x50) + 0x9de) == '\x01'))
{
ImGui::ErrorLog(
"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!"
);
}
iVar2 = 2;
if (2 < param_4) {
iVar2 = param_4;
}
FillRange<double>((ImVector *)(lVar1 + 0x418),iVar2,param_2,param_3);
SetupAxisTicks(param_1,*(double **)(lVar1 + 0x420),iVar2,param_5,param_6);
return;
}
|
|
18,513
|
maria_scan_init
|
eloqsql/storage/maria/ma_scan.c
|
int maria_scan_init(register MARIA_HA *info)
{
DBUG_ENTER("maria_scan_init");
info->cur_row.nextpos= info->s->pack.header_length; /* Read first record */
info->lastinx= -1; /* Can't forward or backward */
if (info->opt_flag & WRITE_CACHE_USED && flush_io_cache(&info->rec_cache))
DBUG_RETURN(my_errno);
if ((*info->s->scan_init)(info))
DBUG_RETURN(my_errno);
DBUG_RETURN(0);
}
|
O3
|
c
|
maria_scan_init:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x590(%rax), %rcx
movq %rcx, 0xa0(%rdi)
movl $0xffffffff, 0x62c(%rdi) # imm = 0xFFFFFFFF
testb $0x10, 0x61c(%rdi)
je 0x5ab0d
leaq 0x4b8(%rbx), %rdi
movl $0x1, %esi
callq 0x950b1
testl %eax, %eax
jne 0x5ab1a
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x650(%rax)
testb %al, %al
je 0x5ab23
callq 0xa1672
movl (%rax), %eax
jmp 0x5ab25
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
maria_scan_init:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rax, [rdi]
mov rcx, [rax+590h]
mov [rdi+0A0h], rcx
mov dword ptr [rdi+62Ch], 0FFFFFFFFh
test byte ptr [rdi+61Ch], 10h
jz short loc_5AB0D
lea rdi, [rbx+4B8h]
mov esi, 1
call my_b_flush_io_cache
test eax, eax
jnz short loc_5AB1A
mov rax, [rbx]
loc_5AB0D:
mov rdi, rbx
call qword ptr [rax+650h]
test al, al
jz short loc_5AB23
loc_5AB1A:
call _my_thread_var
mov eax, [rax]
jmp short loc_5AB25
loc_5AB23:
xor eax, eax
loc_5AB25:
add rsp, 8
pop rbx
pop rbp
retn
|
long long maria_scan_init(long long *a1, const char *a2)
{
long long v3; // rax
long long *v4; // rdi
v3 = *a1;
a1[20] = *(_QWORD *)(*a1 + 1424);
*((_DWORD *)a1 + 395) = -1;
if ( (*((_BYTE *)a1 + 1564) & 0x10) != 0 )
{
v4 = a1 + 151;
a2 = (_BYTE *)(&dword_0 + 1);
if ( (unsigned int)my_b_flush_io_cache(v4, 1LL) )
return *(unsigned int *)my_thread_var(v4, a2);
v3 = *a1;
}
v4 = a1;
if ( (*(unsigned __int8 ( **)(long long *))(v3 + 1616))(a1) )
return *(unsigned int *)my_thread_var(v4, a2);
return 0LL;
}
|
maria_scan_init:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RAX + 0x590]
MOV qword ptr [RDI + 0xa0],RCX
MOV dword ptr [RDI + 0x62c],0xffffffff
TEST byte ptr [RDI + 0x61c],0x10
JZ 0x0015ab0d
LEA RDI,[RBX + 0x4b8]
MOV ESI,0x1
CALL 0x001950b1
TEST EAX,EAX
JNZ 0x0015ab1a
MOV RAX,qword ptr [RBX]
LAB_0015ab0d:
MOV RDI,RBX
CALL qword ptr [RAX + 0x650]
TEST AL,AL
JZ 0x0015ab23
LAB_0015ab1a:
CALL 0x001a1672
MOV EAX,dword ptr [RAX]
JMP 0x0015ab25
LAB_0015ab23:
XOR EAX,EAX
LAB_0015ab25:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int4 maria_scan_init(long *param_1)
{
char cVar1;
int iVar2;
long lVar3;
int4 *puVar4;
lVar3 = *param_1;
param_1[0x14] = *(long *)(lVar3 + 0x590);
*(int4 *)((long)param_1 + 0x62c) = 0xffffffff;
if ((*(byte *)((long)param_1 + 0x61c) & 0x10) != 0) {
iVar2 = my_b_flush_io_cache(param_1 + 0x97,1);
if (iVar2 != 0) goto LAB_0015ab1a;
lVar3 = *param_1;
}
cVar1 = (**(code **)(lVar3 + 0x650))(param_1);
if (cVar1 == '\0') {
return 0;
}
LAB_0015ab1a:
puVar4 = (int4 *)_my_thread_var();
return *puVar4;
}
|
|
18,514
|
ma_check_print_error
|
eloqsql/storage/maria/ma_check_standalone.h
|
void _ma_check_print_error(HA_CHECK *param, const char *fmt,...)
{
va_list args;
DBUG_ENTER("_ma_check_print_error");
DBUG_PRINT("enter", ("format: %s", fmt));
fflush(stdout);
if (!param->warning_printed && !param->error_printed)
{
if (param->testflag & T_SILENT)
fprintf(stderr,"%s: Aria file %s\n",my_progname_short,param->isam_file_name);
param->out_flag|= O_DATA_LOST;
}
param->error_printed++;
va_start(args,fmt);
fprintf(stderr,"%s: error: ",my_progname_short);
vfprintf(stderr, fmt, args);
fputc('\n',stderr);
fflush(stderr);
va_end(args);
DBUG_VOID_RETURN;
}
|
O3
|
c
|
ma_check_print_error:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, -0xd0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %r8, -0xc0(%rbp)
movq %r9, -0xb8(%rbp)
testb %al, %al
je 0x32dae
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq 0x35b1f3(%rip), %rax # 0x38dfa8
movq (%rax), %rdi
callq 0x2a3e0
cmpb $0x0, 0x209a2(%r14)
jne 0x32e0d
cmpl $0x0, 0x2096c(%r14)
jne 0x32e0d
testb $0x40, 0xb12(%r14)
je 0x32e05
movq 0x35b1ce(%rip), %rax # 0x38dfb0
movq (%rax), %rdi
leaq 0xbdf3fc(%rip), %rax # 0xc121e8
movq (%rax), %rcx
movq (%r14), %r8
leaq 0xae252(%rip), %rdx # 0xe104b
movl $0x1, %esi
xorl %eax, %eax
callq 0x2a1e0
orb $0x4, 0x20968(%r14)
incl 0x2096c(%r14)
leaq -0xe0(%rbp), %rax
leaq -0x30(%rbp), %r14
movq %rax, 0x10(%r14)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%r14)
movq 0x35b171(%rip), %r15 # 0x38dfb0
movq (%r15), %rdi
leaq 0xbdf39f(%rip), %rax # 0xc121e8
movq (%rax), %rcx
leaq 0xae218(%rip), %rdx # 0xe106b
movl $0x1, %esi
xorl %eax, %eax
callq 0x2a1e0
movq (%r15), %rdi
movl $0x1, %esi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x2a740
movq (%r15), %rsi
movl $0xa, %edi
callq 0x2a6c0
movq (%r15), %rdi
callq 0x2a3e0
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
_ma_check_print_error:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 0C8h
mov rbx, rsi
mov r14, rdi
mov [rbp+var_D0], rdx
mov [rbp+var_C8], rcx
mov [rbp+var_C0], r8
mov [rbp+var_B8], r9
test al, al
jz short loc_32DAE
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_32DAE:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
cmp byte ptr [r14+209A2h], 0
jnz short loc_32E0D
cmp dword ptr [r14+2096Ch], 0
jnz short loc_32E0D
test byte ptr [r14+0B12h], 40h
jz short loc_32E05
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rax, my_progname_short
mov rcx, [rax]
mov r8, [r14]
lea rdx, aSAriaFileS; "%s: Aria file %s\n"
mov esi, 1
xor eax, eax
call ___fprintf_chk
loc_32E05:
or byte ptr [r14+20968h], 4
loc_32E0D:
inc dword ptr [r14+2096Ch]
lea rax, [rbp+var_E0]
lea r14, [rbp+var_30]
mov [r14+10h], rax
lea rax, [rbp+arg_0]
mov [r14+8], rax
mov rax, 3000000010h
mov [r14], rax
mov r15, cs:stderr_ptr
mov rdi, [r15]
lea rax, my_progname_short
mov rcx, [rax]
lea rdx, aSError; "%s: error: "
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [r15]
mov esi, 1
mov rdx, rbx
mov rcx, r14
call ___vfprintf_chk
mov rsi, [r15]
mov edi, 0Ah
call _fputc
mov rdi, [r15]
call _fflush
add rsp, 0C8h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long ma_check_print_error(long long a1, long long a2, ...)
{
va_list va; // [rsp+B0h] [rbp-30h] BYREF
fflush(stdout);
if ( !*(_BYTE *)(a1 + 133538) && !*(_DWORD *)(a1 + 133484) )
{
if ( (*(_BYTE *)(a1 + 2834) & 0x40) != 0 )
__fprintf_chk(stderr, 1LL, "%s: Aria file %s\n", my_progname_short, *(const char **)a1);
*(_BYTE *)(a1 + 133480) |= 4u;
}
++*(_DWORD *)(a1 + 133484);
va_start(va, a2);
__fprintf_chk(stderr, 1LL, "%s: error: ", my_progname_short);
__vfprintf_chk(stderr, 1LL, a2, va);
fputc(10LL, stderr);
return fflush(stderr);
}
|
_ma_check_print_error:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xc8
MOV RBX,RSI
MOV R14,RDI
MOV qword ptr [RBP + -0xd0],RDX
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xb8],R9
TEST AL,AL
JZ 0x00132dae
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_00132dae:
MOV RAX,qword ptr [0x0048dfa8]
MOV RDI,qword ptr [RAX]
CALL 0x0012a3e0
CMP byte ptr [R14 + 0x209a2],0x0
JNZ 0x00132e0d
CMP dword ptr [R14 + 0x2096c],0x0
JNZ 0x00132e0d
TEST byte ptr [R14 + 0xb12],0x40
JZ 0x00132e05
MOV RAX,qword ptr [0x0048dfb0]
MOV RDI,qword ptr [RAX]
LEA RAX,[0xd121e8]
MOV RCX,qword ptr [RAX]
MOV R8,qword ptr [R14]
LEA RDX,[0x1e104b]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x0012a1e0
LAB_00132e05:
OR byte ptr [R14 + 0x20968],0x4
LAB_00132e0d:
INC dword ptr [R14 + 0x2096c]
LEA RAX,[RBP + -0xe0]
LEA R14,[RBP + -0x30]
MOV qword ptr [R14 + 0x10],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [R14 + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [R14],RAX
MOV R15,qword ptr [0x0048dfb0]
MOV RDI,qword ptr [R15]
LEA RAX,[0xd121e8]
MOV RCX,qword ptr [RAX]
LEA RDX,[0x1e106b]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x0012a1e0
MOV RDI,qword ptr [R15]
MOV ESI,0x1
MOV RDX,RBX
MOV RCX,R14
CALL 0x0012a740
MOV RSI,qword ptr [R15]
MOV EDI,0xa
CALL 0x0012a6c0
MOV RDI,qword ptr [R15]
CALL 0x0012a3e0
ADD RSP,0xc8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void _ma_check_print_error
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 *param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
int *puVar1;
char in_AL;
int1 local_e8 [16];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int1 *local_30;
int1 *local_28;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
fflush(*(FILE **)PTR_stdout_0048dfa8);
if ((*(char *)((long)param_9 + 0x209a2) == '\0') && (*(int *)((long)param_9 + 0x2096c) == 0)) {
if ((*(byte *)((long)param_9 + 0xb12) & 0x40) != 0) {
__fprintf_chk(*(int8 *)PTR_stderr_0048dfb0,1,"%s: Aria file %s\n",my_progname_short,
*param_9);
}
*(byte *)(param_9 + 0x412d) = *(byte *)(param_9 + 0x412d) | 4;
}
*(int *)((long)param_9 + 0x2096c) = *(int *)((long)param_9 + 0x2096c) + 1;
puVar1 = PTR_stderr_0048dfb0;
local_28 = local_e8;
local_30 = &stack0x00000008;
local_38 = 0x3000000010;
__fprintf_chk(*(int8 *)PTR_stderr_0048dfb0,1,"%s: error: ",my_progname_short);
__vfprintf_chk(*(int8 *)puVar1,1,param_10,&local_38);
fputc(10,*(FILE **)puVar1);
fflush(*(FILE **)puVar1);
return;
}
|
|
18,515
|
decrement_share_in_trans
|
eloqsql/storage/maria/maria_def.h
|
static inline void decrement_share_in_trans(MARIA_SHARE *share)
{
/* Internal tables doesn't have transactions */
DBUG_ASSERT(!share->internal_table);
if (!--share->in_trans)
free_maria_share(share);
else
mysql_mutex_unlock(&share->intern_lock);
}
|
O0
|
c
|
decrement_share_in_trans:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x3822e
movq -0x8(%rbp), %rcx
movl 0x7ac(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x7ac(%rcx)
cmpl $0x0, %eax
jne 0x38251
movq -0x8(%rbp), %rdi
callq 0x48220
jmp 0x38261
movq -0x8(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
callq 0x378f0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
decrement_share_in_trans:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_3822E:
mov rcx, [rbp+var_8]
mov eax, [rcx+7ACh]
add eax, 0FFFFFFFFh
mov [rcx+7ACh], eax
cmp eax, 0
jnz short loc_38251
mov rdi, [rbp+var_8]
call free_maria_share
jmp short loc_38261
loc_38251:
mov rdi, [rbp+var_8]
add rdi, 8F0h
call inline_mysql_mutex_unlock_3
loc_38261:
add rsp, 10h
pop rbp
retn
|
long long decrement_share_in_trans(long long a1)
{
int v1; // eax
v1 = *(_DWORD *)(a1 + 1964) - 1;
*(_DWORD *)(a1 + 1964) = v1;
if ( v1 )
return inline_mysql_mutex_unlock_3(a1 + 2288);
else
return free_maria_share(a1);
}
|
decrement_share_in_trans:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0013822e
LAB_0013822e:
MOV RCX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RCX + 0x7ac]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x7ac],EAX
CMP EAX,0x0
JNZ 0x00138251
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00148220
JMP 0x00138261
LAB_00138251:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8f0
CALL 0x001378f0
LAB_00138261:
ADD RSP,0x10
POP RBP
RET
|
void decrement_share_in_trans(long param_1)
{
int iVar1;
iVar1 = *(int *)(param_1 + 0x7ac) + -1;
*(int *)(param_1 + 0x7ac) = iVar1;
if (iVar1 == 0) {
free_maria_share(param_1);
}
else {
inline_mysql_mutex_unlock(param_1 + 0x8f0);
}
return;
}
|
|
18,516
|
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::parser(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool)
|
hkr04[P]cpp-mcp/common/json.hpp
|
explicit parser(InputAdapterType&& adapter,
const parser_callback_t<BasicJsonType> cb = nullptr,
const bool allow_exceptions_ = true,
const bool skip_comments = false)
: callback(cb)
, m_lexer(std::move(adapter), skip_comments)
, allow_exceptions(allow_exceptions_)
{
// read first token
get_token();
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::parser(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movl %ecx, %r14d
movq %rsi, %r12
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x147ee
movl $0x0, 0x20(%rbx)
leaq 0x28(%rbx), %r15
movq %r15, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x14e28
movb %r14b, 0xc0(%rbx)
movq %r15, %rdi
callq 0x14ec8
movl %eax, 0x20(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r15, %rdi
callq 0x14e94
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x14e18
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
movq %r14, %rdi
callq 0x5740
movq %rax, %rdi
callq 0x786b
|
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_St8functionIFbiNS1_13parse_event_tERSF_EEbb:
push rbp
push r15
push r14
push r12
push rbx
mov ebp, r8d
mov r14d, ecx
mov r12, rsi
mov rbx, rdi
mov rsi, rdx
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&)
mov dword ptr [rbx+20h], 0
lea r15, [rbx+28h]
mov rdi, r15
mov rsi, r12
mov edx, ebp
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_b; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>&&,bool)
mov [rbx+0C0h], r14b
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE4scanEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan(void)
mov [rbx+20h], eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer()
mov rax, [rbx+10h]
test rax, rax
jz short loc_14E18
mov rdi, rbx
mov rsi, rbx
mov edx, 3
call rax
loc_14E18:
mov rdi, r14
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
|
long long nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parser(
long long a1,
long long a2,
long long a3,
char a4,
unsigned int a5)
{
long long result; // rax
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function(
(_OWORD *)a1,
a3);
*(_DWORD *)(a1 + 32) = 0;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::lexer(
a1 + 40,
a2,
a5);
*(_BYTE *)(a1 + 192) = a4;
result = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan(a1 + 40);
*(_DWORD *)(a1 + 32) = result;
return result;
}
|
parser:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBP,R8D
MOV R14D,ECX
MOV R12,RSI
MOV RBX,RDI
MOV RSI,RDX
CALL 0x001147ee
MOV dword ptr [RBX + 0x20],0x0
LEA R15,[RBX + 0x28]
MOV RDI,R15
MOV RSI,R12
MOV EDX,EBP
CALL 0x00114e28
MOV byte ptr [RBX + 0xc0],R14B
LAB_00114de3:
MOV RDI,R15
CALL 0x00114ec8
MOV dword ptr [RBX + 0x20],EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >
>::parser(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >&&, std::function<bool (int,
nlohmann::json_abi_v3_11_3::detail::parse_event_t,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&)>, bool, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::parser(parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this,iterator_input_adapter *param_1,function *param_3,
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
param_4,bool param_5)
{
int4 uVar1;
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
*)this,param_3);
*(int4 *)(this + 0x20) = 0;
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::lexer((lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*)(this + 0x28),param_1,param_5);
this[0xc0] = param_4;
/* try { // try from 00114de3 to 00114dea has its CatchHandler @ 00114df7 */
uVar1 = lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan((lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*)(this + 0x28));
*(int4 *)(this + 0x20) = uVar1;
return;
}
|
|
18,517
|
mi_delete
|
eloqsql/storage/myisam/mi_delete.c
|
int mi_delete(MI_INFO *info,const uchar *record)
{
uint i;
uchar *old_key;
int save_errno;
char lastpos[8];
MYISAM_SHARE *share=info->s;
DBUG_ENTER("mi_delete");
/* Test if record is in datafile */
DBUG_EXECUTE_IF("myisam_pretend_crashed_table_on_usage",
mi_print_error(info->s, HA_ERR_CRASHED);
DBUG_RETURN(my_errno= HA_ERR_CRASHED););
DBUG_EXECUTE_IF("my_error_test_undefined_error",
mi_print_error(info->s, INT_MAX);
DBUG_RETURN(my_errno= INT_MAX););
if (!(info->update & HA_STATE_AKTIV))
{
DBUG_RETURN(my_errno=HA_ERR_KEY_NOT_FOUND); /* No database read */
}
if (share->options & HA_OPTION_READ_ONLY_DATA)
{
DBUG_RETURN(my_errno=EACCES);
}
if (_mi_readinfo(info,F_WRLCK,1))
DBUG_RETURN(my_errno);
if (info->s->calc_checksum)
info->checksum=(*info->s->calc_checksum)(info,record);
if ((*share->compare_record)(info,record))
goto err; /* Error on read-check */
if (_mi_mark_file_changed(info))
goto err;
/* Remove all keys from the .ISAM file */
old_key=info->lastkey2;
for (i=0 ; i < share->base.keys ; i++ )
{
if (mi_is_key_active(info->s->state.key_map, i))
{
info->s->keyinfo[i].version++;
if (info->s->keyinfo[i].flag & HA_FULLTEXT )
{
if (_mi_ft_del(info,i, old_key,record,info->lastpos))
goto err;
}
else
{
if (info->s->keyinfo[i].ck_delete(info,i,old_key,
_mi_make_key(info,i,old_key,record,info->lastpos)))
goto err;
}
/* The above changed info->lastkey2. Inform mi_rnext_same(). */
info->update&= ~HA_STATE_RNEXT_SAME;
}
}
if ((*share->delete_record)(info))
goto err; /* Remove record from database */
info->state->checksum-=info->checksum;
info->update= HA_STATE_CHANGED+HA_STATE_DELETED+HA_STATE_ROW_CHANGED;
info->state->records--;
mi_sizestore(lastpos,info->lastpos);
myisam_log_command(MI_LOG_DELETE,info,(uchar*) lastpos,sizeof(lastpos),0);
(void) _mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE);
if (info->invalidator != 0)
{
DBUG_PRINT("info", ("invalidator... '%s' (delete)", info->filename));
(*info->invalidator)(info->filename);
info->invalidator=0;
}
DBUG_RETURN(0);
err:
save_errno=my_errno;
mi_sizestore(lastpos,info->lastpos);
myisam_log_command(MI_LOG_DELETE,info,(uchar*) lastpos, sizeof(lastpos),0);
if (save_errno != HA_ERR_RECORD_CHANGED)
{
mi_print_error(info->s, HA_ERR_CRASHED);
mi_mark_crashed(info); /* mark table crashed */
}
(void) _mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE);
info->update|=HA_STATE_WRITTEN; /* Buffer changed */
my_errno=save_errno;
if (save_errno == HA_ERR_KEY_NOT_FOUND)
{
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
}
DBUG_RETURN(my_errno);
}
|
O3
|
c
|
mi_delete:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
testb $0x2, 0x1d0(%rdi)
jne 0x2e905
callq 0x5ed5e
movl $0x78, (%rax)
movl $0x78, %r14d
jmp 0x2eb19
movq %rdi, %rbx
movq (%rdi), %r13
testb $0x1, 0x31a(%r13)
jne 0x2eb08
movq %rsi, %r14
movq %rbx, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x359ff
testl %eax, %eax
jne 0x2eafe
movq (%rbx), %rax
movq 0x2c8(%rax), %rax
testq %rax, %rax
je 0x2e953
movq %rbx, %rdi
movq %r14, %rsi
callq *%rax
movl %eax, 0x1a8(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq *0x2c0(%r13)
testl %eax, %eax
jne 0x2ea48
movq %rbx, %rdi
callq 0x35bde
testl %eax, %eax
jne 0x2ea48
movl 0x180(%r13), %eax
testl %eax, %eax
je 0x2ea36
movq 0x110(%rbx), %rcx
movq %rcx, -0x40(%rbp)
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%rbx), %rcx
movq 0xc0(%rcx), %rdx
btq %r12, %rdx
jae 0x2ea24
movq 0x218(%rcx), %rax
incl 0x1c(%rax,%r15)
movq (%rbx), %rax
movq 0x218(%rax), %rax
testb $-0x80, 0xa(%rax,%r15)
jne 0x2e9f9
movq 0x68(%rax,%r15), %rax
movq %rax, -0x48(%rbp)
movq 0x170(%rbx), %r8
movq %rbx, %rdi
movl %r12d, %esi
movq -0x40(%rbp), %rdx
movq %r14, %rcx
callq 0x34160
movq %rbx, %rdi
movl %r12d, %esi
movq -0x40(%rbp), %rdx
movl %eax, %ecx
callq *-0x48(%rbp)
jmp 0x2ea12
movq 0x170(%rbx), %r8
movq %rbx, %rdi
movl %r12d, %esi
movq -0x40(%rbp), %rdx
movq %r14, %rcx
callq 0x4a674
testl %eax, %eax
jne 0x2ea48
andb $-0x11, 0x1d1(%rbx)
movl 0x180(%r13), %eax
incq %r12
movl %eax, %ecx
addq $0x70, %r15
cmpq %rcx, %r12
jb 0x2e998
movq %rbx, %rdi
callq *0x2b0(%r13)
testl %eax, %eax
je 0x2eb3e
callq 0x5ed5e
movl (%rax), %r14d
movq 0x170(%rbx), %rax
bswapq %rax
movq %rax, -0x38(%rbp)
leaq 0x305fdb(%rip), %rax # 0x334a40
cmpl $0x0, (%rax)
js 0x2ea83
leaq -0x38(%rbp), %rdx
movl $0x3, %edi
movq %rbx, %rsi
movl $0x8, %ecx
xorl %r8d, %r8d
callq 0x36142
cmpl $0x7b, %r14d
je 0x2eabd
movq (%rbx), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x3412a
movq (%rbx), %rax
orb $0x2, 0xf0(%rax)
leaq 0x66c83(%rip), %rdx # 0x95731
movq %rbx, %rdi
xorl %esi, %esi
movl $0x79, %ecx
callq 0x2bffb
movq %rbx, %rdi
movl $0x1, %esi
callq 0x35af2
orb $0x4, 0x1d0(%rbx)
callq 0x5ed5e
movl %r14d, (%rax)
cmpl $0x78, %r14d
jne 0x2eafe
movq (%rbx), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x3412a
callq 0x5ed5e
movl $0x7e, (%rax)
callq 0x5ed5e
movl (%rax), %r14d
jmp 0x2eb19
callq 0x5ed5e
movl $0xd, (%rax)
movl $0xd, %r14d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x2ebc8
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x1a8(%rbx), %eax
movq 0x8(%rbx), %rcx
subl %eax, 0x30(%rcx)
movl $0x409, 0x1d0(%rbx) # imm = 0x409
movq 0x8(%rbx), %rax
decq (%rax)
movq 0x170(%rbx), %rax
bswapq %rax
movq %rax, -0x38(%rbp)
leaq 0x305ecf(%rip), %rax # 0x334a40
cmpl $0x0, (%rax)
js 0x2eb8f
leaq -0x38(%rbp), %rdx
movl $0x3, %edi
movq %rbx, %rsi
movl $0x8, %ecx
xorl %r8d, %r8d
callq 0x36142
movq %rbx, %rdi
movl $0x1, %esi
callq 0x35af2
movq 0x148(%rbx), %rax
xorl %r14d, %r14d
testq %rax, %rax
je 0x2eb19
movq 0xf8(%rbx), %rdi
callq *%rax
movq $0x0, 0x148(%rbx)
jmp 0x2eb19
callq 0x28430
|
mi_delete:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rax, fs:28h
mov [rbp+var_30], rax
test byte ptr [rdi+1D0h], 2
jnz short loc_2E905
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
mov r14d, 78h ; 'x'
jmp loc_2EB19
loc_2E905:
mov rbx, rdi
mov r13, [rdi]
test byte ptr [r13+31Ah], 1
jnz loc_2EB08
mov r14, rsi
mov rdi, rbx
mov esi, 1
mov edx, 1
call _mi_readinfo
test eax, eax
jnz loc_2EAFE
mov rax, [rbx]
mov rax, [rax+2C8h]
test rax, rax
jz short loc_2E953
mov rdi, rbx
mov rsi, r14
call rax
mov [rbx+1A8h], eax
loc_2E953:
mov rdi, rbx
mov rsi, r14
call qword ptr [r13+2C0h]
test eax, eax
jnz loc_2EA48
mov rdi, rbx
call _mi_mark_file_changed
test eax, eax
jnz loc_2EA48
mov eax, [r13+180h]
test eax, eax
jz loc_2EA36
mov rcx, [rbx+110h]
mov [rbp+var_40], rcx
xor r15d, r15d
xor r12d, r12d
loc_2E998:
mov rcx, [rbx]
mov rdx, [rcx+0C0h]
bt rdx, r12
jnb short loc_2EA24
mov rax, [rcx+218h]
inc dword ptr [rax+r15+1Ch]
mov rax, [rbx]
mov rax, [rax+218h]
test byte ptr [rax+r15+0Ah], 80h
jnz short loc_2E9F9
mov rax, [rax+r15+68h]
mov [rbp+var_48], rax
mov r8, [rbx+170h]
mov rdi, rbx
mov esi, r12d
mov rdx, [rbp+var_40]
mov rcx, r14
call _mi_make_key
mov rdi, rbx
mov esi, r12d
mov rdx, [rbp+var_40]
mov ecx, eax
call [rbp+var_48]
jmp short loc_2EA12
loc_2E9F9:
mov r8, [rbx+170h]
mov rdi, rbx
mov esi, r12d
mov rdx, [rbp+var_40]
mov rcx, r14
call _mi_ft_del
loc_2EA12:
test eax, eax
jnz short loc_2EA48
and byte ptr [rbx+1D1h], 0EFh
mov eax, [r13+180h]
loc_2EA24:
inc r12
mov ecx, eax
add r15, 70h ; 'p'
cmp r12, rcx
jb loc_2E998
loc_2EA36:
mov rdi, rbx
call qword ptr [r13+2B0h]
test eax, eax
jz loc_2EB3E
loc_2EA48:
call _my_thread_var
mov r14d, [rax]
mov rax, [rbx+170h]
bswap rax
mov [rbp+var_38], rax
lea rax, myisam_log_file
cmp dword ptr [rax], 0
js short loc_2EA83
lea rdx, [rbp+var_38]
mov edi, 3
mov rsi, rbx
mov ecx, 8
xor r8d, r8d
call _myisam_log_command
loc_2EA83:
cmp r14d, 7Bh ; '{'
jz short loc_2EABD
mov rax, [rbx]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
mov rax, [rbx]
or byte ptr [rax+0F0h], 2
lea rdx, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
xor esi, esi
mov ecx, 79h ; 'y'
call _mi_report_crashed
loc_2EABD:
mov rdi, rbx
mov esi, 1
call _mi_writeinfo
or byte ptr [rbx+1D0h], 4
call _my_thread_var
mov [rax], r14d
cmp r14d, 78h ; 'x'
jnz short loc_2EAFE
mov rax, [rbx]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
loc_2EAFE:
call _my_thread_var
mov r14d, [rax]
jmp short loc_2EB19
loc_2EB08:
call _my_thread_var
mov dword ptr [rax], 0Dh
mov r14d, 0Dh
loc_2EB19:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_2EBC8
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2EB3E:
mov eax, [rbx+1A8h]
mov rcx, [rbx+8]
sub [rcx+30h], eax
mov dword ptr [rbx+1D0h], 409h
mov rax, [rbx+8]
dec qword ptr [rax]
mov rax, [rbx+170h]
bswap rax
mov [rbp+var_38], rax
lea rax, myisam_log_file
cmp dword ptr [rax], 0
js short loc_2EB8F
lea rdx, [rbp+var_38]
mov edi, 3
mov rsi, rbx
mov ecx, 8
xor r8d, r8d
call _myisam_log_command
loc_2EB8F:
mov rdi, rbx
mov esi, 1
call _mi_writeinfo
mov rax, [rbx+148h]
xor r14d, r14d
test rax, rax
jz loc_2EB19
mov rdi, [rbx+0F8h]
call rax
mov qword ptr [rbx+148h], 0
jmp loc_2EB19
loc_2EBC8:
call ___stack_chk_fail
|
long long mi_delete(_BYTE *a1, const char *a2)
{
unsigned int v2; // r14d
_BYTE *v3; // rbx
long long v4; // r13
const char *v6; // rsi
long long ( *v7)(_BYTE *, const char *); // rax
const char *v8; // rsi
unsigned int v9; // eax
long long v10; // r15
unsigned long long i; // r12
long long v12; // rdx
long long v13; // rax
unsigned int key; // eax
int v15; // eax
int v16; // r14d
void ( *v18)(_QWORD); // rax
long long ( *v19)(_BYTE *, _QWORD, long long, _QWORD); // [rsp+8h] [rbp-48h]
long long v20; // [rsp+10h] [rbp-40h]
_QWORD v21[7]; // [rsp+18h] [rbp-38h] BYREF
v21[1] = __readfsqword(0x28u);
if ( (a1[464] & 2) == 0 )
{
*(_DWORD *)my_thread_var(a1, a2) = 120;
return 120;
}
v3 = a1;
v4 = *(_QWORD *)a1;
if ( (*(_BYTE *)(*(_QWORD *)a1 + 794LL) & 1) != 0 )
{
*(_DWORD *)my_thread_var(a1, a2) = 13;
return 13;
}
v6 = (_BYTE *)(&dword_0 + 1);
if ( (unsigned int)mi_readinfo(a1, 1LL, 1LL) )
return *(unsigned int *)my_thread_var(a1, v6);
v7 = *(long long ( **)(_BYTE *, const char *))(*(_QWORD *)a1 + 712LL);
if ( v7 )
*((_DWORD *)a1 + 106) = v7(a1, a2);
v8 = a2;
if ( (*(unsigned int ( **)(_BYTE *, const char *))(v4 + 704))(a1, a2)
|| (unsigned int)mi_mark_file_changed(a1) )
{
goto LABEL_19;
}
v9 = *(_DWORD *)(v4 + 384);
if ( v9 )
{
v20 = *((_QWORD *)a1 + 34);
v10 = 0LL;
for ( i = 0LL; i < v9; ++i )
{
v12 = *(_QWORD *)(*(_QWORD *)v3 + 192LL);
if ( _bittest64(&v12, i) )
{
++*(_DWORD *)(*(_QWORD *)(*(_QWORD *)v3 + 536LL) + v10 + 28);
v13 = *(_QWORD *)(*(_QWORD *)v3 + 536LL);
if ( *(char *)(v13 + v10 + 10) < 0 )
{
a1 = v3;
v8 = (const char *)(unsigned int)i;
v15 = mi_ft_del(v3, (unsigned int)i, v20, a2, *((_QWORD *)v3 + 46));
}
else
{
v19 = *(long long ( **)(_BYTE *, _QWORD, long long, _QWORD))(v13 + v10 + 104);
key = mi_make_key(v3, (unsigned int)i, v20, a2, *((_QWORD *)v3 + 46));
a1 = v3;
v8 = (const char *)(unsigned int)i;
v15 = v19(v3, (unsigned int)i, v20, key);
}
if ( v15 )
goto LABEL_19;
v3[465] &= ~0x10u;
v9 = *(_DWORD *)(v4 + 384);
}
v10 += 112LL;
}
}
a1 = v3;
if ( (*(unsigned int ( **)(_BYTE *))(v4 + 688))(v3) )
{
LABEL_19:
v16 = *(_DWORD *)my_thread_var(a1, v8);
v21[0] = _byteswap_uint64(*((_QWORD *)v3 + 46));
if ( myisam_log_file >= 0 )
myisam_log_command(3LL, v3, v21, 8LL, 0LL);
if ( v16 != 123 )
{
mi_report_error(126LL, *(_QWORD *)(*(_QWORD *)v3 + 616LL));
*(_BYTE *)(*(_QWORD *)v3 + 240LL) |= 2u;
mi_report_crashed();
}
a1 = v3;
v6 = (_BYTE *)(&dword_0 + 1);
mi_writeinfo(v3, 1LL);
v3[464] |= 4u;
*(_DWORD *)my_thread_var(v3, (_BYTE *)&dword_0 + 1) = v16;
if ( v16 == 120 )
{
v6 = *(const char **)(*(_QWORD *)v3 + 616LL);
a1 = (_BYTE *)(&dword_7C + 2);
mi_report_error(126LL, v6);
*(_DWORD *)my_thread_var(126LL, v6) = 126;
}
return *(unsigned int *)my_thread_var(a1, v6);
}
*(_DWORD *)(*((_QWORD *)v3 + 1) + 48LL) -= *((_DWORD *)v3 + 106);
*((_DWORD *)v3 + 116) = 1033;
--**((_QWORD **)v3 + 1);
v21[0] = _byteswap_uint64(*((_QWORD *)v3 + 46));
if ( myisam_log_file >= 0 )
myisam_log_command(3LL, v3, v21, 8LL, 0LL);
mi_writeinfo(v3, 1LL);
v18 = (void ( *)(_QWORD))*((_QWORD *)v3 + 41);
v2 = 0;
if ( v18 )
{
v18(*((_QWORD *)v3 + 31));
*((_QWORD *)v3 + 41) = 0LL;
}
return v2;
}
|
mi_delete:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
TEST byte ptr [RDI + 0x1d0],0x2
JNZ 0x0012e905
CALL 0x0015ed5e
MOV dword ptr [RAX],0x78
MOV R14D,0x78
JMP 0x0012eb19
LAB_0012e905:
MOV RBX,RDI
MOV R13,qword ptr [RDI]
TEST byte ptr [R13 + 0x31a],0x1
JNZ 0x0012eb08
MOV R14,RSI
MOV RDI,RBX
MOV ESI,0x1
MOV EDX,0x1
CALL 0x001359ff
TEST EAX,EAX
JNZ 0x0012eafe
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x2c8]
TEST RAX,RAX
JZ 0x0012e953
MOV RDI,RBX
MOV RSI,R14
CALL RAX
MOV dword ptr [RBX + 0x1a8],EAX
LAB_0012e953:
MOV RDI,RBX
MOV RSI,R14
CALL qword ptr [R13 + 0x2c0]
TEST EAX,EAX
JNZ 0x0012ea48
MOV RDI,RBX
CALL 0x00135bde
TEST EAX,EAX
JNZ 0x0012ea48
MOV EAX,dword ptr [R13 + 0x180]
TEST EAX,EAX
JZ 0x0012ea36
MOV RCX,qword ptr [RBX + 0x110]
MOV qword ptr [RBP + -0x40],RCX
XOR R15D,R15D
XOR R12D,R12D
LAB_0012e998:
MOV RCX,qword ptr [RBX]
MOV RDX,qword ptr [RCX + 0xc0]
BT RDX,R12
JNC 0x0012ea24
MOV RAX,qword ptr [RCX + 0x218]
INC dword ptr [RAX + R15*0x1 + 0x1c]
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x218]
TEST byte ptr [RAX + R15*0x1 + 0xa],0x80
JNZ 0x0012e9f9
MOV RAX,qword ptr [RAX + R15*0x1 + 0x68]
MOV qword ptr [RBP + -0x48],RAX
MOV R8,qword ptr [RBX + 0x170]
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,qword ptr [RBP + -0x40]
MOV RCX,R14
CALL 0x00134160
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,qword ptr [RBP + -0x40]
MOV ECX,EAX
CALL qword ptr [RBP + -0x48]
JMP 0x0012ea12
LAB_0012e9f9:
MOV R8,qword ptr [RBX + 0x170]
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,qword ptr [RBP + -0x40]
MOV RCX,R14
CALL 0x0014a674
LAB_0012ea12:
TEST EAX,EAX
JNZ 0x0012ea48
AND byte ptr [RBX + 0x1d1],0xef
MOV EAX,dword ptr [R13 + 0x180]
LAB_0012ea24:
INC R12
MOV ECX,EAX
ADD R15,0x70
CMP R12,RCX
JC 0x0012e998
LAB_0012ea36:
MOV RDI,RBX
CALL qword ptr [R13 + 0x2b0]
TEST EAX,EAX
JZ 0x0012eb3e
LAB_0012ea48:
CALL 0x0015ed5e
MOV R14D,dword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x170]
BSWAP RAX
MOV qword ptr [RBP + -0x38],RAX
LEA RAX,[0x434a40]
CMP dword ptr [RAX],0x0
JS 0x0012ea83
LEA RDX,[RBP + -0x38]
MOV EDI,0x3
MOV RSI,RBX
MOV ECX,0x8
XOR R8D,R8D
CALL 0x00136142
LAB_0012ea83:
CMP R14D,0x7b
JZ 0x0012eabd
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x0013412a
MOV RAX,qword ptr [RBX]
OR byte ptr [RAX + 0xf0],0x2
LEA RDX,[0x195731]
MOV RDI,RBX
XOR ESI,ESI
MOV ECX,0x79
CALL 0x0012bffb
LAB_0012eabd:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00135af2
OR byte ptr [RBX + 0x1d0],0x4
CALL 0x0015ed5e
MOV dword ptr [RAX],R14D
CMP R14D,0x78
JNZ 0x0012eafe
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x0013412a
CALL 0x0015ed5e
MOV dword ptr [RAX],0x7e
LAB_0012eafe:
CALL 0x0015ed5e
MOV R14D,dword ptr [RAX]
JMP 0x0012eb19
LAB_0012eb08:
CALL 0x0015ed5e
MOV dword ptr [RAX],0xd
MOV R14D,0xd
LAB_0012eb19:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0012ebc8
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012eb3e:
MOV EAX,dword ptr [RBX + 0x1a8]
MOV RCX,qword ptr [RBX + 0x8]
SUB dword ptr [RCX + 0x30],EAX
MOV dword ptr [RBX + 0x1d0],0x409
MOV RAX,qword ptr [RBX + 0x8]
DEC qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x170]
BSWAP RAX
MOV qword ptr [RBP + -0x38],RAX
LEA RAX,[0x434a40]
CMP dword ptr [RAX],0x0
JS 0x0012eb8f
LEA RDX,[RBP + -0x38]
MOV EDI,0x3
MOV RSI,RBX
MOV ECX,0x8
XOR R8D,R8D
CALL 0x00136142
LAB_0012eb8f:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00135af2
MOV RAX,qword ptr [RBX + 0x148]
XOR R14D,R14D
TEST RAX,RAX
JZ 0x0012eb19
MOV RDI,qword ptr [RBX + 0xf8]
CALL RAX
MOV qword ptr [RBX + 0x148],0x0
JMP 0x0012eb19
LAB_0012ebc8:
CALL 0x00128430
|
int4 mi_delete(long *param_1,int8 param_2)
{
long lVar1;
long lVar2;
code *pcVar3;
int iVar4;
int4 uVar5;
uint uVar6;
int4 *puVar7;
int *piVar8;
ulong uVar9;
long lVar10;
long in_FS_OFFSET;
ulong local_40;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if ((*(byte *)(param_1 + 0x3a) & 2) == 0) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x78;
uVar5 = 0x78;
}
else {
lVar1 = *param_1;
if ((*(byte *)(lVar1 + 0x31a) & 1) == 0) {
iVar4 = _mi_readinfo(param_1,1,1);
if (iVar4 == 0) {
if (*(code **)(*param_1 + 0x2c8) != (code *)0x0) {
uVar5 = (**(code **)(*param_1 + 0x2c8))(param_1,param_2);
*(int4 *)(param_1 + 0x35) = uVar5;
}
iVar4 = (**(code **)(lVar1 + 0x2c0))(param_1,param_2);
if (iVar4 == 0) {
iVar4 = _mi_mark_file_changed(param_1);
if (iVar4 == 0) {
uVar6 = *(uint *)(lVar1 + 0x180);
if (uVar6 != 0) {
lVar2 = param_1[0x22];
lVar10 = 0;
uVar9 = 0;
do {
if ((*(ulong *)(*param_1 + 0xc0) >> (uVar9 & 0x3f) & 1) != 0) {
piVar8 = (int *)(*(long *)(*param_1 + 0x218) + 0x1c + lVar10);
*piVar8 = *piVar8 + 1;
if ((*(byte *)(*(long *)(*param_1 + 0x218) + 10 + lVar10) & 0x80) == 0) {
pcVar3 = *(code **)(*(long *)(*param_1 + 0x218) + 0x68 + lVar10);
uVar5 = _mi_make_key(param_1,uVar9 & 0xffffffff,lVar2,param_2,param_1[0x2e]);
iVar4 = (*pcVar3)(param_1,uVar9 & 0xffffffff,lVar2,uVar5);
}
else {
iVar4 = _mi_ft_del(param_1,uVar9 & 0xffffffff,lVar2,param_2,param_1[0x2e]);
}
if (iVar4 != 0) goto LAB_0012ea48;
*(byte *)((long)param_1 + 0x1d1) = *(byte *)((long)param_1 + 0x1d1) & 0xef;
uVar6 = *(uint *)(lVar1 + 0x180);
}
uVar9 = uVar9 + 1;
lVar10 = lVar10 + 0x70;
} while (uVar9 < uVar6);
}
iVar4 = (**(code **)(lVar1 + 0x2b0))(param_1);
if (iVar4 == 0) {
*(int *)(param_1[1] + 0x30) = *(int *)(param_1[1] + 0x30) - (int)param_1[0x35];
*(int4 *)(param_1 + 0x3a) = 0x409;
*(long *)param_1[1] = *(long *)param_1[1] + -1;
uVar9 = param_1[0x2e];
local_40 = uVar9 >> 0x38 | (uVar9 & 0xff000000000000) >> 0x28 |
(uVar9 & 0xff0000000000) >> 0x18 | (uVar9 & 0xff00000000) >> 8 |
(uVar9 & 0xff000000) << 8 | (uVar9 & 0xff0000) << 0x18 |
(uVar9 & 0xff00) << 0x28 | uVar9 << 0x38;
if (-1 < myisam_log_file) {
_myisam_log_command(3,param_1,&local_40,8,0);
}
_mi_writeinfo(param_1,1);
uVar5 = 0;
if ((code *)param_1[0x29] != (code *)0x0) {
(*(code *)param_1[0x29])(param_1[0x1f]);
param_1[0x29] = 0;
}
goto LAB_0012eb19;
}
}
}
LAB_0012ea48:
piVar8 = (int *)_my_thread_var();
iVar4 = *piVar8;
uVar9 = param_1[0x2e];
local_40 = uVar9 >> 0x38 | (uVar9 & 0xff000000000000) >> 0x28 |
(uVar9 & 0xff0000000000) >> 0x18 | (uVar9 & 0xff00000000) >> 8 |
(uVar9 & 0xff000000) << 8 | (uVar9 & 0xff0000) << 0x18 | (uVar9 & 0xff00) << 0x28
| uVar9 << 0x38;
if (-1 < myisam_log_file) {
_myisam_log_command(3,param_1,&local_40,8,0);
}
if (iVar4 != 0x7b) {
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
*(byte *)(*param_1 + 0xf0) = *(byte *)(*param_1 + 0xf0) | 2;
_mi_report_crashed(param_1,0,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_delete.c",
0x79);
}
_mi_writeinfo(param_1,1);
*(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 4;
piVar8 = (int *)_my_thread_var();
*piVar8 = iVar4;
if (iVar4 == 0x78) {
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x7e;
}
}
puVar7 = (int4 *)_my_thread_var();
uVar5 = *puVar7;
}
else {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0xd;
uVar5 = 0xd;
}
}
LAB_0012eb19:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar5;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
18,518
|
LexGetIndexConstant
|
qoraal-tictactoe/build_O0/_deps/qoraal_engine-src/src/tool/lex.c
|
enum LexToken LexGetIndexConstant(struct LexState *Lexer, struct Value *Value)
{
const char *StartPos ;
const char *EndPos;
enum LexToken tok = TokenIndexConstant ;
StartPos = Lexer->Pos;
while (Lexer->Pos != Lexer->End && (*Lexer->Pos != ']'))
{
/* find the end */
LEXER_INC(Lexer);
}
EndPos = Lexer->Pos;
if (Lexer->cb->GetIndex &&
!Lexer->cb->GetIndex (Lexer, tok, StartPos, EndPos - StartPos, Value) ) {
if (Lexer->cb->Error) Lexer->cb->Error(Lexer, ErrorSyntax, "identifier or index expected");
return TokenError ;
}
if (*Lexer->Pos == ']')
LEXER_INC(Lexer);
return tok ;
}
|
O0
|
c
|
LexGetIndexConstant:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x36, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, -0x2d(%rbp)
je 0xa35b
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x5d, %eax
setne %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0xa364
jmp 0xa381
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
jmp 0xa332
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0xa3fe
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %r8
subq %r8, %rcx
movq -0x18(%rbp), %r8
callq *%rax
cmpl $0x0, %eax
jne 0xa3fe
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0xa3f5
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
leaq 0x28d56(%rip), %rdx # 0x33149
callq *%rax
movl $0x3a, -0x4(%rbp)
jmp 0xa42e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x5d, %eax
jne 0xa428
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
LexGetIndexConstant:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_2C], 36h ; '6'
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
loc_A332:
mov rax, [rbp+var_10]
mov rcx, [rax]
mov rdx, [rbp+var_10]
xor eax, eax
cmp rcx, [rdx+8]
mov [rbp+var_2D], al
jz short loc_A35B
mov rax, [rbp+var_10]
mov rax, [rax]
movsx eax, byte ptr [rax]
cmp eax, 5Dh ; ']'
setnz al
mov [rbp+var_2D], al
loc_A35B:
mov al, [rbp+var_2D]
test al, 1
jnz short loc_A364
jmp short loc_A381
loc_A364:
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_10]
mov ecx, [rax+14h]
add ecx, 1
mov [rax+14h], ecx
jmp short loc_A332
loc_A381:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax+18h]
cmp qword ptr [rax+18h], 0
jz short loc_A3FE
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov rax, [rax+18h]
mov rdi, [rbp+var_10]
mov esi, [rbp+var_2C]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_20]
sub rcx, r8
mov r8, [rbp+var_18]
call rax
cmp eax, 0
jnz short loc_A3FE
mov rax, [rbp+var_10]
mov rax, [rax+18h]
cmp qword ptr [rax+28h], 0
jz short loc_A3F5
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov rax, [rax+28h]
mov rdi, [rbp+var_10]
mov esi, 0FFFFFFFFh
lea rdx, aIdentifierOrIn; "identifier or index expected"
call rax
loc_A3F5:
mov [rbp+var_4], 3Ah ; ':'
jmp short loc_A42E
loc_A3FE:
mov rax, [rbp+var_10]
mov rax, [rax]
movsx eax, byte ptr [rax]
cmp eax, 5Dh ; ']'
jnz short loc_A428
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_10]
mov ecx, [rax+14h]
add ecx, 1
mov [rax+14h], ecx
loc_A428:
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
loc_A42E:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long LexGetIndexConstant(long long a1, long long a2)
{
bool v3; // [rsp+3h] [rbp-2Dh]
_BYTE *v4; // [rsp+10h] [rbp-20h]
v4 = *(_BYTE **)a1;
while ( 1 )
{
v3 = 0;
if ( *(_QWORD *)a1 != *(_QWORD *)(a1 + 8) )
v3 = **(_BYTE **)a1 != 93;
if ( !v3 )
break;
++*(_QWORD *)a1;
++*(_DWORD *)(a1 + 20);
}
if ( !*(_QWORD *)(*(_QWORD *)(a1 + 24) + 24LL)
|| (*(unsigned int ( **)(long long, long long, _BYTE *, _QWORD, long long))(*(_QWORD *)(a1 + 24) + 24LL))(
a1,
54LL,
v4,
*(_QWORD *)a1 - (_QWORD)v4,
a2) )
{
if ( **(_BYTE **)a1 == 93 )
{
++*(_QWORD *)a1;
++*(_DWORD *)(a1 + 20);
}
return 54;
}
else
{
if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 40LL) )
(*(void ( **)(long long, long long, char *))(*(_QWORD *)(a1 + 24) + 40LL))(
a1,
0xFFFFFFFFLL,
aIdentifierOrIn);
return 58;
}
}
|
LexGetIndexConstant:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x2c],0x36
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
LAB_0010a332:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x8]
MOV byte ptr [RBP + -0x2d],AL
JZ 0x0010a35b
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5d
SETNZ AL
MOV byte ptr [RBP + -0x2d],AL
LAB_0010a35b:
MOV AL,byte ptr [RBP + -0x2d]
TEST AL,0x1
JNZ 0x0010a364
JMP 0x0010a381
LAB_0010a364:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x14]
ADD ECX,0x1
MOV dword ptr [RAX + 0x14],ECX
JMP 0x0010a332
LAB_0010a381:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0010a3fe
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x2c]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x20]
SUB RCX,R8
MOV R8,qword ptr [RBP + -0x18]
CALL RAX
CMP EAX,0x0
JNZ 0x0010a3fe
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x0010a3f5
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0xffffffff
LEA RDX,[0x133149]
CALL RAX
LAB_0010a3f5:
MOV dword ptr [RBP + -0x4],0x3a
JMP 0x0010a42e
LAB_0010a3fe:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5d
JNZ 0x0010a428
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x14]
ADD ECX,0x1
MOV dword ptr [RAX + 0x14],ECX
LAB_0010a428:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
LAB_0010a42e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 LexGetIndexConstant(long *param_1,int8 param_2)
{
long lVar1;
int iVar2;
bool bVar3;
lVar1 = *param_1;
while( true ) {
bVar3 = false;
if (*param_1 != param_1[1]) {
bVar3 = *(char *)*param_1 != ']';
}
if (!bVar3) break;
*param_1 = *param_1 + 1;
*(int *)((long)param_1 + 0x14) = *(int *)((long)param_1 + 0x14) + 1;
}
if ((*(long *)(param_1[3] + 0x18) != 0) &&
(iVar2 = (**(code **)(param_1[3] + 0x18))(param_1,0x36,lVar1,*param_1 - lVar1,param_2),
iVar2 == 0)) {
if (*(long *)(param_1[3] + 0x28) != 0) {
(**(code **)(param_1[3] + 0x28))(param_1,0xffffffff,s_identifier_or_index_expected_00133149);
}
return 0x3a;
}
if (*(char *)*param_1 == ']') {
*param_1 = *param_1 + 1;
*(int *)((long)param_1 + 0x14) = *(int *)((long)param_1 + 0x14) + 1;
}
return 0x36;
}
|
|
18,519
|
my_mb_wc_utf8mb4_quick
|
eloqsql/strings/ctype-utf8.h
|
static inline int
my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0x80)
{
*pwc= c;
return 1;
}
else if (c < 0xc2)
return MY_CS_ILSEQ;
else if (c < 0xe0)
{
if (s + 2 > e) /* We need 2 characters */
return MY_CS_TOOSMALL2;
if (!(IS_CONTINUATION_BYTE(s[1])))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
else if (c < 0xf0)
{
if (s + 3 > e) /* We need 3 characters */
return MY_CS_TOOSMALL3;
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (s + 4 > e) /* We need 4 characters */
return MY_CS_TOOSMALL4;
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
}
|
O0
|
c
|
my_mb_wc_utf8mb4_quick:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x575c6
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x57843
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x80, %eax
jge 0x575f3
movzbl -0x21(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x57843
movzbl -0x21(%rbp), %eax
cmpl $0xc2, %eax
jge 0x5760a
movl $0x0, -0x4(%rbp)
jmp 0x57843
movzbl -0x21(%rbp), %eax
cmpl $0xe0, %eax
jge 0x57680
movq -0x18(%rbp), %rax
addq $0x2, %rax
cmpq -0x20(%rbp), %rax
jbe 0x5762f
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x57843
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0x5764d
movl $0x0, -0x4(%rbp)
jmp 0x57843
movzbl -0x21(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rcx
shlq $0x6, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x57843
movzbl -0x21(%rbp), %eax
cmpl $0xf0, %eax
jge 0x5773c
movq -0x18(%rbp), %rax
addq $0x3, %rax
cmpq -0x20(%rbp), %rax
jbe 0x576a9
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x57843
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x576e7
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x576e7
movzbl -0x21(%rbp), %eax
cmpl $0xe1, %eax
jge 0x576f3
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0x576f3
movl $0x0, -0x4(%rbp)
jmp 0x57843
movzbl -0x21(%rbp), %eax
andl $0xf, %eax
movslq %eax, %rcx
shlq $0xc, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x57843
movzbl -0x21(%rbp), %eax
cmpl $0xf5, %eax
jge 0x57834
movq -0x18(%rbp), %rax
addq $0x4, %rax
cmpq -0x20(%rbp), %rax
jbe 0x57765
movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98
jmp 0x57843
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x577cf
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x577cf
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x577cf
movzbl -0x21(%rbp), %eax
cmpl $0xf1, %eax
jge 0x577b5
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x90, %eax
jl 0x577cf
movzbl -0x21(%rbp), %eax
cmpl $0xf3, %eax
jle 0x577d8
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x8f, %eax
jle 0x577d8
movl $0x0, -0x4(%rbp)
jmp 0x57843
movzbl -0x21(%rbp), %eax
andl $0x7, %eax
movslq %eax, %rcx
shlq $0x12, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0xc, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x57843
jmp 0x57836
jmp 0x57838
jmp 0x5783a
jmp 0x5783c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
my_mb_wc_utf8mb4_quick:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jb short loc_575C6
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_57843
loc_575C6:
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_21], al
movzx eax, [rbp+var_21]
cmp eax, 80h
jge short loc_575F3
movzx eax, [rbp+var_21]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_57843
loc_575F3:
movzx eax, [rbp+var_21]
cmp eax, 0C2h
jge short loc_5760A
mov [rbp+var_4], 0
jmp loc_57843
loc_5760A:
movzx eax, [rbp+var_21]
cmp eax, 0E0h
jge short loc_57680
mov rax, [rbp+var_18]
add rax, 2
cmp rax, [rbp+var_20]
jbe short loc_5762F
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_57843
loc_5762F:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_5764D
mov [rbp+var_4], 0
jmp loc_57843
loc_5764D:
movzx eax, [rbp+var_21]
and eax, 1Fh
movsxd rcx, eax
shl rcx, 6
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_57843
loc_57680:
movzx eax, [rbp+var_21]
cmp eax, 0F0h
jge loc_5773C
mov rax, [rbp+var_18]
add rax, 3
cmp rax, [rbp+var_20]
jbe short loc_576A9
mov [rbp+var_4], 0FFFFFF99h
jmp loc_57843
loc_576A9:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_576E7
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_576E7
movzx eax, [rbp+var_21]
cmp eax, 0E1h
jge short loc_576F3
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_576F3
loc_576E7:
mov [rbp+var_4], 0
jmp loc_57843
loc_576F3:
movzx eax, [rbp+var_21]
and eax, 0Fh
movsxd rcx, eax
shl rcx, 0Ch
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 3
jmp loc_57843
loc_5773C:
movzx eax, [rbp+var_21]
cmp eax, 0F5h
jge loc_57834
mov rax, [rbp+var_18]
add rax, 4
cmp rax, [rbp+var_20]
jbe short loc_57765
mov [rbp+var_4], 0FFFFFF98h
jmp loc_57843
loc_57765:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_577CF
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_577CF
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_577CF
movzx eax, [rbp+var_21]
cmp eax, 0F1h
jge short loc_577B5
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 90h
jl short loc_577CF
loc_577B5:
movzx eax, [rbp+var_21]
cmp eax, 0F3h
jle short loc_577D8
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 8Fh
jle short loc_577D8
loc_577CF:
mov [rbp+var_4], 0
jmp short loc_57843
loc_577D8:
movzx eax, [rbp+var_21]
and eax, 7
movsxd rcx, eax
shl rcx, 12h
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 0Ch
or rcx, rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 4
jmp short loc_57843
loc_57834:
jmp short $+2
loc_57836:
jmp short $+2
loc_57838:
jmp short $+2
loc_5783A:
jmp short $+2
loc_5783C:
mov [rbp+var_4], 0
loc_57843:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_mb_wc_utf8mb4_quick(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3)
{
unsigned __int8 v4; // [rsp+1h] [rbp-21h]
if ( (unsigned long long)a2 < a3 )
{
v4 = *a2;
if ( *a2 >= 0x80u )
{
if ( v4 >= 0xC2u )
{
if ( v4 >= 0xE0u )
{
if ( v4 >= 0xF0u )
{
if ( v4 >= 0xF5u )
{
return 0;
}
else if ( (unsigned long long)(a2 + 4) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64
&& (a2[2] ^ 0x80) < 64
&& (a2[3] ^ 0x80) < 64
&& (v4 >= 0xF1u || a2[1] >= 0x90u)
&& (v4 <= 0xF3u || a2[1] <= 0x8Fu) )
{
*a1 = a2[3] ^ 0x80u | ((long long)(a2[2] ^ 0x80u) << 6) | ((long long)(a2[1] ^ 0x80u) << 12) | ((unsigned long long)(v4 & 7) << 18);
return 4;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-104;
}
}
else if ( (unsigned long long)(a2 + 3) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a2[1] >= 0xA0u) )
{
*a1 = a2[2] ^ 0x80u | ((long long)(a2[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12);
return 3;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-103;
}
}
else if ( (unsigned long long)(a2 + 2) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64 )
{
*a1 = a2[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6);
return 2;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a1 = v4;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_mb_wc_utf8mb4_quick:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x001575c6
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00157843
LAB_001575c6:
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x80
JGE 0x001575f3
MOVZX EAX,byte ptr [RBP + -0x21]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00157843
LAB_001575f3:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xc2
JGE 0x0015760a
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00157843
LAB_0015760a:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe0
JGE 0x00157680
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x0015762f
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00157843
LAB_0015762f:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JL 0x0015764d
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00157843
LAB_0015764d:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x1f
MOVSXD RCX,EAX
SHL RCX,0x6
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00157843
LAB_00157680:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf0
JGE 0x0015773c
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x001576a9
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x00157843
LAB_001576a9:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001576e7
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001576e7
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe1
JGE 0x001576f3
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa0
JGE 0x001576f3
LAB_001576e7:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00157843
LAB_001576f3:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0xf
MOVSXD RCX,EAX
SHL RCX,0xc
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x3
JMP 0x00157843
LAB_0015773c:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf5
JGE 0x00157834
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x00157765
MOV dword ptr [RBP + -0x4],0xffffff98
JMP 0x00157843
LAB_00157765:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001577cf
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001577cf
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001577cf
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf1
JGE 0x001577b5
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x90
JL 0x001577cf
LAB_001577b5:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf3
JLE 0x001577d8
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x8f
JLE 0x001577d8
LAB_001577cf:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00157843
LAB_001577d8:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x7
MOVSXD RCX,EAX
SHL RCX,0x12
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0xc
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x4
JMP 0x00157843
LAB_00157834:
JMP 0x00157836
LAB_00157836:
JMP 0x00157838
LAB_00157838:
JMP 0x0015783a
LAB_0015783a:
JMP 0x0015783c
LAB_0015783c:
MOV dword ptr [RBP + -0x4],0x0
LAB_00157843:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3)
{
byte bVar1;
int4 local_c;
if (param_2 < param_3) {
bVar1 = *param_2;
if (bVar1 < 0x80) {
*param_1 = (ulong)bVar1;
local_c = 1;
}
else if (bVar1 < 0xc2) {
local_c = 0;
}
else if (bVar1 < 0xe0) {
if (param_3 < param_2 + 2) {
local_c = 0xffffff9a;
}
else if ((param_2[1] ^ 0x80) < 0x40) {
*param_1 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_2[1] ^ 0x80);
local_c = 2;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf0) {
if (param_3 < param_2 + 3) {
local_c = 0xffffff99;
}
else if ((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) &&
((0xe0 < bVar1 || (0x9f < param_2[1])))) {
*param_1 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_2[1] ^ 0x80) << 6 |
(long)(int)(param_2[2] ^ 0x80);
local_c = 3;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf5) {
if (param_3 < param_2 + 4) {
local_c = 0xffffff98;
}
else if ((((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) &&
((param_2[3] ^ 0x80) < 0x40)) && ((0xf0 < bVar1 || (0x8f < param_2[1])))) &&
((bVar1 < 0xf4 || (param_2[1] < 0x90)))) {
*param_1 = (long)(int)(bVar1 & 7) << 0x12 | (long)(int)(param_2[1] ^ 0x80) << 0xc |
(long)(int)(param_2[2] ^ 0x80) << 6 | (long)(int)(param_2[3] ^ 0x80);
local_c = 4;
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
18,520
|
thd_query_safe
|
eloqsql/sql/sql_class.cc
|
size_t thd_query_safe(MYSQL_THD thd, char *buf, size_t buflen)
{
size_t len= 0;
/* InnoDB invokes this function while holding internal mutexes.
THD::awake() will hold LOCK_thd_data while invoking an InnoDB
function that would acquire the internal mutex. Because this
function is a non-essential part of information_schema view output,
we will break the deadlock by avoiding a mutex wait here
and returning the empty string if a wait would be needed. */
if (!mysql_mutex_trylock(&thd->LOCK_thd_data))
{
len= MY_MIN(buflen - 1, thd->query_length());
if (len)
memcpy(buf, thd->query(), len);
mysql_mutex_unlock(&thd->LOCK_thd_data);
}
buf[len]= '\0';
return len;
}
|
O0
|
cpp
|
thd_query_safe:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1cf0, %rdi # imm = 0x1CF0
leaq 0x8393ce(%rip), %rsi # 0xd841ec
movl $0x14a0, %edx # imm = 0x14A0
callq 0x8091c0
cmpl $0x0, %eax
jne 0x54aeac
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4d2c30
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x54ae5d
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x54ae6c
movq -0x8(%rbp), %rdi
callq 0x4d2c30
movl %eax, %eax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x54ae9c
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4d2c10
movq -0x38(%rbp), %rdi
movq %rax, %rsi
movq -0x20(%rbp), %rdx
callq 0x4331a0
movq -0x8(%rbp), %rdi
addq $0x1cf0, %rdi # imm = 0x1CF0
callq 0x805c60
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
thd_query_safe:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], 0
mov rdi, [rbp+var_8]
add rdi, 1CF0h
lea rsi, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 14A0h
call _Z18coro_mutex_trylockP14st_mysql_mutexPKcj; coro_mutex_trylock(st_mysql_mutex *,char const*,uint)
cmp eax, 0
jnz short loc_54AEAC
mov rax, [rbp+var_18]
sub rax, 1
mov [rbp+var_28], rax
mov rdi, [rbp+var_8]; this
call _ZNK9Statement12query_lengthEv; Statement::query_length(void)
mov ecx, eax
mov rax, [rbp+var_28]
mov ecx, ecx
cmp rax, rcx
jnb short loc_54AE5D
mov rax, [rbp+var_18]
sub rax, 1
mov [rbp+var_30], rax
jmp short loc_54AE6C
loc_54AE5D:
mov rdi, [rbp+var_8]; this
call _ZNK9Statement12query_lengthEv; Statement::query_length(void)
mov eax, eax
mov [rbp+var_30], rax
loc_54AE6C:
mov rax, [rbp+var_30]
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jz short loc_54AE9C
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rdi, [rbp+var_8]; this
call _ZNK9Statement5queryEv; Statement::query(void)
mov rdi, [rbp+var_38]
mov rsi, rax
mov rdx, [rbp+var_20]
call _memcpy
loc_54AE9C:
mov rdi, [rbp+var_8]
add rdi, 1CF0h
call _Z17coro_mutex_unlockP14st_mysql_mutex; coro_mutex_unlock(st_mysql_mutex *)
loc_54AEAC:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_20]
mov byte ptr [rax+rcx], 0
mov rax, [rbp+var_20]
add rsp, 40h
pop rbp
retn
|
long long thd_query_safe(Statement *a1, long long a2, long long a3)
{
long long v3; // rax
long long length; // [rsp+10h] [rbp-30h]
long long v6; // [rsp+20h] [rbp-20h]
v6 = 0LL;
if ( !(unsigned int)coro_mutex_trylock(
(char *)a1 + 7408,
"/workspace/llm4binary/github2025/eloqsql/sql/sql_class.cc",
5280LL) )
{
if ( a3 - 1 >= (unsigned long long)(unsigned int)Statement::query_length(a1) )
length = (unsigned int)Statement::query_length(a1);
else
length = a3 - 1;
v6 = length;
if ( length )
{
v3 = Statement::query(a1);
memcpy(a2, v3, length);
}
coro_mutex_unlock((char *)a1 + 7408);
}
*(_BYTE *)(a2 + v6) = 0;
return v6;
}
|
__cxx_global_var_init.10:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x16d024c]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0058cc30
POP RBP
RET
|
void __cxx_global_var_init_10(void)
{
time_round_mode_t::time_round_mode_t((time_round_mode_t *)&TIME_FRAC_NONE,0);
return;
}
|
|
18,521
|
llava_image_embed_make_with_filename
|
monkey531[P]llama/examples/llava/llava.cpp
|
struct llava_image_embed * llava_image_embed_make_with_filename(struct clip_ctx * ctx_clip, int n_threads, const char * image_path) {
unsigned char* image_bytes;
long image_bytes_length;
auto loaded = load_file_to_bytes(image_path, &image_bytes, &image_bytes_length);
if (!loaded) {
LOG_ERR("%s: failed to load %s\n", __func__, image_path);
return NULL;
}
llava_image_embed *embed = llava_image_embed_make_with_bytes(ctx_clip, n_threads, image_bytes, image_bytes_length);
free(image_bytes);
return embed;
}
|
O0
|
cpp
|
llava_image_embed_make_with_filename:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq 0x7ff20
andb $0x1, %al
movb %al, 0x17(%rsp)
testb $0x1, 0x17(%rsp)
jne 0x7fed4
jmp 0x7fea5
movq 0x8c07c(%rip), %rax # 0x10bf28
movq (%rax), %rdi
movq 0x28(%rsp), %rcx
leaq 0x6b309(%rip), %rsi # 0xeb1c4
leaq 0x6b319(%rip), %rdx # 0xeb1db
movb $0x0, %al
callq 0x7aca0
movq $0x0, 0x40(%rsp)
jmp 0x7ff07
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rax
movl %eax, %ecx
callq 0x7d710
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x79400
movq 0x8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
|
llava_image_embed_make_with_filename:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_14], esi
mov [rsp+48h+var_20], rdx
mov rdi, [rsp+48h+var_20]; char *
lea rsi, [rsp+48h+var_28]; unsigned __int8 **
lea rdx, [rsp+48h+var_30]; __int64 *
call _ZL18load_file_to_bytesPKcPPhPl; load_file_to_bytes(char const*,uchar **,long *)
and al, 1
mov [rsp+48h+var_31], al
test [rsp+48h+var_31], 1
jnz short loc_7FED4
jmp short $+2
loc_7FEA5:
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rcx, [rsp+48h+var_20]
lea rsi, aSFailedToLoadS; "%s: failed to load %s\n"
lea rdx, aLlavaImageEmbe_5; "llava_image_embed_make_with_filename"
mov al, 0
call _fprintf
mov [rsp+48h+var_8], 0
jmp short loc_7FF07
loc_7FED4:
mov rdi, [rsp+48h+var_10]
mov esi, [rsp+48h+var_14]
mov rdx, [rsp+48h+var_28]
mov rax, [rsp+48h+var_30]
mov ecx, eax
call _llava_image_embed_make_with_bytes
mov [rsp+48h+var_40], rax
mov rdi, [rsp+48h+var_28]
call _free
mov rax, [rsp+48h+var_40]
mov [rsp+48h+var_8], rax
loc_7FF07:
mov rax, [rsp+48h+var_8]
add rsp, 48h
retn
|
long long llava_image_embed_make_with_filename(clip_ctx *a1, int a2, char *a3)
{
long long v4; // [rsp+8h] [rbp-40h]
long long v5; // [rsp+18h] [rbp-30h] BYREF
unsigned __int8 *v6; // [rsp+20h] [rbp-28h] BYREF
char *v7; // [rsp+28h] [rbp-20h]
int v8; // [rsp+34h] [rbp-14h]
clip_ctx *v9; // [rsp+38h] [rbp-10h]
v9 = a1;
v8 = a2;
v7 = a3;
if ( (load_file_to_bytes(a3, &v6, &v5) & 1) != 0 )
{
v4 = llava_image_embed_make_with_bytes(v9, v8, (long long)v6, v5);
free(v6);
return v4;
}
else
{
fprintf(stderr, "%s: failed to load %s\n", "llava_image_embed_make_with_filename", v7);
return 0LL;
}
}
|
llava_image_embed_make_with_filename:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV dword ptr [RSP + 0x34],ESI
MOV qword ptr [RSP + 0x28],RDX
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0x18]
CALL 0x0017ff20
AND AL,0x1
MOV byte ptr [RSP + 0x17],AL
TEST byte ptr [RSP + 0x17],0x1
JNZ 0x0017fed4
JMP 0x0017fea5
LAB_0017fea5:
MOV RAX,qword ptr [0x0020bf28]
MOV RDI,qword ptr [RAX]
MOV RCX,qword ptr [RSP + 0x28]
LEA RSI,[0x1eb1c4]
LEA RDX,[0x1eb1db]
MOV AL,0x0
CALL 0x0017aca0
MOV qword ptr [RSP + 0x40],0x0
JMP 0x0017ff07
LAB_0017fed4:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x34]
MOV RDX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,EAX
CALL 0x0017d710
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00179400
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x40],RAX
LAB_0017ff07:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int8 llava_image_embed_make_with_filename(int8 param_1,int4 param_2,char *param_3)
{
byte bVar1;
int8 uVar2;
ulong local_30;
uchar *local_28;
char *local_20;
int4 local_14;
int8 local_10;
int8 local_8;
local_20 = param_3;
local_14 = param_2;
local_10 = param_1;
bVar1 = load_file_to_bytes(param_3,&local_28,(long *)&local_30);
if ((bVar1 & 1) == 0) {
fprintf(*(FILE **)PTR_stderr_0020bf28,"%s: failed to load %s\n",
"llava_image_embed_make_with_filename",local_20);
local_8 = 0;
}
else {
uVar2 = llava_image_embed_make_with_bytes(local_10,local_14,local_28,local_30 & 0xffffffff);
free(local_28);
local_8 = uVar2;
}
return local_8;
}
|
|
18,522
|
mi_read_mempack_record
|
eloqsql/storage/myisam/mi_packrec.c
|
static int _mi_read_mempack_record(MI_INFO *info, my_off_t filepos, uchar *buf)
{
MI_BLOCK_INFO block_info;
MYISAM_SHARE *share=info->s;
uchar *pos;
DBUG_ENTER("mi_read_mempack_record");
if (filepos == HA_OFFSET_ERROR)
DBUG_RETURN(-1); /* _search() didn't find record */
if (!(pos= (uchar*) _mi_mempack_get_block_info(info, &info->bit_buff,
&block_info, &info->rec_buff,
(uchar*) share->file_map+
filepos)))
DBUG_RETURN(-1);
/* No need to end-zero pos here for valgrind as data is memory mapped */
DBUG_RETURN(_mi_pack_rec_unpack(info, &info->bit_buff, buf,
pos, block_info.rec_len));
}
|
O3
|
c
|
mi_read_mempack_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rsi
je 0x84eed
movq %rdx, %rbx
movq %rsi, %r8
movq %rdi, %r14
movq (%rdi), %rax
leaq 0x50(%rdi), %r15
leaq 0x120(%rdi), %rcx
addq 0x270(%rax), %r8
leaq -0x78(%rbp), %rdx
movq %r15, %rsi
callq 0x86916
testq %rax, %rax
je 0x84eed
movq -0x60(%rbp), %r8
movq %fs:0x28, %rcx
cmpq -0x20(%rbp), %rcx
jne 0x84f0c
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rax, %rcx
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x8496f
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x84f0c
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a270
|
_mi_read_mempack_record:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 68h
mov rax, fs:28h
mov [rbp+var_20], rax
cmp rsi, 0FFFFFFFFFFFFFFFFh
jz short loc_84EED
mov rbx, rdx
mov r8, rsi
mov r14, rdi
mov rax, [rdi]
lea r15, [rdi+50h]
lea rcx, [rdi+120h]
add r8, [rax+270h]
lea rdx, [rbp+var_78]
mov rsi, r15
call _mi_mempack_get_block_info
test rax, rax
jz short loc_84EED
mov r8, [rbp+var_60]
mov rcx, fs:28h
cmp rcx, [rbp+var_20]
jnz short loc_84F0C
mov rdi, r14
mov rsi, r15
mov rdx, rbx
mov rcx, rax
add rsp, 68h
pop rbx
pop r14
pop r15
pop rbp
jmp _mi_pack_rec_unpack
loc_84EED:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_84F0C
mov eax, 0FFFFFFFFh
add rsp, 68h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_84F0C:
call ___stack_chk_fail
|
long long mi_read_mempack_record(_QWORD *a1, long long a2, long long a3)
{
long long block_info; // rax
_BYTE v6[24]; // [rsp+8h] [rbp-78h] BYREF
long long v7; // [rsp+20h] [rbp-60h]
unsigned long long v8; // [rsp+60h] [rbp-20h]
v8 = __readfsqword(0x28u);
if ( a2 == -1 )
return 0xFFFFFFFFLL;
block_info = mi_mempack_get_block_info(a1, a1 + 10, v6, a1 + 36, *(_QWORD *)(*a1 + 624LL) + a2);
if ( !block_info )
return 0xFFFFFFFFLL;
else
return mi_pack_rec_unpack(a1, (long long)(a1 + 10), a3, block_info, v7);
}
|
_mi_read_mempack_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
CMP RSI,-0x1
JZ 0x00184eed
MOV RBX,RDX
MOV R8,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
LEA R15,[RDI + 0x50]
LEA RCX,[RDI + 0x120]
ADD R8,qword ptr [RAX + 0x270]
LEA RDX,[RBP + -0x78]
MOV RSI,R15
CALL 0x00186916
TEST RAX,RAX
JZ 0x00184eed
MOV R8,qword ptr [RBP + -0x60]
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x20]
JNZ 0x00184f0c
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
MOV RCX,RAX
ADD RSP,0x68
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0018496f
LAB_00184eed:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00184f0c
MOV EAX,0xffffffff
ADD RSP,0x68
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00184f0c:
CALL 0x0012a270
|
int8 _mi_read_mempack_record(long *param_1,long param_2,int8 param_3)
{
long lVar1;
int8 uVar2;
long in_FS_OFFSET;
int1 local_80 [24];
int8 local_68;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
if (param_2 != -1) {
lVar1 = _mi_mempack_get_block_info
(param_1,param_1 + 10,local_80,param_1 + 0x24,
param_2 + *(long *)(*param_1 + 0x270));
if (lVar1 != 0) {
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
uVar2 = _mi_pack_rec_unpack(param_1,param_1 + 10,param_3,lVar1,local_68);
return uVar2;
}
goto LAB_00184f0c;
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return 0xffffffff;
}
LAB_00184f0c:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
18,523
|
gguf_kv::get_ne() const
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
|
size_t get_ne() const {
if (type == GGUF_TYPE_STRING) {
const size_t ne = data_string.size();
GGML_ASSERT(is_array || ne == 1);
return ne;
}
const size_t type_size = gguf_type_size(type);
GGML_ASSERT(data.size() % type_size == 0);
const size_t ne = data.size() / type_size;
GGML_ASSERT(is_array || ne == 1);
return ne;
}
|
O0
|
cpp
|
gguf_kv::get_ne() const:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x8, 0x24(%rax)
jne 0x9107d
movq -0x30(%rbp), %rdi
addq $0x40, %rdi
callq 0x49490
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, -0x18(%rbp)
testb $0x1, 0x20(%rax)
jne 0x91070
cmpq $0x1, -0x18(%rbp)
je 0x91070
leaq 0x31573(%rip), %rdi # 0xc25c9
movl $0xab, %esi
leaq 0x205a7(%rip), %rdx # 0xb1609
leaq 0x31c10(%rip), %rcx # 0xc2c79
movb $0x0, %al
callq 0x48a00
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x9111f
movq -0x30(%rbp), %rax
movl 0x24(%rax), %edi
callq 0x494c0
movq -0x30(%rbp), %rdi
movq %rax, -0x20(%rbp)
addq $0x28, %rdi
callq 0x49650
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x20(%rbp)
cmpq $0x0, %rdx
je 0x910c9
leaq 0x3151a(%rip), %rdi # 0xc25c9
movl $0xaf, %esi
leaq 0x2054e(%rip), %rdx # 0xb1609
leaq 0x31a2f(%rip), %rcx # 0xc2af1
movb $0x0, %al
callq 0x48a00
movq -0x30(%rbp), %rdi
addq $0x28, %rdi
callq 0x49650
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x20(%rbp)
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, -0x28(%rbp)
testb $0x1, 0x20(%rax)
jne 0x91117
cmpq $0x1, -0x28(%rbp)
je 0x91117
leaq 0x314cc(%rip), %rdi # 0xc25c9
movl $0xb1, %esi
leaq 0x20500(%rip), %rdx # 0xb1609
leaq 0x31b69(%rip), %rcx # 0xc2c79
movb $0x0, %al
callq 0x48a00
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZNK7gguf_kv6get_neEv:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
cmp dword ptr [rax+24h], 8
jnz short loc_9107D
mov rdi, [rbp+var_30]
add rdi, 40h ; '@'
call __ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void)
mov rcx, rax
mov rax, [rbp+var_30]
mov [rbp+var_18], rcx
test byte ptr [rax+20h], 1
jnz short loc_91070
cmp [rbp+var_18], 1
jz short loc_91070
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0ABh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIsArrayNe1; "is_array || ne == 1"
mov al, 0
call _ggml_abort
loc_91070:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp loc_9111F
loc_9107D:
mov rax, [rbp+var_30]
mov edi, [rax+24h]
call __Z14gguf_type_size9gguf_type; gguf_type_size(gguf_type)
mov rdi, [rbp+var_30]
mov [rbp+var_20], rax
add rdi, 28h ; '('
call __ZNKSt6vectorIaSaIaEE4sizeEv; std::vector<signed char>::size(void)
xor ecx, ecx
mov edx, ecx
div [rbp+var_20]
cmp rdx, 0
jz short loc_910C9
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0AFh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCtxKvKeyIdData+10h; "data.size() % type_size == 0"
mov al, 0
call _ggml_abort
loc_910C9:
mov rdi, [rbp+var_30]
add rdi, 28h ; '('
call __ZNKSt6vectorIaSaIaEE4sizeEv; std::vector<signed char>::size(void)
xor ecx, ecx
mov edx, ecx
div [rbp+var_20]
mov rcx, rax
mov rax, [rbp+var_30]
mov [rbp+var_28], rcx
test byte ptr [rax+20h], 1
jnz short loc_91117
cmp [rbp+var_28], 1
jz short loc_91117
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0B1h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIsArrayNe1; "is_array || ne == 1"
mov al, 0
call _ggml_abort
loc_91117:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_9111F:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
unsigned long long gguf_kv::get_ne(gguf_kv *this)
{
long long v1; // rcx
unsigned long long v2; // rcx
unsigned long long v4; // [rsp+10h] [rbp-20h]
if ( *((_DWORD *)this + 9) == 8 )
{
v1 = std::vector<std::string>::size((char *)this + 64);
if ( (*((_BYTE *)this + 32) & 1) == 0 && v1 != 1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
171,
(long long)"GGML_ASSERT(%s) failed",
"is_array || ne == 1");
return v1;
}
else
{
v4 = gguf_type_size(*((_DWORD *)this + 9));
if ( std::vector<signed char>::size((char *)this + 40) % v4 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
175,
(long long)"GGML_ASSERT(%s) failed",
"data.size() % type_size == 0");
v2 = std::vector<signed char>::size((char *)this + 40) / v4;
if ( (*((_BYTE *)this + 32) & 1) == 0 && v2 != 1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
177,
(long long)"GGML_ASSERT(%s) failed",
"is_array || ne == 1");
return v2;
}
}
|
get_ne:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
CMP dword ptr [RAX + 0x24],0x8
JNZ 0x0019107d
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x40
CALL 0x00149490
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x18],RCX
TEST byte ptr [RAX + 0x20],0x1
JNZ 0x00191070
CMP qword ptr [RBP + -0x18],0x1
JZ 0x00191070
LEA RDI,[0x1c25c9]
MOV ESI,0xab
LEA RDX,[0x1b1609]
LEA RCX,[0x1c2c79]
MOV AL,0x0
CALL 0x00148a00
LAB_00191070:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0019111f
LAB_0019107d:
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX + 0x24]
CALL 0x001494c0
MOV RDI,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x20],RAX
ADD RDI,0x28
CALL 0x00149650
XOR ECX,ECX
MOV EDX,ECX
DIV qword ptr [RBP + -0x20]
CMP RDX,0x0
JZ 0x001910c9
LEA RDI,[0x1c25c9]
MOV ESI,0xaf
LEA RDX,[0x1b1609]
LEA RCX,[0x1c2af1]
MOV AL,0x0
CALL 0x00148a00
LAB_001910c9:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x28
CALL 0x00149650
XOR ECX,ECX
MOV EDX,ECX
DIV qword ptr [RBP + -0x20]
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x28],RCX
TEST byte ptr [RAX + 0x20],0x1
JNZ 0x00191117
CMP qword ptr [RBP + -0x28],0x1
JZ 0x00191117
LEA RDI,[0x1c25c9]
MOV ESI,0xb1
LEA RDX,[0x1b1609]
LEA RCX,[0x1c2c79]
MOV AL,0x0
CALL 0x00148a00
LAB_00191117:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_0019111f:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
/* gguf_kv::get_ne() const */
ulong __thiscall gguf_kv::get_ne(gguf_kv *this)
{
ulong uVar1;
ulong uVar2;
ulong local_10;
if (*(int *)(this + 0x24) == 8) {
local_10 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
(this + 0x40));
if ((((byte)this[0x20] & 1) == 0) && (local_10 != 1)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp"
,0xab,"GGML_ASSERT(%s) failed","is_array || ne == 1");
}
}
else {
uVar1 = gguf_type_size(*(int4 *)(this + 0x24));
uVar2 = std::vector<signed_char,std::allocator<signed_char>>::size
((vector<signed_char,std::allocator<signed_char>> *)(this + 0x28));
if (uVar2 % uVar1 != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp"
,0xaf,"GGML_ASSERT(%s) failed");
}
local_10 = std::vector<signed_char,std::allocator<signed_char>>::size
((vector<signed_char,std::allocator<signed_char>> *)(this + 0x28));
local_10 = local_10 / uVar1;
if ((((byte)this[0x20] & 1) == 0) && (local_10 != 1)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp"
,0xb1,"GGML_ASSERT(%s) failed","is_array || ne == 1");
}
}
return local_10;
}
|
|
18,524
|
psi_mutex_trylock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD int psi_mutex_trylock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_TRYLOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, TRUE, file, line);
# else
int result= pthread_mutex_trylock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
}
|
O0
|
c
|
psi_mutex_trylock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1ad82e(%rip), %rax # 0x1da0f8
movq (%rax), %rax
movq 0x190(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x1, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x250a0
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x2c920
leaq 0x1ad7eb(%rip), %rax # 0x1da0f8
movq (%rax), %rax
movq 0x198(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
psi_mutex_trylock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+190h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+40h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
mov edx, 1
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call _pthread_mutex_trylock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_2C920
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+198h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_2C920:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_mutex_trylock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[0] + 50))(
v6,
*(_QWORD *)(a1 + 64),
1LL,
a2,
a3);
v4 = pthread_mutex_trylock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 51))(v5, v4);
return v4;
}
|
psi_mutex_trylock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x2da0f8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x190]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x1
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001250a0
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0012c920
LEA RAX,[0x2da0f8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x198]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_0012c920:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int psi_mutex_trylock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
pthread_mutex_t *local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),1,param_2,param_3);
iVar1 = pthread_mutex_trylock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
|
|
18,525
|
psi_mutex_trylock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD int psi_mutex_trylock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_TRYLOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, TRUE, file, line);
# else
int result= pthread_mutex_trylock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
}
|
O3
|
c
|
psi_mutex_trylock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x2d2881(%rip), %r15 # 0x2f6ff8
movq (%r15), %rax
movq 0x40(%rdi), %rsi
leaq -0x48(%rbp), %rdi
pushq $0x1
popq %rdx
callq *0x190(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0x240a0
movl %eax, %r14d
testq %rbx, %rbx
je 0x247ad
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x198(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
psi_mutex_trylock:
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+40h]
lea rdi, [rbp+var_48]
push 1
pop rdx
call qword ptr [rax+190h]
mov rbx, rax
mov rdi, r14
call _pthread_mutex_trylock
mov r14d, eax
test rbx, rbx
jz short loc_247AD
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+198h]
loc_247AD:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long psi_mutex_trylock(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[0] + 50))(
v6,
*(_QWORD *)(a1 + 64),
1LL,
a2,
a3);
v4 = pthread_mutex_trylock(a1);
if ( v3 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 51))(v3, v4);
return v4;
}
|
psi_mutex_trylock:
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,[0x3f6ff8]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x40]
LEA RDI,[RBP + -0x48]
PUSH 0x1
POP RDX
CALL qword ptr [RAX + 0x190]
MOV RBX,RAX
MOV RDI,R14
CALL 0x001240a0
MOV R14D,EAX
TEST RBX,RBX
JZ 0x001247ad
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x198]
LAB_001247ad:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int psi_mutex_trylock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),1,param_2,param_3);
iVar1 = pthread_mutex_trylock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
|
|
18,526
|
minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/./minja.hpp
|
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
for (const auto& branch : cascade) {
auto enter_branch = true;
if (branch.first) {
enter_branch = branch.first->evaluate(context).to_bool();
}
if (enter_branch) {
if (!branch.second) throw std::runtime_error("IfNode.cascade.second is null");
branch.second->render(out, context);
return;
}
}
}
|
O3
|
cpp
|
minja::IfNode::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 %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, (%rsp)
movq 0x20(%rdi), %r13
movq 0x28(%rdi), %r14
cmpq %r14, %r13
je 0x5d708
movq %rdx, %rbx
leaq 0x48(%rsp), %r15
leaq 0x8(%rsp), %r12
movq (%r13), %rsi
testq %rsi, %rsi
je 0x5d6f3
movq %r12, %rdi
movq %rbx, %rdx
callq 0x3d5f2
movq %r12, %rdi
callq 0x3d7f0
movl %eax, %ebp
movq %r15, %rdi
xorl %esi, %esi
callq 0x3d970
movq %r15, %rdi
callq 0x4a5c0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x5d68b
callq 0x2f80e
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x5d69a
callq 0x2f80e
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x5d6a9
callq 0x2f80e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5d6df
movq 0x928e6(%rip), %rax # 0xeffa0
cmpb $0x0, (%rax)
je 0x5d6ca
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x5d6d4
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x5d6df
movq (%rdi), %rax
callq *0x18(%rax)
testb %bpl, %bpl
jne 0x5d6f3
addq $0x20, %r13
cmpq %r14, %r13
jne 0x5d648
jmp 0x5d708
movq 0x10(%r13), %rdi
testq %rdi, %rdi
je 0x5d717
movq (%rsp), %rsi
movq %rbx, %rdx
callq 0x5d7dc
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x18360
movq %rax, %rbx
leaq 0x5df60(%rip), %rsi # 0xbb68b
movq %rax, %rdi
callq 0x18270
movq 0x928b6(%rip), %rsi # 0xefff0
movq 0x9283f(%rip), %rdx # 0xeff80
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
movq %rbx, %rdi
callq 0x18500
jmp 0x5d763
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x3d8e4
movq %r14, %rdi
callq 0x18b90
nop
|
_ZNK5minja6IfNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_88], rsi
mov r13, [rdi+20h]
mov r14, [rdi+28h]
cmp r13, r14
jz loc_5D708
mov rbx, rdx
lea r15, [rsp+88h+var_40]
lea r12, [rsp+88h+var_80]
loc_5D648:
mov rsi, [r13+0]
test rsi, rsi
jz loc_5D6F3
mov rdi, r12
mov rdx, rbx
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, r12; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
mov ebp, eax
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+88h+var_48]
test rdi, rdi
jz short loc_5D68B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5D68B:
mov rdi, [rsp+88h+var_58]
test rdi, rdi
jz short loc_5D69A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5D69A:
mov rdi, [rsp+88h+var_68]
test rdi, rdi
jz short loc_5D6A9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5D6A9:
mov rdi, [rsp+88h+var_78]
test rdi, rdi
jz short loc_5D6DF
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_5D6CA
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_5D6D4
loc_5D6CA:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_5D6D4:
cmp eax, 1
jnz short loc_5D6DF
mov rax, [rdi]
call qword ptr [rax+18h]
loc_5D6DF:
test bpl, bpl
jnz short loc_5D6F3
add r13, 20h ; ' '
cmp r13, r14
jnz loc_5D648
jmp short loc_5D708
loc_5D6F3:
mov rdi, [r13+10h]
test rdi, rdi
jz short loc_5D717
mov rsi, [rsp+88h+var_88]
mov rdx, rbx
call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&)
loc_5D708:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5D717:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aIfnodeCascadeS; "IfNode.cascade.second is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_5D763
mov r14, rax
lea rdi, [rsp+88h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_5D763:
mov rdi, r14
call __Unwind_Resume
|
do_render:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP],RSI
MOV R13,qword ptr [RDI + 0x20]
MOV R14,qword ptr [RDI + 0x28]
CMP R13,R14
JZ 0x0015d708
MOV RBX,RDX
LEA R15,[RSP + 0x48]
LEA R12,[RSP + 0x8]
LAB_0015d648:
MOV RSI,qword ptr [R13]
TEST RSI,RSI
JZ 0x0015d6f3
MOV RDI,R12
MOV RDX,RBX
CALL 0x0013d5f2
LAB_0015d660:
MOV RDI,R12
CALL 0x0013d7f0
LAB_0015d668:
MOV EBP,EAX
MOV RDI,R15
XOR ESI,ESI
CALL 0x0013d970
MOV RDI,R15
CALL 0x0014a5c0
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x0015d68b
CALL 0x0012f80e
LAB_0015d68b:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x0015d69a
CALL 0x0012f80e
LAB_0015d69a:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x0015d6a9
CALL 0x0012f80e
LAB_0015d6a9:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x0015d6df
MOV RAX,qword ptr [0x001effa0]
CMP byte ptr [RAX],0x0
JZ 0x0015d6ca
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0015d6d4
LAB_0015d6ca:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0015d6d4:
CMP EAX,0x1
JNZ 0x0015d6df
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0015d6df:
TEST BPL,BPL
JNZ 0x0015d6f3
ADD R13,0x20
CMP R13,R14
JNZ 0x0015d648
JMP 0x0015d708
LAB_0015d6f3:
MOV RDI,qword ptr [R13 + 0x10]
TEST RDI,RDI
JZ 0x0015d717
MOV RSI,qword ptr [RSP]
MOV RDX,RBX
CALL 0x0015d7dc
LAB_0015d708:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015d717:
MOV EDI,0x10
CALL 0x00118360
MOV RBX,RAX
LAB_0015d724:
LEA RSI,[0x1bb68b]
MOV RDI,RAX
CALL 0x00118270
LAB_0015d733:
MOV RSI,qword ptr [0x001efff0]
MOV RDX,qword ptr [0x001eff80]
MOV RDI,RBX
CALL 0x00118b30
|
/* minja::IfNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void minja::IfNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
int *piVar1;
int8 *puVar2;
char cVar3;
int iVar4;
runtime_error *this;
int8 *puVar5;
Expression local_80 [8];
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
data local_40 [16];
puVar5 = *(int8 **)(param_1 + 0x20);
puVar2 = *(int8 **)(param_1 + 0x28);
if (puVar5 != puVar2) {
do {
if ((shared_ptr *)*puVar5 == (shared_ptr *)0x0) {
LAB_0015d6f3:
if ((ostringstream *)puVar5[2] != (ostringstream *)0x0) {
TemplateNode::render((ostringstream *)puVar5[2],param_2);
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015d724 to 0015d732 has its CatchHandler @ 0015d749 */
std::runtime_error::runtime_error(this,"IfNode.cascade.second is null");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80);
}
Expression::evaluate(local_80,(shared_ptr *)*puVar5);
/* try { // try from 0015d660 to 0015d667 has its CatchHandler @ 0015d756 */
cVar3 = minja::Value::to_bool((Value *)local_80);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68);
}
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar4 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar4 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar4 + -1;
}
if (iVar4 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
if (cVar3 != '\0') goto LAB_0015d6f3;
puVar5 = puVar5 + 4;
} while (puVar5 != puVar2);
}
return;
}
|
||
18,527
|
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::insert_iterator<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::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, 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
|
iterator insert_iterator(const_iterator pos, Args&& ... args)
{
iterator result(this);
JSON_ASSERT(m_data.m_value.array != nullptr);
auto insert_pos = std::distance(m_data.m_value.array->begin(), pos.m_it.array_iterator);
m_data.m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...);
result.m_it.array_iterator = m_data.m_value.array->begin() + insert_pos;
// This could have been written as:
// result.m_it.array_iterator = m_data.m_value.array->insert(pos.m_it.array_iterator, cnt, val);
// but the return value of insert is missing in GCC 4.8, so it is written this way instead.
set_parents();
return result;
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::insert_iterator<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::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, 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
movq %rdi, %rbx
movq %rsi, (%rdi)
andq $0x0, 0x8(%rdi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x18(%rdi)
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x78faa
movq %rsi, %r14
movq 0x10(%rdx), %rsi
movq %rsi, %r15
subq (%rdi), %r15
movq %rcx, %rdx
callq 0x7902a
movq 0x8(%r14), %rax
addq (%rax), %r15
movq %r15, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x204c4(%rip), %rdi # 0x99475
leaq 0x1be12(%rip), %rdx # 0x94dca
leaq 0x1beaa(%rip), %rcx # 0x94e69
movl $0x582c, %esi # imm = 0x582C
xorl %eax, %eax
callq 0x21b30
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_:
push r15
push r14
push rbx
mov rbx, rdi
mov [rdi], rsi
and qword ptr [rdi+8], 0
mov rax, 8000000000000000h
mov [rdi+18h], rax
mov rdi, [rsi+8]
test rdi, rdi
jz short loc_78FAA
mov r14, rsi
mov rsi, [rdx+10h]
mov r15, rsi
sub r15, [rdi]
mov rdx, rcx
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6insertEN9__gnu_cxx17__normal_iteratorIPKSD_SF_EERSI_; std::vector<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>>::insert(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [r14+8]
add r15, [rax]
mov [rbx+10h], r15
mov rax, rbx
pop rbx
pop r14
pop r15
retn
loc_78FAA:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMDataMTypeValu_0+23h; "m_data.m_value.array != nullptr"
mov esi, 582Ch
xor eax, eax
call _ggml_abort
|
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>::insert_iterator<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&>(
_QWORD *a1,
long long a2,
long long a3,
long long a4)
{
_QWORD *v5; // rdi
long long v6; // r15
*a1 = a2;
a1[1] = 0LL;
a1[3] = 0x8000000000000000LL;
v5 = *(_QWORD **)(a2 + 8);
if ( v5 )
{
v6 = *(_QWORD *)(a3 + 16) - *v5;
std::vector<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>>::insert(
v5,
*(_QWORD *)(a3 + 16),
a4);
a1[2] = **(_QWORD **)(a2 + 8) + v6;
return (long long)a1;
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
22572LL,
"GGML_ASSERT(%s) failed",
"m_data.m_value.array != nullptr");
return nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
22572LL);
}
}
|
insert_iterator<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 R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV qword ptr [RDI],RSI
AND qword ptr [RDI + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [RDI + 0x18],RAX
MOV RDI,qword ptr [RSI + 0x8]
TEST RDI,RDI
JZ 0x00178faa
MOV R14,RSI
MOV RSI,qword ptr [RDX + 0x10]
MOV R15,RSI
SUB R15,qword ptr [RDI]
MOV RDX,RCX
CALL 0x0017902a
MOV RAX,qword ptr [R14 + 0x8]
ADD R15,qword ptr [RAX]
MOV qword ptr [RBX + 0x10],R15
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
LAB_00178faa:
LEA RDI,[0x199475]
LEA RDX,[0x194dca]
LEA RCX,[0x194e69]
MOV ESI,0x582c
XOR EAX,EAX
CALL 0x00121b30
|
/* 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> > 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>::insert_iterator<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::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>,
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&) */
long * 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>
::
insert_iterator<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&>
(long *param_1,long param_2,long param_3,int8 param_4)
{
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<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;
long lVar2;
long lVar3;
*param_1 = param_2;
param_1[1] = 0;
param_1[3] = -0x8000000000000000;
pvVar1 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<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>>>
**)(param_2 + 8);
if (pvVar1 != (vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<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>>>
*)0x0) {
lVar2 = *(long *)(param_3 + 0x10);
lVar3 = *(long *)pvVar1;
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<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>>>
::insert(pvVar1,lVar2,param_4);
param_1[2] = (lVar2 - lVar3) + **(long **)(param_2 + 8);
return param_1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x582c,
"GGML_ASSERT(%s) failed","m_data.m_value.array != nullptr");
}
|
|
18,528
|
ma_ll2str
|
eloqsql/libmariadb/libmariadb/ma_ll2str.c
|
char *ma_ll2str(long long val,char *dst,int radix)
{
char buffer[65];
register char *p;
long long_val;
if (radix < 0)
{
if (radix < -36 || radix > -2) return (char*) 0;
if (val < 0) {
*dst++ = '-';
val = 0ULL - val;
}
radix = -radix;
}
else
{
if (radix > 36 || radix < 2) return (char*) 0;
}
if (val == 0)
{
*dst++='0';
*dst='\0';
return dst;
}
p = &buffer[sizeof(buffer)-1];
*p = '\0';
while ((ulonglong) val > (ulonglong) LONG_MAX)
{
ulonglong quo=(ulonglong) val/(uint) radix;
uint rem= (uint) (val- quo* (uint) radix);
*--p = _dig_vec[rem];
val= quo;
}
long_val= (long) val;
while (long_val != 0)
{
long quo= long_val/radix;
*--p = _dig_vec[(uchar) (long_val - quo*radix)];
long_val= quo;
}
while ((*dst++ = *p++) != 0) ;
return dst-1;
}
|
O3
|
c
|
ma_ll2str:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, %rax
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
testl %edx, %edx
js 0x327ba
leal -0x25(%rdx), %ecx
cmpl $-0x23, %ecx
jb 0x327c2
jmp 0x327d9
leal 0x1(%rdx), %ecx
cmpl $-0x23, %ecx
jae 0x327c9
xorl %esi, %esi
jmp 0x3284b
testq %rax, %rax
jns 0x327d7
movb $0x2d, (%rsi)
incq %rsi
negq %rax
negl %edx
testq %rax, %rax
je 0x32843
leaq -0x10(%rbp), %rcx
movb $0x0, (%rcx)
movl %edx, %edi
jns 0x32804
leaq 0x5750(%rip), %r8 # 0x37f40
xorl %edx, %edx
divq %rdi
movb (%rdx,%r8), %dl
movb %dl, -0x1(%rcx)
decq %rcx
testq %rax, %rax
js 0x327f0
incq %rcx
leaq 0x5732(%rip), %r8 # 0x37f40
cqto
idivq %rdi
movzbl %dl, %edx
movb (%rdx,%r8), %r9b
movb %r9b, -0x2(%rcx)
decq %rcx
testq %rax, %rax
jne 0x3280e
movb %r9b, (%rsi)
cmpl $0x24, %edx
je 0x3284b
xorl %eax, %eax
movb (%rcx,%rax), %dl
movb %dl, 0x1(%rsi,%rax)
incq %rax
testb %dl, %dl
jne 0x32830
addq %rax, %rsi
jmp 0x3284b
movw $0x30, (%rsi)
incq %rsi
movq %fs:0x28, %rax
cmpq -0x8(%rbp), %rax
jne 0x32863
movq %rsi, %rax
addq $0x50, %rsp
popq %rbp
retq
callq 0x13500
|
ma_ll2str:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, rdi
mov rcx, fs:28h
mov [rbp+var_8], rcx
test edx, edx
js short loc_327BA
lea ecx, [rdx-25h]
cmp ecx, 0FFFFFFDDh
jb short loc_327C2
jmp short loc_327D9
loc_327BA:
lea ecx, [rdx+1]
cmp ecx, 0FFFFFFDDh
jnb short loc_327C9
loc_327C2:
xor esi, esi
jmp loc_3284B
loc_327C9:
test rax, rax
jns short loc_327D7
mov byte ptr [rsi], 2Dh ; '-'
inc rsi
neg rax
loc_327D7:
neg edx
loc_327D9:
test rax, rax
jz short loc_32843
lea rcx, [rbp+var_10]
mov byte ptr [rcx], 0
mov edi, edx
jns short loc_32804
lea r8, _dig_vec; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
loc_327F0:
xor edx, edx
div rdi
mov dl, [rdx+r8]
mov [rcx-1], dl
dec rcx
test rax, rax
js short loc_327F0
loc_32804:
inc rcx
lea r8, _dig_vec; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
loc_3280E:
cqo
idiv rdi
movzx edx, dl
mov r9b, [rdx+r8]
mov [rcx-2], r9b
dec rcx
test rax, rax
jnz short loc_3280E
mov [rsi], r9b
cmp edx, 24h ; '$'
jz short loc_3284B
xor eax, eax
loc_32830:
mov dl, [rcx+rax]
mov [rsi+rax+1], dl
inc rax
test dl, dl
jnz short loc_32830
add rsi, rax
jmp short loc_3284B
loc_32843:
mov word ptr [rsi], 30h ; '0'
inc rsi
loc_3284B:
mov rax, fs:28h
cmp rax, [rbp+var_8]
jnz short loc_32863
mov rax, rsi
add rsp, 50h
pop rbp
retn
loc_32863:
call ___stack_chk_fail
|
char * ma_ll2str(long long a1, char *a2, unsigned int a3)
{
long long v3; // rax
char *v4; // rcx
long long i; // rdi
unsigned long long v6; // rtt
_BYTE *v7; // rcx
long long v8; // rt2
int v9; // edx
char v10; // r9
long long v11; // rax
char v12; // dl
char v14; // [rsp+40h] [rbp-10h] BYREF
unsigned long long v15; // [rsp+48h] [rbp-8h]
v3 = a1;
v15 = __readfsqword(0x28u);
if ( (a3 & 0x80000000) != 0 )
{
if ( a3 + 1 >= 0xFFFFFFDD )
{
if ( a1 < 0 )
{
*a2++ = 45;
v3 = -a1;
}
a3 = -a3;
goto LABEL_9;
}
return 0LL;
}
if ( a3 - 37 < 0xFFFFFFDD )
return 0LL;
LABEL_9:
if ( v3 )
{
v4 = &v14;
v14 = 0;
for ( i = a3; v3 < 0; --v4 )
{
v6 = v3;
v3 /= (unsigned long long)a3;
*(v4 - 1) = dig_vec[v6 % a3];
}
v7 = v4 + 1;
do
{
v8 = v3 % i;
v3 /= i;
v9 = (unsigned __int8)v8;
v10 = dig_vec[(unsigned __int8)v8];
*(v7 - 2) = v10;
--v7;
}
while ( v3 );
*a2 = v10;
if ( v9 != 36 )
{
v11 = 0LL;
do
{
v12 = v7[v11];
a2[++v11] = v12;
}
while ( v12 );
a2 += v11;
}
}
else
{
*(_WORD *)a2++ = 48;
}
return a2;
}
|
ma_ll2str:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,RDI
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
TEST EDX,EDX
JS 0x001327ba
LEA ECX,[RDX + -0x25]
CMP ECX,-0x23
JC 0x001327c2
JMP 0x001327d9
LAB_001327ba:
LEA ECX,[RDX + 0x1]
CMP ECX,-0x23
JNC 0x001327c9
LAB_001327c2:
XOR ESI,ESI
JMP 0x0013284b
LAB_001327c9:
TEST RAX,RAX
JNS 0x001327d7
MOV byte ptr [RSI],0x2d
INC RSI
NEG RAX
LAB_001327d7:
NEG EDX
LAB_001327d9:
TEST RAX,RAX
JZ 0x00132843
LEA RCX,[RBP + -0x10]
MOV byte ptr [RCX],0x0
MOV EDI,EDX
JNS 0x00132804
LEA R8,[0x137f40]
LAB_001327f0:
XOR EDX,EDX
DIV RDI
MOV DL,byte ptr [RDX + R8*0x1]
MOV byte ptr [RCX + -0x1],DL
DEC RCX
TEST RAX,RAX
JS 0x001327f0
LAB_00132804:
INC RCX
LEA R8,[0x137f40]
LAB_0013280e:
CQO
IDIV RDI
MOVZX EDX,DL
MOV R9B,byte ptr [RDX + R8*0x1]
MOV byte ptr [RCX + -0x2],R9B
DEC RCX
TEST RAX,RAX
JNZ 0x0013280e
MOV byte ptr [RSI],R9B
CMP EDX,0x24
JZ 0x0013284b
XOR EAX,EAX
LAB_00132830:
MOV DL,byte ptr [RCX + RAX*0x1]
MOV byte ptr [RSI + RAX*0x1 + 0x1],DL
INC RAX
TEST DL,DL
JNZ 0x00132830
ADD RSI,RAX
JMP 0x0013284b
LAB_00132843:
MOV word ptr [RSI],0x30
INC RSI
LAB_0013284b:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x8]
JNZ 0x00132863
MOV RAX,RSI
ADD RSP,0x50
POP RBP
RET
LAB_00132863:
CALL 0x00113500
|
char * ma_ll2str(ulong param_1,char *param_2,uint param_3)
{
char cVar1;
ulong uVar2;
long lVar3;
char *pcVar4;
ulong uVar5;
ulong uVar6;
long in_FS_OFFSET;
char local_19 [9];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if ((int)param_3 < 0) {
if (param_3 + 1 < 0xffffffdd) goto LAB_001327c2;
if ((long)param_1 < 0) {
*param_2 = '-';
param_2 = param_2 + 1;
param_1 = -param_1;
}
param_3 = -param_3;
}
else if (param_3 - 0x25 < 0xffffffdd) {
LAB_001327c2:
param_2 = (char *)0x0;
goto LAB_0013284b;
}
if (param_1 == 0) {
param_2[0] = '0';
param_2[1] = '\0';
param_2 = param_2 + 1;
}
else {
pcVar4 = local_19 + 1;
local_19[1] = 0;
uVar6 = (ulong)param_3;
for (; (long)param_1 < 0; param_1 = param_1 / uVar6) {
pcVar4[-1] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_1 % uVar6];
pcVar4 = pcVar4 + -1;
}
pcVar4 = pcVar4 + 1;
do {
uVar2 = (long)param_1 / (long)uVar6;
uVar5 = (long)param_1 % (long)uVar6 & 0xff;
cVar1 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar5];
pcVar4[-2] = cVar1;
pcVar4 = pcVar4 + -1;
param_1 = uVar2;
} while (uVar2 != 0);
*param_2 = cVar1;
if ((int)uVar5 != 0x24) {
lVar3 = 0;
do {
cVar1 = pcVar4[lVar3];
param_2[lVar3 + 1] = cVar1;
lVar3 = lVar3 + 1;
} while (cVar1 != '\0');
param_2 = param_2 + lVar3;
}
}
LAB_0013284b:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return param_2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
18,529
|
nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::get()
|
zkingston[P]unknot/build_O0/_deps/json-src/include/nlohmann/detail/input/lexer.hpp
|
char_int_type get()
{
++position.chars_read_total;
++position.chars_read_current_line;
if (next_unget)
{
// just reset the next_unget variable and work with current
next_unget = false;
}
else
{
current = ia.get_character();
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
token_string.push_back(char_traits<char_type>::to_char_type(current));
}
if (current == '\n')
{
++position.lines_read;
position.chars_read_current_line = 0;
}
return current;
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::get():
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
testb $0x1, 0x18(%rax)
je 0x7834c
movq 0x10(%rsp), %rax
movb $0x0, 0x18(%rax)
jmp 0x78360
movq 0x10(%rsp), %rdi
callq 0x78490
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x14(%rax)
movq 0x10(%rsp), %rax
movl 0x14(%rax), %eax
movl %eax, 0xc(%rsp)
callq 0x76d30
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x78386
jmp 0x783b1
movq 0x10(%rsp), %rdi
movq %rdi, %rax
addq $0x38, %rax
movq %rax, (%rsp)
addq $0x14, %rdi
callq 0x69af0
movq (%rsp), %rdi
movb %al, 0x1f(%rsp)
leaq 0x1f(%rsp), %rsi
callq 0x35bb0
movq 0x10(%rsp), %rax
cmpl $0xa, 0x14(%rax)
jne 0x783d5
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rax)
movq $0x0, 0x28(%rax)
movq 0x10(%rsp), %rax
movl 0x14(%rax), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_18], rax
mov rcx, [rax+20h]
add rcx, 1
mov [rax+20h], rcx
mov rcx, [rax+28h]
add rcx, 1
mov [rax+28h], rcx
test byte ptr [rax+18h], 1
jz short loc_7834C
mov rax, [rsp+28h+var_18]
mov byte ptr [rax+18h], 0
jmp short loc_78360
loc_7834C:
mov rdi, [rsp+28h+var_18]; this
call _ZN8nlohmann16json_abi_v3_11_36detail20input_stream_adapter13get_characterEv; nlohmann::json_abi_v3_11_3::detail::input_stream_adapter::get_character(void)
mov ecx, eax
mov rax, [rsp+28h+var_18]
mov [rax+14h], ecx
loc_78360:
mov rax, [rsp+28h+var_18]
mov eax, [rax+14h]
mov [rsp+28h+var_1C], eax
call _ZNSt11char_traitsIcE3eofEv; std::char_traits<char>::eof(void)
mov ecx, eax
mov eax, [rsp+28h+var_1C]
cmp eax, ecx
setnz al
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_78386
jmp short loc_783B1
loc_78386:
mov rdi, [rsp+28h+var_18]
mov rax, rdi
add rax, 38h ; '8'
mov [rsp+28h+var_28], rax
add rdi, 14h
call _ZNSt11char_traitsIcE12to_char_typeERKi; std::char_traits<char>::to_char_type(int const&)
mov rdi, [rsp+28h+var_28]
mov [rsp+28h+var_9], al
lea rsi, [rsp+28h+var_9]
call _ZNSt6vectorIcSaIcEE9push_backEOc; std::vector<char>::push_back(char &&)
loc_783B1:
mov rax, [rsp+28h+var_18]
cmp dword ptr [rax+14h], 0Ah
jnz short loc_783D5
mov rax, [rsp+28h+var_18]
mov rcx, [rax+30h]
add rcx, 1
mov [rax+30h], rcx
mov qword ptr [rax+28h], 0
loc_783D5:
mov rax, [rsp+28h+var_18]
mov eax, [rax+14h]
add rsp, 28h
retn
|
long long nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::get(
long long a1)
{
int v2; // [rsp+Ch] [rbp-1Ch]
char v3; // [rsp+1Fh] [rbp-9h] BYREF
long long v4; // [rsp+20h] [rbp-8h]
v4 = a1;
++*(_QWORD *)(a1 + 32);
++*(_QWORD *)(a1 + 40);
if ( (*(_BYTE *)(a1 + 24) & 1) != 0 )
*(_BYTE *)(a1 + 24) = 0;
else
*(_DWORD *)(a1 + 20) = nlohmann::json_abi_v3_11_3::detail::input_stream_adapter::get_character((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)a1);
v2 = *(_DWORD *)(a1 + 20);
if ( v2 != (unsigned int)std::char_traits<char>::eof() )
{
v3 = std::char_traits<char>::to_char_type((unsigned int *)(a1 + 20));
std::vector<char>::push_back(a1 + 56, (long long)&v3);
}
if ( *(_DWORD *)(a1 + 20) == 10 )
{
++*(_QWORD *)(a1 + 48);
*(_QWORD *)(a1 + 40) = 0LL;
}
return *(unsigned int *)(a1 + 20);
}
|
get:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
MOV RCX,qword ptr [RAX + 0x20]
ADD RCX,0x1
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RAX + 0x28]
ADD RCX,0x1
MOV qword ptr [RAX + 0x28],RCX
TEST byte ptr [RAX + 0x18],0x1
JZ 0x0017834c
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RAX + 0x18],0x0
JMP 0x00178360
LAB_0017834c:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00178490
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x14],ECX
LAB_00178360:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RSP + 0xc],EAX
CALL 0x00176d30
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,ECX
SETNZ AL
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x00178386
JMP 0x001783b1
LAB_00178386:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,RDI
ADD RAX,0x38
MOV qword ptr [RSP],RAX
ADD RDI,0x14
CALL 0x00169af0
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x1f],AL
LEA RSI,[RSP + 0x1f]
CALL 0x00135bb0
LAB_001783b1:
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x14],0xa
JNZ 0x001783d5
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RAX + 0x30]
ADD RCX,0x1
MOV qword ptr [RAX + 0x30],RCX
MOV qword ptr [RAX + 0x28],0x0
LAB_001783d5:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX + 0x14]
ADD RSP,0x28
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::get() */
int4 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<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::input_stream_adapter>
::get(lexer<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::input_stream_adapter>
*this)
{
int iVar1;
int4 uVar2;
int iVar3;
char local_9;
lexer<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::input_stream_adapter>
*local_8;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + 1;
*(long *)(this + 0x28) = *(long *)(this + 0x28) + 1;
local_8 = this;
if (((byte)this[0x18] & 1) == 0) {
uVar2 = input_stream_adapter::get_character((input_stream_adapter *)this);
*(int4 *)(this + 0x14) = uVar2;
}
else {
this[0x18] = (lexer<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::input_stream_adapter>
)0x0;
}
iVar1 = *(int *)(this + 0x14);
iVar3 = std::char_traits<char>::eof();
if (iVar1 != iVar3) {
local_9 = std::char_traits<char>::to_char_type((int *)(this + 0x14));
std::vector<char,std::allocator<char>>::push_back
((vector<char,std::allocator<char>> *)(this + 0x38),&local_9);
}
if (*(int *)(this + 0x14) == 10) {
*(long *)(this + 0x30) = *(long *)(this + 0x30) + 1;
*(int8 *)(this + 0x28) = 0;
}
return *(int4 *)(this + 0x14);
}
|
|
18,530
|
end_simple_key_cache
|
eloqsql/mysys/mf_keycache.c
|
static
void end_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache, my_bool cleanup)
{
DBUG_ENTER("end_simple_key_cache");
DBUG_PRINT("enter", ("key_cache: %p", keycache));
if (!keycache->key_cache_inited)
DBUG_VOID_RETURN;
if (keycache->disk_blocks > 0)
{
if (keycache->block_mem)
{
my_large_free((uchar*) keycache->block_mem, keycache->allocated_mem_size);
keycache->block_mem= NULL;
my_free(keycache->block_root);
keycache->block_root= NULL;
}
keycache->disk_blocks= -1;
/* Reset blocks_changed to be safe if flush_all_key_blocks is called */
keycache->blocks_changed= 0;
}
DBUG_PRINT("status", ("used: %lu changed: %lu w_requests: %lu "
"writes: %lu r_requests: %lu reads: %lu",
keycache->blocks_used, keycache->global_blocks_changed,
(ulong) keycache->global_cache_w_requests,
(ulong) keycache->global_cache_write,
(ulong) keycache->global_cache_r_requests,
(ulong) keycache->global_cache_read));
/*
Reset these values to be able to detect a disabled key cache.
See Bug#44068 (RESTORE can disable the MyISAM Key Cache).
*/
keycache->blocks_used= 0;
keycache->blocks_unused= 0;
if (cleanup)
{
mysql_mutex_destroy(&keycache->cache_lock);
keycache->key_cache_inited= keycache->can_be_used= 0;
KEYCACHE_DEBUG_CLOSE;
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
end_simple_key_cache:
cmpb $0x0, (%rdi)
je 0x54f8e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
cmpl $0x0, 0x48(%rdi)
jle 0x54f3e
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x54f2f
movq 0x10(%rbx), %rsi
callq 0x607cb
xorl %r15d, %r15d
movq %r15, 0xa8(%rbx)
movq 0xa0(%rbx), %rdi
callq 0x5a5f2
movq %r15, 0xa0(%rbx)
movl $0xffffffff, 0x48(%rbx) # imm = 0xFFFFFFFF
movq $0x0, 0x60(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rbx)
testb %r14b, %r14b
je 0x54f84
leaq 0xc0(%rbx), %r14
movq 0x100(%rbx), %rdi
testq %rdi, %rdi
je 0x54f75
leaq 0x2db3ec(%rip), %rax # 0x330350
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x100(%rbx)
movq %r14, %rdi
callq 0x28400
xorl %eax, %eax
movb %al, 0x3(%rbx)
movb %al, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
end_simple_key_cache:
cmp byte ptr [rdi], 0
jz locret_54F8E
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14d, esi
mov rbx, rdi
cmp dword ptr [rdi+48h], 0
jle short loc_54F3E
mov rdi, [rbx+0A8h]
test rdi, rdi
jz short loc_54F2F
mov rsi, [rbx+10h]
call my_large_free
xor r15d, r15d
mov [rbx+0A8h], r15
mov rdi, [rbx+0A0h]
call my_free
mov [rbx+0A0h], r15
loc_54F2F:
mov dword ptr [rbx+48h], 0FFFFFFFFh
mov qword ptr [rbx+60h], 0
loc_54F3E:
xorps xmm0, xmm0
movups xmmword ptr [rbx+50h], xmm0
test r14b, r14b
jz short loc_54F84
lea r14, [rbx+0C0h]
mov rdi, [rbx+100h]
test rdi, rdi
jz short loc_54F75
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+100h], 0
loc_54F75:
mov rdi, r14
call _pthread_mutex_destroy
xor eax, eax
mov [rbx+3], al
mov [rbx], al
loc_54F84:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
locret_54F8E:
retn
|
long long end_simple_key_cache(long long a1, char a2)
{
long long v3; // rdi
long long result; // rax
long long v5; // rdi
if ( *(_BYTE *)a1 )
{
if ( *(int *)(a1 + 72) > 0 )
{
v3 = *(_QWORD *)(a1 + 168);
if ( v3 )
{
my_large_free(v3, *(_QWORD *)(a1 + 16));
*(_QWORD *)(a1 + 168) = 0LL;
result = my_free(*(_QWORD *)(a1 + 160));
*(_QWORD *)(a1 + 160) = 0LL;
}
*(_DWORD *)(a1 + 72) = -1;
*(_QWORD *)(a1 + 96) = 0LL;
}
*(_OWORD *)(a1 + 80) = 0LL;
if ( a2 )
{
v5 = *(_QWORD *)(a1 + 256);
if ( v5 )
{
((void ( *)(long long))PSI_server[9])(v5);
*(_QWORD *)(a1 + 256) = 0LL;
}
pthread_mutex_destroy(a1 + 192);
result = 0LL;
*(_BYTE *)(a1 + 3) = 0;
*(_BYTE *)a1 = 0;
}
}
return result;
}
|
end_simple_key_cache:
CMP byte ptr [RDI],0x0
JZ 0x00154f8e
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14D,ESI
MOV RBX,RDI
CMP dword ptr [RDI + 0x48],0x0
JLE 0x00154f3e
MOV RDI,qword ptr [RBX + 0xa8]
TEST RDI,RDI
JZ 0x00154f2f
MOV RSI,qword ptr [RBX + 0x10]
CALL 0x001607cb
XOR R15D,R15D
MOV qword ptr [RBX + 0xa8],R15
MOV RDI,qword ptr [RBX + 0xa0]
CALL 0x0015a5f2
MOV qword ptr [RBX + 0xa0],R15
LAB_00154f2f:
MOV dword ptr [RBX + 0x48],0xffffffff
MOV qword ptr [RBX + 0x60],0x0
LAB_00154f3e:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x50],XMM0
TEST R14B,R14B
JZ 0x00154f84
LEA R14,[RBX + 0xc0]
MOV RDI,qword ptr [RBX + 0x100]
TEST RDI,RDI
JZ 0x00154f75
LEA RAX,[0x430350]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x100],0x0
LAB_00154f75:
MOV RDI,R14
CALL 0x00128400
XOR EAX,EAX
MOV byte ptr [RBX + 0x3],AL
MOV byte ptr [RBX],AL
LAB_00154f84:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
LAB_00154f8e:
RET
|
void end_simple_key_cache(char *param_1,char param_2)
{
if (*param_1 != '\0') {
if (0 < *(int *)(param_1 + 0x48)) {
if (*(long *)(param_1 + 0xa8) != 0) {
my_large_free(*(long *)(param_1 + 0xa8),*(int8 *)(param_1 + 0x10));
param_1[0xa8] = '\0';
param_1[0xa9] = '\0';
param_1[0xaa] = '\0';
param_1[0xab] = '\0';
param_1[0xac] = '\0';
param_1[0xad] = '\0';
param_1[0xae] = '\0';
param_1[0xaf] = '\0';
my_free(*(int8 *)(param_1 + 0xa0));
param_1[0xa0] = '\0';
param_1[0xa1] = '\0';
param_1[0xa2] = '\0';
param_1[0xa3] = '\0';
param_1[0xa4] = '\0';
param_1[0xa5] = '\0';
param_1[0xa6] = '\0';
param_1[0xa7] = '\0';
}
param_1[0x48] = -1;
param_1[0x49] = -1;
param_1[0x4a] = -1;
param_1[0x4b] = -1;
param_1[0x60] = '\0';
param_1[0x61] = '\0';
param_1[0x62] = '\0';
param_1[99] = '\0';
param_1[100] = '\0';
param_1[0x65] = '\0';
param_1[0x66] = '\0';
param_1[0x67] = '\0';
}
param_1[0x50] = '\0';
param_1[0x51] = '\0';
param_1[0x52] = '\0';
param_1[0x53] = '\0';
param_1[0x54] = '\0';
param_1[0x55] = '\0';
param_1[0x56] = '\0';
param_1[0x57] = '\0';
param_1[0x58] = '\0';
param_1[0x59] = '\0';
param_1[0x5a] = '\0';
param_1[0x5b] = '\0';
param_1[0x5c] = '\0';
param_1[0x5d] = '\0';
param_1[0x5e] = '\0';
param_1[0x5f] = '\0';
if (param_2 != '\0') {
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x48))();
param_1[0x100] = '\0';
param_1[0x101] = '\0';
param_1[0x102] = '\0';
param_1[0x103] = '\0';
param_1[0x104] = '\0';
param_1[0x105] = '\0';
param_1[0x106] = '\0';
param_1[0x107] = '\0';
}
pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0xc0));
param_1[3] = '\0';
*param_1 = '\0';
}
}
return;
}
|
|
18,531
|
make_error_message(char*, unsigned long, char const*, __va_list_tag*)
|
eloqsql/client/mysqltest.cc
|
static void make_error_message(char *buf, size_t len, const char *fmt, va_list args)
{
char *s= buf, *end= buf + len;
s+= my_snprintf(s, end - s, "mysqltest: ");
if (cur_file && cur_file != file_stack)
{
s+= my_snprintf(s, end - s, "In included file \"%s\": \n",
cur_file->file_name);
s+= print_file_stack(s, end);
}
if (start_lineno > 0)
s+= my_snprintf(s, end -s, "At line %u: ", start_lineno);
if (!fmt)
fmt= "unknown error";
s+= my_vsnprintf(s, end - s, fmt, args);
s+= my_snprintf(s, end -s, "\n");
}
|
O3
|
cpp
|
make_error_message(char*, unsigned long, char const*, __va_list_tag*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0x40000(%rdi), %rbx
leaq 0x8d7a7(%rip), %rdx # 0xf0aa7
movl $0x40000, %r13d # imm = 0x40000
movl $0x40000, %esi # imm = 0x40000
xorl %eax, %eax
callq 0xee30a
addq %rax, %r14
movq 0x3f96a4(%rip), %rcx # 0x45c9c0
testq %rcx, %rcx
sete %dl
leaq 0x3f96a7(%rip), %rsi # 0x45c9d0
cmpq %rsi, %rcx
sete %sil
orb %dl, %sil
jne 0x63367
subq %rax, %r13
movq 0x8(%rcx), %rcx
leaq 0x8fc9d(%rip), %rdx # 0xf2fe0
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0xee30a
movq %rax, %r13
addq %r14, %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x63265
movq %rax, %r14
addq %r13, %r14
movl 0x3f9a57(%rip), %ecx # 0x45cdc4
testl %ecx, %ecx
je 0x6338b
movq %rbx, %rsi
subq %r14, %rsi
leaq 0x8d74d(%rip), %rdx # 0xf0acb
movq %r14, %rdi
xorl %eax, %eax
callq 0xee30a
addq %rax, %r14
testq %r12, %r12
leaq 0x8fc64(%rip), %rdx # 0xf2ff9
cmovneq %r12, %rdx
movq %rbx, %rsi
subq %r14, %rsi
movq %r14, %rdi
movq %r15, %rcx
callq 0xee2ed
addq %rax, %r14
subq %r14, %rbx
leaq 0x8d884(%rip), %rdx # 0xf0c3b
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xee30a
|
_ZL18make_error_messagePcmPKcP13__va_list_tag:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov r14, rdi
lea rbx, stru_40000.r_offset[rdi]
lea rdx, aMysqltest; "mysqltest: "
mov r13d, offset stru_40000
mov esi, offset stru_40000
xor eax, eax
call my_snprintf
add r14, rax
mov rcx, cs:_ZL8cur_file; cur_file
test rcx, rcx
setz dl
lea rsi, _ZL10file_stack; file_stack
cmp rcx, rsi
setz sil
or sil, dl
jnz short loc_63367
sub r13, rax
mov rcx, [rcx+8]
lea rdx, aInIncludedFile_0; "In included file \"%s\": \n"
mov rdi, r14
mov rsi, r13
xor eax, eax
call my_snprintf
mov r13, rax
add r13, r14
mov rdi, r13; char *
mov rsi, rbx; char *
call _Z16print_file_stackPcPKc; print_file_stack(char *,char const*)
mov r14, rax
add r14, r13
loc_63367:
mov ecx, cs:_ZL12start_lineno; start_lineno
test ecx, ecx
jz short loc_6338B
mov rsi, rbx
sub rsi, r14
lea rdx, aAtLineU; "At line %u: "
mov rdi, r14
xor eax, eax
call my_snprintf
add r14, rax
loc_6338B:
test r12, r12
lea rdx, aUnknownError_0; "unknown error"
cmovnz rdx, r12
mov rsi, rbx
sub rsi, r14
mov rdi, r14
mov rcx, r15
call my_vsnprintf
add r14, rax
sub rbx, r14
lea rdx, aTheTwoFilesDif+14Fh; "\n"
mov rdi, r14
mov rsi, rbx
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp my_snprintf
|
long long make_error_message(
char *a1,
const char *a2,
const char *a3,
__va_list_tag *a4,
int a5,
int a6,
char a7)
{
char v7; // al
const char *v9; // rbx
long long v10; // rax
int v11; // r8d
int v12; // r9d
char *v13; // r14
char *v14; // r13
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
int v18; // r9d
const char *v19; // rdx
int v20; // eax
int v21; // ecx
int v22; // r8d
int v23; // r9d
char v25; // [rsp-8h] [rbp-30h]
v9 = (char *)&stru_40000 + (_QWORD)a1;
v10 = my_snprintf((_DWORD)a1, (unsigned int)&stru_40000, (unsigned int)"mysqltest: ", (_DWORD)a4, a5, a6, v7);
v13 = &a1[v10];
if ( cur_file != 0 && cur_file != (_QWORD)&file_stack )
{
v14 = &v13[my_snprintf(
(_DWORD)v13,
(unsigned int)&stru_40000 - v10,
(unsigned int)"In included file \"%s\": \n",
*(_QWORD *)(cur_file + 8),
v11,
v12,
v25)];
v13 = &print_file_stack(v14, v9, v15, v16, v17, v18)[(_QWORD)v14];
}
if ( start_lineno )
v13 += my_snprintf((_DWORD)v13, (int)v9 - (int)v13, (unsigned int)"At line %u: ", start_lineno, v11, v12, v25);
v19 = "unknown error";
if ( a2 )
v19 = a2;
v20 = my_vsnprintf(v13, v9 - v13, v19, a3);
return my_snprintf(v20 + (int)v13, (int)v9 - (v20 + (int)v13), (unsigned int)"\n", v21, v22, v23, a7);
}
|
make_error_message:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
LEA RBX,[RDI + 0x40000]
LEA RDX,[0x1f0aa7]
MOV R13D,0x40000
MOV ESI,0x40000
XOR EAX,EAX
CALL 0x001ee30a
ADD R14,RAX
MOV RCX,qword ptr [0x0055c9c0]
TEST RCX,RCX
SETZ DL
LEA RSI,[0x55c9d0]
CMP RCX,RSI
SETZ SIL
OR SIL,DL
JNZ 0x00163367
SUB R13,RAX
MOV RCX,qword ptr [RCX + 0x8]
LEA RDX,[0x1f2fe0]
MOV RDI,R14
MOV RSI,R13
XOR EAX,EAX
CALL 0x001ee30a
MOV R13,RAX
ADD R13,R14
MOV RDI,R13
MOV RSI,RBX
CALL 0x00163265
MOV R14,RAX
ADD R14,R13
LAB_00163367:
MOV ECX,dword ptr [0x0055cdc4]
TEST ECX,ECX
JZ 0x0016338b
MOV RSI,RBX
SUB RSI,R14
LEA RDX,[0x1f0acb]
MOV RDI,R14
XOR EAX,EAX
CALL 0x001ee30a
ADD R14,RAX
LAB_0016338b:
TEST R12,R12
LEA RDX,[0x1f2ff9]
CMOVNZ RDX,R12
MOV RSI,RBX
SUB RSI,R14
MOV RDI,R14
MOV RCX,R15
CALL 0x001ee2ed
ADD R14,RAX
SUB RBX,R14
LEA RDX,[0x1f0c3b]
MOV RDI,R14
MOV RSI,RBX
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001ee30a
|
/* make_error_message(char*, unsigned long, char const*, __va_list_tag*) */
void make_error_message(char *param_1,ulong param_2,char *param_3,__va_list_tag *param_4)
{
char *pcVar1;
long lVar2;
long lVar3;
char *pcVar4;
char *pcVar5;
pcVar1 = param_1 + 0x40000;
lVar2 = my_snprintf(param_1,0x40000,"mysqltest: ");
pcVar5 = param_1 + lVar2;
if (cur_file != &file_stack && cur_file != (int8 *)0x0) {
lVar2 = my_snprintf(pcVar5,0x40000 - lVar2,"In included file \"%s\": \n",cur_file[1]);
lVar3 = print_file_stack(pcVar5 + lVar2,pcVar1);
pcVar5 = pcVar5 + lVar2 + lVar3;
}
if (start_lineno != 0) {
lVar2 = my_snprintf(pcVar5,(long)pcVar1 - (long)pcVar5,"At line %u: ");
pcVar5 = pcVar5 + lVar2;
}
pcVar4 = "unknown error";
if (param_2 != 0) {
pcVar4 = (char *)param_2;
}
lVar2 = my_vsnprintf(pcVar5,(long)pcVar1 - (long)pcVar5,pcVar4,param_3);
my_snprintf(pcVar5 + lVar2,(long)pcVar1 - (long)(pcVar5 + lVar2),"\n");
return;
}
|
|
18,532
|
my_casedn_str_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static size_t my_casedn_str_utf8mb3(CHARSET_INFO *cs, char *src)
{
my_wc_t wc;
int srcres, dstres;
char *dst= src, *dst0= src;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(cs->casedn_multiply == 1);
while (*src &&
(srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_tolower_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
/*
In rare cases lower string can be shorter than
the original string, for example:
"U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE"
(which is 0xC4B0 in utf8mb3, i.e. two bytes)
is converted into
"U+0069 LATIN SMALL LETTER I"
(which is 0x69 in utf8mb3, i.e. one byte)
So, we need to put '\0' terminator after converting.
*/
*dst= '\0';
return (size_t) (dst - dst0);
}
|
O3
|
c
|
my_casedn_str_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpb $0x0, (%rsi)
movq %rsi, %r14
je 0x4efaa
movq 0x78(%rdi), %r13
leaq -0x30(%rbp), %r15
movq %rbx, %r12
movq %rbx, %r14
movq %r15, %rdi
movq %r12, %rsi
callq 0x4f798
testl %eax, %eax
je 0x4efaa
movq 0x8(%r13), %rdx
movq -0x30(%rbp), %rcx
movzbl %ch, %esi
movq (%rdx,%rsi,8), %rdx
testq %rdx, %rdx
je 0x4ef39
movzbl %cl, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rdx,%rcx,4), %ecx
movq %rcx, -0x30(%rbp)
movl $0x1, %edx
cmpq $0x80, %rcx
jb 0x4ef93
movl $0x2, %edx
cmpq $0x800, %rcx # imm = 0x800
jb 0x4ef7a
cmpq $0xffff, %rcx # imm = 0xFFFF
ja 0x4efaa
movl %ecx, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x2(%r14)
shrq $0x6, %rcx
orq $0x800, %rcx # imm = 0x800
movl $0x3, %edx
movl %ecx, %esi
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x1(%r14)
shrq $0x6, %rcx
orq $0xc0, %rcx
movb %cl, (%r14)
movl %eax, %eax
addq %rdx, %r14
cmpb $0x0, (%r12,%rax)
leaq (%r12,%rax), %r12
jne 0x4ef03
movb $0x0, (%r14)
subq %rbx, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_casedn_str_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
cmp byte ptr [rsi], 0
mov r14, rsi
jz loc_4EFAA
mov r13, [rdi+78h]
lea r15, [rbp+var_30]
mov r12, rbx
mov r14, rbx
loc_4EF03:
mov rdi, r15
mov rsi, r12
call my_utf8mb3_uni_no_range
test eax, eax
jz loc_4EFAA
mov rdx, [r13+8]
mov rcx, [rbp+var_30]
movzx esi, ch
mov rdx, [rdx+rsi*8]
test rdx, rdx
jz short loc_4EF39
movzx ecx, cl
lea rcx, [rcx+rcx*2]
mov ecx, [rdx+rcx*4+4]
mov [rbp+var_30], rcx
loc_4EF39:
mov edx, 1
cmp rcx, 80h
jb short loc_4EF93
mov edx, 2
cmp rcx, 800h
jb short loc_4EF7A
cmp rcx, 0FFFFh
ja short loc_4EFAA
mov edx, ecx
and dl, 3Fh
or dl, 80h
mov [r14+2], dl
shr rcx, 6
or rcx, 800h
mov edx, 3
loc_4EF7A:
mov esi, ecx
and sil, 3Fh
or sil, 80h
mov [r14+1], sil
shr rcx, 6
or rcx, 0C0h
loc_4EF93:
mov [r14], cl
mov eax, eax
add r14, rdx
cmp byte ptr [r12+rax], 0
lea r12, [r12+rax]
jnz loc_4EF03
loc_4EFAA:
mov byte ptr [r14], 0
sub r14, rbx
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_casedn_str_utf8mb3(long long a1, _BYTE *a2)
{
unsigned long long v2; // rax
_BYTE *v3; // r14
long long v4; // r13
_BYTE *v5; // r12
unsigned int v6; // eax
unsigned long long v7; // rcx
long long v8; // rdx
long long v9; // rdx
bool v10; // zf
unsigned long long v12; // [rsp+0h] [rbp-30h] BYREF
v12 = v2;
v3 = a2;
if ( *a2 )
{
v4 = *(_QWORD *)(a1 + 120);
v5 = a2;
v3 = a2;
do
{
v6 = my_utf8mb3_uni_no_range(&v12, v5);
if ( !v6 )
break;
v7 = v12;
v8 = *(_QWORD *)(*(_QWORD *)(v4 + 8) + 8LL * BYTE1(v12));
if ( v8 )
{
v7 = *(unsigned int *)(v8 + 12LL * (unsigned __int8)v12 + 4);
v12 = v7;
}
v9 = 1LL;
if ( v7 >= 0x80 )
{
v9 = 2LL;
if ( v7 >= 0x800 )
{
if ( v7 > 0xFFFF )
break;
v3[2] = v7 & 0x3F | 0x80;
v7 = (v7 >> 6) | 0x800;
v9 = 3LL;
}
v3[1] = v7 & 0x3F | 0x80;
v7 = (v7 >> 6) | 0xC0;
}
*v3 = v7;
v3 += v9;
v10 = v5[v6] == 0;
v5 += v6;
}
while ( !v10 );
}
*v3 = 0;
return v3 - a2;
}
|
my_casedn_str_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
CMP byte ptr [RSI],0x0
MOV R14,RSI
JZ 0x0014efaa
MOV R13,qword ptr [RDI + 0x78]
LEA R15,[RBP + -0x30]
MOV R12,RBX
MOV R14,RBX
LAB_0014ef03:
MOV RDI,R15
MOV RSI,R12
CALL 0x0014f798
TEST EAX,EAX
JZ 0x0014efaa
MOV RDX,qword ptr [R13 + 0x8]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ESI,CH
MOV RDX,qword ptr [RDX + RSI*0x8]
TEST RDX,RDX
JZ 0x0014ef39
MOVZX ECX,CL
LEA RCX,[RCX + RCX*0x2]
MOV ECX,dword ptr [RDX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],RCX
LAB_0014ef39:
MOV EDX,0x1
CMP RCX,0x80
JC 0x0014ef93
MOV EDX,0x2
CMP RCX,0x800
JC 0x0014ef7a
CMP RCX,0xffff
JA 0x0014efaa
MOV EDX,ECX
AND DL,0x3f
OR DL,0x80
MOV byte ptr [R14 + 0x2],DL
SHR RCX,0x6
OR RCX,0x800
MOV EDX,0x3
LAB_0014ef7a:
MOV ESI,ECX
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [R14 + 0x1],SIL
SHR RCX,0x6
OR RCX,0xc0
LAB_0014ef93:
MOV byte ptr [R14],CL
MOV EAX,EAX
ADD R14,RDX
CMP byte ptr [R12 + RAX*0x1],0x0
LEA R12,[R12 + RAX*0x1]
JNZ 0x0014ef03
LAB_0014efaa:
MOV byte ptr [R14],0x0
SUB R14,RBX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_casedn_str_utf8mb3(long param_1,char *param_2)
{
char *pcVar1;
long lVar2;
uint uVar3;
ulong in_RAX;
ulong uVar4;
long lVar5;
char *pcVar6;
char *pcVar7;
ulong local_38;
pcVar7 = param_2;
if (*param_2 != '\0') {
lVar2 = *(long *)(param_1 + 0x78);
pcVar6 = param_2;
local_38 = in_RAX;
do {
uVar3 = my_utf8mb3_uni_no_range(&local_38,pcVar6);
if (uVar3 == 0) break;
lVar5 = *(long *)(*(long *)(lVar2 + 8) + (local_38 >> 8 & 0xff) * 8);
if (lVar5 != 0) {
local_38 = (ulong)*(uint *)(lVar5 + 4 + (local_38 & 0xff) * 0xc);
}
lVar5 = 1;
uVar4 = local_38;
if (0x7f < local_38) {
lVar5 = 2;
if (0x7ff < local_38) {
if (0xffff < local_38) break;
pcVar7[2] = (byte)local_38 & 0x3f | 0x80;
uVar4 = local_38 >> 6 | 0x800;
lVar5 = 3;
}
pcVar7[1] = (byte)uVar4 & 0x3f | 0x80;
uVar4 = uVar4 >> 6 | 0xc0;
}
*pcVar7 = (char)uVar4;
pcVar7 = pcVar7 + lVar5;
pcVar1 = pcVar6 + uVar3;
pcVar6 = pcVar6 + uVar3;
} while (*pcVar1 != '\0');
}
*pcVar7 = '\0';
return (long)pcVar7 - (long)param_2;
}
|
|
18,533
|
nlohmann::json_abi_v3_11_3::detail::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::input_stream_adapter>::parser(nlohmann::json_abi_v3_11_3::detail::input_stream_adapter&&, 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::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool)
|
msxemulator/build_O3/_deps/picotool-src/lib/nlohmann_json/single_include/nlohmann/json.hpp
|
explicit parser(InputAdapterType&& adapter,
const parser_callback_t<BasicJsonType> cb = nullptr,
const bool allow_exceptions_ = true,
const bool skip_comments = false)
: callback(cb)
, m_lexer(std::move(adapter), skip_comments)
, allow_exceptions(allow_exceptions_)
{
// read first token
get_token();
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<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::input_stream_adapter>::parser(nlohmann::json_abi_v3_11_3::detail::input_stream_adapter&&, 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::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movl %ecx, %r14d
movq %rsi, %r12
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x64e90
movl $0x0, 0x20(%rbx)
leaq 0x28(%rbx), %r15
movq %r15, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x654f4
movb %r14b, 0xc0(%rbx)
movq %r15, %rdi
callq 0x6559e
movl %eax, 0x20(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r15, %rdi
callq 0x65564
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x654e4
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
movq %r14, %rdi
callq 0xf7d0
movq %rax, %rdi
callq 0x1d2b2
|
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEEC2EOSG_St8functionIFbiNS1_13parse_event_tERSF_EEbb:
push rbp
push r15
push r14
push r12
push rbx
mov ebp, r8d
mov r14d, ecx
mov r12, rsi
mov rbx, rdi
mov rsi, rdx
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<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 dword ptr [rbx+20h], 0
lea r15, [rbx+28h]
mov rdi, r15
mov rsi, r12
mov edx, ebp
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEEC2EOSG_b; nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::lexer(nlohmann::json_abi_v3_11_3::detail::input_stream_adapter&&,bool)
mov [rbx+0C0h], r14b
mov rdi, r15; this
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE4scanEv; nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::scan(void)
mov [rbx+20h], eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, r15; this
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::~lexer()
mov rax, [rbx+10h]
test rax, rax
jz short loc_654E4
mov rdi, rbx
mov rsi, rbx
mov edx, 3
call rax
loc_654E4:
mov rdi, r14
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
|
long long nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<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::input_stream_adapter>::parser(
long long a1,
long long a2,
long long a3,
char a4,
unsigned int a5)
{
long long result; // rax
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<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> &)>::function(
(_OWORD *)a1,
a3);
*(_DWORD *)(a1 + 32) = 0;
nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::lexer(
a1 + 40,
a2,
a5);
*(_BYTE *)(a1 + 192) = a4;
result = nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::scan((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)(a1 + 40));
*(_DWORD *)(a1 + 32) = result;
return result;
}
|
parser:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBP,R8D
MOV R14D,ECX
MOV R12,RSI
MOV RBX,RDI
MOV RSI,RDX
CALL 0x00164e90
MOV dword ptr [RBX + 0x20],0x0
LEA R15,[RBX + 0x28]
MOV RDI,R15
MOV RSI,R12
MOV EDX,EBP
CALL 0x001654f4
MOV byte ptr [RBX + 0xc0],R14B
LAB_001654af:
MOV RDI,R15
CALL 0x0016559e
MOV dword ptr [RBX + 0x20],EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<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::input_stream_adapter>::parser(nlohmann::json_abi_v3_11_3::detail::input_stream_adapter&&,
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>&)>, bool, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
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::input_stream_adapter>
::parser(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::input_stream_adapter>
*this,input_stream_adapter *param_1,function *param_3,
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::input_stream_adapter>
param_4,bool param_5)
{
int4 uVar1;
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>&)>
::function((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,param_3);
*(int4 *)(this + 0x20) = 0;
lexer<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::input_stream_adapter>
::lexer((lexer<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::input_stream_adapter>
*)(this + 0x28),param_1,param_5);
this[0xc0] = param_4;
/* try { // try from 001654af to 001654b6 has its CatchHandler @ 001654c3 */
uVar1 = lexer<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::input_stream_adapter>
::scan((lexer<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::input_stream_adapter>
*)(this + 0x28));
*(int4 *)(this + 0x20) = uVar1;
return;
}
|
|
18,534
|
my_thread_init
|
eloqsql/mysys/my_thr_init.c
|
my_bool my_thread_init(void)
{
struct st_my_thread_var *tmp;
my_bool error=0;
if (!my_thread_global_init_done)
return 1; /* cannot proceed with uninitialized library */
#ifdef EXTRA_DEBUG_THREADS
fprintf(stderr,"my_thread_init(): pthread_self: %p\n", pthread_self());
#endif
if (my_thread_var)
{
#ifdef EXTRA_DEBUG_THREADS
fprintf(stderr,"my_thread_init() called more than once in thread 0x%lx\n",
(long) pthread_self());
#endif
goto end;
}
#ifdef _MSC_VER
install_sigabrt_handler();
#endif
if (!(tmp= (struct st_my_thread_var *) calloc(1, sizeof(*tmp))))
{
error= 1;
goto end;
}
set_mysys_var(tmp);
tmp->pthread_self= pthread_self();
my_thread_init_thr_mutex(tmp);
tmp->stack_ends_here= (char*)&tmp +
STACK_DIRECTION * (long)my_thread_stack_size;
mysql_mutex_lock(&THR_LOCK_threads);
tmp->id= tmp->dbug_id= ++thread_id;
++THR_thread_count;
mysql_mutex_unlock(&THR_LOCK_threads);
tmp->init= 1;
#ifndef DBUG_OFF
/* Generate unique name for thread */
(void) my_thread_name();
#endif
end:
return error;
}
|
O3
|
c
|
my_thread_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movb $0x1, %bl
cmpb $0x1, 0x35bf30(%rip) # 0x3bf430
jne 0x635d9
leaq 0x35bf27(%rip), %r15 # 0x3bf434
movl (%r15), %edi
callq 0x36b10
testq %rax, %rax
jne 0x635d7
movl $0x1, %edi
movl $0xf0, %esi
callq 0x36900
movq %rax, -0x20(%rbp)
testq %rax, %rax
je 0x635d9
movq %rax, %r14
movl (%r15), %edi
movq %rax, %rsi
callq 0x363a0
callq 0x36700
movq %rax, 0xc8(%r14)
movq %r14, %rdi
callq 0x633f7
leaq 0x2da0ed(%rip), %rax # 0x33d650
leaq -0x20(%rbp), %rcx
addq (%rax), %rcx
movq %rcx, 0xb8(%r14)
leaq 0x35bdf0(%rip), %rbx # 0x3bf368
cmpq $0x0, 0x40(%rbx)
jne 0x635e6
leaq 0x35bde2(%rip), %rdi # 0x3bf368
callq 0x36280
movq 0x35bea6(%rip), %rax # 0x3bf438
incq %rax
movq %rax, 0x35be9c(%rip) # 0x3bf438
movq -0x20(%rbp), %rcx
movq %rax, 0xd8(%rcx)
movq %rax, 0xd0(%rcx)
leaq 0x35bbb3(%rip), %rax # 0x3bf168
incl (%rax)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0x635ed
leaq 0x35bda1(%rip), %rdi # 0x3bf368
callq 0x36240
movq -0x20(%rbp), %rax
movb $0x1, 0xe8(%rax)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x37b6c
jmp 0x6358b
leaq 0x2da8b4(%rip), %rax # 0x33dea8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x635c0
|
my_thread_init:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov bl, 1
cmp cs:my_thread_global_init_done, 1
jnz loc_635D9
lea r15, THR_KEY_mysys
mov edi, [r15]
call _pthread_getspecific
test rax, rax
jnz loc_635D7
mov edi, 1
mov esi, 0F0h
call _calloc
mov [rbp+var_20], rax
test rax, rax
jz loc_635D9
mov r14, rax
mov edi, [r15]
mov rsi, rax
call _pthread_setspecific
call _pthread_self
mov [r14+0C8h], rax
mov rdi, r14
call my_thread_init_thr_mutex
lea rax, my_thread_stack_size
lea rcx, [rbp+var_20]
add rcx, [rax]
mov [r14+0B8h], rcx
lea rbx, THR_LOCK_threads
cmp qword ptr [rbx+40h], 0
jnz short loc_635E6
lea rdi, THR_LOCK_threads
call _pthread_mutex_lock
loc_6358B:
mov rax, cs:thread_id
inc rax
mov cs:thread_id, rax
mov rcx, [rbp+var_20]
mov [rcx+0D8h], rax
mov [rcx+0D0h], rax
lea rax, THR_thread_count
inc dword ptr [rax]
mov rdi, [rbx+40h]
test rdi, rdi
jnz short loc_635ED
loc_635C0:
lea rdi, THR_LOCK_threads
call _pthread_mutex_unlock
mov rax, [rbp+var_20]
mov byte ptr [rax+0E8h], 1
loc_635D7:
xor ebx, ebx
loc_635D9:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_635E6:
call my_thread_init_cold_1
jmp short loc_6358B
loc_635ED:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_635C0
|
long long my_thread_init()
{
long long v0; // rax
unsigned int v1; // ebx
long long v2; // rax
long long v3; // r14
long long v4; // rax
long long v5; // rcx
_QWORD v7[4]; // [rsp+0h] [rbp-20h] BYREF
v7[0] = v0;
LOBYTE(v1) = 1;
if ( my_thread_global_init_done == 1 )
{
if ( pthread_getspecific(THR_KEY_mysys) )
return 0;
v2 = calloc(1LL, 240LL);
v7[0] = v2;
if ( v2 )
{
v3 = v2;
pthread_setspecific(THR_KEY_mysys, v2);
*(_QWORD *)(v3 + 200) = pthread_self();
my_thread_init_thr_mutex(v3);
*(_QWORD *)(v3 + 184) = (char *)v7 + my_thread_stack_size;
if ( THR_LOCK_threads[8] )
my_thread_init_cold_1();
else
pthread_mutex_lock(THR_LOCK_threads);
v4 = thread_id + 1;
thread_id = v4;
v5 = v7[0];
*(_QWORD *)(v7[0] + 216LL) = v4;
*(_QWORD *)(v5 + 208) = v4;
++THR_thread_count;
if ( THR_LOCK_threads[8] )
(*((void (**)(void))PSI_server + 44))();
pthread_mutex_unlock(THR_LOCK_threads);
*(_BYTE *)(v7[0] + 232LL) = 1;
return 0;
}
}
return v1;
}
|
my_thread_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV BL,0x1
CMP byte ptr [0x004bf430],0x1
JNZ 0x001635d9
LEA R15,[0x4bf434]
MOV EDI,dword ptr [R15]
CALL 0x00136b10
TEST RAX,RAX
JNZ 0x001635d7
MOV EDI,0x1
MOV ESI,0xf0
CALL 0x00136900
MOV qword ptr [RBP + -0x20],RAX
TEST RAX,RAX
JZ 0x001635d9
MOV R14,RAX
MOV EDI,dword ptr [R15]
MOV RSI,RAX
CALL 0x001363a0
CALL 0x00136700
MOV qword ptr [R14 + 0xc8],RAX
MOV RDI,R14
CALL 0x001633f7
LEA RAX,[0x43d650]
LEA RCX,[RBP + -0x20]
ADD RCX,qword ptr [RAX]
MOV qword ptr [R14 + 0xb8],RCX
LEA RBX,[0x4bf368]
CMP qword ptr [RBX + 0x40],0x0
JNZ 0x001635e6
LEA RDI,[0x4bf368]
CALL 0x00136280
LAB_0016358b:
MOV RAX,qword ptr [0x004bf438]
INC RAX
MOV qword ptr [0x004bf438],RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RCX + 0xd8],RAX
MOV qword ptr [RCX + 0xd0],RAX
LEA RAX,[0x4bf168]
INC dword ptr [RAX]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x001635ed
LAB_001635c0:
LEA RDI,[0x4bf368]
CALL 0x00136240
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0xe8],0x1
LAB_001635d7:
XOR EBX,EBX
LAB_001635d9:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001635e6:
CALL 0x00137b6c
JMP 0x0016358b
LAB_001635ed:
LEA RAX,[0x43dea8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001635c0
|
ulong my_thread_init(void)
{
void *pvVar1;
pthread_t pVar2;
long lVar3;
int8 unaff_RBX;
ulong uVar4;
void *local_28;
uVar4 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if (my_thread_global_init_done == '\x01') {
pvVar1 = pthread_getspecific(THR_KEY_mysys);
if (pvVar1 == (void *)0x0) {
pvVar1 = calloc(1,0xf0);
if (pvVar1 == (void *)0x0) goto LAB_001635d9;
local_28 = pvVar1;
pthread_setspecific(THR_KEY_mysys,pvVar1);
pVar2 = pthread_self();
*(pthread_t *)((long)pvVar1 + 200) = pVar2;
my_thread_init_thr_mutex(pvVar1);
*(long *)((long)pvVar1 + 0xb8) = (long)&local_28 + my_thread_stack_size;
if (THR_LOCK_threads._64_8_ == 0) {
pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_threads);
}
else {
my_thread_init_cold_1();
}
lVar3 = thread_id + 1;
thread_id = lVar3;
*(long *)((long)local_28 + 0xd8) = lVar3;
*(long *)((long)local_28 + 0xd0) = lVar3;
THR_thread_count = THR_thread_count + 1;
if (THR_LOCK_threads._64_8_ != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_threads);
*(int1 *)((long)local_28 + 0xe8) = 1;
}
uVar4 = 0;
}
LAB_001635d9:
return uVar4 & 0xffffffff;
}
|
|
18,535
|
aimrt::util::BufferArrayView::JoinToString[abi:cxx11]() const
|
aimrt_mujoco_sim/_deps/aimrt-src/src/interface/aimrt_core_plugin_interface/../aimrt_module_cpp_interface/util/buffer.h
|
std::string JoinToString() const {
std::string result;
result.reserve(BufferSize());
for (size_t ii = 0; ii < buffer_array_view_.len; ++ii) {
result += std::string_view(
static_cast<const char*>(buffer_array_view_.data[ii].data),
buffer_array_view_.data[ii].len);
}
return result;
}
|
O3
|
c
|
aimrt::util::BufferArrayView::JoinToString[abi:cxx11]() const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x20(%rsi), %rax
testq %rax, %rax
je 0x3c7fb
movq 0x18(%r14), %rcx
addq $0x8, %rcx
xorl %esi, %esi
addq (%rcx), %rsi
addq $0x10, %rcx
decq %rax
jne 0x3c7ed
jmp 0x3c7fd
xorl %esi, %esi
movq %rbx, %rdi
callq 0x1f0a0
cmpq $0x0, 0x20(%r14)
je 0x3c837
movl $0x8, %r12d
xorl %r13d, %r13d
movq 0x18(%r14), %rax
movq -0x8(%rax,%r12), %rsi
movq (%rax,%r12), %rdx
movq %rbx, %rdi
callq 0x1e2c0
incq %r13
addq $0x10, %r12
cmpq 0x20(%r14), %r13
jb 0x3c815
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x3c846
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x3c85c
movq (%r15), %rsi
incq %rsi
callq 0x1f250
movq %r14, %rdi
callq 0x1ffd0
|
_ZNK5aimrt4util15BufferArrayView12JoinToStringB5cxx11Ev:
push r15
push r14
push r13
push r12
push rbx
mov r14, rsi
mov rbx, rdi
lea r15, [rdi+10h]
mov [rdi], r15
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rax, [rsi+20h]
test rax, rax
jz short loc_3C7FB
mov rcx, [r14+18h]
add rcx, 8
xor esi, esi
loc_3C7ED:
add rsi, [rcx]
add rcx, 10h
dec rax
jnz short loc_3C7ED
jmp short loc_3C7FD
loc_3C7FB:
xor esi, esi
loc_3C7FD:
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
cmp qword ptr [r14+20h], 0
jz short loc_3C837
mov r12d, 8
xor r13d, r13d
loc_3C815:
mov rax, [r14+18h]
mov rsi, [rax+r12-8]
mov rdx, [rax+r12]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong)
inc r13
add r12, 10h
cmp r13, [r14+20h]
jb short loc_3C815
loc_3C837:
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short $+2
loc_3C846:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_3C85C
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3C85C:
mov rdi, r14
call __Unwind_Resume
|
long long aimrt::util::BufferArrayView::JoinToString[abi:cxx11](
long long a1,
long long a2,
long long a3,
_QWORD *a4)
{
long long v5; // rax
long long v6; // rsi
long long v7; // r12
unsigned long long v8; // r13
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v5 = *(_QWORD *)(a2 + 32);
if ( v5 )
{
a4 = (_QWORD *)(*(_QWORD *)(a2 + 24) + 8LL);
v6 = 0LL;
do
{
v6 += *a4;
a4 += 2;
--v5;
}
while ( v5 );
}
else
{
v6 = 0LL;
}
std::string::reserve(a1, v6, a3, a4);
if ( *(_QWORD *)(a2 + 32) )
{
v7 = 8LL;
v8 = 0LL;
do
{
std::string::append(a1, *(_QWORD *)(*(_QWORD *)(a2 + 24) + v7 - 8), *(_QWORD *)(*(_QWORD *)(a2 + 24) + v7));
++v8;
v7 += 16LL;
}
while ( v8 < *(_QWORD *)(a2 + 32) );
}
return a1;
}
|
JoinToString[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RSI + 0x20]
TEST RAX,RAX
JZ 0x0013c7fb
MOV RCX,qword ptr [R14 + 0x18]
ADD RCX,0x8
XOR ESI,ESI
LAB_0013c7ed:
ADD RSI,qword ptr [RCX]
ADD RCX,0x10
DEC RAX
JNZ 0x0013c7ed
JMP 0x0013c7fd
LAB_0013c7fb:
XOR ESI,ESI
LAB_0013c7fd:
MOV RDI,RBX
CALL 0x0011f0a0
CMP qword ptr [R14 + 0x20],0x0
JZ 0x0013c837
MOV R12D,0x8
XOR R13D,R13D
LAB_0013c815:
MOV RAX,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RAX + R12*0x1 + -0x8]
MOV RDX,qword ptr [RAX + R12*0x1]
LAB_0013c822:
MOV RDI,RBX
CALL 0x0011e2c0
LAB_0013c82a:
INC R13
ADD R12,0x10
CMP R13,qword ptr [R14 + 0x20]
JC 0x0013c815
LAB_0013c837:
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* aimrt::util::BufferArrayView::JoinToString[abi:cxx11]() const */
void aimrt::util::BufferArrayView::JoinToString_abi_cxx11_(void)
{
long lVar1;
long *plVar2;
long in_RSI;
ulong uVar3;
string *in_RDI;
*(string **)in_RDI = in_RDI + 0x10;
*(int8 *)(in_RDI + 8) = 0;
in_RDI[0x10] = (string)0x0;
lVar1 = *(long *)(in_RSI + 0x20);
if (lVar1 == 0) {
uVar3 = 0;
}
else {
plVar2 = (long *)(*(long *)(in_RSI + 0x18) + 8);
uVar3 = 0;
do {
uVar3 = uVar3 + *plVar2;
plVar2 = plVar2 + 2;
lVar1 = lVar1 + -1;
} while (lVar1 != 0);
}
/* try { // try from 0013c7fd to 0013c804 has its CatchHandler @ 0013c844 */
std::__cxx11::string::reserve(in_RDI,uVar3);
if (*(long *)(in_RSI + 0x20) != 0) {
lVar1 = 8;
uVar3 = 0;
do {
/* try { // try from 0013c822 to 0013c829 has its CatchHandler @ 0013c846 */
std::__cxx11::string::append
(in_RDI,*(char **)(*(long *)(in_RSI + 0x18) + -8 + lVar1),
*(ulong *)(*(long *)(in_RSI + 0x18) + lVar1));
uVar3 = uVar3 + 1;
lVar1 = lVar1 + 0x10;
} while (uVar3 < *(ulong *)(in_RSI + 0x20));
}
return;
}
|
|
18,536
|
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 0x76bfd
movq %rdi, %r15
cmpq $0x0, 0x30(%rdi)
je 0x76c19
movq %rdx, %r14
leaq 0xc0(%rsp), %r12
movq %r12, %rdi
callq 0x6206e
cmpq $0x0, 0x30(%r12)
je 0x76c49
movq 0x30(%r15), %rsi
leaq 0xa0(%rsp), %rdi
movq %r14, %rdx
callq 0x75748
leaq 0x50(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x652dc
leaq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %rdx
movq %rsp, %rcx
callq 0x6c7d4
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movups %xmm0, 0x18(%r15)
andq $0x0, 0x28(%r15)
leaq 0x50(%rsp), %rdi
callq 0x622fe
leaq 0x50(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x6ca90
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
callq 0x6f7e8
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x23790
movq %rsp, %rdi
callq 0x24158
leaq 0x50(%rsp), %rdi
callq 0x622fe
leaq 0x20(%rsp), %rdi
callq 0x6cb74
leaq 0xa0(%rsp), %rdi
callq 0x24158
leaq 0xc0(%rsp), %rdi
callq 0x622fe
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
leaq 0x3cfa9(%rip), %rsi # 0xb3bb8
movq %rax, %rdi
callq 0x23310
jmp 0x76c33
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
leaq 0x3cfa7(%rip), %rsi # 0xb3bd2
movq %rax, %rdi
callq 0x23310
movq 0x853b6(%rip), %rsi # 0xfbff0
movq 0x85317(%rip), %rdx # 0xfbf58
movq %r14, %rdi
callq 0x23e90
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
leaq 0x20(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
pushq $-0x1
popq %rdx
xorl %ecx, %ecx
callq 0x624ec
leaq 0x3cf78(%rip), %rsi # 0xb3bea
leaq 0x50(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x57b16
movb $0x1, %bpl
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x23dc0
xorl %ebp, %ebp
movq 0x85356(%rip), %rsi # 0xfbff0
movq 0x852b7(%rip), %rdx # 0xfbf58
movq %r14, %rdi
callq 0x23e90
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x24158
jmp 0x76cbe
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x20(%rsp), %rdi
callq 0x24158
testb %bpl, %bpl
jne 0x76cd2
jmp 0x76d35
movq %rax, %rbx
movq %r14, %rdi
callq 0x23660
jmp 0x76d35
jmp 0x76cde
movq %rax, %rbx
movq %r14, %rdi
callq 0x23660
jmp 0x76d42
movq %rax, %rbx
movq %rsp, %rdi
callq 0x24158
jmp 0x76cfb
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x622fe
jmp 0x76d0a
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6cb74
jmp 0x76d28
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x622fe
jmp 0x76d28
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x24158
leaq 0xc0(%rsp), %rdi
callq 0x622fe
movq %rbx, %rdi
callq 0x23f10
movq %rax, %rbx
jmp 0x76d35
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_76BFD
mov r15, rdi
cmp qword ptr [rdi+30h], 0
jz loc_76C19
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_76C49
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_76BFD:
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_76C33
loc_76C19:
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_76C33:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_76C49:
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_76CBE
mov rbx, rax
mov bpl, 1
loc_76CBE:
lea rdi, [rsp+138h+var_118]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_76CD2
jmp short loc_76D35
mov rbx, rax
loc_76CD2:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_76D35
jmp short $+2
loc_76CDE:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_76D42
mov rbx, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_76CFB
mov rbx, rax
loc_76CFB:
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_76D0A
mov rbx, rax
loc_76D0A:
lea rdi, [rsp+138h+var_118]; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
jmp short loc_76D28
mov rbx, rax
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_76D28
mov rbx, rax
loc_76D28:
lea rdi, [rsp+138h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_76D35:
lea rdi, [rsp+138h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_76D42:
mov rdi, rbx
call __Unwind_Resume
mov rbx, rax
jmp short loc_76D35
|
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 0x00176bfd
MOV R15,RDI
CMP qword ptr [RDI + 0x30],0x0
JZ 0x00176c19
MOV R14,RDX
LEA R12,[RSP + 0xc0]
MOV RDI,R12
CALL 0x0016206e
CMP qword ptr [R12 + 0x30],0x0
JZ 0x00176c49
MOV RSI,qword ptr [R15 + 0x30]
LAB_00176b34:
LEA RDI,[RSP + 0xa0]
MOV RDX,R14
CALL 0x00175748
LAB_00176b44:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xa0]
CALL 0x001652dc
LAB_00176b56:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x50]
PUSH 0x1
POP RDX
MOV RCX,RSP
CALL 0x0016c7d4
XORPS XMM0,XMM0
LEA R15,[RSP + 0x20]
MOVUPS xmmword ptr [R15 + 0x18],XMM0
AND qword ptr [R15 + 0x28],0x0
LEA RDI,[RSP + 0x50]
CALL 0x001622fe
LAB_00176b87:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xc0]
MOV RDX,R14
MOV RCX,R15
CALL 0x0016ca90
LAB_00176b9f:
MOV RDI,RSP
LEA RSI,[RSP + 0x50]
CALL 0x0016f7e8
LAB_00176bac:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00123790
LAB_00176bb7:
MOV RDI,RSP
CALL 0x00124158
LEA RDI,[RSP + 0x50]
CALL 0x001622fe
LEA RDI,[RSP + 0x20]
CALL 0x0016cb74
LEA RDI,[RSP + 0xa0]
CALL 0x00124158
LEA RDI,[RSP + 0xc0]
CALL 0x001622fe
ADD RSP,0x110
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00176bfd:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_00176c08:
LEA RSI,[0x1b3bb8]
MOV RDI,RAX
CALL 0x00123310
LAB_00176c17:
JMP 0x00176c33
LAB_00176c19:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_00176c24:
LEA RSI,[0x1b3bd2]
MOV RDI,RAX
CALL 0x00123310
LAB_00176c33:
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R14
CALL 0x00123e90
LAB_00176c49:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_00176c54:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0xc0]
PUSH -0x1
POP RDX
XOR ECX,ECX
CALL 0x001624ec
LAB_00176c6b:
LEA RSI,[0x1b3bea]
LEA RDI,[RSP + 0x50]
LEA RDX,[RSP + 0x20]
CALL 0x00157b16
MOV BPL,0x1
LAB_00176c84:
LEA RSI,[RSP + 0x50]
MOV RDI,R14
CALL 0x00123dc0
XOR EBP,EBP
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R14
CALL 0x00123e90
|
/* 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 00176c08 to 00176c16 has its CatchHandler @ 00176cde */
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 00176b34 to 00176b43 has its CatchHandler @ 00176d4a */
TemplateNode::render_abi_cxx11_(local_98,*(shared_ptr **)(param_1 + 0x30));
/* try { // try from 00176b44 to 00176b55 has its CatchHandler @ 00176d25 */
Value::Value(local_e8,(string *)local_98);
/* try { // try from 00176b56 to 00176b6a has its CatchHandler @ 00176d16 */
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 00176b87 to 00176b9e has its CatchHandler @ 00176d07 */
Value::call(local_e8,(ArgumentsValue *)local_78);
/* try { // try from 00176b9f to 00176bab has its CatchHandler @ 00176cf8 */
Value::to_str_abi_cxx11_();
/* try { // try from 00176bac to 00176bb6 has its CatchHandler @ 00176ceb */
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 00176c54 to 00176c6a has its CatchHandler @ 00176ccf */
Value::dump_abi_cxx11_((int)local_118,SUB81(local_78,0));
/* try { // try from 00176c6b to 00176c80 has its CatchHandler @ 00176cb8 */
std::operator+((char *)local_e8,(string *)"Filter must be a callable: ");
/* try { // try from 00176c84 to 00176ca8 has its CatchHandler @ 00176ca9 */
std::runtime_error::runtime_error(prVar1,(string *)local_e8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00176c24 to 00176c32 has its CatchHandler @ 00176cdc */
std::runtime_error::runtime_error(prVar1,"FilterNode.body is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
|
|
18,537
|
ma_redo_not_needed_for_page
|
eloqsql/storage/maria/ma_recovery_util.c
|
my_bool _ma_redo_not_needed_for_page(uint16 shortid, LSN lsn,
pgcache_page_no_t page,
my_bool index)
{
if (cmp_translog_addr(lsn, checkpoint_start) < 0)
{
/*
64-bit key is formed like this:
Most significant byte: 0 if data page, 1 if index page
Next 2 bytes: table's short id
Next 5 bytes: page number
*/
char llbuf[22];
uint64 file_and_page_id=
(((uint64)((index << 16) | shortid)) << 40) | page;
struct st_dirty_page *dirty_page= (struct st_dirty_page *)
my_hash_search(&all_dirty_pages,
(uchar *)&file_and_page_id, sizeof(file_and_page_id));
DBUG_PRINT("info", ("page %lld in dirty pages list: %d",
(ulonglong) page,
dirty_page != NULL));
if ((dirty_page == NULL) ||
cmp_translog_addr(lsn, dirty_page->rec_lsn) < 0)
{
tprint(tracef, ", ignoring page %s because of dirty_pages list\n",
llstr((ulonglong) page, llbuf));
return TRUE;
}
}
return FALSE;
}
|
O0
|
c
|
ma_redo_not_needed_for_page:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %cl, %al
movw %di, %cx
movq %fs:0x28, %rdi
movq %rdi, -0x8(%rbp)
movw %cx, -0x24(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movb %al, -0x39(%rbp)
movq -0x30(%rbp), %rax
subq 0xc1c704(%rip), %rax # 0xc7a378
cmpq $0x0, %rax
jge 0x5dd02
movsbl -0x39(%rbp), %eax
shll $0x10, %eax
movzwl -0x24(%rbp), %ecx
orl %ecx, %eax
cltq
shlq $0x28, %rax
orq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq 0xc1c6e8(%rip), %rdi # 0xc7a388
leaq -0x48(%rbp), %rsi
movl $0x8, %edx
callq 0xde070
movq %rax, -0x50(%rbp)
jmp 0x5dcb4
cmpq $0x0, -0x50(%rbp)
je 0x5dccd
movq -0x30(%rbp), %rax
movq -0x50(%rbp), %rcx
subq 0x8(%rcx), %rax
cmpq $0x0, %rax
jge 0x5dd00
movq 0xc1c724(%rip), %rax # 0xc7a3f8
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x14a6e0
movq -0x58(%rbp), %rdi
movq %rax, %rdx
leaq 0xf4a7a(%rip), %rsi # 0x15276d
movb $0x0, %al
callq 0x5da40
movb $0x1, -0x21(%rbp)
jmp 0x5dd06
jmp 0x5dd02
movb $0x0, -0x21(%rbp)
movb -0x21(%rbp), %al
movb %al, -0x59(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5dd27
movb -0x59(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
callq 0x2a270
nopl (%rax)
|
_ma_redo_not_needed_for_page:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, cl
mov cx, di
mov rdi, fs:28h
mov [rbp+var_8], rdi
mov [rbp+var_24], cx
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov [rbp+var_39], al
mov rax, [rbp+var_30]
sub rax, cs:checkpoint_start
cmp rax, 0
jge loc_5DD02
movsx eax, [rbp+var_39]
shl eax, 10h
movzx ecx, [rbp+var_24]
or eax, ecx
cdqe
shl rax, 28h
or rax, [rbp+var_38]
mov [rbp+var_48], rax
lea rdi, all_dirty_pages
lea rsi, [rbp+var_48]
mov edx, 8
call my_hash_search
mov [rbp+var_50], rax
jmp short $+2
loc_5DCB4:
cmp [rbp+var_50], 0
jz short loc_5DCCD
mov rax, [rbp+var_30]
mov rcx, [rbp+var_50]
sub rax, [rcx+8]
cmp rax, 0
jge short loc_5DD00
loc_5DCCD:
mov rax, cs:tracef
mov [rbp+var_58], rax
mov rdi, [rbp+var_38]
lea rsi, [rbp+var_20]
call llstr
mov rdi, [rbp+var_58]
mov rdx, rax
lea rsi, aIgnoringPageSB; ", ignoring page %s because of dirty_pag"...
mov al, 0
call tprint
mov [rbp+var_21], 1
jmp short loc_5DD06
loc_5DD00:
jmp short $+2
loc_5DD02:
mov [rbp+var_21], 0
loc_5DD06:
mov al, [rbp+var_21]
mov [rbp+var_59], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5DD27
mov al, [rbp+var_59]
add rsp, 60h
pop rbp
retn
loc_5DD27:
call ___stack_chk_fail
|
char ma_redo_not_needed_for_page(
unsigned __int16 a1,
long long a2,
long long a3,
char a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rax
long long v13; // rcx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
char v19; // [rsp+0h] [rbp-60h]
long long v20; // [rsp+8h] [rbp-58h]
long long v21; // [rsp+10h] [rbp-50h]
long long v22; // [rsp+18h] [rbp-48h] BYREF
char v23; // [rsp+27h] [rbp-39h]
long long v24; // [rsp+28h] [rbp-38h]
long long v25; // [rsp+30h] [rbp-30h]
unsigned __int16 v26; // [rsp+3Ch] [rbp-24h]
_BYTE v28[24]; // [rsp+40h] [rbp-20h] BYREF
unsigned long long v29; // [rsp+58h] [rbp-8h]
v29 = __readfsqword(0x28u);
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
if ( a2 - checkpoint_start >= 0 )
return 0;
v22 = v24 | ((long long)(v26 | (v23 << 16)) << 40);
v21 = my_hash_search(&all_dirty_pages, &v22, 8LL);
if ( v21 )
{
if ( v25 - *(_QWORD *)(v21 + 8) >= 0 )
return 0;
}
v20 = tracef;
v12 = llstr(v24, v28);
tprint(
v20,
(long long)", ignoring page %s because of dirty_pages list\n",
v12,
v13,
v14,
v15,
a5,
a6,
a7,
a8,
v16,
v17,
a11,
a12,
v19);
return 1;
}
|
_ma_redo_not_needed_for_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,CL
MOV CX,DI
MOV RDI,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RDI
MOV word ptr [RBP + -0x24],CX
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV byte ptr [RBP + -0x39],AL
MOV RAX,qword ptr [RBP + -0x30]
SUB RAX,qword ptr [0x00d7a378]
CMP RAX,0x0
JGE 0x0015dd02
MOVSX EAX,byte ptr [RBP + -0x39]
SHL EAX,0x10
MOVZX ECX,word ptr [RBP + -0x24]
OR EAX,ECX
CDQE
SHL RAX,0x28
OR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],RAX
LEA RDI,[0xd7a388]
LEA RSI,[RBP + -0x48]
MOV EDX,0x8
CALL 0x001de070
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0015dcb4
LAB_0015dcb4:
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0015dccd
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,qword ptr [RCX + 0x8]
CMP RAX,0x0
JGE 0x0015dd00
LAB_0015dccd:
MOV RAX,qword ptr [0x00d7a3f8]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x20]
CALL 0x0024a6e0
MOV RDI,qword ptr [RBP + -0x58]
MOV RDX,RAX
LEA RSI,[0x25276d]
MOV AL,0x0
CALL 0x0015da40
MOV byte ptr [RBP + -0x21],0x1
JMP 0x0015dd06
LAB_0015dd00:
JMP 0x0015dd02
LAB_0015dd02:
MOV byte ptr [RBP + -0x21],0x0
LAB_0015dd06:
MOV AL,byte ptr [RBP + -0x21]
MOV byte ptr [RBP + -0x59],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015dd27
MOV AL,byte ptr [RBP + -0x59]
ADD RSP,0x60
POP RBP
RET
LAB_0015dd27:
CALL 0x0012a270
|
int8
_ma_redo_not_needed_for_page(int2 param_1,long param_2,ulong param_3,int1 param_4)
{
int8 uVar1;
long lVar2;
int8 uVar3;
long in_FS_OFFSET;
ulong local_50;
int1 local_41;
ulong local_40;
long local_38;
int2 local_2c;
int1 local_29;
int1 local_28 [24];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_41 = param_4;
local_40 = param_3;
local_38 = param_2;
local_2c = param_1;
if (param_2 - checkpoint_start < 0) {
local_50 = (long)(int)CONCAT12(param_4,param_1) << 0x28 | param_3;
lVar2 = my_hash_search(all_dirty_pages,&local_50,8);
uVar1 = tracef;
if ((lVar2 == 0) || (local_38 - *(long *)(lVar2 + 8) < 0)) {
uVar3 = llstr(local_40,local_28);
tprint(uVar1,", ignoring page %s because of dirty_pages list\n",uVar3);
local_29 = 1;
goto LAB_0015dd06;
}
}
local_29 = 0;
LAB_0015dd06:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_29);
}
|
|
18,538
|
ftxui::MenuOption::Vertical()
|
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/component_options.cpp
|
MenuOption MenuOption::Vertical() {
MenuOption option;
option.entries_option.transform = [](const EntryState& state) {
Element e = text((state.active ? "> " : " ") + state.label); // NOLINT
if (state.focused) {
e |= inverted;
}
if (state.active) {
e |= bold;
}
if (!state.focused && !state.active) {
e |= dim;
}
return e;
};
return option;
}
|
O3
|
cpp
|
ftxui::MenuOption::Vertical():
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorl %r15d, %r15d
movb %r15b, 0x18(%rdi)
leaq 0x20(%rdi), %r14
movb %r15b, 0x20(%rdi)
addq $0x21, %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl $0x0, 0x10(%rbx)
movl $0xf, %esi
callq 0x20b8a
leaq 0x25(%rbx), %rdi
movl $0x8, %esi
callq 0x20b8a
movq %r15, 0x38(%rbx)
leaq 0x2a99(%rip), %rax # 0x369aa
movq %rax, 0x30(%rbx)
leaq 0x28d2(%rip), %rcx # 0x367ee
movq %rcx, 0x48(%rbx)
leaq 0x28cd(%rip), %rdx # 0x367f4
movq %rdx, 0x40(%rbx)
movq %r15, 0x58(%rbx)
movq %rax, 0x50(%rbx)
movq %rcx, 0x68(%rbx)
movq %rdx, 0x60(%rbx)
movaps 0xb15e(%rip), %xmm0 # 0x3f0a0
movups %xmm0, 0x70(%rbx)
leaq 0x80(%rbx), %rdi
callq 0x364fc
movl $0x1, 0x128(%rbx)
leaq 0x130(%rbx), %rdi
movb $0x0, 0x1d8(%rbx)
movl $0xa4, %edx
xorl %esi, %esi
callq 0xb200
movups 0xa8(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%rbx)
movq 0xb8(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0xc60(%rip), %rcx # 0x34bfe
movq %rcx, 0xb8(%rbx)
movq 0xc0(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0xa3a(%rip), %rcx # 0x349f2
movq %rcx, 0xc0(%rbx)
testq %rax, %rax
je 0x33fd1
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x1049a
movq %rax, %rbx
movq %r14, %rdi
callq 0x36602
movq %rbx, %rdi
callq 0xb780
nop
|
_ZN5ftxui10MenuOption8VerticalEv:
push r15
push r14
push rbx
sub rsp, 20h
mov rbx, rdi
xor r15d, r15d
mov [rdi+18h], r15b
lea r14, [rdi+20h]
mov [rdi+20h], r15b
add rdi, 21h ; '!'
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov dword ptr [rbx+10h], 0
mov esi, 0Fh
call _ZN5ftxui5ColorC2ENS0_9Palette16E; ftxui::Color::Color(ftxui::Color::Palette16)
lea rdi, [rbx+25h]
mov esi, 8
call _ZN5ftxui5ColorC2ENS0_9Palette16E; ftxui::Color::Color(ftxui::Color::Palette16)
mov [rbx+38h], r15
lea rax, _ZN5ftxui9animation6easing14QuadraticInOutEf; ftxui::animation::easing::QuadraticInOut(float)
mov [rbx+30h], rax
lea rcx, _ZNSt17_Function_handlerIFffEPS0_E9_M_invokeERKSt9_Any_dataOf; std::_Function_handler<float ()(float),float (*)(float)>::_M_invoke(std::_Any_data const&,float &&)
mov [rbx+48h], rcx
lea rdx, _ZNSt17_Function_handlerIFffEPS0_E10_M_managerERSt9_Any_dataRKS3_St18_Manager_operation; std::_Function_handler<float ()(float),float (*)(float)>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rbx+40h], rdx
mov [rbx+58h], r15
mov [rbx+50h], rax
mov [rbx+68h], rcx
mov [rbx+60h], rdx
movaps xmm0, cs:xmmword_3F0A0
movups xmmword ptr [rbx+70h], xmm0
lea rdi, [rbx+80h]; this
call _ZN5ftxui15MenuEntryOptionC2Ev; ftxui::MenuEntryOption::MenuEntryOption(void)
mov dword ptr [rbx+128h], 1
lea rdi, [rbx+130h]
mov byte ptr [rbx+1D8h], 0
mov edx, 0A4h
xor esi, esi
call _memset
movups xmm0, xmmword ptr [rbx+0A8h]
movaps [rsp+38h+var_38], xmm0
xorps xmm0, xmm0
movups xmmword ptr [rbx+0A8h], xmm0
mov rax, [rbx+0B8h]
mov [rsp+38h+var_28], rax
lea rcx, _ZNSt17_Function_handlerIFSt10shared_ptrIN5ftxui4NodeEERKNS1_10EntryStateEEZNS1_10MenuOption8VerticalEvE3$_0E10_M_managerERSt9_Any_dataRKSB_St18_Manager_operation; std::_Function_handler<std::shared_ptr<ftxui::Node> ()(ftxui::EntryState const&),ftxui::MenuOption::Vertical(void)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rbx+0B8h], rcx
mov rcx, [rbx+0C0h]
mov [rsp+38h+var_20], rcx
lea rcx, _ZNSt17_Function_handlerIFSt10shared_ptrIN5ftxui4NodeEERKNS1_10EntryStateEEZNS1_10MenuOption8VerticalEvE3$_0E9_M_invokeERKSt9_Any_dataS6_; std::_Function_handler<std::shared_ptr<ftxui::Node> ()(ftxui::EntryState const&),ftxui::MenuOption::Vertical(void)::$_0>::_M_invoke(std::_Any_data const&,ftxui::EntryState const&)
mov [rbx+0C0h], rcx
test rax, rax
jz short loc_33FD1
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_33FD1:
mov rax, rbx
add rsp, 20h
pop rbx
pop r14
pop r15
retn
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, r14; this
call _ZN5ftxui15UnderlineOptionD2Ev; ftxui::UnderlineOption::~UnderlineOption()
mov rdi, rbx
call __Unwind_Resume
|
ftxui::MenuOption * ftxui::MenuOption::Vertical(ftxui::MenuOption *this)
{
void ( *v1)(__int128 *, __int128 *, long long); // rax
__int128 v3; // [rsp+0h] [rbp-38h] BYREF
void ( *v4)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-28h]
long long v5; // [rsp+18h] [rbp-20h]
*((_BYTE *)this + 24) = 0;
*((_BYTE *)this + 32) = 0;
*(_OWORD *)this = 0LL;
*((_DWORD *)this + 4) = 0;
ftxui::Color::Color((long long)this + 33, 15);
ftxui::Color::Color((long long)this + 37, 8);
*((_QWORD *)this + 7) = 0LL;
*((_QWORD *)this + 6) = ftxui::animation::easing::QuadraticInOut;
*((_QWORD *)this + 9) = std::_Function_handler<float ()(float),float (*)(float)>::_M_invoke;
*((_QWORD *)this + 8) = std::_Function_handler<float ()(float),float (*)(float)>::_M_manager;
*((_QWORD *)this + 11) = 0LL;
*((_QWORD *)this + 10) = ftxui::animation::easing::QuadraticInOut;
*((_QWORD *)this + 13) = std::_Function_handler<float ()(float),float (*)(float)>::_M_invoke;
*((_QWORD *)this + 12) = std::_Function_handler<float ()(float),float (*)(float)>::_M_manager;
*((_OWORD *)this + 7) = xmmword_3F0A0;
ftxui::MenuEntryOption::MenuEntryOption((ftxui::MenuOption *)((char *)this + 128));
*((_DWORD *)this + 74) = 1;
*((_BYTE *)this + 472) = 0;
memset((char *)this + 304, 0LL, 164LL);
v3 = *(_OWORD *)((char *)this + 168);
*(_OWORD *)((char *)this + 168) = 0LL;
v4 = (void ( *)(__int128 *, __int128 *, long long))*((_QWORD *)this + 23);
v1 = v4;
*((_QWORD *)this + 23) = std::_Function_handler<std::shared_ptr<ftxui::Node> ()(ftxui::EntryState const&),ftxui::MenuOption::Vertical(void)::$_0>::_M_manager;
v5 = *((_QWORD *)this + 24);
*((_QWORD *)this + 24) = std::_Function_handler<std::shared_ptr<ftxui::Node> ()(ftxui::EntryState const&),ftxui::MenuOption::Vertical(void)::$_0>::_M_invoke;
if ( v1 )
v1(&v3, &v3, 3LL);
return this;
}
|
Vertical:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
XOR R15D,R15D
MOV byte ptr [RDI + 0x18],R15B
LEA R14,[RDI + 0x20]
MOV byte ptr [RDI + 0x20],R15B
ADD RDI,0x21
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV dword ptr [RBX + 0x10],0x0
MOV ESI,0xf
CALL 0x00120b8a
LEA RDI,[RBX + 0x25]
MOV ESI,0x8
CALL 0x00120b8a
MOV qword ptr [RBX + 0x38],R15
LEA RAX,[0x1369aa]
MOV qword ptr [RBX + 0x30],RAX
LEA RCX,[0x1367ee]
MOV qword ptr [RBX + 0x48],RCX
LEA RDX,[0x1367f4]
MOV qword ptr [RBX + 0x40],RDX
MOV qword ptr [RBX + 0x58],R15
MOV qword ptr [RBX + 0x50],RAX
MOV qword ptr [RBX + 0x68],RCX
MOV qword ptr [RBX + 0x60],RDX
MOVAPS XMM0,xmmword ptr [0x0013f0a0]
MOVUPS xmmword ptr [RBX + 0x70],XMM0
LEA RDI,[RBX + 0x80]
LAB_00133f4d:
CALL 0x001364fc
LAB_00133f52:
MOV dword ptr [RBX + 0x128],0x1
LEA RDI,[RBX + 0x130]
MOV byte ptr [RBX + 0x1d8],0x0
MOV EDX,0xa4
XOR ESI,ESI
CALL 0x0010b200
MOVUPS XMM0,xmmword ptr [RBX + 0xa8]
MOVAPS xmmword ptr [RSP],XMM0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0xa8],XMM0
MOV RAX,qword ptr [RBX + 0xb8]
MOV qword ptr [RSP + 0x10],RAX
LEA RCX,[0x134bfe]
MOV qword ptr [RBX + 0xb8],RCX
MOV RCX,qword ptr [RBX + 0xc0]
MOV qword ptr [RSP + 0x18],RCX
LEA RCX,[0x1349f2]
MOV qword ptr [RBX + 0xc0],RCX
TEST RAX,RAX
JZ 0x00133fd1
LAB_00133fc4:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00133fd1:
MOV RAX,RBX
ADD RSP,0x20
POP RBX
POP R14
POP R15
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* ftxui::MenuOption::Vertical() */
MenuOption * __thiscall ftxui::MenuOption::Vertical(MenuOption *this)
{
int8 uVar1;
int8 local_38;
int8 uStack_30;
code *local_28;
int8 local_20;
this[0x18] = (MenuOption)0x0;
this[0x20] = (MenuOption)0x0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int4 *)(this + 0x10) = 0;
Color::Color((Color *)(this + 0x21),0xf);
Color::Color((Color *)(this + 0x25));
*(int8 *)(this + 0x38) = 0;
*(code **)(this + 0x30) = animation::easing::QuadraticInOut;
*(code **)(this + 0x48) = std::_Function_handler<float(float),float(*)(float)>::_M_invoke;
*(code **)(this + 0x40) = std::_Function_handler<float(float),float(*)(float)>::_M_manager;
*(int8 *)(this + 0x58) = 0;
*(code **)(this + 0x50) = animation::easing::QuadraticInOut;
*(code **)(this + 0x68) = std::_Function_handler<float(float),float(*)(float)>::_M_invoke;
*(code **)(this + 0x60) = std::_Function_handler<float(float),float(*)(float)>::_M_manager;
uVar1 = _UNK_0013f0a8;
*(int8 *)(this + 0x70) = _DAT_0013f0a0;
*(int8 *)(this + 0x78) = uVar1;
/* try { // try from 00133f4d to 00133f51 has its CatchHandler @ 00133fe6 */
MenuEntryOption::MenuEntryOption((MenuEntryOption *)(this + 0x80));
*(int4 *)(this + 0x128) = 1;
this[0x1d8] = (MenuOption)0x0;
memset(this + 0x130,0,0xa4);
local_38 = *(int8 *)(this + 0xa8);
uStack_30 = *(int8 *)(this + 0xb0);
*(int8 *)(this + 0xa8) = 0;
*(int8 *)(this + 0xb0) = 0;
local_28 = *(code **)(this + 0xb8);
*(code **)(this + 0xb8) =
std::
_Function_handler<std::shared_ptr<ftxui::Node>(ftxui::EntryState_const&),ftxui::MenuOption::Vertical()::$_0>
::_M_manager;
local_20 = *(int8 *)(this + 0xc0);
*(code **)(this + 0xc0) =
std::
_Function_handler<std::shared_ptr<ftxui::Node>(ftxui::EntryState_const&),ftxui::MenuOption::Vertical()::$_0>
::_M_invoke;
if (local_28 != (code *)0x0) {
/* try { // try from 00133fc4 to 00133fd0 has its CatchHandler @ 00133fde */
(*local_28)(&local_38,&local_38,3);
}
return this;
}
|
|
18,539
|
yoyo::LocationInfo::LocationInfo(yoyo::LocationInfo&&)
|
isyoCode[P]yoyologger/test/../src/logger.hpp
|
LocationInfo(LocationInfo&&) = default;
|
O3
|
cpp
|
yoyo::LocationInfo::LocationInfo(yoyo::LocationInfo&&):
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
leaq 0x20(%rdi), %rcx
movq %rcx, 0x10(%rdi)
movq 0x10(%rsi), %rdx
leaq 0x20(%rsi), %rax
cmpq %rax, %rdx
je 0x5046
movq %rdx, 0x10(%rdi)
movq (%rax), %rcx
movq %rcx, 0x20(%rdi)
jmp 0x504c
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x18(%rsi), %rcx
movq %rcx, 0x18(%rdi)
movq %rax, 0x10(%rsi)
movq $0x0, 0x18(%rsi)
movb $0x0, 0x20(%rsi)
leaq 0x40(%rdi), %rcx
movq %rcx, 0x30(%rdi)
movq 0x30(%rsi), %rdx
leaq 0x40(%rsi), %rax
cmpq %rax, %rdx
je 0x5086
movq %rdx, 0x30(%rdi)
movq (%rax), %rcx
movq %rcx, 0x40(%rdi)
jmp 0x508c
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x38(%rsi), %rcx
movq %rcx, 0x38(%rdi)
movq %rax, 0x30(%rsi)
movq $0x0, 0x38(%rsi)
movb $0x0, 0x40(%rsi)
retq
nop
|
_ZN4yoyo12LocationInfoC2EOS0_:
movups xmm0, xmmword ptr [rsi]
movups xmmword ptr [rdi], xmm0
lea rcx, [rdi+20h]
mov [rdi+10h], rcx
mov rdx, [rsi+10h]
lea rax, [rsi+20h]
cmp rdx, rax
jz short loc_5046
mov [rdi+10h], rdx
mov rcx, [rax]
mov [rdi+20h], rcx
jmp short loc_504C
loc_5046:
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rcx], xmm0
loc_504C:
mov rcx, [rsi+18h]
mov [rdi+18h], rcx
mov [rsi+10h], rax
mov qword ptr [rsi+18h], 0
mov byte ptr [rsi+20h], 0
lea rcx, [rdi+40h]
mov [rdi+30h], rcx
mov rdx, [rsi+30h]
lea rax, [rsi+40h]
cmp rdx, rax
jz short loc_5086
mov [rdi+30h], rdx
mov rcx, [rax]
mov [rdi+40h], rcx
jmp short loc_508C
loc_5086:
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rcx], xmm0
loc_508C:
mov rcx, [rsi+38h]
mov [rdi+38h], rcx
mov [rsi+30h], rax
mov qword ptr [rsi+38h], 0
mov byte ptr [rsi+40h], 0
retn
|
_OWORD * yoyo::LocationInfo::LocationInfo(long long a1, long long a2)
{
long long v2; // rdx
_OWORD *v3; // rax
long long v4; // rdx
_OWORD *result; // rax
*(_OWORD *)a1 = *(_OWORD *)a2;
*(_QWORD *)(a1 + 16) = a1 + 32;
v2 = *(_QWORD *)(a2 + 16);
v3 = (_OWORD *)(a2 + 32);
if ( v2 == a2 + 32 )
{
*(_OWORD *)(a1 + 32) = *v3;
}
else
{
*(_QWORD *)(a1 + 16) = v2;
*(_QWORD *)(a1 + 32) = *(_QWORD *)v3;
}
*(_QWORD *)(a1 + 24) = *(_QWORD *)(a2 + 24);
*(_QWORD *)(a2 + 16) = v3;
*(_QWORD *)(a2 + 24) = 0LL;
*(_BYTE *)(a2 + 32) = 0;
*(_QWORD *)(a1 + 48) = a1 + 64;
v4 = *(_QWORD *)(a2 + 48);
result = (_OWORD *)(a2 + 64);
if ( v4 == a2 + 64 )
{
*(_OWORD *)(a1 + 64) = *result;
}
else
{
*(_QWORD *)(a1 + 48) = v4;
*(_QWORD *)(a1 + 64) = *(_QWORD *)result;
}
*(_QWORD *)(a1 + 56) = *(_QWORD *)(a2 + 56);
*(_QWORD *)(a2 + 48) = result;
*(_QWORD *)(a2 + 56) = 0LL;
*(_BYTE *)(a2 + 64) = 0;
return result;
}
|
LocationInfo:
MOVUPS XMM0,xmmword ptr [RSI]
MOVUPS xmmword ptr [RDI],XMM0
LEA RCX,[RDI + 0x20]
MOV qword ptr [RDI + 0x10],RCX
MOV RDX,qword ptr [RSI + 0x10]
LEA RAX,[RSI + 0x20]
CMP RDX,RAX
JZ 0x00105046
MOV qword ptr [RDI + 0x10],RDX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RDI + 0x20],RCX
JMP 0x0010504c
LAB_00105046:
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RCX],XMM0
LAB_0010504c:
MOV RCX,qword ptr [RSI + 0x18]
MOV qword ptr [RDI + 0x18],RCX
MOV qword ptr [RSI + 0x10],RAX
MOV qword ptr [RSI + 0x18],0x0
MOV byte ptr [RSI + 0x20],0x0
LEA RCX,[RDI + 0x40]
MOV qword ptr [RDI + 0x30],RCX
MOV RDX,qword ptr [RSI + 0x30]
LEA RAX,[RSI + 0x40]
CMP RDX,RAX
JZ 0x00105086
MOV qword ptr [RDI + 0x30],RDX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RDI + 0x40],RCX
JMP 0x0010508c
LAB_00105086:
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RCX],XMM0
LAB_0010508c:
MOV RCX,qword ptr [RSI + 0x38]
MOV qword ptr [RDI + 0x38],RCX
MOV qword ptr [RSI + 0x30],RAX
MOV qword ptr [RSI + 0x38],0x0
MOV byte ptr [RSI + 0x40],0x0
RET
|
/* yoyo::LocationInfo::LocationInfo(yoyo::LocationInfo&&) */
void __thiscall yoyo::LocationInfo::LocationInfo(LocationInfo *this,LocationInfo *param_1)
{
LocationInfo *pLVar1;
int8 uVar2;
uVar2 = *(int8 *)(param_1 + 8);
*(int8 *)this = *(int8 *)param_1;
*(int8 *)(this + 8) = uVar2;
*(LocationInfo **)(this + 0x10) = this + 0x20;
pLVar1 = param_1 + 0x20;
if (*(LocationInfo **)(param_1 + 0x10) == pLVar1) {
uVar2 = *(int8 *)(param_1 + 0x28);
*(int8 *)(this + 0x20) = *(int8 *)pLVar1;
*(int8 *)(this + 0x28) = uVar2;
}
else {
*(LocationInfo **)(this + 0x10) = *(LocationInfo **)(param_1 + 0x10);
*(int8 *)(this + 0x20) = *(int8 *)pLVar1;
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x18);
*(LocationInfo **)(param_1 + 0x10) = pLVar1;
*(int8 *)(param_1 + 0x18) = 0;
param_1[0x20] = (LocationInfo)0x0;
*(LocationInfo **)(this + 0x30) = this + 0x40;
pLVar1 = param_1 + 0x40;
if (*(LocationInfo **)(param_1 + 0x30) == pLVar1) {
uVar2 = *(int8 *)(param_1 + 0x48);
*(int8 *)(this + 0x40) = *(int8 *)pLVar1;
*(int8 *)(this + 0x48) = uVar2;
}
else {
*(LocationInfo **)(this + 0x30) = *(LocationInfo **)(param_1 + 0x30);
*(int8 *)(this + 0x40) = *(int8 *)pLVar1;
}
*(int8 *)(this + 0x38) = *(int8 *)(param_1 + 0x38);
*(LocationInfo **)(param_1 + 0x30) = pLVar1;
*(int8 *)(param_1 + 0x38) = 0;
param_1[0x40] = (LocationInfo)0x0;
return;
}
|
|
18,540
|
Binary_string::free()
|
eloqsql/sql/sql_string.h
|
inline void free()
{
free_buffer();
/*
We have to clear the values as some Strings, like in Field, are
reused after free(). Because of this we cannot use MEM_UNDEFINED() here.
*/
Ptr= 0;
str_length= 0;
Alloced_length= extra_alloc= 0;
}
|
O0
|
c
|
Binary_string::free():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x66f30
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, 0x8(%rax)
movl $0x0, 0x10(%rax)
movl $0x0, 0xc(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
|
_ZN13Binary_string4freeEv:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN13Binary_string11free_bufferEv; Binary_string::free_buffer(void)
mov rax, [rbp+var_10]
mov qword ptr [rax], 0
mov dword ptr [rax+8], 0
mov dword ptr [rax+10h], 0
mov dword ptr [rax+0Ch], 0
add rsp, 10h
pop rbp
retn
|
Binary_string * Binary_string::free(Binary_string *this)
{
Binary_string *result; // rax
Binary_string::free_buffer(this);
result = this;
*(_QWORD *)this = 0LL;
*((_DWORD *)this + 2) = 0;
*((_DWORD *)this + 4) = 0;
*((_DWORD *)this + 3) = 0;
return result;
}
|
free:
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 0x00166f30
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],0x0
MOV dword ptr [RAX + 0x8],0x0
MOV dword ptr [RAX + 0x10],0x0
MOV dword ptr [RAX + 0xc],0x0
ADD RSP,0x10
POP RBP
RET
|
/* Binary_string::free() */
void __thiscall Binary_string::free(Binary_string *this)
{
free_buffer(this);
*(int8 *)this = 0;
*(int4 *)(this + 8) = 0;
*(int4 *)(this + 0x10) = 0;
*(int4 *)(this + 0xc) = 0;
return;
}
|
|
18,541
|
ma_write_abort_block_record
|
eloqsql/storage/maria/ma_blockrec.c
|
my_bool _ma_write_abort_block_record(MARIA_HA *info)
{
my_bool res= 0;
MARIA_BITMAP_BLOCKS *blocks= &info->cur_row.insert_blocks;
MARIA_BITMAP_BLOCK *block, *end;
LSN lsn= LSN_IMPOSSIBLE;
MARIA_SHARE *share= info->s;
DBUG_ENTER("_ma_write_abort_block_record");
_ma_bitmap_lock(share); /* Lock bitmap from other insert threads */
if (delete_head_or_tail(info,
ma_recordpos_to_page(info->cur_row.lastpos),
ma_recordpos_to_dir_entry(info->cur_row.lastpos), 1,
0))
res= 1;
for (block= blocks->block + 1, end= block + blocks->count - 1; block < end;
block++)
{
if (block->used & BLOCKUSED_USED)
{
if (block->used & BLOCKUSED_TAIL)
{
/*
block->page_count is set to the tail directory entry number in
write_block_record()
*/
if (delete_head_or_tail(info, block->page,
block->page_count & ~TAIL_BIT,
0, 0))
res= 1;
}
else
{
if (free_full_page_range(info, block->page, block->page_count))
res= 1;
}
}
}
_ma_bitmap_unlock(share);
if (share->now_transactional)
{
/*
Write clr to mark end of aborted row insert.
The above delete_head_or_tail() calls will only log redo, not undo.
The undo just before the row insert is stored in row->orig_undo_lsn.
When applying undo's, we can skip all undo records between current
lsn and row->orig_undo_lsn as logically things are as before the
attempted insert.
*/
if (_ma_write_clr(info, info->cur_row.orig_undo_lsn,
LOGREC_UNDO_ROW_INSERT,
share->calc_checksum != 0,
(ha_checksum) 0 - info->cur_row.checksum,
&lsn, (void*) 0))
res= 1;
}
_ma_unpin_all_pages_and_finalize_row(info, lsn);
DBUG_RETURN(res);
}
|
O3
|
c
|
ma_write_abort_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x70(%rbp)
movq (%rdi), %rdi
movq %rdi, -0x60(%rbp)
callq 0x3cf03
movq 0x98(%r15), %rsi
movzbl %sil, %edx
shrq $0x8, %rsi
movq %r15, %rdi
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x355cd
testb %al, %al
setne %r14b
movl 0x88(%r15), %eax
cmpq $0x2, %rax
movq %r15, -0x48(%rbp)
jb 0x35521
movq 0x80(%r15), %rbx
leaq (%rax,%rax,2), %rax
leaq (%rbx,%rax,8), %rcx
addq $0x18, %rbx
leaq 0x470(%r15), %rax
movq %rax, -0x68(%rbp)
movq %rcx, -0x58(%rbp)
movzbl 0x14(%rbx), %eax
testb $0x1, %al
je 0x354ea
movq (%rbx), %r12
movl 0x8(%rbx), %r13d
movzbl %r14b, %r14d
testb $0x4, %al
jne 0x353db
movl %r14d, -0x4c(%rbp)
movq (%r15), %r14
leaq (%r12,%r13), %rax
movl 0x7bc(%r14), %ecx
imulq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, 0x40(%r14)
sete %al
movl %r13d, %ecx
subl %eax, %ecx
je 0x35405
movq 0x600(%r14), %rdi
movq -0x68(%rbp), %rsi
movq %r12, %rdx
movl $0x4, %r8d
movl $0x1, %r9d
callq 0x4d664
testb %al, %al
setne %al
movl %eax, -0x40(%rbp)
jmp 0x3540c
andl $0xffff7fff, %r13d # imm = 0xFFFF7FFF
movq %r15, %rdi
movq %r12, %rsi
movl %r13d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x355cd
testb %al, %al
movl $0x1, %eax
cmovnel %eax, %r14d
jmp 0x354e6
movl $0x0, -0x40(%rbp)
cmpb $0x0, 0x7e7(%r14)
je 0x3548c
movw $0x1, -0x39(%rbp)
movl %r12d, -0x37(%rbp)
movq %r12, %rax
shrq $0x20, %rax
movb %al, -0x33(%rbp)
movw %r13w, -0x32(%rbp)
leaq -0x3b(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0xb, -0x88(%rbp)
movq 0x8(%r15), %rdx
subq $0x8, %rsp
leaq -0x78(%rbp), %rdi
movl $0x8, %esi
movq %r15, %rcx
movl $0xb, %r8d
movl $0x3, %r9d
pushq $0x0
pushq %rax
leaq -0xb0(%rbp), %rax
pushq %rax
callq 0x2b425
addq $0x20, %rsp
testb %al, %al
movl -0x40(%rbp), %ecx
movzbl %cl, %ecx
movl $0x1, %eax
cmovnel %eax, %ecx
movl %ecx, -0x40(%rbp)
leaq 0xa98(%r14), %r15
cmpq $0x0, 0xad8(%r14)
jne 0x354f9
movq %r15, %rdi
callq 0x2a230
leaq 0xa10(%r14), %rsi
movq -0x48(%rbp), %rdi
movq %r12, %rdx
movl %r13d, %ecx
callq 0x3e3c2
movl %eax, %r12d
movq 0xad8(%r14), %rdi
testq %rdi, %rdi
jne 0x3550f
movq %r15, %rdi
callq 0x2a1f0
orb -0x40(%rbp), %r12b
movl -0x4c(%rbp), %r14d
je 0x354e2
movl $0x1, %r14d
movq -0x48(%rbp), %r15
movq -0x58(%rbp), %rcx
addq $0x18, %rbx
cmpq %rcx, %rbx
jb 0x35371
jmp 0x35521
movq %r15, %rdi
leaq 0xc37be(%rip), %rsi # 0xf8cc1
movl $0xa23, %edx # imm = 0xA23
callq 0x312ea
jmp 0x354a5
leaq 0x379502(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x354ca
movq -0x60(%rbp), %rbx
movq %rbx, %rdi
callq 0x3d004
xorl %r8d, %r8d
cmpb $0x0, 0x7e7(%rbx)
je 0x3558a
xorl %ecx, %ecx
cmpq $0x0, 0x6a8(%rbx)
movq 0xb8(%r15), %rsi
setne %cl
subl 0xb0(%r15), %r8d
subq $0x8, %rsp
leaq -0x70(%rbp), %r15
movq -0x48(%rbp), %rdi
movl $0x12, %edx
movq %r15, %r9
pushq $0x0
callq 0x60575
addq $0x10, %rsp
testb %al, %al
movzbl %r14b, %eax
movl $0x1, %r14d
cmovel %eax, %r14d
movq (%r15), %r8
movq -0x48(%rbp), %r15
movq %r15, %rdi
movq %r8, %rsi
callq 0x604f8
movq 0x8(%r15), %rax
movq $0x0, 0x90(%rax)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x355c8
movl %r14d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a280
|
_ma_write_abort_block_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_70], 0
mov rdi, [rdi]
mov [rbp+var_60], rdi
call _ma_bitmap_lock
mov rsi, [r15+98h]
movzx edx, sil
shr rsi, 8
mov rdi, r15
mov ecx, 1
xor r8d, r8d
call delete_head_or_tail
test al, al
setnz r14b
mov eax, [r15+88h]
cmp rax, 2
mov [rbp+var_48], r15
jb loc_35521
mov rbx, [r15+80h]
lea rax, [rax+rax*2]
lea rcx, [rbx+rax*8]
add rbx, 18h
lea rax, [r15+470h]
mov [rbp+var_68], rax
mov [rbp+var_58], rcx
loc_35371:
movzx eax, byte ptr [rbx+14h]
test al, 1
jz loc_354EA
mov r12, [rbx]
mov r13d, [rbx+8]
movzx r14d, r14b
test al, 4
jnz short loc_353DB
mov [rbp+var_4C], r14d
mov r14, [r15]
lea rax, [r12+r13]
mov ecx, [r14+7BCh]
imul rcx, rax
xor eax, eax
cmp [r14+40h], rcx
setz al
mov ecx, r13d
sub ecx, eax
jz short loc_35405
mov rdi, [r14+600h]
mov rsi, [rbp+var_68]
mov rdx, r12
mov r8d, 4
mov r9d, 1
call pagecache_delete_pages
test al, al
setnz al
mov [rbp+var_40], eax
jmp short loc_3540C
loc_353DB:
and r13d, 0FFFF7FFFh
mov rdi, r15
mov rsi, r12
mov edx, r13d
xor ecx, ecx
xor r8d, r8d
call delete_head_or_tail
test al, al
mov eax, 1
cmovnz r14d, eax
jmp loc_354E6
loc_35405:
mov [rbp+var_40], 0
loc_3540C:
cmp byte ptr [r14+7E7h], 0
jz short loc_3548C
mov [rbp+var_39], 1
mov [rbp+var_37], r12d
mov rax, r12
shr rax, 20h
mov [rbp+var_33], al
mov [rbp+var_32], r13w
lea rax, [rbp+var_3B]
mov [rbp+var_90], rax
mov [rbp+var_88], 0Bh
mov rdx, [r15+8]
sub rsp, 8
lea rdi, [rbp+var_78]
mov esi, 8
mov rcx, r15
mov r8d, 0Bh
mov r9d, 3
push 0
push rax
lea rax, [rbp+var_B0]
push rax
call translog_write_record
add rsp, 20h
test al, al
mov ecx, [rbp+var_40]
movzx ecx, cl
mov eax, 1
cmovnz ecx, eax
mov [rbp+var_40], ecx
loc_3548C:
lea r15, [r14+0A98h]
cmp qword ptr [r14+0AD8h], 0
jnz short loc_354F9
mov rdi, r15
call _pthread_mutex_lock
loc_354A5:
lea rsi, [r14+0A10h]
mov rdi, [rbp+var_48]
mov rdx, r12
mov ecx, r13d
call _ma_bitmap_reset_full_page_bits
mov r12d, eax
mov rdi, [r14+0AD8h]
test rdi, rdi
jnz short loc_3550F
loc_354CA:
mov rdi, r15
call _pthread_mutex_unlock
or r12b, byte ptr [rbp+var_40]
mov r14d, [rbp+var_4C]
jz short loc_354E2
mov r14d, 1
loc_354E2:
mov r15, [rbp+var_48]
loc_354E6:
mov rcx, [rbp+var_58]
loc_354EA:
add rbx, 18h
cmp rbx, rcx
jb loc_35371
jmp short loc_35521
loc_354F9:
mov rdi, r15
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0A23h
call psi_mutex_lock
jmp short loc_354A5
loc_3550F:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_354CA
loc_35521:
mov rbx, [rbp+var_60]
mov rdi, rbx
call _ma_bitmap_unlock
xor r8d, r8d
cmp byte ptr [rbx+7E7h], 0
jz short loc_3558A
xor ecx, ecx
cmp qword ptr [rbx+6A8h], 0
mov rsi, [r15+0B8h]
setnz cl
sub r8d, [r15+0B0h]
sub rsp, 8
lea r15, [rbp+var_70]
mov rdi, [rbp+var_48]
mov edx, 12h
mov r9, r15
push 0
call _ma_write_clr
add rsp, 10h
test al, al
movzx eax, r14b
mov r14d, 1
cmovz r14d, eax
mov r8, [r15]
mov r15, [rbp+var_48]
loc_3558A:
mov rdi, r15
mov rsi, r8
call _ma_unpin_all_pages
mov rax, [r15+8]
mov qword ptr [rax+90h], 0
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_355C8
mov eax, r14d
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_355C8:
call ___stack_chk_fail
|
long long ma_write_abort_block_record(long long a1)
{
unsigned int v1; // r14d
long long *v2; // r15
unsigned long long v3; // rax
long long v4; // rbx
unsigned long long v5; // rcx
long long *v6; // rbx
char v7; // al
long long v8; // r12
long long v9; // r13
long long v10; // r14
int v11; // eax
int v12; // eax
char v13; // al
int v14; // ecx
unsigned __int8 v15; // r12
long long v16; // rbx
long long v17; // r8
bool v18; // zf
unsigned int v19; // eax
__int128 v21; // [rsp+0h] [rbp-B0h] BYREF
_WORD *v22; // [rsp+20h] [rbp-90h]
long long v23; // [rsp+28h] [rbp-88h]
char v24[8]; // [rsp+38h] [rbp-78h] BYREF
long long v25; // [rsp+40h] [rbp-70h] BYREF
long long v26; // [rsp+48h] [rbp-68h]
long long v27; // [rsp+50h] [rbp-60h]
unsigned long long v28; // [rsp+58h] [rbp-58h]
unsigned int v29; // [rsp+64h] [rbp-4Ch]
long long *v30; // [rsp+68h] [rbp-48h]
int v31; // [rsp+70h] [rbp-40h]
_WORD v32[2]; // [rsp+75h] [rbp-3Bh] BYREF
int v33; // [rsp+79h] [rbp-37h]
char v34; // [rsp+7Dh] [rbp-33h]
__int16 v35; // [rsp+7Eh] [rbp-32h]
unsigned long long v36; // [rsp+80h] [rbp-30h]
v2 = (long long *)a1;
v36 = __readfsqword(0x28u);
v25 = 0LL;
v27 = *(_QWORD *)a1;
ma_bitmap_lock();
LOBYTE(v1) = (unsigned __int8)delete_head_or_tail(
v2,
(unsigned long long)v2[19] >> 8,
(unsigned __int8)v2[19],
1LL,
0LL) != 0;
v3 = *(unsigned int *)(a1 + 136);
v30 = (long long *)a1;
if ( v3 >= 2 )
{
v4 = *(_QWORD *)(a1 + 128);
v5 = v4 + 24 * v3;
v6 = (long long *)(v4 + 24);
v26 = a1 + 1136;
v28 = v5;
do
{
v7 = *((_BYTE *)v6 + 20);
if ( (v7 & 1) != 0 )
{
v8 = *v6;
v9 = *((unsigned int *)v6 + 2);
v1 = (unsigned __int8)v1;
if ( (v7 & 4) != 0 )
{
if ( (unsigned __int8)delete_head_or_tail(v2, *v6, (unsigned int)v9 & 0xFFFF7FFF, 0LL, 0LL) )
v1 = 1;
}
else
{
v29 = (unsigned __int8)v1;
v10 = *v2;
v11 = *(_QWORD *)(*v2 + 64) == (v8 + v9) * *(unsigned int *)(*v2 + 1980);
if ( (_DWORD)v9 == v11 )
{
v31 = 0;
}
else
{
v12 = pagecache_delete_pages(*(_QWORD *)(v10 + 1536), v26, v8, (unsigned int)(v9 - v11), 4LL, 1LL);
LOBYTE(v12) = (_BYTE)v12 != 0;
v31 = v12;
}
if ( *(_BYTE *)(v10 + 2023) )
{
v32[1] = 1;
v33 = v8;
v34 = BYTE4(v8);
v35 = v9;
v22 = v32;
v23 = 11LL;
v13 = translog_write_record((unsigned long long)v24, &byte_8, v2[1], v2, 0xBu, 3, &v21, v32, 0LL);
v14 = (unsigned __int8)v31;
if ( v13 )
v14 = 1;
v31 = v14;
}
if ( *(_QWORD *)(v10 + 2776) )
psi_mutex_lock(
v10 + 2712,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c",
0xA23u);
else
pthread_mutex_lock(v10 + 2712);
v15 = ma_bitmap_reset_full_page_bits(v30, v10 + 2576, v8, (unsigned int)v9);
if ( *(_QWORD *)(v10 + 2776) )
PSI_server[44]();
pthread_mutex_unlock(v10 + 2712);
v1 = v29;
if ( (unsigned __int8)v31 | v15 )
v1 = 1;
v2 = v30;
}
v5 = v28;
}
v6 += 3;
}
while ( (unsigned long long)v6 < v5 );
}
v16 = v27;
ma_bitmap_unlock(v27);
v17 = 0LL;
if ( *(_BYTE *)(v16 + 2023) )
{
v18 = (unsigned __int8)ma_write_clr(
(_DWORD)v30,
v2[23],
18,
*(_QWORD *)(v16 + 1704) != 0LL,
-*((_DWORD *)v2 + 44),
(unsigned int)&v25,
0LL) == 0;
v19 = (unsigned __int8)v1;
v1 = 1;
if ( v18 )
v1 = v19;
v17 = v25;
v2 = v30;
}
ma_unpin_all_pages(v2, v17);
*(_QWORD *)(v2[1] + 144) = 0LL;
return v1;
}
|
_ma_write_abort_block_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x70],0x0
MOV RDI,qword ptr [RDI]
MOV qword ptr [RBP + -0x60],RDI
CALL 0x0013cf03
MOV RSI,qword ptr [R15 + 0x98]
MOVZX EDX,SIL
SHR RSI,0x8
MOV RDI,R15
MOV ECX,0x1
XOR R8D,R8D
CALL 0x001355cd
TEST AL,AL
SETNZ R14B
MOV EAX,dword ptr [R15 + 0x88]
CMP RAX,0x2
MOV qword ptr [RBP + -0x48],R15
JC 0x00135521
MOV RBX,qword ptr [R15 + 0x80]
LEA RAX,[RAX + RAX*0x2]
LEA RCX,[RBX + RAX*0x8]
ADD RBX,0x18
LEA RAX,[R15 + 0x470]
MOV qword ptr [RBP + -0x68],RAX
MOV qword ptr [RBP + -0x58],RCX
LAB_00135371:
MOVZX EAX,byte ptr [RBX + 0x14]
TEST AL,0x1
JZ 0x001354ea
MOV R12,qword ptr [RBX]
MOV R13D,dword ptr [RBX + 0x8]
MOVZX R14D,R14B
TEST AL,0x4
JNZ 0x001353db
MOV dword ptr [RBP + -0x4c],R14D
MOV R14,qword ptr [R15]
LEA RAX,[R12 + R13*0x1]
MOV ECX,dword ptr [R14 + 0x7bc]
IMUL RCX,RAX
XOR EAX,EAX
CMP qword ptr [R14 + 0x40],RCX
SETZ AL
MOV ECX,R13D
SUB ECX,EAX
JZ 0x00135405
MOV RDI,qword ptr [R14 + 0x600]
MOV RSI,qword ptr [RBP + -0x68]
MOV RDX,R12
MOV R8D,0x4
MOV R9D,0x1
CALL 0x0014d664
TEST AL,AL
SETNZ AL
MOV dword ptr [RBP + -0x40],EAX
JMP 0x0013540c
LAB_001353db:
AND R13D,0xffff7fff
MOV RDI,R15
MOV RSI,R12
MOV EDX,R13D
XOR ECX,ECX
XOR R8D,R8D
CALL 0x001355cd
TEST AL,AL
MOV EAX,0x1
CMOVNZ R14D,EAX
JMP 0x001354e6
LAB_00135405:
MOV dword ptr [RBP + -0x40],0x0
LAB_0013540c:
CMP byte ptr [R14 + 0x7e7],0x0
JZ 0x0013548c
MOV word ptr [RBP + -0x39],0x1
MOV dword ptr [RBP + -0x37],R12D
MOV RAX,R12
SHR RAX,0x20
MOV byte ptr [RBP + -0x33],AL
MOV word ptr [RBP + -0x32],R13W
LEA RAX,[RBP + -0x3b]
MOV qword ptr [RBP + -0x90],RAX
MOV qword ptr [RBP + -0x88],0xb
MOV RDX,qword ptr [R15 + 0x8]
SUB RSP,0x8
LEA RDI,[RBP + -0x78]
MOV ESI,0x8
MOV RCX,R15
MOV R8D,0xb
MOV R9D,0x3
PUSH 0x0
PUSH RAX
LEA RAX,[RBP + -0xb0]
PUSH RAX
CALL 0x0012b425
ADD RSP,0x20
TEST AL,AL
MOV ECX,dword ptr [RBP + -0x40]
MOVZX ECX,CL
MOV EAX,0x1
CMOVNZ ECX,EAX
MOV dword ptr [RBP + -0x40],ECX
LAB_0013548c:
LEA R15,[R14 + 0xa98]
CMP qword ptr [R14 + 0xad8],0x0
JNZ 0x001354f9
MOV RDI,R15
CALL 0x0012a230
LAB_001354a5:
LEA RSI,[R14 + 0xa10]
MOV RDI,qword ptr [RBP + -0x48]
MOV RDX,R12
MOV ECX,R13D
CALL 0x0013e3c2
MOV R12D,EAX
MOV RDI,qword ptr [R14 + 0xad8]
TEST RDI,RDI
JNZ 0x0013550f
LAB_001354ca:
MOV RDI,R15
CALL 0x0012a1f0
OR R12B,byte ptr [RBP + -0x40]
MOV R14D,dword ptr [RBP + -0x4c]
JZ 0x001354e2
MOV R14D,0x1
LAB_001354e2:
MOV R15,qword ptr [RBP + -0x48]
LAB_001354e6:
MOV RCX,qword ptr [RBP + -0x58]
LAB_001354ea:
ADD RBX,0x18
CMP RBX,RCX
JC 0x00135371
JMP 0x00135521
LAB_001354f9:
MOV RDI,R15
LEA RSI,[0x1f8cc1]
MOV EDX,0xa23
CALL 0x001312ea
JMP 0x001354a5
LAB_0013550f:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001354ca
LAB_00135521:
MOV RBX,qword ptr [RBP + -0x60]
MOV RDI,RBX
CALL 0x0013d004
XOR R8D,R8D
CMP byte ptr [RBX + 0x7e7],0x0
JZ 0x0013558a
XOR ECX,ECX
CMP qword ptr [RBX + 0x6a8],0x0
MOV RSI,qword ptr [R15 + 0xb8]
SETNZ CL
SUB R8D,dword ptr [R15 + 0xb0]
SUB RSP,0x8
LEA R15,[RBP + -0x70]
MOV RDI,qword ptr [RBP + -0x48]
MOV EDX,0x12
MOV R9,R15
PUSH 0x0
CALL 0x00160575
ADD RSP,0x10
TEST AL,AL
MOVZX EAX,R14B
MOV R14D,0x1
CMOVZ R14D,EAX
MOV R8,qword ptr [R15]
MOV R15,qword ptr [RBP + -0x48]
LAB_0013558a:
MOV RDI,R15
MOV RSI,R8
CALL 0x001604f8
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RAX + 0x90],0x0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001355c8
MOV EAX,R14D
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001355c8:
CALL 0x0012a280
|
ulong _ma_write_abort_block_record(long *param_1)
{
pthread_mutex_t *__mutex;
uint uVar1;
long lVar2;
long lVar3;
char cVar4;
int8 uVar5;
int iVar6;
long *plVar7;
long *plVar8;
int8 unaff_R14;
ulong uVar9;
ulong uVar10;
long in_FS_OFFSET;
int1 local_b8 [32];
int1 *local_98;
int8 local_90;
int1 local_80 [8];
int8 local_78;
long *local_70;
long local_68;
long *local_60;
uint local_54;
long *local_50;
uint local_48;
int1 local_43 [2];
int2 local_41;
int4 local_3f;
int1 local_3b;
int2 local_3a;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_78 = 0;
local_68 = *param_1;
_ma_bitmap_lock();
cVar4 = delete_head_or_tail(param_1,(ulong)param_1[0x13] >> 8,param_1[0x13] & 0xff,1,0);
uVar9 = CONCAT71((int7)((ulong)unaff_R14 >> 8),cVar4 != '\0');
local_50 = param_1;
if (1 < (ulong)*(uint *)(param_1 + 0x11)) {
plVar7 = (long *)(param_1[0x10] + (ulong)*(uint *)(param_1 + 0x11) * 0x18);
plVar8 = (long *)(param_1[0x10] + 0x18);
local_70 = param_1 + 0x8e;
local_60 = plVar7;
do {
if ((*(byte *)((long)plVar8 + 0x14) & 1) != 0) {
lVar2 = *plVar8;
uVar1 = *(uint *)(plVar8 + 1);
uVar9 = uVar9 & 0xff;
if ((*(byte *)((long)plVar8 + 0x14) & 4) == 0) {
lVar3 = *param_1;
iVar6 = uVar1 - (*(long *)(lVar3 + 0x40) ==
(ulong)*(uint *)(lVar3 + 0x7bc) * (lVar2 + (ulong)uVar1));
local_54 = (uint)uVar9;
if (iVar6 == 0) {
local_48 = 0;
}
else {
uVar5 = pagecache_delete_pages(*(int8 *)(lVar3 + 0x600),local_70,lVar2,iVar6,4,1);
local_48 = (uint)CONCAT71((int7)((ulong)uVar5 >> 8),(char)uVar5 != '\0');
}
if (*(char *)(lVar3 + 0x7e7) != '\0') {
local_41 = 1;
local_3f = (int4)lVar2;
local_3b = (int1)((ulong)lVar2 >> 0x20);
local_3a = (int2)uVar1;
local_98 = local_43;
local_90 = 0xb;
cVar4 = translog_write_record(local_80,8,param_1[1],param_1,0xb,3,local_b8,local_98,0);
local_48 = local_48 & 0xff;
if (cVar4 != '\0') {
local_48 = 1;
}
}
__mutex = (pthread_mutex_t *)(lVar3 + 0xa98);
if (*(long *)(lVar3 + 0xad8) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c",
0xa23);
}
cVar4 = _ma_bitmap_reset_full_page_bits(local_50,lVar3 + 0xa10,lVar2,(ulong)uVar1);
if (*(long *)(lVar3 + 0xad8) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
uVar9 = (ulong)local_54;
plVar7 = local_60;
param_1 = local_50;
if (cVar4 != '\0' || (char)local_48 != '\0') {
uVar9 = 1;
}
}
else {
cVar4 = delete_head_or_tail(param_1,lVar2,uVar1 & 0xffff7fff,0,0);
plVar7 = local_60;
if (cVar4 != '\0') {
uVar9 = 1;
}
}
}
plVar8 = plVar8 + 3;
} while (plVar8 < plVar7);
}
lVar2 = local_68;
_ma_bitmap_unlock(local_68);
uVar5 = 0;
uVar10 = uVar9;
if (*(char *)(lVar2 + 0x7e7) != '\0') {
cVar4 = _ma_write_clr(local_50,param_1[0x17],0x12,*(long *)(lVar2 + 0x6a8) != 0,
-(int)param_1[0x16],&local_78,0);
uVar5 = local_78;
uVar10 = 1;
param_1 = local_50;
if (cVar4 == '\0') {
uVar10 = uVar9 & 0xff;
}
}
_ma_unpin_all_pages(param_1,uVar5);
*(int8 *)(param_1[1] + 0x90) = 0;
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar10 & 0xffffffff;
}
|
|
18,542
|
IsImageValid
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
bool IsImageValid(Image image)
{
bool result = false;
if ((image.data != NULL) && // Validate pixel data available
(image.width > 0) && // Validate image width
(image.height > 0) && // Validate image height
(image.format > 0) && // Validate image format
(image.mipmaps > 0)) result = true; // Validate image mipmaps (at least 1 for basic mipmap level)
return result;
}
|
O2
|
c
|
IsImageValid:
cmpq $0x0, 0x8(%rsp)
setne %cl
movdqu 0x10(%rsp), %xmm0
pxor %xmm1, %xmm1
pcmpgtd %xmm1, %xmm0
movmskps %xmm0, %eax
cmpl $0xf, %eax
sete %al
andb %cl, %al
retq
|
IsImageValid:
cmp [rsp+arg_0], 0
setnz cl
movdqu xmm0, [rsp+arg_8]
pxor xmm1, xmm1
pcmpgtd xmm0, xmm1
movmskps eax, xmm0
cmp eax, 0Fh
setz al
and al, cl
retn
|
char IsImageValid(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
__int128 a8)
{
return (a7 != 0) & (_mm_movemask_ps((__m128)_mm_cmpgt_epi32(_mm_loadu_si128((const __m128i *)&a8), (__m128i)0LL)) == 15);
}
|
IsImageValid:
CMP qword ptr [RSP + 0x8],0x0
SETNZ CL
MOVDQU XMM0,xmmword ptr [RSP + 0x10]
PXOR XMM1,XMM1
PCMPGTD XMM0,XMM1
MOVMSKPS EAX,XMM0
CMP EAX,0xf
SETZ AL
AND AL,CL
RET
|
int4 IsImageValid(void)
{
int4 in_EAX;
int iVar1;
int1 auVar2 [16];
long in_stack_00000008;
int iStack0000000000000010;
int iStack0000000000000014;
int iStack0000000000000018;
int iStack000000000000001c;
auVar2._0_4_ = -(uint)(0 < iStack0000000000000010);
auVar2._4_4_ = -(uint)(0 < iStack0000000000000014);
auVar2._8_4_ = -(uint)(0 < iStack0000000000000018);
auVar2._12_4_ = -(uint)(0 < iStack000000000000001c);
iVar1 = movmskps(in_EAX,auVar2);
return CONCAT31((int3)((uint)iVar1 >> 8),iVar1 == 0xf && in_stack_00000008 != 0);
}
|
|
18,543
|
IsImageValid
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
bool IsImageValid(Image image)
{
bool result = false;
if ((image.data != NULL) && // Validate pixel data available
(image.width > 0) && // Validate image width
(image.height > 0) && // Validate image height
(image.format > 0) && // Validate image format
(image.mipmaps > 0)) result = true; // Validate image mipmaps (at least 1 for basic mipmap level)
return result;
}
|
O3
|
c
|
IsImageValid:
cmpq $0x0, 0x8(%rsp)
setne %cl
movdqu 0x10(%rsp), %xmm0
pxor %xmm1, %xmm1
pcmpgtd %xmm1, %xmm0
movmskps %xmm0, %eax
cmpl $0xf, %eax
sete %al
andb %cl, %al
retq
|
IsImageValid:
cmp [rsp+arg_0], 0
setnz cl
movdqu xmm0, [rsp+arg_8]
pxor xmm1, xmm1
pcmpgtd xmm0, xmm1
movmskps eax, xmm0
cmp eax, 0Fh
setz al
and al, cl
retn
|
char IsImageValid(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
__int128 a8)
{
return (a7 != 0) & (_mm_movemask_ps((__m128)_mm_cmpgt_epi32(_mm_loadu_si128((const __m128i *)&a8), (__m128i)0LL)) == 15);
}
|
IsImageValid:
CMP qword ptr [RSP + 0x8],0x0
SETNZ CL
MOVDQU XMM0,xmmword ptr [RSP + 0x10]
PXOR XMM1,XMM1
PCMPGTD XMM0,XMM1
MOVMSKPS EAX,XMM0
CMP EAX,0xf
SETZ AL
AND AL,CL
RET
|
int4 IsImageValid(void)
{
int4 in_EAX;
int iVar1;
int1 auVar2 [16];
long in_stack_00000008;
int iStack0000000000000010;
int iStack0000000000000014;
int iStack0000000000000018;
int iStack000000000000001c;
auVar2._0_4_ = -(uint)(0 < iStack0000000000000010);
auVar2._4_4_ = -(uint)(0 < iStack0000000000000014);
auVar2._8_4_ = -(uint)(0 < iStack0000000000000018);
auVar2._12_4_ = -(uint)(0 < iStack000000000000001c);
iVar1 = movmskps(in_EAX,auVar2);
return CONCAT31((int3)((uint)iVar1 >> 8),iVar1 == 0xf && in_stack_00000008 != 0);
}
|
|
18,544
|
Mrr_ordered_index_reader::resume_read()
|
eloqsql/sql/multi_range_read.cc
|
void Mrr_ordered_index_reader::resume_read()
{
TABLE *table= file->get_table();
if (!read_was_interrupted)
return;
KEY *used_index= &table->key_info[file->active_index];
key_restore(table->record[0], saved_key_tuple,
used_index, used_index->key_length);
if (saved_primary_key)
{
key_restore(table->record[0], saved_primary_key,
&table->key_info[table->s->primary_key],
table->key_info[table->s->primary_key].key_length);
}
}
|
O0
|
cpp
|
Mrr_ordered_index_reader::resume_read():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x8(%rax), %rdi
callq 0xba3d90
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x10(%rbp)
testb $0x1, 0xd8(%rax)
jne 0xba13b6
jmp 0xba1467
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0xa8(%rcx), %rcx
movq 0x8(%rax), %rdx
movl 0x19c(%rdx), %edx
imulq $0xc0, %rdx, %rdx
addq %rdx, %rcx
movq %rcx, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rdi
movq 0xc8(%rax), %rsi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rax
movl (%rax), %ecx
callq 0xe15ff0
movq -0x20(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0xba1467
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rdi
movq 0xd0(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x3c8(%rax), %eax
imulq $0xc0, %rax, %rax
addq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movl 0x3c8(%rcx), %ecx
imulq $0xc0, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
callq 0xe15ff0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN24Mrr_ordered_index_reader11resume_readEv:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rdi, [rax+8]; this
call _ZN7handler9get_tableEv; handler::get_table(void)
mov rcx, rax
mov rax, [rbp+var_20]
mov [rbp+var_10], rcx
test byte ptr [rax+0D8h], 1
jnz short loc_BA13B6
jmp loc_BA1467
loc_BA13B6:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov rcx, [rcx+0A8h]
mov rdx, [rax+8]
mov edx, [rdx+19Ch]
imul rdx, 0C0h
add rcx, rdx
mov [rbp+var_18], rcx
mov rcx, [rbp+var_10]
mov rdi, [rcx+50h]; unsigned __int8 *
mov rsi, [rax+0C8h]; unsigned __int8 *
mov rdx, [rbp+var_18]; st_key *
mov rax, [rbp+var_18]
mov ecx, [rax]; unsigned int
call _Z11key_restorePhPKhP6st_keyj; key_restore(uchar *,uchar const*,st_key *,uint)
mov rax, [rbp+var_20]
cmp qword ptr [rax+0D0h], 0
jz short loc_BA1467
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov rdi, [rcx+50h]; unsigned __int8 *
mov rsi, [rax+0D0h]; unsigned __int8 *
mov rax, [rbp+var_10]
mov rdx, [rax+0A8h]
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+3C8h]
imul rax, 0C0h
add rdx, rax; st_key *
mov rax, [rbp+var_10]
mov rax, [rax+0A8h]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov ecx, [rcx+3C8h]
imul rcx, 0C0h
add rax, rcx
mov ecx, [rax]; unsigned int
call _Z11key_restorePhPKhP6st_keyj; key_restore(uchar *,uchar const*,st_key *,uint)
loc_BA1467:
add rsp, 20h
pop rbp
retn
|
Mrr_ordered_index_reader * Mrr_ordered_index_reader::resume_read(Mrr_ordered_index_reader *this)
{
long long table; // rcx
Mrr_ordered_index_reader *result; // rax
st_key *v3; // [rsp+8h] [rbp-18h]
long long v4; // [rsp+10h] [rbp-10h]
table = handler::get_table(*((handler **)this + 1));
result = this;
v4 = table;
if ( (*((_BYTE *)this + 216) & 1) != 0 )
{
v3 = (st_key *)(192LL * *(unsigned int *)(*((_QWORD *)this + 1) + 412LL) + *(_QWORD *)(table + 168));
key_restore(*(unsigned __int8 **)(table + 80), *((const unsigned __int8 **)this + 25), v3, *(_DWORD *)v3);
result = this;
if ( *((_QWORD *)this + 26) )
return (Mrr_ordered_index_reader *)key_restore(
*(unsigned __int8 **)(v4 + 80),
*((const unsigned __int8 **)this + 26),
(st_key *)(192LL * *(unsigned int *)(*(_QWORD *)v4 + 968LL)
+ *(_QWORD *)(v4 + 168)),
*(_DWORD *)(192LL * *(unsigned int *)(*(_QWORD *)v4 + 968LL)
+ *(_QWORD *)(v4 + 168)));
}
return result;
}
|
operator&:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
AND RAX,qword ptr [RBP + -0x10]
POP RBP
RET
|
/* TEMPNAMEPLACEHOLDERVALUE(privilege_t, unsigned long long) */
ulong operator&(ulong param_1,ulong param_2)
{
return param_1 & param_2;
}
|
|
18,545
|
psi_rwlock_wrlock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD
int psi_rwlock_wrlock(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_WRITELOCK, file, line);
int result= rw_wrlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
}
|
O3
|
c
|
psi_rwlock_wrlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x357278(%rip), %r15 # 0x386010
movq (%r15), %rax
movq 0x90(%rdi), %rsi
leaq -0x48(%rbp), %rdi
pushq $0x1
popq %rdx
callq *0x1b0(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0xa4011
movl %eax, %r14d
testq %rbx, %rbx
je 0x2edd1
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_wrlock:
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 1
pop rdx
call qword ptr [rax+1B0h]
mov rbx, rax
mov rdi, r14
call my_rw_wrlock
mov r14d, eax
test rbx, rbx
jz short loc_2EDD1
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1B8h]
loc_2EDD1:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long psi_rwlock_wrlock(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),
1LL,
a2,
a3);
v4 = my_rw_wrlock(a1);
if ( v3 )
((void ( *)(long long, _QWORD))PSI_server[55])(v3, v4);
return v4;
}
|
psi_rwlock_wrlock:
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 0x1
POP RDX
CALL qword ptr [RAX + 0x1b0]
MOV RBX,RAX
MOV RDI,R14
CALL 0x001a4011
MOV R14D,EAX
TEST RBX,RBX
JZ 0x0012edd1
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1b8]
LAB_0012edd1:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 psi_rwlock_wrlock(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),1,param_2,param_3);
uVar1 = my_rw_wrlock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
|
|
18,546
|
JS_ToBigInt64Free
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_ToBigInt64Free(JSContext *ctx, int64_t *pres, JSValue val)
{
bf_t a_s, *a;
a = JS_ToBigIntFree(ctx, &a_s, val);
if (!a) {
*pres = 0;
return -1;
}
bf_get_int64(pres, a, BF_GET_INT_MOD);
JS_FreeBigInt(ctx, a, &a_s);
return 0;
}
|
O0
|
c
|
JS_ToBigInt64Free:
subq $0x58, %rsp
movq %rdx, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
leaq 0x8(%rsp), %rsi
callq 0x62b40
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x39fa2
movq 0x30(%rsp), %rax
movq $0x0, (%rax)
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x39fd0
movq 0x30(%rsp), %rdi
movq (%rsp), %rsi
movl $0x1, %edx
callq 0xeb3e0
movq 0x38(%rsp), %rdi
movq (%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x62aa0
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)
|
JS_ToBigInt64Free:
sub rsp, 58h
mov [rsp+58h+var_18], rdx
mov [rsp+58h+var_10], rcx
mov [rsp+58h+var_20], rdi
mov [rsp+58h+var_28], rsi
mov rdi, [rsp+58h+var_20]
mov rdx, [rsp+58h+var_18]
mov rcx, [rsp+58h+var_10]
lea rsi, [rsp+58h+var_50]
call JS_ToBigIntFree
mov [rsp+58h+var_58], rax
cmp [rsp+58h+var_58], 0
jnz short loc_39FA2
mov rax, [rsp+58h+var_28]
mov qword ptr [rax], 0
mov [rsp+58h+var_4], 0FFFFFFFFh
jmp short loc_39FD0
loc_39FA2:
mov rdi, [rsp+58h+var_28]
mov rsi, [rsp+58h+var_58]
mov edx, 1
call bf_get_int64
mov rdi, [rsp+58h+var_20]
mov rsi, [rsp+58h+var_58]
lea rdx, [rsp+58h+var_50]
call JS_FreeBigInt
mov [rsp+58h+var_4], 0
loc_39FD0:
mov eax, [rsp+58h+var_4]
add rsp, 58h
retn
|
long long JS_ToBigInt64Free(long long a1, _QWORD *a2, long long a3, long long a4)
{
long long v5; // [rsp+0h] [rbp-58h]
_BYTE v6[40]; // [rsp+8h] [rbp-50h] BYREF
_QWORD *v7; // [rsp+30h] [rbp-28h]
long long v8; // [rsp+38h] [rbp-20h]
long long v9; // [rsp+40h] [rbp-18h]
long long v10; // [rsp+48h] [rbp-10h]
v9 = a3;
v10 = a4;
v8 = a1;
v7 = a2;
v5 = JS_ToBigIntFree(a1, v6, a3, a4);
if ( v5 )
{
bf_get_int64(v7, v5, 1LL);
JS_FreeBigInt(v8, v5, v6);
return 0;
}
else
{
*v7 = 0LL;
return (unsigned int)-1;
}
}
|
JS_ToBigInt64Free:
SUB RSP,0x58
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RSP + 0x48],RCX
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV RDI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x48]
LEA RSI,[RSP + 0x8]
CALL 0x00162b40
MOV qword ptr [RSP],RAX
CMP qword ptr [RSP],0x0
JNZ 0x00139fa2
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX],0x0
MOV dword ptr [RSP + 0x54],0xffffffff
JMP 0x00139fd0
LAB_00139fa2:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP]
MOV EDX,0x1
CALL 0x001eb3e0
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP]
LEA RDX,[RSP + 0x8]
CALL 0x00162aa0
MOV dword ptr [RSP + 0x54],0x0
LAB_00139fd0:
MOV EAX,dword ptr [RSP + 0x54]
ADD RSP,0x58
RET
|
int4
JS_ToBigInt64Free(int8 param_1,int8 *param_2,int8 param_3,int8 param_4)
{
long lVar1;
int1 local_50 [40];
int8 *local_28;
int8 local_20;
int8 local_18;
int8 local_10;
int4 local_4;
local_28 = param_2;
local_20 = param_1;
local_18 = param_3;
local_10 = param_4;
lVar1 = JS_ToBigIntFree(param_1,local_50,param_3,param_4);
if (lVar1 == 0) {
*local_28 = 0;
local_4 = 0xffffffff;
}
else {
bf_get_int64(local_28,lVar1,1);
JS_FreeBigInt(local_20,lVar1,local_50);
local_4 = 0;
}
return local_4;
}
|
|
18,547
|
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 0x37840
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movsbl 0xa8(%rax), %eax
cmpl $0x0, %eax
je 0x37840
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movsbl 0xa8(%rax), %eax
movl %eax, -0x28(%rbp)
jmp 0x37847
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x37847
movl -0x28(%rbp), %eax
movb %al, -0x21(%rbp)
cmpq $-0x1, -0x20(%rbp)
jne 0x37861
movq -0x18(%rbp), %rdi
callq 0x141a0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x38970
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 0x31620
cmpl $0x0, %eax
je 0x37899
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x378d4
cmpb $0x0, -0x21(%rbp)
jne 0x378cd
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
cmpb $0x0, 0x148(%rax)
jne 0x378cd
movq -0x10(%rbp), %rax
movq 0x4d0(%rax), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movl %eax, -0x4(%rbp)
jmp 0x378d4
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_37840
mov rax, [rbp+var_10]
mov rax, [rax+480h]
movsx eax, byte ptr [rax+0A8h]
cmp eax, 0
jz short loc_37840
mov rax, [rbp+var_10]
mov rax, [rax+480h]
movsx eax, byte ptr [rax+0A8h]
mov [rbp+var_28], eax
jmp short loc_37847
loc_37840:
xor eax, eax
mov [rbp+var_28], eax
jmp short $+2
loc_37847:
mov eax, [rbp+var_28]
mov [rbp+var_21], al
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jnz short loc_37861
mov rdi, [rbp+var_18]
call _strlen
mov [rbp+var_20], rax
loc_37861:
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_37899
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_378D4
loc_37899:
cmp [rbp+var_21], 0
jnz short loc_378CD
mov rax, [rbp+var_10]
mov rax, [rax+480h]
cmp byte ptr [rax+148h], 0
jnz short loc_378CD
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_378D4
loc_378CD:
mov [rbp+var_4], 0
loc_378D4:
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 0x00137840
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOVSX EAX,byte ptr [RAX + 0xa8]
CMP EAX,0x0
JZ 0x00137840
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 0x00137847
LAB_00137840:
XOR EAX,EAX
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00137847
LAB_00137847:
MOV EAX,dword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x21],AL
CMP qword ptr [RBP + -0x20],-0x1
JNZ 0x00137861
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001141a0
MOV qword ptr [RBP + -0x20],RAX
LAB_00137861:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00138970
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 0x00131620
CMP EAX,0x0
JZ 0x00137899
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001378d4
LAB_00137899:
CMP byte ptr [RBP + -0x21],0x0
JNZ 0x001378cd
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
CMP byte ptr [RAX + 0x148],0x0
JNZ 0x001378cd
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 0x001378d4
LAB_001378cd:
MOV dword ptr [RBP + -0x4],0x0
LAB_001378d4:
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;
}
|
|
18,548
|
google::protobuf::internal::AnyMetadata::InternalIs(google::protobuf::stringpiece_internal::StringPiece) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/any_lite.cc
|
bool AnyMetadata::InternalIs(StringPiece type_name) const {
StringPiece type_url = type_url_->Get();
return type_url.size() >= type_name.size() + 1 &&
type_url[type_url.size() - type_name.size() - 1] == '/' &&
HasSuffixString(type_url, type_name);
}
|
O0
|
cpp
|
google::protobuf::internal::AnyMetadata::InternalIs(google::protobuf::stringpiece_internal::StringPiece) const:
subq $0x68, %rsp
movq %rsi, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq %rdi, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
callq 0x80260
movq %rax, %rsi
leaq 0x38(%rsp), %rdi
callq 0x30550
leaq 0x38(%rsp), %rdi
callq 0x24080
movq %rax, 0x8(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x24080
movq 0x8(%rsp), %rcx
movq %rax, %rdx
addq $0x1, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x17(%rsp)
jb 0x17f35b
leaq 0x38(%rsp), %rdi
callq 0x24080
movq %rax, (%rsp)
leaq 0x50(%rsp), %rdi
callq 0x24080
movq (%rsp), %rsi
subq %rax, %rsi
subq $0x1, %rsi
leaq 0x38(%rsp), %rdi
callq 0x30530
movsbl %al, %ecx
xorl %eax, %eax
cmpl $0x2f, %ecx
movb %al, 0x17(%rsp)
jne 0x17f35b
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0x17f500
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZNK6google8protobuf8internal11AnyMetadata10InternalIsENS0_20stringpiece_internal11StringPieceE:
sub rsp, 68h
mov [rsp+68h+var_18], rsi
mov [rsp+68h+var_10], rdx
mov [rsp+68h+var_20], rdi
mov rax, [rsp+68h+var_20]
mov rax, [rax]
mov [rsp+68h+var_8], rax
mov rdi, [rsp+68h+var_8]
call _ZNK6google8protobuf8internal15TaggedStringPtr3GetB5cxx11Ev; google::protobuf::internal::TaggedStringPtr::Get(void)
mov rsi, rax
lea rdi, [rsp+68h+var_30]
call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&)
lea rdi, [rsp+68h+var_30]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece4sizeEv; google::protobuf::stringpiece_internal::StringPiece::size(void)
mov [rsp+68h+var_60], rax
lea rdi, [rsp+68h+var_18]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece4sizeEv; google::protobuf::stringpiece_internal::StringPiece::size(void)
mov rcx, [rsp+68h+var_60]
mov rdx, rax
add rdx, 1
xor eax, eax
cmp rcx, rdx
mov [rsp+68h+var_51], al
jb loc_17F35B
lea rdi, [rsp+68h+var_30]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece4sizeEv; google::protobuf::stringpiece_internal::StringPiece::size(void)
mov [rsp+68h+var_68], rax
lea rdi, [rsp+68h+var_18]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece4sizeEv; google::protobuf::stringpiece_internal::StringPiece::size(void)
mov rsi, [rsp+68h+var_68]
sub rsi, rax
sub rsi, 1
lea rdi, [rsp+68h+var_30]
call _ZNK6google8protobuf20stringpiece_internal11StringPieceixEm; google::protobuf::stringpiece_internal::StringPiece::operator[](ulong)
movsx ecx, al
xor eax, eax
cmp ecx, 2Fh ; '/'
mov [rsp+68h+var_51], al
jnz short loc_17F35B
mov rax, [rsp+68h+var_30]
mov [rsp+68h+var_40], rax
mov rax, [rsp+68h+var_28]
mov [rsp+68h+var_38], rax
mov rax, [rsp+68h+var_18]
mov [rsp+68h+var_50], rax
mov rax, [rsp+68h+var_10]
mov [rsp+68h+var_48], rax
mov rdi, [rsp+68h+var_40]
mov rsi, [rsp+68h+var_38]
mov rdx, [rsp+68h+var_50]
mov rcx, [rsp+68h+var_48]
call _ZN6google8protobuf15HasSuffixStringENS0_20stringpiece_internal11StringPieceES2_; google::protobuf::HasSuffixString(google::protobuf::stringpiece_internal::StringPiece,google::protobuf::stringpiece_internal::StringPiece)
mov [rsp+68h+var_51], al
loc_17F35B:
mov al, [rsp+68h+var_51]
and al, 1
add rsp, 68h
retn
|
char google::protobuf::internal::AnyMetadata::InternalIs(
google::protobuf::internal::TaggedStringPtr **a1,
long long a2,
long long a3)
{
unsigned long long v3; // rax
long long v4; // rax
long long v6; // [rsp+0h] [rbp-68h]
unsigned long long v7; // [rsp+8h] [rbp-60h]
char HasSuffixString; // [rsp+17h] [rbp-51h]
long long v9[3]; // [rsp+38h] [rbp-30h] BYREF
long long v10; // [rsp+50h] [rbp-18h] BYREF
long long v11; // [rsp+58h] [rbp-10h]
google::protobuf::internal::TaggedStringPtr *v12; // [rsp+60h] [rbp-8h]
v10 = a2;
v11 = a3;
v9[2] = (long long)a1;
v12 = *a1;
v3 = google::protobuf::internal::TaggedStringPtr::Get[abi:cxx11](v12);
google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v9, v3);
v7 = google::protobuf::stringpiece_internal::StringPiece::size((google::protobuf::stringpiece_internal::StringPiece *)v9);
HasSuffixString = 0;
if ( v7 >= google::protobuf::stringpiece_internal::StringPiece::size((google::protobuf::stringpiece_internal::StringPiece *)&v10)
+ 1 )
{
v6 = google::protobuf::stringpiece_internal::StringPiece::size((google::protobuf::stringpiece_internal::StringPiece *)v9);
v4 = google::protobuf::stringpiece_internal::StringPiece::size((google::protobuf::stringpiece_internal::StringPiece *)&v10);
HasSuffixString = 0;
if ( google::protobuf::stringpiece_internal::StringPiece::operator[](v9, v6 - v4 - 1) == 47 )
HasSuffixString = google::protobuf::HasSuffixString(v9[0], v9[1], v10, v11);
}
return HasSuffixString & 1;
}
|
_M_addr:
MOV qword ptr [RSP + -0x8],RDI
MOV RAX,qword ptr [RSP + -0x8]
RET
|
/* __gnu_cxx::__aligned_membuf<std::pair<std::pair<google::protobuf::Descriptor const*, int> const,
google::protobuf::FieldDescriptor const*> >::_M_addr() const */
__aligned_membuf<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>
* __thiscall
__gnu_cxx::
__aligned_membuf<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>
::_M_addr(__aligned_membuf<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>
*this)
{
return this;
}
|
|
18,549
|
google::protobuf::internal::AnyMetadata::InternalIs(google::protobuf::stringpiece_internal::StringPiece) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/any_lite.cc
|
bool AnyMetadata::InternalIs(StringPiece type_name) const {
StringPiece type_url = type_url_->Get();
return type_url.size() >= type_name.size() + 1 &&
type_url[type_url.size() - type_name.size() - 1] == '/' &&
HasSuffixString(type_url, type_name);
}
|
O3
|
cpp
|
google::protobuf::internal::AnyMetadata::InternalIs(google::protobuf::stringpiece_internal::StringPiece) const:
movq (%rdi), %rax
movq (%rax), %rcx
andq $-0x4, %rcx
movq 0x8(%rcx), %rdi
leaq 0x1(%rdx), %rax
cmpq %rax, %rdi
jae 0x9209e
xorl %eax, %eax
retq
xorl %eax, %eax
cmpq %rdx, %rdi
jb 0x9209d
movq %rdx, %r8
notq %r8
addq (%rcx), %rdi
cmpb $0x2f, (%r8,%rdi)
jne 0x9209d
pushq %rax
subq %rdx, %rdi
callq 0xf370
testl %eax, %eax
sete %al
addq $0x8, %rsp
retq
|
_ZNK6google8protobuf8internal11AnyMetadata10InternalIsENS0_20stringpiece_internal11StringPieceE:
mov rax, [rdi]
mov rcx, [rax]
and rcx, 0FFFFFFFFFFFFFFFCh
mov rdi, [rcx+8]
lea rax, [rdx+1]
cmp rdi, rax
jnb short loc_9209E
xor eax, eax
locret_9209D:
retn
loc_9209E:
xor eax, eax
cmp rdi, rdx
jb short locret_9209D
mov r8, rdx
not r8
add rdi, [rcx]
cmp byte ptr [r8+rdi], 2Fh ; '/'
jnz short locret_9209D
push rax
sub rdi, rdx
call _bcmp
test eax, eax
setz al
add rsp, 8
retn
|
bool google::protobuf::internal::AnyMetadata::InternalIs(_QWORD **a1, long long a2, unsigned long long a3)
{
_QWORD *v3; // rcx
unsigned long long v4; // rdi
bool result; // al
unsigned long long v6; // rdi
v3 = (_QWORD *)(**a1 & 0xFFFFFFFFFFFFFFFCLL);
v4 = v3[1];
if ( v4 < a3 + 1 )
return 0;
result = 0;
if ( v4 >= a3 )
{
v6 = *v3 + v4;
if ( *(_BYTE *)(~a3 + v6) == 47 )
return (unsigned int)bcmp(v6 - a3, a2) == 0;
}
return result;
}
|
InternalIs:
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RAX]
AND RCX,-0x4
MOV RDI,qword ptr [RCX + 0x8]
LEA RAX,[RDX + 0x1]
CMP RDI,RAX
JNC 0x0019209e
XOR EAX,EAX
LAB_0019209d:
RET
LAB_0019209e:
XOR EAX,EAX
CMP RDI,RDX
JC 0x0019209d
MOV R8,RDX
NOT R8
ADD RDI,qword ptr [RCX]
CMP byte ptr [R8 + RDI*0x1],0x2f
JNZ 0x0019209d
PUSH RAX
SUB RDI,RDX
CALL 0x0010f370
TEST EAX,EAX
SETZ AL
ADD RSP,0x8
RET
|
/* google::protobuf::internal::AnyMetadata::InternalIs(google::protobuf::stringpiece_internal::StringPiece)
const */
int8
google::protobuf::internal::AnyMetadata::InternalIs(int8 *param_1,void *param_2,ulong param_3)
{
ulong uVar1;
int iVar2;
int4 extraout_var;
long lVar3;
uVar1 = ((long *)(*(ulong *)*param_1 & 0xfffffffffffffffc))[1];
if (((param_3 + 1 <= uVar1) && (param_3 <= uVar1)) &&
(lVar3 = uVar1 + *(long *)(*(ulong *)*param_1 & 0xfffffffffffffffc),
*(char *)(~param_3 + lVar3) == '/')) {
iVar2 = bcmp((void *)(lVar3 - param_3),param_2,param_3);
return CONCAT71((int7)(CONCAT44(extraout_var,iVar2) >> 8),iVar2 == 0);
}
return 0;
}
|
|
18,550
|
mi_find_last_pos
|
eloqsql/storage/myisam/mi_write.c
|
static uchar *_mi_find_last_pos(MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint *return_key_length,
uchar **after_key)
{
uint keys, length, UNINIT_VAR(last_length), key_ref_length;
uchar *end,*lastpos,*prevpos;
uchar key_buff[HA_MAX_KEY_BUFF];
DBUG_ENTER("_mi_find_last_pos");
key_ref_length=2;
length=mi_getint(page)-key_ref_length;
page+=key_ref_length;
if (!(keyinfo->flag &
(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |
HA_BINARY_PACK_KEY)))
{
keys=length/keyinfo->keylength-2;
*return_key_length=length=keyinfo->keylength;
end=page+keys*length;
*after_key=end+length;
memcpy(key,end,length);
DBUG_RETURN(end);
}
end=page+length-key_ref_length;
DBUG_ASSERT(page < end);
*key='\0';
length=0;
lastpos=page;
do
{
prevpos=lastpos; lastpos=page;
last_length=length;
memcpy(key, key_buff, length); /* previous key */
if (!(length=(*keyinfo->get_key)(keyinfo,0,&page,key_buff)))
{
mi_print_error(keyinfo->share, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
DBUG_RETURN(0);
}
} while (page < end);
*return_key_length=last_length;
*after_key=lastpos;
DBUG_PRINT("exit",("returns: %p page: %p end: %p",
prevpos, page, end));
DBUG_RETURN(prevpos);
}
|
O0
|
c
|
mi_find_last_pos:
pushq %rbp
movq %rsp, %rbp
subq $0x520, %rsp # imm = 0x520
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x4d0(%rbp)
movq %rsi, -0x4d8(%rbp)
movq %rdx, -0x4e0(%rbp)
movq %rcx, -0x4e8(%rbp)
movq %r8, -0x4f0(%rbp)
movl -0x4fc(%rbp), %eax
movl %eax, -0x4fc(%rbp)
movl $0x2, -0x500(%rbp)
movq -0x4d8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x4d8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
andl $0x7fff, %eax # imm = 0x7FFF
subl -0x500(%rbp), %eax
movl %eax, -0x4f8(%rbp)
movl -0x500(%rbp), %ecx
movq -0x4d8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x4d8(%rbp)
movq -0x4d0(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x2e, %eax
cmpl $0x0, %eax
jne 0xc73f5
movl -0x4f8(%rbp), %eax
movq -0x4d0(%rbp), %rcx
movzwl 0x12(%rcx), %ecx
xorl %edx, %edx
divl %ecx
subl $0x2, %eax
movl %eax, -0x4f4(%rbp)
movq -0x4d0(%rbp), %rax
movzwl 0x12(%rax), %ecx
movl %ecx, -0x4f8(%rbp)
movq -0x4e8(%rbp), %rax
movl %ecx, (%rax)
movq -0x4d8(%rbp), %rax
movl -0x4f4(%rbp), %ecx
imull -0x4f8(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x508(%rbp)
movq -0x508(%rbp), %rcx
movl -0x4f8(%rbp), %eax
addq %rax, %rcx
movq -0x4f0(%rbp), %rax
movq %rcx, (%rax)
movq -0x4e0(%rbp), %rdi
movq -0x508(%rbp), %rsi
movl -0x4f8(%rbp), %eax
movl %eax, %edx
callq 0x2a0a0
movq -0x508(%rbp), %rax
movq %rax, -0x4c8(%rbp)
jmp 0xc752d
movq -0x4d8(%rbp), %rax
movl -0x4f8(%rbp), %ecx
addq %rcx, %rax
movl -0x500(%rbp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x508(%rbp)
jmp 0xc741e
movq -0x4e0(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4f8(%rbp)
movq -0x4d8(%rbp), %rax
movq %rax, -0x510(%rbp)
movq -0x510(%rbp), %rax
movq %rax, -0x518(%rbp)
movq -0x4d8(%rbp), %rax
movq %rax, -0x510(%rbp)
movl -0x4f8(%rbp), %eax
movl %eax, -0x4fc(%rbp)
movq -0x4e0(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
movl -0x4f8(%rbp), %eax
movl %eax, %edx
callq 0x2a0a0
movq -0x4d0(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x4d0(%rbp), %rdi
leaq -0x4c0(%rbp), %rcx
xorl %esi, %esi
leaq -0x4d8(%rbp), %rdx
callq *%rax
movl %eax, -0x4f8(%rbp)
cmpl $0x0, %eax
jne 0xc74e5
movq -0x4d0(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0xadb40
callq 0xf55f0
movl $0x7e, (%rax)
movq $0x0, -0x4c8(%rbp)
jmp 0xc752d
jmp 0xc74e7
movq -0x4d8(%rbp), %rax
cmpq -0x508(%rbp), %rax
jb 0xc7440
movl -0x4fc(%rbp), %ecx
movq -0x4e8(%rbp), %rax
movl %ecx, (%rax)
movq -0x510(%rbp), %rcx
movq -0x4f0(%rbp), %rax
movq %rcx, (%rax)
jmp 0xc751d
jmp 0xc751f
movq -0x518(%rbp), %rax
movq %rax, -0x4c8(%rbp)
movq -0x4c8(%rbp), %rax
movq %rax, -0x520(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xc755d
movq -0x520(%rbp), %rax
addq $0x520, %rsp # imm = 0x520
popq %rbp
retq
callq 0x2a260
nopw %cs:(%rax,%rax)
|
_mi_find_last_pos:
push rbp
mov rbp, rsp
sub rsp, 520h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_4D0], rdi
mov [rbp+var_4D8], rsi
mov [rbp+var_4E0], rdx
mov [rbp+var_4E8], rcx
mov [rbp+var_4F0], r8
mov eax, [rbp+var_4FC]
mov [rbp+var_4FC], eax
mov [rbp+var_500], 2
mov rax, [rbp+var_4D8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_4D8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
and eax, 7FFFh
sub eax, [rbp+var_500]
mov [rbp+var_4F8], eax
mov ecx, [rbp+var_500]
mov rax, [rbp+var_4D8]
mov ecx, ecx
add rax, rcx
mov [rbp+var_4D8], rax
mov rax, [rbp+var_4D0]
movzx eax, word ptr [rax+0Ah]
and eax, 2Eh
cmp eax, 0
jnz loc_C73F5
mov eax, [rbp+var_4F8]
mov rcx, [rbp+var_4D0]
movzx ecx, word ptr [rcx+12h]
xor edx, edx
div ecx
sub eax, 2
mov [rbp+var_4F4], eax
mov rax, [rbp+var_4D0]
movzx ecx, word ptr [rax+12h]
mov [rbp+var_4F8], ecx
mov rax, [rbp+var_4E8]
mov [rax], ecx
mov rax, [rbp+var_4D8]
mov ecx, [rbp+var_4F4]
imul ecx, [rbp+var_4F8]
mov ecx, ecx
add rax, rcx
mov [rbp+var_508], rax
mov rcx, [rbp+var_508]
mov eax, [rbp+var_4F8]
add rcx, rax
mov rax, [rbp+var_4F0]
mov [rax], rcx
mov rdi, [rbp+var_4E0]
mov rsi, [rbp+var_508]
mov eax, [rbp+var_4F8]
mov edx, eax
call _memcpy
mov rax, [rbp+var_508]
mov [rbp+var_4C8], rax
jmp loc_C752D
loc_C73F5:
mov rax, [rbp+var_4D8]
mov ecx, [rbp+var_4F8]
add rax, rcx
mov ecx, [rbp+var_500]
mov edx, ecx
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_508], rax
jmp short $+2
loc_C741E:
mov rax, [rbp+var_4E0]
mov byte ptr [rax], 0
mov [rbp+var_4F8], 0
mov rax, [rbp+var_4D8]
mov [rbp+var_510], rax
loc_C7440:
mov rax, [rbp+var_510]
mov [rbp+var_518], rax
mov rax, [rbp+var_4D8]
mov [rbp+var_510], rax
mov eax, [rbp+var_4F8]
mov [rbp+var_4FC], eax
mov rdi, [rbp+var_4E0]
lea rsi, [rbp+var_4C0]
mov eax, [rbp+var_4F8]
mov edx, eax
call _memcpy
mov rax, [rbp+var_4D0]
mov rax, [rax+48h]
mov rdi, [rbp+var_4D0]
lea rcx, [rbp+var_4C0]
xor esi, esi
lea rdx, [rbp+var_4D8]
call rax
mov [rbp+var_4F8], eax
cmp eax, 0
jnz short loc_C74E5
mov rax, [rbp+var_4D0]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_4C8], 0
jmp short loc_C752D
loc_C74E5:
jmp short $+2
loc_C74E7:
mov rax, [rbp+var_4D8]
cmp rax, [rbp+var_508]
jb loc_C7440
mov ecx, [rbp+var_4FC]
mov rax, [rbp+var_4E8]
mov [rax], ecx
mov rcx, [rbp+var_510]
mov rax, [rbp+var_4F0]
mov [rax], rcx
jmp short $+2
loc_C751D:
jmp short $+2
loc_C751F:
mov rax, [rbp+var_518]
mov [rbp+var_4C8], rax
loc_C752D:
mov rax, [rbp+var_4C8]
mov [rbp+var_520], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_C755D
mov rax, [rbp+var_520]
add rsp, 520h
pop rbp
retn
loc_C755D:
call ___stack_chk_fail
|
unsigned __int16 * mi_find_last_pos(
long long a1,
unsigned __int16 *a2,
_BYTE *a3,
unsigned int *a4,
unsigned __int16 **a5,
double a6)
{
unsigned __int16 *v7; // [rsp+8h] [rbp-518h]
unsigned __int16 *v8; // [rsp+10h] [rbp-510h]
char *v9; // [rsp+18h] [rbp-508h]
unsigned long long v10; // [rsp+18h] [rbp-508h]
unsigned int v11; // [rsp+24h] [rbp-4FCh]
unsigned int v12; // [rsp+28h] [rbp-4F8h]
unsigned int v13; // [rsp+28h] [rbp-4F8h]
unsigned int v14; // [rsp+28h] [rbp-4F8h]
unsigned int v15; // [rsp+2Ch] [rbp-4F4h]
unsigned __int16 *v19; // [rsp+48h] [rbp-4D8h] BYREF
long long v20; // [rsp+50h] [rbp-4D0h]
_BYTE v22[1208]; // [rsp+60h] [rbp-4C0h] BYREF
unsigned long long v23; // [rsp+518h] [rbp-8h]
v23 = __readfsqword(0x28u);
v20 = a1;
v19 = a2;
v12 = (_byteswap_ushort(*a2) & 0x7FFF) - 2;
v19 = a2 + 1;
if ( (*(_WORD *)(a1 + 10) & 0x2E) != 0 )
{
v10 = (unsigned long long)v19 + v12 - 2;
*a3 = 0;
v14 = 0;
v8 = v19;
do
{
v7 = v8;
v8 = v19;
v11 = v14;
memcpy(a3, v22, v14);
v14 = (*(long long ( **)(long long, _QWORD, unsigned __int16 **, _BYTE *))(v20 + 72))(v20, 0LL, &v19, v22);
if ( !v14 )
{
mi_report_error(126, *(_QWORD *)(*(_QWORD *)v20 + 616LL));
*(_DWORD *)my_thread_var(a6) = 126;
return 0LL;
}
}
while ( (unsigned long long)v19 < v10 );
*a4 = v11;
*a5 = v8;
return v7;
}
else
{
v15 = v12 / *(unsigned __int16 *)(v20 + 18) - 2;
v13 = *(unsigned __int16 *)(v20 + 18);
*a4 = v13;
v9 = (char *)v19 + v13 * v15;
*a5 = (unsigned __int16 *)&v9[v13];
memcpy(a3, v9, v13);
return (unsigned __int16 *)v9;
}
}
|
_mi_find_last_pos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x520
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x4d0],RDI
MOV qword ptr [RBP + -0x4d8],RSI
MOV qword ptr [RBP + -0x4e0],RDX
MOV qword ptr [RBP + -0x4e8],RCX
MOV qword ptr [RBP + -0x4f0],R8
MOV EAX,dword ptr [RBP + -0x4fc]
MOV dword ptr [RBP + -0x4fc],EAX
MOV dword ptr [RBP + -0x500],0x2
MOV RAX,qword ptr [RBP + -0x4d8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x4d8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
AND EAX,0x7fff
SUB EAX,dword ptr [RBP + -0x500]
MOV dword ptr [RBP + -0x4f8],EAX
MOV ECX,dword ptr [RBP + -0x500]
MOV RAX,qword ptr [RBP + -0x4d8]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x4d8],RAX
MOV RAX,qword ptr [RBP + -0x4d0]
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x2e
CMP EAX,0x0
JNZ 0x001c73f5
MOV EAX,dword ptr [RBP + -0x4f8]
MOV RCX,qword ptr [RBP + -0x4d0]
MOVZX ECX,word ptr [RCX + 0x12]
XOR EDX,EDX
DIV ECX
SUB EAX,0x2
MOV dword ptr [RBP + -0x4f4],EAX
MOV RAX,qword ptr [RBP + -0x4d0]
MOVZX ECX,word ptr [RAX + 0x12]
MOV dword ptr [RBP + -0x4f8],ECX
MOV RAX,qword ptr [RBP + -0x4e8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x4d8]
MOV ECX,dword ptr [RBP + -0x4f4]
IMUL ECX,dword ptr [RBP + -0x4f8]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x508],RAX
MOV RCX,qword ptr [RBP + -0x508]
MOV EAX,dword ptr [RBP + -0x4f8]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x4f0]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x4e0]
MOV RSI,qword ptr [RBP + -0x508]
MOV EAX,dword ptr [RBP + -0x4f8]
MOV EDX,EAX
CALL 0x0012a0a0
MOV RAX,qword ptr [RBP + -0x508]
MOV qword ptr [RBP + -0x4c8],RAX
JMP 0x001c752d
LAB_001c73f5:
MOV RAX,qword ptr [RBP + -0x4d8]
MOV ECX,dword ptr [RBP + -0x4f8]
ADD RAX,RCX
MOV ECX,dword ptr [RBP + -0x500]
MOV EDX,ECX
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x508],RAX
JMP 0x001c741e
LAB_001c741e:
MOV RAX,qword ptr [RBP + -0x4e0]
MOV byte ptr [RAX],0x0
MOV dword ptr [RBP + -0x4f8],0x0
MOV RAX,qword ptr [RBP + -0x4d8]
MOV qword ptr [RBP + -0x510],RAX
LAB_001c7440:
MOV RAX,qword ptr [RBP + -0x510]
MOV qword ptr [RBP + -0x518],RAX
MOV RAX,qword ptr [RBP + -0x4d8]
MOV qword ptr [RBP + -0x510],RAX
MOV EAX,dword ptr [RBP + -0x4f8]
MOV dword ptr [RBP + -0x4fc],EAX
MOV RDI,qword ptr [RBP + -0x4e0]
LEA RSI,[RBP + -0x4c0]
MOV EAX,dword ptr [RBP + -0x4f8]
MOV EDX,EAX
CALL 0x0012a0a0
MOV RAX,qword ptr [RBP + -0x4d0]
MOV RAX,qword ptr [RAX + 0x48]
MOV RDI,qword ptr [RBP + -0x4d0]
LEA RCX,[RBP + -0x4c0]
XOR ESI,ESI
LEA RDX,[RBP + -0x4d8]
CALL RAX
MOV dword ptr [RBP + -0x4f8],EAX
CMP EAX,0x0
JNZ 0x001c74e5
MOV RAX,qword ptr [RBP + -0x4d0]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x001adb40
CALL 0x001f55f0
MOV dword ptr [RAX],0x7e
MOV qword ptr [RBP + -0x4c8],0x0
JMP 0x001c752d
LAB_001c74e5:
JMP 0x001c74e7
LAB_001c74e7:
MOV RAX,qword ptr [RBP + -0x4d8]
CMP RAX,qword ptr [RBP + -0x508]
JC 0x001c7440
MOV ECX,dword ptr [RBP + -0x4fc]
MOV RAX,qword ptr [RBP + -0x4e8]
MOV dword ptr [RAX],ECX
MOV RCX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RBP + -0x4f0]
MOV qword ptr [RAX],RCX
JMP 0x001c751d
LAB_001c751d:
JMP 0x001c751f
LAB_001c751f:
MOV RAX,qword ptr [RBP + -0x518]
MOV qword ptr [RBP + -0x4c8],RAX
LAB_001c752d:
MOV RAX,qword ptr [RBP + -0x4c8]
MOV qword ptr [RBP + -0x520],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001c755d
MOV RAX,qword ptr [RBP + -0x520]
ADD RSP,0x520
POP RBP
RET
LAB_001c755d:
CALL 0x0012a260
|
byte * _mi_find_last_pos(long *param_1,byte *param_2,int1 *param_3,uint *param_4,
int8 *param_5)
{
ushort uVar1;
byte *pbVar2;
byte *pbVar3;
uint uVar4;
byte *pbVar5;
int4 *puVar6;
uint uVar7;
long in_FS_OFFSET;
byte *local_518;
uint local_500;
byte *local_4e0;
long *local_4d8;
byte *local_4d0;
int1 local_4c8 [1208];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = ((uint)param_2[1] | (*param_2 & 0x7f) << 8) - 2;
local_518 = param_2 + 2;
local_4e0 = local_518;
local_4d8 = param_1;
if ((*(ushort *)((long)param_1 + 10) & 0x2e) == 0) {
uVar1 = *(ushort *)((long)param_1 + 0x12);
uVar7 = (uint)*(ushort *)((long)param_1 + 0x12);
*param_4 = uVar7;
local_518 = local_518 + (uVar4 / uVar1 - 2) * uVar7;
*param_5 = local_518 + uVar7;
memcpy(param_3,local_518,(ulong)uVar7);
local_4d0 = local_518;
}
else {
pbVar5 = local_518 + ((ulong)uVar4 - 2);
*param_3 = 0;
local_500 = 0;
uVar4 = local_500;
do {
local_500 = uVar4;
pbVar3 = local_4e0;
pbVar2 = local_518;
local_518 = local_4e0;
memcpy(param_3,local_4c8,(ulong)local_500);
uVar4 = (*(code *)local_4d8[9])(local_4d8,0,&local_4e0,local_4c8);
if (uVar4 == 0) {
mi_report_error(0x7e,*(int8 *)(*local_4d8 + 0x268));
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x7e;
local_4d0 = (byte *)0x0;
goto LAB_001c752d;
}
} while (local_4e0 < pbVar5);
*param_4 = local_500;
*param_5 = pbVar3;
local_4d0 = pbVar2;
}
LAB_001c752d:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_4d0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
18,551
|
aimrt::runtime::core::logger::LogFormatter::FormatThreadId(aimrt::runtime::core::logger::LogDataWrapper const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
|
aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/../core/logger/formatter.h
|
static void FormatThreadId(const LogDataWrapper& data, std::string& buffer) {
buffer.append(std::to_string(data.thread_id));
}
|
O3
|
c
|
aimrt::runtime::core::logger::LogFormatter::FormatThreadId(aimrt::runtime::core::logger::LogDataWrapper const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq 0x10(%rdi), %r14
movl $0x1, %esi
cmpq $0xa, %r14
jb 0xc28d8
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r14, %rcx
cmpq $0x63, %rcx
jbe 0xc28d1
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0xc28d6
cmpq $0x2710, %rcx # imm = 0x2710
jb 0xc28d8
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0xc289b
addl $-0x3, %esi
jmp 0xc28d8
addl $-0x2, %esi
jmp 0xc28d8
decl %esi
movl %esi, %esi
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x80450
movq (%r15), %rdi
movl 0x8(%r15), %esi
movq %r14, %rdx
callq 0x81f00
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x83fd0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xc2928
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x82190
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xc294e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x82190
movq %rbx, %rdi
callq 0x83b70
|
_ZN5aimrt7runtime4core6logger12LogFormatter14FormatThreadIdERKNS2_14LogDataWrapperERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rsi
mov r14, [rdi+10h]
mov esi, 1
cmp r14, 0Ah
jb short loc_C28D8
mov esi, 4
mov rdi, 346DC5D63886594Bh
mov rcx, r14
loc_C289B:
cmp rcx, 63h ; 'c'
jbe short loc_C28D1
cmp rcx, 3E7h
jbe short loc_C28D6
cmp rcx, 2710h
jb short loc_C28D8
mov rax, rcx
mul rdi
shr rdx, 0Bh
add esi, 4
cmp rcx, 1869Fh
mov rcx, rdx
ja short loc_C289B
add esi, 0FFFFFFFDh
jmp short loc_C28D8
loc_C28D1:
add esi, 0FFFFFFFEh
jmp short loc_C28D8
loc_C28D6:
dec esi
loc_C28D8:
mov esi, esi
lea r12, [rsp+48h+var_30]
mov [r12-10h], r12
lea r15, [rsp+48h+var_40]
mov rdi, r15
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [r15]
mov esi, [r15+8]
mov rdx, r14
call __ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r12
jz short loc_C2928
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C2928:
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_C294E
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C294E:
mov rdi, rbx
call __Unwind_Resume
|
void aimrt::runtime::core::logger::LogFormatter::FormatThreadId(long long a1, long long a2)
{
unsigned long long v3; // r14
unsigned int v4; // esi
unsigned long long v5; // rcx
bool v6; // cc
void *v7; // [rsp+8h] [rbp-40h] BYREF
long long v8; // [rsp+10h] [rbp-38h]
_QWORD v9[6]; // [rsp+18h] [rbp-30h] BYREF
v3 = *(_QWORD *)(a1 + 16);
v4 = 1;
if ( v3 >= 0xA )
{
v4 = 4;
v5 = *(_QWORD *)(a1 + 16);
while ( 1 )
{
if ( v5 <= 0x63 )
{
v4 -= 2;
goto LABEL_10;
}
if ( v5 <= 0x3E7 )
break;
if ( v5 < 0x2710 )
goto LABEL_10;
v4 += 4;
v6 = v5 <= 0x1869F;
v5 /= 0x2710uLL;
if ( v6 )
{
v4 -= 3;
goto LABEL_10;
}
}
--v4;
}
LABEL_10:
v7 = v9;
std::string::_M_construct(&v7, v4, 0LL);
std::__detail::__to_chars_10_impl<unsigned long>(v7, (unsigned int)v8, v3);
std::string::_M_append(a2, v7, v8);
if ( v7 != v9 )
operator delete(v7, v9[0] + 1LL);
}
|
FormatThreadId:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV R14,qword ptr [RDI + 0x10]
MOV ESI,0x1
CMP R14,0xa
JC 0x001c28d8
MOV ESI,0x4
MOV RDI,0x346dc5d63886594b
MOV RCX,R14
LAB_001c289b:
CMP RCX,0x63
JBE 0x001c28d1
CMP RCX,0x3e7
JBE 0x001c28d6
CMP RCX,0x2710
JC 0x001c28d8
MOV RAX,RCX
MUL RDI
SHR RDX,0xb
ADD ESI,0x4
CMP RCX,0x1869f
MOV RCX,RDX
JA 0x001c289b
ADD ESI,-0x3
JMP 0x001c28d8
LAB_001c28d1:
ADD ESI,-0x2
JMP 0x001c28d8
LAB_001c28d6:
DEC ESI
LAB_001c28d8:
MOV ESI,ESI
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LEA R15,[RSP + 0x8]
MOV RDI,R15
XOR EDX,EDX
CALL 0x00180450
MOV RDI,qword ptr [R15]
MOV ESI,dword ptr [R15 + 0x8]
MOV RDX,R14
CALL 0x00181f00
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LAB_001c2909:
MOV RDI,RBX
CALL 0x00183fd0
LAB_001c2911:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x001c2928
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00182190
LAB_001c2928:
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* aimrt::runtime::core::logger::LogFormatter::FormatThreadId(aimrt::runtime::core::logger::LogDataWrapper
const&, std::__cxx11::string&) */
void aimrt::runtime::core::logger::LogFormatter::FormatThreadId
(LogDataWrapper *param_1,string *param_2)
{
ulong uVar1;
bool bVar2;
uint uVar3;
ulong uVar4;
uint uVar5;
long *local_40;
uint local_38;
int4 uStack_34;
long local_30 [2];
uVar1 = *(ulong *)(param_1 + 0x10);
uVar5 = 1;
if (9 < uVar1) {
uVar4 = uVar1;
uVar3 = 4;
do {
uVar5 = uVar3;
if (uVar4 < 100) {
uVar5 = uVar5 - 2;
goto LAB_001c28d8;
}
if (uVar4 < 1000) {
uVar5 = uVar5 - 1;
goto LAB_001c28d8;
}
if (uVar4 < 10000) goto LAB_001c28d8;
bVar2 = 99999 < uVar4;
uVar4 = uVar4 / 10000;
uVar3 = uVar5 + 4;
} while (bVar2);
uVar5 = uVar5 + 1;
}
LAB_001c28d8:
local_40 = local_30;
std::__cxx11::string::_M_construct((string *)&local_40,(ulong)uVar5,'\0');
std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_40,local_38,uVar1);
/* try { // try from 001c2909 to 001c2910 has its CatchHandler @ 001c2934 */
std::__cxx11::string::_M_append(param_2,(char *)local_40,CONCAT44(uStack_34,local_38));
if (local_40 != local_30) {
operator_delete(local_40,local_30[0] + 1);
}
return;
}
|
|
18,552
|
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::new_block_index()
|
angrymouse[P]emittra/include/concurrentqueue.h
|
bool new_block_index()
{
auto prev = blockIndex.load(std::memory_order_relaxed);
size_t prevCapacity = prev == nullptr ? 0 : prev->capacity;
auto entryCount = prev == nullptr ? nextBlockIndexCapacity : prevCapacity;
auto raw = static_cast<char*>((Traits::malloc)(
sizeof(BlockIndexHeader) +
std::alignment_of<BlockIndexEntry>::value - 1 + sizeof(BlockIndexEntry) * entryCount +
std::alignment_of<BlockIndexEntry*>::value - 1 + sizeof(BlockIndexEntry*) * nextBlockIndexCapacity));
if (raw == nullptr) {
return false;
}
auto header = new (raw) BlockIndexHeader;
auto entries = reinterpret_cast<BlockIndexEntry*>(details::align_for<BlockIndexEntry>(raw + sizeof(BlockIndexHeader)));
auto index = reinterpret_cast<BlockIndexEntry**>(details::align_for<BlockIndexEntry*>(reinterpret_cast<char*>(entries) + sizeof(BlockIndexEntry) * entryCount));
if (prev != nullptr) {
auto prevTail = prev->tail.load(std::memory_order_relaxed);
auto prevPos = prevTail;
size_t i = 0;
do {
prevPos = (prevPos + 1) & (prev->capacity - 1);
index[i++] = prev->index[prevPos];
} while (prevPos != prevTail);
assert(i == prevCapacity);
}
for (size_t i = 0; i != entryCount; ++i) {
new (entries + i) BlockIndexEntry;
entries[i].key.store(INVALID_BLOCK_BASE, std::memory_order_relaxed);
index[prevCapacity + i] = entries + i;
}
header->prev = prev;
header->entries = entries;
header->index = index;
header->capacity = nextBlockIndexCapacity;
header->tail.store((prevCapacity - 1) & (nextBlockIndexCapacity - 1), std::memory_order_relaxed);
blockIndex.store(header, std::memory_order_release);
nextBlockIndexCapacity <<= 1;
return true;
}
|
O1
|
c
|
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::new_block_index():
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %r15
testq %r15, %r15
je 0x83ea
movq (%r15), %r14
jmp 0x83ed
xorl %r14d, %r14d
testq %r15, %r15
movq 0x58(%rbx), %rax
movq %r14, %r13
cmoveq %rax, %r13
movq %r13, %r12
shlq $0x4, %r12
leaq (%r12,%rax,8), %rdi
addq $0x36, %rdi
callq 0x3360
testq %rax, %rax
je 0x84b2
leaq 0x28(%rax), %rcx
negl %ecx
andl $0x7, %ecx
addq %rax, %rcx
addq $0x28, %rcx
addq %rcx, %r12
movl %r12d, %edx
negl %edx
andl $0x7, %edx
testq %r15, %r15
je 0x8462
movq 0x8(%r15), %rsi
movq (%r15), %rdi
decq %rdi
movq %r12, %r8
movq %rsi, %r9
incq %r9
andq %rdi, %r9
movq 0x18(%r15), %r10
movq (%r10,%r9,8), %r10
movq %r10, (%r8)
addq $0x8, %r8
cmpq %rsi, %r9
jne 0x8448
addq %rdx, %r12
testq %r13, %r13
je 0x848a
leaq (%r12,%r14,8), %rdx
xorl %esi, %esi
movq %rcx, %rdi
movq $0x1, (%rdi)
movq %rdi, (%rdx,%rsi,8)
incq %rsi
addq $0x10, %rdi
cmpq %rsi, %r13
jne 0x8473
movq %r15, 0x20(%rax)
movq %rcx, 0x10(%rax)
movq %r12, 0x18(%rax)
movq 0x58(%rbx), %rcx
movq %rcx, (%rax)
decq %r14
decq %rcx
andq %r14, %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x60(%rbx)
shlq 0x58(%rbx)
testq %rax, %rax
setne %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
_ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ImplicitProducer15new_block_indexEv:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdi
mov r15, [rdi+60h]
test r15, r15
jz short loc_83EA
mov r14, [r15]
jmp short loc_83ED
loc_83EA:
xor r14d, r14d
loc_83ED:
test r15, r15
mov rax, [rbx+58h]
mov r13, r14
cmovz r13, rax
mov r12, r13
shl r12, 4
lea rdi, [r12+rax*8]
add rdi, 36h ; '6'
call _malloc
test rax, rax
jz loc_84B2
lea rcx, [rax+28h]
neg ecx
and ecx, 7
add rcx, rax
add rcx, 28h ; '('
add r12, rcx
mov edx, r12d
neg edx
and edx, 7
test r15, r15
jz short loc_8462
mov rsi, [r15+8]
mov rdi, [r15]
dec rdi
mov r8, r12
mov r9, rsi
loc_8448:
inc r9
and r9, rdi
mov r10, [r15+18h]
mov r10, [r10+r9*8]
mov [r8], r10
add r8, 8
cmp r9, rsi
jnz short loc_8448
loc_8462:
add r12, rdx
test r13, r13
jz short loc_848A
lea rdx, [r12+r14*8]
xor esi, esi
mov rdi, rcx
loc_8473:
mov qword ptr [rdi], 1
mov [rdx+rsi*8], rdi
inc rsi
add rdi, 10h
cmp r13, rsi
jnz short loc_8473
loc_848A:
mov [rax+20h], r15
mov [rax+10h], rcx
mov [rax+18h], r12
mov rcx, [rbx+58h]
mov [rax], rcx
dec r14
dec rcx
and rcx, r14
mov [rax+8], rcx
mov [rbx+60h], rax
shl qword ptr [rbx+58h], 1
loc_84B2:
test rax, rax
setnz al
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
bool moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::new_block_index(
long long a1)
{
long long *v2; // r15
long long v3; // r14
long long v4; // r13
_QWORD *v5; // rax
long long v6; // rcx
long long v7; // rsi
long long v8; // rdi
_QWORD *v9; // r8
long long v10; // r9
long long v11; // r12
long long v12; // rsi
_QWORD *v13; // rdi
long long v14; // rcx
v2 = *(long long **)(a1 + 96);
if ( v2 )
v3 = *v2;
else
v3 = 0LL;
v4 = v3;
if ( !v2 )
v4 = *(_QWORD *)(a1 + 88);
v5 = (_QWORD *)malloc(16 * v4 + 8LL * *(_QWORD *)(a1 + 88) + 54);
if ( v5 )
{
v6 = (long long)v5 + (-((_DWORD)v5 + 40) & 7) + 40;
if ( v2 )
{
v7 = v2[1];
v8 = *v2 - 1;
v9 = (_QWORD *)(v6 + 16 * v4);
v10 = v7;
do
{
v10 = v8 & (v10 + 1);
*v9++ = *(_QWORD *)(v2[3] + 8 * v10);
}
while ( v10 != v7 );
}
v11 = (-((_DWORD)v6 + 16 * (_DWORD)v4) & 7) + v6 + 16 * v4;
if ( v4 )
{
v12 = 0LL;
v13 = (_QWORD *)((char *)v5 + (-((_DWORD)v5 + 40) & 7) + 40);
do
{
*v13 = 1LL;
*(_QWORD *)(v11 + 8 * v3 + 8 * v12++) = v13;
v13 += 2;
}
while ( v4 != v12 );
}
v5[4] = v2;
v5[2] = v6;
v5[3] = v11;
v14 = *(_QWORD *)(a1 + 88);
*v5 = v14;
v5[1] = (v3 - 1) & (v14 - 1);
*(_QWORD *)(a1 + 96) = v5;
*(_QWORD *)(a1 + 88) *= 2LL;
}
return v5 != 0LL;
}
|
new_block_index:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDI
MOV R15,qword ptr [RDI + 0x60]
TEST R15,R15
JZ 0x001083ea
MOV R14,qword ptr [R15]
JMP 0x001083ed
LAB_001083ea:
XOR R14D,R14D
LAB_001083ed:
TEST R15,R15
MOV RAX,qword ptr [RBX + 0x58]
MOV R13,R14
CMOVZ R13,RAX
MOV R12,R13
SHL R12,0x4
LEA RDI,[R12 + RAX*0x8]
ADD RDI,0x36
CALL 0x00103360
TEST RAX,RAX
JZ 0x001084b2
LEA RCX,[RAX + 0x28]
NEG ECX
AND ECX,0x7
ADD RCX,RAX
ADD RCX,0x28
ADD R12,RCX
MOV EDX,R12D
NEG EDX
AND EDX,0x7
TEST R15,R15
JZ 0x00108462
MOV RSI,qword ptr [R15 + 0x8]
MOV RDI,qword ptr [R15]
DEC RDI
MOV R8,R12
MOV R9,RSI
LAB_00108448:
INC R9
AND R9,RDI
MOV R10,qword ptr [R15 + 0x18]
MOV R10,qword ptr [R10 + R9*0x8]
MOV qword ptr [R8],R10
ADD R8,0x8
CMP R9,RSI
JNZ 0x00108448
LAB_00108462:
ADD R12,RDX
TEST R13,R13
JZ 0x0010848a
LEA RDX,[R12 + R14*0x8]
XOR ESI,ESI
MOV RDI,RCX
LAB_00108473:
MOV qword ptr [RDI],0x1
MOV qword ptr [RDX + RSI*0x8],RDI
INC RSI
ADD RDI,0x10
CMP R13,RSI
JNZ 0x00108473
LAB_0010848a:
MOV qword ptr [RAX + 0x20],R15
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],R12
MOV RCX,qword ptr [RBX + 0x58]
MOV qword ptr [RAX],RCX
DEC R14
DEC RCX
AND RCX,R14
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RBX + 0x60],RAX
SHL qword ptr [RBX + 0x58],0x1
LAB_001084b2:
TEST RAX,RAX
SETNZ AL
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::new_block_index() */
bool __thiscall
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>
::ImplicitProducer::new_block_index(ImplicitProducer *this)
{
long *plVar1;
ulong uVar2;
long *plVar3;
int8 *puVar4;
long lVar5;
int8 *puVar6;
int8 *puVar7;
ulong uVar8;
long lVar9;
long lVar10;
long lVar11;
plVar1 = *(long **)(this + 0x60);
if (plVar1 == (long *)0x0) {
lVar11 = 0;
}
else {
lVar11 = *plVar1;
}
lVar10 = lVar11;
if (plVar1 == (long *)0x0) {
lVar10 = *(long *)(this + 0x58);
}
plVar3 = (long *)malloc(lVar10 * 0x10 + *(long *)(this + 0x58) * 8 + 0x36);
if (plVar3 != (long *)0x0) {
puVar4 = (int8 *)((long)plVar3 + (ulong)(-((int)plVar3 + 0x28) & 7) + 0x28);
puVar6 = puVar4 + lVar10 * 2;
if (plVar1 != (long *)0x0) {
uVar2 = plVar1[1];
lVar9 = *plVar1;
puVar7 = puVar6;
uVar8 = uVar2;
do {
uVar8 = uVar8 + 1 & lVar9 - 1U;
*puVar7 = *(int8 *)(plVar1[3] + uVar8 * 8);
puVar7 = puVar7 + 1;
} while (uVar8 != uVar2);
}
lVar9 = (long)puVar6 + (ulong)(-(int)puVar6 & 7);
if (lVar10 != 0) {
lVar5 = 0;
puVar6 = puVar4;
do {
*puVar6 = 1;
*(int8 **)(lVar9 + lVar11 * 8 + lVar5 * 8) = puVar6;
lVar5 = lVar5 + 1;
puVar6 = puVar6 + 2;
} while (lVar10 != lVar5);
}
plVar3[4] = (long)plVar1;
plVar3[2] = (long)puVar4;
plVar3[3] = lVar9;
lVar10 = *(long *)(this + 0x58);
*plVar3 = lVar10;
plVar3[1] = lVar10 - 1U & lVar11 - 1U;
*(long **)(this + 0x60) = plVar3;
*(long *)(this + 0x58) = *(long *)(this + 0x58) << 1;
}
return plVar3 != (long *)0x0;
}
|
|
18,553
|
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::new_block_index()
|
angrymouse[P]emittra/include/concurrentqueue.h
|
bool new_block_index()
{
auto prev = blockIndex.load(std::memory_order_relaxed);
size_t prevCapacity = prev == nullptr ? 0 : prev->capacity;
auto entryCount = prev == nullptr ? nextBlockIndexCapacity : prevCapacity;
auto raw = static_cast<char*>((Traits::malloc)(
sizeof(BlockIndexHeader) +
std::alignment_of<BlockIndexEntry>::value - 1 + sizeof(BlockIndexEntry) * entryCount +
std::alignment_of<BlockIndexEntry*>::value - 1 + sizeof(BlockIndexEntry*) * nextBlockIndexCapacity));
if (raw == nullptr) {
return false;
}
auto header = new (raw) BlockIndexHeader;
auto entries = reinterpret_cast<BlockIndexEntry*>(details::align_for<BlockIndexEntry>(raw + sizeof(BlockIndexHeader)));
auto index = reinterpret_cast<BlockIndexEntry**>(details::align_for<BlockIndexEntry*>(reinterpret_cast<char*>(entries) + sizeof(BlockIndexEntry) * entryCount));
if (prev != nullptr) {
auto prevTail = prev->tail.load(std::memory_order_relaxed);
auto prevPos = prevTail;
size_t i = 0;
do {
prevPos = (prevPos + 1) & (prev->capacity - 1);
index[i++] = prev->index[prevPos];
} while (prevPos != prevTail);
assert(i == prevCapacity);
}
for (size_t i = 0; i != entryCount; ++i) {
new (entries + i) BlockIndexEntry;
entries[i].key.store(INVALID_BLOCK_BASE, std::memory_order_relaxed);
index[prevCapacity + i] = entries + i;
}
header->prev = prev;
header->entries = entries;
header->index = index;
header->capacity = nextBlockIndexCapacity;
header->tail.store((prevCapacity - 1) & (nextBlockIndexCapacity - 1), std::memory_order_relaxed);
blockIndex.store(header, std::memory_order_release);
nextBlockIndexCapacity <<= 1;
return true;
}
|
O2
|
c
|
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::new_block_index():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x60(%rdi), %r15
testq %r15, %r15
je 0x73a1
movq (%r15), %r14
jmp 0x73a4
xorl %r14d, %r14d
testq %r15, %r15
movq 0x58(%rbx), %r12
movq %r14, %r13
cmoveq %r12, %r13
movq %r13, %rbp
shlq $0x4, %rbp
leaq 0x36(,%r12,8), %rdi
addq %rbp, %rdi
callq 0x3340
testq %rax, %rax
je 0x7491
movq %rbx, 0x10(%rsp)
leaq 0x28(%rax), %rsi
negl %esi
andl $0x7, %esi
leaq (%rax,%rsi), %rcx
addq $0x28, %rcx
movq %rcx, 0x8(%rsp)
leaq (%rcx,%rbp), %rdx
movl %edx, %edi
negl %edi
andl $0x7, %edi
testq %r15, %r15
je 0x7427
movq 0x8(%r15), %rcx
movq (%r15), %r9
movq 0x18(%r15), %r10
decq %r9
movq %rdx, %r11
movq %rcx, %r8
incq %r8
andq %r9, %r8
movq (%r10,%r8,8), %rbx
movq %rbx, (%r11)
addq $0x8, %r11
cmpq %rcx, %r8
jne 0x7411
addq %rdi, %rdx
leaq (,%r14,8), %rcx
addq %rbp, %rcx
addq %rsi, %rcx
leaq (%rax,%rcx), %rsi
addq $0x28, %rsi
xorl %edi, %edi
movq 0x8(%rsp), %rcx
movq %rcx, %r8
movq 0x10(%rsp), %r9
cmpq %rdi, %r13
je 0x7468
movq $0x1, (%r8)
movq %r8, (%rsi,%rdi,8)
incq %rdi
addq $0x10, %r8
jmp 0x744f
movq %r15, 0x20(%rax)
movq %rcx, 0x10(%rax)
movq %rdx, 0x18(%rax)
movq %r12, (%rax)
decq %r14
leaq -0x1(%r12), %rcx
andq %r14, %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x60(%r9)
addq %r12, %r12
movq %r12, 0x58(%r9)
testq %rax, %rax
setne %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ImplicitProducer15new_block_indexEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r15, [rdi+60h]
test r15, r15
jz short loc_73A1
mov r14, [r15]
jmp short loc_73A4
loc_73A1:
xor r14d, r14d
loc_73A4:
test r15, r15
mov r12, [rbx+58h]
mov r13, r14
cmovz r13, r12
mov rbp, r13
shl rbp, 4
lea rdi, ds:36h[r12*8]
add rdi, rbp
call _malloc
test rax, rax
jz loc_7491
mov [rsp+48h+var_38], rbx
lea rsi, [rax+28h]
neg esi
and esi, 7
lea rcx, [rax+rsi]
add rcx, 28h ; '('
mov [rsp+48h+var_40], rcx
lea rdx, [rcx+rbp]
mov edi, edx
neg edi
and edi, 7
test r15, r15
jz short loc_7427
mov rcx, [r15+8]
mov r9, [r15]
mov r10, [r15+18h]
dec r9
mov r11, rdx
mov r8, rcx
loc_7411:
inc r8
and r8, r9
mov rbx, [r10+r8*8]
mov [r11], rbx
add r11, 8
cmp r8, rcx
jnz short loc_7411
loc_7427:
add rdx, rdi
lea rcx, ds:0[r14*8]
add rcx, rbp
add rcx, rsi
lea rsi, [rax+rcx]
add rsi, 28h ; '('
xor edi, edi
mov rcx, [rsp+48h+var_40]
mov r8, rcx
mov r9, [rsp+48h+var_38]
loc_744F:
cmp r13, rdi
jz short loc_7468
mov qword ptr [r8], 1
mov [rsi+rdi*8], r8
inc rdi
add r8, 10h
jmp short loc_744F
loc_7468:
mov [rax+20h], r15
mov [rax+10h], rcx
mov [rax+18h], rdx
mov [rax], r12
dec r14
lea rcx, [r12-1]
and rcx, r14
mov [rax+8], rcx
mov [r9+60h], rax
add r12, r12
mov [r9+58h], r12
loc_7491:
test rax, rax
setnz al
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
bool moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::new_block_index(
long long a1)
{
long long *v1; // r15
long long v2; // r14
long long v3; // r12
long long v4; // r13
long long v5; // rbp
_QWORD *v6; // rax
long long v7; // rsi
long long v8; // rcx
long long v9; // r10
long long v10; // r9
_QWORD *v11; // r11
long long v12; // r8
long long v13; // rsi
long long v14; // rdi
_QWORD *v15; // r8
long long v17; // [rsp+8h] [rbp-40h]
v1 = *(long long **)(a1 + 96);
if ( v1 )
v2 = *v1;
else
v2 = 0LL;
v3 = *(_QWORD *)(a1 + 88);
v4 = v2;
if ( !v1 )
v4 = *(_QWORD *)(a1 + 88);
v5 = 16 * v4;
v6 = (_QWORD *)malloc(16 * v4 + 8 * v3 + 54);
if ( v6 )
{
v7 = -((_DWORD)v6 + 40) & 7;
v17 = (long long)v6 + v7 + 40;
if ( v1 )
{
v8 = v1[1];
v9 = v1[3];
v10 = *v1 - 1;
v11 = (_QWORD *)(v17 + v5);
v12 = v8;
do
{
v12 = v10 & (v12 + 1);
*v11++ = *(_QWORD *)(v9 + 8 * v12);
}
while ( v12 != v8 );
}
v13 = (long long)&v6[v2 + 5] + v7 + v5;
v14 = 0LL;
v15 = (_QWORD *)v17;
while ( v4 != v14 )
{
*v15 = 1LL;
*(_QWORD *)(v13 + 8 * v14++) = v15;
v15 += 2;
}
v6[4] = v1;
v6[2] = v17;
v6[3] = (-((_DWORD)v17 + (_DWORD)v5) & 7) + v17 + v5;
*v6 = v3;
v6[1] = (v2 - 1) & (v3 - 1);
*(_QWORD *)(a1 + 96) = v6;
*(_QWORD *)(a1 + 88) = 2 * v3;
}
return v6 != 0LL;
}
|
new_block_index:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R15,qword ptr [RDI + 0x60]
TEST R15,R15
JZ 0x001073a1
MOV R14,qword ptr [R15]
JMP 0x001073a4
LAB_001073a1:
XOR R14D,R14D
LAB_001073a4:
TEST R15,R15
MOV R12,qword ptr [RBX + 0x58]
MOV R13,R14
CMOVZ R13,R12
MOV RBP,R13
SHL RBP,0x4
LEA RDI,[0x36 + R12*0x8]
ADD RDI,RBP
CALL 0x00103340
TEST RAX,RAX
JZ 0x00107491
MOV qword ptr [RSP + 0x10],RBX
LEA RSI,[RAX + 0x28]
NEG ESI
AND ESI,0x7
LEA RCX,[RAX + RSI*0x1]
ADD RCX,0x28
MOV qword ptr [RSP + 0x8],RCX
LEA RDX,[RCX + RBP*0x1]
MOV EDI,EDX
NEG EDI
AND EDI,0x7
TEST R15,R15
JZ 0x00107427
MOV RCX,qword ptr [R15 + 0x8]
MOV R9,qword ptr [R15]
MOV R10,qword ptr [R15 + 0x18]
DEC R9
MOV R11,RDX
MOV R8,RCX
LAB_00107411:
INC R8
AND R8,R9
MOV RBX,qword ptr [R10 + R8*0x8]
MOV qword ptr [R11],RBX
ADD R11,0x8
CMP R8,RCX
JNZ 0x00107411
LAB_00107427:
ADD RDX,RDI
LEA RCX,[R14*0x8]
ADD RCX,RBP
ADD RCX,RSI
LEA RSI,[RAX + RCX*0x1]
ADD RSI,0x28
XOR EDI,EDI
MOV RCX,qword ptr [RSP + 0x8]
MOV R8,RCX
MOV R9,qword ptr [RSP + 0x10]
LAB_0010744f:
CMP R13,RDI
JZ 0x00107468
MOV qword ptr [R8],0x1
MOV qword ptr [RSI + RDI*0x8],R8
INC RDI
ADD R8,0x10
JMP 0x0010744f
LAB_00107468:
MOV qword ptr [RAX + 0x20],R15
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],RDX
MOV qword ptr [RAX],R12
DEC R14
LEA RCX,[R12 + -0x1]
AND RCX,R14
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [R9 + 0x60],RAX
ADD R12,R12
MOV qword ptr [R9 + 0x58],R12
LAB_00107491:
TEST RAX,RAX
SETNZ AL
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::new_block_index() */
bool __thiscall
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>
::ImplicitProducer::new_block_index(ImplicitProducer *this)
{
int8 *puVar1;
long *plVar2;
long lVar3;
ulong uVar4;
long lVar5;
long *plVar6;
int8 *puVar7;
ulong uVar8;
long lVar9;
ulong uVar10;
int8 *puVar11;
long lVar12;
long lVar13;
plVar2 = *(long **)(this + 0x60);
if (plVar2 == (long *)0x0) {
lVar13 = 0;
}
else {
lVar13 = *plVar2;
}
lVar3 = *(long *)(this + 0x58);
lVar12 = lVar13;
if (plVar2 == (long *)0x0) {
lVar12 = lVar3;
}
plVar6 = (long *)malloc(lVar3 * 8 + 0x36 + lVar12 * 0x10);
if (plVar6 != (long *)0x0) {
uVar8 = (ulong)(-((int)plVar6 + 0x28) & 7);
puVar7 = (int8 *)((long)plVar6 + uVar8 + 0x28);
puVar1 = puVar7 + lVar12 * 2;
if (plVar2 != (long *)0x0) {
uVar4 = plVar2[1];
lVar9 = *plVar2;
lVar5 = plVar2[3];
uVar10 = uVar4;
puVar11 = puVar1;
do {
uVar10 = uVar10 + 1 & lVar9 - 1U;
*puVar11 = *(int8 *)(lVar5 + uVar10 * 8);
puVar11 = puVar11 + 1;
} while (uVar10 != uVar4);
}
puVar11 = puVar7;
for (lVar9 = 0; lVar12 != lVar9; lVar9 = lVar9 + 1) {
*puVar11 = 1;
*(int8 **)((long)plVar6 + lVar9 * 8 + lVar13 * 8 + lVar12 * 0x10 + uVar8 + 0x28) =
puVar11;
puVar11 = puVar11 + 2;
}
plVar6[4] = (long)plVar2;
plVar6[2] = (long)puVar7;
plVar6[3] = (long)puVar1 + (ulong)(-(int)puVar1 & 7);
*plVar6 = lVar3;
plVar6[1] = lVar3 - 1U & lVar13 - 1U;
*(long **)(this + 0x60) = plVar6;
*(long *)(this + 0x58) = lVar3 * 2;
}
return plVar6 != (long *)0x0;
}
|
|
18,554
|
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::new_block_index()
|
angrymouse[P]emittra/include/concurrentqueue.h
|
bool new_block_index()
{
auto prev = blockIndex.load(std::memory_order_relaxed);
size_t prevCapacity = prev == nullptr ? 0 : prev->capacity;
auto entryCount = prev == nullptr ? nextBlockIndexCapacity : prevCapacity;
auto raw = static_cast<char*>((Traits::malloc)(
sizeof(BlockIndexHeader) +
std::alignment_of<BlockIndexEntry>::value - 1 + sizeof(BlockIndexEntry) * entryCount +
std::alignment_of<BlockIndexEntry*>::value - 1 + sizeof(BlockIndexEntry*) * nextBlockIndexCapacity));
if (raw == nullptr) {
return false;
}
auto header = new (raw) BlockIndexHeader;
auto entries = reinterpret_cast<BlockIndexEntry*>(details::align_for<BlockIndexEntry>(raw + sizeof(BlockIndexHeader)));
auto index = reinterpret_cast<BlockIndexEntry**>(details::align_for<BlockIndexEntry*>(reinterpret_cast<char*>(entries) + sizeof(BlockIndexEntry) * entryCount));
if (prev != nullptr) {
auto prevTail = prev->tail.load(std::memory_order_relaxed);
auto prevPos = prevTail;
size_t i = 0;
do {
prevPos = (prevPos + 1) & (prev->capacity - 1);
index[i++] = prev->index[prevPos];
} while (prevPos != prevTail);
assert(i == prevCapacity);
}
for (size_t i = 0; i != entryCount; ++i) {
new (entries + i) BlockIndexEntry;
entries[i].key.store(INVALID_BLOCK_BASE, std::memory_order_relaxed);
index[prevCapacity + i] = entries + i;
}
header->prev = prev;
header->entries = entries;
header->index = index;
header->capacity = nextBlockIndexCapacity;
header->tail.store((prevCapacity - 1) & (nextBlockIndexCapacity - 1), std::memory_order_relaxed);
blockIndex.store(header, std::memory_order_release);
nextBlockIndexCapacity <<= 1;
return true;
}
|
O3
|
c
|
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::new_block_index():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x60(%rdi), %r15
testq %r15, %r15
je 0x82b2
movq (%r15), %r14
jmp 0x82b5
xorl %r14d, %r14d
testq %r15, %r15
movq 0x58(%rbx), %r12
movq %r14, %rbp
cmoveq %r12, %rbp
movq %rbp, %r13
shlq $0x4, %r13
leaq 0x36(,%r12,8), %rdi
addq %r13, %rdi
callq 0x3360
testq %rax, %rax
je 0x8385
leaq 0x28(%rax), %rcx
negl %ecx
andl $0x7, %ecx
addq %rax, %rcx
addq $0x28, %rcx
addq %rcx, %r13
movl %r13d, %edx
negl %edx
andl $0x7, %edx
testq %r15, %r15
je 0x832d
movq 0x8(%r15), %rsi
movq (%r15), %rdi
movq 0x18(%r15), %r8
decq %rdi
movq %r13, %r9
movq %rsi, %r10
incq %r10
andq %rdi, %r10
movq (%r8,%r10,8), %r11
movq %r11, (%r9)
addq $0x8, %r9
cmpq %rsi, %r10
jne 0x8317
addq %rdx, %r13
testq %rbp, %rbp
je 0x835c
leaq (,%r14,8), %rdx
addq %r13, %rdx
xorl %esi, %esi
movq %rcx, %rdi
movq $0x1, (%rdi)
movq %rdi, (%rdx,%rsi,8)
incq %rsi
addq $0x10, %rdi
cmpq %rsi, %rbp
jne 0x8345
movq %r15, 0x20(%rax)
movq %rcx, 0x10(%rax)
movq %r13, 0x18(%rax)
movq %r12, (%rax)
decq %r14
leaq -0x1(%r12), %rcx
andq %r14, %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x60(%rbx)
addq %r12, %r12
movq %r12, 0x58(%rbx)
testq %rax, %rax
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ImplicitProducer15new_block_indexEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov r15, [rdi+60h]
test r15, r15
jz short loc_82B2
mov r14, [r15]
jmp short loc_82B5
loc_82B2:
xor r14d, r14d
loc_82B5:
test r15, r15
mov r12, [rbx+58h]
mov rbp, r14
cmovz rbp, r12
mov r13, rbp
shl r13, 4
lea rdi, ds:36h[r12*8]
add rdi, r13
call _malloc
test rax, rax
jz loc_8385
lea rcx, [rax+28h]
neg ecx
and ecx, 7
add rcx, rax
add rcx, 28h ; '('
add r13, rcx
mov edx, r13d
neg edx
and edx, 7
test r15, r15
jz short loc_832D
mov rsi, [r15+8]
mov rdi, [r15]
mov r8, [r15+18h]
dec rdi
mov r9, r13
mov r10, rsi
loc_8317:
inc r10
and r10, rdi
mov r11, [r8+r10*8]
mov [r9], r11
add r9, 8
cmp r10, rsi
jnz short loc_8317
loc_832D:
add r13, rdx
test rbp, rbp
jz short loc_835C
lea rdx, ds:0[r14*8]
add rdx, r13
xor esi, esi
mov rdi, rcx
loc_8345:
mov qword ptr [rdi], 1
mov [rdx+rsi*8], rdi
inc rsi
add rdi, 10h
cmp rbp, rsi
jnz short loc_8345
loc_835C:
mov [rax+20h], r15
mov [rax+10h], rcx
mov [rax+18h], r13
mov [rax], r12
dec r14
lea rcx, [r12-1]
and rcx, r14
mov [rax+8], rcx
mov [rbx+60h], rax
add r12, r12
mov [rbx+58h], r12
loc_8385:
test rax, rax
setnz al
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
bool moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::new_block_index(
long long a1)
{
long long *v2; // r15
long long v3; // r14
long long v4; // r12
long long v5; // rbp
_QWORD *v6; // rax
long long v7; // rcx
long long v8; // rsi
long long v9; // r8
long long v10; // rdi
_QWORD *v11; // r9
long long v12; // r10
long long v13; // r13
long long v14; // rsi
_QWORD *v15; // rdi
v2 = *(long long **)(a1 + 96);
if ( v2 )
v3 = *v2;
else
v3 = 0LL;
v4 = *(_QWORD *)(a1 + 88);
v5 = v3;
if ( !v2 )
v5 = *(_QWORD *)(a1 + 88);
v6 = (_QWORD *)malloc(16 * v5 + 8 * v4 + 54);
if ( v6 )
{
v7 = (long long)v6 + (-((_DWORD)v6 + 40) & 7) + 40;
if ( v2 )
{
v8 = v2[1];
v9 = v2[3];
v10 = *v2 - 1;
v11 = (_QWORD *)(v7 + 16 * v5);
v12 = v8;
do
{
v12 = v10 & (v12 + 1);
*v11++ = *(_QWORD *)(v9 + 8 * v12);
}
while ( v12 != v8 );
}
v13 = (-((_DWORD)v7 + 16 * (_DWORD)v5) & 7) + v7 + 16 * v5;
if ( v5 )
{
v14 = 0LL;
v15 = (_QWORD *)((char *)v6 + (-((_DWORD)v6 + 40) & 7) + 40);
do
{
*v15 = 1LL;
*(_QWORD *)(v13 + 8 * v3 + 8 * v14++) = v15;
v15 += 2;
}
while ( v5 != v14 );
}
v6[4] = v2;
v6[2] = v7;
v6[3] = v13;
*v6 = v4;
v6[1] = (v3 - 1) & (v4 - 1);
*(_QWORD *)(a1 + 96) = v6;
*(_QWORD *)(a1 + 88) = 2 * v4;
}
return v6 != 0LL;
}
|
new_block_index:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R15,qword ptr [RDI + 0x60]
TEST R15,R15
JZ 0x001082b2
MOV R14,qword ptr [R15]
JMP 0x001082b5
LAB_001082b2:
XOR R14D,R14D
LAB_001082b5:
TEST R15,R15
MOV R12,qword ptr [RBX + 0x58]
MOV RBP,R14
CMOVZ RBP,R12
MOV R13,RBP
SHL R13,0x4
LEA RDI,[0x36 + R12*0x8]
ADD RDI,R13
CALL 0x00103360
TEST RAX,RAX
JZ 0x00108385
LEA RCX,[RAX + 0x28]
NEG ECX
AND ECX,0x7
ADD RCX,RAX
ADD RCX,0x28
ADD R13,RCX
MOV EDX,R13D
NEG EDX
AND EDX,0x7
TEST R15,R15
JZ 0x0010832d
MOV RSI,qword ptr [R15 + 0x8]
MOV RDI,qword ptr [R15]
MOV R8,qword ptr [R15 + 0x18]
DEC RDI
MOV R9,R13
MOV R10,RSI
LAB_00108317:
INC R10
AND R10,RDI
MOV R11,qword ptr [R8 + R10*0x8]
MOV qword ptr [R9],R11
ADD R9,0x8
CMP R10,RSI
JNZ 0x00108317
LAB_0010832d:
ADD R13,RDX
TEST RBP,RBP
JZ 0x0010835c
LEA RDX,[R14*0x8]
ADD RDX,R13
XOR ESI,ESI
MOV RDI,RCX
LAB_00108345:
MOV qword ptr [RDI],0x1
MOV qword ptr [RDX + RSI*0x8],RDI
INC RSI
ADD RDI,0x10
CMP RBP,RSI
JNZ 0x00108345
LAB_0010835c:
MOV qword ptr [RAX + 0x20],R15
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],R13
MOV qword ptr [RAX],R12
DEC R14
LEA RCX,[R12 + -0x1]
AND RCX,R14
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RBX + 0x60],RAX
ADD R12,R12
MOV qword ptr [RBX + 0x58],R12
LAB_00108385:
TEST RAX,RAX
SETNZ AL
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::new_block_index() */
bool __thiscall
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>
::ImplicitProducer::new_block_index(ImplicitProducer *this)
{
long *plVar1;
long lVar2;
ulong uVar3;
long *plVar4;
int8 *puVar5;
long lVar6;
long lVar7;
int8 *puVar8;
int8 *puVar9;
ulong uVar10;
long lVar11;
long lVar12;
plVar1 = *(long **)(this + 0x60);
if (plVar1 == (long *)0x0) {
lVar12 = 0;
}
else {
lVar12 = *plVar1;
}
lVar2 = *(long *)(this + 0x58);
lVar6 = lVar12;
if (plVar1 == (long *)0x0) {
lVar6 = lVar2;
}
plVar4 = (long *)malloc(lVar2 * 8 + 0x36 + lVar6 * 0x10);
if (plVar4 != (long *)0x0) {
puVar5 = (int8 *)((long)plVar4 + (ulong)(-((int)plVar4 + 0x28) & 7) + 0x28);
puVar8 = puVar5 + lVar6 * 2;
if (plVar1 != (long *)0x0) {
uVar3 = plVar1[1];
lVar11 = *plVar1;
lVar7 = plVar1[3];
puVar9 = puVar8;
uVar10 = uVar3;
do {
uVar10 = uVar10 + 1 & lVar11 - 1U;
*puVar9 = *(int8 *)(lVar7 + uVar10 * 8);
puVar9 = puVar9 + 1;
} while (uVar10 != uVar3);
}
lVar11 = (long)puVar8 + (ulong)(-(int)puVar8 & 7);
if (lVar6 != 0) {
lVar7 = 0;
puVar8 = puVar5;
do {
*puVar8 = 1;
*(int8 **)(lVar12 * 8 + lVar11 + lVar7 * 8) = puVar8;
lVar7 = lVar7 + 1;
puVar8 = puVar8 + 2;
} while (lVar6 != lVar7);
}
plVar4[4] = (long)plVar1;
plVar4[2] = (long)puVar5;
plVar4[3] = lVar11;
*plVar4 = lVar2;
plVar4[1] = lVar2 - 1U & lVar12 - 1U;
*(long **)(this + 0x60) = plVar4;
*(long *)(this + 0x58) = lVar2 * 2;
}
return plVar4 != (long *)0x0;
}
|
|
18,555
|
mi_get_prev_key
|
eloqsql/storage/myisam/mi_search.c
|
static my_bool _mi_get_prev_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uchar *keypos,
uint *return_key_length)
{
uint nod_flag;
DBUG_ENTER("_mi_get_prev_key");
nod_flag=mi_test_if_nod(page);
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)))
{
*return_key_length=keyinfo->keylength;
bmove((uchar*) key,(uchar*) keypos- *return_key_length-nod_flag,
*return_key_length);
DBUG_RETURN(0);
}
else
{
page+=2+nod_flag;
key[0]=0; /* safety */
while (page < keypos)
{
*return_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key);
if (*return_key_length == 0)
{
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
DBUG_RETURN(1);
}
}
}
DBUG_RETURN(0);
}
|
O0
|
c
|
mi_get_prev_key:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xc2813
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x17c(%rax), %eax
movl %eax, -0x40(%rbp)
jmp 0xc281a
xorl %eax, %eax
movl %eax, -0x40(%rbp)
jmp 0xc281a
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x28, %eax
cmpl $0x0, %eax
jne 0xc2879
movq -0x18(%rbp), %rax
movzwl 0x12(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rsi
movl -0x3c(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rsi
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, %edx
callq 0x29130
movb $0x0, -0x1(%rbp)
jmp 0xc28fa
movl -0x3c(%rbp), %ecx
addl $0x2, %ecx
movq -0x20(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0xc28f2
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x18(%rbp), %rdi
movl -0x3c(%rbp), %esi
movq -0x28(%rbp), %rcx
leaq -0x20(%rbp), %rdx
callq *%rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xc28f0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0xb1c40
callq 0xf9990
movl $0x7e, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0xc28fa
jmp 0xc2893
jmp 0xc28f4
jmp 0xc28f6
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_mi_get_prev_key:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
and eax, 80h
cmp eax, 0
jz short loc_C2813
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+17Ch]
mov [rbp+var_40], eax
jmp short loc_C281A
loc_C2813:
xor eax, eax
mov [rbp+var_40], eax
jmp short $+2
loc_C281A:
mov eax, [rbp+var_40]
mov [rbp+var_3C], eax
mov rax, [rbp+var_18]
movzx eax, word ptr [rax+0Ah]
and eax, 28h
cmp eax, 0
jnz short loc_C2879
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+12h]
mov rax, [rbp+var_38]
mov [rax], ecx
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_30]
mov rax, [rbp+var_38]
mov eax, [rax]
mov ecx, eax
xor eax, eax
sub rax, rcx
add rsi, rax
mov eax, [rbp+var_3C]
mov ecx, eax
xor eax, eax
sub rax, rcx
add rsi, rax
mov rax, [rbp+var_38]
mov eax, [rax]
mov edx, eax
call _memmove
mov [rbp+var_1], 0
jmp loc_C28FA
loc_C2879:
mov ecx, [rbp+var_3C]
add ecx, 2
mov rax, [rbp+var_20]
mov ecx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
loc_C2893:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnb short loc_C28F2
mov rax, [rbp+var_18]
mov rax, [rax+48h]
mov rdi, [rbp+var_18]
mov esi, [rbp+var_3C]
mov rcx, [rbp+var_28]
lea rdx, [rbp+var_20]
call rax
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax], ecx
mov rax, [rbp+var_38]
cmp dword ptr [rax], 0
jnz short loc_C28F0
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_1], 1
jmp short loc_C28FA
loc_C28F0:
jmp short loc_C2893
loc_C28F2:
jmp short $+2
loc_C28F4:
jmp short $+2
loc_C28F6:
mov [rbp+var_1], 0
loc_C28FA:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
|
char mi_get_prev_key(long long a1, long long a2, _BYTE *a3, _BYTE *a4, unsigned long long a5, _DWORD *a6)
{
const char *v6; // rsi
unsigned int v8; // [rsp+0h] [rbp-40h]
_BYTE *v12; // [rsp+20h] [rbp-20h] BYREF
long long v13; // [rsp+28h] [rbp-18h]
long long v14; // [rsp+30h] [rbp-10h]
v14 = a1;
v13 = a2;
v12 = a3;
if ( (*a3 & 0x80) != 0 )
v8 = *(_DWORD *)(*(_QWORD *)v14 + 380LL);
else
v8 = 0;
if ( (*(_WORD *)(v13 + 10) & 0x28) != 0 )
{
v12 += v8 + 2;
*a4 = 0;
while ( (unsigned long long)v12 < a5 )
{
*a6 = (*(long long ( **)(long long, _QWORD, _BYTE **, _BYTE *))(v13 + 72))(v13, v8, &v12, a4);
if ( !*a6 )
{
v6 = *(const char **)(*(_QWORD *)v14 + 616LL);
mi_report_error(126, (long long)v6);
*(_DWORD *)my_thread_var(126LL, v6) = 126;
return 1;
}
}
return 0;
}
else
{
*a6 = *(unsigned __int16 *)(v13 + 18);
memmove(a4, a5 - (unsigned int)*a6 - v8, (unsigned int)*a6);
return 0;
}
}
|
_mi_get_prev_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001c2813
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x17c]
MOV dword ptr [RBP + -0x40],EAX
JMP 0x001c281a
LAB_001c2813:
XOR EAX,EAX
MOV dword ptr [RBP + -0x40],EAX
JMP 0x001c281a
LAB_001c281a:
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x28
CMP EAX,0x0
JNZ 0x001c2879
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RAX + 0x12]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
ADD RSI,RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV EDX,EAX
CALL 0x00129130
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001c28fa
LAB_001c2879:
MOV ECX,dword ptr [RBP + -0x3c]
ADD ECX,0x2
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
LAB_001c2893:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x001c28f2
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x48]
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x28]
LEA RDX,[RBP + -0x20]
CALL RAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX],0x0
JNZ 0x001c28f0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x001b1c40
CALL 0x001f9990
MOV dword ptr [RAX],0x7e
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001c28fa
LAB_001c28f0:
JMP 0x001c2893
LAB_001c28f2:
JMP 0x001c28f4
LAB_001c28f4:
JMP 0x001c28f6
LAB_001c28f6:
MOV byte ptr [RBP + -0x1],0x0
LAB_001c28fa:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1
_mi_get_prev_key(long *param_1,long param_2,byte *param_3,int1 *param_4,byte *param_5,
uint *param_6)
{
uint uVar1;
int4 *puVar2;
uint local_48;
byte *local_28;
long local_20;
long *local_18;
int1 local_9;
if ((*param_3 & 0x80) == 0) {
local_48 = 0;
}
else {
local_48 = *(uint *)(*param_1 + 0x17c);
}
local_20 = param_2;
local_18 = param_1;
if ((*(ushort *)(param_2 + 10) & 0x28) == 0) {
*param_6 = (uint)*(ushort *)(param_2 + 0x12);
local_28 = param_3;
memmove(param_4,param_5 + (-(ulong)local_48 - (ulong)*param_6),(ulong)*param_6);
local_9 = 0;
}
else {
local_28 = param_3 + (local_48 + 2);
*param_4 = 0;
do {
if (param_5 <= local_28) {
return 0;
}
uVar1 = (**(code **)(local_20 + 0x48))(local_20,local_48,&local_28,param_4);
*param_6 = uVar1;
} while (*param_6 != 0);
mi_report_error(0x7e,*(int8 *)(*local_18 + 0x268));
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
local_9 = 1;
}
return local_9;
}
|
|
18,556
|
my_fill_mb2
|
eloqsql/strings/ctype-ucs2.c
|
static void
my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill)
{
char buf[10], *last;
size_t buflen, remainder;
DBUG_ASSERT((slen % 2) == 0);
buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf,
(uchar*) buf + sizeof(buf));
DBUG_ASSERT(buflen > 0);
/*
"last" in the last position where a sequence of "buflen" bytes can start.
*/
for (last= s + slen - buflen; s <= last; s+= buflen)
{
/* Enough space for the character */
memcpy(s, buf, buflen);
}
/*
If there are some more space which is not enough
for the whole multibyte character, then add trailing zeros.
*/
if ((remainder= last + buflen - s) > 0)
bzero(s, (size_t) remainder);
}
|
O0
|
c
|
my_fill_mb2:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
jmp 0x5c076
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rsi
leaq -0x12(%rbp), %rdx
leaq -0x12(%rbp), %rcx
addq $0xa, %rcx
callq *%rax
cltq
movq %rax, -0x48(%rbp)
jmp 0x5c0a3
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
xorl %ecx, %ecx
subq -0x48(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x5c0e1
movq -0x28(%rbp), %rdi
leaq -0x12(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x24260
movq -0x48(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x5c0b8
movq -0x40(%rbp), %rax
addq -0x48(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
jbe 0x5c109
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rdx
xorl %esi, %esi
callq 0x241b0
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5c121
addq $0x50, %rsp
popq %rbp
retq
callq 0x24370
nopw %cs:(%rax,%rax)
|
my_fill_mb2:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
mov [rbp+var_34], ecx
jmp short $+2
loc_5C076:
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
mov rax, [rax+30h]
mov rdi, [rbp+var_20]
movsxd rsi, [rbp+var_34]
lea rdx, [rbp+var_12]
lea rcx, [rbp+var_12]
add rcx, 0Ah
call rax
cdqe
mov [rbp+var_48], rax
jmp short $+2
loc_5C0A3:
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
xor ecx, ecx
sub rcx, [rbp+var_48]
add rax, rcx
mov [rbp+var_40], rax
loc_5C0B8:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_40]
ja short loc_5C0E1
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_12]
mov rdx, [rbp+var_48]
call _memcpy
mov rax, [rbp+var_48]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
jmp short loc_5C0B8
loc_5C0E1:
mov rax, [rbp+var_40]
add rax, [rbp+var_48]
mov rcx, [rbp+var_28]
sub rax, rcx
mov [rbp+var_50], rax
cmp rax, 0
jbe short loc_5C109
mov rdi, [rbp+var_28]
mov rdx, [rbp+var_50]
xor esi, esi
call _memset
loc_5C109:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5C121
add rsp, 50h
pop rbp
retn
loc_5C121:
call ___stack_chk_fail
|
unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4)
{
long long i; // [rsp+8h] [rbp-48h]
unsigned long long v7; // [rsp+28h] [rbp-28h]
_BYTE v8[10]; // [rsp+3Eh] [rbp-12h] BYREF
unsigned long long v9; // [rsp+48h] [rbp-8h] BYREF
v9 = __readfsqword(0x28u);
v7 = a2;
for ( i = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
a4,
v8,
&v9); v7 <= a3 + a2 - i; v7 += i )
memcpy(v7, v8, i);
if ( a3 + a2 != v7 )
memset(v7, 0LL, a3 + a2 - v7);
return __readfsqword(0x28u);
}
|
my_fill_mb2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
MOV dword ptr [RBP + -0x34],ECX
JMP 0x0015c076
LAB_0015c076:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x20]
MOVSXD RSI,dword ptr [RBP + -0x34]
LEA RDX,[RBP + -0x12]
LEA RCX,[RBP + -0x12]
ADD RCX,0xa
CALL RAX
CDQE
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0015c0a3
LAB_0015c0a3:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
XOR ECX,ECX
SUB RCX,qword ptr [RBP + -0x48]
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_0015c0b8:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x0015c0e1
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x12]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x00124260
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0015c0b8
LAB_0015c0e1:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,0x0
JBE 0x0015c109
MOV RDI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x50]
XOR ESI,ESI
CALL 0x001241b0
LAB_0015c109:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015c121
ADD RSP,0x50
POP RBP
RET
LAB_0015c121:
CALL 0x00124370
|
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4)
{
int iVar1;
size_t sVar2;
void *pvVar3;
long in_FS_OFFSET;
void *local_30;
int1 local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_1a);
sVar2 = (size_t)iVar1;
pvVar3 = (void *)((long)param_2 + (param_3 - sVar2));
for (local_30 = param_2; local_30 <= pvVar3; local_30 = (void *)(sVar2 + (long)local_30)) {
memcpy(local_30,local_1a,sVar2);
}
sVar2 = (long)pvVar3 + (sVar2 - (long)local_30);
if (sVar2 != 0) {
memset(local_30,0,sVar2);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
18,557
|
my_fill_mb2
|
eloqsql/strings/ctype-ucs2.c
|
static void
my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill)
{
char buf[10], *last;
size_t buflen, remainder;
DBUG_ASSERT((slen % 2) == 0);
buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf,
(uchar*) buf + sizeof(buf));
DBUG_ASSERT(buflen > 0);
/*
"last" in the last position where a sequence of "buflen" bytes can start.
*/
for (last= s + slen - buflen; s <= last; s+= buflen)
{
/* Enough space for the character */
memcpy(s, buf, buflen);
}
/*
If there are some more space which is not enough
for the whole multibyte character, then add trailing zeros.
*/
if ((remainder= last + buflen - s) > 0)
bzero(s, (size_t) remainder);
}
|
O3
|
c
|
my_fill_mb2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0xb8(%rdi), %rax
movslq %ecx, %rsi
leaq -0x30(%rbp), %rcx
leaq -0x3a(%rbp), %rdx
callq *0x30(%rax)
movslq %eax, %r15
addq %r14, %rbx
movq %rbx, %r13
subq %r15, %r13
cmpq %r14, %r13
jb 0x47f4b
leaq -0x3a(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x24270
addq %r15, %r14
cmpq %r13, %r14
jbe 0x47f35
subq %r14, %rbx
je 0x47f5d
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x241a0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x47f7b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x243b0
|
my_fill_mb2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+0B8h]
movsxd rsi, ecx
lea rcx, [rbp+var_30]
lea rdx, [rbp+var_3A]
call qword ptr [rax+30h]
movsxd r15, eax
add rbx, r14
mov r13, rbx
sub r13, r15
cmp r13, r14
jb short loc_47F4B
lea r12, [rbp+var_3A]
loc_47F35:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _memcpy
add r14, r15
cmp r14, r13
jbe short loc_47F35
loc_47F4B:
sub rbx, r14
jz short loc_47F5D
mov rdi, r14
xor esi, esi
mov rdx, rbx
call _memset
loc_47F5D:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_47F7B
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_47F7B:
call ___stack_chk_fail
|
unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4)
{
unsigned long long v5; // r14
long long v6; // r15
long long v7; // rbx
long long v8; // rbx
_BYTE v10[10]; // [rsp+6h] [rbp-3Ah] BYREF
unsigned long long v11[6]; // [rsp+10h] [rbp-30h] BYREF
v5 = a2;
v11[0] = __readfsqword(0x28u);
v6 = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
a4,
v10,
v11);
v7 = a2 + a3;
if ( v7 - v6 >= a2 )
{
do
{
memcpy(v5, v10, v6);
v5 += v6;
}
while ( v5 <= v7 - v6 );
}
v8 = v7 - v5;
if ( v8 )
memset(v5, 0LL, v8);
return __readfsqword(0x28u);
}
|
my_fill_mb2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOVSXD RSI,ECX
LEA RCX,[RBP + -0x30]
LEA RDX,[RBP + -0x3a]
CALL qword ptr [RAX + 0x30]
MOVSXD R15,EAX
ADD RBX,R14
MOV R13,RBX
SUB R13,R15
CMP R13,R14
JC 0x00147f4b
LEA R12,[RBP + -0x3a]
LAB_00147f35:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00124270
ADD R14,R15
CMP R14,R13
JBE 0x00147f35
LAB_00147f4b:
SUB RBX,R14
JZ 0x00147f5d
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
CALL 0x001241a0
LAB_00147f5d:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00147f7b
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00147f7b:
CALL 0x001243b0
|
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4)
{
int iVar1;
void *pvVar2;
void *__dest;
size_t sVar3;
long in_FS_OFFSET;
int1 local_42 [10];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_42,&local_38);
sVar3 = (size_t)iVar1;
pvVar2 = (void *)((long)param_2 + (param_3 - sVar3));
__dest = param_2;
if (param_2 <= pvVar2) {
do {
memcpy(__dest,local_42,sVar3);
__dest = (void *)((long)__dest + sVar3);
} while (__dest <= pvVar2);
}
sVar3 = (long)param_2 + (param_3 - (long)__dest);
if (sVar3 != 0) {
memset(__dest,0,sVar3);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
18,558
|
tailoring_append
|
eloqsql/strings/ctype.c
|
static int
tailoring_append(MY_XML_PARSER *st,
const char *fmt, size_t len, const char *attr)
{
struct my_cs_file_info *i= (struct my_cs_file_info *) st->user_data;
size_t newlen= i->tailoring_length + len + 64; /* 64 for format */
if (MY_XML_OK == my_charset_file_tailoring_realloc(i, newlen))
{
char *dst= i->tailoring + i->tailoring_length;
sprintf(dst, fmt, (int) len, attr);
i->tailoring_length+= strlen(dst);
return MY_XML_OK;
}
return MY_XML_ERROR;
}
|
O3
|
c
|
tailoring_append:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r9
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x690(%rdi), %r13
leaq (%rdx,%r13), %rax
addq $0x40, %rax
cmpq %rax, 0x698(%rdi)
jbe 0xd1f23
movq 0x688(%rbx), %rax
jmp 0xd1f67
movq %r9, %r14
addq %r15, %r13
movq 0x688(%rbx), %rdi
movq 0x7a8(%rbx), %rax
movq 0x90(%rax), %rax
addq $0x8040, %r13 # imm = 0x8040
movq %r13, 0x698(%rbx)
movq %r13, %rsi
callq *%rax
movq %rax, 0x688(%rbx)
testq %rax, %rax
je 0xd1faa
movq 0x690(%rbx), %r13
movq %r14, %r9
addq %rax, %r13
xorl %r14d, %r14d
movq %r13, %rdi
movl $0x1, %esi
movq $-0x1, %rdx
movq %r12, %rcx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x29950
movq %r13, %rdi
callq 0x29340
addq %rax, 0x690(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %r14d
jmp 0xd1f98
|
tailoring_append:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r9, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov r13, [rdi+690h]
lea rax, [rdx+r13]
add rax, 40h ; '@'
cmp [rdi+698h], rax
jbe short loc_D1F23
mov rax, [rbx+688h]
jmp short loc_D1F67
loc_D1F23:
mov r14, r9
add r13, r15
mov rdi, [rbx+688h]
mov rax, [rbx+7A8h]
mov rax, [rax+90h]
add r13, 8040h
mov [rbx+698h], r13
mov rsi, r13
call rax
mov [rbx+688h], rax
test rax, rax
jz short loc_D1FAA
mov r13, [rbx+690h]
mov r9, r14
loc_D1F67:
add r13, rax
xor r14d, r14d
mov rdi, r13
mov esi, 1
mov rdx, 0FFFFFFFFFFFFFFFFh
mov rcx, r12
mov r8d, r15d
xor eax, eax
call ___sprintf_chk
mov rdi, r13
call _strlen
add [rbx+690h], rax
loc_D1F98:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D1FAA:
mov r14d, 1
jmp short loc_D1F98
|
long long tailoring_append(_QWORD *a1, const char *a2, long long a3, long long a4)
{
long long v4; // rax
long long v5; // r9
unsigned int v6; // r15d
long long v8; // r13
long long v9; // rax
long long v11; // rdi
long long ( *v12)(long long, long long); // rax
long long v13; // r13
long long v14; // r13
unsigned int v15; // r14d
long long v17; // [rsp-8h] [rbp-30h]
v17 = v4;
v5 = a4;
v6 = a3;
v8 = a1[210];
if ( a1[211] <= (unsigned long long)(a3 + v8 + 64) )
{
v11 = a1[209];
v12 = *(long long ( **)(long long, long long))(a1[245] + 144LL);
v13 = a3 + v8 + 32832;
a1[211] = v13;
v9 = v12(v11, v13);
a1[209] = v9;
if ( !v9 )
return 1;
v8 = a1[210];
v5 = a4;
}
else
{
v9 = a1[209];
}
v14 = v9 + v8;
v15 = 0;
__sprintf_chk(v14, 1LL, -1LL, a2, v6, v5, v17);
a1[210] += strlen(v14);
return v15;
}
|
tailoring_append:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R9,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV R13,qword ptr [RDI + 0x690]
LEA RAX,[RDX + R13*0x1]
ADD RAX,0x40
CMP qword ptr [RDI + 0x698],RAX
JBE 0x001d1f23
MOV RAX,qword ptr [RBX + 0x688]
JMP 0x001d1f67
LAB_001d1f23:
MOV R14,R9
ADD R13,R15
MOV RDI,qword ptr [RBX + 0x688]
MOV RAX,qword ptr [RBX + 0x7a8]
MOV RAX,qword ptr [RAX + 0x90]
ADD R13,0x8040
MOV qword ptr [RBX + 0x698],R13
MOV RSI,R13
CALL RAX
MOV qword ptr [RBX + 0x688],RAX
TEST RAX,RAX
JZ 0x001d1faa
MOV R13,qword ptr [RBX + 0x690]
MOV R9,R14
LAB_001d1f67:
ADD R13,RAX
XOR R14D,R14D
MOV RDI,R13
MOV ESI,0x1
MOV RDX,-0x1
MOV RCX,R12
MOV R8D,R15D
XOR EAX,EAX
CALL 0x00129950
MOV RDI,R13
CALL 0x00129340
ADD qword ptr [RBX + 0x690],RAX
LAB_001d1f98:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d1faa:
MOV R14D,0x1
JMP 0x001d1f98
|
int8 tailoring_append(long param_1,int8 param_2,ulong param_3,int8 param_4)
{
code *pcVar1;
long lVar2;
size_t sVar3;
long lVar4;
lVar4 = *(long *)(param_1 + 0x690);
if (param_3 + lVar4 + 0x40 < *(ulong *)(param_1 + 0x698)) {
lVar2 = *(long *)(param_1 + 0x688);
}
else {
pcVar1 = *(code **)(*(long *)(param_1 + 0x7a8) + 0x90);
lVar4 = lVar4 + param_3 + 0x8040;
*(long *)(param_1 + 0x698) = lVar4;
lVar2 = (*pcVar1)(*(int8 *)(param_1 + 0x688),lVar4);
*(long *)(param_1 + 0x688) = lVar2;
if (lVar2 == 0) {
return 1;
}
lVar4 = *(long *)(param_1 + 0x690);
}
__sprintf_chk((char *)(lVar4 + lVar2),1,0xffffffffffffffff,param_2,param_3 & 0xffffffff,param_4);
sVar3 = strlen((char *)(lVar4 + lVar2));
*(long *)(param_1 + 0x690) = *(long *)(param_1 + 0x690) + sVar3;
return 0;
}
|
|
18,559
|
nglog::ColoredWriteToStdout(nglog::LogSeverity, char const*, unsigned long)
|
ng-log[P]ng-log/src/logging.cc
|
static void ColoredWriteToStdout(LogSeverity severity, const char* message,
size_t len) {
FILE* output = stdout;
// We also need to send logs to the stderr when the severity is
// higher or equal to the stderr threshold.
if (severity >= FLAGS_stderrthreshold) {
output = stderr;
}
ColoredWriteToStderrOrStdout(output, severity, message, len);
}
|
O0
|
cpp
|
nglog::ColoredWriteToStdout(nglog::LogSeverity, char const*, unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0x68c76(%rip), %rax # 0x9af00
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x4(%rbp), %eax
leaq 0x6a015(%rip), %rcx # 0x9c2b0
cmpl (%rcx), %eax
jl 0x322ad
movq 0x68cf2(%rip), %rax # 0x9af98
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl -0x4(%rbp), %esi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x38eb0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ZN5nglogL20ColoredWriteToStdoutENS_11LogSeverityEPKcm:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, cs:stdout_ptr
mov rax, [rax]
mov [rbp+var_20], rax
mov eax, [rbp+var_4]
lea rcx, _ZN3fLI21FLAGS_stderrthresholdE; fLI::FLAGS_stderrthreshold
cmp eax, [rcx]
jl short loc_322AD
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rbp+var_20], rax
loc_322AD:
mov rdi, [rbp+var_20]
mov esi, [rbp+var_4]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_18]
call _ZN5nglogL28ColoredWriteToStderrOrStdoutEP8_IO_FILENS_11LogSeverityEPKcm; nglog::ColoredWriteToStderrOrStdout(_IO_FILE *,nglog::LogSeverity,char const*,ulong)
add rsp, 20h
pop rbp
retn
|
long long nglog::ColoredWriteToStdout(unsigned int a1, long long a2, long long a3)
{
long long v4; // [rsp+0h] [rbp-20h]
v4 = stdout;
if ( (signed int)a1 >= fLI::FLAGS_stderrthreshold )
v4 = stderr;
return nglog::ColoredWriteToStderrOrStdout(v4, a1, a2, a3);
}
|
ColoredWriteToStdout:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [0x0019af00]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RBP + -0x4]
LEA RCX,[0x19c2b0]
CMP EAX,dword ptr [RCX]
JL 0x001322ad
MOV RAX,qword ptr [0x0019af98]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
LAB_001322ad:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x4]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
CALL 0x00138eb0
ADD RSP,0x20
POP RBP
RET
|
/* nglog::ColoredWriteToStdout(nglog::LogSeverity, char const*, unsigned long) */
void nglog::ColoredWriteToStdout(int param_1,int8 param_2,int8 param_3)
{
int8 local_28;
local_28 = *(int8 *)PTR_stdout_0019af00;
if (fLI::FLAGS_stderrthreshold <= param_1) {
local_28 = *(int8 *)PTR_stderr_0019af98;
}
ColoredWriteToStderrOrStdout(local_28,param_1,param_2,param_3);
return;
}
|
|
18,560
|
intx::uint<256u> intx::from_string<intx::uint<256u>>(char const*)
|
corpus-core[P]colibri-stateless/build_O2/_deps/intx-src/include/intx/intx.hpp
|
inline constexpr Int from_string(const char* str)
{
auto s = str;
auto x = Int{};
int num_digits = 0;
if (s[0] == '0' && s[1] == 'x')
{
s += 2;
while (const auto c = *s++)
{
if (++num_digits > int{sizeof(x) * 2})
throw_<std::out_of_range>(str);
x = (x << uint64_t{4}) | from_hex_digit(c);
}
return x;
}
while (const auto c = *s++)
{
if (num_digits++ > std::numeric_limits<Int>::digits10)
throw_<std::out_of_range>(str);
const auto d = from_dec_digit(c);
x = x * Int{10} + d;
if (x < d)
throw_<std::out_of_range>(str);
}
return x;
}
|
O2
|
cpp
|
intx::uint<256u> intx::from_string<intx::uint<256u>>(char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movb (%rsi), %al
cmpb $0x30, %al
jne 0x734e3
cmpb $0x78, 0x1(%rbx)
jne 0x734e3
pushq $0x2
popq %r12
leaq 0x10(%rsp), %r13
leaq 0x68(%rsp), %r15
movb (%rbx,%r12), %bpl
testb %bpl, %bpl
je 0x73591
cmpl $0x42, %r12d
je 0x735a6
movq %r15, %rdi
movq %r14, %rsi
pushq $0x4
popq %rdx
callq 0x39c17
movsbl %bpl, %edi
callq 0x735f4
andq $0x0, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
cltq
movq %rax, 0x8(%rsp)
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
leaq 0x8(%rsp), %rdx
callq 0x3af24
movups 0x28(%rsp), %xmm0
movups 0x38(%rsp), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
incq %r12
jmp 0x73477
leaq 0x10(%rsp), %r13
pushq $0x1
popq %rbp
leaq 0x50(%rsp), %r12
leaq 0x68(%rsp), %r15
testb %al, %al
je 0x73591
cmpl $0x4f, %ebp
je 0x735a6
movsbl %al, %edi
callq 0x73616
movl %eax, 0x4(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
andq $0x0, 0x10(%r13)
movq $0xa, 0x8(%rsp)
movq %r15, %rdi
movq %r14, %rsi
leaq 0x8(%rsp), %rdx
callq 0x38ce0
movslq 0x4(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
andq $0x0, 0x10(%r12)
movq %rax, 0x48(%rsp)
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
leaq 0x48(%rsp), %rdx
callq 0x38c1e
movups 0x28(%rsp), %xmm0
movups 0x38(%rsp), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movq %r14, %rdi
leaq 0x4(%rsp), %rsi
callq 0x3ad4a
testb %al, %al
jne 0x735a6
movb (%rbx,%rbp), %al
incq %rbp
jmp 0x734f5
movq %r14, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x735ae
|
_ZN4intx11from_stringINS_4uintILj256EEEEET_PKc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov rbx, rsi
mov r14, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov al, [rsi]
cmp al, 30h ; '0'
jnz loc_734E3
cmp byte ptr [rbx+1], 78h ; 'x'
jnz short loc_734E3
push 2
pop r12
lea r13, [rsp+0B8h+var_A8]
lea r15, [rsp+0B8h+var_50]
loc_73477:
mov bpl, [rbx+r12]
test bpl, bpl
jz loc_73591
cmp r12d, 42h ; 'B'
jz loc_735A6
mov rdi, r15
mov rsi, r14; char
push 4
pop rdx
call _ZN4intxlsERKNS_4uintILj256EEEm; intx::operator<<(intx::uint<256u> const&,ulong)
movsx edi, bpl; this
call _ZN4intx14from_hex_digitEc; intx::from_hex_digit(char)
and qword ptr [r13+10h], 0
xorps xmm0, xmm0
movups xmmword ptr [r13+0], xmm0
cdqe
mov [rsp+0B8h+var_B0], rax
lea rdi, [rsp+0B8h+var_90]
mov rsi, r15; char
lea rdx, [rsp+0B8h+var_B0]
call _ZN4intxorERKNS_4uintILj256EEES3_; intx::operator|(intx::uint<256u> const&,intx::uint<256u> const&)
movups xmm0, [rsp+0B8h+var_90]
movups xmm1, [rsp+0B8h+var_80]
movups xmmword ptr [r14+10h], xmm1
movups xmmword ptr [r14], xmm0
inc r12
jmp short loc_73477
loc_734E3:
lea r13, [rsp+0B8h+var_A8]
push 1
pop rbp
lea r12, [rsp+0B8h+var_68]
lea r15, [rsp+0B8h+var_50]
loc_734F5:
test al, al
jz loc_73591
cmp ebp, 4Fh ; 'O'
jz loc_735A6
movsx edi, al; this
call _ZN4intx14from_dec_digitEc; intx::from_dec_digit(char)
mov [rsp+0B8h+var_B4], eax
xorps xmm0, xmm0
movups xmmword ptr [r13+0], xmm0
and qword ptr [r13+10h], 0
mov [rsp+0B8h+var_B0], 0Ah
mov rdi, r15
mov rsi, r14
lea rdx, [rsp+0B8h+var_B0]
call _ZN4intxmlERKNS_4uintILj256EEES3_; intx::operator*(intx::uint<256u> const&,intx::uint<256u> const&)
movsxd rax, [rsp+0B8h+var_B4]
xorps xmm0, xmm0
movups xmmword ptr [r12], xmm0
and qword ptr [r12+10h], 0
mov [rsp+0B8h+var_70], rax
lea rdi, [rsp+0B8h+var_90]
mov rsi, r15
lea rdx, [rsp+0B8h+var_70]
call _ZN4intxplERKNS_4uintILj256EEES3_; intx::operator+(intx::uint<256u> const&,intx::uint<256u> const&)
movups xmm0, [rsp+0B8h+var_90]
movups xmm1, [rsp+0B8h+var_80]
movups xmmword ptr [r14+10h], xmm1
movups xmmword ptr [r14], xmm0
mov rdi, r14
lea rsi, [rsp+0B8h+var_B4]
call _ZN4intxltILj256EivEEbRKNS_4uintIXT_EEERKT0_; intx::operator<<256u,int,void>(intx::uint<256u> const&,int const&)
test al, al
jnz short loc_735A6
mov al, [rbx+rbp]
inc rbp
jmp loc_734F5
loc_73591:
mov rax, r14
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_735A6:
mov rdi, rbx
call $+5
|
long long intx::from_string<intx::uint<256u>>(long long a1, char *a2)
{
char *v2; // rbx
char v3; // al
long long i; // r12
char v5; // bp
int v6; // eax
__int128 v7; // xmm0
long long v8; // rbp
__int128 v9; // xmm0
int v11; // [rsp+4h] [rbp-B4h] BYREF
long long v12; // [rsp+8h] [rbp-B0h] BYREF
__int128 v13; // [rsp+10h] [rbp-A8h]
long long v14; // [rsp+20h] [rbp-98h]
__int128 v15; // [rsp+28h] [rbp-90h] BYREF
__int128 v16; // [rsp+38h] [rbp-80h]
long long v17; // [rsp+48h] [rbp-70h] BYREF
__int128 v18; // [rsp+50h] [rbp-68h]
long long v19; // [rsp+60h] [rbp-58h]
char v20[80]; // [rsp+68h] [rbp-50h] BYREF
v2 = a2;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v3 = *a2;
if ( *a2 == 48 && a2[1] == 120 )
{
for ( i = 2LL; ; ++i )
{
v5 = a2[i];
if ( !v5 )
break;
if ( (_DWORD)i == 66 )
goto LABEL_13;
intx::operator<<((long long)v20, (unsigned long long *)a1, 4uLL);
v6 = intx::from_hex_digit((intx *)(unsigned int)v5, a1);
v14 = 0LL;
v13 = 0LL;
v12 = v6;
intx::operator|(&v15, (long long)v20, (long long)&v12);
v7 = v15;
*(_OWORD *)(a1 + 16) = v16;
*(_OWORD *)a1 = v7;
}
}
else
{
v8 = 1LL;
while ( v3 )
{
if ( (_DWORD)v8 == 79 )
goto LABEL_13;
v11 = intx::from_dec_digit((intx *)(unsigned int)v3, (char)a2);
v13 = 0LL;
v14 = 0LL;
v12 = 10LL;
intx::operator*((long long)v20, a1, (long long)&v12);
v18 = 0LL;
v19 = 0LL;
v17 = v11;
intx::operator+(&v15, (long long)v20, (long long)&v17);
v9 = v15;
*(_OWORD *)(a1 + 16) = v16;
*(_OWORD *)a1 = v9;
a2 = (char *)&v11;
if ( (unsigned __int8)intx::operator<<256u,int,void>() )
LABEL_13:
intx::throw_<std::out_of_range>(v2);
v3 = v2[v8++];
}
}
return a1;
}
|
from_string<intx::uint<256u>>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV RBX,RSI
MOV R14,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV AL,byte ptr [RSI]
CMP AL,0x30
JNZ 0x001734e3
CMP byte ptr [RBX + 0x1],0x78
JNZ 0x001734e3
PUSH 0x2
POP R12
LEA R13,[RSP + 0x10]
LEA R15,[RSP + 0x68]
LAB_00173477:
MOV BPL,byte ptr [RBX + R12*0x1]
TEST BPL,BPL
JZ 0x00173591
CMP R12D,0x42
JZ 0x001735a6
MOV RDI,R15
MOV RSI,R14
PUSH 0x4
POP RDX
CALL 0x00139c17
MOVSX EDI,BPL
CALL 0x001735f4
AND qword ptr [R13 + 0x10],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13],XMM0
CDQE
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x28]
MOV RSI,R15
LEA RDX,[RSP + 0x8]
CALL 0x0013af24
MOVUPS XMM0,xmmword ptr [RSP + 0x28]
MOVUPS XMM1,xmmword ptr [RSP + 0x38]
MOVUPS xmmword ptr [R14 + 0x10],XMM1
MOVUPS xmmword ptr [R14],XMM0
INC R12
JMP 0x00173477
LAB_001734e3:
LEA R13,[RSP + 0x10]
PUSH 0x1
POP RBP
LEA R12,[RSP + 0x50]
LEA R15,[RSP + 0x68]
LAB_001734f5:
TEST AL,AL
JZ 0x00173591
CMP EBP,0x4f
JZ 0x001735a6
MOVSX EDI,AL
CALL 0x00173616
MOV dword ptr [RSP + 0x4],EAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13],XMM0
AND qword ptr [R13 + 0x10],0x0
MOV qword ptr [RSP + 0x8],0xa
MOV RDI,R15
MOV RSI,R14
LEA RDX,[RSP + 0x8]
CALL 0x00138ce0
MOVSXD RAX,dword ptr [RSP + 0x4]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12],XMM0
AND qword ptr [R12 + 0x10],0x0
MOV qword ptr [RSP + 0x48],RAX
LEA RDI,[RSP + 0x28]
MOV RSI,R15
LEA RDX,[RSP + 0x48]
CALL 0x00138c1e
MOVUPS XMM0,xmmword ptr [RSP + 0x28]
MOVUPS XMM1,xmmword ptr [RSP + 0x38]
MOVUPS xmmword ptr [R14 + 0x10],XMM1
MOVUPS xmmword ptr [R14],XMM0
MOV RDI,R14
LEA RSI,[RSP + 0x4]
CALL 0x0013ad4a
TEST AL,AL
JNZ 0x001735a6
MOV AL,byte ptr [RBX + RBP*0x1]
INC RBP
JMP 0x001734f5
LAB_00173591:
MOV RAX,R14
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001735a6:
MOV RDI,RBX
CALL 0x001735ae
|
/* intx::uint<256u> intx::from_string<intx::uint<256u> >(char const*) */
intx * __thiscall intx::from_string<intx::uint<256u>>(intx *this,char *param_1)
{
char *pcVar1;
char cVar2;
bool bVar3;
int iVar4;
intx *extraout_RAX;
long lVar5;
int local_b4;
long local_b0 [4];
int8 local_90;
int8 uStack_88;
int8 local_80;
int8 uStack_78;
long local_70 [4];
intx local_50 [32];
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
cVar2 = *param_1;
if ((cVar2 == '0') && (param_1[1] == 'x')) {
for (lVar5 = 2; cVar2 = param_1[lVar5], cVar2 != '\0'; lVar5 = lVar5 + 1) {
if ((int)lVar5 == 0x42) {
LAB_001735a6:
throw_<std::out_of_range>(param_1);
return extraout_RAX;
}
operator<<(local_50,(uint *)this,4);
iVar4 = from_hex_digit(cVar2);
local_b0[3] = 0;
local_b0[1] = 0;
local_b0[2] = 0;
local_b0[0] = (long)iVar4;
operator|((intx *)&local_90,(uint *)local_50,(uint *)local_b0);
*(int8 *)(this + 0x10) = local_80;
*(int8 *)(this + 0x18) = uStack_78;
*(int8 *)this = local_90;
*(int8 *)(this + 8) = uStack_88;
}
}
else {
lVar5 = 1;
while (cVar2 != '\0') {
if ((int)lVar5 == 0x4f) goto LAB_001735a6;
local_b4 = from_dec_digit(cVar2);
local_b0[1] = 0;
local_b0[2] = 0;
local_b0[3] = 0;
local_b0[0] = 10;
operator*(local_50,(uint *)this,(uint *)local_b0);
local_70[0] = (long)local_b4;
local_70[1] = 0;
local_70[2] = 0;
local_70[3] = 0;
operator+((intx *)&local_90,(uint *)local_50,(uint *)local_70);
*(int8 *)(this + 0x10) = local_80;
*(int8 *)(this + 0x18) = uStack_78;
*(int8 *)this = local_90;
*(int8 *)(this + 8) = uStack_88;
bVar3 = operator<((uint *)this,&local_b4);
if (bVar3) goto LAB_001735a6;
pcVar1 = param_1 + lVar5;
lVar5 = lVar5 + 1;
cVar2 = *pcVar1;
}
}
return this;
}
|
|
18,561
|
value_buffer_init
|
bluesky950520[P]quickjs/quickjs.c
|
static int value_buffer_init(JSContext *ctx, ValueBuffer *b)
{
b->ctx = ctx;
b->len = 0;
b->size = 4;
b->error_status = 0;
b->arr = b->def;
return 0;
}
|
O0
|
c
|
value_buffer_init:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rcx
movq -0x10(%rsp), %rax
movq %rcx, (%rax)
movq -0x10(%rsp), %rax
movl $0x0, 0x50(%rax)
movq -0x10(%rsp), %rax
movl $0x4, 0x54(%rax)
movq -0x10(%rsp), %rax
movl $0x0, 0x58(%rax)
movq -0x10(%rsp), %rcx
addq $0x10, %rcx
movq -0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
xorl %eax, %eax
retq
|
value_buffer_init:
mov [rsp+var_8], rdi
mov [rsp+var_10], rsi
mov rcx, [rsp+var_8]
mov rax, [rsp+var_10]
mov [rax], rcx
mov rax, [rsp+var_10]
mov dword ptr [rax+50h], 0
mov rax, [rsp+var_10]
mov dword ptr [rax+54h], 4
mov rax, [rsp+var_10]
mov dword ptr [rax+58h], 0
mov rcx, [rsp+var_10]
add rcx, 10h
mov rax, [rsp+var_10]
mov [rax+8], rcx
xor eax, eax
retn
|
long long value_buffer_init(long long a1, long long a2)
{
*(_QWORD *)a2 = a1;
*(_DWORD *)(a2 + 80) = 0;
*(_DWORD *)(a2 + 84) = 4;
*(_DWORD *)(a2 + 88) = 0;
*(_QWORD *)(a2 + 8) = a2 + 16;
return 0LL;
}
|
value_buffer_init:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV RCX,qword ptr [RSP + -0x8]
MOV RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x50],0x0
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x54],0x4
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x58],0x0
MOV RCX,qword ptr [RSP + -0x10]
ADD RCX,0x10
MOV RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
XOR EAX,EAX
RET
|
int8 value_buffer_init(int8 param_1,int8 *param_2)
{
*param_2 = param_1;
*(int4 *)(param_2 + 10) = 0;
*(int4 *)((long)param_2 + 0x54) = 4;
*(int4 *)(param_2 + 0xb) = 0;
param_2[1] = param_2 + 2;
return 0;
}
|
|
18,562
|
my_setwd
|
eloqsql/mysys/my_getwd.c
|
int my_setwd(const char *dir, myf MyFlags)
{
int res;
size_t length;
char *start, *pos;
DBUG_ENTER("my_setwd");
DBUG_PRINT("my",("dir: '%s' MyFlags %lu", dir, MyFlags));
start=(char *) dir;
if (! dir[0] || (dir[0] == FN_LIBCHAR && dir[1] == 0))
dir=FN_ROOTDIR;
if ((res=chdir((char*) dir)) != 0)
{
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_SETWD,MYF(ME_BELL),start,errno);
}
else
{
if (test_if_hard_path(start))
{ /* Hard pathname */
pos= strmake(&curr_dir[0],start,(size_t) FN_REFLEN-1);
if (pos[-1] != FN_LIBCHAR)
{
length=(uint) (pos-(char*) curr_dir);
curr_dir[length]=FN_LIBCHAR; /* must end with '/' */
curr_dir[length+1]='\0';
}
}
else
curr_dir[0]='\0'; /* Don't save name */
}
DBUG_RETURN(res);
}
|
O0
|
c
|
my_setwd:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0xf02c2
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0xf02ec
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xf02f7
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0xf02f7
leaq 0x65035(%rip), %rax # 0x155328
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2a900
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0xf0350
callq 0x2a760
movl (%rax), %eax
movl %eax, -0x34(%rbp)
callq 0xf60c0
movl -0x34(%rbp), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0xf034e
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x2a760
movq -0x40(%rbp), %rdx
movl (%rax), %ecx
movl $0x11, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0xefb70
jmp 0xf03c5
movq -0x28(%rbp), %rdi
callq 0xf03e0
cmpl $0x0, %eax
je 0xf03b9
movq -0x28(%rbp), %rsi
leaq 0xb92647(%rip), %rdi # 0xc829b0
movl $0x1ff, %edx # imm = 0x1FF
callq 0x14de60
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
je 0xf03b7
movq -0x30(%rbp), %rax
leaq 0xb92621(%rip), %rcx # 0xc829b0
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
leaq 0xb9260d(%rip), %rax # 0xc829b0
movb $0x2f, (%rax,%rcx)
movq -0x20(%rbp), %rcx
leaq 0xb925fe(%rip), %rax # 0xc829b0
movb $0x0, 0x1(%rax,%rcx)
jmp 0xf03c3
leaq 0xb925f0(%rip), %rax # 0xc829b0
movb $0x0, (%rax)
jmp 0xf03c5
jmp 0xf03c7
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_setwd:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_F02C2:
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
cmp byte ptr [rax], 0
jz short loc_F02EC
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_F02F7
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+1]
cmp eax, 0
jnz short loc_F02F7
loc_F02EC:
lea rax, word_155328
mov [rbp+var_8], rax
loc_F02F7:
mov rdi, [rbp+var_8]
call _chdir
mov [rbp+var_14], eax
cmp eax, 0
jz short loc_F0350
call ___errno_location
mov eax, [rax]
mov [rbp+var_34], eax
call _my_thread_var
mov ecx, [rbp+var_34]
mov [rax], ecx
mov rax, [rbp+var_10]
and rax, 10h
cmp rax, 0
jz short loc_F034E
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
call ___errno_location
mov rdx, [rbp+var_40]
mov ecx, [rax]
mov edi, 11h
mov esi, 4
mov al, 0
call my_error
loc_F034E:
jmp short loc_F03C5
loc_F0350:
mov rdi, [rbp+var_28]
call test_if_hard_path
cmp eax, 0
jz short loc_F03B9
mov rsi, [rbp+var_28]
lea rdi, curr_dir
mov edx, 1FFh
call strmake
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jz short loc_F03B7
mov rax, [rbp+var_30]
lea rcx, curr_dir
sub rax, rcx
mov eax, eax
mov [rbp+var_20], rax
mov rcx, [rbp+var_20]
lea rax, curr_dir
mov byte ptr [rax+rcx], 2Fh ; '/'
mov rcx, [rbp+var_20]
lea rax, curr_dir
mov byte ptr [rax+rcx+1], 0
loc_F03B7:
jmp short loc_F03C3
loc_F03B9:
lea rax, curr_dir
mov byte ptr [rax], 0
loc_F03C3:
jmp short $+2
loc_F03C5:
jmp short $+2
loc_F03C7:
mov eax, [rbp+var_14]
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
add rsp, 50h
pop rbp
retn
|
long long my_setwd(__int16 *a1, const char *a2)
{
unsigned int *v2; // rax
int v4; // [rsp+1Ch] [rbp-34h]
long long v5; // [rsp+20h] [rbp-30h]
unsigned int v6; // [rsp+3Ch] [rbp-14h]
__int16 *v7; // [rsp+48h] [rbp-8h]
v7 = a1;
if ( !*(_BYTE *)a1 || *(_BYTE *)a1 == 47 && !*((_BYTE *)a1 + 1) )
v7 = &word_155328;
v6 = chdir(v7);
if ( v6 )
{
v4 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(v7, a2) = v4;
if ( ((unsigned __int8)a2 & 0x10) != 0 )
{
v2 = (unsigned int *)__errno_location();
my_error(0x11u, 4LL, a1, *v2);
}
}
else if ( (unsigned int)test_if_hard_path(a1) )
{
v5 = strmake(curr_dir, a1, 511LL);
if ( *(_BYTE *)(v5 - 1) != 47 )
{
curr_dir[(unsigned int)(v5 - (_QWORD)curr_dir)] = 47;
curr_dir[(unsigned int)(v5 - (_QWORD)curr_dir) + 1] = 0;
}
}
else
{
curr_dir[0] = 0;
}
return v6;
}
|
my_setwd:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x001f02c2
LAB_001f02c2:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX],0x0
JZ 0x001f02ec
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001f02f7
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x0
JNZ 0x001f02f7
LAB_001f02ec:
LEA RAX,[0x255328]
MOV qword ptr [RBP + -0x8],RAX
LAB_001f02f7:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a900
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JZ 0x001f0350
CALL 0x0012a760
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
CALL 0x001f60c0
MOV ECX,dword ptr [RBP + -0x34]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x10
CMP RAX,0x0
JZ 0x001f034e
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
CALL 0x0012a760
MOV RDX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RAX]
MOV EDI,0x11
MOV ESI,0x4
MOV AL,0x0
CALL 0x001efb70
LAB_001f034e:
JMP 0x001f03c5
LAB_001f0350:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001f03e0
CMP EAX,0x0
JZ 0x001f03b9
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[0xd829b0]
MOV EDX,0x1ff
CALL 0x0024de60
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JZ 0x001f03b7
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0xd829b0]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x20]
LEA RAX,[0xd829b0]
MOV byte ptr [RAX + RCX*0x1],0x2f
MOV RCX,qword ptr [RBP + -0x20]
LEA RAX,[0xd829b0]
MOV byte ptr [RAX + RCX*0x1 + 0x1],0x0
LAB_001f03b7:
JMP 0x001f03c3
LAB_001f03b9:
LEA RAX,[0xd829b0]
MOV byte ptr [RAX],0x0
LAB_001f03c3:
JMP 0x001f03c5
LAB_001f03c5:
JMP 0x001f03c7
LAB_001f03c7:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x44]
ADD RSP,0x50
POP RBP
RET
|
int my_setwd(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
uint uVar3;
int *piVar4;
long lVar5;
char *local_10;
if ((*param_1 == '\0') || ((local_10 = param_1, *param_1 == '/' && (param_1[1] == '\0')))) {
local_10 = "/";
}
iVar1 = chdir(local_10);
if (iVar1 == 0) {
iVar2 = test_if_hard_path(param_1);
if (iVar2 == 0) {
curr_dir = 0;
}
else {
lVar5 = strmake(&curr_dir,param_1,0x1ff);
if (*(char *)(lVar5 + -1) != '/') {
uVar3 = (int)lVar5 - 0xd829b0;
(&curr_dir)[uVar3] = 0x2f;
(&DAT_00d829b1)[uVar3] = 0;
}
}
}
else {
piVar4 = __errno_location();
iVar2 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar2;
if ((param_2 & 0x10) != 0) {
piVar4 = __errno_location();
my_error(0x11,4,param_1,*piVar4);
}
}
return iVar1;
}
|
|
18,563
|
nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::get_token_string() const
|
llama.cpp/common/json.hpp
|
std::string get_token_string() const
{
// escape control characters
std::string result;
for (const auto c : token_string)
{
if (static_cast<unsigned char>(c) <= '\x1F')
{
// escape control characters
std::array<char, 9> cs{{}};
static_cast<void>((std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
result += cs.data();
}
else
{
// add character as is
result.push_back(static_cast<std::string::value_type>(c));
}
}
return result;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<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::input_stream_adapter>::get_token_string() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x38(%rsi), %r13
movq 0x40(%rsi), %rbp
cmpq %rbp, %r13
je 0x760e5
leaq 0xa4985(%rip), %r14 # 0x11aa1b
leaq 0x8(%rsp), %r15
movzbl (%r13), %ecx
cmpl $0x1f, %ecx
ja 0x760d2
movb $0x0, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movl $0x9, %esi
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x20870
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20b30
jmp 0x760dd
movsbl %cl, %esi
movq %rbx, %rdi
callq 0x21390
incq %r13
cmpq %rbp, %r13
jne 0x7609b
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x760f9
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x76110
movq (%r12), %rsi
incq %rsi
callq 0x20180
movq %r14, %rdi
callq 0x20ae0
|
_ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE16get_token_stringEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov r13, [rsi+38h]
mov rbp, [rsi+40h]
cmp r13, rbp
jz short loc_760E5
lea r14, aU4x; "<U+%.4X>"
lea r15, [rsp+48h+var_40]
loc_7609B:
movzx ecx, byte ptr [r13+0]
cmp ecx, 1Fh
ja short loc_760D2
mov [rsp+48h+var_38], 0
mov [rsp+48h+var_40], 0
mov esi, 9
mov rdi, r15
mov rdx, r14
xor eax, eax
call _snprintf
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
jmp short loc_760DD
loc_760D2:
movsx esi, cl
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
loc_760DD:
inc r13
cmp r13, rbp
jnz short loc_7609B
loc_760E5:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_760F9:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_76110
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_76110:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::lexer<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::input_stream_adapter>::get_token_string(
long long a1,
long long a2)
{
unsigned __int8 *v2; // r13
unsigned __int8 *i; // rbp
unsigned int v4; // ecx
long long v6; // [rsp+8h] [rbp-40h] BYREF
char v7; // [rsp+10h] [rbp-38h]
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v2 = *(unsigned __int8 **)(a2 + 56);
for ( i = *(unsigned __int8 **)(a2 + 64); v2 != i; ++v2 )
{
v4 = *v2;
if ( v4 > 0x1F )
{
std::string::push_back(a1, (unsigned int)(char)v4);
}
else
{
v7 = 0;
v6 = 0LL;
snprintf(&v6, 9LL, "<U+%.4X>", v4);
std::string::append(a1, &v6);
}
}
return a1;
}
|
get_token_string:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV R13,qword ptr [RSI + 0x38]
MOV RBP,qword ptr [RSI + 0x40]
CMP R13,RBP
JZ 0x001760e5
LEA R14,[0x21aa1b]
LEA R15,[RSP + 0x8]
LAB_0017609b:
MOVZX ECX,byte ptr [R13]
CMP ECX,0x1f
JA 0x001760d2
MOV byte ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x8],0x0
MOV ESI,0x9
MOV RDI,R15
MOV RDX,R14
XOR EAX,EAX
CALL 0x00120870
LAB_001760c5:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00120b30
JMP 0x001760dd
LAB_001760d2:
MOVSX ESI,CL
MOV RDI,RBX
CALL 0x00121390
LAB_001760dd:
INC R13
CMP R13,RBP
JNZ 0x0017609b
LAB_001760e5:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<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::input_stream_adapter>::get_token_string()
const */
void nlohmann::json_abi_v3_11_3::detail::
lexer<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::input_stream_adapter>
::get_token_string(void)
{
byte *pbVar1;
long in_RSI;
long *in_RDI;
byte *pbVar2;
char local_40 [16];
*in_RDI = (long)(in_RDI + 2);
in_RDI[1] = 0;
*(int1 *)(in_RDI + 2) = 0;
pbVar2 = *(byte **)(in_RSI + 0x38);
pbVar1 = *(byte **)(in_RSI + 0x40);
if (pbVar2 != pbVar1) {
do {
if (*pbVar2 < 0x20) {
local_40[8] = 0;
local_40[0] = '\0';
local_40[1] = '\0';
local_40[2] = '\0';
local_40[3] = '\0';
local_40[4] = '\0';
local_40[5] = '\0';
local_40[6] = '\0';
local_40[7] = '\0';
snprintf(local_40,9,"<U+%.4X>");
/* try { // try from 001760c5 to 001760cf has its CatchHandler @ 001760f9 */
std::__cxx11::string::append((char *)in_RDI);
}
else {
/* try { // try from 001760d2 to 001760dc has its CatchHandler @ 001760f7 */
std::__cxx11::string::push_back((char)in_RDI);
}
pbVar2 = pbVar2 + 1;
} while (pbVar2 != pbVar1);
}
return;
}
|
|
18,564
|
JS_ToInt32Free
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_ToInt32Free(JSContext *ctx, int32_t *pres, JSValue val)
{
uint32_t tag;
int32_t ret;
redo:
tag = JS_VALUE_GET_NORM_TAG(val);
switch(tag) {
case JS_TAG_INT:
case JS_TAG_BOOL:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
ret = JS_VALUE_GET_INT(val);
break;
case JS_TAG_FLOAT64:
{
JSFloat64Union u;
double d;
int e;
d = JS_VALUE_GET_FLOAT64(val);
u.d = d;
/* we avoid doing fmod(x, 2^32) */
e = (u.u64 >> 52) & 0x7ff;
if (likely(e <= (1023 + 30))) {
/* fast case */
ret = (int32_t)d;
} else if (e <= (1023 + 30 + 53)) {
uint64_t v;
/* remainder modulo 2^32 */
v = (u.u64 & (((uint64_t)1 << 52) - 1)) | ((uint64_t)1 << 52);
v = v << ((e - 1023) - 52 + 32);
ret = v >> 32;
/* take the sign into account */
if (u.u64 >> 63)
if (ret != INT32_MIN)
ret = -ret;
} else {
ret = 0; /* also handles NaN and +inf */
}
}
break;
default:
val = JS_ToNumberFree(ctx, val);
if (JS_IsException(val)) {
*pres = 0;
return -1;
}
goto redo;
}
*pres = ret;
return 0;
}
|
O0
|
c
|
JS_ToInt32Free:
subq $0x68, %rsp
movq %rdx, 0x50(%rsp)
movq %rcx, 0x58(%rsp)
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movl 0x58(%rsp), %eax
movl %eax, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, 0x4(%rsp)
subl $0x4, %eax
jb 0x38fcd
jmp 0x38fbf
movl 0x4(%rsp), %eax
subl $0x7, %eax
je 0x38fda
jmp 0x390ba
movl 0x50(%rsp), %eax
movl %eax, 0x38(%rsp)
jmp 0x3911a
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x30(%rsp), %rax
shrq $0x34, %rax
andq $0x7ff, %rax # imm = 0x7FF
movl %eax, 0x24(%rsp)
cmpl $0x41d, 0x24(%rsp) # imm = 0x41D
setle %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x39030
cvttsd2si 0x28(%rsp), %eax
movl %eax, 0x38(%rsp)
jmp 0x390b8
cmpl $0x452, 0x24(%rsp) # imm = 0x452
jg 0x390ae
movabsq $0xfffffffffffff, %rax # imm = 0xFFFFFFFFFFFFF
andq 0x30(%rsp), %rax
movabsq $0x10000000000000, %rcx # imm = 0x10000000000000
orq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movl 0x24(%rsp), %ecx
subl $0x3ff, %ecx # imm = 0x3FF
subl $0x34, %ecx
addl $0x20, %ecx
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
shrq $0x20, %rax
movl %eax, 0x38(%rsp)
movq 0x30(%rsp), %rax
shrq $0x3f, %rax
cmpq $0x0, %rax
je 0x390ac
cmpl $0x80000000, 0x38(%rsp) # imm = 0x80000000
je 0x390aa
xorl %eax, %eax
subl 0x38(%rsp), %eax
movl %eax, 0x38(%rsp)
jmp 0x390ac
jmp 0x390b6
movl $0x0, 0x38(%rsp)
jmp 0x390b8
jmp 0x3911a
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x50ab0
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x39115
movq 0x40(%rsp), %rax
movl $0x0, (%rax)
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x3912d
jmp 0x38fa8
movl 0x38(%rsp), %ecx
movq 0x40(%rsp), %rax
movl %ecx, (%rax)
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_ToInt32Free:
sub rsp, 68h
mov [rsp+68h+var_18], rdx
mov [rsp+68h+var_10], rcx
mov [rsp+68h+var_20], rdi
mov [rsp+68h+var_28], rsi
loc_38FA8:
mov eax, dword ptr [rsp+68h+var_10]
mov [rsp+68h+var_2C], eax
mov eax, [rsp+68h+var_2C]
mov [rsp+68h+var_64], eax
sub eax, 4
jb short loc_38FCD
jmp short $+2
loc_38FBF:
mov eax, [rsp+68h+var_64]
sub eax, 7
jz short loc_38FDA
jmp loc_390BA
loc_38FCD:
mov eax, dword ptr [rsp+68h+var_18]
mov [rsp+68h+var_30], eax
jmp loc_3911A
loc_38FDA:
movsd xmm0, [rsp+68h+var_18]
movsd [rsp+68h+var_40], xmm0
movsd xmm0, [rsp+68h+var_40]
movsd [rsp+68h+var_38], xmm0
mov rax, [rsp+68h+var_38]
shr rax, 34h
and rax, 7FFh
mov [rsp+68h+var_44], eax
cmp [rsp+68h+var_44], 41Dh
setle al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_39030
cvttsd2si eax, [rsp+68h+var_40]
mov [rsp+68h+var_30], eax
jmp loc_390B8
loc_39030:
cmp [rsp+68h+var_44], 452h
jg short loc_390AE
mov rax, 0FFFFFFFFFFFFFh
and rax, [rsp+68h+var_38]
mov rcx, 10000000000000h
or rax, rcx
mov [rsp+68h+var_50], rax
mov rax, [rsp+68h+var_50]
mov ecx, [rsp+68h+var_44]
sub ecx, 3FFh
sub ecx, 34h ; '4'
add ecx, 20h ; ' '
mov ecx, ecx
shl rax, cl
mov [rsp+68h+var_50], rax
mov rax, [rsp+68h+var_50]
shr rax, 20h
mov [rsp+68h+var_30], eax
mov rax, [rsp+68h+var_38]
shr rax, 3Fh
cmp rax, 0
jz short loc_390AC
cmp [rsp+68h+var_30], 80000000h
jz short loc_390AA
xor eax, eax
sub eax, [rsp+68h+var_30]
mov [rsp+68h+var_30], eax
loc_390AA:
jmp short $+2
loc_390AC:
jmp short loc_390B6
loc_390AE:
mov [rsp+68h+var_30], 0
loc_390B6:
jmp short $+2
loc_390B8:
jmp short loc_3911A
loc_390BA:
mov rdi, [rsp+68h+var_20]
mov rsi, [rsp+68h+var_18]
mov rdx, [rsp+68h+var_10]
call JS_ToNumberFree
mov [rsp+68h+var_60], rax
mov [rsp+68h+var_58], rdx
mov rax, [rsp+68h+var_60]
mov [rsp+68h+var_18], rax
mov rax, [rsp+68h+var_58]
mov [rsp+68h+var_10], rax
mov rdi, [rsp+68h+var_18]
mov rsi, [rsp+68h+var_10]
call JS_IsException_1
cmp eax, 0
jz short loc_39115
mov rax, [rsp+68h+var_28]
mov dword ptr [rax], 0
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp short loc_3912D
loc_39115:
jmp loc_38FA8
loc_3911A:
mov ecx, [rsp+68h+var_30]
mov rax, [rsp+68h+var_28]
mov [rax], ecx
mov [rsp+68h+var_4], 0
loc_3912D:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
|
long long JS_ToInt32Free(long long a1, int *a2, unsigned long long a3, long long a4)
{
long long v4; // rdx
int v7; // [rsp+38h] [rbp-30h]
while ( 1 )
{
if ( (unsigned int)a4 < 4 )
{
v7 = a3;
goto LABEL_16;
}
if ( (_DWORD)a4 == 7 )
break;
*(double *)&a3 = COERCE_DOUBLE(JS_ToNumberFree(a1, a3, a4));
a4 = v4;
if ( JS_IsException_1(a3, v4) )
{
*a2 = 0;
return (unsigned int)-1;
}
}
if ( ((a3 >> 52) & 0x7FF) > 0x41D )
{
if ( ((a3 >> 52) & 0x7FF) > 0x452 )
{
v7 = 0;
}
else
{
v7 = (a3 & 0xFFFFFFFFFFFFFLL | 0x10000000000000LL) << ((unsigned __int8)(a3 >> 52) - 51 + 32) >> 32;
if ( (a3 & 0x8000000000000000LL) != 0LL && v7 != 0x80000000 )
v7 = -v7;
}
}
else
{
v7 = (int)*(double *)&a3;
}
LABEL_16:
*a2 = v7;
return 0;
}
|
JS_ToInt32Free:
SUB RSP,0x68
MOV qword ptr [RSP + 0x50],RDX
MOV qword ptr [RSP + 0x58],RCX
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RSI
LAB_00138fa8:
MOV EAX,dword ptr [RSP + 0x58]
MOV dword ptr [RSP + 0x3c],EAX
MOV EAX,dword ptr [RSP + 0x3c]
MOV dword ptr [RSP + 0x4],EAX
SUB EAX,0x4
JC 0x00138fcd
JMP 0x00138fbf
LAB_00138fbf:
MOV EAX,dword ptr [RSP + 0x4]
SUB EAX,0x7
JZ 0x00138fda
JMP 0x001390ba
LAB_00138fcd:
MOV EAX,dword ptr [RSP + 0x50]
MOV dword ptr [RSP + 0x38],EAX
JMP 0x0013911a
LAB_00138fda:
MOVSD XMM0,qword ptr [RSP + 0x50]
MOVSD qword ptr [RSP + 0x28],XMM0
MOVSD XMM0,qword ptr [RSP + 0x28]
MOVSD qword ptr [RSP + 0x30],XMM0
MOV RAX,qword ptr [RSP + 0x30]
SHR RAX,0x34
AND RAX,0x7ff
MOV dword ptr [RSP + 0x24],EAX
CMP dword ptr [RSP + 0x24],0x41d
SETLE AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00139030
CVTTSD2SI EAX,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x38],EAX
JMP 0x001390b8
LAB_00139030:
CMP dword ptr [RSP + 0x24],0x452
JG 0x001390ae
MOV RAX,0xfffffffffffff
AND RAX,qword ptr [RSP + 0x30]
MOV RCX,0x10000000000000
OR RAX,RCX
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x24]
SUB ECX,0x3ff
SUB ECX,0x34
ADD ECX,0x20
MOV ECX,ECX
SHL RAX,CL
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
SHR RAX,0x20
MOV dword ptr [RSP + 0x38],EAX
MOV RAX,qword ptr [RSP + 0x30]
SHR RAX,0x3f
CMP RAX,0x0
JZ 0x001390ac
CMP dword ptr [RSP + 0x38],0x80000000
JZ 0x001390aa
XOR EAX,EAX
SUB EAX,dword ptr [RSP + 0x38]
MOV dword ptr [RSP + 0x38],EAX
LAB_001390aa:
JMP 0x001390ac
LAB_001390ac:
JMP 0x001390b6
LAB_001390ae:
MOV dword ptr [RSP + 0x38],0x0
LAB_001390b6:
JMP 0x001390b8
LAB_001390b8:
JMP 0x0013911a
LAB_001390ba:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x00150ab0
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x00139115
MOV RAX,qword ptr [RSP + 0x40]
MOV dword ptr [RAX],0x0
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0013912d
LAB_00139115:
JMP 0x00138fa8
LAB_0013911a:
MOV ECX,dword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x40]
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + 0x64],0x0
LAB_0013912d:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
int4 JS_ToInt32Free(int8 param_1,int *param_2,int8 param_3,int8 param_4)
{
int8 uVar1;
uint uVar2;
int iVar3;
int1 auVar4 [16];
int local_30;
double local_18;
int8 local_10;
auVar4._8_8_ = param_4;
auVar4._0_8_ = param_3;
do {
local_10 = auVar4._8_8_;
uVar1 = local_10;
local_18 = auVar4._0_8_;
local_10._0_4_ = auVar4._8_4_;
if ((uint)local_10 < 4) {
local_18._0_4_ = auVar4._0_4_;
local_30 = local_18._0_4_;
LAB_0013911a:
*param_2 = local_30;
return 0;
}
if ((uint)local_10 == 7) {
uVar2 = auVar4._4_4_ >> 0x14 & 0x7ff;
if (uVar2 < 0x41e) {
local_30 = (int)local_18;
}
else if (uVar2 < 0x453) {
local_30 = (int)((((ulong)local_18 & 0xfffffffffffff | 0x10000000000000) <<
((char)uVar2 - 0x13U & 0x3f)) >> 0x20);
if (((long)local_18 < 0) && (local_30 != -0x80000000)) {
local_30 = -local_30;
}
}
else {
local_30 = 0;
}
goto LAB_0013911a;
}
auVar4 = JS_ToNumberFree(param_1,local_18,uVar1);
iVar3 = JS_IsException(auVar4._0_8_,auVar4._8_8_);
if (iVar3 != 0) {
*param_2 = 0;
return 0xffffffff;
}
} while( true );
}
|
|
18,565
|
JS_ToInt32Free
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_ToInt32Free(JSContext *ctx, int32_t *pres, JSValue val)
{
uint32_t tag;
int32_t ret;
redo:
tag = JS_VALUE_GET_NORM_TAG(val);
switch(tag) {
case JS_TAG_INT:
case JS_TAG_BOOL:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
ret = JS_VALUE_GET_INT(val);
break;
case JS_TAG_FLOAT64:
{
JSFloat64Union u;
double d;
int e;
d = JS_VALUE_GET_FLOAT64(val);
u.d = d;
/* we avoid doing fmod(x, 2^32) */
e = (u.u64 >> 52) & 0x7ff;
if (likely(e <= (1023 + 30))) {
/* fast case */
ret = (int32_t)d;
} else if (e <= (1023 + 30 + 53)) {
uint64_t v;
/* remainder modulo 2^32 */
v = (u.u64 & (((uint64_t)1 << 52) - 1)) | ((uint64_t)1 << 52);
v = v << ((e - 1023) - 52 + 32);
ret = v >> 32;
/* take the sign into account */
if (u.u64 >> 63)
if (ret != INT32_MIN)
ret = -ret;
} else {
ret = 0; /* also handles NaN and +inf */
}
}
break;
default:
val = JS_ToNumberFree(ctx, val);
if (JS_IsException(val)) {
*pres = 0;
return -1;
}
goto redo;
}
*pres = ret;
return 0;
}
|
O1
|
c
|
JS_ToInt32Free:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
cmpl $0x4, %ecx
jb 0x279fb
cmpl $0x7, %ecx
je 0x27a08
movq %r14, %rdi
movq %rax, %rsi
movq %rcx, %rdx
xorl %ecx, %ecx
callq 0x42b20
movq %rdx, %rcx
cmpl $0x6, %ecx
jne 0x279d2
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
jmp 0x279ff
xorl %edx, %edx
movl %eax, %ebp
movl %ebp, (%rbx)
movl %edx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rcx
shrq $0x34, %rcx
andl $0x7ff, %ecx # imm = 0x7FF
cmpl $0x41d, %ecx # imm = 0x41D
ja 0x27a2a
movq %rax, %xmm0
cvttsd2si %xmm0, %ebp
xorl %edx, %edx
jmp 0x279ff
xorl %edx, %edx
cmpl $0x452, %ecx # imm = 0x452
ja 0x27a6b
movabsq $0xfffffffffffff, %rsi # imm = 0xFFFFFFFFFFFFF
movq %rax, %rdi
andq %rsi, %rdi
addq %rdi, %rsi
incq %rsi
addb $-0x13, %cl
shlq %cl, %rsi
shrq $0x20, %rsi
movl %esi, %ebp
negl %ebp
movl $0x80000000, %ecx # imm = 0x80000000
cmpq %rcx, %rsi
cmovel %esi, %ebp
testq %rax, %rax
cmovnsl %esi, %ebp
jmp 0x279ff
xorl %ebp, %ebp
jmp 0x279ff
|
JS_ToInt32Free:
push rbp
push r14
push rbx
mov rax, rdx
mov rbx, rsi
mov r14, rdi
xor ebp, ebp
loc_279D2:
cmp ecx, 4
jb short loc_279FB
cmp ecx, 7
jz short loc_27A08
mov rdi, r14
mov rsi, rax
mov rdx, rcx
xor ecx, ecx
call JS_ToNumberHintFree
mov rcx, rdx
cmp ecx, 6
jnz short loc_279D2
mov edx, 0FFFFFFFFh
jmp short loc_279FF
loc_279FB:
xor edx, edx
mov ebp, eax
loc_279FF:
mov [rbx], ebp
mov eax, edx
pop rbx
pop r14
pop rbp
retn
loc_27A08:
mov rcx, rax
shr rcx, 34h
and ecx, 7FFh
cmp ecx, 41Dh
ja short loc_27A2A
movq xmm0, rax
cvttsd2si ebp, xmm0
xor edx, edx
jmp short loc_279FF
loc_27A2A:
xor edx, edx
cmp ecx, 452h
ja short loc_27A6B
mov rsi, 0FFFFFFFFFFFFFh
mov rdi, rax
and rdi, rsi
add rsi, rdi
inc rsi
add cl, 0EDh
shl rsi, cl
shr rsi, 20h
mov ebp, esi
neg ebp
mov ecx, 80000000h
cmp rsi, rcx
cmovz ebp, esi
test rax, rax
cmovns ebp, esi
jmp short loc_279FF
loc_27A6B:
xor ebp, ebp
jmp short loc_279FF
|
long long JS_ToInt32Free(long long a1, int *a2, unsigned long long a3, long long a4)
{
int v5; // ebp
long long v6; // rdx
unsigned int v7; // edx
long long v9; // rcx
v5 = 0;
while ( 1 )
{
if ( (unsigned int)a4 < 4 )
{
v7 = 0;
v5 = a3;
goto LABEL_7;
}
if ( (_DWORD)a4 == 7 )
break;
*(double *)&a3 = COERCE_DOUBLE(JS_ToNumberHintFree(a1, a3, a4, 0LL));
a4 = v6;
if ( (_DWORD)v6 == 6 )
{
v7 = -1;
goto LABEL_7;
}
}
v9 = (a3 >> 52) & 0x7FF;
if ( (unsigned int)v9 > 0x41D )
{
v7 = 0;
if ( (unsigned int)v9 > 0x452 )
{
v5 = 0;
}
else
{
v5 = -(((a3 & 0xFFFFFFFFFFFFFLL) + 0x10000000000000LL) << ((unsigned __int8)(a3 >> 52) - 19) >> 32);
if ( ((a3 & 0xFFFFFFFFFFFFFLL) + 0x10000000000000LL) << ((unsigned __int8)(a3 >> 52) - 19) >> 32 == 0x80000000 )
v5 = 0x80000000;
if ( (a3 & 0x8000000000000000LL) == 0LL )
v5 = ((a3 & 0xFFFFFFFFFFFFFLL) + 0x10000000000000LL) << ((unsigned __int8)(a3 >> 52) - 19) >> 32;
}
}
else
{
v5 = (int)*(double *)&a3;
v7 = 0;
}
LABEL_7:
*a2 = v5;
return v7;
}
| |||
18,566
|
JS_ToInt32Free
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_ToInt32Free(JSContext *ctx, int32_t *pres, JSValue val)
{
uint32_t tag;
int32_t ret;
redo:
tag = JS_VALUE_GET_NORM_TAG(val);
switch(tag) {
case JS_TAG_INT:
case JS_TAG_BOOL:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
ret = JS_VALUE_GET_INT(val);
break;
case JS_TAG_FLOAT64:
{
JSFloat64Union u;
double d;
int e;
d = JS_VALUE_GET_FLOAT64(val);
u.d = d;
/* we avoid doing fmod(x, 2^32) */
e = (u.u64 >> 52) & 0x7ff;
if (likely(e <= (1023 + 30))) {
/* fast case */
ret = (int32_t)d;
} else if (e <= (1023 + 30 + 53)) {
uint64_t v;
/* remainder modulo 2^32 */
v = (u.u64 & (((uint64_t)1 << 52) - 1)) | ((uint64_t)1 << 52);
v = v << ((e - 1023) - 52 + 32);
ret = v >> 32;
/* take the sign into account */
if (u.u64 >> 63)
if (ret != INT32_MIN)
ret = -ret;
} else {
ret = 0; /* also handles NaN and +inf */
}
}
break;
default:
val = JS_ToNumberFree(ctx, val);
if (JS_IsException(val)) {
*pres = 0;
return -1;
}
goto redo;
}
*pres = ret;
return 0;
}
|
O2
|
c
|
JS_ToInt32Free:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $-0x1
popq %rbp
cmpl $0x4, %ecx
jb 0x21632
cmpl $0x7, %ecx
je 0x21614
movq %r14, %rdi
movq %rax, %rsi
movq %rcx, %rdx
callq 0x2e216
movq %rdx, %rcx
cmpl $0x6, %ecx
jne 0x215f0
xorl %eax, %eax
jmp 0x21634
movq %rax, %rcx
shrq $0x34, %rcx
andl $0x7ff, %ecx # imm = 0x7FF
cmpl $0x41d, %ecx # imm = 0x41D
ja 0x2163d
movq %rax, %xmm0
cvttsd2si %xmm0, %eax
xorl %ebp, %ebp
movl %eax, (%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
xorl %ebp, %ebp
cmpl $0x452, %ecx # imm = 0x452
ja 0x21610
movabsq $0xfffffffffffff, %rdx # imm = 0xFFFFFFFFFFFFF
movq %rax, %rsi
andq %rdx, %rsi
addq %rsi, %rdx
incq %rdx
addb $-0x13, %cl
shlq %cl, %rdx
shrq $0x20, %rdx
movl %edx, %ecx
negl %ecx
movl $0x80000000, %esi # imm = 0x80000000
cmpq %rsi, %rdx
cmovel %edx, %ecx
testq %rax, %rax
cmovnsl %edx, %ecx
movl %ecx, %eax
jmp 0x21634
|
JS_ToInt32Free:
push rbp
push r14
push rbx
mov rax, rdx
mov rbx, rsi
mov r14, rdi
push 0FFFFFFFFFFFFFFFFh
pop rbp
loc_215F0:
cmp ecx, 4
jb short loc_21632
cmp ecx, 7
jz short loc_21614
mov rdi, r14
mov rsi, rax
mov rdx, rcx
call JS_ToNumberFree
mov rcx, rdx
cmp ecx, 6
jnz short loc_215F0
loc_21610:
xor eax, eax
jmp short loc_21634
loc_21614:
mov rcx, rax
shr rcx, 34h
and ecx, 7FFh
cmp ecx, 41Dh
ja short loc_2163D
movq xmm0, rax
cvttsd2si eax, xmm0
loc_21632:
xor ebp, ebp
loc_21634:
mov [rbx], eax
mov eax, ebp
pop rbx
pop r14
pop rbp
retn
loc_2163D:
xor ebp, ebp
cmp ecx, 452h
ja short loc_21610
mov rdx, 0FFFFFFFFFFFFFh
mov rsi, rax
and rsi, rdx
add rdx, rsi
inc rdx
add cl, 0EDh
shl rdx, cl
shr rdx, 20h
mov ecx, edx
neg ecx
mov esi, 80000000h
cmp rdx, rsi
cmovz ecx, edx
test rax, rax
cmovns ecx, edx
mov eax, ecx
jmp short loc_21634
|
long long JS_ToInt32Free(long long a1, _DWORD *a2, unsigned long long a3, long long a4)
{
unsigned int v5; // ebp
long long v6; // rdx
long long v7; // rcx
unsigned int v9; // ecx
v5 = -1;
while ( 1 )
{
if ( (unsigned int)a4 < 4 )
goto LABEL_8;
if ( (_DWORD)a4 == 7 )
break;
*(double *)&a3 = COERCE_DOUBLE(JS_ToNumberFree(a1, a3, a4));
a4 = v6;
if ( (_DWORD)v6 == 6 )
goto LABEL_5;
}
v7 = (a3 >> 52) & 0x7FF;
if ( (unsigned int)v7 <= 0x41D )
{
LODWORD(a3) = (int)*(double *)&a3;
LABEL_8:
v5 = 0;
goto LABEL_9;
}
v5 = 0;
if ( (unsigned int)v7 > 0x452 )
{
LABEL_5:
LODWORD(a3) = 0;
goto LABEL_9;
}
v9 = -(((a3 & 0xFFFFFFFFFFFFFLL) + 0x10000000000000LL) << ((unsigned __int8)(a3 >> 52) - 19) >> 32);
if ( ((a3 & 0xFFFFFFFFFFFFFLL) + 0x10000000000000LL) << ((unsigned __int8)(a3 >> 52) - 19) >> 32 == 0x80000000 )
v9 = 0x80000000;
if ( (a3 & 0x8000000000000000LL) == 0LL )
v9 = ((a3 & 0xFFFFFFFFFFFFFLL) + 0x10000000000000LL) << ((unsigned __int8)(a3 >> 52) - 19) >> 32;
LODWORD(a3) = v9;
LABEL_9:
*a2 = a3;
return v5;
}
|
JS_ToInt32Free:
PUSH RBP
PUSH R14
PUSH RBX
MOV RAX,RDX
MOV RBX,RSI
MOV R14,RDI
PUSH -0x1
POP RBP
LAB_001215f0:
CMP ECX,0x4
JC 0x00121632
CMP ECX,0x7
JZ 0x00121614
MOV RDI,R14
MOV RSI,RAX
MOV RDX,RCX
CALL 0x0012e216
MOV RCX,RDX
CMP ECX,0x6
JNZ 0x001215f0
LAB_00121610:
XOR EAX,EAX
JMP 0x00121634
LAB_00121614:
MOV RCX,RAX
SHR RCX,0x34
AND ECX,0x7ff
CMP ECX,0x41d
JA 0x0012163d
MOVQ XMM0,RAX
CVTTSD2SI EAX,XMM0
LAB_00121632:
XOR EBP,EBP
LAB_00121634:
MOV dword ptr [RBX],EAX
MOV EAX,EBP
POP RBX
POP R14
POP RBP
RET
LAB_0012163d:
XOR EBP,EBP
CMP ECX,0x452
JA 0x00121610
MOV RDX,0xfffffffffffff
MOV RSI,RAX
AND RSI,RDX
ADD RDX,RSI
INC RDX
ADD CL,0xed
SHL RDX,CL
SHR RDX,0x20
MOV ECX,EDX
NEG ECX
MOV ESI,0x80000000
CMP RDX,RSI
CMOVZ ECX,EDX
TEST RAX,RAX
CMOVNS ECX,EDX
MOV EAX,ECX
JMP 0x00121634
|
int4 JS_ToInt32Free(int8 param_1,int *param_2,int8 param_3,int8 param_4)
{
int iVar1;
double dVar2;
uint uVar3;
int iVar4;
ulong uVar5;
int4 uVar6;
int1 auVar7 [16];
auVar7._8_8_ = param_4;
auVar7._0_8_ = param_3;
uVar6 = 0xffffffff;
do {
dVar2 = auVar7._0_8_;
if (auVar7._8_4_ < 4) {
LAB_00121632:
uVar6 = 0;
iVar1 = SUB84(dVar2,0);
goto LAB_00121634;
}
if (auVar7._8_4_ == 7) {
uVar3 = auVar7._4_4_ >> 0x14 & 0x7ff;
if (uVar3 < 0x41e) {
dVar2 = (double)(ulong)(uint)(int)dVar2;
goto LAB_00121632;
}
uVar6 = 0;
if (uVar3 < 0x453) {
uVar5 = ((ulong)dVar2 & 0xfffffffffffff) + 0x10000000000000 << ((char)uVar3 - 0x13U & 0x3f);
iVar4 = (int)(uVar5 >> 0x20);
iVar1 = -iVar4;
if (uVar5 >> 0x20 == 0x80000000) {
iVar1 = iVar4;
}
if (-1 < (long)dVar2) {
iVar1 = iVar4;
}
goto LAB_00121634;
}
goto LAB_00121610;
}
auVar7 = JS_ToNumberFree(param_1,dVar2,auVar7._8_8_);
if (auVar7._8_4_ == 6) {
LAB_00121610:
iVar1 = 0;
LAB_00121634:
*param_2 = iVar1;
return uVar6;
}
} while( true );
}
|
|
18,567
|
JS_ToInt32Free
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_ToInt32Free(JSContext *ctx, int32_t *pres, JSValue val)
{
uint32_t tag;
int32_t ret;
redo:
tag = JS_VALUE_GET_NORM_TAG(val);
switch(tag) {
case JS_TAG_INT:
case JS_TAG_BOOL:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
ret = JS_VALUE_GET_INT(val);
break;
case JS_TAG_FLOAT64:
{
JSFloat64Union u;
double d;
int e;
d = JS_VALUE_GET_FLOAT64(val);
u.d = d;
/* we avoid doing fmod(x, 2^32) */
e = (u.u64 >> 52) & 0x7ff;
if (likely(e <= (1023 + 30))) {
/* fast case */
ret = (int32_t)d;
} else if (e <= (1023 + 30 + 53)) {
uint64_t v;
/* remainder modulo 2^32 */
v = (u.u64 & (((uint64_t)1 << 52) - 1)) | ((uint64_t)1 << 52);
v = v << ((e - 1023) - 52 + 32);
ret = v >> 32;
/* take the sign into account */
if (u.u64 >> 63)
if (ret != INT32_MIN)
ret = -ret;
} else {
ret = 0; /* also handles NaN and +inf */
}
}
break;
default:
val = JS_ToNumberFree(ctx, val);
if (JS_IsException(val)) {
*pres = 0;
return -1;
}
goto redo;
}
*pres = ret;
return 0;
}
|
O3
|
c
|
JS_ToInt32Free:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
cmpl $0x4, %ecx
jb 0x2807c
cmpl $0x7, %ecx
je 0x28089
movq %r14, %rdi
movq %rax, %rsi
movq %rcx, %rdx
xorl %ecx, %ecx
callq 0x44695
movq %rdx, %rcx
cmpl $0x6, %ecx
jne 0x28053
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
jmp 0x28080
xorl %edx, %edx
movl %eax, %ebp
movl %ebp, (%rbx)
movl %edx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rcx
shrq $0x34, %rcx
andl $0x7ff, %ecx # imm = 0x7FF
cmpl $0x41d, %ecx # imm = 0x41D
ja 0x280ab
movq %rax, %xmm0
cvttsd2si %xmm0, %ebp
xorl %edx, %edx
jmp 0x28080
xorl %edx, %edx
cmpl $0x452, %ecx # imm = 0x452
ja 0x280ec
movabsq $0xfffffffffffff, %rsi # imm = 0xFFFFFFFFFFFFF
movq %rax, %rdi
andq %rsi, %rdi
addq %rdi, %rsi
incq %rsi
addb $-0x13, %cl
shlq %cl, %rsi
shrq $0x20, %rsi
movl %esi, %ebp
negl %ebp
movl $0x80000000, %ecx # imm = 0x80000000
cmpq %rcx, %rsi
cmovel %esi, %ebp
testq %rax, %rax
cmovnsl %esi, %ebp
jmp 0x28080
xorl %ebp, %ebp
jmp 0x28080
|
JS_ToInt32Free:
push rbp
push r14
push rbx
mov rax, rdx
mov rbx, rsi
mov r14, rdi
xor ebp, ebp
loc_28053:
cmp ecx, 4
jb short loc_2807C
cmp ecx, 7
jz short loc_28089
mov rdi, r14
mov rsi, rax
mov rdx, rcx
xor ecx, ecx
call JS_ToNumberHintFree
mov rcx, rdx
cmp ecx, 6
jnz short loc_28053
mov edx, 0FFFFFFFFh
jmp short loc_28080
loc_2807C:
xor edx, edx
mov ebp, eax
loc_28080:
mov [rbx], ebp
mov eax, edx
pop rbx
pop r14
pop rbp
retn
loc_28089:
mov rcx, rax
shr rcx, 34h
and ecx, 7FFh
cmp ecx, 41Dh
ja short loc_280AB
movq xmm0, rax
cvttsd2si ebp, xmm0
xor edx, edx
jmp short loc_28080
loc_280AB:
xor edx, edx
cmp ecx, 452h
ja short loc_280EC
mov rsi, 0FFFFFFFFFFFFFh
mov rdi, rax
and rdi, rsi
add rsi, rdi
inc rsi
add cl, 0EDh
shl rsi, cl
shr rsi, 20h
mov ebp, esi
neg ebp
mov ecx, 80000000h
cmp rsi, rcx
cmovz ebp, esi
test rax, rax
cmovns ebp, esi
jmp short loc_28080
loc_280EC:
xor ebp, ebp
jmp short loc_28080
|
long long JS_ToInt32Free(long long a1, int *a2, unsigned long long a3, long long a4)
{
int v5; // ebp
long long v6; // rdx
unsigned int v7; // edx
long long v9; // rcx
v5 = 0;
while ( 1 )
{
if ( (unsigned int)a4 < 4 )
{
v7 = 0;
v5 = a3;
goto LABEL_7;
}
if ( (_DWORD)a4 == 7 )
break;
*(double *)&a3 = COERCE_DOUBLE(JS_ToNumberHintFree(a1, a3, a4, 0LL));
a4 = v6;
if ( (_DWORD)v6 == 6 )
{
v7 = -1;
goto LABEL_7;
}
}
v9 = (a3 >> 52) & 0x7FF;
if ( (unsigned int)v9 > 0x41D )
{
v7 = 0;
if ( (unsigned int)v9 > 0x452 )
{
v5 = 0;
}
else
{
v5 = -(((a3 & 0xFFFFFFFFFFFFFLL) + 0x10000000000000LL) << ((unsigned __int8)(a3 >> 52) - 19) >> 32);
if ( ((a3 & 0xFFFFFFFFFFFFFLL) + 0x10000000000000LL) << ((unsigned __int8)(a3 >> 52) - 19) >> 32 == 0x80000000 )
v5 = 0x80000000;
if ( (a3 & 0x8000000000000000LL) == 0LL )
v5 = ((a3 & 0xFFFFFFFFFFFFFLL) + 0x10000000000000LL) << ((unsigned __int8)(a3 >> 52) - 19) >> 32;
}
}
else
{
v5 = (int)*(double *)&a3;
v7 = 0;
}
LABEL_7:
*a2 = v5;
return v7;
}
|
JS_ToInt32Free:
PUSH RBP
PUSH R14
PUSH RBX
MOV RAX,RDX
MOV RBX,RSI
MOV R14,RDI
XOR EBP,EBP
LAB_00128053:
CMP ECX,0x4
JC 0x0012807c
CMP ECX,0x7
JZ 0x00128089
MOV RDI,R14
MOV RSI,RAX
MOV RDX,RCX
XOR ECX,ECX
CALL 0x00144695
MOV RCX,RDX
CMP ECX,0x6
JNZ 0x00128053
MOV EDX,0xffffffff
JMP 0x00128080
LAB_0012807c:
XOR EDX,EDX
MOV EBP,EAX
LAB_00128080:
MOV dword ptr [RBX],EBP
MOV EAX,EDX
POP RBX
POP R14
POP RBP
RET
LAB_00128089:
MOV RCX,RAX
SHR RCX,0x34
AND ECX,0x7ff
CMP ECX,0x41d
JA 0x001280ab
MOVQ XMM0,RAX
CVTTSD2SI EBP,XMM0
XOR EDX,EDX
JMP 0x00128080
LAB_001280ab:
XOR EDX,EDX
CMP ECX,0x452
JA 0x001280ec
MOV RSI,0xfffffffffffff
MOV RDI,RAX
AND RDI,RSI
ADD RSI,RDI
INC RSI
ADD CL,0xed
SHL RSI,CL
SHR RSI,0x20
MOV EBP,ESI
NEG EBP
MOV ECX,0x80000000
CMP RSI,RCX
CMOVZ EBP,ESI
TEST RAX,RAX
CMOVNS EBP,ESI
JMP 0x00128080
LAB_001280ec:
XOR EBP,EBP
JMP 0x00128080
|
int8 JS_ToInt32Free(int8 param_1,int *param_2,int8 param_3,int8 param_4)
{
double dVar1;
uint uVar2;
int8 uVar3;
int iVar4;
int iVar5;
ulong uVar6;
int1 auVar7 [16];
auVar7._8_8_ = param_4;
auVar7._0_8_ = param_3;
while( true ) {
dVar1 = auVar7._0_8_;
if (auVar7._8_4_ < 4) {
uVar3 = 0;
iVar4 = auVar7._0_4_;
goto LAB_00128080;
}
if (auVar7._8_4_ == 7) break;
auVar7 = JS_ToNumberHintFree(param_1,dVar1,auVar7._8_8_,0);
if (auVar7._8_4_ == 6) {
uVar3 = 0xffffffff;
iVar4 = 0;
LAB_00128080:
*param_2 = iVar4;
return uVar3;
}
}
uVar2 = auVar7._4_4_ >> 0x14 & 0x7ff;
if (uVar2 < 0x41e) {
uVar3 = 0;
iVar4 = (int)dVar1;
}
else {
uVar3 = 0;
if (uVar2 < 0x453) {
uVar6 = ((ulong)dVar1 & 0xfffffffffffff) + 0x10000000000000 << ((char)uVar2 - 0x13U & 0x3f);
iVar5 = (int)(uVar6 >> 0x20);
iVar4 = -iVar5;
if (uVar6 >> 0x20 == 0x80000000) {
iVar4 = iVar5;
}
if (-1 < (long)dVar1) {
iVar4 = iVar5;
}
}
else {
iVar4 = 0;
}
}
goto LAB_00128080;
}
|
|
18,568
|
mysql_rollback_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_rollback_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_rollback,
(parms->mysql),
parms->mysql,
my_bool,
r_my_bool)
}
|
O0
|
c
|
mysql_rollback_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
callq 0x865e0
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mysql_rollback_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]
call mysql_rollback
mov [rbp+var_11], al
mov cl, [rbp+var_11]
mov rax, [rbp+var_20]
mov [rax+8], cl
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
long long mysql_rollback_start_internal(long long *a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL);
*(_BYTE *)(v2 + 8) = mysql_rollback(*a1);
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_rollback_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]
CALL 0x001865e0
MOV byte ptr [RBP + -0x11],AL
MOV CL,byte ptr [RBP + -0x11]
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x8],CL
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_rollback_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_rollback(*param_1);
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
18,569
|
ftxui::animation::Animator::OnAnimation(ftxui::animation::Params&)
|
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/animation.cpp
|
void Animator::OnAnimation(Params& params) {
current_ += params.duration();
if (current_ >= duration_) {
*value_ = to_;
return;
}
if (current_ <= Duration()) {
*value_ = from_;
} else {
*value_ = from_ + (to_ - from_) * easing_function_(current_ / duration_);
}
RequestAnimationFrame();
}
|
O3
|
cpp
|
ftxui::animation::Animator::OnAnimation(ftxui::animation::Params&):
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movss (%rsi), %xmm0
addss 0x38(%rdi), %xmm0
movss %xmm0, 0x38(%rdi)
movss 0x10(%rdi), %xmm1
ucomiss %xmm0, %xmm1
ja 0x37242
movss 0xc(%rbx), %xmm0
movq (%rbx), %rax
movss %xmm0, (%rax)
jmp 0x3729d
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
movss 0x8(%rbx), %xmm2
jbe 0x37291
movss 0xc(%rbx), %xmm3
divss %xmm1, %xmm0
movss %xmm0, 0xc(%rsp)
cmpq $0x0, 0x28(%rbx)
je 0x372a3
leaq 0x18(%rbx), %rdi
subss %xmm2, %xmm3
movss %xmm3, 0x4(%rsp)
leaq 0xc(%rsp), %rsi
movss %xmm2, 0x8(%rsp)
callq *0x30(%rbx)
movss 0x8(%rsp), %xmm2
mulss 0x4(%rsp), %xmm0
addss %xmm0, %xmm2
movq (%rbx), %rax
movss %xmm2, (%rax)
callq 0x2d24c
addq $0x10, %rsp
popq %rbx
retq
callq 0xb140
|
_ZN5ftxui9animation8Animator11OnAnimationERNS0_6ParamsE:
push rbx
sub rsp, 10h
mov rbx, rdi
movss xmm0, dword ptr [rsi]
addss xmm0, dword ptr [rdi+38h]
movss dword ptr [rdi+38h], xmm0
movss xmm1, dword ptr [rdi+10h]
ucomiss xmm1, xmm0
ja short loc_37242
movss xmm0, dword ptr [rbx+0Ch]
mov rax, [rbx]
movss dword ptr [rax], xmm0
jmp short loc_3729D
loc_37242:
xorps xmm2, xmm2
ucomiss xmm0, xmm2
movss xmm2, dword ptr [rbx+8]
jbe short loc_37291
movss xmm3, dword ptr [rbx+0Ch]
divss xmm0, xmm1
movss [rsp+18h+var_C], xmm0
cmp qword ptr [rbx+28h], 0
jz short loc_372A3
lea rdi, [rbx+18h]; this
subss xmm3, xmm2
movss [rsp+18h+var_14], xmm3
lea rsi, [rsp+18h+var_C]
movss [rsp+18h+var_10], xmm2
call qword ptr [rbx+30h]
movss xmm2, [rsp+18h+var_10]
mulss xmm0, [rsp+18h+var_14]
addss xmm2, xmm0
loc_37291:
mov rax, [rbx]
movss dword ptr [rax], xmm2
call _ZN5ftxui9animation21RequestAnimationFrameEv; ftxui::animation::RequestAnimationFrame(void)
loc_3729D:
add rsp, 10h
pop rbx
retn
loc_372A3:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
|
void ftxui::animation::Animator::OnAnimation(long long a1, float *a2)
{
long long v2; // rbx
float v3; // xmm0_4
float v4; // xmm1_4
float v5; // xmm2_4
float v6; // xmm3_4
float v7[3]; // [rsp+Ch] [rbp-Ch] BYREF
v2 = a1;
v3 = *a2 + *(float *)(a1 + 56);
*(float *)(a1 + 56) = v3;
v4 = *(float *)(a1 + 16);
if ( v4 > v3 )
{
v5 = *(float *)(a1 + 8);
if ( v3 > 0.0 )
{
v6 = *(float *)(a1 + 12);
v7[0] = v3 / v4;
if ( !*(_QWORD *)(a1 + 40) )
std::__throw_bad_function_call();
a1 += 24LL;
v5 = v5 + (float)((*(float ( **)(long long, float *))(v2 + 48))(a1, v7) * (float)(v6 - v5));
}
**(float **)v2 = v5;
ftxui::animation::RequestAnimationFrame((ftxui::animation *)a1);
}
else
{
**(_DWORD **)a1 = *(_DWORD *)(a1 + 12);
}
}
|
OnAnimation:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOVSS XMM0,dword ptr [RSI]
ADDSS XMM0,dword ptr [RDI + 0x38]
MOVSS dword ptr [RDI + 0x38],XMM0
MOVSS XMM1,dword ptr [RDI + 0x10]
UCOMISS XMM1,XMM0
JA 0x00137242
MOVSS XMM0,dword ptr [RBX + 0xc]
MOV RAX,qword ptr [RBX]
MOVSS dword ptr [RAX],XMM0
JMP 0x0013729d
LAB_00137242:
XORPS XMM2,XMM2
UCOMISS XMM0,XMM2
MOVSS XMM2,dword ptr [RBX + 0x8]
JBE 0x00137291
MOVSS XMM3,dword ptr [RBX + 0xc]
DIVSS XMM0,XMM1
MOVSS dword ptr [RSP + 0xc],XMM0
CMP qword ptr [RBX + 0x28],0x0
JZ 0x001372a3
LEA RDI,[RBX + 0x18]
SUBSS XMM3,XMM2
MOVSS dword ptr [RSP + 0x4],XMM3
LEA RSI,[RSP + 0xc]
MOVSS dword ptr [RSP + 0x8],XMM2
CALL qword ptr [RBX + 0x30]
MOVSS XMM2,dword ptr [RSP + 0x8]
MULSS XMM0,dword ptr [RSP + 0x4]
ADDSS XMM2,XMM0
LAB_00137291:
MOV RAX,qword ptr [RBX]
MOVSS dword ptr [RAX],XMM2
CALL 0x0012d24c
LAB_0013729d:
ADD RSP,0x10
POP RBX
RET
LAB_001372a3:
CALL 0x0010b140
|
/* ftxui::animation::Animator::OnAnimation(ftxui::animation::Params&) */
void __thiscall ftxui::animation::Animator::OnAnimation(Animator *this,Params *param_1)
{
float fVar1;
float fVar2;
float fVar3;
float local_c;
fVar2 = *(float *)param_1 + *(float *)(this + 0x38);
*(float *)(this + 0x38) = fVar2;
if (fVar2 < *(float *)(this + 0x10)) {
fVar3 = *(float *)(this + 8);
if (0.0 < fVar2) {
fVar1 = *(float *)(this + 0xc);
local_c = fVar2 / *(float *)(this + 0x10);
if (*(long *)(this + 0x28) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
fVar2 = (float)(**(code **)(this + 0x30))(this + 0x18,&local_c);
fVar3 = fVar3 + fVar2 * (fVar1 - fVar3);
}
**(float **)this = fVar3;
RequestAnimationFrame();
}
else {
**(int4 **)this = *(int4 *)(this + 0xc);
}
return;
}
|
|
18,570
|
mysql_stmt_close_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_stmt_close_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_stmt_close,
(parms->stmt),
parms->stmt->mysql,
my_bool,
r_my_bool)
}
|
O0
|
c
|
mysql_stmt_close_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 0x38(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x173d0
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
mysql_stmt_close_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+38h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call _mysql_stmt_close@libmariadbclient_18
mov [rbp+var_11], al
mov cl, [rbp+var_11]
mov rax, [rbp+var_20]
mov [rax+8], cl
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
long long mysql_stmt_close_start_internal(long long *a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL);
*(_BYTE *)(v2 + 8) = mysql_stmt_close_libmariadbclient_18(*a1);
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_stmt_close_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 + 0x38]
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]
CALL 0x001173d0
MOV byte ptr [RBP + -0x11],AL
MOV CL,byte ptr [RBP + -0x11]
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x8],CL
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_stmt_close_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28);
uVar2 = mysql_stmt_close(*param_1);
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
18,571
|
process_dbl_arg
|
eloqsql/strings/my_vsnprintf.c
|
static char *process_dbl_arg(char *to, char *end, size_t width,
double par, char arg_type)
{
if (width == MAX_WIDTH)
width= FLT_DIG; /* width not set, use default */
else if (width >= FLOATING_POINT_DECIMALS)
width= FLOATING_POINT_DECIMALS - 1; /* max.precision for my_fcvt() */
width= MY_MIN(width, (size_t)(end-to) - 1);
if (arg_type == 'f')
to+= my_fcvt(par, (int)width , to, NULL);
else
to+= my_gcvt(par, MY_GCVT_ARG_DOUBLE, (int) width , to, NULL);
return to;
}
|
O3
|
c
|
process_dbl_arg:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x1e, %rdx
movl $0x1e, %eax
cmovbq %rdx, %rax
cmpq $0xffff, %rdx # imm = 0xFFFF
movl $0x6, %edx
cmovneq %rax, %rdx
movq %rdi, %rbx
movq %rdi, %rax
notq %rax
addq %rsi, %rax
cmpq %rax, %rdx
cmovbq %rdx, %rax
cmpb $0x66, %cl
jne 0xd6b94
movl %eax, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xd2120
jmp 0xd6ba5
movl $0x1, %edi
movl %eax, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xd34a2
addq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
process_dbl_arg:
push rbp
mov rbp, rsp
push rbx
push rax
cmp rdx, 1Eh
mov eax, 1Eh
cmovb rax, rdx
cmp rdx, 0FFFFh
mov edx, 6
cmovnz rdx, rax
mov rbx, rdi
mov rax, rdi
not rax
add rax, rsi
cmp rdx, rax
cmovb rax, rdx
cmp cl, 66h ; 'f'
jnz short loc_D6B94
mov edi, eax
mov rsi, rbx
xor edx, edx
call my_fcvt
jmp short loc_D6BA5
loc_D6B94:
mov edi, 1
mov esi, eax
mov rdx, rbx
xor ecx, ecx
call my_gcvt
loc_D6BA5:
add rbx, rax
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
retn
|
char * process_dbl_arg(unsigned long long a1, long long a2, unsigned long long a3, char a4, double a5)
{
long long v5; // rax
bool v6; // zf
unsigned long long v7; // rdx
unsigned long long v8; // rax
long long v9; // rax
v5 = 30LL;
if ( a3 < 0x1E )
v5 = a3;
v6 = a3 == 0xFFFF;
v7 = 6LL;
if ( !v6 )
v7 = v5;
v8 = a2 + ~a1;
if ( v7 < v8 )
LODWORD(v8) = v7;
if ( a4 == 102 )
v9 = (long long)my_fcvt(v8, (_WORD *)a1, 0LL);
else
v9 = my_gcvt(1, v8, (_WORD *)a1, 0LL, a5);
return (char *)(v9 + a1);
}
|
process_dbl_arg:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CMP RDX,0x1e
MOV EAX,0x1e
CMOVC RAX,RDX
CMP RDX,0xffff
MOV EDX,0x6
CMOVNZ RDX,RAX
MOV RBX,RDI
MOV RAX,RDI
NOT RAX
ADD RAX,RSI
CMP RDX,RAX
CMOVC RAX,RDX
CMP CL,0x66
JNZ 0x001d6b94
MOV EDI,EAX
MOV RSI,RBX
XOR EDX,EDX
CALL 0x001d2120
JMP 0x001d6ba5
LAB_001d6b94:
MOV EDI,0x1
MOV ESI,EAX
MOV RDX,RBX
XOR ECX,ECX
CALL 0x001d34a2
LAB_001d6ba5:
ADD RBX,RAX
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
long process_dbl_arg(ulong param_1,long param_2,ulong param_3,char param_4)
{
ulong uVar1;
long lVar2;
ulong uVar3;
uVar1 = 0x1e;
if (param_3 < 0x1e) {
uVar1 = param_3;
}
uVar3 = 6;
if (param_3 != 0xffff) {
uVar3 = uVar1;
}
uVar1 = ~param_1 + param_2;
if (uVar3 < ~param_1 + param_2) {
uVar1 = uVar3;
}
if (param_4 == 'f') {
lVar2 = my_fcvt(uVar1 & 0xffffffff,param_1,0);
}
else {
lVar2 = my_gcvt(1,uVar1 & 0xffffffff,param_1,0);
}
return param_1 + lVar2;
}
|
|
18,572
|
my_rw_init
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_init(my_rw_lock_t *rwp)
{
pthread_condattr_t cond_attr;
pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST);
pthread_condattr_init( &cond_attr );
pthread_cond_init( &rwp->readers, &cond_attr );
pthread_cond_init( &rwp->writers, &cond_attr );
pthread_condattr_destroy(&cond_attr);
rwp->state = 0;
rwp->waiters = 0;
#ifdef SAFE_MUTEX
rwp->write_thread = 0;
#endif
return(0);
}
|
O0
|
c
|
my_rw_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xb8fbd9(%rip), %rsi # 0xc8e5a0
callq 0x2a340
leaq -0xc(%rbp), %rdi
callq 0x2a6c0
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
leaq -0xc(%rbp), %rsi
callq 0x2a370
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
leaq -0xc(%rbp), %rsi
callq 0x2a370
leaq -0xc(%rbp), %rdi
callq 0x2a6b0
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_rw_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
lea rsi, my_fast_mutexattr
call _pthread_mutex_init
lea rdi, [rbp+var_C]
call _pthread_condattr_init
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
lea rsi, [rbp+var_C]
call _pthread_cond_init
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
lea rsi, [rbp+var_C]
call _pthread_cond_init
lea rdi, [rbp+var_C]
call _pthread_condattr_destroy
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
xor eax, eax
add rsp, 10h
pop rbp
retn
|
long long my_rw_init(long long a1)
{
_BYTE v2[4]; // [rsp+4h] [rbp-Ch] BYREF
long long v3; // [rsp+8h] [rbp-8h]
v3 = a1;
pthread_mutex_init(a1, &my_fast_mutexattr);
pthread_condattr_init(v2);
pthread_cond_init(v3 + 40, v2);
pthread_cond_init(v3 + 88, v2);
pthread_condattr_destroy(v2);
*(_DWORD *)(v3 + 136) = 0;
*(_DWORD *)(v3 + 140) = 0;
return 0LL;
}
|
my_rw_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0xd8e5a0]
CALL 0x0012a340
LEA RDI,[RBP + -0xc]
CALL 0x0012a6c0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
LEA RSI,[RBP + -0xc]
CALL 0x0012a370
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
LEA RSI,[RBP + -0xc]
CALL 0x0012a370
LEA RDI,[RBP + -0xc]
CALL 0x0012a6b0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],0x0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 my_rw_init(pthread_mutex_t *param_1)
{
pthread_condattr_t local_14;
pthread_mutex_t *local_10;
local_10 = param_1;
pthread_mutex_init(param_1,(pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_condattr_init(&local_14);
pthread_cond_init((pthread_cond_t *)(local_10 + 1),&local_14);
pthread_cond_init((pthread_cond_t *)((long)local_10 + 0x58),&local_14);
pthread_condattr_destroy(&local_14);
*(int4 *)((long)local_10 + 0x88) = 0;
*(int4 *)((long)local_10 + 0x8c) = 0;
return 0;
}
|
|
18,573
|
mariadb_server_version_id
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
static size_t mariadb_server_version_id(MYSQL *mysql)
{
size_t major, minor, patch;
char *p;
if (!(p = mysql->server_version)) {
return 0;
}
major = strtol(p, &p, 10);
p += 1; /* consume the dot */
minor = strtol(p, &p, 10);
p += 1; /* consume the dot */
patch = strtol(p, &p, 10);
return (major * 10000L + (unsigned long)(minor * 100L + patch));
}
|
O0
|
c
|
mariadb_server_version_id:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x2d0(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x523fb
movq $0x0, -0x8(%rbp)
jmp 0x5246d
movq -0x30(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xa, %edx
callq 0x388e0
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xa, %edx
callq 0x388e0
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xa, %edx
callq 0x388e0
movq %rax, -0x28(%rbp)
imulq $0x2710, -0x18(%rbp), %rax # imm = 0x2710
imulq $0x64, -0x20(%rbp), %rcx
addq -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
mariadb_server_version_id:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+2D0h]
mov [rbp+var_30], rax
cmp rax, 0
jnz short loc_523FB
mov [rbp+var_8], 0
jmp short loc_5246D
loc_523FB:
mov rdi, [rbp+var_30]
lea rsi, [rbp+var_30]
mov edx, 0Ah
call _strtol
mov [rbp+var_18], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
lea rsi, [rbp+var_30]
mov edx, 0Ah
call _strtol
mov [rbp+var_20], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
lea rsi, [rbp+var_30]
mov edx, 0Ah
call _strtol
mov [rbp+var_28], rax
imul rax, [rbp+var_18], 2710h
imul rcx, [rbp+var_20], 64h ; 'd'
add rcx, [rbp+var_28]
add rax, rcx
mov [rbp+var_8], rax
loc_5246D:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long mariadb_server_version_id(long long a1)
{
long long v2; // [rsp+0h] [rbp-30h] BYREF
long long v3; // [rsp+8h] [rbp-28h]
long long v4; // [rsp+10h] [rbp-20h]
long long v5; // [rsp+18h] [rbp-18h]
long long v6; // [rsp+20h] [rbp-10h]
v6 = a1;
v2 = *(_QWORD *)(a1 + 720);
if ( !v2 )
return 0LL;
v5 = strtol(v2, &v2, 10LL);
++v2;
v4 = strtol(v2, &v2, 10LL);
++v2;
v3 = strtol(v2, &v2, 10LL);
return v3 + 100 * v4 + 10000 * v5;
}
|
mariadb_server_version_id:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x2d0]
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,0x0
JNZ 0x001523fb
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0015246d
LAB_001523fb:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x30]
MOV EDX,0xa
CALL 0x001388e0
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x30]
MOV EDX,0xa
CALL 0x001388e0
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x30]
MOV EDX,0xa
CALL 0x001388e0
MOV qword ptr [RBP + -0x28],RAX
IMUL RAX,qword ptr [RBP + -0x18],0x2710
IMUL RCX,qword ptr [RBP + -0x20],0x64
ADD RCX,qword ptr [RBP + -0x28]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_0015246d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long mariadb_server_version_id(long param_1)
{
long lVar1;
char *local_38 [2];
long local_28;
long local_20;
long local_18;
long local_10;
local_38[0] = *(char **)(param_1 + 0x2d0);
if (local_38[0] == (char *)0x0) {
local_10 = 0;
}
else {
local_18 = param_1;
local_20 = strtol(local_38[0],local_38,10);
local_38[0] = local_38[0] + 1;
local_28 = strtol(local_38[0],local_38,10);
local_38[0] = local_38[0] + 1;
lVar1 = strtol(local_38[0],local_38,10);
local_10 = local_20 * 10000 + local_28 * 100 + lVar1;
}
return local_10;
}
|
|
18,574
|
uf_prespace
|
eloqsql/storage/myisam/mi_packrec.c
|
static void uf_prespace(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to,
uchar *end)
{
uint spaces;
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
bfill((uchar*) to,spaces,' ');
if (to+spaces != end)
decode_bytes(rec,bit_buff,to+spaces,end);
}
|
O3
|
c
|
uf_prespace:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movl 0x4(%rsi), %ecx
movl 0x1c(%rdi), %r13d
cmpl %r13d, %ecx
jae 0x3b594
subl %ecx, %r13d
leaq 0x5c102(%rip), %rax # 0x97660
movq %rbx, -0x30(%rbp)
movl (%rax,%rcx,4), %ebx
andl (%r14), %ebx
movl %r13d, %ecx
shll %cl, %ebx
movq %r14, %rdi
callq 0x3a1b5
movl $0x20, %eax
subl %r13d, %eax
movl %eax, 0x4(%r14)
movl (%r14), %eax
negl %r13d
movl %r13d, %ecx
shrl %cl, %eax
addl %ebx, %eax
movq -0x30(%rbp), %rbx
jmp 0x3b5ae
movl (%r14), %eax
subl %r13d, %ecx
movl %ecx, 0x4(%r14)
shrl %cl, %eax
movl 0x1c(%r15), %ecx
leaq 0x5c0b5(%rip), %rdx # 0x97660
andl (%rdx,%rcx,4), %eax
movl %eax, %edx
leaq (%r12,%rdx), %r13
cmpq %rbx, %r13
jbe 0x3b5c3
movl $0x1, 0x28(%r14)
jmp 0x3b5f4
movq %r12, %rdi
movl $0x20, %esi
callq 0x281b0
cmpq %rbx, %r13
je 0x3b5f4
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3aaa6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
uf_prespace:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r12, rdx
mov r14, rsi
mov r15, rdi
mov ecx, [rsi+4]
mov r13d, [rdi+1Ch]
cmp ecx, r13d
jnb short loc_3B594
sub r13d, ecx
lea rax, mask
mov [rbp+var_30], rbx
mov ebx, [rax+rcx*4]
and ebx, [r14]
mov ecx, r13d
shl ebx, cl
mov rdi, r14
call fill_buffer
mov eax, 20h ; ' '
sub eax, r13d
mov [r14+4], eax
mov eax, [r14]
neg r13d
mov ecx, r13d
shr eax, cl
add eax, ebx
mov rbx, [rbp+var_30]
jmp short loc_3B5AE
loc_3B594:
mov eax, [r14]
sub ecx, r13d
mov [r14+4], ecx
shr eax, cl
mov ecx, [r15+1Ch]
lea rdx, mask
and eax, [rdx+rcx*4]
loc_3B5AE:
mov edx, eax
lea r13, [r12+rdx]
cmp r13, rbx
jbe short loc_3B5C3
mov dword ptr [r14+28h], 1
jmp short loc_3B5F4
loc_3B5C3:
mov rdi, r12
mov esi, 20h ; ' '
call _memset
cmp r13, rbx
jz short loc_3B5F4
mov rdi, r15
mov rsi, r14
mov rdx, r13
mov rcx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp decode_bytes
loc_3B5F4:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long uf_prespace(long long a1, unsigned int *a2, long long a3, _BYTE *a4)
{
long long v6; // rcx
unsigned int v7; // r13d
int v8; // r13d
int v9; // ebx
long long result; // rax
unsigned int v11; // eax
unsigned int v12; // ecx
_BYTE *v13; // r13
_BYTE *v14; // [rsp+0h] [rbp-30h]
v6 = a2[1];
v7 = *(_DWORD *)(a1 + 28);
if ( (unsigned int)v6 >= v7 )
{
v11 = *a2;
v12 = v6 - v7;
a2[1] = v12;
result = mask[*(unsigned int *)(a1 + 28)] & (v11 >> v12);
}
else
{
v8 = v7 - v6;
v14 = a4;
v9 = (*a2 & mask[v6]) << v8;
fill_buffer((long long)a2);
a2[1] = 32 - v8;
result = v9 + (*a2 >> -(char)v8);
a4 = v14;
}
v13 = (_BYTE *)(a3 + (unsigned int)result);
if ( v13 <= a4 )
{
result = memset(a3, 32LL, (unsigned int)result);
if ( v13 != a4 )
return (long long)decode_bytes(a1, (long long)a2, v13, a4);
}
else
{
a2[10] = 1;
}
return result;
}
|
uf_prespace:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R12,RDX
MOV R14,RSI
MOV R15,RDI
MOV ECX,dword ptr [RSI + 0x4]
MOV R13D,dword ptr [RDI + 0x1c]
CMP ECX,R13D
JNC 0x0013b594
SUB R13D,ECX
LEA RAX,[0x197660]
MOV qword ptr [RBP + -0x30],RBX
MOV EBX,dword ptr [RAX + RCX*0x4]
AND EBX,dword ptr [R14]
MOV ECX,R13D
SHL EBX,CL
MOV RDI,R14
CALL 0x0013a1b5
MOV EAX,0x20
SUB EAX,R13D
MOV dword ptr [R14 + 0x4],EAX
MOV EAX,dword ptr [R14]
NEG R13D
MOV ECX,R13D
SHR EAX,CL
ADD EAX,EBX
MOV RBX,qword ptr [RBP + -0x30]
JMP 0x0013b5ae
LAB_0013b594:
MOV EAX,dword ptr [R14]
SUB ECX,R13D
MOV dword ptr [R14 + 0x4],ECX
SHR EAX,CL
MOV ECX,dword ptr [R15 + 0x1c]
LEA RDX,[0x197660]
AND EAX,dword ptr [RDX + RCX*0x4]
LAB_0013b5ae:
MOV EDX,EAX
LEA R13,[R12 + RDX*0x1]
CMP R13,RBX
JBE 0x0013b5c3
MOV dword ptr [R14 + 0x28],0x1
JMP 0x0013b5f4
LAB_0013b5c3:
MOV RDI,R12
MOV ESI,0x20
CALL 0x001281b0
CMP R13,RBX
JZ 0x0013b5f4
MOV RDI,R15
MOV RSI,R14
MOV RDX,R13
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0013aaa6
LAB_0013b5f4:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void uf_prespace(long param_1,uint *param_2,void *param_3,ulong param_4)
{
ulong uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
byte bVar6;
uVar5 = param_2[1];
uVar2 = *(uint *)(param_1 + 0x1c);
if (uVar5 < uVar2) {
uVar3 = (&mask)[uVar5];
uVar4 = *param_2;
bVar6 = (byte)(uVar2 - uVar5);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar2 - uVar5);
uVar5 = (*param_2 >> (-bVar6 & 0x1f)) + ((uVar3 & uVar4) << (bVar6 & 0x1f));
}
else {
param_2[1] = uVar5 - uVar2;
uVar5 = *param_2 >> ((byte)(uVar5 - uVar2) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)];
}
uVar1 = (long)param_3 + (ulong)uVar5;
if (param_4 < uVar1) {
param_2[10] = 1;
}
else {
memset(param_3,0x20,(ulong)uVar5);
if (uVar1 != param_4) {
decode_bytes(param_1,param_2,uVar1,param_4);
return;
}
}
return;
}
|
|
18,575
|
mi_keydef_write
|
eloqsql/storage/myisam/mi_open.c
|
uint mi_keydef_write(File file, MI_KEYDEF *keydef)
{
uchar buff[MI_KEYDEF_SIZE];
uchar *ptr=buff;
*ptr++ = (uchar) keydef->keysegs;
*ptr++ = keydef->key_alg; /* Rtree or Btree */
mi_int2store(ptr,keydef->flag); ptr +=2;
mi_int2store(ptr,keydef->block_length); ptr +=2;
mi_int2store(ptr,keydef->keylength); ptr +=2;
mi_int2store(ptr,keydef->minlength); ptr +=2;
mi_int2store(ptr,keydef->maxlength); ptr +=2;
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
}
|
O3
|
c
|
mi_keydef_write:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movb 0x8(%rsi), %al
movb %al, -0x24(%rbp)
movb 0xc(%rsi), %al
movb %al, -0x23(%rbp)
movzwl 0xa(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x22(%rbp)
movzwl 0xe(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x20(%rbp)
movzwl 0x12(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x1e(%rbp)
movzwl 0x14(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x1c(%rbp)
movzwl 0x16(%rsi), %eax
rolw $0x8, %ax
movl %edi, %ebx
movw %ax, -0x1a(%rbp)
leaq 0x305c72(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x803f1
leaq -0x24(%rbp), %rsi
movl $0xc, %edx
movl $0x4, %ecx
movl %ebx, %edi
callq 0x2efe4
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %cl
movq %fs:0x28, %rdx
cmpq -0x18(%rbp), %rdx
jne 0x8040b
movb %cl, %al
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x24(%rbp), %rdx
leaq -0x30(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rcx
callq 0x2e1e7
movq (%r14), %rcx
jmp 0x803cf
callq 0x29250
|
mi_keydef_write:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_18], rax
mov al, [rsi+8]
mov [rbp+var_24], al
mov al, [rsi+0Ch]
mov [rbp+var_23], al
movzx eax, word ptr [rsi+0Ah]
rol ax, 8
mov [rbp+var_22], ax
movzx eax, word ptr [rsi+0Eh]
rol ax, 8
mov [rbp+var_20], ax
movzx eax, word ptr [rsi+12h]
rol ax, 8
mov [rbp+var_1E], ax
movzx eax, word ptr [rsi+14h]
rol ax, 8
mov [rbp+var_1C], ax
movzx eax, word ptr [rsi+16h]
rol ax, 8
mov ebx, edi
mov [rbp+var_1A], ax
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_803F1
lea rsi, [rbp+var_24]
mov edx, 0Ch
mov ecx, 4
mov edi, ebx
call my_write
mov rcx, rax
loc_803CF:
xor eax, eax
test rcx, rcx
setnz cl
mov rdx, fs:28h
cmp rdx, [rbp+var_18]
jnz short loc_8040B
mov al, cl
add rsp, 70h
pop rbx
pop r14
pop rbp
retn
loc_803F1:
lea rdx, [rbp+var_24]
lea r14, [rbp+var_30]
mov rdi, rax
mov esi, ebx
mov rcx, r14
call mi_keydef_write_cold_1
mov rcx, [r14]
jmp short loc_803CF
loc_8040B:
call ___stack_chk_fail
|
bool mi_keydef_write(unsigned int a1, long long a2)
{
long long v2; // rax
long long v3; // rcx
_BYTE v6[72]; // [rsp+8h] [rbp-78h] BYREF
long long v7; // [rsp+50h] [rbp-30h] BYREF
_BYTE v8[2]; // [rsp+5Ch] [rbp-24h] BYREF
__int16 v9; // [rsp+5Eh] [rbp-22h]
__int16 v10; // [rsp+60h] [rbp-20h]
__int16 v11; // [rsp+62h] [rbp-1Eh]
__int16 v12; // [rsp+64h] [rbp-1Ch]
__int16 v13; // [rsp+66h] [rbp-1Ah]
unsigned long long v14; // [rsp+68h] [rbp-18h]
v14 = __readfsqword(0x28u);
v8[0] = *(_BYTE *)(a2 + 8);
v8[1] = *(_BYTE *)(a2 + 12);
v9 = __ROL2__(*(_WORD *)(a2 + 10), 8);
v10 = __ROL2__(*(_WORD *)(a2 + 14), 8);
v11 = __ROL2__(*(_WORD *)(a2 + 18), 8);
v12 = __ROL2__(*(_WORD *)(a2 + 20), 8);
v13 = __ROL2__(*(_WORD *)(a2 + 22), 8);
v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, a1, 7LL);
if ( v2 )
{
mi_keydef_write_cold_1(v2, a1, (long long)v8, &v7);
v3 = v7;
}
else
{
v3 = my_write(a1, (long long)v8, 12LL, 4LL);
}
return v3 != 0;
}
|
mi_keydef_write:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV AL,byte ptr [RSI + 0x8]
MOV byte ptr [RBP + -0x24],AL
MOV AL,byte ptr [RSI + 0xc]
MOV byte ptr [RBP + -0x23],AL
MOVZX EAX,word ptr [RSI + 0xa]
ROL AX,0x8
MOV word ptr [RBP + -0x22],AX
MOVZX EAX,word ptr [RSI + 0xe]
ROL AX,0x8
MOV word ptr [RBP + -0x20],AX
MOVZX EAX,word ptr [RSI + 0x12]
ROL AX,0x8
MOV word ptr [RBP + -0x1e],AX
MOVZX EAX,word ptr [RSI + 0x14]
ROL AX,0x8
MOV word ptr [RBP + -0x1c],AX
MOVZX EAX,word ptr [RSI + 0x16]
ROL AX,0x8
MOV EBX,EDI
MOV word ptr [RBP + -0x1a],AX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001803f1
LEA RSI,[RBP + -0x24]
MOV EDX,0xc
MOV ECX,0x4
MOV EDI,EBX
CALL 0x0012efe4
MOV RCX,RAX
LAB_001803cf:
XOR EAX,EAX
TEST RCX,RCX
SETNZ CL
MOV RDX,qword ptr FS:[0x28]
CMP RDX,qword ptr [RBP + -0x18]
JNZ 0x0018040b
MOV AL,CL
ADD RSP,0x70
POP RBX
POP R14
POP RBP
RET
LAB_001803f1:
LEA RDX,[RBP + -0x24]
LEA R14,[RBP + -0x30]
MOV RDI,RAX
MOV ESI,EBX
MOV RCX,R14
CALL 0x0012e1e7
MOV RCX,qword ptr [R14]
JMP 0x001803cf
LAB_0018040b:
CALL 0x00129250
|
bool mi_keydef_write(int4 param_1,long param_2)
{
long lVar1;
long in_FS_OFFSET;
int1 local_80 [72];
long local_38;
int1 local_2c;
int1 local_2b;
ushort local_2a;
ushort local_28;
ushort local_26;
ushort local_24;
ushort local_22;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_2c = *(int1 *)(param_2 + 8);
local_2b = *(int1 *)(param_2 + 0xc);
local_2a = *(ushort *)(param_2 + 10) << 8 | *(ushort *)(param_2 + 10) >> 8;
local_28 = *(ushort *)(param_2 + 0xe) << 8 | *(ushort *)(param_2 + 0xe) >> 8;
local_26 = *(ushort *)(param_2 + 0x12) << 8 | *(ushort *)(param_2 + 0x12) >> 8;
local_24 = *(ushort *)(param_2 + 0x14) << 8 | *(ushort *)(param_2 + 0x14) >> 8;
local_22 = *(ushort *)(param_2 + 0x16) << 8 | *(ushort *)(param_2 + 0x16) >> 8;
lVar1 = (**(code **)(PSI_server + 0x158))(local_80,param_1,7);
if (lVar1 == 0) {
local_38 = my_write(param_1,&local_2c,0xc,4);
}
else {
mi_keydef_write_cold_1(lVar1,param_1,&local_2c,&local_38);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return local_38 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
18,576
|
hp_rb_write_key
|
eloqsql/storage/heap/hp_write.c
|
int hp_rb_write_key(HP_INFO *info, HP_KEYDEF *keyinfo, const uchar *record,
uchar *recpos)
{
heap_rb_param custom_arg;
size_t old_allocated;
custom_arg.keyseg= keyinfo->seg;
custom_arg.key_length= hp_rb_make_key(keyinfo, info->recbuf, record, recpos);
if (keyinfo->flag & HA_NOSAME)
{
custom_arg.search_flag= SEARCH_FIND | SEARCH_UPDATE | SEARCH_INSERT;
keyinfo->rb_tree.flag= TREE_NO_DUPS;
}
else
{
custom_arg.search_flag= SEARCH_SAME;
keyinfo->rb_tree.flag= 0;
}
old_allocated= keyinfo->rb_tree.allocated;
if (!tree_insert(&keyinfo->rb_tree, (void*)info->recbuf,
custom_arg.key_length, &custom_arg))
{
my_errno= HA_ERR_FOUND_DUPP_KEY;
return 1;
}
info->s->index_length+= (keyinfo->rb_tree.allocated-old_allocated);
return 0;
}
|
O0
|
c
|
hp_rb_write_key:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x2aa40
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2d225
movl $0x20041, -0x2c(%rbp) # imm = 0x20041
movq -0x18(%rbp), %rax
movl $0x1, 0x348(%rax)
jmp 0x2d23a
movl $0x4, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movl $0x0, 0x348(%rax)
movq -0x18(%rbp), %rax
movq 0x2d8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
addq $0xb8, %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
movl -0x30(%rbp), %edx
leaq -0x38(%rbp), %rcx
callq 0x35040
cmpq $0x0, %rax
jne 0x2d282
callq 0x31370
movl $0x79, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x2d2ad
movq -0x18(%rbp), %rax
movq 0x2d8(%rax), %rcx
subq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq 0xa8(%rax), %rcx
movq %rcx, 0xa8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
hp_rb_write_key:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+48h]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
call hp_rb_make_key
mov [rbp+var_30], eax
mov rax, [rbp+var_18]
mov eax, [rax]
and eax, 1
cmp eax, 0
jz short loc_2D225
mov [rbp+var_2C], 20041h
mov rax, [rbp+var_18]
mov dword ptr [rax+348h], 1
jmp short loc_2D23A
loc_2D225:
mov [rbp+var_2C], 4
mov rax, [rbp+var_18]
mov dword ptr [rax+348h], 0
loc_2D23A:
mov rax, [rbp+var_18]
mov rax, [rax+2D8h]
mov [rbp+var_40], rax
mov rdi, [rbp+var_18]
add rdi, 0B8h
mov rax, [rbp+var_10]
mov rsi, [rax+48h]
mov edx, [rbp+var_30]
lea rcx, [rbp+var_38]
call tree_insert
cmp rax, 0
jnz short loc_2D282
call _my_thread_var
mov dword ptr [rax], 79h ; 'y'
mov [rbp+var_4], 1
jmp short loc_2D2AD
loc_2D282:
mov rax, [rbp+var_18]
mov rcx, [rax+2D8h]
sub rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov rax, [rax]
add rcx, [rax+0A8h]
mov [rax+0A8h], rcx
mov [rbp+var_4], 0
loc_2D2AD:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long hp_rb_write_key(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
long long v6; // rdi
long long v7; // rsi
long long v8; // rdx
long long v10; // [rsp+0h] [rbp-40h]
long long v11; // [rsp+8h] [rbp-38h] BYREF
unsigned int key; // [rsp+10h] [rbp-30h]
int v13; // [rsp+14h] [rbp-2Ch]
long long v14; // [rsp+18h] [rbp-28h]
long long v15; // [rsp+20h] [rbp-20h]
long long v16; // [rsp+28h] [rbp-18h]
_QWORD *v17; // [rsp+30h] [rbp-10h]
v17 = (_QWORD *)a1;
v16 = a2;
v15 = a3;
v14 = a4;
v11 = *(_QWORD *)(a2 + 16);
key = (unsigned int)hp_rb_make_key(a2, *(_BYTE **)(a1 + 72), a3, a4, a5, a6);
if ( (*(_DWORD *)a2 & 1) != 0 )
{
v13 = 131137;
*(_DWORD *)(v16 + 840) = 1;
}
else
{
v13 = 4;
*(_DWORD *)(v16 + 840) = 0;
}
v10 = *(_QWORD *)(v16 + 728);
v6 = v16 + 184;
v7 = v17[9];
if ( tree_insert(v16 + 184, v7, key, &v11) )
{
*(_QWORD *)(*v17 + 168LL) += *(_QWORD *)(v16 + 728) - v10;
return 0;
}
else
{
*(_DWORD *)my_thread_var(v6, v7, v8) = 121;
return 1;
}
}
|
hp_rb_write_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x48]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
CALL 0x0012aa40
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0012d225
MOV dword ptr [RBP + -0x2c],0x20041
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x348],0x1
JMP 0x0012d23a
LAB_0012d225:
MOV dword ptr [RBP + -0x2c],0x4
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x348],0x0
LAB_0012d23a:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x2d8]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0xb8
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x48]
MOV EDX,dword ptr [RBP + -0x30]
LEA RCX,[RBP + -0x38]
CALL 0x00135040
CMP RAX,0x0
JNZ 0x0012d282
CALL 0x00131370
MOV dword ptr [RAX],0x79
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0012d2ad
LAB_0012d282:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x2d8]
SUB RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
ADD RCX,qword ptr [RAX + 0xa8]
MOV qword ptr [RAX + 0xa8],RCX
MOV dword ptr [RBP + -0x4],0x0
LAB_0012d2ad:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
bool hp_rb_write_key(long *param_1,uint *param_2,int8 param_3,int8 param_4)
{
long lVar1;
long lVar2;
int4 *puVar3;
int8 local_40;
int4 local_38;
int4 local_34;
int8 local_30;
int8 local_28;
uint *local_20;
long *local_18;
local_40 = *(int8 *)(param_2 + 4);
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_38 = hp_rb_make_key(param_2,param_1[9],param_3,param_4);
if ((*local_20 & 1) == 0) {
local_34 = 4;
local_20[0xd2] = 0;
}
else {
local_34 = 0x20041;
local_20[0xd2] = 1;
}
lVar1 = *(long *)(local_20 + 0xb6);
lVar2 = tree_insert(local_20 + 0x2e,local_18[9],local_38,&local_40);
if (lVar2 != 0) {
*(long *)(*local_18 + 0xa8) = (*(long *)(local_20 + 0xb6) - lVar1) + *(long *)(*local_18 + 0xa8)
;
}
else {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x79;
}
return lVar2 == 0;
}
|
|
18,577
|
my_hash_sort_utf16_bin
|
eloqsql/strings/ctype-ucs2.c
|
static void
my_hash_sort_utf16_bin(CHARSET_INFO *cs,
const uchar *pos, size_t len, ulong *nr1, ulong *nr2)
{
size_t lengthsp= my_ci_lengthsp(cs, (const char *) pos, len);
my_hash_sort_utf16_nopad_bin(cs, pos, lengthsp, nr1, nr2);
}
|
O3
|
c
|
my_hash_sort_utf16_bin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %r15
movq 0xb8(%rdi), %rax
callq *0x18(%rax)
movq (%r14), %rcx
movq (%rbx), %rdx
testq %rax, %rax
jle 0x7fe29
addq %r15, %rax
movl %ecx, %esi
andl $0x3f, %esi
addq %rdx, %rsi
movzbl (%r15), %edi
imulq %rsi, %rdi
movq %rcx, %rsi
shlq $0x8, %rsi
addq %rdi, %rsi
xorq %rsi, %rcx
addq $0x3, %rdx
incq %r15
cmpq %rax, %r15
jb 0x7fe00
movq %rcx, (%r14)
movq %rdx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
my_hash_sort_utf16_bin:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, r8
mov r14, rcx
mov r15, rsi
mov rax, [rdi+0B8h]
call qword ptr [rax+18h]
mov rcx, [r14]
mov rdx, [rbx]
test rax, rax
jle short loc_7FE29
add rax, r15
loc_7FE00:
mov esi, ecx
and esi, 3Fh
add rsi, rdx
movzx edi, byte ptr [r15]
imul rdi, rsi
mov rsi, rcx
shl rsi, 8
add rsi, rdi
xor rcx, rsi
add rdx, 3
inc r15
cmp r15, rax
jb short loc_7FE00
loc_7FE29:
mov [r14], rcx
mov [rbx], rdx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long my_hash_sort_utf16_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5)
{
unsigned __int8 *v7; // r15
long long result; // rax
long long v9; // rcx
long long v10; // rdx
v7 = a2;
result = (*(long long ( **)(long long))(*(_QWORD *)(a1 + 184) + 24LL))(a1);
v9 = *a4;
v10 = *a5;
if ( result > 0 )
{
result += (long long)a2;
do
{
v9 ^= (v10 + (v9 & 0x3F)) * *v7 + (v9 << 8);
v10 += 3LL;
++v7;
}
while ( (unsigned long long)v7 < result );
}
*a4 = v9;
*a5 = v10;
return result;
}
|
my_hash_sort_utf16_bin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R14,RCX
MOV R15,RSI
MOV RAX,qword ptr [RDI + 0xb8]
CALL qword ptr [RAX + 0x18]
MOV RCX,qword ptr [R14]
MOV RDX,qword ptr [RBX]
TEST RAX,RAX
JLE 0x0017fe29
ADD RAX,R15
LAB_0017fe00:
MOV ESI,ECX
AND ESI,0x3f
ADD RSI,RDX
MOVZX EDI,byte ptr [R15]
IMUL RDI,RSI
MOV RSI,RCX
SHL RSI,0x8
ADD RSI,RDI
XOR RCX,RSI
ADD RDX,0x3
INC R15
CMP R15,RAX
JC 0x0017fe00
LAB_0017fe29:
MOV qword ptr [R14],RCX
MOV qword ptr [RBX],RDX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void my_hash_sort_utf16_bin
(long param_1,byte *param_2,int8 param_3,ulong *param_4,long *param_5)
{
long lVar1;
byte *pbVar2;
ulong uVar3;
long lVar4;
lVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x18))();
uVar3 = *param_4;
lVar4 = *param_5;
if (0 < lVar1) {
pbVar2 = param_2 + lVar1;
do {
uVar3 = uVar3 ^ uVar3 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar3 & 0x3f) + lVar4);
lVar4 = lVar4 + 3;
param_2 = param_2 + 1;
} while (param_2 < pbVar2);
}
*param_4 = uVar3;
*param_5 = lVar4;
return;
}
|
|
18,578
|
js_std_file_read_write
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_file_read_write(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
FILE *f = js_std_file_get(ctx, this_val);
uint64_t pos, len;
size_t size, ret;
uint8_t *buf;
if (!f)
return JS_EXCEPTION;
if (JS_ToIndex(ctx, &pos, argv[1]))
return JS_EXCEPTION;
if (JS_ToIndex(ctx, &len, argv[2]))
return JS_EXCEPTION;
buf = JS_GetArrayBuffer(ctx, &size, argv[0]);
if (!buf)
return JS_EXCEPTION;
if (pos + len > size)
return JS_ThrowRangeError(ctx, "read/write array buffer overflow");
if (magic)
ret = fwrite(buf + pos, 1, len, f);
else
ret = fread(buf + pos, 1, len, f);
return JS_NewInt64(ctx, ret);
}
|
O0
|
c
|
js_std_file_read_write:
subq $0xf8, %rsp
movq %rsi, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq %rdi, 0x50(%rsp)
movl %ecx, 0x4c(%rsp)
movq %r8, 0x40(%rsp)
movl %r9d, 0x3c(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x127c0
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x11fcb
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0x12242
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
leaq 0x28(%rsp), %rsi
callq 0x37e80
cmpl $0x0, %eax
je 0x12002
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0x12242
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x20(%rax), %rdx
movq 0x28(%rax), %rcx
leaq 0x20(%rsp), %rsi
callq 0x37e80
cmpl $0x0, %eax
je 0x12039
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0x12242
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x18(%rsp), %rsi
callq 0x56d50
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x12077
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0x12242
movq 0x28(%rsp), %rax
addq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
jbe 0x120aa
movq 0x50(%rsp), %rdi
leaq 0xf6483(%rip), %rsi # 0x108517
movb $0x0, %al
callq 0x283b0
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
jmp 0x12242
cmpl $0x0, 0x3c(%rsp)
je 0x120d6
movq 0x8(%rsp), %rdi
addq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq 0x30(%rsp), %rcx
movl $0x1, %esi
callq 0xe890
movq %rax, 0x10(%rsp)
jmp 0x120f9
movq 0x8(%rsp), %rdi
addq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq 0x30(%rsp), %rcx
movl $0x1, %esi
callq 0xe170
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xa0(%rsp)
movq %rax, 0x98(%rsp)
cmpq $-0x80000000, 0x98(%rsp) # imm = 0x80000000
jl 0x121ad
cmpq $0x7fffffff, 0x98(%rsp) # imm = 0x7FFFFFFF
jg 0x121ad
movq 0xa0(%rsp), %rcx
movl 0x98(%rsp), %eax
movq %rcx, 0xc0(%rsp)
movl %eax, 0xbc(%rsp)
movl 0xbc(%rsp), %eax
movl %eax, 0xc8(%rsp)
movq $0x0, 0xd0(%rsp)
movq 0xc8(%rsp), %rcx
movq 0xd0(%rsp), %rax
movq %rcx, 0x88(%rsp)
movq %rax, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0x12228
movq 0xa0(%rsp), %rax
cvtsi2sdq 0x98(%rsp), %xmm0
movq %rax, 0xe0(%rsp)
movsd %xmm0, 0xd8(%rsp)
movsd 0xd8(%rsp), %xmm0
callq 0x13560
movq %rax, 0xe8(%rsp)
movq %rdx, 0xf0(%rsp)
movq 0xe8(%rsp), %rcx
movq 0xf0(%rsp), %rax
movq %rcx, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xa8(%rsp), %rcx
movq 0xb0(%rsp), %rax
movq %rcx, 0x68(%rsp)
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0xf8, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_std_file_read_write:
sub rsp, 0F8h
mov [rsp+0F8h+var_A0], rsi
mov [rsp+0F8h+var_98], rdx
mov [rsp+0F8h+var_A8], rdi
mov [rsp+0F8h+var_AC], ecx
mov [rsp+0F8h+var_B8], r8
mov [rsp+0F8h+var_BC], r9d
mov rdi, [rsp+0F8h+var_A8]
mov rsi, [rsp+0F8h+var_A0]
mov rdx, [rsp+0F8h+var_98]
call js_std_file_get
mov [rsp+0F8h+var_C8], rax
cmp [rsp+0F8h+var_C8], 0
jnz short loc_11FCB
mov dword ptr [rsp+0F8h+var_90], 0
mov [rsp+0F8h+var_88], 6
jmp loc_12242
loc_11FCB:
mov rdi, [rsp+0F8h+var_A8]
mov rax, [rsp+0F8h+var_B8]
mov rdx, [rax+10h]
mov rcx, [rax+18h]
lea rsi, [rsp+0F8h+var_D0]
call JS_ToIndex
cmp eax, 0
jz short loc_12002
mov dword ptr [rsp+0F8h+var_90], 0
mov [rsp+0F8h+var_88], 6
jmp loc_12242
loc_12002:
mov rdi, [rsp+0F8h+var_A8]
mov rax, [rsp+0F8h+var_B8]
mov rdx, [rax+20h]
mov rcx, [rax+28h]
lea rsi, [rsp+0F8h+var_D8]
call JS_ToIndex
cmp eax, 0
jz short loc_12039
mov dword ptr [rsp+0F8h+var_90], 0
mov [rsp+0F8h+var_88], 6
jmp loc_12242
loc_12039:
mov rdi, [rsp+0F8h+var_A8]
mov rax, [rsp+0F8h+var_B8]
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+0F8h+var_E0]
call JS_GetArrayBuffer
mov [rsp+0F8h+var_F0], rax
cmp [rsp+0F8h+var_F0], 0
jnz short loc_12077
mov dword ptr [rsp+0F8h+var_90], 0
mov [rsp+0F8h+var_88], 6
jmp loc_12242
loc_12077:
mov rax, [rsp+0F8h+var_D0]
add rax, [rsp+0F8h+var_D8]
cmp rax, [rsp+0F8h+var_E0]
jbe short loc_120AA
mov rdi, [rsp+0F8h+var_A8]
lea rsi, aReadWriteArray; "read/write array buffer overflow"
mov al, 0
call JS_ThrowRangeError
mov [rsp+0F8h+var_90], rax
mov [rsp+0F8h+var_88], rdx
jmp loc_12242
loc_120AA:
cmp [rsp+0F8h+var_BC], 0
jz short loc_120D6
mov rdi, [rsp+0F8h+var_F0]
add rdi, [rsp+0F8h+var_D0]
mov rdx, [rsp+0F8h+var_D8]
mov rcx, [rsp+0F8h+var_C8]
mov esi, 1
call _fwrite
mov [rsp+0F8h+var_E8], rax
jmp short loc_120F9
loc_120D6:
mov rdi, [rsp+0F8h+var_F0]
add rdi, [rsp+0F8h+var_D0]
mov rdx, [rsp+0F8h+var_D8]
mov rcx, [rsp+0F8h+var_C8]
mov esi, 1
call _fread
mov [rsp+0F8h+var_E8], rax
loc_120F9:
mov rcx, [rsp+0F8h+var_A8]
mov rax, [rsp+0F8h+var_E8]
mov [rsp+0F8h+var_58], rcx
mov [rsp+0F8h+var_60], rax
cmp [rsp+0F8h+var_60], 0FFFFFFFF80000000h
jl loc_121AD
cmp [rsp+0F8h+var_60], 7FFFFFFFh
jg short loc_121AD
mov rcx, [rsp+0F8h+var_58]
mov eax, dword ptr [rsp+0F8h+var_60]
mov [rsp+0F8h+var_38], rcx
mov [rsp+0F8h+var_3C], eax
mov eax, [rsp+0F8h+var_3C]
mov dword ptr [rsp+0F8h+var_30], eax
mov [rsp+0F8h+var_28], 0
mov rcx, [rsp+0F8h+var_30]
mov rax, [rsp+0F8h+var_28]
mov [rsp+0F8h+var_70], rcx
mov [rsp+0F8h+var_68], rax
mov rax, [rsp+0F8h+var_70]
mov [rsp+0F8h+var_50], rax
mov rax, [rsp+0F8h+var_68]
mov [rsp+0F8h+var_48], rax
jmp short loc_12228
loc_121AD:
mov rax, [rsp+0F8h+var_58]
cvtsi2sd xmm0, [rsp+0F8h+var_60]
mov [rsp+0F8h+var_18], rax
movsd [rsp+0F8h+var_20], xmm0
movsd xmm0, [rsp+0F8h+var_20]
call __JS_NewFloat64
mov [rsp+0F8h+var_10], rax
mov [rsp+0F8h+var_8], rdx
mov rcx, [rsp+0F8h+var_10]
mov rax, [rsp+0F8h+var_8]
mov [rsp+0F8h+var_80], rcx
mov [rsp+0F8h+var_78], rax
mov rax, [rsp+0F8h+var_80]
mov [rsp+0F8h+var_50], rax
mov rax, [rsp+0F8h+var_78]
mov [rsp+0F8h+var_48], rax
loc_12228:
mov rcx, [rsp+0F8h+var_50]
mov rax, [rsp+0F8h+var_48]
mov [rsp+0F8h+var_90], rcx
mov [rsp+0F8h+var_88], rax
loc_12242:
mov rax, [rsp+0F8h+var_90]
mov rdx, [rsp+0F8h+var_88]
add rsp, 0F8h
retn
|
long long js_std_file_read_write(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int a6)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
long long v10; // rdx
long long v11; // rdx
long long ArrayBuffer; // [rsp+8h] [rbp-F0h]
signed long long v14; // [rsp+10h] [rbp-E8h]
unsigned long long v15; // [rsp+18h] [rbp-E0h] BYREF
long long v16; // [rsp+20h] [rbp-D8h] BYREF
long long v17; // [rsp+28h] [rbp-D0h] BYREF
long long v18; // [rsp+30h] [rbp-C8h]
int v19; // [rsp+3Ch] [rbp-BCh]
_QWORD *v20; // [rsp+40h] [rbp-B8h]
int v21; // [rsp+4Ch] [rbp-ACh]
long long v22; // [rsp+50h] [rbp-A8h]
long long v23; // [rsp+58h] [rbp-A0h]
long long v24; // [rsp+60h] [rbp-98h]
long long v25; // [rsp+68h] [rbp-90h]
long long v26; // [rsp+70h] [rbp-88h]
long long v27; // [rsp+78h] [rbp-80h]
long long v28; // [rsp+80h] [rbp-78h]
long long v29; // [rsp+88h] [rbp-70h]
long long v30; // [rsp+90h] [rbp-68h]
long long v31; // [rsp+98h] [rbp-60h]
long long v32; // [rsp+A0h] [rbp-58h]
long long v33; // [rsp+A8h] [rbp-50h]
long long v34; // [rsp+B0h] [rbp-48h]
int v35; // [rsp+BCh] [rbp-3Ch]
long long v36; // [rsp+C0h] [rbp-38h]
long long v37; // [rsp+C8h] [rbp-30h]
long long v38; // [rsp+D0h] [rbp-28h]
double v39; // [rsp+D8h] [rbp-20h]
long long v40; // [rsp+E0h] [rbp-18h]
long long v41; // [rsp+E8h] [rbp-10h]
long long v42; // [rsp+F0h] [rbp-8h]
v23 = a2;
v24 = a3;
v22 = a1;
v21 = a4;
v20 = a5;
v19 = a6;
v18 = js_std_file_get(a1, a2, a3);
if ( v18 )
{
if ( (unsigned int)JS_ToIndex(v22, &v17, v20[2], v20[3]) )
{
LODWORD(v25) = 0;
v26 = 6LL;
}
else if ( (unsigned int)JS_ToIndex(v22, &v16, v20[4], v20[5]) )
{
LODWORD(v25) = 0;
v26 = 6LL;
}
else
{
ArrayBuffer = JS_GetArrayBuffer(v22, &v15, *v20, v20[1]);
if ( ArrayBuffer )
{
if ( v16 + v17 <= v15 )
{
if ( v19 )
v14 = fwrite(v17 + ArrayBuffer, 1LL, v16, v18);
else
v14 = fread(v17 + ArrayBuffer, 1LL, v16, v18);
v32 = v22;
v31 = v14;
if ( v14 < (long long)0xFFFFFFFF80000000LL || v31 > 0x7FFFFFFF )
{
v40 = v32;
v39 = (double)(int)v31;
v41 = _JS_NewFloat64((double)(int)v31);
v42 = v11;
v27 = v41;
v28 = v11;
v33 = v41;
v34 = v11;
}
else
{
v36 = v32;
v35 = v31;
LODWORD(v37) = v31;
v38 = 0LL;
v29 = v37;
v30 = 0LL;
v33 = v37;
v34 = 0LL;
}
v25 = v33;
v26 = v34;
}
else
{
v25 = JS_ThrowRangeError(v22, (unsigned int)"read/write array buffer overflow", v6, v7, v8, v9);
v26 = v10;
}
}
else
{
LODWORD(v25) = 0;
v26 = 6LL;
}
}
}
else
{
LODWORD(v25) = 0;
v26 = 6LL;
}
return v25;
}
|
js_std_file_read_write:
SUB RSP,0xf8
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x60],RDX
MOV qword ptr [RSP + 0x50],RDI
MOV dword ptr [RSP + 0x4c],ECX
MOV qword ptr [RSP + 0x40],R8
MOV dword ptr [RSP + 0x3c],R9D
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
CALL 0x001127c0
MOV qword ptr [RSP + 0x30],RAX
CMP qword ptr [RSP + 0x30],0x0
JNZ 0x00111fcb
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x00112242
LAB_00111fcb:
MOV RDI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x18]
LEA RSI,[RSP + 0x28]
CALL 0x00137e80
CMP EAX,0x0
JZ 0x00112002
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x00112242
LAB_00112002:
MOV RDI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RAX + 0x28]
LEA RSI,[RSP + 0x20]
CALL 0x00137e80
CMP EAX,0x0
JZ 0x00112039
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x00112242
LAB_00112039:
MOV RDI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x18]
CALL 0x00156d50
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x00112077
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x00112242
LAB_00112077:
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,qword ptr [RSP + 0x20]
CMP RAX,qword ptr [RSP + 0x18]
JBE 0x001120aa
MOV RDI,qword ptr [RSP + 0x50]
LEA RSI,[0x208517]
MOV AL,0x0
CALL 0x001283b0
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
JMP 0x00112242
LAB_001120aa:
CMP dword ptr [RSP + 0x3c],0x0
JZ 0x001120d6
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x30]
MOV ESI,0x1
CALL 0x0010e890
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001120f9
LAB_001120d6:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x30]
MOV ESI,0x1
CALL 0x0010e170
MOV qword ptr [RSP + 0x10],RAX
LAB_001120f9:
MOV RCX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0xa0],RCX
MOV qword ptr [RSP + 0x98],RAX
CMP qword ptr [RSP + 0x98],-0x80000000
JL 0x001121ad
CMP qword ptr [RSP + 0x98],0x7fffffff
JG 0x001121ad
MOV RCX,qword ptr [RSP + 0xa0]
MOV EAX,dword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0xc0],RCX
MOV dword ptr [RSP + 0xbc],EAX
MOV EAX,dword ptr [RSP + 0xbc]
MOV dword ptr [RSP + 0xc8],EAX
MOV qword ptr [RSP + 0xd0],0x0
MOV RCX,qword ptr [RSP + 0xc8]
MOV RAX,qword ptr [RSP + 0xd0]
MOV qword ptr [RSP + 0x88],RCX
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x00112228
LAB_001121ad:
MOV RAX,qword ptr [RSP + 0xa0]
CVTSI2SD XMM0,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0xe0],RAX
MOVSD qword ptr [RSP + 0xd8],XMM0
MOVSD XMM0,qword ptr [RSP + 0xd8]
CALL 0x00113560
MOV qword ptr [RSP + 0xe8],RAX
MOV qword ptr [RSP + 0xf0],RDX
MOV RCX,qword ptr [RSP + 0xe8]
MOV RAX,qword ptr [RSP + 0xf0]
MOV qword ptr [RSP + 0x78],RCX
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0xb0],RAX
LAB_00112228:
MOV RCX,qword ptr [RSP + 0xa8]
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x68],RCX
MOV qword ptr [RSP + 0x70],RAX
LAB_00112242:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
ADD RSP,0xf8
RET
|
int1 [16]
js_std_file_read_write
(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5,int param_6)
{
int iVar1;
int4 extraout_EAX;
long lVar2;
int4 extraout_var;
int8 extraout_RDX;
int1 auVar3 [16];
size_t local_e8;
ulong local_e0;
size_t local_d8;
long local_d0;
FILE *local_c8;
int local_bc;
int8 *local_b8;
int4 local_ac;
int8 local_a8;
int8 local_a0;
int8 local_98;
int4 local_90;
int4 uStack_8c;
int8 local_88;
size_t local_60;
int8 local_58;
int4 local_50;
int4 uStack_4c;
int8 local_48;
int4 uStack_2c;
double local_20;
int8 local_18;
local_bc = param_6;
local_b8 = param_5;
local_ac = param_4;
local_a8 = param_1;
local_a0 = param_2;
local_98 = param_3;
local_c8 = (FILE *)js_std_file_get(param_1,param_2,param_3);
if (local_c8 == (FILE *)0x0) {
local_90 = 0;
local_88 = 6;
}
else {
iVar1 = JS_ToIndex(local_a8,&local_d0,local_b8[2],local_b8[3]);
if (iVar1 == 0) {
iVar1 = JS_ToIndex(local_a8,&local_d8,local_b8[4],local_b8[5]);
if (iVar1 == 0) {
lVar2 = JS_GetArrayBuffer(local_a8,&local_e0,*local_b8,local_b8[1]);
if (lVar2 == 0) {
local_90 = 0;
local_88 = 6;
}
else if (local_e0 < local_d0 + local_d8) {
auVar3 = JS_ThrowRangeError(local_a8,"read/write array buffer overflow");
local_88 = auVar3._8_8_;
local_90 = auVar3._0_4_;
uStack_8c = auVar3._4_4_;
}
else {
if (local_bc == 0) {
local_e8 = fread((void *)(lVar2 + local_d0),1,local_d8,local_c8);
}
else {
local_e8 = fwrite((void *)(lVar2 + local_d0),1,local_d8,local_c8);
}
local_58 = local_a8;
local_60 = local_e8;
if (((long)local_e8 < -0x80000000) || (0x7fffffff < (long)local_e8)) {
local_20 = (double)(long)local_e8;
local_18 = local_a8;
__JS_NewFloat64(local_20);
local_48 = extraout_RDX;
local_50 = extraout_EAX;
uStack_4c = extraout_var;
}
else {
local_60._0_4_ = (int4)local_e8;
local_50 = (int4)local_60;
uStack_4c = uStack_2c;
local_48 = 0;
}
local_90 = local_50;
uStack_8c = uStack_4c;
local_88 = local_48;
}
}
else {
local_90 = 0;
local_88 = 6;
}
}
else {
local_90 = 0;
local_88 = 6;
}
}
auVar3._4_4_ = uStack_8c;
auVar3._0_4_ = local_90;
auVar3._8_8_ = local_88;
return auVar3;
}
|
|
18,579
|
js_std_file_read_write
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_file_read_write(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
FILE *f = js_std_file_get(ctx, this_val);
uint64_t pos, len;
size_t size, ret;
uint8_t *buf;
if (!f)
return JS_EXCEPTION;
if (JS_ToIndex(ctx, &pos, argv[1]))
return JS_EXCEPTION;
if (JS_ToIndex(ctx, &len, argv[2]))
return JS_EXCEPTION;
buf = JS_GetArrayBuffer(ctx, &size, argv[0]);
if (!buf)
return JS_EXCEPTION;
if (pos + len > size)
return JS_ThrowRangeError(ctx, "read/write array buffer overflow");
if (magic)
ret = fwrite(buf + pos, 1, len, f);
else
ret = fread(buf + pos, 1, len, f);
return JS_NewInt64(ctx, ret);
}
|
O1
|
c
|
js_std_file_read_write:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %r9d, %ebp
movq %r8, %r12
movq %rdi, %r15
callq 0x15974
movl $0x6, %ebx
testq %rax, %rax
je 0x1565e
movq %rax, %r14
movq 0x10(%r12), %rdx
movq 0x18(%r12), %rcx
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x26e5b
testl %eax, %eax
jne 0x1565e
movq 0x20(%r12), %rdx
movq 0x28(%r12), %rcx
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x26e5b
testl %eax, %eax
je 0x15678
xorl %eax, %eax
xorl %r12d, %r12d
movl %eax, %eax
orq %r12, %rax
movq %rbx, %rdx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rdx
movq 0x8(%r12), %rcx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x3836d
testq %rax, %rax
je 0x1565e
movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rdx
leaq (%rdx,%rcx), %rsi
cmpq 0x8(%rsp), %rsi
jbe 0x156c8
leaq 0x84dc6(%rip), %rsi # 0x9a47f
movq %r15, %rdi
xorl %eax, %eax
callq 0x1fec9
movq %rdx, %rbx
jmp 0x15707
addq %rcx, %rax
movl $0x1, %esi
movq %rax, %rdi
movq %r14, %rcx
testl %ebp, %ebp
je 0x156e1
callq 0xe8a0
jmp 0x156e6
callq 0xe170
movslq %eax, %rcx
xorl %edx, %edx
cmpq %rax, %rcx
cvtsi2sd %rax, %xmm0
movl %ecx, %ecx
movq %xmm0, %rax
cmoveq %rcx, %rax
movl $0x7, %ebx
cmoveq %rdx, %rbx
andq %rax, %r12
jmp 0x15663
|
js_std_file_read_write:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov ebp, r9d
mov r12, r8
mov r15, rdi
call js_std_file_get
mov ebx, 6
test rax, rax
jz short loc_1565E
mov r14, rax
mov rdx, [r12+10h]
mov rcx, [r12+18h]
lea rsi, [rsp+48h+var_30]
mov rdi, r15
call JS_ToIndex
test eax, eax
jnz short loc_1565E
mov rdx, [r12+20h]
mov rcx, [r12+28h]
lea rsi, [rsp+48h+var_38]
mov rdi, r15
call JS_ToIndex
test eax, eax
jz short loc_15678
loc_1565E:
xor eax, eax
xor r12d, r12d
loc_15663:
mov eax, eax
or rax, r12
mov rdx, rbx
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_15678:
mov rdx, [r12]
mov rcx, [r12+8]
lea rsi, [rsp+48h+var_40]
mov rdi, r15
call JS_GetArrayBuffer
test rax, rax
jz short loc_1565E
mov r12, 0FFFFFFFF00000000h
mov rcx, [rsp+48h+var_30]
mov rdx, [rsp+48h+var_38]
lea rsi, [rdx+rcx]
cmp rsi, [rsp+48h+var_40]
jbe short loc_156C8
lea rsi, aReadWriteArray; "read/write array buffer overflow"
mov rdi, r15
xor eax, eax
call JS_ThrowRangeError
mov rbx, rdx
jmp short loc_15707
loc_156C8:
add rax, rcx
mov esi, 1
mov rdi, rax
mov rcx, r14
test ebp, ebp
jz short loc_156E1
call _fwrite
jmp short loc_156E6
loc_156E1:
call _fread
loc_156E6:
movsxd rcx, eax
xor edx, edx
cmp rcx, rax
cvtsi2sd xmm0, rax
mov ecx, ecx
movq rax, xmm0
cmovz rax, rcx
mov ebx, 7
cmovz rbx, rdx
loc_15707:
and r12, rax
jmp loc_15663
|
unsigned long long js_std_file_read_write(long long a1, long long a2, long long a3, long long a4, _QWORD *a5, int a6)
{
long long v8; // rax
long long v9; // r14
double v10; // rax
unsigned long long v11; // r12
long long ArrayBuffer; // rax
int v14; // r8d
int v15; // r9d
long long v16; // rdi
long long v17; // rax
bool v18; // zf
double v19; // rcx
unsigned long long v20; // [rsp+8h] [rbp-40h] BYREF
long long v21; // [rsp+10h] [rbp-38h] BYREF
_QWORD v22[6]; // [rsp+18h] [rbp-30h] BYREF
v8 = js_std_file_get(a1);
if ( !v8
|| (v9 = v8, (unsigned int)JS_ToIndex(a1, v22, a5[2], a5[3]))
|| (unsigned int)JS_ToIndex(a1, &v21, a5[4], a5[5])
|| (ArrayBuffer = JS_GetArrayBuffer(a1, &v20, *a5, a5[1])) == 0 )
{
LODWORD(v10) = 0;
v11 = 0LL;
}
else
{
if ( v21 + v22[0] <= v20 )
{
v16 = v22[0] + ArrayBuffer;
if ( a6 )
v17 = fwrite(v16, 1LL, v21, v9);
else
v17 = fread(v16, 1LL, v21, v9);
v18 = (int)v17 == v17;
*(_QWORD *)&v19 = (unsigned int)v17;
v10 = (double)(int)v17;
if ( v18 )
v10 = v19;
}
else
{
v10 = COERCE_DOUBLE(JS_ThrowRangeError(a1, (unsigned int)"read/write array buffer overflow", v21, v22[0], v14, v15));
}
v11 = *(_QWORD *)&v10 & 0xFFFFFFFF00000000LL;
}
return v11 | LODWORD(v10);
}
|
js_std_file_read_write:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV EBP,R9D
MOV R12,R8
MOV R15,RDI
CALL 0x00115974
MOV EBX,0x6
TEST RAX,RAX
JZ 0x0011565e
MOV R14,RAX
MOV RDX,qword ptr [R12 + 0x10]
MOV RCX,qword ptr [R12 + 0x18]
LEA RSI,[RSP + 0x18]
MOV RDI,R15
CALL 0x00126e5b
TEST EAX,EAX
JNZ 0x0011565e
MOV RDX,qword ptr [R12 + 0x20]
MOV RCX,qword ptr [R12 + 0x28]
LEA RSI,[RSP + 0x10]
MOV RDI,R15
CALL 0x00126e5b
TEST EAX,EAX
JZ 0x00115678
LAB_0011565e:
XOR EAX,EAX
XOR R12D,R12D
LAB_00115663:
MOV EAX,EAX
OR RAX,R12
MOV RDX,RBX
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00115678:
MOV RDX,qword ptr [R12]
MOV RCX,qword ptr [R12 + 0x8]
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x0013836d
TEST RAX,RAX
JZ 0x0011565e
MOV R12,-0x100000000
MOV RCX,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x10]
LEA RSI,[RDX + RCX*0x1]
CMP RSI,qword ptr [RSP + 0x8]
JBE 0x001156c8
LEA RSI,[0x19a47f]
MOV RDI,R15
XOR EAX,EAX
CALL 0x0011fec9
MOV RBX,RDX
JMP 0x00115707
LAB_001156c8:
ADD RAX,RCX
MOV ESI,0x1
MOV RDI,RAX
MOV RCX,R14
TEST EBP,EBP
JZ 0x001156e1
CALL 0x0010e8a0
JMP 0x001156e6
LAB_001156e1:
CALL 0x0010e170
LAB_001156e6:
MOVSXD RCX,EAX
XOR EDX,EDX
CMP RCX,RAX
CVTSI2SD XMM0,RAX
MOV ECX,ECX
MOVQ RAX,XMM0
CMOVZ RAX,RCX
MOV EBX,0x7
CMOVZ RBX,RDX
LAB_00115707:
AND R12,RAX
JMP 0x00115663
|
int1 [16] js_std_file_read_write(int8 param_1)
{
int1 auVar1 [16];
int iVar2;
FILE *__stream;
long lVar3;
double dVar4;
int8 *in_R8;
int in_R9D;
ulong uVar5;
bool bVar6;
int1 auVar7 [16];
int1 auVar8 [16];
ulong local_40;
size_t local_38;
long local_30;
__stream = (FILE *)js_std_file_get();
if (__stream != (FILE *)0x0) {
iVar2 = JS_ToIndex(param_1,&local_30,in_R8[2],in_R8[3]);
if (iVar2 == 0) {
iVar2 = JS_ToIndex(param_1,&local_38,in_R8[4],in_R8[5]);
if (iVar2 == 0) {
lVar3 = JS_GetArrayBuffer(param_1,&local_40,*in_R8,in_R8[1]);
if (lVar3 != 0) {
if (local_40 < local_38 + local_30) {
auVar8 = JS_ThrowRangeError(param_1,"read/write array buffer overflow");
}
else {
if (in_R9D == 0) {
uVar5 = fread((void *)(lVar3 + local_30),1,local_38,__stream);
}
else {
uVar5 = fwrite((void *)(lVar3 + local_30),1,local_38,__stream);
}
bVar6 = (long)(int)uVar5 == uVar5;
dVar4 = (double)(long)uVar5;
if (bVar6) {
dVar4 = (double)(uVar5 & 0xffffffff);
}
auVar1._8_8_ = 0;
auVar1._0_8_ = dVar4;
auVar8._8_8_ = 7;
auVar8._0_8_ = dVar4;
if (bVar6) {
auVar8 = auVar1;
}
}
uVar5 = auVar8._0_8_ & 0xffffffff00000000;
goto LAB_00115663;
}
}
}
}
auVar8 = ZEXT816(6) << 0x40;
uVar5 = 0;
LAB_00115663:
auVar7._0_8_ = auVar8._0_8_ & 0xffffffff | uVar5;
auVar7._8_8_ = auVar8._8_8_;
return auVar7;
}
|
|
18,580
|
intx::internal::submul(unsigned long*, unsigned long const*, unsigned long const*, int, unsigned long)
|
corpus-core[P]colibri-stateless/build_O0/_deps/intx-src/include/intx/intx.hpp
|
inline uint64_t submul(
uint64_t r[], const uint64_t x[], const uint64_t y[], int len, uint64_t multiplier) noexcept
{
// OPT: Add MinLen template parameter and unroll first loop iterations.
INTX_REQUIRE(len >= 1);
uint64_t borrow = 0;
for (int i = 0; i < len; ++i)
{
const auto s = x[i] - borrow;
const auto p = umul(y[i], multiplier);
borrow = p[1] + (x[i] < s);
r[i] = s - p[0];
borrow += (s < r[i]);
}
return borrow;
}
|
O0
|
cpp
|
intx::internal::submul(unsigned long*, unsigned long const*, unsigned long const*, int, unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
cmpl $0x1, -0x1c(%rbp)
jl 0x62d23
jmp 0x62d42
leaq 0x7a71c(%rip), %rdi # 0xdd446
leaq 0x7a537(%rip), %rsi # 0xdd268
movl $0x67d, %edx # imm = 0x67D
leaq 0x7a712(%rip), %rcx # 0xdd44f
callq 0x23160
movq $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x62e15
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x28(%rbp), %rsi
callq 0x600d0
movq %rax, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
leaq -0x50(%rbp), %rdi
movl $0x1, %esi
callq 0x60290
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq -0x40(%rbp), %rcx
setb %cl
andb $0x1, %cl
movzbl %cl, %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x60290
movq -0x58(%rbp), %rdx
subq (%rax), %rdx
movq -0x8(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq -0x34(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
setb %al
andb $0x1, %al
movzbl %al, %eax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x62d51
movq -0x30(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nop
|
_ZN4intx8internal6submulEPmPKmS3_im:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
cmp [rbp+var_1C], 1
jl short loc_62D23
jmp short loc_62D42
loc_62D23:
lea rdi, aLen1; "len >= 1"
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
mov edx, 67Dh
lea rcx, aUint64TIntxInt_0; "uint64_t intx::internal::submul(uint64_"...
call ___assert_fail
loc_62D42:
mov [rbp+var_30], 0
mov [rbp+var_34], 0
loc_62D51:
mov eax, [rbp+var_34]
cmp eax, [rbp+var_1C]
jge loc_62E15
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_34]
mov rax, [rax+rcx*8]
sub rax, [rbp+var_30]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_34]
mov rdi, [rax+rcx*8]; this
mov rsi, [rbp+var_28]; unsigned __int64
call _ZN4intx4umulEmm; intx::umul(ulong,ulong)
mov [rbp+var_50], rax
mov [rbp+var_48], rdx
lea rdi, [rbp+var_50]
mov esi, 1
call _ZNK4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong)
mov rax, [rax]
mov rcx, [rbp+var_10]
movsxd rdx, [rbp+var_34]
mov rcx, [rcx+rdx*8]
cmp rcx, [rbp+var_40]
setb cl
and cl, 1
movzx ecx, cl
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_40]
mov [rbp+var_58], rax
lea rdi, [rbp+var_50]
xor eax, eax
mov esi, eax
call _ZNK4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong)
mov rdx, [rbp+var_58]
sub rdx, [rax]
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_34]
mov [rax+rcx*8], rdx
mov rax, [rbp+var_40]
mov rcx, [rbp+var_8]
movsxd rdx, [rbp+var_34]
cmp rax, [rcx+rdx*8]
setb al
and al, 1
movzx eax, al
add rax, [rbp+var_30]
mov [rbp+var_30], rax
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_34], eax
jmp loc_62D51
loc_62E15:
mov rax, [rbp+var_30]
add rsp, 60h
pop rbp
retn
|
long long intx::internal::submul(
intx::internal *this,
unsigned long long *a2,
const unsigned long long *a3,
const unsigned long long *a4,
unsigned long long a5)
{
long long v5; // rdx
_QWORD *v6; // rax
_QWORD *v7; // rax
unsigned long long v9; // [rsp+8h] [rbp-58h]
_QWORD v10[2]; // [rsp+10h] [rbp-50h] BYREF
unsigned long long v11; // [rsp+20h] [rbp-40h]
int i; // [rsp+2Ch] [rbp-34h]
long long v13; // [rsp+30h] [rbp-30h]
unsigned long long v14; // [rsp+38h] [rbp-28h]
int v15; // [rsp+44h] [rbp-1Ch]
const unsigned long long *v16; // [rsp+48h] [rbp-18h]
unsigned long long *v17; // [rsp+50h] [rbp-10h]
intx::internal *v18; // [rsp+58h] [rbp-8h]
v18 = this;
v17 = a2;
v16 = a3;
v15 = (int)a4;
v14 = a5;
if ( (int)a4 < 1 )
__assert_fail(
"len >= 1",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O0/_deps/intx-src/include/intx/intx.hpp",
1661LL,
"uint64_t intx::internal::submul(uint64_t *, const uint64_t *, const uint64_t *, int, uint64_t)");
v13 = 0LL;
for ( i = 0; i < v15; ++i )
{
v11 = v17[i] - v13;
v10[0] = intx::umul(v16[i], v14);
v10[1] = v5;
v6 = (_QWORD *)intx::uint<128u>::operator[]((long long)v10, 1LL);
v13 = (v17[i] < v11) + *v6;
v9 = v11;
v7 = (_QWORD *)intx::uint<128u>::operator[]((long long)v10, 0LL);
*((_QWORD *)v18 + i) = v9 - *v7;
v13 += v11 < *((_QWORD *)v18 + i);
}
return v13;
}
|
submul:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
CMP dword ptr [RBP + -0x1c],0x1
JL 0x00162d23
JMP 0x00162d42
LAB_00162d23:
LEA RDI,[0x1dd446]
LEA RSI,[0x1dd268]
MOV EDX,0x67d
LEA RCX,[0x1dd44f]
CALL 0x00123160
LAB_00162d42:
MOV qword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x34],0x0
LAB_00162d51:
MOV EAX,dword ptr [RBP + -0x34]
CMP EAX,dword ptr [RBP + -0x1c]
JGE 0x00162e15
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RAX + RCX*0x8]
SUB RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x34]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001600d0
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x48],RDX
LEA RDI,[RBP + -0x50]
MOV ESI,0x1
CALL 0x00160290
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x34]
MOV RCX,qword ptr [RCX + RDX*0x8]
CMP RCX,qword ptr [RBP + -0x40]
SETC CL
AND CL,0x1
MOVZX ECX,CL
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x58],RAX
LEA RDI,[RBP + -0x50]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00160290
MOV RDX,qword ptr [RBP + -0x58]
SUB RDX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x34]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RBP + -0x34]
CMP RAX,qword ptr [RCX + RDX*0x8]
SETC AL
AND AL,0x1
MOVZX EAX,AL
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x00162d51
LAB_00162e15:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x60
POP RBP
RET
|
/* intx::internal::submul(unsigned long*, unsigned long const*, unsigned long const*, int, unsigned
long) */
long intx::internal::submul(ulong *param_1,ulong *param_2,ulong *param_3,int param_4,ulong param_5)
{
ulong uVar1;
long *plVar2;
int1 auVar3 [16];
int1 local_58 [16];
ulong local_48;
int local_3c;
long local_38;
ulong local_30;
int local_24;
ulong *local_20;
ulong *local_18;
ulong *local_10;
local_30 = param_5;
local_24 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
if (0 < param_4) {
local_38 = 0;
for (local_3c = 0; local_3c < local_24; local_3c = local_3c + 1) {
local_48 = local_18[local_3c] - local_38;
auVar3 = umul(local_20[local_3c],local_30);
local_58 = auVar3;
plVar2 = (long *)uint<128u>::operator[]((uint<128u> *)local_58,1);
uVar1 = local_48;
local_38 = *plVar2 + (ulong)(local_18[local_3c] < local_48);
plVar2 = (long *)uint<128u>::operator[]((uint<128u> *)local_58,0);
local_10[local_3c] = uVar1 - *plVar2;
local_38 = (ulong)(local_48 < local_10[local_3c]) + local_38;
}
return local_38;
}
/* WARNING: Subroutine does not return */
__assert_fail("len >= 1",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O0/_deps/intx-src/include/intx/intx.hpp"
,0x67d,
"uint64_t intx::internal::submul(uint64_t *, const uint64_t *, const uint64_t *, int, uint64_t)"
);
}
|
|
18,581
|
asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>, asio::execution::detail::blocking::never_t<0>, asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>> asio::execution::detail::any_executor_base::prefer_fn_impl<asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>, asio::execution::detail::blocking::never_t<0>, asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>, asio::strand<asio::io_context::basic_executor_type<std::allocator<void>, 0ul>>, asio::execution::detail::blocking::never_t<0>>(void const*, void const*, std::enable_if<!is_same<asio::strand<asio::io_context::basic_executor_type<std::allocator<void>, 0ul>>, void>::value && asio::execution::detail::blocking::never_t<0>::is_preferable, void>::type*)
|
aimrt_mujoco_sim/_deps/asio-src/asio/include/asio/execution/any_executor.hpp
|
static Poly prefer_fn_impl(const void* ex, const void* prop,
enable_if_t<
!is_same<Ex, void>::value && Prop::is_preferable
>*)
{
return asio::prefer(*static_cast<const Ex*>(ex),
*static_cast<const Prop*>(prop));
}
|
O3
|
cpp
|
asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>, asio::execution::detail::blocking::never_t<0>, asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>> asio::execution::detail::any_executor_base::prefer_fn_impl<asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>, asio::execution::detail::blocking::never_t<0>, asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>, asio::strand<asio::io_context::basic_executor_type<std::allocator<void>, 0ul>>, asio::execution::detail::blocking::never_t<0>>(void const*, void const*, std::enable_if<!is_same<asio::strand<asio::io_context::basic_executor_type<std::allocator<void>, 0ul>>, void>::value && asio::execution::detail::blocking::never_t<0>::is_preferable, void>::type*):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rsi), %rcx
movq %rcx, %rax
orq $0x2, %rax
movq %rax, 0x8(%rsp)
andq $-0x4, %rcx
je 0xf9416
movq 0x8(%rcx), %rax
lock
incq 0xd8(%rax)
movq 0x8(%rsp), %rax
xorl %ecx, %ecx
leaq 0x8(%rsp), %r14
movq %rcx, (%r14)
movq 0x1a7b89(%rip), %rdx # 0x2a0fb0
movq %rdx, 0x28(%rbx)
movq 0x1a7556(%rip), %rdx # 0x2a0988
movq %rdx, 0x18(%rbx)
movq %rax, (%rbx)
leaq 0x10(%rsp), %rdi
movq %rcx, (%rdi)
movq %rbx, 0x20(%rbx)
callq 0x809b0
movq 0x1a79b7(%rip), %rax # 0x2a0e08
movq %rax, 0x30(%rbx)
movq %r14, %rdi
callq 0x809b0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
|
_ZN4asio9execution6detail17any_executor_base14prefer_fn_implINS0_12any_executorIJNS0_12context_as_tIRNS_17execution_contextEEENS1_8blocking7never_tILi0EEENS0_11prefer_onlyINS9_10possibly_tILi0EEEEENSC_INS1_16outstanding_work9tracked_tILi0EEEEENSC_INSG_11untracked_tILi0EEEEENSC_INS1_12relationship6fork_tILi0EEEEENSC_INSN_14continuation_tILi0EEEEEEEENS_10io_context19basic_executor_typeISaIvELm4EEEST_EET_PKvS11_PNSt9enable_ifIXaantsr7is_sameIT0_vEE5valuesrT1_13is_preferableEvE4typeE:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
mov rcx, [rsi]
mov rax, rcx
or rax, 2
mov [rsp+28h+var_20], rax
and rcx, 0FFFFFFFFFFFFFFFCh
jz short loc_F9416
mov rax, [rcx+8]
lock inc qword ptr [rax+0D8h]
mov rax, [rsp+28h+var_20]
loc_F9416:
xor ecx, ecx
lea r14, [rsp+28h+var_20]
mov [r14], rcx
mov rdx, cs:_ZZN4asio9execution6detail17any_executor_base16target_fns_tableINS_10io_context19basic_executor_typeISaIvELm4EEEEEPKNS2_10target_fnsEbPNSt9enable_ifIXntsr7is_sameIT_vEE5valueEvE4typeEE16fns_with_execute_ptr
mov [rbx+28h], rdx
mov rdx, cs:_ZZN4asio9execution6detail17any_executor_base16object_fns_tableINS_10io_context19basic_executor_typeISaIvELm4EEEEEPKNS2_10object_fnsEPNSt9enable_ifIXaantsr7is_sameIT_vEE5valuentsr7is_sameISC_NS1_22shared_target_executorEEE5valueEvE4typeEE3fns_ptr
mov [rbx+18h], rdx
mov [rbx], rax
lea rdi, [rsp+28h+var_18]
mov [rdi], rcx
mov [rbx+20h], rbx
call __ZN4asio10io_context19basic_executor_typeISaIvELm4EED2Ev; asio::io_context::basic_executor_type<std::allocator<void>,4ul>::~basic_executor_type()
mov rax, cs:_ZZN4asio9execution12any_executorIJNS0_12context_as_tIRNS_17execution_contextEEENS0_6detail8blocking7never_tILi0EEENS0_11prefer_onlyINS7_10possibly_tILi0EEEEENSA_INS6_16outstanding_work9tracked_tILi0EEEEENSA_INSE_11untracked_tILi0EEEEENSA_INS6_12relationship6fork_tILi0EEEEENSA_INSL_14continuation_tILi0EEEEEEE14prop_fns_tableINS_10io_context19basic_executor_typeISaIvELm4EEEEEPKNS6_17any_executor_base8prop_fnsISS_EEvE3fns_ptr
mov [rbx+30h], rax
mov rdi, r14
call __ZN4asio10io_context19basic_executor_typeISaIvELm4EED2Ev; asio::io_context::basic_executor_type<std::allocator<void>,4ul>::~basic_executor_type()
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
retn
|
long long * asio::execution::detail::any_executor_base::prefer_fn_impl<asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context &>,asio::execution::detail::blocking::never_t<0>,asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>,asio::io_context::basic_executor_type<std::allocator<void>,4ul>,asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>(
long long *a1,
long long *a2)
{
long long v2; // rcx
long long v3; // rax
unsigned long long v4; // rcx
long long v6; // [rsp+8h] [rbp-20h] BYREF
_QWORD v7[3]; // [rsp+10h] [rbp-18h] BYREF
v2 = *a2;
v3 = *a2 | 2;
v6 = v3;
v4 = v2 & 0xFFFFFFFFFFFFFFFCLL;
if ( v4 )
{
_InterlockedIncrement64((volatile signed long long *)(*(_QWORD *)(v4 + 8) + 216LL));
v3 = v6;
}
v6 = 0LL;
a1[5] = (long long)ZZN4asio9execution6detail17any_executor_base16target_fns_tableINS_10io_context19basic_executor_typeISaIvELm4EEEEEPKNS2_10target_fnsEbPNSt9enable_ifIXntsr7is_sameIT_vEE5valueEvE4typeEE16fns_with_execute;
a1[3] = (long long)ZZN4asio9execution6detail17any_executor_base16object_fns_tableINS_10io_context19basic_executor_typeISaIvELm4EEEEEPKNS2_10object_fnsEPNSt9enable_ifIXaantsr7is_sameIT_vEE5valuentsr7is_sameISC_NS1_22shared_target_executorEEE5valueEvE4typeEE3fns;
*a1 = v3;
v7[0] = 0LL;
a1[4] = (long long)a1;
asio::io_context::basic_executor_type<std::allocator<void>,4ul>::~basic_executor_type(v7);
a1[6] = (long long)asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context &>,asio::execution::detail::blocking::never_t<0>,asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>::prop_fns_table<asio::io_context::basic_executor_type<std::allocator<void>,4ul>>(void)::fns;
asio::io_context::basic_executor_type<std::allocator<void>,4ul>::~basic_executor_type(&v6);
return a1;
}
|
prefer_fn_impl<asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>,asio::execution::detail::blocking::never_t<0>,asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>,asio::io_context::basic_executor_type<std::allocator<void>,4ul>,asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV RCX,qword ptr [RSI]
MOV RAX,RCX
OR RAX,0x2
MOV qword ptr [RSP + 0x8],RAX
AND RCX,-0x4
JZ 0x001f9416
MOV RAX,qword ptr [RCX + 0x8]
INC.LOCK qword ptr [RAX + 0xd8]
MOV RAX,qword ptr [RSP + 0x8]
LAB_001f9416:
XOR ECX,ECX
LEA R14,[RSP + 0x8]
MOV qword ptr [R14],RCX
MOV RDX,qword ptr [0x003a0fb0]
MOV qword ptr [RBX + 0x28],RDX
MOV RDX,qword ptr [0x003a0988]
MOV qword ptr [RBX + 0x18],RDX
MOV qword ptr [RBX],RAX
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],RCX
MOV qword ptr [RBX + 0x20],RBX
CALL 0x001809b0
MOV RAX,qword ptr [0x003a0e08]
MOV qword ptr [RBX + 0x30],RAX
MOV RDI,R14
CALL 0x001809b0
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>,
asio::execution::detail::blocking::never_t<0>,
asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0> >,
asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0> >,
asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0> >,
asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0> >,
asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0> > >
asio::execution::detail::any_executor_base::prefer_fn_impl<asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>,
asio::execution::detail::blocking::never_t<0>,
asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0> >,
asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0> >,
asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0> >,
asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0> >,
asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0> > >,
asio::io_context::basic_executor_type<std::allocator<void>, 4ul>,
asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0> > >(void
const*, void const*,
std::enable_if<(!is_same<asio::io_context::basic_executor_type<std::allocator<void>, 4ul>,
void>::value)&&asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>
>::is_preferable, void>::type*) */
void * asio::execution::detail::any_executor_base::
prefer_fn_impl<asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>,asio::execution::detail::blocking::never_t<0>,asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>,asio::io_context::basic_executor_type<std::allocator<void>,4ul>,asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>
(void *param_1,void *param_2,type *param_3)
{
long *plVar1;
ulong uVar2;
ulong uVar3;
int8 local_20;
int8 local_18;
/* WARNING: Load size is inaccurate */
uVar2 = *param_2;
uVar3 = uVar2 & 0xfffffffffffffffc;
if (uVar3 != 0) {
LOCK();
plVar1 = (long *)(*(long *)(uVar3 + 8) + 0xd8);
*plVar1 = *plVar1 + 1;
UNLOCK();
}
local_20 = 0;
*(int **)((long)param_1 + 0x28) = PTR_fns_with_execute_003a0fb0;
*(int **)((long)param_1 + 0x18) = PTR_fns_003a0988;
*(ulong *)param_1 = uVar2 | 2;
local_18 = 0;
*(void **)((long)param_1 + 0x20) = param_1;
io_context::basic_executor_type<std::allocator<void>,4ul>::~basic_executor_type
((basic_executor_type<std::allocator<void>,4ul> *)&local_18);
*(int **)((long)param_1 + 0x30) = PTR_fns_003a0e08;
io_context::basic_executor_type<std::allocator<void>,4ul>::~basic_executor_type
((basic_executor_type<std::allocator<void>,4ul> *)&local_20);
return param_1;
}
|
|
18,582
|
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&)
|
monkey531[P]llama/common/common.cpp
|
bool string_parse_kv_override(const char * data, std::vector<llama_model_kv_override> & overrides) {
const char * sep = strchr(data, '=');
if (sep == nullptr || sep - data >= 128) {
LOG_ERR("%s: malformed KV override '%s'\n", __func__, data);
return false;
}
llama_model_kv_override kvo;
std::strncpy(kvo.key, data, sep - data);
kvo.key[sep - data] = 0;
sep++;
if (strncmp(sep, "int:", 4) == 0) {
sep += 4;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_INT;
kvo.val_i64 = std::atol(sep);
} else if (strncmp(sep, "float:", 6) == 0) {
sep += 6;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_FLOAT;
kvo.val_f64 = std::atof(sep);
} else if (strncmp(sep, "bool:", 5) == 0) {
sep += 5;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_BOOL;
if (std::strcmp(sep, "true") == 0) {
kvo.val_bool = true;
} else if (std::strcmp(sep, "false") == 0) {
kvo.val_bool = false;
} else {
LOG_ERR("%s: invalid boolean value for KV override '%s'\n", __func__, data);
return false;
}
} else if (strncmp(sep, "str:", 4) == 0) {
sep += 4;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_STR;
if (strlen(sep) > 127) {
LOG_ERR("%s: malformed KV override '%s', value cannot exceed 127 chars\n", __func__, data);
return false;
}
strncpy(kvo.val_str, sep, 127);
kvo.val_str[127] = '\0';
} else {
LOG_ERR("%s: invalid type for KV override '%s'\n", __func__, data);
return false;
}
overrides.emplace_back(std::move(kvo));
return true;
}
|
O0
|
cpp
|
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&):
subq $0x128, %rsp # imm = 0x128
movq %rdi, 0x118(%rsp)
movq %rsi, 0x110(%rsp)
movq 0x118(%rsp), %rdi
movl $0x3d, %esi
callq 0x5a980
movq %rax, 0x108(%rsp)
cmpq $0x0, 0x108(%rsp)
je 0xed4b7
movq 0x108(%rsp), %rax
movq 0x118(%rsp), %rcx
subq %rcx, %rax
cmpq $0x80, %rax
jl 0xed4ff
jmp 0xed4b9
xorl %eax, %eax
leaq 0x1b6126(%rip), %rcx # 0x2a35e8
cmpl (%rcx), %eax
jg 0xed4f0
callq 0x1be200
movq %rax, %rdi
movq 0x118(%rsp), %r8
movl $0x4, %esi
leaq 0x1222f8(%rip), %rdx # 0x20f7da
leaq 0x122311(%rip), %rcx # 0x20f7fa
movb $0x0, %al
callq 0x1be2f0
jmp 0xed4f2
movb $0x0, 0x127(%rsp)
jmp 0xed7ec
movq %rsp, %rdi
addq $0x4, %rdi
movq 0x118(%rsp), %rsi
movq 0x108(%rsp), %rdx
movq 0x118(%rsp), %rax
subq %rax, %rdx
callq 0x5a260
movq 0x108(%rsp), %rax
movq 0x118(%rsp), %rcx
subq %rcx, %rax
movb $0x0, 0x4(%rsp,%rax)
movq 0x108(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x108(%rsp)
movq 0x108(%rsp), %rdi
leaq 0x1222b2(%rip), %rsi # 0x20f813
movl $0x4, %edx
callq 0x5a3d0
cmpl $0x0, %eax
jne 0xed5a5
movq 0x108(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x108(%rsp)
movl $0x0, (%rsp)
movq 0x108(%rsp), %rdi
callq 0x5aa80
movq %rax, 0x88(%rsp)
jmp 0xed7d4
movq 0x108(%rsp), %rdi
leaq 0x122264(%rip), %rsi # 0x20f818
movl $0x6, %edx
callq 0x5a3d0
cmpl $0x0, %eax
jne 0xed5f9
movq 0x108(%rsp), %rax
addq $0x6, %rax
movq %rax, 0x108(%rsp)
movl $0x1, (%rsp)
movq 0x108(%rsp), %rdi
callq 0x5aea0
movsd %xmm0, 0x88(%rsp)
jmp 0xed7d2
movq 0x108(%rsp), %rdi
leaq 0x122217(%rip), %rsi # 0x20f81f
movl $0x5, %edx
callq 0x5a3d0
cmpl $0x0, %eax
jne 0xed6cb
movq 0x108(%rsp), %rax
addq $0x5, %rax
movq %rax, 0x108(%rsp)
movl $0x2, (%rsp)
movq 0x108(%rsp), %rdi
leaq 0x119b8d(%rip), %rsi # 0x2071d2
callq 0x5aeb0
cmpl $0x0, %eax
jne 0xed659
movb $0x1, 0x88(%rsp)
jmp 0xed6c6
movq 0x108(%rsp), %rdi
leaq 0x11c853(%rip), %rsi # 0x209ebb
callq 0x5aeb0
cmpl $0x0, %eax
jne 0xed67c
movb $0x0, 0x88(%rsp)
jmp 0xed6c4
jmp 0xed67e
xorl %eax, %eax
leaq 0x1b5f61(%rip), %rcx # 0x2a35e8
cmpl (%rcx), %eax
jg 0xed6b5
callq 0x1be200
movq %rax, %rdi
movq 0x118(%rsp), %r8
movl $0x4, %esi
leaq 0x12217e(%rip), %rdx # 0x20f825
leaq 0x12214c(%rip), %rcx # 0x20f7fa
movb $0x0, %al
callq 0x1be2f0
jmp 0xed6b7
movb $0x0, 0x127(%rsp)
jmp 0xed7ec
jmp 0xed6c6
jmp 0xed7d0
movq 0x108(%rsp), %rdi
leaq 0x12217b(%rip), %rsi # 0x20f855
movl $0x4, %edx
callq 0x5a3d0
cmpl $0x0, %eax
jne 0xed789
movq 0x108(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x108(%rsp)
movl $0x3, (%rsp)
movq 0x108(%rsp), %rdi
callq 0x5a6a0
cmpq $0x7f, %rax
jbe 0xed763
jmp 0xed71d
xorl %eax, %eax
leaq 0x1b5ec2(%rip), %rcx # 0x2a35e8
cmpl (%rcx), %eax
jg 0xed754
callq 0x1be200
movq %rax, %rdi
movq 0x118(%rsp), %r8
movl $0x4, %esi
leaq 0x122114(%rip), %rdx # 0x20f85a
leaq 0x1220ad(%rip), %rcx # 0x20f7fa
movb $0x0, %al
callq 0x1be2f0
jmp 0xed756
movb $0x0, 0x127(%rsp)
jmp 0xed7ec
movq %rsp, %rdi
addq $0x88, %rdi
movq 0x108(%rsp), %rsi
movl $0x7f, %edx
callq 0x5a260
movb $0x0, 0x107(%rsp)
jmp 0xed7ce
jmp 0xed78b
xorl %eax, %eax
leaq 0x1b5e54(%rip), %rcx # 0x2a35e8
cmpl (%rcx), %eax
jg 0xed7c2
callq 0x1be200
movq %rax, %rdi
movq 0x118(%rsp), %r8
movl $0x4, %esi
leaq 0x1220e5(%rip), %rdx # 0x20f899
leaq 0x12203f(%rip), %rcx # 0x20f7fa
movb $0x0, %al
callq 0x1be2f0
jmp 0xed7c4
movb $0x0, 0x127(%rsp)
jmp 0xed7ec
jmp 0xed7d0
jmp 0xed7d2
jmp 0xed7d4
movq 0x110(%rsp), %rdi
movq %rsp, %rsi
callq 0xf7190
movb $0x1, 0x127(%rsp)
movb 0x127(%rsp), %al
andb $0x1, %al
addq $0x128, %rsp # imm = 0x128
retq
nopl (%rax)
|
_Z24string_parse_kv_overridePKcRSt6vectorI23llama_model_kv_overrideSaIS2_EE:
sub rsp, 128h
mov [rsp+128h+var_10], rdi
mov [rsp+128h+var_18], rsi
mov rdi, [rsp+128h+var_10]
mov esi, 3Dh ; '='
call _strchr
mov [rsp+128h+var_20], rax
cmp [rsp+128h+var_20], 0
jz short loc_ED4B7
mov rax, [rsp+128h+var_20]
mov rcx, [rsp+128h+var_10]
sub rax, rcx
cmp rax, 80h
jl short loc_ED4FF
loc_ED4B7:
jmp short $+2
loc_ED4B9:
xor eax, eax
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg short loc_ED4F0
call _Z15common_log_mainv; common_log_main(void)
mov rdi, rax
mov r8, [rsp+128h+var_10]
mov esi, 4
lea rdx, aSMalformedKvOv; "%s: malformed KV override '%s'\n"
lea rcx, aStringParseKvO; "string_parse_kv_override"
mov al, 0
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_ED4F0:
jmp short $+2
loc_ED4F2:
mov [rsp+128h+var_1], 0
jmp loc_ED7EC
loc_ED4FF:
mov rdi, rsp
add rdi, 4
mov rsi, [rsp+128h+var_10]
mov rdx, [rsp+128h+var_20]
mov rax, [rsp+128h+var_10]
sub rdx, rax
call _strncpy
mov rax, [rsp+128h+var_20]
mov rcx, [rsp+128h+var_10]
sub rax, rcx
mov [rsp+rax+128h+var_124], 0
mov rax, [rsp+128h+var_20]
add rax, 1
mov [rsp+128h+var_20], rax
mov rdi, [rsp+128h+var_20]
lea rsi, aInt; "int:"
mov edx, 4
call _strncmp
cmp eax, 0
jnz short loc_ED5A5
mov rax, [rsp+128h+var_20]
add rax, 4
mov [rsp+128h+var_20], rax
mov [rsp+128h+var_128], 0
mov rdi, [rsp+128h+var_20]
call _atol
mov [rsp+128h+var_A0], rax
jmp loc_ED7D4
loc_ED5A5:
mov rdi, [rsp+128h+var_20]
lea rsi, aFloat; "float:"
mov edx, 6
call _strncmp
cmp eax, 0
jnz short loc_ED5F9
mov rax, [rsp+128h+var_20]
add rax, 6
mov [rsp+128h+var_20], rax
mov [rsp+128h+var_128], 1
mov rdi, [rsp+128h+var_20]
call _atof
movsd [rsp+128h+var_A0], xmm0
jmp loc_ED7D2
loc_ED5F9:
mov rdi, [rsp+128h+var_20]
lea rsi, aBool; "bool:"
mov edx, 5
call _strncmp
cmp eax, 0
jnz loc_ED6CB
mov rax, [rsp+128h+var_20]
add rax, 5
mov [rsp+128h+var_20], rax
mov [rsp+128h+var_128], 2
mov rdi, [rsp+128h+var_20]
lea rsi, aTrue; "true"
call _strcmp
cmp eax, 0
jnz short loc_ED659
mov byte ptr [rsp+128h+var_A0], 1
jmp short loc_ED6C6
loc_ED659:
mov rdi, [rsp+128h+var_20]
lea rsi, aAdvancedOption+0ABh; "false"
call _strcmp
cmp eax, 0
jnz short loc_ED67C
mov byte ptr [rsp+128h+var_A0], 0
jmp short loc_ED6C4
loc_ED67C:
jmp short $+2
loc_ED67E:
xor eax, eax
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg short loc_ED6B5
call _Z15common_log_mainv; common_log_main(void)
mov rdi, rax
mov r8, [rsp+128h+var_10]
mov esi, 4
lea rdx, aSInvalidBoolea; "%s: invalid boolean value for KV overri"...
lea rcx, aStringParseKvO; "string_parse_kv_override"
mov al, 0
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_ED6B5:
jmp short $+2
loc_ED6B7:
mov [rsp+128h+var_1], 0
jmp loc_ED7EC
loc_ED6C4:
jmp short $+2
loc_ED6C6:
jmp loc_ED7D0
loc_ED6CB:
mov rdi, [rsp+128h+var_20]
lea rsi, aStr; "str:"
mov edx, 4
call _strncmp
cmp eax, 0
jnz loc_ED789
mov rax, [rsp+128h+var_20]
add rax, 4
mov [rsp+128h+var_20], rax
mov [rsp+128h+var_128], 3
mov rdi, [rsp+128h+var_20]
call _strlen
cmp rax, 7Fh
jbe short loc_ED763
jmp short $+2
loc_ED71D:
xor eax, eax
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg short loc_ED754
call _Z15common_log_mainv; common_log_main(void)
mov rdi, rax
mov r8, [rsp+128h+var_10]
mov esi, 4
lea rdx, aSMalformedKvOv_0; "%s: malformed KV override '%s', value c"...
lea rcx, aStringParseKvO; "string_parse_kv_override"
mov al, 0
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_ED754:
jmp short $+2
loc_ED756:
mov [rsp+128h+var_1], 0
jmp loc_ED7EC
loc_ED763:
mov rdi, rsp
add rdi, 88h
mov rsi, [rsp+128h+var_20]
mov edx, 7Fh
call _strncpy
mov [rsp+128h+var_21], 0
jmp short loc_ED7CE
loc_ED789:
jmp short $+2
loc_ED78B:
xor eax, eax
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg short loc_ED7C2
call _Z15common_log_mainv; common_log_main(void)
mov rdi, rax
mov r8, [rsp+128h+var_10]
mov esi, 4
lea rdx, aSInvalidTypeFo; "%s: invalid type for KV override '%s'\n"
lea rcx, aStringParseKvO; "string_parse_kv_override"
mov al, 0
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_ED7C2:
jmp short $+2
loc_ED7C4:
mov [rsp+128h+var_1], 0
jmp short loc_ED7EC
loc_ED7CE:
jmp short $+2
loc_ED7D0:
jmp short $+2
loc_ED7D2:
jmp short $+2
loc_ED7D4:
mov rdi, [rsp+128h+var_18]
mov rsi, rsp
call _ZNSt6vectorI23llama_model_kv_overrideSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<llama_model_kv_override>::emplace_back<llama_model_kv_override>(llama_model_kv_override &&)
mov [rsp+128h+var_1], 1
loc_ED7EC:
mov al, [rsp+128h+var_1]
and al, 1
add rsp, 128h
retn
|
char string_parse_kv_override(long long a1, long long a2)
{
int v2; // eax
int v3; // r9d
int v4; // eax
int v5; // r9d
int v6; // eax
int v7; // r9d
int v8; // eax
int v9; // r9d
int v11; // [rsp+0h] [rbp-128h] BYREF
_BYTE v12[132]; // [rsp+4h] [rbp-124h] BYREF
long long v13[15]; // [rsp+88h] [rbp-A0h] BYREF
char v14; // [rsp+107h] [rbp-21h]
long long v15; // [rsp+108h] [rbp-20h]
long long v16; // [rsp+110h] [rbp-18h]
long long v17; // [rsp+118h] [rbp-10h]
v17 = a1;
v16 = a2;
v15 = strchr(a1, 61LL);
if ( !v15 || v15 - v17 >= 128 )
{
if ( common_log_verbosity_thold >= 0 )
{
v2 = common_log_main();
common_log_add(
v2,
4,
(unsigned int)"%s: malformed KV override '%s'\n",
(unsigned int)"string_parse_kv_override",
v17,
v3);
}
return 0;
}
strncpy(v12, v17, v15 - v17);
v12[v15 - v17] = 0;
if ( !(unsigned int)strncmp(++v15, "int:", 4LL) )
{
v15 += 4LL;
v11 = 0;
v13[0] = atol(v15);
LABEL_27:
std::vector<llama_model_kv_override>::emplace_back<llama_model_kv_override>(v16, &v11);
return 1;
}
if ( !(unsigned int)strncmp(v15, "float:", 6LL) )
{
v15 += 6LL;
v11 = 1;
v13[0] = atof(v15);
goto LABEL_27;
}
if ( !(unsigned int)strncmp(v15, "bool:", 5LL) )
{
v15 += 5LL;
v11 = 2;
if ( !(unsigned int)strcmp(v15, "true") )
{
LOBYTE(v13[0]) = 1;
goto LABEL_27;
}
if ( !(unsigned int)strcmp(v15, "false") )
{
LOBYTE(v13[0]) = 0;
goto LABEL_27;
}
if ( common_log_verbosity_thold >= 0 )
{
v4 = common_log_main();
common_log_add(
v4,
4,
(unsigned int)"%s: invalid boolean value for KV override '%s'\n",
(unsigned int)"string_parse_kv_override",
v17,
v5);
}
return 0;
}
else if ( !(unsigned int)strncmp(v15, "str:", 4LL) )
{
v15 += 4LL;
v11 = 3;
if ( (unsigned long long)strlen(v15) <= 0x7F )
{
strncpy(v13, v15, 127LL);
v14 = 0;
goto LABEL_27;
}
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
common_log_add(
v6,
4,
(unsigned int)"%s: malformed KV override '%s', value cannot exceed 127 chars\n",
(unsigned int)"string_parse_kv_override",
v17,
v7);
}
return 0;
}
else
{
if ( common_log_verbosity_thold >= 0 )
{
v8 = common_log_main();
common_log_add(
v8,
4,
(unsigned int)"%s: invalid type for KV override '%s'\n",
(unsigned int)"string_parse_kv_override",
v17,
v9);
}
return 0;
}
}
|
remove_if<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>,string_from(llama_context_const*,llama_batch_const&)::$_0>:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
CALL 0x001f6d60
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001f6c60
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
/* __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >
std::remove_if<__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
string_from(llama_context const*, llama_batch const&)::$_0>(__gnu_cxx::__normal_iterator<char*,
std::__cxx11::string >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
string_from(llama_context const*, llama_batch const&)::$_0) */
int8
std::
remove_if<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>,string_from(llama_context_const*,llama_batch_const&)::__0>
(int8 param_1,int8 param_2)
{
int8 uVar1;
__gnu_cxx::__ops::
__pred_iter<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::__0>();
uVar1 = __remove_if<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_pred<string_from(llama_context_const*,llama_batch_const&)::__0>>
(param_1,param_2);
return uVar1;
}
|
|
18,583
|
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&)
|
monkey531[P]llama/common/common.cpp
|
bool string_parse_kv_override(const char * data, std::vector<llama_model_kv_override> & overrides) {
const char * sep = strchr(data, '=');
if (sep == nullptr || sep - data >= 128) {
LOG_ERR("%s: malformed KV override '%s'\n", __func__, data);
return false;
}
llama_model_kv_override kvo;
std::strncpy(kvo.key, data, sep - data);
kvo.key[sep - data] = 0;
sep++;
if (strncmp(sep, "int:", 4) == 0) {
sep += 4;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_INT;
kvo.val_i64 = std::atol(sep);
} else if (strncmp(sep, "float:", 6) == 0) {
sep += 6;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_FLOAT;
kvo.val_f64 = std::atof(sep);
} else if (strncmp(sep, "bool:", 5) == 0) {
sep += 5;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_BOOL;
if (std::strcmp(sep, "true") == 0) {
kvo.val_bool = true;
} else if (std::strcmp(sep, "false") == 0) {
kvo.val_bool = false;
} else {
LOG_ERR("%s: invalid boolean value for KV override '%s'\n", __func__, data);
return false;
}
} else if (strncmp(sep, "str:", 4) == 0) {
sep += 4;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_STR;
if (strlen(sep) > 127) {
LOG_ERR("%s: malformed KV override '%s', value cannot exceed 127 chars\n", __func__, data);
return false;
}
strncpy(kvo.val_str, sep, 127);
kvo.val_str[127] = '\0';
} else {
LOG_ERR("%s: invalid type for KV override '%s'\n", __func__, data);
return false;
}
overrides.emplace_back(std::move(kvo));
return true;
}
|
O3
|
cpp
|
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp # imm = 0x110
movq %rsi, %r14
movq %rdi, %rbx
movl $0x3d, %esi
callq 0x1a2f0
testq %rax, %rax
je 0x7311c
movq %rax, %r15
movq %rax, %r12
subq %rbx, %r12
cmpq $0x80, %r12
jl 0x73158
leaq 0xb92e5(%rip), %rax # 0x12c408
cmpl $0x0, (%rax)
js 0x73304
callq 0xcb95b
leaq 0x7ac1e(%rip), %rdx # 0xedd56
leaq 0x7ac37(%rip), %rcx # 0xedd76
xorl %ebp, %ebp
movq %rax, %rdi
movl $0x4, %esi
movq %rbx, %r8
xorl %eax, %eax
callq 0xcb9f8
jmp 0x73306
leaq 0xc(%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1a460
movb $0x0, 0xc(%rsp,%r12)
leaq 0x1(%r15), %r12
leaq 0x7ac16(%rip), %rsi # 0xedd8f
movl $0x4, %edx
movq %r12, %rdi
callq 0x1a420
testl %eax, %eax
je 0x731fb
leaq 0x7ac03(%rip), %rsi # 0xedd94
movl $0x6, %edx
movq %r12, %rdi
callq 0x1a420
testl %eax, %eax
je 0x73219
leaq 0x7abf2(%rip), %rsi # 0xedd9b
movl $0x5, %edx
movq %r12, %rdi
callq 0x1a420
testl %eax, %eax
je 0x73274
leaq 0x7ac0c(%rip), %rsi # 0xeddd1
movl $0x4, %edx
movq %r12, %rdi
callq 0x1a420
testl %eax, %eax
je 0x732cb
leaq 0xb9227(%rip), %rax # 0x12c408
cmpl $0x0, (%rax)
js 0x73304
callq 0xcb95b
leaq 0x7ac1f(%rip), %rdx # 0xede15
jmp 0x73138
addq $0x5, %r15
movl $0x0, 0x8(%rsp)
movq %r15, %rdi
callq 0x1aa40
movq %rax, 0x90(%rsp)
jmp 0x73236
addq $0x7, %r15
movl $0x1, 0x8(%rsp)
movq %r15, %rdi
callq 0x1aaa0
movsd %xmm0, 0x90(%rsp)
movq 0x8(%r14), %rax
cmpq 0x10(%r14), %rax
je 0x7325c
leaq 0x8(%rsp), %rsi
movl $0x108, %edx # imm = 0x108
movq %rax, %rdi
callq 0x1a720
addq $0x108, 0x8(%r14) # imm = 0x108
jmp 0x7326c
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0xb8c00
movb $0x1, %bpl
jmp 0x73306
addq $0x6, %r15
movl $0x2, 0x8(%rsp)
leaq 0x729c3(%rip), %rsi # 0xe5c4a
movq %r15, %rdi
callq 0x1ac20
testl %eax, %eax
je 0x73318
leaq 0x75695(%rip), %rsi # 0xe8933
movq %r15, %rdi
callq 0x1ac20
testl %eax, %eax
je 0x73346
leaq 0xb9153(%rip), %rax # 0x12c408
cmpl $0x0, (%rax)
js 0x73304
callq 0xcb95b
leaq 0x7aadb(%rip), %rdx # 0xedda1
jmp 0x73138
addq $0x5, %r15
movl $0x3, 0x8(%rsp)
movq %r15, %rdi
callq 0x1a3d0
cmpq $0x80, %rax
jb 0x73325
leaq 0xb911a(%rip), %rax # 0x12c408
cmpl $0x0, (%rax)
js 0x73304
callq 0xcb95b
leaq 0x7aad7(%rip), %rdx # 0xeddd6
jmp 0x73138
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x90(%rsp)
jmp 0x73236
leaq 0x90(%rsp), %rbx
movl $0x7f, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a460
movb $0x0, 0x7f(%rbx)
jmp 0x73236
movb $0x0, 0x90(%rsp)
jmp 0x73236
|
_Z24string_parse_kv_overridePKcRSt6vectorI23llama_model_kv_overrideSaIS2_EE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 110h
mov r14, rsi
mov rbx, rdi
mov esi, 3Dh ; '='
call _strchr
test rax, rax
jz short loc_7311C
mov r15, rax
mov r12, rax
sub r12, rbx
cmp r12, 80h
jl short loc_73158
loc_7311C:
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_73304
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSMalformedKvOv; "%s: malformed KV override '%s'\n"
loc_73138:
lea rcx, aStringParseKvO; "string_parse_kv_override"
xor ebp, ebp
mov rdi, rax
mov esi, 4
mov r8, rbx
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp loc_73306
loc_73158:
lea rdi, [rsp+138h+var_12C]
mov rsi, rbx
mov rdx, r12
call _strncpy
mov [rsp+r12+138h+var_12C], 0
lea r12, [r15+1]
lea rsi, aInt; "int:"
mov edx, 4
mov rdi, r12
call _strncmp
test eax, eax
jz short loc_731FB
lea rsi, aFloat; "float:"
mov edx, 6
mov rdi, r12
call _strncmp
test eax, eax
jz short loc_73219
lea rsi, aBool; "bool:"
mov edx, 5
mov rdi, r12
call _strncmp
test eax, eax
jz loc_73274
lea rsi, aStr; "str:"
mov edx, 4
mov rdi, r12
call _strncmp
test eax, eax
jz loc_732CB
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_73304
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSInvalidTypeFo; "%s: invalid type for KV override '%s'\n"
jmp loc_73138
loc_731FB:
add r15, 5
mov [rsp+138h+var_130], 0
mov rdi, r15
call _atol
mov [rsp+138h+var_A8], rax
jmp short loc_73236
loc_73219:
add r15, 7
mov [rsp+138h+var_130], 1
mov rdi, r15
call _atof
movsd [rsp+138h+var_A8], xmm0
loc_73236:
mov rax, [r14+8]
cmp rax, [r14+10h]
jz short loc_7325C
lea rsi, [rsp+138h+var_130]
mov edx, 108h
mov rdi, rax
call _memcpy
add qword ptr [r14+8], 108h
jmp short loc_7326C
loc_7325C:
lea rdx, [rsp+138h+var_130]
mov rdi, r14
mov rsi, rax
call _ZNSt6vectorI23llama_model_kv_overrideSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_; std::vector<llama_model_kv_override>::_M_realloc_insert<llama_model_kv_override>(__gnu_cxx::__normal_iterator<llama_model_kv_override*,std::vector<llama_model_kv_override>>,llama_model_kv_override &&)
loc_7326C:
mov bpl, 1
jmp loc_73306
loc_73274:
add r15, 6
mov [rsp+138h+var_130], 2
lea rsi, aTrue; "true"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_73318
lea rsi, aAdvancedOption+0ABh; "false"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_73346
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_73304
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSInvalidBoolea; "%s: invalid boolean value for KV overri"...
jmp loc_73138
loc_732CB:
add r15, 5
mov [rsp+138h+var_130], 3
mov rdi, r15
call _strlen
cmp rax, 80h
jb short loc_73325
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_73304
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSMalformedKvOv_0; "%s: malformed KV override '%s', value c"...
jmp loc_73138
loc_73304:
xor ebp, ebp
loc_73306:
mov eax, ebp
add rsp, 110h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_73318:
mov byte ptr [rsp+138h+var_A8], 1
jmp loc_73236
loc_73325:
lea rbx, [rsp+138h+var_A8]
mov edx, 7Fh
mov rdi, rbx
mov rsi, r15
call _strncpy
mov byte ptr [rbx+7Fh], 0
jmp loc_73236
loc_73346:
mov byte ptr [rsp+138h+var_A8], 0
jmp loc_73236
|
long long string_parse_kv_override(long long a1, long long a2)
{
unsigned int v2; // ebp
long long v3; // rax
long long v4; // r15
long long v5; // r12
int v6; // eax
int v7; // r9d
const char *v8; // rdx
long long v9; // r15
long long v10; // r15
int v12; // [rsp+8h] [rbp-130h] BYREF
_BYTE v13[132]; // [rsp+Ch] [rbp-12Ch] BYREF
long long v14[15]; // [rsp+90h] [rbp-A8h] BYREF
char v15; // [rsp+10Fh] [rbp-29h]
v3 = strchr(a1, 61LL);
if ( !v3 || (v4 = v3, v5 = v3 - a1, v3 - a1 >= 128) )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: malformed KV override '%s'\n";
LABEL_5:
v2 = 0;
common_log_add(v6, 4, (_DWORD)v8, (unsigned int)"string_parse_kv_override", a1, v7);
return v2;
}
return 0;
}
strncpy(v13, a1, v3 - a1);
v13[v5] = 0;
if ( !(unsigned int)strncmp(v4 + 1, "int:", 4LL) )
{
v12 = 0;
v14[0] = atol(v4 + 5);
}
else if ( !(unsigned int)strncmp(v4 + 1, "float:", 6LL) )
{
v12 = 1;
v14[0] = atof(v4 + 7);
}
else if ( !(unsigned int)strncmp(v4 + 1, "bool:", 5LL) )
{
v9 = v4 + 6;
v12 = 2;
if ( !(unsigned int)strcmp(v9, "true") )
{
LOBYTE(v14[0]) = 1;
}
else
{
if ( (unsigned int)strcmp(v9, "false") )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: invalid boolean value for KV override '%s'\n";
goto LABEL_5;
}
return 0;
}
LOBYTE(v14[0]) = 0;
}
}
else
{
if ( (unsigned int)strncmp(v4 + 1, "str:", 4LL) )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: invalid type for KV override '%s'\n";
goto LABEL_5;
}
return 0;
}
v10 = v4 + 5;
v12 = 3;
if ( (unsigned long long)strlen(v10) >= 0x80 )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: malformed KV override '%s', value cannot exceed 127 chars\n";
goto LABEL_5;
}
return 0;
}
strncpy(v14, v10, 127LL);
v15 = 0;
}
if ( *(_QWORD *)(a2 + 8) == *(_QWORD *)(a2 + 16) )
{
std::vector<llama_model_kv_override>::_M_realloc_insert<llama_model_kv_override>(a2, *(_QWORD *)(a2 + 8), &v12);
}
else
{
memcpy(*(_QWORD *)(a2 + 8), &v12, 264LL);
*(_QWORD *)(a2 + 8) += 264LL;
}
LOBYTE(v2) = 1;
return v2;
}
|
string_parse_kv_override:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x110
MOV R14,RSI
MOV RBX,RDI
MOV ESI,0x3d
CALL 0x0011a2f0
TEST RAX,RAX
JZ 0x0017311c
MOV R15,RAX
MOV R12,RAX
SUB R12,RBX
CMP R12,0x80
JL 0x00173158
LAB_0017311c:
LEA RAX,[0x22c408]
CMP dword ptr [RAX],0x0
JS 0x00173304
CALL 0x001cb95b
LEA RDX,[0x1edd56]
LAB_00173138:
LEA RCX,[0x1edd76]
XOR EBP,EBP
MOV RDI,RAX
MOV ESI,0x4
MOV R8,RBX
XOR EAX,EAX
CALL 0x001cb9f8
JMP 0x00173306
LAB_00173158:
LEA RDI,[RSP + 0xc]
MOV RSI,RBX
MOV RDX,R12
CALL 0x0011a460
MOV byte ptr [RSP + R12*0x1 + 0xc],0x0
LEA R12,[R15 + 0x1]
LEA RSI,[0x1edd8f]
MOV EDX,0x4
MOV RDI,R12
CALL 0x0011a420
TEST EAX,EAX
JZ 0x001731fb
LEA RSI,[0x1edd94]
MOV EDX,0x6
MOV RDI,R12
CALL 0x0011a420
TEST EAX,EAX
JZ 0x00173219
LEA RSI,[0x1edd9b]
MOV EDX,0x5
MOV RDI,R12
CALL 0x0011a420
TEST EAX,EAX
JZ 0x00173274
LEA RSI,[0x1eddd1]
MOV EDX,0x4
MOV RDI,R12
CALL 0x0011a420
TEST EAX,EAX
JZ 0x001732cb
LEA RAX,[0x22c408]
CMP dword ptr [RAX],0x0
JS 0x00173304
CALL 0x001cb95b
LEA RDX,[0x1ede15]
JMP 0x00173138
LAB_001731fb:
ADD R15,0x5
MOV dword ptr [RSP + 0x8],0x0
MOV RDI,R15
CALL 0x0011aa40
MOV qword ptr [RSP + 0x90],RAX
JMP 0x00173236
LAB_00173219:
ADD R15,0x7
MOV dword ptr [RSP + 0x8],0x1
MOV RDI,R15
CALL 0x0011aaa0
MOVSD qword ptr [RSP + 0x90],XMM0
LAB_00173236:
MOV RAX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [R14 + 0x10]
JZ 0x0017325c
LEA RSI,[RSP + 0x8]
MOV EDX,0x108
MOV RDI,RAX
CALL 0x0011a720
ADD qword ptr [R14 + 0x8],0x108
JMP 0x0017326c
LAB_0017325c:
LEA RDX,[RSP + 0x8]
MOV RDI,R14
MOV RSI,RAX
CALL 0x001b8c00
LAB_0017326c:
MOV BPL,0x1
JMP 0x00173306
LAB_00173274:
ADD R15,0x6
MOV dword ptr [RSP + 0x8],0x2
LEA RSI,[0x1e5c4a]
MOV RDI,R15
CALL 0x0011ac20
TEST EAX,EAX
JZ 0x00173318
LEA RSI,[0x1e8933]
MOV RDI,R15
CALL 0x0011ac20
TEST EAX,EAX
JZ 0x00173346
LEA RAX,[0x22c408]
CMP dword ptr [RAX],0x0
JS 0x00173304
CALL 0x001cb95b
LEA RDX,[0x1edda1]
JMP 0x00173138
LAB_001732cb:
ADD R15,0x5
MOV dword ptr [RSP + 0x8],0x3
MOV RDI,R15
CALL 0x0011a3d0
CMP RAX,0x80
JC 0x00173325
LEA RAX,[0x22c408]
CMP dword ptr [RAX],0x0
JS 0x00173304
CALL 0x001cb95b
LEA RDX,[0x1eddd6]
JMP 0x00173138
LAB_00173304:
XOR EBP,EBP
LAB_00173306:
MOV EAX,EBP
ADD RSP,0x110
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00173318:
MOV byte ptr [RSP + 0x90],0x1
JMP 0x00173236
LAB_00173325:
LEA RBX,[RSP + 0x90]
MOV EDX,0x7f
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011a460
MOV byte ptr [RBX + 0x7f],0x0
JMP 0x00173236
LAB_00173346:
MOV byte ptr [RSP + 0x90],0x0
JMP 0x00173236
|
/* string_parse_kv_override(char const*, std::vector<llama_model_kv_override,
std::allocator<llama_model_kv_override> >&) */
ulong string_parse_kv_override(char *param_1,vector *param_2)
{
char *__s1;
void *__dest;
int iVar1;
char *pcVar2;
int8 uVar3;
int8 unaff_RBP;
ulong uVar4;
size_t sVar5;
int4 local_130;
char local_12c [132];
double local_a8 [15];
int1 local_29;
pcVar2 = strchr(param_1,0x3d);
if ((pcVar2 == (char *)0x0) || (sVar5 = (long)pcVar2 - (long)param_1, 0x7f < (long)sVar5)) {
if (common_log_verbosity_thold < 0) goto LAB_00173304;
uVar3 = common_log_main();
pcVar2 = "%s: malformed KV override \'%s\'\n";
goto LAB_00173138;
}
strncpy(local_12c,param_1,sVar5);
local_12c[sVar5] = '\0';
__s1 = pcVar2 + 1;
iVar1 = strncmp(__s1,"int:",4);
if (iVar1 == 0) {
local_130 = 0;
local_a8[0] = (double)atol(pcVar2 + 5);
}
else {
iVar1 = strncmp(__s1,"float:",6);
if (iVar1 == 0) {
local_130 = 1;
local_a8[0] = atof(pcVar2 + 7);
}
else {
iVar1 = strncmp(__s1,"bool:",5);
if (iVar1 != 0) {
iVar1 = strncmp(__s1,"str:",4);
if (iVar1 == 0) {
local_130 = 3;
sVar5 = strlen(pcVar2 + 5);
if (sVar5 < 0x80) {
strncpy((char *)local_a8,pcVar2 + 5,0x7f);
local_29 = 0;
goto LAB_00173236;
}
if (common_log_verbosity_thold < 0) goto LAB_00173304;
uVar3 = common_log_main();
pcVar2 = "%s: malformed KV override \'%s\', value cannot exceed 127 chars\n";
}
else {
if (common_log_verbosity_thold < 0) {
LAB_00173304:
uVar4 = 0;
goto LAB_00173306;
}
uVar3 = common_log_main();
pcVar2 = "%s: invalid type for KV override \'%s\'\n";
}
LAB_00173138:
uVar4 = 0;
common_log_add(uVar3,4,pcVar2,"string_parse_kv_override",param_1);
goto LAB_00173306;
}
local_130 = 2;
iVar1 = strcmp(pcVar2 + 6,"true");
if (iVar1 == 0) {
local_a8[0] = (double)CONCAT71(local_a8[0]._1_7_,1);
}
else {
iVar1 = strcmp(pcVar2 + 6,"false");
if (iVar1 != 0) {
if (common_log_verbosity_thold < 0) goto LAB_00173304;
uVar3 = common_log_main();
pcVar2 = "%s: invalid boolean value for KV override \'%s\'\n";
goto LAB_00173138;
}
local_a8[0] = (double)((ulong)local_a8[0] & 0xffffffffffffff00);
}
}
}
LAB_00173236:
__dest = *(void **)(param_2 + 8);
if (__dest == *(void **)(param_2 + 0x10)) {
std::vector<llama_model_kv_override,std::allocator<llama_model_kv_override>>::
_M_realloc_insert<llama_model_kv_override>
((vector<llama_model_kv_override,std::allocator<llama_model_kv_override>> *)param_2,
__dest,&local_130);
}
else {
memcpy(__dest,&local_130,0x108);
*(long *)(param_2 + 8) = *(long *)(param_2 + 8) + 0x108;
}
uVar4 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
LAB_00173306:
return uVar4 & 0xffffffff;
}
|
|
18,584
|
get_charset
|
eloqsql/mysys/charset.c
|
CHARSET_INFO *get_charset(uint cs_number, myf flags)
{
CHARSET_INFO *cs= NULL;
if (cs_number == default_charset_info->number)
return default_charset_info;
my_pthread_once(&charsets_initialized, init_available_charsets);
if (cs_number < array_elements(all_charsets))
{
MY_CHARSET_LOADER loader;
my_charset_loader_init_mysys(&loader);
cs= get_internal_charset(&loader, cs_number, flags);
}
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
cs_string[0]='#';
int10_to_str(cs_number, cs_string+1, 10);
my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file);
}
return cs;
}
|
O3
|
c
|
get_charset:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x238, %rsp # imm = 0x238
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq 0x2e2fca(%rip), %rax # 0x331538
movq (%rax), %r15
cmpl %edi, (%r15)
je 0x4e675
movq %rsi, %r14
movl %edi, %ebx
leaq 0x361eea(%rip), %rdi # 0x3b0470
leaq -0x382(%rip), %rsi # 0x4e20b
callq 0x28350
cmpl $0x7ff, %ebx # imm = 0x7FF
ja 0x4e60a
leaq -0x230(%rbp), %rdi
movb $0x0, (%rdi)
leaq -0xb6d(%rip), %rax # 0x4da3e
movq %rax, 0x80(%rdi)
leaq -0xb6c(%rip), %rax # 0x4da4d
movq %rax, 0x88(%rdi)
leaq -0xb5f(%rip), %rax # 0x4da68
movq %rax, 0x90(%rdi)
leaq 0xcf69(%rip), %rax # 0x5b53e
movq %rax, 0x98(%rdi)
leaq 0x2e2f4d(%rip), %rax # 0x331530
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0xb6e(%rip), %rax # 0x4da86
movq %rax, 0xa8(%rdi)
movl %ebx, %esi
movq %r14, %rdx
callq 0x4e69a
movq %rax, %r15
jmp 0x4e60d
xorl %r15d, %r15d
testq %r15, %r15
setne %al
testb $0x10, %r14b
sete %cl
orb %al, %cl
jne 0x4e675
leaq -0x230(%rbp), %r14
movq %r14, %rdi
callq 0x4dfcb
movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49
movq %rcx, (%rax)
movw $0x6c, 0x8(%rax)
leaq -0x24f(%rbp), %rsi
movb $0x23, -0x1(%rsi)
movl %ebx, %edi
movl $0xa, %edx
callq 0x8edea
xorl %r15d, %r15d
leaq -0x250(%rbp), %rdx
movl $0x4, %esi
movl $0x16, %edi
movq %r14, %rcx
xorl %eax, %eax
callq 0x5907f
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x4e695
movq %r15, %rax
addq $0x238, %rsp # imm = 0x238
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x28430
|
get_charset:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 238h
mov rax, fs:28h
mov [rbp+var_20], rax
lea rax, default_charset_info
mov r15, [rax]
cmp [r15], edi
jz loc_4E675
mov r14, rsi
mov ebx, edi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
cmp ebx, 7FFh
ja short loc_4E60A
lea rdi, [rbp+var_230]
mov byte ptr [rdi], 0
lea rax, my_once_alloc_c
mov [rdi+80h], rax
lea rax, my_malloc_c
mov [rdi+88h], rax
lea rax, my_realloc_c
mov [rdi+90h], rax
lea rax, my_free
mov [rdi+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rdi+0A0h], rax
lea rax, add_collation
mov [rdi+0A8h], rax
mov esi, ebx
mov rdx, r14
call get_internal_charset
mov r15, rax
jmp short loc_4E60D
loc_4E60A:
xor r15d, r15d
loc_4E60D:
test r15, r15
setnz al
test r14b, 10h
setz cl
or cl, al
jnz short loc_4E675
lea r14, [rbp+var_230]
mov rdi, r14
call get_charsets_dir
mov rcx, 6D782E7865646E49h
mov [rax], rcx
mov word ptr [rax+8], 6Ch ; 'l'
lea rsi, [rbp+var_24F]
mov byte ptr [rsi-1], 23h ; '#'
mov edi, ebx
mov edx, 0Ah
call int10_to_str
xor r15d, r15d
lea rdx, [rbp+var_250]
mov esi, 4
mov edi, 16h
mov rcx, r14
xor eax, eax
call my_error
loc_4E675:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_4E695
mov rax, r15
add rsp, 238h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4E695:
call ___stack_chk_fail
|
void * get_charset(unsigned int a1, long long a2)
{
void *internal_charset; // r15
int v3; // r8d
int v4; // r9d
char v6; // [rsp+0h] [rbp-250h] BYREF
_BYTE v7[31]; // [rsp+1h] [rbp-24Fh] BYREF
_BYTE v8[128]; // [rsp+20h] [rbp-230h] BYREF
long long ( *v9)(long long); // [rsp+A0h] [rbp-1B0h]
long long ( *v10)(long long); // [rsp+A8h] [rbp-1A8h]
long long ( *v11)(long long, long long); // [rsp+B0h] [rbp-1A0h]
long long ( *v12)(_QWORD); // [rsp+B8h] [rbp-198h]
long long ( *v13)(); // [rsp+C0h] [rbp-190h]
long long ( *v14)(unsigned int *); // [rsp+C8h] [rbp-188h]
unsigned long long v15; // [rsp+230h] [rbp-20h]
v15 = __readfsqword(0x28u);
internal_charset = default_charset_info;
if ( *(_DWORD *)default_charset_info != a1 )
{
pthread_once(&charsets_initialized, init_available_charsets);
if ( a1 > 0x7FF )
{
internal_charset = 0LL;
}
else
{
v8[0] = 0;
v9 = my_once_alloc_c;
v10 = my_malloc_c;
v11 = my_realloc_c;
v12 = my_free;
v13 = my_charset_error_reporter;
v14 = add_collation;
internal_charset = (void *)get_internal_charset(v8, a1, a2);
}
if ( internal_charset == 0LL && (a2 & 0x10) != 0 )
{
strcpy((char *)get_charsets_dir((long long)v8), "Index.xml");
v6 = 35;
int10_to_str(a1, v7, 10LL);
internal_charset = 0LL;
my_error(22, 4, (unsigned int)&v6, (unsigned int)v8, v3, v4);
}
}
return internal_charset;
}
|
get_charset:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x238
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[0x431538]
MOV R15,qword ptr [RAX]
CMP dword ptr [R15],EDI
JZ 0x0014e675
MOV R14,RSI
MOV EBX,EDI
LEA RDI,[0x4b0470]
LEA RSI,[0x14e20b]
CALL 0x00128350
CMP EBX,0x7ff
JA 0x0014e60a
LEA RDI,[RBP + -0x230]
MOV byte ptr [RDI],0x0
LEA RAX,[0x14da3e]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x14da4d]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x14da68]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x15b53e]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x431530]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x14da86]
MOV qword ptr [RDI + 0xa8],RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x0014e69a
MOV R15,RAX
JMP 0x0014e60d
LAB_0014e60a:
XOR R15D,R15D
LAB_0014e60d:
TEST R15,R15
SETNZ AL
TEST R14B,0x10
SETZ CL
OR CL,AL
JNZ 0x0014e675
LEA R14,[RBP + -0x230]
MOV RDI,R14
CALL 0x0014dfcb
MOV RCX,0x6d782e7865646e49
MOV qword ptr [RAX],RCX
MOV word ptr [RAX + 0x8],0x6c
LEA RSI,[RBP + -0x24f]
MOV byte ptr [RSI + -0x1],0x23
MOV EDI,EBX
MOV EDX,0xa
CALL 0x0018edea
XOR R15D,R15D
LEA RDX,[RBP + -0x250]
MOV ESI,0x4
MOV EDI,0x16
MOV RCX,R14
XOR EAX,EAX
CALL 0x0015907f
LAB_0014e675:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0014e695
MOV RAX,R15
ADD RSP,0x238
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0014e695:
CALL 0x00128430
|
int * get_charset(uint param_1,ulong param_2)
{
int *puVar1;
int8 *puVar2;
long in_FS_OFFSET;
int1 local_258;
int1 local_257 [31];
int1 local_238 [128];
code *local_1b8;
code *local_1b0;
code *local_1a8;
code *local_1a0;
int *local_198;
code *local_190;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
puVar1 = default_charset_info;
if (*(uint *)default_charset_info != param_1) {
pthread_once(&charsets_initialized,init_available_charsets);
if (param_1 < 0x800) {
local_238[0] = 0;
local_1b8 = my_once_alloc_c;
local_1b0 = my_malloc_c;
local_1a8 = my_realloc_c;
local_1a0 = my_free;
local_198 = my_charset_error_reporter;
local_190 = add_collation;
puVar1 = (int *)get_internal_charset(local_238,param_1,param_2);
}
else {
puVar1 = (int *)0x0;
}
if ((param_2 & 0x10) != 0 && puVar1 == (int *)0x0) {
puVar2 = (int8 *)get_charsets_dir(local_238);
*puVar2 = 0x6d782e7865646e49;
*(int2 *)(puVar2 + 1) = 0x6c;
local_258 = 0x23;
int10_to_str(param_1,local_257,10);
puVar1 = (int *)0x0;
my_error(0x16,4,&local_258,local_238);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return puVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
18,585
|
string_from[abi:cxx11](llama_context const*, std::vector<int, std::allocator<int>> const&)
|
monkey531[P]llama/common/common.cpp
|
std::string string_from(const struct llama_context * ctx, const std::vector<llama_token> & tokens) {
std::stringstream buf;
buf << "[ ";
bool first = true;
for (const auto & token : tokens) {
if (!first) {
buf << ", ";
} else {
first = false;
}
auto detokenized = common_token_to_piece(ctx, token);
detokenized.erase(
std::remove_if(
detokenized.begin(),
detokenized.end(),
[](const unsigned char c) { return !std::isprint(c); }),
detokenized.end());
buf << "'" << detokenized << "'"
<< ":" << std::to_string(token);
}
buf << " ]";
return buf.str();
}
|
O1
|
cpp
|
string_from[abi:cxx11](llama_context const*, std::vector<int, std::allocator<int>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp # imm = 0x1E8
movq %rdx, %rbx
movq %rsi, 0x58(%rsp)
movq %rdi, 0x48(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x1a630
leaq 0x70(%rsp), %r14
leaq 0x7e1e6(%rip), %rsi # 0xefdef
movl $0x2, %edx
movq %r14, %rdi
callq 0x1a9d0
movq (%rbx), %r13
movq 0x8(%rbx), %rax
movq %rax, 0x50(%rsp)
cmpq %rax, %r13
je 0x71edb
movb $0x1, %al
movl %eax, 0x4(%rsp)
testb $0x1, 0x4(%rsp)
je 0x71c42
movl $0x0, 0x4(%rsp)
jmp 0x71c56
movl $0x2, %edx
movq %r14, %rdi
leaq 0x7eb42(%rip), %rsi # 0xf0793
callq 0x1a9d0
movl (%r13), %ebx
movq 0x58(%rsp), %rdi
callq 0x1a780
movq %rax, %rdi
callq 0x1b120
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
movl %ebx, %edx
movl $0x1, %ecx
callq 0x74e95
movq 0x8(%rsp), %r12
movq 0x10(%rsp), %r14
leaq (%r12,%r14), %rbx
movq %r14, %rbp
sarq $0x2, %rbp
testq %rbp, %rbp
jle 0x71cfa
andq $-0x4, %r14
addq %r12, %r14
incq %rbp
addq $0x3, %r12
movq %r12, %r15
movzbl -0x3(%r15), %edi
callq 0x1af80
testl %eax, %eax
je 0x71d4c
movzbl -0x2(%r15), %edi
callq 0x1af80
testl %eax, %eax
je 0x71d52
movzbl -0x1(%r15), %edi
callq 0x1af80
testl %eax, %eax
je 0x71d58
movzbl (%r15), %edi
callq 0x1af80
testl %eax, %eax
je 0x71d5b
decq %rbp
addq $0x4, %r15
cmpq $0x1, %rbp
jg 0x71cab
movq %r14, %r12
movq %rbx, %rax
subq %r12, %rax
cmpq $0x1, %rax
je 0x71d37
cmpq $0x2, %rax
je 0x71d26
movq %rbx, %r15
cmpq $0x3, %rax
jne 0x71d5b
movzbl (%r12), %edi
callq 0x1af80
testl %eax, %eax
je 0x71d47
incq %r12
movzbl (%r12), %edi
callq 0x1af80
testl %eax, %eax
je 0x71d47
incq %r12
movzbl (%r12), %edi
callq 0x1af80
testl %eax, %eax
cmovneq %rbx, %r12
movq %r12, %r15
jmp 0x71d5b
addq $-0x3, %r15
jmp 0x71d5b
addq $-0x2, %r15
jmp 0x71d5b
decq %r15
cmpq %rbx, %r15
sete %al
leaq 0x1(%r15), %r14
cmpq %rbx, %r14
sete %cl
orb %al, %cl
jne 0x71d8d
movb (%r14), %bpl
movzbl %bpl, %edi
callq 0x1af80
testl %eax, %eax
je 0x71d85
movb %bpl, (%r15)
incq %r15
incq %r14
cmpq %rbx, %r14
jne 0x71d6f
movq %r15, %rax
subq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movb $0x0, (%r15)
movl $0x1, %edx
leaq 0x70(%rsp), %r14
movq %r14, %rdi
leaq 0x7d0b9(%rip), %rsi # 0xeee6b
callq 0x1a9d0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x1a9d0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x7d090(%rip), %rsi # 0xeee6b
callq 0x1a9d0
movl $0x1, %edx
movq %r12, %rdi
leaq 0x7eaef(%rip), %rsi # 0xf08de
callq 0x1a9d0
movl (%r13), %ebp
movl %ebp, %ebx
negl %ebx
cmovsl %ebp, %ebx
movl $0x1, %r15d
cmpl $0xa, %ebx
jb 0x71e50
movl $0x4, %r15d
movl %ebx, %eax
cmpl $0x63, %eax
jbe 0x71e47
cmpl $0x3e7, %eax # imm = 0x3E7
jbe 0x71e4d
cmpl $0x2710, %eax # imm = 0x2710
jb 0x71e50
movl %eax, %ecx
movl $0xd1b71759, %edx # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r15d
cmpl $0x1869f, %eax # imm = 0x1869F
movl %ecx, %eax
ja 0x71e12
addl $-0x3, %r15d
jmp 0x71e50
addl $-0x2, %r15d
jmp 0x71e50
decl %r15d
shrl $0x1f, %ebp
leal (%r15,%rbp), %esi
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rdi
movl $0x2d, %edx
callq 0x1aa00
addq 0x28(%rsp), %rbp
movq %rbp, %rdi
movl %r15d, %esi
movl %ebx, %edx
callq 0x57cd5
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r12, %rdi
callq 0x1a9d0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x71eb0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8b0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x71ecc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8b0
addq $0x4, %r13
cmpq 0x50(%rsp), %r13
jne 0x71c31
leaq 0x7df10(%rip), %rsi # 0xefdf2
movl $0x2, %edx
movq %r14, %rdi
callq 0x1a9d0
movq 0x48(%rsp), %rbx
leaq 0x78(%rsp), %rsi
movq %rbx, %rdi
callq 0x1ad80
movq 0xbb020(%rip), %rsi # 0x12cf28
leaq 0x60(%rsp), %rdi
callq 0x1a670
leaq 0xe0(%rsp), %rdi
callq 0x1a2a0
movq %rbx, %rax
addq $0x1e8, %rsp # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x71f5d
jmp 0x71f5d
jmp 0x71f5d
jmp 0x71f62
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x71f65
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8b0
jmp 0x71f65
movq %rax, %rbx
jmp 0x71f81
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x71f81
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8b0
movq 0xbafa0(%rip), %rsi # 0x12cf28
leaq 0x60(%rsp), %rdi
callq 0x1a670
leaq 0xe0(%rsp), %rdi
callq 0x1a2a0
movq %rbx, %rdi
callq 0x1af70
|
_Z11string_fromB5cxx11PK13llama_contextRKSt6vectorIiSaIiEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1E8h
mov rbx, rdx
mov [rsp+218h+var_1C0], rsi
mov [rsp+218h+var_1D0], rdi
lea rdi, [rsp+218h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea r14, [rsp+218h+var_1A8]
lea rsi, asc_EFDEF; "[ "
mov edx, 2
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r13, [rbx]
mov rax, [rbx+8]
mov [rsp+218h+var_1C8], rax
cmp r13, rax
jz loc_71EDB
mov al, 1
mov [rsp+218h+var_214], eax
loc_71C31:
test byte ptr [rsp+218h+var_214], 1
jz short loc_71C42
mov [rsp+218h+var_214], 0
jmp short loc_71C56
loc_71C42:
mov edx, 2
mov rdi, r14
lea rsi, aZuD+6; ", "
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_71C56:
mov ebx, [r13+0]
mov rdi, [rsp+218h+var_1C0]
call _llama_get_model
mov rdi, rax
call _llama_model_get_vocab
lea rdi, [rsp+218h+var_210]
mov rsi, rax
mov edx, ebx
mov ecx, 1
call _Z21common_token_to_pieceB5cxx11PK11llama_vocabib; common_token_to_piece(llama_vocab const*,int,bool)
mov r12, [rsp+218h+var_210]
mov r14, [rsp+218h+var_208]
lea rbx, [r12+r14]
mov rbp, r14
sar rbp, 2
test rbp, rbp
jle short loc_71CFA
and r14, 0FFFFFFFFFFFFFFFCh
add r14, r12
inc rbp
add r12, 3
mov r15, r12
loc_71CAB:
movzx edi, byte ptr [r15-3]
call _isprint
test eax, eax
jz loc_71D4C
movzx edi, byte ptr [r15-2]
call _isprint
test eax, eax
jz loc_71D52
movzx edi, byte ptr [r15-1]
call _isprint
test eax, eax
jz short loc_71D58
movzx edi, byte ptr [r15]
call _isprint
test eax, eax
jz short loc_71D5B
dec rbp
add r15, 4
cmp rbp, 1
jg short loc_71CAB
mov r12, r14
loc_71CFA:
mov rax, rbx
sub rax, r12
cmp rax, 1
jz short loc_71D37
cmp rax, 2
jz short loc_71D26
mov r15, rbx
cmp rax, 3
jnz short loc_71D5B
movzx edi, byte ptr [r12]
call _isprint
test eax, eax
jz short loc_71D47
inc r12
loc_71D26:
movzx edi, byte ptr [r12]
call _isprint
test eax, eax
jz short loc_71D47
inc r12
loc_71D37:
movzx edi, byte ptr [r12]
call _isprint
test eax, eax
cmovnz r12, rbx
loc_71D47:
mov r15, r12
jmp short loc_71D5B
loc_71D4C:
add r15, 0FFFFFFFFFFFFFFFDh
jmp short loc_71D5B
loc_71D52:
add r15, 0FFFFFFFFFFFFFFFEh
jmp short loc_71D5B
loc_71D58:
dec r15
loc_71D5B:
cmp r15, rbx
setz al
lea r14, [r15+1]
cmp r14, rbx
setz cl
or cl, al
jnz short loc_71D8D
loc_71D6F:
mov bpl, [r14]
movzx edi, bpl
call _isprint
test eax, eax
jz short loc_71D85
mov [r15], bpl
inc r15
loc_71D85:
inc r14
cmp r14, rbx
jnz short loc_71D6F
loc_71D8D:
mov rax, r15
sub rax, [rsp+218h+var_210]
mov [rsp+218h+var_208], rax
mov byte ptr [r15], 0
mov edx, 1
lea r14, [rsp+218h+var_1A8]
mov rdi, r14
lea rsi, asc_EEE69+2; "'"
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rsp+218h+var_210]
mov rdx, [rsp+218h+var_208]
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r12, rax
mov edx, 1
mov rdi, rax
lea rsi, asc_EEE69+2; "'"
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov edx, 1
mov rdi, r12
lea rsi, aArgumentNeedle_0+11h; ":"
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov ebp, [r13+0]
mov ebx, ebp
neg ebx
cmovs ebx, ebp
mov r15d, 1
cmp ebx, 0Ah
jb short loc_71E50
mov r15d, 4
mov eax, ebx
loc_71E12:
cmp eax, 63h ; 'c'
jbe short loc_71E47
cmp eax, 3E7h
jbe short loc_71E4D
cmp eax, 2710h
jb short loc_71E50
mov ecx, eax
mov edx, 0D1B71759h
imul rcx, rdx
shr rcx, 2Dh
add r15d, 4
cmp eax, 1869Fh
mov eax, ecx
ja short loc_71E12
add r15d, 0FFFFFFFDh
jmp short loc_71E50
loc_71E47:
add r15d, 0FFFFFFFEh
jmp short loc_71E50
loc_71E4D:
dec r15d
loc_71E50:
shr ebp, 1Fh
lea esi, [r15+rbp]
lea rax, [rsp+218h+var_1E0]
mov [rsp+218h+var_1F0], rax
lea rdi, [rsp+218h+var_1F0]
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
add rbp, [rsp+218h+var_1F0]
mov rdi, rbp
mov esi, r15d
mov edx, ebx
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
mov rsi, [rsp+218h+var_1F0]
mov rdx, [rsp+218h+var_1E8]
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+218h+var_1F0]; void *
lea rax, [rsp+218h+var_1E0]
cmp rdi, rax
jz short loc_71EB0
mov rsi, [rsp+218h+var_1E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_71EB0:
mov rdi, [rsp+218h+var_210]; void *
lea rax, [rsp+218h+var_200]
cmp rdi, rax
jz short loc_71ECC
mov rsi, [rsp+218h+var_200]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_71ECC:
add r13, 4
cmp r13, [rsp+218h+var_1C8]
jnz loc_71C31
loc_71EDB:
lea rsi, asc_EFDF2; " ]"
mov edx, 2
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, [rsp+218h+var_1D0]
lea rsi, [rsp+218h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+218h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+218h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 1E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_71F5D
jmp short loc_71F5D
jmp short loc_71F5D
jmp short loc_71F62
mov rbx, rax
mov rdi, [rsp+arg_20]; void *
lea rax, [rsp+arg_30]
cmp rdi, rax
jz short loc_71F65
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_71F65
loc_71F5D:
mov rbx, rax
jmp short loc_71F81
loc_71F62:
mov rbx, rax
loc_71F65:
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
cmp rdi, rax
jz short loc_71F81
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_71F81:
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_58]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+arg_D8]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
long long string_from[abi:cxx11](long long a1, long long a2, unsigned int **a3)
{
unsigned int *v4; // r13
unsigned int v5; // ebx
long long model; // rax
long long vocab; // rax
char *v8; // r12
char *v9; // rbx
char *v10; // r14
long long v11; // rbp
char *v12; // r15
signed long long v13; // rax
char *v14; // r14
char v15; // bp
long long v16; // r12
unsigned int v17; // ebx
int v18; // r15d
unsigned int v19; // eax
bool v20; // cc
unsigned int v21; // ebp
long long v22; // rbx
char v24; // [rsp+4h] [rbp-214h]
void *v25; // [rsp+8h] [rbp-210h] BYREF
long long v26; // [rsp+10h] [rbp-208h]
long long v27; // [rsp+18h] [rbp-200h] BYREF
void *v28[2]; // [rsp+28h] [rbp-1F0h] BYREF
_QWORD v29[2]; // [rsp+38h] [rbp-1E0h] BYREF
long long v30; // [rsp+48h] [rbp-1D0h]
unsigned int *v31; // [rsp+50h] [rbp-1C8h]
long long v32; // [rsp+58h] [rbp-1C0h]
_BYTE v33[16]; // [rsp+60h] [rbp-1B8h] BYREF
char v34[8]; // [rsp+70h] [rbp-1A8h] BYREF
char v35[104]; // [rsp+78h] [rbp-1A0h] BYREF
char v36[312]; // [rsp+E0h] [rbp-138h] BYREF
v32 = a2;
v30 = a1;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v33);
std::__ostream_insert<char,std::char_traits<char>>(v34, "[ ", 2LL);
v4 = *a3;
v31 = a3[1];
if ( v4 != v31 )
{
v24 = 1;
while ( 1 )
{
if ( (v24 & 1) != 0 )
v24 = 0;
else
std::__ostream_insert<char,std::char_traits<char>>(v34, ", ", 2LL);
v5 = *v4;
model = llama_get_model(v32);
vocab = llama_model_get_vocab(model);
common_token_to_piece[abi:cxx11](&v25, vocab, v5, 1LL);
v8 = (char *)v25;
v9 = (char *)v25 + v26;
if ( v26 >> 2 > 0 )
{
v10 = (char *)v25 + (v26 & 0xFFFFFFFFFFFFFFFCLL);
v11 = (v26 >> 2) + 1;
v12 = (char *)v25 + 3;
while ( 1 )
{
if ( !(unsigned int)isprint((unsigned __int8)*(v12 - 3)) )
{
v12 -= 3;
goto LABEL_27;
}
if ( !(unsigned int)isprint((unsigned __int8)*(v12 - 2)) )
{
v12 -= 2;
goto LABEL_27;
}
if ( !(unsigned int)isprint((unsigned __int8)*(v12 - 1)) )
break;
if ( !(unsigned int)isprint((unsigned __int8)*v12) )
goto LABEL_27;
--v11;
v12 += 4;
if ( v11 <= 1 )
{
v8 = v10;
goto LABEL_14;
}
}
--v12;
goto LABEL_27;
}
LABEL_14:
v13 = v9 - v8;
if ( v9 - v8 == 1 )
goto LABEL_21;
if ( v13 == 2 )
goto LABEL_19;
v12 = v9;
if ( v13 == 3 )
break;
LABEL_27:
v14 = v12 + 1;
if ( v12 != v9 && v12 + 1 != v9 )
{
do
{
v15 = *v14;
if ( (unsigned int)isprint((unsigned __int8)*v14) )
*v12++ = v15;
++v14;
}
while ( v14 != v9 );
}
v26 = v12 - (_BYTE *)v25;
*v12 = 0;
std::__ostream_insert<char,std::char_traits<char>>(v34, "'", 1LL);
v16 = std::__ostream_insert<char,std::char_traits<char>>(v34, v25, v26);
std::__ostream_insert<char,std::char_traits<char>>(v16, "'", 1LL);
std::__ostream_insert<char,std::char_traits<char>>(v16, ":", 1LL);
v17 = -*v4;
if ( (int)*v4 > 0 )
v17 = *v4;
v18 = 1;
if ( v17 >= 0xA )
{
v18 = 4;
v19 = v17;
while ( 1 )
{
if ( v19 <= 0x63 )
{
v18 -= 2;
goto LABEL_42;
}
if ( v19 <= 0x3E7 )
break;
if ( v19 < 0x2710 )
goto LABEL_42;
v18 += 4;
v20 = v19 <= 0x1869F;
v19 /= 0x2710u;
if ( v20 )
{
v18 -= 3;
goto LABEL_42;
}
}
--v18;
}
LABEL_42:
v21 = *v4 >> 31;
v28[0] = v29;
std::string::_M_construct(v28, v18 + v21, 45LL);
std::__detail::__to_chars_10_impl<unsigned int>((char *)v28[0] + v21, v18, v17);
std::__ostream_insert<char,std::char_traits<char>>(v16, v28[0], v28[1]);
if ( v28[0] != v29 )
operator delete(v28[0], v29[0] + 1LL);
if ( v25 != &v27 )
operator delete(v25, v27 + 1);
if ( ++v4 == v31 )
goto LABEL_47;
}
if ( (unsigned int)isprint((unsigned __int8)*v8) )
{
++v8;
LABEL_19:
if ( (unsigned int)isprint((unsigned __int8)*v8) )
{
++v8;
LABEL_21:
if ( (unsigned int)isprint((unsigned __int8)*v8) )
v8 = v9;
}
}
v12 = v8;
goto LABEL_27;
}
LABEL_47:
std::__ostream_insert<char,std::char_traits<char>>(v34, " ]", 2LL);
v22 = v30;
std::stringbuf::str(v30, v35);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v33,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v36);
return v22;
}
|
string_from[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1e8
MOV RBX,RDX
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x48],RDI
LEA RDI,[RSP + 0x60]
CALL 0x0011a630
LEA R14,[RSP + 0x70]
LAB_00171c02:
LEA RSI,[0x1efdef]
MOV EDX,0x2
MOV RDI,R14
CALL 0x0011a9d0
MOV R13,qword ptr [RBX]
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RSP + 0x50],RAX
CMP R13,RAX
JZ 0x00171edb
MOV AL,0x1
MOV dword ptr [RSP + 0x4],EAX
LAB_00171c31:
TEST byte ptr [RSP + 0x4],0x1
JZ 0x00171c42
MOV dword ptr [RSP + 0x4],0x0
JMP 0x00171c56
LAB_00171c42:
MOV EDX,0x2
MOV RDI,R14
LEA RSI,[0x1f0793]
CALL 0x0011a9d0
LAB_00171c56:
MOV EBX,dword ptr [R13]
LAB_00171c5a:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x0011a780
MOV RDI,RAX
CALL 0x0011b120
LEA RDI,[RSP + 0x8]
MOV RSI,RAX
MOV EDX,EBX
MOV ECX,0x1
CALL 0x00174e95
MOV R12,qword ptr [RSP + 0x8]
MOV R14,qword ptr [RSP + 0x10]
LEA RBX,[R12 + R14*0x1]
MOV RBP,R14
SAR RBP,0x2
TEST RBP,RBP
JLE 0x00171cfa
AND R14,-0x4
ADD R14,R12
INC RBP
ADD R12,0x3
MOV R15,R12
LAB_00171cab:
MOVZX EDI,byte ptr [R15 + -0x3]
CALL 0x0011af80
TEST EAX,EAX
JZ 0x00171d4c
MOVZX EDI,byte ptr [R15 + -0x2]
CALL 0x0011af80
TEST EAX,EAX
JZ 0x00171d52
MOVZX EDI,byte ptr [R15 + -0x1]
CALL 0x0011af80
TEST EAX,EAX
JZ 0x00171d58
MOVZX EDI,byte ptr [R15]
CALL 0x0011af80
TEST EAX,EAX
JZ 0x00171d5b
DEC RBP
ADD R15,0x4
CMP RBP,0x1
JG 0x00171cab
MOV R12,R14
LAB_00171cfa:
MOV RAX,RBX
SUB RAX,R12
CMP RAX,0x1
JZ 0x00171d37
CMP RAX,0x2
JZ 0x00171d26
MOV R15,RBX
CMP RAX,0x3
JNZ 0x00171d5b
MOVZX EDI,byte ptr [R12]
CALL 0x0011af80
TEST EAX,EAX
JZ 0x00171d47
INC R12
LAB_00171d26:
MOVZX EDI,byte ptr [R12]
CALL 0x0011af80
TEST EAX,EAX
JZ 0x00171d47
INC R12
LAB_00171d37:
MOVZX EDI,byte ptr [R12]
CALL 0x0011af80
TEST EAX,EAX
CMOVNZ R12,RBX
LAB_00171d47:
MOV R15,R12
JMP 0x00171d5b
LAB_00171d4c:
ADD R15,-0x3
JMP 0x00171d5b
LAB_00171d52:
ADD R15,-0x2
JMP 0x00171d5b
LAB_00171d58:
DEC R15
LAB_00171d5b:
CMP R15,RBX
SETZ AL
LEA R14,[R15 + 0x1]
CMP R14,RBX
SETZ CL
OR CL,AL
JNZ 0x00171d8d
LAB_00171d6f:
MOV BPL,byte ptr [R14]
MOVZX EDI,BPL
CALL 0x0011af80
TEST EAX,EAX
JZ 0x00171d85
MOV byte ptr [R15],BPL
INC R15
LAB_00171d85:
INC R14
CMP R14,RBX
JNZ 0x00171d6f
LAB_00171d8d:
MOV RAX,R15
SUB RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV byte ptr [R15],0x0
LAB_00171d9e:
MOV EDX,0x1
LEA R14,[RSP + 0x70]
MOV RDI,R14
LEA RSI,[0x1eee6b]
CALL 0x0011a9d0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
MOV RDI,R14
CALL 0x0011a9d0
MOV R12,RAX
MOV EDX,0x1
MOV RDI,RAX
LEA RSI,[0x1eee6b]
CALL 0x0011a9d0
MOV EDX,0x1
MOV RDI,R12
LEA RSI,[0x1f08de]
CALL 0x0011a9d0
MOV EBP,dword ptr [R13]
MOV EBX,EBP
NEG EBX
CMOVS EBX,EBP
MOV R15D,0x1
CMP EBX,0xa
JC 0x00171e50
MOV R15D,0x4
MOV EAX,EBX
LAB_00171e12:
CMP EAX,0x63
JBE 0x00171e47
CMP EAX,0x3e7
JBE 0x00171e4d
CMP EAX,0x2710
JC 0x00171e50
MOV ECX,EAX
MOV EDX,0xd1b71759
IMUL RCX,RDX
SHR RCX,0x2d
ADD R15D,0x4
CMP EAX,0x1869f
MOV EAX,ECX
JA 0x00171e12
ADD R15D,-0x3
JMP 0x00171e50
LAB_00171e47:
ADD R15D,-0x2
JMP 0x00171e50
LAB_00171e4d:
DEC R15D
LAB_00171e50:
SHR EBP,0x1f
LEA ESI,[R15 + RBP*0x1]
LEA RAX,[RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
LAB_00171e61:
LEA RDI,[RSP + 0x28]
MOV EDX,0x2d
CALL 0x0011aa00
ADD RBP,qword ptr [RSP + 0x28]
MOV RDI,RBP
MOV ESI,R15D
MOV EDX,EBX
CALL 0x00157cd5
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
LAB_00171e8c:
MOV RDI,R12
CALL 0x0011a9d0
MOV RDI,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x38]
CMP RDI,RAX
JZ 0x00171eb0
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011a8b0
LAB_00171eb0:
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x00171ecc
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a8b0
LAB_00171ecc:
ADD R13,0x4
CMP R13,qword ptr [RSP + 0x50]
JNZ 0x00171c31
LAB_00171edb:
LEA RSI,[0x1efdf2]
MOV EDX,0x2
MOV RDI,R14
CALL 0x0011a9d0
MOV RBX,qword ptr [RSP + 0x48]
LEA RSI,[RSP + 0x78]
MOV RDI,RBX
CALL 0x0011ad80
LAB_00171f01:
MOV RSI,qword ptr [0x0022cf28]
LEA RDI,[RSP + 0x60]
CALL 0x0011a670
LEA RDI,[RSP + 0xe0]
CALL 0x0011a2a0
MOV RAX,RBX
ADD RSP,0x1e8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_from[abi:cxx11](llama_context const*, std::vector<int, std::allocator<int> > const&) */
llama_context * string_from_abi_cxx11_(llama_context *param_1,vector *param_2)
{
byte *pbVar1;
byte bVar2;
uint uVar3;
uint uVar4;
llama_context *plVar5;
uint uVar6;
bool bVar7;
int iVar8;
uint uVar9;
int8 uVar10;
ostream *poVar11;
ulong uVar12;
int8 *in_RDX;
long lVar13;
byte *pbVar14;
uint *puVar15;
byte *pbVar16;
uint uVar17;
byte *local_210;
ulong local_208;
long local_200 [2];
long *local_1f0;
long local_1e8;
long local_1e0 [2];
llama_context *local_1d0;
uint *local_1c8;
vector *local_1c0;
stringstream local_1b8 [16];
ostream local_1a8 [112];
ios_base local_138 [264];
local_1d0 = param_1;
local_1c0 = param_2;
std::__cxx11::stringstream::stringstream(local_1b8);
/* try { // try from 00171c02 to 00171c15 has its CatchHandler @ 00171f34 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"[ ",2);
puVar15 = (uint *)*in_RDX;
local_1c8 = (uint *)in_RDX[1];
if (puVar15 != local_1c8) {
bVar7 = true;
do {
if (bVar7) {
bVar7 = false;
}
else {
/* try { // try from 00171c42 to 00171c55 has its CatchHandler @ 00171f38 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,", ",2);
}
uVar3 = *puVar15;
/* try { // try from 00171c5a to 00171c7f has its CatchHandler @ 00171f5d */
uVar10 = llama_get_model(local_1c0);
iVar8 = llama_model_get_vocab(uVar10);
common_token_to_piece_abi_cxx11_((llama_vocab *)&local_210,iVar8,SUB41(uVar3,0));
pbVar1 = local_210 + local_208;
pbVar16 = local_210;
if (0 < (long)local_208 >> 2) {
pbVar16 = local_210 + (local_208 & 0xfffffffffffffffc);
lVar13 = ((long)local_208 >> 2) + 1;
pbVar14 = local_210 + 3;
do {
iVar8 = isprint((uint)pbVar14[-3]);
if (iVar8 == 0) {
pbVar14 = pbVar14 + -3;
goto LAB_00171d5b;
}
iVar8 = isprint((uint)pbVar14[-2]);
if (iVar8 == 0) {
pbVar14 = pbVar14 + -2;
goto LAB_00171d5b;
}
iVar8 = isprint((uint)pbVar14[-1]);
if (iVar8 == 0) {
pbVar14 = pbVar14 + -1;
goto LAB_00171d5b;
}
iVar8 = isprint((uint)*pbVar14);
if (iVar8 == 0) goto LAB_00171d5b;
lVar13 = lVar13 + -1;
pbVar14 = pbVar14 + 4;
} while (1 < lVar13);
}
lVar13 = (long)pbVar1 - (long)pbVar16;
if (lVar13 == 1) {
LAB_00171d37:
iVar8 = isprint((uint)*pbVar16);
pbVar14 = pbVar16;
if (iVar8 != 0) {
pbVar14 = pbVar1;
}
}
else if (lVar13 == 2) {
LAB_00171d26:
iVar8 = isprint((uint)*pbVar16);
pbVar14 = pbVar16;
if (iVar8 != 0) {
pbVar16 = pbVar16 + 1;
goto LAB_00171d37;
}
}
else {
pbVar14 = pbVar1;
if ((lVar13 == 3) && (iVar8 = isprint((uint)*pbVar16), pbVar14 = pbVar16, iVar8 != 0)) {
pbVar16 = pbVar16 + 1;
goto LAB_00171d26;
}
}
LAB_00171d5b:
pbVar16 = pbVar14 + 1;
if (pbVar16 != pbVar1 && pbVar14 != pbVar1) {
do {
bVar2 = *pbVar16;
iVar8 = isprint((uint)bVar2);
if (iVar8 != 0) {
*pbVar14 = bVar2;
pbVar14 = pbVar14 + 1;
}
pbVar16 = pbVar16 + 1;
} while (pbVar16 != pbVar1);
}
local_208 = (long)pbVar14 - (long)local_210;
*pbVar14 = 0;
/* try { // try from 00171d9e to 00171df3 has its CatchHandler @ 00171f62 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"\'",1);
poVar11 = std::__ostream_insert<char,std::char_traits<char>>
(local_1a8,(char *)local_210,local_208);
std::__ostream_insert<char,std::char_traits<char>>(poVar11,"\'",1);
std::__ostream_insert<char,std::char_traits<char>>(poVar11,":",1);
uVar3 = *puVar15;
uVar4 = -uVar3;
if (0 < (int)uVar3) {
uVar4 = uVar3;
}
uVar17 = 1;
if (9 < uVar4) {
uVar12 = (ulong)uVar4;
uVar6 = 4;
do {
uVar17 = uVar6;
uVar9 = (uint)uVar12;
if (uVar9 < 100) {
uVar17 = uVar17 - 2;
goto LAB_00171e50;
}
if (uVar9 < 1000) {
uVar17 = uVar17 - 1;
goto LAB_00171e50;
}
if (uVar9 < 10000) goto LAB_00171e50;
uVar12 = uVar12 / 10000;
uVar6 = uVar17 + 4;
} while (99999 < uVar9);
uVar17 = uVar17 + 1;
}
LAB_00171e50:
local_1f0 = local_1e0;
/* try { // try from 00171e61 to 00171e6f has its CatchHandler @ 00171f3a */
std::__cxx11::string::_M_construct
((ulong)&local_1f0,(char)uVar17 - (char)((int)uVar3 >> 0x1f));
std::__detail::__to_chars_10_impl<unsigned_int>
((char *)((long)local_1f0 + (ulong)(uVar3 >> 0x1f)),uVar17,uVar4);
/* try { // try from 00171e8c to 00171e93 has its CatchHandler @ 00171f3c */
std::__ostream_insert<char,std::char_traits<char>>(poVar11,(char *)local_1f0,local_1e8);
if (local_1f0 != local_1e0) {
operator_delete(local_1f0,local_1e0[0] + 1);
}
if (local_210 != (byte *)local_200) {
operator_delete(local_210,local_200[0] + 1);
}
puVar15 = puVar15 + 1;
} while (puVar15 != local_1c8);
}
/* try { // try from 00171edb to 00171f00 has its CatchHandler @ 00171f36 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8," ]",2);
plVar5 = local_1d0;
std::__cxx11::stringbuf::str();
std::__cxx11::stringstream::~stringstream(local_1b8);
std::ios_base::~ios_base(local_138);
return plVar5;
}
|
|
18,586
|
my_mb_wc_utf8mb4_quick
|
eloqsql/strings/ctype-utf8.h
|
static inline int
my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0x80)
{
*pwc= c;
return 1;
}
else if (c < 0xc2)
return MY_CS_ILSEQ;
else if (c < 0xe0)
{
if (s + 2 > e) /* We need 2 characters */
return MY_CS_TOOSMALL2;
if (!(IS_CONTINUATION_BYTE(s[1])))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
else if (c < 0xf0)
{
if (s + 3 > e) /* We need 3 characters */
return MY_CS_TOOSMALL3;
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (s + 4 > e) /* We need 4 characters */
return MY_CS_TOOSMALL4;
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
}
|
O3
|
c
|
my_mb_wc_utf8mb4_quick:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rdx, %rsi
jae 0x63487
movzbl (%rsi), %ecx
testb %cl, %cl
js 0x63480
movl $0x1, %eax
movq %rcx, (%rdi)
jmp 0x63487
cmpb $-0x3e, %cl
jae 0x63489
xorl %eax, %eax
popq %rbp
retq
cmpb $-0x21, %cl
ja 0x634bf
leaq 0x2(%rsi), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rdx, %r8
ja 0x63487
movzbl 0x1(%rsi), %edx
xorl $0x80, %edx
movl $0x0, %eax
cmpb $0x3f, %dl
ja 0x63487
andl $0x1f, %ecx
shll $0x6, %ecx
orl %edx, %ecx
movl $0x2, %eax
jmp 0x6347b
cmpb $-0x11, %cl
ja 0x63521
leaq 0x3(%rsi), %r8
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rdx, %r8
ja 0x63487
movzbl 0x1(%rsi), %edx
cmpb $-0x41, %dl
jg 0x63485
movzbl 0x2(%rsi), %esi
cmpb $-0x41, %sil
jg 0x63485
cmpl $0xe0, %ecx
sete %r8b
cmpb $-0x60, %dl
setb %r9b
movl $0x0, %eax
testb %r9b, %r8b
jne 0x63487
shll $0xc, %ecx
movzwl %cx, %eax
andl $0x3f, %edx
shll $0x6, %edx
orl %eax, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x3, %eax
movq %rsi, %rcx
jmp 0x6347b
cmpb $-0xc, %cl
ja 0x63485
leaq 0x4(%rsi), %r8
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rdx, %r8
ja 0x63487
movzbl 0x1(%rsi), %r8d
cmpb $-0x41, %r8b
jg 0x63485
movzbl 0x2(%rsi), %edx
cmpb $-0x41, %dl
jg 0x63485
movzbl 0x3(%rsi), %esi
cmpb $-0x41, %sil
jg 0x63485
cmpl $0xf0, %ecx
sete %al
cmpb $-0x70, %r8b
setb %r9b
testb %r9b, %al
jne 0x63485
cmpl $0xf4, %ecx
sete %r9b
cmpb $-0x70, %r8b
setae %r10b
movl $0x0, %eax
testb %r10b, %r9b
jne 0x63487
andl $0x7, %ecx
shll $0x12, %ecx
andl $0x3f, %r8d
shll $0xc, %r8d
orl %ecx, %r8d
andl $0x3f, %edx
shll $0x6, %edx
orl %r8d, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x4, %eax
jmp 0x63519
|
my_mb_wc_utf8mb4_quick:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rsi, rdx
jnb short loc_63487
movzx ecx, byte ptr [rsi]
test cl, cl
js short loc_63480
mov eax, 1
loc_6347B:
mov [rdi], rcx
jmp short loc_63487
loc_63480:
cmp cl, 0C2h
jnb short loc_63489
loc_63485:
xor eax, eax
loc_63487:
pop rbp
retn
loc_63489:
cmp cl, 0DFh
ja short loc_634BF
lea r8, [rsi+2]
mov eax, 0FFFFFF9Ah
cmp r8, rdx
ja short loc_63487
movzx edx, byte ptr [rsi+1]
xor edx, 80h
mov eax, 0
cmp dl, 3Fh ; '?'
ja short loc_63487
and ecx, 1Fh
shl ecx, 6
or ecx, edx
mov eax, 2
jmp short loc_6347B
loc_634BF:
cmp cl, 0EFh
ja short loc_63521
lea r8, [rsi+3]
mov eax, 0FFFFFF99h
cmp r8, rdx
ja short loc_63487
movzx edx, byte ptr [rsi+1]
cmp dl, 0BFh
jg short loc_63485
movzx esi, byte ptr [rsi+2]
cmp sil, 0BFh
jg short loc_63485
cmp ecx, 0E0h
setz r8b
cmp dl, 0A0h
setb r9b
mov eax, 0
test r8b, r9b
jnz short loc_63487
shl ecx, 0Ch
movzx eax, cx
and edx, 3Fh
shl edx, 6
or edx, eax
and esi, 3Fh
or rsi, rdx
mov eax, 3
loc_63519:
mov rcx, rsi
jmp loc_6347B
loc_63521:
cmp cl, 0F4h
ja loc_63485
lea r8, [rsi+4]
mov eax, 0FFFFFF98h
cmp r8, rdx
ja loc_63487
movzx r8d, byte ptr [rsi+1]
cmp r8b, 0BFh
jg loc_63485
movzx edx, byte ptr [rsi+2]
cmp dl, 0BFh
jg loc_63485
movzx esi, byte ptr [rsi+3]
cmp sil, 0BFh
jg loc_63485
cmp ecx, 0F0h
setz al
cmp r8b, 90h
setb r9b
test al, r9b
jnz loc_63485
cmp ecx, 0F4h
setz r9b
cmp r8b, 90h
setnb r10b
mov eax, 0
test r9b, r10b
jnz loc_63487
and ecx, 7
shl ecx, 12h
and r8d, 3Fh
shl r8d, 0Ch
or r8d, ecx
and edx, 3Fh
shl edx, 6
or edx, r8d
and esi, 3Fh
or rsi, rdx
mov eax, 4
jmp loc_63519
|
long long my_mb_wc_utf8mb4_quick(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3)
{
long long result; // rax
unsigned long long v4; // rcx
char v5; // dl
char v6; // si
unsigned long long v7; // rsi
char v8; // r8
char v9; // dl
char v10; // si
result = 4294967195LL;
if ( (unsigned long long)a2 >= a3 )
return result;
v4 = *a2;
if ( (v4 & 0x80u) == 0LL )
{
result = 1LL;
LABEL_4:
*a1 = v4;
return result;
}
if ( (unsigned __int8)v4 < 0xC2u )
return 0LL;
if ( (unsigned __int8)v4 > 0xDFu )
{
if ( (unsigned __int8)v4 > 0xEFu )
{
if ( (unsigned __int8)v4 <= 0xF4u )
{
result = 4294967192LL;
if ( (unsigned long long)(a2 + 4) > a3 )
return result;
v8 = a2[1];
if ( v8 <= -65 )
{
v9 = a2[2];
if ( v9 <= -65 )
{
v10 = a2[3];
if ( v10 <= -65 && ((unsigned __int8)v8 >= 0x90u || (_DWORD)v4 != 240) )
{
result = 0LL;
if ( (unsigned __int8)v8 >= 0x90u && (_DWORD)v4 == 244 )
return result;
v7 = ((v4 & 7) << 18) | ((unsigned __int8)(v8 & 0x3F) << 12) | ((unsigned __int8)(v9 & 0x3F) << 6) | v10 & 0x3F;
result = 4LL;
LABEL_18:
v4 = v7;
goto LABEL_4;
}
}
}
}
}
else
{
result = 4294967193LL;
if ( (unsigned long long)(a2 + 3) > a3 )
return result;
v5 = a2[1];
if ( v5 <= -65 )
{
v6 = a2[2];
if ( v6 <= -65 )
{
result = 0LL;
if ( (unsigned __int8)v5 < 0xA0u && (_DWORD)v4 == 224 )
return result;
v7 = (unsigned __int16)((_WORD)v4 << 12) | ((unsigned __int8)(v5 & 0x3F) << 6) | (unsigned long long)(v6 & 0x3F);
result = 3LL;
goto LABEL_18;
}
}
}
return 0LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a2 + 2) <= a3 )
{
result = 0LL;
if ( (a2[1] ^ 0x80u) <= 0x3F )
{
v4 = a2[1] ^ 0x80 | ((unsigned __int8)(v4 & 0x1F) << 6);
result = 2LL;
goto LABEL_4;
}
}
return result;
}
|
my_mb_wc_utf8mb4_quick:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RSI,RDX
JNC 0x00163487
MOVZX ECX,byte ptr [RSI]
TEST CL,CL
JS 0x00163480
MOV EAX,0x1
LAB_0016347b:
MOV qword ptr [RDI],RCX
JMP 0x00163487
LAB_00163480:
CMP CL,0xc2
JNC 0x00163489
LAB_00163485:
XOR EAX,EAX
LAB_00163487:
POP RBP
RET
LAB_00163489:
CMP CL,0xdf
JA 0x001634bf
LEA R8,[RSI + 0x2]
MOV EAX,0xffffff9a
CMP R8,RDX
JA 0x00163487
MOVZX EDX,byte ptr [RSI + 0x1]
XOR EDX,0x80
MOV EAX,0x0
CMP DL,0x3f
JA 0x00163487
AND ECX,0x1f
SHL ECX,0x6
OR ECX,EDX
MOV EAX,0x2
JMP 0x0016347b
LAB_001634bf:
CMP CL,0xef
JA 0x00163521
LEA R8,[RSI + 0x3]
MOV EAX,0xffffff99
CMP R8,RDX
JA 0x00163487
MOVZX EDX,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x00163485
MOVZX ESI,byte ptr [RSI + 0x2]
CMP SIL,0xbf
JG 0x00163485
CMP ECX,0xe0
SETZ R8B
CMP DL,0xa0
SETC R9B
MOV EAX,0x0
TEST R8B,R9B
JNZ 0x00163487
SHL ECX,0xc
MOVZX EAX,CX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,EAX
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x3
LAB_00163519:
MOV RCX,RSI
JMP 0x0016347b
LAB_00163521:
CMP CL,0xf4
JA 0x00163485
LEA R8,[RSI + 0x4]
MOV EAX,0xffffff98
CMP R8,RDX
JA 0x00163487
MOVZX R8D,byte ptr [RSI + 0x1]
CMP R8B,0xbf
JG 0x00163485
MOVZX EDX,byte ptr [RSI + 0x2]
CMP DL,0xbf
JG 0x00163485
MOVZX ESI,byte ptr [RSI + 0x3]
CMP SIL,0xbf
JG 0x00163485
CMP ECX,0xf0
SETZ AL
CMP R8B,0x90
SETC R9B
TEST AL,R9B
JNZ 0x00163485
CMP ECX,0xf4
SETZ R9B
CMP R8B,0x90
SETNC R10B
MOV EAX,0x0
TEST R9B,R10B
JNZ 0x00163487
AND ECX,0x7
SHL ECX,0x12
AND R8D,0x3f
SHL R8D,0xc
OR R8D,ECX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,R8D
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x4
JMP 0x00163519
|
int8 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3)
{
byte bVar1;
byte bVar2;
int8 uVar3;
uint uVar4;
ulong uVar5;
if (param_3 <= param_2) {
return 0xffffff9b;
}
bVar1 = *param_2;
uVar5 = (ulong)bVar1;
if ((char)bVar1 < '\0') {
if (0xc1 < bVar1) {
uVar4 = (uint)bVar1;
if (bVar1 < 0xe0) {
if (param_3 < param_2 + 2) {
return 0xffffff9a;
}
if (0x3f < (byte)(param_2[1] ^ 0x80)) {
return 0;
}
uVar5 = (ulong)((uVar4 & 0x1f) << 6 | param_2[1] ^ 0x80);
uVar3 = 2;
goto LAB_0016347b;
}
if (bVar1 < 0xf0) {
if (param_3 < param_2 + 3) {
return 0xffffff99;
}
bVar2 = param_2[1];
if (((char)bVar2 < -0x40) && ((char)param_2[2] < -0x40)) {
if (uVar4 == 0xe0 && bVar2 < 0xa0) {
return 0;
}
uVar4 = param_2[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc;
uVar3 = 3;
LAB_00163519:
uVar5 = (ulong)uVar4;
goto LAB_0016347b;
}
}
else if (bVar1 < 0xf5) {
if (param_3 < param_2 + 4) {
return 0xffffff98;
}
bVar1 = param_2[1];
if (((((char)bVar1 < -0x40) && ((char)param_2[2] < -0x40)) && ((char)param_2[3] < -0x40)) &&
(uVar4 != 0xf0 || 0x8f < bVar1)) {
if (uVar4 == 0xf4 && 0x8f < bVar1) {
return 0;
}
uVar4 = param_2[3] & 0x3f |
(param_2[2] & 0x3f) << 6 | (bVar1 & 0x3f) << 0xc | (uVar4 & 7) << 0x12;
uVar3 = 4;
goto LAB_00163519;
}
}
}
uVar3 = 0;
}
else {
uVar3 = 1;
LAB_0016347b:
*param_1 = uVar5;
}
return uVar3;
}
|
|
18,587
|
cpu_get_num_physical_cores()
|
monkey531[P]llama/common/common.cpp
|
int32_t cpu_get_num_physical_cores() {
#ifdef __linux__
// enumerate the set of thread siblings, num entries is num cores
std::unordered_set<std::string> siblings;
for (uint32_t cpu=0; cpu < UINT32_MAX; ++cpu) {
std::ifstream thread_siblings("/sys/devices/system/cpu/cpu"
+ std::to_string(cpu) + "/topology/thread_siblings");
if (!thread_siblings.is_open()) {
break; // no more cpus
}
std::string line;
if (std::getline(thread_siblings, line)) {
siblings.insert(line);
}
}
if (!siblings.empty()) {
return static_cast<int32_t>(siblings.size());
}
#elif defined(__APPLE__) && defined(__MACH__)
int32_t num_physical_cores;
size_t len = sizeof(num_physical_cores);
int result = sysctlbyname("hw.perflevel0.physicalcpu", &num_physical_cores, &len, NULL, 0);
if (result == 0) {
return num_physical_cores;
}
result = sysctlbyname("hw.physicalcpu", &num_physical_cores, &len, NULL, 0);
if (result == 0) {
return num_physical_cores;
}
#elif defined(_WIN32) && (_WIN32_WINNT >= 0x0601) && !defined(__MINGW64__) // windows 7 and later
// TODO: windows + arm64 + mingw64
unsigned int n_threads_win = std::thread::hardware_concurrency();
unsigned int default_threads = n_threads_win > 0 ? (n_threads_win <= 4 ? n_threads_win : n_threads_win / 2) : 4;
DWORD buffer_size = 0;
if (!GetLogicalProcessorInformationEx(RelationProcessorCore, nullptr, &buffer_size)) {
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
return default_threads;
}
}
std::vector<char> buffer(buffer_size);
if (!GetLogicalProcessorInformationEx(RelationProcessorCore, reinterpret_cast<PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX>(buffer.data()), &buffer_size)) {
return default_threads;
}
int32_t num_physical_cores = 0;
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info = reinterpret_cast<PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX>(buffer.data());
while (buffer_size > 0) {
if (info->Relationship == RelationProcessorCore) {
num_physical_cores += info->Processor.GroupCount;
}
buffer_size -= info->Size;
info = reinterpret_cast<PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX>(reinterpret_cast<char*>(info) + info->Size);
}
return num_physical_cores > 0 ? num_physical_cores : default_threads;
#endif
unsigned int n_threads = std::thread::hardware_concurrency();
return n_threads > 0 ? (n_threads <= 4 ? n_threads : n_threads / 2) : 4;
}
|
O0
|
cpp
|
cpu_get_num_physical_cores():
subq $0x328, %rsp # imm = 0x328
leaq 0x2e8(%rsp), %rdi
callq 0x9b650
movl $0x0, 0x2e4(%rsp)
cmpl $-0x1, 0x2e4(%rsp)
jae 0xee480
movl 0x2e4(%rsp), %esi
leaq 0x78(%rsp), %rdi
callq 0xfa3c0
jmp 0xee270
leaq 0xee5d5(%rip), %rsi # 0x1dc84c
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rdx
callq 0x9d6e0
jmp 0xee28b
leaq 0xee5d6(%rip), %rdx # 0x1dc868
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0xcfa60
jmp 0xee2a9
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
movl $0x8, %edx
callq 0x55f10
jmp 0xee2c5
leaq 0xb8(%rsp), %rdi
callq 0x56110
leaq 0x98(%rsp), %rdi
callq 0x56110
leaq 0x78(%rsp), %rdi
callq 0x56110
leaq 0xd8(%rsp), %rdi
callq 0x55d40
movb %al, 0x33(%rsp)
jmp 0xee2fc
movb 0x33(%rsp), %al
testb $0x1, %al
jne 0xee394
jmp 0xee30a
movl $0x2, 0x68(%rsp)
jmp 0xee43d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0xee51e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0xee372
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0xee365
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x56110
leaq 0x98(%rsp), %rdi
callq 0x56110
leaq 0x78(%rsp), %rdi
callq 0x56110
jmp 0xee51e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0xee46e
leaq 0x48(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x554d0
movq 0x20(%rsp), %rsi
leaq 0xd8(%rsp), %rdi
callq 0x55770
movq %rax, 0x28(%rsp)
jmp 0xee3bc
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x55510
movb %al, 0x1f(%rsp)
jmp 0xee3d6
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0xee3e0
jmp 0xee42b
leaq 0x2e8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xd3690
movb %dl, 0xf(%rsp)
movq %rax, 0x10(%rsp)
jmp 0xee3fd
movb 0xf(%rsp), %al
movq 0x10(%rsp), %rcx
movq %rcx, 0x38(%rsp)
movb %al, 0x40(%rsp)
jmp 0xee42b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x56110
jmp 0xee46e
leaq 0x48(%rsp), %rdi
callq 0x56110
movl $0x0, 0x68(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x55080
movl 0x68(%rsp), %eax
testl %eax, %eax
je 0xee456
jmp 0xee454
jmp 0xee480
jmp 0xee458
movl 0x2e4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2e4(%rsp)
jmp 0xee24f
leaq 0xd8(%rsp), %rdi
callq 0x55080
jmp 0xee51e
leaq 0x2e8(%rsp), %rdi
callq 0xd3620
testb $0x1, %al
jne 0xee4af
leaq 0x2e8(%rsp), %rdi
callq 0xfa4c0
movl %eax, 0x324(%rsp)
movl $0x1, 0x68(%rsp)
jmp 0xee502
callq 0x55b90
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
jbe 0xee4e4
cmpl $0x4, 0x34(%rsp)
ja 0xee4d0
movl 0x34(%rsp), %eax
movl %eax, 0x8(%rsp)
jmp 0xee4da
movl 0x34(%rsp), %eax
shrl %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
movl %eax, 0x4(%rsp)
jmp 0xee4ef
movl $0x4, %eax
movl %eax, 0x4(%rsp)
jmp 0xee4ef
movl 0x4(%rsp), %eax
movl %eax, 0x324(%rsp)
movl $0x1, 0x68(%rsp)
leaq 0x2e8(%rsp), %rdi
callq 0x9b750
movl 0x324(%rsp), %eax
addq $0x328, %rsp # imm = 0x328
retq
leaq 0x2e8(%rsp), %rdi
callq 0x9b750
movq 0x70(%rsp), %rdi
callq 0x559a0
nopw %cs:(%rax,%rax)
|
_Z26cpu_get_num_physical_coresv:
sub rsp, 328h
lea rdi, [rsp+328h+var_40]
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EEC2Ev; std::unordered_set<std::string>::unordered_set(void)
mov [rsp+328h+var_44], 0
loc_EE24F:
cmp [rsp+328h+var_44], 0FFFFFFFFh
jnb loc_EE480
mov esi, [rsp+328h+var_44]; unsigned int
lea rdi, [rsp+328h+var_2B0]; this
call _ZNSt7__cxx119to_stringEj; std::to_string(uint)
jmp short $+2
loc_EE270:
lea rsi, aSysDevicesSyst; "/sys/devices/system/cpu/cpu"
lea rdi, [rsp+328h+var_290]
lea rdx, [rsp+328h+var_2B0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
jmp short $+2
loc_EE28B:
lea rdx, aTopologyThread; "/topology/thread_siblings"
lea rdi, [rsp+328h+var_270]
lea rsi, [rsp+328h+var_290]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_EE2A9:
lea rdi, [rsp+328h+var_250]
lea rsi, [rsp+328h+var_270]
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode)
jmp short $+2
loc_EE2C5:
lea rdi, [rsp+328h+var_270]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+328h+var_290]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+328h+var_2B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+328h+var_250]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv; std::ifstream::is_open(void)
mov [rsp+328h+var_2F5], al
jmp short $+2
loc_EE2FC:
mov al, [rsp+328h+var_2F5]
test al, 1
jnz loc_EE394
jmp short $+2
loc_EE30A:
mov [rsp+328h+var_2C0], 2
jmp loc_EE43D
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
jmp loc_EE51E
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
jmp short loc_EE372
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
jmp short loc_EE365
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
lea rdi, [rsp+arg_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_EE365:
lea rdi, [rsp+arg_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_EE372:
lea rdi, [rsp+arg_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_EE51E
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
jmp loc_EE46E
loc_EE394:
lea rdi, [rsp+328h+var_2E0]
mov [rsp+328h+var_308], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rsi, [rsp+328h+var_308]
lea rdi, [rsp+328h+var_250]
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &)
mov [rsp+328h+var_300], rax
jmp short $+2
loc_EE3BC:
mov rdi, [rsp+328h+var_300]
mov rax, [rdi]
mov rax, [rax-18h]
add rdi, rax
call __ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv; std::ios::operator bool(void)
mov [rsp+328h+var_309], al
jmp short $+2
loc_EE3D6:
mov al, [rsp+328h+var_309]
test al, 1
jnz short loc_EE3E0
jmp short loc_EE42B
loc_EE3E0:
lea rdi, [rsp+328h+var_40]
lea rsi, [rsp+328h+var_2E0]
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE6insertERKS5_; std::unordered_set<std::string>::insert(std::string const&)
mov [rsp+328h+var_319], dl
mov [rsp+328h+var_318], rax
jmp short $+2
loc_EE3FD:
mov al, [rsp+328h+var_319]
mov rcx, [rsp+328h+var_318]
mov [rsp+328h+var_2F0], rcx
mov [rsp+328h+var_2E8], al
jmp short loc_EE42B
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_EE46E
loc_EE42B:
lea rdi, [rsp+328h+var_2E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov [rsp+328h+var_2C0], 0
loc_EE43D:
lea rdi, [rsp+328h+var_250]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov eax, [rsp+328h+var_2C0]
test eax, eax
jz short loc_EE456
jmp short $+2
loc_EE454:
jmp short loc_EE480
loc_EE456:
jmp short $+2
loc_EE458:
mov eax, [rsp+328h+var_44]
add eax, 1
mov [rsp+328h+var_44], eax
jmp loc_EE24F
loc_EE46E:
lea rdi, [rsp+arg_D0]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
jmp loc_EE51E
loc_EE480:
lea rdi, [rsp+328h+var_40]; this
call _ZNKSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5emptyEv; std::unordered_set<std::string>::empty(void)
test al, 1
jnz short loc_EE4AF
lea rdi, [rsp+328h+var_40]
call _ZNKSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE4sizeEv; std::unordered_set<std::string>::size(void)
mov [rsp+328h+var_4], eax
mov [rsp+328h+var_2C0], 1
jmp short loc_EE502
loc_EE4AF:
call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void)
mov [rsp+328h+var_2F4], eax
cmp [rsp+328h+var_2F4], 0
jbe short loc_EE4E4
cmp [rsp+328h+var_2F4], 4
ja short loc_EE4D0
mov eax, [rsp+328h+var_2F4]
mov [rsp+328h+var_320], eax
jmp short loc_EE4DA
loc_EE4D0:
mov eax, [rsp+328h+var_2F4]
shr eax, 1
mov [rsp+328h+var_320], eax
loc_EE4DA:
mov eax, [rsp+328h+var_320]
mov [rsp+328h+var_324], eax
jmp short loc_EE4EF
loc_EE4E4:
mov eax, 4
mov [rsp+328h+var_324], eax
jmp short $+2
loc_EE4EF:
mov eax, [rsp+328h+var_324]
mov [rsp+328h+var_4], eax
mov [rsp+328h+var_2C0], 1
loc_EE502:
lea rdi, [rsp+328h+var_40]; void *
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EED2Ev; std::unordered_set<std::string>::~unordered_set()
mov eax, [rsp+328h+var_4]
add rsp, 328h
retn
loc_EE51E:
lea rdi, [rsp+arg_2E0]; void *
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EED2Ev; std::unordered_set<std::string>::~unordered_set()
mov rdi, [rsp+arg_68]
call __Unwind_Resume
|
long long cpu_get_num_physical_cores(void)
{
int v1; // [rsp+4h] [rbp-324h]
unsigned int v2; // [rsp+8h] [rbp-320h]
_QWORD *v3; // [rsp+28h] [rbp-300h]
unsigned int v4; // [rsp+34h] [rbp-2F4h]
_BYTE v5[32]; // [rsp+48h] [rbp-2E0h] BYREF
int v6; // [rsp+68h] [rbp-2C0h]
_BYTE v7[32]; // [rsp+78h] [rbp-2B0h] BYREF
_BYTE v8[32]; // [rsp+98h] [rbp-290h] BYREF
_BYTE v9[32]; // [rsp+B8h] [rbp-270h] BYREF
_BYTE v10[524]; // [rsp+D8h] [rbp-250h] BYREF
unsigned int i; // [rsp+2E4h] [rbp-44h]
_BYTE v12[60]; // [rsp+2E8h] [rbp-40h] BYREF
unsigned int v13; // [rsp+324h] [rbp-4h]
std::unordered_set<std::string>::unordered_set((long long)v12);
for ( i = 0; i != -1; ++i )
{
std::to_string((std::__cxx11 *)v7, i);
std::operator+<char>((long long)v8, (long long)"/sys/devices/system/cpu/cpu", (long long)v7);
std::operator+<char>((long long)v9, (long long)v8, (long long)"/topology/thread_siblings");
std::ifstream::basic_ifstream(v10, v9, 8LL);
std::string::~string(v9);
std::string::~string(v8);
std::string::~string(v7);
if ( (std::ifstream::is_open(v10) & 1) != 0 )
{
std::string::basic_string(v5);
v3 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v10, v5);
if ( (std::ios::operator bool((char *)v3 + *(_QWORD *)(*v3 - 24LL)) & 1) != 0 )
std::unordered_set<std::string>::insert((long long)v12, (long long)v5);
std::string::~string(v5);
v6 = 0;
}
else
{
v6 = 2;
}
std::ifstream::~ifstream(v10);
if ( v6 )
break;
}
if ( (std::unordered_set<std::string>::empty((long long)v12) & 1) != 0 )
{
v4 = std::thread::hardware_concurrency((std::thread *)v12);
if ( v4 )
{
if ( v4 > 4 )
v2 = v4 >> 1;
else
v2 = v4;
v1 = v2;
}
else
{
v1 = 4;
}
v13 = v1;
v6 = 1;
}
else
{
v13 = std::unordered_set<std::string>::size(v12);
v6 = 1;
}
std::unordered_set<std::string>::~unordered_set(v12);
return v13;
}
|
cpu_get_num_physical_cores:
SUB RSP,0x328
LEA RDI,[RSP + 0x2e8]
CALL 0x0019b650
MOV dword ptr [RSP + 0x2e4],0x0
LAB_001ee24f:
CMP dword ptr [RSP + 0x2e4],-0x1
JNC 0x001ee480
MOV ESI,dword ptr [RSP + 0x2e4]
LAB_001ee264:
LEA RDI,[RSP + 0x78]
CALL 0x001fa3c0
JMP 0x001ee270
LAB_001ee270:
LEA RSI,[0x2dc84c]
LEA RDI,[RSP + 0x98]
LEA RDX,[RSP + 0x78]
CALL 0x0019d6e0
JMP 0x001ee28b
LAB_001ee28b:
LEA RDX,[0x2dc868]
LEA RDI,[RSP + 0xb8]
LEA RSI,[RSP + 0x98]
CALL 0x001cfa60
JMP 0x001ee2a9
LAB_001ee2a9:
LEA RDI,[RSP + 0xd8]
LEA RSI,[RSP + 0xb8]
MOV EDX,0x8
CALL 0x00155f10
JMP 0x001ee2c5
LAB_001ee2c5:
LEA RDI,[RSP + 0xb8]
CALL 0x00156110
LEA RDI,[RSP + 0x98]
CALL 0x00156110
LEA RDI,[RSP + 0x78]
CALL 0x00156110
LAB_001ee2e9:
LEA RDI,[RSP + 0xd8]
CALL 0x00155d40
MOV byte ptr [RSP + 0x33],AL
JMP 0x001ee2fc
LAB_001ee2fc:
MOV AL,byte ptr [RSP + 0x33]
TEST AL,0x1
JNZ 0x001ee394
JMP 0x001ee30a
LAB_001ee30a:
MOV dword ptr [RSP + 0x68],0x2
JMP 0x001ee43d
LAB_001ee394:
LEA RDI,[RSP + 0x48]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x001554d0
MOV RSI,qword ptr [RSP + 0x20]
LAB_001ee3a8:
LEA RDI,[RSP + 0xd8]
CALL 0x00155770
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001ee3bc
LAB_001ee3bc:
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
ADD RDI,RAX
CALL 0x00155510
MOV byte ptr [RSP + 0x1f],AL
JMP 0x001ee3d6
LAB_001ee3d6:
MOV AL,byte ptr [RSP + 0x1f]
TEST AL,0x1
JNZ 0x001ee3e0
JMP 0x001ee42b
LAB_001ee3e0:
LEA RDI,[RSP + 0x2e8]
LEA RSI,[RSP + 0x48]
CALL 0x001d3690
LAB_001ee3f2:
MOV byte ptr [RSP + 0xf],DL
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001ee3fd
LAB_001ee3fd:
MOV AL,byte ptr [RSP + 0xf]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x38],RCX
MOV byte ptr [RSP + 0x40],AL
JMP 0x001ee42b
LAB_001ee42b:
LEA RDI,[RSP + 0x48]
CALL 0x00156110
MOV dword ptr [RSP + 0x68],0x0
LAB_001ee43d:
LEA RDI,[RSP + 0xd8]
CALL 0x00155080
MOV EAX,dword ptr [RSP + 0x68]
TEST EAX,EAX
JZ 0x001ee456
JMP 0x001ee454
LAB_001ee454:
JMP 0x001ee480
LAB_001ee456:
JMP 0x001ee458
LAB_001ee458:
MOV EAX,dword ptr [RSP + 0x2e4]
ADD EAX,0x1
MOV dword ptr [RSP + 0x2e4],EAX
JMP 0x001ee24f
LAB_001ee480:
LEA RDI,[RSP + 0x2e8]
CALL 0x001d3620
TEST AL,0x1
JNZ 0x001ee4af
LEA RDI,[RSP + 0x2e8]
CALL 0x001fa4c0
MOV dword ptr [RSP + 0x324],EAX
MOV dword ptr [RSP + 0x68],0x1
JMP 0x001ee502
LAB_001ee4af:
CALL 0x00155b90
MOV dword ptr [RSP + 0x34],EAX
CMP dword ptr [RSP + 0x34],0x0
JBE 0x001ee4e4
CMP dword ptr [RSP + 0x34],0x4
JA 0x001ee4d0
MOV EAX,dword ptr [RSP + 0x34]
MOV dword ptr [RSP + 0x8],EAX
JMP 0x001ee4da
LAB_001ee4d0:
MOV EAX,dword ptr [RSP + 0x34]
SHR EAX,0x1
MOV dword ptr [RSP + 0x8],EAX
LAB_001ee4da:
MOV EAX,dword ptr [RSP + 0x8]
MOV dword ptr [RSP + 0x4],EAX
JMP 0x001ee4ef
LAB_001ee4e4:
MOV EAX,0x4
MOV dword ptr [RSP + 0x4],EAX
JMP 0x001ee4ef
LAB_001ee4ef:
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [RSP + 0x324],EAX
MOV dword ptr [RSP + 0x68],0x1
LAB_001ee502:
LEA RDI,[RSP + 0x2e8]
CALL 0x0019b750
MOV EAX,dword ptr [RSP + 0x324]
ADD RSP,0x328
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* cpu_get_num_physical_cores() */
uint cpu_get_num_physical_cores(void)
{
byte bVar1;
bool bVar2;
istream *piVar3;
ulong uVar4;
uint local_324;
uint local_320;
string local_2e0 [32];
int local_2c0;
__cxx11 local_2b0 [32];
string local_290 [32];
string local_270 [32];
ifstream local_250 [524];
uint local_44;
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
local_40 [60];
uint local_4;
std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::unordered_set(local_40);
for (local_44 = 0; local_44 != 0xffffffff; local_44 = local_44 + 1) {
/* try { // try from 001ee264 to 001ee26d has its CatchHandler @ 001ee317 */
std::__cxx11::to_string(local_2b0,local_44);
/* try { // try from 001ee270 to 001ee288 has its CatchHandler @ 001ee32a */
std::operator+((char *)local_290,(string *)"/sys/devices/system/cpu/cpu");
/* try { // try from 001ee28b to 001ee2a6 has its CatchHandler @ 001ee33a */
std::operator+(local_270,(char *)local_290);
/* try { // try from 001ee2a9 to 001ee2c2 has its CatchHandler @ 001ee34a */
std::ifstream::ifstream(local_250,local_270,8);
std::__cxx11::string::~string(local_270);
std::__cxx11::string::~string(local_290);
std::__cxx11::string::~string((string *)local_2b0);
/* try { // try from 001ee2e9 to 001ee2f5 has its CatchHandler @ 001ee381 */
bVar1 = std::ifstream::is_open();
if ((bVar1 & 1) == 0) {
local_2c0 = 2;
}
else {
std::__cxx11::string::string(local_2e0);
/* try { // try from 001ee3a8 to 001ee3f1 has its CatchHandler @ 001ee411 */
piVar3 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)local_250,local_2e0);
bVar2 = std::ios::operator_cast_to_bool((ios *)(piVar3 + *(long *)(*(long *)piVar3 + -0x18)));
if (bVar2) {
std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::insert(local_40,local_2e0);
}
std::__cxx11::string::~string(local_2e0);
local_2c0 = 0;
}
std::ifstream::~ifstream(local_250);
if (local_2c0 != 0) break;
}
uVar4 = std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::empty(local_40);
if ((uVar4 & 1) == 0) {
local_4 = std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::size(local_40);
}
else {
local_320 = std::thread::hardware_concurrency();
if (local_320 == 0) {
local_324 = 4;
}
else {
if (4 < local_320) {
local_320 = local_320 >> 1;
}
local_324 = local_320;
}
local_4 = local_324;
}
local_2c0 = 1;
std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::~unordered_set(local_40);
return local_4;
}
|
|
18,588
|
OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
|
void
PatchTable::populateVaryingVertices() {
// In order to support evaluation of varying data we need to access
// the varying values indexed by the zero ring vertices of the vertex
// patch. This indexing is redundant for triangles and quads and
// could be made redunant for other patch types if we reorganized
// the vertex patch indices so that the zero ring indices always occured
// first. This will also need to be updated when we add support for
// triangle patches.
int numVaryingCVs = _varyingDesc.GetNumControlVertices();
for (int arrayIndex=0; arrayIndex<(int)_patchArrays.size(); ++arrayIndex) {
PatchArray const & pa = getPatchArray(arrayIndex);
PatchDescriptor::Type patchType = pa.desc.GetType();
for (int patch=0; patch<pa.numPatches; ++patch) {
ConstIndexArray vertexCVs = GetPatchVertices(arrayIndex, patch);
int start = (pa.patchIndex + patch) * numVaryingCVs;
if (patchType == PatchDescriptor::REGULAR) {
_varyingVerts[start+0] = vertexCVs[5];
_varyingVerts[start+1] = vertexCVs[6];
_varyingVerts[start+2] = vertexCVs[10];
_varyingVerts[start+3] = vertexCVs[9];
} else if (patchType == PatchDescriptor::GREGORY_BASIS) {
_varyingVerts[start+0] = vertexCVs[0];
_varyingVerts[start+1] = vertexCVs[5];
_varyingVerts[start+2] = vertexCVs[10];
_varyingVerts[start+3] = vertexCVs[15];
} else if (patchType == PatchDescriptor::QUADS) {
_varyingVerts[start+0] = vertexCVs[0];
_varyingVerts[start+1] = vertexCVs[1];
_varyingVerts[start+2] = vertexCVs[2];
_varyingVerts[start+3] = vertexCVs[3];
} else if (patchType == PatchDescriptor::TRIANGLES) {
_varyingVerts[start+0] = vertexCVs[0];
_varyingVerts[start+1] = vertexCVs[1];
_varyingVerts[start+2] = vertexCVs[2];
}
}
}
}
|
O0
|
cpp
|
OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices():
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x50(%rbp)
addq $0x90, %rdi
callq 0xd7430
cwtl
movl %eax, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x50(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, -0x54(%rbp)
addq $0x8, %rdi
callq 0xcb950
movq %rax, %rcx
movl -0x54(%rbp), %eax
cmpl %ecx, %eax
jge 0x1406f2
movq -0x50(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0xccf50
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xceef0
movl %eax, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x1406e2
movq -0x50(%rbp), %rdi
movl -0x10(%rbp), %esi
movl -0x20(%rbp), %edx
callq 0xc6690
movl %edx, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
addl -0x20(%rbp), %eax
imull -0xc(%rbp), %eax
movl %eax, -0x44(%rbp)
cmpl $0x6, -0x1c(%rbp)
jne 0x14047a
leaq -0x30(%rbp), %rdi
movl $0x5, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x64(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x0, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x64(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
movl $0x6, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x60(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x60(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
movl $0xa, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x5c(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
movl $0x9, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x58(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x3, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x58(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x1406d2
cmpl $0x9, -0x1c(%rbp)
jne 0x14054a
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x74(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x0, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x74(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
movl $0x5, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x70(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x70(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
movl $0xa, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x6c(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
movl $0xf, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x68(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x3, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x68(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x1406d0
cmpl $0x3, -0x1c(%rbp)
jne 0x140620
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x84(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x0, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x84(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x80(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x80(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
movl $0x2, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x7c(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x7c(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
movl $0x3, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x78(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x3, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x78(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x1406ce
cmpl $0x4, -0x1c(%rbp)
jne 0x1406cc
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x90(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x0, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x90(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x8c(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x8c(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
movl $0x2, %esi
callq 0xcabf0
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x88(%rbp)
addq $0x98, %rdi
movl -0x44(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x88(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x1406ce
jmp 0x1406d0
jmp 0x1406d2
jmp 0x1406d4
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x140362
jmp 0x1406e4
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x14031e
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_ZN10OpenSubdiv6v3_6_03Far10PatchTable23populateVaryingVerticesEv:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov [rbp+var_50], rdi
add rdi, 90h; this
call __ZNK10OpenSubdiv6v3_6_03Far15PatchDescriptor21GetNumControlVerticesEv; OpenSubdiv::v3_6_0::Far::PatchDescriptor::GetNumControlVertices(void)
cwde
mov [rbp+var_C], eax
mov [rbp+var_10], 0
loc_14031E:
mov rdi, [rbp+var_50]
mov eax, [rbp+var_10]
mov [rbp+var_54], eax
add rdi, 8
call __ZNKSt6vectorIN10OpenSubdiv6v3_6_03Far10PatchTable10PatchArrayESaIS4_EE4sizeEv; std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::PatchArray>::size(void)
mov rcx, rax
mov eax, [rbp+var_54]
cmp eax, ecx
jge loc_1406F2
mov rdi, [rbp+var_50]; this
mov esi, [rbp+var_10]; int
call __ZN10OpenSubdiv6v3_6_03Far10PatchTable13getPatchArrayEi; OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(int)
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]; this
call __ZNK10OpenSubdiv6v3_6_03Far15PatchDescriptor7GetTypeEv; OpenSubdiv::v3_6_0::Far::PatchDescriptor::GetType(void)
mov [rbp+var_1C], eax
mov [rbp+var_20], 0
loc_140362:
mov eax, [rbp+var_20]
mov rcx, [rbp+var_18]
cmp eax, [rcx+4]
jge loc_1406E2
mov rdi, [rbp+var_50]; this
mov esi, [rbp+var_10]; int
mov edx, [rbp+var_20]; int
call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable16GetPatchVerticesEii; OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchVertices(int,int)
mov [rbp+var_38], edx
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_30], rax
mov eax, [rbp+var_38]
mov [rbp+var_28], eax
mov rax, [rbp+var_18]
mov eax, [rax+0Ch]
add eax, [rbp+var_20]
imul eax, [rbp+var_C]
mov [rbp+var_44], eax
cmp [rbp+var_1C], 6
jnz loc_14047A
lea rdi, [rbp+var_30]
mov esi, 5
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_64], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 0
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_64]
mov [rax], ecx
lea rdi, [rbp+var_30]
mov esi, 6
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_60], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 1
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_60]
mov [rax], ecx
lea rdi, [rbp+var_30]
mov esi, 0Ah
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_5C], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 2
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_5C]
mov [rax], ecx
lea rdi, [rbp+var_30]
mov esi, 9
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_58], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 3
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_58]
mov [rax], ecx
jmp loc_1406D2
loc_14047A:
cmp [rbp+var_1C], 9
jnz loc_14054A
lea rdi, [rbp+var_30]
xor esi, esi
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_74], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 0
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_74]
mov [rax], ecx
lea rdi, [rbp+var_30]
mov esi, 5
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_70], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 1
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_70]
mov [rax], ecx
lea rdi, [rbp+var_30]
mov esi, 0Ah
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_6C], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 2
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_6C]
mov [rax], ecx
lea rdi, [rbp+var_30]
mov esi, 0Fh
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_68], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 3
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_68]
mov [rax], ecx
jmp loc_1406D0
loc_14054A:
cmp [rbp+var_1C], 3
jnz loc_140620
lea rdi, [rbp+var_30]
xor esi, esi
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_84], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 0
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_84]
mov [rax], ecx
lea rdi, [rbp+var_30]
mov esi, 1
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_80], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 1
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_80]
mov [rax], ecx
lea rdi, [rbp+var_30]
mov esi, 2
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_7C], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 2
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_7C]
mov [rax], ecx
lea rdi, [rbp+var_30]
mov esi, 3
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_78], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 3
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_78]
mov [rax], ecx
jmp loc_1406CE
loc_140620:
cmp [rbp+var_1C], 4
jnz loc_1406CC
lea rdi, [rbp+var_30]
xor esi, esi
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_90], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 0
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_90]
mov [rax], ecx
lea rdi, [rbp+var_30]
mov esi, 1
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_8C], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 1
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_8C]
mov [rax], ecx
lea rdi, [rbp+var_30]
mov esi, 2
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_88], eax
add rdi, 98h
mov eax, [rbp+var_44]
add eax, 2
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_88]
mov [rax], ecx
loc_1406CC:
jmp short $+2
loc_1406CE:
jmp short $+2
loc_1406D0:
jmp short $+2
loc_1406D2:
jmp short $+2
loc_1406D4:
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
jmp loc_140362
loc_1406E2:
jmp short $+2
loc_1406E4:
mov eax, [rbp+var_10]
add eax, 1
mov [rbp+var_10], eax
jmp loc_14031E
loc_1406F2:
add rsp, 90h
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices(
OpenSubdiv::v3_6_0::Far::PatchTable *this)
{
int v1; // ecx
long long result; // rax
int v3; // edx
int v4; // [rsp+0h] [rbp-90h]
int v5; // [rsp+4h] [rbp-8Ch]
int v6; // [rsp+8h] [rbp-88h]
int v7; // [rsp+Ch] [rbp-84h]
int v8; // [rsp+10h] [rbp-80h]
int v9; // [rsp+14h] [rbp-7Ch]
int v10; // [rsp+18h] [rbp-78h]
int v11; // [rsp+1Ch] [rbp-74h]
int v12; // [rsp+20h] [rbp-70h]
int v13; // [rsp+24h] [rbp-6Ch]
int v14; // [rsp+28h] [rbp-68h]
int v15; // [rsp+2Ch] [rbp-64h]
int v16; // [rsp+30h] [rbp-60h]
int v17; // [rsp+34h] [rbp-5Ch]
int v18; // [rsp+38h] [rbp-58h]
int v19; // [rsp+3Ch] [rbp-54h]
int v20; // [rsp+4Ch] [rbp-44h]
long long PatchVertices; // [rsp+60h] [rbp-30h] BYREF
int v22; // [rsp+68h] [rbp-28h]
int j; // [rsp+70h] [rbp-20h]
int Type; // [rsp+74h] [rbp-1Ch]
OpenSubdiv::v3_6_0::Far::PatchDescriptor *PatchArray; // [rsp+78h] [rbp-18h]
int i; // [rsp+80h] [rbp-10h]
int NumControlVertices; // [rsp+84h] [rbp-Ch]
OpenSubdiv::v3_6_0::Far::PatchTable *v28; // [rsp+88h] [rbp-8h]
v28 = this;
NumControlVertices = (__int16)OpenSubdiv::v3_6_0::Far::PatchDescriptor::GetNumControlVertices((OpenSubdiv::v3_6_0::Far::PatchTable *)((char *)this + 144));
for ( i = 0; ; ++i )
{
v19 = i;
v1 = std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::PatchArray>::size((char *)this + 8);
result = (unsigned int)v19;
if ( v19 >= v1 )
break;
PatchArray = (OpenSubdiv::v3_6_0::Far::PatchDescriptor *)OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(this, i);
Type = OpenSubdiv::v3_6_0::Far::PatchDescriptor::GetType(PatchArray);
for ( j = 0; j < *((_DWORD *)PatchArray + 1); ++j )
{
PatchVertices = OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchVertices(this, i, j);
v22 = v3;
v20 = NumControlVertices * (j + *((_DWORD *)PatchArray + 3));
switch ( Type )
{
case 6:
v15 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 5LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20) = v15;
v16 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 6LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20 + 1) = v16;
v17 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 10LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20 + 2) = v17;
v18 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 9LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20 + 3) = v18;
break;
case 9:
v11 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 0LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20) = v11;
v12 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 5LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20 + 1) = v12;
v13 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 10LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20 + 2) = v13;
v14 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 15LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20 + 3) = v14;
break;
case 3:
v7 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 0LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20) = v7;
v8 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 1LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20 + 1) = v8;
v9 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 2LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20 + 2) = v9;
v10 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 3LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20 + 3) = v10;
break;
case 4:
v4 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 0LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20) = v4;
v5 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 1LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20 + 1) = v5;
v6 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&PatchVertices, 2LL);
*(_DWORD *)std::vector<int>::operator[]((char *)this + 152, v20 + 2) = v6;
break;
}
}
}
return result;
}
| |||
18,589
|
OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
|
void
PatchTable::populateVaryingVertices() {
// In order to support evaluation of varying data we need to access
// the varying values indexed by the zero ring vertices of the vertex
// patch. This indexing is redundant for triangles and quads and
// could be made redunant for other patch types if we reorganized
// the vertex patch indices so that the zero ring indices always occured
// first. This will also need to be updated when we add support for
// triangle patches.
int numVaryingCVs = _varyingDesc.GetNumControlVertices();
for (int arrayIndex=0; arrayIndex<(int)_patchArrays.size(); ++arrayIndex) {
PatchArray const & pa = getPatchArray(arrayIndex);
PatchDescriptor::Type patchType = pa.desc.GetType();
for (int patch=0; patch<pa.numPatches; ++patch) {
ConstIndexArray vertexCVs = GetPatchVertices(arrayIndex, patch);
int start = (pa.patchIndex + patch) * numVaryingCVs;
if (patchType == PatchDescriptor::REGULAR) {
_varyingVerts[start+0] = vertexCVs[5];
_varyingVerts[start+1] = vertexCVs[6];
_varyingVerts[start+2] = vertexCVs[10];
_varyingVerts[start+3] = vertexCVs[9];
} else if (patchType == PatchDescriptor::GREGORY_BASIS) {
_varyingVerts[start+0] = vertexCVs[0];
_varyingVerts[start+1] = vertexCVs[5];
_varyingVerts[start+2] = vertexCVs[10];
_varyingVerts[start+3] = vertexCVs[15];
} else if (patchType == PatchDescriptor::QUADS) {
_varyingVerts[start+0] = vertexCVs[0];
_varyingVerts[start+1] = vertexCVs[1];
_varyingVerts[start+2] = vertexCVs[2];
_varyingVerts[start+3] = vertexCVs[3];
} else if (patchType == PatchDescriptor::TRIANGLES) {
_varyingVerts[start+0] = vertexCVs[0];
_varyingVerts[start+1] = vertexCVs[1];
_varyingVerts[start+2] = vertexCVs[2];
}
}
}
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x90(%rdi), %eax
decl %eax
movl $0xffffffff, 0x4(%rsp) # imm = 0xFFFFFFFF
cmpl $0x9, %eax
ja 0x6a10b
movl %eax, %eax
leaq 0x4e64c(%rip), %rcx # 0xb8750
movl (%rcx,%rax,4), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD
testl %ecx, %ecx
jle 0x6a275
xorl %r14d, %r14d
leaq 0x4e5ee(%rip), %r12 # 0xb8720
movq 0x10(%rbx), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD
movslq %ecx, %rcx
cmpq %rcx, %r14
jge 0x6a284
leaq (%r14,%r14,4), %rcx
cmpl $0x0, 0x4(%rax,%rcx,4)
jle 0x6a251
leaq (%rax,%rcx,4), %r13
movl (%r13), %r15d
xorl %ebp, %ebp
addl $-0x3, %r15d
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x38bf0
cmpl $0x6, %r15d
ja 0x6a245
movl 0xc(%r13), %ecx
addl %ebp, %ecx
imull 0x4(%rsp), %ecx
movslq (%r12,%r15,4), %rdx
addq %r12, %rdx
movslq %ecx, %rcx
jmpq *%rdx
movl (%rax), %esi
movq 0x98(%rbx), %rdx
movl %esi, (%rdx,%rcx,4)
movl 0x4(%rax), %esi
movl %esi, 0x4(%rdx,%rcx,4)
movl $0xc, %esi
movl $0x8, %edi
movl $0x8, %r9d
movl $0xc, %r8d
jmp 0x6a233
movl 0x14(%rax), %esi
movq 0x98(%rbx), %rdx
movl %esi, (%rdx,%rcx,4)
movl 0x18(%rax), %esi
movl %esi, 0x4(%rdx,%rcx,4)
movl $0xc, %r8d
movl $0x24, %esi
jmp 0x6a228
movl (%rax), %esi
movq 0x98(%rbx), %rdx
movl %esi, (%rdx,%rcx,4)
movl $0x8, %esi
movl $0x4, %edi
movl $0x4, %r9d
movl $0x8, %r8d
jmp 0x6a233
movl (%rax), %esi
movq 0x98(%rbx), %rdx
movl %esi, (%rdx,%rcx,4)
movl 0x14(%rax), %esi
movl %esi, 0x4(%rdx,%rcx,4)
movl $0xc, %r8d
movl $0x3c, %esi
movl $0x8, %r9d
movl $0x28, %edi
movl (%rax,%rdi), %edi
leaq (%rdx,%rcx,4), %rcx
movl %edi, (%r9,%rcx)
movl (%rax,%rsi), %eax
movl %eax, (%r8,%rcx)
incl %ebp
cmpl 0x4(%r13), %ebp
jl 0x6a16c
incq %r14
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD
movslq %ecx, %rcx
cmpq %rcx, %r14
jl 0x6a132
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4ea72(%rip), %rdi # 0xb8cfd
leaq 0x4e540(%rip), %rsi # 0xb87d2
leaq 0x4eae8(%rip), %rcx # 0xb8d81
movl $0x8b, %edx
callq 0x39560
nop
|
_ZN10OpenSubdiv6v3_6_03Far10PatchTable23populateVaryingVerticesEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov eax, [rdi+90h]
dec eax
mov [rsp+38h+var_34], 0FFFFFFFFh
cmp eax, 9
ja short loc_6A10B
mov eax, eax
lea rcx, dword_B8750
mov eax, [rcx+rax*4]
mov [rsp+38h+var_34], eax
loc_6A10B:
mov rax, [rbx+8]
mov rcx, [rbx+10h]
sub rcx, rax
shr rcx, 2
imul ecx, 0CCCCCCCDh
test ecx, ecx
jle loc_6A275
xor r14d, r14d
lea r12, jpt_6A198
loc_6A132:
mov rcx, [rbx+10h]
sub rcx, rax
shr rcx, 2
imul ecx, 0CCCCCCCDh
movsxd rcx, ecx
cmp r14, rcx
jge loc_6A284
lea rcx, [r14+r14*4]
cmp dword ptr [rax+rcx*4+4], 0
jle loc_6A251
lea r13, [rax+rcx*4]
mov r15d, [r13+0]
xor ebp, ebp
add r15d, 0FFFFFFFDh
loc_6A16C:
mov rdi, rbx; this
mov esi, r14d; int
mov edx, ebp; int
call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable16GetPatchVerticesEii; OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchVertices(int,int)
cmp r15d, 6; switch 7 cases
ja def_6A198; jumptable 000000000006A198 default case, cases 2,4,5
mov ecx, [r13+0Ch]
add ecx, ebp
imul ecx, [rsp+38h+var_34]
movsxd rdx, ds:(jpt_6A198 - 0B8720h)[r12+r15*4]
add rdx, r12
movsxd rcx, ecx
jmp rdx; switch jump
loc_6A19A:
mov esi, [rax]; jumptable 000000000006A198 case 0
mov rdx, [rbx+98h]
mov [rdx+rcx*4], esi
mov esi, [rax+4]
mov [rdx+rcx*4+4], esi
mov esi, 0Ch
mov edi, 8
mov r9d, 8
mov r8d, 0Ch
jmp short loc_6A233
loc_6A1C5:
mov esi, [rax+14h]; jumptable 000000000006A198 case 3
mov rdx, [rbx+98h]
mov [rdx+rcx*4], esi
mov esi, [rax+18h]
mov [rdx+rcx*4+4], esi
mov r8d, 0Ch
mov esi, 24h ; '$'
jmp short loc_6A228
loc_6A1E6:
mov esi, [rax]; jumptable 000000000006A198 case 1
mov rdx, [rbx+98h]
mov [rdx+rcx*4], esi
mov esi, 8
mov edi, 4
mov r9d, 4
mov r8d, 8
jmp short loc_6A233
loc_6A20A:
mov esi, [rax]; jumptable 000000000006A198 case 6
mov rdx, [rbx+98h]
mov [rdx+rcx*4], esi
mov esi, [rax+14h]
mov [rdx+rcx*4+4], esi
mov r8d, 0Ch
mov esi, 3Ch ; '<'
loc_6A228:
mov r9d, 8
mov edi, 28h ; '('
loc_6A233:
mov edi, [rax+rdi]
lea rcx, [rdx+rcx*4]
mov [r9+rcx], edi
mov eax, [rax+rsi]
mov [r8+rcx], eax
def_6A198:
inc ebp; jumptable 000000000006A198 default case, cases 2,4,5
cmp ebp, [r13+4]
jl loc_6A16C
loc_6A251:
inc r14
mov rax, [rbx+8]
mov rcx, [rbx+10h]
sub rcx, rax
shr rcx, 2
imul ecx, 0CCCCCCCDh
movsxd rcx, ecx
cmp r14, rcx
jl loc_6A132
loc_6A275:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6A284:
lea rdi, aArrayindexInde; "arrayIndex<(Index)GetNumPatchArrays()"
lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aPatchtablePatc; "PatchTable::PatchArray &OpenSubdiv::v3_"...
mov edx, 8Bh
call ___assert_fail
|
long long OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices(
OpenSubdiv::v3_6_0::Far::PatchTable *this)
{
unsigned int v2; // eax
long long result; // rax
long long v4; // r14
_DWORD *v5; // r13
int v6; // ebp
int v7; // r15d
_DWORD *PatchVertices; // rax
long long v9; // rcx
long long v10; // rdx
long long v11; // rsi
long long v12; // rdi
long long v13; // r9
long long v14; // r8
long long v15; // rcx
int v16; // [rsp+0h] [rbp-34h]
v2 = *((_DWORD *)this + 36) - 1;
v16 = -1;
if ( v2 <= 9 )
v16 = dword_B8750[v2];
result = *((_QWORD *)this + 1);
if ( (int)(-858993459 * ((unsigned long long)(*((_QWORD *)this + 2) - result) >> 2)) > 0 )
{
v4 = 0LL;
do
{
if ( v4 >= (int)(-858993459 * ((unsigned long long)(*((_QWORD *)this + 2) - result) >> 2)) )
__assert_fail(
"arrayIndex<(Index)GetNumPatchArrays()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp",
139LL,
"PatchTable::PatchArray &OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(Index)");
if ( *(int *)(result + 20 * v4 + 4) > 0 )
{
v5 = (_DWORD *)(result + 20 * v4);
v6 = 0;
v7 = *v5 - 3;
do
{
PatchVertices = (_DWORD *)OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchVertices(this, v4, v6);
v9 = v16 * (v6 + v5[3]);
switch ( v7 )
{
case 0:
v10 = *((_QWORD *)this + 19);
*(_DWORD *)(v10 + 4 * v9) = *PatchVertices;
*(_DWORD *)(v10 + 4 * v9 + 4) = PatchVertices[1];
v11 = 3LL;
v12 = 2LL;
v13 = 8LL;
v14 = 12LL;
goto LABEL_14;
case 1:
v10 = *((_QWORD *)this + 19);
*(_DWORD *)(v10 + 4 * v9) = *PatchVertices;
v11 = 2LL;
v12 = 1LL;
v13 = 4LL;
v14 = 8LL;
goto LABEL_14;
case 3:
v10 = *((_QWORD *)this + 19);
*(_DWORD *)(v10 + 4 * v9) = PatchVertices[5];
*(_DWORD *)(v10 + 4 * v9 + 4) = PatchVertices[6];
v14 = 12LL;
v11 = 9LL;
goto LABEL_13;
case 6:
v10 = *((_QWORD *)this + 19);
*(_DWORD *)(v10 + 4 * v9) = *PatchVertices;
*(_DWORD *)(v10 + 4 * v9 + 4) = PatchVertices[5];
v14 = 12LL;
v11 = 15LL;
LABEL_13:
v13 = 8LL;
v12 = 10LL;
LABEL_14:
v15 = v10 + 4 * v9;
*(_DWORD *)(v13 + v15) = PatchVertices[v12];
*(_DWORD *)(v14 + v15) = PatchVertices[v11];
break;
default:
break;
}
++v6;
}
while ( v6 < v5[1] );
}
++v4;
result = *((_QWORD *)this + 1);
}
while ( v4 < (int)(-858993459 * ((unsigned long long)(*((_QWORD *)this + 2) - result) >> 2)) );
}
return result;
}
|
populateVaryingVertices:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x90]
DEC EAX
MOV dword ptr [RSP + 0x4],0xffffffff
CMP EAX,0x9
JA 0x0016a10b
MOV EAX,EAX
LEA RCX,[0x1b8750]
MOV EAX,dword ptr [RCX + RAX*0x4]
MOV dword ptr [RSP + 0x4],EAX
LAB_0016a10b:
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
SUB RCX,RAX
SHR RCX,0x2
IMUL ECX,ECX,-0x33333333
TEST ECX,ECX
JLE 0x0016a275
XOR R14D,R14D
LEA R12,[0x1b8720]
LAB_0016a132:
MOV RCX,qword ptr [RBX + 0x10]
SUB RCX,RAX
SHR RCX,0x2
IMUL ECX,ECX,-0x33333333
MOVSXD RCX,ECX
CMP R14,RCX
JGE 0x0016a284
LEA RCX,[R14 + R14*0x4]
CMP dword ptr [RAX + RCX*0x4 + 0x4],0x0
JLE 0x0016a251
LEA R13,[RAX + RCX*0x4]
MOV R15D,dword ptr [R13]
XOR EBP,EBP
ADD R15D,-0x3
LAB_0016a16c:
MOV RDI,RBX
MOV ESI,R14D
MOV EDX,EBP
CALL 0x00138bf0
CMP R15D,0x6
JA 0x0016a245
MOV ECX,dword ptr [R13 + 0xc]
ADD ECX,EBP
IMUL ECX,dword ptr [RSP + 0x4]
MOVSXD RDX,dword ptr [R12 + R15*0x4]
ADD RDX,R12
MOVSXD RCX,ECX
switchD:
JMP RDX
caseD_3:
MOV ESI,dword ptr [RAX]
MOV RDX,qword ptr [RBX + 0x98]
MOV dword ptr [RDX + RCX*0x4],ESI
MOV ESI,dword ptr [RAX + 0x4]
MOV dword ptr [RDX + RCX*0x4 + 0x4],ESI
MOV ESI,0xc
MOV EDI,0x8
MOV R9D,0x8
MOV R8D,0xc
JMP 0x0016a233
caseD_6:
MOV ESI,dword ptr [RAX + 0x14]
MOV RDX,qword ptr [RBX + 0x98]
MOV dword ptr [RDX + RCX*0x4],ESI
MOV ESI,dword ptr [RAX + 0x18]
MOV dword ptr [RDX + RCX*0x4 + 0x4],ESI
MOV R8D,0xc
MOV ESI,0x24
JMP 0x0016a228
caseD_4:
MOV ESI,dword ptr [RAX]
MOV RDX,qword ptr [RBX + 0x98]
MOV dword ptr [RDX + RCX*0x4],ESI
MOV ESI,0x8
MOV EDI,0x4
MOV R9D,0x4
MOV R8D,0x8
JMP 0x0016a233
caseD_9:
MOV ESI,dword ptr [RAX]
MOV RDX,qword ptr [RBX + 0x98]
MOV dword ptr [RDX + RCX*0x4],ESI
MOV ESI,dword ptr [RAX + 0x14]
MOV dword ptr [RDX + RCX*0x4 + 0x4],ESI
MOV R8D,0xc
MOV ESI,0x3c
LAB_0016a228:
MOV R9D,0x8
MOV EDI,0x28
LAB_0016a233:
MOV EDI,dword ptr [RAX + RDI*0x1]
LEA RCX,[RDX + RCX*0x4]
MOV dword ptr [R9 + RCX*0x1],EDI
MOV EAX,dword ptr [RAX + RSI*0x1]
MOV dword ptr [R8 + RCX*0x1],EAX
caseD_5:
INC EBP
CMP EBP,dword ptr [R13 + 0x4]
JL 0x0016a16c
LAB_0016a251:
INC R14
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
SUB RCX,RAX
SHR RCX,0x2
IMUL ECX,ECX,-0x33333333
MOVSXD RCX,ECX
CMP R14,RCX
JL 0x0016a132
LAB_0016a275:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016a284:
LEA RDI,[0x1b8cfd]
LEA RSI,[0x1b87d2]
LEA RCX,[0x1b8d81]
MOV EDX,0x8b
CALL 0x00139560
|
/* OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices() */
void __thiscall OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices(PatchTable *this)
{
int *piVar1;
int iVar2;
int4 *puVar3;
long lVar4;
long lVar5;
int iVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
long lVar11;
int local_34;
local_34 = -1;
if (*(int *)(this + 0x90) - 1U < 10) {
local_34 = *(int *)(&DAT_001b8750 + (ulong)(*(int *)(this + 0x90) - 1U) * 4);
}
lVar4 = *(long *)(this + 8);
if (0 < (int)((ulong)(*(long *)(this + 0x10) - lVar4) >> 2) * -0x33333333) {
lVar11 = 0;
do {
if ((int)((ulong)(*(long *)(this + 0x10) - lVar4) >> 2) * -0x33333333 <= lVar11) {
/* WARNING: Subroutine does not return */
__assert_fail("arrayIndex<(Index)GetNumPatchArrays()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp"
,0x8b,
"PatchTable::PatchArray &OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(Index)"
);
}
if (0 < *(int *)(lVar4 + 4 + lVar11 * 0x14)) {
piVar1 = (int *)(lVar4 + lVar11 * 0x14);
iVar2 = *piVar1;
iVar6 = 0;
do {
puVar3 = (int4 *)GetPatchVertices(this,(int)lVar11,iVar6);
if (6 < iVar2 - 3U) goto switchD_0016a198_caseD_5;
lVar4 = (long)((piVar1[3] + iVar6) * local_34);
switch(iVar2) {
case 3:
lVar5 = *(long *)(this + 0x98);
*(int4 *)(lVar5 + lVar4 * 4) = *puVar3;
*(int4 *)(lVar5 + 4 + lVar4 * 4) = puVar3[1];
lVar7 = 0xc;
lVar8 = 8;
lVar10 = 8;
lVar9 = 0xc;
break;
case 4:
lVar5 = *(long *)(this + 0x98);
*(int4 *)(lVar5 + lVar4 * 4) = *puVar3;
lVar7 = 8;
lVar8 = 4;
lVar10 = 4;
lVar9 = 8;
break;
default:
goto switchD_0016a198_caseD_5;
case 6:
lVar5 = *(long *)(this + 0x98);
*(int4 *)(lVar5 + lVar4 * 4) = puVar3[5];
*(int4 *)(lVar5 + 4 + lVar4 * 4) = puVar3[6];
lVar7 = 0x24;
goto LAB_0016a228;
case 9:
lVar5 = *(long *)(this + 0x98);
*(int4 *)(lVar5 + lVar4 * 4) = *puVar3;
*(int4 *)(lVar5 + 4 + lVar4 * 4) = puVar3[5];
lVar7 = 0x3c;
LAB_0016a228:
lVar9 = 0xc;
lVar10 = 8;
lVar8 = 0x28;
}
lVar5 = lVar5 + lVar4 * 4;
*(int4 *)(lVar10 + lVar5) = *(int4 *)((long)puVar3 + lVar8);
*(int4 *)(lVar9 + lVar5) = *(int4 *)((long)puVar3 + lVar7);
switchD_0016a198_caseD_5:
iVar6 = iVar6 + 1;
} while (iVar6 < piVar1[1]);
}
lVar11 = lVar11 + 1;
lVar4 = *(long *)(this + 8);
} while (lVar11 < (int)((ulong)(*(long *)(this + 0x10) - lVar4) >> 2) * -0x33333333);
}
return;
}
|
|
18,590
|
OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
|
void
PatchTable::populateVaryingVertices() {
// In order to support evaluation of varying data we need to access
// the varying values indexed by the zero ring vertices of the vertex
// patch. This indexing is redundant for triangles and quads and
// could be made redunant for other patch types if we reorganized
// the vertex patch indices so that the zero ring indices always occured
// first. This will also need to be updated when we add support for
// triangle patches.
int numVaryingCVs = _varyingDesc.GetNumControlVertices();
for (int arrayIndex=0; arrayIndex<(int)_patchArrays.size(); ++arrayIndex) {
PatchArray const & pa = getPatchArray(arrayIndex);
PatchDescriptor::Type patchType = pa.desc.GetType();
for (int patch=0; patch<pa.numPatches; ++patch) {
ConstIndexArray vertexCVs = GetPatchVertices(arrayIndex, patch);
int start = (pa.patchIndex + patch) * numVaryingCVs;
if (patchType == PatchDescriptor::REGULAR) {
_varyingVerts[start+0] = vertexCVs[5];
_varyingVerts[start+1] = vertexCVs[6];
_varyingVerts[start+2] = vertexCVs[10];
_varyingVerts[start+3] = vertexCVs[9];
} else if (patchType == PatchDescriptor::GREGORY_BASIS) {
_varyingVerts[start+0] = vertexCVs[0];
_varyingVerts[start+1] = vertexCVs[5];
_varyingVerts[start+2] = vertexCVs[10];
_varyingVerts[start+3] = vertexCVs[15];
} else if (patchType == PatchDescriptor::QUADS) {
_varyingVerts[start+0] = vertexCVs[0];
_varyingVerts[start+1] = vertexCVs[1];
_varyingVerts[start+2] = vertexCVs[2];
_varyingVerts[start+3] = vertexCVs[3];
} else if (patchType == PatchDescriptor::TRIANGLES) {
_varyingVerts[start+0] = vertexCVs[0];
_varyingVerts[start+1] = vertexCVs[1];
_varyingVerts[start+2] = vertexCVs[2];
}
}
}
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x90, %rdi
callq 0x55c10
cwtl
movl %eax, 0x4(%rsp)
xorl %ebp, %ebp
leaq 0x46814(%rip), %r13 # 0xc2d30
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
cqto
pushq $0x14
popq %rcx
idivq %rcx
cmpl %eax, %ebp
jge 0x7c610
movq %rbx, %rdi
movl %ebp, %esi
callq 0x526f0
movq %rax, %r14
movl (%rax), %r12d
xorl %r15d, %r15d
addl $-0x3, %r12d
cmpl 0x4(%r14), %r15d
jge 0x7c609
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x50250
cmpl $0x6, %r12d
ja 0x7c601
movl 0xc(%r14), %ecx
addl %r15d, %ecx
imull 0x4(%rsp), %ecx
movslq (%r13,%r12,4), %rdx
addq %r13, %rdx
movslq %ecx, %rcx
jmpq *%rdx
movl (%rax), %edx
movq 0x98(%rbx), %rsi
movl %edx, (%rsi,%rcx,4)
movl 0x4(%rax), %edx
movl %edx, 0x4(%rsi,%rcx,4)
movl 0x8(%rax), %edx
movl %edx, 0x8(%rsi,%rcx,4)
movl 0xc(%rax), %eax
jmp 0x7c5fd
movl 0x14(%rax), %edx
movq 0x98(%rbx), %rsi
movl %edx, (%rsi,%rcx,4)
movl 0x18(%rax), %edx
movl %edx, 0x4(%rsi,%rcx,4)
movl 0x28(%rax), %edx
movl %edx, 0x8(%rsi,%rcx,4)
movl 0x24(%rax), %eax
jmp 0x7c5fd
movl (%rax), %edx
movq 0x98(%rbx), %rsi
movl %edx, (%rsi,%rcx,4)
movl 0x4(%rax), %edx
movl %edx, 0x4(%rsi,%rcx,4)
movl 0x8(%rax), %eax
movl %eax, 0x8(%rsi,%rcx,4)
jmp 0x7c601
movl (%rax), %edx
movq 0x98(%rbx), %rsi
movl %edx, (%rsi,%rcx,4)
movl 0x14(%rax), %edx
movl %edx, 0x4(%rsi,%rcx,4)
movl 0x28(%rax), %edx
movl %edx, 0x8(%rsi,%rcx,4)
movl 0x3c(%rax), %eax
movl %eax, 0xc(%rsi,%rcx,4)
incl %r15d
jmp 0x7c54b
incl %ebp
jmp 0x7c51c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Far10PatchTable23populateVaryingVerticesEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
add rdi, 90h; this
call __ZNK10OpenSubdiv6v3_6_03Far15PatchDescriptor21GetNumControlVerticesEv; OpenSubdiv::v3_6_0::Far::PatchDescriptor::GetNumControlVertices(void)
cwde
mov [rsp+38h+var_34], eax
xor ebp, ebp
lea r13, jpt_7C583
loc_7C51C:
mov rax, [rbx+10h]
sub rax, [rbx+8]
cqo
push 14h
pop rcx
idiv rcx
cmp ebp, eax
jge loc_7C610
mov rdi, rbx; this
mov esi, ebp; int
call __ZN10OpenSubdiv6v3_6_03Far10PatchTable13getPatchArrayEi; OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(int)
mov r14, rax
mov r12d, [rax]
xor r15d, r15d
add r12d, 0FFFFFFFDh
loc_7C54B:
cmp r15d, [r14+4]
jge loc_7C609
mov rdi, rbx; this
mov esi, ebp; int
mov edx, r15d; int
call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable16GetPatchVerticesEii; OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchVertices(int,int)
cmp r12d, 6; switch 7 cases
ja def_7C583; jumptable 000000000007C583 default case, cases 2,4,5
mov ecx, [r14+0Ch]
add ecx, r15d
imul ecx, [rsp+38h+var_34]
movsxd rdx, ds:(jpt_7C583 - 0C2D30h)[r13+r12*4]
add rdx, r13
movsxd rcx, ecx
jmp rdx; switch jump
loc_7C585:
mov edx, [rax]; jumptable 000000000007C583 case 0
mov rsi, [rbx+98h]
mov [rsi+rcx*4], edx
mov edx, [rax+4]
mov [rsi+rcx*4+4], edx
mov edx, [rax+8]
mov [rsi+rcx*4+8], edx
mov eax, [rax+0Ch]
jmp short loc_7C5FD
loc_7C5A4:
mov edx, [rax+14h]; jumptable 000000000007C583 case 3
mov rsi, [rbx+98h]
mov [rsi+rcx*4], edx
mov edx, [rax+18h]
mov [rsi+rcx*4+4], edx
mov edx, [rax+28h]
mov [rsi+rcx*4+8], edx
mov eax, [rax+24h]
jmp short loc_7C5FD
loc_7C5C4:
mov edx, [rax]; jumptable 000000000007C583 case 1
mov rsi, [rbx+98h]
mov [rsi+rcx*4], edx
mov edx, [rax+4]
mov [rsi+rcx*4+4], edx
mov eax, [rax+8]
mov [rsi+rcx*4+8], eax
jmp short def_7C583; jumptable 000000000007C583 default case, cases 2,4,5
loc_7C5E0:
mov edx, [rax]; jumptable 000000000007C583 case 6
mov rsi, [rbx+98h]
mov [rsi+rcx*4], edx
mov edx, [rax+14h]
mov [rsi+rcx*4+4], edx
mov edx, [rax+28h]
mov [rsi+rcx*4+8], edx
mov eax, [rax+3Ch]
loc_7C5FD:
mov [rsi+rcx*4+0Ch], eax
def_7C583:
inc r15d; jumptable 000000000007C583 default case, cases 2,4,5
jmp loc_7C54B
loc_7C609:
inc ebp
jmp loc_7C51C
loc_7C610:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices(
OpenSubdiv::v3_6_0::Far::PatchTable *this)
{
int i; // ebp
long long result; // rax
_DWORD *PatchArray; // r14
int v4; // r15d
int v5; // r12d
_DWORD *PatchVertices; // rax
long long v7; // rcx
long long v8; // rsi
int v9; // eax
long long v10; // rsi
int NumControlVertices; // [rsp+0h] [rbp-34h]
NumControlVertices = (__int16)OpenSubdiv::v3_6_0::Far::PatchDescriptor::GetNumControlVertices((OpenSubdiv::v3_6_0::Far::PatchTable *)((char *)this + 144));
for ( i = 0; ; ++i )
{
result = (*((_QWORD *)this + 2) - *((_QWORD *)this + 1)) / 20LL;
if ( i >= (int)result )
break;
PatchArray = (_DWORD *)OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(this, i);
v4 = 0;
v5 = *PatchArray - 3;
while ( v4 < PatchArray[1] )
{
PatchVertices = (_DWORD *)OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchVertices(this, i, v4);
v7 = NumControlVertices * (v4 + PatchArray[3]);
switch ( v5 )
{
case 0:
v8 = *((_QWORD *)this + 19);
*(_DWORD *)(v8 + 4 * v7) = *PatchVertices;
*(_DWORD *)(v8 + 4 * v7 + 4) = PatchVertices[1];
*(_DWORD *)(v8 + 4 * v7 + 8) = PatchVertices[2];
v9 = PatchVertices[3];
goto LABEL_10;
case 1:
v10 = *((_QWORD *)this + 19);
*(_DWORD *)(v10 + 4 * v7) = *PatchVertices;
*(_DWORD *)(v10 + 4 * v7 + 4) = PatchVertices[1];
*(_DWORD *)(v10 + 4 * v7 + 8) = PatchVertices[2];
break;
case 3:
v8 = *((_QWORD *)this + 19);
*(_DWORD *)(v8 + 4 * v7) = PatchVertices[5];
*(_DWORD *)(v8 + 4 * v7 + 4) = PatchVertices[6];
*(_DWORD *)(v8 + 4 * v7 + 8) = PatchVertices[10];
v9 = PatchVertices[9];
goto LABEL_10;
case 6:
v8 = *((_QWORD *)this + 19);
*(_DWORD *)(v8 + 4 * v7) = *PatchVertices;
*(_DWORD *)(v8 + 4 * v7 + 4) = PatchVertices[5];
*(_DWORD *)(v8 + 4 * v7 + 8) = PatchVertices[10];
v9 = PatchVertices[15];
LABEL_10:
*(_DWORD *)(v8 + 4 * v7 + 12) = v9;
break;
default:
break;
}
++v4;
}
}
return result;
}
|
populateVaryingVertices:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
ADD RDI,0x90
CALL 0x00155c10
CWDE
MOV dword ptr [RSP + 0x4],EAX
XOR EBP,EBP
LEA R13,[0x1c2d30]
LAB_0017c51c:
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
CQO
PUSH 0x14
POP RCX
IDIV RCX
CMP EBP,EAX
JGE 0x0017c610
MOV RDI,RBX
MOV ESI,EBP
CALL 0x001526f0
MOV R14,RAX
MOV R12D,dword ptr [RAX]
XOR R15D,R15D
ADD R12D,-0x3
LAB_0017c54b:
CMP R15D,dword ptr [R14 + 0x4]
JGE 0x0017c609
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,R15D
CALL 0x00150250
CMP R12D,0x6
JA 0x0017c601
MOV ECX,dword ptr [R14 + 0xc]
ADD ECX,R15D
IMUL ECX,dword ptr [RSP + 0x4]
MOVSXD RDX,dword ptr [R13 + R12*0x4]
ADD RDX,R13
MOVSXD RCX,ECX
switchD:
JMP RDX
caseD_3:
MOV EDX,dword ptr [RAX]
MOV RSI,qword ptr [RBX + 0x98]
MOV dword ptr [RSI + RCX*0x4],EDX
MOV EDX,dword ptr [RAX + 0x4]
MOV dword ptr [RSI + RCX*0x4 + 0x4],EDX
MOV EDX,dword ptr [RAX + 0x8]
MOV dword ptr [RSI + RCX*0x4 + 0x8],EDX
MOV EAX,dword ptr [RAX + 0xc]
JMP 0x0017c5fd
caseD_6:
MOV EDX,dword ptr [RAX + 0x14]
MOV RSI,qword ptr [RBX + 0x98]
MOV dword ptr [RSI + RCX*0x4],EDX
MOV EDX,dword ptr [RAX + 0x18]
MOV dword ptr [RSI + RCX*0x4 + 0x4],EDX
MOV EDX,dword ptr [RAX + 0x28]
MOV dword ptr [RSI + RCX*0x4 + 0x8],EDX
MOV EAX,dword ptr [RAX + 0x24]
JMP 0x0017c5fd
caseD_4:
MOV EDX,dword ptr [RAX]
MOV RSI,qword ptr [RBX + 0x98]
MOV dword ptr [RSI + RCX*0x4],EDX
MOV EDX,dword ptr [RAX + 0x4]
MOV dword ptr [RSI + RCX*0x4 + 0x4],EDX
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RSI + RCX*0x4 + 0x8],EAX
JMP 0x0017c601
caseD_9:
MOV EDX,dword ptr [RAX]
MOV RSI,qword ptr [RBX + 0x98]
MOV dword ptr [RSI + RCX*0x4],EDX
MOV EDX,dword ptr [RAX + 0x14]
MOV dword ptr [RSI + RCX*0x4 + 0x4],EDX
MOV EDX,dword ptr [RAX + 0x28]
MOV dword ptr [RSI + RCX*0x4 + 0x8],EDX
MOV EAX,dword ptr [RAX + 0x3c]
LAB_0017c5fd:
MOV dword ptr [RSI + RCX*0x4 + 0xc],EAX
caseD_5:
INC R15D
JMP 0x0017c54b
LAB_0017c609:
INC EBP
JMP 0x0017c51c
LAB_0017c610:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices() */
void __thiscall OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices(PatchTable *this)
{
int iVar1;
short sVar2;
int4 uVar3;
int *piVar4;
int4 *puVar5;
long lVar6;
int iVar7;
long lVar8;
int iVar9;
sVar2 = PatchDescriptor::GetNumControlVertices((PatchDescriptor *)(this + 0x90));
iVar7 = 0;
do {
if ((int)((*(long *)(this + 0x10) - *(long *)(this + 8)) / 0x14) <= iVar7) {
return;
}
piVar4 = (int *)getPatchArray(this,iVar7);
iVar1 = *piVar4;
for (iVar9 = 0; iVar9 < piVar4[1]; iVar9 = iVar9 + 1) {
puVar5 = (int4 *)GetPatchVertices(this,iVar7,iVar9);
if (6 < iVar1 - 3U) goto switchD_0017c583_caseD_5;
lVar6 = (long)((piVar4[3] + iVar9) * (int)sVar2);
switch(iVar1) {
case 3:
lVar8 = *(long *)(this + 0x98);
*(int4 *)(lVar8 + lVar6 * 4) = *puVar5;
*(int4 *)(lVar8 + 4 + lVar6 * 4) = puVar5[1];
*(int4 *)(lVar8 + 8 + lVar6 * 4) = puVar5[2];
uVar3 = puVar5[3];
break;
case 4:
lVar8 = *(long *)(this + 0x98);
*(int4 *)(lVar8 + lVar6 * 4) = *puVar5;
*(int4 *)(lVar8 + 4 + lVar6 * 4) = puVar5[1];
*(int4 *)(lVar8 + 8 + lVar6 * 4) = puVar5[2];
default:
goto switchD_0017c583_caseD_5;
case 6:
lVar8 = *(long *)(this + 0x98);
*(int4 *)(lVar8 + lVar6 * 4) = puVar5[5];
*(int4 *)(lVar8 + 4 + lVar6 * 4) = puVar5[6];
*(int4 *)(lVar8 + 8 + lVar6 * 4) = puVar5[10];
uVar3 = puVar5[9];
break;
case 9:
lVar8 = *(long *)(this + 0x98);
*(int4 *)(lVar8 + lVar6 * 4) = *puVar5;
*(int4 *)(lVar8 + 4 + lVar6 * 4) = puVar5[5];
*(int4 *)(lVar8 + 8 + lVar6 * 4) = puVar5[10];
uVar3 = puVar5[0xf];
}
*(int4 *)(lVar8 + 0xc + lVar6 * 4) = uVar3;
switchD_0017c583_caseD_5:
}
iVar7 = iVar7 + 1;
} while( true );
}
|
|
18,591
|
OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
|
void
PatchTable::populateVaryingVertices() {
// In order to support evaluation of varying data we need to access
// the varying values indexed by the zero ring vertices of the vertex
// patch. This indexing is redundant for triangles and quads and
// could be made redunant for other patch types if we reorganized
// the vertex patch indices so that the zero ring indices always occured
// first. This will also need to be updated when we add support for
// triangle patches.
int numVaryingCVs = _varyingDesc.GetNumControlVertices();
for (int arrayIndex=0; arrayIndex<(int)_patchArrays.size(); ++arrayIndex) {
PatchArray const & pa = getPatchArray(arrayIndex);
PatchDescriptor::Type patchType = pa.desc.GetType();
for (int patch=0; patch<pa.numPatches; ++patch) {
ConstIndexArray vertexCVs = GetPatchVertices(arrayIndex, patch);
int start = (pa.patchIndex + patch) * numVaryingCVs;
if (patchType == PatchDescriptor::REGULAR) {
_varyingVerts[start+0] = vertexCVs[5];
_varyingVerts[start+1] = vertexCVs[6];
_varyingVerts[start+2] = vertexCVs[10];
_varyingVerts[start+3] = vertexCVs[9];
} else if (patchType == PatchDescriptor::GREGORY_BASIS) {
_varyingVerts[start+0] = vertexCVs[0];
_varyingVerts[start+1] = vertexCVs[5];
_varyingVerts[start+2] = vertexCVs[10];
_varyingVerts[start+3] = vertexCVs[15];
} else if (patchType == PatchDescriptor::QUADS) {
_varyingVerts[start+0] = vertexCVs[0];
_varyingVerts[start+1] = vertexCVs[1];
_varyingVerts[start+2] = vertexCVs[2];
_varyingVerts[start+3] = vertexCVs[3];
} else if (patchType == PatchDescriptor::TRIANGLES) {
_varyingVerts[start+0] = vertexCVs[0];
_varyingVerts[start+1] = vertexCVs[1];
_varyingVerts[start+2] = vertexCVs[2];
}
}
}
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x90(%rdi), %eax
decl %eax
movl $0xffffffff, 0x4(%rsp) # imm = 0xFFFFFFFF
cmpl $0x9, %eax
ja 0x6b5ef
movl %eax, %eax
leaq 0x508a8(%rip), %rcx # 0xbbe90
movl (%rcx,%rax,4), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x2, %rdx
imull $0xcccccccd, %edx, %edx # imm = 0xCCCCCCCD
testl %edx, %edx
jle 0x6b73d
xorl %r14d, %r14d
leaq 0x50847(%rip), %r12 # 0xbbe60
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x2, %rdx
imull $0xcccccccd, %edx, %edx # imm = 0xCCCCCCCD
movslq %edx, %rdx
cmpq %rdx, %r14
jge 0x6b74c
leaq (%r14,%r14,4), %rdx
cmpl $0x0, 0x4(%rax,%rdx,4)
jle 0x6b71e
leaq (%rax,%rdx,4), %r13
movl (%r13), %r15d
xorl %ebp, %ebp
addl $-0x3, %r15d
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x38bf0
cmpl $0x6, %r15d
ja 0x6b705
movl 0xc(%r13), %ecx
addl %ebp, %ecx
imull 0x4(%rsp), %ecx
movslq (%r12,%r15,4), %rdx
addq %r12, %rdx
jmpq *%rdx
movl (%rax), %edx
movslq %ecx, %rcx
movq 0x98(%rbx), %rsi
movl %edx, (%rsi,%rcx,4)
movl 0x4(%rax), %edx
movl %edx, 0x4(%rsi,%rcx,4)
movl 0x8(%rax), %edx
movl %edx, 0x8(%rsi,%rcx,4)
movl 0xc(%rax), %eax
jmp 0x6b701
movl 0x14(%rax), %edx
movslq %ecx, %rcx
movq 0x98(%rbx), %rsi
movl %edx, (%rsi,%rcx,4)
movl 0x18(%rax), %edx
movl %edx, 0x4(%rsi,%rcx,4)
movl 0x28(%rax), %edx
movl %edx, 0x8(%rsi,%rcx,4)
movl 0x24(%rax), %eax
jmp 0x6b701
movl (%rax), %edx
movslq %ecx, %rcx
movq 0x98(%rbx), %rsi
movl %edx, (%rsi,%rcx,4)
movl 0x4(%rax), %edx
movl %edx, 0x4(%rsi,%rcx,4)
movl 0x8(%rax), %eax
movl %eax, 0x8(%rsi,%rcx,4)
jmp 0x6b705
movl (%rax), %edx
movslq %ecx, %rcx
movq 0x98(%rbx), %rsi
movl %edx, (%rsi,%rcx,4)
movl 0x14(%rax), %edx
movl %edx, 0x4(%rsi,%rcx,4)
movl 0x28(%rax), %edx
movl %edx, 0x8(%rsi,%rcx,4)
movl 0x3c(%rax), %eax
movl %eax, 0xc(%rsi,%rcx,4)
incl %ebp
cmpl 0x4(%r13), %ebp
jl 0x6b652
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdx
movq %rdx, %rcx
jmp 0x6b721
movq %rcx, %rdx
incq %r14
subq %rax, %rdx
shrq $0x2, %rdx
imull $0xcccccccd, %edx, %edx # imm = 0xCCCCCCCD
movslq %edx, %rdx
cmpq %rdx, %r14
jl 0x6b619
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50cea(%rip), %rdi # 0xbc43d
leaq 0x507b8(%rip), %rsi # 0xbbf12
leaq 0x50d60(%rip), %rcx # 0xbc4c1
movl $0x8b, %edx
callq 0x39540
nop
|
_ZN10OpenSubdiv6v3_6_03Far10PatchTable23populateVaryingVerticesEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov eax, [rdi+90h]
dec eax
mov [rsp+38h+var_34], 0FFFFFFFFh
cmp eax, 9
ja short loc_6B5EF
mov eax, eax
lea rcx, dword_BBE90
mov eax, [rcx+rax*4]
mov [rsp+38h+var_34], eax
loc_6B5EF:
mov rax, [rbx+8]
mov rcx, [rbx+10h]
mov rdx, rcx
sub rdx, rax
shr rdx, 2
imul edx, 0CCCCCCCDh
test edx, edx
jle loc_6B73D
xor r14d, r14d
lea r12, jpt_6B67B
loc_6B619:
mov rdx, rcx
sub rdx, rax
shr rdx, 2
imul edx, 0CCCCCCCDh
movsxd rdx, edx
cmp r14, rdx
jge loc_6B74C
lea rdx, [r14+r14*4]
cmp dword ptr [rax+rdx*4+4], 0
jle loc_6B71E
lea r13, [rax+rdx*4]
mov r15d, [r13+0]
xor ebp, ebp
add r15d, 0FFFFFFFDh
loc_6B652:
mov rdi, rbx; this
mov esi, r14d; int
mov edx, ebp; int
call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable16GetPatchVerticesEii; OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchVertices(int,int)
cmp r15d, 6; switch 7 cases
ja def_6B67B; jumptable 000000000006B67B default case, cases 2,4,5
mov ecx, [r13+0Ch]
add ecx, ebp
imul ecx, [rsp+38h+var_34]
movsxd rdx, ds:(jpt_6B67B - 0BBE60h)[r12+r15*4]
add rdx, r12
jmp rdx; switch jump
loc_6B67D:
mov edx, [rax]; jumptable 000000000006B67B case 0
movsxd rcx, ecx
mov rsi, [rbx+98h]
mov [rsi+rcx*4], edx
mov edx, [rax+4]
mov [rsi+rcx*4+4], edx
mov edx, [rax+8]
mov [rsi+rcx*4+8], edx
mov eax, [rax+0Ch]
jmp short loc_6B701
loc_6B69F:
mov edx, [rax+14h]; jumptable 000000000006B67B case 3
movsxd rcx, ecx
mov rsi, [rbx+98h]
mov [rsi+rcx*4], edx
mov edx, [rax+18h]
mov [rsi+rcx*4+4], edx
mov edx, [rax+28h]
mov [rsi+rcx*4+8], edx
mov eax, [rax+24h]
jmp short loc_6B701
loc_6B6C2:
mov edx, [rax]; jumptable 000000000006B67B case 1
movsxd rcx, ecx
mov rsi, [rbx+98h]
mov [rsi+rcx*4], edx
mov edx, [rax+4]
mov [rsi+rcx*4+4], edx
mov eax, [rax+8]
mov [rsi+rcx*4+8], eax
jmp short def_6B67B; jumptable 000000000006B67B default case, cases 2,4,5
loc_6B6E1:
mov edx, [rax]; jumptable 000000000006B67B case 6
movsxd rcx, ecx
mov rsi, [rbx+98h]
mov [rsi+rcx*4], edx
mov edx, [rax+14h]
mov [rsi+rcx*4+4], edx
mov edx, [rax+28h]
mov [rsi+rcx*4+8], edx
mov eax, [rax+3Ch]
loc_6B701:
mov [rsi+rcx*4+0Ch], eax
def_6B67B:
inc ebp; jumptable 000000000006B67B default case, cases 2,4,5
cmp ebp, [r13+4]
jl loc_6B652
mov rax, [rbx+8]
mov rdx, [rbx+10h]
mov rcx, rdx
jmp short loc_6B721
loc_6B71E:
mov rdx, rcx
loc_6B721:
inc r14
sub rdx, rax
shr rdx, 2
imul edx, 0CCCCCCCDh
movsxd rdx, edx
cmp r14, rdx
jl loc_6B619
loc_6B73D:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6B74C:
lea rdi, aArrayindexInde; "arrayIndex<(Index)GetNumPatchArrays()"
lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aPatchtablePatc; "PatchTable::PatchArray &OpenSubdiv::v3_"...
mov edx, 8Bh
call ___assert_fail
|
long long OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices(
OpenSubdiv::v3_6_0::Far::PatchTable *this)
{
unsigned int v1; // eax
long long result; // rax
long long v3; // rcx
long long v4; // r14
_DWORD *v5; // r13
int v6; // ebp
int v7; // r15d
_DWORD *PatchVertices; // rax
long long v9; // rcx
long long v10; // rsi
int v11; // eax
long long v12; // rsi
long long v13; // rdx
int v14; // [rsp+0h] [rbp-34h]
v1 = *((_DWORD *)this + 36) - 1;
v14 = -1;
if ( v1 <= 9 )
v14 = dword_BBE90[v1];
result = *((_QWORD *)this + 1);
v3 = *((_QWORD *)this + 2);
if ( (int)(-858993459 * ((unsigned long long)(v3 - result) >> 2)) > 0 )
{
v4 = 0LL;
do
{
if ( v4 >= (int)(-858993459 * ((unsigned long long)(v3 - result) >> 2)) )
__assert_fail(
"arrayIndex<(Index)GetNumPatchArrays()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp",
139LL,
"PatchTable::PatchArray &OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(Index)");
if ( *(int *)(result + 20 * v4 + 4) <= 0 )
{
v13 = v3;
}
else
{
v5 = (_DWORD *)(result + 20 * v4);
v6 = 0;
v7 = *v5 - 3;
do
{
PatchVertices = (_DWORD *)OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchVertices(this, v4, v6);
LODWORD(v9) = v14 * (v6 + v5[3]);
switch ( v7 )
{
case 0:
v9 = (int)v9;
v10 = *((_QWORD *)this + 19);
*(_DWORD *)(v10 + 4LL * (int)v9) = *PatchVertices;
*(_DWORD *)(v10 + 4LL * (int)v9 + 4) = PatchVertices[1];
*(_DWORD *)(v10 + 4LL * (int)v9 + 8) = PatchVertices[2];
v11 = PatchVertices[3];
goto LABEL_13;
case 1:
v12 = *((_QWORD *)this + 19);
*(_DWORD *)(v12 + 4LL * (int)v9) = *PatchVertices;
*(_DWORD *)(v12 + 4LL * (int)v9 + 4) = PatchVertices[1];
*(_DWORD *)(v12 + 4LL * (int)v9 + 8) = PatchVertices[2];
break;
case 3:
v9 = (int)v9;
v10 = *((_QWORD *)this + 19);
*(_DWORD *)(v10 + 4LL * (int)v9) = PatchVertices[5];
*(_DWORD *)(v10 + 4LL * (int)v9 + 4) = PatchVertices[6];
*(_DWORD *)(v10 + 4LL * (int)v9 + 8) = PatchVertices[10];
v11 = PatchVertices[9];
goto LABEL_13;
case 6:
v9 = (int)v9;
v10 = *((_QWORD *)this + 19);
*(_DWORD *)(v10 + 4LL * (int)v9) = *PatchVertices;
*(_DWORD *)(v10 + 4LL * (int)v9 + 4) = PatchVertices[5];
*(_DWORD *)(v10 + 4LL * (int)v9 + 8) = PatchVertices[10];
v11 = PatchVertices[15];
LABEL_13:
*(_DWORD *)(v10 + 4 * v9 + 12) = v11;
break;
default:
break;
}
++v6;
}
while ( v6 < v5[1] );
result = *((_QWORD *)this + 1);
v13 = *((_QWORD *)this + 2);
v3 = v13;
}
++v4;
}
while ( v4 < (int)(-858993459 * ((unsigned long long)(v13 - result) >> 2)) );
}
return result;
}
|
populateVaryingVertices:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x90]
DEC EAX
MOV dword ptr [RSP + 0x4],0xffffffff
CMP EAX,0x9
JA 0x0016b5ef
MOV EAX,EAX
LEA RCX,[0x1bbe90]
MOV EAX,dword ptr [RCX + RAX*0x4]
MOV dword ptr [RSP + 0x4],EAX
LAB_0016b5ef:
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
MOV RDX,RCX
SUB RDX,RAX
SHR RDX,0x2
IMUL EDX,EDX,-0x33333333
TEST EDX,EDX
JLE 0x0016b73d
XOR R14D,R14D
LEA R12,[0x1bbe60]
LAB_0016b619:
MOV RDX,RCX
SUB RDX,RAX
SHR RDX,0x2
IMUL EDX,EDX,-0x33333333
MOVSXD RDX,EDX
CMP R14,RDX
JGE 0x0016b74c
LEA RDX,[R14 + R14*0x4]
CMP dword ptr [RAX + RDX*0x4 + 0x4],0x0
JLE 0x0016b71e
LEA R13,[RAX + RDX*0x4]
MOV R15D,dword ptr [R13]
XOR EBP,EBP
ADD R15D,-0x3
LAB_0016b652:
MOV RDI,RBX
MOV ESI,R14D
MOV EDX,EBP
CALL 0x00138bf0
CMP R15D,0x6
JA 0x0016b705
MOV ECX,dword ptr [R13 + 0xc]
ADD ECX,EBP
IMUL ECX,dword ptr [RSP + 0x4]
MOVSXD RDX,dword ptr [R12 + R15*0x4]
ADD RDX,R12
switchD:
JMP RDX
caseD_3:
MOV EDX,dword ptr [RAX]
MOVSXD RCX,ECX
MOV RSI,qword ptr [RBX + 0x98]
MOV dword ptr [RSI + RCX*0x4],EDX
MOV EDX,dword ptr [RAX + 0x4]
MOV dword ptr [RSI + RCX*0x4 + 0x4],EDX
MOV EDX,dword ptr [RAX + 0x8]
MOV dword ptr [RSI + RCX*0x4 + 0x8],EDX
MOV EAX,dword ptr [RAX + 0xc]
JMP 0x0016b701
caseD_6:
MOV EDX,dword ptr [RAX + 0x14]
MOVSXD RCX,ECX
MOV RSI,qword ptr [RBX + 0x98]
MOV dword ptr [RSI + RCX*0x4],EDX
MOV EDX,dword ptr [RAX + 0x18]
MOV dword ptr [RSI + RCX*0x4 + 0x4],EDX
MOV EDX,dword ptr [RAX + 0x28]
MOV dword ptr [RSI + RCX*0x4 + 0x8],EDX
MOV EAX,dword ptr [RAX + 0x24]
JMP 0x0016b701
caseD_4:
MOV EDX,dword ptr [RAX]
MOVSXD RCX,ECX
MOV RSI,qword ptr [RBX + 0x98]
MOV dword ptr [RSI + RCX*0x4],EDX
MOV EDX,dword ptr [RAX + 0x4]
MOV dword ptr [RSI + RCX*0x4 + 0x4],EDX
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RSI + RCX*0x4 + 0x8],EAX
JMP 0x0016b705
caseD_9:
MOV EDX,dword ptr [RAX]
MOVSXD RCX,ECX
MOV RSI,qword ptr [RBX + 0x98]
MOV dword ptr [RSI + RCX*0x4],EDX
MOV EDX,dword ptr [RAX + 0x14]
MOV dword ptr [RSI + RCX*0x4 + 0x4],EDX
MOV EDX,dword ptr [RAX + 0x28]
MOV dword ptr [RSI + RCX*0x4 + 0x8],EDX
MOV EAX,dword ptr [RAX + 0x3c]
LAB_0016b701:
MOV dword ptr [RSI + RCX*0x4 + 0xc],EAX
caseD_5:
INC EBP
CMP EBP,dword ptr [R13 + 0x4]
JL 0x0016b652
MOV RAX,qword ptr [RBX + 0x8]
MOV RDX,qword ptr [RBX + 0x10]
MOV RCX,RDX
JMP 0x0016b721
LAB_0016b71e:
MOV RDX,RCX
LAB_0016b721:
INC R14
SUB RDX,RAX
SHR RDX,0x2
IMUL EDX,EDX,-0x33333333
MOVSXD RDX,EDX
CMP R14,RDX
JL 0x0016b619
LAB_0016b73d:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016b74c:
LEA RDI,[0x1bc43d]
LEA RSI,[0x1bbf12]
LEA RCX,[0x1bc4c1]
MOV EDX,0x8b
CALL 0x00139540
|
/* OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices() */
void __thiscall OpenSubdiv::v3_6_0::Far::PatchTable::populateVaryingVertices(PatchTable *this)
{
int *piVar1;
int iVar2;
int4 uVar3;
int4 *puVar4;
long lVar5;
int iVar6;
long lVar7;
int iVar8;
long lVar9;
int local_34;
local_34 = -1;
if (*(int *)(this + 0x90) - 1U < 10) {
local_34 = *(int *)(&DAT_001bbe90 + (ulong)(*(int *)(this + 0x90) - 1U) * 4);
}
lVar5 = *(long *)(this + 8);
lVar7 = *(long *)(this + 0x10);
if (0 < (int)((ulong)(lVar7 - lVar5) >> 2) * -0x33333333) {
lVar9 = 0;
do {
if ((int)((ulong)(lVar7 - lVar5) >> 2) * -0x33333333 <= lVar9) {
/* WARNING: Subroutine does not return */
__assert_fail("arrayIndex<(Index)GetNumPatchArrays()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp"
,0x8b,
"PatchTable::PatchArray &OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(Index)"
);
}
if (0 < *(int *)(lVar5 + 4 + lVar9 * 0x14)) {
piVar1 = (int *)(lVar5 + lVar9 * 0x14);
iVar2 = *piVar1;
iVar8 = 0;
do {
puVar4 = (int4 *)GetPatchVertices(this,(int)lVar9,iVar8);
if (6 < iVar2 - 3U) goto switchD_0016b67b_caseD_5;
iVar6 = (piVar1[3] + iVar8) * local_34;
switch(iVar2) {
case 3:
lVar7 = (long)iVar6;
lVar5 = *(long *)(this + 0x98);
*(int4 *)(lVar5 + lVar7 * 4) = *puVar4;
*(int4 *)(lVar5 + 4 + lVar7 * 4) = puVar4[1];
*(int4 *)(lVar5 + 8 + lVar7 * 4) = puVar4[2];
uVar3 = puVar4[3];
break;
case 4:
lVar7 = (long)iVar6;
lVar5 = *(long *)(this + 0x98);
*(int4 *)(lVar5 + lVar7 * 4) = *puVar4;
*(int4 *)(lVar5 + 4 + lVar7 * 4) = puVar4[1];
*(int4 *)(lVar5 + 8 + lVar7 * 4) = puVar4[2];
default:
goto switchD_0016b67b_caseD_5;
case 6:
lVar7 = (long)iVar6;
lVar5 = *(long *)(this + 0x98);
*(int4 *)(lVar5 + lVar7 * 4) = puVar4[5];
*(int4 *)(lVar5 + 4 + lVar7 * 4) = puVar4[6];
*(int4 *)(lVar5 + 8 + lVar7 * 4) = puVar4[10];
uVar3 = puVar4[9];
break;
case 9:
lVar7 = (long)iVar6;
lVar5 = *(long *)(this + 0x98);
*(int4 *)(lVar5 + lVar7 * 4) = *puVar4;
*(int4 *)(lVar5 + 4 + lVar7 * 4) = puVar4[5];
*(int4 *)(lVar5 + 8 + lVar7 * 4) = puVar4[10];
uVar3 = puVar4[0xf];
}
*(int4 *)(lVar5 + 0xc + (long)iVar6 * 4) = uVar3;
switchD_0016b67b_caseD_5:
iVar8 = iVar8 + 1;
} while (iVar8 < piVar1[1]);
lVar5 = *(long *)(this + 8);
lVar7 = *(long *)(this + 0x10);
}
lVar9 = lVar9 + 1;
} while (lVar9 < (int)((ulong)(lVar7 - lVar5) >> 2) * -0x33333333);
}
return;
}
|
|
18,592
|
my_copy_fix_mb
|
eloqsql/strings/ctype-mb.c
|
size_t
my_copy_fix_mb(CHARSET_INFO *cs,
char *dst, size_t dst_length,
const char *src, size_t src_length,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t well_formed_nchars;
size_t well_formed_length;
size_t fixed_length;
size_t min_length= MY_MIN(src_length, dst_length);
well_formed_nchars= my_ci_well_formed_char_length(cs, src, src + min_length,
nchars, status);
DBUG_ASSERT(well_formed_nchars <= nchars);
well_formed_length= status->m_source_end_pos - src;
if (well_formed_length)
memmove(dst, src, well_formed_length);
if (!status->m_well_formed_error_pos)
return well_formed_length;
fixed_length= my_append_fix_badly_formed_tail(cs,
dst + well_formed_length,
dst + dst_length,
src + well_formed_length,
src + src_length,
nchars - well_formed_nchars,
status);
return well_formed_length + fixed_length;
}
|
O3
|
c
|
my_copy_fix_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq 0x10(%rbp), %rbx
cmpq %rdx, %r8
movq %r8, -0x58(%rbp)
cmovbq %r8, %rdx
addq %rcx, %rdx
movq 0xb8(%rdi), %rax
movq %rdi, -0x40(%rbp)
movq %rcx, %rsi
movq %r9, -0x30(%rbp)
movq %r9, %rcx
movq %rbx, %r8
callq *0xc8(%rax)
movq %rax, %r14
movq (%rbx), %rbx
subq %r15, %rbx
je 0x704c1
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x286b0
movq 0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x705b0
leaq (%rbx,%r13), %rax
movq %rbx, -0x50(%rbp)
addq %r15, %rbx
movq -0x30(%rbp), %rcx
cmpq %r14, %rcx
movq %rax, -0x48(%rbp)
je 0x70596
addq %r12, %r13
movq %r13, -0x38(%rbp)
addq -0x58(%rbp), %r15
subq %rcx, %r14
movq %rax, %r13
movq %r15, -0x30(%rbp)
movq -0x40(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r15, %rdx
callq *0xc0(%rax)
testl %eax, %eax
jle 0x7053c
movl %eax, %r15d
leaq (%r15,%r13), %r12
cmpq -0x38(%rbp), %r12
ja 0x7059b
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x282c0
movq %r12, %r13
jmp 0x70584
setne %al
cmpq %r15, %rbx
setae %cl
testb %al, %cl
jne 0x7059b
movq 0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x70558
movq %rbx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movq 0xb8(%rdi), %rax
movl $0x3f, %esi
movq %r13, %rdx
movq -0x38(%rbp), %rcx
callq *0x30(%rax)
testl %eax, %eax
jle 0x7059b
movl %eax, %eax
addq %rax, %r13
movl $0x1, %r15d
movq %r13, %r12
addq %r15, %rbx
incq %r14
movq -0x30(%rbp), %r15
jne 0x70501
jmp 0x7059e
movq %rax, %r12
jmp 0x7059e
movq %r13, %r12
movq 0x10(%rbp), %rax
movq %rbx, (%rax)
movq -0x50(%rbp), %rbx
subq -0x48(%rbp), %rbx
addq %r12, %rbx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_copy_fix_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rbx, [rbp+arg_0]
cmp r8, rdx
mov [rbp+var_58], r8
cmovb rdx, r8
add rdx, rcx
mov rax, [rdi+0B8h]
mov [rbp+var_40], rdi
mov rsi, rcx
mov [rbp+var_30], r9
mov rcx, r9
mov r8, rbx
call qword ptr [rax+0C8h]
mov r14, rax
mov rbx, [rbx]
sub rbx, r15
jz short loc_704C1
mov rdi, r13
mov rsi, r15
mov rdx, rbx
call _memmove
loc_704C1:
mov rax, [rbp+arg_0]
cmp qword ptr [rax+8], 0
jz loc_705B0
lea rax, [rbx+r13]
mov [rbp+var_50], rbx
add rbx, r15
mov rcx, [rbp+var_30]
cmp rcx, r14
mov [rbp+var_48], rax
jz loc_70596
add r13, r12
mov [rbp+var_38], r13
add r15, [rbp+var_58]
sub r14, rcx
mov r13, rax
mov [rbp+var_30], r15
loc_70501:
mov rdi, [rbp+var_40]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r15
call qword ptr [rax+0C0h]
test eax, eax
jle short loc_7053C
mov r15d, eax
lea r12, [r15+r13]
cmp r12, [rbp+var_38]
ja short loc_7059B
mov rdi, r13
mov rsi, rbx
mov rdx, r15
call _memcpy
mov r13, r12
jmp short loc_70584
loc_7053C:
setnz al
cmp rbx, r15
setnb cl
test cl, al
jnz short loc_7059B
mov rax, [rbp+arg_0]
cmp qword ptr [rax+8], 0
jnz short loc_70558
mov [rax+8], rbx
loc_70558:
mov rdi, [rbp+var_40]
mov rax, [rdi+0B8h]
mov esi, 3Fh ; '?'
mov rdx, r13
mov rcx, [rbp+var_38]
call qword ptr [rax+30h]
test eax, eax
jle short loc_7059B
mov eax, eax
add r13, rax
mov r15d, 1
mov r12, r13
loc_70584:
add rbx, r15
inc r14
mov r15, [rbp+var_30]
jnz loc_70501
jmp short loc_7059E
loc_70596:
mov r12, rax
jmp short loc_7059E
loc_7059B:
mov r12, r13
loc_7059E:
mov rax, [rbp+arg_0]
mov [rax], rbx
mov rbx, [rbp+var_50]
sub rbx, [rbp+var_48]
add rbx, r12
loc_705B0:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long my_copy_fix_mb(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
long long a6,
unsigned long long *a7)
{
unsigned long long v8; // r12
long long v9; // r14
long long v10; // rbx
unsigned long long v11; // rax
unsigned long long v12; // rbx
unsigned long long v13; // r15
long long v14; // r14
long long v15; // r13
unsigned int v16; // eax
long long v17; // r15
unsigned long long v18; // r12
int v19; // eax
long long v22; // [rsp+10h] [rbp-50h]
unsigned long long v23; // [rsp+18h] [rbp-48h]
unsigned long long v24; // [rsp+28h] [rbp-38h]
unsigned long long v26; // [rsp+30h] [rbp-30h]
v8 = a3;
if ( a5 < a3 )
a3 = a5;
v9 = (*(long long ( **)(long long, long long, unsigned long long, long long, unsigned long long *))(*(_QWORD *)(a1 + 184)
+ 200LL))(
a1,
a4,
a4 + a3,
a6,
a7);
v10 = *a7 - a4;
if ( v10 )
memmove(a2, a4, v10);
if ( !a7[1] )
return v10;
v11 = v10 + a2;
v22 = v10;
v12 = a4 + v10;
v23 = v11;
if ( a6 == v9 )
{
v18 = v11;
goto LABEL_20;
}
v24 = v8 + a2;
v13 = a5 + a4;
v14 = v9 - a6;
v15 = v11;
v26 = v13;
while ( 1 )
{
v16 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v12,
v13);
if ( (int)v16 <= 0 )
break;
v17 = v16;
v18 = v16 + v15;
if ( v18 > v24 )
goto LABEL_19;
memcpy(v15, v12, v16);
v15 = v18;
LABEL_16:
v12 += v17;
++v14;
v13 = v26;
if ( !v14 )
goto LABEL_20;
}
if ( v16 == 0 || v12 < v13 )
{
if ( !a7[1] )
a7[1] = v12;
v19 = (*(long long ( **)(long long, long long, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
63LL,
v15,
v24);
if ( v19 > 0 )
{
v15 += (unsigned int)v19;
v17 = 1LL;
v18 = v15;
goto LABEL_16;
}
}
LABEL_19:
v18 = v15;
LABEL_20:
*a7 = v12;
return v18 + v22 - v23;
}
|
my_copy_fix_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RBX,qword ptr [RBP + 0x10]
CMP R8,RDX
MOV qword ptr [RBP + -0x58],R8
CMOVC RDX,R8
ADD RDX,RCX
MOV RAX,qword ptr [RDI + 0xb8]
MOV qword ptr [RBP + -0x40],RDI
MOV RSI,RCX
MOV qword ptr [RBP + -0x30],R9
MOV RCX,R9
MOV R8,RBX
CALL qword ptr [RAX + 0xc8]
MOV R14,RAX
MOV RBX,qword ptr [RBX]
SUB RBX,R15
JZ 0x001704c1
MOV RDI,R13
MOV RSI,R15
MOV RDX,RBX
CALL 0x001286b0
LAB_001704c1:
MOV RAX,qword ptr [RBP + 0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001705b0
LEA RAX,[RBX + R13*0x1]
MOV qword ptr [RBP + -0x50],RBX
ADD RBX,R15
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,R14
MOV qword ptr [RBP + -0x48],RAX
JZ 0x00170596
ADD R13,R12
MOV qword ptr [RBP + -0x38],R13
ADD R15,qword ptr [RBP + -0x58]
SUB R14,RCX
MOV R13,RAX
MOV qword ptr [RBP + -0x30],R15
LAB_00170501:
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R15
CALL qword ptr [RAX + 0xc0]
TEST EAX,EAX
JLE 0x0017053c
MOV R15D,EAX
LEA R12,[R15 + R13*0x1]
CMP R12,qword ptr [RBP + -0x38]
JA 0x0017059b
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R15
CALL 0x001282c0
MOV R13,R12
JMP 0x00170584
LAB_0017053c:
SETNZ AL
CMP RBX,R15
SETNC CL
TEST CL,AL
JNZ 0x0017059b
MOV RAX,qword ptr [RBP + 0x10]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x00170558
MOV qword ptr [RAX + 0x8],RBX
LAB_00170558:
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RDI + 0xb8]
MOV ESI,0x3f
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x38]
CALL qword ptr [RAX + 0x30]
TEST EAX,EAX
JLE 0x0017059b
MOV EAX,EAX
ADD R13,RAX
MOV R15D,0x1
MOV R12,R13
LAB_00170584:
ADD RBX,R15
INC R14
MOV R15,qword ptr [RBP + -0x30]
JNZ 0x00170501
JMP 0x0017059e
LAB_00170596:
MOV R12,RAX
JMP 0x0017059e
LAB_0017059b:
MOV R12,R13
LAB_0017059e:
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],RBX
MOV RBX,qword ptr [RBP + -0x50]
SUB RBX,qword ptr [RBP + -0x48]
ADD RBX,R12
LAB_001705b0:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
size_t my_copy_fix_mb(long param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
long param_6,long *param_7)
{
void *pvVar1;
uint uVar2;
long lVar3;
size_t __n;
void *__src;
void *__dest;
ulong uVar4;
uVar4 = param_3;
if (param_5 < param_3) {
uVar4 = param_5;
}
lVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 200))
(param_1,param_4,uVar4 + (long)param_4,param_6,param_7);
__n = *param_7 - (long)param_4;
if (__n != 0) {
memmove(param_2,param_4,__n);
}
if (param_7[1] != 0) {
pvVar1 = (void *)(__n + (long)param_2);
__src = (void *)(__n + (long)param_4);
__dest = pvVar1;
if (param_6 != lVar3) {
lVar3 = lVar3 - param_6;
do {
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))
(param_1,__src,(void *)((long)param_4 + param_5));
if ((int)uVar2 < 1) {
if ((void *)((long)param_4 + param_5) <= __src && uVar2 != 0) break;
if (param_7[1] == 0) {
param_7[1] = (long)__src;
}
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))
(param_1,0x3f,__dest,(void *)((long)param_2 + param_3));
if ((int)uVar2 < 1) break;
__dest = (void *)((long)__dest + (ulong)uVar2);
uVar4 = 1;
}
else {
uVar4 = (ulong)uVar2;
if ((void *)((long)param_2 + param_3) < (void *)(uVar4 + (long)__dest)) break;
memcpy(__dest,__src,uVar4);
__dest = (void *)(uVar4 + (long)__dest);
}
__src = (void *)((long)__src + uVar4);
lVar3 = lVar3 + 1;
} while (lVar3 != 0);
}
*param_7 = (long)__src;
__n = (__n - (long)pvVar1) + (long)__dest;
}
return __n;
}
|
|
18,593
|
translog_read_record
|
eloqsql/storage/maria/ma_loghandler.c
|
translog_size_t translog_read_record(LSN lsn,
translog_size_t offset,
translog_size_t length,
uchar *buffer,
TRANSLOG_READER_DATA *data)
{
translog_size_t requested_length= length;
translog_size_t end= offset + length;
TRANSLOG_READER_DATA internal_data;
DBUG_ENTER("translog_read_record");
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
if (data == NULL)
{
DBUG_ASSERT(lsn != LSN_IMPOSSIBLE);
data= &internal_data;
}
if (lsn ||
(offset < data->current_offset &&
!(offset < data->read_header && offset + length < data->read_header)))
{
if (translog_init_reader_data(lsn, data))
DBUG_RETURN(0);
}
DBUG_PRINT("info", ("Offset: %lu length: %lu "
"Scanner: Cur: " LSN_FMT " Hrz: " LSN_FMT " "
"Lst: " LSN_FMT " Offset: %u(%x) fixed: %d",
(ulong) offset, (ulong) length,
LSN_IN_PARTS(data->scanner.page_addr),
LSN_IN_PARTS(data->scanner.horizon),
LSN_IN_PARTS(data->scanner.last_file_page),
(uint) data->scanner.page_offset,
(uint) data->scanner.page_offset,
data->scanner.fixed_horizon));
if (offset < data->read_header)
{
uint16 len= MY_MIN(data->read_header, end) - offset;
DBUG_PRINT("info",
("enter header offset: %lu length: %lu",
(ulong) offset, (ulong) length));
memcpy(buffer, data->header.header + offset, len);
length-= len;
if (length == 0)
{
translog_destroy_reader_data(data);
DBUG_RETURN(requested_length);
}
offset+= len;
buffer+= len;
DBUG_PRINT("info",
("len: %u offset: %lu curr: %lu length: %lu",
len, (ulong) offset, (ulong) data->current_offset,
(ulong) length));
}
/* TODO: find first page which we should read by offset */
/* read the record chunk by chunk */
for(;;)
{
uint page_end= data->current_offset + data->chunk_size;
DBUG_PRINT("info",
("enter body offset: %lu curr: %lu "
"length: %lu page_end: %lu",
(ulong) offset, (ulong) data->current_offset, (ulong) length,
(ulong) page_end));
if (offset < page_end)
{
uint len= page_end - offset;
set_if_smaller(len, length); /* in case we read beyond record's end */
DBUG_ASSERT(offset >= data->current_offset);
memcpy(buffer,
data->scanner.page + data->body_offset +
(offset - data->current_offset), len);
length-= len;
if (length == 0)
{
translog_destroy_reader_data(data);
DBUG_RETURN(requested_length);
}
offset+= len;
buffer+= len;
DBUG_PRINT("info",
("len: %u offset: %lu curr: %lu length: %lu",
len, (ulong) offset, (ulong) data->current_offset,
(ulong) length));
}
if (translog_record_read_next_chunk(data))
{
translog_destroy_reader_data(data);
DBUG_RETURN(requested_length - length);
}
}
}
|
O0
|
c
|
translog_read_record:
pushq %rbp
movq %rsp, %rbp
subq $0x24d0, %rsp # imm = 0x24D0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x2498(%rbp)
movl %esi, -0x249c(%rbp)
movl %edx, -0x24a0(%rbp)
movq %rcx, -0x24a8(%rbp)
movq %r8, -0x24b0(%rbp)
movl -0x24a0(%rbp), %eax
movl %eax, -0x24b4(%rbp)
movl -0x249c(%rbp), %eax
addl -0x24a0(%rbp), %eax
movl %eax, -0x24b8(%rbp)
jmp 0x2f979
cmpq $0x0, -0x24b0(%rbp)
jne 0x2f995
jmp 0x2f985
jmp 0x2f987
leaq -0x2488(%rbp), %rax
movq %rax, -0x24b0(%rbp)
cmpq $0x0, -0x2498(%rbp)
jne 0x2f9ea
movl -0x249c(%rbp), %eax
movq -0x24b0(%rbp), %rcx
cmpl 0x246c(%rcx), %eax
jae 0x2fa14
movl -0x249c(%rbp), %eax
movq -0x24b0(%rbp), %rcx
movzwl 0x2470(%rcx), %ecx
cmpl %ecx, %eax
jae 0x2f9ea
movl -0x249c(%rbp), %eax
addl -0x24a0(%rbp), %eax
movq -0x24b0(%rbp), %rcx
movzwl 0x2470(%rcx), %ecx
cmpl %ecx, %eax
jb 0x2fa14
movq -0x2498(%rbp), %rdi
movq -0x24b0(%rbp), %rsi
callq 0x31d70
cmpb $0x0, %al
je 0x2fa12
jmp 0x2fa03
movl $0x0, -0x248c(%rbp)
jmp 0x2fc67
jmp 0x2fa14
jmp 0x2fa16
jmp 0x2fa18
movl -0x249c(%rbp), %eax
movq -0x24b0(%rbp), %rcx
movzwl 0x2470(%rcx), %ecx
cmpl %ecx, %eax
jae 0x2fb17
movq -0x24b0(%rbp), %rax
movzwl 0x2470(%rax), %eax
cmpl -0x24b8(%rbp), %eax
jae 0x2fa60
movq -0x24b0(%rbp), %rax
movzwl 0x2470(%rax), %eax
movl %eax, -0x24c8(%rbp)
jmp 0x2fa6c
movl -0x24b8(%rbp), %eax
movl %eax, -0x24c8(%rbp)
movl -0x24c8(%rbp), %eax
subl -0x249c(%rbp), %eax
movw %ax, -0x24ba(%rbp)
jmp 0x2fa81
movq -0x24a8(%rbp), %rdi
movq -0x24b0(%rbp), %rsi
addq $0x18, %rsi
movl -0x249c(%rbp), %eax
addq %rax, %rsi
movzwl -0x24ba(%rbp), %eax
movl %eax, %edx
callq 0x2a0b0
movzwl -0x24ba(%rbp), %ecx
movl -0x24a0(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24a0(%rbp)
cmpl $0x0, -0x24a0(%rbp)
jne 0x2fae5
movq -0x24b0(%rbp), %rdi
callq 0x31e60
movl -0x24b4(%rbp), %eax
movl %eax, -0x248c(%rbp)
jmp 0x2fc67
movzwl -0x24ba(%rbp), %eax
addl -0x249c(%rbp), %eax
movl %eax, -0x249c(%rbp)
movzwl -0x24ba(%rbp), %ecx
movq -0x24a8(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x24a8(%rbp)
jmp 0x2fb15
jmp 0x2fb17
jmp 0x2fb19
movq -0x24b0(%rbp), %rax
movl 0x246c(%rax), %eax
movq -0x24b0(%rbp), %rcx
movzwl 0x2472(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x24c0(%rbp)
jmp 0x2fb3e
movl -0x249c(%rbp), %eax
cmpl -0x24c0(%rbp), %eax
jae 0x2fc32
movl -0x24c0(%rbp), %eax
subl -0x249c(%rbp), %eax
movl %eax, -0x24c4(%rbp)
movl -0x24c4(%rbp), %eax
cmpl -0x24a0(%rbp), %eax
jbe 0x2fb7c
movl -0x24a0(%rbp), %eax
movl %eax, -0x24c4(%rbp)
jmp 0x2fb7e
jmp 0x2fb80
jmp 0x2fb82
movq -0x24a8(%rbp), %rdi
movq -0x24b0(%rbp), %rax
movq 0x2450(%rax), %rsi
movq -0x24b0(%rbp), %rax
movl 0x2468(%rax), %eax
addq %rax, %rsi
movl -0x249c(%rbp), %eax
movq -0x24b0(%rbp), %rcx
subl 0x246c(%rcx), %eax
movl %eax, %eax
addq %rax, %rsi
movl -0x24c4(%rbp), %eax
movl %eax, %edx
callq 0x2a0b0
movl -0x24c4(%rbp), %ecx
movl -0x24a0(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24a0(%rbp)
cmpl $0x0, -0x24a0(%rbp)
jne 0x2fc03
movq -0x24b0(%rbp), %rdi
callq 0x31e60
movl -0x24b4(%rbp), %eax
movl %eax, -0x248c(%rbp)
jmp 0x2fc67
movl -0x24c4(%rbp), %eax
addl -0x249c(%rbp), %eax
movl %eax, -0x249c(%rbp)
movl -0x24c4(%rbp), %ecx
movq -0x24a8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x24a8(%rbp)
jmp 0x2fc30
jmp 0x2fc32
movq -0x24b0(%rbp), %rdi
callq 0x31e90
cmpb $0x0, %al
je 0x2fc62
movq -0x24b0(%rbp), %rdi
callq 0x31e60
movl -0x24b4(%rbp), %eax
subl -0x24a0(%rbp), %eax
movl %eax, -0x248c(%rbp)
jmp 0x2fc67
jmp 0x2fb19
movl -0x248c(%rbp), %eax
movl %eax, -0x24cc(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2fc94
movl -0x24cc(%rbp), %eax
addq $0x24d0, %rsp # imm = 0x24D0
popq %rbp
retq
callq 0x2a250
nopl (%rax)
|
translog_read_record:
push rbp
mov rbp, rsp
sub rsp, 24D0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2498], rdi
mov [rbp+var_249C], esi
mov [rbp+var_24A0], edx
mov [rbp+var_24A8], rcx
mov [rbp+var_24B0], r8
mov eax, [rbp+var_24A0]
mov [rbp+var_24B4], eax
mov eax, [rbp+var_249C]
add eax, [rbp+var_24A0]
mov [rbp+var_24B8], eax
jmp short $+2
loc_2F979:
cmp [rbp+var_24B0], 0
jnz short loc_2F995
jmp short $+2
loc_2F985:
jmp short $+2
loc_2F987:
lea rax, [rbp+var_2488]
mov [rbp+var_24B0], rax
loc_2F995:
cmp [rbp+var_2498], 0
jnz short loc_2F9EA
mov eax, [rbp+var_249C]
mov rcx, [rbp+var_24B0]
cmp eax, [rcx+246Ch]
jnb short loc_2FA14
mov eax, [rbp+var_249C]
mov rcx, [rbp+var_24B0]
movzx ecx, word ptr [rcx+2470h]
cmp eax, ecx
jnb short loc_2F9EA
mov eax, [rbp+var_249C]
add eax, [rbp+var_24A0]
mov rcx, [rbp+var_24B0]
movzx ecx, word ptr [rcx+2470h]
cmp eax, ecx
jb short loc_2FA14
loc_2F9EA:
mov rdi, [rbp+var_2498]
mov rsi, [rbp+var_24B0]
call translog_init_reader_data
cmp al, 0
jz short loc_2FA12
jmp short $+2
loc_2FA03:
mov [rbp+var_248C], 0
jmp loc_2FC67
loc_2FA12:
jmp short $+2
loc_2FA14:
jmp short $+2
loc_2FA16:
jmp short $+2
loc_2FA18:
mov eax, [rbp+var_249C]
mov rcx, [rbp+var_24B0]
movzx ecx, word ptr [rcx+2470h]
cmp eax, ecx
jnb loc_2FB17
mov rax, [rbp+var_24B0]
movzx eax, word ptr [rax+2470h]
cmp eax, [rbp+var_24B8]
jnb short loc_2FA60
mov rax, [rbp+var_24B0]
movzx eax, word ptr [rax+2470h]
mov [rbp+var_24C8], eax
jmp short loc_2FA6C
loc_2FA60:
mov eax, [rbp+var_24B8]
mov [rbp+var_24C8], eax
loc_2FA6C:
mov eax, [rbp+var_24C8]
sub eax, [rbp+var_249C]
mov [rbp+var_24BA], ax
jmp short $+2
loc_2FA81:
mov rdi, [rbp+var_24A8]
mov rsi, [rbp+var_24B0]
add rsi, 18h
mov eax, [rbp+var_249C]
add rsi, rax
movzx eax, [rbp+var_24BA]
mov edx, eax
call _memcpy
movzx ecx, [rbp+var_24BA]
mov eax, [rbp+var_24A0]
sub eax, ecx
mov [rbp+var_24A0], eax
cmp [rbp+var_24A0], 0
jnz short loc_2FAE5
mov rdi, [rbp+var_24B0]
call translog_destroy_reader_data
mov eax, [rbp+var_24B4]
mov [rbp+var_248C], eax
jmp loc_2FC67
loc_2FAE5:
movzx eax, [rbp+var_24BA]
add eax, [rbp+var_249C]
mov [rbp+var_249C], eax
movzx ecx, [rbp+var_24BA]
mov rax, [rbp+var_24A8]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_24A8], rax
jmp short $+2
loc_2FB15:
jmp short $+2
loc_2FB17:
jmp short $+2
loc_2FB19:
mov rax, [rbp+var_24B0]
mov eax, [rax+246Ch]
mov rcx, [rbp+var_24B0]
movzx ecx, word ptr [rcx+2472h]
add eax, ecx
mov [rbp+var_24C0], eax
jmp short $+2
loc_2FB3E:
mov eax, [rbp+var_249C]
cmp eax, [rbp+var_24C0]
jnb loc_2FC32
mov eax, [rbp+var_24C0]
sub eax, [rbp+var_249C]
mov [rbp+var_24C4], eax
mov eax, [rbp+var_24C4]
cmp eax, [rbp+var_24A0]
jbe short loc_2FB7C
mov eax, [rbp+var_24A0]
mov [rbp+var_24C4], eax
loc_2FB7C:
jmp short $+2
loc_2FB7E:
jmp short $+2
loc_2FB80:
jmp short $+2
loc_2FB82:
mov rdi, [rbp+var_24A8]
mov rax, [rbp+var_24B0]
mov rsi, [rax+2450h]
mov rax, [rbp+var_24B0]
mov eax, [rax+2468h]
add rsi, rax
mov eax, [rbp+var_249C]
mov rcx, [rbp+var_24B0]
sub eax, [rcx+246Ch]
mov eax, eax
add rsi, rax
mov eax, [rbp+var_24C4]
mov edx, eax
call _memcpy
mov ecx, [rbp+var_24C4]
mov eax, [rbp+var_24A0]
sub eax, ecx
mov [rbp+var_24A0], eax
cmp [rbp+var_24A0], 0
jnz short loc_2FC03
mov rdi, [rbp+var_24B0]
call translog_destroy_reader_data
mov eax, [rbp+var_24B4]
mov [rbp+var_248C], eax
jmp short loc_2FC67
loc_2FC03:
mov eax, [rbp+var_24C4]
add eax, [rbp+var_249C]
mov [rbp+var_249C], eax
mov ecx, [rbp+var_24C4]
mov rax, [rbp+var_24A8]
mov ecx, ecx
add rax, rcx
mov [rbp+var_24A8], rax
jmp short $+2
loc_2FC30:
jmp short $+2
loc_2FC32:
mov rdi, [rbp+var_24B0]
call translog_record_read_next_chunk
cmp al, 0
jz short loc_2FC62
mov rdi, [rbp+var_24B0]
call translog_destroy_reader_data
mov eax, [rbp+var_24B4]
sub eax, [rbp+var_24A0]
mov [rbp+var_248C], eax
jmp short loc_2FC67
loc_2FC62:
jmp loc_2FB19
loc_2FC67:
mov eax, [rbp+var_248C]
mov [rbp+var_24CC], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2FC94
mov eax, [rbp+var_24CC]
add rsp, 24D0h
pop rbp
retn
loc_2FC94:
call ___stack_chk_fail
|
long long translog_read_record(long long a1, unsigned int a2, unsigned int a3, long long a4, char *a5)
{
__int16 v6; // [rsp+8h] [rbp-24C8h]
unsigned int v7; // [rsp+Ch] [rbp-24C4h]
unsigned int v8; // [rsp+10h] [rbp-24C0h]
unsigned __int16 v9; // [rsp+16h] [rbp-24BAh]
unsigned int v10; // [rsp+18h] [rbp-24B8h]
char *v12; // [rsp+20h] [rbp-24B0h]
unsigned int v14; // [rsp+30h] [rbp-24A0h]
unsigned int v15; // [rsp+34h] [rbp-249Ch]
char v17; // [rsp+48h] [rbp-2488h] BYREF
unsigned long long v18; // [rsp+24C8h] [rbp-8h]
v18 = __readfsqword(0x28u);
v15 = a2;
v14 = a3;
v12 = a5;
v10 = a3 + a2;
if ( !a5 )
v12 = &v17;
if ( (a1
|| a2 < *((_DWORD *)v12 + 2331)
&& (a2 >= *((unsigned __int16 *)v12 + 4664) || a3 + a2 >= *((unsigned __int16 *)v12 + 4664)))
&& (unsigned __int8)translog_init_reader_data(a1, v12) )
{
return 0;
}
else
{
if ( a2 >= *((unsigned __int16 *)v12 + 4664) )
goto LABEL_16;
if ( *((unsigned __int16 *)v12 + 4664) >= v10 )
v6 = v10;
else
v6 = *((_WORD *)v12 + 4664);
v9 = v6 - a2;
memcpy(a4, &v12[a2 + 24], (unsigned __int16)(v6 - a2));
v14 -= (unsigned __int16)(v6 - a2);
if ( v14 )
{
v15 = a2 + v9;
a4 += v9;
do
{
LABEL_16:
v8 = *((unsigned __int16 *)v12 + 4665) + *((_DWORD *)v12 + 2331);
if ( v15 < v8 )
{
v7 = v8 - v15;
if ( v8 - v15 > v14 )
v7 = v14;
memcpy(a4, v15 - *((_DWORD *)v12 + 2331) + *((unsigned int *)v12 + 2330) + *((_QWORD *)v12 + 1162), v7);
v14 -= v7;
if ( !v14 )
goto LABEL_14;
v15 += v7;
a4 += v7;
}
}
while ( !(unsigned __int8)translog_record_read_next_chunk(v12) );
translog_destroy_reader_data(v12);
return a3 - v14;
}
else
{
LABEL_14:
translog_destroy_reader_data(v12);
return a3;
}
}
}
|
translog_read_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x24d0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x2498],RDI
MOV dword ptr [RBP + -0x249c],ESI
MOV dword ptr [RBP + -0x24a0],EDX
MOV qword ptr [RBP + -0x24a8],RCX
MOV qword ptr [RBP + -0x24b0],R8
MOV EAX,dword ptr [RBP + -0x24a0]
MOV dword ptr [RBP + -0x24b4],EAX
MOV EAX,dword ptr [RBP + -0x249c]
ADD EAX,dword ptr [RBP + -0x24a0]
MOV dword ptr [RBP + -0x24b8],EAX
JMP 0x0012f979
LAB_0012f979:
CMP qword ptr [RBP + -0x24b0],0x0
JNZ 0x0012f995
JMP 0x0012f985
LAB_0012f985:
JMP 0x0012f987
LAB_0012f987:
LEA RAX,[RBP + -0x2488]
MOV qword ptr [RBP + -0x24b0],RAX
LAB_0012f995:
CMP qword ptr [RBP + -0x2498],0x0
JNZ 0x0012f9ea
MOV EAX,dword ptr [RBP + -0x249c]
MOV RCX,qword ptr [RBP + -0x24b0]
CMP EAX,dword ptr [RCX + 0x246c]
JNC 0x0012fa14
MOV EAX,dword ptr [RBP + -0x249c]
MOV RCX,qword ptr [RBP + -0x24b0]
MOVZX ECX,word ptr [RCX + 0x2470]
CMP EAX,ECX
JNC 0x0012f9ea
MOV EAX,dword ptr [RBP + -0x249c]
ADD EAX,dword ptr [RBP + -0x24a0]
MOV RCX,qword ptr [RBP + -0x24b0]
MOVZX ECX,word ptr [RCX + 0x2470]
CMP EAX,ECX
JC 0x0012fa14
LAB_0012f9ea:
MOV RDI,qword ptr [RBP + -0x2498]
MOV RSI,qword ptr [RBP + -0x24b0]
CALL 0x00131d70
CMP AL,0x0
JZ 0x0012fa12
JMP 0x0012fa03
LAB_0012fa03:
MOV dword ptr [RBP + -0x248c],0x0
JMP 0x0012fc67
LAB_0012fa12:
JMP 0x0012fa14
LAB_0012fa14:
JMP 0x0012fa16
LAB_0012fa16:
JMP 0x0012fa18
LAB_0012fa18:
MOV EAX,dword ptr [RBP + -0x249c]
MOV RCX,qword ptr [RBP + -0x24b0]
MOVZX ECX,word ptr [RCX + 0x2470]
CMP EAX,ECX
JNC 0x0012fb17
MOV RAX,qword ptr [RBP + -0x24b0]
MOVZX EAX,word ptr [RAX + 0x2470]
CMP EAX,dword ptr [RBP + -0x24b8]
JNC 0x0012fa60
MOV RAX,qword ptr [RBP + -0x24b0]
MOVZX EAX,word ptr [RAX + 0x2470]
MOV dword ptr [RBP + -0x24c8],EAX
JMP 0x0012fa6c
LAB_0012fa60:
MOV EAX,dword ptr [RBP + -0x24b8]
MOV dword ptr [RBP + -0x24c8],EAX
LAB_0012fa6c:
MOV EAX,dword ptr [RBP + -0x24c8]
SUB EAX,dword ptr [RBP + -0x249c]
MOV word ptr [RBP + -0x24ba],AX
JMP 0x0012fa81
LAB_0012fa81:
MOV RDI,qword ptr [RBP + -0x24a8]
MOV RSI,qword ptr [RBP + -0x24b0]
ADD RSI,0x18
MOV EAX,dword ptr [RBP + -0x249c]
ADD RSI,RAX
MOVZX EAX,word ptr [RBP + -0x24ba]
MOV EDX,EAX
CALL 0x0012a0b0
MOVZX ECX,word ptr [RBP + -0x24ba]
MOV EAX,dword ptr [RBP + -0x24a0]
SUB EAX,ECX
MOV dword ptr [RBP + -0x24a0],EAX
CMP dword ptr [RBP + -0x24a0],0x0
JNZ 0x0012fae5
MOV RDI,qword ptr [RBP + -0x24b0]
CALL 0x00131e60
MOV EAX,dword ptr [RBP + -0x24b4]
MOV dword ptr [RBP + -0x248c],EAX
JMP 0x0012fc67
LAB_0012fae5:
MOVZX EAX,word ptr [RBP + -0x24ba]
ADD EAX,dword ptr [RBP + -0x249c]
MOV dword ptr [RBP + -0x249c],EAX
MOVZX ECX,word ptr [RBP + -0x24ba]
MOV RAX,qword ptr [RBP + -0x24a8]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x24a8],RAX
JMP 0x0012fb15
LAB_0012fb15:
JMP 0x0012fb17
LAB_0012fb17:
JMP 0x0012fb19
LAB_0012fb19:
MOV RAX,qword ptr [RBP + -0x24b0]
MOV EAX,dword ptr [RAX + 0x246c]
MOV RCX,qword ptr [RBP + -0x24b0]
MOVZX ECX,word ptr [RCX + 0x2472]
ADD EAX,ECX
MOV dword ptr [RBP + -0x24c0],EAX
JMP 0x0012fb3e
LAB_0012fb3e:
MOV EAX,dword ptr [RBP + -0x249c]
CMP EAX,dword ptr [RBP + -0x24c0]
JNC 0x0012fc32
MOV EAX,dword ptr [RBP + -0x24c0]
SUB EAX,dword ptr [RBP + -0x249c]
MOV dword ptr [RBP + -0x24c4],EAX
MOV EAX,dword ptr [RBP + -0x24c4]
CMP EAX,dword ptr [RBP + -0x24a0]
JBE 0x0012fb7c
MOV EAX,dword ptr [RBP + -0x24a0]
MOV dword ptr [RBP + -0x24c4],EAX
LAB_0012fb7c:
JMP 0x0012fb7e
LAB_0012fb7e:
JMP 0x0012fb80
LAB_0012fb80:
JMP 0x0012fb82
LAB_0012fb82:
MOV RDI,qword ptr [RBP + -0x24a8]
MOV RAX,qword ptr [RBP + -0x24b0]
MOV RSI,qword ptr [RAX + 0x2450]
MOV RAX,qword ptr [RBP + -0x24b0]
MOV EAX,dword ptr [RAX + 0x2468]
ADD RSI,RAX
MOV EAX,dword ptr [RBP + -0x249c]
MOV RCX,qword ptr [RBP + -0x24b0]
SUB EAX,dword ptr [RCX + 0x246c]
MOV EAX,EAX
ADD RSI,RAX
MOV EAX,dword ptr [RBP + -0x24c4]
MOV EDX,EAX
CALL 0x0012a0b0
MOV ECX,dword ptr [RBP + -0x24c4]
MOV EAX,dword ptr [RBP + -0x24a0]
SUB EAX,ECX
MOV dword ptr [RBP + -0x24a0],EAX
CMP dword ptr [RBP + -0x24a0],0x0
JNZ 0x0012fc03
MOV RDI,qword ptr [RBP + -0x24b0]
CALL 0x00131e60
MOV EAX,dword ptr [RBP + -0x24b4]
MOV dword ptr [RBP + -0x248c],EAX
JMP 0x0012fc67
LAB_0012fc03:
MOV EAX,dword ptr [RBP + -0x24c4]
ADD EAX,dword ptr [RBP + -0x249c]
MOV dword ptr [RBP + -0x249c],EAX
MOV ECX,dword ptr [RBP + -0x24c4]
MOV RAX,qword ptr [RBP + -0x24a8]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x24a8],RAX
JMP 0x0012fc30
LAB_0012fc30:
JMP 0x0012fc32
LAB_0012fc32:
MOV RDI,qword ptr [RBP + -0x24b0]
CALL 0x00131e90
CMP AL,0x0
JZ 0x0012fc62
MOV RDI,qword ptr [RBP + -0x24b0]
CALL 0x00131e60
MOV EAX,dword ptr [RBP + -0x24b4]
SUB EAX,dword ptr [RBP + -0x24a0]
MOV dword ptr [RBP + -0x248c],EAX
JMP 0x0012fc67
LAB_0012fc62:
JMP 0x0012fb19
LAB_0012fc67:
MOV EAX,dword ptr [RBP + -0x248c]
MOV dword ptr [RBP + -0x24cc],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012fc94
MOV EAX,dword ptr [RBP + -0x24cc]
ADD RSP,0x24d0
POP RBP
RET
LAB_0012fc94:
CALL 0x0012a250
|
uint translog_read_record(long param_1,uint param_2,uint param_3,void *param_4,int1 *param_5)
{
char cVar1;
ushort uVar2;
long in_FS_OFFSET;
uint local_24d0;
uint local_24cc;
int1 *local_24b8;
void *local_24b0;
uint local_24a8;
uint local_24a4;
uint local_2494;
int1 local_2490 [9344];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_24d0 = param_2 + param_3;
local_24b8 = param_5;
if (param_5 == (int1 *)0x0) {
local_24b8 = local_2490;
}
if (((param_1 == 0) &&
((*(uint *)(local_24b8 + 0x246c) <= param_2 ||
((param_2 < *(ushort *)(local_24b8 + 0x2470) &&
(param_2 + param_3 < (uint)*(ushort *)(local_24b8 + 0x2470))))))) ||
(cVar1 = translog_init_reader_data(param_1,local_24b8), cVar1 == '\0')) {
local_24b0 = param_4;
local_24a8 = param_3;
local_24a4 = param_2;
local_2494 = param_3;
if (param_2 < *(ushort *)(local_24b8 + 0x2470)) {
if (*(ushort *)(local_24b8 + 0x2470) < local_24d0) {
local_24d0 = (uint)*(ushort *)(local_24b8 + 0x2470);
}
uVar2 = (short)local_24d0 - (short)param_2;
memcpy(param_4,local_24b8 + (ulong)param_2 + 0x18,(ulong)uVar2);
local_24a8 = param_3 - uVar2;
if (local_24a8 == 0) {
translog_destroy_reader_data(local_24b8);
goto LAB_0012fc67;
}
local_24a4 = uVar2 + param_2;
local_24b0 = (void *)((long)param_4 + (long)(int)(uint)uVar2);
}
do {
if (local_24a4 < *(int *)(local_24b8 + 0x246c) + (uint)*(ushort *)(local_24b8 + 0x2472)) {
local_24cc = (*(int *)(local_24b8 + 0x246c) + (uint)*(ushort *)(local_24b8 + 0x2472)) -
local_24a4;
if (local_24a8 < local_24cc) {
local_24cc = local_24a8;
}
memcpy(local_24b0,
(void *)(*(long *)(local_24b8 + 0x2450) + (ulong)*(uint *)(local_24b8 + 0x2468) +
(ulong)(local_24a4 - *(int *)(local_24b8 + 0x246c))),(ulong)local_24cc);
local_24a8 = local_24a8 - local_24cc;
if (local_24a8 == 0) {
translog_destroy_reader_data(local_24b8);
goto LAB_0012fc67;
}
local_24a4 = local_24cc + local_24a4;
local_24b0 = (void *)((long)local_24b0 + (ulong)local_24cc);
}
cVar1 = translog_record_read_next_chunk(local_24b8);
} while (cVar1 == '\0');
translog_destroy_reader_data(local_24b8);
local_2494 = param_3 - local_24a8;
}
else {
local_2494 = 0;
}
LAB_0012fc67:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_2494;
}
|
|
18,594
|
nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions)
|
ng-log[P]ng-log/src/symbolize.cc
|
static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle(
void* pc, char* out, size_t out_size, SymbolizeOptions /*options*/) {
auto pc0 = reinterpret_cast<uintptr_t>(pc);
uint64_t start_address = 0;
uint64_t base_address = 0;
FileDescriptor object_fd;
if (out_size < 1) {
return false;
}
out[0] = '\0';
SafeAppendString("(", out, out_size);
if (g_symbolize_open_object_file_callback) {
object_fd.reset(g_symbolize_open_object_file_callback(
pc0, start_address, base_address, out + 1, out_size - 1));
} else {
object_fd = OpenObjectFileContainingPcAndGetStartAddress(
pc0, start_address, base_address, out + 1, out_size - 1);
}
# if defined(PRINT_UNSYMBOLIZED_STACK_TRACES)
{
# else
// Check whether a file name was returned.
if (!object_fd) {
# endif
if (out[1]) {
// The object file containing PC was determined successfully however the
// object file was not opened successfully. This is still considered
// success because the object file name and offset are known and tools
// like asan_symbolize.py can be used for the symbolization.
out[out_size - 1] = '\0'; // Making sure |out| is always null-terminated.
SafeAppendString("+0x", out, out_size);
SafeAppendHexNumber(pc0 - base_address, out, out_size);
SafeAppendString(")", out, out_size);
return true;
}
// Failed to determine the object file containing PC. Bail out.
return false;
}
int elf_type = FileGetElfType(object_fd.get());
if (elf_type == -1) {
return false;
}
if (g_symbolize_callback) {
// Run the call back if it's installed.
// Note: relocation (and much of the rest of this code) will be
// wrong for prelinked shared libraries and PIE executables.
uint64_t relocation = (elf_type == ET_DYN) ? start_address : 0;
int num_bytes_written =
g_symbolize_callback(object_fd.get(), pc, out, out_size, relocation);
if (num_bytes_written > 0) {
out += static_cast<size_t>(num_bytes_written);
out_size -= static_cast<size_t>(num_bytes_written);
}
}
if (!GetSymbolFromObjectFile(object_fd.get(), pc0, out, out_size,
base_address)) {
if (out[1] && !g_symbolize_callback) {
// The object file containing PC was opened successfully however the
// symbol was not found. The object may have been stripped. This is still
// considered success because the object file name and offset are known
// and tools like asan_symbolize.py can be used for the symbolization.
out[out_size - 1] = '\0'; // Making sure |out| is always null-terminated.
SafeAppendString("+0x", out, out_size);
SafeAppendHexNumber(pc0 - base_address, out, out_size);
SafeAppendString(")", out, out_size);
return true;
}
return false;
}
// Symbolization succeeded. Now we try to demangle the symbol.
DemangleInplace(out, out_size);
return true;
}
}
|
O3
|
cpp
|
nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
xorl %r12d, %r12d
movq %r12, 0x18(%rsp)
movq %r12, 0x10(%rsp)
testq %rdx, %rdx
je 0x20971
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movb $0x0, (%rsi)
leaq 0x2125(%rip), %rdi # 0x22805
callq 0x209a4
movq 0x1f4bc(%rip), %rax # 0x3fba8
testq %rax, %rax
je 0x2070c
leaq 0x1(%r14), %rcx
leaq -0x1(%rbx), %r8
leaq 0x18(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
callq *%rax
movl %eax, %ebp
jmp 0x20732
leaq 0x1(%r14), %r8
leaq -0x1(%rbx), %r9
leaq 0x28(%rsp), %r12
leaq 0x18(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %r12, %rdi
movq %r15, %rsi
callq 0x209e1
movl (%r12), %ebp
cmpl $-0x1, %ebp
je 0x20784
leaq 0x28(%rsp), %rsi
movl $0x40, %edx
movl %ebp, %edi
xorl %ecx, %ecx
callq 0x205ed
xorl %r12d, %r12d
cmpq $0x40, %rax
jne 0x2096a
cmpl $0x464c457f, 0x28(%rsp) # imm = 0x464C457F
jne 0x2096a
movq 0x1f434(%rip), %rax # 0x3fba0
testq %rax, %rax
je 0x207f5
cmpw $0x3, 0x38(%rsp)
jne 0x207d8
movq 0x18(%rsp), %r8
jmp 0x207db
cmpb $0x0, 0x1(%r14)
je 0x207d0
movb $0x0, -0x1(%r14,%rbx)
leaq 0x3695(%rip), %rdi # 0x23e2d
movq %r14, %rsi
movq %rbx, %rdx
callq 0x209a4
subq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x20dff
leaq 0x18be(%rip), %rdi # 0x2207b
movq %r14, %rsi
movq %rbx, %rdx
callq 0x209a4
movb $0x1, %r12b
jmp 0x20971
xorl %r12d, %r12d
jmp 0x20971
xorl %r8d, %r8d
movl %ebp, %edi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq *%rax
xorl %ecx, %ecx
testl %eax, %eax
cmovgl %eax, %ecx
subq %rcx, %rbx
addq %rcx, %r14
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rsi
movl $0x40, %edx
movl %ebp, %edi
xorl %ecx, %ecx
callq 0x205ed
cmpq $0x40, %rax
jne 0x20916
movq 0x50(%rsp), %r13
movzwl 0x64(%rsp), %r12d
leaq 0x68(%rsp), %r8
movl %ebp, %edi
movl %r12d, %esi
movq %r13, %rdx
movl $0x2, %ecx
callq 0x20f80
testb %al, %al
je 0x20898
movl 0x90(%rsp), %ecx
shlq $0x6, %rcx
addq %r13, %rcx
leaq 0xa8(%rsp), %rsi
movl $0x40, %edx
movl %ebp, %edi
callq 0x205ed
cmpq $0x40, %rax
jne 0x20916
leaq 0x68(%rsp), %rax
movq %rax, (%rsp)
leaq 0xa8(%rsp), %r9
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq 0x20(%rsp), %r8
callq 0x21073
testb %al, %al
jne 0x20906
leaq 0x68(%rsp), %rax
movl %ebp, %edi
movl %r12d, %esi
movq %rax, %r12
movq %r13, %rdx
movl $0xb, %ecx
movq %rax, %r8
callq 0x20f80
testb %al, %al
je 0x20916
movl 0x90(%rsp), %ecx
shlq $0x6, %rcx
addq %r13, %rcx
leaq 0xa8(%rsp), %rsi
movl $0x40, %edx
movl %ebp, %edi
callq 0x205ed
cmpq $0x40, %rax
jne 0x20916
movq %r12, (%rsp)
leaq 0xa8(%rsp), %r9
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq 0x20(%rsp), %r8
callq 0x21073
testb %al, %al
je 0x20916
movb $0x1, %r12b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20e86
jmp 0x2096a
xorl %r12d, %r12d
cmpb $0x0, 0x1(%r14)
je 0x2096a
cmpq $0x0, 0x1f278(%rip) # 0x3fba0
jne 0x2096a
movb $0x0, -0x1(%rbx,%r14)
leaq 0x34f6(%rip), %rdi # 0x23e2d
movq %r14, %rsi
movq %rbx, %rdx
callq 0x209a4
subq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x20dff
leaq 0x171f(%rip), %rdi # 0x2207b
movq %r14, %rsi
movq %rbx, %rdx
callq 0x209a4
movb $0x1, %r12b
movl %ebp, %edi
callq 0x79e0
movl %r12d, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2098a
jmp 0x2099c
movq %rax, %rbx
movl %ebp, %edi
callq 0x79e0
movq %rbx, %rdi
callq 0x7930
movq %rax, %rdi
callq 0x9155
|
_ZN5nglog5toolsL20SymbolizeAndDemangleEPvPcmNS0_16SymbolizeOptionsE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
xor r12d, r12d
mov [rsp+118h+var_100], r12
mov [rsp+118h+var_108], r12
test rdx, rdx
jz loc_20971
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov byte ptr [rsi], 0
lea rdi, asc_22804+1; this
call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong)
mov rax, cs:_ZN5nglog5tools12_GLOBAL__N_137g_symbolize_open_object_file_callbackE; nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback
test rax, rax
jz short loc_2070C
lea rcx, [r14+1]
lea r8, [rbx-1]
lea rsi, [rsp+118h+var_100]
lea rdx, [rsp+118h+var_108]
mov rdi, r15
call rax ; nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback
mov ebp, eax
jmp short loc_20732
loc_2070C:
lea r8, [r14+1]; char *
lea r9, [rbx-1]; unsigned __int64
lea r12, [rsp+118h+var_F0]
lea rdx, [rsp+118h+var_100]; unsigned __int64 *
lea rcx, [rsp+118h+var_108]; unsigned __int64 *
mov rdi, r12; this
mov rsi, r15; unsigned __int64
call _ZN5nglog5toolsL44OpenObjectFileContainingPcAndGetStartAddressEmRmS1_Pcm; nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(ulong,ulong &,ulong &,char *,ulong)
mov ebp, [r12]
loc_20732:
cmp ebp, 0FFFFFFFFh
jz short loc_20784
lea rsi, [rsp+118h+var_F0]; int
mov edx, offset dword_40; void *
mov edi, ebp; this
xor ecx, ecx; unsigned __int64
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
xor r12d, r12d
cmp rax, 40h ; '@'
jnz loc_2096A
cmp [rsp+118h+var_F0], 464C457Fh
jnz loc_2096A
mov rax, cs:_ZN5nglog5tools12_GLOBAL__N_120g_symbolize_callbackE; nglog::tools::`anonymous namespace'::g_symbolize_callback
test rax, rax
jz loc_207F5
cmp [rsp+118h+var_E0], 3
jnz short loc_207D8
mov r8, [rsp+118h+var_100]
jmp short loc_207DB
loc_20784:
cmp byte ptr [r14+1], 0
jz short loc_207D0
mov byte ptr [r14+rbx-1], 0
lea rdi, a0x_0; "+0x"
mov rsi, r14; char *
mov rdx, rbx; char *
call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong)
sub r15, [rsp+118h+var_108]
mov rdi, r15; this
mov rsi, r14; unsigned __int64
mov rdx, rbx; char *
call _ZN5nglog5toolsL19SafeAppendHexNumberEmPcm; nglog::tools::SafeAppendHexNumber(ulong,char *,ulong)
lea rdi, aInitializelogg+1Ah; this
mov rsi, r14; char *
mov rdx, rbx; char *
call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong)
mov r12b, 1
jmp loc_20971
loc_207D0:
xor r12d, r12d
jmp loc_20971
loc_207D8:
xor r8d, r8d
loc_207DB:
mov edi, ebp
mov rsi, r15
mov rdx, r14
mov rcx, rbx
call rax ; nglog::tools::`anonymous namespace'::g_symbolize_callback
xor ecx, ecx
test eax, eax
cmovg ecx, eax
sub rbx, rcx
add r14, rcx
loc_207F5:
mov rax, [rsp+118h+var_108]
mov [rsp+118h+var_F8], rax
lea rsi, [rsp+118h+var_F0]; int
mov edx, offset dword_40; void *
mov edi, ebp; this
xor ecx, ecx; unsigned __int64
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz loc_20916
mov r13, [rsp+118h+var_C8]
movzx r12d, [rsp+118h+var_B4]
lea r8, [rsp+118h+var_B0]
mov edi, ebp; this
mov esi, r12d
mov rdx, r13
mov ecx, 2
call _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr; nglog::tools::GetSectionHeaderByType(int,ushort,ulong,uint,Elf64_Shdr *)
test al, al
jz short loc_20898
mov ecx, [rsp+118h+var_88]
shl rcx, 6
add rcx, r13; unsigned __int64
lea rsi, [rsp+118h+var_70]; int
mov edx, offset dword_40; void *
mov edi, ebp; this
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz loc_20916
lea rax, [rsp+118h+var_B0]
mov [rsp+118h+var_118], rax
lea r9, [rsp+118h+var_70]
mov rdi, r15
mov esi, ebp
mov rdx, r14
mov rcx, rbx
mov r8, [rsp+118h+var_F8]
call _ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_; nglog::tools::FindSymbol(ulong,int,char *,ulong,ulong,Elf64_Shdr const*,Elf64_Shdr const*)
test al, al
jnz short loc_20906
loc_20898:
lea rax, [rsp+118h+var_B0]
mov edi, ebp; this
mov esi, r12d
mov r12, rax
mov rdx, r13
mov ecx, 0Bh
mov r8, rax
call _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr; nglog::tools::GetSectionHeaderByType(int,ushort,ulong,uint,Elf64_Shdr *)
test al, al
jz short loc_20916
mov ecx, [rsp+118h+var_88]
shl rcx, 6
add rcx, r13; unsigned __int64
lea rsi, [rsp+118h+var_70]; int
mov edx, offset dword_40; void *
mov edi, ebp; this
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz short loc_20916
mov [rsp+118h+var_118], r12
lea r9, [rsp+118h+var_70]
mov rdi, r15
mov esi, ebp
mov rdx, r14
mov rcx, rbx
mov r8, [rsp+118h+var_F8]
call _ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_; nglog::tools::FindSymbol(ulong,int,char *,ulong,ulong,Elf64_Shdr const*,Elf64_Shdr const*)
test al, al
jz short loc_20916
loc_20906:
mov r12b, 1
mov rdi, r14; this
mov rsi, rbx; char *
call _ZN5nglog5tools12_GLOBAL__N_115DemangleInplaceEPcm; nglog::tools::`anonymous namespace'::DemangleInplace(char *,ulong)
jmp short loc_2096A
loc_20916:
xor r12d, r12d
cmp byte ptr [r14+1], 0
jz short loc_2096A
cmp cs:_ZN5nglog5tools12_GLOBAL__N_120g_symbolize_callbackE, 0; nglog::tools::`anonymous namespace'::g_symbolize_callback
jnz short loc_2096A
mov byte ptr [rbx+r14-1], 0
lea rdi, a0x_0; "+0x"
mov rsi, r14; char *
mov rdx, rbx; char *
call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong)
sub r15, [rsp+118h+var_108]
mov rdi, r15; this
mov rsi, r14; unsigned __int64
mov rdx, rbx; char *
call _ZN5nglog5toolsL19SafeAppendHexNumberEmPcm; nglog::tools::SafeAppendHexNumber(ulong,char *,ulong)
lea rdi, aInitializelogg+1Ah; this
mov rsi, r14; char *
mov rdx, rbx; char *
call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong)
mov r12b, 1
loc_2096A:
mov edi, ebp
call _close
loc_20971:
mov eax, r12d
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_2098A
jmp short loc_2099C
loc_2098A:
mov rbx, rax
mov edi, ebp
call _close
mov rdi, rbx
call __Unwind_Resume
loc_2099C:
mov rdi, rax
call __clang_call_terminate
|
long long nglog::tools::SymbolizeAndDemangle(
unsigned long long a1,
nglog::tools::_anonymous_namespace_ *this,
char *a3,
unsigned long long a4)
{
int *v4; // r12
char *v5; // rbx
nglog::tools::_anonymous_namespace_ *v6; // r14
unsigned long long v7; // rcx
unsigned int v8; // ebp
unsigned long long v9; // r8
unsigned long long v10; // rcx
unsigned long long v11; // rcx
int v12; // eax
long long v13; // rcx
unsigned long long v14; // rcx
long long v15; // r13
unsigned long long v16; // rdx
unsigned long long v17; // rcx
unsigned long long v18; // rcx
unsigned long long v20; // [rsp+10h] [rbp-108h] BYREF
unsigned long long v21; // [rsp+18h] [rbp-100h] BYREF
unsigned long long v22; // [rsp+20h] [rbp-F8h]
int v23[4]; // [rsp+28h] [rbp-F0h] BYREF
__int16 v24; // [rsp+38h] [rbp-E0h]
long long v25; // [rsp+50h] [rbp-C8h]
unsigned __int16 v26; // [rsp+64h] [rbp-B4h]
_BYTE v27[40]; // [rsp+68h] [rbp-B0h] BYREF
unsigned int v28; // [rsp+90h] [rbp-88h]
int v29[28]; // [rsp+A8h] [rbp-70h] BYREF
LODWORD(v4) = 0;
v21 = 0LL;
v20 = 0LL;
if ( a3 )
{
v5 = a3;
v6 = this;
*(_BYTE *)this = 0;
nglog::tools::SafeAppendString((nglog::tools *)"(", (const char *)this, a3, a4);
if ( nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback )
{
v8 = nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback(
a1,
&v21,
&v20,
(char *)this + 1,
v5 - 1);
}
else
{
v4 = v23;
nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(
(nglog::tools *)v23,
a1,
&v21,
&v20,
(char *)this + 1,
(unsigned long long)(v5 - 1));
v8 = v23[0];
}
if ( v8 != -1 )
{
LODWORD(v4) = 0;
if ( nglog::tools::ReadFromOffset(v8, (long long)v23, (char *)&dword_40, 0LL) != 64 || v23[0] != 1179403647 )
goto LABEL_29;
if ( nglog::tools::`anonymous namespace'::g_symbolize_callback )
{
if ( v24 == 3 )
v9 = v21;
else
v9 = 0LL;
v12 = nglog::tools::`anonymous namespace'::g_symbolize_callback(v8, a1, this, v5, v9);
v13 = 0LL;
if ( v12 > 0 )
v13 = (unsigned int)v12;
v5 -= v13;
v6 = (nglog::tools::_anonymous_namespace_ *)((char *)this + v13);
}
v22 = v20;
if ( nglog::tools::ReadFromOffset(v8, (long long)v23, (char *)&dword_40, 0LL) == 64 )
{
v15 = v25;
LODWORD(v4) = v26;
if ( (unsigned __int8)nglog::tools::GetSectionHeaderByType((nglog::tools *)v8) )
{
if ( nglog::tools::ReadFromOffset(v8, (long long)v29, (char *)&dword_40, v15 + ((unsigned long long)v28 << 6)) != 64 )
goto LABEL_26;
if ( (unsigned __int8)nglog::tools::FindSymbol(
a1,
v8,
(_DWORD)v6,
(_DWORD)v5,
v22,
(unsigned int)v29,
(long long)v27) )
{
LABEL_25:
LOBYTE(v4) = 1;
nglog::tools::`anonymous namespace'::DemangleInplace(v6, v5, v16);
LABEL_29:
close(v8);
return (unsigned int)v4;
}
}
v4 = (int *)v27;
if ( (unsigned __int8)nglog::tools::GetSectionHeaderByType((nglog::tools *)v8)
&& nglog::tools::ReadFromOffset(v8, (long long)v29, (char *)&dword_40, v15 + ((unsigned long long)v28 << 6)) == 64
&& (unsigned __int8)nglog::tools::FindSymbol(
a1,
v8,
(_DWORD)v6,
(_DWORD)v5,
v22,
(unsigned int)v29,
(long long)v27) )
{
goto LABEL_25;
}
}
LABEL_26:
LODWORD(v4) = 0;
if ( *((_BYTE *)v6 + 1) && !nglog::tools::`anonymous namespace'::g_symbolize_callback )
{
*((_BYTE *)v6 + (_QWORD)v5 - 1) = 0;
nglog::tools::SafeAppendString((nglog::tools *)"+0x", (const char *)v6, v5, v14);
nglog::tools::SafeAppendHexNumber((nglog::tools *)(a1 - v20), (unsigned long long)v6, v5, v17);
nglog::tools::SafeAppendString((nglog::tools *)")", (const char *)v6, v5, v18);
LOBYTE(v4) = 1;
}
goto LABEL_29;
}
if ( *((_BYTE *)this + 1) )
{
v5[(_QWORD)this - 1] = 0;
nglog::tools::SafeAppendString((nglog::tools *)"+0x", (const char *)this, v5, v7);
nglog::tools::SafeAppendHexNumber((nglog::tools *)(a1 - v20), (unsigned long long)this, v5, v10);
nglog::tools::SafeAppendString((nglog::tools *)")", (const char *)this, v5, v11);
LOBYTE(v4) = 1;
}
else
{
LODWORD(v4) = 0;
}
}
return (unsigned int)v4;
}
|
SymbolizeAndDemangle:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
XOR R12D,R12D
MOV qword ptr [RSP + 0x18],R12
MOV qword ptr [RSP + 0x10],R12
TEST RDX,RDX
JZ 0x00120971
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV byte ptr [RSI],0x0
LEA RDI,[0x122805]
CALL 0x001209a4
MOV RAX,qword ptr [0x0013fba8]
TEST RAX,RAX
JZ 0x0012070c
LEA RCX,[R14 + 0x1]
LEA R8,[RBX + -0x1]
LEA RSI,[RSP + 0x18]
LEA RDX,[RSP + 0x10]
MOV RDI,R15
CALL RAX
MOV EBP,EAX
JMP 0x00120732
LAB_0012070c:
LEA R8,[R14 + 0x1]
LEA R9,[RBX + -0x1]
LEA R12,[RSP + 0x28]
LEA RDX,[RSP + 0x18]
LEA RCX,[RSP + 0x10]
MOV RDI,R12
MOV RSI,R15
CALL 0x001209e1
MOV EBP,dword ptr [R12]
LAB_00120732:
CMP EBP,-0x1
JZ 0x00120784
LAB_00120737:
LEA RSI,[RSP + 0x28]
MOV EDX,0x40
MOV EDI,EBP
XOR ECX,ECX
CALL 0x001205ed
XOR R12D,R12D
CMP RAX,0x40
JNZ 0x0012096a
CMP dword ptr [RSP + 0x28],0x464c457f
JNZ 0x0012096a
MOV RAX,qword ptr [0x0013fba0]
TEST RAX,RAX
JZ 0x001207f5
CMP word ptr [RSP + 0x38],0x3
JNZ 0x001207d8
MOV R8,qword ptr [RSP + 0x18]
JMP 0x001207db
LAB_00120784:
CMP byte ptr [R14 + 0x1],0x0
JZ 0x001207d0
MOV byte ptr [R14 + RBX*0x1 + -0x1],0x0
LEA RDI,[0x123e2d]
MOV RSI,R14
MOV RDX,RBX
CALL 0x001209a4
SUB R15,qword ptr [RSP + 0x10]
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00120dff
LEA RDI,[0x12207b]
MOV RSI,R14
MOV RDX,RBX
CALL 0x001209a4
MOV R12B,0x1
JMP 0x00120971
LAB_001207d0:
XOR R12D,R12D
JMP 0x00120971
LAB_001207d8:
XOR R8D,R8D
LAB_001207db:
MOV EDI,EBP
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
CALL RAX
XOR ECX,ECX
TEST EAX,EAX
CMOVG ECX,EAX
SUB RBX,RCX
ADD R14,RCX
LAB_001207f5:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
LAB_001207ff:
LEA RSI,[RSP + 0x28]
MOV EDX,0x40
MOV EDI,EBP
XOR ECX,ECX
CALL 0x001205ed
CMP RAX,0x40
JNZ 0x00120916
MOV R13,qword ptr [RSP + 0x50]
MOVZX R12D,word ptr [RSP + 0x64]
LEA R8,[RSP + 0x68]
MOV EDI,EBP
MOV ESI,R12D
MOV RDX,R13
MOV ECX,0x2
CALL 0x00120f80
TEST AL,AL
JZ 0x00120898
MOV ECX,dword ptr [RSP + 0x90]
SHL RCX,0x6
ADD RCX,R13
LEA RSI,[RSP + 0xa8]
MOV EDX,0x40
MOV EDI,EBP
CALL 0x001205ed
CMP RAX,0x40
JNZ 0x00120916
LEA RAX,[RSP + 0x68]
MOV qword ptr [RSP],RAX
LEA R9,[RSP + 0xa8]
MOV RDI,R15
MOV ESI,EBP
MOV RDX,R14
MOV RCX,RBX
MOV R8,qword ptr [RSP + 0x20]
CALL 0x00121073
TEST AL,AL
JNZ 0x00120906
LAB_00120898:
LEA RAX,[RSP + 0x68]
MOV EDI,EBP
MOV ESI,R12D
MOV R12,RAX
MOV RDX,R13
MOV ECX,0xb
MOV R8,RAX
CALL 0x00120f80
TEST AL,AL
JZ 0x00120916
MOV ECX,dword ptr [RSP + 0x90]
SHL RCX,0x6
ADD RCX,R13
LEA RSI,[RSP + 0xa8]
MOV EDX,0x40
MOV EDI,EBP
CALL 0x001205ed
CMP RAX,0x40
JNZ 0x00120916
MOV qword ptr [RSP],R12
LEA R9,[RSP + 0xa8]
MOV RDI,R15
MOV ESI,EBP
MOV RDX,R14
MOV RCX,RBX
MOV R8,qword ptr [RSP + 0x20]
CALL 0x00121073
TEST AL,AL
JZ 0x00120916
LAB_00120906:
MOV R12B,0x1
MOV RDI,R14
MOV RSI,RBX
CALL 0x00120e86
JMP 0x0012096a
LAB_00120916:
XOR R12D,R12D
CMP byte ptr [R14 + 0x1],0x0
JZ 0x0012096a
CMP qword ptr [0x0013fba0],0x0
JNZ 0x0012096a
MOV byte ptr [RBX + R14*0x1 + -0x1],0x0
LEA RDI,[0x123e2d]
MOV RSI,R14
MOV RDX,RBX
CALL 0x001209a4
SUB R15,qword ptr [RSP + 0x10]
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00120dff
LEA RDI,[0x12207b]
MOV RSI,R14
MOV RDX,RBX
CALL 0x001209a4
MOV R12B,0x1
LAB_0012096a:
MOV EDI,EBP
CALL 0x001079e0
LAB_00120971:
MOV EAX,R12D
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions)
*/
ulong nglog::tools::SymbolizeAndDemangle(ulong param_1,char *param_2,ulong param_3)
{
char cVar1;
int __fd;
uint uVar2;
long lVar3;
ulong uVar4;
tools *this;
Elf64_Shdr *pEVar5;
ulong local_108;
ulong local_100;
ulong local_f8;
int local_f0 [4];
short local_e0;
ulong local_c8;
ushort local_b4;
Elf64_Shdr local_b0;
Elf64_Shdr local_70;
this = (tools *)0x0;
local_100 = 0;
local_108 = 0;
if (param_3 == 0) goto LAB_00120971;
*param_2 = '\0';
SafeAppendString("(",param_2,param_3);
if ((anonymous_namespace)::g_symbolize_open_object_file_callback == (code *)0x0) {
this = (tools *)local_f0;
OpenObjectFileContainingPcAndGetStartAddress
(this,param_1,&local_100,&local_108,param_2 + 1,param_3 - 1);
__fd = local_f0[0];
}
else {
__fd = (*(anonymous_namespace)::g_symbolize_open_object_file_callback)
(param_1,&local_100,&local_108,param_2 + 1,param_3 - 1);
}
if (__fd == -1) {
if (param_2[1] == '\0') {
this = (tools *)0x0;
}
else {
param_2[param_3 - 1] = '\0';
SafeAppendString("+0x",param_2,param_3);
SafeAppendHexNumber(param_1 - local_108,param_2,param_3);
SafeAppendString(")",param_2,param_3);
this = (tools *)CONCAT71((int7)((ulong)this >> 8),1);
}
goto LAB_00120971;
}
/* try { // try from 00120737 to 00120749 has its CatchHandler @ 0012098a */
lVar3 = ReadFromOffset(__fd,local_f0,0x40,0);
this = (tools *)0x0;
if ((lVar3 == 0x40) && (local_f0[0] == 0x464c457f)) {
if ((anonymous_namespace)::g_symbolize_callback != (code *)0x0) {
uVar4 = local_100;
if (local_e0 != 3) {
uVar4 = 0;
}
/* try { // try from 001207db to 001207e7 has its CatchHandler @ 00120986 */
uVar2 = (*(anonymous_namespace)::g_symbolize_callback)(__fd,param_1,param_2,param_3,uVar4);
uVar4 = 0;
if (0 < (int)uVar2) {
uVar4 = (ulong)uVar2;
}
param_3 = param_3 - uVar4;
param_2 = param_2 + uVar4;
}
local_f8 = local_108;
/* try { // try from 001207ff to 00120913 has its CatchHandler @ 0012098a */
lVar3 = ReadFromOffset(__fd,local_f0,0x40,0);
if (lVar3 == 0x40) {
pEVar5 = (Elf64_Shdr *)(ulong)local_b4;
cVar1 = GetSectionHeaderByType(__fd,local_b4,local_c8,2,&local_b0);
if (cVar1 == '\0') {
LAB_00120898:
pEVar5 = &local_b0;
cVar1 = GetSectionHeaderByType(__fd,local_b4,local_c8,0xb,pEVar5);
if (((cVar1 != '\0') &&
(lVar3 = ReadFromOffset(__fd,&local_70,0x40,(ulong)local_b0.sh_link * 0x40 + local_c8),
lVar3 == 0x40)) &&
(cVar1 = FindSymbol(param_1,__fd,param_2,param_3,local_f8,&local_70,pEVar5),
cVar1 != '\0')) {
LAB_00120906:
(anonymous_namespace)::DemangleInplace(param_2,param_3);
this = (tools *)CONCAT71((int7)((ulong)pEVar5 >> 8),1);
goto LAB_0012096a;
}
}
else {
lVar3 = ReadFromOffset(__fd,&local_70,0x40,(ulong)local_b0.sh_link * 0x40 + local_c8);
if (lVar3 == 0x40) {
cVar1 = FindSymbol(param_1,__fd,param_2,param_3,local_f8,&local_70,&local_b0);
if (cVar1 == '\0') goto LAB_00120898;
goto LAB_00120906;
}
}
}
this = (tools *)0x0;
if ((param_2[1] != '\0') &&
(this = (tools *)0x0, (anonymous_namespace)::g_symbolize_callback == (code *)0x0)) {
param_2[param_3 - 1] = '\0';
SafeAppendString("+0x",param_2,param_3);
SafeAppendHexNumber(param_1 - local_108,param_2,param_3);
SafeAppendString(")",param_2,param_3);
this = (tools *)0x1;
}
}
LAB_0012096a:
/* try { // try from 0012096a to 00120970 has its CatchHandler @ 00120988 */
close(__fd);
LAB_00120971:
return (ulong)this & 0xffffffff;
}
|
|
18,595
|
prepare_resize_simple_key_cache
|
eloqsql/mysys/mf_keycache.c
|
static
int prepare_resize_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache,
my_bool release_lock)
{
int res= 0;
DBUG_ENTER("prepare_resize_simple_key_cache");
keycache_pthread_mutex_lock(&keycache->cache_lock);
/*
We may need to wait for another thread which is doing a resize
already. This cannot happen in the MySQL server though. It allows
one resizer only. In set_var.cc keycache->in_init is used to block
multiple attempts.
*/
while (keycache->in_resize)
{
/* purecov: begin inspected */
wait_on_queue(&keycache->resize_queue, &keycache->cache_lock);
/* purecov: end */
}
/*
Mark the operation in progress. This blocks other threads from doing
a resize in parallel. It prohibits new blocks to enter the cache.
Read/write requests can bypass the cache during the flush phase.
*/
keycache->in_resize= 1;
/* Need to flush only if keycache is enabled. */
if (keycache->can_be_used && keycache->disk_blocks != -1)
{
/* Start the flush phase. */
keycache->resize_in_flush= 1;
if (flush_all_key_blocks(keycache))
{
/* TODO: if this happens, we should write a warning in the log file ! */
keycache->resize_in_flush= 0;
keycache->can_be_used= 0;
res= 1;
goto finish;
}
DBUG_SLOW_ASSERT(cache_empty(keycache));
/* End the flush phase. */
keycache->resize_in_flush= 0;
}
/*
Some direct read/write operations (bypassing the cache) may still be
unfinished. Wait until they are done. If the key cache can be used,
direct I/O is done in increments of key_cache_block_size. That is,
every block is checked if it is in the cache. We need to wait for
pending I/O before re-initializing the cache, because we may change
the block size. Otherwise they could check for blocks at file
positions where the new block division has none. We do also want to
wait for I/O done when (if) the cache was disabled. It must not
run in parallel with normal cache operation.
*/
while (keycache->cnt_for_resize_op)
wait_on_queue(&keycache->waiting_for_resize_cnt, &keycache->cache_lock);
end_simple_key_cache(keycache, 0);
finish:
if (release_lock)
keycache_pthread_mutex_unlock(&keycache->cache_lock);
DBUG_RETURN(res);
}
|
O0
|
c
|
prepare_resize_simple_key_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x6d3ef(%rip), %rsi # 0x1541ea
movl $0x2a9, %edx # imm = 0x2A9
callq 0xe3620
movq -0x8(%rbp), %rax
cmpb $0x0, 0x1(%rax)
je 0xe6e2c
movq -0x8(%rbp), %rdi
addq $0x108, %rdi # imm = 0x108
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
callq 0xe3690
jmp 0xe6e05
movq -0x8(%rbp), %rax
movb $0x1, 0x1(%rax)
movq -0x8(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x0, %eax
je 0xe6e86
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x48(%rax)
je 0xe6e86
movq -0x8(%rbp), %rax
movb $0x1, 0x2(%rax)
movq -0x8(%rbp), %rdi
callq 0xe6f30
cmpl $0x0, %eax
je 0xe6e7a
movq -0x8(%rbp), %rax
movb $0x0, 0x2(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x3(%rax)
movl $0x1, -0x10(%rbp)
jmp 0xe6ebb
jmp 0xe6e7c
jmp 0xe6e7e
movq -0x8(%rbp), %rax
movb $0x0, 0x2(%rax)
jmp 0xe6e88
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0xe6eb0
movq -0x8(%rbp), %rdi
addq $0x110, %rdi # imm = 0x110
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
callq 0xe3690
jmp 0xe6e88
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0xe6b20
cmpb $0x0, -0x9(%rbp)
je 0xe6ed1
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0xe4040
jmp 0xe6ed3
movl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
prepare_resize_simple_key_cache:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov [rbp+var_10], 0
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 2A9h
call inline_mysql_mutex_lock_24
loc_E6E05:
mov rax, [rbp+var_8]
cmp byte ptr [rax+1], 0
jz short loc_E6E2C
mov rdi, [rbp+var_8]
add rdi, 108h
mov rsi, [rbp+var_8]
add rsi, 0C0h
call wait_on_queue
jmp short loc_E6E05
loc_E6E2C:
mov rax, [rbp+var_8]
mov byte ptr [rax+1], 1
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+3]
cmp eax, 0
jz short loc_E6E86
mov rax, [rbp+var_8]
cmp dword ptr [rax+48h], 0FFFFFFFFh
jz short loc_E6E86
mov rax, [rbp+var_8]
mov byte ptr [rax+2], 1
mov rdi, [rbp+var_8]
call flush_all_key_blocks
cmp eax, 0
jz short loc_E6E7A
mov rax, [rbp+var_8]
mov byte ptr [rax+2], 0
mov rax, [rbp+var_8]
mov byte ptr [rax+3], 0
mov [rbp+var_10], 1
jmp short loc_E6EBB
loc_E6E7A:
jmp short $+2
loc_E6E7C:
jmp short $+2
loc_E6E7E:
mov rax, [rbp+var_8]
mov byte ptr [rax+2], 0
loc_E6E86:
jmp short $+2
loc_E6E88:
mov rax, [rbp+var_8]
cmp qword ptr [rax+70h], 0
jz short loc_E6EB0
mov rdi, [rbp+var_8]
add rdi, 110h
mov rsi, [rbp+var_8]
add rsi, 0C0h
call wait_on_queue
jmp short loc_E6E88
loc_E6EB0:
mov rdi, [rbp+var_8]
xor esi, esi
call end_simple_key_cache
loc_E6EBB:
cmp [rbp+var_9], 0
jz short loc_E6ED1
mov rdi, [rbp+var_8]
add rdi, 0C0h
call inline_mysql_mutex_unlock_25
loc_E6ED1:
jmp short $+2
loc_E6ED3:
mov eax, [rbp+var_10]
mov [rbp+var_14], eax
mov eax, [rbp+var_14]
add rsp, 20h
pop rbp
retn
|
long long prepare_resize_simple_key_cache(long long a1, char a2)
{
unsigned int v3; // [rsp+10h] [rbp-10h]
v3 = 0;
inline_mysql_mutex_lock_24(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x2A9u);
while ( *(_BYTE *)(a1 + 1) )
wait_on_queue((long long *)(a1 + 264), (const char *)(a1 + 192));
*(_BYTE *)(a1 + 1) = 1;
if ( !*(_BYTE *)(a1 + 3) || *(_DWORD *)(a1 + 72) == -1 )
{
LABEL_9:
while ( *(_QWORD *)(a1 + 112) )
wait_on_queue((long long *)(a1 + 272), (const char *)(a1 + 192));
end_simple_key_cache(a1, 0);
goto LABEL_12;
}
*(_BYTE *)(a1 + 2) = 1;
if ( !(unsigned int)flush_all_key_blocks(a1) )
{
*(_BYTE *)(a1 + 2) = 0;
goto LABEL_9;
}
*(_BYTE *)(a1 + 2) = 0;
*(_BYTE *)(a1 + 3) = 0;
v3 = 1;
LABEL_12:
if ( a2 )
inline_mysql_mutex_unlock_25(a1 + 192);
return v3;
}
|
prepare_resize_simple_key_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV dword ptr [RBP + -0x10],0x0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RSI,[0x2541ea]
MOV EDX,0x2a9
CALL 0x001e3620
LAB_001e6e05:
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x1],0x0
JZ 0x001e6e2c
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x108
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
CALL 0x001e3690
JMP 0x001e6e05
LAB_001e6e2c:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x1],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x3]
CMP EAX,0x0
JZ 0x001e6e86
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x48],-0x1
JZ 0x001e6e86
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x2],0x1
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001e6f30
CMP EAX,0x0
JZ 0x001e6e7a
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x2],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x3],0x0
MOV dword ptr [RBP + -0x10],0x1
JMP 0x001e6ebb
LAB_001e6e7a:
JMP 0x001e6e7c
LAB_001e6e7c:
JMP 0x001e6e7e
LAB_001e6e7e:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x2],0x0
LAB_001e6e86:
JMP 0x001e6e88
LAB_001e6e88:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x70],0x0
JZ 0x001e6eb0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x110
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
CALL 0x001e3690
JMP 0x001e6e88
LAB_001e6eb0:
MOV RDI,qword ptr [RBP + -0x8]
XOR ESI,ESI
CALL 0x001e6b20
LAB_001e6ebb:
CMP byte ptr [RBP + -0x9],0x0
JZ 0x001e6ed1
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
CALL 0x001e4040
LAB_001e6ed1:
JMP 0x001e6ed3
LAB_001e6ed3:
MOV EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0x20
POP RBP
RET
|
int4 prepare_resize_simple_key_cache(long param_1,char param_2)
{
int iVar1;
int4 local_18;
local_18 = 0;
inline_mysql_mutex_lock
(param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x2a9);
while (*(char *)(param_1 + 1) != '\0') {
wait_on_queue(param_1 + 0x108);
}
*(int1 *)(param_1 + 1) = 1;
if ((*(char *)(param_1 + 3) != '\0') && (*(int *)(param_1 + 0x48) != -1)) {
*(int1 *)(param_1 + 2) = 1;
iVar1 = flush_all_key_blocks(param_1);
if (iVar1 != 0) {
*(int1 *)(param_1 + 2) = 0;
*(int1 *)(param_1 + 3) = 0;
local_18 = 1;
goto LAB_001e6ebb;
}
*(int1 *)(param_1 + 2) = 0;
}
while (*(long *)(param_1 + 0x70) != 0) {
wait_on_queue(param_1 + 0x110);
}
end_simple_key_cache(param_1,0);
LAB_001e6ebb:
if (param_2 != '\0') {
inline_mysql_mutex_unlock(param_1 + 0xc0);
}
return local_18;
}
|
|
18,596
|
really_die(char const*)
|
eloqsql/client/mysqltest.cc
|
static void really_die(const char *msg)
{
static int dying= 0;
fflush(stdout);
fprintf(stderr, "%s", msg);
fflush(stderr);
/*
Protect against dying twice
first time 'die' is called, try to write log files
second time, just exit
*/
if (dying)
cleanup_and_exit(1);
dying= 1;
log_file.show_tail(opt_tail_lines);
/*
Help debugging by displaying any warnings that might have
been produced prior to the error
*/
if (cur_con && !cur_con->pending)
show_warnings_before_error(cur_con->mysql);
cleanup_and_exit(1);
}
|
O3
|
cpp
|
really_die(char const*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x376b84(%rip), %rax # 0x3d9f98
movq (%rax), %rdi
callq 0x5f570
movq 0x376b85(%rip), %r14 # 0x3d9fa8
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x5f3a0
movq (%r14), %rdi
callq 0x5f570
cmpb $0x1, 0x3faf0f(%rip) # 0x45e34c
je 0x635bc
movb $0x1, 0x3faf02(%rip) # 0x45e34c
movl 0x3faf00(%rip), %esi # 0x45e350
leaq 0x3f9149(%rip), %rdi # 0x45c5a0
callq 0x71046
movq 0x3f8ee5(%rip), %rax # 0x45c348
testq %rax, %rax
je 0x635bc
cmpb $0x0, 0x30(%rax)
jne 0x635bc
movq (%rax), %rbx
testq %rbx, %rbx
je 0x635bc
leaq 0x985f3(%rip), %rsi # 0xfba7c
movq %rbx, %rdi
callq 0x61cc6
testl %eax, %eax
jne 0x6358e
movq %rbx, %rdi
callq 0x61b5c
testq %rax, %rax
je 0x635bc
movq %rax, %rbx
movq %rax, %rdi
callq 0x79ae5
cmpq $0x2, %rax
jb 0x63584
movq %rbx, %rdi
callq 0x79aee
movl %eax, -0x2c(%rbp)
movq (%r14), %rcx
leaq 0x8fc8a(%rip), %rdi # 0xf315e
movl $0x26, %esi
movl $0x1, %edx
callq 0x5fd30
movq %rbx, %rdi
callq 0x619ba
testq %rax, %rax
je 0x63584
movq %rax, %r12
movl -0x2c(%rbp), %eax
movq %rax, -0x40(%rbp)
xorl %r15d, %r15d
movq %rbx, -0x38(%rbp)
movq %rbx, %rdi
callq 0x78cea
movq %rax, %r13
incl %r15d
movq %rbx, %rdi
callq 0x79ae5
cmpq %r15, %rax
jbe 0x63584
cmpl $0x0, -0x2c(%rbp)
movq %r14, %rbx
je 0x6355d
xorl %r14d, %r14d
movq (%rbx), %rdi
movl (%r13,%r14,8), %edx
movq (%r12,%r14,8), %rcx
testq %rcx, %rcx
leaq 0x9fc54(%rip), %rax # 0x103196
cmoveq %rax, %rcx
leaq 0x8fc38(%rip), %rsi # 0xf3185
xorl %eax, %eax
callq 0x5f1f0
incq %r14
cmpq %r14, -0x40(%rbp)
jne 0x6352c
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x5fa50
movq -0x38(%rbp), %r13
movq %r13, %rdi
callq 0x619ba
movq %rax, %r12
testq %rax, %rax
movq %rbx, %r14
movq %r13, %rbx
jne 0x63505
movq %rbx, %rdi
callq 0x61bbf
jmp 0x635bc
movq %rbx, %rdi
callq 0x79ba9
movl %eax, %r14d
movq %rbx, %rdi
callq 0x79bbe
leaq 0x8fb96(%rip), %rdi # 0xf313e
leaq 0x984cd(%rip), %rsi # 0xfba7c
movl %r14d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x6390c
movl $0x1, %edi
callq 0x63741
|
_ZL10really_diePKc:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov r14, cs:stderr_ptr
mov rsi, [r14]
mov rdi, rbx
call _fputs
mov rdi, [r14]
call _fflush
cmp cs:_ZZL10really_diePKcE5dying, 1; really_die(char const*)::dying
jz loc_635BC
mov cs:_ZZL10really_diePKcE5dying, 1; really_die(char const*)::dying
mov esi, cs:_ZL14opt_tail_lines; unsigned int
lea rdi, log_file; this
call _ZN7LogFile9show_tailEj; LogFile::show_tail(uint)
mov rax, cs:cur_con
test rax, rax
jz loc_635BC
cmp byte ptr [rax+30h], 0
jnz loc_635BC
mov rbx, [rax]
test rbx, rbx
jz loc_635BC
lea rsi, aFailedToLoadRo+49h; "SHOW WARNINGS"
mov rdi, rbx
call _Z16wrap_mysql_queryP8st_mysqlPKc; wrap_mysql_query(st_mysql *,char const*)
test eax, eax
jnz loc_6358E
mov rdi, rbx
call _Z23wrap_mysql_store_resultP8st_mysql; wrap_mysql_store_result(st_mysql *)
test rax, rax
jz loc_635BC
mov rbx, rax
mov rdi, rax
call mysql_num_rows
cmp rax, 2
jb loc_63584
mov rdi, rbx
call mysql_num_fields
mov [rbp+var_2C], eax
mov rcx, [r14]
lea rdi, aWarningsFromJu; "\nWarnings from just before the error:"...
mov esi, 26h ; '&'
mov edx, 1
call _fwrite
mov rdi, rbx
call _Z20wrap_mysql_fetch_rowP12st_mysql_res; wrap_mysql_fetch_row(st_mysql_res *)
test rax, rax
jz loc_63584
mov r12, rax
mov eax, [rbp+var_2C]
mov [rbp+var_40], rax
xor r15d, r15d
mov [rbp+var_38], rbx
loc_63505:
mov rdi, rbx
call mysql_fetch_lengths
mov r13, rax
inc r15d
mov rdi, rbx
call mysql_num_rows
cmp rax, r15
jbe short loc_63584
cmp [rbp+var_2C], 0
mov rbx, r14
jz short loc_6355D
xor r14d, r14d
loc_6352C:
mov rdi, [rbx]
mov edx, [r13+r14*8+0]
mov rcx, [r12+r14*8]
test rcx, rcx
lea rax, aCannotExecuteS_6+75h; "NULL"
cmovz rcx, rax
lea rsi, aS_0; "%.*s "
xor eax, eax
call _fprintf
inc r14
cmp [rbp+var_40], r14
jnz short loc_6352C
loc_6355D:
mov rsi, [rbx]
mov edi, 0Ah
call _fputc
mov r13, [rbp+var_38]
mov rdi, r13
call _Z20wrap_mysql_fetch_rowP12st_mysql_res; wrap_mysql_fetch_row(st_mysql_res *)
mov r12, rax
test rax, rax
mov r14, rbx
mov rbx, r13
jnz short loc_63505
loc_63584:
mov rdi, rbx
call _Z22wrap_mysql_free_resultP12st_mysql_res; wrap_mysql_free_result(st_mysql_res *)
jmp short loc_635BC
loc_6358E:
mov rdi, rbx
call mysql_errno
mov r14d, eax
mov rdi, rbx
call mysql_error
lea rdi, aErrorRunningQu; "Error running query '%s': %d %s"
lea rsi, aFailedToLoadRo+49h; "SHOW WARNINGS"
mov edx, r14d
mov rcx, rax
xor eax, eax
call _Z7log_msgPKcz; log_msg(char const*,...)
loc_635BC:
mov edi, 1; int
call _ZL16cleanup_and_exiti; cleanup_and_exit(int)
|
void __noreturn really_die(const char *a1)
{
_QWORD *v1; // r14
long long v2; // rbx
long long v3; // rax
long long v4; // rbx
long long row; // rax
long long v6; // r12
int v7; // r15d
long long lengths; // r13
_QWORD *v9; // rbx
long long i; // r14
const char *v11; // rcx
int v12; // r14d
const char *v13; // rax
long long v14; // [rsp+8h] [rbp-38h]
int v15; // [rsp+14h] [rbp-2Ch]
fflush(stdout);
v1 = &stderr;
fputs(a1, stderr);
fflush(stderr);
if ( really_die(char const*)::dying != 1 )
{
really_die(char const*)::dying = 1;
LogFile::show_tail((LogFile *)&log_file, opt_tail_lines);
if ( cur_con )
{
if ( !*(_BYTE *)(cur_con + 48) )
{
v2 = *(_QWORD *)cur_con;
if ( *(_QWORD *)cur_con )
{
if ( (unsigned int)wrap_mysql_query(*(_QWORD *)cur_con, (long long)"SHOW WARNINGS") )
{
v12 = mysql_errno(v2);
v13 = (const char *)mysql_error(v2);
log_msg("Error running query '%s': %d %s", "SHOW WARNINGS", v12, v13);
}
else
{
v3 = wrap_mysql_store_result(v2);
if ( v3 )
{
v4 = v3;
if ( (unsigned long long)mysql_num_rows(v3) >= 2 )
{
v15 = mysql_num_fields(v4);
fwrite("\nWarnings from just before the error:\n", 38LL, 1LL, stderr);
row = wrap_mysql_fetch_row(v4);
if ( row )
{
v6 = row;
v7 = 0;
v14 = v4;
do
{
lengths = mysql_fetch_lengths(v4);
if ( mysql_num_rows(v4) <= (unsigned long long)(unsigned int)++v7 )
break;
v9 = v1;
if ( v15 )
{
for ( i = 0LL; i != v15; fprintf(*v9, "%.*s ", *(_DWORD *)(lengths + 8 * i++), v11) )
{
v11 = *(const char **)(v6 + 8 * i);
if ( !v11 )
v11 = "NULL";
}
}
fputc(10LL, *v9);
v6 = wrap_mysql_fetch_row(v14);
v1 = v9;
v4 = v14;
}
while ( v6 );
}
}
wrap_mysql_free_result(v4);
}
}
}
}
}
}
cleanup_and_exit(1);
}
|
really_die:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV RAX,qword ptr [0x004d9f98]
MOV RDI,qword ptr [RAX]
CALL 0x0015f570
MOV R14,qword ptr [0x004d9fa8]
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x0015f3a0
MOV RDI,qword ptr [R14]
CALL 0x0015f570
CMP byte ptr [0x0055e34c],0x1
JZ 0x001635bc
MOV byte ptr [0x0055e34c],0x1
MOV ESI,dword ptr [0x0055e350]
LEA RDI,[0x55c5a0]
CALL 0x00171046
MOV RAX,qword ptr [0x0055c348]
TEST RAX,RAX
JZ 0x001635bc
CMP byte ptr [RAX + 0x30],0x0
JNZ 0x001635bc
MOV RBX,qword ptr [RAX]
TEST RBX,RBX
JZ 0x001635bc
LEA RSI,[0x1fba7c]
MOV RDI,RBX
CALL 0x00161cc6
TEST EAX,EAX
JNZ 0x0016358e
MOV RDI,RBX
CALL 0x00161b5c
TEST RAX,RAX
JZ 0x001635bc
MOV RBX,RAX
MOV RDI,RAX
CALL 0x00179ae5
CMP RAX,0x2
JC 0x00163584
MOV RDI,RBX
CALL 0x00179aee
MOV dword ptr [RBP + -0x2c],EAX
MOV RCX,qword ptr [R14]
LEA RDI,[0x1f315e]
MOV ESI,0x26
MOV EDX,0x1
CALL 0x0015fd30
MOV RDI,RBX
CALL 0x001619ba
TEST RAX,RAX
JZ 0x00163584
MOV R12,RAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV qword ptr [RBP + -0x40],RAX
XOR R15D,R15D
MOV qword ptr [RBP + -0x38],RBX
LAB_00163505:
MOV RDI,RBX
CALL 0x00178cea
MOV R13,RAX
INC R15D
MOV RDI,RBX
CALL 0x00179ae5
CMP RAX,R15
JBE 0x00163584
CMP dword ptr [RBP + -0x2c],0x0
MOV RBX,R14
JZ 0x0016355d
XOR R14D,R14D
LAB_0016352c:
MOV RDI,qword ptr [RBX]
MOV EDX,dword ptr [R13 + R14*0x8]
MOV RCX,qword ptr [R12 + R14*0x8]
TEST RCX,RCX
LEA RAX,[0x203196]
CMOVZ RCX,RAX
LEA RSI,[0x1f3185]
XOR EAX,EAX
CALL 0x0015f1f0
INC R14
CMP qword ptr [RBP + -0x40],R14
JNZ 0x0016352c
LAB_0016355d:
MOV RSI,qword ptr [RBX]
MOV EDI,0xa
CALL 0x0015fa50
MOV R13,qword ptr [RBP + -0x38]
MOV RDI,R13
CALL 0x001619ba
MOV R12,RAX
TEST RAX,RAX
MOV R14,RBX
MOV RBX,R13
JNZ 0x00163505
LAB_00163584:
MOV RDI,RBX
CALL 0x00161bbf
JMP 0x001635bc
LAB_0016358e:
MOV RDI,RBX
CALL 0x00179ba9
MOV R14D,EAX
MOV RDI,RBX
CALL 0x00179bbe
LEA RDI,[0x1f313e]
LEA RSI,[0x1fba7c]
MOV EDX,R14D
MOV RCX,RAX
XOR EAX,EAX
CALL 0x0016390c
LAB_001635bc:
MOV EDI,0x1
CALL 0x00163741
|
/* really_die(char const*) */
void really_die(char *param_1)
{
char cVar1;
int iVar2;
uint uVar3;
st_mysql_res *psVar4;
ulong uVar5;
long lVar6;
FILE *in_RCX;
int8 extraout_RDX;
FILE *__stream;
long unaff_R12;
int *puVar7;
ulong unaff_R15;
long in_FS_OFFSET;
int8 extraout_XMM0_Qa;
int8 extraout_XMM1_Qa;
int1 auStack_40150 [8];
FILE *pFStack_40148;
int8 uStack_40140;
FILE *pFStack_40138;
int8 uStack_40120;
int8 uStack_40110;
int8 uStack_400a0;
st_mysql_res **ppsStack_40098;
int1 *puStack_40090;
char acStack_40080 [262144];
char acStack_80 [8];
long lStack_78;
st_mysql *psStack_70;
long lStack_68;
int *puStack_60;
ulong uStack_58;
code *pcStack_50;
ulong local_48;
st_mysql_res *local_40;
uint local_34;
pcStack_50 = (code *)0x16341c;
fflush(*(FILE **)PTR_stdout_004d9f98);
puVar7 = PTR_stderr_004d9fa8;
__stream = *(FILE **)PTR_stderr_004d9fa8;
pcStack_50 = (code *)0x16342e;
fputs(param_1,__stream);
pcStack_50 = (code *)0x163436;
fflush(*(FILE **)puVar7);
if (really_die(char_const*)::dying != '\x01') {
really_die(char_const*)::dying = '\x01';
__stream = (FILE *)(ulong)opt_tail_lines;
pcStack_50 = (code *)0x16345c;
LogFile::show_tail((LogFile *)log_file,opt_tail_lines);
if (((cur_con != (int8 *)0x0) && (*(char *)(cur_con + 6) == '\0')) &&
(param_1 = (char *)*cur_con, (st_mysql *)param_1 != (st_mysql *)0x0)) {
__stream = (FILE *)0x1fba7c;
pcStack_50 = (code *)0x163491;
iVar2 = wrap_mysql_query((st_mysql *)param_1,"SHOW WARNINGS");
if (iVar2 == 0) {
pcStack_50 = (code *)0x1634a1;
psVar4 = (st_mysql_res *)wrap_mysql_store_result((st_mysql *)param_1);
if (psVar4 != (st_mysql_res *)0x0) {
pcStack_50 = (code *)0x1634b5;
uVar5 = mysql_num_rows(psVar4);
if (1 < uVar5) {
pcStack_50 = (code *)0x1634c7;
local_34 = mysql_num_fields(psVar4);
in_RCX = *(FILE **)puVar7;
__stream = (FILE *)0x26;
pcStack_50 = (code *)0x1634e3;
fwrite("\nWarnings from just before the error:\n",0x26,1,in_RCX);
pcStack_50 = (code *)0x1634eb;
lVar6 = wrap_mysql_fetch_row(psVar4);
if (lVar6 != 0) {
local_48 = (ulong)local_34;
unaff_R15 = 0;
unaff_R12 = lVar6;
local_40 = psVar4;
do {
pcStack_50 = (code *)0x16350d;
lVar6 = mysql_fetch_lengths(psVar4);
unaff_R15 = (ulong)((int)unaff_R15 + 1);
pcStack_50 = (code *)0x16351b;
uVar5 = mysql_num_rows(psVar4);
if (uVar5 <= unaff_R15) break;
if (local_34 != 0) {
uVar5 = 0;
do {
in_RCX = *(FILE **)(unaff_R12 + uVar5 * 8);
if (in_RCX == (FILE *)0x0) {
in_RCX = (FILE *)0x203196;
}
pcStack_50 = (code *)0x163554;
fprintf(*(FILE **)puVar7,"%.*s ",(ulong)*(uint *)(lVar6 + uVar5 * 8));
uVar5 = uVar5 + 1;
} while (local_48 != uVar5);
}
__stream = *(FILE **)puVar7;
pcStack_50 = (code *)0x16356a;
fputc(10,__stream);
psVar4 = local_40;
pcStack_50 = (code *)0x163576;
unaff_R12 = wrap_mysql_fetch_row(local_40);
} while (unaff_R12 != 0);
}
}
pcStack_50 = (code *)0x16358c;
wrap_mysql_free_result(psVar4);
param_1 = (char *)psVar4;
}
}
else {
pcStack_50 = (code *)0x163596;
uVar3 = mysql_errno(param_1);
puVar7 = (int *)(ulong)uVar3;
pcStack_50 = (code *)0x1635a1;
in_RCX = (FILE *)mysql_error(param_1);
__stream = (FILE *)0x1fba7c;
pcStack_50 = (code *)0x1635bc;
log_msg("Error running query \'%s\': %d %s","SHOW WARNINGS",puVar7);
}
}
}
lVar6 = 1;
pcStack_50 = abort_not_supported_test;
cVar1 = cleanup_and_exit(1);
puStack_40090 = auStack_40150;
if (cVar1 != '\0') {
uStack_40120 = extraout_XMM0_Qa;
uStack_40110 = extraout_XMM1_Qa;
}
lStack_78 = *(long *)(in_FS_OFFSET + 0x28);
pFStack_40148 = __stream;
uStack_40140 = extraout_RDX;
pFStack_40138 = in_RCX;
psStack_70 = (st_mysql *)param_1;
lStack_68 = unaff_R12;
puStack_60 = puVar7;
uStack_58 = unaff_R15;
pcStack_50 = (code *)&stack0xfffffffffffffff8;
fflush(*(FILE **)PTR_stdout_004d9f98);
puVar7 = PTR_stderr_004d9fa8;
fprintf(*(FILE **)PTR_stderr_004d9fa8,"The test \'%s\' is not supported by this installation\n",
DAT_0055c9d8);
fprintf(*(FILE **)puVar7,"Detected in file %s at line %d\n",*(int8 *)(cur_file + 8),
(ulong)*(uint *)(cur_file + 0x10));
print_file_stack(acStack_40080,acStack_80);
fputs(acStack_40080,*(FILE **)puVar7);
uStack_400a0 = 0x3000000008;
ppsStack_40098 = &local_40;
if (lVar6 != 0) {
fwrite("reason: ",8,1,*(FILE **)puVar7);
__vfprintf_chk(*(int8 *)puVar7,1,lVar6,&uStack_400a0);
fputc(10,*(FILE **)puVar7);
fflush(*(FILE **)puVar7);
}
if (*(long *)(in_FS_OFFSET + 0x28) == lStack_78) {
cleanup_and_exit(0x3e);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
18,597
|
common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int)
|
monkey531[P]llama/common/common.cpp
|
void common_kv_cache_dump_view_seqs(const llama_kv_cache_view & view, int row_size) {
static const char slot_chars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n",
view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx);
std::unordered_map<llama_seq_id, size_t> seqs;
llama_kv_cache_view_cell * c_curr = view.cells;
llama_seq_id * cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] < 0) { continue; }
if (seqs.find(cs_curr[j]) == seqs.end()) {
if (seqs.size() + 1 >= sizeof(slot_chars)) { break; }
const size_t sz = seqs.size();
seqs[cs_curr[j]] = sz;
}
}
if (seqs.size() + 1 >= sizeof(slot_chars)) { break; }
}
printf("=== Sequence legend: ");
for (const auto & it : seqs) {
printf("%zu=%d, ", it.second, it.first);
}
printf("'+'=other sequence ids");
c_curr = view.cells;
cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
if (i % row_size == 0) {
printf("\n%5d: ", i);
}
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] >= 0) {
const auto & it = seqs.find(cs_curr[j]);
putchar(it != seqs.end() ? int(slot_chars[it->second]) : '+');
} else {
putchar('.');
}
}
putchar(' ');
}
printf("\n=== Done dumping\n");
}
|
O3
|
cpp
|
common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, 0x14(%rsp)
movq %rdi, %r14
movl (%rdi), %esi
movl 0x4(%rdi), %edx
movl 0xc(%rdi), %ecx
movl 0x8(%rdi), %r8d
movl 0x10(%rdi), %r9d
movl 0x14(%rdi), %eax
movl %eax, (%rsp)
leaq 0x7846d(%rip), %rdi # 0xef59c
movq $0x0, 0x18(%rsp)
xorl %eax, %eax
callq 0x1a070
leaq 0x50(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
cmpl $0x0, (%r14)
jle 0x771f2
movq 0x20(%r14), %rbp
movl 0x4(%r14), %eax
leaq 0x20(%rsp), %r15
xorl %ebx, %ebx
testl %eax, %eax
jle 0x771ce
movq %rbp, %r12
xorl %r13d, %r13d
cmpl $0x0, (%r12)
js 0x771b9
movq %r15, %rdi
movq %r12, %rsi
callq 0xba3c4
testq %rax, %rax
jne 0x771b9
movq 0x38(%rsp), %rbx
leaq -0x3e(%rbx), %rax
cmpq $-0x3f, %rax
jb 0x771ce
movq %r15, %rdi
movq %r12, %rsi
callq 0xba420
movq %rbx, (%rax)
incq %r13
movslq 0x4(%r14), %rax
addq $0x4, %r12
cmpq %rax, %r13
jl 0x77185
movq 0x38(%rsp), %rbx
leaq -0x3e(%rbx), %rax
cmpq $-0x3f, %rax
jb 0x771f2
movq 0x18(%rsp), %rcx
incl %ecx
movslq 0x4(%r14), %rax
leaq (%rbp,%rax,4), %rbp
movq %rcx, 0x18(%rsp)
cmpl (%r14), %ecx
jl 0x7717b
leaq 0x7842e(%rip), %rdi # 0xef627
xorl %eax, %eax
callq 0x1a070
movq 0x30(%rsp), %rbx
testq %rbx, %rbx
je 0x7722a
leaq 0x7842c(%rip), %r15 # 0xef63d
movq 0x10(%rbx), %rsi
movl 0x8(%rbx), %edx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1a070
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x77211
leaq 0x78415(%rip), %rdi # 0xef646
xorl %eax, %eax
callq 0x1a070
cmpl $0x0, (%r14)
jle 0x772da
movq 0x20(%r14), %r15
leaq 0x20(%rsp), %r12
xorl %ebp, %ebp
movl %ebp, %eax
cltd
idivl 0x14(%rsp)
testl %edx, %edx
jne 0x77268
leaq 0x78336(%rip), %rdi # 0xef595
movl %ebp, %esi
xorl %eax, %eax
callq 0x1a070
cmpl $0x0, 0x4(%r14)
jle 0x772bd
movq %r15, %r13
xorl %ebx, %ebx
cmpl $0x0, (%r13)
js 0x7729c
movq %r12, %rdi
movq %r13, %rsi
callq 0xba3c4
testq %rax, %rax
je 0x772a3
movq 0x10(%rax), %rax
leaq 0x7a80a(%rip), %rcx # 0xf1aa0
movsbl (%rax,%rcx), %edi
jmp 0x772a8
movl $0x2e, %edi
jmp 0x772a8
movl $0x2b, %edi
callq 0x1ac40
incq %rbx
movslq 0x4(%r14), %rax
addq $0x4, %r13
cmpq %rax, %rbx
jl 0x77274
movl $0x20, %edi
callq 0x1ac40
incl %ebp
movslq 0x4(%r14), %rax
leaq (%r15,%rax,4), %r15
cmpl (%r14), %ebp
jl 0x7724d
leaq 0x7a76b(%rip), %rdi # 0xf1a4c
callq 0x1ad80
leaq 0x20(%rsp), %rdi
callq 0xb80bc
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x77303
jmp 0x77303
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xb80bc
movq %rbx, %rdi
callq 0x1afd0
|
_Z30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewi:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_74], esi
mov r14, rdi
mov esi, [rdi]
mov edx, [rdi+4]
mov ecx, [rdi+0Ch]
mov r8d, [rdi+8]
mov r9d, [rdi+10h]
mov eax, [rdi+14h]
mov [rsp+88h+var_88], eax
lea rdi, aDumpingKvCache_0; "=== Dumping KV cache. total cells %d, m"...
mov [rsp+88h+var_70], 0
xor eax, eax
call _printf
lea rax, [rsp+88h+var_38]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
cmp dword ptr [r14], 0
jle loc_771F2
mov rbp, [r14+20h]
mov eax, [r14+4]
lea r15, [rsp+88h+var_68]
xor ebx, ebx
loc_7717B:
test eax, eax
jle short loc_771CE
mov r12, rbp
xor r13d, r13d
loc_77185:
cmp dword ptr [r12], 0
js short loc_771B9
mov rdi, r15
mov rsi, r12
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&)
test rax, rax
jnz short loc_771B9
mov rbx, [rsp+88h+var_50]
lea rax, [rbx-3Eh]
cmp rax, 0FFFFFFFFFFFFFFC1h
jb short loc_771CE
mov rdi, r15
mov rsi, r12
call _ZNSt8__detail9_Map_baseIiSt4pairIKimESaIS3_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int const&)
mov [rax], rbx
loc_771B9:
inc r13
movsxd rax, dword ptr [r14+4]
add r12, 4
cmp r13, rax
jl short loc_77185
mov rbx, [rsp+88h+var_50]
loc_771CE:
lea rax, [rbx-3Eh]
cmp rax, 0FFFFFFFFFFFFFFC1h
jb short loc_771F2
mov rcx, [rsp+88h+var_70]
inc ecx
movsxd rax, dword ptr [r14+4]
lea rbp, [rbp+rax*4+0]
mov [rsp+88h+var_70], rcx
cmp ecx, [r14]
jl short loc_7717B
loc_771F2:
lea rdi, aSequenceLegend; "=== Sequence legend: "
xor eax, eax
call _printf
mov rbx, [rsp+88h+var_58]
test rbx, rbx
jz short loc_7722A
lea r15, aZuD; "%zu=%d, "
loc_77211:
mov rsi, [rbx+10h]
mov edx, [rbx+8]
mov rdi, r15
xor eax, eax
call _printf
mov rbx, [rbx]
test rbx, rbx
jnz short loc_77211
loc_7722A:
lea rdi, aOtherSequenceI; "'+'=other sequence ids"
xor eax, eax
call _printf
cmp dword ptr [r14], 0
jle loc_772DA
mov r15, [r14+20h]
lea r12, [rsp+88h+var_68]
xor ebp, ebp
loc_7724D:
mov eax, ebp
cdq
idiv [rsp+88h+var_74]
test edx, edx
jnz short loc_77268
lea rdi, a5d; "\n%5d: "
mov esi, ebp
xor eax, eax
call _printf
loc_77268:
cmp dword ptr [r14+4], 0
jle short loc_772BD
mov r13, r15
xor ebx, ebx
loc_77274:
cmp dword ptr [r13+0], 0
js short loc_7729C
mov rdi, r12
mov rsi, r13
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&)
test rax, rax
jz short loc_772A3
mov rax, [rax+10h]
lea rcx, _ZZ30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewiE10slot_chars; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"...
movsx edi, byte ptr [rax+rcx]
jmp short loc_772A8
loc_7729C:
mov edi, 2Eh ; '.'
jmp short loc_772A8
loc_772A3:
mov edi, 2Bh ; '+'
loc_772A8:
call _putchar
inc rbx
movsxd rax, dword ptr [r14+4]
add r13, 4
cmp rbx, rax
jl short loc_77274
loc_772BD:
mov edi, 20h ; ' '
call _putchar
inc ebp
movsxd rax, dword ptr [r14+4]
lea r15, [r15+rax*4]
cmp ebp, [r14]
jl loc_7724D
loc_772DA:
lea rdi, aDoneDumping; "\n=== Done dumping"
call _puts
lea rdi, [rsp+88h+var_68]
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_77303
jmp short $+2
loc_77303:
mov rbx, rax
lea rdi, [rsp+arg_18]
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
mov rdi, rbx
call __Unwind_Resume
|
long long common_kv_cache_dump_view_seqs(long long a1, int a2)
{
int *v3; // rbp
long long v4; // rax
long long v5; // rbx
int *v6; // r12
long long v7; // r13
long long *i; // rbx
int *v9; // r15
int v10; // ebp
int *v11; // r13
long long v12; // rbx
long long v13; // rax
long long v14; // rdi
int v16; // [rsp+18h] [rbp-70h]
_QWORD v17[2]; // [rsp+20h] [rbp-68h] BYREF
__int128 v18; // [rsp+30h] [rbp-58h]
int v19; // [rsp+40h] [rbp-48h]
__int128 v20; // [rsp+48h] [rbp-40h] BYREF
v16 = 0;
printf(
"=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large"
"st empty slot=%d @ %d\n",
*(_DWORD *)a1,
*(_DWORD *)(a1 + 4),
*(_DWORD *)(a1 + 12),
*(_DWORD *)(a1 + 8),
*(_DWORD *)(a1 + 16),
*(_DWORD *)(a1 + 20));
v17[0] = (char *)&v20 + 8;
v17[1] = 1LL;
v18 = 0LL;
v19 = 1065353216;
v20 = 0LL;
if ( *(int *)a1 > 0 )
{
v3 = *(int **)(a1 + 32);
LODWORD(v4) = *(_DWORD *)(a1 + 4);
v5 = 0LL;
do
{
if ( (int)v4 > 0 )
{
v6 = v3;
v7 = 0LL;
do
{
if ( *v6 >= 0
&& !std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(
v17,
v6) )
{
v5 = *((_QWORD *)&v18 + 1);
if ( (unsigned long long)(*((_QWORD *)&v18 + 1) - 62LL) < 0xFFFFFFFFFFFFFFC1LL )
goto LABEL_11;
*(_QWORD *)std::__detail::_Map_base<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
v17,
v6) = v5;
}
++v7;
++v6;
}
while ( v7 < *(int *)(a1 + 4) );
v5 = *((_QWORD *)&v18 + 1);
}
LABEL_11:
if ( (unsigned long long)(v5 - 62) < 0xFFFFFFFFFFFFFFC1LL )
break;
v4 = *(int *)(a1 + 4);
v3 += v4;
++v16;
}
while ( v16 < *(_DWORD *)a1 );
}
printf("=== Sequence legend: ");
for ( i = (long long *)v18; i; i = (long long *)*i )
printf("%zu=%d, ", i[2], *((_DWORD *)i + 2));
printf("'+'=other sequence ids");
if ( *(int *)a1 > 0 )
{
v9 = *(int **)(a1 + 32);
v10 = 0;
do
{
if ( !(v10 % a2) )
printf("\n%5d: ", v10);
if ( *(int *)(a1 + 4) > 0 )
{
v11 = v9;
v12 = 0LL;
do
{
if ( *v11 < 0 )
{
v14 = 46LL;
}
else
{
v13 = std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(
v17,
v11);
if ( v13 )
v14 = (unsigned int)common_kv_cache_dump_view_seqs(llama_kv_cache_view const&,int)::slot_chars[*(_QWORD *)(v13 + 16)];
else
v14 = 43LL;
}
putchar(v14);
++v12;
++v11;
}
while ( v12 < *(int *)(a1 + 4) );
}
putchar(32LL);
++v10;
v9 += *(int *)(a1 + 4);
}
while ( v10 < *(_DWORD *)a1 );
}
puts("\n=== Done dumping");
return std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(v17);
}
|
common_kv_cache_dump_view_seqs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RSP + 0x14],ESI
MOV R14,RDI
MOV ESI,dword ptr [RDI]
MOV EDX,dword ptr [RDI + 0x4]
MOV ECX,dword ptr [RDI + 0xc]
MOV R8D,dword ptr [RDI + 0x8]
MOV R9D,dword ptr [RDI + 0x10]
MOV EAX,dword ptr [RDI + 0x14]
MOV dword ptr [RSP],EAX
LEA RDI,[0x1ef59c]
MOV qword ptr [RSP + 0x18],0x0
XOR EAX,EAX
CALL 0x0011a070
LEA RAX,[RSP + 0x50]
MOV qword ptr [RAX + -0x30],RAX
MOV qword ptr [RAX + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV dword ptr [RAX + -0x10],0x3f800000
MOVUPS xmmword ptr [RAX + -0x8],XMM0
CMP dword ptr [R14],0x0
JLE 0x001771f2
MOV RBP,qword ptr [R14 + 0x20]
MOV EAX,dword ptr [R14 + 0x4]
LEA R15,[RSP + 0x20]
XOR EBX,EBX
LAB_0017717b:
TEST EAX,EAX
JLE 0x001771ce
MOV R12,RBP
XOR R13D,R13D
LAB_00177185:
CMP dword ptr [R12],0x0
JS 0x001771b9
LAB_0017718c:
MOV RDI,R15
MOV RSI,R12
CALL 0x001ba3c4
TEST RAX,RAX
JNZ 0x001771b9
MOV RBX,qword ptr [RSP + 0x38]
LEA RAX,[RBX + -0x3e]
CMP RAX,-0x3f
JC 0x001771ce
LAB_001771ab:
MOV RDI,R15
MOV RSI,R12
CALL 0x001ba420
MOV qword ptr [RAX],RBX
LAB_001771b9:
INC R13
MOVSXD RAX,dword ptr [R14 + 0x4]
ADD R12,0x4
CMP R13,RAX
JL 0x00177185
MOV RBX,qword ptr [RSP + 0x38]
LAB_001771ce:
LEA RAX,[RBX + -0x3e]
CMP RAX,-0x3f
JC 0x001771f2
MOV RCX,qword ptr [RSP + 0x18]
INC ECX
MOVSXD RAX,dword ptr [R14 + 0x4]
LEA RBP,[RBP + RAX*0x4]
MOV qword ptr [RSP + 0x18],RCX
CMP ECX,dword ptr [R14]
JL 0x0017717b
LAB_001771f2:
LEA RDI,[0x1ef627]
XOR EAX,EAX
CALL 0x0011a070
MOV RBX,qword ptr [RSP + 0x30]
TEST RBX,RBX
JZ 0x0017722a
LEA R15,[0x1ef63d]
LAB_00177211:
MOV RSI,qword ptr [RBX + 0x10]
MOV EDX,dword ptr [RBX + 0x8]
MOV RDI,R15
XOR EAX,EAX
CALL 0x0011a070
MOV RBX,qword ptr [RBX]
TEST RBX,RBX
JNZ 0x00177211
LAB_0017722a:
LEA RDI,[0x1ef646]
XOR EAX,EAX
CALL 0x0011a070
CMP dword ptr [R14],0x0
JLE 0x001772da
MOV R15,qword ptr [R14 + 0x20]
LEA R12,[RSP + 0x20]
XOR EBP,EBP
LAB_0017724d:
MOV EAX,EBP
CDQ
IDIV dword ptr [RSP + 0x14]
TEST EDX,EDX
JNZ 0x00177268
LEA RDI,[0x1ef595]
MOV ESI,EBP
XOR EAX,EAX
CALL 0x0011a070
LAB_00177268:
CMP dword ptr [R14 + 0x4],0x0
JLE 0x001772bd
MOV R13,R15
XOR EBX,EBX
LAB_00177274:
CMP dword ptr [R13],0x0
JS 0x0017729c
LAB_0017727b:
MOV RDI,R12
MOV RSI,R13
CALL 0x001ba3c4
LAB_00177286:
TEST RAX,RAX
JZ 0x001772a3
MOV RAX,qword ptr [RAX + 0x10]
LEA RCX,[0x1f1aa0]
MOVSX EDI,byte ptr [RAX + RCX*0x1]
JMP 0x001772a8
LAB_0017729c:
MOV EDI,0x2e
JMP 0x001772a8
LAB_001772a3:
MOV EDI,0x2b
LAB_001772a8:
CALL 0x0011ac40
INC RBX
MOVSXD RAX,dword ptr [R14 + 0x4]
ADD R13,0x4
CMP RBX,RAX
JL 0x00177274
LAB_001772bd:
MOV EDI,0x20
CALL 0x0011ac40
INC EBP
MOVSXD RAX,dword ptr [R14 + 0x4]
LEA R15,[R15 + RAX*0x4]
CMP EBP,dword ptr [R14]
JL 0x0017724d
LAB_001772da:
LEA RDI,[0x1f1a4c]
CALL 0x0011ad80
LEA RDI,[RSP + 0x20]
CALL 0x001b80bc
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int) */
void common_kv_cache_dump_view_seqs(llama_kv_cache_view *param_1,int param_2)
{
int8 *puVar1;
long lVar2;
long *plVar3;
ulong uVar4;
int iVar5;
long lVar6;
uint uVar7;
int *piVar8;
int *piVar9;
long lVar10;
int8 *local_68;
int8 local_60;
int8 *local_58;
long lStack_50;
int4 local_48;
int8 local_40;
int8 uStack_38;
iVar5 = 0;
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n"
,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc),
(ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10),
*(int4 *)(param_1 + 0x14));
local_68 = &uStack_38;
local_60 = 1;
local_58 = (int8 *)0x0;
lStack_50 = 0;
local_48 = 0x3f800000;
local_40 = 0;
uStack_38 = 0;
if (0 < *(int *)param_1) {
piVar8 = *(int **)(param_1 + 0x20);
uVar4 = (ulong)*(uint *)(param_1 + 4);
lVar6 = 0;
do {
if (0 < (int)uVar4) {
lVar10 = 0;
piVar9 = piVar8;
do {
/* try { // try from 0017718c to 00177196 has its CatchHandler @ 00177301 */
if ((-1 < *piVar9) &&
(lVar2 = std::
_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::find((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)&local_68,piVar9), lVar6 = lStack_50, lVar2 == 0)) {
if (lStack_50 - 0x3eU < 0xffffffffffffffc1) break;
/* try { // try from 001771ab to 001771b5 has its CatchHandler @ 001772ff */
plVar3 = (long *)std::__detail::
_Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)&local_68,piVar9);
*plVar3 = lVar6;
}
lVar10 = lVar10 + 1;
piVar9 = piVar9 + 1;
lVar6 = lStack_50;
} while (lVar10 < *(int *)(param_1 + 4));
}
if (lVar6 - 0x3eU < 0xffffffffffffffc1) break;
iVar5 = iVar5 + 1;
uVar4 = (ulong)*(int *)(param_1 + 4);
piVar8 = piVar8 + uVar4;
} while (iVar5 < *(int *)param_1);
}
printf("=== Sequence legend: ");
for (puVar1 = local_58; puVar1 != (int8 *)0x0; puVar1 = (int8 *)*puVar1) {
printf("%zu=%d, ",puVar1[2],(ulong)*(uint *)(puVar1 + 1));
}
printf("\'+\'=other sequence ids");
if (0 < *(int *)param_1) {
piVar8 = *(int **)(param_1 + 0x20);
uVar7 = 0;
do {
if ((int)uVar7 % param_2 == 0) {
printf("\n%5d: ",(ulong)uVar7);
}
if (0 < *(int *)(param_1 + 4)) {
lVar6 = 0;
piVar9 = piVar8;
do {
if (*piVar9 < 0) {
iVar5 = 0x2e;
}
else {
/* try { // try from 0017727b to 00177285 has its CatchHandler @ 00177303 */
lVar10 = std::
_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::find((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)&local_68,piVar9);
if (lVar10 == 0) {
iVar5 = 0x2b;
}
else {
iVar5 = (int)"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
[*(long *)(lVar10 + 0x10)];
}
}
putchar(iVar5);
lVar6 = lVar6 + 1;
piVar9 = piVar9 + 1;
} while (lVar6 < *(int *)(param_1 + 4));
}
putchar(0x20);
uVar7 = uVar7 + 1;
piVar8 = piVar8 + *(int *)(param_1 + 4);
} while ((int)uVar7 < *(int *)param_1);
}
puts("\n=== Done dumping");
std::
_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::~_Hashtable((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)&local_68);
return;
}
|
|
18,598
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get()
|
monkey531[P]llama/common/json.hpp
|
char_int_type get()
{
++position.chars_read_total;
++position.chars_read_current_line;
if (next_unget)
{
// just reset the next_unget variable and work with current
next_unget = false;
}
else
{
current = ia.get_character();
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
token_string.push_back(char_traits<char_type>::to_char_type(current));
}
if (current == '\n')
{
++position.lines_read;
position.chars_read_current_line = 0;
}
return current;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get():
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movdqu 0x20(%rdi), %xmm0
pcmpeqd %xmm1, %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x20(%rdi)
cmpb $0x1, 0x18(%rdi)
jne 0x1b48f
movb $0x0, 0x18(%rbx)
movl 0x14(%rbx), %eax
jmp 0x1b4a4
movq (%rbx), %rcx
cmpq 0x8(%rbx), %rcx
je 0x1b4d7
movzbl (%rcx), %eax
incq %rcx
movq %rcx, (%rbx)
movl %eax, 0x14(%rbx)
cmpl $-0x1, %eax
je 0x1b4d3
leaq 0x38(%rbx), %rdi
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
callq 0x5a682
movl 0x14(%rbx), %eax
cmpl $0xa, %eax
jne 0x1b4cd
incq 0x30(%rbx)
andq $0x0, 0x28(%rbx)
pushq $0xa
popq %rax
addq $0x10, %rsp
popq %rbx
retq
pushq $-0x1
jmp 0x1b4cc
pushq $-0x1
popq %rax
jmp 0x1b4a1
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv:
push rbx
sub rsp, 10h
mov rbx, rdi
movdqu xmm0, xmmword ptr [rdi+20h]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword ptr [rdi+20h], xmm0
cmp byte ptr [rdi+18h], 1
jnz short loc_1B48F
mov byte ptr [rbx+18h], 0
mov eax, [rbx+14h]
jmp short loc_1B4A4
loc_1B48F:
mov rcx, [rbx]
cmp rcx, [rbx+8]
jz short loc_1B4D7
movzx eax, byte ptr [rcx]
inc rcx
mov [rbx], rcx
loc_1B4A1:
mov [rbx+14h], eax
loc_1B4A4:
cmp eax, 0FFFFFFFFh
jz short loc_1B4D3
lea rdi, [rbx+38h]
lea rsi, [rsp+18h+var_9]
mov [rsi], al
call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&)
mov eax, [rbx+14h]
cmp eax, 0Ah
jnz short loc_1B4CD
inc qword ptr [rbx+30h]
and qword ptr [rbx+28h], 0
push 0Ah
loc_1B4CC:
pop rax
loc_1B4CD:
add rsp, 10h
pop rbx
retn
loc_1B4D3:
push 0FFFFFFFFFFFFFFFFh
jmp short loc_1B4CC
loc_1B4D7:
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp short loc_1B4A1
|
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(
__m128i *a1)
{
int v1; // eax
unsigned __int8 *v2; // rcx
long long result; // rax
a1[2] = _mm_sub_epi64(_mm_loadu_si128(a1 + 2), (__m128i)-1LL);
if ( a1[1].m128i_i8[8] == 1 )
{
a1[1].m128i_i8[8] = 0;
v1 = a1[1].m128i_i32[1];
}
else
{
v2 = (unsigned __int8 *)a1->m128i_i64[0];
if ( a1->m128i_i64[0] == a1->m128i_i64[1] )
{
v1 = -1;
}
else
{
v1 = *v2;
a1->m128i_i64[0] = (long long)(v2 + 1);
}
a1[1].m128i_i32[1] = v1;
}
if ( v1 == -1 )
return -1LL;
std::vector<char>::emplace_back<char>(&a1[3].m128i_u64[1]);
result = a1[1].m128i_u32[1];
if ( (_DWORD)result != 10 )
return result;
++a1[3].m128i_i64[0];
a1[2].m128i_i64[1] = 0LL;
return 10LL;
}
|
get:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOVDQU XMM0,xmmword ptr [RDI + 0x20]
PCMPEQD XMM1,XMM1
PSUBQ XMM0,XMM1
MOVDQU xmmword ptr [RDI + 0x20],XMM0
CMP byte ptr [RDI + 0x18],0x1
JNZ 0x0011b48f
MOV byte ptr [RBX + 0x18],0x0
MOV EAX,dword ptr [RBX + 0x14]
JMP 0x0011b4a4
LAB_0011b48f:
MOV RCX,qword ptr [RBX]
CMP RCX,qword ptr [RBX + 0x8]
JZ 0x0011b4d7
MOVZX EAX,byte ptr [RCX]
INC RCX
MOV qword ptr [RBX],RCX
LAB_0011b4a1:
MOV dword ptr [RBX + 0x14],EAX
LAB_0011b4a4:
CMP EAX,-0x1
JZ 0x0011b4d3
LEA RDI,[RBX + 0x38]
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],AL
CALL 0x0015a682
MOV EAX,dword ptr [RBX + 0x14]
CMP EAX,0xa
JNZ 0x0011b4cd
INC qword ptr [RBX + 0x30]
AND qword ptr [RBX + 0x28],0x0
PUSH 0xa
LAB_0011b4cc:
POP RAX
LAB_0011b4cd:
ADD RSP,0x10
POP RBX
RET
LAB_0011b4d3:
PUSH -0x1
JMP 0x0011b4cc
LAB_0011b4d7:
PUSH -0x1
POP RAX
JMP 0x0011b4a1
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::get() */
ulong __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::get(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
byte *pbVar1;
uint uVar2;
ulong uStack_20;
char local_9;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + 1;
*(long *)(this + 0x28) = *(long *)(this + 0x28) + 1;
if (this[0x18] ==
(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x1) {
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
uVar2 = *(uint *)(this + 0x14);
}
else {
pbVar1 = *(byte **)this;
if (pbVar1 == *(byte **)(this + 8)) {
uVar2 = 0xffffffff;
}
else {
uVar2 = (uint)*pbVar1;
*(byte **)this = pbVar1 + 1;
}
*(uint *)(this + 0x14) = uVar2;
}
if (uVar2 == 0xffffffff) {
uStack_20 = 0xffffffffffffffff;
}
else {
local_9 = (char)uVar2;
std::vector<char,std::allocator<char>>::emplace_back<char>
((vector<char,std::allocator<char>> *)(this + 0x38),&local_9);
uStack_20 = (ulong)*(uint *)(this + 0x14);
if (*(uint *)(this + 0x14) == 10) {
*(long *)(this + 0x30) = *(long *)(this + 0x30) + 1;
*(int8 *)(this + 0x28) = 0;
uStack_20 = 10;
}
}
return uStack_20;
}
|
|
18,599
|
ma_bitmap_reset_full_page_bits
|
eloqsql/storage/maria/ma_bitmap.c
|
my_bool _ma_bitmap_reset_full_page_bits(MARIA_HA *info,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page,
uint page_count)
{
ulonglong bitmap_page;
uint offset, bit_start, bit_count, tmp, byte_offset;
uchar *data;
DBUG_ENTER("_ma_bitmap_reset_full_page_bits");
DBUG_PRINT("enter", ("page: %lu page_count: %u", (ulong) page, page_count));
mysql_mutex_assert_owner(&info->s->bitmap.bitmap_lock);
bitmap_page= page - page % bitmap->pages_covered;
DBUG_ASSERT(page != bitmap_page);
if (bitmap_page != bitmap->page &&
_ma_change_bitmap_page(info, bitmap, bitmap_page))
DBUG_RETURN(1);
/* Find page number from start of bitmap */
offset= (uint) (page - bitmap->page - 1);
/* Clear bits from 'page * 3' -> '(page + page_count) * 3' */
bit_start= offset * 3;
bit_count= page_count * 3;
byte_offset= bit_start/8;
data= bitmap->map + byte_offset;
offset= bit_start & 7;
tmp= (255 << offset); /* Bits to keep */
if (bit_count + offset < 8)
{
/* Only clear bits between 'offset' and 'offset+bit_count-1' */
tmp^= (255 << (offset + bit_count));
}
*data&= ~tmp;
set_if_smaller(bitmap->full_head_size, byte_offset);
set_if_smaller(bitmap->full_tail_size, byte_offset);
if ((int) (bit_count-= (8 - offset)) > 0)
{
uint fill;
data++;
/*
-1 is here to avoid one 'if' statement and to let the following code
handle the last byte
*/
if ((fill= (bit_count - 1) / 8))
{
bzero(data, fill);
data+= fill;
}
bit_count-= fill * 8; /* Bits left to clear */
tmp= (1 << bit_count) - 1;
*data&= ~tmp;
}
set_if_smaller(info->s->state.first_bitmap_with_space, bitmap_page);
bitmap->changed= 1;
DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap););
DBUG_RETURN(0);
}
|
O3
|
c
|
ma_bitmap_reset_full_page_bits:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r13d
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r8
xorl %r14d, %r14d
movq %rdx, %rax
xorl %edx, %edx
divq 0x138(%rsi)
movq %r12, %r15
subq %rdx, %r15
movq %r15, %rax
cmpq 0x10(%rsi), %r15
je 0x414ff
movq %r8, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r8, -0x30(%rbp)
callq 0x41065
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x415bd
movq 0x10(%rbx), %rax
movq -0x30(%rbp), %r8
notl %eax
addl %eax, %r12d
leal (%r12,%r12,2), %r12d
leal (%r13,%r13,2), %edx
movl %r12d, %eax
shrl $0x3, %eax
movq 0x8(%rbx), %r13
movl %r12d, %ecx
andl $0x7, %ecx
movl $0xff, %esi
movl $0xff, %edi
shll %cl, %edi
addl %edx, %ecx
shll %cl, %esi
cmpl $0x8, %ecx
cmovbl %esi, %r14d
xorl %edi, %r14d
notb %r14b
andb %r14b, (%r13,%rax)
cmpl %eax, 0x28(%rbx)
jbe 0x41547
movl %eax, 0x28(%rbx)
cmpl %eax, 0x2c(%rbx)
jbe 0x4154f
movl %eax, 0x2c(%rbx)
orl $-0x8, %r12d
addl %edx, %r12d
testl %r12d, %r12d
jle 0x415a4
addq %rax, %r13
incq %r13
leal -0x1(%r12), %r14d
cmpl $0x9, %r12d
jb 0x4158c
movl %r14d, %edx
shrl $0x3, %edx
movq %rdx, -0x38(%rbp)
movq %r13, %rdi
xorl %esi, %esi
movq %r8, -0x30(%rbp)
callq 0x292c0
movq -0x30(%rbp), %r8
addq -0x38(%rbp), %r13
andl $0xf8, %r14d
subl %r14d, %r12d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %r12d, %ecx
shll %cl, %eax
andb %al, (%r13)
movq (%r8), %rax
cmpq %r15, 0xd0(%rax)
jbe 0x415b7
movq %r15, 0xd0(%rax)
movb $0x1, 0x20(%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ma_bitmap_reset_full_page_bits:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13d, ecx
mov r12, rdx
mov rbx, rsi
mov r8, rdi
xor r14d, r14d
mov rax, rdx
xor edx, edx
div qword ptr [rsi+138h]
mov r15, r12
sub r15, rdx
mov rax, r15
cmp r15, [rsi+10h]
jz short loc_414FF
mov rdi, r8
mov rsi, rbx
mov rdx, r15
mov [rbp+var_30], r8
call _ma_change_bitmap_page
mov ecx, eax
mov al, 1
test cl, cl
jnz loc_415BD
mov rax, [rbx+10h]
mov r8, [rbp+var_30]
loc_414FF:
not eax
add r12d, eax
lea r12d, [r12+r12*2]
lea edx, [r13+r13*2+0]
mov eax, r12d
shr eax, 3
mov r13, [rbx+8]
mov ecx, r12d
and ecx, 7
mov esi, 0FFh
mov edi, 0FFh
shl edi, cl
add ecx, edx
shl esi, cl
cmp ecx, 8
cmovb r14d, esi
xor r14d, edi
not r14b
and [r13+rax+0], r14b
cmp [rbx+28h], eax
jbe short loc_41547
mov [rbx+28h], eax
loc_41547:
cmp [rbx+2Ch], eax
jbe short loc_4154F
mov [rbx+2Ch], eax
loc_4154F:
or r12d, 0FFFFFFF8h
add r12d, edx
test r12d, r12d
jle short loc_415A4
add r13, rax
inc r13
lea r14d, [r12-1]
cmp r12d, 9
jb short loc_4158C
mov edx, r14d
shr edx, 3
mov [rbp+var_38], rdx
mov rdi, r13
xor esi, esi
mov [rbp+var_30], r8
call _memset
mov r8, [rbp+var_30]
add r13, [rbp+var_38]
loc_4158C:
and r14d, 0F8h
sub r12d, r14d
mov eax, 0FFFFFFFFh
mov ecx, r12d
shl eax, cl
and [r13+0], al
loc_415A4:
mov rax, [r8]
cmp [rax+0D0h], r15
jbe short loc_415B7
mov [rax+0D0h], r15
loc_415B7:
mov byte ptr [rbx+20h], 1
xor eax, eax
loc_415BD:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char ma_bitmap_reset_full_page_bits(long long *a1, long long a2, unsigned long long a3, long long a4)
{
int v4; // r13d
int v5; // r12d
long long *v6; // r8
char v7; // r14
unsigned long long v8; // r15
long long v9; // rax
char v10; // cl
char result; // al
unsigned int v12; // r12d
int v13; // edx
long long v14; // rax
long long v15; // r13
int v16; // ecx
int v17; // edi
unsigned int v18; // ecx
int v19; // r12d
_BYTE *v20; // r13
unsigned int v21; // r14d
long long *v22; // [rsp+10h] [rbp-30h]
v4 = a4;
v5 = a3;
v6 = a1;
v7 = 0;
v8 = a3 - a3 % *(_QWORD *)(a2 + 312);
LODWORD(v9) = a3 - a3 % *(_QWORD *)(a2 + 312);
if ( v8 != *(_QWORD *)(a2 + 16) )
{
v10 = ma_change_bitmap_page(a1, a2, a3 - a3 % *(_QWORD *)(a2 + 312), a4, (long long)a1);
result = 1;
if ( v10 )
return result;
v9 = *(_QWORD *)(a2 + 16);
v6 = a1;
}
v12 = 3 * (~(_DWORD)v9 + v5);
v13 = 3 * v4;
v14 = v12 >> 3;
v15 = *(_QWORD *)(a2 + 8);
v16 = v12 & 7;
v17 = 255 << v16;
v18 = v13 + v16;
if ( v18 < 8 )
v7 = 255 << v18;
*(_BYTE *)(v15 + v14) &= ~(v17 ^ v7);
if ( *(_DWORD *)(a2 + 40) > (unsigned int)v14 )
*(_DWORD *)(a2 + 40) = v14;
if ( *(_DWORD *)(a2 + 44) > (unsigned int)v14 )
*(_DWORD *)(a2 + 44) = v14;
v19 = v13 + (v12 | 0xFFFFFFF8);
if ( v19 > 0 )
{
v20 = (_BYTE *)(v14 + v15 + 1);
v21 = v19 - 1;
if ( (unsigned int)v19 >= 9 )
{
v22 = v6;
memset(v20, 0LL, v21 >> 3);
v6 = v22;
v20 += v21 >> 3;
}
*v20 &= -1 << (v19 - (v21 & 0xF8));
}
if ( *(_QWORD *)(*v6 + 208) > v8 )
*(_QWORD *)(*v6 + 208) = v8;
*(_BYTE *)(a2 + 32) = 1;
return 0;
}
|
_ma_bitmap_reset_full_page_bits:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13D,ECX
MOV R12,RDX
MOV RBX,RSI
MOV R8,RDI
XOR R14D,R14D
MOV RAX,RDX
XOR EDX,EDX
DIV qword ptr [RSI + 0x138]
MOV R15,R12
SUB R15,RDX
MOV RAX,R15
CMP R15,qword ptr [RSI + 0x10]
JZ 0x001414ff
MOV RDI,R8
MOV RSI,RBX
MOV RDX,R15
MOV qword ptr [RBP + -0x30],R8
CALL 0x00141065
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x001415bd
MOV RAX,qword ptr [RBX + 0x10]
MOV R8,qword ptr [RBP + -0x30]
LAB_001414ff:
NOT EAX
ADD R12D,EAX
LEA R12D,[R12 + R12*0x2]
LEA EDX,[R13 + R13*0x2]
MOV EAX,R12D
SHR EAX,0x3
MOV R13,qword ptr [RBX + 0x8]
MOV ECX,R12D
AND ECX,0x7
MOV ESI,0xff
MOV EDI,0xff
SHL EDI,CL
ADD ECX,EDX
SHL ESI,CL
CMP ECX,0x8
CMOVC R14D,ESI
XOR R14D,EDI
NOT R14B
AND byte ptr [R13 + RAX*0x1],R14B
CMP dword ptr [RBX + 0x28],EAX
JBE 0x00141547
MOV dword ptr [RBX + 0x28],EAX
LAB_00141547:
CMP dword ptr [RBX + 0x2c],EAX
JBE 0x0014154f
MOV dword ptr [RBX + 0x2c],EAX
LAB_0014154f:
OR R12D,0xfffffff8
ADD R12D,EDX
TEST R12D,R12D
JLE 0x001415a4
ADD R13,RAX
INC R13
LEA R14D,[R12 + -0x1]
CMP R12D,0x9
JC 0x0014158c
MOV EDX,R14D
SHR EDX,0x3
MOV qword ptr [RBP + -0x38],RDX
MOV RDI,R13
XOR ESI,ESI
MOV qword ptr [RBP + -0x30],R8
CALL 0x001292c0
MOV R8,qword ptr [RBP + -0x30]
ADD R13,qword ptr [RBP + -0x38]
LAB_0014158c:
AND R14D,0xf8
SUB R12D,R14D
MOV EAX,0xffffffff
MOV ECX,R12D
SHL EAX,CL
AND byte ptr [R13],AL
LAB_001415a4:
MOV RAX,qword ptr [R8]
CMP qword ptr [RAX + 0xd0],R15
JBE 0x001415b7
MOV qword ptr [RAX + 0xd0],R15
LAB_001415b7:
MOV byte ptr [RBX + 0x20],0x1
XOR EAX,EAX
LAB_001415bd:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 _ma_bitmap_reset_full_page_bits(long *param_1,long param_2,ulong param_3,int param_4)
{
long lVar1;
ulong __n;
uint uVar2;
char cVar3;
uint uVar4;
uint uVar5;
byte *pbVar6;
byte bVar7;
ulong uVar8;
uVar8 = param_3 - param_3 % *(ulong *)(param_2 + 0x138);
uVar5 = (uint)uVar8;
if (uVar8 != *(ulong *)(param_2 + 0x10)) {
cVar3 = _ma_change_bitmap_page(param_1,param_2,uVar8);
if (cVar3 != '\0') {
return 1;
}
uVar5 = (uint)*(int8 *)(param_2 + 0x10);
}
uVar5 = ((int)param_3 + ~uVar5) * 3;
uVar2 = uVar5 >> 3;
lVar1 = *(long *)(param_2 + 8);
uVar4 = (uVar5 & 7) + param_4 * 3;
bVar7 = 0;
if (uVar4 < 8) {
bVar7 = (byte)(0xff << ((byte)uVar4 & 0x1f));
}
pbVar6 = (byte *)(lVar1 + (ulong)uVar2);
*pbVar6 = *pbVar6 & ~(bVar7 ^ (byte)(0xff << (sbyte)(uVar5 & 7)));
if (uVar2 < *(uint *)(param_2 + 0x28)) {
*(uint *)(param_2 + 0x28) = uVar2;
}
if (uVar2 < *(uint *)(param_2 + 0x2c)) {
*(uint *)(param_2 + 0x2c) = uVar2;
}
uVar5 = (uVar5 | 0xfffffff8) + param_4 * 3;
if (0 < (int)uVar5) {
pbVar6 = (byte *)(lVar1 + (ulong)uVar2 + 1);
if (8 < uVar5) {
__n = (ulong)(uVar5 - 1 >> 3);
memset(pbVar6,0,__n);
pbVar6 = pbVar6 + __n;
}
*pbVar6 = *pbVar6 & (byte)(-1 << ((char)uVar5 - ((byte)(uVar5 - 1) & 0xf8) & 0x1f));
}
if (uVar8 < *(ulong *)(*param_1 + 0xd0)) {
*(ulong *)(*param_1 + 0xd0) = uVar8;
}
*(int1 *)(param_2 + 0x20) = 1;
return 0;
}
|
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.