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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
28,000 | Balloc | eloqsql/libmariadb/libmariadb/ma_dtoa.c | static Bigint *Balloc(int k, Stack_alloc *alloc)
{
Bigint *rv;
DBUG_ASSERT(k <= Kmax);
if (k <= Kmax && alloc->freelist[k])
{
rv= alloc->freelist[k];
alloc->freelist[k]= rv->p.next;
}
else
{
int x, len;
x= 1 << k;
len= MY_ALIGN(sizeof(Bigint) + x * sizeof(ULong), SIZEOF_CHARP);
if (alloc->free + len <= alloc->end)
{
rv= (Bigint*) alloc->free;
alloc->free+= len;
}
else
rv= (Bigint*) malloc(len);
rv->k= k;
rv->maxwds= x;
}
rv->sign= rv->wds= 0;
rv->p.x= (ULong*) (rv + 1);
return rv;
} | O0 | c | Balloc:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0xf, -0x4(%rbp)
jg 0x3515f
movq -0x10(%rbp), %rax
movslq -0x4(%rbp), %rcx
cmpq $0x0, 0x18(%rax,%rcx,8)
je 0x3515f
movq -0x10(%rbp), %rax
movslq -0x4(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movslq -0x4(%rbp), %rcx
movq %rdx, 0x18(%rax,%rcx,8)
jmp 0x351e4
movl -0x4(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
shlq $0x2, %rax
addq $0x18, %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x20(%rbp), %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
ja 0x351c3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movl -0x20(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
jmp 0x351d0
movslq -0x20(%rbp), %rdi
callq 0x135b0
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x18(%rbp), %rcx
addq $0x18, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| Balloc:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
cmp [rbp+var_4], 0Fh
jg short loc_3515F
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_4]
cmp qword ptr [rax+rcx*8+18h], 0
jz short loc_3515F
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_4]
mov rax, [rax+rcx*8+18h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rdx, [rax]
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_4]
mov [rax+rcx*8+18h], rdx
jmp loc_351E4
loc_3515F:
mov ecx, [rbp+var_4]
mov eax, 1
shl eax, cl
mov [rbp+var_1C], eax
movsxd rax, [rbp+var_1C]
shl rax, 2
add rax, 18h
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_20], eax
mov rax, [rbp+var_10]
mov rax, [rax+8]
movsxd rcx, [rbp+var_20]
add rax, rcx
mov rcx, [rbp+var_10]
cmp rax, [rcx+10h]
ja short loc_351C3
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_18], rax
mov edx, [rbp+var_20]
mov rax, [rbp+var_10]
mov rcx, [rax+8]
movsxd rdx, edx
add rcx, rdx
mov [rax+8], rcx
jmp short loc_351D0
loc_351C3:
movsxd rdi, [rbp+var_20]
call _malloc
mov [rbp+var_18], rax
loc_351D0:
mov ecx, [rbp+var_4]
mov rax, [rbp+var_18]
mov [rax+8], ecx
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_18]
mov [rax+0Ch], ecx
loc_351E4:
mov rax, [rbp+var_18]
mov dword ptr [rax+14h], 0
mov rax, [rbp+var_18]
mov dword ptr [rax+10h], 0
mov rcx, [rbp+var_18]
add rcx, 18h
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_18]
add rsp, 20h
pop rbp
retn
| long long Balloc(int a1, long long a2)
{
signed int v3; // [rsp+0h] [rbp-20h]
long long v4; // [rsp+8h] [rbp-18h]
if ( a1 <= 15 && *(_QWORD *)(a2 + 8LL * a1 + 24) )
{
v4 = *(_QWORD *)(a2 + 8LL * a1 + 24);
*(_QWORD *)(a2 + 8LL * a1 + 24) = *(_QWORD *)v4;
}
else
{
v3 = (4 * (1 << a1) + 31) & 0xFFFFFFF8;
if ( (unsigned long long)(v3 + *(_QWORD *)(a2 + 8)) > *(_QWORD *)(a2 + 16) )
{
v4 = malloc(v3);
}
else
{
v4 = *(_QWORD *)(a2 + 8);
*(_QWORD *)(a2 + 8) = v3 + v4;
}
*(_DWORD *)(v4 + 8) = a1;
*(_DWORD *)(v4 + 12) = 1 << a1;
}
*(_DWORD *)(v4 + 20) = 0;
*(_DWORD *)(v4 + 16) = 0;
*(_QWORD *)v4 = v4 + 24;
return v4;
}
| Balloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
CMP dword ptr [RBP + -0x4],0xf
JG 0x0013515f
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x4]
CMP qword ptr [RAX + RCX*0x8 + 0x18],0x0
JZ 0x0013515f
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x4]
MOV RAX,qword ptr [RAX + RCX*0x8 + 0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x4]
MOV qword ptr [RAX + RCX*0x8 + 0x18],RDX
JMP 0x001351e4
LAB_0013515f:
MOV ECX,dword ptr [RBP + -0x4]
MOV EAX,0x1
SHL EAX,CL
MOV dword ptr [RBP + -0x1c],EAX
MOVSXD RAX,dword ptr [RBP + -0x1c]
SHL RAX,0x2
ADD RAX,0x18
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x20]
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x10]
JA 0x001351c3
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV EDX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOVSXD RDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001351d0
LAB_001351c3:
MOVSXD RDI,dword ptr [RBP + -0x20]
CALL 0x001135b0
MOV qword ptr [RBP + -0x18],RAX
LAB_001351d0:
MOV ECX,dword ptr [RBP + -0x4]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x8],ECX
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xc],ECX
LAB_001351e4:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x14],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x10],0x0
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x18
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x20
POP RBP
RET
|
int8 * Balloc(int param_1,long param_2)
{
int iVar1;
uint uVar2;
int8 *local_20;
if ((param_1 < 0x10) && (*(long *)(param_2 + 0x18 + (long)param_1 * 8) != 0)) {
local_20 = *(int8 **)(param_2 + 0x18 + (long)param_1 * 8);
*(int8 *)(param_2 + 0x18 + (long)param_1 * 8) = *local_20;
}
else {
iVar1 = 1 << ((byte)param_1 & 0x1f);
uVar2 = iVar1 * 4 + 0x1fU & 0xfffffff8;
if (*(ulong *)(param_2 + 0x10) < (ulong)(*(long *)(param_2 + 8) + (long)(int)uVar2)) {
local_20 = (int8 *)malloc((long)(int)uVar2);
}
else {
local_20 = *(int8 **)(param_2 + 8);
*(long *)(param_2 + 8) = *(long *)(param_2 + 8) + (long)(int)uVar2;
}
*(int *)(local_20 + 1) = param_1;
*(int *)((long)local_20 + 0xc) = iVar1;
}
*(int4 *)((long)local_20 + 0x14) = 0;
*(int4 *)(local_20 + 2) = 0;
*local_20 = local_20 + 3;
return local_20;
}
| |
28,001 | LefDefParser::lefiSite::Destroy() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMisc.cpp | void
lefiSite::Destroy()
{
int i;
lefFree(name_);
if (numRowPattern_) {
for (i = 0; i < numRowPattern_; i++)
lefFree(siteNames_[i]);
lefFree(siteNames_);
lefFree(siteOrients_);
numRowPattern_ = 0;
}
} | O3 | cpp | LefDefParser::lefiSite::Destroy():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x26040
cmpl $0x0, 0x38(%rbx)
je 0x127af
jle 0x12796
xorl %r14d, %r14d
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x26040
incq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jl 0x1277d
movq 0x40(%rbx), %rdi
callq 0x26040
movq 0x48(%rbx), %rdi
callq 0x26040
movl $0x0, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN12LefDefParser8lefiSite7DestroyEv:
push r14
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+8]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
cmp dword ptr [rbx+38h], 0
jz short loc_127AF
jle short loc_12796
xor r14d, r14d
loc_1277D:
mov rax, [rbx+40h]
mov rdi, [rax+r14*8]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
inc r14
movsxd rax, dword ptr [rbx+38h]
cmp r14, rax
jl short loc_1277D
loc_12796:
mov rdi, [rbx+40h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+48h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov dword ptr [rbx+38h], 0
loc_127AF:
add rsp, 8
pop rbx
pop r14
retn
| long long LefDefParser::lefiSite::Destroy(LefDefParser **this, void *a2)
{
long long result; // rax
long long v3; // r14
result = LefDefParser::lefFree(this[1], a2);
if ( *((_DWORD *)this + 14) )
{
if ( *((int *)this + 14) > 0 )
{
v3 = 0LL;
do
LefDefParser::lefFree(*((LefDefParser **)this[8] + v3++), a2);
while ( v3 < *((int *)this + 14) );
}
LefDefParser::lefFree(this[8], a2);
result = LefDefParser::lefFree(this[9], a2);
*((_DWORD *)this + 14) = 0;
}
return result;
}
| Destroy:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
CALL 0x00126040
CMP dword ptr [RBX + 0x38],0x0
JZ 0x001127af
JLE 0x00112796
XOR R14D,R14D
LAB_0011277d:
MOV RAX,qword ptr [RBX + 0x40]
MOV RDI,qword ptr [RAX + R14*0x8]
CALL 0x00126040
INC R14
MOVSXD RAX,dword ptr [RBX + 0x38]
CMP R14,RAX
JL 0x0011277d
LAB_00112796:
MOV RDI,qword ptr [RBX + 0x40]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x48]
CALL 0x00126040
MOV dword ptr [RBX + 0x38],0x0
LAB_001127af:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* LefDefParser::lefiSite::Destroy() */
void __thiscall LefDefParser::lefiSite::Destroy(lefiSite *this)
{
long lVar1;
lefFree(*(void **)(this + 8));
if (*(int *)(this + 0x38) != 0) {
if (0 < *(int *)(this + 0x38)) {
lVar1 = 0;
do {
lefFree(*(void **)(*(long *)(this + 0x40) + lVar1 * 8));
lVar1 = lVar1 + 1;
} while (lVar1 < *(int *)(this + 0x38));
}
lefFree(*(void **)(this + 0x40));
lefFree(*(void **)(this + 0x48));
*(int4 *)(this + 0x38) = 0;
}
return;
}
| |
28,002 | ftxui::inverted(std::shared_ptr<ftxui::Node>) | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/inverted.cpp | Element inverted(Element child) {
return std::make_shared<Inverted>(std::move(child));
} | O2 | cpp | ftxui::inverted(std::shared_ptr<ftxui::Node>):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r13
movq %rdi, %rbx
pushq $0x70
popq %rdi
callq 0xc450
movq %rax, %r14
leaq 0xf(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0x2233e(%rip), %rax # 0x51b98
movq %rax, (%r14)
leaq 0x10(%r14), %r15
leaq 0x28(%rsp), %r12
movups (%r13), %xmm0
andq $0x0, 0x8(%r13)
movaps %xmm0, -0x8(%r12)
andq $0x0, (%r13)
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x1dfca
leaq 0x38(%rsp), %r13
leaq 0x22354(%rip), %rax # 0x51be8
movq %rax, 0x10(%r14)
movq %r12, %rdi
callq 0x13452
leaq 0x10(%rsp), %rdi
andq $0x0, 0x8(%rdi)
callq 0x2f8f6
movq %r15, (%rbx)
andq $0x0, (%r13)
movq %r14, 0x8(%rbx)
andq $0x0, -0x8(%r13)
movq %r13, %rdi
callq 0x13452
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r12, %rdi
callq 0x13452
leaq 0x10(%rsp), %rdi
callq 0x2f8f6
movq %rbx, %rdi
callq 0xc7f0
| _ZN5ftxui8invertedESt10shared_ptrINS_4NodeEE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 40h
mov r13, rsi
mov rbx, rdi
push 70h ; 'p'
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea rax, [rsp+68h+var_59]
mov [rsp+68h+var_58], rax
mov [rsp+68h+var_50], r14
mov rax, 100000001h
mov [r14+8], rax
lea rax, off_51B98
mov [r14], rax
lea r15, [r14+10h]
lea r12, [rsp+68h+var_40]
movups xmm0, xmmword ptr [r13+0]
and qword ptr [r13+8], 0
movaps xmmword ptr [r12-8], xmm0
and qword ptr [r13+0], 0
lea rsi, [rsp+68h+var_48]
mov rdi, r15
call _ZN5ftxui13NodeDecoratorC2ESt10shared_ptrINS_4NodeEE; ftxui::NodeDecorator::NodeDecorator(std::shared_ptr<ftxui::Node>)
lea r13, [rsp+68h+var_30]
lea rax, off_51BE8
mov [r14+10h], rax
mov rdi, r12
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+68h+var_58]
and qword ptr [rdi+8], 0
call _ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceIN5ftxui12_GLOBAL__N_18InvertedESaIS3_ELN9__gnu_cxx12_Lock_policyE2EEEED2Ev; std::__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::`anonymous namespace'::Inverted,std::allocator<ftxui::`anonymous namespace'::Inverted>,(__gnu_cxx::_Lock_policy)2>>>::~__allocated_ptr()
mov [rbx], r15
and qword ptr [r13+0], 0
mov [rbx+8], r14
and qword ptr [r13-8], 0
mov rdi, r13
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 r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, r12
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+arg_8]
call _ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceIN5ftxui12_GLOBAL__N_18InvertedESaIS3_ELN9__gnu_cxx12_Lock_policyE2EEEED2Ev; std::__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::`anonymous namespace'::Inverted,std::allocator<ftxui::`anonymous namespace'::Inverted>,(__gnu_cxx::_Lock_policy)2>>>::~__allocated_ptr()
mov rdi, rbx
call __Unwind_Resume
| _QWORD * ftxui::inverted(_QWORD *a1, long long a2)
{
_QWORD *v2; // r14
__int128 v3; // xmm0
char v5; // [rsp+Fh] [rbp-59h] BYREF
char *v6; // [rsp+10h] [rbp-58h]
_QWORD *v7; // [rsp+18h] [rbp-50h]
__int128 v8; // [rsp+20h] [rbp-48h] BYREF
long long v9; // [rsp+30h] [rbp-38h]
_QWORD v10[6]; // [rsp+38h] [rbp-30h] BYREF
v2 = (_QWORD *)operator new(0x70uLL);
v6 = &v5;
v7 = v2;
v2[1] = 0x100000001LL;
*v2 = off_51B98;
v3 = *(_OWORD *)a2;
*(_QWORD *)(a2 + 8) = 0LL;
v8 = v3;
*(_QWORD *)a2 = 0LL;
ftxui::NodeDecorator::NodeDecorator(v2 + 2, &v8);
v2[2] = off_51BE8;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v8 + 1);
v7 = 0LL;
std::__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::`anonymous namespace'::Inverted,std::allocator<ftxui::`anonymous namespace'::Inverted>,(__gnu_cxx::_Lock_policy)2>>>::~__allocated_ptr();
*a1 = v2 + 2;
v10[0] = 0LL;
a1[1] = v2;
v9 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v10);
return a1;
}
| inverted:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R13,RSI
MOV RBX,RDI
PUSH 0x70
POP RDI
CALL 0x0010c450
MOV R14,RAX
LEA RAX,[RSP + 0xf]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],R14
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x151b98]
MOV qword ptr [R14],RAX
LEA R15,[R14 + 0x10]
LEA R12,[RSP + 0x28]
MOVUPS XMM0,xmmword ptr [R13]
AND qword ptr [R13 + 0x8],0x0
MOVAPS xmmword ptr [R12 + -0x8],XMM0
AND qword ptr [R13],0x0
LAB_0012f87b:
LEA RSI,[RSP + 0x20]
MOV RDI,R15
CALL 0x0011dfca
LAB_0012f888:
LEA R13,[RSP + 0x38]
LEA RAX,[0x151be8]
MOV qword ptr [R14 + 0x10],RAX
MOV RDI,R12
CALL 0x00113452
LEA RDI,[RSP + 0x10]
AND qword ptr [RDI + 0x8],0x0
CALL 0x0012f8f6
MOV qword ptr [RBX],R15
AND qword ptr [R13],0x0
MOV qword ptr [RBX + 0x8],R14
AND qword ptr [R13 + -0x8],0x0
MOV RDI,R13
CALL 0x00113452
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* ftxui::inverted(std::shared_ptr<ftxui::Node>) */
ftxui * __thiscall ftxui::inverted(ftxui *this,int8 *param_2)
{
int8 *puVar1;
int1 local_59;
int1 *local_58;
int8 *local_50;
int4 local_48;
int4 uStack_44;
int4 uStack_40;
int4 uStack_3c;
int8 local_38;
int8 local_30;
puVar1 = (int8 *)operator_new(0x70);
local_58 = &local_59;
puVar1[1] = 0x100000001;
*puVar1 = &PTR___Sp_counted_ptr_inplace_00151b98;
local_48 = *(int4 *)param_2;
uStack_44 = *(int4 *)((long)param_2 + 4);
uStack_40 = *(int4 *)(param_2 + 1);
uStack_3c = *(int4 *)((long)param_2 + 0xc);
param_2[1] = 0;
*param_2 = 0;
/* try { // try from 0012f87b to 0012f887 has its CatchHandler @ 0012f8d9 */
local_50 = puVar1;
NodeDecorator::NodeDecorator((NodeDecorator *)(puVar1 + 2),&local_48);
puVar1[2] = &PTR__Node_00151be8;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_40);
local_50 = (int8 *)0x0;
std::
__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::(anonymous_namespace)::Inverted,std::allocator<ftxui::(anonymous_namespace)::Inverted>,(__gnu_cxx::_Lock_policy)2>>>
::~__allocated_ptr((__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::(anonymous_namespace)::Inverted,std::allocator<ftxui::(anonymous_namespace)::Inverted>,(__gnu_cxx::_Lock_policy)2>>>
*)&local_58);
*(NodeDecorator **)this = (NodeDecorator *)(puVar1 + 2);
local_30 = 0;
*(int8 **)(this + 8) = puVar1;
local_38 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_30);
return this;
}
| |
28,003 | crc32_combine_op | 3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/crc32.c | uLong ZEXPORT crc32_combine_op(crc1, crc2, op)
uLong crc1;
uLong crc2;
uLong op;
{
return multmodp(op, crc1) ^ (crc2 & 0xffffffff);
} | O3 | c | crc32_combine_op:
xorl %eax, %eax
movl $0x80000000, %ecx # imm = 0x80000000
testl %edx, %ecx
je 0x3dbd
xorl %edi, %eax
leal -0x1(%rcx), %r8d
testl %edx, %r8d
je 0x3ddc
shrl %ecx
movl %edi, %r8d
shrl %r8d
movl %r8d, %r9d
xorl $0xedb88320, %r9d # imm = 0xEDB88320
testb $0x1, %dil
cmovel %r8d, %r9d
movl %r9d, %edi
jmp 0x3dae
movl %eax, %ecx
movl %esi, %eax
xorq %rcx, %rax
retq
| crc32_combine_op:
xor eax, eax
mov ecx, 80000000h
loc_3DAE:
test ecx, edx
jz short loc_3DBD
xor eax, edi
lea r8d, [rcx-1]
test r8d, edx
jz short loc_3DDC
loc_3DBD:
shr ecx, 1
mov r8d, edi
shr r8d, 1
mov r9d, r8d
xor r9d, 0EDB88320h
test dil, 1
cmovz r9d, r8d
mov edi, r9d
jmp short loc_3DAE
loc_3DDC:
mov ecx, eax
mov eax, esi
xor rax, rcx
retn
| unsigned long long crc32_combine_op(unsigned int a1, unsigned int a2, int a3)
{
unsigned int v3; // eax
unsigned int v4; // ecx
unsigned int v5; // r9d
v3 = 0;
v4 = 0x80000000;
while ( 1 )
{
if ( (a3 & v4) != 0 )
{
v3 ^= a1;
if ( (a3 & (v4 - 1)) == 0 )
break;
}
v4 >>= 1;
v5 = (a1 >> 1) ^ 0xEDB88320;
if ( (a1 & 1) == 0 )
v5 = a1 >> 1;
a1 = v5;
}
return v3 ^ (unsigned long long)a2;
}
| crc32_combine_op:
XOR EAX,EAX
MOV ECX,0x80000000
LAB_00103dae:
TEST ECX,EDX
JZ 0x00103dbd
XOR EAX,EDI
LEA R8D,[RCX + -0x1]
TEST R8D,EDX
JZ 0x00103ddc
LAB_00103dbd:
SHR ECX,0x1
MOV R8D,EDI
SHR R8D,0x1
MOV R9D,R8D
XOR R9D,0xedb88320
TEST DIL,0x1
CMOVZ R9D,R8D
MOV EDI,R9D
JMP 0x00103dae
LAB_00103ddc:
MOV ECX,EAX
MOV EAX,ESI
XOR RAX,RCX
RET
|
uint crc32_combine_op(uint param_1,uint param_2,uint param_3)
{
uint uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uVar2 = 0;
uVar3 = 0x80000000;
while (((uVar3 & param_3) == 0 || (uVar2 = uVar2 ^ param_1, (uVar3 - 1 & param_3) != 0))) {
uVar3 = uVar3 >> 1;
uVar4 = param_1 >> 1;
uVar1 = param_1 & 1;
param_1 = uVar4 ^ 0xedb88320;
if (uVar1 == 0) {
param_1 = uVar4;
}
}
return param_2 ^ uVar2;
}
| |
28,004 | lunasvg::SVGLineElement::updateShape(lunasvg::Path&) | dmazzella[P]pylunasvg/lunasvg/source/svggeometryelement.cpp | Rect SVGLineElement::updateShape(Path& path)
{
LengthContext lengthContext(this);
auto x1 = lengthContext.valueForLength(m_x1);
auto y1 = lengthContext.valueForLength(m_y1);
auto x2 = lengthContext.valueForLength(m_x2);
auto y2 = lengthContext.valueForLength(m_y2);
path.moveTo(x1, y1);
path.lineTo(x2, y2);
return Rect(x1, y1, x2 - x1, y2 - y1);
} | O1 | cpp | lunasvg::SVGLineElement::updateShape(lunasvg::Path&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x40(%rsp), %r15
movq %rdi, (%r15)
movb $0x0, 0x8(%r15)
leaq 0x124(%rdi), %rsi
movzbl 0x121(%rdi), %edx
movq %r15, %rdi
callq 0x1f7ea
movaps %xmm0, 0x30(%rsp)
leaq 0x13c(%r14), %rsi
movzbl 0x139(%r14), %edx
movq %r15, %rdi
callq 0x1f7ea
movaps %xmm0, 0x20(%rsp)
leaq 0x154(%r14), %rsi
movzbl 0x151(%r14), %edx
movq %r15, %rdi
callq 0x1f7ea
movaps %xmm0, 0x10(%rsp)
movzbl 0x169(%r14), %edx
addq $0x16c, %r14 # imm = 0x16C
movq %r15, %rdi
movq %r14, %rsi
callq 0x1f7ea
movaps %xmm0, (%rsp)
movq %rbx, %rdi
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
callq 0xced8
movq %rbx, %rdi
movaps 0x10(%rsp), %xmm0
movaps (%rsp), %xmm1
callq 0xcf34
movaps 0x30(%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
subss %xmm0, %xmm1
movaps 0x20(%rsp), %xmm2
movaps (%rsp), %xmm3
subss %xmm2, %xmm3
unpcklps %xmm3, %xmm1 # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
unpcklps %xmm2, %xmm0 # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN7lunasvg14SVGLineElement11updateShapeERNS_4PathE:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r14, rdi
lea r15, [rsp+68h+var_28]
mov [r15], rdi
mov byte ptr [r15+8], 0
lea rsi, [rdi+124h]
movzx edx, byte ptr [rdi+121h]
mov rdi, r15
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection)
movaps xmmword ptr [rsp+68h+var_38], xmm0
lea rsi, [r14+13Ch]
movzx edx, byte ptr [r14+139h]
mov rdi, r15
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection)
movaps xmmword ptr [rsp+68h+var_48], xmm0
lea rsi, [r14+154h]
movzx edx, byte ptr [r14+151h]
mov rdi, r15
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection)
movaps xmmword ptr [rsp+68h+var_58], xmm0
movzx edx, byte ptr [r14+169h]
add r14, 16Ch
mov rdi, r15
mov rsi, r14
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection)
movaps xmmword ptr [rsp+68h+var_68], xmm0
mov rdi, rbx; this
movaps xmm0, xmmword ptr [rsp+68h+var_38]; float
movaps xmm1, xmmword ptr [rsp+68h+var_48]; float
call _ZN7lunasvg4Path6moveToEff; lunasvg::Path::moveTo(float,float)
mov rdi, rbx; this
movaps xmm0, xmmword ptr [rsp+68h+var_58]; float
movaps xmm1, xmmword ptr [rsp+68h+var_68]; float
call _ZN7lunasvg4Path6lineToEff; lunasvg::Path::lineTo(float,float)
movaps xmm0, xmmword ptr [rsp+68h+var_38]
movaps xmm1, xmmword ptr [rsp+68h+var_58]
subss xmm1, xmm0
movaps xmm2, xmmword ptr [rsp+68h+var_48]
movaps xmm3, xmmword ptr [rsp+68h+var_68]
subss xmm3, xmm2
unpcklps xmm1, xmm3
unpcklps xmm0, xmm2
add rsp, 50h
pop rbx
pop r14
pop r15
retn
| __m128 lunasvg::SVGLineElement::updateShape(lunasvg::SVGLineElement *this, lunasvg::Path *a2, __m128 a3)
{
double v4; // xmm0_8
double v5; // xmm0_8
float v7; // [rsp+10h] [rbp-58h]
__m128 v8; // [rsp+20h] [rbp-48h]
__m128 v9; // [rsp+30h] [rbp-38h]
lunasvg::SVGLineElement *v10; // [rsp+40h] [rbp-28h] BYREF
char v11; // [rsp+48h] [rbp-20h]
v10 = this;
v11 = 0;
*(double *)a3.m128_u64 = lunasvg::LengthContext::valueForLength(
&v10,
(char *)this + 292,
*((unsigned __int8 *)this + 289));
v9 = a3;
*(double *)a3.m128_u64 = lunasvg::LengthContext::valueForLength(
&v10,
(char *)this + 316,
*((unsigned __int8 *)this + 313));
v8 = a3;
v4 = lunasvg::LengthContext::valueForLength(&v10, (char *)this + 340, *((unsigned __int8 *)this + 337));
v7 = *(float *)&v4;
v5 = lunasvg::LengthContext::valueForLength(&v10, (char *)this + 364, *((unsigned __int8 *)this + 361));
lunasvg::Path::moveTo(a2, v9.m128_f32[0], v8.m128_f32[0]);
lunasvg::Path::lineTo(a2, v7, *(float *)&v5);
return _mm_unpacklo_ps(v9, v8);
}
| updateShape:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R14,RDI
LEA R15,[RSP + 0x40]
MOV qword ptr [R15],RDI
MOV byte ptr [R15 + 0x8],0x0
LEA RSI,[RDI + 0x124]
MOVZX EDX,byte ptr [RDI + 0x121]
MOV RDI,R15
CALL 0x0011f7ea
MOVAPS xmmword ptr [RSP + 0x30],XMM0
LEA RSI,[R14 + 0x13c]
MOVZX EDX,byte ptr [R14 + 0x139]
MOV RDI,R15
CALL 0x0011f7ea
MOVAPS xmmword ptr [RSP + 0x20],XMM0
LEA RSI,[R14 + 0x154]
MOVZX EDX,byte ptr [R14 + 0x151]
MOV RDI,R15
CALL 0x0011f7ea
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVZX EDX,byte ptr [R14 + 0x169]
ADD R14,0x16c
MOV RDI,R15
MOV RSI,R14
CALL 0x0011f7ea
MOVAPS xmmword ptr [RSP],XMM0
MOV RDI,RBX
MOVAPS XMM0,xmmword ptr [RSP + 0x30]
MOVAPS XMM1,xmmword ptr [RSP + 0x20]
CALL 0x0010ced8
MOV RDI,RBX
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
MOVAPS XMM1,xmmword ptr [RSP]
CALL 0x0010cf34
MOVAPS XMM0,xmmword ptr [RSP + 0x30]
MOVAPS XMM1,xmmword ptr [RSP + 0x10]
SUBSS XMM1,XMM0
MOVAPS XMM2,xmmword ptr [RSP + 0x20]
MOVAPS XMM3,xmmword ptr [RSP]
SUBSS XMM3,XMM2
UNPCKLPS XMM1,XMM3
UNPCKLPS XMM0,XMM2
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* lunasvg::SVGLineElement::updateShape(lunasvg::Path&) */
void __thiscall lunasvg::SVGLineElement::updateShape(SVGLineElement *this,Path *param_1)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
SVGLineElement *local_28;
int1 local_20;
local_20 = 0;
local_28 = this;
fVar1 = (float)LengthContext::valueForLength((LengthContext *)&local_28,this + 0x124,this[0x121]);
fVar2 = (float)LengthContext::valueForLength((LengthContext *)&local_28,this + 0x13c,this[0x139]);
fVar3 = (float)LengthContext::valueForLength((LengthContext *)&local_28,this + 0x154,this[0x151]);
fVar4 = (float)LengthContext::valueForLength((LengthContext *)&local_28,this + 0x16c,this[0x169]);
Path::moveTo(param_1,fVar1,fVar2);
Path::lineTo(param_1,fVar3,fVar4);
return;
}
| |
28,005 | lunasvg::SVGLineElement::updateShape(lunasvg::Path&) | dmazzella[P]pylunasvg/lunasvg/source/svggeometryelement.cpp | Rect SVGLineElement::updateShape(Path& path)
{
LengthContext lengthContext(this);
auto x1 = lengthContext.valueForLength(m_x1);
auto y1 = lengthContext.valueForLength(m_y1);
auto x2 = lengthContext.valueForLength(m_x2);
auto y2 = lengthContext.valueForLength(m_y2);
path.moveTo(x1, y1);
path.lineTo(x2, y2);
return Rect(x1, y1, x2 - x1, y2 - y1);
} | O2 | cpp | lunasvg::SVGLineElement::updateShape(lunasvg::Path&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x40(%rsp), %r15
movq %rdi, (%r15)
movb $0x0, 0x8(%r15)
leaq 0x118(%rdi), %rsi
movq %r15, %rdi
callq 0x11c38
movaps %xmm0, 0x30(%rsp)
leaq 0x130(%r14), %rsi
movq %r15, %rdi
callq 0x11c38
movaps %xmm0, 0x20(%rsp)
leaq 0x148(%r14), %rsi
movq %r15, %rdi
callq 0x11c38
movaps %xmm0, 0x10(%rsp)
addq $0x160, %r14 # imm = 0x160
movq %r15, %rdi
movq %r14, %rsi
callq 0x11c38
movaps %xmm0, (%rsp)
movq %rbx, %rdi
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
callq 0xc674
movq %rbx, %rdi
movaps 0x10(%rsp), %xmm0
movaps (%rsp), %xmm1
callq 0xc6d2
movaps 0x10(%rsp), %xmm1
unpcklps (%rsp), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
movaps 0x30(%rsp), %xmm0
unpcklps 0x20(%rsp), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subps %xmm0, %xmm1
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN7lunasvg14SVGLineElement11updateShapeERNS_4PathE:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r14, rdi
lea r15, [rsp+68h+var_28]
mov [r15], rdi
mov byte ptr [r15+8], 0
lea rsi, [rdi+118h]; lunasvg::SVGLength *
mov rdi, r15; this
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&)
movaps xmmword ptr [rsp+68h+var_38], xmm0
lea rsi, [r14+130h]; lunasvg::SVGLength *
mov rdi, r15; this
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&)
movaps xmmword ptr [rsp+68h+var_48], xmm0
lea rsi, [r14+148h]; lunasvg::SVGLength *
mov rdi, r15; this
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&)
movaps xmmword ptr [rsp+68h+var_58], xmm0
add r14, 160h
mov rdi, r15; this
mov rsi, r14; lunasvg::SVGLength *
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&)
movaps xmmword ptr [rsp+68h+var_68], xmm0
mov rdi, rbx; this
movaps xmm0, xmmword ptr [rsp+68h+var_38]; float
movaps xmm1, xmmword ptr [rsp+68h+var_48]; float
call _ZN7lunasvg4Path6moveToEff; lunasvg::Path::moveTo(float,float)
mov rdi, rbx; this
movaps xmm0, xmmword ptr [rsp+68h+var_58]; float
movaps xmm1, xmmword ptr [rsp+68h+var_68]; float
call _ZN7lunasvg4Path6lineToEff; lunasvg::Path::lineTo(float,float)
movaps xmm1, xmmword ptr [rsp+68h+var_58]
unpcklps xmm1, xmmword ptr [rsp+68h+var_68]
movaps xmm0, xmmword ptr [rsp+68h+var_38]
unpcklps xmm0, xmmword ptr [rsp+68h+var_48]
subps xmm1, xmm0
add rsp, 50h
pop rbx
pop r14
pop r15
retn
| __m128 lunasvg::SVGLineElement::updateShape(lunasvg::SVGLineElement *this, lunasvg::Path *a2, __m128 a3)
{
float v3; // xmm0_4
float v5; // [rsp+10h] [rbp-58h]
__m128 v6; // [rsp+20h] [rbp-48h]
__m128 v7; // [rsp+30h] [rbp-38h]
lunasvg::SVGLineElement *v8; // [rsp+40h] [rbp-28h] BYREF
char v9; // [rsp+48h] [rbp-20h]
v8 = this;
v9 = 0;
a3.m128_f32[0] = lunasvg::LengthContext::valueForLength(
(lunasvg::LengthContext *)&v8,
(lunasvg::SVGLineElement *)((char *)this + 280));
v7 = a3;
a3.m128_f32[0] = lunasvg::LengthContext::valueForLength(
(lunasvg::LengthContext *)&v8,
(lunasvg::SVGLineElement *)((char *)this + 304));
v6 = a3;
v5 = lunasvg::LengthContext::valueForLength(
(lunasvg::LengthContext *)&v8,
(lunasvg::SVGLineElement *)((char *)this + 328));
v3 = lunasvg::LengthContext::valueForLength(
(lunasvg::LengthContext *)&v8,
(lunasvg::SVGLineElement *)((char *)this + 352));
lunasvg::Path::moveTo(a2, v7.m128_f32[0], v6.m128_f32[0]);
lunasvg::Path::lineTo(a2, v5, v3);
return _mm_unpacklo_ps(v7, v6);
}
| updateShape:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R14,RDI
LEA R15,[RSP + 0x40]
MOV qword ptr [R15],RDI
MOV byte ptr [R15 + 0x8],0x0
LEA RSI,[RDI + 0x118]
MOV RDI,R15
CALL 0x00111c38
MOVAPS xmmword ptr [RSP + 0x30],XMM0
LEA RSI,[R14 + 0x130]
MOV RDI,R15
CALL 0x00111c38
MOVAPS xmmword ptr [RSP + 0x20],XMM0
LEA RSI,[R14 + 0x148]
MOV RDI,R15
CALL 0x00111c38
MOVAPS xmmword ptr [RSP + 0x10],XMM0
ADD R14,0x160
MOV RDI,R15
MOV RSI,R14
CALL 0x00111c38
MOVAPS xmmword ptr [RSP],XMM0
MOV RDI,RBX
MOVAPS XMM0,xmmword ptr [RSP + 0x30]
MOVAPS XMM1,xmmword ptr [RSP + 0x20]
CALL 0x0010c674
MOV RDI,RBX
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
MOVAPS XMM1,xmmword ptr [RSP]
CALL 0x0010c6d2
MOVAPS XMM1,xmmword ptr [RSP + 0x10]
UNPCKLPS XMM1,xmmword ptr [RSP]
MOVAPS XMM0,xmmword ptr [RSP + 0x30]
UNPCKLPS XMM0,xmmword ptr [RSP + 0x20]
SUBPS XMM1,XMM0
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* lunasvg::SVGLineElement::updateShape(lunasvg::Path&) */
void __thiscall lunasvg::SVGLineElement::updateShape(SVGLineElement *this,Path *param_1)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
SVGLineElement *local_28;
int1 local_20;
local_20 = 0;
local_28 = this;
fVar1 = (float)LengthContext::valueForLength
((LengthContext *)&local_28,(SVGLength *)(this + 0x118));
fVar2 = (float)LengthContext::valueForLength
((LengthContext *)&local_28,(SVGLength *)(this + 0x130));
fVar3 = (float)LengthContext::valueForLength
((LengthContext *)&local_28,(SVGLength *)(this + 0x148));
fVar4 = (float)LengthContext::valueForLength
((LengthContext *)&local_28,(SVGLength *)(this + 0x160));
Path::moveTo(param_1,fVar1,fVar2);
Path::lineTo(param_1,fVar3,fVar4);
return;
}
| |
28,006 | lunasvg::SVGLineElement::updateShape(lunasvg::Path&) | dmazzella[P]pylunasvg/lunasvg/source/svggeometryelement.cpp | Rect SVGLineElement::updateShape(Path& path)
{
LengthContext lengthContext(this);
auto x1 = lengthContext.valueForLength(m_x1);
auto y1 = lengthContext.valueForLength(m_y1);
auto x2 = lengthContext.valueForLength(m_x2);
auto y2 = lengthContext.valueForLength(m_y2);
path.moveTo(x1, y1);
path.lineTo(x2, y2);
return Rect(x1, y1, x2 - x1, y2 - y1);
} | O3 | cpp | lunasvg::SVGLineElement::updateShape(lunasvg::Path&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x40(%rsp), %r15
movq %rdi, (%r15)
movb $0x0, 0x8(%r15)
leaq 0x124(%rdi), %rsi
movzbl 0x121(%rdi), %edx
movq %r15, %rdi
callq 0x1f696
movaps %xmm0, 0x30(%rsp)
leaq 0x13c(%r14), %rsi
movzbl 0x139(%r14), %edx
movq %r15, %rdi
callq 0x1f696
movaps %xmm0, 0x20(%rsp)
leaq 0x154(%r14), %rsi
movzbl 0x151(%r14), %edx
movq %r15, %rdi
callq 0x1f696
movaps %xmm0, 0x10(%rsp)
movzbl 0x169(%r14), %edx
addq $0x16c, %r14 # imm = 0x16C
movq %r15, %rdi
movq %r14, %rsi
callq 0x1f696
movaps %xmm0, (%rsp)
movq %rbx, %rdi
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
callq 0xcd78
movq %rbx, %rdi
movaps 0x10(%rsp), %xmm0
movaps (%rsp), %xmm1
callq 0xcdd6
movaps 0x10(%rsp), %xmm1
unpcklps (%rsp), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
movaps 0x30(%rsp), %xmm0
unpcklps 0x20(%rsp), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subps %xmm0, %xmm1
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
| _ZN7lunasvg14SVGLineElement11updateShapeERNS_4PathE:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r14, rdi
lea r15, [rsp+68h+var_28]
mov [r15], rdi
mov byte ptr [r15+8], 0
lea rsi, [rdi+124h]
movzx edx, byte ptr [rdi+121h]
mov rdi, r15
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection)
movaps xmmword ptr [rsp+68h+var_38], xmm0
lea rsi, [r14+13Ch]
movzx edx, byte ptr [r14+139h]
mov rdi, r15
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection)
movaps xmmword ptr [rsp+68h+var_48], xmm0
lea rsi, [r14+154h]
movzx edx, byte ptr [r14+151h]
mov rdi, r15
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection)
movaps xmmword ptr [rsp+68h+var_58], xmm0
movzx edx, byte ptr [r14+169h]
add r14, 16Ch
mov rdi, r15
mov rsi, r14
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection)
movaps xmmword ptr [rsp+68h+var_68], xmm0
mov rdi, rbx; this
movaps xmm0, xmmword ptr [rsp+68h+var_38]; float
movaps xmm1, xmmword ptr [rsp+68h+var_48]; float
call _ZN7lunasvg4Path6moveToEff; lunasvg::Path::moveTo(float,float)
mov rdi, rbx; this
movaps xmm0, xmmword ptr [rsp+68h+var_58]; float
movaps xmm1, xmmword ptr [rsp+68h+var_68]; float
call _ZN7lunasvg4Path6lineToEff; lunasvg::Path::lineTo(float,float)
movaps xmm1, xmmword ptr [rsp+68h+var_58]
unpcklps xmm1, xmmword ptr [rsp+68h+var_68]
movaps xmm0, xmmword ptr [rsp+68h+var_38]
unpcklps xmm0, xmmword ptr [rsp+68h+var_48]
subps xmm1, xmm0
add rsp, 50h
pop rbx
pop r14
pop r15
retn
| __m128 lunasvg::SVGLineElement::updateShape(lunasvg::SVGLineElement *this, lunasvg::Path *a2, __m128 a3)
{
double v4; // xmm0_8
double v5; // xmm0_8
float v7; // [rsp+10h] [rbp-58h]
__m128 v8; // [rsp+20h] [rbp-48h]
__m128 v9; // [rsp+30h] [rbp-38h]
lunasvg::SVGLineElement *v10; // [rsp+40h] [rbp-28h] BYREF
char v11; // [rsp+48h] [rbp-20h]
v10 = this;
v11 = 0;
*(double *)a3.m128_u64 = lunasvg::LengthContext::valueForLength(
&v10,
(char *)this + 292,
*((unsigned __int8 *)this + 289));
v9 = a3;
*(double *)a3.m128_u64 = lunasvg::LengthContext::valueForLength(
&v10,
(char *)this + 316,
*((unsigned __int8 *)this + 313));
v8 = a3;
v4 = lunasvg::LengthContext::valueForLength(&v10, (char *)this + 340, *((unsigned __int8 *)this + 337));
v7 = *(float *)&v4;
v5 = lunasvg::LengthContext::valueForLength(&v10, (char *)this + 364, *((unsigned __int8 *)this + 361));
lunasvg::Path::moveTo(a2, v9.m128_f32[0], v8.m128_f32[0]);
lunasvg::Path::lineTo(a2, v7, *(float *)&v5);
return _mm_unpacklo_ps(v9, v8);
}
| updateShape:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R14,RDI
LEA R15,[RSP + 0x40]
MOV qword ptr [R15],RDI
MOV byte ptr [R15 + 0x8],0x0
LEA RSI,[RDI + 0x124]
MOVZX EDX,byte ptr [RDI + 0x121]
MOV RDI,R15
CALL 0x0011f696
MOVAPS xmmword ptr [RSP + 0x30],XMM0
LEA RSI,[R14 + 0x13c]
MOVZX EDX,byte ptr [R14 + 0x139]
MOV RDI,R15
CALL 0x0011f696
MOVAPS xmmword ptr [RSP + 0x20],XMM0
LEA RSI,[R14 + 0x154]
MOVZX EDX,byte ptr [R14 + 0x151]
MOV RDI,R15
CALL 0x0011f696
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVZX EDX,byte ptr [R14 + 0x169]
ADD R14,0x16c
MOV RDI,R15
MOV RSI,R14
CALL 0x0011f696
MOVAPS xmmword ptr [RSP],XMM0
MOV RDI,RBX
MOVAPS XMM0,xmmword ptr [RSP + 0x30]
MOVAPS XMM1,xmmword ptr [RSP + 0x20]
CALL 0x0010cd78
MOV RDI,RBX
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
MOVAPS XMM1,xmmword ptr [RSP]
CALL 0x0010cdd6
MOVAPS XMM1,xmmword ptr [RSP + 0x10]
UNPCKLPS XMM1,xmmword ptr [RSP]
MOVAPS XMM0,xmmword ptr [RSP + 0x30]
UNPCKLPS XMM0,xmmword ptr [RSP + 0x20]
SUBPS XMM1,XMM0
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* lunasvg::SVGLineElement::updateShape(lunasvg::Path&) */
void __thiscall lunasvg::SVGLineElement::updateShape(SVGLineElement *this,Path *param_1)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
SVGLineElement *local_28;
int1 local_20;
local_20 = 0;
local_28 = this;
fVar1 = (float)LengthContext::valueForLength((LengthContext *)&local_28,this + 0x124,this[0x121]);
fVar2 = (float)LengthContext::valueForLength((LengthContext *)&local_28,this + 0x13c,this[0x139]);
fVar3 = (float)LengthContext::valueForLength((LengthContext *)&local_28,this + 0x154,this[0x151]);
fVar4 = (float)LengthContext::valueForLength((LengthContext *)&local_28,this + 0x16c,this[0x169]);
Path::moveTo(param_1,fVar1,fVar2);
Path::lineTo(param_1,fVar3,fVar4);
return;
}
| |
28,007 | SchemaConverter::_not_strings(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)::TrieNode::insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | void insert(const std::string & string) {
auto node = this;
for (char c : string) {
node = &node->children[c];
}
node->is_end_of_string = true;
} | O3 | cpp | SchemaConverter::_not_strings(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)::TrieNode::insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rax
movq 0x8(%rsi), %r14
testq %r14, %r14
je 0xa1b94
movq (%rsi), %r15
xorl %r12d, %r12d
leaq 0x7(%rsp), %rbx
movb (%r15,%r12), %cl
movb %cl, 0x7(%rsp)
movq %rax, %rdi
movq %rbx, %rsi
callq 0xa1ba4
incq %r12
cmpq %r12, %r14
jne 0xa1b79
movb $0x1, 0x30(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEN8TrieNode6insertERKS6_:
push r15
push r14
push r12
push rbx
push rax
mov rax, rdi
mov r14, [rsi+8]
test r14, r14
jz short loc_A1B94
mov r15, [rsi]
xor r12d, r12d
lea rbx, [rsp+28h+var_21]
loc_A1B79:
mov cl, [r15+r12]
mov [rsp+28h+var_21], cl
mov rdi, rax
mov rsi, rbx
call _ZNSt3mapIcZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE8TrieNodeSt4lessIcESaISt4pairIKcSC_EEEixERSG_; std::map<char,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode,std::less<char>,std::allocator<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>>::operator[](char const&)
inc r12
cmp r14, r12
jnz short loc_A1B79
loc_A1B94:
mov byte ptr [rax+30h], 1
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::insert(
long long a1,
long long *a2)
{
long long v2; // rax
long long result; // rax
long long v4; // r14
long long v5; // r15
long long i; // r12
_BYTE v7[33]; // [rsp+1h] [rbp-21h] BYREF
v7[0] = HIBYTE(v2);
result = a1;
v4 = a2[1];
if ( v4 )
{
v5 = *a2;
for ( i = 0LL; i != v4; ++i )
{
v7[0] = *(_BYTE *)(v5 + i);
result = std::map<char,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode,std::less<char>,std::allocator<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>>::operator[](
result,
v7);
}
}
*(_BYTE *)(result + 48) = 1;
return result;
}
| string_const&):
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RAX,RDI
MOV R14,qword ptr [RSI + 0x8]
TEST R14,R14
JZ 0x001a1b94
MOV R15,qword ptr [RSI]
XOR R12D,R12D
LEA RBX,[RSP + 0x7]
LAB_001a1b79:
MOV CL,byte ptr [R15 + R12*0x1]
MOV byte ptr [RSP + 0x7],CL
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001a1ba4
INC R12
CMP R14,R12
JNZ 0x001a1b79
LAB_001a1b94:
MOV byte ptr [RAX + 0x30],0x1
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* SchemaConverter::_not_strings(std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&)::TrieNode::insert(std::__cxx11::string const&) */
void SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::
string>>const&)::TrieNode::insert(std::__cxx11::string_const__
(map<char,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode,std::less<char>,std::allocator<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>>
*param_1,long *param_2)
{
long lVar1;
long lVar2;
int8 in_RAX;
long lVar3;
int8 uStack_28;
lVar1 = param_2[1];
if (lVar1 != 0) {
lVar2 = *param_2;
lVar3 = 0;
uStack_28 = in_RAX;
do {
uStack_28 = CONCAT17(*(int1 *)(lVar2 + lVar3),(int7)uStack_28);
param_1 = (map<char,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode,std::less<char>,std::allocator<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>>
*)std::
map<char,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode,std::less<char>,std::allocator<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>>
::operator[](param_1,(char *)((long)&uStack_28 + 7));
lVar3 = lVar3 + 1;
} while (lVar1 != lVar3);
}
param_1[0x30] =
(map<char,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode,std::less<char>,std::allocator<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>>
)0x1;
return;
}
| |
28,008 | my_read | eloqsql/mysys/my_read.c | size_t my_read(File Filedes, uchar *Buffer, size_t Count, myf MyFlags)
{
size_t readbytes, save_count= 0;
DBUG_ENTER("my_read");
DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %lu",
Filedes, Buffer, (ulong) Count, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP)))
MyFlags|= my_global_flags;
for (;;)
{
errno= 0; /* Linux, Windows don't reset this on EOF/success */
#ifdef _WIN32
readbytes= my_win_read(Filedes, Buffer, Count);
#else
readbytes= read(Filedes, Buffer, Count);
#endif
DBUG_EXECUTE_IF ("simulate_file_read_error",
{
errno= ENOSPC;
readbytes= (size_t) -1;
DBUG_SET("-d,simulate_file_read_error");
DBUG_SET("-d,simulate_my_b_fill_error");
});
if (readbytes != Count)
{
int got_errno= my_errno= errno;
DBUG_PRINT("warning",("Read only %d bytes off %lu from %d, errno: %d",
(int) readbytes, (ulong) Count, Filedes,
got_errno));
if (got_errno == 0 || (readbytes != (size_t) -1 &&
(MyFlags & (MY_NABP | MY_FNABP))))
my_errno= HA_ERR_FILE_TOO_SHORT;
if ((readbytes == 0 || (int) readbytes == -1) && got_errno == EINTR)
{
DBUG_PRINT("debug", ("my_read() was interrupted and returned %ld",
(long) readbytes));
continue; /* Interrupted */
}
/* Do a read retry if we didn't get enough data on first read */
if (readbytes != (size_t) -1 && readbytes != 0 &&
(MyFlags & MY_FULL_IO))
{
Buffer+= readbytes;
Count-= readbytes;
save_count+= readbytes;
continue;
}
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
if (readbytes == (size_t) -1)
my_error(EE_READ,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes), got_errno);
else if (MyFlags & (MY_NABP | MY_FNABP))
my_error(EE_EOFERR,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes), got_errno);
}
if (readbytes == (size_t) -1 ||
((MyFlags & (MY_FNABP | MY_NABP)) && !(MyFlags & MY_FULL_IO)))
DBUG_RETURN(MY_FILE_ERROR); /* Return with error */
}
if (MyFlags & (MY_NABP | MY_FNABP))
readbytes= 0; /* Ok on read */
else
readbytes+= save_count;
break;
}
DBUG_RETURN(readbytes);
} | O0 | c | my_read:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
jmp 0xf4451
movq -0x28(%rbp), %rax
andq $0x1a, %rax
cmpq $0x0, %rax
jne 0xf4471
leaq 0xb8d962(%rip), %rax # 0xc81dc8
movq (%rax), %rax
orq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xf4473
callq 0x2a760
movl $0x0, (%rax)
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x2a5f0
movq %rax, -0x30(%rbp)
jmp 0xf4494
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0xf4609
callq 0x2a760
movl (%rax), %eax
movl %eax, -0x40(%rbp)
callq 0xf5a70
movq %rax, %rcx
movl -0x40(%rbp), %eax
movl %eax, (%rcx)
movl %eax, -0x3c(%rbp)
jmp 0xf44be
cmpl $0x0, -0x3c(%rbp)
je 0xf44d9
cmpq $-0x1, -0x30(%rbp)
je 0xf44e4
movq -0x28(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xf44e4
callq 0xf5a70
movl $0xaf, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0xf44f4
movq -0x30(%rbp), %rax
cmpl $-0x1, %eax
jne 0xf4503
cmpl $0x4, -0x3c(%rbp)
jne 0xf4503
jmp 0xf44fc
jmp 0xf44fe
jmp 0xf4473
cmpq $-0x1, -0x30(%rbp)
je 0xf454d
cmpq $0x0, -0x30(%rbp)
je 0xf454d
movq -0x28(%rbp), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
je 0xf454d
movq -0x30(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0xf4473
movq -0x28(%rbp), %rax
andq $0x1a, %rax
cmpq $0x0, %rax
je 0xf45d6
cmpq $-0x1, -0x30(%rbp)
jne 0xf4594
movq -0x28(%rbp), %rax
andq $0x440, %rax # imm = 0x440
orq $0x4, %rax
movq %rax, -0x48(%rbp)
movl -0xc(%rbp), %edi
callq 0x102f60
movq -0x48(%rbp), %rsi
movq %rax, %rdx
movl -0x3c(%rbp), %ecx
movl $0x2, %edi
movb $0x0, %al
callq 0xef520
jmp 0xf45d4
movq -0x28(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xf45d2
movq -0x28(%rbp), %rax
andq $0x440, %rax # imm = 0x440
orq $0x4, %rax
movq %rax, -0x50(%rbp)
movl -0xc(%rbp), %edi
callq 0x102f60
movq -0x50(%rbp), %rsi
movq %rax, %rdx
movl -0x3c(%rbp), %ecx
movl $0x9, %edi
movb $0x0, %al
callq 0xef520
jmp 0xf45d4
jmp 0xf45d6
cmpq $-0x1, -0x30(%rbp)
je 0xf45fb
movq -0x28(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xf4607
movq -0x28(%rbp), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
jne 0xf4607
jmp 0xf45fd
movq $-0x1, -0x8(%rbp)
jmp 0xf4639
jmp 0xf4609
movq -0x28(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xf4621
movq $0x0, -0x30(%rbp)
jmp 0xf462d
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xf462f
jmp 0xf4631
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_read:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_38], 0
jmp short $+2
loc_F4451:
mov rax, [rbp+var_28]
and rax, 1Ah
cmp rax, 0
jnz short loc_F4471
lea rax, my_global_flags
mov rax, [rax]
or rax, [rbp+var_28]
mov [rbp+var_28], rax
loc_F4471:
jmp short $+2
loc_F4473:
call ___errno_location
mov dword ptr [rax], 0
mov edi, [rbp+var_C]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _read
mov [rbp+var_30], rax
jmp short $+2
loc_F4494:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_20]
jz loc_F4609
call ___errno_location
mov eax, [rax]
mov [rbp+var_40], eax
call _my_thread_var
mov rcx, rax
mov eax, [rbp+var_40]
mov [rcx], eax
mov [rbp+var_3C], eax
jmp short $+2
loc_F44BE:
cmp [rbp+var_3C], 0
jz short loc_F44D9
cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh
jz short loc_F44E4
mov rax, [rbp+var_28]
and rax, 6
cmp rax, 0
jz short loc_F44E4
loc_F44D9:
call _my_thread_var
mov dword ptr [rax], 0AFh
loc_F44E4:
cmp [rbp+var_30], 0
jz short loc_F44F4
mov rax, [rbp+var_30]
cmp eax, 0FFFFFFFFh
jnz short loc_F4503
loc_F44F4:
cmp [rbp+var_3C], 4
jnz short loc_F4503
jmp short $+2
loc_F44FC:
jmp short $+2
loc_F44FE:
jmp loc_F4473
loc_F4503:
cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh
jz short loc_F454D
cmp [rbp+var_30], 0
jz short loc_F454D
mov rax, [rbp+var_28]
and rax, 200h
cmp rax, 0
jz short loc_F454D
mov rax, [rbp+var_30]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rcx, [rbp+var_30]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_30]
add rax, [rbp+var_38]
mov [rbp+var_38], rax
jmp loc_F4473
loc_F454D:
mov rax, [rbp+var_28]
and rax, 1Ah
cmp rax, 0
jz short loc_F45D6
cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh
jnz short loc_F4594
mov rax, [rbp+var_28]
and rax, 440h
or rax, 4
mov [rbp+var_48], rax
mov edi, [rbp+var_C]
call my_filename
mov rsi, [rbp+var_48]
mov rdx, rax
mov ecx, [rbp+var_3C]
mov edi, 2
mov al, 0
call my_error
jmp short loc_F45D4
loc_F4594:
mov rax, [rbp+var_28]
and rax, 6
cmp rax, 0
jz short loc_F45D2
mov rax, [rbp+var_28]
and rax, 440h
or rax, 4
mov [rbp+var_50], rax
mov edi, [rbp+var_C]
call my_filename
mov rsi, [rbp+var_50]
mov rdx, rax
mov ecx, [rbp+var_3C]
mov edi, 9
mov al, 0
call my_error
loc_F45D2:
jmp short $+2
loc_F45D4:
jmp short $+2
loc_F45D6:
cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh
jz short loc_F45FB
mov rax, [rbp+var_28]
and rax, 6
cmp rax, 0
jz short loc_F4607
mov rax, [rbp+var_28]
and rax, 200h
cmp rax, 0
jnz short loc_F4607
loc_F45FB:
jmp short $+2
loc_F45FD:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_F4639
loc_F4607:
jmp short $+2
loc_F4609:
mov rax, [rbp+var_28]
and rax, 6
cmp rax, 0
jz short loc_F4621
mov [rbp+var_30], 0
jmp short loc_F462D
loc_F4621:
mov rax, [rbp+var_38]
add rax, [rbp+var_30]
mov [rbp+var_30], rax
loc_F462D:
jmp short $+2
loc_F462F:
jmp short $+2
loc_F4631:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_F4639:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long my_read(unsigned int a1, const char *a2, long long a3, __int16 a4)
{
long long v4; // rax
long long v5; // rax
unsigned int v7; // [rsp+10h] [rbp-40h]
long long v8; // [rsp+18h] [rbp-38h]
long long v9; // [rsp+20h] [rbp-30h]
__int16 v11; // [rsp+28h] [rbp-28h]
v11 = a4;
v8 = 0LL;
if ( (a4 & 0x1A) == 0 )
v11 = a4 | my_global_flags;
while ( 1 )
{
*(_DWORD *)__errno_location() = 0;
v9 = read(a1, a2, a3);
if ( v9 == a3 )
break;
v7 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(a1, a2) = v7;
if ( !v7 || v9 != -1 && (v11 & 6) != 0 )
*(_DWORD *)my_thread_var(a1, a2) = 175;
if ( v9 && (_DWORD)v9 != -1 || v7 != 4 )
{
if ( v9 == -1 || !v9 || (v11 & 0x200) == 0 )
{
if ( (v11 & 0x1A) != 0 )
{
if ( v9 == -1 )
{
v4 = my_filename(a1);
my_error(2u, v11 & 0x440 | 4LL, v4, v7);
}
else if ( (v11 & 6) != 0 )
{
v5 = my_filename(a1);
my_error(9u, v11 & 0x440 | 4LL, v5, v7);
}
}
if ( v9 == -1 || (v11 & 6) != 0 && (v11 & 0x200) == 0 )
return -1LL;
break;
}
a2 += v9;
a3 -= v9;
v8 += v9;
}
}
if ( (v11 & 6) != 0 )
return 0LL;
else
return v9 + v8;
}
| my_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x38],0x0
JMP 0x001f4451
LAB_001f4451:
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x1a
CMP RAX,0x0
JNZ 0x001f4471
LEA RAX,[0xd81dc8]
MOV RAX,qword ptr [RAX]
OR RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
LAB_001f4471:
JMP 0x001f4473
LAB_001f4473:
CALL 0x0012a760
MOV dword ptr [RAX],0x0
MOV EDI,dword ptr [RBP + -0xc]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0012a5f0
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001f4494
LAB_001f4494:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x001f4609
CALL 0x0012a760
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x40],EAX
CALL 0x001f5a70
MOV RCX,RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RCX],EAX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001f44be
LAB_001f44be:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x001f44d9
CMP qword ptr [RBP + -0x30],-0x1
JZ 0x001f44e4
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001f44e4
LAB_001f44d9:
CALL 0x001f5a70
MOV dword ptr [RAX],0xaf
LAB_001f44e4:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001f44f4
MOV RAX,qword ptr [RBP + -0x30]
CMP EAX,-0x1
JNZ 0x001f4503
LAB_001f44f4:
CMP dword ptr [RBP + -0x3c],0x4
JNZ 0x001f4503
JMP 0x001f44fc
LAB_001f44fc:
JMP 0x001f44fe
LAB_001f44fe:
JMP 0x001f4473
LAB_001f4503:
CMP qword ptr [RBP + -0x30],-0x1
JZ 0x001f454d
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001f454d
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x200
CMP RAX,0x0
JZ 0x001f454d
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001f4473
LAB_001f454d:
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x1a
CMP RAX,0x0
JZ 0x001f45d6
CMP qword ptr [RBP + -0x30],-0x1
JNZ 0x001f4594
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x440
OR RAX,0x4
MOV qword ptr [RBP + -0x48],RAX
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x00202f60
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,RAX
MOV ECX,dword ptr [RBP + -0x3c]
MOV EDI,0x2
MOV AL,0x0
CALL 0x001ef520
JMP 0x001f45d4
LAB_001f4594:
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001f45d2
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x440
OR RAX,0x4
MOV qword ptr [RBP + -0x50],RAX
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x00202f60
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,RAX
MOV ECX,dword ptr [RBP + -0x3c]
MOV EDI,0x9
MOV AL,0x0
CALL 0x001ef520
LAB_001f45d2:
JMP 0x001f45d4
LAB_001f45d4:
JMP 0x001f45d6
LAB_001f45d6:
CMP qword ptr [RBP + -0x30],-0x1
JZ 0x001f45fb
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001f4607
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x200
CMP RAX,0x0
JNZ 0x001f4607
LAB_001f45fb:
JMP 0x001f45fd
LAB_001f45fd:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001f4639
LAB_001f4607:
JMP 0x001f4609
LAB_001f4609:
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001f4621
MOV qword ptr [RBP + -0x30],0x0
JMP 0x001f462d
LAB_001f4621:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
LAB_001f462d:
JMP 0x001f462f
LAB_001f462f:
JMP 0x001f4631
LAB_001f4631:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_001f4639:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long my_read(int param_1,void *param_2,size_t param_3,ulong param_4)
{
int iVar1;
int *piVar2;
size_t sVar3;
int4 *puVar4;
int8 uVar5;
long local_40;
long local_38;
ulong local_30;
size_t local_28;
void *local_20;
local_40 = 0;
local_28 = param_3;
local_20 = param_2;
local_30 = param_4;
if ((param_4 & 0x1a) == 0) {
local_30 = my_global_flags | param_4;
}
do {
do {
piVar2 = __errno_location();
*piVar2 = 0;
sVar3 = read(param_1,local_20,local_28);
if (sVar3 == local_28) {
LAB_001f4609:
if ((local_30 & 6) == 0) {
local_38 = local_40 + sVar3;
}
else {
local_38 = 0;
}
return local_38;
}
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar1;
if ((iVar1 == 0) || ((sVar3 != 0xffffffffffffffff && ((local_30 & 6) != 0)))) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0xaf;
}
} while (((sVar3 == 0) || ((int)sVar3 == -1)) && (iVar1 == 4));
if (((sVar3 == 0xffffffffffffffff) || (sVar3 == 0)) || ((local_30 & 0x200) == 0)) {
if ((local_30 & 0x1a) != 0) {
if (sVar3 == 0xffffffffffffffff) {
uVar5 = my_filename(param_1);
my_error(2,local_30 & 0x440 | 4,uVar5,iVar1);
}
else if ((local_30 & 6) != 0) {
uVar5 = my_filename(param_1);
my_error(9,local_30 & 0x440 | 4,uVar5,iVar1);
}
}
if ((sVar3 == 0xffffffffffffffff) || (((local_30 & 6) != 0 && ((local_30 & 0x200) == 0)))) {
return -1;
}
goto LAB_001f4609;
}
local_20 = (void *)(sVar3 + (long)local_20);
local_28 = local_28 - sVar3;
local_40 = sVar3 + local_40;
} while( true );
}
| |
28,009 | my_read | eloqsql/mysys/my_read.c | size_t my_read(File Filedes, uchar *Buffer, size_t Count, myf MyFlags)
{
size_t readbytes, save_count= 0;
DBUG_ENTER("my_read");
DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %lu",
Filedes, Buffer, (ulong) Count, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP)))
MyFlags|= my_global_flags;
for (;;)
{
errno= 0; /* Linux, Windows don't reset this on EOF/success */
#ifdef _WIN32
readbytes= my_win_read(Filedes, Buffer, Count);
#else
readbytes= read(Filedes, Buffer, Count);
#endif
DBUG_EXECUTE_IF ("simulate_file_read_error",
{
errno= ENOSPC;
readbytes= (size_t) -1;
DBUG_SET("-d,simulate_file_read_error");
DBUG_SET("-d,simulate_my_b_fill_error");
});
if (readbytes != Count)
{
int got_errno= my_errno= errno;
DBUG_PRINT("warning",("Read only %d bytes off %lu from %d, errno: %d",
(int) readbytes, (ulong) Count, Filedes,
got_errno));
if (got_errno == 0 || (readbytes != (size_t) -1 &&
(MyFlags & (MY_NABP | MY_FNABP))))
my_errno= HA_ERR_FILE_TOO_SHORT;
if ((readbytes == 0 || (int) readbytes == -1) && got_errno == EINTR)
{
DBUG_PRINT("debug", ("my_read() was interrupted and returned %ld",
(long) readbytes));
continue; /* Interrupted */
}
/* Do a read retry if we didn't get enough data on first read */
if (readbytes != (size_t) -1 && readbytes != 0 &&
(MyFlags & MY_FULL_IO))
{
Buffer+= readbytes;
Count-= readbytes;
save_count+= readbytes;
continue;
}
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
if (readbytes == (size_t) -1)
my_error(EE_READ,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes), got_errno);
else if (MyFlags & (MY_NABP | MY_FNABP))
my_error(EE_EOFERR,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes), got_errno);
}
if (readbytes == (size_t) -1 ||
((MyFlags & (MY_FNABP | MY_NABP)) && !(MyFlags & MY_FULL_IO)))
DBUG_RETURN(MY_FILE_ERROR); /* Return with error */
}
if (MyFlags & (MY_NABP | MY_FNABP))
readbytes= 0; /* Ok on read */
else
readbytes+= save_count;
break;
}
DBUG_RETURN(readbytes);
} | O3 | c | my_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movl %edi, -0x2c(%rbp)
movq $0x0, -0x48(%rbp)
movl $0x0, %r15d
testb $0x1a, %cl
jne 0xa0527
leaq 0xb67ca4(%rip), %rax # 0xc081c8
movq (%rax), %r15
orq %rcx, %r15
callq 0x297b0
movq %rax, -0x50(%rbp)
movl $0x0, (%rax)
movl -0x2c(%rbp), %edi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x29630
movq %rax, %r14
movl %r15d, %eax
andl $0x6, %eax
movq %rax, -0x38(%rbp)
cmpq %r12, %r14
je 0xa05fb
movq %r15, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x50(%rbp), %r15
cmpq $0x0, -0x38(%rbp)
sete %r13b
movl (%r15), %r15d
callq 0xa1672
movl %r15d, (%rax)
cmpq $-0x1, %r14
sete %al
testl %r15d, %r15d
je 0xa0592
orb %r13b, %al
jne 0xa059d
callq 0xa1672
movl $0xaf, (%rax)
testq %r14, %r14
sete %al
cmpl $-0x1, %r14d
sete %cl
orb %al, %cl
cmpl $0x4, %r15d
sete %al
testb %al, %cl
jne 0xa05d6
leaq 0x1(%r14), %rax
cmpq $0x2, %rax
jb 0xa061f
movq -0x40(%rbp), %rax
andl $0x200, %eax # imm = 0x200
je 0xa061f
addq %r14, %rbx
subq %r14, %r12
addq %r14, -0x48(%rbp)
movq -0x50(%rbp), %r15
movl $0x0, (%r15)
movl -0x2c(%rbp), %edi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x29630
movq %rax, %r14
cmpq %r12, %rax
jne 0xa056d
movq %r12, %r14
movq -0x48(%rbp), %rcx
addq %r14, %rcx
xorl %eax, %eax
cmpq $0x0, -0x38(%rbp)
cmoveq %rcx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x40(%rbp), %rax
testb $0x1a, %al
je 0xa067f
cmpq $-0x1, %r14
je 0xa06ac
cmpq $0x0, -0x38(%rbp)
je 0xa06e3
movq -0x40(%rbp), %r12
movl %r12d, %ebx
andl $0x440, %ebx # imm = 0x440
orq $0x4, %rbx
movl -0x2c(%rbp), %edi
callq 0xa8b50
movl $0x9, %edi
movq %rbx, %rsi
movq %rax, %rdx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x9dd27
btl $0x9, %r12d
movl $0x1, %eax
movq %rax, -0x38(%rbp)
movq $-0x1, %rax
jb 0xa05fe
jmp 0xa0610
btl $0x9, %eax
setae %cl
cmpq $0x0, -0x38(%rbp)
setne %dl
movq $-0x1, %rax
cmpq $-0x1, %r14
je 0xa0610
andb %cl, %dl
je 0xa05fe
jmp 0xa0610
movq -0x40(%rbp), %rbx
andl $0x440, %ebx # imm = 0x440
orq $0x4, %rbx
movl -0x2c(%rbp), %edi
callq 0xa8b50
movl $0x2, %edi
movq %rbx, %rsi
movq %rax, %rdx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x9dd27
movq $-0x1, %rax
jmp 0xa0610
movq $0x0, -0x38(%rbp)
jmp 0xa05fe
| my_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, rdx
mov rbx, rsi
mov [rbp+var_2C], edi
mov [rbp+var_48], 0
mov r15d, 0
test cl, 1Ah
jnz short loc_A0527
lea rax, my_global_flags
mov r15, [rax]
loc_A0527:
or r15, rcx
call ___errno_location
mov [rbp+var_50], rax
mov dword ptr [rax], 0
mov edi, [rbp+var_2C]
mov rsi, rbx
mov rdx, r12
call _read
mov r14, rax
mov eax, r15d
and eax, 6
mov [rbp+var_38], rax
cmp r14, r12
jz loc_A05FB
mov [rbp+var_40], r15
mov [rbp+var_48], 0
mov r15, [rbp+var_50]
loc_A056D:
cmp [rbp+var_38], 0
setz r13b
mov r15d, [r15]
call _my_thread_var
mov [rax], r15d
cmp r14, 0FFFFFFFFFFFFFFFFh
setz al
test r15d, r15d
jz short loc_A0592
or al, r13b
jnz short loc_A059D
loc_A0592:
call _my_thread_var
mov dword ptr [rax], 0AFh
loc_A059D:
test r14, r14
setz al
cmp r14d, 0FFFFFFFFh
setz cl
or cl, al
cmp r15d, 4
setz al
test cl, al
jnz short loc_A05D6
lea rax, [r14+1]
cmp rax, 2
jb short loc_A061F
mov rax, [rbp+var_40]
and eax, 200h
jz short loc_A061F
add rbx, r14
sub r12, r14
add [rbp+var_48], r14
loc_A05D6:
mov r15, [rbp+var_50]
mov dword ptr [r15], 0
mov edi, [rbp+var_2C]
mov rsi, rbx
mov rdx, r12
call _read
mov r14, rax
cmp rax, r12
jnz loc_A056D
loc_A05FB:
mov r14, r12
loc_A05FE:
mov rcx, [rbp+var_48]
add rcx, r14
xor eax, eax
cmp [rbp+var_38], 0
cmovz rax, rcx
loc_A0610:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A061F:
mov rax, [rbp+var_40]
test al, 1Ah
jz short loc_A067F
cmp r14, 0FFFFFFFFFFFFFFFFh
jz short loc_A06AC
cmp [rbp+var_38], 0
jz loc_A06E3
mov r12, [rbp+var_40]
mov ebx, r12d
and ebx, 440h
or rbx, 4
mov edi, [rbp+var_2C]
call my_filename
mov edi, 9
mov rsi, rbx
mov rdx, rax
mov ecx, r15d
xor eax, eax
call my_error
bt r12d, 9
mov eax, 1
mov [rbp+var_38], rax
mov rax, 0FFFFFFFFFFFFFFFFh
jb short loc_A05FE
jmp short loc_A0610
loc_A067F:
bt eax, 9
setnb cl
cmp [rbp+var_38], 0
setnz dl
mov rax, 0FFFFFFFFFFFFFFFFh
cmp r14, 0FFFFFFFFFFFFFFFFh
jz loc_A0610
and dl, cl
jz loc_A05FE
jmp loc_A0610
loc_A06AC:
mov rbx, [rbp+var_40]
and ebx, 440h
or rbx, 4
mov edi, [rbp+var_2C]
call my_filename
mov edi, 2
mov rsi, rbx
mov rdx, rax
mov ecx, r15d
xor eax, eax
call my_error
mov rax, 0FFFFFFFFFFFFFFFFh
jmp loc_A0610
loc_A06E3:
mov [rbp+var_38], 0
jmp loc_A05FE
| long long my_read(long long a1, const char *a2, long long a3, __int16 a4)
{
const char *v5; // rbx
__int16 v6; // r15
__int16 v7; // r15
long long v8; // r14
unsigned int *v9; // r15
unsigned int v10; // r15d
long long result; // rax
long long v12; // rax
long long v13; // rax
unsigned int *v14; // [rsp+0h] [rbp-50h]
long long v15; // [rsp+8h] [rbp-48h]
__int16 v16; // [rsp+10h] [rbp-40h]
long long v17; // [rsp+18h] [rbp-38h]
unsigned int v18; // [rsp+24h] [rbp-2Ch]
v5 = a2;
v18 = a1;
v15 = 0LL;
v6 = 0;
if ( (a4 & 0x1A) == 0 )
v6 = my_global_flags;
v7 = a4 | v6;
v14 = (unsigned int *)__errno_location(a1);
*v14 = 0;
a1 = (unsigned int)a1;
v8 = read((unsigned int)a1, a2, a3);
v17 = v7 & 6;
if ( v8 == a3 )
{
LABEL_13:
v8 = a3;
goto LABEL_14;
}
v16 = v7;
v15 = 0LL;
v9 = v14;
while ( 1 )
{
v10 = *v9;
*(_DWORD *)my_thread_var(a1, a2) = v10;
if ( !v10 || v17 != 0 && v8 != -1 )
*(_DWORD *)my_thread_var(a1, a2) = 175;
if ( v10 == 4 && (v8 == 0 || (_DWORD)v8 == -1) )
goto LABEL_12;
if ( (unsigned long long)(v8 + 1) < 2 || (v16 & 0x200) == 0 )
break;
v5 += v8;
a3 -= v8;
v15 += v8;
LABEL_12:
v9 = v14;
*v14 = 0;
a1 = v18;
a2 = v5;
v8 = read(v18, v5, a3);
if ( v8 == a3 )
goto LABEL_13;
}
if ( (v16 & 0x1A) != 0 )
{
if ( v8 == -1 )
{
v13 = my_filename(v18);
my_error(2u, v16 & 0x440 | 4LL, v13, v10);
return -1LL;
}
if ( v17 )
{
v12 = my_filename(v18);
my_error(9u, v16 & 0x440 | 4LL, v12, v10);
v17 = 1LL;
result = -1LL;
if ( (v16 & 0x200) == 0 )
return result;
}
else
{
v17 = 0LL;
}
LABEL_14:
result = 0LL;
if ( !v17 )
return v8 + v15;
}
else
{
result = -1LL;
if ( v8 != -1 && ((v16 & 0x200) != 0 || v17 == 0) )
goto LABEL_14;
}
return result;
}
| my_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,RDX
MOV RBX,RSI
MOV dword ptr [RBP + -0x2c],EDI
MOV qword ptr [RBP + -0x48],0x0
MOV R15D,0x0
TEST CL,0x1a
JNZ 0x001a0527
LEA RAX,[0xd081c8]
MOV R15,qword ptr [RAX]
LAB_001a0527:
OR R15,RCX
CALL 0x001297b0
MOV qword ptr [RBP + -0x50],RAX
MOV dword ptr [RAX],0x0
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,RBX
MOV RDX,R12
CALL 0x00129630
MOV R14,RAX
MOV EAX,R15D
AND EAX,0x6
MOV qword ptr [RBP + -0x38],RAX
CMP R14,R12
JZ 0x001a05fb
MOV qword ptr [RBP + -0x40],R15
MOV qword ptr [RBP + -0x48],0x0
MOV R15,qword ptr [RBP + -0x50]
LAB_001a056d:
CMP qword ptr [RBP + -0x38],0x0
SETZ R13B
MOV R15D,dword ptr [R15]
CALL 0x001a1672
MOV dword ptr [RAX],R15D
CMP R14,-0x1
SETZ AL
TEST R15D,R15D
JZ 0x001a0592
OR AL,R13B
JNZ 0x001a059d
LAB_001a0592:
CALL 0x001a1672
MOV dword ptr [RAX],0xaf
LAB_001a059d:
TEST R14,R14
SETZ AL
CMP R14D,-0x1
SETZ CL
OR CL,AL
CMP R15D,0x4
SETZ AL
TEST CL,AL
JNZ 0x001a05d6
LEA RAX,[R14 + 0x1]
CMP RAX,0x2
JC 0x001a061f
MOV RAX,qword ptr [RBP + -0x40]
AND EAX,0x200
JZ 0x001a061f
ADD RBX,R14
SUB R12,R14
ADD qword ptr [RBP + -0x48],R14
LAB_001a05d6:
MOV R15,qword ptr [RBP + -0x50]
MOV dword ptr [R15],0x0
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,RBX
MOV RDX,R12
CALL 0x00129630
MOV R14,RAX
CMP RAX,R12
JNZ 0x001a056d
LAB_001a05fb:
MOV R14,R12
LAB_001a05fe:
MOV RCX,qword ptr [RBP + -0x48]
ADD RCX,R14
XOR EAX,EAX
CMP qword ptr [RBP + -0x38],0x0
CMOVZ RAX,RCX
LAB_001a0610:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a061f:
MOV RAX,qword ptr [RBP + -0x40]
TEST AL,0x1a
JZ 0x001a067f
CMP R14,-0x1
JZ 0x001a06ac
CMP qword ptr [RBP + -0x38],0x0
JZ 0x001a06e3
MOV R12,qword ptr [RBP + -0x40]
MOV EBX,R12D
AND EBX,0x440
OR RBX,0x4
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x001a8b50
MOV EDI,0x9
MOV RSI,RBX
MOV RDX,RAX
MOV ECX,R15D
XOR EAX,EAX
CALL 0x0019dd27
BT R12D,0x9
MOV EAX,0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,-0x1
JC 0x001a05fe
JMP 0x001a0610
LAB_001a067f:
BT EAX,0x9
SETNC CL
CMP qword ptr [RBP + -0x38],0x0
SETNZ DL
MOV RAX,-0x1
CMP R14,-0x1
JZ 0x001a0610
AND DL,CL
JZ 0x001a05fe
JMP 0x001a0610
LAB_001a06ac:
MOV RBX,qword ptr [RBP + -0x40]
AND EBX,0x440
OR RBX,0x4
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x001a8b50
MOV EDI,0x2
MOV RSI,RBX
MOV RDX,RAX
MOV ECX,R15D
XOR EAX,EAX
CALL 0x0019dd27
MOV RAX,-0x1
JMP 0x001a0610
LAB_001a06e3:
MOV qword ptr [RBP + -0x38],0x0
JMP 0x001a05fe
|
long my_read(int param_1,void *param_2,size_t param_3,ulong param_4)
{
int iVar1;
uint uVar2;
int *piVar4;
size_t sVar5;
int *piVar6;
int4 *puVar7;
long lVar8;
int8 uVar9;
ulong uVar10;
long local_50;
uint uVar3;
local_50 = 0;
uVar10 = 0;
if ((param_4 & 0x1a) == 0) {
uVar10 = my_global_flags;
}
uVar10 = uVar10 | param_4;
piVar4 = __errno_location();
*piVar4 = 0;
sVar5 = read(param_1,param_2,param_3);
uVar3 = (uint)uVar10;
uVar2 = uVar3 & 6;
if (sVar5 != param_3) {
local_50 = 0;
do {
iVar1 = *piVar4;
piVar6 = (int *)_my_thread_var();
*piVar6 = iVar1;
if ((iVar1 == 0) || (sVar5 != 0xffffffffffffffff && (uVar10 & 6) != 0)) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0xaf;
}
if ((int)sVar5 != -1 && sVar5 != 0 || iVar1 != 4) {
if ((sVar5 + 1 < 2) || ((uVar10 & 0x200) == 0)) {
param_3 = sVar5;
if ((uVar10 & 0x1a) == 0) {
if (sVar5 == 0xffffffffffffffff) {
return -1;
}
if ((uVar10 & 6) != 0 && (uVar3 >> 9 & 1) == 0) {
return -1;
}
}
else {
if (sVar5 == 0xffffffffffffffff) {
uVar9 = my_filename(param_1);
my_error(2,uVar3 & 0x440 | 4,uVar9,iVar1);
return -1;
}
if ((uVar10 & 6) == 0) {
uVar2 = 0;
}
else {
uVar9 = my_filename(param_1);
my_error(9,uVar3 & 0x440 | 4,uVar9,iVar1);
uVar2 = 1;
if ((uVar3 >> 9 & 1) == 0) {
return -1;
}
}
}
break;
}
param_2 = (void *)((long)param_2 + sVar5);
param_3 = param_3 - sVar5;
local_50 = local_50 + sVar5;
}
*piVar4 = 0;
sVar5 = read(param_1,param_2,param_3);
} while (sVar5 != param_3);
}
lVar8 = 0;
if (uVar2 == 0) {
lVar8 = local_50 + param_3;
}
return lVar8;
}
| |
28,010 | mi_store_bin_pack_key | eloqsql/storage/myisam/mi_search.c | void _mi_store_bin_pack_key(MI_KEYDEF *keyinfo __attribute__((unused)),
register uchar *key_pos,
register MI_KEY_PARAM *s_temp)
{
store_key_length_inc(key_pos,s_temp->ref_length);
memcpy((char*) key_pos,(char*) s_temp->key+s_temp->ref_length,
(size_t) s_temp->totlength-s_temp->ref_length);
if (s_temp->next_key_pos)
{
key_pos+=(uint) (s_temp->totlength-s_temp->ref_length);
store_key_length_inc(key_pos,s_temp->n_ref_length);
if (s_temp->prev_length) /* If we must extend key */
{
memcpy(key_pos,s_temp->prev_key,s_temp->prev_length);
}
}
} | O0 | c | mi_store_bin_pack_key:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0xff, (%rax)
jae 0xc3afb
movq -0x18(%rbp), %rax
movl (%rax), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0xc3b32
movq -0x10(%rbp), %rax
movb $-0x1, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x1c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x18(%rbp), %rax
movl (%rax), %eax
addq %rax, %rsi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %edx
movq -0x18(%rbp), %rax
movl (%rax), %eax
subq %rax, %rdx
callq 0x2a090
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0xc3c0e
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x18(%rbp), %rax
subl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
cmpl $0xff, 0x8(%rax)
jae 0xc3bb0
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0xc3be8
movq -0x10(%rbp), %rax
movb $-0x1, (%rax)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x20(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0xc3c0c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, %edx
callq 0x2a090
jmp 0xc3c0e
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _mi_store_bin_pack_key:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_18]
cmp dword ptr [rax], 0FFh
jnb short loc_C3AFB
mov rax, [rbp+var_18]
mov eax, [rax]
mov cl, al
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_C3B32
loc_C3AFB:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0FFh
mov rax, [rbp+var_18]
mov eax, [rax]
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov eax, [rbp+var_1C]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_10], rax
loc_C3B32:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+20h]
mov rax, [rbp+var_18]
mov eax, [rax]
add rsi, rax
mov rax, [rbp+var_18]
mov eax, [rax+10h]
mov edx, eax
mov rax, [rbp+var_18]
mov eax, [rax]
sub rdx, rax
call _memcpy
mov rax, [rbp+var_18]
cmp qword ptr [rax+30h], 0
jz loc_C3C0E
mov rax, [rbp+var_18]
mov ecx, [rax+10h]
mov rax, [rbp+var_18]
sub ecx, [rax]
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_18]
cmp dword ptr [rax+8], 0FFh
jnb short loc_C3BB0
mov rax, [rbp+var_18]
mov eax, [rax+8]
mov cl, al
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_C3BE8
loc_C3BB0:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0FFh
mov rax, [rbp+var_18]
mov eax, [rax+8]
mov [rbp+var_20], eax
mov eax, [rbp+var_20]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov eax, [rbp+var_20]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_10], rax
loc_C3BE8:
mov rax, [rbp+var_18]
cmp dword ptr [rax+18h], 0
jz short loc_C3C0C
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+28h]
mov rax, [rbp+var_18]
mov eax, [rax+18h]
mov edx, eax
call _memcpy
loc_C3C0C:
jmp short $+2
loc_C3C0E:
add rsp, 20h
pop rbp
retn
| long long mi_store_bin_pack_key(long long a1, _BYTE *a2, unsigned int *a3)
{
long long result; // rax
_BYTE *v4; // rax
unsigned int v5; // [rsp+0h] [rbp-20h]
int v6; // [rsp+4h] [rbp-1Ch]
_BYTE *v8; // [rsp+10h] [rbp-10h]
_BYTE *v9; // [rsp+10h] [rbp-10h]
_BYTE *v10; // [rsp+10h] [rbp-10h]
if ( *a3 >= 0xFF )
{
*a2 = -1;
v6 = *a3;
a2[2] = *a3;
a2[1] = BYTE1(v6);
v8 = a2 + 3;
}
else
{
v8 = a2 + 1;
*a2 = *a3;
}
memcpy(v8, *a3 + *((_QWORD *)a3 + 4), a3[4] - (unsigned long long)*a3);
result = (long long)a3;
if ( *((_QWORD *)a3 + 6) )
{
v9 = &v8[a3[4] - *a3];
if ( a3[2] >= 0xFF )
{
*v9 = -1;
v5 = a3[2];
v9[2] = v5;
v9[1] = BYTE1(v5);
v10 = v9 + 3;
}
else
{
v4 = v9;
v10 = v9 + 1;
*v4 = a3[2];
}
result = (long long)a3;
if ( a3[6] )
return memcpy(v10, *((_QWORD *)a3 + 5), a3[6]);
}
return result;
}
| _mi_store_bin_pack_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0xff
JNC 0x001c3afb
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x001c3b32
LAB_001c3afb:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0xff
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV EAX,dword ptr [RBP + -0x1c]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x10],RAX
LAB_001c3b32:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x10]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
SUB RDX,RAX
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x30],0x0
JZ 0x001c3c0e
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
SUB ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x8],0xff
JNC 0x001c3bb0
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x8]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x001c3be8
LAB_001c3bb0:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0xff
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x20]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV EAX,dword ptr [RBP + -0x20]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x10],RAX
LAB_001c3be8:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x18],0x0
JZ 0x001c3c0c
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x18]
MOV EDX,EAX
CALL 0x0012a090
LAB_001c3c0c:
JMP 0x001c3c0e
LAB_001c3c0e:
ADD RSP,0x20
POP RBP
RET
|
void _mi_store_bin_pack_key(int8 param_1,int1 *param_2,uint *param_3)
{
uint uVar1;
int1 *puVar2;
int1 *local_18;
if (*param_3 < 0xff) {
local_18 = param_2 + 1;
*param_2 = (char)*param_3;
}
else {
*param_2 = 0xff;
uVar1 = *param_3;
param_2[2] = (char)uVar1;
param_2[1] = (char)(uVar1 >> 8);
local_18 = param_2 + 3;
}
memcpy(local_18,(void *)(*(long *)(param_3 + 8) + (ulong)*param_3),
(ulong)param_3[4] - (ulong)*param_3);
if (*(long *)(param_3 + 0xc) != 0) {
puVar2 = local_18 + (param_3[4] - *param_3);
if (param_3[2] < 0xff) {
local_18 = puVar2 + 1;
*puVar2 = (char)param_3[2];
}
else {
*puVar2 = 0xff;
uVar1 = param_3[2];
puVar2[2] = (char)uVar1;
puVar2[1] = (char)(uVar1 >> 8);
local_18 = puVar2 + 3;
}
if (param_3[6] != 0) {
memcpy(local_18,*(void **)(param_3 + 10),(ulong)param_3[6]);
}
}
return;
}
| |
28,011 | readFile[abi:cxx11](char const*) | mihussein[P]Hlemon/src/functions.cpp | std::string readFile(const char *path) {
std::ifstream file(path);
std::string value;
if (!file.is_open()) {
std::cerr << "ERROR: Failed to open " << path << std::endl;
return "N/A";
}
if (file.is_open()) {
file >> value;
file.close();
}
return value;
} | O0 | cpp | readFile[abi:cxx11](char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x290, %rsp # imm = 0x290
movq %rdi, -0x268(%rbp)
movq %rdi, %rax
movq %rax, -0x260(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x218(%rbp), %rdi
movq %rdi, -0x258(%rbp)
movl $0x8, %edx
callq 0x5840
leaq -0x238(%rbp), %rdi
callq 0x5650
movq -0x258(%rbp), %rdi
callq 0x5750
movb %al, -0x24d(%rbp)
jmp 0xada0
movb -0x24d(%rbp), %al
testb $0x1, %al
jne 0xae7e
jmp 0xadb0
movq 0xd231(%rip), %rdi # 0x17fe8
leaq 0x65bf(%rip), %rsi # 0x1137d
callq 0x5430
movq %rax, -0x270(%rbp)
jmp 0xadcc
movq -0x270(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5430
movq %rax, -0x278(%rbp)
jmp 0xade5
movq -0x278(%rbp), %rdi
movq 0xd1ad(%rip), %rsi # 0x17fa0
callq 0x5490
jmp 0xadfa
leaq -0x245(%rbp), %rdi
movq %rdi, -0x280(%rbp)
callq 0x57f0
movq -0x268(%rbp), %rdi
movq -0x280(%rbp), %rdx
leaq 0x6572(%rip), %rsi # 0x11394
callq 0x9c60
jmp 0xae29
leaq -0x245(%rbp), %rdi
callq 0x54c0
movl $0x1, -0x24c(%rbp)
jmp 0xaee0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
jmp 0xaf08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
leaq -0x245(%rbp), %rdi
callq 0x54c0
jmp 0xaf08
leaq -0x218(%rbp), %rdi
callq 0x5750
movb %al, -0x281(%rbp)
jmp 0xae92
movb -0x281(%rbp), %al
testb $0x1, %al
jne 0xae9e
jmp 0xaec3
leaq -0x218(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x55f0
jmp 0xaeb3
leaq -0x218(%rbp), %rdi
callq 0x5090
jmp 0xaec1
jmp 0xaec3
movq -0x268(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x52d0
movl $0x1, -0x24c(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x58a8
leaq -0x218(%rbp), %rdi
callq 0x50c0
movq -0x260(%rbp), %rax
addq $0x290, %rsp # imm = 0x290
popq %rbp
retq
leaq -0x238(%rbp), %rdi
callq 0x58a8
leaq -0x218(%rbp), %rdi
callq 0x50c0
movq -0x240(%rbp), %rdi
callq 0x57e0
nopl (%rax)
| _Z8readFileB5cxx11PKc:
push rbp
mov rbp, rsp
sub rsp, 290h
mov [rbp+var_268], rdi
mov rax, rdi
mov [rbp+var_260], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rsi, [rbp+var_10]
lea rdi, [rbp+var_218]
mov [rbp+var_258], rdi
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode)
lea rdi, [rbp+var_238]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rdi, [rbp+var_258]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv; std::ifstream::is_open(void)
mov [rbp+var_24D], al
jmp short $+2
loc_ADA0:
mov al, [rbp+var_24D]
test al, 1
jnz loc_AE7E
jmp short $+2
loc_ADB0:
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aErrorFailedToO; "ERROR: Failed to open "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_270], rax
jmp short $+2
loc_ADCC:
mov rdi, [rbp+var_270]
mov rsi, [rbp+var_10]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_278], rax
jmp short $+2
loc_ADE5:
mov rdi, [rbp+var_278]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_ADFA:
lea rdi, [rbp+var_245]
mov [rbp+var_280], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_268]
mov rdx, [rbp+var_280]
lea rsi, aNA; "N/A"
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_AE29:
lea rdi, [rbp+var_245]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov [rbp+var_24C], 1
jmp loc_AEE0
mov rcx, rax
mov eax, edx
mov [rbp+var_240], rcx
mov [rbp+var_244], eax
jmp loc_AF08
mov rcx, rax
mov eax, edx
mov [rbp+var_240], rcx
mov [rbp+var_244], eax
lea rdi, [rbp+var_245]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_AF08
loc_AE7E:
lea rdi, [rbp+var_218]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv; std::ifstream::is_open(void)
mov [rbp+var_281], al
jmp short $+2
loc_AE92:
mov al, [rbp+var_281]
test al, 1
jnz short loc_AE9E
jmp short loc_AEC3
loc_AE9E:
lea rdi, [rbp+var_218]
lea rsi, [rbp+var_238]
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
jmp short $+2
loc_AEB3:
lea rdi, [rbp+var_218]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv; std::ifstream::close(void)
jmp short $+2
loc_AEC1:
jmp short $+2
loc_AEC3:
mov rdi, [rbp+var_268]
lea rsi, [rbp+var_238]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_; std::string::basic_string(std::string&&)
mov [rbp+var_24C], 1
loc_AEE0:
lea rdi, [rbp+var_238]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_218]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov rax, [rbp+var_260]
add rsp, 290h
pop rbp
retn
loc_AF08:
lea rdi, [rbp+var_238]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_218]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov rdi, [rbp+var_240]
call __Unwind_Resume
| long long readFile[abi:cxx11](long long a1, long long a2)
{
long long v3; // [rsp+18h] [rbp-278h]
long long v4; // [rsp+20h] [rbp-270h]
char v5; // [rsp+4Bh] [rbp-245h] BYREF
_BYTE v6[32]; // [rsp+58h] [rbp-238h] BYREF
_BYTE v7[520]; // [rsp+78h] [rbp-218h] BYREF
long long v8; // [rsp+280h] [rbp-10h]
long long v9; // [rsp+288h] [rbp-8h]
v9 = a1;
v8 = a2;
std::ifstream::basic_ifstream(v7, a2, 8LL);
std::string::basic_string(v6);
if ( (std::ifstream::is_open(v7) & 1) != 0 )
{
if ( (std::ifstream::is_open(v7) & 1) != 0 )
{
std::operator>><char>(v7, v6);
std::ifstream::close(v7);
}
std::string::basic_string(a1, v6);
}
else
{
v4 = std::operator<<<std::char_traits<char>>(&std::cerr, "ERROR: Failed to open ");
v3 = std::operator<<<std::char_traits<char>>(v4, v8);
std::ostream::operator<<(v3, &std::endl<char,std::char_traits<char>>);
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)"N/A", (long long)&v5);
std::allocator<char>::~allocator(&v5);
}
std::string::~string(v6);
std::ifstream::~ifstream(v7);
return a1;
}
| readFile[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x290
MOV qword ptr [RBP + -0x268],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x260],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x218]
MOV qword ptr [RBP + -0x258],RDI
MOV EDX,0x8
CALL 0x00105840
LEA RDI,[RBP + -0x238]
CALL 0x00105650
MOV RDI,qword ptr [RBP + -0x258]
LAB_0010ad93:
CALL 0x00105750
MOV byte ptr [RBP + -0x24d],AL
JMP 0x0010ada0
LAB_0010ada0:
MOV AL,byte ptr [RBP + -0x24d]
TEST AL,0x1
JNZ 0x0010ae7e
JMP 0x0010adb0
LAB_0010adb0:
MOV RDI,qword ptr [0x00117fe8]
LEA RSI,[0x11137d]
CALL 0x00105430
MOV qword ptr [RBP + -0x270],RAX
JMP 0x0010adcc
LAB_0010adcc:
MOV RDI,qword ptr [RBP + -0x270]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00105430
MOV qword ptr [RBP + -0x278],RAX
JMP 0x0010ade5
LAB_0010ade5:
MOV RDI,qword ptr [RBP + -0x278]
MOV RSI,qword ptr [0x00117fa0]
CALL 0x00105490
JMP 0x0010adfa
LAB_0010adfa:
LEA RDI,[RBP + -0x245]
MOV qword ptr [RBP + -0x280],RDI
CALL 0x001057f0
MOV RDI,qword ptr [RBP + -0x268]
MOV RDX,qword ptr [RBP + -0x280]
LAB_0010ae1b:
LEA RSI,[0x111394]
CALL 0x00109c60
JMP 0x0010ae29
LAB_0010ae29:
LEA RDI,[RBP + -0x245]
CALL 0x001054c0
MOV dword ptr [RBP + -0x24c],0x1
JMP 0x0010aee0
LAB_0010ae7e:
LEA RDI,[RBP + -0x218]
CALL 0x00105750
MOV byte ptr [RBP + -0x281],AL
JMP 0x0010ae92
LAB_0010ae92:
MOV AL,byte ptr [RBP + -0x281]
TEST AL,0x1
JNZ 0x0010ae9e
JMP 0x0010aec3
LAB_0010ae9e:
LEA RDI,[RBP + -0x218]
LEA RSI,[RBP + -0x238]
CALL 0x001055f0
JMP 0x0010aeb3
LAB_0010aeb3:
LEA RDI,[RBP + -0x218]
CALL 0x00105090
LAB_0010aebf:
JMP 0x0010aec1
LAB_0010aec1:
JMP 0x0010aec3
LAB_0010aec3:
MOV RDI,qword ptr [RBP + -0x268]
LEA RSI,[RBP + -0x238]
CALL 0x001052d0
MOV dword ptr [RBP + -0x24c],0x1
LAB_0010aee0:
LEA RDI,[RBP + -0x238]
CALL 0x001058a8
LEA RDI,[RBP + -0x218]
CALL 0x001050c0
MOV RAX,qword ptr [RBP + -0x260]
ADD RSP,0x290
POP RBP
RET
|
/* readFile[abi:cxx11](char const*) */
char * readFile_abi_cxx11_(char *param_1)
{
byte bVar1;
ostream *poVar2;
char *in_RSI;
allocator local_24d [13];
string local_240 [32];
ifstream local_220 [520];
char *local_18;
char *local_10;
local_18 = in_RSI;
local_10 = param_1;
std::ifstream::ifstream(local_220,in_RSI,8);
std::__cxx11::string::string(local_240);
/* try { // try from 0010ad93 to 0010adf7 has its CatchHandler @ 0010ae44 */
bVar1 = std::ifstream::is_open();
if ((bVar1 & 1) == 0) {
poVar2 = std::operator<<((ostream *)PTR_cerr_00117fe8,"ERROR: Failed to open ");
poVar2 = std::operator<<(poVar2,local_18);
std::ostream::operator<<
(poVar2,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00117fa0
);
std::allocator<char>::allocator();
/* try { // try from 0010ae1b to 0010ae26 has its CatchHandler @ 0010ae5b */
std::__cxx11::string::string<std::allocator<char>>((string *)param_1,"N/A",local_24d);
std::allocator<char>::~allocator((allocator<char> *)local_24d);
}
else {
/* try { // try from 0010ae7e to 0010aebe has its CatchHandler @ 0010ae44 */
bVar1 = std::ifstream::is_open();
if ((bVar1 & 1) != 0) {
std::operator>>((istream *)local_220,local_240);
std::ifstream::close();
}
std::__cxx11::string::string((string *)param_1,local_240);
}
std::__cxx11::string::~string(local_240);
std::ifstream::~ifstream(local_220);
return param_1;
}
| |
28,012 | readFile[abi:cxx11](char const*) | mihussein[P]Hlemon/src/functions.cpp | std::string readFile(const char *path) {
std::ifstream file(path);
std::string value;
if (!file.is_open()) {
std::cerr << "ERROR: Failed to open " << path << std::endl;
return "N/A";
}
if (file.is_open()) {
file >> value;
file.close();
}
return value;
} | O3 | cpp | readFile[abi:cxx11](char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movl $0x8, %edx
callq 0x46a0
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x98(%rsp), %rdi
callq 0x4080
testb %al, %al
je 0x60df
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x44b0
leaq 0x20(%rsp), %rdi
callq 0x4070
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%rsp), %rcx
cmpq %r12, %rcx
je 0x6193
movq %rcx, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x619b
movq 0x9f02(%rip), %r14 # 0xffe8
leaq 0x6290(%rip), %rsi # 0xc37d
movl $0x16, %edx
movq %r14, %rdi
callq 0x43e0
testq %r15, %r15
je 0x611b
movq %r15, %rdi
callq 0x4190
movq 0x9eda(%rip), %rdi # 0xffe8
movq %r15, %rsi
movq %rax, %rdx
callq 0x43e0
jmp 0x6133
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x4620
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x4340
movsbl %al, %esi
movq 0x9e97(%rip), %rdi # 0xffe8
callq 0x4030
movq %rax, %rdi
callq 0x4260
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x6228(%rip), %rsi # 0xc394
leaq 0x6224(%rip), %rdx # 0xc397
movq %rbx, %rdi
callq 0x5d90
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x61a4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4380
jmp 0x61a4
movups (%r12), %xmm0
movups %xmm0, (%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rbx)
leaq 0x20(%rsp), %rdi
callq 0x4090
movq %rbx, %rax
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x61c2
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x61db
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4380
leaq 0x20(%rsp), %rdi
callq 0x4090
movq %rbx, %rdi
callq 0x4660
| _Z8readFileB5cxx11PKc:
push r15
push r14
push r12
push rbx
sub rsp, 228h
mov r15, rsi
mov rbx, rdi
lea rdi, [rsp+248h+var_228]
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode)
lea r12, [rsp+248h+var_238]
mov [r12-10h], r12
mov qword ptr [r12-8], 0
mov byte ptr [r12], 0
lea rdi, [rsp+248h+var_1B0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz short loc_60DF
lea rdi, [rsp+248h+var_228]
mov rsi, rsp
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rdi, [rsp+248h+var_228]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv; std::ifstream::close(void)
lea rax, [rbx+10h]
mov [rbx], rax
mov rcx, [rsp+248h+var_248]
cmp rcx, r12
jz loc_6193
mov [rbx], rcx
mov rax, [rsp+248h+var_238]
mov [rbx+10h], rax
jmp loc_619B
loc_60DF:
mov r14, cs:_ZSt4cerr_ptr
lea rsi, aErrorFailedToO; "ERROR: Failed to open "
mov edx, 16h
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)
test r15, r15
jz short loc_611B
mov rdi, r15
call _strlen
mov rdi, cs:_ZSt4cerr_ptr
mov rsi, r15
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_6133
loc_611B:
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_6133:
mov rax, [r14]
add r14, [rax-18h]
mov rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, cs:_ZSt4cerr_ptr; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rax, [rbx+10h]
mov [rbx], rax
lea rsi, aNA; "N/A"
lea rdx, aNA+3; ""
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, [rsp+248h+var_248]; void *
cmp rdi, r12
jz short loc_61A4
mov rsi, [rsp+248h+var_238]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_61A4
loc_6193:
movups xmm0, xmmword ptr [r12]
movups xmmword ptr [rax], xmm0
loc_619B:
mov rax, [rsp+248h+var_240]
mov [rbx+8], rax
loc_61A4:
lea rdi, [rsp+248h+var_228]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov rax, rbx
add rsp, 228h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short $+2
loc_61C2:
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, r12
jz short loc_61DB
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_61DB:
lea rdi, [rsp+arg_18]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov rdi, rbx
call __Unwind_Resume
| long long readFile[abi:cxx11](long long a1, long long a2)
{
long long v2; // rax
char v3; // al
std::ostream *v4; // rax
void *v6; // [rsp+0h] [rbp-248h] BYREF
long long v7; // [rsp+8h] [rbp-240h]
__int128 v8; // [rsp+10h] [rbp-238h] BYREF
_BYTE v9[120]; // [rsp+20h] [rbp-228h] BYREF
_BYTE v10[432]; // [rsp+98h] [rbp-1B0h] BYREF
std::ifstream::basic_ifstream(v9, a2, 8LL);
v6 = &v8;
v7 = 0LL;
LOBYTE(v8) = 0;
if ( (unsigned __int8)std::__basic_file<char>::is_open(v10) )
{
std::operator>><char>(v9, &v6);
std::ifstream::close(v9);
*(_QWORD *)a1 = a1 + 16;
if ( v6 == &v8 )
{
*(_OWORD *)(a1 + 16) = v8;
}
else
{
*(_QWORD *)a1 = v6;
*(_QWORD *)(a1 + 16) = v8;
}
*(_QWORD *)(a1 + 8) = v7;
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "ERROR: Failed to open ", 22LL);
if ( a2 )
{
v2 = strlen(a2);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, a2, v2);
}
else
{
std::ios::clear(
(char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL),
*(_DWORD *)((char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL) + 32) | 1u);
}
v3 = std::ios::widen((char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL), 10LL);
v4 = (std::ostream *)std::ostream::put((std::ostream *)&std::cerr, v3);
std::ostream::flush(v4);
*(_QWORD *)a1 = a1 + 16;
std::string::_M_construct<char const*>(a1, "N/A", (long long)"");
if ( v6 != &v8 )
operator delete(v6, v8 + 1);
}
std::ifstream::~ifstream(v9);
return a1;
}
| readFile[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x228
MOV R15,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x20]
MOV EDX,0x8
CALL 0x001046a0
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],0x0
MOV byte ptr [R12],0x0
LEA RDI,[RSP + 0x98]
CALL 0x00104080
TEST AL,AL
JZ 0x001060df
LAB_001060a3:
LEA RDI,[RSP + 0x20]
MOV RSI,RSP
CALL 0x001044b0
LEA RDI,[RSP + 0x20]
CALL 0x00104070
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RCX,qword ptr [RSP]
CMP RCX,R12
JZ 0x00106193
MOV qword ptr [RBX],RCX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RBX + 0x10],RAX
JMP 0x0010619b
LAB_001060df:
MOV R14,qword ptr [0x0010ffe8]
LEA RSI,[0x10c37d]
MOV EDX,0x16
MOV RDI,R14
CALL 0x001043e0
TEST R15,R15
JZ 0x0010611b
MOV RDI,R15
CALL 0x00104190
MOV RDI,qword ptr [0x0010ffe8]
MOV RSI,R15
MOV RDX,RAX
CALL 0x001043e0
JMP 0x00106133
LAB_0010611b:
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 0x00104620
LAB_00106133:
MOV RAX,qword ptr [R14]
ADD R14,qword ptr [RAX + -0x18]
MOV RDI,R14
MOV ESI,0xa
CALL 0x00104340
MOVSX ESI,AL
MOV RDI,qword ptr [0x0010ffe8]
CALL 0x00104030
MOV RDI,RAX
CALL 0x00104260
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LAB_00106165:
LEA RSI,[0x10c394]
LEA RDX,[0x10c397]
MOV RDI,RBX
CALL 0x00105d90
LAB_0010617b:
MOV RDI,qword ptr [RSP]
CMP RDI,R12
JZ 0x001061a4
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00104380
JMP 0x001061a4
LAB_00106193:
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS xmmword ptr [RAX],XMM0
LAB_0010619b:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0x8],RAX
LAB_001061a4:
LEA RDI,[RSP + 0x20]
CALL 0x00104090
MOV RAX,RBX
ADD RSP,0x228
POP RBX
POP R12
POP R14
POP R15
RET
|
/* readFile[abi:cxx11](char const*) */
char * readFile_abi_cxx11_(char *param_1)
{
int *puVar1;
char cVar2;
size_t sVar3;
char *in_RSI;
int1 *local_248;
int8 local_240;
int1 local_238;
int7 uStack_237;
int8 uStack_230;
ifstream local_228 [520];
std::ifstream::ifstream(local_228,in_RSI,8);
local_240 = 0;
local_238 = 0;
local_248 = &local_238;
cVar2 = std::__basic_file<char>::is_open();
puVar1 = PTR_cerr_0010ffe8;
if (cVar2 == '\0') {
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_0010ffe8,"ERROR: Failed to open ",0x16);
if (in_RSI == (char *)0x0) {
std::ios::clear(puVar1 + *(long *)(*(long *)puVar1 + -0x18),
*(uint *)(puVar1 + *(long *)(*(long *)puVar1 + -0x18) + 0x20) | 1);
}
else {
sVar3 = strlen(in_RSI);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_0010ffe8,in_RSI,sVar3);
}
std::ios::widen((char)puVar1 + (char)*(int8 *)(*(long *)puVar1 + -0x18));
std::ostream::put((char)PTR_cerr_0010ffe8);
std::ostream::flush();
*(char **)param_1 = param_1 + 0x10;
/* try { // try from 00106165 to 0010617a has its CatchHandler @ 001061c0 */
std::__cxx11::string::_M_construct<char_const*>(param_1,&DAT_0010c394,&DAT_0010c397);
if (local_248 != &local_238) {
operator_delete(local_248,CONCAT71(uStack_237,local_238) + 1);
}
}
else {
/* try { // try from 001060a3 to 0010615d has its CatchHandler @ 001061c2 */
std::operator>>((istream *)local_228,(string *)&local_248);
std::ifstream::close();
*(char **)param_1 = param_1 + 0x10;
if (local_248 == &local_238) {
*(ulong *)(param_1 + 0x10) = CONCAT71(uStack_237,local_238);
*(int8 *)(param_1 + 0x18) = uStack_230;
}
else {
*(int1 **)param_1 = local_248;
*(ulong *)(param_1 + 0x10) = CONCAT71(uStack_237,local_238);
}
*(int8 *)(param_1 + 8) = local_240;
}
std::ifstream::~ifstream(local_228);
return param_1;
}
| |
28,013 | coro::semaphore::release() | AlayaLite/build_O3/_deps/libcoro-src/src/semaphore.cpp | auto semaphore::release() -> void
{
// It seems like the atomic counter could be incremented, but then resuming a waiter could have
// a race between a new acquirer grabbing the just incremented resource value from us. So its
// best to check if there are any waiters first, and transfer owernship of the resource thats
// being released directly to the waiter to avoid this problem.
std::unique_lock lk{m_waiter_mutex};
if (m_acquire_waiters != nullptr)
{
acquire_operation* to_resume = m_acquire_waiters;
m_acquire_waiters = m_acquire_waiters->m_next;
lk.unlock();
// This will transfer ownership of the resource to the resumed waiter.
to_resume->m_awaiting_coroutine.resume();
}
else
{
// Normally would be release but within a lock use releaxed.
m_counter.fetch_add(1, std::memory_order::relaxed);
}
} | O3 | cpp | coro::semaphore::release():
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x3732
movb $0x1, 0x8(%r14)
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x3665
movq 0x10(%r14), %rax
movq %rax, 0x38(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x36c4
movq 0x8(%r14), %rdi
callq *(%rdi)
jmp 0x366a
lock
incq 0x8(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x36ae
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x36ae
movq %rbx, %rdi
callq 0x2250
nop
| _ZN4coro9semaphore7releaseEv:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
lea rax, [rdi+10h]
lea r14, [rsp+28h+var_20]
mov [r14], rax
mov byte ptr [r14+8], 0
mov rdi, r14
call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void)
mov byte ptr [r14+8], 1
mov r14, [rbx+38h]
test r14, r14
jz short loc_3665
mov rax, [r14+10h]
mov [rbx+38h], rax
lea rdi, [rsp+28h+var_20]
call _ZNSt11unique_lockISt5mutexE6unlockEv; std::unique_lock<std::mutex>::unlock(void)
mov rdi, [r14+8]
call qword ptr [rdi]
jmp short loc_366A
loc_3665:
lock inc qword ptr [rbx+8]
loc_366A:
lea rdi, [rsp+28h+var_20]
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
add rsp, 18h
pop rbx
pop r14
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov rdi, rbx
call __Unwind_Resume
| long long coro::semaphore::release(coro::semaphore *this)
{
long long v1; // r14
char *v3; // [rsp+8h] [rbp-20h] BYREF
char v4; // [rsp+10h] [rbp-18h]
v3 = (char *)this + 16;
v4 = 0;
std::unique_lock<std::mutex>::lock(&v3);
v4 = 1;
v1 = *((_QWORD *)this + 7);
if ( v1 )
{
*((_QWORD *)this + 7) = *(_QWORD *)(v1 + 16);
std::unique_lock<std::mutex>::unlock(&v3);
(**(void (***)(void))(v1 + 8))();
}
else
{
_InterlockedIncrement64((volatile signed long long *)this + 1);
}
return std::unique_lock<std::mutex>::~unique_lock(&v3);
}
| release:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
LEA R14,[RSP + 0x8]
MOV qword ptr [R14],RAX
MOV byte ptr [R14 + 0x8],0x0
MOV RDI,R14
CALL 0x00103732
MOV byte ptr [R14 + 0x8],0x1
MOV R14,qword ptr [RBX + 0x38]
TEST R14,R14
JZ 0x00103665
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RBX + 0x38],RAX
LAB_00103653:
LEA RDI,[RSP + 0x8]
CALL 0x001036c4
MOV RDI,qword ptr [R14 + 0x8]
CALL qword ptr [RDI]
LAB_00103663:
JMP 0x0010366a
LAB_00103665:
INC.LOCK qword ptr [RBX + 0x8]
LAB_0010366a:
LEA RDI,[RSP + 0x8]
CALL 0x001036ae
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* coro::semaphore::release() */
void __thiscall coro::semaphore::release(semaphore *this)
{
long lVar1;
semaphore *local_20;
int1 local_18;
local_20 = this + 0x10;
local_18 = 0;
std::unique_lock<std::mutex>::lock();
local_18 = 1;
lVar1 = *(long *)(this + 0x38);
if (lVar1 == 0) {
LOCK();
*(long *)(this + 8) = *(long *)(this + 8) + 1;
UNLOCK();
}
else {
*(int8 *)(this + 0x38) = *(int8 *)(lVar1 + 0x10);
/* try { // try from 00103653 to 00103662 has its CatchHandler @ 0010367c */
std::unique_lock<std::mutex>::unlock();
(*(code *)**(int8 **)(lVar1 + 8))();
}
std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_20);
return;
}
| |
28,014 | ma_tls_write_async | eloqsql/libmariadb/libmariadb/secure/openssl.c | ssize_t ma_tls_write_async(MARIADB_PVIO *pvio,
const unsigned char *buffer,
size_t length)
{
int res;
struct mysql_async_context *b= pvio->mysql->options.extension->async_context;
MARIADB_TLS *ctls= pvio->ctls;
for (;;)
{
res= SSL_write((SSL *)ctls->ssl, (void *)buffer, (int)length);
if (ma_tls_async_check_result(res, b, (SSL *)ctls->ssl))
return res;
}
} | O0 | c | ma_tls_write_async:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
callq 0x36530
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x5c640
cmpb $0x0, %al
je 0x5c783
movslq -0x1c(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
jmp 0x5c747
nopw %cs:(%rax,%rax)
| ma_tls_write_async:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax+40h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov rax, [rax+38h]
mov [rbp+var_30], rax
loc_5C747:
mov rax, [rbp+var_30]
mov rdi, [rax+10h]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_18]
mov edx, eax
call _SSL_write
mov [rbp+var_1C], eax
mov edi, [rbp+var_1C]
mov rsi, [rbp+var_28]
mov rax, [rbp+var_30]
mov rdx, [rax+10h]
call ma_tls_async_check_result
cmp al, 0
jz short loc_5C783
movsxd rax, [rbp+var_1C]
add rsp, 30h
pop rbp
retn
loc_5C783:
jmp short loc_5C747
| long long ma_tls_write_async(long long a1, long long a2, unsigned int a3)
{
long long v4; // [rsp+0h] [rbp-30h]
long long v5; // [rsp+8h] [rbp-28h]
int v6; // [rsp+14h] [rbp-1Ch]
v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 40LL);
v4 = *(_QWORD *)(a1 + 56);
do
v6 = SSL_write(*(_QWORD *)(v4 + 16), a2, a3);
while ( !ma_tls_async_check_result(v6, v5, *(_QWORD *)(v4 + 16)) );
return v6;
}
| ma_tls_write_async:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x30],RAX
LAB_0015c747:
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV EDX,EAX
CALL 0x00136530
MOV dword ptr [RBP + -0x1c],EAX
MOV EDI,dword ptr [RBP + -0x1c]
MOV RSI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RAX + 0x10]
CALL 0x0015c640
CMP AL,0x0
JZ 0x0015c783
MOVSXD RAX,dword ptr [RBP + -0x1c]
ADD RSP,0x30
POP RBP
RET
LAB_0015c783:
JMP 0x0015c747
|
long ma_tls_write_async(long param_1,void *param_2,int param_3)
{
int8 uVar1;
long lVar2;
char cVar3;
int iVar4;
uVar1 = *(int8 *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28);
lVar2 = *(long *)(param_1 + 0x38);
do {
iVar4 = SSL_write(*(SSL **)(lVar2 + 0x10),param_2,param_3);
cVar3 = ma_tls_async_check_result(iVar4,uVar1,*(int8 *)(lVar2 + 0x10));
} while (cVar3 == '\0');
return (long)iVar4;
}
| |
28,015 | maria_ft_linearize | eloqsql/storage/maria/ma_ft_parser.c | FT_WORD * maria_ft_linearize(TREE *wtree, MEM_ROOT *mem_root)
{
FT_WORD *wlist,*p;
FT_DOCSTAT docstat;
DBUG_ENTER("maria_ft_linearize");
if ((wlist=(FT_WORD *) alloc_root(mem_root, sizeof(FT_WORD)*
(1+wtree->elements_in_tree))))
{
docstat.list=wlist;
docstat.uniq=wtree->elements_in_tree;
docstat.sum=0;
tree_walk(wtree,(tree_walk_action)&walk_and_copy,&docstat,left_root_right);
}
delete_tree(wtree, 0);
if (!wlist)
DBUG_RETURN(NULL);
docstat.list->pos=NULL;
for (p=wlist;p->pos;p++)
{
p->weight=PRENORM_IN_USE;
}
for (p=wlist;p->pos;p++)
{
p->weight/=NORM_IN_USE;
}
DBUG_RETURN(wlist);
} | O0 | c | maria_ft_linearize:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x20c(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
imulq $0x18, %rax, %rsi
callq 0xed460
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x4b399
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl 0x20c(%rax), %eax
movl %eax, -0x38(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xf2(%rip), %rsi # 0x4b480
leaq -0x40(%rbp), %rdx
xorl %ecx, %ecx
callq 0xfbd30
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xfa5c0
cmpq $0x0, -0x20(%rbp)
jne 0x4b3ba
jmp 0x4b3ad
movq $0x0, -0x8(%rbp)
jmp 0x4b468
movq -0x40(%rbp), %rax
movq $0x0, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0x4b40c
movq -0x28(%rbp), %rax
movsd 0x10(%rax), %xmm0
movsd -0x30(%rbp), %xmm1
divsd %xmm1, %xmm0
movl -0x38(%rbp), %eax
cvtsi2sd %rax, %xmm1
mulsd %xmm1, %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, 0x10(%rax)
movq -0x28(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x28(%rbp)
jmp 0x4b3cd
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0x4b45e
movl -0x38(%rbp), %eax
cvtsi2sd %rax, %xmm1
movsd 0x10d83a(%rip), %xmm0 # 0x158c68
mulsd %xmm0, %xmm1
movsd 0x10d826(%rip), %xmm0 # 0x158c60
addsd %xmm0, %xmm1
movq -0x28(%rbp), %rax
movsd 0x10(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rax)
movq -0x28(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x28(%rbp)
jmp 0x4b414
jmp 0x4b460
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| maria_ft_linearize:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov eax, [rax+20Ch]
add eax, 1
mov eax, eax
imul rsi, rax, 18h
call alloc_root
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_4B399
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov eax, [rax+20Ch]
mov [rbp+var_38], eax
xorps xmm0, xmm0
movsd [rbp+var_30], xmm0
mov rdi, [rbp+var_10]
lea rsi, walk_and_copy
lea rdx, [rbp+var_40]
xor ecx, ecx
call tree_walk
loc_4B399:
mov rdi, [rbp+var_10]
xor esi, esi
call delete_tree
cmp [rbp+var_20], 0
jnz short loc_4B3BA
jmp short $+2
loc_4B3AD:
mov [rbp+var_8], 0
jmp loc_4B468
loc_4B3BA:
mov rax, [rbp+var_40]
mov qword ptr [rax], 0
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_4B3CD:
mov rax, [rbp+var_28]
cmp qword ptr [rax], 0
jz short loc_4B40C
mov rax, [rbp+var_28]
movsd xmm0, qword ptr [rax+10h]
movsd xmm1, [rbp+var_30]
divsd xmm0, xmm1
mov eax, [rbp+var_38]
cvtsi2sd xmm1, rax
mulsd xmm0, xmm1
mov rax, [rbp+var_28]
movsd qword ptr [rax+10h], xmm0
mov rax, [rbp+var_28]
add rax, 18h
mov [rbp+var_28], rax
jmp short loc_4B3CD
loc_4B40C:
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_4B414:
mov rax, [rbp+var_28]
cmp qword ptr [rax], 0
jz short loc_4B45E
mov eax, [rbp+var_38]
cvtsi2sd xmm1, rax
movsd xmm0, cs:qword_158C68
mulsd xmm1, xmm0
movsd xmm0, cs:qword_158C60
addsd xmm1, xmm0
mov rax, [rbp+var_28]
movsd xmm0, qword ptr [rax+10h]
divsd xmm0, xmm1
movsd qword ptr [rax+10h], xmm0
mov rax, [rbp+var_28]
add rax, 18h
mov [rbp+var_28], rax
jmp short loc_4B414
loc_4B45E:
jmp short $+2
loc_4B460:
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_4B468:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long maria_ft_linearize(long long a1, long long a2)
{
_QWORD *v3; // [rsp+0h] [rbp-40h] BYREF
int v4; // [rsp+8h] [rbp-38h]
double v5; // [rsp+10h] [rbp-30h]
long long i; // [rsp+18h] [rbp-28h]
long long v7; // [rsp+20h] [rbp-20h]
long long v8; // [rsp+28h] [rbp-18h]
long long v9; // [rsp+30h] [rbp-10h]
v9 = a1;
v8 = a2;
v7 = alloc_root(a2, 24LL * (unsigned int)(*(_DWORD *)(a1 + 524) + 1));
if ( v7 )
{
v3 = (_QWORD *)v7;
v4 = *(_DWORD *)(v9 + 524);
v5 = 0.0;
tree_walk(v9, walk_and_copy, &v3, 0LL);
}
delete_tree(v9, 0LL);
if ( !v7 )
return 0LL;
*v3 = 0LL;
for ( i = v7; *(_QWORD *)i; i += 24LL )
*(double *)(i + 16) = *(double *)(i + 16) / v5 * (double)v4;
for ( i = v7; *(_QWORD *)i; i += 24LL )
*(double *)(i + 16) = *(double *)(i + 16) / ((double)v4 * 0.0115 + 1.0);
return v7;
}
| maria_ft_linearize:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20c]
ADD EAX,0x1
MOV EAX,EAX
IMUL RSI,RAX,0x18
CALL 0x001ed460
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x0014b399
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20c]
MOV dword ptr [RBP + -0x38],EAX
XORPS XMM0,XMM0
MOVSD qword ptr [RBP + -0x30],XMM0
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14b480]
LEA RDX,[RBP + -0x40]
XOR ECX,ECX
CALL 0x001fbd30
LAB_0014b399:
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x001fa5c0
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x0014b3ba
JMP 0x0014b3ad
LAB_0014b3ad:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014b468
LAB_0014b3ba:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_0014b3cd:
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX],0x0
JZ 0x0014b40c
MOV RAX,qword ptr [RBP + -0x28]
MOVSD XMM0,qword ptr [RAX + 0x10]
MOVSD XMM1,qword ptr [RBP + -0x30]
DIVSD XMM0,XMM1
MOV EAX,dword ptr [RBP + -0x38]
CVTSI2SD XMM1,RAX
MULSD XMM0,XMM1
MOV RAX,qword ptr [RBP + -0x28]
MOVSD qword ptr [RAX + 0x10],XMM0
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x18
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0014b3cd
LAB_0014b40c:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_0014b414:
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX],0x0
JZ 0x0014b45e
MOV EAX,dword ptr [RBP + -0x38]
CVTSI2SD XMM1,RAX
MOVSD XMM0,qword ptr [0x00258c68]
MULSD XMM1,XMM0
MOVSD XMM0,qword ptr [0x00258c60]
ADDSD XMM1,XMM0
MOV RAX,qword ptr [RBP + -0x28]
MOVSD XMM0,qword ptr [RAX + 0x10]
DIVSD XMM0,XMM1
MOVSD qword ptr [RAX + 0x10],XMM0
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x18
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0014b414
LAB_0014b45e:
JMP 0x0014b460
LAB_0014b460:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_0014b468:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long * maria_ft_linearize(long param_1,int8 param_2)
{
long *local_48;
uint local_40;
double local_38;
long *local_30;
long *local_28;
int8 local_20;
long local_18;
long *local_10;
local_20 = param_2;
local_18 = param_1;
local_28 = (long *)alloc_root(param_2,(ulong)(*(int *)(param_1 + 0x20c) + 1) * 0x18);
if (local_28 != (long *)0x0) {
local_40 = *(uint *)(local_18 + 0x20c);
local_38 = 0.0;
local_48 = local_28;
tree_walk(local_18,walk_and_copy,&local_48,0);
}
delete_tree(local_18,0);
if (local_28 == (long *)0x0) {
local_10 = (long *)0x0;
}
else {
*local_48 = 0;
for (local_30 = local_28; *local_30 != 0; local_30 = local_30 + 3) {
local_30[2] = (long)(((double)local_30[2] / local_38) * (double)local_40);
}
for (local_30 = local_28; *local_30 != 0; local_30 = local_30 + 3) {
local_30[2] = (long)((double)local_30[2] / ((double)local_40 * DAT_00258c68 + DAT_00258c60));
}
local_10 = local_28;
}
return local_10;
}
| |
28,016 | inline_mysql_file_read | eloqsql/include/mysql/psi/mysql_file.h | static inline size_t
inline_mysql_file_read(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, uchar *buffer, size_t count, myf flags)
{
size_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
size_t bytes_read;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
result= my_read(file, buffer, count, flags);
if (flags & (MY_NABP | MY_FNABP))
bytes_read= (result == 0) ? count : 0;
else
bytes_read= (result != MY_FILE_ERROR) ? result : 0;
PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
return result;
}
#endif
result= my_read(file, buffer, count, flags);
return result;
} | O0 | c | inline_mysql_file_read:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x1c46f0(%rip), %rax # 0x238378
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x88(%rbp), %rdi
movl $0x6, %edx
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x73d97
leaq 0x1c46a6(%rip), %rax # 0x238378
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x807f0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0x73d42
cmpq $0x0, -0x38(%rbp)
jne 0x73d27
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x73d32
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0x73d32
movq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x73d6f
cmpq $-0x1, -0x38(%rbp)
je 0x73d56
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x73d61
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0x73d61
movq -0xa0(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x1c4602(%rip), %rax # 0x238378
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x73db7
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x807f0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_file_read:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_88]
mov edx, 6
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz loc_73D97
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
call my_read
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
and rax, 6
cmp rax, 0
jz short loc_73D42
cmp [rbp+var_38], 0
jnz short loc_73D27
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
jmp short loc_73D32
loc_73D27:
xor eax, eax
mov [rbp+var_98], rax
jmp short $+2
loc_73D32:
mov rax, [rbp+var_98]
mov [rbp+var_90], rax
jmp short loc_73D6F
loc_73D42:
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jz short loc_73D56
mov rax, [rbp+var_38]
mov [rbp+var_A0], rax
jmp short loc_73D61
loc_73D56:
xor eax, eax
mov [rbp+var_A0], rax
jmp short $+2
loc_73D61:
mov rax, [rbp+var_A0]
mov [rbp+var_90], rax
loc_73D6F:
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_90]
call rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_73DB7
loc_73D97:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
call my_read
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_73DB7:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
| long long inline_mysql_file_read(
long long a1,
unsigned int a2,
unsigned int a3,
long long a4,
long long a5,
long long a6)
{
long long v7; // [rsp+0h] [rbp-A0h]
long long v8; // [rsp+8h] [rbp-98h]
_BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF
long long v10; // [rsp+60h] [rbp-40h]
long long v11; // [rsp+68h] [rbp-38h]
long long v12; // [rsp+70h] [rbp-30h]
long long v13; // [rsp+78h] [rbp-28h]
long long v14; // [rsp+80h] [rbp-20h]
unsigned int v15; // [rsp+88h] [rbp-18h]
unsigned int v16; // [rsp+8Ch] [rbp-14h]
long long v17; // [rsp+90h] [rbp-10h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v13 = a5;
v12 = a6;
v10 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v9, a3, 6LL);
if ( v10 )
{
(*((void ( **)(long long, long long, long long, _QWORD))PSI_server + 66))(v10, v13, v17, v16);
v11 = my_read(v15, v14, v13, v12);
if ( (v12 & 6) != 0 )
{
if ( v11 )
v8 = 0LL;
else
v8 = v13;
(*((void ( **)(long long, long long))PSI_server + 67))(v10, v8);
}
else
{
if ( v11 == -1 )
v7 = 0LL;
else
v7 = v11;
(*((void ( **)(long long, long long))PSI_server + 67))(v10, v7);
}
return v11;
}
else
{
return my_read(v15, v14, v13, v12);
}
}
| inline_mysql_file_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x338378]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x88]
MOV EDX,0x6
CALL RAX
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00173d97
LEA RAX,[0x338378]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001807f0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
AND RAX,0x6
CMP RAX,0x0
JZ 0x00173d42
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x00173d27
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x00173d32
LAB_00173d27:
XOR EAX,EAX
MOV qword ptr [RBP + -0x98],RAX
JMP 0x00173d32
LAB_00173d32:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x90],RAX
JMP 0x00173d6f
LAB_00173d42:
CMP qword ptr [RBP + -0x38],-0x1
JZ 0x00173d56
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x00173d61
LAB_00173d56:
XOR EAX,EAX
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x00173d61
LAB_00173d61:
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x90],RAX
LAB_00173d6f:
LEA RAX,[0x338378]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x90]
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00173db7
LAB_00173d97:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001807f0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_00173db7:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xa0
POP RBP
RET
|
long inline_mysql_file_read
(int8 param_1,int4 param_2,int4 param_3,int8 param_4,
long param_5,ulong param_6)
{
long local_a8;
long local_a0;
long local_98;
int1 local_90 [72];
long local_48;
long local_40;
ulong local_38;
long local_30;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
long local_10;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,6);
if (local_48 == 0) {
local_10 = my_read(local_20,local_28,local_30,local_38);
}
else {
(**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c);
local_40 = my_read(local_20,local_28,local_30,local_38);
if ((local_38 & 6) == 0) {
local_a8 = local_40;
if (local_40 == -1) {
local_a8 = 0;
}
local_98 = local_a8;
}
else {
if (local_40 == 0) {
local_a0 = local_30;
}
else {
local_a0 = 0;
}
local_98 = local_a0;
}
(**(code **)(PSI_server + 0x218))(local_48,local_98);
local_10 = local_40;
}
return local_10;
}
| |
28,017 | test_mopts8 | eloqsql/unittest/mysys/my_getopt-t.c | void test_mopts8()
{
int rc;
char **av= (char **)mopts8_argv;
rc= handle_options(&mopts8_argc, &av, mopts_options, &dummy_get_one_option);
ok( (rc == 0), "%s", "test_mopts8 call");
ok( (mopts_num == 1000000L), "%s", "test_mopts7 num");
ok( (strncmp(mopts_str, "ddd", 4) == 0), "%s", "test_mopts7 str");
ok( (mopts_bool == 1), "%s", "test_mopts7 bool");
} | O0 | c | test_mopts8:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x1b3421(%rip), %rax # 0x1d93d0
movq %rax, -0x10(%rbp)
leaq 0x1b3406(%rip), %rdi # 0x1d93c0
leaq -0x10(%rbp), %rsi
leaq 0x1b304b(%rip), %rdx # 0x1d9010
leaq -0x85c(%rip), %rcx # 0x25770
callq 0x27640
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x600a6(%rip), %rsi # 0x8608d
leaq 0x5c2fe(%rip), %rdx # 0x822ec
movb $0x0, %al
callq 0x26ba0
cmpq $0xf4240, 0x36b330(%rip) # imm = 0xF4240
sete %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x6007e(%rip), %rsi # 0x8608d
leaq 0x5c282(%rip), %rdx # 0x82298
movb $0x0, %al
callq 0x26ba0
movq 0x36b314(%rip), %rdi # 0x391338
leaq 0x5c082(%rip), %rsi # 0x820ad
movl $0x4, %edx
callq 0x25150
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x60046(%rip), %rsi # 0x8608d
leaq 0x5c25a(%rip), %rdx # 0x822a8
movb $0x0, %al
callq 0x26ba0
movsbl 0x36b2e4(%rip), %eax # 0x391340
cmpl $0x1, %eax
sete %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x6001f(%rip), %rsi # 0x8608d
leaq 0x5c243(%rip), %rdx # 0x822b8
movb $0x0, %al
callq 0x26ba0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| test_mopts8:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, mopts8_argv
mov [rbp+var_10], rax
lea rdi, mopts8_argc
lea rsi, [rbp+var_10]
lea rdx, mopts_options
lea rcx, dummy_get_one_option
call handle_options
mov [rbp+var_4], eax
cmp [rbp+var_4], 0
setz al
and al, 1
movzx edi, al
lea rsi, aAtLineDPosDS+13h; "%s"
lea rdx, aTestMopts8Call; "test_mopts8 call"
mov al, 0
call ok
cmp cs:mopts_num, offset unk_F4240
setz al
and al, 1
movzx edi, al
lea rsi, aAtLineDPosDS+13h; "%s"
lea rdx, aTestMopts7Num; "test_mopts7 num"
mov al, 0
call ok
mov rdi, cs:mopts_str
lea rsi, aDdd; "ddd"
mov edx, 4
call _strncmp
cmp eax, 0
setz al
and al, 1
movzx edi, al
lea rsi, aAtLineDPosDS+13h; "%s"
lea rdx, aTestMopts7Str; "test_mopts7 str"
mov al, 0
call ok
movsx eax, cs:mopts_bool
cmp eax, 1
setz al
and al, 1
movzx edi, al
lea rsi, aAtLineDPosDS+13h; "%s"
lea rdx, aTestMopts7Bool; "test_mopts7 bool"
mov al, 0
call ok
add rsp, 10h
pop rbp
retn
| long long test_mopts8()
{
int v0; // ecx
int v1; // r8d
int v2; // r9d
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v6; // eax
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v10; // ecx
int v11; // r8d
int v12; // r9d
char **v14; // [rsp+0h] [rbp-10h] BYREF
int v15; // [rsp+Ch] [rbp-4h]
v14 = mopts8_argv;
v15 = handle_options(&mopts8_argc, &v14, &mopts_options, dummy_get_one_option);
ok(v15 == 0, (unsigned int)"%s", (unsigned int)"test_mopts8 call", v0, v1, v2, (char)v14);
ok(mopts_num == (_QWORD)&unk_F4240, (unsigned int)"%s", (unsigned int)"test_mopts7 num", v3, v4, v5, (char)v14);
v6 = strncmp(mopts_str, "ddd", 4LL);
ok(v6 == 0, (unsigned int)"%s", (unsigned int)"test_mopts7 str", v7, v8, v9, (char)v14);
return ok(mopts_bool == 1, (unsigned int)"%s", (unsigned int)"test_mopts7 bool", v10, v11, v12, (char)v14);
}
| test_mopts8:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[0x2d93d0]
MOV qword ptr [RBP + -0x10],RAX
LEA RDI,[0x2d93c0]
LEA RSI,[RBP + -0x10]
LEA RDX,[0x2d9010]
LEA RCX,[0x125770]
CALL 0x00127640
MOV dword ptr [RBP + -0x4],EAX
CMP dword ptr [RBP + -0x4],0x0
SETZ AL
AND AL,0x1
MOVZX EDI,AL
LEA RSI,[0x18608d]
LEA RDX,[0x1822ec]
MOV AL,0x0
CALL 0x00126ba0
CMP qword ptr [0x00491330],0xf4240
SETZ AL
AND AL,0x1
MOVZX EDI,AL
LEA RSI,[0x18608d]
LEA RDX,[0x182298]
MOV AL,0x0
CALL 0x00126ba0
MOV RDI,qword ptr [0x00491338]
LEA RSI,[0x1820ad]
MOV EDX,0x4
CALL 0x00125150
CMP EAX,0x0
SETZ AL
AND AL,0x1
MOVZX EDI,AL
LEA RSI,[0x18608d]
LEA RDX,[0x1822a8]
MOV AL,0x0
CALL 0x00126ba0
MOVSX EAX,byte ptr [0x00491340]
CMP EAX,0x1
SETZ AL
AND AL,0x1
MOVZX EDI,AL
LEA RSI,[0x18608d]
LEA RDX,[0x1822b8]
MOV AL,0x0
CALL 0x00126ba0
ADD RSP,0x10
POP RBP
RET
|
void test_mopts8(void)
{
int iVar1;
int1 *local_18;
int local_c;
local_18 = mopts8_argv;
local_c = handle_options(&mopts8_argc,&local_18,mopts_options,dummy_get_one_option);
ok(local_c == 0,"%s","test_mopts8 call");
ok(mopts_num == 1000000,"%s","test_mopts7 num");
iVar1 = strncmp(mopts_str,"ddd",4);
ok(iVar1 == 0,"%s","test_mopts7 str");
ok(mopts_bool == '\x01',"%s","test_mopts7 bool");
return;
}
| |
28,018 | string_buffer_putc_slow | bluesky950520[P]quickjs/quickjs.c | static no_inline int string_buffer_putc_slow(StringBuffer *s, uint32_t c)
{
if (unlikely(s->len >= s->size)) {
if (string_buffer_realloc(s, s->len + 1, c))
return -1;
}
if (s->is_wide_char) {
s->str->u.str16[s->len++] = c;
} else if (c < 0x100) {
s->str->u.str8[s->len++] = c;
} else {
if (string_buffer_widen(s, s->size))
return -1;
s->str->u.str16[s->len++] = c;
}
return 0;
} | O1 | c | string_buffer_putc_slow:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0x10(%rdi), %esi
cmpl 0x14(%rdi), %esi
jge 0x46c71
cmpl $0x0, 0x18(%r14)
je 0x46c33
movq 0x8(%r14), %rax
movslq 0x10(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x10(%r14)
movw %bx, 0x18(%rax,%rcx,2)
jmp 0x46c4e
cmpl $0xff, %ebx
ja 0x46c58
movq 0x8(%r14), %rax
movslq 0x10(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x10(%r14)
movb %bl, 0x18(%rax,%rcx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x14(%r14), %esi
movq %r14, %rdi
callq 0x4169e
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x46c50
jmp 0x46c1d
incl %esi
movq %r14, %rdi
movl %ebx, %edx
callq 0x4158f
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x46c50
jmp 0x46c16
| string_buffer_putc_slow:
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
mov esi, [rdi+10h]
cmp esi, [rdi+14h]
jge short loc_46C71
loc_46C16:
cmp dword ptr [r14+18h], 0
jz short loc_46C33
loc_46C1D:
mov rax, [r14+8]
movsxd rcx, dword ptr [r14+10h]
lea edx, [rcx+1]
mov [r14+10h], edx
mov [rax+rcx*2+18h], bx
jmp short loc_46C4E
loc_46C33:
cmp ebx, 0FFh
ja short loc_46C58
mov rax, [r14+8]
movsxd rcx, dword ptr [r14+10h]
lea edx, [rcx+1]
mov [r14+10h], edx
mov [rax+rcx+18h], bl
loc_46C4E:
xor eax, eax
loc_46C50:
add rsp, 8
pop rbx
pop r14
retn
loc_46C58:
mov esi, [r14+14h]
mov rdi, r14
call string_buffer_widen
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_46C50
jmp short loc_46C1D
loc_46C71:
inc esi
mov rdi, r14
mov edx, ebx
call string_buffer_realloc
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_46C50
jmp short loc_46C16
| long long string_buffer_putc_slow(
long long a1,
unsigned int a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
int v15; // esi
long long v16; // rax
long long v17; // rcx
long long v18; // rax
long long v19; // rcx
long long result; // rax
int v21; // ecx
int v22; // ecx
v15 = *(_DWORD *)(a1 + 16);
if ( v15 < *(_DWORD *)(a1 + 20)
|| (v22 = string_buffer_realloc(a1, v15 + 1, a2, a12, a13, a14, a3, a4, a5, a6, a7, a8, a9, a10),
result = 0xFFFFFFFFLL,
!v22) )
{
if ( *(_DWORD *)(a1 + 24) )
goto LABEL_3;
if ( a2 <= 0xFF )
{
v18 = *(_QWORD *)(a1 + 8);
v19 = *(int *)(a1 + 16);
*(_DWORD *)(a1 + 16) = v19 + 1;
*(_BYTE *)(v18 + v19 + 24) = a2;
return 0LL;
}
v21 = string_buffer_widen(a1, *(_DWORD *)(a1 + 20));
result = 0xFFFFFFFFLL;
if ( !v21 )
{
LABEL_3:
v16 = *(_QWORD *)(a1 + 8);
v17 = *(int *)(a1 + 16);
*(_DWORD *)(a1 + 16) = v17 + 1;
*(_WORD *)(v16 + 2 * v17 + 24) = a2;
return 0LL;
}
}
return result;
}
| string_buffer_putc_slow:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
MOV ESI,dword ptr [RDI + 0x10]
CMP ESI,dword ptr [RDI + 0x14]
JGE 0x00146c71
LAB_00146c16:
CMP dword ptr [R14 + 0x18],0x0
JZ 0x00146c33
LAB_00146c1d:
MOV RAX,qword ptr [R14 + 0x8]
MOVSXD RCX,dword ptr [R14 + 0x10]
LEA EDX,[RCX + 0x1]
MOV dword ptr [R14 + 0x10],EDX
MOV word ptr [RAX + RCX*0x2 + 0x18],BX
JMP 0x00146c4e
LAB_00146c33:
CMP EBX,0xff
JA 0x00146c58
MOV RAX,qword ptr [R14 + 0x8]
MOVSXD RCX,dword ptr [R14 + 0x10]
LEA EDX,[RCX + 0x1]
MOV dword ptr [R14 + 0x10],EDX
MOV byte ptr [RAX + RCX*0x1 + 0x18],BL
LAB_00146c4e:
XOR EAX,EAX
LAB_00146c50:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00146c58:
MOV ESI,dword ptr [R14 + 0x14]
MOV RDI,R14
CALL 0x0014169e
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x00146c50
JMP 0x00146c1d
LAB_00146c71:
INC ESI
MOV RDI,R14
MOV EDX,EBX
CALL 0x0014158f
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x00146c50
JMP 0x00146c16
|
int8 string_buffer_putc_slow(long param_1,uint param_2)
{
int iVar1;
if ((*(int *)(param_1 + 0x14) <= *(int *)(param_1 + 0x10)) &&
(iVar1 = string_buffer_realloc(param_1,*(int *)(param_1 + 0x10) + 1,param_2), iVar1 != 0)) {
return 0xffffffff;
}
if (*(int *)(param_1 + 0x18) == 0) {
if (param_2 < 0x100) {
iVar1 = *(int *)(param_1 + 0x10);
*(int *)(param_1 + 0x10) = iVar1 + 1;
*(char *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1) = (char)param_2;
return 0;
}
iVar1 = string_buffer_widen(param_1,*(int4 *)(param_1 + 0x14));
if (iVar1 != 0) {
return 0xffffffff;
}
}
iVar1 = *(int *)(param_1 + 0x10);
*(int *)(param_1 + 0x10) = iVar1 + 1;
*(short *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1 * 2) = (short)param_2;
return 0;
}
| |
28,019 | string_buffer_putc_slow | bluesky950520[P]quickjs/quickjs.c | static no_inline int string_buffer_putc_slow(StringBuffer *s, uint32_t c)
{
if (unlikely(s->len >= s->size)) {
if (string_buffer_realloc(s, s->len + 1, c))
return -1;
}
if (s->is_wide_char) {
s->str->u.str16[s->len++] = c;
} else if (c < 0x100) {
s->str->u.str8[s->len++] = c;
} else {
if (string_buffer_widen(s, s->size))
return -1;
s->str->u.str16[s->len++] = c;
}
return 0;
} | O3 | c | string_buffer_putc_slow:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0x10(%rdi), %esi
cmpl 0x14(%rdi), %esi
jge 0x48913
cmpl $0x0, 0x18(%r14)
je 0x488d5
movq 0x8(%r14), %rax
movslq 0x10(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x10(%r14)
movw %bx, 0x18(%rax,%rcx,2)
jmp 0x488f0
cmpl $0xff, %ebx
ja 0x488fa
movq 0x8(%r14), %rax
movslq 0x10(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x10(%r14)
movb %bl, 0x18(%rax,%rcx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x14(%r14), %esi
movq %r14, %rdi
callq 0x4315e
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x488f2
jmp 0x488bf
incl %esi
movq %r14, %rdi
movl %ebx, %edx
callq 0x4305b
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x488f2
jmp 0x488b8
| string_buffer_putc_slow:
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
mov esi, [rdi+10h]
cmp esi, [rdi+14h]
jge short loc_48913
loc_488B8:
cmp dword ptr [r14+18h], 0
jz short loc_488D5
loc_488BF:
mov rax, [r14+8]
movsxd rcx, dword ptr [r14+10h]
lea edx, [rcx+1]
mov [r14+10h], edx
mov [rax+rcx*2+18h], bx
jmp short loc_488F0
loc_488D5:
cmp ebx, 0FFh
ja short loc_488FA
mov rax, [r14+8]
movsxd rcx, dword ptr [r14+10h]
lea edx, [rcx+1]
mov [r14+10h], edx
mov [rax+rcx+18h], bl
loc_488F0:
xor eax, eax
loc_488F2:
add rsp, 8
pop rbx
pop r14
retn
loc_488FA:
mov esi, [r14+14h]
mov rdi, r14
call string_buffer_widen
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_488F2
jmp short loc_488BF
loc_48913:
inc esi
mov rdi, r14
mov edx, ebx
call string_buffer_realloc
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_488F2
jmp short loc_488B8
| long long string_buffer_putc_slow(
long long a1,
unsigned int a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
int v15; // esi
long long v16; // rax
long long v17; // rcx
long long v18; // rax
long long v19; // rcx
long long result; // rax
int v21; // ecx
int v22; // ecx
v15 = *(_DWORD *)(a1 + 16);
if ( v15 < *(_DWORD *)(a1 + 20)
|| (v22 = string_buffer_realloc(a1, v15 + 1, a2, a12, a13, a14, a3, a4, a5, a6, a7, a8, a9, a10),
result = 0xFFFFFFFFLL,
!v22) )
{
if ( *(_DWORD *)(a1 + 24) )
goto LABEL_3;
if ( a2 <= 0xFF )
{
v18 = *(_QWORD *)(a1 + 8);
v19 = *(int *)(a1 + 16);
*(_DWORD *)(a1 + 16) = v19 + 1;
*(_BYTE *)(v18 + v19 + 24) = a2;
return 0LL;
}
v21 = string_buffer_widen(a1, *(_DWORD *)(a1 + 20));
result = 0xFFFFFFFFLL;
if ( !v21 )
{
LABEL_3:
v16 = *(_QWORD *)(a1 + 8);
v17 = *(int *)(a1 + 16);
*(_DWORD *)(a1 + 16) = v17 + 1;
*(_WORD *)(v16 + 2 * v17 + 24) = a2;
return 0LL;
}
}
return result;
}
| string_buffer_putc_slow:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
MOV ESI,dword ptr [RDI + 0x10]
CMP ESI,dword ptr [RDI + 0x14]
JGE 0x00148913
LAB_001488b8:
CMP dword ptr [R14 + 0x18],0x0
JZ 0x001488d5
LAB_001488bf:
MOV RAX,qword ptr [R14 + 0x8]
MOVSXD RCX,dword ptr [R14 + 0x10]
LEA EDX,[RCX + 0x1]
MOV dword ptr [R14 + 0x10],EDX
MOV word ptr [RAX + RCX*0x2 + 0x18],BX
JMP 0x001488f0
LAB_001488d5:
CMP EBX,0xff
JA 0x001488fa
MOV RAX,qword ptr [R14 + 0x8]
MOVSXD RCX,dword ptr [R14 + 0x10]
LEA EDX,[RCX + 0x1]
MOV dword ptr [R14 + 0x10],EDX
MOV byte ptr [RAX + RCX*0x1 + 0x18],BL
LAB_001488f0:
XOR EAX,EAX
LAB_001488f2:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001488fa:
MOV ESI,dword ptr [R14 + 0x14]
MOV RDI,R14
CALL 0x0014315e
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x001488f2
JMP 0x001488bf
LAB_00148913:
INC ESI
MOV RDI,R14
MOV EDX,EBX
CALL 0x0014305b
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x001488f2
JMP 0x001488b8
|
int8 string_buffer_putc_slow(long param_1,uint param_2)
{
int iVar1;
if ((*(int *)(param_1 + 0x14) <= *(int *)(param_1 + 0x10)) &&
(iVar1 = string_buffer_realloc(param_1,*(int *)(param_1 + 0x10) + 1,param_2), iVar1 != 0)) {
return 0xffffffff;
}
if (*(int *)(param_1 + 0x18) == 0) {
if (param_2 < 0x100) {
iVar1 = *(int *)(param_1 + 0x10);
*(int *)(param_1 + 0x10) = iVar1 + 1;
*(char *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1) = (char)param_2;
return 0;
}
iVar1 = string_buffer_widen(param_1,*(int4 *)(param_1 + 0x14));
if (iVar1 != 0) {
return 0xffffffff;
}
}
iVar1 = *(int *)(param_1 + 0x10);
*(int *)(param_1 + 0x10) = iVar1 + 1;
*(short *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1 * 2) = (short)param_2;
return 0;
}
| |
28,020 | ma_bitmap_create_first | eloqsql/storage/maria/ma_bitmap.c | int _ma_bitmap_create_first(MARIA_SHARE *share)
{
uint block_size= share->bitmap.block_size;
File file= share->bitmap.file.file;
uchar marker[CRC_SIZE];
/*
Next write operation of the page will write correct CRC
if it is needed
*/
int4store(marker, MARIA_NO_CRC_BITMAP_PAGE);
if (mysql_file_chsize(file, block_size - sizeof(marker),
0, MYF(MY_WME)) ||
my_pwrite(file, marker, sizeof(marker),
block_size - sizeof(marker),
MYF(MY_NABP | MY_WME)))
return 1;
share->state.state.data_file_length= block_size;
_ma_bitmap_delete_all(share);
return 0;
} | O3 | c | ma_bitmap_create_first:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movl 0xa60(%rdi), %r14d
movl 0xb44(%rdi), %r13d
movl $0xfffffffe, -0x34(%rbp) # imm = 0xFFFFFFFE
leaq -0x4(%r13), %r15
leaq 0x3399ba(%rip), %rax # 0x38d070
movq (%rax), %rax
leaq -0x80(%rbp), %rdi
movl %r14d, %esi
movl $0xd, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x5373b
movl $0x10, %ecx
movl %r14d, %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0xa3dd8
movl $0x1, %r12d
testl %eax, %eax
jne 0x5371a
leaq -0x34(%rbp), %rsi
movl $0x4, %edx
movl $0x14, %r8d
movl %r14d, %edi
movq %r15, %rcx
callq 0xa67b2
testq %rax, %rax
jne 0x5371a
movq %r13, 0x40(%rbx)
movq %rbx, %rdi
callq 0x51a28
xorl %r12d, %r12d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x53756
movl %r12d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x38(%rbp), %r12
movq %rax, %rdi
movq %r15, %rsi
movl %r14d, %edx
movq %r12, %rcx
callq 0x2a279
movl (%r12), %eax
jmp 0x536e2
callq 0x29220
| _ma_bitmap_create_first:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r14d, [rdi+0A60h]
mov r13d, [rdi+0B44h]
mov [rbp+var_34], 0FFFFFFFEh
lea r15, [r13-4]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_80]
mov esi, r14d
mov edx, 0Dh
call qword ptr [rax+158h]
test rax, rax
jnz short loc_5373B
mov ecx, 10h
mov edi, r14d
mov rsi, r15
xor edx, edx
call my_chsize
loc_536E2:
mov r12d, 1
test eax, eax
jnz short loc_5371A
lea rsi, [rbp+var_34]
mov edx, 4
mov r8d, 14h
mov edi, r14d
mov rcx, r15
call my_pwrite
test rax, rax
jnz short loc_5371A
mov [rbx+40h], r13
mov rdi, rbx
call _ma_bitmap_delete_all
xor r12d, r12d
loc_5371A:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_53756
mov eax, r12d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5373B:
lea r12, [rbp+var_38]
mov rdi, rax
mov rsi, r15
mov edx, r14d
mov rcx, r12
call _ma_bitmap_create_first_cold_1
mov eax, [r12]
jmp short loc_536E2
loc_53756:
call ___stack_chk_fail
| long long ma_bitmap_create_first(long long a1)
{
unsigned int v1; // r14d
long long v2; // r13
long long v3; // rax
int v4; // eax
unsigned int v5; // r12d
_BYTE v7[72]; // [rsp+0h] [rbp-80h] BYREF
int v8; // [rsp+48h] [rbp-38h] BYREF
int v9; // [rsp+4Ch] [rbp-34h] BYREF
unsigned long long v10; // [rsp+50h] [rbp-30h]
v10 = __readfsqword(0x28u);
v1 = *(_DWORD *)(a1 + 2656);
v2 = *(unsigned int *)(a1 + 2884);
v9 = -2;
v3 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, v1, 13LL);
if ( v3 )
{
ma_bitmap_create_first_cold_1(v3, v2 - 4, v1, &v8);
v4 = v8;
}
else
{
v4 = my_chsize(v1, v2 - 4, 0LL, 16LL);
}
v5 = 1;
if ( !v4 && !my_pwrite(v1, &v9, 4LL, v2 - 4, 20LL) )
{
*(_QWORD *)(a1 + 64) = v2;
ma_bitmap_delete_all(a1);
return 0;
}
return v5;
}
| _ma_bitmap_create_first:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R14D,dword ptr [RDI + 0xa60]
MOV R13D,dword ptr [RDI + 0xb44]
MOV dword ptr [RBP + -0x34],0xfffffffe
LEA R15,[R13 + -0x4]
LEA RAX,[0x48d070]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x80]
MOV ESI,R14D
MOV EDX,0xd
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0015373b
MOV ECX,0x10
MOV EDI,R14D
MOV RSI,R15
XOR EDX,EDX
CALL 0x001a3dd8
LAB_001536e2:
MOV R12D,0x1
TEST EAX,EAX
JNZ 0x0015371a
LEA RSI,[RBP + -0x34]
MOV EDX,0x4
MOV R8D,0x14
MOV EDI,R14D
MOV RCX,R15
CALL 0x001a67b2
TEST RAX,RAX
JNZ 0x0015371a
MOV qword ptr [RBX + 0x40],R13
MOV RDI,RBX
CALL 0x00151a28
XOR R12D,R12D
LAB_0015371a:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00153756
MOV EAX,R12D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015373b:
LEA R12,[RBP + -0x38]
MOV RDI,RAX
MOV RSI,R15
MOV EDX,R14D
MOV RCX,R12
CALL 0x0012a279
MOV EAX,dword ptr [R12]
JMP 0x001536e2
LAB_00153756:
CALL 0x00129220
|
/* WARNING: Type propagation algorithm not settling */
int8 _ma_bitmap_create_first(long param_1)
{
int4 uVar1;
uint uVar2;
long lVar3;
long lVar4;
int8 uVar5;
long in_FS_OFFSET;
int1 local_88 [72];
int local_40 [2];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar1 = *(int4 *)(param_1 + 0xa60);
uVar2 = *(uint *)(param_1 + 0xb44);
local_40[1] = 0xfffffffe;
lVar4 = (ulong)uVar2 - 4;
lVar3 = (**(code **)(PSI_server + 0x158))(local_88,uVar1,0xd);
if (lVar3 == 0) {
local_40[0] = my_chsize(uVar1,lVar4,0,0x10);
}
else {
_ma_bitmap_create_first_cold_1(lVar3,lVar4,uVar1,local_40);
}
uVar5 = 1;
if (local_40[0] == 0) {
lVar4 = my_pwrite(uVar1,local_40 + 1,4,lVar4,0x14);
if (lVar4 == 0) {
*(ulong *)(param_1 + 0x40) = (ulong)uVar2;
_ma_bitmap_delete_all(param_1);
uVar5 = 0;
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar5;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
28,021 | fmt::v10::appender fmt::v10::detail::write_significand<char, fmt::v10::appender, unsigned long, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, unsigned long, int, int, fmt::v10::detail::digit_grouping<char> const&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR20 auto write_significand(OutputIt out, T significand,
int significand_size, int exponent,
const Grouping& grouping) -> OutputIt {
if (!grouping.has_separator()) {
out = write_significand<Char>(out, significand, significand_size);
return detail::fill_n(out, exponent, static_cast<Char>('0'));
}
auto buffer = memory_buffer();
write_significand<char>(appender(buffer), significand, significand_size);
detail::fill_n(appender(buffer), exponent, '0');
return grouping.apply(out, string_view(buffer.data(), buffer.size()));
} | O3 | c | fmt::v10::appender fmt::v10::detail::write_significand<char, fmt::v10::appender, unsigned long, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, unsigned long, int, int, fmt::v10::detail::digit_grouping<char> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movl %ecx, %ebp
movq %rdi, %rbx
cmpq $0x0, 0x28(%r8)
je 0x2e640
movq %r8, %r14
leaq 0x30(%rsp), %r15
movq $0x0, -0x10(%r15)
leaq 0x7fe9a(%rip), %rax # 0xae478
movq %rax, -0x20(%r15)
movq %r15, -0x18(%r15)
movq $0x1f4, -0x8(%r15) # imm = 0x1F4
movslq %edx, %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x2574e
leaq 0xf(%rsp), %rdx
movb $0x30, (%rdx)
leaq 0x10(%rsp), %rdi
movl %ebp, %esi
callq 0x2a08a
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2843c
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x2e663
movq 0x28(%rsp), %rsi
callq 0x1f250
jmp 0x2e663
movslq %edx, %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x2574e
leaq 0x10(%rsp), %rdx
movb $0x30, (%rdx)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2a08a
movq %rax, %rbx
movq %rbx, %rax
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2e676
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x2e68d
movq 0x28(%rsp), %rsi
callq 0x1f250
movq %rbx, %rdi
callq 0x1ffd0
| _ZN3fmt3v106detail17write_significandIcNS0_8appenderEPKcNS1_14digit_groupingIcEEEET0_S8_T1_iiRKT2_:
push rbp
push r15
push r14
push rbx
sub rsp, 228h
mov ebp, ecx
mov rbx, rdi
cmp qword ptr [r8+28h], 0
jz short loc_2E640
mov r14, r8
lea r15, [rsp+248h+var_218]
mov qword ptr [r15-10h], 0
lea rax, off_AE478
mov [r15-20h], rax
mov [r15-18h], r15
mov qword ptr [r15-8], 1F4h
movsxd rdx, edx
add rdx, rsi
lea rdi, [rsp+248h+var_238]
call _ZN3fmt3v106detail6bufferIcE6appendIcEEvPKT_S7_; fmt::v10::detail::buffer<char>::append<char>(char const*,char const*)
lea rdx, [rsp+248h+var_239]
mov byte ptr [rdx], 30h ; '0'
lea rdi, [rsp+248h+var_238]
mov esi, ebp
call _ZN3fmt3v106detail6fill_nINS0_8appenderEicEET_S4_T0_RKT1_; fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(fmt::v10::appender,int,char const&)
mov rdx, [rsp+248h+var_230]; int
mov rcx, qword ptr [rsp+248h+var_228]; int
mov rdi, r14; int
mov rsi, rbx; int
call _ZNK3fmt3v106detail14digit_groupingIcE5applyINS0_8appenderEcEET_S6_NS0_17basic_string_viewIT0_EE; fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender,char>(fmt::v10::appender,fmt::v10::basic_string_view<char>)
mov rbx, rax
mov rdi, [rsp+248h+var_230]; void *
cmp rdi, r15
jz short loc_2E663
mov rsi, [rsp+248h+var_220]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2E663
loc_2E640:
movsxd rdx, edx
add rdx, rsi
mov rdi, rbx
call _ZN3fmt3v106detail6bufferIcE6appendIcEEvPKT_S7_; fmt::v10::detail::buffer<char>::append<char>(char const*,char const*)
lea rdx, [rsp+248h+var_238]
mov byte ptr [rdx], 30h ; '0'
mov rdi, rbx
mov esi, ebp
call _ZN3fmt3v106detail6fill_nINS0_8appenderEicEET_S4_T0_RKT1_; fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(fmt::v10::appender,int,char const&)
mov rbx, rax
loc_2E663:
mov rax, rbx
add rsp, 228h
pop rbx
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_2E676:
mov rbx, rax
mov rdi, [rsp+arg_10]; void *
cmp rdi, r15
jz short loc_2E68D
mov rsi, [rsp+arg_20]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2E68D:
mov rdi, rbx
call __Unwind_Resume
| long long fmt::v10::detail::write_significand<char,fmt::v10::appender,char const*,fmt::v10::detail::digit_grouping<char>>(
long long a1,
long long a2,
int a3,
int a4,
long long a5)
{
long long v7; // rbx
char v9; // [rsp+Fh] [rbp-239h] BYREF
_UNKNOWN **v10; // [rsp+10h] [rbp-238h] BYREF
void *v11; // [rsp+18h] [rbp-230h]
int v12[2]; // [rsp+20h] [rbp-228h]
unsigned long long v13; // [rsp+28h] [rbp-220h]
_BYTE v14[536]; // [rsp+30h] [rbp-218h] BYREF
if ( *(_QWORD *)(a5 + 40) )
{
*(_QWORD *)v12 = 0LL;
v10 = &off_AE478;
v11 = v14;
v13 = 500LL;
fmt::v10::detail::buffer<char>::append<char>((long long)&v10, a2, a2 + a3);
v9 = 48;
fmt::v10::detail::fill_n<fmt::v10::appender,int,char>((long long)&v10, a4, &v9);
v7 = fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender,char>(a5, a1, (long long)v11, v12[0]);
if ( v11 != v14 )
operator delete(v11, v13);
}
else
{
fmt::v10::detail::buffer<char>::append<char>(a1, a2, a2 + a3);
LOBYTE(v10) = 48;
return fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(a1, a4, (char *)&v10);
}
return v7;
}
| write_significand<char,fmt::v10::appender,char_const*,fmt::v10::detail::digit_grouping<char>>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x228
MOV EBP,ECX
MOV RBX,RDI
CMP qword ptr [R8 + 0x28],0x0
JZ 0x0012e640
MOV R14,R8
LEA R15,[RSP + 0x30]
MOV qword ptr [R15 + -0x10],0x0
LEA RAX,[0x1ae478]
MOV qword ptr [R15 + -0x20],RAX
MOV qword ptr [R15 + -0x18],R15
MOV qword ptr [R15 + -0x8],0x1f4
MOVSXD RDX,EDX
ADD RDX,RSI
LAB_0012e5f4:
LEA RDI,[RSP + 0x10]
CALL 0x0012574e
LEA RDX,[RSP + 0xf]
MOV byte ptr [RDX],0x30
LAB_0012e606:
LEA RDI,[RSP + 0x10]
MOV ESI,EBP
CALL 0x0012a08a
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
LAB_0012e61c:
MOV RDI,R14
MOV RSI,RBX
CALL 0x0012843c
LAB_0012e627:
MOV RBX,RAX
MOV RDI,qword ptr [RSP + 0x18]
CMP RDI,R15
JZ 0x0012e663
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0011f250
JMP 0x0012e663
LAB_0012e640:
MOVSXD RDX,EDX
ADD RDX,RSI
MOV RDI,RBX
CALL 0x0012574e
LEA RDX,[RSP + 0x10]
MOV byte ptr [RDX],0x30
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0012a08a
MOV RBX,RAX
LAB_0012e663:
MOV RAX,RBX
ADD RSP,0x228
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* fmt::v10::appender fmt::v10::detail::write_significand<char, fmt::v10::appender, char const*,
fmt::v10::detail::digit_grouping<char> >(fmt::v10::appender, char const*, int, int,
fmt::v10::detail::digit_grouping<char> const&) */
int8
fmt::v10::detail::
write_significand<char,fmt::v10::appender,char_const*,fmt::v10::detail::digit_grouping<char>>
(buffer<char> *param_1,char *param_2,int param_3,int4 param_4,long param_5)
{
int8 uVar1;
int **local_238;
int1 *local_230;
int8 local_228;
ulong local_220;
int1 local_218 [504];
if (*(long *)(param_5 + 0x28) == 0) {
buffer<char>::append<char>(param_1,param_2,param_2 + param_3);
local_238 = (int **)CONCAT71(local_238._1_7_,0x30);
uVar1 = fill_n<fmt::v10::appender,int,char>(param_1,param_4);
}
else {
local_228 = 0;
local_238 = &PTR_grow_001ae478;
local_220 = 500;
/* try { // try from 0012e5f4 to 0012e5fd has its CatchHandler @ 0012e676 */
local_230 = local_218;
buffer<char>::append<char>((buffer<char> *)&local_238,param_2,param_2 + param_3);
/* try { // try from 0012e606 to 0012e611 has its CatchHandler @ 0012e674 */
fill_n<fmt::v10::appender,int,char>(&local_238,param_4);
/* try { // try from 0012e61c to 0012e626 has its CatchHandler @ 0012e676 */
uVar1 = digit_grouping<char>::apply<fmt::v10::appender,char>
(param_5,param_1,local_230,local_228);
if (local_230 != local_218) {
operator_delete(local_230,local_220);
}
}
return uVar1;
}
| |
28,022 | net_get_error | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void net_get_error(char *buf, size_t buf_len,
char *error, size_t error_len,
unsigned int *error_no,
char *sqlstate)
{
char *p= buf;
size_t error_msg_len= 0;
if (buf_len > 2)
{
*error_no= uint2korr(p);
p+= 2;
/* since 4.1 sqlstate is following */
if (*p == '#')
{
memcpy(sqlstate, ++p, SQLSTATE_LENGTH);
p+= SQLSTATE_LENGTH;
}
error_msg_len= buf_len - (p - buf);
error_msg_len= MIN(error_msg_len, error_len - 1);
memcpy(error, p, error_msg_len);
}
else
{
*error_no= CR_UNKNOWN_ERROR;
memcpy(sqlstate, SQLSTATE_UNKNOWN, SQLSTATE_LENGTH);
}
} | O0 | c | net_get_error:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
cmpq $0x2, -0x10(%rbp)
jbe 0x7a708
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
movzwl %ax, %eax
movq -0x38(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x7a6b0
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
movl 0x1(%rcx), %edx
movl %edx, (%rax)
movb 0x5(%rcx), %cl
movb %cl, 0x4(%rax)
movq -0x38(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq -0x8(%rbp), %rdx
subq %rdx, %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x7a6e1
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x7a6ed
movq -0x20(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x600e0
jmp 0x7a72a
movq -0x28(%rbp), %rax
movl $0x7d0, (%rax) # imm = 0x7D0
movq -0x30(%rbp), %rax
leaq 0x286c63(%rip), %rcx # 0x301380
movq (%rcx), %rcx
movl (%rcx), %edx
movl %edx, (%rax)
movb 0x4(%rcx), %cl
movb %cl, 0x4(%rax)
addq $0x50, %rsp
popq %rbp
retq
| net_get_error:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
mov [rbp+var_40], 0
cmp [rbp+var_10], 2
jbe loc_7A708
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
movzx eax, ax
mov rcx, [rbp+var_38]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_28]
mov [rax], ecx
mov rax, [rbp+var_38]
add rax, 2
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
movsx eax, byte ptr [rax]
cmp eax, 23h ; '#'
jnz short loc_7A6B0
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
mov rdx, rcx
add rdx, 1
mov [rbp+var_38], rdx
mov edx, [rcx+1]
mov [rax], edx
mov cl, [rcx+5]
mov [rax+4], cl
mov rax, [rbp+var_38]
add rax, 5
mov [rbp+var_38], rax
loc_7A6B0:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
mov rdx, [rbp+var_8]
sub rcx, rdx
sub rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov rcx, [rbp+var_20]
sub rcx, 1
cmp rax, rcx
jnb short loc_7A6E1
mov rax, [rbp+var_40]
mov [rbp+var_48], rax
jmp short loc_7A6ED
loc_7A6E1:
mov rax, [rbp+var_20]
sub rax, 1
mov [rbp+var_48], rax
loc_7A6ED:
mov rax, [rbp+var_48]
mov [rbp+var_40], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_40]
call _memcpy
jmp short loc_7A72A
loc_7A708:
mov rax, [rbp+var_28]
mov dword ptr [rax], 7D0h
mov rax, [rbp+var_30]
lea rcx, SQLSTATE_UNKNOWN
mov rcx, [rcx]
mov edx, [rcx]
mov [rax], edx
mov cl, [rcx+4]
mov [rax+4], cl
loc_7A72A:
add rsp, 50h
pop rbp
retn
| long long net_get_error(
unsigned __int8 *a1,
unsigned long long a2,
long long a3,
long long a4,
_DWORD *a5,
long long a6)
{
long long result; // rax
char *v7; // rcx
unsigned long long v8; // [rsp+8h] [rbp-48h]
unsigned __int8 *v9; // [rsp+18h] [rbp-38h]
if ( a2 <= 2 )
{
*a5 = 2000;
result = a6;
v7 = SQLSTATE_UNKNOWN;
*(_DWORD *)a6 = *(_DWORD *)SQLSTATE_UNKNOWN;
*(_BYTE *)(a6 + 4) = v7[4];
}
else
{
*a5 = (unsigned __int16)((a1[1] << 8) + *a1);
v9 = a1 + 2;
if ( a1[2] == 35 )
{
*(_DWORD *)a6 = *(_DWORD *)(a1 + 3);
*(_BYTE *)(a6 + 4) = a1[7];
v9 = a1 + 8;
}
if ( a2 - (v9 - a1) >= a4 - 1 )
v8 = a4 - 1;
else
v8 = a2 - (v9 - a1);
return memcpy(a3, v9, v8);
}
return result;
}
| net_get_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x40],0x0
CMP qword ptr [RBP + -0x10],0x2
JBE 0x0017a708
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x2
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x23
JNZ 0x0017a6b0
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x38],RDX
MOV EDX,dword ptr [RCX + 0x1]
MOV dword ptr [RAX],EDX
MOV CL,byte ptr [RCX + 0x5]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x5
MOV qword ptr [RBP + -0x38],RAX
LAB_0017a6b0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x8]
SUB RCX,RDX
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x20]
SUB RCX,0x1
CMP RAX,RCX
JNC 0x0017a6e1
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0017a6ed
LAB_0017a6e1:
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
LAB_0017a6ed:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x001600e0
JMP 0x0017a72a
LAB_0017a708:
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],0x7d0
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x401380]
MOV RCX,qword ptr [RCX]
MOV EDX,dword ptr [RCX]
MOV dword ptr [RAX],EDX
MOV CL,byte ptr [RCX + 0x4]
MOV byte ptr [RAX + 0x4],CL
LAB_0017a72a:
ADD RSP,0x50
POP RBP
RET
|
void net_get_error(byte *param_1,ulong param_2,void *param_3,long param_4,uint *param_5,
int4 *param_6)
{
int *puVar1;
size_t local_50;
byte *local_40;
if (param_2 < 3) {
*param_5 = 2000;
puVar1 = SQLSTATE_UNKNOWN;
*param_6 = *(int4 *)SQLSTATE_UNKNOWN;
*(int *)(param_6 + 1) = puVar1[4];
}
else {
*param_5 = (uint)*param_1 + (uint)param_1[1] * 0x100 & 0xffff;
local_40 = param_1 + 2;
if (*local_40 == 0x23) {
*param_6 = *(int4 *)(param_1 + 3);
*(byte *)(param_6 + 1) = param_1[7];
local_40 = param_1 + 8;
}
local_50 = param_2 - ((long)local_40 - (long)param_1);
if (param_4 - 1U <= local_50) {
local_50 = param_4 - 1;
}
memcpy(param_3,local_40,local_50);
}
return;
}
| |
28,023 | minja::Value::at(minja::Value const&) | monkey531[P]llama/common/minja.hpp | Value& at(const Value & index) {
if (!index.is_hashable()) throw std::runtime_error("Unashable type: " + dump());
if (is_array()) return array_->at(index.get<int>());
if (is_object()) return object_->at(index.primitive_);
throw std::runtime_error("Value is not an array or object: " + dump());
} | O3 | cpp | minja::Value::at(minja::Value const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rsi)
jne 0x96e8d
cmpq $0x0, 0x20(%rsi)
jne 0x96e8d
cmpq $0x0, 0x30(%rsi)
jne 0x96e8d
movq 0x10(%r14), %rbx
testq %rbx, %rbx
je 0x96e73
movq %rsi, %rdi
callq 0x9444c
movslq %eax, %rsi
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0x96eea
leaq (%rsi,%rsi,4), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x96ef8
addq $0x40, %rsi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x983ac
movl $0x10, %edi
callq 0x1b4d0
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8a0c8
leaq 0x5c832(%rip), %rsi # 0xf36e5
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7c85d
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1c0a0
xorl %ebp, %ebp
movq 0x9910f(%rip), %rsi # 0x12ffe8
movq 0x99070(%rip), %rdx # 0x12ff50
movq %rbx, %rdi
callq 0x1c1c0
jmp 0x96f53
leaq 0x5c962(%rip), %rdi # 0xf3853
xorl %eax, %eax
callq 0x1bf60
movl $0x10, %edi
callq 0x1b4d0
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8a0c8
leaq 0x5c913(%rip), %rsi # 0xf3831
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7c85d
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1c0a0
xorl %ebp, %ebp
movq 0x990a4(%rip), %rsi # 0x12ffe8
movq 0x99005(%rip), %rdx # 0x12ff50
movq %rbx, %rdi
callq 0x1c1c0
jmp 0x96f59
jmp 0x96f99
jmp 0x96fb9
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x96f77
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1ba60
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x96f92
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1ba60
testb %bpl, %bpl
jne 0x96fbc
jmp 0x96fc4
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x96fbc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1ba60
jmp 0x96fbc
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b760
movq %r14, %rdi
callq 0x1c250
| _ZN5minja5Value2atERKS0_:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
cmp qword ptr [rsi+10h], 0
jnz short loc_96E8D
cmp qword ptr [rsi+20h], 0
jnz short loc_96E8D
cmp qword ptr [rsi+30h], 0
jnz short loc_96E8D
mov rbx, [r14+10h]
test rbx, rbx
jz short loc_96E73
mov rdi, rsi
call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void)
movsxd rsi, eax
mov rax, [rbx]
mov rcx, [rbx+8]
sub rcx, rax
sar rcx, 4
mov rdx, 0CCCCCCCCCCCCCCCDh
imul rdx, rcx
cmp rdx, rsi
jbe loc_96EEA
lea rcx, [rsi+rsi*4]
shl rcx, 4
add rax, rcx
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_96E73:
mov rdi, [r14+20h]
test rdi, rdi
jz short loc_96EF8
add rsi, 40h ; '@'
add rsp, 40h
pop rbx
pop r14
pop rbp
jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::at(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&)
loc_96E8D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable 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:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_96F53
loc_96EEA:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
loc_96EF8:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
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:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_96F53:
jmp short loc_96F59
jmp short loc_96F99
jmp short loc_96FB9
loc_96F59:
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_96F77
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_96F77:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_96F92
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_96F92:
test bpl, bpl
jnz short loc_96FBC
jmp short loc_96FC4
loc_96F99:
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_96FBC
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_96FBC
loc_96FB9:
mov r14, rax
loc_96FBC:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_96FC4:
mov rdi, r14
call __Unwind_Resume
| unsigned long long minja::Value::at(minja::Value *this, const minja::Value *a2)
{
_QWORD *v3; // rbx
unsigned long long v4; // rsi
unsigned long long v5; // rdx
long long v7; // rdi
void *exception; // rbx
void *v9; // rbx
_BYTE v10[16]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v11[16]; // [rsp+20h] [rbp-38h] BYREF
if ( *((_QWORD *)a2 + 2) || *((_QWORD *)a2 + 4) || *((_QWORD *)a2 + 6) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v11, (long long)"Unashable type: ", (long long)v10);
std::runtime_error::runtime_error(exception, v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = (_QWORD *)*((_QWORD *)this + 2);
if ( v3 )
{
v4 = (int)minja::Value::get<int>(a2);
v5 = 0xCCCCCCCCCCCCCCCDLL * ((long long)(v3[1] - *v3) >> 4);
if ( v5 <= v4 )
std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", v4, v5);
return 80 * v4 + *v3;
}
else
{
v7 = *((_QWORD *)this + 4);
if ( !v7 )
{
v9 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v11, (long long)"Value is not an array or object: ", (long long)v10);
std::runtime_error::runtime_error(v9, v11);
__cxa_throw(
v9,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::at(
v7,
(char *)a2 + 64);
}
}
| at:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP qword ptr [RSI + 0x10],0x0
JNZ 0x00196e8d
CMP qword ptr [RSI + 0x20],0x0
JNZ 0x00196e8d
CMP qword ptr [RSI + 0x30],0x0
JNZ 0x00196e8d
MOV RBX,qword ptr [R14 + 0x10]
TEST RBX,RBX
JZ 0x00196e73
MOV RDI,RSI
CALL 0x0019444c
MOVSXD RSI,EAX
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
SUB RCX,RAX
SAR RCX,0x4
MOV RDX,-0x3333333333333333
IMUL RDX,RCX
CMP RDX,RSI
JBE 0x00196eea
LEA RCX,[RSI + RSI*0x4]
SHL RCX,0x4
ADD RAX,RCX
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_00196e73:
MOV RDI,qword ptr [R14 + 0x20]
TEST RDI,RDI
JZ 0x00196ef8
ADD RSI,0x40
ADD RSP,0x40
POP RBX
POP R14
POP RBP
JMP 0x001983ac
LAB_00196e8d:
MOV EDI,0x10
CALL 0x0011b4d0
MOV RBX,RAX
LAB_00196e9a:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018a0c8
LAB_00196eac:
LEA RSI,[0x1f36e5]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017c85d
MOV BPL,0x1
LAB_00196ec3:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011c0a0
XOR EBP,EBP
MOV RSI,qword ptr [0x0022ffe8]
MOV RDX,qword ptr [0x0022ff50]
MOV RDI,RBX
CALL 0x0011c1c0
LAB_00196eea:
LEA RDI,[0x1f3853]
XOR EAX,EAX
CALL 0x0011bf60
LAB_00196ef8:
MOV EDI,0x10
CALL 0x0011b4d0
MOV RBX,RAX
LAB_00196f05:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018a0c8
LAB_00196f17:
LEA RSI,[0x1f3831]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017c85d
MOV BPL,0x1
LAB_00196f2e:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011c0a0
XOR EBP,EBP
MOV RSI,qword ptr [0x0022ffe8]
MOV RDX,qword ptr [0x0022ff50]
MOV RDI,RBX
CALL 0x0011c1c0
|
/* minja::Value::at(minja::Value const&) */
long __thiscall minja::Value::at(Value *this,Value *param_1)
{
long *plVar1;
int iVar2;
long lVar3;
runtime_error *prVar4;
ulong uVar5;
ulong uVar6;
int1 auStack_58 [32];
string local_38 [32];
if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) &&
(*(long *)(param_1 + 0x30) == 0)) {
plVar1 = *(long **)(this + 0x10);
if (plVar1 == (long *)0x0) {
if (*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(this + 0x20) !=
(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)0x0) {
lVar3 = nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::at(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(this + 0x20),(basic_json *)(param_1 + 0x40));
return lVar3;
}
}
else {
iVar2 = get<int>(param_1);
uVar6 = (ulong)iVar2;
uVar5 = (plVar1[1] - *plVar1 >> 4) * -0x3333333333333333;
if (uVar6 <= uVar5 && uVar5 - uVar6 != 0) {
return *plVar1 + uVar6 * 0x50;
}
std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)");
}
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00196f05 to 00196f16 has its CatchHandler @ 00196f57 */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 00196f17 to 00196f2a has its CatchHandler @ 00196f55 */
std::operator+((char *)local_38,(string *)"Value is not an array or object: ");
/* try { // try from 00196f2e to 00196f52 has its CatchHandler @ 00196f53 */
std::runtime_error::runtime_error(prVar4,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50);
}
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00196e9a to 00196eab has its CatchHandler @ 00196fb9 */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 00196eac to 00196ebf has its CatchHandler @ 00196f99 */
std::operator+((char *)local_38,(string *)"Unashable type: ");
/* try { // try from 00196ec3 to 00196ee7 has its CatchHandler @ 00196f59 */
std::runtime_error::runtime_error(prVar4,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50);
}
| |
28,024 | bool httplib::detail::redirect<httplib::ClientImpl>(httplib::ClientImpl&, httplib::Request&, httplib::Response&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, httplib::Error&) | hkr04[P]cpp-mcp/common/httplib.h | inline bool redirect(T &cli, Request &req, Response &res,
const std::string &path, const std::string &location,
Error &error) {
Request new_req = req;
new_req.path = path;
new_req.redirect_count_ -= 1;
if (res.status == StatusCode::SeeOther_303 &&
(req.method != "GET" && req.method != "HEAD")) {
new_req.method = "GET";
new_req.body.clear();
new_req.headers.clear();
}
Response new_res;
auto ret = cli.send(new_req, new_res, error);
if (ret) {
req = new_req;
res = new_res;
if (res.location.empty()) { res.location = location; }
}
return ret;
} | O2 | c | bool httplib::detail::redirect<httplib::ClientImpl>(httplib::ClientImpl&, httplib::Request&, httplib::Response&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, httplib::Error&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp # imm = 0x418
movq %r9, %r12
movq %r8, %rbx
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
leaq 0x158(%rsp), %rdi
callq 0x15e8c
leaq 0x178(%rsp), %rdi
movq %rbp, %rsi
callq 0x8320
decq 0x3d0(%rsp)
cmpl $0x12f, 0x20(%r14) # imm = 0x12F
jne 0x298cd
leaq 0x110e8(%rip), %rsi # 0x3a969
movq %r15, %rdi
callq 0x16659
testb %al, %al
je 0x298cd
leaq 0x106a1(%rip), %rsi # 0x39f35
movq %r15, %rdi
callq 0x16659
testb %al, %al
je 0x298cd
leaq 0x110c2(%rip), %rsi # 0x3a969
leaq 0x158(%rsp), %rdi
callq 0x8a70
leaq 0x1c8(%rsp), %rdi
andq $0x0, 0x40(%rdi)
movq 0x38(%rdi), %rax
movb $0x0, (%rax)
callq 0x13850
leaq 0x18(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %eax, %eax
movb %al, (%rcx)
orl $-0x1, 0x10(%rcx)
leaq 0x40(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x80(%rsp), %rcx
movq %rcx, -0x30(%rcx)
movq $0x1, -0x28(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rcx)
movl $0x3f800000, -0x10(%rcx) # imm = 0x3F800000
movups %xmm0, -0x8(%rcx)
leaq 0x98(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xb8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x128(%rsp), %rcx
movups %xmm0, -0x60(%rcx)
movups %xmm0, -0x50(%rcx)
movups %xmm0, -0x40(%rcx)
movups %xmm0, -0x30(%rcx)
movups %xmm0, -0x26(%rcx)
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x148(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x158(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r13, %rdi
movq %r12, %rcx
callq 0x14b3c
movl %eax, %ebp
testb %al, %al
je 0x299d0
leaq 0x158(%rsp), %rsi
movq %r15, %rdi
callq 0x164b0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x29c96
cmpq $0x0, 0xa8(%r14)
jne 0x299d0
addq $0xa0, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8320
leaq 0x8(%rsp), %rdi
callq 0x29d58
leaq 0x158(%rsp), %rdi
callq 0x14408
movl %ebp, %eax
addq $0x418, %rsp # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x29a0d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x29d58
leaq 0x158(%rsp), %rdi
callq 0x14408
movq %rbx, %rdi
callq 0x89c0
| _ZN7httplib6detail8redirectINS_10ClientImplEEEbRT_RNS_7RequestERNS_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESG_RNS_5ErrorE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 418h
mov r12, r9
mov rbx, r8
mov rbp, rcx
mov r14, rdx
mov r15, rsi
mov r13, rdi
lea rdi, [rsp+448h+var_2F0]; this
call _ZN7httplib7RequestC2ERKS0_; httplib::Request::Request(httplib::Request const&)
lea rdi, [rsp+448h+var_2D0]
mov rsi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
dec [rsp+448h+var_78]
cmp dword ptr [r14+20h], 12Fh
jnz short loc_298CD
lea rsi, aGet; "GET"
mov rdi, r15
call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator!=<char>(std::string const&,char const*)
test al, al
jz short loc_298CD
lea rsi, aHead; "HEAD"
mov rdi, r15
call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator!=<char>(std::string const&,char const*)
test al, al
jz short loc_298CD
lea rsi, aGet; "GET"
lea rdi, [rsp+448h+var_2F0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
lea rdi, [rsp+448h+var_280]
and qword ptr [rdi+40h], 0
mov rax, [rdi+38h]
mov byte ptr [rax], 0
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE5clearEv; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::clear(void)
loc_298CD:
lea rcx, [rsp+448h+var_430]
mov [rcx-10h], rcx
and qword ptr [rcx-8], 0
xor eax, eax
mov [rcx], al
or dword ptr [rcx+10h], 0FFFFFFFFh
lea rcx, [rsp+448h+var_408]
mov [rcx-10h], rcx
and qword ptr [rcx-8], 0
mov [rcx], al
lea rcx, [rsp+448h+var_3C8]
mov [rcx-30h], rcx
mov qword ptr [rcx-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rcx-20h], xmm0
mov dword ptr [rcx-10h], 3F800000h
movups xmmword ptr [rcx-8], xmm0
lea rcx, [rsp+448h+var_3B0]
mov [rcx-10h], rcx
and qword ptr [rcx-8], 0
mov [rcx], al
lea rcx, [rsp+448h+var_390]
mov [rcx-10h], rcx
and qword ptr [rcx-8], 0
mov [rcx], al
lea rcx, [rsp+448h+var_320]
movups xmmword ptr [rcx-60h], xmm0
movups xmmword ptr [rcx-50h], xmm0
movups xmmword ptr [rcx-40h], xmm0
movups xmmword ptr [rcx-30h], xmm0
movups xmmword ptr [rcx-26h], xmm0
mov [rcx-10h], rcx
and qword ptr [rcx-8], 0
mov [rcx], al
lea rcx, [rsp+448h+var_300]
mov [rcx-10h], rcx
and qword ptr [rcx-8], 0
mov [rcx], al
lea rsi, [rsp+448h+var_2F0]
lea rdx, [rsp+448h+var_440]
mov rdi, r13
mov rcx, r12
call _ZN7httplib10ClientImpl4sendERNS_7RequestERNS_8ResponseERNS_5ErrorE; httplib::ClientImpl::send(httplib::Request &,httplib::Response &,httplib::Error &)
mov ebp, eax
test al, al
jz short loc_299D0
lea rsi, [rsp+448h+var_2F0]
mov rdi, r15
call _ZN7httplib7RequestaSERKS0_; httplib::Request::operator=(httplib::Request const&)
lea rsi, [rsp+448h+var_440]
mov rdi, r14
call _ZN7httplib8ResponseaSERKS0_; httplib::Response::operator=(httplib::Response const&)
cmp qword ptr [r14+0A8h], 0
jnz short loc_299D0
add r14, 0A0h
mov rdi, r14
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_299D0:
lea rdi, [rsp+448h+var_440]; this
call _ZN7httplib8ResponseD2Ev; httplib::Response::~Response()
lea rdi, [rsp+448h+var_2F0]; this
call _ZN7httplib7RequestD2Ev; httplib::Request::~Request()
mov eax, ebp
add rsp, 418h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
jmp short loc_29A0D
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN7httplib8ResponseD2Ev; httplib::Response::~Response()
loc_29A0D:
lea rdi, [rsp+arg_150]; this
call _ZN7httplib7RequestD2Ev; httplib::Request::~Request()
mov rdi, rbx
call __Unwind_Resume
| long long httplib::detail::redirect<httplib::ClientImpl>(
long long a1,
const httplib::Request *a2,
long long a3,
long long a4,
long long a5,
long long a6)
{
unsigned int v10; // ebp
_QWORD v12[2]; // [rsp+8h] [rbp-440h] BYREF
char v13; // [rsp+18h] [rbp-430h] BYREF
int v14; // [rsp+28h] [rbp-420h]
char *v15; // [rsp+30h] [rbp-418h]
long long v16; // [rsp+38h] [rbp-410h]
char v17; // [rsp+40h] [rbp-408h] BYREF
char *v18; // [rsp+50h] [rbp-3F8h]
long long v19; // [rsp+58h] [rbp-3F0h]
__int128 v20; // [rsp+60h] [rbp-3E8h]
int v21; // [rsp+70h] [rbp-3D8h]
__int128 v22; // [rsp+78h] [rbp-3D0h] BYREF
char *v23; // [rsp+88h] [rbp-3C0h]
long long v24; // [rsp+90h] [rbp-3B8h]
char v25; // [rsp+98h] [rbp-3B0h] BYREF
char *v26; // [rsp+A8h] [rbp-3A0h]
long long v27; // [rsp+B0h] [rbp-398h]
char v28; // [rsp+B8h] [rbp-390h] BYREF
__int128 v29; // [rsp+C8h] [rbp-380h]
__int128 v30; // [rsp+D8h] [rbp-370h]
__int128 v31; // [rsp+E8h] [rbp-360h]
_BYTE v32[26]; // [rsp+F8h] [rbp-350h] BYREF
char *v33; // [rsp+118h] [rbp-330h]
long long v34; // [rsp+120h] [rbp-328h]
char v35; // [rsp+128h] [rbp-320h] BYREF
char *v36; // [rsp+138h] [rbp-310h]
long long v37; // [rsp+140h] [rbp-308h]
char v38; // [rsp+148h] [rbp-300h] BYREF
_BYTE v39[32]; // [rsp+158h] [rbp-2F0h] BYREF
_BYTE v40[80]; // [rsp+178h] [rbp-2D0h] BYREF
_QWORD v41[65]; // [rsp+1C8h] [rbp-280h] BYREF
long long v42; // [rsp+3D0h] [rbp-78h]
httplib::Request::Request((httplib::Request *)v39, a2);
std::string::_M_assign(v40, a4);
--v42;
if ( *(_DWORD *)(a3 + 32) == 303 && std::operator!=<char>((long long)a2) && std::operator!=<char>((long long)a2) )
{
std::string::assign(v39, "GET");
v41[8] = 0LL;
*(_BYTE *)v41[7] = 0;
std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::clear(v41);
}
v12[0] = &v13;
v12[1] = 0LL;
v13 = 0;
v14 = -1;
v15 = &v17;
v16 = 0LL;
v17 = 0;
v18 = (char *)&v22 + 8;
v19 = 1LL;
v20 = 0LL;
v21 = 1065353216;
v22 = 0LL;
v23 = &v25;
v24 = 0LL;
v25 = 0;
v26 = &v28;
v27 = 0LL;
v28 = 0;
v29 = 0LL;
v30 = 0LL;
v31 = 0LL;
memset(v32, 0, sizeof(v32));
v33 = &v35;
v34 = 0LL;
v35 = 0;
v36 = &v38;
v37 = 0LL;
v38 = 0;
v10 = httplib::ClientImpl::send(a1, v39, v12, a6);
if ( (_BYTE)v10 )
{
httplib::Request::operator=((long long)a2, (long long)v39);
httplib::Response::operator=(a3, v12);
if ( !*(_QWORD *)(a3 + 168) )
std::string::_M_assign(a3 + 160, a5);
}
httplib::Response::~Response((httplib::Response *)v12);
httplib::Request::~Request((httplib::Request *)v39);
return v10;
}
| redirect<httplib::ClientImpl>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x418
MOV R12,R9
MOV RBX,R8
MOV RBP,RCX
MOV R14,RDX
MOV R15,RSI
MOV R13,RDI
LEA RDI,[RSP + 0x158]
CALL 0x00115e8c
LEA RDI,[RSP + 0x178]
LAB_00129860:
MOV RSI,RBP
CALL 0x00108320
DEC qword ptr [RSP + 0x3d0]
CMP dword ptr [R14 + 0x20],0x12f
JNZ 0x001298cd
LEA RSI,[0x13a969]
MOV RDI,R15
CALL 0x00116659
TEST AL,AL
JZ 0x001298cd
LEA RSI,[0x139f35]
MOV RDI,R15
CALL 0x00116659
TEST AL,AL
JZ 0x001298cd
LEA RSI,[0x13a969]
LEA RDI,[RSP + 0x158]
CALL 0x00108a70
LEA RDI,[RSP + 0x1c8]
AND qword ptr [RDI + 0x40],0x0
MOV RAX,qword ptr [RDI + 0x38]
MOV byte ptr [RAX],0x0
CALL 0x00113850
LAB_001298cd:
LEA RCX,[RSP + 0x18]
MOV qword ptr [RCX + -0x10],RCX
AND qword ptr [RCX + -0x8],0x0
XOR EAX,EAX
MOV byte ptr [RCX],AL
OR dword ptr [RCX + 0x10],0xffffffff
LEA RCX,[RSP + 0x40]
MOV qword ptr [RCX + -0x10],RCX
AND qword ptr [RCX + -0x8],0x0
MOV byte ptr [RCX],AL
LEA RCX,[RSP + 0x80]
MOV qword ptr [RCX + -0x30],RCX
MOV qword ptr [RCX + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RCX + -0x20],XMM0
MOV dword ptr [RCX + -0x10],0x3f800000
MOVUPS xmmword ptr [RCX + -0x8],XMM0
LEA RCX,[RSP + 0x98]
MOV qword ptr [RCX + -0x10],RCX
AND qword ptr [RCX + -0x8],0x0
MOV byte ptr [RCX],AL
LEA RCX,[RSP + 0xb8]
MOV qword ptr [RCX + -0x10],RCX
AND qword ptr [RCX + -0x8],0x0
MOV byte ptr [RCX],AL
LEA RCX,[RSP + 0x128]
MOVUPS xmmword ptr [RCX + -0x60],XMM0
MOVUPS xmmword ptr [RCX + -0x50],XMM0
MOVUPS xmmword ptr [RCX + -0x40],XMM0
MOVUPS xmmword ptr [RCX + -0x30],XMM0
MOVUPS xmmword ptr [RCX + -0x26],XMM0
MOV qword ptr [RCX + -0x10],RCX
AND qword ptr [RCX + -0x8],0x0
MOV byte ptr [RCX],AL
LEA RCX,[RSP + 0x148]
MOV qword ptr [RCX + -0x10],RCX
AND qword ptr [RCX + -0x8],0x0
MOV byte ptr [RCX],AL
LAB_00129979:
LEA RSI,[RSP + 0x158]
LEA RDX,[RSP + 0x8]
MOV RDI,R13
MOV RCX,R12
CALL 0x00114b3c
MOV EBP,EAX
TEST AL,AL
JZ 0x001299d0
LEA RSI,[RSP + 0x158]
MOV RDI,R15
CALL 0x001164b0
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00129c96
CMP qword ptr [R14 + 0xa8],0x0
JNZ 0x001299d0
ADD R14,0xa0
MOV RDI,R14
MOV RSI,RBX
CALL 0x00108320
LAB_001299d0:
LEA RDI,[RSP + 0x8]
CALL 0x00129d58
LEA RDI,[RSP + 0x158]
CALL 0x00114408
MOV EAX,EBP
ADD RSP,0x418
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* bool httplib::detail::redirect<httplib::ClientImpl>(httplib::ClientImpl&, httplib::Request&,
httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&, httplib::Error&) */
bool httplib::detail::redirect<httplib::ClientImpl>
(ClientImpl *param_1,Request *param_2,Response *param_3,string *param_4,
string *param_5,Error *param_6)
{
bool bVar1;
char cVar2;
int1 *local_440;
int8 local_438;
int1 local_430 [16];
int4 local_420;
int1 *local_418;
int8 local_410;
int1 local_408 [16];
int8 *local_3f8;
int8 local_3f0;
int8 local_3e8;
int8 uStack_3e0;
int4 local_3d8;
int8 local_3d0;
int8 uStack_3c8;
int1 *local_3c0;
int8 local_3b8;
int1 local_3b0 [16];
int1 *local_3a0;
int8 local_398;
int1 local_390 [16];
int8 local_380;
int8 uStack_378;
int8 local_370;
int8 uStack_368;
int8 local_360;
int8 uStack_358;
int8 local_350;
int2 uStack_348;
int6 uStack_346;
int2 uStack_340;
int8 uStack_33e;
int1 *local_330;
int8 local_328;
int1 local_320 [16];
int1 *local_310;
int8 local_308;
int1 local_300 [16];
Request local_2f0 [32];
string local_2d0 [80];
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
local_280 [56];
int1 *local_248;
int8 local_240;
long local_78;
Request::Request(local_2f0,param_2);
/* try { // try from 00129860 to 001298b3 has its CatchHandler @ 001299fb */
std::__cxx11::string::_M_assign(local_2d0);
local_78 = local_78 + -1;
if (*(int *)(param_3 + 0x20) == 0x12f) {
bVar1 = std::operator!=((string *)param_2,"GET");
if (bVar1) {
bVar1 = std::operator!=((string *)param_2,"HEAD");
if (bVar1) {
std::__cxx11::string::assign((char *)local_2f0);
local_240 = 0;
*local_248 = 0;
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
::clear(local_280);
}
}
}
local_440 = local_430;
local_438 = 0;
local_430[0] = 0;
local_420 = 0xffffffff;
local_418 = local_408;
local_410 = 0;
local_408[0] = 0;
local_3f8 = &uStack_3c8;
local_3f0 = 1;
local_3e8 = 0;
uStack_3e0 = 0;
local_3d8 = 0x3f800000;
local_3d0 = 0;
uStack_3c8 = 0;
local_3c0 = local_3b0;
local_3b8 = 0;
local_3b0[0] = 0;
local_3a0 = local_390;
local_398 = 0;
local_390[0] = 0;
local_330 = local_320;
local_380 = 0;
uStack_378 = 0;
local_370 = 0;
uStack_368 = 0;
local_360 = 0;
uStack_358 = 0;
local_350 = 0;
uStack_348 = 0;
uStack_346 = 0;
uStack_340 = 0;
uStack_33e = 0;
local_328 = 0;
local_320[0] = 0;
local_310 = local_300;
local_308 = 0;
local_300[0] = 0;
/* try { // try from 00129979 to 001299cf has its CatchHandler @ 00129a00 */
cVar2 = ClientImpl::send(param_1,local_2f0,(Response *)&local_440,param_6);
if (cVar2 != '\0') {
Request::operator=(param_2,local_2f0);
Response::operator=(param_3,(Response *)&local_440);
if (*(long *)(param_3 + 0xa8) == 0) {
std::__cxx11::string::_M_assign((string *)(param_3 + 0xa0));
}
}
Response::~Response((Response *)&local_440);
Request::~Request(local_2f0);
return (bool)cVar2;
}
| |
28,025 | emit_source_loc | bluesky950520[P]quickjs/quickjs.c | static void emit_source_loc(JSParseState *s)
{
JSFunctionDef *fd = s->cur_func;
DynBuf *bc = &fd->byte_code;
dbuf_putc(bc, OP_source_loc);
dbuf_put_u32(bc, s->last_line_num);
dbuf_put_u32(bc, s->last_col_num);
} | O1 | c | emit_source_loc:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x138, %r14d # imm = 0x138
addq 0x90(%rdi), %r14
movq %r14, %rdi
movl $0xc4, %esi
callq 0x1b4d0
movl 0x8(%rbx), %eax
movq %rsp, %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq %r14, %rdi
callq 0x1b422
movl 0xc(%rbx), %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq %r14, %rdi
callq 0x1b422
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| emit_source_loc:
push r14
push rbx
push rax
mov rbx, rdi
mov r14d, 138h
add r14, [rdi+90h]
mov rdi, r14
mov esi, 0C4h
call dbuf_putc
mov eax, [rbx+8]
mov rsi, rsp
mov [rsi], eax
mov edx, 4
mov rdi, r14
call dbuf_put
mov eax, [rbx+0Ch]
lea rsi, [rsp+18h+var_14]
mov [rsi], eax
mov edx, 4
mov rdi, r14
call dbuf_put
add rsp, 8
pop rbx
pop r14
retn
| long long emit_source_loc(long long a1)
{
long long v1; // rax
_QWORD *v2; // r14
_QWORD v4[3]; // [rsp-4h] [rbp-18h] BYREF
v4[0] = v1;
v2 = (_QWORD *)(*(_QWORD *)(a1 + 144) + 312LL);
dbuf_putc(v2, 196);
LODWORD(v4[0]) = *(_DWORD *)(a1 + 8);
dbuf_put(v2, (long long)v4, 4LL);
HIDWORD(v4[0]) = *(_DWORD *)(a1 + 12);
return dbuf_put(v2, (long long)v4 + 4, 4LL);
}
| emit_source_loc:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14D,0x138
ADD R14,qword ptr [RDI + 0x90]
MOV RDI,R14
MOV ESI,0xc4
CALL 0x0011b4d0
MOV EAX,dword ptr [RBX + 0x8]
MOV RSI,RSP
MOV dword ptr [RSI],EAX
MOV EDX,0x4
MOV RDI,R14
CALL 0x0011b422
MOV EAX,dword ptr [RBX + 0xc]
LEA RSI,[RSP + 0x4]
MOV dword ptr [RSI],EAX
MOV EDX,0x4
MOV RDI,R14
CALL 0x0011b422
ADD RSP,0x8
POP RBX
POP R14
RET
|
void emit_source_loc(long param_1)
{
int8 in_RAX;
long lVar1;
int4 local_18;
int4 local_14;
local_14 = (int4)((ulong)in_RAX >> 0x20);
lVar1 = *(long *)(param_1 + 0x90) + 0x138;
dbuf_putc(lVar1,0xc4);
_local_18 = CONCAT44(local_14,*(int4 *)(param_1 + 8));
dbuf_put(lVar1,&local_18,4);
_local_18 = CONCAT44(*(int4 *)(param_1 + 0xc),local_18);
dbuf_put(lVar1,&local_14,4);
return;
}
| |
28,026 | ma_ck_write_btree_with_log | eloqsql/storage/maria/ma_write.c | static my_bool _ma_ck_write_btree_with_log(MARIA_HA *info, MARIA_KEY *key,
my_off_t *root, uint32 comp_flag)
{
MARIA_SHARE *share= info->s;
LSN lsn= LSN_IMPOSSIBLE;
int error;
my_off_t new_root= *root;
uchar key_buff[MARIA_MAX_KEY_BUFF];
MARIA_KEY org_key; /* Set/used when now_transactional=TRUE */
my_bool transactional= share->now_transactional;
DBUG_ENTER("_ma_ck_write_btree_with_log");
LINT_INIT_STRUCT(org_key);
if (transactional)
{
/* Save original value as the key may change */
org_key= *key;
memcpy(key_buff, key->data, key->data_length + key->ref_length);
}
error= _ma_ck_real_write_btree(info, key, &new_root, comp_flag);
if (!error && transactional)
{
/* Log the original value */
*key= org_key;
key->data= key_buff;
error= _ma_write_undo_key_insert(info, key, root, new_root, &lsn);
}
else
{
*root= new_root;
_ma_fast_unlock_key_del(info);
}
_ma_unpin_all_pages_and_finalize_row(info, lsn);
DBUG_RETURN(error != 0);
} | O0 | c | ma_ck_write_btree_with_log:
pushq %rbp
movq %rsp, %rbp
subq $0xa50, %rsp # imm = 0xA50
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x9e8(%rbp)
movq %rsi, -0x9f0(%rbp)
movq %rdx, -0x9f8(%rbp)
movl %ecx, -0x9fc(%rbp)
movq -0x9e8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa08(%rbp)
movq $0x0, -0xa10(%rbp)
movq -0x9f8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa20(%rbp)
movq -0xa08(%rbp), %rax
movb 0x7e7(%rax), %al
movb %al, -0xa41(%rbp)
cmpb $0x0, -0xa41(%rbp)
je 0x87cac
movq -0x9f0(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0xa40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xa38(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0xa30(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0xa28(%rbp)
leaq -0x9e0(%rbp), %rdi
movq -0x9f0(%rbp), %rax
movq (%rax), %rsi
movq -0x9f0(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x9f0(%rbp), %rcx
addl 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x2a0b0
movq -0x9e8(%rbp), %rdi
movq -0x9f0(%rbp), %rsi
movl -0x9fc(%rbp), %ecx
leaq -0xa20(%rbp), %rdx
callq 0x83aa0
movsbl %al, %eax
movl %eax, -0xa14(%rbp)
cmpl $0x0, -0xa14(%rbp)
jne 0x87d5d
movsbl -0xa41(%rbp), %eax
cmpl $0x0, %eax
je 0x87d5d
movq -0x9f0(%rbp), %rax
movq -0xa40(%rbp), %rcx
movq %rcx, (%rax)
movq -0xa38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xa30(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0xa28(%rbp), %rcx
movq %rcx, 0x18(%rax)
leaq -0x9e0(%rbp), %rcx
movq -0x9f0(%rbp), %rax
movq %rcx, (%rax)
movq -0x9e8(%rbp), %rdi
movq -0x9f0(%rbp), %rsi
movq -0x9f8(%rbp), %rdx
movq -0xa20(%rbp), %rcx
leaq -0xa10(%rbp), %r8
callq 0x87690
movl %eax, -0xa14(%rbp)
jmp 0x87d7a
movq -0xa20(%rbp), %rcx
movq -0x9f8(%rbp), %rax
movq %rcx, (%rax)
movq -0x9e8(%rbp), %rdi
callq 0x87dd0
movq -0x9e8(%rbp), %rdi
movq -0xa10(%rbp), %rsi
callq 0x87e00
cmpl $0x0, -0xa14(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0xa42(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x87dc3
movb -0xa42(%rbp), %al
addq $0xa50, %rsp # imm = 0xA50
popq %rbp
retq
callq 0x2a270
nopl (%rax,%rax)
| _ma_ck_write_btree_with_log:
push rbp
mov rbp, rsp
sub rsp, 0A50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_9E8], rdi
mov [rbp+var_9F0], rsi
mov [rbp+var_9F8], rdx
mov [rbp+var_9FC], ecx
mov rax, [rbp+var_9E8]
mov rax, [rax]
mov [rbp+var_A08], rax
mov [rbp+var_A10], 0
mov rax, [rbp+var_9F8]
mov rax, [rax]
mov [rbp+var_A20], rax
mov rax, [rbp+var_A08]
mov al, [rax+7E7h]
mov [rbp+var_A41], al
cmp [rbp+var_A41], 0
jz short loc_87CAC
mov rax, [rbp+var_9F0]
mov rcx, [rax]
mov [rbp+var_A40], rcx
mov rcx, [rax+8]
mov [rbp+var_A38], rcx
mov rcx, [rax+10h]
mov [rbp+var_A30], rcx
mov rax, [rax+18h]
mov [rbp+var_A28], rax
lea rdi, [rbp+var_9E0]
mov rax, [rbp+var_9F0]
mov rsi, [rax]
mov rax, [rbp+var_9F0]
mov eax, [rax+10h]
mov rcx, [rbp+var_9F0]
add eax, [rcx+14h]
mov eax, eax
mov edx, eax
call _memcpy
loc_87CAC:
mov rdi, [rbp+var_9E8]
mov rsi, [rbp+var_9F0]
mov ecx, [rbp+var_9FC]
lea rdx, [rbp+var_A20]
call _ma_ck_real_write_btree
movsx eax, al
mov [rbp+var_A14], eax
cmp [rbp+var_A14], 0
jnz short loc_87D5D
movsx eax, [rbp+var_A41]
cmp eax, 0
jz short loc_87D5D
mov rax, [rbp+var_9F0]
mov rcx, [rbp+var_A40]
mov [rax], rcx
mov rcx, [rbp+var_A38]
mov [rax+8], rcx
mov rcx, [rbp+var_A30]
mov [rax+10h], rcx
mov rcx, [rbp+var_A28]
mov [rax+18h], rcx
lea rcx, [rbp+var_9E0]
mov rax, [rbp+var_9F0]
mov [rax], rcx
mov rdi, [rbp+var_9E8]
mov rsi, [rbp+var_9F0]
mov rdx, [rbp+var_9F8]
mov rcx, [rbp+var_A20]
lea r8, [rbp+var_A10]
call _ma_write_undo_key_insert
mov [rbp+var_A14], eax
jmp short loc_87D7A
loc_87D5D:
mov rcx, [rbp+var_A20]
mov rax, [rbp+var_9F8]
mov [rax], rcx
mov rdi, [rbp+var_9E8]
call _ma_fast_unlock_key_del_0
loc_87D7A:
mov rdi, [rbp+var_9E8]
mov rsi, [rbp+var_A10]
call _ma_unpin_all_pages_and_finalize_row_1
cmp [rbp+var_A14], 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_A42], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_87DC3
mov al, [rbp+var_A42]
add rsp, 0A50h
pop rbp
retn
loc_87DC3:
call ___stack_chk_fail
| bool ma_ck_write_btree_with_log(long long *a1, float **a2, long long *a3, int a4)
{
bool v4; // al
float **v5; // rax
char v7; // [rsp+Fh] [rbp-A41h]
float *v8; // [rsp+10h] [rbp-A40h]
float *v9; // [rsp+18h] [rbp-A38h]
float *v10; // [rsp+20h] [rbp-A30h]
float *v11; // [rsp+28h] [rbp-A28h]
long long v12; // [rsp+30h] [rbp-A20h] BYREF
int v13; // [rsp+3Ch] [rbp-A14h]
long long v14; // [rsp+40h] [rbp-A10h] BYREF
long long v15; // [rsp+48h] [rbp-A08h]
int v16; // [rsp+54h] [rbp-9FCh]
long long *v17; // [rsp+58h] [rbp-9F8h]
float **v18; // [rsp+60h] [rbp-9F0h]
long long *v19; // [rsp+68h] [rbp-9E8h]
_BYTE v20[2520]; // [rsp+70h] [rbp-9E0h] BYREF
unsigned long long v21; // [rsp+A48h] [rbp-8h]
v21 = __readfsqword(0x28u);
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15 = *a1;
v14 = 0LL;
v12 = *a3;
v7 = *(_BYTE *)(v15 + 2023);
if ( v7 )
{
v8 = *v18;
v9 = v18[1];
v10 = v18[2];
v11 = v18[3];
memcpy(v20, *v18, (unsigned int)(*((_DWORD *)v18 + 5) + *((_DWORD *)v18 + 4)));
}
v4 = ma_ck_real_write_btree((long long)v19, (long long)v18, &v12, v16);
v13 = v4;
if ( v4 || !v7 )
{
*v17 = v12;
ma_fast_unlock_key_del_0(v19);
}
else
{
v5 = v18;
*v18 = v8;
v5[1] = v9;
v5[2] = v10;
v5[3] = v11;
*v18 = (float *)v20;
v13 = ma_write_undo_key_insert(v19, v18, (long long)v17, v12, (long long)&v14);
}
ma_unpin_all_pages_and_finalize_row_1(v19, v14);
return v13 != 0;
}
| _ma_ck_write_btree_with_log:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x9e8],RDI
MOV qword ptr [RBP + -0x9f0],RSI
MOV qword ptr [RBP + -0x9f8],RDX
MOV dword ptr [RBP + -0x9fc],ECX
MOV RAX,qword ptr [RBP + -0x9e8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xa08],RAX
MOV qword ptr [RBP + -0xa10],0x0
MOV RAX,qword ptr [RBP + -0x9f8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xa20],RAX
MOV RAX,qword ptr [RBP + -0xa08]
MOV AL,byte ptr [RAX + 0x7e7]
MOV byte ptr [RBP + -0xa41],AL
CMP byte ptr [RBP + -0xa41],0x0
JZ 0x00187cac
MOV RAX,qword ptr [RBP + -0x9f0]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0xa40],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0xa38],RCX
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0xa30],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0xa28],RAX
LEA RDI,[RBP + -0x9e0]
MOV RAX,qword ptr [RBP + -0x9f0]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x9f0]
MOV EAX,dword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x9f0]
ADD EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
CALL 0x0012a0b0
LAB_00187cac:
MOV RDI,qword ptr [RBP + -0x9e8]
MOV RSI,qword ptr [RBP + -0x9f0]
MOV ECX,dword ptr [RBP + -0x9fc]
LEA RDX,[RBP + -0xa20]
CALL 0x00183aa0
MOVSX EAX,AL
MOV dword ptr [RBP + -0xa14],EAX
CMP dword ptr [RBP + -0xa14],0x0
JNZ 0x00187d5d
MOVSX EAX,byte ptr [RBP + -0xa41]
CMP EAX,0x0
JZ 0x00187d5d
MOV RAX,qword ptr [RBP + -0x9f0]
MOV RCX,qword ptr [RBP + -0xa40]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0xa38]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0xa30]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0xa28]
MOV qword ptr [RAX + 0x18],RCX
LEA RCX,[RBP + -0x9e0]
MOV RAX,qword ptr [RBP + -0x9f0]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x9e8]
MOV RSI,qword ptr [RBP + -0x9f0]
MOV RDX,qword ptr [RBP + -0x9f8]
MOV RCX,qword ptr [RBP + -0xa20]
LEA R8,[RBP + -0xa10]
CALL 0x00187690
MOV dword ptr [RBP + -0xa14],EAX
JMP 0x00187d7a
LAB_00187d5d:
MOV RCX,qword ptr [RBP + -0xa20]
MOV RAX,qword ptr [RBP + -0x9f8]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x9e8]
CALL 0x00187dd0
LAB_00187d7a:
MOV RDI,qword ptr [RBP + -0x9e8]
MOV RSI,qword ptr [RBP + -0xa10]
CALL 0x00187e00
CMP dword ptr [RBP + -0xa14],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0xa42],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00187dc3
MOV AL,byte ptr [RBP + -0xa42]
ADD RSP,0xa50
POP RBP
RET
LAB_00187dc3:
CALL 0x0012a270
|
int8
_ma_ck_write_btree_with_log(long *param_1,long *param_2,int8 *param_3,int4 param_4)
{
char cVar1;
char cVar2;
long in_FS_OFFSET;
long local_a48;
long local_a40;
long local_a38;
long local_a30;
int8 local_a28;
int local_a1c;
int8 local_a18;
long local_a10;
int4 local_a04;
int8 *local_a00;
long *local_9f8;
long *local_9f0;
int1 local_9e8 [2520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_a10 = *param_1;
local_a18 = 0;
local_a28 = *param_3;
cVar1 = *(char *)(local_a10 + 0x7e7);
local_a04 = param_4;
local_a00 = param_3;
local_9f8 = param_2;
local_9f0 = param_1;
if (cVar1 != '\0') {
local_a48 = *param_2;
local_a40 = param_2[1];
local_a38 = param_2[2];
local_a30 = param_2[3];
memcpy(local_9e8,(void *)*param_2,
(ulong)(uint)((int)param_2[2] + *(int *)((long)param_2 + 0x14)));
}
cVar2 = _ma_ck_real_write_btree(local_9f0,local_9f8,&local_a28,local_a04);
local_a1c = (int)cVar2;
if ((local_a1c == 0) && (cVar1 != '\0')) {
*local_9f8 = local_a48;
local_9f8[1] = local_a40;
local_9f8[2] = local_a38;
local_9f8[3] = local_a30;
*local_9f8 = (long)local_9e8;
local_a1c = _ma_write_undo_key_insert(local_9f0,local_9f8,local_a00,local_a28,&local_a18);
}
else {
*local_a00 = local_a28;
_ma_fast_unlock_key_del(local_9f0);
}
_ma_unpin_all_pages_and_finalize_row(local_9f0,local_a18);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_a1c != 0);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
28,027 | unpack_fields | eloqsql/libmariadb/libmariadb/mariadb_lib.c | MYSQL_FIELD *
unpack_fields(const MYSQL *mysql,
MYSQL_DATA *data, MA_MEM_ROOT *alloc, uint fields,
my_bool default_value)
{
MYSQL_ROWS *row;
MYSQL_FIELD *field,*result;
char *p;
unsigned int i, field_count= sizeof(rset_field_offsets)/sizeof(size_t)/2;
field=result=(MYSQL_FIELD*) ma_alloc_root(alloc,sizeof(MYSQL_FIELD)*fields);
if (!result)
return(0);
for (row=data->data; row ; row = row->next,field++)
{
if (field >= result + fields)
goto error;
for (i=0; i < field_count; i++)
{
uint length= (uint)(row->data[i+1] - row->data[i] - 1);
if (!row->data[i] && row->data[i][length])
goto error;
*(char **)(((char *)field) + rset_field_offsets[i*2])=
ma_strdup_root(alloc, (char *)row->data[i]);
*(unsigned int *)(((char *)field) + rset_field_offsets[i*2+1])= length;
}
field->extension= NULL;
if (ma_has_extended_type_info(mysql))
{
if (row->data[i+1] - row->data[i] > 1)
{
size_t len= row->data[i+1] - row->data[i] - 1;
MA_FIELD_EXTENSION *ext= new_ma_field_extension(alloc);
if ((field->extension= ext))
ma_field_extension_init_type_info(alloc, ext, row->data[i], len);
}
i++;
}
p= (char *)row->data[i];
/* filler */
field->charsetnr= uint2korr(p);
p+= 2;
field->length= (uint) uint4korr(p);
p+= 4;
field->type= (enum enum_field_types)uint1korr(p);
p++;
field->flags= uint2korr(p);
p+= 2;
field->decimals= (uint) p[0];
p++;
/* filler */
p+= 2;
if (INTERNAL_NUM_FIELD(field))
field->flags|= NUM_FLAG;
i++;
/* This is used by deprecated function mysql_list_fields only,
however the reported length is not correct, so we always zero it */
if (default_value && row->data[i])
field->def=ma_strdup_root(alloc,(char*) row->data[i]);
else
field->def=0;
field->def_length= 0;
field->max_length= 0;
}
if (field < result + fields)
goto error;
free_rows(data); /* Free old data */
return(result);
error:
free_rows(data);
ma_free_root(alloc, MYF(0));
return(0);
} | O3 | c | unpack_fields:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, -0x3c(%rbp)
movq %rsi, %rbx
movq %rdi, -0x68(%rbp)
movl %ecx, %esi
shlq $0x7, %rsi
movq %rdx, %r14
movq %rdx, %rdi
movq %rsi, -0x50(%rbp)
callq 0x1dc7b
testq %rax, %rax
je 0x17bff
movq %rbx, -0x48(%rbp)
movq (%rbx), %rcx
movq %rax, -0x38(%rbp)
movq %rax, %r8
testq %rcx, %rcx
movq %r14, %rdi
je 0x17bd8
movq %rcx, %r13
movq -0x38(%rbp), %r15
movq -0x50(%rbp), %rax
addq %r15, %rax
movq %rax, -0x60(%rbp)
leaq 0x20497(%rip), %r12 # 0x37e70
movq %r15, %r8
movq %rdi, -0x58(%rbp)
cmpq -0x60(%rbp), %r8
jae 0x17be5
xorl %ebx, %ebx
movq %r13, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rbx,%rax), %rsi
movl %esi, %r14d
notl %r14d
addl 0x8(%rbx,%rax), %r14d
movq %rdi, %r15
movq %r8, %r13
callq 0x1de1e
movq %r13, %r8
movq %r15, %rdi
movq (%r12,%rbx,2), %rcx
movq 0x8(%r12,%rbx,2), %rdx
movq %rax, (%r13,%rcx)
movl %r14d, (%r13,%rdx)
addq $0x8, %rbx
cmpq $0x30, %rbx
jne 0x179f0
movq $0x0, 0x78(%r8)
movq -0x68(%rbp), %rax
movq 0x4f0(%rax), %rax
movl $0x6, %r9d
testb $0x8, 0x70(%rax)
movq -0x30(%rbp), %r10
je 0x17b23
movq 0x8(%r10), %rax
movq 0x38(%rax), %rbx
subq 0x30(%rax), %rbx
cmpq $0x2, %rbx
jl 0x17b19
movl $0x20, %esi
callq 0x1dc7b
testq %rax, %rax
je 0x17b0b
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq %r13, %r8
movq %rax, 0x78(%r13)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %rsi
leaq (%rsi,%rbx), %rax
decq %rax
movq %r15, %rdi
movq %rax, -0x70(%rbp)
movzbl 0x1(%rsi), %ebx
testb %bl, %bl
js 0x17b19
leaq (%rsi,%rbx), %r14
addq $0x2, %r14
cmpq %rax, %r14
ja 0x17b19
movzbl (%rsi), %r15d
cmpb $0x1, %r15b
ja 0x17afd
addq $0x2, %rsi
shll $0x4, %r15d
movq -0x58(%rbp), %rdi
movq %rbx, %rdx
callq 0x1de6f
movq %r13, %r8
testq %rax, %rax
cmoveq %rax, %rbx
movq %rax, (%r12,%r15)
movq -0x70(%rbp), %rax
movq %rbx, 0x8(%r12,%r15)
movq %r14, %rsi
cmpq %rax, %r14
movq -0x58(%rbp), %rdi
jb 0x17ab3
jmp 0x17b19
movq %r13, %r8
movq $0x0, 0x78(%r13)
movq %r15, %rdi
movl $0x7, %r9d
movq -0x30(%rbp), %r10
movq 0x8(%r10), %rax
movq (%rax,%r9,8), %rsi
movzwl (%rsi), %eax
movl %eax, 0x6c(%r8)
movl 0x2(%rsi), %ecx
movq %rcx, 0x38(%r8)
movzbl 0x6(%rsi), %edx
movl %edx, 0x70(%r8)
movzwl 0x7(%rsi), %eax
movl %eax, 0x64(%r8)
movsbl 0x9(%rsi), %esi
movl %esi, 0x68(%r8)
cmpl $0x9, %edx
ja 0x17b68
cmpl $0x7, %edx
jne 0x17b75
cmpq $0x8, %rcx
je 0x17b75
cmpl $0xe, %ecx
je 0x17b75
jmp 0x17b7e
cmpl $0xf6, %edx
je 0x17b75
cmpl $0xd, %edx
jne 0x17b7e
orl $0x8000, %eax # imm = 0x8000
movl %eax, 0x64(%r8)
cmpb $0x0, -0x3c(%rbp)
je 0x17ba8
movq 0x8(%r10), %rax
movq 0x8(%rax,%r9,8), %rsi
testq %rsi, %rsi
je 0x17ba8
movq %r10, %r14
movq %rdi, %rbx
callq 0x1de1e
movq %r13, %r8
movq %rbx, %rdi
movq %r14, %r10
jmp 0x17baa
xorl %eax, %eax
movq %rax, 0x30(%r8)
movl $0x0, 0x60(%r8)
movq $0x0, 0x40(%r8)
subq $-0x80, %r8
movq (%r10), %r10
movq %r10, %r13
testq %r10, %r10
leaq 0x2029e(%rip), %r12 # 0x37e70
jne 0x179e0
movq -0x38(%rbp), %rax
addq -0x50(%rbp), %rax
cmpq %rax, %r8
jae 0x17c03
movq %rdi, %r14
movq -0x48(%rbp), %rdi
callq 0x15896
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x1dd93
jmp 0x17c10
xorl %ebx, %ebx
jmp 0x17c10
movq -0x48(%rbp), %rdi
callq 0x15896
movq -0x38(%rbp), %rbx
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| unpack_fields:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_3C], r8d
mov rbx, rsi
mov [rbp+var_68], rdi
mov esi, ecx
shl rsi, 7
mov r14, rdx
mov rdi, rdx
mov [rbp+var_50], rsi
call ma_alloc_root
test rax, rax
jz loc_17BFF
mov [rbp+var_48], rbx
mov rcx, [rbx]
mov [rbp+var_38], rax
mov r8, rax
test rcx, rcx
mov rdi, r14
jz loc_17BD8
mov r13, rcx
mov r15, [rbp+var_38]
mov rax, [rbp+var_50]
add rax, r15
mov [rbp+var_60], rax
lea r12, rset_field_offsets
mov r8, r15
mov [rbp+var_58], rdi
loc_179E0:
cmp r8, [rbp+var_60]
jnb loc_17BE5
xor ebx, ebx
mov [rbp+var_30], r13
loc_179F0:
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov rsi, [rbx+rax]
mov r14d, esi
not r14d
add r14d, [rbx+rax+8]
mov r15, rdi
mov r13, r8
call ma_strdup_root
mov r8, r13
mov rdi, r15
mov rcx, [r12+rbx*2]
mov rdx, [r12+rbx*2+8]
mov [r13+rcx+0], rax
mov [r13+rdx+0], r14d
add rbx, 8
cmp rbx, 30h ; '0'
jnz short loc_179F0
mov qword ptr [r8+78h], 0
mov rax, [rbp+var_68]
mov rax, [rax+4F0h]
mov r9d, 6
test byte ptr [rax+70h], 8
mov r10, [rbp+var_30]
jz loc_17B23
mov rax, [r10+8]
mov rbx, [rax+38h]
sub rbx, [rax+30h]
cmp rbx, 2
jl loc_17B19
mov esi, 20h ; ' '
call ma_alloc_root
test rax, rax
jz loc_17B0B
mov r12, rax
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
movups xmmword ptr [rax], xmm0
mov r8, r13
mov [r13+78h], rax
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov rsi, [rax+30h]
lea rax, [rsi+rbx]
dec rax
mov rdi, r15
mov [rbp+var_70], rax
loc_17AB3:
movzx ebx, byte ptr [rsi+1]
test bl, bl
js short loc_17B19
lea r14, [rsi+rbx]
add r14, 2
cmp r14, rax
ja short loc_17B19
movzx r15d, byte ptr [rsi]
cmp r15b, 1
ja short loc_17AFD
add rsi, 2
shl r15d, 4
mov rdi, [rbp+var_58]
mov rdx, rbx
call ma_memdup_root
mov r8, r13
test rax, rax
cmovz rbx, rax
mov [r12+r15], rax
mov rax, [rbp+var_70]
mov [r12+r15+8], rbx
loc_17AFD:
mov rsi, r14
cmp r14, rax
mov rdi, [rbp+var_58]
jb short loc_17AB3
jmp short loc_17B19
loc_17B0B:
mov r8, r13
mov qword ptr [r13+78h], 0
mov rdi, r15
loc_17B19:
mov r9d, 7
mov r10, [rbp+var_30]
loc_17B23:
mov rax, [r10+8]
mov rsi, [rax+r9*8]
movzx eax, word ptr [rsi]
mov [r8+6Ch], eax
mov ecx, [rsi+2]
mov [r8+38h], rcx
movzx edx, byte ptr [rsi+6]
mov [r8+70h], edx
movzx eax, word ptr [rsi+7]
mov [r8+64h], eax
movsx esi, byte ptr [rsi+9]
mov [r8+68h], esi
cmp edx, 9
ja short loc_17B68
cmp edx, 7
jnz short loc_17B75
cmp rcx, 8
jz short loc_17B75
cmp ecx, 0Eh
jz short loc_17B75
jmp short loc_17B7E
loc_17B68:
cmp edx, 0F6h
jz short loc_17B75
cmp edx, 0Dh
jnz short loc_17B7E
loc_17B75:
or eax, 8000h
mov [r8+64h], eax
loc_17B7E:
cmp byte ptr [rbp+var_3C], 0
jz short loc_17BA8
mov rax, [r10+8]
mov rsi, [rax+r9*8+8]
test rsi, rsi
jz short loc_17BA8
mov r14, r10
mov rbx, rdi
call ma_strdup_root
mov r8, r13
mov rdi, rbx
mov r10, r14
jmp short loc_17BAA
loc_17BA8:
xor eax, eax
loc_17BAA:
mov [r8+30h], rax
mov dword ptr [r8+60h], 0
mov qword ptr [r8+40h], 0
sub r8, 0FFFFFFFFFFFFFF80h
mov r10, [r10]
mov r13, r10
test r10, r10
lea r12, rset_field_offsets
jnz loc_179E0
loc_17BD8:
mov rax, [rbp+var_38]
add rax, [rbp+var_50]
cmp r8, rax
jnb short loc_17C03
loc_17BE5:
mov r14, rdi
mov rdi, [rbp+var_48]
call free_rows
xor ebx, ebx
mov rdi, r14
xor esi, esi
call ma_free_root
jmp short loc_17C10
loc_17BFF:
xor ebx, ebx
jmp short loc_17C10
loc_17C03:
mov rdi, [rbp+var_48]
call free_rows
mov rbx, [rbp+var_38]
loc_17C10:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long unpack_fields(long long a1, _QWORD *a2, long long a3, unsigned int a4, char a5)
{
long long v6; // rax
unsigned long long v7; // r8
long long v8; // rdi
_QWORD *v9; // r13
long long v10; // rbx
unsigned int v11; // r14d
unsigned long long v12; // r13
long long v13; // rax
long long v14; // rdx
long long v15; // r9
_QWORD *v16; // r10
long long v17; // rbx
_OWORD *v18; // rax
_OWORD *v19; // r12
unsigned __int8 *v20; // rsi
unsigned long long v21; // rax
long long v22; // rbx
unsigned long long v23; // r14
unsigned int v24; // r15d
unsigned int v25; // r15d
long long v26; // rax
unsigned __int16 *v27; // rsi
long long v28; // rcx
unsigned int v29; // edx
int v30; // eax
_QWORD *v31; // r14
long long v32; // rax
long long v33; // rbx
unsigned long long v35; // [rsp+0h] [rbp-70h]
unsigned long long v37; // [rsp+10h] [rbp-60h]
long long v38; // [rsp+18h] [rbp-58h]
unsigned long long v39; // [rsp+20h] [rbp-50h]
long long v42; // [rsp+38h] [rbp-38h]
_QWORD *v43; // [rsp+40h] [rbp-30h]
v39 = (unsigned long long)a4 << 7;
v6 = ma_alloc_root(a3, v39);
if ( !v6 )
return 0LL;
v42 = v6;
v7 = v6;
v8 = a3;
if ( *a2 )
{
v9 = (_QWORD *)*a2;
v37 = v6 + v39;
v7 = v6;
v38 = a3;
do
{
if ( v7 >= v37 )
goto LABEL_35;
v10 = 0LL;
v43 = v9;
do
{
v11 = *(_DWORD *)(v10 + v43[1] + 8) + ~(unsigned int)*(_QWORD *)(v10 + v43[1]);
v12 = v7;
v13 = ma_strdup_root();
v7 = v12;
v14 = *(_QWORD *)((char *)&rset_field_offsets + 2 * v10 + 8);
*(_QWORD *)(v12 + *(_QWORD *)((char *)&rset_field_offsets + 2 * v10)) = v13;
*(_DWORD *)(v12 + v14) = v11;
v10 += 8LL;
}
while ( v10 != 48 );
*(_QWORD *)(v12 + 120) = 0LL;
v15 = 6LL;
v16 = v43;
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 1264) + 112LL) & 8) != 0 )
{
v17 = *(_QWORD *)(v43[1] + 56LL) - *(_QWORD *)(v43[1] + 48LL);
if ( v17 >= 2 )
{
v18 = (_OWORD *)ma_alloc_root(v8, 32LL);
if ( v18 )
{
v19 = v18;
v18[1] = 0LL;
*v18 = 0LL;
v7 = v12;
*(_QWORD *)(v12 + 120) = v18;
v20 = *(unsigned __int8 **)(v43[1] + 48LL);
v21 = (unsigned long long)&v20[v17 - 1];
v35 = v21;
do
{
v22 = v20[1];
if ( (v22 & 0x80u) != 0LL )
break;
v23 = (unsigned long long)&v20[v22 + 2];
if ( v23 > v21 )
break;
v24 = *v20;
if ( (unsigned __int8)v24 <= 1u )
{
v25 = v24;
v26 = ma_memdup_root(v38, v20 + 2, v22);
v7 = v12;
if ( !v26 )
v22 = 0LL;
*(_QWORD *)&v19[v25] = v26;
v21 = v35;
*((_QWORD *)&v19[v25] + 1) = v22;
}
v20 = (unsigned __int8 *)v23;
v8 = v38;
}
while ( v23 < v21 );
}
else
{
v7 = v12;
*(_QWORD *)(v12 + 120) = 0LL;
}
}
v15 = 7LL;
v16 = v43;
}
v27 = *(unsigned __int16 **)(v16[1] + 8 * v15);
*(_DWORD *)(v7 + 108) = *v27;
v28 = *(unsigned int *)(v27 + 1);
*(_QWORD *)(v7 + 56) = v28;
v29 = *((unsigned __int8 *)v27 + 6);
*(_DWORD *)(v7 + 112) = v29;
v30 = *(unsigned __int16 *)((char *)v27 + 7);
*(_DWORD *)(v7 + 100) = v30;
*(_DWORD *)(v7 + 104) = *((char *)v27 + 9);
if ( v29 > 9 )
{
if ( v29 != 246 && v29 != 13 )
goto LABEL_29;
}
else if ( v29 == 7 && v28 != 8 && (_DWORD)v28 != 14 )
{
goto LABEL_29;
}
*(_DWORD *)(v7 + 100) = v30 | 0x8000;
LABEL_29:
if ( a5 && *(_QWORD *)(v16[1] + 8 * v15 + 8) )
{
v31 = v16;
v32 = ma_strdup_root();
v7 = v12;
v16 = v31;
}
else
{
v32 = 0LL;
}
*(_QWORD *)(v7 + 48) = v32;
*(_DWORD *)(v7 + 96) = 0;
*(_QWORD *)(v7 + 64) = 0LL;
v7 += 128LL;
v9 = (_QWORD *)*v16;
}
while ( *v16 );
}
if ( v7 >= v39 + v42 )
{
free_rows((long long)a2);
return v42;
}
else
{
LABEL_35:
free_rows((long long)a2);
v33 = 0LL;
ma_free_root(v8, 0LL);
}
return v33;
}
| unpack_fields:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x3c],R8D
MOV RBX,RSI
MOV qword ptr [RBP + -0x68],RDI
MOV ESI,ECX
SHL RSI,0x7
MOV R14,RDX
MOV RDI,RDX
MOV qword ptr [RBP + -0x50],RSI
CALL 0x0011dc7b
TEST RAX,RAX
JZ 0x00117bff
MOV qword ptr [RBP + -0x48],RBX
MOV RCX,qword ptr [RBX]
MOV qword ptr [RBP + -0x38],RAX
MOV R8,RAX
TEST RCX,RCX
MOV RDI,R14
JZ 0x00117bd8
MOV R13,RCX
MOV R15,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,R15
MOV qword ptr [RBP + -0x60],RAX
LEA R12,[0x137e70]
MOV R8,R15
MOV qword ptr [RBP + -0x58],RDI
LAB_001179e0:
CMP R8,qword ptr [RBP + -0x60]
JNC 0x00117be5
XOR EBX,EBX
MOV qword ptr [RBP + -0x30],R13
LAB_001179f0:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RBX + RAX*0x1]
MOV R14D,ESI
NOT R14D
ADD R14D,dword ptr [RBX + RAX*0x1 + 0x8]
MOV R15,RDI
MOV R13,R8
CALL 0x0011de1e
MOV R8,R13
MOV RDI,R15
MOV RCX,qword ptr [R12 + RBX*0x2]
MOV RDX,qword ptr [R12 + RBX*0x2 + 0x8]
MOV qword ptr [R13 + RCX*0x1],RAX
MOV dword ptr [R13 + RDX*0x1],R14D
ADD RBX,0x8
CMP RBX,0x30
JNZ 0x001179f0
MOV qword ptr [R8 + 0x78],0x0
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV R9D,0x6
TEST byte ptr [RAX + 0x70],0x8
MOV R10,qword ptr [RBP + -0x30]
JZ 0x00117b23
MOV RAX,qword ptr [R10 + 0x8]
MOV RBX,qword ptr [RAX + 0x38]
SUB RBX,qword ptr [RAX + 0x30]
CMP RBX,0x2
JL 0x00117b19
MOV ESI,0x20
CALL 0x0011dc7b
TEST RAX,RAX
JZ 0x00117b0b
MOV R12,RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV R8,R13
MOV qword ptr [R13 + 0x78],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RAX + 0x30]
LEA RAX,[RSI + RBX*0x1]
DEC RAX
MOV RDI,R15
MOV qword ptr [RBP + -0x70],RAX
LAB_00117ab3:
MOVZX EBX,byte ptr [RSI + 0x1]
TEST BL,BL
JS 0x00117b19
LEA R14,[RSI + RBX*0x1]
ADD R14,0x2
CMP R14,RAX
JA 0x00117b19
MOVZX R15D,byte ptr [RSI]
CMP R15B,0x1
JA 0x00117afd
ADD RSI,0x2
SHL R15D,0x4
MOV RDI,qword ptr [RBP + -0x58]
MOV RDX,RBX
CALL 0x0011de6f
MOV R8,R13
TEST RAX,RAX
CMOVZ RBX,RAX
MOV qword ptr [R12 + R15*0x1],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [R12 + R15*0x1 + 0x8],RBX
LAB_00117afd:
MOV RSI,R14
CMP R14,RAX
MOV RDI,qword ptr [RBP + -0x58]
JC 0x00117ab3
JMP 0x00117b19
LAB_00117b0b:
MOV R8,R13
MOV qword ptr [R13 + 0x78],0x0
MOV RDI,R15
LAB_00117b19:
MOV R9D,0x7
MOV R10,qword ptr [RBP + -0x30]
LAB_00117b23:
MOV RAX,qword ptr [R10 + 0x8]
MOV RSI,qword ptr [RAX + R9*0x8]
MOVZX EAX,word ptr [RSI]
MOV dword ptr [R8 + 0x6c],EAX
MOV ECX,dword ptr [RSI + 0x2]
MOV qword ptr [R8 + 0x38],RCX
MOVZX EDX,byte ptr [RSI + 0x6]
MOV dword ptr [R8 + 0x70],EDX
MOVZX EAX,word ptr [RSI + 0x7]
MOV dword ptr [R8 + 0x64],EAX
MOVSX ESI,byte ptr [RSI + 0x9]
MOV dword ptr [R8 + 0x68],ESI
CMP EDX,0x9
JA 0x00117b68
CMP EDX,0x7
JNZ 0x00117b75
CMP RCX,0x8
JZ 0x00117b75
CMP ECX,0xe
JZ 0x00117b75
JMP 0x00117b7e
LAB_00117b68:
CMP EDX,0xf6
JZ 0x00117b75
CMP EDX,0xd
JNZ 0x00117b7e
LAB_00117b75:
OR EAX,0x8000
MOV dword ptr [R8 + 0x64],EAX
LAB_00117b7e:
CMP byte ptr [RBP + -0x3c],0x0
JZ 0x00117ba8
MOV RAX,qword ptr [R10 + 0x8]
MOV RSI,qword ptr [RAX + R9*0x8 + 0x8]
TEST RSI,RSI
JZ 0x00117ba8
MOV R14,R10
MOV RBX,RDI
CALL 0x0011de1e
MOV R8,R13
MOV RDI,RBX
MOV R10,R14
JMP 0x00117baa
LAB_00117ba8:
XOR EAX,EAX
LAB_00117baa:
MOV qword ptr [R8 + 0x30],RAX
MOV dword ptr [R8 + 0x60],0x0
MOV qword ptr [R8 + 0x40],0x0
SUB R8,-0x80
MOV R10,qword ptr [R10]
MOV R13,R10
TEST R10,R10
LEA R12,[0x137e70]
JNZ 0x001179e0
LAB_00117bd8:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x50]
CMP R8,RAX
JNC 0x00117c03
LAB_00117be5:
MOV R14,RDI
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00115896
XOR EBX,EBX
MOV RDI,R14
XOR ESI,ESI
CALL 0x0011dd93
JMP 0x00117c10
LAB_00117bff:
XOR EBX,EBX
JMP 0x00117c10
LAB_00117c03:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00115896
MOV RBX,qword ptr [RBP + -0x38]
LAB_00117c10:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong unpack_fields(long param_1,long *param_2,int8 param_3,ulong param_4,char param_5)
{
byte bVar1;
ushort uVar2;
int iVar3;
uint uVar4;
long lVar5;
ushort *puVar6;
ulong uVar7;
int8 uVar8;
int8 *puVar9;
byte *pbVar10;
int8 uVar11;
long lVar12;
ulong uVar13;
long lVar14;
byte *pbVar15;
ulong uVar16;
long *plVar17;
byte *pbVar18;
lVar14 = (param_4 & 0xffffffff) * 0x80;
uVar7 = ma_alloc_root(param_3);
if (uVar7 == 0) {
uVar7 = 0;
}
else {
plVar17 = (long *)*param_2;
uVar16 = uVar7;
if (plVar17 != (long *)0x0) {
do {
if (lVar14 + uVar7 <= uVar16) goto LAB_00117be5;
lVar12 = 0;
do {
uVar11 = *(int8 *)(lVar12 + plVar17[1]);
iVar3 = *(int *)(lVar12 + 8 + plVar17[1]);
uVar8 = ma_strdup_root();
lVar5 = *(long *)((long)&DAT_00137e78 + lVar12 * 2);
*(int8 *)(uVar16 + *(long *)((long)&rset_field_offsets + lVar12 * 2)) = uVar8;
*(uint *)(uVar16 + lVar5) = ~(uint)uVar11 + iVar3;
lVar12 = lVar12 + 8;
} while (lVar12 != 0x30);
*(int8 *)(uVar16 + 0x78) = 0;
lVar12 = 6;
if ((*(byte *)(*(long *)(param_1 + 0x4f0) + 0x70) & 8) != 0) {
lVar12 = *(long *)(plVar17[1] + 0x38) - *(long *)(plVar17[1] + 0x30);
if (1 < lVar12) {
puVar9 = (int8 *)ma_alloc_root(param_3,0x20);
if (puVar9 == (int8 *)0x0) {
*(int8 *)(uVar16 + 0x78) = 0;
}
else {
puVar9[2] = 0;
puVar9[3] = 0;
*puVar9 = 0;
puVar9[1] = 0;
*(int8 **)(uVar16 + 0x78) = puVar9;
pbVar10 = *(byte **)(plVar17[1] + 0x30) + lVar12 + -1;
pbVar15 = *(byte **)(plVar17[1] + 0x30);
do {
uVar13 = (ulong)pbVar15[1];
if (((char)pbVar15[1] < '\0') || (pbVar18 = pbVar15 + uVar13 + 2, pbVar10 < pbVar18)
) break;
bVar1 = *pbVar15;
if (bVar1 < 2) {
lVar12 = ma_memdup_root(param_3,pbVar15 + 2,uVar13);
if (lVar12 == 0) {
uVar13 = 0;
}
puVar9[(ulong)bVar1 * 2] = lVar12;
puVar9[(ulong)bVar1 * 2 + 1] = uVar13;
}
pbVar15 = pbVar18;
} while (pbVar18 < pbVar10);
}
}
lVar12 = 7;
}
puVar6 = *(ushort **)(plVar17[1] + lVar12 * 8);
*(uint *)(uVar16 + 0x6c) = (uint)*puVar6;
uVar4 = *(uint *)(puVar6 + 1);
*(ulong *)(uVar16 + 0x38) = (ulong)uVar4;
bVar1 = (byte)puVar6[3];
*(uint *)(uVar16 + 0x70) = (uint)bVar1;
uVar2 = *(ushort *)((long)puVar6 + 7);
*(uint *)(uVar16 + 100) = (uint)uVar2;
*(int *)(uVar16 + 0x68) = (int)*(char *)((long)puVar6 + 9);
if (bVar1 < 10) {
if ((bVar1 != 7) || (((ulong)uVar4 == 8 || (uVar4 == 0xe)))) {
LAB_00117b75:
*(uint *)(uVar16 + 100) = uVar2 | 0x8000;
}
}
else if ((bVar1 == 0xf6) || (bVar1 == 0xd)) goto LAB_00117b75;
if ((param_5 == '\0') || (*(long *)(plVar17[1] + 8 + lVar12 * 8) == 0)) {
uVar11 = 0;
}
else {
uVar11 = ma_strdup_root();
}
*(int8 *)(uVar16 + 0x30) = uVar11;
*(int4 *)(uVar16 + 0x60) = 0;
*(int8 *)(uVar16 + 0x40) = 0;
uVar16 = uVar16 + 0x80;
plVar17 = (long *)*plVar17;
} while (plVar17 != (long *)0x0);
}
if (uVar16 < uVar7 + lVar14) {
LAB_00117be5:
free_rows(param_2);
uVar7 = 0;
ma_free_root(param_3,0);
}
else {
free_rows(param_2);
}
}
return uVar7;
}
| |
28,028 | LefDefParser::defwInitCbk(_IO_FILE*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwInitCbk(FILE *f)
{
defwFile = f;
if (defwHasInit == 1) { // defwInit has already called, issue an error
fprintf(stderr,
"ERROR (DEFWRIT-9001): The DEF writer has detected that the function defwInit has already been called and you are trying to call defwInitCbk.\nOnly defwInitCbk or defwInit can be called but not both.\nUpdate your program and then try again.\n");
fprintf(stderr, "Writer Exit.\n");
exit(DEFW_BAD_ORDER);
}
defwState = DEFW_UNINIT; // Current state of writer
defwFunc = DEFW_UNINIT; // Current function of writer
defwDidNets = 0; // required section
defwDidComponents = 0; // required section
defwDidInit = 0; // required section
defwDidInit = 1;
defwState = DEFW_INIT;
defwHasInitCbk = 1;
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwInitCbk(_IO_FILE*):
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rcx
leaq 0x1a5e8(%rip), %rax # 0x2b158
movq %rcx, (%rax)
leaq 0x1a60a(%rip), %rax # 0x2b184
cmpl $0x1, (%rax)
jne 0x10bb9
movq 0x18442(%rip), %rax # 0x28fc8
movq (%rax), %rdi
leaq 0x13331(%rip), %rsi # 0x23ec1
movb $0x0, %al
callq 0x10f0
movq 0x1842a(%rip), %rax # 0x28fc8
movq (%rax), %rdi
leaq 0x13262(%rip), %rsi # 0x23e0a
movb $0x0, %al
callq 0x10f0
movl $0x2, %edi
callq 0x10c0
leaq 0x1a5a4(%rip), %rax # 0x2b164
movl $0x0, (%rax)
leaq 0x1a59b(%rip), %rax # 0x2b168
movl $0x0, (%rax)
leaq 0x1a592(%rip), %rax # 0x2b16c
movl $0x0, (%rax)
leaq 0x1a589(%rip), %rax # 0x2b170
movl $0x0, (%rax)
leaq 0x1a580(%rip), %rax # 0x2b174
movl $0x0, (%rax)
leaq 0x1a573(%rip), %rax # 0x2b174
movl $0x1, (%rax)
leaq 0x1a556(%rip), %rax # 0x2b164
movl $0x1, (%rax)
leaq 0x1a56d(%rip), %rax # 0x2b188
movl $0x1, (%rax)
xorl %eax, %eax
popq %rcx
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser11defwInitCbkEP8_IO_FILE:
push rax
mov [rsp+8+var_8], rdi
mov rcx, [rsp+8+var_8]
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov [rax], rcx
lea rax, _ZN12LefDefParser11defwHasInitE; LefDefParser::defwHasInit
cmp dword ptr [rax], 1
jnz short loc_10BB9
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aErrorDefwrit90_0; "ERROR (DEFWRIT-9001): The DEF writer ha"...
mov al, 0
call _fprintf
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aWriterExit; "Writer Exit.\n"
mov al, 0
call _fprintf
mov edi, 2
call _exit
loc_10BB9:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 0
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 0
lea rax, _ZN12LefDefParser11defwDidNetsE; LefDefParser::defwDidNets
mov dword ptr [rax], 0
lea rax, _ZN12LefDefParser17defwDidComponentsE; LefDefParser::defwDidComponents
mov dword ptr [rax], 0
lea rax, _ZN12LefDefParser11defwDidInitE; LefDefParser::defwDidInit
mov dword ptr [rax], 0
lea rax, _ZN12LefDefParser11defwDidInitE; LefDefParser::defwDidInit
mov dword ptr [rax], 1
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 1
lea rax, _ZN12LefDefParser14defwHasInitCbkE; LefDefParser::defwHasInitCbk
mov dword ptr [rax], 1
xor eax, eax
pop rcx
retn
| long long LefDefParser::defwInitCbk(long long a1)
{
LefDefParser::defwFile = a1;
if ( LefDefParser::defwHasInit == 1 )
{
fprintf(
stderr,
"ERROR (DEFWRIT-9001): The DEF writer has detected that the function defwInit has already been called and you are t"
"rying to call defwInitCbk.\n"
"Only defwInitCbk or defwInit can be called but not both.\n"
"Update your program and then try again.\n");
fprintf(stderr, "Writer Exit.\n");
exit(2LL);
}
LefDefParser::defwFunc = 0;
LefDefParser::defwDidNets = 0;
LefDefParser::defwDidComponents = 0;
LefDefParser::defwDidInit = 1;
LefDefParser::defwState = 1;
LefDefParser::defwHasInitCbk = 1;
return 0LL;
}
| defwInitCbk:
PUSH RAX
MOV qword ptr [RSP],RDI
MOV RCX,qword ptr [RSP]
LEA RAX,[0x12b158]
MOV qword ptr [RAX],RCX
LEA RAX,[0x12b184]
CMP dword ptr [RAX],0x1
JNZ 0x00110bb9
MOV RAX,qword ptr [0x00128fc8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x123ec1]
MOV AL,0x0
CALL 0x001010f0
MOV RAX,qword ptr [0x00128fc8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x123e0a]
MOV AL,0x0
CALL 0x001010f0
MOV EDI,0x2
CALL 0x001010c0
LAB_00110bb9:
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x0
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x0
LEA RAX,[0x12b16c]
MOV dword ptr [RAX],0x0
LEA RAX,[0x12b170]
MOV dword ptr [RAX],0x0
LEA RAX,[0x12b174]
MOV dword ptr [RAX],0x0
LEA RAX,[0x12b174]
MOV dword ptr [RAX],0x1
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x1
LEA RAX,[0x12b188]
MOV dword ptr [RAX],0x1
XOR EAX,EAX
POP RCX
RET
|
/* LefDefParser::defwInitCbk(_IO_FILE*) */
int8 LefDefParser::defwInitCbk(_IO_FILE *param_1)
{
defwFile = param_1;
if (defwHasInit == 1) {
fprintf(*(FILE **)PTR_stderr_00128fc8,
"ERROR (DEFWRIT-9001): The DEF writer has detected that the function defwInit has already been called and you are trying to call defwInitCbk.\nOnly defwInitCbk or defwInit can be called but not both.\nUpdate your program and then try again.\n"
);
fprintf(*(FILE **)PTR_stderr_00128fc8,"Writer Exit.\n");
/* WARNING: Subroutine does not return */
exit(2);
}
defwFunc = 0;
defwDidNets = 0;
defwDidComponents = 0;
defwDidInit = 1;
defwState = 1;
defwHasInitCbk = 1;
return 0;
}
| |
28,029 | maria_page_filler_set_normal | eloqsql/storage/maria/ma_pagecrc.c | my_bool maria_page_filler_set_normal(PAGECACHE_IO_HOOK_ARGS *args)
{
uchar *page= args->page;
#ifdef DBUG_ASSERT_EXISTS
pgcache_page_no_t page_no= args->pageno;
#endif
MARIA_SHARE *share= (MARIA_SHARE *)args->data;
DBUG_ENTER("maria_page_filler_set_normal");
DBUG_ASSERT(page_no != 0); /* Catches some simple bugs */
int4store_aligned(page + share->block_size - CRC_SIZE,
MARIA_NO_CRC_NORMAL_PAGE);
DBUG_RETURN(0);
} | O3 | c | maria_page_filler_set_normal:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
movl 0x7bc(%rcx), %ecx
movl $0xffffffff, -0x4(%rax,%rcx) # imm = 0xFFFFFFFF
xorl %eax, %eax
popq %rbp
retq
| maria_page_filler_set_normal:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov rcx, [rdi+10h]
mov ecx, [rcx+7BCh]
mov dword ptr [rax+rcx-4], 0FFFFFFFFh
xor eax, eax
pop rbp
retn
| long long maria_page_filler_set_normal(_QWORD *a1)
{
*(_DWORD *)(*a1 + *(unsigned int *)(a1[2] + 1980LL) - 4LL) = -1;
return 0LL;
}
| maria_page_filler_set_normal:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x10]
MOV ECX,dword ptr [RCX + 0x7bc]
MOV dword ptr [RAX + RCX*0x1 + -0x4],0xffffffff
XOR EAX,EAX
POP RBP
RET
|
int8 maria_page_filler_set_normal(long *param_1)
{
*(int4 *)(*param_1 + -4 + (ulong)*(uint *)(param_1[2] + 0x7bc)) = 0xffffffff;
return 0;
}
| |
28,030 | ma_unique_comp | eloqsql/storage/maria/ma_unique.c | my_bool _ma_unique_comp(MARIA_UNIQUEDEF *def, const uchar *a, const uchar *b,
my_bool null_are_equal)
{
const uchar *pos_a, *pos_b, *end;
HA_KEYSEG *keyseg;
for (keyseg=def->seg ; keyseg < def->end ; keyseg++)
{
enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type;
uint a_length, b_length;
a_length= b_length= keyseg->length;
/* If part is NULL it's regarded as different */
if (keyseg->null_bit)
{
uint tmp;
if ((tmp=(a[keyseg->null_pos] & keyseg->null_bit)) !=
(uint) (b[keyseg->null_pos] & keyseg->null_bit))
return 1;
if (tmp)
{
if (!null_are_equal)
return 1;
continue;
}
}
pos_a= a+keyseg->start;
pos_b= b+keyseg->start;
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint pack_length= keyseg->bit_start;
if (pack_length == 1)
{
a_length= (uint) *pos_a++;
b_length= (uint) *pos_b++;
}
else
{
a_length= uint2korr(pos_a);
b_length= uint2korr(pos_b);
pos_a+= 2; /* Skip VARCHAR length */
pos_b+= 2;
}
set_if_smaller(a_length, keyseg->length); /* Safety */
set_if_smaller(b_length, keyseg->length); /* safety */
}
else if (keyseg->flag & HA_BLOB_PART)
{
/* Only compare 'length' characters if length != 0 */
a_length= _ma_calc_blob_length(keyseg->bit_start,pos_a);
b_length= _ma_calc_blob_length(keyseg->bit_start,pos_b);
/* Check that a and b are of equal length */
if (keyseg->length)
{
/*
This is used in some cases when we are not interested in comparing
the whole length of the blob.
*/
set_if_smaller(a_length, keyseg->length);
set_if_smaller(b_length, keyseg->length);
}
memcpy((void*) &pos_a, pos_a+keyseg->bit_start, sizeof(char*));
memcpy((void*) &pos_b, pos_b+keyseg->bit_start, sizeof(char*));
}
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 ||
type == HA_KEYTYPE_VARTEXT2)
{
if (ha_compare_text(keyseg->charset, pos_a, a_length,
pos_b, b_length, 0))
return 1;
}
else
{
if (a_length != b_length)
return 1;
end= pos_a+a_length;
while (pos_a != end)
{
if (*pos_a++ != *pos_b++)
return 1;
}
}
}
return 0;
} | O3 | c | ma_unique_comp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x8(%rdi), %r15
movq %rdi, -0x48(%rbp)
cmpq 0x10(%rdi), %r15
jae 0x439c4
movl %ecx, %r14d
movq %rdx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movl %ecx, -0x2c(%rbp)
movzbl 0x18(%r15), %r12d
movzwl 0x14(%r15), %ecx
movb 0x19(%r15), %dil
testb %dil, %dil
je 0x438ae
movl 0xc(%r15), %eax
movb (%rsi,%rax), %r8b
andb %dil, %r8b
andb (%rdx,%rax), %dil
movb $0x1, %al
cmpb %dil, %r8b
jne 0x439c6
testb %r8b, %r8b
je 0x438ae
testb %r14b, %r14b
jne 0x43984
jmp 0x439c6
movl 0x8(%r15), %r13d
leaq (%rsi,%r13), %rbx
addq %rdx, %r13
movzwl 0x12(%r15), %eax
testb $0x8, %al
jne 0x438cd
testb $0x20, %al
jne 0x438e4
movl %ecx, %esi
jmp 0x43951
cmpb $0x1, 0x1a(%r15)
jne 0x43933
movzbl (%rbx), %eax
incq %rbx
movzbl (%r13), %edx
incq %r13
jmp 0x43943
movzbl 0x1a(%r15), %edi
movq %rbx, %rsi
callq 0x3f1ab
movq %rax, %r14
movzbl 0x1a(%r15), %edi
movq %r13, %rsi
callq 0x3f1ab
movzwl 0x14(%r15), %edx
cmpl %edx, %r14d
movl %edx, %ecx
cmovbl %r14d, %ecx
cmpl %edx, %eax
movl %edx, %esi
cmovbl %eax, %esi
testl %edx, %edx
cmovel %r14d, %ecx
movl -0x2c(%rbp), %r14d
cmovel %eax, %esi
movzbl 0x1a(%r15), %eax
movq (%rbx,%rax), %rbx
movq (%r13,%rax), %r13
jmp 0x43951
movzwl (%rbx), %eax
movzwl (%r13), %edx
addq $0x2, %rbx
addq $0x2, %r13
cmpl %ecx, %eax
cmovael %ecx, %eax
cmpl %ecx, %edx
movl %ecx, %esi
cmovbl %edx, %esi
movl %eax, %ecx
cmpl $0x11, %r12d
ja 0x43998
movl $0x28002, %eax # imm = 0x28002
btl %r12d, %eax
jae 0x43998
movq (%r15), %rdi
movl %ecx, %edx
movl %esi, %r8d
movq %rbx, %rsi
movq %r13, %rcx
xorl %r9d, %r9d
callq 0x9f6dc
testl %eax, %eax
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
jne 0x439d5
addq $0x20, %r15
movq -0x48(%rbp), %rax
cmpq 0x10(%rax), %r15
jb 0x4386e
jmp 0x439c4
movb $0x1, %al
cmpl %esi, %ecx
jne 0x439c6
movl %ecx, %ecx
xorl %r8d, %r8d
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
cmpq %r8, %rcx
je 0x43984
movb (%rbx,%r8), %r9b
leaq 0x1(%r8), %rdi
cmpb (%r13,%r8), %r9b
movq %rdi, %r8
je 0x439ab
jmp 0x439c6
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x439c6
nopl (%rax)
| _ma_unique_comp:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, [rdi+8]
mov [rbp+var_48], rdi
cmp r15, [rdi+10h]
jnb loc_439C4
mov r14d, ecx
mov [rbp+var_40], rdx
mov [rbp+var_38], rsi
mov [rbp+var_2C], ecx
loc_4386E:
movzx r12d, byte ptr [r15+18h]
movzx ecx, word ptr [r15+14h]
mov dil, [r15+19h]
test dil, dil
jz short loc_438AE
mov eax, [r15+0Ch]
mov r8b, [rsi+rax]
and r8b, dil
and dil, [rdx+rax]
mov al, 1
cmp r8b, dil
jnz loc_439C6
test r8b, r8b
jz short loc_438AE
test r14b, r14b
jnz loc_43984
jmp loc_439C6
loc_438AE:
mov r13d, [r15+8]
lea rbx, [rsi+r13]
add r13, rdx
movzx eax, word ptr [r15+12h]
test al, 8
jnz short loc_438CD
test al, 20h
jnz short loc_438E4
mov esi, ecx
jmp loc_43951
loc_438CD:
cmp byte ptr [r15+1Ah], 1
jnz short loc_43933
movzx eax, byte ptr [rbx]
inc rbx
movzx edx, byte ptr [r13+0]
inc r13
jmp short loc_43943
loc_438E4:
movzx edi, byte ptr [r15+1Ah]
mov rsi, rbx
call _ma_calc_blob_length
mov r14, rax
movzx edi, byte ptr [r15+1Ah]
mov rsi, r13
call _ma_calc_blob_length
movzx edx, word ptr [r15+14h]
cmp r14d, edx
mov ecx, edx
cmovb ecx, r14d
cmp eax, edx
mov esi, edx
cmovb esi, eax
test edx, edx
cmovz ecx, r14d
mov r14d, [rbp+var_2C]
cmovz esi, eax
movzx eax, byte ptr [r15+1Ah]
mov rbx, [rbx+rax]
mov r13, [r13+rax+0]
jmp short loc_43951
loc_43933:
movzx eax, word ptr [rbx]
movzx edx, word ptr [r13+0]
add rbx, 2
add r13, 2
loc_43943:
cmp eax, ecx
cmovnb eax, ecx
cmp edx, ecx
mov esi, ecx
cmovb esi, edx
mov ecx, eax
loc_43951:
cmp r12d, 11h
ja short loc_43998
mov eax, 28002h
bt eax, r12d
jnb short loc_43998
mov rdi, [r15]
mov edx, ecx
mov r8d, esi
mov rsi, rbx
mov rcx, r13
xor r9d, r9d
call ha_compare_text
test eax, eax
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
jnz short loc_439D5
loc_43984:
add r15, 20h ; ' '
mov rax, [rbp+var_48]
cmp r15, [rax+10h]
jb loc_4386E
jmp short loc_439C4
loc_43998:
mov al, 1
cmp ecx, esi
jnz short loc_439C6
mov ecx, ecx
xor r8d, r8d
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
loc_439AB:
cmp rcx, r8
jz short loc_43984
mov r9b, [rbx+r8]
lea rdi, [r8+1]
cmp r9b, [r13+r8+0]
mov r8, rdi
jz short loc_439AB
jmp short loc_439C6
loc_439C4:
xor eax, eax
loc_439C6:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_439D5:
mov al, 1
jmp short loc_439C6
| char ma_unique_comp(long long a1, long long a2, long long a3, char a4)
{
unsigned long long v4; // r15
char v5; // r14
unsigned int v6; // r12d
unsigned int v7; // ecx
char v8; // di
long long v9; // rax
char v10; // r8
char v11; // di
char result; // al
long long v13; // r13
unsigned __int8 *v14; // rbx
unsigned __int8 *v15; // r13
__int16 v16; // ax
unsigned int v17; // esi
unsigned int v18; // eax
unsigned int v19; // edx
unsigned int v20; // r14d
unsigned int v21; // eax
unsigned int v22; // edx
long long v23; // rax
int v24; // eax
int v25; // eax
long long v26; // r8
bool v27; // zf
long long v29; // [rsp+10h] [rbp-40h]
long long v30; // [rsp+18h] [rbp-38h]
v4 = *(_QWORD *)(a1 + 8);
if ( v4 < *(_QWORD *)(a1 + 16) )
{
v5 = a4;
v29 = a3;
v30 = a2;
do
{
v6 = *(unsigned __int8 *)(v4 + 24);
v7 = *(unsigned __int16 *)(v4 + 20);
v8 = *(_BYTE *)(v4 + 25);
if ( !v8 )
goto LABEL_8;
v9 = *(unsigned int *)(v4 + 12);
v10 = v8 & *(_BYTE *)(a2 + v9);
v11 = *(_BYTE *)(a3 + v9) & v8;
result = 1;
if ( v10 != v11 )
return result;
if ( v10 )
{
if ( !v5 )
return result;
}
else
{
LABEL_8:
v13 = *(unsigned int *)(v4 + 8);
v14 = (unsigned __int8 *)(a2 + v13);
v15 = (unsigned __int8 *)(a3 + v13);
v16 = *(_WORD *)(v4 + 18);
if ( (v16 & 8) != 0 )
{
if ( *(_BYTE *)(v4 + 26) == 1 )
{
v18 = *v14++;
v19 = *v15++;
}
else
{
v18 = *(unsigned __int16 *)v14;
v19 = *(unsigned __int16 *)v15;
v14 += 2;
v15 += 2;
}
if ( v18 >= v7 )
v18 = *(unsigned __int16 *)(v4 + 20);
v17 = *(unsigned __int16 *)(v4 + 20);
if ( v19 < v7 )
v17 = v19;
v7 = v18;
}
else if ( (v16 & 0x20) != 0 )
{
v20 = ma_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v14);
v21 = ma_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v15);
v22 = *(unsigned __int16 *)(v4 + 20);
v7 = v22;
if ( v20 < v22 )
v7 = v20;
v17 = *(unsigned __int16 *)(v4 + 20);
if ( v21 < v22 )
v17 = v21;
if ( !*(_WORD *)(v4 + 20) )
v7 = v20;
v5 = a4;
if ( !*(_WORD *)(v4 + 20) )
v17 = v21;
v23 = *(unsigned __int8 *)(v4 + 26);
v14 = *(unsigned __int8 **)&v14[v23];
v15 = *(unsigned __int8 **)&v15[v23];
}
else
{
v17 = *(unsigned __int16 *)(v4 + 20);
}
if ( v6 <= 0x11 && (v24 = 163842, _bittest(&v24, v6)) )
{
v25 = ha_compare_text(*(_QWORD *)v4, v14, v7, v15, v17, 0LL);
a3 = v29;
a2 = v30;
if ( v25 )
return 1;
}
else
{
result = 1;
if ( v7 != v17 )
return result;
v26 = 0LL;
a3 = v29;
a2 = v30;
while ( v7 != v26 )
{
v27 = v14[v26] == v15[v26];
++v26;
if ( !v27 )
return result;
}
}
}
v4 += 32LL;
}
while ( v4 < *(_QWORD *)(a1 + 16) );
}
return 0;
}
| _ma_unique_comp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,qword ptr [RDI + 0x8]
MOV qword ptr [RBP + -0x48],RDI
CMP R15,qword ptr [RDI + 0x10]
JNC 0x001439c4
MOV R14D,ECX
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x38],RSI
MOV dword ptr [RBP + -0x2c],ECX
LAB_0014386e:
MOVZX R12D,byte ptr [R15 + 0x18]
MOVZX ECX,word ptr [R15 + 0x14]
MOV DIL,byte ptr [R15 + 0x19]
TEST DIL,DIL
JZ 0x001438ae
MOV EAX,dword ptr [R15 + 0xc]
MOV R8B,byte ptr [RSI + RAX*0x1]
AND R8B,DIL
AND DIL,byte ptr [RDX + RAX*0x1]
MOV AL,0x1
CMP R8B,DIL
JNZ 0x001439c6
TEST R8B,R8B
JZ 0x001438ae
TEST R14B,R14B
JNZ 0x00143984
JMP 0x001439c6
LAB_001438ae:
MOV R13D,dword ptr [R15 + 0x8]
LEA RBX,[RSI + R13*0x1]
ADD R13,RDX
MOVZX EAX,word ptr [R15 + 0x12]
TEST AL,0x8
JNZ 0x001438cd
TEST AL,0x20
JNZ 0x001438e4
MOV ESI,ECX
JMP 0x00143951
LAB_001438cd:
CMP byte ptr [R15 + 0x1a],0x1
JNZ 0x00143933
MOVZX EAX,byte ptr [RBX]
INC RBX
MOVZX EDX,byte ptr [R13]
INC R13
JMP 0x00143943
LAB_001438e4:
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,RBX
CALL 0x0013f1ab
MOV R14,RAX
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,R13
CALL 0x0013f1ab
MOVZX EDX,word ptr [R15 + 0x14]
CMP R14D,EDX
MOV ECX,EDX
CMOVC ECX,R14D
CMP EAX,EDX
MOV ESI,EDX
CMOVC ESI,EAX
TEST EDX,EDX
CMOVZ ECX,R14D
MOV R14D,dword ptr [RBP + -0x2c]
CMOVZ ESI,EAX
MOVZX EAX,byte ptr [R15 + 0x1a]
MOV RBX,qword ptr [RBX + RAX*0x1]
MOV R13,qword ptr [R13 + RAX*0x1]
JMP 0x00143951
LAB_00143933:
MOVZX EAX,word ptr [RBX]
MOVZX EDX,word ptr [R13]
ADD RBX,0x2
ADD R13,0x2
LAB_00143943:
CMP EAX,ECX
CMOVNC EAX,ECX
CMP EDX,ECX
MOV ESI,ECX
CMOVC ESI,EDX
MOV ECX,EAX
LAB_00143951:
CMP R12D,0x11
JA 0x00143998
MOV EAX,0x28002
BT EAX,R12D
JNC 0x00143998
MOV RDI,qword ptr [R15]
MOV EDX,ECX
MOV R8D,ESI
MOV RSI,RBX
MOV RCX,R13
XOR R9D,R9D
CALL 0x0019f6dc
TEST EAX,EAX
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
JNZ 0x001439d5
LAB_00143984:
ADD R15,0x20
MOV RAX,qword ptr [RBP + -0x48]
CMP R15,qword ptr [RAX + 0x10]
JC 0x0014386e
JMP 0x001439c4
LAB_00143998:
MOV AL,0x1
CMP ECX,ESI
JNZ 0x001439c6
MOV ECX,ECX
XOR R8D,R8D
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
LAB_001439ab:
CMP RCX,R8
JZ 0x00143984
MOV R9B,byte ptr [RBX + R8*0x1]
LEA RDI,[R8 + 0x1]
CMP R9B,byte ptr [R13 + R8*0x1]
MOV R8,RDI
JZ 0x001439ab
JMP 0x001439c6
LAB_001439c4:
XOR EAX,EAX
LAB_001439c6:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001439d5:
MOV AL,0x1
JMP 0x001439c6
|
int8 _ma_unique_comp(long param_1,long param_2,long param_3,char param_4)
{
byte *pbVar1;
byte *pbVar2;
byte bVar3;
byte bVar4;
ushort uVar5;
uint uVar6;
uint uVar7;
uint uVar8;
int iVar9;
uint uVar10;
ulong uVar11;
uint uVar12;
ushort *puVar13;
byte bVar14;
ulong uVar15;
ushort *puVar16;
int8 *puVar17;
puVar17 = *(int8 **)(param_1 + 8);
if (puVar17 < *(int8 **)(param_1 + 0x10)) {
do {
bVar4 = *(byte *)(puVar17 + 3);
uVar5 = *(ushort *)((long)puVar17 + 0x14);
uVar11 = (ulong)uVar5;
bVar3 = *(byte *)((long)puVar17 + 0x19);
if (bVar3 == 0) {
LAB_001438ae:
puVar13 = (ushort *)(param_2 + (ulong)*(uint *)(puVar17 + 1));
puVar16 = (ushort *)((ulong)*(uint *)(puVar17 + 1) + param_3);
if ((*(ushort *)((long)puVar17 + 0x12) & 8) == 0) {
if ((*(ushort *)((long)puVar17 + 0x12) & 0x20) == 0) {
uVar10 = (uint)uVar5;
}
else {
uVar7 = _ma_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar13);
uVar8 = _ma_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar16);
uVar5 = *(ushort *)((long)puVar17 + 0x14);
uVar6 = (uint)uVar5;
if (uVar7 < uVar5) {
uVar6 = uVar7;
}
uVar12 = (uint)uVar5;
uVar10 = uVar12;
if (uVar8 < uVar12) {
uVar10 = uVar8;
}
if (uVar12 == 0) {
uVar10 = uVar8;
uVar6 = uVar7;
}
uVar11 = (ulong)uVar6;
puVar13 = *(ushort **)((long)puVar13 + (ulong)*(byte *)((long)puVar17 + 0x1a));
puVar16 = *(ushort **)((long)puVar16 + (ulong)*(byte *)((long)puVar17 + 0x1a));
}
}
else {
if (*(char *)((long)puVar17 + 0x1a) == '\x01') {
uVar6 = (uint)(byte)*puVar13;
puVar13 = (ushort *)((long)puVar13 + 1);
uVar7 = (uint)(byte)*puVar16;
puVar16 = (ushort *)((long)puVar16 + 1);
}
else {
uVar6 = (uint)*puVar13;
uVar7 = (uint)*puVar16;
puVar13 = puVar13 + 1;
puVar16 = puVar16 + 1;
}
uVar10 = (uint)uVar5;
if (uVar10 <= uVar6) {
uVar6 = uVar10;
}
if (uVar7 < uVar10) {
uVar10 = uVar7;
}
uVar11 = (ulong)uVar6;
}
if ((bVar4 < 0x12) && ((0x28002U >> (bVar4 & 0x1f) & 1) != 0)) {
iVar9 = ha_compare_text(*puVar17,puVar13,uVar11,puVar16,uVar10,0);
if (iVar9 != 0) {
return 1;
}
}
else {
if ((uint)uVar11 != uVar10) {
return 1;
}
uVar15 = 0;
while (uVar11 != uVar15) {
pbVar1 = (byte *)((long)puVar13 + uVar15);
pbVar2 = (byte *)((long)puVar16 + uVar15);
uVar15 = uVar15 + 1;
if (*pbVar1 != *pbVar2) {
return 1;
}
}
}
}
else {
bVar14 = *(byte *)(param_2 + (ulong)*(uint *)((long)puVar17 + 0xc)) & bVar3;
if (bVar14 != (bVar3 & *(byte *)(param_3 + (ulong)*(uint *)((long)puVar17 + 0xc)))) {
return 1;
}
if (bVar14 == 0) goto LAB_001438ae;
if (param_4 == '\0') {
return 1;
}
}
puVar17 = puVar17 + 4;
} while (puVar17 < *(int8 **)(param_1 + 0x10));
}
return 0;
}
| |
28,031 | bool chess::movegen::isEpSquareValid<(chess::Color::underlying)1>(chess::Board const&, chess::Square) | Razamindset[P]pawnstar-chess-engine/src/./engine/../chess-library/include/chess.hpp | [[nodiscard]] Color sideToMove() const { return stm_; } | O3 | cpp | bool chess::movegen::isEpSquareValid<(chess::Color::underlying)1>(chess::Board const&, chess::Square):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movsbq 0xae(%rdi), %r13
cmpq $0x2, %r13
jae 0x3eca
movq %rdi, %r14
movl %esi, 0x4(%rsp)
movq 0x50(%rdi,%r13,8), %rbp
movq 0x48(%rdi), %rax
andq %rbp, %rax
je 0x3ee9
movzbl %r13b, %r15d
movl %r15d, %ecx
xorl $0x1, %ecx
movq 0x50(%r14,%rcx,8), %rbx
bsfq %rax, %r12
movq %r14, %rdi
movl %r12d, %esi
callq 0x44d4
movq 0x40(%r14), %rsi
movq 0x50(%r14), %rdx
movl %r12d, %ecx
shll $0x5, %ecx
leaq 0xeb05b(%rip), %rdi # 0xeee00
movq 0x10(%rcx,%rdi), %r8
movq (%rcx,%rdi), %r9
andq %rbx, %r9
imulq 0x8(%rcx,%rdi), %r9
movb 0x18(%rcx,%rdi), %cl
shrq %cl, %r9
movq 0x38(%r14), %rcx
orq %rsi, %rcx
andq (%r8,%r9,8), %rcx
andq %rdx, %rcx
je 0x3e14
movl %r12d, %r8d
shll $0x9, %r8d
leaq 0x1041c(%rip), %rdi # 0x141f8
addq %r8, %rdi
xorl %r8d, %r8d
bsfq %rcx, %r10
movq (%rdi,%r10,8), %r9
btsq %r10, %r9
movq %r9, %r10
andq %rbp, %r10
leaq -0x1(%r10), %r11
xorq %r11, %r10
cmpq %r11, %r10
ja 0x3e03
xorl %r9d, %r9d
orq %r9, %r8
leaq -0x1(%rcx), %r9
andq %r9, %rcx
jne 0x3de2
notq %r8
jmp 0x3e1b
movq $-0x1, %r8
movl %r12d, %edi
shll $0x5, %edi
leaq 0x227d8(%rip), %r9 # 0x26600
andq (%rdi,%r9), %rbx
imulq 0x8(%rdi,%r9), %rbx
movb 0x18(%rdi,%r9), %cl
shrq %cl, %rbx
orq 0x30(%r14), %rsi
movq 0x10(%rdi,%r9), %rcx
andq (%rcx,%rbx,8), %rsi
andq %rdx, %rsi
je 0x3e8a
shll $0x9, %r12d
leaq 0x103a1(%rip), %rcx # 0x141f8
addq %r12, %rcx
xorl %edx, %edx
bsfq %rsi, %r9
movq (%rcx,%r9,8), %rdi
btsq %r9, %rdi
movq %rdi, %r9
andq %rbp, %r9
leaq -0x1(%r9), %r10
xorq %r10, %r9
cmpq %r10, %r9
ja 0x3e7c
xorl %edi, %edi
orq %rdi, %rdx
leaq -0x1(%rsi), %rdi
andq %rdi, %rsi
jne 0x3e5c
jmp 0x3e8c
xorl %edx, %edx
andq 0x20(%r14), %r8
andq 0x50(%r14,%r13,8), %r8
movq %r14, %rdi
movq %rax, %rsi
movq %r8, %rcx
movl 0x4(%rsp), %r8d
movl %r15d, %r9d
callq 0x421c
movabsq $0xffff0000ffff, %rcx # imm = 0xFFFF0000FFFF
testq %rcx, %rax
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x88a2(%rip), %rdi # 0xc773
leaq 0x859e(%rip), %rsi # 0xc476
leaq 0x88b0(%rip), %rcx # 0xc78f
movl $0x48, %edx
callq 0x2130
leaq 0x88f3(%rip), %rdi # 0xc7e3
leaq 0x857f(%rip), %rsi # 0xc476
leaq 0x8913(%rip), %rcx # 0xc811
movl $0x8eb, %edx # imm = 0x8EB
callq 0x2130
| _ZN5chess7movegen15isEpSquareValidILNS_5Color10underlyingE1EEEbRKNS_5BoardENS_6SquareE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
movsx r13, byte ptr [rdi+0AEh]
cmp r13, 2
jnb loc_3ECA
mov r14, rdi
mov [rsp+38h+var_34], esi
mov rbp, [rdi+r13*8+50h]
mov rax, [rdi+48h]
and rax, rbp
jz loc_3EE9
movzx r15d, r13b
mov ecx, r15d
xor ecx, 1
mov rbx, [r14+rcx*8+50h]
bsf r12, rax
mov rdi, r14
mov esi, r12d
call _ZN5chess7movegen9checkMaskILNS_5Color10underlyingE1EEESt4pairINS_8BitboardEiERKNS_5BoardENS_6SquareE; chess::movegen::checkMask<(chess::Color::underlying)1>(chess::Board const&,chess::Square)
mov rsi, [r14+40h]
mov rdx, [r14+50h]
mov ecx, r12d
shl ecx, 5
lea rdi, _ZN5chess7attacks9RookTableE; chess::attacks::RookTable
mov r8, [rcx+rdi+10h]
mov r9, [rcx+rdi]
and r9, rbx
imul r9, [rcx+rdi+8]
mov cl, [rcx+rdi+18h]
shr r9, cl
mov rcx, [r14+38h]
or rcx, rsi
and rcx, [r8+r9*8]
and rcx, rdx
jz short loc_3E14
mov r8d, r12d
shl r8d, 9
lea rdi, _ZN5chess7movegen18SQUARES_BETWEEN_BBE; chess::movegen::SQUARES_BETWEEN_BB
add rdi, r8
xor r8d, r8d
loc_3DE2:
bsf r10, rcx
mov r9, [rdi+r10*8]
bts r9, r10
mov r10, r9
and r10, rbp
lea r11, [r10-1]
xor r10, r11
cmp r10, r11
ja short loc_3E03
xor r9d, r9d
loc_3E03:
or r8, r9
lea r9, [rcx-1]
and rcx, r9
jnz short loc_3DE2
not r8
jmp short loc_3E1B
loc_3E14:
mov r8, 0FFFFFFFFFFFFFFFFh
loc_3E1B:
mov edi, r12d
shl edi, 5
lea r9, _ZN5chess7attacks11BishopTableE; chess::attacks::BishopTable
and rbx, [rdi+r9]
imul rbx, [rdi+r9+8]
mov cl, [rdi+r9+18h]
shr rbx, cl
or rsi, [r14+30h]
mov rcx, [rdi+r9+10h]
and rsi, [rcx+rbx*8]
and rsi, rdx
jz short loc_3E8A
shl r12d, 9
lea rcx, _ZN5chess7movegen18SQUARES_BETWEEN_BBE; chess::movegen::SQUARES_BETWEEN_BB
add rcx, r12
xor edx, edx
loc_3E5C:
bsf r9, rsi
mov rdi, [rcx+r9*8]
bts rdi, r9
mov r9, rdi
and r9, rbp
lea r10, [r9-1]
xor r9, r10
cmp r9, r10
ja short loc_3E7C
xor edi, edi
loc_3E7C:
or rdx, rdi
lea rdi, [rsi-1]
and rsi, rdi
jnz short loc_3E5C
jmp short loc_3E8C
loc_3E8A:
xor edx, edx
loc_3E8C:
and r8, [r14+20h]
and r8, [r14+r13*8+50h]
mov rdi, r14
mov rsi, rax
mov rcx, r8
mov r8d, [rsp+38h+var_34]
mov r9d, r15d
call _ZN5chess7movegen14generateEPMoveERKNS_5BoardENS_8BitboardES4_S4_NS_6SquareENS_5ColorE; chess::movegen::generateEPMove(chess::Board const&,chess::Bitboard,chess::Bitboard,chess::Bitboard,chess::Square,chess::Color)
mov rcx, 0FFFF0000FFFFh
test rax, rcx
setnz al
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3ECA:
lea rdi, aC0C1C1; "c == 0 || c == 1 || c == -1"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aChessColorColo; "chess::Color::Color(int)"
mov edx, 48h ; 'H'
call ___assert_fail
loc_3EE9:
lea rdi, aPiecesPiecetyp; "pieces(PieceType::KING, color) != Bitbo"...
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aSquareChessBoa; "Square chess::Board::kingSq(Color) cons"...
mov edx, 8EBh
call ___assert_fail
| bool chess::movegen::isEpSquareValid<(chess::Color::underlying)1>(long long a1, int a2)
{
int v2; // eax
unsigned long long v3; // r13
long long v5; // rbp
unsigned long long v6; // rbx
long long v7; // r12
long long v8; // rax
long long v9; // rsi
long long v10; // rdx
unsigned long long v11; // rcx
long long v12; // r8
unsigned long long v13; // r10
long long v14; // r9
long long v15; // r8
unsigned long long v16; // rsi
long long v17; // rdx
unsigned long long v18; // r9
long long v19; // rdi
long long v21; // [rsp-4h] [rbp-38h]
LODWORD(v21) = v2;
v3 = *(char *)(a1 + 174);
if ( v3 >= 2 )
__assert_fail(
"c == 0 || c == 1 || c == -1",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/./engine/../chess-library/include/chess.hpp",
72LL,
"chess::Color::Color(int)");
HIDWORD(v21) = a2;
v5 = *(_QWORD *)(a1 + 8 * v3 + 80);
if ( (v5 & *(_QWORD *)(a1 + 72)) == 0 )
__assert_fail(
"pieces(PieceType::KING, color) != Bitboard(0)",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/./engine/../chess-library/include/chess.hpp",
2283LL,
"Square chess::Board::kingSq(Color) const");
v6 = *(_QWORD *)(a1 + 8LL * ((unsigned __int8)v3 ^ 1u) + 80);
_BitScanForward64((unsigned long long *)&v7, v5 & *(_QWORD *)(a1 + 72));
v8 = chess::movegen::checkMask<(chess::Color::underlying)1>(a1, (unsigned int)v7);
v9 = *(_QWORD *)(a1 + 64);
v10 = *(_QWORD *)(a1 + 80);
v11 = v10 & *(_QWORD *)(*(_QWORD *)((char *)&chess::attacks::RookTable + (unsigned int)(32 * v7) + 16)
+ 8
* ((*(_QWORD *)((char *)&chess::attacks::RookTable + (unsigned int)(32 * v7) + 8)
* (v6 & *(_QWORD *)((_BYTE *)&chess::attacks::RookTable + (unsigned int)(32 * v7)))) >> *((_BYTE *)&chess::attacks::RookTable + (unsigned int)(32 * v7) + 24))) & (v9 | *(_QWORD *)(a1 + 56));
if ( v11 )
{
v12 = 0LL;
do
{
_BitScanForward64(&v13, v11);
v14 = *(_QWORD *)((char *)&chess::movegen::SQUARES_BETWEEN_BB[v13] + (unsigned int)((_DWORD)v7 << 9)) | (1LL << v13);
if ( (((v5 & v14) - 1) ^ v5 & (unsigned long long)v14) <= (v5 & (unsigned long long)v14) - 1 )
v14 = 0LL;
v12 |= v14;
v11 &= v11 - 1;
}
while ( v11 );
v15 = ~v12;
}
else
{
v15 = -1LL;
}
v16 = v10 & *(_QWORD *)(*(_QWORD *)((char *)&chess::attacks::BishopTable + (unsigned int)(32 * v7) + 16)
+ 8
* ((*(_QWORD *)((char *)&chess::attacks::BishopTable + (unsigned int)(32 * v7) + 8)
* (*(_QWORD *)((_BYTE *)&chess::attacks::BishopTable + (unsigned int)(32 * v7)) & v6)) >> *((_BYTE *)&chess::attacks::BishopTable + (unsigned int)(32 * v7) + 24))) & (*(_QWORD *)(a1 + 48) | v9);
if ( v16 )
{
v17 = 0LL;
do
{
_BitScanForward64(&v18, v16);
v19 = *(_QWORD *)((char *)&chess::movegen::SQUARES_BETWEEN_BB[v18] + (unsigned int)((_DWORD)v7 << 9)) | (1LL << v18);
if ( (((v5 & v19) - 1) ^ v5 & (unsigned long long)v19) <= (v5 & (unsigned long long)v19) - 1 )
v19 = 0LL;
v17 |= v19;
v16 &= v16 - 1;
}
while ( v16 );
}
else
{
v17 = 0LL;
}
return (chess::movegen::generateEPMove(
a1,
v8,
v17,
*(_QWORD *)(a1 + 8 * v3 + 80) & *(_QWORD *)(a1 + 32) & v15,
HIDWORD(v21),
(unsigned __int8)v3,
v21) & 0xFFFF0000FFFFLL) != 0;
}
| isEpSquareValid<(chess::Color::underlying)1>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOVSX R13,byte ptr [RDI + 0xae]
CMP R13,0x2
JNC 0x00103eca
MOV R14,RDI
MOV dword ptr [RSP + 0x4],ESI
MOV RBP,qword ptr [RDI + R13*0x8 + 0x50]
MOV RAX,qword ptr [RDI + 0x48]
AND RAX,RBP
JZ 0x00103ee9
MOVZX R15D,R13B
MOV ECX,R15D
XOR ECX,0x1
MOV RBX,qword ptr [R14 + RCX*0x8 + 0x50]
BSF R12,RAX
MOV RDI,R14
MOV ESI,R12D
CALL 0x001044d4
MOV RSI,qword ptr [R14 + 0x40]
MOV RDX,qword ptr [R14 + 0x50]
MOV ECX,R12D
SHL ECX,0x5
LEA RDI,[0x1eee00]
MOV R8,qword ptr [RCX + RDI*0x1 + 0x10]
MOV R9,qword ptr [RCX + RDI*0x1]
AND R9,RBX
IMUL R9,qword ptr [RCX + RDI*0x1 + 0x8]
MOV CL,byte ptr [RCX + RDI*0x1 + 0x18]
SHR R9,CL
MOV RCX,qword ptr [R14 + 0x38]
OR RCX,RSI
AND RCX,qword ptr [R8 + R9*0x8]
AND RCX,RDX
JZ 0x00103e14
MOV R8D,R12D
SHL R8D,0x9
LEA RDI,[0x1141f8]
ADD RDI,R8
XOR R8D,R8D
LAB_00103de2:
BSF R10,RCX
MOV R9,qword ptr [RDI + R10*0x8]
BTS R9,R10
MOV R10,R9
AND R10,RBP
LEA R11,[R10 + -0x1]
XOR R10,R11
CMP R10,R11
JA 0x00103e03
XOR R9D,R9D
LAB_00103e03:
OR R8,R9
LEA R9,[RCX + -0x1]
AND RCX,R9
JNZ 0x00103de2
NOT R8
JMP 0x00103e1b
LAB_00103e14:
MOV R8,-0x1
LAB_00103e1b:
MOV EDI,R12D
SHL EDI,0x5
LEA R9,[0x126600]
AND RBX,qword ptr [RDI + R9*0x1]
IMUL RBX,qword ptr [RDI + R9*0x1 + 0x8]
MOV CL,byte ptr [RDI + R9*0x1 + 0x18]
SHR RBX,CL
OR RSI,qword ptr [R14 + 0x30]
MOV RCX,qword ptr [RDI + R9*0x1 + 0x10]
AND RSI,qword ptr [RCX + RBX*0x8]
AND RSI,RDX
JZ 0x00103e8a
SHL R12D,0x9
LEA RCX,[0x1141f8]
ADD RCX,R12
XOR EDX,EDX
LAB_00103e5c:
BSF R9,RSI
MOV RDI,qword ptr [RCX + R9*0x8]
BTS RDI,R9
MOV R9,RDI
AND R9,RBP
LEA R10,[R9 + -0x1]
XOR R9,R10
CMP R9,R10
JA 0x00103e7c
XOR EDI,EDI
LAB_00103e7c:
OR RDX,RDI
LEA RDI,[RSI + -0x1]
AND RSI,RDI
JNZ 0x00103e5c
JMP 0x00103e8c
LAB_00103e8a:
XOR EDX,EDX
LAB_00103e8c:
AND R8,qword ptr [R14 + 0x20]
AND R8,qword ptr [R14 + R13*0x8 + 0x50]
MOV RDI,R14
MOV RSI,RAX
MOV RCX,R8
MOV R8D,dword ptr [RSP + 0x4]
MOV R9D,R15D
CALL 0x0010421c
MOV RCX,0xffff0000ffff
TEST RAX,RCX
SETNZ AL
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00103eca:
LEA RDI,[0x10c773]
LEA RSI,[0x10c476]
LEA RCX,[0x10c78f]
MOV EDX,0x48
CALL 0x00102130
LAB_00103ee9:
LEA RDI,[0x10c7e3]
LEA RSI,[0x10c476]
LEA RCX,[0x10c811]
MOV EDX,0x8eb
CALL 0x00102130
|
/* bool chess::movegen::isEpSquareValid<(chess::Color::underlying)1>(chess::Board const&,
chess::Square) */
bool chess::movegen::isEpSquareValid<(chess::Color::underlying)1>(long param_1,int4 param_2)
{
byte bVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
int8 uVar5;
ulong uVar6;
ulong uVar7;
ulong uVar8;
int iVar9;
ulong uVar10;
bVar1 = *(byte *)(param_1 + 0xae);
uVar10 = (ulong)(char)bVar1;
if (1 < uVar10) {
/* WARNING: Subroutine does not return */
__assert_fail("c == 0 || c == 1 || c == -1",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/./engine/../chess-library/include/chess.hpp"
,0x48,"chess::Color::Color(int)");
}
uVar2 = *(ulong *)(param_1 + 0x50 + uVar10 * 8);
uVar4 = *(ulong *)(param_1 + 0x48) & uVar2;
if (uVar4 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("pieces(PieceType::KING, color) != Bitboard(0)",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/./engine/../chess-library/include/chess.hpp"
,0x8eb,"Square chess::Board::kingSq(Color) const");
}
uVar6 = *(ulong *)(param_1 + 0x50 + (ulong)(bVar1 ^ 1) * 8);
uVar7 = 0;
if (uVar4 != 0) {
for (; (uVar4 >> uVar7 & 1) == 0; uVar7 = uVar7 + 1) {
}
}
iVar9 = (int)uVar7;
uVar5 = checkMask<(chess::Color::underlying)1>(param_1,uVar7 & 0xffffffff);
uVar4 = (ulong)(uint)(iVar9 << 5);
uVar4 = (*(ulong *)(param_1 + 0x38) | *(ulong *)(param_1 + 0x40)) &
*(ulong *)(*(long *)((long)&DAT_001eee10 + uVar4) +
((*(ulong *)((long)&attacks::RookTable + uVar4) & uVar6) *
*(long *)((long)&DAT_001eee08 + uVar4) >> ((&DAT_001eee18)[uVar4] & 0x3f)) * 8)
& *(ulong *)(param_1 + 0x50);
if (uVar4 == 0) {
uVar7 = 0xffffffffffffffff;
}
else {
uVar7 = 0;
do {
uVar3 = 0;
if (uVar4 != 0) {
for (; (uVar4 >> uVar3 & 1) == 0; uVar3 = uVar3 + 1) {
}
}
uVar8 = *(ulong *)(SQUARES_BETWEEN_BB + uVar3 * 8 + (ulong)(uint)(iVar9 << 9)) |
1L << (uVar3 & 0x3f);
uVar3 = (uVar8 & uVar2) - 1;
if ((uVar8 & uVar2 ^ uVar3) <= uVar3) {
uVar8 = 0;
}
uVar7 = uVar7 | uVar8;
uVar4 = uVar4 & uVar4 - 1;
} while (uVar4 != 0);
uVar7 = ~uVar7;
}
uVar4 = (ulong)(uint)(iVar9 << 5);
uVar4 = (*(ulong *)(param_1 + 0x40) | *(ulong *)(param_1 + 0x30)) &
*(ulong *)(*(long *)((long)&DAT_00126610 + uVar4) +
((uVar6 & *(ulong *)((long)&attacks::BishopTable + uVar4)) *
*(long *)((long)&DAT_00126608 + uVar4) >> ((&DAT_00126618)[uVar4] & 0x3f)) * 8)
& *(ulong *)(param_1 + 0x50);
if (uVar4 == 0) {
uVar6 = 0;
}
else {
uVar6 = 0;
do {
uVar3 = 0;
if (uVar4 != 0) {
for (; (uVar4 >> uVar3 & 1) == 0; uVar3 = uVar3 + 1) {
}
}
uVar8 = *(ulong *)(SQUARES_BETWEEN_BB + uVar3 * 8 + (ulong)(uint)(iVar9 << 9)) |
1L << (uVar3 & 0x3f);
uVar3 = (uVar8 & uVar2) - 1;
if ((uVar8 & uVar2 ^ uVar3) <= uVar3) {
uVar8 = 0;
}
uVar6 = uVar6 | uVar8;
uVar4 = uVar4 & uVar4 - 1;
} while (uVar4 != 0);
}
uVar10 = generateEPMove(param_1,uVar5,uVar6,
uVar7 & *(ulong *)(param_1 + 0x20) &
*(ulong *)(param_1 + 0x50 + uVar10 * 8),param_2,bVar1);
return (uVar10 & 0xffff0000ffff) != 0;
}
| |
28,032 | my_scan_mb2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_scan_mb2(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *end, int sequence_type)
{
const char *str0= str;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int res;
switch (sequence_type)
{
case MY_SEQ_SPACES:
for (res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end);
res > 0 && wc == ' ';
str+= res,
res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end))
{
}
return (size_t) (str - str0);
case MY_SEQ_NONSPACES:
DBUG_ASSERT(0); /* Not implemented */
/* pass through */
default:
return 0;
}
} | O3 | c | my_scan_mb2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x2, %ecx
jne 0xc45e0
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rbx
leaq -0x38(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *%rbx
movq %r12, -0x30(%rbp)
testl %eax, %eax
jle 0xc45da
cmpq $0x20, -0x38(%rbp)
movq -0x30(%rbp), %r12
jne 0xc45da
leaq -0x38(%rbp), %r13
movq -0x30(%rbp), %r12
movq %r12, %rcx
movl %eax, %r12d
addq %rcx, %r12
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *%rbx
testl %eax, %eax
jle 0xc45da
cmpq $0x20, -0x38(%rbp)
je 0xc45b8
subq -0x30(%rbp), %r12
jmp 0xc45e3
xorl %r12d, %r12d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_scan_mb2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
cmp ecx, 2
jnz short loc_C45E0
mov r14, rdx
mov r12, rsi
mov r15, rdi
mov rax, [rdi+0B8h]
mov rbx, [rax+28h]
lea rsi, [rbp+var_38]
mov rdx, r12
mov rcx, r14
call rbx
mov [rbp+var_30], r12
test eax, eax
jle short loc_C45DA
cmp [rbp+var_38], 20h ; ' '
mov r12, [rbp+var_30]
jnz short loc_C45DA
lea r13, [rbp+var_38]
mov r12, [rbp+var_30]
loc_C45B8:
mov rcx, r12
mov r12d, eax
add r12, rcx
mov rdi, r15
mov rsi, r13
mov rdx, r12
mov rcx, r14
call rbx
test eax, eax
jle short loc_C45DA
cmp [rbp+var_38], 20h ; ' '
jz short loc_C45B8
loc_C45DA:
sub r12, [rbp+var_30]
jmp short loc_C45E3
loc_C45E0:
xor r12d, r12d
loc_C45E3:
mov rax, r12
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_scan_mb2(long long a1, long long a2, long long a3, int a4)
{
long long v5; // r12
long long ( *v6)(long long, long long *, long long, long long); // rbx
int v7; // eax
long long v10; // [rsp+8h] [rbp-38h] BYREF
long long v11; // [rsp+10h] [rbp-30h]
if ( a4 != 2 )
return 0LL;
v5 = a2;
v6 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v7 = v6(a1, &v10, a2, a3);
v11 = a2;
if ( v7 > 0 )
{
v5 = v11;
if ( v10 == 32 )
{
v5 = v11;
do
{
v5 += (unsigned int)v7;
v7 = v6(a1, &v10, v5, a3);
}
while ( v7 > 0 && v10 == 32 );
}
}
return v5 - v11;
}
| my_scan_mb2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CMP ECX,0x2
JNZ 0x001c45e0
MOV R14,RDX
MOV R12,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0xb8]
MOV RBX,qword ptr [RAX + 0x28]
LEA RSI,[RBP + -0x38]
MOV RDX,R12
MOV RCX,R14
CALL RBX
MOV qword ptr [RBP + -0x30],R12
TEST EAX,EAX
JLE 0x001c45da
CMP qword ptr [RBP + -0x38],0x20
MOV R12,qword ptr [RBP + -0x30]
JNZ 0x001c45da
LEA R13,[RBP + -0x38]
MOV R12,qword ptr [RBP + -0x30]
LAB_001c45b8:
MOV RCX,R12
MOV R12D,EAX
ADD R12,RCX
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
MOV RCX,R14
CALL RBX
TEST EAX,EAX
JLE 0x001c45da
CMP qword ptr [RBP + -0x38],0x20
JZ 0x001c45b8
LAB_001c45da:
SUB R12,qword ptr [RBP + -0x30]
JMP 0x001c45e3
LAB_001c45e0:
XOR R12D,R12D
LAB_001c45e3:
MOV RAX,R12
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_scan_mb2(long param_1,long param_2,int8 param_3,int param_4)
{
code *pcVar1;
uint uVar2;
long local_40;
long local_38;
if (param_4 == 2) {
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
uVar2 = (*pcVar1)(param_1,&local_40,param_2,param_3);
local_38 = param_2;
if ((0 < (int)uVar2) && (local_40 == 0x20)) {
do {
param_2 = (ulong)uVar2 + param_2;
uVar2 = (*pcVar1)(param_1,&local_40,param_2,param_3);
if ((int)uVar2 < 1) break;
} while (local_40 == 0x20);
}
param_2 = param_2 - local_38;
}
else {
param_2 = 0;
}
return param_2;
}
| |
28,033 | downheap | eloqsql/mysys/queues.c | void _downheap(QUEUE *queue, uint idx)
{
uchar *element= queue->root[idx];
uint next_index,
elements= queue->elements,
half_queue= elements >> 1,
offset_to_key= queue->offset_to_key,
offset_to_queue_pos= queue->offset_to_queue_pos;
while (idx <= half_queue)
{
next_index= idx+idx;
if (next_index < elements &&
(queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
queue->root[next_index+1]+offset_to_key) *
queue->max_at_top) > 0)
next_index++;
if ((queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
element+offset_to_key) * queue->max_at_top) >= 0)
break;
queue->root[idx]= queue->root[next_index];
if (offset_to_queue_pos)
(*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx;
idx= next_index;
}
queue->root[idx]=element;
if (offset_to_queue_pos)
(*(uint*) (element + offset_to_queue_pos-1))= idx;
} | O3 | c | downheap:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq (%rdi), %rax
movl %esi, %r13d
movq (%rax,%r13,8), %rcx
movl 0x10(%rdi), %edx
movl %edx, -0x30(%rbp)
shrl %edx
movl 0x1c(%rdi), %r15d
movl %edx, -0x2c(%rbp)
cmpl %esi, %edx
jb 0xa3416
movq %rdi, %r14
movl 0x18(%rdi), %eax
movq %rcx, -0x40(%rbp)
movq %rax, -0x38(%rbp)
addq %rcx, %rax
movq %rax, -0x48(%rbp)
leal (%rbx,%rbx), %r12d
movq (%r14), %rax
cmpl -0x30(%rbp), %r12d
jae 0xa33b9
movq 0x8(%r14), %rdi
movl %r12d, %ecx
movq (%rax,%rcx,8), %rsi
movq -0x38(%rbp), %rcx
addq %rcx, %rsi
movl %r12d, %r13d
orl $0x1, %r13d
movq (%rax,%r13,8), %rdx
addq %rcx, %rdx
callq *0x28(%r14)
imull 0x24(%r14), %eax
testl %eax, %eax
jg 0xa33b3
movl %r12d, %r13d
movq (%r14), %rax
movl %r13d, %r12d
movq 0x8(%r14), %rdi
movl %r12d, %r13d
movq (%rax,%r13,8), %rsi
addq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq *0x28(%r14)
imull 0x24(%r14), %eax
testl %eax, %eax
jns 0xa3406
movq (%r14), %rcx
movq (%rcx,%r13,8), %rdx
movl %ebx, %eax
movq %rdx, (%rcx,%rax,8)
testq %r15, %r15
je 0xa33f7
movq (%r14), %rcx
movq (%rcx,%rax,8), %rax
movl %ebx, -0x1(%rax,%r15)
movl %r12d, %ebx
cmpl -0x2c(%rbp), %r12d
jbe 0xa3376
jmp 0xa340c
movl %ebx, %r13d
movl %ebx, %r12d
movq (%r14), %rax
movl %r12d, %ebx
movq -0x40(%rbp), %rcx
movq %rcx, (%rax,%r13,8)
testq %r15, %r15
je 0xa3424
movl %ebx, -0x1(%rcx,%r15)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _downheap:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, esi
mov rax, [rdi]
mov r13d, esi
mov rcx, [rax+r13*8]
mov edx, [rdi+10h]
mov [rbp+var_30], edx
shr edx, 1
mov r15d, [rdi+1Ch]
mov [rbp+var_2C], edx
cmp edx, esi
jb loc_A3416
mov r14, rdi
mov eax, [rdi+18h]
mov [rbp+var_40], rcx
mov [rbp+var_38], rax
add rax, rcx
mov [rbp+var_48], rax
loc_A3376:
lea r12d, [rbx+rbx]
mov rax, [r14]
cmp r12d, [rbp+var_30]
jnb short loc_A33B9
mov rdi, [r14+8]
mov ecx, r12d
mov rsi, [rax+rcx*8]
mov rcx, [rbp+var_38]
add rsi, rcx
mov r13d, r12d
or r13d, 1
mov rdx, [rax+r13*8]
add rdx, rcx
call qword ptr [r14+28h]
imul eax, [r14+24h]
test eax, eax
jg short loc_A33B3
mov r13d, r12d
loc_A33B3:
mov rax, [r14]
mov r12d, r13d
loc_A33B9:
mov rdi, [r14+8]
mov r13d, r12d
mov rsi, [rax+r13*8]
add rsi, [rbp+var_38]
mov rdx, [rbp+var_48]
call qword ptr [r14+28h]
imul eax, [r14+24h]
test eax, eax
jns short loc_A3406
mov rcx, [r14]
mov rdx, [rcx+r13*8]
mov eax, ebx
mov [rcx+rax*8], rdx
test r15, r15
jz short loc_A33F7
mov rcx, [r14]
mov rax, [rcx+rax*8]
mov [rax+r15-1], ebx
loc_A33F7:
mov ebx, r12d
cmp r12d, [rbp+var_2C]
jbe loc_A3376
jmp short loc_A340C
loc_A3406:
mov r13d, ebx
mov r12d, ebx
loc_A340C:
mov rax, [r14]
mov ebx, r12d
mov rcx, [rbp+var_40]
loc_A3416:
mov [rax+r13*8], rcx
test r15, r15
jz short loc_A3424
mov [rcx+r15-1], ebx
loc_A3424:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long downheap(long long *a1, unsigned int a2)
{
unsigned int v2; // ebx
long long result; // rax
long long v4; // r13
long long v5; // rcx
long long v6; // r15
unsigned int v7; // r12d
long long v8; // rax
long long v9; // r13
long long v10; // [rsp+8h] [rbp-48h]
long long v11; // [rsp+10h] [rbp-40h]
long long v12; // [rsp+18h] [rbp-38h]
unsigned int v13; // [rsp+20h] [rbp-30h]
v2 = a2;
result = *a1;
v4 = a2;
v5 = *(_QWORD *)(*a1 + 8LL * a2);
v13 = *((_DWORD *)a1 + 4);
v6 = *((unsigned int *)a1 + 7);
if ( v13 >> 1 >= a2 )
{
v11 = *(_QWORD *)(*a1 + 8LL * a2);
v12 = *((unsigned int *)a1 + 6);
v10 = v5 + v12;
while ( 1 )
{
v7 = 2 * v2;
v8 = *a1;
if ( 2 * v2 < v13 )
{
v9 = v7 | 1;
if ( (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, long long, long long))a1[5])(
a1[1],
v12 + *(_QWORD *)(v8 + 8LL * v7),
v12 + *(_QWORD *)(v8 + 8 * v9))) <= 0 )
LODWORD(v9) = 2 * v2;
v8 = *a1;
v7 = v9;
}
v4 = v7;
if ( (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, long long, long long))a1[5])(
a1[1],
v12 + *(_QWORD *)(v8 + 8LL * v7),
v10)) >= 0 )
break;
*(_QWORD *)(*a1 + 8LL * v2) = *(_QWORD *)(*a1 + 8LL * v7);
if ( v6 )
*(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v2) + v6 - 1) = v2;
v2 = v7;
if ( v7 > v13 >> 1 )
goto LABEL_13;
}
v4 = v2;
v7 = v2;
LABEL_13:
result = *a1;
v2 = v7;
v5 = v11;
}
*(_QWORD *)(result + 8 * v4) = v5;
if ( v6 )
*(_DWORD *)(v5 + v6 - 1) = v2;
return result;
}
| _downheap:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,ESI
MOV RAX,qword ptr [RDI]
MOV R13D,ESI
MOV RCX,qword ptr [RAX + R13*0x8]
MOV EDX,dword ptr [RDI + 0x10]
MOV dword ptr [RBP + -0x30],EDX
SHR EDX,0x1
MOV R15D,dword ptr [RDI + 0x1c]
MOV dword ptr [RBP + -0x2c],EDX
CMP EDX,ESI
JC 0x001a3416
MOV R14,RDI
MOV EAX,dword ptr [RDI + 0x18]
MOV qword ptr [RBP + -0x40],RCX
MOV qword ptr [RBP + -0x38],RAX
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
LAB_001a3376:
LEA R12D,[RBX + RBX*0x1]
MOV RAX,qword ptr [R14]
CMP R12D,dword ptr [RBP + -0x30]
JNC 0x001a33b9
MOV RDI,qword ptr [R14 + 0x8]
MOV ECX,R12D
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RBP + -0x38]
ADD RSI,RCX
MOV R13D,R12D
OR R13D,0x1
MOV RDX,qword ptr [RAX + R13*0x8]
ADD RDX,RCX
CALL qword ptr [R14 + 0x28]
IMUL EAX,dword ptr [R14 + 0x24]
TEST EAX,EAX
JG 0x001a33b3
MOV R13D,R12D
LAB_001a33b3:
MOV RAX,qword ptr [R14]
MOV R12D,R13D
LAB_001a33b9:
MOV RDI,qword ptr [R14 + 0x8]
MOV R13D,R12D
MOV RSI,qword ptr [RAX + R13*0x8]
ADD RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x48]
CALL qword ptr [R14 + 0x28]
IMUL EAX,dword ptr [R14 + 0x24]
TEST EAX,EAX
JNS 0x001a3406
MOV RCX,qword ptr [R14]
MOV RDX,qword ptr [RCX + R13*0x8]
MOV EAX,EBX
MOV qword ptr [RCX + RAX*0x8],RDX
TEST R15,R15
JZ 0x001a33f7
MOV RCX,qword ptr [R14]
MOV RAX,qword ptr [RCX + RAX*0x8]
MOV dword ptr [RAX + R15*0x1 + -0x1],EBX
LAB_001a33f7:
MOV EBX,R12D
CMP R12D,dword ptr [RBP + -0x2c]
JBE 0x001a3376
JMP 0x001a340c
LAB_001a3406:
MOV R13D,EBX
MOV R12D,EBX
LAB_001a340c:
MOV RAX,qword ptr [R14]
MOV EBX,R12D
MOV RCX,qword ptr [RBP + -0x40]
LAB_001a3416:
MOV qword ptr [RAX + R13*0x8],RCX
TEST R15,R15
JZ 0x001a3424
MOV dword ptr [RCX + R15*0x1 + -0x1],EBX
LAB_001a3424:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void _downheap(long *param_1,uint param_2)
{
uint uVar1;
long lVar2;
uint uVar3;
int iVar4;
ulong uVar5;
long lVar6;
uint uVar7;
uint uVar8;
ulong uVar9;
ulong uVar10;
lVar6 = *param_1;
uVar9 = (ulong)param_2;
lVar2 = *(long *)(lVar6 + uVar9 * 8);
uVar1 = *(uint *)(param_1 + 2);
uVar7 = uVar1 >> 1;
uVar10 = (ulong)*(uint *)((long)param_1 + 0x1c);
if (param_2 <= uVar7) {
uVar5 = (ulong)*(uint *)(param_1 + 3);
uVar8 = param_2;
do {
uVar3 = uVar8 * 2;
uVar9 = (ulong)uVar3;
lVar6 = *param_1;
if (uVar3 < uVar1) {
uVar9 = (ulong)(uVar3 | 1);
iVar4 = (*(code *)param_1[5])
(param_1[1],*(long *)(lVar6 + (ulong)uVar3 * 8) + uVar5,
*(long *)(lVar6 + uVar9 * 8) + uVar5);
if (iVar4 * *(int *)((long)param_1 + 0x24) < 1) {
uVar9 = (ulong)uVar3;
}
lVar6 = *param_1;
}
param_2 = (uint)uVar9;
iVar4 = (*(code *)param_1[5])(param_1[1],*(long *)(lVar6 + uVar9 * 8) + uVar5,uVar5 + lVar2);
if (-1 < iVar4 * *(int *)((long)param_1 + 0x24)) {
uVar9 = (ulong)uVar8;
param_2 = uVar8;
break;
}
*(int8 *)(*param_1 + (ulong)uVar8 * 8) = *(int8 *)(*param_1 + uVar9 * 8);
if (uVar10 != 0) {
*(uint *)(*(long *)(*param_1 + (ulong)uVar8 * 8) + -1 + uVar10) = uVar8;
}
uVar8 = param_2;
} while (param_2 <= uVar7);
lVar6 = *param_1;
}
*(long *)(lVar6 + uVar9 * 8) = lVar2;
if (uVar10 != 0) {
*(uint *)(lVar2 + -1 + uVar10) = param_2;
}
return;
}
| |
28,034 | nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*) | ng-log[P]ng-log/src/signalhandler.cc | void DumpStackFrameInfo(const char* prefix, void* pc) {
// Get the symbol name.
const char* symbol = "(unknown)";
#if defined(HAVE_SYMBOLIZE)
char symbolized[1024]; // Big enough for a sane symbol.
// Symbolizes the previous address of pc because pc may be in the
// next function.
if (Symbolize(reinterpret_cast<char*>(pc) - 1, symbolized,
sizeof(symbolized))) {
symbol = symbolized;
}
#else
# pragma message( \
"Symbolize functionality is not available for target platform: stack dump will contain empty frames.")
#endif // defined(HAVE_SYMBOLIZE)
char buf[1024]; // Big enough for stack frame info.
MinimalFormatter formatter(buf, sizeof(buf));
formatter.AppendString(prefix);
formatter.AppendString("@ ");
const int width = 2 * sizeof(void*) + 2; // + 2 for "0x".
formatter.AppendHexWithPadding(reinterpret_cast<uintptr_t>(pc), width);
formatter.AppendString(" ");
formatter.AppendString(symbol);
formatter.AppendString("\n");
g_failure_writer(buf, formatter.num_bytes_written());
} | O1 | cpp | nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x820, %rsp # imm = 0x820
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x1(%rsi), %rdi
leaq 0x420(%rsp), %r15
xorl %r13d, %r13d
movl $0x400, %edx # imm = 0x400
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x2154a
leaq 0x2a18(%rip), %r12 # 0x239a0
testb %al, %al
cmovneq %r15, %r12
leaq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x10(%rsp)
leaq 0x420(%rsp), %rax
movq %rax, 0x18(%rsp)
movb (%r14), %al
testb %al, %al
je 0x20fd6
xorl %r13d, %r13d
cmpq $0x400, %r13 # imm = 0x400
je 0x20fd0
movb %al, 0x20(%rsp,%r13)
movb 0x1(%r14,%r13), %al
incq %r13
testb %al, %al
jne 0x20fb4
jmp 0x20fd6
movl $0x400, %r13d # imm = 0x400
leaq (%rsp,%r13), %rax
addq $0x20, %rax
movq %rax, 0x10(%rsp)
movb $0x40, %cl
xorl %eax, %eax
leaq 0x4141(%rip), %rdx # 0x2512f
movq %r13, %rsi
cmpq $0x3ff, %rsi # imm = 0x3FF
ja 0x2100e
movb %cl, 0x20(%rsp,%rsi)
movb 0x1(%rax,%rdx), %cl
incq %rax
incq %rsi
cmpq $0x2, %rax
jne 0x20ff1
addq %r13, %rax
leaq (%rsp,%rax), %r14
addq $0x20, %r14
movq %r14, 0x10(%rsp)
movb $0x30, %dl
xorl %ecx, %ecx
leaq 0x420b(%rip), %rsi # 0x25234
cmpq $0x3ff, %rax # imm = 0x3FF
ja 0x2104a
movb %dl, 0x20(%rsp,%rax)
movb 0x1(%rcx,%rsi), %dl
incq %rcx
incq %rax
cmpq $0x2, %rcx
jne 0x21029
movl $0x2, %ecx
addq %r14, %rcx
leaq 0x8(%rsp), %r15
movq %rcx, 0x8(%r15)
movq %r15, %rdi
movq %rbx, %rsi
movl $0x10, %edx
callq 0x2112c
movq 0x8(%r15), %r13
leaq 0x12(%r14), %r15
cmpq %r15, %r13
jae 0x210a7
movq %r15, %rbx
subq %r13, %rbx
movq %r13, %rdx
subq %r14, %rdx
je 0x2108d
leaq (%r14,%rbx), %rdi
movq %r14, %rsi
callq 0x78a0
cmpq %r13, %r15
je 0x210a2
movq %r14, %rdi
movl $0x20, %esi
movq %rbx, %rdx
callq 0x72b0
movq %r15, 0x10(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
cmpq %rax, %rsi
jae 0x210c0
movb $0x20, (%rsi)
movl $0x1, %ecx
jmp 0x210c2
xorl %ecx, %ecx
addq %rcx, %rsi
movq %rsi, 0x10(%rsp)
movb (%r12), %dl
xorl %ecx, %ecx
testb %dl, %dl
je 0x210e9
leaq (%rsi,%rcx), %rdi
cmpq %rax, %rdi
jae 0x210e9
movb %dl, (%rdi)
movb 0x1(%r12,%rcx), %dl
incq %rcx
jmp 0x210d0
addq %rcx, %rsi
movq %rsi, 0x10(%rsp)
cmpq %rax, %rsi
jae 0x21100
movb $0xa, (%rsi)
movl $0x1, %eax
jmp 0x21102
xorl %eax, %eax
addq %rax, %rsi
movq %rsi, 0x10(%rsp)
subq 0x8(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq *0x10846(%rip) # 0x31960
addq $0x820, %rsp # imm = 0x820
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
| _ZN5nglog12_GLOBAL__N_118DumpStackFrameInfoEPKcPv:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 820h
mov rbx, rsi
mov r14, rdi
lea rdi, [rsi-1]
lea r15, [rsp+848h+var_428]
xor r13d, r13d
mov edx, 400h
mov rsi, r15
xor ecx, ecx
call _ZN5nglog5tools9SymbolizeEPvPcmNS0_16SymbolizeOptionsE; nglog::tools::Symbolize(void *,char *,ulong,nglog::tools::SymbolizeOptions)
lea r12, aUnknown; "(unknown)"
test al, al
cmovnz r12, r15
lea rax, [rsp+848h+var_828]
mov [rsp+848h+var_840], rax
mov [rsp+848h+var_838], rax
lea rax, [rsp+848h+var_428]
mov [rsp+848h+var_830], rax
mov al, [r14]
test al, al
jz short loc_20FD6
xor r13d, r13d
loc_20FB4:
cmp r13, 400h
jz short loc_20FD0
mov [rsp+r13+848h+var_828], al
mov al, [r14+r13+1]
inc r13
test al, al
jnz short loc_20FB4
jmp short loc_20FD6
loc_20FD0:
mov r13d, 400h
loc_20FD6:
lea rax, [rsp+r13+848h+var_848]
add rax, 20h ; ' '
mov [rsp+848h+var_838], rax
mov cl, 40h ; '@'
xor eax, eax
lea rdx, asc_2512F; "@ "
mov rsi, r13
loc_20FF1:
cmp rsi, 3FFh
ja short loc_2100E
mov [rsp+rsi+848h+var_828], cl
mov cl, [rax+rdx+1]
inc rax
inc rsi
cmp rax, 2
jnz short loc_20FF1
loc_2100E:
add rax, r13
lea r14, [rsp+rax+848h+var_848]
add r14, 20h ; ' '
mov [rsp+848h+var_838], r14
mov dl, 30h ; '0'
xor ecx, ecx
lea rsi, a0x_0+1; "0x"
loc_21029:
cmp rax, 3FFh
ja short loc_2104A
mov [rsp+rax+848h+var_828], dl
mov dl, [rcx+rsi+1]
inc rcx
inc rax
cmp rcx, 2
jnz short loc_21029
mov ecx, 2
loc_2104A:
add rcx, r14
lea r15, [rsp+848h+var_840]
mov [r15+8], rcx
mov rdi, r15; this
mov rsi, rbx; unsigned __int64
mov edx, 10h; unsigned int
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj; nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(ulong,uint)
mov r13, [r15+8]
lea r15, [r14+12h]
cmp r13, r15
jnb short loc_210A7
mov rbx, r15
sub rbx, r13
mov rdx, r13
sub rdx, r14
jz short loc_2108D
lea rdi, [r14+rbx]
mov rsi, r14
call _memmove
loc_2108D:
cmp r15, r13
jz short loc_210A2
mov rdi, r14
mov esi, 20h ; ' '
mov rdx, rbx
call _memset
loc_210A2:
mov [rsp+848h+var_838], r15
loc_210A7:
mov rsi, [rsp+848h+var_838]
mov rax, [rsp+848h+var_830]
cmp rsi, rax
jnb short loc_210C0
mov byte ptr [rsi], 20h ; ' '
mov ecx, 1
jmp short loc_210C2
loc_210C0:
xor ecx, ecx
loc_210C2:
add rsi, rcx
mov [rsp+848h+var_838], rsi
mov dl, [r12]; unsigned __int64
xor ecx, ecx
loc_210D0:
test dl, dl
jz short loc_210E9
lea rdi, [rsi+rcx]
cmp rdi, rax
jnb short loc_210E9
mov [rdi], dl
mov dl, [r12+rcx+1]
inc rcx
jmp short loc_210D0
loc_210E9:
add rsi, rcx
mov [rsp+848h+var_838], rsi
cmp rsi, rax
jnb short loc_21100
mov byte ptr [rsi], 0Ah
mov eax, 1
jmp short loc_21102
loc_21100:
xor eax, eax
loc_21102:
add rsi, rax
mov [rsp+848h+var_838], rsi
sub rsi, [rsp+848h+var_840]; char *
lea rdi, [rsp+848h+var_828]; this
call cs:_ZN5nglog12_GLOBAL__N_116g_failure_writerE; nglog::`anonymous namespace'::WriteToStderr(char const*,ulong)
add rsp, 820h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long nglog::`anonymous namespace'::DumpStackFrameInfo(
nglog::_anonymous_namespace_ *this,
const char *a2,
void *a3)
{
long long v4; // r13
const char *v5; // r12
char v6; // al
char v7; // cl
long long v8; // rax
unsigned long long v9; // rsi
unsigned long long v10; // rax
_BYTE *v11; // r14
char v12; // dl
long long v13; // rcx
unsigned long long v14; // rdx
_BYTE *v15; // r13
_BYTE *v16; // r15
_BYTE *v17; // rsi
_BYTE *v18; // rax
long long v19; // rcx
_BYTE *v20; // rsi
long long i; // rcx
_BYTE *v22; // rsi
long long v23; // rax
_BYTE *v25; // [rsp+8h] [rbp-840h] BYREF
_BYTE *v26; // [rsp+10h] [rbp-838h]
_BYTE *v27; // [rsp+18h] [rbp-830h]
_BYTE v28[1024]; // [rsp+20h] [rbp-828h] BYREF
_BYTE v29[1064]; // [rsp+420h] [rbp-428h] BYREF
v4 = 0LL;
v5 = "(unknown)";
if ( (unsigned __int8)nglog::tools::Symbolize(a2 - 1, v29, 1024LL, 0LL) )
v5 = v29;
v25 = v28;
v26 = v28;
v27 = v29;
v6 = *(_BYTE *)this;
if ( *(_BYTE *)this )
{
v4 = 0LL;
while ( v4 != 1024 )
{
v28[v4] = v6;
v6 = *((_BYTE *)this + ++v4);
if ( !v6 )
goto LABEL_9;
}
v4 = 1024LL;
}
LABEL_9:
v26 = &v28[v4];
v7 = 64;
v8 = 0LL;
v9 = v4;
do
{
if ( v9 > 0x3FF )
break;
v28[v9] = v7;
v7 = asc_2512F[++v8];
++v9;
}
while ( v8 != 2 );
v10 = v4 + v8;
v11 = &v28[v10];
v26 = &v28[v10];
v12 = 48;
v13 = 0LL;
while ( v10 <= 0x3FF )
{
v28[v10] = v12;
v12 = a0x_0[v13 + 2];
++v13;
++v10;
if ( v13 == 2 )
{
v13 = 2LL;
break;
}
}
v26 = &v11[v13];
nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(
(nglog::_anonymous_namespace_::MinimalFormatter *)&v25,
(unsigned long long)a2,
0x10u);
v15 = v26;
v16 = v11 + 18;
if ( v26 < v11 + 18 )
{
v14 = v26 - v11;
if ( v26 != v11 )
memmove(&v11[v16 - v26], v11, v14);
if ( v16 != v15 )
memset(v11, 32LL, v16 - v15);
v26 = v11 + 18;
}
v17 = v26;
v18 = v27;
if ( v26 >= v27 )
{
v19 = 0LL;
}
else
{
*v26 = 32;
v19 = 1LL;
}
v20 = &v17[v19];
v26 = v20;
LOBYTE(v14) = *v5;
for ( i = 0LL; (_BYTE)v14 && &v20[i] < v18; ++i )
{
v20[i] = v14;
LOBYTE(v14) = v5[i + 1];
}
v22 = &v20[i];
v26 = v22;
if ( v22 >= v18 )
{
v23 = 0LL;
}
else
{
*v22 = 10;
v23 = 1LL;
}
v26 = &v22[v23];
return nglog::`anonymous namespace'::g_failure_writer(
(nglog::_anonymous_namespace_ *)v28,
(const char *)(&v22[v23] - v25),
v14);
}
| DumpStackFrameInfo:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x820
MOV RBX,RSI
MOV R14,RDI
LEA RDI,[RSI + -0x1]
LEA R15,[RSP + 0x420]
XOR R13D,R13D
MOV EDX,0x400
MOV RSI,R15
XOR ECX,ECX
CALL 0x0012154a
LEA R12,[0x1239a0]
TEST AL,AL
CMOVNZ R12,R15
LEA RAX,[RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RAX
LEA RAX,[RSP + 0x420]
MOV qword ptr [RSP + 0x18],RAX
MOV AL,byte ptr [R14]
TEST AL,AL
JZ 0x00120fd6
XOR R13D,R13D
LAB_00120fb4:
CMP R13,0x400
JZ 0x00120fd0
MOV byte ptr [RSP + R13*0x1 + 0x20],AL
MOV AL,byte ptr [R14 + R13*0x1 + 0x1]
INC R13
TEST AL,AL
JNZ 0x00120fb4
JMP 0x00120fd6
LAB_00120fd0:
MOV R13D,0x400
LAB_00120fd6:
LEA RAX,[RSP + R13*0x1]
ADD RAX,0x20
MOV qword ptr [RSP + 0x10],RAX
MOV CL,0x40
XOR EAX,EAX
LEA RDX,[0x12512f]
MOV RSI,R13
LAB_00120ff1:
CMP RSI,0x3ff
JA 0x0012100e
MOV byte ptr [RSP + RSI*0x1 + 0x20],CL
MOV CL,byte ptr [RAX + RDX*0x1 + 0x1]
INC RAX
INC RSI
CMP RAX,0x2
JNZ 0x00120ff1
LAB_0012100e:
ADD RAX,R13
LEA R14,[RSP + RAX*0x1]
ADD R14,0x20
MOV qword ptr [RSP + 0x10],R14
MOV DL,0x30
XOR ECX,ECX
LEA RSI,[0x125234]
LAB_00121029:
CMP RAX,0x3ff
JA 0x0012104a
MOV byte ptr [RSP + RAX*0x1 + 0x20],DL
MOV DL,byte ptr [RCX + RSI*0x1 + 0x1]
INC RCX
INC RAX
CMP RCX,0x2
JNZ 0x00121029
MOV ECX,0x2
LAB_0012104a:
ADD RCX,R14
LEA R15,[RSP + 0x8]
MOV qword ptr [R15 + 0x8],RCX
MOV RDI,R15
MOV RSI,RBX
MOV EDX,0x10
CALL 0x0012112c
MOV R13,qword ptr [R15 + 0x8]
LEA R15,[R14 + 0x12]
CMP R13,R15
JNC 0x001210a7
MOV RBX,R15
SUB RBX,R13
MOV RDX,R13
SUB RDX,R14
JZ 0x0012108d
LEA RDI,[R14 + RBX*0x1]
MOV RSI,R14
CALL 0x001078a0
LAB_0012108d:
CMP R15,R13
JZ 0x001210a2
MOV RDI,R14
MOV ESI,0x20
MOV RDX,RBX
CALL 0x001072b0
LAB_001210a2:
MOV qword ptr [RSP + 0x10],R15
LAB_001210a7:
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
CMP RSI,RAX
JNC 0x001210c0
MOV byte ptr [RSI],0x20
MOV ECX,0x1
JMP 0x001210c2
LAB_001210c0:
XOR ECX,ECX
LAB_001210c2:
ADD RSI,RCX
MOV qword ptr [RSP + 0x10],RSI
MOV DL,byte ptr [R12]
XOR ECX,ECX
LAB_001210d0:
TEST DL,DL
JZ 0x001210e9
LEA RDI,[RSI + RCX*0x1]
CMP RDI,RAX
JNC 0x001210e9
MOV byte ptr [RDI],DL
MOV DL,byte ptr [R12 + RCX*0x1 + 0x1]
INC RCX
JMP 0x001210d0
LAB_001210e9:
ADD RSI,RCX
MOV qword ptr [RSP + 0x10],RSI
CMP RSI,RAX
JNC 0x00121100
MOV byte ptr [RSI],0xa
MOV EAX,0x1
JMP 0x00121102
LAB_00121100:
XOR EAX,EAX
LAB_00121102:
ADD RSI,RAX
MOV qword ptr [RSP + 0x10],RSI
SUB RSI,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x20]
CALL qword ptr [0x00131960]
ADD RSP,0x820
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*) */
void nglog::(anonymous_namespace)::DumpStackFrameInfo(char *param_1,void *param_2)
{
char *pcVar1;
char *pcVar2;
char *pcVar3;
char cVar4;
long lVar5;
size_t __n;
ulong uVar6;
char *pcVar7;
ulong uVar8;
char *__src;
bool bVar9;
char acStack_103e [2030];
int8 uStack_850;
char *local_840;
char *local_838;
char *local_830;
char local_828 [2048];
uVar8 = 0;
uStack_850 = 0x120f81;
cVar4 = tools::Symbolize((long)param_2 + -1,local_828 + 0x400,0x400,0);
pcVar7 = "(unknown)";
if (cVar4 != '\0') {
pcVar7 = local_828 + 0x400;
}
local_840 = local_828;
local_830 = local_828 + 0x400;
cVar4 = *param_1;
if (cVar4 != '\0') {
uVar8 = 0;
do {
if (uVar8 == 0x400) {
uVar8 = 0x400;
break;
}
local_828[uVar8] = cVar4;
cVar4 = param_1[uVar8 + 1];
uVar8 = uVar8 + 1;
} while (cVar4 != '\0');
}
cVar4 = '@';
lVar5 = 0;
uVar6 = uVar8;
do {
if (0x3ff < uVar6) break;
local_828[uVar6] = cVar4;
cVar4 = (&DAT_00125130)[lVar5];
lVar5 = lVar5 + 1;
uVar6 = uVar6 + 1;
} while (lVar5 != 2);
uVar8 = lVar5 + uVar8;
__src = local_828 + uVar8;
cVar4 = '0';
lVar5 = 0;
uVar6 = uVar8;
do {
if (0x3ff < uVar6) goto LAB_0012104a;
local_828[uVar6] = cVar4;
cVar4 = (&DAT_00125235)[lVar5];
lVar5 = lVar5 + 1;
uVar6 = uVar6 + 1;
} while (lVar5 != 2);
lVar5 = 2;
LAB_0012104a:
local_838 = __src + lVar5;
uStack_850 = 0x121066;
MinimalFormatter::AppendUint64((MinimalFormatter *)&local_840,(ulong)param_2,0x10);
pcVar2 = local_838;
pcVar1 = local_828 + uVar8 + 0x12;
pcVar3 = local_838;
if (local_838 < pcVar1) {
__n = (long)pcVar1 - (long)local_838;
if ((long)local_838 - (long)__src != 0) {
uStack_850 = 0x12108d;
memmove(__src + __n,__src,(long)local_838 - (long)__src);
}
pcVar3 = pcVar1;
if (pcVar1 != pcVar2) {
uStack_850 = 0x1210a2;
memset(__src,0x20,__n);
}
}
local_838 = pcVar3;
bVar9 = local_838 < local_830;
if (bVar9) {
*local_838 = ' ';
}
cVar4 = *pcVar7;
for (lVar5 = 0; (cVar4 != '\0' && (local_838 + lVar5 + (ulong)bVar9 < local_830));
lVar5 = lVar5 + 1) {
local_838[lVar5 + (ulong)bVar9] = cVar4;
cVar4 = pcVar7[lVar5 + 1];
}
local_838 = local_838 + lVar5 + (ulong)bVar9;
if (local_838 < local_830) {
*local_838 = '\n';
}
local_838 = local_838 + (local_838 < local_830);
uStack_850 = 0x12111a;
(*(code *)g_failure_writer)(local_828,(long)local_838 - (long)local_840);
return;
}
| |
28,035 | diagnostic_context_create | eshkol/src/core/diagnostics/diagnostics.c | DiagnosticContext* diagnostic_context_create(Arena* arena) {
assert(arena != NULL);
// Allocate context
DiagnosticContext* context = arena_alloc(arena, sizeof(DiagnosticContext));
if (!context) return NULL;
// Initialize context
context->arena = arena;
context->diagnostics.items = NULL;
context->diagnostics.count = 0;
context->diagnostics.capacity = 0;
context->error_count = 0;
context->verbosity = VERBOSITY_NORMAL; // Default to normal verbosity
return context;
} | O3 | c | diagnostic_context_create:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3a7f
movq %rdi, %rbx
movl $0x30, %esi
callq 0x32ff
testq %rax, %rax
je 0x3a78
movq %rbx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movl $0x0, 0x28(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x67c4(%rip), %rdi # 0xa24a
leaq 0x7997(%rip), %rsi # 0xb424
leaq 0x79db(%rip), %rcx # 0xb46f
movl $0x2c, %edx
callq 0x10b0
| diagnostic_context_create:
push rbp
mov rbp, rsp
push rbx
push rax
test rdi, rdi
jz short loc_3A7F
mov rbx, rdi
mov esi, 30h ; '0'
call arena_alloc
test rax, rax
jz short loc_3A78
mov [rax], rbx
xorps xmm0, xmm0
movups xmmword ptr [rax+8], xmm0
movups xmmword ptr [rax+18h], xmm0
mov dword ptr [rax+28h], 0
loc_3A78:
add rsp, 8
pop rbx
pop rbp
retn
loc_3A7F:
lea rdi, aArenaNull+1; "arena != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eshkol"...
lea rcx, aDiagnosticcont; "DiagnosticContext *diagnostic_context_c"...
mov edx, 2Ch ; ','
call ___assert_fail
| long long diagnostic_context_create(long long a1)
{
long long result; // rax
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/diagnostics/diagnostics.c",
44LL,
"DiagnosticContext *diagnostic_context_create(Arena *)");
result = arena_alloc(a1, 48LL);
if ( result )
{
*(_QWORD *)result = a1;
*(_OWORD *)(result + 8) = 0LL;
*(_OWORD *)(result + 24) = 0LL;
*(_DWORD *)(result + 40) = 0;
}
return result;
}
| diagnostic_context_create:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x00103a7f
MOV RBX,RDI
MOV ESI,0x30
CALL 0x001032ff
TEST RAX,RAX
JZ 0x00103a78
MOV qword ptr [RAX],RBX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x8],XMM0
MOVUPS xmmword ptr [RAX + 0x18],XMM0
MOV dword ptr [RAX + 0x28],0x0
LAB_00103a78:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00103a7f:
LEA RDI,[0x10a24a]
LEA RSI,[0x10b424]
LEA RCX,[0x10b46f]
MOV EDX,0x2c
CALL 0x001010b0
|
void diagnostic_context_create(long param_1)
{
long *plVar1;
if (param_1 != 0) {
plVar1 = (long *)arena_alloc(param_1,0x30);
if (plVar1 != (long *)0x0) {
*plVar1 = param_1;
plVar1[1] = 0;
plVar1[2] = 0;
plVar1[3] = 0;
plVar1[4] = 0;
*(int4 *)(plVar1 + 5) = 0;
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/diagnostics/diagnostics.c",0x2c,
"DiagnosticContext *diagnostic_context_create(Arena *)");
}
| |
28,036 | my_cset_init_8bit | eloqsql/strings/ctype-simple.c | static my_bool
my_cset_init_8bit(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
cs->state|= my_8bit_charset_flags_from_data(cs);
cs->caseup_multiply= 1;
cs->casedn_multiply= 1;
cs->pad_char= ' ';
if (!cs->to_lower || !cs->to_upper || !cs->m_ctype || !cs->tab_to_uni)
return TRUE;
return create_fromuni(cs, loader);
} | O0 | c | my_cset_init_8bit:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa9080
movl %eax, %ecx
movq -0x10(%rbp), %rax
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x94(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x95(%rax)
movq -0x10(%rbp), %rax
movb $0x20, 0xb0(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0xa9e42
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0xa9e42
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0xa9e42
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0xa9e48
movb $0x1, -0x1(%rbp)
jmp 0xa9e58
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa9f30
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_cset_init_8bit:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
call my_8bit_charset_flags_from_data
mov ecx, eax
mov rax, [rbp+var_10]
or ecx, [rax+0Ch]
mov [rax+0Ch], ecx
mov rax, [rbp+var_10]
mov byte ptr [rax+94h], 1
mov rax, [rbp+var_10]
mov byte ptr [rax+95h], 1
mov rax, [rbp+var_10]
mov byte ptr [rax+0B0h], 20h ; ' '
mov rax, [rbp+var_10]
cmp qword ptr [rax+48h], 0
jz short loc_A9E42
mov rax, [rbp+var_10]
cmp qword ptr [rax+50h], 0
jz short loc_A9E42
mov rax, [rbp+var_10]
cmp qword ptr [rax+40h], 0
jz short loc_A9E42
mov rax, [rbp+var_10]
cmp qword ptr [rax+68h], 0
jnz short loc_A9E48
loc_A9E42:
mov [rbp+var_1], 1
jmp short loc_A9E58
loc_A9E48:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call create_fromuni
mov [rbp+var_1], al
loc_A9E58:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char my_cset_init_8bit(long long a1, long long a2)
{
*(_DWORD *)(a1 + 12) |= my_8bit_charset_flags_from_data(a1);
*(_BYTE *)(a1 + 148) = 1;
*(_BYTE *)(a1 + 149) = 1;
*(_BYTE *)(a1 + 176) = 32;
if ( *(_QWORD *)(a1 + 72) && *(_QWORD *)(a1 + 80) && *(_QWORD *)(a1 + 64) && *(_QWORD *)(a1 + 104) )
return create_fromuni(a1, a2);
else
return 1;
}
| my_cset_init_8bit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001a9080
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
OR ECX,dword ptr [RAX + 0xc]
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x94],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x95],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0xb0],0x20
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x48],0x0
JZ 0x001a9e42
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x50],0x0
JZ 0x001a9e42
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x001a9e42
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x68],0x0
JNZ 0x001a9e48
LAB_001a9e42:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001a9e58
LAB_001a9e48:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001a9f30
MOV byte ptr [RBP + -0x1],AL
LAB_001a9e58:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 my_cset_init_8bit(long param_1,int8 param_2)
{
uint uVar1;
int1 local_9;
uVar1 = my_8bit_charset_flags_from_data(param_1);
*(uint *)(param_1 + 0xc) = uVar1 | *(uint *)(param_1 + 0xc);
*(int1 *)(param_1 + 0x94) = 1;
*(int1 *)(param_1 + 0x95) = 1;
*(int1 *)(param_1 + 0xb0) = 0x20;
if ((((*(long *)(param_1 + 0x48) == 0) || (*(long *)(param_1 + 0x50) == 0)) ||
(*(long *)(param_1 + 0x40) == 0)) || (*(long *)(param_1 + 0x68) == 0)) {
local_9 = 1;
}
else {
local_9 = create_fromuni(param_1,param_2);
}
return local_9;
}
| |
28,037 | my_strcasecmp_utf8mb4 | eloqsql/strings/ctype-utf8.c | static int
my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &s_wc, (const uchar*) s);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
my_tolower_utf8mb4(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &t_wc, (const uchar*) t);
if (res <= 0)
return strcmp(s, t);
t+= res;
my_tolower_utf8mb4(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int) (uchar) s[0]) - ((int) (uchar) t[0]);
} | O3 | c | my_strcasecmp_utf8mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movb (%rsi), %al
testb %al, %al
je 0xd2711
movq %rsi, %r14
movq 0x78(%rdi), %r15
leaq 0x309264(%rip), %r12 # 0x3db8a0
cmpb $0x0, (%rbx)
je 0xd270b
testb %al, %al
js 0xd265e
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %r13d
movq %r13, -0x30(%rbp)
incq %r14
jmp 0xd26a5
leaq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0xd21cb
testl %eax, %eax
je 0xd2731
movl %eax, %eax
addq %rax, %r14
movq -0x30(%rbp), %r13
cmpq (%r15), %r13
ja 0xd26a5
movq 0x8(%r15), %rax
movq %r13, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xd26a5
movzbl %r13b, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %r13d
movq %r13, -0x30(%rbp)
movsbq (%rbx), %rax
testq %rax, %rax
js 0xd26bc
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %eax
incq %rbx
jmp 0xd26f9
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0xd21cb
testl %eax, %eax
je 0xd2731
movl %eax, %eax
addq %rax, %rbx
movq -0x38(%rbp), %rax
cmpq (%r15), %rax
ja 0xd26f9
movq 0x8(%r15), %rcx
movq %rax, %rdx
shrq $0x8, %rdx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0xd26f9
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%rcx,%rax,4), %eax
cmpq %rax, %r13
jne 0xd272c
movb (%r14), %al
testb %al, %al
jne 0xd263c
xorl %eax, %eax
movzbl %al, %r13d
jmp 0xd2714
xorl %r13d, %r13d
movzbl (%rbx), %eax
subl %eax, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subl %eax, %r13d
jmp 0xd271a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x29610
movl %eax, %r13d
jmp 0xd271a
| my_strcasecmp_utf8mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov al, [rsi]
test al, al
jz loc_D2711
mov r14, rsi
mov r15, [rdi+78h]
lea r12, my_unicase_default_page00
loc_D263C:
cmp byte ptr [rbx], 0
jz loc_D270B
test al, al
js short loc_D265E
movzx eax, al
lea rax, [rax+rax*2]
mov r13d, [r12+rax*4+4]
mov [rbp+var_30], r13
inc r14
jmp short loc_D26A5
loc_D265E:
lea rdi, [rbp+var_30]
mov rsi, r14
call my_mb_wc_utf8mb4_no_range
test eax, eax
jz loc_D2731
mov eax, eax
add r14, rax
mov r13, [rbp+var_30]
cmp r13, [r15]
ja short loc_D26A5
mov rax, [r15+8]
mov rcx, r13
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_D26A5
movzx ecx, r13b
lea rcx, [rcx+rcx*2]
mov r13d, [rax+rcx*4+4]
mov [rbp+var_30], r13
loc_D26A5:
movsx rax, byte ptr [rbx]
test rax, rax
js short loc_D26BC
lea rax, [rax+rax*2]
mov eax, [r12+rax*4+4]
inc rbx
jmp short loc_D26F9
loc_D26BC:
lea rdi, [rbp+var_38]
mov rsi, rbx
call my_mb_wc_utf8mb4_no_range
test eax, eax
jz short loc_D2731
mov eax, eax
add rbx, rax
mov rax, [rbp+var_38]
cmp rax, [r15]
ja short loc_D26F9
mov rcx, [r15+8]
mov rdx, rax
shr rdx, 8
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_D26F9
movzx eax, al
lea rax, [rax+rax*2]
mov eax, [rcx+rax*4+4]
loc_D26F9:
cmp r13, rax
jnz short loc_D272C
mov al, [r14]
test al, al
jnz loc_D263C
xor eax, eax
loc_D270B:
movzx r13d, al
jmp short loc_D2714
loc_D2711:
xor r13d, r13d
loc_D2714:
movzx eax, byte ptr [rbx]
sub r13d, eax
loc_D271A:
mov eax, r13d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D272C:
sub r13d, eax
jmp short loc_D271A
loc_D2731:
mov rdi, r14
mov rsi, rbx
call _strcmp
mov r13d, eax
jmp short loc_D271A
| long long my_strcasecmp_utf8mb4(long long a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
unsigned __int8 v4; // al
unsigned __int8 *v5; // r14
_QWORD *v6; // r15
unsigned long long v7; // r13
unsigned int v8; // eax
long long v9; // rax
long long v10; // rax
unsigned long long v11; // rax
unsigned int v12; // eax
long long v13; // rcx
int v14; // r13d
unsigned long long v17; // [rsp+8h] [rbp-38h] BYREF
unsigned long long v18[6]; // [rsp+10h] [rbp-30h] BYREF
v4 = *a2;
if ( *a2 )
{
v5 = a2;
v6 = *(_QWORD **)(a1 + 120);
while ( 1 )
{
if ( !*a3 )
goto LABEL_19;
if ( (v4 & 0x80u) != 0 )
{
v8 = my_mb_wc_utf8mb4_no_range(v18, v5);
if ( !v8 )
return (unsigned int)strcmp(v5, a3);
v5 += v8;
v7 = v18[0];
if ( v18[0] <= *v6 )
{
v9 = *(_QWORD *)(v6[1] + 8 * (v18[0] >> 8));
if ( v9 )
{
v7 = *(unsigned int *)(v9 + 12LL * LOBYTE(v18[0]) + 4);
v18[0] = v7;
}
}
}
else
{
v7 = (unsigned int)my_unicase_default_page00[3 * v4 + 1];
v18[0] = v7;
++v5;
}
v10 = (char)*a3;
if ( v10 < 0 )
{
v12 = my_mb_wc_utf8mb4_no_range(&v17, a3);
if ( !v12 )
return (unsigned int)strcmp(v5, a3);
a3 += v12;
v11 = v17;
if ( v17 <= *v6 )
{
v13 = *(_QWORD *)(v6[1] + 8 * (v17 >> 8));
if ( v13 )
v11 = *(unsigned int *)(v13 + 12LL * (unsigned __int8)v17 + 4);
}
}
else
{
v11 = (unsigned int)my_unicase_default_page00[3 * v10 + 1];
++a3;
}
if ( v7 != v11 )
return (unsigned int)(v7 - v11);
v4 = *v5;
if ( !*v5 )
{
v4 = 0;
LABEL_19:
v14 = v4;
return (unsigned int)(v14 - *a3);
}
}
}
v14 = 0;
return (unsigned int)(v14 - *a3);
}
| my_strcasecmp_utf8mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV AL,byte ptr [RSI]
TEST AL,AL
JZ 0x001d2711
MOV R14,RSI
MOV R15,qword ptr [RDI + 0x78]
LEA R12,[0x4db8a0]
LAB_001d263c:
CMP byte ptr [RBX],0x0
JZ 0x001d270b
TEST AL,AL
JS 0x001d265e
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV R13D,dword ptr [R12 + RAX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],R13
INC R14
JMP 0x001d26a5
LAB_001d265e:
LEA RDI,[RBP + -0x30]
MOV RSI,R14
CALL 0x001d21cb
TEST EAX,EAX
JZ 0x001d2731
MOV EAX,EAX
ADD R14,RAX
MOV R13,qword ptr [RBP + -0x30]
CMP R13,qword ptr [R15]
JA 0x001d26a5
MOV RAX,qword ptr [R15 + 0x8]
MOV RCX,R13
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001d26a5
MOVZX ECX,R13B
LEA RCX,[RCX + RCX*0x2]
MOV R13D,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],R13
LAB_001d26a5:
MOVSX RAX,byte ptr [RBX]
TEST RAX,RAX
JS 0x001d26bc
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [R12 + RAX*0x4 + 0x4]
INC RBX
JMP 0x001d26f9
LAB_001d26bc:
LEA RDI,[RBP + -0x38]
MOV RSI,RBX
CALL 0x001d21cb
TEST EAX,EAX
JZ 0x001d2731
MOV EAX,EAX
ADD RBX,RAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [R15]
JA 0x001d26f9
MOV RCX,qword ptr [R15 + 0x8]
MOV RDX,RAX
SHR RDX,0x8
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x001d26f9
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4]
LAB_001d26f9:
CMP R13,RAX
JNZ 0x001d272c
MOV AL,byte ptr [R14]
TEST AL,AL
JNZ 0x001d263c
XOR EAX,EAX
LAB_001d270b:
MOVZX R13D,AL
JMP 0x001d2714
LAB_001d2711:
XOR R13D,R13D
LAB_001d2714:
MOVZX EAX,byte ptr [RBX]
SUB R13D,EAX
LAB_001d271a:
MOV EAX,R13D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d272c:
SUB R13D,EAX
JMP 0x001d271a
LAB_001d2731:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00129610
MOV R13D,EAX
JMP 0x001d271a
|
int my_strcasecmp_utf8mb4(long param_1,byte *param_2,byte *param_3)
{
ulong *puVar1;
long lVar2;
ulong uVar3;
byte bVar4;
uint uVar5;
int iVar6;
ulong uVar7;
ulong local_40;
ulong local_38;
bVar4 = *param_2;
if (bVar4 == 0) {
uVar5 = 0;
}
else {
puVar1 = *(ulong **)(param_1 + 0x78);
do {
if (*param_3 == 0) goto LAB_001d270b;
if ((char)bVar4 < '\0') {
uVar5 = my_mb_wc_utf8mb4_no_range(&local_38,param_2);
if (uVar5 == 0) goto LAB_001d2731;
param_2 = param_2 + uVar5;
if ((local_38 <= *puVar1) &&
(lVar2 = *(long *)(puVar1[1] + (local_38 >> 8) * 8), lVar2 != 0)) {
local_38 = (ulong)*(uint *)(lVar2 + 4 + (local_38 & 0xff) * 0xc);
}
}
else {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)bVar4 * 0xc + 4);
param_2 = param_2 + 1;
}
uVar3 = local_38;
bVar4 = *param_3;
if ((long)(char)bVar4 < 0) {
uVar5 = my_mb_wc_utf8mb4_no_range(&local_40,param_3);
if (uVar5 == 0) {
LAB_001d2731:
iVar6 = strcmp((char *)param_2,(char *)param_3);
return iVar6;
}
param_3 = param_3 + uVar5;
uVar7 = local_40;
if ((local_40 <= *puVar1) &&
(lVar2 = *(long *)(puVar1[1] + (local_40 >> 8) * 8), lVar2 != 0)) {
uVar7 = (ulong)*(uint *)(lVar2 + 4 + (local_40 & 0xff) * 0xc);
}
}
else {
param_3 = param_3 + 1;
uVar7 = (ulong)*(uint *)(my_unicase_default_page00 + (long)(char)bVar4 * 0xc + 4);
}
if (uVar3 != uVar7) {
return (int)uVar3 - (int)uVar7;
}
bVar4 = *param_2;
} while (bVar4 != 0);
bVar4 = 0;
LAB_001d270b:
uVar5 = (uint)bVar4;
}
return uVar5 - *param_3;
}
| |
28,038 | my_like_range_czech | eloqsql/strings/ctype-czech.c | static my_bool my_like_range_czech(CHARSET_INFO *cs __attribute__((unused)),
const char *ptr,size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
size_t res_length, char *min_str,
char *max_str,
size_t *min_length,size_t *max_length)
{
#ifdef EXAMPLE
uchar value;
const char *end=ptr+ptr_length;
char *min_org=min_str;
char *min_end=min_str+res_length;
for (; ptr != end && min_str != min_end ; ptr++)
{
if (*ptr == w_one) /* '_' in SQL */
{ break; }
if (*ptr == w_many) /* '%' in SQL */
{ break; }
if (*ptr == escape && ptr+1 != end)
{ ptr++; } /* Skip escape */
value = CZ_SORT_TABLE[0][(int) (uchar) *ptr];
if (value == 0) /* Ignore in the first pass */
{ continue; }
if (value <= 2) /* End of pass or end of string */
{ break; }
if (value == 255) /* Double char too compicated */
{ break; }
*min_str++= *max_str++ = *ptr;
}
if (cs->state & MY_CS_BINSORT)
*min_length= (size_t) (min_str - min_org);
else
{
/* 'a\0\0... is the smallest possible string */
*min_length= res_length;
}
/* a\ff\ff... is the biggest possible string */
*max_length= res_length;
while (min_str != min_end)
{
*min_str++ = min_sort_char; /* Because of key compression */
*max_str++ = max_sort_char;
}
return 0;
#else
return 1;
#endif
} | O0 | c | my_like_range_czech:
pushq %rbp
movq %rsp, %rbp
movl %r8d, -0x50(%rbp)
movl %ecx, %eax
movl -0x50(%rbp), %ecx
movl %eax, -0x4c(%rbp)
movq %rdx, %rax
movl -0x4c(%rbp), %edx
movq %rax, -0x48(%rbp)
movq %rsi, %rax
movq -0x48(%rbp), %rsi
movq %rax, -0x40(%rbp)
movq %rdi, %r8
movq -0x40(%rbp), %rdi
movb %r9b, %al
movq 0x30(%rbp), %r9
movq 0x28(%rbp), %r9
movq 0x20(%rbp), %r9
movq 0x18(%rbp), %r9
movq 0x10(%rbp), %r9
movq %r8, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %dl, -0x19(%rbp)
movb %cl, -0x1a(%rbp)
movb %al, -0x1b(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x18(%rbp), %rax
addq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x51(%rbp)
je 0x6e095
movq 0x18(%rbp), %rax
cmpq -0x38(%rbp), %rax
setne %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x6e0a1
jmp 0x6e165
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x1a(%rbp), %ecx
cmpl %ecx, %eax
jne 0x6e0b5
jmp 0x6e165
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x1b(%rbp), %ecx
cmpl %ecx, %eax
jne 0x6e0c9
jmp 0x6e165
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jne 0x6e0f2
movq -0x10(%rbp), %rax
addq $0x1, %rax
cmpq -0x28(%rbp), %rax
je 0x6e0f2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq 0x19d587(%rip), %rax # 0x20b680
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x1c(%rbp)
movzbl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jne 0x6e114
jmp 0x6e154
movzbl -0x1c(%rbp), %eax
cmpl $0x2, %eax
jg 0x6e11f
jmp 0x6e165
movzbl -0x1c(%rbp), %eax
cmpl $0xff, %eax
jne 0x6e12c
jmp 0x6e165
movq -0x10(%rbp), %rax
movb (%rax), %cl
movq 0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x20(%rbp)
movb %cl, (%rax)
movq 0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x18(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x6e078
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x6e188
movq 0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rax, %rcx
movq 0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0x6e193
movq 0x10(%rbp), %rcx
movq 0x28(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rcx
movq 0x30(%rbp), %rax
movq %rcx, (%rax)
movq 0x18(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x6e1ce
movq 0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rbp)
movb $0x20, (%rax)
movq 0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rbp)
movb $0x39, (%rax)
jmp 0x6e19e
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_like_range_czech:
push rbp
mov rbp, rsp
mov [rbp+var_50], r8d
mov eax, ecx
mov ecx, [rbp+var_50]
mov [rbp+var_4C], eax
mov rax, rdx
mov edx, [rbp+var_4C]
mov [rbp+var_48], rax
mov rax, rsi
mov rsi, [rbp+var_48]
mov [rbp+var_40], rax
mov r8, rdi
mov rdi, [rbp+var_40]
mov al, r9b
mov r9, [rbp+arg_20]
mov r9, [rbp+arg_18]
mov r9, [rbp+arg_10]
mov r9, [rbp+arg_8]
mov r9, [rbp+arg_0]
mov [rbp+var_8], r8
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_19], dl
mov [rbp+var_1A], cl
mov [rbp+var_1B], al
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_28], rax
mov rax, [rbp+arg_8]
mov [rbp+var_30], rax
mov rax, [rbp+arg_8]
add rax, [rbp+arg_0]
mov [rbp+var_38], rax
loc_6E078:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_28]
mov [rbp+var_51], al
jz short loc_6E095
mov rax, [rbp+arg_8]
cmp rax, [rbp+var_38]
setnz al
mov [rbp+var_51], al
loc_6E095:
mov al, [rbp+var_51]
test al, 1
jnz short loc_6E0A1
jmp loc_6E165
loc_6E0A1:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
movsx ecx, [rbp+var_1A]
cmp eax, ecx
jnz short loc_6E0B5
jmp loc_6E165
loc_6E0B5:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
movsx ecx, [rbp+var_1B]
cmp eax, ecx
jnz short loc_6E0C9
jmp loc_6E165
loc_6E0C9:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
movsx ecx, [rbp+var_19]
cmp eax, ecx
jnz short loc_6E0F2
mov rax, [rbp+var_10]
add rax, 1
cmp rax, [rbp+var_28]
jz short loc_6E0F2
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
loc_6E0F2:
mov rax, cs:CZ_SORT_TABLE
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
movsxd rcx, ecx
mov al, [rax+rcx]
mov [rbp+var_1C], al
movzx eax, [rbp+var_1C]
cmp eax, 0
jnz short loc_6E114
jmp short loc_6E154
loc_6E114:
movzx eax, [rbp+var_1C]
cmp eax, 2
jg short loc_6E11F
jmp short loc_6E165
loc_6E11F:
movzx eax, [rbp+var_1C]
cmp eax, 0FFh
jnz short loc_6E12C
jmp short loc_6E165
loc_6E12C:
mov rax, [rbp+var_10]
mov cl, [rax]
mov rax, [rbp+arg_10]
mov rdx, rax
add rdx, 1
mov [rbp+arg_10], rdx
mov [rax], cl
mov rax, [rbp+arg_8]
mov rdx, rax
add rdx, 1
mov [rbp+arg_8], rdx
mov [rax], cl
loc_6E154:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_6E078
loc_6E165:
mov rax, [rbp+var_8]
mov eax, [rax+0Ch]
and eax, 10h
cmp eax, 0
jz short loc_6E188
mov rcx, [rbp+arg_8]
mov rax, [rbp+var_30]
sub rcx, rax
mov rax, [rbp+arg_18]
mov [rax], rcx
jmp short loc_6E193
loc_6E188:
mov rcx, [rbp+arg_0]
mov rax, [rbp+arg_18]
mov [rax], rcx
loc_6E193:
mov rcx, [rbp+arg_0]
mov rax, [rbp+arg_20]
mov [rax], rcx
loc_6E19E:
mov rax, [rbp+arg_8]
cmp rax, [rbp+var_38]
jz short loc_6E1CE
mov rax, [rbp+arg_8]
mov rcx, rax
add rcx, 1
mov [rbp+arg_8], rcx
mov byte ptr [rax], 20h ; ' '
mov rax, [rbp+arg_10]
mov rcx, rax
add rcx, 1
mov [rbp+arg_10], rcx
mov byte ptr [rax], 39h ; '9'
jmp short loc_6E19E
loc_6E1CE:
xor eax, eax
pop rbp
retn
| long long my_like_range_czech(
long long a1,
unsigned __int8 *a2,
long long a3,
char a4,
char a5,
char a6,
long long a7,
unsigned __int8 *a8,
unsigned __int8 *a9,
_QWORD *a10,
_QWORD *a11)
{
unsigned __int8 v11; // cl
unsigned __int8 *v12; // rax
unsigned __int8 *v13; // rax
unsigned __int8 *v14; // rax
unsigned __int8 *v15; // rax
bool v17; // [rsp+1h] [rbp-51h]
unsigned __int8 *v18; // [rsp+1Ah] [rbp-38h]
long long v19; // [rsp+22h] [rbp-30h]
char *v20; // [rsp+2Ah] [rbp-28h]
unsigned __int8 v21; // [rsp+36h] [rbp-1Ch]
unsigned __int8 *v23; // [rsp+42h] [rbp-10h]
v23 = a2;
v20 = (char *)&a2[a3];
v19 = (long long)a8;
v18 = &a8[a7];
while ( 1 )
{
v17 = 0;
if ( v23 != (unsigned __int8 *)v20 )
v17 = a8 != v18;
if ( !v17 || (char)*v23 == a5 || (char)*v23 == a6 )
break;
if ( (char)*v23 == a4 && v23 + 1 != (unsigned __int8 *)v20 )
++v23;
v21 = byte_10B787[*v23];
if ( v21 )
{
if ( v21 <= 2u || v21 == 255 )
break;
v11 = *v23;
v12 = a9++;
*v12 = *v23;
v13 = a8++;
*v13 = v11;
}
++v23;
}
if ( (*(_DWORD *)(a1 + 12) & 0x10) != 0 )
*a10 = &a8[-v19];
else
*a10 = a7;
*a11 = a7;
while ( a8 != v18 )
{
v14 = a8++;
*v14 = 32;
v15 = a9++;
*v15 = 57;
}
return 0LL;
}
| my_like_range_czech:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x50],R8D
MOV EAX,ECX
MOV ECX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,RDX
MOV EDX,dword ptr [RBP + -0x4c]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,RSI
MOV RSI,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RAX
MOV R8,RDI
MOV RDI,qword ptr [RBP + -0x40]
MOV AL,R9B
MOV R9,qword ptr [RBP + 0x30]
MOV R9,qword ptr [RBP + 0x28]
MOV R9,qword ptr [RBP + 0x20]
MOV R9,qword ptr [RBP + 0x18]
MOV R9,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],R8
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV byte ptr [RBP + -0x19],DL
MOV byte ptr [RBP + -0x1a],CL
MOV byte ptr [RBP + -0x1b],AL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + 0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + 0x18]
ADD RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x38],RAX
LAB_0016e078:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x51],AL
JZ 0x0016e095
MOV RAX,qword ptr [RBP + 0x18]
CMP RAX,qword ptr [RBP + -0x38]
SETNZ AL
MOV byte ptr [RBP + -0x51],AL
LAB_0016e095:
MOV AL,byte ptr [RBP + -0x51]
TEST AL,0x1
JNZ 0x0016e0a1
JMP 0x0016e165
LAB_0016e0a1:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x1a]
CMP EAX,ECX
JNZ 0x0016e0b5
JMP 0x0016e165
LAB_0016e0b5:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x1b]
CMP EAX,ECX
JNZ 0x0016e0c9
JMP 0x0016e165
LAB_0016e0c9:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x19]
CMP EAX,ECX
JNZ 0x0016e0f2
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x28]
JZ 0x0016e0f2
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
LAB_0016e0f2:
MOV RAX,qword ptr [0x0030b680]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOVSXD RCX,ECX
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x1c],AL
MOVZX EAX,byte ptr [RBP + -0x1c]
CMP EAX,0x0
JNZ 0x0016e114
JMP 0x0016e154
LAB_0016e114:
MOVZX EAX,byte ptr [RBP + -0x1c]
CMP EAX,0x2
JG 0x0016e11f
JMP 0x0016e165
LAB_0016e11f:
MOVZX EAX,byte ptr [RBP + -0x1c]
CMP EAX,0xff
JNZ 0x0016e12c
JMP 0x0016e165
LAB_0016e12c:
MOV RAX,qword ptr [RBP + -0x10]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + 0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + 0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + 0x18]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + 0x18],RDX
MOV byte ptr [RAX],CL
LAB_0016e154:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0016e078
LAB_0016e165:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x10
CMP EAX,0x0
JZ 0x0016e188
MOV RCX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + -0x30]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + 0x28]
MOV qword ptr [RAX],RCX
JMP 0x0016e193
LAB_0016e188:
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + 0x28]
MOV qword ptr [RAX],RCX
LAB_0016e193:
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + 0x30]
MOV qword ptr [RAX],RCX
LAB_0016e19e:
MOV RAX,qword ptr [RBP + 0x18]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x0016e1ce
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + 0x18],RCX
MOV byte ptr [RAX],0x20
MOV RAX,qword ptr [RBP + 0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + 0x20],RCX
MOV byte ptr [RAX],0x39
JMP 0x0016e19e
LAB_0016e1ce:
XOR EAX,EAX
POP RBP
RET
|
int8
my_like_range_czech(long param_1,byte *param_2,long param_3,byte param_4,byte param_5,byte param_6,
long param_7,byte *param_8,byte *param_9,long *param_10,long *param_11)
{
byte bVar1;
byte *pbVar2;
byte *pbVar3;
byte *local_18;
pbVar2 = param_8;
pbVar3 = param_8 + param_7;
for (local_18 = param_2;
((local_18 != param_2 + param_3 && param_8 != pbVar3 && (*local_18 != param_5)) &&
(*local_18 != param_6)); local_18 = local_18 + 1) {
if ((*local_18 == param_4) && (local_18 + 1 != param_2 + param_3)) {
local_18 = local_18 + 1;
}
bVar1 = CZ_SORT_TABLE[(int)(uint)*local_18];
if (bVar1 != 0) {
if ((bVar1 < 3) || (bVar1 == 0xff)) break;
bVar1 = *local_18;
*param_9 = bVar1;
*param_8 = bVar1;
param_8 = param_8 + 1;
param_9 = param_9 + 1;
}
}
if ((*(uint *)(param_1 + 0xc) & 0x10) == 0) {
*param_10 = param_7;
}
else {
*param_10 = (long)param_8 - (long)pbVar2;
}
*param_11 = param_7;
while (param_8 != pbVar3) {
*param_8 = 0x20;
*param_9 = 0x39;
param_8 = param_8 + 1;
param_9 = param_9 + 1;
}
return 0;
}
| |
28,039 | my_atoll | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static long long my_atoll(const char *str, const char *end_str, int *error)
{
const char *p=str;
const char *end;
long long ret;
while (p < end_str && isspace(*p))
p++;
ret = my_strtoll(p, end_str - p, &end, error);
while(end < end_str && isspace(*end))
end++;
if(end != end_str)
*error= 1;
return ret;
} | O3 | c | my_atoll:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq %rsi, %rdi
jae 0x276ee
callq 0x134c0
movq (%rax), %rax
movsbq (%r15), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x276ee
incq %r15
cmpq %r14, %r15
jne 0x276d8
movq %r14, %r15
movq %r14, %rax
subq %r15, %rax
leaq (%r15,%rax), %r12
testq %rax, %rax
jle 0x27718
callq 0x134c0
movq (%rax), %rax
movsbq (%r15), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x27718
incq %r15
cmpq %r12, %r15
jb 0x27705
movq %r15, -0x30(%rbp)
cmpq %r12, %r15
je 0x27777
movb (%r15), %r13b
cmpb $0x2d, %r13b
jne 0x27731
incq %r15
movq %r15, -0x30(%rbp)
movq %r14, %rsi
subq %r15, %rsi
leaq -0x30(%rbp), %r12
movq %r15, %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x26f34
movq %rax, %r15
movq (%r12), %r12
cmpl $0x0, (%rbx)
jne 0x277ae
cmpb $0x2d, %r13b
jne 0x27782
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %r15, %rcx
negq %rcx
jo 0x277ab
testq %r15, %r15
js 0x2779f
movq %r15, %rax
jmp 0x277a8
movl $0x22, (%rbx)
xorl %r15d, %r15d
jmp 0x277ae
testq %r15, %r15
jns 0x277ae
decq %r12
movl $0x22, (%rbx)
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
decq %r15
jmp 0x277ae
decq %r12
movl $0x22, (%rbx)
negq %rax
movq %rax, %r15
cmpq %r14, %r12
jae 0x277d8
callq 0x134c0
movq (%rax), %rax
movq %r14, %rcx
subq %r12, %rcx
movsbq (%r12), %rdx
testb $0x20, 0x1(%rax,%rdx,2)
je 0x277d8
incq %r12
decq %rcx
jne 0x277c1
movq %r14, %r12
cmpq %r14, %r12
je 0x277e3
movl $0x1, (%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_atoll:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r15, rdi
cmp rdi, rsi
jnb short loc_276EE
call ___ctype_b_loc
mov rax, [rax]
loc_276D8:
movsx rcx, byte ptr [r15]
test byte ptr [rax+rcx*2+1], 20h
jz short loc_276EE
inc r15
cmp r15, r14
jnz short loc_276D8
mov r15, r14
loc_276EE:
mov rax, r14
sub rax, r15
lea r12, [r15+rax]
test rax, rax
jle short loc_27718
call ___ctype_b_loc
mov rax, [rax]
loc_27705:
movsx rcx, byte ptr [r15]
test byte ptr [rax+rcx*2+1], 20h
jz short loc_27718
inc r15
cmp r15, r12
jb short loc_27705
loc_27718:
mov [rbp+var_30], r15
cmp r15, r12
jz short loc_27777
mov r13b, [r15]
cmp r13b, 2Dh ; '-'
jnz short loc_27731
inc r15
mov [rbp+var_30], r15
loc_27731:
mov rsi, r14
sub rsi, r15
lea r12, [rbp+var_30]
mov rdi, r15
mov rdx, r12
mov rcx, rbx
call my_strtoull
mov r15, rax
mov r12, [r12]
cmp dword ptr [rbx], 0
jnz short loc_277AE
cmp r13b, 2Dh ; '-'
jnz short loc_27782
mov rax, 8000000000000000h
mov rcx, r15
neg rcx
jo short loc_277AB
test r15, r15
js short loc_2779F
mov rax, r15
jmp short loc_277A8
loc_27777:
mov dword ptr [rbx], 22h ; '"'
xor r15d, r15d
jmp short loc_277AE
loc_27782:
test r15, r15
jns short loc_277AE
dec r12
mov dword ptr [rbx], 22h ; '"'
mov r15, 8000000000000000h
dec r15
jmp short loc_277AE
loc_2779F:
dec r12
mov dword ptr [rbx], 22h ; '"'
loc_277A8:
neg rax
loc_277AB:
mov r15, rax
loc_277AE:
cmp r12, r14
jnb short loc_277D8
call ___ctype_b_loc
mov rax, [rax]
mov rcx, r14
sub rcx, r12
loc_277C1:
movsx rdx, byte ptr [r12]
test byte ptr [rax+rdx*2+1], 20h
jz short loc_277D8
inc r12
dec rcx
jnz short loc_277C1
mov r12, r14
loc_277D8:
cmp r12, r14
jz short loc_277E3
mov dword ptr [rbx], 1
loc_277E3:
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_atoll(char *a1, char *a2, _DWORD *a3)
{
char *v3; // rax
char *v5; // r15
long long v6; // rax
char *v7; // r12
long long v8; // rax
char v9; // r13
signed long long v10; // rax
long long v11; // r15
unsigned long long v12; // rax
long long v13; // rax
signed long long v14; // rcx
char *v16; // [rsp+0h] [rbp-30h] BYREF
v16 = v3;
v5 = a1;
if ( a1 < a2 )
{
v6 = *(_QWORD *)__ctype_b_loc(a1);
while ( (*(_BYTE *)(v6 + 2LL * *v5 + 1) & 0x20) != 0 )
{
if ( ++v5 == a2 )
{
v5 = a2;
break;
}
}
}
v7 = a2;
if ( a2 - v5 > 0 )
{
v8 = *(_QWORD *)__ctype_b_loc(a1);
do
{
if ( (*(_BYTE *)(v8 + 2LL * *v5 + 1) & 0x20) == 0 )
break;
++v5;
}
while ( v5 < a2 );
}
v16 = v5;
if ( v5 == a2 )
{
*a3 = 34;
v11 = 0LL;
}
else
{
v9 = *v5;
if ( *v5 == 45 )
v16 = ++v5;
a1 = v5;
v10 = my_strtoull((long long)v5, a2 - v5, &v16, a3);
v11 = v10;
v7 = v16;
if ( !*a3 )
{
if ( v9 == 45 )
{
v12 = 0x8000000000000000LL;
if ( !__OFSUB__(-v11, 1LL) )
{
if ( v11 < 0 )
{
v7 = v16 - 1;
*a3 = 34;
}
else
{
v12 = v11;
}
v12 = -(long long)v12;
}
v11 = v12;
}
else if ( v10 < 0 )
{
v7 = v16 - 1;
*a3 = 34;
v11 = 0x7FFFFFFFFFFFFFFFLL;
}
}
}
if ( v7 < a2 )
{
v13 = *(_QWORD *)__ctype_b_loc(a1);
v14 = a2 - v7;
while ( (*(_BYTE *)(v13 + 2LL * *v7 + 1) & 0x20) != 0 )
{
++v7;
if ( !--v14 )
{
v7 = a2;
break;
}
}
}
if ( v7 != a2 )
*a3 = 1;
return v11;
}
| my_atoll:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CMP RDI,RSI
JNC 0x001276ee
CALL 0x001134c0
MOV RAX,qword ptr [RAX]
LAB_001276d8:
MOVSX RCX,byte ptr [R15]
TEST byte ptr [RAX + RCX*0x2 + 0x1],0x20
JZ 0x001276ee
INC R15
CMP R15,R14
JNZ 0x001276d8
MOV R15,R14
LAB_001276ee:
MOV RAX,R14
SUB RAX,R15
LEA R12,[R15 + RAX*0x1]
TEST RAX,RAX
JLE 0x00127718
CALL 0x001134c0
MOV RAX,qword ptr [RAX]
LAB_00127705:
MOVSX RCX,byte ptr [R15]
TEST byte ptr [RAX + RCX*0x2 + 0x1],0x20
JZ 0x00127718
INC R15
CMP R15,R12
JC 0x00127705
LAB_00127718:
MOV qword ptr [RBP + -0x30],R15
CMP R15,R12
JZ 0x00127777
MOV R13B,byte ptr [R15]
CMP R13B,0x2d
JNZ 0x00127731
INC R15
MOV qword ptr [RBP + -0x30],R15
LAB_00127731:
MOV RSI,R14
SUB RSI,R15
LEA R12,[RBP + -0x30]
MOV RDI,R15
MOV RDX,R12
MOV RCX,RBX
CALL 0x00126f34
MOV R15,RAX
MOV R12,qword ptr [R12]
CMP dword ptr [RBX],0x0
JNZ 0x001277ae
CMP R13B,0x2d
JNZ 0x00127782
MOV RAX,-0x8000000000000000
MOV RCX,R15
NEG RCX
JO 0x001277ab
TEST R15,R15
JS 0x0012779f
MOV RAX,R15
JMP 0x001277a8
LAB_00127777:
MOV dword ptr [RBX],0x22
XOR R15D,R15D
JMP 0x001277ae
LAB_00127782:
TEST R15,R15
JNS 0x001277ae
DEC R12
MOV dword ptr [RBX],0x22
MOV R15,-0x8000000000000000
DEC R15
JMP 0x001277ae
LAB_0012779f:
DEC R12
MOV dword ptr [RBX],0x22
LAB_001277a8:
NEG RAX
LAB_001277ab:
MOV R15,RAX
LAB_001277ae:
CMP R12,R14
JNC 0x001277d8
CALL 0x001134c0
MOV RAX,qword ptr [RAX]
MOV RCX,R14
SUB RCX,R12
LAB_001277c1:
MOVSX RDX,byte ptr [R12]
TEST byte ptr [RAX + RDX*0x2 + 0x1],0x20
JZ 0x001277d8
INC R12
DEC RCX
JNZ 0x001277c1
MOV R12,R14
LAB_001277d8:
CMP R12,R14
JZ 0x001277e3
MOV dword ptr [RBX],0x1
LAB_001277e3:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_atoll(char *param_1,char *param_2,int *param_3)
{
char cVar1;
ushort **ppuVar2;
long lVar3;
long lVar4;
char *pcVar5;
char *pcVar6;
char *local_38;
pcVar6 = param_1;
if (param_1 < param_2) {
ppuVar2 = __ctype_b_loc();
do {
pcVar6 = param_1;
if ((*(byte *)((long)*ppuVar2 + (long)*param_1 * 2 + 1) & 0x20) == 0) break;
param_1 = param_1 + 1;
pcVar6 = param_2;
} while (param_1 != param_2);
}
pcVar5 = pcVar6 + ((long)param_2 - (long)pcVar6);
if (0 < (long)param_2 - (long)pcVar6) {
ppuVar2 = __ctype_b_loc();
do {
if ((*(byte *)((long)*ppuVar2 + (long)*pcVar6 * 2 + 1) & 0x20) == 0) break;
pcVar6 = pcVar6 + 1;
} while (pcVar6 < pcVar5);
}
if (pcVar6 == pcVar5) {
*param_3 = 0x22;
lVar3 = 0;
local_38 = pcVar6;
}
else {
cVar1 = *pcVar6;
if (cVar1 == '-') {
pcVar6 = pcVar6 + 1;
}
local_38 = pcVar6;
lVar3 = my_strtoull(pcVar6,(long)param_2 - (long)pcVar6,&local_38,param_3);
pcVar5 = local_38;
if (*param_3 == 0) {
if (cVar1 == '-') {
if (lVar3 < 0) {
*param_3 = 0x22;
lVar3 = -0x8000000000000000;
pcVar5 = local_38 + -1;
}
lVar3 = -lVar3;
}
else if (lVar3 < 0) {
pcVar5 = local_38 + -1;
*param_3 = 0x22;
lVar3 = 0x7fffffffffffffff;
}
}
}
pcVar6 = pcVar5;
if (pcVar5 < param_2) {
ppuVar2 = __ctype_b_loc();
lVar4 = (long)param_2 - (long)pcVar5;
do {
pcVar6 = pcVar5;
if ((*(byte *)((long)*ppuVar2 + (long)*pcVar5 * 2 + 1) & 0x20) == 0) break;
pcVar5 = pcVar5 + 1;
lVar4 = lVar4 + -1;
pcVar6 = param_2;
} while (lVar4 != 0);
}
if (pcVar6 != param_2) {
*param_3 = 1;
}
return lVar3;
}
| |
28,040 | pvio_socket_async_write | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | ssize_t pvio_socket_async_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length)
{
ssize_t r= -1;
struct st_pvio_socket *csock= NULL;
#ifndef _WIN32
int write_flags= MSG_DONTWAIT;
#ifdef MSG_NOSIGNAL
write_flags|= MSG_NOSIGNAL;
#endif
#endif
if (!pvio || !pvio->data)
return -1;
csock= (struct st_pvio_socket *)pvio->data;
#ifndef WIN32
r= ma_send(csock->socket, buffer, length, write_flags);
#else
/* Windows doesn't support MSG_DONTWAIT, so we need to set
socket to non blocking */
pvio_socket_blocking(pvio, 0, 0);
r= send(csock->socket, (const char *)buffer, (int)length, 0);
#endif
return r;
} | O0 | c | pvio_socket_async_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $-0x1, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x40, -0x34(%rbp)
movl -0x34(%rbp), %eax
orl $0x4000, %eax # imm = 0x4000
movl %eax, -0x34(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x9bf17
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x9bf21
movq $-0x1, -0x8(%rbp)
jmp 0x9bf4e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x34(%rbp), %ecx
callq 0x9d390
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| pvio_socket_async_write:
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], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_30], 0
mov [rbp+var_34], 40h ; '@'
mov eax, [rbp+var_34]
or eax, 4000h
mov [rbp+var_34], eax
cmp [rbp+var_10], 0
jz short loc_9BF17
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_9BF21
loc_9BF17:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_9BF4E
loc_9BF21:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov edi, [rax]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_34]
call ma_send
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_9BF4E:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long pvio_socket_async_write(_QWORD *a1, long long a2, long long a3)
{
if ( a1 && *a1 )
return ma_send(*(unsigned int *)*a1, a2, a3, 16448LL);
else
return -1LL;
}
| pvio_socket_async_write:
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],-0x1
MOV qword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x34],0x40
MOV EAX,dword ptr [RBP + -0x34]
OR EAX,0x4000
MOV dword ptr [RBP + -0x34],EAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0019bf17
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x0019bf21
LAB_0019bf17:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x0019bf4e
LAB_0019bf21:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x34]
CALL 0x0019d390
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_0019bf4e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 pvio_socket_async_write(long *param_1,int8 param_2,int8 param_3)
{
int8 local_10;
if ((param_1 == (long *)0x0) || (*param_1 == 0)) {
local_10 = 0xffffffffffffffff;
}
else {
local_10 = ma_send(*(int4 *)*param_1,param_2,param_3,0x4040);
}
return local_10;
}
| |
28,041 | ma_trid_from_key | eloqsql/storage/maria/ma_search.c | TrID _ma_trid_from_key(const MARIA_KEY *key)
{
if (!(key->flag & (SEARCH_PAGE_KEY_HAS_TRANSID |
SEARCH_USER_KEY_HAS_TRANSID)))
return 0;
return transid_get_packed(key->keyinfo->share,
key->data + key->data_length +
key->keyinfo->share->rec_reflength);
} | O0 | c | ma_trid_from_key:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x180000, %eax # imm = 0x180000
cmpl $0x0, %eax
jne 0x95b17
movq $0x0, -0x8(%rbp)
jmp 0x95b50
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movl 0x740(%rax), %eax
addq %rax, %rsi
callq 0x46b60
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ma_trid_from_key:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov eax, [rax+18h]
and eax, 180000h
cmp eax, 0
jnz short loc_95B17
mov [rbp+var_8], 0
jmp short loc_95B50
loc_95B17:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax]
mov rax, [rbp+var_10]
mov eax, [rax+10h]
add rsi, rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rax, [rax]
mov eax, [rax+740h]
add rsi, rax
call transid_get_packed
mov [rbp+var_8], rax
loc_95B50:
mov rax, [rbp+var_8]
add rsp, 10h
pop rbp
retn
| unsigned long long ma_trid_from_key(long long a1)
{
if ( (*(_DWORD *)(a1 + 24) & 0x180000) != 0 )
return transid_get_packed(
**(_QWORD **)(a1 + 8),
(unsigned __int8 *)(*(unsigned int *)(**(_QWORD **)(a1 + 8) + 1856LL)
+ *(unsigned int *)(a1 + 16)
+ *(_QWORD *)a1));
else
return 0LL;
}
| _ma_trid_from_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x18]
AND EAX,0x180000
CMP EAX,0x0
JNZ 0x00195b17
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00195b50
LAB_00195b17:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x10]
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x740]
ADD RSI,RAX
CALL 0x00146b60
MOV qword ptr [RBP + -0x8],RAX
LAB_00195b50:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
RET
|
int8 _ma_trid_from_key(long *param_1)
{
int8 local_10;
if ((*(uint *)(param_1 + 3) & 0x180000) == 0) {
local_10 = 0;
}
else {
local_10 = transid_get_packed(*(int8 *)param_1[1],
*param_1 + (ulong)*(uint *)(param_1 + 2) +
(ulong)*(uint *)(*(long *)param_1[1] + 0x740));
}
return local_10;
}
| |
28,042 | test_bug27876 | eloqsql/libmariadb/unittest/libmariadb/charset.c | static int test_bug27876(MYSQL *mysql)
{
int rc;
MYSQL_RES *result;
uchar utf8_func[] =
{
0xd1, 0x84, 0xd1, 0x83, 0xd0, 0xbd, 0xd0, 0xba,
0xd1, 0x86, 0xd0, 0xb8, 0xd0, 0xb9, 0xd0, 0xba,
0xd0, 0xb0,
0x00
};
uchar utf8_param[] =
{
0xd0, 0xbf, 0xd0, 0xb0, 0xd1, 0x80, 0xd0, 0xb0,
0xd0, 0xbc, 0xd0, 0xb5, 0xd1, 0x82, 0xd1, 0x8a,
0xd1, 0x80, 0x5f, 0xd0, 0xb2, 0xd0, 0xb5, 0xd1,
0x80, 0xd1, 0x81, 0xd0, 0xb8, 0xd1, 0x8f,
0x00
};
char query[500];
rc= mysql_query(mysql, "set names utf8");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "select version()");
check_mysql_rc(rc, mysql);
result= mysql_store_result(mysql);
FAIL_IF(!result, "Invalid result set");
mysql_free_result(result);
sprintf(query, "DROP FUNCTION IF EXISTS %s", (char*) utf8_func);
rc= mysql_query(mysql, query);
check_mysql_rc(rc, mysql);
sprintf(query,
"CREATE FUNCTION %s( %s VARCHAR(25))"
" RETURNS VARCHAR(25) DETERMINISTIC RETURN %s",
(char*) utf8_func, (char*) utf8_param, (char*) utf8_param);
rc= mysql_query(mysql, query);
check_mysql_rc(rc, mysql);
sprintf(query, "SELECT %s(VERSION())", (char*) utf8_func);
rc= mysql_query(mysql, query);
check_mysql_rc(rc, mysql);
result= mysql_store_result(mysql);
FAIL_IF(!result, "Invalid result set");
mysql_free_result(result);
sprintf(query, "DROP FUNCTION %s", (char*) utf8_func);
rc= mysql_query(mysql, query);
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "set names default");
check_mysql_rc(rc, mysql);
return OK;
} | O0 | c | test_bug27876:
pushq %rbp
movq %rsp, %rbp
subq $0x2d0, %rsp # imm = 0x2D0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x250(%rbp)
movq 0x3c27a(%rip), %rax # 0x52650
movq %rax, -0x20(%rbp)
movq 0x3c277(%rip), %rax # 0x52658
movq %rax, -0x18(%rbp)
movw 0x3c274(%rip), %ax # 0x52660
movw %ax, -0x10(%rbp)
movb 0x3c26c(%rip), %al # 0x52662
movb %al, -0xe(%rbp)
movq 0x3c270(%rip), %rax # 0x52670
movq %rax, -0x40(%rbp)
movq 0x3c26d(%rip), %rax # 0x52678
movq %rax, -0x38(%rbp)
movq 0x3c26a(%rip), %rax # 0x52680
movq %rax, -0x30(%rbp)
movq 0x3c267(%rip), %rax # 0x52688
movq %rax, -0x28(%rbp)
movq -0x250(%rbp), %rdi
leaq 0x388d3(%rip), %rsi # 0x4ed06
callq 0x22f20
movl %eax, -0x254(%rbp)
cmpl $0x0, -0x254(%rbp)
je 0x164ab
movl -0x254(%rbp), %eax
movl %eax, -0x26c(%rbp)
movq -0x250(%rbp), %rdi
callq 0x268a0
movq %rax, -0x268(%rbp)
movq -0x250(%rbp), %rdi
callq 0x26870
movl -0x26c(%rbp), %esi
movq -0x268(%rbp), %rdx
movl %eax, %ecx
leaq 0x37da3(%rip), %rdi # 0x4e22b
leaq 0x381fd(%rip), %r8 # 0x4e68c
movl $0x100, %r9d # imm = 0x100
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x244(%rbp)
jmp 0x16906
jmp 0x164ad
movq -0x250(%rbp), %rdi
leaq 0x3885a(%rip), %rsi # 0x4ed15
callq 0x22f20
movl %eax, -0x254(%rbp)
cmpl $0x0, -0x254(%rbp)
je 0x16533
movl -0x254(%rbp), %eax
movl %eax, -0x27c(%rbp)
movq -0x250(%rbp), %rdi
callq 0x268a0
movq %rax, -0x278(%rbp)
movq -0x250(%rbp), %rdi
callq 0x26870
movl -0x27c(%rbp), %esi
movq -0x278(%rbp), %rdx
movl %eax, %ecx
leaq 0x37d1b(%rip), %rdi # 0x4e22b
leaq 0x38175(%rip), %r8 # 0x4e68c
movl $0x103, %r9d # imm = 0x103
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x244(%rbp)
jmp 0x16906
jmp 0x16535
movq -0x250(%rbp), %rdi
callq 0x24570
movq %rax, -0x260(%rbp)
cmpq $0x0, -0x260(%rbp)
jne 0x16582
leaq 0x37b8d(%rip), %rdi # 0x4e0e6
leaq 0x37ced(%rip), %rsi # 0x4e24d
leaq 0x38125(%rip), %rdx # 0x4e68c
movl $0x105, %ecx # imm = 0x105
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x244(%rbp)
jmp 0x16906
jmp 0x16584
movq -0x260(%rbp), %rdi
callq 0x1bdb0
leaq -0x240(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq 0x38784(%rip), %rsi # 0x4ed26
movb $0x0, %al
callq 0x130f0
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x22f20
movl %eax, -0x254(%rbp)
cmpl $0x0, -0x254(%rbp)
je 0x1662f
movl -0x254(%rbp), %eax
movl %eax, -0x28c(%rbp)
movq -0x250(%rbp), %rdi
callq 0x268a0
movq %rax, -0x288(%rbp)
movq -0x250(%rbp), %rdi
callq 0x26870
movl -0x28c(%rbp), %esi
movq -0x288(%rbp), %rdx
movl %eax, %ecx
leaq 0x37c1f(%rip), %rdi # 0x4e22b
leaq 0x38079(%rip), %r8 # 0x4e68c
movl $0x10a, %r9d # imm = 0x10A
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x244(%rbp)
jmp 0x16906
jmp 0x16631
leaq -0x240(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
leaq -0x40(%rbp), %r8
leaq 0x386f6(%rip), %rsi # 0x4ed41
movb $0x0, %al
callq 0x130f0
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x22f20
movl %eax, -0x254(%rbp)
cmpl $0x0, -0x254(%rbp)
je 0x166d8
movl -0x254(%rbp), %eax
movl %eax, -0x29c(%rbp)
movq -0x250(%rbp), %rdi
callq 0x268a0
movq %rax, -0x298(%rbp)
movq -0x250(%rbp), %rdi
callq 0x26870
movl -0x29c(%rbp), %esi
movq -0x298(%rbp), %rdx
movl %eax, %ecx
leaq 0x37b76(%rip), %rdi # 0x4e22b
leaq 0x37fd0(%rip), %r8 # 0x4e68c
movl $0x111, %r9d # imm = 0x111
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x244(%rbp)
jmp 0x16906
jmp 0x166da
leaq -0x240(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq 0x386a5(%rip), %rsi # 0x4ed91
movb $0x0, %al
callq 0x130f0
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x22f20
movl %eax, -0x254(%rbp)
cmpl $0x0, -0x254(%rbp)
je 0x16779
movl -0x254(%rbp), %eax
movl %eax, -0x2ac(%rbp)
movq -0x250(%rbp), %rdi
callq 0x268a0
movq %rax, -0x2a8(%rbp)
movq -0x250(%rbp), %rdi
callq 0x26870
movl -0x2ac(%rbp), %esi
movq -0x2a8(%rbp), %rdx
movl %eax, %ecx
leaq 0x37ad5(%rip), %rdi # 0x4e22b
leaq 0x37f2f(%rip), %r8 # 0x4e68c
movl $0x114, %r9d # imm = 0x114
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x244(%rbp)
jmp 0x16906
jmp 0x1677b
movq -0x250(%rbp), %rdi
callq 0x24570
movq %rax, -0x260(%rbp)
cmpq $0x0, -0x260(%rbp)
jne 0x167c8
leaq 0x37947(%rip), %rdi # 0x4e0e6
leaq 0x37aa7(%rip), %rsi # 0x4e24d
leaq 0x37edf(%rip), %rdx # 0x4e68c
movl $0x116, %ecx # imm = 0x116
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x244(%rbp)
jmp 0x16906
jmp 0x167ca
movq -0x260(%rbp), %rdi
callq 0x1bdb0
leaq -0x240(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq 0x385be(%rip), %rsi # 0x4eda6
movb $0x0, %al
callq 0x130f0
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x22f20
movl %eax, -0x254(%rbp)
cmpl $0x0, -0x254(%rbp)
je 0x16875
movl -0x254(%rbp), %eax
movl %eax, -0x2bc(%rbp)
movq -0x250(%rbp), %rdi
callq 0x268a0
movq %rax, -0x2b8(%rbp)
movq -0x250(%rbp), %rdi
callq 0x26870
movl -0x2bc(%rbp), %esi
movq -0x2b8(%rbp), %rdx
movl %eax, %ecx
leaq 0x379d9(%rip), %rdi # 0x4e22b
leaq 0x37e33(%rip), %r8 # 0x4e68c
movl $0x11b, %r9d # imm = 0x11B
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x244(%rbp)
jmp 0x16906
jmp 0x16877
movq -0x250(%rbp), %rdi
leaq 0x38532(%rip), %rsi # 0x4edb7
callq 0x22f20
movl %eax, -0x254(%rbp)
cmpl $0x0, -0x254(%rbp)
je 0x168fa
movl -0x254(%rbp), %eax
movl %eax, -0x2cc(%rbp)
movq -0x250(%rbp), %rdi
callq 0x268a0
movq %rax, -0x2c8(%rbp)
movq -0x250(%rbp), %rdi
callq 0x26870
movl -0x2cc(%rbp), %esi
movq -0x2c8(%rbp), %rdx
movl %eax, %ecx
leaq 0x37951(%rip), %rdi # 0x4e22b
leaq 0x37dab(%rip), %r8 # 0x4e68c
movl $0x11e, %r9d # imm = 0x11E
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x244(%rbp)
jmp 0x16906
jmp 0x168fc
movl $0x0, -0x244(%rbp)
movl -0x244(%rbp), %eax
movl %eax, -0x2d0(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x16933
movl -0x2d0(%rbp), %eax
addq $0x2d0, %rsp # imm = 0x2D0
popq %rbp
retq
callq 0x134b0
nopl (%rax,%rax)
| test_bug27876:
push rbp
mov rbp, rsp
sub rsp, 2D0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_250], rdi
mov rax, cs:qword_52650
mov [rbp+var_20], rax
mov rax, cs:qword_52658
mov [rbp+var_18], rax
mov ax, cs:word_52660
mov [rbp+var_10], ax
mov al, cs:byte_52662
mov [rbp+var_E], al
mov rax, cs:qword_52670
mov [rbp+var_40], rax
mov rax, cs:qword_52678
mov [rbp+var_38], rax
mov rax, cs:qword_52680
mov [rbp+var_30], rax
mov rax, cs:qword_52688
mov [rbp+var_28], rax
mov rdi, [rbp+var_250]
lea rsi, aSetNamesUtf8; "set names utf8"
call mysql_query
mov [rbp+var_254], eax
cmp [rbp+var_254], 0
jz short loc_164AB
mov eax, [rbp+var_254]
mov [rbp+var_26C], eax
mov rdi, [rbp+var_250]
call mysql_error
mov [rbp+var_268], rax
mov rdi, [rbp+var_250]
call mysql_errno
mov esi, [rbp+var_26C]
mov rdx, [rbp+var_268]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 100h
mov al, 0
call diag
mov [rbp+var_244], 1
jmp loc_16906
loc_164AB:
jmp short $+2
loc_164AD:
mov rdi, [rbp+var_250]
lea rsi, aSelectVersion; "select version()"
call mysql_query
mov [rbp+var_254], eax
cmp [rbp+var_254], 0
jz short loc_16533
mov eax, [rbp+var_254]
mov [rbp+var_27C], eax
mov rdi, [rbp+var_250]
call mysql_error
mov [rbp+var_278], rax
mov rdi, [rbp+var_250]
call mysql_errno
mov esi, [rbp+var_27C]
mov rdx, [rbp+var_278]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 103h
mov al, 0
call diag
mov [rbp+var_244], 1
jmp loc_16906
loc_16533:
jmp short $+2
loc_16535:
mov rdi, [rbp+var_250]
call mysql_store_result
mov [rbp+var_260], rax
cmp [rbp+var_260], 0
jnz short loc_16582
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aInvalidResultS; "Invalid result set"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 105h
mov al, 0
call diag
mov [rbp+var_244], 1
jmp loc_16906
loc_16582:
jmp short $+2
loc_16584:
mov rdi, [rbp+var_260]
call mysql_free_result
lea rdi, [rbp+var_240]
lea rdx, [rbp+var_20]
lea rsi, aDropFunctionIf; "DROP FUNCTION IF EXISTS %s"
mov al, 0
call _sprintf
mov rdi, [rbp+var_250]
lea rsi, [rbp+var_240]
call mysql_query
mov [rbp+var_254], eax
cmp [rbp+var_254], 0
jz short loc_1662F
mov eax, [rbp+var_254]
mov [rbp+var_28C], eax
mov rdi, [rbp+var_250]
call mysql_error
mov [rbp+var_288], rax
mov rdi, [rbp+var_250]
call mysql_errno
mov esi, [rbp+var_28C]
mov rdx, [rbp+var_288]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 10Ah
mov al, 0
call diag
mov [rbp+var_244], 1
jmp loc_16906
loc_1662F:
jmp short $+2
loc_16631:
lea rdi, [rbp+var_240]
lea rdx, [rbp+var_20]
lea rcx, [rbp+var_40]
lea r8, [rbp+var_40]
lea rsi, aCreateFunction; "CREATE FUNCTION %s( %s VARCHAR(25)) RET"...
mov al, 0
call _sprintf
mov rdi, [rbp+var_250]
lea rsi, [rbp+var_240]
call mysql_query
mov [rbp+var_254], eax
cmp [rbp+var_254], 0
jz short loc_166D8
mov eax, [rbp+var_254]
mov [rbp+var_29C], eax
mov rdi, [rbp+var_250]
call mysql_error
mov [rbp+var_298], rax
mov rdi, [rbp+var_250]
call mysql_errno
mov esi, [rbp+var_29C]
mov rdx, [rbp+var_298]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 111h
mov al, 0
call diag
mov [rbp+var_244], 1
jmp loc_16906
loc_166D8:
jmp short $+2
loc_166DA:
lea rdi, [rbp+var_240]
lea rdx, [rbp+var_20]
lea rsi, aSelectSVersion; "SELECT %s(VERSION())"
mov al, 0
call _sprintf
mov rdi, [rbp+var_250]
lea rsi, [rbp+var_240]
call mysql_query
mov [rbp+var_254], eax
cmp [rbp+var_254], 0
jz short loc_16779
mov eax, [rbp+var_254]
mov [rbp+var_2AC], eax
mov rdi, [rbp+var_250]
call mysql_error
mov [rbp+var_2A8], rax
mov rdi, [rbp+var_250]
call mysql_errno
mov esi, [rbp+var_2AC]
mov rdx, [rbp+var_2A8]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 114h
mov al, 0
call diag
mov [rbp+var_244], 1
jmp loc_16906
loc_16779:
jmp short $+2
loc_1677B:
mov rdi, [rbp+var_250]
call mysql_store_result
mov [rbp+var_260], rax
cmp [rbp+var_260], 0
jnz short loc_167C8
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aInvalidResultS; "Invalid result set"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 116h
mov al, 0
call diag
mov [rbp+var_244], 1
jmp loc_16906
loc_167C8:
jmp short $+2
loc_167CA:
mov rdi, [rbp+var_260]
call mysql_free_result
lea rdi, [rbp+var_240]
lea rdx, [rbp+var_20]
lea rsi, aDropFunctionS; "DROP FUNCTION %s"
mov al, 0
call _sprintf
mov rdi, [rbp+var_250]
lea rsi, [rbp+var_240]
call mysql_query
mov [rbp+var_254], eax
cmp [rbp+var_254], 0
jz short loc_16875
mov eax, [rbp+var_254]
mov [rbp+var_2BC], eax
mov rdi, [rbp+var_250]
call mysql_error
mov [rbp+var_2B8], rax
mov rdi, [rbp+var_250]
call mysql_errno
mov esi, [rbp+var_2BC]
mov rdx, [rbp+var_2B8]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 11Bh
mov al, 0
call diag
mov [rbp+var_244], 1
jmp loc_16906
loc_16875:
jmp short $+2
loc_16877:
mov rdi, [rbp+var_250]
lea rsi, aSetNamesDefaul_0; "set names default"
call mysql_query
mov [rbp+var_254], eax
cmp [rbp+var_254], 0
jz short loc_168FA
mov eax, [rbp+var_254]
mov [rbp+var_2CC], eax
mov rdi, [rbp+var_250]
call mysql_error
mov [rbp+var_2C8], rax
mov rdi, [rbp+var_250]
call mysql_errno
mov esi, [rbp+var_2CC]
mov rdx, [rbp+var_2C8]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 11Eh
mov al, 0
call diag
mov [rbp+var_244], 1
jmp short loc_16906
loc_168FA:
jmp short $+2
loc_168FC:
mov [rbp+var_244], 0
loc_16906:
mov eax, [rbp+var_244]
mov [rbp+var_2D0], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_16933
mov eax, [rbp+var_2D0]
add rsp, 2D0h
pop rbp
retn
loc_16933:
call ___stack_chk_fail
| long long test_bug27876(long long a1)
{
int v1; // eax
int v2; // eax
int v3; // r8d
int v4; // r9d
int v5; // eax
int v6; // eax
int v7; // eax
int v8; // r8d
int v9; // r9d
int v10; // eax
int v11; // eax
int v13; // [rsp+8h] [rbp-2C8h]
int v14; // [rsp+18h] [rbp-2B8h]
int v15; // [rsp+28h] [rbp-2A8h]
int v16; // [rsp+38h] [rbp-298h]
int v17; // [rsp+48h] [rbp-288h]
int v18; // [rsp+58h] [rbp-278h]
int v19; // [rsp+68h] [rbp-268h]
long long v20; // [rsp+70h] [rbp-260h]
long long v21; // [rsp+70h] [rbp-260h]
int v22; // [rsp+7Ch] [rbp-254h]
int v23; // [rsp+7Ch] [rbp-254h]
int v24; // [rsp+7Ch] [rbp-254h]
int v25; // [rsp+7Ch] [rbp-254h]
int v26; // [rsp+7Ch] [rbp-254h]
int v27; // [rsp+7Ch] [rbp-254h]
int v28; // [rsp+7Ch] [rbp-254h]
char v30[512]; // [rsp+90h] [rbp-240h] BYREF
_QWORD v31[4]; // [rsp+290h] [rbp-40h] BYREF
_QWORD v32[2]; // [rsp+2B0h] [rbp-20h] BYREF
__int16 v33; // [rsp+2C0h] [rbp-10h]
char v34; // [rsp+2C2h] [rbp-Eh]
unsigned long long v35; // [rsp+2C8h] [rbp-8h]
v35 = __readfsqword(0x28u);
v32[0] = 0xBAD0BDD083D184D1LL;
v32[1] = 0xBAD0B9D0B8D086D1LL;
v33 = -20272;
v34 = 0;
v31[0] = 0xB0D080D1B0D0BFD0LL;
v31[1] = 0x8AD182D1B5D0BCD0LL;
v31[2] = 0xD1B5D0B2D05F80D1LL;
v31[3] = 0x8FD1B8D081D180LL;
v22 = mysql_query(a1, "set names utf8");
if ( v22 )
{
v19 = mysql_error(a1);
v1 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v22,
v19,
v1,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
256);
return 1;
}
else
{
v23 = mysql_query(a1, "select version()");
if ( v23 )
{
v18 = mysql_error(a1);
v2 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v23,
v18,
v2,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
259);
return 1;
}
else
{
v20 = mysql_store_result(a1);
if ( v20 )
{
mysql_free_result(v20);
sprintf(v30, "DROP FUNCTION IF EXISTS %s", (const char *)v32);
v24 = mysql_query(a1, v30);
if ( v24 )
{
v17 = mysql_error(a1);
v5 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v24,
v17,
v5,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
266);
return 1;
}
else
{
sprintf(
v30,
"CREATE FUNCTION %s( %s VARCHAR(25)) RETURNS VARCHAR(25) DETERMINISTIC RETURN %s",
(const char *)v32,
(const char *)v31,
(const char *)v31);
v25 = mysql_query(a1, v30);
if ( v25 )
{
v16 = mysql_error(a1);
v6 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v25,
v16,
v6,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
273);
return 1;
}
else
{
sprintf(v30, "SELECT %s(VERSION())", (const char *)v32);
v26 = mysql_query(a1, v30);
if ( v26 )
{
v15 = mysql_error(a1);
v7 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v26,
v15,
v7,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
276);
return 1;
}
else
{
v21 = mysql_store_result(a1);
if ( v21 )
{
mysql_free_result(v21);
sprintf(v30, "DROP FUNCTION %s", (const char *)v32);
v27 = mysql_query(a1, v30);
if ( v27 )
{
v14 = mysql_error(a1);
v10 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v27,
v14,
v10,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
283);
return 1;
}
else
{
v28 = mysql_query(a1, "set names default");
if ( v28 )
{
v13 = mysql_error(a1);
v11 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v28,
v13,
v11,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
286);
return 1;
}
else
{
return 0;
}
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Invalid result set",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
278,
v8,
v9);
return 1;
}
}
}
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Invalid result set",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
261,
v3,
v4);
return 1;
}
}
}
}
| test_bug27876:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2d0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x250],RDI
MOV RAX,qword ptr [0x00152650]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [0x00152658]
MOV qword ptr [RBP + -0x18],RAX
MOV AX,word ptr [0x00152660]
MOV word ptr [RBP + -0x10],AX
MOV AL,byte ptr [0x00152662]
MOV byte ptr [RBP + -0xe],AL
MOV RAX,qword ptr [0x00152670]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [0x00152678]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [0x00152680]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [0x00152688]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x250]
LEA RSI,[0x14ed06]
CALL 0x00122f20
MOV dword ptr [RBP + -0x254],EAX
CMP dword ptr [RBP + -0x254],0x0
JZ 0x001164ab
MOV EAX,dword ptr [RBP + -0x254]
MOV dword ptr [RBP + -0x26c],EAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x001268a0
MOV qword ptr [RBP + -0x268],RAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x00126870
MOV ESI,dword ptr [RBP + -0x26c]
MOV RDX,qword ptr [RBP + -0x268]
MOV ECX,EAX
LEA RDI,[0x14e22b]
LEA R8,[0x14e68c]
MOV R9D,0x100
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x244],0x1
JMP 0x00116906
LAB_001164ab:
JMP 0x001164ad
LAB_001164ad:
MOV RDI,qword ptr [RBP + -0x250]
LEA RSI,[0x14ed15]
CALL 0x00122f20
MOV dword ptr [RBP + -0x254],EAX
CMP dword ptr [RBP + -0x254],0x0
JZ 0x00116533
MOV EAX,dword ptr [RBP + -0x254]
MOV dword ptr [RBP + -0x27c],EAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x001268a0
MOV qword ptr [RBP + -0x278],RAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x00126870
MOV ESI,dword ptr [RBP + -0x27c]
MOV RDX,qword ptr [RBP + -0x278]
MOV ECX,EAX
LEA RDI,[0x14e22b]
LEA R8,[0x14e68c]
MOV R9D,0x103
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x244],0x1
JMP 0x00116906
LAB_00116533:
JMP 0x00116535
LAB_00116535:
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x00124570
MOV qword ptr [RBP + -0x260],RAX
CMP qword ptr [RBP + -0x260],0x0
JNZ 0x00116582
LEA RDI,[0x14e0e6]
LEA RSI,[0x14e24d]
LEA RDX,[0x14e68c]
MOV ECX,0x105
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x244],0x1
JMP 0x00116906
LAB_00116582:
JMP 0x00116584
LAB_00116584:
MOV RDI,qword ptr [RBP + -0x260]
CALL 0x0011bdb0
LEA RDI,[RBP + -0x240]
LEA RDX,[RBP + -0x20]
LEA RSI,[0x14ed26]
MOV AL,0x0
CALL 0x001130f0
MOV RDI,qword ptr [RBP + -0x250]
LEA RSI,[RBP + -0x240]
CALL 0x00122f20
MOV dword ptr [RBP + -0x254],EAX
CMP dword ptr [RBP + -0x254],0x0
JZ 0x0011662f
MOV EAX,dword ptr [RBP + -0x254]
MOV dword ptr [RBP + -0x28c],EAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x001268a0
MOV qword ptr [RBP + -0x288],RAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x00126870
MOV ESI,dword ptr [RBP + -0x28c]
MOV RDX,qword ptr [RBP + -0x288]
MOV ECX,EAX
LEA RDI,[0x14e22b]
LEA R8,[0x14e68c]
MOV R9D,0x10a
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x244],0x1
JMP 0x00116906
LAB_0011662f:
JMP 0x00116631
LAB_00116631:
LEA RDI,[RBP + -0x240]
LEA RDX,[RBP + -0x20]
LEA RCX,[RBP + -0x40]
LEA R8,[RBP + -0x40]
LEA RSI,[0x14ed41]
MOV AL,0x0
CALL 0x001130f0
MOV RDI,qword ptr [RBP + -0x250]
LEA RSI,[RBP + -0x240]
CALL 0x00122f20
MOV dword ptr [RBP + -0x254],EAX
CMP dword ptr [RBP + -0x254],0x0
JZ 0x001166d8
MOV EAX,dword ptr [RBP + -0x254]
MOV dword ptr [RBP + -0x29c],EAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x001268a0
MOV qword ptr [RBP + -0x298],RAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x00126870
MOV ESI,dword ptr [RBP + -0x29c]
MOV RDX,qword ptr [RBP + -0x298]
MOV ECX,EAX
LEA RDI,[0x14e22b]
LEA R8,[0x14e68c]
MOV R9D,0x111
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x244],0x1
JMP 0x00116906
LAB_001166d8:
JMP 0x001166da
LAB_001166da:
LEA RDI,[RBP + -0x240]
LEA RDX,[RBP + -0x20]
LEA RSI,[0x14ed91]
MOV AL,0x0
CALL 0x001130f0
MOV RDI,qword ptr [RBP + -0x250]
LEA RSI,[RBP + -0x240]
CALL 0x00122f20
MOV dword ptr [RBP + -0x254],EAX
CMP dword ptr [RBP + -0x254],0x0
JZ 0x00116779
MOV EAX,dword ptr [RBP + -0x254]
MOV dword ptr [RBP + -0x2ac],EAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x001268a0
MOV qword ptr [RBP + -0x2a8],RAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x00126870
MOV ESI,dword ptr [RBP + -0x2ac]
MOV RDX,qword ptr [RBP + -0x2a8]
MOV ECX,EAX
LEA RDI,[0x14e22b]
LEA R8,[0x14e68c]
MOV R9D,0x114
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x244],0x1
JMP 0x00116906
LAB_00116779:
JMP 0x0011677b
LAB_0011677b:
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x00124570
MOV qword ptr [RBP + -0x260],RAX
CMP qword ptr [RBP + -0x260],0x0
JNZ 0x001167c8
LEA RDI,[0x14e0e6]
LEA RSI,[0x14e24d]
LEA RDX,[0x14e68c]
MOV ECX,0x116
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x244],0x1
JMP 0x00116906
LAB_001167c8:
JMP 0x001167ca
LAB_001167ca:
MOV RDI,qword ptr [RBP + -0x260]
CALL 0x0011bdb0
LEA RDI,[RBP + -0x240]
LEA RDX,[RBP + -0x20]
LEA RSI,[0x14eda6]
MOV AL,0x0
CALL 0x001130f0
MOV RDI,qword ptr [RBP + -0x250]
LEA RSI,[RBP + -0x240]
CALL 0x00122f20
MOV dword ptr [RBP + -0x254],EAX
CMP dword ptr [RBP + -0x254],0x0
JZ 0x00116875
MOV EAX,dword ptr [RBP + -0x254]
MOV dword ptr [RBP + -0x2bc],EAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x001268a0
MOV qword ptr [RBP + -0x2b8],RAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x00126870
MOV ESI,dword ptr [RBP + -0x2bc]
MOV RDX,qword ptr [RBP + -0x2b8]
MOV ECX,EAX
LEA RDI,[0x14e22b]
LEA R8,[0x14e68c]
MOV R9D,0x11b
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x244],0x1
JMP 0x00116906
LAB_00116875:
JMP 0x00116877
LAB_00116877:
MOV RDI,qword ptr [RBP + -0x250]
LEA RSI,[0x14edb7]
CALL 0x00122f20
MOV dword ptr [RBP + -0x254],EAX
CMP dword ptr [RBP + -0x254],0x0
JZ 0x001168fa
MOV EAX,dword ptr [RBP + -0x254]
MOV dword ptr [RBP + -0x2cc],EAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x001268a0
MOV qword ptr [RBP + -0x2c8],RAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x00126870
MOV ESI,dword ptr [RBP + -0x2cc]
MOV RDX,qword ptr [RBP + -0x2c8]
MOV ECX,EAX
LEA RDI,[0x14e22b]
LEA R8,[0x14e68c]
MOV R9D,0x11e
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x244],0x1
JMP 0x00116906
LAB_001168fa:
JMP 0x001168fc
LAB_001168fc:
MOV dword ptr [RBP + -0x244],0x0
LAB_00116906:
MOV EAX,dword ptr [RBP + -0x244]
MOV dword ptr [RBP + -0x2d0],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00116933
MOV EAX,dword ptr [RBP + -0x2d0]
ADD RSP,0x2d0
POP RBP
RET
LAB_00116933:
CALL 0x001134b0
|
int4 test_bug27876(int8 param_1)
{
int iVar1;
int4 uVar2;
int8 uVar3;
long lVar4;
long in_FS_OFFSET;
int4 local_24c;
char local_248 [512];
int8 local_48;
int8 local_40;
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
int2 local_18;
int1 local_16;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_28 = DAT_00152650;
local_20 = DAT_00152658;
local_18 = DAT_00152660;
local_16 = DAT_00152662;
local_48 = DAT_00152670;
local_40 = DAT_00152678;
local_38 = DAT_00152680;
local_30 = DAT_00152688;
iVar1 = mysql_query(param_1,"set names utf8");
if (iVar1 == 0) {
iVar1 = mysql_query(param_1,"select version()");
if (iVar1 == 0) {
lVar4 = mysql_store_result(param_1);
if (lVar4 == 0) {
diag("Error: %s (%s: %d)","Invalid result set",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
0x105);
local_24c = 1;
}
else {
mysql_free_result(lVar4);
sprintf(local_248,"DROP FUNCTION IF EXISTS %s",&local_28);
iVar1 = mysql_query(param_1,local_248);
if (iVar1 == 0) {
sprintf(local_248,
"CREATE FUNCTION %s( %s VARCHAR(25)) RETURNS VARCHAR(25) DETERMINISTIC RETURN %s",
&local_28,&local_48,&local_48);
iVar1 = mysql_query(param_1,local_248);
if (iVar1 == 0) {
sprintf(local_248,"SELECT %s(VERSION())",&local_28);
iVar1 = mysql_query(param_1,local_248);
if (iVar1 == 0) {
lVar4 = mysql_store_result(param_1);
if (lVar4 == 0) {
diag("Error: %s (%s: %d)","Invalid result set",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c"
,0x116);
local_24c = 1;
}
else {
mysql_free_result(lVar4);
sprintf(local_248,"DROP FUNCTION %s",&local_28);
iVar1 = mysql_query(param_1,local_248);
if (iVar1 == 0) {
iVar1 = mysql_query(param_1,"set names default");
if (iVar1 == 0) {
local_24c = 0;
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c"
,0x11e);
local_24c = 1;
}
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c"
,0x11b);
local_24c = 1;
}
}
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c"
,0x114);
local_24c = 1;
}
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c"
,0x111);
local_24c = 1;
}
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
0x10a);
local_24c = 1;
}
}
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",0x103
);
local_24c = 1;
}
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",0x100);
local_24c = 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_24c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
28,043 | test_bug27876 | eloqsql/libmariadb/unittest/libmariadb/charset.c | static int test_bug27876(MYSQL *mysql)
{
int rc;
MYSQL_RES *result;
uchar utf8_func[] =
{
0xd1, 0x84, 0xd1, 0x83, 0xd0, 0xbd, 0xd0, 0xba,
0xd1, 0x86, 0xd0, 0xb8, 0xd0, 0xb9, 0xd0, 0xba,
0xd0, 0xb0,
0x00
};
uchar utf8_param[] =
{
0xd0, 0xbf, 0xd0, 0xb0, 0xd1, 0x80, 0xd0, 0xb0,
0xd0, 0xbc, 0xd0, 0xb5, 0xd1, 0x82, 0xd1, 0x8a,
0xd1, 0x80, 0x5f, 0xd0, 0xb2, 0xd0, 0xb5, 0xd1,
0x80, 0xd1, 0x81, 0xd0, 0xb8, 0xd1, 0x8f,
0x00
};
char query[500];
rc= mysql_query(mysql, "set names utf8");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "select version()");
check_mysql_rc(rc, mysql);
result= mysql_store_result(mysql);
FAIL_IF(!result, "Invalid result set");
mysql_free_result(result);
sprintf(query, "DROP FUNCTION IF EXISTS %s", (char*) utf8_func);
rc= mysql_query(mysql, query);
check_mysql_rc(rc, mysql);
sprintf(query,
"CREATE FUNCTION %s( %s VARCHAR(25))"
" RETURNS VARCHAR(25) DETERMINISTIC RETURN %s",
(char*) utf8_func, (char*) utf8_param, (char*) utf8_param);
rc= mysql_query(mysql, query);
check_mysql_rc(rc, mysql);
sprintf(query, "SELECT %s(VERSION())", (char*) utf8_func);
rc= mysql_query(mysql, query);
check_mysql_rc(rc, mysql);
result= mysql_store_result(mysql);
FAIL_IF(!result, "Invalid result set");
mysql_free_result(result);
sprintf(query, "DROP FUNCTION %s", (char*) utf8_func);
rc= mysql_query(mysql, query);
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "set names default");
check_mysql_rc(rc, mysql);
return OK;
} | O3 | c | test_bug27876:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x250, %rsp # imm = 0x250
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movaps 0x24e2c(%rip), %xmm0 # 0x3a5e0
movaps %xmm0, -0x40(%rbp)
movl $0xb0d0ba, -0x31(%rbp) # imm = 0xB0D0BA
movaps 0x24e4a(%rip), %xmm0 # 0x3a610
movaps %xmm0, -0x50(%rbp)
movaps 0x24e2f(%rip), %xmm0 # 0x3a600
movaps %xmm0, -0x60(%rbp)
leaq 0x214de(%rip), %rsi # 0x36cba
callq 0x1d045
testl %eax, %eax
je 0x15819
movl %eax, %r14d
movq %rbx, %rdi
callq 0x1f0be
movq %rax, %r15
movq %rbx, %rdi
callq 0x1f0a9
leaq 0x209e3(%rip), %rdi # 0x361e5
leaq 0x20e37(%rip), %r8 # 0x36640
movl %r14d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x100, %r9d # imm = 0x100
jmp 0x1585e
leaq 0x214a9(%rip), %rsi # 0x36cc9
movq %rbx, %rdi
callq 0x1d045
testl %eax, %eax
je 0x15891
movl %eax, %r14d
movq %rbx, %rdi
callq 0x1f0be
movq %rax, %r15
movq %rbx, %rdi
callq 0x1f0a9
leaq 0x2099c(%rip), %rdi # 0x361e5
leaq 0x20df0(%rip), %r8 # 0x36640
movl %r14d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x103, %r9d # imm = 0x103
xorl %eax, %eax
callq 0x16f1f
movl $0x1, %r14d
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x15b05
movl %r14d, %eax
addq $0x250, %rsp # imm = 0x250
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x1df3d
testq %rax, %rax
je 0x15918
movq %rax, %rdi
callq 0x18cf2
leaq 0x2142d(%rip), %rcx # 0x36cda
leaq -0x260(%rbp), %r15
movl $0x1, %r14d
leaq -0x40(%rbp), %r8
movl $0x1f4, %edx # imm = 0x1F4
movq %r15, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x132a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1d045
testl %eax, %eax
je 0x1593e
movl %eax, %r15d
movq %rbx, %rdi
callq 0x1f0be
movq %rax, %r12
movq %rbx, %rdi
callq 0x1f0a9
leaq 0x208e7(%rip), %rdi # 0x361e5
leaq 0x20d3b(%rip), %r8 # 0x36640
movl %r15d, %esi
movq %r12, %rdx
movl %eax, %ecx
movl $0x10a, %r9d # imm = 0x10A
jmp 0x15a08
leaq 0x20781(%rip), %rdi # 0x360a0
leaq 0x208e1(%rip), %rsi # 0x36207
leaq 0x20d13(%rip), %rdx # 0x36640
movl $0x105, %ecx # imm = 0x105
xorl %eax, %eax
callq 0x16f1f
jmp 0x15865
leaq -0x60(%rbp), %r9
movq %r9, (%rsp)
leaq 0x213a8(%rip), %rcx # 0x36cf5
leaq -0x40(%rbp), %r8
movl $0x1f4, %edx # imm = 0x1F4
movq %r15, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x132a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1d045
testl %eax, %eax
je 0x159a8
movl %eax, %r15d
movq %rbx, %rdi
callq 0x1f0be
movq %rax, %r12
movq %rbx, %rdi
callq 0x1f0a9
leaq 0x20854(%rip), %rdi # 0x361e5
leaq 0x20ca8(%rip), %r8 # 0x36640
movl %r15d, %esi
movq %r12, %rdx
movl %eax, %ecx
movl $0x111, %r9d # imm = 0x111
jmp 0x15a08
leaq 0x21396(%rip), %rcx # 0x36d45
leaq -0x40(%rbp), %r8
movl $0x1f4, %edx # imm = 0x1F4
movq %r15, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x132a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1d045
testl %eax, %eax
je 0x15a14
movl %eax, %r15d
movq %rbx, %rdi
callq 0x1f0be
movq %rax, %r12
movq %rbx, %rdi
callq 0x1f0a9
leaq 0x207f2(%rip), %rdi # 0x361e5
leaq 0x20c46(%rip), %r8 # 0x36640
movl %r15d, %esi
movq %r12, %rdx
movl %eax, %ecx
movl $0x114, %r9d # imm = 0x114
xorl %eax, %eax
callq 0x16f1f
jmp 0x1586b
movq %rbx, %rdi
callq 0x1df3d
testq %rax, %rax
je 0x15a91
movq %rax, %rdi
callq 0x18cf2
leaq 0x2132a(%rip), %rcx # 0x36d5a
xorl %r14d, %r14d
leaq -0x40(%rbp), %r8
movl $0x1f4, %edx # imm = 0x1F4
movq %r15, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x132a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1d045
testl %eax, %eax
je 0x15ab7
movl %eax, %r15d
movq %rbx, %rdi
callq 0x1f0be
movq %rax, %r14
movq %rbx, %rdi
callq 0x1f0a9
leaq 0x2076e(%rip), %rdi # 0x361e5
leaq 0x20bc2(%rip), %r8 # 0x36640
movl %r15d, %esi
movq %r14, %rdx
movl %eax, %ecx
movl $0x11b, %r9d # imm = 0x11B
jmp 0x1585e
leaq 0x20608(%rip), %rdi # 0x360a0
leaq 0x20768(%rip), %rsi # 0x36207
leaq 0x20b9a(%rip), %rdx # 0x36640
movl $0x116, %ecx # imm = 0x116
xorl %eax, %eax
callq 0x16f1f
jmp 0x1586b
leaq 0x212ad(%rip), %rsi # 0x36d6b
movq %rbx, %rdi
callq 0x1d045
testl %eax, %eax
je 0x1586b
movl %eax, %r15d
movq %rbx, %rdi
callq 0x1f0be
movq %rax, %r14
movq %rbx, %rdi
callq 0x1f0a9
leaq 0x206fa(%rip), %rdi # 0x361e5
leaq 0x20b4e(%rip), %r8 # 0x36640
movl %r15d, %esi
movq %r14, %rdx
movl %eax, %ecx
movl $0x11e, %r9d # imm = 0x11E
jmp 0x1585e
callq 0x13500
| test_bug27876:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 250h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
movaps xmm0, cs:xmmword_3A5E0
movaps [rbp+var_40], xmm0
mov dword ptr [rbp+var_40+0Fh], 0B0D0BAh
movaps xmm0, cs:xmmword_3A610
movaps [rbp+var_50], xmm0
movaps xmm0, cs:xmmword_3A600
movaps [rbp+var_60], xmm0
lea rsi, aSetNamesUtf8; "set names utf8"
call mysql_query
test eax, eax
jz short loc_15819
mov r14d, eax
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r14d
mov rdx, r15
mov ecx, eax
mov r9d, 100h
jmp short loc_1585E
loc_15819:
lea rsi, aSelectVersion; "select version()"
mov rdi, rbx
call mysql_query
test eax, eax
jz short loc_15891
mov r14d, eax
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r14d
mov rdx, r15
mov ecx, eax
mov r9d, 103h
loc_1585E:
xor eax, eax
call diag
loc_15865:
mov r14d, 1
loc_1586B:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz loc_15B05
mov eax, r14d
add rsp, 250h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_15891:
mov rdi, rbx
call mysql_store_result
test rax, rax
jz short loc_15918
mov rdi, rax
call mysql_free_result
lea rcx, aDropFunctionIf; "DROP FUNCTION IF EXISTS %s"
lea r15, [rbp+var_260]
mov r14d, 1
lea r8, [rbp+var_40]
mov edx, 1F4h
mov rdi, r15
mov esi, 1
xor eax, eax
call ___sprintf_chk
mov rdi, rbx
mov rsi, r15
call mysql_query
test eax, eax
jz short loc_1593E
mov r15d, eax
mov rdi, rbx
call mysql_error
mov r12, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r15d
mov rdx, r12
mov ecx, eax
mov r9d, 10Ah
jmp loc_15A08
loc_15918:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aInvalidResultS; "Invalid result set"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 105h
xor eax, eax
call diag
jmp loc_15865
loc_1593E:
lea r9, [rbp+var_60]
mov [rsp+270h+var_270], r9
lea rcx, aCreateFunction; "CREATE FUNCTION %s( %s VARCHAR(25)) RET"...
lea r8, [rbp+var_40]
mov edx, 1F4h
mov rdi, r15
mov esi, 1
xor eax, eax
call ___sprintf_chk
mov rdi, rbx
mov rsi, r15
call mysql_query
test eax, eax
jz short loc_159A8
mov r15d, eax
mov rdi, rbx
call mysql_error
mov r12, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r15d
mov rdx, r12
mov ecx, eax
mov r9d, 111h
jmp short loc_15A08
loc_159A8:
lea rcx, aSelectSVersion; "SELECT %s(VERSION())"
lea r8, [rbp+var_40]
mov edx, 1F4h
mov rdi, r15
mov esi, 1
xor eax, eax
call ___sprintf_chk
mov rdi, rbx
mov rsi, r15
call mysql_query
test eax, eax
jz short loc_15A14
mov r15d, eax
mov rdi, rbx
call mysql_error
mov r12, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r15d
mov rdx, r12
mov ecx, eax
mov r9d, 114h
loc_15A08:
xor eax, eax
call diag
jmp loc_1586B
loc_15A14:
mov rdi, rbx
call mysql_store_result
test rax, rax
jz short loc_15A91
mov rdi, rax
call mysql_free_result
lea rcx, aDropFunctionS; "DROP FUNCTION %s"
xor r14d, r14d
lea r8, [rbp+var_40]
mov edx, 1F4h
mov rdi, r15
mov esi, 1
xor eax, eax
call ___sprintf_chk
mov rdi, rbx
mov rsi, r15
call mysql_query
test eax, eax
jz short loc_15AB7
mov r15d, eax
mov rdi, rbx
call mysql_error
mov r14, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r15d
mov rdx, r14
mov ecx, eax
mov r9d, 11Bh
jmp loc_1585E
loc_15A91:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aInvalidResultS; "Invalid result set"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 116h
xor eax, eax
call diag
jmp loc_1586B
loc_15AB7:
lea rsi, aSetNamesDefaul_0; "set names default"
mov rdi, rbx
call mysql_query
test eax, eax
jz loc_1586B
mov r15d, eax
mov rdi, rbx
call mysql_error
mov r14, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r15d
mov rdx, r14
mov ecx, eax
mov r9d, 11Eh
jmp loc_1585E
loc_15B05:
call ___stack_chk_fail
| long long test_bug27876(long long a1)
{
int v1; // eax
int v2; // r14d
int v3; // r15d
int v4; // eax
int v5; // esi
int v6; // edx
int v7; // ecx
int v8; // r9d
int v9; // eax
int v10; // r14d
int v11; // r15d
int v12; // eax
unsigned int v13; // r14d
long long v15; // rax
int v16; // r8d
int v17; // r9d
int v18; // eax
int v19; // r15d
int v20; // r12d
int v21; // eax
int v22; // esi
int v23; // edx
int v24; // ecx
int v25; // r9d
int v26; // eax
int v27; // r15d
int v28; // r12d
int v29; // eax
int v30; // eax
int v31; // r15d
int v32; // r12d
int v33; // eax
long long v34; // rax
int v35; // r8d
int v36; // r9d
int v37; // eax
int v38; // r15d
int v39; // r14d
int v40; // eax
int v41; // eax
int v42; // r15d
int v43; // r14d
int v44; // eax
char v45[512]; // [rsp+10h] [rbp-260h] BYREF
_OWORD v46[2]; // [rsp+210h] [rbp-60h] BYREF
char v47[24]; // [rsp+230h] [rbp-40h] BYREF
unsigned long long v48; // [rsp+248h] [rbp-28h]
v48 = __readfsqword(0x28u);
*(_OWORD *)v47 = xmmword_3A5E0;
*(_DWORD *)&v47[15] = 11587770;
v46[1] = xmmword_3A610;
v46[0] = xmmword_3A600;
v1 = mysql_query(a1, "set names utf8");
if ( v1 )
{
v2 = v1;
v3 = mysql_error(a1);
v4 = mysql_errno(a1);
v5 = v2;
v6 = v3;
v7 = v4;
v8 = 256;
}
else
{
v9 = mysql_query(a1, "select version()");
if ( !v9 )
{
v15 = mysql_store_result(a1);
if ( !v15 )
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Invalid result set",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
261,
v16,
v17);
return 1;
}
mysql_free_result(v15);
v13 = 1;
__sprintf_chk(v45, 1LL, 500LL, "DROP FUNCTION IF EXISTS %s", v47);
v18 = mysql_query(a1, v45);
if ( v18 )
{
v19 = v18;
v20 = mysql_error(a1);
v21 = mysql_errno(a1);
v22 = v19;
v23 = v20;
v24 = v21;
v25 = 266;
}
else
{
__sprintf_chk(
v45,
1LL,
500LL,
"CREATE FUNCTION %s( %s VARCHAR(25)) RETURNS VARCHAR(25) DETERMINISTIC RETURN %s",
v47,
(const char *)v46,
(const char *)v46);
v26 = mysql_query(a1, v45);
if ( v26 )
{
v27 = v26;
v28 = mysql_error(a1);
v29 = mysql_errno(a1);
v22 = v27;
v23 = v28;
v24 = v29;
v25 = 273;
}
else
{
__sprintf_chk(v45, 1LL, 500LL, "SELECT %s(VERSION())", v47);
v30 = mysql_query(a1, v45);
if ( !v30 )
{
v34 = mysql_store_result(a1);
if ( !v34 )
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Invalid result set",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
278,
v35,
v36);
return v13;
}
mysql_free_result(v34);
v13 = 0;
__sprintf_chk(v45, 1LL, 500LL, "DROP FUNCTION %s", v47);
v37 = mysql_query(a1, v45);
if ( v37 )
{
v38 = v37;
v39 = mysql_error(a1);
v40 = mysql_errno(a1);
v5 = v38;
v6 = v39;
v7 = v40;
v8 = 283;
}
else
{
v41 = mysql_query(a1, "set names default");
if ( !v41 )
return v13;
v42 = v41;
v43 = mysql_error(a1);
v44 = mysql_errno(a1);
v5 = v42;
v6 = v43;
v7 = v44;
v8 = 286;
}
goto LABEL_5;
}
v31 = v30;
v32 = mysql_error(a1);
v33 = mysql_errno(a1);
v22 = v31;
v23 = v32;
v24 = v33;
v25 = 276;
}
}
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v22,
v23,
v24,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
v25);
return v13;
}
v10 = v9;
v11 = mysql_error(a1);
v12 = mysql_errno(a1);
v5 = v10;
v6 = v11;
v7 = v12;
v8 = 259;
}
LABEL_5:
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v5,
v6,
v7,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",
v8);
return 1;
}
| test_bug27876:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x250
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOVAPS XMM0,xmmword ptr [0x0013a5e0]
MOVAPS xmmword ptr [RBP + -0x40],XMM0
MOV dword ptr [RBP + -0x31],0xb0d0ba
MOVAPS XMM0,xmmword ptr [0x0013a610]
MOVAPS xmmword ptr [RBP + -0x50],XMM0
MOVAPS XMM0,xmmword ptr [0x0013a600]
MOVAPS xmmword ptr [RBP + -0x60],XMM0
LEA RSI,[0x136cba]
CALL 0x0011d045
TEST EAX,EAX
JZ 0x00115819
MOV R14D,EAX
MOV RDI,RBX
CALL 0x0011f0be
MOV R15,RAX
MOV RDI,RBX
CALL 0x0011f0a9
LEA RDI,[0x1361e5]
LEA R8,[0x136640]
MOV ESI,R14D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x100
JMP 0x0011585e
LAB_00115819:
LEA RSI,[0x136cc9]
MOV RDI,RBX
CALL 0x0011d045
TEST EAX,EAX
JZ 0x00115891
MOV R14D,EAX
MOV RDI,RBX
CALL 0x0011f0be
MOV R15,RAX
MOV RDI,RBX
CALL 0x0011f0a9
LEA RDI,[0x1361e5]
LEA R8,[0x136640]
MOV ESI,R14D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x103
LAB_0011585e:
XOR EAX,EAX
CALL 0x00116f1f
LAB_00115865:
MOV R14D,0x1
LAB_0011586b:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00115b05
MOV EAX,R14D
ADD RSP,0x250
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00115891:
MOV RDI,RBX
CALL 0x0011df3d
TEST RAX,RAX
JZ 0x00115918
MOV RDI,RAX
CALL 0x00118cf2
LEA RCX,[0x136cda]
LEA R15,[RBP + -0x260]
MOV R14D,0x1
LEA R8,[RBP + -0x40]
MOV EDX,0x1f4
MOV RDI,R15
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001132a0
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011d045
TEST EAX,EAX
JZ 0x0011593e
MOV R15D,EAX
MOV RDI,RBX
CALL 0x0011f0be
MOV R12,RAX
MOV RDI,RBX
CALL 0x0011f0a9
LEA RDI,[0x1361e5]
LEA R8,[0x136640]
MOV ESI,R15D
MOV RDX,R12
MOV ECX,EAX
MOV R9D,0x10a
JMP 0x00115a08
LAB_00115918:
LEA RDI,[0x1360a0]
LEA RSI,[0x136207]
LEA RDX,[0x136640]
MOV ECX,0x105
XOR EAX,EAX
CALL 0x00116f1f
JMP 0x00115865
LAB_0011593e:
LEA R9,[RBP + -0x60]
MOV qword ptr [RSP],R9
LEA RCX,[0x136cf5]
LEA R8,[RBP + -0x40]
MOV EDX,0x1f4
MOV RDI,R15
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001132a0
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011d045
TEST EAX,EAX
JZ 0x001159a8
MOV R15D,EAX
MOV RDI,RBX
CALL 0x0011f0be
MOV R12,RAX
MOV RDI,RBX
CALL 0x0011f0a9
LEA RDI,[0x1361e5]
LEA R8,[0x136640]
MOV ESI,R15D
MOV RDX,R12
MOV ECX,EAX
MOV R9D,0x111
JMP 0x00115a08
LAB_001159a8:
LEA RCX,[0x136d45]
LEA R8,[RBP + -0x40]
MOV EDX,0x1f4
MOV RDI,R15
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001132a0
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011d045
TEST EAX,EAX
JZ 0x00115a14
MOV R15D,EAX
MOV RDI,RBX
CALL 0x0011f0be
MOV R12,RAX
MOV RDI,RBX
CALL 0x0011f0a9
LEA RDI,[0x1361e5]
LEA R8,[0x136640]
MOV ESI,R15D
MOV RDX,R12
MOV ECX,EAX
MOV R9D,0x114
LAB_00115a08:
XOR EAX,EAX
CALL 0x00116f1f
JMP 0x0011586b
LAB_00115a14:
MOV RDI,RBX
CALL 0x0011df3d
TEST RAX,RAX
JZ 0x00115a91
MOV RDI,RAX
CALL 0x00118cf2
LEA RCX,[0x136d5a]
XOR R14D,R14D
LEA R8,[RBP + -0x40]
MOV EDX,0x1f4
MOV RDI,R15
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001132a0
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011d045
TEST EAX,EAX
JZ 0x00115ab7
MOV R15D,EAX
MOV RDI,RBX
CALL 0x0011f0be
MOV R14,RAX
MOV RDI,RBX
CALL 0x0011f0a9
LEA RDI,[0x1361e5]
LEA R8,[0x136640]
MOV ESI,R15D
MOV RDX,R14
MOV ECX,EAX
MOV R9D,0x11b
JMP 0x0011585e
LAB_00115a91:
LEA RDI,[0x1360a0]
LEA RSI,[0x136207]
LEA RDX,[0x136640]
MOV ECX,0x116
XOR EAX,EAX
CALL 0x00116f1f
JMP 0x0011586b
LAB_00115ab7:
LEA RSI,[0x136d6b]
MOV RDI,RBX
CALL 0x0011d045
TEST EAX,EAX
JZ 0x0011586b
MOV R15D,EAX
MOV RDI,RBX
CALL 0x0011f0be
MOV R14,RAX
MOV RDI,RBX
CALL 0x0011f0a9
LEA RDI,[0x1361e5]
LEA R8,[0x136640]
MOV ESI,R15D
MOV RDX,R14
MOV ECX,EAX
MOV R9D,0x11e
JMP 0x0011585e
LAB_00115b05:
CALL 0x00113500
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 test_bug27876(int8 param_1)
{
int iVar1;
int4 uVar2;
int8 uVar3;
long lVar4;
int8 uVar5;
int8 uVar6;
long in_FS_OFFSET;
int1 local_268 [512];
int4 local_68;
int4 uStack_64;
int4 uStack_60;
int4 uStack_5c;
int8 local_58;
int8 uStack_50;
int8 local_48;
int7 uStack_40;
int4 uStack_39;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
local_48 = _DAT_0013a5e0;
uStack_40 = (int7)_UNK_0013a5e8;
uStack_39 = 0xb0d0ba;
local_58 = _DAT_0013a610;
uStack_50 = _UNK_0013a618;
local_68 = _DAT_0013a600;
uStack_64 = _UNK_0013a604;
uStack_60 = _UNK_0013a608;
uStack_5c = _UNK_0013a60c;
iVar1 = mysql_query(param_1,"set names utf8");
if (iVar1 == 0) {
iVar1 = mysql_query(param_1,"select version()");
if (iVar1 != 0) {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar5 = 0x103;
goto LAB_0011585e;
}
lVar4 = mysql_store_result(param_1);
if (lVar4 != 0) {
mysql_free_result(lVar4);
uVar3 = 1;
__sprintf_chk(local_268,1,500,"DROP FUNCTION IF EXISTS %s",&local_48);
iVar1 = mysql_query(param_1,local_268);
if (iVar1 == 0) {
__sprintf_chk(local_268,1,500,
"CREATE FUNCTION %s( %s VARCHAR(25)) RETURNS VARCHAR(25) DETERMINISTIC RETURN %s"
,&local_48,&local_68,&local_68);
iVar1 = mysql_query(param_1,local_268);
if (iVar1 == 0) {
__sprintf_chk(local_268,1,500,"SELECT %s(VERSION())",&local_48);
iVar1 = mysql_query(param_1,local_268);
if (iVar1 == 0) {
lVar4 = mysql_store_result(param_1);
if (lVar4 == 0) {
diag("Error: %s (%s: %d)","Invalid result set",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c"
,0x116);
goto LAB_0011586b;
}
mysql_free_result(lVar4);
uVar3 = 0;
__sprintf_chk(local_268,1,500,"DROP FUNCTION %s",&local_48);
iVar1 = mysql_query(param_1,local_268);
if (iVar1 == 0) {
iVar1 = mysql_query(param_1,"set names default");
if (iVar1 == 0) goto LAB_0011586b;
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar5 = 0x11e;
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar5 = 0x11b;
}
goto LAB_0011585e;
}
uVar5 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar6 = 0x114;
}
else {
uVar5 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar6 = 0x111;
}
}
else {
uVar5 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar6 = 0x10a;
}
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar5,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",uVar6
);
goto LAB_0011586b;
}
diag("Error: %s (%s: %d)","Invalid result set",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",0x105);
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar5 = 0x100;
LAB_0011585e:
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",uVar5);
}
uVar3 = 1;
LAB_0011586b:
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return uVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
28,044 | ImPlot::SetAxes(int, int) | zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp | void SetAxes(ImAxis x_idx, ImAxis y_idx) {
ImPlotContext& gp = *GImPlot;
IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "SetAxes() needs to be called between BeginPlot() and EndPlot()!");
IM_ASSERT_USER_ERROR(x_idx >= ImAxis_X1 && x_idx < ImAxis_Y1, "X-Axis index out of bounds!");
IM_ASSERT_USER_ERROR(y_idx >= ImAxis_Y1 && y_idx < ImAxis_COUNT, "Y-Axis index out of bounds!");
IM_ASSERT_USER_ERROR(gp.CurrentPlot->Axes[x_idx].Enabled, "Axis is not enabled! Did you forget to call SetupAxis()?");
IM_ASSERT_USER_ERROR(gp.CurrentPlot->Axes[y_idx].Enabled, "Axis is not enabled! Did you forget to call SetupAxis()?");
SetupLock();
gp.CurrentPlot->CurrentX = x_idx;
gp.CurrentPlot->CurrentY = y_idx;
} | O1 | cpp | ImPlot::SetAxes(int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
movq 0x276be7(%rip), %r14 # 0x336ca0
cmpq $0x0, 0x50(%r14)
jne 0xc00cc
leaq 0x1da73b(%rip), %rdi # 0x29a802
callq 0x2161f4
cmpl $0x3, %ebp
jb 0xc00dd
leaq 0x1da76a(%rip), %rdi # 0x29a842
callq 0x2161f4
leal -0x3(%rbx), %eax
cmpl $0x3, %eax
jb 0xc00f1
leaq 0x1da772(%rip), %rdi # 0x29a85e
callq 0x2161f4
movq 0x50(%r14), %rax
movslq %ebp, %rcx
imulq $0x178, %rcx, %rcx # imm = 0x178
cmpb $0x0, 0x184(%rax,%rcx)
jne 0xc0115
leaq 0x1da4e3(%rip), %rdi # 0x29a5f3
callq 0x2161f4
movq 0x50(%r14), %rax
movslq %ebx, %rcx
imulq $0x178, %rcx, %rcx # imm = 0x178
cmpb $0x0, 0x184(%rax,%rcx)
jne 0xc0139
leaq 0x1da4bf(%rip), %rdi # 0x29a5f3
callq 0x2161f4
movq 0x276b60(%rip), %r15 # 0x336ca0
movq 0x50(%r15), %rax
cmpb $0x0, 0x9de(%rax)
jne 0xc0152
callq 0xb930f
movq 0x50(%r15), %rax
movb $0x1, 0x9de(%rax)
movq 0x50(%r14), %rax
movl %ebp, 0x978(%rax)
movl %ebx, 0x97c(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ZN6ImPlot7SetAxesEii:
push rbp
push r15
push r14
push rbx
push rax
mov ebx, esi
mov ebp, edi
mov r14, cs:GImPlot
cmp qword ptr [r14+50h], 0
jnz short loc_C00CC
lea rdi, aSetaxesNeedsTo; "SetAxes() needs to be called between Be"...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_C00CC:
cmp ebp, 3
jb short loc_C00DD
lea rdi, aXAxisIndexOutO; "X-Axis index out of bounds!"
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_C00DD:
lea eax, [rbx-3]
cmp eax, 3
jb short loc_C00F1
lea rdi, aYAxisIndexOutO; "Y-Axis index out of bounds!"
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_C00F1:
mov rax, [r14+50h]
movsxd rcx, ebp
imul rcx, 178h
cmp byte ptr [rax+rcx+184h], 0
jnz short loc_C0115
lea rdi, aAxisIsNotEnabl; "Axis is not enabled! Did you forget to "...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_C0115:
mov rax, [r14+50h]
movsxd rcx, ebx
imul rcx, 178h
cmp byte ptr [rax+rcx+184h], 0
jnz short loc_C0139
lea rdi, aAxisIsNotEnabl; "Axis is not enabled! Did you forget to "...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_C0139:
mov r15, cs:GImPlot
mov rax, [r15+50h]
cmp byte ptr [rax+9DEh], 0
jnz short loc_C0152
call _ZN6ImPlot11SetupFinishEv; ImPlot::SetupFinish(void)
loc_C0152:
mov rax, [r15+50h]
mov byte ptr [rax+9DEh], 1
mov rax, [r14+50h]
mov [rax+978h], ebp
mov [rax+97Ch], ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long ImPlot::SetAxes(ImPlot *this, const char *a2)
{
unsigned int v2; // ebp
ImGui *v3; // r14
ImGui *v4; // r15
long long result; // rax
v2 = (unsigned int)this;
v3 = GImPlot;
if ( !*((_QWORD *)GImPlot + 10) )
{
this = (ImPlot *)"SetAxes() needs to be called between BeginPlot() and EndPlot()!";
ImGui::ErrorLog((ImGui *)"SetAxes() needs to be called between BeginPlot() and EndPlot()!", a2);
}
if ( v2 >= 3 )
{
this = (ImPlot *)"X-Axis index out of bounds!";
ImGui::ErrorLog((ImGui *)"X-Axis index out of bounds!", a2);
}
if ( (unsigned int)((_DWORD)a2 - 3) >= 3 )
{
this = (ImPlot *)"Y-Axis index out of bounds!";
ImGui::ErrorLog((ImGui *)"Y-Axis index out of bounds!", a2);
}
if ( !*(_BYTE *)(*((_QWORD *)v3 + 10) + 376LL * (int)v2 + 388) )
{
this = (ImPlot *)"Axis is not enabled! Did you forget to call SetupAxis()?";
ImGui::ErrorLog((ImGui *)"Axis is not enabled! Did you forget to call SetupAxis()?", a2);
}
if ( !*(_BYTE *)(*((_QWORD *)v3 + 10) + 376LL * (int)a2 + 388) )
{
this = (ImPlot *)"Axis is not enabled! Did you forget to call SetupAxis()?";
ImGui::ErrorLog((ImGui *)"Axis is not enabled! Did you forget to call SetupAxis()?", a2);
}
v4 = GImPlot;
if ( !*(_BYTE *)(*((_QWORD *)GImPlot + 10) + 2526LL) )
ImPlot::SetupFinish(this, a2);
*(_BYTE *)(*((_QWORD *)v4 + 10) + 2526LL) = 1;
result = *((_QWORD *)v3 + 10);
*(_DWORD *)(result + 2424) = v2;
*(_DWORD *)(result + 2428) = (_DWORD)a2;
return result;
}
| SetAxes:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV EBP,EDI
MOV R14,qword ptr [0x00436ca0]
CMP qword ptr [R14 + 0x50],0x0
JNZ 0x001c00cc
LEA RDI,[0x39a802]
CALL 0x003161f4
LAB_001c00cc:
CMP EBP,0x3
JC 0x001c00dd
LEA RDI,[0x39a842]
CALL 0x003161f4
LAB_001c00dd:
LEA EAX,[RBX + -0x3]
CMP EAX,0x3
JC 0x001c00f1
LEA RDI,[0x39a85e]
CALL 0x003161f4
LAB_001c00f1:
MOV RAX,qword ptr [R14 + 0x50]
MOVSXD RCX,EBP
IMUL RCX,RCX,0x178
CMP byte ptr [RAX + RCX*0x1 + 0x184],0x0
JNZ 0x001c0115
LEA RDI,[0x39a5f3]
CALL 0x003161f4
LAB_001c0115:
MOV RAX,qword ptr [R14 + 0x50]
MOVSXD RCX,EBX
IMUL RCX,RCX,0x178
CMP byte ptr [RAX + RCX*0x1 + 0x184],0x0
JNZ 0x001c0139
LEA RDI,[0x39a5f3]
CALL 0x003161f4
LAB_001c0139:
MOV R15,qword ptr [0x00436ca0]
MOV RAX,qword ptr [R15 + 0x50]
CMP byte ptr [RAX + 0x9de],0x0
JNZ 0x001c0152
CALL 0x001b930f
LAB_001c0152:
MOV RAX,qword ptr [R15 + 0x50]
MOV byte ptr [RAX + 0x9de],0x1
MOV RAX,qword ptr [R14 + 0x50]
MOV dword ptr [RAX + 0x978],EBP
MOV dword ptr [RAX + 0x97c],EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* ImPlot::SetAxes(int, int) */
void ImPlot::SetAxes(int param_1,int param_2)
{
long lVar1;
long lVar2;
lVar1 = GImPlot;
if (*(long *)(GImPlot + 0x50) == 0) {
ImGui::ErrorLog("SetAxes() needs to be called between BeginPlot() and EndPlot()!");
}
if (2 < (uint)param_1) {
ImGui::ErrorLog("X-Axis index out of bounds!");
}
if (2 < param_2 - 3U) {
ImGui::ErrorLog("Y-Axis index out of bounds!");
}
if (*(char *)(*(long *)(lVar1 + 0x50) + 0x184 + (long)param_1 * 0x178) == '\0') {
ImGui::ErrorLog("Axis is not enabled! Did you forget to call SetupAxis()?");
}
if (*(char *)(*(long *)(lVar1 + 0x50) + 0x184 + (long)param_2 * 0x178) == '\0') {
ImGui::ErrorLog("Axis is not enabled! Did you forget to call SetupAxis()?");
}
lVar2 = GImPlot;
if (*(char *)(*(long *)(GImPlot + 0x50) + 0x9de) == '\0') {
SetupFinish();
}
*(int1 *)(*(long *)(lVar2 + 0x50) + 0x9de) = 1;
lVar1 = *(long *)(lVar1 + 0x50);
*(int *)(lVar1 + 0x978) = param_1;
*(int *)(lVar1 + 0x97c) = param_2;
return;
}
| |
28,045 | ftxui::UnderlineOption::SetAnimation(std::chrono::duration<float, std::ratio<1l, 1l>>, std::function<float (float)>) | Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/component_options.cpp | void UnderlineOption::SetAnimation(animation::Duration d,
animation::easing::Function f) {
SetAnimationDuration(d);
SetAnimationFunction(std::move(f));
} | O3 | cpp | ftxui::UnderlineOption::SetAnimation(std::chrono::duration<float, std::ratio<1l, 1l>>, std::function<float (float)>):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movss %xmm0, 0x50(%rdi)
movss %xmm0, 0x58(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x18(%rsi), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x33c4b
movups (%rsi), %xmm1
addq $0x10, %rsi
movaps %xmm1, (%rsp)
movq %rax, 0x10(%rsp)
movups %xmm0, (%rsi)
leaq 0x10(%rbx), %rdi
movq %rsp, %rsi
callq 0x36348
addq $0x30, %rbx
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x362c4
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x33c7f
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x33cab
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x33ca3
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0xb780
movq %rax, %rdi
callq 0x1049a
nop
| _ZN5ftxui15UnderlineOption12SetAnimationENSt6chrono8durationIfSt5ratioILl1ELl1EEEESt8functionIFffEE:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
movss dword ptr [rdi+50h], xmm0
movss dword ptr [rdi+58h], xmm0
xorps xmm0, xmm0
movaps [rsp+38h+var_38], xmm0
mov [rsp+38h+var_28], 0
mov rax, [rsi+18h]
mov [rsp+38h+var_20], rax
mov rax, [rsi+10h]
test rax, rax
jz short loc_33C4B
movups xmm1, xmmword ptr [rsi]
add rsi, 10h
movaps [rsp+38h+var_38], xmm1
mov [rsp+38h+var_28], rax
movups xmmword ptr [rsi], xmm0
loc_33C4B:
lea rdi, [rbx+10h]
mov rsi, rsp
call _ZNSt8functionIFffEEaSERKS1_; std::function<float ()(float)>::operator=(std::function<float ()(float)> const&)
add rbx, 30h ; '0'
mov r14, rsp
mov rdi, rbx
mov rsi, r14
call _ZNSt8functionIFffEEaSEOS1_; std::function<float ()(float)>::operator=(std::function<float ()(float)>&&)
mov rax, [r14+10h]
test rax, rax
jz short loc_33C7F
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_33C7F:
add rsp, 28h
pop rbx
pop r14
retn
jmp short loc_33CAB
mov rbx, rax
mov rax, [rsp+38h+var_28]
test rax, rax
jz short loc_33CA3
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_33CA3:
mov rdi, rbx
call __Unwind_Resume
loc_33CAB:
mov rdi, rax
call __clang_call_terminate
| long long ftxui::UnderlineOption::SetAnimation(long long a1, __int128 *a2, float a3)
{
long long ( *v3)(__int128 *, __int128 *, long long); // rax
long long result; // rax
__int128 v5; // [rsp+0h] [rbp-38h] BYREF
long long ( *v6)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-28h]
long long v7; // [rsp+18h] [rbp-20h]
*(float *)(a1 + 80) = a3;
*(float *)(a1 + 88) = a3;
v5 = 0LL;
v6 = 0LL;
v7 = *((_QWORD *)a2 + 3);
v3 = (long long ( *)(__int128 *, __int128 *, long long))*((_QWORD *)a2 + 2);
if ( v3 )
{
v5 = *a2;
v6 = v3;
a2[1] = 0LL;
}
std::function<float ()(float)>::operator=(a1 + 16, &v5);
std::function<float ()(float)>::operator=(a1 + 48, &v5);
result = (long long)v6;
if ( v6 )
return v6(&v5, &v5, 3LL);
return result;
}
| SetAnimation:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOVSS dword ptr [RDI + 0x50],XMM0
MOVSS dword ptr [RDI + 0x58],XMM0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
MOV RAX,qword ptr [RSI + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSI + 0x10]
TEST RAX,RAX
JZ 0x00133c4b
MOVUPS XMM1,xmmword ptr [RSI]
ADD RSI,0x10
MOVAPS xmmword ptr [RSP],XMM1
MOV qword ptr [RSP + 0x10],RAX
MOVUPS xmmword ptr [RSI],XMM0
LAB_00133c4b:
LEA RDI,[RBX + 0x10]
LAB_00133c4f:
MOV RSI,RSP
CALL 0x00136348
ADD RBX,0x30
MOV R14,RSP
MOV RDI,RBX
MOV RSI,R14
CALL 0x001362c4
MOV RAX,qword ptr [R14 + 0x10]
TEST RAX,RAX
JZ 0x00133c7f
LAB_00133c72:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00133c7f:
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* ftxui::UnderlineOption::SetAnimation(std::chrono::duration<float, std::ratio<1l, 1l> >,
std::function<float (float)>) */
void __thiscall
ftxui::UnderlineOption::SetAnimation(int4 param_1,UnderlineOption *this,int8 *param_3)
{
code *pcVar1;
int8 local_38;
int8 uStack_30;
code *local_28;
int8 local_20;
*(int4 *)(this + 0x50) = param_1;
*(int4 *)(this + 0x58) = param_1;
local_38 = 0;
uStack_30 = 0;
local_28 = (code *)0x0;
local_20 = param_3[3];
pcVar1 = (code *)param_3[2];
if (pcVar1 != (code *)0x0) {
local_38 = *param_3;
uStack_30 = param_3[1];
param_3[2] = 0;
param_3[3] = 0;
local_28 = pcVar1;
}
/* try { // try from 00133c4f to 00133c56 has its CatchHandler @ 00133c89 */
std::function<float(float)>::operator=
((function<float(float)> *)(this + 0x10),(function *)&local_38);
std::function<float(float)>::operator=
((function<float(float)> *)(this + 0x30),(function *)&local_38);
if (local_28 != (code *)0x0) {
/* try { // try from 00133c72 to 00133c7e has its CatchHandler @ 00133c87 */
(*local_28)(&local_38,&local_38,3);
}
return;
}
| |
28,046 | test_mdev12579 | eloqsql/tests/mysql_client_test.c | static void test_mdev12579()
{
MYSQL_STMT *stmt= mysql_stmt_init(mysql);
MYSQL_BIND bind[2];
int rc;
long l=3;
const char *data = "123456";
rc= mysql_query(mysql, "CREATE TABLE mdev12579 (k integer,t LONGTEXT,b LONGBLOB,x integer)");
myquery(rc);
rc= mysql_stmt_prepare(stmt, "INSERT INTO mdev12579 VALUES (1,?,NULL,?)", -1);
myquery(rc);
rc= mysql_stmt_send_long_data(stmt, 0, data, 6);
rc= mysql_stmt_send_long_data(stmt, 0, data, 6);
rc= mysql_stmt_send_long_data(stmt, 0, data, 6);
memset(bind, 0, sizeof(MYSQL_BIND) * 2);
bind[0].buffer_type= MYSQL_TYPE_VAR_STRING;
bind[1].buffer_type= MYSQL_TYPE_LONG;
bind[1].buffer= &l;
mysql_stmt_bind_param(stmt, bind);
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "DROP TABLE mdev12579");
myquery(rc);
} | O0 | c | test_mdev12579:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp # imm = 0x120
movq 0x3d2c26(%rip), %rdi # 0x46a4d8
callq 0xb2790
movq %rax, -0x8(%rbp)
movq $0x3, -0x100(%rbp)
leaq 0x9fb72(%rip), %rax # 0x13743f
movq %rax, -0x108(%rbp)
movq 0x3d2bfd(%rip), %rdi # 0x46a4d8
leaq 0xad9b8(%rip), %rsi # 0x14529a
callq 0x3b3d0
movl %eax, -0xf4(%rbp)
movl -0xf4(%rbp), %eax
movl %eax, -0x10c(%rbp)
cmpl $0x0, -0x10c(%rbp)
je 0x9790b
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x10c(%rbp)
jne 0x97916
jmp 0x9792e
leaq 0x962ef(%rip), %rdi # 0x12dc0c
movl $0x4da6, %esi # imm = 0x4DA6
leaq 0xac646(%rip), %rdx # 0x143f6f
callq 0x3c010
movq -0x8(%rbp), %rdi
leaq 0xad9a4(%rip), %rsi # 0x1452dd
movq $-0x1, %rdx
callq 0x3b810
movl %eax, -0xf4(%rbp)
movl -0xf4(%rbp), %eax
movl %eax, -0x110(%rbp)
cmpl $0x0, -0x110(%rbp)
je 0x97969
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x110(%rbp)
jne 0x97974
jmp 0x9798c
leaq 0x96291(%rip), %rdi # 0x12dc0c
movl $0x4da9, %esi # imm = 0x4DA9
leaq 0xac5e8(%rip), %rdx # 0x143f6f
callq 0x3c010
movq -0x8(%rbp), %rdi
movq -0x108(%rbp), %rdx
xorl %esi, %esi
movl $0x6, %ecx
callq 0x3bb40
movsbl %al, %eax
movl %eax, -0xf4(%rbp)
movq -0x8(%rbp), %rdi
movq -0x108(%rbp), %rdx
xorl %esi, %esi
movl $0x6, %ecx
callq 0x3bb40
movsbl %al, %eax
movl %eax, -0xf4(%rbp)
movq -0x8(%rbp), %rdi
movq -0x108(%rbp), %rdx
xorl %esi, %esi
movl $0x6, %ecx
callq 0x3bb40
movsbl %al, %eax
movl %eax, -0xf4(%rbp)
leaq -0xf0(%rbp), %rdi
xorl %esi, %esi
movl $0xe0, %edx
callq 0x3a2e0
movl $0xfd, -0x90(%rbp)
movl $0x3, -0x20(%rbp)
leaq -0x100(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xb1100
movq -0x8(%rbp), %rdi
callq 0x3b8a0
movl %eax, -0xf4(%rbp)
cmpl $0x0, -0xf4(%rbp)
je 0x97a50
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xf4(%rbp)
jne 0x97a5b
jmp 0x97a73
leaq 0x961aa(%rip), %rdi # 0x12dc0c
movl $0x4db6, %esi # imm = 0x4DB6
leaq 0xa1d9e(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b9f0
movq 0x3d2a55(%rip), %rdi # 0x46a4d8
leaq 0xad87d(%rip), %rsi # 0x145307
callq 0x3b3d0
movl %eax, -0xf4(%rbp)
movl -0xf4(%rbp), %eax
movl %eax, -0x114(%rbp)
cmpl $0x0, -0x114(%rbp)
je 0x97ab3
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x114(%rbp)
jne 0x97abe
jmp 0x97ad6
leaq 0x96147(%rip), %rdi # 0x12dc0c
movl $0x4dbb, %esi # imm = 0x4DBB
leaq 0xac49e(%rip), %rdx # 0x143f6f
callq 0x3c010
addq $0x120, %rsp # imm = 0x120
popq %rbp
retq
nop
| test_mdev12579:
push rbp
mov rbp, rsp
sub rsp, 120h
mov rdi, cs:mysql
call mysql_stmt_init
mov [rbp+var_8], rax
mov [rbp+var_100], 3
lea rax, a20010101102030+14h; "123456"
mov [rbp+var_108], rax
mov rdi, cs:mysql
lea rsi, aCreateTableMde; "CREATE TABLE mdev12579 (k integer,t LON"...
call wrap_mysql_query
mov [rbp+var_F4], eax
mov eax, [rbp+var_F4]
mov [rbp+var_10C], eax
cmp [rbp+var_10C], 0
jz short loc_9790B
xor eax, eax
mov edi, eax
call print_error
loc_9790B:
cmp [rbp+var_10C], 0
jnz short loc_97916
jmp short loc_9792E
loc_97916:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4DA6h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_9792E:
mov rdi, [rbp+var_8]
lea rsi, aInsertIntoMdev; "INSERT INTO mdev12579 VALUES (1,?,NULL,"...
mov rdx, 0FFFFFFFFFFFFFFFFh
call wrap_mysql_stmt_prepare
mov [rbp+var_F4], eax
mov eax, [rbp+var_F4]
mov [rbp+var_110], eax
cmp [rbp+var_110], 0
jz short loc_97969
xor eax, eax
mov edi, eax
call print_error
loc_97969:
cmp [rbp+var_110], 0
jnz short loc_97974
jmp short loc_9798C
loc_97974:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4DA9h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_9798C:
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_108]
xor esi, esi
mov ecx, 6
call wrap_mysql_stmt_send_long_data
movsx eax, al
mov [rbp+var_F4], eax
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_108]
xor esi, esi
mov ecx, 6
call wrap_mysql_stmt_send_long_data
movsx eax, al
mov [rbp+var_F4], eax
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_108]
xor esi, esi
mov ecx, 6
call wrap_mysql_stmt_send_long_data
movsx eax, al
mov [rbp+var_F4], eax
lea rdi, [rbp+var_F0]
xor esi, esi
mov edx, 0E0h
call _memset
mov [rbp+var_90], 0FDh
mov [rbp+var_20], 3
lea rax, [rbp+var_100]
mov [rbp+var_70], rax
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_F0]
call mysql_stmt_bind_param
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_execute
mov [rbp+var_F4], eax
cmp [rbp+var_F4], 0
jz short loc_97A50
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call print_st_error
loc_97A50:
cmp [rbp+var_F4], 0
jnz short loc_97A5B
jmp short loc_97A73
loc_97A5B:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4DB6h
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_97A73:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_close
mov rdi, cs:mysql
lea rsi, aDropTableMdev1; "DROP TABLE mdev12579"
call wrap_mysql_query
mov [rbp+var_F4], eax
mov eax, [rbp+var_F4]
mov [rbp+var_114], eax
cmp [rbp+var_114], 0
jz short loc_97AB3
xor eax, eax
mov edi, eax
call print_error
loc_97AB3:
cmp [rbp+var_114], 0
jnz short loc_97ABE
jmp short loc_97AD6
loc_97ABE:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4DBBh
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_97AD6:
add rsp, 120h
pop rbp
retn
| void test_mdev12579()
{
int v0; // [rsp+Ch] [rbp-114h]
long long v1; // [rsp+20h] [rbp-100h] BYREF
int v2; // [rsp+2Ch] [rbp-F4h]
_BYTE v3[96]; // [rsp+30h] [rbp-F0h] BYREF
int v4; // [rsp+90h] [rbp-90h]
long long *v5; // [rsp+B0h] [rbp-70h]
int v6; // [rsp+100h] [rbp-20h]
long long v7; // [rsp+118h] [rbp-8h]
v7 = mysql_stmt_init(mysql);
v1 = 3LL;
if ( (unsigned int)wrap_mysql_query(
mysql,
(long long)"CREATE TABLE mdev12579 (k integer,t LONGTEXT,b LONGBLOB,x integer)") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19878, "r == 0");
}
if ( (unsigned int)wrap_mysql_stmt_prepare(v7, (long long)"INSERT INTO mdev12579 VALUES (1,?,NULL,?)", -1LL) )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19881, "r == 0");
}
wrap_mysql_stmt_send_long_data(v7, 0, (long long)"123456", 6LL);
wrap_mysql_stmt_send_long_data(v7, 0, (long long)"123456", 6LL);
v2 = wrap_mysql_stmt_send_long_data(v7, 0, (long long)"123456", 6LL);
memset(v3, 0LL, 224LL);
v4 = 253;
v6 = 3;
v5 = &v1;
mysql_stmt_bind_param(v7, v3);
v2 = wrap_mysql_stmt_execute(v7);
if ( v2 )
print_st_error(v7, 0LL);
if ( v2 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19894, "rc == 0");
wrap_mysql_stmt_close(v7);
v2 = wrap_mysql_query(mysql, (long long)"DROP TABLE mdev12579");
v0 = v2;
if ( v2 )
print_error(0LL);
if ( v0 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19899, "r == 0");
}
| test_mdev12579:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x120
MOV RDI,qword ptr [0x0056a4d8]
CALL 0x001b2790
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x100],0x3
LEA RAX,[0x23743f]
MOV qword ptr [RBP + -0x108],RAX
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x24529a]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xf4],EAX
MOV EAX,dword ptr [RBP + -0xf4]
MOV dword ptr [RBP + -0x10c],EAX
CMP dword ptr [RBP + -0x10c],0x0
JZ 0x0019790b
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0019790b:
CMP dword ptr [RBP + -0x10c],0x0
JNZ 0x00197916
JMP 0x0019792e
LAB_00197916:
LEA RDI,[0x22dc0c]
MOV ESI,0x4da6
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_0019792e:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x2452dd]
MOV RDX,-0x1
CALL 0x0013b810
MOV dword ptr [RBP + -0xf4],EAX
MOV EAX,dword ptr [RBP + -0xf4]
MOV dword ptr [RBP + -0x110],EAX
CMP dword ptr [RBP + -0x110],0x0
JZ 0x00197969
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00197969:
CMP dword ptr [RBP + -0x110],0x0
JNZ 0x00197974
JMP 0x0019798c
LAB_00197974:
LEA RDI,[0x22dc0c]
MOV ESI,0x4da9
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_0019798c:
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x108]
XOR ESI,ESI
MOV ECX,0x6
CALL 0x0013bb40
MOVSX EAX,AL
MOV dword ptr [RBP + -0xf4],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x108]
XOR ESI,ESI
MOV ECX,0x6
CALL 0x0013bb40
MOVSX EAX,AL
MOV dword ptr [RBP + -0xf4],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x108]
XOR ESI,ESI
MOV ECX,0x6
CALL 0x0013bb40
MOVSX EAX,AL
MOV dword ptr [RBP + -0xf4],EAX
LEA RDI,[RBP + -0xf0]
XOR ESI,ESI
MOV EDX,0xe0
CALL 0x0013a2e0
MOV dword ptr [RBP + -0x90],0xfd
MOV dword ptr [RBP + -0x20],0x3
LEA RAX,[RBP + -0x100]
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0xf0]
CALL 0x001b1100
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b8a0
MOV dword ptr [RBP + -0xf4],EAX
CMP dword ptr [RBP + -0xf4],0x0
JZ 0x00197a50
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_00197a50:
CMP dword ptr [RBP + -0xf4],0x0
JNZ 0x00197a5b
JMP 0x00197a73
LAB_00197a5b:
LEA RDI,[0x22dc0c]
MOV ESI,0x4db6
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_00197a73:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b9f0
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x245307]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xf4],EAX
MOV EAX,dword ptr [RBP + -0xf4]
MOV dword ptr [RBP + -0x114],EAX
CMP dword ptr [RBP + -0x114],0x0
JZ 0x00197ab3
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00197ab3:
CMP dword ptr [RBP + -0x114],0x0
JNZ 0x00197abe
JMP 0x00197ad6
LAB_00197abe:
LEA RDI,[0x22dc0c]
MOV ESI,0x4dbb
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_00197ad6:
ADD RSP,0x120
POP RBP
RET
|
void test_mdev12579(void)
{
char cVar1;
int8 local_108;
int local_fc;
int1 local_f8 [96];
int4 local_98;
int8 *local_78;
int4 local_28;
int8 local_10;
local_10 = mysql_stmt_init(mysql);
local_108 = 3;
local_fc = wrap_mysql_query(mysql,
"CREATE TABLE mdev12579 (k integer,t LONGTEXT,b LONGBLOB,x integer)");
if (local_fc != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4da6,"r == 0");
}
local_fc = wrap_mysql_stmt_prepare
(local_10,"INSERT INTO mdev12579 VALUES (1,?,NULL,?)",0xffffffffffffffff);
if (local_fc != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4da9,"r == 0");
}
cVar1 = wrap_mysql_stmt_send_long_data(local_10,0,"123456",6);
local_fc = (int)cVar1;
cVar1 = wrap_mysql_stmt_send_long_data(local_10,0,"123456",6);
local_fc = (int)cVar1;
cVar1 = wrap_mysql_stmt_send_long_data(local_10,0,"123456",6);
local_fc = (int)cVar1;
memset(local_f8,0,0xe0);
local_98 = 0xfd;
local_28 = 3;
local_78 = &local_108;
mysql_stmt_bind_param(local_10,local_f8);
local_fc = wrap_mysql_stmt_execute(local_10);
if (local_fc != 0) {
print_st_error(local_10,0);
}
if (local_fc != 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4db6,"rc == 0");
}
wrap_mysql_stmt_close(local_10);
local_fc = wrap_mysql_query(mysql,"DROP TABLE mdev12579");
if (local_fc != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4dbb,"r == 0");
}
return;
}
| |
28,047 | test_mdev12579 | eloqsql/tests/mysql_client_test.c | static void test_mdev12579()
{
MYSQL_STMT *stmt= mysql_stmt_init(mysql);
MYSQL_BIND bind[2];
int rc;
long l=3;
const char *data = "123456";
rc= mysql_query(mysql, "CREATE TABLE mdev12579 (k integer,t LONGTEXT,b LONGBLOB,x integer)");
myquery(rc);
rc= mysql_stmt_prepare(stmt, "INSERT INTO mdev12579 VALUES (1,?,NULL,?)", -1);
myquery(rc);
rc= mysql_stmt_send_long_data(stmt, 0, data, 6);
rc= mysql_stmt_send_long_data(stmt, 0, data, 6);
rc= mysql_stmt_send_long_data(stmt, 0, data, 6);
memset(bind, 0, sizeof(MYSQL_BIND) * 2);
bind[0].buffer_type= MYSQL_TYPE_VAR_STRING;
bind[1].buffer_type= MYSQL_TYPE_LONG;
bind[1].buffer= &l;
mysql_stmt_bind_param(stmt, bind);
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "DROP TABLE mdev12579");
myquery(rc);
} | O3 | c | test_mdev12579:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xf0, %rsp
movq 0x3994d7(%rip), %rdi # 0x41a4c8
callq 0x9191c
movq %rax, %rbx
movq $0x3, -0x18(%rbp)
movq 0x3994c0(%rip), %rdi # 0x41a4c8
leaq 0x753d5(%rip), %rsi # 0xf63e4
callq 0x3b116
testl %eax, %eax
jne 0x810ed
leaq 0x75404(%rip), %rsi # 0xf6427
movq %rbx, %rdi
movq $-0x1, %rdx
callq 0x3b4a1
testl %eax, %eax
jne 0x8110c
leaq 0x67577(%rip), %r14 # 0xe85b8
movl $0x6, %ecx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3b762
movl $0x6, %ecx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3b762
movl $0x6, %ecx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3b762
leaq -0x100(%rbp), %r14
movl $0xe0, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x392e0
movl $0xfd, 0x60(%r14)
movl $0x3, 0xd0(%r14)
leaq -0x18(%rbp), %rax
movq %rax, 0x80(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x90d4e
movq %rbx, %rdi
callq 0x3b510
movq %rbx, %rdi
testl %eax, %eax
jne 0x8112b
callq 0x3b639
movq 0x3993f7(%rip), %rdi # 0x41a4c8
leaq 0x75379(%rip), %rsi # 0xf6451
callq 0x3b116
testl %eax, %eax
jne 0x81148
addq $0xf0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %edi, %edi
callq 0x3ba57
leaq 0x5dcb1(%rip), %rdi # 0xdedac
leaq 0x73fbd(%rip), %rdx # 0xf50bf
movl $0x4da6, %esi # imm = 0x4DA6
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x5dc92(%rip), %rdi # 0xdedac
leaq 0x73f9e(%rip), %rdx # 0xf50bf
movl $0x4da9, %esi # imm = 0x4DA9
callq 0x3bb30
callq 0x3bbbe
leaq 0x5dc75(%rip), %rdi # 0xdedac
leaq 0x69829(%rip), %rdx # 0xea967
movl $0x4db6, %esi # imm = 0x4DB6
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x5dc56(%rip), %rdi # 0xdedac
leaq 0x73f62(%rip), %rdx # 0xf50bf
movl $0x4dbb, %esi # imm = 0x4DBB
callq 0x3bb30
| test_mdev12579:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 0F0h
mov rdi, cs:mysql
call mysql_stmt_init
mov rbx, rax
mov [rbp+var_18], 3
mov rdi, cs:mysql
lea rsi, aCreateTableMde; "CREATE TABLE mdev12579 (k integer,t LON"...
call wrap_mysql_query
test eax, eax
jnz loc_810ED
lea rsi, aInsertIntoMdev; "INSERT INTO mdev12579 VALUES (1,?,NULL,"...
mov rdi, rbx
mov rdx, 0FFFFFFFFFFFFFFFFh
call wrap_mysql_stmt_prepare
test eax, eax
jnz loc_8110C
lea r14, a20010101102030+14h; "123456"
mov ecx, 6
mov rdi, rbx
xor esi, esi
mov rdx, r14
call wrap_mysql_stmt_send_long_data
mov ecx, 6
mov rdi, rbx
xor esi, esi
mov rdx, r14
call wrap_mysql_stmt_send_long_data
mov ecx, 6
mov rdi, rbx
xor esi, esi
mov rdx, r14
call wrap_mysql_stmt_send_long_data
lea r14, [rbp+var_100]
mov edx, 0E0h
mov rdi, r14
xor esi, esi
call _memset
mov dword ptr [r14+60h], 0FDh
mov dword ptr [r14+0D0h], 3
lea rax, [rbp+var_18]
mov [r14+80h], rax
mov rdi, rbx
mov rsi, r14
call mysql_stmt_bind_param
mov rdi, rbx
call wrap_mysql_stmt_execute
mov rdi, rbx
test eax, eax
jnz short loc_8112B
call wrap_mysql_stmt_close
mov rdi, cs:mysql
lea rsi, aDropTableMdev1; "DROP TABLE mdev12579"
call wrap_mysql_query
test eax, eax
jnz short loc_81148
add rsp, 0F0h
pop rbx
pop r14
pop rbp
retn
loc_810ED:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 4DA6h
call die
loc_8110C:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 4DA9h
call die
loc_8112B:
call print_st_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
mov esi, 4DB6h
call die
loc_81148:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 4DBBh
call die
| long long test_mdev12579()
{
long long v0; // rbx
long long result; // rax
_BYTE v2[96]; // [rsp+0h] [rbp-100h] BYREF
int v3; // [rsp+60h] [rbp-A0h]
long long *v4; // [rsp+80h] [rbp-80h]
int v5; // [rsp+D0h] [rbp-30h]
long long v6; // [rsp+E8h] [rbp-18h] BYREF
v0 = mysql_stmt_init(mysql);
v6 = 3LL;
if ( (unsigned int)wrap_mysql_query(
mysql,
(long long)"CREATE TABLE mdev12579 (k integer,t LONGTEXT,b LONGBLOB,x integer)") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19878, "r == 0");
}
if ( (unsigned int)wrap_mysql_stmt_prepare(v0, (long long)"INSERT INTO mdev12579 VALUES (1,?,NULL,?)", -1LL) )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19881, "r == 0");
}
wrap_mysql_stmt_send_long_data(v0, 0, (long long)"123456", 6LL);
wrap_mysql_stmt_send_long_data(v0, 0, (long long)"123456", 6LL);
wrap_mysql_stmt_send_long_data(v0, 0, (long long)"123456", 6LL);
memset(v2, 0LL, 224LL);
v3 = 253;
v5 = 3;
v4 = &v6;
mysql_stmt_bind_param(v0, v2);
if ( (unsigned int)wrap_mysql_stmt_execute(v0) )
{
print_st_error(v0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19894, "rc == 0");
}
wrap_mysql_stmt_close(v0);
result = wrap_mysql_query(mysql, (long long)"DROP TABLE mdev12579");
if ( (_DWORD)result )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19899, "r == 0");
}
return result;
}
| test_mdev12579:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0xf0
MOV RDI,qword ptr [0x0051a4c8]
CALL 0x0019191c
MOV RBX,RAX
MOV qword ptr [RBP + -0x18],0x3
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1f63e4]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x001810ed
LEA RSI,[0x1f6427]
MOV RDI,RBX
MOV RDX,-0x1
CALL 0x0013b4a1
TEST EAX,EAX
JNZ 0x0018110c
LEA R14,[0x1e85b8]
MOV ECX,0x6
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R14
CALL 0x0013b762
MOV ECX,0x6
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R14
CALL 0x0013b762
MOV ECX,0x6
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R14
CALL 0x0013b762
LEA R14,[RBP + -0x100]
MOV EDX,0xe0
MOV RDI,R14
XOR ESI,ESI
CALL 0x001392e0
MOV dword ptr [R14 + 0x60],0xfd
MOV dword ptr [R14 + 0xd0],0x3
LEA RAX,[RBP + -0x18]
MOV qword ptr [R14 + 0x80],RAX
MOV RDI,RBX
MOV RSI,R14
CALL 0x00190d4e
MOV RDI,RBX
CALL 0x0013b510
MOV RDI,RBX
TEST EAX,EAX
JNZ 0x0018112b
CALL 0x0013b639
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1f6451]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x00181148
ADD RSP,0xf0
POP RBX
POP R14
POP RBP
RET
LAB_001810ed:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x4da6
CALL 0x0013bb30
LAB_0018110c:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x4da9
CALL 0x0013bb30
LAB_0018112b:
CALL 0x0013bbbe
LEA RDI,[0x1dedac]
LEA RDX,[0x1ea967]
MOV ESI,0x4db6
CALL 0x0013bb30
LAB_00181148:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x4dbb
CALL 0x0013bb30
|
void test_mdev12579(void)
{
int iVar1;
int8 uVar2;
int1 local_108 [96];
int4 local_a8;
int8 *local_88;
int4 local_38;
int8 local_20;
uVar2 = mysql_stmt_init(mysql);
local_20 = 3;
iVar1 = wrap_mysql_query(mysql,
"CREATE TABLE mdev12579 (k integer,t LONGTEXT,b LONGBLOB,x integer)");
if (iVar1 != 0) {
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4da6,"r == 0");
}
iVar1 = wrap_mysql_stmt_prepare
(uVar2,"INSERT INTO mdev12579 VALUES (1,?,NULL,?)",0xffffffffffffffff);
if (iVar1 != 0) {
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4da9,"r == 0");
}
wrap_mysql_stmt_send_long_data(uVar2,0,"123456",6);
wrap_mysql_stmt_send_long_data(uVar2,0,"123456",6);
wrap_mysql_stmt_send_long_data(uVar2,0,"123456",6);
memset(local_108,0,0xe0);
local_a8 = 0xfd;
local_38 = 3;
local_88 = &local_20;
mysql_stmt_bind_param(uVar2,local_108);
iVar1 = wrap_mysql_stmt_execute(uVar2);
if (iVar1 != 0) {
print_st_error(uVar2);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4db6,"rc == 0");
}
wrap_mysql_stmt_close();
iVar1 = wrap_mysql_query(mysql,"DROP TABLE mdev12579");
if (iVar1 == 0) {
return;
}
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4dbb,"r == 0");
}
| |
28,048 | is_not_initialized | eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c | static int is_not_initialized(MYSQL *mysql, const char *name)
{
if (initialized)
return 0;
my_set_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD,
SQLSTATE_UNKNOWN, ER(CR_AUTH_PLUGIN_CANNOT_LOAD),
name, "not initialized");
return 1;
} | O0 | c | is_not_initialized:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpb $0x0, 0x2bf89(%rip) # 0x61c00
je 0x35c82
movl $0x0, -0x4(%rbp)
jmp 0x35cbc
movq -0x10(%rbp), %rdi
leaq 0x2a1f3(%rip), %rax # 0x5fe80
movq (%rax), %rdx
leaq 0x2a1f9(%rip), %rax # 0x5fe90
movq 0x1d8(%rax), %rcx
movq -0x18(%rbp), %r8
movl $0x80b, %esi # imm = 0x80B
leaq 0x16336(%rip), %r9 # 0x4bfe4
movb $0x0, %al
callq 0x15fd0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| is_not_initialized:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp cs:initialized, 0
jz short loc_35C82
mov [rbp+var_4], 0
jmp short loc_35CBC
loc_35C82:
mov rdi, [rbp+var_10]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+1D8h]
mov r8, [rbp+var_18]
mov esi, 80Bh
lea r9, aNotInitialized; "not initialized"
mov al, 0
call my_set_error
mov [rbp+var_4], 1
loc_35CBC:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long is_not_initialized(long long a1, long long a2)
{
if ( initialized )
{
return 0;
}
else
{
my_set_error(a1, 0x80Bu, (long long)SQLSTATE_UNKNOWN, (long long)client_errors[59], a2, "not initialized");
return 1;
}
}
| is_not_initialized:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP byte ptr [0x00161c00],0x0
JZ 0x00135c82
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00135cbc
LAB_00135c82:
MOV RDI,qword ptr [RBP + -0x10]
LEA RAX,[0x15fe80]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x15fe90]
MOV RCX,qword ptr [RAX + 0x1d8]
MOV R8,qword ptr [RBP + -0x18]
MOV ESI,0x80b
LEA R9,[0x14bfe4]
MOV AL,0x0
CALL 0x00115fd0
MOV dword ptr [RBP + -0x4],0x1
LAB_00135cbc:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
bool is_not_initialized(int8 param_1,int8 param_2)
{
bool bVar1;
bVar1 = initialized == '\0';
if (bVar1) {
my_set_error(param_1,0x80b,SQLSTATE_UNKNOWN,PTR_s_Plugin__s_could_not_be_loaded____00160068,
param_2,"not initialized");
}
return bVar1;
}
| |
28,049 | ftxui::UnderlineOption::SetAnimation(std::chrono::duration<float, std::ratio<1l, 1l>>, std::function<float (float)>) | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/component_options.cpp | void UnderlineOption::SetAnimationDuration(animation::Duration d) {
leader_duration = d;
follower_duration = d;
} | O2 | cpp | ftxui::UnderlineOption::SetAnimation(std::chrono::duration<float, std::ratio<1l, 1l>>, std::function<float (float)>):
pushq %rbx
subq $0x20, %rsp
movss %xmm0, 0x50(%rdi)
movss %xmm0, 0x58(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
movq 0x18(%rsi), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x2b8ab
movups (%rsi), %xmm1
addq $0x10, %rsi
movaps %xmm1, (%rsp)
movq %rax, 0x10(%rsp)
movups %xmm0, (%rsi)
movq %rsp, %rsi
callq 0x2b8e0
movq %rsp, %rdi
callq 0x13b10
addq $0x20, %rsp
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x13b10
movq %rbx, %rdi
callq 0xc7f0
| _ZN5ftxui15UnderlineOption12SetAnimationENSt6chrono8durationIfSt5ratioILl1ELl1EEEESt8functionIFffEE:
push rbx
sub rsp, 20h
movss dword ptr [rdi+50h], xmm0
movss dword ptr [rdi+58h], xmm0
xorps xmm0, xmm0
movaps [rsp+28h+var_28], xmm0
and [rsp+28h+var_18], 0
mov rax, [rsi+18h]
mov [rsp+28h+var_10], rax
mov rax, [rsi+10h]
test rax, rax
jz short loc_2B8AB
movups xmm1, xmmword ptr [rsi]
add rsi, 10h
movaps [rsp+28h+var_28], xmm1
mov [rsp+28h+var_18], rax
movups xmmword ptr [rsi], xmm0
loc_2B8AB:
mov rsi, rsp
call _ZN5ftxui15UnderlineOption20SetAnimationFunctionESt8functionIFffEE; ftxui::UnderlineOption::SetAnimationFunction(std::function<float ()(float)>)
mov rdi, rsp; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
add rsp, 20h
pop rbx
retn
mov rbx, rax
mov rdi, rsp; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
mov rdi, rbx
call __Unwind_Resume
| void ftxui::UnderlineOption::SetAnimation(long long a1, __int128 *a2, float a3)
{
long long v3; // rax
__int128 v4; // [rsp+0h] [rbp-28h] BYREF
long long v5; // [rsp+10h] [rbp-18h]
long long v6; // [rsp+18h] [rbp-10h]
*(float *)(a1 + 80) = a3;
*(float *)(a1 + 88) = a3;
v4 = 0LL;
v5 = 0LL;
v6 = *((_QWORD *)a2 + 3);
v3 = *((_QWORD *)a2 + 2);
if ( v3 )
{
v4 = *a2;
v5 = v3;
a2[1] = 0LL;
}
((void ( *)(long long, __int128 *))ftxui::UnderlineOption::SetAnimationFunction)(a1, &v4);
std::_Function_base::~_Function_base((std::_Function_base *)&v4);
}
| SetAnimation:
PUSH RBX
SUB RSP,0x20
MOVSS dword ptr [RDI + 0x50],XMM0
MOVSS dword ptr [RDI + 0x58],XMM0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
AND qword ptr [RSP + 0x10],0x0
MOV RAX,qword ptr [RSI + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSI + 0x10]
TEST RAX,RAX
JZ 0x0012b8ab
MOVUPS XMM1,xmmword ptr [RSI]
ADD RSI,0x10
MOVAPS xmmword ptr [RSP],XMM1
MOV qword ptr [RSP + 0x10],RAX
MOVUPS xmmword ptr [RSI],XMM0
LAB_0012b8ab:
MOV RSI,RSP
CALL 0x0012b8e0
LAB_0012b8b3:
MOV RDI,RSP
CALL 0x00113b10
ADD RSP,0x20
POP RBX
RET
|
/* ftxui::UnderlineOption::SetAnimation(std::chrono::duration<float, std::ratio<1l, 1l> >,
std::function<float (float)>) */
void __thiscall
ftxui::UnderlineOption::SetAnimation(int4 param_1,UnderlineOption *this,int8 *param_3)
{
long lVar1;
int8 local_28;
int8 uStack_20;
long local_18;
int8 local_10;
*(int4 *)(this + 0x50) = param_1;
*(int4 *)(this + 0x58) = param_1;
local_28 = 0;
uStack_20 = 0;
local_18 = 0;
local_10 = param_3[3];
lVar1 = param_3[2];
if (lVar1 != 0) {
local_28 = *param_3;
uStack_20 = param_3[1];
param_3[2] = 0;
param_3[3] = 0;
local_18 = lVar1;
}
/* try { // try from 0012b8ab to 0012b8b2 has its CatchHandler @ 0012b8c1 */
SetAnimationFunction(this,&local_28);
std::_Function_base::~_Function_base((_Function_base *)&local_28);
return;
}
| |
28,050 | string_buffer_putc16 | bluesky950520[P]quickjs/quickjs.c | static int string_buffer_putc16(StringBuffer *s, uint32_t c)
{
if (likely(s->len < s->size)) {
if (s->is_wide_char) {
s->str->u.str16[s->len++] = c;
return 0;
} else if (c < 0x100) {
s->str->u.str8[s->len++] = c;
return 0;
}
}
return string_buffer_putc_slow(s, c);
} | O0 | c | string_buffer_putc16:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
movq 0x8(%rsp), %rax
movl 0x10(%rax), %eax
movq 0x8(%rsp), %rcx
cmpl 0x14(%rcx), %eax
setl %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x7d47c
movq 0x8(%rsp), %rax
cmpl $0x0, 0x18(%rax)
je 0x7d43e
movl 0x4(%rsp), %eax
movw %ax, %dx
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rsp), %rsi
movl 0x10(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x10(%rsi)
movslq %ecx, %rcx
movw %dx, 0x18(%rax,%rcx,2)
movl $0x0, 0x14(%rsp)
jmp 0x7d48e
cmpl $0x100, 0x4(%rsp) # imm = 0x100
jae 0x7d478
movl 0x4(%rsp), %eax
movb %al, %dl
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rsp), %rsi
movl 0x10(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x10(%rsi)
movslq %ecx, %rcx
movb %dl, 0x18(%rax,%rcx)
movl $0x0, 0x14(%rsp)
jmp 0x7d48e
jmp 0x7d47a
jmp 0x7d47c
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x7d4e0
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
| string_buffer_putc16:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
mov [rsp+18h+var_14], esi
mov rax, [rsp+18h+var_10]
mov eax, [rax+10h]
mov rcx, [rsp+18h+var_10]
cmp eax, [rcx+14h]
setl al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_7D47C
mov rax, [rsp+18h+var_10]
cmp dword ptr [rax+18h], 0
jz short loc_7D43E
mov eax, [rsp+18h+var_14]
mov dx, ax
mov rax, [rsp+18h+var_10]
mov rax, [rax+8]
mov rsi, [rsp+18h+var_10]
mov ecx, [rsi+10h]
mov edi, ecx
add edi, 1
mov [rsi+10h], edi
movsxd rcx, ecx
mov [rax+rcx*2+18h], dx
mov [rsp+18h+var_4], 0
jmp short loc_7D48E
loc_7D43E:
cmp [rsp+18h+var_14], 100h
jnb short loc_7D478
mov eax, [rsp+18h+var_14]
mov dl, al
mov rax, [rsp+18h+var_10]
mov rax, [rax+8]
mov rsi, [rsp+18h+var_10]
mov ecx, [rsi+10h]
mov edi, ecx
add edi, 1
mov [rsi+10h], edi
movsxd rcx, ecx
mov [rax+rcx+18h], dl
mov [rsp+18h+var_4], 0
jmp short loc_7D48E
loc_7D478:
jmp short $+2
loc_7D47A:
jmp short $+2
loc_7D47C:
mov rdi, [rsp+18h+var_10]
mov esi, [rsp+18h+var_14]
call string_buffer_putc_slow
mov [rsp+18h+var_4], eax
loc_7D48E:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
| long long string_buffer_putc16(long long a1, unsigned int a2)
{
long long v2; // rax
int v3; // ecx
long long v4; // rax
int v5; // ecx
if ( *(_DWORD *)(a1 + 16) >= *(_DWORD *)(a1 + 20) )
return (unsigned int)string_buffer_putc_slow(a1, a2);
if ( !*(_DWORD *)(a1 + 24) )
{
if ( a2 < 0x100 )
{
v4 = *(_QWORD *)(a1 + 8);
v5 = *(_DWORD *)(a1 + 16);
*(_DWORD *)(a1 + 16) = v5 + 1;
*(_BYTE *)(v4 + v5 + 24) = a2;
return 0;
}
return (unsigned int)string_buffer_putc_slow(a1, a2);
}
v2 = *(_QWORD *)(a1 + 8);
v3 = *(_DWORD *)(a1 + 16);
*(_DWORD *)(a1 + 16) = v3 + 1;
*(_WORD *)(v2 + 2LL * v3 + 24) = a2;
return 0;
}
| string_buffer_putc16:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV dword ptr [RSP + 0x4],ESI
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x10]
MOV RCX,qword ptr [RSP + 0x8]
CMP EAX,dword ptr [RCX + 0x14]
SETL AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0017d47c
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x18],0x0
JZ 0x0017d43e
MOV EAX,dword ptr [RSP + 0x4]
MOV DX,AX
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSI + 0x10]
MOV EDI,ECX
ADD EDI,0x1
MOV dword ptr [RSI + 0x10],EDI
MOVSXD RCX,ECX
MOV word ptr [RAX + RCX*0x2 + 0x18],DX
MOV dword ptr [RSP + 0x14],0x0
JMP 0x0017d48e
LAB_0017d43e:
CMP dword ptr [RSP + 0x4],0x100
JNC 0x0017d478
MOV EAX,dword ptr [RSP + 0x4]
MOV DL,AL
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSI + 0x10]
MOV EDI,ECX
ADD EDI,0x1
MOV dword ptr [RSI + 0x10],EDI
MOVSXD RCX,ECX
MOV byte ptr [RAX + RCX*0x1 + 0x18],DL
MOV dword ptr [RSP + 0x14],0x0
JMP 0x0017d48e
LAB_0017d478:
JMP 0x0017d47a
LAB_0017d47a:
JMP 0x0017d47c
LAB_0017d47c:
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x4]
CALL 0x0017d4e0
MOV dword ptr [RSP + 0x14],EAX
LAB_0017d48e:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
int4 string_buffer_putc16(long param_1,uint param_2)
{
int iVar1;
int4 uVar2;
if (*(int *)(param_1 + 0x10) < *(int *)(param_1 + 0x14)) {
if (*(int *)(param_1 + 0x18) != 0) {
iVar1 = *(int *)(param_1 + 0x10);
*(int *)(param_1 + 0x10) = iVar1 + 1;
*(short *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1 * 2) = (short)param_2;
return 0;
}
if (param_2 < 0x100) {
iVar1 = *(int *)(param_1 + 0x10);
*(int *)(param_1 + 0x10) = iVar1 + 1;
*(char *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1) = (char)param_2;
return 0;
}
}
uVar2 = string_buffer_putc_slow(param_1,param_2);
return uVar2;
}
| |
28,051 | string_buffer_putc16 | bluesky950520[P]quickjs/quickjs.c | static int string_buffer_putc16(StringBuffer *s, uint32_t c)
{
if (likely(s->len < s->size)) {
if (s->is_wide_char) {
s->str->u.str16[s->len++] = c;
return 0;
} else if (c < 0x100) {
s->str->u.str8[s->len++] = c;
return 0;
}
}
return string_buffer_putc_slow(s, c);
} | O1 | c | string_buffer_putc16:
movslq 0x10(%rdi), %rax
cmpl 0x14(%rdi), %eax
jge 0x46c05
cmpl $0x0, 0x18(%rdi)
je 0x46beb
movq 0x8(%rdi), %rcx
leal 0x1(%rax), %edx
movl %edx, 0x10(%rdi)
movw %si, 0x18(%rcx,%rax,2)
jmp 0x46c02
cmpl $0xff, %esi
ja 0x46c05
movq 0x8(%rdi), %rcx
leal 0x1(%rax), %edx
movl %edx, 0x10(%rdi)
movb %sil, 0x18(%rcx,%rax)
xorl %eax, %eax
retq
| string_buffer_putc16:
movsxd rax, dword ptr [rdi+10h]
cmp eax, [rdi+14h]
jge short string_buffer_putc_slow
cmp dword ptr [rdi+18h], 0
jz short loc_46BEB
mov rcx, [rdi+8]
lea edx, [rax+1]
mov [rdi+10h], edx
mov [rcx+rax*2+18h], si
jmp short loc_46C02
loc_46BEB:
cmp esi, 0FFh
ja short string_buffer_putc_slow
mov rcx, [rdi+8]
lea edx, [rax+1]
mov [rdi+10h], edx
mov [rcx+rax+18h], sil
loc_46C02:
xor eax, eax
retn
| long long string_buffer_putc16(long long a1, unsigned int a2)
{
long long v2; // rax
long long v3; // rcx
long long v4; // rcx
v2 = *(int *)(a1 + 16);
if ( (int)v2 < *(_DWORD *)(a1 + 20) )
{
if ( *(_DWORD *)(a1 + 24) )
{
v3 = *(_QWORD *)(a1 + 8);
*(_DWORD *)(a1 + 16) = v2 + 1;
*(_WORD *)(v3 + 2 * v2 + 24) = a2;
return 0LL;
}
if ( a2 <= 0xFF )
{
v4 = *(_QWORD *)(a1 + 8);
*(_DWORD *)(a1 + 16) = v2 + 1;
*(_BYTE *)(v4 + v2 + 24) = a2;
return 0LL;
}
}
return string_buffer_putc_slow();
}
| string_buffer_putc16:
MOVSXD RAX,dword ptr [RDI + 0x10]
CMP EAX,dword ptr [RDI + 0x14]
JGE 0x00146c05
CMP dword ptr [RDI + 0x18],0x0
JZ 0x00146beb
MOV RCX,qword ptr [RDI + 0x8]
LEA EDX,[RAX + 0x1]
MOV dword ptr [RDI + 0x10],EDX
MOV word ptr [RCX + RAX*0x2 + 0x18],SI
JMP 0x00146c02
LAB_00146beb:
CMP ESI,0xff
JA 0x00146c05
MOV RCX,qword ptr [RDI + 0x8]
LEA EDX,[RAX + 0x1]
MOV dword ptr [RDI + 0x10],EDX
MOV byte ptr [RCX + RAX*0x1 + 0x18],SIL
LAB_00146c02:
XOR EAX,EAX
RET
|
int8 string_buffer_putc16(long param_1,uint param_2)
{
int iVar1;
iVar1 = *(int *)(param_1 + 0x10);
if (iVar1 < *(int *)(param_1 + 0x14)) {
if (*(int *)(param_1 + 0x18) != 0) {
*(int *)(param_1 + 0x10) = iVar1 + 1;
*(short *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1 * 2) = (short)param_2;
return 0;
}
if (param_2 < 0x100) {
*(int *)(param_1 + 0x10) = iVar1 + 1;
*(char *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1) = (char)param_2;
return 0;
}
}
if ((*(int *)(param_1 + 0x14) <= *(int *)(param_1 + 0x10)) &&
(iVar1 = string_buffer_realloc(param_1,*(int *)(param_1 + 0x10) + 1,param_2), iVar1 != 0)) {
return 0xffffffff;
}
if (*(int *)(param_1 + 0x18) == 0) {
if (param_2 < 0x100) {
iVar1 = *(int *)(param_1 + 0x10);
*(int *)(param_1 + 0x10) = iVar1 + 1;
*(char *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1) = (char)param_2;
return 0;
}
iVar1 = string_buffer_widen(param_1,*(int4 *)(param_1 + 0x14));
if (iVar1 != 0) {
return 0xffffffff;
}
}
iVar1 = *(int *)(param_1 + 0x10);
*(int *)(param_1 + 0x10) = iVar1 + 1;
*(short *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1 * 2) = (short)param_2;
return 0;
}
| |
28,052 | skip_prefix | bluesky950520[P]quickjs/run-test262.c | char *skip_prefix(const char *str, const char *prefix)
{
int i;
for (i = 0;; i++) {
if (prefix[i] == '\0') { /* skip the prefix */
str += i;
break;
}
if (str[i] != prefix[i])
break;
}
return (char *)str;
} | O0 | c | skip_prefix:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl $0x0, -0x14(%rsp)
movq -0x10(%rsp), %rax
movslq -0x14(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0xf04b
movl -0x14(%rsp), %ecx
movq -0x8(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rsp)
jmp 0xf07c
movq -0x8(%rsp), %rax
movslq -0x14(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x10(%rsp), %rcx
movslq -0x14(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0xf06d
jmp 0xf07c
jmp 0xf06f
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0xf022
movq -0x8(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
| skip_prefix:
mov [rsp+var_8], rdi
mov [rsp+var_10], rsi
mov [rsp+var_14], 0
loc_F022:
mov rax, [rsp+var_10]
movsxd rcx, [rsp+var_14]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0
jnz short loc_F04B
mov ecx, [rsp+var_14]
mov rax, [rsp+var_8]
movsxd rcx, ecx
add rax, rcx
mov [rsp+var_8], rax
jmp short loc_F07C
loc_F04B:
mov rax, [rsp+var_8]
movsxd rcx, [rsp+var_14]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rsp+var_10]
movsxd rdx, [rsp+var_14]
movzx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
jz short loc_F06D
jmp short loc_F07C
loc_F06D:
jmp short $+2
loc_F06F:
mov eax, [rsp+var_14]
add eax, 1
mov [rsp+var_14], eax
jmp short loc_F022
loc_F07C:
mov rax, [rsp+var_8]
retn
| long long skip_prefix(long long a1, long long a2)
{
int i; // [rsp+0h] [rbp-14h]
long long v4; // [rsp+Ch] [rbp-8h]
v4 = a1;
for ( i = 0; *(_BYTE *)(a2 + i); ++i )
{
if ( *(unsigned __int8 *)(a1 + i) != *(unsigned __int8 *)(a2 + i) )
return v4;
}
return i + a1;
}
| skip_prefix:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV dword ptr [RSP + -0x14],0x0
LAB_0010f022:
MOV RAX,qword ptr [RSP + -0x10]
MOVSXD RCX,dword ptr [RSP + -0x14]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x0
JNZ 0x0010f04b
MOV ECX,dword ptr [RSP + -0x14]
MOV RAX,qword ptr [RSP + -0x8]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RSP + -0x8],RAX
JMP 0x0010f07c
LAB_0010f04b:
MOV RAX,qword ptr [RSP + -0x8]
MOVSXD RCX,dword ptr [RSP + -0x14]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RSP + -0x10]
MOVSXD RDX,dword ptr [RSP + -0x14]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
CMP EAX,ECX
JZ 0x0010f06d
JMP 0x0010f07c
LAB_0010f06d:
JMP 0x0010f06f
LAB_0010f06f:
MOV EAX,dword ptr [RSP + -0x14]
ADD EAX,0x1
MOV dword ptr [RSP + -0x14],EAX
JMP 0x0010f022
LAB_0010f07c:
MOV RAX,qword ptr [RSP + -0x8]
RET
|
long skip_prefix(long param_1,long param_2)
{
int local_14;
local_14 = 0;
while( true ) {
if (*(char *)(param_2 + local_14) == '\0') {
return param_1 + local_14;
}
if (*(char *)(param_1 + local_14) != *(char *)(param_2 + local_14)) break;
local_14 = local_14 + 1;
}
return param_1;
}
| |
28,053 | skip_prefix | bluesky950520[P]quickjs/run-test262.c | char *skip_prefix(const char *str, const char *prefix)
{
int i;
for (i = 0;; i++) {
if (prefix[i] == '\0') { /* skip the prefix */
str += i;
break;
}
if (str[i] != prefix[i])
break;
}
return (char *)str;
} | O2 | c | skip_prefix:
movq %rdi, %rax
xorl %ecx, %ecx
movb (%rsi,%rcx), %dl
testb %dl, %dl
je 0xeef9
leaq 0x1(%rcx), %rdi
cmpb %dl, (%rax,%rcx)
movq %rdi, %rcx
je 0xeee5
retq
addq %rcx, %rax
retq
| skip_prefix:
mov rax, rdi
xor ecx, ecx
loc_EEE5:
mov dl, [rsi+rcx]
test dl, dl
jz short loc_EEF9
lea rdi, [rcx+1]
cmp [rax+rcx], dl
mov rcx, rdi
jz short loc_EEE5
retn
loc_EEF9:
add rax, rcx
retn
| long long skip_prefix(long long a1, long long a2)
{
long long result; // rax
long long v3; // rcx
unsigned __int8 v4; // dl
result = a1;
v3 = 0LL;
while ( 1 )
{
v4 = *(_BYTE *)(a2 + v3);
if ( !v4 )
break;
if ( *(_BYTE *)(a1 + v3++) != v4 )
return result;
}
return v3 + a1;
}
| skip_prefix:
MOV RAX,RDI
XOR ECX,ECX
LAB_0010eee5:
MOV DL,byte ptr [RSI + RCX*0x1]
TEST DL,DL
JZ 0x0010eef9
LEA RDI,[RCX + 0x1]
CMP byte ptr [RAX + RCX*0x1],DL
MOV RCX,RDI
JZ 0x0010eee5
RET
LAB_0010eef9:
ADD RAX,RCX
RET
|
long skip_prefix(long param_1,long param_2)
{
char *pcVar1;
char *pcVar2;
long lVar3;
lVar3 = 0;
do {
pcVar1 = (char *)(param_2 + lVar3);
if (*pcVar1 == '\0') {
return param_1 + lVar3;
}
pcVar2 = (char *)(param_1 + lVar3);
lVar3 = lVar3 + 1;
} while (*pcVar2 == *pcVar1);
return param_1;
}
| |
28,054 | mod_fast | bluesky950520[P]quickjs/libbf.c | static inline limb_t mod_fast(dlimb_t r,
limb_t m, limb_t m_inv)
{
limb_t a1, q, t0, r1, r0;
a1 = r >> NTT_MOD_LOG2_MIN;
q = ((dlimb_t)a1 * m_inv) >> LIMB_BITS;
r = r - (dlimb_t)q * m - m * 2;
r1 = r >> LIMB_BITS;
t0 = (slimb_t)r1 >> 1;
r += m & t0;
r0 = r;
r1 = r >> LIMB_BITS;
r0 += m & r1;
return r0;
} | O2 | c | mod_fast:
movq %rsi, %rax
shldq $0x3, %rdi, %rax
movq %rdx, %r8
mulq %rcx
movq %rdx, %rax
mulq %r8
leaq (%r8,%r8), %rcx
addq %rcx, %rax
adcq $0x0, %rdx
subq %rax, %rdi
sbbq %rdx, %rsi
movq %rsi, %rax
sarq %rax
andq %r8, %rax
addq %rdi, %rax
adcq $0x0, %rsi
andq %r8, %rsi
addq %rsi, %rax
retq
| mod_fast:
mov rax, rsi
shld rax, rdi, 3
mov r8, rdx
mul rcx
mov rax, rdx
mul r8
lea rcx, [r8+r8]
add rax, rcx
adc rdx, 0
sub rdi, rax
sbb rsi, rdx
mov rax, rsi
sar rax, 1
and rax, r8
add rax, rdi
adc rsi, 0
and rsi, r8
add rax, rsi
retn
| long long mod_fast(__int128 a1, unsigned long long a2, unsigned long long a3)
{
unsigned __int128 v4; // rax
unsigned __int128 v5; // kr00_16
v4 = a2 * ((a3 * (unsigned __int128)(unsigned long long)(a1 >> 61)) >> 64);
v5 = a1 - (2 * a2 + v4) + (a2 & ((long long)((a1 - (2 * a2 + v4)) >> 64) >> 1));
return (a2 & *((_QWORD *)&v5 + 1)) + v5;
}
| mod_fast:
MOV RAX,RSI
SHLD RAX,RDI,0x3
MOV R8,RDX
MUL RCX
MOV RAX,RDX
MUL R8
LEA RCX,[R8 + R8*0x1]
ADD RAX,RCX
ADC RDX,0x0
SUB RDI,RAX
SBB RSI,RDX
MOV RAX,RSI
SAR RAX,0x1
AND RAX,R8
ADD RAX,RDI
ADC RSI,0x0
AND RSI,R8
ADD RAX,RSI
RET
|
long mod_fast(ulong param_1,long param_2,ulong param_3,ulong param_4)
{
int1 auVar1 [16];
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
int1 auVar5 [16];
ulong uVar6;
long lVar7;
ulong uVar8;
auVar1._8_8_ = 0;
auVar1._0_8_ = param_2 << 3 | param_1 >> 0x3d;
auVar3._8_8_ = 0;
auVar3._0_8_ = param_4;
auVar2._8_8_ = 0;
auVar2._0_8_ = SUB168(auVar1 * auVar3,8);
auVar4._8_8_ = 0;
auVar4._0_8_ = param_3;
auVar5._8_8_ = 0;
auVar5._0_8_ = param_3 * 2;
auVar5 = auVar2 * auVar4 + auVar5;
uVar6 = auVar5._0_8_;
uVar8 = param_1 - uVar6;
lVar7 = (param_2 - auVar5._8_8_) - (ulong)(param_1 < uVar6);
uVar6 = lVar7 >> 1 & param_3;
return uVar6 + uVar8 + (lVar7 + (ulong)CARRY8(uVar6,uVar8) & param_3);
}
| |
28,055 | decltype(testing::internal::MatcherBase<std::basic_string_view<char, std::char_traits<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>::Get(fp).MatchAndExplain(fp0, fp1->stream())) testing::internal::MatcherBase<std::basic_string_view<char, std::char_traits<char>> const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::basic_string_view<char, std::char_traits<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>>(testing::internal::MatcherBase<std::basic_string_view<char, std::char_traits<char>> const&> const&, std::basic_string_view<char, std::char_traits<char>> const&, testing::MatchResultListener*) | seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/include/gtest/gtest-matchers.h | static const M& Get(const MatcherBase& m) {
return static_cast<Shared*>(m.buffer_.shared)->value;
} | O1 | c | decltype(testing::internal::MatcherBase<std::basic_string_view<char, std::char_traits<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>::Get(fp).MatchAndExplain(fp0, fp1->stream())) testing::internal::MatcherBase<std::basic_string_view<char, std::char_traits<char>> const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::basic_string_view<char, std::char_traits<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>>(testing::internal::MatcherBase<std::basic_string_view<char, std::char_traits<char>> const&> const&, std::basic_string_view<char, std::char_traits<char>> const&, testing::MatchResultListener*):
movq 0x10(%rdi), %rax
movq (%rsi), %rdx
cmpq 0x10(%rax), %rdx
jne 0x3ce86
testq %rdx, %rdx
je 0x3ce89
pushq %rax
movq 0x8(%rsi), %rdi
movq 0x8(%rax), %rsi
callq 0x94e0
testl %eax, %eax
sete %al
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
movb $0x1, %al
retq
| _ZN7testing8internal11MatcherBaseIRKSt17basic_string_viewIcSt11char_traitsIcEEE19MatchAndExplainImplINS8_11ValuePolicyINS0_9EqMatcherINSt7__cxx1112basic_stringIcS4_SaIcEEEEELb0EEEEEDTcldtclsrT_3Getfp_E15MatchAndExplainfp0_clptfp1_6streamEEERKS8_S7_PNS_19MatchResultListenerE:
mov rax, [rdi+10h]
mov rdx, [rsi]
cmp rdx, [rax+10h]
jnz short loc_3CE86
test rdx, rdx
jz short loc_3CE89
push rax
mov rdi, [rsi+8]
mov rsi, [rax+8]
call _bcmp
test eax, eax
setz al
add rsp, 8
retn
loc_3CE86:
xor eax, eax
retn
loc_3CE89:
mov al, 1
retn
| bool testing::internal::MatcherBase<std::string_view const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::string_view const&>::ValuePolicy<testing::internal::EqMatcher<std::string>,false>>(
long long a1,
_QWORD *a2)
{
long long v2; // rax
v2 = *(_QWORD *)(a1 + 16);
if ( *a2 != *(_QWORD *)(v2 + 16) )
return 0;
if ( *a2 )
return (unsigned int)bcmp(a2[1], *(_QWORD *)(v2 + 8)) == 0;
return 1;
}
| MatchAndExplainImpl<testing::internal::MatcherBase<std::basic_string_view<char,std::char_traits<char>>const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string>,false>>:
MOV RAX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RSI]
CMP RDX,qword ptr [RAX + 0x10]
JNZ 0x0013ce86
TEST RDX,RDX
JZ 0x0013ce89
PUSH RAX
MOV RDI,qword ptr [RSI + 0x8]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001094e0
TEST EAX,EAX
SETZ AL
ADD RSP,0x8
RET
LAB_0013ce86:
XOR EAX,EAX
RET
LAB_0013ce89:
MOV AL,0x1
RET
|
/* decltype (((testing::internal::MatcherBase<std::basic_string_view<char, std::char_traits<char> >
const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string >,
false>::Get({parm#1})).MatchAndExplain)({parm#2}, ({parm#3}->stream)()))
testing::internal::MatcherBase<std::basic_string_view<char, std::char_traits<char> >
const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::basic_string_view<char,
std::char_traits<char> > const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string
>, false> >(testing::internal::MatcherBase<std::basic_string_view<char, std::char_traits<char> >
const&> const&, std::basic_string_view<char, std::char_traits<char> > const&,
testing::MatchResultListener*) */
int8
testing::internal::MatcherBase<std::basic_string_view<char,std::char_traits<char>>const&>::
MatchAndExplainImpl<testing::internal::MatcherBase<std::basic_string_view<char,std::char_traits<char>>const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string>,false>>
(MatcherBase *param_1,basic_string_view *param_2,MatchResultListener *param_3)
{
long lVar1;
size_t __n;
int iVar2;
int4 extraout_var;
lVar1 = *(long *)(param_1 + 0x10);
__n = *(size_t *)param_2;
if (__n != *(size_t *)(lVar1 + 0x10)) {
return 0;
}
if (__n != 0) {
iVar2 = bcmp(*(void **)(param_2 + 8),*(void **)(lVar1 + 8),__n);
return CONCAT71((int7)(CONCAT44(extraout_var,iVar2) >> 8),iVar2 == 0);
}
return CONCAT71((int7)((ulong)lVar1 >> 8),1);
}
| |
28,056 | google::protobuf::compiler::cpp::MessageGenerator::AddGenerators(std::vector<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator, std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>, std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator, std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>>>*, std::vector<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator, std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>, std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator, std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>>>*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/message.cc | void MessageGenerator::AddGenerators(
std::vector<std::unique_ptr<EnumGenerator>>* enum_generators,
std::vector<std::unique_ptr<ExtensionGenerator>>* extension_generators) {
for (int i = 0; i < descriptor_->enum_type_count(); i++) {
enum_generators->emplace_back(
new EnumGenerator(descriptor_->enum_type(i), variables_, options_));
enum_generators_.push_back(enum_generators->back().get());
}
for (int i = 0; i < descriptor_->extension_count(); i++) {
extension_generators->emplace_back(new ExtensionGenerator(
descriptor_->extension(i), options_, scc_analyzer_));
extension_generators_.push_back(extension_generators->back().get());
}
} | O0 | cpp | google::protobuf::compiler::cpp::MessageGenerator::AddGenerators(std::vector<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator, std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>, std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator, std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>>>*, std::vector<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator, std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>, std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator, std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>>>*):
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x58(%rsp)
movl $0x0, 0x9c(%rsp)
movq 0x58(%rsp), %rax
movl 0x9c(%rsp), %ecx
movl %ecx, 0x54(%rsp)
movq (%rax), %rdi
callq 0x5ad50
movl %eax, %ecx
movl 0x54(%rsp), %eax
cmpl %ecx, %eax
jge 0xf415c
movq 0xa8(%rsp), %rax
movq %rax, 0x38(%rsp)
movl $0x68, %edi
callq 0x211c0
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x40(%rsp)
movq (%rax), %rdi
movl 0x9c(%rsp), %esi
callq 0x6eea0
movq %rax, 0x48(%rsp)
jmp 0xf40a7
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdi
movq 0x58(%rsp), %rcx
movq %rcx, %rdx
addq $0x1d8, %rdx # imm = 0x1D8
addq $0x30, %rcx
callq 0x17a150
jmp 0xf40cb
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0x90(%rsp), %rsi
callq 0xdec60
movq 0x58(%rsp), %rax
addq $0x188, %rax # imm = 0x188
movq %rax, 0x30(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x10d920
movq %rax, %rdi
callq 0xeefc0
movq 0x30(%rsp), %rdi
movq %rax, 0x78(%rsp)
leaq 0x78(%rsp), %rsi
callq 0x10d8f0
movl 0x9c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9c(%rsp)
jmp 0xf4047
movq 0x40(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
callq 0x21620
jmp 0xf426c
movl $0x0, 0x74(%rsp)
movq 0x58(%rsp), %rax
movl 0x74(%rsp), %ecx
movl %ecx, 0x2c(%rsp)
movq (%rax), %rdi
callq 0x59060
movl %eax, %ecx
movl 0x2c(%rsp), %eax
cmpl %ecx, %eax
jge 0xf4264
movq 0xa0(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x140, %edi # imm = 0x140
callq 0x211c0
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x18(%rsp)
movq (%rax), %rdi
movl 0x74(%rsp), %esi
callq 0x590a0
movq %rax, 0x20(%rsp)
jmp 0xf41be
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdi
movq 0x58(%rsp), %rax
movq %rax, %rdx
addq $0x30, %rdx
movq 0x1d0(%rax), %rcx
callq 0x180860
jmp 0xf41e2
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rsi
callq 0xdee00
movq 0x58(%rsp), %rax
addq $0x1a0, %rax # imm = 0x1A0
movq %rax, 0x8(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x10d990
movq %rax, %rdi
callq 0xeef30
movq 0x8(%rsp), %rdi
movq %rax, 0x60(%rsp)
leaq 0x60(%rsp), %rsi
callq 0x10d960
movl 0x74(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74(%rsp)
jmp 0xf4164
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
callq 0x21620
jmp 0xf426c
addq $0xb8, %rsp
retq
movq 0x88(%rsp), %rdi
callq 0x21700
nopl (%rax)
| _ZN6google8protobuf8compiler3cpp16MessageGenerator13AddGeneratorsEPSt6vectorISt10unique_ptrINS2_13EnumGeneratorESt14default_deleteIS6_EESaIS9_EEPS4_IS5_INS2_18ExtensionGeneratorES7_ISD_EESaISF_EE:
sub rsp, 0B8h
mov qword ptr [rsp+0B8h+var_8], rdi; int
mov qword ptr [rsp+0B8h+var_10], rsi; int
mov qword ptr [rsp+0B8h+var_18], rdx; int
mov rax, qword ptr [rsp+0B8h+var_8]
mov qword ptr [rsp+0B8h+var_60], rax; int
mov [rsp+0B8h+var_1C], 0
loc_F4047:
mov rax, qword ptr [rsp+0B8h+var_60]
mov ecx, [rsp+0B8h+var_1C]
mov [rsp+0B8h+var_64], ecx
mov rdi, [rax]; this
call _ZNK6google8protobuf10Descriptor15enum_type_countEv; google::protobuf::Descriptor::enum_type_count(void)
mov ecx, eax
mov eax, [rsp+0B8h+var_64]
cmp eax, ecx
jge loc_F415C
mov rax, qword ptr [rsp+0B8h+var_10]
mov qword ptr [rsp+0B8h+var_80], rax; int
mov edi, 68h ; 'h'; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, rax
mov rax, qword ptr [rsp+0B8h+var_60]
mov qword ptr [rsp+0B8h+var_78], rcx; int
mov rdi, [rax]; this
mov esi, [rsp+0B8h+var_1C]; int
call _ZNK6google8protobuf10Descriptor9enum_typeEi; google::protobuf::Descriptor::enum_type(int)
mov qword ptr [rsp+0B8h+var_70], rax; int
jmp short $+2
loc_F40A7:
mov rsi, qword ptr [rsp+0B8h+var_70]; int
mov rdi, qword ptr [rsp+0B8h+var_78]; int
mov rcx, qword ptr [rsp+0B8h+var_60]
mov rdx, rcx
add rdx, 1D8h; int
add rcx, 30h ; '0'; int
call _ZN6google8protobuf8compiler3cpp13EnumGeneratorC2EPKNS0_14EnumDescriptorERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_St4lessISD_ESaISt4pairIKSD_SD_EEERKNS2_7OptionsE; google::protobuf::compiler::cpp::EnumGenerator::EnumGenerator(google::protobuf::EnumDescriptor const*,std::map<std::string,std::string> const&,google::protobuf::compiler::cpp::Options const&)
jmp short $+2
loc_F40CB:
mov rdi, qword ptr [rsp+0B8h+var_80]
mov rax, qword ptr [rsp+0B8h+var_78]
mov [rsp+0B8h+var_28], rax
lea rsi, [rsp+0B8h+var_28]
call _ZNSt6vectorISt10unique_ptrIN6google8protobuf8compiler3cpp13EnumGeneratorESt14default_deleteIS5_EESaIS8_EE12emplace_backIJPS5_EEEvDpOT_; std::vector<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator>>::emplace_back<google::protobuf::compiler::cpp::EnumGenerator*>(google::protobuf::compiler::cpp::EnumGenerator* &&)
mov rax, qword ptr [rsp+0B8h+var_60]
add rax, 188h
mov [rsp+0B8h+var_88], rax
mov rdi, qword ptr [rsp+0B8h+var_10]
call _ZNSt6vectorISt10unique_ptrIN6google8protobuf8compiler3cpp13EnumGeneratorESt14default_deleteIS5_EESaIS8_EE4backEv; std::vector<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator>>::back(void)
mov rdi, rax
call _ZNKSt10unique_ptrIN6google8protobuf8compiler3cpp13EnumGeneratorESt14default_deleteIS4_EE3getEv; std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator>::get(void)
mov rdi, [rsp+0B8h+var_88]
mov [rsp+0B8h+var_40], rax
lea rsi, [rsp+0B8h+var_40]
call _ZNSt6vectorIPKN6google8protobuf8compiler3cpp13EnumGeneratorESaIS6_EE9push_backEOS6_; std::vector<google::protobuf::compiler::cpp::EnumGenerator const*>::push_back(google::protobuf::compiler::cpp::EnumGenerator const*&&)
mov eax, [rsp+0B8h+var_1C]
add eax, 1
mov [rsp+0B8h+var_1C], eax
jmp loc_F4047
mov rdi, [rsp+arg_38]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
call __ZdlPv; operator delete(void *)
jmp loc_F426C
loc_F415C:
mov [rsp+0B8h+var_44], 0
loc_F4164:
mov rax, qword ptr [rsp+0B8h+var_60]
mov ecx, [rsp+0B8h+var_44]
mov [rsp+0B8h+var_8C], ecx
mov rdi, [rax]; this
call _ZNK6google8protobuf10Descriptor15extension_countEv; google::protobuf::Descriptor::extension_count(void)
mov ecx, eax
mov eax, [rsp+0B8h+var_8C]
cmp eax, ecx
jge loc_F4264
mov rax, qword ptr [rsp+0B8h+var_18]
mov [rsp+0B8h+var_A8], rax
mov edi, 140h; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, rax
mov rax, qword ptr [rsp+0B8h+var_60]
mov [rsp+0B8h+var_A0], rcx
mov rdi, [rax]; this
mov esi, [rsp+0B8h+var_44]; int
call _ZNK6google8protobuf10Descriptor9extensionEi; google::protobuf::Descriptor::extension(int)
mov [rsp+0B8h+var_98], rax
jmp short $+2
loc_F41BE:
mov rsi, [rsp+0B8h+var_98]; google::protobuf::FieldDescriptor *
mov rdi, [rsp+0B8h+var_A0]; this
mov rax, qword ptr [rsp+0B8h+var_60]
mov rdx, rax
add rdx, 30h ; '0'; google::protobuf::compiler::cpp::Options *
mov rcx, [rax+1D0h]; google::protobuf::compiler::cpp::MessageSCCAnalyzer *
call _ZN6google8protobuf8compiler3cpp18ExtensionGeneratorC2EPKNS0_15FieldDescriptorERKNS2_7OptionsEPNS2_18MessageSCCAnalyzerE; google::protobuf::compiler::cpp::ExtensionGenerator::ExtensionGenerator(google::protobuf::FieldDescriptor const*,google::protobuf::compiler::cpp::Options const&,google::protobuf::compiler::cpp::MessageSCCAnalyzer *)
jmp short $+2
loc_F41E2:
mov rdi, [rsp+0B8h+var_A8]
mov rax, [rsp+0B8h+var_A0]
mov [rsp+0B8h+var_50], rax
lea rsi, [rsp+0B8h+var_50]
call _ZNSt6vectorISt10unique_ptrIN6google8protobuf8compiler3cpp18ExtensionGeneratorESt14default_deleteIS5_EESaIS8_EE12emplace_backIJPS5_EEEvDpOT_; std::vector<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator>>::emplace_back<google::protobuf::compiler::cpp::ExtensionGenerator*>(google::protobuf::compiler::cpp::ExtensionGenerator* &&)
mov rax, qword ptr [rsp+0B8h+var_60]
add rax, 1A0h
mov [rsp+0B8h+var_B0], rax
mov rdi, qword ptr [rsp+0B8h+var_18]
call _ZNSt6vectorISt10unique_ptrIN6google8protobuf8compiler3cpp18ExtensionGeneratorESt14default_deleteIS5_EESaIS8_EE4backEv; std::vector<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator>>::back(void)
mov rdi, rax
call _ZNKSt10unique_ptrIN6google8protobuf8compiler3cpp18ExtensionGeneratorESt14default_deleteIS4_EE3getEv; std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator>::get(void)
mov rdi, [rsp+0B8h+var_B0]
mov [rsp+0B8h+var_58], rax
lea rsi, [rsp+0B8h+var_58]
call _ZNSt6vectorIPKN6google8protobuf8compiler3cpp18ExtensionGeneratorESaIS6_EE9push_backEOS6_; std::vector<google::protobuf::compiler::cpp::ExtensionGenerator const*>::push_back(google::protobuf::compiler::cpp::ExtensionGenerator const*&&)
mov eax, [rsp+0B8h+var_44]
add eax, 1
mov [rsp+0B8h+var_44], eax
jmp loc_F4164
mov rdi, [rsp+arg_10]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
call __ZdlPv; operator delete(void *)
jmp short loc_F426C
loc_F4264:
add rsp, 0B8h
retn
loc_F426C:
mov rdi, [rsp+arg_80]
call __Unwind_Resume
| long long google::protobuf::compiler::cpp::MessageGenerator::AddGenerators(
google::protobuf::Descriptor **a1,
long long a2,
long long a3)
{
int v3; // ecx
long long result; // rax
long long v5; // [rsp+10h] [rbp-A8h]
google::protobuf::compiler::cpp::ExtensionGenerator *v6; // [rsp+18h] [rbp-A0h]
google::protobuf::FieldDescriptor *v7; // [rsp+20h] [rbp-98h]
int v8; // [rsp+2Ch] [rbp-8Ch]
long long v9; // [rsp+38h] [rbp-80h]
int v10[2]; // [rsp+40h] [rbp-78h]
int v11[2]; // [rsp+48h] [rbp-70h]
int v12; // [rsp+54h] [rbp-64h]
long long v13; // [rsp+60h] [rbp-58h] BYREF
google::protobuf::compiler::cpp::ExtensionGenerator *v14; // [rsp+68h] [rbp-50h] BYREF
int j; // [rsp+74h] [rbp-44h]
long long v16[3]; // [rsp+78h] [rbp-40h] BYREF
long long v17; // [rsp+90h] [rbp-28h] BYREF
int i; // [rsp+9Ch] [rbp-1Ch]
int v19[2]; // [rsp+A0h] [rbp-18h]
int v20[2]; // [rsp+A8h] [rbp-10h]
int v21[2]; // [rsp+B0h] [rbp-8h]
*(_QWORD *)v21 = a1;
*(_QWORD *)v20 = a2;
*(_QWORD *)v19 = a3;
for ( i = 0; ; ++i )
{
v12 = i;
if ( v12 >= (int)google::protobuf::Descriptor::enum_type_count(*a1) )
break;
v9 = *(_QWORD *)v20;
*(_QWORD *)v10 = operator new(0x68uLL);
*(_QWORD *)v11 = google::protobuf::Descriptor::enum_type(*a1, i);
google::protobuf::compiler::cpp::EnumGenerator::EnumGenerator(*(_QWORD *)v10, *(_QWORD *)v11, a1 + 59, a1 + 6);
v17 = *(_QWORD *)v10;
std::vector<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator>>::emplace_back<google::protobuf::compiler::cpp::EnumGenerator*>(
v9,
(long long)&v17);
std::vector<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator>>::back(*(_QWORD *)v20);
v16[0] = std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator>::get();
std::vector<google::protobuf::compiler::cpp::EnumGenerator const*>::push_back(a1 + 49, v16);
}
for ( j = 0; ; ++j )
{
v8 = j;
v3 = google::protobuf::Descriptor::extension_count(*a1);
result = (unsigned int)v8;
if ( v8 >= v3 )
break;
v5 = *(_QWORD *)v19;
v6 = (google::protobuf::compiler::cpp::ExtensionGenerator *)operator new(0x140uLL);
v7 = (google::protobuf::FieldDescriptor *)google::protobuf::Descriptor::extension(*a1, j);
google::protobuf::compiler::cpp::ExtensionGenerator::ExtensionGenerator(
v6,
v7,
(const google::protobuf::compiler::cpp::Options *)(a1 + 6),
a1[58]);
v14 = v6;
std::vector<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator>>::emplace_back<google::protobuf::compiler::cpp::ExtensionGenerator*>(
v5,
(long long)&v14);
std::vector<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator>>::back(*(_QWORD *)v19);
v13 = std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator>::get();
std::vector<google::protobuf::compiler::cpp::ExtensionGenerator const*>::push_back(a1 + 52, &v13);
}
return result;
}
| AddGenerators:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xb0],RDI
MOV qword ptr [RSP + 0xa8],RSI
MOV qword ptr [RSP + 0xa0],RDX
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x58],RAX
MOV dword ptr [RSP + 0x9c],0x0
LAB_001f4047:
MOV RAX,qword ptr [RSP + 0x58]
MOV ECX,dword ptr [RSP + 0x9c]
MOV dword ptr [RSP + 0x54],ECX
MOV RDI,qword ptr [RAX]
CALL 0x0015ad50
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x54]
CMP EAX,ECX
JGE 0x001f415c
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x38],RAX
MOV EDI,0x68
CALL 0x001211c0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x40],RCX
MOV RDI,qword ptr [RAX]
MOV ESI,dword ptr [RSP + 0x9c]
LAB_001f409b:
CALL 0x0016eea0
MOV qword ptr [RSP + 0x48],RAX
JMP 0x001f40a7
LAB_001f40a7:
MOV RSI,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x58]
MOV RDX,RCX
ADD RDX,0x1d8
ADD RCX,0x30
CALL 0x0027a150
LAB_001f40c9:
JMP 0x001f40cb
LAB_001f40cb:
MOV RDI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x90],RAX
LEA RSI,[RSP + 0x90]
CALL 0x001dec60
MOV RAX,qword ptr [RSP + 0x58]
ADD RAX,0x188
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x0020d920
MOV RDI,RAX
CALL 0x001eefc0
MOV RDI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x78],RAX
LEA RSI,[RSP + 0x78]
CALL 0x0020d8f0
MOV EAX,dword ptr [RSP + 0x9c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x9c],EAX
JMP 0x001f4047
LAB_001f415c:
MOV dword ptr [RSP + 0x74],0x0
LAB_001f4164:
MOV RAX,qword ptr [RSP + 0x58]
MOV ECX,dword ptr [RSP + 0x74]
MOV dword ptr [RSP + 0x2c],ECX
MOV RDI,qword ptr [RAX]
CALL 0x00159060
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x2c]
CMP EAX,ECX
JGE 0x001f4264
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x10],RAX
MOV EDI,0x140
CALL 0x001211c0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x18],RCX
MOV RDI,qword ptr [RAX]
MOV ESI,dword ptr [RSP + 0x74]
LAB_001f41b2:
CALL 0x001590a0
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001f41be
LAB_001f41be:
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x58]
MOV RDX,RAX
ADD RDX,0x30
MOV RCX,qword ptr [RAX + 0x1d0]
CALL 0x00280860
LAB_001f41e0:
JMP 0x001f41e2
LAB_001f41e2:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x68],RAX
LEA RSI,[RSP + 0x68]
CALL 0x001dee00
MOV RAX,qword ptr [RSP + 0x58]
ADD RAX,0x1a0
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x0020d990
MOV RDI,RAX
CALL 0x001eef30
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x60],RAX
LEA RSI,[RSP + 0x60]
CALL 0x0020d960
MOV EAX,dword ptr [RSP + 0x74]
ADD EAX,0x1
MOV dword ptr [RSP + 0x74],EAX
JMP 0x001f4164
LAB_001f4264:
ADD RSP,0xb8
RET
|
/* google::protobuf::compiler::cpp::MessageGenerator::AddGenerators(std::vector<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator,
std::default_delete<google::protobuf::compiler::cpp::EnumGenerator> >,
std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator,
std::default_delete<google::protobuf::compiler::cpp::EnumGenerator> > > >*,
std::vector<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator,
std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator> >,
std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator,
std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator> > > >*) */
void __thiscall
google::protobuf::compiler::cpp::MessageGenerator::AddGenerators
(MessageGenerator *this,vector *param_1,vector *param_2)
{
int iVar1;
vector *pvVar2;
int iVar3;
EnumGenerator *this_00;
EnumDescriptor *pEVar4;
unique_ptr<google::protobuf::compiler::cpp::EnumGenerator,std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>
*this_01;
ExtensionGenerator *this_02;
FieldDescriptor *pFVar5;
unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator,std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>
*this_03;
ExtensionGenerator *local_58;
ExtensionGenerator *local_50;
int local_44;
EnumGenerator *local_40 [3];
EnumGenerator *local_28;
int local_1c;
vector *local_18;
vector *local_10;
MessageGenerator *local_8;
local_1c = 0;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
while( true ) {
iVar1 = local_1c;
iVar3 = Descriptor::enum_type_count(*(Descriptor **)this);
pvVar2 = local_10;
if (iVar3 <= iVar1) break;
this_00 = (EnumGenerator *)operator_new(0x68);
/* try { // try from 001f409b to 001f40c8 has its CatchHandler @ 001f4139 */
pEVar4 = (EnumDescriptor *)Descriptor::enum_type(*(Descriptor **)this,local_1c);
EnumGenerator::EnumGenerator(this_00,pEVar4,(map *)(this + 0x1d8),(Options *)(this + 0x30));
local_28 = this_00;
std::
vector<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator,std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>,std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator,std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>>>
::emplace_back<google::protobuf::compiler::cpp::EnumGenerator*>
((vector<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator,std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>,std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator,std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>>>
*)pvVar2,&local_28);
this_01 = (unique_ptr<google::protobuf::compiler::cpp::EnumGenerator,std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>
*)std::
vector<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator,std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>,std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator,std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>>>
::back((vector<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator,std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>,std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::EnumGenerator,std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>>>
*)local_10);
local_40[0] = (EnumGenerator *)
std::
unique_ptr<google::protobuf::compiler::cpp::EnumGenerator,std::default_delete<google::protobuf::compiler::cpp::EnumGenerator>>
::get(this_01);
std::
vector<google::protobuf::compiler::cpp::EnumGenerator_const*,std::allocator<google::protobuf::compiler::cpp::EnumGenerator_const*>>
::push_back((vector<google::protobuf::compiler::cpp::EnumGenerator_const*,std::allocator<google::protobuf::compiler::cpp::EnumGenerator_const*>>
*)(this + 0x188),local_40);
local_1c = local_1c + 1;
}
local_44 = 0;
while( true ) {
iVar1 = local_44;
iVar3 = Descriptor::extension_count(*(Descriptor **)this);
pvVar2 = local_18;
if (iVar3 <= iVar1) break;
this_02 = (ExtensionGenerator *)operator_new(0x140);
/* try { // try from 001f41b2 to 001f41df has its CatchHandler @ 001f4244 */
pFVar5 = (FieldDescriptor *)Descriptor::extension(*(Descriptor **)this,local_44);
ExtensionGenerator::ExtensionGenerator
(this_02,pFVar5,(Options *)(this + 0x30),*(MessageSCCAnalyzer **)(this + 0x1d0));
local_50 = this_02;
std::
vector<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator,std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>,std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator,std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>>>
::emplace_back<google::protobuf::compiler::cpp::ExtensionGenerator*>
((vector<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator,std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>,std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator,std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>>>
*)pvVar2,&local_50);
this_03 = (unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator,std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>
*)std::
vector<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator,std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>,std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator,std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>>>
::back((vector<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator,std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>,std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator,std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>>>
*)local_18);
local_58 = (ExtensionGenerator *)
std::
unique_ptr<google::protobuf::compiler::cpp::ExtensionGenerator,std::default_delete<google::protobuf::compiler::cpp::ExtensionGenerator>>
::get(this_03);
std::
vector<google::protobuf::compiler::cpp::ExtensionGenerator_const*,std::allocator<google::protobuf::compiler::cpp::ExtensionGenerator_const*>>
::push_back((vector<google::protobuf::compiler::cpp::ExtensionGenerator_const*,std::allocator<google::protobuf::compiler::cpp::ExtensionGenerator_const*>>
*)(this + 0x1a0),&local_58);
local_44 = local_44 + 1;
}
return;
}
| |
28,057 | mi_check_index_tuple | eloqsql/storage/myisam/mi_key.c | check_result_t mi_check_index_tuple(MI_INFO *info, uint keynr, uchar *record)
{
int need_unpack= TRUE;
check_result_t res= CHECK_POS;
if (info->index_cond_func)
{
if (mi_unpack_index_tuple(info, keynr, record))
res= CHECK_ERROR;
else if ((res= info->index_cond_func(info->index_cond_func_arg)) ==
CHECK_OUT_OF_RANGE)
{
/* We got beyond the end of scanned range */
info->lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_END_OF_FILE;
}
/*
If we got an error, out-of-range condition, or ICP condition computed to
FALSE - we don't need to check the Rowid Filter.
*/
if (res != CHECK_POS)
return res;
need_unpack= FALSE;
}
/* Check the Rowid Filter, if present */
if (mi_check_rowid_filter_is_active(info))
{
/* Unpack the index tuple if we haven't done it already */
if (need_unpack && mi_unpack_index_tuple(info, keynr, record))
res= CHECK_ERROR;
else
{
if ((res= info->rowid_filter_func(info->rowid_filter_func_arg)) ==
CHECK_OUT_OF_RANGE)
{
/* We got beyond the end of scanned range */
info->lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_END_OF_FILE;
}
}
}
return res;
} | O3 | c | mi_check_index_tuple:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
movq 0x340(%rdi), %r13
testq %r13, %r13
je 0x48153
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x481d6
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x481c4
movq 0x348(%rbx), %rdi
callq *0x340(%rbx)
cmpl $0x2, %eax
je 0x48189
movl %eax, %r12d
cmpl $0x1, %eax
jne 0x481c4
movq 0x358(%rbx), %rax
movl $0x1, %r12d
testq %rax, %rax
je 0x481c4
movq 0x360(%rbx), %rdi
callq *%rax
testl %eax, %eax
je 0x481c4
testq %r13, %r13
je 0x481ac
movq 0x360(%rbx), %rdi
callq *0x350(%rbx)
cmpl $0x2, %eax
jne 0x481a7
movq $-0x1, 0x170(%rbx)
callq 0x5db4e
movl $0x89, (%rax)
movl $0x2, %r12d
jmp 0x481c4
movl %eax, %r12d
jmp 0x481c4
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x481d6
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x48177
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mi_check_index_tuple:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdx
mov r15d, esi
mov rbx, rdi
mov r13, [rdi+340h]
test r13, r13
jz short loc_48153
mov rdi, rbx
mov esi, r15d
mov rdx, r14
call mi_unpack_index_tuple
mov r12d, 0FFFFFFFFh
test eax, eax
jnz loc_481C4
mov rdi, [rbx+348h]
call qword ptr [rbx+340h]
cmp eax, 2
jz short loc_48189
mov r12d, eax
cmp eax, 1
jnz short loc_481C4
loc_48153:
mov rax, [rbx+358h]
mov r12d, 1
test rax, rax
jz short loc_481C4
mov rdi, [rbx+360h]
call rax
test eax, eax
jz short loc_481C4
test r13, r13
jz short loc_481AC
loc_48177:
mov rdi, [rbx+360h]
call qword ptr [rbx+350h]
cmp eax, 2
jnz short loc_481A7
loc_48189:
mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 89h
mov r12d, 2
jmp short loc_481C4
loc_481A7:
mov r12d, eax
jmp short loc_481C4
loc_481AC:
mov rdi, rbx
mov esi, r15d
mov rdx, r14
call mi_unpack_index_tuple
mov r12d, 0FFFFFFFFh
test eax, eax
jz short loc_48177
loc_481C4:
mov eax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_check_index_tuple(long long a1, unsigned int a2, long long a3)
{
long long v5; // r13
unsigned int v6; // r12d
long long v7; // rdi
unsigned int v8; // eax
unsigned int ( *v9)(_QWORD); // rax
unsigned int v10; // eax
v5 = *(_QWORD *)(a1 + 832);
if ( v5 )
{
v6 = -1;
if ( (unsigned int)mi_unpack_index_tuple(a1, a2, a3) )
return v6;
v7 = *(_QWORD *)(a1 + 840);
v8 = (*(long long ( **)(long long))(a1 + 832))(v7);
if ( v8 == 2 )
{
LABEL_9:
*(_QWORD *)(a1 + 368) = -1LL;
*(_DWORD *)my_thread_var(v7) = 137;
return 2;
}
v6 = v8;
if ( v8 != 1 )
return v6;
}
v9 = *(unsigned int ( **)(_QWORD))(a1 + 856);
v6 = 1;
if ( v9 )
{
if ( v9(*(_QWORD *)(a1 + 864)) )
{
if ( v5 || (v6 = -1, !(unsigned int)mi_unpack_index_tuple(a1, a2, a3)) )
{
v7 = *(_QWORD *)(a1 + 864);
v10 = (*(long long ( **)(long long))(a1 + 848))(v7);
if ( v10 != 2 )
return v10;
goto LABEL_9;
}
}
}
return v6;
}
| mi_check_index_tuple:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15D,ESI
MOV RBX,RDI
MOV R13,qword ptr [RDI + 0x340]
TEST R13,R13
JZ 0x00148153
MOV RDI,RBX
MOV ESI,R15D
MOV RDX,R14
CALL 0x001481d6
MOV R12D,0xffffffff
TEST EAX,EAX
JNZ 0x001481c4
MOV RDI,qword ptr [RBX + 0x348]
CALL qword ptr [RBX + 0x340]
CMP EAX,0x2
JZ 0x00148189
MOV R12D,EAX
CMP EAX,0x1
JNZ 0x001481c4
LAB_00148153:
MOV RAX,qword ptr [RBX + 0x358]
MOV R12D,0x1
TEST RAX,RAX
JZ 0x001481c4
MOV RDI,qword ptr [RBX + 0x360]
CALL RAX
TEST EAX,EAX
JZ 0x001481c4
TEST R13,R13
JZ 0x001481ac
LAB_00148177:
MOV RDI,qword ptr [RBX + 0x360]
CALL qword ptr [RBX + 0x350]
CMP EAX,0x2
JNZ 0x001481a7
LAB_00148189:
MOV qword ptr [RBX + 0x170],-0x1
CALL 0x0015db4e
MOV dword ptr [RAX],0x89
MOV R12D,0x2
JMP 0x001481c4
LAB_001481a7:
MOV R12D,EAX
JMP 0x001481c4
LAB_001481ac:
MOV RDI,RBX
MOV ESI,R15D
MOV RDX,R14
CALL 0x001481d6
MOV R12D,0xffffffff
TEST EAX,EAX
JZ 0x00148177
LAB_001481c4:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int mi_check_index_tuple(long param_1,int4 param_2,int8 param_3)
{
long lVar1;
int iVar2;
int4 *puVar3;
lVar1 = *(long *)(param_1 + 0x340);
if (lVar1 != 0) {
iVar2 = mi_unpack_index_tuple(param_1,param_2,param_3);
if (iVar2 != 0) {
return -1;
}
iVar2 = (**(code **)(param_1 + 0x340))(*(int8 *)(param_1 + 0x348));
if (iVar2 == 2) goto LAB_00148189;
if (iVar2 != 1) {
return iVar2;
}
}
if (*(code **)(param_1 + 0x358) == (code *)0x0) {
return 1;
}
iVar2 = (**(code **)(param_1 + 0x358))(*(int8 *)(param_1 + 0x360));
if (iVar2 == 0) {
return 1;
}
if ((lVar1 == 0) && (iVar2 = mi_unpack_index_tuple(param_1,param_2,param_3), iVar2 != 0)) {
return -1;
}
iVar2 = (**(code **)(param_1 + 0x350))(*(int8 *)(param_1 + 0x360));
if (iVar2 != 2) {
return iVar2;
}
LAB_00148189:
*(int8 *)(param_1 + 0x170) = 0xffffffffffffffff;
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x89;
return 2;
}
| |
28,058 | stbi__psd_info(stbi__context*, int*, int*, int*) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp)
{
int channelCount, dummy, depth;
if (!x) x = &dummy;
if (!y) y = &dummy;
if (!comp) comp = &dummy;
if (stbi__get32be(s) != 0x38425053) {
stbi__rewind( s );
return 0;
}
if (stbi__get16be(s) != 1) {
stbi__rewind( s );
return 0;
}
stbi__skip(s, 6);
channelCount = stbi__get16be(s);
if (channelCount < 0 || channelCount > 16) {
stbi__rewind( s );
return 0;
}
*y = stbi__get32be(s);
*x = stbi__get32be(s);
depth = stbi__get16be(s);
if (depth != 8 && depth != 16) {
stbi__rewind( s );
return 0;
}
if (stbi__get16be(s) != 3) {
stbi__rewind( s );
return 0;
}
*comp = 4;
return 1;
} | O0 | c | stbi__psd_info(stbi__context*, int*, int*, int*):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x2d0ba
leaq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x2d0cc
leaq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x2d0de
leaq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x19ea0
cmpl $0x38425053, %eax # imm = 0x38425053
je 0x2d106
movq 0x28(%rsp), %rdi
callq 0x17f10
movl $0x0, 0x34(%rsp)
jmp 0x2d1fa
movq 0x28(%rsp), %rdi
callq 0x19ee0
cmpl $0x1, %eax
je 0x2d12c
movq 0x28(%rsp), %rdi
callq 0x17f10
movl $0x0, 0x34(%rsp)
jmp 0x2d1fa
movq 0x28(%rsp), %rdi
movl $0x6, %esi
callq 0x19dd0
movq 0x28(%rsp), %rdi
callq 0x19ee0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jl 0x2d157
cmpl $0x10, 0xc(%rsp)
jle 0x2d16e
movq 0x28(%rsp), %rdi
callq 0x17f10
movl $0x0, 0x34(%rsp)
jmp 0x2d1fa
movq 0x28(%rsp), %rdi
callq 0x19ea0
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movq 0x28(%rsp), %rdi
callq 0x19ea0
movl %eax, %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
movq 0x28(%rsp), %rdi
callq 0x19ee0
movl %eax, 0x4(%rsp)
cmpl $0x8, 0x4(%rsp)
je 0x2d1c4
cmpl $0x10, 0x4(%rsp)
je 0x2d1c4
movq 0x28(%rsp), %rdi
callq 0x17f10
movl $0x0, 0x34(%rsp)
jmp 0x2d1fa
movq 0x28(%rsp), %rdi
callq 0x19ee0
cmpl $0x3, %eax
je 0x2d1e7
movq 0x28(%rsp), %rdi
callq 0x17f10
movl $0x0, 0x34(%rsp)
jmp 0x2d1fa
movq 0x10(%rsp), %rax
movl $0x4, (%rax)
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZL14stbi__psd_infoP13stbi__contextPiS1_S1_:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_20], rdx
mov [rsp+38h+var_28], rcx
cmp [rsp+38h+var_18], 0
jnz short loc_2D0BA
lea rax, [rsp+38h+var_30]
mov [rsp+38h+var_18], rax
loc_2D0BA:
cmp [rsp+38h+var_20], 0
jnz short loc_2D0CC
lea rax, [rsp+38h+var_30]
mov [rsp+38h+var_20], rax
loc_2D0CC:
cmp [rsp+38h+var_28], 0
jnz short loc_2D0DE
lea rax, [rsp+38h+var_30]
mov [rsp+38h+var_28], rax
loc_2D0DE:
mov rdi, [rsp+38h+var_10]
call _ZL13stbi__get32beP13stbi__context; stbi__get32be(stbi__context *)
cmp eax, 38425053h
jz short loc_2D106
mov rdi, [rsp+38h+var_10]
call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *)
mov [rsp+38h+var_4], 0
jmp loc_2D1FA
loc_2D106:
mov rdi, [rsp+38h+var_10]
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
cmp eax, 1
jz short loc_2D12C
mov rdi, [rsp+38h+var_10]
call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *)
mov [rsp+38h+var_4], 0
jmp loc_2D1FA
loc_2D12C:
mov rdi, [rsp+38h+var_10]
mov esi, 6
call _ZL10stbi__skipP13stbi__contexti; stbi__skip(stbi__context *,int)
mov rdi, [rsp+38h+var_10]
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
mov [rsp+38h+var_2C], eax
cmp [rsp+38h+var_2C], 0
jl short loc_2D157
cmp [rsp+38h+var_2C], 10h
jle short loc_2D16E
loc_2D157:
mov rdi, [rsp+38h+var_10]
call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *)
mov [rsp+38h+var_4], 0
jmp loc_2D1FA
loc_2D16E:
mov rdi, [rsp+38h+var_10]
call _ZL13stbi__get32beP13stbi__context; stbi__get32be(stbi__context *)
mov ecx, eax
mov rax, [rsp+38h+var_20]
mov [rax], ecx
mov rdi, [rsp+38h+var_10]
call _ZL13stbi__get32beP13stbi__context; stbi__get32be(stbi__context *)
mov ecx, eax
mov rax, [rsp+38h+var_18]
mov [rax], ecx
mov rdi, [rsp+38h+var_10]
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
mov [rsp+38h+var_34], eax
cmp [rsp+38h+var_34], 8
jz short loc_2D1C4
cmp [rsp+38h+var_34], 10h
jz short loc_2D1C4
mov rdi, [rsp+38h+var_10]
call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *)
mov [rsp+38h+var_4], 0
jmp short loc_2D1FA
loc_2D1C4:
mov rdi, [rsp+38h+var_10]
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
cmp eax, 3
jz short loc_2D1E7
mov rdi, [rsp+38h+var_10]
call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *)
mov [rsp+38h+var_4], 0
jmp short loc_2D1FA
loc_2D1E7:
mov rax, [rsp+38h+var_28]
mov dword ptr [rax], 4
mov [rsp+38h+var_4], 1
loc_2D1FA:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long stbi__psd_info(_QWORD *a1, _DWORD *a2, _DWORD *a3, _DWORD *a4)
{
int v4; // eax
int v5; // eax
int v7; // [rsp+4h] [rbp-34h]
_BYTE v8[4]; // [rsp+8h] [rbp-30h] BYREF
unsigned int v9; // [rsp+Ch] [rbp-2Ch]
_DWORD *v10; // [rsp+10h] [rbp-28h]
_DWORD *v11; // [rsp+18h] [rbp-20h]
_DWORD *v12; // [rsp+20h] [rbp-18h]
_QWORD *v13; // [rsp+28h] [rbp-10h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
if ( !a2 )
v12 = v8;
if ( !v11 )
v11 = v8;
if ( !v10 )
v10 = v8;
if ( (unsigned int)stbi__get32be((long long)v13) == 943870035
&& (unsigned int)stbi__get16be((long long)v13) == 1
&& (stbi__skip((long long)v13, 6), v9 = stbi__get16be((long long)v13), v9 <= 0x10)
&& ((v4 = stbi__get32be((long long)v13),
*v11 = v4,
v5 = stbi__get32be((long long)v13),
*v12 = v5,
v7 = stbi__get16be((long long)v13),
v7 == 8)
|| v7 == 16)
&& (unsigned int)stbi__get16be((long long)v13) == 3 )
{
*v10 = 4;
return 1;
}
else
{
stbi__rewind(v13);
return 0;
}
}
| stbi__psd_info:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x10],RCX
CMP qword ptr [RSP + 0x20],0x0
JNZ 0x0012d0ba
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSP + 0x20],RAX
LAB_0012d0ba:
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x0012d0cc
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
LAB_0012d0cc:
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x0012d0de
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
LAB_0012d0de:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00119ea0
CMP EAX,0x38425053
JZ 0x0012d106
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00117f10
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0012d1fa
LAB_0012d106:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00119ee0
CMP EAX,0x1
JZ 0x0012d12c
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00117f10
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0012d1fa
LAB_0012d12c:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,0x6
CALL 0x00119dd0
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00119ee0
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x0
JL 0x0012d157
CMP dword ptr [RSP + 0xc],0x10
JLE 0x0012d16e
LAB_0012d157:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00117f10
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0012d1fa
LAB_0012d16e:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00119ea0
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX],ECX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00119ea0
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV dword ptr [RAX],ECX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00119ee0
MOV dword ptr [RSP + 0x4],EAX
CMP dword ptr [RSP + 0x4],0x8
JZ 0x0012d1c4
CMP dword ptr [RSP + 0x4],0x10
JZ 0x0012d1c4
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00117f10
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0012d1fa
LAB_0012d1c4:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00119ee0
CMP EAX,0x3
JZ 0x0012d1e7
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00117f10
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0012d1fa
LAB_0012d1e7:
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX],0x4
MOV dword ptr [RSP + 0x34],0x1
LAB_0012d1fa:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
/* stbi__psd_info(stbi__context*, int*, int*, int*) */
int4 stbi__psd_info(stbi__context *param_1,int *param_2,int *param_3,int *param_4)
{
int iVar1;
int local_30;
int local_2c;
int *local_28;
int *local_20;
int *local_18;
stbi__context *local_10;
int4 local_4;
local_18 = param_2;
if (param_2 == (int *)0x0) {
local_18 = &local_30;
}
local_20 = param_3;
if (param_3 == (int *)0x0) {
local_20 = &local_30;
}
local_28 = param_4;
if (param_4 == (int *)0x0) {
local_28 = &local_30;
}
local_10 = param_1;
iVar1 = stbi__get32be(param_1);
if (iVar1 == 0x38425053) {
iVar1 = stbi__get16be(local_10);
if (iVar1 == 1) {
stbi__skip(local_10,6);
local_2c = stbi__get16be(local_10);
if ((local_2c < 0) || (0x10 < local_2c)) {
stbi__rewind(local_10);
local_4 = 0;
}
else {
iVar1 = stbi__get32be(local_10);
*local_20 = iVar1;
iVar1 = stbi__get32be(local_10);
*local_18 = iVar1;
iVar1 = stbi__get16be(local_10);
if ((iVar1 == 8) || (iVar1 == 0x10)) {
iVar1 = stbi__get16be(local_10);
if (iVar1 == 3) {
*local_28 = 4;
local_4 = 1;
}
else {
stbi__rewind(local_10);
local_4 = 0;
}
}
else {
stbi__rewind(local_10);
local_4 = 0;
}
}
}
else {
stbi__rewind(local_10);
local_4 = 0;
}
}
else {
stbi__rewind(local_10);
local_4 = 0;
}
return local_4;
}
| |
28,059 | stbi__psd_info(stbi__context*, int*, int*, int*) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp)
{
int channelCount, dummy, depth;
if (!x) x = &dummy;
if (!y) y = &dummy;
if (!comp) comp = &dummy;
if (stbi__get32be(s) != 0x38425053) {
stbi__rewind( s );
return 0;
}
if (stbi__get16be(s) != 1) {
stbi__rewind( s );
return 0;
}
stbi__skip(s, 6);
channelCount = stbi__get16be(s);
if (channelCount < 0 || channelCount > 16) {
stbi__rewind( s );
return 0;
}
*y = stbi__get32be(s);
*x = stbi__get32be(s);
depth = stbi__get16be(s);
if (depth != 8 && depth != 16) {
stbi__rewind( s );
return 0;
}
if (stbi__get16be(s) != 3) {
stbi__rewind( s );
return 0;
}
*comp = 4;
return 1;
} | O3 | c | stbi__psd_info(stbi__context*, int*, int*, int*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
callq 0x278d0
movl %eax, %ebp
shll $0x10, %ebp
movq %rbx, %rdi
callq 0x278d0
orl %ebp, %eax
cmpl $0x38425053, %eax # imm = 0x38425053
jne 0x2d65a
movq %rbx, %rdi
callq 0x278d0
cmpl $0x1, %eax
jne 0x2d65a
cmpq $0x0, 0x10(%rbx)
je 0x2d5ca
movq 0xc0(%rbx), %rax
movq 0xc8(%rbx), %rdx
movl %edx, %ecx
subl %eax, %ecx
cmpl $0x5, %ecx
jg 0x2d5d1
movq %rdx, 0xc0(%rbx)
movq 0x28(%rbx), %rdi
movl $0x6, %esi
subl %ecx, %esi
callq *0x18(%rbx)
jmp 0x2d5dc
movq 0xc0(%rbx), %rax
addq $0x6, %rax
movq %rax, 0xc0(%rbx)
movq %rbx, %rdi
callq 0x278d0
cmpl $0x11, %eax
jae 0x2d65a
movq %rbx, %rdi
callq 0x278d0
movl %eax, %ebp
movq %rbx, %rdi
callq 0x278d0
testq %r12, %r12
je 0x2d609
shll $0x10, %ebp
orl %eax, %ebp
movl %ebp, (%r12)
movq %rbx, %rdi
callq 0x278d0
movl %eax, %ebp
movq %rbx, %rdi
callq 0x278d0
testq %r15, %r15
je 0x2d628
shll $0x10, %ebp
orl %eax, %ebp
movl %ebp, (%r15)
movq %rbx, %rdi
callq 0x278d0
cmpl $0x8, %eax
je 0x2d63a
cmpl $0x10, %eax
jne 0x2d65a
movq %rbx, %rdi
callq 0x278d0
cmpl $0x3, %eax
jne 0x2d65a
movl $0x1, %eax
testq %r14, %r14
je 0x2d66a
movl $0x4, (%r14)
jmp 0x2d66a
movups 0xd0(%rbx), %xmm0
movups %xmm0, 0xc0(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZL14stbi__psd_infoP13stbi__contextPiS1_S1_:
push rbp
push r15
push r14
push r12
push rbx
mov r14, rcx
mov r12, rdx
mov r15, rsi
mov rbx, rdi
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
mov ebp, eax
shl ebp, 10h
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
or eax, ebp
cmp eax, 38425053h
jnz loc_2D65A
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
cmp eax, 1
jnz loc_2D65A
cmp qword ptr [rbx+10h], 0
jz short loc_2D5CA
mov rax, [rbx+0C0h]
mov rdx, [rbx+0C8h]
mov ecx, edx
sub ecx, eax
cmp ecx, 5
jg short loc_2D5D1
mov [rbx+0C0h], rdx
mov rdi, [rbx+28h]
mov esi, 6
sub esi, ecx
call qword ptr [rbx+18h]
jmp short loc_2D5DC
loc_2D5CA:
mov rax, [rbx+0C0h]
loc_2D5D1:
add rax, 6
mov [rbx+0C0h], rax
loc_2D5DC:
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
cmp eax, 11h
jnb short loc_2D65A
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
mov ebp, eax
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
test r12, r12
jz short loc_2D609
shl ebp, 10h
or ebp, eax
mov [r12], ebp
loc_2D609:
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
mov ebp, eax
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
test r15, r15
jz short loc_2D628
shl ebp, 10h
or ebp, eax
mov [r15], ebp
loc_2D628:
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
cmp eax, 8
jz short loc_2D63A
cmp eax, 10h
jnz short loc_2D65A
loc_2D63A:
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
cmp eax, 3
jnz short loc_2D65A
mov eax, 1
test r14, r14
jz short loc_2D66A
mov dword ptr [r14], 4
jmp short loc_2D66A
loc_2D65A:
movups xmm0, xmmword ptr [rbx+0D0h]
movups xmmword ptr [rbx+0C0h], xmm0
xor eax, eax
loc_2D66A:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long stbi__psd_info(long long a1, int *a2, int *a3, _DWORD *a4)
{
unsigned int v6; // ebp
long long v7; // rax
int v8; // ecx
int v9; // ebp
int v10; // eax
int v11; // ebp
int v12; // eax
int v13; // eax
long long result; // rax
v6 = (unsigned int)stbi__get16be(a1) << 16;
if ( (v6 | (unsigned int)stbi__get16be(a1)) != 0x38425053 || (unsigned int)stbi__get16be(a1) != 1 )
{
LABEL_18:
*(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208);
return 0LL;
}
if ( !*(_QWORD *)(a1 + 16) )
{
v7 = *(_QWORD *)(a1 + 192);
goto LABEL_7;
}
v7 = *(_QWORD *)(a1 + 192);
v8 = *(_QWORD *)(a1 + 200) - v7;
if ( v8 > 5 )
{
LABEL_7:
*(_QWORD *)(a1 + 192) = v7 + 6;
goto LABEL_8;
}
*(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200);
(*(void ( **)(_QWORD, _QWORD))(a1 + 24))(*(_QWORD *)(a1 + 40), (unsigned int)(6 - v8));
LABEL_8:
if ( (unsigned int)stbi__get16be(a1) >= 0x11 )
goto LABEL_18;
v9 = stbi__get16be(a1);
v10 = stbi__get16be(a1);
if ( a3 )
*a3 = v10 | (v9 << 16);
v11 = stbi__get16be(a1);
v12 = stbi__get16be(a1);
if ( a2 )
*a2 = v12 | (v11 << 16);
v13 = stbi__get16be(a1);
if ( v13 != 8 && v13 != 16 )
goto LABEL_18;
if ( (unsigned int)stbi__get16be(a1) != 3 )
goto LABEL_18;
result = 1LL;
if ( a4 )
*a4 = 4;
return result;
}
| |||
28,060 | my_hash_sort_latin1_de | eloqsql/strings/ctype-latin1.c | void my_hash_sort_latin1_de(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
const uchar *end;
register ulong m1= *nr1, m2= *nr2;
/*
Remove end space. We have to do this to be able to compare
'AE' and 'Ä' as identical
*/
end= skip_trailing_space(key, len);
for (; key < end ; key++)
{
uint X= (uint) combo1map[(uint) *key];
MY_HASH_ADD(m1, m2, X);
if ((X= combo2map[*key]))
{
MY_HASH_ADD(m1, m2, X);
}
}
*nr1= m1;
*nr2= m2;
} | O0 | c | my_hash_sort_latin1_de:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x76290
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x76271
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x1015dd(%rip), %rax # 0x1777b0
movzbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
andq $0x3f, %rax
addq -0x40(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
movq -0x38(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x101694(%rip), %rax # 0x1778b0
movzbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
je 0x7625e
jmp 0x7622a
movq -0x38(%rbp), %rax
andq $0x3f, %rax
addq -0x40(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
movq -0x38(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
jmp 0x7625e
jmp 0x76260
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x761b3
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| my_hash_sort_latin1_de:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_40], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call skip_trailing_space_0
mov [rbp+var_30], rax
loc_761B3:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_30]
jnb loc_76271
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov eax, eax
mov ecx, eax
lea rax, combo1map
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_44], eax
mov rax, [rbp+var_38]
and rax, 3Fh
add rax, [rbp+var_40]
mov ecx, [rbp+var_44]
imul rax, rcx
mov rcx, [rbp+var_38]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 3
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, combo2map
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_44], eax
cmp eax, 0
jz short loc_7625E
jmp short $+2
loc_7622A:
mov rax, [rbp+var_38]
and rax, 3Fh
add rax, [rbp+var_40]
mov ecx, [rbp+var_44]
imul rax, rcx
mov rcx, [rbp+var_38]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 3
mov [rbp+var_40], rax
jmp short $+2
loc_7625E:
jmp short $+2
loc_76260:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_761B3
loc_76271:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_40]
mov rax, [rbp+var_28]
mov [rax], rcx
add rsp, 50h
pop rbp
retn
| _QWORD * my_hash_sort_latin1_de(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5)
{
_QWORD *result; // rax
long long v6; // [rsp+10h] [rbp-40h]
long long v7; // [rsp+18h] [rbp-38h]
unsigned long long v8; // [rsp+20h] [rbp-30h]
unsigned __int8 *v11; // [rsp+40h] [rbp-10h]
v11 = a2;
v7 = *a4;
v6 = *a5;
v8 = skip_trailing_space_0(a2, a3);
while ( (unsigned long long)v11 < v8 )
{
v7 ^= (v7 << 8) + combo1map[*v11] * (v6 + (v7 & 0x3F));
v6 += 3LL;
if ( combo2map[*v11] )
{
v7 ^= (v7 << 8) + combo2map[*v11] * (v6 + (v7 & 0x3F));
v6 += 3LL;
}
++v11;
}
*a4 = v7;
result = a5;
*a5 = v6;
return result;
}
| my_hash_sort_latin1_de:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00176290
MOV qword ptr [RBP + -0x30],RAX
LAB_001761b3:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x00176271
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x2777b0]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x44]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x2778b0]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JZ 0x0017625e
JMP 0x0017622a
LAB_0017622a:
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x44]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0017625e
LAB_0017625e:
JMP 0x00176260
LAB_00176260:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001761b3
LAB_00176271:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
ADD RSP,0x50
POP RBP
RET
|
void my_hash_sort_latin1_de
(int8 param_1,byte *param_2,int8 param_3,ulong *param_4,long *param_5)
{
long lVar1;
byte *pbVar2;
long local_48;
ulong local_40;
byte *local_18;
local_40 = *param_4;
local_48 = *param_5;
pbVar2 = (byte *)skip_trailing_space(param_2,param_3);
for (local_18 = param_2; local_18 < pbVar2; local_18 = local_18 + 1) {
local_40 = ((local_40 & 0x3f) + local_48) * (ulong)(byte)combo1map[*local_18] + local_40 * 0x100
^ local_40;
lVar1 = local_48 + 3;
if ((byte)combo2map[*local_18] != 0) {
local_40 = ((local_40 & 0x3f) + local_48 + 3) * (ulong)(uint)(byte)combo2map[*local_18] +
local_40 * 0x100 ^ local_40;
lVar1 = local_48 + 6;
}
local_48 = lVar1;
}
*param_4 = local_40;
*param_5 = local_48;
return;
}
| |
28,061 | my_hash_sort_latin1_de | eloqsql/strings/ctype-latin1.c | void my_hash_sort_latin1_de(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
const uchar *end;
register ulong m1= *nr1, m2= *nr2;
/*
Remove end space. We have to do this to be able to compare
'AE' and 'Ä' as identical
*/
end= skip_trailing_space(key, len);
for (; key < end ; key++)
{
uint X= (uint) combo1map[(uint) *key];
MY_HASH_ADD(m1, m2, X);
if ((X= combo2map[*key]))
{
MY_HASH_ADD(m1, m2, X);
}
}
*nr1= m1;
*nr2= m2;
} | O3 | c | my_hash_sort_latin1_de:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
leaq (%rsi,%rdx), %r9
cmpq $0x15, %rdx
jb 0x5775b
movq %r9, %rdx
andq $-0x4, %rdx
cmpq %rsi, %rdx
jbe 0x5775b
leaq 0x3(%rsi), %rax
andq $-0x4, %rax
movq %r9, %rdi
movb -0x1(%r9), %r10b
cmpq %rdx, %r9
jbe 0x57804
leaq -0x1(%rdi), %r9
cmpb $0x20, %r10b
je 0x5773f
jmp 0x5775e
movq %r9, %rdi
movq (%rcx), %r11
movq (%r8), %rax
cmpq %rsi, %rdi
jbe 0x577f1
leaq -0x1(%rdi), %rdx
cmpb $0x20, -0x1(%rdi)
movq %rdx, %rdi
je 0x57764
incq %rdx
leaq 0x16d18c(%rip), %r9 # 0x1c4910
leaq 0x16d285(%rip), %r10 # 0x1c4a10
movq %r11, %rdi
movzbl (%rsi), %r14d
movzbl (%r14,%r9), %ebx
movl %r11d, %r15d
andl $0x3f, %r15d
addq %rax, %r15
imulq %rbx, %r15
shlq $0x8, %rdi
addq %r15, %rdi
xorq %r11, %rdi
leaq 0x3(%rax), %rbx
movzbl (%r14,%r10), %r11d
testq %r11, %r11
je 0x577e1
movl %edi, %r14d
andl $0x3f, %r14d
addq %rbx, %r14
imulq %r11, %r14
movq %rdi, %r11
shlq $0x8, %r11
addq %r14, %r11
xorq %r11, %rdi
addq $0x6, %rax
movq %rax, %rbx
jmp 0x577e4
movq %rbx, %rax
incq %rsi
movq %rdi, %r11
cmpq %rdx, %rsi
jb 0x5778e
jmp 0x577f7
movq %r11, %rdi
movq %rax, %rbx
movq %rdi, (%rcx)
movq %rbx, (%r8)
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x20, %r10b
setne %r9b
cmpq %rdx, %rax
setae %dl
orb %r9b, %dl
jne 0x5775e
movq %rdi, %rdx
movq %rdx, %rdi
cmpq %rax, %rdx
jbe 0x5775e
leaq -0x4(%rdi), %rdx
cmpl $0x20202020, -0x4(%rdi) # imm = 0x20202020
je 0x5781e
jmp 0x5775e
| my_hash_sort_latin1_de:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
lea r9, [rsi+rdx]
cmp rdx, 15h
jb short loc_5775B
mov rdx, r9
and rdx, 0FFFFFFFFFFFFFFFCh
cmp rdx, rsi
jbe short loc_5775B
lea rax, [rsi+3]
and rax, 0FFFFFFFFFFFFFFFCh
loc_5773F:
mov rdi, r9
mov r10b, [r9-1]
cmp r9, rdx
jbe loc_57804
lea r9, [rdi-1]
cmp r10b, 20h ; ' '
jz short loc_5773F
jmp short loc_5775E
loc_5775B:
mov rdi, r9
loc_5775E:
mov r11, [rcx]
mov rax, [r8]
loc_57764:
cmp rdi, rsi
jbe loc_577F1
lea rdx, [rdi-1]
cmp byte ptr [rdi-1], 20h ; ' '
mov rdi, rdx
jz short loc_57764
inc rdx
lea r9, combo1map
lea r10, combo2map
mov rdi, r11
loc_5778E:
movzx r14d, byte ptr [rsi]
movzx ebx, byte ptr [r14+r9]
mov r15d, r11d
and r15d, 3Fh
add r15, rax
imul r15, rbx
shl rdi, 8
add rdi, r15
xor rdi, r11
lea rbx, [rax+3]
movzx r11d, byte ptr [r14+r10]
test r11, r11
jz short loc_577E1
mov r14d, edi
and r14d, 3Fh
add r14, rbx
imul r14, r11
mov r11, rdi
shl r11, 8
add r11, r14
xor rdi, r11
add rax, 6
mov rbx, rax
jmp short loc_577E4
loc_577E1:
mov rax, rbx
loc_577E4:
inc rsi
mov r11, rdi
cmp rsi, rdx
jb short loc_5778E
jmp short loc_577F7
loc_577F1:
mov rdi, r11
mov rbx, rax
loc_577F7:
mov [rcx], rdi
mov [r8], rbx
pop rbx
pop r14
pop r15
pop rbp
retn
loc_57804:
cmp r10b, 20h ; ' '
setnz r9b
cmp rax, rdx
setnb dl
or dl, r9b
jnz loc_5775E
mov rdx, rdi
loc_5781E:
mov rdi, rdx
cmp rdx, rax
jbe loc_5775E
lea rdx, [rdi-4]
cmp dword ptr [rdi-4], 20202020h
jz short loc_5781E
jmp loc_5775E
| long long my_hash_sort_latin1_de(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
long long *a4,
long long *a5)
{
unsigned long long v5; // r9
unsigned long long v6; // rdx
unsigned long long v7; // rax
unsigned long long v8; // rdi
char v9; // r10
long long v10; // r11
long long result; // rax
unsigned long long v12; // rdx
unsigned long long v14; // rdx
long long v15; // rdi
long long v16; // r14
long long v17; // rbx
unsigned long long v18; // rdx
v5 = (unsigned long long)&a2[a3];
if ( a3 < 0x15 || (v6 = v5 & 0xFFFFFFFFFFFFFFFCLL, (v5 & 0xFFFFFFFFFFFFFFFCLL) <= (unsigned long long)a2) )
{
v8 = v5;
}
else
{
v7 = (unsigned long long)(a2 + 3) & 0xFFFFFFFFFFFFFFFCLL;
while ( 1 )
{
v8 = v5;
v9 = *(_BYTE *)(v5 - 1);
if ( v5 <= v6 )
break;
--v5;
if ( v9 != 32 )
goto LABEL_8;
}
if ( v9 == 32 && v7 < v6 )
{
v18 = v5;
do
{
v8 = v18;
if ( v18 <= v7 )
break;
v18 -= 4LL;
}
while ( *(_DWORD *)(v8 - 4) == 538976288 );
}
}
LABEL_8:
v10 = *a4;
result = *a5;
do
{
if ( v8 <= (unsigned long long)a2 )
{
v15 = *a4;
v17 = *a5;
goto LABEL_18;
}
v12 = v8 - 1;
}
while ( *(_BYTE *)--v8 == 32 );
v14 = v12 + 1;
v15 = *a4;
do
{
v16 = *a2;
v15 = v10 ^ (combo1map[v16] * (result + (v10 & 0x3F)) + (v15 << 8));
v17 = result + 3;
if ( combo2map[v16] )
{
v15 ^= combo2map[v16] * (v17 + (v15 & 0x3F)) + (v15 << 8);
result += 6LL;
v17 = result;
}
else
{
result += 3LL;
}
++a2;
v10 = v15;
}
while ( (unsigned long long)a2 < v14 );
LABEL_18:
*a4 = v15;
*a5 = v17;
return result;
}
| my_hash_sort_latin1_de:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
LEA R9,[RSI + RDX*0x1]
CMP RDX,0x15
JC 0x0015775b
MOV RDX,R9
AND RDX,-0x4
CMP RDX,RSI
JBE 0x0015775b
LEA RAX,[RSI + 0x3]
AND RAX,-0x4
LAB_0015773f:
MOV RDI,R9
MOV R10B,byte ptr [R9 + -0x1]
CMP R9,RDX
JBE 0x00157804
LEA R9,[RDI + -0x1]
CMP R10B,0x20
JZ 0x0015773f
JMP 0x0015775e
LAB_0015775b:
MOV RDI,R9
LAB_0015775e:
MOV R11,qword ptr [RCX]
MOV RAX,qword ptr [R8]
LAB_00157764:
CMP RDI,RSI
JBE 0x001577f1
LEA RDX,[RDI + -0x1]
CMP byte ptr [RDI + -0x1],0x20
MOV RDI,RDX
JZ 0x00157764
INC RDX
LEA R9,[0x2c4910]
LEA R10,[0x2c4a10]
MOV RDI,R11
LAB_0015778e:
MOVZX R14D,byte ptr [RSI]
MOVZX EBX,byte ptr [R14 + R9*0x1]
MOV R15D,R11D
AND R15D,0x3f
ADD R15,RAX
IMUL R15,RBX
SHL RDI,0x8
ADD RDI,R15
XOR RDI,R11
LEA RBX,[RAX + 0x3]
MOVZX R11D,byte ptr [R14 + R10*0x1]
TEST R11,R11
JZ 0x001577e1
MOV R14D,EDI
AND R14D,0x3f
ADD R14,RBX
IMUL R14,R11
MOV R11,RDI
SHL R11,0x8
ADD R11,R14
XOR RDI,R11
ADD RAX,0x6
MOV RBX,RAX
JMP 0x001577e4
LAB_001577e1:
MOV RAX,RBX
LAB_001577e4:
INC RSI
MOV R11,RDI
CMP RSI,RDX
JC 0x0015778e
JMP 0x001577f7
LAB_001577f1:
MOV RDI,R11
MOV RBX,RAX
LAB_001577f7:
MOV qword ptr [RCX],RDI
MOV qword ptr [R8],RBX
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00157804:
CMP R10B,0x20
SETNZ R9B
CMP RAX,RDX
SETNC DL
OR DL,R9B
JNZ 0x0015775e
MOV RDX,RDI
LAB_0015781e:
MOV RDI,RDX
CMP RDX,RAX
JBE 0x0015775e
LEA RDX,[RDI + -0x4]
CMP dword ptr [RDI + -0x4],0x20202020
JZ 0x0015781e
JMP 0x0015775e
|
void my_hash_sort_latin1_de
(int8 param_1,byte *param_2,ulong param_3,ulong *param_4,long *param_5)
{
byte *pbVar1;
long lVar2;
long lVar3;
byte *pbVar4;
byte *pbVar5;
ulong uVar6;
pbVar5 = param_2 + param_3;
if ((0x14 < param_3) && (pbVar4 = (byte *)((ulong)pbVar5 & 0xfffffffffffffffc), param_2 < pbVar4))
{
pbVar1 = pbVar5;
do {
pbVar5 = pbVar1;
if (pbVar5 <= pbVar4) {
pbVar1 = pbVar5;
if ((byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc) < pbVar4 && pbVar5[-1] == 0x20)
goto LAB_0015781e;
break;
}
pbVar1 = pbVar5 + -1;
} while (pbVar5[-1] == 0x20);
}
goto LAB_0015775e;
while (pbVar1 = pbVar5 + -4, *(int *)(pbVar5 + -4) == 0x20202020) {
LAB_0015781e:
pbVar5 = pbVar1;
if (pbVar5 <= (byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc)) break;
}
LAB_0015775e:
uVar6 = *param_4;
lVar2 = *param_5;
do {
pbVar4 = pbVar5;
lVar3 = lVar2;
if (pbVar4 <= param_2) goto LAB_001577f7;
pbVar5 = pbVar4 + -1;
} while (pbVar4[-1] == 0x20);
do {
uVar6 = uVar6 * 0x100 + ((ulong)((uint)uVar6 & 0x3f) + lVar2) * (ulong)(byte)combo1map[*param_2]
^ uVar6;
lVar3 = lVar2 + 3;
if ((ulong)(byte)combo2map[*param_2] != 0) {
uVar6 = uVar6 ^ uVar6 * 0x100 +
((ulong)((uint)uVar6 & 0x3f) + lVar3) * (ulong)(byte)combo2map[*param_2];
lVar3 = lVar2 + 6;
}
param_2 = param_2 + 1;
lVar2 = lVar3;
} while (param_2 < pbVar4);
LAB_001577f7:
*param_4 = uVar6;
*param_5 = lVar3;
return;
}
| |
28,062 | my_caseup_utf32 | eloqsql/strings/ctype-ucs2.c | static size_t
my_caseup_utf32(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= my_utf32_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0)
{
my_toupper_utf32(uni_plane, &wc);
if (res != my_uni_utf32(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O3 | c | my_caseup_utf32:
movq %rdx, %rax
cmpq $0x4, %rdx
jl 0x6778d
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq (%rsi,%rax), %rdx
addq %rcx, %r8
movq 0x78(%rdi), %rdi
addq $0x4, %rcx
movzbl (%rsi), %r9d
shll $0x18, %r9d
movzbl 0x1(%rsi), %r10d
shll $0x10, %r10d
orl %r9d, %r10d
cmpl $0x10ffff, %r10d # imm = 0x10FFFF
ja 0x6778b
movzbl 0x2(%rsi), %ebx
shll $0x8, %ebx
movzbl 0x3(%rsi), %r9d
orq %r9, %rbx
orq %r10, %rbx
cmpq (%rdi), %rbx
ja 0x6774c
movq 0x8(%rdi), %r10
movl %ebx, %r11d
shrl $0x8, %r11d
movq (%r10,%r11,8), %r10
testq %r10, %r10
je 0x6774c
leaq (%r9,%r9,2), %r9
movl (%r10,%r9,4), %ebx
cmpq %r8, %rcx
ja 0x6778b
cmpl $0x10ffff, %ebx # imm = 0x10FFFF
ja 0x6778b
movb $0x0, -0x4(%rcx)
movl %ebx, %r9d
shrl $0x10, %r9d
movb %r9b, -0x3(%rcx)
movb %bh, -0x2(%rcx)
movb %bl, -0x1(%rcx)
leaq 0x4(%rsi), %r9
cmpq %rdx, %r9
jae 0x6778b
addq $0x8, %rsi
addq $0x4, %rcx
cmpq %rdx, %rsi
movq %r9, %rsi
jbe 0x676fc
popq %rbx
popq %rbp
retq
| my_caseup_utf32:
mov rax, rdx
cmp rdx, 4
jl locret_6778D
push rbp
mov rbp, rsp
push rbx
lea rdx, [rsi+rax]
add r8, rcx
mov rdi, [rdi+78h]
add rcx, 4
loc_676FC:
movzx r9d, byte ptr [rsi]
shl r9d, 18h
movzx r10d, byte ptr [rsi+1]
shl r10d, 10h
or r10d, r9d
cmp r10d, offset unk_10FFFF
ja short loc_6778B
movzx ebx, byte ptr [rsi+2]
shl ebx, 8
movzx r9d, byte ptr [rsi+3]
or rbx, r9
or rbx, r10
cmp rbx, [rdi]
ja short loc_6774C
mov r10, [rdi+8]
mov r11d, ebx
shr r11d, 8
mov r10, [r10+r11*8]
test r10, r10
jz short loc_6774C
lea r9, [r9+r9*2]
mov ebx, [r10+r9*4]
loc_6774C:
cmp rcx, r8
ja short loc_6778B
cmp ebx, offset unk_10FFFF
ja short loc_6778B
mov byte ptr [rcx-4], 0
mov r9d, ebx
shr r9d, 10h
mov [rcx-3], r9b
mov [rcx-2], bh
mov [rcx-1], bl
lea r9, [rsi+4]
cmp r9, rdx
jnb short loc_6778B
add rsi, 8
add rcx, 4
cmp rsi, rdx
mov rsi, r9
jbe loc_676FC
loc_6778B:
pop rbx
pop rbp
locret_6778D:
retn
| long long my_caseup_utf32(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5)
{
long long result; // rax
unsigned long long v6; // rdx
unsigned long long v7; // r8
unsigned long long *v8; // rdi
unsigned long long v9; // rcx
long long v10; // r10
long long v11; // r9
unsigned long long v12; // rbx
long long v13; // r10
bool v14; // cc
result = a3;
if ( a3 >= 4 )
{
v6 = (unsigned long long)&a2[a3];
v7 = a4 + a5;
v8 = *(unsigned long long **)(a1 + 120);
v9 = a4 + 4;
do
{
v10 = (*a2 << 24) | (a2[1] << 16);
if ( (unsigned int)v10 > (unsigned int)&unk_10FFFF )
break;
v11 = a2[3];
v12 = v10 | v11 | (a2[2] << 8);
if ( v12 <= *v8 )
{
v13 = *(_QWORD *)(v8[1] + 8LL * ((unsigned int)v12 >> 8));
if ( v13 )
LODWORD(v12) = *(_DWORD *)(v13 + 12 * v11);
}
if ( v9 > v7 )
break;
if ( (unsigned int)v12 > (unsigned int)&unk_10FFFF )
break;
*(_BYTE *)(v9 - 4) = 0;
*(_BYTE *)(v9 - 3) = BYTE2(v12);
*(_BYTE *)(v9 - 2) = BYTE1(v12);
*(_BYTE *)(v9 - 1) = v12;
if ( (unsigned long long)(a2 + 4) >= v6 )
break;
v9 += 4LL;
v14 = (unsigned long long)(a2 + 8) <= v6;
a2 += 4;
}
while ( v14 );
}
return result;
}
| my_caseup_utf32:
MOV RAX,RDX
CMP RDX,0x4
JL 0x0016778d
PUSH RBP
MOV RBP,RSP
PUSH RBX
LEA RDX,[RSI + RAX*0x1]
ADD R8,RCX
MOV RDI,qword ptr [RDI + 0x78]
ADD RCX,0x4
LAB_001676fc:
MOVZX R9D,byte ptr [RSI]
SHL R9D,0x18
MOVZX R10D,byte ptr [RSI + 0x1]
SHL R10D,0x10
OR R10D,R9D
CMP R10D,0x10ffff
JA 0x0016778b
MOVZX EBX,byte ptr [RSI + 0x2]
SHL EBX,0x8
MOVZX R9D,byte ptr [RSI + 0x3]
OR RBX,R9
OR RBX,R10
CMP RBX,qword ptr [RDI]
JA 0x0016774c
MOV R10,qword ptr [RDI + 0x8]
MOV R11D,EBX
SHR R11D,0x8
MOV R10,qword ptr [R10 + R11*0x8]
TEST R10,R10
JZ 0x0016774c
LEA R9,[R9 + R9*0x2]
MOV EBX,dword ptr [R10 + R9*0x4]
LAB_0016774c:
CMP RCX,R8
JA 0x0016778b
CMP EBX,0x10ffff
JA 0x0016778b
MOV byte ptr [RCX + -0x4],0x0
MOV R9D,EBX
SHR R9D,0x10
MOV byte ptr [RCX + -0x3],R9B
MOV byte ptr [RCX + -0x2],BH
MOV byte ptr [RCX + -0x1],BL
LEA R9,[RSI + 0x4]
CMP R9,RDX
JNC 0x0016778b
ADD RSI,0x8
ADD RCX,0x4
CMP RSI,RDX
MOV RSI,R9
JBE 0x001676fc
LAB_0016778b:
POP RBX
POP RBP
LAB_0016778d:
RET
|
void my_caseup_utf32(long param_1,byte *param_2,long param_3,long param_4,long param_5)
{
ulong *puVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
byte *pbVar5;
byte *pbVar6;
uint uVar7;
if (3 < param_3) {
puVar1 = *(ulong **)(param_1 + 0x78);
uVar3 = param_4 + 4;
pbVar5 = param_2;
while (uVar7 = (uint)pbVar5[1] << 0x10 | (uint)*pbVar5 << 0x18, uVar7 < 0x110000) {
uVar4 = (ulong)CONCAT11(pbVar5[2],pbVar5[3]) | (ulong)uVar7;
if ((uVar4 <= *puVar1) && (lVar2 = *(long *)(puVar1[1] + (uVar4 >> 8) * 8), lVar2 != 0)) {
uVar4 = (ulong)*(uint *)(lVar2 + (ulong)pbVar5[3] * 0xc);
}
if ((ulong)(param_5 + param_4) < uVar3) {
return;
}
if (0x10ffff < (uint)uVar4) {
return;
}
*(int1 *)(uVar3 - 4) = 0;
*(char *)(uVar3 - 3) = (char)(uVar4 >> 0x10);
*(char *)(uVar3 - 2) = (char)(uVar4 >> 8);
*(char *)(uVar3 - 1) = (char)uVar4;
if (param_2 + param_3 <= pbVar5 + 4) {
return;
}
pbVar6 = pbVar5 + 8;
uVar3 = uVar3 + 4;
pbVar5 = pbVar5 + 4;
if (param_2 + param_3 < pbVar6) {
return;
}
}
}
return;
}
| |
28,063 | pfs_end_table_lock_wait_v1 | eloqsql/storage/perfschema/pfs.cc | void pfs_end_table_lock_wait_v1(PSI_table_locker* locker)
{
PSI_table_locker_state *state= reinterpret_cast<PSI_table_locker_state*> (locker);
assert(state != NULL);
ulonglong timer_end= 0;
ulonglong wait_time= 0;
PFS_table *table= reinterpret_cast<PFS_table *> (state->m_table);
assert(table != NULL);
PFS_single_stat *stat= & table->m_table_stat.m_lock_stat.m_stat[state->m_index];
uint flags= state->m_flags;
if (flags & STATE_FLAG_TIMED)
{
timer_end= state->m_timer();
wait_time= timer_end - state->m_timer_start;
stat->aggregate_value(wait_time);
}
else
{
stat->aggregate_counted();
}
if (flags & STATE_FLAG_THREAD)
{
PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread);
assert(thread != NULL);
PFS_single_stat *event_name_array;
event_name_array= thread->write_instr_class_waits_stats();
/*
Aggregate to EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
(for wait/lock/table/sql/handler)
*/
if (flags & STATE_FLAG_TIMED)
{
event_name_array[GLOBAL_TABLE_LOCK_EVENT_INDEX].aggregate_value(wait_time);
}
else
{
event_name_array[GLOBAL_TABLE_LOCK_EVENT_INDEX].aggregate_counted();
}
if (flags & STATE_FLAG_EVENT)
{
PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait);
assert(wait != NULL);
wait->m_timer_end= timer_end;
wait->m_end_event_id= thread->m_event_id;
if (thread->m_flag_events_waits_history)
insert_events_waits_history(thread, wait);
if (thread->m_flag_events_waits_history_long)
insert_events_waits_history_long(wait);
thread->m_events_waits_current--;
assert(wait == thread->m_events_waits_current);
}
}
table->m_has_lock_stats= true;
} | O0 | cpp | pfs_end_table_lock_wait_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x30, %rax
addq $0x2288, %rax # imm = 0x2288
movq -0x10(%rbp), %rcx
movl 0x38(%rcx), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4942e
movq -0x10(%rbp), %rax
callq *0x28(%rax)
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq 0x20(%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4e480
jmp 0x49437
movq -0x30(%rbp), %rdi
callq 0x4e3c0
movl -0x34(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4950b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x359b0
movq %rax, -0x48(%rbp)
movl -0x34(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4947d
movq -0x48(%rbp), %rdi
addq $0x20, %rdi
movq -0x20(%rbp), %rsi
callq 0x4e480
jmp 0x4948a
movq -0x48(%rbp), %rdi
addq $0x20, %rdi
callq 0x4e3c0
movl -0x34(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x49509
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x40(%rbp), %rax
movq 0x7f8(%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rax
testb $0x1, 0x7e2(%rax)
je 0x494da
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x55dd0
movq -0x40(%rbp), %rax
testb $0x1, 0x7e3(%rax)
je 0x494f0
movq -0x50(%rbp), %rdi
callq 0x55ea0
movq -0x40(%rbp), %rax
movq 0x7f0(%rax), %rcx
addq $-0xb0, %rcx
movq %rcx, 0x7f0(%rax)
jmp 0x4950b
movq -0x28(%rbp), %rax
movb $0x1, 0x5(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| pfs_end_table_lock_wait_v1:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov [rbp+var_18], 0
mov [rbp+var_20], 0
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rax, 30h ; '0'
add rax, 2288h
mov rcx, [rbp+var_10]
mov ecx, [rcx+38h]
shl rcx, 5
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov eax, [rax]
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
and eax, 1
cmp eax, 0
jz short loc_4942E
mov rax, [rbp+var_10]
call qword ptr [rax+28h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, [rcx+20h]
mov [rbp+var_20], rax
mov rdi, [rbp+var_30]; this
mov rsi, [rbp+var_20]; unsigned __int64
call _ZN15PFS_single_stat15aggregate_valueEy; PFS_single_stat::aggregate_value(ulong long)
jmp short loc_49437
loc_4942E:
mov rdi, [rbp+var_30]; this
call _ZN15PFS_single_stat17aggregate_countedEv; PFS_single_stat::aggregate_counted(void)
loc_49437:
mov eax, [rbp+var_34]
and eax, 2
cmp eax, 0
jz loc_4950B
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]; this
call _ZN20PFS_connection_slice29write_instr_class_waits_statsEv; PFS_connection_slice::write_instr_class_waits_stats(void)
mov [rbp+var_48], rax
mov eax, [rbp+var_34]
and eax, 1
cmp eax, 0
jz short loc_4947D
mov rdi, [rbp+var_48]
add rdi, 20h ; ' '; this
mov rsi, [rbp+var_20]; unsigned __int64
call _ZN15PFS_single_stat15aggregate_valueEy; PFS_single_stat::aggregate_value(ulong long)
jmp short loc_4948A
loc_4947D:
mov rdi, [rbp+var_48]
add rdi, 20h ; ' '; this
call _ZN15PFS_single_stat17aggregate_countedEv; PFS_single_stat::aggregate_counted(void)
loc_4948A:
mov eax, [rbp+var_34]
and eax, 4
cmp eax, 0
jz short loc_49509
mov rax, [rbp+var_10]
mov rax, [rax+30h]
mov [rbp+var_50], rax
mov rcx, [rbp+var_18]
mov rax, [rbp+var_50]
mov [rax+40h], rcx
mov rax, [rbp+var_40]
mov rcx, [rax+7F8h]
mov rax, [rbp+var_50]
mov [rax+10h], rcx
mov rax, [rbp+var_40]
test byte ptr [rax+7E2h], 1
jz short loc_494DA
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_50]
call _Z27insert_events_waits_historyP10PFS_threadP16PFS_events_waits; insert_events_waits_history(PFS_thread *,PFS_events_waits *)
loc_494DA:
mov rax, [rbp+var_40]
test byte ptr [rax+7E3h], 1
jz short loc_494F0
mov rdi, [rbp+var_50]
call _Z32insert_events_waits_history_longP16PFS_events_waits; insert_events_waits_history_long(PFS_events_waits *)
loc_494F0:
mov rax, [rbp+var_40]
mov rcx, [rax+7F0h]
add rcx, 0FFFFFFFFFFFFFF50h
mov [rax+7F0h], rcx
loc_49509:
jmp short $+2
loc_4950B:
mov rax, [rbp+var_28]
mov byte ptr [rax+5], 1
add rsp, 50h
pop rbp
retn
| long long pfs_end_table_lock_wait_v1(int *a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-50h]
long long v3; // [rsp+8h] [rbp-48h]
PFS_connection_slice *v4; // [rsp+10h] [rbp-40h]
int v5; // [rsp+1Ch] [rbp-34h]
PFS_single_stat *v6; // [rsp+20h] [rbp-30h]
long long v7; // [rsp+28h] [rbp-28h]
unsigned long long v8; // [rsp+30h] [rbp-20h]
long long v9; // [rsp+38h] [rbp-18h]
v9 = 0LL;
v8 = 0LL;
v7 = *((_QWORD *)a1 + 1);
v6 = (PFS_single_stat *)(32LL * (unsigned int)a1[14] + v7 + 8888);
v5 = *a1;
if ( (*a1 & 1) != 0 )
{
v9 = (*((long long (**)(void))a1 + 5))();
v8 = v9 - *((_QWORD *)a1 + 4);
PFS_single_stat::aggregate_value(v6, v8);
}
else
{
PFS_single_stat::aggregate_counted(v6);
}
if ( (v5 & 2) != 0 )
{
v4 = (PFS_connection_slice *)*((_QWORD *)a1 + 3);
v3 = PFS_connection_slice::write_instr_class_waits_stats(v4);
if ( (v5 & 1) != 0 )
PFS_single_stat::aggregate_value((PFS_single_stat *)(v3 + 32), v8);
else
PFS_single_stat::aggregate_counted((PFS_single_stat *)(v3 + 32));
if ( (v5 & 4) != 0 )
{
v2 = *((_QWORD *)a1 + 6);
*(_QWORD *)(v2 + 64) = v9;
*(_QWORD *)(v2 + 16) = *((_QWORD *)v4 + 255);
if ( (*((_BYTE *)v4 + 2018) & 1) != 0 )
insert_events_waits_history(v4, v2);
if ( (*((_BYTE *)v4 + 2019) & 1) != 0 )
insert_events_waits_history_long(v2);
*((_QWORD *)v4 + 254) -= 176LL;
}
}
result = v7;
*(_BYTE *)(v7 + 5) = 1;
return result;
}
| pfs_end_table_lock_wait_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV qword ptr [RBP + -0x18],0x0
MOV qword ptr [RBP + -0x20],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x30
ADD RAX,0x2288
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x38]
SHL RCX,0x5
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0014942e
MOV RAX,qword ptr [RBP + -0x10]
CALL qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,qword ptr [RCX + 0x20]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0014e480
JMP 0x00149437
LAB_0014942e:
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0014e3c0
LAB_00149437:
MOV EAX,dword ptr [RBP + -0x34]
AND EAX,0x2
CMP EAX,0x0
JZ 0x0014950b
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001359b0
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,dword ptr [RBP + -0x34]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0014947d
MOV RDI,qword ptr [RBP + -0x48]
ADD RDI,0x20
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0014e480
JMP 0x0014948a
LAB_0014947d:
MOV RDI,qword ptr [RBP + -0x48]
ADD RDI,0x20
CALL 0x0014e3c0
LAB_0014948a:
MOV EAX,dword ptr [RBP + -0x34]
AND EAX,0x4
CMP EAX,0x0
JZ 0x00149509
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x50],RAX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x7f8]
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x40]
TEST byte ptr [RAX + 0x7e2],0x1
JZ 0x001494da
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x50]
CALL 0x00155dd0
LAB_001494da:
MOV RAX,qword ptr [RBP + -0x40]
TEST byte ptr [RAX + 0x7e3],0x1
JZ 0x001494f0
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x00155ea0
LAB_001494f0:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x7f0]
ADD RCX,-0xb0
MOV qword ptr [RAX + 0x7f0],RCX
LAB_00149509:
JMP 0x0014950b
LAB_0014950b:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x5],0x1
ADD RSP,0x50
POP RBP
RET
|
void pfs_end_table_lock_wait_v1(uint *param_1)
{
uint uVar1;
long lVar2;
PFS_connection_slice *this;
PFS_events_waits *pPVar3;
PFS_single_stat *this_00;
long lVar4;
ulonglong local_28;
long local_20;
local_20 = 0;
local_28 = 0;
lVar2 = *(long *)(param_1 + 2);
this_00 = (PFS_single_stat *)(lVar2 + 0x22b8 + (ulong)param_1[0xe] * 0x20);
uVar1 = *param_1;
if ((uVar1 & 1) == 0) {
PFS_single_stat::aggregate_counted(this_00);
}
else {
local_20 = (**(code **)(param_1 + 10))();
local_28 = local_20 - *(long *)(param_1 + 8);
PFS_single_stat::aggregate_value(this_00,local_28);
}
if ((uVar1 & 2) != 0) {
this = *(PFS_connection_slice **)(param_1 + 6);
lVar4 = PFS_connection_slice::write_instr_class_waits_stats(this);
if ((uVar1 & 1) == 0) {
PFS_single_stat::aggregate_counted((PFS_single_stat *)(lVar4 + 0x20));
}
else {
PFS_single_stat::aggregate_value((PFS_single_stat *)(lVar4 + 0x20),local_28);
}
if ((uVar1 & 4) != 0) {
pPVar3 = *(PFS_events_waits **)(param_1 + 0xc);
*(long *)(pPVar3 + 0x40) = local_20;
*(int8 *)(pPVar3 + 0x10) = *(int8 *)(this + 0x7f8);
if (((byte)this[0x7e2] & 1) != 0) {
insert_events_waits_history((PFS_thread *)this,pPVar3);
}
if (((byte)this[0x7e3] & 1) != 0) {
insert_events_waits_history_long(pPVar3);
}
*(long *)(this + 0x7f0) = *(long *)(this + 0x7f0) + -0xb0;
}
}
*(int1 *)(lVar2 + 5) = 1;
return;
}
| |
28,064 | inline_mysql_file_stat | eloqsql/include/mysql/psi/mysql_file.h | static inline MY_STAT *
inline_mysql_file_stat(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *path, MY_STAT *stat_area, myf flags)
{
MY_STAT *result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_STAT, path, &locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
result= my_stat(path, stat_area, flags);
PSI_FILE_CALL(end_file_open_wait)(locker, result);
return result;
}
#endif
result= my_stat(path, stat_area, flags);
return result;
} | O0 | c | inline_mysql_file_stat:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
leaq 0x22d1a8(%rip), %rax # 0x289300
movq (%rax), %rax
movq 0x148(%rax), %rax
movl -0xc(%rbp), %esi
movq -0x28(%rbp), %rcx
leaq -0x90(%rbp), %rdi
movl $0xb, %edx
leaq -0x48(%rbp), %r8
callq *%rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5c1f7
leaq 0x22d15a(%rip), %rax # 0x289300
movq (%rax), %rax
movq 0x1f0(%rax), %rax
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq *%rax
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0xbe180
movq %rax, -0x40(%rbp)
leaq 0x22d127(%rip), %rax # 0x289300
movq (%rax), %rax
movq 0x1f8(%rax), %rax
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq *%rax
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5c214
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0xbe180
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_file_stat:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+148h]
mov esi, [rbp+var_C]
mov rcx, [rbp+var_28]
lea rdi, [rbp+var_90]
mov edx, 0Bh
lea r8, [rbp+var_48]
call rax
mov [rbp+var_48], rax
cmp [rbp+var_48], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_5C1F7
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1F0h]
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
call rax
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_38]
call my_stat
mov [rbp+var_40], rax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1F8h]
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_40]
call rax
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
jmp short loc_5C214
loc_5C1F7:
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_38]
call my_stat
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_5C214:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
| long long inline_mysql_file_stat(
unsigned int a1,
long long a2,
unsigned int a3,
long long a4,
long long a5,
long long a6)
{
_BYTE v7[72]; // [rsp+0h] [rbp-90h] BYREF
long long v8; // [rsp+48h] [rbp-48h] BYREF
long long v9; // [rsp+50h] [rbp-40h]
long long v10; // [rsp+58h] [rbp-38h]
long long v11; // [rsp+60h] [rbp-30h]
long long v12; // [rsp+68h] [rbp-28h]
unsigned int v13; // [rsp+74h] [rbp-1Ch]
long long v14; // [rsp+78h] [rbp-18h]
unsigned int v15; // [rsp+84h] [rbp-Ch]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = a6;
v8 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v7, a1, 11LL, a4, &v8);
if ( !v8 )
return my_stat(v12, v11, v10);
((void ( *)(long long, long long, _QWORD))PSI_server[62])(v8, v14, v13);
v9 = my_stat(v12, v11, v10);
((void ( *)(long long, long long))PSI_server[63])(v8, v9);
return v9;
}
| inline_mysql_file_stat:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
LEA RAX,[0x389300]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV ESI,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x90]
MOV EDX,0xb
LEA R8,[RBP + -0x48]
CALL RAX
MOV qword ptr [RBP + -0x48],RAX
CMP qword ptr [RBP + -0x48],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0015c1f7
LEA RAX,[0x389300]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1f0]
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
CALL RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x001be180
MOV qword ptr [RBP + -0x40],RAX
LEA RAX,[0x389300]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1f8]
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x40]
CALL RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0015c214
LAB_0015c1f7:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x001be180
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_0015c214:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
int8
inline_mysql_file_stat
(int4 param_1,int8 param_2,int4 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
int1 local_98 [72];
long local_50;
int8 local_48;
int8 local_40;
int8 local_38;
int8 local_30;
int4 local_24;
int8 local_20;
int4 local_14;
int8 local_10;
local_40 = param_6;
local_38 = param_5;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_14 = param_1;
local_50 = (**(code **)(PSI_server + 0x148))(local_98,param_1,0xb,param_4,&local_50);
if (local_50 == 0) {
local_10 = my_stat(local_30,local_38,local_40);
}
else {
(**(code **)(PSI_server + 0x1f0))(local_50,local_20,local_24);
local_48 = my_stat(local_30,local_38,local_40);
(**(code **)(PSI_server + 0x1f8))(local_50,local_48);
local_10 = local_48;
}
return local_10;
}
| |
28,065 | OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, int, long const*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp | void
SurfaceFactory::assignLinearSurface(SurfaceType * surfacePtr,
Index faceIndex, FVarID const * fvarPtrOrVtx) const {
SurfaceType & surface = *surfacePtr;
// Initialize instance members from the associated irregular patch:
int faceSize = getFaceSize(faceIndex);
surface.setParam(Parameterization(_subdivScheme, faceSize));
surface.setRegular(faceSize == _regFaceSize);
surface.setLinear(true);
surface.setRegPatchMask(0);
if (_regFaceSize == 4) {
surface.setRegPatchType(Far::PatchDescriptor::QUADS);
} else {
surface.setRegPatchType(Far::PatchDescriptor::TRIANGLES);
}
//
// Finally, gather patch control points from the appropriate indices:
//
Index * surfaceCVs = surface.resizeCVs(faceSize);
int count = 0;
if (fvarPtrOrVtx == 0) {
count = getFaceVertexIndices(faceIndex, surfaceCVs);
} else {
count = getFaceFVarValueIndices(faceIndex, *fvarPtrOrVtx, surfaceCVs);
}
// If subclass fails to get indices, Surface will remain invalid
if (count < faceSize) return;
surface.setValid(true);
#ifdef _BFR_DEBUG_TOP_TYPE_STATS
__numLinearPatches ++;
#endif
} | O0 | cpp | OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, int, long const*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %esi
movq (%rdi), %rax
callq *0x18(%rax)
movl %eax, %ecx
movq -0x48(%rbp), %rax
movl %ecx, -0x2c(%rbp)
movq -0x28(%rbp), %rcx
movq %rcx, -0x50(%rbp)
movl 0x8(%rax), %esi
movl -0x2c(%rbp), %edx
leaq -0x30(%rbp), %rdi
callq 0xcffe0
movq -0x50(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0xc53d0
movq -0x48(%rbp), %rcx
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %eax
cmpl 0x2c(%rcx), %eax
sete %al
movzbl %al, %esi
andl $0x1, %esi
callq 0xd0a30
movq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0xccfd0
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0xd5fb0
movq -0x48(%rbp), %rax
cmpl $0x4, 0x2c(%rax)
jne 0x1b6b4b
movq -0x28(%rbp), %rdi
movl $0x3, %esi
callq 0xc8de0
jmp 0x1b6b59
movq -0x28(%rbp), %rdi
movl $0x4, %esi
callq 0xc8de0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0xcd5c0
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1b6b8d
movq -0x48(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x38(%rbp), %rdx
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, -0x3c(%rbp)
jmp 0x1b6ba8
movq -0x48(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movq -0x38(%rbp), %rcx
movq (%rdi), %rax
callq *0x28(%rax)
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x1b6bb2
jmp 0x1b6bc0
movq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0xcbba0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZNK10OpenSubdiv6v3_6_03Bfr14SurfaceFactory19assignLinearSurfaceEPNS1_8internal11SurfaceDataEiPKl:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov rdi, [rbp+var_8]
mov [rbp+var_48], rdi
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov esi, [rbp+var_14]
mov rax, [rdi]
call qword ptr [rax+18h]
mov ecx, eax
mov rax, [rbp+var_48]
mov [rbp+var_2C], ecx
mov rcx, [rbp+var_28]
mov [rbp+var_50], rcx
mov esi, [rax+8]
mov edx, [rbp+var_2C]
lea rdi, [rbp+var_30]
call __ZN10OpenSubdiv6v3_6_03Bfr16ParameterizationC2ENS0_3Sdc10SchemeTypeEi; OpenSubdiv::v3_6_0::Bfr::Parameterization::Parameterization(OpenSubdiv::v3_6_0::Sdc::SchemeType,int)
mov rdi, [rbp+var_50]
mov esi, [rbp+var_30]
call __ZN10OpenSubdiv6v3_6_03Bfr8internal11SurfaceData8setParamENS1_16ParameterizationE; OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::setParam(OpenSubdiv::v3_6_0::Bfr::Parameterization)
mov rcx, [rbp+var_48]
mov rdi, [rbp+var_28]; this
mov eax, [rbp+var_2C]
cmp eax, [rcx+2Ch]
setz al
movzx esi, al
and esi, 1; bool
call __ZN10OpenSubdiv6v3_6_03Bfr8internal11SurfaceData10setRegularEb; OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::setRegular(bool)
mov rdi, [rbp+var_28]; this
mov esi, 1; bool
call __ZN10OpenSubdiv6v3_6_03Bfr8internal11SurfaceData9setLinearEb; OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::setLinear(bool)
mov rdi, [rbp+var_28]; this
xor esi, esi; int
call __ZN10OpenSubdiv6v3_6_03Bfr8internal11SurfaceData15setRegPatchMaskEi; OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::setRegPatchMask(int)
mov rax, [rbp+var_48]
cmp dword ptr [rax+2Ch], 4
jnz short loc_1B6B4B
mov rdi, [rbp+var_28]; this
mov esi, 3; int
call __ZN10OpenSubdiv6v3_6_03Bfr8internal11SurfaceData15setRegPatchTypeEi; OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::setRegPatchType(int)
jmp short loc_1B6B59
loc_1B6B4B:
mov rdi, [rbp+var_28]; this
mov esi, 4; int
call __ZN10OpenSubdiv6v3_6_03Bfr8internal11SurfaceData15setRegPatchTypeEi; OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::setRegPatchType(int)
loc_1B6B59:
mov rdi, [rbp+var_28]; this
mov esi, [rbp+var_2C]; int
call __ZN10OpenSubdiv6v3_6_03Bfr8internal11SurfaceData9resizeCVsEi; OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::resizeCVs(int)
mov [rbp+var_38], rax
mov [rbp+var_3C], 0
cmp [rbp+var_20], 0
jnz short loc_1B6B8D
mov rdi, [rbp+var_48]
mov esi, [rbp+var_14]
mov rdx, [rbp+var_38]
mov rax, [rdi]
call qword ptr [rax+20h]
mov [rbp+var_3C], eax
jmp short loc_1B6BA8
loc_1B6B8D:
mov rdi, [rbp+var_48]
mov esi, [rbp+var_14]
mov rax, [rbp+var_20]
mov rdx, [rax]
mov rcx, [rbp+var_38]
mov rax, [rdi]
call qword ptr [rax+28h]
mov [rbp+var_3C], eax
loc_1B6BA8:
mov eax, [rbp+var_3C]
cmp eax, [rbp+var_2C]
jge short loc_1B6BB2
jmp short loc_1B6BC0
loc_1B6BB2:
mov rdi, [rbp+var_28]; this
mov esi, 1; bool
call __ZN10OpenSubdiv6v3_6_03Bfr8internal11SurfaceData8setValidEb; OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::setValid(bool)
loc_1B6BC0:
add rsp, 50h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *this,
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a2,
unsigned int a3,
const long long *a4)
{
long long result; // rax
int v5; // [rsp+14h] [rbp-3Ch]
long long v6; // [rsp+18h] [rbp-38h]
unsigned int v7; // [rsp+20h] [rbp-30h] BYREF
int v8; // [rsp+24h] [rbp-2Ch]
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *v9; // [rsp+28h] [rbp-28h]
const long long *v10; // [rsp+30h] [rbp-20h]
unsigned int v11; // [rsp+3Ch] [rbp-14h]
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *v12; // [rsp+40h] [rbp-10h]
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *v13; // [rsp+48h] [rbp-8h]
v13 = this;
v12 = a2;
v11 = a3;
v10 = a4;
v9 = a2;
v8 = (*(long long ( **)(OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *, _QWORD))(*(_QWORD *)this + 24LL))(this, a3);
OpenSubdiv::v3_6_0::Bfr::Parameterization::Parameterization((long long)&v7, *((_DWORD *)this + 2), v8);
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::setParam(a2, v7);
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::setRegular(v9, v8 == *((_DWORD *)this + 11));
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::setLinear(v9, 1);
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::setRegPatchMask(v9, 0);
if ( *((_DWORD *)this + 11) == 4 )
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::setRegPatchType(v9, 3);
else
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::setRegPatchType(v9, 4);
v6 = OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::resizeCVs(v9, v8);
if ( v10 )
v5 = (*(long long ( **)(OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *, _QWORD, const long long, long long))(*(_QWORD *)this + 40LL))(
this,
v11,
*v10,
v6);
else
v5 = (*(long long ( **)(OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *, _QWORD, long long))(*(_QWORD *)this + 32LL))(
this,
v11,
v6);
result = (unsigned int)v5;
if ( v5 >= v8 )
return OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::setValid(v9, 1);
return result;
}
| |||
28,066 | OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, int, long const*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp | void
SurfaceFactory::assignLinearSurface(SurfaceType * surfacePtr,
Index faceIndex, FVarID const * fvarPtrOrVtx) const {
SurfaceType & surface = *surfacePtr;
// Initialize instance members from the associated irregular patch:
int faceSize = getFaceSize(faceIndex);
surface.setParam(Parameterization(_subdivScheme, faceSize));
surface.setRegular(faceSize == _regFaceSize);
surface.setLinear(true);
surface.setRegPatchMask(0);
if (_regFaceSize == 4) {
surface.setRegPatchType(Far::PatchDescriptor::QUADS);
} else {
surface.setRegPatchType(Far::PatchDescriptor::TRIANGLES);
}
//
// Finally, gather patch control points from the appropriate indices:
//
Index * surfaceCVs = surface.resizeCVs(faceSize);
int count = 0;
if (fvarPtrOrVtx == 0) {
count = getFaceVertexIndices(faceIndex, surfaceCVs);
} else {
count = getFaceFVarValueIndices(faceIndex, *fvarPtrOrVtx, surfaceCVs);
}
// If subclass fails to get indices, Surface will remain invalid
if (count < faceSize) return;
surface.setValid(true);
#ifdef _BFR_DEBUG_TOP_TYPE_STATS
__numLinearPatches ++;
#endif
} | O1 | cpp | OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, int, long const*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %rax
movl %edx, %esi
callq *0x18(%rax)
movl %eax, %ebp
movl 0x8(%r15), %esi
leaq 0x4(%rsp), %r13
movq %r13, %rdi
movl %eax, %edx
callq 0x3aac0
movl (%r13), %eax
movl %eax, 0x68(%rbx)
cmpl 0x2c(%r15), %ebp
sete %al
movb 0x6c(%rbx), %cl
andb $-0xd, %cl
shlb $0x2, %al
orb %cl, %al
orb $0x8, %al
movb %al, 0x6c(%rbx)
movb $0x0, 0x6e(%rbx)
cmpl $0x4, 0x2c(%r15)
sete %al
movb $0x4, %cl
subb %al, %cl
movb %cl, 0x6d(%rbx)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3a340
testq %r12, %r12
je 0x9ce58
movq (%r12), %rdx
movq (%r15), %r8
movq %r15, %rdi
movl %r14d, %esi
movq %rax, %rcx
callq *0x28(%r8)
jmp 0x9ce67
movq (%r15), %rcx
movq %r15, %rdi
movl %r14d, %esi
movq %rax, %rdx
callq *0x20(%rcx)
cmpl %ebp, %eax
jl 0x9ce6f
orb $0x1, 0x6c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZNK10OpenSubdiv6v3_6_03Bfr14SurfaceFactory19assignLinearSurfaceEPNS1_8internal11SurfaceDataEiPKl:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rcx
mov r14d, edx
mov rbx, rsi
mov r15, rdi
mov rax, [rdi]
mov esi, edx
call qword ptr [rax+18h]
mov ebp, eax
mov esi, [r15+8]
lea r13, [rsp+38h+var_34]
mov rdi, r13
mov edx, eax
call __ZN10OpenSubdiv6v3_6_03Bfr16ParameterizationC2ENS0_3Sdc10SchemeTypeEi; OpenSubdiv::v3_6_0::Bfr::Parameterization::Parameterization(OpenSubdiv::v3_6_0::Sdc::SchemeType,int)
mov eax, [r13+0]
mov [rbx+68h], eax
cmp ebp, [r15+2Ch]
setz al
mov cl, [rbx+6Ch]
and cl, 0F3h
shl al, 2
or al, cl
or al, 8
mov [rbx+6Ch], al
mov byte ptr [rbx+6Eh], 0
cmp dword ptr [r15+2Ch], 4
setz al
mov cl, 4
sub cl, al
mov [rbx+6Dh], cl
mov rdi, rbx; this
mov esi, ebp; int
call __ZN10OpenSubdiv6v3_6_03Bfr8internal11SurfaceData9resizeCVsEi; OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::resizeCVs(int)
test r12, r12
jz short loc_9CE58
mov rdx, [r12]
mov r8, [r15]
mov rdi, r15
mov esi, r14d
mov rcx, rax
call qword ptr [r8+28h]
jmp short loc_9CE67
loc_9CE58:
mov rcx, [r15]
mov rdi, r15
mov esi, r14d
mov rdx, rax
call qword ptr [rcx+20h]
loc_9CE67:
cmp eax, ebp
jl short loc_9CE6F
or byte ptr [rbx+6Ch], 1
loc_9CE6F:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *this,
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a2,
unsigned int a3,
const long long *a4)
{
long long v4; // rax
int v7; // ebp
long long v8; // rax
long long result; // rax
_DWORD v10[13]; // [rsp+0h] [rbp-34h] BYREF
v10[0] = HIDWORD(v4);
v7 = (*(long long ( **)(OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *, _QWORD))(*(_QWORD *)this + 24LL))(this, a3);
OpenSubdiv::v3_6_0::Bfr::Parameterization::Parameterization((long long)v10, *((_DWORD *)this + 2), v7);
*((_DWORD *)a2 + 26) = v10[0];
*((_BYTE *)a2 + 108) = *((_BYTE *)a2 + 108) & 0xF3 | (4 * (v7 == *((_DWORD *)this + 11))) | 8;
*((_BYTE *)a2 + 110) = 0;
*((_BYTE *)a2 + 109) = 4 - (*((_DWORD *)this + 11) == 4);
v8 = OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::resizeCVs(a2, v7);
if ( a4 )
result = (*(long long ( **)(OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *, _QWORD, _QWORD, long long))(*(_QWORD *)this + 40LL))(
this,
a3,
*a4,
v8);
else
result = (*(long long ( **)(OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *, _QWORD, long long))(*(_QWORD *)this + 32LL))(
this,
a3,
v8);
if ( (int)result >= v7 )
*((_BYTE *)a2 + 108) |= 1u;
return result;
}
| assignLinearSurface:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RCX
MOV R14D,EDX
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI]
MOV ESI,EDX
CALL qword ptr [RAX + 0x18]
MOV EBP,EAX
MOV ESI,dword ptr [R15 + 0x8]
LEA R13,[RSP + 0x4]
MOV RDI,R13
MOV EDX,EAX
CALL 0x0013aac0
MOV EAX,dword ptr [R13]
MOV dword ptr [RBX + 0x68],EAX
CMP EBP,dword ptr [R15 + 0x2c]
SETZ AL
MOV CL,byte ptr [RBX + 0x6c]
AND CL,0xf3
SHL AL,0x2
OR AL,CL
OR AL,0x8
MOV byte ptr [RBX + 0x6c],AL
MOV byte ptr [RBX + 0x6e],0x0
CMP dword ptr [R15 + 0x2c],0x4
SETZ AL
MOV CL,0x4
SUB CL,AL
MOV byte ptr [RBX + 0x6d],CL
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0013a340
TEST R12,R12
JZ 0x0019ce58
MOV RDX,qword ptr [R12]
MOV R8,qword ptr [R15]
MOV RDI,R15
MOV ESI,R14D
MOV RCX,RAX
CALL qword ptr [R8 + 0x28]
JMP 0x0019ce67
LAB_0019ce58:
MOV RCX,qword ptr [R15]
MOV RDI,R15
MOV ESI,R14D
MOV RDX,RAX
CALL qword ptr [RCX + 0x20]
LAB_0019ce67:
CMP EAX,EBP
JL 0x0019ce6f
OR byte ptr [RBX + 0x6c],0x1
LAB_0019ce6f:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*,
int, long const*) const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface
(SurfaceFactory *this,SurfaceData *param_1,int param_2,long *param_3)
{
int iVar1;
int iVar2;
int8 in_RAX;
int8 uVar3;
int4 local_34;
local_34 = (int4)((ulong)in_RAX >> 0x20);
iVar1 = (**(code **)(*(long *)this + 0x18))(this,param_2);
Parameterization::Parameterization((Parameterization *)&local_34,*(int4 *)(this + 8),iVar1);
*(int4 *)(param_1 + 0x68) = local_34;
param_1[0x6c] =
(SurfaceData)((iVar1 == *(int *)(this + 0x2c)) << 2 | (byte)param_1[0x6c] & 0xf3 | 8);
param_1[0x6e] = (SurfaceData)0x0;
param_1[0x6d] = (SurfaceData)('\x04' - (*(int *)(this + 0x2c) == 4));
uVar3 = internal::SurfaceData::resizeCVs(param_1,iVar1);
if (param_3 == (long *)0x0) {
iVar2 = (**(code **)(*(long *)this + 0x20))(this,param_2,uVar3);
}
else {
iVar2 = (**(code **)(*(long *)this + 0x28))(this,param_2,*param_3,uVar3);
}
if (iVar1 <= iVar2) {
param_1[0x6c] = (SurfaceData)((byte)param_1[0x6c] | 1);
}
return;
}
| |
28,067 | OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, int, long const*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp | void
SurfaceFactory::assignLinearSurface(SurfaceType * surfacePtr,
Index faceIndex, FVarID const * fvarPtrOrVtx) const {
SurfaceType & surface = *surfacePtr;
// Initialize instance members from the associated irregular patch:
int faceSize = getFaceSize(faceIndex);
surface.setParam(Parameterization(_subdivScheme, faceSize));
surface.setRegular(faceSize == _regFaceSize);
surface.setLinear(true);
surface.setRegPatchMask(0);
if (_regFaceSize == 4) {
surface.setRegPatchType(Far::PatchDescriptor::QUADS);
} else {
surface.setRegPatchType(Far::PatchDescriptor::TRIANGLES);
}
//
// Finally, gather patch control points from the appropriate indices:
//
Index * surfaceCVs = surface.resizeCVs(faceSize);
int count = 0;
if (fvarPtrOrVtx == 0) {
count = getFaceVertexIndices(faceIndex, surfaceCVs);
} else {
count = getFaceFVarValueIndices(faceIndex, *fvarPtrOrVtx, surfaceCVs);
}
// If subclass fails to get indices, Surface will remain invalid
if (count < faceSize) return;
surface.setValid(true);
#ifdef _BFR_DEBUG_TOP_TYPE_STATS
__numLinearPatches ++;
#endif
} | O2 | cpp | OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, int, long const*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %rax
movl %edx, %esi
callq *0x18(%rax)
movl %eax, %ebp
movl 0x8(%r15), %esi
leaq 0x4(%rsp), %r13
movq %r13, %rdi
movl %eax, %edx
callq 0x53650
movl (%r13), %eax
movl %eax, 0x68(%rbx)
cmpl 0x2c(%r15), %ebp
sete %al
movb 0x6c(%rbx), %cl
andb $-0xd, %cl
shlb $0x2, %al
orb %cl, %al
orb $0x8, %al
movb %al, 0x6c(%rbx)
movb $0x0, 0x6e(%rbx)
cmpl $0x4, 0x2c(%r15)
sete %al
movb $0x4, %cl
subb %al, %cl
movb %cl, 0x6d(%rbx)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52960
testq %r12, %r12
je 0xa8eb4
movq (%r12), %rdx
movq (%r15), %r8
movq %r15, %rdi
movl %r14d, %esi
movq %rax, %rcx
callq *0x28(%r8)
jmp 0xa8ec3
movq (%r15), %rcx
movq %r15, %rdi
movl %r14d, %esi
movq %rax, %rdx
callq *0x20(%rcx)
cmpl %ebp, %eax
jl 0xa8ecb
orb $0x1, 0x6c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZNK10OpenSubdiv6v3_6_03Bfr14SurfaceFactory19assignLinearSurfaceEPNS1_8internal11SurfaceDataEiPKl:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rcx
mov r14d, edx
mov rbx, rsi
mov r15, rdi
mov rax, [rdi]
mov esi, edx
call qword ptr [rax+18h]
mov ebp, eax
mov esi, [r15+8]
lea r13, [rsp+38h+var_34]
mov rdi, r13
mov edx, eax
call __ZN10OpenSubdiv6v3_6_03Bfr16ParameterizationC2ENS0_3Sdc10SchemeTypeEi; OpenSubdiv::v3_6_0::Bfr::Parameterization::Parameterization(OpenSubdiv::v3_6_0::Sdc::SchemeType,int)
mov eax, [r13+0]
mov [rbx+68h], eax
cmp ebp, [r15+2Ch]
setz al
mov cl, [rbx+6Ch]
and cl, 0F3h
shl al, 2
or al, cl
or al, 8
mov [rbx+6Ch], al
mov byte ptr [rbx+6Eh], 0
cmp dword ptr [r15+2Ch], 4
setz al
mov cl, 4
sub cl, al
mov [rbx+6Dh], cl
mov rdi, rbx; this
mov esi, ebp; int
call __ZN10OpenSubdiv6v3_6_03Bfr8internal11SurfaceData9resizeCVsEi; OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::resizeCVs(int)
test r12, r12
jz short loc_A8EB4
mov rdx, [r12]
mov r8, [r15]
mov rdi, r15
mov esi, r14d
mov rcx, rax
call qword ptr [r8+28h]
jmp short loc_A8EC3
loc_A8EB4:
mov rcx, [r15]
mov rdi, r15
mov esi, r14d
mov rdx, rax
call qword ptr [rcx+20h]
loc_A8EC3:
cmp eax, ebp
jl short loc_A8ECB
or byte ptr [rbx+6Ch], 1
loc_A8ECB:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *this,
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a2,
unsigned int a3,
const long long *a4)
{
long long v4; // rax
int v7; // ebp
long long v8; // rax
long long result; // rax
_DWORD v10[13]; // [rsp+0h] [rbp-34h] BYREF
v10[0] = HIDWORD(v4);
v7 = (*(long long ( **)(OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *, _QWORD))(*(_QWORD *)this + 24LL))(this, a3);
OpenSubdiv::v3_6_0::Bfr::Parameterization::Parameterization((long long)v10, *((_DWORD *)this + 2), v7);
*((_DWORD *)a2 + 26) = v10[0];
*((_BYTE *)a2 + 108) = *((_BYTE *)a2 + 108) & 0xF3 | (4 * (v7 == *((_DWORD *)this + 11))) | 8;
*((_BYTE *)a2 + 110) = 0;
*((_BYTE *)a2 + 109) = 4 - (*((_DWORD *)this + 11) == 4);
v8 = OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::resizeCVs(a2, v7);
if ( a4 )
result = (*(long long ( **)(OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *, _QWORD, _QWORD, long long))(*(_QWORD *)this + 40LL))(
this,
a3,
*a4,
v8);
else
result = (*(long long ( **)(OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *, _QWORD, long long))(*(_QWORD *)this + 32LL))(
this,
a3,
v8);
if ( (int)result >= v7 )
*((_BYTE *)a2 + 108) |= 1u;
return result;
}
| assignLinearSurface:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RCX
MOV R14D,EDX
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI]
MOV ESI,EDX
CALL qword ptr [RAX + 0x18]
MOV EBP,EAX
MOV ESI,dword ptr [R15 + 0x8]
LEA R13,[RSP + 0x4]
MOV RDI,R13
MOV EDX,EAX
CALL 0x00153650
MOV EAX,dword ptr [R13]
MOV dword ptr [RBX + 0x68],EAX
CMP EBP,dword ptr [R15 + 0x2c]
SETZ AL
MOV CL,byte ptr [RBX + 0x6c]
AND CL,0xf3
SHL AL,0x2
OR AL,CL
OR AL,0x8
MOV byte ptr [RBX + 0x6c],AL
MOV byte ptr [RBX + 0x6e],0x0
CMP dword ptr [R15 + 0x2c],0x4
SETZ AL
MOV CL,0x4
SUB CL,AL
MOV byte ptr [RBX + 0x6d],CL
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00152960
TEST R12,R12
JZ 0x001a8eb4
MOV RDX,qword ptr [R12]
MOV R8,qword ptr [R15]
MOV RDI,R15
MOV ESI,R14D
MOV RCX,RAX
CALL qword ptr [R8 + 0x28]
JMP 0x001a8ec3
LAB_001a8eb4:
MOV RCX,qword ptr [R15]
MOV RDI,R15
MOV ESI,R14D
MOV RDX,RAX
CALL qword ptr [RCX + 0x20]
LAB_001a8ec3:
CMP EAX,EBP
JL 0x001a8ecb
OR byte ptr [RBX + 0x6c],0x1
LAB_001a8ecb:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*,
int, long const*) const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface
(SurfaceFactory *this,SurfaceData *param_1,int param_2,long *param_3)
{
int iVar1;
int iVar2;
int8 in_RAX;
int8 uVar3;
int4 local_34;
local_34 = (int4)((ulong)in_RAX >> 0x20);
iVar1 = (**(code **)(*(long *)this + 0x18))(this,param_2);
Parameterization::Parameterization((Parameterization *)&local_34,*(int4 *)(this + 8),iVar1);
*(int4 *)(param_1 + 0x68) = local_34;
param_1[0x6c] =
(SurfaceData)((iVar1 == *(int *)(this + 0x2c)) << 2 | (byte)param_1[0x6c] & 0xf3 | 8);
param_1[0x6e] = (SurfaceData)0x0;
param_1[0x6d] = (SurfaceData)('\x04' - (*(int *)(this + 0x2c) == 4));
uVar3 = internal::SurfaceData::resizeCVs(param_1,iVar1);
if (param_3 == (long *)0x0) {
iVar2 = (**(code **)(*(long *)this + 0x20))(this,param_2,uVar3);
}
else {
iVar2 = (**(code **)(*(long *)this + 0x28))(this,param_2,*param_3,uVar3);
}
if (iVar1 <= iVar2) {
param_1[0x6c] = (SurfaceData)((byte)param_1[0x6c] | 1);
}
return;
}
| |
28,068 | OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, int, long const*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp | void
SurfaceFactory::assignLinearSurface(SurfaceType * surfacePtr,
Index faceIndex, FVarID const * fvarPtrOrVtx) const {
SurfaceType & surface = *surfacePtr;
// Initialize instance members from the associated irregular patch:
int faceSize = getFaceSize(faceIndex);
surface.setParam(Parameterization(_subdivScheme, faceSize));
surface.setRegular(faceSize == _regFaceSize);
surface.setLinear(true);
surface.setRegPatchMask(0);
if (_regFaceSize == 4) {
surface.setRegPatchType(Far::PatchDescriptor::QUADS);
} else {
surface.setRegPatchType(Far::PatchDescriptor::TRIANGLES);
}
//
// Finally, gather patch control points from the appropriate indices:
//
Index * surfaceCVs = surface.resizeCVs(faceSize);
int count = 0;
if (fvarPtrOrVtx == 0) {
count = getFaceVertexIndices(faceIndex, surfaceCVs);
} else {
count = getFaceFVarValueIndices(faceIndex, *fvarPtrOrVtx, surfaceCVs);
}
// If subclass fails to get indices, Surface will remain invalid
if (count < faceSize) return;
surface.setValid(true);
#ifdef _BFR_DEBUG_TOP_TYPE_STATS
__numLinearPatches ++;
#endif
} | O3 | cpp | OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, int, long const*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %rax
movl %edx, %esi
callq *0x18(%rax)
movl %eax, %ebp
movl 0x8(%r15), %esi
leaq 0x4(%rsp), %r13
movq %r13, %rdi
movl %eax, %edx
callq 0x3aaa0
movl (%r13), %eax
movl %eax, 0x68(%rbx)
cmpl 0x2c(%r15), %ebp
sete %al
movb 0x6c(%rbx), %cl
andb $-0xd, %cl
shlb $0x2, %al
orb %cl, %al
orb $0x8, %al
movb %al, 0x6c(%rbx)
movb $0x0, 0x6e(%rbx)
cmpl $0x4, 0x2c(%r15)
sete %al
movb $0x4, %cl
subb %al, %cl
movb %cl, 0x6d(%rbx)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3a320
testq %r12, %r12
je 0x9f94c
movq (%r12), %rdx
movq (%r15), %r8
movq %r15, %rdi
movl %r14d, %esi
movq %rax, %rcx
callq *0x28(%r8)
jmp 0x9f95b
movq (%r15), %rcx
movq %r15, %rdi
movl %r14d, %esi
movq %rax, %rdx
callq *0x20(%rcx)
cmpl %ebp, %eax
jl 0x9f963
orb $0x1, 0x6c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZNK10OpenSubdiv6v3_6_03Bfr14SurfaceFactory19assignLinearSurfaceEPNS1_8internal11SurfaceDataEiPKl:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rcx
mov r14d, edx
mov rbx, rsi
mov r15, rdi
mov rax, [rdi]
mov esi, edx
call qword ptr [rax+18h]
mov ebp, eax
mov esi, [r15+8]
lea r13, [rsp+38h+var_34]
mov rdi, r13
mov edx, eax
call __ZN10OpenSubdiv6v3_6_03Bfr16ParameterizationC2ENS0_3Sdc10SchemeTypeEi; OpenSubdiv::v3_6_0::Bfr::Parameterization::Parameterization(OpenSubdiv::v3_6_0::Sdc::SchemeType,int)
mov eax, [r13+0]
mov [rbx+68h], eax
cmp ebp, [r15+2Ch]
setz al
mov cl, [rbx+6Ch]
and cl, 0F3h
shl al, 2
or al, cl
or al, 8
mov [rbx+6Ch], al
mov byte ptr [rbx+6Eh], 0
cmp dword ptr [r15+2Ch], 4
setz al
mov cl, 4
sub cl, al
mov [rbx+6Dh], cl
mov rdi, rbx; this
mov esi, ebp; int
call __ZN10OpenSubdiv6v3_6_03Bfr8internal11SurfaceData9resizeCVsEi; OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::resizeCVs(int)
test r12, r12
jz short loc_9F94C
mov rdx, [r12]
mov r8, [r15]
mov rdi, r15
mov esi, r14d
mov rcx, rax
call qword ptr [r8+28h]
jmp short loc_9F95B
loc_9F94C:
mov rcx, [r15]
mov rdi, r15
mov esi, r14d
mov rdx, rax
call qword ptr [rcx+20h]
loc_9F95B:
cmp eax, ebp
jl short loc_9F963
or byte ptr [rbx+6Ch], 1
loc_9F963:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *this,
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a2,
unsigned int a3,
const long long *a4)
{
long long v4; // rax
int v7; // ebp
long long v8; // rax
long long result; // rax
_DWORD v10[13]; // [rsp+0h] [rbp-34h] BYREF
v10[0] = HIDWORD(v4);
v7 = (*(long long ( **)(OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *, _QWORD))(*(_QWORD *)this + 24LL))(this, a3);
OpenSubdiv::v3_6_0::Bfr::Parameterization::Parameterization((long long)v10, *((_DWORD *)this + 2), v7);
*((_DWORD *)a2 + 26) = v10[0];
*((_BYTE *)a2 + 108) = *((_BYTE *)a2 + 108) & 0xF3 | (4 * (v7 == *((_DWORD *)this + 11))) | 8;
*((_BYTE *)a2 + 110) = 0;
*((_BYTE *)a2 + 109) = 4 - (*((_DWORD *)this + 11) == 4);
v8 = OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::resizeCVs(a2, v7);
if ( a4 )
result = (*(long long ( **)(OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *, _QWORD, _QWORD, long long))(*(_QWORD *)this + 40LL))(
this,
a3,
*a4,
v8);
else
result = (*(long long ( **)(OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *, _QWORD, long long))(*(_QWORD *)this + 32LL))(
this,
a3,
v8);
if ( (int)result >= v7 )
*((_BYTE *)a2 + 108) |= 1u;
return result;
}
| assignLinearSurface:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RCX
MOV R14D,EDX
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI]
MOV ESI,EDX
CALL qword ptr [RAX + 0x18]
MOV EBP,EAX
MOV ESI,dword ptr [R15 + 0x8]
LEA R13,[RSP + 0x4]
MOV RDI,R13
MOV EDX,EAX
CALL 0x0013aaa0
MOV EAX,dword ptr [R13]
MOV dword ptr [RBX + 0x68],EAX
CMP EBP,dword ptr [R15 + 0x2c]
SETZ AL
MOV CL,byte ptr [RBX + 0x6c]
AND CL,0xf3
SHL AL,0x2
OR AL,CL
OR AL,0x8
MOV byte ptr [RBX + 0x6c],AL
MOV byte ptr [RBX + 0x6e],0x0
CMP dword ptr [R15 + 0x2c],0x4
SETZ AL
MOV CL,0x4
SUB CL,AL
MOV byte ptr [RBX + 0x6d],CL
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0013a320
TEST R12,R12
JZ 0x0019f94c
MOV RDX,qword ptr [R12]
MOV R8,qword ptr [R15]
MOV RDI,R15
MOV ESI,R14D
MOV RCX,RAX
CALL qword ptr [R8 + 0x28]
JMP 0x0019f95b
LAB_0019f94c:
MOV RCX,qword ptr [R15]
MOV RDI,R15
MOV ESI,R14D
MOV RDX,RAX
CALL qword ptr [RCX + 0x20]
LAB_0019f95b:
CMP EAX,EBP
JL 0x0019f963
OR byte ptr [RBX + 0x6c],0x1
LAB_0019f963:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface(OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*,
int, long const*) const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::assignLinearSurface
(SurfaceFactory *this,SurfaceData *param_1,int param_2,long *param_3)
{
int iVar1;
int iVar2;
int8 in_RAX;
int8 uVar3;
int4 local_34;
local_34 = (int4)((ulong)in_RAX >> 0x20);
iVar1 = (**(code **)(*(long *)this + 0x18))(this,param_2);
Parameterization::Parameterization((Parameterization *)&local_34,*(int4 *)(this + 8),iVar1);
*(int4 *)(param_1 + 0x68) = local_34;
param_1[0x6c] =
(SurfaceData)((iVar1 == *(int *)(this + 0x2c)) << 2 | (byte)param_1[0x6c] & 0xf3 | 8);
param_1[0x6e] = (SurfaceData)0x0;
param_1[0x6d] = (SurfaceData)('\x04' - (*(int *)(this + 0x2c) == 4));
uVar3 = internal::SurfaceData::resizeCVs(param_1,iVar1);
if (param_3 == (long *)0x0) {
iVar2 = (**(code **)(*(long *)this + 0x20))(this,param_2,uVar3);
}
else {
iVar2 = (**(code **)(*(long *)this + 0x28))(this,param_2,*param_3,uVar3);
}
if (iVar1 <= iVar2) {
param_1[0x6c] = (SurfaceData)((byte)param_1[0x6c] | 1);
}
return;
}
| |
28,069 | mthd_stmt_fetch_to_bind | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | int mthd_stmt_fetch_to_bind(MYSQL_STMT *stmt, unsigned char *row)
{
uint i;
size_t truncations= 0;
unsigned char *null_ptr, bit_offset= 4;
row++; /* skip status byte */
null_ptr= row;
row+= (stmt->field_count + 9) / 8;
for (i=0; i < stmt->field_count; i++)
{
/* save row position for fetching values in pieces */
if (*null_ptr & bit_offset)
{
if (stmt->result_callback)
stmt->result_callback(stmt->user_data, i, NULL);
else
{
if (!stmt->bind[i].is_null)
stmt->bind[i].is_null= &stmt->bind[i].is_null_value;
*stmt->bind[i].is_null= 1;
stmt->bind[i].u.row_ptr= NULL;
}
} else
{
stmt->bind[i].u.row_ptr= row;
if (!stmt->bind_result_done ||
stmt->bind[i].flags & MADB_BIND_DUMMY)
{
unsigned long length;
if (stmt->result_callback)
stmt->result_callback(stmt->user_data, i, &row);
else {
if (mysql_ps_fetch_functions[stmt->fields[i].type].pack_len >= 0)
length= mysql_ps_fetch_functions[stmt->fields[i].type].pack_len;
else
length= net_field_length(&row);
row+= length;
if (!stmt->bind[i].length)
stmt->bind[i].length= &stmt->bind[i].length_value;
*stmt->bind[i].length= stmt->bind[i].length_value= length;
}
}
else
{
if (!stmt->bind[i].length)
stmt->bind[i].length= &stmt->bind[i].length_value;
if (!stmt->bind[i].is_null)
stmt->bind[i].is_null= &stmt->bind[i].is_null_value;
*stmt->bind[i].is_null= 0;
mysql_ps_fetch_functions[stmt->fields[i].type].func(&stmt->bind[i], &stmt->fields[i], &row);
if (stmt->mysql->options.report_data_truncation)
truncations+= *stmt->bind[i].error;
}
}
if (!((bit_offset <<=1) & 255)) {
bit_offset= 1; /* To next byte */
null_ptr++;
}
}
return((truncations) ? MYSQL_DATA_TRUNCATED : 0);
} | O3 | c | mthd_stmt_fetch_to_bind:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0x60(%rdi), %eax
leal 0x9(%rax), %ecx
shrl $0x3, %ecx
addq %rsi, %rcx
incq %rcx
movq %rcx, -0x38(%rbp)
testl %eax, %eax
je 0x62ac3
movq %rsi, %rbx
incq %rbx
movl $0x4, %r14d
movl $0x50, %r13d
xorl %r15d, %r15d
xorl %r12d, %r12d
movq $0x0, -0x40(%rbp)
movq %rdi, -0x30(%rbp)
movzbl (%rbx), %eax
testl %eax, %r14d
je 0x62913
movq 0x388(%rdi), %rax
testq %rax, %rax
je 0x629ef
movq -0x30(%rbp), %rcx
movq 0x380(%rcx), %rdi
movl %r12d, %esi
xorl %edx, %edx
jmp 0x629e4
movq -0x38(%rbp), %rcx
movq 0x78(%rdi), %rax
movq %rcx, -0x30(%rax,%r13)
cmpb $0x0, 0xe8(%rdi)
je 0x629c6
movq 0x78(%rdi), %rax
testb $0x1, 0x8(%rax,%r13)
jne 0x629c6
cmpq $0x0, -0x50(%rax,%r13)
jne 0x62952
leaq (%rax,%r13), %rcx
movq %rcx, -0x50(%rax,%r13)
movq 0x78(%rdi), %rax
cmpq $0x0, -0x48(%rax,%r13)
jne 0x62969
addq %r13, %rax
addq $0x17, %rax
movq %rax, -0x5f(%rax)
movq 0x78(%rdi), %rax
movq -0x48(%rax,%r13), %rax
movb $0x0, (%rax)
movq 0x58(%rdi), %rsi
movq 0x78(%rdi), %rax
movl 0x70(%rsi,%r15), %ecx
addq %r15, %rsi
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%r13), %rdi
addq $-0x50, %rdi
leaq -0x38(%rbp), %rdx
leaq 0x384358(%rip), %rax # 0x3e6cf0
callq *(%rax,%rcx,8)
movq -0x30(%rbp), %rdi
movq 0x38(%rdi), %rax
cmpb $0x0, 0x451(%rax)
je 0x62a80
movq 0x78(%rdi), %rax
movq -0x38(%rax,%r13), %rax
movsbq (%rax), %rax
addq %rax, -0x40(%rbp)
jmp 0x62a80
movq 0x388(%rdi), %rax
testq %rax, %rax
je 0x62a21
movq -0x30(%rbp), %rcx
movq 0x380(%rcx), %rdi
movl %r12d, %esi
leaq -0x38(%rbp), %rdx
callq *%rax
movq -0x30(%rbp), %rdi
jmp 0x62a80
movq 0x78(%rdi), %rax
cmpq $0x0, -0x48(%rax,%r13)
jne 0x62a0a
addq %r13, %rax
addq $0x17, %rax
movq %rax, -0x5f(%rax)
movq 0x78(%rdi), %rax
movq -0x48(%rax,%r13), %rax
movb $0x1, (%rax)
movq 0x78(%rdi), %rax
movq $0x0, -0x30(%rax,%r13)
jmp 0x62a80
movq 0x58(%rdi), %rax
movl 0x70(%rax,%r15), %eax
leaq (%rax,%rax,2), %rax
leaq 0x3842bb(%rip), %rdx # 0x3e6cf0
movslq 0x8(%rdx,%rax,8), %rax
testq %rax, %rax
jns 0x62a50
leaq -0x38(%rbp), %rdi
callq 0x599b1
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rcx
addq %rax, %rcx
movq %rcx, -0x38(%rbp)
movq 0x78(%rdi), %rcx
cmpq $0x0, -0x50(%rcx,%r13)
jne 0x62a70
leaq (%rcx,%r13), %rdx
movq %rdx, -0x50(%rcx,%r13)
movq 0x78(%rdi), %rcx
movq %rax, (%rcx,%r13)
movq 0x78(%rdi), %rcx
movq -0x50(%rcx,%r13), %rcx
movq %rax, (%rcx)
movzbl %r14b, %eax
leal (%rax,%rax), %r14d
xorl %ecx, %ecx
testb $0x7f, %al
sete %cl
movl $0x1, %eax
cmovel %eax, %r14d
addq %rcx, %rbx
incq %r12
movl 0x60(%rdi), %eax
addq $0x70, %r13
subq $-0x80, %r15
cmpq %rax, %r12
jb 0x628e6
xorl %ecx, %ecx
cmpq $0x0, -0x40(%rbp)
movl $0x65, %eax
cmovel %ecx, %eax
jmp 0x62ac5
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mthd_stmt_fetch_to_bind:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov eax, [rdi+60h]
lea ecx, [rax+9]
shr ecx, 3
add rcx, rsi
inc rcx
mov [rbp+var_38], rcx
test eax, eax
jz loc_62AC3
mov rbx, rsi
inc rbx
mov r14d, 4
mov r13d, 50h ; 'P'
xor r15d, r15d
xor r12d, r12d
mov [rbp+var_40], 0
mov [rbp+var_30], rdi
loc_628E6:
movzx eax, byte ptr [rbx]
test r14d, eax
jz short loc_62913
mov rax, [rdi+388h]
test rax, rax
jz loc_629EF
mov rcx, [rbp+var_30]
mov rdi, [rcx+380h]
mov esi, r12d
xor edx, edx
jmp loc_629E4
loc_62913:
mov rcx, [rbp+var_38]
mov rax, [rdi+78h]
mov [rax+r13-30h], rcx
cmp byte ptr [rdi+0E8h], 0
jz loc_629C6
mov rax, [rdi+78h]
test byte ptr [rax+r13+8], 1
jnz loc_629C6
cmp qword ptr [rax+r13-50h], 0
jnz short loc_62952
lea rcx, [rax+r13]
mov [rax+r13-50h], rcx
mov rax, [rdi+78h]
loc_62952:
cmp qword ptr [rax+r13-48h], 0
jnz short loc_62969
add rax, r13
add rax, 17h
mov [rax-5Fh], rax
mov rax, [rdi+78h]
loc_62969:
mov rax, [rax+r13-48h]
mov byte ptr [rax], 0
mov rsi, [rdi+58h]
mov rax, [rdi+78h]
mov ecx, [rsi+r15+70h]
add rsi, r15
lea rcx, [rcx+rcx*2]
lea rdi, [rax+r13]
add rdi, 0FFFFFFFFFFFFFFB0h
lea rdx, [rbp+var_38]
lea rax, mysql_ps_fetch_functions
call qword ptr [rax+rcx*8]
mov rdi, [rbp+var_30]
mov rax, [rdi+38h]
cmp byte ptr [rax+451h], 0
jz loc_62A80
mov rax, [rdi+78h]
mov rax, [rax+r13-38h]
movsx rax, byte ptr [rax]
add [rbp+var_40], rax
jmp loc_62A80
loc_629C6:
mov rax, [rdi+388h]
test rax, rax
jz short loc_62A21
mov rcx, [rbp+var_30]
mov rdi, [rcx+380h]
mov esi, r12d
lea rdx, [rbp+var_38]
loc_629E4:
call rax
mov rdi, [rbp+var_30]
jmp loc_62A80
loc_629EF:
mov rax, [rdi+78h]
cmp qword ptr [rax+r13-48h], 0
jnz short loc_62A0A
add rax, r13
add rax, 17h
mov [rax-5Fh], rax
mov rax, [rdi+78h]
loc_62A0A:
mov rax, [rax+r13-48h]
mov byte ptr [rax], 1
mov rax, [rdi+78h]
mov qword ptr [rax+r13-30h], 0
jmp short loc_62A80
loc_62A21:
mov rax, [rdi+58h]
mov eax, [rax+r15+70h]
lea rax, [rax+rax*2]
lea rdx, mysql_ps_fetch_functions
movsxd rax, dword ptr [rdx+rax*8+8]
test rax, rax
jns short loc_62A50
lea rdi, [rbp+var_38]
call net_field_length
mov rdi, [rbp+var_30]
mov rcx, [rbp+var_38]
loc_62A50:
add rcx, rax
mov [rbp+var_38], rcx
mov rcx, [rdi+78h]
cmp qword ptr [rcx+r13-50h], 0
jnz short loc_62A70
lea rdx, [rcx+r13]
mov [rcx+r13-50h], rdx
mov rcx, [rdi+78h]
loc_62A70:
mov [rcx+r13], rax
mov rcx, [rdi+78h]
mov rcx, [rcx+r13-50h]
mov [rcx], rax
loc_62A80:
movzx eax, r14b
lea r14d, [rax+rax]
xor ecx, ecx
test al, 7Fh
setz cl
mov eax, 1
cmovz r14d, eax
add rbx, rcx
inc r12
mov eax, [rdi+60h]
add r13, 70h ; 'p'
sub r15, 0FFFFFFFFFFFFFF80h
cmp r12, rax
jb loc_628E6
xor ecx, ecx
cmp [rbp+var_40], 0
mov eax, 65h ; 'e'
cmovz eax, ecx
jmp short loc_62AC5
loc_62AC3:
xor eax, eax
loc_62AC5:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mthd_stmt_fetch_to_bind(_QWORD *a1, long long a2)
{
int v2; // eax
_BYTE *v3; // rbx
char v4; // r14
long long v5; // r13
long long v6; // r15
unsigned long long v7; // r12
void ( *v8)(long long, long long, unsigned __int8 **); // rax
long long v9; // rdi
long long v10; // rsi
unsigned __int8 **v11; // rdx
unsigned __int8 *v12; // rcx
long long v13; // rax
long long v14; // rax
signed long long v15; // rax
long long v16; // rcx
char v17; // al
long long result; // rax
long long v19; // [rsp+0h] [rbp-40h]
unsigned __int8 *v20; // [rsp+8h] [rbp-38h] BYREF
_QWORD *v21; // [rsp+10h] [rbp-30h]
v2 = *((_DWORD *)a1 + 24);
v20 = (unsigned __int8 *)(a2 + ((unsigned int)(v2 + 9) >> 3) + 1);
if ( !v2 )
return 0LL;
v3 = (_BYTE *)(a2 + 1);
v4 = 4;
v5 = 80LL;
v6 = 0LL;
v7 = 0LL;
v19 = 0LL;
v21 = a1;
do
{
if ( (*v3 & (unsigned __int8)v4) != 0 )
{
v8 = (void ( *)(long long, long long, unsigned __int8 **))a1[113];
if ( v8 )
{
v9 = v21[112];
v10 = (unsigned int)v7;
v11 = 0LL;
LABEL_16:
v8(v9, v10, v11);
a1 = v21;
goto LABEL_25;
}
v14 = a1[15];
if ( !*(_QWORD *)(v14 + v5 - 72) )
{
*(_QWORD *)(v5 + v14 - 72) = v5 + v14 + 23;
v14 = a1[15];
}
**(_BYTE **)(v14 + v5 - 72) = 1;
*(_QWORD *)(a1[15] + v5 - 48) = 0LL;
}
else
{
v12 = v20;
*(_QWORD *)(a1[15] + v5 - 48) = v20;
if ( !*((_BYTE *)a1 + 232) || (v13 = a1[15], (*(_BYTE *)(v13 + v5 + 8) & 1) != 0) )
{
v8 = (void ( *)(long long, long long, unsigned __int8 **))a1[113];
if ( v8 )
{
v9 = v21[112];
v10 = (unsigned int)v7;
v11 = &v20;
goto LABEL_16;
}
v15 = *((int *)&mysql_ps_fetch_functions + 6 * *(unsigned int *)(a1[11] + v6 + 112) + 2);
if ( v15 < 0 )
{
v15 = net_field_length(&v20);
a1 = v21;
v12 = v20;
}
v20 = &v12[v15];
v16 = a1[15];
if ( !*(_QWORD *)(v16 + v5 - 80) )
{
*(_QWORD *)(v16 + v5 - 80) = v16 + v5;
v16 = a1[15];
}
*(_QWORD *)(v16 + v5) = v15;
**(_QWORD **)(a1[15] + v5 - 80) = v15;
}
else
{
if ( !*(_QWORD *)(v13 + v5 - 80) )
{
*(_QWORD *)(v13 + v5 - 80) = v13 + v5;
v13 = a1[15];
}
if ( !*(_QWORD *)(v13 + v5 - 72) )
{
*(_QWORD *)(v5 + v13 - 72) = v5 + v13 + 23;
v13 = a1[15];
}
**(_BYTE **)(v13 + v5 - 72) = 0;
(*((void ( **)(long long, long long, unsigned __int8 **))&mysql_ps_fetch_functions
+ 3 * *(unsigned int *)(a1[11] + v6 + 112)))(
a1[15] + v5 - 80,
v6 + a1[11],
&v20);
a1 = v21;
if ( *(_BYTE *)(v21[7] + 1105LL) )
v19 += **(char **)(v21[15] + v5 - 56);
}
}
LABEL_25:
v17 = v4;
v4 *= 2;
if ( (v17 & 0x7F) == 0 )
v4 = 1;
v3 += (v17 & 0x7F) == 0;
++v7;
v5 += 112LL;
v6 += 128LL;
}
while ( v7 < *((unsigned int *)a1 + 24) );
result = 101LL;
if ( !v19 )
return 0LL;
return result;
}
| mthd_stmt_fetch_to_bind:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EAX,dword ptr [RDI + 0x60]
LEA ECX,[RAX + 0x9]
SHR ECX,0x3
ADD RCX,RSI
INC RCX
MOV qword ptr [RBP + -0x38],RCX
TEST EAX,EAX
JZ 0x00162ac3
MOV RBX,RSI
INC RBX
MOV R14D,0x4
MOV R13D,0x50
XOR R15D,R15D
XOR R12D,R12D
MOV qword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x30],RDI
LAB_001628e6:
MOVZX EAX,byte ptr [RBX]
TEST R14D,EAX
JZ 0x00162913
MOV RAX,qword ptr [RDI + 0x388]
TEST RAX,RAX
JZ 0x001629ef
MOV RCX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RCX + 0x380]
MOV ESI,R12D
XOR EDX,EDX
JMP 0x001629e4
LAB_00162913:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RAX + R13*0x1 + -0x30],RCX
CMP byte ptr [RDI + 0xe8],0x0
JZ 0x001629c6
MOV RAX,qword ptr [RDI + 0x78]
TEST byte ptr [RAX + R13*0x1 + 0x8],0x1
JNZ 0x001629c6
CMP qword ptr [RAX + R13*0x1 + -0x50],0x0
JNZ 0x00162952
LEA RCX,[RAX + R13*0x1]
MOV qword ptr [RAX + R13*0x1 + -0x50],RCX
MOV RAX,qword ptr [RDI + 0x78]
LAB_00162952:
CMP qword ptr [RAX + R13*0x1 + -0x48],0x0
JNZ 0x00162969
ADD RAX,R13
ADD RAX,0x17
MOV qword ptr [RAX + -0x5f],RAX
MOV RAX,qword ptr [RDI + 0x78]
LAB_00162969:
MOV RAX,qword ptr [RAX + R13*0x1 + -0x48]
MOV byte ptr [RAX],0x0
MOV RSI,qword ptr [RDI + 0x58]
MOV RAX,qword ptr [RDI + 0x78]
MOV ECX,dword ptr [RSI + R15*0x1 + 0x70]
ADD RSI,R15
LEA RCX,[RCX + RCX*0x2]
LEA RDI,[RAX + R13*0x1]
ADD RDI,-0x50
LEA RDX,[RBP + -0x38]
LEA RAX,[0x4e6cf0]
CALL qword ptr [RAX + RCX*0x8]
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RDI + 0x38]
CMP byte ptr [RAX + 0x451],0x0
JZ 0x00162a80
MOV RAX,qword ptr [RDI + 0x78]
MOV RAX,qword ptr [RAX + R13*0x1 + -0x38]
MOVSX RAX,byte ptr [RAX]
ADD qword ptr [RBP + -0x40],RAX
JMP 0x00162a80
LAB_001629c6:
MOV RAX,qword ptr [RDI + 0x388]
TEST RAX,RAX
JZ 0x00162a21
MOV RCX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RCX + 0x380]
MOV ESI,R12D
LEA RDX,[RBP + -0x38]
LAB_001629e4:
CALL RAX
MOV RDI,qword ptr [RBP + -0x30]
JMP 0x00162a80
LAB_001629ef:
MOV RAX,qword ptr [RDI + 0x78]
CMP qword ptr [RAX + R13*0x1 + -0x48],0x0
JNZ 0x00162a0a
ADD RAX,R13
ADD RAX,0x17
MOV qword ptr [RAX + -0x5f],RAX
MOV RAX,qword ptr [RDI + 0x78]
LAB_00162a0a:
MOV RAX,qword ptr [RAX + R13*0x1 + -0x48]
MOV byte ptr [RAX],0x1
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RAX + R13*0x1 + -0x30],0x0
JMP 0x00162a80
LAB_00162a21:
MOV RAX,qword ptr [RDI + 0x58]
MOV EAX,dword ptr [RAX + R15*0x1 + 0x70]
LEA RAX,[RAX + RAX*0x2]
LEA RDX,[0x4e6cf0]
MOVSXD RAX,dword ptr [RDX + RAX*0x8 + 0x8]
TEST RAX,RAX
JNS 0x00162a50
LEA RDI,[RBP + -0x38]
CALL 0x001599b1
MOV RDI,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
LAB_00162a50:
ADD RCX,RAX
MOV qword ptr [RBP + -0x38],RCX
MOV RCX,qword ptr [RDI + 0x78]
CMP qword ptr [RCX + R13*0x1 + -0x50],0x0
JNZ 0x00162a70
LEA RDX,[RCX + R13*0x1]
MOV qword ptr [RCX + R13*0x1 + -0x50],RDX
MOV RCX,qword ptr [RDI + 0x78]
LAB_00162a70:
MOV qword ptr [RCX + R13*0x1],RAX
MOV RCX,qword ptr [RDI + 0x78]
MOV RCX,qword ptr [RCX + R13*0x1 + -0x50]
MOV qword ptr [RCX],RAX
LAB_00162a80:
MOVZX EAX,R14B
LEA R14D,[RAX + RAX*0x1]
XOR ECX,ECX
TEST AL,0x7f
SETZ CL
MOV EAX,0x1
CMOVZ R14D,EAX
ADD RBX,RCX
INC R12
MOV EAX,dword ptr [RDI + 0x60]
ADD R13,0x70
SUB R15,-0x80
CMP R12,RAX
JC 0x001628e6
XOR ECX,ECX
CMP qword ptr [RBP + -0x40],0x0
MOV EAX,0x65
CMOVZ EAX,ECX
JMP 0x00162ac5
LAB_00162ac3:
XOR EAX,EAX
LAB_00162ac5:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 mthd_stmt_fetch_to_bind(long param_1,long param_2)
{
code *pcVar1;
long lVar2;
int8 uVar3;
long lVar4;
long *plVar5;
byte *pbVar6;
ulong uVar7;
long lVar8;
byte bVar9;
long lVar10;
bool bVar11;
long local_48;
long local_40;
long local_38;
local_40 = (ulong)(*(int *)(param_1 + 0x60) + 9U >> 3) + param_2 + 1;
if (*(int *)(param_1 + 0x60) == 0) {
uVar3 = 0;
}
else {
pbVar6 = (byte *)(param_2 + 1);
bVar9 = 4;
lVar8 = 0x50;
lVar10 = 0;
uVar7 = 0;
local_48 = 0;
local_38 = param_1;
do {
if ((bVar9 & *pbVar6) == 0) {
*(long *)(*(long *)(param_1 + 0x78) + -0x30 + lVar8) = local_40;
if ((*(char *)(param_1 + 0xe8) == '\0') ||
(lVar2 = *(long *)(param_1 + 0x78), (*(byte *)(lVar2 + 8 + lVar8) & 1) != 0)) {
pcVar1 = *(code **)(param_1 + 0x388);
if (pcVar1 != (code *)0x0) {
uVar3 = *(int8 *)(local_38 + 0x380);
plVar5 = &local_40;
goto LAB_001629e4;
}
lVar2 = (long)(int)(&DAT_004e6cf8)
[(ulong)*(uint *)(*(long *)(param_1 + 0x58) + 0x70 + lVar10) * 6];
if (lVar2 < 0) {
lVar2 = net_field_length(&local_40);
param_1 = local_38;
}
local_40 = local_40 + lVar2;
lVar4 = *(long *)(param_1 + 0x78);
if (*(long *)(lVar4 + -0x50 + lVar8) == 0) {
*(long *)(lVar4 + -0x50 + lVar8) = lVar4 + lVar8;
lVar4 = *(long *)(param_1 + 0x78);
}
*(long *)(lVar4 + lVar8) = lVar2;
**(long **)(*(long *)(param_1 + 0x78) + -0x50 + lVar8) = lVar2;
}
else {
if (*(long *)(lVar2 + -0x50 + lVar8) == 0) {
*(long *)(lVar2 + -0x50 + lVar8) = lVar2 + lVar8;
lVar2 = *(long *)(param_1 + 0x78);
}
if (*(long *)(lVar2 + -0x48 + lVar8) == 0) {
*(long *)(lVar2 + lVar8 + -0x48) = lVar2 + lVar8 + 0x17;
lVar2 = *(long *)(param_1 + 0x78);
}
**(int1 **)(lVar2 + -0x48 + lVar8) = 0;
(*(code *)(&mysql_ps_fetch_functions)
[(ulong)*(uint *)(*(long *)(param_1 + 0x58) + 0x70 + lVar10) * 3])
(*(long *)(param_1 + 0x78) + lVar8 + -0x50,*(long *)(param_1 + 0x58) + lVar10,
&local_40);
param_1 = local_38;
if (*(char *)(*(long *)(local_38 + 0x38) + 0x451) != '\0') {
local_48 = local_48 + **(char **)(*(long *)(local_38 + 0x78) + -0x38 + lVar8);
}
}
}
else {
pcVar1 = *(code **)(param_1 + 0x388);
if (pcVar1 == (code *)0x0) {
lVar2 = *(long *)(param_1 + 0x78);
if (*(long *)(lVar2 + -0x48 + lVar8) == 0) {
*(long *)(lVar2 + lVar8 + -0x48) = lVar2 + lVar8 + 0x17;
lVar2 = *(long *)(param_1 + 0x78);
}
**(int1 **)(lVar2 + -0x48 + lVar8) = 1;
*(int8 *)(*(long *)(param_1 + 0x78) + -0x30 + lVar8) = 0;
}
else {
uVar3 = *(int8 *)(local_38 + 0x380);
plVar5 = (long *)0x0;
LAB_001629e4:
(*pcVar1)(uVar3,uVar7 & 0xffffffff,plVar5);
param_1 = local_38;
}
}
bVar11 = (bVar9 & 0x7f) == 0;
bVar9 = bVar9 * '\x02';
if (bVar11) {
bVar9 = 1;
}
pbVar6 = pbVar6 + bVar11;
uVar7 = uVar7 + 1;
lVar8 = lVar8 + 0x70;
lVar10 = lVar10 + 0x80;
} while (uVar7 < *(uint *)(param_1 + 0x60));
uVar3 = 0x65;
if (local_48 == 0) {
uVar3 = 0;
}
}
return uVar3;
}
| |
28,070 | ma_pvio_write | eloqsql/libmariadb/libmariadb/ma_pvio.c | ssize_t ma_pvio_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length)
{
ssize_t r= 0;
if (!pvio)
return -1;
if (IS_PVIO_ASYNC_ACTIVE(pvio))
{
r=
#if defined(HAVE_TLS) && !defined(HAVE_SCHANNEL)
(pvio->ctls) ? ma_tls_write_async(pvio, buffer, length) :
#endif
ma_pvio_write_async(pvio, buffer, length);
goto end;
}
else
{
if (IS_PVIO_ASYNC(pvio))
{
/*
If switching from non-blocking to blocking API usage, set the socket
back to blocking mode.
*/
my_bool old_mode;
ma_pvio_blocking(pvio, TRUE, &old_mode);
}
}
/* secure connection */
#ifdef HAVE_TLS
if (pvio->ctls)
{
r= ma_pvio_tls_write(pvio->ctls, buffer, length);
goto end;
}
#endif
if (pvio->methods->write)
r= pvio->methods->write(pvio, buffer, length);
end:
if (pvio_callback)
{
void (*callback)(int mode, MYSQL *mysql, const uchar *buffer, size_t length);
LIST *p= pvio_callback;
while (p)
{
callback= p->data;
callback(1, pvio->mysql, buffer, r);
p= p->next;
}
}
if (r > 0)
pvio->bytes_sent+= r;
return r;
} | O0 | c | ma_pvio_write:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x236f0
movq $-0x1, -0x8(%rbp)
jmp 0x2389b
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x23787
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x480(%rax)
je 0x23787
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x23787
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movsbl 0x14(%rax), %eax
cmpl $0x0, %eax
je 0x23787
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x23765
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x37250
movq %rax, -0x48(%rbp)
jmp 0x2377a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x238b0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x23823
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x237cc
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x480(%rax)
je 0x237cc
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x237cc
movq -0x10(%rbp), %rdi
movl $0x1, %esi
leaq -0x29(%rbp), %rdx
callq 0x234d0
jmp 0x237ce
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x237f4
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x24190
movq %rax, -0x28(%rbp)
jmp 0x23823
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x23821
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq *%rax
movq %rax, -0x28(%rbp)
jmp 0x23823
leaq 0x3cbde(%rip), %rax # 0x60408
cmpq $0x0, (%rax)
je 0x2387c
leaq 0x3cbd1(%rip), %rax # 0x60408
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x2387a
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x1, %edi
callq *%rax
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x2383e
jmp 0x2387c
cmpq $0x0, -0x28(%rbp)
jle 0x23893
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x68(%rax), %rcx
movq %rcx, 0x68(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_pvio_write:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], 0
cmp [rbp+var_10], 0
jnz short loc_236F0
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_2389B
loc_236F0:
mov rax, [rbp+var_10]
cmp qword ptr [rax+40h], 0
jz loc_23787
mov rax, [rbp+var_10]
mov rax, [rax+40h]
cmp qword ptr [rax+480h], 0
jz short loc_23787
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_23787
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
mov rax, [rax+28h]
movsx eax, byte ptr [rax+14h]
cmp eax, 0
jz short loc_23787
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jz short loc_23765
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_tls_write_async
mov [rbp+var_48], rax
jmp short loc_2377A
loc_23765:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_pvio_write_async
mov [rbp+var_48], rax
loc_2377A:
mov rax, [rbp+var_48]
mov [rbp+var_28], rax
jmp loc_23823
loc_23787:
mov rax, [rbp+var_10]
cmp qword ptr [rax+40h], 0
jz short loc_237CC
mov rax, [rbp+var_10]
mov rax, [rax+40h]
cmp qword ptr [rax+480h], 0
jz short loc_237CC
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_237CC
mov rdi, [rbp+var_10]
mov esi, 1
lea rdx, [rbp+var_29]
call ma_pvio_blocking
loc_237CC:
jmp short $+2
loc_237CE:
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jz short loc_237F4
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_pvio_tls_write
mov [rbp+var_28], rax
jmp short loc_23823
loc_237F4:
mov rax, [rbp+var_10]
mov rax, [rax+48h]
cmp qword ptr [rax+20h], 0
jz short loc_23821
mov rax, [rbp+var_10]
mov rax, [rax+48h]
mov rax, [rax+20h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call rax
mov [rbp+var_28], rax
loc_23821:
jmp short $+2
loc_23823:
lea rax, pvio_callback
cmp qword ptr [rax], 0
jz short loc_2387C
lea rax, pvio_callback
mov rax, [rax]
mov [rbp+var_40], rax
loc_2383E:
cmp [rbp+var_40], 0
jz short loc_2387A
mov rax, [rbp+var_40]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
mov rsi, [rcx+40h]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_28]
mov edi, 1
call rax
mov rax, [rbp+var_40]
mov rax, [rax+8]
mov [rbp+var_40], rax
jmp short loc_2383E
loc_2387A:
jmp short $+2
loc_2387C:
cmp [rbp+var_28], 0
jle short loc_23893
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
add rcx, [rax+68h]
mov [rax+68h], rcx
loc_23893:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_2389B:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long ma_pvio_write(_QWORD *a1, long long a2, long long a3)
{
long long v4; // [rsp+8h] [rbp-48h]
long long i; // [rsp+10h] [rbp-40h]
char v6; // [rsp+27h] [rbp-29h] BYREF
long long v7; // [rsp+28h] [rbp-28h]
long long v8; // [rsp+30h] [rbp-20h]
long long v9; // [rsp+38h] [rbp-18h]
_QWORD *v10; // [rsp+40h] [rbp-10h]
v10 = a1;
v9 = a2;
v8 = a3;
v7 = 0LL;
if ( !a1 )
return -1LL;
if ( v10[8]
&& *(_QWORD *)(v10[8] + 1152LL)
&& *(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL)
&& *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL) + 20LL) )
{
if ( v10[7] )
v4 = ma_tls_write_async(v10, v9, v8);
else
v4 = ma_pvio_write_async(v10, v9, v8);
v7 = v4;
}
else
{
if ( v10[8] && *(_QWORD *)(v10[8] + 1152LL) && *(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL) )
ma_pvio_blocking((long long)v10, 1, (long long)&v6);
if ( v10[7] )
{
v7 = ma_pvio_tls_write(v10[7], v9, v8);
}
else if ( *(_QWORD *)(v10[9] + 32LL) )
{
v7 = (*(long long ( **)(_QWORD *, long long, long long))(v10[9] + 32LL))(v10, v9, v8);
}
}
if ( pvio_callback )
{
for ( i = pvio_callback; i; i = *(_QWORD *)(i + 8) )
(*(void ( **)(long long, _QWORD, long long, long long))(i + 16))(1LL, v10[8], v9, v7);
}
if ( v7 > 0 )
v10[13] += v7;
return v7;
}
| ma_pvio_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],0x0
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x001236f0
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x0012389b
LAB_001236f0:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x00123787
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x00123787
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x00123787
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOVSX EAX,byte ptr [RAX + 0x14]
CMP EAX,0x0
JZ 0x00123787
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x00123765
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00137250
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0012377a
LAB_00123765:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001238b0
MOV qword ptr [RBP + -0x48],RAX
LAB_0012377a:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00123823
LAB_00123787:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x001237cc
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x001237cc
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x001237cc
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
LEA RDX,[RBP + -0x29]
CALL 0x001234d0
LAB_001237cc:
JMP 0x001237ce
LAB_001237ce:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x001237f4
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00124190
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00123823
LAB_001237f4:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x00123821
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x20]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL RAX
MOV qword ptr [RBP + -0x28],RAX
LAB_00123821:
JMP 0x00123823
LAB_00123823:
LEA RAX,[0x160408]
CMP qword ptr [RAX],0x0
JZ 0x0012387c
LEA RAX,[0x160408]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
LAB_0012383e:
CMP qword ptr [RBP + -0x40],0x0
JZ 0x0012387a
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x40]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
MOV EDI,0x1
CALL RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0012383e
LAB_0012387a:
JMP 0x0012387c
LAB_0012387c:
CMP qword ptr [RBP + -0x28],0x0
JLE 0x00123893
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x68]
MOV qword ptr [RAX + 0x68],RCX
LAB_00123893:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_0012389b:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long ma_pvio_write(long param_1,int8 param_2,int8 param_3)
{
long local_50;
long local_48;
int1 local_31;
long local_30;
int8 local_28;
int8 local_20;
long local_18;
long local_10;
local_30 = 0;
if (param_1 == 0) {
local_10 = -1;
}
else {
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((((*(long *)(param_1 + 0x40) == 0) || (*(long *)(*(long *)(param_1 + 0x40) + 0x480) == 0))
|| (*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) == 0)) ||
(*(char *)(*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) + 0x14) == '\0')) {
if (((*(long *)(param_1 + 0x40) != 0) && (*(long *)(*(long *)(param_1 + 0x40) + 0x480) != 0))
&& (*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) != 0)) {
ma_pvio_blocking(param_1,1,&local_31);
}
if (*(long *)(local_18 + 0x38) == 0) {
if (*(long *)(*(long *)(local_18 + 0x48) + 0x20) != 0) {
local_30 = (**(code **)(*(long *)(local_18 + 0x48) + 0x20))(local_18,local_20,local_28);
}
}
else {
local_30 = ma_pvio_tls_write(*(int8 *)(local_18 + 0x38),local_20,local_28);
}
}
else {
if (*(long *)(param_1 + 0x38) == 0) {
local_50 = ma_pvio_write_async(param_1,param_2,param_3);
}
else {
local_50 = ma_tls_write_async(param_1,param_2,param_3);
}
local_30 = local_50;
}
if (pvio_callback != 0) {
for (local_48 = pvio_callback; local_48 != 0; local_48 = *(long *)(local_48 + 8)) {
(**(code **)(local_48 + 0x10))(1,*(int8 *)(local_18 + 0x40),local_20,local_30);
}
}
if (0 < local_30) {
*(long *)(local_18 + 0x68) = local_30 + *(long *)(local_18 + 0x68);
}
local_10 = local_30;
}
return local_10;
}
| |
28,071 | js_closure2 | bluesky950520[P]quickjs/quickjs.c | static JSValue js_closure2(JSContext *ctx, JSValue func_obj,
JSFunctionBytecode *b,
JSVarRef **cur_var_refs,
JSStackFrame *sf)
{
JSObject *p;
JSVarRef **var_refs;
int i;
p = JS_VALUE_GET_OBJ(func_obj);
p->u.func.function_bytecode = b;
p->u.func.home_object = NULL;
p->u.func.var_refs = NULL;
if (b->closure_var_count) {
var_refs = js_mallocz(ctx, sizeof(var_refs[0]) * b->closure_var_count);
if (!var_refs)
goto fail;
p->u.func.var_refs = var_refs;
for(i = 0; i < b->closure_var_count; i++) {
JSClosureVar *cv = &b->closure_var[i];
JSVarRef *var_ref;
if (cv->is_local) {
/* reuse the existing variable reference if it already exists */
var_ref = get_var_ref(ctx, sf, cv->var_idx, cv->is_arg);
if (!var_ref)
goto fail;
} else {
var_ref = cur_var_refs[cv->var_idx];
var_ref->header.ref_count++;
}
var_refs[i] = var_ref;
}
}
return func_obj;
fail:
/* bfunc is freed when func_obj is freed */
JS_FreeValue(ctx, func_obj);
return JS_EXCEPTION;
} | O2 | c | js_closure2:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rax
movq %rcx, 0x30(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rsi)
movslq 0x5c(%rcx), %rsi
testq %rsi, %rsi
je 0x38867
movq %r9, %r15
movq %r8, %r12
movq %rcx, %r13
movq %rdi, %rbp
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
shlq $0x3, %rsi
callq 0x166c5
testq %rax, %rax
je 0x38844
movq %rax, %rbx
movq 0x8(%rsp), %rax
addq $0x38, %rax
movq %rbx, (%rax)
xorl %r14d, %r14d
movslq 0x5c(%r13), %rax
cmpq %rax, %r14
jge 0x3885d
movq 0x38(%r13), %rax
movzbl (%rax,%r14,8), %ecx
movzwl 0x2(%rax,%r14,8), %edx
testb $0x1, %cl
jne 0x38826
movl %edx, %eax
movq (%r12,%rax,8), %rax
incl (%rax)
jmp 0x3883b
shrl %ecx
andl $0x1, %ecx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3708a
testq %rax, %rax
je 0x38844
movq %rax, (%rbx,%r14,8)
incq %r14
jmp 0x387ff
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x174a2
pushq $0x6
popq %rdx
xorl %eax, %eax
jmp 0x38867
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_closure2:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rax, rsi
mov [rsi+30h], rcx
xorps xmm0, xmm0
movups xmmword ptr [rsi+38h], xmm0
movsxd rsi, dword ptr [rcx+5Ch]
test rsi, rsi
jz loc_38867
mov r15, r9
mov r12, r8
mov r13, rcx
mov rbp, rdi
mov [rsp+48h+var_40], rax
mov [rsp+48h+var_38], rdx
shl rsi, 3
call js_mallocz
test rax, rax
jz short loc_38844
mov rbx, rax
mov rax, [rsp+48h+var_40]
add rax, 38h ; '8'
mov [rax], rbx
xor r14d, r14d
loc_387FF:
movsxd rax, dword ptr [r13+5Ch]
cmp r14, rax
jge short loc_3885D
mov rax, [r13+38h]
movzx ecx, byte ptr [rax+r14*8]
movzx edx, word ptr [rax+r14*8+2]
test cl, 1
jnz short loc_38826
mov eax, edx
mov rax, [r12+rax*8]
inc dword ptr [rax]
jmp short loc_3883B
loc_38826:
shr ecx, 1
and ecx, 1
mov rdi, rbp
mov rsi, r15
call get_var_ref
test rax, rax
jz short loc_38844
loc_3883B:
mov [rbx+r14*8], rax
inc r14
jmp short loc_387FF
loc_38844:
mov rdi, rbp
mov rsi, [rsp+48h+var_40]
mov rdx, [rsp+48h+var_38]
call JS_FreeValue
push 6
pop rdx
xor eax, eax
jmp short loc_38867
loc_3885D:
mov rdx, [rsp+48h+var_38]
mov rax, [rsp+48h+var_40]
loc_38867:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_closure2(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
long long result; // rax
long long v10; // rax
long long v11; // rbx
long long i; // r14
long long v13; // rax
unsigned int v14; // ecx
_DWORD *var_ref; // rax
result = a2;
*(_QWORD *)(a2 + 48) = a4;
*(_OWORD *)(a2 + 56) = 0LL;
if ( *(_DWORD *)(a4 + 92) )
{
v10 = js_mallocz(a1, 8LL * *(int *)(a4 + 92));
if ( v10 )
{
v11 = v10;
*(_QWORD *)(a2 + 56) = v10;
for ( i = 0LL; i < *(int *)(a4 + 92); ++i )
{
v13 = *(_QWORD *)(a4 + 56);
v14 = *(unsigned __int8 *)(v13 + 8 * i);
if ( (v14 & 1) != 0 )
{
var_ref = (_DWORD *)get_var_ref(a1, a6, *(unsigned __int16 *)(v13 + 8 * i + 2), (v14 >> 1) & 1);
if ( !var_ref )
goto LABEL_9;
}
else
{
var_ref = *(_DWORD **)(a5 + 8LL * *(unsigned __int16 *)(v13 + 8 * i + 2));
++*var_ref;
}
*(_QWORD *)(v11 + 8 * i) = var_ref;
}
return a2;
}
else
{
LABEL_9:
JS_FreeValue(a1, a2, a3);
return 0LL;
}
}
return result;
}
| js_closure2:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RAX,RSI
MOV qword ptr [RSI + 0x30],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x38],XMM0
MOVSXD RSI,dword ptr [RCX + 0x5c]
TEST RSI,RSI
JZ 0x00138867
MOV R15,R9
MOV R12,R8
MOV R13,RCX
MOV RBP,RDI
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
SHL RSI,0x3
CALL 0x001166c5
TEST RAX,RAX
JZ 0x00138844
MOV RBX,RAX
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x38
MOV qword ptr [RAX],RBX
XOR R14D,R14D
LAB_001387ff:
MOVSXD RAX,dword ptr [R13 + 0x5c]
CMP R14,RAX
JGE 0x0013885d
MOV RAX,qword ptr [R13 + 0x38]
MOVZX ECX,byte ptr [RAX + R14*0x8]
MOVZX EDX,word ptr [RAX + R14*0x8 + 0x2]
TEST CL,0x1
JNZ 0x00138826
MOV EAX,EDX
MOV RAX,qword ptr [R12 + RAX*0x8]
INC dword ptr [RAX]
JMP 0x0013883b
LAB_00138826:
SHR ECX,0x1
AND ECX,0x1
MOV RDI,RBP
MOV RSI,R15
CALL 0x0013708a
TEST RAX,RAX
JZ 0x00138844
LAB_0013883b:
MOV qword ptr [RBX + R14*0x8],RAX
INC R14
JMP 0x001387ff
LAB_00138844:
MOV RDI,RBP
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x001174a2
PUSH 0x6
POP RDX
XOR EAX,EAX
JMP 0x00138867
LAB_0013885d:
MOV RDX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
LAB_00138867:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_closure2(int8 param_1,long param_2,int8 param_3,long param_4,long param_5,
int8 param_6)
{
byte bVar1;
long lVar2;
int *piVar3;
ulong uVar4;
long lVar5;
int1 auVar6 [16];
*(long *)(param_2 + 0x30) = param_4;
*(int8 *)(param_2 + 0x38) = 0;
*(int8 *)(param_2 + 0x40) = 0;
if ((long)*(int *)(param_4 + 0x5c) != 0) {
lVar2 = js_mallocz(param_1,(long)*(int *)(param_4 + 0x5c) << 3);
if (lVar2 == 0) {
LAB_00138844:
JS_FreeValue(param_1,param_2,param_3);
param_3 = 6;
param_2 = 0;
}
else {
*(long *)(param_2 + 0x38) = lVar2;
for (lVar5 = 0; lVar5 < *(int *)(param_4 + 0x5c); lVar5 = lVar5 + 1) {
bVar1 = *(byte *)(*(long *)(param_4 + 0x38) + lVar5 * 8);
uVar4 = (ulong)*(ushort *)(*(long *)(param_4 + 0x38) + 2 + lVar5 * 8);
if ((bVar1 & 1) == 0) {
piVar3 = *(int **)(param_5 + uVar4 * 8);
*piVar3 = *piVar3 + 1;
}
else {
piVar3 = (int *)get_var_ref(param_1,param_6,uVar4,bVar1 >> 1 & 1);
if (piVar3 == (int *)0x0) goto LAB_00138844;
}
*(int **)(lVar2 + lVar5 * 8) = piVar3;
}
}
}
auVar6._8_8_ = param_3;
auVar6._0_8_ = param_2;
return auVar6;
}
| |
28,072 | js_closure2 | bluesky950520[P]quickjs/quickjs.c | static JSValue js_closure2(JSContext *ctx, JSValue func_obj,
JSFunctionBytecode *b,
JSVarRef **cur_var_refs,
JSStackFrame *sf)
{
JSObject *p;
JSVarRef **var_refs;
int i;
p = JS_VALUE_GET_OBJ(func_obj);
p->u.func.function_bytecode = b;
p->u.func.home_object = NULL;
p->u.func.var_refs = NULL;
if (b->closure_var_count) {
var_refs = js_mallocz(ctx, sizeof(var_refs[0]) * b->closure_var_count);
if (!var_refs)
goto fail;
p->u.func.var_refs = var_refs;
for(i = 0; i < b->closure_var_count; i++) {
JSClosureVar *cv = &b->closure_var[i];
JSVarRef *var_ref;
if (cv->is_local) {
/* reuse the existing variable reference if it already exists */
var_ref = get_var_ref(ctx, sf, cv->var_idx, cv->is_arg);
if (!var_ref)
goto fail;
} else {
var_ref = cur_var_refs[cv->var_idx];
var_ref->header.ref_count++;
}
var_refs[i] = var_ref;
}
}
return func_obj;
fail:
/* bfunc is freed when func_obj is freed */
JS_FreeValue(ctx, func_obj);
return JS_EXCEPTION;
} | O3 | c | js_closure2:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rcx, 0x30(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rsi)
movslq 0x5c(%rcx), %rsi
testq %rsi, %rsi
jne 0x421ec
movq %rdx, %r12
movq %rbx, %rax
movq %r12, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r8, %r13
movq %rcx, %rbp
movq %rdi, %r14
movq %rdx, 0x8(%rsp)
movq %r9, 0x10(%rsp)
shlq $0x3, %rsi
callq 0xedb6
testq %rax, %rax
je 0x4227c
movq %rax, %rsi
leaq 0x38(%rbx), %rax
movq %rsi, (%rax)
cmpl $0x0, 0x5c(%rbp)
jle 0x42272
xorl %r12d, %r12d
movq 0x38(%rbp), %rax
movzbl (%rax,%r12,8), %ecx
movzwl 0x2(%rax,%r12,8), %edx
testb $0x1, %cl
jne 0x4223f
movl %edx, %eax
movq (%r13,%rax,8), %rax
incl (%rax)
jmp 0x42262
shrl %ecx
andl $0x1, %ecx
movq %r14, %rdi
movq %r13, %r15
movq %rsi, %r13
movq 0x10(%rsp), %rsi
callq 0x40560
movq %r13, %rsi
movq %r15, %r13
testq %rax, %rax
je 0x4227c
movq %rax, (%rsi,%r12,8)
incq %r12
movslq 0x5c(%rbp), %rax
cmpq %rax, %r12
jl 0x42220
movq 0x8(%rsp), %r12
jmp 0x421d7
movl $0x6, %r12d
movq 0x8(%rsp), %rdx
cmpl $-0x9, %edx
jb 0x422a4
movq 0x18(%r14), %rdi
movl (%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rbx)
cmpl $0x1, %eax
jg 0x422a4
movq %rbx, %rsi
callq 0x20d90
xorl %ebx, %ebx
jmp 0x421d7
| js_closure2:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rsi
mov [rsi+30h], rcx
xorps xmm0, xmm0
movups xmmword ptr [rsi+38h], xmm0
movsxd rsi, dword ptr [rcx+5Ch]
test rsi, rsi
jnz short loc_421EC
mov r12, rdx
loc_421D7:
mov rax, rbx
mov rdx, r12
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_421EC:
mov r13, r8
mov rbp, rcx
mov r14, rdi
mov [rsp+48h+var_40], rdx
mov [rsp+48h+var_38], r9
shl rsi, 3
call js_mallocz
test rax, rax
jz short loc_4227C
mov rsi, rax
lea rax, [rbx+38h]
mov [rax], rsi
cmp dword ptr [rbp+5Ch], 0
jle short loc_42272
xor r12d, r12d
loc_42220:
mov rax, [rbp+38h]
movzx ecx, byte ptr [rax+r12*8]
movzx edx, word ptr [rax+r12*8+2]
test cl, 1
jnz short loc_4223F
mov eax, edx
mov rax, [r13+rax*8+0]
inc dword ptr [rax]
jmp short loc_42262
loc_4223F:
shr ecx, 1
and ecx, 1
mov rdi, r14
mov r15, r13
mov r13, rsi
mov rsi, [rsp+48h+var_38]
call get_var_ref
mov rsi, r13
mov r13, r15
test rax, rax
jz short loc_4227C
loc_42262:
mov [rsi+r12*8], rax
inc r12
movsxd rax, dword ptr [rbp+5Ch]
cmp r12, rax
jl short loc_42220
loc_42272:
mov r12, [rsp+48h+var_40]
jmp loc_421D7
loc_4227C:
mov r12d, 6
mov rdx, [rsp+48h+var_40]
cmp edx, 0FFFFFFF7h
jb short loc_422A4
mov rdi, [r14+18h]
mov eax, [rbx]
lea ecx, [rax-1]
mov [rbx], ecx
cmp eax, 1
jg short loc_422A4
mov rsi, rbx
call js_free_value_rt
loc_422A4:
xor ebx, ebx
jmp loc_421D7
| _QWORD * js_closure2(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
_QWORD *v6; // rbx
long long v10; // rax
long long v11; // r8
long long v12; // r9
long long v13; // rsi
long long v14; // r12
long long v15; // rax
unsigned int v16; // ecx
_DWORD *var_ref; // rax
long long v18; // rdi
int v19; // eax
long long v20; // rcx
v6 = (_QWORD *)a2;
*(_QWORD *)(a2 + 48) = a4;
*(_OWORD *)(a2 + 56) = 0LL;
if ( *(_DWORD *)(a4 + 92) )
{
v10 = js_mallocz(a1, 8LL * *(int *)(a4 + 92));
if ( v10 )
{
v13 = v10;
v6[7] = v10;
if ( *(int *)(a4 + 92) > 0 )
{
v14 = 0LL;
do
{
v15 = *(_QWORD *)(a4 + 56);
v16 = *(unsigned __int8 *)(v15 + 8 * v14);
if ( (v16 & 1) != 0 )
{
var_ref = (_DWORD *)get_var_ref(a1, a6, *(unsigned __int16 *)(v15 + 8 * v14 + 2), (v16 >> 1) & 1);
if ( !var_ref )
goto LABEL_11;
}
else
{
var_ref = *(_DWORD **)(a5 + 8LL * *(unsigned __int16 *)(v15 + 8 * v14 + 2));
++*var_ref;
}
*(_QWORD *)(v13 + 8 * v14++) = var_ref;
}
while ( v14 < *(int *)(a4 + 92) );
}
}
else
{
LABEL_11:
if ( (unsigned int)a3 >= 0xFFFFFFF7 )
{
v18 = *(_QWORD *)(a1 + 24);
v19 = *(_DWORD *)v6;
v20 = (unsigned int)(*(_DWORD *)v6 - 1);
*(_DWORD *)v6 = v20;
if ( v19 <= 1 )
js_free_value_rt(v18, v6, a3, v20, v11, v12);
}
return 0LL;
}
}
return v6;
}
| js_closure2:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV qword ptr [RSI + 0x30],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x38],XMM0
MOVSXD RSI,dword ptr [RCX + 0x5c]
TEST RSI,RSI
JNZ 0x001421ec
MOV R12,RDX
LAB_001421d7:
MOV RAX,RBX
MOV RDX,R12
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001421ec:
MOV R13,R8
MOV RBP,RCX
MOV R14,RDI
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP + 0x10],R9
SHL RSI,0x3
CALL 0x0010edb6
TEST RAX,RAX
JZ 0x0014227c
MOV RSI,RAX
LEA RAX,[RBX + 0x38]
MOV qword ptr [RAX],RSI
CMP dword ptr [RBP + 0x5c],0x0
JLE 0x00142272
XOR R12D,R12D
LAB_00142220:
MOV RAX,qword ptr [RBP + 0x38]
MOVZX ECX,byte ptr [RAX + R12*0x8]
MOVZX EDX,word ptr [RAX + R12*0x8 + 0x2]
TEST CL,0x1
JNZ 0x0014223f
MOV EAX,EDX
MOV RAX,qword ptr [R13 + RAX*0x8]
INC dword ptr [RAX]
JMP 0x00142262
LAB_0014223f:
SHR ECX,0x1
AND ECX,0x1
MOV RDI,R14
MOV R15,R13
MOV R13,RSI
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00140560
MOV RSI,R13
MOV R13,R15
TEST RAX,RAX
JZ 0x0014227c
LAB_00142262:
MOV qword ptr [RSI + R12*0x8],RAX
INC R12
MOVSXD RAX,dword ptr [RBP + 0x5c]
CMP R12,RAX
JL 0x00142220
LAB_00142272:
MOV R12,qword ptr [RSP + 0x8]
JMP 0x001421d7
LAB_0014227c:
MOV R12D,0x6
MOV RDX,qword ptr [RSP + 0x8]
CMP EDX,-0x9
JC 0x001422a4
MOV RDI,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [RBX]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RBX],ECX
CMP EAX,0x1
JG 0x001422a4
MOV RSI,RBX
CALL 0x00120d90
LAB_001422a4:
XOR EBX,EBX
JMP 0x001421d7
|
int1 [16]
js_closure2(long param_1,int *param_2,int8 param_3,long param_4,long param_5,
int8 param_6)
{
byte bVar1;
int iVar2;
int8 uVar3;
long lVar4;
int *piVar5;
ulong uVar6;
long lVar7;
int1 auVar8 [16];
*(long *)(param_2 + 0xc) = param_4;
param_2[0xe] = 0;
param_2[0xf] = 0;
param_2[0x10] = 0;
param_2[0x11] = 0;
if ((long)*(int *)(param_4 + 0x5c) != 0) {
lVar4 = js_mallocz(param_1,(long)*(int *)(param_4 + 0x5c) << 3);
if (lVar4 == 0) {
LAB_0014227c:
if (0xfffffff6 < (uint)param_3) {
uVar3 = *(int8 *)(param_1 + 0x18);
iVar2 = *param_2;
*param_2 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar3,param_2);
}
}
param_2 = (int *)0x0;
param_3 = 6;
}
else {
*(long *)(param_2 + 0xe) = lVar4;
if (0 < *(int *)(param_4 + 0x5c)) {
lVar7 = 0;
do {
bVar1 = *(byte *)(*(long *)(param_4 + 0x38) + lVar7 * 8);
uVar6 = (ulong)*(ushort *)(*(long *)(param_4 + 0x38) + 2 + lVar7 * 8);
if ((bVar1 & 1) == 0) {
piVar5 = *(int **)(param_5 + uVar6 * 8);
*piVar5 = *piVar5 + 1;
}
else {
piVar5 = (int *)get_var_ref(param_1,param_6,uVar6,bVar1 >> 1 & 1);
if (piVar5 == (int *)0x0) goto LAB_0014227c;
}
*(int **)(lVar4 + lVar7 * 8) = piVar5;
lVar7 = lVar7 + 1;
} while (lVar7 < *(int *)(param_4 + 0x5c));
}
}
}
auVar8._8_8_ = param_3;
auVar8._0_8_ = param_2;
return auVar8;
}
| |
28,073 | printUsage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | kvthweatt[P]FluxLang/src/main.cpp | void printUsage(const std::string& program_name) {
std::cout << "Usage: " << program_name << " [options] <flux_file>" << std::endl;
std::cout << "Options:" << std::endl;
std::cout << " --l Lex only (tokenize the input file)" << std::endl;
std::cout << " --p Parse only (create AST but don't execute)" << std::endl;
std::cout << " -e \"<flux_code>\" Execute code directly from command line" << std::endl;
std::cout << " -h, --help Display this help message" << std::endl;
} | O1 | cpp | printUsage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x341ee(%rip), %rbx # 0x3afb8
leaq 0x24233(%rip), %rsi # 0x2b004
movl $0x7, %edx
movq %rbx, %rdi
callq 0x62c0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x62c0
movq %rax, %r14
leaq 0x24215(%rip), %rsi # 0x2b00c
movl $0x16, %edx
movq %rax, %rdi
callq 0x62c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x6250
movsbl %al, %esi
movq %r14, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61a0
leaq 0x241f1(%rip), %rsi # 0x2b023
movl $0x8, %edx
movq %rbx, %rdi
callq 0x62c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x6250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61a0
leaq 0x241bf(%rip), %rsi # 0x2b02c
movl $0x34, %edx
movq %rbx, %rdi
callq 0x62c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x6250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61a0
leaq 0x241b9(%rip), %rsi # 0x2b061
movl $0x3b, %edx
movq %rbx, %rdi
callq 0x62c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x6250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61a0
leaq 0x241ba(%rip), %rsi # 0x2b09d
movl $0x3a, %edx
movq %rbx, %rdi
callq 0x62c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x6250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61a0
leaq 0x241ba(%rip), %rsi # 0x2b0d8
movl $0x2b, %edx
movq %rbx, %rdi
callq 0x62c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x6250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x61a0
| _Z10printUsageRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
push rax
mov r14, rdi
mov rbx, cs:_ZSt4cout_ptr
lea rsi, aUsage; "Usage: "
mov edx, 7
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r14, rax
lea rsi, aOptionsFluxFil; " [options] <flux_file>"
mov edx, 16h
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [r14]
mov rdi, [rax-18h]
add rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r14; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rsi, aOptions; "Options:"
mov edx, 8
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rsi, aLLexOnlyTokeni; " --l Lex only (tokenize th"...
mov edx, 34h ; '4'
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rsi, aPParseOnlyCrea; " --p Parse only (create AS"...
mov edx, 3Bh ; ';'
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rsi, aEFluxCodeExecu; " -e \"<flux_code>\" Execute code direc"...
mov edx, 3Ah ; ':'
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rsi, aHHelpDisplayTh; " -h, --help Display this help mes"...
mov edx, 2Bh ; '+'
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
add rsp, 8
pop rbx
pop r14
jmp __ZNSo5flushEv; std::ostream::flush(void)
| long long printUsage(_QWORD *a1)
{
std::ostream *v1; // r14
char v2; // al
std::ostream *v3; // rax
char v4; // al
std::ostream *v5; // rax
char v6; // al
std::ostream *v7; // rax
char v8; // al
std::ostream *v9; // rax
char v10; // al
std::ostream *v11; // rax
char v12; // al
std::ostream *v13; // rax
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Usage: ", 7LL);
v1 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(&std::cout, *a1, a1[1]);
std::__ostream_insert<char,std::char_traits<char>>(v1, " [options] <flux_file>", 22LL);
v2 = std::ios::widen((char *)v1 + *(_QWORD *)(*(_QWORD *)v1 - 24LL), 10LL);
v3 = (std::ostream *)std::ostream::put(v1, v2);
std::ostream::flush(v3);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Options:", 8LL);
v4 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL);
v5 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v4);
std::ostream::flush(v5);
std::__ostream_insert<char,std::char_traits<char>>(
&std::cout,
" --l Lex only (tokenize the input file)",
52LL);
v6 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL);
v7 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v6);
std::ostream::flush(v7);
std::__ostream_insert<char,std::char_traits<char>>(
&std::cout,
" --p Parse only (create AST but don't execute)",
59LL);
v8 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL);
v9 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v8);
std::ostream::flush(v9);
std::__ostream_insert<char,std::char_traits<char>>(
&std::cout,
" -e \"<flux_code>\" Execute code directly from command line",
58LL);
v10 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL);
v11 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v10);
std::ostream::flush(v11);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, " -h, --help Display this help message", 43LL);
v12 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL);
v13 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v12);
return std::ostream::flush(v13);
}
| printUsage:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV RBX,qword ptr [0x0013afb8]
LEA RSI,[0x12b004]
MOV EDX,0x7
MOV RDI,RBX
CALL 0x001062c0
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001062c0
MOV R14,RAX
LEA RSI,[0x12b00c]
MOV EDX,0x16
MOV RDI,RAX
CALL 0x001062c0
MOV RAX,qword ptr [R14]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R14
MOV ESI,0xa
CALL 0x00106250
MOVSX ESI,AL
MOV RDI,R14
CALL 0x00106030
MOV RDI,RAX
CALL 0x001061a0
LEA RSI,[0x12b023]
MOV EDX,0x8
MOV RDI,RBX
CALL 0x001062c0
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00106250
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00106030
MOV RDI,RAX
CALL 0x001061a0
LEA RSI,[0x12b02c]
MOV EDX,0x34
MOV RDI,RBX
CALL 0x001062c0
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00106250
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00106030
MOV RDI,RAX
CALL 0x001061a0
LEA RSI,[0x12b061]
MOV EDX,0x3b
MOV RDI,RBX
CALL 0x001062c0
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00106250
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00106030
MOV RDI,RAX
CALL 0x001061a0
LEA RSI,[0x12b09d]
MOV EDX,0x3a
MOV RDI,RBX
CALL 0x001062c0
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00106250
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00106030
MOV RDI,RAX
CALL 0x001061a0
LEA RSI,[0x12b0d8]
MOV EDX,0x2b
MOV RDI,RBX
CALL 0x001062c0
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00106250
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00106030
MOV RDI,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x001061a0
|
/* printUsage(std::__cxx11::string const&) */
void printUsage(string *param_1)
{
char cVar1;
int *puVar2;
ostream *poVar3;
puVar2 = PTR_cout_0013afb8;
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cout_0013afb8,"Usage: ",7);
poVar3 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)puVar2,*(char **)param_1,*(long *)(param_1 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar3," [options] <flux_file>",0x16);
std::ios::widen((char)*(int8 *)(*(long *)poVar3 + -0x18) + (char)poVar3);
std::ostream::put((char)poVar3);
std::ostream::flush();
std::__ostream_insert<char,std::char_traits<char>>((ostream *)puVar2,"Options:",8);
cVar1 = (char)puVar2;
std::ios::widen((char)*(int8 *)(*(long *)puVar2 + -0x18) + cVar1);
std::ostream::put(cVar1);
std::ostream::flush();
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)puVar2," --l Lex only (tokenize the input file)",0x34);
std::ios::widen((char)*(int8 *)(*(long *)puVar2 + -0x18) + cVar1);
std::ostream::put(cVar1);
std::ostream::flush();
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)puVar2," --p Parse only (create AST but don\'t execute)",0x3b);
std::ios::widen((char)*(int8 *)(*(long *)puVar2 + -0x18) + cVar1);
std::ostream::put(cVar1);
std::ostream::flush();
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)puVar2," -e \"<flux_code>\" Execute code directly from command line",0x3a);
std::ios::widen((char)*(int8 *)(*(long *)puVar2 + -0x18) + cVar1);
std::ostream::put(cVar1);
std::ostream::flush();
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)puVar2," -h, --help Display this help message",0x2b);
std::ios::widen((char)*(int8 *)(*(long *)puVar2 + -0x18) + cVar1);
std::ostream::put(cVar1);
std::ostream::flush();
return;
}
| |
28,074 | maria_page_crc_set_index | eloqsql/storage/maria/ma_pagecrc.c | my_bool maria_page_crc_set_index(PAGECACHE_IO_HOOK_ARGS *args)
{
uchar *page= args->page;
pgcache_page_no_t page_no= args->pageno;
MARIA_SHARE *share= (MARIA_SHARE *)args->data;
int data_length= _ma_get_page_used(share, page);
uint32 crc= maria_page_crc((uint32) page_no, page, data_length);
DBUG_ENTER("maria_page_crc_set_index");
DBUG_PRINT("info", ("Page %lu crc: %lu",
(ulong) page_no, (ulong) crc));
DBUG_ASSERT((uint)data_length <= share->block_size - CRC_SIZE);
/* crc is on the stack so it is aligned, pagecache buffer is aligned, too */
int4store_aligned(page + share->block_size - CRC_SIZE, crc);
DBUG_RETURN(0);
} | O0 | c | maria_page_crc_set_index:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movl 0x744(%rcx), %ecx
movzbl -0x1(%rax,%rcx), %eax
movzwl %ax, %eax
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rdx
movl 0x744(%rdx), %edx
movzbl -0x2(%rcx,%rdx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl %eax, %edi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x9f320
movl %eax, -0x28(%rbp)
jmp 0x9f45d
jmp 0x9f45f
jmp 0x9f461
jmp 0x9f463
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movl 0x7bc(%rcx), %ecx
addq %rcx, %rax
addq $-0x4, %rax
movq %rax, -0x30(%rbp)
movl -0x28(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
jmp 0x9f487
jmp 0x9f489
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| maria_page_crc_set_index:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rcx, [rbp+var_20]
mov ecx, [rcx+744h]
movzx eax, byte ptr [rax+rcx-1]
movzx eax, ax
mov rcx, [rbp+var_10]
mov rdx, [rbp+var_20]
mov edx, [rdx+744h]
movzx ecx, byte ptr [rcx+rdx-2]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_24], eax
mov rax, [rbp+var_18]
mov edi, eax
mov rsi, [rbp+var_10]
mov edx, [rbp+var_24]
call maria_page_crc
mov [rbp+var_28], eax
jmp short $+2
loc_9F45D:
jmp short $+2
loc_9F45F:
jmp short $+2
loc_9F461:
jmp short $+2
loc_9F463:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_20]
mov ecx, [rcx+7BCh]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_30], rax
mov ecx, [rbp+var_28]
mov rax, [rbp+var_30]
mov [rax], ecx
jmp short $+2
loc_9F487:
jmp short $+2
loc_9F489:
xor eax, eax
add rsp, 30h
pop rbp
retn
| long long maria_page_crc_set_index(long long *a1)
{
long long v2; // [rsp+10h] [rbp-20h]
long long v3; // [rsp+20h] [rbp-10h]
v3 = *a1;
v2 = a1[2];
*(_DWORD *)(*(unsigned int *)(v2 + 1980) + v3 - 4) = maria_page_crc(
a1[1],
*a1,
_byteswap_ushort(*(_WORD *)(*a1
+ *(unsigned int *)(v2 + 1860)
- 2)));
return 0LL;
}
| maria_page_crc_set_index:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x744]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + -0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RDX + 0x744]
MOVZX ECX,byte ptr [RCX + RDX*0x1 + -0x2]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x24]
CALL 0x0019f320
MOV dword ptr [RBP + -0x28],EAX
JMP 0x0019f45d
LAB_0019f45d:
JMP 0x0019f45f
LAB_0019f45f:
JMP 0x0019f461
LAB_0019f461:
JMP 0x0019f463
LAB_0019f463:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x7bc]
ADD RAX,RCX
ADD RAX,-0x4
MOV qword ptr [RBP + -0x30],RAX
MOV ECX,dword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
JMP 0x0019f487
LAB_0019f487:
JMP 0x0019f489
LAB_0019f489:
XOR EAX,EAX
ADD RSP,0x30
POP RBP
RET
|
int8 maria_page_crc_set_index(long *param_1)
{
long lVar1;
long lVar2;
int4 uVar3;
lVar1 = *param_1;
lVar2 = param_1[2];
uVar3 = maria_page_crc(param_1[1] & 0xffffffff,lVar1,
CONCAT11(*(int1 *)(lVar1 + -2 + (ulong)*(uint *)(lVar2 + 0x744)),
*(int1 *)(lVar1 + -1 + (ulong)*(uint *)(lVar2 + 0x744))));
*(int4 *)(lVar1 + (ulong)*(uint *)(lVar2 + 0x7bc) + -4) = uVar3;
return 0;
}
| |
28,075 | minja::Value::at(minja::Value const&) | monkey531[P]llama/common/minja.hpp | Value& at(const Value & index) {
if (!index.is_hashable()) throw std::runtime_error("Unashable type: " + dump());
if (is_array()) return array_->at(index.get<int>());
if (is_object()) return object_->at(index.primitive_);
throw std::runtime_error("Value is not an array or object: " + dump());
} | O3 | cpp | minja::Value::at(minja::Value const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rsi)
jne 0x57af5
cmpq $0x0, 0x20(%rsi)
jne 0x57af5
cmpq $0x0, 0x30(%rsi)
jne 0x57af5
movq 0x10(%r14), %rbx
testq %rbx, %rbx
je 0x57adb
movq %rsi, %rdi
callq 0x550b4
movslq %eax, %rsi
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0x57b52
leaq (%rsi,%rsi,4), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x57b60
addq $0x40, %rsi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x59014
movl $0x10, %edi
callq 0x18380
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x40f28
leaq 0x572e3(%rip), %rsi # 0xaedfe
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x282b5
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x18b00
xorl %ebp, %ebp
movq 0x894af(%rip), %rsi # 0xe0ff0
movq 0x89428(%rip), %rdx # 0xe0f70
movq %rbx, %rdi
callq 0x18bb0
jmp 0x57bbb
leaq 0x57413(%rip), %rdi # 0xaef6c
xorl %eax, %eax
callq 0x18a50
movl $0x10, %edi
callq 0x18380
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x40f28
leaq 0x573c4(%rip), %rsi # 0xaef4a
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x282b5
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x18b00
xorl %ebp, %ebp
movq 0x89444(%rip), %rsi # 0xe0ff0
movq 0x893bd(%rip), %rdx # 0xe0f70
movq %rbx, %rdi
callq 0x18bb0
jmp 0x57bc1
jmp 0x57c01
jmp 0x57c21
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x57bdf
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186e0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x57bfa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186e0
testb %bpl, %bpl
jne 0x57c24
jmp 0x57c2c
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x57c24
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186e0
jmp 0x57c24
movq %rax, %r14
movq %rbx, %rdi
callq 0x18520
movq %r14, %rdi
callq 0x18c10
| _ZN5minja5Value2atERKS0_:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
cmp qword ptr [rsi+10h], 0
jnz short loc_57AF5
cmp qword ptr [rsi+20h], 0
jnz short loc_57AF5
cmp qword ptr [rsi+30h], 0
jnz short loc_57AF5
mov rbx, [r14+10h]
test rbx, rbx
jz short loc_57ADB
mov rdi, rsi
call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void)
movsxd rsi, eax
mov rax, [rbx]
mov rcx, [rbx+8]
sub rcx, rax
sar rcx, 4
mov rdx, 0CCCCCCCCCCCCCCCDh
imul rdx, rcx
cmp rdx, rsi
jbe loc_57B52
lea rcx, [rsi+rsi*4]
shl rcx, 4
add rax, rcx
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_57ADB:
mov rdi, [r14+20h]
test rdi, rdi
jz short loc_57B60
add rsi, 40h ; '@'
add rsp, 40h
pop rbx
pop r14
pop rbp
jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::at(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&)
loc_57AF5:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable 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:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_57BBB
loc_57B52:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
loc_57B60:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
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:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_57BBB:
jmp short loc_57BC1
jmp short loc_57C01
jmp short loc_57C21
loc_57BC1:
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_57BDF
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_57BDF:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_57BFA
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_57BFA:
test bpl, bpl
jnz short loc_57C24
jmp short loc_57C2C
loc_57C01:
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_57C24
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_57C24
loc_57C21:
mov r14, rax
loc_57C24:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_57C2C:
mov rdi, r14
call __Unwind_Resume
| unsigned long long minja::Value::at(minja::Value *this, const minja::Value *a2)
{
_QWORD *v3; // rbx
unsigned long long v4; // rsi
unsigned long long v5; // rdx
long long v7; // rdi
void *exception; // rbx
void *v9; // rbx
_BYTE v10[16]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v11[16]; // [rsp+20h] [rbp-38h] BYREF
if ( *((_QWORD *)a2 + 2) || *((_QWORD *)a2 + 4) || *((_QWORD *)a2 + 6) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v11, (long long)"Unashable type: ", (long long)v10);
std::runtime_error::runtime_error(exception, v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = (_QWORD *)*((_QWORD *)this + 2);
if ( v3 )
{
v4 = (int)minja::Value::get<int>(a2);
v5 = 0xCCCCCCCCCCCCCCCDLL * ((long long)(v3[1] - *v3) >> 4);
if ( v5 <= v4 )
std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", v4, v5);
return 80 * v4 + *v3;
}
else
{
v7 = *((_QWORD *)this + 4);
if ( !v7 )
{
v9 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v11, (long long)"Value is not an array or object: ", (long long)v10);
std::runtime_error::runtime_error(v9, v11);
__cxa_throw(
v9,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::at(
v7,
(char *)a2 + 64);
}
}
| at:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP qword ptr [RSI + 0x10],0x0
JNZ 0x00157af5
CMP qword ptr [RSI + 0x20],0x0
JNZ 0x00157af5
CMP qword ptr [RSI + 0x30],0x0
JNZ 0x00157af5
MOV RBX,qword ptr [R14 + 0x10]
TEST RBX,RBX
JZ 0x00157adb
MOV RDI,RSI
CALL 0x001550b4
MOVSXD RSI,EAX
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
SUB RCX,RAX
SAR RCX,0x4
MOV RDX,-0x3333333333333333
IMUL RDX,RCX
CMP RDX,RSI
JBE 0x00157b52
LEA RCX,[RSI + RSI*0x4]
SHL RCX,0x4
ADD RAX,RCX
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_00157adb:
MOV RDI,qword ptr [R14 + 0x20]
TEST RDI,RDI
JZ 0x00157b60
ADD RSI,0x40
ADD RSP,0x40
POP RBX
POP R14
POP RBP
JMP 0x00159014
LAB_00157af5:
MOV EDI,0x10
CALL 0x00118380
MOV RBX,RAX
LAB_00157b02:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00140f28
LAB_00157b14:
LEA RSI,[0x1aedfe]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001282b5
MOV BPL,0x1
LAB_00157b2b:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00118b00
XOR EBP,EBP
MOV RSI,qword ptr [0x001e0ff0]
MOV RDX,qword ptr [0x001e0f70]
MOV RDI,RBX
CALL 0x00118bb0
LAB_00157b52:
LEA RDI,[0x1aef6c]
XOR EAX,EAX
CALL 0x00118a50
LAB_00157b60:
MOV EDI,0x10
CALL 0x00118380
MOV RBX,RAX
LAB_00157b6d:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00140f28
LAB_00157b7f:
LEA RSI,[0x1aef4a]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001282b5
MOV BPL,0x1
LAB_00157b96:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00118b00
XOR EBP,EBP
MOV RSI,qword ptr [0x001e0ff0]
MOV RDX,qword ptr [0x001e0f70]
MOV RDI,RBX
CALL 0x00118bb0
|
/* minja::Value::at(minja::Value const&) */
long __thiscall minja::Value::at(Value *this,Value *param_1)
{
long *plVar1;
int iVar2;
long lVar3;
runtime_error *prVar4;
ulong uVar5;
ulong uVar6;
int1 auStack_58 [32];
string local_38 [32];
if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) &&
(*(long *)(param_1 + 0x30) == 0)) {
plVar1 = *(long **)(this + 0x10);
if (plVar1 == (long *)0x0) {
if (*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(this + 0x20) !=
(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)0x0) {
lVar3 = nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::at(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(this + 0x20),(basic_json *)(param_1 + 0x40));
return lVar3;
}
}
else {
iVar2 = get<int>(param_1);
uVar6 = (ulong)iVar2;
uVar5 = (plVar1[1] - *plVar1 >> 4) * -0x3333333333333333;
if (uVar6 <= uVar5 && uVar5 - uVar6 != 0) {
return *plVar1 + uVar6 * 0x50;
}
std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)");
}
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00157b6d to 00157b7e has its CatchHandler @ 00157bbf */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 00157b7f to 00157b92 has its CatchHandler @ 00157bbd */
std::operator+((char *)local_38,(string *)"Value is not an array or object: ");
/* try { // try from 00157b96 to 00157bba has its CatchHandler @ 00157bbb */
std::runtime_error::runtime_error(prVar4,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_001e0ff0,PTR__runtime_error_001e0f70);
}
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00157b02 to 00157b13 has its CatchHandler @ 00157c21 */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 00157b14 to 00157b27 has its CatchHandler @ 00157c01 */
std::operator+((char *)local_38,(string *)"Unashable type: ");
/* try { // try from 00157b2b to 00157b4f has its CatchHandler @ 00157bc1 */
std::runtime_error::runtime_error(prVar4,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_001e0ff0,PTR__runtime_error_001e0f70);
}
| |
28,076 | ma_tls_start | eloqsql/libmariadb/libmariadb/secure/openssl.c | int ma_tls_start(char *errmsg __attribute__((unused)), size_t errmsg_len __attribute__((unused)))
{
int rc= 1;
char *p;
if (ma_tls_initialized)
return 0;
/* lock mutex to prevent multiple initialization */
pthread_mutex_init(&LOCK_openssl_config, NULL);
pthread_mutex_lock(&LOCK_openssl_config);
#ifdef HAVE_OPENSSL_1_1_API
if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL))
goto end;
#else
if (ssl_thread_init())
{
strncpy(errmsg, "Not enough memory", errmsg_len);
goto end;
}
SSL_library_init();
#if SSLEAY_VERSION_NUMBER >= 0x00907000L
OPENSSL_config(NULL);
#endif
#endif
#ifndef HAVE_OPENSSL_1_1_API
/* load errors */
SSL_load_error_strings();
/* digests and ciphers */
OpenSSL_add_all_algorithms();
#endif
disable_sigpipe();
#ifdef OPENSSL_USE_BIOMETHOD
memcpy(&ma_BIO_method, BIO_s_socket(), sizeof(BIO_METHOD));
ma_BIO_method.bread= ma_bio_read;
ma_BIO_method.bwrite= ma_bio_write;
#endif
snprintf(tls_library_version, TLS_VERSION_LENGTH - 1, "%s",
#if defined(LIBRESSL_VERSION_NUMBER) || !defined(HAVE_OPENSSL_1_1_API)
SSLeay_version(SSLEAY_VERSION));
#else
OpenSSL_version(OPENSSL_VERSION));
#endif
/* remove date from version */
if ((p= strstr(tls_library_version, " ")))
*p= 0;
rc= 0;
ma_tls_initialized= TRUE;
end:
pthread_mutex_unlock(&LOCK_openssl_config);
return rc;
} | O0 | c | ma_tls_start:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
leaq 0x29822(%rip), %rax # 0x634d0
cmpb $0x0, (%rax)
je 0x39cbf
movl $0x0, -0x4(%rbp)
jmp 0x39d5b
leaq 0x2b0ea(%rip), %rdi # 0x64db0
xorl %eax, %eax
movl %eax, %esi
callq 0x13670
leaq 0x2b0da(%rip), %rdi # 0x64db0
callq 0x13660
movl $0x40, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x13390
cmpl $0x0, %eax
jne 0x39cf0
jmp 0x39d49
xorl %edi, %edi
callq 0x13820
movq %rax, %rcx
leaq 0x2b0df(%rip), %rdi # 0x64de0
movl $0x3f, %esi
leaq 0x14632(%rip), %rdx # 0x4e33f
movb $0x0, %al
callq 0x136d0
leaq 0x2b0c5(%rip), %rdi # 0x64de0
leaq 0x15499(%rip), %rsi # 0x4f1bb
callq 0x13100
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x39d38
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x1c(%rbp)
leaq 0x2978a(%rip), %rax # 0x634d0
movb $0x1, (%rax)
leaq 0x2b060(%rip), %rdi # 0x64db0
callq 0x13310
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_tls_start:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], 1
lea rax, ma_tls_initialized
cmp byte ptr [rax], 0
jz short loc_39CBF
mov [rbp+var_4], 0
jmp loc_39D5B
loc_39CBF:
lea rdi, LOCK_openssl_config
xor eax, eax
mov esi, eax
call _pthread_mutex_init
lea rdi, LOCK_openssl_config
call _pthread_mutex_lock
mov edi, 40h ; '@'
xor eax, eax
mov esi, eax
call _OPENSSL_init_ssl
cmp eax, 0
jnz short loc_39CF0
jmp short loc_39D49
loc_39CF0:
xor edi, edi
call _OpenSSL_version
mov rcx, rax
lea rdi, tls_library_version
mov esi, 3Fh ; '?'
lea rdx, aCouldnTSetOpti+23h; "%s"
mov al, 0
call _snprintf
lea rdi, tls_library_version
lea rsi, asc_4F1BB; " "
call _strstr
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_39D38
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
loc_39D38:
mov [rbp+var_1C], 0
lea rax, ma_tls_initialized
mov byte ptr [rax], 1
loc_39D49:
lea rdi, LOCK_openssl_config
call _pthread_mutex_unlock
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
loc_39D5B:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long ma_tls_start()
{
const char *v0; // rax
_BYTE *v2; // [rsp+8h] [rbp-28h]
unsigned int v3; // [rsp+14h] [rbp-1Ch]
v3 = 1;
if ( ma_tls_initialized )
{
return 0;
}
else
{
pthread_mutex_init(&LOCK_openssl_config, 0LL);
pthread_mutex_lock(&LOCK_openssl_config);
if ( (unsigned int)OPENSSL_init_ssl(64LL, 0LL) )
{
v0 = (const char *)OpenSSL_version(0LL);
snprintf(&tls_library_version, 63LL, "%s", v0);
v2 = (_BYTE *)strstr(&tls_library_version, " ");
if ( v2 )
*v2 = 0;
v3 = 0;
ma_tls_initialized = 1;
}
pthread_mutex_unlock(&LOCK_openssl_config);
return v3;
}
}
| ma_tls_start:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],0x1
LEA RAX,[0x1634d0]
CMP byte ptr [RAX],0x0
JZ 0x00139cbf
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00139d5b
LAB_00139cbf:
LEA RDI,[0x164db0]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00113670
LEA RDI,[0x164db0]
CALL 0x00113660
MOV EDI,0x40
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00113390
CMP EAX,0x0
JNZ 0x00139cf0
JMP 0x00139d49
LAB_00139cf0:
XOR EDI,EDI
CALL 0x00113820
MOV RCX,RAX
LEA RDI,[0x164de0]
MOV ESI,0x3f
LEA RDX,[0x14e33f]
MOV AL,0x0
CALL 0x001136d0
LEA RDI,[0x164de0]
LEA RSI,[0x14f1bb]
CALL 0x00113100
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x00139d38
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
LAB_00139d38:
MOV dword ptr [RBP + -0x1c],0x0
LEA RAX,[0x1634d0]
MOV byte ptr [RAX],0x1
LAB_00139d49:
LEA RDI,[0x164db0]
CALL 0x00113310
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_00139d5b:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 ma_tls_start(void)
{
int iVar1;
int8 uVar2;
char *pcVar3;
int4 local_24;
int4 local_c;
local_24 = 1;
if (ma_tls_initialized == '\0') {
pthread_mutex_init((pthread_mutex_t *)LOCK_openssl_config,(pthread_mutexattr_t *)0x0);
pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config);
iVar1 = OPENSSL_init_ssl(0x40,0);
if (iVar1 != 0) {
uVar2 = OpenSSL_version(0);
snprintf(tls_library_version,0x3f,"%s",uVar2);
pcVar3 = strstr(tls_library_version," ");
if (pcVar3 != (char *)0x0) {
*pcVar3 = '\0';
}
local_24 = 0;
ma_tls_initialized = '\x01';
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config);
local_c = local_24;
}
else {
local_c = 0;
}
return local_c;
}
| |
28,077 | ma_tls_start | eloqsql/libmariadb/libmariadb/secure/openssl.c | int ma_tls_start(char *errmsg __attribute__((unused)), size_t errmsg_len __attribute__((unused)))
{
int rc= 1;
char *p;
if (ma_tls_initialized)
return 0;
/* lock mutex to prevent multiple initialization */
pthread_mutex_init(&LOCK_openssl_config, NULL);
pthread_mutex_lock(&LOCK_openssl_config);
#ifdef HAVE_OPENSSL_1_1_API
if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL))
goto end;
#else
if (ssl_thread_init())
{
strncpy(errmsg, "Not enough memory", errmsg_len);
goto end;
}
SSL_library_init();
#if SSLEAY_VERSION_NUMBER >= 0x00907000L
OPENSSL_config(NULL);
#endif
#endif
#ifndef HAVE_OPENSSL_1_1_API
/* load errors */
SSL_load_error_strings();
/* digests and ciphers */
OpenSSL_add_all_algorithms();
#endif
disable_sigpipe();
#ifdef OPENSSL_USE_BIOMETHOD
memcpy(&ma_BIO_method, BIO_s_socket(), sizeof(BIO_METHOD));
ma_BIO_method.bread= ma_bio_read;
ma_BIO_method.bwrite= ma_bio_write;
#endif
snprintf(tls_library_version, TLS_VERSION_LENGTH - 1, "%s",
#if defined(LIBRESSL_VERSION_NUMBER) || !defined(HAVE_OPENSSL_1_1_API)
SSLeay_version(SSLEAY_VERSION));
#else
OpenSSL_version(OPENSSL_VERSION));
#endif
/* remove date from version */
if ((p= strstr(tls_library_version, " ")))
*p= 0;
rc= 0;
ma_tls_initialized= TRUE;
end:
pthread_mutex_unlock(&LOCK_openssl_config);
return rc;
} | O3 | c | ma_tls_start:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2280f(%rip), %r15 # 0x4bfe0
xorl %ebx, %ebx
cmpb $0x0, (%r15)
jne 0x29867
leaq 0x240dc(%rip), %rbx # 0x4d8c0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x136b0
movq %rbx, %rdi
callq 0x136a0
movl $0x40, %edi
xorl %esi, %esi
callq 0x133c0
testl %eax, %eax
je 0x29856
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x13840
leaq 0x240da(%rip), %r14 # 0x4d8f0
leaq 0xca46(%rip), %r8 # 0x36263
movl $0x3f, %esi
movl $0x40, %ecx
movq %r14, %rdi
movl $0x1, %edx
movq %rax, %r9
xorl %eax, %eax
callq 0x132c0
leaq 0xd87d(%rip), %rsi # 0x370bd
movq %r14, %rdi
callq 0x13100
testq %rax, %rax
je 0x29850
movb $0x0, (%rax)
movb $0x1, (%r15)
jmp 0x2985b
movl $0x1, %ebx
leaq 0x2405e(%rip), %rdi # 0x4d8c0
callq 0x13330
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| ma_tls_start:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
lea r15, ma_tls_initialized
xor ebx, ebx
cmp byte ptr [r15], 0
jnz loc_29867
lea rbx, LOCK_openssl_config
mov rdi, rbx
xor esi, esi
call _pthread_mutex_init
mov rdi, rbx
call _pthread_mutex_lock
mov edi, 40h ; '@'
xor esi, esi
call _OPENSSL_init_ssl
test eax, eax
jz short loc_29856
xor ebx, ebx
xor edi, edi
call _OpenSSL_version
lea r14, tls_library_version
lea r8, aCouldnTSetOpti+23h; "%s"
mov esi, 3Fh ; '?'
mov ecx, 40h ; '@'
mov rdi, r14
mov edx, 1
mov r9, rax
xor eax, eax
call ___snprintf_chk
lea rsi, asc_370BD; " "
mov rdi, r14
call _strstr
test rax, rax
jz short loc_29850
mov byte ptr [rax], 0
loc_29850:
mov byte ptr [r15], 1
jmp short loc_2985B
loc_29856:
mov ebx, 1
loc_2985B:
lea rdi, LOCK_openssl_config
call _pthread_mutex_unlock
loc_29867:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long ma_tls_start()
{
unsigned int v0; // ebx
const char *v1; // rax
_BYTE *v2; // rax
v0 = 0;
if ( !ma_tls_initialized )
{
pthread_mutex_init(&LOCK_openssl_config, 0LL);
pthread_mutex_lock(&LOCK_openssl_config);
if ( (unsigned int)OPENSSL_init_ssl(64LL, 0LL) )
{
v0 = 0;
v1 = (const char *)OpenSSL_version(0LL);
__snprintf_chk(&tls_library_version, 63LL, 1LL, 64LL, "%s", v1);
v2 = (_BYTE *)strstr(&tls_library_version, " ");
if ( v2 )
*v2 = 0;
ma_tls_initialized = 1;
}
else
{
v0 = 1;
}
pthread_mutex_unlock(&LOCK_openssl_config);
}
return v0;
}
| ma_tls_start:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
LEA R15,[0x14bfe0]
XOR EBX,EBX
CMP byte ptr [R15],0x0
JNZ 0x00129867
LEA RBX,[0x14d8c0]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001136b0
MOV RDI,RBX
CALL 0x001136a0
MOV EDI,0x40
XOR ESI,ESI
CALL 0x001133c0
TEST EAX,EAX
JZ 0x00129856
XOR EBX,EBX
XOR EDI,EDI
CALL 0x00113840
LEA R14,[0x14d8f0]
LEA R8,[0x136263]
MOV ESI,0x3f
MOV ECX,0x40
MOV RDI,R14
MOV EDX,0x1
MOV R9,RAX
XOR EAX,EAX
CALL 0x001132c0
LEA RSI,[0x1370bd]
MOV RDI,R14
CALL 0x00113100
TEST RAX,RAX
JZ 0x00129850
MOV byte ptr [RAX],0x0
LAB_00129850:
MOV byte ptr [R15],0x1
JMP 0x0012985b
LAB_00129856:
MOV EBX,0x1
LAB_0012985b:
LEA RDI,[0x14d8c0]
CALL 0x00113330
LAB_00129867:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 ma_tls_start(void)
{
int iVar1;
int8 uVar2;
char *pcVar3;
int8 uVar4;
uVar4 = 0;
if (ma_tls_initialized == '\0') {
pthread_mutex_init((pthread_mutex_t *)LOCK_openssl_config,(pthread_mutexattr_t *)0x0);
pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config);
iVar1 = OPENSSL_init_ssl(0x40,0);
if (iVar1 == 0) {
uVar4 = 1;
}
else {
uVar4 = 0;
uVar2 = OpenSSL_version(0);
__snprintf_chk(tls_library_version,0x3f,1,0x40,"%s",uVar2);
pcVar3 = strstr(tls_library_version," ");
if (pcVar3 != (char *)0x0) {
*pcVar3 = '\0';
}
ma_tls_initialized = '\x01';
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config);
}
return uVar4;
}
| |
28,078 | SchemaConverter::check_errors() | monkey531[P]llama/common/json-schema-to-grammar.cpp | void check_errors() {
if (!_errors.empty()) {
throw std::runtime_error("JSON schema conversion failed:\n" + string_join(_errors, "\n"));
}
if (!_warnings.empty()) {
fprintf(stderr, "WARNING: JSON schema conversion was incomplete: %s\n", string_join(_warnings, "; ").c_str());
}
} | O1 | cpp | SchemaConverter::check_errors():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
movq 0xc8(%rdi), %rax
cmpq 0xd0(%rdi), %rax
jne 0xbe527
movq 0xe0(%r14), %rax
cmpq 0xe8(%r14), %rax
jne 0xbe4cc
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x6dab5(%rip), %rax # 0x12bf88
movq (%rax), %r15
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x371d0(%rip), %rsi # 0xf56b6
leaq 0x371cb(%rip), %rdx # 0xf56b8
leaq 0x8(%rsp), %rdi
callq 0x21530
addq $0xe0, %r14
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0x70ce8
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x1c076
jmp 0xbe4c1
movl $0x10, %edi
callq 0x1a430
movq %rax, %rbx
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x28c0c(%rip), %rsi # 0xe7150
leaq 0x28c06(%rip), %rdx # 0xe7151
leaq 0x48(%rsp), %rdi
callq 0x21530
addq $0xc8, %r14
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
movq %r14, %rsi
callq 0x70ce8
leaq 0x370ed(%rip), %rsi # 0xf5662
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x778d3
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x1adb0
xorl %ebp, %ebp
movq 0x6da4b(%rip), %rsi # 0x12bfe8
movq 0x6d9b4(%rip), %rdx # 0x12bf58
movq %rbx, %rdi
callq 0x1aea0
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbe5d2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0xbe5d2
movq %rax, %r14
movb $0x1, %bpl
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbe5f5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0xbe5f5
movq %rax, %r14
movb $0x1, %bpl
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0xbe614
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0xbe614
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xbe642
movq %rbx, %rdi
callq 0x1a640
jmp 0xbe642
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0xbe642
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0xbe642
movq %rax, %r14
movq %r14, %rdi
callq 0x1af20
| _ZN15SchemaConverter12check_errorsEv:
push rbp
push r15
push r14
push rbx
sub rsp, 68h
mov r14, rdi
mov rax, [rdi+0C8h]
cmp rax, [rdi+0D0h]
jnz short loc_BE527
mov rax, [r14+0E0h]
cmp rax, [r14+0E8h]
jnz short loc_BE4CC
loc_BE4C1:
add rsp, 68h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_BE4CC:
mov rax, cs:stderr_ptr
mov r15, [rax]
lea rbx, [rsp+88h+var_70]
mov [rbx-10h], rbx
lea rsi, asc_F56B6; "; "
lea rdx, asc_F56B6+2; ""
lea rdi, [rsp+88h+var_80]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
add r14, 0E0h
lea rdi, [rsp+88h+var_60]
lea rdx, [rsp+88h+var_80]
mov rsi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rdi, [rsp+88h+var_60]
lea rdx, [rsp+88h+var_80]
mov rsi, r15
mov rcx, rbx
call _ZN15SchemaConverter12check_errorsEv_cold_1; SchemaConverter::check_errors(void) [clone]
jmp short loc_BE4C1
loc_BE527:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+88h+var_30]
mov [r15-10h], r15
lea rsi, aExampleSpecifi+1Eh; "\n"
lea rdx, aExampleSpecifi+1Fh; ""
lea rdi, [rsp+88h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
add r14, 0C8h
lea rdi, [rsp+88h+var_80]
lea rdx, [rsp+88h+var_40]
mov rsi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rsi, aJsonSchemaConv; "JSON schema conversion failed:\n"
lea rdi, [rsp+88h+var_60]
lea rdx, [rsp+88h+var_80]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+88h+var_60]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+88h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BE5D2
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BE5D2
mov r14, rax
mov bpl, 1
loc_BE5D2:
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BE5F5
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BE5F5
mov r14, rax
mov bpl, 1
loc_BE5F5:
mov rdi, [rsp+88h+var_40]; void *
cmp rdi, r15
jz short loc_BE614
mov rsi, [rsp+88h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BE614
mov r14, rax
mov bpl, 1
loc_BE614:
test bpl, bpl
jz short loc_BE642
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_BE642
mov r14, rax
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, rbx
jz short loc_BE642
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BE642
mov r14, rax
loc_BE642:
mov rdi, r14
call __Unwind_Resume
| void SchemaConverter::check_errors(SchemaConverter *this)
{
long long v1; // r15
void *exception; // rbx
void *v3[2]; // [rsp+8h] [rbp-80h] BYREF
_QWORD v4[2]; // [rsp+18h] [rbp-70h] BYREF
const char *v5[2]; // [rsp+28h] [rbp-60h] BYREF
void *v6[2]; // [rsp+48h] [rbp-40h] BYREF
long long v7; // [rsp+58h] [rbp-30h] BYREF
if ( *((_QWORD *)this + 25) != *((_QWORD *)this + 26) )
{
exception = __cxa_allocate_exception(0x10uLL);
v6[0] = &v7;
std::string::_M_construct<char const*>(v6, "\n", (long long)"");
string_join((long long)v3, (_QWORD *)this + 25, v6);
std::operator+<char>((long long)v5, (long long)"JSON schema conversion failed:\n", (long long)v3);
std::runtime_error::runtime_error(exception, v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *((_QWORD *)this + 28) != *((_QWORD *)this + 29) )
{
v1 = stderr;
v3[0] = v4;
std::string::_M_construct<char const*>(v3, "; ", (long long)"");
string_join((long long)v5, (_QWORD *)this + 28, v3);
SchemaConverter::check_errors(v5, v1, v3, v4);
}
}
| check_errors:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xc8]
CMP RAX,qword ptr [RDI + 0xd0]
JNZ 0x001be527
MOV RAX,qword ptr [R14 + 0xe0]
CMP RAX,qword ptr [R14 + 0xe8]
JNZ 0x001be4cc
LAB_001be4c1:
ADD RSP,0x68
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001be4cc:
MOV RAX,qword ptr [0x0022bf88]
MOV R15,qword ptr [RAX]
LEA RBX,[RSP + 0x18]
MOV qword ptr [RBX + -0x10],RBX
LAB_001be4df:
LEA RSI,[0x1f56b6]
LEA RDX,[0x1f56b8]
LEA RDI,[RSP + 0x8]
CALL 0x00121530
LAB_001be4f7:
ADD R14,0xe0
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
MOV RSI,R14
CALL 0x00170ce8
LAB_001be510:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
MOV RSI,R15
MOV RCX,RBX
CALL 0x0011c076
JMP 0x001be4c1
LAB_001be527:
MOV EDI,0x10
CALL 0x0011a430
MOV RBX,RAX
LEA R15,[RSP + 0x58]
MOV qword ptr [R15 + -0x10],R15
LAB_001be53d:
LEA RSI,[0x1e7150]
LEA RDX,[0x1e7151]
LEA RDI,[RSP + 0x48]
CALL 0x00121530
LAB_001be555:
ADD R14,0xc8
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x48]
MOV RSI,R14
CALL 0x00170ce8
LAB_001be56e:
LEA RSI,[0x1f5662]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x001778d3
MOV BPL,0x1
LAB_001be587:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0011adb0
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bfe8]
MOV RDX,qword ptr [0x0022bf58]
MOV RDI,RBX
CALL 0x0011aea0
|
/* SchemaConverter::check_errors() */
void __thiscall SchemaConverter::check_errors(SchemaConverter *this)
{
runtime_error *this_00;
int1 *local_80 [2];
int1 local_70 [16];
vector local_60 [32];
int1 *local_40 [2];
int1 local_30 [16];
if (*(long *)(this + 200) == *(long *)(this + 0xd0)) {
if (*(long *)(this + 0xe0) != *(long *)(this + 0xe8)) {
local_80[0] = local_70;
/* try { // try from 001be4df to 001be4f6 has its CatchHandler @ 001be63f */
std::__cxx11::string::_M_construct<char_const*>(local_80,&DAT_001f56b6,&DAT_001f56b8);
/* try { // try from 001be4f7 to 001be50f has its CatchHandler @ 001be623 */
string_join(local_60,(string *)(this + 0xe0));
check_errors();
}
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
local_40[0] = local_30;
/* try { // try from 001be53d to 001be554 has its CatchHandler @ 001be60e */
std::__cxx11::string::_M_construct<char_const*>(local_40,"\n","");
/* try { // try from 001be555 to 001be56d has its CatchHandler @ 001be5ef */
string_join((vector *)local_80,(string *)(this + 200));
/* try { // try from 001be56e to 001be583 has its CatchHandler @ 001be5cc */
std::operator+((char *)local_60,(string *)"JSON schema conversion failed:\n");
/* try { // try from 001be587 to 001be5ab has its CatchHandler @ 001be5ac */
std::runtime_error::runtime_error(this_00,(string *)local_60);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022bfe8,PTR__runtime_error_0022bf58);
}
| |
28,079 | ggml_cont_4d | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | struct ggml_tensor * ggml_cont_4d(
struct ggml_context * ctx,
struct ggml_tensor * a,
int64_t ne0,
int64_t ne1,
int64_t ne2,
int64_t ne3) {
GGML_ASSERT(ggml_nelements(a) == (ne0*ne1*ne2*ne3));
struct ggml_tensor * result = ggml_new_tensor_4d(ctx, a->type, ne0, ne1, ne2, ne3);
ggml_format_name(result, "%s (cont)", a->name);
result->op = GGML_OP_CONT;
result->src[0] = a;
return result;
} | O1 | c | ggml_cont_4d:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq 0x18(%rsi), %rax
imulq 0x10(%rsi), %rax
imulq 0x20(%rsi), %rax
imulq 0x28(%rsi), %rax
movq %rcx, %rsi
imulq %rdx, %rsi
movq %r8, %r10
imulq %r9, %r10
imulq %rsi, %r10
cmpq %r10, %rax
jne 0x1d609
movl (%rbx), %esi
movq %rsp, %rax
movq %rdx, (%rax)
movq %rcx, 0x8(%rax)
movq %r8, 0x10(%rax)
movq %r9, 0x18(%rax)
movl $0x4, %edx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1b871
movq %rax, %r14
leaq 0x100(%rbx), %rdx
leaq 0x2f391(%rip), %rsi # 0x4c976
movq %rax, %rdi
xorl %eax, %eax
callq 0x18a70
movl $0x20, 0x50(%r14)
movq %rbx, 0x98(%r14)
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
leaq 0x2ef5f(%rip), %rdi # 0x4c56f
leaq 0x2efaa(%rip), %rdx # 0x4c5c1
leaq 0x2f331(%rip), %rcx # 0x4c94f
movl $0xbb5, %esi # imm = 0xBB5
xorl %eax, %eax
callq 0x18ce0
| ggml_cont_4d:
push r14
push rbx
sub rsp, 28h
mov rbx, rsi
mov rax, [rsi+18h]
imul rax, [rsi+10h]
imul rax, [rsi+20h]
imul rax, [rsi+28h]
mov rsi, rcx
imul rsi, rdx
mov r10, r8
imul r10, r9
imul r10, rsi
cmp rax, r10
jnz short loc_1D609
mov esi, [rbx]
mov rax, rsp
mov [rax], rdx
mov [rax+8], rcx
mov [rax+10h], r8
mov [rax+18h], r9
mov edx, 4
mov rcx, rax
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov r14, rax
lea rdx, [rbx+100h]
lea rsi, aSCont; "%s (cont)"
mov rdi, rax
xor eax, eax
call _ggml_format_name
mov dword ptr [r14+50h], 20h ; ' '
mov [r14+98h], rbx
mov rax, r14
add rsp, 28h
pop rbx
pop r14
retn
loc_1D609:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlNelementsA_1; "ggml_nelements(a) == (ne0*ne1*ne2*ne3)"
mov esi, 0BB5h
xor eax, eax
call _ggml_abort
| long long ggml_cont_4d(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, double a7)
{
unsigned int v8; // esi
long long v9; // r14
long long v11[7]; // [rsp+0h] [rbp-38h] BYREF
if ( *(_QWORD *)(a2 + 40) * *(_QWORD *)(a2 + 32) * *(_QWORD *)(a2 + 16) * *(_QWORD *)(a2 + 24) != a3 * a4 * a6 * a5 )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
2997,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"ggml_nelements(a) == (ne0*ne1*ne2*ne3)",
a5,
a6);
v8 = *(_DWORD *)a2;
v11[0] = a3;
v11[1] = a4;
v11[2] = a5;
v11[3] = a6;
v9 = ggml_new_tensor_impl(a1, v8, 4, v11, 0LL, 0LL, a7);
ggml_format_name(v9, (long long)"%s (cont)");
*(_DWORD *)(v9 + 80) = 32;
*(_QWORD *)(v9 + 152) = a2;
return v9;
}
| ggml_cont_4d:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV RAX,qword ptr [RSI + 0x18]
IMUL RAX,qword ptr [RSI + 0x10]
IMUL RAX,qword ptr [RSI + 0x20]
IMUL RAX,qword ptr [RSI + 0x28]
MOV RSI,RCX
IMUL RSI,RDX
MOV R10,R8
IMUL R10,R9
IMUL R10,RSI
CMP RAX,R10
JNZ 0x0011d609
MOV ESI,dword ptr [RBX]
MOV RAX,RSP
MOV qword ptr [RAX],RDX
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x10],R8
MOV qword ptr [RAX + 0x18],R9
MOV EDX,0x4
MOV RCX,RAX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011b871
MOV R14,RAX
LEA RDX,[RBX + 0x100]
LEA RSI,[0x14c976]
MOV RDI,RAX
XOR EAX,EAX
CALL 0x00118a70
MOV dword ptr [R14 + 0x50],0x20
MOV qword ptr [R14 + 0x98],RBX
MOV RAX,R14
ADD RSP,0x28
POP RBX
POP R14
RET
LAB_0011d609:
LEA RDI,[0x14c56f]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14c94f]
MOV ESI,0xbb5
XOR EAX,EAX
CALL 0x00118ce0
|
long ggml_cont_4d(int8 param_1,int4 *param_2,long param_3,long param_4,long param_5,
long param_6)
{
long lVar1;
long local_38;
long local_30;
long local_28;
long local_20;
if (*(long *)(param_2 + 6) * *(long *)(param_2 + 4) * *(long *)(param_2 + 8) *
*(long *)(param_2 + 10) - param_5 * param_6 * param_4 * param_3 == 0) {
local_38 = param_3;
local_30 = param_4;
local_28 = param_5;
local_20 = param_6;
lVar1 = ggml_new_tensor_impl(param_1,*param_2,4,&local_38,0,0);
ggml_format_name(lVar1,"%s (cont)",param_2 + 0x40);
*(int4 *)(lVar1 + 0x50) = 0x20;
*(int4 **)(lVar1 + 0x98) = param_2;
return lVar1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0xbb5,"GGML_ASSERT(%s) failed","ggml_nelements(a) == (ne0*ne1*ne2*ne3)");
}
| |
28,080 | ggml_cont_4d | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | struct ggml_tensor * ggml_cont_4d(
struct ggml_context * ctx,
struct ggml_tensor * a,
int64_t ne0,
int64_t ne1,
int64_t ne2,
int64_t ne3) {
GGML_ASSERT(ggml_nelements(a) == (ne0*ne1*ne2*ne3));
struct ggml_tensor * result = ggml_new_tensor_4d(ctx, a->type, ne0, ne1, ne2, ne3);
ggml_format_name(result, "%s (cont)", a->name);
result->op = GGML_OP_CONT;
result->src[0] = a;
return result;
} | O2 | c | ggml_cont_4d:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x18(%rsi), %rax
imulq 0x10(%rsi), %rax
imulq 0x20(%rsi), %rax
imulq 0x28(%rsi), %rax
movq %rcx, %rsi
imulq %rdx, %rsi
movq %r8, %r10
imulq %r9, %r10
imulq %rsi, %r10
cmpq %r10, %rax
jne 0x22b7e
movl (%rbx), %esi
callq 0x20030
movq %rax, %r14
leaq 0x100(%rbx), %rdx
leaq 0x2be30(%rip), %rsi # 0x4e98a
movq %rax, %rdi
xorl %eax, %eax
callq 0x1f650
movl $0x20, 0x50(%r14)
movq %rbx, 0x98(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2b9fe(%rip), %rdi # 0x4e583
leaq 0x2ba49(%rip), %rdx # 0x4e5d5
leaq 0x2bdd0(%rip), %rcx # 0x4e963
movl $0xbb5, %esi # imm = 0xBB5
xorl %eax, %eax
callq 0x1f9b0
| ggml_cont_4d:
push r14
push rbx
push rax
mov rbx, rsi
mov rax, [rsi+18h]
imul rax, [rsi+10h]
imul rax, [rsi+20h]
imul rax, [rsi+28h]
mov rsi, rcx
imul rsi, rdx
mov r10, r8
imul r10, r9
imul r10, rsi
cmp rax, r10
jnz short loc_22B7E
mov esi, [rbx]
call _ggml_new_tensor_4d
mov r14, rax
lea rdx, [rbx+100h]
lea rsi, aSCont; "%s (cont)"
mov rdi, rax
xor eax, eax
call _ggml_format_name
mov dword ptr [r14+50h], 20h ; ' '
mov [r14+98h], rbx
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
loc_22B7E:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlNelementsA_1; "ggml_nelements(a) == (ne0*ne1*ne2*ne3)"
mov esi, 0BB5h
xor eax, eax
call _ggml_abort
| long long ggml_cont_4d(
long long a1,
_QWORD *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
long long v15; // r14
if ( a2[5] * a2[4] * a2[2] * a2[3] != a3 * a4 * a6 * a5 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
2997,
(long long)"GGML_ASSERT(%s) failed",
(long long)"ggml_nelements(a) == (ne0*ne1*ne2*ne3)",
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v14);
v15 = ggml_new_tensor_4d(a1, *(unsigned int *)a2, a3, a4, a5, a6);
ggml_format_name(v15, (long long)"%s (cont)");
*(_DWORD *)(v15 + 80) = 32;
*(_QWORD *)(v15 + 152) = a2;
return v15;
}
| ggml_cont_4d:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV RAX,qword ptr [RSI + 0x18]
IMUL RAX,qword ptr [RSI + 0x10]
IMUL RAX,qword ptr [RSI + 0x20]
IMUL RAX,qword ptr [RSI + 0x28]
MOV RSI,RCX
IMUL RSI,RDX
MOV R10,R8
IMUL R10,R9
IMUL R10,RSI
CMP RAX,R10
JNZ 0x00122b7e
MOV ESI,dword ptr [RBX]
CALL 0x00120030
MOV R14,RAX
LEA RDX,[RBX + 0x100]
LEA RSI,[0x14e98a]
MOV RDI,RAX
XOR EAX,EAX
CALL 0x0011f650
MOV dword ptr [R14 + 0x50],0x20
MOV qword ptr [R14 + 0x98],RBX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00122b7e:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14e963]
MOV ESI,0xbb5
XOR EAX,EAX
CALL 0x0011f9b0
|
long ggml_cont_4d(int8 param_1,int4 *param_2,long param_3,long param_4,long param_5,
long param_6)
{
long lVar1;
if (*(long *)(param_2 + 6) * *(long *)(param_2 + 4) * *(long *)(param_2 + 8) *
*(long *)(param_2 + 10) - param_5 * param_6 * param_4 * param_3 == 0) {
lVar1 = ggml_new_tensor_4d(param_1,*param_2);
ggml_format_name(lVar1,"%s (cont)",param_2 + 0x40);
*(int4 *)(lVar1 + 0x50) = 0x20;
*(int4 **)(lVar1 + 0x98) = param_2;
return lVar1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0xbb5,"GGML_ASSERT(%s) failed","ggml_nelements(a) == (ne0*ne1*ne2*ne3)");
}
| |
28,081 | ggml_cont_4d | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | struct ggml_tensor * ggml_cont_4d(
struct ggml_context * ctx,
struct ggml_tensor * a,
int64_t ne0,
int64_t ne1,
int64_t ne2,
int64_t ne3) {
GGML_ASSERT(ggml_nelements(a) == (ne0*ne1*ne2*ne3));
struct ggml_tensor * result = ggml_new_tensor_4d(ctx, a->type, ne0, ne1, ne2, ne3);
ggml_format_name(result, "%s (cont)", a->name);
result->op = GGML_OP_CONT;
result->src[0] = a;
return result;
} | O3 | c | ggml_cont_4d:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq 0x18(%rsi), %rax
imulq 0x10(%rsi), %rax
imulq 0x20(%rsi), %rax
imulq 0x28(%rsi), %rax
movq %rcx, %rsi
imulq %rdx, %rsi
movq %r8, %r10
imulq %r9, %r10
imulq %rsi, %r10
cmpq %r10, %rax
jne 0x1c31e
movl (%rbx), %esi
movq %rsp, %rax
movq %rdx, (%rax)
movq %rcx, 0x8(%rax)
movq %r8, 0x10(%rax)
movq %r9, 0x18(%rax)
movl $0x4, %edx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1a57f
movq %rax, %r14
leaq 0x100(%rbx), %rdx
leaq 0x30720(%rip), %rsi # 0x4ca1a
movq %rax, %rdi
xorl %eax, %eax
callq 0x17a60
movl $0x20, 0x50(%r14)
movq %rbx, 0x98(%r14)
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
leaq 0x302ee(%rip), %rdi # 0x4c613
leaq 0x30339(%rip), %rdx # 0x4c665
leaq 0x306c0(%rip), %rcx # 0x4c9f3
movl $0xbb5, %esi # imm = 0xBB5
xorl %eax, %eax
callq 0x17cd0
| ggml_cont_4d:
push r14
push rbx
sub rsp, 28h
mov rbx, rsi
mov rax, [rsi+18h]
imul rax, [rsi+10h]
imul rax, [rsi+20h]
imul rax, [rsi+28h]
mov rsi, rcx
imul rsi, rdx
mov r10, r8
imul r10, r9
imul r10, rsi
cmp rax, r10
jnz short loc_1C31E
mov esi, [rbx]
mov rax, rsp
mov [rax], rdx
mov [rax+8], rcx
mov [rax+10h], r8
mov [rax+18h], r9
mov edx, 4
mov rcx, rax
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov r14, rax
lea rdx, [rbx+100h]
lea rsi, aSCont; "%s (cont)"
mov rdi, rax
xor eax, eax
call _ggml_format_name
mov dword ptr [r14+50h], 20h ; ' '
mov [r14+98h], rbx
mov rax, r14
add rsp, 28h
pop rbx
pop r14
retn
loc_1C31E:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlNelementsA_1; "ggml_nelements(a) == (ne0*ne1*ne2*ne3)"
mov esi, 0BB5h
xor eax, eax
call _ggml_abort
| long long ggml_cont_4d(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, double a7)
{
unsigned int v8; // esi
long long v9; // r14
long long v11[7]; // [rsp+0h] [rbp-38h] BYREF
if ( *(_QWORD *)(a2 + 40) * *(_QWORD *)(a2 + 32) * *(_QWORD *)(a2 + 16) * *(_QWORD *)(a2 + 24) != a3 * a4 * a6 * a5 )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
2997,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"ggml_nelements(a) == (ne0*ne1*ne2*ne3)",
a5,
a6);
v8 = *(_DWORD *)a2;
v11[0] = a3;
v11[1] = a4;
v11[2] = a5;
v11[3] = a6;
v9 = ggml_new_tensor_impl(a1, v8, 4u, v11, 0LL, 0LL, a7);
ggml_format_name(v9, (long long)"%s (cont)");
*(_DWORD *)(v9 + 80) = 32;
*(_QWORD *)(v9 + 152) = a2;
return v9;
}
| ggml_cont_4d:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV RAX,qword ptr [RSI + 0x18]
IMUL RAX,qword ptr [RSI + 0x10]
IMUL RAX,qword ptr [RSI + 0x20]
IMUL RAX,qword ptr [RSI + 0x28]
MOV RSI,RCX
IMUL RSI,RDX
MOV R10,R8
IMUL R10,R9
IMUL R10,RSI
CMP RAX,R10
JNZ 0x0011c31e
MOV ESI,dword ptr [RBX]
MOV RAX,RSP
MOV qword ptr [RAX],RDX
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x10],R8
MOV qword ptr [RAX + 0x18],R9
MOV EDX,0x4
MOV RCX,RAX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011a57f
MOV R14,RAX
LEA RDX,[RBX + 0x100]
LEA RSI,[0x14ca1a]
MOV RDI,RAX
XOR EAX,EAX
CALL 0x00117a60
MOV dword ptr [R14 + 0x50],0x20
MOV qword ptr [R14 + 0x98],RBX
MOV RAX,R14
ADD RSP,0x28
POP RBX
POP R14
RET
LAB_0011c31e:
LEA RDI,[0x14c613]
LEA RDX,[0x14c665]
LEA RCX,[0x14c9f3]
MOV ESI,0xbb5
XOR EAX,EAX
CALL 0x00117cd0
|
long ggml_cont_4d(int8 param_1,int4 *param_2,long param_3,long param_4,long param_5,
long param_6)
{
long lVar1;
long local_38;
long local_30;
long local_28;
long local_20;
if (*(long *)(param_2 + 6) * *(long *)(param_2 + 4) * *(long *)(param_2 + 8) *
*(long *)(param_2 + 10) - param_5 * param_6 * param_4 * param_3 == 0) {
local_38 = param_3;
local_30 = param_4;
local_28 = param_5;
local_20 = param_6;
lVar1 = ggml_new_tensor_impl(param_1,*param_2,4,&local_38,0,0);
ggml_format_name(lVar1,"%s (cont)",param_2 + 0x40);
*(int4 *)(lVar1 + 0x50) = 0x20;
*(int4 **)(lVar1 + 0x98) = param_2;
return lVar1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0xbb5,"GGML_ASSERT(%s) failed","ggml_nelements(a) == (ne0*ne1*ne2*ne3)");
}
| |
28,082 | gindex_del | corpus-core[P]colibri-stateless/src/util/ssz_merkle.c | static void gindex_del(buffer_t* index_list, gindex_t index) {
int len = index_list->data.len / sizeof(gindex_t);
gindex_t* index_list_array = (gindex_t*) index_list->data.data;
for (int i = 0; i < len; i++) {
if (index_list_array[i] == index) {
buffer_splice(index_list, i * sizeof(gindex_t), sizeof(gindex_t), NULL_BYTES);
return;
}
}
} | O0 | c | gindex_del:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
shrq $0x3, %rax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0xa3685
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x10(%rbp), %rax
jne 0xa3678
movq -0x8(%rbp), %rdi
movslq -0x24(%rbp), %rsi
shlq $0x3, %rsi
movl $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movl -0x38(%rbp), %ecx
movq -0x30(%rbp), %r8
movl $0x8, %edx
callq 0x9e150
jmp 0xa3685
jmp 0xa367a
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xa3630
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| gindex_del:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov eax, [rax]
shr rax, 3
mov [rbp+var_14], eax
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_20], rax
mov [rbp+var_24], 0
loc_A3630:
mov eax, [rbp+var_24]
cmp eax, [rbp+var_14]
jge short loc_A3685
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_24]
mov rax, [rax+rcx*8]
cmp rax, [rbp+var_10]
jnz short loc_A3678
mov rdi, [rbp+var_8]
movsxd rsi, [rbp+var_24]
shl rsi, 3
mov [rbp+var_38], 0
mov [rbp+var_30], 0
mov ecx, [rbp+var_38]
mov r8, [rbp+var_30]
mov edx, 8
call buffer_splice
jmp short loc_A3685
loc_A3678:
jmp short $+2
loc_A367A:
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp short loc_A3630
loc_A3685:
add rsp, 40h
pop rbp
retn
| unsigned long long gindex_del(unsigned long long a1, long long a2)
{
unsigned long long result; // rax
unsigned int i; // [rsp+1Ch] [rbp-24h]
for ( i = 0; ; ++i )
{
result = i;
if ( (signed int)i >= *(_DWORD *)a1 >> 3 )
break;
if ( *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * (int)i) == a2 )
return buffer_splice(a1, 8LL * (int)i, 8, 0, 0LL);
}
return result;
}
| gindex_del:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
SHR RAX,0x3
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV dword ptr [RBP + -0x24],0x0
LAB_001a3630:
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0x14]
JGE 0x001a3685
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RAX + RCX*0x8]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001a3678
MOV RDI,qword ptr [RBP + -0x8]
MOVSXD RSI,dword ptr [RBP + -0x24]
SHL RSI,0x3
MOV dword ptr [RBP + -0x38],0x0
MOV qword ptr [RBP + -0x30],0x0
MOV ECX,dword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x30]
MOV EDX,0x8
CALL 0x0019e150
JMP 0x001a3685
LAB_001a3678:
JMP 0x001a367a
LAB_001a367a:
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x001a3630
LAB_001a3685:
ADD RSP,0x40
POP RBP
RET
|
void gindex_del(uint *param_1,long param_2)
{
int local_2c;
local_2c = 0;
while( true ) {
if ((int)(*param_1 >> 3) <= local_2c) {
return;
}
if (*(long *)(*(long *)(param_1 + 2) + (long)local_2c * 8) == param_2) break;
local_2c = local_2c + 1;
}
buffer_splice(param_1,(long)local_2c << 3,8,0,0);
return;
}
| |
28,083 | my_mb_wc_big5 | eloqsql/strings/ctype-big5.c | static int
my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc,const uchar *s,const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1])))
return -2;
return 2;
} | O3 | c | my_mb_wc_big5:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x36d2a
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0x36cf4
movq %rdi, (%rsi)
movl $0x1, %eax
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x36d2a
leal 0x5f(%rdi), %ecx
xorl %eax, %eax
cmpb $0x58, %cl
ja 0x36d2a
movzbl 0x1(%rdx), %ecx
leal -0x7f(%rcx), %edx
cmpb $-0x3f, %dl
setb %dl
leal 0x1(%rcx), %r8d
cmpb $-0x5e, %r8b
setb %r8b
testb %r8b, %dl
je 0x36d2b
retq
pushq %rbp
movq %rsp, %rbp
movzbl %dil, %eax
shll $0x8, %eax
leal (%rax,%rcx), %edx
addl $0xffff5ec0, %edx # imm = 0xFFFF5EC0
cmpl $0x26bc, %edx # imm = 0x26BC
ja 0x36d52
movl %edx, %eax
leaq 0x33300(%rip), %rcx # 0x6a050
jmp 0x36d69
orl %ecx, %eax
addl $0xffff36c0, %eax # imm = 0xFFFF36C0
cmpl $0x309d, %eax # imm = 0x309D
jae 0x36d82
movl %eax, %eax
leaq 0x38067(%rip), %rcx # 0x6edd0
leaq (%rcx,%rax,2), %rax
movzwl (%rax), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0x36d8e
jmp 0x36d89
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
| my_mb_wc_big5:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_36D2A
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_36CF4
mov [rsi], rdi
mov eax, 1
retn
loc_36CF4:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short locret_36D2A
lea ecx, [rdi+5Fh]
xor eax, eax
cmp cl, 58h ; 'X'
ja short locret_36D2A
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx-7Fh]
cmp dl, 0C1h
setb dl
lea r8d, [rcx+1]
cmp r8b, 0A2h
setb r8b
test dl, r8b
jz short loc_36D2B
locret_36D2A:
retn
loc_36D2B:
push rbp
mov rbp, rsp
movzx eax, dil
shl eax, 8
lea edx, [rax+rcx]
add edx, 0FFFF5EC0h
cmp edx, 26BCh
ja short loc_36D52
mov eax, edx
lea rcx, tab_big5_uni0
jmp short loc_36D69
loc_36D52:
or eax, ecx
add eax, 0FFFF36C0h
cmp eax, 309Dh
jnb short loc_36D82
mov eax, eax
lea rcx, tab_big5_uni1
loc_36D69:
lea rax, [rcx+rax*2]
movzx eax, word ptr [rax]
movzx ecx, ax
mov [rsi], rcx
mov eax, 2
test cx, cx
jnz short loc_36D8E
jmp short loc_36D89
loc_36D82:
mov qword ptr [rsi], 0
loc_36D89:
mov eax, 0FFFFFFFEh
loc_36D8E:
pop rbp
retn
| long long my_mb_wc_big5(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
int v6; // ecx
int v7; // eax
unsigned int v8; // edx
long long v9; // rax
unsigned __int16 *v10; // rcx
long long v11; // rcx
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( v5 >= 0 )
{
*a2 = v5;
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int8)(v5 + 95) <= 0x58u )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 + 1) >= 0xA2u || (unsigned __int8)(v6 - 127) >= 0xC1u )
{
v7 = (unsigned __int8)v5 << 8;
v8 = v7 + v6 - 41280;
if ( v8 > 0x26BC )
{
LODWORD(v9) = (v6 | v7) - 51520;
if ( (unsigned int)v9 >= 0x309D )
{
*a2 = 0LL;
return 4294967294LL;
}
v9 = (unsigned int)v9;
v10 = (unsigned __int16 *)&tab_big5_uni1;
}
else
{
v9 = v8;
v10 = (unsigned __int16 *)&tab_big5_uni0;
}
v11 = v10[v9];
*a2 = v11;
result = 2LL;
if ( (_WORD)v11 )
return result;
return 4294967294LL;
}
}
}
}
return result;
}
| my_mb_wc_big5:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00136d2a
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x00136cf4
MOV qword ptr [RSI],RDI
MOV EAX,0x1
RET
LAB_00136cf4:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x00136d2a
LEA ECX,[RDI + 0x5f]
XOR EAX,EAX
CMP CL,0x58
JA 0x00136d2a
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + -0x7f]
CMP DL,0xc1
SETC DL
LEA R8D,[RCX + 0x1]
CMP R8B,0xa2
SETC R8B
TEST DL,R8B
JZ 0x00136d2b
LAB_00136d2a:
RET
LAB_00136d2b:
PUSH RBP
MOV RBP,RSP
MOVZX EAX,DIL
SHL EAX,0x8
LEA EDX,[RAX + RCX*0x1]
ADD EDX,0xffff5ec0
CMP EDX,0x26bc
JA 0x00136d52
MOV EAX,EDX
LEA RCX,[0x16a050]
JMP 0x00136d69
LAB_00136d52:
OR EAX,ECX
ADD EAX,0xffff36c0
CMP EAX,0x309d
JNC 0x00136d82
MOV EAX,EAX
LEA RCX,[0x16edd0]
LAB_00136d69:
LEA RAX,[RCX + RAX*0x2]
MOVZX EAX,word ptr [RAX]
MOVZX ECX,AX
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST CX,CX
JNZ 0x00136d8e
JMP 0x00136d89
LAB_00136d82:
MOV qword ptr [RSI],0x0
LAB_00136d89:
MOV EAX,0xfffffffe
LAB_00136d8e:
POP RBP
RET
|
int8 my_mb_wc_big5(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
ushort uVar3;
int *puVar4;
uint uVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
bVar1 = *param_3;
if (-1 < (long)(char)bVar1) {
*param_2 = (long)(char)bVar1;
return 1;
}
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if ((byte)(bVar1 + 0x5f) < 0x59) {
bVar2 = param_3[1];
if ((byte)(bVar2 + 0x81) < 0xc1 && (byte)(bVar2 + 1) < 0xa2) {
return 0;
}
uVar5 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0xa140;
if (uVar5 < 0x26bd) {
puVar4 = &tab_big5_uni0;
}
else {
uVar5 = CONCAT11(bVar1,bVar2) - 0xc940;
if (0x309c < uVar5) {
*param_2 = 0;
return 0xfffffffe;
}
puVar4 = &tab_big5_uni1;
}
uVar3 = *(ushort *)(puVar4 + (ulong)uVar5 * 2);
*param_2 = (ulong)uVar3;
if (uVar3 == 0) {
return 0xfffffffe;
}
return 2;
}
return 0;
}
| |
28,084 | fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, bool, 0>(fmt::v10::appender, bool, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR auto write(OutputIt out, T value,
const format_specs<Char>& specs = {}, locale_ref = {})
-> OutputIt {
return specs.type != presentation_type::none &&
specs.type != presentation_type::string
? write(out, value ? 1 : 0, specs, {})
: write_bytes(out, value ? "true" : "false", specs);
} | O3 | c | fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, bool, 0>(fmt::v10::appender, bool, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref):
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movzbl 0x8(%rdx), %eax
testb $-0x11, %al
jne 0x8a771
leaq 0x164f23(%rip), %rax # 0x1ef662
leaq 0x164f21(%rip), %rdx # 0x1ef667
testb %sil, %sil
cmovneq %rax, %rdx
movzbl %sil, %ecx
xorq $0x5, %rcx
leaq 0x20(%rsp), %r8
movq %rdx, (%r8)
movq %rcx, 0x8(%r8)
movq %rbx, %rdi
movq %r14, %rsi
movq %rcx, %rdx
callq 0x8dd8f
jmp 0x8a7e0
movzwl 0x9(%r14), %eax
btl $0x8, %eax
jb 0x8a782
movzbl %sil, %r15d
jmp 0x8a7bc
movl $0x1, 0x30(%rsp)
movzbl %sil, %r15d
movq %r15, 0x20(%rsp)
movaps 0x20(%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x8a7f0
testb %al, %al
jne 0x8a7e3
movzwl 0x9(%r14), %eax
shrl $0x4, %eax
andl $0x7, %eax
leaq 0x1649b7(%rip), %rcx # 0x1ef180
movl (%rcx,%rax,4), %esi
shlq $0x20, %rsi
orq %r15, %rsi
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x8a948
movq %rax, %rbx
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
| _ZN3fmt3v106detail5writeIcNS0_8appenderEbTnNSt9enable_ifIXsr3std7is_sameIT1_bEE5valueEiE4typeELi0EEET0_S8_S5_RKNS0_12format_specsIT_EENS1_10locale_refE:
push r15
push r14
push rbx
sub rsp, 40h
mov r14, rdx
mov rbx, rdi
movzx eax, byte ptr [rdx+8]
test al, 0EFh
jnz short loc_8A771
lea rax, aTrue; "true"
lea rdx, aFalse; "false"
test sil, sil
cmovnz rdx, rax
movzx ecx, sil
xor rcx, 5
lea r8, [rsp+58h+var_38]
mov [r8], rdx
mov [r8+8], rcx
mov rdi, rbx
mov rsi, r14
mov rdx, rcx
call _ZN3fmt3v106detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcRZNS1_11write_bytesILS4_1EcS5_EET1_S7_NS0_17basic_string_viewIcEERKNS0_12format_specsIT0_EEEUlS5_E_EESB_SB_RKNSA_IS7_EEmmOT2_; fmt::v10::detail::write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::detail::write_bytes<(fmt::v10::align::type)1,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1} &>(char,fmt::v10::format_specs<fmt::v10::appender> const&,ulong,ulong,fmt::v10::detail::write_bytes<(fmt::v10::align::type)1,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1} &)
jmp short loc_8A7E0
loc_8A771:
movzx eax, word ptr [r14+9]
bt eax, 8
jb short loc_8A782
movzx r15d, sil
jmp short loc_8A7BC
loc_8A782:
mov dword ptr [rsp+58h+var_28], 1
movzx r15d, sil
mov qword ptr [rsp+58h+var_38], r15
movaps xmm0, [rsp+58h+var_38]
movaps xmm1, [rsp+58h+var_28]
movaps [rsp+58h+var_48], xmm1
movaps [rsp+58h+var_58], xmm0
mov rdi, rbx
mov rsi, r14
xor edx, edx
call _ZN3fmt3v106detail9write_locENS0_8appenderENS0_9loc_valueERKNS0_12format_specsIcEENS1_10locale_refE; fmt::v10::detail::write_loc(fmt::v10::appender,fmt::v10::loc_value,fmt::v10::format_specs<char> const&,fmt::v10::detail::locale_ref)
test al, al
jnz short loc_8A7E3
movzx eax, word ptr [r14+9]
loc_8A7BC:
shr eax, 4
and eax, 7
lea rcx, unk_1EF180
mov esi, [rcx+rax*4]
shl rsi, 20h
or rsi, r15
mov rdi, rbx
mov rdx, r14
xor ecx, ecx
call _ZN3fmt3v106detail18write_int_noinlineIcNS0_8appenderEjEET0_S4_NS1_13write_int_argIT1_EERKNS0_12format_specsIT_EENS1_10locale_refE; fmt::v10::detail::write_int_noinline<char,fmt::v10::appender,uint>(fmt::v10::appender,fmt::v10::detail::write_int_arg<uint>,fmt::v10::format_specs<char> const&,fmt::v10::detail::locale_ref)
loc_8A7E0:
mov rbx, rax
loc_8A7E3:
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop r15
retn
| long long ZN3fmt3v106detail5writeIcNS0_8appenderEbTnNSt9enable_ifIXsr3std7is_sameIT1_bEE5valueEiE4typeELi0EEET0_S8_S5_RKNS0_12format_specsIT_EENS1_10locale_refE(
long long a1,
unsigned __int8 a2,
long long a3,
long long a4,
long long a5,
long long a6)
{
long long v7; // rbx
unsigned int v9; // eax
long long v10; // r15
v7 = a1;
if ( (*(_BYTE *)(a3 + 8) & 0xEF) == 0 )
return fmt::v10::detail::write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write_bytes<(fmt::v10::align::type)1,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1} &>(
a1,
a3,
a2 ^ 5LL);
v9 = *(unsigned __int16 *)(a3 + 9);
if ( (v9 & 0x100) == 0 )
{
v10 = a2;
return fmt::v10::detail::write_int_noinline<char,fmt::v10::appender,unsigned int>(
a1,
v10 | ((unsigned long long)dword_1EF180[(v9 >> 4) & 7] << 32),
a3,
0LL);
}
v10 = a2;
if ( !(unsigned __int8)((long long ( *)(long long, long long, _QWORD, long long, long long, long long, _QWORD))fmt::v10::detail::write_loc)(
a1,
a3,
0LL,
a4,
a5,
a6,
a2) )
{
v9 = *(unsigned __int16 *)(a3 + 9);
return fmt::v10::detail::write_int_noinline<char,fmt::v10::appender,unsigned int>(
a1,
v10 | ((unsigned long long)dword_1EF180[(v9 >> 4) & 7] << 32),
a3,
0LL);
}
return v7;
}
| _ZN3fmt3v106detail5writeIcNS0_8appenderEbTnNSt9enable_ifIXsr3std7is_sameIT1_bEE5valueEiE4typeELi0EEET0_S8_S5_RKNS0_12format_specsIT_EENS1_10locale_refE:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDX
MOV RBX,RDI
MOVZX EAX,byte ptr [RDX + 0x8]
TEST AL,0xef
JNZ 0x0018a771
LEA RAX,[0x2ef662]
LEA RDX,[0x2ef667]
TEST SIL,SIL
CMOVNZ RDX,RAX
MOVZX ECX,SIL
XOR RCX,0x5
LEA R8,[RSP + 0x20]
MOV qword ptr [R8],RDX
MOV qword ptr [R8 + 0x8],RCX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RCX
CALL 0x0018dd8f
JMP 0x0018a7e0
LAB_0018a771:
MOVZX EAX,word ptr [R14 + 0x9]
BT EAX,0x8
JC 0x0018a782
MOVZX R15D,SIL
JMP 0x0018a7bc
LAB_0018a782:
MOV dword ptr [RSP + 0x30],0x1
MOVZX R15D,SIL
MOV qword ptr [RSP + 0x20],R15
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVAPS XMM1,xmmword ptr [RSP + 0x30]
MOVAPS xmmword ptr [RSP + 0x10],XMM1
MOVAPS xmmword ptr [RSP],XMM0
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x0018a7f0
TEST AL,AL
JNZ 0x0018a7e3
MOVZX EAX,word ptr [R14 + 0x9]
LAB_0018a7bc:
SHR EAX,0x4
AND EAX,0x7
LEA RCX,[0x2ef180]
MOV ESI,dword ptr [RCX + RAX*0x4]
SHL RSI,0x20
OR RSI,R15
MOV RDI,RBX
MOV RDX,R14
XOR ECX,ECX
CALL 0x0018a948
LAB_0018a7e0:
MOV RBX,RAX
LAB_0018a7e3:
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
|
int8
_ZN3fmt3v106detail5writeIcNS0_8appenderEbTnNSt9enable_ifIXsr3std7is_sameIT1_bEE5valueEiE4typeELi0EEET0_S8_S5_RKNS0_12format_specsIT_EENS1_10locale_refE
(int8 param_1,byte param_2,long param_3)
{
ushort uVar1;
char cVar2;
int8 uVar3;
if ((*(byte *)(param_3 + 8) & 0xef) == 0) {
uVar3 = fmt::v10::detail::
write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::detail::write_bytes<(fmt::v10::align::type)1,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char>const&)::_lambda(fmt::v10::appender)_1_&>
(param_1,param_3,param_2 ^ 5);
}
else {
uVar1 = *(ushort *)(param_3 + 9);
if ((uVar1 >> 8 & 1) != 0) {
cVar2 = fmt::v10::detail::write_loc(param_1,param_3,0);
if (cVar2 != '\0') {
return param_1;
}
uVar1 = *(ushort *)(param_3 + 9);
}
uVar3 = fmt::v10::detail::write_int_noinline<char,fmt::v10::appender,unsigned_int>
(param_1,(ulong)*(uint *)(&DAT_002ef180 + (ulong)(uVar1 >> 4 & 7) * 4) << 0x20
| (ulong)param_2,param_3,0);
}
return uVar3;
}
| |
28,085 | blend_solid | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c | static void blend_solid(plutovg_surface_t* surface, plutovg_operator_t op, uint32_t solid, const plutovg_span_buffer_t* span_buffer)
{
composition_solid_function_t func = composition_solid_table[op];
int count = span_buffer->spans.size;
const plutovg_span_t* spans = span_buffer->spans.data;
while(count--) {
uint32_t* target = (uint32_t*)(surface->data + spans->y * surface->stride) + spans->x;
func(target, spans->len, solid, spans->coverage);
++spans;
}
} | O1 | c | blend_solid:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x8(%rcx), %ebp
testl %ebp, %ebp
je 0x409ff
movl %edx, %ebx
movq %rdi, %r14
movl %esi, %eax
leaq 0x1b2fd(%rip), %rdx # 0x5bcc0
movq (%rdx,%rax,8), %r15
movq (%rcx), %r12
addq $0xc, %r12
movslq -0x4(%r12), %rax
movslq 0xc(%r14), %rcx
imulq %rax, %rcx
addq 0x10(%r14), %rcx
movslq -0xc(%r12), %rax
leaq (%rcx,%rax,4), %rdi
movl -0x8(%r12), %esi
movzbl (%r12), %ecx
movl %ebx, %edx
callq *%r15
addq $0x10, %r12
decl %ebp
jne 0x409ce
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| blend_solid:
push rbp
push r15
push r14
push r12
push rbx
mov ebp, [rcx+8]
test ebp, ebp
jz short loc_409FF
mov ebx, edx
mov r14, rdi
mov eax, esi
lea rdx, composition_solid_table
mov r15, ds:(composition_solid_table - 5BCC0h)[rdx+rax*8]
mov r12, [rcx]
add r12, 0Ch
loc_409CE:
movsxd rax, dword ptr [r12-4]
movsxd rcx, dword ptr [r14+0Ch]
imul rcx, rax
add rcx, [r14+10h]
movsxd rax, dword ptr [r12-0Ch]
lea rdi, [rcx+rax*4]
mov esi, [r12-8]
movzx ecx, byte ptr [r12]
mov edx, ebx
call r15
add r12, 10h
dec ebp
jnz short loc_409CE
loc_409FF:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long blend_solid(long long a1, int a2, unsigned int a3, _DWORD *a4)
{
int v4; // ebp
long long ( *v6)(); // r15
unsigned __int8 *v7; // r12
long long result; // rax
v4 = a4[2];
if ( v4 )
{
v6 = composition_solid_table[a2];
v7 = (unsigned __int8 *)(*(_QWORD *)a4 + 12LL);
do
{
result = ((long long ( *)(long long, _QWORD, _QWORD, _QWORD))v6)(
*(_QWORD *)(a1 + 16) + *((int *)v7 - 1) * (long long)*(int *)(a1 + 12) + 4LL * *((int *)v7 - 3),
*((unsigned int *)v7 - 2),
a3,
*v7);
v7 += 16;
--v4;
}
while ( v4 );
}
return result;
}
| blend_solid:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBP,dword ptr [RCX + 0x8]
TEST EBP,EBP
JZ 0x001409ff
MOV EBX,EDX
MOV R14,RDI
MOV EAX,ESI
LEA RDX,[0x15bcc0]
MOV R15,qword ptr [RDX + RAX*0x8]
MOV R12,qword ptr [RCX]
ADD R12,0xc
LAB_001409ce:
MOVSXD RAX,dword ptr [R12 + -0x4]
MOVSXD RCX,dword ptr [R14 + 0xc]
IMUL RCX,RAX
ADD RCX,qword ptr [R14 + 0x10]
MOVSXD RAX,dword ptr [R12 + -0xc]
LEA RDI,[RCX + RAX*0x4]
MOV ESI,dword ptr [R12 + -0x8]
MOVZX ECX,byte ptr [R12]
MOV EDX,EBX
CALL R15
ADD R12,0x10
DEC EBP
JNZ 0x001409ce
LAB_001409ff:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void blend_solid(long param_1,ulong param_2,int4 param_3,long *param_4)
{
code *pcVar1;
int iVar2;
int1 *puVar3;
iVar2 = (int)param_4[1];
if (iVar2 != 0) {
pcVar1 = *(code **)(composition_solid_table + (param_2 & 0xffffffff) * 8);
puVar3 = (int1 *)(*param_4 + 0xc);
do {
(*pcVar1)((long)*(int *)(param_1 + 0xc) * (long)*(int *)(puVar3 + -4) +
*(long *)(param_1 + 0x10) + (long)*(int *)(puVar3 + -0xc) * 4,
*(int4 *)(puVar3 + -8),param_3,*puVar3);
puVar3 = puVar3 + 0x10;
iVar2 = iVar2 + -1;
} while (iVar2 != 0);
}
return;
}
| |
28,086 | fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, long double, 0>(fmt::v10::appender, long double, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR20 auto write(OutputIt out, T value, format_specs<Char> specs,
locale_ref loc = {}) -> OutputIt {
if (const_check(!is_supported_floating_point(value))) return out;
return specs.localized && write_loc(out, value, specs, loc)
? out
: write_float(out, value, specs, loc);
} | O0 | c | fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, long double, 0>(fmt::v10::appender, long double, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref):
subq $0xc8, %rsp
fldt 0xd0(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa0(%rsp)
movq %rdx, 0xa8(%rsp)
movq %rcx, 0x98(%rsp)
fstpt 0x80(%rsp)
fldt 0x80(%rsp)
movq %rsp, %rax
fstpt (%rax)
callq 0xb2930
xorb $-0x1, %al
andb $0x1, %al
movb %al, 0xc7(%rsp)
testb $0x1, 0xc7(%rsp)
je 0xb2810
movq 0xb0(%rsp), %rax
movq %rax, 0xb8(%rsp)
jmp 0xb2913
movw 0xa9(%rsp), %ax
shrw $0x8, %ax
andw $0x1, %ax
testw $0x1, %ax
je 0xb28b0
movq 0xb0(%rsp), %rax
movq %rax, 0x78(%rsp)
fldt 0x80(%rsp)
movq %rsp, %rax
fstpt (%rax)
leaq 0x50(%rsp), %rdi
callq 0xb2940
movq 0x98(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x78(%rsp), %rdi
movq 0x48(%rsp), %rdx
leaq 0x50(%rsp), %rax
leaq 0xa0(%rsp), %rsi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0xa1e30
testb $0x1, %al
jne 0xb289e
jmp 0xb28b0
movq 0xb0(%rsp), %rax
movq %rax, 0xb8(%rsp)
jmp 0xb2911
movq 0xb0(%rsp), %rax
movq %rax, 0x40(%rsp)
fldt 0x80(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq %rsp, %rax
fstpt (%rax)
callq 0xb2970
movq %rax, 0xb8(%rsp)
jmp 0xb2913
movq 0xb8(%rsp), %rax
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN3fmt3v106detail5writeIcNS0_8appenderEeTnNSt9enable_ifIXsr17is_floating_pointIT1_EE5valueEiE4typeELi0EEET0_S8_S5_NS0_12format_specsIT_EENS1_10locale_refE:
sub rsp, 0C8h
fld [rsp+0C8h+arg_0]
mov qword ptr [rsp+0C8h+var_18], rdi; int
mov qword ptr [rsp+0C8h+var_28], rsi; int
mov qword ptr [rsp+0C8h+var_20], rdx; int
mov qword ptr [rsp+0C8h+var_30], rcx; int
fstp tbyte ptr [rsp+0C8h+var_48]; int
fld tbyte ptr [rsp+0C8h+var_48]
mov rax, rsp
fstp tbyte ptr [rax]
call _ZN3fmt3v106detail27is_supported_floating_pointIeEEbT_; fmt::v10::detail::is_supported_floating_point<long double>(long double)
xor al, 0FFh
and al, 1
mov [rsp+0C8h+var_1], al
test [rsp+0C8h+var_1], 1
jz short loc_B2810
mov rax, qword ptr [rsp+0C8h+var_18]
mov [rsp+0C8h+var_10], rax
jmp loc_B2913
loc_B2810:
mov ax, word ptr [rsp+0C8h+var_20+1]
shr ax, 8
and ax, 1
test ax, 1
jz loc_B28B0
mov rax, qword ptr [rsp+0C8h+var_18]
mov [rsp+0C8h+var_50], rax
fld tbyte ptr [rsp+0C8h+var_48]
mov rax, rsp
fstp tbyte ptr [rax]
lea rdi, [rsp+0C8h+var_78]
call _ZN3fmt3v109loc_valueC2IeTnNSt9enable_ifIXntsr6detail11is_float128IT_EE5valueEiE4typeELi0EEES4_
mov rax, qword ptr [rsp+0C8h+var_30]
mov [rsp+0C8h+var_80], rax
mov rdi, [rsp+0C8h+var_50]
mov rdx, [rsp+0C8h+var_80]
lea rax, [rsp+0C8h+var_78]
lea rsi, [rsp+0C8h+var_28]
mov rcx, [rax]
mov [rsp+0C8h+var_C8], rcx
mov rcx, [rax+8]
mov [rsp+0C8h+var_C0], rcx
mov rcx, [rax+10h]
mov [rsp+0C8h+var_B8], rcx
mov rax, [rax+18h]
mov [rsp+0C8h+var_B0], rax
call _ZN3fmt3v106detail9write_locENS0_8appenderENS0_9loc_valueERKNS0_12format_specsIcEENS1_10locale_refE; fmt::v10::detail::write_loc(fmt::v10::appender,fmt::v10::loc_value,fmt::v10::format_specs<char> const&,fmt::v10::detail::locale_ref)
test al, 1
jnz short loc_B289E
jmp short loc_B28B0
loc_B289E:
mov rax, qword ptr [rsp+0C8h+var_18]
mov [rsp+0C8h+var_10], rax
jmp short loc_B2911
loc_B28B0:
mov rax, qword ptr [rsp+0C8h+var_18]
mov qword ptr [rsp+0C8h+var_88], rax; int
fld tbyte ptr [rsp+0C8h+var_48]
mov rax, qword ptr [rsp+0C8h+var_28]
mov qword ptr [rsp+0C8h+var_98], rax; int
mov rax, qword ptr [rsp+0C8h+var_20]
mov qword ptr [rsp+0C8h+var_90], rax; int
mov rax, qword ptr [rsp+0C8h+var_30]
mov qword ptr [rsp+0C8h+var_A0], rax; int
mov rdi, qword ptr [rsp+0C8h+var_88]; int
mov rsi, qword ptr [rsp+0C8h+var_98]; int
mov rdx, qword ptr [rsp+0C8h+var_90]; int
mov rcx, qword ptr [rsp+0C8h+var_A0]; int
mov rax, rsp
fstp tbyte ptr [rax]
call _ZN3fmt3v106detail11write_floatIcNS0_8appenderEeEET0_S4_T1_NS0_12format_specsIT_EENS1_10locale_refE; fmt::v10::detail::write_float<char,fmt::v10::appender,long double>(fmt::v10::appender,long double,fmt::v10::format_specs<char>,fmt::v10::detail::locale_ref)
mov [rsp+0C8h+var_10], rax
loc_B2911:
jmp short $+2
loc_B2913:
mov rax, [rsp+0C8h+var_10]
add rsp, 0C8h
retn
| _ZN3fmt3v106detail5writeIcNS0_8appenderEeTnNSt9enable_ifIXsr17is_floating_pointIT1_EE5valueEiE4typeELi0EEET0_S8_S5_NS0_12format_specsIT_EENS1_10locale_refE:
SUB RSP,0xc8
FLD tword ptr [RSP + 0xd0]
MOV qword ptr [RSP + 0xb0],RDI
MOV qword ptr [RSP + 0xa0],RSI
MOV qword ptr [RSP + 0xa8],RDX
MOV qword ptr [RSP + 0x98],RCX
FSTP tword ptr [RSP + 0x80]
FLD tword ptr [RSP + 0x80]
MOV RAX,RSP
FSTP tword ptr [RAX]
CALL 0x001b2930
XOR AL,0xff
AND AL,0x1
MOV byte ptr [RSP + 0xc7],AL
TEST byte ptr [RSP + 0xc7],0x1
JZ 0x001b2810
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0xb8],RAX
JMP 0x001b2913
LAB_001b2810:
MOV AX,word ptr [RSP + 0xa9]
SHR AX,0x8
AND AX,0x1
TEST AX,0x1
JZ 0x001b28b0
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x78],RAX
FLD tword ptr [RSP + 0x80]
MOV RAX,RSP
FSTP tword ptr [RAX]
LEA RDI,[RSP + 0x50]
CALL 0x001b2940
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x48]
LEA RAX,[RSP + 0x50]
LEA RSI,[RSP + 0xa0]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x18],RAX
CALL 0x001a1e30
TEST AL,0x1
JNZ 0x001b289e
JMP 0x001b28b0
LAB_001b289e:
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0xb8],RAX
JMP 0x001b2911
LAB_001b28b0:
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x40],RAX
FLD tword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,RSP
FSTP tword ptr [RAX]
CALL 0x001b2970
MOV qword ptr [RSP + 0xb8],RAX
LAB_001b2911:
JMP 0x001b2913
LAB_001b2913:
MOV RAX,qword ptr [RSP + 0xb8]
ADD RSP,0xc8
RET
|
int8
_ZN3fmt3v106detail5writeIcNS0_8appenderEeTnNSt9enable_ifIXsr17is_floating_pointIT1_EE5valueEiE4typeELi0EEET0_S8_S5_NS0_12format_specsIT_EENS1_10locale_refE
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,longdouble param_7)
{
bool bVar1;
ulong uVar2;
int1 local_78 [40];
int8 local_50;
longdouble local_48;
int8 local_30;
int8 local_28;
int8 local_20;
int8 local_18;
int8 local_10;
byte local_1;
local_48 = param_7;
local_30 = param_4;
local_28 = param_2;
local_20 = param_3;
local_18 = param_1;
bVar1 = fmt::v10::detail::is_supported_floating_point<long_double>(param_7);
local_1 = (bVar1 ^ 0xffU) & 1;
if (local_1 == 0) {
if ((local_20._1_2_ >> 8 & 1) != 0) {
local_50 = local_18;
_ZN3fmt3v109loc_valueC2IeTnNSt9enable_ifIXntsr6detail11is_float128IT_EE5valueEiE4typeELi0EEES4_
(local_78);
uVar2 = fmt::v10::detail::write_loc(local_50,&local_28,local_30);
if ((uVar2 & 1) != 0) {
return local_18;
}
}
local_10 = fmt::v10::detail::write_float<char,fmt::v10::appender,long_double>
(local_18,local_28,local_20,local_30,param_5,param_6,SUB108(local_48,0),
(short)((unkuint10)local_48 >> 0x40));
}
else {
local_10 = local_18;
}
return local_10;
}
| ||
28,087 | fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, long double, 0>(fmt::v10::appender, long double, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR20 auto write(OutputIt out, T value, format_specs<Char> specs,
locale_ref loc = {}) -> OutputIt {
if (const_check(!is_supported_floating_point(value))) return out;
return specs.localized && write_loc(out, value, specs, loc)
? out
: write_float(out, value, specs, loc);
} | O3 | c | fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, long double, 0>(fmt::v10::appender, long double, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref):
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rcx, %rbx
movq %rdi, %r14
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
btl $0x10, %edx
jae 0x41f5e
movl $0xa, 0x50(%rsp)
movsd %xmm0, 0x38(%rsp)
movsd %xmm0, 0x40(%rsp)
movaps 0x40(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x34fc2
testb %al, %al
jne 0x41f6c
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movsd 0x38(%rsp), %xmm0
movq %r14, %rdi
movq %rbx, %rcx
callq 0x41f77
movq %rax, %r14
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
| _ZN3fmt3v106detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr17is_floating_pointIT1_EE5valueEiE4typeELi0EEET0_S8_S5_NS0_12format_specsIT_EENS1_10locale_refE:
push r14
push rbx
sub rsp, 68h
mov rbx, rcx
mov r14, rdi
mov [rsp+78h+var_50], rsi
mov [rsp+78h+var_48], rdx
bt edx, 10h
jnb short loc_41F5E
mov dword ptr [rsp+78h+var_28], 0Ah
movsd [rsp+78h+var_40], xmm0
movsd qword ptr [rsp+78h+var_38], xmm0
movaps xmm0, [rsp+78h+var_38]
movaps xmm1, [rsp+78h+var_28]
movaps [rsp+78h+var_68], xmm1
movaps [rsp+78h+var_78], xmm0
lea rsi, [rsp+78h+var_50]
mov rdi, r14
mov rdx, rbx
call _ZN3fmt3v106detail9write_locENS0_8appenderENS0_9loc_valueERKNS0_12format_specsIcEENS1_10locale_refE; fmt::v10::detail::write_loc(fmt::v10::appender,fmt::v10::loc_value,fmt::v10::format_specs<char> const&,fmt::v10::detail::locale_ref)
test al, al
jnz short loc_41F6C
mov rsi, [rsp+78h+var_50]
mov rdx, [rsp+78h+var_48]
movsd xmm0, [rsp+78h+var_40]
loc_41F5E:
mov rdi, r14; int
mov rcx, rbx
call _ZN3fmt3v106detail11write_floatIcNS0_8appenderEdEET0_S4_T1_NS0_12format_specsIT_EENS1_10locale_refE; fmt::v10::detail::write_float<char,fmt::v10::appender,double>(fmt::v10::appender,double,fmt::v10::format_specs<char>,fmt::v10::detail::locale_ref)
mov r14, rax
loc_41F6C:
mov rax, r14
add rsp, 68h
pop rbx
pop r14
retn
| long long ZN3fmt3v106detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr17is_floating_pointIT1_EE5valueEiE4typeELi0EEET0_S8_S5_NS0_12format_specsIT_EENS1_10locale_refE(
long long a1,
long long a2,
long long a3,
const std::locale *a4,
long long a5,
long long a6,
double a7)
{
long long v7; // r14
_QWORD v9[5]; // [rsp+28h] [rbp-50h] BYREF
long long v10; // [rsp+50h] [rbp-28h]
long long v11; // [rsp+58h] [rbp-20h]
v7 = a1;
v9[0] = a2;
v9[1] = a3;
if ( (a3 & 0x10000) == 0 )
return fmt::v10::detail::write_float<char,fmt::v10::appender,double>(a1);
LODWORD(v10) = 10;
*(double *)&v9[2] = a7;
*(double *)&v9[3] = a7;
if ( !(unsigned __int8)fmt::v10::detail::write_loc(
a1,
(long long)v9,
a4,
(long long)a4,
a5,
a6,
*(long long *)&a7,
v9[4],
v10,
v11) )
return fmt::v10::detail::write_float<char,fmt::v10::appender,double>(a1);
return v7;
}
| _ZN3fmt3v106detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr17is_floating_pointIT1_EE5valueEiE4typeELi0EEET0_S8_S5_NS0_12format_specsIT_EENS1_10locale_refE:
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV RBX,RCX
MOV R14,RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
BT EDX,0x10
JNC 0x00141f5e
MOV dword ptr [RSP + 0x50],0xa
MOVSD qword ptr [RSP + 0x38],XMM0
MOVSD qword ptr [RSP + 0x40],XMM0
MOVAPS XMM0,xmmword ptr [RSP + 0x40]
MOVAPS XMM1,xmmword ptr [RSP + 0x50]
MOVAPS xmmword ptr [RSP + 0x10],XMM1
MOVAPS xmmword ptr [RSP],XMM0
LEA RSI,[RSP + 0x28]
MOV RDI,R14
MOV RDX,RBX
CALL 0x00134fc2
TEST AL,AL
JNZ 0x00141f6c
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
MOVSD XMM0,qword ptr [RSP + 0x38]
LAB_00141f5e:
MOV RDI,R14
MOV RCX,RBX
CALL 0x00141f77
MOV R14,RAX
LAB_00141f6c:
MOV RAX,R14
ADD RSP,0x68
POP RBX
POP R14
RET
|
int8
_ZN3fmt3v106detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr17is_floating_pointIT1_EE5valueEiE4typeELi0EEET0_S8_S5_NS0_12format_specsIT_EENS1_10locale_refE
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
char cVar1;
int8 uVar2;
detail *pdVar3;
int8 local_50;
int8 local_48;
int8 local_40;
int8 local_38;
int4 local_28;
pdVar3._0_4_ = (detail *)param_1;
local_50 = param_3;
local_48 = param_4;
if (((uint)param_4 >> 0x10 & 1) != 0) {
local_28 = 10;
local_40 = param_1;
local_38 = param_1;
cVar1 = fmt::v10::detail::write_loc(param_2,&local_50,param_5);
if (cVar1 != '\0') {
return param_2;
}
pdVar3._0_4_ = (detail *)local_40;
}
uVar2 = fmt::v10::detail::write_float<char,fmt::v10::appender,double>
(pdVar3._0_4_,param_2,local_50,local_48,param_5);
return uVar2;
}
| |
28,088 | parse_time | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static int parse_time(const char *str, size_t length, const char **end_ptr, MYSQL_TIME *tm)
{
int err= 0;
const char *p = str;
const char *end = str + length;
size_t frac_len;
int ret=1;
tm->hour = my_strtoui(p, end-p, &p, &err);
if (err || tm->hour > 838 || p == end || *p != ':' )
goto end;
p++;
tm->minute = my_strtoui(p, end-p, &p, &err);
if (err || tm->minute > 59 || p == end || *p != ':')
goto end;
p++;
tm->second = my_strtoui(p, end-p, &p, &err);
if (err || tm->second > 59)
goto end;
ret = 0;
tm->second_part = 0;
if (p == end)
goto end;
/* Check for fractional part*/
if (*p != '.')
goto end;
p++;
frac_len = MIN(6,end-p);
tm->second_part = my_strtoui(p, frac_len, &p, &err);
if (err)
goto end;
if (frac_len < 6)
tm->second_part *= frac_mul[frac_len];
ret = 0;
/* Consume whole fractional part, even after 6 digits.*/
p += frac_len;
while(p < *end_ptr)
{
if (*p < '0' || *p > '9')
break;
p++;
}
end:
*end_ptr = p;
return ret;
} | O3 | c | parse_time:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movl $0x0, -0x24(%rbp)
leaq (%rdi,%rsi), %rax
testq %rsi, %rsi
jle 0x23d6c
movabsq $0x1999999999999999, %r8 # imm = 0x1999999999999999
xorl %edx, %edx
xorl %esi, %esi
xorl %ecx, %ecx
movsbq (%rdi,%rsi), %r9
leal -0x3a(%r9), %r10d
cmpb $-0xa, %r10b
jb 0x23d7c
cmpq %r8, %rcx
ja 0x23d70
leaq (%rcx,%rcx), %r10
leaq (%r10,%r10,4), %r10
movl $0x2f, %r11d
subq %r9, %r11
cmpq %r11, %r10
ja 0x23d70
leaq (%r10,%r9), %rcx
addq $-0x30, %rcx
leaq (%rdi,%rsi), %r9
incq %r9
incq %rsi
cmpq %rax, %r9
jb 0x23d24
addq %rsi, %rdi
xorl %edx, %edx
jmp 0x23d92
xorl %ecx, %ecx
jmp 0x23d86
movl $0x22, -0x24(%rbp)
movl $0x22, %edx
testq %rsi, %rsi
je 0x23d86
addq %rsi, %rdi
jmp 0x23d92
movl $0x22, -0x24(%rbp)
movl $0x22, %edx
movq %rdi, -0x30(%rbp)
movq %rcx, %rsi
shrq $0x20, %rsi
movl %ecx, 0xc(%r14)
movl $0x1, %r15d
jne 0x23e73
testl %edx, %edx
setne %dl
cmpl $0x347, %ecx # imm = 0x347
setae %cl
orb %dl, %cl
cmpq %rax, %rdi
sete %dl
orb %cl, %dl
jne 0x23e73
cmpb $0x3a, (%rdi)
jne 0x23e73
incq %rdi
movq %rdi, -0x30(%rbp)
movq %rax, %rcx
subq %rdi, %rcx
testq %rcx, %rcx
jle 0x23e3e
movabsq $0x1999999999999999, %r8 # imm = 0x1999999999999999
xorl %edx, %edx
xorl %esi, %esi
xorl %ecx, %ecx
movsbq (%rdi,%rsi), %r9
leal -0x3a(%r9), %r10d
cmpb $-0xa, %r10b
jb 0x23e4e
cmpq %r8, %rcx
ja 0x23e42
leaq (%rcx,%rcx), %r10
leaq (%r10,%r10,4), %r10
movl $0x2f, %r11d
subq %r9, %r11
cmpq %r11, %r10
ja 0x23e42
leaq (%r10,%r9), %rcx
addq $-0x30, %rcx
leaq (%rdi,%rsi), %r9
incq %r9
incq %rsi
cmpq %rax, %r9
jb 0x23df6
addq %rsi, %rdi
xorl %edx, %edx
jmp 0x23e62
xorl %ecx, %ecx
jmp 0x23e56
movl $0x22, -0x24(%rbp)
movl $0x22, %edx
addq %rsi, %rdi
testq %rsi, %rsi
jne 0x23e62
movl $0x22, -0x24(%rbp)
movl $0x22, %edx
movq %rdi, -0x30(%rbp)
movq %rcx, %rsi
shrq $0x20, %rsi
movl %ecx, 0x10(%r14)
je 0x23e8a
movq -0x30(%rbp), %rax
movq %rax, (%rbx)
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x3b, %ecx
ja 0x23e73
testl %edx, %edx
jne 0x23e73
cmpq %rax, %rdi
je 0x23e73
cmpb $0x3a, (%rdi)
jne 0x23e73
incq %rdi
movq %rdi, -0x30(%rbp)
movq %rax, %rcx
subq %rdi, %rcx
testq %rcx, %rcx
jle 0x23f07
movabsq $0x1999999999999999, %r8 # imm = 0x1999999999999999
xorl %edx, %edx
xorl %esi, %esi
xorl %ecx, %ecx
movsbq (%rdi,%rsi), %r9
leal -0x3a(%r9), %r10d
cmpb $-0xa, %r10b
jb 0x23f17
cmpq %r8, %rcx
ja 0x23f0b
leaq (%rcx,%rcx), %r10
leaq (%r10,%r10,4), %r10
movl $0x2f, %r11d
subq %r9, %r11
cmpq %r11, %r10
ja 0x23f0b
leaq (%r10,%r9), %rcx
addq $-0x30, %rcx
leaq (%rdi,%rsi), %r9
incq %r9
incq %rsi
cmpq %rax, %r9
jb 0x23ebf
addq %rsi, %rdi
xorl %edx, %edx
jmp 0x23f2b
xorl %ecx, %ecx
jmp 0x23f1f
movl $0x22, -0x24(%rbp)
movl $0x22, %edx
addq %rsi, %rdi
testq %rsi, %rsi
jne 0x23f2b
movl $0x22, -0x24(%rbp)
movl $0x22, %edx
movq %rdi, -0x30(%rbp)
movq %rcx, %rsi
shrq $0x20, %rsi
movl %ecx, 0x14(%r14)
jne 0x23e73
testl %edx, %edx
setne %dl
cmpl $0x3c, %ecx
setae %cl
orb %dl, %cl
jne 0x23e73
movq $0x0, 0x18(%r14)
xorl %r15d, %r15d
cmpq %rax, %rdi
je 0x23e73
cmpb $0x2e, (%rdi)
jne 0x23e73
incq %rdi
leaq -0x30(%rbp), %rdx
movq %rdi, (%rdx)
subq %rdi, %rax
cmpq $0x6, %rax
movl $0x6, %r12d
cmovlq %rax, %r12
leaq -0x24(%rbp), %rcx
movq %r12, %rsi
callq 0x24dc8
movq %rax, %rcx
shrq $0x20, %rcx
je 0x23fab
movl %eax, %eax
movq %rax, 0x18(%r14)
jmp 0x23e73
cmpl $0x0, -0x24(%rbp)
movq %rax, 0x18(%r14)
jne 0x23e73
cmpq $0x5, %r12
ja 0x23fd2
leaq 0x1539a(%rip), %rcx # 0x39360
movl (%rcx,%r12,4), %ecx
imulq %rcx, %rax
movq %rax, 0x18(%r14)
addq -0x30(%rbp), %r12
movq (%rbx), %rax
cmpq %rax, %r12
jae 0x23ff5
movb (%r12), %cl
addb $-0x3a, %cl
cmpb $-0xa, %cl
jb 0x23ff5
incq %r12
cmpq %rax, %r12
jb 0x23fde
movq %rax, %r12
movq %r12, -0x30(%rbp)
jmp 0x23e73
| parse_time:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r14, rcx
mov rbx, rdx
mov [rbp+var_24], 0
lea rax, [rdi+rsi]
test rsi, rsi
jle short loc_23D6C
mov r8, 1999999999999999h
xor edx, edx
xor esi, esi
xor ecx, ecx
loc_23D24:
movsx r9, byte ptr [rdi+rsi]
lea r10d, [r9-3Ah]
cmp r10b, 0F6h
jb short loc_23D7C
cmp rcx, r8
ja short loc_23D70
lea r10, [rcx+rcx]
lea r10, [r10+r10*4]
mov r11d, 2Fh ; '/'
sub r11, r9
cmp r10, r11
ja short loc_23D70
lea rcx, [r10+r9]
add rcx, 0FFFFFFFFFFFFFFD0h
lea r9, [rdi+rsi]
inc r9
inc rsi
cmp r9, rax
jb short loc_23D24
add rdi, rsi
xor edx, edx
jmp short loc_23D92
loc_23D6C:
xor ecx, ecx
jmp short loc_23D86
loc_23D70:
mov [rbp+var_24], 22h ; '"'
mov edx, 22h ; '"'
loc_23D7C:
test rsi, rsi
jz short loc_23D86
add rdi, rsi
jmp short loc_23D92
loc_23D86:
mov [rbp+var_24], 22h ; '"'
mov edx, 22h ; '"'
loc_23D92:
mov [rbp+var_30], rdi
mov rsi, rcx
shr rsi, 20h
mov [r14+0Ch], ecx
mov r15d, 1
jnz loc_23E73
test edx, edx
setnz dl
cmp ecx, 347h
setnb cl
or cl, dl
cmp rdi, rax
setz dl
or dl, cl
jnz loc_23E73
cmp byte ptr [rdi], 3Ah ; ':'
jnz loc_23E73
inc rdi
mov [rbp+var_30], rdi
mov rcx, rax
sub rcx, rdi
test rcx, rcx
jle short loc_23E3E
mov r8, 1999999999999999h
xor edx, edx
xor esi, esi
xor ecx, ecx
loc_23DF6:
movsx r9, byte ptr [rdi+rsi]
lea r10d, [r9-3Ah]
cmp r10b, 0F6h
jb short loc_23E4E
cmp rcx, r8
ja short loc_23E42
lea r10, [rcx+rcx]
lea r10, [r10+r10*4]
mov r11d, 2Fh ; '/'
sub r11, r9
cmp r10, r11
ja short loc_23E42
lea rcx, [r10+r9]
add rcx, 0FFFFFFFFFFFFFFD0h
lea r9, [rdi+rsi]
inc r9
inc rsi
cmp r9, rax
jb short loc_23DF6
add rdi, rsi
xor edx, edx
jmp short loc_23E62
loc_23E3E:
xor ecx, ecx
jmp short loc_23E56
loc_23E42:
mov [rbp+var_24], 22h ; '"'
mov edx, 22h ; '"'
loc_23E4E:
add rdi, rsi
test rsi, rsi
jnz short loc_23E62
loc_23E56:
mov [rbp+var_24], 22h ; '"'
mov edx, 22h ; '"'
loc_23E62:
mov [rbp+var_30], rdi
mov rsi, rcx
shr rsi, 20h
mov [r14+10h], ecx
jz short loc_23E8A
loc_23E73:
mov rax, [rbp+var_30]
mov [rbx], rax
mov eax, r15d
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_23E8A:
cmp ecx, 3Bh ; ';'
ja short loc_23E73
test edx, edx
jnz short loc_23E73
cmp rdi, rax
jz short loc_23E73
cmp byte ptr [rdi], 3Ah ; ':'
jnz short loc_23E73
inc rdi
mov [rbp+var_30], rdi
mov rcx, rax
sub rcx, rdi
test rcx, rcx
jle short loc_23F07
mov r8, 1999999999999999h
xor edx, edx
xor esi, esi
xor ecx, ecx
loc_23EBF:
movsx r9, byte ptr [rdi+rsi]
lea r10d, [r9-3Ah]
cmp r10b, 0F6h
jb short loc_23F17
cmp rcx, r8
ja short loc_23F0B
lea r10, [rcx+rcx]
lea r10, [r10+r10*4]
mov r11d, 2Fh ; '/'
sub r11, r9
cmp r10, r11
ja short loc_23F0B
lea rcx, [r10+r9]
add rcx, 0FFFFFFFFFFFFFFD0h
lea r9, [rdi+rsi]
inc r9
inc rsi
cmp r9, rax
jb short loc_23EBF
add rdi, rsi
xor edx, edx
jmp short loc_23F2B
loc_23F07:
xor ecx, ecx
jmp short loc_23F1F
loc_23F0B:
mov [rbp+var_24], 22h ; '"'
mov edx, 22h ; '"'
loc_23F17:
add rdi, rsi
test rsi, rsi
jnz short loc_23F2B
loc_23F1F:
mov [rbp+var_24], 22h ; '"'
mov edx, 22h ; '"'
loc_23F2B:
mov [rbp+var_30], rdi
mov rsi, rcx
shr rsi, 20h
mov [r14+14h], ecx
jnz loc_23E73
test edx, edx
setnz dl
cmp ecx, 3Ch ; '<'
setnb cl
or cl, dl
jnz loc_23E73
mov qword ptr [r14+18h], 0
xor r15d, r15d
cmp rdi, rax
jz loc_23E73
cmp byte ptr [rdi], 2Eh ; '.'
jnz loc_23E73
inc rdi
lea rdx, [rbp+var_30]
mov [rdx], rdi
sub rax, rdi
cmp rax, 6
mov r12d, 6
cmovl r12, rax
lea rcx, [rbp+var_24]
mov rsi, r12
call my_strtoull
mov rcx, rax
shr rcx, 20h
jz short loc_23FAB
mov eax, eax
mov [r14+18h], rax
jmp loc_23E73
loc_23FAB:
cmp [rbp+var_24], 0
mov [r14+18h], rax
jnz loc_23E73
cmp r12, 5
ja short loc_23FD2
lea rcx, frac_mul
mov ecx, [rcx+r12*4]
imul rax, rcx
mov [r14+18h], rax
loc_23FD2:
add r12, [rbp+var_30]
mov rax, [rbx]
cmp r12, rax
jnb short loc_23FF5
loc_23FDE:
mov cl, [r12]
add cl, 0C6h
cmp cl, 0F6h
jb short loc_23FF5
inc r12
cmp r12, rax
jb short loc_23FDE
mov r12, rax
loc_23FF5:
mov [rbp+var_30], r12
jmp loc_23E73
| long long parse_time(_BYTE *a1, long long a2, _BYTE **a3, long long a4, long long a5)
{
_BYTE *v7; // rax
int v8; // edx
long long v9; // rsi
unsigned long long v10; // rcx
long long v11; // r9
unsigned long long v12; // r9
unsigned int v13; // r15d
_BYTE *v14; // rdi
int v15; // edx
long long v16; // rsi
unsigned long long v17; // rcx
long long v18; // r9
unsigned long long v19; // r9
_BYTE *v21; // rdi
int v22; // edx
long long v23; // rsi
unsigned long long v24; // rcx
long long v25; // r9
unsigned long long v26; // r9
_BYTE *v27; // rdi
long long v28; // rax
unsigned long long v29; // r12
unsigned long long v30; // rax
bool v31; // zf
_BYTE *v32; // r12
_BYTE *v33; // [rsp+0h] [rbp-30h] BYREF
int v34[9]; // [rsp+Ch] [rbp-24h] BYREF
v34[0] = 0;
v7 = &a1[a2];
if ( a2 <= 0 )
{
v10 = 0LL;
LABEL_12:
v34[0] = 34;
v8 = 34;
goto LABEL_13;
}
a5 = 0x1999999999999999LL;
v8 = 0;
v9 = 0LL;
v10 = 0LL;
while ( 1 )
{
v11 = (char)a1[v9];
if ( (unsigned __int8)(v11 - 58) < 0xF6u )
break;
if ( v10 > 0x1999999999999999LL || 10 * v10 > 47 - v11 )
{
v34[0] = 34;
v8 = 34;
break;
}
v10 = 10 * v10 + v11 - 48;
v12 = (unsigned long long)&a1[++v9];
if ( v12 >= (unsigned long long)v7 )
{
a1 += v9;
v8 = 0;
goto LABEL_13;
}
}
if ( !v9 )
goto LABEL_12;
a1 += v9;
LABEL_13:
v33 = a1;
*(_DWORD *)(a4 + 12) = v10;
v13 = 1;
if ( HIDWORD(v10) || v8 != 0 || (unsigned int)v10 >= 0x347 || a1 == v7 || *a1 != 58 )
goto LABEL_28;
v14 = a1 + 1;
v33 = v14;
if ( v7 - v14 <= 0 )
{
v17 = 0LL;
LABEL_26:
v34[0] = 34;
v15 = 34;
goto LABEL_27;
}
a5 = 0x1999999999999999LL;
v15 = 0;
v16 = 0LL;
v17 = 0LL;
while ( 1 )
{
v18 = (char)v14[v16];
if ( (unsigned __int8)(v18 - 58) < 0xF6u )
break;
if ( v17 > 0x1999999999999999LL || 10 * v17 > 47 - v18 )
{
v34[0] = 34;
v15 = 34;
break;
}
v17 = 10 * v17 + v18 - 48;
v19 = (unsigned long long)&v14[++v16];
if ( v19 >= (unsigned long long)v7 )
{
v14 += v16;
v15 = 0;
goto LABEL_27;
}
}
v14 += v16;
if ( !v16 )
goto LABEL_26;
LABEL_27:
v33 = v14;
*(_DWORD *)(a4 + 16) = v17;
if ( HIDWORD(v17) || (unsigned int)v17 > 0x3B || v15 || v14 == v7 || *v14 != 58 )
goto LABEL_28;
v21 = v14 + 1;
v33 = v21;
if ( v7 - v21 <= 0 )
{
v24 = 0LL;
}
else
{
a5 = 0x1999999999999999LL;
v22 = 0;
v23 = 0LL;
v24 = 0LL;
while ( 1 )
{
v25 = (char)v21[v23];
if ( (unsigned __int8)(v25 - 58) < 0xF6u )
break;
if ( v24 > 0x1999999999999999LL || 10 * v24 > 47 - v25 )
{
v34[0] = 34;
v22 = 34;
break;
}
v24 = 10 * v24 + v25 - 48;
v26 = (unsigned long long)&v21[++v23];
if ( v26 >= (unsigned long long)v7 )
{
v21 += v23;
v22 = 0;
goto LABEL_44;
}
}
v21 += v23;
if ( v23 )
goto LABEL_44;
}
v34[0] = 34;
v22 = 34;
LABEL_44:
v33 = v21;
*(_DWORD *)(a4 + 20) = v24;
if ( !HIDWORD(v24) && v22 == 0 && (unsigned int)v24 < 0x3C )
{
*(_QWORD *)(a4 + 24) = 0LL;
v13 = 0;
if ( v21 != v7 && *v21 == 46 )
{
v27 = v21 + 1;
v33 = v27;
v28 = v7 - v27;
v29 = 6LL;
if ( v28 < 6 )
v29 = v28;
v30 = my_strtoull(v27, v29, &v33, v34, a5);
if ( HIDWORD(v30) )
{
*(_QWORD *)(a4 + 24) = (unsigned int)v30;
}
else
{
v31 = v34[0] == 0;
*(_QWORD *)(a4 + 24) = v30;
if ( v31 )
{
if ( v29 <= 5 )
*(_QWORD *)(a4 + 24) = frac_mul[v29] * v30;
v32 = &v33[v29];
if ( v32 < *a3 )
{
while ( (unsigned __int8)(*v32 - 58) >= 0xF6u )
{
if ( ++v32 >= *a3 )
{
v32 = *a3;
break;
}
}
}
v33 = v32;
}
}
}
}
LABEL_28:
*a3 = v33;
return v13;
}
| parse_time:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R14,RCX
MOV RBX,RDX
MOV dword ptr [RBP + -0x24],0x0
LEA RAX,[RDI + RSI*0x1]
TEST RSI,RSI
JLE 0x00123d6c
MOV R8,0x1999999999999999
XOR EDX,EDX
XOR ESI,ESI
XOR ECX,ECX
LAB_00123d24:
MOVSX R9,byte ptr [RDI + RSI*0x1]
LEA R10D,[R9 + -0x3a]
CMP R10B,0xf6
JC 0x00123d7c
CMP RCX,R8
JA 0x00123d70
LEA R10,[RCX + RCX*0x1]
LEA R10,[R10 + R10*0x4]
MOV R11D,0x2f
SUB R11,R9
CMP R10,R11
JA 0x00123d70
LEA RCX,[R10 + R9*0x1]
ADD RCX,-0x30
LEA R9,[RDI + RSI*0x1]
INC R9
INC RSI
CMP R9,RAX
JC 0x00123d24
ADD RDI,RSI
XOR EDX,EDX
JMP 0x00123d92
LAB_00123d6c:
XOR ECX,ECX
JMP 0x00123d86
LAB_00123d70:
MOV dword ptr [RBP + -0x24],0x22
MOV EDX,0x22
LAB_00123d7c:
TEST RSI,RSI
JZ 0x00123d86
ADD RDI,RSI
JMP 0x00123d92
LAB_00123d86:
MOV dword ptr [RBP + -0x24],0x22
MOV EDX,0x22
LAB_00123d92:
MOV qword ptr [RBP + -0x30],RDI
MOV RSI,RCX
SHR RSI,0x20
MOV dword ptr [R14 + 0xc],ECX
MOV R15D,0x1
JNZ 0x00123e73
TEST EDX,EDX
SETNZ DL
CMP ECX,0x347
SETNC CL
OR CL,DL
CMP RDI,RAX
SETZ DL
OR DL,CL
JNZ 0x00123e73
CMP byte ptr [RDI],0x3a
JNZ 0x00123e73
INC RDI
MOV qword ptr [RBP + -0x30],RDI
MOV RCX,RAX
SUB RCX,RDI
TEST RCX,RCX
JLE 0x00123e3e
MOV R8,0x1999999999999999
XOR EDX,EDX
XOR ESI,ESI
XOR ECX,ECX
LAB_00123df6:
MOVSX R9,byte ptr [RDI + RSI*0x1]
LEA R10D,[R9 + -0x3a]
CMP R10B,0xf6
JC 0x00123e4e
CMP RCX,R8
JA 0x00123e42
LEA R10,[RCX + RCX*0x1]
LEA R10,[R10 + R10*0x4]
MOV R11D,0x2f
SUB R11,R9
CMP R10,R11
JA 0x00123e42
LEA RCX,[R10 + R9*0x1]
ADD RCX,-0x30
LEA R9,[RDI + RSI*0x1]
INC R9
INC RSI
CMP R9,RAX
JC 0x00123df6
ADD RDI,RSI
XOR EDX,EDX
JMP 0x00123e62
LAB_00123e3e:
XOR ECX,ECX
JMP 0x00123e56
LAB_00123e42:
MOV dword ptr [RBP + -0x24],0x22
MOV EDX,0x22
LAB_00123e4e:
ADD RDI,RSI
TEST RSI,RSI
JNZ 0x00123e62
LAB_00123e56:
MOV dword ptr [RBP + -0x24],0x22
MOV EDX,0x22
LAB_00123e62:
MOV qword ptr [RBP + -0x30],RDI
MOV RSI,RCX
SHR RSI,0x20
MOV dword ptr [R14 + 0x10],ECX
JZ 0x00123e8a
LAB_00123e73:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBX],RAX
MOV EAX,R15D
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00123e8a:
CMP ECX,0x3b
JA 0x00123e73
TEST EDX,EDX
JNZ 0x00123e73
CMP RDI,RAX
JZ 0x00123e73
CMP byte ptr [RDI],0x3a
JNZ 0x00123e73
INC RDI
MOV qword ptr [RBP + -0x30],RDI
MOV RCX,RAX
SUB RCX,RDI
TEST RCX,RCX
JLE 0x00123f07
MOV R8,0x1999999999999999
XOR EDX,EDX
XOR ESI,ESI
XOR ECX,ECX
LAB_00123ebf:
MOVSX R9,byte ptr [RDI + RSI*0x1]
LEA R10D,[R9 + -0x3a]
CMP R10B,0xf6
JC 0x00123f17
CMP RCX,R8
JA 0x00123f0b
LEA R10,[RCX + RCX*0x1]
LEA R10,[R10 + R10*0x4]
MOV R11D,0x2f
SUB R11,R9
CMP R10,R11
JA 0x00123f0b
LEA RCX,[R10 + R9*0x1]
ADD RCX,-0x30
LEA R9,[RDI + RSI*0x1]
INC R9
INC RSI
CMP R9,RAX
JC 0x00123ebf
ADD RDI,RSI
XOR EDX,EDX
JMP 0x00123f2b
LAB_00123f07:
XOR ECX,ECX
JMP 0x00123f1f
LAB_00123f0b:
MOV dword ptr [RBP + -0x24],0x22
MOV EDX,0x22
LAB_00123f17:
ADD RDI,RSI
TEST RSI,RSI
JNZ 0x00123f2b
LAB_00123f1f:
MOV dword ptr [RBP + -0x24],0x22
MOV EDX,0x22
LAB_00123f2b:
MOV qword ptr [RBP + -0x30],RDI
MOV RSI,RCX
SHR RSI,0x20
MOV dword ptr [R14 + 0x14],ECX
JNZ 0x00123e73
TEST EDX,EDX
SETNZ DL
CMP ECX,0x3c
SETNC CL
OR CL,DL
JNZ 0x00123e73
MOV qword ptr [R14 + 0x18],0x0
XOR R15D,R15D
CMP RDI,RAX
JZ 0x00123e73
CMP byte ptr [RDI],0x2e
JNZ 0x00123e73
INC RDI
LEA RDX,[RBP + -0x30]
MOV qword ptr [RDX],RDI
SUB RAX,RDI
CMP RAX,0x6
MOV R12D,0x6
CMOVL R12,RAX
LEA RCX,[RBP + -0x24]
MOV RSI,R12
CALL 0x00124dc8
MOV RCX,RAX
SHR RCX,0x20
JZ 0x00123fab
MOV EAX,EAX
MOV qword ptr [R14 + 0x18],RAX
JMP 0x00123e73
LAB_00123fab:
CMP dword ptr [RBP + -0x24],0x0
MOV qword ptr [R14 + 0x18],RAX
JNZ 0x00123e73
CMP R12,0x5
JA 0x00123fd2
LEA RCX,[0x139360]
MOV ECX,dword ptr [RCX + R12*0x4]
IMUL RAX,RCX
MOV qword ptr [R14 + 0x18],RAX
LAB_00123fd2:
ADD R12,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBX]
CMP R12,RAX
JNC 0x00123ff5
LAB_00123fde:
MOV CL,byte ptr [R12]
ADD CL,0xc6
CMP CL,0xf6
JC 0x00123ff5
INC R12
CMP R12,RAX
JC 0x00123fde
MOV R12,RAX
LAB_00123ff5:
MOV qword ptr [RBP + -0x30],R12
JMP 0x00123e73
|
int8 parse_time(char *param_1,long param_2,ulong *param_3,long param_4)
{
char cVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
int iVar5;
long lVar6;
char *pcVar7;
int8 uVar8;
int8 uVar9;
char *local_38;
int local_2c;
local_2c = 0;
pcVar7 = param_1 + param_2;
if (param_2 < 1) {
uVar4 = 0;
LAB_00123d86:
local_2c = 0x22;
iVar5 = 0x22;
}
else {
iVar5 = 0;
lVar6 = 0;
uVar4 = 0;
do {
cVar1 = param_1[lVar6];
if ((byte)(cVar1 - 0x3aU) < 0xf6) {
LAB_00123d7c:
if (lVar6 == 0) goto LAB_00123d86;
param_1 = param_1 + lVar6;
goto LAB_00123d92;
}
if ((0x1999999999999999 < uVar4) || (0x2fU - (long)cVar1 < uVar4 * 10)) {
local_2c = 0x22;
iVar5 = 0x22;
goto LAB_00123d7c;
}
uVar4 = (uVar4 * 10 + (long)cVar1) - 0x30;
lVar2 = lVar6 + 1;
lVar6 = lVar6 + 1;
} while (param_1 + lVar2 < pcVar7);
param_1 = param_1 + lVar6;
iVar5 = 0;
}
LAB_00123d92:
*(uint *)(param_4 + 0xc) = (uint)uVar4;
uVar8 = 1;
local_38 = param_1;
if (((uVar4 >> 0x20 == 0) &&
(local_38 = param_1, param_1 != pcVar7 && ((uint)uVar4 < 0x347 && iVar5 == 0))) &&
(local_38 = param_1, *param_1 == ':')) {
local_38 = param_1 + 1;
if (pcVar7 == local_38 || (long)pcVar7 - (long)local_38 < 0) {
uVar4 = 0;
LAB_00123e56:
local_2c = 0x22;
iVar5 = 0x22;
}
else {
iVar5 = 0;
lVar6 = 0;
uVar4 = 0;
do {
cVar1 = local_38[lVar6];
if ((byte)(cVar1 - 0x3aU) < 0xf6) {
LAB_00123e4e:
local_38 = local_38 + lVar6;
if (lVar6 == 0) goto LAB_00123e56;
goto LAB_00123e62;
}
if ((0x1999999999999999 < uVar4) || (0x2fU - (long)cVar1 < uVar4 * 10)) {
local_2c = 0x22;
iVar5 = 0x22;
goto LAB_00123e4e;
}
uVar4 = (uVar4 * 10 + (long)cVar1) - 0x30;
lVar2 = lVar6 + 1;
lVar6 = lVar6 + 1;
} while (local_38 + lVar2 < pcVar7);
local_38 = local_38 + lVar6;
iVar5 = 0;
}
LAB_00123e62:
*(uint *)(param_4 + 0x10) = (uint)uVar4;
if (((uVar4 >> 0x20 == 0) && ((uint)uVar4 < 0x3c)) &&
((iVar5 == 0 && ((local_38 != pcVar7 && (*local_38 == ':')))))) {
local_38 = local_38 + 1;
if (pcVar7 == local_38 || (long)pcVar7 - (long)local_38 < 0) {
uVar4 = 0;
LAB_00123f1f:
local_2c = 0x22;
iVar5 = 0x22;
}
else {
iVar5 = 0;
lVar6 = 0;
uVar4 = 0;
do {
cVar1 = local_38[lVar6];
if ((byte)(cVar1 - 0x3aU) < 0xf6) {
LAB_00123f17:
local_38 = local_38 + lVar6;
if (lVar6 == 0) goto LAB_00123f1f;
goto LAB_00123f2b;
}
if ((0x1999999999999999 < uVar4) || (0x2fU - (long)cVar1 < uVar4 * 10)) {
local_2c = 0x22;
iVar5 = 0x22;
goto LAB_00123f17;
}
uVar4 = (uVar4 * 10 + (long)cVar1) - 0x30;
lVar2 = lVar6 + 1;
lVar6 = lVar6 + 1;
} while (local_38 + lVar2 < pcVar7);
local_38 = local_38 + lVar6;
iVar5 = 0;
}
LAB_00123f2b:
*(uint *)(param_4 + 0x14) = (uint)uVar4;
if ((uVar4 >> 0x20 == 0) && ((uint)uVar4 < 0x3c && iVar5 == 0)) {
*(int8 *)(param_4 + 0x18) = 0;
uVar8 = 0;
uVar9 = 0;
if ((local_38 != pcVar7) && (*local_38 == '.')) {
local_38 = local_38 + 1;
uVar4 = 6;
if ((long)pcVar7 - (long)local_38 < 6) {
uVar4 = (long)pcVar7 - (long)local_38;
}
uVar3 = my_strtoull(local_38,uVar4,&local_38,&local_2c);
if (uVar3 >> 0x20 == 0) {
*(ulong *)(param_4 + 0x18) = uVar3;
uVar8 = uVar9;
if (local_2c == 0) {
if (uVar4 < 6) {
*(ulong *)(param_4 + 0x18) = uVar3 * *(uint *)(frac_mul + uVar4 * 4);
}
pcVar7 = local_38 + uVar4;
local_38 = pcVar7;
for (; (pcVar7 < (char *)*param_3 &&
(local_38 = pcVar7, 0xf5 < (byte)(*pcVar7 - 0x3aU))); pcVar7 = pcVar7 + 1) {
local_38 = (char *)*param_3;
}
}
}
else {
*(ulong *)(param_4 + 0x18) = uVar3 & 0xffffffff;
}
}
}
}
}
*param_3 = (ulong)local_38;
return uVar8;
}
| |
28,089 | make_empty_page | eloqsql/storage/maria/ma_blockrec.c | static void make_empty_page(MARIA_HA *info, uchar *buff, uint page_type,
my_bool create_dir_entry)
{
uint block_size= info->s->block_size;
DBUG_ENTER("make_empty_page");
bzero(buff, PAGE_HEADER_SIZE(info->s));
#if !defined(DONT_ZERO_PAGE_BLOCKS) || defined(HAVE_valgrind)
/*
We zero the rest of the block to avoid getting old memory information
to disk and to allow the file to be compressed better if archived.
The code does not assume the block is zeroed.
*/
if (page_type != BLOB_PAGE)
bzero(buff+ PAGE_HEADER_SIZE(info->s),
block_size - PAGE_HEADER_SIZE(info->s));
#endif
buff[PAGE_TYPE_OFFSET]= (uchar) page_type;
buff[DIR_COUNT_OFFSET]= (int) create_dir_entry;
buff[DIR_FREE_OFFSET]= END_OF_DIR_FREE_LIST;
if (create_dir_entry)
{
/* Create directory entry to point to start of page with size 0 */
buff+= block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE;
int2store(buff, PAGE_HEADER_SIZE(info->s));
int2store(buff+2, 0);
}
DBUG_VOID_RETURN;
} | O3 | c | make_empty_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movl 0x7bc(%rax), %r13d
movl 0xc18(%rax), %edx
addl $0xc, %edx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x292a0
cmpl $0x3, %r12d
je 0x4d9c7
movq (%r14), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
leaq (%rbx,%rax), %rdi
movl %r13d, %edx
subl %eax, %edx
xorl %esi, %esi
callq 0x292a0
movb %r12b, 0x7(%rbx)
movb %r15b, 0x8(%rbx)
movb $-0x1, 0x9(%rbx)
testb %r15b, %r15b
je 0x4d9f5
addl $-0x8, %r13d
movq (%r14), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movw %ax, (%rbx,%r13)
movw $0x0, 0x2(%rbx,%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| make_empty_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, ecx
mov r12d, edx
mov rbx, rsi
mov r14, rdi
mov rax, [rdi]
mov r13d, [rax+7BCh]
mov edx, [rax+0C18h]
add edx, 0Ch
mov rdi, rsi
xor esi, esi
call _memset
cmp r12d, 3
jz short loc_4D9C7
mov rax, [r14]
mov eax, [rax+0C18h]
add eax, 0Ch
lea rdi, [rbx+rax]
mov edx, r13d
sub edx, eax
xor esi, esi
call _memset
loc_4D9C7:
mov [rbx+7], r12b
mov [rbx+8], r15b
mov byte ptr [rbx+9], 0FFh
test r15b, r15b
jz short loc_4D9F5
add r13d, 0FFFFFFF8h
mov rax, [r14]
mov eax, [rax+0C18h]
add eax, 0Ch
mov [rbx+r13], ax
mov word ptr [rbx+r13+2], 0
loc_4D9F5:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long make_empty_page(long long a1, _BYTE *a2, int a3, char a4)
{
int v6; // r13d
long long result; // rax
long long v8; // rax
v6 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL);
result = memset(a2, 0LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12));
if ( a3 != 3 )
{
v8 = (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12);
result = memset(&a2[v8], 0LL, (unsigned int)(v6 - v8));
}
a2[7] = a3;
a2[8] = a4;
a2[9] = -1;
if ( a4 )
{
result = (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12);
*(_DWORD *)&a2[v6 - 8] = (unsigned __int16)(*(_WORD *)(*(_QWORD *)a1 + 3096LL) + 12);
}
return result;
}
| make_empty_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,ECX
MOV R12D,EDX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
MOV R13D,dword ptr [RAX + 0x7bc]
MOV EDX,dword ptr [RAX + 0xc18]
ADD EDX,0xc
MOV RDI,RSI
XOR ESI,ESI
CALL 0x001292a0
CMP R12D,0x3
JZ 0x0014d9c7
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
LEA RDI,[RBX + RAX*0x1]
MOV EDX,R13D
SUB EDX,EAX
XOR ESI,ESI
CALL 0x001292a0
LAB_0014d9c7:
MOV byte ptr [RBX + 0x7],R12B
MOV byte ptr [RBX + 0x8],R15B
MOV byte ptr [RBX + 0x9],0xff
TEST R15B,R15B
JZ 0x0014d9f5
ADD R13D,-0x8
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV word ptr [RBX + R13*0x1],AX
MOV word ptr [RBX + R13*0x1 + 0x2],0x0
LAB_0014d9f5:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void make_empty_page(long *param_1,void *param_2,int param_3,char param_4)
{
int iVar1;
uint uVar2;
ulong uVar3;
iVar1 = *(int *)(*param_1 + 0x7bc);
memset(param_2,0,(ulong)(*(int *)(*param_1 + 0xc18) + 0xc));
if (param_3 != 3) {
uVar2 = *(int *)(*param_1 + 0xc18) + 0xc;
memset((void *)((long)param_2 + (ulong)uVar2),0,(ulong)(iVar1 - uVar2));
}
*(char *)((long)param_2 + 7) = (char)param_3;
*(char *)((long)param_2 + 8) = param_4;
*(int1 *)((long)param_2 + 9) = 0xff;
if (param_4 != '\0') {
uVar3 = (ulong)(iVar1 - 8);
*(short *)((long)param_2 + uVar3) = (short)*(int4 *)(*param_1 + 0xc18) + 0xc;
*(int2 *)((long)param_2 + uVar3 + 2) = 0;
}
return;
}
| |
28,090 | google::protobuf::compiler::cpp::MessageFieldGenerator::GenerateMessageClearingCode(google::protobuf::io::Printer*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/message_field.cc | void MessageFieldGenerator::GenerateMessageClearingCode(
io::Printer* printer) const {
GOOGLE_CHECK(!IsFieldStripped(descriptor_, options_));
Formatter format(printer, variables_);
if (!HasHasbit(descriptor_)) {
// If we don't have has-bits, message presence is indicated only by ptr !=
// nullptr. Thus on clear, we need to delete the object.
format(
"if (GetArenaForAllocation() == nullptr && $field$ != nullptr) {\n"
" delete $field$;\n"
"}\n"
"$field$ = nullptr;\n");
} else {
format(
"$DCHK$($field$ != nullptr);\n"
"$field$->Clear();\n");
}
} | O3 | cpp | google::protobuf::compiler::cpp::MessageFieldGenerator::GenerateMessageClearingCode(google::protobuf::io::Printer*) const:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
leaq 0x18(%rdi), %rax
leaq 0x8(%rsp), %rbx
movq %rsi, -0x8(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7e61e
movq 0x8(%r14), %rax
movb 0x1(%rax), %cl
testb $0x2, %cl
jne 0xc8fb0
movl %ecx, %edx
andb $0x60, %dl
cmpb $0x20, %dl
jne 0xc8fab
movq 0x10(%rax), %rsi
cmpb $0x2, 0x3(%rsi)
jne 0xc8fab
testb $0x10, %cl
je 0xc8fb0
cmpq $0x0, 0x28(%rax)
je 0xc8fb0
leaq 0x100cd7(%rip), %rsi # 0x1c9c80
jmp 0xc8fca
cmpb $0x40, %dl
jne 0xc8fa2
movq 0x38(%rax), %rax
leaq 0x100cc5(%rip), %rcx # 0x1c9c80
leaq 0x100d51(%rip), %rsi # 0x1c9d13
cmpb $0x0, 0x54(%rax)
cmovneq %rcx, %rsi
movq %rsp, %rdi
callq 0x39938
movq %rbx, %rdi
callq 0x2e5e0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2e5e0
movq %r14, %rdi
callq 0x1f860
nop
| _ZNK6google8protobuf8compiler3cpp21MessageFieldGenerator27GenerateMessageClearingCodeEPNS0_2io7PrinterE:
push r14
push rbx
sub rsp, 38h
mov r14, rdi
lea rax, [rdi+18h]
lea rbx, [rsp+48h+var_40]
mov [rbx-8], rsi
mov rdi, rbx
mov rsi, rax
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>> const&)
mov rax, [r14+8]
mov cl, [rax+1]
test cl, 2
jnz short loc_C8FB0
mov edx, ecx
and dl, 60h
cmp dl, 20h ; ' '
jnz short loc_C8FAB
mov rsi, [rax+10h]
cmp byte ptr [rsi+3], 2
jnz short loc_C8FAB
test cl, 10h
jz short loc_C8FB0
cmp qword ptr [rax+28h], 0
jz short loc_C8FB0
loc_C8FA2:
lea rsi, aIfGetarenafora; "if (GetArenaForAllocation() == nullptr "...
jmp short loc_C8FCA
loc_C8FAB:
cmp dl, 40h ; '@'
jnz short loc_C8FA2
loc_C8FB0:
mov rax, [rax+38h]
lea rcx, aIfGetarenafora; "if (GetArenaForAllocation() == nullptr "...
lea rsi, aDchkFieldNullp; "$DCHK$($field$ != nullptr);\n$field$->C"...
cmp byte ptr [rax+54h], 0
cmovnz rsi, rcx
loc_C8FCA:
mov rdi, rsp
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
mov rdi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
add rsp, 38h
pop rbx
pop r14
retn
mov r14, rax
mov rdi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
| long long google::protobuf::compiler::cpp::MessageFieldGenerator::GenerateMessageClearingCode(
google::protobuf::compiler::cpp::MessageFieldGenerator *this,
google::protobuf::io::Printer *a2)
{
long long v2; // rax
char v3; // cl
const char *v4; // rsi
long long result; // rax
google::protobuf::io::Printer *v6; // [rsp+0h] [rbp-48h] BYREF
_BYTE v7[64]; // [rsp+8h] [rbp-40h] BYREF
v6 = a2;
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(
(long long)v7,
(long long)this + 24);
v2 = *((_QWORD *)this + 1);
v3 = *(_BYTE *)(v2 + 1);
if ( (v3 & 2) == 0 )
{
if ( (v3 & 0x60) == 0x20 && *(_BYTE *)(*(_QWORD *)(v2 + 16) + 3LL) == 2 )
{
if ( (v3 & 0x10) != 0 && *(_QWORD *)(v2 + 40) )
goto LABEL_6;
}
else if ( (v3 & 0x60) != 0x40 )
{
LABEL_6:
v4 = "if (GetArenaForAllocation() == nullptr && $field$ != nullptr) {\n delete $field$;\n}\n$field$ = nullptr;\n";
goto LABEL_10;
}
}
v4 = "$DCHK$($field$ != nullptr);\n$field$->Clear();\n";
if ( *(_BYTE *)(*(_QWORD *)(v2 + 56) + 84LL) )
v4 = "if (GetArenaForAllocation() == nullptr && $field$ != nullptr) {\n delete $field$;\n}\n$field$ = nullptr;\n";
LABEL_10:
result = google::protobuf::compiler::cpp::Formatter::operator()<>(&v6, v4);
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree((long long)v7);
return result;
}
| GenerateMessageClearingCode:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R14,RDI
LEA RAX,[RDI + 0x18]
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX + -0x8],RSI
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0017e61e
MOV RAX,qword ptr [R14 + 0x8]
MOV CL,byte ptr [RAX + 0x1]
TEST CL,0x2
JNZ 0x001c8fb0
MOV EDX,ECX
AND DL,0x60
CMP DL,0x20
JNZ 0x001c8fab
MOV RSI,qword ptr [RAX + 0x10]
CMP byte ptr [RSI + 0x3],0x2
JNZ 0x001c8fab
TEST CL,0x10
JZ 0x001c8fb0
CMP qword ptr [RAX + 0x28],0x0
JZ 0x001c8fb0
LAB_001c8fa2:
LEA RSI,[0x2c9c80]
JMP 0x001c8fca
LAB_001c8fab:
CMP DL,0x40
JNZ 0x001c8fa2
LAB_001c8fb0:
MOV RAX,qword ptr [RAX + 0x38]
LEA RCX,[0x2c9c80]
LEA RSI,[0x2c9d13]
CMP byte ptr [RAX + 0x54],0x0
CMOVNZ RSI,RCX
LAB_001c8fca:
MOV RDI,RSP
CALL 0x00139938
LAB_001c8fd2:
MOV RDI,RBX
CALL 0x0012e5e0
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* google::protobuf::compiler::cpp::MessageFieldGenerator::GenerateMessageClearingCode(google::protobuf::io::Printer*)
const */
void __thiscall
google::protobuf::compiler::cpp::MessageFieldGenerator::GenerateMessageClearingCode
(MessageFieldGenerator *this,Printer *param_1)
{
byte bVar1;
long lVar2;
char *pcVar3;
Printer *local_48;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
local_40 [48];
local_48 = param_1;
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::_Rb_tree(local_40,(_Rb_tree *)(this + 0x18));
lVar2 = *(long *)(this + 8);
bVar1 = *(byte *)(lVar2 + 1);
if ((bVar1 & 2) == 0) {
if (((bVar1 & 0x60) == 0x20) && (*(char *)(*(long *)(lVar2 + 0x10) + 3) == '\x02')) {
if (((bVar1 & 0x10) == 0) || (*(long *)(lVar2 + 0x28) == 0)) goto LAB_001c8fb0;
}
else if ((bVar1 & 0x60) == 0x40) goto LAB_001c8fb0;
pcVar3 =
"if (GetArenaForAllocation() == nullptr && $field$ != nullptr) {\n delete $field$;\n}\n$field$ = nullptr;\n"
;
}
else {
LAB_001c8fb0:
pcVar3 = "$DCHK$($field$ != nullptr);\n$field$->Clear();\n";
if (*(char *)(*(long *)(lVar2 + 0x38) + 0x54) != '\0') {
pcVar3 =
"if (GetArenaForAllocation() == nullptr && $field$ != nullptr) {\n delete $field$;\n}\n$field$ = nullptr;\n"
;
}
}
/* try { // try from 001c8fca to 001c8fd1 has its CatchHandler @ 001c8fe2 */
Formatter::operator()<>((Formatter *)&local_48,pcVar3);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::~_Rb_tree(local_40);
return;
}
| |
28,091 | js_c_function_data_mark | bluesky950520[P]quickjs/quickjs.c | static void js_c_function_data_mark(JSRuntime *rt, JSValue val,
JS_MarkFunc *mark_func)
{
JSCFunctionDataRecord *s = JS_GetOpaque(val, JS_CLASS_C_FUNCTION_DATA);
int i;
if (s) {
for(i = 0; i < s->data_len; i++) {
JS_MarkValue(rt, s->data[i], mark_func);
}
}
} | O2 | c | js_c_function_data_mark:
cmpl $-0x1, %edx
jne 0x33068
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpw $0xf, 0x6(%rsi)
jne 0x3305f
movq 0x30(%rsi), %r15
testq %r15, %r15
je 0x3305f
movq %rcx, %rbx
movq %rdi, %r14
leaq 0x18(%r15), %r12
xorl %r13d, %r13d
movzbl 0x9(%r15), %eax
cmpq %rax, %r13
jae 0x3305f
movl (%r12), %eax
notl %eax
testl $0xfffffffe, %eax # imm = 0xFFFFFFFE
jne 0x33056
movq -0x8(%r12), %rsi
movq %r14, %rdi
callq *%rbx
incq %r13
addq $0x10, %r12
jmp 0x33035
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| js_c_function_data_mark:
cmp edx, 0FFFFFFFFh
jnz short locret_33068
push r15
push r14
push r13
push r12
push rbx
cmp word ptr [rsi+6], 0Fh
jnz short loc_3305F
mov r15, [rsi+30h]
test r15, r15
jz short loc_3305F
mov rbx, rcx
mov r14, rdi
lea r12, [r15+18h]
xor r13d, r13d
loc_33035:
movzx eax, byte ptr [r15+9]
cmp r13, rax
jnb short loc_3305F
mov eax, [r12]
not eax
test eax, 0FFFFFFFEh
jnz short loc_33056
mov rsi, [r12-8]
mov rdi, r14
call rbx
loc_33056:
inc r13
add r12, 10h
jmp short loc_33035
loc_3305F:
pop rbx
pop r12
pop r13
pop r14
pop r15
locret_33068:
retn
| unsigned long long js_c_function_data_mark(
long long a1,
long long a2,
int a3,
void ( *a4)(long long, _QWORD))
{
long long v4; // r15
_DWORD *v6; // r12
unsigned long long i; // r13
unsigned long long result; // rax
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 15 )
{
v4 = *(_QWORD *)(a2 + 48);
if ( v4 )
{
v6 = (_DWORD *)(v4 + 24);
for ( i = 0LL; ; ++i )
{
result = *(unsigned __int8 *)(v4 + 9);
if ( i >= result )
break;
if ( (~*v6 & 0xFFFFFFFE) == 0 )
a4(a1, *((_QWORD *)v6 - 1));
v6 += 4;
}
}
}
return result;
}
| js_c_function_data_mark:
CMP EDX,-0x1
JNZ 0x00133068
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
CMP word ptr [RSI + 0x6],0xf
JNZ 0x0013305f
MOV R15,qword ptr [RSI + 0x30]
TEST R15,R15
JZ 0x0013305f
MOV RBX,RCX
MOV R14,RDI
LEA R12,[R15 + 0x18]
XOR R13D,R13D
LAB_00133035:
MOVZX EAX,byte ptr [R15 + 0x9]
CMP R13,RAX
JNC 0x0013305f
MOV EAX,dword ptr [R12]
NOT EAX
TEST EAX,0xfffffffe
JNZ 0x00133056
MOV RSI,qword ptr [R12 + -0x8]
MOV RDI,R14
CALL RBX
LAB_00133056:
INC R13
ADD R12,0x10
JMP 0x00133035
LAB_0013305f:
POP RBX
POP R12
POP R13
POP R14
POP R15
LAB_00133068:
RET
|
void js_c_function_data_mark(int8 param_1,long param_2,int param_3,code *param_4)
{
long lVar1;
uint *puVar2;
ulong uVar3;
if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0xf)) &&
(lVar1 = *(long *)(param_2 + 0x30), lVar1 != 0)) {
puVar2 = (uint *)(lVar1 + 0x18);
for (uVar3 = 0; uVar3 < *(byte *)(lVar1 + 9); uVar3 = uVar3 + 1) {
if ((~*puVar2 & 0xfffffffe) == 0) {
(*param_4)(param_1,*(int8 *)(puVar2 + -2));
}
puVar2 = puVar2 + 4;
}
}
return;
}
| |
28,092 | rw_pr_wrlock | eloqsql/mysys/thr_rwlock.c | int rw_pr_wrlock(rw_pr_lock_t *rwlock)
{
pthread_mutex_lock(&rwlock->lock);
if (rwlock->active_readers != 0)
{
/* There are active readers. We have to wait until they are gone. */
rwlock->writers_waiting_readers++;
while (rwlock->active_readers != 0)
pthread_cond_wait(&rwlock->no_active_readers, &rwlock->lock);
rwlock->writers_waiting_readers--;
}
/*
We own 'lock' mutex so there is no active writers.
Also there are no active readers.
This means that we can grant wr-lock.
Not releasing 'lock' mutex until unlock will block
both requests for rd and wr-locks.
Set 'active_writer' flag to simplify unlock.
Thanks to the fact wr-lock/unlock in the absence of
contention from readers is essentially mutex lock/unlock
with a few simple checks make this rwlock implementation
wr-lock optimized.
*/
rwlock->active_writer= TRUE;
#ifdef SAFE_MUTEX
rwlock->writer_thread= pthread_self();
#endif
return 0;
} | O0 | c | rw_pr_wrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x264b0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x58(%rax)
je 0x5b2a6
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x5c(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x58(%rax)
je 0x5b299
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
movq -0x8(%rbp), %rsi
callq 0x26530
jmp 0x5b27c
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x5c(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x60(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| rw_pr_wrlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov rax, [rbp+var_8]
cmp dword ptr [rax+58h], 0
jz short loc_5B2A6
mov rax, [rbp+var_8]
mov ecx, [rax+5Ch]
add ecx, 1
mov [rax+5Ch], ecx
loc_5B27C:
mov rax, [rbp+var_8]
cmp dword ptr [rax+58h], 0
jz short loc_5B299
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
mov rsi, [rbp+var_8]
call _pthread_cond_wait
jmp short loc_5B27C
loc_5B299:
mov rax, [rbp+var_8]
mov ecx, [rax+5Ch]
add ecx, 0FFFFFFFFh
mov [rax+5Ch], ecx
loc_5B2A6:
mov rax, [rbp+var_8]
mov byte ptr [rax+60h], 1
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long rw_pr_wrlock(long long a1)
{
pthread_mutex_lock(a1);
if ( *(_DWORD *)(a1 + 88) )
{
++*(_DWORD *)(a1 + 92);
while ( *(_DWORD *)(a1 + 88) )
pthread_cond_wait(a1 + 40, a1);
--*(_DWORD *)(a1 + 92);
}
*(_BYTE *)(a1 + 96) = 1;
return 0LL;
}
| rw_pr_wrlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001264b0
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x58],0x0
JZ 0x0015b2a6
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x5c]
ADD ECX,0x1
MOV dword ptr [RAX + 0x5c],ECX
LAB_0015b27c:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x58],0x0
JZ 0x0015b299
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00126530
JMP 0x0015b27c
LAB_0015b299:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x5c]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x5c],ECX
LAB_0015b2a6:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x60],0x1
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 rw_pr_wrlock(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
if (*(int *)((long)param_1 + 0x58) != 0) {
*(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + 1;
while (*(int *)((long)param_1 + 0x58) != 0) {
pthread_cond_wait((pthread_cond_t *)(param_1 + 1),param_1);
}
*(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + -1;
}
*(int1 *)((long)param_1 + 0x60) = 1;
return 0;
}
| |
28,093 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_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>>::end_object() | hkr04[P]cpp-mcp/common/json.hpp | bool end_object()
{
if (ref_stack.back())
{
if (!callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back()))
{
// discard object
*ref_stack.back() = discarded;
}
else
{
ref_stack.back()->set_parents();
}
}
JSON_ASSERT(!ref_stack.empty());
JSON_ASSERT(!keep_stack.empty());
ref_stack.pop_back();
keep_stack.pop_back();
if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured())
{
// remove discarded value
for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it)
{
if (it->is_discarded())
{
ref_stack.back()->erase(it);
break;
}
}
}
return true;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_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>>::end_object():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq -0x8(%rax), %rcx
testq %rcx, %rcx
je 0x3abac
subq 0x8(%rbx), %rax
shrq $0x3, %rax
decl %eax
movl %eax, 0x28(%rsp)
movb $0x1, 0x8(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x3ad0c
leaq 0x80(%rbx), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq *0x98(%rbx)
testb %al, %al
jne 0x3abac
leaq 0xa8(%rbx), %rsi
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0xc748
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movb (%rax), %cl
movb (%r14), %dl
movb %dl, (%rax)
movb %cl, (%r14)
movq 0x8(%rax), %rcx
movq 0x8(%r14), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, 0x8(%r14)
movq %r14, %rdi
callq 0xba56
movq 0x10(%rbx), %rcx
leaq -0x8(%rcx), %rax
movq %rax, 0x10(%rbx)
subl $0x1, 0x38(%rbx)
jae 0x3abca
movl $0x3f, 0x38(%rbx)
addq $-0x8, 0x30(%rbx)
cmpq %rax, 0x8(%rbx)
je 0x3acfb
movq -0x10(%rcx), %rcx
testq %rcx, %rcx
je 0x3acfb
movb (%rcx), %dl
leal -0x1(%rdx), %esi
cmpb $0x1, %sil
ja 0x3acfb
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
leaq 0x30(%rsp), %r12
movq %rcx, -0x8(%r12)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq %r13, 0x10(%r12)
xorl %esi, %esi
cmpb $0x1, %dl
setne %sil
movq 0x8(%rcx), %rcx
movq (%rcx), %rcx
movq %rcx, 0x30(%rsp,%rsi,8)
leaq 0x10(%rsp), %rbp
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %r15
movq -0x8(%rax), %rax
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rbp)
movq %r13, 0x20(%rsp)
movzbl (%rax), %ecx
cmpl $0x2, %ecx
je 0x3ac66
cmpl $0x1, %ecx
jne 0x3ac75
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x3ac7e
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x3ac7e
movq $0x1, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x35720
testb %al, %al
jne 0x3acfb
movq %r14, %rdi
callq 0x3b966
cmpb $0x9, (%rax)
je 0x3acca
movq 0x28(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x3acb4
cmpl $0x1, %eax
jne 0x3acbc
addq $0x30, 0x30(%rsp)
jmp 0x3acc1
addq $0x10, 0x38(%rsp)
jmp 0x3acc1
incq 0x40(%rsp)
movq 0x10(%rbx), %rax
jmp 0x3ac35
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rsi
movq 0x28(%rsp), %rax
leaq 0x58(%rsp), %rdx
movq %rax, (%rdx)
movups (%r12), %xmm0
movups %xmm0, 0x8(%rdx)
movq 0x10(%r12), %rax
movq %rax, 0x18(%rdx)
leaq 0x8(%rsp), %rdi
callq 0x3ba38
movb $0x1, %al
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x81c0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10end_objectEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov rbx, rdi
mov rax, [rdi+10h]
mov rcx, [rax-8]
test rcx, rcx
jz short loc_3ABAC
sub rax, [rbx+8]
shr rax, 3
dec eax
mov dword ptr [rsp+0A8h+var_80], eax
mov byte ptr [rsp+0A8h+var_A0], 1
cmp qword ptr [rbx+90h], 0
jz loc_3AD0C
lea rdi, [rbx+80h]
lea rsi, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_A0]
call qword ptr [rbx+98h]
test al, al
jnz short loc_3ABAC
lea rsi, [rbx+0A8h]
lea r14, [rsp+0A8h+var_60]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov cl, [rax]
mov dl, [r14]
mov [rax], dl
mov [r14], cl
mov rcx, [rax+8]
mov rdx, [r14+8]
mov [rax+8], rdx
mov [r14+8], rcx
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_3ABAC:
mov rcx, [rbx+10h]
lea rax, [rcx-8]
mov [rbx+10h], rax
sub dword ptr [rbx+38h], 1
jnb short loc_3ABCA
mov dword ptr [rbx+38h], 3Fh ; '?'
add qword ptr [rbx+30h], 0FFFFFFFFFFFFFFF8h
loc_3ABCA:
cmp [rbx+8], rax
jz loc_3ACFB
mov rcx, [rcx-10h]
test rcx, rcx
jz loc_3ACFB
mov dl, [rcx]
lea esi, [rdx-1]
cmp sil, 1
ja loc_3ACFB
mov r13, 8000000000000000h
lea r12, [rsp+0A8h+var_78]
mov [r12-8], rcx
xorps xmm0, xmm0
movups xmmword ptr [r12], xmm0
mov [r12+10h], r13
xor esi, esi
cmp dl, 1
setnz sil
mov rcx, [rcx+8]
mov rcx, [rcx]
mov [rsp+rsi*8+0A8h+var_78], rcx
lea rbp, [rsp+0A8h+var_98]
lea r14, [rsp+0A8h+var_80]
lea r15, [rsp+0A8h+var_A0]
loc_3AC35:
mov rax, [rax-8]
mov [rsp+0A8h+var_A0], rax
xorps xmm0, xmm0
movups xmmword ptr [rbp+0], xmm0
mov [rsp+0A8h+var_88], r13
movzx ecx, byte ptr [rax]
cmp ecx, 2
jz short loc_3AC66
cmp ecx, 1
jnz short loc_3AC75
mov rax, [rax+8]
mov rax, [rax+8]
mov [rsp+0A8h+var_98], rax
jmp short loc_3AC7E
loc_3AC66:
mov rax, [rax+8]
mov rax, [rax+8]
mov [rsp+0A8h+var_90], rax
jmp short loc_3AC7E
loc_3AC75:
mov [rsp+0A8h+var_88], 1
loc_3AC7E:
mov rdi, r14
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
test al, al
jnz short loc_3ACFB
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator->(void)
cmp byte ptr [rax], 9
jz short loc_3ACCA
mov rax, [rsp+0A8h+var_80]
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_3ACB4
cmp eax, 1
jnz short loc_3ACBC
add [rsp+0A8h+var_78], 30h ; '0'
jmp short loc_3ACC1
loc_3ACB4:
add [rsp+0A8h+var_70], 10h
jmp short loc_3ACC1
loc_3ACBC:
inc [rsp+0A8h+var_68]
loc_3ACC1:
mov rax, [rbx+10h]
jmp loc_3AC35
loc_3ACCA:
mov rax, [rbx+10h]
mov rsi, [rax-8]
mov rax, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_50]
mov [rdx], rax
movups xmm0, xmmword ptr [r12]
movups xmmword ptr [rdx+8], xmm0
mov rax, [r12+10h]
mov [rdx+18h], rax
lea rdi, [rsp+0A8h+var_A0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
loc_3ACFB:
mov al, 1
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3AD0C:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_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>>::end_object(
long long a1)
{
long long v1; // rax
char *v2; // rax
char v3; // cl
long long v4; // rcx
long long v5; // rcx
long long v6; // rax
unsigned __int8 *v8; // rcx
unsigned __int8 v9; // dl
unsigned __int8 *v10; // rax
int v11; // ecx
int v12; // eax
long long v13; // rsi
unsigned __int8 *v15; // [rsp+8h] [rbp-A0h] BYREF
__int128 v16; // [rsp+10h] [rbp-98h]
long long v17; // [rsp+20h] [rbp-88h]
unsigned __int8 *v18; // [rsp+28h] [rbp-80h] BYREF
__int128 v19; // [rsp+30h] [rbp-78h]
unsigned long long v20; // [rsp+40h] [rbp-68h]
_BYTE v21[8]; // [rsp+48h] [rbp-60h] BYREF
long long v22; // [rsp+50h] [rbp-58h]
unsigned __int8 *v23; // [rsp+58h] [rbp-50h]
__int128 v24; // [rsp+60h] [rbp-48h]
unsigned long long v25; // [rsp+70h] [rbp-38h]
v1 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v1 - 8) )
{
LODWORD(v18) = ((unsigned long long)(v1 - *(_QWORD *)(a1 + 8)) >> 3) - 1;
LOBYTE(v15) = 1;
if ( !*(_QWORD *)(a1 + 144) )
std::__throw_bad_function_call();
if ( !(*(unsigned __int8 ( **)(long long, unsigned __int8 **, unsigned __int8 **))(a1 + 152))(
a1 + 128,
&v18,
&v15) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(long long)v21,
(unsigned __int8 *)(a1 + 168));
v2 = *(char **)(*(_QWORD *)(a1 + 16) - 8LL);
v3 = *v2;
*v2 = v21[0];
v21[0] = v3;
v4 = *((_QWORD *)v2 + 1);
*((_QWORD *)v2 + 1) = v22;
v22 = v4;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v21);
}
}
v5 = *(_QWORD *)(a1 + 16);
v6 = v5 - 8;
*(_QWORD *)(a1 + 16) = v5 - 8;
if ( (*(_DWORD *)(a1 + 56))-- == 0 )
{
*(_DWORD *)(a1 + 56) = 63;
*(_QWORD *)(a1 + 48) -= 8LL;
}
if ( *(_QWORD *)(a1 + 8) != v6 )
{
v8 = *(unsigned __int8 **)(v5 - 16);
if ( v8 )
{
v9 = *v8;
if ( (unsigned __int8)(*v8 - 1) <= 1u )
{
v18 = v8;
v19 = 0LL;
v20 = 0x8000000000000000LL;
*((_QWORD *)&v19 + (v9 != 1)) = **((_QWORD **)v8 + 1);
while ( 1 )
{
v10 = *(unsigned __int8 **)(v6 - 8);
v15 = v10;
v16 = 0LL;
v17 = 0x8000000000000000LL;
v11 = *v10;
if ( v11 == 2 )
{
*((_QWORD *)&v16 + 1) = *(_QWORD *)(*((_QWORD *)v10 + 1) + 8LL);
}
else if ( v11 == 1 )
{
*(_QWORD *)&v16 = *(_QWORD *)(*((_QWORD *)v10 + 1) + 8LL);
}
else
{
v17 = 1LL;
}
if ( (unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_(
&v18,
&v15) )
break;
if ( *(_BYTE *)nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator->(&v18) == 9 )
{
v13 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL);
v23 = v18;
v24 = v19;
v25 = v20;
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_(
&v15,
v13);
return 1;
}
v12 = *v18;
if ( v12 == 2 )
{
*((_QWORD *)&v19 + 1) += 16LL;
}
else if ( v12 == 1 )
{
*(_QWORD *)&v19 = v19 + 48;
}
else
{
++v20;
}
v6 = *(_QWORD *)(a1 + 16);
}
}
}
}
return 1;
}
| end_object:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RAX + -0x8]
TEST RCX,RCX
JZ 0x0013abac
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
DEC EAX
MOV dword ptr [RSP + 0x28],EAX
MOV byte ptr [RSP + 0x8],0x1
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0013ad0c
LEA RDI,[RBX + 0x80]
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JNZ 0x0013abac
LEA RSI,[RBX + 0xa8]
LEA R14,[RSP + 0x48]
MOV RDI,R14
CALL 0x0010c748
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV CL,byte ptr [RAX]
MOV DL,byte ptr [R14]
MOV byte ptr [RAX],DL
MOV byte ptr [R14],CL
MOV RCX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [R14 + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [R14 + 0x8],RCX
MOV RDI,R14
CALL 0x0010ba56
LAB_0013abac:
MOV RCX,qword ptr [RBX + 0x10]
LEA RAX,[RCX + -0x8]
MOV qword ptr [RBX + 0x10],RAX
SUB dword ptr [RBX + 0x38],0x1
JNC 0x0013abca
MOV dword ptr [RBX + 0x38],0x3f
ADD qword ptr [RBX + 0x30],-0x8
LAB_0013abca:
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0013acfb
MOV RCX,qword ptr [RCX + -0x10]
TEST RCX,RCX
JZ 0x0013acfb
MOV DL,byte ptr [RCX]
LEA ESI,[RDX + -0x1]
CMP SIL,0x1
JA 0x0013acfb
MOV R13,-0x8000000000000000
LEA R12,[RSP + 0x30]
MOV qword ptr [R12 + -0x8],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12],XMM0
MOV qword ptr [R12 + 0x10],R13
XOR ESI,ESI
CMP DL,0x1
SETNZ SIL
MOV RCX,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RSP + RSI*0x8 + 0x30],RCX
LEA RBP,[RSP + 0x10]
LEA R14,[RSP + 0x28]
LEA R15,[RSP + 0x8]
LAB_0013ac35:
MOV RAX,qword ptr [RAX + -0x8]
MOV qword ptr [RSP + 0x8],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBP],XMM0
MOV qword ptr [RSP + 0x20],R13
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x2
JZ 0x0013ac66
CMP ECX,0x1
JNZ 0x0013ac75
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x0013ac7e
LAB_0013ac66:
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x18],RAX
JMP 0x0013ac7e
LAB_0013ac75:
MOV qword ptr [RSP + 0x20],0x1
LAB_0013ac7e:
MOV RDI,R14
MOV RSI,R15
CALL 0x00135720
TEST AL,AL
JNZ 0x0013acfb
MOV RDI,R14
CALL 0x0013b966
CMP byte ptr [RAX],0x9
JZ 0x0013acca
MOV RAX,qword ptr [RSP + 0x28]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x0013acb4
CMP EAX,0x1
JNZ 0x0013acbc
ADD qword ptr [RSP + 0x30],0x30
JMP 0x0013acc1
LAB_0013acb4:
ADD qword ptr [RSP + 0x38],0x10
JMP 0x0013acc1
LAB_0013acbc:
INC qword ptr [RSP + 0x40]
LAB_0013acc1:
MOV RAX,qword ptr [RBX + 0x10]
JMP 0x0013ac35
LAB_0013acca:
MOV RAX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RSP + 0x28]
LEA RDX,[RSP + 0x58]
MOV qword ptr [RDX],RAX
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS xmmword ptr [RDX + 0x8],XMM0
MOV RAX,qword ptr [R12 + 0x10]
MOV qword ptr [RDX + 0x18],RAX
LEA RDI,[RSP + 0x8]
CALL 0x0013ba38
LAB_0013acfb:
MOV AL,0x1
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013ad0c:
CALL 0x001081c0
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_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> >::end_object() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_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>>
::end_object(json_sax_dom_callback_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>>
*this)
{
json_sax_dom_callback_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>>
*pjVar1;
int iVar2;
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>
bVar3;
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>
*pbVar4;
int8 uVar5;
long lVar6;
char cVar7;
long lVar8;
char *pcVar9;
char *local_a0;
int8 local_98;
int8 uStack_90;
int8 local_88;
char *local_80;
int8 local_78;
int8 uStack_70;
long local_68;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_60 [8];
int8 local_58;
char *local_50;
int4 local_48;
int4 uStack_44;
int4 uStack_40;
int4 uStack_3c;
long local_38;
if (*(long *)(*(long *)(this + 0x10) + -8) != 0) {
local_80 = (char *)CONCAT44(local_80._4_4_,
(int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3) +
-1);
local_a0 = (char *)CONCAT71(local_a0._1_7_,1);
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
cVar7 = (**(code **)(this + 0x98))(this + 0x80,&local_80,&local_a0);
if (cVar7 == '\0') {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_60,(basic_json *)(this + 0xa8));
pbVar4 = *(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>
**)(*(long *)(this + 0x10) + -8);
bVar3 = *pbVar4;
*pbVar4 = local_60[0];
uVar5 = *(int8 *)(pbVar4 + 8);
*(int8 *)(pbVar4 + 8) = local_58;
local_60[0] = bVar3;
local_58 = uVar5;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_60);
}
}
lVar6 = *(long *)(this + 0x10);
lVar8 = lVar6 + -8;
*(long *)(this + 0x10) = lVar8;
pjVar1 = this + 0x38;
iVar2 = *(int *)pjVar1;
*(int *)pjVar1 = *(int *)pjVar1 + -1;
if (iVar2 == 0) {
*(int4 *)(this + 0x38) = 0x3f;
*(long *)(this + 0x30) = *(long *)(this + 0x30) + -8;
}
if (((*(long *)(this + 8) != lVar8) &&
(local_80 = *(char **)(lVar6 + -0x10), local_80 != (char *)0x0)) &&
((byte)(*local_80 - 1U) < 2)) {
local_78 = 0;
uStack_70 = 0;
local_68 = -0x8000000000000000;
(&local_78)[*local_80 != '\x01'] = **(int8 **)(local_80 + 8);
while( true ) {
local_a0 = *(char **)(lVar8 + -8);
local_98 = 0;
uStack_90 = 0;
local_88 = 0x8000000000000000;
if (*local_a0 == '\x02') {
uStack_90 = *(int8 *)(*(long *)(local_a0 + 8) + 8);
}
else if (*local_a0 == '\x01') {
local_98 = *(int8 *)(*(long *)(local_a0 + 8) + 8);
}
else {
local_88 = 1;
}
cVar7 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
((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>>
*)&local_80,&local_a0);
if (cVar7 != '\0') {
return 1;
}
pcVar9 = (char *)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>>
::operator->((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_80);
if (*pcVar9 == '\t') break;
if (*local_80 == '\x02') {
uStack_70 = uStack_70 + 0x10;
}
else if (*local_80 == '\x01') {
local_78 = local_78 + 0x30;
}
else {
local_68 = local_68 + 1;
}
lVar8 = *(long *)(this + 0x10);
}
local_50 = local_80;
local_48 = (int4)local_78;
uStack_44 = local_78._4_4_;
uStack_40 = (int4)uStack_70;
uStack_3c = uStack_70._4_4_;
local_38 = local_68;
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
(&local_a0,*(int8 *)(*(long *)(this + 0x10) + -8));
}
return 1;
}
| |
28,094 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const | monkey531[P]llama/common/json.hpp | const_reference operator[](size_type idx) const
{
// const operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x2, (%rdi)
jne 0x78137
movq 0x8(%r14), %rax
shlq $0x4, %rsi
addq (%rax), %rsi
movq %rsi, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23450
movq %rax, %rbx
movq %r14, %rdi
callq 0x42f88
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3bd27(%rip), %rsi # 0xb3e80
leaq 0x10(%rsp), %rdi
callq 0x781ba
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x62f5e
xorl %ebp, %ebp
leaq 0x81dc4(%rip), %rsi # 0xf9f48
leaq -0x38673(%rip), %rdx # 0x3fb18
movq %rbx, %rdi
callq 0x23ef0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x241b8
testb %bpl, %bpl
jne 0x781aa
jmp 0x781b2
movq %rax, %r14
movq %rbx, %rdi
callq 0x23680
movq %r14, %rdi
callq 0x23f80
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 2
jnz short loc_78137
mov rax, [r14+8]
shl rsi, 4
add rsi, [rax]
mov rax, rsi
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_78137:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_781AA
jmp short loc_781B2
mov r14, rax
loc_781AA:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_781B2:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
_BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
v4,
"cannot use operator[] with a numeric argument with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
305,
(long long)v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return **(_QWORD **)(a1 + 8) + 16 * a2;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x2
JNZ 0x00178137
MOV RAX,qword ptr [R14 + 0x8]
SHL RSI,0x4
ADD RSI,qword ptr [RAX]
MOV RAX,RSI
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00178137:
PUSH 0x20
POP RDI
CALL 0x00123450
MOV RBX,RAX
MOV RDI,R14
CALL 0x00142f88
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00178152:
LEA RSI,[0x1b3e80]
LEA RDI,[RSP + 0x10]
CALL 0x001781ba
MOV BPL,0x1
LAB_00178166:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x00162f5e
XOR EBP,EBP
LEA RSI,[0x1f9f48]
LEA RDX,[0x13fb18]
MOV RDI,RBX
CALL 0x00123ef0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](unsigned long) const */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return param_1 * 0x10 + **(long **)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 00178152 to 00178162 has its CatchHandler @ 001781a7 */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 00178166 to 00178192 has its CatchHandler @ 00178193 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
28,095 | 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>>>>>::skip_bom() | llama.cpp/common/./json.hpp | bool skip_bom()
{
if (get() == 0xEF)
{
// check if we completely parse the BOM
return get() == 0xBB && get() == 0xBF;
}
// the first character is not the beginning of the BOM; unget it to
// process is later
unget();
return true;
} | 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>>>>>::skip_bom():
pushq %rbx
movq %rdi, %rbx
callq 0x1d246
cmpl $0xef, %eax
jne 0x2beeb
movq %rbx, %rdi
callq 0x1d246
cmpl $0xbb, %eax
je 0x2bef7
xorl %eax, %eax
jmp 0x2bef5
movq %rbx, %rdi
callq 0x1d2bc
movb $0x1, %al
popq %rbx
retq
movq %rbx, %rdi
callq 0x1d246
cmpl $0xbf, %eax
sete %al
jmp 0x2bef5
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv:
push rbx
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 0EFh
jnz short loc_2BEEB
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 0BBh
jz short loc_2BEF7
xor eax, eax
jmp short loc_2BEF5
loc_2BEEB:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; 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>>>::unget(void)
mov al, 1
loc_2BEF5:
pop rbx
retn
loc_2BEF7:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 0BFh
setz al
jmp short loc_2BEF5
| bool 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>>>::skip_bom(
__m128i *a1)
{
if ( (unsigned int)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(a1) == 239 )
return (unsigned int)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(a1) == 187
&& (unsigned int)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(a1) == 191;
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>>>::unget((long long)a1);
return 1;
}
| skip_bom:
PUSH RBX
MOV RBX,RDI
CALL 0x0011d246
CMP EAX,0xef
JNZ 0x0012beeb
MOV RDI,RBX
CALL 0x0011d246
CMP EAX,0xbb
JZ 0x0012bef7
XOR EAX,EAX
JMP 0x0012bef5
LAB_0012beeb:
MOV RDI,RBX
CALL 0x0011d2bc
MOV AL,0x1
LAB_0012bef5:
POP RBX
RET
LAB_0012bef7:
MOV RDI,RBX
CALL 0x0011d246
CMP EAX,0xbf
SETZ AL
JMP 0x0012bef5
|
/* 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 > > >::skip_bom() */
bool __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>>>
::skip_bom(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)
{
int iVar1;
bool bVar2;
iVar1 = get(this);
if (iVar1 == 0xef) {
iVar1 = get(this);
if (iVar1 == 0xbb) {
iVar1 = get(this);
bVar2 = iVar1 == 0xbf;
}
else {
bVar2 = false;
}
}
else {
unget(this);
bVar2 = true;
}
return bVar2;
}
| |
28,096 | google::protobuf::OneofDescriptorProto::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | uint8_t* OneofDescriptorProto::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofDescriptorProto)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"google.protobuf.OneofDescriptorProto.name");
target = stream->WriteStringMaybeAliased(
1, this->_internal_name(), target);
}
// optional .google.protobuf.OneofOptions options = 2;
if (cached_has_bits & 0x00000002u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(2, _Internal::options(this),
_Internal::options(this).GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.OneofDescriptorProto)
return target;
} | O0 | cpp | google::protobuf::OneofDescriptorProto::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const:
subq $0x98, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x28(%rsp)
movl $0x0, 0x34(%rsp)
addq $0x10, %rax
movq %rax, 0x80(%rsp)
movl $0x0, 0x7c(%rsp)
movq 0x80(%rsp), %rax
movslq 0x7c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xb517d
movq 0x28(%rsp), %rdi
callq 0x87d60
movq %rax, %rdi
callq 0x174a0
movq 0x28(%rsp), %rdi
movq %rax, 0x18(%rsp)
callq 0x87d60
movq %rax, %rdi
callq 0x14810
movq 0x18(%rsp), %rdi
movl %eax, %esi
movl $0x1, %edx
leaq 0x13babf(%rip), %rcx # 0x1f0c07
callq 0xd5100
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x87d60
movq 0x20(%rsp), %rdi
movq %rax, %rdx
movq 0x40(%rsp), %rcx
movl $0x1, %esi
callq 0xd5120
movq %rax, 0x40(%rsp)
movl 0x34(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xb51ca
movq 0x28(%rsp), %rdi
callq 0xb47b0
movq 0x28(%rsp), %rdi
movq %rax, 0x10(%rsp)
callq 0xb47b0
movq %rax, %rdi
callq 0xd7870
movq 0x10(%rsp), %rsi
movl %eax, %edx
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r8
movl $0x2, %edi
callq 0x1d88f0
movq %rax, 0x40(%rsp)
movq 0x28(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xb5280
movq 0x28(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x60(%rsp)
leaq 0xad8dd(%rip), %rax # 0x162af0
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xb525e
movq 0x8(%rsp), %rdi
callq 0x9cd40
addq $0x8, %rax
movq %rax, 0x68(%rsp)
jmp 0xb5267
callq *0x58(%rsp)
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x1672d0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x98, %rsp
retq
nopl (%rax)
| _ZNK6google8protobuf20OneofDescriptorProto18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE:
sub rsp, 98h
mov [rsp+98h+var_50], rdi
mov [rsp+98h+var_58], rsi
mov [rsp+98h+var_60], rdx
mov rax, [rsp+98h+var_50]
mov [rsp+98h+var_70], rax
mov [rsp+98h+var_64], 0
add rax, 10h
mov [rsp+98h+var_18], rax
mov [rsp+98h+var_1C], 0
mov rax, [rsp+98h+var_18]
movsxd rcx, [rsp+98h+var_1C]
mov eax, [rax+rcx*4]
mov [rsp+98h+var_64], eax
mov eax, [rsp+98h+var_64]
and eax, 1
cmp eax, 0
jz short loc_B517D
mov rdi, [rsp+98h+var_70]
call _ZNK6google8protobuf20OneofDescriptorProto14_internal_nameB5cxx11Ev; google::protobuf::OneofDescriptorProto::_internal_name(void)
mov rdi, rax
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void)
mov rdi, [rsp+98h+var_70]
mov [rsp+98h+var_80], rax
call _ZNK6google8protobuf20OneofDescriptorProto14_internal_nameB5cxx11Ev; google::protobuf::OneofDescriptorProto::_internal_name(void)
mov rdi, rax
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov rdi, [rsp+98h+var_80]
mov esi, eax
mov edx, 1
lea rcx, aGoogleProtobuf_38; "google.protobuf.OneofDescriptorProto.na"...
call _ZN6google8protobuf8internal10WireFormat26VerifyUTF8StringNamedFieldEPKciNS2_9OperationES4_; google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(char const*,int,google::protobuf::internal::WireFormat::Operation,char const*)
mov rdi, [rsp+98h+var_70]
mov rax, [rsp+98h+var_60]
mov [rsp+98h+var_78], rax
call _ZNK6google8protobuf20OneofDescriptorProto14_internal_nameB5cxx11Ev; google::protobuf::OneofDescriptorProto::_internal_name(void)
mov rdi, [rsp+98h+var_78]
mov rdx, rax
mov rcx, [rsp+98h+var_58]
mov esi, (offset dword_0+1); google::protobuf::OneofDescriptorProto *
call _ZN6google8protobuf2io19EpsCopyOutputStream23WriteStringMaybeAliasedEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPh; google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(uint,std::string const&,uchar *)
mov [rsp+98h+var_58], rax
loc_B517D:
mov eax, [rsp+98h+var_64]
and eax, 2
cmp eax, 0
jz short loc_B51CA
mov rdi, [rsp+98h+var_70]; this
call _ZN6google8protobuf20OneofDescriptorProto9_Internal7optionsEPKS1_; google::protobuf::OneofDescriptorProto::_Internal::options(google::protobuf::OneofDescriptorProto const*)
mov rdi, [rsp+98h+var_70]; this
mov qword ptr [rsp+98h+var_88], rax
call _ZN6google8protobuf20OneofDescriptorProto9_Internal7optionsEPKS1_; google::protobuf::OneofDescriptorProto::_Internal::options(google::protobuf::OneofDescriptorProto const*)
mov rdi, rax; this
call _ZNK6google8protobuf12OneofOptions13GetCachedSizeEv; google::protobuf::OneofOptions::GetCachedSize(void)
mov rsi, qword ptr [rsp+98h+var_88]; int
mov edx, eax; google::protobuf::MessageLite *
mov rcx, [rsp+98h+var_58]; int
mov r8, [rsp+98h+var_60]; unsigned __int8 *
mov edi, (offset dword_0+2); this
call _ZN6google8protobuf8internal14WireFormatLite20InternalWriteMessageEiRKNS0_11MessageLiteEiPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormatLite::InternalWriteMessage(int,google::protobuf::MessageLite const&,int,uchar *,google::protobuf::io::EpsCopyOutputStream *)
mov [rsp+98h+var_58], rax
loc_B51CA:
mov rax, [rsp+98h+var_70]
add rax, 8
mov [rsp+98h+var_48], rax
mov rax, [rsp+98h+var_48]
mov [rsp+98h+var_8], rax
mov rax, [rsp+98h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz loc_B5280
mov rax, [rsp+98h+var_70]
add rax, 8
mov [rsp+98h+var_38], rax
lea rax, _ZN6google8protobuf15UnknownFieldSet16default_instanceEv; google::protobuf::UnknownFieldSet::default_instance(void)
mov [rsp+98h+var_40], rax
mov rax, [rsp+98h+var_38]
mov [rsp+98h+var_90], rax
mov [rsp+98h+var_28], rax
mov rax, [rsp+98h+var_28]
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_10]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_B525E
mov rdi, [rsp+98h+var_90]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void)
add rax, 8
mov [rsp+98h+var_30], rax
jmp short loc_B5267
loc_B525E:
call [rsp+98h+var_40]
mov [rsp+98h+var_30], rax
loc_B5267:
mov rdi, [rsp+98h+var_30]; this
mov rsi, [rsp+98h+var_58]; google::protobuf::UnknownFieldSet *
mov rdx, [rsp+98h+var_60]; unsigned __int8 *
call _ZN6google8protobuf8internal10WireFormat37InternalSerializeUnknownFieldsToArrayERKNS0_15UnknownFieldSetEPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&,uchar *,google::protobuf::io::EpsCopyOutputStream *)
mov [rsp+98h+var_58], rax
loc_B5280:
mov rax, [rsp+98h+var_58]
add rsp, 98h
retn
| google::protobuf::UnknownFieldSet * google::protobuf::OneofDescriptorProto::_InternalSerialize(
google::protobuf::OneofDescriptorProto *this,
const google::protobuf::OneofDescriptorProto *a2,
google::protobuf::io::EpsCopyOutputStream *a3)
{
unsigned long long v3; // rax
unsigned long long v4; // rax
unsigned int v5; // eax
unsigned long long v6; // rax
google::protobuf::OneofOptions *v7; // rax
unsigned int CachedSize; // eax
google::protobuf::io::EpsCopyOutputStream *v9; // r9
google::protobuf::io::EpsCopyOutputStream *v10; // rcx
int v12; // [rsp+10h] [rbp-88h]
long long v13; // [rsp+18h] [rbp-80h]
int v14; // [rsp+34h] [rbp-64h]
google::protobuf::UnknownFieldSet *v16; // [rsp+40h] [rbp-58h]
google::protobuf::internal::WireFormat *v17; // [rsp+68h] [rbp-30h]
v16 = a2;
v14 = *((_DWORD *)this + 4);
if ( (v14 & 1) != 0 )
{
v3 = google::protobuf::OneofDescriptorProto::_internal_name[abi:cxx11]((long long)this);
v13 = std::string::data(v3);
v4 = google::protobuf::OneofDescriptorProto::_internal_name[abi:cxx11]((long long)this);
v5 = std::string::length(v4);
google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
v13,
v5,
1LL,
"google.protobuf.OneofDescriptorProto.name");
v6 = google::protobuf::OneofDescriptorProto::_internal_name[abi:cxx11]((long long)this);
a2 = (const google::protobuf::OneofDescriptorProto *)((char *)&dword_0 + 1);
v16 = (google::protobuf::UnknownFieldSet *)google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(
a3,
(char *)&dword_0 + 1,
v6,
v16);
}
if ( (v14 & 2) != 0 )
{
v12 = google::protobuf::OneofDescriptorProto::_Internal::options(this, a2);
v7 = (google::protobuf::OneofOptions *)google::protobuf::OneofDescriptorProto::_Internal::options(this, a2);
CachedSize = google::protobuf::OneofOptions::GetCachedSize(v7);
v16 = (google::protobuf::UnknownFieldSet *)google::protobuf::internal::WireFormatLite::InternalWriteMessage(
(google::protobuf::internal::WireFormatLite *)((char *)&dword_0 + 2),
v12,
(const google::protobuf::MessageLite *)CachedSize,
(int)v16,
(unsigned __int8 *)a3,
v9);
}
if ( (*((_QWORD *)this + 1) & 1LL) != 0 )
{
v17 = (google::protobuf::internal::WireFormat *)(google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>((_QWORD *)this + 1)
+ 8);
return (google::protobuf::UnknownFieldSet *)google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
v17,
v16,
(unsigned __int8 *)a3,
v10);
}
return v16;
}
| _InternalSerialize:
SUB RSP,0x98
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x28],RAX
MOV dword ptr [RSP + 0x34],0x0
ADD RAX,0x10
MOV qword ptr [RSP + 0x80],RAX
MOV dword ptr [RSP + 0x7c],0x0
MOV RAX,qword ptr [RSP + 0x80]
MOVSXD RCX,dword ptr [RSP + 0x7c]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x34],EAX
MOV EAX,dword ptr [RSP + 0x34]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001b517d
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00187d60
MOV RDI,RAX
CALL 0x001174a0
MOV RDI,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x18],RAX
CALL 0x00187d60
MOV RDI,RAX
CALL 0x00114810
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,EAX
MOV EDX,0x1
LEA RCX,[0x2f0c07]
CALL 0x001d5100
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x20],RAX
CALL 0x00187d60
MOV RDI,qword ptr [RSP + 0x20]
MOV RDX,RAX
MOV RCX,qword ptr [RSP + 0x40]
MOV ESI,0x1
CALL 0x001d5120
MOV qword ptr [RSP + 0x40],RAX
LAB_001b517d:
MOV EAX,dword ptr [RSP + 0x34]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001b51ca
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001b47b0
MOV RDI,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001b47b0
MOV RDI,RAX
CALL 0x001d7870
MOV RSI,qword ptr [RSP + 0x10]
MOV EDX,EAX
MOV RCX,qword ptr [RSP + 0x40]
MOV R8,qword ptr [RSP + 0x38]
MOV EDI,0x2
CALL 0x002d88f0
MOV qword ptr [RSP + 0x40],RAX
LAB_001b51ca:
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x8
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001b5280
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x8
MOV qword ptr [RSP + 0x60],RAX
LEA RAX,[0x262af0]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x88]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001b525e
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0019cd40
ADD RAX,0x8
MOV qword ptr [RSP + 0x68],RAX
JMP 0x001b5267
LAB_001b525e:
CALL qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x68],RAX
LAB_001b5267:
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x002672d0
MOV qword ptr [RSP + 0x40],RAX
LAB_001b5280:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x98
RET
|
/* google::protobuf::OneofDescriptorProto::_InternalSerialize(unsigned char*,
google::protobuf::io::EpsCopyOutputStream*) const */
uchar * __thiscall
google::protobuf::OneofDescriptorProto::_InternalSerialize
(OneofDescriptorProto *this,uchar *param_1,EpsCopyOutputStream *param_2)
{
uint uVar1;
int4 uVar2;
int iVar3;
string *psVar4;
int8 uVar5;
MessageLite *pMVar6;
OneofOptions *this_00;
uchar *local_58;
UnknownFieldSet *local_30;
uVar1 = *(uint *)(this + 0x10);
local_58 = param_1;
if ((uVar1 & 1) != 0) {
psVar4 = (string *)_internal_name_abi_cxx11_(this);
uVar5 = std::__cxx11::string::data(psVar4);
psVar4 = (string *)_internal_name_abi_cxx11_(this);
uVar2 = std::__cxx11::string::length(psVar4);
internal::WireFormat::VerifyUTF8StringNamedField
(uVar5,uVar2,1,"google.protobuf.OneofDescriptorProto.name");
psVar4 = (string *)_internal_name_abi_cxx11_(this);
local_58 = (uchar *)io::EpsCopyOutputStream::WriteStringMaybeAliased(param_2,1,psVar4,param_1);
}
if ((uVar1 & 2) != 0) {
pMVar6 = (MessageLite *)_Internal::options(this);
this_00 = (OneofOptions *)_Internal::options(this);
iVar3 = OneofOptions::GetCachedSize(this_00);
local_58 = (uchar *)internal::WireFormatLite::InternalWriteMessage
(2,pMVar6,iVar3,local_58,param_2);
}
if ((*(ulong *)(this + 8) & 1) != 0) {
if ((*(ulong *)(this + 8) & 1) == 0) {
local_30 = (UnknownFieldSet *)UnknownFieldSet::default_instance();
}
else {
local_30 = (UnknownFieldSet *)
internal::InternalMetadata::
PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>
((InternalMetadata *)(this + 8));
local_30 = (UnknownFieldSet *)((Container *)local_30 + 8);
}
local_58 = (uchar *)internal::WireFormat::InternalSerializeUnknownFieldsToArray
(local_30,local_58,param_2);
}
return local_58;
}
| |
28,097 | ssz_add_multi_merkle_proof | corpus-core[P]colibri-stateless/src/util/ssz_merkle.c | static void ssz_add_multi_merkle_proof(gindex_t gindex, buffer_t* witnesses, buffer_t* calculated) {
if (gindex == 1) return;
while (gindex > 1) {
gindex_del(witnesses, gindex);
gindex_add(calculated, gindex);
gindex_t witness = (gindex & 1) ? gindex - 1 : gindex + 1;
if (gindex_indexOf(calculated, witness) != -1 || gindex_indexOf(witnesses, witness) != -1) break;
gindex_add(witnesses, witness);
gindex = gindex >> 1;
}
} | O0 | c | ssz_add_multi_merkle_proof:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x1, -0x8(%rbp)
jne 0xa24a0
jmp 0xa253a
jmp 0xa24a2
cmpq $0x1, -0x8(%rbp)
jbe 0xa253a
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xa3600
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xa3690
movq -0x8(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xa24e3
movq -0x8(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xa24ef
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xa3280
cmpl $-0x1, %eax
jne 0xa251b
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xa3280
cmpl $-0x1, %eax
je 0xa251d
jmp 0xa253a
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xa3690
movq -0x8(%rbp), %rax
shrq %rax
movq %rax, -0x8(%rbp)
jmp 0xa24a2
addq $0x30, %rsp
popq %rbp
retq
| ssz_add_multi_merkle_proof:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
cmp [rbp+var_8], 1
jnz short loc_A24A0
jmp loc_A253A
loc_A24A0:
jmp short $+2
loc_A24A2:
cmp [rbp+var_8], 1
jbe loc_A253A
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_8]
call gindex_del
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_8]
call gindex_add
mov rax, [rbp+var_8]
and rax, 1
cmp rax, 0
jz short loc_A24E3
mov rax, [rbp+var_8]
sub rax, 1
mov [rbp+var_28], rax
jmp short loc_A24EF
loc_A24E3:
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_28], rax
loc_A24EF:
mov rax, [rbp+var_28]
mov [rbp+var_20], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call gindex_indexOf
cmp eax, 0FFFFFFFFh
jnz short loc_A251B
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call gindex_indexOf
cmp eax, 0FFFFFFFFh
jz short loc_A251D
loc_A251B:
jmp short loc_A253A
loc_A251D:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call gindex_add
mov rax, [rbp+var_8]
shr rax, 1
mov [rbp+var_8], rax
jmp loc_A24A2
loc_A253A:
add rsp, 30h
pop rbp
retn
| void ssz_add_multi_merkle_proof(unsigned long long a1, long long a2, long long a3)
{
long long v3; // [rsp+8h] [rbp-28h]
unsigned long long v5; // [rsp+28h] [rbp-8h]
v5 = a1;
if ( a1 != 1 )
{
while ( v5 > 1 )
{
gindex_del(a2, v5);
gindex_add(a3, v5);
v3 = (v5 & 1) != 0 ? v5 - 1 : v5 + 1;
if ( (unsigned int)gindex_indexOf(a3, v3) != -1 || (unsigned int)gindex_indexOf(a2, v3) != -1 )
break;
gindex_add(a2, v3);
v5 >>= 1;
}
}
}
| ssz_add_multi_merkle_proof:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
CMP qword ptr [RBP + -0x8],0x1
JNZ 0x001a24a0
JMP 0x001a253a
LAB_001a24a0:
JMP 0x001a24a2
LAB_001a24a2:
CMP qword ptr [RBP + -0x8],0x1
JBE 0x001a253a
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x001a3600
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x001a3690
MOV RAX,qword ptr [RBP + -0x8]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001a24e3
MOV RAX,qword ptr [RBP + -0x8]
SUB RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001a24ef
LAB_001a24e3:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
LAB_001a24ef:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001a3280
CMP EAX,-0x1
JNZ 0x001a251b
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001a3280
CMP EAX,-0x1
JZ 0x001a251d
LAB_001a251b:
JMP 0x001a253a
LAB_001a251d:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001a3690
MOV RAX,qword ptr [RBP + -0x8]
SHR RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a24a2
LAB_001a253a:
ADD RSP,0x30
POP RBP
RET
|
void ssz_add_multi_merkle_proof(ulong param_1,int8 param_2,int8 param_3)
{
int iVar1;
long local_30;
ulong local_10;
local_10 = param_1;
if (param_1 != 1) {
for (; 1 < local_10; local_10 = local_10 >> 1) {
gindex_del(param_2,local_10);
gindex_add(param_3,local_10);
if ((local_10 & 1) == 0) {
local_30 = local_10 + 1;
}
else {
local_30 = local_10 - 1;
}
iVar1 = gindex_indexOf(param_3,local_30);
if (iVar1 != -1) {
return;
}
iVar1 = gindex_indexOf(param_2,local_30);
if (iVar1 != -1) {
return;
}
gindex_add(param_2,local_30);
}
}
return;
}
| |
28,098 | ssz_add_multi_merkle_proof | corpus-core[P]colibri-stateless/src/util/ssz_merkle.c | static void ssz_add_multi_merkle_proof(gindex_t gindex, buffer_t* witnesses, buffer_t* calculated) {
if (gindex == 1) return;
while (gindex > 1) {
gindex_del(witnesses, gindex);
gindex_add(calculated, gindex);
gindex_t witness = (gindex & 1) ? gindex - 1 : gindex + 1;
if (gindex_indexOf(calculated, witness) != -1 || gindex_indexOf(witnesses, witness) != -1) break;
gindex_add(witnesses, witness);
gindex = gindex >> 1;
}
} | O1 | c | ssz_add_multi_merkle_proof:
cmpq $0x2, %rdi
jb 0x59c73
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl (%r14), %eax
cmpq $0x8, %rax
jb 0x59bf5
movq 0x8(%r14), %rcx
andl $-0x8, %eax
xorl %esi, %esi
cmpq %r15, (%rcx,%rsi)
je 0x59be3
addq $0x8, %rsi
cmpq %rsi, %rax
jne 0x59bd2
jmp 0x59bf5
movq %r14, %rdi
movl $0x8, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x57084
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5a65c
movl %r15d, %esi
andl $0x1, %esi
negq %rsi
orq $0x1, %rsi
addq %r15, %rsi
movl (%rbx), %eax
cmpq $0x8, %rax
jb 0x59c2f
movq 0x8(%rbx), %rcx
shrl $0x3, %eax
xorl %edx, %edx
cmpq %rsi, (%rcx,%rdx,8)
je 0x59c5e
incq %rdx
cmpq %rdx, %rax
jne 0x59c21
movl (%r14), %eax
cmpq $0x8, %rax
jb 0x59c4f
movq 0x8(%r14), %rcx
shrl $0x3, %eax
xorl %edx, %edx
cmpq %rsi, (%rcx,%rdx,8)
je 0x59c5e
incq %rdx
cmpq %rdx, %rax
jne 0x59c41
movq %r14, %rdi
callq 0x5a65c
shrq %r15
movb $0x1, %al
jmp 0x59c60
xorl %eax, %eax
testb %al, %al
je 0x59c6e
cmpq $0x1, %r15
ja 0x59bc0
popq %rbx
popq %r14
popq %r15
retq
| ssz_add_multi_merkle_proof:
cmp rdi, 2
jb locret_59C73
push r15
push r14
push rbx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
loc_59BC0:
mov eax, [r14]
cmp rax, 8
jb short loc_59BF5
mov rcx, [r14+8]
and eax, 0FFFFFFF8h
xor esi, esi
loc_59BD2:
cmp [rcx+rsi], r15
jz short loc_59BE3
add rsi, 8
cmp rax, rsi
jnz short loc_59BD2
jmp short loc_59BF5
loc_59BE3:
mov rdi, r14
mov edx, 8
xor ecx, ecx
xor r8d, r8d
call buffer_splice
loc_59BF5:
mov rdi, rbx
mov rsi, r15
call gindex_add
mov esi, r15d
and esi, 1
neg rsi
or rsi, 1
add rsi, r15
mov eax, [rbx]
cmp rax, 8
jb short loc_59C2F
mov rcx, [rbx+8]
shr eax, 3
xor edx, edx
loc_59C21:
cmp [rcx+rdx*8], rsi
jz short loc_59C5E
inc rdx
cmp rax, rdx
jnz short loc_59C21
loc_59C2F:
mov eax, [r14]
cmp rax, 8
jb short loc_59C4F
mov rcx, [r14+8]
shr eax, 3
xor edx, edx
loc_59C41:
cmp [rcx+rdx*8], rsi
jz short loc_59C5E
inc rdx
cmp rax, rdx
jnz short loc_59C41
loc_59C4F:
mov rdi, r14
call gindex_add
shr r15, 1
mov al, 1
jmp short loc_59C60
loc_59C5E:
xor eax, eax
loc_59C60:
test al, al
jz short loc_59C6E
cmp r15, 1
ja loc_59BC0
loc_59C6E:
pop rbx
pop r14
pop r15
locret_59C73:
retn
| void ssz_add_multi_merkle_proof(unsigned long long a1, unsigned int *a2, unsigned int *a3)
{
unsigned long long v5; // r15
unsigned long long v6; // rax
long long v7; // rax
long long v8; // rsi
unsigned long long v9; // rsi
unsigned long long v10; // rax
long long v11; // rax
long long v12; // rdx
unsigned long long v13; // rax
long long v14; // rax
long long v15; // rdx
char v16; // al
if ( a1 >= 2 )
{
v5 = a1;
do
{
v6 = *a2;
if ( v6 >= 8 )
{
v7 = (unsigned int)v6 & 0xFFFFFFF8;
v8 = 0LL;
while ( *(_QWORD *)(*((_QWORD *)a2 + 1) + v8) != v5 )
{
v8 += 8LL;
if ( v7 == v8 )
goto LABEL_9;
}
buffer_splice((long long)a2, v8, 8, 0, 0LL);
}
LABEL_9:
gindex_add(a3, v5);
v9 = v5 + (-(long long)(v5 & 1) | 1);
v10 = *a3;
if ( v10 < 8 )
{
LABEL_13:
v13 = *a2;
if ( v13 < 8 )
{
LABEL_17:
gindex_add(a2, v9);
v5 >>= 1;
v16 = 1;
continue;
}
v14 = (unsigned int)v13 >> 3;
v15 = 0LL;
while ( *(_QWORD *)(*((_QWORD *)a2 + 1) + 8 * v15) != v9 )
{
if ( v14 == ++v15 )
goto LABEL_17;
}
}
else
{
v11 = (unsigned int)v10 >> 3;
v12 = 0LL;
while ( *(_QWORD *)(*((_QWORD *)a3 + 1) + 8 * v12) != v9 )
{
if ( v11 == ++v12 )
goto LABEL_13;
}
}
v16 = 0;
}
while ( v16 && v5 > 1 );
}
}
| ssz_add_multi_merkle_proof:
CMP RDI,0x2
JC 0x00159c73
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LAB_00159bc0:
MOV EAX,dword ptr [R14]
CMP RAX,0x8
JC 0x00159bf5
MOV RCX,qword ptr [R14 + 0x8]
AND EAX,0xfffffff8
XOR ESI,ESI
LAB_00159bd2:
CMP qword ptr [RCX + RSI*0x1],R15
JZ 0x00159be3
ADD RSI,0x8
CMP RAX,RSI
JNZ 0x00159bd2
JMP 0x00159bf5
LAB_00159be3:
MOV RDI,R14
MOV EDX,0x8
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00157084
LAB_00159bf5:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0015a65c
MOV ESI,R15D
AND ESI,0x1
NEG RSI
OR RSI,0x1
ADD RSI,R15
MOV EAX,dword ptr [RBX]
CMP RAX,0x8
JC 0x00159c2f
MOV RCX,qword ptr [RBX + 0x8]
SHR EAX,0x3
XOR EDX,EDX
LAB_00159c21:
CMP qword ptr [RCX + RDX*0x8],RSI
JZ 0x00159c5e
INC RDX
CMP RAX,RDX
JNZ 0x00159c21
LAB_00159c2f:
MOV EAX,dword ptr [R14]
CMP RAX,0x8
JC 0x00159c4f
MOV RCX,qword ptr [R14 + 0x8]
SHR EAX,0x3
XOR EDX,EDX
LAB_00159c41:
CMP qword ptr [RCX + RDX*0x8],RSI
JZ 0x00159c5e
INC RDX
CMP RAX,RDX
JNZ 0x00159c41
LAB_00159c4f:
MOV RDI,R14
CALL 0x0015a65c
SHR R15,0x1
MOV AL,0x1
JMP 0x00159c60
LAB_00159c5e:
XOR EAX,EAX
LAB_00159c60:
TEST AL,AL
JZ 0x00159c6e
CMP R15,0x1
JA 0x00159bc0
LAB_00159c6e:
POP RBX
POP R14
POP R15
LAB_00159c73:
RET
|
void ssz_add_multi_merkle_proof(ulong param_1,uint *param_2,uint *param_3)
{
bool bVar1;
ulong uVar2;
long lVar3;
if (param_1 < 2) {
return;
}
LAB_00159bc0:
if (7 < *param_2) {
uVar2 = 0;
do {
if (*(ulong *)(*(long *)(param_2 + 2) + uVar2) == param_1) {
buffer_splice(param_2,uVar2,8,0,0);
break;
}
uVar2 = uVar2 + 8;
} while ((*param_2 & 0xfffffff8) != uVar2);
}
gindex_add(param_3,param_1);
lVar3 = (-(ulong)((uint)param_1 & 1) | 1) + param_1;
if (7 < *param_3) {
uVar2 = 0;
do {
if (*(long *)(*(long *)(param_3 + 2) + uVar2 * 8) == lVar3) goto LAB_00159c5e;
uVar2 = uVar2 + 1;
} while (*param_3 >> 3 != uVar2);
}
if (7 < *param_2) {
uVar2 = 0;
do {
if (*(long *)(*(long *)(param_2 + 2) + uVar2 * 8) == lVar3) goto LAB_00159c5e;
uVar2 = uVar2 + 1;
} while (*param_2 >> 3 != uVar2);
}
gindex_add(param_2);
param_1 = param_1 >> 1;
bVar1 = true;
goto LAB_00159c60;
LAB_00159c5e:
bVar1 = false;
LAB_00159c60:
if (!bVar1) {
return;
}
if (param_1 < 2) {
return;
}
goto LAB_00159bc0;
}
| |
28,099 | my_wc_mb_euc_kr | eloqsql/strings/ctype-euc_kr.c | static int
my_wc_mb_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_ksc5601_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
} | O3 | c | my_wc_mb_euc_kr:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xaf4c6
cmpl $0x7f, %esi
ja 0xaf4c7
movb %sil, (%rdx)
movl $0x1, %eax
retq
leal -0xa1(%rsi), %eax
cmpl $0xc6, %eax
ja 0xaf4e2
movl %eax, %eax
leaq 0x9cb43(%rip), %rsi # 0x14c020
jmp 0xaf5da
leal -0x2c7(%rsi), %eax
cmpl $0x18a, %eax # imm = 0x18A
ja 0xaf4fd
movl %eax, %eax
leaq 0x9ccb8(%rip), %rsi # 0x14c1b0
jmp 0xaf5da
leal -0x2015(%rsi), %eax
cmpl $0x2fd, %eax # imm = 0x2FD
ja 0xaf518
movl %eax, %eax
leaq 0x9cfbd(%rip), %rsi # 0x14c4d0
jmp 0xaf5da
leal -0x2460(%rsi), %eax
cmpl $0x20d, %eax # imm = 0x20D
ja 0xaf533
movl %eax, %eax
leaq 0x9d5a2(%rip), %rsi # 0x14cad0
jmp 0xaf5da
leal -0x3000(%rsi), %eax
cmpl $0x27f, %eax # imm = 0x27F
ja 0xaf54e
movl %eax, %eax
leaq 0x9d9a7(%rip), %rsi # 0x14cef0
jmp 0xaf5da
leal -0x3380(%rsi), %eax
cmpl $0x5d, %eax
ja 0xaf564
movl %eax, %eax
leaq 0x9de8e(%rip), %rsi # 0x14d3f0
jmp 0xaf5da
leal -0x4e00(%rsi), %eax
cmpl $0x467f, %eax # imm = 0x467F
ja 0xaf57c
movl %eax, %eax
leaq 0x9df36(%rip), %rsi # 0x14d4b0
jmp 0xaf5da
leal -0x9577(%rsi), %eax
cmpl $0xa25, %eax # imm = 0xA25
ja 0xaf594
movl %eax, %eax
leaq 0xa6c1e(%rip), %rsi # 0x1561b0
jmp 0xaf5da
leal -0xac00(%rsi), %eax
cmpl $0x2ba3, %eax # imm = 0x2BA3
ja 0xaf5ac
movl %eax, %eax
leaq 0xa8056(%rip), %rsi # 0x157600
jmp 0xaf5da
leal -0xf900(%rsi), %eax
cmpl $0x10b, %eax # imm = 0x10B
ja 0xaf5c4
movl %eax, %eax
leaq 0xad78e(%rip), %rsi # 0x15cd50
jmp 0xaf5da
leal -0xff01(%rsi), %eax
cmpl $0xe5, %eax
ja 0xaf60a
movl %eax, %eax
leaq 0xad996(%rip), %rsi # 0x15cf70
leaq (%rsi,%rax,2), %rax
pushq %rbp
movq %rsp, %rbp
movzwl (%rax), %esi
testw %si, %si
je 0xaf606
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0xaf608
rolw $0x8, %si
movw %si, (%rdx)
movl $0x2, %eax
jmp 0xaf608
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
| my_wc_mb_euc_kr:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_AF4C6
cmp esi, 7Fh
ja short loc_AF4C7
mov [rdx], sil
mov eax, 1
locret_AF4C6:
retn
loc_AF4C7:
lea eax, [rsi-0A1h]
cmp eax, 0C6h
ja short loc_AF4E2
mov eax, eax
lea rsi, tab_uni_ksc56010
jmp loc_AF5DA
loc_AF4E2:
lea eax, [rsi-2C7h]
cmp eax, 18Ah
ja short loc_AF4FD
mov eax, eax
lea rsi, tab_uni_ksc56011
jmp loc_AF5DA
loc_AF4FD:
lea eax, [rsi-2015h]
cmp eax, 2FDh
ja short loc_AF518
mov eax, eax
lea rsi, tab_uni_ksc56012
jmp loc_AF5DA
loc_AF518:
lea eax, [rsi-2460h]
cmp eax, 20Dh
ja short loc_AF533
mov eax, eax
lea rsi, tab_uni_ksc56013
jmp loc_AF5DA
loc_AF533:
lea eax, [rsi-3000h]
cmp eax, 27Fh
ja short loc_AF54E
mov eax, eax
lea rsi, tab_uni_ksc56014
jmp loc_AF5DA
loc_AF54E:
lea eax, [rsi-3380h]
cmp eax, 5Dh ; ']'
ja short loc_AF564
mov eax, eax
lea rsi, tab_uni_ksc56015
jmp short loc_AF5DA
loc_AF564:
lea eax, [rsi-4E00h]
cmp eax, 467Fh
ja short loc_AF57C
mov eax, eax
lea rsi, tab_uni_ksc56016
jmp short loc_AF5DA
loc_AF57C:
lea eax, [rsi-9577h]
cmp eax, 0A25h
ja short loc_AF594
mov eax, eax
lea rsi, tab_uni_ksc56017
jmp short loc_AF5DA
loc_AF594:
lea eax, [rsi-0AC00h]
cmp eax, 2BA3h
ja short loc_AF5AC
mov eax, eax
lea rsi, tab_uni_ksc56018
jmp short loc_AF5DA
loc_AF5AC:
lea eax, [rsi-0F900h]
cmp eax, 10Bh
ja short loc_AF5C4
mov eax, eax
lea rsi, tab_uni_ksc56019
jmp short loc_AF5DA
loc_AF5C4:
lea eax, [rsi-0FF01h]
cmp eax, 0E5h
ja short loc_AF60A
mov eax, eax
lea rsi, tab_uni_ksc560110
loc_AF5DA:
lea rax, [rsi+rax*2]
push rbp
mov rbp, rsp
movzx esi, word ptr [rax]
test si, si
jz short loc_AF606
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_AF608
rol si, 8
mov [rdx], si
mov eax, 2
jmp short loc_AF608
loc_AF606:
xor eax, eax
loc_AF608:
pop rbp
retn
loc_AF60A:
xor eax, eax
retn
| long long my_wc_mb_euc_kr(long long a1, unsigned int a2, _WORD *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rax
_WORD *v6; // rsi
__int16 v7; // si
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
if ( a2 > 0x7F )
{
LODWORD(v5) = a2 - 161;
if ( a2 - 161 > 0xC6 )
{
LODWORD(v5) = a2 - 711;
if ( a2 - 711 > 0x18A )
{
LODWORD(v5) = a2 - 8213;
if ( a2 - 8213 > 0x2FD )
{
LODWORD(v5) = a2 - 9312;
if ( a2 - 9312 > 0x20D )
{
LODWORD(v5) = a2 - 12288;
if ( a2 - 12288 > 0x27F )
{
LODWORD(v5) = a2 - 13184;
if ( a2 - 13184 > 0x5D )
{
LODWORD(v5) = a2 - 19968;
if ( a2 - 19968 > 0x467F )
{
LODWORD(v5) = a2 - 38263;
if ( a2 - 38263 > 0xA25 )
{
LODWORD(v5) = a2 - 44032;
if ( a2 - 44032 > 0x2BA3 )
{
LODWORD(v5) = a2 - 63744;
if ( a2 - 63744 > 0x10B )
{
LODWORD(v5) = a2 - 65281;
if ( a2 - 65281 > 0xE5 )
return 0LL;
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc560110;
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56019;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56018;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56017;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56016;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56015;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56014;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56013;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56012;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56011;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56010;
}
v7 = v6[v5];
if ( v7 )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 1) <= a4 )
{
*a3 = __ROL2__(v7, 8);
return 2LL;
}
}
else
{
return 0LL;
}
}
else
{
*(_BYTE *)a3 = a2;
return 1LL;
}
}
return result;
}
| my_wc_mb_euc_kr:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001af4c6
CMP ESI,0x7f
JA 0x001af4c7
MOV byte ptr [RDX],SIL
MOV EAX,0x1
LAB_001af4c6:
RET
LAB_001af4c7:
LEA EAX,[RSI + -0xa1]
CMP EAX,0xc6
JA 0x001af4e2
MOV EAX,EAX
LEA RSI,[0x24c020]
JMP 0x001af5da
LAB_001af4e2:
LEA EAX,[RSI + -0x2c7]
CMP EAX,0x18a
JA 0x001af4fd
MOV EAX,EAX
LEA RSI,[0x24c1b0]
JMP 0x001af5da
LAB_001af4fd:
LEA EAX,[RSI + -0x2015]
CMP EAX,0x2fd
JA 0x001af518
MOV EAX,EAX
LEA RSI,[0x24c4d0]
JMP 0x001af5da
LAB_001af518:
LEA EAX,[RSI + -0x2460]
CMP EAX,0x20d
JA 0x001af533
MOV EAX,EAX
LEA RSI,[0x24cad0]
JMP 0x001af5da
LAB_001af533:
LEA EAX,[RSI + -0x3000]
CMP EAX,0x27f
JA 0x001af54e
MOV EAX,EAX
LEA RSI,[0x24cef0]
JMP 0x001af5da
LAB_001af54e:
LEA EAX,[RSI + -0x3380]
CMP EAX,0x5d
JA 0x001af564
MOV EAX,EAX
LEA RSI,[0x24d3f0]
JMP 0x001af5da
LAB_001af564:
LEA EAX,[RSI + -0x4e00]
CMP EAX,0x467f
JA 0x001af57c
MOV EAX,EAX
LEA RSI,[0x24d4b0]
JMP 0x001af5da
LAB_001af57c:
LEA EAX,[RSI + -0x9577]
CMP EAX,0xa25
JA 0x001af594
MOV EAX,EAX
LEA RSI,[0x2561b0]
JMP 0x001af5da
LAB_001af594:
LEA EAX,[RSI + -0xac00]
CMP EAX,0x2ba3
JA 0x001af5ac
MOV EAX,EAX
LEA RSI,[0x257600]
JMP 0x001af5da
LAB_001af5ac:
LEA EAX,[RSI + -0xf900]
CMP EAX,0x10b
JA 0x001af5c4
MOV EAX,EAX
LEA RSI,[0x25cd50]
JMP 0x001af5da
LAB_001af5c4:
LEA EAX,[RSI + -0xff01]
CMP EAX,0xe5
JA 0x001af60a
MOV EAX,EAX
LEA RSI,[0x25cf70]
LAB_001af5da:
LEA RAX,[RSI + RAX*0x2]
PUSH RBP
MOV RBP,RSP
MOVZX ESI,word ptr [RAX]
TEST SI,SI
JZ 0x001af606
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x001af608
ROL SI,0x8
MOV word ptr [RDX],SI
MOV EAX,0x2
JMP 0x001af608
LAB_001af606:
XOR EAX,EAX
LAB_001af608:
POP RBP
RET
LAB_001af60a:
XOR EAX,EAX
RET
|
int8 my_wc_mb_euc_kr(int8 param_1,uint param_2,ushort *param_3,ushort *param_4)
{
ushort uVar1;
int8 uVar2;
ulong uVar3;
int1 *puVar4;
uVar2 = 0xffffff9b;
if (param_3 < param_4) {
if (0x7f < param_2) {
if (param_2 - 0xa1 < 199) {
uVar3 = (ulong)(param_2 - 0xa1);
puVar4 = tab_uni_ksc56010;
}
else if (param_2 - 0x2c7 < 0x18b) {
uVar3 = (ulong)(param_2 - 0x2c7);
puVar4 = tab_uni_ksc56011;
}
else if (param_2 - 0x2015 < 0x2fe) {
uVar3 = (ulong)(param_2 - 0x2015);
puVar4 = tab_uni_ksc56012;
}
else if (param_2 - 0x2460 < 0x20e) {
uVar3 = (ulong)(param_2 - 0x2460);
puVar4 = tab_uni_ksc56013;
}
else if (param_2 - 0x3000 < 0x280) {
uVar3 = (ulong)(param_2 - 0x3000);
puVar4 = tab_uni_ksc56014;
}
else if (param_2 - 0x3380 < 0x5e) {
uVar3 = (ulong)(param_2 - 0x3380);
puVar4 = tab_uni_ksc56015;
}
else if (param_2 - 0x4e00 < 0x4680) {
uVar3 = (ulong)(param_2 - 0x4e00);
puVar4 = tab_uni_ksc56016;
}
else if (param_2 - 0x9577 < 0xa26) {
uVar3 = (ulong)(param_2 - 0x9577);
puVar4 = tab_uni_ksc56017;
}
else if (param_2 - 0xac00 < 0x2ba4) {
uVar3 = (ulong)(param_2 - 0xac00);
puVar4 = tab_uni_ksc56018;
}
else if (param_2 - 0xf900 < 0x10c) {
uVar3 = (ulong)(param_2 - 0xf900);
puVar4 = tab_uni_ksc56019;
}
else {
uVar3 = (ulong)(param_2 - 0xff01);
if (0xe5 < param_2 - 0xff01) {
return 0;
}
puVar4 = tab_uni_ksc560110;
}
uVar1 = *(ushort *)(puVar4 + uVar3 * 2);
if (uVar1 == 0) {
uVar2 = 0;
}
else {
uVar2 = 0xffffff9a;
if (param_3 + 1 <= param_4) {
*param_3 = uVar1 << 8 | uVar1 >> 8;
uVar2 = 2;
}
}
return uVar2;
}
*(char *)param_3 = (char)param_2;
uVar2 = 1;
}
return uVar2;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
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++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
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.