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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
14,700
|
my_fill_mb2
|
eloqsql/strings/ctype-ucs2.c
|
static void
my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill)
{
char buf[10], *last;
size_t buflen, remainder;
DBUG_ASSERT((slen % 2) == 0);
buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf,
(uchar*) buf + sizeof(buf));
DBUG_ASSERT(buflen > 0);
/*
"last" in the last position where a sequence of "buflen" bytes can start.
*/
for (last= s + slen - buflen; s <= last; s+= buflen)
{
/* Enough space for the character */
memcpy(s, buf, buflen);
}
/*
If there are some more space which is not enough
for the whole multibyte character, then add trailing zeros.
*/
if ((remainder= last + buflen - s) > 0)
bzero(s, (size_t) remainder);
}
|
O3
|
c
|
my_fill_mb2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0xb8(%rdi), %rax
movslq %ecx, %rsi
leaq -0x30(%rbp), %rcx
leaq -0x3a(%rbp), %rdx
callq *0x30(%rax)
movslq %eax, %r15
addq %r14, %rbx
movq %rbx, %r13
subq %r15, %r13
cmpq %r14, %r13
jb 0x4d463
leaq -0x3a(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x24250
addq %r15, %r14
cmpq %r13, %r14
jbe 0x4d44d
subq %r14, %rbx
je 0x4d475
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x241a0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x4d493
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24390
|
my_fill_mb2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+0B8h]
movsxd rsi, ecx
lea rcx, [rbp+var_30]
lea rdx, [rbp+var_3A]
call qword ptr [rax+30h]
movsxd r15, eax
add rbx, r14
mov r13, rbx
sub r13, r15
cmp r13, r14
jb short loc_4D463
lea r12, [rbp+var_3A]
loc_4D44D:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _memcpy
add r14, r15
cmp r14, r13
jbe short loc_4D44D
loc_4D463:
sub rbx, r14
jz short loc_4D475
mov rdi, r14
xor esi, esi
mov rdx, rbx
call _memset
loc_4D475:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_4D493
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4D493:
call ___stack_chk_fail
|
unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4)
{
unsigned long long v5; // r14
long long v6; // r15
long long v7; // rbx
long long v8; // rbx
_BYTE v10[10]; // [rsp+6h] [rbp-3Ah] BYREF
unsigned long long v11[6]; // [rsp+10h] [rbp-30h] BYREF
v5 = a2;
v11[0] = __readfsqword(0x28u);
v6 = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
a4,
v10,
v11);
v7 = a2 + a3;
if ( v7 - v6 >= a2 )
{
do
{
memcpy(v5, v10, v6);
v5 += v6;
}
while ( v5 <= v7 - v6 );
}
v8 = v7 - v5;
if ( v8 )
memset(v5, 0LL, v8);
return __readfsqword(0x28u);
}
|
my_fill_mb2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOVSXD RSI,ECX
LEA RCX,[RBP + -0x30]
LEA RDX,[RBP + -0x3a]
CALL qword ptr [RAX + 0x30]
MOVSXD R15,EAX
ADD RBX,R14
MOV R13,RBX
SUB R13,R15
CMP R13,R14
JC 0x0014d463
LEA R12,[RBP + -0x3a]
LAB_0014d44d:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00124250
ADD R14,R15
CMP R14,R13
JBE 0x0014d44d
LAB_0014d463:
SUB RBX,R14
JZ 0x0014d475
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
CALL 0x001241a0
LAB_0014d475:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0014d493
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014d493:
CALL 0x00124390
|
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4)
{
int iVar1;
void *pvVar2;
void *__dest;
size_t sVar3;
long in_FS_OFFSET;
int1 local_42 [10];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_42,&local_38);
sVar3 = (size_t)iVar1;
pvVar2 = (void *)((long)param_2 + (param_3 - sVar3));
__dest = param_2;
if (param_2 <= pvVar2) {
do {
memcpy(__dest,local_42,sVar3);
__dest = (void *)((long)__dest + sVar3);
} while (__dest <= pvVar2);
}
sVar3 = (long)param_2 + (param_3 - (long)__dest);
if (sVar3 != 0) {
memset(__dest,0,sVar3);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
14,701
|
MouseCursorPosCallback
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
|
static void MouseCursorPosCallback(GLFWwindow *window, double x, double y)
{
CORE.Input.Mouse.currentPosition.x = (float)x;
CORE.Input.Mouse.currentPosition.y = (float)y;
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
// Process mouse events as touches to be able to use mouse-gestures
GestureEvent gestureEvent = { 0 };
gestureEvent.touchAction = TOUCH_ACTION_MOVE;
// Assign a pointer ID
gestureEvent.pointId[0] = 0;
// Register touch points count
gestureEvent.pointCount = 1;
// Register touch points position, only one point registered
gestureEvent.position[0] = CORE.Input.Touch.position[0];
// Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height
gestureEvent.position[0].x /= (float)GetScreenWidth();
gestureEvent.position[0].y /= (float)GetScreenHeight();
// Gesture data is sent to gestures-system for processing
ProcessGestureEvent(gestureEvent);
#endif
}
|
O0
|
c
|
MouseCursorPosCallback:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd -0x10(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x14edd2(%rip) # 0x21b3dc
movsd -0x18(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x14edc5(%rip) # 0x21b3e0
movq 0x14edba(%rip), %rax # 0x21b3dc
movq %rax, 0x14ee0f(%rip) # 0x21b438
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x68, %edx
callq 0xa2d0
movl $0x2, -0x80(%rbp)
movl $0x0, -0x78(%rbp)
movl $0x1, -0x7c(%rbp)
movq 0x14ede3(%rip), %rax # 0x21b438
movq %rax, -0x58(%rbp)
callq 0xcce20
cvtsi2ss %eax, %xmm1
movss -0x58(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x58(%rbp)
callq 0xcce30
cvtsi2ss %eax, %xmm1
movss -0x54(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x54(%rbp)
movq -0x20(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x60(%rax)
movups -0x30(%rbp), %xmm0
movups %xmm0, 0x50(%rax)
movups -0x40(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x80(%rbp), %xmm0
movups -0x70(%rbp), %xmm1
movups -0x60(%rbp), %xmm2
movups -0x50(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xc2940
addq $0xf0, %rsp
popq %rbp
retq
nop
|
MouseCursorPosCallback:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov [rbp+var_8], rdi
movsd [rbp+var_10], xmm0
movsd [rbp+var_18], xmm1
movsd xmm0, [rbp+var_10]
cvtsd2ss xmm0, xmm0
movss dword ptr cs:qword_21B3DC, xmm0
movsd xmm0, [rbp+var_18]
cvtsd2ss xmm0, xmm0
movss dword ptr cs:qword_21B3DC+4, xmm0
mov rax, cs:qword_21B3DC
mov cs:qword_21B438, rax
lea rdi, [rbp+var_80]
xor esi, esi
mov edx, 68h ; 'h'
call _memset
mov dword ptr [rbp+var_80], 2
mov dword ptr [rbp+var_80+8], 0
mov dword ptr [rbp+var_80+4], 1
mov rax, cs:qword_21B438
mov [rbp+var_58], rax
call GetScreenWidth
cvtsi2ss xmm1, eax
movss xmm0, dword ptr [rbp+var_58]
divss xmm0, xmm1
movss dword ptr [rbp+var_58], xmm0
call GetScreenHeight
cvtsi2ss xmm1, eax
movss xmm0, dword ptr [rbp+var_58+4]
divss xmm0, xmm1
movss dword ptr [rbp+var_58+4], xmm0
mov rcx, [rbp+var_20]
mov rax, rsp
mov [rax+60h], rcx
movups xmm0, [rbp+var_30]
movups xmmword ptr [rax+50h], xmm0
movups xmm0, [rbp+var_40]
movups xmmword ptr [rax+40h], xmm0
movups xmm0, [rbp+var_80]
movups xmm1, [rbp+var_70]
movups xmm2, xmmword ptr [rbp-60h]
movups xmm3, [rbp+var_50]
movups xmmword ptr [rax+30h], xmm3
movups xmmword ptr [rax+20h], xmm2
movups xmmword ptr [rax+10h], xmm1
movups xmmword ptr [rax], xmm0
call ProcessGestureEvent
add rsp, 0F0h
pop rbp
retn
|
void MouseCursorPosCallback(long long a1, double a2, double a3)
{
float v3; // xmm0_4
float v4; // xmm0_4
long long v5; // rdx
long long v6; // r8
long long v7; // r9
__int128 v8; // [rsp+70h] [rbp-80h] BYREF
long long v9; // [rsp+80h] [rbp-70h]
long long v10; // [rsp+88h] [rbp-68h]
long long v11; // [rsp+90h] [rbp-60h]
long long v12; // [rsp+98h] [rbp-58h]
__int128 v13; // [rsp+A0h] [rbp-50h]
long long v14; // [rsp+D0h] [rbp-20h]
double v15; // [rsp+D8h] [rbp-18h]
double v16; // [rsp+E0h] [rbp-10h]
long long v17; // [rsp+E8h] [rbp-8h]
v17 = a1;
v16 = a2;
v15 = a3;
v3 = a2;
*(float *)&qword_21B3DC = v3;
v4 = a3;
*((float *)&qword_21B3DC + 1) = v4;
qword_21B438 = qword_21B3DC;
memset(&v8, 0LL, 104LL);
LODWORD(v8) = 2;
*(_QWORD *)((char *)&v8 + 4) = 1LL;
v12 = qword_21B438;
*(float *)&v12 = *(float *)&v12 / (float)(int)GetScreenWidth();
*((float *)&v12 + 1) = *((float *)&v12 + 1) / (float)(int)GetScreenHeight();
ProcessGestureEvent((long long)&v8, 0LL, v5, v14, v6, v7, v8, *((long long *)&v8 + 1), v9, v10, v11, v12, v13);
}
|
MouseCursorPosCallback:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV qword ptr [RBP + -0x8],RDI
MOVSD qword ptr [RBP + -0x10],XMM0
MOVSD qword ptr [RBP + -0x18],XMM1
MOVSD XMM0,qword ptr [RBP + -0x10]
CVTSD2SS XMM0,XMM0
MOVSS dword ptr [0x0031b3dc],XMM0
MOVSD XMM0,qword ptr [RBP + -0x18]
CVTSD2SS XMM0,XMM0
MOVSS dword ptr [0x0031b3e0],XMM0
MOV RAX,qword ptr [0x0031b3dc]
MOV qword ptr [0x0031b438],RAX
LEA RDI,[RBP + -0x80]
XOR ESI,ESI
MOV EDX,0x68
CALL 0x0010a2d0
MOV dword ptr [RBP + -0x80],0x2
MOV dword ptr [RBP + -0x78],0x0
MOV dword ptr [RBP + -0x7c],0x1
MOV RAX,qword ptr [0x0031b438]
MOV qword ptr [RBP + -0x58],RAX
CALL 0x001cce20
CVTSI2SS XMM1,EAX
MOVSS XMM0,dword ptr [RBP + -0x58]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x58],XMM0
CALL 0x001cce30
CVTSI2SS XMM1,EAX
MOVSS XMM0,dword ptr [RBP + -0x54]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x54],XMM0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,RSP
MOV qword ptr [RAX + 0x60],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0x30]
MOVUPS xmmword ptr [RAX + 0x50],XMM0
MOVUPS XMM0,xmmword ptr [RBP + -0x40]
MOVUPS xmmword ptr [RAX + 0x40],XMM0
MOVUPS XMM0,xmmword ptr [RBP + -0x80]
MOVUPS XMM1,xmmword ptr [RBP + -0x70]
MOVUPS XMM2,xmmword ptr [RBP + -0x60]
MOVUPS XMM3,xmmword ptr [RBP + -0x50]
MOVUPS xmmword ptr [RAX + 0x30],XMM3
MOVUPS xmmword ptr [RAX + 0x20],XMM2
MOVUPS xmmword ptr [RAX + 0x10],XMM1
MOVUPS xmmword ptr [RAX],XMM0
CALL 0x001c2940
ADD RSP,0xf0
POP RBP
RET
|
void MouseCursorPosCallback(double param_1,double param_2,int8 param_3)
{
int iVar1;
int4 local_88;
int4 uStack_84;
int4 uStack_80;
int8 uStack_60;
double local_20;
double local_18;
int8 local_10;
DAT_0031b3dc._0_4_ = (float)param_1;
DAT_0031b3dc._4_4_ = (float)param_2;
DAT_0031b438 = CONCAT44(DAT_0031b3dc._4_4_,(float)DAT_0031b3dc);
local_20 = param_2;
local_18 = param_1;
local_10 = param_3;
memset(&local_88,0,0x68);
local_88 = 2;
uStack_80 = 0;
uStack_84 = 1;
uStack_60 = DAT_0031b438;
iVar1 = GetScreenWidth();
uStack_60._0_4_ = (float)uStack_60 / (float)iVar1;
iVar1 = GetScreenHeight();
uStack_60 = CONCAT44(uStack_60._4_4_ / (float)iVar1,(float)uStack_60);
ProcessGestureEvent();
return;
}
|
|
14,702
|
MouseCursorPosCallback
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
|
static void MouseCursorPosCallback(GLFWwindow *window, double x, double y)
{
CORE.Input.Mouse.currentPosition.x = (float)x;
CORE.Input.Mouse.currentPosition.y = (float)y;
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
// Process mouse events as touches to be able to use mouse-gestures
GestureEvent gestureEvent = { 0 };
gestureEvent.touchAction = TOUCH_ACTION_MOVE;
// Assign a pointer ID
gestureEvent.pointId[0] = 0;
// Register touch points count
gestureEvent.pointCount = 1;
// Register touch points position, only one point registered
gestureEvent.position[0] = CORE.Input.Touch.position[0];
// Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height
gestureEvent.position[0].x /= (float)GetScreenWidth();
gestureEvent.position[0].y /= (float)GetScreenHeight();
// Gesture data is sent to gestures-system for processing
ProcessGestureEvent(gestureEvent);
#endif
}
|
O2
|
c
|
MouseCursorPosCallback:
subq $0xd8, %rsp
unpcklpd %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
cvtpd2ps %xmm0, %xmm0
movlpd %xmm0, 0xc812c(%rip) # 0x12833c
movlpd %xmm0, 0xc8180(%rip) # 0x128398
xorpd %xmm1, %xmm1
leaq 0x70(%rsp), %rsi
movupd %xmm1, 0x28(%rsi)
movupd %xmm1, 0x58(%rsi)
movupd %xmm1, 0x48(%rsi)
movupd %xmm1, 0x38(%rsi)
movupd %xmm1, 0x18(%rsi)
movupd %xmm1, 0x8(%rsi)
movabsq $0x100000002, %rax # imm = 0x100000002
movq %rax, (%rsi)
movsd 0xc79b8(%rip), %xmm1 # 0x127c0c
cvtdq2ps %xmm1, %xmm1
divps %xmm1, %xmm0
movlps %xmm0, 0x28(%rsi)
pushq $0xd
popq %rcx
movq %rsp, %rdi
rep movsq (%rsi), %es:(%rdi)
callq 0x5a665
addq $0xd8, %rsp
retq
|
MouseCursorPosCallback:
sub rsp, 0D8h
unpcklpd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movlpd cs:qword_12833C, xmm0
movlpd cs:qword_128398, xmm0
xorpd xmm1, xmm1
lea rsi, [rsp+0D8h+var_68]
movupd xmmword ptr [rsi+28h], xmm1
movupd xmmword ptr [rsi+58h], xmm1
movupd xmmword ptr [rsi+48h], xmm1
movupd xmmword ptr [rsi+38h], xmm1
movupd xmmword ptr [rsi+18h], xmm1
movupd xmmword ptr [rsi+8], xmm1
mov rax, 100000002h
mov [rsi], rax
movsd xmm1, cs:qword_127C0C
cvtdq2ps xmm1, xmm1
divps xmm0, xmm1
movlps qword ptr [rsi+28h], xmm0
push 0Dh
pop rcx
mov rdi, rsp
rep movsq
call ProcessGestureEvent
add rsp, 0D8h
retn
|
void MouseCursorPosCallback(
__m128d a1,
__m128d a2,
double a3,
double a4,
double a5,
double a6,
double a7,
double a8,
long long a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
__m128 v14; // xmm0
__m128 v15; // xmm1
__m128 v16; // xmm0
long long v17[13]; // [rsp+0h] [rbp-D8h] BYREF
long long v18; // [rsp+68h] [rbp-70h] BYREF
double v19[13]; // [rsp+70h] [rbp-68h] BYREF
_UNKNOWN *retaddr; // [rsp+D8h] [rbp+0h] BYREF
v14 = _mm_cvtpd_ps(_mm_unpacklo_pd(a1, a2));
qword_12833C = v14.m128_u64[0];
qword_128398 = v14.m128_u64[0];
memset(&v19[1], 0, 96);
*(_QWORD *)&v19[0] = 0x100000002LL;
v15 = _mm_cvtepi32_ps((__m128i)(unsigned long long)qword_127C0C);
v16 = _mm_div_ps(v14, v15);
_mm_storel_ps(&v19[5], v16);
qmemcpy(v17, v19, sizeof(v17));
ProcessGestureEvent(
*(double *)v16.m128_u64,
*(double *)v15.m128_u64,
a3,
a4,
a5,
a6,
a7,
a8,
(long long)&v18,
(long long)&retaddr,
a11,
0LL,
a13,
a14,
v17[0],
v17[1],
v17[2],
v17[3],
v17[4],
v17[5],
v17[6]);
}
|
MouseCursorPosCallback:
SUB RSP,0xd8
UNPCKLPD XMM0,XMM1
CVTPD2PS XMM0,XMM0
MOVLPD qword ptr [0x0022833c],XMM0
MOVLPD qword ptr [0x00228398],XMM0
XORPD XMM1,XMM1
LEA RSI,[RSP + 0x70]
MOVUPD xmmword ptr [RSI + 0x28],XMM1
MOVUPD xmmword ptr [RSI + 0x58],XMM1
MOVUPD xmmword ptr [RSI + 0x48],XMM1
MOVUPD xmmword ptr [RSI + 0x38],XMM1
MOVUPD xmmword ptr [RSI + 0x18],XMM1
MOVUPD xmmword ptr [RSI + 0x8],XMM1
MOV RAX,0x100000002
MOV qword ptr [RSI],RAX
MOVSD XMM1,qword ptr [0x00227c0c]
CVTDQ2PS XMM1,XMM1
DIVPS XMM0,XMM1
MOVLPS qword ptr [RSI + 0x28],XMM0
PUSH 0xd
POP RCX
MOV RDI,RSP
MOVSQ.REP RDI,RSI
CALL 0x0015a665
ADD RSP,0xd8
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void MouseCursorPosCallback(double param_1,double param_2)
{
long lVar1;
int8 *puVar2;
int8 *puVar3;
int1 auVar4 [16];
int1 auVar5 [16];
int8 auStack_d8 [14];
int8 local_68 [6];
int8 uStack_38;
int8 local_30;
int8 uStack_28;
int8 local_20;
int8 uStack_18;
int8 local_10;
int8 uStack_8;
auVar4._0_8_ = CONCAT44((float)param_2,(float)param_1);
auVar4._8_8_ = 0;
uStack_38 = 0;
local_10 = 0;
uStack_8 = 0;
local_20 = 0;
uStack_18 = 0;
local_30 = 0;
uStack_28 = 0;
local_68[3] = 0;
local_68[4] = 0;
local_68[1] = 0;
local_68[2] = 0;
local_68[0] = 0x100000002;
auVar5._4_4_ = (float)(int)((ulong)_DAT_00227c0c >> 0x20);
auVar5._0_4_ = (float)(int)_DAT_00227c0c;
auVar5._8_8_ = 0;
auVar5 = divps(auVar4,auVar5);
local_68[5] = auVar5._0_8_;
puVar2 = local_68;
puVar3 = auStack_d8;
for (lVar1 = 0xd; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar3 = *puVar2;
puVar2 = puVar2 + 1;
puVar3 = puVar3 + 1;
}
DAT_0022833c = auVar4._0_8_;
_DAT_00228398 = auVar4._0_8_;
ProcessGestureEvent();
return;
}
|
|
14,703
|
MouseCursorPosCallback
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
|
static void MouseCursorPosCallback(GLFWwindow *window, double x, double y)
{
CORE.Input.Mouse.currentPosition.x = (float)x;
CORE.Input.Mouse.currentPosition.y = (float)y;
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
// Process mouse events as touches to be able to use mouse-gestures
GestureEvent gestureEvent = { 0 };
gestureEvent.touchAction = TOUCH_ACTION_MOVE;
// Assign a pointer ID
gestureEvent.pointId[0] = 0;
// Register touch points count
gestureEvent.pointCount = 1;
// Register touch points position, only one point registered
gestureEvent.position[0] = CORE.Input.Touch.position[0];
// Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height
gestureEvent.position[0].x /= (float)GetScreenWidth();
gestureEvent.position[0].y /= (float)GetScreenHeight();
// Gesture data is sent to gestures-system for processing
ProcessGestureEvent(gestureEvent);
#endif
}
|
O3
|
c
|
MouseCursorPosCallback:
subq $0xd8, %rsp
unpcklpd %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
cvtpd2ps %xmm0, %xmm0
movlpd %xmm0, 0xcaa78(%rip) # 0x13c31c
movlpd %xmm0, 0xcaacc(%rip) # 0x13c378
xorpd %xmm1, %xmm1
leaq 0x70(%rsp), %rsi
movupd %xmm1, 0x28(%rsi)
movupd %xmm1, 0x58(%rsi)
movupd %xmm1, 0x48(%rsi)
movupd %xmm1, 0x38(%rsi)
movupd %xmm1, 0x18(%rsi)
movupd %xmm1, 0x8(%rsi)
movabsq $0x100000002, %rax # imm = 0x100000002
movq %rax, (%rsi)
movsd 0xca304(%rip), %xmm1 # 0x13bbec
cvtdq2ps %xmm1, %xmm1
divps %xmm1, %xmm0
movlps %xmm0, 0x28(%rsi)
movl $0xd, %ecx
movq %rsp, %rdi
rep movsq (%rsi), %es:(%rdi)
callq 0x6a785
addq $0xd8, %rsp
retq
|
MouseCursorPosCallback:
sub rsp, 0D8h
unpcklpd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movlpd qword ptr cs:xmmword_13C31C, xmm0
movlpd cs:qword_13C378, xmm0
xorpd xmm1, xmm1
lea rsi, [rsp+0D8h+var_68]
movupd xmmword ptr [rsi+28h], xmm1
movupd xmmword ptr [rsi+58h], xmm1
movupd xmmword ptr [rsi+48h], xmm1
movupd xmmword ptr [rsi+38h], xmm1
movupd xmmword ptr [rsi+18h], xmm1
movupd xmmword ptr [rsi+8], xmm1
mov rax, 100000002h
mov [rsi], rax
movsd xmm1, cs:qword_13BBEC
cvtdq2ps xmm1, xmm1
divps xmm0, xmm1
movlps qword ptr [rsi+28h], xmm0
mov ecx, 0Dh
mov rdi, rsp
rep movsq
call ProcessGestureEvent
add rsp, 0D8h
retn
|
void MouseCursorPosCallback(
__m128d a1,
__m128d a2,
double a3,
double a4,
double a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11)
{
__m128 v11; // xmm0
__m128 v12; // xmm1
__m128 v13; // xmm0
long long v14[13]; // [rsp+0h] [rbp-D8h] BYREF
long long v15; // [rsp+68h] [rbp-70h] BYREF
double v16[13]; // [rsp+70h] [rbp-68h] BYREF
_UNKNOWN *retaddr; // [rsp+D8h] [rbp+0h] BYREF
v11 = _mm_cvtpd_ps(_mm_unpacklo_pd(a1, a2));
*(_QWORD *)&xmmword_13C31C = v11.m128_u64[0];
qword_13C378 = v11.m128_u64[0];
memset(&v16[1], 0, 96);
*(_QWORD *)&v16[0] = 0x100000002LL;
v12 = _mm_cvtepi32_ps((__m128i)(unsigned long long)qword_13BBEC);
v13 = _mm_div_ps(v11, v12);
_mm_storel_ps(&v16[5], v13);
qmemcpy(v14, v16, sizeof(v14));
ProcessGestureEvent(
*(double *)v13.m128_u64,
*(double *)v12.m128_u64,
a3,
a4,
a5,
(long long)&v15,
(long long)&retaddr,
a8,
0LL,
a10,
a11,
v14[0],
v14[1],
v14[2],
v14[3],
v14[4],
v14[5],
v14[6]);
}
|
MouseCursorPosCallback:
SUB RSP,0xd8
UNPCKLPD XMM0,XMM1
CVTPD2PS XMM0,XMM0
MOVLPD qword ptr [0x0023c31c],XMM0
MOVLPD qword ptr [0x0023c378],XMM0
XORPD XMM1,XMM1
LEA RSI,[RSP + 0x70]
MOVUPD xmmword ptr [RSI + 0x28],XMM1
MOVUPD xmmword ptr [RSI + 0x58],XMM1
MOVUPD xmmword ptr [RSI + 0x48],XMM1
MOVUPD xmmword ptr [RSI + 0x38],XMM1
MOVUPD xmmword ptr [RSI + 0x18],XMM1
MOVUPD xmmword ptr [RSI + 0x8],XMM1
MOV RAX,0x100000002
MOV qword ptr [RSI],RAX
MOVSD XMM1,qword ptr [0x0023bbec]
CVTDQ2PS XMM1,XMM1
DIVPS XMM0,XMM1
MOVLPS qword ptr [RSI + 0x28],XMM0
MOV ECX,0xd
MOV RDI,RSP
MOVSQ.REP RDI,RSI
CALL 0x0016a785
ADD RSP,0xd8
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void MouseCursorPosCallback(double param_1,double param_2)
{
long lVar1;
int8 *puVar2;
int8 *puVar3;
int1 auVar4 [16];
int1 auVar5 [16];
int8 auStack_d8 [14];
int8 local_68 [6];
int8 uStack_38;
int8 local_30;
int8 uStack_28;
int8 local_20;
int8 uStack_18;
int8 local_10;
int8 uStack_8;
auVar4._0_8_ = CONCAT44((float)param_2,(float)param_1);
auVar4._8_8_ = 0;
uStack_38 = 0;
local_10 = 0;
uStack_8 = 0;
local_20 = 0;
uStack_18 = 0;
local_30 = 0;
uStack_28 = 0;
local_68[3] = 0;
local_68[4] = 0;
local_68[1] = 0;
local_68[2] = 0;
local_68[0] = 0x100000002;
auVar5._4_4_ = (float)(int)((ulong)_DAT_0023bbec >> 0x20);
auVar5._0_4_ = (float)(int)_DAT_0023bbec;
auVar5._8_8_ = 0;
auVar5 = divps(auVar4,auVar5);
local_68[5] = auVar5._0_8_;
puVar2 = local_68;
puVar3 = auStack_d8;
for (lVar1 = 0xd; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar3 = *puVar2;
puVar2 = puVar2 + 1;
puVar3 = puVar3 + 1;
}
DAT_0023c31c = auVar4._0_8_;
_DAT_0023c378 = auVar4._0_8_;
ProcessGestureEvent();
return;
}
|
|
14,704
|
ma_update_status_with_lock
|
eloqsql/storage/maria/ma_state.c
|
void _ma_update_status_with_lock(MARIA_HA *info)
{
my_bool locked= 0;
if (info->state == &info->state_save)
{
locked= 1;
mysql_mutex_lock(&info->s->lock.mutex);
}
(*info->s->lock.update_status)(info->lock.status_param);
if (locked)
mysql_mutex_unlock(&info->s->lock.mutex);
}
|
O0
|
c
|
ma_update_status_with_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
addq $0x28, %rcx
cmpq %rcx, %rax
jne 0x49a0c
movb $0x1, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
addq $0x7f0, %rdi # imm = 0x7F0
addq $0x18, %rdi
leaq 0x10892c(%rip), %rsi # 0x15232e
movl $0x168, %edx # imm = 0x168
callq 0x49540
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8b0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x6b8(%rcx), %rdi
callq *%rax
cmpb $0x0, -0x9(%rbp)
je 0x49a44
movq -0x8(%rbp), %rax
movq (%rax), %rdi
addq $0x7f0, %rdi # imm = 0x7F0
addq $0x18, %rdi
callq 0x495b0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ma_update_status_with_lock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_9], 0
mov rax, [rbp+var_8]
mov rax, [rax+20h]
mov rcx, [rbp+var_8]
add rcx, 28h ; '('
cmp rax, rcx
jnz short loc_49A0C
mov [rbp+var_9], 1
mov rax, [rbp+var_8]
mov rdi, [rax]
add rdi, 7F0h
add rdi, 18h
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 168h
call inline_mysql_mutex_lock_6
loc_49A0C:
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+8B0h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+6B8h]
call rax
cmp [rbp+var_9], 0
jz short loc_49A44
mov rax, [rbp+var_8]
mov rdi, [rax]
add rdi, 7F0h
add rdi, 18h
call inline_mysql_mutex_unlock_6
loc_49A44:
add rsp, 10h
pop rbp
retn
|
long long ma_update_status_with_lock(_QWORD *a1)
{
long long result; // rax
char v2; // [rsp+7h] [rbp-9h]
v2 = 0;
if ( (_QWORD *)a1[4] == a1 + 5 )
{
v2 = 1;
inline_mysql_mutex_lock_6(
*a1 + 2056LL,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",
0x168u);
}
result = (*(long long ( **)(_QWORD))(*a1 + 2224LL))(a1[215]);
if ( v2 )
return inline_mysql_mutex_unlock_6(*a1 + 2056LL);
return result;
}
|
_ma_update_status_with_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x28
CMP RAX,RCX
JNZ 0x00149a0c
MOV byte ptr [RBP + -0x9],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
ADD RDI,0x7f0
ADD RDI,0x18
LEA RSI,[0x25232e]
MOV EDX,0x168
CALL 0x00149540
LAB_00149a0c:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8b0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x6b8]
CALL RAX
CMP byte ptr [RBP + -0x9],0x0
JZ 0x00149a44
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
ADD RDI,0x7f0
ADD RDI,0x18
CALL 0x001495b0
LAB_00149a44:
ADD RSP,0x10
POP RBP
RET
|
void _ma_update_status_with_lock(long *param_1)
{
long *plVar1;
plVar1 = (long *)param_1[4];
if (plVar1 == param_1 + 5) {
inline_mysql_mutex_lock
(*param_1 + 0x808,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",
0x168);
}
(**(code **)(*param_1 + 0x8b0))(param_1[0xd7]);
if (plVar1 == param_1 + 5) {
inline_mysql_mutex_unlock(*param_1 + 0x808);
}
return;
}
|
|
14,705
|
my_hash_iterate
|
eloqsql/mysys/hash.c
|
my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument)
{
uint records, i;
records= hash->records;
for (i= 0 ; i < records ; i++)
{
if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data,
argument))
return 1;
}
return 0;
}
|
O0
|
c
|
my_hash_iterate:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x65905
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x28(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
cmpb $0x0, %al
je 0x658f8
movb $0x1, -0x1(%rbp)
jmp 0x65909
jmp 0x658fa
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x658c6
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
my_hash_iterate:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_24], eax
mov [rbp+var_28], 0
loc_658C6:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_24]
jnb short loc_65905
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx+28h]
mov edx, [rbp+var_28]
shl rdx, 4
add rcx, rdx
mov rdi, [rcx+8]
mov rsi, [rbp+var_20]
call rax
cmp al, 0
jz short loc_658F8
mov [rbp+var_1], 1
jmp short loc_65909
loc_658F8:
jmp short $+2
loc_658FA:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp short loc_658C6
loc_65905:
mov [rbp+var_1], 0
loc_65909:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char my_hash_iterate(long long a1, unsigned __int8 ( *a2)(_QWORD, long long), long long a3)
{
unsigned int i; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+Ch] [rbp-24h]
v5 = *(_QWORD *)(a1 + 24);
for ( i = 0; i < v5; ++i )
{
if ( a2(*(_QWORD *)(16LL * i + *(_QWORD *)(a1 + 40) + 8), a3) )
return 1;
}
return 0;
}
|
my_hash_iterate:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x28],0x0
LAB_001658c6:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x00165905
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x28]
MOV EDX,dword ptr [RBP + -0x28]
SHL RDX,0x4
ADD RCX,RDX
MOV RDI,qword ptr [RCX + 0x8]
MOV RSI,qword ptr [RBP + -0x20]
CALL RAX
CMP AL,0x0
JZ 0x001658f8
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00165909
LAB_001658f8:
JMP 0x001658fa
LAB_001658fa:
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001658c6
LAB_00165905:
MOV byte ptr [RBP + -0x1],0x0
LAB_00165909:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_hash_iterate(long param_1,code *param_2,int8 param_3)
{
int8 uVar1;
char cVar2;
uint local_30;
uVar1 = *(int8 *)(param_1 + 0x18);
local_30 = 0;
while( true ) {
if ((uint)uVar1 <= local_30) {
return 0;
}
cVar2 = (*param_2)(*(int8 *)(*(long *)(param_1 + 0x28) + (ulong)local_30 * 0x10 + 8),
param_3);
if (cVar2 != '\0') break;
local_30 = local_30 + 1;
}
return 1;
}
|
|
14,706
|
my_hash_iterate
|
eloqsql/mysys/hash.c
|
my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument)
{
uint records, i;
records= hash->records;
for (i= 0 ; i < records ; i++)
{
if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data,
argument))
return 1;
}
return 0;
}
|
O3
|
c
|
my_hash_iterate:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x18(%rdi), %r12d
testq %r12, %r12
je 0x4c87c
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
shlq $0x4, %r12
xorl %r13d, %r13d
movq 0x28(%r15), %rax
movq 0x8(%rax,%r13), %rdi
movq %rbx, %rsi
callq *%r14
testb %al, %al
jne 0x4c880
addq $0x10, %r13
cmpq %r13, %r12
jne 0x4c860
xorl %eax, %eax
jmp 0x4c882
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
|
my_hash_iterate:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12d, [rdi+18h]
test r12, r12
jz short loc_4C87C
mov rbx, rdx
mov r14, rsi
mov r15, rdi
shl r12, 4
xor r13d, r13d
loc_4C860:
mov rax, [r15+28h]
mov rdi, [rax+r13+8]
mov rsi, rbx
call r14
test al, al
jnz short loc_4C880
add r13, 10h
cmp r12, r13
jnz short loc_4C860
loc_4C87C:
xor eax, eax
jmp short loc_4C882
loc_4C880:
mov al, 1
loc_4C882:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char my_hash_iterate(long long a1, unsigned __int8 ( *a2)(_QWORD, long long), long long a3)
{
long long v4; // r12
long long v5; // r13
if ( !*(_DWORD *)(a1 + 24) )
return 0;
v4 = 16LL * *(unsigned int *)(a1 + 24);
v5 = 0LL;
while ( !a2(*(_QWORD *)(*(_QWORD *)(a1 + 40) + v5 + 8), a3) )
{
v5 += 16LL;
if ( v4 == v5 )
return 0;
}
return 1;
}
|
my_hash_iterate:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12D,dword ptr [RDI + 0x18]
TEST R12,R12
JZ 0x0014c87c
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
SHL R12,0x4
XOR R13D,R13D
LAB_0014c860:
MOV RAX,qword ptr [R15 + 0x28]
MOV RDI,qword ptr [RAX + R13*0x1 + 0x8]
MOV RSI,RBX
CALL R14
TEST AL,AL
JNZ 0x0014c880
ADD R13,0x10
CMP R12,R13
JNZ 0x0014c860
LAB_0014c87c:
XOR EAX,EAX
JMP 0x0014c882
LAB_0014c880:
MOV AL,0x1
LAB_0014c882:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 my_hash_iterate(long param_1,code *param_2,int8 param_3)
{
uint uVar1;
char cVar2;
long lVar3;
uVar1 = *(uint *)(param_1 + 0x18);
if ((ulong)uVar1 != 0) {
lVar3 = 0;
do {
cVar2 = (*param_2)(*(int8 *)(*(long *)(param_1 + 0x28) + 8 + lVar3),param_3);
if (cVar2 != '\0') {
return 1;
}
lVar3 = lVar3 + 0x10;
} while ((ulong)uVar1 << 4 != lVar3);
}
return 0;
}
|
|
14,707
|
tdefl_compress_mem_to_heap
|
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
|
void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len,
size_t *pOut_len, int flags) {
tdefl_output_buffer out_buf;
MZ_CLEAR_OBJ(out_buf);
if (!pOut_len)
return MZ_FALSE;
else
*pOut_len = 0;
out_buf.m_expandable = MZ_TRUE;
if (!tdefl_compress_mem_to_output(
pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags))
return NULL;
*pOut_len = out_buf.m_size;
return out_buf.m_pBuf;
}
|
O2
|
c
|
tdefl_compress_mem_to_heap:
pushq %rbx
subq $0x20, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
testq %rdx, %rdx
je 0x5d2b7
movl %ecx, %r8d
movq %rdx, %rbx
andq $0x0, (%rdx)
movq %rsp, %rcx
movl $0x1, 0x18(%rcx)
leaq 0x1f(%rip), %rdx # 0x5d2bf
callq 0x5d1e2
testl %eax, %eax
je 0x5d2b7
movq (%rsp), %rax
movq %rax, (%rbx)
movq 0x10(%rsp), %rax
jmp 0x5d2b9
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
|
tdefl_compress_mem_to_heap:
push rbx
sub rsp, 20h
xorps xmm0, xmm0
movaps [rsp+28h+var_18], xmm0
movaps [rsp+28h+var_28], xmm0
test rdx, rdx
jz short loc_5D2B7
mov r8d, ecx
mov rbx, rdx
and qword ptr [rdx], 0
mov rcx, rsp
mov dword ptr [rcx+18h], 1
lea rdx, tdefl_output_buffer_putter
call tdefl_compress_mem_to_output
test eax, eax
jz short loc_5D2B7
mov rax, qword ptr [rsp+28h+var_28]
mov [rbx], rax
mov rax, qword ptr [rsp+28h+var_18]
jmp short loc_5D2B9
loc_5D2B7:
xor eax, eax
loc_5D2B9:
add rsp, 20h
pop rbx
retn
|
long long tdefl_compress_mem_to_heap(long long a1, long long a2, _QWORD *a3, unsigned int a4)
{
__int128 v6; // [rsp+0h] [rbp-28h] BYREF
__int128 v7; // [rsp+10h] [rbp-18h]
v7 = 0LL;
v6 = 0LL;
if ( !a3 )
return 0LL;
*a3 = 0LL;
DWORD2(v7) = 1;
if ( !tdefl_compress_mem_to_output(a1, a2, (long long)tdefl_output_buffer_putter, (long long)&v6, a4) )
return 0LL;
*a3 = v6;
return v7;
}
|
tdefl_compress_mem_to_heap:
PUSH RBX
SUB RSP,0x20
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
TEST RDX,RDX
JZ 0x0015d2b7
MOV R8D,ECX
MOV RBX,RDX
AND qword ptr [RDX],0x0
MOV RCX,RSP
MOV dword ptr [RCX + 0x18],0x1
LEA RDX,[0x15d2bf]
CALL 0x0015d1e2
TEST EAX,EAX
JZ 0x0015d2b7
MOV RAX,qword ptr [RSP]
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x10]
JMP 0x0015d2b9
LAB_0015d2b7:
XOR EAX,EAX
LAB_0015d2b9:
ADD RSP,0x20
POP RBX
RET
|
int8
tdefl_compress_mem_to_heap
(int8 param_1,int8 param_2,int8 *param_3,int4 param_4)
{
int iVar1;
int8 local_28;
int8 uStack_20;
int8 local_18;
int8 uStack_10;
local_18 = 0;
local_28 = 0;
uStack_20 = 0;
if (param_3 != (int8 *)0x0) {
*param_3 = 0;
uStack_10 = 1;
iVar1 = tdefl_compress_mem_to_output
(param_1,param_2,tdefl_output_buffer_putter,&local_28,param_4);
if (iVar1 != 0) {
*param_3 = local_28;
return local_18;
}
}
return 0;
}
|
|
14,708
|
tdefl_compress_mem_to_heap
|
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
|
void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len,
size_t *pOut_len, int flags) {
tdefl_output_buffer out_buf;
MZ_CLEAR_OBJ(out_buf);
if (!pOut_len)
return MZ_FALSE;
else
*pOut_len = 0;
out_buf.m_expandable = MZ_TRUE;
if (!tdefl_compress_mem_to_output(
pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags))
return NULL;
*pOut_len = out_buf.m_size;
return out_buf.m_pBuf;
}
|
O3
|
c
|
tdefl_compress_mem_to_heap:
pushq %rbx
subq $0x20, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
testq %rdx, %rdx
je 0x81dea
movl %ecx, %r8d
movq %rdx, %rbx
movq $0x0, (%rdx)
movq %rsp, %rcx
movl $0x1, 0x18(%rcx)
leaq 0x1f(%rip), %rdx # 0x81df2
callq 0x81d02
testl %eax, %eax
je 0x81dea
movq (%rsp), %rax
movq %rax, (%rbx)
movq 0x10(%rsp), %rax
jmp 0x81dec
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
|
tdefl_compress_mem_to_heap:
push rbx
sub rsp, 20h
xorps xmm0, xmm0
movaps [rsp+28h+var_18], xmm0
movaps [rsp+28h+var_28], xmm0
test rdx, rdx
jz short loc_81DEA
mov r8d, ecx
mov rbx, rdx
mov qword ptr [rdx], 0
mov rcx, rsp
mov dword ptr [rcx+18h], 1
lea rdx, tdefl_output_buffer_putter
call tdefl_compress_mem_to_output
test eax, eax
jz short loc_81DEA
mov rax, qword ptr [rsp+28h+var_28]
mov [rbx], rax
mov rax, qword ptr [rsp+28h+var_18]
jmp short loc_81DEC
loc_81DEA:
xor eax, eax
loc_81DEC:
add rsp, 20h
pop rbx
retn
|
long long tdefl_compress_mem_to_heap(long long a1, long long a2, _QWORD *a3, unsigned int a4)
{
__int128 v6; // [rsp+0h] [rbp-28h] BYREF
__int128 v7; // [rsp+10h] [rbp-18h]
v7 = 0LL;
v6 = 0LL;
if ( !a3 )
return 0LL;
*a3 = 0LL;
DWORD2(v7) = 1;
if ( !tdefl_compress_mem_to_output(a1, a2, (long long)tdefl_output_buffer_putter, (long long)&v6, a4) )
return 0LL;
*a3 = v6;
return v7;
}
| |||
14,709
|
ImPlotColormapData::RebuildTables()
|
zkingston[P]unknot/build_O1/_deps/implot-src/implot_internal.h
|
void RebuildTables() {
Tables.resize(0);
TableSizes.resize(0);
TableOffsets.resize(0);
for (int i = 0; i < Count; ++i)
_AppendTable(i);
}
|
O1
|
c
|
ImPlotColormapData::RebuildTables():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x34(%rdi), %eax
testl %eax, %eax
jns 0xc98cb
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
xorl %r15d, %r15d
testl %ecx, %ecx
cmovgl %ecx, %r15d
leaq (,%r15,4), %rdi
callq 0x2130dc
movq %rax, %r14
movq 0x38(%rbx), %rsi
testq %rsi, %rsi
je 0xc98c3
movslq 0x30(%rbx), %rdx
shlq $0x2, %rdx
movq %r14, %rdi
callq 0xf810
movq 0x38(%rbx), %rdi
callq 0x21318e
movq %r14, 0x38(%rbx)
movl %r15d, 0x34(%rbx)
movl $0x0, 0x30(%rbx)
movl 0x44(%rbx), %eax
testl %eax, %eax
jns 0xc9927
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
xorl %r15d, %r15d
testl %ecx, %ecx
cmovgl %ecx, %r15d
leaq (,%r15,4), %rdi
callq 0x2130dc
movq %rax, %r14
movq 0x48(%rbx), %rsi
testq %rsi, %rsi
je 0xc991f
movslq 0x40(%rbx), %rdx
shlq $0x2, %rdx
movq %r14, %rdi
callq 0xf810
movq 0x48(%rbx), %rdi
callq 0x21318e
movq %r14, 0x48(%rbx)
movl %r15d, 0x44(%rbx)
movl $0x0, 0x40(%rbx)
movl 0x54(%rbx), %eax
testl %eax, %eax
jns 0xc9983
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
xorl %r15d, %r15d
testl %ecx, %ecx
cmovgl %ecx, %r15d
leaq (,%r15,4), %rdi
callq 0x2130dc
movq %rax, %r14
movq 0x58(%rbx), %rsi
testq %rsi, %rsi
je 0xc997b
movslq 0x50(%rbx), %rdx
shlq $0x2, %rdx
movq %r14, %rdi
callq 0xf810
movq 0x58(%rbx), %rdi
callq 0x21318e
movq %r14, 0x58(%rbx)
movl %r15d, 0x54(%rbx)
movl $0x0, 0x50(%rbx)
cmpl $0x0, 0xa0(%rbx)
jle 0xc99a9
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0xc9384
incl %ebp
cmpl 0xa0(%rbx), %ebp
jl 0xc9995
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
_ZN18ImPlotColormapData13RebuildTablesEv:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov eax, [rdi+34h]
test eax, eax
jns short loc_C98CB
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
add ecx, eax
xor r15d, r15d
test ecx, ecx
cmovg r15d, ecx
lea rdi, ds:0[r15*4]; this
call _ZN5ImGui8MemAllocEm; ImGui::MemAlloc(ulong)
mov r14, rax
mov rsi, [rbx+38h]; unsigned __int64
test rsi, rsi
jz short loc_C98C3
movsxd rdx, dword ptr [rbx+30h]
shl rdx, 2
mov rdi, r14
call _memcpy
mov rdi, [rbx+38h]; this
call _ZN5ImGui7MemFreeEPv; ImGui::MemFree(void *)
loc_C98C3:
mov [rbx+38h], r14
mov [rbx+34h], r15d
loc_C98CB:
mov dword ptr [rbx+30h], 0
mov eax, [rbx+44h]
test eax, eax
jns short loc_C9927
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
add ecx, eax
xor r15d, r15d
test ecx, ecx
cmovg r15d, ecx
lea rdi, ds:0[r15*4]; this
call _ZN5ImGui8MemAllocEm; ImGui::MemAlloc(ulong)
mov r14, rax
mov rsi, [rbx+48h]; unsigned __int64
test rsi, rsi
jz short loc_C991F
movsxd rdx, dword ptr [rbx+40h]
shl rdx, 2
mov rdi, r14
call _memcpy
mov rdi, [rbx+48h]; this
call _ZN5ImGui7MemFreeEPv; ImGui::MemFree(void *)
loc_C991F:
mov [rbx+48h], r14
mov [rbx+44h], r15d
loc_C9927:
mov dword ptr [rbx+40h], 0
mov eax, [rbx+54h]
test eax, eax
jns short loc_C9983
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
add ecx, eax
xor r15d, r15d
test ecx, ecx
cmovg r15d, ecx
lea rdi, ds:0[r15*4]; this
call _ZN5ImGui8MemAllocEm; ImGui::MemAlloc(ulong)
mov r14, rax
mov rsi, [rbx+58h]; void *
test rsi, rsi
jz short loc_C997B
movsxd rdx, dword ptr [rbx+50h]
shl rdx, 2
mov rdi, r14
call _memcpy
mov rdi, [rbx+58h]; this
call _ZN5ImGui7MemFreeEPv; ImGui::MemFree(void *)
loc_C997B:
mov [rbx+58h], r14
mov [rbx+54h], r15d
loc_C9983:
mov dword ptr [rbx+50h], 0
cmp dword ptr [rbx+0A0h], 0
jle short loc_C99A9
xor ebp, ebp
loc_C9995:
mov rdi, rbx; this
mov esi, ebp; int
call _ZN18ImPlotColormapData12_AppendTableEi; ImPlotColormapData::_AppendTable(int)
inc ebp
cmp ebp, [rbx+0A0h]
jl short loc_C9995
loc_C99A9:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long ImPlotColormapData::RebuildTables(ImPlotColormapData *this, void *a2)
{
int v2; // eax
int v3; // ecx
long long v4; // r15
long long v5; // rax
long long v6; // r14
int v7; // eax
int v8; // ecx
long long v9; // r15
long long v10; // rax
long long v11; // r14
long long result; // rax
int v13; // ecx
long long v14; // r15
long long v15; // r14
void *v16; // rsi
int v17; // ebp
v2 = *((_DWORD *)this + 13);
if ( v2 < 0 )
{
v3 = v2 + v2 / 2;
v4 = 0LL;
if ( v3 > 0 )
v4 = (unsigned int)v3;
v5 = ImGui::MemAlloc((ImGui *)(4 * v4), (unsigned long long)a2);
v6 = v5;
a2 = (void *)*((_QWORD *)this + 7);
if ( a2 )
{
memcpy(v5, a2, 4LL * *((int *)this + 12));
ImGui::MemFree(*((ImGui **)this + 7), a2);
}
*((_QWORD *)this + 7) = v6;
*((_DWORD *)this + 13) = v4;
}
*((_DWORD *)this + 12) = 0;
v7 = *((_DWORD *)this + 17);
if ( v7 < 0 )
{
v8 = v7 + v7 / 2;
v9 = 0LL;
if ( v8 > 0 )
v9 = (unsigned int)v8;
v10 = ImGui::MemAlloc((ImGui *)(4 * v9), (unsigned long long)a2);
v11 = v10;
a2 = (void *)*((_QWORD *)this + 9);
if ( a2 )
{
memcpy(v10, a2, 4LL * *((int *)this + 16));
ImGui::MemFree(*((ImGui **)this + 9), a2);
}
*((_QWORD *)this + 9) = v11;
*((_DWORD *)this + 17) = v9;
}
*((_DWORD *)this + 16) = 0;
result = *((unsigned int *)this + 21);
if ( (int)result < 0 )
{
v13 = result + (int)result / 2;
v14 = 0LL;
if ( v13 > 0 )
v14 = (unsigned int)v13;
result = ImGui::MemAlloc((ImGui *)(4 * v14), (unsigned long long)a2);
v15 = result;
v16 = (void *)*((_QWORD *)this + 11);
if ( v16 )
{
memcpy(result, v16, 4LL * *((int *)this + 20));
result = ImGui::MemFree(*((ImGui **)this + 11), v16);
}
*((_QWORD *)this + 11) = v15;
*((_DWORD *)this + 21) = v14;
}
*((_DWORD *)this + 20) = 0;
if ( *((int *)this + 40) > 0 )
{
v17 = 0;
do
result = ImPlotColormapData::_AppendTable(this, v17++);
while ( v17 < *((_DWORD *)this + 40) );
}
return result;
}
|
RebuildTables:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x34]
TEST EAX,EAX
JNS 0x001c98cb
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
ADD ECX,EAX
XOR R15D,R15D
TEST ECX,ECX
CMOVG R15D,ECX
LEA RDI,[R15*0x4]
CALL 0x003130dc
MOV R14,RAX
MOV RSI,qword ptr [RBX + 0x38]
TEST RSI,RSI
JZ 0x001c98c3
MOVSXD RDX,dword ptr [RBX + 0x30]
SHL RDX,0x2
MOV RDI,R14
CALL 0x0010f810
MOV RDI,qword ptr [RBX + 0x38]
CALL 0x0031318e
LAB_001c98c3:
MOV qword ptr [RBX + 0x38],R14
MOV dword ptr [RBX + 0x34],R15D
LAB_001c98cb:
MOV dword ptr [RBX + 0x30],0x0
MOV EAX,dword ptr [RBX + 0x44]
TEST EAX,EAX
JNS 0x001c9927
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
ADD ECX,EAX
XOR R15D,R15D
TEST ECX,ECX
CMOVG R15D,ECX
LEA RDI,[R15*0x4]
CALL 0x003130dc
MOV R14,RAX
MOV RSI,qword ptr [RBX + 0x48]
TEST RSI,RSI
JZ 0x001c991f
MOVSXD RDX,dword ptr [RBX + 0x40]
SHL RDX,0x2
MOV RDI,R14
CALL 0x0010f810
MOV RDI,qword ptr [RBX + 0x48]
CALL 0x0031318e
LAB_001c991f:
MOV qword ptr [RBX + 0x48],R14
MOV dword ptr [RBX + 0x44],R15D
LAB_001c9927:
MOV dword ptr [RBX + 0x40],0x0
MOV EAX,dword ptr [RBX + 0x54]
TEST EAX,EAX
JNS 0x001c9983
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
ADD ECX,EAX
XOR R15D,R15D
TEST ECX,ECX
CMOVG R15D,ECX
LEA RDI,[R15*0x4]
CALL 0x003130dc
MOV R14,RAX
MOV RSI,qword ptr [RBX + 0x58]
TEST RSI,RSI
JZ 0x001c997b
MOVSXD RDX,dword ptr [RBX + 0x50]
SHL RDX,0x2
MOV RDI,R14
CALL 0x0010f810
MOV RDI,qword ptr [RBX + 0x58]
CALL 0x0031318e
LAB_001c997b:
MOV qword ptr [RBX + 0x58],R14
MOV dword ptr [RBX + 0x54],R15D
LAB_001c9983:
MOV dword ptr [RBX + 0x50],0x0
CMP dword ptr [RBX + 0xa0],0x0
JLE 0x001c99a9
XOR EBP,EBP
LAB_001c9995:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x001c9384
INC EBP
CMP EBP,dword ptr [RBX + 0xa0]
JL 0x001c9995
LAB_001c99a9:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* ImPlotColormapData::RebuildTables() */
void __thiscall ImPlotColormapData::RebuildTables(ImPlotColormapData *this)
{
void *pvVar1;
uint uVar2;
int iVar3;
ulong uVar4;
iVar3 = *(int *)(this + 0x34);
if (iVar3 < 0) {
uVar2 = iVar3 / 2 + iVar3;
uVar4 = 0;
if (0 < (int)uVar2) {
uVar4 = (ulong)uVar2;
}
pvVar1 = (void *)ImGui::MemAlloc(uVar4 * 4);
if (*(void **)(this + 0x38) != (void *)0x0) {
memcpy(pvVar1,*(void **)(this + 0x38),(long)*(int *)(this + 0x30) << 2);
ImGui::MemFree(*(void **)(this + 0x38));
}
*(void **)(this + 0x38) = pvVar1;
*(int *)(this + 0x34) = (int)uVar4;
}
*(int4 *)(this + 0x30) = 0;
iVar3 = *(int *)(this + 0x44);
if (iVar3 < 0) {
uVar2 = iVar3 / 2 + iVar3;
uVar4 = 0;
if (0 < (int)uVar2) {
uVar4 = (ulong)uVar2;
}
pvVar1 = (void *)ImGui::MemAlloc(uVar4 * 4);
if (*(void **)(this + 0x48) != (void *)0x0) {
memcpy(pvVar1,*(void **)(this + 0x48),(long)*(int *)(this + 0x40) << 2);
ImGui::MemFree(*(void **)(this + 0x48));
}
*(void **)(this + 0x48) = pvVar1;
*(int *)(this + 0x44) = (int)uVar4;
}
*(int4 *)(this + 0x40) = 0;
iVar3 = *(int *)(this + 0x54);
if (iVar3 < 0) {
uVar2 = iVar3 / 2 + iVar3;
uVar4 = 0;
if (0 < (int)uVar2) {
uVar4 = (ulong)uVar2;
}
pvVar1 = (void *)ImGui::MemAlloc(uVar4 * 4);
if (*(void **)(this + 0x58) != (void *)0x0) {
memcpy(pvVar1,*(void **)(this + 0x58),(long)*(int *)(this + 0x50) << 2);
ImGui::MemFree(*(void **)(this + 0x58));
}
*(void **)(this + 0x58) = pvVar1;
*(int *)(this + 0x54) = (int)uVar4;
}
*(int4 *)(this + 0x50) = 0;
if (0 < *(int *)(this + 0xa0)) {
iVar3 = 0;
do {
_AppendTable(this,iVar3);
iVar3 = iVar3 + 1;
} while (iVar3 < *(int *)(this + 0xa0));
}
return;
}
|
|
14,710
|
sdflib::OctreeSdf::getDistance(glm::tvec3<float, (glm::precision)0>) const
|
aimrt_mujoco_sim/_deps/sdflib-src/src/sdf/OctreeSdf.cpp
|
float OctreeSdf::getDistance(glm::vec3 sample) const
{
glm::vec3 fracPart = (sample - mBox.min) / mStartGridCellSize;
glm::ivec3 startArrayPos = glm::floor(fracPart);
fracPart = glm::fract(fracPart);
if(startArrayPos.x < 0 || startArrayPos.x >= mStartGridSize ||
startArrayPos.y < 0 || startArrayPos.y >= mStartGridSize ||
startArrayPos.z < 0 || startArrayPos.z >= mStartGridSize)
{
return mBox.getDistance(sample) + mMinBorderValue;
}
const OctreeNode* currentNode = &mOctreeData[startArrayPos.z * mStartGridXY + startArrayPos.y * mStartGridSize + startArrayPos.x];
while(!currentNode->isLeaf())
{
const uint32_t childIdx = (roundFloat(fracPart.z) << 2) +
(roundFloat(fracPart.y) << 1) +
roundFloat(fracPart.x);
currentNode = &mOctreeData[currentNode->getChildrenIndex() + childIdx];
fracPart = glm::fract(2.0f * fracPart);
}
auto& values = *reinterpret_cast<const std::array<float, InterpolationMethod::NUM_COEFFICIENTS>*>(&mOctreeData[currentNode->getChildrenIndex()]);
return InterpolationMethod::interpolateValue(values, fracPart);
}
|
O0
|
cpp
|
sdflib::OctreeSdf::getDistance(glm::tvec3<float, (glm::precision)0>) const:
subq $0x168, %rsp # imm = 0x168
movlpd %xmm0, 0x148(%rsp)
movss %xmm1, 0x150(%rsp)
movl 0x150(%rsp), %eax
movl %eax, 0x160(%rsp)
movq 0x148(%rsp), %rax
movq %rax, 0x158(%rsp)
movq %rdi, 0x140(%rsp)
movq 0x140(%rsp), %rsi
movq %rsi, 0x18(%rsp)
addq $0x8, %rsi
leaq 0x158(%rsp), %rdi
callq 0x29380
movq 0x18(%rsp), %rax
movss %xmm1, 0x118(%rsp)
movlpd %xmm0, 0x110(%rsp)
movl 0x118(%rsp), %ecx
movl %ecx, 0x128(%rsp)
movq 0x110(%rsp), %rcx
movq %rcx, 0x120(%rsp)
movss 0x30(%rax), %xmm0
leaq 0x120(%rsp), %rdi
callq 0x3b380
movss %xmm1, 0x108(%rsp)
movlpd %xmm0, 0x100(%rsp)
movl 0x108(%rsp), %eax
movl %eax, 0x138(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x130(%rsp)
leaq 0x130(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x3b3f0
movss %xmm1, 0xe0(%rsp)
movlpd %xmm0, 0xd8(%rsp)
movl 0xe0(%rsp), %eax
movl %eax, 0xf0(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0xe8(%rsp)
leaq 0xf4(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x3b450
movq 0x20(%rsp), %rdi
callq 0x3b490
movss %xmm1, 0xc0(%rsp)
movlpd %xmm0, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0xcc(%rsp)
movl 0xc0(%rsp), %eax
movl %eax, 0xd4(%rsp)
movq 0xcc(%rsp), %rax
movq %rax, 0x130(%rsp)
movl 0xd4(%rsp), %eax
movl %eax, 0x138(%rsp)
cmpl $0x0, 0xf4(%rsp)
jl 0x3b124
movq 0x18(%rsp), %rcx
movl 0xf4(%rsp), %eax
cmpl 0x28(%rcx), %eax
jge 0x3b124
cmpl $0x0, 0xf8(%rsp)
jl 0x3b124
movq 0x18(%rsp), %rcx
movl 0xf8(%rsp), %eax
cmpl 0x28(%rcx), %eax
jge 0x3b124
cmpl $0x0, 0xfc(%rsp)
jl 0x3b124
movq 0x18(%rsp), %rcx
movl 0xfc(%rsp), %eax
cmpl 0x28(%rcx), %eax
jl 0x3b198
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
movl 0x160(%rsp), %eax
movl %eax, 0xb0(%rsp)
movq 0x158(%rsp), %rax
movq %rax, 0xa8(%rsp)
movl 0xb0(%rsp), %eax
movl %eax, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
movsd 0x98(%rsp), %xmm0
movss 0xa0(%rsp), %xmm1
callq 0x3b4f0
movq 0x18(%rsp), %rax
addss 0x24(%rax), %xmm0
movss %xmm0, 0x164(%rsp)
jmp 0x3b36c
movq 0x18(%rsp), %rdx
movq %rdx, %rdi
addq $0x38, %rdi
movl 0xfc(%rsp), %eax
imull 0x2c(%rdx), %eax
movl 0xf8(%rsp), %ecx
imull 0x28(%rdx), %ecx
addl %ecx, %eax
addl 0xf4(%rsp), %eax
movslq %eax, %rsi
callq 0x3b730
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rdi
callq 0x3b750
xorb $-0x1, %al
testb $0x1, %al
jne 0x3b1eb
jmp 0x3b2f7
movss 0x138(%rsp), %xmm0
callq 0x3b770
movl %eax, 0x8(%rsp)
movss 0x134(%rsp), %xmm0
callq 0x3b770
movl %eax, %edx
movl 0x8(%rsp), %eax
addl %edx, %edx
movl %eax, %ecx
movl %edx, %eax
leal (%rax,%rcx,4), %eax
movl %eax, 0xc(%rsp)
movss 0x130(%rsp), %xmm0
callq 0x3b770
movl 0xc(%rsp), %ecx
movl %eax, %edx
movq 0x18(%rsp), %rax
addl %edx, %ecx
movl %ecx, 0x8c(%rsp)
addq $0x38, %rax
movq %rax, 0x10(%rsp)
movq 0x90(%rsp), %rdi
callq 0x3b7a0
movq 0x10(%rsp), %rdi
movl 0x8c(%rsp), %ecx
addl %ecx, %eax
movl %eax, %esi
callq 0x3b730
movq %rax, 0x90(%rsp)
movss 0xd6f3d(%rip), %xmm0 # 0x1121b8
leaq 0x130(%rsp), %rdi
callq 0x29ae0
movss %xmm1, 0x68(%rsp)
movlpd %xmm0, 0x60(%rsp)
movl 0x68(%rsp), %eax
movl %eax, 0x78(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x3b490
movss %xmm1, 0x58(%rsp)
movlpd %xmm0, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x80(%rsp)
movl 0x58(%rsp), %eax
movl %eax, 0x88(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x130(%rsp)
movl 0x88(%rsp), %eax
movl %eax, 0x138(%rsp)
jmp 0x3b1d3
movq 0x18(%rsp), %rax
addq $0x38, %rax
movq %rax, (%rsp)
movq 0x90(%rsp), %rdi
callq 0x3b7a0
movq (%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0x3b730
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movl 0x138(%rsp), %eax
movl %eax, 0x40(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x40(%rsp), %eax
movl %eax, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
movss 0x30(%rsp), %xmm1
callq 0x3b7c0
movss %xmm0, 0x164(%rsp)
movss 0x164(%rsp), %xmm0
addq $0x168, %rsp # imm = 0x168
retq
nopl (%rax)
|
_ZNK6sdflib9OctreeSdf11getDistanceEN3glm5tvec3IfLNS1_9precisionE0EEE:
sub rsp, 168h
movlpd [rsp+168h+var_20], xmm0
movss [rsp+168h+var_18], xmm1
mov eax, [rsp+168h+var_18]
mov [rsp+168h+var_8], eax
mov rax, [rsp+168h+var_20]
mov [rsp+168h+var_10], rax
mov [rsp+168h+var_28], rdi
mov rsi, [rsp+168h+var_28]
mov [rsp+168h+var_150], rsi
add rsi, 8
lea rdi, [rsp+168h+var_10]
call _ZN3glmmiIfLNS_9precisionE0EEENS_5tvec3IT_XT0_EEERKS4_S6_; glm::operator-<float,(glm::precision)0>(glm::tvec3<float,(glm::precision)0> const&,glm::tvec3<float,(glm::precision)0> const&)
mov rax, [rsp+168h+var_150]
movss [rsp+168h+var_50], xmm1
movlpd [rsp+168h+var_58], xmm0
mov ecx, [rsp+168h+var_50]
mov [rsp+168h+var_40], ecx
mov rcx, [rsp+168h+var_58]
mov [rsp+168h+var_48], rcx
movss xmm0, dword ptr [rax+30h]
lea rdi, [rsp+168h+var_48]
call _ZN3glmdvIfLNS_9precisionE0EEENS_5tvec3IT_XT0_EEERKS4_S3_; glm::operator/<float,(glm::precision)0>(glm::tvec3<float,(glm::precision)0> const&,float)
movss [rsp+168h+var_60], xmm1
movlpd [rsp+168h+var_68], xmm0
mov eax, [rsp+168h+var_60]
mov [rsp+168h+var_30], eax
mov rax, [rsp+168h+var_68]
mov qword ptr [rsp+168h+var_38], rax
lea rdi, [rsp+168h+var_38]
mov [rsp+168h+var_148], rdi
call _ZN3glm5floorIfLNS_9precisionE0ENS_5tvec3EEET1_IT_XT0_EERKS5_; glm::floor<float,(glm::precision)0,glm::tvec3>(glm::tvec3<float,(glm::precision)0> const&)
movss [rsp+168h+var_88], xmm1
movlpd [rsp+168h+var_90], xmm0
mov eax, [rsp+168h+var_88]
mov [rsp+168h+var_78], eax
mov rax, [rsp+168h+var_90]
mov [rsp+168h+var_80], rax
lea rdi, [rsp+168h+var_74]
lea rsi, [rsp+168h+var_80]
call _ZN3glm5tvec3IiLNS_9precisionE0EEC2IfLS1_0EEERKNS0_IT_XT0_EEE; glm::tvec3<int,(glm::precision)0>::tvec3<float,(glm::precision)0>(glm::tvec3<float,(glm::precision)0> const&)
mov rdi, [rsp+168h+var_148]
call _ZN3glm5fractIfLNS_9precisionE0ENS_5tvec3EEET1_IT_XT0_EERKS5_; glm::fract<float,(glm::precision)0,glm::tvec3>(glm::tvec3<float,(glm::precision)0> const&)
movss [rsp+168h+var_A8], xmm1
movlpd [rsp+168h+var_B0], xmm0
mov rax, [rsp+168h+var_B0]
mov [rsp+168h+var_9C], rax
mov eax, [rsp+168h+var_A8]
mov [rsp+168h+var_94], eax
mov rax, [rsp+168h+var_9C]
mov qword ptr [rsp+168h+var_38], rax
mov eax, [rsp+168h+var_94]
mov [rsp+168h+var_30], eax
cmp [rsp+168h+var_74], 0
jl short loc_3B124
mov rcx, [rsp+168h+var_150]
mov eax, [rsp+168h+var_74]
cmp eax, [rcx+28h]
jge short loc_3B124
cmp [rsp+168h+var_70], 0
jl short loc_3B124
mov rcx, [rsp+168h+var_150]
mov eax, [rsp+168h+var_70]
cmp eax, [rcx+28h]
jge short loc_3B124
cmp [rsp+168h+var_6C], 0
jl short loc_3B124
mov rcx, [rsp+168h+var_150]
mov eax, [rsp+168h+var_6C]
cmp eax, [rcx+28h]
jl short loc_3B198
loc_3B124:
mov rdi, [rsp+168h+var_150]
add rdi, 8
mov eax, [rsp+168h+var_8]
mov [rsp+168h+var_B8], eax
mov rax, [rsp+168h+var_10]
mov [rsp+168h+var_C0], rax
mov eax, [rsp+168h+var_B8]
mov [rsp+168h+var_C8], eax
mov rax, [rsp+168h+var_C0]
mov [rsp+168h+var_D0], rax
movsd xmm0, [rsp+168h+var_D0]
movss xmm1, [rsp+168h+var_C8]
call _ZNK6sdflib11BoundingBox11getDistanceEN3glm5tvec3IfLNS1_9precisionE0EEE; sdflib::BoundingBox::getDistance(glm::tvec3<float,(glm::precision)0>)
mov rax, [rsp+168h+var_150]
addss xmm0, dword ptr [rax+24h]
movss [rsp+168h+var_4], xmm0
jmp loc_3B36C
loc_3B198:
mov rdx, [rsp+168h+var_150]
mov rdi, rdx
add rdi, 38h ; '8'
mov eax, [rsp+168h+var_6C]
imul eax, [rdx+2Ch]
mov ecx, [rsp+168h+var_70]
imul ecx, [rdx+28h]
add eax, ecx
add eax, [rsp+168h+var_74]
movsxd rsi, eax
call _ZNKSt6vectorIN6sdflib9OctreeSdf10OctreeNodeESaIS2_EEixEm; std::vector<sdflib::OctreeSdf::OctreeNode>::operator[](ulong)
mov [rsp+168h+var_D8], rax
loc_3B1D3:
mov rdi, [rsp+168h+var_D8]; this
call _ZNK6sdflib9OctreeSdf10OctreeNode6isLeafEv; sdflib::OctreeSdf::OctreeNode::isLeaf(void)
xor al, 0FFh
test al, 1
jnz short loc_3B1EB
jmp loc_3B2F7
loc_3B1EB:
movss xmm0, [rsp+168h+var_30]; float
call _ZN6sdflib10roundFloatEf; sdflib::roundFloat(float)
mov [rsp+168h+var_160], eax
movss xmm0, [rsp+168h+var_38+4]; float
call _ZN6sdflib10roundFloatEf; sdflib::roundFloat(float)
mov edx, eax
mov eax, [rsp+168h+var_160]
add edx, edx
mov ecx, eax
mov eax, edx
lea eax, [rax+rcx*4]
mov [rsp+168h+var_15C], eax
movss xmm0, [rsp+168h+var_38]; float
call _ZN6sdflib10roundFloatEf; sdflib::roundFloat(float)
mov ecx, [rsp+168h+var_15C]
mov edx, eax
mov rax, [rsp+168h+var_150]
add ecx, edx
mov [rsp+168h+var_DC], ecx
add rax, 38h ; '8'
mov [rsp+168h+var_158], rax
mov rdi, [rsp+168h+var_D8]; this
call _ZNK6sdflib9OctreeSdf10OctreeNode16getChildrenIndexEv; sdflib::OctreeSdf::OctreeNode::getChildrenIndex(void)
mov rdi, [rsp+168h+var_158]
mov ecx, [rsp+168h+var_DC]
add eax, ecx
mov esi, eax
call _ZNKSt6vectorIN6sdflib9OctreeSdf10OctreeNodeESaIS2_EEixEm; std::vector<sdflib::OctreeSdf::OctreeNode>::operator[](ulong)
mov [rsp+168h+var_D8], rax
movss xmm0, cs:dword_1121B8
lea rdi, [rsp+168h+var_38]
call _ZN3glmmlIfLNS_9precisionE0EEENS_5tvec3IT_XT0_EEES3_RKS4_; glm::operator*<float,(glm::precision)0>(float,glm::tvec3<float,(glm::precision)0> const&)
movss [rsp+168h+var_100], xmm1
movlpd [rsp+168h+var_108], xmm0
mov eax, [rsp+168h+var_100]
mov [rsp+168h+var_F0], eax
mov rax, [rsp+168h+var_108]
mov [rsp+168h+var_F8], rax
lea rdi, [rsp+168h+var_F8]
call _ZN3glm5fractIfLNS_9precisionE0ENS_5tvec3EEET1_IT_XT0_EERKS5_; glm::fract<float,(glm::precision)0,glm::tvec3>(glm::tvec3<float,(glm::precision)0> const&)
movss [rsp+168h+var_110], xmm1
movlpd [rsp+168h+var_118], xmm0
mov rax, [rsp+168h+var_118]
mov [rsp+168h+var_E8], rax
mov eax, [rsp+168h+var_110]
mov [rsp+168h+var_E0], eax
mov rax, [rsp+168h+var_E8]
mov qword ptr [rsp+168h+var_38], rax
mov eax, [rsp+168h+var_E0]
mov [rsp+168h+var_30], eax
jmp loc_3B1D3
loc_3B2F7:
mov rax, [rsp+168h+var_150]
add rax, 38h ; '8'
mov [rsp+168h+var_168], rax
mov rdi, [rsp+168h+var_D8]; this
call _ZNK6sdflib9OctreeSdf10OctreeNode16getChildrenIndexEv; sdflib::OctreeSdf::OctreeNode::getChildrenIndex(void)
mov rdi, [rsp+168h+var_168]
mov eax, eax
mov esi, eax
call _ZNKSt6vectorIN6sdflib9OctreeSdf10OctreeNodeESaIS2_EEixEm; std::vector<sdflib::OctreeSdf::OctreeNode>::operator[](ulong)
mov [rsp+168h+var_120], rax
mov rdi, [rsp+168h+var_120]
mov eax, [rsp+168h+var_30]
mov [rsp+168h+var_128], eax
mov rax, qword ptr [rsp+168h+var_38]
mov [rsp+168h+var_130], rax
mov eax, [rsp+168h+var_128]
mov [rsp+168h+var_138], eax
mov rax, [rsp+168h+var_130]
mov [rsp+168h+var_140], rax
movsd xmm0, [rsp+168h+var_140]
movss xmm1, [rsp+168h+var_138]
call _ZN6sdflib21TriCubicInterpolation16interpolateValueERKSt5arrayIfLm64EEN3glm5tvec3IfLNS5_9precisionE0EEE; sdflib::TriCubicInterpolation::interpolateValue(std::array<float,64ul> const&,glm::tvec3<float,(glm::precision)0>)
movss [rsp+168h+var_4], xmm0
loc_3B36C:
movss xmm0, [rsp+168h+var_4]
add rsp, 168h
retn
|
float sdflib::OctreeSdf::getDistance(long long a1, double a2, float a3)
{
double v3; // xmm0_8
sdflib::OctreeSdf::OctreeNode *v4; // rdi
int ChildrenIndex; // eax
unsigned int v6; // eax
int v8; // [rsp+8h] [rbp-160h]
int v9; // [rsp+Ch] [rbp-15Ch]
long long v11; // [rsp+48h] [rbp-120h]
long long v12; // [rsp+70h] [rbp-F8h] BYREF
float v13; // [rsp+78h] [rbp-F0h]
double v14; // [rsp+80h] [rbp-E8h]
float v15; // [rsp+88h] [rbp-E0h]
int v16; // [rsp+8Ch] [rbp-DCh]
sdflib::OctreeSdf::OctreeNode *v17; // [rsp+90h] [rbp-D8h]
double v18; // [rsp+98h] [rbp-D0h]
float v19; // [rsp+A0h] [rbp-C8h]
double v20; // [rsp+A8h] [rbp-C0h]
float v21; // [rsp+B0h] [rbp-B8h]
double v22; // [rsp+B8h] [rbp-B0h]
float v23; // [rsp+C0h] [rbp-A8h]
double v24; // [rsp+CCh] [rbp-9Ch]
float v25; // [rsp+D4h] [rbp-94h]
double v26; // [rsp+D8h] [rbp-90h]
float v27; // [rsp+E0h] [rbp-88h]
double v28; // [rsp+E8h] [rbp-80h] BYREF
float v29; // [rsp+F0h] [rbp-78h]
int v30; // [rsp+F4h] [rbp-74h] BYREF
int v31; // [rsp+F8h] [rbp-70h]
int v32; // [rsp+FCh] [rbp-6Ch]
double v33; // [rsp+100h] [rbp-68h]
float v34; // [rsp+108h] [rbp-60h]
double v35; // [rsp+110h] [rbp-58h]
float v36; // [rsp+118h] [rbp-50h]
double v37; // [rsp+120h] [rbp-48h] BYREF
float v38; // [rsp+128h] [rbp-40h]
double v39; // [rsp+130h] [rbp-38h] BYREF
float v40; // [rsp+138h] [rbp-30h]
long long v41; // [rsp+140h] [rbp-28h]
double v42; // [rsp+148h] [rbp-20h]
float v43; // [rsp+150h] [rbp-18h]
double v44; // [rsp+158h] [rbp-10h] BYREF
float v45; // [rsp+160h] [rbp-8h]
v42 = a2;
v43 = a3;
v45 = a3;
v44 = a2;
v41 = a1;
glm::operator-<float,(glm::precision)0>((long long)&v44, a1 + 8);
v36 = a3;
v35 = a2;
v38 = a3;
v37 = a2;
v3 = glm::operator/<float,(glm::precision)0>(&v37, *(float *)(a1 + 48));
v34 = a3;
v33 = v3;
v40 = a3;
v39 = v3;
v27 = a3;
v26 = glm::floor<float,(glm::precision)0,glm::tvec3>(&v39);
v29 = a3;
v28 = v26;
glm::tvec3<int,(glm::precision)0>::tvec3<float,(glm::precision)0>(&v30, &v28);
v23 = a3;
v22 = glm::fract<float,(glm::precision)0,glm::tvec3>(&v39);
v24 = v22;
v25 = a3;
v39 = v22;
v40 = a3;
if ( v30 >= 0
&& v30 < *(_DWORD *)(a1 + 40)
&& v31 >= 0
&& v31 < *(_DWORD *)(a1 + 40)
&& v32 >= 0
&& v32 < *(_DWORD *)(a1 + 40) )
{
v17 = (sdflib::OctreeSdf::OctreeNode *)std::vector<sdflib::OctreeSdf::OctreeNode>::operator[](
a1 + 56,
v30 + *(_DWORD *)(a1 + 40) * v31 + *(_DWORD *)(a1 + 44) * v32);
while ( 1 )
{
v4 = v17;
if ( (sdflib::OctreeSdf::OctreeNode::isLeaf(v17) & 1) != 0 )
break;
v8 = sdflib::roundFloat(v4, v40);
v9 = 2 * sdflib::roundFloat(v4, *((float *)&v39 + 1)) + 4 * v8;
v16 = sdflib::roundFloat(v4, *(float *)&v39) + v9;
ChildrenIndex = sdflib::OctreeSdf::OctreeNode::getChildrenIndex(v17);
v17 = (sdflib::OctreeSdf::OctreeNode *)std::vector<sdflib::OctreeSdf::OctreeNode>::operator[](
a1 + 56,
(unsigned int)(v16 + ChildrenIndex));
glm::operator*<float,(glm::precision)0>((long long)&v39, (__m128)0x40000000u);
v13 = a3;
v12 = 0x40000000LL;
v14 = glm::fract<float,(glm::precision)0,glm::tvec3>(&v12);
v15 = a3;
v39 = v14;
v40 = a3;
}
v6 = sdflib::OctreeSdf::OctreeNode::getChildrenIndex(v17);
v11 = std::vector<sdflib::OctreeSdf::OctreeNode>::operator[](a1 + 56, v6);
return sdflib::TriCubicInterpolation::interpolateValue(v11, v39, v40);
}
else
{
v21 = v45;
v20 = v44;
v19 = v45;
v18 = v44;
return sdflib::BoundingBox::getDistance(a1 + 8, v44, v45) + *(float *)(a1 + 36);
}
}
|
getDistance:
SUB RSP,0x168
MOVLPD qword ptr [RSP + 0x148],XMM0
MOVSS dword ptr [RSP + 0x150],XMM1
MOV EAX,dword ptr [RSP + 0x150]
MOV dword ptr [RSP + 0x160],EAX
MOV RAX,qword ptr [RSP + 0x148]
MOV qword ptr [RSP + 0x158],RAX
MOV qword ptr [RSP + 0x140],RDI
MOV RSI,qword ptr [RSP + 0x140]
MOV qword ptr [RSP + 0x18],RSI
ADD RSI,0x8
LEA RDI,[RSP + 0x158]
CALL 0x00129380
MOV RAX,qword ptr [RSP + 0x18]
MOVSS dword ptr [RSP + 0x118],XMM1
MOVLPD qword ptr [RSP + 0x110],XMM0
MOV ECX,dword ptr [RSP + 0x118]
MOV dword ptr [RSP + 0x128],ECX
MOV RCX,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0x120],RCX
MOVSS XMM0,dword ptr [RAX + 0x30]
LEA RDI,[RSP + 0x120]
CALL 0x0013b380
MOVSS dword ptr [RSP + 0x108],XMM1
MOVLPD qword ptr [RSP + 0x100],XMM0
MOV EAX,dword ptr [RSP + 0x108]
MOV dword ptr [RSP + 0x138],EAX
MOV RAX,qword ptr [RSP + 0x100]
MOV qword ptr [RSP + 0x130],RAX
LEA RDI,[RSP + 0x130]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x0013b3f0
MOVSS dword ptr [RSP + 0xe0],XMM1
MOVLPD qword ptr [RSP + 0xd8],XMM0
MOV EAX,dword ptr [RSP + 0xe0]
MOV dword ptr [RSP + 0xf0],EAX
MOV RAX,qword ptr [RSP + 0xd8]
MOV qword ptr [RSP + 0xe8],RAX
LEA RDI,[RSP + 0xf4]
LEA RSI,[RSP + 0xe8]
CALL 0x0013b450
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x0013b490
MOVSS dword ptr [RSP + 0xc0],XMM1
MOVLPD qword ptr [RSP + 0xb8],XMM0
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0xcc],RAX
MOV EAX,dword ptr [RSP + 0xc0]
MOV dword ptr [RSP + 0xd4],EAX
MOV RAX,qword ptr [RSP + 0xcc]
MOV qword ptr [RSP + 0x130],RAX
MOV EAX,dword ptr [RSP + 0xd4]
MOV dword ptr [RSP + 0x138],EAX
CMP dword ptr [RSP + 0xf4],0x0
JL 0x0013b124
MOV RCX,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RSP + 0xf4]
CMP EAX,dword ptr [RCX + 0x28]
JGE 0x0013b124
CMP dword ptr [RSP + 0xf8],0x0
JL 0x0013b124
MOV RCX,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RSP + 0xf8]
CMP EAX,dword ptr [RCX + 0x28]
JGE 0x0013b124
CMP dword ptr [RSP + 0xfc],0x0
JL 0x0013b124
MOV RCX,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RSP + 0xfc]
CMP EAX,dword ptr [RCX + 0x28]
JL 0x0013b198
LAB_0013b124:
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x8
MOV EAX,dword ptr [RSP + 0x160]
MOV dword ptr [RSP + 0xb0],EAX
MOV RAX,qword ptr [RSP + 0x158]
MOV qword ptr [RSP + 0xa8],RAX
MOV EAX,dword ptr [RSP + 0xb0]
MOV dword ptr [RSP + 0xa0],EAX
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x98],RAX
MOVSD XMM0,qword ptr [RSP + 0x98]
MOVSS XMM1,dword ptr [RSP + 0xa0]
CALL 0x0013b4f0
MOV RAX,qword ptr [RSP + 0x18]
ADDSS XMM0,dword ptr [RAX + 0x24]
MOVSS dword ptr [RSP + 0x164],XMM0
JMP 0x0013b36c
LAB_0013b198:
MOV RDX,qword ptr [RSP + 0x18]
MOV RDI,RDX
ADD RDI,0x38
MOV EAX,dword ptr [RSP + 0xfc]
IMUL EAX,dword ptr [RDX + 0x2c]
MOV ECX,dword ptr [RSP + 0xf8]
IMUL ECX,dword ptr [RDX + 0x28]
ADD EAX,ECX
ADD EAX,dword ptr [RSP + 0xf4]
MOVSXD RSI,EAX
CALL 0x0013b730
MOV qword ptr [RSP + 0x90],RAX
LAB_0013b1d3:
MOV RDI,qword ptr [RSP + 0x90]
CALL 0x0013b750
XOR AL,0xff
TEST AL,0x1
JNZ 0x0013b1eb
JMP 0x0013b2f7
LAB_0013b1eb:
MOVSS XMM0,dword ptr [RSP + 0x138]
CALL 0x0013b770
MOV dword ptr [RSP + 0x8],EAX
MOVSS XMM0,dword ptr [RSP + 0x134]
CALL 0x0013b770
MOV EDX,EAX
MOV EAX,dword ptr [RSP + 0x8]
ADD EDX,EDX
MOV ECX,EAX
MOV EAX,EDX
LEA EAX,[RAX + RCX*0x4]
MOV dword ptr [RSP + 0xc],EAX
MOVSS XMM0,dword ptr [RSP + 0x130]
CALL 0x0013b770
MOV ECX,dword ptr [RSP + 0xc]
MOV EDX,EAX
MOV RAX,qword ptr [RSP + 0x18]
ADD ECX,EDX
MOV dword ptr [RSP + 0x8c],ECX
ADD RAX,0x38
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x90]
CALL 0x0013b7a0
MOV RDI,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x8c]
ADD EAX,ECX
MOV ESI,EAX
CALL 0x0013b730
MOV qword ptr [RSP + 0x90],RAX
MOVSS XMM0,dword ptr [0x002121b8]
LEA RDI,[RSP + 0x130]
CALL 0x00129ae0
MOVSS dword ptr [RSP + 0x68],XMM1
MOVLPD qword ptr [RSP + 0x60],XMM0
MOV EAX,dword ptr [RSP + 0x68]
MOV dword ptr [RSP + 0x78],EAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x70],RAX
LEA RDI,[RSP + 0x70]
CALL 0x0013b490
MOVSS dword ptr [RSP + 0x58],XMM1
MOVLPD qword ptr [RSP + 0x50],XMM0
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x80],RAX
MOV EAX,dword ptr [RSP + 0x58]
MOV dword ptr [RSP + 0x88],EAX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x130],RAX
MOV EAX,dword ptr [RSP + 0x88]
MOV dword ptr [RSP + 0x138],EAX
JMP 0x0013b1d3
LAB_0013b2f7:
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x38
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x90]
CALL 0x0013b7a0
MOV RDI,qword ptr [RSP]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0013b730
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x48]
MOV EAX,dword ptr [RSP + 0x138]
MOV dword ptr [RSP + 0x40],EAX
MOV RAX,qword ptr [RSP + 0x130]
MOV qword ptr [RSP + 0x38],RAX
MOV EAX,dword ptr [RSP + 0x40]
MOV dword ptr [RSP + 0x30],EAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
MOVSD XMM0,qword ptr [RSP + 0x28]
MOVSS XMM1,dword ptr [RSP + 0x30]
CALL 0x0013b7c0
MOVSS dword ptr [RSP + 0x164],XMM0
LAB_0013b36c:
MOVSS XMM0,dword ptr [RSP + 0x164]
ADD RSP,0x168
RET
|
/* sdflib::OctreeSdf::getDistance(glm::tvec3<float, (glm::precision)0>) const */
float sdflib::OctreeSdf::getDistance(int8 param_1,float param_2,long param_3)
{
byte bVar1;
int iVar2;
int iVar3;
uint uVar4;
int8 uVar5;
int8 local_f8;
float local_f0;
TriCubicInterpolation *local_e8;
float local_e0;
int local_dc;
OctreeNode *local_d8;
int8 local_d0;
float local_c8;
int8 local_c0;
float local_b8;
TriCubicInterpolation *local_b0;
float local_a8;
TriCubicInterpolation *local_9c;
float local_94;
int8 local_90;
float local_88;
int8 local_80;
float local_78;
int local_74;
int local_70;
int local_6c;
int8 local_68;
float local_60;
int8 local_58;
float local_50;
int8 local_48;
float local_40;
int8 local_38;
float local_30;
long local_28;
int8 local_20;
float local_18;
int8 local_10;
float local_8;
float local_4;
local_28 = param_3;
local_20 = param_1;
local_18 = param_2;
local_10 = param_1;
local_8 = param_2;
local_58 = glm::operator-((tvec3 *)&local_10,(tvec3 *)(param_3 + 8));
local_50 = param_2;
local_48 = local_58;
local_40 = param_2;
local_68 = glm::operator/((tvec3 *)&local_48,*(float *)(param_3 + 0x30));
local_60 = param_2;
local_38 = (TriCubicInterpolation *)local_68;
local_30 = param_2;
local_90 = glm::floor<float,(glm::precision)0,glm::tvec3>((tvec3 *)&local_38);
local_88 = param_2;
local_80 = local_90;
local_78 = param_2;
glm::tvec3<int,(glm::precision)0>::tvec3<float,(glm::precision)0>
((tvec3<int,(glm::precision)0> *)&local_74,(tvec3 *)&local_80);
local_b0 = (TriCubicInterpolation *)
glm::fract<float,(glm::precision)0,glm::tvec3>((tvec3 *)&local_38);
local_a8 = param_2;
local_9c = local_b0;
local_94 = param_2;
local_38 = local_b0;
local_30 = param_2;
if ((((local_74 < 0) || (*(int *)(param_3 + 0x28) <= local_74)) || (local_70 < 0)) ||
(((*(int *)(param_3 + 0x28) <= local_70 || (local_6c < 0)) ||
(*(int *)(param_3 + 0x28) <= local_6c)))) {
local_b8 = local_8;
local_c0 = local_10;
local_c8 = local_8;
local_d0 = local_10;
local_4 = (float)BoundingBox::getDistance(local_10,local_8,param_3 + 8);
local_4 = local_4 + *(float *)(param_3 + 0x24);
}
else {
local_d8 = (OctreeNode *)
std::
vector<sdflib::OctreeSdf::OctreeNode,std::allocator<sdflib::OctreeSdf::OctreeNode>>::
operator[]((vector<sdflib::OctreeSdf::OctreeNode,std::allocator<sdflib::OctreeSdf::OctreeNode>>
*)(param_3 + 0x38),
(long)(local_6c * *(int *)(param_3 + 0x2c) +
local_70 * *(int *)(param_3 + 0x28) + local_74));
while( true ) {
bVar1 = OctreeNode::isLeaf(local_d8);
if (((bVar1 ^ 0xff) & 1) == 0) break;
iVar2 = roundFloat(local_30);
iVar3 = roundFloat(local_38._4_4_);
local_dc = roundFloat((float)local_38);
local_dc = iVar3 * 2 + iVar2 * 4 + local_dc;
iVar2 = OctreeNode::getChildrenIndex(local_d8);
local_d8 = (OctreeNode *)
std::
vector<sdflib::OctreeSdf::OctreeNode,std::allocator<sdflib::OctreeSdf::OctreeNode>>
::operator[]((vector<sdflib::OctreeSdf::OctreeNode,std::allocator<sdflib::OctreeSdf::OctreeNode>>
*)(param_3 + 0x38),(ulong)(uint)(iVar2 + local_dc));
local_f8 = glm::operator*(DAT_002121b8,(tvec3 *)&local_38);
local_f0 = param_2;
local_e8 = (TriCubicInterpolation *)
glm::fract<float,(glm::precision)0,glm::tvec3>((tvec3 *)&local_f8);
local_e0 = param_2;
local_38 = local_e8;
local_30 = param_2;
}
uVar4 = OctreeNode::getChildrenIndex(local_d8);
uVar5 = std::vector<sdflib::OctreeSdf::OctreeNode,std::allocator<sdflib::OctreeSdf::OctreeNode>>
::operator[]((vector<sdflib::OctreeSdf::OctreeNode,std::allocator<sdflib::OctreeSdf::OctreeNode>>
*)(param_3 + 0x38),(ulong)uVar4);
local_4 = (float)TriCubicInterpolation::interpolateValue(local_38,local_30,uVar5);
}
return local_4;
}
|
|
14,711
|
evmone::instr::core::jumpf(evmone::StackTop, evmone::ExecutionState&, unsigned char const*)
|
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/instructions.hpp
|
inline code_iterator jumpf(StackTop stack, ExecutionState& state, code_iterator pos) noexcept
{
const auto index = read_uint16_be(&pos[1]);
const auto& header = state.analysis.baseline->eof_header();
const auto stack_size = &stack.top() - state.stack_space.bottom();
const auto callee_type = header.get_type(state.original_code, index);
if (stack_size + callee_type.max_stack_increase > StackSpace::limit)
{
state.status = EVMC_STACK_OVERFLOW;
return nullptr;
}
const auto offset = header.code_offsets[index] - header.code_offsets[0];
return state.analysis.baseline->executable_code().data() + offset;
}
|
O0
|
cpp
|
evmone::instr::core::jumpf(evmone::StackTop, evmone::ExecutionState&, unsigned char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x1, %rdi
callq 0x6f960
movw %ax, -0x22(%rbp)
movq -0x18(%rbp), %rax
movq 0x1f8(%rax), %rdi
callq 0x5ffc0
movq %rax, -0x30(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x611d0
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdi
addq $0x218, %rdi # imm = 0x218
callq 0x3fb60
movq %rax, %rcx
movq -0x70(%rbp), %rax
subq %rcx, %rax
sarq $0x5, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rcx
movq %rcx, -0x50(%rbp)
movq 0x70(%rax), %rax
movq %rax, -0x48(%rbp)
movzwl -0x22(%rbp), %eax
movl %eax, %ecx
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x70020
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movzwl -0x3a(%rbp), %ecx
addq %rcx, %rax
cmpq $0x400, %rax # imm = 0x400
jle 0x708d1
movq -0x18(%rbp), %rax
movl $0x6, 0x78(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x70935
movq -0x30(%rbp), %rdi
addq $0x28, %rdi
movzwl -0x22(%rbp), %eax
movl %eax, %esi
callq 0x3e560
movzwl (%rax), %eax
movl %eax, -0x74(%rbp)
movq -0x30(%rbp), %rdi
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3e560
movq %rax, %rcx
movl -0x74(%rbp), %eax
movzwl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x54(%rbp)
movq -0x18(%rbp), %rax
movq 0x1f8(%rax), %rdi
callq 0x5fd60
movq %rax, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5fd80
movslq -0x54(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN6evmone5instr4core5jumpfENS_8StackTopERNS_14ExecutionStateEPKh:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_20]
add rdi, 1
call _ZN6evmone14read_uint16_beIPKhEEtT_; evmone::read_uint16_be<uchar const*>(uchar const*)
mov [rbp+var_22], ax
mov rax, [rbp+var_18]
mov rdi, [rax+1F8h]; this
call _ZNK6evmone8baseline12CodeAnalysis10eof_headerEv; evmone::baseline::CodeAnalysis::eof_header(void)
mov [rbp+var_30], rax
lea rdi, [rbp+var_10]; this
call _ZN6evmone8StackTop3topEv; evmone::StackTop::top(void)
mov [rbp+var_70], rax
mov rdi, [rbp+var_18]
add rdi, 218h; this
call _ZN6evmone10StackSpace6bottomEv; evmone::StackSpace::bottom(void)
mov rcx, rax
mov rax, [rbp+var_70]
sub rax, rcx
sar rax, 5
mov [rbp+var_38], rax
mov rdi, [rbp+var_30]
mov rax, [rbp+var_18]
mov rcx, [rax+68h]
mov [rbp+var_50], rcx
mov rax, [rax+70h]
mov [rbp+var_48], rax
movzx eax, [rbp+var_22]
mov ecx, eax
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_48]
call _ZNK6evmone10EOF1Header8get_typeESt17basic_string_viewIhN4evmc11byte_traitsIhEEEm; evmone::EOF1Header::get_type(std::basic_string_view<uchar,evmc::byte_traits<uchar>>,ulong)
mov [rbp+var_3C], eax
mov rax, [rbp+var_38]
movzx ecx, word ptr [rbp+var_3C+2]
add rax, rcx
cmp rax, 400h
jle short loc_708D1
mov rax, [rbp+var_18]
mov dword ptr [rax+78h], 6
mov [rbp+var_8], 0
jmp short loc_70935
loc_708D1:
mov rdi, [rbp+var_30]
add rdi, 28h ; '('
movzx eax, [rbp+var_22]
mov esi, eax
call _ZNKSt6vectorItSaItEEixEm; std::vector<ushort>::operator[](ulong)
movzx eax, word ptr [rax]
mov [rbp+var_74], eax
mov rdi, [rbp+var_30]
add rdi, 28h ; '('
xor eax, eax
mov esi, eax
call _ZNKSt6vectorItSaItEEixEm; std::vector<ushort>::operator[](ulong)
mov rcx, rax
mov eax, [rbp+var_74]
movzx ecx, word ptr [rcx]
sub eax, ecx
mov [rbp+var_54], eax
mov rax, [rbp+var_18]
mov rdi, [rax+1F8h]; this
call _ZNK6evmone8baseline12CodeAnalysis15executable_codeEv; evmone::baseline::CodeAnalysis::executable_code(void)
mov [rbp+var_68], rax
mov [rbp+var_60], rdx
lea rdi, [rbp+var_68]
call _ZNKSt17basic_string_viewIhN4evmc11byte_traitsIhEEE4dataEv; std::basic_string_view<uchar,evmc::byte_traits<uchar>>::data(void)
movsxd rcx, [rbp+var_54]
add rax, rcx
mov [rbp+var_8], rax
loc_70935:
mov rax, [rbp+var_8]
add rsp, 80h
pop rbp
retn
|
long long evmone::instr::core::jumpf(long long a1, long long a2, long long a3)
{
long long v3; // rdx
long long v4; // rax
int v6; // [rsp+Ch] [rbp-74h]
long long v7; // [rsp+10h] [rbp-70h]
_QWORD v8[2]; // [rsp+18h] [rbp-68h] BYREF
int v9; // [rsp+2Ch] [rbp-54h]
long long v10; // [rsp+30h] [rbp-50h]
long long v11; // [rsp+38h] [rbp-48h]
int type; // [rsp+44h] [rbp-3Ch]
long long v13; // [rsp+48h] [rbp-38h]
long long v14; // [rsp+50h] [rbp-30h]
unsigned __int16 uint16; // [rsp+5Eh] [rbp-22h]
long long v16; // [rsp+60h] [rbp-20h]
long long v17; // [rsp+68h] [rbp-18h]
long long v18; // [rsp+70h] [rbp-10h] BYREF
v18 = a1;
v17 = a2;
v16 = a3;
uint16 = evmone::read_uint16_be<unsigned char const*>((_BYTE *)(a3 + 1));
v14 = evmone::baseline::CodeAnalysis::eof_header(*(evmone::baseline::CodeAnalysis **)(a2 + 504));
v7 = evmone::StackTop::top((evmone::StackTop *)&v18);
v13 = (v7 - evmone::StackSpace::bottom((evmone::StackSpace *)(a2 + 536))) >> 5;
v10 = *(_QWORD *)(a2 + 104);
v11 = *(_QWORD *)(a2 + 112);
type = evmone::EOF1Header::get_type(v14, v10, v11, uint16);
if ( HIWORD(type) + v13 <= 1024 )
{
v6 = *(unsigned __int16 *)std::vector<unsigned short>::operator[]((_QWORD *)(v14 + 40), uint16);
v9 = v6 - *(unsigned __int16 *)std::vector<unsigned short>::operator[]((_QWORD *)(v14 + 40), 0LL);
v8[0] = evmone::baseline::CodeAnalysis::executable_code(*(evmone::baseline::CodeAnalysis **)(v17 + 504));
v8[1] = v3;
v4 = std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>::data((long long)v8);
return v9 + v4;
}
else
{
*(_DWORD *)(v17 + 120) = 6;
return 0LL;
}
}
|
jumpf:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x1
CALL 0x0016f960
MOV word ptr [RBP + -0x22],AX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x1f8]
CALL 0x0015ffc0
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[RBP + -0x10]
CALL 0x001611d0
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x218
CALL 0x0013fb60
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x70]
SUB RAX,RCX
SAR RAX,0x5
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x68]
MOV qword ptr [RBP + -0x50],RCX
MOV RAX,qword ptr [RAX + 0x70]
MOV qword ptr [RBP + -0x48],RAX
MOVZX EAX,word ptr [RBP + -0x22]
MOV ECX,EAX
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x00170020
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOVZX ECX,word ptr [RBP + -0x3a]
ADD RAX,RCX
CMP RAX,0x400
JLE 0x001708d1
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x78],0x6
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00170935
LAB_001708d1:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x28
MOVZX EAX,word ptr [RBP + -0x22]
MOV ESI,EAX
CALL 0x0013e560
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x74],EAX
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x28
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013e560
MOV RCX,RAX
MOV EAX,dword ptr [RBP + -0x74]
MOVZX ECX,word ptr [RCX]
SUB EAX,ECX
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x1f8]
CALL 0x0015fd60
MOV qword ptr [RBP + -0x68],RAX
MOV qword ptr [RBP + -0x60],RDX
LEA RDI,[RBP + -0x68]
CALL 0x0015fd80
MOVSXD RCX,dword ptr [RBP + -0x54]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_00170935:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x80
POP RBP
RET
|
/* evmone::instr::core::jumpf(evmone::StackTop, evmone::ExecutionState&, unsigned char const*) */
long evmone::instr::core::jumpf(int8 param_1,long param_2,long param_3)
{
ushort uVar1;
int4 uVar2;
long lVar3;
long lVar4;
ushort *puVar5;
basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>> local_70 [20];
int local_5c;
int8 local_58;
int8 local_50;
int4 local_44;
long local_40;
long local_38;
ushort local_2a;
long local_28;
long local_20;
int8 local_18;
long local_10;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_2a = read_uint16_be<unsigned_char_const*>((uchar *)(param_3 + 1));
local_38 = baseline::CodeAnalysis::eof_header(*(CodeAnalysis **)(local_20 + 0x1f8));
lVar3 = StackTop::top((StackTop *)&local_18);
lVar4 = StackSpace::bottom((StackSpace *)(local_20 + 0x218));
local_40 = lVar3 - lVar4 >> 5;
local_58 = *(int8 *)(local_20 + 0x68);
local_50 = *(int8 *)(local_20 + 0x70);
uVar2 = EOF1Header::get_type(local_38,local_58,local_50,local_2a);
local_44._2_2_ = (ushort)((uint)uVar2 >> 0x10);
if ((long)(local_40 + (ulong)local_44._2_2_) < 0x401) {
local_44 = uVar2;
puVar5 = (ushort *)
std::vector<unsigned_short,std::allocator<unsigned_short>>::operator[]
((vector<unsigned_short,std::allocator<unsigned_short>> *)(local_38 + 0x28),
(ulong)local_2a);
uVar1 = *puVar5;
puVar5 = (ushort *)
std::vector<unsigned_short,std::allocator<unsigned_short>>::operator[]
((vector<unsigned_short,std::allocator<unsigned_short>> *)(local_38 + 0x28),0
);
local_5c = (uint)uVar1 - (uint)*puVar5;
local_70._0_16_ = baseline::CodeAnalysis::executable_code(*(CodeAnalysis **)(local_20 + 0x1f8));
local_10 = std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>::data
(local_70);
local_10 = local_10 + local_5c;
}
else {
*(int4 *)(local_20 + 0x78) = 6;
local_10 = 0;
}
return local_10;
}
|
|
14,712
|
bf_const_get
|
bluesky950520[P]quickjs/libbf.c
|
static int bf_const_get(bf_t *T, limb_t prec, bf_flags_t flags,
BFConstCache *c,
void (*func)(bf_t *res, limb_t prec), int sign)
{
limb_t ziv_extra_bits, prec1;
ziv_extra_bits = 32;
for(;;) {
prec1 = prec + ziv_extra_bits;
if (c->prec < prec1) {
if (c->val.len == 0)
bf_init(T->ctx, &c->val);
func(&c->val, prec1);
c->prec = prec1;
} else {
prec1 = c->prec;
}
bf_set(T, &c->val);
T->sign = sign;
if (!bf_can_round(T, prec, flags & BF_RND_MASK, prec1)) {
/* and more precision and retry */
ziv_extra_bits = ziv_extra_bits + (ziv_extra_bits / 2);
} else {
break;
}
}
return bf_round(T, prec, flags);
}
|
O1
|
c
|
bf_const_get:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, 0x14(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, %r13
movq %rsi, %r14
movq %rdi, %r15
leaq 0x18(%rcx), %rax
movq %rax, 0x18(%rsp)
movl %edx, 0xc(%rsp)
andl $0x7, %edx
movl %edx, 0x10(%rsp)
movl $0x20, %ebx
leaq (%rbx,%r14), %rbp
movq 0x28(%r13), %r12
cmpq %rbp, %r12
jae 0x8a6cb
movq 0x18(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x8a6ba
movq (%r15), %rax
movq %rax, (%r13)
movl $0x0, 0x8(%r13)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r13)
movq 0x18(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %r13, %rdi
movq %rbp, %rsi
callq *0x20(%rsp)
movq %rbp, 0x28(%r13)
movq %rbp, %r12
movq %r15, %rdi
movq %r13, %rsi
callq 0x84c8d
movl 0x14(%rsp), %eax
movl %eax, 0x8(%r15)
movq %r15, %rdi
movq %r14, %rsi
movl 0x10(%rsp), %edx
movq %r12, %rcx
callq 0x851e7
testl %eax, %eax
jne 0x8a702
movq %rbx, %rax
shrq %rax
addq %rax, %rbx
jmp 0x8a67a
movq 0x18(%r15), %rcx
testq %rcx, %rcx
je 0x8a72b
movq %r15, %rdi
movq %r14, %rsi
movl 0xc(%rsp), %edx
xorl %r8d, %r8d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x84e26
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
bf_const_get:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rsp+58h+var_44], r9d
mov [rsp+58h+var_38], r8
mov r13, rcx
mov r14, rsi
mov r15, rdi
lea rax, [rcx+18h]
mov [rsp+58h+var_40], rax
mov [rsp+58h+var_4C], edx
and edx, 7
mov [rsp+58h+var_48], edx
mov ebx, 20h ; ' '
loc_8A67A:
lea rbp, [rbx+r14]
mov r12, [r13+28h]
cmp r12, rbp
jnb short loc_8A6CB
mov rax, [rsp+58h+var_40]
cmp qword ptr [rax], 0
jnz short loc_8A6BA
mov rax, [r15]
mov [r13+0], rax
mov dword ptr [r13+8], 0
mov rax, 8000000000000000h
mov [r13+10h], rax
mov rax, [rsp+58h+var_40]
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
loc_8A6BA:
mov rdi, r13
mov rsi, rbp
call [rsp+58h+var_38]
mov [r13+28h], rbp
mov r12, rbp
loc_8A6CB:
mov rdi, r15
mov rsi, r13
call bf_set
mov eax, [rsp+58h+var_44]
mov [r15+8], eax
mov rdi, r15
mov rsi, r14
mov edx, [rsp+58h+var_48]
mov rcx, r12
call bf_can_round
test eax, eax
jnz short loc_8A702
mov rax, rbx
shr rax, 1
add rbx, rax
jmp loc_8A67A
loc_8A702:
mov rcx, [r15+18h]
test rcx, rcx
jz short loc_8A72B
mov rdi, r15
mov rsi, r14
mov edx, [rsp+58h+var_4C]
xor r8d, r8d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp __bf_round
loc_8A72B:
xor eax, eax
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long bf_const_get(
long long a1,
long long a2,
unsigned int a3,
long long a4,
void ( *a5)(long long, unsigned long long),
int a6)
{
unsigned long long i; // rbx
unsigned long long v8; // r12
unsigned long long v9; // rcx
int v12; // [rsp+10h] [rbp-48h]
_OWORD *v14; // [rsp+18h] [rbp-40h]
v14 = (_OWORD *)(a4 + 24);
v12 = a3 & 7;
for ( i = 32LL; ; i += i >> 1 )
{
v8 = *(_QWORD *)(a4 + 40);
if ( v8 < i + a2 )
{
if ( !*(_QWORD *)v14 )
{
*(_QWORD *)a4 = *(_QWORD *)a1;
*(_DWORD *)(a4 + 8) = 0;
*(_QWORD *)(a4 + 16) = 0x8000000000000000LL;
*v14 = 0LL;
}
a5(a4, i + a2);
*(_QWORD *)(a4 + 40) = i + a2;
v8 = i + a2;
}
bf_set((_QWORD *)a1, a4);
*(_DWORD *)(a1 + 8) = a6;
if ( bf_can_round((_QWORD *)a1, a2, v12, v8) )
break;
}
v9 = *(_QWORD *)(a1 + 24);
if ( v9 )
return _bf_round(a1, a2, a3, v9, 0);
else
return 0LL;
}
|
bf_const_get:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV dword ptr [RSP + 0x14],R9D
MOV qword ptr [RSP + 0x20],R8
MOV R13,RCX
MOV R14,RSI
MOV R15,RDI
LEA RAX,[RCX + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV dword ptr [RSP + 0xc],EDX
AND EDX,0x7
MOV dword ptr [RSP + 0x10],EDX
MOV EBX,0x20
LAB_0018a67a:
LEA RBP,[RBX + R14*0x1]
MOV R12,qword ptr [R13 + 0x28]
CMP R12,RBP
JNC 0x0018a6cb
MOV RAX,qword ptr [RSP + 0x18]
CMP qword ptr [RAX],0x0
JNZ 0x0018a6ba
MOV RAX,qword ptr [R15]
MOV qword ptr [R13],RAX
MOV dword ptr [R13 + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [R13 + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x18]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
LAB_0018a6ba:
MOV RDI,R13
MOV RSI,RBP
CALL qword ptr [RSP + 0x20]
MOV qword ptr [R13 + 0x28],RBP
MOV R12,RBP
LAB_0018a6cb:
MOV RDI,R15
MOV RSI,R13
CALL 0x00184c8d
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [R15 + 0x8],EAX
MOV RDI,R15
MOV RSI,R14
MOV EDX,dword ptr [RSP + 0x10]
MOV RCX,R12
CALL 0x001851e7
TEST EAX,EAX
JNZ 0x0018a702
MOV RAX,RBX
SHR RAX,0x1
ADD RBX,RAX
JMP 0x0018a67a
LAB_0018a702:
MOV RCX,qword ptr [R15 + 0x18]
TEST RCX,RCX
JZ 0x0018a72b
MOV RDI,R15
MOV RSI,R14
MOV EDX,dword ptr [RSP + 0xc]
XOR R8D,R8D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00184e26
LAB_0018a72b:
XOR EAX,EAX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
bf_const_get(int8 *param_1,long param_2,uint param_3,int8 *param_4,code *param_5,
int4 param_6)
{
ulong uVar1;
int iVar2;
int8 uVar3;
ulong uVar4;
ulong uVar5;
uVar4 = 0x20;
while( true ) {
uVar1 = uVar4 + param_2;
uVar5 = param_4[5];
if ((ulong)param_4[5] < uVar1) {
if (param_4[3] == 0) {
*param_4 = *param_1;
*(int4 *)(param_4 + 1) = 0;
param_4[2] = 0x8000000000000000;
param_4[3] = 0;
param_4[4] = 0;
}
(*param_5)(param_4,uVar1);
param_4[5] = uVar1;
uVar5 = uVar1;
}
bf_set(param_1,param_4);
*(int4 *)(param_1 + 1) = param_6;
iVar2 = bf_can_round(param_1,param_2,param_3 & 7,uVar5);
if (iVar2 != 0) break;
uVar4 = uVar4 + (uVar4 >> 1);
}
if (param_1[3] != 0) {
uVar3 = __bf_round(param_1,param_2,param_3,param_1[3],0);
return uVar3;
}
return 0;
}
|
|
14,713
|
my_fread
|
eloqsql/mysys/my_fstream.c
|
size_t my_fread(FILE *stream, uchar *Buffer, size_t Count, myf MyFlags)
{
size_t readbytes;
DBUG_ENTER("my_fread");
DBUG_PRINT("my",("stream: %p Buffer %p Count: %u MyFlags: %lu",
stream, Buffer, (uint) Count, MyFlags));
if ((readbytes= fread(Buffer, sizeof(char), Count, stream)) != Count)
{
DBUG_PRINT("error",("Read only %d bytes", (int) readbytes));
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
if (ferror(stream))
my_error(EE_READ, MYF(ME_BELL),
my_filename(my_fileno(stream)),errno);
else
if (MyFlags & (MY_NABP | MY_FNABP))
my_error(EE_EOFERR, MYF(ME_BELL),
my_filename(my_fileno(stream)),errno);
}
my_errno=errno ? errno : -1;
if (ferror(stream) || MyFlags & (MY_NABP | MY_FNABP))
DBUG_RETURN((size_t) -1); /* Return with error */
}
if (MyFlags & (MY_NABP | MY_FNABP))
DBUG_RETURN(0); /* Read ok */
DBUG_RETURN(readbytes);
}
|
O0
|
c
|
my_fread:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
jmp 0x3c43a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rcx
movl $0x1, %esi
callq 0x25540
movq %rax, -0x30(%rbp)
cmpq -0x20(%rbp), %rax
je 0x3c550
jmp 0x3c460
jmp 0x3c462
movq -0x28(%rbp), %rax
andq $0x1a, %rax
cmpq $0x0, %rax
je 0x3c4f6
movq -0x10(%rbp), %rdi
callq 0x25690
cmpl $0x0, %eax
je 0x3c4b4
movq -0x10(%rbp), %rdi
callq 0x3c580
movl %eax, %edi
callq 0x3bdd0
movq %rax, -0x38(%rbp)
callq 0x25040
movq -0x38(%rbp), %rdx
movl (%rax), %ecx
movl $0x2, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x291b0
jmp 0x3c4f4
movq -0x28(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0x3c4f2
movq -0x10(%rbp), %rdi
callq 0x3c580
movl %eax, %edi
callq 0x3bdd0
movq %rax, -0x40(%rbp)
callq 0x25040
movq -0x40(%rbp), %rdx
movl (%rax), %ecx
movl $0x9, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x291b0
jmp 0x3c4f4
jmp 0x3c4f6
callq 0x25040
cmpl $0x0, (%rax)
je 0x3c50c
callq 0x25040
movl (%rax), %eax
movl %eax, -0x44(%rbp)
jmp 0x3c516
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, -0x44(%rbp)
jmp 0x3c516
movl -0x44(%rbp), %eax
movl %eax, -0x48(%rbp)
callq 0x2f960
movl -0x48(%rbp), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x25690
cmpl $0x0, %eax
jne 0x3c542
movq -0x28(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0x3c54e
jmp 0x3c544
movq $-0x1, -0x8(%rbp)
jmp 0x3c574
jmp 0x3c550
movq -0x28(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0x3c56a
jmp 0x3c560
movq $0x0, -0x8(%rbp)
jmp 0x3c574
jmp 0x3c56c
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
|
my_fread:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
jmp short $+2
loc_3C43A:
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_10]
mov esi, 1
call _fread
mov [rbp+var_30], rax
cmp rax, [rbp+var_20]
jz loc_3C550
jmp short $+2
loc_3C460:
jmp short $+2
loc_3C462:
mov rax, [rbp+var_28]
and rax, 1Ah
cmp rax, 0
jz loc_3C4F6
mov rdi, [rbp+var_10]
call _ferror
cmp eax, 0
jz short loc_3C4B4
mov rdi, [rbp+var_10]
call my_fileno
mov edi, eax
call my_filename
mov [rbp+var_38], rax
call ___errno_location
mov rdx, [rbp+var_38]
mov ecx, [rax]
mov edi, 2
mov esi, 4
mov al, 0
call my_error
jmp short loc_3C4F4
loc_3C4B4:
mov rax, [rbp+var_28]
and rax, 6
cmp rax, 0
jz short loc_3C4F2
mov rdi, [rbp+var_10]
call my_fileno
mov edi, eax
call my_filename
mov [rbp+var_40], rax
call ___errno_location
mov rdx, [rbp+var_40]
mov ecx, [rax]
mov edi, 9
mov esi, 4
mov al, 0
call my_error
loc_3C4F2:
jmp short $+2
loc_3C4F4:
jmp short $+2
loc_3C4F6:
call ___errno_location
cmp dword ptr [rax], 0
jz short loc_3C50C
call ___errno_location
mov eax, [rax]
mov [rbp+var_44], eax
jmp short loc_3C516
loc_3C50C:
mov eax, 0FFFFFFFFh
mov [rbp+var_44], eax
jmp short $+2
loc_3C516:
mov eax, [rbp+var_44]
mov [rbp+var_48], eax
call _my_thread_var
mov ecx, [rbp+var_48]
mov [rax], ecx
mov rdi, [rbp+var_10]
call _ferror
cmp eax, 0
jnz short loc_3C542
mov rax, [rbp+var_28]
and rax, 6
cmp rax, 0
jz short loc_3C54E
loc_3C542:
jmp short $+2
loc_3C544:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_3C574
loc_3C54E:
jmp short $+2
loc_3C550:
mov rax, [rbp+var_28]
and rax, 6
cmp rax, 0
jz short loc_3C56A
jmp short $+2
loc_3C560:
mov [rbp+var_8], 0
jmp short loc_3C574
loc_3C56A:
jmp short $+2
loc_3C56C:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_3C574:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
|
long long my_fread(long long a1, long long a2, long long a3, char a4)
{
int v4; // eax
unsigned int *v5; // rax
int v6; // eax
unsigned int *v7; // rax
int v9; // [rsp+Ch] [rbp-44h]
const char *v10; // [rsp+10h] [rbp-40h]
const char *v11; // [rsp+18h] [rbp-38h]
long long v12; // [rsp+20h] [rbp-30h]
v12 = fread(a2, 1LL, a3, a1);
if ( v12 == a3 )
goto LABEL_13;
if ( (a4 & 0x1A) != 0 )
{
if ( (unsigned int)ferror(a1) )
{
v4 = my_fileno(a1);
v11 = my_filename(v4);
v5 = (unsigned int *)__errno_location();
my_error(2u, 4LL, v11, *v5);
}
else if ( (a4 & 6) != 0 )
{
v6 = my_fileno(a1);
v10 = my_filename(v6);
v7 = (unsigned int *)__errno_location();
my_error(9u, 4LL, v10, *v7);
}
}
v9 = *(_DWORD *)__errno_location() ? *(_DWORD *)__errno_location() : -1;
*(_DWORD *)my_thread_var() = v9;
if ( (unsigned int)ferror(a1) || (a4 & 6) != 0 )
return -1LL;
LABEL_13:
if ( (a4 & 6) != 0 )
return 0LL;
return v12;
}
|
my_fread:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
JMP 0x0013c43a
LAB_0013c43a:
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x00125540
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x0013c550
JMP 0x0013c460
LAB_0013c460:
JMP 0x0013c462
LAB_0013c462:
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x1a
CMP RAX,0x0
JZ 0x0013c4f6
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00125690
CMP EAX,0x0
JZ 0x0013c4b4
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c580
MOV EDI,EAX
CALL 0x0013bdd0
MOV qword ptr [RBP + -0x38],RAX
CALL 0x00125040
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX]
MOV EDI,0x2
MOV ESI,0x4
MOV AL,0x0
CALL 0x001291b0
JMP 0x0013c4f4
LAB_0013c4b4:
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x6
CMP RAX,0x0
JZ 0x0013c4f2
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c580
MOV EDI,EAX
CALL 0x0013bdd0
MOV qword ptr [RBP + -0x40],RAX
CALL 0x00125040
MOV RDX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RAX]
MOV EDI,0x9
MOV ESI,0x4
MOV AL,0x0
CALL 0x001291b0
LAB_0013c4f2:
JMP 0x0013c4f4
LAB_0013c4f4:
JMP 0x0013c4f6
LAB_0013c4f6:
CALL 0x00125040
CMP dword ptr [RAX],0x0
JZ 0x0013c50c
CALL 0x00125040
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x44],EAX
JMP 0x0013c516
LAB_0013c50c:
MOV EAX,0xffffffff
MOV dword ptr [RBP + -0x44],EAX
JMP 0x0013c516
LAB_0013c516:
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x48],EAX
CALL 0x0012f960
MOV ECX,dword ptr [RBP + -0x48]
MOV dword ptr [RAX],ECX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00125690
CMP EAX,0x0
JNZ 0x0013c542
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x6
CMP RAX,0x0
JZ 0x0013c54e
LAB_0013c542:
JMP 0x0013c544
LAB_0013c544:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x0013c574
LAB_0013c54e:
JMP 0x0013c550
LAB_0013c550:
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x6
CMP RAX,0x0
JZ 0x0013c56a
JMP 0x0013c560
LAB_0013c560:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0013c574
LAB_0013c56a:
JMP 0x0013c56c
LAB_0013c56c:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_0013c574:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
size_t my_fread(FILE *param_1,void *param_2,size_t param_3,ulong param_4)
{
int iVar1;
int4 uVar2;
int8 uVar3;
int *piVar4;
int local_4c;
size_t local_10;
local_10 = fread(param_2,1,param_3,param_1);
if (local_10 != param_3) {
if ((param_4 & 0x1a) != 0) {
iVar1 = ferror(param_1);
if (iVar1 == 0) {
if ((param_4 & 6) != 0) {
uVar2 = my_fileno(param_1);
uVar3 = my_filename(uVar2);
piVar4 = __errno_location();
my_error(9,4,uVar3,*piVar4);
}
}
else {
uVar2 = my_fileno(param_1);
uVar3 = my_filename(uVar2);
piVar4 = __errno_location();
my_error(2,4,uVar3,*piVar4);
}
}
piVar4 = __errno_location();
if (*piVar4 == 0) {
local_4c = -1;
}
else {
piVar4 = __errno_location();
local_4c = *piVar4;
}
piVar4 = (int *)_my_thread_var();
*piVar4 = local_4c;
iVar1 = ferror(param_1);
if ((iVar1 != 0) || ((param_4 & 6) != 0)) {
return 0xffffffffffffffff;
}
}
if ((param_4 & 6) != 0) {
local_10 = 0;
}
return local_10;
}
|
|
14,714
|
mysql_stat
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
char * STDCALL
mysql_stat(MYSQL *mysql)
{
if (ma_simple_command(mysql, COM_STATISTICS,0,0,0,0))
return mysql->net.last_error;
mysql->net.read_pos[mysql->packet_length]=0; /* End of stat string */
if (!mysql->net.read_pos[0])
{
SET_CLIENT_ERROR(mysql, CR_WRONG_HOST_INFO , SQLSTATE_UNKNOWN, 0);
return mysql->net.last_error;
}
return((char*) mysql->net.read_pos);
}
|
O0
|
c
|
mysql_stat:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x9, %esi
xorl %eax, %eax
movl %eax, %r9d
xorl %r8d, %r8d
movq %r9, %rdx
movq %r9, %rcx
callq 0x7b890
cmpl $0x0, %eax
je 0x850e0
movq -0x10(%rbp), %rax
addq $0x97, %rax
movq %rax, -0x8(%rbp)
jmp 0x85185
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x358(%rcx), %rcx
movb $0x0, (%rax,%rcx)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
cmpb $0x0, (%rax)
jne 0x85179
jmp 0x85106
movq -0x10(%rbp), %rax
movl $0x7d9, 0x90(%rax) # imm = 0x7D9
movq -0x10(%rbp), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x27c25a(%rip), %rax # 0x301380
movq (%rax), %rsi
movl $0x5, %edx
callq 0x60180
movq -0x10(%rbp), %rax
movb $0x0, 0x29c(%rax)
movq -0x10(%rbp), %rdi
addq $0x97, %rdi
leaq 0x27c240(%rip), %rax # 0x301390
movq 0x48(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x60180
movq -0x10(%rbp), %rax
movb $0x0, 0x296(%rax)
movq -0x10(%rbp), %rax
addq $0x97, %rax
movq %rax, -0x8(%rbp)
jmp 0x85185
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
|
mysql_stat:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
mov esi, 9
xor eax, eax
mov r9d, eax
xor r8d, r8d
mov rdx, r9
mov rcx, r9
call ma_simple_command
cmp eax, 0
jz short loc_850E0
mov rax, [rbp+var_10]
add rax, 97h
mov [rbp+var_8], rax
jmp loc_85185
loc_850E0:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+358h]
mov byte ptr [rax+rcx], 0
mov rax, [rbp+var_10]
mov rax, [rax+20h]
cmp byte ptr [rax], 0
jnz short loc_85179
jmp short $+2
loc_85106:
mov rax, [rbp+var_10]
mov dword ptr [rax+90h], 7D9h
mov rdi, [rbp+var_10]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+29Ch], 0
mov rdi, [rbp+var_10]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+48h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+296h], 0
mov rax, [rbp+var_10]
add rax, 97h
mov [rbp+var_8], rax
jmp short loc_85185
loc_85179:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov [rbp+var_8], rax
loc_85185:
mov rax, [rbp+var_8]
add rsp, 10h
pop rbp
retn
|
long long mysql_stat(long long a1)
{
if ( (unsigned int)ma_simple_command(a1, 9u, 0LL, 0LL, 0, 0LL) )
return a1 + 151;
*(_BYTE *)(*(_QWORD *)(a1 + 32) + *(_QWORD *)(a1 + 856)) = 0;
if ( **(_BYTE **)(a1 + 32) )
return *(_QWORD *)(a1 + 32);
*(_DWORD *)(a1 + 144) = 2009;
strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 668) = 0;
strncpy(a1 + 151, client_errors[9], 511LL);
*(_BYTE *)(a1 + 662) = 0;
return a1 + 151;
}
|
mysql_stat:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x9
XOR EAX,EAX
MOV R9D,EAX
XOR R8D,R8D
MOV RDX,R9
MOV RCX,R9
CALL 0x0017b890
CMP EAX,0x0
JZ 0x001850e0
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x97
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00185185
LAB_001850e0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x358]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
CMP byte ptr [RAX],0x0
JNZ 0x00185179
JMP 0x00185106
LAB_00185106:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x90],0x7d9
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x297
LEA RAX,[0x401380]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00160180
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x29c],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x97
LEA RAX,[0x401390]
MOV RSI,qword ptr [RAX + 0x48]
MOV EDX,0x1ff
CALL 0x00160180
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x296],0x0
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x97
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00185185
LAB_00185179:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_00185185:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
RET
|
long mysql_stat(long param_1)
{
int iVar1;
int8 local_10;
iVar1 = ma_simple_command(param_1,9,0,0,0);
if (iVar1 == 0) {
*(int1 *)(*(long *)(param_1 + 0x20) + *(long *)(param_1 + 0x358)) = 0;
if (**(char **)(param_1 + 0x20) == '\0') {
*(int4 *)(param_1 + 0x90) = 0x7d9;
strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x29c) = 0;
strncpy((char *)(param_1 + 0x97),PTR_s_Wrong_host_info_004013d8,0x1ff);
*(int1 *)(param_1 + 0x296) = 0;
local_10 = param_1 + 0x97;
}
else {
local_10 = *(long *)(param_1 + 0x20);
}
}
else {
local_10 = param_1 + 0x97;
}
return local_10;
}
|
|
14,715
|
ftxui::(anonymous namespace)::Border::Render(ftxui::Screen&)
|
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/dom/border.cpp
|
void Render(Screen& screen) override {
// Draw content.
children_[0]->Render(screen);
// Draw the border.
if (box_.x_min >= box_.x_max || box_.y_min >= box_.y_max) {
return;
}
screen.at(box_.x_min, box_.y_min) = charset_[0]; // NOLINT
screen.at(box_.x_max, box_.y_min) = charset_[1]; // NOLINT
screen.at(box_.x_min, box_.y_max) = charset_[2]; // NOLINT
screen.at(box_.x_max, box_.y_max) = charset_[3]; // NOLINT
for (int x = box_.x_min + 1; x < box_.x_max; ++x) {
Pixel& p1 = screen.PixelAt(x, box_.y_min);
Pixel& p2 = screen.PixelAt(x, box_.y_max);
p1.character = charset_[4]; // NOLINT
p2.character = charset_[4]; // NOLINT
p1.automerge = true;
p2.automerge = true;
}
for (int y = box_.y_min + 1; y < box_.y_max; ++y) {
Pixel& p3 = screen.PixelAt(box_.x_min, y);
Pixel& p4 = screen.PixelAt(box_.x_max, y);
p3.character = charset_[5]; // NOLINT
p4.character = charset_[5]; // NOLINT
p3.automerge = true;
p4.automerge = true;
}
// Draw title.
if (children_.size() == 2) {
children_[1]->Render(screen);
}
// Draw the border color.
if (foreground_color_) {
for (int x = box_.x_min; x <= box_.x_max; ++x) {
screen.PixelAt(x, box_.y_min).foreground_color = *foreground_color_;
screen.PixelAt(x, box_.y_max).foreground_color = *foreground_color_;
}
for (int y = box_.y_min; y <= box_.y_max; ++y) {
screen.PixelAt(box_.x_min, y).foreground_color = *foreground_color_;
screen.PixelAt(box_.x_max, y).foreground_color = *foreground_color_;
}
}
}
|
O0
|
cpp
|
ftxui::(anonymous namespace)::Border::Render(ftxui::Screen&):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x50(%rbp)
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3e6a0
movq %rax, %rdi
callq 0x3e6c0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
callq *0x20(%rax)
movq -0x50(%rbp), %rcx
movl 0x4c(%rcx), %eax
cmpl 0x50(%rcx), %eax
jge 0x3ac75
movq -0x50(%rbp), %rcx
movl 0x54(%rcx), %eax
cmpl 0x58(%rcx), %eax
jl 0x3ac7a
jmp 0x3b03a
movq -0x50(%rbp), %rax
movq 0x60(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3e7c0
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x70(%rbp)
movq -0x10(%rbp), %rdi
movl 0x4c(%rax), %esi
movl 0x54(%rax), %edx
callq 0x882c0
movq -0x70(%rbp), %rsi
movq %rax, %rdi
callq 0xd060
movq -0x50(%rbp), %rax
movq 0x60(%rax), %rdi
movl $0x1, %esi
callq 0x3e7c0
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movl 0x50(%rax), %esi
movl 0x54(%rax), %edx
callq 0x882c0
movq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0xd060
movq -0x50(%rbp), %rax
movq 0x60(%rax), %rdi
movl $0x2, %esi
callq 0x3e7c0
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movl 0x4c(%rax), %esi
movl 0x58(%rax), %edx
callq 0x882c0
movq -0x60(%rbp), %rsi
movq %rax, %rdi
callq 0xd060
movq -0x50(%rbp), %rax
movq 0x60(%rax), %rdi
movl $0x3, %esi
callq 0x3e7c0
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x58(%rbp)
movq -0x10(%rbp), %rdi
movl 0x50(%rax), %esi
movl 0x58(%rax), %edx
callq 0x882c0
movq -0x58(%rbp), %rsi
movq %rax, %rdi
callq 0xd060
movq -0x50(%rbp), %rax
movl 0x4c(%rax), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x50(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x50(%rcx), %eax
jge 0x3ae18
movq -0x50(%rbp), %rax
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl 0x54(%rax), %edx
callq 0x882f0
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl 0x58(%rax), %edx
callq 0x882f0
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq 0x60(%rax), %rdi
movl $0x4, %esi
callq 0x3e7c0
movq %rax, %rsi
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0xd060
movq -0x50(%rbp), %rax
movq 0x60(%rax), %rdi
movl $0x4, %esi
callq 0x3e7c0
movq %rax, %rsi
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
callq 0xd060
movq -0x20(%rbp), %rax
movb (%rax), %cl
andb $0x7f, %cl
orb $-0x80, %cl
movb %cl, (%rax)
movq -0x28(%rbp), %rax
movb (%rax), %cl
andb $0x7f, %cl
orb $-0x80, %cl
movb %cl, (%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3ad66
movq -0x50(%rbp), %rax
movl 0x54(%rax), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x50(%rbp), %rcx
movl -0x2c(%rbp), %eax
cmpl 0x58(%rcx), %eax
jge 0x3aed7
movq -0x50(%rbp), %rax
movq -0x10(%rbp), %rdi
movl 0x4c(%rax), %esi
movl -0x2c(%rbp), %edx
callq 0x882f0
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movl 0x50(%rax), %esi
movl -0x2c(%rbp), %edx
callq 0x882f0
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq 0x60(%rax), %rdi
movl $0x5, %esi
callq 0x3e7c0
movq %rax, %rsi
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
callq 0xd060
movq -0x50(%rbp), %rax
movq 0x60(%rax), %rdi
movl $0x5, %esi
callq 0x3e7c0
movq %rax, %rsi
movq -0x40(%rbp), %rdi
addq $0x8, %rdi
callq 0xd060
movq -0x38(%rbp), %rax
movb (%rax), %cl
andb $0x7f, %cl
orb $-0x80, %cl
movb %cl, (%rax)
movq -0x40(%rbp), %rax
movb (%rax), %cl
andb $0x7f, %cl
orb $-0x80, %cl
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3ae25
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
callq 0x24980
cmpq $0x2, %rax
jne 0x3af11
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0x3e6a0
movq %rax, %rdi
callq 0x3e6c0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
callq *0x20(%rax)
movq -0x50(%rbp), %rdi
addq $0x68, %rdi
callq 0x3e7f0
testb $0x1, %al
jne 0x3af27
jmp 0x3b03a
movq -0x50(%rbp), %rax
movl 0x4c(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x50(%rbp), %rcx
movl -0x44(%rbp), %eax
cmpl 0x50(%rcx), %eax
jg 0x3afa8
movq -0x50(%rbp), %rdi
addq $0x68, %rdi
callq 0x3e810
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x80(%rbp)
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %esi
movl 0x54(%rax), %edx
callq 0x882f0
movq -0x80(%rbp), %rcx
movq -0x50(%rbp), %rdi
movl (%rcx), %ecx
movl %ecx, 0x2c(%rax)
addq $0x68, %rdi
callq 0x3e810
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x78(%rbp)
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %esi
movl 0x58(%rax), %edx
callq 0x882f0
movq -0x78(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x2c(%rax)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x3af31
movq -0x50(%rbp), %rax
movl 0x54(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x50(%rbp), %rcx
movl -0x48(%rbp), %eax
cmpl 0x58(%rcx), %eax
jg 0x3b038
movq -0x50(%rbp), %rdi
addq $0x68, %rdi
callq 0x3e810
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x90(%rbp)
movq -0x10(%rbp), %rdi
movl 0x4c(%rax), %esi
movl -0x48(%rbp), %edx
callq 0x882f0
movq -0x90(%rbp), %rcx
movq -0x50(%rbp), %rdi
movl (%rcx), %ecx
movl %ecx, 0x2c(%rax)
addq $0x68, %rdi
callq 0x3e810
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x88(%rbp)
movq -0x10(%rbp), %rdi
movl 0x50(%rax), %esi
movl -0x48(%rbp), %edx
callq 0x882f0
movq -0x88(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x2c(%rax)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x3afb2
jmp 0x3b03a
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN5ftxui12_GLOBAL__N_16Border6RenderERNS_6ScreenE:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov [rbp+var_50], rdi
add rdi, 8
xor eax, eax
mov esi, eax
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EEixEm; std::vector<std::shared_ptr<ftxui::Node>>::operator[](ulong)
mov rdi, rax
call _ZNKSt19__shared_ptr_accessIN5ftxui4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rsi, [rbp+var_10]
mov rax, [rdi]
call qword ptr [rax+20h]
mov rcx, [rbp+var_50]
mov eax, [rcx+4Ch]
cmp eax, [rcx+50h]
jge short loc_3AC75
mov rcx, [rbp+var_50]
mov eax, [rcx+54h]
cmp eax, [rcx+58h]
jl short loc_3AC7A
loc_3AC75:
jmp loc_3B03A
loc_3AC7A:
mov rax, [rbp+var_50]
mov rdi, [rax+60h]
xor eax, eax
mov esi, eax
call _ZNKSt5arrayINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELm6EEixEm; std::array<std::string,6ul>::operator[](ulong)
mov rcx, rax
mov rax, [rbp+var_50]
mov [rbp+var_70], rcx
mov rdi, [rbp+var_10]
mov esi, [rax+4Ch]
mov edx, [rax+54h]
call _ZN5ftxui6Screen2atB5cxx11Eii; ftxui::Screen::at(int,int)
mov rsi, [rbp+var_70]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
mov rax, [rbp+var_50]
mov rdi, [rax+60h]
mov esi, 1
call _ZNKSt5arrayINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELm6EEixEm; std::array<std::string,6ul>::operator[](ulong)
mov rcx, rax
mov rax, [rbp+var_50]
mov [rbp+var_68], rcx
mov rdi, [rbp+var_10]
mov esi, [rax+50h]
mov edx, [rax+54h]
call _ZN5ftxui6Screen2atB5cxx11Eii; ftxui::Screen::at(int,int)
mov rsi, [rbp+var_68]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
mov rax, [rbp+var_50]
mov rdi, [rax+60h]
mov esi, 2
call _ZNKSt5arrayINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELm6EEixEm; std::array<std::string,6ul>::operator[](ulong)
mov rcx, rax
mov rax, [rbp+var_50]
mov [rbp+var_60], rcx
mov rdi, [rbp+var_10]
mov esi, [rax+4Ch]
mov edx, [rax+58h]
call _ZN5ftxui6Screen2atB5cxx11Eii; ftxui::Screen::at(int,int)
mov rsi, [rbp+var_60]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
mov rax, [rbp+var_50]
mov rdi, [rax+60h]
mov esi, 3
call _ZNKSt5arrayINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELm6EEixEm; std::array<std::string,6ul>::operator[](ulong)
mov rcx, rax
mov rax, [rbp+var_50]
mov [rbp+var_58], rcx
mov rdi, [rbp+var_10]
mov esi, [rax+50h]
mov edx, [rax+58h]
call _ZN5ftxui6Screen2atB5cxx11Eii; ftxui::Screen::at(int,int)
mov rsi, [rbp+var_58]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
mov rax, [rbp+var_50]
mov eax, [rax+4Ch]
add eax, 1
mov [rbp+var_14], eax
loc_3AD66:
mov rcx, [rbp+var_50]
mov eax, [rbp+var_14]
cmp eax, [rcx+50h]
jge loc_3AE18
mov rax, [rbp+var_50]
mov rdi, [rbp+var_10]; this
mov esi, [rbp+var_14]; int
mov edx, [rax+54h]; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rcx, rax
mov rax, [rbp+var_50]
mov [rbp+var_20], rcx
mov rdi, [rbp+var_10]; this
mov esi, [rbp+var_14]; int
mov edx, [rax+58h]; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rcx, rax
mov rax, [rbp+var_50]
mov [rbp+var_28], rcx
mov rdi, [rax+60h]
mov esi, 4
call _ZNKSt5arrayINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELm6EEixEm; std::array<std::string,6ul>::operator[](ulong)
mov rsi, rax
mov rdi, [rbp+var_20]
add rdi, 8
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
mov rax, [rbp+var_50]
mov rdi, [rax+60h]
mov esi, 4
call _ZNKSt5arrayINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELm6EEixEm; std::array<std::string,6ul>::operator[](ulong)
mov rsi, rax
mov rdi, [rbp+var_28]
add rdi, 8
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
mov rax, [rbp+var_20]
mov cl, [rax]
and cl, 7Fh
or cl, 80h
mov [rax], cl
mov rax, [rbp+var_28]
mov cl, [rax]
and cl, 7Fh
or cl, 80h
mov [rax], cl
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp loc_3AD66
loc_3AE18:
mov rax, [rbp+var_50]
mov eax, [rax+54h]
add eax, 1
mov [rbp+var_2C], eax
loc_3AE25:
mov rcx, [rbp+var_50]
mov eax, [rbp+var_2C]
cmp eax, [rcx+58h]
jge loc_3AED7
mov rax, [rbp+var_50]
mov rdi, [rbp+var_10]; this
mov esi, [rax+4Ch]; int
mov edx, [rbp+var_2C]; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rcx, rax
mov rax, [rbp+var_50]
mov [rbp+var_38], rcx
mov rdi, [rbp+var_10]; this
mov esi, [rax+50h]; int
mov edx, [rbp+var_2C]; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rcx, rax
mov rax, [rbp+var_50]
mov [rbp+var_40], rcx
mov rdi, [rax+60h]
mov esi, 5
call _ZNKSt5arrayINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELm6EEixEm; std::array<std::string,6ul>::operator[](ulong)
mov rsi, rax
mov rdi, [rbp+var_38]
add rdi, 8
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
mov rax, [rbp+var_50]
mov rdi, [rax+60h]
mov esi, 5
call _ZNKSt5arrayINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELm6EEixEm; std::array<std::string,6ul>::operator[](ulong)
mov rsi, rax
mov rdi, [rbp+var_40]
add rdi, 8
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
mov rax, [rbp+var_38]
mov cl, [rax]
and cl, 7Fh
or cl, 80h
mov [rax], cl
mov rax, [rbp+var_40]
mov cl, [rax]
and cl, 7Fh
or cl, 80h
mov [rax], cl
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp loc_3AE25
loc_3AED7:
mov rdi, [rbp+var_50]
add rdi, 8
call _ZNKSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE4sizeEv; std::vector<std::shared_ptr<ftxui::Node>>::size(void)
cmp rax, 2
jnz short loc_3AF11
mov rdi, [rbp+var_50]
add rdi, 8
mov esi, 1
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EEixEm; std::vector<std::shared_ptr<ftxui::Node>>::operator[](ulong)
mov rdi, rax
call _ZNKSt19__shared_ptr_accessIN5ftxui4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rsi, [rbp+var_10]
mov rax, [rdi]
call qword ptr [rax+20h]
loc_3AF11:
mov rdi, [rbp+var_50]
add rdi, 68h ; 'h'
call _ZNKSt8optionalIN5ftxui5ColorEEcvbEv; std::optional<ftxui::Color>::operator bool(void)
test al, 1
jnz short loc_3AF27
jmp loc_3B03A
loc_3AF27:
mov rax, [rbp+var_50]
mov eax, [rax+4Ch]
mov [rbp+var_44], eax
loc_3AF31:
mov rcx, [rbp+var_50]
mov eax, [rbp+var_44]
cmp eax, [rcx+50h]
jg short loc_3AFA8
mov rdi, [rbp+var_50]
add rdi, 68h ; 'h'
call _ZNRSt8optionalIN5ftxui5ColorEEdeEv; std::optional<ftxui::Color>::operator*(void)
mov rcx, rax
mov rax, [rbp+var_50]
mov [rbp+var_80], rcx
mov rdi, [rbp+var_10]; this
mov esi, [rbp+var_44]; int
mov edx, [rax+54h]; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rcx, [rbp+var_80]
mov rdi, [rbp+var_50]
mov ecx, [rcx]
mov [rax+2Ch], ecx
add rdi, 68h ; 'h'
call _ZNRSt8optionalIN5ftxui5ColorEEdeEv; std::optional<ftxui::Color>::operator*(void)
mov rcx, rax
mov rax, [rbp+var_50]
mov [rbp+var_78], rcx
mov rdi, [rbp+var_10]; this
mov esi, [rbp+var_44]; int
mov edx, [rax+58h]; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rcx, [rbp+var_78]
mov ecx, [rcx]
mov [rax+2Ch], ecx
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp short loc_3AF31
loc_3AFA8:
mov rax, [rbp+var_50]
mov eax, [rax+54h]
mov [rbp+var_48], eax
loc_3AFB2:
mov rcx, [rbp+var_50]
mov eax, [rbp+var_48]
cmp eax, [rcx+58h]
jg short loc_3B038
mov rdi, [rbp+var_50]
add rdi, 68h ; 'h'
call _ZNRSt8optionalIN5ftxui5ColorEEdeEv; std::optional<ftxui::Color>::operator*(void)
mov rcx, rax
mov rax, [rbp+var_50]
mov [rbp+var_90], rcx
mov rdi, [rbp+var_10]; this
mov esi, [rax+4Ch]; int
mov edx, [rbp+var_48]; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rcx, [rbp+var_90]
mov rdi, [rbp+var_50]
mov ecx, [rcx]
mov [rax+2Ch], ecx
add rdi, 68h ; 'h'
call _ZNRSt8optionalIN5ftxui5ColorEEdeEv; std::optional<ftxui::Color>::operator*(void)
mov rcx, rax
mov rax, [rbp+var_50]
mov [rbp+var_88], rcx
mov rdi, [rbp+var_10]; this
mov esi, [rax+50h]; int
mov edx, [rbp+var_48]; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rcx, [rbp+var_88]
mov ecx, [rcx]
mov [rax+2Ch], ecx
mov eax, [rbp+var_48]
add eax, 1
mov [rbp+var_48], eax
jmp loc_3AFB2
loc_3B038:
jmp short $+2
loc_3B03A:
add rsp, 90h
pop rbp
retn
|
long long ftxui::`anonymous namespace'::Border::Render(
ftxui::_anonymous_namespace_::Border *this,
ftxui::Screen *a2)
{
long long v2; // rax
long long v3; // rax
long long result; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rsi
long long v11; // rax
long long v12; // rsi
long long v13; // rax
long long v14; // rax
_DWORD *v15; // [rsp+0h] [rbp-90h]
_DWORD *v16; // [rsp+8h] [rbp-88h]
_DWORD *v17; // [rsp+10h] [rbp-80h]
_DWORD *v18; // [rsp+18h] [rbp-78h]
long long v19; // [rsp+20h] [rbp-70h]
long long v20; // [rsp+28h] [rbp-68h]
long long v21; // [rsp+30h] [rbp-60h]
long long v22; // [rsp+38h] [rbp-58h]
int m; // [rsp+48h] [rbp-48h]
int k; // [rsp+4Ch] [rbp-44h]
_BYTE *v25; // [rsp+50h] [rbp-40h]
_BYTE *v26; // [rsp+58h] [rbp-38h]
int j; // [rsp+64h] [rbp-2Ch]
_BYTE *v28; // [rsp+68h] [rbp-28h]
_BYTE *v29; // [rsp+70h] [rbp-20h]
int i; // [rsp+7Ch] [rbp-14h]
v2 = std::vector<std::shared_ptr<ftxui::Node>>::operator[]((char *)this + 8, 0LL);
v3 = std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v2);
(*(void ( **)(long long, ftxui::Screen *))(*(_QWORD *)v3 + 32LL))(v3, a2);
result = *((unsigned int *)this + 19);
if ( (int)result < *((_DWORD *)this + 20) )
{
result = *((unsigned int *)this + 21);
if ( (int)result < *((_DWORD *)this + 22) )
{
v19 = std::array<std::string,6ul>::operator[](*((_QWORD *)this + 12), 0LL);
v5 = ftxui::Screen::at[abi:cxx11](a2, *((unsigned int *)this + 19), *((unsigned int *)this + 21));
std::string::operator=(v5, v19);
v20 = std::array<std::string,6ul>::operator[](*((_QWORD *)this + 12), 1LL);
v6 = ftxui::Screen::at[abi:cxx11](a2, *((unsigned int *)this + 20), *((unsigned int *)this + 21));
std::string::operator=(v6, v20);
v21 = std::array<std::string,6ul>::operator[](*((_QWORD *)this + 12), 2LL);
v7 = ftxui::Screen::at[abi:cxx11](a2, *((unsigned int *)this + 19), *((unsigned int *)this + 22));
std::string::operator=(v7, v21);
v22 = std::array<std::string,6ul>::operator[](*((_QWORD *)this + 12), 3LL);
v8 = ftxui::Screen::at[abi:cxx11](a2, *((unsigned int *)this + 20), *((unsigned int *)this + 22));
std::string::operator=(v8, v22);
for ( i = *((_DWORD *)this + 19) + 1; i < *((_DWORD *)this + 20); ++i )
{
v29 = (_BYTE *)ftxui::Screen::PixelAt(a2, i, *((_DWORD *)this + 21));
v28 = (_BYTE *)ftxui::Screen::PixelAt(a2, i, *((_DWORD *)this + 22));
v9 = std::array<std::string,6ul>::operator[](*((_QWORD *)this + 12), 4LL);
std::string::operator=(v29 + 8, v9);
v10 = std::array<std::string,6ul>::operator[](*((_QWORD *)this + 12), 4LL);
std::string::operator=(v28 + 8, v10);
*v29 = *v29 & 0x7F | 0x80;
*v28 = *v28 & 0x7F | 0x80;
}
for ( j = *((_DWORD *)this + 21) + 1; j < *((_DWORD *)this + 22); ++j )
{
v26 = (_BYTE *)ftxui::Screen::PixelAt(a2, *((_DWORD *)this + 19), j);
v25 = (_BYTE *)ftxui::Screen::PixelAt(a2, *((_DWORD *)this + 20), j);
v11 = std::array<std::string,6ul>::operator[](*((_QWORD *)this + 12), 5LL);
std::string::operator=(v26 + 8, v11);
v12 = std::array<std::string,6ul>::operator[](*((_QWORD *)this + 12), 5LL);
std::string::operator=(v25 + 8, v12);
*v26 = *v26 & 0x7F | 0x80;
*v25 = *v25 & 0x7F | 0x80;
}
if ( std::vector<std::shared_ptr<ftxui::Node>>::size((_QWORD *)this + 1) == 2 )
{
v13 = std::vector<std::shared_ptr<ftxui::Node>>::operator[]((char *)this + 8, 1LL);
v14 = std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v13);
(*(void ( **)(long long, ftxui::Screen *))(*(_QWORD *)v14 + 32LL))(v14, a2);
}
result = std::optional<ftxui::Color>::operator bool((char *)this + 104);
if ( (result & 1) != 0 )
{
for ( k = *((_DWORD *)this + 19); k <= *((_DWORD *)this + 20); ++k )
{
v17 = (_DWORD *)std::optional<ftxui::Color>::operator*((char *)this + 104);
*(_DWORD *)(ftxui::Screen::PixelAt(a2, k, *((_DWORD *)this + 21)) + 44) = *v17;
v18 = (_DWORD *)std::optional<ftxui::Color>::operator*((char *)this + 104);
*(_DWORD *)(ftxui::Screen::PixelAt(a2, k, *((_DWORD *)this + 22)) + 44) = *v18;
}
for ( m = *((_DWORD *)this + 21); ; ++m )
{
result = (unsigned int)m;
if ( m > *((_DWORD *)this + 22) )
break;
v15 = (_DWORD *)std::optional<ftxui::Color>::operator*((char *)this + 104);
*(_DWORD *)(ftxui::Screen::PixelAt(a2, *((_DWORD *)this + 19), m) + 44) = *v15;
v16 = (_DWORD *)std::optional<ftxui::Color>::operator*((char *)this + 104);
*(_DWORD *)(ftxui::Screen::PixelAt(a2, *((_DWORD *)this + 20), m) + 44) = *v16;
}
}
}
}
return result;
}
|
Render:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x50],RDI
ADD RDI,0x8
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013e6a0
MOV RDI,RAX
CALL 0x0013e6c0
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RCX + 0x4c]
CMP EAX,dword ptr [RCX + 0x50]
JGE 0x0013ac75
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RCX + 0x54]
CMP EAX,dword ptr [RCX + 0x58]
JL 0x0013ac7a
LAB_0013ac75:
JMP 0x0013b03a
LAB_0013ac7a:
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x60]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013e7c0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x70],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x4c]
MOV EDX,dword ptr [RAX + 0x54]
CALL 0x001882c0
MOV RSI,qword ptr [RBP + -0x70]
MOV RDI,RAX
CALL 0x0010d060
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x60]
MOV ESI,0x1
CALL 0x0013e7c0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x68],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x50]
MOV EDX,dword ptr [RAX + 0x54]
CALL 0x001882c0
MOV RSI,qword ptr [RBP + -0x68]
MOV RDI,RAX
CALL 0x0010d060
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x60]
MOV ESI,0x2
CALL 0x0013e7c0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x60],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x4c]
MOV EDX,dword ptr [RAX + 0x58]
CALL 0x001882c0
MOV RSI,qword ptr [RBP + -0x60]
MOV RDI,RAX
CALL 0x0010d060
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x60]
MOV ESI,0x3
CALL 0x0013e7c0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x58],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x50]
MOV EDX,dword ptr [RAX + 0x58]
CALL 0x001882c0
MOV RSI,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x0010d060
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x4c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
LAB_0013ad66:
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RCX + 0x50]
JGE 0x0013ae18
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RAX + 0x54]
CALL 0x001882f0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x20],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RAX + 0x58]
CALL 0x001882f0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x28],RCX
MOV RDI,qword ptr [RAX + 0x60]
MOV ESI,0x4
CALL 0x0013e7c0
MOV RSI,RAX
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x8
CALL 0x0010d060
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x60]
MOV ESI,0x4
CALL 0x0013e7c0
MOV RSI,RAX
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x8
CALL 0x0010d060
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX]
AND CL,0x7f
OR CL,0x80
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x28]
MOV CL,byte ptr [RAX]
AND CL,0x7f
OR CL,0x80
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0013ad66
LAB_0013ae18:
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x54]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
LAB_0013ae25:
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RCX + 0x58]
JGE 0x0013aed7
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x4c]
MOV EDX,dword ptr [RBP + -0x2c]
CALL 0x001882f0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x38],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x50]
MOV EDX,dword ptr [RBP + -0x2c]
CALL 0x001882f0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x40],RCX
MOV RDI,qword ptr [RAX + 0x60]
MOV ESI,0x5
CALL 0x0013e7c0
MOV RSI,RAX
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x8
CALL 0x0010d060
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x60]
MOV ESI,0x5
CALL 0x0013e7c0
MOV RSI,RAX
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x8
CALL 0x0010d060
MOV RAX,qword ptr [RBP + -0x38]
MOV CL,byte ptr [RAX]
AND CL,0x7f
OR CL,0x80
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x40]
MOV CL,byte ptr [RAX]
AND CL,0x7f
OR CL,0x80
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0013ae25
LAB_0013aed7:
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,0x8
CALL 0x00124980
CMP RAX,0x2
JNZ 0x0013af11
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,0x8
MOV ESI,0x1
CALL 0x0013e6a0
MOV RDI,RAX
CALL 0x0013e6c0
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x20]
LAB_0013af11:
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,0x68
CALL 0x0013e7f0
TEST AL,0x1
JNZ 0x0013af27
JMP 0x0013b03a
LAB_0013af27:
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x4c]
MOV dword ptr [RBP + -0x44],EAX
LAB_0013af31:
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x44]
CMP EAX,dword ptr [RCX + 0x50]
JG 0x0013afa8
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,0x68
CALL 0x0013e810
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x80],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x44]
MOV EDX,dword ptr [RAX + 0x54]
CALL 0x001882f0
MOV RCX,qword ptr [RBP + -0x80]
MOV RDI,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RAX + 0x2c],ECX
ADD RDI,0x68
CALL 0x0013e810
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x78],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x44]
MOV EDX,dword ptr [RAX + 0x58]
CALL 0x001882f0
MOV RCX,qword ptr [RBP + -0x78]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RAX + 0x2c],ECX
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
JMP 0x0013af31
LAB_0013afa8:
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x54]
MOV dword ptr [RBP + -0x48],EAX
LAB_0013afb2:
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x48]
CMP EAX,dword ptr [RCX + 0x58]
JG 0x0013b038
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,0x68
CALL 0x0013e810
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x90],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x4c]
MOV EDX,dword ptr [RBP + -0x48]
CALL 0x001882f0
MOV RCX,qword ptr [RBP + -0x90]
MOV RDI,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RAX + 0x2c],ECX
ADD RDI,0x68
CALL 0x0013e810
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x88],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x50]
MOV EDX,dword ptr [RBP + -0x48]
CALL 0x001882f0
MOV RCX,qword ptr [RBP + -0x88]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RAX + 0x2c],ECX
MOV EAX,dword ptr [RBP + -0x48]
ADD EAX,0x1
MOV dword ptr [RBP + -0x48],EAX
JMP 0x0013afb2
LAB_0013b038:
JMP 0x0013b03a
LAB_0013b03a:
ADD RSP,0x90
POP RBP
RET
|
/* ftxui::(anonymous namespace)::Border::Render(ftxui::Screen&) */
void __thiscall ftxui::(anonymous_namespace)::Border::Render(Border *this,Screen *param_1)
{
bool bVar1;
__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false> *p_Var2;
long *plVar3;
string *psVar4;
string *psVar5;
byte *pbVar6;
byte *pbVar7;
long lVar8;
int4 *puVar9;
int local_50;
int local_4c;
int local_34;
int local_1c;
p_Var2 = (__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false> *)
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::
operator[]((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>
*)(this + 8),0);
plVar3 = (long *)std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->(p_Var2);
(**(code **)(*plVar3 + 0x20))(plVar3,param_1);
if ((*(int *)(this + 0x4c) < *(int *)(this + 0x50)) &&
(*(int *)(this + 0x54) < *(int *)(this + 0x58))) {
psVar4 = (string *)
std::array<std::__cxx11::string,6ul>::operator[]
(*(array<std::__cxx11::string,6ul> **)(this + 0x60),0);
psVar5 = (string *)Screen::at_abi_cxx11_(param_1,*(int *)(this + 0x4c),*(int *)(this + 0x54));
std::__cxx11::string::operator=(psVar5,psVar4);
psVar4 = (string *)
std::array<std::__cxx11::string,6ul>::operator[]
(*(array<std::__cxx11::string,6ul> **)(this + 0x60),1);
psVar5 = (string *)Screen::at_abi_cxx11_(param_1,*(int *)(this + 0x50),*(int *)(this + 0x54));
std::__cxx11::string::operator=(psVar5,psVar4);
psVar4 = (string *)
std::array<std::__cxx11::string,6ul>::operator[]
(*(array<std::__cxx11::string,6ul> **)(this + 0x60),2);
psVar5 = (string *)Screen::at_abi_cxx11_(param_1,*(int *)(this + 0x4c),*(int *)(this + 0x58));
std::__cxx11::string::operator=(psVar5,psVar4);
psVar4 = (string *)
std::array<std::__cxx11::string,6ul>::operator[]
(*(array<std::__cxx11::string,6ul> **)(this + 0x60),3);
psVar5 = (string *)Screen::at_abi_cxx11_(param_1,*(int *)(this + 0x50),*(int *)(this + 0x58));
std::__cxx11::string::operator=(psVar5,psVar4);
local_1c = *(int *)(this + 0x4c);
while (local_1c = local_1c + 1, local_1c < *(int *)(this + 0x50)) {
pbVar6 = (byte *)Screen::PixelAt(param_1,local_1c,*(int *)(this + 0x54));
pbVar7 = (byte *)Screen::PixelAt(param_1,local_1c,*(int *)(this + 0x58));
psVar4 = (string *)
std::array<std::__cxx11::string,6ul>::operator[]
(*(array<std::__cxx11::string,6ul> **)(this + 0x60),4);
std::__cxx11::string::operator=((string *)(pbVar6 + 8),psVar4);
psVar4 = (string *)
std::array<std::__cxx11::string,6ul>::operator[]
(*(array<std::__cxx11::string,6ul> **)(this + 0x60),4);
std::__cxx11::string::operator=((string *)(pbVar7 + 8),psVar4);
*pbVar6 = *pbVar6 & 0x7f | 0x80;
*pbVar7 = *pbVar7 & 0x7f | 0x80;
}
local_34 = *(int *)(this + 0x54);
while (local_34 = local_34 + 1, local_34 < *(int *)(this + 0x58)) {
pbVar6 = (byte *)Screen::PixelAt(param_1,*(int *)(this + 0x4c),local_34);
pbVar7 = (byte *)Screen::PixelAt(param_1,*(int *)(this + 0x50),local_34);
psVar4 = (string *)
std::array<std::__cxx11::string,6ul>::operator[]
(*(array<std::__cxx11::string,6ul> **)(this + 0x60),5);
std::__cxx11::string::operator=((string *)(pbVar6 + 8),psVar4);
psVar4 = (string *)
std::array<std::__cxx11::string,6ul>::operator[]
(*(array<std::__cxx11::string,6ul> **)(this + 0x60),5);
std::__cxx11::string::operator=((string *)(pbVar7 + 8),psVar4);
*pbVar6 = *pbVar6 & 0x7f | 0x80;
*pbVar7 = *pbVar7 & 0x7f | 0x80;
}
lVar8 = std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::
size((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>
*)(this + 8));
if (lVar8 == 2) {
p_Var2 = (__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false> *)
std::
vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::
operator[]((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>
*)(this + 8),1);
plVar3 = (long *)std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>
::operator->(p_Var2);
(**(code **)(*plVar3 + 0x20))(plVar3,param_1);
}
bVar1 = std::optional::operator_cast_to_bool((optional *)(this + 0x68));
if (bVar1) {
for (local_4c = *(int *)(this + 0x4c); local_4c <= *(int *)(this + 0x50);
local_4c = local_4c + 1) {
puVar9 = (int4 *)
std::optional<ftxui::Color>::operator*((optional<ftxui::Color> *)(this + 0x68));
lVar8 = Screen::PixelAt(param_1,local_4c,*(int *)(this + 0x54));
*(int4 *)(lVar8 + 0x2c) = *puVar9;
puVar9 = (int4 *)
std::optional<ftxui::Color>::operator*((optional<ftxui::Color> *)(this + 0x68));
lVar8 = Screen::PixelAt(param_1,local_4c,*(int *)(this + 0x58));
*(int4 *)(lVar8 + 0x2c) = *puVar9;
}
for (local_50 = *(int *)(this + 0x54); local_50 <= *(int *)(this + 0x58);
local_50 = local_50 + 1) {
puVar9 = (int4 *)
std::optional<ftxui::Color>::operator*((optional<ftxui::Color> *)(this + 0x68));
lVar8 = Screen::PixelAt(param_1,*(int *)(this + 0x4c),local_50);
*(int4 *)(lVar8 + 0x2c) = *puVar9;
puVar9 = (int4 *)
std::optional<ftxui::Color>::operator*((optional<ftxui::Color> *)(this + 0x68));
lVar8 = Screen::PixelAt(param_1,*(int *)(this + 0x50),local_50);
*(int4 *)(lVar8 + 0x2c) = *puVar9;
}
}
}
return;
}
|
|
14,716
|
my_instr_bin
|
eloqsql/strings/ctype-bin.c
|
static
uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)),
const char *b, size_t b_length,
const char *s, size_t s_length,
my_match_t *match, uint nmatch)
{
register const uchar *str, *search, *end, *search_end;
if (s_length <= b_length)
{
if (!s_length)
{
if (nmatch)
{
match->beg= 0;
match->end= 0;
match->mb_len= 0;
}
return 1; /* Empty string is always found */
}
str= (const uchar*) b;
search= (const uchar*) s;
end= (const uchar*) b+b_length-s_length+1;
search_end= (const uchar*) s + s_length;
skip:
while (str != end)
{
if ( (*str++) == (*search))
{
register const uchar *i,*j;
i= str;
j= search+1;
while (j != search_end)
if ((*i++) != (*j++))
goto skip;
if (nmatch > 0)
{
match[0].beg= 0;
match[0].end= (uint) (str- (const uchar*)b-1);
match[0].mb_len= match[0].end;
if (nmatch > 1)
{
match[1].beg= match[0].end;
match[1].end= (uint)(match[0].end+s_length);
match[1].mb_len= match[1].end-match[1].beg;
}
}
return 2;
}
}
}
return 0;
}
|
O3
|
c
|
my_instr_bin:
xorl %eax, %eax
cmpq %rdx, %r8
ja 0x3378a
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movl 0x10(%rbp), %r10d
testq %r8, %r8
je 0x33755
addq %rsi, %rdx
subq %r8, %rdx
incq %rdx
movq %rsi, %rdi
cmpq %rdx, %rdi
je 0x33784
movq %rdi, %r11
incq %rdi
movb (%r11), %bl
cmpb (%rcx), %bl
jne 0x336ec
movl $0x1, %ebx
cmpq %rbx, %r8
je 0x3371f
movb (%r11,%rbx), %r14b
leaq 0x1(%rbx), %r15
cmpb (%rcx,%rbx), %r14b
movq %r15, %rbx
je 0x33707
jmp 0x336ec
movl $0x2, %eax
testl %r10d, %r10d
je 0x33784
movl $0x0, (%r9)
notl %esi
addl %esi, %edi
movl %edi, 0x4(%r9)
movl %edi, 0x8(%r9)
cmpl $0x1, %r10d
je 0x33784
movl %edi, 0xc(%r9)
addl %r8d, %edi
movl $0x14, %ecx
movl $0x10, %edx
jmp 0x33775
testl %r10d, %r10d
je 0x3377f
movl $0x0, (%r9)
movl $0x1, %eax
movl $0x8, %ecx
xorl %edi, %edi
movl $0x4, %edx
xorl %r8d, %r8d
movl %edi, (%r9,%rdx)
movl %r8d, (%r9,%rcx)
jmp 0x33784
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
my_instr_bin:
xor eax, eax
cmp r8, rdx
ja locret_3378A
push rbp
mov rbp, rsp
push r15
push r14
push rbx
mov r10d, [rbp+10h]
test r8, r8
jz short loc_33755
add rdx, rsi
sub rdx, r8
inc rdx
mov rdi, rsi
loc_336EC:
cmp rdi, rdx
jz loc_33784
mov r11, rdi
inc rdi
mov bl, [r11]
cmp bl, [rcx]
jnz short loc_336EC
mov ebx, 1
loc_33707:
cmp r8, rbx
jz short loc_3371F
mov r14b, [r11+rbx]
lea r15, [rbx+1]
cmp r14b, [rcx+rbx]
mov rbx, r15
jz short loc_33707
jmp short loc_336EC
loc_3371F:
mov eax, 2
test r10d, r10d
jz short loc_33784
mov dword ptr [r9], 0
not esi
add edi, esi
mov [r9+4], edi
mov [r9+8], edi
cmp r10d, 1
jz short loc_33784
mov [r9+0Ch], edi
add edi, r8d
mov ecx, 14h
mov edx, 10h
jmp short loc_33775
loc_33755:
test r10d, r10d
jz short loc_3377F
mov dword ptr [r9], 0
mov eax, 1
mov ecx, 8
xor edi, edi
mov edx, 4
xor r8d, r8d
loc_33775:
mov [r9+rdx], edi
mov [r9+rcx], r8d
jmp short loc_33784
loc_3377F:
mov eax, 1
loc_33784:
pop rbx
pop r14
pop r15
pop rbp
locret_3378A:
retn
|
long long my_instr_bin(
long long a1,
_BYTE *a2,
unsigned long long a3,
_BYTE *a4,
unsigned long long a5,
_DWORD *a6,
int a7)
{
long long result; // rax
long long v8; // rdx
_BYTE *v9; // rdi
_BYTE *v10; // r11
long long v11; // rbx
bool v12; // zf
int v13; // edi
int v14; // edi
long long v15; // rcx
long long v16; // rdx
result = 0LL;
if ( a5 <= a3 )
{
if ( a5 )
{
v8 = (long long)&a2[a3 - a5 + 1];
v9 = a2;
LABEL_4:
while ( v9 != (_BYTE *)v8 )
{
v10 = v9++;
if ( *v10 == *a4 )
{
v11 = 1LL;
while ( a5 != v11 )
{
v12 = v10[v11] == a4[v11];
++v11;
if ( !v12 )
goto LABEL_4;
}
result = 2LL;
if ( a7 )
{
*a6 = 0;
v13 = ~(_DWORD)a2 + (_DWORD)v9;
a6[1] = v13;
a6[2] = v13;
if ( a7 != 1 )
{
a6[3] = v13;
v14 = a5 + v13;
v15 = 5LL;
v16 = 4LL;
goto LABEL_15;
}
}
return result;
}
}
}
else if ( a7 )
{
*a6 = 0;
result = 1LL;
v15 = 2LL;
v14 = 0;
v16 = 1LL;
LODWORD(a5) = 0;
LABEL_15:
a6[v16] = v14;
a6[v15] = a5;
}
else
{
return 1LL;
}
}
return result;
}
|
my_instr_bin:
XOR EAX,EAX
CMP R8,RDX
JA 0x0013378a
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
MOV R10D,dword ptr [RBP + 0x10]
TEST R8,R8
JZ 0x00133755
ADD RDX,RSI
SUB RDX,R8
INC RDX
MOV RDI,RSI
LAB_001336ec:
CMP RDI,RDX
JZ 0x00133784
MOV R11,RDI
INC RDI
MOV BL,byte ptr [R11]
CMP BL,byte ptr [RCX]
JNZ 0x001336ec
MOV EBX,0x1
LAB_00133707:
CMP R8,RBX
JZ 0x0013371f
MOV R14B,byte ptr [R11 + RBX*0x1]
LEA R15,[RBX + 0x1]
CMP R14B,byte ptr [RCX + RBX*0x1]
MOV RBX,R15
JZ 0x00133707
JMP 0x001336ec
LAB_0013371f:
MOV EAX,0x2
TEST R10D,R10D
JZ 0x00133784
MOV dword ptr [R9],0x0
NOT ESI
ADD EDI,ESI
MOV dword ptr [R9 + 0x4],EDI
MOV dword ptr [R9 + 0x8],EDI
CMP R10D,0x1
JZ 0x00133784
MOV dword ptr [R9 + 0xc],EDI
ADD EDI,R8D
MOV ECX,0x14
MOV EDX,0x10
JMP 0x00133775
LAB_00133755:
TEST R10D,R10D
JZ 0x0013377f
MOV dword ptr [R9],0x0
MOV EAX,0x1
MOV ECX,0x8
XOR EDI,EDI
MOV EDX,0x4
XOR R8D,R8D
LAB_00133775:
MOV dword ptr [R9 + RDX*0x1],EDI
MOV dword ptr [R9 + RCX*0x1],R8D
JMP 0x00133784
LAB_0013377f:
MOV EAX,0x1
LAB_00133784:
POP RBX
POP R14
POP R15
POP RBP
LAB_0013378a:
RET
|
int8
my_instr_bin(int8 param_1,char *param_2,ulong param_3,char *param_4,ulong param_5,
int4 *param_6,int param_7)
{
char *pcVar1;
char *pcVar2;
int8 uVar3;
long lVar4;
long lVar5;
ulong uVar6;
int iVar7;
char *pcVar8;
char *pcVar9;
uVar3 = 0;
if (param_5 <= param_3) {
if (param_5 == 0) {
if (param_7 == 0) {
uVar3 = 1;
}
else {
*param_6 = 0;
uVar3 = 1;
lVar4 = 8;
iVar7 = 0;
lVar5 = 4;
param_5 = 0;
LAB_00133775:
*(int *)((long)param_6 + lVar5) = iVar7;
*(int *)((long)param_6 + lVar4) = (int)param_5;
}
}
else {
pcVar9 = param_2;
while (pcVar8 = pcVar9, pcVar8 != param_2 + (param_3 - param_5) + 1) {
pcVar9 = pcVar8 + 1;
if (*pcVar8 == *param_4) {
uVar6 = 1;
do {
if (param_5 == uVar6) {
uVar3 = 2;
if (param_7 == 0) {
return 2;
}
*param_6 = 0;
iVar7 = (int)pcVar9 + ~(uint)param_2;
param_6[1] = iVar7;
param_6[2] = iVar7;
if (param_7 == 1) {
return 2;
}
param_6[3] = iVar7;
iVar7 = iVar7 + (int)param_5;
lVar4 = 0x14;
lVar5 = 0x10;
goto LAB_00133775;
}
pcVar1 = pcVar8 + uVar6;
pcVar2 = param_4 + uVar6;
uVar6 = uVar6 + 1;
} while (*pcVar1 == *pcVar2);
}
}
}
}
return uVar3;
}
|
|
14,717
|
thr_timer_settime
|
eloqsql/mysys/thr_timer.c
|
my_bool thr_timer_settime(thr_timer_t *timer_data, ulonglong micro_seconds)
{
int reschedule;
DBUG_ENTER("thr_timer_settime");
DBUG_PRINT("enter",("thread: %s micro_seconds: %llu",my_thread_name(),
micro_seconds));
DBUG_ASSERT(timer_data->expired == 1);
set_timespec_nsec(timer_data->expire_time, micro_seconds*1000);
timer_data->expired= 0;
mysql_mutex_lock(&LOCK_timer); /* Lock from threads & timers */
if (queue_insert_safe(&timer_queue,(uchar*) timer_data))
{
DBUG_PRINT("info", ("timer queue full"));
fprintf(stderr,"Warning: thr_timer queue is full\n");
timer_data->expired= 1;
mysql_mutex_unlock(&LOCK_timer);
DBUG_RETURN(1);
}
/* Reschedule timer if the current one has more time left than new one */
reschedule= cmp_timespec(next_timer_expire_time, timer_data->expire_time);
mysql_mutex_unlock(&LOCK_timer);
if (reschedule > 0)
{
#if defined(MAIN)
printf("reschedule\n"); fflush(stdout);
#endif
DBUG_PRINT("info", ("reschedule"));
mysql_cond_signal(&COND_timer);
}
DBUG_RETURN(0);
}
|
O0
|
c
|
thr_timer_settime:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
jmp 0x24ed2
jmp 0x24ed4
jmp 0x24ed6
jmp 0x24ed8
callq 0x25a70
movq %rax, -0x30(%rbp)
imulq $0x3e8, -0x30(%rbp), %rax # imm = 0x3E8
imulq $0x3e8, -0x18(%rbp), %rcx # imm = 0x3E8
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq -0x10(%rbp), %rax
movq %rdx, 0x8(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x18(%rax)
leaq 0x360823(%rip), %rdi # 0x385758
leaq 0x54164(%rip), %rsi # 0x790a0
movl $0xb9, %edx
callq 0x24d20
movq -0x10(%rbp), %rsi
leaq 0x3607d7(%rip), %rdi # 0x385728
callq 0x27af0
cmpl $0x0, %eax
je 0x24f94
jmp 0x24f5d
jmp 0x24f5f
movq 0x1a9072(%rip), %rax # 0x1cdfd8
movq (%rax), %rdi
leaq 0x5416b(%rip), %rsi # 0x790db
movb $0x0, %al
callq 0x24400
movq -0x10(%rbp), %rax
movb $0x1, 0x18(%rax)
leaq 0x3607d2(%rip), %rdi # 0x385758
callq 0x24df0
movb $0x1, -0x1(%rbp)
jmp 0x25070
movq 0x36086d(%rip), %rax # 0x385808
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jg 0x24fc5
movq 0x36085d(%rip), %rax # 0x385808
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x24fcf
movq 0x360855(%rip), %rax # 0x385810
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jle 0x24fcf
movl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x25027
movq 0x360832(%rip), %rcx # 0x385808
movq -0x10(%rbp), %rdx
movb $0x1, %al
cmpq (%rdx), %rcx
movb %al, -0x35(%rbp)
jl 0x25014
movq 0x36081d(%rip), %rcx # 0x385808
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0x36(%rbp)
jne 0x2500e
movq 0x360810(%rip), %rax # 0x385810
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
setl %al
movb %al, -0x36(%rbp)
movb -0x36(%rbp), %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x1c(%rbp)
leaq 0x360724(%rip), %rdi # 0x385758
callq 0x24df0
cmpl $0x0, -0x1c(%rbp)
jle 0x2506a
leaq 0x540b7(%rip), %rdi # 0x790fd
movb $0x0, %al
callq 0x24050
movq 0x1a8f64(%rip), %rax # 0x1cdfb8
movq (%rax), %rdi
callq 0x24320
jmp 0x2505e
leaq 0x36073b(%rip), %rdi # 0x3857a0
callq 0x24d90
jmp 0x2506c
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
thr_timer_settime:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
jmp short $+2
loc_24ED2:
jmp short $+2
loc_24ED4:
jmp short $+2
loc_24ED6:
jmp short $+2
loc_24ED8:
call my_hrtime
mov [rbp+var_30], rax
imul rax, [rbp+var_30], 3E8h
imul rcx, [rbp+var_18], 3E8h
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_28]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov rax, [rbp+var_10]
mov [rax+8], rdx
mov rax, [rbp+var_10]
mov byte ptr [rax+18h], 0
lea rdi, LOCK_timer
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0B9h
call inline_mysql_mutex_lock
mov rsi, [rbp+var_10]
lea rdi, timer_queue
call queue_insert_safe
cmp eax, 0
jz short loc_24F94
jmp short $+2
loc_24F5D:
jmp short $+2
loc_24F5F:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aWarningThrTime; "Warning: thr_timer queue is full\n"
mov al, 0
call _fprintf
mov rax, [rbp+var_10]
mov byte ptr [rax+18h], 1
lea rdi, LOCK_timer
call inline_mysql_mutex_unlock
mov [rbp+var_1], 1
jmp loc_25070
loc_24F94:
mov rax, cs:next_timer_expire_time
mov rcx, [rbp+var_10]
cmp rax, [rcx]
jg short loc_24FC5
mov rax, cs:next_timer_expire_time
mov rcx, [rbp+var_10]
cmp rax, [rcx]
jnz short loc_24FCF
mov rax, cs:qword_385810
mov rcx, [rbp+var_10]
cmp rax, [rcx+8]
jle short loc_24FCF
loc_24FC5:
mov eax, 1
mov [rbp+var_34], eax
jmp short loc_25027
loc_24FCF:
mov rcx, cs:next_timer_expire_time
mov rdx, [rbp+var_10]
mov al, 1
cmp rcx, [rdx]
mov [rbp+var_35], al
jl short loc_25014
mov rcx, cs:next_timer_expire_time
mov rdx, [rbp+var_10]
xor eax, eax
cmp rcx, [rdx]
mov [rbp+var_36], al
jnz short loc_2500E
mov rax, cs:qword_385810
mov rcx, [rbp+var_10]
cmp rax, [rcx+8]
setl al
mov [rbp+var_36], al
loc_2500E:
mov al, [rbp+var_36]
mov [rbp+var_35], al
loc_25014:
mov dl, [rbp+var_35]
xor eax, eax
mov ecx, 0FFFFFFFFh
test dl, 1
cmovnz eax, ecx
mov [rbp+var_34], eax
loc_25027:
mov eax, [rbp+var_34]
mov [rbp+var_1C], eax
lea rdi, LOCK_timer
call inline_mysql_mutex_unlock
cmp [rbp+var_1C], 0
jle short loc_2506A
lea rdi, aReschedule; "reschedule\n"
mov al, 0
call _printf
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
jmp short $+2
loc_2505E:
lea rdi, COND_timer
call inline_mysql_cond_signal
loc_2506A:
jmp short $+2
loc_2506C:
mov [rbp+var_1], 0
loc_25070:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
|
char thr_timer_settime(long long a1, long long a2)
{
int v2; // eax
bool v4; // [rsp+Ah] [rbp-36h]
char v5; // [rsp+Bh] [rbp-35h]
int v6; // [rsp+Ch] [rbp-34h]
unsigned long long v7; // [rsp+18h] [rbp-28h]
v7 = 1000 * a2 + 1000 * my_hrtime();
*(_QWORD *)a1 = v7 / 0x3B9ACA00;
*(_QWORD *)(a1 + 8) = v7 % 0x3B9ACA00;
*(_BYTE *)(a1 + 24) = 0;
inline_mysql_mutex_lock(
(long long)&LOCK_timer,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_timer.c",
0xB9u);
if ( (unsigned int)queue_insert_safe(&timer_queue, a1) )
{
fprintf(stderr, "Warning: thr_timer queue is full\n");
*(_BYTE *)(a1 + 24) = 1;
inline_mysql_mutex_unlock((long long)&LOCK_timer);
return 1;
}
else
{
if ( next_timer_expire_time > *(_QWORD *)a1
|| next_timer_expire_time == *(_QWORD *)a1 && qword_385810 > *(_QWORD *)(a1 + 8) )
{
v6 = 1;
}
else
{
v5 = 1;
if ( next_timer_expire_time >= *(_QWORD *)a1 )
{
v4 = 0;
if ( next_timer_expire_time == *(_QWORD *)a1 )
v4 = qword_385810 < *(_QWORD *)(a1 + 8);
v5 = v4;
}
v2 = 0;
if ( (v5 & 1) != 0 )
v2 = -1;
v6 = v2;
}
inline_mysql_mutex_unlock((long long)&LOCK_timer);
if ( v6 > 0 )
{
printf("reschedule\n");
fflush(stdout);
inline_mysql_cond_signal((long long)&COND_timer);
}
return 0;
}
}
|
thr_timer_settime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
JMP 0x00124ed2
LAB_00124ed2:
JMP 0x00124ed4
LAB_00124ed4:
JMP 0x00124ed6
LAB_00124ed6:
JMP 0x00124ed8
LAB_00124ed8:
CALL 0x00125a70
MOV qword ptr [RBP + -0x30],RAX
IMUL RAX,qword ptr [RBP + -0x30],0x3e8
IMUL RCX,qword ptr [RBP + -0x18],0x3e8
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x18],0x0
LEA RDI,[0x485758]
LEA RSI,[0x1790a0]
MOV EDX,0xb9
CALL 0x00124d20
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[0x485728]
CALL 0x00127af0
CMP EAX,0x0
JZ 0x00124f94
JMP 0x00124f5d
LAB_00124f5d:
JMP 0x00124f5f
LAB_00124f5f:
MOV RAX,qword ptr [0x002cdfd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1790db]
MOV AL,0x0
CALL 0x00124400
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x18],0x1
LEA RDI,[0x485758]
CALL 0x00124df0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00125070
LAB_00124f94:
MOV RAX,qword ptr [0x00485808]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX]
JG 0x00124fc5
MOV RAX,qword ptr [0x00485808]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX]
JNZ 0x00124fcf
MOV RAX,qword ptr [0x00485810]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x8]
JLE 0x00124fcf
LAB_00124fc5:
MOV EAX,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x00125027
LAB_00124fcf:
MOV RCX,qword ptr [0x00485808]
MOV RDX,qword ptr [RBP + -0x10]
MOV AL,0x1
CMP RCX,qword ptr [RDX]
MOV byte ptr [RBP + -0x35],AL
JL 0x00125014
MOV RCX,qword ptr [0x00485808]
MOV RDX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RDX]
MOV byte ptr [RBP + -0x36],AL
JNZ 0x0012500e
MOV RAX,qword ptr [0x00485810]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x8]
SETL AL
MOV byte ptr [RBP + -0x36],AL
LAB_0012500e:
MOV AL,byte ptr [RBP + -0x36]
MOV byte ptr [RBP + -0x35],AL
LAB_00125014:
MOV DL,byte ptr [RBP + -0x35]
XOR EAX,EAX
MOV ECX,0xffffffff
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x34],EAX
LAB_00125027:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x1c],EAX
LEA RDI,[0x485758]
CALL 0x00124df0
CMP dword ptr [RBP + -0x1c],0x0
JLE 0x0012506a
LEA RDI,[0x1790fd]
MOV AL,0x0
CALL 0x00124050
MOV RAX,qword ptr [0x002cdfb8]
MOV RDI,qword ptr [RAX]
CALL 0x00124320
JMP 0x0012505e
LAB_0012505e:
LEA RDI,[0x4857a0]
CALL 0x00124d90
LAB_0012506a:
JMP 0x0012506c
LAB_0012506c:
MOV byte ptr [RBP + -0x1],0x0
LAB_00125070:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1 thr_timer_settime(ulong *param_1,long param_2)
{
bool bVar1;
int iVar2;
long lVar3;
ulong uVar4;
int local_3c;
int1 local_9;
lVar3 = my_hrtime();
uVar4 = lVar3 * 1000 + param_2 * 1000;
*param_1 = uVar4 / 1000000000;
param_1[1] = uVar4 % 1000000000;
*(int1 *)(param_1 + 3) = 0;
inline_mysql_mutex_lock
(LOCK_timer,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_timer.c",0xb9);
iVar2 = queue_insert_safe(&timer_queue,param_1);
if (iVar2 == 0) {
if (((long)*param_1 < (long)next_timer_expire_time) ||
((next_timer_expire_time == *param_1 && ((long)param_1[1] < DAT_00485810)))) {
local_3c = 1;
}
else {
bVar1 = true;
if (((long)*param_1 <= (long)next_timer_expire_time) &&
(bVar1 = false, next_timer_expire_time == *param_1)) {
bVar1 = DAT_00485810 < (long)param_1[1];
}
local_3c = 0;
if (bVar1) {
local_3c = -1;
}
}
inline_mysql_mutex_unlock(LOCK_timer);
if (0 < local_3c) {
printf("reschedule\n");
fflush(*(FILE **)PTR_stdout_002cdfb8);
inline_mysql_cond_signal(COND_timer);
}
local_9 = 0;
}
else {
fprintf(*(FILE **)PTR_stderr_002cdfd8,"Warning: thr_timer queue is full\n");
*(int1 *)(param_1 + 3) = 1;
inline_mysql_mutex_unlock(LOCK_timer);
local_9 = 1;
}
return local_9;
}
|
|
14,718
|
void google::protobuf::JoinStringsIterator<__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&, __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc
|
static void JoinStringsIterator(const ITERATOR &start, const ITERATOR &end,
const char *delim, std::string *result) {
GOOGLE_CHECK(result != nullptr);
result->clear();
int delim_length = strlen(delim);
// Precompute resulting length so we can reserve() memory in one shot.
int length = 0;
for (ITERATOR iter = start; iter != end; ++iter) {
if (iter != start) {
length += delim_length;
}
length += iter->size();
}
result->reserve(length);
// Now combine everything.
for (ITERATOR iter = start; iter != end; ++iter) {
if (iter != start) {
result->append(delim, delim_length);
}
result->append(iter->data(), iter->size());
}
}
|
O0
|
cpp
|
void google::protobuf::JoinStringsIterator<__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&, __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*):
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq %rcx, 0x88(%rsp)
movq 0x88(%rsp), %rax
movb $0x0, 0x4f(%rsp)
cmpq $0x0, %rax
je 0x21fe8c
jmp 0x21fedc
leaq 0x1dedc5(%rip), %rdx # 0x3fec58
leaq 0x50(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x3, %esi
movl $0x108, %ecx # imm = 0x108
callq 0x219560
movq 0x10(%rsp), %rdi
movb $0x1, 0x4f(%rsp)
leaq 0x1df2e0(%rip), %rsi # 0x3ff19d
callq 0x218e20
movq %rax, 0x18(%rsp)
jmp 0x21fec9
movq 0x18(%rsp), %rsi
leaq 0x3b(%rsp), %rdi
callq 0x218fd0
jmp 0x21feda
jmp 0x21fedc
testb $0x1, 0x4f(%rsp)
jne 0x21fee5
jmp 0x21feef
leaq 0x50(%rsp), %rdi
callq 0x2195a0
movq 0x88(%rsp), %rdi
callq 0x21600
movq 0x90(%rsp), %rdi
callq 0x21440
movl %eax, 0x34(%rsp)
movl $0x0, 0x30(%rsp)
movq 0xa0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x98(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x6f510
testb $0x1, %al
jne 0x21ff3d
jmp 0x21ffb9
movq 0xa0(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x6f510
testb $0x1, %al
jne 0x21ff55
jmp 0x21ff89
movl 0x34(%rsp), %eax
addl 0x30(%rsp), %eax
movl %eax, 0x30(%rsp)
jmp 0x21ff89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
testb $0x1, 0x4f(%rsp)
jne 0x21ff7a
jmp 0x21ff84
leaq 0x50(%rsp), %rdi
callq 0x2195a0
jmp 0x220085
leaq 0x28(%rsp), %rdi
callq 0x229670
movq %rax, %rdi
callq 0x21300
movq %rax, %rcx
movslq 0x30(%rsp), %rax
addq %rcx, %rax
movl %eax, 0x30(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x6f560
jmp 0x21ff25
movq 0x88(%rsp), %rdi
movslq 0x30(%rsp), %rsi
callq 0x21850
movq 0xa0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x98(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x6f510
testb $0x1, %al
jne 0x21fff6
jmp 0x22007d
movq 0xa0(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x6f510
testb $0x1, %al
jne 0x22000e
jmp 0x220028
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rsi
movslq 0x34(%rsp), %rdx
callq 0x21380
movq 0x88(%rsp), %rax
movq %rax, (%rsp)
leaq 0x20(%rsp), %rdi
callq 0x229670
movq %rax, %rdi
callq 0x21290
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x229670
movq %rax, %rdi
callq 0x21300
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0x21380
leaq 0x20(%rsp), %rdi
callq 0x6f560
jmp 0x21ffdb
addq $0xa8, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x21700
nop
|
_ZN6google8protobufL19JoinStringsIteratorIN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS9_SaIS9_EEEEEEvRKT_SI_PKcPS9_:
sub rsp, 0A8h
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov [rsp+0A8h+var_18], rdx
mov [rsp+0A8h+var_20], rcx
mov rax, [rsp+0A8h+var_20]
mov [rsp+0A8h+var_59], 0
cmp rax, 0
jz short loc_21FE8C
jmp short loc_21FEDC
loc_21FE8C:
lea rdx, aWorkspaceLlm4b_77; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+0A8h+var_58]
mov [rsp+0A8h+var_98], rdi
mov esi, 3
mov ecx, 108h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_59], 1
lea rsi, aCheckFailedRes; "CHECK failed: result != nullptr: "
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+0A8h+var_90], rax
jmp short $+2
loc_21FEC9:
mov rsi, [rsp+0A8h+var_90]
lea rdi, [rsp+0A8h+var_6D]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_21FEDA:
jmp short $+2
loc_21FEDC:
test [rsp+0A8h+var_59], 1
jnz short loc_21FEE5
jmp short loc_21FEEF
loc_21FEE5:
lea rdi, [rsp+0A8h+var_58]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_21FEEF:
mov rdi, [rsp+0A8h+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv; std::string::clear(void)
mov rdi, [rsp+0A8h+var_18]
call _strlen
mov [rsp+0A8h+var_74], eax
mov [rsp+0A8h+var_78], 0
mov rax, [rsp+0A8h+var_8]
mov rax, [rax]
mov [rsp+0A8h+var_80], rax
loc_21FF25:
mov rsi, [rsp+0A8h+var_10]
lea rdi, [rsp+0A8h+var_80]
call _ZN9__gnu_cxxneIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_; __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&)
test al, 1
jnz short loc_21FF3D
jmp short loc_21FFB9
loc_21FF3D:
mov rsi, [rsp+0A8h+var_8]
lea rdi, [rsp+0A8h+var_80]
call _ZN9__gnu_cxxneIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_; __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&)
test al, 1
jnz short loc_21FF55
jmp short loc_21FF89
loc_21FF55:
mov eax, [rsp+0A8h+var_74]
add eax, [rsp+0A8h+var_78]
mov [rsp+0A8h+var_78], eax
jmp short loc_21FF89
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
test [rsp+arg_47], 1
jnz short loc_21FF7A
jmp short loc_21FF84
loc_21FF7A:
lea rdi, [rsp+arg_48]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_21FF84:
jmp loc_220085
loc_21FF89:
lea rdi, [rsp+0A8h+var_80]
call _ZNK9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEptEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator->(void)
mov rdi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
movsxd rax, [rsp+0A8h+var_78]
add rax, rcx
mov [rsp+0A8h+var_78], eax
lea rdi, [rsp+0A8h+var_80]
call _ZN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(void)
jmp loc_21FF25
loc_21FFB9:
mov rdi, [rsp+0A8h+var_20]
movsxd rsi, [rsp+0A8h+var_78]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rax, [rsp+0A8h+var_8]
mov rax, [rax]
mov [rsp+0A8h+var_88], rax
loc_21FFDB:
mov rsi, [rsp+0A8h+var_10]
lea rdi, [rsp+0A8h+var_88]
call _ZN9__gnu_cxxneIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_; __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&)
test al, 1
jnz short loc_21FFF6
jmp loc_22007D
loc_21FFF6:
mov rsi, [rsp+0A8h+var_8]
lea rdi, [rsp+0A8h+var_88]
call _ZN9__gnu_cxxneIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_; __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&)
test al, 1
jnz short loc_22000E
jmp short loc_220028
loc_22000E:
mov rdi, [rsp+0A8h+var_20]
mov rsi, [rsp+0A8h+var_18]
movsxd rdx, [rsp+0A8h+var_74]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong)
loc_220028:
mov rax, [rsp+0A8h+var_20]
mov [rsp+0A8h+var_A8], rax
lea rdi, [rsp+0A8h+var_88]
call _ZNK9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEptEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator->(void)
mov rdi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void)
mov [rsp+0A8h+var_A0], rax
lea rdi, [rsp+0A8h+var_88]
call _ZNK9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEptEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator->(void)
mov rdi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rsp+0A8h+var_A8]
mov rsi, [rsp+0A8h+var_A0]
mov rdx, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong)
lea rdi, [rsp+0A8h+var_88]
call _ZN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(void)
jmp loc_21FFDB
loc_22007D:
add rsp, 0A8h
retn
loc_220085:
mov rdi, [rsp+arg_38]
call __Unwind_Resume
|
bool google::protobuf::JoinStringsIterator<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(
long long *a1,
long long a2,
long long a3,
long long a4)
{
long long v4; // rax
int v5; // eax
bool result; // al
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // [rsp+0h] [rbp-A8h]
long long v11; // [rsp+8h] [rbp-A0h]
google::protobuf::internal::LogMessage *v12; // [rsp+18h] [rbp-90h]
long long j; // [rsp+20h] [rbp-88h] BYREF
long long i; // [rsp+28h] [rbp-80h] BYREF
int v15; // [rsp+30h] [rbp-78h]
int v16; // [rsp+34h] [rbp-74h]
_BYTE v17[20]; // [rsp+3Bh] [rbp-6Dh] BYREF
char v18; // [rsp+4Fh] [rbp-59h]
_BYTE v19[56]; // [rsp+50h] [rbp-58h] BYREF
long long v20; // [rsp+88h] [rbp-20h]
long long v21; // [rsp+90h] [rbp-18h]
long long v22; // [rsp+98h] [rbp-10h]
long long *v23; // [rsp+A0h] [rbp-8h]
v23 = a1;
v22 = a2;
v21 = a3;
v20 = a4;
v18 = 0;
if ( !a4 )
{
google::protobuf::internal::LogMessage::LogMessage(
(long long)v19,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc",
264);
v18 = 1;
v12 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
(long long)v19,
(long long)"CHECK failed: result != nullptr: ");
google::protobuf::internal::LogFinisher::operator=((long long)v17, v12);
}
if ( (v18 & 1) != 0 )
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v19);
std::string::clear(v20);
v16 = strlen(v21);
v15 = 0;
for ( i = *v23;
__gnu_cxx::operator!=<std::string const*,std::vector<std::string>>((long long)&i, v22);
__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(&i) )
{
if ( __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>((long long)&i, (long long)v23) )
v15 += v16;
v4 = __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator->(&i);
v5 = std::string::size(v4);
v15 += v5;
}
std::string::reserve(v20, v15);
for ( j = *v23; ; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(&j) )
{
result = __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>((long long)&j, v22);
if ( !result )
break;
if ( __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>((long long)&j, (long long)v23) )
std::string::append(v20, v21, v16);
v10 = v20;
v7 = __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator->(&j);
v11 = std::string::data(v7);
v8 = __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator->(&j);
v9 = std::string::size(v8);
std::string::append(v10, v11, v9);
}
return result;
}
|
operator():
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDI
MOV qword ptr [RSP],RDX
LEA RDI,[RSP + 0x10]
CALL 0x0021d7e0
MOV RDI,RAX
MOV RSI,qword ptr [RSP]
CALL 0x0021dfe0
AND AL,0x1
ADD RSP,0x18
RET
|
/* bool
__gnu_cxx::__ops::_Iter_less_iter::TEMPNAMEPLACEHOLDERVALUE(__gnu_cxx::__normal_iterator<google::protobuf::compiler::cpp::(anonymous
namespace)::FieldGroup*, std::vector<google::protobuf::compiler::cpp::(anonymous
namespace)::FieldGroup, std::allocator<google::protobuf::compiler::cpp::(anonymous
namespace)::FieldGroup> > >, google::protobuf::compiler::cpp::(anonymous namespace)::FieldGroup*)
const */
bool __thiscall
__gnu_cxx::__ops::_Iter_less_iter::operator()
(int8 param_1,int8 param_2,FieldGroup *param_3)
{
FieldGroup *this;
byte bVar1;
int8 local_8;
local_8 = param_2;
this = (FieldGroup *)
__normal_iterator<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup*,std::vector<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup,std::allocator<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup>>>
::operator*((__normal_iterator<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup*,std::vector<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup,std::allocator<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup>>>
*)&local_8);
bVar1 = google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup::operator<
(this,param_3);
return (bool)(bVar1 & 1);
}
|
|
14,719
|
Field::get_mm_leaf_int(RANGE_OPT_PARAM*, KEY_PART*, Item_bool_func const*, scalar_comparison_op, Item*, bool)
|
eloqsql/sql/opt_range.cc
|
SEL_ARG *Field::get_mm_leaf_int(RANGE_OPT_PARAM *prm, KEY_PART *key_part,
const Item_bool_func *cond,
scalar_comparison_op op, Item *value,
bool unsigned_field)
{
DBUG_ENTER("Field::get_mm_leaf_int");
if (!can_optimize_scalar_range(prm, key_part, cond, op, value))
DBUG_RETURN(0);
int err= value->save_in_field_no_warnings(this, 1);
if ((op != SCALAR_CMP_EQUAL && is_real_null()) || err < 0)
DBUG_RETURN(&null_element);
if (err > 0)
{
if (value->result_type() != INT_RESULT)
DBUG_RETURN(stored_field_make_mm_leaf_truncated(prm, op, value));
else
DBUG_RETURN(stored_field_make_mm_leaf_bounded_int(prm, key_part,
op, value,
unsigned_field));
}
if (value->result_type() != INT_RESULT)
DBUG_RETURN(stored_field_make_mm_leaf(prm, key_part, op, value));
DBUG_RETURN(stored_field_make_mm_leaf_exact(prm, key_part, op, value));
}
|
O0
|
cpp
|
Field::get_mm_leaf_int(RANGE_OPT_PARAM*, KEY_PART*, Item_bool_func const*, scalar_comparison_op, Item*, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb 0x10(%rbp), %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
andb $0x1, %al
movb %al, -0x39(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x48(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x38(%rbp), %r9
callq 0xa4cca0
testb $0x1, %al
jne 0xa4d8fc
jmp 0xa4d8ef
movq $0x0, -0x8(%rbp)
jmp 0xa4d9e5
movq -0x48(%rbp), %rsi
movq -0x38(%rbp), %rdi
movl $0x1, %edx
callq 0x8f6f50
movl %eax, -0x40(%rbp)
cmpl $0x1, -0x2c(%rbp)
je 0xa4d928
movq -0x48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x53afd0
testb $0x1, %al
jne 0xa4d92e
cmpl $0x0, -0x40(%rbp)
jge 0xa4d940
jmp 0xa4d930
leaq 0xba6281(%rip), %rax # 0x15f3bb8
movq %rax, -0x8(%rbp)
jmp 0xa4d9e5
cmpl $0x0, -0x40(%rbp)
jle 0xa4d999
movq -0x38(%rbp), %rdi
callq 0x4c24f0
cmpl $0x2, %eax
je 0xa4d970
jmp 0xa4d956
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x2c(%rbp), %edx
movq -0x38(%rbp), %rcx
callq 0xa4ce10
movq %rax, -0x8(%rbp)
jmp 0xa4d9e5
jmp 0xa4d972
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
movq -0x38(%rbp), %r8
movb -0x39(%rbp), %al
andb $0x1, %al
movzbl %al, %r9d
callq 0xa4d9f0
movq %rax, -0x8(%rbp)
jmp 0xa4d9e5
movq -0x38(%rbp), %rdi
callq 0x4c24f0
cmpl $0x2, %eax
je 0xa4d9c7
jmp 0xa4d9a9
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
movq -0x38(%rbp), %r8
callq 0xa4d020
movq %rax, -0x8(%rbp)
jmp 0xa4d9e5
jmp 0xa4d9c9
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
movq -0x38(%rbp), %r8
callq 0xa4dc50
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
|
_ZN5Field15get_mm_leaf_intEP15RANGE_OPT_PARAMP8KEY_PARTPK14Item_bool_func20scalar_comparison_opP4Itemb:
push rbp
mov rbp, rsp
sub rsp, 50h
mov al, [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_38], r9
and al, 1
mov [rbp+var_39], al
mov rdi, [rbp+var_10]
mov [rbp+var_48], rdi
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8d, [rbp+var_2C]
mov r9, [rbp+var_38]
call _ZNK5Field25can_optimize_scalar_rangeEPK15RANGE_OPT_PARAMPK8KEY_PARTPK14Item_bool_func20scalar_comparison_opPK4Item; Field::can_optimize_scalar_range(RANGE_OPT_PARAM const*,KEY_PART const*,Item_bool_func const*,scalar_comparison_op,Item const*)
test al, 1
jnz short loc_A4D8FC
jmp short $+2
loc_A4D8EF:
mov [rbp+var_8], 0
jmp loc_A4D9E5
loc_A4D8FC:
mov rsi, [rbp+var_48]; Field *
mov rdi, [rbp+var_38]; this
mov edx, 1; bool
call _ZN4Item25save_in_field_no_warningsEP5Fieldb; Item::save_in_field_no_warnings(Field *,bool)
mov [rbp+var_40], eax
cmp [rbp+var_2C], 1
jz short loc_A4D928
mov rdi, [rbp+var_48]; this
xor eax, eax
mov esi, eax; __int64
call _ZNK5Field12is_real_nullEx; Field::is_real_null(long long)
test al, 1
jnz short loc_A4D92E
loc_A4D928:
cmp [rbp+var_40], 0
jge short loc_A4D940
loc_A4D92E:
jmp short $+2
loc_A4D930:
lea rax, null_element_0
mov [rbp+var_8], rax
jmp loc_A4D9E5
loc_A4D940:
cmp [rbp+var_40], 0
jle short loc_A4D999
mov rdi, [rbp+var_38]; this
call _ZNK4Item11result_typeEv; Item::result_type(void)
cmp eax, 2
jz short loc_A4D970
jmp short $+2
loc_A4D956:
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_2C]
mov rcx, [rbp+var_38]
call _ZN5Field35stored_field_make_mm_leaf_truncatedEP15RANGE_OPT_PARAM20scalar_comparison_opP4Item; Field::stored_field_make_mm_leaf_truncated(RANGE_OPT_PARAM *,scalar_comparison_op,Item *)
mov [rbp+var_8], rax
jmp short loc_A4D9E5
loc_A4D970:
jmp short $+2
loc_A4D972:
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_2C]
mov r8, [rbp+var_38]
mov al, [rbp+var_39]
and al, 1
movzx r9d, al
call _ZN5Field37stored_field_make_mm_leaf_bounded_intEP15RANGE_OPT_PARAMP8KEY_PART20scalar_comparison_opP4Itemb; Field::stored_field_make_mm_leaf_bounded_int(RANGE_OPT_PARAM *,KEY_PART *,scalar_comparison_op,Item *,bool)
mov [rbp+var_8], rax
jmp short loc_A4D9E5
loc_A4D999:
mov rdi, [rbp+var_38]; this
call _ZNK4Item11result_typeEv; Item::result_type(void)
cmp eax, 2
jz short loc_A4D9C7
jmp short $+2
loc_A4D9A9:
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_2C]
mov r8, [rbp+var_38]
call _ZN5Field25stored_field_make_mm_leafEP15RANGE_OPT_PARAMP8KEY_PART20scalar_comparison_opP4Item; Field::stored_field_make_mm_leaf(RANGE_OPT_PARAM *,KEY_PART *,scalar_comparison_op,Item *)
mov [rbp+var_8], rax
jmp short loc_A4D9E5
loc_A4D9C7:
jmp short $+2
loc_A4D9C9:
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_2C]
mov r8, [rbp+var_38]
call _ZN5Field31stored_field_make_mm_leaf_exactEP15RANGE_OPT_PARAMP8KEY_PART20scalar_comparison_opP4Item; Field::stored_field_make_mm_leaf_exact(RANGE_OPT_PARAM *,KEY_PART *,scalar_comparison_op,Item *)
mov [rbp+var_8], rax
loc_A4D9E5:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
|
SEL_ARG_IMPOSSIBLE * Field::get_mm_leaf_int(
Field *a1,
long long a2,
unsigned __int16 *a3,
long long a4,
unsigned int a5,
Item *a6,
char a7)
{
int v8; // [rsp+10h] [rbp-40h]
if ( !Field::can_optimize_scalar_range((long long)a1, a2, a3, a4, a5, (long long)a6) )
return 0LL;
v8 = Item::save_in_field_no_warnings(a6, a1, 1);
if ( a5 != 1 && Field::is_real_null(a1, 0LL) || v8 < 0 )
return (SEL_ARG_IMPOSSIBLE *)&null_element_0;
if ( v8 <= 0 )
{
if ( (unsigned int)Item::result_type(a6) == 2 )
return (SEL_ARG_IMPOSSIBLE *)Field::stored_field_make_mm_leaf_exact(a1, a2, a3, a5, a6);
else
return (SEL_ARG_IMPOSSIBLE *)Field::stored_field_make_mm_leaf(a1, a2, (long long)a3, a5, a6);
}
else if ( (unsigned int)Item::result_type(a6) == 2 )
{
return (SEL_ARG_IMPOSSIBLE *)Field::stored_field_make_mm_leaf_bounded_int(a1, a2, a3, a5, a6, a7 & 1);
}
else
{
return Field::stored_field_make_mm_leaf_truncated(a1, a2, a5, a6);
}
}
|
Item_func_sign:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RDI
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0095ecc0
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x143f108]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RSP,0x20
POP RBP
RET
|
/* Item_func_sign::Item_func_sign(THD*, Item*) */
void __thiscall Item_func_sign::Item_func_sign(Item_func_sign *this,THD *param_1,Item *param_2)
{
Item_long_func::Item_long_func((Item_long_func *)this,param_1,param_2);
*(int ***)this = &PTR__Item_func_sign_0143f118;
return;
}
|
|
14,720
|
translog_check_sector_protection
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool
translog_check_sector_protection(uchar *page, TRANSLOG_FILE *file)
{
uint i, offset;
uchar *table= page + page_overhead[page[TRANSLOG_PAGE_FLAGS]] -
TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE;
uint8 current= table[0];
DBUG_ENTER("translog_check_sector_protection");
for (i= 1, offset= DISK_DRIVE_SECTOR_SIZE;
i < TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE;
i++, offset+= DISK_DRIVE_SECTOR_SIZE)
{
/*
TODO: add chunk counting for "suspecting" sectors (difference is
more than 1-2), if difference more then present chunks then it is
the problem.
*/
uint8 test= page[offset];
DBUG_PRINT("info", ("sector: #%u offset: %u current: %lx "
"read: 0x%x stored: 0x%x%x",
i, offset, (ulong) current,
(uint) uint2korr(page + offset), (uint) table[i],
(uint) table[i + 1]));
/*
3 is minimal possible record length. So we can have "distance"
between 2 sectors value more then DISK_DRIVE_SECTOR_SIZE / 3
only if it is old value, i.e. the sector was not written.
*/
if (((test < current) &&
((uint)(0xFFL - current + test) > DISK_DRIVE_SECTOR_SIZE / 3)) ||
((test >= current) &&
((uint)(test - current) > DISK_DRIVE_SECTOR_SIZE / 3)))
{
if (translog_recover_page_up_to_sector(page, offset))
DBUG_RETURN(1);
file->was_recovered= 1;
DBUG_RETURN(0);
}
/* Restore value on the page */
page[offset]= table[i];
current= test;
DBUG_PRINT("info", ("sector: #%u offset: %u current: %lx "
"read: 0x%x stored: 0x%x",
i, offset, (ulong) current,
(uint) page[offset], (uint) table[i]));
}
DBUG_RETURN(0);
}
|
O0
|
c
|
translog_check_sector_protection:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl 0x6(%rcx), %ecx
movl %ecx, %edx
leaq 0xc42ecb(%rip), %rcx # 0xc79b60
movl (%rcx,%rdx,4), %ecx
addq %rcx, %rax
addq $-0x10, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movb (%rax), %al
movb %al, -0x29(%rbp)
movl $0x1, -0x1c(%rbp)
movl $0x200, -0x20(%rbp) # imm = 0x200
cmpl $0x10, -0x1c(%rbp)
jae 0x36d78
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x2a(%rbp)
jmp 0x36cd3
movzbl -0x2a(%rbp), %eax
movzbl -0x29(%rbp), %ecx
cmpl %ecx, %eax
jge 0x36cfb
movzbl -0x29(%rbp), %eax
movl %eax, %ecx
movl $0xff, %eax
subq %rcx, %rax
movzbl -0x2a(%rbp), %ecx
addq %rcx, %rax
cmpl $0xaa, %eax
ja 0x36d18
movzbl -0x2a(%rbp), %eax
movzbl -0x29(%rbp), %ecx
cmpl %ecx, %eax
jl 0x36d41
movzbl -0x2a(%rbp), %eax
movzbl -0x29(%rbp), %ecx
subl %ecx, %eax
cmpl $0xaa, %eax
jbe 0x36d41
movq -0x10(%rbp), %rdi
movl -0x20(%rbp), %eax
movzwl %ax, %esi
callq 0x36d90
cmpb $0x0, %al
je 0x36d33
jmp 0x36d2d
movb $0x1, -0x1(%rbp)
jmp 0x36d7e
movq -0x18(%rbp), %rax
movb $0x1, 0x50(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x36d7e
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movb %dl, (%rax,%rcx)
movb -0x2a(%rbp), %al
movb %al, -0x29(%rbp)
jmp 0x36d5d
jmp 0x36d5f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
addl $0x200, %eax # imm = 0x200
movl %eax, -0x20(%rbp)
jmp 0x36cba
jmp 0x36d7a
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
translog_check_sector_protection:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+6]
mov edx, ecx
lea rcx, page_overhead
mov ecx, [rcx+rdx*4]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFF0h
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov al, [rax]
mov [rbp+var_29], al
mov [rbp+var_1C], 1
mov [rbp+var_20], 200h
loc_36CBA:
cmp [rbp+var_1C], 10h
jnb loc_36D78
mov rax, [rbp+var_10]
mov ecx, [rbp+var_20]
mov al, [rax+rcx]
mov [rbp+var_2A], al
jmp short $+2
loc_36CD3:
movzx eax, [rbp+var_2A]
movzx ecx, [rbp+var_29]
cmp eax, ecx
jge short loc_36CFB
movzx eax, [rbp+var_29]
mov ecx, eax
mov eax, 0FFh
sub rax, rcx
movzx ecx, [rbp+var_2A]
add rax, rcx
cmp eax, 0AAh
ja short loc_36D18
loc_36CFB:
movzx eax, [rbp+var_2A]
movzx ecx, [rbp+var_29]
cmp eax, ecx
jl short loc_36D41
movzx eax, [rbp+var_2A]
movzx ecx, [rbp+var_29]
sub eax, ecx
cmp eax, 0AAh
jbe short loc_36D41
loc_36D18:
mov rdi, [rbp+var_10]
mov eax, [rbp+var_20]
movzx esi, ax
call translog_recover_page_up_to_sector
cmp al, 0
jz short loc_36D33
jmp short $+2
loc_36D2D:
mov [rbp+var_1], 1
jmp short loc_36D7E
loc_36D33:
mov rax, [rbp+var_18]
mov byte ptr [rax+50h], 1
mov [rbp+var_1], 0
jmp short loc_36D7E
loc_36D41:
mov rax, [rbp+var_28]
mov ecx, [rbp+var_1C]
mov dl, [rax+rcx]
mov rax, [rbp+var_10]
mov ecx, [rbp+var_20]
mov [rax+rcx], dl
mov al, [rbp+var_2A]
mov [rbp+var_29], al
jmp short $+2
loc_36D5D:
jmp short $+2
loc_36D5F:
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
mov eax, [rbp+var_20]
add eax, 200h
mov [rbp+var_20], eax
jmp loc_36CBA
loc_36D78:
jmp short $+2
loc_36D7A:
mov [rbp+var_1], 0
loc_36D7E:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char translog_check_sector_protection(long long a1, long long a2)
{
unsigned __int8 v3; // [rsp+6h] [rbp-2Ah]
unsigned __int8 v4; // [rsp+7h] [rbp-29h]
unsigned __int8 *v5; // [rsp+8h] [rbp-28h]
unsigned int i; // [rsp+10h] [rbp-20h]
unsigned int v7; // [rsp+14h] [rbp-1Ch]
v5 = (unsigned __int8 *)((unsigned int)page_overhead[*(unsigned __int8 *)(a1 + 6)] + a1 - 16);
v4 = *v5;
v7 = 1;
for ( i = 512; ; i += 512 )
{
if ( v7 >= 0x10 )
return 0;
v3 = *(_BYTE *)(a1 + i);
if ( v3 < (int)v4 && v3 + 255 - (unsigned int)v4 > 0xAA )
break;
if ( v3 >= (int)v4 && v3 - (unsigned int)v4 > 0xAA )
break;
*(_BYTE *)(a1 + i) = v5[v7];
v4 = v3;
++v7;
}
if ( (unsigned __int8)translog_recover_page_up_to_sector(a1, (unsigned __int16)i) )
return 1;
*(_BYTE *)(a2 + 80) = 1;
return 0;
}
|
translog_check_sector_protection:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x6]
MOV EDX,ECX
LEA RCX,[0xd79b60]
MOV ECX,dword ptr [RCX + RDX*0x4]
ADD RAX,RCX
ADD RAX,-0x10
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x29],AL
MOV dword ptr [RBP + -0x1c],0x1
MOV dword ptr [RBP + -0x20],0x200
LAB_00136cba:
CMP dword ptr [RBP + -0x1c],0x10
JNC 0x00136d78
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x20]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x2a],AL
JMP 0x00136cd3
LAB_00136cd3:
MOVZX EAX,byte ptr [RBP + -0x2a]
MOVZX ECX,byte ptr [RBP + -0x29]
CMP EAX,ECX
JGE 0x00136cfb
MOVZX EAX,byte ptr [RBP + -0x29]
MOV ECX,EAX
MOV EAX,0xff
SUB RAX,RCX
MOVZX ECX,byte ptr [RBP + -0x2a]
ADD RAX,RCX
CMP EAX,0xaa
JA 0x00136d18
LAB_00136cfb:
MOVZX EAX,byte ptr [RBP + -0x2a]
MOVZX ECX,byte ptr [RBP + -0x29]
CMP EAX,ECX
JL 0x00136d41
MOVZX EAX,byte ptr [RBP + -0x2a]
MOVZX ECX,byte ptr [RBP + -0x29]
SUB EAX,ECX
CMP EAX,0xaa
JBE 0x00136d41
LAB_00136d18:
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x20]
MOVZX ESI,AX
CALL 0x00136d90
CMP AL,0x0
JZ 0x00136d33
JMP 0x00136d2d
LAB_00136d2d:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00136d7e
LAB_00136d33:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x50],0x1
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00136d7e
LAB_00136d41:
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x1c]
MOV DL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x20]
MOV byte ptr [RAX + RCX*0x1],DL
MOV AL,byte ptr [RBP + -0x2a]
MOV byte ptr [RBP + -0x29],AL
JMP 0x00136d5d
LAB_00136d5d:
JMP 0x00136d5f
LAB_00136d5f:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x200
MOV dword ptr [RBP + -0x20],EAX
JMP 0x00136cba
LAB_00136d78:
JMP 0x00136d7a
LAB_00136d7a:
MOV byte ptr [RBP + -0x1],0x0
LAB_00136d7e:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 translog_check_sector_protection(long param_1,long param_2)
{
byte bVar1;
char cVar2;
byte *pbVar3;
byte local_31;
uint local_28;
uint local_24;
pbVar3 = (byte *)(param_1 + (ulong)*(uint *)(page_overhead + (ulong)*(byte *)(param_1 + 6) * 4) +
-0x10);
local_24 = 1;
local_28 = 0x200;
local_31 = *pbVar3;
while( true ) {
if (0xf < local_24) {
return 0;
}
bVar1 = *(byte *)(param_1 + (ulong)local_28);
if (((bVar1 < local_31) && (0xaa < (0xff - (uint)local_31) + (uint)bVar1)) ||
((local_31 <= bVar1 && (0xaa < (uint)bVar1 - (uint)local_31)))) break;
*(byte *)(param_1 + (ulong)local_28) = pbVar3[local_24];
local_24 = local_24 + 1;
local_28 = local_28 + 0x200;
local_31 = bVar1;
}
cVar2 = translog_recover_page_up_to_sector(param_1,local_28 & 0xffff);
if (cVar2 != '\0') {
return 1;
}
*(int1 *)(param_2 + 0x50) = 1;
return 0;
}
|
|
14,721
|
allocate_blobs
|
eloqsql/storage/maria/ma_bitmap.c
|
static my_bool allocate_blobs(MARIA_HA *info, MARIA_ROW *row)
{
ulong *length, *end;
uint elements;
/*
Reserve size for:
head block
one extent
tail block
*/
elements= info->bitmap_blocks.elements;
for (length= row->blob_lengths, end= length + info->s->base.blobs;
length < end; length++)
{
if (*length && find_blob(info, *length))
return 1;
}
row->extents_count= (info->bitmap_blocks.elements - elements);
return 0;
}
|
O3
|
c
|
allocate_blobs:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl 0x2c8(%rdi), %edx
movq (%rdi), %rax
movl 0x3f0(%rax), %ecx
movl %edx, %eax
testq %rcx, %rcx
je 0x53694
movq %rdi, %r14
movl %edx, -0x2c(%rbp)
movq %rsi, -0x40(%rbp)
movq 0x60(%rsi), %r15
leaq (%r15,%rcx,8), %rax
movq %rax, -0x60(%rbp)
leaq 0x2c0(%rdi), %rax
movq %rax, -0x38(%rbp)
movl $0x3fff, %r13d # imm = 0x3FFF
movq (%r15), %rax
testq %rax, %rax
je 0x53678
movq (%r14), %r12
movl 0x7bc(%r12), %ecx
movl 0xc18(%r12), %edx
negl %edx
leal (%rcx,%rdx), %esi
addl $-0xc, %esi
xorl %edx, %edx
divq %rsi
movq %rdx, %rsi
leal (%rcx,%rcx,2), %ecx
shrl $0x2, %ecx
xorl %ebx, %ebx
cmpl %esi, %ecx
setbe %bl
movl $0x0, %ecx
cmovbel %ecx, %esi
movl 0x2c8(%r14), %ecx
movl %ecx, %edx
addq %rax, %rbx
je 0x53640
movq %rsi, -0x50(%rbp)
movq %rbx, %rax
shrq $0x7, %rax
movq %rcx, -0x58(%rbp)
leal (%rcx,%rax), %esi
addl $0x2, %esi
movq -0x38(%rbp), %rdi
callq 0x91b41
testb %al, %al
jne 0x536a0
movq %r15, -0x48(%rbp)
addq $0xa10, %r12 # imm = 0xA10
movl 0x2c8(%r14), %eax
leaq (%rax,%rax,2), %r15
shlq $0x3, %r15
addq 0x2c0(%r14), %r15
movl %ebx, %esi
cmpq %r13, %rbx
cmovaeq %r13, %rsi
movq %r12, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x54be7
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
andq %rcx, %rax
je 0x53619
subq %rax, %rbx
incl 0x2c8(%r14)
addq $0x18, %r15
jmp 0x53628
movq %r14, %rdi
movq %r12, %rsi
callq 0x54ba4
testb %al, %al
jne 0x536a0
testq %rbx, %rbx
jne 0x535e9
movl 0x2c8(%r14), %edx
movq -0x48(%rbp), %r15
movq -0x58(%rbp), %rcx
movq -0x50(%rbp), %rsi
testl %esi, %esi
je 0x53667
movq %rcx, %rbx
leal 0x1(%rdx), %eax
movl %eax, 0x2c8(%r14)
movq %r14, %rdi
callq 0x54eb4
testb %al, %al
jne 0x536a0
movl 0x2c8(%r14), %edx
movq %rbx, %rcx
movq -0x38(%rbp), %rax
movq (%rax), %rax
subl %ecx, %edx
leaq (%rcx,%rcx,2), %rcx
movl %edx, 0x10(%rax,%rcx,8)
addq $0x8, %r15
cmpq -0x60(%rbp), %r15
jb 0x5354c
movl 0x2c8(%r14), %eax
movq -0x40(%rbp), %rsi
movl -0x2c(%rbp), %edx
subl %edx, %eax
movl %eax, 0xac(%rsi)
xorl %eax, %eax
jmp 0x536a2
movb $0x1, %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
allocate_blobs:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov edx, [rdi+2C8h]
mov rax, [rdi]
mov ecx, [rax+3F0h]
mov eax, edx
test rcx, rcx
jz loc_53694
mov r14, rdi
mov [rbp+var_2C], edx
mov [rbp+var_40], rsi
mov r15, [rsi+60h]
lea rax, [r15+rcx*8]
mov [rbp+var_60], rax
lea rax, [rdi+2C0h]
mov [rbp+var_38], rax
mov r13d, 3FFFh
loc_5354C:
mov rax, [r15]
test rax, rax
jz loc_53678
mov r12, [r14]
mov ecx, [r12+7BCh]
mov edx, [r12+0C18h]
neg edx
lea esi, [rcx+rdx]
add esi, 0FFFFFFF4h
xor edx, edx
div rsi
mov rsi, rdx
lea ecx, [rcx+rcx*2]
shr ecx, 2
xor ebx, ebx
cmp ecx, esi
setbe bl
mov ecx, 0
cmovbe esi, ecx
mov ecx, [r14+2C8h]
mov edx, ecx
add rbx, rax
jz loc_53640
mov [rbp+var_50], rsi
mov rax, rbx
shr rax, 7
mov [rbp+var_58], rcx
lea esi, [rcx+rax]
add esi, 2
mov rdi, [rbp+var_38]
call allocate_dynamic
test al, al
jnz loc_536A0
mov [rbp+var_48], r15
add r12, 0A10h
mov eax, [r14+2C8h]
lea r15, [rax+rax*2]
shl r15, 3
add r15, [r14+2C0h]
loc_535E9:
mov esi, ebx
cmp rbx, r13
cmovnb rsi, r13
mov rdi, r12
mov rdx, r15
xor ecx, ecx
call allocate_full_pages
mov ecx, 0FFFFFFFFh
and rax, rcx
jz short loc_53619
sub rbx, rax
inc dword ptr [r14+2C8h]
add r15, 18h
jmp short loc_53628
loc_53619:
mov rdi, r14
mov rsi, r12
call move_to_next_bitmap
test al, al
jnz short loc_536A0
loc_53628:
test rbx, rbx
jnz short loc_535E9
mov edx, [r14+2C8h]
mov r15, [rbp+var_48]
mov rcx, [rbp+var_58]
mov rsi, [rbp+var_50]
loc_53640:
test esi, esi
jz short loc_53667
mov rbx, rcx
lea eax, [rdx+1]
mov [r14+2C8h], eax
mov rdi, r14
call find_tail
test al, al
jnz short loc_536A0
mov edx, [r14+2C8h]
mov rcx, rbx
loc_53667:
mov rax, [rbp+var_38]
mov rax, [rax]
sub edx, ecx
lea rcx, [rcx+rcx*2]
mov [rax+rcx*8+10h], edx
loc_53678:
add r15, 8
cmp r15, [rbp+var_60]
jb loc_5354C
mov eax, [r14+2C8h]
mov rsi, [rbp+var_40]
mov edx, [rbp+var_2C]
loc_53694:
sub eax, edx
mov [rsi+0ACh], eax
xor eax, eax
jmp short loc_536A2
loc_536A0:
mov al, 1
loc_536A2:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char allocate_blobs(long long *a1, long long a2)
{
int v2; // edx
int v3; // eax
_QWORD *v4; // r15
long long v5; // r12
int v6; // ecx
unsigned long long v7; // rax
unsigned long long v8; // rsi
_BOOL8 v9; // rbx
long long v10; // rcx
int v11; // edx
unsigned long long v12; // rbx
long long v13; // r12
long long v14; // r15
long long v15; // rsi
long long full_pages; // rax
long long v17; // rdx
long long v18; // r8
long long v19; // r9
long long v20; // rbx
_QWORD *v22; // [rsp+0h] [rbp-60h]
long long v23; // [rsp+8h] [rbp-58h]
int v24; // [rsp+10h] [rbp-50h]
_QWORD *v25; // [rsp+18h] [rbp-48h]
long long v26; // [rsp+20h] [rbp-40h]
_QWORD *v27; // [rsp+28h] [rbp-38h]
int v28; // [rsp+34h] [rbp-2Ch]
v2 = *((_DWORD *)a1 + 178);
v3 = v2;
if ( !*(_DWORD *)(*a1 + 1008) )
{
LABEL_22:
*(_DWORD *)(a2 + 172) = v3 - v2;
return 0;
}
v28 = *((_DWORD *)a1 + 178);
v26 = a2;
v4 = *(_QWORD **)(a2 + 96);
v22 = &v4[*(unsigned int *)(*a1 + 1008)];
v27 = a1 + 88;
while ( !*v4 )
{
LABEL_20:
if ( ++v4 >= v22 )
{
v3 = *((_DWORD *)a1 + 178);
a2 = v26;
v2 = v28;
goto LABEL_22;
}
}
v5 = *a1;
v6 = *(_DWORD *)(*a1 + 1980);
v7 = *v4 / (unsigned long long)(unsigned int)(v6 - *(_DWORD *)(*a1 + 3096) - 12);
v8 = *v4 % (unsigned long long)(unsigned int)(v6 - *(_DWORD *)(*a1 + 3096) - 12);
v9 = (unsigned int)(3 * v6) >> 2 <= (unsigned int)v8;
if ( (unsigned int)(3 * v6) >> 2 <= (unsigned int)v8 )
LODWORD(v8) = 0;
v10 = *((unsigned int *)a1 + 178);
v11 = *((_DWORD *)a1 + 178);
v12 = v7 + v9;
if ( v12 )
{
v24 = v8;
v23 = *((unsigned int *)a1 + 178);
if ( (unsigned __int8)allocate_dynamic(v27, (unsigned int)v10 + (unsigned int)(v12 >> 7) + 2) )
return 1;
v25 = v4;
v13 = v5 + 2576;
v14 = a1[88] + 24LL * *((unsigned int *)a1 + 178);
do
{
v15 = (unsigned int)v12;
if ( v12 >= 0x3FFF )
v15 = 0x3FFFLL;
full_pages = (unsigned int)allocate_full_pages(v13, v15, v14, 0LL);
if ( full_pages )
{
v12 -= full_pages;
++*((_DWORD *)a1 + 178);
v14 += 24LL;
}
else if ( (unsigned __int8)move_to_next_bitmap(a1, v13, v17, 0xFFFFFFFFLL, v18, v19) )
{
return 1;
}
}
while ( v12 );
v11 = *((_DWORD *)a1 + 178);
v4 = v25;
v10 = v23;
LODWORD(v8) = v24;
}
if ( !(_DWORD)v8 )
{
LABEL_19:
*(_DWORD *)(*v27 + 24 * v10 + 16) = v11 - v10;
goto LABEL_20;
}
v20 = v10;
*((_DWORD *)a1 + 178) = v11 + 1;
if ( !(unsigned __int8)find_tail(a1) )
{
v11 = *((_DWORD *)a1 + 178);
v10 = v20;
goto LABEL_19;
}
return 1;
}
|
allocate_blobs:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV EDX,dword ptr [RDI + 0x2c8]
MOV RAX,qword ptr [RDI]
MOV ECX,dword ptr [RAX + 0x3f0]
MOV EAX,EDX
TEST RCX,RCX
JZ 0x00153694
MOV R14,RDI
MOV dword ptr [RBP + -0x2c],EDX
MOV qword ptr [RBP + -0x40],RSI
MOV R15,qword ptr [RSI + 0x60]
LEA RAX,[R15 + RCX*0x8]
MOV qword ptr [RBP + -0x60],RAX
LEA RAX,[RDI + 0x2c0]
MOV qword ptr [RBP + -0x38],RAX
MOV R13D,0x3fff
LAB_0015354c:
MOV RAX,qword ptr [R15]
TEST RAX,RAX
JZ 0x00153678
MOV R12,qword ptr [R14]
MOV ECX,dword ptr [R12 + 0x7bc]
MOV EDX,dword ptr [R12 + 0xc18]
NEG EDX
LEA ESI,[RCX + RDX*0x1]
ADD ESI,-0xc
XOR EDX,EDX
DIV RSI
MOV RSI,RDX
LEA ECX,[RCX + RCX*0x2]
SHR ECX,0x2
XOR EBX,EBX
CMP ECX,ESI
SETBE BL
MOV ECX,0x0
CMOVBE ESI,ECX
MOV ECX,dword ptr [R14 + 0x2c8]
MOV EDX,ECX
ADD RBX,RAX
JZ 0x00153640
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,RBX
SHR RAX,0x7
MOV qword ptr [RBP + -0x58],RCX
LEA ESI,[RCX + RAX*0x1]
ADD ESI,0x2
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00191b41
TEST AL,AL
JNZ 0x001536a0
MOV qword ptr [RBP + -0x48],R15
ADD R12,0xa10
MOV EAX,dword ptr [R14 + 0x2c8]
LEA R15,[RAX + RAX*0x2]
SHL R15,0x3
ADD R15,qword ptr [R14 + 0x2c0]
LAB_001535e9:
MOV ESI,EBX
CMP RBX,R13
CMOVNC RSI,R13
MOV RDI,R12
MOV RDX,R15
XOR ECX,ECX
CALL 0x00154be7
MOV ECX,0xffffffff
AND RAX,RCX
JZ 0x00153619
SUB RBX,RAX
INC dword ptr [R14 + 0x2c8]
ADD R15,0x18
JMP 0x00153628
LAB_00153619:
MOV RDI,R14
MOV RSI,R12
CALL 0x00154ba4
TEST AL,AL
JNZ 0x001536a0
LAB_00153628:
TEST RBX,RBX
JNZ 0x001535e9
MOV EDX,dword ptr [R14 + 0x2c8]
MOV R15,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x50]
LAB_00153640:
TEST ESI,ESI
JZ 0x00153667
MOV RBX,RCX
LEA EAX,[RDX + 0x1]
MOV dword ptr [R14 + 0x2c8],EAX
MOV RDI,R14
CALL 0x00154eb4
TEST AL,AL
JNZ 0x001536a0
MOV EDX,dword ptr [R14 + 0x2c8]
MOV RCX,RBX
LAB_00153667:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
SUB EDX,ECX
LEA RCX,[RCX + RCX*0x2]
MOV dword ptr [RAX + RCX*0x8 + 0x10],EDX
LAB_00153678:
ADD R15,0x8
CMP R15,qword ptr [RBP + -0x60]
JC 0x0015354c
MOV EAX,dword ptr [R14 + 0x2c8]
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [RBP + -0x2c]
LAB_00153694:
SUB EAX,EDX
MOV dword ptr [RSI + 0xac],EAX
XOR EAX,EAX
JMP 0x001536a2
LAB_001536a0:
MOV AL,0x1
LAB_001536a2:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 allocate_blobs(long *param_1,long param_2)
{
ulong *puVar1;
long lVar2;
bool bVar3;
long lVar4;
char cVar5;
int iVar6;
uint uVar7;
uint uVar8;
ulong uVar9;
uint uVar10;
ulong uVar11;
ulong *puVar12;
long lVar13;
lVar4 = param_1[0x59];
iVar6 = (int)lVar4;
if ((ulong)*(uint *)(*param_1 + 0x3f0) != 0) {
puVar12 = *(ulong **)(param_2 + 0x60);
puVar1 = puVar12 + *(uint *)(*param_1 + 0x3f0);
do {
uVar9 = *puVar12;
if (uVar9 != 0) {
lVar2 = *param_1;
uVar10 = (*(int *)(lVar2 + 0x7bc) - *(int *)(lVar2 + 0xc18)) - 0xc;
uVar8 = (uint)(uVar9 % (ulong)uVar10);
uVar7 = (uint)(*(int *)(lVar2 + 0x7bc) * 3) >> 2;
bVar3 = uVar7 <= uVar8;
if (uVar7 <= uVar8) {
uVar8 = 0;
}
uVar7 = *(uint *)(param_1 + 0x59);
uVar9 = (ulong)bVar3 + uVar9 / uVar10;
uVar10 = uVar7;
if (uVar9 != 0) {
cVar5 = allocate_dynamic(param_1 + 0x58,uVar7 + (int)(uVar9 >> 7) + 2);
if (cVar5 != '\0') {
return 1;
}
lVar13 = (ulong)*(uint *)(param_1 + 0x59) * 0x18 + param_1[0x58];
do {
uVar11 = uVar9 & 0xffffffff;
if (0x3ffe < uVar9) {
uVar11 = 0x3fff;
}
uVar11 = allocate_full_pages(lVar2 + 0xa10,uVar11,lVar13,0);
if ((uVar11 & 0xffffffff) == 0) {
cVar5 = move_to_next_bitmap(param_1,lVar2 + 0xa10);
if (cVar5 != '\0') {
return 1;
}
}
else {
uVar9 = uVar9 - (uVar11 & 0xffffffff);
*(int *)(param_1 + 0x59) = (int)param_1[0x59] + 1;
lVar13 = lVar13 + 0x18;
}
} while (uVar9 != 0);
uVar10 = *(uint *)(param_1 + 0x59);
}
if (uVar8 != 0) {
*(uint *)(param_1 + 0x59) = uVar10 + 1;
cVar5 = find_tail(param_1);
if (cVar5 != '\0') {
return 1;
}
uVar10 = *(uint *)(param_1 + 0x59);
}
*(uint *)(param_1[0x58] + 0x10 + (ulong)uVar7 * 0x18) = uVar10 - uVar7;
}
puVar12 = puVar12 + 1;
} while (puVar12 < puVar1);
iVar6 = (int)param_1[0x59];
}
*(int *)(param_2 + 0xac) = iVar6 - (int)lVar4;
return 0;
}
|
|
14,722
|
MySQLPreparedStatement::ClearParameters()
|
SylCore-WoTLK/src/server/database/Database/MySQLPreparedStatement.cpp
|
void MySQLPreparedStatement::ClearParameters()
{
for (uint32 i=0; i < m_paramCount; ++i)
{
delete m_bind[i].length;
m_bind[i].length = nullptr;
delete[] (char*)m_bind[i].buffer;
m_bind[i].buffer = nullptr;
m_paramsSet[i] = false;
}
}
|
O3
|
cpp
|
MySQLPreparedStatement::ClearParameters():
cmpl $0x0, 0x10(%rdi)
je 0x73db4
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rax
xorl %r15d, %r15d
xorl %r14d, %r14d
movq (%rax,%r15), %rdi
movl $0x8, %esi
callq 0xd32e8
movq 0x40(%rbx), %rax
movq $0x0, (%rax,%r15)
movq 0x10(%rax,%r15), %rdi
testq %rdi, %rdi
je 0x73d7b
callq 0xd32d9
movq 0x40(%rbx), %rax
movq $0x0, 0x10(%rax,%r15)
movq 0x18(%rbx), %rdx
movq %r14, %rsi
movq $-0x2, %rdi
movl %r14d, %ecx
rolq %cl, %rdi
shrq $0x6, %rsi
andq %rdi, (%rdx,%rsi,8)
incq %r14
movl 0x10(%rbx), %ecx
addq $0x70, %r15
cmpq %rcx, %r14
jb 0x73d4e
popq %rbx
popq %r14
popq %r15
retq
nop
|
_ZN22MySQLPreparedStatement15ClearParametersEv:
cmp dword ptr [rdi+10h], 0
jz short locret_73DB4
push r15
push r14
push rbx
mov rbx, rdi
mov rax, [rdi+40h]
xor r15d, r15d
xor r14d, r14d
loc_73D4E:
mov rdi, [rax+r15]; void *
mov esi, 8; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
mov rax, [rbx+40h]
mov qword ptr [rax+r15], 0
mov rdi, [rax+r15+10h]; void *
test rdi, rdi
jz short loc_73D7B
call _ZdaPv; operator delete[](void *)
mov rax, [rbx+40h]
loc_73D7B:
mov qword ptr [rax+r15+10h], 0
mov rdx, [rbx+18h]
mov rsi, r14
mov rdi, 0FFFFFFFFFFFFFFFEh
mov ecx, r14d
rol rdi, cl
shr rsi, 6
and [rdx+rsi*8], rdi
inc r14
mov ecx, [rbx+10h]
add r15, 70h ; 'p'
cmp r14, rcx
jb short loc_73D4E
pop rbx
pop r14
pop r15
locret_73DB4:
retn
|
void MySQLPreparedStatement::ClearParameters(MySQLPreparedStatement *this)
{
long long v2; // rax
long long v3; // r15
unsigned long long v4; // r14
void *v5; // rdi
if ( *((_DWORD *)this + 4) )
{
v2 = *((_QWORD *)this + 8);
v3 = 0LL;
v4 = 0LL;
do
{
operator delete(*(void **)(v2 + v3), 8uLL);
v2 = *((_QWORD *)this + 8);
*(_QWORD *)(v2 + v3) = 0LL;
v5 = *(void **)(v2 + v3 + 16);
if ( v5 )
{
operator delete[](v5);
v2 = *((_QWORD *)this + 8);
}
*(_QWORD *)(v2 + v3 + 16) = 0LL;
*(_QWORD *)(*((_QWORD *)this + 3) + 8 * (v4 >> 6)) &= __ROL8__(-2LL, v4);
++v4;
v3 += 112LL;
}
while ( v4 < *((unsigned int *)this + 4) );
}
}
|
ClearParameters:
CMP dword ptr [RDI + 0x10],0x0
JZ 0x00173db4
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x40]
XOR R15D,R15D
XOR R14D,R14D
LAB_00173d4e:
MOV RDI,qword ptr [RAX + R15*0x1]
MOV ESI,0x8
CALL 0x001d32e8
MOV RAX,qword ptr [RBX + 0x40]
MOV qword ptr [RAX + R15*0x1],0x0
MOV RDI,qword ptr [RAX + R15*0x1 + 0x10]
TEST RDI,RDI
JZ 0x00173d7b
CALL 0x001d32d9
MOV RAX,qword ptr [RBX + 0x40]
LAB_00173d7b:
MOV qword ptr [RAX + R15*0x1 + 0x10],0x0
MOV RDX,qword ptr [RBX + 0x18]
MOV RSI,R14
MOV RDI,-0x2
MOV ECX,R14D
ROL RDI,CL
SHR RSI,0x6
AND qword ptr [RDX + RSI*0x8],RDI
INC R14
MOV ECX,dword ptr [RBX + 0x10]
ADD R15,0x70
CMP R14,RCX
JC 0x00173d4e
POP RBX
POP R14
POP R15
LAB_00173db4:
RET
|
/* MySQLPreparedStatement::ClearParameters() */
void __thiscall MySQLPreparedStatement::ClearParameters(MySQLPreparedStatement *this)
{
ulong *puVar1;
void *pvVar2;
byte bVar3;
long lVar4;
ulong uVar5;
long lVar6;
if (*(int *)(this + 0x10) != 0) {
lVar4 = *(long *)(this + 0x40);
lVar6 = 0;
uVar5 = 0;
do {
operator_delete(*(void **)(lVar4 + lVar6),8);
lVar4 = *(long *)(this + 0x40);
*(int8 *)(lVar4 + lVar6) = 0;
pvVar2 = *(void **)(lVar4 + 0x10 + lVar6);
if (pvVar2 != (void *)0x0) {
operator_delete__(pvVar2);
lVar4 = *(long *)(this + 0x40);
}
*(int8 *)(lVar4 + 0x10 + lVar6) = 0;
bVar3 = (byte)uVar5 & 0x3f;
puVar1 = (ulong *)(*(long *)(this + 0x18) + (uVar5 >> 6) * 8);
*puVar1 = *puVar1 & (-2L << bVar3 | 0xfffffffffffffffeU >> 0x40 - bVar3);
uVar5 = uVar5 + 1;
lVar6 = lVar6 + 0x70;
} while (uVar5 < *(uint *)(this + 0x10));
}
return;
}
|
|
14,723
|
js_load_module_rejected
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_load_module_rejected(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv, int magic, JSValue *func_data)
{
JSValueConst *resolving_funcs = (JSValueConst *)func_data;
JSValueConst error;
JSValue ret;
/* XXX: check if the test is necessary */
if (argc >= 1)
error = argv[0];
else
error = JS_UNDEFINED;
ret = JS_Call(ctx, resolving_funcs[1], JS_UNDEFINED,
1, &error);
JS_FreeValue(ctx, ret);
return JS_UNDEFINED;
}
|
O0
|
c
|
js_load_module_rejected:
subq $0xa8, %rsp
movq 0xb0(%rsp), %rax
movq %rsi, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq %rdi, 0x80(%rsp)
movl %ecx, 0x7c(%rsp)
movq %r8, 0x70(%rsp)
movl %r9d, 0x6c(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x60(%rsp)
cmpl $0x1, 0x7c(%rsp)
jl 0x72fd1
movq 0x70(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x50(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x58(%rsp)
jmp 0x72ff6
movl $0x0, 0x30(%rsp)
movq $0x3, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x80(%rsp), %rdi
movq 0x60(%rsp), %rax
movl $0x0, 0x10(%rsp)
movq $0x3, 0x18(%rsp)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %r8
movq %rsp, %rax
leaq 0x50(%rsp), %r9
movq %r9, (%rax)
movl $0x1, %r9d
callq 0x38d90
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movups 0x20(%rsp), %xmm0
movaps %xmm0, 0x40(%rsp)
movq 0x80(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x229d0
movl $0x0, 0x98(%rsp)
movq $0x3, 0xa0(%rsp)
movq 0x98(%rsp), %rax
movq 0xa0(%rsp), %rdx
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_load_module_rejected:
sub rsp, 0A8h
mov rax, [rsp+0A8h+arg_0]
mov [rsp+0A8h+var_20], rsi
mov [rsp+0A8h+var_18], rdx
mov [rsp+0A8h+var_28], rdi
mov [rsp+0A8h+var_2C], ecx
mov [rsp+0A8h+var_38], r8
mov [rsp+0A8h+var_3C], r9d
mov rax, [rsp+0A8h+arg_0]
mov [rsp+0A8h+var_48], rax
cmp [rsp+0A8h+var_2C], 1
jl short loc_72FD1
mov rax, [rsp+0A8h+var_38]
mov rcx, [rax]
mov [rsp+0A8h+var_58], rcx
mov rax, [rax+8]
mov [rsp+0A8h+var_50], rax
jmp short loc_72FF6
loc_72FD1:
mov dword ptr [rsp+0A8h+var_78], 0
mov [rsp+0A8h+var_70], 3
mov rax, [rsp+0A8h+var_78]
mov [rsp+0A8h+var_58], rax
mov rax, [rsp+0A8h+var_70]
mov [rsp+0A8h+var_50], rax
loc_72FF6:
mov rdi, [rsp+0A8h+var_28]
mov rax, [rsp+0A8h+var_48]
mov dword ptr [rsp+0A8h+var_98], 0
mov [rsp+0A8h+var_90], 3
mov rsi, [rax+10h]
mov rdx, [rax+18h]
mov rcx, [rsp+0A8h+var_98]
mov r8, [rsp+0A8h+var_90]
mov rax, rsp
lea r9, [rsp+0A8h+var_58]
mov [rax], r9
mov r9d, 1
call JS_Call
mov qword ptr [rsp+0A8h+var_88], rax
mov qword ptr [rsp+0A8h+var_88+8], rdx
movups xmm0, [rsp+0A8h+var_88]
movaps [rsp+0A8h+var_68], xmm0
mov rdi, [rsp+0A8h+var_28]
mov rsi, qword ptr [rsp+0A8h+var_68]
mov rdx, qword ptr [rsp+0A8h+var_68+8]
call JS_FreeValue
mov dword ptr [rsp+0A8h+var_10], 0
mov [rsp+0A8h+var_8], 3
mov rax, [rsp+0A8h+var_10]
mov rdx, [rsp+0A8h+var_8]
add rsp, 0A8h
retn
|
long long js_load_module_rejected(long long a1, long long a2, long long a3, int a4, long long *a5, int a6, long long a7)
{
long long v7; // rax
long long v8; // rdx
long long v10; // [rsp+30h] [rbp-78h]
long long v11; // [rsp+50h] [rbp-58h] BYREF
long long v12; // [rsp+58h] [rbp-50h]
long long v13; // [rsp+60h] [rbp-48h]
int v14; // [rsp+6Ch] [rbp-3Ch]
long long *v15; // [rsp+70h] [rbp-38h]
int v16; // [rsp+7Ch] [rbp-2Ch]
long long v17; // [rsp+80h] [rbp-28h]
long long v18; // [rsp+88h] [rbp-20h]
long long v19; // [rsp+90h] [rbp-18h]
long long v20; // [rsp+98h] [rbp-10h]
v18 = a2;
v19 = a3;
v17 = a1;
v16 = a4;
v15 = a5;
v14 = a6;
v13 = a7;
if ( a4 < 1 )
{
LODWORD(v10) = 0;
v11 = v10;
v12 = 3LL;
}
else
{
v11 = *v15;
v12 = v15[1];
}
v7 = JS_Call(v17, *(_QWORD *)(v13 + 16), *(_QWORD *)(v13 + 24), 0, 3, 1, (long long)&v11);
JS_FreeValue(v17, v7, v8);
LODWORD(v20) = 0;
return v20;
}
|
js_load_module_rejected:
SUB RSP,0xa8
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x88],RSI
MOV qword ptr [RSP + 0x90],RDX
MOV qword ptr [RSP + 0x80],RDI
MOV dword ptr [RSP + 0x7c],ECX
MOV qword ptr [RSP + 0x70],R8
MOV dword ptr [RSP + 0x6c],R9D
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x60],RAX
CMP dword ptr [RSP + 0x7c],0x1
JL 0x00172fd1
MOV RAX,qword ptr [RSP + 0x70]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0x50],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x58],RAX
JMP 0x00172ff6
LAB_00172fd1:
MOV dword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],0x3
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x58],RAX
LAB_00172ff6:
MOV RDI,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x60]
MOV dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x3
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV R8,qword ptr [RSP + 0x18]
MOV RAX,RSP
LEA R9,[RSP + 0x50]
MOV qword ptr [RAX],R9
MOV R9D,0x1
CALL 0x00138d90
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x001229d0
MOV dword ptr [RSP + 0x98],0x0
MOV qword ptr [RSP + 0xa0],0x3
MOV RAX,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
ADD RSP,0xa8
RET
|
int1 [16]
js_load_module_rejected
(int8 param_1,int8 param_2,int8 param_3,int param_4,long *param_5,
int4 param_6,long param_7)
{
int1 auVar1 [16];
uint uStack_94;
uint uStack_74;
long local_58;
long local_50;
long local_48;
int4 local_3c;
long *local_38;
int local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
uint uStack_c;
local_48 = param_7;
if (param_4 < 1) {
local_58 = (ulong)uStack_74 << 0x20;
local_50 = 3;
}
else {
local_58 = *param_5;
local_50 = param_5[1];
}
local_3c = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
auVar1 = JS_Call(param_1,*(int8 *)(param_7 + 0x10),*(int8 *)(param_7 + 0x18),
(ulong)uStack_94 << 0x20,3,1,&local_58);
JS_FreeValue(local_28,auVar1._0_8_,auVar1._8_8_);
auVar1._8_8_ = 3;
auVar1._0_8_ = (ulong)uStack_c << 0x20;
return auVar1;
}
|
|
14,724
|
js_load_module_rejected
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_load_module_rejected(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv, int magic, JSValue *func_data)
{
JSValueConst *resolving_funcs = (JSValueConst *)func_data;
JSValueConst error;
JSValue ret;
/* XXX: check if the test is necessary */
if (argc >= 1)
error = argv[0];
else
error = JS_UNDEFINED;
ret = JS_Call(ctx, resolving_funcs[1], JS_UNDEFINED,
1, &error);
JS_FreeValue(ctx, ret);
return JS_UNDEFINED;
}
|
O1
|
c
|
js_load_module_rejected:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq 0x50(%rsp), %rax
testl %ecx, %ecx
jle 0x432f2
movups (%r8), %xmm0
movaps %xmm0, 0x20(%rsp)
jmp 0x43303
movl $0x0, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movl $0x0, 0x30(%rsp)
movq $0x3, 0x38(%rsp)
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movl $0x3, %r8d
movq %rbx, %rdi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x278b6
movq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0x1ccb2
movl $0x3, %edx
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
retq
|
js_load_module_rejected:
push rbx
sub rsp, 40h
mov rbx, rdi
mov rax, [rsp+48h+arg_0]
test ecx, ecx
jle short loc_432F2
movups xmm0, xmmword ptr [r8]
movaps [rsp+48h+var_28], xmm0
jmp short loc_43303
loc_432F2:
mov dword ptr [rsp+48h+var_28], 0
mov qword ptr [rsp+48h+var_28+8], 3
loc_43303:
mov rsi, [rax+10h]
mov rdx, [rax+18h]
mov dword ptr [rsp+48h+var_18], 0
mov qword ptr [rsp+48h+var_18+8], 3
movups xmm0, [rsp+48h+var_18]
movups [rsp+48h+var_48], xmm0
lea rax, [rsp+48h+var_28]
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_30], 2
mov r8d, 3
mov rdi, rbx
xor ecx, ecx
mov r9d, 1
call JS_CallInternal
mov rdi, [rbx+18h]
mov rsi, rax
call JS_FreeValueRT
mov edx, 3
xor eax, eax
add rsp, 40h
pop rbx
retn
|
long long js_load_module_rejected(
long long a1,
double a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
int a12,
__int128 *a13,
long long a14,
long long a15)
{
long long v15; // rsi
long long v16; // rdx
_DWORD *v17; // rax
long long v18; // rdx
__int128 v20; // [rsp+20h] [rbp-28h] BYREF
__m128 v21; // [rsp+30h] [rbp-18h]
if ( a12 <= 0 )
{
LODWORD(v20) = 0;
*((_QWORD *)&v20 + 1) = 3LL;
}
else
{
v20 = *a13;
}
v15 = *(_QWORD *)(a15 + 16);
v16 = *(_QWORD *)(a15 + 24);
v21.m128_i32[0] = 0;
v21.m128_u64[1] = 3LL;
v17 = (_DWORD *)JS_CallInternal(a1, v15, v16, 0LL, 3LL, 1LL, v21, a3, a4, a5, a6, a7, a8, a9, 0, 3, (long long)&v20, 2u);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v17, v18);
return 0LL;
}
|
js_load_module_rejected:
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
MOV RAX,qword ptr [RSP + 0x50]
TEST ECX,ECX
JLE 0x001432f2
MOVUPS XMM0,xmmword ptr [R8]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
JMP 0x00143303
LAB_001432f2:
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x3
LAB_00143303:
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV dword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x30]
MOVUPS xmmword ptr [RSP],XMM0
LEA RAX,[RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0x2
MOV R8D,0x3
MOV RDI,RBX
XOR ECX,ECX
MOV R9D,0x1
CALL 0x001278b6
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,RAX
CALL 0x0011ccb2
MOV EDX,0x3
XOR EAX,EAX
ADD RSP,0x40
POP RBX
RET
|
int1 [16]
js_load_module_rejected
(long param_1,int8 param_2,int8 param_3,int param_4,ulong *param_5,
int8 param_6,long param_7)
{
int8 uVar1;
ulong local_28;
ulong uStack_20;
int4 local_18;
int8 uStack_10;
if (param_4 < 1) {
local_28 = local_28 & 0xffffffff00000000;
uStack_20 = 3;
}
else {
local_28 = *param_5;
uStack_20 = param_5[1];
}
local_18 = 0;
uStack_10 = 3;
uVar1 = JS_CallInternal(param_1,*(int8 *)(param_7 + 0x10),*(int8 *)(param_7 + 0x18),0,
3,1,0,3,&local_28,2);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar1);
return ZEXT816(3) << 0x40;
}
|
|
14,725
|
js_load_module_rejected
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_load_module_rejected(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv, int magic, JSValue *func_data)
{
JSValueConst *resolving_funcs = (JSValueConst *)func_data;
JSValueConst error;
JSValue ret;
/* XXX: check if the test is necessary */
if (argc >= 1)
error = argv[0];
else
error = JS_UNDEFINED;
ret = JS_Call(ctx, resolving_funcs[1], JS_UNDEFINED,
1, &error);
JS_FreeValue(ctx, ret);
return JS_UNDEFINED;
}
|
O2
|
c
|
js_load_module_rejected:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x40(%rsp), %rax
testl %ecx, %ecx
jle 0x3adcb
movups (%r8), %xmm0
movaps %xmm0, 0x10(%rsp)
jmp 0x3add9
andl $0x0, 0x10(%rsp)
movq $0x3, 0x18(%rsp)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
pushq $0x3
popq %r14
pushq $0x1
popq %r9
movq %rbx, %rdi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2133a
movq %rbx, %rdi
movq %rax, %rsi
callq 0x174a2
xorl %eax, %eax
movq %r14, %rdx
addq $0x28, %rsp
popq %rbx
popq %r14
retq
|
js_load_module_rejected:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
mov rax, [rsp+38h+arg_0]
test ecx, ecx
jle short loc_3ADCB
movups xmm0, xmmword ptr [r8]
movaps [rsp+38h+var_28], xmm0
jmp short loc_3ADD9
loc_3ADCB:
and dword ptr [rsp+38h+var_28], 0
mov qword ptr [rsp+38h+var_28+8], 3
loc_3ADD9:
mov rsi, [rax+10h]
mov rdx, [rax+18h]
lea rax, [rsp+38h+var_28]
mov [rsp+38h+var_38], rax
push 3
pop r14
push 1
pop r9
mov rdi, rbx
xor ecx, ecx
mov r8, r14
call JS_Call
mov rdi, rbx
mov rsi, rax
call JS_FreeValue
xor eax, eax
mov rdx, r14
add rsp, 28h
pop rbx
pop r14
retn
|
long long js_load_module_rejected(
long long a1,
long long a2,
long long a3,
int a4,
__int128 *a5,
long long a6,
long long a7)
{
long long v7; // rax
long long v8; // rdx
__int128 v10; // [rsp+10h] [rbp-28h] BYREF
if ( a4 <= 0 )
{
LODWORD(v10) = 0;
*((_QWORD *)&v10 + 1) = 3LL;
}
else
{
v10 = *a5;
}
v7 = JS_Call(a1, *(_QWORD *)(a7 + 16), *(_QWORD *)(a7 + 24), 0, 3, 1, (long long)&v10);
JS_FreeValue(a1, v7, v8);
return 0LL;
}
|
js_load_module_rejected:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV RAX,qword ptr [RSP + 0x40]
TEST ECX,ECX
JLE 0x0013adcb
MOVUPS XMM0,xmmword ptr [R8]
MOVAPS xmmword ptr [RSP + 0x10],XMM0
JMP 0x0013add9
LAB_0013adcb:
AND dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x3
LAB_0013add9:
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
PUSH 0x3
POP R14
PUSH 0x1
POP R9
MOV RDI,RBX
XOR ECX,ECX
MOV R8,R14
CALL 0x0012133a
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001174a2
XOR EAX,EAX
MOV RDX,R14
ADD RSP,0x28
POP RBX
POP R14
RET
|
int1 [16]
js_load_module_rejected
(int8 param_1,int8 param_2,int8 param_3,int param_4,int4 *param_5,
int8 param_6,long param_7)
{
int8 uVar1;
int4 local_28;
int4 uStack_24;
int8 uStack_20;
if (param_4 < 1) {
local_28 = 0;
uStack_20 = 3;
}
else {
local_28 = *param_5;
uStack_24 = param_5[1];
uStack_20 = *(int8 *)(param_5 + 2);
}
uVar1 = JS_Call(param_1,*(int8 *)(param_7 + 0x10),*(int8 *)(param_7 + 0x18),0,3,1,
&local_28);
JS_FreeValue(param_1,uVar1);
return ZEXT816(3) << 0x40;
}
|
|
14,726
|
js_load_module_rejected
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_load_module_rejected(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv, int magic, JSValue *func_data)
{
JSValueConst *resolving_funcs = (JSValueConst *)func_data;
JSValueConst error;
JSValue ret;
/* XXX: check if the test is necessary */
if (argc >= 1)
error = argv[0];
else
error = JS_UNDEFINED;
ret = JS_Call(ctx, resolving_funcs[1], JS_UNDEFINED,
1, &error);
JS_FreeValue(ctx, ret);
return JS_UNDEFINED;
}
|
O3
|
c
|
js_load_module_rejected:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq 0x50(%rsp), %rax
testl %ecx, %ecx
jle 0x44db1
movups (%r8), %xmm0
movaps %xmm0, 0x20(%rsp)
jmp 0x44dc2
movl $0x0, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movl $0x0, 0x30(%rsp)
movq $0x3, 0x38(%rsp)
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movl $0x3, %r8d
movq %rbx, %rdi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x27eca
cmpl $-0x9, %edx
jb 0x44e29
movq 0x18(%rbx), %rdi
movl (%rax), %ecx
leal -0x1(%rcx), %esi
movl %esi, (%rax)
cmpl $0x1, %ecx
jg 0x44e29
movq %rax, %rsi
callq 0x20d90
movl $0x3, %edx
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
retq
|
js_load_module_rejected:
push rbx
sub rsp, 40h
mov rbx, rdi
mov rax, [rsp+48h+arg_0]
test ecx, ecx
jle short loc_44DB1
movups xmm0, xmmword ptr [r8]
movaps [rsp+48h+var_28], xmm0
jmp short loc_44DC2
loc_44DB1:
mov dword ptr [rsp+48h+var_28], 0
mov qword ptr [rsp+48h+var_28+8], 3
loc_44DC2:
mov rsi, [rax+10h]
mov rdx, [rax+18h]
mov dword ptr [rsp+48h+var_18], 0
mov qword ptr [rsp+48h+var_18+8], 3
movups xmm0, [rsp+48h+var_18]
movups [rsp+48h+var_48], xmm0
lea rax, [rsp+48h+var_28]
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_30], 2
mov r8d, 3
mov rdi, rbx
xor ecx, ecx
mov r9d, 1
call JS_CallInternal
cmp edx, 0FFFFFFF7h
jb short loc_44E29
mov rdi, [rbx+18h]
mov ecx, [rax]
lea esi, [rcx-1]
mov [rax], esi
cmp ecx, 1
jg short loc_44E29
mov rsi, rax
call js_free_value_rt
loc_44E29:
mov edx, 3
xor eax, eax
add rsp, 40h
pop rbx
retn
|
long long js_load_module_rejected(
long long a1,
double a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
int a12,
__int128 *a13,
long long a14,
long long a15)
{
long long v15; // rsi
long long v16; // rdx
_QWORD *v17; // rax
long long v18; // rdx
long long v19; // r8
long long v20; // r9
long long v21; // rdi
long long v22; // rcx
__int128 v24; // [rsp+20h] [rbp-28h] BYREF
__m128i v25; // [rsp+30h] [rbp-18h]
if ( a12 <= 0 )
{
LODWORD(v24) = 0;
*((_QWORD *)&v24 + 1) = 3LL;
}
else
{
v24 = *a13;
}
v15 = *(_QWORD *)(a15 + 16);
v16 = *(_QWORD *)(a15 + 24);
v25.m128i_i32[0] = 0;
v25.m128i_i64[1] = 3LL;
v17 = (_QWORD *)JS_CallInternal(a1, v15, v16, 0LL, 3LL, 1LL, v25, a3, a4, a5, a6, a7, a8, a9, 0, 3, (long long)&v24, 2u);
if ( (unsigned int)v18 >= 0xFFFFFFF7 )
{
v21 = *(_QWORD *)(a1 + 24);
v22 = *(unsigned int *)v17;
*(_DWORD *)v17 = v22 - 1;
if ( (int)v22 <= 1 )
js_free_value_rt(v21, v17, v18, v22, v19, v20);
}
return 0LL;
}
|
js_load_module_rejected:
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
MOV RAX,qword ptr [RSP + 0x50]
TEST ECX,ECX
JLE 0x00144db1
MOVUPS XMM0,xmmword ptr [R8]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
JMP 0x00144dc2
LAB_00144db1:
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x3
LAB_00144dc2:
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV dword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x30]
MOVUPS xmmword ptr [RSP],XMM0
LEA RAX,[RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0x2
MOV R8D,0x3
MOV RDI,RBX
XOR ECX,ECX
MOV R9D,0x1
CALL 0x00127eca
CMP EDX,-0x9
JC 0x00144e29
MOV RDI,qword ptr [RBX + 0x18]
MOV ECX,dword ptr [RAX]
LEA ESI,[RCX + -0x1]
MOV dword ptr [RAX],ESI
CMP ECX,0x1
JG 0x00144e29
MOV RSI,RAX
CALL 0x00120d90
LAB_00144e29:
MOV EDX,0x3
XOR EAX,EAX
ADD RSP,0x40
POP RBX
RET
|
int1 [16]
js_load_module_rejected
(long param_1,int8 param_2,int8 param_3,int param_4,ulong *param_5,
int8 param_6,long param_7)
{
int iVar1;
int8 uVar2;
int *piVar3;
int1 auVar4 [12];
ulong local_28;
ulong uStack_20;
int4 local_18;
int8 uStack_10;
if (param_4 < 1) {
local_28 = local_28 & 0xffffffff00000000;
uStack_20 = 3;
}
else {
local_28 = *param_5;
uStack_20 = param_5[1];
}
local_18 = 0;
uStack_10 = 3;
auVar4 = JS_CallInternal(param_1,*(int8 *)(param_7 + 0x10),*(int8 *)(param_7 + 0x18),0
,3,1,0,3,&local_28,2);
piVar3 = auVar4._0_8_;
if (0xfffffff6 < auVar4._8_4_) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar3;
*piVar3 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2,piVar3);
}
}
return ZEXT816(3) << 0x40;
}
|
|
14,727
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int)
|
hkr04[P]cpp-mcp/common/json.hpp
|
inline char* format_buffer(char* buf, int len, int decimal_exponent,
int min_exp, int max_exp)
{
JSON_ASSERT(min_exp < 0);
JSON_ASSERT(max_exp > 0);
const int k = len;
const int n = len + decimal_exponent;
// v = buf * 10^(n-k)
// k is the length of the buffer (number of decimal digits)
// n is the position of the decimal point relative to the start of the buffer.
if (k <= n && n <= max_exp)
{
// digits[000]
// len <= max_exp + 2
std::memset(buf + k, '0', static_cast<size_t>(n) - static_cast<size_t>(k));
// Make it look like a floating-point number (#362, #378)
buf[n + 0] = '.';
buf[n + 1] = '0';
return buf + (static_cast<size_t>(n) + 2);
}
if (0 < n && n <= max_exp)
{
// dig.its
// len <= max_digits10 + 1
JSON_ASSERT(k > n);
std::memmove(buf + (static_cast<size_t>(n) + 1), buf + n, static_cast<size_t>(k) - static_cast<size_t>(n));
buf[n] = '.';
return buf + (static_cast<size_t>(k) + 1U);
}
if (min_exp < n && n <= 0)
{
// 0.[000]digits
// len <= 2 + (-min_exp - 1) + max_digits10
std::memmove(buf + (2 + static_cast<size_t>(-n)), buf, static_cast<size_t>(k));
buf[0] = '0';
buf[1] = '.';
std::memset(buf + 2, '0', static_cast<size_t>(-n));
return buf + (2U + static_cast<size_t>(-n) + static_cast<size_t>(k));
}
if (k == 1)
{
// dE+123
// len <= 1 + 5
buf += 1;
}
else
{
// d.igitsE+123
// len <= max_digits10 + 1 + 5
std::memmove(buf + 2, buf + 1, static_cast<size_t>(k) - 1);
buf[1] = '.';
buf += 1 + static_cast<size_t>(k);
}
*buf++ = 'e';
return append_exponent(buf, n - 1);
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movl %edx, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movl %r8d, 0x8(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x14(%rsp), %eax
addl 0x10(%rsp), %eax
movl %eax, (%rsp)
movl 0x4(%rsp), %eax
cmpl (%rsp), %eax
jg 0xd6670
movl (%rsp), %eax
cmpl 0x8(%rsp), %eax
jg 0xd6670
movq 0x18(%rsp), %rdi
movslq 0x4(%rsp), %rax
addq %rax, %rdi
movslq (%rsp), %rdx
movslq 0x4(%rsp), %rax
subq %rax, %rdx
movl $0x30, %esi
callq 0xc4a0
movq 0x18(%rsp), %rax
movl (%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movb $0x2e, (%rax,%rcx)
movq 0x18(%rsp), %rax
movl (%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x30, (%rax,%rcx)
movq 0x18(%rsp), %rax
movslq (%rsp), %rcx
addq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0xd67d1
xorl %eax, %eax
cmpl (%rsp), %eax
jge 0xd66d5
movl (%rsp), %eax
cmpl 0x8(%rsp), %eax
jg 0xd66d5
movq 0x18(%rsp), %rdi
movslq (%rsp), %rax
addq $0x1, %rax
addq %rax, %rdi
movq 0x18(%rsp), %rsi
movslq (%rsp), %rax
addq %rax, %rsi
movslq 0x4(%rsp), %rdx
movslq (%rsp), %rax
subq %rax, %rdx
callq 0xccc0
movq 0x18(%rsp), %rax
movslq (%rsp), %rcx
movb $0x2e, (%rax,%rcx)
movq 0x18(%rsp), %rax
movslq 0x4(%rsp), %rcx
addq $0x1, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0xd67d1
movl 0xc(%rsp), %eax
cmpl (%rsp), %eax
jge 0xd6755
cmpl $0x0, (%rsp)
jg 0xd6755
movq 0x18(%rsp), %rdi
xorl %eax, %eax
subl (%rsp), %eax
cltq
addq $0x2, %rax
addq %rax, %rdi
movq 0x18(%rsp), %rsi
movslq 0x4(%rsp), %rdx
callq 0xccc0
movq 0x18(%rsp), %rax
movb $0x30, (%rax)
movq 0x18(%rsp), %rax
movb $0x2e, 0x1(%rax)
movq 0x18(%rsp), %rdi
addq $0x2, %rdi
xorl %eax, %eax
subl (%rsp), %eax
movslq %eax, %rdx
movl $0x30, %esi
callq 0xc4a0
movq 0x18(%rsp), %rax
xorl %ecx, %ecx
subl (%rsp), %ecx
movslq %ecx, %rcx
addq $0x2, %rcx
movslq 0x4(%rsp), %rdx
addq %rdx, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0xd67d1
cmpl $0x1, 0x4(%rsp)
jne 0xd676c
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0xd67a8
movq 0x18(%rsp), %rdi
addq $0x2, %rdi
movq 0x18(%rsp), %rsi
addq $0x1, %rsi
movslq 0x4(%rsp), %rdx
subq $0x1, %rdx
callq 0xccc0
movq 0x18(%rsp), %rax
movb $0x2e, 0x1(%rax)
movslq 0x4(%rsp), %rax
addq $0x1, %rax
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rsp)
movb $0x65, (%rax)
movq 0x18(%rsp), %rdi
movl (%rsp), %esi
subl $0x1, %esi
callq 0xd7590
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl13format_bufferEPciiii:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_14], esi
mov [rsp+28h+var_18], edx
mov [rsp+28h+var_1C], ecx
mov [rsp+28h+var_20], r8d
mov eax, [rsp+28h+var_14]
mov [rsp+28h+var_24], eax
mov eax, [rsp+28h+var_14]
add eax, [rsp+28h+var_18]
mov [rsp+28h+var_28], eax
mov eax, [rsp+28h+var_24]
cmp eax, [rsp+28h+var_28]
jg short loc_D6670
mov eax, [rsp+28h+var_28]
cmp eax, [rsp+28h+var_20]
jg short loc_D6670
mov rdi, [rsp+28h+var_10]
movsxd rax, [rsp+28h+var_24]
add rdi, rax
movsxd rdx, [rsp+28h+var_28]
movsxd rax, [rsp+28h+var_24]
sub rdx, rax
mov esi, 30h ; '0'
call _memset
mov rax, [rsp+28h+var_10]
mov ecx, [rsp+28h+var_28]
add ecx, 0
movsxd rcx, ecx
mov byte ptr [rax+rcx], 2Eh ; '.'
mov rax, [rsp+28h+var_10]
mov ecx, [rsp+28h+var_28]
add ecx, 1
movsxd rcx, ecx
mov byte ptr [rax+rcx], 30h ; '0'
mov rax, [rsp+28h+var_10]
movsxd rcx, [rsp+28h+var_28]
add rcx, 2
add rax, rcx
mov [rsp+28h+var_8], rax
jmp loc_D67D1
loc_D6670:
xor eax, eax
cmp eax, [rsp+28h+var_28]
jge short loc_D66D5
mov eax, [rsp+28h+var_28]
cmp eax, [rsp+28h+var_20]
jg short loc_D66D5
mov rdi, [rsp+28h+var_10]
movsxd rax, [rsp+28h+var_28]
add rax, 1
add rdi, rax
mov rsi, [rsp+28h+var_10]
movsxd rax, [rsp+28h+var_28]
add rsi, rax
movsxd rdx, [rsp+28h+var_24]
movsxd rax, [rsp+28h+var_28]
sub rdx, rax
call _memmove
mov rax, [rsp+28h+var_10]
movsxd rcx, [rsp+28h+var_28]
mov byte ptr [rax+rcx], 2Eh ; '.'
mov rax, [rsp+28h+var_10]
movsxd rcx, [rsp+28h+var_24]
add rcx, 1
add rax, rcx
mov [rsp+28h+var_8], rax
jmp loc_D67D1
loc_D66D5:
mov eax, [rsp+28h+var_1C]
cmp eax, [rsp+28h+var_28]
jge short loc_D6755
cmp [rsp+28h+var_28], 0
jg short loc_D6755
mov rdi, [rsp+28h+var_10]
xor eax, eax
sub eax, [rsp+28h+var_28]
cdqe
add rax, 2
add rdi, rax
mov rsi, [rsp+28h+var_10]
movsxd rdx, [rsp+28h+var_24]
call _memmove
mov rax, [rsp+28h+var_10]
mov byte ptr [rax], 30h ; '0'
mov rax, [rsp+28h+var_10]
mov byte ptr [rax+1], 2Eh ; '.'
mov rdi, [rsp+28h+var_10]
add rdi, 2
xor eax, eax
sub eax, [rsp+28h+var_28]
movsxd rdx, eax
mov esi, 30h ; '0'
call _memset
mov rax, [rsp+28h+var_10]
xor ecx, ecx
sub ecx, [rsp+28h+var_28]
movsxd rcx, ecx
add rcx, 2
movsxd rdx, [rsp+28h+var_24]
add rcx, rdx
add rax, rcx
mov [rsp+28h+var_8], rax
jmp short loc_D67D1
loc_D6755:
cmp [rsp+28h+var_24], 1
jnz short loc_D676C
mov rax, [rsp+28h+var_10]
add rax, 1
mov [rsp+28h+var_10], rax
jmp short loc_D67A8
loc_D676C:
mov rdi, [rsp+28h+var_10]
add rdi, 2
mov rsi, [rsp+28h+var_10]
add rsi, 1
movsxd rdx, [rsp+28h+var_24]
sub rdx, 1
call _memmove
mov rax, [rsp+28h+var_10]
mov byte ptr [rax+1], 2Eh ; '.'
movsxd rax, [rsp+28h+var_24]
add rax, 1
add rax, [rsp+28h+var_10]
mov [rsp+28h+var_10], rax
loc_D67A8:
mov rax, [rsp+28h+var_10]
mov rcx, rax
add rcx, 1
mov [rsp+28h+var_10], rcx
mov byte ptr [rax], 65h ; 'e'
mov rdi, [rsp+28h+var_10]; this
mov esi, [rsp+28h+var_28]
sub esi, 1; char *
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl15append_exponentEPci; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char *,int)
mov [rsp+28h+var_8], rax
loc_D67D1:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
|
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2,
int a3,
int a4,
int a5)
{
int v6; // [rsp+0h] [rbp-28h]
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v7; // [rsp+18h] [rbp-10h]
v6 = a3 + (_DWORD)a2;
if ( (int)a2 > a3 + (int)a2 || v6 > a5 )
{
if ( v6 <= 0 || v6 > a5 )
{
if ( a4 >= v6 || v6 > 0 )
{
if ( (_DWORD)a2 == 1 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)((char *)this + 1);
}
else
{
memmove((char *)this + 2, (char *)this + 1, (int)a2 - 1LL);
*((_BYTE *)this + 1) = 46;
v7 = (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)((char *)this + (int)a2 + 1);
}
*(_BYTE *)v7 = 101;
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(
(nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)((char *)v7 + 1),
(char *)(unsigned int)(v6 - 1),
a3);
}
else
{
memmove((char *)this - v6 + 2, this, (int)a2);
*(_BYTE *)this = 48;
*((_BYTE *)this + 1) = 46;
memset((char *)this + 2, 48LL, -v6);
return (long long)this + (int)a2 - v6 + 2;
}
}
else
{
memmove((char *)this + v6 + 1, (char *)this + v6, (int)a2 - (long long)v6);
*((_BYTE *)this + v6) = 46;
return (long long)this + (int)a2 + 1;
}
}
else
{
memset((char *)this + (int)a2, 48LL, v6 - (long long)(int)a2);
*((_BYTE *)this + v6) = 46;
*((_BYTE *)this + v6 + 1) = 48;
return (long long)this + v6 + 2;
}
}
|
format_buffer:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x14],ESI
MOV dword ptr [RSP + 0x10],EDX
MOV dword ptr [RSP + 0xc],ECX
MOV dword ptr [RSP + 0x8],R8D
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x4],EAX
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,dword ptr [RSP + 0x10]
MOV dword ptr [RSP],EAX
MOV EAX,dword ptr [RSP + 0x4]
CMP EAX,dword ptr [RSP]
JG 0x001d6670
MOV EAX,dword ptr [RSP]
CMP EAX,dword ptr [RSP + 0x8]
JG 0x001d6670
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD RAX,dword ptr [RSP + 0x4]
ADD RDI,RAX
MOVSXD RDX,dword ptr [RSP]
MOVSXD RAX,dword ptr [RSP + 0x4]
SUB RDX,RAX
MOV ESI,0x30
CALL 0x0010c4a0
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP]
ADD ECX,0x0
MOVSXD RCX,ECX
MOV byte ptr [RAX + RCX*0x1],0x2e
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP]
ADD ECX,0x1
MOVSXD RCX,ECX
MOV byte ptr [RAX + RCX*0x1],0x30
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RCX,dword ptr [RSP]
ADD RCX,0x2
ADD RAX,RCX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001d67d1
LAB_001d6670:
XOR EAX,EAX
CMP EAX,dword ptr [RSP]
JGE 0x001d66d5
MOV EAX,dword ptr [RSP]
CMP EAX,dword ptr [RSP + 0x8]
JG 0x001d66d5
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD RAX,dword ptr [RSP]
ADD RAX,0x1
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x18]
MOVSXD RAX,dword ptr [RSP]
ADD RSI,RAX
MOVSXD RDX,dword ptr [RSP + 0x4]
MOVSXD RAX,dword ptr [RSP]
SUB RDX,RAX
CALL 0x0010ccc0
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RCX,dword ptr [RSP]
MOV byte ptr [RAX + RCX*0x1],0x2e
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RCX,dword ptr [RSP + 0x4]
ADD RCX,0x1
ADD RAX,RCX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001d67d1
LAB_001d66d5:
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [RSP]
JGE 0x001d6755
CMP dword ptr [RSP],0x0
JG 0x001d6755
MOV RDI,qword ptr [RSP + 0x18]
XOR EAX,EAX
SUB EAX,dword ptr [RSP]
CDQE
ADD RAX,0x2
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RSP + 0x4]
CALL 0x0010ccc0
MOV RAX,qword ptr [RSP + 0x18]
MOV byte ptr [RAX],0x30
MOV RAX,qword ptr [RSP + 0x18]
MOV byte ptr [RAX + 0x1],0x2e
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x2
XOR EAX,EAX
SUB EAX,dword ptr [RSP]
MOVSXD RDX,EAX
MOV ESI,0x30
CALL 0x0010c4a0
MOV RAX,qword ptr [RSP + 0x18]
XOR ECX,ECX
SUB ECX,dword ptr [RSP]
MOVSXD RCX,ECX
ADD RCX,0x2
MOVSXD RDX,dword ptr [RSP + 0x4]
ADD RCX,RDX
ADD RAX,RCX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001d67d1
LAB_001d6755:
CMP dword ptr [RSP + 0x4],0x1
JNZ 0x001d676c
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x1
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001d67a8
LAB_001d676c:
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x2
MOV RSI,qword ptr [RSP + 0x18]
ADD RSI,0x1
MOVSXD RDX,dword ptr [RSP + 0x4]
SUB RDX,0x1
CALL 0x0010ccc0
MOV RAX,qword ptr [RSP + 0x18]
MOV byte ptr [RAX + 0x1],0x2e
MOVSXD RAX,dword ptr [RSP + 0x4]
ADD RAX,0x1
ADD RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x18],RAX
LAB_001d67a8:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RSP + 0x18],RCX
MOV byte ptr [RAX],0x65
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RSP]
SUB ESI,0x1
CALL 0x001d7590
MOV qword ptr [RSP + 0x20],RAX
LAB_001d67d1:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int) */
char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer
(char *param_1,int param_2,int param_3,int param_4,int param_5)
{
int iVar1;
char *local_10;
char *local_8;
iVar1 = param_2 + param_3;
if ((iVar1 < param_2) || (param_5 < iVar1)) {
if ((iVar1 < 1) || (param_5 < iVar1)) {
if ((param_4 < iVar1) && (iVar1 < 1)) {
memmove(param_1 + (long)-iVar1 + 2,param_1,(long)param_2);
*param_1 = '0';
param_1[1] = '.';
memset(param_1 + 2,0x30,(long)-iVar1);
local_8 = param_1 + (long)-iVar1 + 2 + (long)param_2;
}
else {
if (param_2 == 1) {
local_10 = param_1 + 1;
}
else {
memmove(param_1 + 2,param_1 + 1,(long)param_2 - 1);
param_1[1] = '.';
local_10 = param_1 + (long)param_2 + 1;
}
*local_10 = 'e';
local_8 = (char *)append_exponent(local_10 + 1,iVar1 + -1);
}
}
else {
memmove(param_1 + (long)iVar1 + 1,param_1 + iVar1,(long)param_2 - (long)iVar1);
param_1[iVar1] = '.';
local_8 = param_1 + (long)param_2 + 1;
}
}
else {
memset(param_1 + param_2,0x30,(long)iVar1 - (long)param_2);
param_1[iVar1] = '.';
param_1[iVar1 + 1] = '0';
local_8 = param_1 + (long)iVar1 + 2;
}
return local_8;
}
|
|
14,728
|
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
|
monkey531[P]llama/common/minja.hpp
|
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) {
std::map<std::string, size_t> named_positions;
for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i;
return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value {
auto args_obj = Value::object();
std::vector<bool> provided_args(params.size());
for (size_t i = 0, n = args.args.size(); i < n; i++) {
auto & arg = args.args[i];
if (i < params.size()) {
args_obj.set(params[i], arg);
provided_args[i] = true;
} else {
throw std::runtime_error("Too many positional params for " + fn_name);
}
}
for (auto & [name, value] : args.kwargs) {
auto named_pos_it = named_positions.find(name);
if (named_pos_it == named_positions.end()) {
throw std::runtime_error("Unknown argument " + name + " for function " + fn_name);
}
provided_args[named_pos_it->second] = true;
args_obj.set(name, value);
}
return fn(context, args_obj);
});
}
|
O2
|
cpp
|
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %r15
movq %rsi, %r12
leaq 0x38(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq %rdi, (%rsp)
movq 0x8(%rdx), %rbp
subq (%rdx), %rbp
sarq $0x5, %rbp
xorl %ebx, %ebx
leaq 0x30(%rsp), %r13
xorl %r14d, %r14d
cmpq %r14, %rbp
je 0x70634
movq (%r15), %rsi
addq %rbx, %rsi
movq %r13, %rdi
callq 0x64168
movq %r14, (%rax)
incq %r14
addq $0x20, %rbx
jmp 0x70615
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0x3534a
leaq 0x78(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x20920
leaq 0x98(%rsp), %r13
leaq 0x30(%rsp), %rsi
movq %r13, %rdi
callq 0x645b2
leaq 0xc8(%rsp), %r12
movq %r12, %rdi
movq 0x8(%rsp), %rsi
callq 0x641ce
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movl $0x88, %edi
callq 0x206b0
movq %rax, %r14
leaq 0x60(%rsp), %rsi
movq %rax, %rdi
callq 0x3534a
leaq 0x18(%r14), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x20920
leaq 0x40(%r14), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x64828
leaq 0x68(%r14), %rdi
movq %r12, %rsi
callq 0x641ce
leaq 0x10(%rsp), %rsi
movq %r14, (%rsi)
leaq 0x109(%rip), %rax # 0x707e6
movq %rax, 0x18(%rsi)
leaq 0x42c(%rip), %rax # 0x70b14
movq %rax, 0x10(%rsi)
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x506b2
leaq 0x10(%rsp), %rdi
callq 0x64088
leaq 0x60(%rsp), %rdi
callq 0x707be
leaq 0x30(%rsp), %rdi
callq 0x64814
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x70765
movq %rax, %rbx
movq %r14, %rdi
addq $0x38, %rdi
callq 0x64814
movq %r13, %rdi
callq 0x20d78
jmp 0x70749
movq %rax, %rbx
movq %r14, %rdi
callq 0x2f142
jmp 0x70756
movq %rax, %rbx
movl $0x88, %esi
movq %r14, %rdi
callq 0x206c0
jmp 0x70768
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x64088
leaq 0x60(%rsp), %rdi
callq 0x707be
jmp 0x707ac
movq %rax, %rbx
movq %r13, %rdi
callq 0x64814
jmp 0x7078e
movq %rax, %rbx
movq %r15, %rdi
callq 0x20d78
jmp 0x7079b
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2f142
jmp 0x707ac
jmp 0x707a9
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x64814
movq %rbx, %rdi
callq 0x20b90
|
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov [rsp+118h+var_110], rcx
mov r15, rdx
mov r12, rsi
lea rax, [rsp+118h+var_E0]
and dword ptr [rax], 0
and qword ptr [rax+8], 0
mov [rax+10h], rax
mov [rax+18h], rax
and qword ptr [rax+20h], 0
mov [rsp+118h+var_118], rdi
mov rbp, [rdx+8]
sub rbp, [rdx]
sar rbp, 5
xor ebx, ebx
lea r13, [rsp+118h+var_E8]
xor r14d, r14d
loc_70615:
cmp rbp, r14
jz short loc_70634
mov rsi, [r15]
add rsi, rbx
mov rdi, r13
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&)
mov [rax], r14
inc r14
add rbx, 20h ; ' '
jmp short loc_70615
loc_70634:
lea rdi, [rsp+118h+var_B8]
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
lea r15, [rsp+118h+var_A0]
mov rdi, r15
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
lea r13, [rsp+118h+var_80]
lea rsi, [rsp+118h+var_E8]
mov rdi, r13
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>> const&)
lea r12, [rsp+118h+var_50]
mov rdi, r12
mov rsi, [rsp+118h+var_110]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)
xorps xmm0, xmm0
movaps [rsp+118h+var_F8], xmm0
movaps [rsp+118h+var_108], xmm0
mov edi, 88h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea rsi, [rsp+118h+var_B8]
mov rdi, rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
lea r13, [r14+18h]
mov rdi, r13
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
lea rdi, [r14+40h]
lea rsi, [rsp+118h+var_78]
call _ZNSt15_Rb_tree_headerC2EOS_; std::_Rb_tree_header::_Rb_tree_header(std::_Rb_tree_header&&)
lea rdi, [r14+68h]
mov rsi, r12
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)
lea rsi, [rsp+118h+var_108]
mov [rsi], r14
lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E9_M_invokeERKSt9_Any_dataS6_S8__0; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke(std::_Any_data const&,std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation_0; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
mov rbx, [rsp+118h+var_118]
mov rdi, rbx
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
lea rdi, [rsp+118h+var_108]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+118h+var_B8]
call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev_0; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0()
lea rdi, [rsp+118h+var_E8]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_70765
mov rbx, rax
mov rdi, r14
add rdi, 38h ; '8'
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, r13; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_70749
mov rbx, rax
loc_70749:
mov rdi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_70756
mov rbx, rax
loc_70756:
mov esi, 88h; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_70768
loc_70765:
mov rbx, rax
loc_70768:
lea rdi, [rsp+arg_8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+arg_58]
call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev_0; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0()
jmp short loc_707AC
mov rbx, rax
mov rdi, r13
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
jmp short loc_7078E
mov rbx, rax
loc_7078E:
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_7079B
mov rbx, rax
loc_7079B:
lea rdi, [rsp+arg_58]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_707AC
jmp short $+2
loc_707A9:
mov rbx, rax
loc_707AC:
lea rdi, [rsp+arg_28]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, rbx
call __Unwind_Resume
|
long long minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4)
{
long long v5; // rbp
long long v6; // rbx
long long i; // r14
long long v8; // r14
__int128 v11; // [rsp+10h] [rbp-108h] BYREF
long long ( *v12)(); // [rsp+20h] [rbp-F8h]
long long ( *v13)(); // [rsp+28h] [rbp-F0h]
_BYTE v14[8]; // [rsp+30h] [rbp-E8h] BYREF
int v15; // [rsp+38h] [rbp-E0h] BYREF
long long v16; // [rsp+40h] [rbp-D8h]
int *v17; // [rsp+48h] [rbp-D0h]
int *v18; // [rsp+50h] [rbp-C8h]
long long v19; // [rsp+58h] [rbp-C0h]
_QWORD v20[3]; // [rsp+60h] [rbp-B8h] BYREF
_BYTE v21[32]; // [rsp+78h] [rbp-A0h] BYREF
_BYTE v22[8]; // [rsp+98h] [rbp-80h] BYREF
_BYTE v23[40]; // [rsp+A0h] [rbp-78h] BYREF
_OWORD v24[5]; // [rsp+C8h] [rbp-50h] BYREF
v15 = 0;
v16 = 0LL;
v17 = &v15;
v18 = &v15;
v19 = 0LL;
v5 = (long long)(a3[1] - *a3) >> 5;
v6 = 0LL;
for ( i = 0LL; v5 != i; ++i )
{
*(_QWORD *)std::map<std::string,unsigned long>::operator[]((long long)v14, v6 + *a3) = i;
v6 += 32LL;
}
std::vector<std::string>::vector(v20, a3);
std::string::basic_string(v21, a2);
std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::_Rb_tree(
(long long)v22,
(long long)v14);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v24, a4);
v11 = 0LL;
v8 = operator new(0x88uLL);
std::vector<std::string>::vector((_QWORD *)v8, v20);
std::string::basic_string(v8 + 24, v21);
std::_Rb_tree_header::_Rb_tree_header(v8 + 64, (long long)v23);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(
(_OWORD *)(v8 + 104),
(long long)v24);
*(_QWORD *)&v11 = v8;
v13 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke;
v12 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager;
minja::Value::callable(a1);
std::_Function_base::~_Function_base((std::_Function_base *)&v11);
minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0(v20);
std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree((long long)v14);
return a1;
}
|
simple_function:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RSP + 0x8],RCX
MOV R15,RDX
MOV R12,RSI
LEA RAX,[RSP + 0x38]
AND dword ptr [RAX],0x0
AND qword ptr [RAX + 0x8],0x0
MOV qword ptr [RAX + 0x10],RAX
MOV qword ptr [RAX + 0x18],RAX
AND qword ptr [RAX + 0x20],0x0
MOV qword ptr [RSP],RDI
MOV RBP,qword ptr [RDX + 0x8]
SUB RBP,qword ptr [RDX]
SAR RBP,0x5
XOR EBX,EBX
LEA R13,[RSP + 0x30]
XOR R14D,R14D
LAB_00170615:
CMP RBP,R14
JZ 0x00170634
MOV RSI,qword ptr [R15]
ADD RSI,RBX
LAB_00170620:
MOV RDI,R13
CALL 0x00164168
MOV qword ptr [RAX],R14
INC R14
ADD RBX,0x20
JMP 0x00170615
LAB_00170634:
LEA RDI,[RSP + 0x60]
MOV RSI,R15
CALL 0x0013534a
LEA R15,[RSP + 0x78]
LAB_00170646:
MOV RDI,R15
MOV RSI,R12
CALL 0x00120920
LEA R13,[RSP + 0x98]
LAB_00170659:
LEA RSI,[RSP + 0x30]
MOV RDI,R13
CALL 0x001645b2
LEA R12,[RSP + 0xc8]
LAB_0017066e:
MOV RDI,R12
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001641ce
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
LAB_00170688:
MOV EDI,0x88
CALL 0x001206b0
LAB_00170692:
MOV R14,RAX
LEA RSI,[RSP + 0x60]
MOV RDI,RAX
CALL 0x0013534a
LEA R13,[R14 + 0x18]
LAB_001706a6:
MOV RDI,R13
MOV RSI,R15
CALL 0x00120920
LEA RDI,[R14 + 0x40]
LEA RSI,[RSP + 0xa0]
CALL 0x00164828
LEA RDI,[R14 + 0x68]
LAB_001706c6:
MOV RSI,R12
CALL 0x001641ce
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],R14
LEA RAX,[0x1707e6]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x170b14]
MOV qword ptr [RSI + 0x10],RAX
LAB_001706ec:
MOV RBX,qword ptr [RSP]
MOV RDI,RBX
CALL 0x001506b2
LAB_001706f8:
LEA RDI,[RSP + 0x10]
CALL 0x00164088
LEA RDI,[RSP + 0x60]
CALL 0x001707be
LEA RDI,[RSP + 0x30]
CALL 0x00164814
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&, std::function<minja::Value
(std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */
minja * __thiscall
minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3)
{
long lVar1;
long lVar2;
long *plVar3;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00;
long lVar4;
long lVar5;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_108;
int8 uStack_100;
code *local_f8;
code *pcStack_f0;
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
local_e8 [8];
int4 local_e0 [2];
int8 local_d8;
int4 *local_d0;
int4 *local_c8;
int8 local_c0;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_b8 [24];
string local_a0 [32];
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
local_80 [8];
_Rb_tree_header local_78 [40];
function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_50 [32];
local_d0 = local_e0;
local_e0[0] = 0;
local_d8 = 0;
local_c0 = 0;
lVar1 = *(long *)(param_2 + 8);
lVar2 = *(long *)param_2;
lVar4 = 0;
local_c8 = local_d0;
for (lVar5 = 0; lVar1 - lVar2 >> 5 != lVar5; lVar5 = lVar5 + 1) {
/* try { // try from 00170620 to 00170627 has its CatchHandler @ 001707a9 */
plVar3 = (long *)std::
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::operator[](local_e8,(string *)(*(long *)param_2 + lVar4));
*plVar3 = lVar5;
lVar4 = lVar4 + 0x20;
}
/* try { // try from 00170634 to 00170640 has its CatchHandler @ 001707a7 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_b8,param_2);
/* try { // try from 00170646 to 00170650 has its CatchHandler @ 00170798 */
std::__cxx11::string::string(local_a0,param_1);
/* try { // try from 00170659 to 00170665 has its CatchHandler @ 0017078b */
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::_Rb_tree(local_80,(_Rb_tree *)local_e8);
/* try { // try from 0017066e to 0017067a has its CatchHandler @ 0017077e */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function
(local_50,param_3);
local_f8 = (code *)0x0;
pcStack_f0 = (code *)0x0;
local_108 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)0x0;
uStack_100 = 0;
/* try { // try from 00170688 to 00170691 has its CatchHandler @ 00170765 */
this_00 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)operator_new(0x88);
/* try { // try from 00170692 to 001706a1 has its CatchHandler @ 00170753 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
(this_00,(vector *)local_b8);
/* try { // try from 001706a6 to 001706b0 has its CatchHandler @ 00170746 */
std::__cxx11::string::string((string *)(this_00 + 0x18),local_a0);
std::_Rb_tree_header::_Rb_tree_header((_Rb_tree_header *)(this_00 + 0x40),local_78);
/* try { // try from 001706c6 to 001706cd has its CatchHandler @ 0017072d */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function
((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> *)
(this_00 + 0x68),(function *)local_50);
pcStack_f0 = std::
_Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0>
::_M_invoke;
local_f8 = std::
_Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0>
::_M_manager;
local_108 = this_00;
/* try { // try from 001706ec to 001706f7 has its CatchHandler @ 0017072b */
Value::callable((function *)this);
std::_Function_base::~_Function_base((_Function_base *)&local_108);
simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)
::$_0::~__0((__0 *)local_b8);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
*)local_e8);
return this;
}
|
|
14,729
|
c4_get_chain_state
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
|
INTERNAL c4_chain_state_t c4_get_chain_state(chain_id_t chain_id) {
c4_chain_state_t state = {0};
char name[100];
storage_plugin_t storage_conf = {0};
#ifdef C4_STATIC_MEMORY
// Use static buffer with size limit
buffer_t tmp = stack_buffer(state_buffer);
#else
buffer_t tmp = {0};
#endif
c4_get_storage_config(&storage_conf);
sprintf(name, "states_%" PRIu64, (uint64_t) chain_id);
#ifndef C4_STATIC_MEMORY
tmp.allocated = sizeof(c4_trusted_block_t) * storage_conf.max_sync_states;
#endif
if (storage_conf.get(name, &tmp) && tmp.data.data) {
state.blocks = (c4_trusted_block_t*) tmp.data.data;
state.len = tmp.data.len / sizeof(c4_trusted_block_t);
}
return state;
}
|
O0
|
c
|
c4_get_chain_state:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl %edi, -0x14(%rbp)
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5110
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x5110
leaq -0xb8(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x5110
leaq -0xa0(%rbp), %rdi
callq 0x1f970
leaq -0x80(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %edx
leaq 0x3d1d9(%rip), %rsi # 0x53d39
movb $0x0, %al
callq 0x52f0
movl -0x88(%rbp), %eax
imulq $0x30, %rax, %rax
movl %eax, -0xa8(%rbp)
movq -0xa0(%rbp), %rax
leaq -0x80(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq *%rax
testb $0x1, %al
jne 0x16b91
jmp 0x16bb9
cmpq $0x0, -0xb0(%rbp)
je 0x16bb9
movq -0xb0(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0xb8(%rbp), %eax
movl $0x30, %ecx
xorl %edx, %edx
divq %rcx
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %edx
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax)
|
c4_get_chain_state:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_14], edi
lea rdi, [rbp+var_10]
xor esi, esi
mov edx, 10h
call _memset
lea rdi, [rbp+var_A0]
xor esi, esi
mov edx, 20h ; ' '
call _memset
lea rdi, [rbp+var_B8]
xor esi, esi
mov edx, 18h
call _memset
lea rdi, [rbp+var_A0]
call c4_get_storage_config
lea rdi, [rbp+var_80]
mov eax, [rbp+var_14]
mov edx, eax
lea rsi, aStatesLu; "states_%lu"
mov al, 0
call _sprintf
mov eax, [rbp+var_88]
imul rax, 30h ; '0'
mov [rbp+var_A8], eax
mov rax, [rbp+var_A0]
lea rdi, [rbp+var_80]
lea rsi, [rbp+var_B8]
call rax
test al, 1
jnz short loc_16B91
jmp short loc_16BB9
loc_16B91:
cmp [rbp+var_B0], 0
jz short loc_16BB9
mov rax, [rbp+var_B0]
mov [rbp+var_10], rax
mov eax, [rbp+var_B8]
mov ecx, 30h ; '0'
xor edx, edx
div rcx
mov [rbp+var_8], eax
loc_16BB9:
mov rax, [rbp+var_10]
mov edx, [rbp+var_8]
add rsp, 0C0h
pop rbp
retn
|
long long c4_get_chain_state(unsigned int a1)
{
unsigned int v2; // [rsp+8h] [rbp-B8h] BYREF
long long v3; // [rsp+10h] [rbp-B0h]
int v4; // [rsp+18h] [rbp-A8h]
_QWORD v5[3]; // [rsp+20h] [rbp-A0h] BYREF
int v6; // [rsp+38h] [rbp-88h]
_BYTE v7[108]; // [rsp+40h] [rbp-80h] BYREF
unsigned int v8; // [rsp+ACh] [rbp-14h]
long long v9; // [rsp+B0h] [rbp-10h] BYREF
unsigned int v10; // [rsp+B8h] [rbp-8h]
v8 = a1;
memset(&v9, 0LL, 16LL);
memset(v5, 0LL, 32LL);
memset(&v2, 0LL, 24LL);
c4_get_storage_config(v5);
sprintf(v7, "states_%lu", v8);
v4 = 48 * v6;
if ( (((long long ( *)(_BYTE *, unsigned int *))v5[0])(v7, &v2) & 1) != 0 && v3 )
{
v9 = v3;
v10 = v2 / 0x30;
}
return v9;
}
|
c4_get_chain_state:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV dword ptr [RBP + -0x14],EDI
LEA RDI,[RBP + -0x10]
XOR ESI,ESI
MOV EDX,0x10
CALL 0x00105110
LEA RDI,[RBP + -0xa0]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00105110
LEA RDI,[RBP + -0xb8]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00105110
LEA RDI,[RBP + -0xa0]
CALL 0x0011f970
LEA RDI,[RBP + -0x80]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
LEA RSI,[0x153d39]
MOV AL,0x0
CALL 0x001052f0
MOV EAX,dword ptr [RBP + -0x88]
IMUL RAX,RAX,0x30
MOV dword ptr [RBP + -0xa8],EAX
MOV RAX,qword ptr [RBP + -0xa0]
LEA RDI,[RBP + -0x80]
LEA RSI,[RBP + -0xb8]
CALL RAX
TEST AL,0x1
JNZ 0x00116b91
JMP 0x00116bb9
LAB_00116b91:
CMP qword ptr [RBP + -0xb0],0x0
JZ 0x00116bb9
MOV RAX,qword ptr [RBP + -0xb0]
MOV qword ptr [RBP + -0x10],RAX
MOV EAX,dword ptr [RBP + -0xb8]
MOV ECX,0x30
XOR EDX,EDX
DIV RCX
MOV dword ptr [RBP + -0x8],EAX
LAB_00116bb9:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x8]
ADD RSP,0xc0
POP RBP
RET
|
int1 [16] c4_get_chain_state(uint param_1)
{
ulong uVar1;
int1 auVar2 [16];
uint local_c0 [2];
long local_b8;
int local_b0;
code *local_a8 [3];
int local_90;
char local_88 [108];
uint local_1c;
long local_18;
int4 local_10;
local_1c = param_1;
memset(&local_18,0,0x10);
memset(local_a8,0,0x20);
memset(local_c0,0,0x18);
c4_get_storage_config(local_a8);
sprintf(local_88,"states_%lu",(ulong)local_1c);
local_b0 = local_90 * 0x30;
uVar1 = (*local_a8[0])(local_88,local_c0);
if (((uVar1 & 1) != 0) && (local_b8 != 0)) {
local_18 = local_b8;
local_10 = SUB164(ZEXT416(local_c0[0]) / ZEXT816(0x30),0);
}
auVar2._8_4_ = local_10;
auVar2._0_8_ = local_18;
auVar2._12_4_ = 0;
return auVar2;
}
|
|
14,730
|
c4_get_chain_state
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
|
INTERNAL c4_chain_state_t c4_get_chain_state(chain_id_t chain_id) {
c4_chain_state_t state = {0};
char name[100];
storage_plugin_t storage_conf = {0};
#ifdef C4_STATIC_MEMORY
// Use static buffer with size limit
buffer_t tmp = stack_buffer(state_buffer);
#else
buffer_t tmp = {0};
#endif
c4_get_storage_config(&storage_conf);
sprintf(name, "states_%" PRIu64, (uint64_t) chain_id);
#ifndef C4_STATIC_MEMORY
tmp.allocated = sizeof(c4_trusted_block_t) * storage_conf.max_sync_states;
#endif
if (storage_conf.get(name, &tmp) && tmp.data.data) {
state.blocks = (c4_trusted_block_t*) tmp.data.data;
state.len = tmp.data.len / sizeof(c4_trusted_block_t);
}
return state;
}
|
O1
|
c
|
c4_get_chain_state:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %edi, %ebx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq %rsp, %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movq %r14, %rdi
callq 0x16e0c
movl %ebx, %edx
leaq 0x2d707(%rip), %rsi # 0x3ed60
xorl %ebx, %ebx
leaq 0x40(%rsp), %r12
movq %r12, %rdi
xorl %eax, %eax
callq 0x5310
movl 0x18(%r14), %eax
shll $0x4, %eax
leal (%rax,%rax,2), %eax
movl %eax, 0x10(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq *(%r14)
movl %eax, %ecx
movq 0x8(%r15), %rax
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x116a6
movl (%rsp), %ecx
movl $0xaaaaaaab, %ebx # imm = 0xAAAAAAAB
imulq %rcx, %rbx
shrq $0x25, %rbx
jmp 0x116a8
xorl %eax, %eax
movl %ebx, %edx
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
c4_get_chain_state:
push r15
push r14
push r12
push rbx
sub rsp, 0A8h
mov ebx, edi
xorps xmm0, xmm0
lea r14, [rsp+0C8h+var_A8]
movaps xmmword ptr [r14+10h], xmm0
movaps xmmword ptr [r14], xmm0
mov r15, rsp
movaps xmmword ptr [r15], xmm0
mov qword ptr [r15+10h], 0
mov rdi, r14
call c4_get_storage_config
mov edx, ebx
lea rsi, aStatesLu; "states_%lu"
xor ebx, ebx
lea r12, [rsp+0C8h+var_88]
mov rdi, r12
xor eax, eax
call _sprintf
mov eax, [r14+18h]
shl eax, 4
lea eax, [rax+rax*2]
mov [r15+10h], eax
mov rdi, r12
mov rsi, r15
call qword ptr [r14]
mov ecx, eax
mov rax, [r15+8]
test rax, rax
setnz dl
and dl, cl
cmp dl, 1
jnz short loc_116A6
mov ecx, [rsp+0C8h+var_C8]
mov ebx, 0AAAAAAABh
imul rbx, rcx
shr rbx, 25h
jmp short loc_116A8
loc_116A6:
xor eax, eax
loc_116A8:
mov edx, ebx
add rsp, 0A8h
pop rbx
pop r12
pop r14
pop r15
retn
|
long long c4_get_chain_state(unsigned int a1)
{
unsigned __int8 v1; // cl
long long result; // rax
__int128 v3; // [rsp+0h] [rbp-C8h] BYREF
long long v4; // [rsp+10h] [rbp-B8h]
__int128 v5; // [rsp+20h] [rbp-A8h] BYREF
__int128 v6; // [rsp+30h] [rbp-98h]
_BYTE v7[136]; // [rsp+40h] [rbp-88h] BYREF
v6 = 0LL;
v5 = 0LL;
v3 = 0LL;
v4 = 0LL;
c4_get_storage_config(&v5);
sprintf(v7, "states_%lu", a1);
LODWORD(v4) = 48 * DWORD2(v6);
v1 = ((long long ( *)(_BYTE *, __int128 *))v5)(v7, &v3);
result = *((_QWORD *)&v3 + 1);
if ( (v1 & (*((_QWORD *)&v3 + 1) != 0LL)) != 1 )
return 0LL;
return result;
}
|
c4_get_chain_state:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV EBX,EDI
XORPS XMM0,XMM0
LEA R14,[RSP + 0x20]
MOVAPS xmmword ptr [R14 + 0x10],XMM0
MOVAPS xmmword ptr [R14],XMM0
MOV R15,RSP
MOVAPS xmmword ptr [R15],XMM0
MOV qword ptr [R15 + 0x10],0x0
MOV RDI,R14
CALL 0x00116e0c
MOV EDX,EBX
LEA RSI,[0x13ed60]
XOR EBX,EBX
LEA R12,[RSP + 0x40]
MOV RDI,R12
XOR EAX,EAX
CALL 0x00105310
MOV EAX,dword ptr [R14 + 0x18]
SHL EAX,0x4
LEA EAX,[RAX + RAX*0x2]
MOV dword ptr [R15 + 0x10],EAX
MOV RDI,R12
MOV RSI,R15
CALL qword ptr [R14]
MOV ECX,EAX
MOV RAX,qword ptr [R15 + 0x8]
TEST RAX,RAX
SETNZ DL
AND DL,CL
CMP DL,0x1
JNZ 0x001116a6
MOV ECX,dword ptr [RSP]
MOV EBX,0xaaaaaaab
IMUL RBX,RCX
SHR RBX,0x25
JMP 0x001116a8
LAB_001116a6:
XOR EAX,EAX
LAB_001116a8:
MOV EDX,EBX
ADD RSP,0xa8
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16] c4_get_chain_state(uint param_1)
{
byte bVar1;
ulong uVar2;
int1 auVar3 [16];
ulong local_c8;
long lStack_c0;
int8 local_b8;
code *local_a8;
int8 uStack_a0;
int8 local_98;
int8 uStack_90;
char local_88 [104];
local_98 = 0;
uStack_90 = 0;
local_a8 = (code *)0x0;
uStack_a0 = 0;
local_c8 = 0;
lStack_c0 = 0;
local_b8 = 0;
c4_get_storage_config(&local_a8);
uVar2 = 0;
sprintf(local_88,"states_%lu",(ulong)param_1);
local_b8 = CONCAT44(local_b8._4_4_,(int)uStack_90 * 0x30);
bVar1 = (*local_a8)(local_88,&local_c8);
if ((lStack_c0 != 0 & bVar1) == 1) {
uVar2 = (local_c8 & 0xffffffff) / 0x30;
}
else {
lStack_c0 = 0;
}
auVar3._8_8_ = uVar2;
auVar3._0_8_ = lStack_c0;
return auVar3;
}
|
|
14,731
|
c4_get_chain_state
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
|
INTERNAL c4_chain_state_t c4_get_chain_state(chain_id_t chain_id) {
c4_chain_state_t state = {0};
char name[100];
storage_plugin_t storage_conf = {0};
#ifdef C4_STATIC_MEMORY
// Use static buffer with size limit
buffer_t tmp = stack_buffer(state_buffer);
#else
buffer_t tmp = {0};
#endif
c4_get_storage_config(&storage_conf);
sprintf(name, "states_%" PRIu64, (uint64_t) chain_id);
#ifndef C4_STATIC_MEMORY
tmp.allocated = sizeof(c4_trusted_block_t) * storage_conf.max_sync_states;
#endif
if (storage_conf.get(name, &tmp) && tmp.data.data) {
state.blocks = (c4_trusted_block_t*) tmp.data.data;
state.len = tmp.data.len / sizeof(c4_trusted_block_t);
}
return state;
}
|
O3
|
c
|
c4_get_chain_state:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %edi, %ebx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq %rsp, %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movq %r14, %rdi
callq 0x166e0
movl %ebx, %edx
leaq 0x2d9ab(%rip), %rsi # 0x3ed5c
xorl %ebx, %ebx
leaq 0x40(%rsp), %r12
movq %r12, %rdi
xorl %eax, %eax
callq 0x5310
movl 0x18(%r14), %eax
shll $0x4, %eax
leal (%rax,%rax,2), %eax
movl %eax, 0x10(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq *(%r14)
movl %eax, %ecx
movq 0x8(%r15), %rax
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x113fe
movl (%rsp), %ecx
movl $0xaaaaaaab, %ebx # imm = 0xAAAAAAAB
imulq %rcx, %rbx
shrq $0x25, %rbx
jmp 0x11400
xorl %eax, %eax
movl %ebx, %edx
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
c4_get_chain_state:
push r15
push r14
push r12
push rbx
sub rsp, 0A8h
mov ebx, edi
xorps xmm0, xmm0
lea r14, [rsp+0C8h+var_A8]
movaps xmmword ptr [r14+10h], xmm0
movaps xmmword ptr [r14], xmm0
mov r15, rsp
movaps xmmword ptr [r15], xmm0
mov qword ptr [r15+10h], 0
mov rdi, r14
call c4_get_storage_config
mov edx, ebx
lea rsi, aStatesLu; "states_%lu"
xor ebx, ebx
lea r12, [rsp+0C8h+var_88]
mov rdi, r12
xor eax, eax
call _sprintf
mov eax, [r14+18h]
shl eax, 4
lea eax, [rax+rax*2]
mov [r15+10h], eax
mov rdi, r12
mov rsi, r15
call qword ptr [r14]
mov ecx, eax
mov rax, [r15+8]
test rax, rax
setnz dl
and dl, cl
cmp dl, 1
jnz short loc_113FE
mov ecx, [rsp+0C8h+var_C8]
mov ebx, 0AAAAAAABh
imul rbx, rcx
shr rbx, 25h
jmp short loc_11400
loc_113FE:
xor eax, eax
loc_11400:
mov edx, ebx
add rsp, 0A8h
pop rbx
pop r12
pop r14
pop r15
retn
|
long long c4_get_chain_state(unsigned int a1)
{
unsigned __int8 v1; // cl
long long result; // rax
__int128 v3; // [rsp+0h] [rbp-C8h] BYREF
long long v4; // [rsp+10h] [rbp-B8h]
__int128 v5; // [rsp+20h] [rbp-A8h] BYREF
__int128 v6; // [rsp+30h] [rbp-98h]
_BYTE v7[136]; // [rsp+40h] [rbp-88h] BYREF
v6 = 0LL;
v5 = 0LL;
v3 = 0LL;
v4 = 0LL;
c4_get_storage_config(&v5);
sprintf(v7, "states_%lu", a1);
LODWORD(v4) = 48 * DWORD2(v6);
v1 = ((long long ( *)(_BYTE *, __int128 *))v5)(v7, &v3);
result = *((_QWORD *)&v3 + 1);
if ( (v1 & (*((_QWORD *)&v3 + 1) != 0LL)) != 1 )
return 0LL;
return result;
}
|
c4_get_chain_state:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV EBX,EDI
XORPS XMM0,XMM0
LEA R14,[RSP + 0x20]
MOVAPS xmmword ptr [R14 + 0x10],XMM0
MOVAPS xmmword ptr [R14],XMM0
MOV R15,RSP
MOVAPS xmmword ptr [R15],XMM0
MOV qword ptr [R15 + 0x10],0x0
MOV RDI,R14
CALL 0x001166e0
MOV EDX,EBX
LEA RSI,[0x13ed5c]
XOR EBX,EBX
LEA R12,[RSP + 0x40]
MOV RDI,R12
XOR EAX,EAX
CALL 0x00105310
MOV EAX,dword ptr [R14 + 0x18]
SHL EAX,0x4
LEA EAX,[RAX + RAX*0x2]
MOV dword ptr [R15 + 0x10],EAX
MOV RDI,R12
MOV RSI,R15
CALL qword ptr [R14]
MOV ECX,EAX
MOV RAX,qword ptr [R15 + 0x8]
TEST RAX,RAX
SETNZ DL
AND DL,CL
CMP DL,0x1
JNZ 0x001113fe
MOV ECX,dword ptr [RSP]
MOV EBX,0xaaaaaaab
IMUL RBX,RCX
SHR RBX,0x25
JMP 0x00111400
LAB_001113fe:
XOR EAX,EAX
LAB_00111400:
MOV EDX,EBX
ADD RSP,0xa8
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16] c4_get_chain_state(uint param_1)
{
byte bVar1;
ulong uVar2;
int1 auVar3 [16];
ulong local_c8;
long lStack_c0;
int8 local_b8;
code *local_a8;
int8 uStack_a0;
int8 local_98;
int8 uStack_90;
char local_88 [104];
local_98 = 0;
uStack_90 = 0;
local_a8 = (code *)0x0;
uStack_a0 = 0;
local_c8 = 0;
lStack_c0 = 0;
local_b8 = 0;
c4_get_storage_config(&local_a8);
uVar2 = 0;
sprintf(local_88,"states_%lu",(ulong)param_1);
local_b8 = CONCAT44(local_b8._4_4_,(int)uStack_90 * 0x30);
bVar1 = (*local_a8)(local_88,&local_c8);
if ((lStack_c0 != 0 & bVar1) == 1) {
uVar2 = (local_c8 & 0xffffffff) / 0x30;
}
else {
lStack_c0 = 0;
}
auVar3._8_8_ = uVar2;
auVar3._0_8_ = lStack_c0;
return auVar3;
}
|
|
14,732
|
IsFileExtension
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
|
bool IsFileExtension(const char *fileName, const char *ext)
{
#define MAX_FILE_EXTENSION_LENGTH 16
bool result = false;
const char *fileExt = GetFileExtension(fileName);
if (fileExt != NULL)
{
#if defined(SUPPORT_MODULE_RTEXT) && defined(SUPPORT_TEXT_MANIPULATION)
int extCount = 0;
const char **checkExts = TextSplit(ext, ';', &extCount); // WARNING: Module required: rtext
char fileExtLower[MAX_FILE_EXTENSION_LENGTH + 1] = { 0 };
strncpy(fileExtLower, TextToLower(fileExt), MAX_FILE_EXTENSION_LENGTH); // WARNING: Module required: rtext
for (int i = 0; i < extCount; i++)
{
if (strcmp(fileExtLower, TextToLower(checkExts[i])) == 0)
{
result = true;
break;
}
}
#else
if (strcmp(fileExt, ext) == 0) result = true;
#endif
}
return result;
}
|
O0
|
c
|
IsFileExtension:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
movq -0x8(%rbp), %rdi
callq 0xd11a0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xd1189
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3b, %esi
leaq -0x24(%rbp), %rdx
callq 0xe72f0
movq %rax, -0x30(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x11, %edx
callq 0xa2d0
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rdi
callq 0xe3230
movq -0x60(%rbp), %rdi
movq %rax, %rsi
movl $0x10, %edx
callq 0xa290
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0xd1187
leaq -0x50(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xe3230
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0xa750
cmpl $0x0, %eax
jne 0xd117a
movb $0x1, -0x11(%rbp)
jmp 0xd1187
jmp 0xd117c
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0xd1142
jmp 0xd1189
movb -0x11(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
IsFileExtension:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_11], 0
mov rdi, [rbp+var_8]
call GetFileExtension
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jz loc_D1189
mov [rbp+var_24], 0
mov rdi, [rbp+var_10]
mov esi, 3Bh ; ';'
lea rdx, [rbp+var_24]
call TextSplit
mov [rbp+var_30], rax
lea rdi, [rbp+var_50]
xor esi, esi
mov edx, 11h
call _memset
lea rax, [rbp+var_50]
mov [rbp+var_60], rax
mov rdi, [rbp+var_20]
call TextToLower
mov rdi, [rbp+var_60]
mov rsi, rax
mov edx, 10h
call _strncpy
mov [rbp+var_54], 0
loc_D1142:
mov eax, [rbp+var_54]
cmp eax, [rbp+var_24]
jge short loc_D1187
lea rax, [rbp+var_50]
mov [rbp+var_68], rax
mov rax, [rbp+var_30]
movsxd rcx, [rbp+var_54]
mov rdi, [rax+rcx*8]
call TextToLower
mov rdi, [rbp+var_68]
mov rsi, rax
call _strcmp
cmp eax, 0
jnz short loc_D117A
mov [rbp+var_11], 1
jmp short loc_D1187
loc_D117A:
jmp short $+2
loc_D117C:
mov eax, [rbp+var_54]
add eax, 1
mov [rbp+var_54], eax
jmp short loc_D1142
loc_D1187:
jmp short $+2
loc_D1189:
mov al, [rbp+var_11]
and al, 1
add rsp, 70h
pop rbp
retn
|
char IsFileExtension(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rsi
int i; // [rsp+1Ch] [rbp-54h]
_BYTE v6[32]; // [rsp+20h] [rbp-50h] BYREF
long long v7; // [rsp+40h] [rbp-30h]
int v8; // [rsp+4Ch] [rbp-24h] BYREF
long long FileExtension; // [rsp+50h] [rbp-20h]
char v10; // [rsp+5Fh] [rbp-11h]
long long v11; // [rsp+60h] [rbp-10h]
long long v12; // [rsp+68h] [rbp-8h]
v12 = a1;
v11 = a2;
v10 = 0;
FileExtension = GetFileExtension(a1);
if ( FileExtension )
{
v8 = 0;
v7 = TextSplit(v11, 59LL, &v8);
memset(v6, 0LL, 17LL);
v2 = TextToLower(FileExtension);
strncpy(v6, v2, 16LL);
for ( i = 0; i < v8; ++i )
{
v3 = TextToLower(*(_QWORD *)(v7 + 8LL * i));
if ( !(unsigned int)strcmp(v6, v3) )
{
v10 = 1;
return v10 & 1;
}
}
}
return v10 & 1;
}
|
IsFileExtension:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV byte ptr [RBP + -0x11],0x0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001d11a0
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001d1189
MOV dword ptr [RBP + -0x24],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x3b
LEA RDX,[RBP + -0x24]
CALL 0x001e72f0
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[RBP + -0x50]
XOR ESI,ESI
MOV EDX,0x11
CALL 0x0010a2d0
LEA RAX,[RBP + -0x50]
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001e3230
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,RAX
MOV EDX,0x10
CALL 0x0010a290
MOV dword ptr [RBP + -0x54],0x0
LAB_001d1142:
MOV EAX,dword ptr [RBP + -0x54]
CMP EAX,dword ptr [RBP + -0x24]
JGE 0x001d1187
LEA RAX,[RBP + -0x50]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RCX,dword ptr [RBP + -0x54]
MOV RDI,qword ptr [RAX + RCX*0x8]
CALL 0x001e3230
MOV RDI,qword ptr [RBP + -0x68]
MOV RSI,RAX
CALL 0x0010a750
CMP EAX,0x0
JNZ 0x001d117a
MOV byte ptr [RBP + -0x11],0x1
JMP 0x001d1187
LAB_001d117a:
JMP 0x001d117c
LAB_001d117c:
MOV EAX,dword ptr [RBP + -0x54]
ADD EAX,0x1
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001d1142
LAB_001d1187:
JMP 0x001d1189
LAB_001d1189:
MOV AL,byte ptr [RBP + -0x11]
AND AL,0x1
ADD RSP,0x70
POP RBP
RET
|
ulong IsFileExtension(int8 param_1,int8 param_2)
{
int iVar1;
ulong uVar2;
char *pcVar3;
int4 extraout_var;
uint local_5c;
char local_58 [32];
long local_38;
int local_2c;
ulong local_28;
int1 local_19;
int8 local_18;
int8 local_10;
local_19 = 0;
local_18 = param_2;
local_10 = param_1;
uVar2 = GetFileExtension(param_1);
if (uVar2 != 0) {
local_2c = 0;
local_28 = uVar2;
local_38 = TextSplit(local_18,0x3b,&local_2c);
memset(local_58,0,0x11);
pcVar3 = (char *)TextToLower(local_28);
strncpy(local_58,pcVar3,0x10);
for (local_5c = 0; uVar2 = (ulong)local_5c, (int)local_5c < local_2c; local_5c = local_5c + 1) {
pcVar3 = (char *)TextToLower(*(int8 *)(local_38 + (long)(int)local_5c * 8));
iVar1 = strcmp(local_58,pcVar3);
uVar2 = CONCAT44(extraout_var,iVar1);
if (iVar1 == 0) {
local_19 = 1;
break;
}
}
}
return CONCAT71((int7)(uVar2 >> 8),local_19) & 0xffffffffffffff01;
}
|
|
14,733
|
IsFileExtension
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
|
bool IsFileExtension(const char *fileName, const char *ext)
{
#define MAX_FILE_EXTENSION_LENGTH 16
bool result = false;
const char *fileExt = GetFileExtension(fileName);
if (fileExt != NULL)
{
#if defined(SUPPORT_MODULE_RTEXT) && defined(SUPPORT_TEXT_MANIPULATION)
int extCount = 0;
const char **checkExts = TextSplit(ext, ';', &extCount); // WARNING: Module required: rtext
char fileExtLower[MAX_FILE_EXTENSION_LENGTH + 1] = { 0 };
strncpy(fileExtLower, TextToLower(fileExt), MAX_FILE_EXTENSION_LENGTH); // WARNING: Module required: rtext
for (int i = 0; i < extCount; i++)
{
if (strcmp(fileExtLower, TextToLower(checkExts[i])) == 0)
{
result = true;
break;
}
}
#else
if (strcmp(fileExt, ext) == 0) result = true;
#endif
}
return result;
}
|
O2
|
c
|
IsFileExtension:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
callq 0x636b4
testq %rax, %rax
je 0x636a5
movq %rax, %r15
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
pushq $0x3b
popq %rsi
movq %rbx, %rdi
callq 0x727e0
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movb $0x0, 0x10(%r14)
movq %r15, %rdi
callq 0x6d783
pushq $0x10
popq %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x9280
xorl %r15d, %r15d
movslq 0xc(%rsp), %rax
cmpq %rax, %r15
setl %bpl
jge 0x636a7
movq (%rbx,%r15,8), %rdi
callq 0x6d783
movq %r14, %rdi
movq %rax, %rsi
callq 0x9750
incq %r15
testl %eax, %eax
jne 0x6367a
jmp 0x636a7
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
IsFileExtension:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
mov rbx, rsi
call GetFileExtension
test rax, rax
jz short loc_636A5
mov r15, rax
lea rdx, [rsp+48h+var_3C]
and dword ptr [rdx], 0
push 3Bh ; ';'
pop rsi
mov rdi, rbx
call TextSplit
mov rbx, rax
lea r14, [rsp+48h+var_38]
mov byte ptr [r14+10h], 0
mov rdi, r15
call TextToLower
push 10h
pop rdx
mov rdi, r14
mov rsi, rax
call _strncpy
xor r15d, r15d
loc_6367A:
movsxd rax, [rsp+48h+var_3C]
cmp r15, rax
setl bpl
jge short loc_636A7
mov rdi, [rbx+r15*8]
call TextToLower
mov rdi, r14
mov rsi, rax
call _strcmp
inc r15
test eax, eax
jnz short loc_6367A
jmp short loc_636A7
loc_636A5:
xor ebp, ebp
loc_636A7:
mov eax, ebp
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long IsFileExtension(long long a1, long long a2)
{
unsigned int v2; // ebp
long long FileExtension; // rax
long long v4; // r15
long long v5; // rbx
long long v6; // rax
long long v7; // r15
long long v8; // rsi
int v10; // [rsp+Ch] [rbp-3Ch] BYREF
_BYTE v11[56]; // [rsp+10h] [rbp-38h] BYREF
FileExtension = GetFileExtension(a1);
if ( FileExtension )
{
v4 = FileExtension;
v10 = 0;
v5 = TextSplit(a2, 59LL, &v10);
v11[16] = 0;
v6 = TextToLower(v4);
strncpy(v11, v6, 16LL);
v7 = 0LL;
do
{
LOBYTE(v2) = v7 < v10;
if ( v7 >= v10 )
break;
v8 = TextToLower(*(_QWORD *)(v5 + 8 * v7++));
}
while ( (unsigned int)strcmp(v11, v8) );
}
else
{
return 0;
}
return v2;
}
|
IsFileExtension:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
CALL 0x001636b4
TEST RAX,RAX
JZ 0x001636a5
MOV R15,RAX
LEA RDX,[RSP + 0xc]
AND dword ptr [RDX],0x0
PUSH 0x3b
POP RSI
MOV RDI,RBX
CALL 0x001727e0
MOV RBX,RAX
LEA R14,[RSP + 0x10]
MOV byte ptr [R14 + 0x10],0x0
MOV RDI,R15
CALL 0x0016d783
PUSH 0x10
POP RDX
MOV RDI,R14
MOV RSI,RAX
CALL 0x00109280
XOR R15D,R15D
LAB_0016367a:
MOVSXD RAX,dword ptr [RSP + 0xc]
CMP R15,RAX
SETL BPL
JGE 0x001636a7
MOV RDI,qword ptr [RBX + R15*0x8]
CALL 0x0016d783
MOV RDI,R14
MOV RSI,RAX
CALL 0x00109750
INC R15
TEST EAX,EAX
JNZ 0x0016367a
JMP 0x001636a7
LAB_001636a5:
XOR EBP,EBP
LAB_001636a7:
MOV EAX,EBP
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong IsFileExtension(int8 param_1,int8 param_2)
{
int iVar1;
long lVar2;
long lVar3;
char *pcVar4;
ulong unaff_RBP;
char local_38 [16];
int1 local_28;
lVar2 = GetFileExtension();
if (lVar2 == 0) {
unaff_RBP = 0;
}
else {
lVar3 = TextSplit(param_2,0x3b);
local_28 = 0;
pcVar4 = (char *)TextToLower(lVar2);
strncpy(local_38,pcVar4,0x10);
lVar2 = 0;
do {
unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),lVar2 < 0);
if (-1 < lVar2) break;
pcVar4 = (char *)TextToLower(*(int8 *)(lVar3 + lVar2 * 8));
iVar1 = strcmp(local_38,pcVar4);
lVar2 = lVar2 + 1;
} while (iVar1 != 0);
}
return unaff_RBP & 0xffffffff;
}
|
|
14,734
|
IsFileExtension
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
|
bool IsFileExtension(const char *fileName, const char *ext)
{
#define MAX_FILE_EXTENSION_LENGTH 16
bool result = false;
const char *fileExt = GetFileExtension(fileName);
if (fileExt != NULL)
{
#if defined(SUPPORT_MODULE_RTEXT) && defined(SUPPORT_TEXT_MANIPULATION)
int extCount = 0;
const char **checkExts = TextSplit(ext, ';', &extCount); // WARNING: Module required: rtext
char fileExtLower[MAX_FILE_EXTENSION_LENGTH + 1] = { 0 };
strncpy(fileExtLower, TextToLower(fileExt), MAX_FILE_EXTENSION_LENGTH); // WARNING: Module required: rtext
for (int i = 0; i < extCount; i++)
{
if (strcmp(fileExtLower, TextToLower(checkExts[i])) == 0)
{
result = true;
break;
}
}
#else
if (strcmp(fileExt, ext) == 0) result = true;
#endif
}
return result;
}
|
O3
|
c
|
IsFileExtension:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x2e, %esi
callq 0xa5d0
movq %rax, %r14
cmpq %r15, %rax
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x75bfa
leaq 0xc(%rsp), %r15
movl $0x0, (%r15)
movq %rbx, %rdi
movl $0x3b, %esi
movq %r15, %rdx
callq 0x85da5
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movb $0x0, 0x10(%r12)
movq %r14, %rdi
callq 0x80678
movl $0x10, %edx
movq %r12, %rdi
movq %rax, %rsi
callq 0xa290
cmpl $0x0, (%r15)
jle 0x75bfa
xorl %r15d, %r15d
leaq 0x10(%rsp), %r14
movq (%rbx,%r15,8), %rdi
callq 0x80678
movq %r14, %rdi
movq %rax, %rsi
callq 0xa760
testl %eax, %eax
sete %al
je 0x75bfc
incq %r15
movslq 0xc(%rsp), %rcx
cmpq %rcx, %r15
jl 0x75bd0
jmp 0x75bfc
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
IsFileExtension:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rsi
mov r15, rdi
mov esi, 2Eh ; '.'
call _strrchr
mov r14, rax
cmp rax, r15
setz al
test r14, r14
setz cl
or cl, al
jnz short loc_75BFA
lea r15, [rsp+48h+var_3C]
mov dword ptr [r15], 0
mov rdi, rbx
mov esi, 3Bh ; ';'
mov rdx, r15
call TextSplit
mov rbx, rax
lea r12, [rsp+48h+var_38]
mov byte ptr [r12+10h], 0
mov rdi, r14
call TextToLower
mov edx, 10h
mov rdi, r12
mov rsi, rax
call _strncpy
cmp dword ptr [r15], 0
jle short loc_75BFA
xor r15d, r15d
lea r14, [rsp+48h+var_38]
loc_75BD0:
mov rdi, [rbx+r15*8]
call TextToLower
mov rdi, r14
mov rsi, rax
call _strcmp
test eax, eax
setz al
jz short loc_75BFC
inc r15
movsxd rcx, [rsp+48h+var_3C]
cmp r15, rcx
jl short loc_75BD0
jmp short loc_75BFC
loc_75BFA:
xor eax, eax
loc_75BFC:
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
|
bool IsFileExtension(long long a1, long long a2)
{
long long v2; // r14
long long v3; // rbx
long long v4; // rax
long long i; // r15
long long v6; // rsi
bool result; // al
int v8; // [rsp+Ch] [rbp-3Ch] BYREF
_BYTE v9[56]; // [rsp+10h] [rbp-38h] BYREF
v2 = strrchr(a1, 46LL);
if ( v2 == a1 || v2 == 0 )
return 0;
v8 = 0;
v3 = TextSplit(a2, 59LL, &v8);
v9[16] = 0;
v4 = TextToLower(v2);
strncpy(v9, v4, 16LL);
if ( v8 <= 0 )
return 0;
for ( i = 0LL; i < v8; ++i )
{
v6 = TextToLower(*(_QWORD *)(v3 + 8 * i));
result = (unsigned int)strcmp(v9, v6) == 0;
if ( result )
break;
}
return result;
}
|
IsFileExtension:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV R15,RDI
MOV ESI,0x2e
CALL 0x0010a5d0
MOV R14,RAX
CMP RAX,R15
SETZ AL
TEST R14,R14
SETZ CL
OR CL,AL
JNZ 0x00175bfa
LEA R15,[RSP + 0xc]
MOV dword ptr [R15],0x0
MOV RDI,RBX
MOV ESI,0x3b
MOV RDX,R15
CALL 0x00185da5
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV byte ptr [R12 + 0x10],0x0
MOV RDI,R14
CALL 0x00180678
MOV EDX,0x10
MOV RDI,R12
MOV RSI,RAX
CALL 0x0010a290
CMP dword ptr [R15],0x0
JLE 0x00175bfa
XOR R15D,R15D
LEA R14,[RSP + 0x10]
LAB_00175bd0:
MOV RDI,qword ptr [RBX + R15*0x8]
CALL 0x00180678
MOV RDI,R14
MOV RSI,RAX
CALL 0x0010a760
TEST EAX,EAX
SETZ AL
JZ 0x00175bfc
INC R15
MOVSXD RCX,dword ptr [RSP + 0xc]
CMP R15,RCX
JL 0x00175bd0
JMP 0x00175bfc
LAB_00175bfa:
XOR EAX,EAX
LAB_00175bfc:
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
int8 IsFileExtension(char *param_1,int8 param_2)
{
int iVar1;
char *pcVar2;
long lVar3;
int4 extraout_var;
int8 uVar4;
long lVar5;
int local_3c;
char local_38 [16];
int1 local_28;
pcVar2 = strrchr(param_1,0x2e);
if (pcVar2 != (char *)0x0 && pcVar2 != param_1) {
local_3c = 0;
lVar3 = TextSplit(param_2,0x3b,&local_3c);
local_28 = 0;
pcVar2 = (char *)TextToLower(pcVar2);
strncpy(local_38,pcVar2,0x10);
if (0 < local_3c) {
lVar5 = 0;
do {
pcVar2 = (char *)TextToLower(*(int8 *)(lVar3 + lVar5 * 8));
iVar1 = strcmp(local_38,pcVar2);
uVar4 = CONCAT71((int7)(CONCAT44(extraout_var,iVar1) >> 8),iVar1 == 0);
if (iVar1 == 0) {
return uVar4;
}
lVar5 = lVar5 + 1;
} while (lVar5 < local_3c);
return uVar4;
}
}
return 0;
}
|
|
14,735
|
testing::AssertionResult::operator!() const
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-assertion-result.cc
|
AssertionResult AssertionResult::operator!() const {
AssertionResult negation(!success_);
if (message_ != nullptr) negation << *message_;
return negation;
}
|
O1
|
cpp
|
testing::AssertionResult::operator!() const:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movb (%rsi), %al
xorb $0x1, %al
movb %al, (%rdi)
movq $0x0, 0x8(%rdi)
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
je 0xf06a
leaq 0x8(%r14), %rbx
movq %r14, %rdi
callq 0xe7ac
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq (%rbx), %rsi
testq %rsi, %rsi
je 0xf088
movq %rbx, %rdi
callq 0xde4a
movq $0x0, (%rbx)
movq %r14, %rdi
callq 0x8990
|
_ZNK7testing15AssertionResultntEv:
push r14
push rbx
push rax; __int64
mov r14, rdi
mov al, [rsi]
xor al, 1
mov [rdi], al
mov qword ptr [rdi+8], 0
mov rsi, [rsi+8]
test rsi, rsi
jz short loc_F06A
lea rbx, [r14+8]
mov rdi, r14; this
call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&)
loc_F06A:
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
mov r14, rax
mov rsi, [rbx]
test rsi, rsi
jz short loc_F088
mov rdi, rbx
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_F088:
mov qword ptr [rbx], 0
mov rdi, r14
call __Unwind_Resume
|
testing::AssertionResult * testing::AssertionResult::operator!(testing::AssertionResult *this, long long a2)
{
_QWORD *v2; // rsi
*(_BYTE *)this = *(_BYTE *)a2 ^ 1;
*((_QWORD *)this + 1) = 0LL;
v2 = *(_QWORD **)(a2 + 8);
if ( v2 )
testing::AssertionResult::operator<<<std::string>(this, v2);
return this;
}
|
IsSubstring:
PUSH RBX
SUB RSP,0x10
MOV RAX,RDX
MOV RDX,RSI
MOV RBX,RDI
LEA R10,[RSP + 0x8]
MOV qword ptr [R10],RCX
MOV R9,RSP
MOV qword ptr [R9],R8
MOV ESI,0x1
MOV RCX,RAX
MOV R8,R10
CALL 0x0011f075
MOV RAX,RBX
ADD RSP,0x10
POP RBX
RET
|
/* testing::IsSubstring(char const*, char const*, wchar_t const*, wchar_t const*) */
testing * __thiscall
testing::IsSubstring(testing *this,char *param_1,char *param_2,wchar_t *param_3,wchar_t *param_4)
{
wchar_t *local_18;
wchar_t *local_10;
local_18 = param_4;
local_10 = param_3;
(anonymous_namespace)::IsSubstringImpl<wchar_t_const*>
((_anonymous_namespace_ *)this,true,param_1,param_2,&local_10,&local_18);
return this;
}
|
|
14,736
|
mi_get_binary_pack_key
|
eloqsql/storage/myisam/mi_search.c
|
uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag,
register uchar **page_pos, register uchar *key)
{
reg1 HA_KEYSEG *keyseg;
uchar *start_key,*page,*page_end,*from,*from_end;
uint length,tmp;
DBUG_ENTER("_mi_get_binary_pack_key");
page= *page_pos;
page_end=page+HA_MAX_KEY_BUFF+1;
start_key=key;
/*
Keys are compressed the following way:
prefix length Packed length of prefix common with prev key (1 or 3 bytes)
for each key segment:
[is null] Null indicator if can be null (1 byte, zero means null)
[length] Packed length if varlength (1 or 3 bytes)
key segment 'length' bytes of key segment value
pointer Reference to the data file (last_keyseg->length).
get_key_length() is a macro. It gets the prefix length from 'page'
and puts it into 'length'. It increments 'page' by 1 or 3, depending
on the packed length of the prefix length.
*/
get_key_length(length,page);
if (length)
{
if (length > keyinfo->maxlength)
{
DBUG_PRINT("error",
("Found too long binary packed key: %u of %u at %p",
length, keyinfo->maxlength, *page_pos));
DBUG_DUMP("key", *page_pos, 16);
goto crashed; /* Wrong key */
}
/* Key is packed against prev key, take prefix from prev key. */
from= key;
from_end= key + length;
}
else
{
/* Key is not packed against prev key, take all from page buffer. */
from= page;
from_end= page_end;
}
/*
The trouble is that key can be split in two parts:
The first part (prefix) is in from .. from_end - 1.
The second part starts at page.
The split can be at every byte position. So we need to check for
the end of the first part before using every byte.
*/
for (keyseg=keyinfo->seg ; keyseg->type ;keyseg++)
{
if (keyseg->flag & HA_NULL_PART)
{
/* If prefix is used up, switch to rest. */
if (from == from_end) { from=page; from_end=page_end; }
if (!(*key++ = *from++))
continue; /* Null part */
}
if (keyseg->flag & (HA_VAR_LENGTH_PART | HA_BLOB_PART | HA_SPACE_PACK))
{
/* If prefix is used up, switch to rest. */
if (from == from_end) { from=page; from_end=page_end; }
/* Get length of dynamic length key part */
if ((length= (*key++ = *from++)) == 255)
{
/* If prefix is used up, switch to rest. */
if (from == from_end) { from=page; from_end=page_end; }
length= (uint) ((*key++ = *from++)) << 8;
/* If prefix is used up, switch to rest. */
if (from == from_end) { from=page; from_end=page_end; }
length+= (uint) ((*key++ = *from++));
}
if (length > keyseg->length)
goto crashed;
}
else
length=keyseg->length;
if ((tmp=(uint) (from_end-from)) <= length)
{
key+=tmp; /* Use old key */
length-=tmp;
from=page; from_end=page_end;
}
DBUG_PRINT("info",("key: %p from: %p length: %u",
key, from, length));
memmove((uchar*) key, (uchar*) from, (size_t) length);
key+=length;
from+=length;
}
/*
Last segment (type == 0) contains length of data pointer.
If we have mixed key blocks with data pointer and key block pointer,
we have to copy both.
*/
length=keyseg->length+nod_flag;
if ((tmp=(uint) (from_end-from)) <= length)
{
/* Remaining length is less or equal max possible length. */
memcpy(key+tmp,page,length-tmp); /* Get last part of key */
*page_pos= page+length-tmp;
}
else
{
/*
Remaining length is greater than max possible length.
This can happen only if we switched to the new key bytes already.
'page_end' is calculated with MI_MAX_KEY_BUFF. So it can be far
behind the real end of the key.
*/
if (from_end != page_end)
{
DBUG_PRINT("error",("Error when unpacking key"));
goto crashed; /* Error */
}
/* Copy data pointer and, if appropriate, key block pointer. */
memcpy((uchar*) key,(uchar*) from,(size_t) length);
*page_pos= from+length;
}
DBUG_RETURN((uint) (key-start_key)+keyseg->length);
crashed:
mi_print_error(keyinfo->share, HA_ERR_CRASHED);
my_errno= HA_ERR_CRASHED;
DBUG_RETURN(0);
}
|
O0
|
c
|
mi_get_binary_pack_key:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
addq $0x4b8, %rax # imm = 0x4B8
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
je 0xc1541
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movzbl (%rax), %eax
movl %eax, -0x5c(%rbp)
jmp 0xc156e
movq -0x40(%rbp), %rax
movzbl 0x2(%rax), %eax
movzwl %ax, %eax
movq -0x40(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x5c(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0xc15a8
movl -0x5c(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl 0x16(%rcx), %ecx
cmpl %ecx, %eax
jbe 0xc1590
jmp 0xc1585
jmp 0xc1587
jmp 0xc1589
jmp 0xc158b
jmp 0xc1867
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movl -0x5c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
jmp 0xc15b8
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpb $0x0, 0x18(%rax)
je 0xc17ba
movq -0x30(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xc1629
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jne 0xc15fc
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movb (%rax), %al
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %al, (%rcx)
cmpb $0x0, %al
jne 0xc1627
jmp 0xc17a9
jmp 0xc1629
movq -0x30(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x29, %eax
cmpl $0x0, %eax
je 0xc172a
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jne 0xc1657
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movb (%rax), %al
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %al, (%rcx)
movzbl %al, %eax
movl %eax, -0x5c(%rbp)
cmpl $0xff, %eax
jne 0xc1714
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jne 0xc16a4
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movb (%rax), %al
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %al, (%rcx)
movzbl %al, %eax
shll $0x8, %eax
movl %eax, -0x5c(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jne 0xc16e9
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movb (%rax), %al
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %al, (%rcx)
movzbl %al, %eax
addl -0x5c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x30(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
cmpl %ecx, %eax
jbe 0xc1728
jmp 0xc1867
jmp 0xc1735
movq -0x30(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x60(%rbp)
cmpl -0x5c(%rbp), %eax
ja 0xc1773
movl -0x60(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x60(%rbp), %ecx
movl -0x5c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x5c(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0xc1775
jmp 0xc1777
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x5c(%rbp), %eax
movl %eax, %edx
callq 0x2a130
movl -0x5c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x5c(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x30(%rbp)
jmp 0xc15c4
movq -0x30(%rbp), %rax
movzwl 0x14(%rax), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x60(%rbp)
cmpl -0x5c(%rbp), %eax
ja 0xc1818
movq -0x28(%rbp), %rdi
movl -0x60(%rbp), %eax
addq %rax, %rdi
movq -0x40(%rbp), %rsi
movl -0x5c(%rbp), %eax
subl -0x60(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x2a090
movq -0x40(%rbp), %rcx
movl -0x5c(%rbp), %eax
addq %rax, %rcx
movl -0x60(%rbp), %eax
movl %eax, %edx
xorl %eax, %eax
subq %rdx, %rax
addq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0xc184b
movq -0x58(%rbp), %rax
cmpq -0x48(%rbp), %rax
je 0xc1828
jmp 0xc1824
jmp 0xc1826
jmp 0xc1867
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x5c(%rbp), %eax
movl %eax, %edx
callq 0x2a090
movq -0x50(%rbp), %rcx
movl -0x5c(%rbp), %eax
addq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0xc184d
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xc1891
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0xae570
callq 0xf60c0
movl $0x7e, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_mi_get_binary_pack_key:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
add rax, 4B8h
add rax, 1
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jz short loc_C1541
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 1
mov [rbp+var_40], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_5C], eax
jmp short loc_C156E
loc_C1541:
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax+2]
movzx eax, ax
mov rcx, [rbp+var_40]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_5C], eax
mov rax, [rbp+var_40]
add rax, 3
mov [rbp+var_40], rax
loc_C156E:
cmp [rbp+var_5C], 0
jz short loc_C15A8
mov eax, [rbp+var_5C]
mov rcx, [rbp+var_10]
movzx ecx, word ptr [rcx+16h]
cmp eax, ecx
jbe short loc_C1590
jmp short $+2
loc_C1585:
jmp short $+2
loc_C1587:
jmp short $+2
loc_C1589:
jmp short $+2
loc_C158B:
jmp loc_C1867
loc_C1590:
mov rax, [rbp+var_28]
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
mov ecx, [rbp+var_5C]
add rax, rcx
mov [rbp+var_58], rax
jmp short loc_C15B8
loc_C15A8:
mov rax, [rbp+var_40]
mov [rbp+var_50], rax
mov rax, [rbp+var_48]
mov [rbp+var_58], rax
loc_C15B8:
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_30], rax
loc_C15C4:
mov rax, [rbp+var_30]
cmp byte ptr [rax+18h], 0
jz loc_C17BA
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+12h]
and eax, 10h
cmp eax, 0
jz short loc_C1629
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
jnz short loc_C15FC
mov rax, [rbp+var_40]
mov [rbp+var_50], rax
mov rax, [rbp+var_48]
mov [rbp+var_58], rax
loc_C15FC:
mov rax, [rbp+var_50]
mov rcx, rax
add rcx, 1
mov [rbp+var_50], rcx
mov al, [rax]
mov rcx, [rbp+var_28]
mov rdx, rcx
add rdx, 1
mov [rbp+var_28], rdx
mov [rcx], al
cmp al, 0
jnz short loc_C1627
jmp loc_C17A9
loc_C1627:
jmp short $+2
loc_C1629:
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+12h]
and eax, 29h
cmp eax, 0
jz loc_C172A
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
jnz short loc_C1657
mov rax, [rbp+var_40]
mov [rbp+var_50], rax
mov rax, [rbp+var_48]
mov [rbp+var_58], rax
loc_C1657:
mov rax, [rbp+var_50]
mov rcx, rax
add rcx, 1
mov [rbp+var_50], rcx
mov al, [rax]
mov rcx, [rbp+var_28]
mov rdx, rcx
add rdx, 1
mov [rbp+var_28], rdx
mov [rcx], al
movzx eax, al
mov [rbp+var_5C], eax
cmp eax, 0FFh
jnz loc_C1714
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
jnz short loc_C16A4
mov rax, [rbp+var_40]
mov [rbp+var_50], rax
mov rax, [rbp+var_48]
mov [rbp+var_58], rax
loc_C16A4:
mov rax, [rbp+var_50]
mov rcx, rax
add rcx, 1
mov [rbp+var_50], rcx
mov al, [rax]
mov rcx, [rbp+var_28]
mov rdx, rcx
add rdx, 1
mov [rbp+var_28], rdx
mov [rcx], al
movzx eax, al
shl eax, 8
mov [rbp+var_5C], eax
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
jnz short loc_C16E9
mov rax, [rbp+var_40]
mov [rbp+var_50], rax
mov rax, [rbp+var_48]
mov [rbp+var_58], rax
loc_C16E9:
mov rax, [rbp+var_50]
mov rcx, rax
add rcx, 1
mov [rbp+var_50], rcx
mov al, [rax]
mov rcx, [rbp+var_28]
mov rdx, rcx
add rdx, 1
mov [rbp+var_28], rdx
mov [rcx], al
movzx eax, al
add eax, [rbp+var_5C]
mov [rbp+var_5C], eax
loc_C1714:
mov eax, [rbp+var_5C]
mov rcx, [rbp+var_30]
movzx ecx, word ptr [rcx+14h]
cmp eax, ecx
jbe short loc_C1728
jmp loc_C1867
loc_C1728:
jmp short loc_C1735
loc_C172A:
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+14h]
mov [rbp+var_5C], eax
loc_C1735:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_50]
sub rax, rcx
mov [rbp+var_60], eax
cmp eax, [rbp+var_5C]
ja short loc_C1773
mov ecx, [rbp+var_60]
mov rax, [rbp+var_28]
mov ecx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov ecx, [rbp+var_60]
mov eax, [rbp+var_5C]
sub eax, ecx
mov [rbp+var_5C], eax
mov rax, [rbp+var_40]
mov [rbp+var_50], rax
mov rax, [rbp+var_48]
mov [rbp+var_58], rax
loc_C1773:
jmp short $+2
loc_C1775:
jmp short $+2
loc_C1777:
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_50]
mov eax, [rbp+var_5C]
mov edx, eax
call _memmove
mov ecx, [rbp+var_5C]
mov rax, [rbp+var_28]
mov ecx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov ecx, [rbp+var_5C]
mov rax, [rbp+var_50]
mov ecx, ecx
add rax, rcx
mov [rbp+var_50], rax
loc_C17A9:
mov rax, [rbp+var_30]
add rax, 20h ; ' '
mov [rbp+var_30], rax
jmp loc_C15C4
loc_C17BA:
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+14h]
add eax, [rbp+var_14]
mov [rbp+var_5C], eax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_50]
sub rax, rcx
mov [rbp+var_60], eax
cmp eax, [rbp+var_5C]
ja short loc_C1818
mov rdi, [rbp+var_28]
mov eax, [rbp+var_60]
add rdi, rax
mov rsi, [rbp+var_40]
mov eax, [rbp+var_5C]
sub eax, [rbp+var_60]
mov eax, eax
mov edx, eax
call _memcpy
mov rcx, [rbp+var_40]
mov eax, [rbp+var_5C]
add rcx, rax
mov eax, [rbp+var_60]
mov edx, eax
xor eax, eax
sub rax, rdx
add rcx, rax
mov rax, [rbp+var_20]
mov [rax], rcx
jmp short loc_C184B
loc_C1818:
mov rax, [rbp+var_58]
cmp rax, [rbp+var_48]
jz short loc_C1828
jmp short $+2
loc_C1824:
jmp short $+2
loc_C1826:
jmp short loc_C1867
loc_C1828:
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_50]
mov eax, [rbp+var_5C]
mov edx, eax
call _memcpy
mov rcx, [rbp+var_50]
mov eax, [rbp+var_5C]
add rcx, rax
mov rax, [rbp+var_20]
mov [rax], rcx
loc_C184B:
jmp short $+2
loc_C184D:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_38]
sub rax, rcx
mov rcx, [rbp+var_30]
movzx ecx, word ptr [rcx+14h]
add eax, ecx
mov [rbp+var_4], eax
jmp short loc_C1891
loc_C1867:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_4], 0
loc_C1891:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long mi_get_binary_pack_key(long long a1, int a2, unsigned __int8 **a3, _BYTE *a4)
{
_BYTE *v4; // rax
_BYTE *v5; // rcx
_BYTE *v6; // rax
_BYTE *v7; // rcx
_BYTE *v8; // rax
_BYTE *v9; // rcx
_BYTE *v10; // rax
_BYTE *v11; // rcx
const char *v12; // rsi
unsigned int v14; // [rsp+0h] [rbp-60h]
int v15; // [rsp+0h] [rbp-60h]
unsigned int v16; // [rsp+4h] [rbp-5Ch]
unsigned int v17; // [rsp+4h] [rbp-5Ch]
int v18; // [rsp+4h] [rbp-5Ch]
unsigned int v19; // [rsp+4h] [rbp-5Ch]
long long v20; // [rsp+8h] [rbp-58h]
_BYTE *v21; // [rsp+10h] [rbp-50h]
_BYTE *v22; // [rsp+10h] [rbp-50h]
long long v23; // [rsp+18h] [rbp-48h]
long long v24; // [rsp+20h] [rbp-40h]
_BYTE *v25; // [rsp+20h] [rbp-40h]
int v26; // [rsp+28h] [rbp-38h]
long long i; // [rsp+30h] [rbp-30h]
_BYTE *v28; // [rsp+38h] [rbp-28h]
_BYTE *v29; // [rsp+38h] [rbp-28h]
v28 = a4;
v24 = (long long)*a3;
v23 = (long long)(*a3 + 1209);
v26 = (int)a4;
if ( **a3 == 255 )
{
v16 = _byteswap_ushort(*(_WORD *)(v24 + 1));
v25 = (_BYTE *)(v24 + 3);
}
else
{
v25 = (_BYTE *)(v24 + 1);
v16 = **a3;
}
if ( v16 )
{
if ( v16 > *(unsigned __int16 *)(a1 + 22) )
goto LABEL_35;
v21 = a4;
v20 = (long long)&a4[v16];
}
else
{
v21 = v25;
v20 = (long long)(*a3 + 1209);
}
for ( i = *(_QWORD *)(a1 + 40); *(_BYTE *)(i + 24); i += 32LL )
{
if ( (*(_WORD *)(i + 18) & 0x10) == 0 )
goto LABEL_14;
if ( v21 == (_BYTE *)v20 )
{
v21 = v25;
v20 = v23;
}
v4 = v21++;
LOBYTE(v4) = *v4;
v5 = v28++;
*v5 = (_BYTE)v4;
if ( (_BYTE)v4 )
{
LABEL_14:
if ( (*(_WORD *)(i + 18) & 0x29) != 0 )
{
if ( v21 == (_BYTE *)v20 )
{
v21 = v25;
v20 = v23;
}
v6 = v21++;
LOBYTE(v6) = *v6;
v7 = v28++;
*v7 = (_BYTE)v6;
v17 = (unsigned __int8)v6;
if ( (unsigned __int8)v6 == 255 )
{
if ( v21 == (_BYTE *)v20 )
{
v21 = v25;
v20 = v23;
}
v8 = v21;
v22 = v21 + 1;
LOBYTE(v8) = *v8;
v9 = v28;
v29 = v28 + 1;
*v9 = (_BYTE)v8;
v18 = (unsigned __int8)v8 << 8;
if ( v22 == (_BYTE *)v20 )
{
v22 = v25;
v20 = v23;
}
v10 = v22;
v21 = v22 + 1;
LOBYTE(v10) = *v10;
v11 = v29;
v28 = v29 + 1;
*v11 = (_BYTE)v10;
v17 = v18 + (unsigned __int8)v10;
}
if ( v17 > *(unsigned __int16 *)(i + 20) )
goto LABEL_35;
}
else
{
v17 = *(unsigned __int16 *)(i + 20);
}
v14 = v20 - (_DWORD)v21;
if ( (int)v20 - (int)v21 <= v17 )
{
v28 += v14;
v17 -= v14;
v21 = v25;
v20 = v23;
}
memmove(v28, v21, v17);
v28 += v17;
v21 += v17;
}
}
v19 = a2 + *(unsigned __int16 *)(i + 20);
v15 = v20 - (_DWORD)v21;
if ( (int)v20 - (int)v21 > v19 )
{
if ( v20 == v23 )
{
memcpy(v28, v21, v19);
*a3 = &v21[v19];
return (unsigned int)(*(unsigned __int16 *)(i + 20) + (_DWORD)v28 - v26);
}
LABEL_35:
v12 = *(const char **)(*(_QWORD *)a1 + 616LL);
mi_report_error(126, (long long)v12);
*(_DWORD *)my_thread_var(126LL, v12) = 126;
return 0;
}
memcpy(&v28[v15], v25, v19 - v15);
*a3 = &v25[v19 - v15];
return (unsigned int)(*(unsigned __int16 *)(i + 20) + (_DWORD)v28 - v26);
}
|
_mi_get_binary_pack_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x4b8
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JZ 0x001c1541
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x40],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x5c],EAX
JMP 0x001c156e
LAB_001c1541:
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX + 0x2]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x40]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
LAB_001c156e:
CMP dword ptr [RBP + -0x5c],0x0
JZ 0x001c15a8
MOV EAX,dword ptr [RBP + -0x5c]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RCX + 0x16]
CMP EAX,ECX
JBE 0x001c1590
JMP 0x001c1585
LAB_001c1585:
JMP 0x001c1587
LAB_001c1587:
JMP 0x001c1589
LAB_001c1589:
JMP 0x001c158b
LAB_001c158b:
JMP 0x001c1867
LAB_001c1590:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x5c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001c15b8
LAB_001c15a8:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x58],RAX
LAB_001c15b8:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x30],RAX
LAB_001c15c4:
MOV RAX,qword ptr [RBP + -0x30]
CMP byte ptr [RAX + 0x18],0x0
JZ 0x001c17ba
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001c1629
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JNZ 0x001c15fc
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x58],RAX
LAB_001c15fc:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x50],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RCX],AL
CMP AL,0x0
JNZ 0x001c1627
JMP 0x001c17a9
LAB_001c1627:
JMP 0x001c1629
LAB_001c1629:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x29
CMP EAX,0x0
JZ 0x001c172a
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JNZ 0x001c1657
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x58],RAX
LAB_001c1657:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x50],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RCX],AL
MOVZX EAX,AL
MOV dword ptr [RBP + -0x5c],EAX
CMP EAX,0xff
JNZ 0x001c1714
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JNZ 0x001c16a4
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x58],RAX
LAB_001c16a4:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x50],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RCX],AL
MOVZX EAX,AL
SHL EAX,0x8
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JNZ 0x001c16e9
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x58],RAX
LAB_001c16e9:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x50],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RCX],AL
MOVZX EAX,AL
ADD EAX,dword ptr [RBP + -0x5c]
MOV dword ptr [RBP + -0x5c],EAX
LAB_001c1714:
MOV EAX,dword ptr [RBP + -0x5c]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RCX + 0x14]
CMP EAX,ECX
JBE 0x001c1728
JMP 0x001c1867
LAB_001c1728:
JMP 0x001c1735
LAB_001c172a:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x5c],EAX
LAB_001c1735:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
MOV dword ptr [RBP + -0x60],EAX
CMP EAX,dword ptr [RBP + -0x5c]
JA 0x001c1773
MOV ECX,dword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV ECX,dword ptr [RBP + -0x60]
MOV EAX,dword ptr [RBP + -0x5c]
SUB EAX,ECX
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x58],RAX
LAB_001c1773:
JMP 0x001c1775
LAB_001c1775:
JMP 0x001c1777
LAB_001c1777:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x5c]
MOV EDX,EAX
CALL 0x0012a130
MOV ECX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV ECX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
LAB_001c17a9:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x20
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001c15c4
LAB_001c17ba:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0x14]
ADD EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
MOV dword ptr [RBP + -0x60],EAX
CMP EAX,dword ptr [RBP + -0x5c]
JA 0x001c1818
MOV RDI,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x60]
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x5c]
SUB EAX,dword ptr [RBP + -0x60]
MOV EAX,EAX
MOV EDX,EAX
CALL 0x0012a090
MOV RCX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x5c]
ADD RCX,RAX
MOV EAX,dword ptr [RBP + -0x60]
MOV EDX,EAX
XOR EAX,EAX
SUB RAX,RDX
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
JMP 0x001c184b
LAB_001c1818:
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x48]
JZ 0x001c1828
JMP 0x001c1824
LAB_001c1824:
JMP 0x001c1826
LAB_001c1826:
JMP 0x001c1867
LAB_001c1828:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x5c]
MOV EDX,EAX
CALL 0x0012a090
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x5c]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
LAB_001c184b:
JMP 0x001c184d
LAB_001c184d:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RCX + 0x14]
ADD EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001c1891
LAB_001c1867:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x001ae570
CALL 0x001f60c0
MOV dword ptr [RAX],0x7e
MOV dword ptr [RBP + -0x4],0x0
LAB_001c1891:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int _mi_get_binary_pack_key(long *param_1,int param_2,int8 *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
uint uVar3;
uint uVar4;
byte *pbVar5;
int4 *puVar6;
byte *pbVar7;
byte *pbVar8;
uint local_64;
byte *local_60;
byte *local_58;
byte *local_48;
long local_38;
byte *local_30;
int local_c;
pbVar7 = (byte *)*param_3;
pbVar5 = pbVar7 + 0x4b9;
if (*pbVar7 == 0xff) {
local_64 = (uint)CONCAT11(pbVar7[1],pbVar7[2]);
local_48 = pbVar7 + 3;
}
else {
local_48 = pbVar7 + 1;
local_64 = (uint)*pbVar7;
}
if (local_64 == 0) {
local_58 = local_48;
local_60 = pbVar5;
LAB_001c15b8:
local_30 = param_4;
for (local_38 = param_1[5]; *(char *)(local_38 + 0x18) != '\0'; local_38 = local_38 + 0x20) {
if ((*(ushort *)(local_38 + 0x12) & 0x10) == 0) {
LAB_001c1629:
if ((*(ushort *)(local_38 + 0x12) & 0x29) == 0) {
local_64 = (uint)*(ushort *)(local_38 + 0x14);
}
else {
if (local_58 == local_60) {
local_58 = local_48;
local_60 = pbVar5;
}
pbVar8 = local_58 + 1;
bVar1 = *local_58;
*local_30 = bVar1;
local_64 = (uint)bVar1;
local_58 = pbVar8;
pbVar7 = local_30 + 1;
if (local_64 == 0xff) {
if (pbVar8 == local_60) {
local_58 = local_48;
local_60 = pbVar5;
}
pbVar7 = local_58 + 1;
bVar1 = *local_58;
local_30[1] = bVar1;
local_58 = pbVar7;
if (pbVar7 == local_60) {
local_58 = local_48;
local_60 = pbVar5;
}
bVar2 = *local_58;
local_30[2] = bVar2;
local_64 = (uint)bVar2 + (uint)bVar1 * 0x100;
local_58 = local_58 + 1;
pbVar7 = local_30 + 3;
}
local_30 = pbVar7;
if (*(ushort *)(local_38 + 0x14) < local_64) goto LAB_001c1867;
}
uVar3 = (int)local_60 - (int)local_58;
if (uVar3 <= local_64) {
local_30 = local_30 + uVar3;
local_64 = local_64 - uVar3;
local_58 = local_48;
local_60 = pbVar5;
}
memmove(local_30,local_58,(ulong)local_64);
local_58 = local_58 + local_64;
local_30 = local_30 + local_64;
}
else {
if (local_58 == local_60) {
local_58 = local_48;
local_60 = pbVar5;
}
pbVar7 = local_58 + 1;
bVar1 = *local_58;
pbVar8 = local_30 + 1;
*local_30 = bVar1;
local_58 = pbVar7;
local_30 = pbVar8;
if (bVar1 != 0) goto LAB_001c1629;
}
}
uVar3 = (uint)*(ushort *)(local_38 + 0x14) + param_2;
uVar4 = (int)local_60 - (int)local_58;
if (uVar3 < uVar4) {
if (local_60 != pbVar5) goto LAB_001c1867;
memcpy(local_30,local_58,(ulong)uVar3);
*param_3 = local_58 + uVar3;
}
else {
memcpy(local_30 + uVar4,local_48,(ulong)(uVar3 - uVar4));
*param_3 = local_48 + ((ulong)uVar3 - (ulong)uVar4);
}
local_c = ((int)local_30 - (int)param_4) + (uint)*(ushort *)(local_38 + 0x14);
}
else {
if (local_64 <= *(ushort *)((long)param_1 + 0x16)) {
local_60 = param_4 + local_64;
local_58 = param_4;
goto LAB_001c15b8;
}
LAB_001c1867:
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x7e;
local_c = 0;
}
return local_c;
}
|
|
14,737
|
minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&)
|
monkey531[P]llama/common/./minja.hpp
|
LiteralExpr(const Location & location, const Value& v)
: Expression(location), value(v) {}
|
O3
|
cpp
|
minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x9ef41(%rip), %r15 # 0xee288
movq %r15, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x4f373
movq 0xa0c3b(%rip), %rcx # 0xeffa0
cmpb $0x0, (%rcx)
je 0x4f36f
incl 0x8(%rax)
jmp 0x4f373
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x9f1c6(%rip), %rax # 0xee548
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
movq %rdx, %rsi
callq 0x4ed98
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4f3ab
callq 0x2f80e
movq %r14, %rdi
callq 0x18b90
nop
|
_ZN5minja11LiteralExprC2ERKNS_8LocationERKNS_5ValueE:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, off_EE288
mov [rdi], r15
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_4F373
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_4F36F
inc dword ptr [rax+8]
jmp short loc_4F373
loc_4F36F:
lock inc dword ptr [rax+8]
loc_4F373:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, off_EE548
mov [rbx], rax
lea rdi, [rbx+20h]; this
mov rsi, rdx; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r15
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_4F3AB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_4F3AB:
mov rdi, r14
call __Unwind_Resume
|
long long minja::LiteralExpr::LiteralExpr(_QWORD *a1, _QWORD *a2, const minja::Value *a3)
{
long long v3; // rax
*a1 = &off_EE288;
a1[1] = *a2;
v3 = a2[1];
a1[2] = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v3 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v3 + 8));
}
a1[3] = a2[2];
*a1 = &off_EE548;
return minja::Value::Value((minja::Value *)(a1 + 4), a3);
}
|
LiteralExpr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[0x1ee288]
MOV qword ptr [RDI],R15
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x0014f373
MOV RCX,qword ptr [0x001effa0]
CMP byte ptr [RCX],0x0
JZ 0x0014f36f
INC dword ptr [RAX + 0x8]
JMP 0x0014f373
LAB_0014f36f:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0014f373:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x1ee548]
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LAB_0014f389:
MOV RSI,RDX
CALL 0x0014ed98
LAB_0014f391:
POP RBX
POP R14
POP R15
RET
|
/* minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&) */
void __thiscall minja::LiteralExpr::LiteralExpr(LiteralExpr *this,Location *param_1,Value *param_2)
{
long lVar1;
*(int ***)this = &PTR___cxa_pure_virtual_001ee288;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_evaluate_001ee548;
/* try { // try from 0014f389 to 0014f390 has its CatchHandler @ 0014f397 */
minja::Value::Value((Value *)(this + 0x20),param_2);
return;
}
|
|
14,738
|
ImPlot3D::SetupAxisLimits(int, double, double, int)
|
zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d.cpp
|
void SetupAxisLimits(ImAxis3D idx, double min_lim, double max_lim, ImPlot3DCond cond) {
ImPlot3DContext& gp = *GImPlot3D;
IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked,
"SetupAxisLimits() needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!");
ImPlot3DPlot& plot = *gp.CurrentPlot;
ImPlot3DAxis& axis = plot.Axes[idx];
if (!plot.Initialized || cond == ImPlot3DCond_Always) {
axis.SetRange(min_lim, max_lim);
axis.RangeCond = cond;
axis.FitThisFrame = false;
}
}
|
O0
|
cpp
|
ImPlot3D::SetupAxisLimits(int, double, double, int):
subq $0x38, %rsp
movl %edi, 0x34(%rsp)
movsd %xmm0, 0x28(%rsp)
movsd %xmm1, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x5be519(%rip), %rax # 0x68f638
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0xd1142
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rax
testb $0x1, 0x1e8(%rax)
je 0xd1156
leaq 0x5010e1(%rip), %rdi # 0x5d222a
callq 0x4f7220
testb $0x1, %al
jne 0xd1154
jmp 0xd1156
jmp 0xd1156
jmp 0xd1158
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x78, %rax
movslq 0x34(%rsp), %rcx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
testb $0x1, 0x21(%rax)
je 0xd1191
cmpl $0x1, 0x1c(%rsp)
jne 0xd11b9
movq (%rsp), %rdi
movsd 0x28(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
callq 0xd9770
movl 0x1c(%rsp), %ecx
movq (%rsp), %rax
movl %ecx, 0x10(%rax)
movq (%rsp), %rax
movb $0x0, 0x61(%rax)
addq $0x38, %rsp
retq
nop
|
_ZN8ImPlot3D15SetupAxisLimitsEiddi:
sub rsp, 38h
mov [rsp+38h+var_4], edi
movsd [rsp+38h+var_10], xmm0
movsd [rsp+38h+var_18], xmm1
mov [rsp+38h+var_1C], esi
mov rax, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_28]
cmp qword ptr [rax+28h], 0
jz short loc_D1142
mov rax, [rsp+38h+var_28]
mov rax, [rax+28h]
test byte ptr [rax+1E8h], 1
jz short loc_D1156
loc_D1142:
lea rdi, aSetupaxislimit; "SetupAxisLimits() needs to be called af"...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
test al, 1
jnz short loc_D1154
jmp short loc_D1156
loc_D1154:
jmp short $+2
loc_D1156:
jmp short $+2
loc_D1158:
mov rax, [rsp+38h+var_28]
mov rax, [rax+28h]
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_30]
add rax, 78h ; 'x'
movsxd rcx, [rsp+38h+var_4]
imul rcx, 70h ; 'p'
add rax, rcx
mov [rsp+38h+var_38], rax
mov rax, [rsp+38h+var_30]
test byte ptr [rax+21h], 1
jz short loc_D1191
cmp [rsp+38h+var_1C], 1
jnz short loc_D11B9
loc_D1191:
mov rdi, [rsp+38h+var_38]; this
movsd xmm0, [rsp+38h+var_10]; double
movsd xmm1, [rsp+38h+var_18]; double
call _ZN12ImPlot3DAxis8SetRangeEdd; ImPlot3DAxis::SetRange(double,double)
mov ecx, [rsp+38h+var_1C]
mov rax, [rsp+38h+var_38]
mov [rax+10h], ecx
mov rax, [rsp+38h+var_38]
mov byte ptr [rax+61h], 0
loc_D11B9:
add rsp, 38h
retn
|
long long ImPlot3D::SetupAxisLimits(ImPlot3D *this, const char *a2, double a3, double a4)
{
long long result; // rax
ImPlot3DAxis *v5; // [rsp+0h] [rbp-38h]
long long v6; // [rsp+8h] [rbp-30h]
long long v7; // [rsp+10h] [rbp-28h]
v7 = ImPlot3D::GImPlot3D;
if ( !*(_QWORD *)(ImPlot3D::GImPlot3D + 40) || (*(_BYTE *)(*(_QWORD *)(ImPlot3D::GImPlot3D + 40) + 488LL) & 1) != 0 )
ImGui::ErrorLog(
(ImGui *)"SetupAxisLimits() needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!",
a2);
v6 = *(_QWORD *)(v7 + 40);
v5 = (ImPlot3DAxis *)(112LL * (int)this + v6 + 120);
result = v6;
if ( (*(_BYTE *)(v6 + 33) & 1) == 0 || (_DWORD)a2 == 1 )
{
ImPlot3DAxis::SetRange(v5, a3, a4);
*((_DWORD *)v5 + 4) = (_DWORD)a2;
result = 112LL * (int)this + v6 + 120;
*((_BYTE *)v5 + 97) = 0;
}
return result;
}
|
SetupAxisLimits:
SUB RSP,0x38
MOV dword ptr [RSP + 0x34],EDI
MOVSD qword ptr [RSP + 0x28],XMM0
MOVSD qword ptr [RSP + 0x20],XMM1
MOV dword ptr [RSP + 0x1c],ESI
MOV RAX,qword ptr [0x0078f638]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x001d1142
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x28]
TEST byte ptr [RAX + 0x1e8],0x1
JZ 0x001d1156
LAB_001d1142:
LEA RDI,[0x6d222a]
CALL 0x005f7220
TEST AL,0x1
JNZ 0x001d1154
JMP 0x001d1156
LAB_001d1154:
JMP 0x001d1156
LAB_001d1156:
JMP 0x001d1158
LAB_001d1158:
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x78
MOVSXD RCX,dword ptr [RSP + 0x34]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x8]
TEST byte ptr [RAX + 0x21],0x1
JZ 0x001d1191
CMP dword ptr [RSP + 0x1c],0x1
JNZ 0x001d11b9
LAB_001d1191:
MOV RDI,qword ptr [RSP]
MOVSD XMM0,qword ptr [RSP + 0x28]
MOVSD XMM1,qword ptr [RSP + 0x20]
CALL 0x001d9770
MOV ECX,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RSP]
MOV byte ptr [RAX + 0x61],0x0
LAB_001d11b9:
ADD RSP,0x38
RET
|
/* ImPlot3D::SetupAxisLimits(int, double, double, int) */
void ImPlot3D::SetupAxisLimits(int param_1,double param_2,double param_3,int param_4)
{
long lVar1;
ImPlot3DAxis *this;
lVar1 = GImPlot3D;
if ((*(long *)(GImPlot3D + 0x28) == 0) ||
((*(byte *)(*(long *)(GImPlot3D + 0x28) + 0x1e8) & 1) != 0)) {
ImGui::ErrorLog(
"SetupAxisLimits() needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!"
);
}
this = (ImPlot3DAxis *)(*(long *)(lVar1 + 0x28) + 0x78 + (long)param_1 * 0x70);
if (((*(byte *)(*(long *)(lVar1 + 0x28) + 0x21) & 1) == 0) || (param_4 == 1)) {
ImPlot3DAxis::SetRange(this,param_2,param_3);
*(int *)(this + 0x10) = param_4;
this[0x61] = (ImPlot3DAxis)0x0;
}
return;
}
|
|
14,739
|
ftxui::ComponentBase::OnEvent(ftxui::Event)
|
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/component.cpp
|
bool ComponentBase::OnEvent(Event event) { // NOLINT
for (Component& child : children_) { // NOLINT
if (child->OnEvent(event)) {
return true;
}
}
return false;
}
|
O2
|
cpp
|
ftxui::ComponentBase::OnEvent(ftxui::Event):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %r13
leaq 0x8(%rsp), %r15
movq %rax, %rbx
cmpq %r13, %rax
je 0x21c82
movq (%rbx), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x219dc
movq (%r12), %rax
movq %r12, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movl %eax, %ebp
leaq 0x28(%rsp), %rdi
callq 0xc8c8
leaq 0x10(%rbx), %rax
testb %bpl, %bpl
je 0x21c4a
cmpq %r13, %rbx
setne %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0xc8c8
movq %r14, %rdi
callq 0xc7f0
|
_ZN5ftxui13ComponentBase7OnEventENS_5EventE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rax, [rdi+8]
mov r13, [rdi+10h]
lea r15, [rsp+78h+var_70]
loc_21C4A:
mov rbx, rax
cmp rax, r13
jz short loc_21C82
mov r12, [rbx]
mov rdi, r15; this
mov rsi, r14; ftxui::Event *
call _ZN5ftxui5EventC2ERKS0_; ftxui::Event::Event(ftxui::Event const&)
mov rax, [r12]
mov rdi, r12
mov rsi, r15
call qword ptr [rax+18h]
mov ebp, eax
lea rdi, [rsp+78h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rax, [rbx+10h]
test bpl, bpl
jz short loc_21C4A
loc_21C82:
cmp rbx, r13
setnz al
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
|
bool ftxui::ComponentBase::OnEvent(long long a1, const ftxui::Event *a2)
{
_QWORD *v2; // rax
_QWORD *v3; // r13
_QWORD *v4; // rbx
long long v5; // r12
char v6; // bp
_BYTE v8[32]; // [rsp+8h] [rbp-70h] BYREF
_BYTE v9[80]; // [rsp+28h] [rbp-50h] BYREF
v2 = *(_QWORD **)(a1 + 8);
v3 = *(_QWORD **)(a1 + 16);
do
{
v4 = v2;
if ( v2 == v3 )
break;
v5 = *v2;
ftxui::Event::Event((ftxui::Event *)v8, a2);
v6 = (*(long long ( **)(long long, _BYTE *))(*(_QWORD *)v5 + 24LL))(v5, v8);
std::string::~string(v9);
v2 = v4 + 2;
}
while ( !v6 );
return v4 != v3;
}
|
OnEvent:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RAX,qword ptr [RDI + 0x8]
MOV R13,qword ptr [RDI + 0x10]
LEA R15,[RSP + 0x8]
LAB_00121c4a:
MOV RBX,RAX
CMP RAX,R13
JZ 0x00121c82
MOV R12,qword ptr [RBX]
MOV RDI,R15
MOV RSI,R14
CALL 0x001219dc
MOV RAX,qword ptr [R12]
LAB_00121c64:
MOV RDI,R12
MOV RSI,R15
CALL qword ptr [RAX + 0x18]
LAB_00121c6d:
MOV EBP,EAX
LEA RDI,[RSP + 0x28]
CALL 0x0010c8c8
LEA RAX,[RBX + 0x10]
TEST BPL,BPL
JZ 0x00121c4a
LAB_00121c82:
CMP RBX,R13
SETNZ AL
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ftxui::ComponentBase::OnEvent(ftxui::Event) */
int8 __thiscall ftxui::ComponentBase::OnEvent(ComponentBase *this,Event *param_2)
{
int8 *puVar1;
long *plVar2;
char cVar3;
int8 *puVar4;
int8 *puVar5;
Event local_70 [32];
string local_50 [32];
puVar1 = *(int8 **)(this + 0x10);
puVar5 = *(int8 **)(this + 8);
do {
puVar4 = puVar5;
puVar5 = puVar4;
if (puVar4 == puVar1) break;
plVar2 = (long *)*puVar4;
Event::Event(local_70,param_2);
/* try { // try from 00121c64 to 00121c6c has its CatchHandler @ 00121c97 */
cVar3 = (**(code **)(*plVar2 + 0x18))(plVar2,local_70);
std::__cxx11::string::~string(local_50);
puVar5 = puVar4 + 2;
} while (cVar3 == '\0');
return CONCAT71((int7)((ulong)puVar5 >> 8),puVar4 != puVar1);
}
|
|
14,740
|
common_log_entry::print(_IO_FILE*) const
|
monkey531[P]llama/common/log.cpp
|
void print(FILE * file = nullptr) const {
FILE * fcur = file;
if (!fcur) {
// stderr displays DBG messages only when their verbosity level is not higher than the threshold
// these messages will still be logged to a file
if (level == GGML_LOG_LEVEL_DEBUG && common_log_verbosity_thold < LOG_DEFAULT_DEBUG) {
return;
}
fcur = stdout;
if (level != GGML_LOG_LEVEL_NONE) {
fcur = stderr;
}
}
if (level != GGML_LOG_LEVEL_NONE && level != GGML_LOG_LEVEL_CONT && prefix) {
if (timestamp) {
// [M.s.ms.us]
fprintf(fcur, "%s%d.%02d.%03d.%03d%s ",
g_col[COMMON_LOG_COL_BLUE],
(int) (timestamp / 1000000 / 60),
(int) (timestamp / 1000000 % 60),
(int) (timestamp / 1000 % 1000),
(int) (timestamp % 1000),
g_col[COMMON_LOG_COL_DEFAULT]);
}
switch (level) {
case GGML_LOG_LEVEL_INFO: fprintf(fcur, "%sI %s", g_col[COMMON_LOG_COL_GREEN], g_col[COMMON_LOG_COL_DEFAULT]); break;
case GGML_LOG_LEVEL_WARN: fprintf(fcur, "%sW %s", g_col[COMMON_LOG_COL_MAGENTA], "" ); break;
case GGML_LOG_LEVEL_ERROR: fprintf(fcur, "%sE %s", g_col[COMMON_LOG_COL_RED], "" ); break;
case GGML_LOG_LEVEL_DEBUG: fprintf(fcur, "%sD %s", g_col[COMMON_LOG_COL_YELLOW], "" ); break;
default:
break;
}
}
fprintf(fcur, "%s", msg.data());
if (level == GGML_LOG_LEVEL_WARN || level == GGML_LOG_LEVEL_ERROR || level == GGML_LOG_LEVEL_DEBUG) {
fprintf(fcur, "%s", g_col[COMMON_LOG_COL_DEFAULT]);
}
fflush(fcur);
}
|
O3
|
cpp
|
common_log_entry::print(_IO_FILE*) const:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %eax
testq %rsi, %rsi
jne 0xcc87e
cmpl $0x1, %eax
jne 0xcc867
leaq 0x60bcc(%rip), %rcx # 0x12d428
cmpl $0x0, (%rcx)
jg 0xcc867
popq %rbx
popq %r14
popq %r15
retq
testl %eax, %eax
jne 0xcc874
movq 0x5f6a6(%rip), %rcx # 0x12bf18
jmp 0xcc87b
movq 0x5f715(%rip), %rcx # 0x12bf90
movq (%rcx), %r14
testl %eax, %eax
je 0xcc9fb
cmpl $0x5, %eax
je 0xcc9fb
cmpb $0x1, 0x4(%rbx)
jne 0xcc9fb
movq 0x8(%rbx), %r10
testq %r10, %r10
je 0xcc982
movq 0x60b83(%rip), %r15 # 0x12d430
movq 0x28(%r15), %r9
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
movq %r10, %rax
imulq %rcx
movq %rdx, %rcx
movq %rdx, %r8
shrq $0x3f, %r8
sarq $0x12, %rcx
movabsq $-0x70d59cc6bc5928d7, %rdx # imm = 0x8F2A633943A6D729
movq %r10, %rax
imulq %rdx
addq %rcx, %r8
leaq (%rdx,%r10), %rcx
movq %rcx, %rax
shrq $0x3f, %rax
shrq $0x19, %rcx
addl %eax, %ecx
movabsq $-0x7777777777777777, %rdx # imm = 0x8888888888888889
movq %r8, %rax
imulq %rdx
addq %r8, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x5, %rdx
addl %eax, %edx
imull $0x3c, %edx, %eax
subl %eax, %r8d
movabsq $0x20c49ba5e353f7cf, %rsi # imm = 0x20C49BA5E353F7CF
movq %r10, %rax
imulq %rsi
movq %rdx, %r11
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %r11
addq %rax, %r11
movq %r11, %rax
imulq %rsi
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x7, %rdx
addl %eax, %edx
imull $0x3e8, %edx, %eax # imm = 0x3E8
imull $0x3e8, %r11d, %edx # imm = 0x3E8
subl %eax, %r11d
subl %edx, %r10d
leaq 0x28675(%rip), %rsi # 0xf4fdc
movq %r14, %rdi
movq %r9, %rdx
movl %r11d, %r9d
xorl %eax, %eax
pushq (%r15)
pushq %r10
callq 0x1acc0
addq $0x10, %rsp
movl (%rbx), %eax
decl %eax
cmpl $0x3, %eax
ja 0xcc9fb
leaq 0x2863c(%rip), %rcx # 0xf4fcc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x60a90(%rip), %rax # 0x12d430
movq 0x20(%rax), %rdx
leaq 0x2865d(%rip), %rsi # 0xf5008
jmp 0xcc9d3
movq 0x60a7c(%rip), %rax # 0x12d430
movq 0x30(%rax), %rdx
leaq 0x2863b(%rip), %rsi # 0xf4ffa
jmp 0xcc9d3
movq 0x60a68(%rip), %rax # 0x12d430
movq 0x10(%rax), %rdx
leaq 0x2862e(%rip), %rsi # 0xf5001
leaq 0x1f0fc(%rip), %rcx # 0xebad6
jmp 0xcc9f1
movq 0x60a4d(%rip), %rax # 0x12d430
movq (%rax), %rcx
movq 0x18(%rax), %rdx
leaq 0x28602(%rip), %rsi # 0xf4ff3
movq %r14, %rdi
xorl %eax, %eax
callq 0x1acc0
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x1a9d0
movl (%rbx), %eax
cmpl $0x4, %eax
ja 0xcca2a
movl $0x1a, %ecx
btl %eax, %ecx
jae 0xcca2a
movq 0x60a11(%rip), %rax # 0x12d430
movq (%rax), %rdi
movq %r14, %rsi
callq 0x1a9d0
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1aa40
nop
|
_ZNK16common_log_entry5printEP8_IO_FILE:
push r15
push r14
push rbx
mov r14, rsi
mov rbx, rdi
mov eax, [rdi]
test rsi, rsi
jnz short loc_CC87E
cmp eax, 1
jnz short loc_CC867
lea rcx, common_log_verbosity_thold
cmp dword ptr [rcx], 0
jg short loc_CC867
pop rbx
pop r14
pop r15
retn
loc_CC867:
test eax, eax
jnz short loc_CC874
mov rcx, cs:stdout_ptr
jmp short loc_CC87B
loc_CC874:
mov rcx, cs:stderr_ptr
loc_CC87B:
mov r14, [rcx]
loc_CC87E:
test eax, eax
jz def_CC997; jumptable 00000000000CC997 default case
cmp eax, 5
jz def_CC997; jumptable 00000000000CC997 default case
cmp byte ptr [rbx+4], 1
jnz def_CC997; jumptable 00000000000CC997 default case
mov r10, [rbx+8]
test r10, r10
jz loc_CC982
mov r15, cs:_ZL5g_col; g_col
mov r9, [r15+28h]
mov rcx, 431BDE82D7B634DBh
mov rax, r10
imul rcx
mov rcx, rdx
mov r8, rdx
shr r8, 3Fh
sar rcx, 12h
mov rdx, 8F2A633943A6D729h
mov rax, r10
imul rdx
add r8, rcx
lea rcx, [rdx+r10]
mov rax, rcx
shr rax, 3Fh
shr rcx, 19h
add ecx, eax
mov rdx, 8888888888888889h
mov rax, r8
imul rdx
add rdx, r8
mov rax, rdx
shr rax, 3Fh
shr rdx, 5
add edx, eax
imul eax, edx, 3Ch ; '<'
sub r8d, eax
mov rsi, 20C49BA5E353F7CFh
mov rax, r10
imul rsi
mov r11, rdx
mov rax, rdx
shr rax, 3Fh
sar r11, 7
add r11, rax
mov rax, r11
imul rsi
mov rax, rdx
shr rax, 3Fh
shr rdx, 7
add edx, eax
imul eax, edx, 3E8h
imul edx, r11d, 3E8h
sub r11d, eax
sub r10d, edx
lea rsi, aSD02d03d03dS; "%s%d.%02d.%03d.%03d%s "
mov rdi, r14
mov rdx, r9
mov r9d, r11d
xor eax, eax
push qword ptr [r15]
push r10
call _fprintf
add rsp, 10h
mov eax, [rbx]
loc_CC982:
dec eax; switch 4 cases
cmp eax, 3
ja short def_CC997; jumptable 00000000000CC997 default case
lea rcx, jpt_CC997
movsxd rax, ds:(jpt_CC997 - 0F4FCCh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_CC999:
mov rax, cs:_ZL5g_col; jumptable 00000000000CC997 case 1
mov rdx, [rax+20h]
lea rsi, aSdS; "%sD %s"
jmp short loc_CC9D3
loc_CC9AD:
mov rax, cs:_ZL5g_col; jumptable 00000000000CC997 case 3
mov rdx, [rax+30h]
lea rsi, aSwS; "%sW %s"
jmp short loc_CC9D3
loc_CC9C1:
mov rax, cs:_ZL5g_col; jumptable 00000000000CC997 case 4
mov rdx, [rax+10h]
lea rsi, aSeS; "%sE %s"
loc_CC9D3:
lea rcx, aErrorWhileHand_0+34h; ""
jmp short loc_CC9F1
loc_CC9DC:
mov rax, cs:_ZL5g_col; jumptable 00000000000CC997 case 2
mov rcx, [rax]
mov rdx, [rax+18h]
lea rsi, aSiS; "%sI %s"
loc_CC9F1:
mov rdi, r14
xor eax, eax
call _fprintf
def_CC997:
mov rdi, [rbx+10h]; jumptable 00000000000CC997 default case
mov rsi, r14
call _fputs
mov eax, [rbx]
cmp eax, 4
ja short loc_CCA2A
mov ecx, 1Ah
bt ecx, eax
jnb short loc_CCA2A
mov rax, cs:_ZL5g_col; g_col
mov rdi, [rax]
mov rsi, r14
call _fputs
loc_CCA2A:
mov rdi, r14
pop rbx
pop r14
pop r15
jmp _fflush
|
long long common_log_entry::print(unsigned int *a1, long long a2)
{
long long v2; // r14
long long result; // rax
long long *v4; // rcx
long long v5; // r10
long long v6; // rdx
const char *v7; // rsi
char *v8; // rcx
int v9; // ecx
v2 = a2;
result = *a1;
if ( !a2 )
{
if ( (_DWORD)result == 1 && common_log_verbosity_thold[0] <= 0 )
return result;
if ( (_DWORD)result )
v4 = (long long *)&stderr;
else
v4 = (long long *)&stdout;
v2 = *v4;
}
if ( (_DWORD)result && (_DWORD)result != 5 && *((_BYTE *)a1 + 4) == 1 )
{
v5 = *((_QWORD *)a1 + 1);
if ( v5 )
{
fprintf(
v2,
"%s%d.%02d.%03d.%03d%s ",
*(const char **)(g_col + 40),
(int)v5 / 60000000,
(int)(v5 / 1000000) % 60,
(int)(v5 / 1000) % 1000,
v5 % 1000,
*(const char **)g_col);
LODWORD(result) = *a1;
}
switch ( (int)result )
{
case 1:
v6 = *(_QWORD *)(g_col + 32);
v7 = "%sD %s";
goto LABEL_17;
case 2:
v8 = *(char **)g_col;
v6 = *(_QWORD *)(g_col + 24);
v7 = "%sI %s";
goto LABEL_19;
case 3:
v6 = *(_QWORD *)(g_col + 48);
v7 = "%sW %s";
goto LABEL_17;
case 4:
v6 = *(_QWORD *)(g_col + 16);
v7 = "%sE %s";
LABEL_17:
v8 = "";
LABEL_19:
fprintf(v2, v7, v6, v8);
break;
default:
break;
}
}
fputs(*((_QWORD *)a1 + 2), v2);
if ( *a1 <= 4 )
{
v9 = 26;
if ( _bittest(&v9, *a1) )
fputs(*(_QWORD *)g_col, v2);
}
return fflush(v2);
}
|
print:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
MOV EAX,dword ptr [RDI]
TEST RSI,RSI
JNZ 0x001cc87e
CMP EAX,0x1
JNZ 0x001cc867
LEA RCX,[0x22d428]
CMP dword ptr [RCX],0x0
JG 0x001cc867
POP RBX
POP R14
POP R15
RET
LAB_001cc867:
TEST EAX,EAX
JNZ 0x001cc874
MOV RCX,qword ptr [0x0022bf18]
JMP 0x001cc87b
LAB_001cc874:
MOV RCX,qword ptr [0x0022bf90]
LAB_001cc87b:
MOV R14,qword ptr [RCX]
LAB_001cc87e:
TEST EAX,EAX
JZ 0x001cc9fb
CMP EAX,0x5
JZ 0x001cc9fb
CMP byte ptr [RBX + 0x4],0x1
JNZ 0x001cc9fb
MOV R10,qword ptr [RBX + 0x8]
TEST R10,R10
JZ 0x001cc982
MOV R15,qword ptr [0x0022d430]
MOV R9,qword ptr [R15 + 0x28]
MOV RCX,0x431bde82d7b634db
MOV RAX,R10
IMUL RCX
MOV RCX,RDX
MOV R8,RDX
SHR R8,0x3f
SAR RCX,0x12
MOV RDX,-0x70d59cc6bc5928d7
MOV RAX,R10
IMUL RDX
ADD R8,RCX
LEA RCX,[RDX + R10*0x1]
MOV RAX,RCX
SHR RAX,0x3f
SHR RCX,0x19
ADD ECX,EAX
MOV RDX,-0x7777777777777777
MOV RAX,R8
IMUL RDX
ADD RDX,R8
MOV RAX,RDX
SHR RAX,0x3f
SHR RDX,0x5
ADD EDX,EAX
IMUL EAX,EDX,0x3c
SUB R8D,EAX
MOV RSI,0x20c49ba5e353f7cf
MOV RAX,R10
IMUL RSI
MOV R11,RDX
MOV RAX,RDX
SHR RAX,0x3f
SAR R11,0x7
ADD R11,RAX
MOV RAX,R11
IMUL RSI
MOV RAX,RDX
SHR RAX,0x3f
SHR RDX,0x7
ADD EDX,EAX
IMUL EAX,EDX,0x3e8
IMUL EDX,R11D,0x3e8
SUB R11D,EAX
SUB R10D,EDX
LEA RSI,[0x1f4fdc]
MOV RDI,R14
MOV RDX,R9
MOV R9D,R11D
XOR EAX,EAX
PUSH qword ptr [R15]
PUSH R10
CALL 0x0011acc0
ADD RSP,0x10
MOV EAX,dword ptr [RBX]
LAB_001cc982:
DEC EAX
CMP EAX,0x3
JA 0x001cc9fb
LEA RCX,[0x1f4fcc]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [0x0022d430]
MOV RDX,qword ptr [RAX + 0x20]
LEA RSI,[0x1f5008]
JMP 0x001cc9d3
caseD_3:
MOV RAX,qword ptr [0x0022d430]
MOV RDX,qword ptr [RAX + 0x30]
LEA RSI,[0x1f4ffa]
JMP 0x001cc9d3
caseD_4:
MOV RAX,qword ptr [0x0022d430]
MOV RDX,qword ptr [RAX + 0x10]
LEA RSI,[0x1f5001]
LAB_001cc9d3:
LEA RCX,[0x1ebad6]
JMP 0x001cc9f1
caseD_2:
MOV RAX,qword ptr [0x0022d430]
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x18]
LEA RSI,[0x1f4ff3]
LAB_001cc9f1:
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011acc0
default:
MOV RDI,qword ptr [RBX + 0x10]
MOV RSI,R14
CALL 0x0011a9d0
MOV EAX,dword ptr [RBX]
CMP EAX,0x4
JA 0x001cca2a
MOV ECX,0x1a
BT ECX,EAX
JNC 0x001cca2a
MOV RAX,qword ptr [0x0022d430]
MOV RDI,qword ptr [RAX]
MOV RSI,R14
CALL 0x0011a9d0
LAB_001cca2a:
MOV RDI,R14
POP RBX
POP R14
POP R15
JMP 0x0011aa40
|
/* common_log_entry::print(_IO_FILE*) const */
void __thiscall common_log_entry::print(common_log_entry *this,_IO_FILE *param_1)
{
long lVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int8 *puVar4;
char *pcVar5;
int8 uVar6;
char *__format;
int iVar7;
iVar7 = *(int *)this;
if (param_1 == (_IO_FILE *)0x0) {
if ((iVar7 == 1) && (common_log_verbosity_thold < 1)) {
return;
}
puVar4 = (int8 *)PTR_stderr_0022bf90;
if (iVar7 == 0) {
puVar4 = (int8 *)PTR_stdout_0022bf18;
}
param_1 = (_IO_FILE *)*puVar4;
}
if (((iVar7 == 0) || (iVar7 == 5)) || (this[4] != (common_log_entry)0x1))
goto switchD_001cc997_default;
lVar1 = *(long *)(this + 8);
if (lVar1 != 0) {
auVar3 = SEXT816(lVar1 / 1000000) * ZEXT816(0x8888888888888889);
auVar2 = SEXT816(lVar1 / 1000) * SEXT816(0x20c49ba5e353f7cf);
iVar7 = (int)(lVar1 / 1000);
fprintf(param_1,"%s%d.%02d.%03d.%03d%s ",g_col[5],
(ulong)(uint)((int)(SUB168(SEXT816(lVar1) * ZEXT816(0x8f2a633943a6d729),8) >> 0x19) -
(SUB164(SEXT816(lVar1) * ZEXT816(0x8f2a633943a6d729),0xc) >> 0x1f)),
(ulong)(uint)((int)(lVar1 / 1000000) +
((int)(auVar3._8_8_ >> 5) - (auVar3._12_4_ >> 0x1f)) * -0x3c),
(ulong)(uint)(iVar7 + ((int)(auVar2._8_8_ >> 7) - (auVar2._12_4_ >> 0x1f)) * -1000),
(ulong)(uint)((int)lVar1 + iVar7 * -1000),*g_col);
iVar7 = *(int *)this;
}
switch(iVar7) {
case 1:
uVar6 = g_col[4];
__format = "%sD %s";
break;
case 2:
pcVar5 = (char *)*g_col;
uVar6 = g_col[3];
__format = "%sI %s";
goto LAB_001cc9f1;
case 3:
uVar6 = g_col[6];
__format = "%sW %s";
break;
case 4:
uVar6 = g_col[2];
__format = "%sE %s";
break;
default:
goto switchD_001cc997_default;
}
pcVar5 = "";
LAB_001cc9f1:
fprintf(param_1,__format,uVar6,pcVar5);
switchD_001cc997_default:
fputs(*(char **)(this + 0x10),param_1);
if ((*(uint *)this < 5) && ((0x1aU >> (*(uint *)this & 0x1f) & 1) != 0)) {
fputs((char *)*g_col,param_1);
}
fflush(param_1);
return;
}
|
|
14,741
|
mysql_stmt_prepare_start
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
int STDCALL
mysql_stmt_prepare_start(int *ret, MYSQL_STMT *stmt, const char *query,
unsigned long length)
{
MK_ASYNC_START_BODY(
mysql_stmt_prepare,
stmt->mysql,
{
WIN_SET_NONBLOCKING(stmt->mysql)
parms.stmt= stmt;
parms.query= query;
parms.length= length;
},
1,
r_int,
/* If stmt->mysql==NULL then we will not block so can call directly. */
if (!stmt->mysql)
{
*ret= mysql_stmt_prepare(stmt, query, length);
return 0;
})
}
|
O0
|
c
|
mysql_stmt_prepare_start:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x3eb88
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x2cc00
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x3eca9
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movb $0x1, 0x14(%rax)
movq -0x38(%rbp), %rdi
addq $0x38, %rdi
leaq 0xf2(%rip), %rsi # 0x3ecc0
leaq -0x50(%rbp), %rdx
callq 0x416a0
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rax
movb $0x0, 0x15(%rax)
movq -0x38(%rbp), %rax
movb $0x0, 0x14(%rax)
cmpl $0x0, -0x2c(%rbp)
jle 0x3ec06
movq -0x38(%rbp), %rax
movb $0x1, 0x15(%rax)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3eca9
cmpl $0x0, -0x2c(%rbp)
jge 0x3ec95
jmp 0x3ec12
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x23396(%rip), %rax # 0x61fd0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x29c(%rax)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x97, %rdi
leaq 0x23374(%rip), %rax # 0x61fe0
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13210
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x296(%rax)
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
jmp 0x3eca2
movq -0x38(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mysql_stmt_prepare_start:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
cmp qword ptr [rax+38h], 0
jnz short loc_3EB88
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call mysql_stmt_prepare
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], ecx
mov [rbp+var_4], 0
jmp loc_3ECA9
loc_3EB88:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
mov rax, [rbp+var_20]
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
mov byte ptr [rax+14h], 1
mov rdi, [rbp+var_38]
add rdi, 38h ; '8'
lea rsi, mysql_stmt_prepare_start_internal
lea rdx, [rbp+var_50]
call my_context_spawn
mov [rbp+var_2C], eax
mov rax, [rbp+var_38]
mov byte ptr [rax+15h], 0
mov rax, [rbp+var_38]
mov byte ptr [rax+14h], 0
cmp [rbp+var_2C], 0
jle short loc_3EC06
mov rax, [rbp+var_38]
mov byte ptr [rax+15h], 1
mov rax, [rbp+var_38]
mov eax, [rax]
mov [rbp+var_4], eax
jmp loc_3ECA9
loc_3EC06:
cmp [rbp+var_2C], 0
jge loc_3EC95
jmp short $+2
loc_3EC12:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov dword ptr [rax+90h], 7D8h
mov rax, [rbp+var_18]
mov rdi, [rax+38h]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov byte ptr [rax+29Ch], 0
mov rax, [rbp+var_18]
mov rdi, [rax+38h]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov byte ptr [rax+296h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax], 1
jmp short loc_3ECA2
loc_3EC95:
mov rax, [rbp+var_38]
mov ecx, [rax+8]
mov rax, [rbp+var_10]
mov [rax], ecx
loc_3ECA2:
mov [rbp+var_4], 0
loc_3ECA9:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
|
long long mysql_stmt_prepare_start(_DWORD *a1, long long a2, long long a3, long long a4)
{
_QWORD v5[3]; // [rsp+0h] [rbp-50h] BYREF
unsigned int *v6; // [rsp+18h] [rbp-38h]
int v7; // [rsp+24h] [rbp-2Ch]
long long v8; // [rsp+28h] [rbp-28h]
long long v9; // [rsp+30h] [rbp-20h]
long long v10; // [rsp+38h] [rbp-18h]
_DWORD *v11; // [rsp+40h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
if ( *(_QWORD *)(a2 + 56) )
{
v6 = *(unsigned int **)(*(_QWORD *)(*(_QWORD *)(v10 + 56) + 1152LL) + 40LL);
v5[0] = v10;
v5[1] = v9;
v5[2] = v8;
*((_BYTE *)v6 + 20) = 1;
v7 = my_context_spawn(v6 + 14, mysql_stmt_prepare_start_internal, v5);
*((_BYTE *)v6 + 21) = 0;
*((_BYTE *)v6 + 20) = 0;
if ( v7 <= 0 )
{
if ( v7 >= 0 )
{
*v11 = v6[2];
}
else
{
*(_DWORD *)(*(_QWORD *)(v10 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(v10 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(v10 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(v10 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(v10 + 56) + 662LL) = 0;
*v11 = 1;
}
return 0;
}
else
{
*((_BYTE *)v6 + 21) = 1;
return *v6;
}
}
else
{
*v11 = mysql_stmt_prepare(v10, v9, v8);
return 0;
}
}
|
mysql_stmt_prepare_start:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x38],0x0
JNZ 0x0013eb88
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x0012cc00
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013eca9
LAB_0013eb88:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x14],0x1
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x38
LEA RSI,[0x13ecc0]
LEA RDX,[RBP + -0x50]
CALL 0x001416a0
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x15],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x14],0x0
CMP dword ptr [RBP + -0x2c],0x0
JLE 0x0013ec06
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x15],0x1
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013eca9
LAB_0013ec06:
CMP dword ptr [RBP + -0x2c],0x0
JGE 0x0013ec95
JMP 0x0013ec12
LAB_0013ec12:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x297
LEA RAX,[0x161fd0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x29c],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x97
LEA RAX,[0x161fe0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x296],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],0x1
JMP 0x0013eca2
LAB_0013ec95:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
LAB_0013eca2:
MOV dword ptr [RBP + -0x4],0x0
LAB_0013eca9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int4
mysql_stmt_prepare_start(int4 *param_1,long param_2,int8 param_3,int8 param_4)
{
int4 uVar1;
long local_58;
int8 local_50;
int8 local_48;
int4 *local_40;
int local_34;
int8 local_30;
int8 local_28;
long local_20;
int4 *local_18;
int4 local_c;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if (*(long *)(param_2 + 0x38) == 0) {
uVar1 = mysql_stmt_prepare(param_2,param_3,param_4);
*local_18 = uVar1;
local_c = 0;
}
else {
local_40 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
*(int1 *)(local_40 + 5) = 1;
local_58 = param_2;
local_50 = param_3;
local_48 = param_4;
local_34 = my_context_spawn(local_40 + 0xe,mysql_stmt_prepare_start_internal,&local_58);
*(int1 *)((long)local_40 + 0x15) = 0;
*(int1 *)(local_40 + 5) = 0;
if (local_34 < 1) {
if (local_34 < 0) {
*(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00162020,
0x1ff);
*(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0;
*local_18 = 1;
}
else {
*local_18 = local_40[2];
}
local_c = 0;
}
else {
*(int1 *)((long)local_40 + 0x15) = 1;
local_c = *local_40;
}
}
return local_c;
}
|
|
14,742
|
inline_mysql_file_write
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline size_t
inline_mysql_file_write(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, const uchar *buffer, size_t count, myf flags)
{
size_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
size_t bytes_written;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
result= my_write(file, buffer, count, flags);
if (flags & (MY_NABP | MY_FNABP))
bytes_written= (result == 0) ? count : 0;
else
bytes_written= (result != MY_FILE_ERROR) ? result : 0;
PSI_FILE_CALL(end_file_wait)(locker, bytes_written);
return result;
}
#endif
result= my_write(file, buffer, count, flags);
return result;
}
|
O0
|
c
|
inline_mysql_file_write:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x206fa0(%rip), %rax # 0x2bf098
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x88(%rbp), %rdi
movl $0x7, %edx
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xb8207
leaq 0x206f56(%rip), %rax # 0x2bf098
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0xf6290
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xb81b2
cmpq $0x0, -0x38(%rbp)
jne 0xb8197
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0xb81a2
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0xb81a2
movq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0xb81df
cmpq $-0x1, -0x38(%rbp)
je 0xb81c6
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0xb81d1
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0xb81d1
movq -0xa0(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x206eb2(%rip), %rax # 0x2bf098
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xb8227
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0xf6290
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
inline_mysql_file_write_2:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_88]
mov edx, 7
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz loc_B8207
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
call my_write
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
and rax, 6
cmp rax, 0
jz short loc_B81B2
cmp [rbp+var_38], 0
jnz short loc_B8197
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
jmp short loc_B81A2
loc_B8197:
xor eax, eax
mov [rbp+var_98], rax
jmp short $+2
loc_B81A2:
mov rax, [rbp+var_98]
mov [rbp+var_90], rax
jmp short loc_B81DF
loc_B81B2:
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jz short loc_B81C6
mov rax, [rbp+var_38]
mov [rbp+var_A0], rax
jmp short loc_B81D1
loc_B81C6:
xor eax, eax
mov [rbp+var_A0], rax
jmp short $+2
loc_B81D1:
mov rax, [rbp+var_A0]
mov [rbp+var_90], rax
loc_B81DF:
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_90]
call rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_B8227
loc_B8207:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
call my_write
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_B8227:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
|
long long inline_mysql_file_write_2(
long long a1,
unsigned int a2,
unsigned int a3,
long long a4,
long long a5,
long long a6)
{
long long v7; // [rsp+0h] [rbp-A0h]
long long v8; // [rsp+8h] [rbp-98h]
_BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF
long long v10; // [rsp+60h] [rbp-40h]
long long v11; // [rsp+68h] [rbp-38h]
long long v12; // [rsp+70h] [rbp-30h]
long long v13; // [rsp+78h] [rbp-28h]
long long v14; // [rsp+80h] [rbp-20h]
unsigned int v15; // [rsp+88h] [rbp-18h]
unsigned int v16; // [rsp+8Ch] [rbp-14h]
long long v17; // [rsp+90h] [rbp-10h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v13 = a5;
v12 = a6;
v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v9, a3, 7LL);
if ( v10 )
{
((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v10, v13, v17, v16);
v11 = my_write(v15, v14, v13, v12);
if ( (v12 & 6) != 0 )
{
if ( v11 )
v8 = 0LL;
else
v8 = v13;
((void ( *)(long long, long long))PSI_server[67])(v10, v8);
}
else
{
if ( v11 == -1 )
v7 = 0LL;
else
v7 = v11;
((void ( *)(long long, long long))PSI_server[67])(v10, v7);
}
return v11;
}
else
{
return my_write(v15, v14, v13, v12);
}
}
|
inline_mysql_file_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x3bf098]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x88]
MOV EDX,0x7
CALL RAX
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001b8207
LEA RAX,[0x3bf098]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001f6290
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001b81b2
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x001b8197
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x001b81a2
LAB_001b8197:
XOR EAX,EAX
MOV qword ptr [RBP + -0x98],RAX
JMP 0x001b81a2
LAB_001b81a2:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x90],RAX
JMP 0x001b81df
LAB_001b81b2:
CMP qword ptr [RBP + -0x38],-0x1
JZ 0x001b81c6
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x001b81d1
LAB_001b81c6:
XOR EAX,EAX
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x001b81d1
LAB_001b81d1:
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x90],RAX
LAB_001b81df:
LEA RAX,[0x3bf098]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x90]
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001b8227
LAB_001b8207:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001f6290
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_001b8227:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xa0
POP RBP
RET
|
long inline_mysql_file_write
(int8 param_1,int4 param_2,int4 param_3,int8 param_4,
long param_5,ulong param_6)
{
long local_a8;
long local_a0;
long local_98;
int1 local_90 [72];
long local_48;
long local_40;
ulong local_38;
long local_30;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
long local_10;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,7);
if (local_48 == 0) {
local_10 = my_write(local_20,local_28,local_30,local_38);
}
else {
(**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c);
local_40 = my_write(local_20,local_28,local_30,local_38);
if ((local_38 & 6) == 0) {
local_a8 = local_40;
if (local_40 == -1) {
local_a8 = 0;
}
local_98 = local_a8;
}
else {
if (local_40 == 0) {
local_a0 = local_30;
}
else {
local_a0 = 0;
}
local_98 = local_a0;
}
(**(code **)(PSI_server + 0x218))(local_48,local_98);
local_10 = local_40;
}
return local_10;
}
|
|
14,743
|
common_embd_similarity_cos(float const*, float const*, int)
|
llama.cpp/common/common.cpp
|
float common_embd_similarity_cos(const float * embd1, const float * embd2, int n){
double sum = 0.0;
double sum1 = 0.0;
double sum2 = 0.0;
for (int i = 0; i < n; i++) {
sum += embd1[i] * embd2[i];
sum1 += embd1[i] * embd1[i];
sum2 += embd2[i] * embd2[i];
}
// Handle the case where one or both vectors are zero vectors
if (sum1 == 0.0 || sum2 == 0.0) {
if (sum1 == 0.0 && sum2 == 0.0) {
return 1.0f; // two zero vectors are similar
}
return 0.0f;
}
return sum / (sqrt(sum1) * sqrt(sum2));
}
|
O3
|
cpp
|
common_embd_similarity_cos(float const*, float const*, int):
subq $0x28, %rsp
testl %edx, %edx
jle 0xfe24b
movl %edx, %eax
xorpd %xmm0, %xmm0
xorpd %xmm4, %xmm4
xorl %ecx, %ecx
movss (%rsi,%rcx,4), %xmm3
movss (%rdi,%rcx,4), %xmm1
movaps %xmm1, %xmm2
shufps $0x0, %xmm1, %xmm2 # xmm2 = xmm2[0,0],xmm1[0,0]
unpcklps %xmm3, %xmm1 # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
mulps %xmm2, %xmm1
cvtps2pd %xmm1, %xmm1
addpd %xmm1, %xmm0
mulss %xmm3, %xmm3
xorps %xmm1, %xmm1
cvtss2sd %xmm3, %xmm1
addsd %xmm1, %xmm4
incq %rcx
cmpq %rcx, %rax
jne 0xfe1c8
xorps %xmm2, %xmm2
movapd %xmm0, %xmm1
cmpeqsd %xmm2, %xmm1
movq %xmm1, %rax
andl $0x1, %eax
movapd %xmm4, %xmm1
cmpeqsd %xmm2, %xmm1
movq %xmm1, %rcx
andl $0x1, %ecx
ucomisd %xmm2, %xmm0
jne 0xfe22a
jnp 0xfe24f
ucomisd %xmm2, %xmm4
jne 0xfe232
jnp 0xfe24f
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movapd %xmm0, 0x10(%rsp)
jb 0xfe263
xorps %xmm2, %xmm2
sqrtsd %xmm0, %xmm2
jmp 0xfe27c
movb $0x1, %cl
movb $0x1, %al
testb %cl, %al
jne 0xfe259
xorpd %xmm0, %xmm0
jmp 0xfe2b9
movss 0x16eb3(%rip), %xmm0 # 0x115114
jmp 0xfe2b9
movsd %xmm4, 0x8(%rsp)
callq 0x218f0
xorpd %xmm1, %xmm1
movsd 0x8(%rsp), %xmm4
movapd %xmm0, %xmm2
ucomisd %xmm1, %xmm4
jb 0xfe28b
xorps %xmm0, %xmm0
sqrtsd %xmm4, %xmm0
jmp 0xfe2a0
movapd %xmm4, %xmm0
movsd %xmm2, 0x8(%rsp)
callq 0x218f0
movsd 0x8(%rsp), %xmm2
movapd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm2
unpckhpd %xmm1, %xmm1 # xmm1 = xmm1[1,1]
divsd %xmm2, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
addq $0x28, %rsp
retq
|
_Z26common_embd_similarity_cosPKfS0_i:
sub rsp, 28h
test edx, edx
jle loc_FE24B
mov eax, edx
xorpd xmm0, xmm0
xorpd xmm4, xmm4
xor ecx, ecx
loc_FE1C8:
movss xmm3, dword ptr [rsi+rcx*4]
movss xmm1, dword ptr [rdi+rcx*4]
movaps xmm2, xmm1
shufps xmm2, xmm1, 0
unpcklps xmm1, xmm3
mulps xmm1, xmm2
cvtps2pd xmm1, xmm1
addpd xmm0, xmm1
mulss xmm3, xmm3
xorps xmm1, xmm1
cvtss2sd xmm1, xmm3
addsd xmm4, xmm1
inc rcx
cmp rax, rcx
jnz short loc_FE1C8
xorps xmm2, xmm2
movapd xmm1, xmm0
cmpeqsd xmm1, xmm2
movq rax, xmm1
and eax, 1
movapd xmm1, xmm4
cmpeqsd xmm1, xmm2
movq rcx, xmm1
and ecx, 1
ucomisd xmm0, xmm2
jnz short loc_FE22A
jnp short loc_FE24F
loc_FE22A:
ucomisd xmm4, xmm2
jnz short loc_FE232
jnp short loc_FE24F
loc_FE232:
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
movapd [rsp+28h+var_18], xmm0
jb short loc_FE263
xorps xmm2, xmm2
sqrtsd xmm2, xmm0
jmp short loc_FE27C
loc_FE24B:
mov cl, 1
mov al, 1
loc_FE24F:
test al, cl
jnz short loc_FE259
xorpd xmm0, xmm0
jmp short loc_FE2B9
loc_FE259:
movss xmm0, cs:dword_115114
jmp short loc_FE2B9
loc_FE263:
movsd [rsp+28h+var_20], xmm4
call _sqrt
xorpd xmm1, xmm1
movsd xmm4, [rsp+28h+var_20]
movapd xmm2, xmm0
loc_FE27C:
ucomisd xmm4, xmm1
jb short loc_FE28B
xorps xmm0, xmm0
sqrtsd xmm0, xmm4
jmp short loc_FE2A0
loc_FE28B:
movapd xmm0, xmm4
movsd [rsp+28h+var_20], xmm2
call _sqrt
movsd xmm2, [rsp+28h+var_20]
loc_FE2A0:
movapd xmm1, [rsp+28h+var_18]
mulsd xmm2, xmm0
unpckhpd xmm1, xmm1
divsd xmm1, xmm2
xorps xmm0, xmm0
cvtsd2ss xmm0, xmm1
loc_FE2B9:
add rsp, 28h
retn
|
float common_embd_similarity_cos(const float *a1, const float *a2, int a3)
{
__m128d v3; // xmm0
__m128d v4; // xmm4
long long i; // rcx
__m128 v6; // xmm3
char v7; // al
char v8; // cl
double v9; // xmm2_8
double v11; // xmm0_8
double v12; // xmm0_8
double v13; // [rsp+8h] [rbp-20h]
__m128d v14; // [rsp+10h] [rbp-18h]
if ( a3 <= 0 )
{
v8 = 1;
v7 = 1;
LABEL_9:
if ( ((unsigned __int8)v8 & (unsigned __int8)v7) != 0 )
return 1.0;
else
return 0.0;
}
v3 = 0LL;
v4 = 0LL;
for ( i = 0LL; i != a3; ++i )
{
v6 = (__m128)LODWORD(a2[i]);
v3 = _mm_add_pd(
v3,
_mm_cvtps_pd(
_mm_mul_ps(
_mm_unpacklo_ps((__m128)LODWORD(a1[i]), v6),
_mm_shuffle_ps((__m128)LODWORD(a1[i]), (__m128)LODWORD(a1[i]), 0))));
v4.m128d_f64[0] = v4.m128d_f64[0] + (float)(v6.m128_f32[0] * v6.m128_f32[0]);
}
v7 = *(_OWORD *)&_mm_cmpeq_sd(v3, (__m128d)0LL) & 1;
v8 = *(_OWORD *)&_mm_cmpeq_sd(v4, (__m128d)0LL) & 1;
if ( v3.m128d_f64[0] == 0.0 || v4.m128d_f64[0] == 0.0 )
goto LABEL_9;
v14 = v3;
if ( v3.m128d_f64[0] < 0.0 )
{
v13 = v4.m128d_f64[0];
v11 = sqrt(v3.m128d_f64[0]);
v4.m128d_f64[0] = v13;
v9 = v11;
}
else
{
v9 = sqrt(v3.m128d_f64[0]);
}
if ( v4.m128d_f64[0] < 0.0 )
v12 = sqrt(v4.m128d_f64[0]);
else
v12 = sqrt(v4.m128d_f64[0]);
return _mm_unpackhi_pd(v14, v14).m128d_f64[0] / (v9 * v12);
}
|
common_embd_similarity_cos:
SUB RSP,0x28
TEST EDX,EDX
JLE 0x001fe24b
MOV EAX,EDX
XORPD XMM0,XMM0
XORPD XMM4,XMM4
XOR ECX,ECX
LAB_001fe1c8:
MOVSS XMM3,dword ptr [RSI + RCX*0x4]
MOVSS XMM1,dword ptr [RDI + RCX*0x4]
MOVAPS XMM2,XMM1
SHUFPS XMM2,XMM1,0x0
UNPCKLPS XMM1,XMM3
MULPS XMM1,XMM2
CVTPS2PD XMM1,XMM1
ADDPD XMM0,XMM1
MULSS XMM3,XMM3
XORPS XMM1,XMM1
CVTSS2SD XMM1,XMM3
ADDSD XMM4,XMM1
INC RCX
CMP RAX,RCX
JNZ 0x001fe1c8
XORPS XMM2,XMM2
MOVAPD XMM1,XMM0
CMPEQSD XMM1,XMM2
MOVQ RAX,XMM1
AND EAX,0x1
MOVAPD XMM1,XMM4
CMPEQSD XMM1,XMM2
MOVQ RCX,XMM1
AND ECX,0x1
UCOMISD XMM0,XMM2
JNZ 0x001fe22a
JNP 0x001fe24f
LAB_001fe22a:
UCOMISD XMM4,XMM2
JNZ 0x001fe232
JNP 0x001fe24f
LAB_001fe232:
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
MOVAPD xmmword ptr [RSP + 0x10],XMM0
JC 0x001fe263
XORPS XMM2,XMM2
SQRTSD XMM2,XMM0
JMP 0x001fe27c
LAB_001fe24b:
MOV CL,0x1
MOV AL,0x1
LAB_001fe24f:
TEST AL,CL
JNZ 0x001fe259
XORPD XMM0,XMM0
JMP 0x001fe2b9
LAB_001fe259:
MOVSS XMM0,dword ptr [0x00215114]
JMP 0x001fe2b9
LAB_001fe263:
MOVSD qword ptr [RSP + 0x8],XMM4
CALL 0x001218f0
XORPD XMM1,XMM1
MOVSD XMM4,qword ptr [RSP + 0x8]
MOVAPD XMM2,XMM0
LAB_001fe27c:
UCOMISD XMM4,XMM1
JC 0x001fe28b
XORPS XMM0,XMM0
SQRTSD XMM0,XMM4
JMP 0x001fe2a0
LAB_001fe28b:
MOVAPD XMM0,XMM4
MOVSD qword ptr [RSP + 0x8],XMM2
CALL 0x001218f0
MOVSD XMM2,qword ptr [RSP + 0x8]
LAB_001fe2a0:
MOVAPD XMM1,xmmword ptr [RSP + 0x10]
MULSD XMM2,XMM0
UNPCKHPD XMM1,XMM1
DIVSD XMM1,XMM2
XORPS XMM0,XMM0
CVTSD2SS XMM0,XMM1
LAB_001fe2b9:
ADD RSP,0x28
RET
|
/* common_embd_similarity_cos(float const*, float const*, int) */
float common_embd_similarity_cos(float *param_1,float *param_2,int param_3)
{
float fVar1;
int1 auVar2 [16];
double dVar3;
bool bVar4;
bool bVar5;
ulong uVar6;
float fVar7;
double dVar8;
double dVar9;
double dStack_10;
if (param_3 < 1) {
bVar5 = true;
bVar4 = true;
}
else {
dVar8 = 0.0;
dVar3 = 0.0;
dVar9 = 0.0;
uVar6 = 0;
do {
fVar7 = param_2[uVar6];
fVar1 = param_1[uVar6];
dVar8 = dVar8 + (double)(fVar1 * fVar1);
dVar3 = dVar3 + (double)(fVar7 * fVar1);
dVar9 = dVar9 + (double)(fVar7 * fVar7);
uVar6 = uVar6 + 1;
} while ((uint)param_3 != uVar6);
bVar4 = dVar8 == 0.0;
bVar5 = dVar9 == 0.0;
if (((dVar8 != 0.0) || (NAN(dVar8))) && ((dVar9 != 0.0 || (NAN(dVar9))))) {
auVar2._8_4_ = SUB84(dVar3,0);
auVar2._0_8_ = dVar8;
auVar2._12_4_ = (int)((ulong)dVar3 >> 0x20);
dStack_10 = auVar2._8_8_;
if (dVar8 < 0.0) {
dVar8 = sqrt(dVar8);
}
else {
dVar8 = SQRT(dVar8);
}
if (dVar9 < 0.0) {
dVar9 = sqrt(dVar9);
}
else {
dVar9 = SQRT(dVar9);
}
return (float)(dStack_10 / (dVar8 * dVar9));
}
}
fVar7 = DAT_00215114;
if (!(bool)(bVar4 & bVar5)) {
fVar7 = 0.0;
}
return fVar7;
}
|
|
14,744
|
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<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>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&)
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
std::string _generate_union_rule(const std::string & name, const std::vector<json> & alt_schemas) {
std::vector<std::string> rules;
for (size_t i = 0; i < alt_schemas.size(); i++) {
rules.push_back(visit(alt_schemas[i], name + (name.empty() ? "alternative-" : "-") + std::to_string(i)));
}
return string_join(rules, " | ");
}
|
O2
|
cpp
|
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<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>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, %r14
movq %rdx, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
xorl %r13d, %r13d
xorl %ebp, %ebp
movq (%r14), %rbx
movq 0x8(%r14), %rax
subq %rbx, %rax
sarq $0x4, %rax
cmpq %rax, %rbp
jae 0x93d35
movq 0x18(%rsp), %rsi
cmpq $0x0, 0x8(%rsi)
leaq 0x1fbb9(%rip), %rdx # 0xb3859
leaq 0x28a8c(%rip), %rax # 0xbc733
cmoveq %rax, %rdx
leaq 0x58(%rsp), %rdi
callq 0x3bbd3
leaq 0x78(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x45273
leaq 0x98(%rsp), %r15
movq %r15, %rdi
leaq 0x58(%rsp), %rsi
movq %r12, %rdx
callq 0x3cc43
addq %r13, %rbx
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x91dd4
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x3e450
movq %r12, %rdi
callq 0x24348
movq %r15, %rdi
callq 0x24348
leaq 0x78(%rsp), %rdi
callq 0x24348
leaq 0x58(%rsp), %rdi
callq 0x24348
incq %rbp
addq $0x10, %r13
jmp 0x93c78
leaq 0x28bae(%rip), %rsi # 0xbc8ea
leaq 0x38(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x29c20
leaq 0x20(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x570de
leaq 0x38(%rsp), %rdi
callq 0x24348
leaq 0x20(%rsp), %rdi
callq 0x2a3e4
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x93dd2
jmp 0x93dd9
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x24348
jmp 0x93dac
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x24348
jmp 0x93dc3
movq %rax, %rbx
jmp 0x93dcd
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x24348
leaq 0x58(%rsp), %rdi
callq 0x24348
jmp 0x93ddc
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2a3e4
movq %rbx, %rdi
callq 0x240e0
|
_ZN15SchemaConverter20_generate_union_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapES8_S5_blmdSaNSA_14adl_serializerES8_IhSaIhEEvEESaISG_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r14, rcx
mov [rsp+0E8h+var_D0], rdx
mov [rsp+0E8h+var_D8], rsi
mov [rsp+0E8h+var_E0], rdi
xorps xmm0, xmm0
lea rax, [rsp+0E8h+var_C8]
movaps xmmword ptr [rax], xmm0
and qword ptr [rax+10h], 0
xor r13d, r13d
xor ebp, ebp
loc_93C78:
mov rbx, [r14]
mov rax, [r14+8]
sub rax, rbx
sar rax, 4
cmp rbp, rax
jnb loc_93D35
mov rsi, [rsp+0E8h+var_D0]
cmp qword ptr [rsi+8], 0
lea rdx, asc_B3858+1; "-"
lea rax, aAlternative; "alternative-"
cmovz rdx, rax
lea rdi, [rsp+0E8h+var_90]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
lea r12, [rsp+0E8h+var_70]
mov rdi, r12; this
mov rsi, rbp; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea r15, [rsp+0E8h+var_50]
mov rdi, r15
lea rsi, [rsp+0E8h+var_90]
mov rdx, r12
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
add rbx, r13
lea r12, [rsp+0E8h+var_B0]
mov rdi, r12
mov rsi, [rsp+0E8h+var_D8]
mov rdx, rbx
mov rcx, r15
call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,std::string const&)
lea rdi, [rsp+0E8h+var_C8]
mov rsi, r12
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
inc rbp
add r13, 10h
jmp loc_93C78
loc_93D35:
lea rsi, asc_BC8E9+1; " | "
lea rdi, [rsp+0E8h+var_B0]
lea rdx, [rsp+0E8h+var_50]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, [rsp+0E8h+var_C8]
lea rdx, [rsp+0E8h+var_B0]
mov rbx, [rsp+0E8h+var_E0]
mov rdi, rbx
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rdi, [rsp+0E8h+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_C8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, rbx
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_30]
jmp short loc_93DD2
jmp short loc_93DD9
mov rbx, rax
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_93DAC
mov rbx, rax
loc_93DAC:
lea rdi, [rsp+arg_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_93DC3
mov rbx, rax
jmp short loc_93DCD
mov rbx, rax
loc_93DC3:
lea rdi, [rsp+arg_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_93DCD:
lea rdi, [rsp+arg_50]; void *
loc_93DD2:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_93DDC
loc_93DD9:
mov rbx, rax
loc_93DDC:
lea rdi, [rsp+arg_18]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, rbx
call __Unwind_Resume
|
long long SchemaConverter::_generate_union_rule(long long a1, long long a2, long long a3, long long *a4)
{
long long v5; // r13
unsigned long long i; // rbp
long long v7; // rbx
char *v8; // rdx
__int128 v11; // [rsp+20h] [rbp-C8h] BYREF
long long v12; // [rsp+30h] [rbp-B8h]
_QWORD v13[4]; // [rsp+38h] [rbp-B0h] BYREF
_QWORD v14[4]; // [rsp+58h] [rbp-90h] BYREF
_QWORD v15[4]; // [rsp+78h] [rbp-70h] BYREF
_BYTE v16[80]; // [rsp+98h] [rbp-50h] BYREF
v11 = 0LL;
v12 = 0LL;
v5 = 0LL;
for ( i = 0LL; ; ++i )
{
v7 = *a4;
if ( i >= (a4[1] - *a4) >> 4 )
break;
v8 = "-";
if ( !*(_QWORD *)(a3 + 8) )
v8 = "alternative-";
std::operator+<char>((long long)v14, a3, (long long)v8);
std::to_string((std::__cxx11 *)v15, i);
std::operator+<char>((long long)v16, v14, v15);
SchemaConverter::visit(v13, a2, (unsigned __int8 *)(v5 + v7), (long long)v16, (__m128d)0LL);
std::vector<std::string>::emplace_back<std::string>((long long)&v11, (long long)v13);
std::string::~string(v13);
std::string::~string(v16);
std::string::~string(v15);
std::string::~string(v14);
v5 += 16LL;
}
std::string::basic_string<std::allocator<char>>(v13, (long long)" | ");
string_join(a1, (long long *)&v11, (long long)v13);
std::string::~string(v13);
std::vector<std::string>::~vector((long long)&v11);
return a1;
}
|
_generate_union_rule:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R14,RCX
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDI
XORPS XMM0,XMM0
LEA RAX,[RSP + 0x20]
MOVAPS xmmword ptr [RAX],XMM0
AND qword ptr [RAX + 0x10],0x0
XOR R13D,R13D
XOR EBP,EBP
LAB_00193c78:
MOV RBX,qword ptr [R14]
MOV RAX,qword ptr [R14 + 0x8]
SUB RAX,RBX
SAR RAX,0x4
CMP RBP,RAX
JNC 0x00193d35
MOV RSI,qword ptr [RSP + 0x18]
CMP qword ptr [RSI + 0x8],0x0
LEA RDX,[0x1b3859]
LEA RAX,[0x1bc733]
CMOVZ RDX,RAX
LAB_00193cab:
LEA RDI,[RSP + 0x58]
CALL 0x0013bbd3
LAB_00193cb5:
LEA R12,[RSP + 0x78]
MOV RDI,R12
MOV RSI,RBP
CALL 0x00145273
LAB_00193cc5:
LEA R15,[RSP + 0x98]
MOV RDI,R15
LEA RSI,[RSP + 0x58]
MOV RDX,R12
CALL 0x0013cc43
LAB_00193cdd:
ADD RBX,R13
LEA R12,[RSP + 0x38]
MOV RDI,R12
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RBX
MOV RCX,R15
CALL 0x00191dd4
LAB_00193cf8:
LEA RDI,[RSP + 0x20]
MOV RSI,R12
CALL 0x0013e450
MOV RDI,R12
CALL 0x00124348
MOV RDI,R15
CALL 0x00124348
LEA RDI,[RSP + 0x78]
CALL 0x00124348
LEA RDI,[RSP + 0x58]
CALL 0x00124348
INC RBP
ADD R13,0x10
JMP 0x00193c78
LAB_00193d35:
LEA RSI,[0x1bc8ea]
LEA RDI,[RSP + 0x38]
LEA RDX,[RSP + 0x98]
CALL 0x00129c20
LAB_00193d4e:
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0x38]
MOV RBX,qword ptr [RSP + 0x8]
MOV RDI,RBX
CALL 0x001570de
LAB_00193d65:
LEA RDI,[RSP + 0x38]
CALL 0x00124348
LEA RDI,[RSP + 0x20]
CALL 0x0012a3e4
MOV RAX,RBX
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::_generate_union_rule(std::__cxx11::string const&,
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > const&) */
string * SchemaConverter::_generate_union_rule(string *param_1,vector *param_2)
{
long *in_RCX;
char *in_RDX;
ulong uVar1;
int8 local_c8;
int8 uStack_c0;
int8 local_b8;
string local_b0 [32];
string local_90 [32];
__cxx11 local_70 [32];
string local_50 [32];
local_c8 = 0;
uStack_c0 = 0;
local_b8 = 0;
for (uVar1 = 0; uVar1 < (ulong)(in_RCX[1] - *in_RCX >> 4); uVar1 = uVar1 + 1) {
/* try { // try from 00193cab to 00193cb4 has its CatchHandler @ 00193dd9 */
std::operator+(local_90,in_RDX);
/* try { // try from 00193cb5 to 00193cc4 has its CatchHandler @ 00193dbb */
std::__cxx11::to_string(local_70,uVar1);
/* try { // try from 00193cc5 to 00193cdc has its CatchHandler @ 00193dc0 */
std::operator+(local_50,local_90);
/* try { // try from 00193cdd to 00193cf7 has its CatchHandler @ 00193da9 */
visit(local_b0,(string *)param_2);
/* try { // try from 00193cf8 to 00193d04 has its CatchHandler @ 00193d9a */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c8,
local_b0);
std::__cxx11::string::~string(local_b0);
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string((string *)local_70);
std::__cxx11::string::~string(local_90);
}
/* try { // try from 00193d35 to 00193d4d has its CatchHandler @ 00193d98 */
std::__cxx11::string::string<std::allocator<char>>(local_b0," | ",(allocator *)local_50);
/* try { // try from 00193d4e to 00193d64 has its CatchHandler @ 00193d8e */
string_join((vector *)param_1,(string *)&local_c8);
std::__cxx11::string::~string(local_b0);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c8);
return param_1;
}
|
|
14,745
|
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<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>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&)
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
std::string _generate_union_rule(const std::string & name, const std::vector<json> & alt_schemas) {
std::vector<std::string> rules;
for (size_t i = 0; i < alt_schemas.size(); i++) {
rules.push_back(visit(alt_schemas[i], name + (name.empty() ? "alternative-" : "-") + std::to_string(i)));
}
return string_join(rules, " | ");
}
|
O3
|
cpp
|
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<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>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdi, 0x98(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
movq (%rcx), %r12
movq %rcx, 0xa0(%rsp)
cmpq %r12, 0x8(%rcx)
je 0xc87d0
leaq 0x70(%rsp), %rbp
xorl %r13d, %r13d
leaq 0x40(%rsp), %r14
movq %rbp, %rbx
movq 0xb0(%rsp), %rcx
movq 0x8(%rcx), %rbp
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq (%rcx), %rsi
leaq (%rsi,%rbp), %rdx
movq %rsp, %r15
movq %r15, %rdi
callq 0x268c4
testq %rbp, %rbp
leaq 0x31115(%rip), %rsi # 0xf96ef
leaq 0x311b7(%rip), %rax # 0xf9798
cmoveq %rax, %rsi
movq %r15, %rdi
callq 0x1c240
movl $0x1, %esi
cmpq $0xa, %r13
movq %rbx, %rbp
jb 0xc864a
movl $0x4, %esi
movq %r13, %rcx
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
cmpq $0x63, %rcx
jbe 0xc8643
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0xc8648
cmpq $0x2710, %rcx # imm = 0x2710
jb 0xc864a
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0xc860d
addl $-0x3, %esi
jmp 0xc864a
addl $-0x2, %esi
jmp 0xc864a
decl %esi
movl %esi, %esi
movq %rbp, 0x60(%rsp)
leaq 0x60(%rsp), %rdi
xorl %edx, %edx
callq 0x1baa0
movq 0x60(%rsp), %rdi
movl 0x68(%rsp), %esi
movq %r13, %rdx
callq 0x626a9
movq (%rsp), %rcx
movl $0xf, %edi
leaq 0x10(%rsp), %rax
cmpq %rax, %rcx
je 0xc8686
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %r8
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
jbe 0xc86b2
movl $0xf, %edi
cmpq %rbp, %rsi
je 0xc86ad
movq 0x70(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xc86bc
movq %rsp, %rdi
callq 0x1b270
jmp 0xc86ca
leaq 0x60(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1ba40
leaq 0x30(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0xc86ef
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0xc86f5
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x28(%rsp)
movq %rcx, (%rax)
movq %r13, %rax
shlq $0x4, %rax
addq %rax, %r12
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq %r14, %rdi
movq 0xa8(%rsp), %rsi
movq %r12, %rdx
leaq 0x20(%rsp), %rcx
callq 0xc5796
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
leaq 0x30(%rsp), %r12
callq 0x5a97e
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xc8765
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1b930
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xc877c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b930
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0xc8793
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1b930
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xc87ae
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b930
incq %r13
movq 0xa0(%rsp), %rax
movq (%rax), %r12
movq 0x8(%rax), %rax
subq %r12, %rax
sarq $0x4, %rax
cmpq %rax, %r13
jb 0xc85a6
leaq 0x50(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x3116f(%rip), %rsi # 0xf994f
leaq 0x3116b(%rip), %rdx # 0xf9952
leaq 0x40(%rsp), %rdi
callq 0x2695a
leaq 0x80(%rsp), %rsi
leaq 0x40(%rsp), %rdx
movq 0x98(%rsp), %r14
movq %r14, %rdi
callq 0x76f09
movq 0x40(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc8825
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1b930
leaq 0x80(%rsp), %rdi
callq 0x25d5c
movq %r14, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc88e4
movq 0x50(%rsp), %rsi
jmp 0xc88dc
jmp 0xc8861
movq %rax, %r14
jmp 0xc88e4
jmp 0xc8868
movq %rax, %r14
jmp 0xc88c9
movq %rax, %r14
jmp 0xc88b2
movq %rax, %r14
jmp 0xc8896
movq %rax, %r14
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xc8896
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1b930
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xc88b2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b930
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc88c9
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1b930
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xc88e4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b930
leaq 0x80(%rsp), %rdi
callq 0x25d5c
movq %r14, %rdi
callq 0x1c0d0
nop
|
_ZN15SchemaConverter20_generate_union_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapES8_S5_blmdSaNSA_14adl_serializerES8_IhSaIhEEvEESaISG_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov [rsp+0E8h+var_38], rdx
mov [rsp+0E8h+var_40], rsi
mov [rsp+0E8h+var_50], rdi
xorps xmm0, xmm0
movaps [rsp+0E8h+var_68], xmm0
mov [rsp+0E8h+var_58], 0
mov r12, [rcx]
mov [rsp+0E8h+var_48], rcx
cmp [rcx+8], r12
jz loc_C87D0
lea rbp, [rsp+0E8h+var_78]
xor r13d, r13d
lea r14, [rsp+0E8h+var_A8]
loc_C85A6:
mov rbx, rbp
mov rcx, [rsp+0E8h+var_38]
mov rbp, [rcx+8]
lea rax, [rsp+0E8h+var_D8]
mov [rsp+0E8h+var_E8], rax
mov rsi, [rcx]
lea rdx, [rsi+rbp]
mov r15, rsp
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
test rbp, rbp
lea rsi, aTuple+5; "-"
lea rax, aAlternative; "alternative-"
cmovz rsi, rax
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov esi, 1
cmp r13, 0Ah
mov rbp, rbx
jb short loc_C864A
mov esi, 4
mov rcx, r13
mov rdi, 346DC5D63886594Bh
loc_C860D:
cmp rcx, 63h ; 'c'
jbe short loc_C8643
cmp rcx, 3E7h
jbe short loc_C8648
cmp rcx, 2710h
jb short loc_C864A
mov rax, rcx
mul rdi
shr rdx, 0Bh
add esi, 4
cmp rcx, 1869Fh
mov rcx, rdx
ja short loc_C860D
add esi, 0FFFFFFFDh
jmp short loc_C864A
loc_C8643:
add esi, 0FFFFFFFEh
jmp short loc_C864A
loc_C8648:
dec esi
loc_C864A:
mov esi, esi
mov [rsp+0E8h+var_88], rbp
lea rdi, [rsp+0E8h+var_88]
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [rsp+0E8h+var_88]
mov esi, dword ptr [rsp+0E8h+var_80]
mov rdx, r13
call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
mov rcx, [rsp+0E8h+var_E8]
mov edi, 0Fh
lea rax, [rsp+0E8h+var_D8]
cmp rcx, rax
jz short loc_C8686
mov rdi, [rsp+0E8h+var_D8]
loc_C8686:
mov r8, [rsp+0E8h+var_E0]
mov rsi, [rsp+0E8h+var_88]
mov rdx, [rsp+0E8h+var_80]
lea rax, [rdx+r8]
cmp rax, rdi
jbe short loc_C86B2
mov edi, 0Fh
cmp rsi, rbp
jz short loc_C86AD
mov rdi, [rsp+0E8h+var_78]
loc_C86AD:
cmp rax, rdi
jbe short loc_C86BC
loc_C86B2:
mov rdi, rsp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_C86CA
loc_C86BC:
lea rdi, [rsp+0E8h+var_88]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_C86CA:
lea rsi, [rsp+0E8h+var_B8]
mov [rsp+0E8h+var_C8], rsi
mov rdx, [rax]
lea rcx, [rax+10h]
cmp rdx, rcx
jz short loc_C86EF
mov [rsp+0E8h+var_C8], rdx
mov rdx, [rcx]
mov [rsp+0E8h+var_B8], rdx
jmp short loc_C86F5
loc_C86EF:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rsi], xmm0
loc_C86F5:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rsp+0E8h+var_C0], rsi
mov [rax], rcx
mov rax, r13
shl rax, 4
add r12, rax
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
mov rdi, r14
mov rsi, [rsp+0E8h+var_40]
mov rdx, r12
lea rcx, [rsp+0E8h+var_C8]
call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,std::string const&)
lea rdi, [rsp+0E8h+var_68]
mov rsi, r14
lea r12, [rsp+0E8h+var_B8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+0E8h+var_A8]; void *
lea rax, [rsp+0E8h+var_98]
cmp rdi, rax
jz short loc_C8765
mov rsi, [rsp+0E8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C8765:
mov rdi, [rsp+0E8h+var_C8]; void *
cmp rdi, r12
jz short loc_C877C
mov rsi, [rsp+0E8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C877C:
mov rdi, [rsp+0E8h+var_88]; void *
cmp rdi, rbp
jz short loc_C8793
mov rsi, [rsp+0E8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C8793:
mov rdi, [rsp+0E8h+var_E8]; void *
lea rax, [rsp+0E8h+var_D8]
cmp rdi, rax
jz short loc_C87AE
mov rsi, [rsp+0E8h+var_D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C87AE:
inc r13
mov rax, [rsp+0E8h+var_48]
mov r12, [rax]
mov rax, [rax+8]
sub rax, r12
sar rax, 4
cmp r13, rax
jb loc_C85A6
loc_C87D0:
lea rbx, [rsp+0E8h+var_98]
mov [rbx-10h], rbx
lea rsi, asc_F994E+1; " | "
lea rdx, asc_F994E+4; ""
lea rdi, [rsp+0E8h+var_A8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+0E8h+var_68]
lea rdx, [rsp+0E8h+var_A8]
mov r14, [rsp+0E8h+var_50]
mov rdi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
mov rdi, [rsp+0E8h+var_A8]; void *
cmp rdi, rbx
jz short loc_C8825
mov rsi, [rsp+0E8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C8825:
lea rdi, [rsp+0E8h+var_68]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, r14
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rsp+arg_38]
cmp rdi, rbx
jz loc_C88E4
mov rsi, [rsp+arg_48]
jmp short loc_C88DC
jmp short $+2
loc_C8861:
mov r14, rax
jmp short loc_C88E4
jmp short $+2
loc_C8868:
mov r14, rax
jmp short loc_C88C9
mov r14, rax
jmp short loc_C88B2
mov r14, rax
jmp short loc_C8896
mov r14, rax
mov rdi, [rsp+arg_38]; void *
lea rax, [rsp+arg_48]
cmp rdi, rax
jz short loc_C8896
mov rsi, [rsp+arg_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C8896:
mov rdi, [rsp+arg_18]; void *
lea rax, [rsp+arg_28]
cmp rdi, rax
jz short loc_C88B2
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C88B2:
mov rdi, [rsp+arg_58]; void *
cmp rdi, rbx
jz short loc_C88C9
mov rsi, [rsp+arg_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C88C9:
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_C88E4
mov rsi, [rsp+arg_8]
loc_C88DC:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C88E4:
lea rdi, [rsp+arg_78]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __Unwind_Resume
|
long long SchemaConverter::_generate_union_rule(long long a1, long long a2, long long a3, long long *a4)
{
__m128d v4; // xmm0
long long v5; // r12
unsigned long long *v6; // rbp
unsigned long long v7; // r13
unsigned long long *v8; // rbx
long long v9; // rbp
char *v10; // rsi
unsigned int v11; // esi
unsigned long long v12; // rcx
bool v13; // cc
unsigned long long v14; // rdi
unsigned long long v15; // rdi
void **v16; // rax
__m128d *v17; // rcx
long long v18; // r14
void *v20; // [rsp+0h] [rbp-E8h] BYREF
long long v21; // [rsp+8h] [rbp-E0h]
_QWORD v22[2]; // [rsp+10h] [rbp-D8h] BYREF
void *v23[2]; // [rsp+20h] [rbp-C8h] BYREF
__m128d v24; // [rsp+30h] [rbp-B8h] BYREF
void *v25[2]; // [rsp+40h] [rbp-A8h] BYREF
_QWORD v26[2]; // [rsp+50h] [rbp-98h] BYREF
void *v27; // [rsp+60h] [rbp-88h] BYREF
long long v28; // [rsp+68h] [rbp-80h]
unsigned long long v29; // [rsp+70h] [rbp-78h] BYREF
__int128 v30; // [rsp+80h] [rbp-68h] BYREF
long long v31; // [rsp+90h] [rbp-58h]
long long v32; // [rsp+98h] [rbp-50h]
long long *v33; // [rsp+A0h] [rbp-48h]
long long v34; // [rsp+A8h] [rbp-40h]
long long v35; // [rsp+B0h] [rbp-38h]
v35 = a3;
v34 = a2;
v32 = a1;
v4 = 0LL;
v30 = 0LL;
v31 = 0LL;
v5 = *a4;
v33 = a4;
if ( a4[1] != v5 )
{
v6 = &v29;
v7 = 0LL;
do
{
v8 = v6;
v9 = *(_QWORD *)(v35 + 8);
v20 = v22;
std::string::_M_construct<char *>((long long)&v20, *(_BYTE **)v35, *(_QWORD *)v35 + v9);
v10 = "-";
if ( !v9 )
v10 = "alternative-";
std::string::append(&v20, v10);
v11 = 1;
v6 = v8;
if ( v7 >= 0xA )
{
v11 = 4;
v12 = v7;
while ( 1 )
{
if ( v12 <= 0x63 )
{
v11 -= 2;
goto LABEL_14;
}
if ( v12 <= 0x3E7 )
break;
if ( v12 < 0x2710 )
goto LABEL_14;
v11 += 4;
v13 = v12 <= 0x1869F;
v12 /= 0x2710uLL;
if ( v13 )
{
v11 -= 3;
goto LABEL_14;
}
}
--v11;
}
LABEL_14:
v27 = v8;
std::string::_M_construct(&v27, v11, 0LL);
std::__detail::__to_chars_10_impl<unsigned long>((char *)v27, v28, v7);
v14 = 15LL;
if ( v20 != v22 )
v14 = v22[0];
if ( v28 + v21 <= v14 )
goto LABEL_20;
v15 = 15LL;
if ( v27 != v8 )
v15 = v29;
if ( v28 + v21 <= v15 )
v16 = (void **)std::string::replace(&v27, 0LL, 0LL, v20, v21);
else
LABEL_20:
v16 = (void **)std::string::_M_append(&v20, v27, v28);
v23[0] = &v24;
v17 = (__m128d *)(v16 + 2);
if ( *v16 == v16 + 2 )
{
v4 = *v17;
v24 = *v17;
}
else
{
v23[0] = *v16;
v24.m128d_f64[0] = v17->m128d_f64[0];
}
v23[1] = v16[1];
*v16 = v17;
v16[1] = 0LL;
LOBYTE(v17->m128d_f64[0]) = 0;
SchemaConverter::visit(v25, v34, 16 * v7 + v5, (long long)v23, v4);
std::vector<std::string>::emplace_back<std::string>((long long)&v30, (long long)v25);
if ( v25[0] != v26 )
operator delete(v25[0], v26[0] + 1LL);
if ( v23[0] != &v24 )
operator delete(v23[0], *(_QWORD *)&v24.m128d_f64[0] + 1LL);
if ( v27 != v8 )
operator delete(v27, v29 + 1);
if ( v20 != v22 )
operator delete(v20, v22[0] + 1LL);
++v7;
v5 = *v33;
}
while ( v7 < (v33[1] - *v33) >> 4 );
}
v25[0] = v26;
std::string::_M_construct<char const*>((long long)v25, " | ", (long long)"");
v18 = v32;
string_join(v32, (long long *)&v30, v25);
if ( v25[0] != v26 )
operator delete(v25[0], v26[0] + 1LL);
std::vector<std::string>::~vector((long long)&v30);
return v18;
}
|
_generate_union_rule:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV qword ptr [RSP + 0xb0],RDX
MOV qword ptr [RSP + 0xa8],RSI
MOV qword ptr [RSP + 0x98],RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x80],XMM0
MOV qword ptr [RSP + 0x90],0x0
MOV R12,qword ptr [RCX]
MOV qword ptr [RSP + 0xa0],RCX
CMP qword ptr [RCX + 0x8],R12
JZ 0x001c87d0
LEA RBP,[RSP + 0x70]
XOR R13D,R13D
LEA R14,[RSP + 0x40]
LAB_001c85a6:
MOV RBX,RBP
MOV RCX,qword ptr [RSP + 0xb0]
MOV RBP,qword ptr [RCX + 0x8]
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV RSI,qword ptr [RCX]
LEA RDX,[RSI + RBP*0x1]
LAB_001c85c5:
MOV R15,RSP
MOV RDI,R15
CALL 0x001268c4
TEST RBP,RBP
LEA RSI,[0x1f96ef]
LEA RAX,[0x1f9798]
CMOVZ RSI,RAX
LAB_001c85e5:
MOV RDI,R15
CALL 0x0011c240
MOV ESI,0x1
CMP R13,0xa
MOV RBP,RBX
JC 0x001c864a
MOV ESI,0x4
MOV RCX,R13
MOV RDI,0x346dc5d63886594b
LAB_001c860d:
CMP RCX,0x63
JBE 0x001c8643
CMP RCX,0x3e7
JBE 0x001c8648
CMP RCX,0x2710
JC 0x001c864a
MOV RAX,RCX
MUL RDI
SHR RDX,0xb
ADD ESI,0x4
CMP RCX,0x1869f
MOV RCX,RDX
JA 0x001c860d
ADD ESI,-0x3
JMP 0x001c864a
LAB_001c8643:
ADD ESI,-0x2
JMP 0x001c864a
LAB_001c8648:
DEC ESI
LAB_001c864a:
MOV ESI,ESI
MOV qword ptr [RSP + 0x60],RBP
LAB_001c8651:
LEA RDI,[RSP + 0x60]
XOR EDX,EDX
CALL 0x0011baa0
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,dword ptr [RSP + 0x68]
MOV RDX,R13
CALL 0x001626a9
MOV RCX,qword ptr [RSP]
MOV EDI,0xf
LEA RAX,[RSP + 0x10]
CMP RCX,RAX
JZ 0x001c8686
MOV RDI,qword ptr [RSP + 0x10]
LAB_001c8686:
MOV R8,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
LEA RAX,[RDX + R8*0x1]
CMP RAX,RDI
JBE 0x001c86b2
MOV EDI,0xf
CMP RSI,RBP
JZ 0x001c86ad
MOV RDI,qword ptr [RSP + 0x70]
LAB_001c86ad:
CMP RAX,RDI
JBE 0x001c86bc
LAB_001c86b2:
MOV RDI,RSP
CALL 0x0011b270
JMP 0x001c86ca
LAB_001c86bc:
LEA RDI,[RSP + 0x60]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011ba40
LAB_001c86ca:
LEA RSI,[RSP + 0x30]
MOV qword ptr [RSP + 0x20],RSI
MOV RDX,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RDX,RCX
JZ 0x001c86ef
MOV qword ptr [RSP + 0x20],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x30],RDX
JMP 0x001c86f5
LAB_001c86ef:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RSI],XMM0
LAB_001c86f5:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RAX],RCX
MOV RAX,R13
SHL RAX,0x4
ADD R12,RAX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
LAB_001c871c:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0xa8]
MOV RDX,R12
LEA RCX,[RSP + 0x20]
CALL 0x001c5796
LAB_001c8734:
LEA RDI,[RSP + 0x80]
MOV RSI,R14
LEA R12,[RSP + 0x30]
CALL 0x0015a97e
MOV RDI,qword ptr [RSP + 0x40]
LEA RAX,[RSP + 0x50]
CMP RDI,RAX
JZ 0x001c8765
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x0011b930
LAB_001c8765:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R12
JZ 0x001c877c
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011b930
LAB_001c877c:
MOV RDI,qword ptr [RSP + 0x60]
CMP RDI,RBP
JZ 0x001c8793
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011b930
LAB_001c8793:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x001c87ae
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011b930
LAB_001c87ae:
INC R13
MOV RAX,qword ptr [RSP + 0xa0]
MOV R12,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
SUB RAX,R12
SAR RAX,0x4
CMP R13,RAX
JC 0x001c85a6
LAB_001c87d0:
LEA RBX,[RSP + 0x50]
MOV qword ptr [RBX + -0x10],RBX
LAB_001c87d9:
LEA RSI,[0x1f994f]
LEA RDX,[0x1f9952]
LEA RDI,[RSP + 0x40]
CALL 0x0012695a
LAB_001c87f1:
LEA RSI,[RSP + 0x80]
LEA RDX,[RSP + 0x40]
MOV R14,qword ptr [RSP + 0x98]
MOV RDI,R14
CALL 0x00176f09
LAB_001c880e:
MOV RDI,qword ptr [RSP + 0x40]
CMP RDI,RBX
JZ 0x001c8825
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x0011b930
LAB_001c8825:
LEA RDI,[RSP + 0x80]
CALL 0x00125d5c
MOV RAX,R14
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::_generate_union_rule(std::__cxx11::string const&,
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > const&) */
vector * SchemaConverter::_generate_union_rule(string *param_1,vector *param_2)
{
long *plVar1;
ulong uVar2;
bool bVar3;
string *psVar4;
char cVar5;
int8 *puVar6;
long *in_RCX;
ulong uVar7;
long *in_RDX;
char cVar8;
ulong uVar9;
ulong *local_e8;
long local_e0;
ulong local_d8 [2];
long *local_c8;
int8 local_c0;
long local_b8;
int8 uStack_b0;
long *local_a8 [2];
long local_98 [2];
ulong *local_88;
uint local_80;
int4 uStack_7c;
ulong local_78 [2];
int8 local_68;
int8 uStack_60;
int8 local_58;
string *local_50;
long *local_48;
vector *local_40;
long *local_38;
local_68 = 0;
uStack_60 = 0;
local_58 = 0;
local_50 = param_1;
local_40 = param_2;
if (in_RCX[1] != *in_RCX) {
uVar9 = 0;
local_48 = in_RCX;
local_38 = in_RDX;
do {
local_e8 = local_d8;
/* try { // try from 001c85c5 to 001c85cf has its CatchHandler @ 001c8861 */
std::__cxx11::string::_M_construct<char*>(&local_e8,*local_38,*local_38 + local_38[1]);
/* try { // try from 001c85e5 to 001c85ec has its CatchHandler @ 001c8866 */
std::__cxx11::string::append((char *)&local_e8);
cVar8 = '\x01';
if (9 < uVar9) {
uVar7 = uVar9;
cVar5 = '\x04';
do {
cVar8 = cVar5;
if (uVar7 < 100) {
cVar8 = cVar8 + -2;
goto LAB_001c864a;
}
if (uVar7 < 1000) {
cVar8 = cVar8 + -1;
goto LAB_001c864a;
}
if (uVar7 < 10000) goto LAB_001c864a;
bVar3 = 99999 < uVar7;
uVar7 = uVar7 / 10000;
cVar5 = cVar8 + '\x04';
} while (bVar3);
cVar8 = cVar8 + '\x01';
}
LAB_001c864a:
/* try { // try from 001c8651 to 001c865c has its CatchHandler @ 001c8868 */
local_88 = local_78;
std::__cxx11::string::_M_construct((ulong)&local_88,cVar8);
std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_88,local_80,uVar9);
uVar7 = 0xf;
if (local_e8 != local_d8) {
uVar7 = local_d8[0];
}
uVar2 = CONCAT44(uStack_7c,local_80) + local_e0;
if (uVar7 < uVar2) {
uVar7 = 0xf;
if (local_88 != local_78) {
uVar7 = local_78[0];
}
if (uVar7 < uVar2) goto LAB_001c86b2;
puVar6 = (int8 *)
std::__cxx11::string::replace((ulong)&local_88,0,(char *)0x0,(ulong)local_e8);
}
else {
LAB_001c86b2:
/* try { // try from 001c86b2 to 001c86c9 has its CatchHandler @ 001c886d */
puVar6 = (int8 *)std::__cxx11::string::_M_append((char *)&local_e8,(ulong)local_88);
}
local_c8 = &local_b8;
plVar1 = puVar6 + 2;
if ((long *)*puVar6 == plVar1) {
local_b8 = *plVar1;
uStack_b0 = puVar6[3];
}
else {
local_b8 = *plVar1;
local_c8 = (long *)*puVar6;
}
local_c0 = puVar6[1];
*puVar6 = plVar1;
puVar6[1] = 0;
*(int1 *)plVar1 = 0;
/* try { // try from 001c871c to 001c8733 has its CatchHandler @ 001c8872 */
visit((basic_json *)local_a8,(string *)local_40);
/* try { // try from 001c8734 to 001c8748 has its CatchHandler @ 001c8877 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68,
(string *)local_a8);
if (local_a8[0] != local_98) {
operator_delete(local_a8[0],local_98[0] + 1);
}
if (local_c8 != &local_b8) {
operator_delete(local_c8,local_b8 + 1);
}
if (local_88 != local_78) {
operator_delete(local_88,local_78[0] + 1);
}
if (local_e8 != local_d8) {
operator_delete(local_e8,local_d8[0] + 1);
}
uVar9 = uVar9 + 1;
} while (uVar9 < (ulong)(local_48[1] - *local_48 >> 4));
}
/* try { // try from 001c87d9 to 001c87f0 has its CatchHandler @ 001c885f */
local_a8[0] = local_98;
std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f994f,&DAT_001f9952);
psVar4 = local_50;
/* try { // try from 001c87f1 to 001c880d has its CatchHandler @ 001c8847 */
string_join((vector *)local_50,(string *)&local_68);
if (local_a8[0] != local_98) {
operator_delete(local_a8[0],local_98[0] + 1);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68);
return (vector *)psVar4;
}
|
|
14,746
|
stbi__tga_read_rgb16(stbi__context*, unsigned char*)
|
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
|
static void stbi__tga_read_rgb16(stbi__context *s, stbi_uc* out)
{
stbi__uint16 px = (stbi__uint16)stbi__get16le(s);
stbi__uint16 fiveBitMask = 31;
// we have 3 channels with 5bits each
int r = (px >> 10) & fiveBitMask;
int g = (px >> 5) & fiveBitMask;
int b = px & fiveBitMask;
// Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later
out[0] = (stbi_uc)((r * 255)/31);
out[1] = (stbi_uc)((g * 255)/31);
out[2] = (stbi_uc)((b * 255)/31);
// some people claim that the most significant bit might be used for alpha
// (possibly if an alpha-bit is set in the "image descriptor byte")
// but that only made 16bit test images completely translucent..
// so let's treat all 15 and 16bit TGAs as RGB with no alpha.
}
|
O2
|
c
|
stbi__tga_read_rgb16(stbi__context*, unsigned char*):
pushq %rbx
movq %rsi, %rbx
callq 0x1657e
movl %eax, %ecx
shrl $0xa, %eax
andl $0x1f, %eax
imull $0xff, %eax, %eax
movw $0x1f, %si
xorl %edx, %edx
divw %si
movb %al, (%rbx)
movl %ecx, %eax
shrl $0x5, %eax
andl $0x1f, %eax
imull $0xff, %eax, %eax
xorl %edx, %edx
divw %si
movb %al, 0x1(%rbx)
andl $0x1f, %ecx
imull $0xff, %ecx, %eax
xorl %edx, %edx
divw %si
movb %al, 0x2(%rbx)
popq %rbx
retq
|
_ZL20stbi__tga_read_rgb16P13stbi__contextPh:
push rbx
mov rbx, rsi
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov ecx, eax
shr eax, 0Ah
and eax, 1Fh
imul eax, 0FFh
mov si, 1Fh
xor edx, edx
div si
mov [rbx], al
mov eax, ecx
shr eax, 5
and eax, 1Fh
imul eax, 0FFh
xor edx, edx
div si
mov [rbx+1], al
and ecx, 1Fh
imul eax, ecx, 0FFh
xor edx, edx
div si
mov [rbx+2], al
pop rbx
retn
|
__int16 stbi__tga_read_rgb16(long long a1, _BYTE *a2)
{
unsigned int v2; // eax
__int16 result; // ax
v2 = stbi__get16le(a1);
*a2 = (unsigned __int16)(255 * ((v2 >> 10) & 0x1F)) / 0x1Fu;
a2[1] = (unsigned __int16)(255 * ((v2 >> 5) & 0x1F)) / 0x1Fu;
result = (unsigned __int16)(255 * (v2 & 0x1F)) / 0x1Fu;
a2[2] = result;
return result;
}
|
stbi__tga_read_rgb16:
PUSH RBX
MOV RBX,RSI
CALL 0x0011657e
MOV ECX,EAX
SHR EAX,0xa
AND EAX,0x1f
IMUL EAX,EAX,0xff
MOV SI,0x1f
XOR EDX,EDX
DIV SI
MOV byte ptr [RBX],AL
MOV EAX,ECX
SHR EAX,0x5
AND EAX,0x1f
IMUL EAX,EAX,0xff
XOR EDX,EDX
DIV SI
MOV byte ptr [RBX + 0x1],AL
AND ECX,0x1f
IMUL EAX,ECX,0xff
XOR EDX,EDX
DIV SI
MOV byte ptr [RBX + 0x2],AL
POP RBX
RET
|
/* stbi__tga_read_rgb16(stbi__context*, unsigned char*) */
void stbi__tga_read_rgb16(stbi__context *param_1,uchar *param_2)
{
uint uVar1;
uVar1 = stbi__get16le(param_1);
*param_2 = (uchar)(((uVar1 >> 10 & 0x1f) * 0xff) / 0x1f);
param_2[1] = (uchar)(((uVar1 >> 5 & 0x1f) * 0xff) / 0x1f);
param_2[2] = (uchar)(((uVar1 & 0x1f) * 0xff) / 0x1f);
return;
}
|
|
14,747
|
my_caseup_utf16
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_caseup_utf16(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0)
{
my_toupper_utf16(uni_plane, &wc);
if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
}
|
O0
|
c
|
my_caseup_utf16:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0xb7418
jmp 0xb741a
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x50(%rbp), %rcx
movb %al, -0x61(%rbp)
jae 0xb744b
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x50(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0xb7454
jmp 0xb74af
movq -0x60(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xba9a0
movl -0x44(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x58(%rbp), %rcx
callq *%rax
movl %eax, %ecx
movl -0x68(%rbp), %eax
cmpl %ecx, %eax
je 0xb7488
jmp 0xb74af
movl -0x44(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x44(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0xb741a
movq -0x18(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
|
my_caseup_utf16:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_8]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_38], rax
mov rax, [rbp+var_8]
mov rax, [rax+0B8h]
mov rax, [rax+30h]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_50], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_58], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_60], rax
jmp short $+2
loc_B7418:
jmp short $+2
loc_B741A:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_50]
mov [rbp+var_61], al
jnb short loc_B744B
mov rax, [rbp+var_38]
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_50]
lea rsi, [rbp+var_30]
call rax
mov [rbp+var_44], eax
cmp eax, 0
setnle al
mov [rbp+var_61], al
loc_B744B:
mov al, [rbp+var_61]
test al, 1
jnz short loc_B7454
jmp short loc_B74AF
loc_B7454:
mov rdi, [rbp+var_60]
lea rsi, [rbp+var_30]
call my_toupper_utf16
mov eax, [rbp+var_44]
mov [rbp+var_68], eax
mov rax, [rbp+var_40]
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_58]
call rax
mov ecx, eax
mov eax, [rbp+var_68]
cmp eax, ecx
jz short loc_B7488
jmp short loc_B74AF
loc_B7488:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_44]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp loc_B741A
loc_B74AF:
mov rax, [rbp+var_18]
add rsp, 70h
pop rbp
retn
|
long long my_caseup_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5)
{
bool v6; // [rsp+Fh] [rbp-61h]
long long v7; // [rsp+10h] [rbp-60h]
long long v8; // [rsp+18h] [rbp-58h]
unsigned long long v9; // [rsp+20h] [rbp-50h]
int v10; // [rsp+2Ch] [rbp-44h]
unsigned int ( *v11)(long long, _QWORD, long long, long long); // [rsp+30h] [rbp-40h]
long long ( *v12)(long long, _QWORD *, unsigned long long, unsigned long long); // [rsp+38h] [rbp-38h]
_QWORD v13[2]; // [rsp+40h] [rbp-30h] BYREF
long long v14; // [rsp+50h] [rbp-20h]
long long v15; // [rsp+58h] [rbp-18h]
unsigned long long v16; // [rsp+60h] [rbp-10h]
long long v17; // [rsp+68h] [rbp-8h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v13[1] = a5;
v12 = *(long long ( **)(long long, _QWORD *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL);
v11 = *(unsigned int ( **)(long long, _QWORD, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL);
v9 = a3 + a2;
v8 = a5 + a4;
v7 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v6 = 0;
if ( v16 < v9 )
{
v10 = v12(v17, v13, v16, v9);
v6 = v10 > 0;
}
if ( !v6 )
break;
my_toupper_utf16(v7, v13);
if ( v10 != v11(v17, v13[0], v14, v8) )
break;
v16 += v10;
v14 += v10;
}
return v15;
}
|
my_caseup_utf16:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001b7418
LAB_001b7418:
JMP 0x001b741a
LAB_001b741a:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x50]
MOV byte ptr [RBP + -0x61],AL
JNC 0x001b744b
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x30]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x61],AL
LAB_001b744b:
MOV AL,byte ptr [RBP + -0x61]
TEST AL,0x1
JNZ 0x001b7454
JMP 0x001b74af
LAB_001b7454:
MOV RDI,qword ptr [RBP + -0x60]
LEA RSI,[RBP + -0x30]
CALL 0x001ba9a0
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x68],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x58]
CALL RAX
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x68]
CMP EAX,ECX
JZ 0x001b7488
JMP 0x001b74af
LAB_001b7488:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001b741a
LAB_001b74af:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x70
POP RBP
RET
|
long my_caseup_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
code *pcVar1;
code *pcVar2;
int8 uVar3;
bool bVar4;
int iVar5;
int local_4c;
int8 local_38;
long local_30;
long local_28;
long local_20;
ulong local_18;
long local_10;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
pcVar2 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30);
uVar3 = *(int8 *)(param_1 + 0x78);
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar4 = false;
if (local_18 < param_2 + param_3) {
local_4c = (*pcVar1)(local_10,&local_38,local_18,param_2 + param_3);
bVar4 = 0 < local_4c;
}
if (!bVar4) break;
my_toupper_utf16(uVar3,&local_38);
iVar5 = (*pcVar2)(local_10,local_38,local_28,param_4 + param_5);
if (local_4c != iVar5) {
return local_20;
}
local_18 = local_18 + (long)local_4c;
local_28 = local_28 + local_4c;
}
return local_20;
}
|
|
14,748
|
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, bool)
|
monkey531[P]llama/common/sampling.cpp
|
std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const std::vector<int> & idxs, const llama_tokens & draft, bool grammar_first) {
GGML_ASSERT(idxs.size() == draft.size() + 1 && "idxs.size() must be draft.size() + 1");
std::vector<llama_token> result;
result.reserve(idxs.size());
size_t i = 0;
for (; i < draft.size(); i++) {
const llama_token id = common_sampler_sample(gsmpl, ctx, idxs[i], grammar_first);
common_sampler_accept(gsmpl, id, true);
result.push_back(id);
if (draft[i] != id) {
break;
}
}
if (i == draft.size()) {
const llama_token id = common_sampler_sample(gsmpl, ctx, idxs[i], grammar_first);
common_sampler_accept(gsmpl, id, true);
result.push_back(id);
}
return result;
}
|
O0
|
cpp
|
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, bool):
subq $0xa8, %rsp
movq %rdi, 0x40(%rsp)
movb %r9b, %al
movq %rdi, %r9
movq %r9, 0x48(%rsp)
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq %rcx, 0x88(%rsp)
movq %r8, 0x80(%rsp)
andb $0x1, %al
movb %al, 0x7f(%rsp)
movq 0x88(%rsp), %rdi
callq 0x61cc0
movq %rax, 0x50(%rsp)
movq 0x80(%rsp), %rdi
callq 0x61cc0
movq %rax, %rcx
movq 0x50(%rsp), %rax
addq $0x1, %rcx
cmpq %rcx, %rax
je 0x1c2e06
leaq 0x52f89(%rip), %rdi # 0x215d75
movl $0x155, %esi # imm = 0x155
leaq 0x496c1(%rip), %rdx # 0x20c4b9
leaq 0x53103(%rip), %rcx # 0x215f02
movb $0x0, %al
callq 0x5aec0
movq 0x40(%rsp), %rdi
movb $0x0, 0x7e(%rsp)
callq 0x62aa0
movq 0x88(%rsp), %rdi
callq 0x61cc0
movq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x1c4ec0
jmp 0x1c2e31
movq $0x0, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x80(%rsp), %rdi
callq 0x61cc0
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
jae 0x1c2f2c
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x88(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0xe5780
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl (%rax), %edx
movzbl 0x7f(%rsp), %ecx
andl $0x1, %ecx
callq 0x1c2b70
movl %eax, 0x34(%rsp)
jmp 0x1c2ead
movl 0x34(%rsp), %eax
movl %eax, 0x5c(%rsp)
movq 0x98(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl $0x1, %edx
callq 0x1c2900
jmp 0x1c2ecd
movq 0x40(%rsp), %rdi
leaq 0x5c(%rsp), %rsi
callq 0xe7d40
jmp 0x1c2ede
movq 0x80(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0xe5780
movl (%rax), %eax
cmpl 0x5c(%rsp), %eax
je 0x1c2f17
jmp 0x1c2f2c
movq 0x40(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
callq 0x61c50
jmp 0x1c2fef
jmp 0x1c2f19
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0x1c2e3a
movq 0x60(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rdi
callq 0x61cc0
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jne 0x1c2fcc
movq 0x98(%rsp), %rax
movq %rax, (%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x88(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0xe5780
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movl (%rax), %edx
movzbl 0x7f(%rsp), %ecx
andl $0x1, %ecx
callq 0x1c2b70
movl %eax, 0x14(%rsp)
jmp 0x1c2f99
movl 0x14(%rsp), %eax
movl %eax, 0x58(%rsp)
movq 0x98(%rsp), %rdi
movl 0x58(%rsp), %esi
movl $0x1, %edx
callq 0x1c2900
jmp 0x1c2fb9
movq 0x40(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xe7d40
jmp 0x1c2fca
jmp 0x1c2fcc
movb $0x1, 0x7e(%rsp)
testb $0x1, 0x7e(%rsp)
jne 0x1c2fe2
movq 0x40(%rsp), %rdi
callq 0x61c50
movq 0x48(%rsp), %rax
addq $0xa8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x5aba0
nopl (%rax)
|
_Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b:
sub rsp, 0A8h
mov [rsp+0A8h+var_68], rdi
mov al, r9b
mov r9, rdi
mov [rsp+0A8h+var_60], r9
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov [rsp+0A8h+var_18], rdx
mov [rsp+0A8h+var_20], rcx
mov [rsp+0A8h+var_28], r8
and al, 1
mov [rsp+0A8h+var_29], al
mov rdi, [rsp+0A8h+var_20]
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov [rsp+0A8h+var_58], rax
mov rdi, [rsp+0A8h+var_28]
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov rcx, rax
mov rax, [rsp+0A8h+var_58]
add rcx, 1
cmp rax, rcx
jz short loc_1C2E06
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 155h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIdxsSizeDraftS; "idxs.size() == draft.size() + 1 && \"id"...
mov al, 0
call _ggml_abort
loc_1C2E06:
mov rdi, [rsp+0A8h+var_68]
mov [rsp+0A8h+var_2A], 0
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov rdi, [rsp+0A8h+var_20]
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov rdi, [rsp+0A8h+var_68]
mov rsi, rax
call _ZNSt6vectorIiSaIiEE7reserveEm; std::vector<int>::reserve(ulong)
jmp short $+2
loc_1C2E31:
mov [rsp+0A8h+var_48], 0
loc_1C2E3A:
mov rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_70], rax
mov rdi, [rsp+0A8h+var_28]
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov rcx, rax
mov rax, [rsp+0A8h+var_70]
cmp rax, rcx
jnb loc_1C2F2C
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_88], rax
mov rax, [rsp+0A8h+var_18]
mov [rsp+0A8h+var_80], rax
mov rdi, [rsp+0A8h+var_20]
mov rsi, [rsp+0A8h+var_48]
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov rdi, [rsp+0A8h+var_88]
mov rsi, [rsp+0A8h+var_80]
mov edx, [rax]
movzx ecx, [rsp+0A8h+var_29]
and ecx, 1
call _Z21common_sampler_sampleP14common_samplerP13llama_contextib; common_sampler_sample(common_sampler *,llama_context *,int,bool)
mov [rsp+0A8h+var_74], eax
jmp short $+2
loc_1C2EAD:
mov eax, [rsp+0A8h+var_74]
mov [rsp+0A8h+var_4C], eax
mov rdi, [rsp+0A8h+var_10]
mov esi, [rsp+0A8h+var_4C]
mov edx, 1
call _Z21common_sampler_acceptP14common_samplerib; common_sampler_accept(common_sampler *,int,bool)
jmp short $+2
loc_1C2ECD:
mov rdi, [rsp+0A8h+var_68]
lea rsi, [rsp+0A8h+var_4C]
call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&)
jmp short $+2
loc_1C2EDE:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_48]
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov eax, [rax]
cmp eax, [rsp+0A8h+var_4C]
jz short loc_1C2F17
jmp short loc_1C2F2C
mov rdi, [rsp+arg_38]
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
jmp loc_1C2FEF
loc_1C2F17:
jmp short $+2
loc_1C2F19:
mov rax, [rsp+0A8h+var_48]
add rax, 1
mov [rsp+0A8h+var_48], rax
jmp loc_1C2E3A
loc_1C2F2C:
mov rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_90], rax
mov rdi, [rsp+0A8h+var_28]
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov rcx, rax
mov rax, [rsp+0A8h+var_90]
cmp rax, rcx
jnz short loc_1C2FCC
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_A8], rax
mov rax, [rsp+0A8h+var_18]
mov [rsp+0A8h+var_A0], rax
mov rdi, [rsp+0A8h+var_20]
mov rsi, [rsp+0A8h+var_48]
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov rdi, [rsp+0A8h+var_A8]
mov rsi, [rsp+0A8h+var_A0]
mov edx, [rax]
movzx ecx, [rsp+0A8h+var_29]
and ecx, 1
call _Z21common_sampler_sampleP14common_samplerP13llama_contextib; common_sampler_sample(common_sampler *,llama_context *,int,bool)
mov [rsp+0A8h+var_94], eax
jmp short $+2
loc_1C2F99:
mov eax, [rsp+0A8h+var_94]
mov [rsp+0A8h+var_50], eax
mov rdi, [rsp+0A8h+var_10]
mov esi, [rsp+0A8h+var_50]
mov edx, 1
call _Z21common_sampler_acceptP14common_samplerib; common_sampler_accept(common_sampler *,int,bool)
jmp short $+2
loc_1C2FB9:
mov rdi, [rsp+0A8h+var_68]
lea rsi, [rsp+0A8h+var_50]
call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&)
jmp short $+2
loc_1C2FCA:
jmp short $+2
loc_1C2FCC:
mov [rsp+0A8h+var_2A], 1
test [rsp+0A8h+var_2A], 1
jnz short loc_1C2FE2
mov rdi, [rsp+0A8h+var_68]
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
loc_1C2FE2:
mov rax, [rsp+0A8h+var_60]
add rsp, 0A8h
retn
loc_1C2FEF:
mov rdi, [rsp+arg_68]
call __Unwind_Resume
|
long long common_sampler_sample_and_accept_n(
long long a1,
common_sampler *a2,
long long a3,
_QWORD *a4,
_QWORD *a5,
char a6)
{
long long v6; // rax
unsigned int *v7; // rax
_DWORD *v8; // rax
unsigned int *v9; // rax
common_sampler *v11; // [rsp+0h] [rbp-A8h]
long long v12; // [rsp+8h] [rbp-A0h]
long long v13; // [rsp+18h] [rbp-90h]
common_sampler *v14; // [rsp+20h] [rbp-88h]
long long v15; // [rsp+28h] [rbp-80h]
unsigned long long v16; // [rsp+38h] [rbp-70h]
long long v17; // [rsp+50h] [rbp-58h]
unsigned int v18; // [rsp+58h] [rbp-50h] BYREF
unsigned int v19; // [rsp+5Ch] [rbp-4Ch] BYREF
unsigned long long i; // [rsp+60h] [rbp-48h]
char v21; // [rsp+7Eh] [rbp-2Ah]
char v22; // [rsp+7Fh] [rbp-29h]
_QWORD *v23; // [rsp+80h] [rbp-28h]
_QWORD *v24; // [rsp+88h] [rbp-20h]
long long v25; // [rsp+90h] [rbp-18h]
common_sampler *v26; // [rsp+98h] [rbp-10h]
long long v27; // [rsp+A0h] [rbp-8h]
v27 = a1;
v26 = a2;
v25 = a3;
v24 = a4;
v23 = a5;
v22 = a6 & 1;
v17 = std::vector<int>::size(a4);
if ( v17 != std::vector<int>::size(v23) + 1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
341LL,
"GGML_ASSERT(%s) failed",
"idxs.size() == draft.size() + 1 && \"idxs.size() must be draft.size() + 1\"");
v21 = 0;
std::vector<int>::vector(a1);
v6 = std::vector<int>::size(v24);
std::vector<int>::reserve(a1, v6);
for ( i = 0LL; ; ++i )
{
v16 = i;
if ( v16 >= std::vector<int>::size(v23) )
break;
v14 = v26;
v15 = v25;
v7 = (unsigned int *)std::vector<int>::operator[](v24, i);
v19 = common_sampler_sample(v14, v15, *v7, v22 & 1);
common_sampler_accept(v26, v19, 1);
std::vector<int>::push_back(a1, (long long)&v19);
v8 = (_DWORD *)std::vector<int>::operator[](v23, i);
if ( *v8 != v19 )
break;
}
v13 = i;
if ( v13 == std::vector<int>::size(v23) )
{
v11 = v26;
v12 = v25;
v9 = (unsigned int *)std::vector<int>::operator[](v24, i);
v18 = common_sampler_sample(v11, v12, *v9, v22 & 1);
common_sampler_accept(v26, v18, 1);
std::vector<int>::push_back(a1, (long long)&v18);
}
return a1;
}
| |||
14,749
|
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, bool)
|
monkey531[P]llama/common/sampling.cpp
|
std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const std::vector<int> & idxs, const llama_tokens & draft, bool grammar_first) {
GGML_ASSERT(idxs.size() == draft.size() + 1 && "idxs.size() must be draft.size() + 1");
std::vector<llama_token> result;
result.reserve(idxs.size());
size_t i = 0;
for (; i < draft.size(); i++) {
const llama_token id = common_sampler_sample(gsmpl, ctx, idxs[i], grammar_first);
common_sampler_accept(gsmpl, id, true);
result.push_back(id);
if (draft[i] != id) {
break;
}
}
if (i == draft.size()) {
const llama_token id = common_sampler_sample(gsmpl, ctx, idxs[i], grammar_first);
common_sampler_accept(gsmpl, id, true);
result.push_back(id);
}
return result;
}
|
O3
|
cpp
|
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
movq 0x8(%r8), %rax
subq (%r8), %rax
sarq $0x2, %rsi
sarq $0x2, %rax
incq %rax
cmpq %rax, %rsi
jne 0xcd4f7
movl %r9d, %ebp
movq %r8, %r13
movq %rcx, %r12
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0xce434
movq 0x8(%r13), %rax
movzbl %bpl, %ebp
cmpq (%r13), %rax
je 0xcd484
xorl %r15d, %r15d
movq (%r12), %rax
movl (%rax,%r15,4), %edx
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movl %ebp, %ecx
callq 0xcd250
movl %eax, 0x8(%rsp)
movq %r14, %rdi
movl %eax, %esi
movl $0x1, %edx
callq 0xcd097
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xcd451
movl 0x8(%rsp), %edx
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xcd462
movq %rbx, %rdi
leaq 0x8(%rsp), %rdx
callq 0x7061a
movl 0x8(%rsp), %edx
movq (%r13), %rax
movq 0x8(%r13), %rcx
cmpl %edx, (%rax,%r15,4)
jne 0xcd48a
incq %r15
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %rdx, %r15
jb 0xcd40d
jmp 0xcd48a
xorl %r15d, %r15d
movq %rax, %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rcx, %r15
jne 0xcd4e5
movq (%r12), %rax
movl (%rax,%r15,4), %edx
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movl %ebp, %ecx
callq 0xcd250
movl %eax, %ebp
movl %eax, 0xc(%rsp)
movq %r14, %rdi
movl %eax, %esi
movl $0x1, %edx
callq 0xcd097
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xcd4d8
movl %ebp, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xcd4e5
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x7061a
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x26dcb(%rip), %rdi # 0xf42c9
leaq 0x17db6(%rip), %rdx # 0xe52bb
leaq 0x26f4a(%rip), %rcx # 0xf4456
movl $0x155, %esi # imm = 0x155
xorl %eax, %eax
callq 0x1ae80
jmp 0xcd51c
jmp 0xcd51c
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xcd533
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1a8c0
movq %r14, %rdi
callq 0x1af80
|
_Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_38], rdx
mov r14, rsi
mov rsi, [rcx+8]
sub rsi, [rcx]
mov rax, [r8+8]
sub rax, [r8]
sar rsi, 2
sar rax, 2
inc rax
cmp rsi, rax
jnz loc_CD4F7
mov ebp, r9d
mov r13, r8
mov r12, rcx
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
call _ZNSt6vectorIiSaIiEE7reserveEm; std::vector<int>::reserve(ulong)
mov rax, [r13+8]
movzx ebp, bpl
cmp rax, [r13+0]
jz short loc_CD484
xor r15d, r15d
loc_CD40D:
mov rax, [r12]
mov edx, [rax+r15*4]
mov rdi, r14
mov rsi, [rsp+48h+var_38]
mov ecx, ebp
call _Z21common_sampler_sampleP14common_samplerP13llama_contextib; common_sampler_sample(common_sampler *,llama_context *,int,bool)
mov [rsp+48h+var_40], eax
mov rdi, r14
mov esi, eax
mov edx, 1
call _Z21common_sampler_acceptP14common_samplerib; common_sampler_accept(common_sampler *,int,bool)
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_CD451
mov edx, [rsp+48h+var_40]
mov [rsi], edx
add rsi, 4
mov [rbx+8], rsi
jmp short loc_CD462
loc_CD451:
mov rdi, rbx
lea rdx, [rsp+48h+var_40]
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
mov edx, [rsp+48h+var_40]
loc_CD462:
mov rax, [r13+0]
mov rcx, [r13+8]
cmp [rax+r15*4], edx
jnz short loc_CD48A
inc r15
mov rdx, rcx
sub rdx, rax
sar rdx, 2
cmp r15, rdx
jb short loc_CD40D
jmp short loc_CD48A
loc_CD484:
xor r15d, r15d
mov rcx, rax
loc_CD48A:
sub rcx, rax
sar rcx, 2
cmp r15, rcx
jnz short loc_CD4E5
mov rax, [r12]
mov edx, [rax+r15*4]
mov rdi, r14
mov rsi, [rsp+48h+var_38]
mov ecx, ebp
call _Z21common_sampler_sampleP14common_samplerP13llama_contextib; common_sampler_sample(common_sampler *,llama_context *,int,bool)
mov ebp, eax
mov [rsp+48h+var_3C], eax
mov rdi, r14
mov esi, eax
mov edx, 1
call _Z21common_sampler_acceptP14common_samplerib; common_sampler_accept(common_sampler *,int,bool)
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_CD4D8
mov [rsi], ebp
add rsi, 4
mov [rbx+8], rsi
jmp short loc_CD4E5
loc_CD4D8:
lea rdx, [rsp+48h+var_3C]
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_CD4E5:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CD4F7:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIdxsSizeDraftS; "idxs.size() == draft.size() + 1 && \"id"...
mov esi, 155h
xor eax, eax
call _ggml_abort
jmp short loc_CD51C
jmp short $+2
loc_CD51C:
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_CD533
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CD533:
mov rdi, r14
call __Unwind_Resume
|
long long * common_sampler_sample_and_accept_n(
long long *a1,
_QWORD *a2,
long long a3,
_QWORD *a4,
long long *a5,
unsigned __int8 a6,
double a7,
double a8)
{
long long v8; // rbx
long long v13; // rax
unsigned long long v14; // r15
_DWORD *v15; // rsi
unsigned int v16; // edx
long long v17; // rcx
unsigned int v18; // ebp
unsigned int *v19; // rsi
double v21; // xmm0_8
long long v22; // rax
long long v23; // r14
unsigned int v24; // [rsp+8h] [rbp-40h] BYREF
unsigned int v25; // [rsp+Ch] [rbp-3Ch] BYREF
long long v26; // [rsp+10h] [rbp-38h]
v26 = a3;
if ( (long long)(a4[1] - *a4) >> 2 != ((a5[1] - *a5) >> 2) + 1 )
{
v21 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
341LL,
"GGML_ASSERT(%s) failed",
"idxs.size() == draft.size() + 1 && \"idxs.size() must be draft.size() + 1\"");
v23 = v22;
if ( *(_QWORD *)v8 )
operator delete(*(void **)v8, *(_QWORD *)(v8 + 16) - *(_QWORD *)v8);
_Unwind_Resume(v23, v21, a8);
}
*(_OWORD *)a1 = 0LL;
a1[2] = 0LL;
std::vector<int>::reserve();
v13 = a5[1];
if ( v13 == *a5 )
{
v14 = 0LL;
v17 = a5[1];
}
else
{
v14 = 0LL;
do
{
v24 = common_sampler_sample(a2, v26, *(_DWORD *)(*a4 + 4 * v14), a6);
common_sampler_accept(a2, v24, 1);
v15 = (_DWORD *)a1[1];
if ( v15 == (_DWORD *)a1[2] )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, (long long)v15, &v24);
v16 = v24;
}
else
{
v16 = v24;
*v15 = v24;
a1[1] = (long long)(v15 + 1);
}
v13 = *a5;
v17 = a5[1];
if ( *(_DWORD *)(*a5 + 4 * v14) != v16 )
break;
++v14;
}
while ( v14 < (v17 - v13) >> 2 );
}
if ( v14 == (v17 - v13) >> 2 )
{
v18 = common_sampler_sample(a2, v26, *(_DWORD *)(*a4 + 4 * v14), a6);
v25 = v18;
common_sampler_accept(a2, v18, 1);
v19 = (unsigned int *)a1[1];
if ( v19 == (unsigned int *)a1[2] )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, (long long)v19, &v25);
}
else
{
*v19 = v18;
a1[1] = (long long)(v19 + 1);
}
}
return a1;
}
|
common_sampler_sample_and_accept_n:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDX
MOV R14,RSI
MOV RSI,qword ptr [RCX + 0x8]
SUB RSI,qword ptr [RCX]
MOV RAX,qword ptr [R8 + 0x8]
SUB RAX,qword ptr [R8]
SAR RSI,0x2
SAR RAX,0x2
INC RAX
CMP RSI,RAX
JNZ 0x001cd4f7
MOV EBP,R9D
MOV R13,R8
MOV R12,RCX
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
LAB_001cd3f7:
CALL 0x001ce434
MOV RAX,qword ptr [R13 + 0x8]
MOVZX EBP,BPL
CMP RAX,qword ptr [R13]
JZ 0x001cd484
XOR R15D,R15D
LAB_001cd40d:
MOV RAX,qword ptr [R12]
MOV EDX,dword ptr [RAX + R15*0x4]
LAB_001cd415:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x10]
MOV ECX,EBP
CALL 0x001cd250
MOV dword ptr [RSP + 0x8],EAX
MOV RDI,R14
MOV ESI,EAX
MOV EDX,0x1
CALL 0x001cd097
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001cd451
MOV EDX,dword ptr [RSP + 0x8]
MOV dword ptr [RSI],EDX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001cd462
LAB_001cd451:
MOV RDI,RBX
LEA RDX,[RSP + 0x8]
CALL 0x0017061a
MOV EDX,dword ptr [RSP + 0x8]
LAB_001cd462:
MOV RAX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
CMP dword ptr [RAX + R15*0x4],EDX
JNZ 0x001cd48a
INC R15
MOV RDX,RCX
SUB RDX,RAX
SAR RDX,0x2
CMP R15,RDX
JC 0x001cd40d
JMP 0x001cd48a
LAB_001cd484:
XOR R15D,R15D
MOV RCX,RAX
LAB_001cd48a:
SUB RCX,RAX
SAR RCX,0x2
CMP R15,RCX
JNZ 0x001cd4e5
MOV RAX,qword ptr [R12]
MOV EDX,dword ptr [RAX + R15*0x4]
LAB_001cd49e:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x10]
MOV ECX,EBP
CALL 0x001cd250
MOV EBP,EAX
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,R14
MOV ESI,EAX
MOV EDX,0x1
CALL 0x001cd097
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001cd4d8
MOV dword ptr [RSI],EBP
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001cd4e5
LAB_001cd4d8:
LEA RDX,[RSP + 0xc]
MOV RDI,RBX
CALL 0x0017061a
LAB_001cd4e5:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cd4f7:
LEA RDI,[0x1f42c9]
LEA RDX,[0x1e52bb]
LEA RCX,[0x1f4456]
MOV ESI,0x155
XOR EAX,EAX
CALL 0x0011ae80
|
/* common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int,
std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, bool) */
common_sampler *
common_sampler_sample_and_accept_n
(common_sampler *param_1,llama_context *param_2,vector *param_3,vector *param_4,
bool param_5)
{
int *piVar1;
long *plVar2;
int iVar3;
long lVar4;
long lVar5;
ulong uVar6;
int7 in_register_00000081;
bool in_R9B;
int local_40;
int local_3c;
vector *local_38;
uVar6 = *(long *)(param_4 + 8) - *(long *)param_4 >> 2;
local_38 = param_3;
if (uVar6 == (*(long *)(CONCAT71(in_register_00000081,param_5) + 8) -
*(long *)CONCAT71(in_register_00000081,param_5) >> 2) + 1U) {
plVar2 = (long *)CONCAT71(in_register_00000081,param_5);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
/* try { // try from 001cd3f7 to 001cd3fb has its CatchHandler @ 001cd518 */
std::vector<int,std::allocator<int>>::reserve((vector<int,std::allocator<int>> *)param_1,uVar6);
lVar4 = plVar2[1];
if (lVar4 == *plVar2) {
uVar6 = 0;
lVar5 = lVar4;
}
else {
uVar6 = 0;
do {
/* try { // try from 001cd415 to 001cd45d has its CatchHandler @ 001cd51c */
local_40 = common_sampler_sample
((common_sampler *)param_2,(llama_context *)local_38,
*(int *)(*(long *)param_4 + uVar6 * 4),in_R9B);
common_sampler_accept((common_sampler *)param_2,local_40,true);
piVar1 = *(int **)(param_1 + 8);
if (piVar1 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,piVar1,&local_40);
}
else {
*piVar1 = local_40;
*(int **)(param_1 + 8) = piVar1 + 1;
}
lVar4 = *plVar2;
lVar5 = plVar2[1];
} while ((*(int *)(lVar4 + uVar6 * 4) == local_40) &&
(uVar6 = uVar6 + 1, uVar6 < (ulong)(lVar5 - lVar4 >> 2)));
}
if (uVar6 == lVar5 - lVar4 >> 2) {
/* try { // try from 001cd49e to 001cd4e4 has its CatchHandler @ 001cd51a */
iVar3 = common_sampler_sample
((common_sampler *)param_2,(llama_context *)local_38,
*(int *)(*(long *)param_4 + uVar6 * 4),in_R9B);
local_3c = iVar3;
common_sampler_accept((common_sampler *)param_2,iVar3,true);
piVar1 = *(int **)(param_1 + 8);
if (piVar1 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,piVar1,&local_3c);
}
else {
*piVar1 = iVar3;
*(int **)(param_1 + 8) = piVar1 + 1;
}
}
return param_1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",0x155,
"GGML_ASSERT(%s) failed",
"idxs.size() == draft.size() + 1 && \"idxs.size() must be draft.size() + 1\"");
}
|
|
14,750
|
my_sync_dir
|
eloqsql/mysys/my_sync.c
|
int my_sync_dir(const char *dir_name __attribute__((unused)),
myf my_flags __attribute__((unused)))
{
#ifdef NEED_EXPLICIT_SYNC_DIR
static const char cur_dir_name[]= {FN_CURLIB, 0};
File dir_fd;
int res= 0;
const char *correct_dir_name;
DBUG_ENTER("my_sync_dir");
DBUG_PRINT("my",("Dir: '%s' my_flags: %lu", dir_name, my_flags));
/* Sometimes the path does not contain an explicit directory */
correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name;
/*
Syncing a dir may give EINVAL on tmpfs on Linux, which is ok.
EIO on the other hand is very important. Hence MY_IGNORE_BADFD.
*/
if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0)
{
if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD)))
res= 2;
if (my_close(dir_fd, MYF(my_flags)))
res= 3;
}
else
res= 1;
DBUG_RETURN(res);
#else
return 0;
#endif
}
|
O3
|
c
|
my_sync_dir:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, (%rdi)
movq %rsi, %rbx
leaq 0x3e350(%rip), %rax # 0x9cb78
cmoveq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x5d660
testl %eax, %eax
js 0x5e86f
movl %eax, %r14d
movq %rbx, %rsi
orq $0x20, %rsi
movl %eax, %edi
callq 0x5e6e0
xorl %r15d, %r15d
testl %eax, %eax
setne %r15b
addl %r15d, %r15d
movl %r14d, %edi
movq %rbx, %rsi
callq 0x5d805
testl %eax, %eax
movl $0x3, %eax
cmovel %r15d, %eax
jmp 0x5e874
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
my_sync_dir:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
cmp byte ptr [rdi], 0
mov rbx, rsi
lea rax, my_sync_dir_cur_dir_name
cmovz rdi, rax
xor esi, esi
mov rdx, rbx
call my_open
test eax, eax
js short loc_5E86F
mov r14d, eax
mov rsi, rbx
or rsi, 20h
mov edi, eax
call my_sync
xor r15d, r15d
test eax, eax
setnz r15b
add r15d, r15d
mov edi, r14d
mov rsi, rbx
call my_close
test eax, eax
mov eax, 3
cmovz eax, r15d
jmp short loc_5E874
loc_5E86F:
mov eax, 1
loc_5E874:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long my_sync_dir(_BYTE *a1, long long a2)
{
int v2; // eax
unsigned int v3; // r14d
unsigned int v4; // r15d
bool v5; // zf
long long result; // rax
if ( !*a1 )
a1 = &my_sync_dir_cur_dir_name;
v2 = my_open((long long)a1, 0, a2);
if ( v2 < 0 )
return 1LL;
v3 = v2;
v4 = 2 * ((unsigned int)my_sync((unsigned int)v2, (const char *)(a2 | 0x20)) != 0);
v5 = (unsigned int)my_close(v3, (const char *)a2) == 0;
result = 3LL;
if ( v5 )
return v4;
return result;
}
|
my_sync_dir:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
CMP byte ptr [RDI],0x0
MOV RBX,RSI
LEA RAX,[0x19cb78]
CMOVZ RDI,RAX
XOR ESI,ESI
MOV RDX,RBX
CALL 0x0015d660
TEST EAX,EAX
JS 0x0015e86f
MOV R14D,EAX
MOV RSI,RBX
OR RSI,0x20
MOV EDI,EAX
CALL 0x0015e6e0
XOR R15D,R15D
TEST EAX,EAX
SETNZ R15B
ADD R15D,R15D
MOV EDI,R14D
MOV RSI,RBX
CALL 0x0015d805
TEST EAX,EAX
MOV EAX,0x3
CMOVZ EAX,R15D
JMP 0x0015e874
LAB_0015e86f:
MOV EAX,0x1
LAB_0015e874:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
char my_sync_dir(char *param_1,ulong param_2)
{
char cVar1;
int iVar2;
int iVar3;
if (*param_1 == '\0') {
param_1 = ".";
}
iVar2 = my_open(param_1,0,param_2);
if (iVar2 < 0) {
cVar1 = '\x01';
}
else {
iVar3 = my_sync(iVar2,param_2 | 0x20);
iVar2 = my_close(iVar2,param_2);
cVar1 = '\x03';
if (iVar2 == 0) {
cVar1 = (iVar3 != 0) * '\x02';
}
}
return cVar1;
}
|
|
14,751
|
console::init(bool, bool)
|
monkey531[P]llama/common/console.cpp
|
void init(bool use_simple_io, bool use_advanced_display) {
advanced_display = use_advanced_display;
simple_io = use_simple_io;
#if defined(_WIN32)
// Windows-specific console initialization
DWORD dwMode = 0;
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
if (hConsole == INVALID_HANDLE_VALUE || !GetConsoleMode(hConsole, &dwMode)) {
hConsole = GetStdHandle(STD_ERROR_HANDLE);
if (hConsole != INVALID_HANDLE_VALUE && (!GetConsoleMode(hConsole, &dwMode))) {
hConsole = nullptr;
simple_io = true;
}
}
if (hConsole) {
// Check conditions combined to reduce nesting
if (advanced_display && !(dwMode & ENABLE_VIRTUAL_TERMINAL_PROCESSING) &&
!SetConsoleMode(hConsole, dwMode | ENABLE_VIRTUAL_TERMINAL_PROCESSING)) {
advanced_display = false;
}
// Set console output codepage to UTF8
SetConsoleOutputCP(CP_UTF8);
}
HANDLE hConIn = GetStdHandle(STD_INPUT_HANDLE);
if (hConIn != INVALID_HANDLE_VALUE && GetConsoleMode(hConIn, &dwMode)) {
// Set console input codepage to UTF16
_setmode(_fileno(stdin), _O_WTEXT);
// Set ICANON (ENABLE_LINE_INPUT) and ECHO (ENABLE_ECHO_INPUT)
if (simple_io) {
dwMode |= ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT;
} else {
dwMode &= ~(ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT);
}
if (!SetConsoleMode(hConIn, dwMode)) {
simple_io = true;
}
}
if (simple_io) {
_setmode(_fileno(stdin), _O_U8TEXT);
}
#else
// POSIX-specific console initialization
if (!simple_io) {
struct termios new_termios;
tcgetattr(STDIN_FILENO, &initial_state);
new_termios = initial_state;
new_termios.c_lflag &= ~(ICANON | ECHO);
new_termios.c_cc[VMIN] = 1;
new_termios.c_cc[VTIME] = 0;
tcsetattr(STDIN_FILENO, TCSANOW, &new_termios);
tty = fopen("/dev/tty", "w+");
if (tty != nullptr) {
out = tty;
}
}
setlocale(LC_ALL, "");
#endif
}
|
O2
|
cpp
|
console::init(bool, bool):
subq $0x48, %rsp
movb %sil, 0x73e56(%rip) # 0x1002f9
movb %dil, 0x738f6(%rip) # 0xffda0
testl %edi, %edi
jne 0x8c523
leaq 0x73e47(%rip), %rsi # 0x1002fc
xorl %edi, %edi
callq 0x23a00
movups 0x73e39(%rip), %xmm0 # 0x1002fc
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movups 0x73e3c(%rip), %xmm0 # 0x10030c
movaps %xmm0, 0x10(%rdx)
movups 0x73e41(%rip), %xmm0 # 0x10031c
movaps %xmm0, 0x20(%rdx)
movups 0x73e42(%rip), %xmm0 # 0x100328
movups %xmm0, 0x2c(%rdx)
andb $-0xb, 0xc(%rdx)
movw $0x100, 0x16(%rdx) # imm = 0x100
xorl %edi, %edi
xorl %esi, %esi
callq 0x23b70
leaq 0x2d178(%rip), %rdi # 0xb967c
leaq 0x2d17a(%rip), %rsi # 0xb9685
callq 0x23a80
movq %rax, 0x73e21(%rip) # 0x100338
testq %rax, %rax
je 0x8c523
movq %rax, 0x73e1d(%rip) # 0x100340
leaq 0x1f0a9(%rip), %rsi # 0xab5d3
pushq $0x6
popq %rdi
callq 0x23810
addq $0x48, %rsp
retq
|
_ZN7console4initEbb:
sub rsp, 48h
mov cs:_ZN7consoleL16advanced_displayE, sil; console::advanced_display
mov cs:_ZN7consoleL9simple_ioE, dil; console::simple_io
test edi, edi
jnz short loc_8C523
lea rsi, _ZN7consoleL13initial_stateE; console::initial_state
xor edi, edi
call _tcgetattr
movups xmm0, cs:_ZN7consoleL13initial_stateE; console::initial_state
mov rdx, rsp
movaps xmmword ptr [rdx], xmm0
movups xmm0, cs:xmmword_10030C
movaps xmmword ptr [rdx+10h], xmm0
movups xmm0, cs:xmmword_10031C
movaps xmmword ptr [rdx+20h], xmm0
movups xmm0, cs:xmmword_10031C+0Ch
movups xmmword ptr [rdx+2Ch], xmm0
and byte ptr [rdx+0Ch], 0F5h
mov word ptr [rdx+16h], 100h
xor edi, edi
xor esi, esi
call _tcsetattr
lea rdi, aDevTty; "/dev/tty"
lea rsi, aW; "w+"
call _fopen
mov cs:_ZN7consoleL3ttyE, rax; console::tty
test rax, rax
jz short loc_8C523
mov cs:_ZN7consoleL3outE, rax; console::out
loc_8C523:
lea rsi, aInfillMode+1Ch; ""
push 6
pop rdi
call _setlocale
add rsp, 48h
retn
|
long long console::init(console *this, char a2)
{
long long v2; // rax
console::advanced_display = a2;
console::simple_io = (char)this;
if ( !(_DWORD)this )
{
tcgetattr(0LL, &console::initial_state);
((void ( *)(_QWORD, _QWORD))tcsetattr)(0LL, 0LL);
v2 = fopen("/dev/tty", "w+");
console::tty = v2;
if ( v2 )
console::out = v2;
}
return setlocale(6LL, "");
}
|
init:
SUB RSP,0x48
MOV byte ptr [0x002002f9],SIL
MOV byte ptr [0x001ffda0],DIL
TEST EDI,EDI
JNZ 0x0018c523
LEA RSI,[0x2002fc]
XOR EDI,EDI
CALL 0x00123a00
MOVUPS XMM0,xmmword ptr [0x002002fc]
MOV RDX,RSP
MOVAPS xmmword ptr [RDX],XMM0
MOVUPS XMM0,xmmword ptr [0x0020030c]
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [0x0020031c]
MOVAPS xmmword ptr [RDX + 0x20],XMM0
MOVUPS XMM0,xmmword ptr [0x00200328]
MOVUPS xmmword ptr [RDX + 0x2c],XMM0
AND byte ptr [RDX + 0xc],0xf5
MOV word ptr [RDX + 0x16],0x100
XOR EDI,EDI
XOR ESI,ESI
CALL 0x00123b70
LEA RDI,[0x1b967c]
LEA RSI,[0x1b9685]
CALL 0x00123a80
MOV qword ptr [0x00200338],RAX
TEST RAX,RAX
JZ 0x0018c523
MOV qword ptr [0x00200340],RAX
LAB_0018c523:
LEA RSI,[0x1ab5d3]
PUSH 0x6
POP RDI
CALL 0x00123810
ADD RSP,0x48
RET
|
/* console::init(bool, bool) */
void console::init(bool param_1,bool param_2)
{
int7 in_register_00000039;
termios local_48;
simple_io = param_1;
advanced_display = param_2;
if ((int)CONCAT71(in_register_00000039,param_1) == 0) {
tcgetattr(0,(termios *)initial_state);
local_48.c_iflag = initial_state._0_4_;
local_48.c_oflag = initial_state._4_4_;
local_48.c_cc[7] = initial_state[0x18];
local_48.c_cc[8] = initial_state[0x19];
local_48.c_cc[9] = initial_state[0x1a];
local_48.c_cc[10] = initial_state[0x1b];
local_48.c_cc[0xb] = initial_state[0x1c];
local_48.c_cc[0xc] = initial_state[0x1d];
local_48.c_cc[0xd] = initial_state[0x1e];
local_48.c_cc[0xe] = initial_state[0x1f];
local_48.c_cc[0xf] = initial_state[0x20];
local_48.c_cc[0x10] = initial_state[0x21];
local_48.c_cc[0x11] = initial_state[0x22];
local_48.c_cc[0x12] = initial_state[0x23];
local_48.c_cc[0x13] = initial_state[0x24];
local_48.c_cc[0x14] = initial_state[0x25];
local_48.c_cc[0x15] = initial_state[0x26];
local_48.c_cc[0x16] = initial_state[0x27];
local_48.c_cc[0x17] = initial_state[0x28];
local_48.c_cc[0x18] = initial_state[0x29];
local_48.c_cc[0x19] = initial_state[0x2a];
local_48.c_cc[0x1a] = initial_state[0x2b];
local_48.c_cc[0x1b] = initial_state[0x2c];
local_48.c_cc[0x1c] = initial_state[0x2d];
local_48.c_cc[0x1d] = initial_state[0x2e];
local_48.c_cc[0x1e] = initial_state[0x2f];
local_48._48_4_ = initial_state._48_4_;
local_48.c_ispeed = initial_state._52_4_;
local_48.c_ospeed = initial_state._56_4_;
local_48._8_8_ = initial_state._8_8_ & 0xfffffff5ffffffff;
local_48._16_6_ = (int6)initial_state._16_8_;
local_48.c_cc._5_2_ = 0x100;
tcsetattr(0,0,&local_48);
tty = fopen("/dev/tty","w+");
if (tty != (FILE *)0x0) {
out = tty;
}
}
setlocale(6,"");
return;
}
|
|
14,752
|
mthd_my_send_cmd
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
int
mthd_my_send_cmd(MYSQL *mysql,enum enum_server_command command, const char *arg,
size_t length, my_bool skip_check, void *opt_arg)
{
NET *net= &mysql->net;
int result= -1;
if (mysql->net.pvio == 0)
{
/* Do reconnect if possible */
if (mariadb_reconnect(mysql))
return(1);
}
if (mysql->status != MYSQL_STATUS_READY ||
mysql->server_status & SERVER_MORE_RESULTS_EXIST)
{
SET_CLIENT_ERROR(mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
goto end;
}
if (IS_CONNHDLR_ACTIVE(mysql))
{
result= mysql->extension->conn_hdlr->plugin->set_connection(mysql, command, arg, length, skip_check, opt_arg);
if (result== -1)
return(result);
}
CLEAR_CLIENT_ERROR(mysql);
if (command == COM_QUERY ||
command == COM_STMT_PREPARE)
{
if ((mysql->options.client_flag & CLIENT_LOCAL_FILES) &&
mysql->options.extension && mysql->extension->auto_local_infile == WAIT_FOR_QUERY &&
arg && (*arg == 'l' || *arg == 'L'))
{
if (strncasecmp(arg, "load", 4) == 0)
mysql->extension->auto_local_infile= ACCEPT_FILE_REQUEST;
}
}
mysql->info=0;
mysql->affected_rows= ~(unsigned long long) 0;
ma_net_clear(net); /* Clear receive buffer */
if (!arg)
arg="";
if (net->extension->multi_status== COM_MULTI_ENABLED)
{
return net_add_multi_command(net, command, (const uchar *)arg, length);
}
if (ma_net_write_command(net,(uchar) command,arg,
length ? length : (ulong) strlen(arg), 0))
{
if (net->last_errno == ER_NET_PACKET_TOO_LARGE)
{
my_set_error(mysql, CR_NET_PACKET_TOO_LARGE, SQLSTATE_UNKNOWN, 0);
goto end;
}
end_server(mysql);
if (mariadb_reconnect(mysql))
goto end;
if (ma_net_write_command(net,(uchar) command,arg,
length ? length : (ulong) strlen(arg), 0))
{
my_set_error(mysql, CR_SERVER_GONE_ERROR, SQLSTATE_UNKNOWN, 0);
goto end;
}
}
result=0;
if (net->extension->multi_status > COM_MULTI_OFF)
skip_check= 1;
if (!skip_check)
{
result= ((mysql->packet_length=ma_net_safe_read(mysql)) == packet_error ?
1 : 0);
}
end:
return(result);
}
|
O3
|
c
|
mthd_my_send_cmd:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x3b065
cmpl $0x0, 0x488(%rbx)
jne 0x3b00b
testb $0x8, 0x380(%rbx)
jne 0x3b00b
movq 0x4f0(%rbx), %rax
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
testq %rax, %rax
movq %rcx, -0x30(%rbp)
je 0x3af13
movq (%rax), %rax
testq %rax, %rax
je 0x3af13
movq (%rax), %rax
movl %r8d, %r14d
movsbl %r14b, %r8d
movq %rbx, %rdi
movl %esi, %r13d
movq %r12, %rdx
callq *0x70(%rax)
movl %r13d, %esi
movl %r14d, %r8d
movl %eax, %r13d
cmpl $-0x1, %eax
je 0x3b05d
movl %r8d, -0x34(%rbp)
movl $0x0, 0x90(%rbx)
movl $0x30303030, 0x297(%rbx) # imm = 0x30303030
movw $0x30, 0x29b(%rbx)
movb $0x0, 0x97(%rbx)
movq 0x2a0(%rbx), %rax
testq %rax, %rax
je 0x3af4e
movl $0x0, 0x4(%rax)
cmpl $0x16, %esi
je 0x3af58
cmpl $0x3, %esi
jne 0x3afae
testb $-0x80, 0x3a8(%rbx)
je 0x3afae
cmpq $0x0, 0x480(%rbx)
je 0x3afae
testq %r12, %r12
je 0x3afae
movq 0x4f0(%rbx), %r14
cmpb $0x1, 0x78(%r14)
jne 0x3afae
movzbl (%r12), %eax
orl $0x20, %eax
cmpl $0x6c, %eax
jne 0x3afae
movl %esi, %r15d
leaq 0x58aee(%rip), %rsi # 0x93a83
movl $0x4, %edx
movq %r12, %rdi
callq 0x36a00
movl %r15d, %esi
testl %eax, %eax
jne 0x3afae
movb $0x2, 0x78(%r14)
movl %esi, %r14d
movq $0x0, 0x2e0(%rbx)
movq $-0x1, 0x338(%rbx)
movq %rbx, %rdi
callq 0x566b4
testq %r12, %r12
leaq 0x58f0a(%rip), %rdx # 0x93ee3
cmovneq %r12, %rdx
movq 0x2a0(%rbx), %rax
cmpl $0x2, (%rax)
jne 0x3b0ad
movzbl %r14b, %esi
movq %rbx, %rdi
movq -0x30(%rbp), %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x57056
movl $0x7de, 0x90(%rbx) # imm = 0x7DE
leaq 0x297(%rbx), %rdi
leaq 0x300c4d(%rip), %rax # 0x33bc70
movq (%rax), %rsi
movl $0x5, %edx
callq 0x36140
xorl %r14d, %r14d
movb %r14b, 0x29c(%rbx)
leaq 0x97(%rbx), %rdi
leaq 0x300c38(%rip), %rax # 0x33bc80
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x36140
movb %r14b, 0x296(%rbx)
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x3b09b
movq %rbx, %rdi
movl %r8d, %r14d
movq %rcx, %r13
movq %r12, -0x40(%rbp)
movl %esi, %r12d
movq %r9, %r15
callq 0x3b1ac
movq %r15, %r9
movl %r12d, %esi
movq -0x40(%rbp), %r12
movq %r13, %rcx
movl %r14d, %r8d
movl $0x1, %r14d
testb %al, %al
je 0x3aeb3
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x30(%rbp), %rax
movq %rax, %rcx
testq %rax, %rax
movl %r14d, %esi
movq %rdx, %r12
jne 0x3b0d0
movq %rdx, %rdi
callq 0x36420
movq %r12, %rdx
movl %r14d, %esi
movq %rax, %rcx
movzbl %sil, %r15d
xorl %r14d, %r14d
movq %rbx, %rdi
movl %r15d, %esi
xorl %r8d, %r8d
callq 0x56b35
testl %eax, %eax
je 0x3b16f
cmpl $0x481, 0x90(%rbx) # imm = 0x481
jne 0x3b116
leaq 0x300b70(%rip), %rax # 0x33bc70
movq (%rax), %rdx
movq %rbx, %rdi
movl $0x7e4, %esi # imm = 0x7E4
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x3acb1
jmp 0x3b12a
movq %rbx, %rdi
callq 0x3ac7e
movq %rbx, %rdi
callq 0x3b1ac
testb %al, %al
je 0x3b132
movl %r13d, %r14d
jmp 0x3b09b
movq -0x30(%rbp), %rcx
testq %rcx, %rcx
jne 0x3b146
movq %r12, %rdi
callq 0x36420
movq %rax, %rcx
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rdx
xorl %r8d, %r8d
callq 0x56b35
testl %eax, %eax
je 0x3b16f
leaq 0x300b0e(%rip), %rax # 0x33bc70
movq (%rax), %rdx
movq %rbx, %rdi
movl $0x7d6, %esi # imm = 0x7D6
jmp 0x3b10b
cmpb $0x0, -0x34(%rbp)
jne 0x3b09b
movq 0x2a0(%rbx), %rax
cmpl $0x0, (%rax)
jne 0x3b09b
movq %rbx, %rdi
callq 0x3aa17
movq %rax, 0x358(%rbx)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
xorl %r14d, %r14d
cmpq %rcx, %rax
sete %r14b
jmp 0x3b09b
|
mthd_my_send_cmd:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, rdx
mov rbx, rdi
cmp qword ptr [rdi], 0
jz loc_3B065
loc_3AEB3:
cmp dword ptr [rbx+488h], 0
jnz loc_3B00B
test byte ptr [rbx+380h], 8
jnz loc_3B00B
mov rax, [rbx+4F0h]
mov r13d, 0FFFFFFFFh
test rax, rax
mov [rbp+var_30], rcx
jz short loc_3AF13
mov rax, [rax]
test rax, rax
jz short loc_3AF13
mov rax, [rax]
mov r14d, r8d
movsx r8d, r14b
mov rdi, rbx
mov r13d, esi
mov rdx, r12
call qword ptr [rax+70h]
mov esi, r13d
mov r8d, r14d
mov r13d, eax
cmp eax, 0FFFFFFFFh
jz loc_3B05D
loc_3AF13:
mov [rbp+var_34], r8d
mov dword ptr [rbx+90h], 0
mov dword ptr [rbx+297h], 30303030h
mov word ptr [rbx+29Bh], 30h ; '0'
mov byte ptr [rbx+97h], 0
mov rax, [rbx+2A0h]
test rax, rax
jz short loc_3AF4E
mov dword ptr [rax+4], 0
loc_3AF4E:
cmp esi, 16h
jz short loc_3AF58
cmp esi, 3
jnz short loc_3AFAE
loc_3AF58:
test byte ptr [rbx+3A8h], 80h
jz short loc_3AFAE
cmp qword ptr [rbx+480h], 0
jz short loc_3AFAE
test r12, r12
jz short loc_3AFAE
mov r14, [rbx+4F0h]
cmp byte ptr [r14+78h], 1
jnz short loc_3AFAE
movzx eax, byte ptr [r12]
or eax, 20h
cmp eax, 6Ch ; 'l'
jnz short loc_3AFAE
mov r15d, esi
lea rsi, aReload+2; "load"
mov edx, 4
mov rdi, r12
call _strncasecmp
mov esi, r15d
test eax, eax
jnz short loc_3AFAE
mov byte ptr [r14+78h], 2
loc_3AFAE:
mov r14d, esi
mov qword ptr [rbx+2E0h], 0
mov qword ptr [rbx+338h], 0FFFFFFFFFFFFFFFFh
mov rdi, rbx
call ma_net_clear
test r12, r12
lea rdx, aS_0+5; ""
cmovnz rdx, r12
mov rax, [rbx+2A0h]
cmp dword ptr [rax], 2
jnz loc_3B0AD
movzx esi, r14b
mov rdi, rbx
mov rcx, [rbp+var_30]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp net_add_multi_command
loc_3B00B:
mov dword ptr [rbx+90h], 7DEh
lea rdi, [rbx+297h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+29Ch], r14b
lea rdi, [rbx+97h]
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov [rbx+296h], r14b
loc_3B05D:
mov r14d, 0FFFFFFFFh
jmp short loc_3B09B
loc_3B065:
mov rdi, rbx
mov r14d, r8d
mov r13, rcx
mov [rbp+var_40], r12
mov r12d, esi
mov r15, r9
call mariadb_reconnect
mov r9, r15
mov esi, r12d
mov r12, [rbp+var_40]
mov rcx, r13
mov r8d, r14d
mov r14d, 1
test al, al
jz loc_3AEB3
loc_3B09B:
mov eax, r14d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3B0AD:
mov rax, [rbp+var_30]
mov rcx, rax
test rax, rax
mov esi, r14d
mov r12, rdx
jnz short loc_3B0D0
mov rdi, rdx
call _strlen
mov rdx, r12
mov esi, r14d
mov rcx, rax
loc_3B0D0:
movzx r15d, sil
xor r14d, r14d
mov rdi, rbx
mov esi, r15d
xor r8d, r8d
call ma_net_write_command
test eax, eax
jz loc_3B16F
cmp dword ptr [rbx+90h], 481h
jnz short loc_3B116
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov rdi, rbx
mov esi, 7E4h
loc_3B10B:
xor ecx, ecx
xor eax, eax
call my_set_error
jmp short loc_3B12A
loc_3B116:
mov rdi, rbx
call end_server
mov rdi, rbx
call mariadb_reconnect
test al, al
jz short loc_3B132
loc_3B12A:
mov r14d, r13d
jmp loc_3B09B
loc_3B132:
mov rcx, [rbp+var_30]
test rcx, rcx
jnz short loc_3B146
mov rdi, r12
call _strlen
mov rcx, rax
loc_3B146:
mov rdi, rbx
mov esi, r15d
mov rdx, r12
xor r8d, r8d
call ma_net_write_command
test eax, eax
jz short loc_3B16F
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov rdi, rbx
mov esi, 7D6h
jmp short loc_3B10B
loc_3B16F:
cmp byte ptr [rbp+var_34], 0
jnz loc_3B09B
mov rax, [rbx+2A0h]
cmp dword ptr [rax], 0
jnz loc_3B09B
mov rdi, rbx
call ma_net_safe_read
mov [rbx+358h], rax
mov ecx, 0FFFFFFFFh
xor r14d, r14d
cmp rax, rcx
setz r14b
jmp loc_3B09B
|
long long mthd_my_send_cmd(long long a1, long long a2, char *a3, long long a4, char a5)
{
char *v5; // r12
long long *v6; // rax
unsigned int v7; // r13d
long long v8; // rax
char v9; // r14
unsigned int v10; // eax
long long v11; // rax
long long v12; // r14
char *v13; // rdx
unsigned int v15; // r14d
char v16; // r14
long long v17; // r13
char v18; // al
long long v19; // rcx
char *v20; // r12
long long v21; // rax
long long v22; // rdx
long long v23; // rcx
unsigned long long v24; // r8
int v25; // r9d
char *v26; // rdx
int v27; // esi
long long v28; // rcx
unsigned long long v29; // rax
char v31; // [rsp+Ch] [rbp-34h]
long long v32; // [rsp+10h] [rbp-30h]
v5 = a3;
if ( !*(_QWORD *)a1 )
{
v16 = a5;
v17 = a4;
v18 = mariadb_reconnect(a1);
a2 = (unsigned int)a2;
v5 = a3;
a4 = v17;
a5 = v16;
v15 = 1;
if ( v18 )
return v15;
}
if ( *(_DWORD *)(a1 + 1160) || (*(_BYTE *)(a1 + 896) & 8) != 0 )
{
*(_DWORD *)(a1 + 144) = 2014;
strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 668) = 0;
strncpy(a1 + 151, client_errors[14], 511LL);
*(_BYTE *)(a1 + 662) = 0;
}
else
{
v6 = *(long long **)(a1 + 1264);
v7 = -1;
v32 = a4;
if ( !v6
|| (v8 = *v6) == 0
|| (v9 = a5,
v10 = (*(long long ( **)(long long, long long, char *, long long, _QWORD))(*(_QWORD *)v8 + 112LL))(
a1,
a2,
v5,
a4,
(unsigned int)a5),
a5 = v9,
v7 = v10,
v10 != -1) )
{
v31 = a5;
*(_DWORD *)(a1 + 144) = 0;
strcpy((char *)(a1 + 663), "00000");
*(_BYTE *)(a1 + 151) = 0;
v11 = *(_QWORD *)(a1 + 672);
if ( v11 )
*(_DWORD *)(v11 + 4) = 0;
if ( ((_DWORD)a2 == 22 || (_DWORD)a2 == 3) && *(char *)(a1 + 936) < 0 )
{
if ( *(_QWORD *)(a1 + 1152) )
{
if ( v5 )
{
v12 = *(_QWORD *)(a1 + 1264);
if ( *(_BYTE *)(v12 + 120) == 1
&& ((unsigned __int8)*v5 | 0x20) == 0x6C
&& !(unsigned int)strncasecmp(v5, "load", 4LL) )
{
*(_BYTE *)(v12 + 120) = 2;
}
}
}
}
*(_QWORD *)(a1 + 736) = 0LL;
*(_QWORD *)(a1 + 824) = -1LL;
ma_net_clear(a1);
v13 = "";
if ( v5 )
v13 = v5;
if ( **(_DWORD **)(a1 + 672) == 2 )
return net_add_multi_command(a1, (unsigned __int8)a2, v13, v32);
v19 = v32;
v20 = v13;
if ( !v32 )
{
v21 = strlen(v13);
v13 = v20;
v19 = v21;
}
v15 = 0;
a2 = (unsigned __int8)a2;
if ( (unsigned int)ma_net_write_command(a1, (unsigned __int8)a2, v13, v19, 0LL) )
{
if ( *(_DWORD *)(a1 + 144) == 1153 )
{
v26 = SQLSTATE_UNKNOWN;
v27 = 2020;
LABEL_31:
my_set_error(a1, v27, (long long)v26, 0LL);
return v7;
}
end_server((long long *)a1);
if ( (unsigned __int8)mariadb_reconnect(a1) )
return v7;
v28 = v32;
if ( !v32 )
v28 = strlen(v20);
a2 = (unsigned __int8)a2;
if ( (unsigned int)ma_net_write_command(a1, (unsigned __int8)a2, v20, v28, 0LL) )
{
v26 = SQLSTATE_UNKNOWN;
v27 = 2006;
goto LABEL_31;
}
}
if ( !v31 && !**(_DWORD **)(a1 + 672) )
{
v29 = ma_net_safe_read(a1, a2, v22, v23, v24, v25);
*(_QWORD *)(a1 + 856) = v29;
return v29 == 0xFFFFFFFF;
}
return v15;
}
}
return (unsigned int)-1;
}
|
mthd_my_send_cmd:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,RDX
MOV RBX,RDI
CMP qword ptr [RDI],0x0
JZ 0x0013b065
LAB_0013aeb3:
CMP dword ptr [RBX + 0x488],0x0
JNZ 0x0013b00b
TEST byte ptr [RBX + 0x380],0x8
JNZ 0x0013b00b
MOV RAX,qword ptr [RBX + 0x4f0]
MOV R13D,0xffffffff
TEST RAX,RAX
MOV qword ptr [RBP + -0x30],RCX
JZ 0x0013af13
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x0013af13
MOV RAX,qword ptr [RAX]
MOV R14D,R8D
MOVSX R8D,R14B
MOV RDI,RBX
MOV R13D,ESI
MOV RDX,R12
CALL qword ptr [RAX + 0x70]
MOV ESI,R13D
MOV R8D,R14D
MOV R13D,EAX
CMP EAX,-0x1
JZ 0x0013b05d
LAB_0013af13:
MOV dword ptr [RBP + -0x34],R8D
MOV dword ptr [RBX + 0x90],0x0
MOV dword ptr [RBX + 0x297],0x30303030
MOV word ptr [RBX + 0x29b],0x30
MOV byte ptr [RBX + 0x97],0x0
MOV RAX,qword ptr [RBX + 0x2a0]
TEST RAX,RAX
JZ 0x0013af4e
MOV dword ptr [RAX + 0x4],0x0
LAB_0013af4e:
CMP ESI,0x16
JZ 0x0013af58
CMP ESI,0x3
JNZ 0x0013afae
LAB_0013af58:
TEST byte ptr [RBX + 0x3a8],0x80
JZ 0x0013afae
CMP qword ptr [RBX + 0x480],0x0
JZ 0x0013afae
TEST R12,R12
JZ 0x0013afae
MOV R14,qword ptr [RBX + 0x4f0]
CMP byte ptr [R14 + 0x78],0x1
JNZ 0x0013afae
MOVZX EAX,byte ptr [R12]
OR EAX,0x20
CMP EAX,0x6c
JNZ 0x0013afae
MOV R15D,ESI
LEA RSI,[0x193a83]
MOV EDX,0x4
MOV RDI,R12
CALL 0x00136a00
MOV ESI,R15D
TEST EAX,EAX
JNZ 0x0013afae
MOV byte ptr [R14 + 0x78],0x2
LAB_0013afae:
MOV R14D,ESI
MOV qword ptr [RBX + 0x2e0],0x0
MOV qword ptr [RBX + 0x338],-0x1
MOV RDI,RBX
CALL 0x001566b4
TEST R12,R12
LEA RDX,[0x193ee3]
CMOVNZ RDX,R12
MOV RAX,qword ptr [RBX + 0x2a0]
CMP dword ptr [RAX],0x2
JNZ 0x0013b0ad
MOVZX ESI,R14B
MOV RDI,RBX
MOV RCX,qword ptr [RBP + -0x30]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00157056
LAB_0013b00b:
MOV dword ptr [RBX + 0x90],0x7de
LEA RDI,[RBX + 0x297]
LEA RAX,[0x43bc70]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00136140
XOR R14D,R14D
MOV byte ptr [RBX + 0x29c],R14B
LEA RDI,[RBX + 0x97]
LEA RAX,[0x43bc80]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00136140
MOV byte ptr [RBX + 0x296],R14B
LAB_0013b05d:
MOV R14D,0xffffffff
JMP 0x0013b09b
LAB_0013b065:
MOV RDI,RBX
MOV R14D,R8D
MOV R13,RCX
MOV qword ptr [RBP + -0x40],R12
MOV R12D,ESI
MOV R15,R9
CALL 0x0013b1ac
MOV R9,R15
MOV ESI,R12D
MOV R12,qword ptr [RBP + -0x40]
MOV RCX,R13
MOV R8D,R14D
MOV R14D,0x1
TEST AL,AL
JZ 0x0013aeb3
LAB_0013b09b:
MOV EAX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013b0ad:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,RAX
TEST RAX,RAX
MOV ESI,R14D
MOV R12,RDX
JNZ 0x0013b0d0
MOV RDI,RDX
CALL 0x00136420
MOV RDX,R12
MOV ESI,R14D
MOV RCX,RAX
LAB_0013b0d0:
MOVZX R15D,SIL
XOR R14D,R14D
MOV RDI,RBX
MOV ESI,R15D
XOR R8D,R8D
CALL 0x00156b35
TEST EAX,EAX
JZ 0x0013b16f
CMP dword ptr [RBX + 0x90],0x481
JNZ 0x0013b116
LEA RAX,[0x43bc70]
MOV RDX,qword ptr [RAX]
MOV RDI,RBX
MOV ESI,0x7e4
LAB_0013b10b:
XOR ECX,ECX
XOR EAX,EAX
CALL 0x0013acb1
JMP 0x0013b12a
LAB_0013b116:
MOV RDI,RBX
CALL 0x0013ac7e
MOV RDI,RBX
CALL 0x0013b1ac
TEST AL,AL
JZ 0x0013b132
LAB_0013b12a:
MOV R14D,R13D
JMP 0x0013b09b
LAB_0013b132:
MOV RCX,qword ptr [RBP + -0x30]
TEST RCX,RCX
JNZ 0x0013b146
MOV RDI,R12
CALL 0x00136420
MOV RCX,RAX
LAB_0013b146:
MOV RDI,RBX
MOV ESI,R15D
MOV RDX,R12
XOR R8D,R8D
CALL 0x00156b35
TEST EAX,EAX
JZ 0x0013b16f
LEA RAX,[0x43bc70]
MOV RDX,qword ptr [RAX]
MOV RDI,RBX
MOV ESI,0x7d6
JMP 0x0013b10b
LAB_0013b16f:
CMP byte ptr [RBP + -0x34],0x0
JNZ 0x0013b09b
MOV RAX,qword ptr [RBX + 0x2a0]
CMP dword ptr [RAX],0x0
JNZ 0x0013b09b
MOV RDI,RBX
CALL 0x0013aa17
MOV qword ptr [RBX + 0x358],RAX
MOV ECX,0xffffffff
XOR R14D,R14D
CMP RAX,RCX
SETZ R14B
JMP 0x0013b09b
|
ulong mthd_my_send_cmd(long *param_1,ulong param_2,byte *param_3,size_t param_4,char param_5,
int8 param_6)
{
long *plVar1;
char cVar2;
uint uVar3;
int iVar4;
ulong uVar5;
size_t sVar6;
long lVar7;
byte *__s;
int8 uVar8;
if (*param_1 == 0) {
param_2 = param_2 & 0xffffffff;
cVar2 = mariadb_reconnect(param_1);
if (cVar2 != '\0') {
return 1;
}
}
if (((int)param_1[0x91] != 0) || ((*(byte *)(param_1 + 0x70) & 8) != 0)) {
*(int4 *)(param_1 + 0x12) = 0x7de;
strncpy((char *)((long)param_1 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)((long)param_1 + 0x29c) = 0;
strncpy((char *)((long)param_1 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_0043bcf0,0x1ff);
*(int1 *)((long)param_1 + 0x296) = 0;
return 0xffffffff;
}
uVar3 = 0xffffffff;
uVar5 = param_2;
if (((long *)param_1[0x9e] != (long *)0x0) &&
(plVar1 = *(long **)param_1[0x9e], plVar1 != (long *)0x0)) {
uVar5 = param_2 & 0xffffffff;
uVar3 = (**(code **)(*plVar1 + 0x70))(param_1,param_2,param_3,param_4,(int)param_5,param_6);
if (uVar3 == 0xffffffff) {
return 0xffffffff;
}
}
*(int4 *)(param_1 + 0x12) = 0;
*(int4 *)((long)param_1 + 0x297) = 0x30303030;
*(int2 *)((long)param_1 + 0x29b) = 0x30;
*(int1 *)((long)param_1 + 0x97) = 0;
if (param_1[0x54] != 0) {
*(int4 *)(param_1[0x54] + 4) = 0;
}
if (((((int)uVar5 == 0x16) || ((int)uVar5 == 3)) && ((*(byte *)(param_1 + 0x75) & 0x80) != 0)) &&
(((param_1[0x90] != 0 && (param_3 != (byte *)0x0)) &&
((lVar7 = param_1[0x9e], *(char *)(lVar7 + 0x78) == '\x01' && ((*param_3 | 0x20) == 0x6c))))))
{
uVar5 = uVar5 & 0xffffffff;
iVar4 = strncasecmp((char *)param_3,"load",4);
if (iVar4 == 0) {
*(int1 *)(lVar7 + 0x78) = 2;
}
}
param_1[0x5c] = 0;
param_1[0x67] = -1;
ma_net_clear(param_1);
__s = &DAT_00193ee3;
if (param_3 != (byte *)0x0) {
__s = param_3;
}
if (*(int *)param_1[0x54] == 2) {
uVar5 = net_add_multi_command(param_1,uVar5 & 0xff,__s,param_4);
return uVar5;
}
sVar6 = param_4;
if (param_4 == 0) {
sVar6 = strlen((char *)__s);
}
iVar4 = ma_net_write_command(param_1,uVar5 & 0xff,__s,sVar6,0);
if (iVar4 == 0) {
LAB_0013b16f:
if (param_5 != '\0') {
return 0;
}
if (*(int *)param_1[0x54] == 0) {
lVar7 = ma_net_safe_read(param_1);
param_1[0x6b] = lVar7;
return (ulong)(lVar7 == 0xffffffff);
}
return 0;
}
if ((int)param_1[0x12] == 0x481) {
uVar8 = 0x7e4;
}
else {
end_server(param_1);
cVar2 = mariadb_reconnect(param_1);
if (cVar2 != '\0') goto LAB_0013b12a;
if (param_4 == 0) {
param_4 = strlen((char *)__s);
}
iVar4 = ma_net_write_command(param_1,uVar5 & 0xff,__s,param_4,0);
if (iVar4 == 0) goto LAB_0013b16f;
uVar8 = 0x7d6;
}
my_set_error(param_1,uVar8,SQLSTATE_UNKNOWN,0);
LAB_0013b12a:
return (ulong)uVar3;
}
|
|
14,753
|
get_defaults_options
|
eloqsql/mysys/my_default.c
|
int get_defaults_options(char **argv)
{
static char file_buffer[FN_REFLEN];
static char extra_file_buffer[FN_REFLEN];
char **orig_argv= argv;
argv++; /* Skip program name */
my_defaults_file= my_defaults_group_suffix= my_defaults_extra_file= 0;
my_no_defaults= my_print_defaults= FALSE;
if (*argv && !strcmp(*argv, "--no-defaults"))
{
my_no_defaults= 1;
argv++;
}
else
for(; *argv; argv++)
{
if (!my_defaults_file && is_prefix(*argv, "--defaults-file="))
my_defaults_file= *argv + sizeof("--defaults-file=")-1;
else
if (!my_defaults_extra_file && is_prefix(*argv, "--defaults-extra-file="))
my_defaults_extra_file= *argv + sizeof("--defaults-extra-file=")-1;
else
if (!my_defaults_group_suffix && is_prefix(*argv, "--defaults-group-suffix="))
my_defaults_group_suffix= *argv + sizeof("--defaults-group-suffix=")-1;
else
break;
}
if (*argv && !strcmp(*argv, "--print-defaults"))
{
my_print_defaults= 1;
my_defaults_mark_files= FALSE;
argv++;
}
if (! my_defaults_group_suffix)
my_defaults_group_suffix= getenv("MYSQL_GROUP_SUFFIX");
if (my_defaults_extra_file && my_defaults_extra_file != extra_file_buffer)
{
my_realpath(extra_file_buffer, my_defaults_extra_file, MYF(0));
my_defaults_extra_file= extra_file_buffer;
}
if (my_defaults_file && my_defaults_file != file_buffer)
{
my_realpath(file_buffer, my_defaults_file, MYF(0));
my_defaults_file= file_buffer;
}
return (int)(argv - orig_argv);
}
|
O0
|
c
|
get_defaults_options:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
leaq 0x368a51(%rip), %rax # 0x39a1b8
movq $0x0, (%rax)
leaq 0x368a3b(%rip), %rax # 0x39a1b0
movq $0x0, (%rax)
leaq 0x368a25(%rip), %rax # 0x39a1a8
movq $0x0, (%rax)
leaq 0x368a11(%rip), %rax # 0x39a1a2
movb $0x0, (%rax)
leaq 0x368a06(%rip), %rax # 0x39a1a1
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x317db
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x51d85(%rip), %rsi # 0x8353b
callq 0x25450
cmpl $0x0, %eax
jne 0x317db
leaq 0x3689da(%rip), %rax # 0x39a1a1
movb $0x1, (%rax)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0x318c9
jmp 0x317dd
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x318c7
leaq 0x3689b6(%rip), %rax # 0x39a1a8
cmpq $0x0, (%rax)
jne 0x3182e
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x51d43(%rip), %rsi # 0x83549
callq 0x7c530
cmpl $0x0, %eax
je 0x3182e
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x11, %rcx
addq $-0x1, %rcx
leaq 0x368982(%rip), %rax # 0x39a1a8
movq %rcx, (%rax)
jmp 0x318b4
leaq 0x368983(%rip), %rax # 0x39a1b8
cmpq $0x0, (%rax)
jne 0x3186e
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x51d11(%rip), %rsi # 0x8355a
callq 0x7c530
cmpl $0x0, %eax
je 0x3186e
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x17, %rcx
addq $-0x1, %rcx
leaq 0x36894f(%rip), %rax # 0x39a1b8
movq %rcx, (%rax)
jmp 0x318b2
leaq 0x36893b(%rip), %rax # 0x39a1b0
cmpq $0x0, (%rax)
jne 0x318ae
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x51ce8(%rip), %rsi # 0x83571
callq 0x7c530
cmpl $0x0, %eax
je 0x318ae
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x19, %rcx
addq $-0x1, %rcx
leaq 0x368907(%rip), %rax # 0x39a1b0
movq %rcx, (%rax)
jmp 0x318b0
jmp 0x318c7
jmp 0x318b2
jmp 0x318b4
jmp 0x318b6
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0x317dd
jmp 0x318c9
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x3190b
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x51ca9(%rip), %rsi # 0x8358a
callq 0x25450
cmpl $0x0, %eax
jne 0x3190b
leaq 0x3688b0(%rip), %rax # 0x39a1a2
movb $0x1, (%rax)
leaq 0x3688a4(%rip), %rax # 0x39a1a0
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
leaq 0x36889e(%rip), %rax # 0x39a1b0
cmpq $0x0, (%rax)
jne 0x31931
leaq 0x51c7c(%rip), %rdi # 0x8359b
callq 0x253e0
movq %rax, %rcx
leaq 0x368882(%rip), %rax # 0x39a1b0
movq %rcx, (%rax)
leaq 0x368880(%rip), %rax # 0x39a1b8
cmpq $0x0, (%rax)
je 0x3197c
leaq 0x368a7b(%rip), %rcx # 0x39a3c0
leaq 0x36886c(%rip), %rax # 0x39a1b8
cmpq %rcx, (%rax)
je 0x3197c
leaq 0x368860(%rip), %rax # 0x39a1b8
movq (%rax), %rsi
leaq 0x368a5e(%rip), %rdi # 0x39a3c0
xorl %eax, %eax
movl %eax, %edx
callq 0x396f0
leaq 0x368846(%rip), %rax # 0x39a1b8
leaq 0x368a47(%rip), %rcx # 0x39a3c0
movq %rcx, (%rax)
leaq 0x368825(%rip), %rax # 0x39a1a8
cmpq $0x0, (%rax)
je 0x319c7
leaq 0x368830(%rip), %rcx # 0x39a1c0
leaq 0x368811(%rip), %rax # 0x39a1a8
cmpq %rcx, (%rax)
je 0x319c7
leaq 0x368805(%rip), %rax # 0x39a1a8
movq (%rax), %rsi
leaq 0x368813(%rip), %rdi # 0x39a1c0
xorl %eax, %eax
movl %eax, %edx
callq 0x396f0
leaq 0x3687eb(%rip), %rax # 0x39a1a8
leaq 0x3687fc(%rip), %rcx # 0x39a1c0
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
|
get_defaults_options:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
lea rax, my_defaults_extra_file
mov qword ptr [rax], 0
lea rax, my_defaults_group_suffix
mov qword ptr [rax], 0
lea rax, my_defaults_file
mov qword ptr [rax], 0
lea rax, my_print_defaults
mov byte ptr [rax], 0
lea rax, my_no_defaults
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_317DB
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aNoDefaults; "--no-defaults"
call _strcmp
cmp eax, 0
jnz short loc_317DB
lea rax, my_no_defaults
mov byte ptr [rax], 1
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
jmp loc_318C9
loc_317DB:
jmp short $+2
loc_317DD:
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz loc_318C7
lea rax, my_defaults_file
cmp qword ptr [rax], 0
jnz short loc_3182E
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aDefaultsFile; "--defaults-file="
call is_prefix
cmp eax, 0
jz short loc_3182E
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 11h
add rcx, 0FFFFFFFFFFFFFFFFh
lea rax, my_defaults_file
mov [rax], rcx
jmp loc_318B4
loc_3182E:
lea rax, my_defaults_extra_file
cmp qword ptr [rax], 0
jnz short loc_3186E
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aDefaultsExtraF; "--defaults-extra-file="
call is_prefix
cmp eax, 0
jz short loc_3186E
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 17h
add rcx, 0FFFFFFFFFFFFFFFFh
lea rax, my_defaults_extra_file
mov [rax], rcx
jmp short loc_318B2
loc_3186E:
lea rax, my_defaults_group_suffix
cmp qword ptr [rax], 0
jnz short loc_318AE
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aDefaultsGroupS; "--defaults-group-suffix="
call is_prefix
cmp eax, 0
jz short loc_318AE
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 19h
add rcx, 0FFFFFFFFFFFFFFFFh
lea rax, my_defaults_group_suffix
mov [rax], rcx
jmp short loc_318B0
loc_318AE:
jmp short loc_318C7
loc_318B0:
jmp short $+2
loc_318B2:
jmp short $+2
loc_318B4:
jmp short $+2
loc_318B6:
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
jmp loc_317DD
loc_318C7:
jmp short $+2
loc_318C9:
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_3190B
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aPrintDefaults; "--print-defaults"
call _strcmp
cmp eax, 0
jnz short loc_3190B
lea rax, my_print_defaults
mov byte ptr [rax], 1
lea rax, my_defaults_mark_files
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
loc_3190B:
lea rax, my_defaults_group_suffix
cmp qword ptr [rax], 0
jnz short loc_31931
lea rdi, aMysqlGroupSuff; "MYSQL_GROUP_SUFFIX"
call _getenv
mov rcx, rax
lea rax, my_defaults_group_suffix
mov [rax], rcx
loc_31931:
lea rax, my_defaults_extra_file
cmp qword ptr [rax], 0
jz short loc_3197C
lea rcx, get_defaults_options_extra_file_buffer
lea rax, my_defaults_extra_file
cmp [rax], rcx
jz short loc_3197C
lea rax, my_defaults_extra_file
mov rsi, [rax]
lea rdi, get_defaults_options_extra_file_buffer
xor eax, eax
mov edx, eax
call my_realpath
lea rax, my_defaults_extra_file
lea rcx, get_defaults_options_extra_file_buffer
mov [rax], rcx
loc_3197C:
lea rax, my_defaults_file
cmp qword ptr [rax], 0
jz short loc_319C7
lea rcx, get_defaults_options_file_buffer
lea rax, my_defaults_file
cmp [rax], rcx
jz short loc_319C7
lea rax, my_defaults_file
mov rsi, [rax]
lea rdi, get_defaults_options_file_buffer
xor eax, eax
mov edx, eax
call my_realpath
lea rax, my_defaults_file
lea rcx, get_defaults_options_file_buffer
mov [rax], rcx
loc_319C7:
mov rax, [rbp+var_8]
mov rcx, [rbp+var_10]
sub rax, rcx
sar rax, 3
add rsp, 10h
pop rbp
retn
|
long long get_defaults_options(long long a1)
{
_QWORD *v2; // [rsp+8h] [rbp-8h]
v2 = (_QWORD *)(a1 + 8);
my_defaults_extra_file = 0LL;
my_defaults_group_suffix = 0LL;
my_defaults_file = 0LL;
my_print_defaults = 0;
my_no_defaults = 0;
if ( *(_QWORD *)(a1 + 8) && !(unsigned int)strcmp(*v2, "--no-defaults") )
{
my_no_defaults = 1;
v2 = (_QWORD *)(a1 + 16);
}
else
{
while ( *v2 )
{
if ( my_defaults_file || !(unsigned int)is_prefix(*v2, "--defaults-file=") )
{
if ( my_defaults_extra_file || !(unsigned int)is_prefix(*v2, "--defaults-extra-file=") )
{
if ( my_defaults_group_suffix || !(unsigned int)is_prefix(*v2, "--defaults-group-suffix=") )
break;
my_defaults_group_suffix = *v2 + 24LL;
}
else
{
my_defaults_extra_file = *v2 + 22LL;
}
}
else
{
my_defaults_file = *v2 + 16LL;
}
++v2;
}
}
if ( *v2 && !(unsigned int)strcmp(*v2, "--print-defaults") )
{
my_print_defaults = 1;
my_defaults_mark_files = 0;
++v2;
}
if ( !my_defaults_group_suffix )
my_defaults_group_suffix = getenv("MYSQL_GROUP_SUFFIX");
if ( my_defaults_extra_file && (_UNKNOWN *)my_defaults_extra_file != &get_defaults_options_extra_file_buffer )
{
my_realpath(&get_defaults_options_extra_file_buffer, my_defaults_extra_file, 0LL);
my_defaults_extra_file = &get_defaults_options_extra_file_buffer;
}
if ( my_defaults_file && (_UNKNOWN *)my_defaults_file != &get_defaults_options_file_buffer )
{
my_realpath(&get_defaults_options_file_buffer, my_defaults_file, 0LL);
my_defaults_file = &get_defaults_options_file_buffer;
}
return ((long long)v2 - a1) >> 3;
}
|
get_defaults_options:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[0x49a1b8]
MOV qword ptr [RAX],0x0
LEA RAX,[0x49a1b0]
MOV qword ptr [RAX],0x0
LEA RAX,[0x49a1a8]
MOV qword ptr [RAX],0x0
LEA RAX,[0x49a1a2]
MOV byte ptr [RAX],0x0
LEA RAX,[0x49a1a1]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x001317db
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x18353b]
CALL 0x00125450
CMP EAX,0x0
JNZ 0x001317db
LEA RAX,[0x49a1a1]
MOV byte ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001318c9
LAB_001317db:
JMP 0x001317dd
LAB_001317dd:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x001318c7
LEA RAX,[0x49a1a8]
CMP qword ptr [RAX],0x0
JNZ 0x0013182e
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x183549]
CALL 0x0017c530
CMP EAX,0x0
JZ 0x0013182e
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x11
ADD RCX,-0x1
LEA RAX,[0x49a1a8]
MOV qword ptr [RAX],RCX
JMP 0x001318b4
LAB_0013182e:
LEA RAX,[0x49a1b8]
CMP qword ptr [RAX],0x0
JNZ 0x0013186e
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x18355a]
CALL 0x0017c530
CMP EAX,0x0
JZ 0x0013186e
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x17
ADD RCX,-0x1
LEA RAX,[0x49a1b8]
MOV qword ptr [RAX],RCX
JMP 0x001318b2
LAB_0013186e:
LEA RAX,[0x49a1b0]
CMP qword ptr [RAX],0x0
JNZ 0x001318ae
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x183571]
CALL 0x0017c530
CMP EAX,0x0
JZ 0x001318ae
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x19
ADD RCX,-0x1
LEA RAX,[0x49a1b0]
MOV qword ptr [RAX],RCX
JMP 0x001318b0
LAB_001318ae:
JMP 0x001318c7
LAB_001318b0:
JMP 0x001318b2
LAB_001318b2:
JMP 0x001318b4
LAB_001318b4:
JMP 0x001318b6
LAB_001318b6:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001317dd
LAB_001318c7:
JMP 0x001318c9
LAB_001318c9:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x0013190b
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x18358a]
CALL 0x00125450
CMP EAX,0x0
JNZ 0x0013190b
LEA RAX,[0x49a1a2]
MOV byte ptr [RAX],0x1
LEA RAX,[0x49a1a0]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x8],RAX
LAB_0013190b:
LEA RAX,[0x49a1b0]
CMP qword ptr [RAX],0x0
JNZ 0x00131931
LEA RDI,[0x18359b]
CALL 0x001253e0
MOV RCX,RAX
LEA RAX,[0x49a1b0]
MOV qword ptr [RAX],RCX
LAB_00131931:
LEA RAX,[0x49a1b8]
CMP qword ptr [RAX],0x0
JZ 0x0013197c
LEA RCX,[0x49a3c0]
LEA RAX,[0x49a1b8]
CMP qword ptr [RAX],RCX
JZ 0x0013197c
LEA RAX,[0x49a1b8]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x49a3c0]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001396f0
LEA RAX,[0x49a1b8]
LEA RCX,[0x49a3c0]
MOV qword ptr [RAX],RCX
LAB_0013197c:
LEA RAX,[0x49a1a8]
CMP qword ptr [RAX],0x0
JZ 0x001319c7
LEA RCX,[0x49a1c0]
LEA RAX,[0x49a1a8]
CMP qword ptr [RAX],RCX
JZ 0x001319c7
LEA RAX,[0x49a1a8]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x49a1c0]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001396f0
LEA RAX,[0x49a1a8]
LEA RCX,[0x49a1c0]
MOV qword ptr [RAX],RCX
LAB_001319c7:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
SAR RAX,0x3
ADD RSP,0x10
POP RBP
RET
|
long get_defaults_options(long param_1)
{
int iVar1;
long *local_10;
local_10 = (long *)(param_1 + 8);
my_defaults_extra_file = (int1 *)0x0;
my_defaults_group_suffix = (char *)0x0;
my_defaults_file = (int1 *)0x0;
my_print_defaults = 0;
my_no_defaults = 0;
if ((*local_10 == 0) || (iVar1 = strcmp((char *)*local_10,"--no-defaults"), iVar1 != 0)) {
for (; *local_10 != 0; local_10 = local_10 + 1) {
if ((my_defaults_file == (int1 *)0x0) &&
(iVar1 = is_prefix(*local_10,"--defaults-file="), iVar1 != 0)) {
my_defaults_file = (int1 *)(*local_10 + 0x10);
}
else if ((my_defaults_extra_file == (int1 *)0x0) &&
(iVar1 = is_prefix(*local_10,"--defaults-extra-file="), iVar1 != 0)) {
my_defaults_extra_file = (int1 *)(*local_10 + 0x16);
}
else {
if ((my_defaults_group_suffix != (char *)0x0) ||
(iVar1 = is_prefix(*local_10,"--defaults-group-suffix="), iVar1 == 0)) break;
my_defaults_group_suffix = (char *)(*local_10 + 0x18);
}
}
}
else {
my_no_defaults = 1;
local_10 = (long *)(param_1 + 0x10);
}
if ((*local_10 != 0) && (iVar1 = strcmp((char *)*local_10,"--print-defaults"), iVar1 == 0)) {
my_print_defaults = 1;
my_defaults_mark_files = 0;
local_10 = local_10 + 1;
}
if (my_defaults_group_suffix == (char *)0x0) {
my_defaults_group_suffix = getenv("MYSQL_GROUP_SUFFIX");
}
if ((my_defaults_extra_file != (int1 *)0x0) &&
(my_defaults_extra_file != get_defaults_options_extra_file_buffer)) {
my_realpath(get_defaults_options_extra_file_buffer,my_defaults_extra_file,0);
my_defaults_extra_file = get_defaults_options_extra_file_buffer;
}
if ((my_defaults_file != (int1 *)0x0) &&
(my_defaults_file != get_defaults_options_file_buffer)) {
my_realpath(get_defaults_options_file_buffer,my_defaults_file,0);
my_defaults_file = get_defaults_options_file_buffer;
}
return (long)local_10 - param_1 >> 3;
}
|
|
14,754
|
THD::st_transactions::cleanup()
|
eloqsql/sql/sql_class.h
|
void cleanup()
{
DBUG_ENTER("THD::st_transactions::cleanup");
changed_tables= 0;
savepoints= 0;
implicit_xid.null();
free_root(&mem_root,MYF(MY_KEEP_PREALLOC));
DBUG_VOID_RETURN;
}
|
O0
|
c
|
THD::st_transactions::cleanup():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movq $0x0, 0x170(%rdi)
movq $0x0, (%rdi)
addq $0x48, %rdi
callq 0x8165c0
movq -0x10(%rbp), %rdi
addq $0x178, %rdi # imm = 0x178
movl $0x1, %esi
callq 0x1319710
jmp 0xc3cf76
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN3THD15st_transactions7cleanupEv:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov [rbp+var_10], rdi
mov qword ptr [rdi+170h], 0
mov qword ptr [rdi], 0
add rdi, 48h ; 'H'; this
call _ZN5xid_t4nullEv; xid_t::null(void)
mov rdi, [rbp+var_10]
add rdi, 178h
mov esi, 1
call free_root
jmp short $+2
loc_C3CF76:
add rsp, 10h
pop rbp
retn
|
long long THD::st_transactions::cleanup(THD::st_transactions *this)
{
*((_QWORD *)this + 46) = 0LL;
*(_QWORD *)this = 0LL;
xid_t::null((THD::st_transactions *)((char *)this + 72));
return free_root((char *)this + 376, 1LL);
}
|
~Type_handler_long_blob:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00c40730
ADD RSP,0x10
POP RBP
RET
|
/* Type_handler_long_blob::~Type_handler_long_blob() */
void __thiscall Type_handler_long_blob::~Type_handler_long_blob(Type_handler_long_blob *this)
{
Type_handler_blob_common::~Type_handler_blob_common((Type_handler_blob_common *)this);
return;
}
|
|
14,755
|
my_uni_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static int my_uni_utf8mb3(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r, uchar *e)
{
if (wc < 0x80)
{
if (r >= e)
return MY_CS_TOOSMALL;
*r= (uchar) wc;
return 1;
}
if (wc < 0x800)
{
if (r + 2 > e)
return MY_CS_TOOSMALLN(2);
/* U+0080..U+07FF: 00000xxx.xxyyyyyy -> 110xxxxx 10yyyyyy */
*r++= (uchar) (0xC0 | (wc >> 6));
*r= (uchar) (0x80 | (wc & 0x3F));
return 2;
}
if (wc < 0x10000)
{
if (r + 3 > e)
return MY_CS_TOOSMALLN(3);
/* U+0800..U+FFFF: xxxxyyyy.yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz */
*r++= (uchar) (0xE0 | (wc >> 12));
*r++= (uchar) (0x80 | ((wc >> 6) & 0x3f));
*r= (uchar) (0x80 | (wc & 0x3f));
return 3;
}
return MY_CS_ILUNI;
}
|
O3
|
c
|
my_uni_utf8mb3:
pushq %rbp
movq %rsp, %rbp
cmpq $0x7f, %rsi
ja 0xcb9ea
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xcba5c
movb %sil, (%rdx)
movl $0x1, %eax
jmp 0xcba5c
cmpq $0x7ff, %rsi # imm = 0x7FF
ja 0xcba1d
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0xcba5c
movl %esi, %eax
shrl $0x6, %eax
orb $-0x40, %al
movb %al, (%rdx)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x1(%rdx)
movl $0x2, %eax
jmp 0xcba5c
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0xcba5c
leaq 0x3(%rdx), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rdi
ja 0xcba5c
movl %esi, %eax
shrl $0xc, %eax
orb $-0x20, %al
movb %al, (%rdx)
movl %esi, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rdx)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x2(%rdx)
movl $0x3, %eax
popq %rbp
retq
|
my_uni_utf8mb3:
push rbp
mov rbp, rsp
cmp rsi, 7Fh
ja short loc_CB9EA
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_CBA5C
mov [rdx], sil
mov eax, 1
jmp short loc_CBA5C
loc_CB9EA:
cmp rsi, 7FFh
ja short loc_CBA1D
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_CBA5C
mov eax, esi
shr eax, 6
or al, 0C0h
mov [rdx], al
and sil, 3Fh
or sil, 80h
mov [rdx+1], sil
mov eax, 2
jmp short loc_CBA5C
loc_CBA1D:
xor eax, eax
cmp rsi, 0FFFFh
ja short loc_CBA5C
lea rdi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rdi, rcx
ja short loc_CBA5C
mov eax, esi
shr eax, 0Ch
or al, 0E0h
mov [rdx], al
mov eax, esi
shr eax, 6
and al, 3Fh
or al, 80h
mov [rdx+1], al
and sil, 3Fh
or sil, 80h
mov [rdx+2], sil
mov eax, 3
loc_CBA5C:
pop rbp
retn
|
long long my_uni_utf8mb3(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
if ( a2 > 0x7F )
{
if ( a2 > 0x7FF )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) <= a4 )
{
*a3 = ((unsigned int)a2 >> 12) | 0xE0;
a3[1] = ((unsigned int)a2 >> 6) & 0x3F | 0x80;
a3[2] = a2 & 0x3F | 0x80;
return 3LL;
}
}
}
else
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = ((unsigned int)a2 >> 6) | 0xC0;
a3[1] = a2 & 0x3F | 0x80;
return 2LL;
}
}
}
else
{
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
*a3 = a2;
return 1LL;
}
}
return result;
}
|
my_uni_utf8mb3:
PUSH RBP
MOV RBP,RSP
CMP RSI,0x7f
JA 0x001cb9ea
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001cba5c
MOV byte ptr [RDX],SIL
MOV EAX,0x1
JMP 0x001cba5c
LAB_001cb9ea:
CMP RSI,0x7ff
JA 0x001cba1d
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x001cba5c
MOV EAX,ESI
SHR EAX,0x6
OR AL,0xc0
MOV byte ptr [RDX],AL
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [RDX + 0x1],SIL
MOV EAX,0x2
JMP 0x001cba5c
LAB_001cba1d:
XOR EAX,EAX
CMP RSI,0xffff
JA 0x001cba5c
LEA RDI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RDI,RCX
JA 0x001cba5c
MOV EAX,ESI
SHR EAX,0xc
OR AL,0xe0
MOV byte ptr [RDX],AL
MOV EAX,ESI
SHR EAX,0x6
AND AL,0x3f
OR AL,0x80
MOV byte ptr [RDX + 0x1],AL
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [RDX + 0x2],SIL
MOV EAX,0x3
LAB_001cba5c:
POP RBP
RET
|
int8 my_uni_utf8mb3(int8 param_1,ulong param_2,byte *param_3,byte *param_4)
{
int8 uVar1;
byte bVar2;
uint uVar3;
uVar3 = (uint)param_2;
bVar2 = (byte)param_2;
if (param_2 < 0x80) {
uVar1 = 0xffffff9b;
if (param_3 < param_4) {
*param_3 = bVar2;
uVar1 = 1;
}
}
else if (param_2 < 0x800) {
uVar1 = 0xffffff9a;
if (param_3 + 2 <= param_4) {
*param_3 = (byte)(uVar3 >> 6) | 0xc0;
param_3[1] = bVar2 & 0x3f | 0x80;
uVar1 = 2;
}
}
else {
uVar1 = 0;
if ((param_2 < 0x10000) && (uVar1 = 0xffffff99, param_3 + 3 <= param_4)) {
*param_3 = (byte)(uVar3 >> 0xc) | 0xe0;
param_3[1] = (byte)(uVar3 >> 6) & 0x3f | 0x80;
param_3[2] = bVar2 & 0x3f | 0x80;
uVar1 = 3;
}
}
return uVar1;
}
|
|
14,756
|
ma_tls_read
|
eloqsql/libmariadb/libmariadb/secure/openssl.c
|
ssize_t ma_tls_read(MARIADB_TLS *ctls, const uchar* buffer, size_t length)
{
int rc;
MARIADB_PVIO *pvio= ctls->pvio;
while ((rc= SSL_read((SSL *)ctls->ssl, (void *)buffer, (int)length)) <= 0)
{
int error= SSL_get_error((SSL *)ctls->ssl, rc);
if (error != SSL_ERROR_WANT_READ)
break;
if (pvio->methods->wait_io_or_timeout(pvio, TRUE, pvio->mysql->options.read_timeout) < 1)
break;
}
if (rc <= 0)
{
MYSQL *mysql= SSL_get_app_data(ctls->ssl);
ma_tls_set_error(mysql);
}
return rc;
}
|
O0
|
c
|
ma_tls_read:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
callq 0x13070
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
jg 0x37618
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x1c(%rbp), %esi
callq 0x13040
movl %eax, -0x2c(%rbp)
cmpl $0x2, -0x2c(%rbp)
je 0x375ea
jmp 0x37618
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl 0x394(%rcx), %edx
movl $0x1, %esi
callq *%rax
cmpl $0x1, %eax
jge 0x37616
jmp 0x37618
jmp 0x375b0
cmpl $0x0, -0x1c(%rbp)
jg 0x3763a
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
callq 0x13150
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x372c0
movslq -0x1c(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_tls_read:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_28], rax
loc_375B0:
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_18]
mov edx, eax
call _SSL_read
mov [rbp+var_1C], eax
cmp eax, 0
jg short loc_37618
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov esi, [rbp+var_1C]
call _SSL_get_error
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 2
jz short loc_375EA
jmp short loc_37618
loc_375EA:
mov rax, [rbp+var_28]
mov rax, [rax+48h]
mov rax, [rax+30h]
mov rdi, [rbp+var_28]
mov rcx, [rbp+var_28]
mov rcx, [rcx+40h]
mov edx, [rcx+394h]
mov esi, 1
call rax
cmp eax, 1
jge short loc_37616
jmp short loc_37618
loc_37616:
jmp short loc_375B0
loc_37618:
cmp [rbp+var_1C], 0
jg short loc_3763A
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
xor esi, esi
call _SSL_get_ex_data
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]
call ma_tls_set_error
loc_3763A:
movsxd rax, [rbp+var_1C]
add rsp, 40h
pop rbp
retn
|
long long ma_tls_read(long long a1, long long a2, unsigned int a3)
{
long long *v4; // [rsp+8h] [rbp-38h]
long long v5; // [rsp+18h] [rbp-28h]
int v6; // [rsp+24h] [rbp-1Ch]
v5 = *(_QWORD *)(a1 + 8);
do
v6 = SSL_read(*(_QWORD *)(a1 + 16), a2, a3);
while ( v6 <= 0
&& (unsigned int)SSL_get_error(*(_QWORD *)(a1 + 16), (unsigned int)v6) == 2
&& (*(int ( **)(long long, long long, _QWORD))(*(_QWORD *)(v5 + 72) + 48LL))(
v5,
1LL,
*(unsigned int *)(*(_QWORD *)(v5 + 64) + 916LL)) >= 1 );
if ( v6 <= 0 )
{
v4 = (long long *)SSL_get_ex_data(*(_QWORD *)(a1 + 16), 0LL);
ma_tls_set_error(v4);
}
return v6;
}
|
ma_tls_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_001375b0:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV EDX,EAX
CALL 0x00113070
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
JG 0x00137618
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV ESI,dword ptr [RBP + -0x1c]
CALL 0x00113040
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x2
JZ 0x001375ea
JMP 0x00137618
LAB_001375ea:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RCX + 0x40]
MOV EDX,dword ptr [RCX + 0x394]
MOV ESI,0x1
CALL RAX
CMP EAX,0x1
JGE 0x00137616
JMP 0x00137618
LAB_00137616:
JMP 0x001375b0
LAB_00137618:
CMP dword ptr [RBP + -0x1c],0x0
JG 0x0013763a
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
XOR ESI,ESI
CALL 0x00113150
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001372c0
LAB_0013763a:
MOVSXD RAX,dword ptr [RBP + -0x1c]
ADD RSP,0x40
POP RBP
RET
|
long ma_tls_read(long param_1,void *param_2,int param_3)
{
long lVar1;
int ret_code;
int iVar2;
void *pvVar3;
lVar1 = *(long *)(param_1 + 8);
do {
ret_code = SSL_read(*(SSL **)(param_1 + 0x10),param_2,param_3);
if ((0 < ret_code) || (iVar2 = SSL_get_error(*(SSL **)(param_1 + 0x10),ret_code), iVar2 != 2))
break;
iVar2 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x30))
(lVar1,1,*(int4 *)(*(long *)(lVar1 + 0x40) + 0x394));
} while (0 < iVar2);
if (ret_code < 1) {
pvVar3 = SSL_get_ex_data(*(SSL **)(param_1 + 0x10),0);
ma_tls_set_error(pvVar3);
}
return (long)ret_code;
}
|
|
14,757
|
str2int
|
eloqsql/strings/str2int.c
|
char *str2int(register const char *src, register int radix, long int lower,
long int upper, long int *val)
{
int sign; /* is number negative (+1) or positive (-1) */
int n; /* number of digits yet to be converted */
long limit; /* "largest" possible valid input */
long scale; /* the amount to multiply next digit by */
long sofar; /* the running value */
register int d; /* (negative of) next digit */
char *start;
int digits[32]; /* Room for numbers */
/* Make sure *val is sensible in case of error */
*val = 0;
/* Check that the radix is in the range 2..36 */
#ifndef DBUG_OFF
if (radix < 2 || radix > 36) {
errno=EDOM;
return NullS;
}
#endif
/* The basic problem is: how do we handle the conversion of
a number without resorting to machine-specific code to
check for overflow? Obviously, we have to ensure that
no calculation can overflow. We are guaranteed that the
"lower" and "upper" arguments are valid machine integers.
On sign-and-magnitude, twos-complement, and ones-complement
machines all, if +|n| is representable, so is -|n|, but on
twos complement machines the converse is not true. So the
"maximum" representable number has a negative representative.
Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest"
number we are concerned with. */
/* Calculate Limit using Scale as a scratch variable */
if ((limit = lower) > 0) limit = -limit;
if ((scale = upper) > 0) scale = -scale;
if (scale < limit) limit = scale;
/* Skip leading spaces and check for a sign.
Note: because on a 2s complement machine MinLong is a valid
integer but |MinLong| is not, we have to keep the current
converted value (and the scale!) as *negative* numbers,
so the sign is the opposite of what you might expect.
*/
while (my_isspace(&my_charset_latin1,*src)) src++;
sign = -1;
if (*src == '+') src++; else
if (*src == '-') src++, sign = 1;
/* Skip leading zeros so that we never compute a power of radix
in scale that we won't have a need for. Otherwise sticking
enough 0s in front of a number could cause the multiplication
to overflow when it neededn't.
*/
start=(char*) src;
while (*src == '0') src++;
/* Move over the remaining digits. We have to convert from left
to left in order to avoid overflow. Answer is after last digit.
*/
for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ;
/* Check that there is at least one digit */
if (start == src) {
errno=EDOM;
return NullS;
}
/* The invariant we want to maintain is that src is just
to the right of n digits, we've converted k digits to
sofar, scale = -radix**k, and scale < sofar < 0. Now
if the final number is to be within the original
Limit, we must have (to the left)*scale+sofar >= Limit,
or (to the left)*scale >= Limit-sofar, i.e. the digits
to the left of src must form an integer <= (Limit-sofar)/(scale).
In particular, this is true of the next digit. In our
incremental calculation of Limit,
IT IS VITAL that (-|N|)/(-|D|) = |N|/|D|
*/
for (sofar = 0, scale = -1; --n >= 1;)
{
if ((long) -(d=digits[n]) < limit) {
errno=ERANGE;
return NullS;
}
limit = (limit+d)/radix, sofar += d*scale; scale *= radix;
}
if (n == 0)
{
if ((long) -(d=digits[n]) < limit) /* get last digit */
{
errno=ERANGE;
return NullS;
}
sofar+=d*scale;
}
/* Now it might still happen that sofar = -32768 or its equivalent,
so we can't just multiply by the sign and check that the result
is in the range lower..upper. All of this caution is a right
pain in the neck. If only there were a standard routine which
says generate thus and such a signal on integer overflow...
But not enough machines can do it *SIGH*.
*/
if (sign < 0)
{
if (sofar < -LONG_MAX || (sofar= -sofar) > upper)
{
errno=ERANGE;
return NullS;
}
}
else if (sofar < lower)
{
errno=ERANGE;
return NullS;
}
*val = sofar;
errno=0; /* indicate that all went well */
return (char*) src;
}
|
O3
|
c
|
str2int:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r9
movq $0x0, (%r8)
movq %rdx, %rax
negq %rax
cmovsq %rdx, %rax
movq %rcx, %rdx
negq %rdx
cmovnsq %rcx, %rdx
leaq 0x2d4f5d(%rip), %r10 # 0x3abf20
movq 0x40(%r10), %r11
movzbl (%rdi), %r10d
incq %rdi
testb $0x8, 0x1(%r11,%r10)
jne 0xd6fc7
negq %rax
cmpq %rax, %rdx
cmovlq %rdx, %rax
cmpl $0x2b, %r10d
je 0xd6ff4
cmpl $0x2d, %r10d
jne 0xd6ff1
xorl %r10d, %r10d
jmp 0xd6ff7
decq %rdi
movb $0x1, %r10b
leaq -0x1(%rdi), %rbx
movb 0x1(%rbx), %r14b
incq %rbx
cmpb $0x30, %r14b
je 0xd6ffb
xorl %r11d, %r11d
xorl %edx, %edx
leal -0x30(%r14), %r15d
cmpb $0x9, %r15b
ja 0xd701d
movzbl %r15b, %r15d
jmp 0xd7049
leal -0x41(%r14), %r15d
cmpb $0x19, %r15b
ja 0xd7031
movzbl %r14b, %r15d
addl $-0x37, %r15d
jmp 0xd7049
leal -0x61(%r14), %r12d
movl $0x7f, %r15d
cmpb $0x19, %r12b
ja 0xd7049
movzbl %r14b, %r15d
addl $-0x57, %r15d
movl %r15d, -0xa0(%rbp,%rdx,4)
cmpl %esi, %r15d
jge 0xd706b
cmpq $0x13, %rdx
ja 0xd706b
incq %rdx
movb 0x1(%rbx), %r14b
incq %rbx
incl %r11d
jmp 0xd700d
cmpq %rdi, %rbx
je 0xd70b3
cmpq $0x2, %rdx
jb 0xd70bb
movslq %esi, %r14
movq $-0x1, %rdi
xorl %esi, %esi
decl %r11d
movslq -0xa0(%rbp,%r11,4), %r15
movq %r15, %rdx
negq %rdx
cmpq %rdx, %rax
jg 0xd70f6
addq %r15, %rax
cqto
idivq %r14
imulq %rdi, %r15
addq %r15, %rsi
imulq %r14, %rdi
cmpl $0x1, %r11d
jg 0xd7082
jmp 0xd70c8
movl $0x21, %r14d
jmp 0xd70fc
xorl %esi, %esi
decl %edx
jne 0xd70e1
movq $-0x1, %rdi
movslq -0xa0(%rbp), %rdx
movq %rdx, %r11
negq %r11
cmpq %r11, %rax
jg 0xd70f6
imulq %rdx, %rdi
addq %rdi, %rsi
testb %r10b, %r10b
je 0xd7119
negq %rsi
seto %al
cmpq %rcx, %rsi
setg %cl
orb %al, %cl
je 0xd711e
movl $0x22, %r14d
xorl %ebx, %ebx
callq 0x29790
movl %r14d, (%rax)
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpq %r9, %rsi
jl 0xd70f6
movq %rsi, (%r8)
xorl %r14d, %r14d
jmp 0xd70fe
nop
|
str2int:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 80h
mov r9, rdx
mov qword ptr [r8], 0
mov rax, rdx
neg rax
cmovs rax, rdx
mov rdx, rcx
neg rdx
cmovns rdx, rcx
lea r10, my_charset_latin1
mov r11, [r10+40h]
loc_D6FC7:
movzx r10d, byte ptr [rdi]
inc rdi
test byte ptr [r11+r10+1], 8
jnz short loc_D6FC7
neg rax
cmp rdx, rax
cmovl rax, rdx
cmp r10d, 2Bh ; '+'
jz short loc_D6FF4
cmp r10d, 2Dh ; '-'
jnz short loc_D6FF1
xor r10d, r10d
jmp short loc_D6FF7
loc_D6FF1:
dec rdi
loc_D6FF4:
mov r10b, 1
loc_D6FF7:
lea rbx, [rdi-1]
loc_D6FFB:
mov r14b, [rbx+1]
inc rbx
cmp r14b, 30h ; '0'
jz short loc_D6FFB
xor r11d, r11d
xor edx, edx
loc_D700D:
lea r15d, [r14-30h]
cmp r15b, 9
ja short loc_D701D
movzx r15d, r15b
jmp short loc_D7049
loc_D701D:
lea r15d, [r14-41h]
cmp r15b, 19h
ja short loc_D7031
movzx r15d, r14b
add r15d, 0FFFFFFC9h
jmp short loc_D7049
loc_D7031:
lea r12d, [r14-61h]
mov r15d, 7Fh
cmp r12b, 19h
ja short loc_D7049
movzx r15d, r14b
add r15d, 0FFFFFFA9h
loc_D7049:
mov [rbp+rdx*4+var_A0], r15d
cmp r15d, esi
jge short loc_D706B
cmp rdx, 13h
ja short loc_D706B
inc rdx
mov r14b, [rbx+1]
inc rbx
inc r11d
jmp short loc_D700D
loc_D706B:
cmp rbx, rdi
jz short loc_D70B3
cmp rdx, 2
jb short loc_D70BB
movsxd r14, esi
mov rdi, 0FFFFFFFFFFFFFFFFh
xor esi, esi
loc_D7082:
dec r11d
movsxd r15, [rbp+r11*4+var_A0]
mov rdx, r15
neg rdx
cmp rax, rdx
jg short loc_D70F6
add rax, r15
cqo
idiv r14
imul r15, rdi
add rsi, r15
imul rdi, r14
cmp r11d, 1
jg short loc_D7082
jmp short loc_D70C8
loc_D70B3:
mov r14d, 21h ; '!'
jmp short loc_D70FC
loc_D70BB:
xor esi, esi
dec edx
jnz short loc_D70E1
mov rdi, 0FFFFFFFFFFFFFFFFh
loc_D70C8:
movsxd rdx, [rbp+var_A0]
mov r11, rdx
neg r11
cmp rax, r11
jg short loc_D70F6
imul rdi, rdx
add rsi, rdi
loc_D70E1:
test r10b, r10b
jz short loc_D7119
neg rsi
seto al
cmp rsi, rcx
setnle cl
or cl, al
jz short loc_D711E
loc_D70F6:
mov r14d, 22h ; '"'
loc_D70FC:
xor ebx, ebx
loc_D70FE:
call ___errno_location
mov [rax], r14d
mov rax, rbx
add rsp, 80h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_D7119:
cmp rsi, r9
jl short loc_D70F6
loc_D711E:
mov [r8], rsi
xor r14d, r14d
jmp short loc_D70FE
|
long long str2int(long long a1, int a2, long long a3, long long a4, long long *a5)
{
long long v6; // rax
long long v7; // rdx
long long v8; // r10
long long v9; // rax
char v10; // r10
long long v11; // rbx
unsigned __int8 v12; // r14
long long v13; // r11
unsigned long long i; // rdx
int v15; // r15d
long long v16; // r14
long long v17; // rsi
long long v18; // r15
int v19; // r14d
_DWORD v21[40]; // [rsp+0h] [rbp-A0h]
*a5 = 0LL;
v6 = -a3;
if ( a3 > 0 )
v6 = a3;
v7 = -a4;
if ( a4 <= 0 )
v7 = a4;
do
v8 = *(unsigned __int8 *)a1++;
while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v8 + 1) & 8) != 0 );
v9 = -v6;
if ( v7 < v9 )
v9 = v7;
if ( (_DWORD)v8 != 43 )
{
if ( (_DWORD)v8 == 45 )
{
v10 = 0;
goto LABEL_13;
}
--a1;
}
v10 = 1;
LABEL_13:
v11 = a1 - 1;
do
v12 = *(_BYTE *)++v11;
while ( v12 == 48 );
LODWORD(v13) = 0;
for ( i = 0LL; ; ++i )
{
LOBYTE(v15) = v12 - 48;
if ( (unsigned __int8)(v12 - 48) > 9u )
{
if ( (unsigned __int8)(v12 - 65) > 0x19u )
{
v15 = 127;
if ( (unsigned __int8)(v12 - 97) <= 0x19u )
v15 = v12 - 87;
}
else
{
v15 = v12 - 55;
}
}
else
{
v15 = (unsigned __int8)v15;
}
v21[i] = v15;
if ( v15 >= a2 || i > 0x13 )
break;
v12 = *(_BYTE *)++v11;
LODWORD(v13) = v13 + 1;
}
if ( v11 != a1 )
{
if ( i >= 2 )
{
v16 = a2;
a1 = -1LL;
v17 = 0LL;
while ( 1 )
{
v13 = (unsigned int)(v13 - 1);
v18 = (int)v21[v13];
if ( v9 > -v18 )
goto LABEL_38;
v9 = (v18 + v9) / v16;
v17 += a1 * v18;
a1 *= v16;
if ( (int)v13 <= 1 )
goto LABEL_34;
}
}
v17 = 0LL;
if ( (_DWORD)i == 1 )
{
a1 = -1LL;
LABEL_34:
if ( v9 > -(long long)v21[0] )
goto LABEL_38;
a1 *= v21[0];
v17 += a1;
}
if ( v10 )
{
v17 = -v17;
if ( __OFSUB__(v17, 1LL) || v17 > a4 )
{
LABEL_38:
v19 = 34;
goto LABEL_39;
}
}
else if ( v17 < a3 )
{
goto LABEL_38;
}
*a5 = v17;
v19 = 0;
goto LABEL_40;
}
v19 = 33;
LABEL_39:
v11 = 0LL;
LABEL_40:
*(_DWORD *)__errno_location(a1) = v19;
return v11;
}
|
str2int:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x80
MOV R9,RDX
MOV qword ptr [R8],0x0
MOV RAX,RDX
NEG RAX
CMOVS RAX,RDX
MOV RDX,RCX
NEG RDX
CMOVNS RDX,RCX
LEA R10,[0x4abf20]
MOV R11,qword ptr [R10 + 0x40]
LAB_001d6fc7:
MOVZX R10D,byte ptr [RDI]
INC RDI
TEST byte ptr [R11 + R10*0x1 + 0x1],0x8
JNZ 0x001d6fc7
NEG RAX
CMP RDX,RAX
CMOVL RAX,RDX
CMP R10D,0x2b
JZ 0x001d6ff4
CMP R10D,0x2d
JNZ 0x001d6ff1
XOR R10D,R10D
JMP 0x001d6ff7
LAB_001d6ff1:
DEC RDI
LAB_001d6ff4:
MOV R10B,0x1
LAB_001d6ff7:
LEA RBX,[RDI + -0x1]
LAB_001d6ffb:
MOV R14B,byte ptr [RBX + 0x1]
INC RBX
CMP R14B,0x30
JZ 0x001d6ffb
XOR R11D,R11D
XOR EDX,EDX
LAB_001d700d:
LEA R15D,[R14 + -0x30]
CMP R15B,0x9
JA 0x001d701d
MOVZX R15D,R15B
JMP 0x001d7049
LAB_001d701d:
LEA R15D,[R14 + -0x41]
CMP R15B,0x19
JA 0x001d7031
MOVZX R15D,R14B
ADD R15D,-0x37
JMP 0x001d7049
LAB_001d7031:
LEA R12D,[R14 + -0x61]
MOV R15D,0x7f
CMP R12B,0x19
JA 0x001d7049
MOVZX R15D,R14B
ADD R15D,-0x57
LAB_001d7049:
MOV dword ptr [RBP + RDX*0x4 + -0xa0],R15D
CMP R15D,ESI
JGE 0x001d706b
CMP RDX,0x13
JA 0x001d706b
INC RDX
MOV R14B,byte ptr [RBX + 0x1]
INC RBX
INC R11D
JMP 0x001d700d
LAB_001d706b:
CMP RBX,RDI
JZ 0x001d70b3
CMP RDX,0x2
JC 0x001d70bb
MOVSXD R14,ESI
MOV RDI,-0x1
XOR ESI,ESI
LAB_001d7082:
DEC R11D
MOVSXD R15,dword ptr [RBP + R11*0x4 + -0xa0]
MOV RDX,R15
NEG RDX
CMP RAX,RDX
JG 0x001d70f6
ADD RAX,R15
CQO
IDIV R14
IMUL R15,RDI
ADD RSI,R15
IMUL RDI,R14
CMP R11D,0x1
JG 0x001d7082
JMP 0x001d70c8
LAB_001d70b3:
MOV R14D,0x21
JMP 0x001d70fc
LAB_001d70bb:
XOR ESI,ESI
DEC EDX
JNZ 0x001d70e1
MOV RDI,-0x1
LAB_001d70c8:
MOVSXD RDX,dword ptr [RBP + -0xa0]
MOV R11,RDX
NEG R11
CMP RAX,R11
JG 0x001d70f6
IMUL RDI,RDX
ADD RSI,RDI
LAB_001d70e1:
TEST R10B,R10B
JZ 0x001d7119
NEG RSI
SETO AL
CMP RSI,RCX
SETG CL
OR CL,AL
JZ 0x001d711e
LAB_001d70f6:
MOV R14D,0x22
LAB_001d70fc:
XOR EBX,EBX
LAB_001d70fe:
CALL 0x00129790
MOV dword ptr [RAX],R14D
MOV RAX,RBX
ADD RSP,0x80
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001d7119:
CMP RSI,R9
JL 0x001d70f6
LAB_001d711e:
MOV qword ptr [R8],RSI
XOR R14D,R14D
JMP 0x001d70fe
|
byte * str2int(byte *param_1,int param_2,long param_3,long param_4,long *param_5)
{
long lVar1;
int *piVar2;
ulong uVar3;
byte *pbVar4;
long lVar5;
byte *pbVar6;
long lVar7;
ulong uVar8;
byte bVar9;
int iVar10;
uint uVar11;
long lVar12;
bool bVar13;
uint local_a8 [32];
*param_5 = 0;
lVar5 = -param_3;
if (0 < param_3) {
lVar5 = param_3;
}
lVar7 = -param_4;
if (param_4 < 1) {
lVar7 = param_4;
}
do {
pbVar4 = param_1;
bVar9 = *pbVar4;
param_1 = pbVar4 + 1;
} while ((PTR_ctype_latin1_004abf60[(ulong)bVar9 + 1] & 8) != 0);
lVar1 = -lVar5;
if (SBORROW8(lVar7,-lVar5) != lVar7 + lVar5 < 0) {
lVar1 = lVar7;
}
pbVar6 = param_1;
if ((bVar9 == 0x2b) || (pbVar6 = pbVar4, bVar9 != 0x2d)) {
bVar13 = true;
}
else {
bVar13 = false;
pbVar6 = param_1;
}
pbVar4 = pbVar6 + -1;
do {
bVar9 = pbVar4[1];
pbVar4 = pbVar4 + 1;
} while (bVar9 == 0x30);
uVar8 = 0;
uVar3 = 0;
while( true ) {
if ((byte)(bVar9 - 0x30) < 10) {
uVar11 = (uint)(byte)(bVar9 - 0x30);
}
else if ((byte)(bVar9 + 0xbf) < 0x1a) {
uVar11 = bVar9 - 0x37;
}
else {
uVar11 = 0x7f;
if ((byte)(bVar9 + 0x9f) < 0x1a) {
uVar11 = bVar9 - 0x57;
}
}
local_a8[uVar3] = uVar11;
if ((param_2 <= (int)uVar11) || (0x13 < uVar3)) break;
uVar3 = uVar3 + 1;
bVar9 = pbVar4[1];
pbVar4 = pbVar4 + 1;
uVar8 = (ulong)((int)uVar8 + 1);
}
if (pbVar4 == pbVar6) {
iVar10 = 0x21;
}
else {
if (uVar3 < 2) {
lVar5 = 0;
if ((int)uVar3 == 1) {
lVar7 = -1;
goto LAB_001d70c8;
}
LAB_001d70e1:
if (bVar13) {
lVar7 = -lVar5;
bVar13 = -param_4 == lVar5;
lVar5 = lVar7;
if (bVar13 || lVar7 < param_4) {
LAB_001d711e:
*param_5 = lVar5;
iVar10 = 0;
goto LAB_001d70fe;
}
}
else if (param_3 <= lVar5) goto LAB_001d711e;
}
else {
lVar7 = -1;
lVar5 = 0;
do {
uVar11 = (int)uVar8 - 1;
uVar8 = (ulong)uVar11;
lVar12 = (long)(int)local_a8[uVar8];
if (lVar1 != -lVar12 && SBORROW8(lVar1,-lVar12) == lVar1 + lVar12 < 0) goto LAB_001d70f6;
lVar1 = (lVar1 + lVar12) / (long)param_2;
lVar5 = lVar5 + lVar12 * lVar7;
lVar7 = lVar7 * param_2;
} while (1 < (int)uVar11);
LAB_001d70c8:
lVar12 = (long)(int)local_a8[0];
if (lVar1 == -lVar12 || SBORROW8(lVar1,-lVar12) != lVar1 + lVar12 < 0) {
lVar5 = lVar5 + lVar7 * lVar12;
goto LAB_001d70e1;
}
}
LAB_001d70f6:
iVar10 = 0x22;
}
pbVar4 = (byte *)0x0;
LAB_001d70fe:
piVar2 = __errno_location();
*piVar2 = iVar10;
return pbVar4;
}
|
|
14,758
|
fmt::v10::format_arg_store<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::remove_cv<std::remove_reference<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::type>::type, std::remove_cv<std::remove_reference<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::type>::type> fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
|
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/core.h
|
constexpr auto make_format_args(T&... args)
-> format_arg_store<Context, remove_cvref_t<T>...> {
return {args...};
}
|
O0
|
c
|
fmt::v10::format_arg_store<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::remove_cv<std::remove_reference<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::type>::type, std::remove_cv<std::remove_reference<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::type>::type> fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
subq $0x178, %rsp # imm = 0x178
movq %rdi, %rax
movq %rax, 0x28(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rdi, 0x70(%rsp)
movq %rcx, 0x68(%rsp)
movq %rax, 0x60(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0xd8(%rsp)
movb $0x1, 0xd7(%rsp)
movb $0x1, 0xd6(%rsp)
movb $0x1, 0xd5(%rsp)
movq 0xd8(%rsp), %rax
leaq 0xbf(%rsp), %rcx
movq %rcx, 0xf8(%rsp)
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rdi
callq 0xed310
movq %rax, 0x100(%rsp)
movq %rdx, 0x108(%rsp)
movq 0x100(%rsp), %rcx
movq 0x108(%rsp), %rax
movq %rcx, 0xc0(%rsp)
movq %rax, 0xc8(%rsp)
movq 0xc0(%rsp), %rcx
movq 0xc8(%rsp), %rax
movq %rcx, 0x138(%rsp)
movq %rax, 0x140(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, 0x130(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x138(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x9f410
movq (%rsp), %rdi
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
callq 0x9f3d0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xe0(%rsp), %rcx
movq 0xe8(%rsp), %rax
movq %rcx, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x98(%rsp)
movb $0x1, 0x97(%rsp)
movb $0x1, 0x96(%rsp)
movb $0x1, 0x95(%rsp)
movq 0x98(%rsp), %rax
leaq 0x7f(%rsp), %rcx
movq %rcx, 0x118(%rsp)
movq %rax, 0x110(%rsp)
movq 0x110(%rsp), %rdi
callq 0xed310
movq %rax, 0x120(%rsp)
movq %rdx, 0x128(%rsp)
movq 0x120(%rsp), %rcx
movq 0x128(%rsp), %rax
movq %rcx, 0x80(%rsp)
movq %rax, 0x88(%rsp)
movq 0x80(%rsp), %rcx
movq 0x88(%rsp), %rax
movq %rcx, 0x150(%rsp)
movq %rax, 0x158(%rsp)
leaq 0xa0(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x148(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x150(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x9f410
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
callq 0x9f3d0
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq %rax, %rsi
movq 0x28(%rsp), %rax
movq %rsi, 0x8(%rdx)
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movq %rsi, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x170(%rsp)
leaq 0x50(%rsp), %rcx
movq %rcx, 0x168(%rsp)
leaq 0x40(%rsp), %rcx
movq %rcx, 0x160(%rsp)
movq 0x170(%rsp), %rcx
movq 0x168(%rsp), %rdx
movq (%rdx), %rsi
movq %rsi, (%rcx)
movq 0x8(%rdx), %rdx
movq %rdx, 0x8(%rcx)
movq 0x160(%rsp), %rdx
movq (%rdx), %rsi
movq %rsi, 0x10(%rcx)
movq 0x8(%rdx), %rdx
movq %rdx, 0x18(%rcx)
addq $0x178, %rsp # imm = 0x178
retq
nopl (%rax,%rax)
|
_ZN3fmt3v1016make_format_argsINS0_20basic_format_contextINS0_8appenderEcEEJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_EEENS0_16format_arg_storeIT_JDpNSt9remove_cvINSt16remove_referenceIT0_E4typeEE4typeEEEEDpRSF_:
sub rsp, 178h
mov rax, rdi
mov [rsp+178h+var_150], rax
mov [rsp+178h+var_140], rsi
mov [rsp+178h+var_148], rdx
mov rcx, [rsp+178h+var_140]
mov rax, [rsp+178h+var_148]
mov [rsp+178h+var_108], rdi
mov [rsp+178h+var_110], rcx
mov [rsp+178h+var_118], rax
mov rax, [rsp+178h+var_108]
mov [rsp+178h+var_158], rax
mov rax, [rsp+178h+var_110]
mov [rsp+178h+var_A0], rax
mov [rsp+178h+var_A1], 1
mov [rsp+178h+var_A2], 1
mov [rsp+178h+var_A3], 1
mov rax, [rsp+178h+var_A0]
lea rcx, [rsp+178h+var_B9]
mov [rsp+178h+var_80], rcx
mov [rsp+178h+var_88], rax
mov rdi, [rsp+178h+var_88]
call _ZN3fmt3v106detail14to_string_viewIcSt11char_traitsIcESaIcEEENS0_17basic_string_viewIT_EERKNSt7__cxx1112basic_stringIS7_T0_T1_EE; fmt::v10::detail::to_string_view<char,std::char_traits<char>,std::allocator<char>>(std::string const&)
mov [rsp+178h+var_78], rax
mov [rsp+178h+var_70], rdx
mov rcx, [rsp+178h+var_78]
mov rax, [rsp+178h+var_70]
mov [rsp+178h+var_B8], rcx
mov [rsp+178h+var_B0], rax
mov rcx, [rsp+178h+var_B8]
mov rax, [rsp+178h+var_B0]
mov [rsp+178h+var_40], rcx
mov [rsp+178h+var_38], rax
lea rax, [rsp+178h+var_98]
mov [rsp+178h+var_48], rax
mov rax, [rsp+178h+var_48]
mov [rsp+178h+var_170], rax
lea rdi, [rsp+178h+var_40]
mov [rsp+178h+var_178], rdi
call _ZNK3fmt3v1017basic_string_viewIcE4dataEv; fmt::v10::basic_string_view<char>::data(void)
mov rdi, [rsp+178h+var_178]
mov rcx, rax
mov rax, [rsp+178h+var_170]
mov [rax], rcx
call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void)
mov rcx, rax
mov rax, [rsp+178h+var_170]
mov [rax+8], rcx
mov rcx, [rsp+178h+var_98]
mov rax, [rsp+178h+var_90]
mov [rsp+178h+var_128], rcx
mov [rsp+178h+var_120], rax
mov rax, [rsp+178h+var_118]
mov [rsp+178h+var_E0], rax
mov [rsp+178h+var_E1], 1
mov [rsp+178h+var_E2], 1
mov [rsp+178h+var_E3], 1
mov rax, [rsp+178h+var_E0]
lea rcx, [rsp+178h+var_F9]
mov [rsp+178h+var_60], rcx
mov [rsp+178h+var_68], rax
mov rdi, [rsp+178h+var_68]
call _ZN3fmt3v106detail14to_string_viewIcSt11char_traitsIcESaIcEEENS0_17basic_string_viewIT_EERKNSt7__cxx1112basic_stringIS7_T0_T1_EE; fmt::v10::detail::to_string_view<char,std::char_traits<char>,std::allocator<char>>(std::string const&)
mov [rsp+178h+var_58], rax
mov [rsp+178h+var_50], rdx
mov rcx, [rsp+178h+var_58]
mov rax, [rsp+178h+var_50]
mov [rsp+178h+var_F8], rcx
mov [rsp+178h+var_F0], rax
mov rcx, [rsp+178h+var_F8]
mov rax, [rsp+178h+var_F0]
mov [rsp+178h+var_28], rcx
mov [rsp+178h+var_20], rax
lea rax, [rsp+178h+var_D8]
mov [rsp+178h+var_30], rax
mov rax, [rsp+178h+var_30]
mov [rsp+178h+var_160], rax
lea rdi, [rsp+178h+var_28]
mov [rsp+178h+var_168], rdi
call _ZNK3fmt3v1017basic_string_viewIcE4dataEv; fmt::v10::basic_string_view<char>::data(void)
mov rdi, [rsp+178h+var_168]
mov rcx, rax
mov rax, [rsp+178h+var_160]
mov [rax], rcx
call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void)
mov rdx, [rsp+178h+var_160]
mov rcx, [rsp+178h+var_158]
mov rsi, rax
mov rax, [rsp+178h+var_150]
mov [rdx+8], rsi
mov rsi, [rsp+178h+var_D8]
mov rdx, [rsp+178h+var_D0]
mov [rsp+178h+var_138], rsi
mov [rsp+178h+var_130], rdx
mov [rsp+178h+var_8], rcx
lea rcx, [rsp+178h+var_128]
mov [rsp+178h+var_10], rcx
lea rcx, [rsp+178h+var_138]
mov [rsp+178h+var_18], rcx
mov rcx, [rsp+178h+var_8]
mov rdx, [rsp+178h+var_10]
mov rsi, [rdx]
mov [rcx], rsi
mov rdx, [rdx+8]
mov [rcx+8], rdx
mov rdx, [rsp+178h+var_18]
mov rsi, [rdx]
mov [rcx+10h], rsi
mov rdx, [rdx+8]
mov [rcx+18h], rdx
add rsp, 178h
retn
|
long long * fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::string,std::string>(
long long *a1,
long long a2,
long long a3)
{
long long v3; // rdx
long long v4; // rdx
long long v5; // rsi
long long *result; // rax
_QWORD *v7; // rdx
_QWORD v8[2]; // [rsp+40h] [rbp-138h] BYREF
long long v9; // [rsp+50h] [rbp-128h] BYREF
long long v10; // [rsp+58h] [rbp-120h]
long long v11; // [rsp+60h] [rbp-118h]
long long v12; // [rsp+68h] [rbp-110h]
long long *v13; // [rsp+70h] [rbp-108h]
char v14; // [rsp+7Fh] [rbp-F9h] BYREF
long long v15; // [rsp+80h] [rbp-F8h]
long long v16; // [rsp+88h] [rbp-F0h]
char v17; // [rsp+95h] [rbp-E3h]
char v18; // [rsp+96h] [rbp-E2h]
char v19; // [rsp+97h] [rbp-E1h]
long long v20; // [rsp+98h] [rbp-E0h]
_QWORD v21[3]; // [rsp+A0h] [rbp-D8h] BYREF
char v22; // [rsp+BFh] [rbp-B9h] BYREF
long long v23; // [rsp+C0h] [rbp-B8h]
long long v24; // [rsp+C8h] [rbp-B0h]
char v25; // [rsp+D5h] [rbp-A3h]
char v26; // [rsp+D6h] [rbp-A2h]
char v27; // [rsp+D7h] [rbp-A1h]
long long v28; // [rsp+D8h] [rbp-A0h]
long long v29; // [rsp+E0h] [rbp-98h] BYREF
long long v30; // [rsp+E8h] [rbp-90h]
long long v31; // [rsp+F0h] [rbp-88h]
char *v32; // [rsp+F8h] [rbp-80h]
long long v33; // [rsp+100h] [rbp-78h]
long long v34; // [rsp+108h] [rbp-70h]
long long v35; // [rsp+110h] [rbp-68h]
char *v36; // [rsp+118h] [rbp-60h]
long long v37; // [rsp+120h] [rbp-58h]
long long v38; // [rsp+128h] [rbp-50h]
long long *v39; // [rsp+130h] [rbp-48h]
_QWORD v40[3]; // [rsp+138h] [rbp-40h] BYREF
_QWORD v41[2]; // [rsp+150h] [rbp-28h] BYREF
_QWORD *v42; // [rsp+160h] [rbp-18h]
long long *v43; // [rsp+168h] [rbp-10h]
long long *v44; // [rsp+170h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
v28 = a2;
v27 = 1;
v26 = 1;
v25 = 1;
v32 = &v22;
v31 = a2;
v33 = fmt::v10::detail::to_string_view<char,std::char_traits<char>,std::allocator<char>>(a2);
v34 = v3;
v23 = v33;
v24 = v3;
v40[0] = v33;
v40[1] = v3;
v39 = &v29;
v29 = fmt::v10::basic_string_view<char>::data((long long)v40);
v30 = fmt::v10::basic_string_view<char>::size((long long)v40);
v9 = v29;
v10 = v30;
v20 = v11;
v19 = 1;
v18 = 1;
v17 = 1;
v36 = &v14;
v35 = v11;
v37 = fmt::v10::detail::to_string_view<char,std::char_traits<char>,std::allocator<char>>(v11);
v38 = v4;
v15 = v37;
v16 = v4;
v41[0] = v37;
v41[1] = v4;
v40[2] = v21;
v21[0] = fmt::v10::basic_string_view<char>::data((long long)v41);
v5 = fmt::v10::basic_string_view<char>::size((long long)v41);
result = a1;
v21[1] = v5;
v8[0] = v21[0];
v8[1] = v5;
v44 = a1;
v43 = &v9;
v42 = v8;
*a1 = v9;
a1[1] = v10;
v7 = v42;
a1[2] = *v42;
a1[3] = v7[1];
return result;
}
|
make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::__cxx11::string,std::__cxx11::string>:
SUB RSP,0x178
MOV RAX,RDI
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV RCX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RCX
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xd8],RAX
MOV byte ptr [RSP + 0xd7],0x1
MOV byte ptr [RSP + 0xd6],0x1
MOV byte ptr [RSP + 0xd5],0x1
MOV RAX,qword ptr [RSP + 0xd8]
LEA RCX,[RSP + 0xbf]
MOV qword ptr [RSP + 0xf8],RCX
MOV qword ptr [RSP + 0xf0],RAX
MOV RDI,qword ptr [RSP + 0xf0]
CALL 0x001ed310
MOV qword ptr [RSP + 0x100],RAX
MOV qword ptr [RSP + 0x108],RDX
MOV RCX,qword ptr [RSP + 0x100]
MOV RAX,qword ptr [RSP + 0x108]
MOV qword ptr [RSP + 0xc0],RCX
MOV qword ptr [RSP + 0xc8],RAX
MOV RCX,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RSP + 0xc8]
MOV qword ptr [RSP + 0x138],RCX
MOV qword ptr [RSP + 0x140],RAX
LEA RAX,[RSP + 0xe0]
MOV qword ptr [RSP + 0x130],RAX
MOV RAX,qword ptr [RSP + 0x130]
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x138]
MOV qword ptr [RSP],RDI
CALL 0x0019f410
MOV RDI,qword ptr [RSP]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
CALL 0x0019f3d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RSP + 0xe0]
MOV RAX,qword ptr [RSP + 0xe8]
MOV qword ptr [RSP + 0x50],RCX
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x98],RAX
MOV byte ptr [RSP + 0x97],0x1
MOV byte ptr [RSP + 0x96],0x1
MOV byte ptr [RSP + 0x95],0x1
MOV RAX,qword ptr [RSP + 0x98]
LEA RCX,[RSP + 0x7f]
MOV qword ptr [RSP + 0x118],RCX
MOV qword ptr [RSP + 0x110],RAX
MOV RDI,qword ptr [RSP + 0x110]
CALL 0x001ed310
MOV qword ptr [RSP + 0x120],RAX
MOV qword ptr [RSP + 0x128],RDX
MOV RCX,qword ptr [RSP + 0x120]
MOV RAX,qword ptr [RSP + 0x128]
MOV qword ptr [RSP + 0x80],RCX
MOV qword ptr [RSP + 0x88],RAX
MOV RCX,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x150],RCX
MOV qword ptr [RSP + 0x158],RAX
LEA RAX,[RSP + 0xa0]
MOV qword ptr [RSP + 0x148],RAX
MOV RAX,qword ptr [RSP + 0x148]
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x150]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x0019f410
MOV RDI,qword ptr [RSP + 0x10]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX],RCX
CALL 0x0019f3d0
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
MOV RSI,RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RDX + 0x8],RSI
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x48],RDX
MOV qword ptr [RSP + 0x170],RCX
LEA RCX,[RSP + 0x50]
MOV qword ptr [RSP + 0x168],RCX
LEA RCX,[RSP + 0x40]
MOV qword ptr [RSP + 0x160],RCX
MOV RCX,qword ptr [RSP + 0x170]
MOV RDX,qword ptr [RSP + 0x168]
MOV RSI,qword ptr [RDX]
MOV qword ptr [RCX],RSI
MOV RDX,qword ptr [RDX + 0x8]
MOV qword ptr [RCX + 0x8],RDX
MOV RDX,qword ptr [RSP + 0x160]
MOV RSI,qword ptr [RDX]
MOV qword ptr [RCX + 0x10],RSI
MOV RDX,qword ptr [RDX + 0x8]
MOV qword ptr [RCX + 0x18],RDX
ADD RSP,0x178
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
/* fmt::v10::format_arg_store<fmt::v10::basic_format_context<fmt::v10::appender, char>,
std::remove_cv<std::remove_reference<std::__cxx11::string >::type>::type,
std::remove_cv<std::remove_reference<std::__cxx11::string >::type>::type>
fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>,
std::__cxx11::string, std::__cxx11::string >(std::__cxx11::string&, std::__cxx11::string&) */
v10 * __thiscall
fmt::v10::
make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::__cxx11::string,std::__cxx11::string>
(v10 *this,string *param_1,string *param_2)
{
int8 uVar1;
int8 uVar2;
int1 local_f9;
int1 local_f8 [16];
int1 local_e3;
int1 local_e2;
int1 local_e1;
string *local_e0;
int8 local_d8 [3];
int1 local_b9;
int1 local_b8 [16];
int1 local_a3;
int1 local_a2;
int1 local_a1;
string *local_a0;
int8 local_98 [2];
string *local_88;
int1 *local_80;
int1 local_78 [16];
string *local_68;
int1 *local_60;
int1 local_58 [16];
int8 *local_48;
basic_string_view<char> local_40 [16];
int8 *local_30;
basic_string_view<char> local_28 [40];
local_a1 = 1;
local_a2 = 1;
local_a3 = 1;
local_80 = &local_b9;
local_a0 = param_1;
local_88 = param_1;
local_b8 = detail::to_string_view<char,std::char_traits<char>,std::allocator<char>>(param_1);
local_48 = local_98;
local_78 = local_b8;
local_40 = (basic_string_view<char> [16])local_b8;
local_98[0] = basic_string_view<char>::data(local_40);
uVar1 = basic_string_view<char>::size(local_40);
local_e1 = 1;
local_e2 = 1;
local_e3 = 1;
local_60 = &local_f9;
local_e0 = param_2;
local_68 = param_2;
local_f8 = detail::to_string_view<char,std::char_traits<char>,std::allocator<char>>(param_2);
local_30 = local_d8;
local_58 = local_f8;
local_28._0_16_ = local_f8;
local_d8[0] = basic_string_view<char>::data(local_28);
uVar2 = basic_string_view<char>::size(local_28);
*(int8 *)this = local_98[0];
*(int8 *)(this + 8) = uVar1;
*(int8 *)(this + 0x10) = local_d8[0];
*(int8 *)(this + 0x18) = uVar2;
return this;
}
|
|
14,759
|
testing::internal::edit_distance::(anonymous namespace)::InternalStrings::GetId(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
|
size_t GetId(const std::string& str) {
IdMap::iterator it = ids_.find(str);
if (it != ids_.end()) return it->second;
size_t id = ids_.size();
return ids_[str] = id;
}
|
O1
|
cpp
|
testing::internal::edit_distance::(anonymous namespace)::InternalStrings::GetId(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3a748
leaq 0x8(%r14), %rcx
cmpq %rcx, %rax
je 0x215eb
movq 0x40(%rax), %r15
jmp 0x215fd
movq 0x28(%r14), %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3a6cc
movq %r15, (%rax)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
|
_ZN7testing8internal13edit_distance12_GLOBAL__N_115InternalStrings5GetIdERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
mov rbx, rsi
mov r14, rdi
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::find(std::string const&)
lea rcx, [r14+8]
cmp rax, rcx
jz short loc_215EB
mov r15, [rax+40h]
jmp short loc_215FD
loc_215EB:
mov r15, [r14+28h]
mov rdi, r14
mov rsi, rbx
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&)
mov [rax], r15
loc_215FD:
mov rax, r15
pop rbx
pop r14
pop r15
retn
|
long long testing::internal::edit_distance::`anonymous namespace'::InternalStrings::GetId(
long long a1,
long long a2)
{
long long v2; // rax
long long v3; // r15
v2 = std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::find();
if ( v2 != a1 + 8 )
return *(_QWORD *)(v2 + 64);
v3 = *(_QWORD *)(a1 + 40);
*(_QWORD *)std::map<std::string,unsigned long>::operator[](a1, a2) = v3;
return v3;
}
|
GetId:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
CALL 0x0013a748
LEA RCX,[R14 + 0x8]
CMP RAX,RCX
JZ 0x001215eb
MOV R15,qword ptr [RAX + 0x40]
JMP 0x001215fd
LAB_001215eb:
MOV R15,qword ptr [R14 + 0x28]
MOV RDI,R14
MOV RSI,RBX
CALL 0x0013a6cc
MOV qword ptr [RAX],R15
LAB_001215fd:
MOV RAX,R15
POP RBX
POP R14
POP R15
RET
|
/* testing::internal::edit_distance::(anonymous
namespace)::InternalStrings::GetId(std::__cxx11::string const&) */
int8 __thiscall
testing::internal::edit_distance::(anonymous_namespace)::InternalStrings::GetId
(InternalStrings *this,string *param_1)
{
InternalStrings *pIVar1;
int8 *puVar2;
int8 uVar3;
pIVar1 = (InternalStrings *)
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
*)this,param_1);
if (pIVar1 == this + 8) {
uVar3 = *(int8 *)(this + 0x28);
puVar2 = (int8 *)
std::
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::operator[]((map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
*)this,param_1);
*puVar2 = uVar3;
}
else {
uVar3 = *(int8 *)(pIVar1 + 0x40);
}
return uVar3;
}
|
|
14,760
|
game_items::populate()
|
untodesu[P]voxelius/game/shared/game_items.cc
|
void game_items::populate(void)
{
// Stone; a hardened slate rock
game_items::stone = item_registry::construct("stone")
.set_texture("textures/item/stone.png")
.set_place_voxel(game_voxels::stone)
.build();
// Cobblestone; a bunch of small stones
game_items::cobblestone = item_registry::construct("cobblestone")
.set_texture("textures/item/cobblestone.png")
.set_place_voxel(game_voxels::cobblestone)
.build();
// Dirt; it's very dirty
game_items::dirt = item_registry::construct("dirt")
.set_texture("textures/item/dirt.png")
.set_place_voxel(game_voxels::dirt)
.build();
// Grass; literally just grassy dirt
game_items::grass = item_registry::construct("grass")
.set_texture("textures/item/grass.png")
.set_place_voxel(game_voxels::grass)
.build();
// Oak leaves; they're bushy!
game_items::oak_leaves = item_registry::construct("oak_leaves")
.set_texture("textures/item/oak_leaves.png")
.set_place_voxel(game_voxels::oak_leaves)
.build();
// Oak planks; watch for splinters!
game_items::oak_planks = item_registry::construct("oak_planks")
.set_texture("textures/item/oak_planks.png")
.set_place_voxel(game_voxels::oak_planks)
.build();
// Oak log; a big wad of wood
game_items::oak_log = item_registry::construct("oak_log")
.set_texture("textures/item/oak_log.png")
.set_place_voxel(game_voxels::oak_log)
.build();
// Glass; used for windowing
game_items::glass = item_registry::construct("glass")
.set_texture("textures/item/glass.png")
.set_place_voxel(game_voxels::glass)
.build();
// Slime; it's bouncy!
game_items::slime = item_registry::construct("slime")
.set_texture("textures/item/slime.png")
.set_place_voxel(game_voxels::slime)
.build();
// Mud; you sink in it!
game_items::mud = item_registry::construct("mud")
.set_texture("textures/item/mud.png")
.build();
}
|
O0
|
cpp
|
game_items::populate():
pushq %rbp
movq %rsp, %rbp
leaq 0x21c59f(%rip), %rdi # 0x36ad8a
callq 0x15a990
movq %rax, %rdi
leaq 0x228b60(%rip), %rsi # 0x37735a
callq 0x15a6d0
movq %rax, %rdi
leaq 0x3c222b(%rip), %rax # 0x510a34
movzwl (%rax), %esi
callq 0x15a730
movq %rax, %rdi
callq 0x15a750
movl %eax, 0x3c21e5(%rip) # 0x510a04
leaq 0x228b4c(%rip), %rdi # 0x377372
callq 0x15a990
movq %rax, %rdi
leaq 0x228b49(%rip), %rsi # 0x37737e
callq 0x15a6d0
movq %rax, %rdi
leaq 0x3c21ea(%rip), %rax # 0x510a2e
movzwl (%rax), %esi
callq 0x15a730
movq %rax, %rdi
callq 0x15a750
movl %eax, 0x3c21ae(%rip) # 0x510a08
leaq 0x228b3b(%rip), %rdi # 0x37739c
callq 0x15a990
movq %rax, %rdi
leaq 0x228b31(%rip), %rsi # 0x3773a1
callq 0x15a6d0
movq %rax, %rdi
leaq 0x3c21b1(%rip), %rax # 0x510a30
movzwl (%rax), %esi
callq 0x15a730
movq %rax, %rdi
callq 0x15a750
movl %eax, 0x3c2177(%rip) # 0x510a0c
leaq 0x228b1c(%rip), %rdi # 0x3773b8
callq 0x15a990
movq %rax, %rdi
leaq 0x228b13(%rip), %rsi # 0x3773be
callq 0x15a6d0
movq %rax, %rdi
leaq 0x3c2178(%rip), %rax # 0x510a32
movzwl (%rax), %esi
callq 0x15a730
movq %rax, %rdi
callq 0x15a750
movl %eax, 0x3c2140(%rip) # 0x510a10
leaq 0x228aff(%rip), %rdi # 0x3773d6
callq 0x15a990
movq %rax, %rdi
leaq 0x228afb(%rip), %rsi # 0x3773e1
callq 0x15a6d0
movq %rax, %rdi
leaq 0x3c2145(%rip), %rax # 0x510a3a
movzwl (%rax), %esi
callq 0x15a730
movq %rax, %rdi
callq 0x15a750
movl %eax, 0x3c2109(%rip) # 0x510a14
leaq 0x228aec(%rip), %rdi # 0x3773fe
callq 0x15a990
movq %rax, %rdi
leaq 0x228ae8(%rip), %rsi # 0x377409
callq 0x15a6d0
movq %rax, %rdi
leaq 0x3c210c(%rip), %rax # 0x510a3c
movzwl (%rax), %esi
callq 0x15a730
movq %rax, %rdi
callq 0x15a750
movl %eax, 0x3c20d2(%rip) # 0x510a18
leaq 0x228ad9(%rip), %rdi # 0x377426
callq 0x15a990
movq %rax, %rdi
leaq 0x228ad2(%rip), %rsi # 0x37742e
callq 0x15a6d0
movq %rax, %rdi
leaq 0x3c20d3(%rip), %rax # 0x510a3e
movzwl (%rax), %esi
callq 0x15a730
movq %rax, %rdi
callq 0x15a750
movl %eax, 0x3c209b(%rip) # 0x510a1c
leaq 0x228ac0(%rip), %rdi # 0x377448
callq 0x15a990
movq %rax, %rdi
leaq 0x228ab7(%rip), %rsi # 0x37744e
callq 0x15a6d0
movq %rax, %rdi
leaq 0x3c209a(%rip), %rax # 0x510a40
movzwl (%rax), %esi
callq 0x15a730
movq %rax, %rdi
callq 0x15a750
movl %eax, 0x3c2064(%rip) # 0x510a20
leaq 0x228aa3(%rip), %rdi # 0x377466
callq 0x15a990
movq %rax, %rdi
leaq 0x228a9a(%rip), %rsi # 0x37746c
callq 0x15a6d0
movq %rax, %rdi
leaq 0x3c2061(%rip), %rax # 0x510a42
movzwl (%rax), %esi
callq 0x15a730
movq %rax, %rdi
callq 0x15a750
movl %eax, 0x3c202d(%rip) # 0x510a24
leaq 0x228a86(%rip), %rdi # 0x377484
callq 0x15a990
movq %rax, %rdi
leaq 0x228a7b(%rip), %rsi # 0x377488
callq 0x15a6d0
movq %rax, %rdi
callq 0x15a750
movl %eax, 0x3c2008(%rip) # 0x510a28
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN10game_items8populateEv:
push rbp
mov rbp, rsp
lea rdi, aEnttNullElemTo+1Ch; this
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
mov rdi, rax; this
lea rsi, aTexturesItemSt; "textures/item/stone.png"
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
mov rdi, rax; this
lea rax, _ZN11game_voxels5stoneE; game_voxels::stone
movzx esi, word ptr [rax]; char *
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items5stoneE, eax; game_items::stone
lea rdi, aCobblestone; "cobblestone"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
mov rdi, rax; this
lea rsi, aTexturesItemCo; "textures/item/cobblestone.png"
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
mov rdi, rax; this
lea rax, _ZN11game_voxels11cobblestoneE; game_voxels::cobblestone
movzx esi, word ptr [rax]; char *
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items11cobblestoneE, eax; game_items::cobblestone
lea rdi, aDirt; "dirt"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
mov rdi, rax; this
lea rsi, aTexturesItemDi; "textures/item/dirt.png"
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
mov rdi, rax; this
lea rax, _ZN11game_voxels4dirtE; game_voxels::dirt
movzx esi, word ptr [rax]; char *
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items4dirtE, eax; game_items::dirt
lea rdi, aGrass; "grass"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
mov rdi, rax; this
lea rsi, aTexturesItemGr; "textures/item/grass.png"
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
mov rdi, rax; this
lea rax, _ZN11game_voxels5grassE; game_voxels::grass
movzx esi, word ptr [rax]; char *
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items5grassE, eax; game_items::grass
lea rdi, aOakLeaves; "oak_leaves"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
mov rdi, rax; this
lea rsi, aTexturesItemOa; "textures/item/oak_leaves.png"
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
mov rdi, rax; this
lea rax, _ZN11game_voxels10oak_leavesE; game_voxels::oak_leaves
movzx esi, word ptr [rax]; char *
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items10oak_leavesE, eax; game_items::oak_leaves
lea rdi, aOakPlanks; "oak_planks"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
mov rdi, rax; this
lea rsi, aTexturesItemOa_0; "textures/item/oak_planks.png"
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
mov rdi, rax; this
lea rax, _ZN11game_voxels10oak_planksE; game_voxels::oak_planks
movzx esi, word ptr [rax]; char *
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items10oak_planksE, eax; game_items::oak_planks
lea rdi, aOakLog; "oak_log"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
mov rdi, rax; this
lea rsi, aTexturesItemOa_1; "textures/item/oak_log.png"
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
mov rdi, rax; this
lea rax, _ZN11game_voxels7oak_logE; game_voxels::oak_log
movzx esi, word ptr [rax]; char *
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items7oak_logE, eax; game_items::oak_log
lea rdi, aGlass; "glass"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
mov rdi, rax; this
lea rsi, aTexturesItemGl; "textures/item/glass.png"
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
mov rdi, rax; this
lea rax, _ZN11game_voxels5glassE; game_voxels::glass
movzx esi, word ptr [rax]; char *
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items5glassE, eax; game_items::glass
lea rdi, aSlime; "slime"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
mov rdi, rax; this
lea rsi, aTexturesItemSl; "textures/item/slime.png"
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
mov rdi, rax; this
lea rax, _ZN11game_voxels5slimeE; game_voxels::slime
movzx esi, word ptr [rax]; char *
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items5slimeE, eax; game_items::slime
lea rdi, aMud; "mud"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
mov rdi, rax; this
lea rsi, aTexturesItemMu; "textures/item/mud.png"
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items3mudE, eax; game_items::mud
pop rbp
retn
|
long long game_items::populate(game_items *this, const char *a2)
{
ItemInfoBuilder *v2; // rax
ItemInfoBuilder *v3; // rax
const char *v4; // rsi
ItemInfoBuilder *v5; // rax
ItemInfoBuilder *v6; // rax
ItemInfoBuilder *v7; // rax
const char *v8; // rsi
ItemInfoBuilder *v9; // rax
ItemInfoBuilder *v10; // rax
ItemInfoBuilder *v11; // rax
const char *v12; // rsi
ItemInfoBuilder *v13; // rax
ItemInfoBuilder *v14; // rax
ItemInfoBuilder *v15; // rax
const char *v16; // rsi
ItemInfoBuilder *v17; // rax
ItemInfoBuilder *v18; // rax
ItemInfoBuilder *v19; // rax
const char *v20; // rsi
ItemInfoBuilder *v21; // rax
ItemInfoBuilder *v22; // rax
ItemInfoBuilder *v23; // rax
const char *v24; // rsi
ItemInfoBuilder *v25; // rax
ItemInfoBuilder *v26; // rax
ItemInfoBuilder *v27; // rax
const char *v28; // rsi
ItemInfoBuilder *v29; // rax
ItemInfoBuilder *v30; // rax
ItemInfoBuilder *v31; // rax
const char *v32; // rsi
ItemInfoBuilder *v33; // rax
ItemInfoBuilder *v34; // rax
ItemInfoBuilder *v35; // rax
const char *v36; // rsi
ItemInfoBuilder *v37; // rax
ItemInfoBuilder *v38; // rax
ItemInfoBuilder *v39; // rax
long long result; // rax
v2 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"stone", a2);
v3 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v2, "textures/item/stone.png");
v4 = (const char *)(unsigned __int16)game_voxels::stone;
v5 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v3, game_voxels::stone);
game_items::stone = ItemInfoBuilder::build(v5);
v6 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"cobblestone", v4);
v7 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v6, "textures/item/cobblestone.png");
v8 = (const char *)(unsigned __int16)game_voxels::cobblestone;
v9 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v7, game_voxels::cobblestone);
game_items::cobblestone = ItemInfoBuilder::build(v9);
v10 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"dirt", v8);
v11 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v10, "textures/item/dirt.png");
v12 = (const char *)(unsigned __int16)game_voxels::dirt;
v13 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v11, game_voxels::dirt);
game_items::dirt = ItemInfoBuilder::build(v13);
v14 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"grass", v12);
v15 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v14, "textures/item/grass.png");
v16 = (const char *)(unsigned __int16)game_voxels::grass;
v17 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v15, game_voxels::grass);
game_items::grass = ItemInfoBuilder::build(v17);
v18 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"oak_leaves", v16);
v19 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v18, "textures/item/oak_leaves.png");
v20 = (const char *)(unsigned __int16)game_voxels::oak_leaves;
v21 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v19, game_voxels::oak_leaves);
game_items::oak_leaves = ItemInfoBuilder::build(v21);
v22 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"oak_planks", v20);
v23 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v22, "textures/item/oak_planks.png");
v24 = (const char *)(unsigned __int16)game_voxels::oak_planks;
v25 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v23, game_voxels::oak_planks);
game_items::oak_planks = ItemInfoBuilder::build(v25);
v26 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"oak_log", v24);
v27 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v26, "textures/item/oak_log.png");
v28 = (const char *)(unsigned __int16)game_voxels::oak_log;
v29 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v27, game_voxels::oak_log);
game_items::oak_log = ItemInfoBuilder::build(v29);
v30 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"glass", v28);
v31 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v30, "textures/item/glass.png");
v32 = (const char *)(unsigned __int16)game_voxels::glass;
v33 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v31, game_voxels::glass);
game_items::glass = ItemInfoBuilder::build(v33);
v34 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"slime", v32);
v35 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v34, "textures/item/slime.png");
v36 = (const char *)(unsigned __int16)game_voxels::slime;
v37 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v35, game_voxels::slime);
game_items::slime = ItemInfoBuilder::build(v37);
v38 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"mud", v36);
v39 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v38, "textures/item/mud.png");
result = ItemInfoBuilder::build(v39);
game_items::mud = result;
return result;
}
|
_M_copy_data:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
POP RBP
RET
|
/* std::_Vector_base<entt::delegate<void (entt::basic_registry<entt::entity,
std::allocator<entt::entity> >&, entt::entity)>, std::allocator<entt::delegate<void
(entt::basic_registry<entt::entity, std::allocator<entt::entity> >&, entt::entity)> >
>::_Vector_impl_data::_M_copy_data(std::_Vector_base<entt::delegate<void
(entt::basic_registry<entt::entity, std::allocator<entt::entity> >&, entt::entity)>,
std::allocator<entt::delegate<void (entt::basic_registry<entt::entity,
std::allocator<entt::entity> >&, entt::entity)> > >::_Vector_impl_data const&) */
void __thiscall
std::
_Vector_base<entt::delegate<void(entt::basic_registry<entt::entity,std::allocator<entt::entity>>&,entt::entity)>,std::allocator<entt::delegate<void(entt::basic_registry<entt::entity,std::allocator<entt::entity>>&,entt::entity)>>>
::_Vector_impl_data::_M_copy_data(_Vector_impl_data *this,_Vector_impl_data *param_1)
{
*(int8 *)this = *(int8 *)param_1;
*(int8 *)(this + 8) = *(int8 *)(param_1 + 8);
*(int8 *)(this + 0x10) = *(int8 *)(param_1 + 0x10);
return;
}
|
|
14,761
|
game_items::populate()
|
untodesu[P]voxelius/game/shared/game_items.cc
|
void game_items::populate(void)
{
// Stone; a hardened slate rock
game_items::stone = item_registry::construct("stone")
.set_texture("textures/item/stone.png")
.set_place_voxel(game_voxels::stone)
.build();
// Cobblestone; a bunch of small stones
game_items::cobblestone = item_registry::construct("cobblestone")
.set_texture("textures/item/cobblestone.png")
.set_place_voxel(game_voxels::cobblestone)
.build();
// Dirt; it's very dirty
game_items::dirt = item_registry::construct("dirt")
.set_texture("textures/item/dirt.png")
.set_place_voxel(game_voxels::dirt)
.build();
// Grass; literally just grassy dirt
game_items::grass = item_registry::construct("grass")
.set_texture("textures/item/grass.png")
.set_place_voxel(game_voxels::grass)
.build();
// Oak leaves; they're bushy!
game_items::oak_leaves = item_registry::construct("oak_leaves")
.set_texture("textures/item/oak_leaves.png")
.set_place_voxel(game_voxels::oak_leaves)
.build();
// Oak planks; watch for splinters!
game_items::oak_planks = item_registry::construct("oak_planks")
.set_texture("textures/item/oak_planks.png")
.set_place_voxel(game_voxels::oak_planks)
.build();
// Oak log; a big wad of wood
game_items::oak_log = item_registry::construct("oak_log")
.set_texture("textures/item/oak_log.png")
.set_place_voxel(game_voxels::oak_log)
.build();
// Glass; used for windowing
game_items::glass = item_registry::construct("glass")
.set_texture("textures/item/glass.png")
.set_place_voxel(game_voxels::glass)
.build();
// Slime; it's bouncy!
game_items::slime = item_registry::construct("slime")
.set_texture("textures/item/slime.png")
.set_place_voxel(game_voxels::slime)
.build();
// Mud; you sink in it!
game_items::mud = item_registry::construct("mud")
.set_texture("textures/item/mud.png")
.build();
}
|
O2
|
cpp
|
game_items::populate():
pushq %rax
leaq 0xfc3e1(%rip), %rdi # 0x16ccb9
callq 0x73e84
leaq 0x107876(%rip), %rsi # 0x17815a
movq %rax, %rdi
callq 0x73d3a
leaq 0x1e6f61(%rip), %rcx # 0x257854
movzwl (%rcx), %esi
movq %rax, %rdi
callq 0x73d70
movq %rax, %rdi
callq 0x73d78
movl %eax, 0x1e6f18(%rip) # 0x257824
leaq 0x10785f(%rip), %rdi # 0x178172
callq 0x73e84
leaq 0x10785f(%rip), %rsi # 0x17817e
movq %rax, %rdi
callq 0x73d3a
leaq 0x1e6f20(%rip), %rcx # 0x25784e
movzwl (%rcx), %esi
movq %rax, %rdi
callq 0x73d70
movq %rax, %rdi
callq 0x73d78
movl %eax, 0x1e6ee1(%rip) # 0x257828
leaq 0x10784e(%rip), %rdi # 0x17819c
callq 0x73e84
leaq 0x107847(%rip), %rsi # 0x1781a1
movq %rax, %rdi
callq 0x73d3a
leaq 0x1e6ee7(%rip), %rcx # 0x257850
movzwl (%rcx), %esi
movq %rax, %rdi
callq 0x73d70
movq %rax, %rdi
callq 0x73d78
movl %eax, 0x1e6eaa(%rip) # 0x25782c
leaq 0x10782f(%rip), %rdi # 0x1781b8
callq 0x73e84
leaq 0x107829(%rip), %rsi # 0x1781be
movq %rax, %rdi
callq 0x73d3a
leaq 0x1e6eae(%rip), %rcx # 0x257852
movzwl (%rcx), %esi
movq %rax, %rdi
callq 0x73d70
movq %rax, %rdi
callq 0x73d78
movl %eax, 0x1e6e73(%rip) # 0x257830
leaq 0x107812(%rip), %rdi # 0x1781d6
callq 0x73e84
leaq 0x107811(%rip), %rsi # 0x1781e1
movq %rax, %rdi
callq 0x73d3a
leaq 0x1e6e7b(%rip), %rcx # 0x25785a
movzwl (%rcx), %esi
movq %rax, %rdi
callq 0x73d70
movq %rax, %rdi
callq 0x73d78
movl %eax, 0x1e6e3c(%rip) # 0x257834
leaq 0x1077ff(%rip), %rdi # 0x1781fe
callq 0x73e84
leaq 0x1077fe(%rip), %rsi # 0x178209
movq %rax, %rdi
callq 0x73d3a
leaq 0x1e6e42(%rip), %rcx # 0x25785c
movzwl (%rcx), %esi
movq %rax, %rdi
callq 0x73d70
movq %rax, %rdi
callq 0x73d78
movl %eax, 0x1e6e05(%rip) # 0x257838
leaq 0x1077ec(%rip), %rdi # 0x178226
callq 0x73e84
leaq 0x1077e8(%rip), %rsi # 0x17822e
movq %rax, %rdi
callq 0x73d3a
leaq 0x1e6e09(%rip), %rcx # 0x25785e
movzwl (%rcx), %esi
movq %rax, %rdi
callq 0x73d70
movq %rax, %rdi
callq 0x73d78
movl %eax, 0x1e6dce(%rip) # 0x25783c
leaq 0x1077d3(%rip), %rdi # 0x178248
callq 0x73e84
leaq 0x1077cd(%rip), %rsi # 0x17824e
movq %rax, %rdi
callq 0x73d3a
leaq 0x1e6dd0(%rip), %rcx # 0x257860
movzwl (%rcx), %esi
movq %rax, %rdi
callq 0x73d70
movq %rax, %rdi
callq 0x73d78
movl %eax, 0x1e6d97(%rip) # 0x257840
leaq 0x1077b6(%rip), %rdi # 0x178266
callq 0x73e84
leaq 0x1077b0(%rip), %rsi # 0x17826c
movq %rax, %rdi
callq 0x73d3a
leaq 0x1e6d97(%rip), %rcx # 0x257862
movzwl (%rcx), %esi
movq %rax, %rdi
callq 0x73d70
movq %rax, %rdi
callq 0x73d78
movl %eax, 0x1e6d60(%rip) # 0x257844
leaq 0x107799(%rip), %rdi # 0x178284
callq 0x73e84
leaq 0x107791(%rip), %rsi # 0x178288
movq %rax, %rdi
callq 0x73d3a
movq %rax, %rdi
callq 0x73d78
movl %eax, 0x1e6d3b(%rip) # 0x257848
popq %rax
retq
nop
|
_ZN10game_items8populateEv:
push rax
lea rdi, aEnttNullElemTo+1Ch; this
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
lea rsi, aTexturesItemSt; "textures/item/stone.png"
mov rdi, rax; this
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
lea rcx, _ZN11game_voxels5stoneE; game_voxels::stone
movzx esi, word ptr [rcx]; char *
mov rdi, rax; this
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items5stoneE, eax; game_items::stone
lea rdi, aCobblestone; "cobblestone"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
lea rsi, aTexturesItemCo; "textures/item/cobblestone.png"
mov rdi, rax; this
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
lea rcx, _ZN11game_voxels11cobblestoneE; game_voxels::cobblestone
movzx esi, word ptr [rcx]; char *
mov rdi, rax; this
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items11cobblestoneE, eax; game_items::cobblestone
lea rdi, aDirt; "dirt"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
lea rsi, aTexturesItemDi; "textures/item/dirt.png"
mov rdi, rax; this
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
lea rcx, _ZN11game_voxels4dirtE; game_voxels::dirt
movzx esi, word ptr [rcx]; char *
mov rdi, rax; this
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items4dirtE, eax; game_items::dirt
lea rdi, aGrass; "grass"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
lea rsi, aTexturesItemGr; "textures/item/grass.png"
mov rdi, rax; this
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
lea rcx, _ZN11game_voxels5grassE; game_voxels::grass
movzx esi, word ptr [rcx]; char *
mov rdi, rax; this
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items5grassE, eax; game_items::grass
lea rdi, aOakLeaves; "oak_leaves"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
lea rsi, aTexturesItemOa; "textures/item/oak_leaves.png"
mov rdi, rax; this
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
lea rcx, _ZN11game_voxels10oak_leavesE; game_voxels::oak_leaves
movzx esi, word ptr [rcx]; char *
mov rdi, rax; this
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items10oak_leavesE, eax; game_items::oak_leaves
lea rdi, aOakPlanks; "oak_planks"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
lea rsi, aTexturesItemOa_0; "textures/item/oak_planks.png"
mov rdi, rax; this
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
lea rcx, _ZN11game_voxels10oak_planksE; game_voxels::oak_planks
movzx esi, word ptr [rcx]; char *
mov rdi, rax; this
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items10oak_planksE, eax; game_items::oak_planks
lea rdi, aOakLog; "oak_log"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
lea rsi, aTexturesItemOa_1; "textures/item/oak_log.png"
mov rdi, rax; this
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
lea rcx, _ZN11game_voxels7oak_logE; game_voxels::oak_log
movzx esi, word ptr [rcx]; char *
mov rdi, rax; this
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items7oak_logE, eax; game_items::oak_log
lea rdi, aGlass; "glass"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
lea rsi, aTexturesItemGl; "textures/item/glass.png"
mov rdi, rax; this
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
lea rcx, _ZN11game_voxels5glassE; game_voxels::glass
movzx esi, word ptr [rcx]; char *
mov rdi, rax; this
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items5glassE, eax; game_items::glass
lea rdi, aSlime; "slime"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
lea rsi, aTexturesItemSl; "textures/item/slime.png"
mov rdi, rax; this
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
lea rcx, _ZN11game_voxels5slimeE; game_voxels::slime
movzx esi, word ptr [rcx]; char *
mov rdi, rax; this
call _ZN15ItemInfoBuilder15set_place_voxelEt; ItemInfoBuilder::set_place_voxel(ushort)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items5slimeE, eax; game_items::slime
lea rdi, aMud; "mud"
call _ZN13item_registry9constructEPKc; item_registry::construct(char const*)
lea rsi, aTexturesItemMu; "textures/item/mud.png"
mov rdi, rax; this
call _ZN15ItemInfoBuilder11set_textureEPKc; ItemInfoBuilder::set_texture(char const*)
mov rdi, rax; this
call _ZNK15ItemInfoBuilder5buildEv; ItemInfoBuilder::build(void)
mov cs:_ZN10game_items3mudE, eax; game_items::mud
pop rax
retn
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> game_items::populate(game_items *this, const char *a2)
{
ItemInfoBuilder *v2; // rax
ItemInfoBuilder *v3; // rax
const char *v4; // rsi
ItemInfoBuilder *v5; // rax
ItemInfoBuilder *v6; // rax
ItemInfoBuilder *v7; // rax
const char *v8; // rsi
ItemInfoBuilder *v9; // rax
ItemInfoBuilder *v10; // rax
ItemInfoBuilder *v11; // rax
const char *v12; // rsi
ItemInfoBuilder *v13; // rax
ItemInfoBuilder *v14; // rax
ItemInfoBuilder *v15; // rax
const char *v16; // rsi
ItemInfoBuilder *v17; // rax
ItemInfoBuilder *v18; // rax
ItemInfoBuilder *v19; // rax
const char *v20; // rsi
ItemInfoBuilder *v21; // rax
ItemInfoBuilder *v22; // rax
ItemInfoBuilder *v23; // rax
const char *v24; // rsi
ItemInfoBuilder *v25; // rax
ItemInfoBuilder *v26; // rax
ItemInfoBuilder *v27; // rax
const char *v28; // rsi
ItemInfoBuilder *v29; // rax
ItemInfoBuilder *v30; // rax
ItemInfoBuilder *v31; // rax
const char *v32; // rsi
ItemInfoBuilder *v33; // rax
ItemInfoBuilder *v34; // rax
ItemInfoBuilder *v35; // rax
const char *v36; // rsi
ItemInfoBuilder *v37; // rax
ItemInfoBuilder *v38; // rax
ItemInfoBuilder *v39; // rax
v2 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"stone", a2);
v3 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v2, "textures/item/stone.png");
v4 = (const char *)(unsigned __int16)game_voxels::stone;
v5 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v3, game_voxels::stone);
game_items::stone = ItemInfoBuilder::build(v5);
v6 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"cobblestone", v4);
v7 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v6, "textures/item/cobblestone.png");
v8 = (const char *)(unsigned __int16)game_voxels::cobblestone;
v9 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v7, game_voxels::cobblestone);
game_items::cobblestone = ItemInfoBuilder::build(v9);
v10 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"dirt", v8);
v11 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v10, "textures/item/dirt.png");
v12 = (const char *)(unsigned __int16)game_voxels::dirt;
v13 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v11, game_voxels::dirt);
game_items::dirt = ItemInfoBuilder::build(v13);
v14 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"grass", v12);
v15 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v14, "textures/item/grass.png");
v16 = (const char *)(unsigned __int16)game_voxels::grass;
v17 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v15, game_voxels::grass);
game_items::grass = ItemInfoBuilder::build(v17);
v18 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"oak_leaves", v16);
v19 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v18, "textures/item/oak_leaves.png");
v20 = (const char *)(unsigned __int16)game_voxels::oak_leaves;
v21 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v19, game_voxels::oak_leaves);
game_items::oak_leaves = ItemInfoBuilder::build(v21);
v22 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"oak_planks", v20);
v23 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v22, "textures/item/oak_planks.png");
v24 = (const char *)(unsigned __int16)game_voxels::oak_planks;
v25 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v23, game_voxels::oak_planks);
game_items::oak_planks = ItemInfoBuilder::build(v25);
v26 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"oak_log", v24);
v27 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v26, "textures/item/oak_log.png");
v28 = (const char *)(unsigned __int16)game_voxels::oak_log;
v29 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v27, game_voxels::oak_log);
game_items::oak_log = ItemInfoBuilder::build(v29);
v30 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"glass", v28);
v31 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v30, "textures/item/glass.png");
v32 = (const char *)(unsigned __int16)game_voxels::glass;
v33 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v31, game_voxels::glass);
game_items::glass = ItemInfoBuilder::build(v33);
v34 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"slime", v32);
v35 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v34, "textures/item/slime.png");
v36 = (const char *)(unsigned __int16)game_voxels::slime;
v37 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(v35, game_voxels::slime);
game_items::slime = ItemInfoBuilder::build(v37);
v38 = (ItemInfoBuilder *)item_registry::construct((item_registry *)"mud", v36);
v39 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(v38, "textures/item/mud.png");
game_items::mud = ItemInfoBuilder::build(v39);
}
|
populate:
PUSH RAX
LEA RDI,[0x26ccb9]
CALL 0x00173e84
LEA RSI,[0x27815a]
MOV RDI,RAX
CALL 0x00173d3a
LEA RCX,[0x357854]
MOVZX ESI,word ptr [RCX]
MOV RDI,RAX
CALL 0x00173d70
MOV RDI,RAX
CALL 0x00173d78
MOV dword ptr [0x00357824],EAX
LEA RDI,[0x278172]
CALL 0x00173e84
LEA RSI,[0x27817e]
MOV RDI,RAX
CALL 0x00173d3a
LEA RCX,[0x35784e]
MOVZX ESI,word ptr [RCX]
MOV RDI,RAX
CALL 0x00173d70
MOV RDI,RAX
CALL 0x00173d78
MOV dword ptr [0x00357828],EAX
LEA RDI,[0x27819c]
CALL 0x00173e84
LEA RSI,[0x2781a1]
MOV RDI,RAX
CALL 0x00173d3a
LEA RCX,[0x357850]
MOVZX ESI,word ptr [RCX]
MOV RDI,RAX
CALL 0x00173d70
MOV RDI,RAX
CALL 0x00173d78
MOV dword ptr [0x0035782c],EAX
LEA RDI,[0x2781b8]
CALL 0x00173e84
LEA RSI,[0x2781be]
MOV RDI,RAX
CALL 0x00173d3a
LEA RCX,[0x357852]
MOVZX ESI,word ptr [RCX]
MOV RDI,RAX
CALL 0x00173d70
MOV RDI,RAX
CALL 0x00173d78
MOV dword ptr [0x00357830],EAX
LEA RDI,[0x2781d6]
CALL 0x00173e84
LEA RSI,[0x2781e1]
MOV RDI,RAX
CALL 0x00173d3a
LEA RCX,[0x35785a]
MOVZX ESI,word ptr [RCX]
MOV RDI,RAX
CALL 0x00173d70
MOV RDI,RAX
CALL 0x00173d78
MOV dword ptr [0x00357834],EAX
LEA RDI,[0x2781fe]
CALL 0x00173e84
LEA RSI,[0x278209]
MOV RDI,RAX
CALL 0x00173d3a
LEA RCX,[0x35785c]
MOVZX ESI,word ptr [RCX]
MOV RDI,RAX
CALL 0x00173d70
MOV RDI,RAX
CALL 0x00173d78
MOV dword ptr [0x00357838],EAX
LEA RDI,[0x278226]
CALL 0x00173e84
LEA RSI,[0x27822e]
MOV RDI,RAX
CALL 0x00173d3a
LEA RCX,[0x35785e]
MOVZX ESI,word ptr [RCX]
MOV RDI,RAX
CALL 0x00173d70
MOV RDI,RAX
CALL 0x00173d78
MOV dword ptr [0x0035783c],EAX
LEA RDI,[0x278248]
CALL 0x00173e84
LEA RSI,[0x27824e]
MOV RDI,RAX
CALL 0x00173d3a
LEA RCX,[0x357860]
MOVZX ESI,word ptr [RCX]
MOV RDI,RAX
CALL 0x00173d70
MOV RDI,RAX
CALL 0x00173d78
MOV dword ptr [0x00357840],EAX
LEA RDI,[0x278266]
CALL 0x00173e84
LEA RSI,[0x27826c]
MOV RDI,RAX
CALL 0x00173d3a
LEA RCX,[0x357862]
MOVZX ESI,word ptr [RCX]
MOV RDI,RAX
CALL 0x00173d70
MOV RDI,RAX
CALL 0x00173d78
MOV dword ptr [0x00357844],EAX
LEA RDI,[0x278284]
CALL 0x00173e84
LEA RSI,[0x278288]
MOV RDI,RAX
CALL 0x00173d3a
MOV RDI,RAX
CALL 0x00173d78
MOV dword ptr [0x00357848],EAX
POP RAX
RET
|
/* game_items::populate() */
int8 game_items::populate(void)
{
int8 in_RAX;
char *pcVar1;
ItemInfoBuilder *pIVar2;
pcVar1 = (char *)item_registry::construct("stone");
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(pcVar1);
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(pIVar2,game_voxels::stone);
stone = ItemInfoBuilder::build(pIVar2);
pcVar1 = (char *)item_registry::construct("cobblestone");
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(pcVar1);
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(pIVar2,game_voxels::cobblestone);
cobblestone = ItemInfoBuilder::build(pIVar2);
pcVar1 = (char *)item_registry::construct("dirt");
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(pcVar1);
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(pIVar2,game_voxels::dirt);
dirt = ItemInfoBuilder::build(pIVar2);
pcVar1 = (char *)item_registry::construct("grass");
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(pcVar1);
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(pIVar2,game_voxels::grass);
grass = ItemInfoBuilder::build(pIVar2);
pcVar1 = (char *)item_registry::construct("oak_leaves");
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(pcVar1);
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(pIVar2,game_voxels::oak_leaves);
oak_leaves = ItemInfoBuilder::build(pIVar2);
pcVar1 = (char *)item_registry::construct("oak_planks");
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(pcVar1);
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(pIVar2,game_voxels::oak_planks);
oak_planks = ItemInfoBuilder::build(pIVar2);
pcVar1 = (char *)item_registry::construct("oak_log");
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(pcVar1);
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(pIVar2,game_voxels::oak_log);
oak_log = ItemInfoBuilder::build(pIVar2);
pcVar1 = (char *)item_registry::construct("glass");
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(pcVar1);
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(pIVar2,game_voxels::glass);
glass = ItemInfoBuilder::build(pIVar2);
pcVar1 = (char *)item_registry::construct("slime");
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(pcVar1);
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_place_voxel(pIVar2,game_voxels::slime);
slime = ItemInfoBuilder::build(pIVar2);
pcVar1 = (char *)item_registry::construct("mud");
pIVar2 = (ItemInfoBuilder *)ItemInfoBuilder::set_texture(pcVar1);
mud = ItemInfoBuilder::build(pIVar2);
return in_RAX;
}
|
|
14,762
|
reset_connection
|
eloqsql/libmariadb/unittest/libmariadb/my_test.h
|
static int reset_connection(MYSQL *mysql) {
int rc;
if (is_mariadb && !IS_MAXSCALE())
rc= mysql_change_user(mysql, username, password, schema);
else
rc= mysql_reset_connection(mysql);
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "SET sql_mode=''");
check_mysql_rc(rc, mysql);
return OK;
}
|
O0
|
c
|
reset_connection:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movzbl 0x4c73e(%rip), %eax # 0x61501
cmpl $0x0, %eax
je 0x14e6f
cmpq $0x0, 0x4c5ac(%rip) # 0x61380
je 0x14df7
movq 0x4c5a3(%rip), %rdi # 0x61380
callq 0x21b30
movq %rax, %rdi
leaq 0x37a0d(%rip), %rsi # 0x4c7f9
callq 0x13100
cmpq $0x0, %rax
jne 0x14e6f
leaq 0x37733(%rip), %rdi # 0x4c531
callq 0x13540
cmpq $0x0, %rax
je 0x14e49
leaq 0x37721(%rip), %rdi # 0x4c531
callq 0x13540
movq %rax, %rdi
leaq 0x379e3(%rip), %rsi # 0x4c802
callq 0x135f0
cmpl $0x0, %eax
je 0x14e6f
leaq 0x37701(%rip), %rdi # 0x4c531
callq 0x13540
movq %rax, %rdi
leaq 0x379cc(%rip), %rsi # 0x4c80b
callq 0x135f0
cmpl $0x0, %eax
je 0x14e6f
movq -0x10(%rbp), %rdi
movq 0x4c674(%rip), %rsi # 0x614c8
movq 0x4c675(%rip), %rdx # 0x614d0
movq 0x4c676(%rip), %rcx # 0x614d8
callq 0x1f150
movsbl %al, %eax
movl %eax, -0x14(%rbp)
jmp 0x14e7b
movq -0x10(%rbp), %rdi
callq 0x23df0
movl %eax, -0x14(%rbp)
jmp 0x14e7d
cmpl $0x0, -0x14(%rbp)
je 0x14ecc
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x22f90
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x22f60
movl -0x24(%rbp), %esi
movq -0x20(%rbp), %rdx
movl %eax, %ecx
leaq 0x3738d(%rip), %rdi # 0x4c23c
leaq 0x37269(%rip), %r8 # 0x4c11f
movl $0x238, %r9d # imm = 0x238
movb $0x0, %al
callq 0x167e0
movl $0x1, -0x4(%rbp)
jmp 0x14f39
jmp 0x14ece
movq -0x10(%rbp), %rdi
leaq 0x374b7(%rip), %rsi # 0x4c390
callq 0x1f610
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x14f30
movl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
callq 0x22f90
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x22f60
movl -0x34(%rbp), %esi
movq -0x30(%rbp), %rdx
movl %eax, %ecx
leaq 0x37329(%rip), %rdi # 0x4c23c
leaq 0x37205(%rip), %r8 # 0x4c11f
movl $0x23a, %r9d # imm = 0x23A
movb $0x0, %al
callq 0x167e0
movl $0x1, -0x4(%rbp)
jmp 0x14f39
jmp 0x14f32
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
reset_connection:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
movzx eax, cs:is_mariadb
cmp eax, 0
jz loc_14E6F
cmp cs:mysql_default, 0
jz short loc_14DF7
mov rdi, cs:mysql_default
call mysql_get_server_info
mov rdi, rax
lea rsi, aMaxscale; "maxScale"
call _strstr
cmp rax, 0
jnz short loc_14E6F
loc_14DF7:
lea rdi, aSrv; "srv"
call _getenv
cmp rax, 0
jz short loc_14E49
lea rdi, aSrv; "srv"
call _getenv
mov rdi, rax
lea rsi, aMaxscale_0; "maxscale"
call _strcmp
cmp eax, 0
jz short loc_14E6F
lea rdi, aSrv; "srv"
call _getenv
mov rdi, rax
lea rsi, aSkysqlHa; "skysql-ha"
call _strcmp
cmp eax, 0
jz short loc_14E6F
loc_14E49:
mov rdi, [rbp+var_10]
mov rsi, cs:username
mov rdx, cs:password
mov rcx, cs:schema
call mysql_change_user
movsx eax, al
mov [rbp+var_14], eax
jmp short loc_14E7B
loc_14E6F:
mov rdi, [rbp+var_10]
call mysql_reset_connection
mov [rbp+var_14], eax
loc_14E7B:
jmp short $+2
loc_14E7D:
cmp [rbp+var_14], 0
jz short loc_14ECC
mov eax, [rbp+var_14]
mov [rbp+var_24], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_24]
mov rdx, [rbp+var_20]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 238h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_14F39
loc_14ECC:
jmp short $+2
loc_14ECE:
mov rdi, [rbp+var_10]
lea rsi, aSetSqlMode; "SET sql_mode=''"
call mysql_query
mov [rbp+var_14], eax
cmp [rbp+var_14], 0
jz short loc_14F30
mov eax, [rbp+var_14]
mov [rbp+var_34], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_34]
mov rdx, [rbp+var_30]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 23Ah
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_14F39
loc_14F30:
jmp short $+2
loc_14F32:
mov [rbp+var_4], 0
loc_14F39:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long reset_connection(long long a1)
{
long long server_info; // rax
long long v2; // rax
long long v3; // rax
int v4; // eax
int v5; // eax
int v7; // [rsp+10h] [rbp-30h]
int v8; // [rsp+20h] [rbp-20h]
int v9; // [rsp+2Ch] [rbp-14h]
int v10; // [rsp+2Ch] [rbp-14h]
if ( !is_mariadb
|| mysql_default && (server_info = mysql_get_server_info(mysql_default), strstr(server_info, "maxScale"))
|| getenv("srv")
&& ((v2 = getenv("srv"), !(unsigned int)strcmp(v2, "maxscale"))
|| (v3 = getenv("srv"), !(unsigned int)strcmp(v3, "skysql-ha"))) )
{
v9 = mysql_reset_connection(a1);
}
else
{
v9 = (char)mysql_change_user(a1, username, password, schema);
}
if ( v9 )
{
v8 = mysql_error(a1);
v4 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v9,
v8,
v4,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
568);
return 1;
}
else
{
v10 = mysql_query(a1, "SET sql_mode=''");
if ( v10 )
{
v7 = mysql_error(a1);
v5 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v10,
v7,
v5,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
570);
return 1;
}
else
{
return 0;
}
}
}
|
reset_connection:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOVZX EAX,byte ptr [0x00161501]
CMP EAX,0x0
JZ 0x00114e6f
CMP qword ptr [0x00161380],0x0
JZ 0x00114df7
MOV RDI,qword ptr [0x00161380]
CALL 0x00121b30
MOV RDI,RAX
LEA RSI,[0x14c7f9]
CALL 0x00113100
CMP RAX,0x0
JNZ 0x00114e6f
LAB_00114df7:
LEA RDI,[0x14c531]
CALL 0x00113540
CMP RAX,0x0
JZ 0x00114e49
LEA RDI,[0x14c531]
CALL 0x00113540
MOV RDI,RAX
LEA RSI,[0x14c802]
CALL 0x001135f0
CMP EAX,0x0
JZ 0x00114e6f
LEA RDI,[0x14c531]
CALL 0x00113540
MOV RDI,RAX
LEA RSI,[0x14c80b]
CALL 0x001135f0
CMP EAX,0x0
JZ 0x00114e6f
LAB_00114e49:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [0x001614c8]
MOV RDX,qword ptr [0x001614d0]
MOV RCX,qword ptr [0x001614d8]
CALL 0x0011f150
MOVSX EAX,AL
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00114e7b
LAB_00114e6f:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00123df0
MOV dword ptr [RBP + -0x14],EAX
LAB_00114e7b:
JMP 0x00114e7d
LAB_00114e7d:
CMP dword ptr [RBP + -0x14],0x0
JZ 0x00114ecc
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00122f90
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00122f60
MOV ESI,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,EAX
LEA RDI,[0x14c23c]
LEA R8,[0x14c11f]
MOV R9D,0x238
MOV AL,0x0
CALL 0x001167e0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00114f39
LAB_00114ecc:
JMP 0x00114ece
LAB_00114ece:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14c390]
CALL 0x0011f610
MOV dword ptr [RBP + -0x14],EAX
CMP dword ptr [RBP + -0x14],0x0
JZ 0x00114f30
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x34],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00122f90
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00122f60
MOV ESI,dword ptr [RBP + -0x34]
MOV RDX,qword ptr [RBP + -0x30]
MOV ECX,EAX
LEA RDI,[0x14c23c]
LEA R8,[0x14c11f]
MOV R9D,0x23a
MOV AL,0x0
CALL 0x001167e0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00114f39
LAB_00114f30:
JMP 0x00114f32
LAB_00114f32:
MOV dword ptr [RBP + -0x4],0x0
LAB_00114f39:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 reset_connection(int8 param_1)
{
char cVar1;
int iVar2;
int4 uVar3;
char *pcVar4;
int8 uVar5;
int local_1c;
int4 local_c;
if (is_mariadb != '\0') {
if (mysql_default != 0) {
pcVar4 = (char *)mysql_get_server_info(mysql_default);
pcVar4 = strstr(pcVar4,"maxScale");
if (pcVar4 != (char *)0x0) goto LAB_00114e6f;
}
pcVar4 = getenv("srv");
if (pcVar4 == (char *)0x0) {
LAB_00114e49:
cVar1 = mysql_change_user(param_1,username,password,schema);
local_1c = (int)cVar1;
goto LAB_00114e7b;
}
pcVar4 = getenv("srv");
iVar2 = strcmp(pcVar4,"maxscale");
if (iVar2 != 0) {
pcVar4 = getenv("srv");
iVar2 = strcmp(pcVar4,"skysql-ha");
if (iVar2 != 0) goto LAB_00114e49;
}
}
LAB_00114e6f:
local_1c = mysql_reset_connection(param_1);
LAB_00114e7b:
if (local_1c == 0) {
iVar2 = mysql_query(param_1,"SET sql_mode=\'\'");
if (iVar2 == 0) {
local_c = 0;
}
else {
uVar5 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar5,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x23a
);
local_c = 1;
}
}
else {
uVar5 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",local_1c,uVar5,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x238);
local_c = 1;
}
return local_c;
}
|
|
14,763
|
inline_mysql_file_pread
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline size_t
inline_mysql_file_pread(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, uchar *buffer, size_t count, my_off_t offset, myf flags)
{
size_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
size_t bytes_read;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
result= my_pread(file, buffer, count, offset, flags);
if (flags & (MY_NABP | MY_FNABP))
bytes_read= (result == 0) ? count : 0;
else
bytes_read= (result != MY_FILE_ERROR) ? result : 0;
PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
return result;
}
#endif
result= my_pread(file, buffer, count, offset, flags);
return result;
}
|
O0
|
c
|
inline_mysql_file_pread:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x2717ac(%rip), %rax # 0x2c1158
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x88(%rbp), %rdi
movl $0x6, %edx
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4fabf
leaq 0x271762(%rip), %rax # 0x2c1158
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0xf59e0
movq %rax, -0x38(%rbp)
movq 0x10(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0x4fa6a
cmpq $0x0, -0x38(%rbp)
jne 0x4fa4f
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x4fa5a
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0x4fa5a
movq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x4fa97
cmpq $-0x1, -0x38(%rbp)
je 0x4fa7e
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x4fa89
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0x4fa89
movq -0xa0(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x2716ba(%rip), %rax # 0x2c1158
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4fae3
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0xf59e0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
|
inline_mysql_file_pread_2:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_88]
mov edx, 6
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz loc_4FABF
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
mov r8, [rbp+arg_0]
call my_pread
mov [rbp+var_38], rax
mov rax, [rbp+arg_0]
and rax, 6
cmp rax, 0
jz short loc_4FA6A
cmp [rbp+var_38], 0
jnz short loc_4FA4F
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
jmp short loc_4FA5A
loc_4FA4F:
xor eax, eax
mov [rbp+var_98], rax
jmp short $+2
loc_4FA5A:
mov rax, [rbp+var_98]
mov [rbp+var_90], rax
jmp short loc_4FA97
loc_4FA6A:
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jz short loc_4FA7E
mov rax, [rbp+var_38]
mov [rbp+var_A0], rax
jmp short loc_4FA89
loc_4FA7E:
xor eax, eax
mov [rbp+var_A0], rax
jmp short $+2
loc_4FA89:
mov rax, [rbp+var_A0]
mov [rbp+var_90], rax
loc_4FA97:
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_90]
call rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_4FAE3
loc_4FABF:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
mov r8, [rbp+arg_0]
call my_pread
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_4FAE3:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
|
long long inline_mysql_file_pread_2(
long long a1,
unsigned int a2,
unsigned int a3,
long long a4,
long long a5,
long long a6,
long long a7)
{
long long v8; // [rsp+0h] [rbp-A0h]
long long v9; // [rsp+8h] [rbp-98h]
_BYTE v10[72]; // [rsp+18h] [rbp-88h] BYREF
long long v11; // [rsp+60h] [rbp-40h]
long long v12; // [rsp+68h] [rbp-38h]
long long v13; // [rsp+70h] [rbp-30h]
long long v14; // [rsp+78h] [rbp-28h]
long long v15; // [rsp+80h] [rbp-20h]
unsigned int v16; // [rsp+88h] [rbp-18h]
unsigned int v17; // [rsp+8Ch] [rbp-14h]
long long v18; // [rsp+90h] [rbp-10h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = a5;
v13 = a6;
v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v10, a3, 6LL);
if ( v11 )
{
((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v11, v14, v18, v17);
v12 = my_pread(v16, v15, v14, v13, a7);
if ( (a7 & 6) != 0 )
{
if ( v12 )
v9 = 0LL;
else
v9 = v14;
((void ( *)(long long, long long))PSI_server[67])(v11, v9);
}
else
{
if ( v12 == -1 )
v8 = 0LL;
else
v8 = v12;
((void ( *)(long long, long long))PSI_server[67])(v11, v8);
}
return v12;
}
else
{
return my_pread(v16, v15, v14, v13, a7);
}
}
|
inline_mysql_file_pread:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x3c1158]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x88]
MOV EDX,0x6
CALL RAX
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0014fabf
LEA RAX,[0x3c1158]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV R8,qword ptr [RBP + 0x10]
CALL 0x001f59e0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + 0x10]
AND RAX,0x6
CMP RAX,0x0
JZ 0x0014fa6a
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0014fa4f
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x0014fa5a
LAB_0014fa4f:
XOR EAX,EAX
MOV qword ptr [RBP + -0x98],RAX
JMP 0x0014fa5a
LAB_0014fa5a:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x90],RAX
JMP 0x0014fa97
LAB_0014fa6a:
CMP qword ptr [RBP + -0x38],-0x1
JZ 0x0014fa7e
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x0014fa89
LAB_0014fa7e:
XOR EAX,EAX
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x0014fa89
LAB_0014fa89:
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x90],RAX
LAB_0014fa97:
LEA RAX,[0x3c1158]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x90]
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0014fae3
LAB_0014fabf:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV R8,qword ptr [RBP + 0x10]
CALL 0x001f59e0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_0014fae3:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xa0
POP RBP
RET
|
long inline_mysql_file_pread
(int8 param_1,int4 param_2,int4 param_3,int8 param_4,
long param_5,int8 param_6,ulong param_7)
{
long local_a8;
long local_a0;
long local_98;
int1 local_90 [72];
long local_48;
long local_40;
int8 local_38;
long local_30;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
long local_10;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,6);
if (local_48 == 0) {
local_10 = my_pread(local_20,local_28,local_30,local_38,param_7);
}
else {
(**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c);
local_40 = my_pread(local_20,local_28,local_30,local_38,param_7);
if ((param_7 & 6) == 0) {
local_a8 = local_40;
if (local_40 == -1) {
local_a8 = 0;
}
local_98 = local_a8;
}
else {
if (local_40 == 0) {
local_a0 = local_30;
}
else {
local_a0 = 0;
}
local_98 = local_a0;
}
(**(code **)(PSI_server + 0x218))(local_48,local_98);
local_10 = local_40;
}
return local_10;
}
|
|
14,764
|
inline_mysql_file_pread
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline size_t
inline_mysql_file_pread(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, uchar *buffer, size_t count, my_off_t offset, myf flags)
{
size_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
size_t bytes_read;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
result= my_pread(file, buffer, count, offset, flags);
if (flags & (MY_NABP | MY_FNABP))
bytes_read= (result == 0) ? count : 0;
else
bytes_read= (result != MY_FILE_ERROR) ? result : 0;
PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
return result;
}
#endif
result= my_pread(file, buffer, count, offset, flags);
return result;
}
|
O3
|
c
|
inline_mysql_file_pread:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
leaq 0x341640(%rip), %r13 # 0x3880c0
movq (%r13), %rax
leaq -0x70(%rbp), %rdi
movl %r15d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x46ac6
movl $0x4, %r8d
movl %r15d, %edi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xa158c
movq %rax, %r14
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movq (%r13), %rax
leaq 0x94102(%rip), %rdx # 0xdabd6
movq %r12, %rdi
movq %rbx, %rsi
movl $0x44b, %ecx # imm = 0x44B
callq *0x210(%rax)
movl $0x4, %r8d
movl %r15d, %edi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xa158c
movq %rax, %r14
testq %rax, %rax
movl $0x0, %esi
cmoveq %rbx, %rsi
movq (%r13), %rax
movq %r12, %rdi
callq *0x218(%rax)
jmp 0x46ab4
|
inline_mysql_file_pread:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdx
mov r14, rsi
mov r15d, edi
lea r13, PSI_server
mov rax, [r13+0]
lea rdi, [rbp+var_70]
mov esi, r15d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz short loc_46AC6
mov r8d, 4
mov edi, r15d
mov rsi, r14
mov rdx, rbx
xor ecx, ecx
call my_pread
mov r14, rax
loc_46AB4:
mov rax, r14
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_46AC6:
mov r12, rax
mov rax, [r13+0]
lea rdx, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r12
mov rsi, rbx
mov ecx, 44Bh
call qword ptr [rax+210h]
mov r8d, 4
mov edi, r15d
mov rsi, r14
mov rdx, rbx
xor ecx, ecx
call my_pread
mov r14, rax
test rax, rax
mov esi, 0
cmovz rsi, rbx
mov rax, [r13+0]
mov rdi, r12
call qword ptr [rax+218h]
jmp short loc_46AB4
|
long long inline_mysql_file_pread(unsigned int a1, long long a2, long long a3)
{
long long v4; // rax
long long v5; // r14
long long v7; // r12
long long v8; // rsi
_BYTE v9[112]; // [rsp+0h] [rbp-70h] BYREF
v4 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v9, a1, 6LL);
if ( !v4 )
return my_pread(a1, a2, a3, 0LL, 4LL);
v7 = v4;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v4,
a3,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c",
1099LL);
v5 = my_pread(a1, a2, a3, 0LL, 4LL);
v8 = 0LL;
if ( !v5 )
v8 = a3;
((void ( *)(long long, long long))PSI_server[67])(v7, v8);
return v5;
}
|
inline_mysql_file_pread:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDX
MOV R14,RSI
MOV R15D,EDI
LEA R13,[0x4880c0]
MOV RAX,qword ptr [R13]
LEA RDI,[RBP + -0x70]
MOV ESI,R15D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00146ac6
MOV R8D,0x4
MOV EDI,R15D
MOV RSI,R14
MOV RDX,RBX
XOR ECX,ECX
CALL 0x001a158c
MOV R14,RAX
LAB_00146ab4:
MOV RAX,R14
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00146ac6:
MOV R12,RAX
MOV RAX,qword ptr [R13]
LEA RDX,[0x1dabd6]
MOV RDI,R12
MOV RSI,RBX
MOV ECX,0x44b
CALL qword ptr [RAX + 0x210]
MOV R8D,0x4
MOV EDI,R15D
MOV RSI,R14
MOV RDX,RBX
XOR ECX,ECX
CALL 0x001a158c
MOV R14,RAX
TEST RAX,RAX
MOV ESI,0x0
CMOVZ RSI,RBX
MOV RAX,qword ptr [R13]
MOV RDI,R12
CALL qword ptr [RAX + 0x218]
JMP 0x00146ab4
|
long inline_mysql_file_pread(int4 param_1,int8 param_2,int8 param_3)
{
long lVar1;
long lVar2;
int8 uVar3;
int1 local_78 [72];
lVar1 = (**(code **)(PSI_server + 0x158))(local_78,param_1,6);
if (lVar1 == 0) {
lVar2 = my_pread(param_1,param_2,param_3,0,4);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar1,param_3,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c",
1099);
lVar2 = my_pread(param_1,param_2,param_3,0,4);
uVar3 = 0;
if (lVar2 == 0) {
uVar3 = param_3;
}
(**(code **)(PSI_server + 0x218))(lVar1,uVar3);
}
return lVar2;
}
|
|
14,765
|
my_strnncollsp_nchars_binary
|
eloqsql/strings/ctype-bin.c
|
static int my_strnncollsp_nchars_binary(CHARSET_INFO * cs __attribute__((unused)),
const uchar *s, size_t slen,
const uchar *t, size_t tlen,
size_t nchars)
{
set_if_smaller(slen, nchars);
set_if_smaller(tlen, nchars);
return my_strnncoll_binary(cs, s, slen, t, tlen, 0);
}
|
O3
|
c
|
my_strnncollsp_nchars_binary:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %r9, %rbx
movq %rdx, %r14
cmpq %r9, %rdx
cmovaeq %r9, %r14
movq %rsi, %rdi
cmpq %r9, %r8
cmovbq %r8, %rbx
cmpq %rbx, %r14
movq %rbx, %rdx
cmovbq %r14, %rdx
movq %rcx, %rsi
callq 0x28140
subl %ebx, %r14d
testl %eax, %eax
cmovel %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
|
my_strnncollsp_nchars_binary:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, r9
mov r14, rdx
cmp rdx, r9
cmovnb r14, r9
mov rdi, rsi
cmp r8, r9
cmovb rbx, r8
cmp r14, rbx
mov rdx, rbx
cmovb rdx, r14
mov rsi, rcx
call _memcmp
sub r14d, ebx
test eax, eax
cmovz eax, r14d
pop rbx
pop r14
pop rbp
retn
|
long long my_strnncollsp_nchars_binary(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
unsigned long long a6)
{
unsigned long long v6; // rbx
unsigned long long v7; // r14
unsigned long long v8; // rdx
long long result; // rax
unsigned int v10; // r14d
v6 = a6;
v7 = a3;
if ( a3 >= a6 )
v7 = a6;
if ( a5 < a6 )
v6 = a5;
v8 = v6;
if ( v7 < v6 )
v8 = v7;
result = memcmp(a2, a4, v8);
v10 = v7 - v6;
if ( !(_DWORD)result )
return v10;
return result;
}
|
my_strnncollsp_nchars_binary:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,R9
MOV R14,RDX
CMP RDX,R9
CMOVNC R14,R9
MOV RDI,RSI
CMP R8,R9
CMOVC RBX,R8
CMP R14,RBX
MOV RDX,RBX
CMOVC RDX,R14
MOV RSI,RCX
CALL 0x00128140
SUB R14D,EBX
TEST EAX,EAX
CMOVZ EAX,R14D
POP RBX
POP R14
POP RBP
RET
|
int my_strnncollsp_nchars_binary
(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
ulong param_6)
{
int iVar1;
ulong __n;
if (param_6 <= param_3) {
param_3 = param_6;
}
if (param_5 < param_6) {
param_6 = param_5;
}
__n = param_6;
if (param_3 < param_6) {
__n = param_3;
}
iVar1 = memcmp(param_2,param_4,__n);
if (iVar1 == 0) {
iVar1 = (int)param_3 - (int)param_6;
}
return iVar1;
}
|
|
14,766
|
pvio_socket_read
|
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
|
ssize_t pvio_socket_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length)
{
ssize_t r;
int read_flags= MSG_DONTWAIT;
struct st_pvio_socket *csock;
int timeout;
if (!pvio || !pvio->data)
return -1;
csock= (struct st_pvio_socket *)pvio->data;
timeout = pvio->timeout[PVIO_READ_TIMEOUT];
while ((r = ma_recv(csock->socket, (void *)buffer, length, read_flags)) == -1)
{
int err = socket_errno;
if ((err != SOCKET_EAGAIN
#ifdef HAVE_SOCKET_EWOULDBLOCK
&& err != SOCKET_EWOULDBLOCK
#endif
) || timeout == 0)
return r;
if (pvio_socket_wait_io_or_timeout(pvio, TRUE, timeout) < 1)
return -1;
}
return r;
}
|
O3
|
c
|
pvio_socket_read:
movq $-0x1, %rax
testq %rdi, %rdi
je 0x2e7cd
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x2e7bf
movq %rdx, %r14
movq %rsi, %r15
movl 0x28(%r12), %r13d
movl %r13d, -0x2c(%rbp)
movl (%rbx), %r13d
movl %r13d, %edi
movq %r15, %rsi
movq %r14, %rdx
movl $0x40, %ecx
callq 0x13170
cmpq $-0x1, %rax
jne 0x2e7bf
callq 0x13060
movl (%rax), %eax
cmpl $0x4, %eax
je 0x2e771
cmpl $0xb, %eax
jne 0x2e7b8
movl -0x2c(%rbp), %r13d
testl %r13d, %r13d
je 0x2e7b8
movq %r12, %rdi
movl $0x1, %esi
movl %r13d, %edx
callq 0x2e890
testl %eax, %eax
jg 0x2e76e
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
pvio_socket_read:
mov rax, 0FFFFFFFFFFFFFFFFh
test rdi, rdi
jz locret_2E7CD
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rdi
mov rbx, [rdi]
test rbx, rbx
jz short loc_2E7BF
mov r14, rdx
mov r15, rsi
mov r13d, [r12+28h]
mov [rbp-2Ch], r13d
loc_2E76E:
mov r13d, [rbx]
loc_2E771:
mov edi, r13d
mov rsi, r15
mov rdx, r14
mov ecx, 40h ; '@'
call _recv
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_2E7BF
call ___errno_location
mov eax, [rax]
cmp eax, 4
jz short loc_2E771
cmp eax, 0Bh
jnz short loc_2E7B8
mov r13d, [rbp-2Ch]
test r13d, r13d
jz short loc_2E7B8
mov rdi, r12
mov esi, 1
mov edx, r13d
call pvio_socket_wait_io_or_timeout
test eax, eax
jg short loc_2E76E
loc_2E7B8:
mov rax, 0FFFFFFFFFFFFFFFFh
loc_2E7BF:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_2E7CD:
retn
|
long long pvio_socket_read(long long a1, long long a2, long long a3)
{
long long result; // rax
unsigned int *v4; // rbx
unsigned int v6; // r13d
int v7; // eax
unsigned int v8; // [rsp-34h] [rbp-34h]
result = -1LL;
if ( a1 )
{
v4 = *(unsigned int **)a1;
if ( *(_QWORD *)a1 )
{
v8 = *(_DWORD *)(a1 + 40);
LABEL_4:
v6 = *v4;
while ( 1 )
{
result = recv(v6, a2, a3, 64LL);
if ( result != -1 )
break;
v7 = *(_DWORD *)__errno_location(v6);
if ( v7 != 4 )
{
if ( v7 != 11 || !v8 || (int)pvio_socket_wait_io_or_timeout(a1, 1LL, v8) <= 0 )
return -1LL;
goto LABEL_4;
}
}
}
}
return result;
}
|
pvio_socket_read:
MOV RAX,-0x1
TEST RDI,RDI
JZ 0x0012e7cd
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RDI
MOV RBX,qword ptr [RDI]
TEST RBX,RBX
JZ 0x0012e7bf
MOV R14,RDX
MOV R15,RSI
MOV R13D,dword ptr [R12 + 0x28]
MOV dword ptr [RBP + -0x2c],R13D
LAB_0012e76e:
MOV R13D,dword ptr [RBX]
LAB_0012e771:
MOV EDI,R13D
MOV RSI,R15
MOV RDX,R14
MOV ECX,0x40
CALL 0x00113170
CMP RAX,-0x1
JNZ 0x0012e7bf
CALL 0x00113060
MOV EAX,dword ptr [RAX]
CMP EAX,0x4
JZ 0x0012e771
CMP EAX,0xb
JNZ 0x0012e7b8
MOV R13D,dword ptr [RBP + -0x2c]
TEST R13D,R13D
JZ 0x0012e7b8
MOV RDI,R12
MOV ESI,0x1
MOV EDX,R13D
CALL 0x0012e890
TEST EAX,EAX
JG 0x0012e76e
LAB_0012e7b8:
MOV RAX,-0x1
LAB_0012e7bf:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_0012e7cd:
RET
|
ssize_t pvio_socket_read(int8 *param_1,void *param_2,size_t param_3)
{
int iVar1;
int *piVar2;
int iVar3;
ssize_t sVar4;
int *piVar5;
if ((param_1 != (int8 *)0x0) && (piVar2 = (int *)*param_1, piVar2 != (int *)0x0)) {
iVar1 = *(int *)(param_1 + 5);
do {
iVar3 = *piVar2;
do {
sVar4 = recv(iVar3,param_2,param_3,0x40);
if (sVar4 != -1) {
return sVar4;
}
piVar5 = __errno_location();
} while (*piVar5 == 4);
} while (((*piVar5 == 0xb) && (iVar1 != 0)) &&
(iVar3 = pvio_socket_wait_io_or_timeout(param_1,1,iVar1), 0 < iVar3));
}
return -1;
}
|
|
14,767
|
maria_ft_simple_get_word
|
eloqsql/storage/maria/ma_ft_parser.c
|
uchar maria_ft_simple_get_word(CHARSET_INFO *cs, uchar **start,
const uchar *end, FT_WORD *word,
my_bool skip_stopwords)
{
uchar *doc= *start;
uint mwc, length;
int ctype, mbl;
DBUG_ENTER("maria_ft_simple_get_word");
do
{
for (;; doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1)))
{
if (doc >= end)
DBUG_RETURN(0);
mbl= my_ci_ctype(cs, &ctype, doc, end);
if (true_word_char(ctype, *doc))
break;
}
mwc= length= 0;
for (word->pos= doc; doc < end; length++,
doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1)))
{
mbl= my_ci_ctype(cs, &ctype, doc, end);
if (true_word_char(ctype, *doc))
mwc= 0;
else if (!misc_word_char(*doc) || mwc)
break;
else
mwc++;
}
word->len= (uint)(doc-word->pos) - mwc;
if (skip_stopwords == FALSE ||
(length >= ft_min_word_len && length < ft_max_word_len &&
!is_stopword((char *) word->pos, word->len)))
{
*start= doc;
DBUG_RETURN(1);
}
} while (doc < end);
DBUG_RETURN(0);
}
|
O0
|
c
|
maria_ft_simple_get_word:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movb %al, -0x29(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x7897b
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x78990
jmp 0x78987
movb $0x0, -0x1(%rbp)
jmp 0x78b51
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x44(%rbp), %rsi
callq *%rax
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %eax
andl $0x7, %eax
cmpl $0x0, %eax
jne 0x789cb
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5f, %eax
jne 0x789cd
jmp 0x78a13
jmp 0x789cf
cmpl $0x0, -0x48(%rbp)
jle 0x789dd
movl -0x48(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x789fd
cmpl $0x0, -0x48(%rbp)
jge 0x789ed
xorl %eax, %eax
subl -0x48(%rbp), %eax
movl %eax, -0x50(%rbp)
jmp 0x789f7
movl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x789f7
movl -0x50(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x7897b
movl $0x0, -0x40(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x78acf
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x44(%rbp), %rsi
callq *%rax
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %eax
andl $0x7, %eax
cmpl $0x0, %eax
jne 0x78a75
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5f, %eax
jne 0x78a7e
movl $0x0, -0x3c(%rbp)
jmp 0x78a80
jmp 0x78acf
jmp 0x78a82
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x48(%rbp)
jle 0x78a99
movl -0x48(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x78ab9
cmpl $0x0, -0x48(%rbp)
jge 0x78aa9
xorl %eax, %eax
subl -0x48(%rbp), %eax
movl %eax, -0x58(%rbp)
jmp 0x78ab3
movl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x78ab3
movl -0x58(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x78a2c
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
subl -0x3c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movsbl -0x29(%rbp), %eax
cmpl $0x0, %eax
je 0x78b2a
movl -0x40(%rbp), %eax
leaq 0x2476e4(%rip), %rcx # 0x2c01e0
cmpq (%rcx), %rax
jb 0x78b3b
movl -0x40(%rbp), %eax
leaq 0x2476dd(%rip), %rcx # 0x2c01e8
cmpq (%rcx), %rax
jae 0x78b3b
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x9f740
cmpl $0x0, %eax
jne 0x78b3b
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x78b51
jmp 0x78b3d
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x78979
jmp 0x78b4d
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
maria_ft_simple_get_word:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, r8b
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_29], al
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_38], rax
loc_78979:
jmp short $+2
loc_7897B:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
jb short loc_78990
jmp short $+2
loc_78987:
mov [rbp+var_1], 0
jmp loc_78B51
loc_78990:
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+38h]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_20]
lea rsi, [rbp+var_44]
call rax
mov [rbp+var_48], eax
mov eax, [rbp+var_44]
and eax, 7
cmp eax, 0
jnz short loc_789CB
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
cmp eax, 5Fh ; '_'
jnz short loc_789CD
loc_789CB:
jmp short loc_78A13
loc_789CD:
jmp short $+2
loc_789CF:
cmp [rbp+var_48], 0
jle short loc_789DD
mov eax, [rbp+var_48]
mov [rbp+var_4C], eax
jmp short loc_789FD
loc_789DD:
cmp [rbp+var_48], 0
jge short loc_789ED
xor eax, eax
sub eax, [rbp+var_48]
mov [rbp+var_50], eax
jmp short loc_789F7
loc_789ED:
mov eax, 1
mov [rbp+var_50], eax
jmp short $+2
loc_789F7:
mov eax, [rbp+var_50]
mov [rbp+var_4C], eax
loc_789FD:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_38]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_38], rax
jmp loc_7897B
loc_78A13:
mov [rbp+var_40], 0
mov [rbp+var_3C], 0
mov rcx, [rbp+var_38]
mov rax, [rbp+var_28]
mov [rax], rcx
loc_78A2C:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
jnb loc_78ACF
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+38h]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_20]
lea rsi, [rbp+var_44]
call rax
mov [rbp+var_48], eax
mov eax, [rbp+var_44]
and eax, 7
cmp eax, 0
jnz short loc_78A75
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
cmp eax, 5Fh ; '_'
jnz short loc_78A7E
loc_78A75:
mov [rbp+var_3C], 0
jmp short loc_78A80
loc_78A7E:
jmp short loc_78ACF
loc_78A80:
jmp short $+2
loc_78A82:
mov eax, [rbp+var_40]
add eax, 1
mov [rbp+var_40], eax
cmp [rbp+var_48], 0
jle short loc_78A99
mov eax, [rbp+var_48]
mov [rbp+var_54], eax
jmp short loc_78AB9
loc_78A99:
cmp [rbp+var_48], 0
jge short loc_78AA9
xor eax, eax
sub eax, [rbp+var_48]
mov [rbp+var_58], eax
jmp short loc_78AB3
loc_78AA9:
mov eax, 1
mov [rbp+var_58], eax
jmp short $+2
loc_78AB3:
mov eax, [rbp+var_58]
mov [rbp+var_54], eax
loc_78AB9:
mov ecx, [rbp+var_54]
mov rax, [rbp+var_38]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_38], rax
jmp loc_78A2C
loc_78ACF:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_28]
mov rcx, [rcx]
sub rax, rcx
mov ecx, eax
sub ecx, [rbp+var_3C]
mov rax, [rbp+var_28]
mov [rax+8], ecx
movsx eax, [rbp+var_29]
cmp eax, 0
jz short loc_78B2A
mov eax, [rbp+var_40]
lea rcx, ft_min_word_len
cmp rax, [rcx]
jb short loc_78B3B
mov eax, [rbp+var_40]
lea rcx, ft_max_word_len
cmp rax, [rcx]
jnb short loc_78B3B
mov rax, [rbp+var_28]
mov rdi, [rax]
mov rax, [rbp+var_28]
mov eax, [rax+8]
mov esi, eax
call is_stopword
cmp eax, 0
jnz short loc_78B3B
loc_78B2A:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_1], 1
jmp short loc_78B51
loc_78B3B:
jmp short $+2
loc_78B3D:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
jb loc_78979
jmp short $+2
loc_78B4D:
mov [rbp+var_1], 0
loc_78B51:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
|
char maria_ft_simple_get_word(long long a1, _BYTE **a2, unsigned long long a3, long long a4, char a5)
{
int v6; // [rsp+8h] [rbp-58h]
int v7; // [rsp+Ch] [rbp-54h]
int v8; // [rsp+10h] [rbp-50h]
int v9; // [rsp+14h] [rbp-4Ch]
int v10; // [rsp+18h] [rbp-48h]
int v11; // [rsp+18h] [rbp-48h]
int v12; // [rsp+1Ch] [rbp-44h] BYREF
unsigned int v13; // [rsp+20h] [rbp-40h]
int v14; // [rsp+24h] [rbp-3Ch]
_BYTE *v15; // [rsp+28h] [rbp-38h]
char v16; // [rsp+37h] [rbp-29h]
long long v17; // [rsp+38h] [rbp-28h]
unsigned long long v18; // [rsp+40h] [rbp-20h]
_QWORD *v19; // [rsp+48h] [rbp-18h]
long long v20; // [rsp+50h] [rbp-10h]
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v15 = *a2;
do
{
while ( 1 )
{
if ( (unsigned long long)v15 >= v18 )
return 0;
v10 = (*(long long ( **)(long long, int *, _BYTE *, unsigned long long))(*(_QWORD *)(v20 + 184) + 56LL))(
v20,
&v12,
v15,
v18);
if ( (v12 & 7) != 0 || *v15 == 95 )
break;
if ( v10 <= 0 )
{
if ( v10 >= 0 )
v8 = 1;
else
v8 = -v10;
v9 = v8;
}
else
{
v9 = v10;
}
v15 += v9;
}
v13 = 0;
v14 = 0;
*(_QWORD *)v17 = v15;
while ( (unsigned long long)v15 < v18 )
{
v11 = (*(long long ( **)(long long, int *, _BYTE *, unsigned long long))(*(_QWORD *)(v20 + 184) + 56LL))(
v20,
&v12,
v15,
v18);
if ( (v12 & 7) == 0 && *v15 != 95 )
break;
v14 = 0;
++v13;
if ( v11 <= 0 )
{
if ( v11 >= 0 )
v6 = 1;
else
v6 = -v11;
v7 = v6;
}
else
{
v7 = v11;
}
v15 += v7;
}
*(_DWORD *)(v17 + 8) = (_DWORD)v15 - *(_QWORD *)v17 - v14;
if ( !v16
|| (unsigned long long)v13 >= ft_min_word_len
&& (unsigned long long)v13 < ft_max_word_len
&& !(unsigned int)is_stopword(*(_QWORD *)v17, *(unsigned int *)(v17 + 8)) )
{
*v19 = v15;
return 1;
}
}
while ( (unsigned long long)v15 < v18 );
return 0;
}
|
maria_ft_simple_get_word:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,R8B
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 byte ptr [RBP + -0x29],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
LAB_00178979:
JMP 0x0017897b
LAB_0017897b:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x00178990
JMP 0x00178987
LAB_00178987:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00178b51
LAB_00178990:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x38]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x44]
CALL RAX
MOV dword ptr [RBP + -0x48],EAX
MOV EAX,dword ptr [RBP + -0x44]
AND EAX,0x7
CMP EAX,0x0
JNZ 0x001789cb
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x5f
JNZ 0x001789cd
LAB_001789cb:
JMP 0x00178a13
LAB_001789cd:
JMP 0x001789cf
LAB_001789cf:
CMP dword ptr [RBP + -0x48],0x0
JLE 0x001789dd
MOV EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x001789fd
LAB_001789dd:
CMP dword ptr [RBP + -0x48],0x0
JGE 0x001789ed
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x50],EAX
JMP 0x001789f7
LAB_001789ed:
MOV EAX,0x1
MOV dword ptr [RBP + -0x50],EAX
JMP 0x001789f7
LAB_001789f7:
MOV EAX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x4c],EAX
LAB_001789fd:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0017897b
LAB_00178a13:
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x3c],0x0
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
LAB_00178a2c:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00178acf
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x38]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x44]
CALL RAX
MOV dword ptr [RBP + -0x48],EAX
MOV EAX,dword ptr [RBP + -0x44]
AND EAX,0x7
CMP EAX,0x0
JNZ 0x00178a75
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x5f
JNZ 0x00178a7e
LAB_00178a75:
MOV dword ptr [RBP + -0x3c],0x0
JMP 0x00178a80
LAB_00178a7e:
JMP 0x00178acf
LAB_00178a80:
JMP 0x00178a82
LAB_00178a82:
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,0x1
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x48],0x0
JLE 0x00178a99
MOV EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x00178ab9
LAB_00178a99:
CMP dword ptr [RBP + -0x48],0x0
JGE 0x00178aa9
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x58],EAX
JMP 0x00178ab3
LAB_00178aa9:
MOV EAX,0x1
MOV dword ptr [RBP + -0x58],EAX
JMP 0x00178ab3
LAB_00178ab3:
MOV EAX,dword ptr [RBP + -0x58]
MOV dword ptr [RBP + -0x54],EAX
LAB_00178ab9:
MOV ECX,dword ptr [RBP + -0x54]
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00178a2c
LAB_00178acf:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RCX]
SUB RAX,RCX
MOV ECX,EAX
SUB ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x8],ECX
MOVSX EAX,byte ptr [RBP + -0x29]
CMP EAX,0x0
JZ 0x00178b2a
MOV EAX,dword ptr [RBP + -0x40]
LEA RCX,[0x3c01e0]
CMP RAX,qword ptr [RCX]
JC 0x00178b3b
MOV EAX,dword ptr [RBP + -0x40]
LEA RCX,[0x3c01e8]
CMP RAX,qword ptr [RCX]
JNC 0x00178b3b
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x8]
MOV ESI,EAX
CALL 0x0019f740
CMP EAX,0x0
JNZ 0x00178b3b
LAB_00178b2a:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00178b51
LAB_00178b3b:
JMP 0x00178b3d
LAB_00178b3d:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x00178979
JMP 0x00178b4d
LAB_00178b4d:
MOV byte ptr [RBP + -0x1],0x0
LAB_00178b51:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int1
maria_ft_simple_get_word
(long param_1,int8 *param_2,char *param_3,int8 *param_4,char param_5)
{
int iVar1;
int local_60;
int local_5c;
int local_58;
int local_54;
uint local_4c;
uint local_48;
int local_44;
char *local_40;
char local_31;
int8 *local_30;
char *local_28;
int8 *local_20;
long local_18;
local_40 = (char *)*param_2;
local_31 = param_5;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
while( true ) {
while( true ) {
if (local_28 <= local_40) {
return 0;
}
local_54 = (**(code **)(*(long *)(local_18 + 0xb8) + 0x38))
(local_18,&local_4c,local_40,local_28);
if (((local_4c & 7) != 0) || (*local_40 == '_')) break;
if (local_54 < 1) {
if (local_54 < 0) {
local_58 = -local_54;
}
else {
local_58 = 1;
}
local_54 = local_58;
}
local_40 = local_40 + local_54;
}
local_48 = 0;
*local_30 = local_40;
while ((local_44 = 0, local_40 < local_28 &&
((local_5c = (**(code **)(*(long *)(local_18 + 0xb8) + 0x38))
(local_18,&local_4c,local_40,local_28), (local_4c & 7) != 0 ||
(*local_40 == '_'))))) {
local_48 = local_48 + 1;
if (local_5c < 1) {
if (local_5c < 0) {
local_60 = -local_5c;
}
else {
local_60 = 1;
}
local_5c = local_60;
}
local_40 = local_40 + local_5c;
}
*(int *)(local_30 + 1) = ((int)local_40 - (int)*local_30) - local_44;
if ((local_31 == '\0') ||
(((ft_min_word_len <= local_48 && (local_48 < ft_max_word_len)) &&
(iVar1 = is_stopword(*local_30,*(int4 *)(local_30 + 1)), iVar1 == 0)))) break;
if (local_28 <= local_40) {
return 0;
}
}
*local_20 = local_40;
return 1;
}
|
|
14,768
|
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>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>&&, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<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>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>&&, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x1b400
addq 0x8(%r14), %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1be10
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c1a0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x1b270
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0xbcab5
movq (%r12), %rsi
incq %rsi
callq 0x1b910
movq %r14, %rdi
callq 0x1c030
|
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA39_KcS8_EEET_DpOT0_:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
call _strlen
add rax, [r14+8]
mov rdi, rbx
mov rsi, rax
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 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 r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_BCAB5
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BCAB5:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[39],std::string>(
long long a1,
long long a2,
_QWORD *a3)
{
long long v4; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v4 = strlen(a2);
std::string::reserve(a1, a3[1] + v4);
std::string::append(a1, a2);
std::string::_M_append(a1, *a3, a3[1]);
return a1;
}
|
concat<std::__cxx11::string,char_const(&)[39],std::__cxx11::string>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
CALL 0x0011b400
ADD RAX,qword ptr [R14 + 0x8]
LAB_001bca6a:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011be10
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011c1a0
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x0011b270
LAB_001bca8f:
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
(&) [39], std::__cxx11::string >(char const (&) [39], std::__cxx11::string&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[39],std::__cxx11::string>
(detail *this,char *param_1,string *param_2)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
strlen(param_1);
/* try { // try from 001bca6a to 001bca8e has its CatchHandler @ 001bca9e */
std::__cxx11::string::reserve((ulong)this);
std::__cxx11::string::append((char *)this);
std::__cxx11::string::_M_append((char *)this,*(ulong *)param_2);
return this;
}
|
|
14,769
|
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>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>&&, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<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>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>&&, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
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
movq %r8, %rcx
callq 0x8bc2b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24e10
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x8bc61
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x25288
movq %r14, %rdi
callq 0x25020
|
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcS8_RA5_S9_S8_EEET_DpOT0_:
push r15
push r14
push r13
push r12
push rbx
mov r14, r8
mov r15, rcx
mov r12, rdx
mov r13, 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
mov rcx, r8
call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA5_cS8_EEEmPKcDpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<std::string,char [5],std::string>(char const*,std::string,char [5],std::string const&)
mov rdi, rbx
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r13
mov rdx, r12
mov rcx, r15
mov r8, r14
call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA29_KcJS8_RA5_S9_S8_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_
mov rax, rbx
pop rbx
pop r12
pop r13
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(&)[29],std::string,char const(&)[5],std::string>(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5)
{
long long v8; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v8 = nlohmann::json_abi_v3_11_3::detail::concat_length<std::string,char [5],std::string>(a2, a3, a4, a5);
std::string::reserve(a1, v8);
ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA29_KcJS8_RA5_S9_S8_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_(
a1,
a2,
a3,
a4,
a5);
return a1;
}
|
concat<std::__cxx11::string,char_const(&)[29],std::__cxx11::string,char_const(&)[5],std::__cxx11::string>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV R13,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_0018bb38:
MOV RDI,RSI
MOV RSI,RDX
MOV RDX,RCX
MOV RCX,R8
CALL 0x0018bc2b
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00124e10
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
MOV RCX,R15
MOV R8,R14
CALL 0x0018bc61
LAB_0018bb68:
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
(&) [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;
/* try { // try from 0018bb38 to 0018bb67 has its CatchHandler @ 0018bb75 */
concat_length<std::__cxx11::string,char[5],std::__cxx11::string>(param_1,param_2,param_3,param_4);
std::__cxx11::string::reserve((ulong)this);
_ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA29_KcJS8_RA5_S9_S8_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_
(this,param_1,param_2,param_3,param_4);
return this;
}
|
|
14,770
|
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>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>&&, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<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>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>&&, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x1b400
addq 0x8(%r14), %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1be10
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c1a0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x1b270
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0xbc39d
movq (%r12), %rsi
incq %rsi
callq 0x1b910
movq %r14, %rdi
callq 0x1c030
|
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA39_KcS8_EEET_DpOT0_:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
call _strlen
add rax, [r14+8]
mov rdi, rbx
mov rsi, rax
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 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 r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_BC39D
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BC39D:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[39],std::string>(
long long a1,
long long a2,
_QWORD *a3)
{
long long v4; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v4 = strlen(a2);
std::string::reserve(a1, a3[1] + v4);
std::string::append(a1, a2);
std::string::_M_append(a1, *a3, a3[1]);
return a1;
}
|
concat<std::__cxx11::string,char_const(&)[39],std::__cxx11::string>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
CALL 0x0011b400
ADD RAX,qword ptr [R14 + 0x8]
LAB_001bc352:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011be10
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011c1a0
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x0011b270
LAB_001bc377:
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
(&) [39], std::__cxx11::string >(char const (&) [39], std::__cxx11::string&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[39],std::__cxx11::string>
(detail *this,char *param_1,string *param_2)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
strlen(param_1);
/* try { // try from 001bc352 to 001bc376 has its CatchHandler @ 001bc386 */
std::__cxx11::string::reserve((ulong)this);
std::__cxx11::string::append((char *)this);
std::__cxx11::string::_M_append((char *)this,*(ulong *)param_2);
return this;
}
|
|
14,771
|
quantize_q2_K
|
ngxson[P]ggml-easy/ggml/src/ggml-quants.c
|
size_t quantize_q2_K(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) {
size_t row_size = ggml_row_size(GGML_TYPE_Q2_K, n_per_row);
if (!quant_weights) {
quantize_row_q2_K_ref(src, dst, (int64_t)nrow*n_per_row);
}
else {
char * qrow = (char *)dst;
for (int64_t row = 0; row < nrow; ++row) {
quantize_row_q2_K_impl(src, (block_q2_K*)qrow, n_per_row, quant_weights);
src += n_per_row;
qrow += row_size;
}
}
return nrow * row_size;
}
|
O0
|
c
|
quantize_q2_K:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq 0x28(%rsp), %rsi
movl $0xa, %edi
callq 0x45820
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x712e5
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
imulq 0x28(%rsp), %rdx
callq 0x47520
jmp 0x71353
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x30(%rsp), %rax
jge 0x71351
movq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x28(%rsp), %rax
movl %eax, %edx
movq 0x20(%rsp), %rcx
callq 0x71370
movq 0x28(%rsp), %rax
shlq $0x2, %rax
addq 0x40(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x18(%rsp), %rax
addq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x712f8
jmp 0x71353
movq 0x30(%rsp), %rax
imulq 0x18(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
|
quantize_q2_K:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_20], rcx
mov [rsp+48h+var_28], r8
mov rsi, [rsp+48h+var_20]
mov edi, 0Ah
call _ggml_row_size
mov [rsp+48h+var_30], rax
cmp [rsp+48h+var_28], 0
jnz short loc_712E5
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_18]
imul rdx, [rsp+48h+var_20]
call _quantize_row_q2_K_ref
jmp short loc_71353
loc_712E5:
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_40], 0
loc_712F8:
mov rax, [rsp+48h+var_40]
cmp rax, [rsp+48h+var_18]
jge short loc_71351
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_38]
mov rax, [rsp+48h+var_20]
mov edx, eax
mov rcx, [rsp+48h+var_28]
call quantize_row_q2_K_impl
mov rax, [rsp+48h+var_20]
shl rax, 2
add rax, [rsp+48h+var_8]
mov [rsp+48h+var_8], rax
mov rax, [rsp+48h+var_30]
add rax, [rsp+48h+var_38]
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_40]
add rax, 1
mov [rsp+48h+var_40], rax
jmp short loc_712F8
loc_71351:
jmp short $+2
loc_71353:
mov rax, [rsp+48h+var_18]
imul rax, [rsp+48h+var_30]
add rsp, 48h
retn
|
unsigned long long quantize_q2_K(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long i; // [rsp+8h] [rbp-40h]
long long v7; // [rsp+10h] [rbp-38h]
unsigned long long v8; // [rsp+18h] [rbp-30h]
long long v12; // [rsp+40h] [rbp-8h]
v12 = a1;
v8 = ggml_row_size(0xAu, a4);
if ( a5 )
{
v7 = a2;
for ( i = 0LL; i < a3; ++i )
{
quantize_row_q2_K_impl(v12, v7, (unsigned int)a4, a5);
v12 += 4 * a4;
v7 += v8;
}
}
else
{
quantize_row_q2_K_ref(a1, a2, a4 * a3);
}
return v8 * a3;
}
|
quantize_q2_K:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [RSP + 0x20],R8
MOV RSI,qword ptr [RSP + 0x28]
MOV EDI,0xa
CALL 0x00145820
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x20],0x0
JNZ 0x001712e5
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x30]
IMUL RDX,qword ptr [RSP + 0x28]
CALL 0x00147520
JMP 0x00171353
LAB_001712e5:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x8],0x0
LAB_001712f8:
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,qword ptr [RSP + 0x30]
JGE 0x00171351
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x28]
MOV EDX,EAX
MOV RCX,qword ptr [RSP + 0x20]
CALL 0x00171370
MOV RAX,qword ptr [RSP + 0x28]
SHL RAX,0x2
ADD RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x1
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001712f8
LAB_00171351:
JMP 0x00171353
LAB_00171353:
MOV RAX,qword ptr [RSP + 0x30]
IMUL RAX,qword ptr [RSP + 0x18]
ADD RSP,0x48
RET
|
long quantize_q2_K(long param_1,long param_2,long param_3,ulong param_4,long param_5)
{
long lVar1;
int8 local_40;
int8 local_38;
int8 local_8;
lVar1 = ggml_row_size(10,param_4);
if (param_5 == 0) {
quantize_row_q2_K_ref(param_1,param_2,param_3 * param_4);
}
else {
local_38 = param_2;
local_8 = param_1;
for (local_40 = 0; local_40 < param_3; local_40 = local_40 + 1) {
quantize_row_q2_K_impl(local_8,local_38,param_4 & 0xffffffff,param_5);
local_8 = param_4 * 4 + local_8;
local_38 = lVar1 + local_38;
}
}
return param_3 * lVar1;
}
|
|
14,772
|
quantize_q2_K
|
ngxson[P]ggml-easy/ggml/src/ggml-quants.c
|
size_t quantize_q2_K(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) {
size_t row_size = ggml_row_size(GGML_TYPE_Q2_K, n_per_row);
if (!quant_weights) {
quantize_row_q2_K_ref(src, dst, (int64_t)nrow*n_per_row);
}
else {
char * qrow = (char *)dst;
for (int64_t row = 0; row < nrow; ++row) {
quantize_row_q2_K_impl(src, (block_q2_K*)qrow, n_per_row, quant_weights);
src += n_per_row;
qrow += row_size;
}
}
return nrow * row_size;
}
|
O2
|
c
|
quantize_q2_K:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp # imm = 0x2B8
movq %r8, %r13
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
pushq $0xa
popq %rdi
movq %rcx, %rsi
callq 0x1e1b0
movq %rax, 0x10(%rsp)
movq %r13, 0x28(%rsp)
testq %r13, %r13
je 0x320f3
movl $0x100, %ecx # imm = 0x100
movl %r14d, %eax
cltd
idivl %ecx
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
movq %rax, 0x58(%rsp)
testq %rbx, %rbx
movl $0x0, %eax
cmovgq %rbx, %rax
movq %rax, 0x30(%rsp)
leaq 0x10(%r12), %rax
movq %rbx, 0x20(%rsp)
movq %r14, 0x18(%rsp)
cmpq 0x30(%rsp), %rcx
je 0x32105
movq %rcx, 0x40(%rsp)
movq %rax, 0x38(%rsp)
movq %rax, %r11
movq %r12, %r14
movq 0x28(%rsp), %rbx
xorl %ebp, %ebp
movq %r15, 0x48(%rsp)
movq %r15, %r13
movq %r12, 0x50(%rsp)
cmpq 0x58(%rsp), %rbp
je 0x320c0
xorps %xmm0, %xmm0
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
xorps %xmm1, %xmm1
xorl %eax, %eax
cmpq $0x100, %rax # imm = 0x100
je 0x31dcb
movss (%r13,%rax,4), %xmm0
mulss %xmm0, %xmm0
addss %xmm0, %xmm1
incq %rax
jmp 0x31daf
movq %rbp, 0x60(%rsp)
movq %r14, 0x70(%rsp)
movq %r11, 0x78(%rsp)
mulss 0x1d86e(%rip), %xmm1 # 0x4f650
movq %rbx, 0x68(%rsp)
movq %r13, %r14
xorl %ebp, %ebp
movss %xmm1, 0x8(%rsp)
cmpq $0x10, %rbp
je 0x31eda
movq %rbp, %r15
shlq $0x4, %r15
xorl %r12d, %r12d
cmpq $0x10, %r12
je 0x31e59
movss (%rbx,%r12,4), %xmm2
movss (%r14,%r12,4), %xmm0
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
ucomiss 0x1d801(%rip), %xmm0 # 0x4f628
jb 0x31e2f
sqrtss %xmm0, %xmm0
jmp 0x31e46
movss %xmm2, 0xc(%rsp)
callq 0x1eae0
movss 0xc(%rsp), %xmm2
movss 0x8(%rsp), %xmm1
mulss %xmm0, %xmm2
movss %xmm2, 0xf0(%rsp,%r12,4)
incq %r12
jmp 0x31e06
movss 0xa0(%rsp,%rbp,4), %xmm0
xorl %eax, %eax
cmpq $0x10, %rax
je 0x31e78
addss 0xf0(%rsp,%rax,4), %xmm0
incq %rax
jmp 0x31e64
movss %xmm0, 0xa0(%rsp,%rbp,4)
leaq (,%r15,4), %rdx
addq %r13, %rdx
leaq 0x1b0(%rsp,%r15), %r8
leaq 0x170(%rsp,%rbp,4), %r9
leaq 0xe0(%rsp), %rax
movq %rax, (%rsp)
pushq $0x10
popq %rdi
pushq $0x3
popq %rsi
leaq 0xf0(%rsp), %rcx
callq 0x3d5e9
movss 0x8(%rsp), %xmm1
movss %xmm0, 0x130(%rsp,%rbp,4)
incq %rbp
addq $0x40, %r14
addq $0x40, %rbx
jmp 0x31df2
pushq $0x10
popq %rbx
movl %ebx, %edi
pushq $0xf
popq %rbp
movl %ebp, %esi
leaq 0x130(%rsp), %rdx
leaq 0x90(%rsp), %rcx
leaq 0xa0(%rsp), %r14
movq %r14, %r8
callq 0x3d95f
movss %xmm0, 0xc(%rsp)
movl %ebx, %edi
movl %ebp, %esi
leaq 0x170(%rsp), %rdx
leaq 0x80(%rsp), %rcx
movq %r14, %r8
callq 0x3d95f
movss %xmm0, 0x8(%rsp)
movss 0xc(%rsp), %xmm0
callq 0x30a5a
movl %eax, %r14d
movq 0x60(%rsp), %rbp
imulq $0x54, %rbp, %r15
movq 0x50(%rsp), %r12
leaq (%r12,%r15), %rbx
movw %ax, 0x50(%r12,%r15)
movss 0x8(%rsp), %xmm0
callq 0x30a5a
movw %ax, 0x52(%r12,%r15)
movzwl %r14w, %ecx
movq 0x3b03a(%rip), %rdx # 0x6cfa8
movss (%rdx,%rcx,4), %xmm0
movzwl %ax, %eax
movss (%rdx,%rax,4), %xmm1
xorl %eax, %eax
movl $0x80, %r10d
movq 0x70(%rsp), %r14
cmpq $0x10, %rax
je 0x31fa8
movb 0x80(%rsp,%rax), %cl
shlb $0x4, %cl
orb 0x90(%rsp,%rax), %cl
movb %cl, (%r14,%rax)
incq %rax
jmp 0x31f88
leaq 0x1b0(%rsp), %rax
movq %r13, %rcx
xorl %edx, %edx
cmpq $0x10, %rdx
je 0x32043
movzbl (%rbx,%rdx), %esi
movl %esi, %edi
andl $0xf, %edi
cvtsi2ss %edi, %xmm2
mulss %xmm0, %xmm2
ucomiss 0x1d651(%rip), %xmm2 # 0x4f628
jne 0x31fdb
jnp 0x32033
shrl $0x4, %esi
cvtsi2ss %esi, %xmm3
mulss %xmm1, %xmm3
xorl %esi, %esi
cmpq $0x10, %rsi
je 0x32033
movss (%rcx,%rsi,4), %xmm4
addss %xmm3, %xmm4
divss %xmm2, %xmm4
addss 0x1d645(%rip), %xmm4 # 0x4f648
movd %xmm4, %edi
andl $0x7fffff, %edi # imm = 0x7FFFFF
movl $0x400003, %r8d # imm = 0x400003
cmpl %r8d, %edi
jb 0x3201d
movl $0x400003, %edi # imm = 0x400003
cmpl $0x400001, %edi # imm = 0x400001
jae 0x3202a
movl $0x400000, %edi # imm = 0x400000
movb %dil, (%rax,%rsi)
incq %rsi
jmp 0x31fe8
incq %rdx
addq $0x40, %rcx
addq $0x10, %rax
jmp 0x31fb5
leaq 0x210(%rsp), %rax
movq 0x78(%rsp), %r11
movq %r11, %rcx
xorl %edx, %edx
movq 0x68(%rsp), %rbx
cmpq $0xff, %rdx
ja 0x320a5
xorl %esi, %esi
cmpq $0x20, %rsi
je 0x32099
movb -0x40(%rax,%rsi), %dil
shlb $0x2, %dil
orb -0x60(%rax,%rsi), %dil
movb -0x20(%rax,%rsi), %r8b
shlb $0x4, %r8b
movb (%rax,%rsi), %r9b
shlb $0x6, %r9b
orb %r8b, %r9b
orb %dil, %r9b
movb %r9b, (%rcx,%rsi)
incq %rsi
jmp 0x32065
addq %r10, %rdx
addq $0x20, %rcx
addq %r10, %rax
jmp 0x3205a
movl $0x400, %eax # imm = 0x400
addq %rax, %r13
incq %rbp
addq %rax, %rbx
addq $0x54, %r14
addq $0x54, %r11
jmp 0x31d7c
movq 0x18(%rsp), %r14
movq 0x48(%rsp), %r15
leaq (%r15,%r14,4), %r15
movq 0x10(%rsp), %rax
addq %rax, %r12
movq 0x40(%rsp), %rcx
incq %rcx
movq 0x38(%rsp), %rdx
addq %rax, %rdx
movq %rdx, %rax
movq 0x20(%rsp), %rbx
jmp 0x31d4d
imulq %rbx, %r14
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1ec90
movq 0x10(%rsp), %rax
imulq %rbx, %rax
addq $0x2b8, %rsp # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
quantize_q2_K:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2B8h
mov r13, r8
mov r14, rcx
mov rbx, rdx
mov r12, rsi
mov r15, rdi
push 0Ah
pop rdi
mov rsi, rcx
call _ggml_row_size
mov [rsp+2E8h+var_2D8], rax
mov [rsp+2E8h+var_2C0], r13
test r13, r13
jz loc_320F3
mov ecx, 100h
mov eax, r14d
cdq
idiv ecx
xor ecx, ecx
test eax, eax
cmovle eax, ecx
mov [rsp+2E8h+var_290], rax
test rbx, rbx
mov eax, 0
cmovg rax, rbx
mov [rsp+2E8h+var_2B8], rax
lea rax, [r12+10h]
mov [rsp+2E8h+var_2C8], rbx
mov [rsp+2E8h+var_2D0], r14
loc_31D4D:
cmp rcx, [rsp+2E8h+var_2B8]
jz loc_32105
mov [rsp+2E8h+var_2A8], rcx
mov [rsp+2E8h+var_2B0], rax
mov r11, rax
mov r14, r12
mov rbx, [rsp+2E8h+var_2C0]
xor ebp, ebp
mov [rsp+2E8h+var_2A0], r15
mov r13, r15
mov [rsp+2E8h+var_298], r12
loc_31D7C:
cmp rbp, [rsp+2E8h+var_290]
jz loc_320C0
xorps xmm0, xmm0
movaps [rsp+2E8h+var_218], xmm0
movaps [rsp+2E8h+var_228], xmm0
movaps [rsp+2E8h+var_238], xmm0
movaps [rsp+2E8h+var_248], xmm0
xorps xmm1, xmm1
xor eax, eax
loc_31DAF:
cmp rax, 100h
jz short loc_31DCB
movss xmm0, dword ptr [r13+rax*4+0]
mulss xmm0, xmm0
addss xmm1, xmm0
inc rax
jmp short loc_31DAF
loc_31DCB:
mov [rsp+2E8h+var_288], rbp
mov [rsp+2E8h+var_278], r14
mov [rsp+2E8h+var_270], r11
mulss xmm1, cs:dword_4F650
mov [rsp+2E8h+var_280], rbx
mov r14, r13
xor ebp, ebp
movss [rsp+2E8h+var_2E0], xmm1
loc_31DF2:
cmp rbp, 10h
jz loc_31EDA
mov r15, rbp
shl r15, 4
xor r12d, r12d
loc_31E06:
cmp r12, 10h
jz short loc_31E59
movss xmm2, dword ptr [rbx+r12*4]
movss xmm0, dword ptr [r14+r12*4]
mulss xmm0, xmm0
addss xmm0, xmm1
ucomiss xmm0, cs:dword_4F628
jb short loc_31E2F
sqrtss xmm0, xmm0
jmp short loc_31E46
loc_31E2F:
movss [rsp+2E8h+var_2DC], xmm2
call _sqrtf
movss xmm2, [rsp+2E8h+var_2DC]
movss xmm1, [rsp+2E8h+var_2E0]
loc_31E46:
mulss xmm2, xmm0
movss [rsp+r12*4+2E8h+var_1F8], xmm2
inc r12
jmp short loc_31E06
loc_31E59:
movss xmm0, dword ptr [rsp+rbp*4+2E8h+var_248]
xor eax, eax
loc_31E64:
cmp rax, 10h
jz short loc_31E78
addss xmm0, [rsp+rax*4+2E8h+var_1F8]
inc rax
jmp short loc_31E64
loc_31E78:
movss dword ptr [rsp+rbp*4+2E8h+var_248], xmm0
lea rdx, ds:0[r15*4]
add rdx, r13
lea r8, [rsp+r15+2E8h+var_138]
lea r9, [rsp+rbp*4+2E8h+var_178]
lea rax, [rsp+2E8h+var_208]
mov [rsp+2E8h+var_2E8], rax
push 10h
pop rdi
push 3
pop rsi
lea rcx, [rsp+2E8h+var_1F8]
call make_qkx3_quants
movss xmm1, [rsp+2E8h+var_2E0]
movss [rsp+rbp*4+2E8h+var_1B8], xmm0
inc rbp
add r14, 40h ; '@'
add rbx, 40h ; '@'
jmp loc_31DF2
loc_31EDA:
push 10h
pop rbx
mov edi, ebx
push 0Fh
pop rbp
mov esi, ebp
lea rdx, [rsp+2E8h+var_1B8]
lea rcx, [rsp+2E8h+var_258]
lea r14, [rsp+2E8h+var_248]
mov r8, r14
call make_qp_quants
movss [rsp+2E8h+var_2DC], xmm0
mov edi, ebx
mov esi, ebp
lea rdx, [rsp+2E8h+var_178]
lea rcx, [rsp+2E8h+var_268]
mov r8, r14
call make_qp_quants
movss [rsp+2E8h+var_2E0], xmm0
movss xmm0, [rsp+2E8h+var_2DC]
call ggml_compute_fp32_to_fp16_0
mov r14d, eax
mov rbp, [rsp+2E8h+var_288]
imul r15, rbp, 54h ; 'T'
mov r12, [rsp+2E8h+var_298]
lea rbx, [r12+r15]
mov [r12+r15+50h], ax
movss xmm0, [rsp+2E8h+var_2E0]
call ggml_compute_fp32_to_fp16_0
mov [r12+r15+52h], ax
movzx ecx, r14w
mov rdx, cs:ggml_table_f32_f16_ptr
movss xmm0, dword ptr [rdx+rcx*4]
movzx eax, ax
movss xmm1, dword ptr [rdx+rax*4]
xor eax, eax
mov r10d, 80h
mov r14, [rsp+2E8h+var_278]
loc_31F88:
cmp rax, 10h
jz short loc_31FA8
mov cl, [rsp+rax+2E8h+var_268]
shl cl, 4
or cl, [rsp+rax+2E8h+var_258]
mov [r14+rax], cl
inc rax
jmp short loc_31F88
loc_31FA8:
lea rax, [rsp+2E8h+var_138]
mov rcx, r13
xor edx, edx
loc_31FB5:
cmp rdx, 10h
jz loc_32043
movzx esi, byte ptr [rbx+rdx]
mov edi, esi
and edi, 0Fh
cvtsi2ss xmm2, edi
mulss xmm2, xmm0
ucomiss xmm2, cs:dword_4F628
jnz short loc_31FDB
jnp short loc_32033
loc_31FDB:
shr esi, 4
cvtsi2ss xmm3, esi
mulss xmm3, xmm1
xor esi, esi
loc_31FE8:
cmp rsi, 10h
jz short loc_32033
movss xmm4, dword ptr [rcx+rsi*4]
addss xmm4, xmm3
divss xmm4, xmm2
addss xmm4, cs:dword_4F648
movd edi, xmm4
and edi, 7FFFFFh
mov r8d, 400003h
cmp edi, r8d
jb short loc_3201D
mov edi, 400003h
loc_3201D:
cmp edi, 400001h
jnb short loc_3202A
mov edi, 400000h
loc_3202A:
mov [rax+rsi], dil
inc rsi
jmp short loc_31FE8
loc_32033:
inc rdx
add rcx, 40h ; '@'
add rax, 10h
jmp loc_31FB5
loc_32043:
lea rax, [rsp+2E8h+var_D8]
mov r11, [rsp+2E8h+var_270]
mov rcx, r11
xor edx, edx
mov rbx, [rsp+2E8h+var_280]
loc_3205A:
cmp rdx, 0FFh
ja short loc_320A5
xor esi, esi
loc_32065:
cmp rsi, 20h ; ' '
jz short loc_32099
mov dil, [rax+rsi-40h]
shl dil, 2
or dil, [rax+rsi-60h]
mov r8b, [rax+rsi-20h]
shl r8b, 4
mov r9b, [rax+rsi]
shl r9b, 6
or r9b, r8b
or r9b, dil
mov [rcx+rsi], r9b
inc rsi
jmp short loc_32065
loc_32099:
add rdx, r10
add rcx, 20h ; ' '
add rax, r10
jmp short loc_3205A
loc_320A5:
mov eax, 400h
add r13, rax
inc rbp
add rbx, rax
add r14, 54h ; 'T'
add r11, 54h ; 'T'
jmp loc_31D7C
loc_320C0:
mov r14, [rsp+2E8h+var_2D0]
mov r15, [rsp+2E8h+var_2A0]
lea r15, [r15+r14*4]
mov rax, [rsp+2E8h+var_2D8]
add r12, rax
mov rcx, [rsp+2E8h+var_2A8]
inc rcx
mov rdx, [rsp+2E8h+var_2B0]
add rdx, rax
mov rax, rdx
mov rbx, [rsp+2E8h+var_2C8]
jmp loc_31D4D
loc_320F3:
imul r14, rbx
mov rdi, r15
mov rsi, r12
mov rdx, r14
call _quantize_row_q2_K_ref
loc_32105:
mov rax, [rsp+2E8h+var_2D8]
imul rax, rbx
add rsp, 2B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long quantize_q2_K(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long v10; // rdi
long long ii; // rsi
long long v12; // rax
unsigned long long jj; // rdx
long long v14; // rcx
long long v15; // rax
long long v16; // rax
long long v17; // r11
long long v18; // r14
long long v19; // rbx
long long v20; // rbp
long long v21; // r13
double v22; // xmm0_8
double v23; // xmm1_8
long long i; // rax
long long v25; // r14
long long v26; // rbp
long long j; // r12
float v28; // xmm2_4
float v29; // xmm0_4
long long k; // rax
unsigned __int16 v31; // r14
long long v32; // rbx
unsigned __int16 v33; // ax
float v34; // xmm1_4
long long m; // rax
_OWORD *v36; // rax
long long v37; // rcx
long long n; // rdx
float v39; // xmm2_4
float v40; // xmm3_4
__m128i v41; // xmm4
char *v42; // rax
long long v43; // rcx
unsigned int v45; // [rsp+8h] [rbp-2E0h]
float qp_quants; // [rsp+8h] [rbp-2E0h]
float v47; // [rsp+Ch] [rbp-2DCh]
unsigned int v48; // [rsp+Ch] [rbp-2DCh]
unsigned long long v49; // [rsp+10h] [rbp-2D8h]
long long v50; // [rsp+18h] [rbp-2D0h]
long long v51; // [rsp+20h] [rbp-2C8h]
long long v52; // [rsp+28h] [rbp-2C0h]
long long v53; // [rsp+30h] [rbp-2B8h]
long long v54; // [rsp+38h] [rbp-2B0h]
long long v55; // [rsp+40h] [rbp-2A8h]
long long v56; // [rsp+50h] [rbp-298h]
long long v57; // [rsp+58h] [rbp-290h]
long long v58; // [rsp+60h] [rbp-288h]
long long v59; // [rsp+68h] [rbp-280h]
long long v60; // [rsp+70h] [rbp-278h]
long long v61; // [rsp+78h] [rbp-270h]
_BYTE v62[16]; // [rsp+80h] [rbp-268h] BYREF
_BYTE v63[16]; // [rsp+90h] [rbp-258h] BYREF
_OWORD v64[4]; // [rsp+A0h] [rbp-248h] BYREF
char v65[16]; // [rsp+E0h] [rbp-208h] BYREF
float v66[16]; // [rsp+F0h] [rbp-1F8h] BYREF
_DWORD v67[16]; // [rsp+130h] [rbp-1B8h] BYREF
_DWORD v68[16]; // [rsp+170h] [rbp-178h] BYREF
_OWORD v69[6]; // [rsp+1B0h] [rbp-138h] BYREF
char v70; // [rsp+210h] [rbp-D8h] BYREF
v10 = 10LL;
ii = a4;
v49 = ggml_row_size(0xAu, a4);
v52 = a5;
if ( a5 )
{
jj = (unsigned int)((int)a4 >> 31);
LODWORD(jj) = (int)a4 % 256;
v12 = (unsigned int)((int)a4 / 256);
v14 = 0LL;
if ( (int)v12 <= 0 )
v12 = 0LL;
v57 = v12;
v15 = 0LL;
if ( a3 > 0 )
v15 = a3;
v53 = v15;
v16 = a2 + 16;
v51 = a3;
v50 = a4;
while ( v14 != v53 )
{
v55 = v14;
v54 = v16;
v17 = v16;
v18 = a2;
v19 = v52;
v20 = 0LL;
v21 = a1;
v56 = a2;
while ( v20 != v57 )
{
v22 = 0.0;
memset(v64, 0, sizeof(v64));
v23 = 0.0;
for ( i = 0LL; i != 256; ++i )
{
*(_QWORD *)&v22 = *(unsigned int *)(v21 + 4 * i);
*(float *)&v22 = *(float *)&v22 * *(float *)&v22;
*(float *)&v23 = *(float *)&v23 + *(float *)&v22;
}
v58 = v20;
v60 = v18;
v61 = v17;
*(float *)&v23 = *(float *)&v23 * 0.00390625;
v59 = v19;
v25 = v21;
v26 = 0LL;
v45 = LODWORD(v23);
while ( v26 != 16 )
{
for ( j = 0LL; j != 16; ++j )
{
v28 = *(float *)(v19 + 4 * j);
v29 = (float)(*(float *)(v25 + 4 * j) * *(float *)(v25 + 4 * j)) + *(float *)&v23;
if ( v29 < 0.0 )
{
v47 = *(float *)(v19 + 4 * j);
sqrtf(v10, ii, jj);
v28 = v47;
LODWORD(v23) = v45;
}
else
{
v29 = fsqrt(v29);
}
v66[j] = v28 * v29;
}
*(_QWORD *)&v22 = *((unsigned int *)v64 + v26);
for ( k = 0LL; k != 16; ++k )
*(float *)&v22 = *(float *)&v22 + v66[k];
*((_DWORD *)v64 + v26) = LODWORD(v22);
v10 = 16LL;
ii = 3LL;
make_qkx3_quants(
16,
3,
v21 + ((_DWORD)v26 << 6),
(unsigned int)v66,
(unsigned int)&v69[v26],
(unsigned int)&v68[v26],
(long long)v65);
*(_QWORD *)&v23 = v45;
v67[v26++] = LODWORD(v22);
v25 += 64LL;
v19 += 64LL;
}
*(float *)&v22 = make_qp_quants(16LL, 15LL, v67, v63, v64, v22, v23);
v48 = LODWORD(v22);
v10 = 16LL;
ii = 15LL;
qp_quants = make_qp_quants(16LL, 15LL, v68, v62, v64, v22, v23);
v31 = ggml_compute_fp32_to_fp16_0((__m128i)v48);
a2 = v56;
v32 = v56 + 84 * v58;
*(_WORD *)(v32 + 80) = v31;
v33 = ggml_compute_fp32_to_fp16_0((__m128i)LODWORD(qp_quants));
*(_WORD *)(v32 + 82) = v33;
*(float *)&v22 = ggml_table_f32_f16[v31];
v34 = ggml_table_f32_f16[v33];
for ( m = 0LL; m != 16; ++m )
*(_BYTE *)(v60 + m) = v63[m] | (16 * v62[m]);
v36 = v69;
v37 = v21;
for ( n = 0LL; n != 16; ++n )
{
ii = *(unsigned __int8 *)(v32 + n);
v10 = *(_BYTE *)(v32 + n) & 0xF;
v39 = (float)(int)v10 * *(float *)&v22;
if ( v39 != 0.0 )
{
v40 = (float)((unsigned int)ii >> 4) * v34;
for ( ii = 0LL; ii != 16; ++ii )
{
v41 = (__m128i)*(unsigned int *)(v37 + 4 * ii);
*(float *)v41.m128i_i32 = (float)((float)(*(float *)v41.m128i_i32 + v40) / v39) + 12582912.0;
v10 = _mm_cvtsi128_si32(v41) & 0x7FFFFF;
if ( (unsigned int)v10 >= 0x400003 )
v10 = 4194307LL;
if ( (unsigned int)v10 < 0x400001 )
v10 = 0x400000LL;
*((_BYTE *)v36 + ii) = v10;
}
}
v37 += 64LL;
++v36;
}
v42 = &v70;
v43 = v61;
for ( jj = 0LL; jj <= 0xFF; jj += 128LL )
{
for ( ii = 0LL; ii != 32; ++ii )
{
LOBYTE(v10) = v42[ii - 96] | (4 * v42[ii - 64]);
*(_BYTE *)(v43 + ii) = v10 | (16 * v42[ii - 32]) | (v42[ii] << 6);
}
v43 += 32LL;
v42 += 128;
}
v21 += 1024LL;
v20 = v58 + 1;
v19 = v59 + 1024;
v18 = v60 + 84;
v17 = v61 + 84;
}
a1 += 4 * v50;
a2 += v49;
v14 = v55 + 1;
jj = v49 + v54;
v16 = v49 + v54;
a3 = v51;
}
}
else
{
quantize_row_q2_K_ref(a1, a2, a3 * a4);
}
return a3 * v49;
}
|
quantize_q2_K:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2b8
MOV R13,R8
MOV R14,RCX
MOV RBX,RDX
MOV R12,RSI
MOV R15,RDI
PUSH 0xa
POP RDI
MOV RSI,RCX
CALL 0x0011e1b0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x28],R13
TEST R13,R13
JZ 0x001320f3
MOV ECX,0x100
MOV EAX,R14D
CDQ
IDIV ECX
XOR ECX,ECX
TEST EAX,EAX
CMOVLE EAX,ECX
MOV qword ptr [RSP + 0x58],RAX
TEST RBX,RBX
MOV EAX,0x0
CMOVG RAX,RBX
MOV qword ptr [RSP + 0x30],RAX
LEA RAX,[R12 + 0x10]
MOV qword ptr [RSP + 0x20],RBX
MOV qword ptr [RSP + 0x18],R14
LAB_00131d4d:
CMP RCX,qword ptr [RSP + 0x30]
JZ 0x00132105
MOV qword ptr [RSP + 0x40],RCX
MOV qword ptr [RSP + 0x38],RAX
MOV R11,RAX
MOV R14,R12
MOV RBX,qword ptr [RSP + 0x28]
XOR EBP,EBP
MOV qword ptr [RSP + 0x48],R15
MOV R13,R15
MOV qword ptr [RSP + 0x50],R12
LAB_00131d7c:
CMP RBP,qword ptr [RSP + 0x58]
JZ 0x001320c0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0xd0],XMM0
MOVAPS xmmword ptr [RSP + 0xc0],XMM0
MOVAPS xmmword ptr [RSP + 0xb0],XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM0
XORPS XMM1,XMM1
XOR EAX,EAX
LAB_00131daf:
CMP RAX,0x100
JZ 0x00131dcb
MOVSS XMM0,dword ptr [R13 + RAX*0x4]
MULSS XMM0,XMM0
ADDSS XMM1,XMM0
INC RAX
JMP 0x00131daf
LAB_00131dcb:
MOV qword ptr [RSP + 0x60],RBP
MOV qword ptr [RSP + 0x70],R14
MOV qword ptr [RSP + 0x78],R11
MULSS XMM1,dword ptr [0x0014f650]
MOV qword ptr [RSP + 0x68],RBX
MOV R14,R13
XOR EBP,EBP
MOVSS dword ptr [RSP + 0x8],XMM1
LAB_00131df2:
CMP RBP,0x10
JZ 0x00131eda
MOV R15,RBP
SHL R15,0x4
XOR R12D,R12D
LAB_00131e06:
CMP R12,0x10
JZ 0x00131e59
MOVSS XMM2,dword ptr [RBX + R12*0x4]
MOVSS XMM0,dword ptr [R14 + R12*0x4]
MULSS XMM0,XMM0
ADDSS XMM0,XMM1
UCOMISS XMM0,dword ptr [0x0014f628]
JC 0x00131e2f
SQRTSS XMM0,XMM0
JMP 0x00131e46
LAB_00131e2f:
MOVSS dword ptr [RSP + 0xc],XMM2
CALL 0x0011eae0
MOVSS XMM2,dword ptr [RSP + 0xc]
MOVSS XMM1,dword ptr [RSP + 0x8]
LAB_00131e46:
MULSS XMM2,XMM0
MOVSS dword ptr [RSP + R12*0x4 + 0xf0],XMM2
INC R12
JMP 0x00131e06
LAB_00131e59:
MOVSS XMM0,dword ptr [RSP + RBP*0x4 + 0xa0]
XOR EAX,EAX
LAB_00131e64:
CMP RAX,0x10
JZ 0x00131e78
ADDSS XMM0,dword ptr [RSP + RAX*0x4 + 0xf0]
INC RAX
JMP 0x00131e64
LAB_00131e78:
MOVSS dword ptr [RSP + RBP*0x4 + 0xa0],XMM0
LEA RDX,[R15*0x4]
ADD RDX,R13
LEA R8,[RSP + R15*0x1 + 0x1b0]
LEA R9,[RSP + RBP*0x4 + 0x170]
LEA RAX,[RSP + 0xe0]
MOV qword ptr [RSP],RAX
PUSH 0x10
POP RDI
PUSH 0x3
POP RSI
LEA RCX,[RSP + 0xf0]
CALL 0x0013d5e9
MOVSS XMM1,dword ptr [RSP + 0x8]
MOVSS dword ptr [RSP + RBP*0x4 + 0x130],XMM0
INC RBP
ADD R14,0x40
ADD RBX,0x40
JMP 0x00131df2
LAB_00131eda:
PUSH 0x10
POP RBX
MOV EDI,EBX
PUSH 0xf
POP RBP
MOV ESI,EBP
LEA RDX,[RSP + 0x130]
LEA RCX,[RSP + 0x90]
LEA R14,[RSP + 0xa0]
MOV R8,R14
CALL 0x0013d95f
MOVSS dword ptr [RSP + 0xc],XMM0
MOV EDI,EBX
MOV ESI,EBP
LEA RDX,[RSP + 0x170]
LEA RCX,[RSP + 0x80]
MOV R8,R14
CALL 0x0013d95f
MOVSS dword ptr [RSP + 0x8],XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
CALL 0x00130a5a
MOV R14D,EAX
MOV RBP,qword ptr [RSP + 0x60]
IMUL R15,RBP,0x54
MOV R12,qword ptr [RSP + 0x50]
LEA RBX,[R12 + R15*0x1]
MOV word ptr [R12 + R15*0x1 + 0x50],AX
MOVSS XMM0,dword ptr [RSP + 0x8]
CALL 0x00130a5a
MOV word ptr [R12 + R15*0x1 + 0x52],AX
MOVZX ECX,R14W
MOV RDX,qword ptr [0x0016cfa8]
MOVSS XMM0,dword ptr [RDX + RCX*0x4]
MOVZX EAX,AX
MOVSS XMM1,dword ptr [RDX + RAX*0x4]
XOR EAX,EAX
MOV R10D,0x80
MOV R14,qword ptr [RSP + 0x70]
LAB_00131f88:
CMP RAX,0x10
JZ 0x00131fa8
MOV CL,byte ptr [RSP + RAX*0x1 + 0x80]
SHL CL,0x4
OR CL,byte ptr [RSP + RAX*0x1 + 0x90]
MOV byte ptr [R14 + RAX*0x1],CL
INC RAX
JMP 0x00131f88
LAB_00131fa8:
LEA RAX,[RSP + 0x1b0]
MOV RCX,R13
XOR EDX,EDX
LAB_00131fb5:
CMP RDX,0x10
JZ 0x00132043
MOVZX ESI,byte ptr [RBX + RDX*0x1]
MOV EDI,ESI
AND EDI,0xf
CVTSI2SS XMM2,EDI
MULSS XMM2,XMM0
UCOMISS XMM2,dword ptr [0x0014f628]
JNZ 0x00131fdb
JNP 0x00132033
LAB_00131fdb:
SHR ESI,0x4
CVTSI2SS XMM3,ESI
MULSS XMM3,XMM1
XOR ESI,ESI
LAB_00131fe8:
CMP RSI,0x10
JZ 0x00132033
MOVSS XMM4,dword ptr [RCX + RSI*0x4]
ADDSS XMM4,XMM3
DIVSS XMM4,XMM2
ADDSS XMM4,dword ptr [0x0014f648]
MOVD EDI,XMM4
AND EDI,0x7fffff
MOV R8D,0x400003
CMP EDI,R8D
JC 0x0013201d
MOV EDI,0x400003
LAB_0013201d:
CMP EDI,0x400001
JNC 0x0013202a
MOV EDI,0x400000
LAB_0013202a:
MOV byte ptr [RAX + RSI*0x1],DIL
INC RSI
JMP 0x00131fe8
LAB_00132033:
INC RDX
ADD RCX,0x40
ADD RAX,0x10
JMP 0x00131fb5
LAB_00132043:
LEA RAX,[RSP + 0x210]
MOV R11,qword ptr [RSP + 0x78]
MOV RCX,R11
XOR EDX,EDX
MOV RBX,qword ptr [RSP + 0x68]
LAB_0013205a:
CMP RDX,0xff
JA 0x001320a5
XOR ESI,ESI
LAB_00132065:
CMP RSI,0x20
JZ 0x00132099
MOV DIL,byte ptr [RAX + RSI*0x1 + -0x40]
SHL DIL,0x2
OR DIL,byte ptr [RAX + RSI*0x1 + -0x60]
MOV R8B,byte ptr [RAX + RSI*0x1 + -0x20]
SHL R8B,0x4
MOV R9B,byte ptr [RAX + RSI*0x1]
SHL R9B,0x6
OR R9B,R8B
OR R9B,DIL
MOV byte ptr [RCX + RSI*0x1],R9B
INC RSI
JMP 0x00132065
LAB_00132099:
ADD RDX,R10
ADD RCX,0x20
ADD RAX,R10
JMP 0x0013205a
LAB_001320a5:
MOV EAX,0x400
ADD R13,RAX
INC RBP
ADD RBX,RAX
ADD R14,0x54
ADD R11,0x54
JMP 0x00131d7c
LAB_001320c0:
MOV R14,qword ptr [RSP + 0x18]
MOV R15,qword ptr [RSP + 0x48]
LEA R15,[R15 + R14*0x4]
MOV RAX,qword ptr [RSP + 0x10]
ADD R12,RAX
MOV RCX,qword ptr [RSP + 0x40]
INC RCX
MOV RDX,qword ptr [RSP + 0x38]
ADD RDX,RAX
MOV RAX,RDX
MOV RBX,qword ptr [RSP + 0x20]
JMP 0x00131d4d
LAB_001320f3:
IMUL R14,RBX
MOV RDI,R15
MOV RSI,R12
MOV RDX,R14
CALL 0x0011ec90
LAB_00132105:
MOV RAX,qword ptr [RSP + 0x10]
IMUL RAX,RBX
ADD RSP,0x2b8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
long quantize_q2_K(long param_1,long param_2,long param_3,ulong param_4,long param_5)
{
byte bVar1;
ushort uVar2;
ushort uVar3;
long lVar4;
ulong uVar5;
long lVar6;
long lVar7;
int1 *puVar8;
long lVar9;
ulong uVar10;
long lVar11;
long lVar12;
long lVar13;
ulong uVar14;
uint uVar15;
long lVar16;
long lVar17;
long lVar18;
long lVar19;
long lVar20;
float fVar21;
float fVar22;
int4 uVar23;
int4 uVar24;
float fVar25;
char local_268 [32];
float local_248 [16];
int1 local_208 [16];
float local_1f8 [16];
int4 local_1b8 [16];
int1 local_178 [64];
int1 local_138 [96];
int1 local_d8 [168];
lVar4 = ggml_row_size(10,param_4);
if (param_5 == 0) {
quantize_row_q2_K_ref(param_1,param_2,param_4 * param_3);
}
else {
uVar14 = (long)((ulong)(uint)((int)param_4 >> 0x1f) << 0x20 | param_4 & 0xffffffff) / 0x100;
uVar5 = uVar14 & 0xffffffff;
lVar9 = 0;
if ((int)uVar14 < 1) {
uVar5 = 0;
}
lVar6 = 0;
if (0 < param_3) {
lVar6 = param_3;
}
lVar11 = param_2 + 0x10;
for (; lVar9 != lVar6; lVar9 = lVar9 + 1) {
lVar12 = param_5;
lVar16 = lVar11;
lVar18 = param_1;
lVar20 = param_2;
for (uVar14 = 0; uVar14 != uVar5; uVar14 = uVar14 + 1) {
local_248[0xc] = 0.0;
local_248[0xd] = 0.0;
local_248[0xe] = 0.0;
local_248[0xf] = 0.0;
local_248[8] = 0.0;
local_248[9] = 0.0;
local_248[10] = 0.0;
local_248[0xb] = 0.0;
local_248[4] = 0.0;
local_248[5] = 0.0;
local_248[6] = 0.0;
local_248[7] = 0.0;
local_248[0] = 0.0;
local_248[1] = 0.0;
local_248[2] = 0.0;
local_248[3] = 0.0;
fVar25 = 0.0;
for (lVar7 = 0; lVar7 != 0x100; lVar7 = lVar7 + 1) {
fVar22 = *(float *)(lVar18 + lVar7 * 4);
fVar25 = fVar25 + fVar22 * fVar22;
}
fVar25 = fVar25 * _DAT_0014f650;
lVar7 = lVar12;
lVar19 = lVar18;
for (lVar13 = 0; lVar13 != 0x10; lVar13 = lVar13 + 1) {
for (lVar17 = 0; lVar17 != 0x10; lVar17 = lVar17 + 1) {
fVar22 = *(float *)(lVar7 + lVar17 * 4);
fVar21 = *(float *)(lVar19 + lVar17 * 4);
fVar21 = fVar21 * fVar21 + fVar25;
if (fVar21 < DAT_0014f628) {
fVar21 = sqrtf(fVar21);
}
else {
fVar21 = SQRT(fVar21);
}
local_1f8[lVar17] = fVar22 * fVar21;
}
fVar22 = local_248[lVar13];
for (lVar17 = 0; lVar17 != 0x10; lVar17 = lVar17 + 1) {
fVar22 = fVar22 + local_1f8[lVar17];
}
local_248[lVar13] = fVar22;
uVar23 = make_qkx3_quants(0x10,3,lVar13 * 0x40 + lVar18,local_1f8,
local_138 + lVar13 * 0x10,local_178 + lVar13 * 4,local_208);
local_1b8[lVar13] = uVar23;
lVar19 = lVar19 + 0x40;
lVar7 = lVar7 + 0x40;
}
uVar23 = make_qp_quants(0x10,0xf,local_1b8,local_268 + 0x10,local_248);
uVar24 = make_qp_quants(0x10,0xf,local_178,local_268,local_248);
uVar2 = ggml_compute_fp32_to_fp16(uVar23);
lVar19 = uVar14 * 0x54;
*(ushort *)(param_2 + 0x50 + lVar19) = uVar2;
uVar3 = ggml_compute_fp32_to_fp16(uVar24);
*(ushort *)(param_2 + 0x52 + lVar19) = uVar3;
fVar25 = *(float *)(PTR_ggml_table_f32_f16_0016cfa8 + (ulong)uVar2 * 4);
fVar22 = *(float *)(PTR_ggml_table_f32_f16_0016cfa8 + (ulong)uVar3 * 4);
for (lVar7 = 0; lVar7 != 0x10; lVar7 = lVar7 + 1) {
*(char *)(lVar20 + lVar7) = local_268[lVar7] << 4 | local_268[lVar7 + 0x10];
}
puVar8 = local_138;
lVar7 = lVar18;
for (lVar13 = 0; lVar13 != 0x10; lVar13 = lVar13 + 1) {
bVar1 = *(byte *)(param_2 + lVar19 + lVar13);
fVar21 = (float)(bVar1 & 0xf) * fVar25;
if ((fVar21 != DAT_0014f628) || (NAN(fVar21) || NAN(DAT_0014f628))) {
for (lVar17 = 0; lVar17 != 0x10; lVar17 = lVar17 + 1) {
uVar15 = (uint)((*(float *)(lVar7 + lVar17 * 4) + (float)(bVar1 >> 4) * fVar22) /
fVar21 + DAT_0014f648) & 0x7fffff;
if (0x400002 < uVar15) {
uVar15 = 0x400003;
}
if (uVar15 < 0x400001) {
uVar15 = 0;
}
puVar8[lVar17] = (char)uVar15;
}
}
lVar7 = lVar7 + 0x40;
puVar8 = puVar8 + 0x10;
}
puVar8 = local_d8;
lVar7 = lVar16;
for (uVar10 = 0; uVar10 < 0x100; uVar10 = uVar10 + 0x80) {
for (lVar19 = 0; lVar19 != 0x20; lVar19 = lVar19 + 1) {
*(int1 *)(lVar7 + lVar19) =
puVar8[lVar19] << 6 | puVar8[lVar19 + -0x20] << 4 |
puVar8[lVar19 + -0x40] << 2 | puVar8[lVar19 + -0x60];
}
lVar7 = lVar7 + 0x20;
puVar8 = puVar8 + 0x80;
}
lVar18 = lVar18 + 0x400;
lVar12 = lVar12 + 0x400;
lVar20 = lVar20 + 0x54;
lVar16 = lVar16 + 0x54;
}
param_1 = param_1 + param_4 * 4;
param_2 = param_2 + lVar4;
lVar11 = lVar11 + lVar4;
}
}
return lVar4 * param_3;
}
|
|
14,773
|
common_chat_params_init_mistral_nemo(minja::chat_template const&, templates_params const&)
|
llama.cpp/common/chat.cpp
|
static common_chat_params common_chat_params_init_mistral_nemo(const common_chat_template & tmpl, const struct templates_params & inputs) {
common_chat_params data;
data.grammar_lazy = inputs.tool_choice != COMMON_CHAT_TOOL_CHOICE_REQUIRED;
data.grammar = build_grammar([&](const common_grammar_builder & builder) {
auto schemas = json::array();
foreach_function(inputs.tools, [&](const json & tool) {
const auto & function = tool.at("function");
schemas.push_back({
{"type", "object"},
{"properties", {
// Important note: the model is probably trained to take a JSON stringified arguments value.
// It's hard to constrain that for now (while reusing the JSON schema conversion), so we're just expecting a plain object.
{"name", {
{"type", "string"},
{"const", function.at("name")},
}},
{"arguments", function.at("parameters")},
{"id", {
{"type", "string"},
// Nemo's template expects a 9-character alphanumeric ID.
{"pattern", "^[a-zA-Z0-9]{9}$"},
}},
}},
{"required", json::array({"name", "arguments", "id"})},
});
});
auto schema = json {
{"type", "array"},
{"items", schemas.size() == 1 ? schemas[0] : json {{"anyOf", schemas}}},
{"minItems", 1},
};
if (!inputs.parallel_tool_calls) {
schema["maxItems"] = 1;
}
builder.add_rule("root", "\"[TOOL_CALLS]\" " + builder.add_schema("tool_calls", schema));
});
data.grammar_triggers.push_back({COMMON_GRAMMAR_TRIGGER_TYPE_WORD, "[TOOL_CALLS]"});
data.preserved_tokens = {
"[TOOL_CALLS]",
};
data.prompt = apply(tmpl, inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt);
data.format = COMMON_CHAT_FORMAT_MISTRAL_NEMO;
return data;
}
|
O3
|
cpp
|
common_chat_params_init_mistral_nemo(minja::chat_template const&, templates_params const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x0, (%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movb %al, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movups %xmm0, 0x80(%rdi)
movq %rax, 0x90(%rdi)
cmpl $0x1, 0x20(%rdx)
setne 0x48(%rdi)
leaq 0x38(%rsp), %rsi
movq %rax, 0x8(%rsi)
movq %rdx, (%rsi)
leaq 0xd97a(%rip), %rcx # 0xcf0a4
movq %rcx, 0x18(%rsi)
leaq 0xe2c9(%rip), %rcx # 0xcf9fe
movq %rcx, 0x10(%rsi)
leaq 0x58(%rsp), %rdx
movb %al, (%rdx)
leaq 0x8(%rsp), %rdi
callq 0x121e76
leaq 0x28(%rbx), %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0x23ba0
movq (%r12), %rdi
leaq 0x18(%rsp), %r13
cmpq %r13, %rdi
je 0xc1776
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x231f0
movq 0x48(%rsp), %rax
testq %rax, %rax
je 0xc178f
leaq 0x38(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x10(%rsp), %rdi
movl $0x1, -0x8(%rdi)
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x850fe(%rip), %rsi # 0x1468aa
leaq 0x85103(%rip), %rdx # 0x1468b6
callq 0x2cd14
leaq 0x50(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movl $0xffffffff, 0x28(%rsi) # imm = 0xFFFFFFFF
callq 0xd7628
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0xc17e4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x231f0
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x850b7(%rip), %rsi # 0x1468aa
leaq 0x850bc(%rip), %rdx # 0x1468b6
callq 0x2cd14
leaq 0x68(%rbx), %rdi
leaq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %rsi
callq 0xd786e
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xc1829
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x231f0
movzbl 0x10(%r14), %eax
testl %eax, %eax
je 0xc1859
cmpl $0x2, %eax
je 0xc183c
cmpl $0x1, %eax
jne 0xc1849
movq 0x18(%r14), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0xc1859
leaq 0x10(%r14), %rsi
leaq 0x38(%rsp), %rdi
callq 0xae812
jmp 0xc1886
leaq 0x38(%rsp), %r12
movb $0x0, (%r12)
movq $0x0, 0x8(%r12)
movq %r12, %rdi
movl $0x1, %esi
callq 0xaa5c4
movq %r12, %rdi
movl $0x1, %esi
callq 0xaa5c4
movzbl 0x60(%r14), %ebp
leaq 0x58(%rsp), %r12
movb $0x0, (%r12)
movq $0x0, 0x8(%r12)
movq %r12, %rdi
movl $0x1, %esi
callq 0xaa5c4
movq %r12, %rdi
movl $0x1, %esi
callq 0xaa5c4
leaq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rcx
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %r8d
movq %r12, %r9
callq 0xc19e1
leaq 0x8(%rbx), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x23ba0
movq (%r14), %rdi
cmpq %r13, %rdi
je 0xc18f9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x231f0
leaq 0x58(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0xaa5c4
movq %r14, %rdi
callq 0xaecde
leaq 0x38(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0xaa5c4
movq %r14, %rdi
callq 0xaecde
movl $0x2, (%rbx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc19a8
jmp 0xc19d9
movq %rax, %r14
leaq 0x58(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0xaa5c4
movq %r15, %rdi
callq 0xaecde
leaq 0x38(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0xaa5c4
movq %r15, %rdi
callq 0xaecde
jmp 0xc19ab
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xc19ab
movq 0x18(%rsp), %rsi
jmp 0xc199e
jmp 0xc19a8
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0xc19ab
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x231f0
jmp 0xc19ab
movq %rax, %r14
movq %rbx, %rdi
callq 0xd6e72
movq %r14, %rdi
callq 0x23ee0
movq %rax, %r14
movq 0x48(%rsp), %rax
testq %rax, %rax
je 0xc19ab
leaq 0x38(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xc19ab
movq %rax, %rdi
callq 0x2c93b
|
_ZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK16templates_params:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov dword ptr [rdi], 0
lea rax, [rdi+18h]
mov [rdi+8], rax
xor eax, eax
mov [rdi+10h], rax
mov [rdi+18h], al
lea rcx, [rdi+38h]
mov [rdi+28h], rcx
mov [rdi+30h], rax
mov [rdi+38h], al
xorps xmm0, xmm0
movups xmmword ptr [rdi+50h], xmm0
movups xmmword ptr [rdi+60h], xmm0
movups xmmword ptr [rdi+70h], xmm0
movups xmmword ptr [rdi+80h], xmm0
mov [rdi+90h], rax
cmp dword ptr [rdx+20h], 1
setnz byte ptr [rdi+48h]
lea rsi, [rsp+98h+var_60]
mov [rsi+8], rax
mov [rsi], rdx
lea rcx, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK16templates_paramsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,templates_params const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&)
mov [rsi+18h], rcx
lea rcx, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK16templates_paramsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,templates_params const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rcx
lea rdx, [rsp+98h+var_40]
mov [rdx], al
lea rdi, [rsp+98h+var_90]
call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)
lea rdi, [rbx+28h]
lea r12, [rsp+98h+var_90]
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r12]; void *
lea r13, [rsp+98h+var_80]
cmp rdi, r13
jz short loc_C1776
mov rsi, [rsp+98h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C1776:
mov rax, [rsp+98h+var_50]
test rax, rax
jz short loc_C178F
lea rdi, [rsp+98h+var_60]
mov rsi, rdi
mov edx, 3
call rax
loc_C178F:
lea rdi, [rsp+98h+var_88]
mov dword ptr [rdi-8], 1
lea r12, [rsp+98h+var_78]
mov [r12-10h], r12
lea rsi, aToolCalls_0; "[TOOL_CALLS]"
lea rdx, aToolCalls_0+0Ch; ""
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, [rbx+50h]
lea rsi, [rsp+98h+var_90]
mov dword ptr [rsi+28h], 0FFFFFFFFh
call _ZNSt6vectorI22common_grammar_triggerSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>(common_grammar_trigger &&)
mov rdi, [rsp+98h+var_88]; void *
cmp rdi, r12
jz short loc_C17E4
mov rsi, [rsp+98h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C17E4:
lea rdi, [rsp+98h+var_90]
mov [rdi], r13
lea rsi, aToolCalls_0; "[TOOL_CALLS]"
lea rdx, aToolCalls_0+0Ch; ""
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, [rbx+68h]
lea rdx, [rsp+98h+var_70]
lea rsi, [rsp+98h+var_90]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE13_M_assign_auxIPKS5_EEvT_SB_St20forward_iterator_tag; std::vector<std::string>::_M_assign_aux<std::string const*>(std::string const*,std::string const*,std::forward_iterator_tag)
mov rdi, [rsp+98h+var_90]; void *
cmp rdi, r13
jz short loc_C1829
mov rsi, [rsp+98h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C1829:
movzx eax, byte ptr [r14+10h]
test eax, eax
jz short loc_C1859
cmp eax, 2
jz short loc_C183C
cmp eax, 1
jnz short loc_C1849
loc_C183C:
mov rax, [r14+18h]
mov rcx, [rax]
cmp rcx, [rax+8]
jz short loc_C1859
loc_C1849:
lea rsi, [r14+10h]
lea rdi, [rsp+98h+var_60]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_C1886
loc_C1859:
lea r12, [rsp+98h+var_60]
mov byte ptr [r12], 0
mov qword ptr [r12+8], 0
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_C1886:
movzx ebp, byte ptr [r14+60h]
lea r12, [rsp+98h+var_40]
mov byte ptr [r12], 0
mov qword ptr [r12+8], 0
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
lea rdi, [rsp+98h+var_90]
lea rcx, [rsp+98h+var_60]
mov rsi, r15
mov rdx, r14
mov r8d, ebp
mov r9, r12
call _ZL5applyRKN5minja13chat_templateERKN8nlohmann16json_abi_v3_11_310basic_jsonINS4_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS4_14adl_serializerES7_IhSaIhEEvEESJ_bSJ_; apply(minja::chat_template const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
lea rdi, [rbx+8]
lea r14, [rsp+98h+var_90]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r13
jz short loc_C18F9
mov rsi, [rsp+98h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C18F9:
lea r14, [rsp+98h+var_40]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea r14, [rsp+98h+var_60]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov dword ptr [rbx], 2
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_C19A8
jmp loc_C19D9
mov r14, rax
lea r15, [rsp+98h+var_40]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea r15, [rsp+98h+var_60]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_C19AB
mov r14, rax
mov rdi, [rsp+98h+var_90]
cmp rdi, r13
jz short loc_C19AB
mov rsi, [rsp+98h+var_80]
jmp short loc_C199E
jmp short loc_C19A8
mov r14, rax
mov rdi, [rsp+98h+var_88]; void *
cmp rdi, r12
jz short loc_C19AB
mov rsi, [rsp+98h+var_78]
loc_C199E:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C19AB
loc_C19A8:
mov r14, rax
loc_C19AB:
mov rdi, rbx; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
mov rdi, r14
call __Unwind_Resume
mov r14, rax
mov rax, [rsp+98h+var_50]
test rax, rax
jz short loc_C19AB
lea rdi, [rsp+98h+var_60]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_C19AB
loc_C19D9:
mov rdi, rax
call __clang_call_terminate
|
long long common_chat_params_init_mistral_nemo(long long a1, int a2, long long a3)
{
int v4; // eax
int v5; // ebp
long long result; // rax
void *v7; // [rsp+8h] [rbp-90h] BYREF
void *v8; // [rsp+10h] [rbp-88h] BYREF
long long v9; // [rsp+18h] [rbp-80h] BYREF
long long v10; // [rsp+20h] [rbp-78h] BYREF
int v11; // [rsp+30h] [rbp-68h]
long long v12; // [rsp+38h] [rbp-60h] BYREF
long long v13; // [rsp+40h] [rbp-58h]
long long ( *v14)(); // [rsp+48h] [rbp-50h]
long long ( *v15)(); // [rsp+50h] [rbp-48h]
char v16[8]; // [rsp+58h] [rbp-40h] BYREF
long long v17; // [rsp+60h] [rbp-38h]
*(_DWORD *)a1 = 0;
*(_QWORD *)(a1 + 8) = a1 + 24;
*(_QWORD *)(a1 + 16) = 0LL;
*(_BYTE *)(a1 + 24) = 0;
*(_QWORD *)(a1 + 40) = a1 + 56;
*(_QWORD *)(a1 + 48) = 0LL;
*(_BYTE *)(a1 + 56) = 0;
*(_OWORD *)(a1 + 80) = 0LL;
*(_OWORD *)(a1 + 96) = 0LL;
*(_OWORD *)(a1 + 112) = 0LL;
*(_OWORD *)(a1 + 128) = 0LL;
*(_QWORD *)(a1 + 144) = 0LL;
*(_BYTE *)(a1 + 72) = *(_DWORD *)(a3 + 32) != 1;
v13 = 0LL;
v12 = a3;
v15 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,templates_params const&)::$_0>::_M_invoke;
v14 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,templates_params const&)::$_0>::_M_manager;
v16[0] = 0;
build_grammar[abi:cxx11](&v7, &v12, v16);
std::string::operator=(a1 + 40, &v7);
if ( v7 != &v9 )
operator delete(v7, v9 + 1);
if ( v14 )
((void ( *)(long long *, long long *, long long))v14)(&v12, &v12, 3LL);
LODWORD(v7) = 1;
v8 = &v10;
std::string::_M_construct<char const*>((long long)&v8, "[TOOL_CALLS]", (long long)"");
v11 = -1;
std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>(a1 + 80, &v7);
if ( v8 != &v10 )
operator delete(v8, v10 + 1);
v7 = &v9;
std::string::_M_construct<char const*>((long long)&v7, "[TOOL_CALLS]", (long long)"");
std::vector<std::string>::_M_assign_aux<std::string const*>(a1 + 104, &v7);
if ( v7 != &v9 )
operator delete(v7, v9 + 1);
v4 = *(unsigned __int8 *)(a3 + 16);
if ( !*(_BYTE *)(a3 + 16) || (v4 == 2 || v4 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) )
{
LOBYTE(v12) = 0;
v13 = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v12);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v12);
}
else
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(unsigned __int8 *)&v12,
(unsigned __int8 *)(a3 + 16));
}
v5 = *(unsigned __int8 *)(a3 + 96);
v16[0] = 0;
v17 = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v16);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v16);
apply((unsigned int)&v7, a2, a3, (unsigned int)&v12, v5, (unsigned int)v16);
std::string::operator=(a1 + 8, &v7);
if ( v7 != &v9 )
operator delete(v7, v9 + 1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v16);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v16);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v12);
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v12);
*(_DWORD *)a1 = 2;
return result;
}
|
common_chat_params_init_mistral_nemo:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV dword ptr [RDI],0x0
LEA RAX,[RDI + 0x18]
MOV qword ptr [RDI + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],RAX
MOV byte ptr [RDI + 0x18],AL
LEA RCX,[RDI + 0x38]
MOV qword ptr [RDI + 0x28],RCX
MOV qword ptr [RDI + 0x30],RAX
MOV byte ptr [RDI + 0x38],AL
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOVUPS xmmword ptr [RDI + 0x60],XMM0
MOVUPS xmmword ptr [RDI + 0x70],XMM0
MOVUPS xmmword ptr [RDI + 0x80],XMM0
MOV qword ptr [RDI + 0x90],RAX
CMP dword ptr [RDX + 0x20],0x1
SETNZ byte ptr [RDI + 0x48]
LEA RSI,[RSP + 0x38]
MOV qword ptr [RSI + 0x8],RAX
MOV qword ptr [RSI],RDX
LEA RCX,[0x1cf0a4]
MOV qword ptr [RSI + 0x18],RCX
LEA RCX,[0x1cf9fe]
MOV qword ptr [RSI + 0x10],RCX
LEA RDX,[RSP + 0x58]
MOV byte ptr [RDX],AL
LAB_001c1740:
LEA RDI,[RSP + 0x8]
CALL 0x00221e76
LEA RDI,[RBX + 0x28]
LEA R12,[RSP + 0x8]
MOV RSI,R12
CALL 0x00123ba0
MOV RDI,qword ptr [R12]
LEA R13,[RSP + 0x18]
CMP RDI,R13
JZ 0x001c1776
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001231f0
LAB_001c1776:
MOV RAX,qword ptr [RSP + 0x48]
TEST RAX,RAX
JZ 0x001c178f
LAB_001c1780:
LEA RDI,[RSP + 0x38]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001c178f:
LEA RDI,[RSP + 0x10]
MOV dword ptr [RDI + -0x8],0x1
LEA R12,[RSP + 0x20]
MOV qword ptr [R12 + -0x10],R12
LAB_001c17a5:
LEA RSI,[0x2468aa]
LEA RDX,[0x2468b6]
CALL 0x0012cd14
LEA RDI,[RBX + 0x50]
LEA RSI,[RSP + 0x8]
MOV dword ptr [RSI + 0x28],0xffffffff
LAB_001c17c8:
CALL 0x001d7628
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R12
JZ 0x001c17e4
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001231f0
LAB_001c17e4:
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R13
LAB_001c17ec:
LEA RSI,[0x2468aa]
LEA RDX,[0x2468b6]
CALL 0x0012cd14
LEA RDI,[RBX + 0x68]
LEA RDX,[RSP + 0x28]
LAB_001c1808:
LEA RSI,[RSP + 0x8]
CALL 0x001d786e
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x001c1829
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001231f0
LAB_001c1829:
MOVZX EAX,byte ptr [R14 + 0x10]
TEST EAX,EAX
JZ 0x001c1859
CMP EAX,0x2
JZ 0x001c183c
CMP EAX,0x1
JNZ 0x001c1849
LAB_001c183c:
MOV RAX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RAX]
CMP RCX,qword ptr [RAX + 0x8]
JZ 0x001c1859
LAB_001c1849:
LEA RSI,[R14 + 0x10]
LEA RDI,[RSP + 0x38]
CALL 0x001ae812
JMP 0x001c1886
LAB_001c1859:
LEA R12,[RSP + 0x38]
MOV byte ptr [R12],0x0
MOV qword ptr [R12 + 0x8],0x0
MOV RDI,R12
MOV ESI,0x1
CALL 0x001aa5c4
MOV RDI,R12
MOV ESI,0x1
CALL 0x001aa5c4
LAB_001c1886:
MOVZX EBP,byte ptr [R14 + 0x60]
LEA R12,[RSP + 0x58]
MOV byte ptr [R12],0x0
MOV qword ptr [R12 + 0x8],0x0
MOV RDI,R12
MOV ESI,0x1
CALL 0x001aa5c4
MOV RDI,R12
MOV ESI,0x1
CALL 0x001aa5c4
LAB_001c18b8:
LEA RDI,[RSP + 0x8]
LEA RCX,[RSP + 0x38]
MOV RSI,R15
MOV RDX,R14
MOV R8D,EBP
MOV R9,R12
CALL 0x001c19e1
LAB_001c18d3:
LEA RDI,[RBX + 0x8]
LEA R14,[RSP + 0x8]
MOV RSI,R14
CALL 0x00123ba0
MOV RDI,qword ptr [R14]
CMP RDI,R13
JZ 0x001c18f9
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001231f0
LAB_001c18f9:
LEA R14,[RSP + 0x58]
MOV RDI,R14
XOR ESI,ESI
CALL 0x001aa5c4
MOV RDI,R14
CALL 0x001aecde
LEA R14,[RSP + 0x38]
MOV RDI,R14
XOR ESI,ESI
CALL 0x001aa5c4
MOV RDI,R14
CALL 0x001aecde
MOV dword ptr [RBX],0x2
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_params_init_mistral_nemo(minja::chat_template const&, templates_params const&) */
void common_chat_params_init_mistral_nemo(chat_template *param_1,templates_params *param_2)
{
basic_json bVar1;
basic_json *in_RDX;
long *local_90;
long *local_88;
long local_80;
long local_78;
int1 local_70 [8];
int4 local_68;
basic_json *local_60;
int8 local_58;
code *local_50;
code *local_48;
data local_40 [8];
int8 local_38;
*(int4 *)param_1 = 0;
*(chat_template **)(param_1 + 8) = param_1 + 0x18;
*(int8 *)(param_1 + 0x10) = 0;
param_1[0x18] = (chat_template)0x0;
*(chat_template **)(param_1 + 0x28) = param_1 + 0x38;
*(int8 *)(param_1 + 0x30) = 0;
param_1[0x38] = (chat_template)0x0;
*(int8 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x68) = 0;
*(int8 *)(param_1 + 0x70) = 0;
*(int8 *)(param_1 + 0x78) = 0;
*(int8 *)(param_1 + 0x80) = 0;
*(int8 *)(param_1 + 0x88) = 0;
*(int8 *)(param_1 + 0x90) = 0;
param_1[0x48] = (chat_template)(*(int *)(in_RDX + 0x20) != 1);
local_58 = 0;
local_48 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_mistral_nemo(minja::chat_template_const&,templates_params_const&)::$_0>
::_M_invoke;
local_50 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_mistral_nemo(minja::chat_template_const&,templates_params_const&)::$_0>
::_M_manager;
local_40[0] = (data)0x0;
/* try { // try from 001c1740 to 001c1749 has its CatchHandler @ 001c19bb */
local_60 = in_RDX;
build_grammar_abi_cxx11_((function *)&local_90,(common_grammar_options *)&local_60);
std::__cxx11::string::operator=((string *)(param_1 + 0x28),(string *)&local_90);
if (local_90 != &local_80) {
operator_delete(local_90,local_80 + 1);
}
if (local_50 != (code *)0x0) {
/* try { // try from 001c1780 to 001c178e has its CatchHandler @ 001c193e */
(*local_50)(&local_60,&local_60,3);
}
local_90 = (long *)CONCAT44(local_90._4_4_,1);
local_88 = &local_78;
/* try { // try from 001c17a5 to 001c17b7 has its CatchHandler @ 001c19a8 */
std::__cxx11::string::_M_construct<char_const*>(&local_88,"[TOOL_CALLS]","");
local_68 = 0xffffffff;
/* try { // try from 001c17c8 to 001c17cc has its CatchHandler @ 001c198c */
std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>::
emplace_back<common_grammar_trigger>
((vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> *)
(param_1 + 0x50),(common_grammar_trigger *)&local_90);
if (local_88 != &local_78) {
operator_delete(local_88,local_78 + 1);
}
local_90 = &local_80;
/* try { // try from 001c17ec to 001c17fe has its CatchHandler @ 001c198a */
std::__cxx11::string::_M_construct<char_const*>(&local_90,"[TOOL_CALLS]","");
/* try { // try from 001c1808 to 001c1811 has its CatchHandler @ 001c1976 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
_M_assign_aux<std::__cxx11::string_const*>(param_1 + 0x68,&local_90,local_70);
if (local_90 != &local_80) {
operator_delete(local_90,local_80 + 1);
}
bVar1 = in_RDX[0x10];
if ((bVar1 == (basic_json)0x0) ||
(((bVar1 == (basic_json)0x2 || (bVar1 == (basic_json)0x1)) &&
(**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) {
local_60 = (basic_json *)((ulong)local_60 & 0xffffffffffffff00);
local_58 = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_60,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_60,0));
}
else {
/* try { // try from 001c1849 to 001c1856 has its CatchHandler @ 001c193c */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)&local_60,in_RDX + 0x10);
}
bVar1 = in_RDX[0x60];
local_40[0] = (data)0x0;
local_38 = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
/* try { // try from 001c18b8 to 001c18d2 has its CatchHandler @ 001c1943 */
apply((chat_template *)&local_90,(basic_json *)param_2,in_RDX,SUB81(&local_60,0),
(basic_json *)(ulong)(byte)bVar1);
std::__cxx11::string::operator=((string *)(param_1 + 8),(string *)&local_90);
if (local_90 != &local_80) {
operator_delete(local_90,local_80 + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_60,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_60);
*(int4 *)param_1 = 2;
return;
}
|
|
14,774
|
my_close
|
eloqsql/mysys/my_open.c
|
int my_close(File fd, myf MyFlags)
{
int err;
char *name= NULL;
DBUG_ENTER("my_close");
DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE)))
MyFlags|= my_global_flags;
if ((uint) fd < my_file_limit && my_file_info[fd].type != UNOPEN)
{
name= my_file_info[fd].name;
my_file_info[fd].name= NULL;
my_file_info[fd].type= UNOPEN;
}
#ifndef _WIN32
err= close(fd);
#else
err= my_win_close(fd);
#endif
if (err)
{
DBUG_PRINT("error",("Got error %d on close",err));
my_errno=errno;
if (MyFlags & (MY_FAE | MY_WME))
my_error(EE_BADCLOSE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
name,errno);
}
if (name)
{
my_free(name);
}
my_atomic_add32_explicit(&my_file_opened, -1, MY_MEMORY_ORDER_RELAXED);
DBUG_RETURN(err);
}
|
O0
|
c
|
my_close:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
jmp 0x37c69
movq -0x10(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
jne 0x37c89
leaq 0x3c756a(%rip), %rax # 0x3ff1e8
movq (%rax), %rax
orq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %eax
leaq 0x20eced(%rip), %rcx # 0x246980
cmpl (%rcx), %eax
jae 0x37d06
leaq 0x20ecea(%rip), %rax # 0x246988
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
je 0x37d06
leaq 0x20eccf(%rip), %rax # 0x246988
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
leaq 0x20ecb3(%rip), %rax # 0x246988
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
leaq 0x20ec97(%rip), %rax # 0x246988
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movl -0x4(%rbp), %edi
callq 0x296f0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x37d74
jmp 0x37d19
jmp 0x37d1b
callq 0x29040
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
callq 0x38d10
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0x37d72
movq -0x10(%rbp), %rax
andq $0x440, %rax # imm = 0x440
orq $0x4, %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x29040
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl (%rax), %ecx
movl $0x4, %edi
movb $0x0, %al
callq 0x315c0
jmp 0x37d74
cmpq $0x0, -0x20(%rbp)
je 0x37d84
movq -0x20(%rbp), %rdi
callq 0x37410
movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF
movl -0x24(%rbp), %eax
leaq 0x3c745f(%rip), %rcx # 0x3ff1f4
lock
xaddl %eax, (%rcx)
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_close:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_20], 0
jmp short $+2
loc_37C69:
mov rax, [rbp+var_10]
and rax, 18h
cmp rax, 0
jnz short loc_37C89
lea rax, my_global_flags
mov rax, [rax]
or rax, [rbp+var_10]
mov [rbp+var_10], rax
loc_37C89:
mov eax, [rbp+var_4]
lea rcx, my_file_limit
cmp eax, [rcx]
jnb short loc_37D06
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_4]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+8], 0
jz short loc_37D06
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_4]
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_20], rax
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_4]
shl rcx, 4
add rax, rcx
mov qword ptr [rax], 0
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_4]
shl rcx, 4
add rax, rcx
mov dword ptr [rax+8], 0
loc_37D06:
mov edi, [rbp+var_4]
call _close
mov [rbp+var_14], eax
cmp [rbp+var_14], 0
jz short loc_37D74
jmp short $+2
loc_37D19:
jmp short $+2
loc_37D1B:
call ___errno_location
mov eax, [rax]
mov [rbp+var_2C], eax
call _my_thread_var
mov ecx, [rbp+var_2C]
mov [rax], ecx
mov rax, [rbp+var_10]
and rax, 18h
cmp rax, 0
jz short loc_37D72
mov rax, [rbp+var_10]
and rax, 440h
or rax, 4
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
call ___errno_location
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
mov ecx, [rax]
mov edi, 4
mov al, 0
call my_error
loc_37D72:
jmp short $+2
loc_37D74:
cmp [rbp+var_20], 0
jz short loc_37D84
mov rdi, [rbp+var_20]
call my_free
loc_37D84:
mov [rbp+var_24], 0FFFFFFFFh
mov eax, [rbp+var_24]
lea rcx, my_file_opened
lock xadd [rcx], eax
mov [rbp+var_28], eax
mov eax, [rbp+var_14]
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
add rsp, 50h
pop rbp
retn
|
long long my_close(unsigned int a1, __int16 a2, double a3)
{
unsigned int *v3; // rax
int v5; // [rsp+24h] [rbp-2Ch]
long long v6; // [rsp+30h] [rbp-20h]
unsigned int v7; // [rsp+3Ch] [rbp-14h]
__int16 v8; // [rsp+40h] [rbp-10h]
v8 = a2;
v6 = 0LL;
if ( (a2 & 0x18) == 0 )
v8 = a2 | my_global_flags;
if ( a1 < my_file_limit && *((_DWORD *)my_file_info + 4 * (int)a1 + 2) )
{
v6 = *((_QWORD *)my_file_info + 2 * (int)a1);
*((_QWORD *)my_file_info + 2 * (int)a1) = 0LL;
*((_DWORD *)my_file_info + 4 * (int)a1 + 2) = 0;
}
v7 = close(a1);
if ( v7 )
{
v5 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(a3) = v5;
if ( (v8 & 0x18) != 0 )
{
v3 = (unsigned int *)__errno_location();
my_error(4u, v8 & 0x440 | 4LL, v6, *v3);
}
}
if ( v6 )
my_free(v6);
_InterlockedExchangeAdd(my_file_opened, 0xFFFFFFFF);
return v7;
}
|
my_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x20],0x0
JMP 0x00137c69
LAB_00137c69:
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x18
CMP RAX,0x0
JNZ 0x00137c89
LEA RAX,[0x4ff1e8]
MOV RAX,qword ptr [RAX]
OR RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
LAB_00137c89:
MOV EAX,dword ptr [RBP + -0x4]
LEA RCX,[0x346980]
CMP EAX,dword ptr [RCX]
JNC 0x00137d06
LEA RAX,[0x346988]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x4]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x8],0x0
JZ 0x00137d06
LEA RAX,[0x346988]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x4]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[0x346988]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x4]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RAX],0x0
LEA RAX,[0x346988]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x4]
SHL RCX,0x4
ADD RAX,RCX
MOV dword ptr [RAX + 0x8],0x0
LAB_00137d06:
MOV EDI,dword ptr [RBP + -0x4]
CALL 0x001296f0
MOV dword ptr [RBP + -0x14],EAX
CMP dword ptr [RBP + -0x14],0x0
JZ 0x00137d74
JMP 0x00137d19
LAB_00137d19:
JMP 0x00137d1b
LAB_00137d1b:
CALL 0x00129040
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CALL 0x00138d10
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x18
CMP RAX,0x0
JZ 0x00137d72
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x440
OR RAX,0x4
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
CALL 0x00129040
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX]
MOV EDI,0x4
MOV AL,0x0
CALL 0x001315c0
LAB_00137d72:
JMP 0x00137d74
LAB_00137d74:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00137d84
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00137410
LAB_00137d84:
MOV dword ptr [RBP + -0x24],0xffffffff
MOV EAX,dword ptr [RBP + -0x24]
LEA RCX,[0x4ff1f4]
XADD.LOCK dword ptr [RCX],EAX
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x44]
ADD RSP,0x50
POP RBP
RET
|
int my_close(uint param_1,ulong param_2)
{
int iVar1;
int iVar2;
int *piVar3;
long local_28;
ulong local_18;
local_28 = 0;
local_18 = param_2;
if ((param_2 & 0x18) == 0) {
local_18 = my_global_flags | param_2;
}
if ((param_1 < my_file_limit) && (*(int *)(my_file_info + (long)(int)param_1 * 0x10 + 8) != 0)) {
local_28 = *(long *)(my_file_info + (long)(int)param_1 * 0x10);
*(int8 *)(my_file_info + (long)(int)param_1 * 0x10) = 0;
*(int4 *)(my_file_info + (long)(int)param_1 * 0x10 + 8) = 0;
}
iVar2 = close(param_1);
if (iVar2 != 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if ((local_18 & 0x18) != 0) {
piVar3 = __errno_location();
my_error(4,local_18 & 0x440 | 4,local_28,*piVar3);
}
}
if (local_28 != 0) {
my_free(local_28);
}
LOCK();
my_file_opened = my_file_opened + -1;
UNLOCK();
return iVar2;
}
|
|
14,775
|
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;
}
|
O0
|
c
|
get_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x1bbfe9(%rip), %rax # 0x217df0
movq 0x40(%rax), %rax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x5be62
movq -0x10(%rbp), %rax
imulq $0xa, (%rax), %rcx
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
movl %eax, %eax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x5be52
movq -0x18(%rbp), %rax
movl (%rax), %ecx
orl $0x4, %ecx
movl %ecx, (%rax)
jmp 0x5be54
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x5be00
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
|
get_length:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
loc_5BE00:
lea rax, my_charset_latin1
mov rax, [rax+40h]
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 4
cmp eax, 0
jz short loc_5BE62
mov rax, [rbp+var_10]
imul rcx, [rax], 0Ah
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
sub eax, 30h ; '0'
mov eax, eax
add rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_5BE52
mov rax, [rbp+var_18]
mov ecx, [rax]
or ecx, 4
mov [rax], ecx
loc_5BE52:
jmp short $+2
loc_5BE54:
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
jmp short loc_5BE00
loc_5BE62:
mov rax, [rbp+var_8]
pop rbp
retn
|
unsigned __int8 * get_length(unsigned __int8 *a1, _QWORD *a2, _DWORD *a3)
{
while ( (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + *a1 + 1LL) & 4) != 0 )
{
*a2 = (unsigned int)((char)*a1 - 48) + 10LL * *a2;
if ( !*a2 )
*a3 |= 4u;
++a1;
}
return a1;
}
|
get_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LAB_0015be00:
LEA RAX,[0x317df0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x4
CMP EAX,0x0
JZ 0x0015be62
MOV RAX,qword ptr [RBP + -0x10]
IMUL RCX,qword ptr [RAX],0xa
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
SUB EAX,0x30
MOV EAX,EAX
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x0015be52
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX]
OR ECX,0x4
MOV dword ptr [RAX],ECX
LAB_0015be52:
JMP 0x0015be54
LAB_0015be54:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0015be00
LAB_0015be62:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
byte * get_length(byte *param_1,long *param_2,uint *param_3)
{
byte *local_10;
local_10 = param_1;
while ((PTR_ctype_latin1_00317e30[(ulong)*local_10 + 1] & 4) != 0) {
*param_2 = *param_2 * 10 + (ulong)((int)(char)*local_10 - 0x30);
if (*param_2 == 0) {
*param_3 = *param_3 | 4;
}
local_10 = local_10 + 1;
}
return local_10;
}
|
|
14,776
|
my_error_unregister_all
|
eloqsql/mysys/my_error.c
|
void my_error_unregister_all(void)
{
struct my_err_head *cursor, *saved_next;
for (cursor= my_errmsgs_globerrs.meh_next; cursor != NULL; cursor= saved_next)
{
/* We need this ptr, but we're about to free its container, so save it. */
saved_next= cursor->meh_next;
my_free(cursor);
}
my_errmsgs_globerrs.meh_next= NULL; /* Freed in first iteration above. */
my_errmsgs_list= &my_errmsgs_globerrs;
}
|
O0
|
c
|
my_error_unregister_all:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x1bbaa9(%rip), %rax # 0x233978
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x77ef8
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7d560
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x77ed3
movq $0x0, 0x1bba75(%rip) # 0x233978
leaq 0x1bba6e(%rip), %rax # 0x233978
movq %rax, 0x1bba5f(%rip) # 0x233970
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_error_unregister_all:
push rbp
mov rbp, rsp
sub rsp, 10h
mov rax, cs:my_errmsgs_globerrs
mov [rbp+var_8], rax
loc_77ED3:
cmp [rbp+var_8], 0
jz short loc_77EF8
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
mov rdi, [rbp+var_8]
call my_free
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
jmp short loc_77ED3
loc_77EF8:
mov cs:my_errmsgs_globerrs, 0
lea rax, my_errmsgs_globerrs
mov cs:my_errmsgs_list, rax
add rsp, 10h
pop rbp
retn
|
long long *my_error_unregister_all()
{
long long *result; // rax
_QWORD *v1; // [rsp+0h] [rbp-10h]
_QWORD *i; // [rsp+8h] [rbp-8h]
for ( i = (_QWORD *)my_errmsgs_globerrs; i; i = v1 )
{
v1 = (_QWORD *)*i;
my_free(i);
}
my_errmsgs_globerrs = 0LL;
result = &my_errmsgs_globerrs;
my_errmsgs_list = &my_errmsgs_globerrs;
return result;
}
|
my_error_unregister_all:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,qword ptr [0x00333978]
MOV qword ptr [RBP + -0x8],RAX
LAB_00177ed3:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x00177ef8
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0017d560
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00177ed3
LAB_00177ef8:
MOV qword ptr [0x00333978],0x0
LEA RAX,[0x333978]
MOV qword ptr [0x00333970],RAX
ADD RSP,0x10
POP RBP
RET
|
void my_error_unregister_all(void)
{
int8 *puVar1;
int8 *local_10;
local_10 = my_errmsgs_globerrs;
while (local_10 != (int8 *)0x0) {
puVar1 = (int8 *)*local_10;
my_free(local_10);
local_10 = puVar1;
}
my_errmsgs_globerrs = (int8 *)0x0;
my_errmsgs_list = (int *)&my_errmsgs_globerrs;
return;
}
|
|
14,777
|
unreg_request
|
eloqsql/storage/maria/ma_pagecache.c
|
static void unreg_request(PAGECACHE *pagecache,
PAGECACHE_BLOCK_LINK *block, int at_end)
{
DBUG_ENTER("unreg_request");
DBUG_PRINT("enter", ("block %p (%u) status: %x requests: %u",
block, PCBLOCK_NUMBER(pagecache, block),
block->status, block->requests));
PCBLOCK_INFO(block);
DBUG_ASSERT(block->requests > 0);
if (! --block->requests)
{
my_bool hot;
if (block->hits_left)
block->hits_left--;
hot= !block->hits_left && at_end &&
pagecache->warm_blocks > pagecache->min_warm_blocks;
if (hot)
{
if (block->temperature == PCBLOCK_WARM)
pagecache->warm_blocks--;
block->temperature= PCBLOCK_HOT;
KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %zu",
pagecache->warm_blocks));
}
link_block(pagecache, block, hot, (my_bool)at_end);
block->last_hit_time= pagecache->time;
pagecache->time++;
block= pagecache->used_ins;
/* Check if we should link a hot block to the warm block */
if (block && pagecache->time - block->last_hit_time >
pagecache->age_threshold)
{
unlink_block(pagecache, block);
link_block(pagecache, block, 0, 0);
if (block->temperature != PCBLOCK_WARM)
{
pagecache->warm_blocks++;
block->temperature= PCBLOCK_WARM;
}
KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %zu",
pagecache->warm_blocks));
}
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
unreg_request:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
jmp 0x2e7c5
jmp 0x2e7c7
jmp 0x2e7c9
jmp 0x2e7cb
jmp 0x2e7cd
movq -0x10(%rbp), %rcx
movl 0x60(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x60(%rcx)
cmpl $0x0, %eax
jne 0x2e924
movq -0x10(%rbp), %rax
cmpl $0x0, 0x80(%rax)
je 0x2e803
movq -0x10(%rbp), %rax
movl 0x80(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x80(%rax)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x80(%rcx)
movb %al, -0x16(%rbp)
jne 0x2e836
xorl %eax, %eax
cmpl $0x0, -0x14(%rbp)
movb %al, -0x16(%rbp)
je 0x2e836
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
seta %al
movb %al, -0x16(%rbp)
movb -0x16(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x15(%rbp)
cmpb $0x0, -0x15(%rbp)
je 0x2e870
movq -0x10(%rbp), %rax
cmpl $0x1, 0x78(%rax)
jne 0x2e861
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x60(%rax)
movq -0x10(%rbp), %rax
movl $0x2, 0x78(%rax)
jmp 0x2e86e
jmp 0x2e870
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movb -0x15(%rbp), %cl
movl -0x14(%rbp), %eax
movsbl %cl, %edx
movsbl %al, %ecx
callq 0x32810
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2e922
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x40(%rcx), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x2e922
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x32250
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x32810
movq -0x10(%rbp), %rax
cmpl $0x1, 0x78(%rax)
je 0x2e91c
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x60(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x78(%rax)
jmp 0x2e91e
jmp 0x2e920
jmp 0x2e922
jmp 0x2e924
jmp 0x2e926
jmp 0x2e928
addq $0x20, %rsp
popq %rbp
retq
nop
|
unreg_request:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
jmp short $+2
loc_2E7C5:
jmp short $+2
loc_2E7C7:
jmp short $+2
loc_2E7C9:
jmp short $+2
loc_2E7CB:
jmp short $+2
loc_2E7CD:
mov rcx, [rbp+var_10]
mov eax, [rcx+60h]
add eax, 0FFFFFFFFh
mov [rcx+60h], eax
cmp eax, 0
jnz loc_2E924
mov rax, [rbp+var_10]
cmp dword ptr [rax+80h], 0
jz short loc_2E803
mov rax, [rbp+var_10]
mov ecx, [rax+80h]
add ecx, 0FFFFFFFFh
mov [rax+80h], ecx
loc_2E803:
mov rcx, [rbp+var_10]
xor eax, eax
cmp dword ptr [rcx+80h], 0
mov [rbp+var_16], al
jnz short loc_2E836
xor eax, eax
cmp [rbp+var_14], 0
mov [rbp+var_16], al
jz short loc_2E836
mov rax, [rbp+var_8]
mov rax, [rax+60h]
mov rcx, [rbp+var_8]
cmp rax, [rcx+8]
setnbe al
mov [rbp+var_16], al
loc_2E836:
mov al, [rbp+var_16]
and al, 1
movzx eax, al
mov [rbp+var_15], al
cmp [rbp+var_15], 0
jz short loc_2E870
mov rax, [rbp+var_10]
cmp dword ptr [rax+78h], 1
jnz short loc_2E861
mov rax, [rbp+var_8]
mov rcx, [rax+60h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+60h], rcx
loc_2E861:
mov rax, [rbp+var_10]
mov dword ptr [rax+78h], 2
jmp short $+2
loc_2E86E:
jmp short $+2
loc_2E870:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov cl, [rbp+var_15]
mov eax, [rbp+var_14]
movsx edx, cl
movsx ecx, al
call link_block
mov rax, [rbp+var_8]
mov rcx, [rax+18h]
mov rax, [rbp+var_10]
mov [rax+40h], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+18h]
add rcx, 1
mov [rax+18h], rcx
mov rax, [rbp+var_8]
mov rax, [rax+0C0h]
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jz short loc_2E922
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov rcx, [rbp+var_10]
sub rax, [rcx+40h]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jbe short loc_2E922
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call unlink_block
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
xor ecx, ecx
mov edx, ecx
call link_block
mov rax, [rbp+var_10]
cmp dword ptr [rax+78h], 1
jz short loc_2E91C
mov rax, [rbp+var_8]
mov rcx, [rax+60h]
add rcx, 1
mov [rax+60h], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+78h], 1
loc_2E91C:
jmp short $+2
loc_2E91E:
jmp short $+2
loc_2E920:
jmp short $+2
loc_2E922:
jmp short $+2
loc_2E924:
jmp short $+2
loc_2E926:
jmp short $+2
loc_2E928:
add rsp, 20h
pop rbp
retn
|
unsigned long long unreg_request(_QWORD *a1, long long a2, int a3)
{
unsigned long long result; // rax
bool v4; // [rsp+Ah] [rbp-16h]
unsigned long long v5; // [rsp+10h] [rbp-10h]
result = (unsigned int)(*(_DWORD *)(a2 + 96) - 1);
*(_DWORD *)(a2 + 96) = result;
if ( !(_DWORD)result )
{
if ( *(_DWORD *)(a2 + 128) )
--*(_DWORD *)(a2 + 128);
v4 = 0;
if ( !*(_DWORD *)(a2 + 128) )
{
v4 = 0;
if ( a3 )
v4 = a1[12] > a1[1];
}
if ( v4 )
{
if ( *(_DWORD *)(a2 + 120) == 1 )
--a1[12];
*(_DWORD *)(a2 + 120) = 2;
}
link_block(a1, a2, v4, (unsigned int)(char)a3);
*(_QWORD *)(a2 + 64) = a1[3]++;
result = a1[24];
v5 = result;
if ( result )
{
result = a1[3] - *(_QWORD *)(result + 64);
if ( result > a1[2] )
{
unlink_block(a1, v5);
link_block(a1, v5, 0LL, 0LL);
result = v5;
if ( *(_DWORD *)(v5 + 120) != 1 )
{
++a1[12];
result = v5;
*(_DWORD *)(v5 + 120) = 1;
}
}
}
}
return result;
}
|
unreg_request:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
JMP 0x0012e7c5
LAB_0012e7c5:
JMP 0x0012e7c7
LAB_0012e7c7:
JMP 0x0012e7c9
LAB_0012e7c9:
JMP 0x0012e7cb
LAB_0012e7cb:
JMP 0x0012e7cd
LAB_0012e7cd:
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RCX + 0x60]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x60],EAX
CMP EAX,0x0
JNZ 0x0012e924
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x80],0x0
JZ 0x0012e803
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x80]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x80],ECX
LAB_0012e803:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP dword ptr [RCX + 0x80],0x0
MOV byte ptr [RBP + -0x16],AL
JNZ 0x0012e836
XOR EAX,EAX
CMP dword ptr [RBP + -0x14],0x0
MOV byte ptr [RBP + -0x16],AL
JZ 0x0012e836
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x60]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x8]
SETA AL
MOV byte ptr [RBP + -0x16],AL
LAB_0012e836:
MOV AL,byte ptr [RBP + -0x16]
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x15],AL
CMP byte ptr [RBP + -0x15],0x0
JZ 0x0012e870
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x78],0x1
JNZ 0x0012e861
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x60]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x60],RCX
LAB_0012e861:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x78],0x2
JMP 0x0012e86e
LAB_0012e86e:
JMP 0x0012e870
LAB_0012e870:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV CL,byte ptr [RBP + -0x15]
MOV EAX,dword ptr [RBP + -0x14]
MOVSX EDX,CL
MOVSX ECX,AL
CALL 0x00132810
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x18]
ADD RCX,0x1
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xc0]
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0012e922
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,qword ptr [RCX + 0x40]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JBE 0x0012e922
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00132250
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
XOR ECX,ECX
MOV EDX,ECX
CALL 0x00132810
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x78],0x1
JZ 0x0012e91c
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x60]
ADD RCX,0x1
MOV qword ptr [RAX + 0x60],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x78],0x1
LAB_0012e91c:
JMP 0x0012e91e
LAB_0012e91e:
JMP 0x0012e920
LAB_0012e920:
JMP 0x0012e922
LAB_0012e922:
JMP 0x0012e924
LAB_0012e924:
JMP 0x0012e926
LAB_0012e926:
JMP 0x0012e928
LAB_0012e928:
ADD RSP,0x20
POP RBP
RET
|
void unreg_request(long param_1,long param_2,int param_3)
{
long lVar1;
int iVar2;
bool local_1e;
iVar2 = *(int *)(param_2 + 0x60) + -1;
*(int *)(param_2 + 0x60) = iVar2;
if (iVar2 == 0) {
if (*(int *)(param_2 + 0x80) != 0) {
*(int *)(param_2 + 0x80) = *(int *)(param_2 + 0x80) + -1;
}
local_1e = false;
if ((*(int *)(param_2 + 0x80) == 0) && (local_1e = false, param_3 != 0)) {
local_1e = *(ulong *)(param_1 + 8) < *(ulong *)(param_1 + 0x60);
}
if (local_1e != false) {
if (*(int *)(param_2 + 0x78) == 1) {
*(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + -1;
}
*(int4 *)(param_2 + 0x78) = 2;
}
link_block(param_1,param_2,local_1e,(int)(char)param_3);
*(int8 *)(param_2 + 0x40) = *(int8 *)(param_1 + 0x18);
*(long *)(param_1 + 0x18) = *(long *)(param_1 + 0x18) + 1;
lVar1 = *(long *)(param_1 + 0xc0);
if ((lVar1 != 0) &&
(*(ulong *)(param_1 + 0x10) < (ulong)(*(long *)(param_1 + 0x18) - *(long *)(lVar1 + 0x40))))
{
unlink_block(param_1,lVar1);
link_block(param_1,lVar1,0);
if (*(int *)(lVar1 + 0x78) != 1) {
*(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + 1;
*(int4 *)(lVar1 + 0x78) = 1;
}
}
}
return;
}
|
|
14,778
|
js_date_setTime
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_date_setTime(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
// setTime(v)
double v;
if (JS_ThisTimeValue(ctx, &v, this_val) || JS_ToFloat64(ctx, &v, argv[0]))
return JS_EXCEPTION;
return JS_SetThisTimeValue(ctx, this_val, time_clip(v));
}
|
O1
|
c
|
js_date_setTime:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r13
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x55df8
movl $0x6, %r12d
testl %eax, %eax
jne 0x559ac
movq (%r13), %rdx
movq 0x8(%r13), %rcx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x26a6d
testl %eax, %eax
je 0x559bf
xorl %eax, %eax
movq %r12, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movsd 0x8(%rsp), %xmm0
movapd 0x47693(%rip), %xmm1 # 0x9d060
andpd %xmm0, %xmm1
movsd 0x477ff(%rip), %xmm2 # 0x9d1d8
ucomisd %xmm1, %xmm2
jae 0x559e9
movsd 0x477f9(%rip), %xmm0 # 0x9d1e0
jmp 0x559fa
callq 0xe140
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
addsd %xmm1, %xmm0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x56328
movq %rdx, %r12
jmp 0x559ae
|
js_date_setTime:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r13, r8
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea rsi, [rsp+38h+var_30]
mov rdx, r14
mov rcx, rbx
call JS_ThisTimeValue
mov r12d, 6
test eax, eax
jnz short loc_559AC
mov rdx, [r13+0]
mov rcx, [r13+8]
lea rsi, [rsp+38h+var_30]
mov rdi, r15
call JS_ToFloat64
test eax, eax
jz short loc_559BF
loc_559AC:
xor eax, eax
loc_559AE:
mov rdx, r12
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_559BF:
movsd xmm0, [rsp+38h+var_30]
movapd xmm1, cs:xmmword_9D060
andpd xmm1, xmm0
movsd xmm2, cs:qword_9D1D8
ucomisd xmm2, xmm1
jnb short loc_559E9
movsd xmm0, cs:qword_9D1E0
jmp short loc_559FA
loc_559E9:
call _trunc
movapd xmm1, xmm0
xorpd xmm0, xmm0
addsd xmm0, xmm1
loc_559FA:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_SetThisTimeValue
mov r12, rdx
jmp short loc_559AE
|
long long js_date_setTime(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long v7; // rdx
double v9; // xmm0_8
double v10[6]; // [rsp+8h] [rbp-30h] BYREF
if ( (unsigned int)JS_ThisTimeValue(a1, v10, a2, a3)
|| (unsigned int)JS_ToFloat64(a1, v10, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) )
{
return 0LL;
}
if ( fabs(v10[0]) <= 8.64e15 )
v9 = trunc(a1, v10, v7) + 0.0;
else
v9 = NAN;
return JS_SetThisTimeValue(a1, a2, a3, v9);
}
|
js_date_setTime:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R13,R8
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA RSI,[RSP + 0x8]
MOV RDX,R14
MOV RCX,RBX
CALL 0x00155df8
MOV R12D,0x6
TEST EAX,EAX
JNZ 0x001559ac
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x00126a6d
TEST EAX,EAX
JZ 0x001559bf
LAB_001559ac:
XOR EAX,EAX
LAB_001559ae:
MOV RDX,R12
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001559bf:
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVAPD XMM1,xmmword ptr [0x0019d060]
ANDPD XMM1,XMM0
MOVSD XMM2,qword ptr [0x0019d1d8]
UCOMISD XMM2,XMM1
JNC 0x001559e9
MOVSD XMM0,qword ptr [0x0019d1e0]
JMP 0x001559fa
LAB_001559e9:
CALL 0x0010e140
MOVAPD XMM1,XMM0
XORPD XMM0,XMM0
ADDSD XMM0,XMM1
LAB_001559fa:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00156328
MOV R12,RDX
JMP 0x001559ae
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16]
js_date_setTime(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
double dVar2;
int1 auVar3 [16];
double local_30;
iVar1 = JS_ThisTimeValue(param_1,&local_30,param_2,param_3);
if ((iVar1 == 0) && (iVar1 = JS_ToFloat64(param_1,&local_30,*param_5,param_5[1]), iVar1 == 0)) {
dVar2 = DAT_0019d1e0;
if ((double)(_DAT_0019d060 & (ulong)local_30) <= DAT_0019d1d8) {
dVar2 = trunc(local_30);
dVar2 = dVar2 + 0.0;
}
auVar3 = JS_SetThisTimeValue(dVar2,param_1,param_2,param_3);
}
else {
auVar3 = ZEXT816(6) << 0x40;
}
return auVar3;
}
|
|
14,779
|
uhd_find_best_resize(std::pair<int, int>, int, int, bool)
|
monkey531[P]llama/examples/llava/clip.cpp
|
static std::pair<int, int> uhd_find_best_resize(std::pair<int, int> original_size, int scale_resolution, int patch_size, bool allow_upscale = false) {
int width = original_size.first;
int height = original_size.second;
if ((width * height > scale_resolution * scale_resolution) || allow_upscale) {
float r = static_cast<float>(width) / height;
height = static_cast<int>(scale_resolution / std::sqrt(r));
width = static_cast<int>(height * r);
}
int best_width = ensure_divide(width, patch_size);
int best_height = ensure_divide(height, patch_size);
return std::make_pair(best_width, best_height);
}
|
O2
|
cpp
|
uhd_find_best_resize(std::pair<int, int>, int, int, bool):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rax
shrq $0x20, %rax
movl %eax, %ecx
imull %edi, %ecx
cmpl $0x31001, %ecx # imm = 0x31001
setge %cl
orb %sil, %cl
je 0x422bf
cvtsi2ss %edi, %xmm2
cvtsi2ss %eax, %xmm0
divss %xmm0, %xmm2
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm2
jb 0x422c9
sqrtss %xmm2, %xmm0
jmp 0x422db
cvtsi2ss %eax, %xmm0
movaps %xmm0, (%rsp)
jmp 0x422fa
movaps %xmm2, %xmm0
movss %xmm2, (%rsp)
callq 0x27720
movss (%rsp), %xmm2
movss 0x838cd(%rip), %xmm1 # 0xc5bb0
divss %xmm0, %xmm1
cvttps2dq %xmm1, %xmm0
cvtdq2ps %xmm0, %xmm0
movaps %xmm0, (%rsp)
mulss %xmm0, %xmm2
cvttss2si %xmm2, %edi
cvtsi2ss %edi, %xmm0
divss 0x838ae(%rip), %xmm0 # 0xc5bb4
callq 0x26ca0
movss 0x838a1(%rip), %xmm1 # 0xc5bb4
mulss %xmm1, %xmm0
cvttss2si %xmm0, %ebx
cmpl $0xf, %ebx
pushq $0xe
popq %r14
cmovll %r14d, %ebx
movaps (%rsp), %xmm0
divss %xmm1, %xmm0
callq 0x26ca0
mulss 0x83879(%rip), %xmm0 # 0xc5bb4
cvttss2si %xmm0, %eax
cmpl $0xf, %eax
cmovgel %eax, %r14d
shlq $0x20, %r14
orq %r14, %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
|
_ZL20uhd_find_best_resizeSt4pairIiiEiib:
push r14
push rbx
sub rsp, 18h
mov rax, rdi
shr rax, 20h
mov ecx, eax
imul ecx, edi
cmp ecx, offset loc_31001
setnl cl
or cl, sil
jz short loc_422BF
cvtsi2ss xmm2, edi
cvtsi2ss xmm0, eax
divss xmm2, xmm0
xorps xmm0, xmm0
ucomiss xmm2, xmm0
jb short loc_422C9
sqrtss xmm0, xmm2
jmp short loc_422DB
loc_422BF:
cvtsi2ss xmm0, eax
movaps [rsp+28h+var_28], xmm0
jmp short loc_422FA
loc_422C9:
movaps xmm0, xmm2
movss dword ptr [rsp+28h+var_28], xmm2
call _sqrtf
movss xmm2, dword ptr [rsp+28h+var_28]
loc_422DB:
movss xmm1, cs:dword_C5BB0
divss xmm1, xmm0
cvttps2dq xmm0, xmm1
cvtdq2ps xmm0, xmm0
movaps [rsp+28h+var_28], xmm0
mulss xmm2, xmm0
cvttss2si edi, xmm2
loc_422FA:
cvtsi2ss xmm0, edi
divss xmm0, cs:dword_C5BB4
call _roundf
movss xmm1, cs:dword_C5BB4
mulss xmm0, xmm1
cvttss2si ebx, xmm0
cmp ebx, 0Fh
push 0Eh
pop r14
cmovl ebx, r14d
movaps xmm0, [rsp+28h+var_28]
divss xmm0, xmm1
call _roundf
mulss xmm0, cs:dword_C5BB4
cvttss2si eax, xmm0
cmp eax, 0Fh
cmovge r14d, eax
shl r14, 20h
or rbx, r14
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
retn
|
long long uhd_find_best_resize(long long a1, unsigned __int8 a2)
{
float v2; // xmm2_4
float v3; // xmm0_4
__m128 v4; // xmm1
long long v5; // rbx
long long v6; // r14
int v7; // eax
float v9; // [rsp+0h] [rbp-28h]
if ( a2 | ((int)a1 * HIDWORD(a1) >= (int)&loc_31001) )
{
v2 = (float)(int)a1 / (float)SHIDWORD(a1);
if ( v2 < 0.0 )
{
v3 = sqrtf(v2);
v2 = (float)(int)a1 / (float)SHIDWORD(a1);
}
else
{
v3 = fsqrt(v2);
}
v4 = (__m128)0x43E00000u;
v4.m128_f32[0] = 448.0 / v3;
v9 = _mm_cvtepi32_ps(_mm_cvttps_epi32(v4)).m128_f32[0];
LODWORD(a1) = (int)(float)(v2 * v9);
}
else
{
v9 = (float)SHIDWORD(a1);
}
v5 = (unsigned int)(int)(float)(roundf((float)(int)a1 / 14.0) * 14.0);
v6 = 14LL;
if ( (int)v5 < 15 )
v5 = 14LL;
v7 = (int)(float)(roundf(v9 / 14.0) * 14.0);
if ( v7 >= 15 )
v6 = (unsigned int)v7;
return (v6 << 32) | v5;
}
|
uhd_find_best_resize:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RAX,RDI
SHR RAX,0x20
MOV ECX,EAX
IMUL ECX,EDI
CMP ECX,0x31001
SETGE CL
OR CL,SIL
JZ 0x001422bf
CVTSI2SS XMM2,EDI
CVTSI2SS XMM0,EAX
DIVSS XMM2,XMM0
XORPS XMM0,XMM0
UCOMISS XMM2,XMM0
JC 0x001422c9
SQRTSS XMM0,XMM2
JMP 0x001422db
LAB_001422bf:
CVTSI2SS XMM0,EAX
MOVAPS xmmword ptr [RSP],XMM0
JMP 0x001422fa
LAB_001422c9:
MOVAPS XMM0,XMM2
MOVSS dword ptr [RSP],XMM2
CALL 0x00127720
MOVSS XMM2,dword ptr [RSP]
LAB_001422db:
MOVSS XMM1,dword ptr [0x001c5bb0]
DIVSS XMM1,XMM0
CVTTPS2DQ XMM0,XMM1
CVTDQ2PS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MULSS XMM2,XMM0
CVTTSS2SI EDI,XMM2
LAB_001422fa:
CVTSI2SS XMM0,EDI
DIVSS XMM0,dword ptr [0x001c5bb4]
CALL 0x00126ca0
MOVSS XMM1,dword ptr [0x001c5bb4]
MULSS XMM0,XMM1
CVTTSS2SI EBX,XMM0
CMP EBX,0xf
PUSH 0xe
POP R14
CMOVL EBX,R14D
MOVAPS XMM0,xmmword ptr [RSP]
DIVSS XMM0,XMM1
CALL 0x00126ca0
MULSS XMM0,dword ptr [0x001c5bb4]
CVTTSS2SI EAX,XMM0
CMP EAX,0xf
CMOVGE R14D,EAX
SHL R14,0x20
OR RBX,R14
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* uhd_find_best_resize(std::pair<int, int>, int, int, bool) */
ulong uhd_find_best_resize(int8 param_1,char param_2)
{
ulong uVar1;
int iVar2;
int iVar3;
ulong uVar4;
float fVar5;
float fVar6;
iVar3 = (int)((ulong)param_1 >> 0x20);
iVar2 = (int)param_1;
if (iVar3 * iVar2 < 0x31001 && param_2 == '\0') {
fVar5 = (float)iVar3;
}
else {
fVar6 = (float)iVar2 / (float)iVar3;
if (fVar6 < 0.0) {
fVar5 = sqrtf(fVar6);
}
else {
fVar5 = SQRT(fVar6);
}
fVar5 = (float)(int)(DAT_001c5bb0 / fVar5);
iVar2 = (int)(fVar6 * fVar5);
}
fVar6 = roundf((float)iVar2 / DAT_001c5bb4);
uVar1 = (ulong)(uint)(int)(fVar6 * DAT_001c5bb4);
if ((int)(fVar6 * DAT_001c5bb4) < 0xf) {
uVar1 = 0xe;
}
fVar5 = roundf(fVar5 / DAT_001c5bb4);
uVar4 = 0xe;
if (0xe < (int)(fVar5 * DAT_001c5bb4)) {
uVar4 = (ulong)(uint)(int)(fVar5 * DAT_001c5bb4);
}
return uVar1 | uVar4 << 0x20;
}
|
|
14,780
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagVectors()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
|
void
Refinement::populateVertexTagVectors() {
_child->_vertTags.resize(_child->getNumVertices());
populateVertexTagsFromParentFaces();
populateVertexTagsFromParentEdges();
populateVertexTagsFromParentVertices();
if (!_uniform) {
for (Index cVert = 0; cVert < _child->getNumVertices(); ++cVert) {
if (_childVertexTag[cVert]._incomplete) {
_child->_vertTags[cVert]._incomplete = true;
}
}
}
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagVectors():
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movslq 0x8(%rdi), %rsi
addq $0x1b0, %rdi # imm = 0x1B0
callq 0x3b310
movq %rbx, %rdi
callq 0x38ff0
movq %rbx, %rdi
callq 0x393f0
movq %rbx, %rdi
callq 0x383a0
cmpb $0x0, 0x24(%rbx)
jne 0x49cf2
movq 0x10(%rbx), %rcx
cmpl $0x0, 0x8(%rcx)
jle 0x49cf2
xorl %eax, %eax
movq 0x180(%rbx), %rdx
testb $0x1, (%rdx,%rax)
je 0x49ce2
movq 0x1b0(%rcx), %rcx
orw $0x800, (%rcx,%rax,2) # imm = 0x800
incq %rax
movq 0x10(%rbx), %rcx
movslq 0x8(%rcx), %rdx
cmpq %rdx, %rax
jl 0x49cc8
popq %rbx
retq
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement24populateVertexTagVectorsEv:
push rbx
mov rbx, rdi
mov rdi, [rdi+10h]
movsxd rsi, dword ptr [rdi+8]
add rdi, 1B0h
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Vtr8internal5Level4VTagESaIS5_EE6resizeEm; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag>::resize(ulong)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement33populateVertexTagsFromParentFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentFaces(void)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement33populateVertexTagsFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentEdges(void)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement36populateVertexTagsFromParentVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentVertices(void)
cmp byte ptr [rbx+24h], 0
jnz short loc_49CF2
mov rcx, [rbx+10h]
cmp dword ptr [rcx+8], 0
jle short loc_49CF2
xor eax, eax
loc_49CC8:
mov rdx, [rbx+180h]
test byte ptr [rdx+rax], 1
jz short loc_49CE2
mov rcx, [rcx+1B0h]
or word ptr [rcx+rax*2], 800h
loc_49CE2:
inc rax
mov rcx, [rbx+10h]
movsxd rdx, dword ptr [rcx+8]
cmp rax, rdx
jl short loc_49CC8
loc_49CF2:
pop rbx
retn
|
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagVectors(
OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this)
{
long long result; // rax
long long v2; // rcx
std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag>::resize(
*((_QWORD *)this + 2) + 432LL,
*(int *)(*((_QWORD *)this + 2) + 8LL));
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentFaces(this);
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentEdges(this);
result = OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentVertices(this);
if ( !*((_BYTE *)this + 36) )
{
v2 = *((_QWORD *)this + 2);
if ( *(int *)(v2 + 8) > 0 )
{
result = 0LL;
do
{
if ( (*(_BYTE *)(*((_QWORD *)this + 48) + result) & 1) != 0 )
*(_WORD *)(*(_QWORD *)(v2 + 432) + 2 * result) |= 0x800u;
++result;
v2 = *((_QWORD *)this + 2);
}
while ( result < *(int *)(v2 + 8) );
}
}
return result;
}
|
populateVertexTagVectors:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
MOVSXD RSI,dword ptr [RDI + 0x8]
ADD RDI,0x1b0
CALL 0x0013b310
MOV RDI,RBX
CALL 0x00138ff0
MOV RDI,RBX
CALL 0x001393f0
MOV RDI,RBX
CALL 0x001383a0
CMP byte ptr [RBX + 0x24],0x0
JNZ 0x00149cf2
MOV RCX,qword ptr [RBX + 0x10]
CMP dword ptr [RCX + 0x8],0x0
JLE 0x00149cf2
XOR EAX,EAX
LAB_00149cc8:
MOV RDX,qword ptr [RBX + 0x180]
TEST byte ptr [RDX + RAX*0x1],0x1
JZ 0x00149ce2
MOV RCX,qword ptr [RCX + 0x1b0]
OR word ptr [RCX + RAX*0x2],0x800
LAB_00149ce2:
INC RAX
MOV RCX,qword ptr [RBX + 0x10]
MOVSXD RDX,dword ptr [RCX + 0x8]
CMP RAX,RDX
JL 0x00149cc8
LAB_00149cf2:
POP RBX
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagVectors() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagVectors(Refinement *this)
{
ushort *puVar1;
long lVar2;
long lVar3;
std::
vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag>>
::resize((vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag>>
*)(*(long *)(this + 0x10) + 0x1b0),(long)*(int *)(*(long *)(this + 0x10) + 8));
populateVertexTagsFromParentFaces(this);
populateVertexTagsFromParentEdges(this);
populateVertexTagsFromParentVertices(this);
if ((this[0x24] == (Refinement)0x0) && (lVar3 = *(long *)(this + 0x10), 0 < *(int *)(lVar3 + 8)))
{
lVar2 = 0;
do {
if ((*(byte *)(*(long *)(this + 0x180) + lVar2) & 1) != 0) {
puVar1 = (ushort *)(*(long *)(lVar3 + 0x1b0) + lVar2 * 2);
*puVar1 = *puVar1 | 0x800;
}
lVar2 = lVar2 + 1;
lVar3 = *(long *)(this + 0x10);
} while (lVar2 < *(int *)(lVar3 + 8));
}
return;
}
|
|
14,781
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagVectors()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
|
void
Refinement::populateVertexTagVectors() {
_child->_vertTags.resize(_child->getNumVertices());
populateVertexTagsFromParentFaces();
populateVertexTagsFromParentEdges();
populateVertexTagsFromParentVertices();
if (!_uniform) {
for (Index cVert = 0; cVert < _child->getNumVertices(); ++cVert) {
if (_childVertexTag[cVert]._incomplete) {
_child->_vertTags[cVert]._incomplete = true;
}
}
}
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagVectors():
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movslq 0x8(%rdi), %rsi
addq $0x1b0, %rdi # imm = 0x1B0
callq 0x54340
movq %rbx, %rdi
callq 0x508c0
movq %rbx, %rdi
callq 0x51030
movq %rbx, %rdi
callq 0x4f710
cmpb $0x0, 0x24(%rbx)
je 0x6192e
popq %rbx
retq
xorl %eax, %eax
movq 0x10(%rbx), %rcx
movslq 0x8(%rcx), %rdx
cmpq %rdx, %rax
jge 0x6192c
movq 0x180(%rbx), %rdx
testb $0x1, (%rdx,%rax)
je 0x61957
movq 0x1b0(%rcx), %rcx
orw $0x800, (%rcx,%rax,2) # imm = 0x800
incq %rax
jmp 0x61930
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement24populateVertexTagVectorsEv:
push rbx
mov rbx, rdi
mov rdi, [rdi+10h]
movsxd rsi, dword ptr [rdi+8]
add rdi, 1B0h
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Vtr8internal5Level4VTagESaIS5_EE6resizeEm; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag>::resize(ulong)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement33populateVertexTagsFromParentFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentFaces(void)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement33populateVertexTagsFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentEdges(void)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement36populateVertexTagsFromParentVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentVertices(void)
cmp byte ptr [rbx+24h], 0
jz short loc_6192E
loc_6192C:
pop rbx
retn
loc_6192E:
xor eax, eax
loc_61930:
mov rcx, [rbx+10h]
movsxd rdx, dword ptr [rcx+8]
cmp rax, rdx
jge short loc_6192C
mov rdx, [rbx+180h]
test byte ptr [rdx+rax], 1
jz short loc_61957
mov rcx, [rcx+1B0h]
or word ptr [rcx+rax*2], 800h
loc_61957:
inc rax
jmp short loc_61930
|
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagVectors(
OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this)
{
long long result; // rax
long long v2; // rcx
std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag>::resize(
*((_QWORD *)this + 2) + 432LL,
*(int *)(*((_QWORD *)this + 2) + 8LL));
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentFaces(this);
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentEdges(this);
result = OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentVertices(this);
if ( !*((_BYTE *)this + 36) )
{
for ( result = 0LL; ; ++result )
{
v2 = *((_QWORD *)this + 2);
if ( result >= *(int *)(v2 + 8) )
break;
if ( (*(_BYTE *)(*((_QWORD *)this + 48) + result) & 1) != 0 )
*(_WORD *)(*(_QWORD *)(v2 + 432) + 2 * result) |= 0x800u;
}
}
return result;
}
|
populateVertexTagVectors:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
MOVSXD RSI,dword ptr [RDI + 0x8]
ADD RDI,0x1b0
CALL 0x00154340
MOV RDI,RBX
CALL 0x001508c0
MOV RDI,RBX
CALL 0x00151030
MOV RDI,RBX
CALL 0x0014f710
CMP byte ptr [RBX + 0x24],0x0
JZ 0x0016192e
LAB_0016192c:
POP RBX
RET
LAB_0016192e:
XOR EAX,EAX
LAB_00161930:
MOV RCX,qword ptr [RBX + 0x10]
MOVSXD RDX,dword ptr [RCX + 0x8]
CMP RAX,RDX
JGE 0x0016192c
MOV RDX,qword ptr [RBX + 0x180]
TEST byte ptr [RDX + RAX*0x1],0x1
JZ 0x00161957
MOV RCX,qword ptr [RCX + 0x1b0]
OR word ptr [RCX + RAX*0x2],0x800
LAB_00161957:
INC RAX
JMP 0x00161930
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagVectors() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagVectors(Refinement *this)
{
ushort *puVar1;
long lVar2;
std::
vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag>>
::resize((vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag>>
*)(*(long *)(this + 0x10) + 0x1b0),(long)*(int *)(*(long *)(this + 0x10) + 8));
populateVertexTagsFromParentFaces(this);
populateVertexTagsFromParentEdges(this);
populateVertexTagsFromParentVertices(this);
if (this[0x24] == (Refinement)0x0) {
for (lVar2 = 0; lVar2 < *(int *)(*(long *)(this + 0x10) + 8); lVar2 = lVar2 + 1) {
if ((*(byte *)(*(long *)(this + 0x180) + lVar2) & 1) != 0) {
puVar1 = (ushort *)(*(long *)(*(long *)(this + 0x10) + 0x1b0) + lVar2 * 2);
*puVar1 = *puVar1 | 0x800;
}
}
}
return;
}
|
|
14,782
|
testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
void InsertSyntheticTestCase(const std::string& name, CodeLocation location,
bool has_test_p) {
const auto& ignored = *GetIgnoredParameterizedTestSuites();
if (ignored.find(name) != ignored.end()) return;
const char kMissingInstantiation[] = //
" is defined via TEST_P, but never instantiated. None of the test "
"cases "
"will run. Either no INSTANTIATE_TEST_SUITE_P is provided or the only "
"ones provided expand to nothing."
"\n\n"
"Ideally, TEST_P definitions should only ever be included as part of "
"binaries that intend to use them. (As opposed to, for example, being "
"placed in a library that may be linked in to get other utilities.)";
const char kMissingTestCase[] = //
" is instantiated via INSTANTIATE_TEST_SUITE_P, but no tests are "
"defined via TEST_P . No test cases will run."
"\n\n"
"Ideally, INSTANTIATE_TEST_SUITE_P should only ever be invoked from "
"code that always depend on code that provides TEST_P. Failing to do "
"so is often an indication of dead code, e.g. the last TEST_P was "
"removed but the rest got left behind.";
std::string message =
"Parameterized test suite " + name +
(has_test_p ? kMissingInstantiation : kMissingTestCase) +
"\n\n"
"To suppress this error for this test suite, insert the following line "
"(in a non-header) in the namespace it is defined in:"
"\n\n"
"GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(" +
name + ");";
std::string full_name = "UninstantiatedParameterizedTestSuite<" + name + ">";
RegisterTest( //
"GoogleTestVerification", full_name.c_str(),
nullptr, // No type parameter.
nullptr, // No value parameter.
location.file.c_str(), location.line, [message, location] {
return new FailureTest(location, message,
kErrorOnUninstantiatedParameterizedTest);
});
}
|
O0
|
cpp
|
testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool):
subq $0x488, %rsp # imm = 0x488
movq %rsi, 0x30(%rsp)
movb %dl, %al
movq %rdi, 0x480(%rsp)
movq %rsi, 0x478(%rsp)
andb $0x1, %al
movb %al, 0x477(%rsp)
callq 0xbcb60
movq %rax, 0x468(%rsp)
movq 0x468(%rsp), %rdi
movq 0x480(%rsp), %rsi
callq 0xe4e40
movq %rax, 0x460(%rsp)
movq 0x468(%rsp), %rdi
callq 0xe4e70
movq %rax, 0x458(%rsp)
leaq 0x460(%rsp), %rdi
leaq 0x458(%rsp), %rsi
callq 0xe4e20
xorb $-0x1, %al
testb $0x1, %al
jne 0xbcce3
jmp 0xbcce8
jmp 0xbcefd
leaq 0x2d0(%rsp), %rdi
leaq 0x58359(%rip), %rsi # 0x115050
movl $0x17a, %edx # imm = 0x17A
callq 0x14570
leaq 0x170(%rsp), %rdi
leaq 0x584c0(%rip), %rsi # 0x1151d0
movl $0x15c, %edx # imm = 0x15C
callq 0x14570
movq 0x480(%rsp), %rdx
leaq 0xd0(%rsp), %rdi
leaq 0x562a3(%rip), %rsi # 0x112fd4
callq 0x39eb0
testb $0x1, 0x477(%rsp)
je 0xbcd4f
leaq 0x2d0(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0xbcd5c
leaq 0x170(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdx
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x39e60
jmp 0xbcd78
leaq 0x56450(%rip), %rdx # 0x1131cf
leaq 0x110(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x39e60
jmp 0xbcd96
movq 0x480(%rsp), %rdx
leaq 0x130(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0xe34c0
jmp 0xbcdb5
leaq 0x56232(%rip), %rdx # 0x112fee
leaq 0x150(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x39e60
jmp 0xbcdd3
leaq 0x130(%rsp), %rdi
callq 0x1aac0
leaq 0x110(%rsp), %rdi
callq 0x1aac0
leaq 0xf0(%rsp), %rdi
callq 0x1aac0
leaq 0xd0(%rsp), %rdi
callq 0x1aac0
movq 0x480(%rsp), %rdx
leaq 0x561db(%rip), %rsi # 0x112ff1
leaq 0x80(%rsp), %rdi
callq 0x39eb0
jmp 0xbce25
leaq 0x56ef7(%rip), %rdx # 0x113d23
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x39e60
jmp 0xbce43
leaq 0x80(%rsp), %rdi
callq 0x1aac0
leaq 0xa0(%rsp), %rdi
callq 0x1acc0
movq 0x30(%rsp), %rdi
movq %rax, 0x8(%rsp)
callq 0x1acc0
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x10(%rsp)
movl 0x20(%rax), %eax
movl %eax, 0x1c(%rsp)
leaq 0x38(%rsp), %rdi
movq %rdi, 0x20(%rsp)
leaq 0x150(%rsp), %rsi
callq 0x39160
jmp 0xbce99
movq 0x30(%rsp), %rsi
leaq 0x58(%rsp), %rdi
callq 0xe4ea0
jmp 0xbceaa
movl 0x1c(%rsp), %r9d
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %rsi
movq %rsp, %rax
leaq 0x38(%rsp), %rcx
movq %rcx, (%rax)
leaq 0x5614c(%rip), %rdi # 0x113017
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xbd050
jmp 0xbced9
leaq 0x38(%rsp), %rdi
callq 0xbd380
leaq 0xa0(%rsp), %rdi
callq 0x1aac0
leaq 0x150(%rsp), %rdi
callq 0x1aac0
addq $0x488, %rsp # imm = 0x488
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0xbcf82
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0xbcf75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0xbcf68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x1aac0
leaq 0x110(%rsp), %rdi
callq 0x1aac0
leaq 0xf0(%rsp), %rdi
callq 0x1aac0
leaq 0xd0(%rsp), %rdi
callq 0x1aac0
jmp 0xbd03e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0xbd031
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x1aac0
jmp 0xbd031
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0xbd024
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
callq 0x1aac0
jmp 0xbd024
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0x38(%rsp), %rdi
callq 0xbd380
leaq 0xa0(%rsp), %rdi
callq 0x1aac0
leaq 0x150(%rsp), %rdi
callq 0x1aac0
movq 0xc8(%rsp), %rdi
callq 0x14c80
nopl (%rax,%rax)
|
_ZN7testing8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_12CodeLocationEb:
sub rsp, 488h
mov [rsp+488h+var_458], rsi; int
mov al, dl
mov qword ptr [rsp+488h+var_8], rdi
mov [rsp+488h+var_10], rsi
and al, 1
mov [rsp+488h+var_11], al
call _ZN7testing8internal33GetIgnoredParameterizedTestSuitesB5cxx11Ev; testing::internal::GetIgnoredParameterizedTestSuites(void)
mov [rsp+488h+var_20], rax
mov rdi, [rsp+488h+var_20]
mov rsi, qword ptr [rsp+488h+var_8]
call _ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE4findERKS5_; std::set<std::string>::find(std::string const&)
mov [rsp+488h+var_28], rax
mov rdi, [rsp+488h+var_20]
call _ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE3endEv; std::set<std::string>::end(void)
mov [rsp+488h+var_30], rax
lea rdi, [rsp+488h+var_28]
lea rsi, [rsp+488h+var_30]
call _ZSteqRKSt23_Rb_tree_const_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEES8_; std::operator==(std::_Rb_tree_const_iterator<std::string> const&,std::_Rb_tree_const_iterator<std::string> const&)
xor al, 0FFh
test al, 1
jnz short loc_BCCE3
jmp short loc_BCCE8
loc_BCCE3:
jmp loc_BCEFD
loc_BCCE8:
lea rdi, [rsp+488h+var_1B8]
lea rsi, aIsDefinedViaTe; " is defined via TEST_P, but never insta"...
mov edx, 17Ah
call _memcpy
lea rdi, [rsp+488h+var_318]
lea rsi, aIsInstantiated; " is instantiated via INSTANTIATE_TEST_S"...
mov edx, 15Ch
call _memcpy
mov rdx, qword ptr [rsp+488h+var_8]; int
lea rdi, [rsp+488h+var_3B8]; int
lea rsi, aParameterizedT; "Parameterized test suite "
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
test [rsp+488h+var_11], 1
jz short loc_BCD4F
lea rax, [rsp+488h+var_1B8]
mov [rsp+488h+var_460], rax
jmp short loc_BCD5C
loc_BCD4F:
lea rax, [rsp+488h+var_318]
mov [rsp+488h+var_460], rax; void *
loc_BCD5C:
mov rdx, [rsp+488h+var_460]
lea rdi, [rsp+488h+var_398]
lea rsi, [rsp+488h+var_3B8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_BCD78:
lea rdx, aIsDefinedViaRe+15Bh; "\n\nTo suppress this error for this tes"...
lea rdi, [rsp+488h+var_378]
lea rsi, [rsp+488h+var_398]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_BCD96:
mov rdx, qword ptr [rsp+488h+var_8]
lea rdi, [rsp+488h+var_358]
lea rsi, [rsp+488h+var_378]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
jmp short $+2
loc_BCDB5:
lea rdx, asc_112FEE; ");"
lea rdi, [rsp+488h+var_338]
lea rsi, [rsp+488h+var_358]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_BCDD3:
lea rdi, [rsp+488h+var_358]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+488h+var_378]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+488h+var_398]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+488h+var_3B8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdx, qword ptr [rsp+488h+var_8]; int
lea rsi, aUninstantiated; "UninstantiatedParameterizedTestSuite<"
lea rdi, [rsp+488h+var_408]; int
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
jmp short $+2
loc_BCE25:
lea rdx, aType_0+9; ">"
lea rdi, [rsp+488h+var_3E8]
lea rsi, [rsp+488h+var_408]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_BCE43:
lea rdi, [rsp+488h+var_408]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+488h+var_3E8]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+488h+var_458]
mov qword ptr [rsp+488h+var_480], rax; int
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rcx, rax
mov rax, [rsp+488h+var_458]
mov qword ptr [rsp+488h+var_478], rcx; int
mov eax, [rax+20h]
mov [rsp+488h+var_46C], eax
lea rdi, [rsp+488h+var_450]
mov qword ptr [rsp+488h+var_468], rdi; int
lea rsi, [rsp+488h+var_338]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_BCE99:
mov rsi, [rsp+488h+var_458]; testing::internal::CodeLocation *
lea rdi, [rsp+488h+var_430]; this
call _ZN7testing8internal12CodeLocationC2ERKS1_; testing::internal::CodeLocation::CodeLocation(testing::internal::CodeLocation const&)
jmp short $+2
loc_BCEAA:
mov r9d, [rsp+488h+var_46C]; int
mov r8, qword ptr [rsp+488h+var_478]; int
mov rsi, qword ptr [rsp+488h+var_480]; int
mov rax, rsp
lea rcx, [rsp+488h+var_450]
mov [rax], rcx
lea rdi, aGoogletestveri; "GoogleTestVerification"
xor eax, eax
mov ecx, eax; int
mov rdx, rcx; int
call _ZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3$_0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_
jmp short $+2
loc_BCED9:
lea rdi, [rsp+488h+var_450]
call _ZZN7testing8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_12CodeLocationEbEN3$_0D2Ev; testing::internal::InsertSyntheticTestCase(std::string const&,testing::internal::CodeLocation,bool)::$_0::~$_0()
lea rdi, [rsp+488h+var_3E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+488h+var_338]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_BCEFD:
add rsp, 488h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
jmp short loc_BCF82
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
jmp short loc_BCF75
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
jmp short loc_BCF68
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
lea rdi, [rsp+arg_128]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_BCF68:
lea rdi, [rsp+arg_108]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_BCF75:
lea rdi, [rsp+arg_E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_BCF82:
lea rdi, [rsp+arg_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_BD03E
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
jmp loc_BD031
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_BD031
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
jmp short loc_BD024
mov rdi, [rsp+arg_18]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_BD024
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
lea rdi, [rsp+arg_30]
call _ZZN7testing8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_12CodeLocationEbEN3$_0D2Ev; testing::internal::InsertSyntheticTestCase(std::string const&,testing::internal::CodeLocation,bool)::$_0::~$_0()
loc_BD024:
lea rdi, [rsp+arg_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_BD031:
lea rdi, [rsp+arg_148]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_BD03E:
mov rdi, [rsp+arg_C0]
call __Unwind_Resume
|
void testing::internal::InsertSyntheticTestCase(
testing::UnitTest *a1,
const testing::internal::CodeLocation *a2,
char a3)
{
int v3; // [rsp+8h] [rbp-480h]
int v4; // [rsp+10h] [rbp-478h]
int v5; // [rsp+18h] [rbp-470h]
int v6; // [rsp+1Ch] [rbp-46Ch]
int *v7; // [rsp+28h] [rbp-460h]
int v8[8]; // [rsp+38h] [rbp-450h] BYREF
int v9[10]; // [rsp+58h] [rbp-430h] BYREF
int v10[4]; // [rsp+80h] [rbp-408h] BYREF
char v11; // [rsp+90h] [rbp-3F8h]
int v12; // [rsp+98h] [rbp-3F0h]
int v13[12]; // [rsp+A0h] [rbp-3E8h] BYREF
int v14[4]; // [rsp+D0h] [rbp-3B8h] BYREF
char v15; // [rsp+E0h] [rbp-3A8h]
int v16; // [rsp+E8h] [rbp-3A0h]
int v17[4]; // [rsp+F0h] [rbp-398h] BYREF
char v18; // [rsp+100h] [rbp-388h]
int v19; // [rsp+108h] [rbp-380h]
int v20[8]; // [rsp+110h] [rbp-378h] BYREF
long long v21; // [rsp+130h] [rbp-358h] BYREF
int v22; // [rsp+138h] [rbp-350h]
char v23; // [rsp+140h] [rbp-348h]
_BYTE v24[32]; // [rsp+150h] [rbp-338h] BYREF
int v25[88]; // [rsp+170h] [rbp-318h] BYREF
_BYTE v26[392]; // [rsp+2D0h] [rbp-1B8h] BYREF
long long v27; // [rsp+458h] [rbp-30h] BYREF
long long v28; // [rsp+460h] [rbp-28h] BYREF
long long v29; // [rsp+468h] [rbp-20h]
char v30; // [rsp+477h] [rbp-11h]
const testing::internal::CodeLocation *v31; // [rsp+478h] [rbp-10h]
int v32[2]; // [rsp+480h] [rbp-8h]
*(_QWORD *)v32 = a1;
v31 = a2;
v30 = a3 & 1;
v29 = testing::internal::GetIgnoredParameterizedTestSuites[abi:cxx11](a1);
v28 = std::set<std::string>::find(v29, a1);
v27 = std::set<std::string>::end(v29);
if ( (std::operator==(&v28, &v27) & 1) != 0 )
{
memcpy(
v26,
" is defined via TEST_P, but never instantiated. None of the test cases will run. Either no INSTANTIATE_TEST_SUITE_"
"P is provided or the only ones provided expand to nothing.\n"
"\n"
"Ideally, TEST_P definitions should only ever be included as part of binaries that intend to use them. (As opposed "
"to, for example, being placed in a library that may be linked in to get other utilities.)",
378LL);
memcpy(
v25,
" is instantiated via INSTANTIATE_TEST_SUITE_P, but no tests are defined via TEST_P . No test cases will run.\n"
"\n"
"Ideally, INSTANTIATE_TEST_SUITE_P should only ever be invoked from code that always depend on code that provides T"
"EST_P. Failing to do so is often an indication of dead code, e.g. the last TEST_P was removed but the rest got left behind.",
348LL);
std::operator+<char>((long long)v14, (long long)"Parameterized test suite ", *(long long *)v32);
if ( (v30 & 1) != 0 )
{
v7 = (int *)v26;
std::operator+<char>((long long)v17, (long long)v14, (long long)v26);
}
else
{
v7 = v25;
std::operator+<char>((long long)v17, (long long)v14, (long long)v25);
}
std::operator+<char>(
(long long)v20,
(long long)v17,
(long long)"\n\nTo suppress this error for this test suite, insert the following line (in a non-header) in the namespace it is defined in:\n\nGTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(");
std::operator+<char>(&v21, v20, *(_QWORD *)v32);
std::operator+<char>((long long)v24, (long long)&v21, (long long)");");
std::string::~string(&v21);
std::string::~string(v20);
std::string::~string(v17);
std::string::~string(v14);
std::operator+<char>((long long)v10, (long long)"UninstantiatedParameterizedTestSuite<", *(long long *)v32);
std::operator+<char>((long long)v13, (long long)v10, (long long)">");
std::string::~string(v10);
v3 = std::string::c_str((long long)v13);
v4 = std::string::c_str((long long)a2);
v6 = *((_DWORD *)a2 + 8);
std::string::basic_string(v8, (long long)v24);
testing::internal::CodeLocation::CodeLocation((testing::internal::CodeLocation *)v9, a2);
ZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3__0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_(
(int)"GoogleTestVerification",
v3,
0,
0,
v4,
v6,
(int)v8,
v3,
v4,
v5,
(int)v8,
v7,
(int)a2,
v8[0],
v8[2],
v8[4],
v8[6],
v9[0],
v9[2],
v9[4],
v9[6],
v9[8],
v10[0],
v10[2],
v11,
v12,
v13[0],
v13[2],
v13[4],
v13[6],
v13[8],
v13[10],
v14[0],
v14[2],
v15,
v16,
v17[0],
v17[2],
v18,
v19,
v20[0],
v20[2],
v20[4],
v20[6],
v21,
v22,
v23);
testing::internal::InsertSyntheticTestCase(std::string const&,testing::internal::CodeLocation,bool)::$_0::~$_0(v8);
std::string::~string(v13);
std::string::~string(v24);
}
}
|
InsertSyntheticTestCase:
SUB RSP,0x488
MOV qword ptr [RSP + 0x30],RSI
MOV AL,DL
MOV qword ptr [RSP + 0x480],RDI
MOV qword ptr [RSP + 0x478],RSI
AND AL,0x1
MOV byte ptr [RSP + 0x477],AL
CALL 0x001bcb60
MOV qword ptr [RSP + 0x468],RAX
MOV RDI,qword ptr [RSP + 0x468]
MOV RSI,qword ptr [RSP + 0x480]
CALL 0x001e4e40
MOV qword ptr [RSP + 0x460],RAX
MOV RDI,qword ptr [RSP + 0x468]
CALL 0x001e4e70
MOV qword ptr [RSP + 0x458],RAX
LEA RDI,[RSP + 0x460]
LEA RSI,[RSP + 0x458]
CALL 0x001e4e20
XOR AL,0xff
TEST AL,0x1
JNZ 0x001bcce3
JMP 0x001bcce8
LAB_001bcce3:
JMP 0x001bcefd
LAB_001bcce8:
LEA RDI,[RSP + 0x2d0]
LEA RSI,[0x215050]
MOV EDX,0x17a
CALL 0x00114570
LEA RDI,[RSP + 0x170]
LEA RSI,[0x2151d0]
MOV EDX,0x15c
CALL 0x00114570
MOV RDX,qword ptr [RSP + 0x480]
LEA RDI,[RSP + 0xd0]
LEA RSI,[0x212fd4]
CALL 0x00139eb0
TEST byte ptr [RSP + 0x477],0x1
JZ 0x001bcd4f
LEA RAX,[RSP + 0x2d0]
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001bcd5c
LAB_001bcd4f:
LEA RAX,[RSP + 0x170]
MOV qword ptr [RSP + 0x28],RAX
LAB_001bcd5c:
MOV RDX,qword ptr [RSP + 0x28]
LEA RDI,[RSP + 0xf0]
LEA RSI,[RSP + 0xd0]
CALL 0x00139e60
JMP 0x001bcd78
LAB_001bcd78:
LEA RDX,[0x2131cf]
LEA RDI,[RSP + 0x110]
LEA RSI,[RSP + 0xf0]
CALL 0x00139e60
JMP 0x001bcd96
LAB_001bcd96:
MOV RDX,qword ptr [RSP + 0x480]
LAB_001bcd9e:
LEA RDI,[RSP + 0x130]
LEA RSI,[RSP + 0x110]
CALL 0x001e34c0
JMP 0x001bcdb5
LAB_001bcdb5:
LEA RDX,[0x212fee]
LEA RDI,[RSP + 0x150]
LEA RSI,[RSP + 0x130]
CALL 0x00139e60
JMP 0x001bcdd3
LAB_001bcdd3:
LEA RDI,[RSP + 0x130]
CALL 0x0011aac0
LEA RDI,[RSP + 0x110]
CALL 0x0011aac0
LEA RDI,[RSP + 0xf0]
CALL 0x0011aac0
LEA RDI,[RSP + 0xd0]
CALL 0x0011aac0
MOV RDX,qword ptr [RSP + 0x480]
LAB_001bce0f:
LEA RSI,[0x212ff1]
LEA RDI,[RSP + 0x80]
CALL 0x00139eb0
JMP 0x001bce25
LAB_001bce25:
LEA RDX,[0x213d23]
LEA RDI,[RSP + 0xa0]
LEA RSI,[RSP + 0x80]
CALL 0x00139e60
JMP 0x001bce43
LAB_001bce43:
LEA RDI,[RSP + 0x80]
CALL 0x0011aac0
LEA RDI,[RSP + 0xa0]
CALL 0x0011acc0
MOV RDI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RAX
CALL 0x0011acc0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RCX
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RSP + 0x1c],EAX
LEA RDI,[RSP + 0x38]
MOV qword ptr [RSP + 0x20],RDI
LAB_001bce8a:
LEA RSI,[RSP + 0x150]
CALL 0x00139160
JMP 0x001bce99
LAB_001bce99:
MOV RSI,qword ptr [RSP + 0x30]
LEA RDI,[RSP + 0x58]
LAB_001bcea3:
CALL 0x001e4ea0
JMP 0x001bceaa
LAB_001bceaa:
MOV R9D,dword ptr [RSP + 0x1c]
MOV R8,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
MOV RAX,RSP
LEA RCX,[RSP + 0x38]
MOV qword ptr [RAX],RCX
LEA RDI,[0x213017]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001bd050
LAB_001bced7:
JMP 0x001bced9
LAB_001bced9:
LEA RDI,[RSP + 0x38]
CALL 0x001bd380
LEA RDI,[RSP + 0xa0]
CALL 0x0011aac0
LEA RDI,[RSP + 0x150]
CALL 0x0011aac0
LAB_001bcefd:
ADD RSP,0x488
RET
|
/* testing::internal::InsertSyntheticTestCase(std::__cxx11::string const&,
testing::internal::CodeLocation, bool) */
void testing::internal::InsertSyntheticTestCase(string *param_1,string *param_2,byte param_3)
{
int4 uVar1;
byte bVar2;
int8 uVar3;
int8 uVar4;
string local_450 [32];
CodeLocation local_430 [40];
string local_408 [32];
string local_3e8 [48];
string local_3b8 [32];
string local_398 [32];
string local_378 [32];
string local_358 [32];
string local_338 [32];
int1 local_318 [352];
int1 local_1b8 [392];
int8 local_30;
int8 local_28;
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*local_20;
byte local_11;
string *local_10;
string *local_8;
local_11 = param_3 & 1;
local_10 = param_2;
local_8 = param_1;
local_20 = (set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)GetIgnoredParameterizedTestSuites_abi_cxx11_();
local_28 = std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::find(local_20,local_8);
local_30 = std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::end(local_20);
bVar2 = std::operator==((_Rb_tree_const_iterator *)&local_28,(_Rb_tree_const_iterator *)&local_30)
;
if (((bVar2 ^ 0xff) & 1) == 0) {
memcpy(local_1b8,
" is defined via TEST_P, but never instantiated. None of the test cases will run. Either no INSTANTIATE_TEST_SUITE_P is provided or the only ones provided expand to nothing.\n\nIdeally, TEST_P definitions should only ever be included as part of binaries that intend to use them. (As opposed to, for example, being placed in a library that may be linked in to get other utilities.)"
,0x17a);
memcpy(local_318,
" is instantiated via INSTANTIATE_TEST_SUITE_P, but no tests are defined via TEST_P . No test cases will run.\n\nIdeally, INSTANTIATE_TEST_SUITE_P should only ever be invoked from code that always depend on code that provides TEST_P. Failing to do so is often an indication of dead code, e.g. the last TEST_P was removed but the rest got left behind."
,0x15c);
std::operator+((char *)local_3b8,(string *)"Parameterized test suite ");
/* try { // try from 001bcd5c to 001bcd75 has its CatchHandler @ 001bcf05 */
std::operator+(local_398,(char *)local_3b8);
/* try { // try from 001bcd78 to 001bcd93 has its CatchHandler @ 001bcf1b */
std::operator+(local_378,(char *)local_398);
/* try { // try from 001bcd9e to 001bcdb2 has its CatchHandler @ 001bcf31 */
std::operator+(local_358,local_378);
/* try { // try from 001bcdb5 to 001bcdd0 has its CatchHandler @ 001bcf47 */
std::operator+(local_338,(char *)local_358);
std::__cxx11::string::~string(local_358);
std::__cxx11::string::~string(local_378);
std::__cxx11::string::~string(local_398);
std::__cxx11::string::~string(local_3b8);
/* try { // try from 001bce0f to 001bce22 has its CatchHandler @ 001bcf94 */
std::operator+((char *)local_408,(string *)"UninstantiatedParameterizedTestSuite<");
/* try { // try from 001bce25 to 001bce40 has its CatchHandler @ 001bcfad */
std::operator+(local_3e8,(char *)local_408);
std::__cxx11::string::~string(local_408);
uVar3 = std::__cxx11::string::c_str(local_3e8);
uVar4 = std::__cxx11::string::c_str(param_2);
uVar1 = *(int4 *)(param_2 + 0x20);
/* try { // try from 001bce8a to 001bce96 has its CatchHandler @ 001bcfd0 */
std::__cxx11::string::string(local_450,local_338);
/* try { // try from 001bcea3 to 001bcea7 has its CatchHandler @ 001bcfe6 */
CodeLocation::CodeLocation(local_430,(CodeLocation *)param_2);
/* try { // try from 001bceaa to 001bced6 has its CatchHandler @ 001bd006 */
_ZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3__0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_
("GoogleTestVerification",uVar3,0,0,uVar4,uVar1,local_450);
InsertSyntheticTestCase(std::__cxx11::string_const&,testing::internal::CodeLocation,bool)::$_0::
~__0((__0 *)local_450);
std::__cxx11::string::~string(local_3e8);
std::__cxx11::string::~string(local_338);
}
return;
}
|
|
14,783
|
spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(spdlog::details::async_msg&)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/mpmc_blocking_q.h
|
void dequeue(T &popped_item) {
{
std::unique_lock<std::mutex> lock(queue_mutex_);
push_cv_.wait(lock, [this] { return !this->q_.empty(); });
popped_item = std::move(q_.front());
q_.pop_front();
}
pop_cv_.notify_one();
}
|
O0
|
c
|
spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(spdlog::details::async_msg&):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rsi
movq %rsi, 0x10(%rsp)
leaq 0x38(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x85e30
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rsi
movq %rax, %rdi
addq $0x28, %rdi
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdx
callq 0x864e0
jmp 0x814e9
movq 0x10(%rsp), %rdi
addq $0x88, %rdi
callq 0x86530
movq %rax, 0x8(%rsp)
jmp 0x81501
movq 0x8(%rsp), %rsi
movq 0x48(%rsp), %rdi
callq 0x86160
movq 0x10(%rsp), %rdi
addq $0x88, %rdi
callq 0x86550
jmp 0x81523
leaq 0x38(%rsp), %rdi
callq 0x85e80
movq 0x10(%rsp), %rdi
addq $0x58, %rdi
callq 0x14310
addq $0x58, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x85e80
movq 0x28(%rsp), %rdi
callq 0x14c80
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN6spdlog7details19mpmc_blocking_queueINS0_9async_msgEE7dequeueERS2_:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov rsi, [rsp+58h+var_8]
mov [rsp+58h+var_48], rsi
lea rdi, [rsp+58h+var_20]
mov [rsp+58h+var_40], rdi
call _ZNSt11unique_lockISt5mutexEC2ERS0_; std::unique_lock<std::mutex>::unique_lock(std::mutex&)
mov rax, [rsp+58h+var_48]
mov rsi, [rsp+58h+var_40]
mov rdi, rax
add rdi, 28h ; '('
mov [rsp+58h+var_28], rax
mov rdx, [rsp+58h+var_28]
call _ZNSt18condition_variable4waitIZN6spdlog7details19mpmc_blocking_queueINS2_9async_msgEE7dequeueERS4_EUlvE_EEvRSt11unique_lockISt5mutexET_; std::condition_variable::wait<spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(spdlog::details::async_msg&)::{lambda(void)#1}>(std::unique_lock<std::mutex> &,spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(spdlog::details::async_msg&)::{lambda(void)#1})
jmp short $+2
loc_814E9:
mov rdi, [rsp+58h+var_48]
add rdi, 88h
call _ZN6spdlog7details10circular_qINS0_9async_msgEE5frontEv; spdlog::details::circular_q<spdlog::details::async_msg>::front(void)
mov [rsp+58h+var_50], rax
jmp short $+2
loc_81501:
mov rsi, [rsp+58h+var_50]
mov rdi, [rsp+58h+var_10]
call _ZN6spdlog7details9async_msgaSEOS1_; spdlog::details::async_msg::operator=(spdlog::details::async_msg&&)
mov rdi, [rsp+58h+var_48]
add rdi, 88h
call _ZN6spdlog7details10circular_qINS0_9async_msgEE9pop_frontEv; spdlog::details::circular_q<spdlog::details::async_msg>::pop_front(void)
jmp short $+2
loc_81523:
lea rdi, [rsp+58h+var_20]
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov rdi, [rsp+58h+var_48]
add rdi, 58h ; 'X'; this
call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void)
add rsp, 58h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_30]
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov rdi, [rsp+arg_20]
call __Unwind_Resume
|
long long spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(long long a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-50h]
_BYTE v4[16]; // [rsp+38h] [rbp-20h] BYREF
long long v5; // [rsp+48h] [rbp-10h]
long long v6; // [rsp+50h] [rbp-8h]
v6 = a1;
v5 = a2;
std::unique_lock<std::mutex>::unique_lock(v4);
std::condition_variable::wait<spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(spdlog::details::async_msg&)::{lambda(void)#1}>(
a1 + 40,
v4,
a1);
v3 = spdlog::details::circular_q<spdlog::details::async_msg>::front(a1 + 136);
spdlog::details::async_msg::operator=(v5, v3);
spdlog::details::circular_q<spdlog::details::async_msg>::pop_front(a1 + 136);
std::unique_lock<std::mutex>::~unique_lock(v4);
return std::condition_variable::notify_one((std::condition_variable *)(a1 + 88));
}
|
dequeue:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV RSI,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RSI
LEA RDI,[RSP + 0x38]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00185e30
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,RAX
ADD RDI,0x28
MOV qword ptr [RSP + 0x30],RAX
MOV RDX,qword ptr [RSP + 0x30]
LAB_001814e2:
CALL 0x001864e0
JMP 0x001814e9
LAB_001814e9:
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x88
CALL 0x00186530
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00181501
LAB_00181501:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x00186160
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x88
CALL 0x00186550
LAB_00181521:
JMP 0x00181523
LAB_00181523:
LEA RDI,[RSP + 0x38]
CALL 0x00185e80
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x58
CALL 0x00114310
ADD RSP,0x58
RET
|
/* spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(spdlog::details::async_msg&)
*/
void __thiscall
spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue
(mpmc_blocking_queue<spdlog::details::async_msg> *this,async_msg *param_1)
{
async_msg *paVar1;
unique_lock<std::mutex> local_20 [16];
async_msg *local_10;
mpmc_blocking_queue<spdlog::details::async_msg> *local_8;
local_10 = param_1;
local_8 = this;
std::unique_lock<std::mutex>::unique_lock(local_20,(mutex *)this);
/* try { // try from 001814e2 to 00181520 has its CatchHandler @ 00181540 */
std::condition_variable::
wait<spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(spdlog::details::async_msg&)::_lambda()_1_>
((condition_variable *)(this + 0x28),local_20,this);
paVar1 = (async_msg *)
circular_q<spdlog::details::async_msg>::front
((circular_q<spdlog::details::async_msg> *)(this + 0x88));
async_msg::operator=(local_10,paVar1);
circular_q<spdlog::details::async_msg>::pop_front
((circular_q<spdlog::details::async_msg> *)(this + 0x88));
std::unique_lock<std::mutex>::~unique_lock(local_20);
std::condition_variable::notify_one();
return;
}
|
|
14,784
|
mysql_list_tables_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_list_tables_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_list_tables,
(parms->mysql, parms->wild),
parms->mysql,
MYSQL_RES *,
r_ptr)
}
|
O3
|
c
|
mysql_list_tables_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %rbx
movq %rax, %rdi
callq 0x1b802
movq %rax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
mysql_list_tables_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi]
mov rsi, [rdi+8]
mov rcx, [rax+480h]
mov rbx, [rcx+28h]
mov rdi, rax
call mysql_list_tables
mov [rbx+8], rax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
|
long long mysql_list_tables_start_internal(long long a1)
{
long long v1; // rbx
long long result; // rax
v1 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
result = mysql_list_tables(*(_QWORD *)a1, *(const char **)(a1 + 8));
*(_QWORD *)(v1 + 8) = result;
*(_DWORD *)v1 = 0;
return result;
}
|
mysql_list_tables_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RCX + 0x28]
MOV RDI,RAX
CALL 0x0011b802
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_list_tables_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_list_tables(*param_1,param_1[1]);
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
14,785
|
minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&)
|
monkey531[P]llama/common/minja.hpp
|
CallExpr(const Location & location, std::shared_ptr<Expression> && obj, ArgumentsExpression && a)
: Expression(location), object(std::move(obj)), args(std::move(a)) {}
|
O2
|
cpp
|
minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
callq 0x41438
leaq 0x7fcda(%rip), %rax # 0xd58f0
addq $0x10, %rax
movq %rax, (%r15)
andq $0x0, 0x28(%r15)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x20(%r15)
andq $0x0, (%r14)
addq $0x30, %r15
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x52ac0
|
_ZN5minja8CallExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEONS_19ArgumentsExpressionE:
push r15
push r14
push rbx
mov rbx, rcx
mov r14, rdx
mov r15, rdi
call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&)
lea rax, _ZTVN5minja8CallExprE; `vtable for'minja::CallExpr
add rax, 10h
mov [r15], rax
and qword ptr [r15+28h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [r15+20h], xmm0
and qword ptr [r14], 0
add r15, 30h ; '0'
mov rdi, r15
mov rsi, rbx
pop rbx
pop r14
pop r15
jmp _ZN5minja19ArgumentsExpressionC2EOS0_; minja::ArgumentsExpression::ArgumentsExpression(minja::ArgumentsExpression&&)
|
long long minja::CallExpr::CallExpr(long long a1, _QWORD *a2, __int128 *a3, long long a4)
{
__int128 v6; // xmm0
minja::Expression::Expression((_QWORD *)a1, a2);
*(_QWORD *)a1 = &`vtable for'minja::CallExpr + 2;
*(_QWORD *)(a1 + 40) = 0LL;
v6 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v6;
*(_QWORD *)a3 = 0LL;
return minja::ArgumentsExpression::ArgumentsExpression(a1 + 48, a4);
}
|
CallExpr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RDI
CALL 0x00141438
LEA RAX,[0x1d58f0]
ADD RAX,0x10
MOV qword ptr [R15],RAX
AND qword ptr [R15 + 0x28],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [R15 + 0x20],XMM0
AND qword ptr [R14],0x0
ADD R15,0x30
MOV RDI,R15
MOV RSI,RBX
POP RBX
POP R14
POP R15
JMP 0x00152ac0
|
/* minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
minja::ArgumentsExpression&&) */
void __thiscall
minja::CallExpr::CallExpr
(CallExpr *this,Location *param_1,shared_ptr *param_2,ArgumentsExpression *param_3)
{
int8 uVar1;
Expression::Expression((Expression *)this,param_1);
*(int ***)this = &PTR_do_evaluate_001d5900;
*(int8 *)(this + 0x28) = 0;
uVar1 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar1;
*(int8 *)param_2 = 0;
ArgumentsExpression::ArgumentsExpression((ArgumentsExpression *)(this + 0x30),param_3);
return;
}
|
|
14,786
|
my_message_stderr
|
eloqsql/mysys/my_mess.c
|
void my_message_stderr(uint error __attribute__((unused)),
const char *str, myf MyFlags)
{
DBUG_ENTER("my_message_stderr");
DBUG_PRINT("enter",("message: %s",str));
(void) fflush(stdout);
if (MyFlags & (ME_NOTE | ME_ERROR_LOG_ONLY))
DBUG_VOID_RETURN;
if (MyFlags & ME_BELL)
(void) fputc('\007', stderr);
if (my_progname)
{
(void)fputs(my_progname,stderr); (void)fputs(": ",stderr);
}
(void)fputs(str,stderr);
(void)fputc('\n',stderr);
(void)fflush(stderr);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
my_message_stderr:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0xf3dd5
movq 0x1c91f4(%rip), %rax # 0x2bcfd0
movq (%rax), %rdi
callq 0x2a3e0
movq -0x18(%rbp), %rax
andq $0x480, %rax # imm = 0x480
cmpq $0x0, %rax
je 0xf3dfb
jmp 0xf3df6
jmp 0xf3e91
movq -0x18(%rbp), %rax
andq $0x4, %rax
cmpq $0x0, %rax
je 0xf3e1d
movq 0x1c91c8(%rip), %rax # 0x2bcfd8
movq (%rax), %rsi
movl $0x7, %edi
callq 0x2a690
leaq 0xb8eb7c(%rip), %rax # 0xc829a0
cmpq $0x0, (%rax)
je 0xf3e59
leaq 0xb8eb6f(%rip), %rax # 0xc829a0
movq (%rax), %rdi
movq 0x1c919d(%rip), %rax # 0x2bcfd8
movq (%rax), %rsi
callq 0x2a2e0
movq 0x1c918e(%rip), %rax # 0x2bcfd8
movq (%rax), %rsi
leaq 0x608a8(%rip), %rdi # 0x1546fc
callq 0x2a2e0
movq -0x10(%rbp), %rdi
movq 0x1c9174(%rip), %rax # 0x2bcfd8
movq (%rax), %rsi
callq 0x2a2e0
movq 0x1c9165(%rip), %rax # 0x2bcfd8
movq (%rax), %rsi
movl $0xa, %edi
callq 0x2a690
movq 0x1c9151(%rip), %rax # 0x2bcfd8
movq (%rax), %rdi
callq 0x2a3e0
jmp 0xf3e91
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_message_stderr:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_F3DD5:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, [rbp+var_18]
and rax, 480h
cmp rax, 0
jz short loc_F3DFB
jmp short $+2
loc_F3DF6:
jmp loc_F3E91
loc_F3DFB:
mov rax, [rbp+var_18]
and rax, 4
cmp rax, 0
jz short loc_F3E1D
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov edi, 7
call _fputc
loc_F3E1D:
lea rax, my_progname
cmp qword ptr [rax], 0
jz short loc_F3E59
lea rax, my_progname
mov rdi, [rax]
mov rax, cs:stderr_ptr
mov rsi, [rax]
call _fputs
mov rax, cs:stderr_ptr
mov rsi, [rax]
lea rdi, aWarning+8; ": "
call _fputs
loc_F3E59:
mov rdi, [rbp+var_10]
mov rax, cs:stderr_ptr
mov rsi, [rax]
call _fputs
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov edi, 0Ah
call _fputc
mov rax, cs:stderr_ptr
mov rdi, [rax]
call _fflush
jmp short $+2
loc_F3E91:
add rsp, 20h
pop rbp
retn
|
long long my_message_stderr(long long a1, long long a2, __int16 a3)
{
long long result; // rax
fflush(stdout);
result = a3 & 0x480;
if ( (a3 & 0x480) == 0 )
{
if ( (a3 & 4) != 0 )
fputc(7LL, stderr);
if ( my_progname )
{
fputs(my_progname, stderr);
fputs(": ", stderr);
}
fputs(a2, stderr);
fputc(10LL, stderr);
return fflush(stderr);
}
return result;
}
|
my_message_stderr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x001f3dd5
LAB_001f3dd5:
MOV RAX,qword ptr [0x003bcfd0]
MOV RDI,qword ptr [RAX]
CALL 0x0012a3e0
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x480
CMP RAX,0x0
JZ 0x001f3dfb
JMP 0x001f3df6
LAB_001f3df6:
JMP 0x001f3e91
LAB_001f3dfb:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x4
CMP RAX,0x0
JZ 0x001f3e1d
MOV RAX,qword ptr [0x003bcfd8]
MOV RSI,qword ptr [RAX]
MOV EDI,0x7
CALL 0x0012a690
LAB_001f3e1d:
LEA RAX,[0xd829a0]
CMP qword ptr [RAX],0x0
JZ 0x001f3e59
LEA RAX,[0xd829a0]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [0x003bcfd8]
MOV RSI,qword ptr [RAX]
CALL 0x0012a2e0
MOV RAX,qword ptr [0x003bcfd8]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x2546fc]
CALL 0x0012a2e0
LAB_001f3e59:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [0x003bcfd8]
MOV RSI,qword ptr [RAX]
CALL 0x0012a2e0
MOV RAX,qword ptr [0x003bcfd8]
MOV RSI,qword ptr [RAX]
MOV EDI,0xa
CALL 0x0012a690
MOV RAX,qword ptr [0x003bcfd8]
MOV RDI,qword ptr [RAX]
CALL 0x0012a3e0
JMP 0x001f3e91
LAB_001f3e91:
ADD RSP,0x20
POP RBP
RET
|
void my_message_stderr(int8 param_1,char *param_2,ulong param_3)
{
fflush(*(FILE **)PTR_stdout_003bcfd0);
if ((param_3 & 0x480) == 0) {
if ((param_3 & 4) != 0) {
fputc(7,*(FILE **)PTR_stderr_003bcfd8);
}
if (my_progname != (char *)0x0) {
fputs(my_progname,*(FILE **)PTR_stderr_003bcfd8);
fputs(": ",*(FILE **)PTR_stderr_003bcfd8);
}
fputs(param_2,*(FILE **)PTR_stderr_003bcfd8);
fputc(10,*(FILE **)PTR_stderr_003bcfd8);
fflush(*(FILE **)PTR_stderr_003bcfd8);
}
return;
}
|
|
14,787
|
my_casedn_utf16
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_casedn_utf16(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0)
{
my_tolower_utf16(uni_plane, &wc);
if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
}
|
O3
|
c
|
my_casedn_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
testq %rdx, %rdx
jle 0xe2d27
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x78(%rdi), %rax
movq %rax, -0x50(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
leaq (%rsi,%rax), %r14
addq %r15, -0x38(%rbp)
movq %r13, %rdi
leaq -0x40(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *-0x58(%rbp)
testl %eax, %eax
jle 0xe2d27
movl %eax, %ebx
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rax
cmpq (%rax), %rsi
ja 0xe2d09
movq 0x8(%rax), %rax
movq %rsi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xe2d09
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %esi
movq %rsi, -0x40(%rbp)
movq %r13, %rdi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq *-0x48(%rbp)
cmpl %eax, %ebx
jne 0xe2d27
movl %ebx, %eax
addq %rax, %r12
addq %rax, %r15
cmpq %r14, %r12
jb 0xe2cc2
movq -0x30(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_casedn_utf16:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_38], r8
mov [rbp+var_30], rdx
test rdx, rdx
jle loc_E2D27
mov r15, rcx
mov r12, rsi
mov r13, rdi
mov rax, [rdi+78h]
mov [rbp+var_50], rax
mov rax, [rdi+0B8h]
mov rcx, [rax+28h]
mov [rbp+var_58], rcx
mov rax, [rax+30h]
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
lea r14, [rsi+rax]
add [rbp+var_38], r15
loc_E2CC2:
mov rdi, r13
lea rsi, [rbp+var_40]
mov rdx, r12
mov rcx, r14
call [rbp+var_58]
test eax, eax
jle short loc_E2D27
mov ebx, eax
mov rsi, [rbp+var_40]
mov rax, [rbp+var_50]
cmp rsi, [rax]
ja short loc_E2D09
mov rax, [rax+8]
mov rcx, rsi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_E2D09
movzx ecx, sil
lea rcx, [rcx+rcx*2]
mov esi, [rax+rcx*4+4]
mov [rbp+var_40], rsi
loc_E2D09:
mov rdi, r13
mov rdx, r15
mov rcx, [rbp+var_38]
call [rbp+var_48]
cmp ebx, eax
jnz short loc_E2D27
mov eax, ebx
add r12, rax
add r15, rax
cmp r12, r14
jb short loc_E2CC2
loc_E2D27:
mov rax, [rbp+var_30]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_casedn_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5)
{
long long v5; // r15
unsigned long long v6; // r12
long long v7; // rax
unsigned long long v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rsi
long long v12; // rax
long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h]
unsigned long long *v15; // [rsp+10h] [rbp-50h]
unsigned int ( *v16)(long long, unsigned long long, long long, long long); // [rsp+18h] [rbp-48h]
unsigned long long v17; // [rsp+20h] [rbp-40h] BYREF
long long v18; // [rsp+28h] [rbp-38h]
long long v19; // [rsp+30h] [rbp-30h]
v18 = a5;
v19 = a3;
if ( a3 > 0 )
{
v5 = a4;
v6 = a2;
v15 = *(unsigned long long **)(a1 + 120);
v7 = *(_QWORD *)(a1 + 184);
v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(v7 + 40);
v16 = *(unsigned int ( **)(long long, unsigned long long, long long, long long))(v7 + 48);
v8 = a2 + v19;
v18 += a4;
do
{
v9 = v14(a1, &v17, v6, v8);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v17;
if ( v17 <= *v15 )
{
v12 = *(_QWORD *)(v15[1] + 8 * (v17 >> 8));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v17 + 4);
v17 = v11;
}
}
if ( v10 != v16(a1, v11, v5, v18) )
break;
v6 += v10;
v5 += v10;
}
while ( v6 < v8 );
}
return v19;
}
|
my_casedn_utf16:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x30],RDX
TEST RDX,RDX
JLE 0x001e2d27
MOV R15,RCX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RCX
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
LEA R14,[RSI + RAX*0x1]
ADD qword ptr [RBP + -0x38],R15
LAB_001e2cc2:
MOV RDI,R13
LEA RSI,[RBP + -0x40]
MOV RDX,R12
MOV RCX,R14
CALL qword ptr [RBP + -0x58]
TEST EAX,EAX
JLE 0x001e2d27
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x50]
CMP RSI,qword ptr [RAX]
JA 0x001e2d09
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,RSI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001e2d09
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
MOV ESI,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x40],RSI
LAB_001e2d09:
MOV RDI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x38]
CALL qword ptr [RBP + -0x48]
CMP EBX,EAX
JNZ 0x001e2d27
MOV EAX,EBX
ADD R12,RAX
ADD R15,RAX
CMP R12,R14
JC 0x001e2cc2
LAB_001e2d27:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_casedn_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
ulong uVar1;
ulong *puVar2;
code *pcVar3;
code *pcVar4;
long lVar5;
uint uVar6;
uint uVar7;
ulong local_48;
long local_40;
long local_38;
local_38 = param_3;
if (0 < param_3) {
puVar2 = *(ulong **)(param_1 + 0x78);
pcVar3 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
pcVar4 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30);
uVar1 = param_2 + param_3;
local_40 = param_5 + param_4;
do {
uVar6 = (*pcVar3)(param_1,&local_48,param_2,uVar1);
if ((int)uVar6 < 1) {
return local_38;
}
if ((local_48 <= *puVar2) && (lVar5 = *(long *)(puVar2[1] + (local_48 >> 8) * 8), lVar5 != 0))
{
local_48 = (ulong)*(uint *)(lVar5 + 4 + (local_48 & 0xff) * 0xc);
}
uVar7 = (*pcVar4)(param_1,local_48,param_4,local_40);
if (uVar6 != uVar7) {
return local_38;
}
param_2 = param_2 + uVar6;
param_4 = param_4 + (ulong)uVar6;
} while (param_2 < uVar1);
}
return local_38;
}
|
|
14,788
|
Catch::getSeed()
|
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
|
Capturer::Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ) {
auto trimmed = [&] (size_t start, size_t end) {
while (names[start] == ',' || isspace(static_cast<unsigned char>(names[start]))) {
++start;
}
while (names[end] == ',' || isspace(static_cast<unsigned char>(names[end]))) {
--end;
}
return names.substr(start, end - start + 1);
};
auto skipq = [&] (size_t start, char quote) {
for (auto i = start + 1; i < names.size() ; ++i) {
if (names[i] == quote)
return i;
if (names[i] == '\\')
++i;
}
CATCH_INTERNAL_ERROR("CAPTURE parsing encountered unmatched quote");
};
size_t start = 0;
std::stack<char> openings;
for (size_t pos = 0; pos < names.size(); ++pos) {
char c = names[pos];
switch (c) {
case '[':
case '{':
case '(':
// It is basically impossible to disambiguate between
// comparison and start of template args in this context
// case '<':
openings.push(c);
break;
case ']':
case '}':
case ')':
// case '>':
openings.pop();
break;
case '"':
case '\'':
pos = skipq(pos, c);
break;
case ',':
if (start != pos && openings.empty()) {
m_messages.emplace_back(macroName, lineInfo, resultType);
m_messages.back().message = static_cast<std::string>(trimmed(start, pos));
m_messages.back().message += " := ";
start = pos;
}
}
}
assert(openings.empty() && "Mismatched openings");
m_messages.emplace_back(macroName, lineInfo, resultType);
m_messages.back().message = static_cast<std::string>(trimmed(start, names.size() - 1));
m_messages.back().message += " := ";
}
|
O3
|
cpp
|
Catch::getSeed():
pushq %rbx
leaq 0xd3583(%rip), %rbx # 0x134060
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x60aea
movq (%rdi), %rax
jmp 0x60b0f
movl $0x18, %edi
callq 0x171f0
movq %rax, %rdi
leaq 0xce35a(%rip), %rax # 0x12ee58
addq $0x10, %rax
movq %rax, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rdi, (%rbx)
callq *0x18(%rax)
movq (%rax), %rcx
movq %rax, %rdi
popq %rbx
jmpq *0x88(%rcx)
nop
|
_ZN5Catch7rngSeedEv:
push rbx
lea rbx, _ZN5Catch15IMutableContext14currentContextE; Catch::IMutableContext::currentContext
mov rdi, [rbx]
test rdi, rdi
jz short loc_60AEA
mov rax, [rdi]
jmp short loc_60B0F
loc_60AEA:
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
lea rax, _ZTVN5Catch7ContextE; `vtable for'Catch::Context
add rax, 10h
mov [rdi], rax
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
mov [rbx], rdi
loc_60B0F:
call qword ptr [rax+18h]
mov rcx, [rax]
mov rdi, rax
pop rbx
jmp qword ptr [rcx+88h]
|
long long Catch::rngSeed(Catch *this)
{
long long *v1; // rax
long long v2; // rdi
long long v3; // rax
if ( Catch::IMutableContext::currentContext )
{
v1 = (long long *)*Catch::IMutableContext::currentContext;
}
else
{
v2 = operator new(0x18uLL);
v1 = &`vtable for'Catch::Context + 2;
*(_QWORD *)v2 = &`vtable for'Catch::Context + 2;
*(_OWORD *)(v2 + 8) = 0LL;
Catch::IMutableContext::currentContext = (_QWORD *)v2;
}
v3 = ((long long (*)(void))v1[3])();
return (*(long long ( **)(long long))(*(_QWORD *)v3 + 136LL))(v3);
}
|
rngSeed:
PUSH RBX
LEA RBX,[0x234060]
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x00160aea
MOV RAX,qword ptr [RDI]
JMP 0x00160b0f
LAB_00160aea:
MOV EDI,0x18
CALL 0x001171f0
MOV RDI,RAX
LEA RAX,[0x22ee58]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOV qword ptr [RBX],RDI
LAB_00160b0f:
CALL qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
POP RBX
JMP qword ptr [RCX + 0x88]
|
/* Catch::rngSeed() */
void Catch::rngSeed(void)
{
int **ppuVar1;
long *plVar2;
if (IMutableContext::currentContext == (int8 *)0x0) {
IMutableContext::currentContext = (int8 *)operator_new(0x18);
ppuVar1 = &PTR__IContext_0022ee68;
*IMutableContext::currentContext = &PTR__IContext_0022ee68;
IMutableContext::currentContext[1] = 0;
IMutableContext::currentContext[2] = 0;
}
else {
ppuVar1 = (int **)*IMutableContext::currentContext;
}
plVar2 = (long *)(*(code *)ppuVar1[3])();
/* WARNING: Could not recover jumptable at 0x00160b19. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*plVar2 + 0x88))(plVar2);
return;
}
|
|
14,789
|
my_lengthsp_utf16le
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_lengthsp_utf16le(CHARSET_INFO *cs __attribute__((unused)),
const char *ptr, size_t length)
{
const char *end= ptr + length;
while (end > ptr + 1 && uint2korr(end - 2) == ' ')
end-= 2;
return (size_t) (end - ptr);
}
|
O0
|
c
|
my_lengthsp_utf16le:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rdx
addq $0x1, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x21(%rbp)
jbe 0x5de13
movq -0x20(%rbp), %rax
movzwl -0x2(%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x5de1c
jmp 0x5de2a
movq -0x20(%rbp), %rax
addq $-0x2, %rax
movq %rax, -0x20(%rbp)
jmp 0x5ddec
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
nopw (%rax,%rax)
|
my_lengthsp_utf16le:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_20], rax
loc_5DDEC:
mov rcx, [rbp+var_20]
mov rdx, [rbp+var_10]
add rdx, 1
xor eax, eax
cmp rcx, rdx
mov [rbp+var_21], al
jbe short loc_5DE13
mov rax, [rbp+var_20]
movzx eax, word ptr [rax-2]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_21], al
loc_5DE13:
mov al, [rbp+var_21]
test al, 1
jnz short loc_5DE1C
jmp short loc_5DE2A
loc_5DE1C:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_20], rax
jmp short loc_5DDEC
loc_5DE2A:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
sub rax, rcx
pop rbp
retn
|
long long my_lengthsp_utf16le(long long a1, long long a2, long long a3)
{
bool v4; // [rsp+1h] [rbp-21h]
unsigned long long i; // [rsp+2h] [rbp-20h]
for ( i = a3 + a2; ; i -= 2LL )
{
v4 = 0;
if ( i > a2 + 1 )
v4 = *(unsigned __int16 *)(i - 2) == 32;
if ( !v4 )
break;
}
return i - a2;
}
|
my_lengthsp_utf16le:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
LAB_0015ddec:
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x1
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RBP + -0x21],AL
JBE 0x0015de13
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + -0x2]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x21],AL
LAB_0015de13:
MOV AL,byte ptr [RBP + -0x21]
TEST AL,0x1
JNZ 0x0015de1c
JMP 0x0015de2a
LAB_0015de1c:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x2
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0015ddec
LAB_0015de2a:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
POP RBP
RET
|
long my_lengthsp_utf16le(int8 param_1,long param_2,long param_3)
{
bool bVar1;
int8 local_28;
local_28 = param_2 + param_3;
while( true ) {
bVar1 = false;
if (param_2 + 1U < local_28) {
bVar1 = *(short *)(local_28 - 2) == 0x20;
}
if (!bVar1) break;
local_28 = local_28 - 2;
}
return local_28 - param_2;
}
|
|
14,790
|
my_wc_mb_bin
|
eloqsql/strings/ctype-bin.c
|
int my_wc_mb_bin(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
if (s >= e)
return MY_CS_TOOSMALL;
if (wc < 256)
{
s[0]= (char) wc;
return 1;
}
return MY_CS_ILUNI;
}
|
O0
|
c
|
my_wc_mb_bin:
pushq %rbp
movq %rsp, %rbp
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 0x94a47
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x94a6d
cmpq $0x100, -0x18(%rbp) # imm = 0x100
jae 0x94a66
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x94a6d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_wc_mb_bin:
push rbp
mov rbp, rsp
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_94A47
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_94A6D
loc_94A47:
cmp [rbp+var_18], 100h
jnb short loc_94A66
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_94A6D
loc_94A66:
mov [rbp+var_4], 0
loc_94A6D:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_wc_mb_bin(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x100 )
{
return 0;
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_wc_mb_bin:
PUSH RBP
MOV RBP,RSP
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 0x00194a47
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00194a6d
LAB_00194a47:
CMP qword ptr [RBP + -0x18],0x100
JNC 0x00194a66
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 0x00194a6d
LAB_00194a66:
MOV dword ptr [RBP + -0x4],0x0
LAB_00194a6d:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_wc_mb_bin(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x100) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
local_c = 0;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
14,791
|
my_wc_mb_bin
|
eloqsql/strings/ctype-bin.c
|
int my_wc_mb_bin(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
if (s >= e)
return MY_CS_TOOSMALL;
if (wc < 256)
{
s[0]= (char) wc;
return 1;
}
return MY_CS_ILUNI;
}
|
O3
|
c
|
my_wc_mb_bin:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x64917
xorl %eax, %eax
cmpq $0xff, %rsi
ja 0x64917
movb %sil, (%rdx)
movl $0x1, %eax
popq %rbp
retq
|
my_wc_mb_bin:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_64917
xor eax, eax
cmp rsi, 0FFh
ja short loc_64917
mov [rdx], sil
mov eax, 1
loc_64917:
pop rbp
retn
|
long long my_wc_mb_bin(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
result = 0LL;
if ( a2 <= 0xFF )
{
*a3 = a2;
return 1LL;
}
}
return result;
}
|
my_wc_mb_bin:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00164917
XOR EAX,EAX
CMP RSI,0xff
JA 0x00164917
MOV byte ptr [RDX],SIL
MOV EAX,0x1
LAB_00164917:
POP RBP
RET
|
int8 my_wc_mb_bin(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
int8 uVar1;
uVar1 = 0xffffff9b;
if ((param_3 < param_4) && (uVar1 = 0, param_2 < 0x100)) {
*param_3 = (char)param_2;
uVar1 = 1;
}
return uVar1;
}
|
|
14,792
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan()
|
monkey531[P]llama/common/json.hpp
|
token_type scan()
{
// initially, skip the BOM
if (position.chars_read_total == 0 && !skip_bom())
{
error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
return token_type::parse_error;
}
// read next character and ignore whitespace
skip_whitespace();
// ignore comments
while (ignore_comments && current == '/')
{
if (!scan_comment())
{
return token_type::parse_error;
}
// skip following whitespace
skip_whitespace();
}
switch (current)
{
// structural characters
case '[':
return token_type::begin_array;
case ']':
return token_type::end_array;
case '{':
return token_type::begin_object;
case '}':
return token_type::end_object;
case ':':
return token_type::name_separator;
case ',':
return token_type::value_separator;
// literals
case 't':
{
std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}};
return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true);
}
case 'f':
{
std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}};
return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false);
}
case 'n':
{
std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}};
return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null);
}
// string
case '\"':
return scan_string();
// number
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
return scan_number();
// end of input (the null byte is needed when parsing from
// string literals)
case '\0':
case char_traits<char_type>::eof():
return token_type::end_of_input;
// error
default:
error_message = "invalid literal";
return token_type::parse_error;
}
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan():
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
jne 0x5d555
movq %rbx, %rdi
callq 0x5d6fe
testb %al, %al
je 0x5d629
movabsq $0x100002600, %r14 # imm = 0x100002600
movq %rbx, %rdi
callq 0x1c35c
movl 0x14(%rbx), %eax
cmpq $0x20, %rax
ja 0x5d576
btq %rax, %r14
jb 0x5d55f
movl 0x14(%rbx), %eax
cmpl $0x2f, %eax
sete %cl
andb 0x10(%rbx), %cl
cmpb $0x1, %cl
jne 0x5d5bc
movq %rbx, %rdi
callq 0x5d740
testb %al, %al
je 0x5d634
movq %rbx, %rdi
callq 0x1c35c
movl 0x14(%rbx), %eax
cmpq $0x20, %rax
ja 0x5d5ae
btq %rax, %r14
jb 0x5d597
movl 0x14(%rbx), %eax
cmpb $0x1, 0x10(%rbx)
jne 0x5d5bc
cmpl $0x2f, %eax
je 0x5d587
cmpl $0x5a, %eax
jg 0x5d5ec
leal -0x22(%rax), %ecx
cmpl $0x18, %ecx
ja 0x5d676
leaq 0x90490(%rip), %rax # 0xeda64
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x5dd10
cmpl $0x6d, %eax
jle 0x5d641
cmpl $0x7a, %eax
jg 0x5d684
cmpl $0x6e, %eax
je 0x5d6be
cmpl $0x74, %eax
jne 0x5d695
leaq 0xc(%rsp), %rsi
movl $0x65757274, (%rsi) # imm = 0x65757274
movl $0x4, %edx
movq %rbx, %rdi
movl $0x1, %ecx
jmp 0x5d6d6
leaq 0x95e05(%rip), %rax # 0xf3435
movq %rax, 0x70(%rbx)
movl $0xe, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
cmpl $0x5b, %eax
je 0x5d6ea
cmpl $0x5d, %eax
je 0x5d6f4
cmpl $0x66, %eax
jne 0x5d695
leaq 0x10(%rsp), %rsi
movb $0x65, 0x4(%rsi)
movl $0x736c6166, (%rsi) # imm = 0x736C6166
movl $0x5, %edx
movq %rbx, %rdi
movl $0x2, %ecx
jmp 0x5d6d6
incl %eax
cmpl $0x2, %eax
jae 0x5d695
movl $0xf, %eax
jmp 0x5d639
cmpl $0x7b, %eax
je 0x5d6e0
cmpl $0x7d, %eax
jne 0x5d695
movl $0xb, %eax
jmp 0x5d639
leaq 0x95dc6(%rip), %rax # 0xf3462
jmp 0x5d630
movl $0xc, %eax
jmp 0x5d639
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x5d838
movl $0xd, %eax
jmp 0x5d639
leaq 0x8(%rsp), %rsi
movl $0x6c6c756e, (%rsi) # imm = 0x6C6C756E
movl $0x4, %edx
movq %rbx, %rdi
movl $0x3, %ecx
callq 0x5d7bc
jmp 0x5d639
movl $0x9, %eax
jmp 0x5d639
movl $0x8, %eax
jmp 0x5d639
movl $0xa, %eax
jmp 0x5d639
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE4scanEv:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
cmp qword ptr [rdi+20h], 0
jnz short loc_5D555
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(void)
test al, al
jz loc_5D629
loc_5D555:
mov r14, 100002600h
loc_5D55F:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
mov eax, [rbx+14h]
cmp rax, 20h ; ' '
ja short loc_5D576
bt r14, rax
jb short loc_5D55F
loc_5D576:
mov eax, [rbx+14h]
cmp eax, 2Fh ; '/'
setz cl
and cl, [rbx+10h]
cmp cl, 1
jnz short loc_5D5BC
loc_5D587:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(void)
test al, al
jz loc_5D634
loc_5D597:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
mov eax, [rbx+14h]
cmp rax, 20h ; ' '
ja short loc_5D5AE
bt r14, rax
jb short loc_5D597
loc_5D5AE:
mov eax, [rbx+14h]
cmp byte ptr [rbx+10h], 1
jnz short loc_5D5BC
cmp eax, 2Fh ; '/'
jz short loc_5D587
loc_5D5BC:
cmp eax, 5Ah ; 'Z'
jg short loc_5D5EC
lea ecx, [rax-22h]; switch 25 cases
cmp ecx, 18h
ja def_5D5DB; jumptable 000000000005D5DB default case
lea rax, jpt_5D5DB
movsxd rcx, ds:(jpt_5D5DB - 0EDA64h)[rax+rcx*4]
add rcx, rax
jmp rcx; switch jump
loc_5D5DD:
mov rdi, rbx; jumptable 000000000005D5DB cases 45,48-57
add rsp, 18h
pop rbx
pop r14
jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(void)
loc_5D5EC:
cmp eax, 6Dh ; 'm'
jle short loc_5D641
cmp eax, 7Ah ; 'z'
jg loc_5D684
cmp eax, 6Eh ; 'n'
jz loc_5D6BE
cmp eax, 74h ; 't'
jnz loc_5D695; jumptable 000000000005D5DB cases 35-43,46,47
lea rsi, [rsp+28h+var_1C]
mov dword ptr [rsi], 65757274h
mov edx, 4
mov rdi, rbx
mov ecx, 1
jmp loc_5D6D6
loc_5D629:
lea rax, aInvalidBomMust; "invalid BOM; must be 0xEF 0xBB 0xBF if "...
loc_5D630:
mov [rbx+70h], rax
loc_5D634:
mov eax, 0Eh
loc_5D639:
add rsp, 18h
pop rbx
pop r14
retn
loc_5D641:
cmp eax, 5Bh ; '['
jz loc_5D6EA
cmp eax, 5Dh ; ']'
jz loc_5D6F4
cmp eax, 66h ; 'f'
jnz short loc_5D695; jumptable 000000000005D5DB cases 35-43,46,47
lea rsi, [rsp+28h+var_18]
mov byte ptr [rsi+4], 65h ; 'e'
mov dword ptr [rsi], 736C6166h
mov edx, 5
mov rdi, rbx
mov ecx, 2
jmp short loc_5D6D6
def_5D5DB:
inc eax; jumptable 000000000005D5DB default case
cmp eax, 2
jnb short loc_5D695; jumptable 000000000005D5DB cases 35-43,46,47
mov eax, 0Fh
jmp short loc_5D639
loc_5D684:
cmp eax, 7Bh ; '{'
jz short loc_5D6E0
cmp eax, 7Dh ; '}'
jnz short loc_5D695; jumptable 000000000005D5DB cases 35-43,46,47
mov eax, 0Bh
jmp short loc_5D639
loc_5D695:
lea rax, aInvalidLiteral; jumptable 000000000005D5DB cases 35-43,46,47
jmp short loc_5D630
loc_5D69E:
mov eax, 0Ch; jumptable 000000000005D5DB case 58
jmp short loc_5D639
loc_5D6A5:
mov rdi, rbx; jumptable 000000000005D5DB case 34
add rsp, 18h
pop rbx
pop r14
jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string(void)
loc_5D6B4:
mov eax, 0Dh; jumptable 000000000005D5DB case 44
jmp loc_5D639
loc_5D6BE:
lea rsi, [rsp+28h+var_20]
mov dword ptr [rsi], 6C6C756Eh
mov edx, 4
mov rdi, rbx
mov ecx, 3
loc_5D6D6:
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_literalESK_mNS1_10lexer_baseISF_E10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type)
jmp loc_5D639
loc_5D6E0:
mov eax, 9
jmp loc_5D639
loc_5D6EA:
mov eax, 8
jmp loc_5D639
loc_5D6F4:
mov eax, 0Ah
jmp loc_5D639
|
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan(
__m128i *a1)
{
long long v1; // r14
unsigned long long v2; // rax
int v3; // eax
unsigned long long v4; // rax
long long result; // rax
int *v6; // rsi
long long v7; // rdx
long long v8; // rcx
const char *v9; // rax
int v10; // [rsp+8h] [rbp-20h] BYREF
int v11; // [rsp+Ch] [rbp-1Ch] BYREF
_BYTE v12[24]; // [rsp+10h] [rbp-18h] BYREF
if ( !a1[2].m128i_i64[0]
&& !(unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(a1) )
{
v9 = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
goto LABEL_21;
}
v1 = 0x100002600LL;
do
{
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
v2 = a1[1].m128i_u32[1];
}
while ( v2 <= 0x20 && _bittest64(&v1, v2) );
v3 = a1[1].m128i_i32[1];
if ( (a1[1].m128i_i8[0] & (v3 == 47)) == 1 )
{
while ( (unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(a1) )
{
do
{
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
v4 = a1[1].m128i_u32[1];
}
while ( v4 <= 0x20 && _bittest64(&v1, v4) );
v3 = a1[1].m128i_i32[1];
if ( a1[1].m128i_i8[0] != 1 || v3 != 47 )
goto LABEL_12;
}
return 14LL;
}
LABEL_12:
if ( v3 > 90 )
{
if ( v3 <= 109 )
{
switch ( v3 )
{
case '[':
return 8LL;
case ']':
return 10LL;
case 'f':
v6 = (int *)v12;
qmemcpy(v12, "false", 5);
v7 = 5LL;
v8 = 2LL;
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(
a1,
v6,
v7,
v8);
}
}
else if ( v3 > 122 )
{
if ( v3 == 123 )
return 9LL;
if ( v3 == 125 )
return 11LL;
}
else
{
if ( v3 == 110 )
{
v6 = &v10;
v10 = 1819047278;
v7 = 4LL;
v8 = 3LL;
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(
a1,
v6,
v7,
v8);
}
if ( v3 == 116 )
{
v6 = &v11;
v11 = 1702195828;
v7 = 4LL;
v8 = 1LL;
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(
a1,
v6,
v7,
v8);
}
}
LABEL_33:
v9 = "invalid literal";
LABEL_21:
a1[7].m128i_i64[0] = (long long)v9;
return 14LL;
}
switch ( v3 )
{
case '"':
result = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string(a1);
break;
case '#':
case '$':
case '%':
case '&':
case '\'':
case '(':
case ')':
case '*':
case '+':
case '.':
case '/':
goto LABEL_33;
case ',':
result = 13LL;
break;
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
result = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(a1);
break;
case ':':
result = 12LL;
break;
default:
if ( (unsigned int)(v3 + 1) >= 2 )
goto LABEL_33;
result = 15LL;
break;
}
return result;
}
|
scan:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
CMP qword ptr [RDI + 0x20],0x0
JNZ 0x0015d555
MOV RDI,RBX
CALL 0x0015d6fe
TEST AL,AL
JZ 0x0015d629
LAB_0015d555:
MOV R14,0x100002600
LAB_0015d55f:
MOV RDI,RBX
CALL 0x0011c35c
MOV EAX,dword ptr [RBX + 0x14]
CMP RAX,0x20
JA 0x0015d576
BT R14,RAX
JC 0x0015d55f
LAB_0015d576:
MOV EAX,dword ptr [RBX + 0x14]
CMP EAX,0x2f
SETZ CL
AND CL,byte ptr [RBX + 0x10]
CMP CL,0x1
JNZ 0x0015d5bc
LAB_0015d587:
MOV RDI,RBX
CALL 0x0015d740
TEST AL,AL
JZ 0x0015d634
LAB_0015d597:
MOV RDI,RBX
CALL 0x0011c35c
MOV EAX,dword ptr [RBX + 0x14]
CMP RAX,0x20
JA 0x0015d5ae
BT R14,RAX
JC 0x0015d597
LAB_0015d5ae:
MOV EAX,dword ptr [RBX + 0x14]
CMP byte ptr [RBX + 0x10],0x1
JNZ 0x0015d5bc
CMP EAX,0x2f
JZ 0x0015d587
LAB_0015d5bc:
CMP EAX,0x5a
JG 0x0015d5ec
LEA ECX,[RAX + -0x22]
CMP ECX,0x18
JA 0x0015d676
LEA RAX,[0x1eda64]
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_2d:
MOV RDI,RBX
ADD RSP,0x18
POP RBX
POP R14
JMP 0x0015dd10
LAB_0015d5ec:
CMP EAX,0x6d
JLE 0x0015d641
CMP EAX,0x7a
JG 0x0015d684
CMP EAX,0x6e
JZ 0x0015d6be
CMP EAX,0x74
JNZ 0x0015d695
LEA RSI,[RSP + 0xc]
MOV dword ptr [RSI],0x65757274
MOV EDX,0x4
MOV RDI,RBX
MOV ECX,0x1
JMP 0x0015d6d6
LAB_0015d629:
LEA RAX,[0x1f3435]
LAB_0015d630:
MOV qword ptr [RBX + 0x70],RAX
LAB_0015d634:
MOV EAX,0xe
LAB_0015d639:
ADD RSP,0x18
POP RBX
POP R14
RET
LAB_0015d641:
CMP EAX,0x5b
JZ 0x0015d6ea
CMP EAX,0x5d
JZ 0x0015d6f4
CMP EAX,0x66
JNZ 0x0015d695
LEA RSI,[RSP + 0x10]
MOV byte ptr [RSI + 0x4],0x65
MOV dword ptr [RSI],0x736c6166
MOV EDX,0x5
MOV RDI,RBX
MOV ECX,0x2
JMP 0x0015d6d6
default:
INC EAX
CMP EAX,0x2
JNC 0x0015d695
MOV EAX,0xf
JMP 0x0015d639
LAB_0015d684:
CMP EAX,0x7b
JZ 0x0015d6e0
CMP EAX,0x7d
JNZ 0x0015d695
MOV EAX,0xb
JMP 0x0015d639
caseD_23:
LEA RAX,[0x1f3462]
JMP 0x0015d630
caseD_3a:
MOV EAX,0xc
JMP 0x0015d639
caseD_22:
MOV RDI,RBX
ADD RSP,0x18
POP RBX
POP R14
JMP 0x0015d838
caseD_2c:
MOV EAX,0xd
JMP 0x0015d639
LAB_0015d6be:
LEA RSI,[RSP + 0x8]
MOV dword ptr [RSI],0x6c6c756e
MOV EDX,0x4
MOV RDI,RBX
MOV ECX,0x3
LAB_0015d6d6:
CALL 0x0015d7bc
JMP 0x0015d639
LAB_0015d6e0:
MOV EAX,0x9
JMP 0x0015d639
LAB_0015d6ea:
MOV EAX,0x8
JMP 0x0015d639
LAB_0015d6f4:
MOV EAX,0xa
JMP 0x0015d639
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
char cVar1;
int iVar2;
int8 uVar3;
char *pcVar4;
int8 uVar5;
int4 *puVar6;
int4 local_20;
int4 local_1c;
int4 local_18;
int1 local_14;
if ((*(long *)(this + 0x20) == 0) && (cVar1 = skip_bom(this), cVar1 == '\0')) {
pcVar4 = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
goto LAB_0015d630;
}
do {
get(this);
if (0x20 < (ulong)*(uint *)(this + 0x14)) break;
} while ((0x100002600U >> ((ulong)*(uint *)(this + 0x14) & 0x3f) & 1) != 0);
iVar2 = *(int *)(this + 0x14);
if ((iVar2 == 0x2f & (byte)this[0x10]) == 1) {
do {
cVar1 = scan_comment(this);
if (cVar1 == '\0') goto LAB_0015d634;
do {
get(this);
if (0x20 < (ulong)*(uint *)(this + 0x14)) break;
} while ((0x100002600U >> ((ulong)*(uint *)(this + 0x14) & 0x3f) & 1) != 0);
iVar2 = *(int *)(this + 0x14);
} while ((this[0x10] ==
(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x1) && (iVar2 == 0x2f));
}
if (0x5a < iVar2) {
if (iVar2 < 0x6e) {
if (iVar2 == 0x5b) {
return 8;
}
if (iVar2 == 0x5d) {
return 10;
}
if (iVar2 == 0x66) {
puVar6 = &local_18;
local_14 = 0x65;
local_18 = 0x736c6166;
uVar5 = 5;
uVar3 = 2;
goto LAB_0015d6d6;
}
}
else if (iVar2 < 0x7b) {
if (iVar2 == 0x6e) {
puVar6 = &local_20;
local_20 = 0x6c6c756e;
uVar5 = 4;
uVar3 = 3;
LAB_0015d6d6:
uVar3 = scan_literal(this,puVar6,uVar5,uVar3);
return uVar3;
}
if (iVar2 == 0x74) {
puVar6 = &local_1c;
local_1c = 0x65757274;
uVar5 = 4;
uVar3 = 1;
goto LAB_0015d6d6;
}
}
else {
if (iVar2 == 0x7b) {
return 9;
}
if (iVar2 == 0x7d) {
return 0xb;
}
}
goto switchD_0015d5db_caseD_23;
}
switch(iVar2) {
case 0x22:
uVar3 = scan_string(this);
return uVar3;
case 0x2c:
uVar3 = 0xd;
break;
case 0x2d:
case 0x30:
case 0x31:
case 0x32:
case 0x33:
case 0x34:
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39:
uVar3 = scan_number(this);
return uVar3;
case 0x3a:
uVar3 = 0xc;
break;
default:
if (iVar2 + 1U < 2) {
return 0xf;
}
case 0x23:
case 0x24:
case 0x25:
case 0x26:
case 0x27:
case 0x28:
case 0x29:
case 0x2a:
case 0x2b:
case 0x2e:
case 0x2f:
switchD_0015d5db_caseD_23:
pcVar4 = "invalid literal";
LAB_0015d630:
*(char **)(this + 0x70) = pcVar4;
LAB_0015d634:
uVar3 = 0xe;
}
return uVar3;
}
|
|
14,793
|
uint64_from_le
|
corpus-core[P]colibri-stateless/src/util/bytes.c
|
uint64_t uint64_from_le(uint8_t* data) {
return (uint64_t) data[0] |
((uint64_t) data[1] << 8) |
((uint64_t) data[2] << 16) |
((uint64_t) data[3] << 24) |
((uint64_t) data[4] << 32) |
((uint64_t) data[5] << 40) |
((uint64_t) data[6] << 48) |
((uint64_t) data[7] << 56);
}
|
O0
|
c
|
uint64_from_le:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shlq $0x8, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shlq $0x10, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
shlq $0x18, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
shlq $0x28, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x6(%rcx), %ecx
shlq $0x30, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x7(%rcx), %ecx
shlq $0x38, %rcx
orq %rcx, %rax
popq %rbp
retq
nopw (%rax,%rax)
|
uint64_from_le:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+1]
shl rcx, 8
or rax, rcx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+2]
shl rcx, 10h
or rax, rcx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+3]
shl rcx, 18h
or rax, rcx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+4]
shl rcx, 20h
or rax, rcx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+5]
shl rcx, 28h
or rax, rcx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+6]
shl rcx, 30h
or rax, rcx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+7]
shl rcx, 38h
or rax, rcx
pop rbp
retn
|
unsigned long long uint64_from_le(unsigned __int8 *a1)
{
return ((unsigned long long)a1[7] << 56) | ((unsigned long long)a1[6] << 48) | ((unsigned long long)a1[5] << 40) | ((unsigned long long)a1[4] << 32) | ((unsigned long long)a1[3] << 24) | ((unsigned long long)a1[2] << 16) | *(unsigned __int16 *)a1;
}
|
uint64_from_le:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL RCX,0x8
OR RAX,RCX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL RCX,0x10
OR RAX,RCX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x3]
SHL RCX,0x18
OR RAX,RCX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x4]
SHL RCX,0x20
OR RAX,RCX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x5]
SHL RCX,0x28
OR RAX,RCX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x6]
SHL RCX,0x30
OR RAX,RCX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x7]
SHL RCX,0x38
OR RAX,RCX
POP RBP
RET
|
int8 uint64_from_le(int8 *param_1)
{
return *param_1;
}
|
|
14,794
|
uint64_from_le
|
corpus-core[P]colibri-stateless/src/util/bytes.c
|
uint64_t uint64_from_le(uint8_t* data) {
return (uint64_t) data[0] |
((uint64_t) data[1] << 8) |
((uint64_t) data[2] << 16) |
((uint64_t) data[3] << 24) |
((uint64_t) data[4] << 32) |
((uint64_t) data[5] << 40) |
((uint64_t) data[6] << 48) |
((uint64_t) data[7] << 56);
}
|
O1
|
c
|
uint64_from_le:
movq (%rdi), %rax
retq
|
uint64_from_le:
mov rax, [rdi]
retn
|
long long uint64_from_le(long long a1)
{
return *(_QWORD *)a1;
}
|
uint64_from_le:
MOV RAX,qword ptr [RDI]
RET
|
int8 uint64_from_le(int8 *param_1)
{
return *param_1;
}
|
|
14,795
|
uint64_from_le
|
corpus-core[P]colibri-stateless/src/util/bytes.c
|
uint64_t uint64_from_le(uint8_t* data) {
return (uint64_t) data[0] |
((uint64_t) data[1] << 8) |
((uint64_t) data[2] << 16) |
((uint64_t) data[3] << 24) |
((uint64_t) data[4] << 32) |
((uint64_t) data[5] << 40) |
((uint64_t) data[6] << 48) |
((uint64_t) data[7] << 56);
}
|
O3
|
c
|
uint64_from_le:
movq (%rdi), %rax
retq
|
uint64_from_le:
mov rax, [rdi]
retn
|
long long uint64_from_le(long long a1)
{
return *(_QWORD *)a1;
}
|
uint64_from_le:
MOV RAX,qword ptr [RDI]
RET
|
int8 uint64_from_le(int8 *param_1)
{
return *param_1;
}
|
|
14,796
|
inline_mysql_file_sync
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline int
inline_mysql_file_sync(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File fd, myf flags)
{
int result= 0;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_sync(fd, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_sync(fd, flags);
return result;
}
|
O0
|
c
|
inline_mysql_file_sync:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
leaq 0x212421(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x78(%rbp), %rdi
movl $0x10, %edx
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xadd25
leaq 0x2123de(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
xorl %esi, %esi
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xf5b20
movl %eax, -0x24(%rbp)
leaq 0x2123af(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x30(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xadd3a
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xf5b20
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
inline_mysql_file_sync_5:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], 0
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_78]
mov edx, 10h
call rax
mov [rbp+var_30], rax
cmp [rbp+var_30], 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_ADD25
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_30]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
xor esi, esi
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_sync
mov [rbp+var_24], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_30]
xor ecx, ecx
mov esi, ecx
call rax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_ADD3A
loc_ADD25:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_sync
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_ADD3A:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
|
long long inline_mysql_file_sync_5(long long a1, unsigned int a2, unsigned int a3, long long a4)
{
_BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF
long long v6; // [rsp+50h] [rbp-30h]
unsigned int v7; // [rsp+5Ch] [rbp-24h]
long long v8; // [rsp+60h] [rbp-20h]
unsigned int v9; // [rsp+68h] [rbp-18h]
unsigned int v10; // [rsp+6Ch] [rbp-14h]
long long v11; // [rsp+70h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v7 = 0;
v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 16LL);
if ( v6 )
{
((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v6, 0LL, v11, v10);
v7 = my_sync(v9, v8);
((void ( *)(long long, _QWORD))PSI_server[67])(v6, 0LL);
}
else
{
return (unsigned int)my_sync(v9, v8);
}
return v7;
}
|
inline_mysql_file_sync:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],0x0
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x78]
MOV EDX,0x10
CALL RAX
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],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 0x001add25
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
XOR ESI,ESI
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001f5b20
MOV dword ptr [RBP + -0x24],EAX
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x30]
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001add3a
LAB_001add25:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001f5b20
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_001add3a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_sync(int8 param_1,int4 param_2,int4 param_3,int8 param_4)
{
int1 local_80 [72];
long local_38;
int4 local_2c;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int4 local_c;
local_2c = 0;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,0x10);
if (local_38 == 0) {
local_c = my_sync(local_20,local_28);
}
else {
(**(code **)(PSI_server + 0x210))(local_38,0,local_18,local_1c);
local_2c = my_sync(local_20,local_28);
(**(code **)(PSI_server + 0x218))(local_38,0);
local_c = local_2c;
}
return local_c;
}
|
|
14,797
|
minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
if (!expr) throw std::runtime_error("ExpressionNode.expr is null");
auto result = expr->evaluate(context);
if (result.is_string()) {
out << result.get<std::string>();
} else if (result.is_boolean()) {
out << (result.get<bool>() ? "True" : "False");
} else if (!result.is_null()) {
out << result.dump();
}
}
|
O1
|
cpp
|
minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
movq 0x20(%rdi), %rsi
testq %rsi, %rsi
je 0xa31c7
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x8aff6
movzbl 0x40(%r14), %eax
cmpl $0x4, %eax
je 0xa30b8
cmpl $0x3, %eax
jne 0xa30e7
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x8c3ea
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1ba50
jmp 0xa312b
leaq 0x28(%rsp), %rdi
callq 0x8c2f0
leaq 0x530fb(%rip), %rcx # 0xf61c4
leaq 0x530f9(%rip), %rsi # 0xf61c9
testb %al, %al
cmovneq %rcx, %rsi
movzbl %al, %edx
xorq $0x5, %rdx
movq %rbx, %rdi
callq 0x1ba50
jmp 0xa3146
testb %al, %al
jne 0xa3103
cmpq $0x0, 0x48(%rsp)
jne 0xa3103
cmpq $0x0, 0x38(%rsp)
jne 0xa3103
cmpq $0x0, 0x58(%rsp)
je 0xa3146
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8b5e0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1ba50
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa3146
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5cc1e
movq %rbx, %rdi
callq 0x62398
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xa316b
callq 0x71c94
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0xa317a
callq 0x71c94
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xa3189
callq 0x71c94
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xa31bf
movq 0x8fde6(%rip), %rax # 0x132f80
cmpb $0x0, (%rax)
je 0xa31aa
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa31b4
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa31bf
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x78, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x1b460
movq %rax, %r14
leaq 0x53fce(%rip), %rsi # 0xf71a9
movq %rax, %rdi
callq 0x1b340
movq 0x8fdfe(%rip), %rsi # 0x132fe8
movq 0x8fd67(%rip), %rdx # 0x132f58
movq %r14, %rdi
callq 0x1bfb0
jmp 0xa31fd
jmp 0xa322c
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa322f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0xa322f
jmp 0xa322c
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b6a0
jmp 0xa3239
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x8b2ec
movq %rbx, %rdi
callq 0x1c030
nop
|
_ZNK5minja14ExpressionNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push r14
push rbx
sub rsp, 78h
mov rbx, rsi
mov rsi, [rdi+20h]
test rsi, rsi
jz loc_A31C7
lea r14, [rsp+88h+var_60]
mov rdi, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
movzx eax, byte ptr [r14+40h]
cmp eax, 4
jz short loc_A30B8
cmp eax, 3
jnz short loc_A30E7
lea rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_60]
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
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)
jmp short loc_A312B
loc_A30B8:
lea rdi, [rsp+88h+var_60]
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
lea rcx, aTrue_0; "True"
lea rsi, aFalse; "False"
test al, al
cmovnz rsi, rcx
movzx edx, al
xor rdx, 5
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)
jmp short loc_A3146
loc_A30E7:
test al, al
jnz short loc_A3103
cmp [rsp+88h+var_40], 0
jnz short loc_A3103
cmp [rsp+88h+var_50], 0
jnz short loc_A3103
cmp [rsp+88h+var_30], 0
jz short loc_A3146
loc_A3103:
lea rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_60]
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
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_A312B:
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A3146
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A3146:
lea rbx, [rsp+88h+var_20]
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbx-8]
test rdi, rdi
jz short loc_A316B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A316B:
mov rdi, [rsp+88h+var_38]
test rdi, rdi
jz short loc_A317A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A317A:
mov rdi, [rsp+88h+var_48]
test rdi, rdi
jz short loc_A3189
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A3189:
mov rdi, [rsp+88h+var_58]
test rdi, rdi
jz short loc_A31BF
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A31AA
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A31B4
loc_A31AA:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A31B4:
cmp eax, 1
jnz short loc_A31BF
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A31BF:
add rsp, 78h
pop rbx
pop r14
retn
loc_A31C7:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpressionnode; "ExpressionNode.expr is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_A31FD
jmp short loc_A322C
loc_A31FD:
mov rbx, rax
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A322F
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A322F
jmp short loc_A322C
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_A3239
loc_A322C:
mov rbx, rax
loc_A322F:
lea rdi, [rsp+88h+var_60]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_A3239:
mov rdi, rbx
call __Unwind_Resume
|
long long minja::ExpressionNode::do_render(long long a1, long long a2)
{
void (***v3)(void); // rsi
unsigned __int8 v4; // al
const char *v5; // rsi
long long result; // rax
long long v7; // rdi
std::runtime_error *exception; // r14
long long *v9; // [rsp+8h] [rbp-80h] BYREF
long long v10; // [rsp+10h] [rbp-78h]
long long v11; // [rsp+18h] [rbp-70h] BYREF
long long v12; // [rsp+28h] [rbp-60h] BYREF
long long v13; // [rsp+30h] [rbp-58h]
long long v14; // [rsp+38h] [rbp-50h]
volatile signed __int32 *v15; // [rsp+40h] [rbp-48h]
long long v16; // [rsp+48h] [rbp-40h]
volatile signed __int32 *v17; // [rsp+50h] [rbp-38h]
long long v18; // [rsp+58h] [rbp-30h]
volatile signed __int32 *v19; // [rsp+60h] [rbp-28h]
char v20[32]; // [rsp+68h] [rbp-20h] BYREF
v3 = *(void (****)(void))(a1 + 32);
if ( !v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ExpressionNode.expr is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)&v12, v3);
if ( v20[0] == 4 )
{
v4 = minja::Value::get<bool>(&v12);
v5 = "False";
if ( v4 )
v5 = "True";
std::__ostream_insert<char,std::char_traits<char>>(a2, v5, v4 ^ 5LL);
}
else
{
if ( v20[0] == 3 )
{
minja::Value::get<std::string>((long long)&v9, &v12);
std::__ostream_insert<char,std::char_traits<char>>(a2, v9, v10);
}
else
{
if ( !v20[0] && !v16 && !v14 && !v18 )
goto LABEL_15;
minja::Value::dump[abi:cxx11]((long long)&v9, (long long)&v12, 0xFFFFFFFF, 0);
std::__ostream_insert<char,std::char_traits<char>>(a2, v9, v10);
}
if ( v9 != &v11 )
operator delete(v9, v11 + 1);
}
LABEL_15:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v20);
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20);
if ( v19 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19);
if ( v17 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
if ( v15 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
v7 = v13;
if ( v13 )
{
if ( _libc_single_threaded )
{
result = *(unsigned int *)(v13 + 12);
*(_DWORD *)(v13 + 12) = result - 1;
}
else
{
result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v13 + 12), 0xFFFFFFFF);
}
if ( (_DWORD)result == 1 )
return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL);
}
return result;
}
|
do_render:
PUSH R14
PUSH RBX
SUB RSP,0x78
MOV RBX,RSI
MOV RSI,qword ptr [RDI + 0x20]
TEST RSI,RSI
JZ 0x001a31c7
LEA R14,[RSP + 0x28]
MOV RDI,R14
CALL 0x0018aff6
MOVZX EAX,byte ptr [R14 + 0x40]
CMP EAX,0x4
JZ 0x001a30b8
CMP EAX,0x3
JNZ 0x001a30e7
LAB_001a3095:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
CALL 0x0018c3ea
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001a30ae:
MOV RDI,RBX
CALL 0x0011ba50
JMP 0x001a312b
LAB_001a30b8:
LEA RDI,[RSP + 0x28]
CALL 0x0018c2f0
LEA RCX,[0x1f61c4]
LEA RSI,[0x1f61c9]
TEST AL,AL
CMOVNZ RSI,RCX
MOVZX EDX,AL
XOR RDX,0x5
MOV RDI,RBX
CALL 0x0011ba50
JMP 0x001a3146
LAB_001a30e7:
TEST AL,AL
JNZ 0x001a3103
CMP qword ptr [RSP + 0x48],0x0
JNZ 0x001a3103
CMP qword ptr [RSP + 0x38],0x0
JNZ 0x001a3103
CMP qword ptr [RSP + 0x58],0x0
JZ 0x001a3146
LAB_001a3103:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018b5e0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001a3123:
MOV RDI,RBX
CALL 0x0011ba50
LAB_001a312b:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a3146
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b910
LAB_001a3146:
LEA RBX,[RSP + 0x68]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0015cc1e
MOV RDI,RBX
CALL 0x00162398
MOV RDI,qword ptr [RBX + -0x8]
TEST RDI,RDI
JZ 0x001a316b
CALL 0x00171c94
LAB_001a316b:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x001a317a
CALL 0x00171c94
LAB_001a317a:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x001a3189
CALL 0x00171c94
LAB_001a3189:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x001a31bf
MOV RAX,qword ptr [0x00232f80]
CMP byte ptr [RAX],0x0
JZ 0x001a31aa
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a31b4
LAB_001a31aa:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a31b4:
CMP EAX,0x1
JNZ 0x001a31bf
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a31bf:
ADD RSP,0x78
POP RBX
POP R14
RET
LAB_001a31c7:
MOV EDI,0x10
CALL 0x0011b460
MOV R14,RAX
LAB_001a31d4:
LEA RSI,[0x1f71a9]
MOV RDI,RAX
CALL 0x0011b340
LAB_001a31e3:
MOV RSI,qword ptr [0x00232fe8]
MOV RDX,qword ptr [0x00232f58]
MOV RDI,R14
CALL 0x0011bfb0
|
/* minja::ExpressionNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context>
const&) const */
void minja::ExpressionNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
int *piVar1;
bool bVar2;
int iVar3;
runtime_error *this;
char *pcVar4;
long *local_80;
long local_78;
long local_70 [2];
Expression local_60 [8];
long *local_58;
long local_50;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
long local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38;
long local_30;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_28;
data local_20 [16];
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a31d4 to 001a31e2 has its CatchHandler @ 001a321f */
std::runtime_error::runtime_error(this,"ExpressionNode.expr is null");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00232fe8,PTR__runtime_error_00232f58);
}
Expression::evaluate(local_60,*(shared_ptr **)(param_1 + 0x20));
if (local_20[0] == (data)0x4) {
/* try { // try from 001a30b8 to 001a30e4 has its CatchHandler @ 001a322c */
bVar2 = Value::get<bool>((Value *)local_60);
pcVar4 = "False";
if (bVar2) {
pcVar4 = "True";
}
std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,pcVar4,(ulong)bVar2 ^ 5);
}
else {
if (local_20[0] == (data)0x3) {
/* try { // try from 001a3095 to 001a30a3 has its CatchHandler @ 001a321d */
Value::get<std::__cxx11::string>();
/* try { // try from 001a30ae to 001a30b5 has its CatchHandler @ 001a31fd */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)param_2,(char *)local_80,local_78);
}
else {
if ((((local_20[0] == (data)0x0) && (local_40 == 0)) && (local_50 == 0)) && (local_30 == 0))
goto LAB_001a3146;
/* try { // try from 001a3103 to 001a3118 has its CatchHandler @ 001a31fb */
Value::dump_abi_cxx11_((int)&local_80,SUB81(local_60,0));
/* try { // try from 001a3123 to 001a312a has its CatchHandler @ 001a31f9 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)param_2,(char *)local_80,local_78);
}
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
}
LAB_001a3146:
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_20,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_20);
if (local_28 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_28);
}
if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38);
}
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (long *)0x0) {
if (*PTR___libc_single_threaded_00232f80 == '\0') {
LOCK();
piVar1 = (int *)((long)local_58 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_58 + 0xc);
*(int *)((long)local_58 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_58 + 0x18))();
}
}
return;
}
|
|
14,798
|
minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
if (!expr) throw std::runtime_error("ExpressionNode.expr is null");
auto result = expr->evaluate(context);
if (result.is_string()) {
out << result.get<std::string>();
} else if (result.is_boolean()) {
out << (result.get<bool>() ? "True" : "False");
} else if (!result.is_null()) {
out << result.dump();
}
}
|
O3
|
cpp
|
minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
movq 0x20(%rdi), %rsi
testq %rsi, %rsi
je 0xa2bfb
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x8aca0
movzbl 0x40(%r14), %eax
cmpl $0x4, %eax
je 0xa2aec
cmpl $0x3, %eax
jne 0xa2b1b
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x8c102
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1ba50
jmp 0xa2b5f
leaq 0x28(%rsp), %rdi
callq 0x8bff2
leaq 0x516b7(%rip), %rcx # 0xf41b4
leaq 0x516b5(%rip), %rsi # 0xf41b9
testb %al, %al
cmovneq %rcx, %rsi
movzbl %al, %edx
xorq $0x5, %rdx
movq %rbx, %rdi
callq 0x1ba50
jmp 0xa2b7a
testb %al, %al
jne 0xa2b37
cmpq $0x0, 0x48(%rsp)
jne 0xa2b37
cmpq $0x0, 0x38(%rsp)
jne 0xa2b37
cmpq $0x0, 0x58(%rsp)
je 0xa2b7a
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8b2b4
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1ba50
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa2b7a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5d774
movq %rbx, %rdi
callq 0x62bf0
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xa2b9f
callq 0x725dc
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0xa2bae
callq 0x725dc
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xa2bbd
callq 0x725dc
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xa2bf3
movq 0x8e3b2(%rip), %rax # 0x130f80
cmpb $0x0, (%rax)
je 0xa2bde
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa2be8
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa2bf3
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x78, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x1b460
movq %rax, %r14
leaq 0x5258a(%rip), %rsi # 0xf5199
movq %rax, %rdi
callq 0x1b340
movq 0x8e3ca(%rip), %rsi # 0x130fe8
movq 0x8e333(%rip), %rdx # 0x130f58
movq %r14, %rdi
callq 0x1bfb0
jmp 0xa2c31
jmp 0xa2c60
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa2c63
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0xa2c63
jmp 0xa2c60
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b6a0
jmp 0xa2c6d
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x8af92
movq %rbx, %rdi
callq 0x1c030
nop
|
_ZNK5minja14ExpressionNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push r14
push rbx
sub rsp, 78h
mov rbx, rsi
mov rsi, [rdi+20h]
test rsi, rsi
jz loc_A2BFB
lea r14, [rsp+88h+var_60]
mov rdi, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
movzx eax, byte ptr [r14+40h]
cmp eax, 4
jz short loc_A2AEC
cmp eax, 3
jnz short loc_A2B1B
lea rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_60]
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
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)
jmp short loc_A2B5F
loc_A2AEC:
lea rdi, [rsp+88h+var_60]
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
lea rcx, aTrue_0; "True"
lea rsi, aFalse; "False"
test al, al
cmovnz rsi, rcx
movzx edx, al
xor rdx, 5
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)
jmp short loc_A2B7A
loc_A2B1B:
test al, al
jnz short loc_A2B37
cmp [rsp+88h+var_40], 0
jnz short loc_A2B37
cmp [rsp+88h+var_50], 0
jnz short loc_A2B37
cmp [rsp+88h+var_30], 0
jz short loc_A2B7A
loc_A2B37:
lea rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_60]
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
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_A2B5F:
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A2B7A
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A2B7A:
lea rbx, [rsp+88h+var_20]
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbx-8]
test rdi, rdi
jz short loc_A2B9F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A2B9F:
mov rdi, [rsp+88h+var_38]
test rdi, rdi
jz short loc_A2BAE
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A2BAE:
mov rdi, [rsp+88h+var_48]
test rdi, rdi
jz short loc_A2BBD
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A2BBD:
mov rdi, [rsp+88h+var_58]
test rdi, rdi
jz short loc_A2BF3
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A2BDE
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A2BE8
loc_A2BDE:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A2BE8:
cmp eax, 1
jnz short loc_A2BF3
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A2BF3:
add rsp, 78h
pop rbx
pop r14
retn
loc_A2BFB:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpressionnode; "ExpressionNode.expr is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_A2C31
jmp short loc_A2C60
loc_A2C31:
mov rbx, rax
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A2C63
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A2C63
jmp short loc_A2C60
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_A2C6D
loc_A2C60:
mov rbx, rax
loc_A2C63:
lea rdi, [rsp+88h+var_60]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_A2C6D:
mov rdi, rbx
call __Unwind_Resume
|
long long minja::ExpressionNode::do_render(long long a1, long long a2)
{
void (***v3)(void); // rsi
unsigned __int8 v4; // al
const char *v5; // rsi
long long result; // rax
long long v7; // rdi
std::runtime_error *exception; // r14
long long *v9; // [rsp+8h] [rbp-80h] BYREF
long long v10; // [rsp+10h] [rbp-78h]
long long v11; // [rsp+18h] [rbp-70h] BYREF
long long v12; // [rsp+28h] [rbp-60h] BYREF
long long v13; // [rsp+30h] [rbp-58h]
long long v14; // [rsp+38h] [rbp-50h]
volatile signed __int32 *v15; // [rsp+40h] [rbp-48h]
long long v16; // [rsp+48h] [rbp-40h]
volatile signed __int32 *v17; // [rsp+50h] [rbp-38h]
long long v18; // [rsp+58h] [rbp-30h]
volatile signed __int32 *v19; // [rsp+60h] [rbp-28h]
char v20[32]; // [rsp+68h] [rbp-20h] BYREF
v3 = *(void (****)(void))(a1 + 32);
if ( !v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ExpressionNode.expr is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)&v12, v3);
if ( v20[0] == 4 )
{
v4 = minja::Value::get<bool>(&v12);
v5 = "False";
if ( v4 )
v5 = "True";
std::__ostream_insert<char,std::char_traits<char>>(a2, v5, v4 ^ 5LL);
}
else
{
if ( v20[0] == 3 )
{
minja::Value::get<std::string>((long long)&v9, &v12);
std::__ostream_insert<char,std::char_traits<char>>(a2, v9, v10);
}
else
{
if ( !v20[0] && !v16 && !v14 && !v18 )
goto LABEL_15;
minja::Value::dump[abi:cxx11]((long long)&v9, (long long)&v12, 0xFFFFFFFF, 0);
std::__ostream_insert<char,std::char_traits<char>>(a2, v9, v10);
}
if ( v9 != &v11 )
operator delete(v9, v11 + 1);
}
LABEL_15:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v20);
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20);
if ( v19 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19);
if ( v17 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
if ( v15 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
v7 = v13;
if ( v13 )
{
if ( _libc_single_threaded )
{
result = *(unsigned int *)(v13 + 12);
*(_DWORD *)(v13 + 12) = result - 1;
}
else
{
result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v13 + 12), 0xFFFFFFFF);
}
if ( (_DWORD)result == 1 )
return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL);
}
return result;
}
|
do_render:
PUSH R14
PUSH RBX
SUB RSP,0x78
MOV RBX,RSI
MOV RSI,qword ptr [RDI + 0x20]
TEST RSI,RSI
JZ 0x001a2bfb
LEA R14,[RSP + 0x28]
MOV RDI,R14
CALL 0x0018aca0
MOVZX EAX,byte ptr [R14 + 0x40]
CMP EAX,0x4
JZ 0x001a2aec
CMP EAX,0x3
JNZ 0x001a2b1b
LAB_001a2ac9:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
CALL 0x0018c102
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001a2ae2:
MOV RDI,RBX
CALL 0x0011ba50
JMP 0x001a2b5f
LAB_001a2aec:
LEA RDI,[RSP + 0x28]
CALL 0x0018bff2
LEA RCX,[0x1f41b4]
LEA RSI,[0x1f41b9]
TEST AL,AL
CMOVNZ RSI,RCX
MOVZX EDX,AL
XOR RDX,0x5
MOV RDI,RBX
CALL 0x0011ba50
JMP 0x001a2b7a
LAB_001a2b1b:
TEST AL,AL
JNZ 0x001a2b37
CMP qword ptr [RSP + 0x48],0x0
JNZ 0x001a2b37
CMP qword ptr [RSP + 0x38],0x0
JNZ 0x001a2b37
CMP qword ptr [RSP + 0x58],0x0
JZ 0x001a2b7a
LAB_001a2b37:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018b2b4
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001a2b57:
MOV RDI,RBX
CALL 0x0011ba50
LAB_001a2b5f:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a2b7a
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b910
LAB_001a2b7a:
LEA RBX,[RSP + 0x68]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0015d774
MOV RDI,RBX
CALL 0x00162bf0
MOV RDI,qword ptr [RBX + -0x8]
TEST RDI,RDI
JZ 0x001a2b9f
CALL 0x001725dc
LAB_001a2b9f:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x001a2bae
CALL 0x001725dc
LAB_001a2bae:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x001a2bbd
CALL 0x001725dc
LAB_001a2bbd:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x001a2bf3
MOV RAX,qword ptr [0x00230f80]
CMP byte ptr [RAX],0x0
JZ 0x001a2bde
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a2be8
LAB_001a2bde:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a2be8:
CMP EAX,0x1
JNZ 0x001a2bf3
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a2bf3:
ADD RSP,0x78
POP RBX
POP R14
RET
LAB_001a2bfb:
MOV EDI,0x10
CALL 0x0011b460
MOV R14,RAX
LAB_001a2c08:
LEA RSI,[0x1f5199]
MOV RDI,RAX
CALL 0x0011b340
LAB_001a2c17:
MOV RSI,qword ptr [0x00230fe8]
MOV RDX,qword ptr [0x00230f58]
MOV RDI,R14
CALL 0x0011bfb0
|
/* minja::ExpressionNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context>
const&) const */
void minja::ExpressionNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
int *piVar1;
bool bVar2;
int iVar3;
runtime_error *this;
char *pcVar4;
long *local_80;
long local_78;
long local_70 [2];
Expression local_60 [8];
long *local_58;
long local_50;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
long local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38;
long local_30;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_28;
data local_20 [16];
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a2c08 to 001a2c16 has its CatchHandler @ 001a2c53 */
std::runtime_error::runtime_error(this,"ExpressionNode.expr is null");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f58);
}
Expression::evaluate(local_60,*(shared_ptr **)(param_1 + 0x20));
if (local_20[0] == (data)0x4) {
/* try { // try from 001a2aec to 001a2b18 has its CatchHandler @ 001a2c60 */
bVar2 = Value::get<bool>((Value *)local_60);
pcVar4 = "False";
if (bVar2) {
pcVar4 = "True";
}
std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,pcVar4,(ulong)bVar2 ^ 5);
}
else {
if (local_20[0] == (data)0x3) {
/* try { // try from 001a2ac9 to 001a2ad7 has its CatchHandler @ 001a2c51 */
Value::get<std::__cxx11::string>();
/* try { // try from 001a2ae2 to 001a2ae9 has its CatchHandler @ 001a2c31 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)param_2,(char *)local_80,local_78);
}
else {
if ((((local_20[0] == (data)0x0) && (local_40 == 0)) && (local_50 == 0)) && (local_30 == 0))
goto LAB_001a2b7a;
/* try { // try from 001a2b37 to 001a2b4c has its CatchHandler @ 001a2c2f */
Value::dump_abi_cxx11_((int)&local_80,SUB81(local_60,0));
/* try { // try from 001a2b57 to 001a2b5e has its CatchHandler @ 001a2c2d */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)param_2,(char *)local_80,local_78);
}
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
}
LAB_001a2b7a:
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_20,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_20);
if (local_28 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_28);
}
if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38);
}
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (long *)0x0) {
if (*PTR___libc_single_threaded_00230f80 == '\0') {
LOCK();
piVar1 = (int *)((long)local_58 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_58 + 0xc);
*(int *)((long)local_58 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_58 + 0x18))();
}
}
return;
}
|
|
14,799
|
minja::Value::insert(unsigned long, minja::Value const&)
|
monkey531[P]llama/common/minja.hpp
|
void insert(size_t index, const Value& v) {
if (!array_)
throw std::runtime_error("Value is not an array: " + dump());
array_->insert(array_->begin() + index, v);
}
|
O2
|
cpp
|
minja::Value::insert(unsigned long, minja::Value const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x6e374
imulq $0x50, %rsi, %rsi
addq (%rdi), %rsi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x6f408
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %rbx
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x64388
leaq 0x46f4a(%rip), %rsi # 0xb52e0
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x59ae2
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x23e30
xorl %ebp, %ebp
movq 0x90c2c(%rip), %rsi # 0xfefe8
movq 0x90b85(%rip), %rdx # 0xfef48
movq %rbx, %rdi
callq 0x23f00
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x241c8
jmp 0x6e3e0
movq %rax, %r14
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x241c8
testb %bpl, %bpl
jne 0x6e3f2
jmp 0x6e3fa
movq %rax, %r14
movq %rbx, %rdi
callq 0x236a0
movq %r14, %rdi
callq 0x23f80
|
_ZN5minja5Value6insertEmRKS0_:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
mov rdi, [rdi+10h]
test rdi, rdi
jz short loc_6E374
imul rsi, 50h ; 'P'
add rsi, [rdi]
add rsp, 40h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN5minja5ValueESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_; std::vector<minja::Value>::insert(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>,minja::Value const&)
loc_6E374:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr; "Value is not an array: "
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+58h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6E3E0
mov r14, rax
mov bpl, 1
loc_6E3E0:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_6E3F2
jmp short loc_6E3FA
mov r14, rax
loc_6E3F2:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6E3FA:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::insert(minja::Value *this, long long a2, const minja::Value *a3)
{
_QWORD *v4; // rdi
void *exception; // rbx
_BYTE v7[32]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v8[56]; // [rsp+20h] [rbp-38h] BYREF
v4 = (_QWORD *)*((_QWORD *)this + 2);
if ( !v4 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v7, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v8, (long long)"Value is not an array: ", (long long)v7);
std::runtime_error::runtime_error(exception, v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return std::vector<minja::Value>::insert(v4, *v4 + 80 * a2, a3);
}
|
insert:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x10]
TEST RDI,RDI
JZ 0x0016e374
IMUL RSI,RSI,0x50
ADD RSI,qword ptr [RDI]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
JMP 0x0016f408
LAB_0016e374:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV RBX,RAX
LAB_0016e37f:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x00164388
LAB_0016e38f:
LEA RSI,[0x1b52e0]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00159ae2
MOV BPL,0x1
LAB_0016e3a6:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00123e30
XOR EBP,EBP
MOV RSI,qword ptr [0x001fefe8]
MOV RDX,qword ptr [0x001fef48]
MOV RDI,RBX
CALL 0x00123f00
|
/* minja::Value::insert(unsigned long, minja::Value const&) */
void minja::Value::insert(ulong param_1,Value *param_2)
{
vector<minja::Value,std::allocator<minja::Value>> *pvVar1;
runtime_error *this;
int1 auStack_58 [32];
string local_38 [32];
pvVar1 = *(vector<minja::Value,std::allocator<minja::Value>> **)(param_1 + 0x10);
if (pvVar1 != (vector<minja::Value,std::allocator<minja::Value>> *)0x0) {
std::vector<minja::Value,std::allocator<minja::Value>>::insert
(pvVar1,(long)param_2 * 0x50 + *(long *)pvVar1);
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016e37f to 0016e38e has its CatchHandler @ 0016e3ef */
dump_abi_cxx11_((int)auStack_58,SUB81(param_1,0));
/* try { // try from 0016e38f to 0016e3a2 has its CatchHandler @ 0016e3da */
std::operator+((char *)local_38,(string *)"Value is not an array: ");
/* try { // try from 0016e3a6 to 0016e3ca has its CatchHandler @ 0016e3cb */
std::runtime_error::runtime_error(this,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48);
}
|
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.