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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
57,900
|
ImageDrawCircleLines
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color)
{
int x = 0;
int y = radius;
int decesionParameter = 3 - 2*radius;
while (y >= x)
{
ImageDrawPixel(dst, centerX + x, centerY + y, color);
ImageDrawPixel(dst, centerX - x, centerY + y, color);
ImageDrawPixel(dst, centerX + x, centerY - y, color);
ImageDrawPixel(dst, centerX - x, centerY - y, color);
ImageDrawPixel(dst, centerX + y, centerY + x, color);
ImageDrawPixel(dst, centerX - y, centerY + x, color);
ImageDrawPixel(dst, centerX + y, centerY - x, color);
ImageDrawPixel(dst, centerX - y, centerY - x, color);
x++;
if (decesionParameter > 0)
{
y--;
decesionParameter = decesionParameter + 4*(x - y) + 10;
}
else decesionParameter = decesionParameter + 4*x + 6;
}
}
|
O3
|
c
|
ImageDrawCircleLines:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, 0x24(%rsp)
movq %rdx, 0x30(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdi, 0x40(%rsp)
testl %ecx, %ecx
js 0x9a2e1
movl %ecx, %ebp
leal (,%rbp,2), %eax
movl $0x3, %edx
subl %eax, %edx
movq %rdx, 0x10(%rsp)
xorl %edx, %edx
movl $0xa, %esi
movq 0x18(%rsp), %rax
movl %eax, %r12d
movq 0x30(%rsp), %rax
movl %eax, %r14d
movq 0x40(%rsp), %r15
movl 0x24(%rsp), %r13d
movl %r14d, 0x2c(%rsp)
movl %esi, 0xc(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x18(%rsp), %rax
leal (%rax,%rdx), %esi
movl %esi, 0x8(%rsp)
movq 0x30(%rsp), %rbx
leal (%rbp,%rbx), %r14d
movq %r15, %rdi
movl %r14d, %edx
movl %r13d, %ecx
callq 0x99487
movq %r15, %rdi
movl %r12d, %esi
movl %r14d, %edx
movl %r13d, %ecx
callq 0x99487
movl %ebx, %r14d
subl %ebp, %r14d
movq %r15, %rdi
movl 0x8(%rsp), %esi
movl %r14d, %edx
movl %r13d, %ecx
callq 0x99487
movq %r15, %rdi
movl %r12d, 0x8(%rsp)
movl %r12d, %esi
movl %r14d, %edx
movl %r13d, %ecx
callq 0x99487
movq 0x18(%rsp), %r14
leal (%r14,%rbp), %esi
movl %esi, 0x28(%rsp)
movq 0x38(%rsp), %rax
leal (%rbx,%rax), %r12d
movq %r15, %rdi
movl %r12d, %edx
movl %r13d, %ecx
callq 0x99487
movl %r14d, %ebx
subl %ebp, %ebx
movq %r15, %rdi
movl %ebx, %esi
movl %r12d, %edx
movl %r13d, %ecx
callq 0x99487
movq %r15, %rdi
movl 0x28(%rsp), %esi
movl 0x2c(%rsp), %r14d
movl %r14d, %edx
movl %r13d, %ecx
callq 0x99487
movq %r15, %rdi
movl %ebx, %esi
movl %r14d, %edx
movl %r13d, %ecx
callq 0x99487
movq 0x38(%rsp), %rdx
incl %edx
movq 0x10(%rsp), %rcx
testl %ecx, %ecx
jle 0x9a2bd
decl %ebp
movl %edx, %eax
subl %ebp, %eax
leal (%rcx,%rax,4), %ecx
addl $0xa, %ecx
movq %rcx, 0x10(%rsp)
movl 0xc(%rsp), %esi
jmp 0x9a2c8
movl 0xc(%rsp), %esi
addl %esi, %ecx
movq %rcx, 0x10(%rsp)
leal -0x1(%rdx), %eax
addl $0x4, %esi
decl %r14d
movl 0x8(%rsp), %r12d
decl %r12d
cmpl %eax, %ebp
jg 0x9a1c5
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ImageDrawCircleLines:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rsp+78h+var_54], r8d
mov [rsp+78h+var_48], rdx
mov [rsp+78h+var_60], rsi
mov [rsp+78h+var_38], rdi
test ecx, ecx
js loc_9A2E1
mov ebp, ecx
lea eax, ds:0[rbp*2]
mov edx, 3
sub edx, eax
mov [rsp+78h+var_68], rdx
xor edx, edx
mov esi, 0Ah
mov rax, [rsp+78h+var_60]
mov r12d, eax
mov rax, [rsp+78h+var_48]
mov r14d, eax
mov r15, [rsp+78h+var_38]
mov r13d, [rsp+78h+var_54]
loc_9A1C5:
mov [rsp+78h+var_4C], r14d
mov [rsp+78h+var_6C], esi
mov [rsp+78h+var_40], rdx
mov rax, [rsp+78h+var_60]
lea esi, [rax+rdx]
mov [rsp+78h+var_70], esi
mov rbx, [rsp+78h+var_48]
lea r14d, [rbp+rbx+0]
mov rdi, r15
mov edx, r14d
mov ecx, r13d
call ImageDrawPixel
mov rdi, r15
mov esi, r12d
mov edx, r14d
mov ecx, r13d
call ImageDrawPixel
mov r14d, ebx
sub r14d, ebp
mov rdi, r15
mov esi, [rsp+78h+var_70]
mov edx, r14d
mov ecx, r13d
call ImageDrawPixel
mov rdi, r15
mov [rsp+78h+var_70], r12d
mov esi, r12d
mov edx, r14d
mov ecx, r13d
call ImageDrawPixel
mov r14, [rsp+78h+var_60]
lea esi, [r14+rbp]
mov [rsp+78h+var_50], esi
mov rax, [rsp+78h+var_40]
lea r12d, [rbx+rax]
mov rdi, r15
mov edx, r12d
mov ecx, r13d
call ImageDrawPixel
mov ebx, r14d
sub ebx, ebp
mov rdi, r15
mov esi, ebx
mov edx, r12d
mov ecx, r13d
call ImageDrawPixel
mov rdi, r15
mov esi, [rsp+78h+var_50]
mov r14d, [rsp+78h+var_4C]
mov edx, r14d
mov ecx, r13d
call ImageDrawPixel
mov rdi, r15
mov esi, ebx
mov edx, r14d
mov ecx, r13d
call ImageDrawPixel
mov rdx, [rsp+78h+var_40]
inc edx
mov rcx, [rsp+78h+var_68]
test ecx, ecx
jle short loc_9A2BD
dec ebp
mov eax, edx
sub eax, ebp
lea ecx, [rcx+rax*4]
add ecx, 0Ah
mov [rsp+78h+var_68], rcx
mov esi, [rsp+78h+var_6C]
jmp short loc_9A2C8
loc_9A2BD:
mov esi, [rsp+78h+var_6C]
add ecx, esi
mov [rsp+78h+var_68], rcx
loc_9A2C8:
lea eax, [rdx-1]
add esi, 4
dec r14d
mov r12d, [rsp+78h+var_70]
dec r12d
cmp ebp, eax
jg loc_9A1C5
loc_9A2E1:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ImageDrawCircleLines(long long *a1, int a2, int a3, int a4, unsigned int a5)
{
int v5; // ebp
unsigned int v6; // edx
int v7; // esi
int v8; // r12d
int v9; // r14d
long long result; // rax
int v11; // [rsp+8h] [rbp-70h]
int v12; // [rsp+10h] [rbp-68h]
unsigned int v16; // [rsp+38h] [rbp-40h]
if ( a4 >= 0 )
{
v5 = a4;
v12 = 3 - 2 * a4;
v6 = 0;
v7 = 10;
v8 = a2;
v9 = a3;
do
{
v16 = v6;
v11 = a2 + v6;
ImageDrawPixel(a1, a2 + v6, v5 + a3, a5);
ImageDrawPixel(a1, v8, v5 + a3, a5);
ImageDrawPixel(a1, v11, a3 - v5, a5);
ImageDrawPixel(a1, v8, a3 - v5, a5);
ImageDrawPixel(a1, a2 + v5, a3 + v16, a5);
ImageDrawPixel(a1, a2 - v5, a3 + v16, a5);
ImageDrawPixel(a1, a2 + v5, v9, a5);
ImageDrawPixel(a1, a2 - v5, v9, a5);
v6 = v16 + 1;
if ( v12 <= 0 )
{
v12 += v7;
}
else
{
--v5;
v12 += 4 * (v6 - v5) + 10;
}
result = v16;
v7 += 4;
--v9;
--v8;
}
while ( v5 > (int)v16 );
}
return result;
}
|
ImageDrawCircleLines:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RSP + 0x24],R8D
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x40],RDI
TEST ECX,ECX
JS 0x0019a2e1
MOV EBP,ECX
LEA EAX,[RBP*0x2]
MOV EDX,0x3
SUB EDX,EAX
MOV qword ptr [RSP + 0x10],RDX
XOR EDX,EDX
MOV ESI,0xa
MOV RAX,qword ptr [RSP + 0x18]
MOV R12D,EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV R14D,EAX
MOV R15,qword ptr [RSP + 0x40]
MOV R13D,dword ptr [RSP + 0x24]
LAB_0019a1c5:
MOV dword ptr [RSP + 0x2c],R14D
MOV dword ptr [RSP + 0xc],ESI
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x18]
LEA ESI,[RAX + RDX*0x1]
MOV dword ptr [RSP + 0x8],ESI
MOV RBX,qword ptr [RSP + 0x30]
LEA R14D,[RBP + RBX*0x1]
MOV RDI,R15
MOV EDX,R14D
MOV ECX,R13D
CALL 0x00199487
MOV RDI,R15
MOV ESI,R12D
MOV EDX,R14D
MOV ECX,R13D
CALL 0x00199487
MOV R14D,EBX
SUB R14D,EBP
MOV RDI,R15
MOV ESI,dword ptr [RSP + 0x8]
MOV EDX,R14D
MOV ECX,R13D
CALL 0x00199487
MOV RDI,R15
MOV dword ptr [RSP + 0x8],R12D
MOV ESI,R12D
MOV EDX,R14D
MOV ECX,R13D
CALL 0x00199487
MOV R14,qword ptr [RSP + 0x18]
LEA ESI,[R14 + RBP*0x1]
MOV dword ptr [RSP + 0x28],ESI
MOV RAX,qword ptr [RSP + 0x38]
LEA R12D,[RBX + RAX*0x1]
MOV RDI,R15
MOV EDX,R12D
MOV ECX,R13D
CALL 0x00199487
MOV EBX,R14D
SUB EBX,EBP
MOV RDI,R15
MOV ESI,EBX
MOV EDX,R12D
MOV ECX,R13D
CALL 0x00199487
MOV RDI,R15
MOV ESI,dword ptr [RSP + 0x28]
MOV R14D,dword ptr [RSP + 0x2c]
MOV EDX,R14D
MOV ECX,R13D
CALL 0x00199487
MOV RDI,R15
MOV ESI,EBX
MOV EDX,R14D
MOV ECX,R13D
CALL 0x00199487
MOV RDX,qword ptr [RSP + 0x38]
INC EDX
MOV RCX,qword ptr [RSP + 0x10]
TEST ECX,ECX
JLE 0x0019a2bd
DEC EBP
MOV EAX,EDX
SUB EAX,EBP
LEA ECX,[RCX + RAX*0x4]
ADD ECX,0xa
MOV qword ptr [RSP + 0x10],RCX
MOV ESI,dword ptr [RSP + 0xc]
JMP 0x0019a2c8
LAB_0019a2bd:
MOV ESI,dword ptr [RSP + 0xc]
ADD ECX,ESI
MOV qword ptr [RSP + 0x10],RCX
LAB_0019a2c8:
LEA EAX,[RDX + -0x1]
ADD ESI,0x4
DEC R14D
MOV R12D,dword ptr [RSP + 0x8]
DEC R12D
CMP EBP,EAX
JG 0x0019a1c5
LAB_0019a2e1:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ImageDrawCircleLines(int8 param_1,int param_2,int param_3,int param_4,int4 param_5)
{
bool bVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
if (-1 < param_4) {
iVar2 = param_4 * -2 + 3;
iVar4 = 10;
iVar5 = param_2;
iVar6 = param_3;
iVar3 = 0;
do {
ImageDrawPixel(param_1,param_2 + iVar3,param_4 + param_3,param_5);
ImageDrawPixel(param_1,iVar5,param_4 + param_3,param_5);
ImageDrawPixel(param_1,param_2 + iVar3,param_3 - param_4,param_5);
ImageDrawPixel(param_1,iVar5,param_3 - param_4,param_5);
ImageDrawPixel(param_1,param_2 + param_4,param_3 + iVar3,param_5);
ImageDrawPixel(param_1,param_2 - param_4,param_3 + iVar3,param_5);
ImageDrawPixel(param_1,param_2 + param_4,iVar6,param_5);
ImageDrawPixel(param_1,param_2 - param_4,iVar6,param_5);
if (iVar2 < 1) {
iVar2 = iVar2 + iVar4;
}
else {
param_4 = param_4 + -1;
iVar2 = iVar2 + ((iVar3 + 1) - param_4) * 4 + 10;
}
iVar4 = iVar4 + 4;
iVar6 = iVar6 + -1;
iVar5 = iVar5 + -1;
bVar1 = iVar3 < param_4;
iVar3 = iVar3 + 1;
} while (bVar1);
}
return;
}
|
|
57,901
|
bfdec_rem
|
bluesky950520[P]quickjs/libbf.c
|
int bfdec_rem(bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec,
bf_flags_t flags, int rnd_mode)
{
bfdec_t q_s, *q = &q_s;
int ret;
bfdec_init(r->ctx, q);
ret = bfdec_divrem(q, r, a, b, prec, flags, rnd_mode);
bfdec_delete(q);
return ret;
}
|
O1
|
c
|
bfdec_rem:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %r8d, %eax
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rsi
movq (%rdi), %rdi
leaq 0x10(%rsp), %r14
movq %rdi, (%r14)
movl $0x0, 0x8(%r14)
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
movq %rdi, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r14)
movl %r9d, (%rsp)
movq %r14, %rdi
movl %eax, %r9d
callq 0x8f650
movl %eax, %ebx
movq (%r14), %rax
testq %rax, %rax
je 0x8fbee
movq 0x30(%rsp), %rsi
testq %rsi, %rsi
je 0x8fbee
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
|
bfdec_rem:
push r14
push rbx
sub rsp, 38h
mov eax, r8d
mov r8, rcx
mov rcx, rdx
mov rdx, rsi
mov rsi, rdi
mov rdi, [rdi]
lea r14, [rsp+48h+var_38]
mov [r14], rdi
mov dword ptr [r14+8], 0
mov rdi, 8000000000000000h
mov [r14+10h], rdi
xorps xmm0, xmm0
movups xmmword ptr [r14+18h], xmm0
mov [rsp+48h+var_48], r9d
mov rdi, r14
mov r9d, eax
call bfdec_divrem
mov ebx, eax
mov rax, [r14]
test rax, rax
jz short loc_8FBEE
mov rsi, [rsp+48h+var_18]
test rsi, rsi
jz short loc_8FBEE
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8FBEE:
mov eax, ebx
add rsp, 38h
pop rbx
pop r14
retn
|
long long bfdec_rem(__int128 *a1, long long a2, long long a3, long long a4, unsigned int a5, int a6)
{
unsigned int v6; // ebx
__int128 v8; // [rsp+10h] [rbp-38h] BYREF
unsigned long long v9; // [rsp+20h] [rbp-28h]
__int128 v10; // [rsp+28h] [rbp-20h]
*(_QWORD *)&v8 = *(_QWORD *)a1;
DWORD2(v8) = 0;
v9 = 0x8000000000000000LL;
v10 = 0LL;
v6 = bfdec_divrem(&v8, a1, a2, a3, a4, a5, a6);
if ( (_QWORD)v8 && *((_QWORD *)&v10 + 1) )
(*(void ( **)(_QWORD, _QWORD, _QWORD))(v8 + 8))(*(_QWORD *)v8, *((_QWORD *)&v10 + 1), 0LL);
return v6;
}
|
bfdec_rem:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV EAX,R8D
MOV R8,RCX
MOV RCX,RDX
MOV RDX,RSI
MOV RSI,RDI
MOV RDI,qword ptr [RDI]
LEA R14,[RSP + 0x10]
MOV qword ptr [R14],RDI
MOV dword ptr [R14 + 0x8],0x0
MOV RDI,-0x8000000000000000
MOV qword ptr [R14 + 0x10],RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x18],XMM0
MOV dword ptr [RSP],R9D
MOV RDI,R14
MOV R9D,EAX
CALL 0x0018f650
MOV EBX,EAX
MOV RAX,qword ptr [R14]
TEST RAX,RAX
JZ 0x0018fbee
MOV RSI,qword ptr [RSP + 0x30]
TEST RSI,RSI
JZ 0x0018fbee
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018fbee:
MOV EAX,EBX
ADD RSP,0x38
POP RBX
POP R14
RET
|
int4
bfdec_rem(int8 *param_1,int8 param_2,int8 param_3,int8 param_4,
int4 param_5,int4 param_6)
{
int4 uVar1;
int8 *local_38;
int4 local_30;
int8 local_28;
int8 local_20;
long lStack_18;
local_38 = (int8 *)*param_1;
local_30 = 0;
local_28 = 0x8000000000000000;
local_20 = 0;
lStack_18 = 0;
uVar1 = bfdec_divrem(&local_38,param_1,param_2,param_3,param_4,param_5,param_6);
if ((local_38 != (int8 *)0x0) && (lStack_18 != 0)) {
(*(code *)local_38[1])(*local_38,lStack_18,0);
}
return uVar1;
}
|
|
57,902
|
bfdec_rem
|
bluesky950520[P]quickjs/libbf.c
|
int bfdec_rem(bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec,
bf_flags_t flags, int rnd_mode)
{
bfdec_t q_s, *q = &q_s;
int ret;
bfdec_init(r->ctx, q);
ret = bfdec_divrem(q, r, a, b, prec, flags, rnd_mode);
bfdec_delete(q);
return ret;
}
|
O2
|
c
|
bfdec_rem:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movl %r8d, %eax
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rsi
movq (%rdi), %rdi
leaq 0x10(%rsp), %rbx
movq %rdi, (%rbx)
andl $0x0, 0x8(%rbx)
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
movq %rdi, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movl %r9d, (%rsp)
movq %rbx, %rdi
movl %eax, %r9d
callq 0x779bb
movl %eax, %ebp
movq %rbx, %rdi
callq 0x7145e
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
|
bfdec_rem:
push rbp
push rbx
sub rsp, 38h
mov eax, r8d
mov r8, rcx
mov rcx, rdx
mov rdx, rsi
mov rsi, rdi
mov rdi, [rdi]
lea rbx, [rsp+48h+var_38]
mov [rbx], rdi
and dword ptr [rbx+8], 0
mov rdi, 8000000000000000h
mov [rbx+10h], rdi
xorps xmm0, xmm0
movups xmmword ptr [rbx+18h], xmm0
mov [rsp+48h+var_48], r9d
mov rdi, rbx
mov r9d, eax
call bfdec_divrem
mov ebp, eax
mov rdi, rbx
call bf_delete_0
mov eax, ebp
add rsp, 38h
pop rbx
pop rbp
retn
|
long long bfdec_rem(long long *a1, long long a2, long long a3, long long a4, unsigned int a5, int a6)
{
unsigned int v6; // ebp
long long v8; // [rsp+10h] [rbp-38h] BYREF
int v9; // [rsp+18h] [rbp-30h]
unsigned long long v10; // [rsp+20h] [rbp-28h]
__int128 v11; // [rsp+28h] [rbp-20h]
v8 = *a1;
v9 = 0;
v10 = 0x8000000000000000LL;
v11 = 0LL;
v6 = bfdec_divrem((long long)&v8, (long long)a1, a2, a3, a4, a5, a6);
bf_delete_0(&v8);
return v6;
}
|
bfdec_rem:
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV EAX,R8D
MOV R8,RCX
MOV RCX,RDX
MOV RDX,RSI
MOV RSI,RDI
MOV RDI,qword ptr [RDI]
LEA RBX,[RSP + 0x10]
MOV qword ptr [RBX],RDI
AND dword ptr [RBX + 0x8],0x0
MOV RDI,-0x8000000000000000
MOV qword ptr [RBX + 0x10],RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x18],XMM0
MOV dword ptr [RSP],R9D
MOV RDI,RBX
MOV R9D,EAX
CALL 0x001779bb
MOV EBP,EAX
MOV RDI,RBX
CALL 0x0017145e
MOV EAX,EBP
ADD RSP,0x38
POP RBX
POP RBP
RET
|
int4
bfdec_rem(int8 *param_1,int8 param_2,int8 param_3,int8 param_4,
int4 param_5,int4 param_6)
{
int4 uVar1;
int8 local_38;
int4 local_30;
int8 local_28;
int8 local_20;
int8 uStack_18;
local_38 = *param_1;
local_30 = 0;
local_28 = 0x8000000000000000;
local_20 = 0;
uStack_18 = 0;
uVar1 = bfdec_divrem(&local_38,param_1,param_2,param_3,param_4,param_5,param_6);
bf_delete(&local_38);
return uVar1;
}
|
|
57,903
|
w_search
|
eloqsql/storage/myisam/mi_write.c
|
static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
uint comp_flag, uchar *key, uint key_length, my_off_t page,
uchar *father_buff, uchar *father_keypos,
my_off_t father_page, my_bool insert_last)
{
int error,flag;
uint nod_flag, search_key_length;
uchar *temp_buff,*keypos;
uchar keybuff[HA_MAX_KEY_BUFF];
my_bool was_last_key;
my_off_t next_page, dupp_key_pos;
DBUG_ENTER("w_search");
DBUG_PRINT("enter",("page: %ld", (long) page));
search_key_length= (comp_flag & SEARCH_FIND) ? key_length : USE_WHOLE_KEY;
if (!(temp_buff= (uchar*) my_alloca((uint) keyinfo->block_length+
HA_MAX_KEY_BUFF*2)))
DBUG_RETURN(-1);
if (!_mi_fetch_keypage(info,keyinfo,page,DFLT_INIT_HITS,temp_buff,0))
goto err;
flag=(*keyinfo->bin_search)(info,keyinfo,temp_buff,key,search_key_length,
comp_flag, &keypos, keybuff, &was_last_key);
nod_flag=mi_test_if_nod(temp_buff);
if (flag == 0)
{
uint tmp_key_length;
/* get position to record with duplicated key */
tmp_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&keypos,keybuff);
if (tmp_key_length)
dupp_key_pos=_mi_dpos(info,0,keybuff+tmp_key_length);
else
dupp_key_pos= HA_OFFSET_ERROR;
if (keyinfo->flag & HA_FULLTEXT)
{
uint off;
int subkeys;
get_key_full_length_rdonly(off, keybuff);
subkeys=ft_sintXkorr(keybuff+off);
comp_flag=SEARCH_SAME;
if (subkeys >= 0)
{
/* normal word, one-level tree structure */
flag=(*keyinfo->bin_search)(info, keyinfo, temp_buff, key,
USE_WHOLE_KEY, comp_flag,
&keypos, keybuff, &was_last_key);
}
else
{
/* popular word. two-level tree. going down */
my_off_t root=dupp_key_pos;
keyinfo=&info->s->ft2_keyinfo;
get_key_full_length_rdonly(off, key);
key+=off;
keypos-=keyinfo->keylength+nod_flag; /* we'll modify key entry 'in vivo' */
error=_mi_ck_real_write_btree(info, keyinfo, key, 0,
&root, comp_flag);
_mi_dpointer(info, keypos+HA_FT_WLEN, root);
subkeys--; /* should there be underflow protection ? */
DBUG_ASSERT(subkeys < 0);
ft_intXstore(keypos, subkeys);
if (!error)
error=_mi_write_keypage(info,keyinfo,page,DFLT_INIT_HITS,temp_buff);
my_afree((uchar*) temp_buff);
DBUG_RETURN(error);
}
}
else /* not HA_FULLTEXT, normal HA_NOSAME key */
{
info->dupp_key_pos= dupp_key_pos;
my_afree((uchar*) temp_buff);
my_errno=HA_ERR_FOUND_DUPP_KEY;
DBUG_RETURN(-1);
}
}
if (flag == MI_FOUND_WRONG_KEY)
DBUG_RETURN(-1);
if (!was_last_key)
insert_last=0;
next_page=_mi_kpos(nod_flag,keypos);
if (next_page == HA_OFFSET_ERROR ||
(error=w_search(info, keyinfo, comp_flag, key, key_length, next_page,
temp_buff, keypos, page, insert_last)) >0)
{
error=_mi_insert(info,keyinfo,key,temp_buff,keypos,keybuff,father_buff,
father_keypos,father_page, insert_last);
if (_mi_write_keypage(info,keyinfo,page,DFLT_INIT_HITS,temp_buff))
goto err;
}
my_afree((uchar*) temp_buff);
DBUG_RETURN(error);
err:
my_afree((uchar*) temp_buff);
DBUG_PRINT("exit",("Error: %d",my_errno));
DBUG_RETURN (-1);
}
|
O3
|
c
|
w_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4f8, %rsp # imm = 0x4F8
movq %r9, %rbx
movl %r8d, -0x504(%rbp)
movq %rcx, -0x510(%rbp)
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movzwl 0xe(%rsi), %eax
movq %rsp, %r15
addl $0x97f, %eax # imm = 0x97F
andl $-0x10, %eax
subq %rax, %r15
movq %r15, %rsp
movq %r9, %rdx
movl $0x3, %ecx
movq %r15, %r8
xorl %r9d, %r9d
callq 0x9eb84
testq %rax, %rax
je 0xa34b6
movq %rbx, -0x518(%rbp)
testb $0x1, %r12b
movl $0x970, %r8d # imm = 0x970
cmovnel -0x504(%rbp), %r8d
subq $0x8, %rsp
leaq -0x4f1(%rbp), %rbx
leaq -0x4f0(%rbp), %rax
leaq -0x500(%rbp), %r10
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq -0x510(%rbp), %rcx
movl %r12d, -0x508(%rbp)
movl %r12d, %r9d
pushq %rbx
pushq %rax
pushq %r10
callq *0x40(%r13)
addq $0x20, %rsp
cmpb $0x0, (%r15)
movl $0x0, %r12d
jns 0xa3386
movq (%r14), %rcx
movl 0x17c(%rcx), %r12d
testl %eax, %eax
je 0xa3461
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF
je 0xa34bb
xorl %eax, %eax
cmpb $0x0, -0x4f1(%rbp)
movzbl 0x28(%rbp), %ebx
cmovel %eax, %ebx
movq -0x500(%rbp), %rsi
movl %r12d, %edi
callq 0x9f4fe
movsbl %bl, %r10d
cmpq $-0x1, %rax
movq %r14, %r12
movq -0x510(%rbp), %r14
je 0xa3411
movq %r12, %rdi
movq %r13, %rsi
movl -0x508(%rbp), %edx
movq %r14, %rcx
movl -0x504(%rbp), %r8d
movq %rax, %r9
pushq %r10
pushq -0x518(%rbp)
pushq -0x500(%rbp)
pushq %r15
movq %r10, %rbx
callq 0xa32ac
movq %rbx, %r10
addq $0x20, %rsp
testl %eax, %eax
jle 0xa365c
movq -0x500(%rbp), %r8
leaq -0x4f0(%rbp), %r9
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
pushq %r10
pushq 0x20(%rbp)
pushq 0x18(%rbp)
pushq 0x10(%rbp)
callq 0xa3777
addq $0x20, %rsp
movl %eax, %ebx
movq %r12, %rdi
movq %r13, %rsi
movq -0x518(%rbp), %rdx
movl $0x3, %ecx
movq %r15, %r8
callq 0x9ec30
testl %eax, %eax
jne 0xa34b6
jmp 0xa34bb
leaq -0x500(%rbp), %rdx
leaq -0x4f0(%rbp), %rcx
movq %r13, %rdi
movl %r12d, %esi
callq *0x48(%r13)
testl %eax, %eax
je 0xa3496
movl %eax, %eax
leaq (%rax,%rbp), %rdx
addq $-0x4f0, %rdx # imm = 0xFB10
movq %r14, %rdi
xorl %esi, %esi
callq 0x9f5dd
jmp 0xa349d
movq $-0x1, %rax
testb $-0x80, 0xa(%r13)
jne 0xa34df
movq %rax, 0x1a0(%r14)
callq 0xc14ee
movl $0x79, (%rax)
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xa3663
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl -0x4f0(%rbp), %ecx
cmpq $0xff, %rcx
je 0xa34f4
incq %rcx
jmp 0xa3506
movzwl -0x4ef(%rbp), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addq $0x3, %rcx
movzbl -0x4f0(%rbp,%rcx), %edx
shll $0x18, %edx
js 0xa355b
subq $0x8, %rsp
movl $0x4, -0x508(%rbp)
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq -0x510(%rbp), %rcx
movl $0x970, %r8d # imm = 0x970
movl $0x4, %r9d
pushq %rbx
leaq -0x4f0(%rbp), %rax
pushq %rax
leaq -0x500(%rbp), %rax
pushq %rax
callq *0x40(%r13)
addq $0x20, %rsp
jmp 0xa338e
movq %r12, %rdi
movzwl -0x4ee(%rbp,%rcx), %esi
rolw $0x8, %si
movzwl %si, %esi
movzbl -0x4ef(%rbp,%rcx), %ecx
shll $0x10, %ecx
orl %esi, %ecx
orl %edx, %ecx
movl %ecx, -0x504(%rbp)
movq %rax, -0x520(%rbp)
movq (%r14), %rax
leaq 0x1a8(%rax), %r12
movq -0x510(%rbp), %rdx
movzbl (%rdx), %ecx
cmpq $0xff, %rcx
je 0xa35ab
incq %rcx
jmp 0xa35ba
movzwl 0x1(%rdx), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addq $0x3, %rcx
addq %rcx, %rdx
movzwl 0x1ba(%rax), %eax
addl %eax, %edi
subq %rdi, -0x500(%rbp)
leaq -0x520(%rbp), %r13
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
movq %r13, %r8
movl $0x4, %r9d
callq 0xa322b
movl %eax, %ebx
movq -0x500(%rbp), %rsi
addq $0x4, %rsi
movq (%r13), %rdx
movq %r14, %rdi
callq 0xa02a3
movl -0x504(%rbp), %edx
decl %edx
movq -0x500(%rbp), %rax
movb %dl, 0x3(%rax)
movq -0x500(%rbp), %rax
movb %dh, 0x2(%rax)
movl %edx, %eax
shrl $0x10, %eax
movq -0x500(%rbp), %rcx
movb %al, 0x1(%rcx)
shrl $0x18, %edx
movq -0x500(%rbp), %rax
movb %dl, (%rax)
testl %ebx, %ebx
jne 0xa34bb
movq %r14, %rdi
movq %r12, %rsi
movq -0x518(%rbp), %rdx
movl $0x3, %ecx
movq %r15, %r8
callq 0x9ec30
movl %eax, %ebx
jmp 0xa34bb
callq 0x2a280
|
w_search_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 4F8h
mov rbx, r9
mov [rbp+var_504], r8d
mov [rbp+var_510], rcx
mov r12d, edx
mov r13, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
movzx eax, word ptr [rsi+0Eh]
mov r15, rsp
add eax, 97Fh
and eax, 0FFFFFFF0h
sub r15, rax
mov rsp, r15
mov rdx, r9
mov ecx, 3
mov r8, r15
xor r9d, r9d
call _mi_fetch_keypage
test rax, rax
jz loc_A34B6
mov [rbp+var_518], rbx
test r12b, 1
mov r8d, 970h
cmovnz r8d, [rbp+var_504]
sub rsp, 8
lea rbx, [rbp+var_4F1]
lea rax, [rbp+var_4F0]
lea r10, [rbp+var_500]
mov rdi, r14
mov rsi, r13
mov rdx, r15
mov rcx, [rbp+var_510]
mov [rbp+var_508], r12d
mov r9d, r12d
push rbx
push rax
push r10
call qword ptr [r13+40h]
add rsp, 20h
cmp byte ptr [r15], 0
mov r12d, 0
jns short loc_A3386
mov rcx, [r14]
mov r12d, [rcx+17Ch]
loc_A3386:
test eax, eax
jz loc_A3461
loc_A338E:
mov ebx, 0FFFFFFFFh
cmp eax, 7FFFFFFFh
jz loc_A34BB
xor eax, eax
cmp [rbp+var_4F1], 0
movzx ebx, [rbp+arg_18]
cmovz ebx, eax
mov rsi, [rbp+var_500]
mov edi, r12d
call _mi_kpos
movsx r10d, bl
cmp rax, 0FFFFFFFFFFFFFFFFh
mov r12, r14
mov r14, [rbp+var_510]
jz short loc_A3411
mov rdi, r12
mov rsi, r13
mov edx, [rbp+var_508]
mov rcx, r14
mov r8d, [rbp+var_504]
mov r9, rax
push r10
push [rbp+var_518]
push [rbp+var_500]
push r15
mov rbx, r10
call w_search_0
mov r10, rbx
add rsp, 20h
test eax, eax
jle loc_A365C
loc_A3411:
mov r8, [rbp+var_500]
lea r9, [rbp+var_4F0]
mov rdi, r12
mov rsi, r13
mov rdx, r14
mov rcx, r15
push r10
push [rbp+arg_10]
push [rbp+arg_8]
push [rbp+arg_0]
call _mi_insert
add rsp, 20h
mov ebx, eax
mov rdi, r12
mov rsi, r13
mov rdx, [rbp+var_518]
mov ecx, 3
mov r8, r15
call _mi_write_keypage
test eax, eax
jnz short loc_A34B6
jmp short loc_A34BB
loc_A3461:
lea rdx, [rbp+var_500]
lea rcx, [rbp+var_4F0]
mov rdi, r13
mov esi, r12d
call qword ptr [r13+48h]
test eax, eax
jz short loc_A3496
mov eax, eax
lea rdx, [rax+rbp]
add rdx, 0FFFFFFFFFFFFFB10h
mov rdi, r14
xor esi, esi
call _mi_dpos
jmp short loc_A349D
loc_A3496:
mov rax, 0FFFFFFFFFFFFFFFFh
loc_A349D:
test byte ptr [r13+0Ah], 80h
jnz short loc_A34DF
mov [r14+1A0h], rax
call _my_thread_var
mov dword ptr [rax], 79h ; 'y'
loc_A34B6:
mov ebx, 0FFFFFFFFh
loc_A34BB:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_A3663
mov eax, ebx
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A34DF:
movzx ecx, [rbp+var_4F0]
cmp rcx, 0FFh
jz short loc_A34F4
inc rcx
jmp short loc_A3506
loc_A34F4:
movzx ecx, [rbp+var_4EF]
rol cx, 8
movzx ecx, cx
add rcx, 3
loc_A3506:
movzx edx, [rbp+rcx+var_4F0]
shl edx, 18h
js short loc_A355B
sub rsp, 8
mov [rbp+var_508], 4
mov rdi, r14
mov rsi, r13
mov rdx, r15
mov rcx, [rbp+var_510]
mov r8d, 970h
mov r9d, 4
push rbx
lea rax, [rbp+var_4F0]
push rax
lea rax, [rbp+var_500]
push rax
call qword ptr [r13+40h]
add rsp, 20h
jmp loc_A338E
loc_A355B:
mov rdi, r12
movzx esi, [rbp+rcx+var_4EF+1]
rol si, 8
movzx esi, si
movzx ecx, byte ptr [rbp+rcx+var_4EF]
shl ecx, 10h
or ecx, esi
or ecx, edx
mov [rbp+var_504], ecx
mov [rbp+var_520], rax
mov rax, [r14]
lea r12, [rax+1A8h]
mov rdx, [rbp+var_510]
movzx ecx, byte ptr [rdx]
cmp rcx, 0FFh
jz short loc_A35AB
inc rcx
jmp short loc_A35BA
loc_A35AB:
movzx ecx, word ptr [rdx+1]
rol cx, 8
movzx ecx, cx
add rcx, 3
loc_A35BA:
add rdx, rcx
movzx eax, word ptr [rax+1BAh]
add edi, eax
sub [rbp+var_500], rdi
lea r13, [rbp+var_520]
mov rdi, r14
mov rsi, r12
xor ecx, ecx
mov r8, r13
mov r9d, 4
call _mi_ck_real_write_btree
mov ebx, eax
mov rsi, [rbp+var_500]
add rsi, 4
mov rdx, [r13+0]
mov rdi, r14
call _mi_dpointer
mov edx, [rbp+var_504]
dec edx
mov rax, [rbp+var_500]
mov [rax+3], dl
mov rax, [rbp+var_500]
mov [rax+2], dh
mov eax, edx
shr eax, 10h
mov rcx, [rbp+var_500]
mov [rcx+1], al
shr edx, 18h
mov rax, [rbp+var_500]
mov [rax], dl
test ebx, ebx
jnz loc_A34BB
mov rdi, r14
mov rsi, r12
mov rdx, [rbp+var_518]
mov ecx, 3
mov r8, r15
call _mi_write_keypage
loc_A365C:
mov ebx, eax
jmp loc_A34BB
loc_A3663:
call ___stack_chk_fail
|
// bad sp value at call has been detected, the output may be wrong!
long long w_search_0(
long long *a1,
long long a2,
unsigned int a3,
unsigned __int8 *a4,
unsigned int a5,
long long a6,
long long a7,
long long a8,
long long a9,
char a10)
{
char *v13; // r15
long long v14; // r8
int v15; // eax
unsigned int v16; // r12d
unsigned int v17; // ebx
unsigned long long v19; // rax
char v20; // r10
long long *v21; // r12
int v22; // r14d
int v23; // eax
long long *v24; // rdi
unsigned int v25; // eax
unsigned long long v26; // rax
long long v28; // rcx
unsigned int v29; // edi
long long v30; // r12
long long v31; // rcx
long long v32; // rcx
unsigned int v33; // edx
unsigned long long v34; // [rsp+0h] [rbp-520h] BYREF
unsigned long long v35; // [rsp+8h] [rbp-518h]
unsigned __int8 *v36; // [rsp+10h] [rbp-510h]
int v37; // [rsp+18h] [rbp-508h]
unsigned int v38; // [rsp+1Ch] [rbp-504h]
_BYTE *v39; // [rsp+20h] [rbp-500h] BYREF
char v40; // [rsp+2Fh] [rbp-4F1h] BYREF
unsigned __int8 v41; // [rsp+30h] [rbp-4F0h] BYREF
_WORD v42[607]; // [rsp+31h] [rbp-4EFh]
unsigned long long v43; // [rsp+4F0h] [rbp-30h]
v38 = a5;
v36 = a4;
v43 = __readfsqword(0x28u);
v13 = (char *)&v34 - ((*(unsigned __int16 *)(a2 + 14) + 2431) & 0xFFFFFFF0);
if ( !mi_fetch_keypage(a1, a2, a6) )
return (unsigned int)-1;
v35 = a6;
v14 = 2416LL;
if ( (a3 & 1) != 0 )
v14 = v38;
v37 = a3;
v15 = (*(long long ( **)(long long *, long long, char *, unsigned __int8 *, long long, _QWORD, _BYTE **, unsigned __int8 *, char *))(a2 + 64))(
a1,
a2,
v13,
v36,
v14,
a3,
&v39,
&v41,
&v40);
v16 = 0;
if ( *v13 < 0 )
v16 = *(_DWORD *)(*a1 + 380);
if ( v15 )
{
LABEL_7:
v17 = -1;
if ( v15 != 0x7FFFFFFF )
{
if ( !v40 )
a10 = 0;
v19 = mi_kpos(v16, (long long)v39);
v20 = a10;
v21 = a1;
v22 = (int)v36;
if ( v19 == -1LL
|| (v23 = w_search_0((_DWORD)v21, a2, v37, (_DWORD)v36, v38, v19, (long long)v13, (long long)v39, v35, a10),
v20 = a10,
v23 > 0) )
{
v17 = mi_insert((_DWORD)v21, a2, v22, (_DWORD)v13, (_DWORD)v39, (unsigned int)&v41, a7, a8, a9, v20);
if ( !(unsigned int)mi_write_keypage(v21, a2, v35, 3u, v13) )
return v17;
return (unsigned int)-1;
}
return (unsigned int)v23;
}
return v17;
}
v24 = (long long *)a2;
v25 = (*(long long ( **)(long long, _QWORD, _BYTE **, unsigned __int8 *))(a2 + 72))(a2, v16, &v39, &v41);
if ( v25 )
{
v24 = a1;
v26 = mi_dpos(a1, 0, (long long)(&v41 + v25));
}
else
{
v26 = -1LL;
}
if ( *(char *)(a2 + 10) >= 0 )
{
a1[52] = v26;
*(_DWORD *)my_thread_var(v24) = 121;
return (unsigned int)-1;
}
if ( v41 == 255LL )
v28 = (unsigned __int16)__ROL2__(v42[0], 8) + 3LL;
else
v28 = v41 + 1LL;
if ( (*(&v41 + v28) & 0x80) == 0 )
{
v37 = 4;
v15 = (*(long long ( **)(long long *, long long, char *, unsigned __int8 *, long long, long long, _BYTE **, unsigned __int8 *, char *))(a2 + 64))(
a1,
a2,
v13,
v36,
2416LL,
4LL,
&v39,
&v41,
&v40);
goto LABEL_7;
}
v29 = v16;
v38 = (*(&v41 + v28) << 24) | (unsigned __int16)__ROL2__(*(_WORD *)((char *)v42 + v28 + 1), 8) | (*((unsigned __int8 *)v42 + v28) << 16);
v34 = v26;
v30 = *a1 + 424;
v31 = *v36;
if ( v31 == 255 )
v32 = (unsigned __int16)__ROL2__(*(_WORD *)(v36 + 1), 8) + 3LL;
else
v32 = v31 + 1;
v39 += -*(unsigned __int16 *)(*a1 + 442) - v29;
v17 = mi_ck_real_write_btree((long long)a1, v30, (long long)&v36[v32], 0, &v34, 4);
mi_dpointer(a1, (long long)(v39 + 4), v34);
v33 = v38 - 1;
v39[3] = v38 - 1;
v39[2] = BYTE1(v33);
v39[1] = BYTE2(v33);
*v39 = HIBYTE(v33);
if ( !v17 )
return (unsigned int)mi_write_keypage(a1, v30, v35, 3u, v13);
return v17;
}
|
w_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x4f8
MOV RBX,R9
MOV dword ptr [RBP + -0x504],R8D
MOV qword ptr [RBP + -0x510],RCX
MOV R12D,EDX
MOV R13,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOVZX EAX,word ptr [RSI + 0xe]
MOV R15,RSP
ADD EAX,0x97f
AND EAX,0xfffffff0
SUB R15,RAX
MOV RSP,R15
MOV RDX,R9
MOV ECX,0x3
MOV R8,R15
XOR R9D,R9D
CALL 0x0019eb84
TEST RAX,RAX
JZ 0x001a34b6
MOV qword ptr [RBP + -0x518],RBX
TEST R12B,0x1
MOV R8D,0x970
CMOVNZ R8D,dword ptr [RBP + -0x504]
SUB RSP,0x8
LEA RBX,[RBP + -0x4f1]
LEA RAX,[RBP + -0x4f0]
LEA R10,[RBP + -0x500]
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x510]
MOV dword ptr [RBP + -0x508],R12D
MOV R9D,R12D
PUSH RBX
PUSH RAX
PUSH R10
CALL qword ptr [R13 + 0x40]
ADD RSP,0x20
CMP byte ptr [R15],0x0
MOV R12D,0x0
JNS 0x001a3386
MOV RCX,qword ptr [R14]
MOV R12D,dword ptr [RCX + 0x17c]
LAB_001a3386:
TEST EAX,EAX
JZ 0x001a3461
LAB_001a338e:
MOV EBX,0xffffffff
CMP EAX,0x7fffffff
JZ 0x001a34bb
XOR EAX,EAX
CMP byte ptr [RBP + -0x4f1],0x0
MOVZX EBX,byte ptr [RBP + 0x28]
CMOVZ EBX,EAX
MOV RSI,qword ptr [RBP + -0x500]
MOV EDI,R12D
CALL 0x0019f4fe
MOVSX R10D,BL
CMP RAX,-0x1
MOV R12,R14
MOV R14,qword ptr [RBP + -0x510]
JZ 0x001a3411
MOV RDI,R12
MOV RSI,R13
MOV EDX,dword ptr [RBP + -0x508]
MOV RCX,R14
MOV R8D,dword ptr [RBP + -0x504]
MOV R9,RAX
PUSH R10
PUSH qword ptr [RBP + -0x518]
PUSH qword ptr [RBP + -0x500]
PUSH R15
MOV RBX,R10
CALL 0x001a32ac
MOV R10,RBX
ADD RSP,0x20
TEST EAX,EAX
JLE 0x001a365c
LAB_001a3411:
MOV R8,qword ptr [RBP + -0x500]
LEA R9,[RBP + -0x4f0]
MOV RDI,R12
MOV RSI,R13
MOV RDX,R14
MOV RCX,R15
PUSH R10
PUSH qword ptr [RBP + 0x20]
PUSH qword ptr [RBP + 0x18]
PUSH qword ptr [RBP + 0x10]
CALL 0x001a3777
ADD RSP,0x20
MOV EBX,EAX
MOV RDI,R12
MOV RSI,R13
MOV RDX,qword ptr [RBP + -0x518]
MOV ECX,0x3
MOV R8,R15
CALL 0x0019ec30
TEST EAX,EAX
JNZ 0x001a34b6
JMP 0x001a34bb
LAB_001a3461:
LEA RDX,[RBP + -0x500]
LEA RCX,[RBP + -0x4f0]
MOV RDI,R13
MOV ESI,R12D
CALL qword ptr [R13 + 0x48]
TEST EAX,EAX
JZ 0x001a3496
MOV EAX,EAX
LEA RDX,[RAX + RBP*0x1]
ADD RDX,-0x4f0
MOV RDI,R14
XOR ESI,ESI
CALL 0x0019f5dd
JMP 0x001a349d
LAB_001a3496:
MOV RAX,-0x1
LAB_001a349d:
TEST byte ptr [R13 + 0xa],0x80
JNZ 0x001a34df
MOV qword ptr [R14 + 0x1a0],RAX
CALL 0x001c14ee
MOV dword ptr [RAX],0x79
LAB_001a34b6:
MOV EBX,0xffffffff
LAB_001a34bb:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001a3663
MOV EAX,EBX
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a34df:
MOVZX ECX,byte ptr [RBP + -0x4f0]
CMP RCX,0xff
JZ 0x001a34f4
INC RCX
JMP 0x001a3506
LAB_001a34f4:
MOVZX ECX,word ptr [RBP + -0x4ef]
ROL CX,0x8
MOVZX ECX,CX
ADD RCX,0x3
LAB_001a3506:
MOVZX EDX,byte ptr [RBP + RCX*0x1 + -0x4f0]
SHL EDX,0x18
JS 0x001a355b
SUB RSP,0x8
MOV dword ptr [RBP + -0x508],0x4
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x510]
MOV R8D,0x970
MOV R9D,0x4
PUSH RBX
LEA RAX,[RBP + -0x4f0]
PUSH RAX
LEA RAX,[RBP + -0x500]
PUSH RAX
CALL qword ptr [R13 + 0x40]
ADD RSP,0x20
JMP 0x001a338e
LAB_001a355b:
MOV RDI,R12
MOVZX ESI,word ptr [RBP + RCX*0x1 + -0x4ee]
ROL SI,0x8
MOVZX ESI,SI
MOVZX ECX,byte ptr [RBP + RCX*0x1 + -0x4ef]
SHL ECX,0x10
OR ECX,ESI
OR ECX,EDX
MOV dword ptr [RBP + -0x504],ECX
MOV qword ptr [RBP + -0x520],RAX
MOV RAX,qword ptr [R14]
LEA R12,[RAX + 0x1a8]
MOV RDX,qword ptr [RBP + -0x510]
MOVZX ECX,byte ptr [RDX]
CMP RCX,0xff
JZ 0x001a35ab
INC RCX
JMP 0x001a35ba
LAB_001a35ab:
MOVZX ECX,word ptr [RDX + 0x1]
ROL CX,0x8
MOVZX ECX,CX
ADD RCX,0x3
LAB_001a35ba:
ADD RDX,RCX
MOVZX EAX,word ptr [RAX + 0x1ba]
ADD EDI,EAX
SUB qword ptr [RBP + -0x500],RDI
LEA R13,[RBP + -0x520]
MOV RDI,R14
MOV RSI,R12
XOR ECX,ECX
MOV R8,R13
MOV R9D,0x4
CALL 0x001a322b
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x500]
ADD RSI,0x4
MOV RDX,qword ptr [R13]
MOV RDI,R14
CALL 0x001a02a3
MOV EDX,dword ptr [RBP + -0x504]
DEC EDX
MOV RAX,qword ptr [RBP + -0x500]
MOV byte ptr [RAX + 0x3],DL
MOV RAX,qword ptr [RBP + -0x500]
MOV byte ptr [RAX + 0x2],DH
MOV EAX,EDX
SHR EAX,0x10
MOV RCX,qword ptr [RBP + -0x500]
MOV byte ptr [RCX + 0x1],AL
SHR EDX,0x18
MOV RAX,qword ptr [RBP + -0x500]
MOV byte ptr [RAX],DL
TEST EBX,EBX
JNZ 0x001a34bb
MOV RDI,R14
MOV RSI,R12
MOV RDX,qword ptr [RBP + -0x518]
MOV ECX,0x3
MOV R8,R15
CALL 0x0019ec30
LAB_001a365c:
MOV EBX,EAX
JMP 0x001a34bb
LAB_001a3663:
CALL 0x0012a280
|
int w_search(long *param_1,long param_2,uint param_3,byte *param_4,int param_5,int8 param_6,
int8 param_7,int8 param_8,int8 param_9,char param_10)
{
code *pcVar1;
long lVar2;
int8 uVar3;
int iVar4;
int iVar5;
int iVar6;
uint uVar7;
long lVar8;
int4 *puVar9;
long lVar10;
long lVar11;
byte *pbVar12;
int1 *puVar13;
char *pcVar14;
long in_FS_OFFSET;
long alStack_550 [5];
long local_528;
int8 local_520;
byte *local_518;
uint local_510;
int local_50c;
int1 *local_508;
char local_4f9;
byte local_4f8;
int1 local_4f7 [1215];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0x97f & 0xfffffff0);
pcVar14 = (char *)((long)&local_528 + lVar2);
local_518 = param_4;
local_50c = param_5;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x1a330f;
lVar8 = _mi_fetch_keypage(param_1,param_2,param_6,3,pcVar14,0);
pbVar12 = local_518;
if (lVar8 != 0) {
iVar6 = 0x970;
if ((param_3 & 1) != 0) {
iVar6 = local_50c;
}
local_520 = param_6;
local_510 = param_3;
*(char **)((long)alStack_550 + lVar2 + 0x18) = &local_4f9;
*(byte **)((long)alStack_550 + lVar2 + 0x10) = &local_4f8;
*(int1 ***)((long)alStack_550 + lVar2 + 8) = &local_508;
pcVar1 = *(code **)(param_2 + 0x40);
*(int8 *)((long)alStack_550 + lVar2) = 0x1a336c;
iVar4 = (*pcVar1)(param_1,param_2,pcVar14,pbVar12,iVar6,param_3);
iVar6 = 0;
if (*pcVar14 < '\0') {
iVar6 = *(int *)(*param_1 + 0x17c);
}
if (iVar4 == 0) {
pcVar1 = *(code **)(param_2 + 0x48);
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x1a3479;
uVar7 = (*pcVar1)(param_2,iVar6,&local_508,&local_4f8);
if (uVar7 == 0) {
lVar8 = -1;
}
else {
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x1a3494;
lVar8 = _mi_dpos(param_1,0,&local_4f8 + uVar7);
}
pbVar12 = local_518;
if ((*(byte *)(param_2 + 10) & 0x80) == 0) {
param_1[0x34] = lVar8;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x1a34b0;
puVar9 = (int4 *)_my_thread_var();
*puVar9 = 0x79;
goto LAB_001a34b6;
}
if ((ulong)local_4f8 == 0xff) {
lVar10 = (ulong)(ushort)(local_4f7._0_2_ << 8 | (ushort)local_4f7._0_2_ >> 8) + 3;
}
else {
lVar10 = (ulong)local_4f8 + 1;
}
if ((int)((uint)(&local_4f8)[lVar10] << 0x18) < 0) {
local_50c = CONCAT13((&local_4f8)[lVar10],
CONCAT12(local_4f7[lVar10],
*(ushort *)(local_4f7 + lVar10 + 1) << 8 |
*(ushort *)(local_4f7 + lVar10 + 1) >> 8));
lVar10 = *param_1 + 0x1a8;
if ((ulong)*local_518 == 0xff) {
lVar11 = (ulong)(ushort)(*(ushort *)(local_518 + 1) << 8 | *(ushort *)(local_518 + 1) >> 8
) + 3;
}
else {
lVar11 = (ulong)*local_518 + 1;
}
pbVar12 = local_518 + lVar11;
local_508 = local_508 + -(ulong)(iVar6 + (uint)*(ushort *)(*param_1 + 0x1ba));
local_528 = lVar8;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x1a35ea;
iVar5 = _mi_ck_real_write_btree(param_1,lVar10,pbVar12,0,&local_528,4);
lVar8 = local_528;
puVar13 = local_508 + 4;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x1a3603;
_mi_dpointer(param_1,puVar13,lVar8);
uVar3 = local_520;
iVar6 = local_50c + -1;
local_508[3] = (char)iVar6;
local_508[2] = (char)((uint)iVar6 >> 8);
local_508[1] = (char)((uint)iVar6 >> 0x10);
*local_508 = (char)((uint)iVar6 >> 0x18);
if (iVar5 == 0) {
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x1a365c;
iVar5 = _mi_write_keypage(param_1,lVar10,uVar3,3,pcVar14);
}
goto LAB_001a34bb;
}
local_510 = 4;
*(char **)((long)alStack_550 + lVar2 + 0x18) = &local_4f9;
*(byte **)((long)alStack_550 + lVar2 + 0x10) = &local_4f8;
*(int1 ***)((long)alStack_550 + lVar2 + 8) = &local_508;
pcVar1 = *(code **)(param_2 + 0x40);
*(int8 *)((long)alStack_550 + lVar2) = 0x1a3552;
iVar4 = (*pcVar1)(param_1,param_2,pcVar14,pbVar12,0x970,4);
}
puVar13 = local_508;
iVar5 = -1;
if (iVar4 == 0x7fffffff) goto LAB_001a34bb;
if (local_4f9 == '\0') {
param_10 = '\0';
}
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x1a33bd;
lVar8 = _mi_kpos(iVar6,puVar13);
iVar6 = local_50c;
uVar7 = local_510;
pbVar12 = local_518;
if (lVar8 != -1) {
*(ulong *)((long)alStack_550 + lVar2 + 0x20) = (ulong)(uint)(int)param_10;
*(int8 *)((long)alStack_550 + lVar2 + 0x18) = local_520;
*(int1 **)((long)alStack_550 + lVar2 + 0x10) = local_508;
*(char **)((long)alStack_550 + lVar2 + 8) = pcVar14;
*(int8 *)((long)alStack_550 + lVar2) = 0x1a3402;
iVar5 = w_search(param_1,param_2,uVar7,pbVar12,iVar6,lVar8);
if (iVar5 < 1) goto LAB_001a34bb;
}
puVar13 = local_508;
*(ulong *)((long)alStack_550 + lVar2 + 0x20) = (ulong)(uint)(int)param_10;
*(int8 *)((long)alStack_550 + lVar2 + 0x18) = param_9;
*(int8 *)((long)alStack_550 + lVar2 + 0x10) = param_8;
*(int8 *)((long)alStack_550 + lVar2 + 8) = param_7;
*(int8 *)((long)alStack_550 + lVar2) = 0x1a343b;
iVar5 = _mi_insert(param_1,param_2,pbVar12,pcVar14,puVar13,&local_4f8);
uVar3 = local_520;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x1a345b;
iVar6 = _mi_write_keypage(param_1,param_2,uVar3,3,pcVar14);
if (iVar6 == 0) goto LAB_001a34bb;
}
LAB_001a34b6:
iVar5 = -1;
LAB_001a34bb:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)((long)alStack_550 + lVar2 + 0x20) = _mi_enlarge_root;
__stack_chk_fail();
}
return iVar5;
}
|
|
57,904
|
testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(std::ostream*, 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&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
|
AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest.cc
|
void JsonUnitTestResultPrinter::OutputJsonKey(
std::ostream* stream, const std::string& element_name,
const std::string& name, int value, const std::string& indent, bool comma) {
const std::vector<std::string>& allowed_names =
GetReservedOutputAttributesForElement(element_name);
GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=
allowed_names.end())
<< "Key \"" << name << "\" is not allowed for value \"" << element_name
<< "\".";
*stream << indent << "\"" << name << "\": " << StreamableToString(value);
if (comma) *stream << ",\n";
}
|
O3
|
cpp
|
testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(std::ostream*, 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&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %ebp
movq %r8, %r15
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movl %ecx, 0xc(%rsp)
leaq 0x30(%rsp), %r13
movq %r13, %rdi
callq 0x67ac6
movq (%r13), %rdi
movq 0x8(%r13), %rsi
movq %r14, %rdx
callq 0x792c2
cmpq 0x38(%rsp), %rax
jne 0x6ad21
leaq 0x1bd0e(%rip), %rdx # 0x86992
leaq 0x10(%rsp), %rdi
movl $0x3, %esi
movl $0x1227, %ecx # imm = 0x1227
callq 0x5830c
movq 0x49339(%rip), %rdi # 0xb3fd8
leaq 0x1c9a3(%rip), %rsi # 0x87649
movl $0x65, %edx
callq 0x11b90
movq 0x49321(%rip), %rdi # 0xb3fd8
leaq 0x1cbe2(%rip), %rsi # 0x878a0
movl $0x5, %edx
callq 0x11b90
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x49302(%rip), %rdi # 0xb3fd8
callq 0x11b90
movq %rax, %r13
leaq 0x1cbc1(%rip), %rsi # 0x878a6
movl $0x1c, %edx
movq %rax, %rdi
callq 0x11b90
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r13, %rdi
callq 0x11b90
leaq 0x1cbb9(%rip), %rsi # 0x878c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x11b90
leaq 0x10(%rsp), %rdi
callq 0x5844e
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x11b90
movq %rax, %r15
leaq 0x1cc04(%rip), %rsi # 0x8793e
movl $0x1, %edx
movq %rax, %rdi
callq 0x11b90
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x11b90
movq %rax, %r14
leaq 0x1cb66(%rip), %rsi # 0x878c6
movl $0x3, %edx
movq %rax, %rdi
callq 0x11b90
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x73ab7
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x11b90
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ada9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11120
testb %bpl, %bpl
je 0x6adc2
leaq 0x1cb63(%rip), %rsi # 0x87918
movl $0x2, %edx
movq %rbx, %rdi
callq 0x11b90
leaq 0x30(%rsp), %rdi
callq 0x73be2
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6ae10
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ae13
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11120
jmp 0x6ae13
jmp 0x6ae10
jmp 0x6ae10
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5844e
jmp 0x6ae13
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x73be2
movq %rbx, %rdi
callq 0x11760
nop
|
_ZN7testing8internal25JsonUnitTestResultPrinter13OutputJsonKeyEPSoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_iSA_b:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov ebp, r9d
mov r15, r8
mov r14, rdx
mov r12, rsi
mov rbx, rdi
mov [rsp+78h+var_6C], ecx
lea r13, [rsp+78h+var_48]
mov rdi, r13
call _ZN7testingL37GetReservedOutputAttributesForElementERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::GetReservedOutputAttributesForElement(std::string const&)
mov rdi, [r13+0]
mov rsi, [r13+8]
mov rdx, r14
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEENS0_5__ops16_Iter_equals_valIS8_EEET_SH_SH_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>,std::random_access_iterator_tag)
cmp rax, [rsp+78h+var_40]
jnz loc_6AD21
lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+78h+var_68]
mov esi, 3
mov ecx, 1227h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aConditionStdFi; "Condition std::find(allowed_names.begin"...
mov edx, 65h ; 'e'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aKey; "Key \""
mov edx, 5
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, cs:_ZSt4cerr_ptr
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r13, rax
lea rsi, aIsNotAllowedFo_0; "\" is not allowed for value \""
mov edx, 1Ch
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 rsi, [r12]
mov rdx, [r12+8]
mov rdi, r13
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, asc_878C3; "\"."
mov edx, 2
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)
lea rdi, [rsp+78h+var_68]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
loc_6AD21:
mov rsi, [r15]
mov rdx, [r15+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 r15, rax
lea rsi, aMessage+0Fh; "\""
mov edx, 1
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 rsi, [r14]
mov rdx, [r14+8]
mov rdi, r15
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, asc_878C6; "\": "
mov edx, 3
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)
lea rdi, [rsp+78h+var_68]
lea rsi, [rsp+78h+var_6C]
call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&)
mov rsi, [rsp+78h+var_68]
mov rdx, [rsp+78h+var_60]
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)
lea rax, [rsp+78h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6ADA9
mov rsi, [rsp+78h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6ADA9:
test bpl, bpl
jz short loc_6ADC2
lea rsi, asc_87917+1; ",\n"
mov edx, 2
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)
loc_6ADC2:
lea rdi, [rsp+78h+var_48]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_6AE10
mov rbx, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6AE13
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6AE13
jmp short loc_6AE10
jmp short loc_6AE10
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_6AE13
loc_6AE10:
mov rbx, rax
loc_6AE13:
lea rdi, [rsp+arg_28]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, rbx
call __Unwind_Resume
|
void testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(
long long a1,
_QWORD *a2,
_QWORD *a3,
int a4,
_QWORD *a5,
char a6)
{
long long v9; // rax
long long v10; // r13
long long v11; // rax
long long v12; // r15
long long v13; // r14
int v14; // edx
int v15; // ecx
int v16; // r8d
int v17; // r9d
int v18; // [rsp+Ch] [rbp-6Ch] BYREF
void *v19[2]; // [rsp+10h] [rbp-68h] BYREF
long long v20; // [rsp+20h] [rbp-58h] BYREF
long long v21; // [rsp+30h] [rbp-48h] BYREF
long long v22; // [rsp+38h] [rbp-40h]
v18 = a4;
testing::GetReservedOutputAttributesForElement((long long)&v21, a2);
v9 = std::__find_if<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>>(
v21,
v22,
a3);
if ( v9 == v22 )
{
testing::internal::GTestLog::GTestLog(
v19,
3,
"/workspace/llm4binary/github2025/AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest.cc",
4647);
std::__ostream_insert<char,std::char_traits<char>>(
&std::cerr,
"Condition std::find(allowed_names.begin(), allowed_names.end(), name) != allowed_names.end() failed. ",
101LL);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Key \"", 5LL);
v10 = std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, *a3, a3[1]);
std::__ostream_insert<char,std::char_traits<char>>(v10, "\" is not allowed for value \"", 28LL);
v11 = std::__ostream_insert<char,std::char_traits<char>>(v10, *a2, a2[1]);
std::__ostream_insert<char,std::char_traits<char>>(v11, "\".", 2LL);
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v19);
}
v12 = std::__ostream_insert<char,std::char_traits<char>>(a1, *a5, a5[1]);
std::__ostream_insert<char,std::char_traits<char>>(v12, "\"", 1LL);
v13 = std::__ostream_insert<char,std::char_traits<char>>(v12, *a3, a3[1]);
std::__ostream_insert<char,std::char_traits<char>>(v13, "\": ", 3LL);
testing::internal::StreamableToString<int>((unsigned int)v19, (unsigned int)&v18, v14, v15, v16, v17);
std::__ostream_insert<char,std::char_traits<char>>(v13, v19[0], v19[1]);
if ( v19[0] != &v20 )
operator delete(v19[0], v20 + 1);
if ( a6 )
std::__ostream_insert<char,std::char_traits<char>>(a1, ",\n", 2LL);
std::vector<std::string>::~vector(&v21);
}
|
OutputJsonKey:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV EBP,R9D
MOV R15,R8
MOV R14,RDX
MOV R12,RSI
MOV RBX,RDI
MOV dword ptr [RSP + 0xc],ECX
LEA R13,[RSP + 0x30]
MOV RDI,R13
CALL 0x00167ac6
MOV RDI,qword ptr [R13]
MOV RSI,qword ptr [R13 + 0x8]
LAB_0016ac6a:
MOV RDX,R14
CALL 0x001792c2
CMP RAX,qword ptr [RSP + 0x38]
JNZ 0x0016ad21
LAB_0016ac7d:
LEA RDX,[0x186992]
LEA RDI,[RSP + 0x10]
MOV ESI,0x3
MOV ECX,0x1227
CALL 0x0015830c
LAB_0016ac98:
MOV RDI,qword ptr [0x001b3fd8]
LEA RSI,[0x187649]
MOV EDX,0x65
CALL 0x00111b90
MOV RDI,qword ptr [0x001b3fd8]
LEA RSI,[0x1878a0]
MOV EDX,0x5
CALL 0x00111b90
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [0x001b3fd8]
CALL 0x00111b90
MOV R13,RAX
LEA RSI,[0x1878a6]
MOV EDX,0x1c
MOV RDI,RAX
CALL 0x00111b90
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
MOV RDI,R13
CALL 0x00111b90
LEA RSI,[0x1878c3]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00111b90
LAB_0016ad17:
LEA RDI,[RSP + 0x10]
CALL 0x0015844e
LAB_0016ad21:
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LAB_0016ad28:
MOV RDI,RBX
CALL 0x00111b90
MOV R15,RAX
LEA RSI,[0x18793e]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00111b90
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,R15
CALL 0x00111b90
MOV R14,RAX
LEA RSI,[0x1878c6]
MOV EDX,0x3
MOV RDI,RAX
CALL 0x00111b90
LAB_0016ad6d:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0xc]
CALL 0x00173ab7
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
LAB_0016ad86:
MOV RDI,R14
CALL 0x00111b90
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0016ada9
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00111120
LAB_0016ada9:
TEST BPL,BPL
JZ 0x0016adc2
LAB_0016adae:
LEA RSI,[0x187918]
MOV EDX,0x2
MOV RDI,RBX
CALL 0x00111b90
LAB_0016adc2:
LEA RDI,[RSP + 0x30]
CALL 0x00173be2
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(std::ostream*, std::__cxx11::string
const&, std::__cxx11::string const&, int, std::__cxx11::string const&, bool) */
void testing::internal::JsonUnitTestResultPrinter::OutputJsonKey
(ostream *param_1,string *param_2,string *param_3,int param_4,string *param_5,
bool param_6)
{
long lVar1;
ostream *poVar2;
int local_6c;
long *local_68;
long local_60;
long local_58 [2];
int8 local_48;
long local_40;
local_6c = param_4;
GetReservedOutputAttributesForElement((testing *)&local_48,param_2);
/* try { // try from 0016ac6a to 0016ac71 has its CatchHandler @ 0016adff */
lVar1 = std::
__find_if<__gnu_cxx::__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,__gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>>
(local_48,local_40,param_3);
if (lVar1 == local_40) {
/* try { // try from 0016ac7d to 0016ac97 has its CatchHandler @ 0016addb */
GTestLog::GTestLog((GTestLog *)&local_68,3,
"/workspace/llm4binary/github2025/AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest.cc"
,0x1227);
/* try { // try from 0016ac98 to 0016ad16 has its CatchHandler @ 0016ae01 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_001b3fd8,
"Condition std::find(allowed_names.begin(), allowed_names.end(), name) != allowed_names.end() failed. "
,0x65);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_001b3fd8,"Key \"",5);
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_001b3fd8,*(char **)param_3,*(long *)(param_3 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\" is not allowed for value \"",0x1c)
;
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
(poVar2,*(char **)param_2,*(long *)(param_2 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\".",2);
GTestLog::~GTestLog((GTestLog *)&local_68);
}
/* try { // try from 0016ad28 to 0016ad6c has its CatchHandler @ 0016ae10 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
(param_1,*(char **)param_5,*(long *)(param_5 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\"",1);
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
(poVar2,*(char **)param_3,*(long *)(param_3 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\": ",3);
/* try { // try from 0016ad6d to 0016ad7b has its CatchHandler @ 0016adfd */
StreamableToString<int>((internal *)&local_68,&local_6c);
/* try { // try from 0016ad86 to 0016ad8d has its CatchHandler @ 0016addd */
std::__ostream_insert<char,std::char_traits<char>>(poVar2,(char *)local_68,local_60);
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
if (param_6) {
/* try { // try from 0016adae to 0016adc1 has its CatchHandler @ 0016ae10 */
std::__ostream_insert<char,std::char_traits<char>>(param_1,",\n",2);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_48);
return;
}
|
|
57,905
|
js_promise_resolve_function_call
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_promise_resolve_function_call(JSContext *ctx,
JSValue func_obj,
JSValue this_val,
int argc, JSValue *argv,
int flags)
{
JSObject *p = JS_VALUE_GET_OBJ(func_obj);
JSPromiseFunctionData *s;
JSValue resolution, args[3];
JSValue then;
BOOL is_reject;
s = p->u.promise_function_data;
if (!s || s->presolved->already_resolved)
return JS_UNDEFINED;
s->presolved->already_resolved = TRUE;
is_reject = p->class_id - JS_CLASS_PROMISE_RESOLVE_FUNCTION;
if (argc > 0)
resolution = argv[0];
else
resolution = JS_UNDEFINED;
#ifdef DUMP_PROMISE
if (check_dump_flag(ctx->rt, DUMP_PROMISE)) {
printf("js_promise_resolving_function_call: is_reject=%d resolution=", is_reject);
JS_DumpValue(ctx->rt, resolution);
printf("\n");
}
#endif
if (is_reject || !JS_IsObject(resolution)) {
goto done;
} else if (js_same_value(ctx, resolution, s->promise)) {
JS_ThrowTypeError(ctx, "promise self resolution");
goto fail_reject;
}
then = JS_GetProperty(ctx, resolution, JS_ATOM_then);
if (JS_IsException(then)) {
JSValue error;
fail_reject:
error = JS_GetException(ctx);
reject_promise(ctx, s->promise, error);
JS_FreeValue(ctx, error);
} else if (!JS_IsFunction(ctx, then)) {
JS_FreeValue(ctx, then);
done:
fulfill_or_reject_promise(ctx, s->promise, resolution, is_reject);
} else {
args[0] = s->promise;
args[1] = resolution;
args[2] = then;
JS_EnqueueJob(ctx, js_promise_resolve_thenable_job, 3, args);
JS_FreeValue(ctx, then);
}
return JS_UNDEFINED;
}
|
O0
|
c
|
js_promise_resolve_function_call:
subq $0x108, %rsp # imm = 0x108
movl 0x118(%rsp), %eax
movq 0x110(%rsp), %rax
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xf0(%rsp)
movq %rcx, 0xd8(%rsp)
movq %r8, 0xe0(%rsp)
movq %rdi, 0xd0(%rsp)
movl %r9d, 0xcc(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0xb8(%rsp)
cmpq $0x0, 0xb8(%rsp)
je 0x59de7
movq 0xb8(%rsp), %rax
movq 0x10(%rax), %rax
cmpl $0x0, 0x4(%rax)
je 0x59e03
movl $0x0, 0xf8(%rsp)
movq $0x3, 0x100(%rsp)
jmp 0x5a0c7
movq 0xb8(%rsp), %rax
movq 0x10(%rax), %rax
movl $0x1, 0x4(%rax)
movq 0xc0(%rsp), %rax
movzwl 0x6(%rax), %eax
subl $0x32, %eax
movl %eax, 0x5c(%rsp)
cmpl $0x0, 0xcc(%rsp)
jle 0x59e54
movq 0x110(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0xa8(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0xb0(%rsp)
jmp 0x59e7f
movl $0x0, 0x48(%rsp)
movq $0x3, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0xb0(%rsp)
cmpl $0x0, 0x5c(%rsp)
jne 0x59ea0
movq 0xa8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0x31260
cmpl $0x0, %eax
jne 0x59ea5
jmp 0x59ff0
movq 0xd0(%rsp), %rdi
movq 0xb8(%rsp), %rax
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
movq (%rax), %rcx
movq 0x8(%rax), %r8
callq 0x3be00
cmpl $0x0, %eax
je 0x59ef8
movq 0xd0(%rsp), %rdi
leaq 0xbb66b(%rip), %rsi # 0x115550
movb $0x0, %al
callq 0x335f0
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
jmp 0x59f50
jmp 0x59efa
movq 0xd0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
movl $0x80, %ecx
callq 0x30070
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x59fbd
jmp 0x59f50
movq 0xd0(%rsp), %rdi
callq 0x33260
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xd0(%rsp), %rdi
movq 0xb8(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r8
callq 0x980e0
movq 0xd0(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x29f80
jmp 0x5a0b0
movq 0xd0(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x34800
cmpl $0x0, %eax
jne 0x5a026
movq 0xd0(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x29f80
movq 0xd0(%rsp), %rdi
movq 0xb8(%rsp), %rax
movl 0x5c(%rsp), %r9d
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0xa8(%rsp), %rcx
movq 0xb0(%rsp), %r8
callq 0x98130
jmp 0x5a0ae
movq 0xb8(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x70(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0xd0(%rsp), %rdi
leaq 0x70(%rsp), %rcx
leaq 0x3e463(%rip), %rsi # 0x984f0
movl $0x3, %edx
callq 0x29c20
movq 0xd0(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x29f80
jmp 0x5a0b0
movl $0x0, 0xf8(%rsp)
movq $0x3, 0x100(%rsp)
movq 0xf8(%rsp), %rax
movq 0x100(%rsp), %rdx
addq $0x108, %rsp # imm = 0x108
retq
nop
|
js_promise_resolve_function_call:
sub rsp, 108h
mov eax, [rsp+108h+arg_8]
mov rax, [rsp+108h+arg_0]
mov [rsp+108h+var_20], rsi
mov [rsp+108h+var_18], rdx
mov [rsp+108h+var_30], rcx
mov [rsp+108h+var_28], r8
mov [rsp+108h+var_38], rdi
mov [rsp+108h+var_3C], r9d
mov rax, [rsp+108h+var_20]
mov [rsp+108h+var_48], rax
mov rax, [rsp+108h+var_48]
mov rax, [rax+30h]
mov [rsp+108h+var_50], rax
cmp [rsp+108h+var_50], 0
jz short loc_59DE7
mov rax, [rsp+108h+var_50]
mov rax, [rax+10h]
cmp dword ptr [rax+4], 0
jz short loc_59E03
loc_59DE7:
mov dword ptr [rsp+108h+var_10], 0
mov [rsp+108h+var_8], 3
jmp loc_5A0C7
loc_59E03:
mov rax, [rsp+108h+var_50]
mov rax, [rax+10h]
mov dword ptr [rax+4], 1
mov rax, [rsp+108h+var_48]
movzx eax, word ptr [rax+6]
sub eax, 32h ; '2'
mov [rsp+108h+var_AC], eax
cmp [rsp+108h+var_3C], 0
jle short loc_59E54
mov rax, [rsp+108h+arg_0]
mov rcx, [rax]
mov [rsp+108h+var_60], rcx
mov rax, [rax+8]
mov [rsp+108h+var_58], rax
jmp short loc_59E7F
loc_59E54:
mov dword ptr [rsp+108h+var_C0], 0
mov [rsp+108h+var_B8], 3
mov rax, [rsp+108h+var_C0]
mov [rsp+108h+var_60], rax
mov rax, [rsp+108h+var_B8]
mov [rsp+108h+var_58], rax
loc_59E7F:
cmp [rsp+108h+var_AC], 0
jnz short loc_59EA0
mov rdi, [rsp+108h+var_60]
mov rsi, [rsp+108h+var_58]
call JS_IsObject
cmp eax, 0
jnz short loc_59EA5
loc_59EA0:
jmp loc_59FF0
loc_59EA5:
mov rdi, [rsp+108h+var_38]
mov rax, [rsp+108h+var_50]
mov rsi, [rsp+108h+var_60]
mov rdx, [rsp+108h+var_58]
mov rcx, [rax]
mov r8, [rax+8]
call js_same_value
cmp eax, 0
jz short loc_59EF8
mov rdi, [rsp+108h+var_38]
lea rsi, aPromiseSelfRes; "promise self resolution"
mov al, 0
call JS_ThrowTypeError
mov [rsp+108h+var_D0], rax
mov [rsp+108h+var_C8], rdx
jmp short loc_59F50
loc_59EF8:
jmp short $+2
loc_59EFA:
mov rdi, [rsp+108h+var_38]
mov rsi, [rsp+108h+var_60]
mov rdx, [rsp+108h+var_58]
mov ecx, 80h
call JS_GetProperty
mov [rsp+108h+var_E0], rax
mov [rsp+108h+var_D8], rdx
mov rax, [rsp+108h+var_E0]
mov [rsp+108h+var_A8], rax
mov rax, [rsp+108h+var_D8]
mov [rsp+108h+var_A0], rax
mov rdi, [rsp+108h+var_A8]
mov rsi, [rsp+108h+var_A0]
call JS_IsException_1
cmp eax, 0
jz short loc_59FBD
jmp short $+2
loc_59F50:
mov rdi, [rsp+108h+var_38]
call JS_GetException
mov [rsp+108h+var_100], rax
mov [rsp+108h+var_F8], rdx
mov rax, [rsp+108h+var_100]
mov [rsp+108h+var_F0], rax
mov rax, [rsp+108h+var_F8]
mov [rsp+108h+var_E8], rax
mov rdi, [rsp+108h+var_38]
mov rax, [rsp+108h+var_50]
mov rsi, [rax]
mov rdx, [rax+8]
mov rcx, [rsp+108h+var_F0]
mov r8, [rsp+108h+var_E8]
call reject_promise
mov rdi, [rsp+108h+var_38]
mov rsi, [rsp+108h+var_F0]
mov rdx, [rsp+108h+var_E8]
call JS_FreeValue
jmp loc_5A0B0
loc_59FBD:
mov rdi, [rsp+108h+var_38]
mov rsi, [rsp+108h+var_A8]
mov rdx, [rsp+108h+var_A0]
call JS_IsFunction
cmp eax, 0
jnz short loc_5A026
mov rdi, [rsp+108h+var_38]
mov rsi, [rsp+108h+var_A8]
mov rdx, [rsp+108h+var_A0]
call JS_FreeValue
loc_59FF0:
mov rdi, [rsp+108h+var_38]
mov rax, [rsp+108h+var_50]
mov r9d, [rsp+108h+var_AC]
mov rsi, [rax]
mov rdx, [rax+8]
mov rcx, [rsp+108h+var_60]
mov r8, [rsp+108h+var_58]
call fulfill_or_reject_promise
jmp loc_5A0AE
loc_5A026:
mov rax, [rsp+108h+var_50]
mov rcx, [rax]
mov [rsp+108h+var_98], rcx
mov rax, [rax+8]
mov [rsp+108h+var_90], rax
mov rax, [rsp+108h+var_60]
mov [rsp+108h+var_88], rax
mov rax, [rsp+108h+var_58]
mov [rsp+108h+var_80], rax
mov rax, [rsp+108h+var_A8]
mov [rsp+108h+var_78], rax
mov rax, [rsp+108h+var_A0]
mov [rsp+108h+var_70], rax
mov rdi, [rsp+108h+var_38]
lea rcx, [rsp+108h+var_98]
lea rsi, js_promise_resolve_thenable_job
mov edx, 3
call JS_EnqueueJob
mov rdi, [rsp+108h+var_38]
mov rsi, [rsp+108h+var_A8]
mov rdx, [rsp+108h+var_A0]
call JS_FreeValue
loc_5A0AE:
jmp short $+2
loc_5A0B0:
mov dword ptr [rsp+108h+var_10], 0
mov [rsp+108h+var_8], 3
loc_5A0C7:
mov rax, [rsp+108h+var_10]
mov rdx, [rsp+108h+var_8]
add rsp, 108h
retn
|
long long js_promise_resolve_function_call(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14,
long long a15)
{
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // rdx
long long v22; // rdx
char v24; // [rsp+0h] [rbp-108h]
long long Exception; // [rsp+8h] [rbp-100h]
long long v26; // [rsp+20h] [rbp-E8h]
long long Property; // [rsp+28h] [rbp-E0h]
_DWORD *v28; // [rsp+48h] [rbp-C0h]
unsigned int v29; // [rsp+5Ch] [rbp-ACh]
long long v30; // [rsp+68h] [rbp-A0h]
_QWORD v31[7]; // [rsp+70h] [rbp-98h] BYREF
_DWORD *v32; // [rsp+A8h] [rbp-60h]
long long v33; // [rsp+B0h] [rbp-58h]
_QWORD *v34; // [rsp+B8h] [rbp-50h]
long long v35; // [rsp+C0h] [rbp-48h]
int v36; // [rsp+CCh] [rbp-3Ch]
long long v37; // [rsp+D0h] [rbp-38h]
long long v38; // [rsp+D8h] [rbp-30h]
long long v39; // [rsp+E0h] [rbp-28h]
long long v40; // [rsp+E8h] [rbp-20h]
long long v41; // [rsp+F0h] [rbp-18h]
long long v42; // [rsp+F8h] [rbp-10h]
long long v43; // [rsp+100h] [rbp-8h]
v40 = a2;
v41 = a3;
v38 = a4;
v39 = a5;
v37 = a1;
v36 = a6;
v35 = a2;
v34 = *(_QWORD **)(a2 + 48);
if ( v34 && !*(_DWORD *)(v34[2] + 4LL) )
{
*(_DWORD *)(v34[2] + 4LL) = 1;
v29 = *(unsigned __int16 *)(v35 + 6) - 50;
if ( v36 <= 0 )
{
LODWORD(v28) = 0;
v32 = v28;
v33 = 3LL;
}
else
{
v32 = *(_DWORD **)a15;
v33 = *(_QWORD *)(a15 + 8);
}
if ( v29 || !JS_IsObject((long long)v32, v33) )
{
LABEL_16:
fulfill_or_reject_promise(v37, *v34, v34[1], v32, v33, v29);
goto LABEL_18;
}
if ( (unsigned int)js_same_value(v37, v32, v33, (_DWORD *)*v34, v34[1]) )
{
JS_ThrowTypeError(
v37,
(long long)"promise self resolution",
v15,
v16,
v17,
v18,
a7,
a8,
a9,
a10,
v19,
v20,
a13,
a14,
v24);
}
else
{
Property = JS_GetProperty(v37, (int)v32, v33, 128);
v30 = v21;
if ( !JS_IsException_1(Property, v21) )
{
if ( (unsigned int)JS_IsFunction(v37, Property, v30) )
{
v31[0] = *v34;
v31[1] = v34[1];
v31[2] = v32;
v31[3] = v33;
v31[4] = Property;
v31[5] = v30;
JS_EnqueueJob(v37, (long long)js_promise_resolve_thenable_job, 3, (long long)v31);
JS_FreeValue(v37, Property, v30);
goto LABEL_18;
}
JS_FreeValue(v37, Property, v30);
goto LABEL_16;
}
}
Exception = JS_GetException(v37);
v26 = v22;
reject_promise(v37, *v34, v34[1], Exception, v22);
JS_FreeValue(v37, Exception, v26);
LABEL_18:
LODWORD(v42) = 0;
v43 = 3LL;
return v42;
}
LODWORD(v42) = 0;
v43 = 3LL;
return v42;
}
|
js_promise_resolve_function_call:
SUB RSP,0x108
MOV EAX,dword ptr [RSP + 0x118]
MOV RAX,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0xe8],RSI
MOV qword ptr [RSP + 0xf0],RDX
MOV qword ptr [RSP + 0xd8],RCX
MOV qword ptr [RSP + 0xe0],R8
MOV qword ptr [RSP + 0xd0],RDI
MOV dword ptr [RSP + 0xcc],R9D
MOV RAX,qword ptr [RSP + 0xe8]
MOV qword ptr [RSP + 0xc0],RAX
MOV RAX,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0xb8],RAX
CMP qword ptr [RSP + 0xb8],0x0
JZ 0x00159de7
MOV RAX,qword ptr [RSP + 0xb8]
MOV RAX,qword ptr [RAX + 0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x00159e03
LAB_00159de7:
MOV dword ptr [RSP + 0xf8],0x0
MOV qword ptr [RSP + 0x100],0x3
JMP 0x0015a0c7
LAB_00159e03:
MOV RAX,qword ptr [RSP + 0xb8]
MOV RAX,qword ptr [RAX + 0x10]
MOV dword ptr [RAX + 0x4],0x1
MOV RAX,qword ptr [RSP + 0xc0]
MOVZX EAX,word ptr [RAX + 0x6]
SUB EAX,0x32
MOV dword ptr [RSP + 0x5c],EAX
CMP dword ptr [RSP + 0xcc],0x0
JLE 0x00159e54
MOV RAX,qword ptr [RSP + 0x110]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0xa8],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x00159e7f
LAB_00159e54:
MOV dword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],0x3
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0xb0],RAX
LAB_00159e7f:
CMP dword ptr [RSP + 0x5c],0x0
JNZ 0x00159ea0
MOV RDI,qword ptr [RSP + 0xa8]
MOV RSI,qword ptr [RSP + 0xb0]
CALL 0x00131260
CMP EAX,0x0
JNZ 0x00159ea5
LAB_00159ea0:
JMP 0x00159ff0
LAB_00159ea5:
MOV RDI,qword ptr [RSP + 0xd0]
MOV RAX,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RSP + 0xb0]
MOV RCX,qword ptr [RAX]
MOV R8,qword ptr [RAX + 0x8]
CALL 0x0013be00
CMP EAX,0x0
JZ 0x00159ef8
MOV RDI,qword ptr [RSP + 0xd0]
LEA RSI,[0x215550]
MOV AL,0x0
CALL 0x001335f0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
JMP 0x00159f50
LAB_00159ef8:
JMP 0x00159efa
LAB_00159efa:
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RSP + 0xb0]
MOV ECX,0x80
CALL 0x00130070
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x68],RAX
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x68]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x00159fbd
JMP 0x00159f50
LAB_00159f50:
MOV RDI,qword ptr [RSP + 0xd0]
CALL 0x00133260
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0xd0]
MOV RAX,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RSP + 0x18]
MOV R8,qword ptr [RSP + 0x20]
CALL 0x001980e0
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x00129f80
JMP 0x0015a0b0
LAB_00159fbd:
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
CALL 0x00134800
CMP EAX,0x0
JNZ 0x0015a026
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
CALL 0x00129f80
LAB_00159ff0:
MOV RDI,qword ptr [RSP + 0xd0]
MOV RAX,qword ptr [RSP + 0xb8]
MOV R9D,dword ptr [RSP + 0x5c]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RSP + 0xa8]
MOV R8,qword ptr [RSP + 0xb0]
CALL 0x00198130
JMP 0x0015a0ae
LAB_0015a026:
MOV RAX,qword ptr [RSP + 0xb8]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0x70],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0xd0]
LEA RCX,[RSP + 0x70]
LEA RSI,[0x1984f0]
MOV EDX,0x3
CALL 0x00129c20
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
CALL 0x00129f80
LAB_0015a0ae:
JMP 0x0015a0b0
LAB_0015a0b0:
MOV dword ptr [RSP + 0xf8],0x0
MOV qword ptr [RSP + 0x100],0x3
LAB_0015a0c7:
MOV RAX,qword ptr [RSP + 0xf8]
MOV RDX,qword ptr [RSP + 0x100]
ADD RSP,0x108
RET
|
int1 [16]
js_promise_resolve_function_call
(int8 param_1,long param_2,int8 param_3,int8 param_4,int8 param_5,
int param_6,long *param_7)
{
int iVar1;
int iVar2;
int8 uVar3;
int8 uVar4;
int1 auVar5 [16];
uint uStack_bc;
int8 local_98;
int8 local_90;
long local_88;
long local_80;
int1 local_78 [16];
long local_60;
long local_58;
int8 *local_50;
long local_48;
int local_3c;
int8 local_38;
int8 local_30;
int8 local_28;
long local_20;
int8 local_18;
uint uStack_c;
local_50 = *(int8 **)(param_2 + 0x30);
if ((local_50 == (int8 *)0x0) || (*(int *)(local_50[2] + 4) != 0)) goto LAB_0015a0c7;
*(int4 *)(local_50[2] + 4) = 1;
iVar1 = *(ushort *)(param_2 + 6) - 0x32;
if (param_6 < 1) {
local_60 = (ulong)uStack_bc << 0x20;
local_58 = 3;
}
else {
local_60 = *param_7;
local_58 = param_7[1];
}
local_48 = param_2;
local_3c = param_6;
local_38 = param_1;
local_30 = param_4;
local_28 = param_5;
local_20 = param_2;
local_18 = param_3;
if ((iVar1 == 0) && (iVar2 = JS_IsObject(local_60,local_58), iVar2 != 0)) {
iVar2 = js_same_value(local_38,local_60,local_58,*local_50,local_50[1]);
if (iVar2 == 0) {
auVar5 = JS_GetProperty(local_38,local_60,local_58,0x80);
uVar4 = auVar5._8_8_;
uVar3 = auVar5._0_8_;
iVar2 = JS_IsException(uVar3,uVar4);
if (iVar2 == 0) {
iVar2 = JS_IsFunction(local_38,uVar3,uVar4);
if (iVar2 != 0) {
local_98 = *local_50;
local_90 = local_50[1];
local_88 = local_60;
local_80 = local_58;
local_78 = auVar5;
JS_EnqueueJob(local_38,js_promise_resolve_thenable_job,3,&local_98);
JS_FreeValue(local_38,uVar3,uVar4);
goto LAB_0015a0c7;
}
JS_FreeValue(local_38,uVar3,uVar4);
goto LAB_00159ff0;
}
}
else {
JS_ThrowTypeError(local_38,"promise self resolution");
}
auVar5 = JS_GetException(local_38);
reject_promise(local_38,*local_50,local_50[1],auVar5._0_8_,auVar5._8_8_);
JS_FreeValue(local_38,auVar5._0_8_,auVar5._8_8_);
}
else {
LAB_00159ff0:
fulfill_or_reject_promise(local_38,*local_50,local_50[1],local_60,local_58,iVar1);
}
LAB_0015a0c7:
auVar5._8_8_ = 3;
auVar5._0_8_ = (ulong)uStack_c << 0x20;
return auVar5;
}
|
|
57,906
|
js_promise_resolve_function_call
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_promise_resolve_function_call(JSContext *ctx,
JSValue func_obj,
JSValue this_val,
int argc, JSValue *argv,
int flags)
{
JSObject *p = JS_VALUE_GET_OBJ(func_obj);
JSPromiseFunctionData *s;
JSValue resolution, args[3];
JSValue then;
BOOL is_reject;
s = p->u.promise_function_data;
if (!s || s->presolved->already_resolved)
return JS_UNDEFINED;
s->presolved->already_resolved = TRUE;
is_reject = p->class_id - JS_CLASS_PROMISE_RESOLVE_FUNCTION;
if (argc > 0)
resolution = argv[0];
else
resolution = JS_UNDEFINED;
#ifdef DUMP_PROMISE
if (check_dump_flag(ctx->rt, DUMP_PROMISE)) {
printf("js_promise_resolving_function_call: is_reject=%d resolution=", is_reject);
JS_DumpValue(ctx->rt, resolution);
printf("\n");
}
#endif
if (is_reject || !JS_IsObject(resolution)) {
goto done;
} else if (js_same_value(ctx, resolution, s->promise)) {
JS_ThrowTypeError(ctx, "promise self resolution");
goto fail_reject;
}
then = JS_GetProperty(ctx, resolution, JS_ATOM_then);
if (JS_IsException(then)) {
JSValue error;
fail_reject:
error = JS_GetException(ctx);
reject_promise(ctx, s->promise, error);
JS_FreeValue(ctx, error);
} else if (!JS_IsFunction(ctx, then)) {
JS_FreeValue(ctx, then);
done:
fulfill_or_reject_promise(ctx, s->promise, resolution, is_reject);
} else {
args[0] = s->promise;
args[1] = resolution;
args[2] = then;
JS_EnqueueJob(ctx, js_promise_resolve_thenable_job, 3, args);
JS_FreeValue(ctx, then);
}
return JS_UNDEFINED;
}
|
O2
|
c
|
js_promise_resolve_function_call:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x30(%rsi), %r13
testq %r13, %r13
je 0x33838
movq 0x10(%r13), %rax
cmpl $0x0, 0x4(%rax)
jne 0x33838
movq %rdi, %rbx
movl $0x1, 0x4(%rax)
movzwl 0x6(%rsi), %ebp
addl $-0x32, %ebp
testl %r9d, %r9d
jle 0x3370e
movq 0x80(%rsp), %rax
movq (%rax), %r15
movq 0x8(%rax), %r14
jmp 0x33715
pushq $0x3
popq %r14
xorl %r15d, %r15d
movl %r14d, %eax
notl %eax
orl %ebp, %eax
jne 0x3381f
movq (%r13), %rcx
movq 0x8(%r13), %r8
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x23ae2
testl %eax, %eax
je 0x3374f
leaq 0x56d5b(%rip), %rsi # 0x8a49e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x201fd
jmp 0x3376b
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0x80, %ecx
callq 0x1ebf3
movq %rdx, %r12
cmpl $0x6, %r12d
jne 0x337b9
movq 0x18(%rbx), %rax
movq 0xf0(%rax), %r14
movq 0xf8(%rax), %r15
andl $0x0, 0xf0(%rax)
movq $0x4, 0xf8(%rax)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r14, %rcx
movq %r15, %r8
callq 0x4ac22
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1bbce
jmp 0x33838
movq %rbx, %rdi
movq %rax, 0x8(%rsp)
movq %rax, %rsi
movq %r12, %rdx
callq 0x20a2d
testl %eax, %eax
je 0x3380f
movups (%r13), %xmm0
leaq 0x10(%rsp), %rcx
movaps %xmm0, (%rcx)
movq %r15, 0x10(%rcx)
movq %r14, 0x18(%rcx)
movq 0x8(%rsp), %r14
movq %r14, 0x20(%rcx)
movq %r12, 0x28(%rcx)
leaq 0x175ed(%rip), %rsi # 0x4ade6
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x1ba59
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
jmp 0x337b2
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rdx
callq 0x1bbce
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbx, %rdi
movq %r15, %rcx
movq %r14, %r8
movl %ebp, %r9d
callq 0x4ac22
pushq $0x3
popq %rdx
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_promise_resolve_function_call:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r13, [rsi+30h]
test r13, r13
jz loc_33838
mov rax, [r13+10h]
cmp dword ptr [rax+4], 0
jnz loc_33838
mov rbx, rdi
mov dword ptr [rax+4], 1
movzx ebp, word ptr [rsi+6]
add ebp, 0FFFFFFCEh
test r9d, r9d
jle short loc_3370E
mov rax, [rsp+78h+arg_0]
mov r15, [rax]
mov r14, [rax+8]
jmp short loc_33715
loc_3370E:
push 3
pop r14
xor r15d, r15d
loc_33715:
mov eax, r14d
not eax
or eax, ebp
jnz loc_3381F
mov rcx, [r13+0]
mov r8, [r13+8]
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call js_same_value
test eax, eax
jz short loc_3374F
lea rsi, aPromiseSelfRes; "promise self resolution"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
jmp short loc_3376B
loc_3374F:
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov ecx, 80h
call JS_GetProperty
mov r12, rdx
cmp r12d, 6
jnz short loc_337B9
loc_3376B:
mov rax, [rbx+18h]
mov r14, [rax+0F0h]
mov r15, [rax+0F8h]
and dword ptr [rax+0F0h], 0
mov qword ptr [rax+0F8h], 4
mov rsi, [r13+0]
mov rdx, [r13+8]
push 1
pop r9
mov rdi, rbx
mov rcx, r14
mov r8, r15
call fulfill_or_reject_promise
mov rdi, rbx
mov rsi, r14
mov rdx, r15
loc_337B2:
call JS_FreeValue
jmp short loc_33838
loc_337B9:
mov rdi, rbx
mov [rsp+78h+var_70], rax
mov rsi, rax
mov rdx, r12
call JS_IsFunction
test eax, eax
jz short loc_3380F
movups xmm0, xmmword ptr [r13+0]
lea rcx, [rsp+78h+var_68]
movaps xmmword ptr [rcx], xmm0
mov [rcx+10h], r15
mov [rcx+18h], r14
mov r14, [rsp+78h+var_70]
mov [rcx+20h], r14
mov [rcx+28h], r12
lea rsi, js_promise_resolve_thenable_job
push 3
pop rdx
mov rdi, rbx
call JS_EnqueueJob
mov rdi, rbx
mov rsi, r14
mov rdx, r12
jmp short loc_337B2
loc_3380F:
mov rdi, rbx
mov rsi, [rsp+78h+var_70]
mov rdx, r12
call JS_FreeValue
loc_3381F:
mov rsi, [r13+0]
mov rdx, [r13+8]
mov rdi, rbx
mov rcx, r15
mov r8, r14
mov r9d, ebp
call fulfill_or_reject_promise
loc_33838:
push 3
pop rdx
xor eax, eax
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long js_promise_resolve_function_call(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long a13,
int a14,
long long a15)
{
_QWORD *v15; // r13
long long v16; // rax
unsigned int v17; // ebp
_DWORD *v18; // r15
long long v19; // r14
long long v20; // rdx
long long v21; // rcx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
long long Property; // rax
long long v27; // rdx
long long v28; // r12
long long v29; // rax
long long v30; // r14
long long v31; // r15
long long v32; // rsi
long long v33; // rdx
char v35; // [rsp+0h] [rbp-78h]
long long v36; // [rsp+8h] [rbp-70h]
__int128 v37; // [rsp+10h] [rbp-68h] BYREF
_DWORD *v38; // [rsp+20h] [rbp-58h]
long long v39; // [rsp+28h] [rbp-50h]
long long v40; // [rsp+30h] [rbp-48h]
long long v41; // [rsp+38h] [rbp-40h]
v15 = *(_QWORD **)(a2 + 48);
if ( v15 )
{
v16 = v15[2];
if ( !*(_DWORD *)(v16 + 4) )
{
*(_DWORD *)(v16 + 4) = 1;
v17 = *(unsigned __int16 *)(a2 + 6) - 50;
if ( a14 <= 0 )
{
v19 = 3LL;
v18 = 0LL;
}
else
{
v18 = *(_DWORD **)a15;
v19 = *(_QWORD *)(a15 + 8);
}
if ( !(v17 | ~(_DWORD)v19) )
{
if ( (unsigned int)js_same_value(a1, v18, v19, (_DWORD *)*v15, v15[1]) )
{
JS_ThrowTypeError(
a1,
(long long)"promise self resolution",
v20,
v21,
v22,
v23,
a3,
a4,
a5,
a6,
v24,
v25,
a9,
a10,
v35);
LABEL_10:
v29 = *(_QWORD *)(a1 + 24);
v30 = *(_QWORD *)(v29 + 240);
v31 = *(_QWORD *)(v29 + 248);
*(_DWORD *)(v29 + 240) = 0;
*(_QWORD *)(v29 + 248) = 4LL;
fulfill_or_reject_promise(a1, *v15, v15[1], v30, v31, 1LL);
v32 = v30;
v33 = v31;
LABEL_11:
JS_FreeValue(a1, v32, v33);
return 0LL;
}
Property = JS_GetProperty(a1, (int)v18, v19, 128);
v28 = v27;
if ( (_DWORD)v27 == 6 )
goto LABEL_10;
v36 = Property;
if ( (unsigned int)JS_IsFunction(a1, Property, v27) )
{
v37 = *(_OWORD *)v15;
v38 = v18;
v39 = v19;
v40 = v36;
v41 = v28;
JS_EnqueueJob(a1, (long long)js_promise_resolve_thenable_job, 3u, (long long)&v37);
v32 = v36;
v33 = v28;
goto LABEL_11;
}
JS_FreeValue(a1, v36, v28);
}
fulfill_or_reject_promise(a1, *v15, v15[1], v18, v19, v17);
}
}
return 0LL;
}
|
js_promise_resolve_function_call:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R13,qword ptr [RSI + 0x30]
TEST R13,R13
JZ 0x00133838
MOV RAX,qword ptr [R13 + 0x10]
CMP dword ptr [RAX + 0x4],0x0
JNZ 0x00133838
MOV RBX,RDI
MOV dword ptr [RAX + 0x4],0x1
MOVZX EBP,word ptr [RSI + 0x6]
ADD EBP,-0x32
TEST R9D,R9D
JLE 0x0013370e
MOV RAX,qword ptr [RSP + 0x80]
MOV R15,qword ptr [RAX]
MOV R14,qword ptr [RAX + 0x8]
JMP 0x00133715
LAB_0013370e:
PUSH 0x3
POP R14
XOR R15D,R15D
LAB_00133715:
MOV EAX,R14D
NOT EAX
OR EAX,EBP
JNZ 0x0013381f
MOV RCX,qword ptr [R13]
MOV R8,qword ptr [R13 + 0x8]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x00123ae2
TEST EAX,EAX
JZ 0x0013374f
LEA RSI,[0x18a49e]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x001201fd
JMP 0x0013376b
LAB_0013374f:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV ECX,0x80
CALL 0x0011ebf3
MOV R12,RDX
CMP R12D,0x6
JNZ 0x001337b9
LAB_0013376b:
MOV RAX,qword ptr [RBX + 0x18]
MOV R14,qword ptr [RAX + 0xf0]
MOV R15,qword ptr [RAX + 0xf8]
AND dword ptr [RAX + 0xf0],0x0
MOV qword ptr [RAX + 0xf8],0x4
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
PUSH 0x1
POP R9
MOV RDI,RBX
MOV RCX,R14
MOV R8,R15
CALL 0x0014ac22
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
LAB_001337b2:
CALL 0x0011bbce
JMP 0x00133838
LAB_001337b9:
MOV RDI,RBX
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,RAX
MOV RDX,R12
CALL 0x00120a2d
TEST EAX,EAX
JZ 0x0013380f
MOVUPS XMM0,xmmword ptr [R13]
LEA RCX,[RSP + 0x10]
MOVAPS xmmword ptr [RCX],XMM0
MOV qword ptr [RCX + 0x10],R15
MOV qword ptr [RCX + 0x18],R14
MOV R14,qword ptr [RSP + 0x8]
MOV qword ptr [RCX + 0x20],R14
MOV qword ptr [RCX + 0x28],R12
LEA RSI,[0x14ade6]
PUSH 0x3
POP RDX
MOV RDI,RBX
CALL 0x0011ba59
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R12
JMP 0x001337b2
LAB_0013380f:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R12
CALL 0x0011bbce
LAB_0013381f:
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV RDI,RBX
MOV RCX,R15
MOV R8,R14
MOV R9D,EBP
CALL 0x0014ac22
LAB_00133838:
PUSH 0x3
POP RDX
XOR EAX,EAX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_promise_resolve_function_call(long param_1,long param_2)
{
int8 *puVar1;
long lVar2;
int iVar3;
int iVar4;
int in_R9D;
int8 uVar5;
int8 uVar6;
int1 auVar7 [16];
int8 *in_stack_00000008;
puVar1 = *(int8 **)(param_2 + 0x30);
if ((puVar1 == (int8 *)0x0) || (*(int *)(puVar1[2] + 4) != 0)) goto LAB_00133838;
*(int4 *)(puVar1[2] + 4) = 1;
iVar4 = *(ushort *)(param_2 + 6) - 0x32;
if (in_R9D < 1) {
uVar5 = 3;
uVar6 = 0;
}
else {
uVar6 = *in_stack_00000008;
uVar5 = in_stack_00000008[1];
}
if ((int)uVar5 != -1 || iVar4 != 0) {
LAB_0013381f:
fulfill_or_reject_promise(param_1,*puVar1,puVar1[1],uVar6,uVar5,iVar4);
goto LAB_00133838;
}
iVar3 = js_same_value(param_1,uVar6,uVar5,*puVar1,puVar1[1]);
if (iVar3 == 0) {
auVar7 = JS_GetProperty(param_1,uVar6,uVar5,0x80);
if (auVar7._8_4_ == 6) goto LAB_0013376b;
iVar3 = JS_IsFunction(param_1,auVar7._0_8_,auVar7._8_8_);
if (iVar3 == 0) {
JS_FreeValue(param_1,auVar7._0_8_,auVar7._8_8_);
goto LAB_0013381f;
}
JS_EnqueueJob(param_1,js_promise_resolve_thenable_job,3);
}
else {
JS_ThrowTypeError(param_1,"promise self resolution");
LAB_0013376b:
lVar2 = *(long *)(param_1 + 0x18);
uVar6 = *(int8 *)*(int1 (*) [16])(lVar2 + 0xf0);
uVar5 = *(int8 *)(lVar2 + 0xf8);
auVar7 = *(int1 (*) [16])(lVar2 + 0xf0);
*(int4 *)(lVar2 + 0xf0) = 0;
*(int8 *)(lVar2 + 0xf8) = 4;
fulfill_or_reject_promise(param_1,*puVar1,puVar1[1],uVar6,uVar5,1);
}
JS_FreeValue(param_1,auVar7._0_8_,auVar7._8_8_);
LAB_00133838:
return ZEXT816(3) << 0x40;
}
|
|
57,907
|
js_os_open
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_os_open(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *filename;
int flags, mode, ret;
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
if (JS_ToInt32(ctx, &flags, argv[1]))
goto fail;
if (argc >= 3 && !JS_IsUndefined(argv[2])) {
if (JS_ToInt32(ctx, &mode, argv[2])) {
fail:
JS_FreeCString(ctx, filename);
return JS_EXCEPTION;
}
} else {
mode = 0666;
}
#if defined(_WIN32)
/* force binary mode by default */
if (!(flags & O_TEXT))
flags |= O_BINARY;
#endif
ret = js_get_errno(open(filename, flags, mode));
JS_FreeCString(ctx, filename);
return JS_NewInt32(ctx, ret);
}
|
O0
|
c
|
js_os_open:
subq $0x78, %rsp
movq %rsi, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq %rdi, 0x30(%rsp)
movl %ecx, 0x2c(%rsp)
movq %r8, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x147e0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x17b45
movl $0x0, 0x48(%rsp)
movq $0x6, 0x50(%rsp)
jmp 0x17c3b
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
leaq 0x14(%rsp), %rsi
callq 0x38f20
cmpl $0x0, %eax
je 0x17b68
jmp 0x17ba9
cmpl $0x3, 0x2c(%rsp)
jl 0x17bcd
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x28(%rax), %rsi
callq 0x11930
cmpl $0x0, %eax
jne 0x17bcd
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rdx
movq 0x28(%rax), %rcx
leaq 0x10(%rsp), %rsi
callq 0x38f20
cmpl $0x0, %eax
je 0x17bcb
jmp 0x17ba9
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x29e50
movl $0x0, 0x48(%rsp)
movq $0x6, 0x50(%rsp)
jmp 0x17c3b
jmp 0x17bd5
movl $0x1b6, 0x10(%rsp) # imm = 0x1B6
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
xorl %eax, %eax
callq 0xe790
movslq %eax, %rdi
callq 0x13a50
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x29e50
movq 0x30(%rsp), %rcx
movl 0xc(%rsp), %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
movl %eax, 0x68(%rsp)
movq $0x0, 0x70(%rsp)
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rdx
addq $0x78, %rsp
retq
nopw (%rax,%rax)
|
js_os_open:
sub rsp, 78h
mov [rsp+78h+var_40], rsi
mov [rsp+78h+var_38], rdx
mov [rsp+78h+var_48], rdi
mov [rsp+78h+var_4C], ecx
mov [rsp+78h+var_58], r8
mov rdi, [rsp+78h+var_48]
mov rax, [rsp+78h+var_58]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+78h+var_60], rax
cmp [rsp+78h+var_60], 0
jnz short loc_17B45
mov dword ptr [rsp+78h+var_30], 0
mov [rsp+78h+var_28], 6
jmp loc_17C3B
loc_17B45:
mov rdi, [rsp+78h+var_48]
mov rax, [rsp+78h+var_58]
mov rdx, [rax+10h]
mov rcx, [rax+18h]
lea rsi, [rsp+78h+var_64]
call JS_ToInt32
cmp eax, 0
jz short loc_17B68
jmp short loc_17BA9
loc_17B68:
cmp [rsp+78h+var_4C], 3
jl short loc_17BCD
mov rax, [rsp+78h+var_58]
mov rdi, [rax+20h]
mov rsi, [rax+28h]
call JS_IsUndefined
cmp eax, 0
jnz short loc_17BCD
mov rdi, [rsp+78h+var_48]
mov rax, [rsp+78h+var_58]
mov rdx, [rax+20h]
mov rcx, [rax+28h]
lea rsi, [rsp+78h+var_68]
call JS_ToInt32
cmp eax, 0
jz short loc_17BCB
jmp short $+2
loc_17BA9:
mov rdi, [rsp+78h+var_48]
mov rsi, [rsp+78h+var_60]
call JS_FreeCString
mov dword ptr [rsp+78h+var_30], 0
mov [rsp+78h+var_28], 6
jmp short loc_17C3B
loc_17BCB:
jmp short loc_17BD5
loc_17BCD:
mov [rsp+78h+var_68], 1B6h
loc_17BD5:
mov rdi, [rsp+78h+var_60]
mov esi, [rsp+78h+var_64]
mov edx, [rsp+78h+var_68]
xor eax, eax
call _open
movsxd rdi, eax
call js_get_errno
mov [rsp+78h+var_6C], eax
mov rdi, [rsp+78h+var_48]
mov rsi, [rsp+78h+var_60]
call JS_FreeCString
mov rcx, [rsp+78h+var_48]
mov eax, [rsp+78h+var_6C]
mov [rsp+78h+var_18], rcx
mov [rsp+78h+var_1C], eax
mov eax, [rsp+78h+var_1C]
mov dword ptr [rsp+78h+var_10], eax
mov [rsp+78h+var_8], 0
mov rcx, [rsp+78h+var_10]
mov rax, [rsp+78h+var_8]
mov [rsp+78h+var_30], rcx
mov [rsp+78h+var_28], rax
loc_17C3B:
mov rax, [rsp+78h+var_30]
mov rdx, [rsp+78h+var_28]
add rsp, 78h
retn
|
long long js_os_open(long long a1, long long a2, long long a3, int a4, long long *a5)
{
int v5; // eax
int errno; // [rsp+Ch] [rbp-6Ch]
unsigned int v8; // [rsp+10h] [rbp-68h] BYREF
unsigned int v9; // [rsp+14h] [rbp-64h] BYREF
long long v10; // [rsp+18h] [rbp-60h]
long long *v11; // [rsp+20h] [rbp-58h]
int v12; // [rsp+2Ch] [rbp-4Ch]
long long v13; // [rsp+30h] [rbp-48h]
long long v14; // [rsp+38h] [rbp-40h]
long long v15; // [rsp+40h] [rbp-38h]
long long v16; // [rsp+48h] [rbp-30h]
long long v17; // [rsp+50h] [rbp-28h]
int v18; // [rsp+5Ch] [rbp-1Ch]
long long v19; // [rsp+60h] [rbp-18h]
long long v20; // [rsp+68h] [rbp-10h]
long long v21; // [rsp+70h] [rbp-8h]
v14 = a2;
v15 = a3;
v13 = a1;
v12 = a4;
v11 = a5;
v10 = JS_ToCString(a1, *a5, a5[1]);
if ( v10 )
{
if ( !(unsigned int)JS_ToInt32(v13, &v9, v11[2], v11[3]) )
{
if ( v12 < 3 || JS_IsUndefined(v11[4], v11[5]) )
{
v8 = 438;
}
else if ( (unsigned int)JS_ToInt32(v13, &v8, v11[4], v11[5]) )
{
goto LABEL_7;
}
v5 = open(v10, v9, v8);
errno = js_get_errno(v5);
JS_FreeCString(v13, v10);
v19 = v13;
v18 = errno;
LODWORD(v20) = errno;
v21 = 0LL;
v16 = v20;
v17 = 0LL;
return v16;
}
LABEL_7:
JS_FreeCString(v13, v10);
LODWORD(v16) = 0;
v17 = 6LL;
return v16;
}
LODWORD(v16) = 0;
v17 = 6LL;
return v16;
}
|
js_std_file_putByte:
SUB RSP,0x68
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV qword ptr [RSP + 0x10],R8
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x00117c00
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x00117b40
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x00117bbc
LAB_00117b40:
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x4]
CALL 0x0013d0a0
CMP EAX,0x0
JZ 0x00117b73
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x00117bbc
LAB_00117b73:
MOV EDI,dword ptr [RSP + 0x4]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00111420
MOV dword ptr [RSP + 0x4],EAX
MOV RCX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x4]
MOV qword ptr [RSP + 0x50],RCX
MOV dword ptr [RSP + 0x4c],EAX
MOV EAX,dword ptr [RSP + 0x4c]
MOV dword ptr [RSP + 0x58],EAX
MOV qword ptr [RSP + 0x60],0x0
MOV RCX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x40],RAX
LAB_00117bbc:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x68
RET
|
int1 [16]
js_std_file_putByte(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
int local_64;
FILE *local_60;
int8 *local_58;
int4 local_4c;
int8 local_48;
int8 local_40;
int8 local_38;
int local_30;
int4 uStack_2c;
int8 local_28;
int4 uStack_c;
local_58 = param_5;
local_4c = param_4;
local_48 = param_1;
local_40 = param_2;
local_38 = param_3;
local_60 = (FILE *)js_std_file_get(param_1,param_2,param_3);
if (local_60 == (FILE *)0x0) {
local_30 = 0;
local_28 = 6;
}
else {
iVar2 = JS_ToInt32(local_48,&local_64,*local_58,local_58[1]);
if (iVar2 == 0) {
local_30 = fputc(local_64,local_60);
uStack_2c = uStack_c;
local_28 = 0;
}
else {
local_30 = 0;
local_28 = 6;
}
}
auVar1._4_4_ = uStack_2c;
auVar1._0_4_ = local_30;
auVar1._8_8_ = local_28;
return auVar1;
}
|
|
57,908
|
js_os_open
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_os_open(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *filename;
int flags, mode, ret;
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
if (JS_ToInt32(ctx, &flags, argv[1]))
goto fail;
if (argc >= 3 && !JS_IsUndefined(argv[2])) {
if (JS_ToInt32(ctx, &mode, argv[2])) {
fail:
JS_FreeCString(ctx, filename);
return JS_EXCEPTION;
}
} else {
mode = 0666;
}
#if defined(_WIN32)
/* force binary mode by default */
if (!(flags & O_TEXT))
flags |= O_BINARY;
#endif
ret = js_get_errno(open(filename, flags, mode));
JS_FreeCString(ctx, filename);
return JS_NewInt32(ctx, ret);
}
|
O1
|
c
|
js_os_open:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movl %ecx, %ebp
movq %rdi, %rbx
movq (%r8), %rdx
movq 0x8(%r8), %rcx
xorl %r13d, %r13d
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x20bf7
movl $0x6, %r15d
testq %rax, %rax
je 0x1885b
movq %rax, %r14
movq 0x10(%r12), %rdx
movq 0x18(%r12), %rcx
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x279b0
testl %eax, %eax
je 0x1880e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20edd
xorl %r13d, %r13d
jmp 0x1885b
cmpl $0x3, %ebp
jl 0x1881d
movq 0x28(%r12), %rcx
cmpl $0x3, %ecx
jne 0x18870
movl $0x1b6, (%rsp) # imm = 0x1B6
movl 0x4(%rsp), %esi
movl (%rsp), %edx
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0xe7a0
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x1884a
callq 0xe0b0
subl (%rax), %r15d
movl %r15d, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20edd
movl %ebp, %r13d
xorl %r15d, %r15d
movq %r13, %rax
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%r12), %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x279b0
testl %eax, %eax
jne 0x187fe
jmp 0x18824
|
js_os_open:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, r8
mov ebp, ecx
mov rbx, rdi
mov rdx, [r8]
mov rcx, [r8+8]
xor r13d, r13d
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
mov r15d, 6
test rax, rax
jz short loc_1885B
mov r14, rax
mov rdx, [r12+10h]
mov rcx, [r12+18h]
lea rsi, [rsp+38h+var_34]
mov rdi, rbx
call JS_ToInt32
test eax, eax
jz short loc_1880E
loc_187FE:
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
xor r13d, r13d
jmp short loc_1885B
loc_1880E:
cmp ebp, 3
jl short loc_1881D
mov rcx, [r12+28h]
cmp ecx, 3
jnz short loc_18870
loc_1881D:
mov [rsp+38h+var_38], 1B6h
loc_18824:
mov esi, [rsp+38h+var_34]
mov edx, [rsp+38h+var_38]
xor r15d, r15d
mov rdi, r14
xor eax, eax
call _open
mov ebp, eax
cmp eax, 0FFFFFFFFh
jnz short loc_1884A
call ___errno_location
sub r15d, [rax]
mov ebp, r15d
loc_1884A:
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
mov r13d, ebp
xor r15d, r15d
loc_1885B:
mov rax, r13
mov rdx, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_18870:
mov rdx, [r12+20h]
mov rsi, rsp
mov rdi, rbx
call JS_ToInt32
test eax, eax
jnz loc_187FE
jmp short loc_18824
|
long long js_os_open(long long a1, long long a2, long long a3, int a4, _QWORD *a5)
{
long long v5; // rax
long long v8; // r13
long long v9; // rax
long long v10; // r14
long long v11; // rcx
unsigned int v12; // ebp
_QWORD v14[7]; // [rsp+0h] [rbp-38h] BYREF
v14[0] = v5;
v8 = 0LL;
v9 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL);
if ( v9 )
{
v10 = v9;
if ( (unsigned int)JS_ToInt32(a1, (char *)v14 + 4, a5[2], a5[3]) )
{
LABEL_3:
JS_FreeCString(a1, v10);
return 0LL;
}
if ( a4 < 3 || (v11 = a5[5], (_DWORD)v11 == 3) )
{
LODWORD(v14[0]) = 438;
}
else if ( (unsigned int)JS_ToInt32(a1, v14, a5[4], v11) )
{
goto LABEL_3;
}
v12 = open(v10, HIDWORD(v14[0]), LODWORD(v14[0]));
if ( v12 == -1 )
v12 = -*(_DWORD *)__errno_location(v10);
JS_FreeCString(a1, v10);
return v12;
}
return v8;
}
| |||
57,909
|
js_os_open
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_os_open(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *filename;
int flags, mode, ret;
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
if (JS_ToInt32(ctx, &flags, argv[1]))
goto fail;
if (argc >= 3 && !JS_IsUndefined(argv[2])) {
if (JS_ToInt32(ctx, &mode, argv[2])) {
fail:
JS_FreeCString(ctx, filename);
return JS_EXCEPTION;
}
} else {
mode = 0666;
}
#if defined(_WIN32)
/* force binary mode by default */
if (!(flags & O_TEXT))
flags |= O_BINARY;
#endif
ret = js_get_errno(open(filename, flags, mode));
JS_FreeCString(ctx, filename);
return JS_NewInt32(ctx, ret);
}
|
O2
|
c
|
js_os_open:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r12
movl %ecx, %ebp
movq %rdi, %r14
movq (%r8), %rsi
movq 0x8(%r8), %rdx
callq 0x11a6c
pushq $0x6
popq %rbx
testq %rax, %rax
je 0x134e2
movq %rax, %r15
movq 0x10(%r12), %rdx
movq 0x18(%r12), %rcx
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x215d7
testl %eax, %eax
je 0x134f4
movq %r14, %rdi
movq %r15, %rsi
callq 0x1b057
xorl %eax, %eax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x3, %ebp
jl 0x13503
movq 0x28(%r12), %rcx
cmpl $0x3, %ecx
jne 0x1353b
movl $0x1b6, 0x8(%rsp) # imm = 0x1B6
movl $0x1b6, %edx # imm = 0x1B6
movl 0xc(%rsp), %esi
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0xe7c0
movslq %eax, %rdi
callq 0x113ab
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x1b057
movl %r12d, %eax
jmp 0x134e4
movq 0x20(%r12), %rdx
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x215d7
testl %eax, %eax
jne 0x134d7
movl 0x8(%rsp), %edx
jmp 0x13510
|
js_os_open:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r12, r8
mov ebp, ecx
mov r14, rdi
mov rsi, [r8]
mov rdx, [r8+8]
call JS_ToCString
push 6
pop rbx
test rax, rax
jz short loc_134E2
mov r15, rax
mov rdx, [r12+10h]
mov rcx, [r12+18h]
lea rsi, [rsp+38h+var_2C]
mov rdi, r14
call JS_ToInt32
test eax, eax
jz short loc_134F4
loc_134D7:
mov rdi, r14
mov rsi, r15
call JS_FreeCString
loc_134E2:
xor eax, eax
loc_134E4:
mov rdx, rbx
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_134F4:
cmp ebp, 3
jl short loc_13503
mov rcx, [r12+28h]
cmp ecx, 3
jnz short loc_1353B
loc_13503:
mov [rsp+38h+var_30], 1B6h
mov edx, 1B6h
loc_13510:
mov esi, [rsp+38h+var_2C]
xor ebx, ebx
mov rdi, r15
xor eax, eax
call _open
movsxd rdi, eax
call js_get_errno
mov r12, rax
mov rdi, r14
mov rsi, r15
call JS_FreeCString
mov eax, r12d
jmp short loc_134E4
loc_1353B:
mov rdx, [r12+20h]
lea rsi, [rsp+38h+var_30]
mov rdi, r14
call JS_ToInt32
test eax, eax
jnz short loc_134D7
mov edx, [rsp+38h+var_30]
jmp short loc_13510
|
long long js_os_open(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v7; // rax
long long v8; // r15
long long v10; // rcx
long long v11; // rdx
int v12; // eax
unsigned int errno; // r12d
unsigned int v14; // [rsp+8h] [rbp-30h] BYREF
_DWORD v15[11]; // [rsp+Ch] [rbp-2Ch] BYREF
v7 = JS_ToCString(a1, *a5, a5[1]);
if ( !v7 )
return 0LL;
v8 = v7;
if ( !(unsigned int)JS_ToInt32(a1, v15, a5[2], a5[3]) )
{
if ( a4 < 3 || (v10 = a5[5], (_DWORD)v10 == 3) )
{
v14 = 438;
v11 = 438LL;
}
else
{
if ( (unsigned int)JS_ToInt32(a1, &v14, a5[4], v10) )
goto LABEL_3;
v11 = v14;
}
v12 = open(v8, v15[0], v11);
errno = js_get_errno(v12);
JS_FreeCString(a1, v8);
return errno;
}
LABEL_3:
JS_FreeCString(a1, v8);
return 0LL;
}
|
js_os_open:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R12,R8
MOV EBP,ECX
MOV R14,RDI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
CALL 0x00111a6c
PUSH 0x6
POP RBX
TEST RAX,RAX
JZ 0x001134e2
MOV R15,RAX
MOV RDX,qword ptr [R12 + 0x10]
MOV RCX,qword ptr [R12 + 0x18]
LEA RSI,[RSP + 0xc]
MOV RDI,R14
CALL 0x001215d7
TEST EAX,EAX
JZ 0x001134f4
LAB_001134d7:
MOV RDI,R14
MOV RSI,R15
CALL 0x0011b057
LAB_001134e2:
XOR EAX,EAX
LAB_001134e4:
MOV RDX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001134f4:
CMP EBP,0x3
JL 0x00113503
MOV RCX,qword ptr [R12 + 0x28]
CMP ECX,0x3
JNZ 0x0011353b
LAB_00113503:
MOV dword ptr [RSP + 0x8],0x1b6
MOV EDX,0x1b6
LAB_00113510:
MOV ESI,dword ptr [RSP + 0xc]
XOR EBX,EBX
MOV RDI,R15
XOR EAX,EAX
CALL 0x0010e7c0
MOVSXD RDI,EAX
CALL 0x001113ab
MOV R12,RAX
MOV RDI,R14
MOV RSI,R15
CALL 0x0011b057
MOV EAX,R12D
JMP 0x001134e4
LAB_0011353b:
MOV RDX,qword ptr [R12 + 0x20]
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x001215d7
TEST EAX,EAX
JNZ 0x001134d7
MOV EDX,dword ptr [RSP + 0x8]
JMP 0x00113510
|
int4
js_os_open(int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5)
{
int iVar1;
int4 uVar2;
char *__file;
ulong uVar3;
uint local_30;
int local_2c;
__file = (char *)JS_ToCString(param_1,*param_5,param_5[1]);
if (__file != (char *)0x0) {
iVar1 = JS_ToInt32(param_1,&local_2c,param_5[2],param_5[3]);
if (iVar1 == 0) {
if ((param_4 < 3) || ((int)param_5[5] == 3)) {
local_30 = 0x1b6;
uVar3 = 0x1b6;
LAB_00113510:
iVar1 = open(__file,local_2c,uVar3);
uVar2 = js_get_errno((long)iVar1);
JS_FreeCString(param_1,__file);
return uVar2;
}
iVar1 = JS_ToInt32(param_1,&local_30,param_5[4]);
if (iVar1 == 0) {
uVar3 = (ulong)local_30;
goto LAB_00113510;
}
}
JS_FreeCString(param_1,__file);
}
return 0;
}
|
|
57,910
|
sd_basename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
7CodeWizard[P]stablediffusion/examples/cli/main.cpp
|
static std::string sd_basename(const std::string& path) {
size_t pos = path.find_last_of('/');
if (pos != std::string::npos) {
return path.substr(pos + 1);
}
pos = path.find_last_of('\\');
if (pos != std::string::npos) {
return path.substr(pos + 1);
}
return path;
}
|
O0
|
cpp
|
sd_basename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x28, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x2f, %esi
movq $-0x1, %rdx
callq 0xbe60
movq %rax, 0x10(%rsp)
cmpq $-0x1, 0x10(%rsp)
je 0x12bfd
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq $0x1, %rdx
movq $-0x1, %rcx
callq 0xb7b0
jmp 0x12c4e
movq 0x18(%rsp), %rdi
movl $0x5c, %esi
movq $-0x1, %rdx
callq 0xbe60
movq %rax, 0x10(%rsp)
cmpq $-0x1, 0x10(%rsp)
je 0x12c40
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq $0x1, %rdx
movq $-0x1, %rcx
callq 0xb7b0
jmp 0x12c4e
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xb2b0
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
|
_ZL11sd_basenameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 28h
mov [rsp+28h+var_28], rdi
mov rax, rdi
mov [rsp+28h+var_20], rax
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rdi, [rsp+28h+var_10]
mov esi, 2Fh ; '/'
mov rdx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEcm; std::string::find_last_of(char,ulong)
mov [rsp+28h+var_18], rax
cmp [rsp+28h+var_18], 0FFFFFFFFFFFFFFFFh
jz short loc_12BFD
mov rdi, [rsp+28h+var_28]
mov rsi, [rsp+28h+var_10]
mov rdx, [rsp+28h+var_18]
add rdx, 1
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
jmp short loc_12C4E
loc_12BFD:
mov rdi, [rsp+28h+var_10]
mov esi, 5Ch ; '\'
mov rdx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEcm; std::string::find_last_of(char,ulong)
mov [rsp+28h+var_18], rax
cmp [rsp+28h+var_18], 0FFFFFFFFFFFFFFFFh
jz short loc_12C40
mov rdi, [rsp+28h+var_28]
mov rsi, [rsp+28h+var_10]
mov rdx, [rsp+28h+var_18]
add rdx, 1
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
jmp short loc_12C4E
loc_12C40:
mov rdi, [rsp+28h+var_28]
mov rsi, [rsp+28h+var_10]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
loc_12C4E:
mov rax, [rsp+28h+var_20]
add rsp, 28h
retn
|
long long sd_basename(long long a1, long long a2)
{
long long last_of; // [rsp+10h] [rbp-18h]
last_of = std::string::find_last_of(a2, 47LL, -1LL);
if ( last_of == -1 && (last_of = std::string::find_last_of(a2, 92LL, -1LL), last_of == -1) )
std::string::basic_string(a1, a2);
else
std::string::substr(a1, a2, last_of + 1, -1LL);
return a1;
}
|
sd_basename:
SUB RSP,0x28
MOV qword ptr [RSP],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x2f
MOV RDX,-0x1
CALL 0x0010be60
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],-0x1
JZ 0x00112bfd
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x10]
ADD RDX,0x1
MOV RCX,-0x1
CALL 0x0010b7b0
JMP 0x00112c4e
LAB_00112bfd:
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x5c
MOV RDX,-0x1
CALL 0x0010be60
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],-0x1
JZ 0x00112c40
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x10]
ADD RDX,0x1
MOV RCX,-0x1
CALL 0x0010b7b0
JMP 0x00112c4e
LAB_00112c40:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x0010b2b0
LAB_00112c4e:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x28
RET
|
/* sd_basename(std::__cxx11::string const&) */
string * sd_basename(string *param_1)
{
long lVar1;
string *in_RSI;
lVar1 = std::__cxx11::string::find_last_of((char)in_RSI,0x2f);
if (lVar1 == -1) {
lVar1 = std::__cxx11::string::find_last_of((char)in_RSI,0x5c);
if (lVar1 == -1) {
std::__cxx11::string::string(param_1,in_RSI);
}
else {
std::__cxx11::string::substr((ulong)param_1,(ulong)in_RSI);
}
}
else {
std::__cxx11::string::substr((ulong)param_1,(ulong)in_RSI);
}
return param_1;
}
|
|
57,911
|
my_uca_implicit_weight_put
|
eloqsql/strings/ctype-uca.c
|
static inline void
my_uca_implicit_weight_put(uint16 *to, my_wc_t code, uint level)
{
switch (level) {
case 1: to[0]= 0x0020; to[1]= 0; break; /* Secondary level */
case 2: to[0]= 0x0002; to[1]= 0; break; /* Tertiary level */
case 3: to[0]= 0x0001; to[1]= 0; break; /* Quaternary level */
default:
DBUG_ASSERT(0);
case 0:
break;
}
/* Primary level */
to[0]= (uint16)(code >> 15) + my_uca_implicit_weight_base(code);
to[1]= (code & 0x7FFF) | 0x8000;
to[2]= 0;
}
|
O0
|
c
|
my_uca_implicit_weight_put:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x3, %rax
ja 0xaec53
movq -0x20(%rbp), %rax
leaq 0xfc241(%rip), %rcx # 0x1aae4c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movw $0x20, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0xaec5b
movq -0x8(%rbp), %rax
movw $0x2, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0xaec5b
movq -0x8(%rbp), %rax
movw $0x1, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0xaec5b
jmp 0xaec55
jmp 0xaec57
jmp 0xaec59
jmp 0xaec5b
movq -0x10(%rbp), %rax
shrq $0xf, %rax
movzwl %ax, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0xaecc0
movw %ax, %cx
movl -0x24(%rbp), %eax
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, (%rax)
movq -0x10(%rbp), %rax
andq $0x7fff, %rax # imm = 0x7FFF
orq $0x8000, %rax # imm = 0x8000
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x4(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_uca_implicit_weight_put:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov eax, [rbp+var_14]
mov [rbp+var_20], rax
sub rax, 3; switch 4 cases
ja short def_AEC12; jumptable 00000000000AEC12 default case
mov rax, [rbp+var_20]
lea rcx, jpt_AEC12
movsxd rax, ds:(jpt_AEC12 - 1AAE4Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_AEC14:
mov rax, [rbp+var_8]; jumptable 00000000000AEC12 case 1
mov word ptr [rax], 20h ; ' '
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_AEC5B
loc_AEC29:
mov rax, [rbp+var_8]; jumptable 00000000000AEC12 case 2
mov word ptr [rax], 2
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_AEC5B
loc_AEC3E:
mov rax, [rbp+var_8]; jumptable 00000000000AEC12 case 3
mov word ptr [rax], 1
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_AEC5B
def_AEC12:
jmp short $+2; jumptable 00000000000AEC12 default case
loc_AEC55:
jmp short $+2
loc_AEC57:
jmp short $+2; jumptable 00000000000AEC12 case 0
loc_AEC59:
jmp short $+2; jumptable 00000000000AEC12 case 0
loc_AEC5B:
mov rax, [rbp+var_10]
shr rax, 0Fh
movzx eax, ax
mov [rbp+var_24], eax
mov rdi, [rbp+var_10]
call my_uca_implicit_weight_base
mov cx, ax
mov eax, [rbp+var_24]
movzx ecx, cx
add eax, ecx
mov cx, ax
mov rax, [rbp+var_8]
mov [rax], cx
mov rax, [rbp+var_10]
and rax, 7FFFh
or rax, 8000h
mov cx, ax
mov rax, [rbp+var_8]
mov [rax+2], cx
mov rax, [rbp+var_8]
mov word ptr [rax+4], 0
add rsp, 30h
pop rbp
retn
|
_WORD * my_uca_implicit_weight_put(_WORD *a1, unsigned long long a2, int a3)
{
_WORD *result; // rax
switch ( a3 )
{
case 1:
*a1 = 32;
a1[1] = 0;
break;
case 2:
*a1 = 2;
a1[1] = 0;
break;
case 3:
*a1 = 1;
a1[1] = 0;
break;
default:
break;
}
*a1 = my_uca_implicit_weight_base(a2) + (a2 >> 15);
a1[1] = a2 & 0x7FFF | 0x8000;
result = a1;
a1[2] = 0;
return result;
}
|
my_uca_implicit_weight_put:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV EAX,dword ptr [RBP + -0x14]
MOV qword ptr [RBP + -0x20],RAX
SUB RAX,0x3
JA 0x001aec53
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x2aae4c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x20
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x001aec5b
caseD_2:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x2
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x001aec5b
caseD_3:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x001aec5b
LAB_001aec53:
JMP 0x001aec55
LAB_001aec55:
JMP 0x001aec57
LAB_001aec57:
JMP 0x001aec59
caseD_0:
JMP 0x001aec5b
LAB_001aec5b:
MOV RAX,qword ptr [RBP + -0x10]
SHR RAX,0xf
MOVZX EAX,AX
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001aecc0
MOV CX,AX
MOV EAX,dword ptr [RBP + -0x24]
MOVZX ECX,CX
ADD EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x7fff
OR RAX,0x8000
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],CX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x4],0x0
ADD RSP,0x30
POP RBP
RET
|
void my_uca_implicit_weight_put(short *param_1,ulong param_2,int4 param_3)
{
short sVar1;
switch(param_3) {
default:
break;
case 1:
*param_1 = 0x20;
param_1[1] = 0;
break;
case 2:
*param_1 = 2;
param_1[1] = 0;
break;
case 3:
*param_1 = 1;
param_1[1] = 0;
}
sVar1 = my_uca_implicit_weight_base(param_2);
*param_1 = (short)(param_2 >> 0xf) + sVar1;
param_1[1] = (ushort)param_2 & 0x7fff | 0x8000;
param_1[2] = 0;
return;
}
|
|
57,912
|
PFS_account::aggregate_transactions(PFS_user*, PFS_host*)
|
eloqsql/storage/perfschema/pfs_account.cc
|
void PFS_account::aggregate_transactions(PFS_user *safe_user, PFS_host *safe_host)
{
if (read_instr_class_transactions_stats() == NULL)
return;
if (likely(safe_user != NULL && safe_host != NULL))
{
/*
Aggregate EVENTS_TRANSACTIONS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- EVENTS_TRANSACTIONS_SUMMARY_BY_USER_BY_EVENT_NAME
- EVENTS_TRANSACTIONS_SUMMARY_BY_HOST_BY_EVENT_NAME
in parallel.
*/
aggregate_all_transactions(write_instr_class_transactions_stats(),
safe_user->write_instr_class_transactions_stats(),
safe_host->write_instr_class_transactions_stats());
return;
}
if (safe_user != NULL)
{
/*
Aggregate EVENTS_TRANSACTIONS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- EVENTS_TRANSACTIONS_SUMMARY_BY_USER_BY_EVENT_NAME
- EVENTS_TRANSACTIONS_SUMMARY_GLOBAL_BY_EVENT_NAME
in parallel.
*/
aggregate_all_transactions(write_instr_class_transactions_stats(),
safe_user->write_instr_class_transactions_stats(),
&global_transaction_stat);
return;
}
if (safe_host != NULL)
{
/*
Aggregate EVENTS_TRANSACTIONS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- EVENTS_TRANSACTIONS_SUMMARY_BY_HOST_BY_EVENT_NAME
*/
aggregate_all_transactions(write_instr_class_transactions_stats(),
safe_host->write_instr_class_transactions_stats());
return;
}
/*
Aggregate EVENTS_TRANSACTIONS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- EVENTS_TRANSACTIONS_SUMMARY_GLOBAL_BY_EVENT_NAME
*/
aggregate_all_transactions(write_instr_class_transactions_stats(),
&global_transaction_stat);
return;
}
|
O0
|
cpp
|
PFS_account::aggregate_transactions(PFS_user*, PFS_host*):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x41930
cmpq $0x0, %rax
jne 0x52f7c
jmp 0x5304a
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x21(%rbp)
je 0x52f93
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x52fd5
movq -0x20(%rbp), %rdi
callq 0x41970
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x41970
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x41970
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %rax, %rdx
callq 0x3c530
jmp 0x5304a
cmpq $0x0, -0x10(%rbp)
je 0x53007
movq -0x20(%rbp), %rdi
callq 0x41970
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x41970
movq -0x40(%rbp), %rdi
movq %rax, %rsi
leaq 0x37b6c0(%rip), %rdx # 0x3ce6c0
callq 0x3c530
jmp 0x5304a
cmpq $0x0, -0x18(%rbp)
je 0x53032
movq -0x20(%rbp), %rdi
callq 0x41970
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0x41970
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x3c4f0
jmp 0x5304a
movq -0x20(%rbp), %rdi
callq 0x41970
movq %rax, %rdi
leaq 0x37b67b(%rip), %rsi # 0x3ce6c0
callq 0x3c4f0
addq $0x50, %rsp
popq %rbp
retq
|
_ZN11PFS_account22aggregate_transactionsEP8PFS_userP8PFS_host:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]; this
mov [rbp+var_20], rdi
call _ZNK20PFS_connection_slice35read_instr_class_transactions_statsEv; PFS_connection_slice::read_instr_class_transactions_stats(void)
cmp rax, 0
jnz short loc_52F7C
jmp loc_5304A
loc_52F7C:
xor eax, eax
cmp [rbp+var_10], 0
mov [rbp+var_21], al
jz short loc_52F93
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_21], al
loc_52F93:
mov al, [rbp+var_21]
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_52FD5
mov rdi, [rbp+var_20]; this
call _ZN20PFS_connection_slice36write_instr_class_transactions_statsEv; PFS_connection_slice::write_instr_class_transactions_stats(void)
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]; this
call _ZN20PFS_connection_slice36write_instr_class_transactions_statsEv; PFS_connection_slice::write_instr_class_transactions_stats(void)
mov [rbp+var_30], rax
mov rdi, [rbp+var_18]; this
call _ZN20PFS_connection_slice36write_instr_class_transactions_statsEv; PFS_connection_slice::write_instr_class_transactions_stats(void)
mov rdi, [rbp+var_38]; PFS_transaction_stat *
mov rsi, [rbp+var_30]; PFS_transaction_stat *
mov rdx, rax; PFS_transaction_stat *
call _Z26aggregate_all_transactionsP20PFS_transaction_statS0_S0_; aggregate_all_transactions(PFS_transaction_stat *,PFS_transaction_stat *,PFS_transaction_stat *)
jmp short loc_5304A
loc_52FD5:
cmp [rbp+var_10], 0
jz short loc_53007
mov rdi, [rbp+var_20]; this
call _ZN20PFS_connection_slice36write_instr_class_transactions_statsEv; PFS_connection_slice::write_instr_class_transactions_stats(void)
mov [rbp+var_40], rax
mov rdi, [rbp+var_10]; this
call _ZN20PFS_connection_slice36write_instr_class_transactions_statsEv; PFS_connection_slice::write_instr_class_transactions_stats(void)
mov rdi, [rbp+var_40]; PFS_transaction_stat *
mov rsi, rax; PFS_transaction_stat *
lea rdx, global_transaction_stat; PFS_transaction_stat *
call _Z26aggregate_all_transactionsP20PFS_transaction_statS0_S0_; aggregate_all_transactions(PFS_transaction_stat *,PFS_transaction_stat *,PFS_transaction_stat *)
jmp short loc_5304A
loc_53007:
cmp [rbp+var_18], 0
jz short loc_53032
mov rdi, [rbp+var_20]; this
call _ZN20PFS_connection_slice36write_instr_class_transactions_statsEv; PFS_connection_slice::write_instr_class_transactions_stats(void)
mov [rbp+var_48], rax
mov rdi, [rbp+var_18]; this
call _ZN20PFS_connection_slice36write_instr_class_transactions_statsEv; PFS_connection_slice::write_instr_class_transactions_stats(void)
mov rdi, [rbp+var_48]; PFS_transaction_stat *
mov rsi, rax; PFS_transaction_stat *
call _Z26aggregate_all_transactionsP20PFS_transaction_statS0_; aggregate_all_transactions(PFS_transaction_stat *,PFS_transaction_stat *)
jmp short loc_5304A
loc_53032:
mov rdi, [rbp+var_20]; this
call _ZN20PFS_connection_slice36write_instr_class_transactions_statsEv; PFS_connection_slice::write_instr_class_transactions_stats(void)
mov rdi, rax; PFS_transaction_stat *
lea rsi, global_transaction_stat; PFS_transaction_stat *
call _Z26aggregate_all_transactionsP20PFS_transaction_statS0_; aggregate_all_transactions(PFS_transaction_stat *,PFS_transaction_stat *)
loc_5304A:
add rsp, 50h
pop rbp
retn
|
PFS_transaction_stat * PFS_account::aggregate_transactions(PFS_account *this, PFS_user *a2, PFS_host *a3)
{
PFS_transaction_stat *result; // rax
PFS_transaction_stat *v4; // rax
PFS_transaction_stat *v5; // rax
PFS_transaction_stat *v6; // rax
PFS_transaction_stat *v7; // rax
PFS_transaction_stat *v8; // [rsp+8h] [rbp-48h]
PFS_transaction_stat *v9; // [rsp+10h] [rbp-40h]
PFS_transaction_stat *v10; // [rsp+18h] [rbp-38h]
PFS_transaction_stat *v11; // [rsp+20h] [rbp-30h]
bool v12; // [rsp+2Fh] [rbp-21h]
result = (PFS_transaction_stat *)PFS_connection_slice::read_instr_class_transactions_stats(this);
if ( result )
{
v12 = 0;
if ( a2 )
v12 = a3 != 0LL;
if ( v12 )
{
v10 = (PFS_transaction_stat *)PFS_connection_slice::write_instr_class_transactions_stats(this);
v11 = (PFS_transaction_stat *)PFS_connection_slice::write_instr_class_transactions_stats(a2);
v4 = (PFS_transaction_stat *)PFS_connection_slice::write_instr_class_transactions_stats(a3);
return aggregate_all_transactions(v10, v11, v4);
}
else if ( a2 )
{
v9 = (PFS_transaction_stat *)PFS_connection_slice::write_instr_class_transactions_stats(this);
v5 = (PFS_transaction_stat *)PFS_connection_slice::write_instr_class_transactions_stats(a2);
return aggregate_all_transactions(v9, v5, (PFS_transaction_stat *)&global_transaction_stat);
}
else if ( a3 )
{
v8 = (PFS_transaction_stat *)PFS_connection_slice::write_instr_class_transactions_stats(this);
v6 = (PFS_transaction_stat *)PFS_connection_slice::write_instr_class_transactions_stats(a3);
return aggregate_all_transactions(v8, v6);
}
else
{
v7 = (PFS_transaction_stat *)PFS_connection_slice::write_instr_class_transactions_stats(this);
return aggregate_all_transactions(v7, (PFS_transaction_stat *)&global_transaction_stat);
}
}
return result;
}
|
aggregate_transactions:
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 RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RDI
CALL 0x00141930
CMP RAX,0x0
JNZ 0x00152f7c
JMP 0x0015304a
LAB_00152f7c:
XOR EAX,EAX
CMP qword ptr [RBP + -0x10],0x0
MOV byte ptr [RBP + -0x21],AL
JZ 0x00152f93
CMP qword ptr [RBP + -0x18],0x0
SETNZ AL
MOV byte ptr [RBP + -0x21],AL
LAB_00152f93:
MOV AL,byte ptr [RBP + -0x21]
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00152fd5
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00141970
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00141970
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00141970
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,RAX
CALL 0x0013c530
JMP 0x0015304a
LAB_00152fd5:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00153007
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00141970
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00141970
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,RAX
LEA RDX,[0x4ce6c0]
CALL 0x0013c530
JMP 0x0015304a
LAB_00153007:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00153032
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00141970
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00141970
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,RAX
CALL 0x0013c4f0
JMP 0x0015304a
LAB_00153032:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00141970
MOV RDI,RAX
LEA RSI,[0x4ce6c0]
CALL 0x0013c4f0
LAB_0015304a:
ADD RSP,0x50
POP RBP
RET
|
/* PFS_account::aggregate_transactions(PFS_user*, PFS_host*) */
void __thiscall
PFS_account::aggregate_transactions(PFS_account *this,PFS_user *param_1,PFS_host *param_2)
{
long lVar1;
PFS_transaction_stat *pPVar2;
PFS_transaction_stat *pPVar3;
PFS_transaction_stat *pPVar4;
lVar1 = PFS_connection_slice::read_instr_class_transactions_stats((PFS_connection_slice *)this);
if (lVar1 != 0) {
if (param_1 == (PFS_user *)0x0 || param_2 == (PFS_host *)0x0) {
if (param_1 == (PFS_user *)0x0) {
if (param_2 == (PFS_host *)0x0) {
pPVar2 = (PFS_transaction_stat *)
PFS_connection_slice::write_instr_class_transactions_stats
((PFS_connection_slice *)this);
aggregate_all_transactions(pPVar2,(PFS_transaction_stat *)global_transaction_stat);
}
else {
pPVar2 = (PFS_transaction_stat *)
PFS_connection_slice::write_instr_class_transactions_stats
((PFS_connection_slice *)this);
pPVar3 = (PFS_transaction_stat *)
PFS_connection_slice::write_instr_class_transactions_stats
((PFS_connection_slice *)param_2);
aggregate_all_transactions(pPVar2,pPVar3);
}
}
else {
pPVar2 = (PFS_transaction_stat *)
PFS_connection_slice::write_instr_class_transactions_stats
((PFS_connection_slice *)this);
pPVar3 = (PFS_transaction_stat *)
PFS_connection_slice::write_instr_class_transactions_stats
((PFS_connection_slice *)param_1);
aggregate_all_transactions(pPVar2,pPVar3,(PFS_transaction_stat *)global_transaction_stat);
}
}
else {
pPVar2 = (PFS_transaction_stat *)
PFS_connection_slice::write_instr_class_transactions_stats
((PFS_connection_slice *)this);
pPVar3 = (PFS_transaction_stat *)
PFS_connection_slice::write_instr_class_transactions_stats
((PFS_connection_slice *)param_1);
pPVar4 = (PFS_transaction_stat *)
PFS_connection_slice::write_instr_class_transactions_stats
((PFS_connection_slice *)param_2);
aggregate_all_transactions(pPVar2,pPVar3,pPVar4);
}
}
return;
}
|
|
57,913
|
add_compiled_extra_collation
|
eloqsql/mysys/charset.c
|
void add_compiled_extra_collation(struct charset_info_st *cs)
{
DBUG_ASSERT(cs->number < array_elements(all_charsets));
all_charsets[cs->number]= cs;
cs->state|= MY_CS_AVAILABLE;
if ((my_hash_insert(&charset_name_hash, (uchar*) cs)))
{
CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash,
(uchar*) cs->cs_name.str,
cs->cs_name.length);
cs->cs_name= org->cs_name;
}
}
|
O3
|
c
|
add_compiled_extra_collation:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %eax
leaq 0xb6d8ec(%rip), %rcx # 0xbffab0
movq %rdi, (%rcx,%rax,8)
orb $0x2, 0xd(%rdi)
leaq 0xb718dd(%rip), %rdi # 0xc03ab0
movq %rbx, %rsi
callq 0x93ad6
testb %al, %al
je 0x921fb
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
leaq 0xb718c2(%rip), %rdi # 0xc03ab0
callq 0x93876
movups 0x10(%rax), %xmm0
movups %xmm0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
add_compiled_extra_collation:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov eax, [rdi]
lea rcx, all_charsets
mov [rcx+rax*8], rdi
or byte ptr [rdi+0Dh], 2
lea rdi, charset_name_hash
mov rsi, rbx
call my_hash_insert
test al, al
jz short loc_921FB
mov rsi, [rbx+10h]
mov rdx, [rbx+18h]
lea rdi, charset_name_hash
call my_hash_search
movups xmm0, xmmword ptr [rax+10h]
movups xmmword ptr [rbx+10h], xmm0
loc_921FB:
add rsp, 8
pop rbx
pop rbp
retn
|
long long add_compiled_extra_collation(unsigned int *a1)
{
long long result; // rax
all_charsets[*a1] = a1;
*((_BYTE *)a1 + 13) |= 2u;
result = my_hash_insert(&charset_name_hash, a1);
if ( (_BYTE)result )
{
result = my_hash_search(&charset_name_hash, *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 3));
*((_OWORD *)a1 + 1) = *(_OWORD *)(result + 16);
}
return result;
}
|
add_compiled_extra_collation:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EAX,dword ptr [RDI]
LEA RCX,[0xcffab0]
MOV qword ptr [RCX + RAX*0x8],RDI
OR byte ptr [RDI + 0xd],0x2
LEA RDI,[0xd03ab0]
MOV RSI,RBX
CALL 0x00193ad6
TEST AL,AL
JZ 0x001921fb
MOV RSI,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x18]
LEA RDI,[0xd03ab0]
CALL 0x00193876
MOVUPS XMM0,xmmword ptr [RAX + 0x10]
MOVUPS xmmword ptr [RBX + 0x10],XMM0
LAB_001921fb:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void add_compiled_extra_collation(uint *param_1)
{
int8 uVar1;
char cVar2;
long lVar3;
(&all_charsets)[*param_1] = param_1;
*(byte *)((long)param_1 + 0xd) = *(byte *)((long)param_1 + 0xd) | 2;
cVar2 = my_hash_insert(charset_name_hash,param_1);
if (cVar2 != '\0') {
lVar3 = my_hash_search(charset_name_hash,*(int8 *)(param_1 + 4),
*(int8 *)(param_1 + 6));
uVar1 = *(int8 *)(lVar3 + 0x18);
*(int8 *)(param_1 + 4) = *(int8 *)(lVar3 + 0x10);
*(int8 *)(param_1 + 6) = uVar1;
}
return;
}
|
|
57,914
|
calc_hashnr
|
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
|
static uint calc_hashnr(const uchar *key,uint length)
{
register uint nr=1, nr2=4;
while (length--)
{
nr^= (((nr & 63)+nr2)*((uint) (uchar) *key++))+ (nr << 8);
nr2+=3;
}
return((uint) nr);
}
|
O0
|
c
|
calc_hashnr:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x4, -0x14(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0x5f1f0
movl -0x10(%rbp), %eax
andl $0x3f, %eax
addl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movzbl (%rcx), %ecx
imull %ecx, %eax
movl -0x10(%rbp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
xorl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x14(%rbp)
jmp 0x5f1a9
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
calc_hashnr:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], 1
mov [rbp+var_14], 4
loc_5F1A9:
mov eax, [rbp+var_C]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_C], ecx
cmp eax, 0
jz short loc_5F1F0
mov eax, [rbp+var_10]
and eax, 3Fh
add eax, [rbp+var_14]
mov rcx, [rbp+var_8]
mov rdx, rcx
add rdx, 1
mov [rbp+var_8], rdx
movzx ecx, byte ptr [rcx]
imul eax, ecx
mov ecx, [rbp+var_10]
shl ecx, 8
add eax, ecx
xor eax, [rbp+var_10]
mov [rbp+var_10], eax
mov eax, [rbp+var_14]
add eax, 3
mov [rbp+var_14], eax
jmp short loc_5F1A9
loc_5F1F0:
mov eax, [rbp+var_10]
pop rbp
retn
|
long long calc_hashnr(unsigned __int8 *a1, int a2)
{
unsigned __int8 *v3; // rcx
int i; // [rsp+0h] [rbp-14h]
unsigned int v6; // [rsp+4h] [rbp-10h]
v6 = 1;
for ( i = 4; a2--; i += 3 )
{
v3 = a1++;
v6 ^= (v6 << 8) + *v3 * (i + (v6 & 0x3F));
}
return v6;
}
|
calc_hashnr:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],0x1
MOV dword ptr [RBP + -0x14],0x4
LAB_0015f1a9:
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0xc],ECX
CMP EAX,0x0
JZ 0x0015f1f0
MOV EAX,dword ptr [RBP + -0x10]
AND EAX,0x3f
ADD EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOVZX ECX,byte ptr [RCX]
IMUL EAX,ECX
MOV ECX,dword ptr [RBP + -0x10]
SHL ECX,0x8
ADD EAX,ECX
XOR EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x10],EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x3
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0015f1a9
LAB_0015f1f0:
MOV EAX,dword ptr [RBP + -0x10]
POP RBP
RET
|
uint calc_hashnr(byte *param_1,int param_2)
{
int local_1c;
uint local_18;
int local_14;
byte *local_10;
local_18 = 1;
local_1c = 4;
local_14 = param_2;
local_10 = param_1;
while (local_14 != 0) {
local_18 = ((local_18 & 0x3f) + local_1c) * (uint)*local_10 + local_18 * 0x100 ^ local_18;
local_1c = local_1c + 3;
local_14 = local_14 + -1;
local_10 = local_10 + 1;
}
return local_18;
}
|
|
57,915
|
my_b_write_quoted_with_length(st_io_cache*, unsigned char const*, unsigned int)
|
eloqsql/sql/log_event_client.cc
|
static size_t
my_b_write_quoted_with_length(IO_CACHE *file, const uchar *ptr, uint length)
{
if (length < 256)
{
length= *ptr;
my_b_write_quoted(file, ptr + 1, length);
return length + 1;
}
else
{
length= uint2korr(ptr);
my_b_write_quoted(file, ptr + 2, length);
return length + 2;
}
}
|
O3
|
cpp
|
my_b_write_quoted_with_length(st_io_cache*, unsigned char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0xff, %edx
ja 0x56588
movzbl (%rsi), %ebx
incq %rsi
movl %ebx, %edx
callq 0x56413
incl %ebx
jmp 0x56599
movzwl (%rsi), %ebx
addq $0x2, %rsi
movl %ebx, %edx
callq 0x56413
addl $0x2, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
_ZL29my_b_write_quoted_with_lengthP11st_io_cachePKhj:
push rbp
mov rbp, rsp
push rbx
push rax
cmp edx, 0FFh
ja short loc_56588
movzx ebx, byte ptr [rsi]
inc rsi
mov edx, ebx
call _ZL17my_b_write_quotedP11st_io_cachePKhj; my_b_write_quoted(st_io_cache *,uchar const*,uint)
inc ebx
jmp short loc_56599
loc_56588:
movzx ebx, word ptr [rsi]
add rsi, 2
mov edx, ebx
call _ZL17my_b_write_quotedP11st_io_cachePKhj; my_b_write_quoted(st_io_cache *,uchar const*,uint)
add ebx, 2
loc_56599:
mov eax, ebx
add rsp, 8
pop rbx
pop rbp
retn
|
long long my_b_write_quoted_with_length(
long long a1,
unsigned __int16 *a2,
unsigned int a3,
long long a4,
long long a5,
long long a6)
{
int v6; // ebx
int v8; // ebx
if ( a3 > 0xFF )
{
v8 = *a2;
my_b_write_quoted(a1, (long long)(a2 + 1), v8, a4, a5, a6);
return (unsigned int)(v8 + 2);
}
else
{
v6 = *(unsigned __int8 *)a2;
my_b_write_quoted(a1, (long long)a2 + 1, v6, a4, a5, a6);
return (unsigned int)(v6 + 1);
}
}
|
my_b_write_quoted_with_length:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CMP EDX,0xff
JA 0x00156588
MOVZX EBX,byte ptr [RSI]
INC RSI
MOV EDX,EBX
CALL 0x00156413
INC EBX
JMP 0x00156599
LAB_00156588:
MOVZX EBX,word ptr [RSI]
ADD RSI,0x2
MOV EDX,EBX
CALL 0x00156413
ADD EBX,0x2
LAB_00156599:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* my_b_write_quoted_with_length(st_io_cache*, unsigned char const*, unsigned int) */
int my_b_write_quoted_with_length(st_io_cache *param_1,uchar *param_2,uint param_3)
{
byte bVar1;
ushort uVar2;
int iVar3;
if (param_3 < 0x100) {
bVar1 = *param_2;
my_b_write_quoted(param_1,param_2 + 1,(uint)bVar1);
iVar3 = bVar1 + 1;
}
else {
uVar2 = *(ushort *)param_2;
my_b_write_quoted(param_1,param_2 + 2,(uint)uVar2);
iVar3 = uVar2 + 2;
}
return iVar3;
}
|
|
57,916
|
SDL_GL_SetAttribute
|
SDL3Lite/source/SDL3/SDL_OpenGLContext.cpp
|
bool SDL_GL_SetAttribute(SDL_GLAttr attr, int value)
{
switch (attr)
{
case SDL_GL_RED_SIZE:
break;
case SDL_GL_GREEN_SIZE:
break;
case SDL_GL_BLUE_SIZE:
break;
case SDL_GL_ALPHA_SIZE:
break;
case SDL_GL_BUFFER_SIZE:
break;
case SDL_GL_DOUBLEBUFFER:
break;
case SDL_GL_DEPTH_SIZE:
break;
case SDL_GL_STENCIL_SIZE:
break;
case SDL_GL_ACCUM_RED_SIZE:
break;
case SDL_GL_ACCUM_GREEN_SIZE:
break;
case SDL_GL_ACCUM_BLUE_SIZE:
break;
case SDL_GL_ACCUM_ALPHA_SIZE:
break;
case SDL_GL_STEREO:
break;
case SDL_GL_MULTISAMPLEBUFFERS:
break;
case SDL_GL_MULTISAMPLESAMPLES:
break;
case SDL_GL_ACCELERATED_VISUAL:
break;
case SDL_GL_RETAINED_BACKING:
break;
case SDL_GL_CONTEXT_MAJOR_VERSION:
SDL::GetApplication().GetOpenGLAttributes().SetMajor(value);
break;
case SDL_GL_CONTEXT_MINOR_VERSION:
SDL::GetApplication().GetOpenGLAttributes().SetMinor(value);
break;
case SDL_GL_CONTEXT_FLAGS:
break;
case SDL_GL_CONTEXT_PROFILE_MASK:
break;
case SDL_GL_SHARE_WITH_CURRENT_CONTEXT:
break;
case SDL_GL_FRAMEBUFFER_SRGB_CAPABLE:
break;
case SDL_GL_CONTEXT_RELEASE_BEHAVIOR:
break;
case SDL_GL_CONTEXT_RESET_NOTIFICATION:
break;
case SDL_GL_CONTEXT_NO_ERROR:
break;
case SDL_GL_FLOATBUFFERS:
break;
case SDL_GL_EGL_PLATFORM:
break;
default:
break;
}
return true;
}
|
O0
|
cpp
|
SDL_GL_SetAttribute:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %eax
movq %rax, -0x10(%rbp)
subq $0x1b, %rax
ja 0x2cda7
movq -0x10(%rbp), %rax
leaq 0xe272(%rip), %rcx # 0x3afa8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
callq 0x22140
movq %rax, %rdi
callq 0x22390
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x21c00
jmp 0x2cda9
callq 0x22140
movq %rax, %rdi
callq 0x22390
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x21b30
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
jmp 0x2cda9
movb $0x1, %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
SDL_GL_SetAttribute:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov eax, [rbp+var_4]
mov [rbp+var_10], rax
sub rax, 1Bh; switch 28 cases
ja short def_2CD3D; jumptable 000000000002CD3D default case
mov rax, [rbp+var_10]
lea rcx, jpt_2CD3D
movsxd rax, ds:(jpt_2CD3D - 3AFA8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_2CD3F:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 0
loc_2CD41:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 1
loc_2CD43:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 2
loc_2CD45:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 3
loc_2CD47:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 4
loc_2CD49:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 5
loc_2CD4B:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 6
loc_2CD4D:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 7
loc_2CD4F:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 8
loc_2CD51:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 9
loc_2CD53:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 10
loc_2CD55:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 11
loc_2CD57:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 12
loc_2CD59:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 13
loc_2CD5B:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 14
loc_2CD5D:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 15
loc_2CD5F:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 16
loc_2CD61:
call __ZN3SDL14GetApplicationEv; jumptable 000000000002CD3D case 17
mov rdi, rax; this
call __ZN3SDL11Application19GetOpenGLAttributesEv; SDL::Application::GetOpenGLAttributes(void)
mov rdi, rax; this
mov esi, [rbp+var_8]; int
call __ZN3SDL16OpenGLAttributes8SetMajorEi; SDL::OpenGLAttributes::SetMajor(int)
jmp short loc_2CDA9
loc_2CD7B:
call __ZN3SDL14GetApplicationEv; jumptable 000000000002CD3D case 18
mov rdi, rax; this
call __ZN3SDL11Application19GetOpenGLAttributesEv; SDL::Application::GetOpenGLAttributes(void)
mov rdi, rax; this
mov esi, [rbp+var_8]; int
call __ZN3SDL16OpenGLAttributes8SetMinorEi; SDL::OpenGLAttributes::SetMinor(int)
jmp short loc_2CDA9
loc_2CD95:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 19
loc_2CD97:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 20
loc_2CD99:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 21
loc_2CD9B:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 22
loc_2CD9D:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 23
loc_2CD9F:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 24
loc_2CDA1:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 25
loc_2CDA3:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 26
loc_2CDA5:
jmp short loc_2CDA9; jumptable 000000000002CD3D case 27
def_2CD3D:
jmp short $+2; jumptable 000000000002CD3D default case
loc_2CDA9:
mov al, 1
and al, 1
add rsp, 10h
pop rbp
retn
|
char SDL_GL_SetAttribute(SDL *a1, int a2)
{
SDL::Application *Application; // rax
SDL::OpenGLAttributes *OpenGLAttributes; // rax
SDL::Application *v4; // rax
SDL::OpenGLAttributes *v5; // rax
switch ( (int)a1 )
{
case 17:
Application = (SDL::Application *)SDL::GetApplication(a1);
OpenGLAttributes = (SDL::OpenGLAttributes *)SDL::Application::GetOpenGLAttributes(Application);
SDL::OpenGLAttributes::SetMajor(OpenGLAttributes, a2);
break;
case 18:
v4 = (SDL::Application *)SDL::GetApplication(a1);
v5 = (SDL::OpenGLAttributes *)SDL::Application::GetOpenGLAttributes(v4);
SDL::OpenGLAttributes::SetMinor(v5, a2);
break;
default:
return 1;
}
return 1;
}
|
SDL_GL_SetAttribute:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
MOV EAX,dword ptr [RBP + -0x4]
MOV qword ptr [RBP + -0x10],RAX
SUB RAX,0x1b
JA 0x0012cda7
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x13afa8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_12cd3f:
JMP 0x0012cda9
caseD_12cd41:
JMP 0x0012cda9
caseD_12cd43:
JMP 0x0012cda9
caseD_12cd45:
JMP 0x0012cda9
caseD_12cd47:
JMP 0x0012cda9
caseD_12cd49:
JMP 0x0012cda9
caseD_12cd4b:
JMP 0x0012cda9
caseD_12cd4d:
JMP 0x0012cda9
caseD_12cd4f:
JMP 0x0012cda9
caseD_12cd51:
JMP 0x0012cda9
caseD_12cd53:
JMP 0x0012cda9
caseD_12cd55:
JMP 0x0012cda9
caseD_12cd57:
JMP 0x0012cda9
caseD_12cd59:
JMP 0x0012cda9
caseD_12cd5b:
JMP 0x0012cda9
caseD_12cd5d:
JMP 0x0012cda9
caseD_12cd5f:
JMP 0x0012cda9
caseD_12cd61:
CALL 0x00122140
MOV RDI,RAX
CALL 0x00122390
MOV RDI,RAX
MOV ESI,dword ptr [RBP + -0x8]
CALL 0x00121c00
JMP 0x0012cda9
caseD_12cd7b:
CALL 0x00122140
MOV RDI,RAX
CALL 0x00122390
MOV RDI,RAX
MOV ESI,dword ptr [RBP + -0x8]
CALL 0x00121b30
JMP 0x0012cda9
caseD_12cd95:
JMP 0x0012cda9
caseD_12cd97:
JMP 0x0012cda9
caseD_12cd99:
JMP 0x0012cda9
caseD_12cd9b:
JMP 0x0012cda9
caseD_12cd9d:
JMP 0x0012cda9
caseD_12cd9f:
JMP 0x0012cda9
caseD_12cda1:
JMP 0x0012cda9
caseD_12cda3:
JMP 0x0012cda9
caseD_12cda5:
JMP 0x0012cda9
LAB_0012cda7:
JMP 0x0012cda9
LAB_0012cda9:
MOV AL,0x1
AND AL,0x1
ADD RSP,0x10
POP RBP
RET
|
int8 SDL_GL_SetAttribute(uint param_1,int param_2)
{
Application *pAVar1;
OpenGLAttributes *pOVar2;
if ((ulong)param_1 < 0x1c) {
switch((long)&switchD_0012cd3d::switchdataD_0013afa8 +
(long)(int)(&switchD_0012cd3d::switchdataD_0013afa8)[param_1]) {
case 0x12cd3f:
break;
case 0x12cd41:
break;
case 0x12cd43:
break;
case 0x12cd45:
break;
case 0x12cd47:
break;
case 0x12cd49:
break;
case 0x12cd4b:
break;
case 0x12cd4d:
break;
case 0x12cd4f:
break;
case 0x12cd51:
break;
case 0x12cd53:
break;
case 0x12cd55:
break;
case 0x12cd57:
break;
case 0x12cd59:
break;
case 0x12cd5b:
break;
case 0x12cd5d:
break;
case 0x12cd5f:
break;
case 0x12cd61:
pAVar1 = (Application *)SDL::GetApplication();
pOVar2 = (OpenGLAttributes *)SDL::Application::GetOpenGLAttributes(pAVar1);
SDL::OpenGLAttributes::SetMajor(pOVar2,param_2);
break;
case 0x12cd7b:
pAVar1 = (Application *)SDL::GetApplication();
pOVar2 = (OpenGLAttributes *)SDL::Application::GetOpenGLAttributes(pAVar1);
SDL::OpenGLAttributes::SetMinor(pOVar2,param_2);
break;
case 0x12cd95:
break;
case 0x12cd97:
break;
case 0x12cd99:
break;
case 0x12cd9b:
break;
case 0x12cd9d:
break;
case 0x12cd9f:
break;
case 0x12cda1:
break;
case 0x12cda3:
break;
case 0x12cda5:
}
}
return 1;
}
|
|
57,917
|
SDL_GL_SetAttribute
|
SDL3Lite/source/SDL3/SDL_OpenGLContext.cpp
|
bool SDL_GL_SetAttribute(SDL_GLAttr attr, int value)
{
switch (attr)
{
case SDL_GL_RED_SIZE:
break;
case SDL_GL_GREEN_SIZE:
break;
case SDL_GL_BLUE_SIZE:
break;
case SDL_GL_ALPHA_SIZE:
break;
case SDL_GL_BUFFER_SIZE:
break;
case SDL_GL_DOUBLEBUFFER:
break;
case SDL_GL_DEPTH_SIZE:
break;
case SDL_GL_STENCIL_SIZE:
break;
case SDL_GL_ACCUM_RED_SIZE:
break;
case SDL_GL_ACCUM_GREEN_SIZE:
break;
case SDL_GL_ACCUM_BLUE_SIZE:
break;
case SDL_GL_ACCUM_ALPHA_SIZE:
break;
case SDL_GL_STEREO:
break;
case SDL_GL_MULTISAMPLEBUFFERS:
break;
case SDL_GL_MULTISAMPLESAMPLES:
break;
case SDL_GL_ACCELERATED_VISUAL:
break;
case SDL_GL_RETAINED_BACKING:
break;
case SDL_GL_CONTEXT_MAJOR_VERSION:
SDL::GetApplication().GetOpenGLAttributes().SetMajor(value);
break;
case SDL_GL_CONTEXT_MINOR_VERSION:
SDL::GetApplication().GetOpenGLAttributes().SetMinor(value);
break;
case SDL_GL_CONTEXT_FLAGS:
break;
case SDL_GL_CONTEXT_PROFILE_MASK:
break;
case SDL_GL_SHARE_WITH_CURRENT_CONTEXT:
break;
case SDL_GL_FRAMEBUFFER_SRGB_CAPABLE:
break;
case SDL_GL_CONTEXT_RELEASE_BEHAVIOR:
break;
case SDL_GL_CONTEXT_RESET_NOTIFICATION:
break;
case SDL_GL_CONTEXT_NO_ERROR:
break;
case SDL_GL_FLOATBUFFERS:
break;
case SDL_GL_EGL_PLATFORM:
break;
default:
break;
}
return true;
}
|
O3
|
cpp
|
SDL_GL_SetAttribute:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl %esi, 0x10(%rsp)
movl 0x14(%rsp), %eax
movq %rax, 0x8(%rsp)
subq $0x1b, %rax
ja 0x2cf3a
movq 0x8(%rsp), %rax
leaq 0xe0e1(%rip), %rcx # 0x3afa8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
callq 0x22140
movq %rax, %rdi
callq 0x22390
movq %rax, %rdi
movl 0x10(%rsp), %esi
callq 0x21c00
jmp 0x2cf3c
callq 0x22140
movq %rax, %rdi
callq 0x22390
movq %rax, %rdi
movl 0x10(%rsp), %esi
callq 0x21b30
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
jmp 0x2cf3c
movb $0x1, %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
|
SDL_GL_SetAttribute:
sub rsp, 18h
mov [rsp+18h+var_4], edi
mov [rsp+18h+var_8], esi
mov eax, [rsp+18h+var_4]
mov [rsp+18h+var_10], rax
sub rax, 1Bh; switch 28 cases
ja short def_2CECE; jumptable 000000000002CECE default case
mov rax, [rsp+18h+var_10]
lea rcx, jpt_2CECE
movsxd rax, ds:(jpt_2CECE - 3AFA8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_2CED0:
jmp short loc_2CF3C; jumptable 000000000002CECE case 0
loc_2CED2:
jmp short loc_2CF3C; jumptable 000000000002CECE case 1
loc_2CED4:
jmp short loc_2CF3C; jumptable 000000000002CECE case 2
loc_2CED6:
jmp short loc_2CF3C; jumptable 000000000002CECE case 3
loc_2CED8:
jmp short loc_2CF3C; jumptable 000000000002CECE case 4
loc_2CEDA:
jmp short loc_2CF3C; jumptable 000000000002CECE case 5
loc_2CEDC:
jmp short loc_2CF3C; jumptable 000000000002CECE case 6
loc_2CEDE:
jmp short loc_2CF3C; jumptable 000000000002CECE case 7
loc_2CEE0:
jmp short loc_2CF3C; jumptable 000000000002CECE case 8
loc_2CEE2:
jmp short loc_2CF3C; jumptable 000000000002CECE case 9
loc_2CEE4:
jmp short loc_2CF3C; jumptable 000000000002CECE case 10
loc_2CEE6:
jmp short loc_2CF3C; jumptable 000000000002CECE case 11
loc_2CEE8:
jmp short loc_2CF3C; jumptable 000000000002CECE case 12
loc_2CEEA:
jmp short loc_2CF3C; jumptable 000000000002CECE case 13
loc_2CEEC:
jmp short loc_2CF3C; jumptable 000000000002CECE case 14
loc_2CEEE:
jmp short loc_2CF3C; jumptable 000000000002CECE case 15
loc_2CEF0:
jmp short loc_2CF3C; jumptable 000000000002CECE case 16
loc_2CEF2:
call __ZN3SDL14GetApplicationEv; jumptable 000000000002CECE case 17
mov rdi, rax; this
call __ZN3SDL11Application19GetOpenGLAttributesEv; SDL::Application::GetOpenGLAttributes(void)
mov rdi, rax; this
mov esi, [rsp+18h+var_8]; int
call __ZN3SDL16OpenGLAttributes8SetMajorEi; SDL::OpenGLAttributes::SetMajor(int)
jmp short loc_2CF3C
loc_2CF0D:
call __ZN3SDL14GetApplicationEv; jumptable 000000000002CECE case 18
mov rdi, rax; this
call __ZN3SDL11Application19GetOpenGLAttributesEv; SDL::Application::GetOpenGLAttributes(void)
mov rdi, rax; this
mov esi, [rsp+18h+var_8]; int
call __ZN3SDL16OpenGLAttributes8SetMinorEi; SDL::OpenGLAttributes::SetMinor(int)
jmp short loc_2CF3C
loc_2CF28:
jmp short loc_2CF3C; jumptable 000000000002CECE case 19
loc_2CF2A:
jmp short loc_2CF3C; jumptable 000000000002CECE case 20
loc_2CF2C:
jmp short loc_2CF3C; jumptable 000000000002CECE case 21
loc_2CF2E:
jmp short loc_2CF3C; jumptable 000000000002CECE case 22
loc_2CF30:
jmp short loc_2CF3C; jumptable 000000000002CECE case 23
loc_2CF32:
jmp short loc_2CF3C; jumptable 000000000002CECE case 24
loc_2CF34:
jmp short loc_2CF3C; jumptable 000000000002CECE case 25
loc_2CF36:
jmp short loc_2CF3C; jumptable 000000000002CECE case 26
loc_2CF38:
jmp short loc_2CF3C; jumptable 000000000002CECE case 27
def_2CECE:
jmp short $+2; jumptable 000000000002CECE default case
loc_2CF3C:
mov al, 1
and al, 1
add rsp, 18h
retn
|
char SDL_GL_SetAttribute(SDL *a1, int a2)
{
SDL::Application *Application; // rax
SDL::OpenGLAttributes *OpenGLAttributes; // rax
SDL::Application *v4; // rax
SDL::OpenGLAttributes *v5; // rax
switch ( (int)a1 )
{
case 17:
Application = (SDL::Application *)SDL::GetApplication(a1);
OpenGLAttributes = (SDL::OpenGLAttributes *)SDL::Application::GetOpenGLAttributes(Application);
SDL::OpenGLAttributes::SetMajor(OpenGLAttributes, a2);
break;
case 18:
v4 = (SDL::Application *)SDL::GetApplication(a1);
v5 = (SDL::OpenGLAttributes *)SDL::Application::GetOpenGLAttributes(v4);
SDL::OpenGLAttributes::SetMinor(v5, a2);
break;
default:
return 1;
}
return 1;
}
|
SDL_GL_SetAttribute:
SUB RSP,0x18
MOV dword ptr [RSP + 0x14],EDI
MOV dword ptr [RSP + 0x10],ESI
MOV EAX,dword ptr [RSP + 0x14]
MOV qword ptr [RSP + 0x8],RAX
SUB RAX,0x1b
JA 0x0012cf3a
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[0x13afa8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_12ced0:
JMP 0x0012cf3c
caseD_12ced2:
JMP 0x0012cf3c
caseD_12ced4:
JMP 0x0012cf3c
caseD_12ced6:
JMP 0x0012cf3c
caseD_12ced8:
JMP 0x0012cf3c
caseD_12ceda:
JMP 0x0012cf3c
caseD_12cedc:
JMP 0x0012cf3c
caseD_12cede:
JMP 0x0012cf3c
caseD_12cee0:
JMP 0x0012cf3c
caseD_12cee2:
JMP 0x0012cf3c
caseD_12cee4:
JMP 0x0012cf3c
caseD_12cee6:
JMP 0x0012cf3c
caseD_12cee8:
JMP 0x0012cf3c
caseD_12ceea:
JMP 0x0012cf3c
caseD_12ceec:
JMP 0x0012cf3c
caseD_12ceee:
JMP 0x0012cf3c
caseD_12cef0:
JMP 0x0012cf3c
caseD_12cef2:
CALL 0x00122140
MOV RDI,RAX
CALL 0x00122390
MOV RDI,RAX
MOV ESI,dword ptr [RSP + 0x10]
CALL 0x00121c00
JMP 0x0012cf3c
caseD_12cf0d:
CALL 0x00122140
MOV RDI,RAX
CALL 0x00122390
MOV RDI,RAX
MOV ESI,dword ptr [RSP + 0x10]
CALL 0x00121b30
JMP 0x0012cf3c
caseD_12cf28:
JMP 0x0012cf3c
caseD_12cf2a:
JMP 0x0012cf3c
caseD_12cf2c:
JMP 0x0012cf3c
caseD_12cf2e:
JMP 0x0012cf3c
caseD_12cf30:
JMP 0x0012cf3c
caseD_12cf32:
JMP 0x0012cf3c
caseD_12cf34:
JMP 0x0012cf3c
caseD_12cf36:
JMP 0x0012cf3c
caseD_12cf38:
JMP 0x0012cf3c
LAB_0012cf3a:
JMP 0x0012cf3c
LAB_0012cf3c:
MOV AL,0x1
AND AL,0x1
ADD RSP,0x18
RET
|
int8 SDL_GL_SetAttribute(uint param_1,int param_2)
{
Application *pAVar1;
OpenGLAttributes *pOVar2;
if ((ulong)param_1 < 0x1c) {
switch((long)&switchD_0012cece::switchdataD_0013afa8 +
(long)(int)(&switchD_0012cece::switchdataD_0013afa8)[param_1]) {
case 0x12ced0:
break;
case 0x12ced2:
break;
case 0x12ced4:
break;
case 0x12ced6:
break;
case 0x12ced8:
break;
case 0x12ceda:
break;
case 0x12cedc:
break;
case 0x12cede:
break;
case 0x12cee0:
break;
case 0x12cee2:
break;
case 0x12cee4:
break;
case 0x12cee6:
break;
case 0x12cee8:
break;
case 0x12ceea:
break;
case 0x12ceec:
break;
case 0x12ceee:
break;
case 0x12cef0:
break;
case 0x12cef2:
pAVar1 = (Application *)SDL::GetApplication();
pOVar2 = (OpenGLAttributes *)SDL::Application::GetOpenGLAttributes(pAVar1);
SDL::OpenGLAttributes::SetMajor(pOVar2,param_2);
break;
case 0x12cf0d:
pAVar1 = (Application *)SDL::GetApplication();
pOVar2 = (OpenGLAttributes *)SDL::Application::GetOpenGLAttributes(pAVar1);
SDL::OpenGLAttributes::SetMinor(pOVar2,param_2);
break;
case 0x12cf28:
break;
case 0x12cf2a:
break;
case 0x12cf2c:
break;
case 0x12cf2e:
break;
case 0x12cf30:
break;
case 0x12cf32:
break;
case 0x12cf34:
break;
case 0x12cf36:
break;
case 0x12cf38:
}
}
return 1;
}
|
|
57,918
|
test_bug9992
|
eloqsql/libmariadb/unittest/libmariadb/result.c
|
static int test_bug9992(MYSQL *mysql)
{
MYSQL_RES* res ;
int rc;
/* Sic: SHOW DATABASE is incorrect syntax. */
rc= mysql_query(mysql, "SHOW TABLES; SHOW DATABASE; SELECT 1;");
check_mysql_rc(rc, mysql);
res= mysql_store_result(mysql);
FAIL_UNLESS(res, "Invalid resultset");
mysql_free_result(res);
rc= mysql_next_result(mysql);
FAIL_UNLESS(rc == 1, "Error expected"); /* Got errors, as expected */
return OK;
}
|
O0
|
c
|
test_bug9992:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x38125(%rip), %rsi # 0x5259c
callq 0x23d80
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1a4d1
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x27700
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x276d0
movl -0x2c(%rbp), %esi
movq -0x28(%rbp), %rdx
movl %eax, %ecx
leaq 0x36db8(%rip), %rdi # 0x51269
leaq 0x373dc(%rip), %r8 # 0x51894
movl $0x396, %r9d # imm = 0x396
movb $0x0, %al
callq 0x1af50
movl $0x1, -0x4(%rbp)
jmp 0x1a561
jmp 0x1a4d3
movq -0x10(%rbp), %rdi
callq 0x253d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1a511
leaq 0x36c36(%rip), %rdi # 0x51124
leaq 0x380cd(%rip), %rsi # 0x525c2
leaq 0x37398(%rip), %rdx # 0x51894
movl $0x399, %ecx # imm = 0x399
movb $0x0, %al
callq 0x1af50
movl $0x1, -0x4(%rbp)
jmp 0x1a561
jmp 0x1a513
movq -0x18(%rbp), %rdi
callq 0x1cc10
movq -0x10(%rbp), %rdi
callq 0x22dc0
movl %eax, -0x1c(%rbp)
cmpl $0x1, -0x1c(%rbp)
je 0x1a558
leaq 0x36bef(%rip), %rdi # 0x51124
leaq 0x37412(%rip), %rsi # 0x5194e
leaq 0x37351(%rip), %rdx # 0x51894
movl $0x39c, %ecx # imm = 0x39C
movb $0x0, %al
callq 0x1af50
movl $0x1, -0x4(%rbp)
jmp 0x1a561
jmp 0x1a55a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
test_bug9992:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
lea rsi, aShowTablesShow; "SHOW TABLES; SHOW DATABASE; SELECT 1;"
call mysql_query
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_1A4D1
mov eax, [rbp+var_1C]
mov [rbp+var_2C], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_2C]
mov rdx, [rbp+var_28]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 396h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_1A561
loc_1A4D1:
jmp short $+2
loc_1A4D3:
mov rdi, [rbp+var_10]
call mysql_store_result
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_1A511
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aInvalidResults; "Invalid resultset"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 399h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_1A561
loc_1A511:
jmp short $+2
loc_1A513:
mov rdi, [rbp+var_18]
call mysql_free_result
mov rdi, [rbp+var_10]
call mysql_next_result
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 1
jz short loc_1A558
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aErrorExpected; "Error expected"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 39Ch
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_1A561
loc_1A558:
jmp short $+2
loc_1A55A:
mov [rbp+var_4], 0
loc_1A561:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long test_bug9992(long long a1)
{
int v1; // eax
int v2; // r8d
int v3; // r9d
int v4; // r8d
int v5; // r9d
int v7; // [rsp+8h] [rbp-28h]
int v8; // [rsp+14h] [rbp-1Ch]
long long v9; // [rsp+18h] [rbp-18h]
v8 = mysql_query(a1, "SHOW TABLES; SHOW DATABASE; SELECT 1;");
if ( v8 )
{
v7 = mysql_error(a1);
v1 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v8,
v7,
v1,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c",
918);
return 1;
}
else
{
v9 = mysql_store_result(a1);
if ( v9 )
{
mysql_free_result(v9);
if ( (unsigned int)mysql_next_result(a1) == 1 )
{
return 0;
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Error expected",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c",
924,
v4,
v5);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Invalid resultset",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c",
921,
v2,
v3);
return 1;
}
}
}
|
test_bug9992:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x15259c]
CALL 0x00123d80
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x0011a4d1
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x2c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00127700
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001276d0
MOV ESI,dword ptr [RBP + -0x2c]
MOV RDX,qword ptr [RBP + -0x28]
MOV ECX,EAX
LEA RDI,[0x151269]
LEA R8,[0x151894]
MOV R9D,0x396
MOV AL,0x0
CALL 0x0011af50
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011a561
LAB_0011a4d1:
JMP 0x0011a4d3
LAB_0011a4d3:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001253d0
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x0011a511
LEA RDI,[0x151124]
LEA RSI,[0x1525c2]
LEA RDX,[0x151894]
MOV ECX,0x399
MOV AL,0x0
CALL 0x0011af50
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011a561
LAB_0011a511:
JMP 0x0011a513
LAB_0011a513:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0011cc10
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00122dc0
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x1
JZ 0x0011a558
LEA RDI,[0x151124]
LEA RSI,[0x15194e]
LEA RDX,[0x151894]
MOV ECX,0x39c
MOV AL,0x0
CALL 0x0011af50
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011a561
LAB_0011a558:
JMP 0x0011a55a
LAB_0011a55a:
MOV dword ptr [RBP + -0x4],0x0
LAB_0011a561:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 test_bug9992(int8 param_1)
{
int iVar1;
int4 uVar2;
int8 uVar3;
long lVar4;
int4 local_c;
iVar1 = mysql_query(param_1,"SHOW TABLES; SHOW DATABASE; SELECT 1;");
if (iVar1 == 0) {
lVar4 = mysql_store_result(param_1);
if (lVar4 == 0) {
diag("Error: %s (%s: %d)","Invalid resultset",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c",0x399)
;
local_c = 1;
}
else {
mysql_free_result(lVar4);
iVar1 = mysql_next_result(param_1);
if (iVar1 == 1) {
local_c = 0;
}
else {
diag("Error: %s (%s: %d)","Error expected",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c",
0x39c);
local_c = 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/result.c",0x396);
local_c = 1;
}
return local_c;
}
|
|
57,919
|
js_proxy_delete_property
|
bluesky950520[P]quickjs/quickjs.c
|
static int js_proxy_delete_property(JSContext *ctx, JSValue obj,
JSAtom atom)
{
JSProxyData *s;
JSValue method, ret, atom_val;
int res, res2, is_extensible;
JSValue args[2];
s = get_proxy_method(ctx, &method, obj, JS_ATOM_deleteProperty);
if (!s)
return -1;
if (JS_IsUndefined(method)) {
return JS_DeleteProperty(ctx, s->target, atom, 0);
}
atom_val = JS_AtomToValue(ctx, atom);;
if (JS_IsException(atom_val)) {
JS_FreeValue(ctx, method);
return -1;
}
args[0] = s->target;
args[1] = atom_val;
ret = JS_CallFree(ctx, method, s->handler, 2, args);
JS_FreeValue(ctx, atom_val);
if (JS_IsException(ret))
return -1;
res = JS_ToBoolFree(ctx, ret);
if (res) {
JSPropertyDescriptor desc;
res2 = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(s->target), atom);
if (res2 < 0)
return -1;
if (res2) {
if (!(desc.flags & JS_PROP_CONFIGURABLE))
goto fail;
is_extensible = JS_IsExtensible(ctx, s->target);
if (is_extensible < 0)
goto fail1;
if (!is_extensible) {
/* proxy-missing-checks */
fail:
JS_ThrowTypeError(ctx, "proxy: inconsistent deleteProperty");
fail1:
js_free_desc(ctx, &desc);
return -1;
}
js_free_desc(ctx, &desc);
}
}
return res;
}
|
O1
|
c
|
js_proxy_delete_property:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %ecx, %r15d
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x18(%rsp), %rsi
movl $0x65, %r8d
callq 0x4143c
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x52a02
movq %rax, %r14
movq 0x20(%rsp), %r12
cmpl $0x3, %r12d
jne 0x52923
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
movl %r15d, %ecx
xorl %r8d, %r8d
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2ad97
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x247b6
movq %rdx, %r13
cmpl $0x6, %r13d
jne 0x5294f
movq 0x18(%rsp), %rsi
movq 0x18(%rbx), %rdi
movq %r12, %rdx
callq 0x21922
jmp 0x52a02
movups (%r14), %xmm0
leaq 0x60(%rsp), %rdx
movaps %xmm0, (%rdx)
movq %rax, 0x10(%rdx)
movq %r13, 0x18(%rdx)
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rsi
movq 0x10(%r14), %rcx
movq 0x18(%r14), %r8
movq %rdx, (%rsp)
movq %rbx, %rdi
movq %r12, %rdx
movl $0x2, %r9d
callq 0x26cf9
movq %rax, 0x8(%rsp)
movq %rdx, %r12
movq 0x18(%rbx), %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
callq 0x21922
cmpl $0x6, %r12d
je 0x52a02
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rdx
callq 0x26d69
movl %eax, %ebp
testl %eax, %eax
je 0x52a02
movq (%r14), %rdx
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
movl %r15d, %ecx
callq 0x27c35
testl %eax, %eax
js 0x529fd
je 0x52a02
testb $0x1, 0x28(%rsp)
jne 0x52a16
leaq 0x5193b(%rip), %rsi # 0xa4321
movq %rbx, %rdi
xorl %eax, %eax
callq 0x265c3
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x4191f
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x137d2
testw %ax, %ax
je 0x529f0
movzwl %ax, %eax
cmpl $0x1, %eax
je 0x529df
jmp 0x52a02
|
js_proxy_delete_property:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r15d, ecx
mov rcx, rdx
mov rdx, rsi
mov rbx, rdi
lea rsi, [rsp+0B8h+var_A0]
mov r8d, 65h ; 'e'
call get_proxy_method
mov ebp, 0FFFFFFFFh
test rax, rax
jz loc_52A02
mov r14, rax
mov r12, [rsp+0B8h+var_98]
cmp r12d, 3
jnz short loc_52923
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, rbx
mov ecx, r15d
xor r8d, r8d
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_DeleteProperty
loc_52923:
mov rdi, rbx
mov esi, r15d
xor edx, edx
call __JS_AtomToValue
mov r13, rdx
cmp r13d, 6
jnz short loc_5294F
mov rsi, [rsp+0B8h+var_A0]
mov rdi, [rbx+18h]
mov rdx, r12
call JS_FreeValueRT
jmp loc_52A02
loc_5294F:
movups xmm0, xmmword ptr [r14]
lea rdx, [rsp+0B8h+var_58]
movaps xmmword ptr [rdx], xmm0
mov [rdx+10h], rax
mov [rdx+18h], r13
mov [rsp+0B8h+var_A8], rax
mov rsi, [rsp+0B8h+var_A0]
mov rcx, [r14+10h]
mov r8, [r14+18h]
mov [rsp+0B8h+var_B8], rdx
mov rdi, rbx
mov rdx, r12
mov r9d, 2
call JS_CallFree
mov [rsp+0B8h+var_B0], rax
mov r12, rdx
mov rdi, [rbx+18h]
mov rsi, [rsp+0B8h+var_A8]
mov rdx, r13
call JS_FreeValueRT
cmp r12d, 6
jz short loc_52A02
mov rdi, rbx
mov rsi, [rsp+0B8h+var_B0]
mov rdx, r12
call JS_ToBoolFree
mov ebp, eax
test eax, eax
jz short loc_52A02
mov rdx, [r14]
lea rsi, [rsp+0B8h+var_90]
mov rdi, rbx
mov ecx, r15d
call JS_GetOwnPropertyInternal
test eax, eax
js short loc_529FD
jz short loc_52A02
test [rsp+0B8h+var_90], 1
jnz short loc_52A16
loc_529DF:
lea rsi, aProxyInconsist_3; "proxy: inconsistent deleteProperty"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
loc_529F0:
lea rsi, [rsp+0B8h+var_90]
mov rdi, rbx
call js_free_desc
loc_529FD:
mov ebp, 0FFFFFFFFh
loc_52A02:
mov eax, ebp
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_52A16:
lea rdx, [rsp+0B8h+var_90]
mov rdi, r14
mov rsi, rbx
call js_proxy_delete_property_cold_1
test ax, ax
jz short loc_529F0
movzx eax, ax
cmp eax, 1
jz short loc_529DF
jmp short loc_52A02
|
long long js_proxy_delete_property(
long long a1,
long long a2,
long long a3,
unsigned int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
long long a13,
long long a14)
{
long long *proxy_method; // rax
double v16; // xmm4_8
double v17; // xmm5_8
unsigned int v18; // ebp
long long *v19; // r14
long long v20; // r12
long long v22; // rax
long long v23; // rdx
long long v24; // r13
__m128 v25; // xmm0
long long v26; // rdx
long long v27; // r12
int OwnPropertyInternal; // eax
long long v29; // rdx
long long v30; // rcx
long long v31; // r8
long long v32; // r9
__m128 v33; // xmm4
__m128 v34; // xmm5
__int16 v35; // ax
char v36; // [rsp+0h] [rbp-B8h]
long long v37; // [rsp+8h] [rbp-B0h]
_DWORD *v38; // [rsp+10h] [rbp-A8h]
_DWORD *v39; // [rsp+18h] [rbp-A0h] BYREF
long long v40; // [rsp+20h] [rbp-98h]
_BYTE v41[56]; // [rsp+28h] [rbp-90h] BYREF
__m128 v42; // [rsp+60h] [rbp-58h] BYREF
long long v43; // [rsp+70h] [rbp-48h]
long long v44; // [rsp+78h] [rbp-40h]
proxy_method = (long long *)get_proxy_method(
a1,
(unsigned long long *)&v39,
a2,
a3,
101LL,
a14,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12);
v18 = -1;
if ( !proxy_method )
return v18;
v19 = proxy_method;
v20 = v40;
if ( (_DWORD)v40 == 3 )
return JS_DeleteProperty(a1, *proxy_method, proxy_method[1], a4, 0, a5, a6, a7, a8, v16, v17, a11, a12);
v22 = _JS_AtomToValue(a1, a4, 0);
v24 = v23;
if ( (_DWORD)v23 != 6 )
{
v25 = *(__m128 *)v19;
v42 = *(__m128 *)v19;
v43 = v22;
v44 = v23;
v38 = (_DWORD *)v22;
v37 = JS_CallFree(a1, v39, v20, v19[2], v19[3], 2, (long long)&v42);
v27 = v26;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v38, v24);
if ( (_DWORD)v27 == 6 )
return v18;
v18 = JS_ToBoolFree(a1, v37, v27);
if ( !v18 )
return v18;
OwnPropertyInternal = JS_GetOwnPropertyInternal(a1, (long long)v41, *v19, a4);
if ( OwnPropertyInternal < 0 )
return (unsigned int)-1;
if ( !OwnPropertyInternal )
return v18;
if ( (v41[0] & 1) != 0 )
{
v35 = js_proxy_delete_property_cold_1(v19, a1);
if ( !v35 )
goto LABEL_12;
if ( v35 != 1 )
return v18;
}
JS_ThrowTypeError(
a1,
(long long)"proxy: inconsistent deleteProperty",
v29,
v30,
v31,
v32,
v25,
a6,
a7,
a8,
v33,
v34,
a11,
a12,
v36);
LABEL_12:
js_free_desc(a1, (long long)v41);
return (unsigned int)-1;
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v39, v20);
return v18;
}
|
js_proxy_delete_property:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R15D,ECX
MOV RCX,RDX
MOV RDX,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x18]
MOV R8D,0x65
CALL 0x0014143c
MOV EBP,0xffffffff
TEST RAX,RAX
JZ 0x00152a02
MOV R14,RAX
MOV R12,qword ptr [RSP + 0x20]
CMP R12D,0x3
JNZ 0x00152923
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV ECX,R15D
XOR R8D,R8D
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0012ad97
LAB_00152923:
MOV RDI,RBX
MOV ESI,R15D
XOR EDX,EDX
CALL 0x001247b6
MOV R13,RDX
CMP R13D,0x6
JNZ 0x0015294f
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,R12
CALL 0x00121922
JMP 0x00152a02
LAB_0015294f:
MOVUPS XMM0,xmmword ptr [R14]
LEA RDX,[RSP + 0x60]
MOVAPS xmmword ptr [RDX],XMM0
MOV qword ptr [RDX + 0x10],RAX
MOV qword ptr [RDX + 0x18],R13
MOV qword ptr [RSP + 0x10],RAX
MOV RSI,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [R14 + 0x10]
MOV R8,qword ptr [R14 + 0x18]
MOV qword ptr [RSP],RDX
MOV RDI,RBX
MOV RDX,R12
MOV R9D,0x2
CALL 0x00126cf9
MOV qword ptr [RSP + 0x8],RAX
MOV R12,RDX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,R13
CALL 0x00121922
CMP R12D,0x6
JZ 0x00152a02
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R12
CALL 0x00126d69
MOV EBP,EAX
TEST EAX,EAX
JZ 0x00152a02
MOV RDX,qword ptr [R14]
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
MOV ECX,R15D
CALL 0x00127c35
TEST EAX,EAX
JS 0x001529fd
JZ 0x00152a02
TEST byte ptr [RSP + 0x28],0x1
JNZ 0x00152a16
LAB_001529df:
LEA RSI,[0x1a4321]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x001265c3
LAB_001529f0:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0014191f
LAB_001529fd:
MOV EBP,0xffffffff
LAB_00152a02:
MOV EAX,EBP
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00152a16:
LEA RDX,[RSP + 0x28]
MOV RDI,R14
MOV RSI,RBX
CALL 0x001137d2
TEST AX,AX
JZ 0x001529f0
MOVZX EAX,AX
CMP EAX,0x1
JZ 0x001529df
JMP 0x00152a02
|
ulong js_proxy_delete_property
(long param_1,int8 param_2,int8 param_3,int4 param_4)
{
short sVar1;
uint uVar2;
int iVar3;
int8 *puVar4;
ulong uVar5;
int8 uVar6;
int8 uVar7;
int1 auVar8 [16];
int8 local_a0;
int8 local_98;
byte local_90 [56];
int4 local_58;
int4 uStack_54;
int4 uStack_50;
int4 uStack_4c;
int1 local_48 [16];
puVar4 = (int8 *)get_proxy_method(param_1,&local_a0,param_2,param_3,0x65);
if (puVar4 == (int8 *)0x0) {
return 0xffffffff;
}
if ((int)local_98 == 3) {
uVar5 = JS_DeleteProperty(param_1,*puVar4,puVar4[1],param_4,0);
return uVar5;
}
local_48 = __JS_AtomToValue(param_1,param_4,0);
uVar7 = local_48._8_8_;
uVar6 = local_48._0_8_;
if (local_48._8_4_ == 6) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_a0,local_98);
return 0xffffffff;
}
local_58 = *(int4 *)puVar4;
uStack_54 = *(int4 *)((long)puVar4 + 4);
uStack_50 = *(int4 *)(puVar4 + 1);
uStack_4c = *(int4 *)((long)puVar4 + 0xc);
auVar8 = JS_CallFree(param_1,local_a0,local_98,puVar4[2],puVar4[3],2,&local_58);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar6,uVar7);
if (auVar8._8_4_ == 6) {
return 0xffffffff;
}
uVar2 = JS_ToBoolFree(param_1,auVar8._0_8_,auVar8._8_8_);
uVar5 = (ulong)uVar2;
if (uVar2 == 0) {
return uVar5;
}
iVar3 = JS_GetOwnPropertyInternal(param_1,local_90,*puVar4,param_4);
if (iVar3 < 0) {
return 0xffffffff;
}
if (iVar3 == 0) {
return uVar5;
}
if ((local_90[0] & 1) != 0) {
sVar1 = js_proxy_delete_property_cold_1(puVar4,param_1,local_90);
if (sVar1 == 0) goto LAB_001529f0;
if (sVar1 != 1) {
return uVar5;
}
}
JS_ThrowTypeError(param_1,"proxy: inconsistent deleteProperty");
LAB_001529f0:
js_free_desc(param_1,local_90);
return 0xffffffff;
}
|
|
57,920
|
js_proxy_delete_property
|
bluesky950520[P]quickjs/quickjs.c
|
static int js_proxy_delete_property(JSContext *ctx, JSValue obj,
JSAtom atom)
{
JSProxyData *s;
JSValue method, ret, atom_val;
int res, res2, is_extensible;
JSValue args[2];
s = get_proxy_method(ctx, &method, obj, JS_ATOM_deleteProperty);
if (!s)
return -1;
if (JS_IsUndefined(method)) {
return JS_DeleteProperty(ctx, s->target, atom, 0);
}
atom_val = JS_AtomToValue(ctx, atom);;
if (JS_IsException(atom_val)) {
JS_FreeValue(ctx, method);
return -1;
}
args[0] = s->target;
args[1] = atom_val;
ret = JS_CallFree(ctx, method, s->handler, 2, args);
JS_FreeValue(ctx, atom_val);
if (JS_IsException(ret))
return -1;
res = JS_ToBoolFree(ctx, ret);
if (res) {
JSPropertyDescriptor desc;
res2 = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(s->target), atom);
if (res2 < 0)
return -1;
if (res2) {
if (!(desc.flags & JS_PROP_CONFIGURABLE))
goto fail;
is_extensible = JS_IsExtensible(ctx, s->target);
if (is_extensible < 0)
goto fail1;
if (!is_extensible) {
/* proxy-missing-checks */
fail:
JS_ThrowTypeError(ctx, "proxy: inconsistent deleteProperty");
fail1:
js_free_desc(ctx, &desc);
return -1;
}
js_free_desc(ctx, &desc);
}
}
return res;
}
|
O2
|
c
|
js_proxy_delete_property:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %ecx, %ebp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %r14
leaq 0x18(%rsp), %rsi
pushq $0x65
popq %r8
callq 0x398b1
movq %rax, %r15
pushq $-0x1
popq %rax
testq %r15, %r15
je 0x4726c
movq 0x20(%rsp), %r12
cmpl $0x3, %r12d
jne 0x471f2
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
movl %ebp, %ecx
xorl %r8d, %r8d
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x246a7
movq %r14, %rdi
movl %ebp, %esi
callq 0x1e4ce
movq %rdx, %rbx
cmpl $0x6, %ebx
jne 0x47216
movq 0x18(%rsp), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x1bbce
jmp 0x47269
movq %rax, %r13
movups (%r15), %xmm0
leaq 0x60(%rsp), %rax
movaps %xmm0, (%rax)
movq %r13, 0x10(%rax)
movq %rbx, 0x18(%rax)
movq 0x18(%rsp), %rsi
movq 0x10(%r15), %rcx
movq 0x18(%r15), %r8
movq %rax, (%rsp)
pushq $0x2
popq %r9
movq %r14, %rdi
movq %r12, %rdx
callq 0x2093e
movq %rax, 0x10(%rsp)
movq %rdx, %r12
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1bbce
cmpl $0x6, %r12d
jne 0x4727e
pushq $-0x1
popq %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x209aa
testl %eax, %eax
je 0x472c7
movl %eax, %r12d
movq (%r15), %rdx
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
movl %ebp, %ecx
callq 0x21730
testl %eax, %eax
js 0x47269
je 0x472ed
testb $0x1, 0x28(%rsp)
jne 0x472cb
leaq 0x42fa0(%rip), %rsi # 0x8a25b
movq %r14, %rdi
xorl %eax, %eax
callq 0x201fd
jmp 0x472f5
xorl %eax, %eax
jmp 0x4726c
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x219ba
testl %eax, %eax
js 0x472f5
je 0x472b4
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x39c9d
movl %r12d, %eax
jmp 0x4726c
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x39c9d
jmp 0x47269
|
js_proxy_delete_property:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov ebp, ecx
mov rcx, rdx
mov rdx, rsi
mov r14, rdi
lea rsi, [rsp+0B8h+var_A0]
push 65h ; 'e'
pop r8
call get_proxy_method
mov r15, rax
push 0FFFFFFFFFFFFFFFFh
pop rax
test r15, r15
jz loc_4726C
mov r12, [rsp+0B8h+var_98]
cmp r12d, 3
jnz short loc_471F2
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, r14
mov ecx, ebp
xor r8d, r8d
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_DeleteProperty
loc_471F2:
mov rdi, r14
mov esi, ebp
call JS_AtomToValue
mov rbx, rdx
cmp ebx, 6
jnz short loc_47216
mov rsi, [rsp+0B8h+var_A0]
mov rdi, r14
mov rdx, r12
call JS_FreeValue
jmp short loc_47269
loc_47216:
mov r13, rax
movups xmm0, xmmword ptr [r15]
lea rax, [rsp+0B8h+var_58]
movaps xmmword ptr [rax], xmm0
mov [rax+10h], r13
mov [rax+18h], rbx
mov rsi, [rsp+0B8h+var_A0]
mov rcx, [r15+10h]
mov r8, [r15+18h]
mov [rsp+0B8h+var_B8], rax
push 2
pop r9
mov rdi, r14
mov rdx, r12
call JS_CallFree
mov [rsp+0B8h+var_A8], rax
mov r12, rdx
mov rdi, r14
mov rsi, r13
mov rdx, rbx
call JS_FreeValue
cmp r12d, 6
jnz short loc_4727E
loc_47269:
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_4726C:
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4727E:
mov rdi, r14
mov rsi, [rsp+0B8h+var_A8]
mov rdx, r12
call JS_ToBoolFree
test eax, eax
jz short loc_472C7
mov r12d, eax
mov rdx, [r15]
lea rsi, [rsp+0B8h+var_90]
mov rdi, r14
mov ecx, ebp
call JS_GetOwnPropertyInternal
test eax, eax
js short loc_47269
jz short loc_472ED
test [rsp+0B8h+var_90], 1
jnz short loc_472CB
loc_472B4:
lea rsi, aProxyInconsist_3; "proxy: inconsistent deleteProperty"
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp short loc_472F5
loc_472C7:
xor eax, eax
jmp short loc_4726C
loc_472CB:
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, r14
call JS_IsExtensible
test eax, eax
js short loc_472F5
jz short loc_472B4
lea rsi, [rsp+0B8h+var_90]
mov rdi, r14
call js_free_desc
loc_472ED:
mov eax, r12d
jmp loc_4726C
loc_472F5:
lea rsi, [rsp+0B8h+var_90]
mov rdi, r14
call js_free_desc
jmp loc_47269
|
long long js_proxy_delete_property(
long long a1,
long long a2,
int a3,
unsigned int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long *proxy_method; // r15
double v14; // xmm4_8
double v15; // xmm5_8
long long result; // rax
long long v17; // r12
long long v18; // rax
long long v19; // rdx
long long v20; // rbx
long long v21; // r13
__m128 v22; // xmm0
long long v23; // rdx
long long v24; // r12
unsigned int v25; // eax
unsigned int *v26; // r8
unsigned int v27; // r12d
int v28; // eax
long long v29; // rdx
long long v30; // rcx
long long v31; // r8
long long v32; // r9
__m128 v33; // xmm4
__m128 v34; // xmm5
int IsExtensible; // eax
char v36; // [rsp+0h] [rbp-B8h]
long long v37; // [rsp+10h] [rbp-A8h]
long long v38; // [rsp+18h] [rbp-A0h] BYREF
long long v39; // [rsp+20h] [rbp-98h]
long long v40[7]; // [rsp+28h] [rbp-90h] BYREF
__m128 v41; // [rsp+60h] [rbp-58h] BYREF
long long v42; // [rsp+70h] [rbp-48h]
long long v43; // [rsp+78h] [rbp-40h]
proxy_method = (long long *)get_proxy_method(a1, (unsigned long long *)&v38, a2, a3, 101);
result = -1LL;
if ( proxy_method )
{
v17 = v39;
if ( (_DWORD)v39 == 3 )
return JS_DeleteProperty(a1, a5, a6, a7, a8, v14, v15, a11, a12, *proxy_method, proxy_method[1], a4, 0);
v18 = JS_AtomToValue(a1, a4);
v20 = v19;
if ( (_DWORD)v19 == 6 )
{
JS_FreeValue(a1, v38, v17);
return -1LL;
}
v21 = v18;
v22 = *(__m128 *)proxy_method;
v41 = *(__m128 *)proxy_method;
v42 = v18;
v43 = v19;
v37 = JS_CallFree(a1, v38, v17, proxy_method[2], proxy_method[3], 2, (long long)&v41);
v24 = v23;
JS_FreeValue(a1, v21, v20);
if ( (_DWORD)v24 == 6 )
return -1LL;
v25 = JS_ToBoolFree(a1, v37, v24);
if ( !v25 )
return 0LL;
v27 = v25;
LOBYTE(v28) = JS_GetOwnPropertyInternal(a1, (long long)v40, *proxy_method, a4, v26);
if ( v28 < 0 )
return -1LL;
if ( v28 )
{
if ( (v40[0] & 1) == 0 )
goto LABEL_13;
IsExtensible = JS_IsExtensible(
a1,
*proxy_method,
proxy_method[1],
v22,
a6,
a7,
a8,
*(double *)v33.m128_u64,
*(double *)v34.m128_u64,
a11,
a12);
if ( IsExtensible < 0 )
goto LABEL_19;
if ( !IsExtensible )
{
LABEL_13:
JS_ThrowTypeError(
a1,
(long long)"proxy: inconsistent deleteProperty",
v29,
v30,
v31,
v32,
v22,
a6,
a7,
a8,
v33,
v34,
a11,
a12,
v36);
LABEL_19:
js_free_desc(a1, v40);
return -1LL;
}
js_free_desc(a1, v40);
}
return v27;
}
return result;
}
|
js_proxy_delete_property:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV EBP,ECX
MOV RCX,RDX
MOV RDX,RSI
MOV R14,RDI
LEA RSI,[RSP + 0x18]
PUSH 0x65
POP R8
CALL 0x001398b1
MOV R15,RAX
PUSH -0x1
POP RAX
TEST R15,R15
JZ 0x0014726c
MOV R12,qword ptr [RSP + 0x20]
CMP R12D,0x3
JNZ 0x001471f2
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,R14
MOV ECX,EBP
XOR R8D,R8D
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001246a7
LAB_001471f2:
MOV RDI,R14
MOV ESI,EBP
CALL 0x0011e4ce
MOV RBX,RDX
CMP EBX,0x6
JNZ 0x00147216
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,R14
MOV RDX,R12
CALL 0x0011bbce
JMP 0x00147269
LAB_00147216:
MOV R13,RAX
MOVUPS XMM0,xmmword ptr [R15]
LEA RAX,[RSP + 0x60]
MOVAPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],R13
MOV qword ptr [RAX + 0x18],RBX
MOV RSI,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [R15 + 0x10]
MOV R8,qword ptr [R15 + 0x18]
MOV qword ptr [RSP],RAX
PUSH 0x2
POP R9
MOV RDI,R14
MOV RDX,R12
CALL 0x0012093e
MOV qword ptr [RSP + 0x10],RAX
MOV R12,RDX
MOV RDI,R14
MOV RSI,R13
MOV RDX,RBX
CALL 0x0011bbce
CMP R12D,0x6
JNZ 0x0014727e
LAB_00147269:
PUSH -0x1
POP RAX
LAB_0014726c:
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014727e:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,R12
CALL 0x001209aa
TEST EAX,EAX
JZ 0x001472c7
MOV R12D,EAX
MOV RDX,qword ptr [R15]
LEA RSI,[RSP + 0x28]
MOV RDI,R14
MOV ECX,EBP
CALL 0x00121730
TEST EAX,EAX
JS 0x00147269
JZ 0x001472ed
TEST byte ptr [RSP + 0x28],0x1
JNZ 0x001472cb
LAB_001472b4:
LEA RSI,[0x18a25b]
MOV RDI,R14
XOR EAX,EAX
CALL 0x001201fd
JMP 0x001472f5
LAB_001472c7:
XOR EAX,EAX
JMP 0x0014726c
LAB_001472cb:
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,R14
CALL 0x001219ba
TEST EAX,EAX
JS 0x001472f5
JZ 0x001472b4
LEA RSI,[RSP + 0x28]
MOV RDI,R14
CALL 0x00139c9d
LAB_001472ed:
MOV EAX,R12D
JMP 0x0014726c
LAB_001472f5:
LEA RSI,[RSP + 0x28]
MOV RDI,R14
CALL 0x00139c9d
JMP 0x00147269
|
ulong js_proxy_delete_property
(int8 param_1,int8 param_2,int8 param_3,int4 param_4)
{
uint uVar1;
int iVar2;
int8 *puVar3;
ulong uVar4;
int8 uVar5;
int8 uVar6;
int1 auVar7 [16];
int8 local_a0;
int8 local_98;
byte local_90 [56];
int4 local_58;
int4 uStack_54;
int4 uStack_50;
int4 uStack_4c;
int1 local_48 [16];
puVar3 = (int8 *)get_proxy_method(param_1,&local_a0,param_2,param_3,0x65);
if (puVar3 == (int8 *)0x0) {
return 0xffffffffffffffff;
}
if ((int)local_98 == 3) {
uVar4 = JS_DeleteProperty(param_1,*puVar3,puVar3[1],param_4,0);
return uVar4;
}
local_48 = JS_AtomToValue(param_1,param_4);
uVar6 = local_48._8_8_;
uVar5 = local_48._0_8_;
if (local_48._8_4_ == 6) {
JS_FreeValue(param_1,local_a0,local_98);
return 0xffffffffffffffff;
}
local_58 = *(int4 *)puVar3;
uStack_54 = *(int4 *)((long)puVar3 + 4);
uStack_50 = *(int4 *)(puVar3 + 1);
uStack_4c = *(int4 *)((long)puVar3 + 0xc);
auVar7 = JS_CallFree(param_1,local_a0,local_98,puVar3[2],puVar3[3],2,&local_58);
JS_FreeValue(param_1,uVar5,uVar6);
if (auVar7._8_4_ == 6) {
return 0xffffffffffffffff;
}
uVar1 = JS_ToBoolFree(param_1,auVar7._0_8_,auVar7._8_8_);
if (uVar1 == 0) {
return 0;
}
iVar2 = JS_GetOwnPropertyInternal(param_1,local_90,*puVar3,param_4);
if (iVar2 < 0) {
return 0xffffffffffffffff;
}
if (iVar2 == 0) {
return (ulong)uVar1;
}
if ((local_90[0] & 1) != 0) {
iVar2 = JS_IsExtensible(param_1,*puVar3,puVar3[1]);
if (iVar2 < 0) goto LAB_001472f5;
if (iVar2 != 0) {
js_free_desc(param_1,local_90);
return (ulong)uVar1;
}
}
JS_ThrowTypeError(param_1,"proxy: inconsistent deleteProperty");
LAB_001472f5:
js_free_desc(param_1,local_90);
return 0xffffffffffffffff;
}
|
|
57,921
|
ma_real_read
|
eloqsql/libmariadb/libmariadb/ma_net.c
|
static ulong ma_real_read(NET *net, size_t *complen)
{
uchar *pos;
ssize_t length;
uint i;
ulong len=packet_error;
size_t remain= (net->compress ? NET_HEADER_SIZE+COMP_HEADER_SIZE :
NET_HEADER_SIZE);
*complen = 0;
net->reading_or_writing=1;
pos = net->buff + net->where_b; /* net->packet -4 */
for (i=0 ; i < 2 ; i++)
{
while (remain > 0)
{
/* First read is done with non blocking mode */
if ((length=ma_pvio_cache_read(net->pvio, pos,remain)) <= 0L)
{
len= packet_error;
net->error=2; /* Close socket */
goto end;
}
remain -= (ulong) length;
pos+= (ulong) length;
}
if (i == 0)
{ /* First parts is packet length */
ulong helping;
net->pkt_nr= net->buff[net->where_b + 3];
net->compress_pkt_nr= ++net->pkt_nr;
#ifdef HAVE_COMPRESS
if (net->compress)
{
/* complen is > 0 if package is really compressed */
*complen=uint3korr(&(net->buff[net->where_b + NET_HEADER_SIZE]));
}
#endif
len=uint3korr(net->buff+net->where_b);
if (!len)
goto end;
helping = max(len,(ulong)*complen) + net->where_b;
/* The necessary size of net->buff */
if (helping >= net->max_packet)
{
if (net_realloc(net, helping))
{
len= packet_error; /* Return error */
goto end;
}
}
pos=net->buff + net->where_b;
remain = len;
}
}
end:
net->reading_or_writing=0;
return(len);
}
|
O3
|
c
|
ma_real_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpb $0x0, 0x84(%rdi)
setne %al
leaq (%rax,%rax,2), %r15
addq $0x4, %r15
movq %rsi, -0x30(%rbp)
movq $0x0, (%rsi)
movb $0x1, 0x80(%rdi)
movq 0x8(%rdi), %r12
addq 0x48(%rdi), %r12
movb $0x1, %r14b
movq (%rbx), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x20131
testq %rax, %rax
jle 0x3481b
addq %rax, %r12
subq %rax, %r15
jne 0x34736
testb $0x1, %r14b
je 0x34828
movq 0x8(%rbx), %rax
movq 0x48(%rbx), %r12
movzbl 0x3(%rax,%r12), %ecx
incl %ecx
movl %ecx, 0x60(%rbx)
movl %ecx, 0x64(%rbx)
cmpb $0x0, 0x84(%rbx)
je 0x3479f
movzwl 0x4(%rax,%r12), %ecx
movzbl 0x6(%rax,%r12), %eax
shll $0x10, %eax
orq %rcx, %rax
movq -0x30(%rbp), %rcx
movq %rax, (%rcx)
movq 0x8(%rbx), %rax
movq 0x48(%rbx), %r12
movzwl (%rax,%r12), %ecx
movzbl 0x2(%rax,%r12), %r15d
shll $0x10, %r15d
orq %rcx, %r15
je 0x34841
movq -0x30(%rbp), %rcx
movq (%rcx), %r14
cmpq %r14, %r15
cmovaq %r15, %r14
addq %r12, %r14
cmpq 0x50(%rbx), %r14
jb 0x3480d
cmpq %r14, 0x58(%rbx)
jbe 0x34846
addq $0xfff, %r14 # imm = 0xFFF
andq $-0x1000, %r14 # imm = 0xF000
leaq 0x7(%r14), %rsi
movq %rax, %rdi
callq 0x13740
testq %rax, %rax
je 0x3486d
movq %rax, 0x18(%rbx)
movq %rax, 0x8(%rbx)
movq %r14, 0x50(%rbx)
movq %rax, %rcx
addq %r14, %rcx
movq %rcx, 0x10(%rbx)
movq 0x48(%rbx), %r12
addq %rax, %r12
xorl %r14d, %r14d
movq %r15, %r13
jmp 0x34736
movb $0x2, 0x94(%rbx)
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
movb $0x0, 0x80(%rbx)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
jmp 0x34828
movb $0x1, 0x94(%rbx)
movq (%rbx), %r8
movq 0x40(%r8), %rdi
leaq 0x19525(%rip), %rax # 0x4dd80
movq (%rax), %rdx
movl $0x7e4, %esi # imm = 0x7E4
xorl %ecx, %ecx
xorl %eax, %eax
callq *0x50(%r8)
jmp 0x34822
movb $0x1, 0x94(%rbx)
jmp 0x34822
|
ma_real_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov r13d, 0FFFFFFFFh
xor eax, eax
cmp byte ptr [rdi+84h], 0
setnz al
lea r15, [rax+rax*2]
add r15, 4
mov [rbp+var_30], rsi
mov qword ptr [rsi], 0
mov byte ptr [rdi+80h], 1
mov r12, [rdi+8]
add r12, [rdi+48h]
mov r14b, 1
loc_34736:
mov rdi, [rbx]
mov rsi, r12
mov rdx, r15
call ma_pvio_cache_read
test rax, rax
jle loc_3481B
add r12, rax
sub r15, rax
jnz short loc_34736
test r14b, 1
jz loc_34828
mov rax, [rbx+8]
mov r12, [rbx+48h]
movzx ecx, byte ptr [rax+r12+3]
inc ecx
mov [rbx+60h], ecx
mov [rbx+64h], ecx
cmp byte ptr [rbx+84h], 0
jz short loc_3479F
movzx ecx, word ptr [rax+r12+4]
movzx eax, byte ptr [rax+r12+6]
shl eax, 10h
or rax, rcx
mov rcx, [rbp+var_30]
mov [rcx], rax
mov rax, [rbx+8]
mov r12, [rbx+48h]
loc_3479F:
movzx ecx, word ptr [rax+r12]
movzx r15d, byte ptr [rax+r12+2]
shl r15d, 10h
or r15, rcx
jz loc_34841
mov rcx, [rbp+var_30]
mov r14, [rcx]
cmp r15, r14
cmova r14, r15
add r14, r12
cmp r14, [rbx+50h]
jb short loc_3480D
cmp [rbx+58h], r14
jbe short loc_34846
add r14, 0FFFh
and r14, 0FFFFFFFFFFFFF000h
lea rsi, [r14+7]
mov rdi, rax
call _realloc
test rax, rax
jz short loc_3486D
mov [rbx+18h], rax
mov [rbx+8], rax
mov [rbx+50h], r14
mov rcx, rax
add rcx, r14
mov [rbx+10h], rcx
mov r12, [rbx+48h]
loc_3480D:
add r12, rax
xor r14d, r14d
mov r13, r15
jmp loc_34736
loc_3481B:
mov byte ptr [rbx+94h], 2
loc_34822:
mov r13d, 0FFFFFFFFh
loc_34828:
mov byte ptr [rbx+80h], 0
mov rax, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_34841:
xor r13d, r13d
jmp short loc_34828
loc_34846:
mov byte ptr [rbx+94h], 1
mov r8, [rbx]
mov rdi, [r8+40h]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7E4h
xor ecx, ecx
xor eax, eax
call qword ptr [r8+50h]
jmp short loc_34822
loc_3486D:
mov byte ptr [rbx+94h], 1
jmp short loc_34822
|
long long ma_real_read(long long a1, unsigned long long *a2)
{
long long v2; // r13
unsigned long long v3; // r15
long long v4; // r12
char i; // r14
long long v6; // rax
long long v7; // rax
long long v8; // r12
int v9; // ecx
unsigned long long v10; // r14
unsigned long long v11; // r14
unsigned long long v12; // r14
v2 = 0xFFFFFFFFLL;
v3 = 3LL * (*(_BYTE *)(a1 + 132) != 0) + 4;
*a2 = 0LL;
*(_BYTE *)(a1 + 128) = 1;
v4 = *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8);
for ( i = 1; ; i = 0 )
{
do
{
v6 = ma_pvio_cache_read(*(_QWORD **)a1, v4, v3);
if ( v6 <= 0 )
{
*(_BYTE *)(a1 + 148) = 2;
goto LABEL_16;
}
v4 += v6;
v3 -= v6;
}
while ( v3 );
if ( (i & 1) == 0 )
goto LABEL_17;
v7 = *(_QWORD *)(a1 + 8);
v8 = *(_QWORD *)(a1 + 72);
v9 = *(unsigned __int8 *)(v7 + v8 + 3) + 1;
*(_DWORD *)(a1 + 96) = v9;
*(_DWORD *)(a1 + 100) = v9;
if ( *(_BYTE *)(a1 + 132) )
{
*a2 = *(unsigned __int16 *)(v7 + v8 + 4) | (unsigned long long)(*(unsigned __int8 *)(v7 + v8 + 6) << 16);
v7 = *(_QWORD *)(a1 + 8);
v8 = *(_QWORD *)(a1 + 72);
}
v3 = *(unsigned __int16 *)(v7 + v8) | (unsigned long long)(*(unsigned __int8 *)(v7 + v8 + 2) << 16);
if ( !v3 )
break;
v10 = *a2;
if ( v3 > *a2 )
v10 = *(unsigned __int16 *)(v7 + v8) | (unsigned long long)(*(unsigned __int8 *)(v7 + v8 + 2) << 16);
v11 = v8 + v10;
if ( v11 >= *(_QWORD *)(a1 + 80) )
{
if ( *(_QWORD *)(a1 + 88) <= v11 )
{
*(_BYTE *)(a1 + 148) = 1;
(*(void ( **)(_QWORD, long long, char *, _QWORD))(*(_QWORD *)a1 + 80LL))(
*(_QWORD *)(*(_QWORD *)a1 + 64LL),
2020LL,
SQLSTATE_UNKNOWN,
0LL);
}
else
{
v12 = (v11 + 4095) & 0xFFFFFFFFFFFFF000LL;
v7 = realloc(v7, v12 + 7);
if ( v7 )
{
*(_QWORD *)(a1 + 24) = v7;
*(_QWORD *)(a1 + 8) = v7;
*(_QWORD *)(a1 + 80) = v12;
*(_QWORD *)(a1 + 16) = v12 + v7;
v8 = *(_QWORD *)(a1 + 72);
goto LABEL_14;
}
*(_BYTE *)(a1 + 148) = 1;
}
LABEL_16:
v2 = 0xFFFFFFFFLL;
goto LABEL_17;
}
LABEL_14:
v4 = v7 + v8;
v2 = v3;
}
v2 = 0LL;
LABEL_17:
*(_BYTE *)(a1 + 128) = 0;
return v2;
}
|
ma_real_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R13D,0xffffffff
XOR EAX,EAX
CMP byte ptr [RDI + 0x84],0x0
SETNZ AL
LEA R15,[RAX + RAX*0x2]
ADD R15,0x4
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RSI],0x0
MOV byte ptr [RDI + 0x80],0x1
MOV R12,qword ptr [RDI + 0x8]
ADD R12,qword ptr [RDI + 0x48]
MOV R14B,0x1
LAB_00134736:
MOV RDI,qword ptr [RBX]
MOV RSI,R12
MOV RDX,R15
CALL 0x00120131
TEST RAX,RAX
JLE 0x0013481b
ADD R12,RAX
SUB R15,RAX
JNZ 0x00134736
TEST R14B,0x1
JZ 0x00134828
MOV RAX,qword ptr [RBX + 0x8]
MOV R12,qword ptr [RBX + 0x48]
MOVZX ECX,byte ptr [RAX + R12*0x1 + 0x3]
INC ECX
MOV dword ptr [RBX + 0x60],ECX
MOV dword ptr [RBX + 0x64],ECX
CMP byte ptr [RBX + 0x84],0x0
JZ 0x0013479f
MOVZX ECX,word ptr [RAX + R12*0x1 + 0x4]
MOVZX EAX,byte ptr [RAX + R12*0x1 + 0x6]
SHL EAX,0x10
OR RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RCX],RAX
MOV RAX,qword ptr [RBX + 0x8]
MOV R12,qword ptr [RBX + 0x48]
LAB_0013479f:
MOVZX ECX,word ptr [RAX + R12*0x1]
MOVZX R15D,byte ptr [RAX + R12*0x1 + 0x2]
SHL R15D,0x10
OR R15,RCX
JZ 0x00134841
MOV RCX,qword ptr [RBP + -0x30]
MOV R14,qword ptr [RCX]
CMP R15,R14
CMOVA R14,R15
ADD R14,R12
CMP R14,qword ptr [RBX + 0x50]
JC 0x0013480d
CMP qword ptr [RBX + 0x58],R14
JBE 0x00134846
ADD R14,0xfff
AND R14,-0x1000
LEA RSI,[R14 + 0x7]
MOV RDI,RAX
CALL 0x00113740
TEST RAX,RAX
JZ 0x0013486d
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RBX + 0x50],R14
MOV RCX,RAX
ADD RCX,R14
MOV qword ptr [RBX + 0x10],RCX
MOV R12,qword ptr [RBX + 0x48]
LAB_0013480d:
ADD R12,RAX
XOR R14D,R14D
MOV R13,R15
JMP 0x00134736
LAB_0013481b:
MOV byte ptr [RBX + 0x94],0x2
LAB_00134822:
MOV R13D,0xffffffff
LAB_00134828:
MOV byte ptr [RBX + 0x80],0x0
MOV RAX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00134841:
XOR R13D,R13D
JMP 0x00134828
LAB_00134846:
MOV byte ptr [RBX + 0x94],0x1
MOV R8,qword ptr [RBX]
MOV RDI,qword ptr [R8 + 0x40]
LEA RAX,[0x14dd80]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7e4
XOR ECX,ECX
XOR EAX,EAX
CALL qword ptr [R8 + 0x50]
JMP 0x00134822
LAB_0013486d:
MOV byte ptr [RBX + 0x94],0x1
JMP 0x00134822
|
ulong ma_real_read(long *param_1,ulong *param_2)
{
char cVar1;
long lVar2;
void *__ptr;
int iVar3;
long lVar4;
ulong uVar5;
bool bVar6;
ulong uVar7;
uVar5 = 0xffffffff;
cVar1 = *(char *)((long)param_1 + 0x84);
*param_2 = 0;
*(int1 *)(param_1 + 0x10) = 1;
lVar4 = param_1[1] + param_1[9];
bVar6 = true;
uVar7 = (ulong)(cVar1 != '\0') * 3 + 4;
do {
do {
lVar2 = ma_pvio_cache_read(*param_1,lVar4,uVar7);
if (lVar2 < 1) {
*(int1 *)((long)param_1 + 0x94) = 2;
LAB_00134822:
uVar5 = 0xffffffff;
LAB_00134828:
*(int1 *)(param_1 + 0x10) = 0;
return uVar5;
}
lVar4 = lVar4 + lVar2;
uVar7 = uVar7 - lVar2;
} while (uVar7 != 0);
if (!bVar6) goto LAB_00134828;
__ptr = (void *)param_1[1];
lVar4 = param_1[9];
iVar3 = *(byte *)((long)__ptr + lVar4 + 3) + 1;
*(int *)(param_1 + 0xc) = iVar3;
*(int *)((long)param_1 + 100) = iVar3;
if (*(char *)((long)param_1 + 0x84) != '\0') {
*param_2 = (ulong)CONCAT12(*(int1 *)((long)__ptr + lVar4 + 6),
*(int2 *)((long)__ptr + lVar4 + 4));
__ptr = (void *)param_1[1];
lVar4 = param_1[9];
}
uVar5 = (ulong)CONCAT12(*(int1 *)((long)__ptr + lVar4 + 2),
*(int2 *)((long)__ptr + lVar4));
if (uVar5 == 0) {
uVar5 = 0;
goto LAB_00134828;
}
uVar7 = *param_2;
if (*param_2 < uVar5) {
uVar7 = uVar5;
}
uVar7 = uVar7 + lVar4;
if ((ulong)param_1[10] <= uVar7) {
if ((ulong)param_1[0xb] <= uVar7) {
*(int1 *)((long)param_1 + 0x94) = 1;
(**(code **)(*param_1 + 0x50))(*(int8 *)(*param_1 + 0x40),0x7e4,SQLSTATE_UNKNOWN,0);
goto LAB_00134822;
}
uVar7 = uVar7 + 0xfff & 0xfffffffffffff000;
__ptr = realloc(__ptr,uVar7 + 7);
if (__ptr == (void *)0x0) {
*(int1 *)((long)param_1 + 0x94) = 1;
goto LAB_00134822;
}
param_1[3] = (long)__ptr;
param_1[1] = (long)__ptr;
param_1[10] = uVar7;
param_1[2] = (long)__ptr + uVar7;
lVar4 = param_1[9];
}
lVar4 = lVar4 + (long)__ptr;
bVar6 = false;
uVar7 = uVar5;
} while( true );
}
|
|
57,922
|
js_new_uint8array
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_new_uint8array(JSContext *ctx, JSValue buffer)
{
if (JS_IsException(buffer))
return JS_EXCEPTION;
JSValue obj = js_create_from_ctor(ctx, JS_UNDEFINED, JS_CLASS_UINT8_ARRAY);
if (JS_IsException(obj)) {
JS_FreeValue(ctx, buffer);
return JS_EXCEPTION;
}
JSArrayBuffer *abuf = js_get_array_buffer(ctx, buffer);
assert(abuf != NULL);
if (typed_array_init(ctx, obj, buffer, 0, abuf->byte_length, /*track_rab*/FALSE)) {
// 'buffer' is freed on error above.
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
return obj;
}
|
O0
|
c
|
js_new_uint8array:
subq $0x68, %rsp
movq %rsi, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq %rdi, 0x40(%rsp)
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x5f02d
movl $0x0, 0x58(%rsp)
movq $0x6, 0x60(%rsp)
jmp 0x5f130
movq 0x40(%rsp), %rdi
movl $0x0, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movl $0x17, %ecx
callq 0x5b0f0
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x5f09f
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x29f80
movl $0x0, 0x58(%rsp)
movq $0x6, 0x60(%rsp)
jmp 0x5f130
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x5e3a0
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rdi
movq 0x18(%rsp), %rax
movslq (%rax), %rax
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %r8
xorl %r9d, %r9d
xorl %r10d, %r10d
movq %rax, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0xe1250
cmpl $0x0, %eax
je 0x5f11c
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x29f80
movl $0x0, 0x58(%rsp)
movq $0x6, 0x60(%rsp)
jmp 0x5f130
movq 0x30(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rdx
addq $0x68, %rsp
retq
nop
|
js_new_uint8array:
sub rsp, 68h
mov [rsp+68h+var_20], rsi
mov [rsp+68h+var_18], rdx
mov [rsp+68h+var_28], rdi
mov rdi, [rsp+68h+var_20]
mov rsi, [rsp+68h+var_18]
call JS_IsException_1
cmp eax, 0
jz short loc_5F02D
mov dword ptr [rsp+68h+var_10], 0
mov [rsp+68h+var_8], 6
jmp loc_5F130
loc_5F02D:
mov rdi, [rsp+68h+var_28]
mov dword ptr [rsp+68h+var_48], 0
mov [rsp+68h+var_40], 3
mov rsi, [rsp+68h+var_48]
mov rdx, [rsp+68h+var_40]
mov ecx, 17h
call js_create_from_ctor
mov [rsp+68h+var_38], rax
mov [rsp+68h+var_30], rdx
mov rdi, [rsp+68h+var_38]
mov rsi, [rsp+68h+var_30]
call JS_IsException_1
cmp eax, 0
jz short loc_5F09F
mov rdi, [rsp+68h+var_28]
mov rsi, [rsp+68h+var_20]
mov rdx, [rsp+68h+var_18]
call JS_FreeValue
mov dword ptr [rsp+68h+var_10], 0
mov [rsp+68h+var_8], 6
jmp loc_5F130
loc_5F09F:
mov rdi, [rsp+68h+var_28]
mov rsi, [rsp+68h+var_20]
mov rdx, [rsp+68h+var_18]
call js_get_array_buffer
mov [rsp+68h+var_50], rax
mov rdi, [rsp+68h+var_28]
mov rax, [rsp+68h+var_50]
movsxd rax, dword ptr [rax]
mov rsi, [rsp+68h+var_38]
mov rdx, [rsp+68h+var_30]
mov rcx, [rsp+68h+var_20]
mov r8, [rsp+68h+var_18]
xor r9d, r9d
xor r10d, r10d
mov [rsp+68h+var_68], rax
mov [rsp+68h+var_60], 0
call typed_array_init
cmp eax, 0
jz short loc_5F11C
mov rdi, [rsp+68h+var_28]
mov rsi, [rsp+68h+var_38]
mov rdx, [rsp+68h+var_30]
call JS_FreeValue
mov dword ptr [rsp+68h+var_10], 0
mov [rsp+68h+var_8], 6
jmp short loc_5F130
loc_5F11C:
mov rax, [rsp+68h+var_38]
mov [rsp+68h+var_10], rax
mov rax, [rsp+68h+var_30]
mov [rsp+68h+var_8], rax
loc_5F130:
mov rax, [rsp+68h+var_10]
mov rdx, [rsp+68h+var_8]
add rsp, 68h
retn
|
long long js_new_uint8array(long long a1, long long a2, long long a3)
{
long long v3; // rdx
int *array_buffer; // [rsp+18h] [rbp-50h]
long long v6; // [rsp+20h] [rbp-48h]
long long v7; // [rsp+30h] [rbp-38h]
long long v8; // [rsp+38h] [rbp-30h]
long long v10; // [rsp+58h] [rbp-10h]
if ( JS_IsException_1(a2, a3) )
{
LODWORD(v10) = 0;
}
else
{
LODWORD(v6) = 0;
v7 = js_create_from_ctor(a1, v6, 3LL, 23);
v8 = v3;
if ( JS_IsException_1(v7, v3) )
{
JS_FreeValue(a1, a2, a3);
LODWORD(v10) = 0;
}
else
{
array_buffer = (int *)js_get_array_buffer(a1, a2, a3);
if ( (unsigned int)typed_array_init(a1, v7, v8, a2, a3, 0, *array_buffer, 0) )
{
JS_FreeValue(a1, v7, v8);
LODWORD(v10) = 0;
}
else
{
return v7;
}
}
}
return v10;
}
|
js_new_uint8array:
SUB RSP,0x68
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x50],RDX
MOV qword ptr [RSP + 0x40],RDI
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x0015f02d
MOV dword ptr [RSP + 0x58],0x0
MOV qword ptr [RSP + 0x60],0x6
JMP 0x0015f130
LAB_0015f02d:
MOV RDI,qword ptr [RSP + 0x40]
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x3
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
MOV ECX,0x17
CALL 0x0015b0f0
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x0015f09f
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
CALL 0x00129f80
MOV dword ptr [RSP + 0x58],0x0
MOV qword ptr [RSP + 0x60],0x6
JMP 0x0015f130
LAB_0015f09f:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
CALL 0x0015e3a0
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RAX,dword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x48]
MOV R8,qword ptr [RSP + 0x50]
XOR R9D,R9D
XOR R10D,R10D
MOV qword ptr [RSP],RAX
MOV dword ptr [RSP + 0x8],0x0
CALL 0x001e1250
CMP EAX,0x0
JZ 0x0015f11c
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x00129f80
MOV dword ptr [RSP + 0x58],0x0
MOV qword ptr [RSP + 0x60],0x6
JMP 0x0015f130
LAB_0015f11c:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x60],RAX
LAB_0015f130:
MOV RAX,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
ADD RSP,0x68
RET
|
int1 [16] js_new_uint8array(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
int *piVar3;
int1 auVar4 [16];
uint uStack_44;
int4 local_10;
int4 uStack_c;
int8 local_8;
int8 uVar2;
iVar1 = JS_IsException(param_2,param_3);
if (iVar1 == 0) {
auVar4 = js_create_from_ctor(param_1,(ulong)uStack_44 << 0x20,3,0x17);
local_8 = auVar4._8_8_;
uVar2 = auVar4._0_8_;
iVar1 = JS_IsException(uVar2,local_8);
if (iVar1 == 0) {
piVar3 = (int *)js_get_array_buffer(param_1,param_2,param_3);
iVar1 = typed_array_init(param_1,uVar2,local_8,param_2,param_3,0,(long)*piVar3,0);
if (iVar1 == 0) {
local_10 = auVar4._0_4_;
uStack_c = auVar4._4_4_;
}
else {
JS_FreeValue(param_1,uVar2,local_8);
local_10 = 0;
local_8 = 6;
}
}
else {
JS_FreeValue(param_1,param_2,param_3);
local_10 = 0;
local_8 = 6;
}
}
else {
local_10 = 0;
local_8 = 6;
}
auVar4._4_4_ = uStack_c;
auVar4._0_4_ = local_10;
auVar4._8_8_ = local_8;
return auVar4;
}
|
|
57,923
|
js_new_uint8array
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_new_uint8array(JSContext *ctx, JSValue buffer)
{
if (JS_IsException(buffer))
return JS_EXCEPTION;
JSValue obj = js_create_from_ctor(ctx, JS_UNDEFINED, JS_CLASS_UINT8_ARRAY);
if (JS_IsException(obj)) {
JS_FreeValue(ctx, buffer);
return JS_EXCEPTION;
}
JSArrayBuffer *abuf = js_get_array_buffer(ctx, buffer);
assert(abuf != NULL);
if (typed_array_init(ctx, obj, buffer, 0, abuf->byte_length, /*track_rab*/FALSE)) {
// 'buffer' is freed on error above.
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
return obj;
}
|
O2
|
c
|
js_new_uint8array:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
pushq $0x6
popq %rbx
cmpl $0x6, %r12d
je 0x36594
movq %rsi, %r13
movq %rdi, %r15
pushq $0x3
popq %rdx
pushq $0x17
popq %rcx
xorl %esi, %esi
callq 0x3400a
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x36556
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
jmp 0x3658f
movq %rax, %r14
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x35caa
movslq (%rax), %r9
andl $0x0, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x6e500
testl %eax, %eax
je 0x365ac
movq %r15, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x1bbce
xorl %r14d, %r14d
movq %r14, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, %rbx
jmp 0x36597
|
js_new_uint8array:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rdx
push 6
pop rbx
cmp r12d, 6
jz short loc_36594
mov r13, rsi
mov r15, rdi
push 3
pop rdx
push 17h
pop rcx
xor esi, esi
call js_create_from_ctor
mov rbp, rdx
cmp ebp, 6
jnz short loc_36556
mov rdi, r15
mov rsi, r13
mov rdx, r12
jmp short loc_3658F
loc_36556:
mov r14, rax
mov rdi, r15
mov rsi, r13
mov rdx, r12
call js_get_array_buffer
movsxd r9, dword ptr [rax]
and [rsp+38h+var_38], 0
mov rdi, r15
mov rsi, r14
mov rdx, r13
mov rcx, r12
xor r8d, r8d
call typed_array_init
test eax, eax
jz short loc_365AC
mov rdi, r15
mov rsi, r14
mov rdx, rbp
loc_3658F:
call JS_FreeValue
loc_36594:
xor r14d, r14d
loc_36597:
mov rax, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_365AC:
mov rbx, rbp
jmp short loc_36597
|
unsigned long long js_new_uint8array(long long a1, long long a2, long long a3)
{
unsigned long long v4; // rax
long long v5; // rdx
long long v6; // rbp
long long v7; // rdx
unsigned long long v8; // r14
_DWORD *array_buffer; // rax
if ( (_DWORD)a3 != 6 )
{
v4 = js_create_from_ctor(a1, 0LL, 3LL, 23);
v6 = v5;
if ( (_DWORD)v5 == 6 )
{
v7 = a3;
}
else
{
v8 = v4;
array_buffer = (_DWORD *)js_get_array_buffer(a1, a2, a3);
if ( !(unsigned int)typed_array_init(a1, v8, a2, a3, 0, *array_buffer, 0) )
return v8;
a2 = v8;
v7 = v6;
}
JS_FreeValue(a1, a2, v7);
}
return 0LL;
}
|
js_new_uint8array:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RDX
PUSH 0x6
POP RBX
CMP R12D,0x6
JZ 0x00136594
MOV R13,RSI
MOV R15,RDI
PUSH 0x3
POP RDX
PUSH 0x17
POP RCX
XOR ESI,ESI
CALL 0x0013400a
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x00136556
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
JMP 0x0013658f
LAB_00136556:
MOV R14,RAX
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
CALL 0x00135caa
MOVSXD R9,dword ptr [RAX]
AND dword ptr [RSP],0x0
MOV RDI,R15
MOV RSI,R14
MOV RDX,R13
MOV RCX,R12
XOR R8D,R8D
CALL 0x0016e500
TEST EAX,EAX
JZ 0x001365ac
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBP
LAB_0013658f:
CALL 0x0011bbce
LAB_00136594:
XOR R14D,R14D
LAB_00136597:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001365ac:
MOV RBX,RBP
JMP 0x00136597
|
int1 [16] js_new_uint8array(int8 param_1,int8 param_2,int8 param_3)
{
int1 auVar1 [16];
int iVar2;
ulong in_RAX;
int *piVar3;
int1 auVar4 [16];
auVar1._8_8_ = param_3;
auVar1._0_8_ = param_2;
if ((int)param_3 != 6) {
auVar4 = js_create_from_ctor(param_1,0,3,0x17);
if (auVar4._8_4_ != 6) {
piVar3 = (int *)js_get_array_buffer(param_1,param_2,param_3);
iVar2 = typed_array_init(param_1,auVar4._0_8_,param_2,param_3,0,(long)*piVar3,
in_RAX & 0xffffffff00000000);
auVar1 = auVar4;
if (iVar2 == 0) {
return auVar4;
}
}
JS_FreeValue(param_1,auVar1._0_8_,auVar1._8_8_);
}
return ZEXT816(6) << 0x40;
}
|
|
57,924
|
mi_mempack_get_block_info
|
eloqsql/storage/myisam/mi_packrec.c
|
static uchar *_mi_mempack_get_block_info(MI_INFO *myisam,
MI_BIT_BUFF *bit_buff,
MI_BLOCK_INFO *info,
uchar **rec_buff_p,
uchar *header)
{
header+= read_pack_length((uint) myisam->s->pack.version, header,
&info->rec_len);
if (myisam->s->base.blobs)
{
header+= read_pack_length((uint) myisam->s->pack.version, header,
&info->blob_len);
/* mi_alloc_rec_buff sets my_errno on error */
if (!(mi_alloc_rec_buff(myisam, info->blob_len ,
rec_buff_p)))
return 0; /* not enough memory */
bit_buff->blob_pos= (uchar*) *rec_buff_p;
bit_buff->blob_end= (uchar*) *rec_buff_p + info->blob_len;
}
return header;
}
|
O0
|
c
|
mi_mempack_get_block_info:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzbl 0x244(%rax), %edi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x18, %rdx
callq 0xbbaa0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x188(%rax)
je 0xbdf43
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzbl 0x244(%rax), %edi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x30, %rdx
callq 0xbbaa0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0xb6ce0
cmpq $0x0, %rax
jne 0xbdf1d
movq $0x0, -0x8(%rbp)
jmp 0xbdf4b
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
addq 0x30(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
|
_mi_mempack_get_block_info:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_10]
mov rax, [rax]
movzx edi, byte ptr [rax+244h]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
add rdx, 18h
call read_pack_length_0
mov ecx, eax
mov rax, [rbp+var_30]
mov ecx, ecx
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+188h], 0
jz short loc_BDF43
mov rax, [rbp+var_10]
mov rax, [rax]
movzx edi, byte ptr [rax+244h]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
add rdx, 30h ; '0'
call read_pack_length_0
mov ecx, eax
mov rax, [rbp+var_30]
mov ecx, ecx
add rax, rcx
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
mov rax, [rbp+var_20]
mov rsi, [rax+30h]
mov rdx, [rbp+var_28]
call mi_alloc_rec_buff
cmp rax, 0
jnz short loc_BDF1D
mov [rbp+var_8], 0
jmp short loc_BDF4B
loc_BDF1D:
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov [rax+18h], rcx
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_20]
add rcx, [rax+30h]
mov rax, [rbp+var_18]
mov [rax+20h], rcx
loc_BDF43:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_BDF4B:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
unsigned __int8 * mi_mempack_get_block_info(
long long a1,
long long a2,
long long a3,
long long *a4,
unsigned __int8 *a5)
{
unsigned __int8 *v6; // [rsp+0h] [rbp-30h]
v6 = &a5[(unsigned int)read_pack_length_0(*(unsigned __int8 *)(*(_QWORD *)a1 + 580LL), a5, (_QWORD *)(a3 + 24))];
if ( !*(_DWORD *)(*(_QWORD *)a1 + 392LL) )
return v6;
v6 += (unsigned int)read_pack_length_0(*(unsigned __int8 *)(*(_QWORD *)a1 + 580LL), v6, (_QWORD *)(a3 + 48));
if ( mi_alloc_rec_buff(a1, *(_QWORD *)(a3 + 48), a4) )
{
*(_QWORD *)(a2 + 24) = *a4;
*(_QWORD *)(a2 + 32) = *(_QWORD *)(a3 + 48) + *a4;
return v6;
}
return 0LL;
}
|
_mi_mempack_get_block_info:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOVZX EDI,byte ptr [RAX + 0x244]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
ADD RDX,0x18
CALL 0x001bbaa0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x188],0x0
JZ 0x001bdf43
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOVZX EDI,byte ptr [RAX + 0x244]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
ADD RDX,0x30
CALL 0x001bbaa0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + 0x30]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001b6ce0
CMP RAX,0x0
JNZ 0x001bdf1d
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001bdf4b
LAB_001bdf1d:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
ADD RCX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x20],RCX
LAB_001bdf43:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_001bdf4b:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long _mi_mempack_get_block_info(long *param_1,long param_2,long param_3,long *param_4,long param_5)
{
uint uVar1;
long lVar2;
long local_38;
uVar1 = read_pack_length(*(int1 *)(*param_1 + 0x244),param_5,param_3 + 0x18);
local_38 = param_5 + (ulong)uVar1;
if (*(int *)(*param_1 + 0x188) != 0) {
uVar1 = read_pack_length(*(int1 *)(*param_1 + 0x244),local_38,param_3 + 0x30);
local_38 = local_38 + (ulong)uVar1;
lVar2 = mi_alloc_rec_buff(param_1,*(int8 *)(param_3 + 0x30),param_4);
if (lVar2 == 0) {
return 0;
}
*(long *)(param_2 + 0x18) = *param_4;
*(long *)(param_2 + 0x20) = *param_4 + *(long *)(param_3 + 0x30);
}
return local_38;
}
|
|
57,925
|
mi_mempack_get_block_info
|
eloqsql/storage/myisam/mi_packrec.c
|
static uchar *_mi_mempack_get_block_info(MI_INFO *myisam,
MI_BIT_BUFF *bit_buff,
MI_BLOCK_INFO *info,
uchar **rec_buff_p,
uchar *header)
{
header+= read_pack_length((uint) myisam->s->pack.version, header,
&info->rec_len);
if (myisam->s->base.blobs)
{
header+= read_pack_length((uint) myisam->s->pack.version, header,
&info->blob_len);
/* mi_alloc_rec_buff sets my_errno on error */
if (!(mi_alloc_rec_buff(myisam, info->blob_len ,
rec_buff_p)))
return 0; /* not enough memory */
bit_buff->blob_pos= (uchar*) *rec_buff_p;
bit_buff->blob_end= (uchar*) *rec_buff_p + info->blob_len;
}
return header;
}
|
O3
|
c
|
mi_mempack_get_block_info:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movzbl (%r8), %eax
cmpq $0xfd, %rax
ja 0x83bcb
movl $0x1, %ecx
jmp 0x83c06
cmpl $0xfe, %eax
jne 0x83bdd
movzwl 0x1(%rbx), %eax
movl $0x3, %ecx
jmp 0x83c06
movq (%rdi), %rax
cmpb $0x1, 0x244(%rax)
jne 0x83bfe
movzwl 0x1(%rbx), %ecx
movzbl 0x3(%rbx), %eax
shll $0x10, %eax
orq %rcx, %rax
movl $0x4, %ecx
jmp 0x83c06
movl 0x1(%rbx), %eax
movl $0x5, %ecx
movq %rax, 0x18(%r15)
addq %rcx, %rbx
movq (%rdi), %rax
cmpl $0x0, 0x188(%rax)
je 0x83c91
movzbl (%rbx), %esi
cmpq $0xfd, %rsi
ja 0x83c2d
movl $0x1, %r13d
jmp 0x83c69
cmpl $0xfe, %esi
jne 0x83c41
movzwl 0x1(%rbx), %esi
movl $0x3, %r13d
jmp 0x83c69
cmpb $0x1, 0x244(%rax)
jne 0x83c60
movzwl 0x1(%rbx), %eax
movzbl 0x3(%rbx), %esi
shll $0x10, %esi
orq %rax, %rsi
movl $0x4, %r13d
jmp 0x83c69
movl 0x1(%rbx), %esi
movl $0x5, %r13d
movq %rsi, 0x30(%r15)
movq %r12, %rdx
callq 0x7fcc9
testq %rax, %rax
je 0x83c8f
addq %r13, %rbx
movq (%r12), %rax
movq %rax, 0x18(%r14)
addq 0x30(%r15), %rax
movq %rax, 0x20(%r14)
jmp 0x83c91
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_mi_mempack_get_block_info:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r8
mov r12, rcx
mov r15, rdx
mov r14, rsi
movzx eax, byte ptr [r8]
cmp rax, 0FDh
ja short loc_83BCB
mov ecx, 1
jmp short loc_83C06
loc_83BCB:
cmp eax, 0FEh
jnz short loc_83BDD
movzx eax, word ptr [rbx+1]
mov ecx, 3
jmp short loc_83C06
loc_83BDD:
mov rax, [rdi]
cmp byte ptr [rax+244h], 1
jnz short loc_83BFE
movzx ecx, word ptr [rbx+1]
movzx eax, byte ptr [rbx+3]
shl eax, 10h
or rax, rcx
mov ecx, 4
jmp short loc_83C06
loc_83BFE:
mov eax, [rbx+1]
mov ecx, 5
loc_83C06:
mov [r15+18h], rax
add rbx, rcx
mov rax, [rdi]
cmp dword ptr [rax+188h], 0
jz short loc_83C91
movzx esi, byte ptr [rbx]
cmp rsi, 0FDh
ja short loc_83C2D
mov r13d, 1
jmp short loc_83C69
loc_83C2D:
cmp esi, 0FEh
jnz short loc_83C41
movzx esi, word ptr [rbx+1]
mov r13d, 3
jmp short loc_83C69
loc_83C41:
cmp byte ptr [rax+244h], 1
jnz short loc_83C60
movzx eax, word ptr [rbx+1]
movzx esi, byte ptr [rbx+3]
shl esi, 10h
or rsi, rax
mov r13d, 4
jmp short loc_83C69
loc_83C60:
mov esi, [rbx+1]
mov r13d, 5
loc_83C69:
mov [r15+30h], rsi
mov rdx, r12
call mi_alloc_rec_buff
test rax, rax
jz short loc_83C8F
add rbx, r13
mov rax, [r12]
mov [r14+18h], rax
add rax, [r15+30h]
mov [r14+20h], rax
jmp short loc_83C91
loc_83C8F:
xor ebx, ebx
loc_83C91:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned __int8 * mi_mempack_get_block_info(
long long *a1,
long long a2,
long long a3,
long long *a4,
unsigned __int8 *a5,
long long a6)
{
unsigned long long v9; // rax
long long v10; // rcx
unsigned __int8 *v11; // rbx
unsigned long long v12; // rsi
long long v13; // r13
long long v14; // rax
v9 = *a5;
if ( v9 > 0xFD )
{
if ( (_DWORD)v9 == 254 )
{
v9 = *(unsigned __int16 *)(a5 + 1);
v10 = 3LL;
}
else if ( *(_BYTE *)(*a1 + 580) == 1 )
{
v9 = *(unsigned __int16 *)(a5 + 1) | (unsigned long long)(a5[3] << 16);
v10 = 4LL;
}
else
{
v9 = *(unsigned int *)(a5 + 1);
v10 = 5LL;
}
}
else
{
v10 = 1LL;
}
*(_QWORD *)(a3 + 24) = v9;
v11 = &a5[v10];
if ( *(_DWORD *)(*a1 + 392) )
{
v12 = *v11;
if ( v12 > 0xFD )
{
if ( (_DWORD)v12 == 254 )
{
v12 = *(unsigned __int16 *)(v11 + 1);
v13 = 3LL;
}
else if ( *(_BYTE *)(*a1 + 580) == 1 )
{
v12 = *(unsigned __int16 *)(v11 + 1) | (unsigned long long)(v11[3] << 16);
v13 = 4LL;
}
else
{
v12 = *(unsigned int *)(v11 + 1);
v13 = 5LL;
}
}
else
{
v13 = 1LL;
}
*(_QWORD *)(a3 + 48) = v12;
if ( mi_alloc_rec_buff(a1, v12, a4, v10, (long long)a5, a6) )
{
v11 += v13;
v14 = *a4;
*(_QWORD *)(a2 + 24) = *a4;
*(_QWORD *)(a2 + 32) = *(_QWORD *)(a3 + 48) + v14;
}
else
{
return 0LL;
}
}
return v11;
}
|
_mi_mempack_get_block_info:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R12,RCX
MOV R15,RDX
MOV R14,RSI
MOVZX EAX,byte ptr [R8]
CMP RAX,0xfd
JA 0x00183bcb
MOV ECX,0x1
JMP 0x00183c06
LAB_00183bcb:
CMP EAX,0xfe
JNZ 0x00183bdd
MOVZX EAX,word ptr [RBX + 0x1]
MOV ECX,0x3
JMP 0x00183c06
LAB_00183bdd:
MOV RAX,qword ptr [RDI]
CMP byte ptr [RAX + 0x244],0x1
JNZ 0x00183bfe
MOVZX ECX,word ptr [RBX + 0x1]
MOVZX EAX,byte ptr [RBX + 0x3]
SHL EAX,0x10
OR RAX,RCX
MOV ECX,0x4
JMP 0x00183c06
LAB_00183bfe:
MOV EAX,dword ptr [RBX + 0x1]
MOV ECX,0x5
LAB_00183c06:
MOV qword ptr [R15 + 0x18],RAX
ADD RBX,RCX
MOV RAX,qword ptr [RDI]
CMP dword ptr [RAX + 0x188],0x0
JZ 0x00183c91
MOVZX ESI,byte ptr [RBX]
CMP RSI,0xfd
JA 0x00183c2d
MOV R13D,0x1
JMP 0x00183c69
LAB_00183c2d:
CMP ESI,0xfe
JNZ 0x00183c41
MOVZX ESI,word ptr [RBX + 0x1]
MOV R13D,0x3
JMP 0x00183c69
LAB_00183c41:
CMP byte ptr [RAX + 0x244],0x1
JNZ 0x00183c60
MOVZX EAX,word ptr [RBX + 0x1]
MOVZX ESI,byte ptr [RBX + 0x3]
SHL ESI,0x10
OR RSI,RAX
MOV R13D,0x4
JMP 0x00183c69
LAB_00183c60:
MOV ESI,dword ptr [RBX + 0x1]
MOV R13D,0x5
LAB_00183c69:
MOV qword ptr [R15 + 0x30],RSI
MOV RDX,R12
CALL 0x0017fcc9
TEST RAX,RAX
JZ 0x00183c8f
ADD RBX,R13
MOV RAX,qword ptr [R12]
MOV qword ptr [R14 + 0x18],RAX
ADD RAX,qword ptr [R15 + 0x30]
MOV qword ptr [R14 + 0x20],RAX
JMP 0x00183c91
LAB_00183c8f:
XOR EBX,EBX
LAB_00183c91:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
byte * _mi_mempack_get_block_info
(long *param_1,long param_2,long param_3,long *param_4,byte *param_5)
{
long lVar1;
long lVar2;
ulong uVar3;
uVar3 = (ulong)*param_5;
if (uVar3 < 0xfe) {
lVar2 = 1;
}
else if (*param_5 == 0xfe) {
uVar3 = (ulong)*(ushort *)(param_5 + 1);
lVar2 = 3;
}
else if (*(char *)(*param_1 + 0x244) == '\x01') {
uVar3 = (ulong)*(uint3 *)(param_5 + 1);
lVar2 = 4;
}
else {
uVar3 = (ulong)*(uint *)(param_5 + 1);
lVar2 = 5;
}
*(ulong *)(param_3 + 0x18) = uVar3;
param_5 = param_5 + lVar2;
if (*(int *)(*param_1 + 0x188) != 0) {
uVar3 = (ulong)*param_5;
if (uVar3 < 0xfe) {
lVar2 = 1;
}
else if (*param_5 == 0xfe) {
uVar3 = (ulong)*(ushort *)(param_5 + 1);
lVar2 = 3;
}
else if (*(char *)(*param_1 + 0x244) == '\x01') {
uVar3 = (ulong)*(uint3 *)(param_5 + 1);
lVar2 = 4;
}
else {
uVar3 = (ulong)*(uint *)(param_5 + 1);
lVar2 = 5;
}
*(ulong *)(param_3 + 0x30) = uVar3;
lVar1 = mi_alloc_rec_buff(param_1,uVar3,param_4);
if (lVar1 == 0) {
param_5 = (byte *)0x0;
}
else {
param_5 = param_5 + lVar2;
lVar2 = *param_4;
*(long *)(param_2 + 0x18) = lVar2;
*(long *)(param_2 + 0x20) = lVar2 + *(long *)(param_3 + 0x30);
}
}
return param_5;
}
|
|
57,926
|
ma_crypt_index_pre_write_hook
|
eloqsql/storage/maria/ma_crypt.c
|
static my_bool ma_crypt_index_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args)
{
MARIA_SHARE *share= (MARIA_SHARE*) args->data;
const uint block_size= share->block_size;
const uint page_used= _ma_get_page_used(share, args->page);
uint key_version;
uchar *crypt_buf= my_malloc(PSI_INSTRUMENT_ME, block_size, MYF(0));
if (crypt_buf == NULL)
{
args->crypt_buf= NULL; /* for post-hook */
return 1;
}
if (!share->base.born_transactional)
{
/* store a random number instead of LSN (for counter block) */
store_rand_lsn(args->page);
}
maria_page_crc_set_index(args);
{
const uchar *src= args->page;
uchar* dst= crypt_buf;
uint pageno= (uint)args->pageno;
LSN lsn= lsn_korr(src);
const uint head= share->keypage_header;
const uint tail= CRC_SIZE;
/* page_used includes header (but not trailer) */
const uint size= page_used - head;
/* 1 - copy head */
memcpy(dst, src, head);
/* 2 - encrypt page */
if (ma_encrypt(share, share->crypt_data,
src + head, dst + head, size, pageno, lsn, &key_version))
{
my_free(crypt_buf);
return 1;
}
/* 3 - copy tail */
memcpy(dst + block_size - tail, src + block_size - tail, tail);
/* 4 - store key version */
_ma_store_key_version(share, dst, key_version);
#ifdef HAVE_valgrind
/* 5 - keep valgrind happy by zeroing not used bytes */
bzero(dst+head+size, block_size - size - tail - head);
#endif
}
/* swap pointers to instead write out the encrypted block */
args->crypt_buf= args->page;
args->page= crypt_buf;
return 0;
}
|
O3
|
c
|
ma_crypt_index_pre_write_hook:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x10(%rdi), %r14
movl 0x744(%r14), %ecx
movl 0x7bc(%r14), %r12d
movzwl -0x2(%rax,%rcx), %r15d
xorl %edi, %edi
movq %r12, %rsi
xorl %edx, %edx
callq 0xa63e5
testq %rax, %rax
je 0x6a664
movq %rax, -0x50(%rbp)
movq %r12, -0x40(%rbp)
rolw $0x8, %r15w
movzwl %r15w, %r12d
cmpb $0x0, 0x44c(%r14)
jne 0x6a5d9
movq (%rbx), %rdi
callq 0x6a760
movq %rbx, %rdi
callq 0x40f3c
movq (%rbx), %r15
movl 0x8(%rbx), %eax
movl %eax, -0x30(%rbp)
movzwl (%r15), %eax
shlq $0x20, %rax
movzbl 0x2(%r15), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x3(%r15), %eax
orq %rcx, %rax
movq %rax, -0x48(%rbp)
movl 0x744(%r14), %r13d
subl %r13d, %r12d
movl %r12d, -0x2c(%rbp)
movq -0x50(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2a0a0
movq 0xc20(%r14), %rsi
leaq (%r15,%r13), %rdx
movq %r12, %rcx
addq %r13, %rcx
leaq -0x34(%rbp), %rax
movq %r14, %rdi
movl -0x2c(%rbp), %r8d
movl -0x30(%rbp), %r9d
pushq %rax
pushq -0x48(%rbp)
callq 0x6a7a3
addq $0x10, %rsp
testl %eax, %eax
je 0x6a670
movq %r12, %rdi
callq 0xa6612
jmp 0x6a66c
movq $0x0, 0x18(%rbx)
movb $0x1, %al
jmp 0x6a699
movq -0x40(%rbp), %rcx
movl -0x4(%r15,%rcx), %eax
movl %eax, -0x4(%r12,%rcx)
movl 0x744(%r14), %eax
movl -0x34(%rbp), %ecx
movl %ecx, -0x8(%r12,%rax)
movq (%rbx), %rax
movq %rax, 0x18(%rbx)
movq %r12, (%rbx)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ma_crypt_index_pre_write_hook:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
mov rax, [rdi]
mov r14, [rdi+10h]
mov ecx, [r14+744h]
mov r12d, [r14+7BCh]
movzx r15d, word ptr [rax+rcx-2]
xor edi, edi
mov rsi, r12
xor edx, edx
call my_malloc
test rax, rax
jz loc_6A664
mov [rbp+var_50], rax
mov [rbp+var_40], r12
rol r15w, 8
movzx r12d, r15w
cmp byte ptr [r14+44Ch], 0
jnz short loc_6A5D9
mov rdi, [rbx]
call store_rand_lsn
loc_6A5D9:
mov rdi, rbx
call maria_page_crc_set_index
mov r15, [rbx]
mov eax, [rbx+8]
mov [rbp+var_30], eax
movzx eax, word ptr [r15]
shl rax, 20h
movzx ecx, byte ptr [r15+2]
shl rcx, 30h
or rcx, rax
mov eax, [r15+3]
or rax, rcx
mov [rbp+var_48], rax
mov r13d, [r14+744h]
sub r12d, r13d
mov [rbp+var_2C], r12d
mov r12, [rbp+var_50]
mov rdi, r12
mov rsi, r15
mov rdx, r13
call _memcpy
mov rsi, [r14+0C20h]
lea rdx, [r15+r13]
mov rcx, r12
add rcx, r13
lea rax, [rbp+var_34]
mov rdi, r14
mov r8d, [rbp+var_2C]
mov r9d, [rbp+var_30]
push rax
push [rbp+var_48]
call ma_encrypt
add rsp, 10h
test eax, eax
jz short loc_6A670
mov rdi, r12
call my_free
jmp short loc_6A66C
loc_6A664:
mov qword ptr [rbx+18h], 0
loc_6A66C:
mov al, 1
jmp short loc_6A699
loc_6A670:
mov rcx, [rbp+var_40]
mov eax, [r15+rcx-4]
mov [r12+rcx-4], eax
mov eax, [r14+744h]
mov ecx, [rbp+var_34]
mov [r12+rax-8], ecx
mov rax, [rbx]
mov [rbx+18h], rax
mov [rbx], r12
xor eax, eax
loc_6A699:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char ma_crypt_index_pre_write_hook(long long *a1)
{
long long v1; // r14
long long v2; // r12
__int16 v3; // r15
long long v4; // rax
int v5; // r12d
unsigned __int16 *v6; // r15
long long v7; // r13
long long v9; // [rsp+0h] [rbp-50h]
unsigned long long v10; // [rsp+8h] [rbp-48h]
long long v11; // [rsp+10h] [rbp-40h]
int v12; // [rsp+1Ch] [rbp-34h] BYREF
int v13; // [rsp+20h] [rbp-30h]
int v14; // [rsp+24h] [rbp-2Ch]
v1 = a1[2];
v2 = *(unsigned int *)(v1 + 1980);
v3 = *(_WORD *)(*a1 + *(unsigned int *)(v1 + 1860) - 2);
v4 = my_malloc(0LL, v2, 0LL);
if ( !v4 )
{
a1[3] = 0LL;
return 1;
}
v9 = v4;
v11 = v2;
v5 = (unsigned __int16)__ROL2__(v3, 8);
if ( !*(_BYTE *)(v1 + 1100) )
store_rand_lsn(*a1);
maria_page_crc_set_index(a1);
v6 = (unsigned __int16 *)*a1;
v13 = *((_DWORD *)a1 + 2);
v10 = ((unsigned long long)*v6 << 32) | ((unsigned long long)*((unsigned __int8 *)v6 + 2) << 48) | *(unsigned int *)((char *)v6 + 3);
v7 = *(unsigned int *)(v1 + 1860);
v14 = v5 - v7;
memcpy(v9, v6, v7);
if ( (unsigned int)ma_encrypt(
v1,
*(_QWORD *)(v1 + 3104),
(int)v6 + (int)v7,
(int)v7 + (int)v9,
v5 - (int)v7,
v13,
v10,
(long long)&v12) )
{
my_free(v9);
return 1;
}
*(_DWORD *)(v9 + v11 - 4) = *(_DWORD *)((char *)v6 + v11 - 4);
*(_DWORD *)(v9 + *(unsigned int *)(v1 + 1860) - 8) = v12;
a1[3] = *a1;
*a1 = v9;
return 0;
}
|
ma_crypt_index_pre_write_hook:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV R14,qword ptr [RDI + 0x10]
MOV ECX,dword ptr [R14 + 0x744]
MOV R12D,dword ptr [R14 + 0x7bc]
MOVZX R15D,word ptr [RAX + RCX*0x1 + -0x2]
XOR EDI,EDI
MOV RSI,R12
XOR EDX,EDX
CALL 0x001a63e5
TEST RAX,RAX
JZ 0x0016a664
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x40],R12
ROL R15W,0x8
MOVZX R12D,R15W
CMP byte ptr [R14 + 0x44c],0x0
JNZ 0x0016a5d9
MOV RDI,qword ptr [RBX]
CALL 0x0016a760
LAB_0016a5d9:
MOV RDI,RBX
CALL 0x00140f3c
MOV R15,qword ptr [RBX]
MOV EAX,dword ptr [RBX + 0x8]
MOV dword ptr [RBP + -0x30],EAX
MOVZX EAX,word ptr [R15]
SHL RAX,0x20
MOVZX ECX,byte ptr [R15 + 0x2]
SHL RCX,0x30
OR RCX,RAX
MOV EAX,dword ptr [R15 + 0x3]
OR RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV R13D,dword ptr [R14 + 0x744]
SUB R12D,R13D
MOV dword ptr [RBP + -0x2c],R12D
MOV R12,qword ptr [RBP + -0x50]
MOV RDI,R12
MOV RSI,R15
MOV RDX,R13
CALL 0x0012a0a0
MOV RSI,qword ptr [R14 + 0xc20]
LEA RDX,[R15 + R13*0x1]
MOV RCX,R12
ADD RCX,R13
LEA RAX,[RBP + -0x34]
MOV RDI,R14
MOV R8D,dword ptr [RBP + -0x2c]
MOV R9D,dword ptr [RBP + -0x30]
PUSH RAX
PUSH qword ptr [RBP + -0x48]
CALL 0x0016a7a3
ADD RSP,0x10
TEST EAX,EAX
JZ 0x0016a670
MOV RDI,R12
CALL 0x001a6612
JMP 0x0016a66c
LAB_0016a664:
MOV qword ptr [RBX + 0x18],0x0
LAB_0016a66c:
MOV AL,0x1
JMP 0x0016a699
LAB_0016a670:
MOV RCX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [R15 + RCX*0x1 + -0x4]
MOV dword ptr [R12 + RCX*0x1 + -0x4],EAX
MOV EAX,dword ptr [R14 + 0x744]
MOV ECX,dword ptr [RBP + -0x34]
MOV dword ptr [R12 + RAX*0x1 + -0x8],ECX
MOV RAX,qword ptr [RBX]
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RBX],R12
XOR EAX,EAX
LAB_0016a699:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 ma_crypt_index_pre_write_hook(long *param_1)
{
ushort uVar1;
ushort uVar2;
uint uVar3;
long lVar4;
ushort *__src;
ushort uVar5;
int iVar6;
void *__dest;
ulong uVar7;
ulong __n;
int4 local_3c;
int4 local_38;
int local_34;
lVar4 = param_1[2];
uVar7 = (ulong)*(uint *)(lVar4 + 0x7bc);
uVar1 = *(ushort *)(*param_1 + -2 + (ulong)*(uint *)(lVar4 + 0x744));
__dest = (void *)my_malloc(0,uVar7,0);
if (__dest == (void *)0x0) {
param_1[3] = 0;
}
else {
if (*(char *)(lVar4 + 0x44c) == '\0') {
store_rand_lsn(*param_1);
}
maria_page_crc_set_index(param_1);
__src = (ushort *)*param_1;
local_38 = (int4)param_1[1];
uVar2 = *__src;
uVar5 = __src[1];
uVar3 = *(uint *)((long)__src + 3);
__n = (ulong)*(uint *)(lVar4 + 0x744);
local_34 = (uint)(ushort)(uVar1 << 8 | uVar1 >> 8) - *(uint *)(lVar4 + 0x744);
memcpy(__dest,__src,__n);
iVar6 = ma_encrypt(lVar4,*(int8 *)(lVar4 + 0xc20),(long)__src + __n,(long)__dest + __n,
local_34,local_38,
(ulong)uVar3 | (ulong)(byte)uVar5 << 0x30 | (ulong)uVar2 << 0x20,&local_3c);
if (iVar6 == 0) {
*(int4 *)((long)__dest + (uVar7 - 4)) = *(int4 *)((long)__src + (uVar7 - 4));
*(int4 *)((long)__dest + ((ulong)*(uint *)(lVar4 + 0x744) - 8)) = local_3c;
param_1[3] = *param_1;
*param_1 = (long)__dest;
return 0;
}
my_free(__dest);
}
return 1;
}
|
|
57,927
|
ma_fetch_keypage
|
eloqsql/storage/maria/ma_page.c
|
my_bool _ma_fetch_keypage(MARIA_PAGE *page, MARIA_HA *info,
const MARIA_KEYDEF *keyinfo,
my_off_t pos, enum pagecache_page_lock lock,
int level, uchar *buff,
my_bool return_buffer __attribute__ ((unused)))
{
uchar *tmp;
MARIA_PINNED_PAGE page_link;
MARIA_SHARE *share= info->s;
uint block_size= share->block_size;
DBUG_ENTER("_ma_fetch_keypage");
DBUG_PRINT("enter",("page: %lu", (ulong) (pos / block_size)));
tmp= pagecache_read(share->pagecache, &share->kfile,
(pgcache_page_no_t) (pos / block_size), level, buff,
share->page_type, lock, &page_link.link);
if (lock != PAGECACHE_LOCK_LEFT_UNLOCKED)
{
DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE || lock == PAGECACHE_LOCK_READ);
page_link.unlock= (lock == PAGECACHE_LOCK_WRITE ?
PAGECACHE_LOCK_WRITE_UNLOCK :
PAGECACHE_LOCK_READ_UNLOCK);
page_link.changed= 0;
push_dynamic(&info->pinned_pages, (void*) &page_link);
page->link_offset= info->pinned_pages.elements-1;
}
if (tmp == info->buff)
info->keyread_buff_used=1;
else if (!tmp)
{
DBUG_PRINT("error",("Got errno: %d from pagecache_read",my_errno));
info->last_keypage=HA_OFFSET_ERROR;
_ma_set_fatal_error(info, my_errno);
DBUG_RETURN(1);
}
info->last_keypage= pos;
/*
Setup page structure to make pages easy to use
This is same as page_fill_info, but here inlined as this si used
so often.
*/
page->info= info;
page->keyinfo= keyinfo;
page->buff= tmp;
page->pos= pos;
page->size= _ma_get_page_used(share, tmp);
page->org_size= page->size; /* For debugging */
page->flag= _ma_get_keypage_flag(share, tmp);
page->node= ((page->flag & KEYPAGE_FLAG_ISNOD) ?
share->base.key_reflength : 0);
#ifdef EXTRA_DEBUG
{
uint page_size= page->size;
if (page_size < 4 || page_size > share->max_index_block_size ||
_ma_get_keynr(share, tmp) != keyinfo->key_nr)
{
DBUG_PRINT("error",("page %lu had wrong page length: %u page_header: %u keynr: %u",
(ulong) (pos / block_size), page_size,
share->keypage_header,
_ma_get_keynr(share, tmp)));
DBUG_DUMP("page", tmp, page_size);
info->last_keypage = HA_OFFSET_ERROR;
_ma_set_fatal_error(info, HA_ERR_CRASHED);
DBUG_RETURN(1);
}
}
#endif
DBUG_RETURN(0);
}
|
O0
|
c
|
ma_fetch_keypage:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb 0x18(%rbp), %al
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl %r9d, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x5c(%rbp)
jmp 0x6ee94
movq -0x58(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x58(%rbp), %rsi
addq $0x750, %rsi # imm = 0x750
movq -0x28(%rbp), %rax
movl -0x5c(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rdx
movl -0x30(%rbp), %ecx
movq 0x10(%rbp), %r8
movq -0x58(%rbp), %rax
movl 0x7d4(%rax), %r9d
movl -0x2c(%rbp), %r10d
leaq -0x50(%rbp), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2d970
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x6ef31
jmp 0x6eeed
jmp 0x6eeef
movl -0x2c(%rbp), %edx
movl $0x5, %eax
movl $0x6, %ecx
cmpl $0x4, %edx
cmovel %ecx, %eax
movl %eax, -0x48(%rbp)
movb $0x0, -0x40(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2e8, %rdi # imm = 0x2E8
leaq -0x50(%rbp), %rsi
callq 0xda940
movq -0x18(%rbp), %rax
movl 0x2f0(%rax), %ecx
subl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x378(%rcx), %rax
jne 0x6ef4f
movq -0x18(%rbp), %rax
movb $0x1, 0x685(%rax)
jmp 0x6ef8c
cmpq $0x0, -0x38(%rbp)
jne 0x6ef8a
jmp 0x6ef58
jmp 0x6ef5a
movq -0x18(%rbp), %rax
movq $-0x1, 0x440(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
callq 0xf60c0
movq -0x68(%rbp), %rdi
movl (%rax), %esi
callq 0x338b0
movb $0x1, -0x1(%rbp)
jmp 0x6f067
jmp 0x6ef8c
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x440(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rcx
movl 0x744(%rcx), %ecx
movzbl -0x1(%rax,%rcx), %eax
movzwl %ax, %eax
movq -0x38(%rbp), %rcx
movq -0x58(%rbp), %rdx
movl 0x744(%rdx), %edx
movzbl -0x2(%rcx,%rdx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rcx
movl 0x744(%rcx), %ecx
subl $0x2, %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x6f052
movq -0x58(%rbp), %rax
movl 0x3e4(%rax), %eax
movl %eax, -0x6c(%rbp)
jmp 0x6f059
xorl %eax, %eax
movl %eax, -0x6c(%rbp)
jmp 0x6f059
movl -0x6c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_fetch_keypage:
push rbp
mov rbp, rsp
sub rsp, 80h
mov al, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov [rbp+var_30], r9d
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov eax, [rax+7BCh]
mov [rbp+var_5C], eax
jmp short $+2
loc_6EE94:
mov rax, [rbp+var_58]
mov rdi, [rax+600h]
mov rsi, [rbp+var_58]
add rsi, 750h
mov rax, [rbp+var_28]
mov ecx, [rbp+var_5C]
xor edx, edx
div rcx
mov rdx, rax
mov ecx, [rbp+var_30]
mov r8, [rbp+arg_0]
mov rax, [rbp+var_58]
mov r9d, [rax+7D4h]
mov r10d, [rbp+var_2C]
lea rax, [rbp+var_50]
mov [rsp+80h+var_80], r10d
mov [rsp+80h+var_78], rax
call pagecache_read
mov [rbp+var_38], rax
cmp [rbp+var_2C], 0
jz short loc_6EF31
jmp short $+2
loc_6EEED:
jmp short $+2
loc_6EEEF:
mov edx, [rbp+var_2C]
mov eax, 5
mov ecx, 6
cmp edx, 4
cmovz eax, ecx
mov [rbp+var_48], eax
mov [rbp+var_40], 0
mov rdi, [rbp+var_18]
add rdi, 2E8h
lea rsi, [rbp+var_50]
call insert_dynamic
mov rax, [rbp+var_18]
mov ecx, [rax+2F0h]
sub ecx, 1
mov rax, [rbp+var_10]
mov [rax+30h], ecx
loc_6EF31:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
cmp rax, [rcx+378h]
jnz short loc_6EF4F
mov rax, [rbp+var_18]
mov byte ptr [rax+685h], 1
jmp short loc_6EF8C
loc_6EF4F:
cmp [rbp+var_38], 0
jnz short loc_6EF8A
jmp short $+2
loc_6EF58:
jmp short $+2
loc_6EF5A:
mov rax, [rbp+var_18]
mov qword ptr [rax+440h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_18]
mov [rbp+var_68], rax
call _my_thread_var
mov rdi, [rbp+var_68]
mov esi, [rax]
call _ma_set_fatal_error
mov [rbp+var_1], 1
jmp loc_6F067
loc_6EF8A:
jmp short $+2
loc_6EF8C:
mov rcx, [rbp+var_28]
mov rax, [rbp+var_18]
mov [rax+440h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov rax, [rbp+var_38]
mov rcx, [rbp+var_58]
mov ecx, [rcx+744h]
movzx eax, byte ptr [rax+rcx-1]
movzx eax, ax
mov rcx, [rbp+var_38]
mov rdx, [rbp+var_58]
mov edx, [rdx+744h]
movzx ecx, byte ptr [rcx+rdx-2]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx ecx, ax
mov rax, [rbp+var_10]
mov [rax+20h], ecx
mov rax, [rbp+var_10]
mov ecx, [rax+20h]
mov rax, [rbp+var_10]
mov [rax+24h], ecx
mov rax, [rbp+var_38]
mov rcx, [rbp+var_58]
mov ecx, [rcx+744h]
sub ecx, 2
sub ecx, 1
mov ecx, ecx
movzx ecx, byte ptr [rax+rcx]
mov rax, [rbp+var_10]
mov [rax+2Ch], ecx
mov rax, [rbp+var_10]
mov eax, [rax+2Ch]
and eax, 1
cmp eax, 0
jz short loc_6F052
mov rax, [rbp+var_58]
mov eax, [rax+3E4h]
mov [rbp+var_6C], eax
jmp short loc_6F059
loc_6F052:
xor eax, eax
mov [rbp+var_6C], eax
jmp short $+2
loc_6F059:
mov ecx, [rbp+var_6C]
mov rax, [rbp+var_10]
mov [rax+28h], ecx
mov [rbp+var_1], 0
loc_6F067:
mov al, [rbp+var_1]
add rsp, 80h
pop rbp
retn
|
char ma_fetch_keypage(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
unsigned int a5,
int a6,
long long a7)
{
_QWORD *v7; // rdi
const char *v8; // rsi
int v9; // eax
int *v10; // rax
long long v11; // rdx
long long v12; // rcx
long long v13; // r8
int v14; // r9d
int v16; // [rsp+14h] [rbp-6Ch]
_DWORD *v17; // [rsp+18h] [rbp-68h]
unsigned int v18; // [rsp+24h] [rbp-5Ch]
_DWORD *v19; // [rsp+28h] [rbp-58h]
char v20[8]; // [rsp+30h] [rbp-50h] BYREF
int v21; // [rsp+38h] [rbp-48h]
char v22; // [rsp+40h] [rbp-40h]
long long v23; // [rsp+48h] [rbp-38h]
int v24; // [rsp+50h] [rbp-30h]
unsigned int v25; // [rsp+54h] [rbp-2Ch]
unsigned long long v26; // [rsp+58h] [rbp-28h]
long long v27; // [rsp+60h] [rbp-20h]
long long v28; // [rsp+68h] [rbp-18h]
long long v29; // [rsp+70h] [rbp-10h]
v29 = a1;
v28 = a2;
v27 = a3;
v26 = a4;
v25 = a5;
v24 = a6;
v19 = *(_DWORD **)a2;
v18 = *(_DWORD *)(*(_QWORD *)a2 + 1980LL);
v7 = *(_QWORD **)(*(_QWORD *)a2 + 1536LL);
v8 = (const char *)(*(_QWORD *)a2 + 1872LL);
v23 = pagecache_read(v7, (long long)(v19 + 468), a4 / v18, a6, a7, v19[501], a5, v20);
if ( v25 )
{
v9 = 5;
if ( v25 == 4 )
v9 = 6;
v21 = v9;
v22 = 0;
v7 = (_QWORD *)(v28 + 744);
v8 = v20;
insert_dynamic(v28 + 744, v20);
*(_DWORD *)(v29 + 48) = *(_DWORD *)(v28 + 752) - 1;
}
if ( v23 == *(_QWORD *)(v28 + 888) )
{
*(_BYTE *)(v28 + 1669) = 1;
}
else if ( !v23 )
{
*(_QWORD *)(v28 + 1088) = -1LL;
v17 = (_DWORD *)v28;
v10 = (int *)my_thread_var(v7, v8);
ma_set_fatal_error(v17, *v10, v11, v12, v13, v14);
return 1;
}
*(_QWORD *)(v28 + 1088) = v26;
*(_QWORD *)v29 = v28;
*(_QWORD *)(v29 + 8) = v27;
*(_QWORD *)(v29 + 16) = v23;
*(_QWORD *)(v29 + 24) = v26;
*(_DWORD *)(v29 + 32) = _byteswap_ushort(*(_WORD *)(v23 + (unsigned int)v19[465] - 2));
*(_DWORD *)(v29 + 36) = *(_DWORD *)(v29 + 32);
*(_DWORD *)(v29 + 44) = *(unsigned __int8 *)(v23 + (unsigned int)(v19[465] - 3));
if ( (*(_DWORD *)(v29 + 44) & 1) != 0 )
v16 = v19[249];
else
v16 = 0;
*(_DWORD *)(v29 + 40) = v16;
return 0;
}
|
_ma_fetch_keypage:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV AL,byte ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x2c],R8D
MOV dword ptr [RBP + -0x30],R9D
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV dword ptr [RBP + -0x5c],EAX
JMP 0x0016ee94
LAB_0016ee94:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x58]
ADD RSI,0x750
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x5c]
XOR EDX,EDX
DIV RCX
MOV RDX,RAX
MOV ECX,dword ptr [RBP + -0x30]
MOV R8,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x58]
MOV R9D,dword ptr [RAX + 0x7d4]
MOV R10D,dword ptr [RBP + -0x2c]
LEA RAX,[RBP + -0x50]
MOV dword ptr [RSP],R10D
MOV qword ptr [RSP + 0x8],RAX
CALL 0x0012d970
MOV qword ptr [RBP + -0x38],RAX
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x0016ef31
JMP 0x0016eeed
LAB_0016eeed:
JMP 0x0016eeef
LAB_0016eeef:
MOV EDX,dword ptr [RBP + -0x2c]
MOV EAX,0x5
MOV ECX,0x6
CMP EDX,0x4
CMOVZ EAX,ECX
MOV dword ptr [RBP + -0x48],EAX
MOV byte ptr [RBP + -0x40],0x0
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x2e8
LEA RSI,[RBP + -0x50]
CALL 0x001da940
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x2f0]
SUB ECX,0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x30],ECX
LAB_0016ef31:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x378]
JNZ 0x0016ef4f
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x685],0x1
JMP 0x0016ef8c
LAB_0016ef4f:
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0016ef8a
JMP 0x0016ef58
LAB_0016ef58:
JMP 0x0016ef5a
LAB_0016ef5a:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x440],-0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x68],RAX
CALL 0x001f60c0
MOV RDI,qword ptr [RBP + -0x68]
MOV ESI,dword ptr [RAX]
CALL 0x001338b0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0016f067
LAB_0016ef8a:
JMP 0x0016ef8c
LAB_0016ef8c:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x440],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RCX + 0x744]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + -0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x58]
MOV EDX,dword ptr [RDX + 0x744]
MOVZX ECX,byte ptr [RCX + RDX*0x1 + -0x2]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x20],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x24],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RCX + 0x744]
SUB ECX,0x2
SUB ECX,0x1
MOV ECX,ECX
MOVZX ECX,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x2c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x2c]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0016f052
MOV RAX,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RAX + 0x3e4]
MOV dword ptr [RBP + -0x6c],EAX
JMP 0x0016f059
LAB_0016f052:
XOR EAX,EAX
MOV dword ptr [RBP + -0x6c],EAX
JMP 0x0016f059
LAB_0016f059:
MOV ECX,dword ptr [RBP + -0x6c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],ECX
MOV byte ptr [RBP + -0x1],0x0
LAB_0016f067:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x80
POP RBP
RET
|
int1
_ma_fetch_keypage(int8 *param_1,long *param_2,int8 param_3,ulong param_4,int param_5,
int4 param_6,int8 param_7)
{
long lVar1;
long *plVar2;
int4 *puVar3;
int4 local_74;
int1 local_58 [8];
int4 local_50;
int1 local_48;
long local_40;
int4 local_38;
int local_34;
ulong local_30;
int8 local_28;
long *local_20;
int8 *local_18;
lVar1 = *param_2;
local_38 = param_6;
local_34 = param_5;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_40 = pagecache_read(*(int8 *)(lVar1 + 0x600),lVar1 + 0x750,
param_4 / *(uint *)(lVar1 + 0x7bc),param_6,param_7,
*(int4 *)(lVar1 + 0x7d4),param_5,local_58);
if (local_34 != 0) {
local_50 = 5;
if (local_34 == 4) {
local_50 = 6;
}
local_48 = 0;
insert_dynamic(local_20 + 0x5d,local_58);
*(int *)(local_18 + 6) = (int)local_20[0x5e] + -1;
}
plVar2 = local_20;
if (local_40 == local_20[0x6f]) {
*(int1 *)((long)local_20 + 0x685) = 1;
}
else if (local_40 == 0) {
local_20[0x88] = -1;
puVar3 = (int4 *)_my_thread_var();
_ma_set_fatal_error(plVar2,*puVar3);
return 1;
}
local_20[0x88] = local_30;
*local_18 = local_20;
local_18[1] = local_28;
local_18[2] = local_40;
local_18[3] = local_30;
*(uint *)(local_18 + 4) =
(uint)CONCAT11(*(int1 *)(local_40 + -2 + (ulong)*(uint *)(lVar1 + 0x744)),
*(int1 *)(local_40 + -1 + (ulong)*(uint *)(lVar1 + 0x744)));
*(int4 *)((long)local_18 + 0x24) = *(int4 *)(local_18 + 4);
*(uint *)((long)local_18 + 0x2c) =
(uint)*(byte *)(local_40 + (ulong)(*(int *)(lVar1 + 0x744) - 3));
if ((*(uint *)((long)local_18 + 0x2c) & 1) == 0) {
local_74 = 0;
}
else {
local_74 = *(int4 *)(lVar1 + 0x3e4);
}
*(int4 *)(local_18 + 5) = local_74;
return 0;
}
|
|
57,928
|
codegen_type_to_c_type
|
tsotchke[P]eshkol/src/backend/codegen/type_conversion.c
|
const char* codegen_type_to_c_type(Type* type) {
assert(type != NULL);
switch (type->kind) {
case TYPE_VOID:
return "void";
case TYPE_BOOLEAN:
return "bool";
case TYPE_INTEGER:
switch (type->int_size) {
case INT_SIZE_8:
return "int8_t";
case INT_SIZE_16:
return "int16_t";
case INT_SIZE_32:
return "int32_t";
case INT_SIZE_64:
return "int64_t";
default:
return "int";
}
case TYPE_FLOAT:
switch (type->float_size) {
case FLOAT_SIZE_32:
return "float";
case FLOAT_SIZE_64:
return "double";
default:
return "double";
}
case TYPE_CHAR:
return "char";
case TYPE_STRING:
return "char*";
case TYPE_SYMBOL:
return "char*";
case TYPE_PAIR:
return "Pair*";
case TYPE_VECTOR:
if (type->vector.element_type) {
switch (type->vector.element_type->kind) {
case TYPE_BOOLEAN:
return "VectorB*";
case TYPE_INTEGER:
return "VectorI*";
case TYPE_FLOAT:
return "VectorF*";
case TYPE_CHAR:
return "VectorC*";
case TYPE_STRING:
return "VectorS*";
default:
return "Vector*";
}
} else {
return "Vector*";
}
case TYPE_FUNCTION:
return "void*"; // Function pointers are complex in C
case TYPE_STRUCT:
return "void*"; // Structs are complex in C
case TYPE_UNION:
return "void*"; // Unions are complex in C
case TYPE_ANY:
return "void*";
case TYPE_UNKNOWN:
return "void*";
default:
return "void*";
}
}
|
O0
|
c
|
codegen_type_to_c_type:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x10a35
jmp 0x10a54
leaq 0x5cfb(%rip), %rdi # 0x16737
leaq 0xad11(%rip), %rsi # 0x1b754
movl $0x10, %edx
leaq 0xad65(%rip), %rcx # 0x1b7b4
callq 0x1120
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
subq $0xd, %rax
ja 0x10c7a
movq -0x18(%rbp), %rax
leaq 0xac85(%rip), %rcx # 0x1b6f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x7d9d(%rip), %rax # 0x18820
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xad4c(%rip), %rax # 0x1b7df
movq %rax, -0x8(%rbp)
jmp 0x10c85
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x20(%rbp)
subq $0x3, %rax
ja 0x10b01
movq -0x20(%rbp), %rax
leaq 0xac8c(%rip), %rcx # 0x1b744
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xad1c(%rip), %rax # 0x1b7e4
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xad13(%rip), %rax # 0x1b7eb
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xad0b(%rip), %rax # 0x1b7f3
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xad03(%rip), %rax # 0x1b7fb
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xacfb(%rip), %rax # 0x1b803
movq %rax, -0x8(%rbp)
jmp 0x10c85
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
testl %eax, %eax
je 0x10b2b
jmp 0x10b21
movl -0x24(%rbp), %eax
subl $0x1, %eax
je 0x10b3b
jmp 0x10b4b
leaq 0x7d05(%rip), %rax # 0x18837
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xacc5(%rip), %rax # 0x1b807
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xacb5(%rip), %rax # 0x1b807
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xacac(%rip), %rax # 0x1b80e
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xaca1(%rip), %rax # 0x1b813
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xac91(%rip), %rax # 0x1b813
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xac87(%rip), %rax # 0x1b819
movq %rax, -0x8(%rbp)
jmp 0x10c85
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x10c2c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x4, %eax
ja 0x10c1f
movq -0x30(%rbp), %rax
leaq 0xab64(%rip), %rcx # 0x1b730
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xac43(%rip), %rax # 0x1b81f
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xac3c(%rip), %rax # 0x1b828
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xac35(%rip), %rax # 0x1b831
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xac2e(%rip), %rax # 0x1b83a
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xac2a(%rip), %rax # 0x1b843
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xac26(%rip), %rax # 0x1b84c
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xac19(%rip), %rax # 0x1b84c
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xac14(%rip), %rax # 0x1b854
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xac07(%rip), %rax # 0x1b854
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xabfa(%rip), %rax # 0x1b854
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xabed(%rip), %rax # 0x1b854
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xabe0(%rip), %rax # 0x1b854
movq %rax, -0x8(%rbp)
jmp 0x10c85
leaq 0xabd3(%rip), %rax # 0x1b854
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
|
codegen_type_to_c_type:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0
jz short loc_10A35
jmp short loc_10A54
loc_10A35:
lea rdi, aReturnTypeNull+7; "type != NULL"
lea rsi, aWorkspaceLlm4b_19; "/workspace/llm4binary/github/2025_star3"...
mov edx, 10h
lea rcx, aConstCharCodeg; "const char *codegen_type_to_c_type(Type"...
call ___assert_fail
loc_10A54:
mov rax, [rbp+var_10]
mov eax, [rax]
mov [rbp+var_18], rax
sub rax, 0Dh; switch 14 cases
ja def_10A7A; jumptable 0000000000010A7A default case
mov rax, [rbp+var_18]
lea rcx, jpt_10A7A
movsxd rax, ds:(jpt_10A7A - 1B6F8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_10A7C:
lea rax, aVoid; jumptable 0000000000010A7A case 0
mov [rbp+var_8], rax
jmp loc_10C85
loc_10A8C:
lea rax, aBool; jumptable 0000000000010A7A case 1
mov [rbp+var_8], rax
jmp loc_10C85
loc_10A9C:
mov rax, [rbp+var_10]; jumptable 0000000000010A7A case 2
mov eax, [rax+8]
mov [rbp+var_20], rax
sub rax, 3; switch 4 cases
ja short def_10ABF; jumptable 0000000000010ABF default case
mov rax, [rbp+var_20]
lea rcx, jpt_10ABF
movsxd rax, ds:(jpt_10ABF - 1B744h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_10AC1:
lea rax, aInt8T; jumptable 0000000000010ABF case 0
mov [rbp+var_8], rax
jmp loc_10C85
loc_10AD1:
lea rax, aInt16T; jumptable 0000000000010ABF case 1
mov [rbp+var_8], rax
jmp loc_10C85
loc_10AE1:
lea rax, aInt32T; jumptable 0000000000010ABF case 2
mov [rbp+var_8], rax
jmp loc_10C85
loc_10AF1:
lea rax, aInt64T; jumptable 0000000000010ABF case 3
mov [rbp+var_8], rax
jmp loc_10C85
def_10ABF:
lea rax, aInt_0; jumptable 0000000000010ABF default case
mov [rbp+var_8], rax
jmp loc_10C85
loc_10B11:
mov rax, [rbp+var_10]; jumptable 0000000000010A7A case 3
mov eax, [rax+8]
mov [rbp+var_24], eax
test eax, eax
jz short loc_10B2B
jmp short $+2
loc_10B21:
mov eax, [rbp+var_24]
sub eax, 1
jz short loc_10B3B
jmp short loc_10B4B
loc_10B2B:
lea rax, aFloat; "float"
mov [rbp+var_8], rax
jmp loc_10C85
loc_10B3B:
lea rax, aDouble; "double"
mov [rbp+var_8], rax
jmp loc_10C85
loc_10B4B:
lea rax, aDouble; "double"
mov [rbp+var_8], rax
jmp loc_10C85
loc_10B5B:
lea rax, aChar; jumptable 0000000000010A7A case 4
mov [rbp+var_8], rax
jmp loc_10C85
loc_10B6B:
lea rax, aChar_0; jumptable 0000000000010A7A case 5
mov [rbp+var_8], rax
jmp loc_10C85
loc_10B7B:
lea rax, aChar_0; jumptable 0000000000010A7A case 6
mov [rbp+var_8], rax
jmp loc_10C85
loc_10B8B:
lea rax, aPair; jumptable 0000000000010A7A case 7
mov [rbp+var_8], rax
jmp loc_10C85
loc_10B9B:
mov rax, [rbp+var_10]; jumptable 0000000000010A7A case 8
cmp qword ptr [rax+8], 0
jz loc_10C2C
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov eax, [rax]
dec eax; switch 5 cases
mov ecx, eax
mov [rbp+var_30], rcx
sub eax, 4
ja short def_10BD3; jumptable 0000000000010BD3 default case
mov rax, [rbp+var_30]
lea rcx, jpt_10BD3
movsxd rax, ds:(jpt_10BD3 - 1B730h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_10BD5:
lea rax, aVectorb; jumptable 0000000000010BD3 case 1
mov [rbp+var_8], rax
jmp loc_10C85
loc_10BE5:
lea rax, aVectori; jumptable 0000000000010BD3 case 2
mov [rbp+var_8], rax
jmp loc_10C85
loc_10BF5:
lea rax, aVectorf; jumptable 0000000000010BD3 case 3
mov [rbp+var_8], rax
jmp loc_10C85
loc_10C05:
lea rax, aVectorc; jumptable 0000000000010BD3 case 4
mov [rbp+var_8], rax
jmp short loc_10C85
loc_10C12:
lea rax, aVectors; jumptable 0000000000010BD3 case 5
mov [rbp+var_8], rax
jmp short loc_10C85
def_10BD3:
lea rax, aVector_0; jumptable 0000000000010BD3 default case
mov [rbp+var_8], rax
jmp short loc_10C85
loc_10C2C:
lea rax, aVector_0; "Vector*"
mov [rbp+var_8], rax
jmp short loc_10C85
loc_10C39:
lea rax, aVoid_1; jumptable 0000000000010A7A case 9
mov [rbp+var_8], rax
jmp short loc_10C85
loc_10C46:
lea rax, aVoid_1; jumptable 0000000000010A7A case 10
mov [rbp+var_8], rax
jmp short loc_10C85
loc_10C53:
lea rax, aVoid_1; jumptable 0000000000010A7A case 11
mov [rbp+var_8], rax
jmp short loc_10C85
loc_10C60:
lea rax, aVoid_1; jumptable 0000000000010A7A case 12
mov [rbp+var_8], rax
jmp short loc_10C85
loc_10C6D:
lea rax, aVoid_1; jumptable 0000000000010A7A case 13
mov [rbp+var_8], rax
jmp short loc_10C85
def_10A7A:
lea rax, aVoid_1; jumptable 0000000000010A7A default case
mov [rbp+var_8], rax
loc_10C85:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
const char * codegen_type_to_c_type(_DWORD *a1)
{
const char *v2; // [rsp+28h] [rbp-8h]
if ( !a1 )
__assert_fail(
"type != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/type_conversion.c",
16LL,
"const char *codegen_type_to_c_type(Type *)");
switch ( *a1 )
{
case 0:
v2 = "void";
break;
case 1:
v2 = "bool";
break;
case 2:
switch ( a1[2] )
{
case 0:
v2 = "int8_t";
break;
case 1:
v2 = "int16_t";
break;
case 2:
v2 = "int32_t";
break;
case 3:
v2 = "int64_t";
break;
default:
v2 = "int";
break;
}
break;
case 3:
if ( a1[2] )
v2 = "double";
else
v2 = "float";
break;
case 4:
v2 = "char";
break;
case 5:
v2 = "char*";
break;
case 6:
v2 = "char*";
break;
case 7:
v2 = "Pair*";
break;
case 8:
if ( *((_QWORD *)a1 + 1) )
{
switch ( **((_DWORD **)a1 + 1) )
{
case 1:
v2 = "VectorB*";
break;
case 2:
v2 = "VectorI*";
break;
case 3:
v2 = "VectorF*";
break;
case 4:
v2 = "VectorC*";
break;
case 5:
v2 = "VectorS*";
break;
default:
v2 = "Vector*";
break;
}
}
else
{
v2 = "Vector*";
}
break;
case 9:
v2 = "void*";
break;
case 0xA:
v2 = "void*";
break;
case 0xB:
v2 = "void*";
break;
case 0xC:
v2 = "void*";
break;
case 0xD:
v2 = "void*";
break;
default:
v2 = "void*";
break;
}
return v2;
}
|
codegen_type_to_c_type:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00110a35
JMP 0x00110a54
LAB_00110a35:
LEA RDI,[0x116737]
LEA RSI,[0x11b754]
MOV EDX,0x10
LEA RCX,[0x11b7b4]
CALL 0x00101120
LAB_00110a54:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
SUB RAX,0xd
JA 0x00110c7a
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x11b6f8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RAX,[0x118820]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_1:
LEA RAX,[0x11b7df]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_2:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
SUB RAX,0x3
JA 0x00110b01
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x11b744]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RAX,[0x11b7e4]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_1:
LEA RAX,[0x11b7eb]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_2:
LEA RAX,[0x11b7f3]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_3:
LEA RAX,[0x11b7fb]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
default:
LEA RAX,[0x11b803]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_3:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x24],EAX
TEST EAX,EAX
JZ 0x00110b2b
JMP 0x00110b21
LAB_00110b21:
MOV EAX,dword ptr [RBP + -0x24]
SUB EAX,0x1
JZ 0x00110b3b
JMP 0x00110b4b
LAB_00110b2b:
LEA RAX,[0x118837]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
LAB_00110b3b:
LEA RAX,[0x11b807]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
LAB_00110b4b:
LEA RAX,[0x11b807]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_4:
LEA RAX,[0x11b80e]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_5:
LEA RAX,[0x11b813]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_6:
LEA RAX,[0x11b813]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_7:
LEA RAX,[0x11b819]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_8:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00110c2c
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RAX]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x30],RCX
SUB EAX,0x4
JA 0x00110c1f
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x11b730]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
LEA RAX,[0x11b81f]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_2:
LEA RAX,[0x11b828]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_3:
LEA RAX,[0x11b831]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_4:
LEA RAX,[0x11b83a]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_5:
LEA RAX,[0x11b843]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
default:
LEA RAX,[0x11b84c]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
LAB_00110c2c:
LEA RAX,[0x11b84c]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_9:
LEA RAX,[0x11b854]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_a:
LEA RAX,[0x11b854]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_b:
LEA RAX,[0x11b854]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_c:
LEA RAX,[0x11b854]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
caseD_d:
LEA RAX,[0x11b854]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00110c85
default:
LEA RAX,[0x11b854]
MOV qword ptr [RBP + -0x8],RAX
LAB_00110c85:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
char * codegen_type_to_c_type(int4 *param_1)
{
char *local_10;
if (param_1 == (int4 *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("type != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/type_conversion.c"
,0x10,"const char *codegen_type_to_c_type(Type *)");
}
switch(*param_1) {
case 0:
local_10 = "void";
break;
case 1:
local_10 = "bool";
break;
case 2:
switch(param_1[2]) {
case 0:
local_10 = "int8_t";
break;
case 1:
local_10 = "int16_t";
break;
case 2:
local_10 = "int32_t";
break;
case 3:
local_10 = "int64_t";
break;
default:
local_10 = "int";
}
break;
case 3:
if (param_1[2] == 0) {
local_10 = "float";
}
else if (param_1[2] == 1) {
local_10 = "double";
}
else {
local_10 = "double";
}
break;
case 4:
local_10 = "char";
break;
case 5:
local_10 = "char*";
break;
case 6:
local_10 = "char*";
break;
case 7:
local_10 = "Pair*";
break;
case 8:
if (*(long *)(param_1 + 2) == 0) {
local_10 = "Vector*";
}
else {
switch(**(int4 **)(param_1 + 2)) {
case 1:
local_10 = "VectorB*";
break;
case 2:
local_10 = "VectorI*";
break;
case 3:
local_10 = "VectorF*";
break;
case 4:
local_10 = "VectorC*";
break;
case 5:
local_10 = "VectorS*";
break;
default:
local_10 = "Vector*";
}
}
break;
case 9:
local_10 = "void*";
break;
case 10:
local_10 = "void*";
break;
case 0xb:
local_10 = "void*";
break;
case 0xc:
local_10 = "void*";
break;
case 0xd:
local_10 = "void*";
break;
default:
local_10 = "void*";
}
return local_10;
}
|
|
57,929
|
l_delete(LF_SLIST**, charset_info_st const*, unsigned int, unsigned char const*, unsigned int, LF_PINS*)
|
eloqsql/mysys/lf_hash.cc
|
static int l_delete(LF_SLIST **head, CHARSET_INFO *cs, uint32 hashnr,
const uchar *key, uint keylen, LF_PINS *pins)
{
CURSOR cursor;
int res;
for (;;)
{
if (!l_find(head, cs, hashnr, key, keylen, &cursor, pins, 0))
{
res= 1; /* not found */
break;
}
else
{
/* mark the node deleted */
if (my_atomic_casptr((void **) (char*) &(cursor.curr->link),
(void **) (char*) &cursor.next,
(void *)(((intptr)cursor.next) | 1)))
{
/* and remove it from the list */
if (my_atomic_casptr((void **)cursor.prev,
(void **)(char*)&cursor.curr, cursor.next))
lf_alloc_free(pins, cursor.curr);
else
{
/*
somebody already "helped" us and removed the node ?
Let's check if we need to help that someone too!
(to ensure the number of "set DELETED flag" actions
is equal to the number of "remove from the list" actions)
*/
l_find(head, cs, hashnr, key, keylen, &cursor, pins, 0);
}
res= 0;
break;
}
}
}
lf_unpin(pins, 0);
lf_unpin(pins, 1);
lf_unpin(pins, 2);
return res;
}
|
O0
|
cpp
|
l_delete(LF_SLIST**, charset_info_st const*, unsigned int, unsigned char const*, unsigned int, LF_PINS*):
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %eax
movl %eax, %r8d
movq -0x30(%rbp), %rax
leaq -0x48(%rbp), %r9
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0xfe1b0
cmpl $0x0, %eax
jne 0xfdd25
movl $0x1, -0x4c(%rbp)
jmp 0xfde38
leaq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
orq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x91(%rbp)
movq %rcx, -0x90(%rbp)
testb $0x1, %al
jne 0xfdd75
movq -0xa0(%rbp), %rax
movq -0x90(%rbp), %rcx
movq %rcx, (%rax)
movb -0x91(%rbp), %al
andb $0x1, %al
movb %al, -0x59(%rbp)
testb $0x1, -0x59(%rbp)
je 0xfde31
leaq -0x40(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq -0x68(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0xa9(%rbp)
movq %rcx, -0xa8(%rbp)
testb $0x1, %al
jne 0xfddd6
movq -0xb8(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, (%rax)
movb -0xa9(%rbp), %al
andb $0x1, %al
movb %al, -0x69(%rbp)
testb $0x1, -0x69(%rbp)
je 0xfddf6
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0xfc740
jmp 0xfde28
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %eax
movl %eax, %r8d
movq -0x30(%rbp), %rax
leaq -0x48(%rbp), %r9
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0xfe1b0
movl $0x0, -0x4c(%rbp)
jmp 0xfde38
jmp 0xfde33
jmp 0xfdce2
jmp 0xfde3a
jmp 0xfde3c
jmp 0xfde3e
movq -0x30(%rbp), %rcx
movq $0x0, -0x78(%rbp)
movq -0x78(%rbp), %rax
xchgq %rax, (%rcx)
jmp 0xfde53
jmp 0xfde55
jmp 0xfde57
movq -0x30(%rbp), %rcx
movq $0x0, -0x80(%rbp)
movq -0x80(%rbp), %rax
xchgq %rax, 0x8(%rcx)
jmp 0xfde6d
jmp 0xfde6f
jmp 0xfde71
movq -0x30(%rbp), %rcx
movq $0x0, -0x88(%rbp)
movq -0x88(%rbp), %rax
xchgq %rax, 0x10(%rcx)
movl -0x4c(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ZL8l_deletePP8LF_SLISTPK15charset_info_stjPKhjP7LF_PINS:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_30], r9
loc_FDCE2:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
mov rcx, [rbp+var_20]
mov eax, [rbp+var_24]
mov r8d, eax
mov rax, [rbp+var_30]
lea r9, [rbp+var_48]
xor r10d, r10d
mov [rsp+0D0h+var_D0], rax
mov [rsp+0D0h+var_C8], 0
call _ZL6l_findPP8LF_SLISTPK15charset_info_stjPKhmP6CURSORP7LF_PINSPFcPvSB_E; l_find(LF_SLIST **,charset_info_st const*,uint,uchar const*,ulong,CURSOR *,LF_PINS *,char (*)(void *,void *))
cmp eax, 0
jnz short loc_FDD25
mov [rbp+var_4C], 1
jmp loc_FDE38
loc_FDD25:
lea rax, [rbp+var_38]
mov [rbp+var_A0], rax
mov rcx, [rbp+var_40]
mov rax, [rbp+var_38]
or rax, 1
mov [rbp+var_58], rax
mov rax, [rbp+var_38]
mov rdx, [rbp+var_58]
lock cmpxchg [rcx], rdx
mov rcx, rax
setz al
mov [rbp+var_91], al
mov [rbp+var_90], rcx
test al, 1
jnz short loc_FDD75
mov rax, [rbp+var_A0]
mov rcx, [rbp+var_90]
mov [rax], rcx
loc_FDD75:
mov al, [rbp+var_91]
and al, 1
mov [rbp+var_59], al
test [rbp+var_59], 1
jz loc_FDE31
lea rax, [rbp+var_40]
mov [rbp+var_B8], rax
mov rcx, [rbp+var_48]
mov rax, [rbp+var_38]
mov [rbp+var_68], rax
mov rax, [rbp+var_40]
mov rdx, [rbp+var_68]
lock cmpxchg [rcx], rdx
mov rcx, rax
setz al
mov [rbp+var_A9], al
mov [rbp+var_A8], rcx
test al, 1
jnz short loc_FDDD6
mov rax, [rbp+var_B8]
mov rcx, [rbp+var_A8]
mov [rax], rcx
loc_FDDD6:
mov al, [rbp+var_A9]
and al, 1
mov [rbp+var_69], al
test [rbp+var_69], 1
jz short loc_FDDF6
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_40]
call lf_pinbox_free
jmp short loc_FDE28
loc_FDDF6:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
mov rcx, [rbp+var_20]
mov eax, [rbp+var_24]
mov r8d, eax
mov rax, [rbp+var_30]
lea r9, [rbp+var_48]
xor r10d, r10d
mov [rsp+0D0h+var_D0], rax
mov [rsp+0D0h+var_C8], 0
call _ZL6l_findPP8LF_SLISTPK15charset_info_stjPKhmP6CURSORP7LF_PINSPFcPvSB_E; l_find(LF_SLIST **,charset_info_st const*,uint,uchar const*,ulong,CURSOR *,LF_PINS *,char (*)(void *,void *))
loc_FDE28:
mov [rbp+var_4C], 0
jmp short loc_FDE38
loc_FDE31:
jmp short $+2
loc_FDE33:
jmp loc_FDCE2
loc_FDE38:
jmp short $+2
loc_FDE3A:
jmp short $+2
loc_FDE3C:
jmp short $+2
loc_FDE3E:
mov rcx, [rbp+var_30]
mov [rbp+var_78], 0
mov rax, [rbp+var_78]
xchg rax, [rcx]
jmp short $+2
loc_FDE53:
jmp short $+2
loc_FDE55:
jmp short $+2
loc_FDE57:
mov rcx, [rbp+var_30]
mov [rbp+var_80], 0
mov rax, [rbp+var_80]
xchg rax, [rcx+8]
jmp short $+2
loc_FDE6D:
jmp short $+2
loc_FDE6F:
jmp short $+2
loc_FDE71:
mov rcx, [rbp+var_30]
mov [rbp+var_88], 0
mov rax, [rbp+var_88]
xchg rax, [rcx+10h]
mov eax, [rbp+var_4C]
add rsp, 0D0h
pop rbp
retn
|
long long l_delete(long long a1, long long a2, int a3, long long a4, int a5, volatile long long *a6)
{
signed long long v6; // rax
signed long long v7; // rtt
char *v8; // rtt
const char *v9; // rcx
bool v11; // [rsp+27h] [rbp-A9h]
bool v12; // [rsp+3Fh] [rbp-91h]
unsigned int v13; // [rsp+84h] [rbp-4Ch]
volatile signed long long *v14; // [rsp+88h] [rbp-48h] BYREF
char *v15; // [rsp+90h] [rbp-40h]
signed long long v16; // [rsp+98h] [rbp-38h]
volatile long long *v17; // [rsp+A0h] [rbp-30h]
int v18; // [rsp+ACh] [rbp-24h]
long long v19; // [rsp+B0h] [rbp-20h]
int v20; // [rsp+BCh] [rbp-14h]
long long v21; // [rsp+C0h] [rbp-10h]
long long v22; // [rsp+C8h] [rbp-8h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
do
{
if ( !(unsigned int)l_find(v22, v21, v20, v19, v18, (unsigned int)&v14, (long long)v17, 0LL) )
{
v13 = 1;
goto LABEL_14;
}
v7 = v16;
v6 = _InterlockedCompareExchange64((volatile signed long long *)v15, v16 | 1, v16);
v12 = v7 == v6;
if ( v7 != v6 )
v16 = v6;
}
while ( !v12 );
v8 = v15;
v9 = (const char *)_InterlockedCompareExchange64(v14, v16, (signed long long)v15);
v11 = v8 == v9;
if ( v8 != v9 )
v15 = (char *)v9;
if ( v11 )
lf_pinbox_free((long long)v17, v15);
else
l_find(v22, v21, v20, v19, v18, (unsigned int)&v14, (long long)v17, 0LL);
v13 = 0;
LABEL_14:
_InterlockedExchange64(v17, 0LL);
_InterlockedExchange64(v17 + 1, 0LL);
_InterlockedExchange64(v17 + 2, 0LL);
return v13;
}
|
l_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV qword ptr [RBP + -0x30],R9
LAB_001fdce2:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x24]
MOV R8D,EAX
MOV RAX,qword ptr [RBP + -0x30]
LEA R9,[RBP + -0x48]
XOR R10D,R10D
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
CALL 0x001fe1b0
CMP EAX,0x0
JNZ 0x001fdd25
MOV dword ptr [RBP + -0x4c],0x1
JMP 0x001fde38
LAB_001fdd25:
LEA RAX,[RBP + -0x38]
MOV qword ptr [RBP + -0xa0],RAX
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
OR RAX,0x1
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x58]
CMPXCHG.LOCK qword ptr [RCX],RDX
MOV RCX,RAX
SETZ AL
MOV byte ptr [RBP + -0x91],AL
MOV qword ptr [RBP + -0x90],RCX
TEST AL,0x1
JNZ 0x001fdd75
MOV RAX,qword ptr [RBP + -0xa0]
MOV RCX,qword ptr [RBP + -0x90]
MOV qword ptr [RAX],RCX
LAB_001fdd75:
MOV AL,byte ptr [RBP + -0x91]
AND AL,0x1
MOV byte ptr [RBP + -0x59],AL
TEST byte ptr [RBP + -0x59],0x1
JZ 0x001fde31
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0xb8],RAX
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x68]
CMPXCHG.LOCK qword ptr [RCX],RDX
MOV RCX,RAX
SETZ AL
MOV byte ptr [RBP + -0xa9],AL
MOV qword ptr [RBP + -0xa8],RCX
TEST AL,0x1
JNZ 0x001fddd6
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RBP + -0xa8]
MOV qword ptr [RAX],RCX
LAB_001fddd6:
MOV AL,byte ptr [RBP + -0xa9]
AND AL,0x1
MOV byte ptr [RBP + -0x69],AL
TEST byte ptr [RBP + -0x69],0x1
JZ 0x001fddf6
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x40]
CALL 0x001fc740
JMP 0x001fde28
LAB_001fddf6:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x24]
MOV R8D,EAX
MOV RAX,qword ptr [RBP + -0x30]
LEA R9,[RBP + -0x48]
XOR R10D,R10D
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
CALL 0x001fe1b0
LAB_001fde28:
MOV dword ptr [RBP + -0x4c],0x0
JMP 0x001fde38
LAB_001fde31:
JMP 0x001fde33
LAB_001fde33:
JMP 0x001fdce2
LAB_001fde38:
JMP 0x001fde3a
LAB_001fde3a:
JMP 0x001fde3c
LAB_001fde3c:
JMP 0x001fde3e
LAB_001fde3e:
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x78],0x0
MOV RAX,qword ptr [RBP + -0x78]
XCHG qword ptr [RCX],RAX
JMP 0x001fde53
LAB_001fde53:
JMP 0x001fde55
LAB_001fde55:
JMP 0x001fde57
LAB_001fde57:
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x80],0x0
MOV RAX,qword ptr [RBP + -0x80]
XCHG qword ptr [RCX + 0x8],RAX
JMP 0x001fde6d
LAB_001fde6d:
JMP 0x001fde6f
LAB_001fde6f:
JMP 0x001fde71
LAB_001fde71:
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x88],0x0
MOV RAX,qword ptr [RBP + -0x88]
XCHG qword ptr [RCX + 0x10],RAX
MOV EAX,dword ptr [RBP + -0x4c]
ADD RSP,0xd0
POP RBP
RET
|
/* l_delete(LF_SLIST**, charset_info_st const*, unsigned int, unsigned char const*, unsigned int,
LF_PINS*) */
int4
l_delete(LF_SLIST **param_1,charset_info_st *param_2,uint param_3,uchar *param_4,uint param_5,
LF_PINS *param_6)
{
ulong *puVar1;
int iVar2;
ulong uVar3;
bool bVar4;
int4 local_54;
ulong *local_50;
ulong *local_48;
ulong local_40;
LF_PINS *local_38;
uint local_2c;
uchar *local_28;
uint local_1c;
charset_info_st *local_18;
LF_SLIST **local_10;
uVar3 = local_40;
local_38 = param_6;
local_2c = param_5;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
do {
local_40 = uVar3;
iVar2 = l_find(local_10,local_18,local_1c,local_28,(ulong)local_2c,(CURSOR *)&local_50,local_38,
(_func_char_void_ptr_void_ptr *)0x0);
if (iVar2 == 0) {
local_54 = 1;
goto LAB_001fde38;
}
LOCK();
uVar3 = *local_48;
bVar4 = local_40 == uVar3;
if (bVar4) {
*local_48 = local_40 | 1;
uVar3 = local_40;
}
UNLOCK();
} while (!bVar4);
LOCK();
puVar1 = (ulong *)*local_50;
if (local_48 == puVar1) {
*local_50 = local_40;
}
UNLOCK();
if (local_48 == puVar1) {
lf_pinbox_free(local_38,local_48);
}
else {
l_find(local_10,local_18,local_1c,local_28,(ulong)local_2c,(CURSOR *)&local_50,local_38,
(_func_char_void_ptr_void_ptr *)0x0);
}
local_54 = 0;
LAB_001fde38:
LOCK();
*(int8 *)local_38 = 0;
UNLOCK();
LOCK();
*(int8 *)(local_38 + 8) = 0;
UNLOCK();
LOCK();
*(int8 *)(local_38 + 0x10) = 0;
UNLOCK();
return local_54;
}
|
|
57,930
|
get_current_logfile
|
eloqsql/storage/maria/ma_loghandler.c
|
static TRANSLOG_FILE *get_current_logfile()
{
TRANSLOG_FILE *file;
DBUG_ENTER("get_current_logfile");
mysql_rwlock_rdlock(&log_descriptor.open_files_lock);
DBUG_PRINT("info", ("max_file: %lu min_file: %lu open_files: %lu",
(ulong) log_descriptor.max_file,
(ulong) log_descriptor.min_file,
(ulong) log_descriptor.open_files.elements));
DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 ==
log_descriptor.open_files.elements);
file= *dynamic_element(&log_descriptor.open_files, 0, TRANSLOG_FILE **);
mysql_rwlock_unlock(&log_descriptor.open_files_lock);
DBUG_RETURN(file);
}
|
O0
|
c
|
get_current_logfile:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x41c4a1(%rip), %rdi # 0x47a660
addq $0x258, %rdi # imm = 0x258
leaq 0xf4dec(%rip), %rsi # 0x152fb9
movl $0x43f, %edx # imm = 0x43F
callq 0x59df0
jmp 0x5e1d9
jmp 0x5e1db
jmp 0x5e1dd
movq 0x41c6a4(%rip), %rax # 0x47a888
movq (%rax), %rax
movq %rax, -0x8(%rbp)
leaq 0x41c46e(%rip), %rdi # 0x47a660
addq $0x258, %rdi # imm = 0x258
callq 0x58c80
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
|
get_current_logfile:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rdi, log_descriptor
add rdi, 258h
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 43Fh
call inline_mysql_rwlock_rdlock_0
jmp short $+2
loc_5E1D9:
jmp short $+2
loc_5E1DB:
jmp short $+2
loc_5E1DD:
mov rax, cs:qword_47A888
mov rax, [rax]
mov [rbp+var_8], rax
lea rdi, log_descriptor
add rdi, 258h
call inline_mysql_rwlock_unlock_1
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
add rsp, 10h
pop rbp
retn
|
long long get_current_logfile()
{
long long v1; // [rsp+8h] [rbp-8h]
inline_mysql_rwlock_rdlock_0(
(long long)&log_descriptor[75],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x43Fu);
v1 = *(_QWORD *)qword_47A888;
inline_mysql_rwlock_unlock_1((long long)&log_descriptor[75]);
return v1;
}
|
get_current_logfile:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RDI,[0x57a660]
ADD RDI,0x258
LEA RSI,[0x252fb9]
MOV EDX,0x43f
CALL 0x00159df0
JMP 0x0015e1d9
LAB_0015e1d9:
JMP 0x0015e1db
LAB_0015e1db:
JMP 0x0015e1dd
LAB_0015e1dd:
MOV RAX,qword ptr [0x0057a888]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[0x57a660]
ADD RDI,0x258
CALL 0x00158c80
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x10
POP RBP
RET
|
int8 get_current_logfile(void)
{
int8 uVar1;
inline_mysql_rwlock_rdlock
(&DAT_0057a8b8,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x43f);
uVar1 = *DAT_0057a888;
inline_mysql_rwlock_unlock(&DAT_0057a8b8);
return uVar1;
}
|
|
57,931
|
mi_kpos
|
eloqsql/storage/myisam/mi_search.c
|
my_off_t _mi_kpos(uint nod_flag, uchar *after_key)
{
after_key-=nod_flag;
switch (nod_flag) {
#if SIZEOF_OFF_T > 4
case 7:
return mi_uint7korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH;
case 6:
return mi_uint6korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH;
case 5:
return mi_uint5korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH;
#else
case 7:
after_key++;
case 6:
after_key++;
case 5:
after_key++;
#endif
case 4:
return ((my_off_t) mi_uint4korr(after_key))*MI_MIN_KEY_BLOCK_LENGTH;
case 3:
return ((my_off_t) mi_uint3korr(after_key))*MI_MIN_KEY_BLOCK_LENGTH;
case 2:
return (my_off_t) (mi_uint2korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH);
case 1:
return (uint) (*after_key)*MI_MIN_KEY_BLOCK_LENGTH;
case 0: /* At leaf page */
default: /* Impossible */
return(HA_OFFSET_ERROR);
}
}
|
O3
|
c
|
mi_kpos:
pushq %rbp
movq %rsp, %rbp
leal -0x1(%rdi), %eax
cmpl $0x6, %eax
ja 0x409bb
movl %edi, %ecx
negq %rcx
leaq 0x5a99a(%rip), %rdx # 0x9b2e4
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movzbl (%rsi,%rcx), %eax
shll $0xa, %eax
jmp 0x40a0f
movl (%rsi,%rcx), %eax
movzbl 0x4(%rsi,%rcx), %ecx
shlq $0x38, %rcx
shlq $0x18, %rax
jmp 0x40a05
movzbl 0x2(%rsi,%rcx), %eax
movzbl 0x1(%rsi,%rcx), %edx
movzbl (%rsi,%rcx), %ecx
shlq $0x1a, %rcx
shll $0x12, %edx
shll $0xa, %eax
orl %edx, %eax
jmp 0x409b6
movzbl 0x3(%rsi,%rcx), %eax
movzbl 0x2(%rsi,%rcx), %edx
movzbl 0x1(%rsi,%rcx), %edi
movzbl (%rsi,%rcx), %ecx
shlq $0x22, %rcx
shlq $0x1a, %rdi
shll $0x12, %edx
shll $0xa, %eax
orl %edx, %eax
orq %rdi, %rax
orq %rcx, %rax
jmp 0x40a0f
movq $-0x1, %rax
jmp 0x40a0f
movzbl 0x1(%rsi,%rcx), %eax
movzbl (%rsi,%rcx), %ecx
shll $0x12, %ecx
shll $0xa, %eax
orl %ecx, %eax
jmp 0x40a0f
movl (%rsi,%rcx), %eax
movzwl 0x4(%rsi,%rcx), %ecx
shlq $0x30, %rcx
shlq $0x10, %rax
jmp 0x40a05
movl (%rsi,%rcx), %eax
movzwl 0x4(%rsi,%rcx), %edx
movzbl 0x6(%rsi,%rcx), %ecx
shlq $0x38, %rcx
shlq $0x28, %rdx
shlq $0x8, %rax
orq %rdx, %rax
orq %rcx, %rax
bswapq %rax
shlq $0xa, %rax
popq %rbp
retq
|
_mi_kpos:
push rbp
mov rbp, rsp
lea eax, [rdi-1]; switch 7 cases
cmp eax, 6
ja short def_40951; jumptable 0000000000040951 default case
mov ecx, edi
neg rcx
lea rdx, jpt_40951
movsxd rax, ds:(jpt_40951 - 9B2E4h)[rdx+rax*4]
add rax, rdx
jmp rax; switch jump
loc_40953:
movzx eax, byte ptr [rsi+rcx]; jumptable 0000000000040951 case 1
shl eax, 0Ah
jmp loc_40A0F
loc_4095F:
mov eax, [rsi+rcx]; jumptable 0000000000040951 case 5
movzx ecx, byte ptr [rsi+rcx+4]
shl rcx, 38h
shl rax, 18h
jmp loc_40A05
loc_40974:
movzx eax, byte ptr [rsi+rcx+2]; jumptable 0000000000040951 case 3
movzx edx, byte ptr [rsi+rcx+1]
movzx ecx, byte ptr [rsi+rcx]
shl rcx, 1Ah
shl edx, 12h
shl eax, 0Ah
or eax, edx
jmp short loc_409B6
loc_40990:
movzx eax, byte ptr [rsi+rcx+3]; jumptable 0000000000040951 case 4
movzx edx, byte ptr [rsi+rcx+2]
movzx edi, byte ptr [rsi+rcx+1]
movzx ecx, byte ptr [rsi+rcx]
shl rcx, 22h
shl rdi, 1Ah
shl edx, 12h
shl eax, 0Ah
or eax, edx
or rax, rdi
loc_409B6:
or rax, rcx
jmp short loc_40A0F
def_40951:
mov rax, 0FFFFFFFFFFFFFFFFh; jumptable 0000000000040951 default case
jmp short loc_40A0F
loc_409C4:
movzx eax, byte ptr [rsi+rcx+1]; jumptable 0000000000040951 case 2
movzx ecx, byte ptr [rsi+rcx]
shl ecx, 12h
shl eax, 0Ah
or eax, ecx
jmp short loc_40A0F
loc_409D7:
mov eax, [rsi+rcx]; jumptable 0000000000040951 case 6
movzx ecx, word ptr [rsi+rcx+4]
shl rcx, 30h
shl rax, 10h
jmp short loc_40A05
loc_409E9:
mov eax, [rsi+rcx]; jumptable 0000000000040951 case 7
movzx edx, word ptr [rsi+rcx+4]
movzx ecx, byte ptr [rsi+rcx+6]
shl rcx, 38h
shl rdx, 28h
shl rax, 8
or rax, rdx
loc_40A05:
or rax, rcx
bswap rax
shl rax, 0Ah
loc_40A0F:
pop rbp
retn
|
unsigned long long mi_kpos(unsigned int a1, long long a2)
{
unsigned long long result; // rax
unsigned long long v3; // rcx
unsigned long long v4; // rax
unsigned long long v5; // rcx
unsigned long long v6; // rax
switch ( a1 )
{
case 1u:
return *(unsigned __int8 *)(a2 - a1) << 10;
case 2u:
return (*(unsigned __int8 *)(a2 - a1) << 18) | (*(unsigned __int8 *)(a2 - a1 + 1) << 10);
case 3u:
v5 = (unsigned long long)*(unsigned __int8 *)(a2 - a1) << 26;
v6 = (*(unsigned __int8 *)(a2 - a1 + 1) << 18) | (*(unsigned __int8 *)(a2 - a1 + 2) << 10);
return v5 | v6;
case 4u:
v5 = (unsigned long long)*(unsigned __int8 *)(a2 - a1) << 34;
v6 = ((unsigned long long)*(unsigned __int8 *)(a2 - a1 + 1) << 26) | (*(unsigned __int8 *)(a2 - a1 + 2) << 18) | (*(unsigned __int8 *)(a2 - a1 + 3) << 10);
return v5 | v6;
case 5u:
v3 = (unsigned long long)*(unsigned __int8 *)(a2 - a1 + 4) << 56;
v4 = (unsigned long long)*(unsigned int *)(a2 - a1) << 24;
goto LABEL_11;
case 6u:
v3 = (unsigned long long)*(unsigned __int16 *)(a2 - a1 + 4) << 48;
v4 = (unsigned long long)*(unsigned int *)(a2 - a1) << 16;
goto LABEL_11;
case 7u:
v3 = (unsigned long long)*(unsigned __int8 *)(a2 - a1 + 6) << 56;
v4 = ((unsigned long long)*(unsigned __int16 *)(a2 - a1 + 4) << 40) | ((unsigned long long)*(unsigned int *)(a2 - a1) << 8);
LABEL_11:
result = _byteswap_uint64(v3 | v4) << 10;
break;
default:
result = -1LL;
break;
}
return result;
}
|
_mi_kpos:
PUSH RBP
MOV RBP,RSP
LEA EAX,[RDI + -0x1]
CMP EAX,0x6
JA 0x001409bb
MOV ECX,EDI
NEG RCX
LEA RDX,[0x19b2e4]
MOVSXD RAX,dword ptr [RDX + RAX*0x4]
ADD RAX,RDX
switchD:
JMP RAX
caseD_1:
MOVZX EAX,byte ptr [RSI + RCX*0x1]
SHL EAX,0xa
JMP 0x00140a0f
caseD_5:
MOV EAX,dword ptr [RSI + RCX*0x1]
MOVZX ECX,byte ptr [RSI + RCX*0x1 + 0x4]
SHL RCX,0x38
SHL RAX,0x18
JMP 0x00140a05
caseD_3:
MOVZX EAX,byte ptr [RSI + RCX*0x1 + 0x2]
MOVZX EDX,byte ptr [RSI + RCX*0x1 + 0x1]
MOVZX ECX,byte ptr [RSI + RCX*0x1]
SHL RCX,0x1a
SHL EDX,0x12
SHL EAX,0xa
OR EAX,EDX
JMP 0x001409b6
caseD_4:
MOVZX EAX,byte ptr [RSI + RCX*0x1 + 0x3]
MOVZX EDX,byte ptr [RSI + RCX*0x1 + 0x2]
MOVZX EDI,byte ptr [RSI + RCX*0x1 + 0x1]
MOVZX ECX,byte ptr [RSI + RCX*0x1]
SHL RCX,0x22
SHL RDI,0x1a
SHL EDX,0x12
SHL EAX,0xa
OR EAX,EDX
OR RAX,RDI
LAB_001409b6:
OR RAX,RCX
JMP 0x00140a0f
LAB_001409bb:
MOV RAX,-0x1
JMP 0x00140a0f
caseD_2:
MOVZX EAX,byte ptr [RSI + RCX*0x1 + 0x1]
MOVZX ECX,byte ptr [RSI + RCX*0x1]
SHL ECX,0x12
SHL EAX,0xa
OR EAX,ECX
JMP 0x00140a0f
caseD_6:
MOV EAX,dword ptr [RSI + RCX*0x1]
MOVZX ECX,word ptr [RSI + RCX*0x1 + 0x4]
SHL RCX,0x30
SHL RAX,0x10
JMP 0x00140a05
caseD_7:
MOV EAX,dword ptr [RSI + RCX*0x1]
MOVZX EDX,word ptr [RSI + RCX*0x1 + 0x4]
MOVZX ECX,byte ptr [RSI + RCX*0x1 + 0x6]
SHL RCX,0x38
SHL RDX,0x28
SHL RAX,0x8
OR RAX,RDX
LAB_00140a05:
OR RAX,RCX
BSWAP RAX
SHL RAX,0xa
LAB_00140a0f:
POP RBP
RET
|
ulong _mi_kpos(uint param_1,long param_2)
{
ulong uVar1;
long lVar2;
ulong uVar3;
if (6 < param_1 - 1) {
return 0xffffffffffffffff;
}
lVar2 = -(ulong)param_1;
switch(param_1) {
case 1:
return (ulong)*(byte *)(param_2 + lVar2) << 10;
case 2:
return (ulong)((uint)*(byte *)(param_2 + 1 + lVar2) << 10 |
(uint)*(byte *)(param_2 + lVar2) << 0x12);
case 3:
uVar3 = (ulong)*(byte *)(param_2 + lVar2) << 0x1a;
uVar1 = (ulong)((uint)*(byte *)(param_2 + 2 + lVar2) << 10 |
(uint)*(byte *)(param_2 + 1 + lVar2) << 0x12);
goto LAB_001409b6;
case 4:
uVar3 = (ulong)*(byte *)(param_2 + lVar2) << 0x22;
uVar1 = (ulong)((uint)*(byte *)(param_2 + 3 + lVar2) << 10 |
(uint)*(byte *)(param_2 + 2 + lVar2) << 0x12) |
(ulong)*(byte *)(param_2 + 1 + lVar2) << 0x1a;
LAB_001409b6:
return uVar1 | uVar3;
case 5:
uVar3 = (ulong)*(byte *)(param_2 + 4 + lVar2) << 0x38;
uVar1 = (ulong)*(uint *)(param_2 + lVar2) << 0x18;
break;
case 6:
uVar3 = (ulong)*(ushort *)(param_2 + 4 + lVar2) << 0x30;
uVar1 = (ulong)*(uint *)(param_2 + lVar2) << 0x10;
break;
case 7:
uVar3 = (ulong)*(byte *)(param_2 + 6 + lVar2) << 0x38;
uVar1 = (ulong)*(uint *)(param_2 + lVar2) << 8 | (ulong)*(ushort *)(param_2 + 4 + lVar2) << 0x28
;
}
return (uVar3 >> 0x38 | ((uVar1 | uVar3) & 0xff000000000000) >> 0x28 |
(uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8
| (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28) << 10;
}
|
|
57,932
|
translog_get_last_page_addr
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_get_last_page_addr(TRANSLOG_ADDRESS *addr,
my_bool *last_page_ok,
my_bool no_errors)
{
char path[FN_REFLEN];
uint32 rec_offset;
my_off_t file_size;
uint32 file_no= LSN_FILE_NO(*addr);
TRANSLOG_FILE *file;
#ifndef DBUG_OFF
char buff[21];
#endif
DBUG_ENTER("translog_get_last_page_addr");
if (likely((file= get_logfile_by_number(file_no)) != NULL))
{
/*
This function used only during initialization of loghandler or in
scanner (which mean we need read that part of the log), so the
requested log file have to be opened and can't be freed after
returning pointer on it (file_size).
*/
file_size= mysql_file_seek(file->handler.file, 0, SEEK_END, MYF(0));
}
else
{
/*
This branch is used only during very early initialization
when files are not opened.
*/
File fd;
if ((fd= mysql_file_open(key_file_translog,
translog_filename_by_fileno(file_no, path),
O_RDONLY | O_CLOEXEC, (no_errors ? MYF(0) : MYF(MY_WME)))) < 0)
{
my_errno= errno;
DBUG_PRINT("error", ("Error %d during opening file #%d",
errno, file_no));
DBUG_RETURN(1);
}
file_size= mysql_file_seek(fd, 0, SEEK_END, MYF(0));
mysql_file_close(fd, MYF(0));
}
DBUG_PRINT("info", ("File size: %s", llstr(file_size, buff)));
if (file_size == MY_FILEPOS_ERROR)
DBUG_RETURN(1);
DBUG_ASSERT(file_size < 0xffffffffULL);
if (((uint32)file_size) > TRANSLOG_PAGE_SIZE)
{
rec_offset= (((((uint32)file_size) / TRANSLOG_PAGE_SIZE) - 1) *
TRANSLOG_PAGE_SIZE);
*last_page_ok= (((uint32)file_size) == rec_offset + TRANSLOG_PAGE_SIZE);
}
else
{
*last_page_ok= 0;
rec_offset= 0;
}
*addr= MAKE_LSN(file_no, rec_offset);
DBUG_PRINT("info", ("Last page: 0x%lx ok: %d", (ulong) rec_offset,
*last_page_ok));
DBUG_RETURN(0);
}
|
O0
|
c
|
translog_get_last_page_addr:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp # imm = 0x260
movb %dl, %al
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x220(%rbp)
movq %rsi, -0x228(%rbp)
movb %al, -0x229(%rbp)
movq -0x220(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, -0x23c(%rbp)
movl -0x23c(%rbp), %edi
callq 0x59d40
movq %rax, -0x248(%rbp)
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x530b8
movq -0x248(%rbp), %rax
movl 0x18(%rax), %edx
leaq 0xfff25(%rip), %rdi # 0x152fb9
movl $0xcd4, %esi # imm = 0xCD4
xorl %eax, %eax
movl %eax, %r9d
movl $0x2, %r8d
movq %r9, %rcx
callq 0x533b0
movq %rax, -0x238(%rbp)
jmp 0x5318b
leaq 0x425ef5(%rip), %rax # 0x478fb4
movl (%rax), %eax
movl %eax, -0x250(%rbp)
movl -0x23c(%rbp), %edi
leaq -0x210(%rbp), %rsi
callq 0x50ba0
movl -0x250(%rbp), %edi
movq %rax, %rcx
movsbl -0x229(%rbp), %edx
movl $0x10, %r9d
xorl %eax, %eax
cmpl $0x0, %edx
cmovneq %rax, %r9
leaq 0xffeba(%rip), %rsi # 0x152fb9
movl $0xcdf, %edx # imm = 0xCDF
movl $0x80000, %r8d # imm = 0x80000
callq 0x59bd0
movl %eax, -0x24c(%rbp)
cmpl $0x0, %eax
jge 0x53144
callq 0x2a760
movl (%rax), %eax
movl %eax, -0x254(%rbp)
callq 0xf7440
movl -0x254(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x53136
jmp 0x53138
movb $0x1, -0x211(%rbp)
jmp 0x53237
movl -0x24c(%rbp), %edx
leaq 0xffe68(%rip), %rdi # 0x152fb9
movl $0xce6, %esi # imm = 0xCE6
xorl %eax, %eax
movl %eax, %r9d
movl $0x2, %r8d
movq %r9, %rcx
callq 0x533b0
movq %rax, -0x238(%rbp)
movl -0x24c(%rbp), %edx
leaq 0xffe3c(%rip), %rdi # 0x152fb9
movl $0xce7, %esi # imm = 0xCE7
xorl %eax, %eax
movl %eax, %ecx
callq 0x51240
jmp 0x5318d
jmp 0x5318f
cmpq $-0x1, -0x238(%rbp)
jne 0x531a7
jmp 0x5319b
movb $0x1, -0x211(%rbp)
jmp 0x53237
jmp 0x531a9
jmp 0x531ab
movq -0x238(%rbp), %rax
cmpl $0x2000, %eax # imm = 0x2000
jbe 0x531f9
movq -0x238(%rbp), %rax
shrl $0xd, %eax
subl $0x1, %eax
shll $0xd, %eax
movl %eax, -0x230(%rbp)
movq -0x238(%rbp), %rax
movl -0x230(%rbp), %ecx
addl $0x2000, %ecx # imm = 0x2000
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x228(%rbp), %rax
movb %cl, (%rax)
jmp 0x5320d
movq -0x228(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x230(%rbp)
movl -0x23c(%rbp), %eax
movl %eax, %ecx
shlq $0x20, %rcx
movl -0x230(%rbp), %eax
orq %rax, %rcx
movq -0x220(%rbp), %rax
movq %rcx, (%rax)
jmp 0x5322e
jmp 0x53230
movb $0x0, -0x211(%rbp)
movb -0x211(%rbp), %al
movb %al, -0x255(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x53264
movb -0x255(%rbp), %al
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
callq 0x2a270
nopl (%rax)
|
translog_get_last_page_addr:
push rbp
mov rbp, rsp
sub rsp, 260h
mov al, dl
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_220], rdi
mov [rbp+var_228], rsi
mov [rbp+var_229], al
mov rax, [rbp+var_220]
mov rax, [rax]
sar rax, 20h
mov [rbp+var_23C], eax
mov edi, [rbp+var_23C]
call get_logfile_by_number
mov [rbp+var_248], rax
cmp rax, 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_530B8
mov rax, [rbp+var_248]
mov edx, [rax+18h]
lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 0CD4h
xor eax, eax
mov r9d, eax
mov r8d, 2
mov rcx, r9
call inline_mysql_file_seek_2
mov [rbp+var_238], rax
jmp loc_5318B
loc_530B8:
lea rax, key_file_translog
mov eax, [rax]
mov [rbp+var_250], eax
mov edi, [rbp+var_23C]
lea rsi, [rbp+var_210]
call translog_filename_by_fileno
mov edi, [rbp+var_250]
mov rcx, rax
movsx edx, [rbp+var_229]
mov r9d, 10h
xor eax, eax
cmp edx, 0
cmovnz r9, rax
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0CDFh
mov r8d, offset loc_80000
call inline_mysql_file_open_0
mov [rbp+var_24C], eax
cmp eax, 0
jge short loc_53144
call ___errno_location
mov eax, [rax]
mov [rbp+var_254], eax
call _my_thread_var
mov ecx, [rbp+var_254]
mov [rax], ecx
jmp short $+2
loc_53136:
jmp short $+2
loc_53138:
mov [rbp+var_211], 1
jmp loc_53237
loc_53144:
mov edx, [rbp+var_24C]
lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 0CE6h
xor eax, eax
mov r9d, eax
mov r8d, 2
mov rcx, r9
call inline_mysql_file_seek_2
mov [rbp+var_238], rax
mov edx, [rbp+var_24C]
lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 0CE7h
xor eax, eax
mov ecx, eax
call inline_mysql_file_close_2
loc_5318B:
jmp short $+2
loc_5318D:
jmp short $+2
loc_5318F:
cmp [rbp+var_238], 0FFFFFFFFFFFFFFFFh
jnz short loc_531A7
jmp short $+2
loc_5319B:
mov [rbp+var_211], 1
jmp loc_53237
loc_531A7:
jmp short $+2
loc_531A9:
jmp short $+2
loc_531AB:
mov rax, [rbp+var_238]
cmp eax, 2000h
jbe short loc_531F9
mov rax, [rbp+var_238]
shr eax, 0Dh
sub eax, 1
shl eax, 0Dh
mov [rbp+var_230], eax
mov rax, [rbp+var_238]
mov ecx, [rbp+var_230]
add ecx, 2000h
cmp eax, ecx
setz al
and al, 1
movzx eax, al
mov cl, al
mov rax, [rbp+var_228]
mov [rax], cl
jmp short loc_5320D
loc_531F9:
mov rax, [rbp+var_228]
mov byte ptr [rax], 0
mov [rbp+var_230], 0
loc_5320D:
mov eax, [rbp+var_23C]
mov ecx, eax
shl rcx, 20h
mov eax, [rbp+var_230]
or rcx, rax
mov rax, [rbp+var_220]
mov [rax], rcx
jmp short $+2
loc_5322E:
jmp short $+2
loc_53230:
mov [rbp+var_211], 0
loc_53237:
mov al, [rbp+var_211]
mov [rbp+var_255], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_53264
mov al, [rbp+var_255]
add rsp, 260h
pop rbp
retn
loc_53264:
call ___stack_chk_fail
|
char translog_get_last_page_addr(unsigned long long *a1, bool *a2, char a3)
{
long long v3; // rdx
long long v4; // rcx
int v5; // r8d
int v6; // r9d
long long v7; // rdi
long long v8; // rcx
long long v9; // r9
int v11; // [rsp+Ch] [rbp-254h]
signed int v12; // [rsp+14h] [rbp-24Ch]
long long logfile_by_number; // [rsp+18h] [rbp-248h]
unsigned int v14; // [rsp+24h] [rbp-23Ch]
long long v15; // [rsp+28h] [rbp-238h]
unsigned int v16; // [rsp+30h] [rbp-230h]
_BYTE v20[520]; // [rsp+50h] [rbp-210h] BYREF
unsigned long long v21; // [rsp+258h] [rbp-8h]
v21 = __readfsqword(0x28u);
v14 = HIDWORD(*a1);
logfile_by_number = get_logfile_by_number(v14);
if ( logfile_by_number )
{
v15 = inline_mysql_file_seek_2(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
3284LL,
*(unsigned int *)(logfile_by_number + 24),
0LL,
2LL);
}
else
{
v7 = key_file_translog;
v8 = translog_filename_by_fileno(v14, (long long)v20, v3, v4, v5, v6);
v9 = 16LL;
if ( a3 )
v9 = 0LL;
v12 = inline_mysql_file_open_0(
v7,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
3295LL,
v8,
&loc_80000,
v9);
if ( v12 < 0 )
{
v11 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(v7, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c") = v11;
return 1;
}
v15 = inline_mysql_file_seek_2(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
3302LL,
(unsigned int)v12,
0LL,
2LL);
inline_mysql_file_close_2(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0xCE7u,
v12,
0LL);
}
if ( v15 == -1 )
return 1;
if ( (unsigned int)v15 <= 0x2000 )
{
*a2 = 0;
v16 = 0;
}
else
{
v16 = (((unsigned int)v15 >> 13) - 1) << 13;
*a2 = (_DWORD)v15 == v16 + 0x2000;
}
*a1 = v16 | ((unsigned long long)v14 << 32);
return 0;
}
|
translog_get_last_page_addr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x260
MOV AL,DL
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x220],RDI
MOV qword ptr [RBP + -0x228],RSI
MOV byte ptr [RBP + -0x229],AL
MOV RAX,qword ptr [RBP + -0x220]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV dword ptr [RBP + -0x23c],EAX
MOV EDI,dword ptr [RBP + -0x23c]
CALL 0x00159d40
MOV qword ptr [RBP + -0x248],RAX
CMP RAX,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 0x001530b8
MOV RAX,qword ptr [RBP + -0x248]
MOV EDX,dword ptr [RAX + 0x18]
LEA RDI,[0x252fb9]
MOV ESI,0xcd4
XOR EAX,EAX
MOV R9D,EAX
MOV R8D,0x2
MOV RCX,R9
CALL 0x001533b0
MOV qword ptr [RBP + -0x238],RAX
JMP 0x0015318b
LAB_001530b8:
LEA RAX,[0x578fb4]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x250],EAX
MOV EDI,dword ptr [RBP + -0x23c]
LEA RSI,[RBP + -0x210]
CALL 0x00150ba0
MOV EDI,dword ptr [RBP + -0x250]
MOV RCX,RAX
MOVSX EDX,byte ptr [RBP + -0x229]
MOV R9D,0x10
XOR EAX,EAX
CMP EDX,0x0
CMOVNZ R9,RAX
LEA RSI,[0x252fb9]
MOV EDX,0xcdf
MOV R8D,0x80000
CALL 0x00159bd0
MOV dword ptr [RBP + -0x24c],EAX
CMP EAX,0x0
JGE 0x00153144
CALL 0x0012a760
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x254],EAX
CALL 0x001f7440
MOV ECX,dword ptr [RBP + -0x254]
MOV dword ptr [RAX],ECX
JMP 0x00153136
LAB_00153136:
JMP 0x00153138
LAB_00153138:
MOV byte ptr [RBP + -0x211],0x1
JMP 0x00153237
LAB_00153144:
MOV EDX,dword ptr [RBP + -0x24c]
LEA RDI,[0x252fb9]
MOV ESI,0xce6
XOR EAX,EAX
MOV R9D,EAX
MOV R8D,0x2
MOV RCX,R9
CALL 0x001533b0
MOV qword ptr [RBP + -0x238],RAX
MOV EDX,dword ptr [RBP + -0x24c]
LEA RDI,[0x252fb9]
MOV ESI,0xce7
XOR EAX,EAX
MOV ECX,EAX
CALL 0x00151240
LAB_0015318b:
JMP 0x0015318d
LAB_0015318d:
JMP 0x0015318f
LAB_0015318f:
CMP qword ptr [RBP + -0x238],-0x1
JNZ 0x001531a7
JMP 0x0015319b
LAB_0015319b:
MOV byte ptr [RBP + -0x211],0x1
JMP 0x00153237
LAB_001531a7:
JMP 0x001531a9
LAB_001531a9:
JMP 0x001531ab
LAB_001531ab:
MOV RAX,qword ptr [RBP + -0x238]
CMP EAX,0x2000
JBE 0x001531f9
MOV RAX,qword ptr [RBP + -0x238]
SHR EAX,0xd
SUB EAX,0x1
SHL EAX,0xd
MOV dword ptr [RBP + -0x230],EAX
MOV RAX,qword ptr [RBP + -0x238]
MOV ECX,dword ptr [RBP + -0x230]
ADD ECX,0x2000
CMP EAX,ECX
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x228]
MOV byte ptr [RAX],CL
JMP 0x0015320d
LAB_001531f9:
MOV RAX,qword ptr [RBP + -0x228]
MOV byte ptr [RAX],0x0
MOV dword ptr [RBP + -0x230],0x0
LAB_0015320d:
MOV EAX,dword ptr [RBP + -0x23c]
MOV ECX,EAX
SHL RCX,0x20
MOV EAX,dword ptr [RBP + -0x230]
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x220]
MOV qword ptr [RAX],RCX
JMP 0x0015322e
LAB_0015322e:
JMP 0x00153230
LAB_00153230:
MOV byte ptr [RBP + -0x211],0x0
LAB_00153237:
MOV AL,byte ptr [RBP + -0x211]
MOV byte ptr [RBP + -0x255],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00153264
MOV AL,byte ptr [RBP + -0x255]
ADD RSP,0x260
POP RBP
RET
LAB_00153264:
CALL 0x0012a270
|
int8 translog_get_last_page_addr(int8 *param_1,int1 *param_2,char param_3)
{
int4 uVar1;
int4 uVar2;
int iVar3;
long lVar4;
int8 uVar5;
int *piVar6;
int8 uVar7;
long in_FS_OFFSET;
ulong local_240;
int local_238;
int1 local_219;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar2 = (int4)((ulong)*param_1 >> 0x20);
lVar4 = get_logfile_by_number(uVar2);
uVar1 = key_file_translog;
if (lVar4 == 0) {
uVar5 = translog_filename_by_fileno(uVar2,local_218);
uVar7 = 0x10;
if (param_3 != '\0') {
uVar7 = 0;
}
iVar3 = inline_mysql_file_open
(uVar1,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0xcdf,uVar5,0x80000,uVar7);
if (iVar3 < 0) {
piVar6 = __errno_location();
iVar3 = *piVar6;
piVar6 = (int *)_my_thread_var();
*piVar6 = iVar3;
local_219 = 1;
goto LAB_00153237;
}
local_240 = inline_mysql_file_seek
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0xce6,iVar3,0,2);
inline_mysql_file_close
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0xce7,iVar3,
0);
}
else {
local_240 = inline_mysql_file_seek
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0xcd4,*(int4 *)(lVar4 + 0x18),0,2);
}
if (local_240 == 0xffffffffffffffff) {
local_219 = 1;
}
else {
if ((uint)local_240 < 0x2001) {
*param_2 = 0;
local_238 = 0;
}
else {
local_238 = (((uint)(local_240 >> 0xd) & 0x7ffff) - 1) * 0x2000;
*param_2 = (uint)local_240 == local_238 + 0x2000U;
}
*param_1 = CONCAT44(uVar2,local_238);
local_219 = 0;
}
LAB_00153237:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_219);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
57,933
|
my_wc_mb_gbk
|
eloqsql/strings/ctype-gbk.c
|
static int
my_wc_mb_gbk(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_gbk_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
}
|
O0
|
c
|
my_wc_mb_gbk:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0xe1c0b
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0xe1c84
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0xe1c2b
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xe1c84
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0xe1f50
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0xe1c47
movl $0x0, -0x4(%rbp)
jmp 0xe1c84
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0xe1c5e
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0xe1c84
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_wc_mb_gbk:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_E1C0B
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_E1C84
loc_E1C0B:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_E1C2B
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_E1C84
loc_E1C2B:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_gbk_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_E1C47
mov [rbp+var_4], 0
jmp short loc_E1C84
loc_E1C47:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_E1C5E
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_E1C84
loc_E1C5E:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_E1C84:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_wc_mb_gbk(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_gbk_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = BYTE1(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_wc_mb_gbk:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x001e1c0b
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001e1c84
LAB_001e1c0b:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x001e1c2b
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e1c84
LAB_001e1c2b:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x001e1f50
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x001e1c47
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001e1c84
LAB_001e1c47:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001e1c5e
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001e1c84
LAB_001e1c5e:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_001e1c84:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_gbk(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
int iVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
iVar1 = func_uni_gbk_onechar(param_2);
if (iVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uint)iVar1 >> 8);
param_3[1] = (char)iVar1;
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
57,934
|
dynamic_array_push
|
eshkol/src/core/utils/dynamic_array.c
|
bool dynamic_array_push(DynamicArray* array, const void* element) {
assert(array != NULL);
assert(element != NULL);
// Check if we need to resize
if (array->size >= array->capacity) {
size_t new_capacity = calculate_new_capacity(array->capacity, array->size + 1);
if (!dynamic_array_reserve(array, new_capacity)) {
return false;
}
}
// Calculate the address of the new element
void* dest = (char*)array->data + array->size * array->element_size;
// Copy the element
memcpy(dest, element, array->element_size);
// Increment the size
array->size++;
return true;
}
|
O0
|
c
|
dynamic_array_push:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3839
jmp 0x3858
leaq 0x18a3(%rip), %rdi # 0x50e3
leaq 0x2391(%rip), %rsi # 0x5bd8
movl $0x6b, %edx
leaq 0x2539(%rip), %rcx # 0x5d8c
callq 0x1080
cmpq $0x0, -0x18(%rbp)
je 0x3861
jmp 0x3880
leaq 0x2514(%rip), %rdi # 0x5d7c
leaq 0x2369(%rip), %rsi # 0x5bd8
movl $0x6c, %edx
leaq 0x2511(%rip), %rcx # 0x5d8c
callq 0x1080
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x38c8
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
addq $0x1, %rsi
callq 0x3920
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3980
testb $0x1, %al
jne 0x38c6
movb $0x0, -0x1(%rbp)
jmp 0x3911
jmp 0x38c8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x10(%rbp), %rdx
imulq 0x20(%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
callq 0x10c0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
dynamic_array_push:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_10], 0
jz short loc_3839
jmp short loc_3858
loc_3839:
lea rdi, aArrayNull; "array != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eshkol"...
mov edx, 6Bh ; 'k'
lea rcx, aBoolDynamicArr_0; "_Bool dynamic_array_push(DynamicArray *"...
call ___assert_fail
loc_3858:
cmp [rbp+var_18], 0
jz short loc_3861
jmp short loc_3880
loc_3861:
lea rdi, aElementNull; "element != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eshkol"...
mov edx, 6Ch ; 'l'
lea rcx, aBoolDynamicArr_0; "_Bool dynamic_array_push(DynamicArray *"...
call ___assert_fail
loc_3880:
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+18h]
jb short loc_38C8
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
add rsi, 1
call calculate_new_capacity
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call dynamic_array_reserve
test al, 1
jnz short loc_38C6
mov [rbp+var_1], 0
jmp short loc_3911
loc_38C6:
jmp short $+2
loc_38C8:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov rcx, [rcx+10h]
mov rdx, [rbp+var_10]
imul rcx, [rdx+20h]
add rax, rcx
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rdx, [rax+20h]
call _memcpy
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
add rcx, 1
mov [rax+10h], rcx
mov [rbp+var_1], 1
loc_3911:
mov al, [rbp+var_1]
and al, 1
add rsp, 30h
pop rbp
retn
|
char dynamic_array_push(_QWORD *a1, long long a2)
{
long long v3; // [rsp+10h] [rbp-20h]
if ( !a1 )
__assert_fail(
"array != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/utils/dynamic_array.c",
107LL,
"_Bool dynamic_array_push(DynamicArray *, const void *)");
if ( !a2 )
__assert_fail(
"element != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/utils/dynamic_array.c",
108LL,
"_Bool dynamic_array_push(DynamicArray *, const void *)");
if ( a1[2] >= a1[3] )
{
v3 = calculate_new_capacity(a1[3], a1[2] + 1LL);
if ( (dynamic_array_reserve(a1, v3) & 1) == 0 )
return 0;
}
memcpy(a1[4] * a1[2]++ + a1[1], a2, a1[4]);
return 1;
}
|
dynamic_array_push:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00103839
JMP 0x00103858
LAB_00103839:
LEA RDI,[0x1050e3]
LEA RSI,[0x105bd8]
MOV EDX,0x6b
LEA RCX,[0x105d8c]
CALL 0x00101080
LAB_00103858:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00103861
JMP 0x00103880
LAB_00103861:
LEA RDI,[0x105d7c]
LEA RSI,[0x105bd8]
MOV EDX,0x6c
LEA RCX,[0x105d8c]
CALL 0x00101080
LAB_00103880:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x18]
JC 0x001038c8
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
ADD RSI,0x1
CALL 0x00103920
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00103980
TEST AL,0x1
JNZ 0x001038c6
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00103911
LAB_001038c6:
JMP 0x001038c8
LAB_001038c8:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x10]
MOV RDX,qword ptr [RBP + -0x10]
IMUL RCX,qword ptr [RDX + 0x20]
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x20]
CALL 0x001010c0
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
ADD RCX,0x1
MOV qword ptr [RAX + 0x10],RCX
MOV byte ptr [RBP + -0x1],0x1
LAB_00103911:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x30
POP RBP
RET
|
int1 dynamic_array_push(long param_1,void *param_2)
{
int8 uVar1;
ulong uVar2;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("array != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/utils/dynamic_array.c",0x6b,
"_Bool dynamic_array_push(DynamicArray *, const void *)");
}
if (param_2 != (void *)0x0) {
if (*(ulong *)(param_1 + 0x18) <= *(ulong *)(param_1 + 0x10)) {
uVar1 = calculate_new_capacity(*(int8 *)(param_1 + 0x18),*(long *)(param_1 + 0x10) + 1);
uVar2 = dynamic_array_reserve(param_1,uVar1);
if ((uVar2 & 1) == 0) {
return 0;
}
}
memcpy((void *)(*(long *)(param_1 + 8) + *(long *)(param_1 + 0x10) * *(long *)(param_1 + 0x20)),
param_2,*(size_t *)(param_1 + 0x20));
*(long *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + 1;
return 1;
}
/* WARNING: Subroutine does not return */
__assert_fail("element != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/utils/dynamic_array.c",0x6c,
"_Bool dynamic_array_push(DynamicArray *, const void *)");
}
|
|
57,935
|
nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*)
|
ng-log[P]ng-log/src/logging.cc
|
void InstallPrefixFormatter(PrefixFormatterCallback callback, void* data) {
if (callback != nullptr) {
g_prefix_formatter = std::make_unique<PrefixFormatter>(callback, data);
} else {
g_prefix_formatter = nullptr;
}
}
|
O3
|
cpp
|
nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*):
testq %rdi, %rdi
je 0xf203
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x18, %edi
callq 0x8eb0
movl $0x0, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x229fb(%rip), %rdi # 0x31be0
movq %rax, 0x229f4(%rip) # 0x31be0
testq %rdi, %rdi
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r14
je 0xf21a
movl $0x18, %esi
jmp 0x8efc
movq 0x229d6(%rip), %rdi # 0x31be0
movq $0x0, 0x229cb(%rip) # 0x31be0
testq %rdi, %rdi
jne 0xf1f9
retq
|
_ZN5nglog22InstallPrefixFormatterEPFvRSoRKNS_10LogMessageEPvES4_:
test rdi, rdi
jz short loc_F203
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov edi, 18h; unsigned __int64
call _Znwm; operator new(ulong)
mov dword ptr [rax], 0
mov [rax+8], r14
mov [rax+10h], rbx
mov rdi, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; void *
mov cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE, rax; nglog::`anonymous namespace'::g_prefix_formatter
test rdi, rdi
lea rsp, [rsp+8]
pop rbx
pop r14
jz short locret_F21A
loc_F1F9:
mov esi, 18h; unsigned __int64
jmp _ZdlPvm; operator delete(void *,ulong)
loc_F203:
mov rdi, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; nglog::`anonymous namespace'::g_prefix_formatter
mov cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE, 0; nglog::`anonymous namespace'::g_prefix_formatter
test rdi, rdi
jnz short loc_F1F9
locret_F21A:
retn
|
void nglog::InstallPrefixFormatter(
nglog *this,
void (*a2)(std::ostream *, const nglog::LogMessage *, void *),
void *a3)
{
_QWORD *v3; // rax
void *v4; // rdi
if ( this )
{
v3 = (_QWORD *)operator new(24LL);
*(_DWORD *)v3 = 0;
v3[1] = this;
v3[2] = a2;
v4 = nglog::`anonymous namespace'::g_prefix_formatter;
nglog::`anonymous namespace'::g_prefix_formatter = v3;
if ( !v4 )
return;
goto LABEL_3;
}
v4 = nglog::`anonymous namespace'::g_prefix_formatter;
nglog::`anonymous namespace'::g_prefix_formatter = 0LL;
if ( v4 )
LABEL_3:
operator delete(v4);
}
|
InstallPrefixFormatter:
TEST RDI,RDI
JZ 0x0010f203
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV EDI,0x18
CALL 0x00108eb0
MOV dword ptr [RAX],0x0
MOV qword ptr [RAX + 0x8],R14
MOV qword ptr [RAX + 0x10],RBX
MOV RDI,qword ptr [0x00131be0]
MOV qword ptr [0x00131be0],RAX
TEST RDI,RDI
LEA RSP,[RSP + 0x8]
POP RBX
POP R14
JZ 0x0010f21a
LAB_0010f1f9:
MOV ESI,0x18
JMP 0x00108efc
LAB_0010f203:
MOV RDI,qword ptr [0x00131be0]
MOV qword ptr [0x00131be0],0x0
TEST RDI,RDI
JNZ 0x0010f1f9
LAB_0010f21a:
RET
|
/* nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*) */
void nglog::InstallPrefixFormatter
(_func_void_ostream_ptr_LogMessage_ptr_void_ptr *param_1,void *param_2)
{
int4 *puVar1;
void *pvVar2;
bool bVar3;
pvVar2 = (anonymous_namespace)::g_prefix_formatter;
if (param_1 == (_func_void_ostream_ptr_LogMessage_ptr_void_ptr *)0x0) {
(anonymous_namespace)::g_prefix_formatter = (int4 *)0x0;
if (pvVar2 == (void *)0x0) {
(anonymous_namespace)::g_prefix_formatter = (int4 *)0x0;
return;
}
}
else {
puVar1 = (int4 *)operator_new(0x18);
*puVar1 = 0;
*(_func_void_ostream_ptr_LogMessage_ptr_void_ptr **)(puVar1 + 2) = param_1;
*(void **)(puVar1 + 4) = param_2;
bVar3 = (anonymous_namespace)::g_prefix_formatter == (int4 *)0x0;
pvVar2 = (anonymous_namespace)::g_prefix_formatter;
(anonymous_namespace)::g_prefix_formatter = puVar1;
if (bVar3) {
return;
}
}
operator_delete(pvVar2,0x18);
return;
}
|
|
57,936
|
minja::ElifTemplateToken::~ElifTemplateToken()
|
monkey531[P]llama/common/minja.hpp
|
ElifTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::Elif, location, pre, post), condition(std::move(c)) {}
|
O1
|
cpp
|
minja::ElifTemplateToken::~ElifTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x85833(%rip), %rax # 0xe4b88
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x5f36a
callq 0x35448
leaq 0x84e57(%rip), %rax # 0xe41c8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x5f386
callq 0x35448
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x1a740
|
_ZN5minja17ElifTemplateTokenD0Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja17ElifTemplateTokenE; `vtable for'minja::ElifTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_5F36A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5F36A:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_5F386
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5F386:
mov esi, 40h ; '@'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
|
void minja::ElifTemplateToken::~ElifTemplateToken(minja::ElifTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::ElifTemplateToken + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
operator delete(this, 0x40uLL);
}
|
~ElifTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1e4b88]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x0015f36a
CALL 0x00135448
LAB_0015f36a:
LEA RAX,[0x1e41c8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0015f386
CALL 0x00135448
LAB_0015f386:
MOV ESI,0x40
MOV RDI,RBX
POP RBX
JMP 0x0011a740
|
/* minja::ElifTemplateToken::~ElifTemplateToken() */
void __thiscall minja::ElifTemplateToken::~ElifTemplateToken(ElifTemplateToken *this)
{
*(int ***)this = &PTR__ElifTemplateToken_001e4b98;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_001e41d8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
}
operator_delete(this,0x40);
return;
}
|
|
57,937
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [25], char const*>(char const (&) [25], char const*&&)
|
monkey531[P]llama/common/json.hpp
|
inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
}
|
O1
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [25], char const*>(char const (&) [25], char const*&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x18300
movq %rax, %rbp
addq 0x8(%r12), %rbp
movq %r15, %rdi
callq 0x18300
addq %rax, %rbp
addq 0x8(%r14), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x18a50
movq %rbx, %rdi
movq %r13, %rsi
callq 0x18ce0
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rbx, %rdi
callq 0x181d0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18ce0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x181d0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x7d314
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x186a0
movq %r14, %rdi
callq 0x18bc0
|
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcS8_RA5_S9_S8_EEET_DpOT0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rsp+38h+var_38], rax
mov [rdi], rax
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
call _strlen
mov rbp, rax
add rbp, [r12+8]
mov rdi, r15
call _strlen
add rbp, rax
add rbp, [r14+8]
mov rdi, rbx
mov rsi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r12]
mov rdx, [r12+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, [rsp+0]
jz short loc_7D314
mov rax, [rsp+0]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7D314:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],std::string,char const(&)[5],std::string>(
long long a1,
long long a2,
_QWORD *a3,
long long a4,
_QWORD *a5)
{
long long v8; // rbp
long long v9; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v8 = a3[1] + strlen(a2);
v9 = strlen(a4);
std::string::reserve(a1, a5[1] + v9 + v8);
std::string::append(a1, a2);
std::string::_M_append(a1, *a3);
std::string::append(a1, a4);
std::string::_M_append(a1, *a5);
return a1;
}
|
concat<std::__cxx11::string,char_const(&)[29],std::__cxx11::string,char_const(&)[5],std::__cxx11::string>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RSP],RAX
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
CALL 0x00118300
MOV RBP,RAX
ADD RBP,qword ptr [R12 + 0x8]
MOV RDI,R15
CALL 0x00118300
ADD RBP,RAX
ADD RBP,qword ptr [R14 + 0x8]
LAB_0017d2a6:
MOV RDI,RBX
MOV RSI,RBP
CALL 0x00118a50
MOV RDI,RBX
MOV RSI,R13
CALL 0x00118ce0
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
MOV RDI,RBX
CALL 0x001181d0
MOV RDI,RBX
MOV RSI,R15
CALL 0x00118ce0
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001181d0
LAB_0017d2e7:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [29], std::__cxx11::string, char const (&) [5], std::__cxx11::string >(char const (&) [29],
std::__cxx11::string&&, char const (&) [5], std::__cxx11::string&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[29],std::__cxx11::string,char_const(&)[5],std::__cxx11::string>
(detail *this,char *param_1,string *param_2,char *param_3,string *param_4)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
strlen(param_1);
strlen(param_3);
/* try { // try from 0017d2a6 to 0017d2e6 has its CatchHandler @ 0017d2f9 */
std::__cxx11::string::reserve((ulong)this);
std::__cxx11::string::append((char *)this);
std::__cxx11::string::_M_append((char *)this,*(ulong *)param_2);
std::__cxx11::string::append((char *)this);
std::__cxx11::string::_M_append((char *)this,*(ulong *)param_4);
return this;
}
|
|
57,938
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [25], char const*>(char const (&) [25], char const*&&)
|
monkey531[P]llama/common/json.hpp
|
inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
}
|
O2
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [25], char const*>(char const (&) [25], char const*&&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x48148
movq %rbx, %rdi
movq %rax, %rsi
callq 0x20a90
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x4815d
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x20de8
movq %r14, %rdi
callq 0x20bf0
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA26_KcS8_cEEET_DpOT0_:
push r15
push r14
push r12
push rbx
push rax
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
and qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
mov rsi, rdx
mov rdx, rcx
call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEEEmPKcDpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<std::string,char>(char const*,std::string,char const&)
mov rdi, rbx
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA26_KcJS8_cETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSD_OSE_DpOT1_
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],std::string,char>(
long long a1,
long long a2,
long long a3,
long long a4)
{
long long v6; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v6 = nlohmann::json_abi_v3_11_3::detail::concat_length<std::string,char>(a2, a3, a4);
std::string::reserve(a1, v6);
ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA26_KcJS8_cETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSD_OSE_DpOT1_(
a1,
a2,
a3,
a4);
return a1;
}
|
concat<std::__cxx11::string,char_const(&)[26],std::__cxx11::string,char>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
AND qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_00146937:
MOV RDI,RSI
MOV RSI,RDX
MOV RDX,RCX
CALL 0x00148148
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00120a90
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
CALL 0x0014815d
LAB_00146961:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [26], std::__cxx11::string, char>(char const (&) [26], std::__cxx11::string&&, char&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[26],std::__cxx11::string,char>
(detail *this,char *param_1,string *param_2,char *param_3)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
/* try { // try from 00146937 to 00146960 has its CatchHandler @ 00146970 */
concat_length<std::__cxx11::string,char>(param_1,param_2,param_3);
std::__cxx11::string::reserve((ulong)this);
_ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA26_KcJS8_cETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSD_OSE_DpOT1_
(this,param_1,param_2,param_3);
return this;
}
|
|
57,939
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [25], char const*>(char const (&) [25], char const*&&)
|
monkey531[P]llama/common/json.hpp
|
inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
}
|
O3
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [25], char const*>(char const (&) [25], char const*&&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x18300
movq %rax, %r12
movq (%r14), %rdi
callq 0x18300
addq %rax, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18a50
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18ce0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x18ce0
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x4b229
movq (%r13), %rsi
incq %rsi
callq 0x186a0
movq %r14, %rdi
callq 0x18bc0
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA25_KcPS9_EEET_DpOT0_:
push r15
push r14
push r13
push r12
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r13, [rdi+10h]
mov [rdi], r13
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
call _strlen
mov r12, rax
mov rdi, [r14]
call _strlen
add r12, rax
mov rdi, rbx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r14]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r13
jz short loc_4B229
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4B229:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>(
long long a1,
long long a2,
_QWORD *a3)
{
long long v4; // r12
long long v5; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v4 = strlen(a2);
v5 = strlen(*a3);
std::string::reserve(a1, v5 + v4);
std::string::append(a1, a2);
std::string::append(a1, *a3);
return a1;
}
|
concat<std::__cxx11::string,char_const(&)[25],char_const*>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R13,[RDI + 0x10]
MOV qword ptr [RDI],R13
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
CALL 0x00118300
MOV R12,RAX
MOV RDI,qword ptr [R14]
CALL 0x00118300
ADD R12,RAX
LAB_0014b1e4:
MOV RDI,RBX
MOV RSI,R12
CALL 0x00118a50
MOV RDI,RBX
MOV RSI,R15
CALL 0x00118ce0
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x00118ce0
LAB_0014b205:
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [25], char const*>(char const (&) [25], char const*&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[25],char_const*>
(detail *this,char *param_1,char **param_2)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
strlen(param_1);
strlen(*param_2);
/* try { // try from 0014b1e4 to 0014b204 has its CatchHandler @ 0014b212 */
std::__cxx11::string::reserve((ulong)this);
std::__cxx11::string::append((char *)this);
std::__cxx11::string::append((char *)this);
return this;
}
|
|
57,940
|
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<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>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*)
|
monkey531[P]llama/common/json.hpp
|
static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<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>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x614bb(%rip), %rsi # 0xeffc8
leaq 0x614c4(%rip), %rdx # 0xeffd8
leaq 0x28(%rsp), %rdi
callq 0x233d6
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x595de
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movq 0x8(%r15), %rsi
addq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1bd80
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1b270
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1b270
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1b270
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x8ebb7
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1b8e0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8ebd2
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1b8e0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x8ebe9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8e0
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5984c
leaq 0x9e2f1(%rip), %rax # 0x12cef0
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8ec1d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8e0
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8ecab
movq 0x18(%rsp), %rsi
jmp 0x8eca3
movq %rax, %rbx
jmp 0x8ec94
movq %rax, %rbx
jmp 0x8ecab
movq %rdx, %rbx
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8ec6d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8e0
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x88(%rsp), %r12
movq %r14, %rsi
movq %r15, %rcx
movl %ebx, %r8d
movq %r12, %r9
callq 0x1cd5b
movq (%r12), %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x8ecab
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8e0
movq %rbx, %rdi
callq 0x1bf90
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15, rdx
mov ebp, esi
mov rbx, rdi
lea r13, [rsp+0C8h+var_90]
mov [r13-10h], r13
lea rsi, aInvalidIterato; "invalid_iterator"
lea rdx, aInvalidIterato+10h; ""
lea rdi, [rsp+0C8h+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0C8h+var_80]; int
lea rsi, [rsp+0C8h+var_A0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea r14, [rsp+0C8h+var_50]
mov [r14-10h], r14
xor eax, eax
mov [r14-8], rax
mov [r14], al
lea r12, [rsp+0C8h+var_B0]
mov [r12-10h], r12
mov [r12-8], rax
mov [r12], al
mov rsi, [r15+8]
add rsi, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rsi, qword ptr [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_58]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0C8h+var_60]; void *
cmp rdi, r14
jz short loc_8EBB7
mov rsi, [rsp+0C8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8EBB7:
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8EBD2
mov rsi, [rsp+0C8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8EBD2:
mov rdi, [rsp+0C8h+var_A0]; void *
cmp rdi, r13
jz short loc_8EBE9
mov rsi, [rsp+0C8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8EBE9:
mov rdx, [rsp+0C8h+var_C0]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*)
lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; `vtable for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator
add rax, 10h
mov [rbx], rax
mov rdi, [rsp+0C8h+var_C0]; void *
cmp rdi, r12
jz short loc_8EC1D
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8EC1D:
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r12
jz short loc_8ECAB
mov rsi, [rsp+arg_10]
jmp short loc_8ECA3
mov rbx, rax
jmp short loc_8EC94
mov rbx, rax
jmp short loc_8ECAB
mov rbx, rdx
mov r15, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_8EC6D
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8EC6D:
lea rdi, [rsp+arg_60]
lea rdx, [rsp+arg_40]
lea r12, [rsp+arg_80]
mov rsi, r14
mov rcx, r15
mov r8d, ebx
mov r9, r12
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK__cold_1
mov rbx, [r12]
loc_8EC94:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_8ECAB
mov rsi, [rsp+arg_30]
loc_8ECA3:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8ECAB:
mov rdi, rbx
call __Unwind_Resume
|
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
nlohmann::json_abi_v3_11_3::detail::exception *this,
int a2,
_QWORD *a3)
{
char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF
void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF
int v9[2]; // [rsp+48h] [rbp-80h] BYREF
long long v10; // [rsp+50h] [rbp-78h]
long long v11; // [rsp+58h] [rbp-70h] BYREF
void *v12; // [rsp+68h] [rbp-60h]
long long v13; // [rsp+70h] [rbp-58h]
_QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF
v7[0] = v8;
std::string::_M_construct<char const*>(v7, "invalid_iterator", (long long)"");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2);
v12 = v14;
v13 = 0LL;
LOBYTE(v14[0]) = 0;
v5[0] = (char *)v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
std::string::reserve(v5, v10 + a3[1]);
std::string::_M_append(v5, *(_QWORD *)v9, v10);
std::string::_M_append(v5, v12, v13);
std::string::_M_append(v5, *a3, a3[1]);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
if ( *(long long **)v9 != &v11 )
operator delete(*(void **)v9, v11 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]);
*(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator + 2;
if ( (_QWORD *)v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
return this;
}
|
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R15,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LAB_0018eb06:
LEA RSI,[0x1effc8]
LEA RDX,[0x1effd8]
LEA RDI,[RSP + 0x28]
CALL 0x001233d6
LAB_0018eb1e:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x001595de
LEA R14,[RSP + 0x78]
MOV qword ptr [R14 + -0x10],R14
XOR EAX,EAX
MOV qword ptr [R14 + -0x8],RAX
MOV byte ptr [R14],AL
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],RAX
MOV byte ptr [R12],AL
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,qword ptr [RSP + 0x50]
LAB_0018eb5d:
LEA RDI,[RSP + 0x8]
CALL 0x0011bd80
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
LEA RDI,[RSP + 0x8]
CALL 0x0011b270
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
LEA RDI,[RSP + 0x8]
CALL 0x0011b270
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x0011b270
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x0018ebb7
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0011b8e0
LAB_0018ebb7:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0018ebd2
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011b8e0
LAB_0018ebd2:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x0018ebe9
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011b8e0
LAB_0018ebe9:
MOV RDX,qword ptr [RSP + 0x8]
LAB_0018ebee:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0015984c
LAB_0018ebf8:
LEA RAX,[0x22cef0]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0018ec1d
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8e0
LAB_0018ec1d:
MOV RAX,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
exception *
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(exception *param_1,int param_2,ulong *param_3)
{
char *local_c0;
int8 local_b8;
char local_b0;
int7 uStack_af;
long *local_a0 [2];
long local_90 [2];
long *local_80 [2];
long local_70 [2];
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
/* try { // try from 0018eb06 to 0018eb1d has its CatchHandler @ 0018ec4b */
local_a0[0] = local_90;
std::__cxx11::string::_M_construct<char_const*>(local_a0,"invalid_iterator","");
/* try { // try from 0018eb1e to 0018eb2e has its CatchHandler @ 0018ec46 */
nlohmann::json_abi_v3_11_3::detail::exception::name
((exception *)local_80,(string *)local_a0,param_2);
local_58 = 0;
local_50 = 0;
local_b8 = 0;
local_b0 = '\0';
/* try { // try from 0018eb5d to 0018eb9f has its CatchHandler @ 0018ec50 */
local_c0 = &local_b0;
local_60 = &local_50;
std::__cxx11::string::reserve((ulong)&local_c0);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60);
std::__cxx11::string::_M_append((char *)&local_c0,*param_3);
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
if (local_80[0] != local_70) {
operator_delete(local_80[0],local_70[0] + 1);
}
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
/* try { // try from 0018ebee to 0018ebf7 has its CatchHandler @ 0018ec32 */
nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0);
*(int ***)param_1 = &PTR__exception_0022cf00;
if (local_c0 != &local_b0) {
operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1);
}
return param_1;
}
|
|
57,941
|
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<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>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*)
|
monkey531[P]llama/common/json.hpp
|
static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<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>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x48745(%rip), %rsi # 0xb0fba
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x27c76
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x3e432
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x427ac
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rcx
callq 0x3e3c9
leaq 0x8(%rsp), %rdi
callq 0x241c8
leaq 0x48(%rsp), %rdi
callq 0x241c8
leaq 0x28(%rsp), %rdi
callq 0x241c8
movq 0x68(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4393c
leaq 0x68(%rsp), %rdi
callq 0x241c8
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x68931
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x241c8
jmp 0x6891d
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x241c8
jmp 0x6892c
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x241c8
jmp 0x6893b
movq %rax, %rbx
movq %rbx, %rdi
callq 0x23f90
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
push rbp
push r15
push r14
push rbx
sub rsp, 88h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
lea rsi, aInvalidIterato; "invalid_iterator"
lea rdi, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_A1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0A8h+var_60]
lea rsi, [rsp+0A8h+var_80]
mov edx, ebp
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea rdi, [rsp+0A8h+var_A0]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*)
lea rdi, [rsp+0A8h+var_40]
lea rsi, [rsp+0A8h+var_60]
lea rdx, [rsp+0A8h+var_A0]
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&)
lea rdi, [rsp+0A8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdx, [rsp+0A8h+var_40]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator(int,char const*)
lea rdi, [rsp+0A8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 88h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_60]
jmp short loc_68931
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6891D
mov rbx, rax
loc_6891D:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6892C
mov rbx, rax
loc_6892C:
lea rdi, [rsp+arg_20]; void *
loc_68931:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6893B
mov rbx, rax
loc_6893B:
mov rdi, rbx
call __Unwind_Resume
|
nlohmann::json_abi_v3_11_3::detail::invalid_iterator * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
nlohmann::json_abi_v3_11_3::detail::invalid_iterator *this,
int a2,
long long a3)
{
_QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF
_QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF
_BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF
char *v8[8]; // [rsp+68h] [rbp-40h] BYREF
std::string::basic_string<std::allocator<char>>(v6, (long long)"invalid_iterator");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v7, (long long)v6, a2);
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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>>(v5);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(
(long long)v8,
(long long)v7,
(long long)v5,
a3);
std::string::~string(v5);
std::string::~string(v7);
std::string::~string(v6);
nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator(this, a2, v8[0]);
std::string::~string(v8);
return this;
}
|
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x88
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
LAB_0016886e:
LEA RSI,[0x1b0fba]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
CALL 0x00127c76
LAB_00168884:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x0013e432
LAB_00168895:
LEA RDI,[RSP + 0x8]
MOV RSI,R15
CALL 0x001427ac
LAB_001688a2:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RCX,R14
CALL 0x0013e3c9
LEA RDI,[RSP + 0x8]
CALL 0x001241c8
LEA RDI,[RSP + 0x48]
CALL 0x001241c8
LEA RDI,[RSP + 0x28]
CALL 0x001241c8
MOV RDX,qword ptr [RSP + 0x68]
LAB_001688dc:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0014393c
LAB_001688e6:
LEA RDI,[RSP + 0x68]
CALL 0x001241c8
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R14
POP R15
POP RBP
RET
|
invalid_iterator *
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(invalid_iterator *param_1,int param_2,string *param_3)
{
allocator local_a1;
string local_a0 [32];
string local_80 [32];
exception local_60 [32];
char *local_40 [4];
/* try { // try from 0016886e to 00168883 has its CatchHandler @ 00168938 */
std::__cxx11::string::string<std::allocator<char>>(local_80,"invalid_iterator",&local_a1);
/* try { // try from 00168884 to 00168894 has its CatchHandler @ 00168929 */
nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,param_2);
/* try { // try from 00168895 to 001688a1 has its CatchHandler @ 0016891a */
nlohmann::json_abi_v3_11_3::detail::exception::
diagnostics<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_a0);
/* try { // try from 001688a2 to 001688b8 has its CatchHandler @ 0016890b */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&>
((detail *)local_40,(string *)local_60,local_a0,param_3);
std::__cxx11::string::~string(local_a0);
std::__cxx11::string::~string((string *)local_60);
std::__cxx11::string::~string(local_80);
/* try { // try from 001688dc to 001688e5 has its CatchHandler @ 00168901 */
nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator
(param_1,param_2,local_40[0]);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
|
|
57,942
|
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<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>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*)
|
monkey531[P]llama/common/json.hpp
|
static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<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>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x5f9e3(%rip), %rsi # 0xecfc8
leaq 0x5f9ec(%rip), %rdx # 0xecfd8
leaq 0x28(%rsp), %rdi
callq 0x22402
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x5908c
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movq 0x8(%r15), %rsi
addq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1ad80
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1a270
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1a270
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1a270
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x8d68f
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1a8e0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8d6aa
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x8d6c1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x592fa
leaq 0x9c859(%rip), %rax # 0x129f30
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8d6f5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8d783
movq 0x18(%rsp), %rsi
jmp 0x8d77b
movq %rax, %rbx
jmp 0x8d76c
movq %rax, %rbx
jmp 0x8d783
movq %rdx, %rbx
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8d745
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x88(%rsp), %r12
movq %r14, %rsi
movq %r15, %rcx
movl %ebx, %r8d
movq %r12, %r9
callq 0x1bde8
movq (%r12), %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x8d783
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq %rbx, %rdi
callq 0x1af90
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15, rdx
mov ebp, esi
mov rbx, rdi
lea r13, [rsp+0C8h+var_90]
mov [r13-10h], r13
lea rsi, aInvalidIterato; "invalid_iterator"
lea rdx, aInvalidIterato+10h; ""
lea rdi, [rsp+0C8h+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0C8h+var_80]; int
lea rsi, [rsp+0C8h+var_A0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea r14, [rsp+0C8h+var_50]
mov [r14-10h], r14
xor eax, eax
mov [r14-8], rax
mov [r14], al
lea r12, [rsp+0C8h+var_B0]
mov [r12-10h], r12
mov [r12-8], rax
mov [r12], al
mov rsi, [r15+8]
add rsi, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rsi, qword ptr [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_58]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0C8h+var_60]; void *
cmp rdi, r14
jz short loc_8D68F
mov rsi, [rsp+0C8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8D68F:
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8D6AA
mov rsi, [rsp+0C8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8D6AA:
mov rdi, [rsp+0C8h+var_A0]; void *
cmp rdi, r13
jz short loc_8D6C1
mov rsi, [rsp+0C8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8D6C1:
mov rdx, [rsp+0C8h+var_C0]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*)
lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; `vtable for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator
add rax, 10h
mov [rbx], rax
mov rdi, [rsp+0C8h+var_C0]; void *
cmp rdi, r12
jz short loc_8D6F5
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8D6F5:
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r12
jz short loc_8D783
mov rsi, [rsp+arg_10]
jmp short loc_8D77B
mov rbx, rax
jmp short loc_8D76C
mov rbx, rax
jmp short loc_8D783
mov rbx, rdx
mov r15, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_8D745
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8D745:
lea rdi, [rsp+arg_60]
lea rdx, [rsp+arg_40]
lea r12, [rsp+arg_80]
mov rsi, r14
mov rcx, r15
mov r8d, ebx
mov r9, r12
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK__cold_1
mov rbx, [r12]
loc_8D76C:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_8D783
mov rsi, [rsp+arg_30]
loc_8D77B:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8D783:
mov rdi, rbx
call __Unwind_Resume
|
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
nlohmann::json_abi_v3_11_3::detail::exception *this,
int a2,
_QWORD *a3)
{
char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF
void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF
int v9[2]; // [rsp+48h] [rbp-80h] BYREF
long long v10; // [rsp+50h] [rbp-78h]
long long v11; // [rsp+58h] [rbp-70h] BYREF
void *v12; // [rsp+68h] [rbp-60h]
long long v13; // [rsp+70h] [rbp-58h]
_QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF
v7[0] = v8;
std::string::_M_construct<char const*>((long long)v7, "invalid_iterator", (long long)"");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2);
v12 = v14;
v13 = 0LL;
LOBYTE(v14[0]) = 0;
v5[0] = (char *)v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
std::string::reserve(v5, v10 + a3[1]);
std::string::_M_append(v5, *(_QWORD *)v9, v10);
std::string::_M_append(v5, v12, v13);
std::string::_M_append(v5, *a3, a3[1]);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
if ( *(long long **)v9 != &v11 )
operator delete(*(void **)v9, v11 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]);
*(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator + 2;
if ( (_QWORD *)v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
return this;
}
|
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R15,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LAB_0018d5de:
LEA RSI,[0x1ecfc8]
LEA RDX,[0x1ecfd8]
LEA RDI,[RSP + 0x28]
CALL 0x00122402
LAB_0018d5f6:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x0015908c
LEA R14,[RSP + 0x78]
MOV qword ptr [R14 + -0x10],R14
XOR EAX,EAX
MOV qword ptr [R14 + -0x8],RAX
MOV byte ptr [R14],AL
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],RAX
MOV byte ptr [R12],AL
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,qword ptr [RSP + 0x50]
LAB_0018d635:
LEA RDI,[RSP + 0x8]
CALL 0x0011ad80
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
LEA RDI,[RSP + 0x8]
CALL 0x0011a270
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
LEA RDI,[RSP + 0x8]
CALL 0x0011a270
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x0011a270
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x0018d68f
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0011a8e0
LAB_0018d68f:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0018d6aa
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011a8e0
LAB_0018d6aa:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x0018d6c1
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011a8e0
LAB_0018d6c1:
MOV RDX,qword ptr [RSP + 0x8]
LAB_0018d6c6:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x001592fa
LAB_0018d6d0:
LEA RAX,[0x229f30]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0018d6f5
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a8e0
LAB_0018d6f5:
MOV RAX,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
exception *
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(exception *param_1,int param_2,ulong *param_3)
{
char *local_c0;
int8 local_b8;
char local_b0;
int7 uStack_af;
long *local_a0 [2];
long local_90 [2];
long *local_80 [2];
long local_70 [2];
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
/* try { // try from 0018d5de to 0018d5f5 has its CatchHandler @ 0018d723 */
local_a0[0] = local_90;
std::__cxx11::string::_M_construct<char_const*>(local_a0,"invalid_iterator","");
/* try { // try from 0018d5f6 to 0018d606 has its CatchHandler @ 0018d71e */
nlohmann::json_abi_v3_11_3::detail::exception::name
((exception *)local_80,(string *)local_a0,param_2);
local_58 = 0;
local_50 = 0;
local_b8 = 0;
local_b0 = '\0';
/* try { // try from 0018d635 to 0018d677 has its CatchHandler @ 0018d728 */
local_c0 = &local_b0;
local_60 = &local_50;
std::__cxx11::string::reserve((ulong)&local_c0);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60);
std::__cxx11::string::_M_append((char *)&local_c0,*param_3);
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
if (local_80[0] != local_70) {
operator_delete(local_80[0],local_70[0] + 1);
}
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
/* try { // try from 0018d6c6 to 0018d6cf has its CatchHandler @ 0018d70a */
nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0);
*(int ***)param_1 = &PTR__exception_00229f40;
if (local_c0 != &local_b0) {
operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1);
}
return param_1;
}
|
|
57,943
|
s2b
|
eloqsql/strings/dtoa.c
|
static Bigint *s2b(const char *s, int nd0, int nd, ULong y9, Stack_alloc *alloc)
{
Bigint *b;
int i, k;
Long x, y;
x= (nd + 8) / 9;
for (k= 0, y= 1; x > y; y <<= 1, k++) ;
b= Balloc(k, alloc);
b->p.x[0]= y9;
b->wds= 1;
i= 9;
if (9 < nd0)
{
s+= 9;
do
b= multadd(b, 10, *s++ - '0', alloc);
while (++i < nd0);
s++; /* skip '.' */
}
else
s+= 10;
/* now do the fractional part */
for(; i < nd; i++)
b= multadd(b, 10, *s++ - '0', alloc);
return b;
}
|
O0
|
c
|
s2b:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
movl -0x10(%rbp), %eax
addl $0x8, %eax
movl $0x9, %ecx
cltd
idivl %ecx
movl %eax, -0x34(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x1, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jle 0x723b5
jmp 0x723a2
movl -0x38(%rbp), %eax
shll %eax
movl %eax, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x72398
movl -0x30(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x724a0
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl $0x1, 0x14(%rax)
movl $0x9, -0x2c(%rbp)
movl $0x9, %eax
cmpl -0xc(%rbp), %eax
jge 0x72440
movq -0x8(%rbp), %rax
addq $0x9, %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %edx
subl $0x30, %edx
movq -0x20(%rbp), %rcx
movl $0xa, %esi
callq 0x73130
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl -0xc(%rbp), %eax
jl 0x723f9
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x7244c
movq -0x8(%rbp), %rax
addq $0xa, %rax
movq %rax, -0x8(%rbp)
jmp 0x7244e
movl -0x2c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x7248c
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %edx
subl $0x30, %edx
movq -0x20(%rbp), %rcx
movl $0xa, %esi
callq 0x73130
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7244e
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
s2b:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_14], ecx
mov [rbp+var_20], r8
mov eax, [rbp+var_10]
add eax, 8
mov ecx, 9
cdq
idiv ecx
mov [rbp+var_34], eax
mov [rbp+var_30], 0
mov [rbp+var_38], 1
loc_72398:
mov eax, [rbp+var_34]
cmp eax, [rbp+var_38]
jle short loc_723B5
jmp short $+2
loc_723A2:
mov eax, [rbp+var_38]
shl eax, 1
mov [rbp+var_38], eax
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp short loc_72398
loc_723B5:
mov edi, [rbp+var_30]
mov rsi, [rbp+var_20]
call Balloc
mov [rbp+var_28], rax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rax], ecx
mov rax, [rbp+var_28]
mov dword ptr [rax+14h], 1
mov [rbp+var_2C], 9
mov eax, 9
cmp eax, [rbp+var_C]
jge short loc_72440
mov rax, [rbp+var_8]
add rax, 9
mov [rbp+var_8], rax
loc_723F9:
mov rdi, [rbp+var_28]
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
movsx edx, byte ptr [rax]
sub edx, 30h ; '0'
mov rcx, [rbp+var_20]
mov esi, 0Ah
call multadd
mov [rbp+var_28], rax
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
cmp eax, [rbp+var_C]
jl short loc_723F9
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
jmp short loc_7244C
loc_72440:
mov rax, [rbp+var_8]
add rax, 0Ah
mov [rbp+var_8], rax
loc_7244C:
jmp short $+2
loc_7244E:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_10]
jge short loc_7248C
mov rdi, [rbp+var_28]
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
movsx edx, byte ptr [rax]
sub edx, 30h ; '0'
mov rcx, [rbp+var_20]
mov esi, 0Ah
call multadd
mov [rbp+var_28], rax
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp short loc_7244E
loc_7248C:
mov rax, [rbp+var_28]
add rsp, 40h
pop rbp
retn
|
long long s2b(long long a1, int a2, int a3, int a4, long long a5)
{
char *v5; // rax
char *v6; // rax
int i; // [rsp+8h] [rbp-38h]
unsigned int v9; // [rsp+10h] [rbp-30h]
int v10; // [rsp+14h] [rbp-2Ch]
long long v11; // [rsp+18h] [rbp-28h]
char *v15; // [rsp+38h] [rbp-8h]
char *v16; // [rsp+38h] [rbp-8h]
v9 = 0;
for ( i = 1; (a3 + 8) / 9 > i; i *= 2 )
++v9;
v11 = Balloc(v9, a5);
**(_DWORD **)v11 = a4;
*(_DWORD *)(v11 + 20) = 1;
v10 = 9;
if ( a2 <= 9 )
{
v16 = (char *)(a1 + 10);
}
else
{
v15 = (char *)(a1 + 9);
do
{
v5 = v15++;
v11 = multadd(v11, 10LL, (unsigned int)(*v5 - 48), a5);
++v10;
}
while ( v10 < a2 );
v16 = v15 + 1;
}
while ( v10 < a3 )
{
v6 = v16++;
v11 = multadd(v11, 10LL, (unsigned int)(*v6 - 48), a5);
++v10;
}
return v11;
}
|
s2b:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV dword ptr [RBP + -0x14],ECX
MOV qword ptr [RBP + -0x20],R8
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,0x8
MOV ECX,0x9
CDQ
IDIV ECX
MOV dword ptr [RBP + -0x34],EAX
MOV dword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x38],0x1
LAB_00172398:
MOV EAX,dword ptr [RBP + -0x34]
CMP EAX,dword ptr [RBP + -0x38]
JLE 0x001723b5
JMP 0x001723a2
LAB_001723a2:
MOV EAX,dword ptr [RBP + -0x38]
SHL EAX,0x1
MOV dword ptr [RBP + -0x38],EAX
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x00172398
LAB_001723b5:
MOV EDI,dword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001724a0
MOV qword ptr [RBP + -0x28],RAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x14],0x1
MOV dword ptr [RBP + -0x2c],0x9
MOV EAX,0x9
CMP EAX,dword ptr [RBP + -0xc]
JGE 0x00172440
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x9
MOV qword ptr [RBP + -0x8],RAX
LAB_001723f9:
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOVSX EDX,byte ptr [RAX]
SUB EDX,0x30
MOV RCX,qword ptr [RBP + -0x20]
MOV ESI,0xa
CALL 0x00173130
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,dword ptr [RBP + -0xc]
JL 0x001723f9
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0017244c
LAB_00172440:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0xa
MOV qword ptr [RBP + -0x8],RAX
LAB_0017244c:
JMP 0x0017244e
LAB_0017244e:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x10]
JGE 0x0017248c
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOVSX EDX,byte ptr [RAX]
SUB EDX,0x30
MOV RCX,qword ptr [RBP + -0x20]
MOV ESI,0xa
CALL 0x00173130
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0017244e
LAB_0017248c:
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x40
POP RBP
RET
|
int8 * s2b(long param_1,int param_2,int param_3,int4 param_4,int8 param_5)
{
char *pcVar1;
int local_40;
int local_38;
int local_34;
int8 *local_30;
char *local_10;
local_38 = 0;
for (local_40 = 1; local_40 < (param_3 + 8) / 9; local_40 = local_40 << 1) {
local_38 = local_38 + 1;
}
local_30 = (int8 *)Balloc(local_38,param_5,(long)(param_3 + 8) % 9 & 0xffffffff);
*(int4 *)*local_30 = param_4;
*(int4 *)((long)local_30 + 0x14) = 1;
local_34 = 9;
if (param_2 < 10) {
local_10 = (char *)(param_1 + 10);
}
else {
pcVar1 = (char *)(param_1 + 9);
do {
local_10 = pcVar1;
local_30 = (int8 *)multadd(local_30,10,*local_10 + -0x30,param_5);
local_34 = local_34 + 1;
pcVar1 = local_10 + 1;
} while (local_34 < param_2);
local_10 = local_10 + 2;
}
for (; local_34 < param_3; local_34 = local_34 + 1) {
local_30 = (int8 *)multadd(local_30,10,*local_10 + -0x30,param_5);
local_10 = local_10 + 1;
}
return local_30;
}
|
|
57,944
|
my_rw_tryrdlock
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_tryrdlock(my_rw_lock_t *rwp)
{
int res;
pthread_mutex_lock(&rwp->lock);
if ((rwp->state < 0 ) || rwp->waiters)
res= EBUSY; /* Can't get lock */
else
{
res=0;
rwp->state++;
}
pthread_mutex_unlock(&rwp->lock);
return(res);
}
|
O0
|
c
|
my_rw_tryrdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2a220
movq -0x8(%rbp), %rax
cmpl $0x0, 0x88(%rax)
jl 0xf99df
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8c(%rax)
je 0xf99e8
movl $0x10, -0xc(%rbp)
jmp 0xf9a02
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x88(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x88(%rax)
movq -0x8(%rbp), %rdi
callq 0x2a1f0
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_rw_tryrdlock:
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+88h], 0
jl short loc_F99DF
mov rax, [rbp+var_8]
cmp dword ptr [rax+8Ch], 0
jz short loc_F99E8
loc_F99DF:
mov [rbp+var_C], 10h
jmp short loc_F9A02
loc_F99E8:
mov [rbp+var_C], 0
mov rax, [rbp+var_8]
mov ecx, [rax+88h]
add ecx, 1
mov [rax+88h], ecx
loc_F9A02:
mov rdi, [rbp+var_8]
call _pthread_mutex_unlock
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
|
long long my_rw_tryrdlock(long long a1)
{
unsigned int v2; // [rsp+4h] [rbp-Ch]
pthread_mutex_lock(a1);
if ( *(int *)(a1 + 136) < 0 || *(_DWORD *)(a1 + 140) )
{
v2 = 16;
}
else
{
v2 = 0;
++*(_DWORD *)(a1 + 136);
}
pthread_mutex_unlock(a1);
return v2;
}
|
my_rw_tryrdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a220
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x88],0x0
JL 0x001f99df
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x8c],0x0
JZ 0x001f99e8
LAB_001f99df:
MOV dword ptr [RBP + -0xc],0x10
JMP 0x001f9a02
LAB_001f99e8:
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x88]
ADD ECX,0x1
MOV dword ptr [RAX + 0x88],ECX
LAB_001f9a02:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a1f0
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int4 my_rw_tryrdlock(pthread_mutex_t *param_1)
{
int4 local_14;
pthread_mutex_lock(param_1);
if ((*(int *)((long)param_1 + 0x88) < 0) || (*(int *)((long)param_1 + 0x8c) != 0)) {
local_14 = 0x10;
}
else {
local_14 = 0;
*(int *)((long)param_1 + 0x88) = *(int *)((long)param_1 + 0x88) + 1;
}
pthread_mutex_unlock(param_1);
return local_14;
}
|
|
57,945
|
my_rw_tryrdlock
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_tryrdlock(my_rw_lock_t *rwp)
{
int res;
pthread_mutex_lock(&rwp->lock);
if ((rwp->state < 0 ) || rwp->waiters)
res= EBUSY; /* Can't get lock */
else
{
res=0;
rwp->state++;
}
pthread_mutex_unlock(&rwp->lock);
return(res);
}
|
O3
|
c
|
my_rw_tryrdlock:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x29220
movl 0x88(%rbx), %eax
movl $0x10, %r14d
testl %eax, %eax
js 0xa3f85
cmpl $0x0, 0x8c(%rbx)
jne 0xa3f85
incl %eax
movl %eax, 0x88(%rbx)
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x291e0
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
my_rw_tryrdlock:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
call _pthread_mutex_lock
mov eax, [rbx+88h]
mov r14d, 10h
test eax, eax
js short loc_A3F85
cmp dword ptr [rbx+8Ch], 0
jnz short loc_A3F85
inc eax
mov [rbx+88h], eax
xor r14d, r14d
loc_A3F85:
mov rdi, rbx
call _pthread_mutex_unlock
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
|
long long my_rw_tryrdlock(long long a1)
{
int v1; // eax
unsigned int v2; // r14d
pthread_mutex_lock(a1);
v1 = *(_DWORD *)(a1 + 136);
v2 = 16;
if ( v1 >= 0 && !*(_DWORD *)(a1 + 140) )
{
*(_DWORD *)(a1 + 136) = v1 + 1;
v2 = 0;
}
pthread_mutex_unlock(a1);
return v2;
}
|
my_rw_tryrdlock:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x00129220
MOV EAX,dword ptr [RBX + 0x88]
MOV R14D,0x10
TEST EAX,EAX
JS 0x001a3f85
CMP dword ptr [RBX + 0x8c],0x0
JNZ 0x001a3f85
INC EAX
MOV dword ptr [RBX + 0x88],EAX
XOR R14D,R14D
LAB_001a3f85:
MOV RDI,RBX
CALL 0x001291e0
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
|
int8 my_rw_tryrdlock(pthread_mutex_t *param_1)
{
int8 uVar1;
pthread_mutex_lock(param_1);
uVar1 = 0x10;
if ((-1 < *(int *)((long)param_1 + 0x88)) && (*(int *)((long)param_1 + 0x8c) == 0)) {
*(int *)((long)param_1 + 0x88) = *(int *)((long)param_1 + 0x88) + 1;
uVar1 = 0;
}
pthread_mutex_unlock(param_1);
return uVar1;
}
|
|
57,946
|
js_cond_timedwait
|
bluesky950520[P]quickjs/cutils.c
|
int js_cond_timedwait(js_cond_t *cond, js_mutex_t *mutex, uint64_t timeout) {
int r;
struct timespec ts;
#if !defined(__APPLE__)
timeout += js__hrtime_ns();
#endif
ts.tv_sec = timeout / NANOSEC;
ts.tv_nsec = timeout % NANOSEC;
#if defined(__APPLE__) && defined(__MACH__)
r = pthread_cond_timedwait_relative_np(cond, mutex, &ts);
#else
r = pthread_cond_timedwait(cond, mutex, &ts);
#endif
if (r == 0)
return 0;
if (r == ETIMEDOUT)
return -1;
abort();
/* Pacify some compilers. */
return -1;
}
|
O0
|
c
|
js_cond_timedwait:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
callq 0x1fba0
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, (%rsp)
movq 0x18(%rsp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rdx, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0xe720
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0x1fe20
movl $0x0, 0x34(%rsp)
jmp 0x1fe36
cmpl $0x6e, 0x14(%rsp)
jne 0x1fe31
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x1fe36
callq 0xe090
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
|
js_cond_timedwait:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_20], rdx
call js__hrtime_ns
add rax, [rsp+38h+var_20]
mov [rsp+38h+var_20], rax
mov rax, [rsp+38h+var_20]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rsp+38h+var_38], rax
mov rax, [rsp+38h+var_20]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rsp+38h+var_30], rdx
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_18]
mov rdx, rsp
call _pthread_cond_timedwait
mov [rsp+38h+var_24], eax
cmp [rsp+38h+var_24], 0
jnz short loc_1FE20
mov [rsp+38h+var_4], 0
jmp short loc_1FE36
loc_1FE20:
cmp [rsp+38h+var_24], 6Eh ; 'n'
jnz short loc_1FE31
mov [rsp+38h+var_4], 0FFFFFFFFh
jmp short loc_1FE36
loc_1FE31:
call _abort
loc_1FE36:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
|
long long js_cond_timedwait(long long a1, long long a2, long long a3)
{
_QWORD v4[2]; // [rsp+0h] [rbp-38h] BYREF
int v5; // [rsp+14h] [rbp-24h]
unsigned long long v6; // [rsp+18h] [rbp-20h]
long long v7; // [rsp+20h] [rbp-18h]
long long v8; // [rsp+28h] [rbp-10h]
v8 = a1;
v7 = a2;
v6 = a3 + js__hrtime_ns();
v4[0] = v6 / 0x3B9ACA00;
v4[1] = v6 % 0x3B9ACA00;
v5 = pthread_cond_timedwait(a1, a2, v4);
if ( v5 )
{
if ( v5 != 110 )
abort();
return (unsigned int)-1;
}
else
{
return 0;
}
}
|
js_cond_timedwait:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x18],RDX
CALL 0x0011fba0
ADD RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV qword ptr [RSP + 0x8],RDX
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,RSP
CALL 0x0010e720
MOV dword ptr [RSP + 0x14],EAX
CMP dword ptr [RSP + 0x14],0x0
JNZ 0x0011fe20
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0011fe36
LAB_0011fe20:
CMP dword ptr [RSP + 0x14],0x6e
JNZ 0x0011fe31
MOV dword ptr [RSP + 0x34],0xffffffff
JMP 0x0011fe36
LAB_0011fe31:
CALL 0x0010e090
LAB_0011fe36:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
int4 js_cond_timedwait(pthread_cond_t *param_1,pthread_mutex_t *param_2,long param_3)
{
long lVar1;
timespec local_38;
int local_24;
ulong local_20;
pthread_mutex_t *local_18;
pthread_cond_t *local_10;
int4 local_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
lVar1 = js__hrtime_ns();
local_20 = lVar1 + local_20;
local_38.tv_sec = local_20 / 1000000000;
local_38.tv_nsec = local_20 % 1000000000;
local_24 = pthread_cond_timedwait(local_10,local_18,&local_38);
if (local_24 == 0) {
local_4 = 0;
}
else {
if (local_24 != 0x6e) {
/* WARNING: Subroutine does not return */
abort();
}
local_4 = 0xffffffff;
}
return local_4;
}
|
|
57,947
|
js_cond_timedwait
|
bluesky950520[P]quickjs/cutils.c
|
int js_cond_timedwait(js_cond_t *cond, js_mutex_t *mutex, uint64_t timeout) {
int r;
struct timespec ts;
#if !defined(__APPLE__)
timeout += js__hrtime_ns();
#endif
ts.tv_sec = timeout / NANOSEC;
ts.tv_nsec = timeout % NANOSEC;
#if defined(__APPLE__) && defined(__MACH__)
r = pthread_cond_timedwait_relative_np(cond, mutex, &ts);
#else
r = pthread_cond_timedwait(cond, mutex, &ts);
#endif
if (r == 0)
return 0;
if (r == ETIMEDOUT)
return -1;
abort();
/* Pacify some compilers. */
return -1;
}
|
O1
|
c
|
js_cond_timedwait:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x1bacc
movq %rax, %rcx
addq %rbx, %rcx
movq %rcx, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
mulq %rdx
shrq $0xb, %rdx
movq %rsp, %rax
movq %rdx, (%rax)
imulq $0x3b9aca00, %rdx, %rdx # imm = 0x3B9ACA00
subq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xe730
testl %eax, %eax
je 0x1bc71
cmpl $0x6e, %eax
jne 0x1bc7b
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0xe090
|
js_cond_timedwait:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
call js__hrtime_ns
mov rcx, rax
add rcx, rbx
mov rax, rcx
shr rax, 9
mov rdx, 44B82FA09B5A53h
mul rdx
shr rdx, 0Bh
mov rax, rsp
mov [rax], rdx
imul rdx, 3B9ACA00h
sub rcx, rdx
mov [rax+8], rcx
mov rdi, r15
mov rsi, r14
mov rdx, rax
call _pthread_cond_timedwait
test eax, eax
jz short loc_1BC71
cmp eax, 6Eh ; 'n'
jnz short loc_1BC7B
mov eax, 0FFFFFFFFh
loc_1BC71:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_1BC7B:
call _abort
|
long long js_cond_timedwait(long long a1, long long a2, long long a3)
{
long long v4; // rax
long long result; // rax
_QWORD v6[5]; // [rsp+0h] [rbp-28h] BYREF
v4 = js__hrtime_ns();
v6[0] = (a3 + v4) / 0x3B9ACA00uLL;
v6[1] = (a3 + v4) % 0x3B9ACA00uLL;
result = pthread_cond_timedwait(a1, a2, v6);
if ( (_DWORD)result )
{
if ( (_DWORD)result != 110 )
abort();
return 0xFFFFFFFFLL;
}
return result;
}
|
js_cond_timedwait:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CALL 0x0011bacc
MOV RCX,RAX
ADD RCX,RBX
MOV RAX,RCX
SHR RAX,0x9
MOV RDX,0x44b82fa09b5a53
MUL RDX
SHR RDX,0xb
MOV RAX,RSP
MOV qword ptr [RAX],RDX
IMUL RDX,RDX,0x3b9aca00
SUB RCX,RDX
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,R15
MOV RSI,R14
MOV RDX,RAX
CALL 0x0010e730
TEST EAX,EAX
JZ 0x0011bc71
CMP EAX,0x6e
JNZ 0x0011bc7b
MOV EAX,0xffffffff
LAB_0011bc71:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
LAB_0011bc7b:
CALL 0x0010e090
|
int js_cond_timedwait(pthread_cond_t *param_1,pthread_mutex_t *param_2,long param_3)
{
int iVar1;
long lVar2;
timespec local_28;
lVar2 = js__hrtime_ns();
local_28.tv_sec = (ulong)(lVar2 + param_3) / 1000000000;
local_28.tv_nsec = (ulong)(lVar2 + param_3) % 1000000000;
iVar1 = pthread_cond_timedwait(param_1,param_2,&local_28);
if (iVar1 != 0) {
if (iVar1 != 0x6e) {
/* WARNING: Subroutine does not return */
abort();
}
iVar1 = -1;
}
return iVar1;
}
|
|
57,948
|
do_file_exist(st_command*)
|
eloqsql/client/mysqltest.cc
|
void do_file_exist(struct st_command *command)
{
int error;
static DYNAMIC_STRING ds_filename;
const struct command_arg file_exist_args[] = {
{ "filename", ARG_STRING, TRUE, &ds_filename, "File to check if it exist" }
};
DBUG_ENTER("do_file_exist");
check_command_args(command, command->first_argument,
file_exist_args,
sizeof(file_exist_args)/sizeof(struct command_arg),
' ');
DBUG_PRINT("info", ("Checking for existence of file: %s", ds_filename.str));
error= (access(ds_filename.str, F_OK) != 0);
handle_command_error(command, error, errno);
dynstr_free(&ds_filename);
DBUG_VOID_RETURN;
}
|
O0
|
cpp
|
do_file_exist(st_command*):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq 0x27e92d(%rip), %rax # 0x2e64e0
movq %rax, -0x30(%rbp)
movq 0x27e92a(%rip), %rax # 0x2e64e8
movq %rax, -0x28(%rbp)
movq 0x27e927(%rip), %rax # 0x2e64f0
movq %rax, -0x20(%rbp)
movq 0x27e924(%rip), %rax # 0x2e64f8
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x30(%rbp), %rdx
movl $0x1, %ecx
movl $0x20, %r8d
callq 0x62810
jmp 0x67bfa
movq 0x4529cf(%rip), %rdi # 0x4ba5d0
xorl %esi, %esi
callq 0x60130
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x34(%rbp)
callq 0x60ba0
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %esi
movl (%rax), %edx
callq 0x62c40
leaq 0x452992(%rip), %rdi # 0x4ba5d0
callq 0xc6410
jmp 0x67c45
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_Z13do_file_existP10st_command:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov rax, cs:off_2E64E0; "filename"
mov [rbp+var_30], rax
mov rax, cs:qword_2E64E8
mov [rbp+var_28], rax
mov rax, cs:off_2E64F0
mov [rbp+var_20], rax
mov rax, cs:off_2E64F8; "File to check if it exist"
mov [rbp+var_18], rax
mov rdi, [rbp+var_8]
mov rax, [rbp+var_8]
mov rsi, [rax+10h]
lea rdx, [rbp+var_30]
mov ecx, 1
mov r8d, 20h ; ' '
call _Z18check_command_argsP10st_commandPKcPK11command_argic; check_command_args(st_command *,char const*,command_arg const*,int,char)
jmp short $+2
loc_67BFA:
mov rdi, cs:_ZZ13do_file_existP10st_commandE11ds_filename; do_file_exist(st_command *)::ds_filename
xor esi, esi
call _access
cmp eax, 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_C], eax
mov rax, [rbp+var_8]
mov [rbp+var_40], rax
mov eax, [rbp+var_C]
mov [rbp+var_34], eax
call ___errno_location
mov rdi, [rbp+var_40]
mov esi, [rbp+var_34]
mov edx, [rax]
call _Z20handle_command_errorP10st_commandji; handle_command_error(st_command *,uint,int)
lea rdi, _ZZ13do_file_existP10st_commandE11ds_filename; do_file_exist(st_command *)::ds_filename
call dynstr_free
jmp short $+2
loc_67C45:
add rsp, 40h
pop rbp
retn
|
long long do_file_exist(long long a1)
{
unsigned int *v1; // rax
long long *v3; // [rsp+0h] [rbp-40h]
unsigned int v4; // [rsp+Ch] [rbp-34h]
_QWORD v5[4]; // [rsp+10h] [rbp-30h] BYREF
BOOL v6; // [rsp+34h] [rbp-Ch]
long long *v7; // [rsp+38h] [rbp-8h]
v7 = (long long *)a1;
v5[0] = "filename";
v5[1] = qword_2E64E8;
v5[2] = &do_file_exist(st_command *)::ds_filename;
v5[3] = "File to check if it exist";
check_command_args((_QWORD *)a1, *(char **)(a1 + 16), (long long)v5, 1, 32);
v6 = access(do_file_exist(st_command *)::ds_filename, 0LL) != 0;
v3 = v7;
v4 = v6;
v1 = (unsigned int *)__errno_location();
handle_command_error(v3, v4, *v1);
return dynstr_free(&do_file_exist(st_command *)::ds_filename);
}
|
do_file_exist:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [0x003e64e0]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [0x003e64e8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [0x003e64f0]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [0x003e64f8]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x10]
LEA RDX,[RBP + -0x30]
MOV ECX,0x1
MOV R8D,0x20
CALL 0x00162810
JMP 0x00167bfa
LAB_00167bfa:
MOV RDI,qword ptr [0x005ba5d0]
XOR ESI,ESI
CALL 0x00160130
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0xc],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x34],EAX
CALL 0x00160ba0
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x34]
MOV EDX,dword ptr [RAX]
CALL 0x00162c40
LEA RDI,[0x5ba5d0]
CALL 0x001c6410
JMP 0x00167c45
LAB_00167c45:
ADD RSP,0x40
POP RBP
RET
|
/* do_file_exist(st_command*) */
void do_file_exist(st_command *param_1)
{
st_command *psVar1;
int iVar2;
int *piVar3;
int *local_38;
int8 local_30;
int *local_28;
int *local_20;
uint local_14;
st_command *local_10;
local_38 = PTR_s_filename_003e64e0;
local_30 = DAT_003e64e8;
local_28 = PTR_ds_filename_003e64f0;
local_20 = PTR_s_File_to_check_if_it_exist_003e64f8;
local_10 = param_1;
check_command_args(param_1,*(char **)(param_1 + 0x10),(command_arg *)&local_38,1,' ');
iVar2 = access(do_file_exist(st_command*)::ds_filename,0);
psVar1 = local_10;
local_14 = (uint)(iVar2 != 0);
piVar3 = __errno_location();
handle_command_error(psVar1,(uint)(iVar2 != 0),*piVar3);
dynstr_free(&do_file_exist(st_command*)::ds_filename);
return;
}
|
|
57,949
|
naive_trie::insert(char const*, unsigned long, int)
|
monkey531[P]llama/src/llama-vocab.cpp
|
void insert(const char * key, size_t len, int32_t value = 0) {
if (len == 0) {
this->has_value = true;
this->value = value;
return;
}
char c = key[0];
auto res = children.find(c);
if (res != children.end()) {
res->second.insert(key + 1, len - 1, value);
} else {
auto res = children.insert(std::make_pair(c, naive_trie()));
res.first->second.insert(key + 1, len - 1, value);
}
}
|
O0
|
cpp
|
naive_trie::insert(char const*, unsigned long, int):
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rdi
callq 0x1ffc50
popq %rax
retq
|
_ZN10naive_trieD2Ev:
push rax
mov [rsp+8+var_8], rdi
mov rdi, [rsp+8+var_8]
call __ZNSt3mapIc10naive_trieSt4lessIcESaISt4pairIKcS0_EEED2Ev; std::map<char,naive_trie>::~map()
pop rax
retn
|
void naive_trie::~naive_trie(naive_trie *this)
{
std::map<char,naive_trie>::~map(this);
}
| |||
57,950
|
naive_trie::insert(char const*, unsigned long, int)
|
monkey531[P]llama/src/llama-vocab.cpp
|
void insert(const char * key, size_t len, int32_t value = 0) {
if (len == 0) {
this->has_value = true;
this->value = value;
return;
}
char c = key[0];
auto res = children.find(c);
if (res != children.end()) {
res->second.insert(key + 1, len - 1, value);
} else {
auto res = children.insert(std::make_pair(c, naive_trie()));
res.first->second.insert(key + 1, len - 1, value);
}
}
|
O1
|
cpp
|
naive_trie::insert(char const*, unsigned long, int):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
testq %r14, %r14
je 0xf3774
movb (%r15), %al
movq 0x10(%rdi), %rsi
leaq 0x8(%rdi), %rcx
movq %rcx, %rdx
testq %rsi, %rsi
je 0xf374e
movq %rcx, %rdx
xorl %r8d, %r8d
cmpb %al, 0x20(%rsi)
setl %r8b
cmovgeq %rsi, %rdx
movq 0x10(%rsi,%r8,8), %rsi
testq %rsi, %rsi
jne 0xf3736
movq %rcx, %rsi
cmpq %rcx, %rdx
je 0xf3760
cmpb 0x20(%rdx), %al
cmovlq %rcx, %rdx
movq %rdx, %rsi
cmpq %rcx, %rsi
je 0xf3780
addq $0x28, %rsi
incq %r15
decq %r14
movq %rsi, %rdi
jmp 0xf371b
movb $0x1, 0x30(%rdi)
movl %ebx, 0x34(%rdi)
jmp 0xf3841
leaq 0x48(%rsp), %rcx
xorl %esi, %esi
movl %esi, (%rcx)
movq %rsi, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rsi, 0x20(%rcx)
movb $0x0, 0x28(%rcx)
movl %esi, 0x2c(%rcx)
leaq 0x10(%rsp), %rdx
movb %al, -0x10(%rdx)
movl %esi, (%rdx)
movb $0x1, %al
testb %al, %al
jne 0xf37e3
xorl %esi, %esi
movq %rsi, 0x18(%rsp)
leaq 0x68(%rsp), %rax
movups -0x10(%rax), %xmm0
movups %xmm0, 0x20(%rsp)
movq %rdx, 0x8
movq (%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rsi, -0x18(%rax)
movq %rcx, -0x10(%rax)
movq %rcx, -0x8(%rax)
jmp 0xf37f8
leaq 0x30(%rsp), %rax
movq $0x0, -0x18(%rax)
movq %rdx, -0x10(%rax)
movq %rdx, -0x8(%rax)
movq $0x0, (%rax)
movq 0x70(%rsp), %rax
movq %rsp, %rsi
movq %rax, 0x38(%rsi)
callq 0x66310
movq %rax, %r12
leaq 0x8(%rsp), %rdi
callq 0x6b0c0
leaq 0x40(%rsp), %rdi
callq 0x6b0c0
addq $0x28, %r12
incq %r15
decq %r14
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x65e90
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6b0c0
leaq 0x40(%rsp), %rdi
callq 0x6b0c0
movq %rbx, %rdi
callq 0x6c640
|
_ZN10naive_trie6insertEPKcmi:
push r15
push r14
push r12
push rbx
sub rsp, 78h
mov ebx, ecx
mov r14, rdx
mov r15, rsi
loc_F371B:
test r14, r14
jz short loc_F3774
mov al, [r15]
mov rsi, [rdi+10h]
lea rcx, [rdi+8]
mov rdx, rcx
test rsi, rsi
jz short loc_F374E
mov rdx, rcx
loc_F3736:
xor r8d, r8d
cmp [rsi+20h], al
setl r8b
cmovge rdx, rsi
mov rsi, [rsi+r8*8+10h]
test rsi, rsi
jnz short loc_F3736
loc_F374E:
mov rsi, rcx
cmp rdx, rcx
jz short loc_F3760
cmp al, [rdx+20h]
cmovl rdx, rcx
mov rsi, rdx
loc_F3760:
cmp rsi, rcx
jz short loc_F3780
add rsi, 28h ; '('
inc r15
dec r14
mov rdi, rsi
jmp short loc_F371B
loc_F3774:
mov byte ptr [rdi+30h], 1
mov [rdi+34h], ebx
jmp loc_F3841
loc_F3780:
lea rcx, [rsp+98h+var_50]
xor esi, esi
mov [rcx], esi
mov [rcx+8], rsi
mov [rcx+10h], rcx
mov [rcx+18h], rcx
mov [rcx+20h], rsi
mov byte ptr [rcx+28h], 0
mov [rcx+2Ch], esi
lea rdx, [rsp+98h+var_88]
mov [rdx-10h], al
mov [rdx], esi
mov al, 1
test al, al
jnz short loc_F37E3
xor esi, esi
mov [rsp+98h+var_80], rsi
lea rax, [rsp+98h+var_30]
movups xmm0, xmmword ptr [rax-10h]
movups [rsp+98h+var_78], xmm0
mov qword ptr ds:byte_8, rdx
mov rdx, [rax]
mov [rsp+98h+var_68], rdx
mov [rax-18h], rsi
mov [rax-10h], rcx
mov [rax-8], rcx
jmp short loc_F37F8
loc_F37E3:
lea rax, [rsp+98h+var_68]
mov qword ptr [rax-18h], 0
mov [rax-10h], rdx
mov [rax-8], rdx
loc_F37F8:
mov qword ptr [rax], 0
mov rax, [rsp+98h+var_28]
mov rsi, rsp
mov [rsi+38h], rax
call __ZNSt8_Rb_treeIcSt4pairIKc10naive_trieESt10_Select1stIS3_ESt4lessIcESaIS3_EE17_M_emplace_uniqueIJS0_IcS2_EEEES0_ISt17_Rb_tree_iteratorIS3_EbEDpOT_; std::_Rb_tree<char,std::pair<char const,naive_trie>,std::_Select1st<std::pair<char const,naive_trie>>,std::less<char>,std::allocator<std::pair<char const,naive_trie>>>::_M_emplace_unique<std::pair<char,naive_trie>>(std::pair<char,naive_trie> &&)
mov r12, rax
lea rdi, [rsp+98h+var_90]
call __ZNSt8_Rb_treeIcSt4pairIKc10naive_trieESt10_Select1stIS3_ESt4lessIcESaIS3_EED2Ev; std::_Rb_tree<char,std::pair<char const,naive_trie>,std::_Select1st<std::pair<char const,naive_trie>>,std::less<char>,std::allocator<std::pair<char const,naive_trie>>>::~_Rb_tree()
lea rdi, [rsp+98h+var_58]
call __ZNSt8_Rb_treeIcSt4pairIKc10naive_trieESt10_Select1stIS3_ESt4lessIcESaIS3_EED2Ev; std::_Rb_tree<char,std::pair<char const,naive_trie>,std::_Select1st<std::pair<char const,naive_trie>>,std::less<char>,std::allocator<std::pair<char const,naive_trie>>>::~_Rb_tree()
add r12, 28h ; '('
inc r15
dec r14
mov rdi, r12; this
mov rsi, r15; char *
mov rdx, r14; unsigned __int64
mov ecx, ebx; int
call __ZN10naive_trie6insertEPKcmi; naive_trie::insert(char const*,ulong,int)
loc_F3841:
add rsp, 78h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call __ZNSt8_Rb_treeIcSt4pairIKc10naive_trieESt10_Select1stIS3_ESt4lessIcESaIS3_EED2Ev; std::_Rb_tree<char,std::pair<char const,naive_trie>,std::_Select1st<std::pair<char const,naive_trie>>,std::less<char>,std::allocator<std::pair<char const,naive_trie>>>::~_Rb_tree()
lea rdi, [rsp+arg_38]
call __ZNSt8_Rb_treeIcSt4pairIKc10naive_trieESt10_Select1stIS3_ESt4lessIcESaIS3_EED2Ev; std::_Rb_tree<char,std::pair<char const,naive_trie>,std::_Select1st<std::pair<char const,naive_trie>>,std::less<char>,std::allocator<std::pair<char const,naive_trie>>>::~_Rb_tree()
mov rdi, rbx
call __Unwind_Resume
|
// write access to const memory has been detected, the output may be wrong!
void naive_trie::insert(naive_trie *this, const char *a2, long long a3, int a4)
{
char v7; // al
char *v8; // rsi
char *v9; // rcx
char *v10; // rdx
char *v11; // rsi
long long v12; // r12
_BYTE v13[8]; // [rsp+8h] [rbp-90h] BYREF
int v14; // [rsp+10h] [rbp-88h] BYREF
long long v15; // [rsp+18h] [rbp-80h]
int *v16; // [rsp+20h] [rbp-78h]
int *v17; // [rsp+28h] [rbp-70h]
long long v18; // [rsp+30h] [rbp-68h]
long long v19; // [rsp+38h] [rbp-60h]
_BYTE v20[8]; // [rsp+40h] [rbp-58h] BYREF
int v21; // [rsp+48h] [rbp-50h] BYREF
long long v22; // [rsp+50h] [rbp-48h]
int *v23; // [rsp+58h] [rbp-40h]
int *v24; // [rsp+60h] [rbp-38h]
long long v25; // [rsp+68h] [rbp-30h]
unsigned int v26; // [rsp+70h] [rbp-28h]
int v27; // [rsp+74h] [rbp-24h]
while ( 1 )
{
if ( !a3 )
{
*((_BYTE *)this + 48) = 1;
*((_DWORD *)this + 13) = a4;
return;
}
v7 = *a2;
v8 = (char *)*((_QWORD *)this + 2);
v9 = (char *)this + 8;
v10 = (char *)this + 8;
if ( v8 )
{
v10 = (char *)this + 8;
do
{
if ( v8[32] >= v7 )
v10 = v8;
v8 = *(char **)&v8[8 * (v8[32] < v7) + 16];
}
while ( v8 );
}
v11 = (char *)this + 8;
if ( v10 != v9 )
{
if ( v7 < v10[32] )
v10 = (char *)this + 8;
v11 = v10;
}
if ( v11 == v9 )
break;
++a2;
--a3;
this = (naive_trie *)(v11 + 40);
}
v21 = 0;
v22 = 0LL;
v23 = &v21;
v24 = &v21;
v25 = 0LL;
LOBYTE(v26) = 0;
v27 = 0;
v14 = 0;
v15 = 0LL;
v16 = &v14;
v17 = &v14;
v18 = 0LL;
v19 = v26;
v12 = std::_Rb_tree<char,std::pair<char const,naive_trie>,std::_Select1st<std::pair<char const,naive_trie>>,std::less<char>,std::allocator<std::pair<char const,naive_trie>>>::_M_emplace_unique<std::pair<char,naive_trie>>(this);
std::_Rb_tree<char,std::pair<char const,naive_trie>,std::_Select1st<std::pair<char const,naive_trie>>,std::less<char>,std::allocator<std::pair<char const,naive_trie>>>::~_Rb_tree(v13);
std::_Rb_tree<char,std::pair<char const,naive_trie>,std::_Select1st<std::pair<char const,naive_trie>>,std::less<char>,std::allocator<std::pair<char const,naive_trie>>>::~_Rb_tree(v20);
naive_trie::insert((naive_trie *)(v12 + 40), a2 + 1, a3 - 1, a4);
}
|
insert:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV EBX,ECX
MOV R14,RDX
MOV R15,RSI
LAB_001f371b:
TEST R14,R14
JZ 0x001f3774
MOV AL,byte ptr [R15]
MOV RSI,qword ptr [RDI + 0x10]
LEA RCX,[RDI + 0x8]
MOV RDX,RCX
TEST RSI,RSI
JZ 0x001f374e
MOV RDX,RCX
LAB_001f3736:
XOR R8D,R8D
CMP byte ptr [RSI + 0x20],AL
SETL R8B
CMOVGE RDX,RSI
MOV RSI,qword ptr [RSI + R8*0x8 + 0x10]
TEST RSI,RSI
JNZ 0x001f3736
LAB_001f374e:
MOV RSI,RCX
CMP RDX,RCX
JZ 0x001f3760
CMP AL,byte ptr [RDX + 0x20]
CMOVL RDX,RCX
MOV RSI,RDX
LAB_001f3760:
CMP RSI,RCX
JZ 0x001f3780
ADD RSI,0x28
INC R15
DEC R14
MOV RDI,RSI
JMP 0x001f371b
LAB_001f3774:
MOV byte ptr [RDI + 0x30],0x1
MOV dword ptr [RDI + 0x34],EBX
JMP 0x001f3841
LAB_001f3780:
LEA RCX,[RSP + 0x48]
XOR ESI,ESI
MOV dword ptr [RCX],ESI
MOV qword ptr [RCX + 0x8],RSI
MOV qword ptr [RCX + 0x10],RCX
MOV qword ptr [RCX + 0x18],RCX
MOV qword ptr [RCX + 0x20],RSI
MOV byte ptr [RCX + 0x28],0x0
MOV dword ptr [RCX + 0x2c],ESI
LEA RDX,[RSP + 0x10]
MOV byte ptr [RDX + -0x10],AL
MOV dword ptr [RDX],ESI
MOV AL,0x1
TEST AL,AL
JNZ 0x001f37e3
XOR ESI,ESI
MOV qword ptr [RSP + 0x18],RSI
LEA RAX,[RSP + 0x68]
MOVUPS XMM0,xmmword ptr [RAX + -0x10]
MOVUPS xmmword ptr [RSP + 0x20],XMM0
MOV qword ptr [0x00000008],RDX
MOV RDX,qword ptr [RAX]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RAX + -0x18],RSI
MOV qword ptr [RAX + -0x10],RCX
MOV qword ptr [RAX + -0x8],RCX
JMP 0x001f37f8
LAB_001f37e3:
LEA RAX,[RSP + 0x30]
MOV qword ptr [RAX + -0x18],0x0
MOV qword ptr [RAX + -0x10],RDX
MOV qword ptr [RAX + -0x8],RDX
LAB_001f37f8:
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RSP + 0x70]
MOV RSI,RSP
MOV qword ptr [RSI + 0x38],RAX
LAB_001f380b:
CALL 0x00166310
LAB_001f3810:
MOV R12,RAX
LEA RDI,[RSP + 0x8]
CALL 0x0016b0c0
LEA RDI,[RSP + 0x40]
CALL 0x0016b0c0
ADD R12,0x28
INC R15
DEC R14
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
MOV ECX,EBX
CALL 0x00165e90
LAB_001f3841:
ADD RSP,0x78
POP RBX
POP R12
POP R14
POP R15
RET
|
/* WARNING: Removing unreachable block (ram,0x001f37b0) */
/* naive_trie::insert(char const*, unsigned long, int) */
void __thiscall naive_trie::insert(naive_trie *this,char *param_1,ulong param_2,int param_3)
{
_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
*p_Var1;
long lVar2;
_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
*p_Var3;
_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
*p_Var4;
pair local_98 [8];
_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
local_90 [8];
int4 local_88 [2];
int8 local_80;
int4 *local_78;
int4 *puStack_70;
int8 local_68;
ulong local_60;
_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
local_58 [8];
int4 local_50 [2];
int8 local_48;
int4 *local_40;
int4 *puStack_38;
int8 local_30;
uint local_28;
int4 uStack_24;
while( true ) {
if (param_2 == 0) {
((_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
*)this)[0x30] =
(_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
)0x1;
*(int *)((_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
*)this + 0x34) = param_3;
return;
}
local_98[0] = (pair)*param_1;
p_Var1 = (_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
*)this + 8;
p_Var3 = p_Var1;
for (p_Var4 = *(_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
**)((_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
*)this + 0x10);
p_Var4 != (_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
*)0x0;
p_Var4 = *(_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
**)(p_Var4 + (ulong)((char)p_Var4[0x20] < (char)local_98[0]) * 8 + 0x10)) {
if ((char)local_98[0] <= (char)p_Var4[0x20]) {
p_Var3 = p_Var4;
}
}
p_Var4 = p_Var1;
if ((p_Var3 != p_Var1) && (p_Var4 = p_Var3, (char)local_98[0] < (char)p_Var3[0x20])) {
p_Var4 = p_Var1;
}
if (p_Var4 == p_Var1) break;
this = (naive_trie *)(p_Var4 + 0x28);
param_1 = (char *)((pair *)param_1 + 1);
param_2 = param_2 - 1;
}
local_40 = local_50;
local_50[0] = 0;
local_48 = 0;
local_30 = 0;
local_28 = local_28 & 0xffffff00;
uStack_24 = 0;
local_78 = local_88;
local_88[0] = 0;
local_80 = 0;
local_68 = 0;
local_60 = (ulong)local_28;
puStack_70 = local_78;
puStack_38 = local_40;
/* try { // try from 001f380b to 001f380f has its CatchHandler @ 001f384d */
lVar2 = std::
_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
::_M_emplace_unique<std::pair<char,naive_trie>>
((_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
*)this,local_98);
std::
_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
::~_Rb_tree(local_90);
std::
_Rb_tree<char,std::pair<char_const,naive_trie>,std::_Select1st<std::pair<char_const,naive_trie>>,std::less<char>,std::allocator<std::pair<char_const,naive_trie>>>
::~_Rb_tree(local_58);
insert((naive_trie *)(lVar2 + 0x28),(char *)((pair *)param_1 + 1),param_2 - 1,param_3);
return;
}
|
|
57,951
|
my_thread_init
|
eloqsql/mysys/my_thr_init.c
|
my_bool my_thread_init(void)
{
struct st_my_thread_var *tmp;
my_bool error=0;
if (!my_thread_global_init_done)
return 1; /* cannot proceed with uninitialized library */
#ifdef EXTRA_DEBUG_THREADS
fprintf(stderr,"my_thread_init(): pthread_self: %p\n", pthread_self());
#endif
if (my_thread_var)
{
#ifdef EXTRA_DEBUG_THREADS
fprintf(stderr,"my_thread_init() called more than once in thread 0x%lx\n",
(long) pthread_self());
#endif
goto end;
}
#ifdef _MSC_VER
install_sigabrt_handler();
#endif
if (!(tmp= (struct st_my_thread_var *) calloc(1, sizeof(*tmp))))
{
error= 1;
goto end;
}
set_mysys_var(tmp);
tmp->pthread_self= pthread_self();
my_thread_init_thr_mutex(tmp);
tmp->stack_ends_here= (char*)&tmp +
STACK_DIRECTION * (long)my_thread_stack_size;
mysql_mutex_lock(&THR_LOCK_threads);
tmp->id= tmp->dbug_id= ++thread_id;
++THR_thread_count;
mysql_mutex_unlock(&THR_LOCK_threads);
tmp->init= 1;
#ifndef DBUG_OFF
/* Generate unique name for thread */
(void) my_thread_name();
#endif
end:
return error;
}
|
O0
|
c
|
my_thread_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb $0x0, -0x11(%rbp)
cmpb $0x0, 0x3b608d(%rip) # 0x410610
jne 0x5a58e
movb $0x1, -0x1(%rbp)
jmp 0x5a677
callq 0x5a430
cmpq $0x0, %rax
je 0x5a59e
jmp 0x5a671
movl $0x1, %edi
movl $0xf0, %esi
callq 0x26240
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x5a5c0
movb $0x1, -0x11(%rbp)
jmp 0x5a671
movq -0x10(%rbp), %rdi
callq 0x5a8e0
callq 0x262b0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc8(%rax)
movq -0x10(%rbp), %rdi
callq 0x5a480
leaq 0x1b9504(%rip), %rax # 0x213af0
movq (%rax), %rax
shlq $0x0, %rax
leaq -0x10(%rbp), %rcx
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb8(%rax)
leaq 0x3b5f3c(%rip), %rdi # 0x410548
leaq 0x5515f(%rip), %rsi # 0xaf772
movl $0x12e, %edx # imm = 0x12E
callq 0x5a790
movq 0x3b5ff4(%rip), %rcx # 0x410618
addq $0x1, %rcx
movq %rcx, 0x3b5fe9(%rip) # 0x410618
movq -0x10(%rbp), %rax
movq %rcx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0xd0(%rax)
leaq 0x3b5cfc(%rip), %rax # 0x410348
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x3b5cf0(%rip), %rax # 0x410348
movl %ecx, (%rax)
leaq 0x3b5ee7(%rip), %rdi # 0x410548
callq 0x5a880
movq -0x10(%rbp), %rax
movb $0x1, 0xe8(%rax)
movb -0x11(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
|
my_thread_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_11], 0
cmp cs:my_thread_global_init_done, 0
jnz short loc_5A58E
mov [rbp+var_1], 1
jmp loc_5A677
loc_5A58E:
call _my_thread_var
cmp rax, 0
jz short loc_5A59E
jmp loc_5A671
loc_5A59E:
mov edi, 1
mov esi, 0F0h
call _calloc
mov [rbp+var_10], rax
cmp rax, 0
jnz short loc_5A5C0
mov [rbp+var_11], 1
jmp loc_5A671
loc_5A5C0:
mov rdi, [rbp+var_10]
call set_mysys_var
call _pthread_self
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+0C8h], rcx
mov rdi, [rbp+var_10]
call my_thread_init_thr_mutex
lea rax, my_thread_stack_size
mov rax, [rax]
shl rax, 0
lea rcx, [rbp+var_10]
add rcx, rax
mov rax, [rbp+var_10]
mov [rax+0B8h], rcx
lea rdi, THR_LOCK_threads
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 12Eh
call inline_mysql_mutex_lock
mov rcx, cs:thread_id
add rcx, 1
mov cs:thread_id, rcx
mov rax, [rbp+var_10]
mov [rax+0D8h], rcx
mov rax, [rbp+var_10]
mov [rax+0D0h], rcx
lea rax, THR_thread_count
mov ecx, [rax]
add ecx, 1
lea rax, THR_thread_count
mov [rax], ecx
lea rdi, THR_LOCK_threads
call inline_mysql_mutex_unlock
mov rax, [rbp+var_10]
mov byte ptr [rax+0E8h], 1
loc_5A671:
mov al, [rbp+var_11]
mov [rbp+var_1], al
loc_5A677:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char my_thread_init()
{
long long v0; // rcx
char v2; // [rsp+Fh] [rbp-11h]
long long v3; // [rsp+10h] [rbp-10h] BYREF
v2 = 0;
if ( !my_thread_global_init_done )
return 1;
if ( !my_thread_var() )
{
v3 = calloc(1LL, 240LL);
if ( v3 )
{
set_mysys_var(v3);
*(_QWORD *)(v3 + 200) = pthread_self();
my_thread_init_thr_mutex(v3);
*(_QWORD *)(v3 + 184) = (char *)&v3 + my_thread_stack_size;
inline_mysql_mutex_lock(&THR_LOCK_threads, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 302LL);
v0 = thread_id + 1;
thread_id = v0;
*(_QWORD *)(v3 + 216) = v0;
*(_QWORD *)(v3 + 208) = v0;
++THR_thread_count;
inline_mysql_mutex_unlock(&THR_LOCK_threads);
*(_BYTE *)(v3 + 232) = 1;
}
else
{
return 1;
}
}
return v2;
}
|
my_thread_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV byte ptr [RBP + -0x11],0x0
CMP byte ptr [0x00510610],0x0
JNZ 0x0015a58e
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015a677
LAB_0015a58e:
CALL 0x0015a430
CMP RAX,0x0
JZ 0x0015a59e
JMP 0x0015a671
LAB_0015a59e:
MOV EDI,0x1
MOV ESI,0xf0
CALL 0x00126240
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JNZ 0x0015a5c0
MOV byte ptr [RBP + -0x11],0x1
JMP 0x0015a671
LAB_0015a5c0:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015a8e0
CALL 0x001262b0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xc8],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015a480
LEA RAX,[0x313af0]
MOV RAX,qword ptr [RAX]
SHL RAX,0x0
LEA RCX,[RBP + -0x10]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xb8],RCX
LEA RDI,[0x510548]
LEA RSI,[0x1af772]
MOV EDX,0x12e
CALL 0x0015a790
MOV RCX,qword ptr [0x00510618]
ADD RCX,0x1
MOV qword ptr [0x00510618],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xd8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xd0],RCX
LEA RAX,[0x510348]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x510348]
MOV dword ptr [RAX],ECX
LEA RDI,[0x510548]
CALL 0x0015a880
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0xe8],0x1
LAB_0015a671:
MOV AL,byte ptr [RBP + -0x11]
MOV byte ptr [RBP + -0x1],AL
LAB_0015a677:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 my_thread_init(void)
{
long lVar1;
pthread_t pVar2;
int1 local_19;
void *local_18;
int1 local_9;
local_19 = 0;
if (my_thread_global_init_done == '\0') {
local_9 = 1;
}
else {
lVar1 = _my_thread_var();
if (lVar1 == 0) {
local_18 = calloc(1,0xf0);
if (local_18 == (void *)0x0) {
local_19 = 1;
}
else {
set_mysys_var(local_18);
pVar2 = pthread_self();
*(pthread_t *)((long)local_18 + 200) = pVar2;
my_thread_init_thr_mutex(local_18);
*(long *)((long)local_18 + 0xb8) = (long)&local_18 + my_thread_stack_size;
inline_mysql_mutex_lock
(THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",
0x12e);
lVar1 = thread_id + 1;
thread_id = lVar1;
*(long *)((long)local_18 + 0xd8) = lVar1;
*(long *)((long)local_18 + 0xd0) = lVar1;
THR_thread_count = THR_thread_count + 1;
inline_mysql_mutex_unlock(THR_LOCK_threads);
*(int1 *)((long)local_18 + 0xe8) = 1;
}
}
local_9 = local_19;
}
return local_9;
}
|
|
57,952
|
my_is_symlink
|
eloqsql/mysys/my_symlink.c
|
int my_is_symlink(const char *filename __attribute__((unused)))
{
#if defined (HAVE_LSTAT) && defined (S_ISLNK)
struct stat stat_buff;
if (lstat(filename, &stat_buff))
return 0;
MSAN_STAT_WORKAROUND(&stat_buff);
return !!S_ISLNK(stat_buff.st_mode);
#elif defined (_WIN32)
DWORD dwAttr = GetFileAttributes(filename);
return (dwAttr != INVALID_FILE_ATTRIBUTES) &&
(dwAttr & FILE_ATTRIBUTE_REPARSE_POINT);
#else /* No symlinks */
return 0;
#endif
}
|
O0
|
c
|
my_is_symlink:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x29490
cmpl $0x0, %eax
je 0xf6abd
movl $0x0, -0x4(%rbp)
jmp 0xf6adc
movl -0x88(%rbp), %eax
andl $0xf000, %eax # imm = 0xF000
cmpl $0xa000, %eax # imm = 0xA000
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_is_symlink:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_A0]
call _lstat64
cmp eax, 0
jz short loc_F6ABD
mov [rbp+var_4], 0
jmp short loc_F6ADC
loc_F6ABD:
mov eax, [rbp+var_88]
and eax, 0F000h
cmp eax, 0A000h
setz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
mov [rbp+var_4], eax
loc_F6ADC:
mov eax, [rbp+var_4]
add rsp, 0A0h
pop rbp
retn
|
_BOOL8 my_is_symlink(long long a1)
{
_BYTE v2[24]; // [rsp+0h] [rbp-A0h] BYREF
int v3; // [rsp+18h] [rbp-88h]
long long v4; // [rsp+90h] [rbp-10h]
v4 = a1;
return !(unsigned int)lstat64(a1, v2) && (v3 & 0xF000) == 40960;
}
|
my_is_symlink:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0xa0]
CALL 0x00129490
CMP EAX,0x0
JZ 0x001f6abd
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001f6adc
LAB_001f6abd:
MOV EAX,dword ptr [RBP + -0x88]
AND EAX,0xf000
CMP EAX,0xa000
SETZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
LAB_001f6adc:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xa0
POP RBP
RET
|
bool my_is_symlink(char *param_1)
{
int iVar1;
stat64 local_a8;
char *local_18;
local_18 = param_1;
iVar1 = lstat64(param_1,&local_a8);
return iVar1 == 0 && (local_a8.st_mode & 0xf000) == 0xa000;
}
|
|
57,953
|
js_create_array_iterator
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_create_array_iterator(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSValue enum_obj, arr;
JSArrayIteratorData *it;
JSIteratorKindEnum kind;
int class_id;
kind = magic & 3;
if (magic & 4) {
/* string iterator case */
arr = JS_ToStringCheckObject(ctx, this_val);
class_id = JS_CLASS_STRING_ITERATOR;
} else {
arr = JS_ToObject(ctx, this_val);
class_id = JS_CLASS_ARRAY_ITERATOR;
}
if (JS_IsException(arr))
goto fail;
enum_obj = JS_NewObjectClass(ctx, class_id);
if (JS_IsException(enum_obj))
goto fail;
it = js_malloc(ctx, sizeof(*it));
if (!it)
goto fail1;
it->obj = arr;
it->kind = kind;
it->idx = 0;
JS_SetOpaqueInternal(enum_obj, it);
return enum_obj;
fail1:
JS_FreeValue(ctx, enum_obj);
fail:
JS_FreeValue(ctx, arr);
return JS_EXCEPTION;
}
|
O3
|
c
|
js_create_array_iterator:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movq %rdi, %rbx
testb $0x4, %bpl
jne 0x4322b
callq 0x268d8
movq %rax, %r14
movq %rdx, %r15
movl $0x2c, %ecx
jmp 0x4323b
callq 0x4350b
movq %rax, %r14
movq %rdx, %r15
movl $0x2d, %ecx
cmpl $0x6, %r15d
je 0x43264
movq 0x40(%rbx), %rax
movl %ecx, %edx
shll $0x4, %edx
movq (%rax,%rdx), %rsi
movq 0x8(%rax,%rdx), %rdx
movq %rbx, %rdi
callq 0x20a15
movq %rdx, %r12
cmpl $0x6, %r12d
jne 0x432a5
movl $0x6, %r12d
cmpl $-0x9, %r15d
jb 0x4328d
movq 0x18(%rbx), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x4328d
movq %r14, %rsi
movq %r15, %rdx
callq 0x20d90
xorl %r13d, %r13d
movq %r13, %rax
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movl $0x18, %esi
movq %rbx, %rdi
callq 0xed89
testq %rax, %rax
je 0x432d4
andl $0x3, %ebp
movq %r14, (%rax)
movq %r15, 0x8(%rax)
movl %ebp, 0x10(%rax)
movl $0x0, 0x14(%rax)
movq %rax, 0x30(%r13)
jmp 0x43290
cmpl $-0x9, %r12d
jb 0x43264
movq 0x18(%rbx), %rdi
movl (%r13), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r13)
cmpl $0x1, %eax
jg 0x43264
movq %r13, %rsi
movq %r12, %rdx
callq 0x20d90
jmp 0x43264
|
js_create_array_iterator:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, r9d
mov rbx, rdi
test bpl, 4
jnz short loc_4322B
call JS_ToObject
mov r14, rax
mov r15, rdx
mov ecx, 2Ch ; ','
jmp short loc_4323B
loc_4322B:
call JS_ToStringCheckObject
mov r14, rax
mov r15, rdx
mov ecx, 2Dh ; '-'
loc_4323B:
cmp r15d, 6
jz short loc_43264
mov rax, [rbx+40h]
mov edx, ecx
shl edx, 4
mov rsi, [rax+rdx]
mov rdx, [rax+rdx+8]
mov rdi, rbx
call JS_NewObjectProtoClass
mov r12, rdx
cmp r12d, 6
jnz short loc_432A5
loc_43264:
mov r12d, 6
cmp r15d, 0FFFFFFF7h
jb short loc_4328D
mov rdi, [rbx+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_4328D
mov rsi, r14
mov rdx, r15
call js_free_value_rt
loc_4328D:
xor r13d, r13d
loc_43290:
mov rax, r13
mov rdx, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_432A5:
mov r13, rax
mov esi, 18h
mov rdi, rbx
call js_malloc
test rax, rax
jz short loc_432D4
and ebp, 3
mov [rax], r14
mov [rax+8], r15
mov [rax+10h], ebp
mov dword ptr [rax+14h], 0
mov [r13+30h], rax
jmp short loc_43290
loc_432D4:
cmp r12d, 0FFFFFFF7h
jb short loc_43264
mov rdi, [rbx+18h]
mov eax, [r13+0]
lea ecx, [rax-1]
mov [r13+0], ecx
cmp eax, 1
jg loc_43264
mov rsi, r13
mov rdx, r12
call js_free_value_rt
jmp loc_43264
|
_QWORD * js_create_array_iterator(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // bp
long long v16; // r8
long long v17; // r9
_QWORD *v18; // r14
long long v19; // rdx
long long v20; // r15
unsigned int v21; // ecx
long long v22; // rdx
long long v23; // rax
long long v24; // rdx
long long v25; // r12
long long v26; // rdi
int v27; // eax
long long v28; // rcx
_QWORD *v29; // r13
_QWORD *v31; // rax
long long v32; // rdi
int v33; // eax
long long v34; // rcx
v14 = a6;
if ( (a6 & 4) != 0 )
{
v18 = (_QWORD *)JS_ToStringCheckObject(a1);
v20 = v22;
v21 = 45;
}
else
{
v18 = (_QWORD *)JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v20 = v19;
v21 = 44;
}
if ( (_DWORD)v20 != 6 )
{
v23 = JS_NewObjectProtoClass(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 16 * v21),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 16 * v21 + 8LL),
v21);
v25 = v24;
if ( (_DWORD)v24 != 6 )
{
v29 = (_QWORD *)v23;
v31 = (_QWORD *)js_malloc(a1, 24LL);
if ( v31 )
{
*v31 = v18;
v31[1] = v20;
v31[2] = v14 & 3;
v29[6] = v31;
return v29;
}
if ( (unsigned int)v25 >= 0xFFFFFFF7 )
{
v32 = *(_QWORD *)(a1 + 24);
v33 = *(_DWORD *)v29;
v34 = (unsigned int)(*(_DWORD *)v29 - 1);
*(_DWORD *)v29 = v34;
if ( v33 <= 1 )
js_free_value_rt(v32, v29, v25, v34, v16, v17);
}
}
}
if ( (unsigned int)v20 >= 0xFFFFFFF7 )
{
v26 = *(_QWORD *)(a1 + 24);
v27 = *(_DWORD *)v18;
v28 = (unsigned int)(*(_DWORD *)v18 - 1);
*(_DWORD *)v18 = v28;
if ( v27 <= 1 )
js_free_value_rt(v26, v18, v20, v28, v16, v17);
}
return 0LL;
}
|
js_create_array_iterator:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,R9D
MOV RBX,RDI
TEST BPL,0x4
JNZ 0x0014322b
CALL 0x001268d8
MOV R14,RAX
MOV R15,RDX
MOV ECX,0x2c
JMP 0x0014323b
LAB_0014322b:
CALL 0x0014350b
MOV R14,RAX
MOV R15,RDX
MOV ECX,0x2d
LAB_0014323b:
CMP R15D,0x6
JZ 0x00143264
MOV RAX,qword ptr [RBX + 0x40]
MOV EDX,ECX
SHL EDX,0x4
MOV RSI,qword ptr [RAX + RDX*0x1]
MOV RDX,qword ptr [RAX + RDX*0x1 + 0x8]
MOV RDI,RBX
CALL 0x00120a15
MOV R12,RDX
CMP R12D,0x6
JNZ 0x001432a5
LAB_00143264:
MOV R12D,0x6
CMP R15D,-0x9
JC 0x0014328d
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x0014328d
MOV RSI,R14
MOV RDX,R15
CALL 0x00120d90
LAB_0014328d:
XOR R13D,R13D
LAB_00143290:
MOV RAX,R13
MOV RDX,R12
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001432a5:
MOV R13,RAX
MOV ESI,0x18
MOV RDI,RBX
CALL 0x0010ed89
TEST RAX,RAX
JZ 0x001432d4
AND EBP,0x3
MOV qword ptr [RAX],R14
MOV qword ptr [RAX + 0x8],R15
MOV dword ptr [RAX + 0x10],EBP
MOV dword ptr [RAX + 0x14],0x0
MOV qword ptr [R13 + 0x30],RAX
JMP 0x00143290
LAB_001432d4:
CMP R12D,-0x9
JC 0x00143264
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [R13]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R13],ECX
CMP EAX,0x1
JG 0x00143264
MOV RSI,R13
MOV RDX,R12
CALL 0x00120d90
JMP 0x00143264
|
int1 [16] js_create_array_iterator(long param_1)
{
int8 uVar1;
int *piVar2;
int1 (*pauVar3) [16];
int iVar4;
uint in_R9D;
int *piVar5;
int1 auVar6 [16];
int1 auVar7 [16];
if ((in_R9D & 4) == 0) {
auVar6 = JS_ToObject();
iVar4 = 0x2c;
}
else {
auVar6 = JS_ToStringCheckObject();
iVar4 = 0x2d;
}
piVar5 = auVar6._0_8_;
if (auVar6._8_4_ != 6) {
auVar7 = JS_NewObjectProtoClass
(param_1,*(int8 *)
(*(long *)(param_1 + 0x40) + (ulong)(uint)(iVar4 << 4)),
*(int8 *)(*(long *)(param_1 + 0x40) + 8 + (ulong)(uint)(iVar4 << 4)));
piVar2 = auVar7._0_8_;
if (auVar7._8_4_ != 6) {
pauVar3 = (int1 (*) [16])js_malloc(param_1,0x18);
if (pauVar3 != (int1 (*) [16])0x0) {
*pauVar3 = auVar6;
*(uint *)pauVar3[1] = in_R9D & 3;
*(int4 *)(pauVar3[1] + 4) = 0;
*(int1 (**) [16])(piVar2 + 0xc) = pauVar3;
return auVar7;
}
if (0xfffffff6 < auVar7._8_4_) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar4 = *piVar2;
*piVar2 = iVar4 + -1;
if (iVar4 < 2) {
js_free_value_rt(uVar1,piVar2,auVar7._8_8_);
}
}
}
}
if (0xfffffff6 < auVar6._8_4_) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar4 = *piVar5;
*piVar5 = iVar4 + -1;
if (iVar4 < 2) {
js_free_value_rt(uVar1,piVar5,auVar6._8_8_);
}
}
return ZEXT816(6) << 0x40;
}
|
|
57,954
|
facebook::yoga::Style_computed_border_is_floored_Test::TestBody()
|
yoga-mod/tests/StyleTest.cpp
|
TEST(Style, computed_border_is_floored) {
yoga::Style style;
style.setBorder(Edge::All, StyleLength::points(-1.0f));
auto borderStart =
style.computeInlineStartBorder(FlexDirection::Row, Direction::LTR);
ASSERT_EQ(borderStart, 0.0f);
}
|
O0
|
cpp
|
facebook::yoga::Style_computed_border_is_floored_Test::TestBody():
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp # imm = 0x100
movq %rdi, -0x8(%rbp)
leaq -0x98(%rbp), %rdi
callq 0xb6830
movss 0x690cd9(%rip), %xmm0 # 0x746e0c
callq 0xb6c80
movq %rax, -0xe8(%rbp)
jmp 0xb6141
movq -0xe8(%rbp), %rax
movl %eax, %ecx
movl %ecx, -0xa0(%rbp)
shrq $0x20, %rax
movb %al, -0x9c(%rbp)
movq -0xa0(%rbp), %rdx
leaq -0x98(%rbp), %rdi
movl $0x8, %esi
callq 0xb6dd0
jmp 0xb6174
leaq -0x98(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0xb6e40
movss %xmm0, -0xec(%rbp)
jmp 0xb6194
movss -0xec(%rbp), %xmm0
movss %xmm0, -0xb0(%rbp)
movl $0x0, -0xc4(%rbp)
leaq 0x690d1b(%rip), %rsi # 0x746ed0
leaq 0x68fb8d(%rip), %rdx # 0x745d49
leaq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rcx
leaq -0xc4(%rbp), %r8
callq 0xa89d0
jmp 0xb61d8
leaq -0xc0(%rbp), %rdi
callq 0x91b40
movb %al, -0xed(%rbp)
jmp 0xb61ec
movb -0xed(%rbp), %al
testb $0x1, %al
jne 0xb61f8
jmp 0xb622b
jmp 0xb62ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0xb633a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0xb632e
leaq -0xd0(%rbp), %rdi
callq 0x6ffad0
jmp 0xb6239
leaq -0xc0(%rbp), %rdi
callq 0x91b60
movq %rax, -0xf8(%rbp)
jmp 0xb624e
movq -0xf8(%rbp), %r8
leaq 0x690c0e(%rip), %rdx # 0x746e6a
leaq -0xd8(%rbp), %rdi
movl $0x2, %esi
movl $0x1a, %ecx
callq 0x6fbe60
jmp 0xb6274
leaq -0xd8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x6f8a20
jmp 0xb6289
leaq -0xd8(%rbp), %rdi
callq 0x6fbee0
leaq -0xd0(%rbp), %rdi
callq 0x91b80
movl $0x1, -0xdc(%rbp)
jmp 0xb62f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0xb62df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x6fbee0
leaq -0xd0(%rbp), %rdi
callq 0x91b80
jmp 0xb632e
movl $0x0, -0xdc(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x91ba0
movl -0xdc(%rbp), %eax
testl %eax, %eax
jne 0xb6319
jmp 0xb630f
movl $0x0, -0xdc(%rbp)
leaq -0x98(%rbp), %rdi
callq 0xb6d70
addq $0x100, %rsp # imm = 0x100
popq %rbp
retq
leaq -0xc0(%rbp), %rdi
callq 0x91ba0
leaq -0x98(%rbp), %rdi
callq 0xb6d70
movq -0xa8(%rbp), %rdi
callq 0x35990
nopw %cs:(%rax,%rax)
|
_ZN8facebook4yoga37Style_computed_border_is_floored_Test8TestBodyEv:
push rbp
mov rbp, rsp
sub rsp, 100h
mov [rbp+var_8], rdi
lea rdi, [rbp+var_98]; this
call _ZN8facebook4yoga5StyleC2Ev; facebook::yoga::Style::Style(void)
movss xmm0, cs:flt_746E0C; float
call _ZN8facebook4yoga11StyleLength6pointsEf; facebook::yoga::StyleLength::points(float)
mov [rbp+var_E8], rax
jmp short $+2
loc_B6141:
mov rax, [rbp+var_E8]
mov ecx, eax
mov dword ptr [rbp+var_A0], ecx
shr rax, 20h
mov byte ptr [rbp+var_A0+4], al
mov rdx, [rbp+var_A0]
lea rdi, [rbp+var_98]
mov esi, 8
call _ZN8facebook4yoga5Style9setBorderENS0_4EdgeENS0_11StyleLengthE; facebook::yoga::Style::setBorder(facebook::yoga::Edge,facebook::yoga::StyleLength)
jmp short $+2
loc_B6174:
lea rdi, [rbp+var_98]
mov esi, 2
mov edx, 1
call _ZNK8facebook4yoga5Style24computeInlineStartBorderENS0_13FlexDirectionENS0_9DirectionE; facebook::yoga::Style::computeInlineStartBorder(facebook::yoga::FlexDirection,facebook::yoga::Direction)
movss [rbp+var_EC], xmm0
jmp short $+2
loc_B6194:
movss xmm0, [rbp+var_EC]
movss [rbp+var_B0], xmm0
mov [rbp+var_C4], 0
lea rsi, aBorderstart; "borderStart"
lea rdx, aZero00f_0+8; "0.0f"
lea rdi, [rbp+var_C0]
lea rcx, [rbp+var_B0]
lea r8, [rbp+var_C4]
call _ZN7testing8internal8EqHelper7CompareIffTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_
jmp short $+2
loc_B61D8:
lea rdi, [rbp+var_C0]
call _ZNK7testing15AssertionResultcvbEv; testing::AssertionResult::operator bool(void)
mov [rbp+var_ED], al
jmp short $+2
loc_B61EC:
mov al, [rbp+var_ED]
test al, 1
jnz short loc_B61F8
jmp short loc_B622B
loc_B61F8:
jmp loc_B62ED
mov rcx, rax
mov eax, edx
mov [rbp+var_A8], rcx
mov [rbp+var_AC], eax
jmp loc_B633A
mov rcx, rax
mov eax, edx
mov [rbp+var_A8], rcx
mov [rbp+var_AC], eax
jmp loc_B632E
loc_B622B:
lea rdi, [rbp+var_D0]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
jmp short $+2
loc_B6239:
lea rdi, [rbp+var_C0]; this
call _ZNK7testing15AssertionResult15failure_messageEv; testing::AssertionResult::failure_message(void)
mov [rbp+var_F8], rax
jmp short $+2
loc_B624E:
mov r8, [rbp+var_F8]
lea rdx, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/yoga-m"...
lea rdi, [rbp+var_D8]
mov esi, 2
mov ecx, 1Ah
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
jmp short $+2
loc_B6274:
lea rdi, [rbp+var_D8]
lea rsi, [rbp+var_D0]
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
jmp short $+2
loc_B6289:
lea rdi, [rbp+var_D8]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
lea rdi, [rbp+var_D0]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
mov [rbp+var_DC], 1
jmp short loc_B62F7
mov rcx, rax
mov eax, edx
mov [rbp+var_A8], rcx
mov [rbp+var_AC], eax
jmp short loc_B62DF
mov rcx, rax
mov eax, edx
mov [rbp+var_A8], rcx
mov [rbp+var_AC], eax
lea rdi, [rbp+var_D8]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
loc_B62DF:
lea rdi, [rbp+var_D0]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
jmp short loc_B632E
loc_B62ED:
mov [rbp+var_DC], 0
loc_B62F7:
lea rdi, [rbp+var_C0]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
mov eax, [rbp+var_DC]
test eax, eax
jnz short loc_B6319
jmp short $+2
loc_B630F:
mov [rbp+var_DC], 0
loc_B6319:
lea rdi, [rbp+var_98]; this
call _ZN8facebook4yoga5StyleD2Ev; facebook::yoga::Style::~Style()
add rsp, 100h
pop rbp
retn
loc_B632E:
lea rdi, [rbp+var_C0]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
loc_B633A:
lea rdi, [rbp+var_98]; this
call _ZN8facebook4yoga5StyleD2Ev; facebook::yoga::Style::~Style()
mov rdi, [rbp+var_A8]
call __Unwind_Resume
|
void facebook::yoga::Style_computed_border_is_floored_Test::TestBody(
facebook::yoga::Style_computed_border_is_floored_Test *this)
{
long long v1; // [rsp+8h] [rbp-F8h]
long long v2; // [rsp+18h] [rbp-E8h]
_BYTE v3[8]; // [rsp+28h] [rbp-D8h] BYREF
_BYTE v4[12]; // [rsp+30h] [rbp-D0h] BYREF
int v5; // [rsp+3Ch] [rbp-C4h] BYREF
_BYTE v6[16]; // [rsp+40h] [rbp-C0h] BYREF
float started; // [rsp+50h] [rbp-B0h] BYREF
long long v8; // [rsp+60h] [rbp-A0h]
_BYTE v9[144]; // [rsp+68h] [rbp-98h] BYREF
facebook::yoga::Style_computed_border_is_floored_Test *v10; // [rsp+F8h] [rbp-8h]
v10 = this;
facebook::yoga::Style::Style((facebook::yoga::Style *)v9);
v2 = facebook::yoga::StyleLength::points((facebook::yoga::StyleLength *)v9, -1.0);
LODWORD(v8) = v2;
BYTE4(v8) = BYTE4(v2);
facebook::yoga::Style::setBorder(v9, 8LL, v8);
started = facebook::yoga::Style::computeInlineStartBorder(v9, 2LL, 1LL);
v5 = 0;
ZN7testing8internal8EqHelper7CompareIffTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_(
(long long)v6,
(long long)"borderStart",
(long long)"0.0f",
(long long)&started,
(long long)&v5);
if ( (testing::AssertionResult::operator bool(v6) & 1) == 0 )
{
testing::Message::Message((testing::Message *)v4);
v1 = testing::AssertionResult::failure_message((testing::AssertionResult *)v6);
testing::internal::AssertHelper::AssertHelper(
v3,
2LL,
"/workspace/llm4binary/github2025/yoga-mod/tests/StyleTest.cpp",
26LL,
v1);
testing::internal::AssertHelper::operator=(v3, v4);
testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)v3);
testing::Message::~Message((testing::Message *)v4);
}
testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v6);
facebook::yoga::Style::~Style((facebook::yoga::Style *)v9);
}
|
TestBody:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x100
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[RBP + -0x98]
CALL 0x001b6830
LAB_001b612b:
MOVSS XMM0,dword ptr [0x00846e0c]
CALL 0x001b6c80
MOV qword ptr [RBP + -0xe8],RAX
JMP 0x001b6141
LAB_001b6141:
MOV RAX,qword ptr [RBP + -0xe8]
MOV ECX,EAX
MOV dword ptr [RBP + -0xa0],ECX
SHR RAX,0x20
MOV byte ptr [RBP + -0x9c],AL
MOV RDX,qword ptr [RBP + -0xa0]
LEA RDI,[RBP + -0x98]
MOV ESI,0x8
CALL 0x001b6dd0
JMP 0x001b6174
LAB_001b6174:
LEA RDI,[RBP + -0x98]
MOV ESI,0x2
MOV EDX,0x1
CALL 0x001b6e40
MOVSS dword ptr [RBP + -0xec],XMM0
JMP 0x001b6194
LAB_001b6194:
MOVSS XMM0,dword ptr [RBP + -0xec]
MOVSS dword ptr [RBP + -0xb0],XMM0
MOV dword ptr [RBP + -0xc4],0x0
LEA RSI,[0x846ed0]
LEA RDX,[0x845d49]
LEA RDI,[RBP + -0xc0]
LEA RCX,[RBP + -0xb0]
LEA R8,[RBP + -0xc4]
CALL 0x001a89d0
JMP 0x001b61d8
LAB_001b61d8:
LEA RDI,[RBP + -0xc0]
CALL 0x00191b40
MOV byte ptr [RBP + -0xed],AL
JMP 0x001b61ec
LAB_001b61ec:
MOV AL,byte ptr [RBP + -0xed]
TEST AL,0x1
JNZ 0x001b61f8
JMP 0x001b622b
LAB_001b61f8:
JMP 0x001b62ed
LAB_001b622b:
LEA RDI,[RBP + -0xd0]
CALL 0x007ffad0
JMP 0x001b6239
LAB_001b6239:
LEA RDI,[RBP + -0xc0]
CALL 0x00191b60
MOV qword ptr [RBP + -0xf8],RAX
JMP 0x001b624e
LAB_001b624e:
MOV R8,qword ptr [RBP + -0xf8]
LEA RDX,[0x846e6a]
LEA RDI,[RBP + -0xd8]
MOV ESI,0x2
MOV ECX,0x1a
CALL 0x007fbe60
JMP 0x001b6274
LAB_001b6274:
LEA RDI,[RBP + -0xd8]
LEA RSI,[RBP + -0xd0]
CALL 0x007f8a20
LAB_001b6287:
JMP 0x001b6289
LAB_001b6289:
LEA RDI,[RBP + -0xd8]
CALL 0x007fbee0
LEA RDI,[RBP + -0xd0]
CALL 0x00191b80
MOV dword ptr [RBP + -0xdc],0x1
JMP 0x001b62f7
LAB_001b62ed:
MOV dword ptr [RBP + -0xdc],0x0
LAB_001b62f7:
LEA RDI,[RBP + -0xc0]
CALL 0x00191ba0
MOV EAX,dword ptr [RBP + -0xdc]
TEST EAX,EAX
JNZ 0x001b6319
JMP 0x001b630f
LAB_001b630f:
MOV dword ptr [RBP + -0xdc],0x0
LAB_001b6319:
LEA RDI,[RBP + -0x98]
CALL 0x001b6d70
ADD RSP,0x100
POP RBP
RET
|
/* facebook::yoga::Style_computed_border_is_floored_Test::TestBody() */
void __thiscall
facebook::yoga::Style_computed_border_is_floored_Test::TestBody
(Style_computed_border_is_floored_Test *this)
{
bool bVar1;
int8 uVar2;
AssertHelper local_e0 [8];
Message local_d8 [12];
int4 local_cc;
AssertionResult local_c8 [16];
int4 local_b8 [4];
int4 local_a8;
int4 uStack_a4;
Style local_a0 [144];
Style_computed_border_is_floored_Test *local_10;
local_10 = this;
Style::Style(local_a0);
/* try { // try from 001b612b to 001b61d5 has its CatchHandler @ 001b61fd */
uVar2 = StyleLength::points(DAT_00846e0c);
local_a8 = (int4)uVar2;
uStack_a4 = CONCAT31(uStack_a4._1_3_,(char)((ulong)uVar2 >> 0x20));
Style::setBorder(local_a0,8,CONCAT44(uStack_a4,local_a8));
local_b8[0] = Style::computeInlineStartBorder(local_a0,2,1);
local_cc = 0;
_ZN7testing8internal8EqHelper7CompareIffTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_
(local_c8,"borderStart","0.0f",local_b8,&local_cc);
/* try { // try from 001b61d8 to 001b6236 has its CatchHandler @ 001b6214 */
bVar1 = testing::AssertionResult::operator_cast_to_bool(local_c8);
if (!bVar1) {
testing::Message::Message(local_d8);
/* try { // try from 001b6239 to 001b6271 has its CatchHandler @ 001b62ad */
uVar2 = testing::AssertionResult::failure_message(local_c8);
testing::internal::AssertHelper::AssertHelper
(local_e0,2,"/workspace/llm4binary/github2025/yoga-mod/tests/StyleTest.cpp",0x1a,uVar2
);
/* try { // try from 001b6274 to 001b6286 has its CatchHandler @ 001b62c1 */
testing::internal::AssertHelper::operator=(local_e0,local_d8);
testing::internal::AssertHelper::~AssertHelper(local_e0);
testing::Message::~Message(local_d8);
}
testing::AssertionResult::~AssertionResult(local_c8);
Style::~Style(local_a0);
return;
}
|
|
57,955
|
mysqld_stmt_prepare(THD*, char const*, unsigned int)
|
eloqsql/sql/sql_prepare.cc
|
void mysqld_stmt_prepare(THD *thd, const char *packet, uint packet_length)
{
Protocol *save_protocol= thd->protocol;
Prepared_statement *stmt;
DBUG_ENTER("mysqld_stmt_prepare");
DBUG_PRINT("prep_query", ("%s", packet));
/* First of all clear possible warnings from the previous command */
thd->reset_for_next_command();
if (! (stmt= new Prepared_statement(thd)))
goto end; /* out of memory: error is set in Sql_alloc */
if (thd->stmt_map.insert(thd, stmt))
{
/*
The error is set in the insert. The statement itself
will be also deleted there (this is how the hash works).
*/
goto end;
}
thd->protocol= &thd->protocol_binary;
/* Create PS table entry, set query text after rewrite. */
stmt->m_prepared_stmt= MYSQL_CREATE_PS(stmt, stmt->id,
thd->m_statement_psi,
stmt->name.str, stmt->name.length);
if (stmt->prepare(packet, packet_length))
{
/*
Prepare failed and stmt will be freed.
Now we have to save the query_string in the so the
audit plugin later gets the meaningful notification.
*/
if (alloc_query(thd, stmt->query_string.str(), stmt->query_string.length()))
{
thd->set_query(0, 0);
}
/* Statement map deletes statement on erase */
thd->stmt_map.erase(stmt);
thd->clear_last_stmt();
}
else
thd->set_last_stmt(stmt);
thd->protocol= save_protocol;
sp_cache_enforce_limit(thd->sp_proc_cache, stored_program_cache_size);
sp_cache_enforce_limit(thd->sp_func_cache, stored_program_cache_size);
sp_cache_enforce_limit(thd->sp_package_spec_cache, stored_program_cache_size);
sp_cache_enforce_limit(thd->sp_package_body_cache, stored_program_cache_size);
/* check_prepared_statemnt sends the metadata packet in case of success */
end:
DBUG_VOID_RETURN;
}
|
O0
|
cpp
|
mysqld_stmt_prepare(THD*, char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x590(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xa15724
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x9e1950
movl $0x3b8, %edi # imm = 0x3B8
callq 0x825230
movq %rax, %rcx
movq %rcx, -0x58(%rbp)
movb $0x0, -0x31(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x50(%rbp)
je 0xa15774
movq -0x58(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movb $0x1, -0x31(%rbp)
movq -0x8(%rbp), %rsi
callq 0xa19030
jmp 0xa1576a
movq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0xa15774
movq -0x50(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0xa157ae
jmp 0xa15927
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x31(%rbp)
jne 0xa1579b
jmp 0xa157a9
movq -0x30(%rbp), %rdi
movl $0x3b8, %esi # imm = 0x3B8
callq 0x8252b0
jmp 0xa15931
movq -0x8(%rbp), %rdi
addq $0x1d80, %rdi # imm = 0x1D80
movq -0x8(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x971670
cmpl $0x0, %eax
je 0xa157d0
jmp 0xa15927
movq -0x8(%rbp), %rcx
addq $0x740, %rcx # imm = 0x740
movq -0x8(%rbp), %rax
movq %rcx, 0x590(%rax)
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movl %eax, %esi
movq -0x8(%rbp), %rax
movq 0x3b90(%rax), %rdx
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x28(%rbp), %rax
movq 0x50(%rax), %r8
callq 0xa15940
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0xc8(%rax)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0xa159a0
testb $0x1, %al
jne 0xa15838
jmp 0xa158a3
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rdi
addq $0x60, %rdi
callq 0x857750
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rdi
addq $0x60, %rdi
callq 0x857130
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq %rax, %rdx
callq 0x9e1f50
testb $0x1, %al
jne 0xa15874
jmp 0xa15884
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x8614c0
movq -0x8(%rbp), %rdi
addq $0x1d80, %rdi # imm = 0x1D80
movq -0x28(%rbp), %rsi
callq 0x9717e0
movq -0x8(%rbp), %rdi
callq 0xa21a10
jmp 0xa158b0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xa21a30
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x590(%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rdi
leaq 0x1332637(%rip), %rax # 0x1d47f08
movq (%rax), %rsi
callq 0x8ffe10
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rdi
leaq 0x133261d(%rip), %rax # 0x1d47f08
movq (%rax), %rsi
callq 0x8ffe10
movq -0x8(%rbp), %rax
movq 0x140(%rax), %rdi
leaq 0x1332603(%rip), %rax # 0x1d47f08
movq (%rax), %rsi
callq 0x8ffe10
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x13325e9(%rip), %rax # 0x1d47f08
movq (%rax), %rsi
callq 0x8ffe10
jmp 0xa15929
jmp 0xa1592b
addq $0x70, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x775a20
nopw (%rax,%rax)
|
_Z19mysqld_stmt_prepareP3THDPKcj:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_8]
mov rax, [rax+590h]
mov [rbp+var_20], rax
jmp short $+2
loc_A15724:
mov rdi, [rbp+var_8]; this
mov esi, 1; unsigned __int64
call _ZN3THD22reset_for_next_commandEb; THD::reset_for_next_command(bool)
mov edi, offset elf_gnu_hash_bitmask_nwords; this
call _ZN5ilinknwEm; ilink::operator new(ulong)
mov rcx, rax
mov [rbp+var_58], rcx
mov [rbp+var_31], 0
xor eax, eax
cmp rcx, 0
mov [rbp+var_50], rax
jz short loc_A15774
mov rdi, [rbp+var_58]; this
mov [rbp+var_30], rdi
mov [rbp+var_31], 1
mov rsi, [rbp+var_8]; THD *
call _ZN18Prepared_statementC2EP3THD; Prepared_statement::Prepared_statement(THD *)
jmp short $+2
loc_A1576A:
mov rax, [rbp+var_58]
mov [rbp+var_50], rax
jmp short $+2
loc_A15774:
mov rax, [rbp+var_50]
mov [rbp+var_28], rax
cmp rax, 0
jnz short loc_A157AE
jmp loc_A15927
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
test [rbp+var_31], 1
jnz short loc_A1579B
jmp short loc_A157A9
loc_A1579B:
mov rdi, [rbp+var_30]; void *
mov esi, 3B8h; unsigned __int64
call _ZN5ilinkdlEPvm; ilink::operator delete(void *,ulong)
loc_A157A9:
jmp loc_A15931
loc_A157AE:
mov rdi, [rbp+var_8]
add rdi, 1D80h; this
mov rsi, [rbp+var_8]; THD *
mov rdx, [rbp+var_28]; Statement *
call _ZN13Statement_map6insertEP3THDP9Statement; Statement_map::insert(THD *,Statement *)
cmp eax, 0
jz short loc_A157D0
jmp loc_A15927
loc_A157D0:
mov rcx, [rbp+var_8]
add rcx, 740h
mov rax, [rbp+var_8]
mov [rax+590h], rcx
mov rdi, [rbp+var_28]
mov rax, [rbp+var_28]
mov rax, [rax+38h]
mov esi, eax
mov rax, [rbp+var_8]
mov rdx, [rax+3B90h]
mov rax, [rbp+var_28]
mov rcx, [rax+48h]
mov rax, [rbp+var_28]
mov r8, [rax+50h]
call _ZL33inline_mysql_create_prepared_stmtPvjP20PSI_statement_lockerPKcm; inline_mysql_create_prepared_stmt(void *,uint,PSI_statement_locker *,char const*,ulong)
mov rcx, rax
mov rax, [rbp+var_28]
mov [rax+0C8h], rcx
mov rdi, [rbp+var_28]; this
mov rsi, [rbp+var_10]; char *
mov edx, [rbp+var_14]; unsigned int
call _ZN18Prepared_statement7prepareEPKcj; Prepared_statement::prepare(char const*,uint)
test al, 1
jnz short loc_A15838
jmp short loc_A158A3
loc_A15838:
mov rax, [rbp+var_8]
mov [rbp+var_68], rax
mov rdi, [rbp+var_28]
add rdi, 60h ; '`'; this
call _ZNK11CSET_STRING3strEv; CSET_STRING::str(void)
mov [rbp+var_60], rax
mov rdi, [rbp+var_28]
add rdi, 60h ; '`'; this
call _ZNK11CSET_STRING6lengthEv; CSET_STRING::length(void)
mov rdi, [rbp+var_68]; THD *
mov rsi, [rbp+var_60]; char *
mov rdx, rax; unsigned __int64
call _Z11alloc_queryP3THDPKcm; alloc_query(THD *,char const*,ulong)
test al, 1
jnz short loc_A15874
jmp short loc_A15884
loc_A15874:
mov rdi, [rbp+var_8]; this
xor eax, eax
mov edx, eax; unsigned __int64
mov rsi, rdx; char *
call _ZN3THD9set_queryEPcm; THD::set_query(char *,ulong)
loc_A15884:
mov rdi, [rbp+var_8]
add rdi, 1D80h; this
mov rsi, [rbp+var_28]; Statement *
call _ZN13Statement_map5eraseEP9Statement; Statement_map::erase(Statement *)
mov rdi, [rbp+var_8]; this
call _ZN3THD15clear_last_stmtEv; THD::clear_last_stmt(void)
jmp short loc_A158B0
loc_A158A3:
mov rdi, [rbp+var_8]; this
mov rsi, [rbp+var_28]; Statement *
call _ZN3THD13set_last_stmtEP9Statement; THD::set_last_stmt(Statement *)
loc_A158B0:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_8]
mov [rax+590h], rcx
mov rax, [rbp+var_8]
mov rdi, [rax+130h]; sp_cache *
lea rax, stored_program_cache_size
mov rsi, [rax]; unsigned __int64
call _Z22sp_cache_enforce_limitP8sp_cachem; sp_cache_enforce_limit(sp_cache *,ulong)
mov rax, [rbp+var_8]
mov rdi, [rax+138h]; sp_cache *
lea rax, stored_program_cache_size
mov rsi, [rax]; unsigned __int64
call _Z22sp_cache_enforce_limitP8sp_cachem; sp_cache_enforce_limit(sp_cache *,ulong)
mov rax, [rbp+var_8]
mov rdi, [rax+140h]; sp_cache *
lea rax, stored_program_cache_size
mov rsi, [rax]; unsigned __int64
call _Z22sp_cache_enforce_limitP8sp_cachem; sp_cache_enforce_limit(sp_cache *,ulong)
mov rax, [rbp+var_8]
mov rdi, [rax+148h]; sp_cache *
lea rax, stored_program_cache_size
mov rsi, [rax]; unsigned __int64
call _Z22sp_cache_enforce_limitP8sp_cachem; sp_cache_enforce_limit(sp_cache *,ulong)
loc_A15927:
jmp short $+2
loc_A15929:
jmp short $+2
loc_A1592B:
add rsp, 70h
pop rbp
retn
loc_A15931:
mov rdi, [rbp+var_40]
call __Unwind_Resume
|
Prepared_statement * mysqld_stmt_prepare(THD *a1, const char *a2, unsigned int a3)
{
Prepared_statement *result; // rax
unsigned long long v4; // rax
char *v5; // [rsp+10h] [rbp-60h]
Prepared_statement *v6; // [rsp+18h] [rbp-58h]
Prepared_statement *v7; // [rsp+20h] [rbp-50h]
long long v8; // [rsp+50h] [rbp-20h]
v8 = *((_QWORD *)a1 + 178);
THD::reset_for_next_command(a1, 1);
v6 = (Prepared_statement *)ilink::operator new((ilink *)&elf_gnu_hash_bitmask_nwords);
v7 = 0LL;
if ( v6 )
{
Prepared_statement::Prepared_statement(v6, a1);
v7 = v6;
}
result = v7;
if ( v7 )
{
result = (Prepared_statement *)Statement_map::insert((THD *)((char *)a1 + 7552), a1, v7);
if ( !(_DWORD)result )
{
*((_QWORD *)a1 + 178) = (char *)a1 + 1856;
*((_QWORD *)v7 + 25) = inline_mysql_create_prepared_stmt(
v7,
(unsigned int)*((_QWORD *)v7 + 7),
*((_QWORD *)a1 + 1906),
*((_QWORD *)v7 + 9),
*((_QWORD *)v7 + 10));
if ( (Prepared_statement::prepare(v7, a2, a3) & 1) != 0 )
{
v5 = (char *)CSET_STRING::str((Prepared_statement *)((char *)v7 + 96));
v4 = CSET_STRING::length((Prepared_statement *)((char *)v7 + 96));
if ( (alloc_query(a1, v5, v4) & 1) != 0 )
THD::set_query(a1, 0LL, 0LL);
Statement_map::erase((THD *)((char *)a1 + 7552), v7);
THD::clear_last_stmt(a1);
}
else
{
THD::set_last_stmt(a1, v7);
}
*((_QWORD *)a1 + 178) = v8;
sp_cache_enforce_limit(*((sp_cache **)a1 + 38), stored_program_cache_size);
sp_cache_enforce_limit(*((sp_cache **)a1 + 39), stored_program_cache_size);
sp_cache_enforce_limit(*((sp_cache **)a1 + 40), stored_program_cache_size);
return (Prepared_statement *)sp_cache_enforce_limit(*((sp_cache **)a1 + 41), stored_program_cache_size);
}
}
return result;
}
|
sp_handler:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RDI,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RDI],EAX
ADD RDI,0x8
CALL 0x00a15b20
ADD RSP,0x10
POP RBP
RET
|
/* sp_handler::sp_handler(sp_handler::enum_type) */
void __thiscall sp_handler::sp_handler(sp_handler *this,int4 param_2)
{
*(int4 *)this = param_2;
List<sp_condition_value>::List((List<sp_condition_value> *)(this + 8));
return;
}
|
|
57,956
|
calc_hashnr_caseup
|
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
|
static uint calc_hashnr_caseup(const uchar *key,uint length)
{
register uint nr=1, nr2=4;
while (length--)
{
nr^= (((nr & 63)+nr2)*((uint) (uchar) toupper(*key++)))+ (nr << 8);
nr2+=3;
}
return((uint) nr);
}
|
O0
|
c
|
calc_hashnr_caseup:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x4, -0x14(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0x44aa4
movl -0x10(%rbp), %eax
andl $0x3f, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movzbl (%rax), %edi
callq 0x137b0
movl %eax, %ecx
movl -0x18(%rbp), %eax
movzbl %cl, %ecx
imull %ecx, %eax
movl -0x10(%rbp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
xorl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x14(%rbp)
jmp 0x44a4d
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
calc_hashnr_caseup:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], 1
mov [rbp+var_14], 4
loc_44A4D:
mov eax, [rbp+var_C]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_C], ecx
cmp eax, 0
jz short loc_44AA4
mov eax, [rbp+var_10]
and eax, 3Fh
add eax, [rbp+var_14]
mov [rbp+var_18], eax
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
movzx edi, byte ptr [rax]
call _toupper
mov ecx, eax
mov eax, [rbp+var_18]
movzx ecx, cl
imul eax, ecx
mov ecx, [rbp+var_10]
shl ecx, 8
add eax, ecx
xor eax, [rbp+var_10]
mov [rbp+var_10], eax
mov eax, [rbp+var_14]
add eax, 3
mov [rbp+var_14], eax
jmp short loc_44A4D
loc_44AA4:
mov eax, [rbp+var_10]
add rsp, 20h
pop rbp
retn
|
long long calc_hashnr_caseup(unsigned __int8 *a1, int a2)
{
unsigned __int8 *v3; // rax
int i; // [rsp+Ch] [rbp-14h]
unsigned int v6; // [rsp+10h] [rbp-10h]
v6 = 1;
for ( i = 4; a2--; i += 3 )
{
v3 = a1++;
v6 ^= (v6 << 8) + (unsigned __int8)toupper(*v3) * (i + (v6 & 0x3F));
}
return v6;
}
|
calc_hashnr_caseup:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],0x1
MOV dword ptr [RBP + -0x14],0x4
LAB_00144a4d:
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0xc],ECX
CMP EAX,0x0
JZ 0x00144aa4
MOV EAX,dword ptr [RBP + -0x10]
AND EAX,0x3f
ADD EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOVZX EDI,byte ptr [RAX]
CALL 0x001137b0
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x18]
MOVZX ECX,CL
IMUL EAX,ECX
MOV ECX,dword ptr [RBP + -0x10]
SHL ECX,0x8
ADD EAX,ECX
XOR EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x10],EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x3
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00144a4d
LAB_00144aa4:
MOV EAX,dword ptr [RBP + -0x10]
ADD RSP,0x20
POP RBP
RET
|
uint calc_hashnr_caseup(byte *param_1,int param_2)
{
uint uVar1;
int local_1c;
uint local_18;
int local_14;
byte *local_10;
local_18 = 1;
local_1c = 4;
local_14 = param_2;
local_10 = param_1;
while (local_14 != 0) {
uVar1 = toupper((uint)*local_10);
local_18 = ((local_18 & 0x3f) + local_1c) * (uVar1 & 0xff) + local_18 * 0x100 ^ local_18;
local_1c = local_1c + 3;
local_14 = local_14 + -1;
local_10 = local_10 + 1;
}
return local_18;
}
|
|
57,957
|
OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/ptexIndices.cpp
|
void
PtexIndices::initializePtexIndices(TopologyRefiner const &refiner) {
int regFaceSize = Sdc::SchemeTypeTraits::GetRegularFaceSize(
refiner.GetSchemeType());
Vtr::internal::Level const & coarseLevel = refiner.getLevel(0);
int nfaces = coarseLevel.getNumFaces();
_ptexIndices.resize(nfaces+1);
int ptexID=0;
for (int i = 0; i < nfaces; ++i) {
_ptexIndices[i] = ptexID;
Vtr::ConstIndexArray fverts = coarseLevel.getFaceVertices(i);
ptexID += fverts.size()==regFaceSize ? 1 : fverts.size();
}
// last entry contains the number of ptex texture faces
_ptexIndices[nfaces]=ptexID;
}
|
O0
|
cpp
|
OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd0110
movl %eax, %edi
callq 0xc8880
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xd66c0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xc3430
movq -0x58(%rbp), %rdi
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xc9aa0
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x1532ff
movq -0x58(%rbp), %rdi
movl -0x28(%rbp), %eax
movl %eax, -0x5c(%rbp)
movslq -0x2c(%rbp), %rsi
callq 0xc7140
movl -0x5c(%rbp), %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0xce580
movl %edx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x38(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xcc250
cmpl -0x14(%rbp), %eax
jne 0x1532df
movl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x1532eb
leaq -0x40(%rbp), %rdi
callq 0xcc250
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x153286
movq -0x58(%rbp), %rdi
movl -0x28(%rbp), %eax
movl %eax, -0x64(%rbp)
movslq -0x24(%rbp), %rsi
callq 0xc7140
movl -0x64(%rbp), %ecx
movl %ecx, (%rax)
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN10OpenSubdiv6v3_6_03Far11PtexIndices21initializePtexIndicesERKNS1_15TopologyRefinerE:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_58], rax
mov rdi, [rbp+var_10]; this
call __ZNK10OpenSubdiv6v3_6_03Far15TopologyRefiner13GetSchemeTypeEv; OpenSubdiv::v3_6_0::Far::TopologyRefiner::GetSchemeType(void)
mov edi, eax
call __ZN10OpenSubdiv6v3_6_03Sdc16SchemeTypeTraits18GetRegularFaceSizeENS1_10SchemeTypeE; OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(OpenSubdiv::v3_6_0::Sdc::SchemeType)
mov [rbp+var_14], eax
mov rdi, [rbp+var_10]; this
xor esi, esi; int
call __ZNK10OpenSubdiv6v3_6_03Far15TopologyRefiner8getLevelEi; OpenSubdiv::v3_6_0::Far::TopologyRefiner::getLevel(int)
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level11getNumFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFaces(void)
mov rdi, [rbp+var_58]
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
add eax, 1
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov [rbp+var_28], 0
mov [rbp+var_2C], 0
loc_153286:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_24]
jge short loc_1532FF
mov rdi, [rbp+var_58]
mov eax, [rbp+var_28]
mov [rbp+var_5C], eax
movsxd rsi, [rbp+var_2C]
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_5C]
mov [rax], ecx
mov rdi, [rbp+var_20]; this
mov esi, [rbp+var_2C]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int)
mov [rbp+var_48], edx
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov [rbp+var_40], rax
mov eax, [rbp+var_48]
mov [rbp+var_38], eax
lea rdi, [rbp+var_40]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void)
cmp eax, [rbp+var_14]
jnz short loc_1532DF
mov eax, 1
mov [rbp+var_60], eax
jmp short loc_1532EB
loc_1532DF:
lea rdi, [rbp+var_40]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void)
mov [rbp+var_60], eax
loc_1532EB:
mov eax, [rbp+var_60]
add eax, [rbp+var_28]
mov [rbp+var_28], eax
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp short loc_153286
loc_1532FF:
mov rdi, [rbp+var_58]
mov eax, [rbp+var_28]
mov [rbp+var_64], eax
movsxd rsi, [rbp+var_24]
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_64]
mov [rax], ecx
add rsp, 70h
pop rbp
retn
|
_DWORD * OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(
OpenSubdiv::v3_6_0::Far::PtexIndices *this,
const OpenSubdiv::v3_6_0::Far::TopologyRefiner *a2)
{
unsigned int SchemeType; // eax
int v3; // edx
int v4; // eax
_DWORD *result; // rax
int v6; // [rsp+Ch] [rbp-64h]
int v7; // [rsp+10h] [rbp-60h]
int v8; // [rsp+14h] [rbp-5Ch]
long long FaceVertices; // [rsp+30h] [rbp-40h] BYREF
int v10; // [rsp+38h] [rbp-38h]
int i; // [rsp+44h] [rbp-2Ch]
int v12; // [rsp+48h] [rbp-28h]
int NumFaces; // [rsp+4Ch] [rbp-24h]
OpenSubdiv::v3_6_0::Vtr::internal::Level *Level; // [rsp+50h] [rbp-20h]
int RegularFaceSize; // [rsp+5Ch] [rbp-14h]
OpenSubdiv::v3_6_0::Far::TopologyRefiner *v16; // [rsp+60h] [rbp-10h]
OpenSubdiv::v3_6_0::Far::PtexIndices *v17; // [rsp+68h] [rbp-8h]
v17 = this;
v16 = a2;
SchemeType = OpenSubdiv::v3_6_0::Far::TopologyRefiner::GetSchemeType(a2);
RegularFaceSize = OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(SchemeType);
Level = (OpenSubdiv::v3_6_0::Vtr::internal::Level *)OpenSubdiv::v3_6_0::Far::TopologyRefiner::getLevel(a2, 0);
NumFaces = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFaces(Level);
std::vector<int>::resize(this, NumFaces + 1);
v12 = 0;
for ( i = 0; i < NumFaces; ++i )
{
v8 = v12;
*(_DWORD *)std::vector<int>::operator[](this, i) = v8;
FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(Level, i);
v10 = v3;
v4 = OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&FaceVertices);
if ( v4 == RegularFaceSize )
v7 = 1;
else
v7 = OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&FaceVertices);
v12 += v7;
}
v6 = v12;
result = (_DWORD *)std::vector<int>::operator[](this, NumFaces);
*result = v6;
return result;
}
| |||
57,958
|
OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/ptexIndices.cpp
|
void
PtexIndices::initializePtexIndices(TopologyRefiner const &refiner) {
int regFaceSize = Sdc::SchemeTypeTraits::GetRegularFaceSize(
refiner.GetSchemeType());
Vtr::internal::Level const & coarseLevel = refiner.getLevel(0);
int nfaces = coarseLevel.getNumFaces();
_ptexIndices.resize(nfaces+1);
int ptexID=0;
for (int i = 0; i < nfaces; ++i) {
_ptexIndices[i] = ptexID;
Vtr::ConstIndexArray fverts = coarseLevel.getFaceVertices(i);
ptexID += fverts.size()==regFaceSize ? 1 : fverts.size();
}
// last entry contains the number of ptex texture faces
_ptexIndices[nfaces]=ptexID;
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %edi
callq 0x39360
movl %eax, %ebp
movq 0x30(%r14), %rax
movq (%rax), %r15
movslq (%r15), %r14
leaq 0x1(%r14), %rsi
movq %rbx, %rdi
callq 0x39690
testq %r14, %r14
jle 0x70718
movq (%rbx), %rax
movq 0x18(%r15), %rcx
xorl %edx, %edx
movl $0x1, %esi
xorl %r8d, %r8d
movl %r8d, (%rax,%rdx,4)
movl (%rcx,%rdx,8), %edi
cmpl %ebp, %edi
cmovel %esi, %edi
addl %r8d, %edi
incq %rdx
movl %edi, %r8d
cmpq %rdx, %r14
jne 0x706fc
jmp 0x7071a
xorl %edi, %edi
movq (%rbx), %rax
movl %edi, (%rax,%r14,4)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
_ZN10OpenSubdiv6v3_6_03Far11PtexIndices21initializePtexIndicesERKNS1_15TopologyRefinerE:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov edi, [rsi]
call __ZN10OpenSubdiv6v3_6_03Sdc16SchemeTypeTraits18GetRegularFaceSizeENS1_10SchemeTypeE; OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(OpenSubdiv::v3_6_0::Sdc::SchemeType)
mov ebp, eax
mov rax, [r14+30h]
mov r15, [rax]
movsxd r14, dword ptr [r15]
lea rsi, [r14+1]
mov rdi, rbx
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
test r14, r14
jle short loc_70718
mov rax, [rbx]
mov rcx, [r15+18h]
xor edx, edx
mov esi, 1
xor r8d, r8d
loc_706FC:
mov [rax+rdx*4], r8d
mov edi, [rcx+rdx*8]
cmp edi, ebp
cmovz edi, esi
add edi, r8d
inc rdx
mov r8d, edi
cmp r14, rdx
jnz short loc_706FC
jmp short loc_7071A
loc_70718:
xor edi, edi
loc_7071A:
mov rax, [rbx]
mov [rax+r14*4], edi
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(
OpenSubdiv::v3_6_0::Far::PtexIndices *this,
const OpenSubdiv::v3_6_0::Far::TopologyRefiner *a2)
{
int RegularFaceSize; // ebp
int **v4; // rax
long long v5; // r15
long long v6; // r14
long long v7; // rax
long long v8; // rcx
long long v9; // rdx
int v10; // r8d
int v11; // edi
int v12; // edi
long long result; // rax
RegularFaceSize = OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(*(_DWORD *)a2);
v4 = (int **)*((_QWORD *)a2 + 6);
v5 = (long long)*v4;
v6 = **v4;
std::vector<int>::resize(this, v6 + 1);
if ( v6 <= 0 )
{
v12 = 0;
}
else
{
v7 = *(_QWORD *)this;
v8 = *(_QWORD *)(v5 + 24);
v9 = 0LL;
v10 = 0;
do
{
*(_DWORD *)(v7 + 4 * v9) = v10;
v11 = *(_DWORD *)(v8 + 8 * v9);
if ( v11 == RegularFaceSize )
v11 = 1;
v12 = v10 + v11;
++v9;
v10 = v12;
}
while ( v6 != v9 );
}
result = *(_QWORD *)this;
*(_DWORD *)(*(_QWORD *)this + 4 * v6) = v12;
return result;
}
|
initializePtexIndices:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV EDI,dword ptr [RSI]
CALL 0x00139360
MOV EBP,EAX
MOV RAX,qword ptr [R14 + 0x30]
MOV R15,qword ptr [RAX]
MOVSXD R14,dword ptr [R15]
LEA RSI,[R14 + 0x1]
MOV RDI,RBX
CALL 0x00139690
TEST R14,R14
JLE 0x00170718
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [R15 + 0x18]
XOR EDX,EDX
MOV ESI,0x1
XOR R8D,R8D
LAB_001706fc:
MOV dword ptr [RAX + RDX*0x4],R8D
MOV EDI,dword ptr [RCX + RDX*0x8]
CMP EDI,EBP
CMOVZ EDI,ESI
ADD EDI,R8D
INC RDX
MOV R8D,EDI
CMP R14,RDX
JNZ 0x001706fc
JMP 0x0017071a
LAB_00170718:
XOR EDI,EDI
LAB_0017071a:
MOV RAX,qword ptr [RBX]
MOV dword ptr [RAX + R14*0x4],EDI
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(OpenSubdiv::v3_6_0::Far::TopologyRefiner
const&) */
void __thiscall
OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices
(PtexIndices *this,TopologyRefiner *param_1)
{
int *piVar1;
long lVar2;
long lVar3;
int iVar4;
long lVar5;
int iVar6;
int iVar7;
long lVar8;
iVar4 = Sdc::SchemeTypeTraits::GetRegularFaceSize(*(int4 *)param_1);
piVar1 = (int *)**(int8 **)(param_1 + 0x30);
lVar8 = (long)*piVar1;
std::vector<int,std::allocator<int>>::resize((vector<int,std::allocator<int>> *)this,lVar8 + 1);
if (lVar8 < 1) {
iVar7 = 0;
}
else {
lVar2 = *(long *)this;
lVar3 = *(long *)(piVar1 + 6);
lVar5 = 0;
iVar7 = 0;
do {
*(int *)(lVar2 + lVar5 * 4) = iVar7;
iVar6 = *(int *)(lVar3 + lVar5 * 8);
if (iVar6 == iVar4) {
iVar6 = 1;
}
iVar7 = iVar6 + iVar7;
lVar5 = lVar5 + 1;
} while (lVar8 != lVar5);
}
*(int *)(*(long *)this + lVar8 * 4) = iVar7;
return;
}
|
|
57,959
|
OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/ptexIndices.cpp
|
void
PtexIndices::initializePtexIndices(TopologyRefiner const &refiner) {
int regFaceSize = Sdc::SchemeTypeTraits::GetRegularFaceSize(
refiner.GetSchemeType());
Vtr::internal::Level const & coarseLevel = refiner.getLevel(0);
int nfaces = coarseLevel.getNumFaces();
_ptexIndices.resize(nfaces+1);
int ptexID=0;
for (int i = 0; i < nfaces; ++i) {
_ptexIndices[i] = ptexID;
Vtr::ConstIndexArray fverts = coarseLevel.getFaceVertices(i);
ptexID += fverts.size()==regFaceSize ? 1 : fverts.size();
}
// last entry contains the number of ptex texture faces
_ptexIndices[nfaces]=ptexID;
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %edi
callq 0x50f00
movl %eax, %ebp
movq 0x30(%r14), %rax
movq (%rax), %r14
movslq (%r14), %r12
leaq 0x1(%r12), %rsi
movq %rbx, %rdi
callq 0x514b0
xorl %r15d, %r15d
testl %r12d, %r12d
movl $0x0, %r13d
movq %r12, (%rsp)
cmovgl %r12d, %r13d
xorl %r12d, %r12d
cmpq %r15, %r13
je 0x82299
movq (%rbx), %rax
movl %r12d, (%rax,%r15,4)
movq %r14, %rdi
movl %r15d, %esi
callq 0x52db0
cmpl %ebp, %edx
pushq $0x1
popq %rax
cmovel %eax, %edx
addl %edx, %r12d
incq %r15
jmp 0x82272
movq (%rbx), %rax
movq (%rsp), %rcx
movl %r12d, (%rax,%rcx,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Far11PtexIndices21initializePtexIndicesERKNS1_15TopologyRefinerE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov edi, [rsi]
call __ZN10OpenSubdiv6v3_6_03Sdc16SchemeTypeTraits18GetRegularFaceSizeENS1_10SchemeTypeE; OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(OpenSubdiv::v3_6_0::Sdc::SchemeType)
mov ebp, eax
mov rax, [r14+30h]
mov r14, [rax]
movsxd r12, dword ptr [r14]
lea rsi, [r12+1]
mov rdi, rbx
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
xor r15d, r15d
test r12d, r12d
mov r13d, 0
mov [rsp+38h+var_38], r12
cmovg r13d, r12d
xor r12d, r12d
loc_82272:
cmp r13, r15
jz short loc_82299
mov rax, [rbx]
mov [rax+r15*4], r12d
mov rdi, r14; this
mov esi, r15d; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int)
cmp edx, ebp
push 1
pop rax
cmovz edx, eax
add r12d, edx
inc r15
jmp short loc_82272
loc_82299:
mov rax, [rbx]
mov rcx, [rsp+38h+var_38]
mov [rax+rcx*4], r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(
OpenSubdiv::v3_6_0::Far::PtexIndices *this,
const OpenSubdiv::v3_6_0::Far::TopologyRefiner *a2)
{
int RegularFaceSize; // ebp
OpenSubdiv::v3_6_0::Vtr::internal::Level **v3; // rax
OpenSubdiv::v3_6_0::Vtr::internal::Level *v4; // r14
long long v5; // r12
long long v6; // r15
long long v7; // r13
int v8; // r12d
int v9; // edx
long long result; // rax
long long v11; // [rsp+0h] [rbp-38h]
RegularFaceSize = OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(*(_DWORD *)a2);
v3 = (OpenSubdiv::v3_6_0::Vtr::internal::Level **)*((_QWORD *)a2 + 6);
v4 = *v3;
v5 = *(int *)*v3;
std::vector<int>::resize(this, v5 + 1);
v6 = 0LL;
v7 = 0LL;
v11 = v5;
if ( (int)v5 > 0 )
v7 = (unsigned int)v5;
v8 = 0;
while ( v7 != v6 )
{
*(_DWORD *)(*(_QWORD *)this + 4 * v6) = v8;
OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(v4, v6);
if ( v9 == RegularFaceSize )
v9 = 1;
v8 += v9;
++v6;
}
result = *(_QWORD *)this;
*(_DWORD *)(*(_QWORD *)this + 4 * v11) = v8;
return result;
}
|
initializePtexIndices:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV EDI,dword ptr [RSI]
CALL 0x00150f00
MOV EBP,EAX
MOV RAX,qword ptr [R14 + 0x30]
MOV R14,qword ptr [RAX]
MOVSXD R12,dword ptr [R14]
LEA RSI,[R12 + 0x1]
MOV RDI,RBX
CALL 0x001514b0
XOR R15D,R15D
TEST R12D,R12D
MOV R13D,0x0
MOV qword ptr [RSP],R12
CMOVG R13D,R12D
XOR R12D,R12D
LAB_00182272:
CMP R13,R15
JZ 0x00182299
MOV RAX,qword ptr [RBX]
MOV dword ptr [RAX + R15*0x4],R12D
MOV RDI,R14
MOV ESI,R15D
CALL 0x00152db0
CMP EDX,EBP
PUSH 0x1
POP RAX
CMOVZ EDX,EAX
ADD R12D,EDX
INC R15
JMP 0x00182272
LAB_00182299:
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RSP]
MOV dword ptr [RAX + RCX*0x4],R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(OpenSubdiv::v3_6_0::Far::TopologyRefiner
const&) */
void __thiscall
OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices
(PtexIndices *this,TopologyRefiner *param_1)
{
uint uVar1;
Level *this_00;
int iVar2;
int extraout_EDX;
int iVar3;
int iVar4;
ulong uVar5;
ulong uVar6;
iVar2 = Sdc::SchemeTypeTraits::GetRegularFaceSize(*(int4 *)param_1);
this_00 = (Level *)**(int8 **)(param_1 + 0x30);
uVar1 = *(uint *)this_00;
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)this,(long)(int)uVar1 + 1);
uVar6 = 0;
uVar5 = 0;
if (0 < (int)uVar1) {
uVar5 = (ulong)uVar1;
}
iVar4 = 0;
for (; uVar5 != uVar6; uVar6 = uVar6 + 1) {
*(int *)(*(long *)this + uVar6 * 4) = iVar4;
Vtr::internal::Level::getFaceVertices(this_00,(int)uVar6);
iVar3 = extraout_EDX;
if (extraout_EDX == iVar2) {
iVar3 = 1;
}
iVar4 = iVar4 + iVar3;
}
*(int *)(*(long *)this + (long)(int)uVar1 * 4) = iVar4;
return;
}
|
|
57,960
|
OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/ptexIndices.cpp
|
void
PtexIndices::initializePtexIndices(TopologyRefiner const &refiner) {
int regFaceSize = Sdc::SchemeTypeTraits::GetRegularFaceSize(
refiner.GetSchemeType());
Vtr::internal::Level const & coarseLevel = refiner.getLevel(0);
int nfaces = coarseLevel.getNumFaces();
_ptexIndices.resize(nfaces+1);
int ptexID=0;
for (int i = 0; i < nfaces; ++i) {
_ptexIndices[i] = ptexID;
Vtr::ConstIndexArray fverts = coarseLevel.getFaceVertices(i);
ptexID += fverts.size()==regFaceSize ? 1 : fverts.size();
}
// last entry contains the number of ptex texture faces
_ptexIndices[nfaces]=ptexID;
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl (%rsi), %edi
callq 0x39350
movl %eax, %ebx
movq 0x30(%r14), %rax
movq (%rax), %r12
movslq (%r12), %r14
leaq 0x1(%r14), %rsi
movq %r15, %rdi
callq 0x39670
movq (%r15), %rax
testq %r14, %r14
jle 0x71d4b
movq 0x18(%r12), %rcx
xorl %edx, %edx
movl $0x1, %esi
xorl %r8d, %r8d
movl %r8d, (%rax,%rdx,4)
movl (%rcx,%rdx,8), %edi
cmpl %ebx, %edi
cmovel %esi, %edi
addl %r8d, %edi
incq %rdx
movl %edi, %r8d
cmpq %rdx, %r14
jne 0x71d2f
jmp 0x71d4d
xorl %edi, %edi
movl %edi, (%rax,%r14,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Far11PtexIndices21initializePtexIndicesERKNS1_15TopologyRefinerE:
push r15
push r14
push r12
push rbx
push rax
mov r14, rsi
mov r15, rdi
mov edi, [rsi]
call __ZN10OpenSubdiv6v3_6_03Sdc16SchemeTypeTraits18GetRegularFaceSizeENS1_10SchemeTypeE; OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(OpenSubdiv::v3_6_0::Sdc::SchemeType)
mov ebx, eax
mov rax, [r14+30h]
mov r12, [rax]
movsxd r14, dword ptr [r12]
lea rsi, [r14+1]
mov rdi, r15
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rax, [r15]
test r14, r14
jle short loc_71D4B
mov rcx, [r12+18h]
xor edx, edx
mov esi, 1
xor r8d, r8d
loc_71D2F:
mov [rax+rdx*4], r8d
mov edi, [rcx+rdx*8]
cmp edi, ebx
cmovz edi, esi
add edi, r8d
inc rdx
mov r8d, edi
cmp r14, rdx
jnz short loc_71D2F
jmp short loc_71D4D
loc_71D4B:
xor edi, edi
loc_71D4D:
mov [rax+r14*4], edi
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(
OpenSubdiv::v3_6_0::Far::PtexIndices *this,
const OpenSubdiv::v3_6_0::Far::TopologyRefiner *a2)
{
int RegularFaceSize; // ebx
int **v3; // rax
long long v4; // r12
long long v5; // r14
long long result; // rax
long long v7; // rcx
long long v8; // rdx
int v9; // r8d
int v10; // edi
int v11; // edi
RegularFaceSize = OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(*(_DWORD *)a2);
v3 = (int **)*((_QWORD *)a2 + 6);
v4 = (long long)*v3;
v5 = **v3;
std::vector<int>::resize(this, v5 + 1);
result = *(_QWORD *)this;
if ( v5 <= 0 )
{
v11 = 0;
}
else
{
v7 = *(_QWORD *)(v4 + 24);
v8 = 0LL;
v9 = 0;
do
{
*(_DWORD *)(result + 4 * v8) = v9;
v10 = *(_DWORD *)(v7 + 8 * v8);
if ( v10 == RegularFaceSize )
v10 = 1;
v11 = v9 + v10;
++v8;
v9 = v11;
}
while ( v5 != v8 );
}
*(_DWORD *)(result + 4 * v5) = v11;
return result;
}
|
initializePtexIndices:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV R15,RDI
MOV EDI,dword ptr [RSI]
CALL 0x00139350
MOV EBX,EAX
MOV RAX,qword ptr [R14 + 0x30]
MOV R12,qword ptr [RAX]
MOVSXD R14,dword ptr [R12]
LEA RSI,[R14 + 0x1]
MOV RDI,R15
CALL 0x00139670
MOV RAX,qword ptr [R15]
TEST R14,R14
JLE 0x00171d4b
MOV RCX,qword ptr [R12 + 0x18]
XOR EDX,EDX
MOV ESI,0x1
XOR R8D,R8D
LAB_00171d2f:
MOV dword ptr [RAX + RDX*0x4],R8D
MOV EDI,dword ptr [RCX + RDX*0x8]
CMP EDI,EBX
CMOVZ EDI,ESI
ADD EDI,R8D
INC RDX
MOV R8D,EDI
CMP R14,RDX
JNZ 0x00171d2f
JMP 0x00171d4d
LAB_00171d4b:
XOR EDI,EDI
LAB_00171d4d:
MOV dword ptr [RAX + R14*0x4],EDI
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices(OpenSubdiv::v3_6_0::Far::TopologyRefiner
const&) */
void __thiscall
OpenSubdiv::v3_6_0::Far::PtexIndices::initializePtexIndices
(PtexIndices *this,TopologyRefiner *param_1)
{
int *piVar1;
long lVar2;
long lVar3;
int iVar4;
long lVar5;
int iVar6;
int iVar7;
long lVar8;
iVar4 = Sdc::SchemeTypeTraits::GetRegularFaceSize(*(int4 *)param_1);
piVar1 = (int *)**(int8 **)(param_1 + 0x30);
lVar8 = (long)*piVar1;
std::vector<int,std::allocator<int>>::resize((vector<int,std::allocator<int>> *)this,lVar8 + 1);
lVar2 = *(long *)this;
if (lVar8 < 1) {
iVar7 = 0;
}
else {
lVar3 = *(long *)(piVar1 + 6);
lVar5 = 0;
iVar7 = 0;
do {
*(int *)(lVar2 + lVar5 * 4) = iVar7;
iVar6 = *(int *)(lVar3 + lVar5 * 8);
if (iVar6 == iVar4) {
iVar6 = 1;
}
iVar7 = iVar6 + iVar7;
lVar5 = lVar5 + 1;
} while (lVar8 != lVar5);
}
*(int *)(lVar2 + lVar8 * 4) = iVar7;
return;
}
|
|
57,961
|
my_wc_to_printable_8bit
|
eloqsql/strings/ctype.c
|
int
my_wc_to_printable_8bit(CHARSET_INFO *cs, my_wc_t wc,
uchar *str, uchar *end)
{
/*
Special case: swe7 does not have the backslash character.
Use dot instead of backslash for escaping.
*/
uint bs= cs->tab_to_uni && cs->tab_to_uni['\\'] != '\\' ? '.' : '\\';
DBUG_ASSERT(cs->mbminlen == 1);
/*
Additionally, if the original swe7 string contains backslashes,
replace them to dots, so this error message:
Invalid swe7 character string: '\xEF\xBC\xB4'
is displayed as:
Invalid swe7 character string: '.xEF.xBC.xB4'
which is more readable than what would happen without '\'-to-dot mapping:
Invalid swe7 character string: '.005CxEF.005CxBC.005CxB4'
*/
if (bs == '.' && wc == '\\')
wc= '.';
return my_wc_to_printable_ex(cs, wc, str, end, bs, 1, 1);
}
|
O3
|
c
|
my_wc_to_printable_8bit:
movq 0x68(%rdi), %rax
testq %rax, %rax
je 0x5579d
cmpw $0x5c, 0xb8(%rax)
setne %al
movl $0x2e, %r9d
movl $0x5c, %r8d
cmovnel %r9d, %r8d
jmp 0x557a5
movl $0x5c, %r8d
xorl %eax, %eax
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
testb %al, %al
movl $0x2e, %eax
cmoveq %rsi, %rax
cmpq $0x5c, %rsi
cmovneq %rsi, %rax
movl $0x1, (%rsp)
movq %rax, %rsi
movl $0x1, %r9d
callq 0x555d0
addq $0x10, %rsp
popq %rbp
retq
|
my_wc_to_printable_8bit:
mov rax, [rdi+68h]
test rax, rax
jz short loc_5579D
cmp word ptr [rax+0B8h], 5Ch ; '\'
setnz al
mov r9d, 2Eh ; '.'
mov r8d, 5Ch ; '\'
cmovnz r8d, r9d
jmp short loc_557A5
loc_5579D:
mov r8d, 5Ch ; '\'
xor eax, eax
loc_557A5:
push rbp
mov rbp, rsp
sub rsp, 10h
test al, al
mov eax, 2Eh ; '.'
cmovz rax, rsi
cmp rsi, 5Ch ; '\'
cmovnz rax, rsi
mov [rsp+18h+var_18], 1
mov rsi, rax
mov r9d, 1
call my_wc_to_printable_ex
add rsp, 10h
pop rbp
retn
|
long long my_wc_to_printable_8bit(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long v4; // rax
bool v5; // zf
bool v6; // al
char v7; // r8
unsigned long long v8; // rax
v4 = *(_QWORD *)(a1 + 104);
if ( v4 )
{
v5 = *(_WORD *)(v4 + 184) == 92;
v6 = *(_WORD *)(v4 + 184) != 92;
v7 = 92;
if ( !v5 )
v7 = 46;
}
else
{
v7 = 92;
v6 = 0;
}
v5 = !v6;
v8 = 46LL;
if ( v5 )
v8 = a2;
if ( a2 != 92 )
v8 = a2;
return my_wc_to_printable_ex(a1, v8, a3, a4, v7, 1u, 1u);
}
|
my_wc_to_printable_8bit:
MOV RAX,qword ptr [RDI + 0x68]
TEST RAX,RAX
JZ 0x0015579d
CMP word ptr [RAX + 0xb8],0x5c
SETNZ AL
MOV R9D,0x2e
MOV R8D,0x5c
CMOVNZ R8D,R9D
JMP 0x001557a5
LAB_0015579d:
MOV R8D,0x5c
XOR EAX,EAX
LAB_001557a5:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
TEST AL,AL
MOV EAX,0x2e
CMOVZ RAX,RSI
CMP RSI,0x5c
CMOVNZ RAX,RSI
MOV dword ptr [RSP],0x1
MOV RSI,RAX
MOV R9D,0x1
CALL 0x001555d0
ADD RSP,0x10
POP RBP
RET
|
void my_wc_to_printable_8bit(long param_1,long param_2,int8 param_3,int8 param_4)
{
long lVar1;
int8 uVar2;
bool bVar3;
if (*(long *)(param_1 + 0x68) == 0) {
uVar2 = 0x5c;
bVar3 = false;
}
else {
bVar3 = *(short *)(*(long *)(param_1 + 0x68) + 0xb8) != 0x5c;
uVar2 = 0x5c;
if (bVar3) {
uVar2 = 0x2e;
}
}
lVar1 = 0x2e;
if (!bVar3) {
lVar1 = param_2;
}
if (param_2 != 0x5c) {
lVar1 = param_2;
}
my_wc_to_printable_ex(param_1,lVar1,param_3,param_4,uVar2,1,1);
return;
}
|
|
57,962
|
ggml_quantize_init
|
ngxson[P]ggml-easy/ggml/src/ggml.c
|
void ggml_quantize_init(enum ggml_type type) {
ggml_critical_section_start();
switch (type) {
case GGML_TYPE_IQ2_XXS:
case GGML_TYPE_IQ2_XS:
case GGML_TYPE_IQ2_S:
case GGML_TYPE_IQ1_S:
case GGML_TYPE_IQ1_M: iq2xs_init_impl(type); break;
case GGML_TYPE_IQ3_XXS: iq3xs_init_impl(256); break;
case GGML_TYPE_IQ3_S: iq3xs_init_impl(512); break;
default: // nothing
break;
}
ggml_critical_section_end();
}
|
O3
|
c
|
ggml_quantize_init:
pushq %rbx
movl %edi, %ebx
callq 0x17da0
cmpl $0x1d, %ebx
ja 0x23061
movl $0x204b0000, %eax # imm = 0x204B0000
btl %ebx, %eax
jae 0x23046
movl %ebx, %edi
callq 0x17ee0
jmp 0x23061
cmpl $0x12, %ebx
je 0x23057
cmpl $0x15, %ebx
jne 0x23061
movl $0x200, %edi # imm = 0x200
jmp 0x2305c
movl $0x100, %edi # imm = 0x100
callq 0x17870
popq %rbx
jmp 0x17b90
|
ggml_quantize_init:
push rbx
mov ebx, edi
call _ggml_critical_section_start
cmp ebx, 1Dh
ja short loc_23061
mov eax, 204B0000h
bt eax, ebx
jnb short loc_23046
mov edi, ebx
call _iq2xs_init_impl
jmp short loc_23061
loc_23046:
cmp ebx, 12h
jz short loc_23057
cmp ebx, 15h
jnz short loc_23061
mov edi, 200h
jmp short loc_2305C
loc_23057:
mov edi, 100h
loc_2305C:
call _iq3xs_init_impl
loc_23061:
pop rbx
jmp _ggml_critical_section_end
|
long long ggml_quantize_init(long long a1)
{
int v1; // eax
long long v2; // rdi
ggml_critical_section_start(a1);
if ( (unsigned int)a1 <= 0x1D )
{
v1 = 541786112;
if ( !_bittest(&v1, a1) )
{
if ( (_DWORD)a1 == 18 )
{
v2 = 256LL;
}
else
{
if ( (_DWORD)a1 != 21 )
return ggml_critical_section_end();
v2 = 512LL;
}
iq3xs_init_impl(v2);
return ggml_critical_section_end();
}
iq2xs_init_impl((unsigned int)a1);
}
return ggml_critical_section_end();
}
|
ggml_quantize_init:
PUSH RBX
MOV EBX,EDI
CALL 0x00117da0
CMP EBX,0x1d
JA 0x00123061
MOV EAX,0x204b0000
BT EAX,EBX
JNC 0x00123046
MOV EDI,EBX
CALL 0x00117ee0
JMP 0x00123061
LAB_00123046:
CMP EBX,0x12
JZ 0x00123057
CMP EBX,0x15
JNZ 0x00123061
MOV EDI,0x200
JMP 0x0012305c
LAB_00123057:
MOV EDI,0x100
LAB_0012305c:
CALL 0x00117870
LAB_00123061:
POP RBX
JMP 0x00117b90
|
void ggml_quantize_init(uint param_1)
{
int8 uVar1;
ggml_critical_section_start();
if (param_1 < 0x1e) {
if ((0x204b0000U >> (param_1 & 0x1f) & 1) == 0) {
if (param_1 == 0x12) {
uVar1 = 0x100;
}
else {
if (param_1 != 0x15) goto LAB_00123061;
uVar1 = 0x200;
}
iq3xs_init_impl(uVar1);
}
else {
iq2xs_init_impl(param_1);
}
}
LAB_00123061:
ggml_critical_section_end();
return;
}
|
|
57,963
|
parse_comma
|
eloqsql/client/mysqlslap.c
|
uint
parse_comma(const char *string, uint **range)
{
uint count= 1,x; /* We know that there is always one */
char *retstr;
char *ptr= (char *)string;
uint *nptr;
for (;*ptr; ptr++)
if (*ptr == ',') count++;
/* One extra spot for the NULL */
nptr= *range= (uint *)my_malloc(PSI_NOT_INSTRUMENTED, sizeof(uint) * (count + 1),
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
ptr= (char *)string;
x= 0;
while ((retstr= strchr(ptr,',')))
{
nptr[x++]= atoi(ptr);
ptr+= retstr - ptr + 1;
}
nptr[x++]= atoi(ptr);
return count;
}
|
O0
|
c
|
parse_comma:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
je 0x3b62d
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x3b61d
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3b61f
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x3b5ff
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
shlq $0x2, %rsi
xorl %edi, %edi
movl $0x38, %edx
callq 0x7fad0
movq -0x10(%rbp), %rcx
movq %rax, (%rcx)
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rdi
movl $0x2c, %esi
callq 0x374f0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x3b6b1
movq -0x28(%rbp), %rdi
callq 0x37320
movl %eax, %edx
movq -0x30(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x18(%rbp)
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
addq $0x1, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x3b661
movq -0x28(%rbp), %rdi
callq 0x37320
movl %eax, %edx
movq -0x30(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x18(%rbp)
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
parse_comma:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], 1
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
loc_3B5FF:
mov rax, [rbp+var_28]
cmp byte ptr [rax], 0
jz short loc_3B62D
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 2Ch ; ','
jnz short loc_3B61D
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
loc_3B61D:
jmp short $+2
loc_3B61F:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_3B5FF
loc_3B62D:
mov eax, [rbp+var_14]
add eax, 1
mov eax, eax
mov esi, eax
shl rsi, 2
xor edi, edi
mov edx, 38h ; '8'
call my_malloc
mov rcx, [rbp+var_10]
mov [rcx], rax
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov [rbp+var_18], 0
loc_3B661:
mov rdi, [rbp+var_28]
mov esi, 2Ch ; ','
call _strchr
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_3B6B1
mov rdi, [rbp+var_28]
call _atoi
mov edx, eax
mov rax, [rbp+var_30]
mov ecx, [rbp+var_18]
mov esi, ecx
add esi, 1
mov [rbp+var_18], esi
mov ecx, ecx
mov [rax+rcx*4], edx
mov rax, [rbp+var_20]
mov rcx, [rbp+var_28]
sub rax, rcx
add rax, 1
add rax, [rbp+var_28]
mov [rbp+var_28], rax
jmp short loc_3B661
loc_3B6B1:
mov rdi, [rbp+var_28]
call _atoi
mov edx, eax
mov rax, [rbp+var_30]
mov ecx, [rbp+var_18]
mov esi, ecx
add esi, 1
mov [rbp+var_18], esi
mov ecx, ecx
mov [rax+rcx*4], edx
mov eax, [rbp+var_14]
add rsp, 30h
pop rbp
retn
|
long long parse_comma(_BYTE *a1, long long *a2)
{
long long v2; // rax
long long j; // rax
int v4; // eax
unsigned int v5; // ecx
long long v7; // [rsp+0h] [rbp-30h]
_BYTE *i; // [rsp+8h] [rbp-28h]
_BYTE *v9; // [rsp+8h] [rbp-28h]
long long v10; // [rsp+10h] [rbp-20h]
unsigned int v11; // [rsp+18h] [rbp-18h]
unsigned int v12; // [rsp+1Ch] [rbp-14h]
v12 = 1;
for ( i = a1; *i; ++i )
{
if ( *i == 44 )
++v12;
}
v2 = my_malloc(0LL, 4LL * (v12 + 1), 56LL);
*a2 = v2;
v7 = v2;
v9 = a1;
v11 = 0;
for ( j = strchr(a1, 44LL); ; j = strchr(v10 + 1, 44LL) )
{
v10 = j;
if ( !j )
break;
v4 = atoi(v9);
v5 = v11++;
*(_DWORD *)(v7 + 4LL * v5) = v4;
v9 = (_BYTE *)(v10 + 1);
}
*(_DWORD *)(v7 + 4LL * v11) = atoi(v9);
return v12;
}
|
parse_comma:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_0013b5ff:
MOV RAX,qword ptr [RBP + -0x28]
CMP byte ptr [RAX],0x0
JZ 0x0013b62d
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2c
JNZ 0x0013b61d
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
LAB_0013b61d:
JMP 0x0013b61f
LAB_0013b61f:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0013b5ff
LAB_0013b62d:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV EAX,EAX
MOV ESI,EAX
SHL RSI,0x2
XOR EDI,EDI
MOV EDX,0x38
CALL 0x0017fad0
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX],RAX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0x18],0x0
LAB_0013b661:
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,0x2c
CALL 0x001374f0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x0013b6b1
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00137320
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x18]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RBP + -0x18],ESI
MOV ECX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0013b661
LAB_0013b6b1:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00137320
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x18]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RBP + -0x18],ESI
MOV ECX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0x30
POP RBP
RET
|
int parse_comma(char *param_1,long *param_2)
{
int iVar1;
long lVar2;
char *pcVar3;
char *local_30;
uint local_20;
int local_1c;
local_1c = 1;
for (local_30 = param_1; *local_30 != '\0'; local_30 = local_30 + 1) {
if (*local_30 == ',') {
local_1c = local_1c + 1;
}
}
lVar2 = my_malloc(0,(ulong)(local_1c + 1) << 2,0x38);
*param_2 = lVar2;
local_20 = 0;
local_30 = param_1;
while( true ) {
pcVar3 = strchr(local_30,0x2c);
if (pcVar3 == (char *)0x0) break;
iVar1 = atoi(local_30);
*(int *)(lVar2 + (ulong)local_20 * 4) = iVar1;
local_30 = pcVar3 + 1;
local_20 = local_20 + 1;
}
iVar1 = atoi(local_30);
*(int *)(lVar2 + (ulong)local_20 * 4) = iVar1;
return local_1c;
}
|
|
57,964
|
OpenGL_Init_4_2
|
SDL3Lite/dependencies/OpenGL.h
|
void OpenGL_Init_4_2()
{
glDrawArraysInstancedBaseInstance = (PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)OpenGL_Load("glDrawArraysInstancedBaseInstance");
glDrawElementsInstancedBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)OpenGL_Load("glDrawElementsInstancedBaseInstance");
glDrawElementsInstancedBaseVertexBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)OpenGL_Load("glDrawElementsInstancedBaseVertexBaseInstance");
glGetInternalformativ = (PFNGLGETINTERNALFORMATIVPROC)OpenGL_Load("glGetInternalformativ");
glGetActiveAtomicCounterBufferiv = (PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC)OpenGL_Load("glGetActiveAtomicCounterBufferiv");
glBindImageTexture = (PFNGLBINDIMAGETEXTUREPROC)OpenGL_Load("glBindImageTexture");
glMemoryBarrier = (PFNGLMEMORYBARRIERPROC)OpenGL_Load("glMemoryBarrier");
glTexStorage1D = (PFNGLTEXSTORAGE1DPROC)OpenGL_Load("glTexStorage1D");
glTexStorage2D = (PFNGLTEXSTORAGE2DPROC)OpenGL_Load("glTexStorage2D");
glTexStorage3D = (PFNGLTEXSTORAGE3DPROC)OpenGL_Load("glTexStorage3D");
glDrawTransformFeedbackInstanced = (PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)OpenGL_Load("glDrawTransformFeedbackInstanced");
glDrawTransformFeedbackStreamInstanced = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)OpenGL_Load("glDrawTransformFeedbackStreamInstanced");
}
|
O3
|
c
|
OpenGL_Init_4_2:
pushq %rax
leaq 0x542a(%rip), %rdi # 0x18852
callq 0xf3a0
movq %rax, 0xa744(%rip) # 0x1db78
leaq 0x5439(%rip), %rdi # 0x18874
callq 0xf3a0
movq %rax, 0xa739(%rip) # 0x1db80
leaq 0x544a(%rip), %rdi # 0x18898
callq 0xf3a0
movq %rax, 0xa72e(%rip) # 0x1db88
leaq 0x5465(%rip), %rdi # 0x188c6
callq 0xf3a0
movq %rax, 0xa723(%rip) # 0x1db90
leaq 0x5468(%rip), %rdi # 0x188dc
callq 0xf3a0
movq %rax, 0xa718(%rip) # 0x1db98
leaq 0x5476(%rip), %rdi # 0x188fd
callq 0xf3a0
movq %rax, 0xa70d(%rip) # 0x1dba0
leaq 0x5476(%rip), %rdi # 0x18910
callq 0xf3a0
movq %rax, 0xa702(%rip) # 0x1dba8
leaq 0x5473(%rip), %rdi # 0x18920
callq 0xf3a0
movq %rax, 0xa6f7(%rip) # 0x1dbb0
leaq 0x546f(%rip), %rdi # 0x1892f
callq 0xf3a0
movq %rax, 0xa6ec(%rip) # 0x1dbb8
leaq 0x546b(%rip), %rdi # 0x1893e
callq 0xf3a0
movq %rax, 0xa6e1(%rip) # 0x1dbc0
leaq 0x5467(%rip), %rdi # 0x1894d
callq 0xf3a0
movq %rax, 0xa6d6(%rip) # 0x1dbc8
leaq 0x5475(%rip), %rdi # 0x1896e
callq 0xf3a0
movq %rax, 0xa6cb(%rip) # 0x1dbd0
popq %rax
retq
nopw (%rax,%rax)
|
OpenGL_Init_4_2:
push rax
lea rdi, aGldrawarraysin_4; "glDrawArraysInstancedBaseInstance"
call OpenGL_Load
mov cs:glDrawArraysInstancedBaseInstance, rax
lea rdi, aGldrawelements_11; "glDrawElementsInstancedBaseInstance"
call OpenGL_Load
mov cs:glDrawElementsInstancedBaseInstance, rax
lea rdi, aGldrawelements_12; "glDrawElementsInstancedBaseVertexBaseIn"...
call OpenGL_Load
mov cs:glDrawElementsInstancedBaseVertexBaseInstance, rax
lea rdi, aGlgetinternalf_1; "glGetInternalformativ"
call OpenGL_Load
mov cs:glGetInternalformativ, rax
lea rdi, aGlgetactiveato_0; "glGetActiveAtomicCounterBufferiv"
call OpenGL_Load
mov cs:glGetActiveAtomicCounterBufferiv, rax
lea rdi, aGlbindimagetex_1; "glBindImageTexture"
call OpenGL_Load
mov cs:glBindImageTexture, rax
lea rdi, aGlmemorybarrie_1; "glMemoryBarrier"
call OpenGL_Load
mov cs:glMemoryBarrier, rax
lea rdi, aGltexstorage1d_0; "glTexStorage1D"
call OpenGL_Load
mov cs:glTexStorage1D, rax
lea rdi, aGltexstorage2d_1; "glTexStorage2D"
call OpenGL_Load
mov cs:glTexStorage2D, rax
lea rdi, aGltexstorage3d_1; "glTexStorage3D"
call OpenGL_Load
mov cs:glTexStorage3D, rax
lea rdi, aGldrawtransfor_5; "glDrawTransformFeedbackInstanced"
call OpenGL_Load
mov cs:glDrawTransformFeedbackInstanced, rax
lea rdi, aGldrawtransfor_6; "glDrawTransformFeedbackStreamInstanced"
call OpenGL_Load
mov cs:glDrawTransformFeedbackStreamInstanced, rax
pop rax
retn
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenGL_Init_4_2()
{
glDrawArraysInstancedBaseInstance = OpenGL_Load("glDrawArraysInstancedBaseInstance");
glDrawElementsInstancedBaseInstance = OpenGL_Load("glDrawElementsInstancedBaseInstance");
glDrawElementsInstancedBaseVertexBaseInstance = OpenGL_Load("glDrawElementsInstancedBaseVertexBaseInstance");
glGetInternalformativ = OpenGL_Load("glGetInternalformativ");
glGetActiveAtomicCounterBufferiv = OpenGL_Load("glGetActiveAtomicCounterBufferiv");
glBindImageTexture = OpenGL_Load("glBindImageTexture");
glMemoryBarrier = OpenGL_Load("glMemoryBarrier");
glTexStorage1D = OpenGL_Load("glTexStorage1D");
glTexStorage2D = OpenGL_Load("glTexStorage2D");
glTexStorage3D = OpenGL_Load("glTexStorage3D");
glDrawTransformFeedbackInstanced = OpenGL_Load("glDrawTransformFeedbackInstanced");
glDrawTransformFeedbackStreamInstanced = OpenGL_Load("glDrawTransformFeedbackStreamInstanced");
}
|
OpenGL_Init_4_2:
PUSH RAX
LEA RDI,[0x118852]
CALL 0x0010f3a0
MOV qword ptr [0x0011db78],RAX
LEA RDI,[0x118874]
CALL 0x0010f3a0
MOV qword ptr [0x0011db80],RAX
LEA RDI,[0x118898]
CALL 0x0010f3a0
MOV qword ptr [0x0011db88],RAX
LEA RDI,[0x1188c6]
CALL 0x0010f3a0
MOV qword ptr [0x0011db90],RAX
LEA RDI,[0x1188dc]
CALL 0x0010f3a0
MOV qword ptr [0x0011db98],RAX
LEA RDI,[0x1188fd]
CALL 0x0010f3a0
MOV qword ptr [0x0011dba0],RAX
LEA RDI,[0x118910]
CALL 0x0010f3a0
MOV qword ptr [0x0011dba8],RAX
LEA RDI,[0x118920]
CALL 0x0010f3a0
MOV qword ptr [0x0011dbb0],RAX
LEA RDI,[0x11892f]
CALL 0x0010f3a0
MOV qword ptr [0x0011dbb8],RAX
LEA RDI,[0x11893e]
CALL 0x0010f3a0
MOV qword ptr [0x0011dbc0],RAX
LEA RDI,[0x11894d]
CALL 0x0010f3a0
MOV qword ptr [0x0011dbc8],RAX
LEA RDI,[0x11896e]
CALL 0x0010f3a0
MOV qword ptr [0x0011dbd0],RAX
POP RAX
RET
|
int8 OpenGL_Init_4_2(void)
{
int8 in_RAX;
glDrawArraysInstancedBaseInstance = OpenGL_Load("glDrawArraysInstancedBaseInstance");
glDrawElementsInstancedBaseInstance = OpenGL_Load("glDrawElementsInstancedBaseInstance");
glDrawElementsInstancedBaseVertexBaseInstance =
OpenGL_Load("glDrawElementsInstancedBaseVertexBaseInstance");
glGetInternalformativ = OpenGL_Load("glGetInternalformativ");
glGetActiveAtomicCounterBufferiv = OpenGL_Load("glGetActiveAtomicCounterBufferiv");
glBindImageTexture = OpenGL_Load("glBindImageTexture");
glMemoryBarrier = OpenGL_Load("glMemoryBarrier");
glTexStorage1D = OpenGL_Load("glTexStorage1D");
glTexStorage2D = OpenGL_Load("glTexStorage2D");
glTexStorage3D = OpenGL_Load("glTexStorage3D");
glDrawTransformFeedbackInstanced = OpenGL_Load("glDrawTransformFeedbackInstanced");
glDrawTransformFeedbackStreamInstanced = OpenGL_Load("glDrawTransformFeedbackStreamInstanced");
return in_RAX;
}
|
|
57,965
|
reset_events_stages_history()
|
eloqsql/storage/perfschema/pfs_events_stages.cc
|
void reset_events_stages_history(void)
{
global_thread_container.apply_all(fct_reset_events_stages_history);
}
|
O3
|
cpp
|
reset_events_stages_history():
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
leaq 0x38cc11(%rip), %rax # 0x3d0a68
movq (%rax), %rcx
imulq $0x68, %rcx, %rsi
xorl %edi, %edi
leaq 0x386581(%rip), %r8 # 0x3ca3e8
movabsq $0x4ec4ec4ec4ec4ec5, %r9 # imm = 0x4EC4EC4EC4EC4EC5
movabsq $0x7fffffffffffffe, %r10 # imm = 0x7FFFFFFFFFFFFFE
movdqa 0x3f72d(%rip), %xmm0 # 0x835b0
movdqa 0x3f755(%rip), %xmm1 # 0x835e0
pcmpeqd %xmm2, %xmm2
movq 0xa8(%r8,%rdi,8), %rax
testq %rax, %rax
je 0x43fa8
movq 0x50(%rax), %rdx
testq %rdx, %rdx
jle 0x43fa8
movq 0x48(%rax), %r11
imulq $0x1640, %rdx, %rbx # imm = 0x1640
addq %r11, %rbx
movq 0xcb0(%r11), %r14
movl $0x0, 0xcac(%r11)
movb $0x0, 0xca8(%r11)
testq %rcx, %rcx
jle 0x43f98
leaq (%rsi,%r14), %rdx
leaq 0x68(%r14), %rax
cmpq %rax, %rdx
cmovaq %rdx, %rax
addq $-0x68, %rax
xorl %r15d, %r15d
subq %r14, %rax
setne %r15b
subq %r15, %rax
mulq %r9
shrq $0x5, %rdx
leaq (%r15,%rdx), %rax
movq %rax, %xmm3
pshufd $0x44, %xmm3, %xmm3 # xmm3 = xmm3[0,1,0,1]
addq $0x98, %r14
leaq (%r15,%rdx), %rax
addq $0x2, %rax
andq %r10, %rax
pxor %xmm1, %xmm3
xorl %edx, %edx
movq %rdx, %xmm4
pshufd $0x44, %xmm4, %xmm4 # xmm4 = xmm4[0,1,0,1]
por %xmm0, %xmm4
pxor %xmm1, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm3, %xmm5
pcmpeqd %xmm3, %xmm4
pshufd $0xf5, %xmm4, %xmm6 # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4 # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %r15d
notl %r15d
testb $0x1, %r15b
je 0x43f71
movq $0x0, -0x68(%r14)
pxor %xmm2, %xmm4
pextrw $0x4, %xmm4, %r15d
testb $0x1, %r15b
je 0x43f88
movq $0x0, (%r14)
addq $0x2, %rdx
addq $0xd0, %r14
cmpq %rdx, %rax
jne 0x43f2b
addq $0x1640, %r11 # imm = 0x1640
cmpq %rbx, %r11
jb 0x43ebb
incq %rdi
cmpq $0x100, %rdi # imm = 0x100
jne 0x43e8f
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
_Z27reset_events_stages_historyv:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
lea rax, events_stages_history_per_thread
mov rcx, [rax]
imul rsi, rcx, 68h ; 'h'
xor edi, edi
lea r8, global_thread_container
mov r9, 4EC4EC4EC4EC4EC5h
mov r10, 7FFFFFFFFFFFFFEh
movdqa xmm0, cs:xmmword_835B0
movdqa xmm1, cs:xmmword_835E0
pcmpeqd xmm2, xmm2
loc_43E8F:
mov rax, [r8+rdi*8+0A8h]
test rax, rax
jz loc_43FA8
mov rdx, [rax+50h]
test rdx, rdx
jle loc_43FA8
mov r11, [rax+48h]
imul rbx, rdx, 1640h
add rbx, r11
loc_43EBB:
mov r14, [r11+0CB0h]
mov dword ptr [r11+0CACh], 0
mov byte ptr [r11+0CA8h], 0
test rcx, rcx
jle loc_43F98
lea rdx, [rsi+r14]
lea rax, [r14+68h]
cmp rdx, rax
cmova rax, rdx
add rax, 0FFFFFFFFFFFFFF98h
xor r15d, r15d
sub rax, r14
setnz r15b
sub rax, r15
mul r9
shr rdx, 5
lea rax, [r15+rdx]
movq xmm3, rax
pshufd xmm3, xmm3, 44h ; 'D'
add r14, 98h
lea rax, [r15+rdx]
add rax, 2
and rax, r10
pxor xmm3, xmm1
xor edx, edx
loc_43F2B:
movq xmm4, rdx
pshufd xmm4, xmm4, 44h ; 'D'
por xmm4, xmm0
pxor xmm4, xmm1
movdqa xmm5, xmm4
pcmpgtd xmm5, xmm3
pcmpeqd xmm4, xmm3
pshufd xmm6, xmm4, 0F5h
pand xmm6, xmm5
pshufd xmm4, xmm5, 0F5h
por xmm4, xmm6
movd r15d, xmm4
not r15d
test r15b, 1
jz short loc_43F71
mov qword ptr [r14-68h], 0
loc_43F71:
pxor xmm4, xmm2
pextrw r15d, xmm4, 4
test r15b, 1
jz short loc_43F88
mov qword ptr [r14], 0
loc_43F88:
add rdx, 2
add r14, 0D0h
cmp rax, rdx
jnz short loc_43F2B
loc_43F98:
add r11, 1640h
cmp r11, rbx
jb loc_43EBB
loc_43FA8:
inc rdi
cmp rdi, 100h
jnz loc_43E8F
pop rbx
pop r14
pop r15
pop rbp
retn
|
unsigned long long reset_events_stages_history(void)
{
long long v0; // rcx
long long v1; // rsi
long long v2; // rdi
__m128i si128; // xmm0
__m128i v4; // xmm1
unsigned long long result; // rax
long long v6; // rdx
unsigned long long v7; // r11
unsigned long long v8; // rbx
long long v9; // r14
long long v10; // rax
unsigned long long v11; // rax
__m128i v12; // xmm3
_QWORD *v13; // r14
__m128i v14; // xmm3
unsigned long long v15; // rdx
__m128i v16; // xmm4
__m128i v17; // xmm5
__m128i v18; // xmm4
v0 = events_stages_history_per_thread;
v1 = 104 * events_stages_history_per_thread;
v2 = 0LL;
si128 = _mm_load_si128((const __m128i *)&xmmword_835B0);
v4 = _mm_load_si128((const __m128i *)&xmmword_835E0);
do
{
result = global_thread_container[v2 + 21];
if ( result )
{
v6 = *(_QWORD *)(result + 80);
if ( v6 > 0 )
{
v7 = *(_QWORD *)(result + 72);
v8 = v7 + 5696 * v6;
do
{
v9 = *(_QWORD *)(v7 + 3248);
*(_DWORD *)(v7 + 3244) = 0;
*(_BYTE *)(v7 + 3240) = 0;
if ( v0 > 0 )
{
v10 = v9 + 104;
if ( v1 + v9 > (unsigned long long)(v9 + 104) )
v10 = v1 + v9;
v11 = (v10 - 104 != v9) + (v10 - 104 - v9 - (unsigned long long)(v10 - 104 != v9)) / 0x68;
v12 = _mm_shuffle_epi32((__m128i)v11, 68);
v13 = (_QWORD *)(v9 + 152);
result = (v11 + 2) & 0x7FFFFFFFFFFFFFELL;
v14 = _mm_xor_si128(v12, v4);
v15 = 0LL;
do
{
v16 = _mm_xor_si128(_mm_or_si128(_mm_shuffle_epi32((__m128i)v15, 68), si128), v4);
v17 = _mm_cmpgt_epi32(v16, v14);
v18 = _mm_or_si128(
_mm_shuffle_epi32(v17, 245),
_mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v16, v14), 245), v17));
if ( (~_mm_cvtsi128_si32(v18) & 1) != 0 )
*(v13 - 13) = 0LL;
if ( (_mm_extract_epi16(_mm_xor_si128(v18, (__m128i)-1LL), 4) & 1) != 0 )
*v13 = 0LL;
v15 += 2LL;
v13 += 26;
}
while ( result != v15 );
}
v7 += 5696LL;
}
while ( v7 < v8 );
}
}
++v2;
}
while ( v2 != 256 );
return result;
}
|
reset_events_stages_history:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
LEA RAX,[0x4d0a68]
MOV RCX,qword ptr [RAX]
IMUL RSI,RCX,0x68
XOR EDI,EDI
LEA R8,[0x4ca3e8]
MOV R9,0x4ec4ec4ec4ec4ec5
MOV R10,0x7fffffffffffffe
MOVDQA XMM0,xmmword ptr [0x001835b0]
MOVDQA XMM1,xmmword ptr [0x001835e0]
PCMPEQD XMM2,XMM2
LAB_00143e8f:
MOV RAX,qword ptr [R8 + RDI*0x8 + 0xa8]
TEST RAX,RAX
JZ 0x00143fa8
MOV RDX,qword ptr [RAX + 0x50]
TEST RDX,RDX
JLE 0x00143fa8
MOV R11,qword ptr [RAX + 0x48]
IMUL RBX,RDX,0x1640
ADD RBX,R11
LAB_00143ebb:
MOV R14,qword ptr [R11 + 0xcb0]
MOV dword ptr [R11 + 0xcac],0x0
MOV byte ptr [R11 + 0xca8],0x0
TEST RCX,RCX
JLE 0x00143f98
LEA RDX,[RSI + R14*0x1]
LEA RAX,[R14 + 0x68]
CMP RDX,RAX
CMOVA RAX,RDX
ADD RAX,-0x68
XOR R15D,R15D
SUB RAX,R14
SETNZ R15B
SUB RAX,R15
MUL R9
SHR RDX,0x5
LEA RAX,[R15 + RDX*0x1]
MOVQ XMM3,RAX
PSHUFD XMM3,XMM3,0x44
ADD R14,0x98
LEA RAX,[R15 + RDX*0x1]
ADD RAX,0x2
AND RAX,R10
PXOR XMM3,XMM1
XOR EDX,EDX
LAB_00143f2b:
MOVQ XMM4,RDX
PSHUFD XMM4,XMM4,0x44
POR XMM4,XMM0
PXOR XMM4,XMM1
MOVDQA XMM5,XMM4
PCMPGTD XMM5,XMM3
PCMPEQD XMM4,XMM3
PSHUFD XMM6,XMM4,0xf5
PAND XMM6,XMM5
PSHUFD XMM4,XMM5,0xf5
POR XMM4,XMM6
MOVD R15D,XMM4
NOT R15D
TEST R15B,0x1
JZ 0x00143f71
MOV qword ptr [R14 + -0x68],0x0
LAB_00143f71:
PXOR XMM4,XMM2
PEXTRW R15D,XMM4,0x4
TEST R15B,0x1
JZ 0x00143f88
MOV qword ptr [R14],0x0
LAB_00143f88:
ADD RDX,0x2
ADD R14,0xd0
CMP RAX,RDX
JNZ 0x00143f2b
LAB_00143f98:
ADD R11,0x1640
CMP R11,RBX
JC 0x00143ebb
LAB_00143fa8:
INC RDI
CMP RDI,0x100
JNZ 0x00143e8f
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* reset_events_stages_history() */
void reset_events_stages_history(void)
{
long lVar1;
int1 auVar2 [16];
int1 auVar3 [16];
long lVar4;
long lVar5;
ulong uVar6;
ulong uVar7;
ulong uVar8;
long lVar9;
long lVar10;
ulong uVar11;
int8 *puVar12;
ulong uVar13;
int1 auVar14 [16];
int1 auVar15 [16];
lVar4 = events_stages_history_per_thread;
auVar3 = _DAT_001835e0;
auVar2 = _DAT_001835b0;
lVar9 = events_stages_history_per_thread * 0x68;
lVar10 = 0;
do {
lVar1 = *(long *)(global_thread_container + lVar10 * 8 + 0xa8);
if ((lVar1 != 0) && (0 < *(long *)(lVar1 + 0x50))) {
uVar11 = *(ulong *)(lVar1 + 0x48);
uVar8 = *(long *)(lVar1 + 0x50) * 0x1640 + uVar11;
do {
lVar1 = *(long *)(uVar11 + 0xcb0);
*(int4 *)(uVar11 + 0xcac) = 0;
*(int1 *)(uVar11 + 0xca8) = 0;
if (0 < lVar4) {
uVar6 = lVar9 + lVar1;
uVar7 = lVar1 + 0x68U;
if (lVar1 + 0x68U < uVar6) {
uVar7 = uVar6;
}
lVar5 = (uVar7 - 0x68) - lVar1;
uVar13 = (ulong)(lVar5 != 0);
uVar6 = (lVar5 - uVar13) / 0x68;
lVar5 = uVar13 + uVar6;
auVar14._8_4_ = (int)lVar5;
auVar14._0_8_ = lVar5;
auVar14._12_4_ = (int)((ulong)lVar5 >> 0x20);
puVar12 = (int8 *)(lVar1 + 0x98);
auVar14 = auVar14 ^ auVar3;
uVar7 = 0;
do {
auVar15._8_4_ = (int)uVar7;
auVar15._0_8_ = uVar7;
auVar15._12_4_ = (int)(uVar7 >> 0x20);
auVar15 = (auVar15 | auVar2) ^ auVar3;
if ((bool)(~(auVar14._4_4_ < auVar15._4_4_ ||
auVar14._0_4_ < auVar15._0_4_ && auVar15._4_4_ == auVar14._4_4_) & 1)) {
puVar12[-0xd] = 0;
}
if (auVar15._12_4_ <= auVar14._12_4_ &&
(auVar15._8_4_ <= auVar14._8_4_ || auVar15._12_4_ != auVar14._12_4_)) {
*puVar12 = 0;
}
uVar7 = uVar7 + 2;
puVar12 = puVar12 + 0x1a;
} while ((uVar13 + uVar6 + 2 & 0x7fffffffffffffe) != uVar7);
}
uVar11 = uVar11 + 0x1640;
} while (uVar11 < uVar8);
}
lVar10 = lVar10 + 1;
} while (lVar10 != 0x100);
return;
}
|
|
57,966
|
spdlog::details::os::fopen_s(_IO_FILE**, 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&)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/os-inl.h
|
SPDLOG_INLINE bool fopen_s(FILE **fp, const filename_t &filename, const filename_t &mode) {
#ifdef _WIN32
#ifdef SPDLOG_WCHAR_FILENAMES
*fp = ::_wfsopen((filename.c_str()), mode.c_str(), _SH_DENYNO);
#else
*fp = ::_fsopen((filename.c_str()), mode.c_str(), _SH_DENYNO);
#endif
#if defined(SPDLOG_PREVENT_CHILD_FD)
if (*fp != nullptr) {
auto file_handle = reinterpret_cast<HANDLE>(_get_osfhandle(::_fileno(*fp)));
if (!::SetHandleInformation(file_handle, HANDLE_FLAG_INHERIT, 0)) {
::fclose(*fp);
*fp = nullptr;
}
}
#endif
#else // unix
#if defined(SPDLOG_PREVENT_CHILD_FD)
const int mode_flag = mode == SPDLOG_FILENAME_T("ab") ? O_APPEND : O_TRUNC;
const int fd =
::open((filename.c_str()), O_CREAT | O_WRONLY | O_CLOEXEC | mode_flag, mode_t(0644));
if (fd == -1) {
return true;
}
*fp = ::fdopen(fd, mode.c_str());
if (*fp == nullptr) {
::close(fd);
}
#else
*fp = ::fopen((filename.c_str()), mode.c_str());
#endif
#endif
return *fp == nullptr;
}
|
O0
|
c
|
spdlog::details::os::fopen_s(_IO_FILE**, 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&):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x1acc0
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x1acc0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x14820
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movq 0x20(%rsp), %rax
cmpq $0x0, (%rax)
sete %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw (%rax,%rax)
|
_ZN6spdlog7details2os7fopen_sEPP8_IO_FILERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_18], rdx
mov rdi, [rsp+28h+var_10]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rsp+28h+var_20], rax
mov rdi, [rsp+28h+var_18]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+28h+var_20]
mov rsi, rax
call _fopen
mov rcx, rax
mov rax, [rsp+28h+var_8]
mov [rax], rcx
mov rax, [rsp+28h+var_8]
cmp qword ptr [rax], 0
setz al
and al, 1
add rsp, 28h
retn
|
bool spdlog::details::os::fopen_s(_QWORD *a1, long long a2, long long a3)
{
long long v3; // rax
long long v5; // [rsp+8h] [rbp-20h]
v5 = std::string::c_str(a2);
v3 = std::string::c_str(a3);
*a1 = fopen(v5, v3);
return *a1 == 0LL;
}
|
fopen_s:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0011acc0
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0011acc0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
CALL 0x00114820
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0x20]
CMP qword ptr [RAX],0x0
SETZ AL
AND AL,0x1
ADD RSP,0x28
RET
|
/* spdlog::details::os::fopen_s(_IO_FILE**, std::__cxx11::string const&, std::__cxx11::string
const&) */
bool spdlog::details::os::fopen_s(_IO_FILE **param_1,string *param_2,string *param_3)
{
char *__filename;
char *__modes;
FILE *pFVar1;
__filename = (char *)std::__cxx11::string::c_str(param_2);
__modes = (char *)std::__cxx11::string::c_str(param_3);
pFVar1 = fopen(__filename,__modes);
*param_1 = pFVar1;
return *param_1 == (_IO_FILE *)0x0;
}
|
|
57,967
|
R3D_CreateLight
|
r3d/src/r3d_lighting.c
|
R3D_Light R3D_CreateLight(R3D_LightType type)
{
R3D_Light id = r3d_registry_add(&R3D.container.rLights, NULL);
r3d_light_t* light = r3d_registry_get(&R3D.container.rLights, id);
r3d_light_init(light);
light->type = type;
// Set default shadow map config
light->shadow.updateConf.mode = R3D_SHADOW_UPDATE_INTERVAL;
light->shadow.updateConf.frequencySec = 0.016f;
light->shadow.updateConf.timerSec = 0.0f;
light->shadow.updateConf.shoudlUpdate = true;
// Set default shadow bias
switch (type) {
case R3D_LIGHT_DIR:
case R3D_LIGHT_SPOT:
light->shadow.bias = 0.0002f;
break;
case R3D_LIGHT_OMNI:
light->shadow.bias = 0.05f;
break;
}
return id;
}
|
O3
|
c
|
R3D_CreateLight:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x0, -0x30(%rbp)
leaq 0xf292e(%rip), %r12 # 0x1afc60
movq 0x150(%r12), %rsi
testq %rsi, %rsi
je 0xbd372
decq %rsi
movq %rsi, 0x150(%r12)
movq 0x160(%r12), %rdx
imulq %rdx, %rsi
addq 0x148(%r12), %rsi
leaq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x82d0
movl (%r14), %r14d
jmp 0xbd520
movq 0x110(%r12), %rdi
movq 0x118(%r12), %rcx
cmpq %rcx, %rdi
jae 0xbd394
movq 0x108(%r12), %rax
jmp 0xbd41e
leaq 0x1(%rdi), %r14
testq %rdi, %r14
je 0xbd3dd
movq %rdi, %rax
shrq %rax
orq %rdi, %rax
movq %rax, %rdx
shrq $0x2, %rdx
orq %rax, %rdx
movq %rdx, %rax
shrq $0x4, %rax
orq %rdx, %rax
movq %rax, %rdx
shrq $0x8, %rdx
orq %rax, %rdx
movq %rdx, %rax
shrq $0x10, %rax
orq %rdx, %rax
movq %rax, %r14
shrq $0x20, %r14
orq %rax, %r14
incq %r14
jmp 0xbd3e0
addq %r14, %r14
movq 0x108(%r12), %rax
cmpq %r14, %rcx
jae 0xbd41e
movq 0x120(%r12), %rsi
imulq %r14, %rsi
movq %rax, %rdi
callq 0x86b0
testq %rax, %rax
je 0xbd43c
movq %rax, 0x108(%r12)
movq %r14, 0x118(%r12)
movq 0x110(%r12), %rdi
movq 0x120(%r12), %rdx
imulq %rdx, %rdi
addq %rax, %rdi
xorl %esi, %esi
callq 0x81f0
incq 0x110(%r12)
movb $0x1, -0x29(%rbp)
movq 0x130(%r12), %rdi
movq 0x138(%r12), %rcx
cmpq %rcx, %rdi
jae 0xbd462
movq 0x128(%r12), %rax
jmp 0xbd4ec
leaq 0x1(%rdi), %r14
testq %rdi, %r14
je 0xbd4ab
movq %rdi, %rax
shrq %rax
orq %rdi, %rax
movq %rax, %rdx
shrq $0x2, %rdx
orq %rax, %rdx
movq %rdx, %rax
shrq $0x4, %rax
orq %rdx, %rax
movq %rax, %rdx
shrq $0x8, %rdx
orq %rax, %rdx
movq %rdx, %rax
shrq $0x10, %rax
orq %rdx, %rax
movq %rax, %r14
shrq $0x20, %r14
orq %rax, %r14
incq %r14
jmp 0xbd4ae
addq %r14, %r14
movq 0x128(%r12), %rax
cmpq %r14, %rcx
jae 0xbd4ec
movq 0x140(%r12), %rsi
imulq %r14, %rsi
movq %rax, %rdi
callq 0x86b0
testq %rax, %rax
je 0xbd50c
movq %rax, 0x128(%r12)
movq %r14, 0x138(%r12)
movq 0x130(%r12), %rdi
movq 0x140(%r12), %rdx
imulq %rdx, %rdi
addq %rax, %rdi
leaq -0x29(%rbp), %rsi
callq 0x82d0
incq 0x130(%r12)
movl 0x168(%r12), %r14d
leal 0x1(%r14), %eax
movl %eax, 0x168(%r12)
leal -0x1(%r14), %r13d
movq 0x120(%r12), %rdi
imulq %r13, %rdi
addq 0x108(%r12), %rdi
xorl %r15d, %r15d
cmpq %r13, 0x110(%r12)
movq 0x170(%r12), %rdx
cmovbeq %r15, %rdi
xorl %esi, %esi
callq 0x81f0
movl %r14d, %eax
movq 0x128(%r12), %rcx
movb $0x1, (%rcx,%r13)
addl $-0x1, %eax
jae 0xbd598
cmpl %r14d, 0x168(%r12)
jbe 0xbd598
movq 0x120(%r12), %rax
imulq %r13, %rax
addq 0x108(%r12), %rax
xorl %r15d, %r15d
cmpq %r13, 0x110(%r12)
cmovaq %rax, %r15
movq %r15, %rdi
callq 0xe03b4
movl %ebx, 0xb0(%r15)
movl $0x1, (%r15)
movq $0x3c83126f, 0x4(%r15) # imm = 0x3C83126F
movb $0x1, 0xc(%r15)
cmpl $0x2, %ebx
ja 0xbd5d4
movl %ebx, %eax
leaq 0x5c79f(%rip), %rcx # 0x119d68
movss (%rcx,%rax,4), %xmm0
movss %xmm0, 0x60(%r15)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
R3D_CreateLight:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, edi
mov [rbp+var_30], 0
lea r12, R3D
mov rsi, [r12+150h]
test rsi, rsi
jz short loc_BD372
dec rsi
mov [r12+150h], rsi
mov rdx, [r12+160h]
imul rsi, rdx
add rsi, [r12+148h]
lea r14, [rbp+var_30]
mov rdi, r14
call _memcpy
mov r14d, [r14]
jmp loc_BD520
loc_BD372:
mov rdi, [r12+110h]
mov rcx, [r12+118h]
cmp rdi, rcx
jnb short loc_BD394
mov rax, [r12+108h]
jmp loc_BD41E
loc_BD394:
lea r14, [rdi+1]
test r14, rdi
jz short loc_BD3DD
mov rax, rdi
shr rax, 1
or rax, rdi
mov rdx, rax
shr rdx, 2
or rdx, rax
mov rax, rdx
shr rax, 4
or rax, rdx
mov rdx, rax
shr rdx, 8
or rdx, rax
mov rax, rdx
shr rax, 10h
or rax, rdx
mov r14, rax
shr r14, 20h
or r14, rax
inc r14
jmp short loc_BD3E0
loc_BD3DD:
add r14, r14
loc_BD3E0:
mov rax, [r12+108h]
cmp rcx, r14
jnb short loc_BD41E
mov rsi, [r12+120h]
imul rsi, r14
mov rdi, rax
call _realloc
test rax, rax
jz short loc_BD43C
mov [r12+108h], rax
mov [r12+118h], r14
mov rdi, [r12+110h]
loc_BD41E:
mov rdx, [r12+120h]
imul rdi, rdx
add rdi, rax
xor esi, esi
call _memset
inc qword ptr [r12+110h]
loc_BD43C:
mov [rbp+var_29], 1
mov rdi, [r12+130h]
mov rcx, [r12+138h]
cmp rdi, rcx
jnb short loc_BD462
mov rax, [r12+128h]
jmp loc_BD4EC
loc_BD462:
lea r14, [rdi+1]
test r14, rdi
jz short loc_BD4AB
mov rax, rdi
shr rax, 1
or rax, rdi
mov rdx, rax
shr rdx, 2
or rdx, rax
mov rax, rdx
shr rax, 4
or rax, rdx
mov rdx, rax
shr rdx, 8
or rdx, rax
mov rax, rdx
shr rax, 10h
or rax, rdx
mov r14, rax
shr r14, 20h
or r14, rax
inc r14
jmp short loc_BD4AE
loc_BD4AB:
add r14, r14
loc_BD4AE:
mov rax, [r12+128h]
cmp rcx, r14
jnb short loc_BD4EC
mov rsi, [r12+140h]
imul rsi, r14
mov rdi, rax
call _realloc
test rax, rax
jz short loc_BD50C
mov [r12+128h], rax
mov [r12+138h], r14
mov rdi, [r12+130h]
loc_BD4EC:
mov rdx, [r12+140h]
imul rdi, rdx
add rdi, rax
lea rsi, [rbp+var_29]
call _memcpy
inc qword ptr [r12+130h]
loc_BD50C:
mov r14d, [r12+168h]
lea eax, [r14+1]
mov [r12+168h], eax
loc_BD520:
lea r13d, [r14-1]
mov rdi, [r12+120h]
imul rdi, r13
add rdi, [r12+108h]
xor r15d, r15d
cmp [r12+110h], r13
mov rdx, [r12+170h]
cmovbe rdi, r15
xor esi, esi
call _memset
mov eax, r14d
mov rcx, [r12+128h]
mov byte ptr [rcx+r13], 1
add eax, 0FFFFFFFFh
jnb short loc_BD598
cmp [r12+168h], r14d
jbe short loc_BD598
mov rax, [r12+120h]
imul rax, r13
add rax, [r12+108h]
xor r15d, r15d
cmp [r12+110h], r13
cmova r15, rax
loc_BD598:
mov rdi, r15
call r3d_light_init
mov [r15+0B0h], ebx
mov dword ptr [r15], 1
mov qword ptr [r15+4], 3C83126Fh
mov byte ptr [r15+0Ch], 1
cmp ebx, 2
ja short loc_BD5D4
mov eax, ebx
lea rcx, unk_119D68
movss xmm0, dword ptr [rcx+rax*4]
movss dword ptr [r15+60h], xmm0
loc_BD5D4:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long R3D_CreateLight(unsigned int a1)
{
long long v1; // rax
long long v3; // rsi
long long v4; // rsi
unsigned int v5; // r14d
unsigned long long v6; // rdi
unsigned long long v7; // rcx
long long v8; // rax
unsigned long long v9; // rax
unsigned long long v10; // r14
unsigned long long v11; // rdi
unsigned long long v12; // rcx
long long v13; // rax
unsigned long long v14; // rax
unsigned long long v15; // r14
unsigned long long v16; // r13
long long v17; // rdi
long long v18; // r15
unsigned int v20; // [rsp+0h] [rbp-30h] BYREF
int v21; // [rsp+4h] [rbp-2Ch] BYREF
v21 = HIDWORD(v1);
v20 = 0;
v3 = *((_QWORD *)&R3D + 42);
if ( v3 )
{
v4 = v3 - 1;
*((_QWORD *)&R3D + 42) = v4;
memcpy(&v20, *((_QWORD *)&R3D + 41) + *((_QWORD *)&R3D + 44) * v4, *((_QWORD *)&R3D + 44));
v5 = v20;
goto LABEL_22;
}
v6 = *((_QWORD *)&R3D + 34);
v7 = *((_QWORD *)&R3D + 35);
if ( v6 >= v7 )
{
if ( (v6 & (v6 + 1)) != 0 )
{
v9 = v6 | (v6 >> 1) | ((v6 | (v6 >> 1)) >> 2) | ((v6 | (v6 >> 1) | ((v6 | (v6 >> 1)) >> 2)) >> 4) | ((v6 | (v6 >> 1) | ((v6 | (v6 >> 1)) >> 2) | ((v6 | (v6 >> 1) | ((v6 | (v6 >> 1)) >> 2)) >> 4)) >> 8) | ((v6 | (v6 >> 1) | ((v6 | (v6 >> 1)) >> 2) | ((v6 | (v6 >> 1) | ((v6 | (v6 >> 1)) >> 2)) >> 4) | ((v6 | (v6 >> 1) | ((v6 | (v6 >> 1)) >> 2) | ((v6 | (v6 >> 1) | ((v6 | (v6 >> 1)) >> 2)) >> 4)) >> 8)) >> 16);
v10 = (v9 | HIDWORD(v9)) + 1;
}
else
{
v10 = 2 * (v6 + 1);
}
v8 = *((_QWORD *)&R3D + 33);
if ( v7 < v10 )
{
v8 = realloc(*((_QWORD *)&R3D + 33), v10 * *((_QWORD *)&R3D + 36));
if ( !v8 )
goto LABEL_12;
*((_QWORD *)&R3D + 33) = v8;
*((_QWORD *)&R3D + 35) = v10;
v6 = *((_QWORD *)&R3D + 34);
}
}
else
{
v8 = *((_QWORD *)&R3D + 33);
}
memset(v8 + *((_QWORD *)&R3D + 36) * v6, 0LL, *((_QWORD *)&R3D + 36));
++*((_QWORD *)&R3D + 34);
LABEL_12:
HIBYTE(v21) = 1;
v11 = *((_QWORD *)&R3D + 38);
v12 = *((_QWORD *)&R3D + 39);
if ( v11 < v12 )
{
v13 = *((_QWORD *)&R3D + 37);
LABEL_20:
memcpy(v13 + *((_QWORD *)&R3D + 40) * v11, (char *)&v21 + 3, *((_QWORD *)&R3D + 40));
++*((_QWORD *)&R3D + 38);
goto LABEL_21;
}
if ( (v11 & (v11 + 1)) != 0 )
{
v14 = v11 | (v11 >> 1) | ((v11 | (v11 >> 1)) >> 2) | ((v11 | (v11 >> 1) | ((v11 | (v11 >> 1)) >> 2)) >> 4) | ((v11 | (v11 >> 1) | ((v11 | (v11 >> 1)) >> 2) | ((v11 | (v11 >> 1) | ((v11 | (v11 >> 1)) >> 2)) >> 4)) >> 8) | ((v11 | (v11 >> 1) | ((v11 | (v11 >> 1)) >> 2) | ((v11 | (v11 >> 1) | ((v11 | (v11 >> 1)) >> 2)) >> 4) | ((v11 | (v11 >> 1) | ((v11 | (v11 >> 1)) >> 2) | ((v11 | (v11 >> 1) | ((v11 | (v11 >> 1)) >> 2)) >> 4)) >> 8)) >> 16);
v15 = (v14 | HIDWORD(v14)) + 1;
}
else
{
v15 = 2 * (v11 + 1);
}
v13 = *((_QWORD *)&R3D + 37);
if ( v12 >= v15 )
goto LABEL_20;
v13 = realloc(*((_QWORD *)&R3D + 37), v15 * *((_QWORD *)&R3D + 40));
if ( v13 )
{
*((_QWORD *)&R3D + 37) = v13;
*((_QWORD *)&R3D + 39) = v15;
v11 = *((_QWORD *)&R3D + 38);
goto LABEL_20;
}
LABEL_21:
v5 = *((_DWORD *)&R3D + 90);
*((_DWORD *)&R3D + 90) = v5 + 1;
LABEL_22:
v16 = v5 - 1;
v17 = *((_QWORD *)&R3D + 33) + v16 * *((_QWORD *)&R3D + 36);
v18 = 0LL;
if ( *((_QWORD *)&R3D + 34) <= v16 )
v17 = 0LL;
memset(v17, 0LL, *((_QWORD *)&R3D + 46));
*(_BYTE *)(*((_QWORD *)&R3D + 37) + v16) = 1;
if ( v5 )
{
if ( *((_DWORD *)&R3D + 90) > v5 )
{
v18 = 0LL;
if ( *((_QWORD *)&R3D + 34) > v16 )
v18 = *((_QWORD *)&R3D + 33) + v16 * *((_QWORD *)&R3D + 36);
}
}
r3d_light_init(v18);
*(_DWORD *)(v18 + 176) = a1;
*(_DWORD *)v18 = 1;
*(_QWORD *)(v18 + 4) = 1015222895LL;
*(_BYTE *)(v18 + 12) = 1;
if ( a1 <= 2 )
*(_DWORD *)(v18 + 96) = dword_119D68[a1];
return v5;
}
|
R3D_CreateLight:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,EDI
MOV dword ptr [RBP + -0x30],0x0
LEA R12,[0x2afc60]
MOV RSI,qword ptr [R12 + 0x150]
TEST RSI,RSI
JZ 0x001bd372
DEC RSI
MOV qword ptr [R12 + 0x150],RSI
MOV RDX,qword ptr [R12 + 0x160]
IMUL RSI,RDX
ADD RSI,qword ptr [R12 + 0x148]
LEA R14,[RBP + -0x30]
MOV RDI,R14
CALL 0x001082d0
MOV R14D,dword ptr [R14]
JMP 0x001bd520
LAB_001bd372:
MOV RDI,qword ptr [R12 + 0x110]
MOV RCX,qword ptr [R12 + 0x118]
CMP RDI,RCX
JNC 0x001bd394
MOV RAX,qword ptr [R12 + 0x108]
JMP 0x001bd41e
LAB_001bd394:
LEA R14,[RDI + 0x1]
TEST R14,RDI
JZ 0x001bd3dd
MOV RAX,RDI
SHR RAX,0x1
OR RAX,RDI
MOV RDX,RAX
SHR RDX,0x2
OR RDX,RAX
MOV RAX,RDX
SHR RAX,0x4
OR RAX,RDX
MOV RDX,RAX
SHR RDX,0x8
OR RDX,RAX
MOV RAX,RDX
SHR RAX,0x10
OR RAX,RDX
MOV R14,RAX
SHR R14,0x20
OR R14,RAX
INC R14
JMP 0x001bd3e0
LAB_001bd3dd:
ADD R14,R14
LAB_001bd3e0:
MOV RAX,qword ptr [R12 + 0x108]
CMP RCX,R14
JNC 0x001bd41e
MOV RSI,qword ptr [R12 + 0x120]
IMUL RSI,R14
MOV RDI,RAX
CALL 0x001086b0
TEST RAX,RAX
JZ 0x001bd43c
MOV qword ptr [R12 + 0x108],RAX
MOV qword ptr [R12 + 0x118],R14
MOV RDI,qword ptr [R12 + 0x110]
LAB_001bd41e:
MOV RDX,qword ptr [R12 + 0x120]
IMUL RDI,RDX
ADD RDI,RAX
XOR ESI,ESI
CALL 0x001081f0
INC qword ptr [R12 + 0x110]
LAB_001bd43c:
MOV byte ptr [RBP + -0x29],0x1
MOV RDI,qword ptr [R12 + 0x130]
MOV RCX,qword ptr [R12 + 0x138]
CMP RDI,RCX
JNC 0x001bd462
MOV RAX,qword ptr [R12 + 0x128]
JMP 0x001bd4ec
LAB_001bd462:
LEA R14,[RDI + 0x1]
TEST R14,RDI
JZ 0x001bd4ab
MOV RAX,RDI
SHR RAX,0x1
OR RAX,RDI
MOV RDX,RAX
SHR RDX,0x2
OR RDX,RAX
MOV RAX,RDX
SHR RAX,0x4
OR RAX,RDX
MOV RDX,RAX
SHR RDX,0x8
OR RDX,RAX
MOV RAX,RDX
SHR RAX,0x10
OR RAX,RDX
MOV R14,RAX
SHR R14,0x20
OR R14,RAX
INC R14
JMP 0x001bd4ae
LAB_001bd4ab:
ADD R14,R14
LAB_001bd4ae:
MOV RAX,qword ptr [R12 + 0x128]
CMP RCX,R14
JNC 0x001bd4ec
MOV RSI,qword ptr [R12 + 0x140]
IMUL RSI,R14
MOV RDI,RAX
CALL 0x001086b0
TEST RAX,RAX
JZ 0x001bd50c
MOV qword ptr [R12 + 0x128],RAX
MOV qword ptr [R12 + 0x138],R14
MOV RDI,qword ptr [R12 + 0x130]
LAB_001bd4ec:
MOV RDX,qword ptr [R12 + 0x140]
IMUL RDI,RDX
ADD RDI,RAX
LEA RSI,[RBP + -0x29]
CALL 0x001082d0
INC qword ptr [R12 + 0x130]
LAB_001bd50c:
MOV R14D,dword ptr [R12 + 0x168]
LEA EAX,[R14 + 0x1]
MOV dword ptr [R12 + 0x168],EAX
LAB_001bd520:
LEA R13D,[R14 + -0x1]
MOV RDI,qword ptr [R12 + 0x120]
IMUL RDI,R13
ADD RDI,qword ptr [R12 + 0x108]
XOR R15D,R15D
CMP qword ptr [R12 + 0x110],R13
MOV RDX,qword ptr [R12 + 0x170]
CMOVBE RDI,R15
XOR ESI,ESI
CALL 0x001081f0
MOV EAX,R14D
MOV RCX,qword ptr [R12 + 0x128]
MOV byte ptr [RCX + R13*0x1],0x1
ADD EAX,-0x1
JNC 0x001bd598
CMP dword ptr [R12 + 0x168],R14D
JBE 0x001bd598
MOV RAX,qword ptr [R12 + 0x120]
IMUL RAX,R13
ADD RAX,qword ptr [R12 + 0x108]
XOR R15D,R15D
CMP qword ptr [R12 + 0x110],R13
CMOVA R15,RAX
LAB_001bd598:
MOV RDI,R15
CALL 0x001e03b4
MOV dword ptr [R15 + 0xb0],EBX
MOV dword ptr [R15],0x1
MOV qword ptr [R15 + 0x4],0x3c83126f
MOV byte ptr [R15 + 0xc],0x1
CMP EBX,0x2
JA 0x001bd5d4
MOV EAX,EBX
LEA RCX,[0x219d68]
MOVSS XMM0,dword ptr [RCX + RAX*0x4]
MOVSS dword ptr [R15 + 0x60],XMM0
LAB_001bd5d4:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
uint R3D_CreateLight(uint param_1)
{
ulong in_RAX;
ulong uVar1;
void *pvVar2;
int4 *__s;
ulong uVar3;
uint uVar4;
int4 *puVar5;
int8 local_38;
local_38 = in_RAX & 0xffffffff00000000;
if (DAT_002afdb0 != 0) {
DAT_002afdb0 = DAT_002afdb0 + -1;
memcpy(&local_38,(void *)(DAT_002afdb0 * DAT_002afdc0 + DAT_002afda8),DAT_002afdc0);
uVar4 = (uint)local_38;
goto LAB_001bd520;
}
pvVar2 = DAT_002afd68;
uVar3 = DAT_002afd78;
if (DAT_002afd70 < DAT_002afd78) {
LAB_001bd41e:
DAT_002afd78 = uVar3;
DAT_002afd68 = pvVar2;
memset((void *)(DAT_002afd70 * DAT_002afd80 + (long)DAT_002afd68),0,DAT_002afd80);
DAT_002afd70 = DAT_002afd70 + 1;
}
else {
if ((DAT_002afd70 + 1 & DAT_002afd70) == 0) {
uVar1 = (DAT_002afd70 + 1) * 2;
}
else {
uVar1 = DAT_002afd70 >> 1 | DAT_002afd70;
uVar1 = uVar1 >> 2 | uVar1;
uVar1 = uVar1 >> 4 | uVar1;
uVar1 = uVar1 >> 8 | uVar1;
uVar1 = uVar1 >> 0x10 | uVar1;
uVar1 = (uVar1 >> 0x20 | uVar1) + 1;
}
if ((uVar1 <= DAT_002afd78) ||
(pvVar2 = realloc(DAT_002afd68,DAT_002afd80 * uVar1), uVar3 = uVar1, pvVar2 != (void *)0x0))
goto LAB_001bd41e;
}
local_38 = CONCAT17(1,(int7)local_38);
pvVar2 = DAT_002afd88;
uVar3 = DAT_002afd98;
if (DAT_002afd90 < DAT_002afd98) {
LAB_001bd4ec:
DAT_002afd98 = uVar3;
DAT_002afd88 = pvVar2;
memcpy((void *)(DAT_002afd90 * DAT_002afda0 + (long)DAT_002afd88),(void *)((long)&local_38 + 7),
DAT_002afda0);
DAT_002afd90 = DAT_002afd90 + 1;
}
else {
if ((DAT_002afd90 + 1 & DAT_002afd90) == 0) {
uVar1 = (DAT_002afd90 + 1) * 2;
}
else {
uVar1 = DAT_002afd90 >> 1 | DAT_002afd90;
uVar1 = uVar1 >> 2 | uVar1;
uVar1 = uVar1 >> 4 | uVar1;
uVar1 = uVar1 >> 8 | uVar1;
uVar1 = uVar1 >> 0x10 | uVar1;
uVar1 = (uVar1 >> 0x20 | uVar1) + 1;
}
if ((uVar1 <= DAT_002afd98) ||
(pvVar2 = realloc(DAT_002afd88,DAT_002afda0 * uVar1), uVar3 = uVar1, pvVar2 != (void *)0x0))
goto LAB_001bd4ec;
}
uVar4 = DAT_002afdc8;
DAT_002afdc8 = DAT_002afdc8 + 1;
LAB_001bd520:
uVar3 = (ulong)(uVar4 - 1);
puVar5 = (int4 *)0x0;
__s = (int4 *)(DAT_002afd80 * uVar3 + (long)DAT_002afd68);
if (DAT_002afd70 <= uVar3) {
__s = puVar5;
}
memset(__s,0,DAT_002afdd0);
*(int1 *)((long)DAT_002afd88 + uVar3) = 1;
if ((uVar4 != 0) && (uVar4 < DAT_002afdc8)) {
puVar5 = (int4 *)0x0;
if (uVar3 < DAT_002afd70) {
puVar5 = (int4 *)(DAT_002afd80 * uVar3 + (long)DAT_002afd68);
}
}
r3d_light_init(puVar5);
puVar5[0x2c] = param_1;
*puVar5 = 1;
*(int8 *)(puVar5 + 1) = 0x3c83126f;
*(int1 *)(puVar5 + 3) = 1;
if (param_1 < 3) {
puVar5[0x18] = *(int4 *)(&DAT_00219d68 + (ulong)param_1 * 4);
}
return uVar4;
}
|
|
57,968
|
find_sh
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSOSSignalHandler *find_sh(JSThreadState *ts, int sig_num)
{
JSOSSignalHandler *sh;
struct list_head *el;
list_for_each(el, &ts->os_signal_handlers) {
sh = list_entry(el, JSOSSignalHandler, link);
if (sh->sig_num == sig_num)
return sh;
}
return NULL;
}
|
O2
|
c
|
find_sh:
movq %rdi, %rax
leaq 0x10(%rdi), %rcx
addq $0x18, %rax
movq (%rax), %rax
cmpq %rcx, %rax
je 0x19347
cmpl %esi, 0x10(%rax)
je 0x19349
addq $0x8, %rax
jmp 0x19334
xorl %eax, %eax
retq
|
find_sh:
mov rax, rdi
lea rcx, [rdi+10h]
add rax, 18h
loc_19334:
mov rax, [rax]
cmp rax, rcx
jz short loc_19347
cmp [rax+10h], esi
jz short locret_19349
add rax, 8
jmp short loc_19334
loc_19347:
xor eax, eax
locret_19349:
retn
|
long long find_sh(long long a1, int a2)
{
long long *i; // rax
long long result; // rax
for ( i = (long long *)(a1 + 24); ; i = (long long *)(result + 8) )
{
result = *i;
if ( result == a1 + 16 )
break;
if ( *(_DWORD *)(result + 16) == a2 )
return result;
}
return 0LL;
}
|
find_sh:
MOV RAX,RDI
LEA RCX,[RDI + 0x10]
ADD RAX,0x18
LAB_00119334:
MOV RAX,qword ptr [RAX]
CMP RAX,RCX
JZ 0x00119347
CMP dword ptr [RAX + 0x10],ESI
JZ 0x00119349
ADD RAX,0x8
JMP 0x00119334
LAB_00119347:
XOR EAX,EAX
LAB_00119349:
RET
|
long find_sh(long param_1,int param_2)
{
long lVar1;
long *plVar2;
plVar2 = (long *)(param_1 + 0x18);
while( true ) {
lVar1 = *plVar2;
if (lVar1 == param_1 + 0x10) {
return 0;
}
if (*(int *)(lVar1 + 0x10) == param_2) break;
plVar2 = (long *)(lVar1 + 8);
}
return lVar1;
}
|
|
57,969
|
wait_for_readers
|
eloqsql/storage/maria/ma_pagecache.c
|
static inline void wait_for_readers(PAGECACHE *pagecache
__attribute__((unused)),
PAGECACHE_BLOCK_LINK *block
__attribute__((unused)))
{
struct st_my_thread_var *thread= my_thread_var;
DBUG_ASSERT(block->condvar == NULL);
while (block->hash_link->requests)
{
DBUG_ENTER("wait_for_readers");
DBUG_PRINT("wait",
("suspend thread: %s %ld block: %u",
thread->name, (ulong) thread->id,
PCBLOCK_NUMBER(pagecache, block)));
block->condvar= &thread->suspend;
pagecache_pthread_cond_wait(&thread->suspend, &pagecache->cache_lock);
block->condvar= NULL;
DBUG_VOID_RETURN;
}
}
|
O3
|
c
|
wait_for_readers:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0xa2f56
movq 0x20(%rbx), %rcx
cmpl $0x0, 0x68(%rcx)
je 0x3ee57
movq %rax, %rcx
addq $0x8, %rax
movq %rax, 0x28(%rbx)
addq $0xc8, %r14
cmpq $0x0, 0x38(%rcx)
jne 0x3ee5c
movq %rax, %rdi
movq %r14, %rsi
callq 0x29420
movq $0x0, 0x28(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x9cc31(%rip), %rdx # 0xdba94
movq %rax, %rdi
movq %r14, %rsi
movl $0x64d, %ecx # imm = 0x64D
callq 0x2ee90
jmp 0x3ee4f
|
wait_for_readers:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
call _my_thread_var
mov rcx, [rbx+20h]
cmp dword ptr [rcx+68h], 0
jz short loc_3EE57
mov rcx, rax
add rax, 8
mov [rbx+28h], rax
add r14, 0C8h
cmp qword ptr [rcx+38h], 0
jnz short loc_3EE5C
mov rdi, rax
mov rsi, r14
call _pthread_cond_wait
loc_3EE4F:
mov qword ptr [rbx+28h], 0
loc_3EE57:
pop rbx
pop r14
pop rbp
retn
loc_3EE5C:
lea rdx, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rax
mov rsi, r14
mov ecx, 64Dh
call psi_cond_wait
jmp short loc_3EE4F
|
long long wait_for_readers(long long a1, long long a2)
{
long long result; // rax
long long v3; // rcx
long long v4; // rax
long long v5; // r14
result = my_thread_var(a1);
if ( *(_DWORD *)(*(_QWORD *)(a2 + 32) + 104LL) )
{
v3 = result;
v4 = result + 8;
*(_QWORD *)(a2 + 40) = v4;
v5 = a1 + 200;
if ( *(_QWORD *)(v3 + 56) )
result = psi_cond_wait(
v4,
v5,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0x64Du);
else
result = pthread_cond_wait(v4, v5);
*(_QWORD *)(a2 + 40) = 0LL;
}
return result;
}
|
wait_for_readers:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
CALL 0x001a2f56
MOV RCX,qword ptr [RBX + 0x20]
CMP dword ptr [RCX + 0x68],0x0
JZ 0x0013ee57
MOV RCX,RAX
ADD RAX,0x8
MOV qword ptr [RBX + 0x28],RAX
ADD R14,0xc8
CMP qword ptr [RCX + 0x38],0x0
JNZ 0x0013ee5c
MOV RDI,RAX
MOV RSI,R14
CALL 0x00129420
LAB_0013ee4f:
MOV qword ptr [RBX + 0x28],0x0
LAB_0013ee57:
POP RBX
POP R14
POP RBP
RET
LAB_0013ee5c:
LEA RDX,[0x1dba94]
MOV RDI,RAX
MOV RSI,R14
MOV ECX,0x64d
CALL 0x0012ee90
JMP 0x0013ee4f
|
void wait_for_readers(long param_1,long param_2)
{
long lVar1;
pthread_cond_t *__cond;
lVar1 = _my_thread_var();
if (*(int *)(*(long *)(param_2 + 0x20) + 0x68) != 0) {
__cond = (pthread_cond_t *)(lVar1 + 8);
*(pthread_cond_t **)(param_2 + 0x28) = __cond;
if (*(long *)(lVar1 + 0x38) == 0) {
pthread_cond_wait(__cond,(pthread_mutex_t *)(param_1 + 200));
}
else {
psi_cond_wait(__cond,(pthread_mutex_t *)(param_1 + 200),
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0x64d);
}
*(int8 *)(param_2 + 0x28) = 0;
}
return;
}
|
|
57,970
|
my_thread_init_common_mutex
|
eloqsql/mysys/my_thr_init.c
|
static void my_thread_init_common_mutex(void)
{
mysql_mutex_init(key_THR_LOCK_open, &THR_LOCK_open, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_lock, &THR_LOCK_lock, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_myisam, &THR_LOCK_myisam, MY_MUTEX_INIT_SLOW);
mysql_mutex_init(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_heap, &THR_LOCK_heap, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_net, &THR_LOCK_net, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_charset, &THR_LOCK_charset, MY_MUTEX_INIT_FAST);
#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
mysql_mutex_init(key_LOCK_localtime_r, &LOCK_localtime_r, MY_MUTEX_INIT_SLOW);
#endif
}
|
O0
|
c
|
my_thread_init_common_mutex:
pushq %rbp
movq %rsp, %rbp
leaq 0x11e4c4d(%rip), %rax # 0x1e024b8
movl (%rax), %edi
leaq 0x11e562c(%rip), %rsi # 0x1e02ea0
leaq 0x11e5a75(%rip), %rdx # 0x1e032f0
callq 0xc1e570
leaq 0x11e4c1d(%rip), %rax # 0x1e024a4
movl (%rax), %edi
leaq 0x11e5658(%rip), %rsi # 0x1e02ee8
leaq 0x11e5a59(%rip), %rdx # 0x1e032f0
callq 0xc1e570
leaq 0x11e4c0d(%rip), %rax # 0x1e024b0
movl (%rax), %edi
leaq 0x11e5684(%rip), %rsi # 0x1e02f30
xorl %eax, %eax
movl %eax, %edx
callq 0xc1e570
leaq 0x11e4c08(%rip), %rax # 0x1e024c4
movl (%rax), %edi
leaq 0x11e56b3(%rip), %rsi # 0x1e02f78
leaq 0x11e5a24(%rip), %rdx # 0x1e032f0
callq 0xc1e570
leaq 0x11e4bc8(%rip), %rax # 0x1e024a0
movl (%rax), %edi
leaq 0x11e56df(%rip), %rsi # 0x1e02fc0
leaq 0x11e5a08(%rip), %rdx # 0x1e032f0
callq 0xc1e570
leaq 0x11e4bc0(%rip), %rax # 0x1e024b4
movl (%rax), %edi
leaq 0x11e570b(%rip), %rsi # 0x1e03008
leaq 0x11e59ec(%rip), %rdx # 0x1e032f0
callq 0xc1e570
leaq 0x11e4b8c(%rip), %rax # 0x1e0249c
movl (%rax), %edi
leaq 0x11e5737(%rip), %rsi # 0x1e03050
leaq 0x11e59d0(%rip), %rdx # 0x1e032f0
callq 0xc1e570
popq %rbp
retq
nopw (%rax,%rax)
|
my_thread_init_common_mutex:
push rbp
mov rbp, rsp
lea rax, key_THR_LOCK_open
mov edi, [rax]
lea rsi, THR_LOCK_open
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_15
lea rax, key_THR_LOCK_lock
mov edi, [rax]
lea rsi, THR_LOCK_lock
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_15
lea rax, key_THR_LOCK_myisam
mov edi, [rax]
lea rsi, THR_LOCK_myisam
xor eax, eax
mov edx, eax
call inline_mysql_mutex_init_15
lea rax, key_THR_LOCK_myisam_mmap
mov edi, [rax]
lea rsi, THR_LOCK_myisam_mmap
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_15
lea rax, key_THR_LOCK_heap
mov edi, [rax]
lea rsi, THR_LOCK_heap
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_15
lea rax, key_THR_LOCK_net
mov edi, [rax]
lea rsi, THR_LOCK_net
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_15
lea rax, key_THR_LOCK_charset
mov edi, [rax]
lea rsi, THR_LOCK_charset
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_15
pop rbp
retn
|
long long my_thread_init_common_mutex()
{
inline_mysql_mutex_init_15(key_THR_LOCK_open, &THR_LOCK_open, &my_fast_mutexattr);
inline_mysql_mutex_init_15(key_THR_LOCK_lock, &THR_LOCK_lock, &my_fast_mutexattr);
inline_mysql_mutex_init_15(key_THR_LOCK_myisam, &THR_LOCK_myisam, 0LL);
inline_mysql_mutex_init_15(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, &my_fast_mutexattr);
inline_mysql_mutex_init_15(key_THR_LOCK_heap, &THR_LOCK_heap, &my_fast_mutexattr);
inline_mysql_mutex_init_15(key_THR_LOCK_net, &THR_LOCK_net, &my_fast_mutexattr);
return inline_mysql_mutex_init_15(key_THR_LOCK_charset, &THR_LOCK_charset, &my_fast_mutexattr);
}
|
translog_wait_for_buffer_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x100010]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x100038]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV AL,byte ptr [RAX + 0x1000d9]
MOV byte ptr [RBP + -0x19],AL
JMP 0x00c1d899
LAB_00c1d899:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00c1a8a0
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x100010]
JNZ 0x00c1d8d7
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x100038]
JNZ 0x00c1d8d7
MOVZX EAX,byte ptr [RBP + -0x19]
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x1000d9]
CMP EAX,ECX
JZ 0x00c1d8db
LAB_00c1d8d7:
JMP 0x00c1d8d9
LAB_00c1d8d9:
JMP 0x00c1d922
LAB_00c1d8db:
JMP 0x00c1d8dd
LAB_00c1d8dd:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x100038],0x0
JZ 0x00c1d91a
JMP 0x00c1d8ed
LAB_00c1d8ed:
JMP 0x00c1d8ef
LAB_00c1d8ef:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x100040
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x100090
LEA RDX,[0xed033d]
MOV ECX,0x832
CALL 0x00c11a20
JMP 0x00c1d918
LAB_00c1d918:
JMP 0x00c1d8dd
LAB_00c1d91a:
JMP 0x00c1d91c
LAB_00c1d91c:
JMP 0x00c1d91e
LAB_00c1d91e:
JMP 0x00c1d920
LAB_00c1d920:
JMP 0x00c1d922
LAB_00c1d922:
ADD RSP,0x20
POP RBP
RET
|
void translog_wait_for_buffer_free(long param_1)
{
char cVar1;
long lVar2;
long lVar3;
lVar2 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7);
lVar3 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f);
cVar1 = *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1);
translog_wait_for_writers(param_1);
if (((lVar2 == *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7)) &&
(lVar3 == *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f))) &&
(cVar1 == *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1))) {
while (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) != 0) {
inline_mysql_cond_wait
((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1,param_1 + 0x100090,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x832);
}
}
return;
}
|
|
57,971
|
int10_to_str
|
eloqsql/strings/int2str.c
|
char *int10_to_str(long int val,char *dst,int radix)
{
char buffer[65];
register char *p;
long int new_val;
unsigned long int uval = (unsigned long int) val;
if (radix < 0) /* -10 */
{
if (val < 0)
{
*dst++ = '-';
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (unsigned long int)0 - uval;
}
}
p = &buffer[sizeof(buffer)-1];
*p = '\0';
new_val= (long) (uval / 10);
*--p = '0'+ (char) (uval - (unsigned long) new_val * 10);
val = new_val;
while (val != 0)
{
new_val=val/10;
*--p = '0' + (char) (val-new_val*10);
val= new_val;
}
while ((*dst++ = *p++) != 0) ;
return dst-1;
}
|
O3
|
c
|
int10_to_str:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
testl %edx, %edx
setns %al
testq %rdi, %rdi
setns %cl
orb %al, %cl
jne 0xd5087
movb $0x2d, (%rsi)
incq %rsi
negq %rdi
leaq -0x11(%rbp), %r8
movabsq $-0x3333333333333333, %r9 # imm = 0xCCCCCCCCCCCCCCCD
movq %rdi, %rax
mulq %r9
movq %rdx, %rcx
movb $0x0, 0x1(%r8)
shrq $0x3, %rcx
imull $0xf6, %ecx, %eax
addl %edi, %eax
addb $0x30, %al
movb %al, (%r8)
cmpq $0xa, %rdi
jb 0xd50de
movq %rcx, %rax
mulq %r9
shrq $0x3, %rdx
imull $0xf6, %edx, %eax
addl %ecx, %eax
addb $0x30, %al
movb %al, -0x1(%r8)
decq %r8
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0xd50ba
decq %rsi
movb (%r8), %al
incq %r8
movb %al, 0x1(%rsi)
incq %rsi
testb %al, %al
jne 0xd50e1
movq %fs:0x28, %rax
cmpq -0x8(%rbp), %rax
jne 0xd5109
movq %rsi, %rax
addq $0x50, %rsp
popq %rbp
retq
callq 0x29260
nop
|
int10_to_str:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_8], rax
test edx, edx
setns al
test rdi, rdi
setns cl
or cl, al
jnz short loc_D5087
mov byte ptr [rsi], 2Dh ; '-'
inc rsi
neg rdi
loc_D5087:
lea r8, [rbp+var_11]
mov r9, 0CCCCCCCCCCCCCCCDh
mov rax, rdi
mul r9
mov rcx, rdx
mov byte ptr [r8+1], 0
shr rcx, 3
imul eax, ecx, 0F6h
add eax, edi
add al, 30h ; '0'
mov [r8], al
cmp rdi, 0Ah
jb short loc_D50DE
loc_D50BA:
mov rax, rcx
mul r9
shr rdx, 3
imul eax, edx, 0F6h
add eax, ecx
add al, 30h ; '0'
mov [r8-1], al
dec r8
cmp rcx, 9
mov rcx, rdx
ja short loc_D50BA
loc_D50DE:
dec rsi
loc_D50E1:
mov al, [r8]
inc r8
mov [rsi+1], al
inc rsi
test al, al
jnz short loc_D50E1
mov rax, fs:28h
cmp rax, [rbp+var_8]
jnz short loc_D5109
mov rax, rsi
add rsp, 50h
pop rbp
retn
loc_D5109:
call ___stack_chk_fail
|
_BYTE * int10_to_str(unsigned long long a1, _BYTE *a2, int a3)
{
char *v3; // r8
unsigned long long v4; // rcx
bool v5; // cc
_BYTE *v6; // rsi
char v7; // al
_BYTE v9[9]; // [rsp+3Fh] [rbp-11h] BYREF
unsigned long long v10; // [rsp+48h] [rbp-8h]
v10 = __readfsqword(0x28u);
if ( a3 < 0 && (a1 & 0x8000000000000000LL) != 0LL )
{
*a2++ = 45;
a1 = -(long long)a1;
}
v3 = v9;
v9[1] = 0;
v4 = a1 / 0xA;
v9[0] = a1 % 0xA + 48;
if ( a1 >= 0xA )
{
do
{
*--v3 = v4 % 0xA + 48;
v5 = v4 <= 9;
v4 /= 0xAuLL;
}
while ( !v5 );
}
v6 = a2 - 1;
do
{
v7 = *v3++;
*++v6 = v7;
}
while ( v7 );
return v6;
}
|
int10_to_str:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
TEST EDX,EDX
SETNS AL
TEST RDI,RDI
SETNS CL
OR CL,AL
JNZ 0x001d5087
MOV byte ptr [RSI],0x2d
INC RSI
NEG RDI
LAB_001d5087:
LEA R8,[RBP + -0x11]
MOV R9,-0x3333333333333333
MOV RAX,RDI
MUL R9
MOV RCX,RDX
MOV byte ptr [R8 + 0x1],0x0
SHR RCX,0x3
IMUL EAX,ECX,0xf6
ADD EAX,EDI
ADD AL,0x30
MOV byte ptr [R8],AL
CMP RDI,0xa
JC 0x001d50de
LAB_001d50ba:
MOV RAX,RCX
MUL R9
SHR RDX,0x3
IMUL EAX,EDX,0xf6
ADD EAX,ECX
ADD AL,0x30
MOV byte ptr [R8 + -0x1],AL
DEC R8
CMP RCX,0x9
MOV RCX,RDX
JA 0x001d50ba
LAB_001d50de:
DEC RSI
LAB_001d50e1:
MOV AL,byte ptr [R8]
INC R8
MOV byte ptr [RSI + 0x1],AL
INC RSI
TEST AL,AL
JNZ 0x001d50e1
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x8]
JNZ 0x001d5109
MOV RAX,RSI
ADD RSP,0x50
POP RBP
RET
LAB_001d5109:
CALL 0x00129260
|
int1 * int10_to_str(ulong param_1,int1 *param_2,int param_3)
{
char cVar1;
ulong uVar2;
ulong uVar3;
char *pcVar4;
long in_FS_OFFSET;
char local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if ((long)param_1 < 0 && param_3 < 0) {
*param_2 = 0x2d;
param_2 = param_2 + 1;
param_1 = -param_1;
}
pcVar4 = local_1a + 1;
local_1a[2] = 0;
local_1a[1] = (char)(param_1 / 10) * -10 + (char)param_1 + '0';
uVar3 = param_1 / 10;
while (uVar2 = uVar3, 9 < param_1) {
pcVar4[-1] = (char)(uVar2 / 10) * -10 + (char)uVar2 + '0';
pcVar4 = pcVar4 + -1;
uVar3 = uVar2 / 10;
param_1 = uVar2;
}
param_2 = param_2 + -1;
do {
cVar1 = *pcVar4;
pcVar4 = pcVar4 + 1;
param_2[1] = cVar1;
param_2 = param_2 + 1;
} while (cVar1 != '\0');
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_2;
}
|
|
57,972
|
nglog::(anonymous namespace)::PrettyDuration[abi:cxx11](std::chrono::duration<int, std::ratio<1l, 1l>> const&)
|
ng-log[P]ng-log/src/logging.cc
|
string PrettyDuration(const std::chrono::duration<int>& secs) {
std::stringstream result;
int mins = secs.count() / 60;
int hours = mins / 60;
mins = mins % 60;
int s = secs.count() % 60;
result.fill('0');
result << hours << ':' << setw(2) << mins << ':' << setw(2) << s;
return result.str();
}
|
O0
|
cpp
|
nglog::(anonymous namespace)::PrettyDuration[abi:cxx11](std::chrono::duration<int, std::ratio<1l, 1l>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp # imm = 0x220
movq %rdi, -0x1d0(%rbp)
movq %rdi, %rax
movq %rax, -0x1c8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x94f0
movq -0x10(%rbp), %rdi
callq 0x1bad0
movl %eax, -0x1c0(%rbp)
jmp 0x17221
movl -0x1c0(%rbp), %ecx
movslq %ecx, %rax
imulq $-0x77777777, %rax, %rax # imm = 0x88888889
shrq $0x20, %rax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x5, %eax
addl %ecx, %eax
movl %eax, -0x19c(%rbp)
movslq -0x19c(%rbp), %rax
movl %eax, %ecx
imulq $-0x77777777, %rax, %rax # imm = 0x88888889
shrq $0x20, %rax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x5, %eax
addl %ecx, %eax
movl %eax, -0x1b0(%rbp)
movslq -0x19c(%rbp), %rcx
movl %ecx, %eax
imulq $-0x77777777, %rcx, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x5, %ecx
addl %edx, %ecx
imull $0x3c, %ecx, %ecx
subl %ecx, %eax
movl %eax, -0x19c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1bad0
movl %eax, -0x1d4(%rbp)
jmp 0x172a9
movl -0x1d4(%rbp), %eax
movslq %eax, %rcx
imulq $-0x77777777, %rcx, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x5, %ecx
addl %edx, %ecx
imull $0x3c, %ecx, %ecx
subl %ecx, %eax
movl %eax, -0x1b4(%rbp)
movq -0x198(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x198(%rbp,%rax), %rdi
movl $0x30, %esi
callq 0x97b0
jmp 0x172f3
leaq -0x188(%rbp), %rdi
movl -0x1b0(%rbp), %esi
callq 0x9c90
movq %rax, -0x1e0(%rbp)
jmp 0x1730e
movq -0x1e0(%rbp), %rdi
movl $0x3a, %esi
callq 0x9860
movq %rax, -0x1e8(%rbp)
jmp 0x17328
movl $0x2, %edi
callq 0x19980
movl %eax, -0x1ec(%rbp)
jmp 0x1733a
movq -0x1e8(%rbp), %rdi
movl -0x1ec(%rbp), %eax
movl %eax, -0x1b8(%rbp)
movl -0x1b8(%rbp), %esi
callq 0x9840
movq %rax, -0x1f8(%rbp)
jmp 0x17361
movq -0x1f8(%rbp), %rdi
movl -0x19c(%rbp), %esi
callq 0x9c90
movq %rax, -0x200(%rbp)
jmp 0x1737c
movq -0x200(%rbp), %rdi
movl $0x3a, %esi
callq 0x9860
movq %rax, -0x208(%rbp)
jmp 0x17396
movl $0x2, %edi
callq 0x19980
movl %eax, -0x20c(%rbp)
jmp 0x173a8
movq -0x208(%rbp), %rdi
movl -0x20c(%rbp), %eax
movl %eax, -0x1bc(%rbp)
movl -0x1bc(%rbp), %esi
callq 0x9840
movq %rax, -0x218(%rbp)
jmp 0x173cf
movq -0x218(%rbp), %rdi
movl -0x1b4(%rbp), %esi
callq 0x9c90
jmp 0x173e3
movq -0x1d0(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x96b0
jmp 0x173f8
leaq -0x198(%rbp), %rdi
callq 0x9550
movq -0x1c8(%rbp), %rax
addq $0x220, %rsp # imm = 0x220
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x9550
movq -0x1a8(%rbp), %rdi
callq 0x9cc0
nop
|
_ZN5nglog12_GLOBAL__N_114PrettyDurationB5cxx11ERKNSt6chrono8durationIiSt5ratioILl1ELl1EEEE:
push rbp
mov rbp, rsp
sub rsp, 220h
mov [rbp+var_1D0], rdi
mov rax, rdi
mov [rbp+var_1C8], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rdi, [rbp+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
mov rdi, [rbp+var_10]
call _ZNKSt6chrono8durationIiSt5ratioILl1ELl1EEE5countEv; std::chrono::duration<int,std::ratio<1l,1l>>::count(void)
mov [rbp+var_1C0], eax
jmp short $+2
loc_17221:
mov ecx, [rbp+var_1C0]
movsxd rax, ecx
imul rax, 0FFFFFFFF88888889h
shr rax, 20h
add eax, ecx
mov ecx, eax
shr ecx, 1Fh
sar eax, 5
add eax, ecx
mov [rbp+var_19C], eax
movsxd rax, [rbp+var_19C]
mov ecx, eax
imul rax, 0FFFFFFFF88888889h
shr rax, 20h
add eax, ecx
mov ecx, eax
shr ecx, 1Fh
sar eax, 5
add eax, ecx
mov [rbp+var_1B0], eax
movsxd rcx, [rbp+var_19C]
mov eax, ecx
imul rcx, 0FFFFFFFF88888889h
shr rcx, 20h
add ecx, eax
mov edx, ecx
shr edx, 1Fh
sar ecx, 5
add ecx, edx
imul ecx, 3Ch ; '<'
sub eax, ecx
mov [rbp+var_19C], eax
mov rdi, [rbp+var_10]
call _ZNKSt6chrono8durationIiSt5ratioILl1ELl1EEE5countEv; std::chrono::duration<int,std::ratio<1l,1l>>::count(void)
mov [rbp+var_1D4], eax
jmp short $+2
loc_172A9:
mov eax, [rbp+var_1D4]
movsxd rcx, eax
imul rcx, 0FFFFFFFF88888889h
shr rcx, 20h
add ecx, eax
mov edx, ecx
shr edx, 1Fh
sar ecx, 5
add ecx, edx
imul ecx, 3Ch ; '<'
sub eax, ecx
mov [rbp+var_1B4], eax
mov rax, [rbp+var_198]
mov rax, [rax-18h]
lea rdi, [rbp+rax+var_198]
mov esi, 30h ; '0'
call __ZNSt9basic_iosIcSt11char_traitsIcEE4fillEc; std::ios::fill(char)
jmp short $+2
loc_172F3:
lea rdi, [rbp+var_188]
mov esi, [rbp+var_1B0]
call __ZNSolsEi; std::ostream::operator<<(int)
mov [rbp+var_1E0], rax
jmp short $+2
loc_1730E:
mov rdi, [rbp+var_1E0]
mov esi, 3Ah ; ':'
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov [rbp+var_1E8], rax
jmp short $+2
loc_17328:
mov edi, 2; int
call _ZSt4setwi; std::setw(int)
mov [rbp+var_1EC], eax
jmp short $+2
loc_1733A:
mov rdi, [rbp+var_1E8]
mov eax, [rbp+var_1EC]
mov [rbp+var_1B8], eax
mov esi, [rbp+var_1B8]
call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw)
mov [rbp+var_1F8], rax
jmp short $+2
loc_17361:
mov rdi, [rbp+var_1F8]
mov esi, [rbp+var_19C]
call __ZNSolsEi; std::ostream::operator<<(int)
mov [rbp+var_200], rax
jmp short $+2
loc_1737C:
mov rdi, [rbp+var_200]
mov esi, 3Ah ; ':'
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov [rbp+var_208], rax
jmp short $+2
loc_17396:
mov edi, 2; int
call _ZSt4setwi; std::setw(int)
mov [rbp+var_20C], eax
jmp short $+2
loc_173A8:
mov rdi, [rbp+var_208]
mov eax, [rbp+var_20C]
mov [rbp+var_1BC], eax
mov esi, [rbp+var_1BC]
call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw)
mov [rbp+var_218], rax
jmp short $+2
loc_173CF:
mov rdi, [rbp+var_218]
mov esi, [rbp+var_1B4]
call __ZNSolsEi; std::ostream::operator<<(int)
jmp short $+2
loc_173E3:
mov rdi, [rbp+var_1D0]
lea rsi, [rbp+var_198]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_173F8:
lea rdi, [rbp+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rax, [rbp+var_1C8]
add rsp, 220h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_1A8], rcx
mov [rbp+var_1AC], eax
lea rdi, [rbp+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rdi, [rbp+var_1A8]
call __Unwind_Resume
|
long long nglog::`anonymous namespace'::PrettyDuration[abi:cxx11](long long a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-218h]
long long v4; // [rsp+18h] [rbp-208h]
long long v5; // [rsp+20h] [rbp-200h]
long long v6; // [rsp+28h] [rbp-1F8h]
long long v7; // [rsp+38h] [rbp-1E8h]
long long v8; // [rsp+40h] [rbp-1E0h]
int v9; // [rsp+60h] [rbp-1C0h]
unsigned int v10; // [rsp+64h] [rbp-1BCh]
unsigned int v11; // [rsp+68h] [rbp-1B8h]
unsigned int v12; // [rsp+6Ch] [rbp-1B4h]
_QWORD v13[2]; // [rsp+88h] [rbp-198h] BYREF
_BYTE v14[376]; // [rsp+98h] [rbp-188h] BYREF
long long v15; // [rsp+210h] [rbp-10h]
long long v16; // [rsp+218h] [rbp-8h]
v16 = a1;
v15 = a2;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v13);
v9 = std::chrono::duration<int,std::ratio<1l,1l>>::count(v15);
v12 = (int)std::chrono::duration<int,std::ratio<1l,1l>>::count(v15) % 60;
std::ios::fill((char *)v13 + *(_QWORD *)(v13[0] - 24LL), 48LL);
v8 = std::ostream::operator<<(v14, (unsigned int)(v9 / 60 / 60));
v7 = std::operator<<<std::char_traits<char>>(v8, 58LL);
v11 = std::setw(2);
v6 = std::operator<<<char,std::char_traits<char>>(v7, v11);
v5 = std::ostream::operator<<(v6, (unsigned int)(v9 / 60 % 60));
v4 = std::operator<<<std::char_traits<char>>(v5, 58LL);
v10 = std::setw(2);
v3 = std::operator<<<char,std::char_traits<char>>(v4, v10);
std::ostream::operator<<(v3, v12);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v13);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v13);
return a1;
}
|
PrettyDuration[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x220
MOV qword ptr [RBP + -0x1d0],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x1c8],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RDI,[RBP + -0x198]
CALL 0x001094f0
MOV RDI,qword ptr [RBP + -0x10]
LAB_00117214:
CALL 0x0011bad0
MOV dword ptr [RBP + -0x1c0],EAX
JMP 0x00117221
LAB_00117221:
MOV ECX,dword ptr [RBP + -0x1c0]
MOVSXD RAX,ECX
IMUL RAX,RAX,-0x77777777
SHR RAX,0x20
ADD EAX,ECX
MOV ECX,EAX
SHR ECX,0x1f
SAR EAX,0x5
ADD EAX,ECX
MOV dword ptr [RBP + -0x19c],EAX
MOVSXD RAX,dword ptr [RBP + -0x19c]
MOV ECX,EAX
IMUL RAX,RAX,-0x77777777
SHR RAX,0x20
ADD EAX,ECX
MOV ECX,EAX
SHR ECX,0x1f
SAR EAX,0x5
ADD EAX,ECX
MOV dword ptr [RBP + -0x1b0],EAX
MOVSXD RCX,dword ptr [RBP + -0x19c]
MOV EAX,ECX
IMUL RCX,RCX,-0x77777777
SHR RCX,0x20
ADD ECX,EAX
MOV EDX,ECX
SHR EDX,0x1f
SAR ECX,0x5
ADD ECX,EDX
IMUL ECX,ECX,0x3c
SUB EAX,ECX
MOV dword ptr [RBP + -0x19c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0011bad0
MOV dword ptr [RBP + -0x1d4],EAX
JMP 0x001172a9
LAB_001172a9:
MOV EAX,dword ptr [RBP + -0x1d4]
MOVSXD RCX,EAX
IMUL RCX,RCX,-0x77777777
SHR RCX,0x20
ADD ECX,EAX
MOV EDX,ECX
SHR EDX,0x1f
SAR ECX,0x5
ADD ECX,EDX
IMUL ECX,ECX,0x3c
SUB EAX,ECX
MOV dword ptr [RBP + -0x1b4],EAX
MOV RAX,qword ptr [RBP + -0x198]
MOV RAX,qword ptr [RAX + -0x18]
LEA RDI,[RBP + RAX*0x1 + -0x198]
MOV ESI,0x30
CALL 0x001097b0
JMP 0x001172f3
LAB_001172f3:
LEA RDI,[RBP + -0x188]
MOV ESI,dword ptr [RBP + -0x1b0]
CALL 0x00109c90
MOV qword ptr [RBP + -0x1e0],RAX
JMP 0x0011730e
LAB_0011730e:
MOV RDI,qword ptr [RBP + -0x1e0]
MOV ESI,0x3a
CALL 0x00109860
MOV qword ptr [RBP + -0x1e8],RAX
JMP 0x00117328
LAB_00117328:
MOV EDI,0x2
CALL 0x00119980
MOV dword ptr [RBP + -0x1ec],EAX
JMP 0x0011733a
LAB_0011733a:
MOV RDI,qword ptr [RBP + -0x1e8]
MOV EAX,dword ptr [RBP + -0x1ec]
MOV dword ptr [RBP + -0x1b8],EAX
MOV ESI,dword ptr [RBP + -0x1b8]
CALL 0x00109840
MOV qword ptr [RBP + -0x1f8],RAX
JMP 0x00117361
LAB_00117361:
MOV RDI,qword ptr [RBP + -0x1f8]
MOV ESI,dword ptr [RBP + -0x19c]
CALL 0x00109c90
MOV qword ptr [RBP + -0x200],RAX
JMP 0x0011737c
LAB_0011737c:
MOV RDI,qword ptr [RBP + -0x200]
MOV ESI,0x3a
CALL 0x00109860
MOV qword ptr [RBP + -0x208],RAX
JMP 0x00117396
LAB_00117396:
MOV EDI,0x2
CALL 0x00119980
MOV dword ptr [RBP + -0x20c],EAX
JMP 0x001173a8
LAB_001173a8:
MOV RDI,qword ptr [RBP + -0x208]
MOV EAX,dword ptr [RBP + -0x20c]
MOV dword ptr [RBP + -0x1bc],EAX
MOV ESI,dword ptr [RBP + -0x1bc]
CALL 0x00109840
MOV qword ptr [RBP + -0x218],RAX
JMP 0x001173cf
LAB_001173cf:
MOV RDI,qword ptr [RBP + -0x218]
MOV ESI,dword ptr [RBP + -0x1b4]
CALL 0x00109c90
JMP 0x001173e3
LAB_001173e3:
MOV RDI,qword ptr [RBP + -0x1d0]
LEA RSI,[RBP + -0x198]
CALL 0x001096b0
LAB_001173f6:
JMP 0x001173f8
LAB_001173f8:
LEA RDI,[RBP + -0x198]
CALL 0x00109550
MOV RAX,qword ptr [RBP + -0x1c8]
ADD RSP,0x220
POP RBP
RET
|
/* nglog::(anonymous namespace)::PrettyDuration[abi:cxx11](std::chrono::duration<int, std::ratio<1l,
1l> > const&) */
_anonymous_namespace_ * __thiscall
nglog::(anonymous_namespace)::PrettyDuration_abi_cxx11_
(_anonymous_namespace_ *this,duration *param_1)
{
int iVar1;
int iVar2;
int4 uVar3;
ostream *poVar4;
long local_1a0 [2];
ostream local_190 [376];
duration<int,std::ratio<1l,1l>> *local_18;
_anonymous_namespace_ *local_10;
local_18 = (duration<int,std::ratio<1l,1l>> *)param_1;
local_10 = this;
std::__cxx11::stringstream::stringstream((stringstream *)local_1a0);
/* try { // try from 00117214 to 001173f5 has its CatchHandler @ 00117414 */
iVar1 = std::chrono::duration<int,std::ratio<1l,1l>>::count(local_18);
iVar2 = std::chrono::duration<int,std::ratio<1l,1l>>::count(local_18);
std::ios::fill((char)local_1a0 + (char)*(int8 *)(local_1a0[0] + -0x18));
poVar4 = (ostream *)std::ostream::operator<<(local_190,(iVar1 / 0x3c) / 0x3c);
poVar4 = std::operator<<(poVar4,':');
uVar3 = std::setw(2);
poVar4 = std::operator<<(poVar4,uVar3);
poVar4 = (ostream *)std::ostream::operator<<(poVar4,(iVar1 / 0x3c) % 0x3c);
poVar4 = std::operator<<(poVar4,':');
uVar3 = std::setw(2);
poVar4 = std::operator<<(poVar4,uVar3);
std::ostream::operator<<(poVar4,iVar2 % 0x3c);
std::__cxx11::stringstream::str();
std::__cxx11::stringstream::~stringstream((stringstream *)local_1a0);
return this;
}
|
|
57,973
|
google::protobuf::Descriptor::DebugStringWithOptions[abi:cxx11](google::protobuf::DebugStringOptions const&) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
std::string Descriptor::DebugStringWithOptions(
const DebugStringOptions& options) const {
std::string contents;
DebugString(0, &contents, options, /* include_opening_clause */ true);
return contents;
}
|
O3
|
cpp
|
google::protobuf::Descriptor::DebugStringWithOptions[abi:cxx11](google::protobuf::DebugStringOptions const&) const:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rcx
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movl $0x1, %r8d
callq 0x22e88
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x24d3e
callq 0xf330
movq %r14, %rdi
callq 0xf570
|
_ZNK6google8protobuf10Descriptor22DebugStringWithOptionsB5cxx11ERKNS0_18DebugStringOptionsE:
push r15; int
push r14; int
push rbx; int
mov rcx, rdx; int
mov rbx, rdi
lea r15, [rdi+10h]
mov [rdi], r15
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi; int
xor esi, esi; int
mov rdx, rbx; int
mov r8d, 1; int
call _ZNK6google8protobuf10Descriptor11DebugStringEiPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_18DebugStringOptionsEb; google::protobuf::Descriptor::DebugString(int,std::string *,google::protobuf::DebugStringOptions const&,bool)
mov rax, rbx
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_24D3E
call __ZdlPv; operator delete(void *)
loc_24D3E:
mov rdi, r14
call __Unwind_Resume
|
long long google::protobuf::Descriptor::DebugStringWithOptions[abi:cxx11](
long long a1,
google::protobuf::Descriptor *a2,
_BYTE *a3)
{
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
google::protobuf::Descriptor::DebugString(a2, 0, (_QWORD *)a1, a3, 1);
return a1;
}
|
DebugStringWithOptions[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
MOV RCX,RDX
MOV RBX,RDI
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_00124d12:
MOV RDI,RSI
XOR ESI,ESI
MOV RDX,RBX
MOV R8D,0x1
CALL 0x00122e88
LAB_00124d25:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* google::protobuf::Descriptor::DebugStringWithOptions[abi:cxx11](google::protobuf::DebugStringOptions
const&) const */
DebugStringOptions *
google::protobuf::Descriptor::DebugStringWithOptions_abi_cxx11_(DebugStringOptions *param_1)
{
DebugStringOptions *in_RDX;
Descriptor *in_RSI;
*(DebugStringOptions **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (DebugStringOptions)0x0;
/* try { // try from 00124d12 to 00124d24 has its CatchHandler @ 00124d2e */
DebugString(in_RSI,0,(string *)param_1,in_RDX,true);
return param_1;
}
|
|
57,974
|
list_reverse
|
eloqsql/libmariadb/libmariadb/ma_list.c
|
LIST *list_reverse(LIST *root)
{
LIST *last;
last=root;
while (root)
{
last=root;
root=root->next;
last->next=last->prev;
last->prev=root;
}
return last;
}
|
O0
|
c
|
list_reverse:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x7dc07
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x7dbd0
movq -0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax)
|
list_reverse:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
loc_7DBD0:
cmp [rbp+var_8], 0
jz short loc_7DC07
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rcx, [rbp+var_8]
mov rax, [rbp+var_10]
mov [rax], rcx
jmp short loc_7DBD0
loc_7DC07:
mov rax, [rbp+var_10]
pop rbp
retn
|
_QWORD * list_reverse(_QWORD *a1)
{
_QWORD *v2; // [rsp+0h] [rbp-10h]
_QWORD *v3; // [rsp+8h] [rbp-8h]
v3 = a1;
v2 = a1;
while ( v3 )
{
v2 = v3;
v3 = (_QWORD *)v3[1];
v2[1] = *v2;
*v2 = v3;
}
return v2;
}
|
list_reverse:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
LAB_0017dbd0:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x0017dc07
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
JMP 0x0017dbd0
LAB_0017dc07:
MOV RAX,qword ptr [RBP + -0x10]
POP RBP
RET
|
int8 * list_reverse(int8 *param_1)
{
int8 *puVar1;
int8 *local_18;
int8 *local_10;
local_18 = param_1;
local_10 = param_1;
while (local_10 != (int8 *)0x0) {
local_18 = local_10;
puVar1 = (int8 *)local_10[1];
local_10[1] = *local_10;
*local_10 = puVar1;
local_10 = puVar1;
}
return local_18;
}
|
|
57,975
|
ggml_compute_forward_arange
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
|
void ggml_compute_forward_arange(
const ggml_compute_params * params,
ggml_tensor * dst) {
switch (dst->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_arange_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
}
|
O1
|
cpp
|
ggml_compute_forward_arange:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x0, (%rsi)
jne 0x421b4
movq %rsi, %rbx
cmpq $0x4, 0x30(%rsi)
jne 0x421ce
movslq (%rdi), %r12
movslq 0x4(%rdi), %r15
vmovsd 0x54(%rbx), %xmm1
vmovshdup %xmm1, %xmm0 # xmm0 = xmm1[1,1,3,3]
vmovss 0x5c(%rbx), %xmm2
vmovaps %xmm1, 0x10(%rsp)
vsubss %xmm1, %xmm0, %xmm0
vmovaps %xmm2, (%rsp)
vdivss %xmm2, %xmm0, %xmm0
vroundss $0xa, %xmm0, %xmm0, %xmm0
vcvttss2si %xmm0, %r14
movq %rbx, %rdi
callq 0xa920
cmpq %r14, %rax
jne 0x421ea
cmpq %r14, %r12
jge 0x421a5
movq 0xf8(%rbx), %rcx
leaq (%r12,%r15), %rax
xorl %esi, %esi
cmpq %rax, %r14
cmovleq %rax, %r14
setg %sil
addq %rsi, %rax
subq %rax, %r14
movq %r14, %rax
xorl %edx, %edx
divq %r15
xorl %edx, %edx
addq %rsi, %rax
vpbroadcastq %r12, %ymm1
vpbroadcastq %r15, %ymm0
vpmuldq 0x6f1b(%rip), %ymm0, %ymm2 # 0x49020
vpmuldq 0x6ef2(%rip), %ymm0, %ymm0 # 0x49000
vpaddq %ymm0, %ymm1, %ymm0
vpaddq %ymm2, %ymm1, %ymm1
shlq $0x3, %r15
vpbroadcastq %r15, %ymm2
vpbroadcastq %rax, %ymm3
andq $-0x8, %rax
vbroadcastss (%rsp), %ymm4
vbroadcastss 0x10(%rsp), %ymm5
addq $0x8, %rax
vpmovsxbq 0x6f40(%rip), %ymm6 # 0x49084
vpmovsxbq 0x6f33(%rip), %ymm7 # 0x49080
vpbroadcastq %rdx, %ymm8
vpor %ymm6, %ymm8, %ymm9
vpcmpleuq %ymm3, %ymm9, %k1
vcvtqq2ps %ymm1, %xmm9
vcvtqq2ps %ymm0, %xmm10
vinsertf128 $0x1, %xmm10, %ymm9, %ymm9
vfmadd213ps %ymm5, %ymm4, %ymm9 # ymm9 = (ymm4 * ymm9) + ymm5
vscatterqps %xmm9, (%rcx,%ymm1,4) {%k1}
vpor %ymm7, %ymm8, %ymm8
vpcmpleuq %ymm3, %ymm8, %k1
vextractf128 $0x1, %ymm9, %xmm8
vscatterqps %xmm8, (%rcx,%ymm0,4) {%k1}
addq $0x8, %rdx
vpaddq %ymm2, %ymm1, %ymm1
vpaddq %ymm2, %ymm0, %ymm0
cmpq %rdx, %rax
jne 0x4214d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
vzeroupper
retq
leaq 0x118e5(%rip), %rdi # 0x53aa0
leaq 0x74be(%rip), %rdx # 0x49680
movl $0x1a55, %esi # imm = 0x1A55
xorl %eax, %eax
callq 0xaf40
leaq 0x118cb(%rip), %rdi # 0x53aa0
leaq 0x738e(%rip), %rdx # 0x4956a
leaq 0x11ded(%rip), %rcx # 0x53fd0
movl $0x1a38, %esi # imm = 0x1A38
jmp 0x42204
leaq 0x118af(%rip), %rdi # 0x53aa0
leaq 0x7372(%rip), %rdx # 0x4956a
leaq 0x121f0(%rip), %rcx # 0x543ef
movl $0x1a43, %esi # imm = 0x1A43
xorl %eax, %eax
callq 0xaf40
|
ggml_compute_forward_arange:
push r15
push r14
push r12
push rbx
sub rsp, 28h
cmp dword ptr [rsi], 0
jnz loc_421B4
mov rbx, rsi
cmp qword ptr [rsi+30h], 4
jnz loc_421CE
movsxd r12, dword ptr [rdi]
movsxd r15, dword ptr [rdi+4]
vmovsd xmm1, qword ptr [rbx+54h]
vmovshdup xmm0, xmm1
vmovss xmm2, dword ptr [rbx+5Ch]
vmovaps [rsp+48h+var_38], xmm1
vsubss xmm0, xmm0, xmm1
vmovaps [rsp+48h+var_48], xmm2
vdivss xmm0, xmm0, xmm2
vroundss xmm0, xmm0, xmm0, 0Ah
vcvttss2si r14, xmm0
mov rdi, rbx
call _ggml_nelements
cmp rax, r14
jnz loc_421EA
cmp r12, r14
jge loc_421A5
mov rcx, [rbx+0F8h]
lea rax, [r12+r15]
xor esi, esi
cmp r14, rax
cmovle r14, rax
setnle sil
add rax, rsi
sub r14, rax
mov rax, r14
xor edx, edx
div r15
xor edx, edx
add rax, rsi
vpbroadcastq ymm1, r12
vpbroadcastq ymm0, r15
vpmuldq ymm2, ymm0, cs:ymmword_49020
vpmuldq ymm0, ymm0, cs:ymmword_49000
vpaddq ymm0, ymm1, ymm0
vpaddq ymm1, ymm1, ymm2
shl r15, 3
vpbroadcastq ymm2, r15
vpbroadcastq ymm3, rax
and rax, 0FFFFFFFFFFFFFFF8h
vbroadcastss ymm4, dword ptr [rsp+48h+var_48]
vbroadcastss ymm5, dword ptr [rsp+48h+var_38]
add rax, 8
vpmovsxbq ymm6, cs:dword_49084
vpmovsxbq ymm7, cs:dword_49080
loc_4214D:
vpbroadcastq ymm8, rdx
vpor ymm9, ymm8, ymm6
vpcmpleuq k1, ymm9, ymm3
vcvtqq2ps xmm9, ymm1
vcvtqq2ps xmm10, ymm0
vinsertf128 ymm9, ymm9, xmm10, 1
vfmadd213ps ymm9, ymm4, ymm5
vscatterqps xmmword ptr [rcx+ymm1*4]{k1}, xmm9
vpor ymm8, ymm8, ymm7
vpcmpleuq k1, ymm8, ymm3
vextractf128 xmm8, ymm9, 1
vscatterqps xmmword ptr [rcx+ymm0*4]{k1}, xmm8
add rdx, 8
vpaddq ymm1, ymm1, ymm2
vpaddq ymm0, ymm0, ymm2
cmp rax, rdx
jnz short loc_4214D
loc_421A5:
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
vzeroupper
retn
loc_421B4:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aFatalError; "fatal error"
mov esi, 1A55h
xor eax, eax
call _ggml_abort
loc_421CE:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstNb0SizeofFl; "dst->nb[0] == sizeof(float)"
mov esi, 1A38h
jmp short loc_42204
loc_421EA:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlNelementsD_0; "ggml_nelements(dst) == steps"
mov esi, 1A43h
loc_42204:
xor eax, eax
call _ggml_abort
|
unsigned long long ggml_compute_forward_arange(int *a1, long long a2)
{
unsigned long long result; // rax
long long v14; // rsi
bool v15; // zf
bool v16; // sf
bool v17; // of
if ( *(_DWORD *)a2 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
6741LL,
"fatal error");
goto LABEL_11;
}
_RBX = a2;
if ( *(_QWORD *)(a2 + 48) != 4LL )
{
LABEL_11:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
6712LL,
"GGML_ASSERT(%s) failed",
"dst->nb[0] == sizeof(float)");
return ggml_compute_forward_timestep_embedding();
}
_R12 = *a1;
_R15 = a1[1];
__asm
{
vmovsd xmm1, qword ptr [rbx+54h]
vmovshdup xmm0, xmm1
vmovss xmm2, dword ptr [rbx+5Ch]
vmovaps [rsp+48h+var_38], xmm1
vsubss xmm0, xmm0, xmm1
vmovaps [rsp+48h+var_48], xmm2
vdivss xmm0, xmm0, xmm2
vroundss xmm0, xmm0, xmm0, 0Ah
vcvttss2si r14, xmm0
}
result = ggml_nelements(a2);
if ( result != _R14 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
6723LL,
"GGML_ASSERT(%s) failed",
"ggml_nelements(dst) == steps");
return ggml_compute_forward_timestep_embedding();
}
if ( _R12 < _R14 )
{
_RCX = *(_QWORD *)(a2 + 248);
v14 = 0LL;
v17 = __OFSUB__(_R14, _R12 + _R15);
v15 = _R14 == _R12 + _R15;
v16 = (long long)(_R14 - (_R12 + _R15)) < 0;
if ( _R14 <= (long long)(_R12 + _R15) )
_R14 = _R12 + _R15;
LOBYTE(v14) = !(v16 ^ v17 | v15);
_RDX = 0LL;
_RAX = v14 + (_R14 - (v14 + _R12 + _R15)) / _R15;
__asm
{
vpbroadcastq ymm1, r12
vpbroadcastq ymm0, r15
vpmuldq ymm2, ymm0, cs:ymmword_49020
vpmuldq ymm0, ymm0, cs:ymmword_49000
vpaddq ymm0, ymm1, ymm0
vpaddq ymm1, ymm1, ymm2
}
_R15 = 8 * _R15;
__asm
{
vpbroadcastq ymm2, r15
vpbroadcastq ymm3, rax
vbroadcastss ymm4, dword ptr [rsp+48h+var_48]
vbroadcastss ymm5, dword ptr [rsp+48h+var_38]
}
result = (_RAX & 0xFFFFFFFFFFFFFFF8LL) + 8;
__asm
{
vpmovsxbq ymm6, cs:dword_49084
vpmovsxbq ymm7, cs:dword_49080
}
do
{
__asm
{
vpbroadcastq ymm8, rdx
vpor ymm9, ymm8, ymm6
vpcmpleuq k1, ymm9, ymm3
vcvtqq2ps xmm9, ymm1
vcvtqq2ps xmm10, ymm0
vinsertf128 ymm9, ymm9, xmm10, 1
vfmadd213ps ymm9, ymm4, ymm5
vscatterqps xmmword ptr [rcx+ymm1*4]{k1}, xmm9
vpor ymm8, ymm8, ymm7
vpcmpleuq k1, ymm8, ymm3
vextractf128 xmm8, ymm9, 1
vscatterqps xmmword ptr [rcx+ymm0*4]{k1}, xmm8
}
_RDX += 8LL;
__asm
{
vpaddq ymm1, ymm1, ymm2
vpaddq ymm0, ymm0, ymm2
}
}
while ( result != _RDX );
}
__asm { vzeroupper }
return result;
}
|
ggml_compute_forward_arange:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
CMP dword ptr [RSI],0x0
JNZ 0x001421b4
MOV RBX,RSI
CMP qword ptr [RSI + 0x30],0x4
JNZ 0x001421ce
MOVSXD R12,dword ptr [RDI]
MOVSXD R15,dword ptr [RDI + 0x4]
VMOVSD XMM1,qword ptr [RBX + 0x54]
VMOVSHDUP XMM0,XMM1
VMOVSS XMM2,dword ptr [RBX + 0x5c]
VMOVAPS xmmword ptr [RSP + 0x10],XMM1
VSUBSS XMM0,XMM0,XMM1
VMOVAPS xmmword ptr [RSP],XMM2
VDIVSS XMM0,XMM0,XMM2
VROUNDSS XMM0,XMM0,XMM0,0xa
VCVTTSS2SI R14,XMM0
MOV RDI,RBX
CALL 0x0010a920
CMP RAX,R14
JNZ 0x001421ea
CMP R12,R14
JGE 0x001421a5
MOV RCX,qword ptr [RBX + 0xf8]
LEA RAX,[R12 + R15*0x1]
XOR ESI,ESI
CMP R14,RAX
CMOVLE R14,RAX
SETG SIL
ADD RAX,RSI
SUB R14,RAX
MOV RAX,R14
XOR EDX,EDX
DIV R15
XOR EDX,EDX
ADD RAX,RSI
VPBROADCASTQ YMM1
VPBROADCASTQ YMM0
VPMULDQ YMM2,YMM0,ymmword ptr [0x00149020]
VPMULDQ YMM0,YMM0,ymmword ptr [0x00149000]
VPADDQ YMM0,YMM1,YMM0
VPADDQ YMM1,YMM1,YMM2
SHL R15,0x3
VPBROADCASTQ YMM2
VPBROADCASTQ YMM3
AND RAX,-0x8
VBROADCASTSS YMM4,dword ptr [RSP]
VBROADCASTSS YMM5,dword ptr [RSP + 0x10]
ADD RAX,0x8
VPMOVSXBQ YMM6,dword ptr [0x00149084]
VPMOVSXBQ YMM7,dword ptr [0x00149080]
LAB_0014214d:
VPBROADCASTQ YMM8
VPOR YMM9,YMM8,YMM6
VPCMPUQ K1 {K0},YMM9,YMM3,0x2
VCVTQQ2PS XMM9,YMM1
VCVTQQ2PS XMM10,YMM0
VINSERTF128 YMM9,YMM9,XMM10,0x1
VFMADD213PS YMM9,YMM4,YMM5
VSCATTERQPS qword ptr [RCX + YMM1*0x4]{K1},XMM9
VPOR YMM8,YMM8,YMM7
VPCMPUQ K1 {K0},YMM8,YMM3,0x2
VEXTRACTF128 XMM8,YMM9,0x1
VSCATTERQPS qword ptr [RCX + YMM0*0x4]{K1},XMM8
ADD RDX,0x8
VPADDQ YMM1,YMM1,YMM2
VPADDQ YMM0,YMM0,YMM2
CMP RAX,RDX
JNZ 0x0014214d
LAB_001421a5:
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
VZEROUPPER
RET
LAB_001421b4:
LEA RDI,[0x153aa0]
LEA RDX,[0x149680]
MOV ESI,0x1a55
XOR EAX,EAX
CALL 0x0010af40
LAB_001421ce:
LEA RDI,[0x153aa0]
LEA RDX,[0x14956a]
LEA RCX,[0x153fd0]
MOV ESI,0x1a38
JMP 0x00142204
LAB_001421ea:
LEA RDI,[0x153aa0]
LEA RDX,[0x14956a]
LEA RCX,[0x1543ef]
MOV ESI,0x1a43
LAB_00142204:
XOR EAX,EAX
CALL 0x0010af40
|
/* WARNING: Control flow encountered unimplemented instructions */
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ggml_compute_forward_arange(int *param_1,int *param_2)
{
float fVar1;
int iVar2;
int1 auVar3 [32];
long lVar4;
char *pcVar5;
int8 uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [32];
int1 auVar10 [32];
int1 auVar11 [32];
int1 auVar12 [32];
float fVar13;
int1 auVar14 [32];
int1 auVar15 [32];
if (*param_2 != 0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp"
,0x1a55,"fatal error");
}
if (*(long *)(param_2 + 0xc) == 4) {
iVar2 = *param_1;
auVar8._8_8_ = 0;
auVar8._0_8_ = *(ulong *)(param_2 + 0x15);
auVar7 = vmovshdup_avx(auVar8);
fVar1 = (float)param_2[0x17];
fVar13 = (float)*(ulong *)(param_2 + 0x15);
auVar7._0_4_ = (auVar7._0_4_ - fVar13) / fVar1;
auVar7._4_12_ = SUB6012((int1 [60])0x0,0);
auVar7 = vroundss_avx(auVar7,auVar7,10);
lVar4 = ggml_nelements(param_2);
if (lVar4 == (long)auVar7._0_4_) {
if ((long)auVar7._0_4_ <= (long)iVar2) {
return;
}
auVar9 = vpbroadcastq_avx512vl();
auVar10 = vpbroadcastq_avx512vl();
auVar3 = vpmuldq_avx2(auVar10,_DAT_00149020);
auVar10 = vpmuldq_avx2(auVar10,_DAT_00149000);
auVar10 = vpaddq_avx2(auVar9,auVar10);
auVar3 = vpaddq_avx2(auVar9,auVar3);
vpbroadcastq_avx512vl();
auVar11 = vpbroadcastq_avx512vl();
auVar14._4_4_ = fVar1;
auVar14._0_4_ = fVar1;
auVar14._8_4_ = fVar1;
auVar14._12_4_ = fVar1;
auVar14._16_4_ = fVar1;
auVar14._20_4_ = fVar1;
auVar14._24_4_ = fVar1;
auVar14._28_4_ = fVar1;
auVar15._4_4_ = fVar13;
auVar15._0_4_ = fVar13;
auVar15._8_4_ = fVar13;
auVar15._12_4_ = fVar13;
auVar15._16_4_ = fVar13;
auVar15._20_4_ = fVar13;
auVar15._24_4_ = fVar13;
auVar15._28_4_ = fVar13;
auVar9 = vpmovsxbq_avx2(ZEXT416(DAT_00149084));
vpmovsxbq_avx2(ZEXT416(DAT_00149080));
auVar12 = vpbroadcastq_avx512vl();
auVar9 = vpor_avx2(auVar12,auVar9);
vpcmpuq_avx512vl(auVar9,auVar11,2);
auVar7 = vcvtqq2ps_avx512vl(auVar3);
auVar8 = vcvtqq2ps_avx512vl(auVar10);
auVar10._16_16_ = auVar8;
auVar10._0_16_ = auVar7;
vfmadd213ps_fma(auVar10,auVar14,auVar15);
/* WARNING: Unimplemented instruction - Truncating control flow here */
halt_unimplemented();
}
pcVar5 = "ggml_nelements(dst) == steps";
uVar6 = 0x1a43;
}
else {
pcVar5 = "dst->nb[0] == sizeof(float)";
uVar6 = 0x1a38;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
uVar6,"GGML_ASSERT(%s) failed",pcVar5);
}
|
|
57,976
|
ggml_compute_forward_arange
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
|
void ggml_compute_forward_arange(
const ggml_compute_params * params,
ggml_tensor * dst) {
switch (dst->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_arange_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
}
|
O3
|
cpp
|
ggml_compute_forward_arange:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x0, (%rsi)
jne 0x41d33
movq %rsi, %rbx
cmpq $0x4, 0x30(%rsi)
jne 0x41d4d
movslq (%rdi), %r12
movslq 0x4(%rdi), %r15
vmovsd 0x54(%rbx), %xmm1
vmovshdup %xmm1, %xmm0 # xmm0 = xmm1[1,1,3,3]
vmovss 0x5c(%rbx), %xmm2
vmovaps %xmm1, 0x10(%rsp)
vsubss %xmm1, %xmm0, %xmm0
vmovaps %xmm2, (%rsp)
vdivss %xmm2, %xmm0, %xmm0
vroundss $0xa, %xmm0, %xmm0, %xmm0
vcvttss2si %xmm0, %r14
movq %rbx, %rdi
callq 0xa920
cmpq %r14, %rax
jne 0x41d69
cmpq %r14, %r12
jge 0x41d24
movq 0xf8(%rbx), %rcx
leaq (%r12,%r15), %rax
xorl %esi, %esi
cmpq %rax, %r14
cmovleq %rax, %r14
setg %sil
addq %rsi, %rax
subq %rax, %r14
movq %r14, %rax
xorl %edx, %edx
divq %r15
xorl %edx, %edx
addq %rsi, %rax
vpbroadcastq %r12, %ymm1
vpbroadcastq %r15, %ymm0
vpmuldq 0x639c(%rip), %ymm0, %ymm2 # 0x48020
vpmuldq 0x6373(%rip), %ymm0, %ymm0 # 0x48000
vpaddq %ymm0, %ymm1, %ymm0
vpaddq %ymm2, %ymm1, %ymm1
shlq $0x3, %r15
vpbroadcastq %r15, %ymm2
vpbroadcastq %rax, %ymm3
andq $-0x8, %rax
vbroadcastss (%rsp), %ymm4
vbroadcastss 0x10(%rsp), %ymm5
addq $0x8, %rax
vpmovsxbq 0x63c1(%rip), %ymm6 # 0x48084
vpmovsxbq 0x63b4(%rip), %ymm7 # 0x48080
vpbroadcastq %rdx, %ymm8
vpor %ymm6, %ymm8, %ymm9
vpcmpleuq %ymm3, %ymm9, %k1
vcvtqq2ps %ymm1, %xmm9
vcvtqq2ps %ymm0, %xmm10
vinsertf128 $0x1, %xmm10, %ymm9, %ymm9
vfmadd213ps %ymm5, %ymm4, %ymm9 # ymm9 = (ymm4 * ymm9) + ymm5
vscatterqps %xmm9, (%rcx,%ymm1,4) {%k1}
vpor %ymm7, %ymm8, %ymm8
vpcmpleuq %ymm3, %ymm8, %k1
vextractf128 $0x1, %ymm9, %xmm8
vscatterqps %xmm8, (%rcx,%ymm0,4) {%k1}
addq $0x8, %rdx
vpaddq %ymm2, %ymm1, %ymm1
vpaddq %ymm2, %ymm0, %ymm0
cmpq %rdx, %rax
jne 0x41ccc
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
vzeroupper
retq
leaq 0x10d66(%rip), %rdi # 0x52aa0
leaq 0x693f(%rip), %rdx # 0x48680
movl $0x1a55, %esi # imm = 0x1A55
xorl %eax, %eax
callq 0xaf40
leaq 0x10d4c(%rip), %rdi # 0x52aa0
leaq 0x680f(%rip), %rdx # 0x4856a
leaq 0x1126e(%rip), %rcx # 0x52fd0
movl $0x1a38, %esi # imm = 0x1A38
jmp 0x41d83
leaq 0x10d30(%rip), %rdi # 0x52aa0
leaq 0x67f3(%rip), %rdx # 0x4856a
leaq 0x11671(%rip), %rcx # 0x533ef
movl $0x1a43, %esi # imm = 0x1A43
xorl %eax, %eax
callq 0xaf40
|
ggml_compute_forward_arange:
push r15
push r14
push r12
push rbx
sub rsp, 28h
cmp dword ptr [rsi], 0
jnz loc_41D33
mov rbx, rsi
cmp qword ptr [rsi+30h], 4
jnz loc_41D4D
movsxd r12, dword ptr [rdi]
movsxd r15, dword ptr [rdi+4]
vmovsd xmm1, qword ptr [rbx+54h]
vmovshdup xmm0, xmm1
vmovss xmm2, dword ptr [rbx+5Ch]
vmovaps [rsp+48h+var_38], xmm1
vsubss xmm0, xmm0, xmm1
vmovaps [rsp+48h+var_48], xmm2
vdivss xmm0, xmm0, xmm2
vroundss xmm0, xmm0, xmm0, 0Ah
vcvttss2si r14, xmm0
mov rdi, rbx
call _ggml_nelements
cmp rax, r14
jnz loc_41D69
cmp r12, r14
jge loc_41D24
mov rcx, [rbx+0F8h]
lea rax, [r12+r15]
xor esi, esi
cmp r14, rax
cmovle r14, rax
setnle sil
add rax, rsi
sub r14, rax
mov rax, r14
xor edx, edx
div r15
xor edx, edx
add rax, rsi
vpbroadcastq ymm1, r12
vpbroadcastq ymm0, r15
vpmuldq ymm2, ymm0, cs:ymmword_48020
vpmuldq ymm0, ymm0, cs:ymmword_48000
vpaddq ymm0, ymm1, ymm0
vpaddq ymm1, ymm1, ymm2
shl r15, 3
vpbroadcastq ymm2, r15
vpbroadcastq ymm3, rax
and rax, 0FFFFFFFFFFFFFFF8h
vbroadcastss ymm4, dword ptr [rsp+48h+var_48]
vbroadcastss ymm5, dword ptr [rsp+48h+var_38]
add rax, 8
vpmovsxbq ymm6, cs:dword_48084
vpmovsxbq ymm7, cs:dword_48080
loc_41CCC:
vpbroadcastq ymm8, rdx
vpor ymm9, ymm8, ymm6
vpcmpleuq k1, ymm9, ymm3
vcvtqq2ps xmm9, ymm1
vcvtqq2ps xmm10, ymm0
vinsertf128 ymm9, ymm9, xmm10, 1
vfmadd213ps ymm9, ymm4, ymm5
vscatterqps xmmword ptr [rcx+ymm1*4]{k1}, xmm9
vpor ymm8, ymm8, ymm7
vpcmpleuq k1, ymm8, ymm3
vextractf128 xmm8, ymm9, 1
vscatterqps xmmword ptr [rcx+ymm0*4]{k1}, xmm8
add rdx, 8
vpaddq ymm1, ymm1, ymm2
vpaddq ymm0, ymm0, ymm2
cmp rax, rdx
jnz short loc_41CCC
loc_41D24:
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
vzeroupper
retn
loc_41D33:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aFatalError; "fatal error"
mov esi, 1A55h
xor eax, eax
call _ggml_abort
loc_41D4D:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstNb0SizeofFl; "dst->nb[0] == sizeof(float)"
mov esi, 1A38h
jmp short loc_41D83
loc_41D69:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlNelementsD_0; "ggml_nelements(dst) == steps"
mov esi, 1A43h
loc_41D83:
xor eax, eax
call _ggml_abort
|
unsigned long long ggml_compute_forward_arange(int *a1, long long a2)
{
unsigned long long result; // rax
long long v14; // rsi
bool v15; // zf
bool v16; // sf
bool v17; // of
if ( *(_DWORD *)a2 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
6741LL,
"fatal error");
goto LABEL_11;
}
_RBX = a2;
if ( *(_QWORD *)(a2 + 48) != 4LL )
{
LABEL_11:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
6712LL,
"GGML_ASSERT(%s) failed",
"dst->nb[0] == sizeof(float)");
return ggml_compute_forward_timestep_embedding();
}
_R12 = *a1;
_R15 = a1[1];
__asm
{
vmovsd xmm1, qword ptr [rbx+54h]
vmovshdup xmm0, xmm1
vmovss xmm2, dword ptr [rbx+5Ch]
vmovaps [rsp+48h+var_38], xmm1
vsubss xmm0, xmm0, xmm1
vmovaps [rsp+48h+var_48], xmm2
vdivss xmm0, xmm0, xmm2
vroundss xmm0, xmm0, xmm0, 0Ah
vcvttss2si r14, xmm0
}
result = ggml_nelements(a2);
if ( result != _R14 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
6723LL,
"GGML_ASSERT(%s) failed",
"ggml_nelements(dst) == steps");
return ggml_compute_forward_timestep_embedding();
}
if ( _R12 < _R14 )
{
_RCX = *(_QWORD *)(a2 + 248);
v14 = 0LL;
v17 = __OFSUB__(_R14, _R12 + _R15);
v15 = _R14 == _R12 + _R15;
v16 = (long long)(_R14 - (_R12 + _R15)) < 0;
if ( _R14 <= (long long)(_R12 + _R15) )
_R14 = _R12 + _R15;
LOBYTE(v14) = !(v16 ^ v17 | v15);
_RDX = 0LL;
_RAX = v14 + (_R14 - (v14 + _R12 + _R15)) / _R15;
__asm
{
vpbroadcastq ymm1, r12
vpbroadcastq ymm0, r15
vpmuldq ymm2, ymm0, cs:ymmword_48020
vpmuldq ymm0, ymm0, cs:ymmword_48000
vpaddq ymm0, ymm1, ymm0
vpaddq ymm1, ymm1, ymm2
}
_R15 = 8 * _R15;
__asm
{
vpbroadcastq ymm2, r15
vpbroadcastq ymm3, rax
vbroadcastss ymm4, dword ptr [rsp+48h+var_48]
vbroadcastss ymm5, dword ptr [rsp+48h+var_38]
}
result = (_RAX & 0xFFFFFFFFFFFFFFF8LL) + 8;
__asm
{
vpmovsxbq ymm6, cs:dword_48084
vpmovsxbq ymm7, cs:dword_48080
}
do
{
__asm
{
vpbroadcastq ymm8, rdx
vpor ymm9, ymm8, ymm6
vpcmpleuq k1, ymm9, ymm3
vcvtqq2ps xmm9, ymm1
vcvtqq2ps xmm10, ymm0
vinsertf128 ymm9, ymm9, xmm10, 1
vfmadd213ps ymm9, ymm4, ymm5
vscatterqps xmmword ptr [rcx+ymm1*4]{k1}, xmm9
vpor ymm8, ymm8, ymm7
vpcmpleuq k1, ymm8, ymm3
vextractf128 xmm8, ymm9, 1
vscatterqps xmmword ptr [rcx+ymm0*4]{k1}, xmm8
}
_RDX += 8LL;
__asm
{
vpaddq ymm1, ymm1, ymm2
vpaddq ymm0, ymm0, ymm2
}
}
while ( result != _RDX );
}
__asm { vzeroupper }
return result;
}
|
ggml_compute_forward_arange:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
CMP dword ptr [RSI],0x0
JNZ 0x00141d33
MOV RBX,RSI
CMP qword ptr [RSI + 0x30],0x4
JNZ 0x00141d4d
MOVSXD R12,dword ptr [RDI]
MOVSXD R15,dword ptr [RDI + 0x4]
VMOVSD XMM1,qword ptr [RBX + 0x54]
VMOVSHDUP XMM0,XMM1
VMOVSS XMM2,dword ptr [RBX + 0x5c]
VMOVAPS xmmword ptr [RSP + 0x10],XMM1
VSUBSS XMM0,XMM0,XMM1
VMOVAPS xmmword ptr [RSP],XMM2
VDIVSS XMM0,XMM0,XMM2
VROUNDSS XMM0,XMM0,XMM0,0xa
VCVTTSS2SI R14,XMM0
MOV RDI,RBX
CALL 0x0010a920
CMP RAX,R14
JNZ 0x00141d69
CMP R12,R14
JGE 0x00141d24
MOV RCX,qword ptr [RBX + 0xf8]
LEA RAX,[R12 + R15*0x1]
XOR ESI,ESI
CMP R14,RAX
CMOVLE R14,RAX
SETG SIL
ADD RAX,RSI
SUB R14,RAX
MOV RAX,R14
XOR EDX,EDX
DIV R15
XOR EDX,EDX
ADD RAX,RSI
VPBROADCASTQ YMM1
VPBROADCASTQ YMM0
VPMULDQ YMM2,YMM0,ymmword ptr [0x00148020]
VPMULDQ YMM0,YMM0,ymmword ptr [0x00148000]
VPADDQ YMM0,YMM1,YMM0
VPADDQ YMM1,YMM1,YMM2
SHL R15,0x3
VPBROADCASTQ YMM2
VPBROADCASTQ YMM3
AND RAX,-0x8
VBROADCASTSS YMM4,dword ptr [RSP]
VBROADCASTSS YMM5,dword ptr [RSP + 0x10]
ADD RAX,0x8
VPMOVSXBQ YMM6,dword ptr [0x00148084]
VPMOVSXBQ YMM7,dword ptr [0x00148080]
LAB_00141ccc:
VPBROADCASTQ YMM8
VPOR YMM9,YMM8,YMM6
VPCMPUQ K1 {K0},YMM9,YMM3,0x2
VCVTQQ2PS XMM9,YMM1
VCVTQQ2PS XMM10,YMM0
VINSERTF128 YMM9,YMM9,XMM10,0x1
VFMADD213PS YMM9,YMM4,YMM5
VSCATTERQPS qword ptr [RCX + YMM1*0x4]{K1},XMM9
VPOR YMM8,YMM8,YMM7
VPCMPUQ K1 {K0},YMM8,YMM3,0x2
VEXTRACTF128 XMM8,YMM9,0x1
VSCATTERQPS qword ptr [RCX + YMM0*0x4]{K1},XMM8
ADD RDX,0x8
VPADDQ YMM1,YMM1,YMM2
VPADDQ YMM0,YMM0,YMM2
CMP RAX,RDX
JNZ 0x00141ccc
LAB_00141d24:
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
VZEROUPPER
RET
LAB_00141d33:
LEA RDI,[0x152aa0]
LEA RDX,[0x148680]
MOV ESI,0x1a55
XOR EAX,EAX
CALL 0x0010af40
LAB_00141d4d:
LEA RDI,[0x152aa0]
LEA RDX,[0x14856a]
LEA RCX,[0x152fd0]
MOV ESI,0x1a38
JMP 0x00141d83
LAB_00141d69:
LEA RDI,[0x152aa0]
LEA RDX,[0x14856a]
LEA RCX,[0x1533ef]
MOV ESI,0x1a43
LAB_00141d83:
XOR EAX,EAX
CALL 0x0010af40
|
/* WARNING: Control flow encountered unimplemented instructions */
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ggml_compute_forward_arange(int *param_1,int *param_2)
{
float fVar1;
int iVar2;
int1 auVar3 [32];
long lVar4;
char *pcVar5;
int8 uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [32];
int1 auVar10 [32];
int1 auVar11 [32];
int1 auVar12 [32];
float fVar13;
int1 auVar14 [32];
int1 auVar15 [32];
if (*param_2 != 0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp"
,0x1a55,"fatal error");
}
if (*(long *)(param_2 + 0xc) == 4) {
iVar2 = *param_1;
auVar8._8_8_ = 0;
auVar8._0_8_ = *(ulong *)(param_2 + 0x15);
auVar7 = vmovshdup_avx(auVar8);
fVar1 = (float)param_2[0x17];
fVar13 = (float)*(ulong *)(param_2 + 0x15);
auVar7._0_4_ = (auVar7._0_4_ - fVar13) / fVar1;
auVar7._4_12_ = SUB6012((int1 [60])0x0,0);
auVar7 = vroundss_avx(auVar7,auVar7,10);
lVar4 = ggml_nelements(param_2);
if (lVar4 == (long)auVar7._0_4_) {
if ((long)auVar7._0_4_ <= (long)iVar2) {
return;
}
auVar9 = vpbroadcastq_avx512vl();
auVar10 = vpbroadcastq_avx512vl();
auVar3 = vpmuldq_avx2(auVar10,_DAT_00148020);
auVar10 = vpmuldq_avx2(auVar10,_DAT_00148000);
auVar10 = vpaddq_avx2(auVar9,auVar10);
auVar3 = vpaddq_avx2(auVar9,auVar3);
vpbroadcastq_avx512vl();
auVar11 = vpbroadcastq_avx512vl();
auVar14._4_4_ = fVar1;
auVar14._0_4_ = fVar1;
auVar14._8_4_ = fVar1;
auVar14._12_4_ = fVar1;
auVar14._16_4_ = fVar1;
auVar14._20_4_ = fVar1;
auVar14._24_4_ = fVar1;
auVar14._28_4_ = fVar1;
auVar15._4_4_ = fVar13;
auVar15._0_4_ = fVar13;
auVar15._8_4_ = fVar13;
auVar15._12_4_ = fVar13;
auVar15._16_4_ = fVar13;
auVar15._20_4_ = fVar13;
auVar15._24_4_ = fVar13;
auVar15._28_4_ = fVar13;
auVar9 = vpmovsxbq_avx2(ZEXT416(DAT_00148084));
vpmovsxbq_avx2(ZEXT416(DAT_00148080));
auVar12 = vpbroadcastq_avx512vl();
auVar9 = vpor_avx2(auVar12,auVar9);
vpcmpuq_avx512vl(auVar9,auVar11,2);
auVar7 = vcvtqq2ps_avx512vl(auVar3);
auVar8 = vcvtqq2ps_avx512vl(auVar10);
auVar10._16_16_ = auVar8;
auVar10._0_16_ = auVar7;
vfmadd213ps_fma(auVar10,auVar14,auVar15);
/* WARNING: Unimplemented instruction - Truncating control flow here */
halt_unimplemented();
}
pcVar5 = "ggml_nelements(dst) == steps";
uVar6 = 0x1a43;
}
else {
pcVar5 = "dst->nb[0] == sizeof(float)";
uVar6 = 0x1a38;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
uVar6,"GGML_ASSERT(%s) failed",pcVar5);
}
|
|
57,977
|
fmt::v10::detail::dragonbox::cache_accessor<float>::get_cached_power(int)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format-inl.h
|
static auto get_cached_power(int k) noexcept -> uint64_t {
FMT_ASSERT(k >= float_info<float>::min_k && k <= float_info<float>::max_k,
"k is out of range");
static constexpr const uint64_t pow10_significands[] = {
0x81ceb32c4b43fcf5, 0xa2425ff75e14fc32, 0xcad2f7f5359a3b3f,
0xfd87b5f28300ca0e, 0x9e74d1b791e07e49, 0xc612062576589ddb,
0xf79687aed3eec552, 0x9abe14cd44753b53, 0xc16d9a0095928a28,
0xf1c90080baf72cb2, 0x971da05074da7bef, 0xbce5086492111aeb,
0xec1e4a7db69561a6, 0x9392ee8e921d5d08, 0xb877aa3236a4b44a,
0xe69594bec44de15c, 0x901d7cf73ab0acda, 0xb424dc35095cd810,
0xe12e13424bb40e14, 0x8cbccc096f5088cc, 0xafebff0bcb24aaff,
0xdbe6fecebdedd5bf, 0x89705f4136b4a598, 0xabcc77118461cefd,
0xd6bf94d5e57a42bd, 0x8637bd05af6c69b6, 0xa7c5ac471b478424,
0xd1b71758e219652c, 0x83126e978d4fdf3c, 0xa3d70a3d70a3d70b,
0xcccccccccccccccd, 0x8000000000000000, 0xa000000000000000,
0xc800000000000000, 0xfa00000000000000, 0x9c40000000000000,
0xc350000000000000, 0xf424000000000000, 0x9896800000000000,
0xbebc200000000000, 0xee6b280000000000, 0x9502f90000000000,
0xba43b74000000000, 0xe8d4a51000000000, 0x9184e72a00000000,
0xb5e620f480000000, 0xe35fa931a0000000, 0x8e1bc9bf04000000,
0xb1a2bc2ec5000000, 0xde0b6b3a76400000, 0x8ac7230489e80000,
0xad78ebc5ac620000, 0xd8d726b7177a8000, 0x878678326eac9000,
0xa968163f0a57b400, 0xd3c21bcecceda100, 0x84595161401484a0,
0xa56fa5b99019a5c8, 0xcecb8f27f4200f3a, 0x813f3978f8940985,
0xa18f07d736b90be6, 0xc9f2c9cd04674edf, 0xfc6f7c4045812297,
0x9dc5ada82b70b59e, 0xc5371912364ce306, 0xf684df56c3e01bc7,
0x9a130b963a6c115d, 0xc097ce7bc90715b4, 0xf0bdc21abb48db21,
0x96769950b50d88f5, 0xbc143fa4e250eb32, 0xeb194f8e1ae525fe,
0x92efd1b8d0cf37bf, 0xb7abc627050305ae, 0xe596b7b0c643c71a,
0x8f7e32ce7bea5c70, 0xb35dbf821ae4f38c, 0xe0352f62a19e306f};
return pow10_significands[k - float_info<float>::min_k];
}
|
O0
|
c
|
fmt::v10::detail::dragonbox::cache_accessor<float>::get_cached_power(int):
pushq %rax
movl %edi, 0x4(%rsp)
xorl %eax, %eax
cmpl $-0x1f, 0x4(%rsp)
movb %al, 0x2(%rsp)
jl 0x8a23e
cmpl $0x2e, 0x4(%rsp)
setle %al
movb %al, 0x2(%rsp)
movb 0x2(%rsp), %al
andb $0x1, %al
movb %al, 0x3(%rsp)
leaq 0x3(%rsp), %rdi
leaq 0x85d58(%rip), %rsi # 0x10ffac
callq 0x8c0b0
movl 0x4(%rsp), %eax
subl $-0x1f, %eax
movslq %eax, %rcx
leaq 0x869a6(%rip), %rax # 0x110c10
movq (%rax,%rcx,8), %rax
popq %rcx
retq
|
_ZN3fmt3v106detail9dragonbox14cache_accessorIfE16get_cached_powerEi:
push rax
mov [rsp+8+var_4], edi
xor eax, eax
cmp [rsp+8+var_4], 0FFFFFFE1h
mov [rsp+8+var_6], al
jl short loc_8A23E
cmp [rsp+8+var_4], 2Eh ; '.'
setle al
mov [rsp+8+var_6], al
loc_8A23E:
mov al, [rsp+8+var_6]
and al, 1
mov [rsp+8+var_5], al
lea rdi, [rsp+8+var_5]
lea rsi, aKIsOutOfRange; "k is out of range"
call _ZN3fmt3v106detail13ignore_unusedIJbA18_cEEEvDpRKT_; fmt::v10::detail::ignore_unused<bool,char [18]>(bool,char [18] const&)
mov eax, [rsp+8+var_4]
sub eax, 0FFFFFFE1h
movsxd rcx, eax
lea rax, _ZZN3fmt3v106detail9dragonbox14cache_accessorIfE16get_cached_powerEiE18pow10_significands; fmt::v10::detail::dragonbox::cache_accessor<float>::get_cached_power(int)::pow10_significands
mov rax, [rax+rcx*8]
pop rcx
retn
|
long long fmt::v10::detail::dragonbox::cache_accessor<float>::get_cached_power(int a1)
{
int v1; // eax
bool v3; // [rsp+0h] [rbp-6h]
char v4; // [rsp+1h] [rbp-5h] BYREF
int v5; // [rsp+2h] [rbp-4h]
v4 = HIBYTE(v1);
v5 = a1;
v3 = 0;
if ( a1 >= -31 )
v3 = v5 <= 46;
v4 = v3;
fmt::v10::detail::ignore_unused<bool,char [18]>(&v4, "k is out of range");
return fmt::v10::detail::dragonbox::cache_accessor<float>::get_cached_power(int)::pow10_significands[v5 + 31];
}
|
get_cached_power:
PUSH RAX
MOV dword ptr [RSP + 0x4],EDI
XOR EAX,EAX
CMP dword ptr [RSP + 0x4],-0x1f
MOV byte ptr [RSP + 0x2],AL
JL 0x0018a23e
CMP dword ptr [RSP + 0x4],0x2e
SETLE AL
MOV byte ptr [RSP + 0x2],AL
LAB_0018a23e:
MOV AL,byte ptr [RSP + 0x2]
AND AL,0x1
MOV byte ptr [RSP + 0x3],AL
LEA RDI,[RSP + 0x3]
LEA RSI,[0x20ffac]
CALL 0x0018c0b0
MOV EAX,dword ptr [RSP + 0x4]
SUB EAX,-0x1f
MOVSXD RCX,EAX
LEA RAX,[0x210c10]
MOV RAX,qword ptr [RAX + RCX*0x8]
POP RCX
RET
|
/* fmt::v10::detail::dragonbox::cache_accessor<float>::get_cached_power(int) */
int8 fmt::v10::detail::dragonbox::cache_accessor<float>::get_cached_power(int param_1)
{
bool local_5;
int local_4;
local_4 = param_1;
ignore_unused<bool,char[18]>(&local_5,"k is out of range");
return *(int8 *)(get_cached_power(int)::pow10_significands + (long)(local_4 + 0x1f) * 8);
}
|
|
57,978
|
chess::Board::isRepetition(int) const
|
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
|
[[nodiscard]] bool isRepetition(int count = 2) const {
uint8_t c = 0;
// We start the loop from the back and go forward in moves, at most to the
// last move which reset the half-move counter because repetitions cant
// be across half-moves.
const auto size = static_cast<int>(prev_states_.size());
for (int i = size - 2; i >= 0 && i >= size - hfm_ - 1; i -= 2) {
if (prev_states_[i].hash == key_) c++;
if (c == count) return true;
}
return false;
}
|
O0
|
cpp
|
chess::Board::isRepetition(int) const:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movb $0x0, -0x15(%rbp)
addq $0x8, %rdi
callq 0x7220
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x20(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x20(%rbp)
movb %al, -0x29(%rbp)
jl 0x12e99
movq -0x28(%rbp), %rdx
movl -0x20(%rbp), %eax
movl -0x1c(%rbp), %ecx
movzbl 0xb4(%rdx), %edx
subl %edx, %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
setge %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x12ea2
jmp 0x12ee7
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movslq -0x20(%rbp), %rsi
callq 0x13130
movq -0x28(%rbp), %rcx
movq (%rax), %rax
cmpq 0xa0(%rcx), %rax
jne 0x12ecb
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
movzbl -0x15(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x12eda
movb $0x1, -0x1(%rbp)
jmp 0x12eeb
jmp 0x12edc
movl -0x20(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x20(%rbp)
jmp 0x12e70
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZNK5chess5Board12isRepetitionEi:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov rdi, [rbp+var_10]
mov [rbp+var_28], rdi
mov [rbp+var_15], 0
add rdi, 8
call _ZNKSt6vectorIN5chess5Board5StateESaIS2_EE4sizeEv; std::vector<chess::Board::State>::size(void)
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
sub eax, 2
mov [rbp+var_20], eax
loc_12E70:
xor eax, eax
cmp [rbp+var_20], 0
mov [rbp+var_29], al
jl short loc_12E99
mov rdx, [rbp+var_28]
mov eax, [rbp+var_20]
mov ecx, [rbp+var_1C]
movzx edx, byte ptr [rdx+0B4h]
sub ecx, edx
sub ecx, 1
cmp eax, ecx
setnl al
mov [rbp+var_29], al
loc_12E99:
mov al, [rbp+var_29]
test al, 1
jnz short loc_12EA2
jmp short loc_12EE7
loc_12EA2:
mov rdi, [rbp+var_28]
add rdi, 8
movsxd rsi, [rbp+var_20]
call _ZNKSt6vectorIN5chess5Board5StateESaIS2_EEixEm; std::vector<chess::Board::State>::operator[](ulong)
mov rcx, [rbp+var_28]
mov rax, [rax]
cmp rax, [rcx+0A0h]
jnz short loc_12ECB
mov al, [rbp+var_15]
add al, 1
mov [rbp+var_15], al
loc_12ECB:
movzx eax, [rbp+var_15]
cmp eax, [rbp+var_14]
jnz short loc_12EDA
mov [rbp+var_1], 1
jmp short loc_12EEB
loc_12EDA:
jmp short $+2
loc_12EDC:
mov eax, [rbp+var_20]
sub eax, 2
mov [rbp+var_20], eax
jmp short loc_12E70
loc_12EE7:
mov [rbp+var_1], 0
loc_12EEB:
mov al, [rbp+var_1]
and al, 1
add rsp, 30h
pop rbp
retn
|
char chess::Board::isRepetition(chess::Board *this, int a2)
{
bool v3; // [rsp+7h] [rbp-29h]
int i; // [rsp+10h] [rbp-20h]
int v5; // [rsp+14h] [rbp-1Ch]
unsigned __int8 v6; // [rsp+1Bh] [rbp-15h]
v6 = 0;
v5 = std::vector<chess::Board::State>::size((_QWORD *)this + 1);
for ( i = v5 - 2; ; i -= 2 )
{
v3 = 0;
if ( i >= 0 )
v3 = i >= v5 - *((unsigned __int8 *)this + 180) - 1;
if ( !v3 )
break;
if ( *(_QWORD *)std::vector<chess::Board::State>::operator[]((char *)this + 8, i) == *((_QWORD *)this + 20) )
++v6;
if ( v6 == a2 )
return 1;
}
return 0;
}
|
isRepetition:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV RDI,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RDI
MOV byte ptr [RBP + -0x15],0x0
ADD RDI,0x8
CALL 0x00107220
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x2
MOV dword ptr [RBP + -0x20],EAX
LAB_00112e70:
XOR EAX,EAX
CMP dword ptr [RBP + -0x20],0x0
MOV byte ptr [RBP + -0x29],AL
JL 0x00112e99
MOV RDX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x1c]
MOVZX EDX,byte ptr [RDX + 0xb4]
SUB ECX,EDX
SUB ECX,0x1
CMP EAX,ECX
SETGE AL
MOV byte ptr [RBP + -0x29],AL
LAB_00112e99:
MOV AL,byte ptr [RBP + -0x29]
TEST AL,0x1
JNZ 0x00112ea2
JMP 0x00112ee7
LAB_00112ea2:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x8
MOVSXD RSI,dword ptr [RBP + -0x20]
CALL 0x00113130
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RCX + 0xa0]
JNZ 0x00112ecb
MOV AL,byte ptr [RBP + -0x15]
ADD AL,0x1
MOV byte ptr [RBP + -0x15],AL
LAB_00112ecb:
MOVZX EAX,byte ptr [RBP + -0x15]
CMP EAX,dword ptr [RBP + -0x14]
JNZ 0x00112eda
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00112eeb
LAB_00112eda:
JMP 0x00112edc
LAB_00112edc:
MOV EAX,dword ptr [RBP + -0x20]
SUB EAX,0x2
MOV dword ptr [RBP + -0x20],EAX
JMP 0x00112e70
LAB_00112ee7:
MOV byte ptr [RBP + -0x1],0x0
LAB_00112eeb:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x30
POP RBP
RET
|
/* chess::Board::isRepetition(int) const */
int8 __thiscall chess::Board::isRepetition(Board *this,int param_1)
{
bool bVar1;
int iVar2;
uint3 uVar4;
uint7 uVar5;
long *plVar3;
int local_28;
byte local_1d;
int1 local_9;
local_1d = 0;
iVar2 = std::vector<chess::Board::State,std::allocator<chess::Board::State>>::size
((vector<chess::Board::State,std::allocator<chess::Board::State>> *)(this + 8));
local_28 = iVar2;
do {
local_28 = local_28 + -2;
uVar4 = 0;
bVar1 = false;
if (-1 < local_28) {
bVar1 = (int)((iVar2 - (uint)(byte)this[0xb4]) + -1) <= local_28;
uVar4 = (uint3)((uint)local_28 >> 8);
}
uVar5 = (uint7)uVar4;
if (!bVar1) {
local_9 = 0;
goto LAB_00112eeb;
}
plVar3 = (long *)std::vector<chess::Board::State,std::allocator<chess::Board::State>>::
operator[]((vector<chess::Board::State,std::allocator<chess::Board::State>> *)
(this + 8),(long)local_28);
if (*plVar3 == *(long *)(this + 0xa0)) {
local_1d = local_1d + 1;
}
uVar5 = 0;
} while ((uint)local_1d != param_1);
local_9 = 1;
LAB_00112eeb:
return CONCAT71(uVar5,local_9);
}
|
|
57,979
|
multi_alloc_root
|
eloqsql/mysys/my_alloc.c
|
void *multi_alloc_root(MEM_ROOT *root, ...)
{
va_list args;
char **ptr, *start, *res;
size_t tot_length, length;
DBUG_ENTER("multi_alloc_root");
/*
We don't need to do DBUG_PRINT here as it will be done when alloc_root
is called
*/
va_start(args, root);
tot_length= 0;
while ((ptr= va_arg(args, char **)))
{
length= va_arg(args, uint);
tot_length+= ALIGN_SIZE(length);
}
va_end(args);
if (!(start= (char*) alloc_root(root, tot_length)))
DBUG_RETURN(0); /* purecov: inspected */
va_start(args, root);
res= start;
while ((ptr= va_arg(args, char **)))
{
*ptr= res;
length= va_arg(args, uint);
res+= ALIGN_SIZE(length);
}
va_end(args);
DBUG_RETURN((void*) start);
}
|
O0
|
c
|
multi_alloc_root:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp # imm = 0x170
testb %al, %al
je 0xeea21
movaps %xmm0, -0xe0(%rbp)
movaps %xmm1, -0xd0(%rbp)
movaps %xmm2, -0xc0(%rbp)
movaps %xmm3, -0xb0(%rbp)
movaps %xmm4, -0xa0(%rbp)
movaps %xmm5, -0x90(%rbp)
movaps %xmm6, -0x80(%rbp)
movaps %xmm7, -0x70(%rbp)
movq %r9, -0xe8(%rbp)
movq %r8, -0xf0(%rbp)
movq %rcx, -0xf8(%rbp)
movq %rdx, -0x100(%rbp)
movq %rsi, -0x108(%rbp)
movq %rdi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq $0x0, -0x50(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x114(%rbp)
cmpl $0x28, %eax
ja 0xeeaaf
movq -0x120(%rbp), %rcx
movl -0x114(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x128(%rbp)
jmp 0xeeacc
movq -0x120(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0xeeb66
leaq -0x30(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x12c(%rbp)
cmpl $0x28, %eax
ja 0xeeb1f
movq -0x138(%rbp), %rcx
movl -0x12c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x140(%rbp)
jmp 0xeeb3c
movq -0x138(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0xeea74
leaq -0x30(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xee730
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0xeeb90
jmp 0xeeb83
movq $0x0, -0x8(%rbp)
jmp 0xeecc5
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x150(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x144(%rbp)
cmpl $0x28, %eax
ja 0xeebf7
movq -0x150(%rbp), %rcx
movl -0x144(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x158(%rbp)
jmp 0xeec14
movq -0x150(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0xeecb9
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
leaq -0x30(%rbp), %rax
movq %rax, -0x168(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x15c(%rbp)
cmpl $0x28, %eax
ja 0xeec72
movq -0x168(%rbp), %rcx
movl -0x15c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x170(%rbp)
jmp 0xeec8f
movq -0x168(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xeebbc
leaq -0x30(%rbp), %rax
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x170, %rsp # imm = 0x170
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
multi_alloc_root:
push rbp
mov rbp, rsp
sub rsp, 170h
test al, al
jz short loc_EEA21
movaps [rbp+var_E0], xmm0
movaps [rbp+var_D0], xmm1
movaps [rbp+var_C0], xmm2
movaps [rbp+var_B0], xmm3
movaps [rbp+var_A0], xmm4
movaps [rbp+var_90], xmm5
movaps [rbp+var_80], xmm6
movaps [rbp+var_70], xmm7
loc_EEA21:
mov [rbp+var_E8], r9
mov [rbp+var_F0], r8
mov [rbp+var_F8], rcx
mov [rbp+var_100], rdx
mov [rbp+var_108], rsi
mov [rbp+var_10], rdi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 8
mov [rbp+var_50], 0
loc_EEA74:
lea rax, [rbp+var_30]
mov [rbp+var_120], rax
mov eax, [rbp+var_30]
mov [rbp+var_114], eax
cmp eax, 28h ; '('
ja short loc_EEAAF
mov rcx, [rbp+var_120]
mov edx, [rbp+var_114]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_128], rax
jmp short loc_EEACC
loc_EEAAF:
mov rcx, [rbp+var_120]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_128], rax
loc_EEACC:
mov rax, [rbp+var_128]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_EEB66
lea rax, [rbp+var_30]
mov [rbp+var_138], rax
mov eax, [rbp+var_30]
mov [rbp+var_12C], eax
cmp eax, 28h ; '('
ja short loc_EEB1F
mov rcx, [rbp+var_138]
mov edx, [rbp+var_12C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_140], rax
jmp short loc_EEB3C
loc_EEB1F:
mov rcx, [rbp+var_138]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_140], rax
loc_EEB3C:
mov rax, [rbp+var_140]
mov eax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, [rbp+var_50]
mov [rbp+var_50], rax
jmp loc_EEA74
loc_EEB66:
lea rax, [rbp+var_30]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_50]
call alloc_root
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_EEB90
jmp short $+2
loc_EEB83:
mov [rbp+var_8], 0
jmp loc_EECC5
loc_EEB90:
lea rax, [rbp+var_30]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 8
mov rax, [rbp+var_40]
mov [rbp+var_48], rax
loc_EEBBC:
lea rax, [rbp+var_30]
mov [rbp+var_150], rax
mov eax, [rbp+var_30]
mov [rbp+var_144], eax
cmp eax, 28h ; '('
ja short loc_EEBF7
mov rcx, [rbp+var_150]
mov edx, [rbp+var_144]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_158], rax
jmp short loc_EEC14
loc_EEBF7:
mov rcx, [rbp+var_150]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_158], rax
loc_EEC14:
mov rax, [rbp+var_158]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_EECB9
mov rcx, [rbp+var_48]
mov rax, [rbp+var_38]
mov [rax], rcx
lea rax, [rbp+var_30]
mov [rbp+var_168], rax
mov eax, [rbp+var_30]
mov [rbp+var_15C], eax
cmp eax, 28h ; '('
ja short loc_EEC72
mov rcx, [rbp+var_168]
mov edx, [rbp+var_15C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_170], rax
jmp short loc_EEC8F
loc_EEC72:
mov rcx, [rbp+var_168]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_170], rax
loc_EEC8F:
mov rax, [rbp+var_170]
mov eax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, [rbp+var_48]
mov [rbp+var_48], rax
jmp loc_EEBBC
loc_EECB9:
lea rax, [rbp+var_30]
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_EECC5:
mov rax, [rbp+var_8]
add rsp, 170h
pop rbp
retn
|
char * multi_alloc_root(
_QWORD **a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char *v15; // rax
char *v16; // rax
char *v17; // rax
char *v18; // rax
char v20; // [rsp+60h] [rbp-110h] BYREF
long long v21; // [rsp+68h] [rbp-108h]
long long v22; // [rsp+70h] [rbp-100h]
long long v23; // [rsp+78h] [rbp-F8h]
long long v24; // [rsp+80h] [rbp-F0h]
long long v25; // [rsp+88h] [rbp-E8h]
__m128 v26; // [rsp+90h] [rbp-E0h]
__m128 v27; // [rsp+A0h] [rbp-D0h]
__m128 v28; // [rsp+B0h] [rbp-C0h]
__m128 v29; // [rsp+C0h] [rbp-B0h]
__m128 v30; // [rsp+D0h] [rbp-A0h]
__m128 v31; // [rsp+E0h] [rbp-90h]
__m128 v32; // [rsp+F0h] [rbp-80h]
__m128 v33; // [rsp+100h] [rbp-70h]
long long v34; // [rsp+118h] [rbp-58h]
long long i; // [rsp+120h] [rbp-50h]
char *j; // [rsp+128h] [rbp-48h]
char *v37; // [rsp+130h] [rbp-40h]
char **v38; // [rsp+138h] [rbp-38h]
int v39; // [rsp+140h] [rbp-30h]
int v40; // [rsp+144h] [rbp-2Ch]
char *v41; // [rsp+148h] [rbp-28h]
char *v42; // [rsp+150h] [rbp-20h]
_QWORD **v43; // [rsp+160h] [rbp-10h]
v26 = a7;
v27 = a8;
v28 = a9;
v29 = a10;
v30 = a11;
v31 = a12;
v32 = a13;
v33 = a14;
v25 = a6;
v24 = a5;
v23 = a4;
v22 = a3;
v21 = a2;
v43 = a1;
v42 = &v20;
v41 = &a15;
v40 = 48;
v39 = 8;
for ( i = 0LL; ; i += (v34 + 7) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( (unsigned int)v39 > 0x28 )
{
v15 = v41;
v41 += 8;
}
else
{
v15 = &v42[v39];
v39 += 8;
}
v38 = *(char ***)v15;
if ( !v38 )
break;
if ( (unsigned int)v39 > 0x28 )
{
v16 = v41;
v41 += 8;
}
else
{
v16 = &v42[v39];
v39 += 8;
}
v34 = *(unsigned int *)v16;
}
v37 = alloc_root(v43, i);
if ( !v37 )
return 0LL;
v42 = &v20;
v41 = &a15;
v40 = 48;
v39 = 8;
for ( j = v37; ; j += (v34 + 7) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( (unsigned int)v39 > 0x28 )
{
v17 = v41;
v41 += 8;
}
else
{
v17 = &v42[v39];
v39 += 8;
}
v38 = *(char ***)v17;
if ( !v38 )
break;
*v38 = j;
if ( (unsigned int)v39 > 0x28 )
{
v18 = v41;
v41 += 8;
}
else
{
v18 = &v42[v39];
v39 += 8;
}
v34 = *(unsigned int *)v18;
}
return v37;
}
|
multi_alloc_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x170
TEST AL,AL
JZ 0x001eea21
MOVAPS xmmword ptr [RBP + -0xe0],XMM0
MOVAPS xmmword ptr [RBP + -0xd0],XMM1
MOVAPS xmmword ptr [RBP + -0xc0],XMM2
MOVAPS xmmword ptr [RBP + -0xb0],XMM3
MOVAPS xmmword ptr [RBP + -0xa0],XMM4
MOVAPS xmmword ptr [RBP + -0x90],XMM5
MOVAPS xmmword ptr [RBP + -0x80],XMM6
MOVAPS xmmword ptr [RBP + -0x70],XMM7
LAB_001eea21:
MOV qword ptr [RBP + -0xe8],R9
MOV qword ptr [RBP + -0xf0],R8
MOV qword ptr [RBP + -0xf8],RCX
MOV qword ptr [RBP + -0x100],RDX
MOV qword ptr [RBP + -0x108],RSI
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x110]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x8
MOV qword ptr [RBP + -0x50],0x0
LAB_001eea74:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x120],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x114],EAX
CMP EAX,0x28
JA 0x001eeaaf
MOV RCX,qword ptr [RBP + -0x120]
MOV EDX,dword ptr [RBP + -0x114]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x128],RAX
JMP 0x001eeacc
LAB_001eeaaf:
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x128],RAX
LAB_001eeacc:
MOV RAX,qword ptr [RBP + -0x128]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x001eeb66
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x138],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x12c],EAX
CMP EAX,0x28
JA 0x001eeb1f
MOV RCX,qword ptr [RBP + -0x138]
MOV EDX,dword ptr [RBP + -0x12c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x140],RAX
JMP 0x001eeb3c
LAB_001eeb1f:
MOV RCX,qword ptr [RBP + -0x138]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x140],RAX
LAB_001eeb3c:
MOV RAX,qword ptr [RBP + -0x140]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001eea74
LAB_001eeb66:
LEA RAX,[RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x50]
CALL 0x001ee730
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JNZ 0x001eeb90
JMP 0x001eeb83
LAB_001eeb83:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001eecc5
LAB_001eeb90:
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x110]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x8
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x48],RAX
LAB_001eebbc:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x150],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x144],EAX
CMP EAX,0x28
JA 0x001eebf7
MOV RCX,qword ptr [RBP + -0x150]
MOV EDX,dword ptr [RBP + -0x144]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x158],RAX
JMP 0x001eec14
LAB_001eebf7:
MOV RCX,qword ptr [RBP + -0x150]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x158],RAX
LAB_001eec14:
MOV RAX,qword ptr [RBP + -0x158]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x001eecb9
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x168],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x15c],EAX
CMP EAX,0x28
JA 0x001eec72
MOV RCX,qword ptr [RBP + -0x168]
MOV EDX,dword ptr [RBP + -0x15c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x170],RAX
JMP 0x001eec8f
LAB_001eec72:
MOV RCX,qword ptr [RBP + -0x168]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x170],RAX
LAB_001eec8f:
MOV RAX,qword ptr [RBP + -0x170]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001eebbc
LAB_001eecb9:
LEA RAX,[RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_001eecc5:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x170
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
long multi_alloc_root(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
uint *local_178;
uint *local_160;
uint *local_148;
uint *local_130;
uint local_118 [2];
int8 local_110;
int8 local_108;
int8 local_100;
int8 local_f8;
int8 local_f0;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
ulong local_60;
long local_58;
long local_50;
long local_40;
uint local_38;
int4 local_34;
uint *local_30;
uint *local_28;
int8 local_18;
long local_10;
if (in_AL != '\0') {
local_e8 = param_1;
local_d8 = param_2;
local_c8 = param_3;
local_b8 = param_4;
local_a8 = param_5;
local_98 = param_6;
local_88 = param_7;
local_78 = param_8;
}
local_28 = local_118;
local_30 = (uint *)&stack0x00000008;
local_34 = 0x30;
local_38 = 8;
local_58 = 0;
while( true ) {
if (local_38 < 0x29) {
local_130 = (uint *)((long)local_28 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_130 = local_30;
local_30 = local_30 + 2;
}
local_40 = *(long *)local_130;
if (local_40 == 0) break;
if (local_38 < 0x29) {
local_148 = (uint *)((long)local_28 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_148 = local_30;
local_30 = local_30 + 2;
}
local_60 = (ulong)*local_148;
local_58 = (local_60 + 7 & 0xfffffffffffffff8) + local_58;
}
local_110 = param_10;
local_108 = param_11;
local_100 = param_12;
local_f8 = param_13;
local_f0 = param_14;
local_18 = param_9;
local_10 = alloc_root(param_9,local_58);
if (local_10 == 0) {
local_10 = 0;
}
else {
local_30 = (uint *)&stack0x00000008;
local_38 = 8;
local_50 = local_10;
while( true ) {
if (local_38 < 0x29) {
local_160 = (uint *)((long)local_118 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_160 = local_30;
local_30 = local_30 + 2;
}
if (*(long **)local_160 == (long *)0x0) break;
**(long **)local_160 = local_50;
if (local_38 < 0x29) {
local_178 = (uint *)((long)local_118 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_178 = local_30;
local_30 = local_30 + 2;
}
local_50 = ((ulong)*local_178 + 7 & 0xfffffffffffffff8) + local_50;
}
}
return local_10;
}
|
|
57,980
|
r3d_shader_load_raster_geometry
|
r3d/src/r3d_state.c
|
void r3d_shader_load_raster_geometry(void)
{
R3D.shader.raster.geometry.id = rlLoadShaderCode(
VS_RASTER_GEOMETRY, FS_RASTER_GEOMETRY
);
r3d_shader_get_location(raster.geometry, uMatNormal);
r3d_shader_get_location(raster.geometry, uMatModel);
r3d_shader_get_location(raster.geometry, uMatMVP);
r3d_shader_get_location(raster.geometry, uTexCoordOffset);
r3d_shader_get_location(raster.geometry, uTexCoordScale);
r3d_shader_get_location(raster.geometry, uTexAlbedo);
r3d_shader_get_location(raster.geometry, uTexNormal);
r3d_shader_get_location(raster.geometry, uTexEmission);
r3d_shader_get_location(raster.geometry, uTexOcclusion);
r3d_shader_get_location(raster.geometry, uTexRoughness);
r3d_shader_get_location(raster.geometry, uTexMetalness);
r3d_shader_get_location(raster.geometry, uValEmission);
r3d_shader_get_location(raster.geometry, uValOcclusion);
r3d_shader_get_location(raster.geometry, uValRoughness);
r3d_shader_get_location(raster.geometry, uValMetalness);
r3d_shader_get_location(raster.geometry, uColAlbedo);
r3d_shader_get_location(raster.geometry, uColEmission);
r3d_shader_enable(raster.geometry);
r3d_shader_set_sampler2D_slot(raster.geometry, uTexAlbedo, 0);
r3d_shader_set_sampler2D_slot(raster.geometry, uTexNormal, 1);
r3d_shader_set_sampler2D_slot(raster.geometry, uTexEmission, 2);
r3d_shader_set_sampler2D_slot(raster.geometry, uTexOcclusion, 3);
r3d_shader_set_sampler2D_slot(raster.geometry, uTexRoughness, 4);
r3d_shader_set_sampler2D_slot(raster.geometry, uTexMetalness, 5);
r3d_shader_disable();
}
|
O3
|
c
|
r3d_shader_load_raster_geometry:
pushq %rbp
movq %rsp, %rbp
leaq 0x5902f(%rip), %rdi # 0x119b40
leaq 0x59b08(%rip), %rsi # 0x11a620
callq 0x1e60d
movl %eax, 0xef681(%rip) # 0x1b01a4
leaq 0x50371(%rip), %rsi # 0x110e9b
movl %eax, %edi
callq 0x1ea66
movl %eax, 0xef671(%rip) # 0x1b01a8
movl 0xef667(%rip), %edi # 0x1b01a4
leaq 0x50362(%rip), %rsi # 0x110ea6
callq 0x1ea66
movl %eax, 0xef65d(%rip) # 0x1b01ac
movl 0xef64f(%rip), %edi # 0x1b01a4
leaq 0x50354(%rip), %rsi # 0x110eb0
callq 0x1ea66
movl %eax, 0xef649(%rip) # 0x1b01b0
movl 0xef637(%rip), %edi # 0x1b01a4
leaq 0x50344(%rip), %rsi # 0x110eb8
callq 0x1ea66
movl %eax, 0xef63d(%rip) # 0x1b01bc
movl 0xef61f(%rip), %edi # 0x1b01a4
leaq 0x5033c(%rip), %rsi # 0x110ec8
callq 0x1ea66
movl %eax, 0xef631(%rip) # 0x1b01c8
movl 0xef607(%rip), %edi # 0x1b01a4
leaq 0x50333(%rip), %rsi # 0x110ed7
callq 0x1ea66
movl %eax, 0xef621(%rip) # 0x1b01d0
movl 0xef5ef(%rip), %edi # 0x1b01a4
leaq 0x50326(%rip), %rsi # 0x110ee2
callq 0x1ea66
movl %eax, 0xef611(%rip) # 0x1b01d8
movl 0xef5d7(%rip), %edi # 0x1b01a4
leaq 0x50319(%rip), %rsi # 0x110eed
callq 0x1ea66
movl %eax, 0xef601(%rip) # 0x1b01e0
movl 0xef5bf(%rip), %edi # 0x1b01a4
leaq 0x5030e(%rip), %rsi # 0x110efa
callq 0x1ea66
movl %eax, 0xef5f1(%rip) # 0x1b01e8
movl 0xef5a7(%rip), %edi # 0x1b01a4
leaq 0x50304(%rip), %rsi # 0x110f08
callq 0x1ea66
movl %eax, 0xef5e1(%rip) # 0x1b01f0
movl 0xef58f(%rip), %edi # 0x1b01a4
leaq 0x502fa(%rip), %rsi # 0x110f16
callq 0x1ea66
movl %eax, 0xef5d1(%rip) # 0x1b01f8
movl 0xef577(%rip), %edi # 0x1b01a4
leaq 0x502f0(%rip), %rsi # 0x110f24
callq 0x1ea66
movl %eax, 0xef5c1(%rip) # 0x1b0200
movl 0xef55f(%rip), %edi # 0x1b01a4
leaq 0x502e5(%rip), %rsi # 0x110f31
callq 0x1ea66
movl %eax, 0xef5b1(%rip) # 0x1b0208
movl 0xef547(%rip), %edi # 0x1b01a4
leaq 0x502db(%rip), %rsi # 0x110f3f
callq 0x1ea66
movl %eax, 0xef5a1(%rip) # 0x1b0210
movl 0xef52f(%rip), %edi # 0x1b01a4
leaq 0x502d1(%rip), %rsi # 0x110f4d
callq 0x1ea66
movl %eax, 0xef591(%rip) # 0x1b0218
movl 0xef517(%rip), %edi # 0x1b01a4
leaq 0x502c7(%rip), %rsi # 0x110f5b
callq 0x1ea66
movl %eax, 0xef589(%rip) # 0x1b0228
movl 0xef4ff(%rip), %edi # 0x1b01a4
leaq 0x502ba(%rip), %rsi # 0x110f66
callq 0x1ea66
movl %eax, 0xef581(%rip) # 0x1b0238
movl 0xef4e7(%rip), %edi # 0x1b01a4
callq 0x1be92
cmpl $0x0, 0xef503(%rip) # 0x1b01cc
je 0xc0cf1
movl $0x0, 0xef4f7(%rip) # 0x1b01cc
leaq 0xef4f0(%rip), %rsi # 0x1b01cc
movl 0xef4ee(%rip), %edi # 0x1b01d0
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1ea82
cmpl $0x1, 0xef4dc(%rip) # 0x1b01d4
je 0xc0d20
movl $0x1, 0xef4d0(%rip) # 0x1b01d4
leaq 0xef4c9(%rip), %rsi # 0x1b01d4
movl 0xef4c7(%rip), %edi # 0x1b01d8
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1ea82
cmpl $0x2, 0xef4b5(%rip) # 0x1b01dc
je 0xc0d4f
movl $0x2, 0xef4a9(%rip) # 0x1b01dc
leaq 0xef4a2(%rip), %rsi # 0x1b01dc
movl 0xef4a0(%rip), %edi # 0x1b01e0
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1ea82
cmpl $0x3, 0xef48e(%rip) # 0x1b01e4
je 0xc0d7e
movl $0x3, 0xef482(%rip) # 0x1b01e4
leaq 0xef47b(%rip), %rsi # 0x1b01e4
movl 0xef479(%rip), %edi # 0x1b01e8
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1ea82
cmpl $0x4, 0xef467(%rip) # 0x1b01ec
je 0xc0dad
movl $0x4, 0xef45b(%rip) # 0x1b01ec
leaq 0xef454(%rip), %rsi # 0x1b01ec
movl 0xef452(%rip), %edi # 0x1b01f0
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1ea82
cmpl $0x5, 0xef440(%rip) # 0x1b01f4
je 0xc0ddc
movl $0x5, 0xef434(%rip) # 0x1b01f4
leaq 0xef42d(%rip), %rsi # 0x1b01f4
movl 0xef42b(%rip), %edi # 0x1b01f8
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1ea82
popq %rbp
jmp 0x1be9d
|
r3d_shader_load_raster_geometry:
push rbp
mov rbp, rsp
lea rdi, VS_RASTER_GEOMETRY; "#version 330 core\nlayout(location=0)in"...
lea rsi, FS_RASTER_GEOMETRY; "#version 330 core\nflat in vec3 vEmissi"...
call rlLoadShaderCode
mov cs:dword_1B01A4, eax
lea rsi, aUmatnormal; "uMatNormal"
mov edi, eax
call rlGetLocationUniform
mov cs:dword_1B01A8, eax
mov edi, cs:dword_1B01A4
lea rsi, aUmatmodel; "uMatModel"
call rlGetLocationUniform
mov cs:dword_1B01AC, eax
mov edi, cs:dword_1B01A4
lea rsi, aUmatmvp; "uMatMVP"
call rlGetLocationUniform
mov cs:dword_1B01B0, eax
mov edi, cs:dword_1B01A4
lea rsi, aUtexcoordoffse; "uTexCoordOffset"
call rlGetLocationUniform
mov cs:dword_1B01BC, eax
mov edi, cs:dword_1B01A4
lea rsi, aUtexcoordscale; "uTexCoordScale"
call rlGetLocationUniform
mov cs:dword_1B01C8, eax
mov edi, cs:dword_1B01A4
lea rsi, aUtexalbedo; "uTexAlbedo"
call rlGetLocationUniform
mov cs:dword_1B01D0, eax
mov edi, cs:dword_1B01A4
lea rsi, aUtexnormal; "uTexNormal"
call rlGetLocationUniform
mov cs:dword_1B01D8, eax
mov edi, cs:dword_1B01A4
lea rsi, aUtexemission; "uTexEmission"
call rlGetLocationUniform
mov cs:dword_1B01E0, eax
mov edi, cs:dword_1B01A4
lea rsi, aUtexocclusion; "uTexOcclusion"
call rlGetLocationUniform
mov cs:dword_1B01E8, eax
mov edi, cs:dword_1B01A4
lea rsi, aUtexroughness; "uTexRoughness"
call rlGetLocationUniform
mov cs:dword_1B01F0, eax
mov edi, cs:dword_1B01A4
lea rsi, aUtexmetalness; "uTexMetalness"
call rlGetLocationUniform
mov cs:dword_1B01F8, eax
mov edi, cs:dword_1B01A4
lea rsi, aUvalemission; "uValEmission"
call rlGetLocationUniform
mov cs:dword_1B0200, eax
mov edi, cs:dword_1B01A4
lea rsi, aUvalocclusion; "uValOcclusion"
call rlGetLocationUniform
mov cs:dword_1B0208, eax
mov edi, cs:dword_1B01A4
lea rsi, aUvalroughness; "uValRoughness"
call rlGetLocationUniform
mov cs:dword_1B0210, eax
mov edi, cs:dword_1B01A4
lea rsi, aUvalmetalness; "uValMetalness"
call rlGetLocationUniform
mov cs:dword_1B0218, eax
mov edi, cs:dword_1B01A4
lea rsi, aUcolalbedo; "uColAlbedo"
call rlGetLocationUniform
mov cs:dword_1B0228, eax
mov edi, cs:dword_1B01A4
lea rsi, aUcolemission; "uColEmission"
call rlGetLocationUniform
mov cs:dword_1B0238, eax
mov edi, cs:dword_1B01A4
call rlEnableShader
cmp cs:dword_1B01CC, 0
jz short loc_C0CF1
mov cs:dword_1B01CC, 0
lea rsi, dword_1B01CC
mov edi, cs:dword_1B01D0
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C0CF1:
cmp cs:dword_1B01D4, 1
jz short loc_C0D20
mov cs:dword_1B01D4, 1
lea rsi, dword_1B01D4
mov edi, cs:dword_1B01D8
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C0D20:
cmp cs:dword_1B01DC, 2
jz short loc_C0D4F
mov cs:dword_1B01DC, 2
lea rsi, dword_1B01DC
mov edi, cs:dword_1B01E0
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C0D4F:
cmp cs:dword_1B01E4, 3
jz short loc_C0D7E
mov cs:dword_1B01E4, 3
lea rsi, dword_1B01E4
mov edi, cs:dword_1B01E8
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C0D7E:
cmp cs:dword_1B01EC, 4
jz short loc_C0DAD
mov cs:dword_1B01EC, 4
lea rsi, dword_1B01EC
mov edi, cs:dword_1B01F0
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C0DAD:
cmp cs:dword_1B01F4, 5
jz short loc_C0DDC
mov cs:dword_1B01F4, 5
lea rsi, dword_1B01F4
mov edi, cs:dword_1B01F8
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C0DDC:
pop rbp
jmp rlDisableShader
|
long long r3d_shader_load_raster_geometry()
{
int v0; // r8d
int v1; // r9d
dword_1B01A4 = rlLoadShaderCode(
(long long)"#version 330 core\n"
"layout(location=0)in vec3 aPosition;layout(location=1)in vec2 aTexCoord;layout(location=2)in"
" vec3 aNormal;layout(location=3)in vec4 aColor;layout(location=4)in vec4 aTangent;uniform ma"
"t4 uMatNormal;uniform mat4 uMatModel;uniform mat4 uMatMVP;uniform float uValEmission;uniform"
" vec3 uColEmission;uniform vec3 uColAlbedo;uniform vec2 uTexCoordOffset;uniform vec2 uTexCoo"
"rdScale;flat out vec3 vEmission;out vec2 vTexCoord;out vec3 vColor;out mat3 vTBN;void main()"
"{vTexCoord=uTexCoordOffset+aTexCoord*uTexCoordScale;vColor=aColor.rgb*uColAlbedo;vEmission=u"
"ColEmission*uValEmission;vec3 T=normalize(vec3(uMatModel*vec4(aTangent.xyz,0.0)));vec3 N=nor"
"malize(vec3(uMatNormal*vec4(aNormal,0.0)));vec3 B=normalize(cross(N,T))*aTangent.w;vTBN=mat3"
"(T,B,N);gl_Position=uMatMVP*vec4(aPosition,1.0);}",
(long long)"#version 330 core\n"
"flat in vec3 vEmission;in vec2 vTexCoord;in vec3 vColor;in mat3 vTBN;uniform sampler2D uTexA"
"lbedo;uniform sampler2D uTexNormal;uniform sampler2D uTexEmission;uniform sampler2D uTexOccl"
"usion;uniform sampler2D uTexRoughness;uniform sampler2D uTexMetalness;uniform float uValOccl"
"usion;uniform float uValRoughness;uniform float uValMetalness;layout(location=0)out vec3 a;l"
"ayout(location=1)out vec3 b;layout(location=2)out vec2 c;layout(location=3)out vec3 d;vec2 E"
"ncodeOctahedral(vec3 f){f/=abs(f.x)+abs(f.y)+abs(f.z);vec2 e=f.xy;if(f.z < 0.0){vec2 g=vec2("
"f.x >=0.0 ? 1.0 :-1.0,f.y >=0.0 ? 1.0 :-1.0);e=(1.0-abs(e.yx))*g;}return e*0.5+0.5;}void mai"
"n(){a=vColor*texture(uTexAlbedo,vTexCoord).rgb;b=vEmission*texture(uTexEmission,vTexCoord).r"
"gb;c=EncodeOctahedral(normalize(vTBN*(texture(uTexNormal,vTexCoord).rgb*2.0-1.0)));d.r=uValO"
"cclusion*texture(uTexOcclusion,vTexCoord).r;d.g=uValRoughness*texture(uTexRoughness,vTexCoor"
"d).g;d.b=uValMetalness*texture(uTexMetalness,vTexCoord).b;}");
dword_1B01A8 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uMatNormal");
dword_1B01AC = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uMatModel");
dword_1B01B0 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uMatMVP");
dword_1B01BC = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uTexCoordOffset");
dword_1B01C8 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uTexCoordScale");
dword_1B01D0 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uTexAlbedo");
dword_1B01D8 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uTexNormal");
dword_1B01E0 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uTexEmission");
dword_1B01E8 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uTexOcclusion");
dword_1B01F0 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uTexRoughness");
dword_1B01F8 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uTexMetalness");
dword_1B0200 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uValEmission");
dword_1B0208 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uValOcclusion");
dword_1B0210 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uValRoughness");
dword_1B0218 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uValMetalness");
dword_1B0228 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uColAlbedo");
dword_1B0238 = rlGetLocationUniform((unsigned int)dword_1B01A4, (long long)"uColEmission");
rlEnableShader((unsigned int)dword_1B01A4);
if ( dword_1B01CC )
{
dword_1B01CC = 0;
rlSetUniform((unsigned int)dword_1B01D0, (long long)&dword_1B01CC, 4, 1u, v0, v1);
}
if ( dword_1B01D4 != 1 )
{
dword_1B01D4 = 1;
rlSetUniform((unsigned int)dword_1B01D8, (long long)&dword_1B01D4, 4, 1u, v0, v1);
}
if ( dword_1B01DC != 2 )
{
dword_1B01DC = 2;
rlSetUniform((unsigned int)dword_1B01E0, (long long)&dword_1B01DC, 4, 1u, v0, v1);
}
if ( dword_1B01E4 != 3 )
{
dword_1B01E4 = 3;
rlSetUniform((unsigned int)dword_1B01E8, (long long)&dword_1B01E4, 4, 1u, v0, v1);
}
if ( dword_1B01EC != 4 )
{
dword_1B01EC = 4;
rlSetUniform((unsigned int)dword_1B01F0, (long long)&dword_1B01EC, 4, 1u, v0, v1);
}
if ( dword_1B01F4 != 5 )
{
dword_1B01F4 = 5;
rlSetUniform((unsigned int)dword_1B01F8, (long long)&dword_1B01F4, 4, 1u, v0, v1);
}
return rlDisableShader();
}
|
r3d_shader_load_raster_geometry:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x219b40]
LEA RSI,[0x21a620]
CALL 0x0011e60d
MOV dword ptr [0x002b01a4],EAX
LEA RSI,[0x210e9b]
MOV EDI,EAX
CALL 0x0011ea66
MOV dword ptr [0x002b01a8],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210ea6]
CALL 0x0011ea66
MOV dword ptr [0x002b01ac],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210eb0]
CALL 0x0011ea66
MOV dword ptr [0x002b01b0],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210eb8]
CALL 0x0011ea66
MOV dword ptr [0x002b01bc],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210ec8]
CALL 0x0011ea66
MOV dword ptr [0x002b01c8],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210ed7]
CALL 0x0011ea66
MOV dword ptr [0x002b01d0],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210ee2]
CALL 0x0011ea66
MOV dword ptr [0x002b01d8],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210eed]
CALL 0x0011ea66
MOV dword ptr [0x002b01e0],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210efa]
CALL 0x0011ea66
MOV dword ptr [0x002b01e8],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210f08]
CALL 0x0011ea66
MOV dword ptr [0x002b01f0],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210f16]
CALL 0x0011ea66
MOV dword ptr [0x002b01f8],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210f24]
CALL 0x0011ea66
MOV dword ptr [0x002b0200],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210f31]
CALL 0x0011ea66
MOV dword ptr [0x002b0208],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210f3f]
CALL 0x0011ea66
MOV dword ptr [0x002b0210],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210f4d]
CALL 0x0011ea66
MOV dword ptr [0x002b0218],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210f5b]
CALL 0x0011ea66
MOV dword ptr [0x002b0228],EAX
MOV EDI,dword ptr [0x002b01a4]
LEA RSI,[0x210f66]
CALL 0x0011ea66
MOV dword ptr [0x002b0238],EAX
MOV EDI,dword ptr [0x002b01a4]
CALL 0x0011be92
CMP dword ptr [0x002b01cc],0x0
JZ 0x001c0cf1
MOV dword ptr [0x002b01cc],0x0
LEA RSI,[0x2b01cc]
MOV EDI,dword ptr [0x002b01d0]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011ea82
LAB_001c0cf1:
CMP dword ptr [0x002b01d4],0x1
JZ 0x001c0d20
MOV dword ptr [0x002b01d4],0x1
LEA RSI,[0x2b01d4]
MOV EDI,dword ptr [0x002b01d8]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011ea82
LAB_001c0d20:
CMP dword ptr [0x002b01dc],0x2
JZ 0x001c0d4f
MOV dword ptr [0x002b01dc],0x2
LEA RSI,[0x2b01dc]
MOV EDI,dword ptr [0x002b01e0]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011ea82
LAB_001c0d4f:
CMP dword ptr [0x002b01e4],0x3
JZ 0x001c0d7e
MOV dword ptr [0x002b01e4],0x3
LEA RSI,[0x2b01e4]
MOV EDI,dword ptr [0x002b01e8]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011ea82
LAB_001c0d7e:
CMP dword ptr [0x002b01ec],0x4
JZ 0x001c0dad
MOV dword ptr [0x002b01ec],0x4
LEA RSI,[0x2b01ec]
MOV EDI,dword ptr [0x002b01f0]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011ea82
LAB_001c0dad:
CMP dword ptr [0x002b01f4],0x5
JZ 0x001c0ddc
MOV dword ptr [0x002b01f4],0x5
LEA RSI,[0x2b01f4]
MOV EDI,dword ptr [0x002b01f8]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011ea82
LAB_001c0ddc:
POP RBP
JMP 0x0011be9d
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void r3d_shader_load_raster_geometry(void)
{
DAT_002b01a4 = rlLoadShaderCode("#version 330 core\nlayout(location=0)in vec3 aPosition;layout(location=1)in vec2 aTexCoord;layout(location=2)in vec3 aNormal;layout(location=3)in vec4 aColor;layout(location=4)in vec4 aTangent;uniform mat4 uMatNormal;uniform mat4 uMatModel;uniform mat4 uMatMVP;uniform float uValEmission;uniform vec3 uColEmission;uniform vec3 uColAlbedo;uniform vec2 uTexCoordOffset;uniform vec2 uTexCoordScale;flat out vec3 vEmission;out vec2 vTexCoord;out vec3 vColor;out mat3 vTBN;void main(){vTexCoord=uTexCoordOffset+aTexCoord*uTexCoordScale;vColor=aColor.rgb*uColAlbedo;vEmission=uColEmission*uValEmission;vec3 T=normalize(vec3(uMatModel*vec4(aTangent.xyz,0.0)));vec3 N=normalize(vec3(uMatNormal*vec4(aNormal,0.0)));vec3 B=normalize(cross(N,T))*aTangent.w;vTBN=mat3(T,B,N);gl_Position=uMatMVP*vec4(aPosition,1.0);}"
,
"#version 330 core\nflat in vec3 vEmission;in vec2 vTexCoord;in vec3 vColor;in mat3 vTBN;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;uniform sampler2D uTexEmission;uniform sampler2D uTexOcclusion;uniform sampler2D uTexRoughness;uniform sampler2D uTexMetalness;uniform float uValOcclusion;uniform float uValRoughness;uniform float uValMetalness;layout(location=0)out vec3 a;layout(location=1)out vec3 b;layout(location=2)out vec2 c;layout(location=3)out vec3 d;vec2 EncodeOctahedral(vec3 f){f/=abs(f.x)+abs(f.y)+abs(f.z);vec2 e=f.xy;if(f.z < 0.0){vec2 g=vec2(f.x >=0.0 ? 1.0 :-1.0,f.y >=0.0 ? 1.0 :-1.0);e=(1.0-abs(e.yx))*g;}return e*0.5+0.5;}void main(){a=vColor*texture(uTexAlbedo,vTexCoord).rgb;b=vEmission*texture(uTexEmission,vTexCoord).rgb;c=EncodeOctahedral(normalize(vTBN*(texture(uTexNormal,vTexCoord).rgb*2.0-1.0)));d.r=uValOcclusion*texture(uTexOcclusion,vTexCoord).r;d.g=uValRoughness*texture(uTexRoughness,vTexCoord).g;d.b=uValMetalness*texture(uTexMetalness,vTexCoord).b;}"
);
_DAT_002b01a8 = rlGetLocationUniform(DAT_002b01a4,"uMatNormal");
_DAT_002b01ac = rlGetLocationUniform(DAT_002b01a4,"uMatModel");
_DAT_002b01b0 = rlGetLocationUniform(DAT_002b01a4,"uMatMVP");
_DAT_002b01bc = rlGetLocationUniform(DAT_002b01a4,"uTexCoordOffset");
_DAT_002b01c8 = rlGetLocationUniform(DAT_002b01a4,"uTexCoordScale");
_DAT_002b01d0 = rlGetLocationUniform(DAT_002b01a4,"uTexAlbedo");
_DAT_002b01d8 = rlGetLocationUniform(DAT_002b01a4,"uTexNormal");
_DAT_002b01e0 = rlGetLocationUniform(DAT_002b01a4,"uTexEmission");
_DAT_002b01e8 = rlGetLocationUniform(DAT_002b01a4,"uTexOcclusion");
_DAT_002b01f0 = rlGetLocationUniform(DAT_002b01a4,"uTexRoughness");
_DAT_002b01f8 = rlGetLocationUniform(DAT_002b01a4,"uTexMetalness");
_DAT_002b0200 = rlGetLocationUniform(DAT_002b01a4,"uValEmission");
_DAT_002b0208 = rlGetLocationUniform(DAT_002b01a4,"uValOcclusion");
_DAT_002b0210 = rlGetLocationUniform(DAT_002b01a4,"uValRoughness");
_DAT_002b0218 = rlGetLocationUniform(DAT_002b01a4,"uValMetalness");
_DAT_002b0228 = rlGetLocationUniform(DAT_002b01a4,"uColAlbedo");
_DAT_002b0238 = rlGetLocationUniform(DAT_002b01a4,"uColEmission");
rlEnableShader(DAT_002b01a4);
if (_DAT_002b01cc != 0) {
_DAT_002b01cc = 0;
rlSetUniform(_DAT_002b01d0,&DAT_002b01cc,4,1);
}
if (_DAT_002b01d4 != 1) {
_DAT_002b01d4 = 1;
rlSetUniform(_DAT_002b01d8,&DAT_002b01d4,4,1);
}
if (_DAT_002b01dc != 2) {
_DAT_002b01dc = 2;
rlSetUniform(_DAT_002b01e0,&DAT_002b01dc,4,1);
}
if (_DAT_002b01e4 != 3) {
_DAT_002b01e4 = 3;
rlSetUniform(_DAT_002b01e8,&DAT_002b01e4,4,1);
}
if (_DAT_002b01ec != 4) {
_DAT_002b01ec = 4;
rlSetUniform(_DAT_002b01f0,&DAT_002b01ec,4,1);
}
if (_DAT_002b01f4 != 5) {
_DAT_002b01f4 = 5;
rlSetUniform(_DAT_002b01f8,&DAT_002b01f4,4,1);
}
rlDisableShader();
return;
}
|
|
57,981
|
used_buffs_register_unlock
|
eloqsql/storage/maria/ma_loghandler.c
|
static void
used_buffs_register_unlock(TRUNSLOG_USED_BUFFERS *buffs,
struct st_translog_buffer *buff
__attribute__((unused)) )
{
DBUG_ENTER("used_buffs_register_unlock");
DBUG_PRINT("enter", ("SUB buffs: %p unlk %u (%p) wrt_ptr: %u (%p)"
" buff %p (%u)",
buffs,
buffs->wrt_ptr, buffs->buff[buffs->wrt_ptr],
buffs->unlck_ptr, buffs->buff[buffs->unlck_ptr],
buff, buff->buffer_no));
DBUG_ASSERT(buffs->buff[buffs->unlck_ptr] == buff);
buffs->unlck_ptr++;
DBUG_VOID_RETURN;
}
|
O0
|
c
|
used_buffs_register_unlock:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x39e2e
jmp 0x39e30
jmp 0x39e32
movq -0x8(%rbp), %rax
movb 0x19(%rax), %cl
addb $0x1, %cl
movb %cl, 0x19(%rax)
jmp 0x39e41
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
used_buffs_register_unlock:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_39E2E:
jmp short $+2
loc_39E30:
jmp short $+2
loc_39E32:
mov rax, [rbp+var_8]
mov cl, [rax+19h]
add cl, 1
mov [rax+19h], cl
jmp short $+2
loc_39E41:
pop rbp
retn
|
long long used_buffs_register_unlock(long long a1)
{
long long result; // rax
result = a1;
++*(_BYTE *)(a1 + 25);
return result;
}
|
used_buffs_register_unlock:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x00139e2e
LAB_00139e2e:
JMP 0x00139e30
LAB_00139e30:
JMP 0x00139e32
LAB_00139e32:
MOV RAX,qword ptr [RBP + -0x8]
MOV CL,byte ptr [RAX + 0x19]
ADD CL,0x1
MOV byte ptr [RAX + 0x19],CL
JMP 0x00139e41
LAB_00139e41:
POP RBP
RET
|
void used_buffs_register_unlock(long param_1)
{
*(char *)(param_1 + 0x19) = *(char *)(param_1 + 0x19) + '\x01';
return;
}
|
|
57,982
|
mysql_stmt_close_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_stmt_close_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_stmt_close,
(parms->stmt),
parms->stmt->mysql,
my_bool,
r_my_bool)
}
|
O3
|
c
|
mysql_stmt_close_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movq 0x38(%rdi), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rbx
callq 0x23315
movb %al, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
mysql_stmt_close_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rdi, [rdi]
mov rax, [rdi+38h]
mov rax, [rax+480h]
mov rbx, [rax+28h]
call mysql_stmt_close
mov [rbx+8], al
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
|
char mysql_stmt_close_start_internal(long long *a1)
{
long long v1; // rdi
long long v2; // rbx
char result; // al
v1 = *a1;
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v1 + 56) + 1152LL) + 40LL);
result = mysql_stmt_close(v1);
*(_BYTE *)(v2 + 8) = result;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_stmt_close_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RAX + 0x28]
CALL 0x00123315
MOV byte ptr [RBX + 0x8],AL
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_stmt_close_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28);
uVar2 = mysql_stmt_close();
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
57,983
|
POINTonE2_Deserialize_Z
|
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/e2.c
|
static BLST_ERROR POINTonE2_Deserialize_Z(POINTonE2_affine *out,
const unsigned char in[192])
{
unsigned char in0 = in[0];
if ((in0 & 0xe0) == 0)
return POINTonE2_Deserialize_BE(out, in);
if (in0 & 0x80) /* compressed bit */
return POINTonE2_Uncompress_Z(out, in);
if (in0 & 0x40) { /* infinity bit */
if (byte_is_zero(in0 & 0x3f) & bytes_are_zero(in+1, 191)) {
vec_zero(out, sizeof(*out));
return BLST_SUCCESS;
}
}
return BLST_BAD_ENCODING;
}
|
O2
|
c
|
POINTonE2_Deserialize_Z:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movzbl (%rsi), %r14d
cmpq $0x1f, %r14
ja 0x52ea9
movq %r15, -0x30(%rbp)
leaq -0xf0(%rbp), %rdi
pushq $0x30
popq %r12
movq %rbx, %rsi
movq %r12, %rdx
callq 0x59ccf
leaq 0x30(%rbx), %rsi
leaq -0x120(%rbp), %r14
movq %r14, %rdi
movq %r12, %rdx
callq 0x59ccf
leaq -0xc0(%rbp), %r15
movl $0x90, %r13d
addq %r13, %r14
leaq 0x60(%rbx), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x59ccf
addq %r13, %rbx
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x59ccf
andb $0x1f, -0x1(%r15)
leaq 0x2bc0b(%rip), %rdx # 0x7e988
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
leaq -0xf0(%rbp), %r15
movq %r15, %rsi
callq 0x55b60
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x5201c
pushq $0x1
popq %r12
testq %rax, %rax
je 0x52ee8
leaq 0x2bbd3(%rip), %rdx # 0x7e988
leaq -0x120(%rbp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x55b60
pushq $0x30
popq %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x5201c
testq %rax, %rax
je 0x52ee8
leaq 0x2bba3(%rip), %rdx # 0x7e988
movq %rbx, %rdi
movq %r14, %rsi
callq 0x55b60
pushq $0x30
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5201c
testq %rax, %rax
je 0x52ee8
leaq 0x2bb7a(%rip), %rdx # 0x7e988
movq %rbx, %rdi
leaq -0xc0(%rbp), %r15
movq %r15, %rsi
callq 0x55b60
pushq $0x30
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5201c
testq %rax, %rax
je 0x52ee8
leaq 0x2bd62(%rip), %rbx # 0x7eba0
leaq -0x120(%rbp), %r12
movq %r12, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x59bc0
leaq -0xf0(%rbp), %rdi
movq %rdi, %rsi
movq %rbx, %rdx
callq 0x59bc0
movq %r15, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x59bc0
movq %r14, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x59bc0
movq %r12, %rdi
callq 0x526cf
testq %rax, %rax
je 0x52f19
leaq -0x120(%rbp), %rsi
movl $0xc0, %edx
movq -0x30(%rbp), %rdi
callq 0x5013d
jmp 0x52ee5
testb %r14b, %r14b
js 0x52efd
pushq $0x1
popq %r12
cmpb $0x40, %r14b
jb 0x52ee8
andl $0x3f, %r14d
decq %r14
shrq $0x3f, %r14
incq %rbx
movl $0xbf, %esi
movq %rbx, %rdi
callq 0x5993c
testq %r14, %rax
je 0x52ee8
movl $0xc0, %esi
movq %r15, %rdi
callq 0x4ff8e
xorl %r12d, %r12d
movl %r12d, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %rbx, %rsi
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x52af1
pushq $0x2
popq %r12
jmp 0x52ee8
|
POINTonE2_Deserialize_Z:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov rbx, rsi
mov r15, rdi
movzx r14d, byte ptr [rsi]
cmp r14, 1Fh
ja loc_52EA9
mov [rbp+var_30], r15
lea rdi, [rbp+var_F0]
push 30h ; '0'
pop r12
mov rsi, rbx
mov rdx, r12
call limbs_from_be_bytes
lea rsi, [rbx+30h]
lea r14, [rbp+var_120]
mov rdi, r14
mov rdx, r12
call limbs_from_be_bytes
lea r15, [rbp+var_C0]
mov r13d, 90h
add r14, r13
lea rsi, [rbx+60h]
mov rdi, r14
mov rdx, r12
call limbs_from_be_bytes
add rbx, r13
mov rdi, r15
mov rsi, rbx
mov rdx, r12
call limbs_from_be_bytes
and byte ptr [r15-1], 1Fh
lea rdx, unk_7E988
lea rbx, [rbp+var_60]
mov rdi, rbx
lea r15, [rbp+var_F0]
mov rsi, r15
call add_fp
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call vec_is_equal
push 1
pop r12
test rax, rax
jz loc_52EE8
lea rdx, unk_7E988
lea r13, [rbp+var_120]
mov rdi, rbx
mov rsi, r13
call add_fp
push 30h ; '0'
pop rdx
mov rdi, rbx
mov rsi, r13
call vec_is_equal
test rax, rax
jz loc_52EE8
lea rdx, unk_7E988
mov rdi, rbx
mov rsi, r14
call add_fp
push 30h ; '0'
pop rdx
mov rdi, rbx
mov rsi, r14
call vec_is_equal
test rax, rax
jz loc_52EE8
lea rdx, unk_7E988
mov rdi, rbx
lea r15, [rbp+var_C0]
mov rsi, r15
call add_fp
push 30h ; '0'
pop rdx
mov rdi, rbx
mov rsi, r15
call vec_is_equal
test rax, rax
jz loc_52EE8
lea rbx, BLS12_381_RR
lea r12, [rbp+var_120]
mov rdi, r12
mov rsi, r12
mov rdx, rbx
call mul_fp
lea rdi, [rbp+var_F0]
mov rsi, rdi
mov rdx, rbx
call mul_fp
mov rdi, r15
mov rsi, r15
mov rdx, rbx
call mul_fp
mov rdi, r14
mov rsi, r14
mov rdx, rbx
call mul_fp
mov rdi, r12
call POINTonE2_affine_on_curve
test rax, rax
jz loc_52F19
lea rsi, [rbp+var_120]
mov edx, 0C0h
mov rdi, [rbp+var_30]
call vec_copy
jmp short loc_52EE5
loc_52EA9:
test r14b, r14b
js short loc_52EFD
push 1
pop r12
cmp r14b, 40h ; '@'
jb short loc_52EE8
and r14d, 3Fh
dec r14
shr r14, 3Fh
inc rbx
mov esi, 0BFh
mov rdi, rbx
call bytes_are_zero
test rax, r14
jz short loc_52EE8
mov esi, 0C0h
mov rdi, r15
call vec_zero
loc_52EE5:
xor r12d, r12d
loc_52EE8:
mov eax, r12d
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_52EFD:
mov rdi, r15
mov rsi, rbx
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp POINTonE2_Uncompress_Z
loc_52F19:
push 2
pop r12
jmp short loc_52EE8
|
long long POINTonE2_Deserialize_Z(long long a1, unsigned __int8 *a2)
{
unsigned long long v2; // r14
unsigned int v3; // r12d
_BYTE v5[48]; // [rsp+0h] [rbp-120h] BYREF
_BYTE v6[47]; // [rsp+30h] [rbp-F0h] BYREF
char v7; // [rsp+5Fh] [rbp-C1h]
_BYTE v8[48]; // [rsp+60h] [rbp-C0h] BYREF
_BYTE v9[48]; // [rsp+90h] [rbp-90h] BYREF
_BYTE v10[48]; // [rsp+C0h] [rbp-60h] BYREF
long long v11; // [rsp+F0h] [rbp-30h]
v2 = *a2;
if ( v2 <= 0x1F )
{
v11 = a1;
limbs_from_be_bytes(v6, a2, 48LL);
limbs_from_be_bytes(v5, a2 + 48, 48LL);
limbs_from_be_bytes(v9, a2 + 96, 48LL);
limbs_from_be_bytes(v8, a2 + 144, 48LL);
v7 &= 0x1Fu;
add_fp(v10, v6, &unk_7E988);
v3 = 1;
if ( !vec_is_equal((long long)v10, (long long)v6, 0x30uLL) )
return v3;
add_fp(v10, v5, &unk_7E988);
if ( !vec_is_equal((long long)v10, (long long)v5, 0x30uLL) )
return v3;
add_fp(v10, v9, &unk_7E988);
if ( !vec_is_equal((long long)v10, (long long)v9, 0x30uLL) )
return v3;
add_fp(v10, v8, &unk_7E988);
if ( !vec_is_equal((long long)v10, (long long)v8, 0x30uLL) )
return v3;
mul_fp(v5, v5, &BLS12_381_RR);
mul_fp(v6, v6, &BLS12_381_RR);
mul_fp(v8, v8, &BLS12_381_RR);
mul_fp(v9, v9, &BLS12_381_RR);
if ( !POINTonE2_affine_on_curve((long long)v5) )
return 2;
vec_copy(v11, (long long)v5, 0xC0uLL);
return 0;
}
if ( (v2 & 0x80u) == 0LL )
{
v3 = 1;
if ( (unsigned __int8)v2 < 0x40u || ((((v2 & 0x3F) - 1) >> 63) & bytes_are_zero(a2 + 1, 191LL)) == 0 )
return v3;
vec_zero(a1, 0xC0uLL);
return 0;
}
return POINTonE2_Uncompress_Z(a1, a2);
}
|
POINTonE2_Deserialize_Z:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV RBX,RSI
MOV R15,RDI
MOVZX R14D,byte ptr [RSI]
CMP R14,0x1f
JA 0x00152ea9
MOV qword ptr [RBP + -0x30],R15
LEA RDI,[RBP + -0xf0]
PUSH 0x30
POP R12
MOV RSI,RBX
MOV RDX,R12
CALL 0x00159ccf
LEA RSI,[RBX + 0x30]
LEA R14,[RBP + -0x120]
MOV RDI,R14
MOV RDX,R12
CALL 0x00159ccf
LEA R15,[RBP + -0xc0]
MOV R13D,0x90
ADD R14,R13
LEA RSI,[RBX + 0x60]
MOV RDI,R14
MOV RDX,R12
CALL 0x00159ccf
ADD RBX,R13
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
CALL 0x00159ccf
AND byte ptr [R15 + -0x1],0x1f
LEA RDX,[0x17e988]
LEA RBX,[RBP + -0x60]
MOV RDI,RBX
LEA R15,[RBP + -0xf0]
MOV RSI,R15
CALL 0x00155b60
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x0015201c
PUSH 0x1
POP R12
TEST RAX,RAX
JZ 0x00152ee8
LEA RDX,[0x17e988]
LEA R13,[RBP + -0x120]
MOV RDI,RBX
MOV RSI,R13
CALL 0x00155b60
PUSH 0x30
POP RDX
MOV RDI,RBX
MOV RSI,R13
CALL 0x0015201c
TEST RAX,RAX
JZ 0x00152ee8
LEA RDX,[0x17e988]
MOV RDI,RBX
MOV RSI,R14
CALL 0x00155b60
PUSH 0x30
POP RDX
MOV RDI,RBX
MOV RSI,R14
CALL 0x0015201c
TEST RAX,RAX
JZ 0x00152ee8
LEA RDX,[0x17e988]
MOV RDI,RBX
LEA R15,[RBP + -0xc0]
MOV RSI,R15
CALL 0x00155b60
PUSH 0x30
POP RDX
MOV RDI,RBX
MOV RSI,R15
CALL 0x0015201c
TEST RAX,RAX
JZ 0x00152ee8
LEA RBX,[0x17eba0]
LEA R12,[RBP + -0x120]
MOV RDI,R12
MOV RSI,R12
MOV RDX,RBX
CALL 0x00159bc0
LEA RDI,[RBP + -0xf0]
MOV RSI,RDI
MOV RDX,RBX
CALL 0x00159bc0
MOV RDI,R15
MOV RSI,R15
MOV RDX,RBX
CALL 0x00159bc0
MOV RDI,R14
MOV RSI,R14
MOV RDX,RBX
CALL 0x00159bc0
MOV RDI,R12
CALL 0x001526cf
TEST RAX,RAX
JZ 0x00152f19
LEA RSI,[RBP + -0x120]
MOV EDX,0xc0
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0015013d
JMP 0x00152ee5
LAB_00152ea9:
TEST R14B,R14B
JS 0x00152efd
PUSH 0x1
POP R12
CMP R14B,0x40
JC 0x00152ee8
AND R14D,0x3f
DEC R14
SHR R14,0x3f
INC RBX
MOV ESI,0xbf
MOV RDI,RBX
CALL 0x0015993c
TEST RAX,R14
JZ 0x00152ee8
MOV ESI,0xc0
MOV RDI,R15
CALL 0x0014ff8e
LAB_00152ee5:
XOR R12D,R12D
LAB_00152ee8:
MOV EAX,R12D
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00152efd:
MOV RDI,R15
MOV RSI,RBX
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00152af1
LAB_00152f19:
PUSH 0x2
POP R12
JMP 0x00152ee8
|
int8 POINTonE2_Deserialize_Z(int8 param_1,byte *param_2)
{
byte bVar1;
long lVar2;
ulong uVar3;
int8 uVar4;
int1 local_128 [48];
int1 local_f8 [47];
byte local_c9;
int1 local_c8 [48];
int1 auStack_98 [48];
int1 local_68 [48];
int8 local_38;
bVar1 = *param_2;
if (bVar1 < 0x20) {
local_38 = param_1;
limbs_from_be_bytes(local_f8,param_2,0x30);
limbs_from_be_bytes(local_128,param_2 + 0x30,0x30);
limbs_from_be_bytes(auStack_98,param_2 + 0x60,0x30);
limbs_from_be_bytes(local_c8,param_2 + 0x90,0x30);
local_c9 = local_c9 & 0x1f;
add_fp(local_68,local_f8,0x17e988);
lVar2 = vec_is_equal(local_68,local_f8,0x30);
if (lVar2 == 0) {
return 1;
}
add_fp(local_68,local_128,0x17e988);
lVar2 = vec_is_equal(local_68,local_128,0x30);
if (lVar2 == 0) {
return 1;
}
add_fp(local_68,auStack_98,0x17e988);
lVar2 = vec_is_equal(local_68,auStack_98,0x30);
if (lVar2 == 0) {
return 1;
}
add_fp(local_68,local_c8,0x17e988);
lVar2 = vec_is_equal(local_68,local_c8,0x30);
if (lVar2 == 0) {
return 1;
}
mul_fp(local_128,local_128,BLS12_381_RR);
mul_fp(local_f8,local_f8,BLS12_381_RR);
mul_fp(local_c8,local_c8,BLS12_381_RR);
mul_fp(auStack_98,auStack_98,BLS12_381_RR);
lVar2 = POINTonE2_affine_on_curve(local_128);
if (lVar2 == 0) {
return 2;
}
vec_copy(local_38,local_128,0xc0);
}
else {
if ((char)bVar1 < '\0') {
uVar4 = POINTonE2_Uncompress_Z(param_1,param_2);
return uVar4;
}
if (bVar1 < 0x40) {
return 1;
}
uVar3 = bytes_are_zero(param_2 + 1,0xbf);
if ((uVar3 & (ulong)(bVar1 & 0x3f) - 1 >> 0x3f) == 0) {
return 1;
}
vec_zero(param_1,0xc0);
}
return 0;
}
|
|
57,984
|
LefDefParser::lefiTiming::addRiseFallSlew2(double, double, double)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
|
void
lefiTiming::addRiseFallSlew2(double one,
double two,
double three)
{
if (nowRise_) {
hasRiseSlew2_ = 1;
riseSlewFive_ = one;
riseSlewSix_ = two;
riseSlewSeven_ = three;
} else {
hasFallSlew2_ = 1;
fallSlewFive_ = one;
fallSlewSix_ = two;
fallSlewSeven_ = three;
}
}
|
O3
|
cpp
|
LefDefParser::lefiTiming::addRiseFallSlew2(double, double, double):
leaq 0x158(%rdi), %rax
leaq 0x190(%rdi), %rcx
leaq 0x160(%rdi), %rdx
leaq 0x198(%rdi), %rsi
leaq 0x168(%rdi), %r8
xorl %r9d, %r9d
cmpl $0x0, 0x80(%rdi)
leaq 0x1a0(%rdi), %r10
sete %r9b
cmoveq %rcx, %rax
movl $0x1, 0x30(%rdi,%r9,8)
movsd %xmm0, (%rax)
cmovneq %rdx, %rsi
movsd %xmm1, (%rsi)
cmovneq %r8, %r10
movsd %xmm2, (%r10)
retq
nop
|
_ZN12LefDefParser10lefiTiming16addRiseFallSlew2Eddd:
lea rax, [rdi+158h]
lea rcx, [rdi+190h]
lea rdx, [rdi+160h]
lea rsi, [rdi+198h]
lea r8, [rdi+168h]
xor r9d, r9d
cmp dword ptr [rdi+80h], 0
lea r10, [rdi+1A0h]
setz r9b
cmovz rax, rcx
mov dword ptr [rdi+r9*8+30h], 1
movsd qword ptr [rax], xmm0
cmovnz rsi, rdx
movsd qword ptr [rsi], xmm1
cmovnz r10, r8
movsd qword ptr [r10], xmm2
retn
|
double * LefDefParser::lefiTiming::addRiseFallSlew2(
LefDefParser::lefiTiming *this,
double a2,
double a3,
double a4)
{
double *result; // rax
double *v5; // rsi
bool v6; // zf
double *v7; // r10
result = (double *)((char *)this + 344);
v5 = (double *)((char *)this + 408);
v6 = *((_DWORD *)this + 32) == 0;
v7 = (double *)((char *)this + 416);
if ( !*((_DWORD *)this + 32) )
result = (double *)((char *)this + 400);
*((_DWORD *)this + 2 * (*((_DWORD *)this + 32) == 0) + 12) = 1;
*result = a2;
if ( !v6 )
v5 = (double *)((char *)this + 352);
*v5 = a3;
if ( !v6 )
v7 = (double *)((char *)this + 360);
*v7 = a4;
return result;
}
|
addRiseFallSlew2:
LEA RAX,[RDI + 0x158]
LEA RCX,[RDI + 0x190]
LEA RDX,[RDI + 0x160]
LEA RSI,[RDI + 0x198]
LEA R8,[RDI + 0x168]
XOR R9D,R9D
CMP dword ptr [RDI + 0x80],0x0
LEA R10,[RDI + 0x1a0]
SETZ R9B
CMOVZ RAX,RCX
MOV dword ptr [RDI + R9*0x8 + 0x30],0x1
MOVSD qword ptr [RAX],XMM0
CMOVNZ RSI,RDX
MOVSD qword ptr [RSI],XMM1
CMOVNZ R10,R8
MOVSD qword ptr [R10],XMM2
RET
|
/* LefDefParser::lefiTiming::addRiseFallSlew2(double, double, double) */
void __thiscall
LefDefParser::lefiTiming::addRiseFallSlew2
(lefiTiming *this,double param_1,double param_2,double param_3)
{
lefiTiming *plVar1;
bool bVar2;
bVar2 = *(int *)(this + 0x80) == 0;
plVar1 = this + 0x158;
if (bVar2) {
plVar1 = this + 400;
}
*(int4 *)(this + (ulong)bVar2 * 8 + 0x30) = 1;
*(double *)plVar1 = param_1;
plVar1 = this + 0x198;
if (!bVar2) {
plVar1 = this + 0x160;
}
*(double *)plVar1 = param_2;
plVar1 = this + 0x1a0;
if (!bVar2) {
plVar1 = this + 0x168;
}
*(double *)plVar1 = param_3;
return;
}
|
|
57,985
|
fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/common.cpp
|
std::string fs_get_cache_file(const std::string & filename) {
GGML_ASSERT(filename.find(DIRECTORY_SEPARATOR) == std::string::npos);
std::string cache_directory = fs_get_cache_directory();
const bool success = fs_create_directory_with_parents(cache_directory);
if (!success) {
throw std::runtime_error("failed to create cache directory: " + cache_directory);
}
return cache_directory + filename;
}
|
O1
|
cpp
|
fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2f, %esi
xorl %edx, %edx
callq 0x1aad0
cmpq $-0x1, %rax
jne 0x72969
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x7257b
movq %r15, %rdi
callq 0x72480
testb %al, %al
je 0x7298a
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x77a9c
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7295b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7d0f1(%rip), %rdi # 0xefa61
leaq 0x7a2ac(%rip), %rdx # 0xecc23
leaq 0x7d2bc(%rip), %rcx # 0xefc3a
movl $0x378, %esi # imm = 0x378
xorl %eax, %eax
callq 0x1ae30
movl $0x10, %edi
callq 0x1a430
movq %rax, %rbx
leaq 0x7d2d4(%rip), %rsi # 0xefc72
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x52ca1
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x1adb0
xorl %ebp, %ebp
movq 0xb9622(%rip), %rsi # 0x12bfe8
movq 0xb958b(%rip), %rdx # 0x12bf58
movq %rbx, %rdi
callq 0x1aea0
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x729fb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0x729fb
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x72a0d
movq %rbx, %rdi
callq 0x1a640
jmp 0x72a0d
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72a28
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
movq %r14, %rdi
callq 0x1af20
|
_Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp; int
push r15; int
push r14; int
push rbx; __int64
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
mov rdi, rsi
mov esi, 2Fh ; '/'
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_72969
lea r15, [rsp+68h+var_60]
mov rdi, r15; int
call _Z22fs_get_cache_directoryB5cxx11v; fs_get_cache_directory(void)
mov rdi, r15
call _Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_create_directory_with_parents(std::string const&)
test al, al
jz short loc_7298A
lea rsi, [rsp+68h+var_60]
mov rdi, rbx
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&)
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7295B
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7295B:
mov rax, rbx
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_72969:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFilenameFindDi; "filename.find(DIRECTORY_SEPARATOR) == s"...
mov esi, 378h
xor eax, eax
call _ggml_abort
loc_7298A:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aFailedToCreate; "failed to create cache directory: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_729FB
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_729FB
mov r14, rax
mov bpl, 1
loc_729FB:
test bpl, bpl
jz short loc_72A0D
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_72A0D
mov r14, rax
loc_72A0D:
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_72A28
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72A28:
mov rdi, r14
call __Unwind_Resume
|
long long fs_get_cache_file(long long a1, long long a2)
{
void *exception; // rbx
int v4[4]; // [rsp+8h] [rbp-60h] BYREF
long long v5; // [rsp+18h] [rbp-50h] BYREF
_BYTE v6[16]; // [rsp+28h] [rbp-40h] BYREF
if ( std::string::find(a2, 47LL, 0LL) != -1 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
888LL,
"GGML_ASSERT(%s) failed",
"filename.find(DIRECTORY_SEPARATOR) == std::string::npos");
LABEL_7:
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v6, (long long)"failed to create cache directory: ", v4);
std::runtime_error::runtime_error(exception, v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
fs_get_cache_directory[abi:cxx11]((long long)v4);
if ( !fs_create_directory_with_parents(v4) )
goto LABEL_7;
std::operator+<char>(a1, v4, a2);
if ( *(long long **)v4 != &v5 )
operator delete(*(void **)v4, v5 + 1);
return a1;
}
|
fs_get_cache_file:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV ESI,0x2f
XOR EDX,EDX
CALL 0x0011aad0
CMP RAX,-0x1
JNZ 0x00172969
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x0017257b
LAB_00172924:
MOV RDI,R15
CALL 0x00172480
TEST AL,AL
JZ 0x0017298a
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
MOV RDX,R14
CALL 0x00177a9c
LAB_00172940:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0017295b
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a890
LAB_0017295b:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00172969:
LEA RDI,[0x1efa61]
LEA RDX,[0x1ecc23]
LEA RCX,[0x1efc3a]
MOV ESI,0x378
XOR EAX,EAX
CALL 0x0011ae30
LAB_0017298a:
MOV EDI,0x10
CALL 0x0011a430
MOV RBX,RAX
LAB_00172997:
LEA RSI,[0x1efc72]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00152ca1
MOV BPL,0x1
LAB_001729b0:
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
|
/* fs_get_cache_file(std::__cxx11::string const&) */
string * fs_get_cache_file(string *param_1)
{
char cVar1;
long lVar2;
runtime_error *this;
char in_SIL;
long *local_60 [2];
long local_50 [2];
string local_40 [32];
lVar2 = std::__cxx11::string::find(in_SIL,0x2f);
if (lVar2 != -1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x378,
"GGML_ASSERT(%s) failed","filename.find(DIRECTORY_SEPARATOR) == std::string::npos");
}
fs_get_cache_directory_abi_cxx11_();
/* try { // try from 00172924 to 0017293f has its CatchHandler @ 00172a0a */
cVar1 = fs_create_directory_with_parents((string *)local_60);
if (cVar1 != '\0') {
std::operator+(param_1,(string *)local_60);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
return param_1;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00172997 to 001729ac has its CatchHandler @ 001729f5 */
std::operator+((char *)local_40,(string *)"failed to create cache directory: ");
/* try { // try from 001729b0 to 001729d4 has its CatchHandler @ 001729d5 */
std::runtime_error::runtime_error(this,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022bfe8,PTR__runtime_error_0022bf58);
}
|
|
57,986
|
llm_graph_context::build_inp_pos() const
|
llama.cpp/src/llama-graph.cpp
|
ggml_tensor * llm_graph_context::build_inp_pos() const {
auto inp = std::make_unique<llm_graph_input_pos>(n_pos_per_token());
auto & cur = inp->pos;
cur = ggml_new_tensor_1d(ctx0, GGML_TYPE_I32, n_tokens*n_pos_per_token());
ggml_set_input(cur);
res->add_input(std::move(inp));
return cur;
}
|
O3
|
cpp
|
llm_graph_context::build_inp_pos() const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %r15d, %r15d
cmpl $0x14, (%rdi)
sete %r15b
leaq (%r15,%r15,2), %r12
incq %r12
movl $0x18, %edi
callq 0x78810
movq %rax, %rbx
movq 0xd8dd6(%rip), %rax # 0x185cd8
addq $0x10, %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movq %r12, 0x10(%rbx)
movq 0xc0(%r14), %rdi
movslq 0xa8(%r14), %rdx
addb %r15b, %r15b
movl %r15d, %ecx
shlq %cl, %rdx
movl $0x1a, %esi
callq 0x7d180
movq %rax, 0x8(%rbx)
movq %rax, %rdi
callq 0x75e80
movq 0x100(%r14), %rdi
movq %rsp, %rsi
movq %rbx, (%rsi)
addq $0x20, %rdi
callq 0x7abb0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xacf67
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xacf94
movq (%rdi), %rax
jmp 0xacf91
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq %r14, %rdi
callq 0x7c350
|
_ZNK17llm_graph_context13build_inp_posEv:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdi
xor r15d, r15d
cmp dword ptr [rdi], 14h
setz r15b
lea r12, [r15+r15*2]
inc r12
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
mov rax, cs:_ZTV19llm_graph_input_pos_ptr
add rax, 10h
mov [rbx], rax
mov qword ptr [rbx+8], 0
mov [rbx+10h], r12
mov rdi, [r14+0C0h]
movsxd rdx, dword ptr [r14+0A8h]
add r15b, r15b
mov ecx, r15d
shl rdx, cl
mov esi, 1Ah
call _ggml_new_tensor_1d
mov [rbx+8], rax
mov rdi, rax
call _ggml_set_input
mov rdi, [r14+100h]
mov rsi, rsp
mov [rsi], rbx
add rdi, 20h ; ' '
call __ZNSt6vectorISt10unique_ptrI17llm_graph_input_iSt14default_deleteIS1_EESaIS4_EE12emplace_backIJS4_EEERS4_DpOT_; std::vector<std::unique_ptr<llm_graph_input_i>>::emplace_back<std::unique_ptr<llm_graph_input_i>>(std::unique_ptr<llm_graph_input_i> &&)
mov rdi, [rsp+28h+var_28]
test rdi, rdi
jz short loc_ACF67
mov rax, [rdi]
call qword ptr [rax+8]
loc_ACF67:
mov rax, [rbx+8]
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rsp+0]
test rdi, rdi
jz short loc_ACF94
mov rax, [rdi]
jmp short loc_ACF91
mov r14, rax
mov rax, [rbx]
mov rdi, rbx
loc_ACF91:
call qword ptr [rax+8]
loc_ACF94:
mov rdi, r14
call __Unwind_Resume
|
long long llm_graph_context::build_inp_pos(llm_graph_context *this)
{
_BOOL8 v1; // r15
_QWORD *v2; // rbx
long long v3; // rax
v1 = *(_DWORD *)this == 20;
v2 = (_QWORD *)operator new(0x18uLL);
*v2 = &`vtable for'llm_graph_input_pos + 2;
v2[1] = 0LL;
v2[2] = 3 * v1 + 1;
v3 = ggml_new_tensor_1d(*((_QWORD *)this + 24), 26LL, (long long)*((int *)this + 42) << (2 * (unsigned __int8)v1));
v2[1] = v3;
ggml_set_input(v3);
std::vector<std::unique_ptr<llm_graph_input_i>>::emplace_back<std::unique_ptr<llm_graph_input_i>>(*((_QWORD *)this + 32) + 32LL);
if ( v2 )
(*(void ( **)(_QWORD *))(*v2 + 8LL))(v2);
return v2[1];
}
|
build_inp_pos:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
XOR R15D,R15D
CMP dword ptr [RDI],0x14
SETZ R15B
LEA R12,[R15 + R15*0x2]
INC R12
MOV EDI,0x18
CALL 0x00178810
MOV RBX,RAX
MOV RAX,qword ptr [0x00285cd8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],0x0
MOV qword ptr [RBX + 0x10],R12
MOV RDI,qword ptr [R14 + 0xc0]
MOVSXD RDX,dword ptr [R14 + 0xa8]
ADD R15B,R15B
MOV ECX,R15D
SHL RDX,CL
LAB_001acf2c:
MOV ESI,0x1a
CALL 0x0017d180
MOV qword ptr [RBX + 0x8],RAX
MOV RDI,RAX
CALL 0x00175e80
MOV RDI,qword ptr [R14 + 0x100]
MOV RSI,RSP
MOV qword ptr [RSI],RBX
ADD RDI,0x20
LAB_001acf53:
CALL 0x0017abb0
LAB_001acf58:
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x001acf67
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_001acf67:
MOV RAX,qword ptr [RBX + 0x8]
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* llm_graph_context::build_inp_pos() const */
long __thiscall llm_graph_context::build_inp_pos(llm_graph_context *this)
{
int iVar1;
long *plVar2;
long lVar3;
long *local_28;
iVar1 = *(int *)this;
plVar2 = (long *)operator_new(0x18);
*plVar2 = (long)(PTR_vtable_00285cd8 + 0x10);
plVar2[1] = 0;
plVar2[2] = (ulong)(iVar1 == 0x14) * 3 + 1;
/* try { // try from 001acf2c to 001acf41 has its CatchHandler @ 001acf88 */
lVar3 = ggml_new_tensor_1d(*(int8 *)(this + 0xc0),0x1a,
(long)*(int *)(this + 0xa8) << (iVar1 == 0x14) * '\x02');
plVar2[1] = lVar3;
ggml_set_input(lVar3);
local_28 = plVar2;
/* try { // try from 001acf53 to 001acf57 has its CatchHandler @ 001acf77 */
std::
vector<std::unique_ptr<llm_graph_input_i,std::default_delete<llm_graph_input_i>>,std::allocator<std::unique_ptr<llm_graph_input_i,std::default_delete<llm_graph_input_i>>>>
::emplace_back<std::unique_ptr<llm_graph_input_i,std::default_delete<llm_graph_input_i>>>
((vector<std::unique_ptr<llm_graph_input_i,std::default_delete<llm_graph_input_i>>,std::allocator<std::unique_ptr<llm_graph_input_i,std::default_delete<llm_graph_input_i>>>>
*)(*(long *)(this + 0x100) + 0x20),(unique_ptr *)&local_28);
if (local_28 != (long *)0x0) {
(**(code **)(*local_28 + 8))();
}
return plVar2[1];
}
|
|
57,987
|
my_rw_init
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_init(my_rw_lock_t *rwp)
{
pthread_condattr_t cond_attr;
pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST);
pthread_condattr_init( &cond_attr );
pthread_cond_init( &rwp->readers, &cond_attr );
pthread_cond_init( &rwp->writers, &cond_attr );
pthread_condattr_destroy(&cond_attr);
rwp->state = 0;
rwp->waiters = 0;
#ifdef SAFE_MUTEX
rwp->write_thread = 0;
#endif
return(0);
}
|
O0
|
c
|
my_rw_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x12d1379(%rip), %rsi # 0x25a14a0
callq 0x758610
leaq -0xc(%rbp), %rdi
callq 0x75a020
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
leaq -0xc(%rbp), %rsi
callq 0x759830
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
leaq -0xc(%rbp), %rsi
callq 0x759830
leaq -0xc(%rbp), %rdi
callq 0x758c90
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_rw_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
lea rsi, my_fast_mutexattr
call _pthread_mutex_init
lea rdi, [rbp+var_C]
call _pthread_condattr_init
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
lea rsi, [rbp+var_C]
call _pthread_cond_init
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
lea rsi, [rbp+var_C]
call _pthread_cond_init
lea rdi, [rbp+var_C]
call _pthread_condattr_destroy
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
xor eax, eax
add rsp, 10h
pop rbp
retn
|
long long my_rw_init(long long a1)
{
_BYTE v2[4]; // [rsp+4h] [rbp-Ch] BYREF
long long v3; // [rsp+8h] [rbp-8h]
v3 = a1;
pthread_mutex_init(a1, &my_fast_mutexattr);
pthread_condattr_init(v2);
pthread_cond_init(v3 + 40, v2);
pthread_cond_init(v3 + 88, v2);
pthread_condattr_destroy(v2);
*(_DWORD *)(v3 + 136) = 0;
*(_DWORD *)(v3 + 140) = 0;
return 0LL;
}
|
operator+:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LEA RDI,[RBP + -0x8]
LEA RSI,[RBP + -0x20]
CALL 0x012cf7b0
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
/* __gnu_cxx::__normal_iterator<recalc*, std::vector<recalc, ut_allocator<recalc, true> >
>::TEMPNAMEPLACEHOLDERVALUE(long) const */
int8 __thiscall
__gnu_cxx::__normal_iterator<recalc*,std::vector<recalc,ut_allocator<recalc,true>>>::operator+
(__normal_iterator<recalc*,std::vector<recalc,ut_allocator<recalc,true>>> *this,
long param_1)
{
recalc *local_28;
long local_20;
__normal_iterator<recalc*,std::vector<recalc,ut_allocator<recalc,true>>> *local_18;
int8 local_10;
local_28 = (recalc *)(*(long *)this + param_1 * 0x10);
local_20 = param_1;
local_18 = this;
__normal_iterator((__normal_iterator<recalc*,std::vector<recalc,ut_allocator<recalc,true>>> *)
&local_10,&local_28);
return local_10;
}
|
|
57,988
|
Item::compile(THD*, bool (Item::*)(unsigned char**), unsigned char**, Item* (Item::*)(THD*, unsigned char*), unsigned char*)
|
eloqsql/sql/item.h
|
virtual Item* compile(THD *thd, Item_analyzer analyzer, uchar **arg_p,
Item_transformer transformer, uchar *arg_t)
{
if ((this->*analyzer) (arg_p))
return ((this->*transformer) (thd, arg_t));
return 0;
}
|
O0
|
c
|
Item::compile(THD*, bool (Item::*)(unsigned char**), unsigned char**, Item* (Item::*)(THD*, unsigned char*), unsigned char*):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rcx, %rax
movq %rsi, -0x78(%rbp)
movq %rdi, %r10
movq -0x78(%rbp), %rdi
leaq 0x10(%rbp), %rcx
movq %rdx, -0x18(%rbp)
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rsi
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movq %r10, -0x20(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq %r8, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movq %r9, -0x58(%rbp)
movq -0x20(%rbp), %rcx
movq %rcx, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rdx
addq %rdx, %rcx
movq %rcx, -0x60(%rbp)
andq $0x1, %rax
cmpq $0x0, %rax
je 0x13022
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x80(%rbp)
jmp 0x1302a
movq -0x68(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x60(%rbp), %rdi
movq -0x80(%rbp), %rax
movq -0x40(%rbp), %rsi
callq *%rax
testb $0x1, %al
jne 0x1303e
jmp 0x130b3
movq -0x70(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x48(%rbp), %rdx
addq %rdx, %rcx
movq %rcx, -0x88(%rbp)
andq $0x1, %rax
cmpq $0x0, %rax
je 0x13087
movq -0x90(%rbp), %rcx
movq -0x88(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x98(%rbp)
jmp 0x13095
movq -0x90(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x88(%rbp), %rdi
movq -0x98(%rbp), %rax
movq -0x28(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq *%rax
movq %rax, -0x8(%rbp)
jmp 0x130bb
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_ZN4Item7compileEP3THDMS_FbPPhES3_MS_FPS_S1_S2_ES2_:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov rax, rcx
mov [rbp+var_78], rsi
mov r10, rdi
mov rdi, [rbp+var_78]
lea rcx, [rbp+arg_0]
mov [rbp+var_18], rdx
mov [rbp+var_10], rax
mov rdx, [rbp+var_18]
mov rsi, [rbp+var_10]
mov rax, [rcx]
mov rcx, [rcx+8]
mov [rbp+var_20], r10
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov [rbp+var_40], r8
mov [rbp+var_48], rcx
mov [rbp+var_50], rax
mov [rbp+var_58], r9
mov rcx, [rbp+var_20]
mov [rbp+var_70], rcx
mov rax, [rbp+var_38]
mov [rbp+var_68], rax
mov rdx, [rbp+var_30]
add rcx, rdx
mov [rbp+var_60], rcx
and rax, 1
cmp rax, 0
jz short loc_13022
mov rcx, [rbp+var_68]
mov rax, [rbp+var_60]
mov rax, [rax]
sub rcx, 1
mov rax, [rax+rcx]
mov [rbp+var_80], rax
jmp short loc_1302A
loc_13022:
mov rax, [rbp+var_68]
mov [rbp+var_80], rax
loc_1302A:
mov rdi, [rbp+var_60]
mov rax, [rbp+var_80]
mov rsi, [rbp+var_40]
call rax
test al, 1
jnz short loc_1303E
jmp short loc_130B3
loc_1303E:
mov rcx, [rbp+var_70]
mov rax, [rbp+var_50]
mov [rbp+var_90], rax
mov rdx, [rbp+var_48]
add rcx, rdx
mov [rbp+var_88], rcx
and rax, 1
cmp rax, 0
jz short loc_13087
mov rcx, [rbp+var_90]
mov rax, [rbp+var_88]
mov rax, [rax]
sub rcx, 1
mov rax, [rax+rcx]
mov [rbp+var_98], rax
jmp short loc_13095
loc_13087:
mov rax, [rbp+var_90]
mov [rbp+var_98], rax
loc_13095:
mov rdi, [rbp+var_88]
mov rax, [rbp+var_98]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_58]
call rax
mov [rbp+var_8], rax
jmp short loc_130BB
loc_130B3:
mov [rbp+var_8], 0
loc_130BB:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
|
long long Item::compile(
long long a1,
long long a2,
char *a3,
long long a4,
long long a5,
long long a6,
char *a7,
long long a8)
{
char v8; // al
_QWORD *v11; // [rsp+18h] [rbp-88h]
_QWORD *v12; // [rsp+40h] [rbp-60h]
v12 = (_QWORD *)(a4 + a1);
if ( ((unsigned __int8)a3 & 1) != 0 )
v8 = (*(long long ( **)(_QWORD *, long long))&a3[*v12 - 1])(v12, a5);
else
v8 = ((long long ( *)(_QWORD *, long long))a3)(v12, a5);
if ( (v8 & 1) == 0 )
return 0LL;
v11 = (_QWORD *)(a8 + a1);
if ( ((unsigned __int8)a7 & 1) != 0 )
return (*(long long ( **)(_QWORD *, long long, long long))&a7[*v11 - 1])(v11, a2, a6);
else
return ((long long ( *)(_QWORD *, long long, long long))a7)(v11, a2, a6);
}
|
compile:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV RAX,RCX
MOV qword ptr [RBP + -0x78],RSI
MOV R10,RDI
MOV RDI,qword ptr [RBP + -0x78]
LEA RCX,[RBP + 0x10]
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x10],RAX
MOV RDX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RBP + -0x20],R10
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV qword ptr [RBP + -0x40],R8
MOV qword ptr [RBP + -0x48],RCX
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x58],R9
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x70],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x68],RAX
MOV RDX,qword ptr [RBP + -0x30]
ADD RCX,RDX
MOV qword ptr [RBP + -0x60],RCX
AND RAX,0x1
CMP RAX,0x0
JZ 0x00113022
MOV RCX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX]
SUB RCX,0x1
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0011302a
LAB_00113022:
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x80],RAX
LAB_0011302a:
MOV RDI,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RBP + -0x40]
CALL RAX
TEST AL,0x1
JNZ 0x0011303e
JMP 0x001130b3
LAB_0011303e:
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x90],RAX
MOV RDX,qword ptr [RBP + -0x48]
ADD RCX,RDX
MOV qword ptr [RBP + -0x88],RCX
AND RAX,0x1
CMP RAX,0x0
JZ 0x00113087
MOV RCX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RBP + -0x88]
MOV RAX,qword ptr [RAX]
SUB RCX,0x1
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x00113095
LAB_00113087:
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x98],RAX
LAB_00113095:
MOV RDI,qword ptr [RBP + -0x88]
MOV RAX,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x58]
CALL RAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001130bb
LAB_001130b3:
MOV qword ptr [RBP + -0x8],0x0
LAB_001130bb:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xa0
POP RBP
RET
|
/* Item::compile(THD*, bool (Item::*)(unsigned char**), unsigned char**, Item* (Item::*)(THD*,
unsigned char*), unsigned char*) */
int8
Item::compile(THD *param_1,_func_bool_uchar_ptr_ptr *param_2,uchar **param_3,
_func_Item_ptr_THD_ptr_uchar_ptr *param_4,uchar *param_5)
{
ulong uVar1;
int8 in_R9;
code *in_stack_00000008;
long in_stack_00000010;
code *local_a0;
uchar **local_88;
int8 local_10;
local_88 = param_3;
if (((ulong)param_3 & 1) != 0) {
local_88 = *(uchar ***)((long)param_3 + *(long *)(param_1 + (long)param_4) + -1);
}
uVar1 = (*(code *)local_88)(param_1 + (long)param_4,param_5);
if ((uVar1 & 1) == 0) {
local_10 = 0;
}
else {
if (((ulong)in_stack_00000008 & 1) == 0) {
local_a0 = in_stack_00000008;
}
else {
local_a0 = *(code **)(in_stack_00000008 + *(long *)(param_1 + in_stack_00000010) + -1);
}
local_10 = (*local_a0)(param_1 + in_stack_00000010,param_2,in_R9);
}
return local_10;
}
|
|
57,989
|
init_rr_cache(THD*, READ_RECORD*)
|
eloqsql/sql/records.cc
|
static int init_rr_cache(THD *thd, READ_RECORD *info)
{
uint rec_cache_size, cache_records;
DBUG_ENTER("init_rr_cache");
info->reclength= ALIGN_SIZE(info->table->s->reclength+1);
if (info->reclength < STRUCT_LENGTH)
info->reclength= ALIGN_SIZE(STRUCT_LENGTH);
info->error_offset= info->table->s->reclength;
cache_records= thd->variables.read_rnd_buff_size /
(info->reclength + STRUCT_LENGTH);
rec_cache_size= cache_records * info->reclength;
info->rec_cache_size= cache_records * info->ref_length;
// We have to allocate one more byte to use uint3korr (see comments for it)
if (cache_records <= 2 ||
!(info->cache= (uchar*) my_malloc_lock(rec_cache_size + cache_records *
STRUCT_LENGTH + 1,
MYF(MY_THREAD_SPECIFIC))))
DBUG_RETURN(1);
#ifdef HAVE_valgrind
// Avoid warnings in qsort
bzero(info->cache, rec_cache_size + cache_records * STRUCT_LENGTH + 1);
#endif
DBUG_PRINT("info", ("Allocated buffer for %d records", cache_records));
info->read_positions=info->cache+rec_cache_size;
info->cache_pos=info->cache_end=info->cache;
DBUG_RETURN(0);
}
|
O0
|
cpp
|
init_rr_cache(THD*, READ_RECORD*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x328(%rax), %rax
addq $0x1, %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x34(%rax)
movq -0x18(%rbp), %rax
cmpl $0xb, 0x34(%rax)
jae 0x8dd67f
movq -0x18(%rbp), %rax
movl $0x10, 0x34(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x328(%rax), %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x3c(%rax)
movq -0x10(%rbp), %rax
movq 0xa40(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x34(%rcx), %ecx
addl $0xb, %ecx
movl %ecx, %ecx
xorl %edx, %edx
divq %rcx
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
imull 0x34(%rcx), %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
imull 0x30(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x38(%rax)
cmpl $0x2, -0x20(%rbp)
jbe 0x8dd708
movl -0x1c(%rbp), %eax
imull $0xb, -0x20(%rbp), %ecx
addl %ecx, %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
xorl %edi, %edi
movl $0x10000, %edx # imm = 0x10000
callq 0x13242b0
movq -0x18(%rbp), %rcx
movq %rax, 0x58(%rcx)
cmpq $0x0, %rax
jne 0x8dd713
jmp 0x8dd70a
movl $0x1, -0x4(%rbp)
jmp 0x8dd74c
jmp 0x8dd715
jmp 0x8dd717
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rcx
movl -0x1c(%rbp), %eax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x18(%rbp), %rax
movq %rcx, 0x60(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZL13init_rr_cacheP3THDP11READ_RECORD:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax]
mov rax, [rax+328h]
add rax, 1
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+34h], ecx
mov rax, [rbp+var_18]
cmp dword ptr [rax+34h], 0Bh
jnb short loc_8DD67F
mov rax, [rbp+var_18]
mov dword ptr [rax+34h], 10h
loc_8DD67F:
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax]
mov rax, [rax+328h]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+3Ch], ecx
mov rax, [rbp+var_10]
mov rax, [rax+0A40h]
mov rcx, [rbp+var_18]
mov ecx, [rcx+34h]
add ecx, 0Bh
mov ecx, ecx
xor edx, edx
div rcx
mov [rbp+var_20], eax
mov eax, [rbp+var_20]
mov rcx, [rbp+var_18]
imul eax, [rcx+34h]
mov [rbp+var_1C], eax
mov ecx, [rbp+var_20]
mov rax, [rbp+var_18]
imul ecx, [rax+30h]
mov rax, [rbp+var_18]
mov [rax+38h], ecx
cmp [rbp+var_20], 2
jbe short loc_8DD708
mov eax, [rbp+var_1C]
imul ecx, [rbp+var_20], 0Bh
add eax, ecx
add eax, 1
mov eax, eax
mov esi, eax
xor edi, edi
mov edx, 10000h
call my_malloc
mov rcx, [rbp+var_18]
mov [rcx+58h], rax
cmp rax, 0
jnz short loc_8DD713
loc_8DD708:
jmp short $+2
loc_8DD70A:
mov [rbp+var_4], 1
jmp short loc_8DD74C
loc_8DD713:
jmp short $+2
loc_8DD715:
jmp short $+2
loc_8DD717:
mov rax, [rbp+var_18]
mov rcx, [rax+58h]
mov eax, [rbp+var_1C]
add rcx, rax
mov rax, [rbp+var_18]
mov [rax+70h], rcx
mov rax, [rbp+var_18]
mov rcx, [rax+58h]
mov rax, [rbp+var_18]
mov [rax+68h], rcx
mov rax, [rbp+var_18]
mov [rax+60h], rcx
mov [rbp+var_4], 0
loc_8DD74C:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long init_rr_cache(THD *a1, READ_RECORD *a2)
{
long long v2; // rax
long long v3; // rcx
unsigned int v5; // [rsp+0h] [rbp-20h]
unsigned int v6; // [rsp+4h] [rbp-1Ch]
*((_DWORD *)a2 + 13) = (*(_QWORD *)(**(_QWORD **)a2 + 808LL) + 8) & 0xFFFFFFF8;
if ( *((_DWORD *)a2 + 13) < 0xBu )
*((_DWORD *)a2 + 13) = 16;
*((_DWORD *)a2 + 15) = *(_QWORD *)(**(_QWORD **)a2 + 808LL);
v5 = *((_QWORD *)a1 + 328) / (unsigned long long)(unsigned int)(*((_DWORD *)a2 + 13) + 11);
v6 = *((_DWORD *)a2 + 13) * v5;
*((_DWORD *)a2 + 14) = *((_DWORD *)a2 + 12) * v5;
if ( v5 > 2 && (v2 = my_malloc(0LL, 11 * v5 + v6 + 1, 0x10000LL), (*((_QWORD *)a2 + 11) = v2) != 0LL) )
{
*((_QWORD *)a2 + 14) = v6 + *((_QWORD *)a2 + 11);
v3 = *((_QWORD *)a2 + 11);
*((_QWORD *)a2 + 13) = v3;
*((_QWORD *)a2 + 12) = v3;
return 0;
}
else
{
return 1;
}
}
|
__cxx_global_var_init.7:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x26d71ec]
MOV ESI,0x2000000
CALL 0x008fd530
POP RBP
RET
|
void __cxx_global_var_init_7(void)
{
date_conv_mode_t::date_conv_mode_t((date_conv_mode_t *)&TIME_INVALID_DATES,0x2000000);
return;
}
|
|
57,990
|
get_length
|
eloqsql/strings/my_vsnprintf.c
|
static const char *get_length(const char *fmt, size_t *length, uint *pre_zero)
{
for (; my_isdigit(&my_charset_latin1, *fmt); fmt++)
{
*length= *length * 10 + (uint)(*fmt - '0');
if (!*length)
*pre_zero|= PREZERO_ARG; /* first digit was 0 */
}
return fmt;
}
|
O3
|
c
|
get_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
leaq 0x2be1d2(%rip), %rcx # 0x31cd90
movq 0x40(%rcx), %r8
movzbl (%rdi), %edi
testb $0x4, 0x1(%r8,%rdi)
je 0x5ebf6
movq (%rsi), %r8
leaq (%r8,%r8,4), %r8
addq %r8, %r8
movsbl %dil, %edi
addl $-0x30, %edi
addq %r8, %rdi
movq %rdi, (%rsi)
jne 0x5ebe9
orb $0x4, (%rdx)
movq 0x40(%rcx), %r8
movzbl 0x1(%rax), %edi
incq %rax
jmp 0x5ebc5
popq %rbp
retq
|
get_length:
push rbp
mov rbp, rsp
mov rax, rdi
lea rcx, my_charset_latin1
mov r8, [rcx+40h]
movzx edi, byte ptr [rdi]
loc_5EBC5:
test byte ptr [r8+rdi+1], 4
jz short loc_5EBF6
mov r8, [rsi]
lea r8, [r8+r8*4]
add r8, r8
movsx edi, dil
add edi, 0FFFFFFD0h
add rdi, r8
mov [rsi], rdi
jnz short loc_5EBE9
or byte ptr [rdx], 4
loc_5EBE9:
mov r8, [rcx+40h]
movzx edi, byte ptr [rax+1]
inc rax
jmp short loc_5EBC5
loc_5EBF6:
pop rbp
retn
|
unsigned __int8 * get_length(unsigned __int8 *a1, _QWORD *a2, _BYTE *a3)
{
unsigned __int8 *result; // rax
long long v4; // r8
long long i; // rdi
long long v6; // r8
long long v7; // rdi
result = a1;
v4 = *(_QWORD *)&my_charset_latin1[16];
for ( i = *a1; (*(_BYTE *)(v4 + i + 1) & 4) != 0; i = *++result )
{
v6 = 10LL * *a2;
v7 = (unsigned int)((char)i - 48);
*a2 = v6 + v7;
if ( !(v6 + v7) )
*a3 |= 4u;
v4 = *(_QWORD *)&my_charset_latin1[16];
}
return result;
}
|
get_length:
PUSH RBP
MOV RBP,RSP
MOV RAX,RDI
LEA RCX,[0x41cd90]
MOV R8,qword ptr [RCX + 0x40]
MOVZX EDI,byte ptr [RDI]
LAB_0015ebc5:
TEST byte ptr [R8 + RDI*0x1 + 0x1],0x4
JZ 0x0015ebf6
MOV R8,qword ptr [RSI]
LEA R8,[R8 + R8*0x4]
ADD R8,R8
MOVSX EDI,DIL
ADD EDI,-0x30
ADD RDI,R8
MOV qword ptr [RSI],RDI
JNZ 0x0015ebe9
OR byte ptr [RDX],0x4
LAB_0015ebe9:
MOV R8,qword ptr [RCX + 0x40]
MOVZX EDI,byte ptr [RAX + 0x1]
INC RAX
JMP 0x0015ebc5
LAB_0015ebf6:
POP RBP
RET
|
void get_length(byte *param_1,long *param_2,byte *param_3)
{
byte bVar1;
long lVar2;
bVar1 = *param_1;
while ((PTR_ctype_latin1_0041cdd0[(ulong)bVar1 + 1] & 4) != 0) {
lVar2 = (ulong)((int)(char)bVar1 - 0x30) + *param_2 * 10;
*param_2 = lVar2;
if (lVar2 == 0) {
*param_3 = *param_3 | 4;
}
bVar1 = param_1[1];
param_1 = param_1 + 1;
}
return;
}
|
|
57,991
|
ok
|
eloqsql/libmariadb/unittest/mytap/tap.c
|
void
ok(int const pass, char const *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
if (!pass && *g_test.todo == '\0')
++g_test.failed;
vemit_tap(pass, fmt, ap);
va_end(ap);
if (*g_test.todo != '\0')
emit_dir("todo", g_test.todo);
emit_endl();
}
|
O3
|
c
|
ok:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
leaq -0xd0(%rbp), %r10
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x19989
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r10, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, -0x20(%rbp)
testl %edi, %edi
jne 0x199b6
cmpb $0x0, 0x36ade(%rip) # 0x5048c
jne 0x199b6
incl 0x36ad2(%rip) # 0x50488
leaq -0x20(%rbp), %rdx
callq 0x19a19
cmpb $0x0, 0x36ac6(%rip) # 0x5048c
je 0x199f3
movq 0x345e1(%rip), %rax # 0x4dfb0
movq (%rax), %rdi
leaq 0x214b3(%rip), %rdx # 0x3ae8c
leaq 0x21444(%rip), %rcx # 0x3ae24
leaq 0x36aa5(%rip), %r8 # 0x5048c
movl $0x1, %esi
xorl %eax, %eax
callq 0x13770
movq 0x345b6(%rip), %rax # 0x4dfb0
movq (%rax), %rdi
leaq 0x20803(%rip), %rdx # 0x3a207
movl $0x1, %esi
xorl %eax, %eax
callq 0x13770
addq $0xd0, %rsp
popq %rbp
retq
|
ok:
push rbp
mov rbp, rsp
sub rsp, 0D0h
lea r10, [rbp+var_D0]
mov [r10+10h], rdx
mov [r10+18h], rcx
mov [r10+20h], r8
mov [r10+28h], r9
test al, al
jz short loc_19989
movaps [rbp+var_A0], xmm0
movaps [rbp+var_90], xmm1
movaps [rbp+var_80], xmm2
movaps [rbp+var_70], xmm3
movaps [rbp+var_60], xmm4
movaps [rbp+var_50], xmm5
movaps [rbp+var_40], xmm6
movaps [rbp+var_30], xmm7
loc_19989:
mov [rbp+var_10], r10
lea rax, [rbp+arg_0]
mov [rbp+var_18], rax
mov rax, 3000000010h
mov [rbp+var_20], rax
test edi, edi
jnz short loc_199B6
cmp cs:byte_5048C, 0
jnz short loc_199B6
inc cs:dword_50488
loc_199B6:
lea rdx, [rbp+var_20]
call vemit_tap
cmp cs:byte_5048C, 0
jz short loc_199F3
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rdx, aSS_1; " # %s %s"
lea rcx, aTodo; "todo"
lea r8, byte_5048C
mov esi, 1
xor eax, eax
call ___fprintf_chk
loc_199F3:
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rdx, aDDD+11h; "\n"
mov esi, 1
xor eax, eax
call ___fprintf_chk
add rsp, 0D0h
pop rbp
retn
|
long long ok(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-D0h] BYREF
long long v17; // [rsp+10h] [rbp-C0h]
long long v18; // [rsp+18h] [rbp-B8h]
long long v19; // [rsp+20h] [rbp-B0h]
long long v20; // [rsp+28h] [rbp-A8h]
__m128 v21; // [rsp+30h] [rbp-A0h]
__m128 v22; // [rsp+40h] [rbp-90h]
__m128 v23; // [rsp+50h] [rbp-80h]
__m128 v24; // [rsp+60h] [rbp-70h]
__m128 v25; // [rsp+70h] [rbp-60h]
__m128 v26; // [rsp+80h] [rbp-50h]
__m128 v27; // [rsp+90h] [rbp-40h]
__m128 v28; // [rsp+A0h] [rbp-30h]
_QWORD v29[4]; // [rsp+B0h] [rbp-20h] BYREF
v21 = a7;
v22 = a8;
v23 = a9;
v24 = a10;
v25 = a11;
v26 = a12;
v27 = a13;
v28 = a14;
v17 = a3;
v18 = a4;
v19 = a5;
v20 = a6;
v29[2] = &v16;
v29[1] = &a15;
v29[0] = 0x3000000010LL;
if ( !(_DWORD)a1 && !byte_5048C )
++dword_50488;
vemit_tap(a1, a2, v29);
if ( byte_5048C )
__fprintf_chk(stdout, 1LL, " # %s %s", "todo", &byte_5048C);
return __fprintf_chk(stdout, 1LL, "\n");
}
|
ok:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
LEA R10,[RBP + -0xd0]
MOV qword ptr [R10 + 0x10],RDX
MOV qword ptr [R10 + 0x18],RCX
MOV qword ptr [R10 + 0x20],R8
MOV qword ptr [R10 + 0x28],R9
TEST AL,AL
JZ 0x00119989
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM1
MOVAPS xmmword ptr [RBP + -0x80],XMM2
MOVAPS xmmword ptr [RBP + -0x70],XMM3
MOVAPS xmmword ptr [RBP + -0x60],XMM4
MOVAPS xmmword ptr [RBP + -0x50],XMM5
MOVAPS xmmword ptr [RBP + -0x40],XMM6
MOVAPS xmmword ptr [RBP + -0x30],XMM7
LAB_00119989:
MOV qword ptr [RBP + -0x10],R10
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,0x3000000010
MOV qword ptr [RBP + -0x20],RAX
TEST EDI,EDI
JNZ 0x001199b6
CMP byte ptr [0x0015048c],0x0
JNZ 0x001199b6
INC dword ptr [0x00150488]
LAB_001199b6:
LEA RDX,[RBP + -0x20]
CALL 0x00119a19
CMP byte ptr [0x0015048c],0x0
JZ 0x001199f3
MOV RAX,qword ptr [0x0014dfb0]
MOV RDI,qword ptr [RAX]
LEA RDX,[0x13ae8c]
LEA RCX,[0x13ae24]
LEA R8,[0x15048c]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00113770
LAB_001199f3:
MOV RAX,qword ptr [0x0014dfb0]
MOV RDI,qword ptr [RAX]
LEA RDX,[0x13a207]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00113770
ADD RSP,0xd0
POP RBP
RET
|
void ok(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int1 local_d8 [16];
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int8 local_28;
int1 *local_20;
int1 *local_18;
local_18 = local_d8;
if (in_AL != '\0') {
local_a8 = param_1;
local_98 = param_2;
local_88 = param_3;
local_78 = param_4;
local_68 = param_5;
local_58 = param_6;
local_48 = param_7;
local_38 = param_8;
}
local_20 = &stack0x00000008;
local_28 = 0x3000000010;
if (((int)param_9 == 0) && (DAT_0015048c == '\0')) {
DAT_00150488 = DAT_00150488 + 1;
}
local_c8 = param_11;
local_c0 = param_12;
local_b8 = param_13;
local_b0 = param_14;
vemit_tap(param_9,param_10,&local_28);
if (DAT_0015048c != '\0') {
__fprintf_chk(*(int8 *)PTR_stdout_0014dfb0,1," # %s %s",&DAT_0013ae24,&DAT_0015048c);
}
__fprintf_chk(*(int8 *)PTR_stdout_0014dfb0,1,&DAT_0013a207);
return;
}
|
|
57,992
|
js_c_function_data_finalizer
|
bluesky950520[P]quickjs/quickjs.c
|
static void js_c_function_data_finalizer(JSRuntime *rt, JSValue val)
{
JSCFunctionDataRecord *s = JS_GetOpaque(val, JS_CLASS_C_FUNCTION_DATA);
int i;
if (s) {
for(i = 0; i < s->data_len; i++) {
JS_FreeValueRT(rt, s->data[i]);
}
js_free_rt(rt, s);
}
}
|
O1
|
c
|
js_c_function_data_finalizer:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rsp)
cmpl $-0x1, %edx
jne 0x3aaec
movq (%rsp), %rax
cmpw $0xf, 0x6(%rax)
jne 0x3aaec
movq 0x30(%rax), %r14
jmp 0x3aaef
xorl %r14d, %r14d
testq %r14, %r14
je 0x3ab53
cmpb $0x0, 0x9(%r14)
je 0x3ab22
leaq 0x18(%r14), %r15
xorl %r12d, %r12d
movq -0x8(%r15), %rsi
movq (%r15), %rdx
movq %rbx, %rdi
callq 0x1d8c6
incq %r12
movzbl 0x9(%r14), %eax
addq $0x10, %r15
cmpq %rax, %r12
jb 0x3ab02
decq 0x28(%rbx)
movq %r14, %rdi
callq *0x20(%rbx)
movq 0x10(%rbx), %rcx
movq 0x30(%rbx), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%rbx)
movq 0x40(%rbx), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
js_c_function_data_finalizer:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
mov [rsp+28h+var_28], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_3AAEC
mov rax, [rsp+28h+var_28]
cmp word ptr [rax+6], 0Fh
jnz short loc_3AAEC
mov r14, [rax+30h]
jmp short loc_3AAEF
loc_3AAEC:
xor r14d, r14d
loc_3AAEF:
test r14, r14
jz short loc_3AB53
cmp byte ptr [r14+9], 0
jz short loc_3AB22
lea r15, [r14+18h]
xor r12d, r12d
loc_3AB02:
mov rsi, [r15-8]
mov rdx, [r15]
mov rdi, rbx
call JS_FreeValueRT
inc r12
movzx eax, byte ptr [r14+9]
add r15, 10h
cmp r12, rax
jb short loc_3AB02
loc_3AB22:
dec qword ptr [rbx+28h]
mov rdi, r14
call qword ptr [rbx+20h]
mov rcx, [rbx+10h]
mov rdx, [rbx+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rdx
mov rdi, [rbx+40h]
mov rsi, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp rcx
loc_3AB53:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
void js_c_function_data_finalizer(long long a1, long long a2, int a3)
{
long long v3; // r14
long long *v4; // r15
unsigned long long v5; // r12
long long v6; // rax
void ( *v7)(_QWORD, long long); // rcx
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 15 )
v3 = *(_QWORD *)(a2 + 48);
else
v3 = 0LL;
if ( v3 )
{
if ( *(_BYTE *)(v3 + 9) )
{
v4 = (long long *)(v3 + 24);
v5 = 0LL;
do
{
JS_FreeValueRT(a1, (_DWORD *)*(v4 - 1), *v4);
++v5;
v4 += 2;
}
while ( v5 < *(unsigned __int8 *)(v3 + 9) );
}
--*(_QWORD *)(a1 + 40);
v6 = (*(long long ( **)(long long))(a1 + 32))(v3);
v7 = *(void ( **)(_QWORD, long long))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v6 - 8;
v7(*(_QWORD *)(a1 + 64), v3);
}
}
| |||
57,993
|
js_c_function_data_finalizer
|
bluesky950520[P]quickjs/quickjs.c
|
static void js_c_function_data_finalizer(JSRuntime *rt, JSValue val)
{
JSCFunctionDataRecord *s = JS_GetOpaque(val, JS_CLASS_C_FUNCTION_DATA);
int i;
if (s) {
for(i = 0; i < s->data_len; i++) {
JS_FreeValueRT(rt, s->data[i]);
}
js_free_rt(rt, s);
}
}
|
O3
|
c
|
js_c_function_data_finalizer:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $-0x1, %edx
jne 0x3c0f4
cmpw $0xf, 0x6(%rsi)
jne 0x3c0f4
movq 0x30(%rsi), %r14
testq %r14, %r14
je 0x3c0f4
movq %rdi, %rbx
cmpb $0x0, 0x9(%r14)
je 0x3c0c3
leaq 0x18(%r14), %r15
xorl %r12d, %r12d
movq (%r15), %rdx
cmpl $-0x9, %edx
jb 0x3c0b2
movq -0x8(%r15), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x3c0b2
movq %rbx, %rdi
callq 0x219cc
incq %r12
movzbl 0x9(%r14), %eax
addq $0x10, %r15
cmpq %rax, %r12
jb 0x3c092
decq 0x28(%rbx)
movq %r14, %rdi
callq *0x20(%rbx)
movq 0x10(%rbx), %rcx
movq 0x30(%rbx), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%rbx)
movq 0x40(%rbx), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
js_c_function_data_finalizer:
push r15
push r14
push r12
push rbx
push rax
cmp edx, 0FFFFFFFFh
jnz loc_3C0F4
cmp word ptr [rsi+6], 0Fh
jnz short loc_3C0F4
mov r14, [rsi+30h]
test r14, r14
jz short loc_3C0F4
mov rbx, rdi
cmp byte ptr [r14+9], 0
jz short loc_3C0C3
lea r15, [r14+18h]
xor r12d, r12d
loc_3C092:
mov rdx, [r15]
cmp edx, 0FFFFFFF7h
jb short loc_3C0B2
mov rsi, [r15-8]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_3C0B2
mov rdi, rbx
call js_free_value_rt
loc_3C0B2:
inc r12
movzx eax, byte ptr [r14+9]
add r15, 10h
cmp r12, rax
jb short loc_3C092
loc_3C0C3:
dec qword ptr [rbx+28h]
mov rdi, r14
call qword ptr [rbx+20h]
mov rcx, [rbx+10h]
mov rdx, [rbx+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rdx
mov rdi, [rbx+40h]
mov rsi, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp rcx
loc_3C0F4:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long js_c_function_data_finalizer(long long a1, long long a2, int a3)
{
long long v3; // r14
long long *v4; // r15
unsigned long long v5; // r12
long long v6; // rdx
_QWORD *v7; // rsi
int v8; // eax
long long v9; // rax
long long ( *v10)(_QWORD, long long); // rcx
long long result; // rax
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 15 )
{
v3 = *(_QWORD *)(a2 + 48);
if ( v3 )
{
if ( *(_BYTE *)(v3 + 9) )
{
v4 = (long long *)(v3 + 24);
v5 = 0LL;
do
{
v6 = *v4;
if ( (unsigned int)*v4 >= 0xFFFFFFF7 )
{
v7 = (_QWORD *)*(v4 - 1);
v8 = (*(_DWORD *)v7)--;
if ( v8 <= 1 )
js_free_value_rt(a1, v7, v6);
}
++v5;
v4 += 2;
}
while ( v5 < *(unsigned __int8 *)(v3 + 9) );
}
--*(_QWORD *)(a1 + 40);
v9 = (*(long long ( **)(long long))(a1 + 32))(v3);
v10 = *(long long ( **)(_QWORD, long long))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v9 - 8;
return v10(*(_QWORD *)(a1 + 64), v3);
}
}
return result;
}
|
js_c_function_data_finalizer:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
CMP EDX,-0x1
JNZ 0x0013c0f4
CMP word ptr [RSI + 0x6],0xf
JNZ 0x0013c0f4
MOV R14,qword ptr [RSI + 0x30]
TEST R14,R14
JZ 0x0013c0f4
MOV RBX,RDI
CMP byte ptr [R14 + 0x9],0x0
JZ 0x0013c0c3
LEA R15,[R14 + 0x18]
XOR R12D,R12D
LAB_0013c092:
MOV RDX,qword ptr [R15]
CMP EDX,-0x9
JC 0x0013c0b2
MOV RSI,qword ptr [R15 + -0x8]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0013c0b2
MOV RDI,RBX
CALL 0x001219cc
LAB_0013c0b2:
INC R12
MOVZX EAX,byte ptr [R14 + 0x9]
ADD R15,0x10
CMP R12,RAX
JC 0x0013c092
LAB_0013c0c3:
DEC qword ptr [RBX + 0x28]
MOV RDI,R14
CALL qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [RBX + 0x30],RDX
MOV RDI,qword ptr [RBX + 0x40]
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP RCX
LAB_0013c0f4:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void js_c_function_data_finalizer(long param_1,long param_2,int param_3)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
int8 *puVar5;
if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0xf)) &&
(lVar2 = *(long *)(param_2 + 0x30), lVar2 != 0)) {
if (*(char *)(lVar2 + 9) != '\0') {
puVar5 = (int8 *)(lVar2 + 0x18);
uVar4 = 0;
do {
if (0xfffffff6 < (uint)*puVar5) {
iVar1 = *(int *)puVar5[-1];
*(int *)puVar5[-1] = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(param_1);
}
}
uVar4 = uVar4 + 1;
puVar5 = puVar5 + 2;
} while (uVar4 < *(byte *)(lVar2 + 9));
}
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar3 = (**(code **)(param_1 + 0x20))(lVar2);
lVar3 = (*(long *)(param_1 + 0x30) - lVar3) + -8;
*(long *)(param_1 + 0x30) = lVar3;
/* WARNING: Could not recover jumptable at 0x0013c0f2. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),lVar2,lVar3,*(code **)(param_1 + 0x10));
return;
}
return;
}
|
|
57,994
|
end_server
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
static void
end_server(MYSQL *mysql)
{
/* if net->error 2 and reconnect is activated, we need to inform
connection handler */
if (mysql->net.pvio != 0)
{
ma_pvio_close(mysql->net.pvio);
mysql->net.pvio= 0; /* Marker */
}
ma_net_end(&mysql->net);
free_old_query(mysql);
return;
}
|
O0
|
c
|
end_server:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x160cd
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x23c90
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rdi
callq 0x45bd0
movq -0x8(%rbp), %rdi
callq 0x1e290
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
end_server:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_160CD
mov rax, [rbp+var_8]
mov rdi, [rax]
call ma_pvio_close
mov rax, [rbp+var_8]
mov qword ptr [rax], 0
loc_160CD:
mov rdi, [rbp+var_8]
call ma_net_end
mov rdi, [rbp+var_8]
call free_old_query
add rsp, 10h
pop rbp
retn
|
long long end_server(_QWORD *a1)
{
if ( *a1 )
{
ma_pvio_close(*a1);
*a1 = 0LL;
}
ma_net_end(a1);
return free_old_query(a1);
}
|
end_server:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x001160cd
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
CALL 0x00123c90
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],0x0
LAB_001160cd:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00145bd0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0011e290
ADD RSP,0x10
POP RBP
RET
|
void end_server(long *param_1)
{
if (*param_1 != 0) {
ma_pvio_close(*param_1);
*param_1 = 0;
}
ma_net_end(param_1);
free_old_query(param_1);
return;
}
|
|
57,995
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)
|
llama.cpp/common/json.hpp
|
inline cached_power get_cached_power_for_binary_exponent(int e)
{
// Now
//
// alpha <= e_c + e + q <= gamma (1)
// ==> f_c * 2^alpha <= c * 2^e * 2^q
//
// and since the c's are normalized, 2^(q-1) <= f_c,
//
// ==> 2^(q - 1 + alpha) <= c * 2^(e + q)
// ==> 2^(alpha - e - 1) <= c
//
// If c were an exact power of ten, i.e. c = 10^k, one may determine k as
//
// k = ceil( log_10( 2^(alpha - e - 1) ) )
// = ceil( (alpha - e - 1) * log_10(2) )
//
// From the paper:
// "In theory the result of the procedure could be wrong since c is rounded,
// and the computation itself is approximated [...]. In practice, however,
// this simple function is sufficient."
//
// For IEEE double precision floating-point numbers converted into
// normalized diyfp's w = f * 2^e, with q = 64,
//
// e >= -1022 (min IEEE exponent)
// -52 (p - 1)
// -52 (p - 1, possibly normalize denormal IEEE numbers)
// -11 (normalize the diyfp)
// = -1137
//
// and
//
// e <= +1023 (max IEEE exponent)
// -52 (p - 1)
// -11 (normalize the diyfp)
// = 960
//
// This binary exponent range [-1137,960] results in a decimal exponent
// range [-307,324]. One does not need to store a cached power for each
// k in this range. For each such k it suffices to find a cached power
// such that the exponent of the product lies in [alpha,gamma].
// This implies that the difference of the decimal exponents of adjacent
// table entries must be less than or equal to
//
// floor( (gamma - alpha) * log_10(2) ) = 8.
//
// (A smaller distance gamma-alpha would require a larger table.)
// NB:
// Actually this function returns c, such that -60 <= e_c + e + 64 <= -34.
constexpr int kCachedPowersMinDecExp = -300;
constexpr int kCachedPowersDecStep = 8;
static constexpr std::array<cached_power, 79> kCachedPowers =
{
{
{ 0xAB70FE17C79AC6CA, -1060, -300 },
{ 0xFF77B1FCBEBCDC4F, -1034, -292 },
{ 0xBE5691EF416BD60C, -1007, -284 },
{ 0x8DD01FAD907FFC3C, -980, -276 },
{ 0xD3515C2831559A83, -954, -268 },
{ 0x9D71AC8FADA6C9B5, -927, -260 },
{ 0xEA9C227723EE8BCB, -901, -252 },
{ 0xAECC49914078536D, -874, -244 },
{ 0x823C12795DB6CE57, -847, -236 },
{ 0xC21094364DFB5637, -821, -228 },
{ 0x9096EA6F3848984F, -794, -220 },
{ 0xD77485CB25823AC7, -768, -212 },
{ 0xA086CFCD97BF97F4, -741, -204 },
{ 0xEF340A98172AACE5, -715, -196 },
{ 0xB23867FB2A35B28E, -688, -188 },
{ 0x84C8D4DFD2C63F3B, -661, -180 },
{ 0xC5DD44271AD3CDBA, -635, -172 },
{ 0x936B9FCEBB25C996, -608, -164 },
{ 0xDBAC6C247D62A584, -582, -156 },
{ 0xA3AB66580D5FDAF6, -555, -148 },
{ 0xF3E2F893DEC3F126, -529, -140 },
{ 0xB5B5ADA8AAFF80B8, -502, -132 },
{ 0x87625F056C7C4A8B, -475, -124 },
{ 0xC9BCFF6034C13053, -449, -116 },
{ 0x964E858C91BA2655, -422, -108 },
{ 0xDFF9772470297EBD, -396, -100 },
{ 0xA6DFBD9FB8E5B88F, -369, -92 },
{ 0xF8A95FCF88747D94, -343, -84 },
{ 0xB94470938FA89BCF, -316, -76 },
{ 0x8A08F0F8BF0F156B, -289, -68 },
{ 0xCDB02555653131B6, -263, -60 },
{ 0x993FE2C6D07B7FAC, -236, -52 },
{ 0xE45C10C42A2B3B06, -210, -44 },
{ 0xAA242499697392D3, -183, -36 },
{ 0xFD87B5F28300CA0E, -157, -28 },
{ 0xBCE5086492111AEB, -130, -20 },
{ 0x8CBCCC096F5088CC, -103, -12 },
{ 0xD1B71758E219652C, -77, -4 },
{ 0x9C40000000000000, -50, 4 },
{ 0xE8D4A51000000000, -24, 12 },
{ 0xAD78EBC5AC620000, 3, 20 },
{ 0x813F3978F8940984, 30, 28 },
{ 0xC097CE7BC90715B3, 56, 36 },
{ 0x8F7E32CE7BEA5C70, 83, 44 },
{ 0xD5D238A4ABE98068, 109, 52 },
{ 0x9F4F2726179A2245, 136, 60 },
{ 0xED63A231D4C4FB27, 162, 68 },
{ 0xB0DE65388CC8ADA8, 189, 76 },
{ 0x83C7088E1AAB65DB, 216, 84 },
{ 0xC45D1DF942711D9A, 242, 92 },
{ 0x924D692CA61BE758, 269, 100 },
{ 0xDA01EE641A708DEA, 295, 108 },
{ 0xA26DA3999AEF774A, 322, 116 },
{ 0xF209787BB47D6B85, 348, 124 },
{ 0xB454E4A179DD1877, 375, 132 },
{ 0x865B86925B9BC5C2, 402, 140 },
{ 0xC83553C5C8965D3D, 428, 148 },
{ 0x952AB45CFA97A0B3, 455, 156 },
{ 0xDE469FBD99A05FE3, 481, 164 },
{ 0xA59BC234DB398C25, 508, 172 },
{ 0xF6C69A72A3989F5C, 534, 180 },
{ 0xB7DCBF5354E9BECE, 561, 188 },
{ 0x88FCF317F22241E2, 588, 196 },
{ 0xCC20CE9BD35C78A5, 614, 204 },
{ 0x98165AF37B2153DF, 641, 212 },
{ 0xE2A0B5DC971F303A, 667, 220 },
{ 0xA8D9D1535CE3B396, 694, 228 },
{ 0xFB9B7CD9A4A7443C, 720, 236 },
{ 0xBB764C4CA7A44410, 747, 244 },
{ 0x8BAB8EEFB6409C1A, 774, 252 },
{ 0xD01FEF10A657842C, 800, 260 },
{ 0x9B10A4E5E9913129, 827, 268 },
{ 0xE7109BFBA19C0C9D, 853, 276 },
{ 0xAC2820D9623BF429, 880, 284 },
{ 0x80444B5E7AA7CF85, 907, 292 },
{ 0xBF21E44003ACDD2D, 933, 300 },
{ 0x8E679C2F5E44FF8F, 960, 308 },
{ 0xD433179D9C8CB841, 986, 316 },
{ 0x9E19DB92B4E31BA9, 1013, 324 },
}
};
// This computation gives exactly the same results for k as
// k = ceil((kAlpha - e - 1) * 0.30102999566398114)
// for |e| <= 1500, but doesn't require floating-point operations.
// NB: log_10(2) ~= 78913 / 2^18
JSON_ASSERT(e >= -1500);
JSON_ASSERT(e <= 1500);
const int f = kAlpha - e - 1;
const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0);
const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep;
JSON_ASSERT(index >= 0);
JSON_ASSERT(static_cast<std::size_t>(index) < kCachedPowers.size());
const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)];
JSON_ASSERT(kAlpha <= cached.e + e + 64);
JSON_ASSERT(kGamma >= cached.e + e + 64);
return cached;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int):
pushq %rax
cmpl $0xfffffa23, %edi # imm = 0xFFFFFA23
jle 0x7edca
cmpl $0x5dd, %edi # imm = 0x5DD
jge 0x7ede9
xorl %eax, %eax
movl %edi, %ecx
subl $-0x3d, %ecx
setl %al
negl %ecx
imull $0x13441, %ecx, %ecx # imm = 0x13441
leal 0x3ffff(%rcx), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
sarl $0x12, %edx
addl %edx, %eax
cmpl $0xfffffec5, %eax # imm = 0xFFFFFEC5
jle 0x7ee05
leal 0x133(%rax), %ecx
addl $0x13a, %eax # imm = 0x13A
testw %cx, %cx
cmovnsl %ecx, %eax
cwtl
shrl $0x3, %eax
cmpw $0x4f, %ax
jae 0x7ee21
movzwl %ax, %eax
shll $0x4, %eax
leaq 0xa01bd(%rip), %rcx # 0x11ef68
movq 0x8(%rcx,%rax), %rdx
addl %edx, %edi
cmpl $-0x7d, %edi
jle 0x7ee3d
cmpl $-0x5f, %edi
jge 0x7ee59
movq (%rcx,%rax), %rax
popq %rcx
retq
leaq 0x9c741(%rip), %rdi # 0x11b512
leaq 0x95359(%rip), %rdx # 0x114131
leaq 0x9dccd(%rip), %rcx # 0x11caac
movl $0x43e4, %esi # imm = 0x43E4
jmp 0x7ee73
leaq 0x9c722(%rip), %rdi # 0x11b512
leaq 0x9533a(%rip), %rdx # 0x114131
leaq 0x9dcb9(%rip), %rcx # 0x11cab7
movl $0x43e5, %esi # imm = 0x43E5
jmp 0x7ee73
leaq 0x9c706(%rip), %rdi # 0x11b512
leaq 0x9531e(%rip), %rdx # 0x114131
leaq 0x9dca7(%rip), %rcx # 0x11cac1
movl $0x43ea, %esi # imm = 0x43EA
jmp 0x7ee73
leaq 0x9c6ea(%rip), %rdi # 0x11b512
leaq 0x95302(%rip), %rdx # 0x114131
leaq 0x9dc96(%rip), %rcx # 0x11cacc
movl $0x43eb, %esi # imm = 0x43EB
jmp 0x7ee73
leaq 0x9c6ce(%rip), %rdi # 0x11b512
leaq 0x952e6(%rip), %rdx # 0x114131
leaq 0x9dcb1(%rip), %rcx # 0x11cb03
movl $0x43ee, %esi # imm = 0x43EE
jmp 0x7ee73
leaq 0x9c6b2(%rip), %rdi # 0x11b512
leaq 0x952ca(%rip), %rdx # 0x114131
leaq 0x9dcb1(%rip), %rcx # 0x11cb1f
movl $0x43ef, %esi # imm = 0x43EF
xorl %eax, %eax
callq 0x21e60
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi:
push rax
cmp edi, 0FFFFFA23h
jle loc_7EDCA
cmp edi, 5DDh
jge loc_7EDE9
xor eax, eax
mov ecx, edi
sub ecx, 0FFFFFFC3h
setl al
neg ecx
imul ecx, 13441h
lea edx, [rcx+3FFFFh]
test ecx, ecx
cmovns edx, ecx
sar edx, 12h
add eax, edx
cmp eax, 0FFFFFEC5h
jle loc_7EE05
lea ecx, [rax+133h]
add eax, 13Ah
test cx, cx
cmovns eax, ecx
cwde
shr eax, 3
cmp ax, 4Fh ; 'O'
jnb loc_7EE21
movzx eax, ax
shl eax, 4
lea rcx, _ZZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEiE13kCachedPowers; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
mov rdx, [rcx+rax+8]
add edi, edx
cmp edi, 0FFFFFF83h
jle loc_7EE3D
cmp edi, 0FFFFFFA1h
jge loc_7EE59
mov rax, [rcx+rax]
pop rcx
retn
loc_7EDCA:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1500; "e >= -1500"
mov esi, 43E4h
jmp loc_7EE73
loc_7EDE9:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1500_0; "e <= 1500"
mov esi, 43E5h
jmp short loc_7EE73
loc_7EE05:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIndex0; "index >= 0"
mov esi, 43EAh
jmp short loc_7EE73
loc_7EE21:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aStaticCastStdS; "static_cast<std::size_t>(index) < kCach"...
mov esi, 43EBh
jmp short loc_7EE73
loc_7EE3D:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKalphaCachedEE; "kAlpha <= cached.e + e + 64"
mov esi, 43EEh
jmp short loc_7EE73
loc_7EE59:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKgammaCachedEE; "kGamma >= cached.e + e + 64"
mov esi, 43EFh
loc_7EE73:
xor eax, eax
call _ggml_abort
|
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this)
{
int v1; // eax
__int16 v2; // cx
__int16 v3; // ax
unsigned int v4; // eax
long long v5; // rax
int v6; // edi
long long v8; // rsi
if ( (int)this <= -1501 )
{
v8 = 17380LL;
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17380LL,
"GGML_ASSERT(%s) failed",
"e >= -1500");
}
else if ( (int)this >= 1501 )
{
v8 = 17381LL;
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17381LL,
"GGML_ASSERT(%s) failed",
"e <= 1500");
}
else
{
v1 = -78913 * ((int)this + 61) / 0x40000 + ((int)this < -61);
if ( v1 <= -315 )
{
v8 = 17386LL;
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17386LL,
"GGML_ASSERT(%s) failed",
"index >= 0");
}
else
{
v2 = v1 + 307;
v3 = v1 + 314;
if ( v2 >= 0 )
v3 = v2;
v4 = (unsigned int)v3 >> 3;
if ( (unsigned __int16)v4 >= 0x4Fu )
{
v8 = 17387LL;
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17387LL,
"GGML_ASSERT(%s) failed",
"static_cast<std::size_t>(index) < kCachedPowers.size()");
}
else
{
v5 = 16 * (unsigned int)(unsigned __int16)v4;
v6 = *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
+ v5
+ 8)
+ (_DWORD)this;
if ( v6 <= -125 )
{
v8 = 17390LL;
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17390LL,
"GGML_ASSERT(%s) failed",
"kAlpha <= cached.e + e + 64");
}
else
{
if ( v6 < -95 )
return *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
+ v5);
v8 = 17391LL;
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17391LL,
"GGML_ASSERT(%s) failed",
"kGamma >= cached.e + e + 64");
}
}
}
}
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
v8);
}
|
get_cached_power_for_binary_exponent:
PUSH RAX
CMP EDI,0xfffffa23
JLE 0x0017edca
CMP EDI,0x5dd
JGE 0x0017ede9
XOR EAX,EAX
MOV ECX,EDI
SUB ECX,-0x3d
SETL AL
NEG ECX
IMUL ECX,ECX,0x13441
LEA EDX,[RCX + 0x3ffff]
TEST ECX,ECX
CMOVNS EDX,ECX
SAR EDX,0x12
ADD EAX,EDX
CMP EAX,0xfffffec5
JLE 0x0017ee05
LEA ECX,[RAX + 0x133]
ADD EAX,0x13a
TEST CX,CX
CMOVNS EAX,ECX
CWDE
SHR EAX,0x3
CMP AX,0x4f
JNC 0x0017ee21
MOVZX EAX,AX
SHL EAX,0x4
LEA RCX,[0x21ef68]
MOV RDX,qword ptr [RCX + RAX*0x1 + 0x8]
ADD EDI,EDX
CMP EDI,-0x7d
JLE 0x0017ee3d
CMP EDI,-0x5f
JGE 0x0017ee59
MOV RAX,qword ptr [RCX + RAX*0x1]
POP RCX
RET
LAB_0017edca:
LEA RDI,[0x21b512]
LEA RDX,[0x214131]
LEA RCX,[0x21caac]
MOV ESI,0x43e4
JMP 0x0017ee73
LAB_0017ede9:
LEA RDI,[0x21b512]
LEA RDX,[0x214131]
LEA RCX,[0x21cab7]
MOV ESI,0x43e5
JMP 0x0017ee73
LAB_0017ee05:
LEA RDI,[0x21b512]
LEA RDX,[0x214131]
LEA RCX,[0x21cac1]
MOV ESI,0x43ea
JMP 0x0017ee73
LAB_0017ee21:
LEA RDI,[0x21b512]
LEA RDX,[0x214131]
LEA RCX,[0x21cacc]
MOV ESI,0x43eb
JMP 0x0017ee73
LAB_0017ee3d:
LEA RDI,[0x21b512]
LEA RDX,[0x214131]
LEA RCX,[0x21cb03]
MOV ESI,0x43ee
JMP 0x0017ee73
LAB_0017ee59:
LEA RDI,[0x21b512]
LEA RDX,[0x214131]
LEA RCX,[0x21cb1f]
MOV ESI,0x43ef
LAB_0017ee73:
XOR EAX,EAX
CALL 0x00121e60
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) */
int8
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int param_1)
{
short sVar1;
int iVar2;
ulong uVar3;
short sVar4;
int iVar5;
char *pcVar6;
int8 uVar7;
if (param_1 < -0x5dc) {
pcVar6 = "e >= -1500";
uVar7 = 0x43e4;
}
else if (param_1 < 0x5dd) {
iVar5 = (param_1 + 0x3d) * -0x13441;
iVar2 = iVar5 + 0x3ffff;
if (-1 < iVar5) {
iVar2 = iVar5;
}
iVar2 = (uint)(param_1 < -0x3d) + (iVar2 >> 0x12);
if (iVar2 < -0x13a) {
pcVar6 = "index >= 0";
uVar7 = 0x43ea;
}
else {
sVar1 = (short)iVar2;
sVar4 = sVar1 + 0x133;
sVar1 = sVar1 + 0x13a;
if (-1 < sVar4) {
sVar1 = sVar4;
}
if ((ushort)((uint)(int)sVar1 >> 3) < 0x4f) {
uVar3 = (ulong)(((uint)(int)sVar1 >> 3 & 0xffff) << 4);
iVar2 = param_1 + (int)*(int8 *)
(get_cached_power_for_binary_exponent(int)::kCachedPowers +
uVar3 + 8);
if (iVar2 < -0x7c) {
pcVar6 = "kAlpha <= cached.e + e + 64";
uVar7 = 0x43ee;
}
else {
if (iVar2 < -0x5f) {
return *(int8 *)(get_cached_power_for_binary_exponent(int)::kCachedPowers + uVar3)
;
}
pcVar6 = "kGamma >= cached.e + e + 64";
uVar7 = 0x43ef;
}
}
else {
pcVar6 = "static_cast<std::size_t>(index) < kCachedPowers.size()";
uVar7 = 0x43eb;
}
}
}
else {
pcVar6 = "e <= 1500";
uVar7 = 0x43e5;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar7,
"GGML_ASSERT(%s) failed",pcVar6);
}
|
|
57,996
|
Field_string::get_copy_func(Field const*) const
|
eloqsql/sql/field_conv.cc
|
Field::Copy_func *Field_string::get_copy_func(const Field *from) const
{
if (from->type() == MYSQL_TYPE_BIT)
return do_field_int;
if (Field_string::type_handler() != from->type_handler() ||
Field_string::charset() != from->charset())
return do_field_string;
if (Field_string::pack_length() < from->pack_length())
return (Field_string::charset()->mbmaxlen == 1 ?
do_cut_string : do_cut_string_complex);
if (Field_string::pack_length() > from->pack_length())
return Field_string::charset() == &my_charset_bin ? do_expand_binary :
do_expand_string;
return get_identical_copy_func();
}
|
O0
|
cpp
|
Field_string::get_copy_func(Field const*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x1b8(%rax)
cmpl $0x10, %eax
jne 0xcfe04a
leaq -0x14f1(%rip), %rax # 0xcfcb50
movq %rax, -0x8(%rbp)
jmp 0xcfe166
movq -0x20(%rbp), %rdi
callq 0xce9db0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x1b0(%rax)
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jne 0xcfe096
movq -0x20(%rbp), %rdi
callq 0xb3ddb0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x348(%rax)
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
je 0xcfe0a6
leaq -0x171d(%rip), %rax # 0xcfc980
movq %rax, -0x8(%rbp)
jmp 0xcfe166
movq -0x20(%rbp), %rdi
callq 0xb3d490
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x110(%rax)
movl %eax, %ecx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
jae 0xcfe0fe
movq -0x20(%rbp), %rdi
callq 0xb3ddb0
cmpl $0x1, 0x9c(%rax)
jne 0xcfe0e7
leaq 0x8f(%rip), %rax # 0xcfe170
movq %rax, -0x40(%rbp)
jmp 0xcfe0f4
leaq 0x132(%rip), %rax # 0xcfe220
movq %rax, -0x40(%rbp)
jmp 0xcfe0f4
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xcfe166
movq -0x20(%rbp), %rdi
callq 0xb3d490
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x110(%rax)
movl %eax, %ecx
movl -0x44(%rbp), %eax
cmpl %ecx, %eax
jbe 0xcfe159
movq -0x20(%rbp), %rdi
callq 0xb3ddb0
leaq 0xe8dce0(%rip), %rcx # 0x1b8be10
cmpq %rcx, %rax
jne 0xcfe142
leaq 0x244(%rip), %rax # 0xcfe380
movq %rax, -0x50(%rbp)
jmp 0xcfe14f
leaq 0x2b7(%rip), %rax # 0xcfe400
movq %rax, -0x50(%rbp)
jmp 0xcfe14f
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xcfe166
movq -0x20(%rbp), %rdi
callq 0xcfd8f0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
|
_ZNK12Field_string13get_copy_funcEPK5Field:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rdi, [rbp+var_18]
mov rax, [rdi]
call qword ptr [rax+1B8h]
cmp eax, 10h
jnz short loc_CFE04A
lea rax, _ZN5Field12do_field_intEP10Copy_field; Field::do_field_int(Copy_field *)
mov [rbp+var_8], rax
jmp loc_CFE166
loc_CFE04A:
mov rdi, [rbp+var_20]; this
call _ZNK12Field_string12type_handlerEv; Field_string::type_handler(void)
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]
mov rax, [rdi]
call qword ptr [rax+1B0h]
mov rcx, rax
mov rax, [rbp+var_28]
cmp rax, rcx
jnz short loc_CFE096
mov rdi, [rbp+var_20]; this
call _ZNK9Field_str7charsetEv; Field_str::charset(void)
mov [rbp+var_30], rax
mov rdi, [rbp+var_18]
mov rax, [rdi]
call qword ptr [rax+348h]
mov rcx, rax
mov rax, [rbp+var_30]
cmp rax, rcx
jz short loc_CFE0A6
loc_CFE096:
lea rax, _ZN5Field15do_field_stringEP10Copy_field; Field::do_field_string(Copy_field *)
mov [rbp+var_8], rax
jmp loc_CFE166
loc_CFE0A6:
mov rdi, [rbp+var_20]; this
call _ZNK5Field11pack_lengthEv; Field::pack_length(void)
mov [rbp+var_34], eax
mov rdi, [rbp+var_18]
mov rax, [rdi]
call qword ptr [rax+110h]
mov ecx, eax
mov eax, [rbp+var_34]
cmp eax, ecx
jnb short loc_CFE0FE
mov rdi, [rbp+var_20]; this
call _ZNK9Field_str7charsetEv; Field_str::charset(void)
cmp dword ptr [rax+9Ch], 1
jnz short loc_CFE0E7
lea rax, _ZL13do_cut_stringP10Copy_field; do_cut_string(Copy_field *)
mov [rbp+var_40], rax
jmp short loc_CFE0F4
loc_CFE0E7:
lea rax, _ZL21do_cut_string_complexP10Copy_field; do_cut_string_complex(Copy_field *)
mov [rbp+var_40], rax
jmp short $+2
loc_CFE0F4:
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
jmp short loc_CFE166
loc_CFE0FE:
mov rdi, [rbp+var_20]; this
call _ZNK5Field11pack_lengthEv; Field::pack_length(void)
mov [rbp+var_44], eax
mov rdi, [rbp+var_18]
mov rax, [rdi]
call qword ptr [rax+110h]
mov ecx, eax
mov eax, [rbp+var_44]
cmp eax, ecx
jbe short loc_CFE159
mov rdi, [rbp+var_20]; this
call _ZNK9Field_str7charsetEv; Field_str::charset(void)
lea rcx, my_charset_bin
cmp rax, rcx
jnz short loc_CFE142
lea rax, _ZL16do_expand_binaryP10Copy_field; do_expand_binary(Copy_field *)
mov [rbp+var_50], rax
jmp short loc_CFE14F
loc_CFE142:
lea rax, _ZL16do_expand_stringP10Copy_field; do_expand_string(Copy_field *)
mov [rbp+var_50], rax
jmp short $+2
loc_CFE14F:
mov rax, [rbp+var_50]
mov [rbp+var_8], rax
jmp short loc_CFE166
loc_CFE159:
mov rdi, [rbp+var_20]; this
call _ZNK5Field23get_identical_copy_funcEv; Field::get_identical_copy_func(void)
mov [rbp+var_8], rax
loc_CFE166:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
|
unsigned long long ( * Field_string::get_copy_func(
Field_string *this,
const Field *a2))(Field *this, Copy_field *a2)
{
unsigned int v4; // [rsp+Ch] [rbp-44h]
unsigned int v6; // [rsp+1Ch] [rbp-34h]
long long v7; // [rsp+20h] [rbp-30h]
void *v8; // [rsp+28h] [rbp-28h]
if ( (*(unsigned int ( **)(const Field *))(*(_QWORD *)a2 + 440LL))(a2) == 16 )
return (unsigned long long ( *)(Field *, Copy_field *))Field::do_field_int;
v8 = Field_string::type_handler(this, a2);
if ( v8 != (void *)(*(long long ( **)(const Field *))(*(_QWORD *)a2 + 432LL))(a2) )
return Field::do_field_string;
v7 = Field_str::charset(this);
if ( v7 != (*(long long ( **)(const Field *))(*(_QWORD *)a2 + 840LL))(a2) )
return Field::do_field_string;
v6 = Field::pack_length(this);
if ( v6 >= (*(unsigned int ( **)(const Field *))(*(_QWORD *)a2 + 272LL))(a2) )
{
v4 = Field::pack_length(this);
if ( v4 <= (*(unsigned int ( **)(const Field *))(*(_QWORD *)a2 + 272LL))(a2) )
{
return (unsigned long long ( *)(Field *, Copy_field *))Field::get_identical_copy_func(this);
}
else if ( (_UNKNOWN *)Field_str::charset(this) == &my_charset_bin )
{
return (unsigned long long ( *)(Field *, Copy_field *))do_expand_binary;
}
else
{
return (unsigned long long ( *)(Field *, Copy_field *))do_expand_string;
}
}
else if ( *(_DWORD *)(Field_str::charset(this) + 156) == 1 )
{
return (unsigned long long ( *)(Field *, Copy_field *))do_cut_string;
}
else
{
return (unsigned long long ( *)(Field *, Copy_field *))do_cut_string_complex;
}
}
|
~Named_type_handler:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00c3ccf0
ADD RSP,0x10
POP RBP
RET
|
/* Named_type_handler<Type_handler_varchar>::~Named_type_handler() */
void __thiscall
Named_type_handler<Type_handler_varchar>::~Named_type_handler
(Named_type_handler<Type_handler_varchar> *this)
{
Type_handler_varchar::~Type_handler_varchar((Type_handler_varchar *)this);
return;
}
|
|
57,997
|
common_sampler_sample(common_sampler*, llama_context*, int, bool)
|
monkey531[P]llama/common/sampling.cpp
|
llama_token common_sampler_sample(struct common_sampler * gsmpl, struct llama_context * ctx, int idx, bool grammar_first) {
gsmpl->set_logits(ctx, idx);
auto & grmr = gsmpl->grmr;
auto & chain = gsmpl->chain;
auto & cur_p = gsmpl->cur_p; // initialized by set_logits
if (grammar_first) {
llama_sampler_apply(grmr, &cur_p);
}
llama_sampler_apply(chain, &cur_p);
GGML_ASSERT(cur_p.selected != -1 && "no selected token during sampling - check your sampling configuration");
const llama_token id = cur_p.data[cur_p.selected].id;
if (grammar_first) {
return id;
}
// check if it the sampled token fits the grammar
{
llama_token_data single_token_data = { id, 1.0f, 0.0f };
llama_token_data_array single_token_data_array = { &single_token_data, 1, -1, false };
llama_sampler_apply(grmr, &single_token_data_array);
const bool is_valid = single_token_data_array.data[0].logit != -INFINITY;
if (is_valid) {
return id;
}
}
// resampling:
// if the token is not valid, sample again, but first apply the grammar sampler and then the sampling chain
gsmpl->set_logits(ctx, idx);
llama_sampler_apply(grmr, &cur_p);
llama_sampler_apply(chain, &cur_p);
GGML_ASSERT(cur_p.selected != -1 && "no selected token during re-sampling - check your sampling configuration");
return cur_p.data[cur_p.selected].id;
}
|
O2
|
cpp
|
common_sampler_sample(common_sampler*, llama_context*, int, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %r12d
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x9abf0
leaq 0x198(%rbx), %r14
testl %r12d, %r12d
je 0x99e75
movq 0x138(%rbx), %rdi
movq %r14, %rsi
callq 0x24d70
movq 0x140(%rbx), %rdi
movq %r14, %rsi
callq 0x24d70
movq 0x1a8(%rbx), %rax
cmpq $-0x1, %rax
je 0x99f51
movq (%r14), %rcx
imulq $0xc, %rax, %rax
movl (%rcx,%rax), %r13d
testb %r12b, %r12b
jne 0x99f3f
leaq 0xc(%rsp), %rax
movl %r13d, (%rax)
leaq 0x18(%rsp), %r12
movq %rax, (%r12)
movq $0x1, 0x8(%r12)
orq $-0x1, 0x10(%r12)
movss 0x1220f(%rip), %xmm0 # 0xac0e0
movlps %xmm0, 0x4(%rax)
movb $0x0, 0x18(%r12)
movq 0x138(%rbx), %rdi
movq %r12, %rsi
callq 0x24d70
movq (%r12), %rax
movss 0x211e6(%rip), %xmm0 # 0xbb0dc
ucomiss 0x4(%rax), %xmm0
jb 0x99f3f
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x9abf0
movq 0x138(%rbx), %rdi
movq %r14, %rsi
callq 0x24d70
movq 0x140(%rbx), %rdi
movq %r14, %rsi
callq 0x24d70
movq 0x1a8(%rbx), %rax
cmpq $-0x1, %rax
je 0x99f6d
movq (%r14), %rcx
imulq $0xc, %rax, %rax
movl (%rcx,%rax), %r13d
movl %r13d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x212f9(%rip), %rdi # 0xbb251
leaq 0x121e1(%rip), %rdx # 0xac140
leaq 0x213b5(%rip), %rcx # 0xbb31b
movl $0x133, %esi # imm = 0x133
jmp 0x99f87
leaq 0x212dd(%rip), %rdi # 0xbb251
leaq 0x121c5(%rip), %rdx # 0xac140
leaq 0x213f9(%rip), %rcx # 0xbb37b
movl $0x14f, %esi # imm = 0x14F
xorl %eax, %eax
callq 0x24e90
|
_Z21common_sampler_sampleP14common_samplerP13llama_contextib:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12d, ecx
mov ebp, edx
mov r15, rsi
mov rbx, rdi
call _ZN14common_sampler10set_logitsEP13llama_contexti; common_sampler::set_logits(llama_context *,int)
lea r14, [rbx+198h]
test r12d, r12d
jz short loc_99E75
mov rdi, [rbx+138h]
mov rsi, r14
call _llama_sampler_apply
loc_99E75:
mov rdi, [rbx+140h]
mov rsi, r14
call _llama_sampler_apply
mov rax, [rbx+1A8h]
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_99F51
mov rcx, [r14]
imul rax, 0Ch
mov r13d, [rcx+rax]
test r12b, r12b
jnz loc_99F3F
lea rax, [rsp+68h+var_5C]
mov [rax], r13d
lea r12, [rsp+68h+var_50]
mov [r12], rax
mov qword ptr [r12+8], 1
or qword ptr [r12+10h], 0FFFFFFFFFFFFFFFFh
movss xmm0, cs:dword_AC0E0
movlps qword ptr [rax+4], xmm0
mov byte ptr [r12+18h], 0
mov rdi, [rbx+138h]
mov rsi, r12
call _llama_sampler_apply
mov rax, [r12]
movss xmm0, cs:dword_BB0DC
ucomiss xmm0, dword ptr [rax+4]
jb short loc_99F3F
mov rdi, rbx
mov rsi, r15
mov edx, ebp
call _ZN14common_sampler10set_logitsEP13llama_contexti; common_sampler::set_logits(llama_context *,int)
mov rdi, [rbx+138h]
mov rsi, r14
call _llama_sampler_apply
mov rdi, [rbx+140h]
mov rsi, r14
call _llama_sampler_apply
mov rax, [rbx+1A8h]
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_99F6D
mov rcx, [r14]
imul rax, 0Ch
mov r13d, [rcx+rax]
loc_99F3F:
mov eax, r13d
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_99F51:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCurPSelected1N; "cur_p.selected != -1 && \"no selected t"...
mov esi, 133h
jmp short loc_99F87
loc_99F6D:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCurPSelected1N_0; "cur_p.selected != -1 && \"no selected t"...
mov esi, 14Fh
loc_99F87:
xor eax, eax
call _ggml_abort
|
long long common_sampler_sample(_QWORD *a1, long long a2, unsigned int a3, int a4)
{
_QWORD *v6; // r14
long long v7; // rax
unsigned int v8; // r13d
long long v9; // rax
int v11; // [rsp+Ch] [rbp-5Ch] BYREF
double v12; // [rsp+10h] [rbp-58h] BYREF
_QWORD v13[3]; // [rsp+18h] [rbp-50h] BYREF
char v14; // [rsp+30h] [rbp-38h]
((void (*)(void))common_sampler::set_logits)();
v6 = a1 + 51;
if ( a4 )
llama_sampler_apply(a1[39], a1 + 51);
llama_sampler_apply(a1[40], a1 + 51);
v7 = a1[53];
if ( v7 == -1 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
307LL,
"GGML_ASSERT(%s) failed",
"cur_p.selected != -1 && \"no selected token during sampling - check your sampling configuration\"");
}
else
{
v8 = *(_DWORD *)(*v6 + 12 * v7);
if ( (_BYTE)a4 )
return v8;
v11 = *(_DWORD *)(*v6 + 12 * v7);
v13[0] = &v11;
v13[1] = 1LL;
v13[2] = -1LL;
_mm_storel_ps(&v12, (__m128)0x3F800000u);
v14 = 0;
llama_sampler_apply(a1[39], v13);
if ( *(float *)(v13[0] + 4LL) > -INFINITY )
return v8;
common_sampler::set_logits(a1, a2, a3);
llama_sampler_apply(a1[39], a1 + 51);
llama_sampler_apply(a1[40], a1 + 51);
v9 = a1[53];
if ( v9 != -1 )
return *(unsigned int *)(*v6 + 12 * v9);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
335LL,
"GGML_ASSERT(%s) failed",
"cur_p.selected != -1 && \"no selected token during re-sampling - check your sampling configuration\"");
}
return common_sampler_sample_and_accept_n();
}
|
common_sampler_sample:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12D,ECX
MOV EBP,EDX
MOV R15,RSI
MOV RBX,RDI
CALL 0x0019abf0
LEA R14,[RBX + 0x198]
TEST R12D,R12D
JZ 0x00199e75
MOV RDI,qword ptr [RBX + 0x138]
MOV RSI,R14
CALL 0x00124d70
LAB_00199e75:
MOV RDI,qword ptr [RBX + 0x140]
MOV RSI,R14
CALL 0x00124d70
MOV RAX,qword ptr [RBX + 0x1a8]
CMP RAX,-0x1
JZ 0x00199f51
MOV RCX,qword ptr [R14]
IMUL RAX,RAX,0xc
MOV R13D,dword ptr [RCX + RAX*0x1]
TEST R12B,R12B
JNZ 0x00199f3f
LEA RAX,[RSP + 0xc]
MOV dword ptr [RAX],R13D
LEA R12,[RSP + 0x18]
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x8],0x1
OR qword ptr [R12 + 0x10],-0x1
MOVSS XMM0,dword ptr [0x001ac0e0]
MOVLPS qword ptr [RAX + 0x4],XMM0
MOV byte ptr [R12 + 0x18],0x0
MOV RDI,qword ptr [RBX + 0x138]
MOV RSI,R12
CALL 0x00124d70
MOV RAX,qword ptr [R12]
MOVSS XMM0,dword ptr [0x001bb0dc]
UCOMISS XMM0,dword ptr [RAX + 0x4]
JC 0x00199f3f
MOV RDI,RBX
MOV RSI,R15
MOV EDX,EBP
CALL 0x0019abf0
MOV RDI,qword ptr [RBX + 0x138]
MOV RSI,R14
CALL 0x00124d70
MOV RDI,qword ptr [RBX + 0x140]
MOV RSI,R14
CALL 0x00124d70
MOV RAX,qword ptr [RBX + 0x1a8]
CMP RAX,-0x1
JZ 0x00199f6d
MOV RCX,qword ptr [R14]
IMUL RAX,RAX,0xc
MOV R13D,dword ptr [RCX + RAX*0x1]
LAB_00199f3f:
MOV EAX,R13D
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00199f51:
LEA RDI,[0x1bb251]
LEA RDX,[0x1ac140]
LEA RCX,[0x1bb31b]
MOV ESI,0x133
JMP 0x00199f87
LAB_00199f6d:
LEA RDI,[0x1bb251]
LEA RDX,[0x1ac140]
LEA RCX,[0x1bb37b]
MOV ESI,0x14f
LAB_00199f87:
XOR EAX,EAX
CALL 0x00124e90
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* common_sampler_sample(common_sampler*, llama_context*, int, bool) */
int4
common_sampler_sample(common_sampler *param_1,llama_context *param_2,int param_3,bool param_4)
{
common_sampler *pcVar1;
int7 in_register_00000009;
char *pcVar2;
int8 uVar3;
int4 uVar4;
int4 local_5c;
ulong local_58;
int4 *local_50;
int8 local_48;
int8 local_40;
int1 local_38;
common_sampler::set_logits(param_1,param_2,param_3);
pcVar1 = param_1 + 0x198;
if ((int)CONCAT71(in_register_00000009,param_4) != 0) {
llama_sampler_apply(*(int8 *)(param_1 + 0x138),pcVar1);
}
llama_sampler_apply(*(int8 *)(param_1 + 0x140),pcVar1);
if (*(long *)(param_1 + 0x1a8) != -1) {
uVar4 = *(int4 *)(*(long *)pcVar1 + *(long *)(param_1 + 0x1a8) * 0xc);
if (!param_4) {
local_50 = &local_5c;
local_48 = 1;
local_40 = 0xffffffffffffffff;
local_58 = (ulong)_DAT_001ac0e0;
local_38 = 0;
local_5c = uVar4;
llama_sampler_apply(*(int8 *)(param_1 + 0x138),&local_50);
if ((float)local_50[1] <= DAT_001bb0dc) {
common_sampler::set_logits(param_1,param_2,param_3);
llama_sampler_apply(*(int8 *)(param_1 + 0x138),pcVar1);
llama_sampler_apply(*(int8 *)(param_1 + 0x140),pcVar1);
if (*(long *)(param_1 + 0x1a8) == -1) {
pcVar2 =
"cur_p.selected != -1 && \"no selected token during re-sampling - check your sampling configuration\""
;
uVar3 = 0x14f;
goto LAB_00199f87;
}
uVar4 = *(int4 *)(*(long *)pcVar1 + *(long *)(param_1 + 0x1a8) * 0xc);
}
}
return uVar4;
}
pcVar2 =
"cur_p.selected != -1 && \"no selected token during sampling - check your sampling configuration\""
;
uVar3 = 0x133;
LAB_00199f87:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
57,998
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&)
|
llama.cpp/common/./json.hpp
|
inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
}
|
O3
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rsi), %rdi
callq 0x21690
movq %rax, %rbp
movq %r12, %rdi
callq 0x21690
movq 0x8(%r15), %rcx
addq %rbp, %rax
leaq (%rcx,%rax), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x21e80
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x21b70
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21b70
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x21560
movsbl (%r14), %esi
movq %rbx, %rdi
callq 0x22400
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x36021
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x21180
movq %r14, %rdi
callq 0x21b20
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rsp+38h+var_38], rax
mov [rdi], rax
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, [rsi]
call _strlen
mov rbp, rax
mov rdi, r12
call _strlen
mov rcx, [r15+8]
add rax, rbp
lea rsi, [rcx+rax]
inc rsi
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rsi, [r13+0]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rdi, rbx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong)
movsx esi, byte ptr [r14]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, [rsp+0]
jz short loc_36021
mov rax, [rsp+0]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_36021:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(
long long a1,
_QWORD *a2,
long long a3,
_QWORD *a4,
char *a5)
{
long long v8; // rbp
long long v9; // rax
long long v10; // rdx
long long v11; // rcx
long long v12; // r8
long long v13; // r9
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v8 = strlen(*a2);
v9 = strlen(a3);
std::string::reserve(a1, a4[1] + v8 + v9 + 1);
std::string::append(a1, *a2);
std::string::append(a1, a3);
std::string::append(a1, *a4, a4[1]);
std::string::push_back(a1, (unsigned int)*a5, v10, v11, v12, v13);
return a1;
}
|
concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RSP],RAX
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,qword ptr [RSI]
CALL 0x00121690
MOV RBP,RAX
MOV RDI,R12
CALL 0x00121690
MOV RCX,qword ptr [R15 + 0x8]
ADD RAX,RBP
LEA RSI,[RCX + RAX*0x1]
INC RSI
LAB_00135fba:
MOV RDI,RBX
CALL 0x00121e80
MOV RSI,qword ptr [R13]
MOV RDI,RBX
CALL 0x00121b70
MOV RDI,RBX
MOV RSI,R12
CALL 0x00121b70
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,RBX
CALL 0x00121560
MOVSX ESI,byte ptr [R14]
MOV RDI,RBX
CALL 0x00122400
LAB_00135ff4:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char
const*, char const (&) [15], std::__cxx11::string, char>(char const*&&, char const (&) [15],
std::__cxx11::string&&, char&&) */
char ** nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char>
(char **param_1,char *param_2,string *param_3,char *param_4)
{
*param_1 = (char *)(param_1 + 2);
param_1[1] = (char *)0x0;
*(int1 *)(param_1 + 2) = 0;
strlen(*(char **)param_2);
strlen((char *)param_3);
/* try { // try from 00135fba to 00135ff3 has its CatchHandler @ 00136006 */
std::__cxx11::string::reserve((ulong)param_1);
std::__cxx11::string::append((char *)param_1);
std::__cxx11::string::append((char *)param_1);
std::__cxx11::string::append((char *)param_1,*(ulong *)param_4);
std::__cxx11::string::push_back((char)param_1);
return param_1;
}
|
|
57,999
|
mi_update_blob_record
|
eloqsql/storage/myisam/mi_dynrec.c
|
int _mi_update_blob_record(MI_INFO *info, my_off_t pos, const uchar *record)
{
uchar *rec_buff;
int error;
ulong reclength,extra;
extra= (ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER)+MI_SPLIT_LENGTH+
MI_DYN_DELETE_BLOCK_HEADER);
reclength= (info->s->base.pack_reclength+
_mi_calc_total_blob_length(info,record)+ extra);
if (!(rec_buff=(uchar*) my_alloca(reclength)))
{
my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(-1);
}
reclength=_mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER),
record);
error=update_dynamic_record(info,pos,
rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER),
reclength);
my_afree(rec_buff);
return(error);
}
|
O3
|
c
|
mi_update_blob_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq 0x148(%rax), %r12
movq %rdx, %rsi
callq 0x2fa48
leaq (%r12,%rax), %rsi
addq $0x5c, %rsi
xorl %edi, %edi
xorl %edx, %edx
callq 0x5b311
testq %rax, %rax
je 0x2fb44
movq %rax, %r12
movq %rax, %r13
addq $0x18, %r13
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x2f10e
movl %eax, %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x2f59a
movl %eax, %ebx
movq %r12, %rdi
callq 0x5b53e
movl %ebx, %eax
jmp 0x2fb54
callq 0x5cfd2
movl $0x80, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_mi_update_blob_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov rax, [rdi]
mov r12, [rax+148h]
mov rsi, rdx
call _mi_calc_total_blob_length
lea rsi, [r12+rax]
add rsi, 5Ch ; '\'
xor edi, edi
xor edx, edx
call my_malloc
test rax, rax
jz short loc_2FB44
mov r12, rax
mov r13, rax
add r13, 18h
mov rdi, r14
mov rsi, r13
mov rdx, r15
call _mi_rec_pack
mov ecx, eax
mov rdi, r14
mov rsi, rbx
mov rdx, r13
call update_dynamic_record
mov ebx, eax
mov rdi, r12
call my_free
mov eax, ebx
jmp short loc_2FB54
loc_2FB44:
call _my_thread_var
mov dword ptr [rax], 80h
mov eax, 0FFFFFFFFh
loc_2FB54:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long mi_update_blob_record(long long *a1, long long a2, char *a3)
{
long long v5; // r12
long long v6; // rsi
long long v7; // rax
long long v8; // rdx
long long v9; // r12
long long v10; // r13
unsigned int v11; // eax
unsigned int updated; // ebx
v5 = *(_QWORD *)(*a1 + 328);
v6 = v5 + mi_calc_total_blob_length(a1, (long long)a3) + 92;
v7 = my_malloc(0LL, v6, 0LL);
if ( v7 )
{
v9 = v7;
v10 = v7 + 24;
v11 = mi_rec_pack((long long)a1, (_BYTE *)(v7 + 24), a3);
updated = update_dynamic_record(a1, a2, v10, v11);
my_free(v9);
return updated;
}
else
{
*(_DWORD *)my_thread_var(0LL, v6, v8) = 128;
return 0xFFFFFFFFLL;
}
}
|
_mi_update_blob_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
MOV R12,qword ptr [RAX + 0x148]
MOV RSI,RDX
CALL 0x0012fa48
LEA RSI,[R12 + RAX*0x1]
ADD RSI,0x5c
XOR EDI,EDI
XOR EDX,EDX
CALL 0x0015b311
TEST RAX,RAX
JZ 0x0012fb44
MOV R12,RAX
MOV R13,RAX
ADD R13,0x18
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
CALL 0x0012f10e
MOV ECX,EAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R13
CALL 0x0012f59a
MOV EBX,EAX
MOV RDI,R12
CALL 0x0015b53e
MOV EAX,EBX
JMP 0x0012fb54
LAB_0012fb44:
CALL 0x0015cfd2
MOV dword ptr [RAX],0x80
MOV EAX,0xffffffff
LAB_0012fb54:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 _mi_update_blob_record(long *param_1,int8 param_2,int8 param_3)
{
int4 uVar1;
long lVar2;
long lVar3;
int4 *puVar4;
lVar3 = *(long *)(*param_1 + 0x148);
lVar2 = _mi_calc_total_blob_length(param_1,param_3);
lVar3 = my_malloc(0,lVar3 + lVar2 + 0x5c,0);
if (lVar3 == 0) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x80;
uVar1 = 0xffffffff;
}
else {
uVar1 = _mi_rec_pack(param_1,lVar3 + 0x18,param_3);
uVar1 = update_dynamic_record(param_1,param_2,lVar3 + 0x18,uVar1);
my_free(lVar3);
}
return uVar1;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.