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
|
---|---|---|---|---|---|---|---|---|---|---|---|
10,500 |
my_caseup_utf32
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_caseup_utf32(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= my_utf32_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0)
{
my_toupper_utf32(uni_plane, &wc);
if (res != my_uni_utf32(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
}
|
O0
|
c
|
my_caseup_utf32:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x5de02
jmp 0x5de04
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x51(%rbp)
jae 0x5de34
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x5dce0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x5de3d
jmp 0x5de97
movq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x61fd0
movl -0x34(%rbp), %eax
movl %eax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x5dd10
movl %eax, %ecx
movl -0x58(%rbp), %eax
cmpl %ecx, %eax
je 0x5de70
jmp 0x5de97
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x34(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x5de04
movq -0x18(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_caseup_utf32:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_50], rax
jmp short $+2
loc_5DE02:
jmp short $+2
loc_5DE04:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_51], al
jnb short loc_5DE34
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_utf32_uni
mov [rbp+var_34], eax
cmp eax, 0
setnle al
mov [rbp+var_51], al
loc_5DE34:
mov al, [rbp+var_51]
test al, 1
jnz short loc_5DE3D
jmp short loc_5DE97
loc_5DE3D:
mov rdi, [rbp+var_50]
lea rsi, [rbp+var_30]
call my_toupper_utf32
mov eax, [rbp+var_34]
mov [rbp+var_58], eax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_48]
call my_uni_utf32
mov ecx, eax
mov eax, [rbp+var_58]
cmp eax, ecx
jz short loc_5DE70
jmp short loc_5DE97
loc_5DE70:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_34]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp loc_5DE04
loc_5DE97:
mov rax, [rbp+var_18]
add rsp, 60h
pop rbp
retn
|
long long my_caseup_utf32(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6)
{
bool v7; // [rsp+Fh] [rbp-51h]
long long v8; // [rsp+10h] [rbp-50h]
unsigned long long v9; // [rsp+18h] [rbp-48h]
unsigned long long v10; // [rsp+20h] [rbp-40h]
int v11; // [rsp+2Ch] [rbp-34h]
unsigned long long v12[2]; // [rsp+30h] [rbp-30h] BYREF
_BYTE *v13; // [rsp+40h] [rbp-20h]
long long v14; // [rsp+48h] [rbp-18h]
unsigned long long v15; // [rsp+50h] [rbp-10h]
long long v16; // [rsp+58h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
v12[1] = a5;
v10 = a3 + a2;
v9 = (unsigned long long)&a4[a5];
v8 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v7 = 0;
if ( v15 < v10 )
{
v11 = my_utf32_uni(v16, (long long)v12, v15, v10, a5, a6);
v7 = v11 > 0;
}
if ( !v7 )
break;
my_toupper_utf32(v8, v12);
if ( v11 != (unsigned int)my_uni_utf32(v16, v12[0], v13, v9) )
break;
v15 += v11;
v13 += v11;
}
return v14;
}
|
my_caseup_utf32:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0015de02
LAB_0015de02:
JMP 0x0015de04
LAB_0015de04:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x51],AL
JNC 0x0015de34
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x0015dce0
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x51],AL
LAB_0015de34:
MOV AL,byte ptr [RBP + -0x51]
TEST AL,0x1
JNZ 0x0015de3d
JMP 0x0015de97
LAB_0015de3d:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x30]
CALL 0x00161fd0
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x58],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x0015dd10
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x58]
CMP EAX,ECX
JZ 0x0015de70
JMP 0x0015de97
LAB_0015de70:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0015de04
LAB_0015de97:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x60
POP RBP
RET
|
long my_caseup_utf32(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
int8 uVar1;
bool bVar2;
int iVar3;
int local_3c;
int8 local_38;
long local_30;
long local_28;
long local_20;
ulong local_18;
long local_10;
uVar1 = *(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 ) {
bVar2 = false;
if (local_18 < param_2 + param_3) {
local_3c = my_utf32_uni(local_10,&local_38,local_18,param_2 + param_3);
bVar2 = 0 < local_3c;
}
if (!bVar2) break;
my_toupper_utf32(uVar1,&local_38);
iVar3 = my_uni_utf32(local_10,local_38,local_28,param_4 + param_5);
if (local_3c != iVar3) {
return local_20;
}
local_18 = local_18 + (long)local_3c;
local_28 = local_28 + local_3c;
}
return local_20;
}
|
|
10,501 |
translog_sync
|
eloqsql/storage/maria/ma_loghandler.c
|
void translog_sync()
{
DBUG_ENTER("ma_translog_sync");
/* The following is only true if initalization of translog succeded */
if (log_descriptor.open_files.elements != 0)
{
uint32 max= get_current_logfile()->number;
uint32 min;
min= soft_sync_min;
if (!min)
min= max;
translog_sync_files(min, max, sync_log_dir >= TRANSLOG_SYNC_DIR_ALWAYS);
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
translog_sync:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpl $0x0, 0x460df1(%rip) # 0x4ae970
je 0x4dbbe
callq 0x52980
movl (%rax), %eax
movl %eax, -0x4(%rbp)
movl 0xc61adb(%rip), %eax # 0xcaf66c
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x4dba0
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %edi
movl -0x4(%rbp), %esi
cmpq $0x2, 0x2a4f4a(%rip) # 0x2f2af8
setae %al
andb $0x1, %al
movzbl %al, %eax
movsbl %al, %edx
callq 0x4c8a0
jmp 0x4dbc0
jmp 0x4dbc2
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
translog_sync:
push rbp
mov rbp, rsp
sub rsp, 10h
cmp cs:dword_4AE970, 0
jz short loc_4DBBE
call get_current_logfile
mov eax, [rax]
mov [rbp+var_4], eax
mov eax, cs:soft_sync_min
mov [rbp+var_8], eax
cmp [rbp+var_8], 0
jnz short loc_4DBA0
mov eax, [rbp+var_4]
mov [rbp+var_8], eax
loc_4DBA0:
mov edi, [rbp+var_8]
mov esi, [rbp+var_4]
cmp cs:sync_log_dir, 2
setnb al
and al, 1
movzx eax, al
movsx edx, al
call translog_sync_files
loc_4DBBE:
jmp short $+2
loc_4DBC0:
jmp short $+2
loc_4DBC2:
add rsp, 10h
pop rbp
retn
|
void translog_sync()
{
unsigned int v0; // [rsp+8h] [rbp-8h]
unsigned int v1; // [rsp+Ch] [rbp-4h]
if ( dword_4AE970 )
{
v1 = *(_DWORD *)get_current_logfile();
v0 = soft_sync_min;
if ( !soft_sync_min )
v0 = v1;
translog_sync_files(v0, v1, (unsigned long long)sync_log_dir >= 2);
}
}
|
translog_sync:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
CMP dword ptr [0x005ae970],0x0
JZ 0x0014dbbe
CALL 0x00152980
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [0x00daf66c]
MOV dword ptr [RBP + -0x8],EAX
CMP dword ptr [RBP + -0x8],0x0
JNZ 0x0014dba0
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x8],EAX
LAB_0014dba0:
MOV EDI,dword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0x4]
CMP qword ptr [0x003f2af8],0x2
SETNC AL
AND AL,0x1
MOVZX EAX,AL
MOVSX EDX,AL
CALL 0x0014c8a0
LAB_0014dbbe:
JMP 0x0014dbc0
LAB_0014dbc0:
JMP 0x0014dbc2
LAB_0014dbc2:
ADD RSP,0x10
POP RBP
RET
|
void translog_sync(void)
{
int *piVar1;
int4 local_10;
if (DAT_005ae970 != 0) {
piVar1 = (int *)get_current_logfile();
local_10 = soft_sync_min;
if (soft_sync_min == 0) {
local_10 = *piVar1;
}
translog_sync_files(local_10,*piVar1,1 < sync_log_dir);
}
return;
}
|
|
10,502 |
mi_unpack_index_tuple
|
eloqsql/storage/myisam/mi_key.c
|
static
int mi_unpack_index_tuple(MI_INFO *info, uint keynr, uchar *record)
{
if (_mi_put_key_in_record(info, keynr, FALSE, record))
{
/* Impossible case; Can only happen if bug in code */
mi_print_error(info->s, HA_ERR_CRASHED);
info->lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_CRASHED;
return 1;
}
return 0;
}
|
O3
|
c
|
mi_unpack_index_tuple:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rcx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %edx, %edx
callq 0x7cd96
testl %eax, %eax
je 0x7d2b5
movq (%rbx), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x7c54a
movq $-0x1, 0x170(%rbx)
callq 0xa63fe
movl $0x7e, (%rax)
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
mi_unpack_index_tuple:
push rbp
mov rbp, rsp
push r14
push rbx
mov rcx, rdx
mov rbx, rdi
xor r14d, r14d
xor edx, edx
call _mi_put_key_in_record
test eax, eax
jz short loc_7D2B5
mov rax, [rbx]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov r14d, 1
loc_7D2B5:
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
|
long long mi_unpack_index_tuple(_QWORD *a1, unsigned int a2, long long a3)
{
unsigned int v3; // r14d
const char *v4; // rsi
v3 = 0;
if ( (unsigned int)mi_put_key_in_record((long long)a1, a2, 0, a3) )
{
v4 = *(const char **)(*a1 + 616LL);
mi_report_error(126, (long long)v4);
a1[46] = -1LL;
*(_DWORD *)my_thread_var(126LL, v4) = 126;
return 1;
}
return v3;
}
|
mi_unpack_index_tuple:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RCX,RDX
MOV RBX,RDI
XOR R14D,R14D
XOR EDX,EDX
CALL 0x0017cd96
TEST EAX,EAX
JZ 0x0017d2b5
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x0017c54a
MOV qword ptr [RBX + 0x170],-0x1
CALL 0x001a63fe
MOV dword ptr [RAX],0x7e
MOV R14D,0x1
LAB_0017d2b5:
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
|
bool mi_unpack_index_tuple(long *param_1,int8 param_2,int8 param_3)
{
int iVar1;
int4 *puVar2;
iVar1 = _mi_put_key_in_record(param_1,param_2,0,param_3);
if (iVar1 != 0) {
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
param_1[0x2e] = -1;
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
}
return iVar1 != 0;
}
|
|
10,503 |
mysql_set_character_set
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname)
{
const MARIADB_CHARSET_INFO *cs;
if (!csname)
goto error;
if ((cs= mysql_find_charset_name(csname)))
{
char buff[64];
snprintf(buff, 63, "SET NAMES %s", cs->csname);
if (!mysql_real_query(mysql, buff, (unsigned long)strlen(buff)))
{
mysql->charset= cs;
return(0);
}
return(mysql->net.last_errno);
}
error:
my_set_error(mysql, CR_CANT_READ_CHARSET, SQLSTATE_UNKNOWN,
0, csname, "compiled_in");
return(mysql->net.last_errno);
}
|
O3
|
c
|
mysql_set_character_set:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
testq %rsi, %rsi
je 0x1ca48
movq %rsi, %r14
movq %rsi, %rdi
callq 0x17cc2
testq %rax, %rax
je 0x1ca68
movq %rax, %r15
movq 0x8(%rax), %r9
leaq 0x1ccd6(%rip), %r8 # 0x396db
xorl %r14d, %r14d
leaq -0x70(%rbp), %r12
movl $0x3f, %esi
movl $0x40, %ecx
movq %r12, %rdi
movl $0x1, %edx
xorl %eax, %eax
callq 0x132c0
movq %r12, %rdi
callq 0x131c0
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x1c3ae
testl %eax, %eax
jne 0x1ca8d
movq %r15, 0x2f0(%rbx)
jmp 0x1ca94
leaq 0x2f241(%rip), %rax # 0x4bc90
movq (%rax), %rdx
leaq 0x1cbb6(%rip), %r9 # 0x3960f
movq %rbx, %rdi
movl $0x7e3, %esi # imm = 0x7E3
xorl %ecx, %ecx
xorl %r8d, %r8d
jmp 0x1ca86
leaq 0x2f221(%rip), %rax # 0x4bc90
movq (%rax), %rdx
leaq 0x1cb96(%rip), %r9 # 0x3960f
movq %rbx, %rdi
movl $0x7e3, %esi # imm = 0x7E3
xorl %ecx, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x182d1
movl 0x90(%rbx), %r14d
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x1cab3
movl %r14d, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x13500
|
mysql_set_character_set:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 50h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
test rsi, rsi
jz short loc_1CA48
mov r14, rsi
mov rdi, rsi
call mysql_find_charset_name
test rax, rax
jz short loc_1CA68
mov r15, rax
mov r9, [rax+8]
lea r8, aSetNamesS; "SET NAMES %s"
xor r14d, r14d
lea r12, [rbp+var_70]
mov esi, 3Fh ; '?'
mov ecx, 40h ; '@'
mov rdi, r12
mov edx, 1
xor eax, eax
call ___snprintf_chk
mov rdi, r12
call _strlen
mov rdi, rbx
mov rsi, r12
mov rdx, rax
call mysql_real_query
test eax, eax
jnz short loc_1CA8D
mov [rbx+2F0h], r15
jmp short loc_1CA94
loc_1CA48:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea r9, aCompiledIn; "compiled_in"
mov rdi, rbx
mov esi, 7E3h
xor ecx, ecx
xor r8d, r8d
jmp short loc_1CA86
loc_1CA68:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea r9, aCompiledIn; "compiled_in"
mov rdi, rbx
mov esi, 7E3h
xor ecx, ecx
mov r8, r14
loc_1CA86:
xor eax, eax
call my_set_error
loc_1CA8D:
mov r14d, [rbx+90h]
loc_1CA94:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_1CAB3
mov eax, r14d
add rsp, 50h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_1CAB3:
call ___stack_chk_fail
|
long long mysql_set_character_set(long long a1, long long a2)
{
const char **charset_name; // rax
const char **v3; // r15
unsigned int v4; // r14d
long long v5; // rax
_BYTE v7[72]; // [rsp+0h] [rbp-70h] BYREF
unsigned long long v8; // [rsp+48h] [rbp-28h]
v8 = __readfsqword(0x28u);
if ( !a2 )
{
my_set_error(a1, 2019, (long long)SQLSTATE_UNKNOWN, 0LL, 0LL, "compiled_in");
return *(unsigned int *)(a1 + 144);
}
charset_name = (const char **)mysql_find_charset_name(a2);
if ( !charset_name )
{
my_set_error(a1, 2019, (long long)SQLSTATE_UNKNOWN, 0LL, a2, "compiled_in");
return *(unsigned int *)(a1 + 144);
}
v3 = charset_name;
v4 = 0;
__snprintf_chk(v7, 63LL, 1LL, 64LL, "SET NAMES %s", charset_name[1]);
v5 = strlen(v7);
if ( (unsigned int)mysql_real_query(a1, (long long)v7, v5) )
return *(unsigned int *)(a1 + 144);
*(_QWORD *)(a1 + 752) = v3;
return v4;
}
|
mysql_set_character_set:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
TEST RSI,RSI
JZ 0x0011ca48
MOV R14,RSI
MOV RDI,RSI
CALL 0x00117cc2
TEST RAX,RAX
JZ 0x0011ca68
MOV R15,RAX
MOV R9,qword ptr [RAX + 0x8]
LEA R8,[0x1396db]
XOR R14D,R14D
LEA R12,[RBP + -0x70]
MOV ESI,0x3f
MOV ECX,0x40
MOV RDI,R12
MOV EDX,0x1
XOR EAX,EAX
CALL 0x001132c0
MOV RDI,R12
CALL 0x001131c0
MOV RDI,RBX
MOV RSI,R12
MOV RDX,RAX
CALL 0x0011c3ae
TEST EAX,EAX
JNZ 0x0011ca8d
MOV qword ptr [RBX + 0x2f0],R15
JMP 0x0011ca94
LAB_0011ca48:
LEA RAX,[0x14bc90]
MOV RDX,qword ptr [RAX]
LEA R9,[0x13960f]
MOV RDI,RBX
MOV ESI,0x7e3
XOR ECX,ECX
XOR R8D,R8D
JMP 0x0011ca86
LAB_0011ca68:
LEA RAX,[0x14bc90]
MOV RDX,qword ptr [RAX]
LEA R9,[0x13960f]
MOV RDI,RBX
MOV ESI,0x7e3
XOR ECX,ECX
MOV R8,R14
LAB_0011ca86:
XOR EAX,EAX
CALL 0x001182d1
LAB_0011ca8d:
MOV R14D,dword ptr [RBX + 0x90]
LAB_0011ca94:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x0011cab3
MOV EAX,R14D
ADD RSP,0x50
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0011cab3:
CALL 0x00113500
|
int4 mysql_set_character_set(long param_1,long param_2)
{
int iVar1;
long lVar2;
size_t sVar3;
int4 uVar4;
long in_FS_OFFSET;
char local_78 [72];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
if (param_2 == 0) {
param_2 = 0;
LAB_0011ca86:
my_set_error(param_1,0x7e3,SQLSTATE_UNKNOWN,0,param_2,"compiled_in");
}
else {
lVar2 = mysql_find_charset_name(param_2);
if (lVar2 == 0) goto LAB_0011ca86;
uVar4 = 0;
__snprintf_chk(local_78,0x3f,1,0x40,"SET NAMES %s",*(int8 *)(lVar2 + 8));
sVar3 = strlen(local_78);
iVar1 = mysql_real_query(param_1,local_78,sVar3);
if (iVar1 == 0) {
*(long *)(param_1 + 0x2f0) = lVar2;
goto LAB_0011ca94;
}
}
uVar4 = *(int4 *)(param_1 + 0x90);
LAB_0011ca94:
if (*(long *)(in_FS_OFFSET + 0x28) != local_30) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar4;
}
|
|
10,504 |
testing::internal::(anonymous namespace)::SplitEscapedString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc
|
std::vector<std::string> SplitEscapedString(const std::string& str) {
std::vector<std::string> lines;
size_t start = 0, end = str.size();
if (end > 2 && str[0] == '"' && str[end - 1] == '"') {
++start;
--end;
}
bool escaped = false;
for (size_t i = start; i + 1 < end; ++i) {
if (escaped) {
escaped = false;
if (str[i] == 'n') {
lines.push_back(str.substr(start, i - start - 1));
start = i + 1;
}
} else {
escaped = str[i] == '\\';
}
}
lines.push_back(str.substr(start, end - start));
return lines;
}
|
O3
|
cpp
|
testing::internal::(anonymous namespace)::SplitEscapedString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x8(%rsi), %r15
cmpq $0x3, %r15
jb 0x1dcfa
movq (%r14), %rax
cmpb $0x22, (%rax)
jne 0x1dcfa
xorl %edx, %edx
cmpb $0x22, -0x1(%rax,%r15)
leaq -0x1(%r15), %rax
sete %dl
cmoveq %rax, %r15
jmp 0x1dcfc
xorl %edx, %edx
leaq 0x1(%rdx), %rbp
cmpq %r15, %rbp
jae 0x1dd71
leaq 0x18(%rsp), %r13
xorl %eax, %eax
leaq 0x8(%rsp), %r12
movq (%r14), %rcx
movb -0x1(%rcx,%rbp), %cl
testb $0x1, %al
je 0x1dd5f
cmpb $0x6e, %cl
jne 0x1dd67
movq %rbp, %rcx
subq %rdx, %rcx
addq $-0x2, %rcx
movq %r12, %rdi
movq %r14, %rsi
callq 0x8510
movq %rbx, %rdi
movq %r12, %rsi
callq 0x39de6
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1dd58
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
xorl %eax, %eax
movq %rbp, %rdx
jmp 0x1dd69
cmpb $0x5c, %cl
sete %al
jmp 0x1dd69
xorl %eax, %eax
incq %rbp
cmpq %rbp, %r15
jne 0x1dd11
subq %rdx, %r15
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0x8510
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x39de6
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ddac
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x1dddd
jmp 0x1ddef
jmp 0x1ddec
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1ddef
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x1ddef
movq %rax, %r14
movq %rbx, %rdi
callq 0x31f9e
movq %r14, %rdi
callq 0x8990
|
_ZN7testing8internal12_GLOBAL__N_118SplitEscapedStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov r15, [rsi+8]
cmp r15, 3
jb short loc_1DCFA
mov rax, [r14]
cmp byte ptr [rax], 22h ; '"'
jnz short loc_1DCFA
xor edx, edx
cmp byte ptr [rax+r15-1], 22h ; '"'
lea rax, [r15-1]
setz dl
cmovz r15, rax
jmp short loc_1DCFC
loc_1DCFA:
xor edx, edx
loc_1DCFC:
lea rbp, [rdx+1]
cmp rbp, r15
jnb short loc_1DD71
lea r13, [rsp+58h+var_40]
xor eax, eax
lea r12, [rsp+58h+var_50]
loc_1DD11:
mov rcx, [r14]
mov cl, [rcx+rbp-1]
test al, 1
jz short loc_1DD5F
cmp cl, 6Eh ; 'n'
jnz short loc_1DD67
mov rcx, rbp
sub rcx, rdx
add rcx, 0FFFFFFFFFFFFFFFEh
mov rdi, r12
mov rsi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, rbx
mov rsi, r12
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEEvDpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r13
jz short loc_1DD58
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1DD58:
xor eax, eax
mov rdx, rbp
jmp short loc_1DD69
loc_1DD5F:
cmp cl, 5Ch ; '\'
setz al
jmp short loc_1DD69
loc_1DD67:
xor eax, eax
loc_1DD69:
inc rbp
cmp r15, rbp
jnz short loc_1DD11
loc_1DD71:
sub r15, rdx
lea rdi, [rsp+58h+var_50]
mov rsi, r14
mov rcx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rsi, [rsp+58h+var_50]
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEEvDpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1DDAC
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1DDAC:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]
cmp rdi, rax
jnz short loc_1DDDD
jmp short loc_1DDEF
jmp short loc_1DDEC
mov r14, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r13
jz short loc_1DDEF
loc_1DDDD:
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1DDEF
loc_1DDEC:
mov r14, rax
loc_1DDEF:
mov rdi, rbx; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __Unwind_Resume
|
void testing::internal::`anonymous namespace'::SplitEscapedString(long long a1, _QWORD *a2)
{
unsigned long long v2; // r15
_BYTE *v3; // rax
_BOOL8 v4; // rdx
long long v5; // rbp
bool v6; // al
char v7; // cl
void *v8[2]; // [rsp+8h] [rbp-50h] BYREF
_QWORD v9[8]; // [rsp+18h] [rbp-40h] BYREF
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v2 = a2[1];
if ( v2 >= 3 && (v3 = (_BYTE *)*a2, *(_BYTE *)*a2 == 34) )
{
v4 = v3[v2 - 1] == 34;
if ( v3[v2 - 1] == 34 )
--v2;
}
else
{
v4 = 0LL;
}
v5 = v4 + 1;
if ( v4 + 1 < v2 )
{
v6 = 0;
do
{
v7 = *(_BYTE *)(*a2 + v5 - 1);
if ( v6 )
{
if ( v7 == 110 )
{
std::string::substr(v8, a2, v4, v5 - v4 - 2);
std::vector<std::string>::emplace_back<std::string>(a1, v8);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
v6 = 0;
v4 = v5;
}
else
{
v6 = 0;
}
}
else
{
v6 = v7 == 92;
}
++v5;
}
while ( v2 != v5 );
}
std::string::substr(v8, a2, v4, v2 - v4);
std::vector<std::string>::emplace_back<std::string>(a1, v8);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
}
|
SplitEscapedString:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV R15,qword ptr [RSI + 0x8]
CMP R15,0x3
JC 0x0011dcfa
MOV RAX,qword ptr [R14]
CMP byte ptr [RAX],0x22
JNZ 0x0011dcfa
XOR EDX,EDX
CMP byte ptr [RAX + R15*0x1 + -0x1],0x22
LEA RAX,[R15 + -0x1]
SETZ DL
CMOVZ R15,RAX
JMP 0x0011dcfc
LAB_0011dcfa:
XOR EDX,EDX
LAB_0011dcfc:
LEA RBP,[RDX + 0x1]
CMP RBP,R15
JNC 0x0011dd71
LEA R13,[RSP + 0x18]
XOR EAX,EAX
LEA R12,[RSP + 0x8]
LAB_0011dd11:
MOV RCX,qword ptr [R14]
MOV CL,byte ptr [RCX + RBP*0x1 + -0x1]
TEST AL,0x1
JZ 0x0011dd5f
CMP CL,0x6e
JNZ 0x0011dd67
MOV RCX,RBP
SUB RCX,RDX
ADD RCX,-0x2
LAB_0011dd2b:
MOV RDI,R12
MOV RSI,R14
CALL 0x00108510
LAB_0011dd36:
MOV RDI,RBX
MOV RSI,R12
CALL 0x00139de6
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x0011dd58
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001084e0
LAB_0011dd58:
XOR EAX,EAX
MOV RDX,RBP
JMP 0x0011dd69
LAB_0011dd5f:
CMP CL,0x5c
SETZ AL
JMP 0x0011dd69
LAB_0011dd67:
XOR EAX,EAX
LAB_0011dd69:
INC RBP
CMP R15,RBP
JNZ 0x0011dd11
LAB_0011dd71:
SUB R15,RDX
LAB_0011dd74:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV RCX,R15
CALL 0x00108510
LAB_0011dd84:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00139de6
LAB_0011dd91:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011ddac
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001084e0
LAB_0011ddac:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::(anonymous namespace)::SplitEscapedString(std::__cxx11::string const&) */
void __thiscall
testing::internal::(anonymous_namespace)::SplitEscapedString
(_anonymous_namespace_ *this,string *param_1)
{
char cVar1;
ulong uVar2;
ulong uVar3;
bool bVar4;
long *local_50 [2];
long local_40 [2];
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
uVar3 = *(ulong *)(param_1 + 8);
if ((uVar3 < 3) || (**(char **)param_1 != '\"')) {
uVar2 = 0;
}
else {
bVar4 = (*(char **)param_1)[uVar3 - 1] == '\"';
uVar2 = (ulong)bVar4;
if (bVar4) {
uVar3 = uVar3 - 1;
}
}
uVar2 = uVar2 + 1;
if (uVar2 < uVar3) {
bVar4 = false;
do {
cVar1 = *(char *)(*(long *)param_1 + -1 + uVar2);
if (bVar4) {
if (cVar1 == 'n') {
/* try { // try from 0011dd2b to 0011dd35 has its CatchHandler @ 0011ddec */
std::__cxx11::string::substr((ulong)local_50,(ulong)param_1);
/* try { // try from 0011dd36 to 0011dd40 has its CatchHandler @ 0011ddd0 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this,
(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
bVar4 = false;
}
else {
bVar4 = false;
}
}
else {
bVar4 = cVar1 == '\\';
}
uVar2 = uVar2 + 1;
} while (uVar3 != uVar2);
}
/* try { // try from 0011dd74 to 0011dd83 has its CatchHandler @ 0011ddce */
std::__cxx11::string::substr((ulong)local_50,(ulong)param_1);
/* try { // try from 0011dd84 to 0011dd90 has its CatchHandler @ 0011ddbb */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this,
(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return;
}
|
|
10,505 |
minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&)
|
monkey531[P]llama/common/minja.hpp
|
SubscriptExpr(const Location & location, std::shared_ptr<Expression> && b, std::shared_ptr<Expression> && i)
: Expression(location), base(std::move(b)), index(std::move(i)) {}
|
O2
|
cpp
|
minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
callq 0x6240a
leaq 0x905e2(%rip), %rax # 0xfa778
addq $0x10, %rax
movq %rax, (%r15)
andq $0x0, 0x28(%r15)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x20(%r15)
andq $0x0, (%r14)
andq $0x0, 0x38(%r15)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x30(%r15)
andq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
|
_ZN5minja13SubscriptExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_:
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, _ZTVN5minja13SubscriptExprE; `vtable for'minja::SubscriptExpr
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
and qword ptr [r15+38h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r15+30h], xmm0
and qword ptr [rbx], 0
pop rbx
pop r14
pop r15
retn
|
long long * minja::SubscriptExpr::SubscriptExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4)
{
long long *result; // rax
__int128 v7; // xmm0
__int128 v8; // xmm0
minja::Expression::Expression((_QWORD *)a1, a2);
result = &`vtable for'minja::SubscriptExpr + 2;
*(_QWORD *)a1 = &`vtable for'minja::SubscriptExpr + 2;
*(_QWORD *)(a1 + 40) = 0LL;
v7 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v7;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v8 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v8;
*(_QWORD *)a4 = 0LL;
return result;
}
|
SubscriptExpr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RDI
CALL 0x0016240a
LEA RAX,[0x1fa778]
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
AND qword ptr [R15 + 0x38],0x0
MOVUPS XMM0,xmmword ptr [RBX]
AND qword ptr [RBX + 0x8],0x0
MOVUPS xmmword ptr [R15 + 0x30],XMM0
AND qword ptr [RBX],0x0
POP RBX
POP R14
POP R15
RET
|
/* minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::SubscriptExpr::SubscriptExpr
(SubscriptExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3)
{
int8 uVar1;
Expression::Expression((Expression *)this,param_1);
*(int ***)this = &PTR_do_evaluate_001fa788;
*(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;
*(int8 *)(this + 0x38) = 0;
uVar1 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x30) = *(int8 *)param_3;
*(int8 *)(this + 0x38) = uVar1;
*(int8 *)param_3 = 0;
return;
}
|
|
10,506 |
cleanup_digest()
|
eloqsql/storage/perfschema/pfs_digest.cc
|
void cleanup_digest(void)
{
PFS_FREE_ARRAY(& builtin_memory_digest,
digest_max,
sizeof(PFS_statements_digest_stat),
statements_digest_stat_array);
PFS_FREE_ARRAY(& builtin_memory_digest_tokens,
digest_max,
(pfs_max_digest_length * sizeof(unsigned char)),
statements_digest_token_array);
statements_digest_stat_array= NULL;
statements_digest_token_array= NULL;
}
|
O3
|
cpp
|
cleanup_digest():
pushq %rbp
movq %rsp, %rbp
movq 0x38f5fe(%rip), %rsi # 0x3d2800
movq 0x38f607(%rip), %rcx # 0x3d2810
leaq 0x38aaf0(%rip), %rdi # 0x3cdd00
movl $0x200, %edx # imm = 0x200
callq 0x30fbf
movq 0x38f5df(%rip), %rsi # 0x3d2800
leaq 0x38c0d8(%rip), %rax # 0x3cf300
movq (%rax), %rdx
movq 0x38f71e(%rip), %rcx # 0x3d2950
leaq 0x38ac07(%rip), %rdi # 0x3cde40
callq 0x30fbf
xorl %eax, %eax
movq %rax, 0x38f5c9(%rip) # 0x3d2810
movq %rax, 0x38f702(%rip) # 0x3d2950
popq %rbp
retq
|
_Z14cleanup_digestv:
push rbp
mov rbp, rsp
mov rsi, cs:digest_max
mov rcx, cs:statements_digest_stat_array
lea rdi, builtin_memory_digest
mov edx, 200h
call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *)
mov rsi, cs:digest_max
lea rax, pfs_max_digest_length
mov rdx, [rax]
mov rcx, cs:_ZL29statements_digest_token_array; statements_digest_token_array
lea rdi, builtin_memory_digest_tokens
call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *)
xor eax, eax
mov cs:statements_digest_stat_array, rax
mov cs:_ZL29statements_digest_token_array, rax; statements_digest_token_array
pop rbp
retn
|
long long cleanup_digest(void)
{
long long result; // rax
pfs_free_array((long long)&builtin_memory_digest, digest_max, 512LL, statements_digest_stat_array);
pfs_free_array(
(long long)&builtin_memory_digest_tokens,
digest_max,
pfs_max_digest_length,
statements_digest_token_array);
result = 0LL;
statements_digest_stat_array = 0LL;
statements_digest_token_array = 0LL;
return result;
}
|
cleanup_digest:
PUSH RBP
MOV RBP,RSP
MOV RSI,qword ptr [0x004d2800]
MOV RCX,qword ptr [0x004d2810]
LEA RDI,[0x4cdd00]
MOV EDX,0x200
CALL 0x00130fbf
MOV RSI,qword ptr [0x004d2800]
LEA RAX,[0x4cf300]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [0x004d2950]
LEA RDI,[0x4cde40]
CALL 0x00130fbf
XOR EAX,EAX
MOV qword ptr [0x004d2810],RAX
MOV qword ptr [0x004d2950],RAX
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* cleanup_digest() */
void cleanup_digest(void)
{
pfs_free_array((PFS_builtin_memory_class *)builtin_memory_digest,digest_max,0x200,
statements_digest_stat_array);
pfs_free_array((PFS_builtin_memory_class *)builtin_memory_digest_tokens,digest_max,
pfs_max_digest_length,statements_digest_token_array);
statements_digest_stat_array = (void *)0x0;
statements_digest_token_array = (void *)0x0;
return;
}
|
|
10,507 |
Json::Reader::decodeDouble(Json::Reader::Token&, Json::Value&)
|
aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_reader.cpp
|
bool Reader::decodeDouble(Token& token, Value& decoded) {
double value = 0;
IStringStream is(String(token.start_, token.end_));
if (!(is >> value)) {
if (value == std::numeric_limits<double>::max())
value = std::numeric_limits<double>::infinity();
else if (value == std::numeric_limits<double>::lowest())
value = -std::numeric_limits<double>::infinity();
else if (!std::isinf(value))
return addError(
"'" + String(token.start_, token.end_) + "' is not a number.", token);
}
decoded = value;
return true;
}
|
O3
|
cpp
|
Json::Reader::decodeDouble(Json::Reader::Token&, Json::Value&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f0, %rsp # imm = 0x1F0
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq $0x0, (%rsp)
movq 0x8(%rsi), %rsi
movq 0x10(%rbx), %rdx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x8(%rsp), %rdi
callq 0x1e620
leaq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x8, %edx
callq 0x1fe30
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6ed06
callq 0x1f0e0
leaq 0x70(%rsp), %rdi
movq %rsp, %rsi
callq 0x1eb10
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
movsd (%rsp), %xmm0
je 0x6ed87
ucomisd 0x19d6a(%rip), %xmm0 # 0x88a98
jne 0x6ed4a
jp 0x6ed4a
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movq %rax, (%rsp)
movsd 0x144e0(%rip), %xmm0 # 0x83228
jmp 0x6ed87
ucomisd 0x19d4e(%rip), %xmm0 # 0x88aa0
jne 0x6ed6e
jp 0x6ed6e
movabsq $-0x10000000000000, %rax # imm = 0xFFF0000000000000
movq %rax, (%rsp)
movsd 0x19d3c(%rip), %xmm0 # 0x88aa8
jmp 0x6ed87
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jne 0x6eddc
leaq 0x8(%rsp), %rdi
callq 0x767da
leaq 0x8(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x76d86
movq %rbx, %rdi
callq 0x76cde
movb $0x1, %bl
movq 0x410be(%rip), %rsi # 0xafe70
leaq 0x70(%rsp), %rdi
callq 0x1f8f0
leaq 0xe8(%rsp), %rdi
callq 0x1e4d0
movl %ebx, %eax
addq $0x1f0, %rsp # imm = 0x1F0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x50(%rsp), %rdi
callq 0x1e620
leaq 0x19fc0(%rip), %rcx # 0x88dbe
leaq 0x50(%rsp), %rdi
movl $0x1, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x1fbb0
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6ee39
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x6ee43
movupd (%rcx), %xmm0
movupd %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x30(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x19d7f(%rip), %rsi # 0x88be5
callq 0x20280
movq %r12, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6ee8e
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x6ee98
movupd (%rcx), %xmm0
movupd %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x6d944
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6eed0
callq 0x1f0e0
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x6eedf
callq 0x1f0e0
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x6eeee
callq 0x1f0e0
xorl %ebx, %ebx
jmp 0x6edab
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6ef0c
callq 0x1f0e0
jmp 0x6ef0c
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x6ef20
callq 0x1f0e0
jmp 0x6ef20
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x6ef38
callq 0x1f0e0
jmp 0x6ef38
jmp 0x6ef35
jmp 0x6ef35
movq %rax, %rbx
movq 0x40f31(%rip), %rsi # 0xafe70
leaq 0x70(%rsp), %rdi
callq 0x1f8f0
leaq 0xe8(%rsp), %rdi
callq 0x1e4d0
jmp 0x6ef6f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6ef6f
callq 0x1f0e0
jmp 0x6ef6f
movq %rax, %rbx
movq %rbx, %rdi
callq 0x1ffd0
nop
|
_ZN4Json6Reader12decodeDoubleERNS0_5TokenERNS_5ValueE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1F0h
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov qword ptr [rsp+218h+var_218], 0; int
mov rsi, [rsi+8]
mov rdx, [rbx+10h]
lea r12, [rsp+218h+var_200]
mov [r12-10h], r12
lea rdi, [rsp+218h+var_210]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+218h+var_1A8]
lea rsi, [rsp+218h+var_210]
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
mov rdi, [rsp+218h+var_210]; void *
cmp rdi, r12
jz short loc_6ED06
call __ZdlPv; operator delete(void *)
loc_6ED06:
lea rdi, [rsp+218h+var_1A8]
mov rsi, rsp
call __ZNSi10_M_extractIdEERSiRT_; std::istream::_M_extract<double>(double &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
movsd xmm0, qword ptr [rsp+218h+var_218]; double
jz short loc_6ED87
ucomisd xmm0, cs:qword_88A98
jnz short loc_6ED4A
jp short loc_6ED4A
mov rax, 7FF0000000000000h
mov qword ptr [rsp+218h+var_218], rax
movsd xmm0, cs:dbl_83228
jmp short loc_6ED87
loc_6ED4A:
ucomisd xmm0, cs:qword_88AA0
jnz short loc_6ED6E
jp short loc_6ED6E
mov rax, 0FFF0000000000000h
mov qword ptr [rsp+218h+var_218], rax
movsd xmm0, cs:dbl_88AA8
jmp short loc_6ED87
loc_6ED6E:
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jnz short loc_6EDDC
loc_6ED87:
lea rdi, [rsp+218h+var_210]; this
call _ZN4Json5ValueC2Ed; Json::Value::Value(double)
lea rbx, [rsp+218h+var_210]
mov rdi, r15; Json::Value *
mov rsi, rbx; this
call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&)
mov rdi, rbx; void *
call _ZN4Json5ValueD2Ev; Json::Value::~Value()
mov bl, 1
loc_6EDAB:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+218h+var_1A8]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+218h+var_130]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov eax, ebx
add rsp, 1F0h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_6EDDC:
mov rsi, [rbx+8]
mov rdx, [rbx+10h]
lea r15, [rsp+218h+var_1B8]
mov [r15-10h], r15
lea rdi, [rsp+218h+var_1C8]
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 rcx, aDuplicateKey+0Fh; "'"
lea rdi, [rsp+218h+var_1C8]
mov r8d, 1
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r13, [rsp+218h+var_1D8]
mov [r13-10h], r13
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_6EE39
mov [rsp+218h+var_1E8], rdx
mov rdx, [rcx]
mov [rsp+218h+var_1D8], rdx
jmp short loc_6EE43
loc_6EE39:
movupd xmm0, xmmword ptr [rcx]
movupd xmmword ptr [r13+0], xmm0
loc_6EE43:
mov rdx, [rax+8]
lea rdi, [rsp+218h+var_1E8]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aIsNotANumber; "' is not a number."
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov [rsp+218h+var_210], r12; int
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_6EE8E
mov [rsp+218h+var_210], rdx
mov rdx, [rcx]
mov qword ptr [rsp+218h+var_200], rdx
jmp short loc_6EE98
loc_6EE8E:
movupd xmm0, xmmword ptr [rcx]
movupd xmmword ptr [r12], xmm0
loc_6EE98:
mov rdx, [rax+8]
lea rsi, [rsp+218h+var_210]; int
mov [rsi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, r14; int
mov rdx, rbx; int
xor ecx, ecx; int
call _ZN4Json6Reader8addErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS0_5TokenEPKc; Json::Reader::addError(std::string const&,Json::Reader::Token &,char const*)
mov rdi, [rsp+218h+var_210]; void *
cmp rdi, r12
jz short loc_6EED0
call __ZdlPv; operator delete(void *)
loc_6EED0:
mov rdi, [rsp+218h+var_1E8]; void *
cmp rdi, r13
jz short loc_6EEDF
call __ZdlPv; operator delete(void *)
loc_6EEDF:
mov rdi, [rsp+218h+var_1C8]; void *
cmp rdi, r15
jz short loc_6EEEE
call __ZdlPv; operator delete(void *)
loc_6EEEE:
xor ebx, ebx
jmp loc_6EDAB
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_6EF0C
call __ZdlPv; operator delete(void *)
jmp short loc_6EF0C
mov rbx, rax
loc_6EF0C:
mov rdi, [rsp+arg_28]; void *
cmp rdi, r13
jz short loc_6EF20
call __ZdlPv; operator delete(void *)
jmp short loc_6EF20
mov rbx, rax
loc_6EF20:
mov rdi, [rsp+arg_48]; void *
cmp rdi, r15
jz short loc_6EF38
call __ZdlPv; operator delete(void *)
jmp short loc_6EF38
jmp short loc_6EF35
jmp short $+2
loc_6EF35:
mov rbx, rax
loc_6EF38:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_68]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+arg_E0]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
jmp short loc_6EF6F
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_6EF6F
call __ZdlPv; operator delete(void *)
jmp short loc_6EF6F
mov rbx, rax
loc_6EF6F:
mov rdi, rbx
call __Unwind_Resume
|
long long Json::Reader::decodeDouble(long long a1, long long a2, Json::Value *a3)
{
long long v5; // rsi
long long v6; // rdx
_QWORD *v7; // rax
double v8; // xmm0_8
void **v9; // rbx
long long v11; // rsi
long long v12; // rdx
long long v13; // rax
__int128 *v14; // rcx
long long v15; // rax
_OWORD *v16; // rcx
int v17[2]; // [rsp+0h] [rbp-218h] BYREF
void *v18[2]; // [rsp+8h] [rbp-210h] BYREF
int v19[6]; // [rsp+18h] [rbp-200h] BYREF
void *v20[2]; // [rsp+30h] [rbp-1E8h] BYREF
__int128 v21; // [rsp+40h] [rbp-1D8h] BYREF
void *v22[2]; // [rsp+50h] [rbp-1C8h] BYREF
_BYTE v23[16]; // [rsp+60h] [rbp-1B8h] BYREF
_BYTE v24[120]; // [rsp+70h] [rbp-1A8h] BYREF
_BYTE v25[304]; // [rsp+E8h] [rbp-130h] BYREF
*(double *)v17 = 0.0;
v5 = *(_QWORD *)(a2 + 8);
v6 = *(_QWORD *)(a2 + 16);
v18[0] = v19;
std::string::_M_construct<char const*>(v18, v5, v6);
std::istringstream::basic_istringstream(v24, v18, 8LL);
if ( v18[0] != v19 )
operator delete(v18[0]);
v7 = (_QWORD *)std::istream::_M_extract<double>(v24, v17);
v8 = *(double *)v17;
if ( (*((_BYTE *)v7 + *(_QWORD *)(*v7 - 24LL) + 32) & 5) == 0 )
goto LABEL_9;
if ( *(double *)v17 == 1.797693134862316e308 )
{
*(double *)v17 = INFINITY;
v8 = INFINITY;
LABEL_9:
Json::Value::Value((Json::Value *)v18, v8);
v9 = v18;
Json::Value::operator=(a3, (Json::Value *)v18);
Json::Value::~Value(v18);
LOBYTE(v9) = 1;
goto LABEL_10;
}
if ( *(double *)v17 == -1.797693134862316e308 )
{
*(double *)v17 = -INFINITY;
v8 = -INFINITY;
goto LABEL_9;
}
if ( (*(_QWORD *)v17 & 0x7FFFFFFFFFFFFFFFLL) == 0x7FF0000000000000LL )
goto LABEL_9;
v11 = *(_QWORD *)(a2 + 8);
v12 = *(_QWORD *)(a2 + 16);
v22[0] = v23;
std::string::_M_construct<char const*>(v22, v11, v12);
v13 = std::string::replace(v22, 0LL, 0LL, "'", 1LL);
v20[0] = &v21;
v14 = (__int128 *)(v13 + 16);
if ( *(_QWORD *)v13 == v13 + 16 )
{
v21 = *v14;
}
else
{
v20[0] = *(void **)v13;
*(_QWORD *)&v21 = *(_QWORD *)v14;
}
v20[1] = *(void **)(v13 + 8);
*(_QWORD *)v13 = v14;
*(_QWORD *)(v13 + 8) = 0LL;
*(_BYTE *)(v13 + 16) = 0;
v15 = std::string::append(v20, "' is not a number.");
v18[0] = v19;
v16 = (_OWORD *)(v15 + 16);
if ( *(_QWORD *)v15 == v15 + 16 )
{
*(_OWORD *)v19 = *v16;
}
else
{
v18[0] = *(void **)v15;
*(_QWORD *)v19 = *(_QWORD *)v16;
}
v18[1] = *(void **)(v15 + 8);
*(_QWORD *)v15 = v16;
*(_QWORD *)(v15 + 8) = 0LL;
*(_BYTE *)(v15 + 16) = 0;
Json::Reader::addError(a1, (long long)v18, a2, 0LL);
if ( v18[0] != v19 )
operator delete(v18[0]);
if ( v20[0] != &v21 )
operator delete(v20[0]);
if ( v22[0] != v23 )
operator delete(v22[0]);
LODWORD(v9) = 0;
LABEL_10:
std::istringstream::~istringstream(v24, &`VTT for'std::istringstream);
std::ios_base::~ios_base((std::ios_base *)v25);
return (unsigned int)v9;
}
|
decodeDouble:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1f0
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
MOV qword ptr [RSP],0x0
MOV RSI,qword ptr [RSI + 0x8]
MOV RDX,qword ptr [RBX + 0x10]
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LAB_0016ecd9:
LEA RDI,[RSP + 0x8]
CALL 0x0011e620
LAB_0016ece3:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x8]
MOV EDX,0x8
CALL 0x0011fe30
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0016ed06
CALL 0x0011f0e0
LAB_0016ed06:
LEA RDI,[RSP + 0x70]
MOV RSI,RSP
CALL 0x0011eb10
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
MOVSD XMM0,qword ptr [RSP]
JZ 0x0016ed87
UCOMISD XMM0,qword ptr [0x00188a98]
JNZ 0x0016ed4a
JP 0x0016ed4a
MOV RAX,0x7ff0000000000000
MOV qword ptr [RSP],RAX
MOVSD XMM0,qword ptr [0x00183228]
JMP 0x0016ed87
LAB_0016ed4a:
UCOMISD XMM0,qword ptr [0x00188aa0]
JNZ 0x0016ed6e
JP 0x0016ed6e
MOV RAX,-0x10000000000000
MOV qword ptr [RSP],RAX
MOVSD XMM0,qword ptr [0x00188aa8]
JMP 0x0016ed87
LAB_0016ed6e:
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JNZ 0x0016eddc
LAB_0016ed87:
LEA RDI,[RSP + 0x8]
CALL 0x001767da
LEA RBX,[RSP + 0x8]
MOV RDI,R15
MOV RSI,RBX
CALL 0x00176d86
MOV RDI,RBX
CALL 0x00176cde
MOV BL,0x1
LAB_0016edab:
MOV RSI,qword ptr [0x001afe70]
LEA RDI,[RSP + 0x70]
CALL 0x0011f8f0
LEA RDI,[RSP + 0xe8]
CALL 0x0011e4d0
MOV EAX,EBX
ADD RSP,0x1f0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0016eddc:
MOV RSI,qword ptr [RBX + 0x8]
MOV RDX,qword ptr [RBX + 0x10]
LEA R15,[RSP + 0x60]
MOV qword ptr [R15 + -0x10],R15
LAB_0016eded:
LEA RDI,[RSP + 0x50]
CALL 0x0011e620
LAB_0016edf7:
LEA RCX,[0x188dbe]
LEA RDI,[RSP + 0x50]
MOV R8D,0x1
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011fbb0
LEA R13,[RSP + 0x40]
MOV qword ptr [R13 + -0x10],R13
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0016ee39
MOV qword ptr [RSP + 0x30],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x40],RDX
JMP 0x0016ee43
LAB_0016ee39:
MOVUPD XMM0,xmmword ptr [RCX]
MOVUPD xmmword ptr [R13],XMM0
LAB_0016ee43:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x30]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_0016ee5f:
LEA RSI,[0x188be5]
CALL 0x00120280
MOV qword ptr [RSP + 0x8],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0016ee8e
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x0016ee98
LAB_0016ee8e:
MOVUPD XMM0,xmmword ptr [RCX]
MOVUPD xmmword ptr [R12],XMM0
LAB_0016ee98:
MOV RDX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_0016eeb4:
MOV RDI,R14
MOV RDX,RBX
XOR ECX,ECX
CALL 0x0016d944
LAB_0016eec1:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0016eed0
CALL 0x0011f0e0
LAB_0016eed0:
MOV RDI,qword ptr [RSP + 0x30]
CMP RDI,R13
JZ 0x0016eedf
CALL 0x0011f0e0
LAB_0016eedf:
MOV RDI,qword ptr [RSP + 0x50]
CMP RDI,R15
JZ 0x0016eeee
CALL 0x0011f0e0
LAB_0016eeee:
XOR EBX,EBX
JMP 0x0016edab
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* Json::Reader::decodeDouble(Json::Reader::Token&, Json::Value&) */
ulong __thiscall Json::Reader::decodeDouble(Reader *this,Token *param_1,Value *param_2)
{
istream *piVar1;
long *plVar2;
long *plVar3;
ulong uVar4;
double dVar5;
long *local_210;
long local_208;
long local_200;
long lStack_1f8;
long *local_1e8;
long local_1e0;
long local_1d8;
long lStack_1d0;
int1 *local_1c8 [2];
int1 local_1b8 [16];
istringstream local_1a8 [120];
ios_base local_130 [264];
/* try { // try from 0016ecd9 to 0016ece2 has its CatchHandler @ 0016ef6c */
local_210 = &local_200;
std::__cxx11::string::_M_construct<char_const*>
(&local_210,*(int8 *)(param_1 + 8),*(int8 *)(param_1 + 0x10));
/* try { // try from 0016ece3 to 0016ecf6 has its CatchHandler @ 0016ef58 */
std::__cxx11::istringstream::istringstream(local_1a8,&local_210,8);
if (local_210 != &local_200) {
operator_delete(local_210);
}
/* try { // try from 0016ed06 to 0016ed12 has its CatchHandler @ 0016ef35 */
piVar1 = std::istream::_M_extract<double>((double *)local_1a8);
dVar5 = 0.0;
if (((((byte)piVar1[*(long *)(*(long *)piVar1 + -0x18) + 0x20] & 5) == 0) ||
((_DAT_00188a98 == 0.0 && (dVar5 = DAT_00183228, !NAN(_DAT_00188a98))))) ||
((_DAT_00188aa0 == 0.0 && (dVar5 = DAT_00188aa8, !NAN(_DAT_00188aa0))))) {
/* try { // try from 0016ed87 to 0016ed90 has its CatchHandler @ 0016ef33 */
Value::Value((Value *)&local_210,dVar5);
Value::operator=(param_2,(Value *)&local_210);
Value::~Value((Value *)&local_210);
uVar4 = CONCAT71((int7)((ulong)&local_210 >> 8),1);
}
else {
/* try { // try from 0016eded to 0016edf6 has its CatchHandler @ 0016ef31 */
local_1c8[0] = local_1b8;
std::__cxx11::string::_M_construct<char_const*>
(local_1c8,*(int8 *)(param_1 + 8),*(int8 *)(param_1 + 0x10));
/* try { // try from 0016edf7 to 0016ee11 has its CatchHandler @ 0016ef1d */
plVar2 = (long *)std::__cxx11::string::replace((string *)local_1c8,0,0,"\'",1);
plVar3 = plVar2 + 2;
if ((long *)*plVar2 == plVar3) {
local_1d8 = *plVar3;
lStack_1d0 = plVar2[3];
local_1e8 = &local_1d8;
}
else {
local_1d8 = *plVar3;
local_1e8 = (long *)*plVar2;
}
local_1e0 = plVar2[1];
*plVar2 = (long)plVar3;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
/* try { // try from 0016ee5f to 0016ee6a has its CatchHandler @ 0016ef09 */
plVar2 = (long *)std::__cxx11::string::append((string *)&local_1e8,"\' is not a number.");
plVar3 = plVar2 + 2;
if ((long *)*plVar2 == plVar3) {
local_200 = *plVar3;
lStack_1f8 = plVar2[3];
local_210 = &local_200;
}
else {
local_200 = *plVar3;
local_210 = (long *)*plVar2;
}
local_208 = plVar2[1];
*plVar2 = (long)plVar3;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
/* try { // try from 0016eeb4 to 0016eec0 has its CatchHandler @ 0016eef5 */
addError(this,(string *)&local_210,param_1,(char *)0x0);
if (local_210 != &local_200) {
operator_delete(local_210);
}
if (local_1e8 != &local_1d8) {
operator_delete(local_1e8);
}
if (local_1c8[0] != local_1b8) {
operator_delete(local_1c8[0]);
}
uVar4 = 0;
}
std::__cxx11::istringstream::~istringstream(local_1a8);
std::ios_base::~ios_base(local_130);
return uVar4 & 0xffffffff;
}
|
|
10,508 |
stbi__pnm_skip_whitespace
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
|
static void stbi__pnm_skip_whitespace(stbi__context *s, char *c)
{
for (;;) {
while (!stbi__at_eof(s) && stbi__pnm_isspace(*c))
*c = (char) stbi__get8(s);
if (stbi__at_eof(s) || *c != '#')
break;
while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' )
*c = (char) stbi__get8(s);
}
}
|
O0
|
c
|
stbi__pnm_skip_whitespace:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x7c012
movq -0x8(%rbp), %rdi
callq 0x70840
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
jne 0x7c03c
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x7c1a0
cmpl $0x0, %eax
setne %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x7c045
jmp 0x7c058
movq -0x8(%rbp), %rdi
callq 0x6a1b0
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x7c012
movq -0x8(%rbp), %rdi
callq 0x70840
cmpl $0x0, %eax
jne 0x7c072
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
je 0x7c074
jmp 0x7c0cd
jmp 0x7c076
movq -0x8(%rbp), %rdi
callq 0x70840
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x12(%rbp)
jne 0x7c0ac
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x12(%rbp)
je 0x7c0ac
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xd, %eax
setne %al
movb %al, -0x12(%rbp)
movb -0x12(%rbp), %al
testb $0x1, %al
jne 0x7c0b5
jmp 0x7c0c8
movq -0x8(%rbp), %rdi
callq 0x6a1b0
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x7c076
jmp 0x7c010
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
stbi__pnm_skip_whitespace:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
loc_7C010:
jmp short $+2
loc_7C012:
mov rdi, [rbp+var_8]
call stbi__at_eof
mov ecx, eax
xor eax, eax
cmp ecx, 0
mov [rbp+var_11], al
jnz short loc_7C03C
mov rax, [rbp+var_10]
movsx edi, byte ptr [rax]
call stbi__pnm_isspace
cmp eax, 0
setnz al
mov [rbp+var_11], al
loc_7C03C:
mov al, [rbp+var_11]
test al, 1
jnz short loc_7C045
jmp short loc_7C058
loc_7C045:
mov rdi, [rbp+var_8]
call stbi__get8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_7C012
loc_7C058:
mov rdi, [rbp+var_8]
call stbi__at_eof
cmp eax, 0
jnz short loc_7C072
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 23h ; '#'
jz short loc_7C074
loc_7C072:
jmp short loc_7C0CD
loc_7C074:
jmp short $+2
loc_7C076:
mov rdi, [rbp+var_8]
call stbi__at_eof
mov ecx, eax
xor eax, eax
cmp ecx, 0
mov [rbp+var_12], al
jnz short loc_7C0AC
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0Ah
mov [rbp+var_12], al
jz short loc_7C0AC
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0Dh
setnz al
mov [rbp+var_12], al
loc_7C0AC:
mov al, [rbp+var_12]
test al, 1
jnz short loc_7C0B5
jmp short loc_7C0C8
loc_7C0B5:
mov rdi, [rbp+var_8]
call stbi__get8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_7C076
loc_7C0C8:
jmp loc_7C010
loc_7C0CD:
add rsp, 20h
pop rbp
retn
|
long long stbi__pnm_skip_whitespace(long long a1, char *a2)
{
long long result; // rax
bool v3; // [rsp+Eh] [rbp-12h]
bool v4; // [rsp+Fh] [rbp-11h]
while ( 1 )
{
while ( 1 )
{
v4 = 0;
if ( !stbi__at_eof(a1) )
v4 = (unsigned int)stbi__pnm_isspace((unsigned int)*a2) != 0;
if ( !v4 )
break;
*a2 = stbi__get8(a1);
}
result = stbi__at_eof(a1);
if ( (_DWORD)result )
break;
result = (unsigned int)*a2;
if ( (_DWORD)result != 35 )
break;
while ( 1 )
{
v3 = 0;
if ( !stbi__at_eof(a1) )
{
v3 = 0;
if ( *a2 != 10 )
v3 = *a2 != 13;
}
if ( !v3 )
break;
*a2 = stbi__get8(a1);
}
}
return result;
}
|
stbi__pnm_skip_whitespace:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LAB_0017c010:
JMP 0x0017c012
LAB_0017c012:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00170840
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JNZ 0x0017c03c
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EDI,byte ptr [RAX]
CALL 0x0017c1a0
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x11],AL
LAB_0017c03c:
MOV AL,byte ptr [RBP + -0x11]
TEST AL,0x1
JNZ 0x0017c045
JMP 0x0017c058
LAB_0017c045:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0016a1b0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x0017c012
LAB_0017c058:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00170840
CMP EAX,0x0
JNZ 0x0017c072
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x23
JZ 0x0017c074
LAB_0017c072:
JMP 0x0017c0cd
LAB_0017c074:
JMP 0x0017c076
LAB_0017c076:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00170840
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x12],AL
JNZ 0x0017c0ac
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0xa
MOV byte ptr [RBP + -0x12],AL
JZ 0x0017c0ac
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0xd
SETNZ AL
MOV byte ptr [RBP + -0x12],AL
LAB_0017c0ac:
MOV AL,byte ptr [RBP + -0x12]
TEST AL,0x1
JNZ 0x0017c0b5
JMP 0x0017c0c8
LAB_0017c0b5:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0016a1b0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x0017c076
LAB_0017c0c8:
JMP 0x0017c010
LAB_0017c0cd:
ADD RSP,0x20
POP RBP
RET
|
void stbi__pnm_skip_whitespace(int8 param_1,char *param_2)
{
char cVar1;
int iVar2;
bool bVar3;
while( true ) {
while( true ) {
iVar2 = stbi__at_eof(param_1);
bVar3 = false;
if (iVar2 == 0) {
iVar2 = stbi__pnm_isspace((int)*param_2);
bVar3 = iVar2 != 0;
}
if (!bVar3) break;
cVar1 = stbi__get8(param_1);
*param_2 = cVar1;
}
iVar2 = stbi__at_eof(param_1);
if ((iVar2 != 0) || (*param_2 != '#')) break;
while( true ) {
iVar2 = stbi__at_eof(param_1);
bVar3 = false;
if ((iVar2 == 0) && (bVar3 = false, *param_2 != '\n')) {
bVar3 = *param_2 != '\r';
}
if (!bVar3) break;
cVar1 = stbi__get8(param_1);
*param_2 = cVar1;
}
}
return;
}
|
|
10,509 |
stbi__pnm_skip_whitespace
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
|
static void stbi__pnm_skip_whitespace(stbi__context *s, char *c)
{
for (;;) {
while (!stbi__at_eof(s) && stbi__pnm_isspace(*c))
*c = (char) stbi__get8(s);
if (stbi__at_eof(s) || *c != '#')
break;
while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' )
*c = (char) stbi__get8(s);
}
}
|
O1
|
c
|
stbi__pnm_skip_whitespace:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x10(%r14)
je 0x38f8c
movq 0x28(%r14), %rdi
callq *0x20(%r14)
testl %eax, %eax
je 0x38f9c
cmpl $0x0, 0x30(%r14)
je 0x38fb8
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jae 0x38fb8
movzbl (%rbx), %eax
leal -0x9(%rax), %ecx
cmpl $0x5, %ecx
jae 0x38fb3
movq %r14, %rdi
callq 0x35662
movb %al, (%rbx)
jmp 0x38f72
cmpl $0x20, %eax
je 0x38fa7
cmpq $0x0, 0x10(%r14)
je 0x38fd2
movq 0x28(%r14), %rdi
callq *0x20(%r14)
testl %eax, %eax
je 0x38fe2
cmpl $0x0, 0x30(%r14)
je 0x3903a
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jae 0x3903a
cmpb $0x23, (%rbx)
jne 0x3903a
cmpq $0x0, 0x10(%r14)
je 0x39005
movq 0x28(%r14), %rdi
callq *0x20(%r14)
testl %eax, %eax
je 0x39019
cmpl $0x0, 0x30(%r14)
je 0x38f72
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jae 0x38f72
movzbl (%rbx), %eax
cmpl $0xa, %eax
je 0x38f72
cmpl $0xd, %eax
je 0x38f72
movq %r14, %rdi
callq 0x35662
movb %al, (%rbx)
jmp 0x38fe7
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
stbi__pnm_skip_whitespace:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
loc_38F72:
cmp qword ptr [r14+10h], 0
jz short loc_38F8C
mov rdi, [r14+28h]
call qword ptr [r14+20h]
test eax, eax
jz short loc_38F9C
cmp dword ptr [r14+30h], 0
jz short loc_38FB8
loc_38F8C:
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jnb short loc_38FB8
loc_38F9C:
movzx eax, byte ptr [rbx]
lea ecx, [rax-9]
cmp ecx, 5
jnb short loc_38FB3
loc_38FA7:
mov rdi, r14
call stbi__get8
mov [rbx], al
jmp short loc_38F72
loc_38FB3:
cmp eax, 20h ; ' '
jz short loc_38FA7
loc_38FB8:
cmp qword ptr [r14+10h], 0
jz short loc_38FD2
mov rdi, [r14+28h]
call qword ptr [r14+20h]
test eax, eax
jz short loc_38FE2
cmp dword ptr [r14+30h], 0
jz short loc_3903A
loc_38FD2:
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jnb short loc_3903A
loc_38FE2:
cmp byte ptr [rbx], 23h ; '#'
jnz short loc_3903A
loc_38FE7:
cmp qword ptr [r14+10h], 0
jz short loc_39005
mov rdi, [r14+28h]
call qword ptr [r14+20h]
test eax, eax
jz short loc_39019
cmp dword ptr [r14+30h], 0
jz loc_38F72
loc_39005:
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jnb loc_38F72
loc_39019:
movzx eax, byte ptr [rbx]
cmp eax, 0Ah
jz loc_38F72
cmp eax, 0Dh
jz loc_38F72
mov rdi, r14
call stbi__get8
mov [rbx], al
jmp short loc_38FE7
loc_3903A:
add rsp, 8
pop rbx
pop r14
retn
|
unsigned long long stbi__pnm_skip_whitespace(long long a1, char *a2)
{
int v2; // eax
unsigned long long result; // rax
int v4; // eax
while ( 1 )
{
LABEL_1:
if ( *(_QWORD *)(a1 + 16) )
{
if ( !(*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) )
goto LABEL_5;
if ( !*(_DWORD *)(a1 + 48) )
break;
}
if ( *(_QWORD *)(a1 + 192) >= *(_QWORD *)(a1 + 200) )
break;
LABEL_5:
v2 = (unsigned __int8)*a2;
if ( (unsigned int)(v2 - 9) >= 5 && v2 != 32 )
break;
*a2 = stbi__get8(a1);
}
if ( !*(_QWORD *)(a1 + 16) )
goto LABEL_11;
result = (*(long long ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40));
if ( !(_DWORD)result )
{
LABEL_12:
if ( *a2 != 35 )
return result;
while ( 1 )
{
if ( *(_QWORD *)(a1 + 16) )
{
if ( !(*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) )
goto LABEL_17;
if ( !*(_DWORD *)(a1 + 48) )
goto LABEL_1;
}
if ( *(_QWORD *)(a1 + 192) >= *(_QWORD *)(a1 + 200) )
goto LABEL_1;
LABEL_17:
v4 = (unsigned __int8)*a2;
if ( v4 == 10 || v4 == 13 )
goto LABEL_1;
*a2 = stbi__get8(a1);
}
}
if ( *(_DWORD *)(a1 + 48) )
{
LABEL_11:
result = *(_QWORD *)(a1 + 192);
if ( result < *(_QWORD *)(a1 + 200) )
goto LABEL_12;
}
return result;
}
|
stbi__pnm_skip_whitespace:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
LAB_00138f72:
CMP qword ptr [R14 + 0x10],0x0
JZ 0x00138f8c
MOV RDI,qword ptr [R14 + 0x28]
CALL qword ptr [R14 + 0x20]
TEST EAX,EAX
JZ 0x00138f9c
CMP dword ptr [R14 + 0x30],0x0
JZ 0x00138fb8
LAB_00138f8c:
MOV RAX,qword ptr [R14 + 0xc0]
CMP RAX,qword ptr [R14 + 0xc8]
JNC 0x00138fb8
LAB_00138f9c:
MOVZX EAX,byte ptr [RBX]
LEA ECX,[RAX + -0x9]
CMP ECX,0x5
JNC 0x00138fb3
LAB_00138fa7:
MOV RDI,R14
CALL 0x00135662
MOV byte ptr [RBX],AL
JMP 0x00138f72
LAB_00138fb3:
CMP EAX,0x20
JZ 0x00138fa7
LAB_00138fb8:
CMP qword ptr [R14 + 0x10],0x0
JZ 0x00138fd2
MOV RDI,qword ptr [R14 + 0x28]
CALL qword ptr [R14 + 0x20]
TEST EAX,EAX
JZ 0x00138fe2
CMP dword ptr [R14 + 0x30],0x0
JZ 0x0013903a
LAB_00138fd2:
MOV RAX,qword ptr [R14 + 0xc0]
CMP RAX,qword ptr [R14 + 0xc8]
JNC 0x0013903a
LAB_00138fe2:
CMP byte ptr [RBX],0x23
JNZ 0x0013903a
LAB_00138fe7:
CMP qword ptr [R14 + 0x10],0x0
JZ 0x00139005
MOV RDI,qword ptr [R14 + 0x28]
CALL qword ptr [R14 + 0x20]
TEST EAX,EAX
JZ 0x00139019
CMP dword ptr [R14 + 0x30],0x0
JZ 0x00138f72
LAB_00139005:
MOV RAX,qword ptr [R14 + 0xc0]
CMP RAX,qword ptr [R14 + 0xc8]
JNC 0x00138f72
LAB_00139019:
MOVZX EAX,byte ptr [RBX]
CMP EAX,0xa
JZ 0x00138f72
CMP EAX,0xd
JZ 0x00138f72
MOV RDI,R14
CALL 0x00135662
MOV byte ptr [RBX],AL
JMP 0x00138fe7
LAB_0013903a:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void stbi__pnm_skip_whitespace(long param_1,byte *param_2)
{
byte bVar1;
int iVar2;
LAB_00138f72:
do {
if (*(long *)(param_1 + 0x10) != 0) {
iVar2 = (**(code **)(param_1 + 0x20))(*(int8 *)(param_1 + 0x28));
if (iVar2 == 0) goto LAB_00138f9c;
if (*(int *)(param_1 + 0x30) != 0) goto LAB_00138f8c;
LAB_00138fb8:
if (*(long *)(param_1 + 0x10) != 0) {
iVar2 = (**(code **)(param_1 + 0x20))(*(int8 *)(param_1 + 0x28));
if (iVar2 == 0) goto LAB_00138fe2;
if (*(int *)(param_1 + 0x30) == 0) {
return;
}
}
if (*(ulong *)(param_1 + 200) <= *(ulong *)(param_1 + 0xc0)) {
return;
}
LAB_00138fe2:
if (*param_2 != 0x23) {
return;
}
do {
if (*(long *)(param_1 + 0x10) == 0) {
LAB_00139005:
if (*(ulong *)(param_1 + 200) <= *(ulong *)(param_1 + 0xc0)) goto LAB_00138f72;
}
else {
iVar2 = (**(code **)(param_1 + 0x20))(*(int8 *)(param_1 + 0x28));
if (iVar2 != 0) {
if (*(int *)(param_1 + 0x30) != 0) goto LAB_00139005;
goto LAB_00138f72;
}
}
if ((*param_2 == 10) || (*param_2 == 0xd)) goto LAB_00138f72;
bVar1 = stbi__get8(param_1);
*param_2 = bVar1;
} while( true );
}
LAB_00138f8c:
if (*(ulong *)(param_1 + 200) <= *(ulong *)(param_1 + 0xc0)) goto LAB_00138fb8;
LAB_00138f9c:
if ((4 < *param_2 - 9) && (*param_2 != 0x20)) goto LAB_00138fb8;
bVar1 = stbi__get8(param_1);
*param_2 = bVar1;
} while( true );
}
|
|
10,510 |
stbi__pnm_skip_whitespace
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
|
static void stbi__pnm_skip_whitespace(stbi__context *s, char *c)
{
for (;;) {
while (!stbi__at_eof(s) && stbi__pnm_isspace(*c))
*c = (char) stbi__get8(s);
if (stbi__at_eof(s) || *c != '#')
break;
while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' )
*c = (char) stbi__get8(s);
}
}
|
O3
|
c
|
stbi__pnm_skip_whitespace:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x10(%r14)
je 0x38e1f
movq 0x28(%r14), %rdi
callq *0x20(%r14)
testl %eax, %eax
je 0x38e2f
cmpl $0x0, 0x30(%r14)
je 0x38e4b
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jae 0x38e4b
movzbl (%rbx), %eax
leal -0x9(%rax), %ecx
cmpl $0x5, %ecx
jae 0x38e46
movq %r14, %rdi
callq 0x35752
movb %al, (%rbx)
jmp 0x38e05
cmpl $0x20, %eax
je 0x38e3a
cmpq $0x0, 0x10(%r14)
je 0x38e65
movq 0x28(%r14), %rdi
callq *0x20(%r14)
testl %eax, %eax
je 0x38e75
cmpl $0x0, 0x30(%r14)
je 0x38ecd
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jae 0x38ecd
cmpb $0x23, (%rbx)
jne 0x38ecd
cmpq $0x0, 0x10(%r14)
je 0x38e98
movq 0x28(%r14), %rdi
callq *0x20(%r14)
testl %eax, %eax
je 0x38eac
cmpl $0x0, 0x30(%r14)
je 0x38e05
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jae 0x38e05
movzbl (%rbx), %eax
cmpl $0xa, %eax
je 0x38e05
cmpl $0xd, %eax
je 0x38e05
movq %r14, %rdi
callq 0x35752
movb %al, (%rbx)
jmp 0x38e7a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
stbi__pnm_skip_whitespace:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
loc_38E05:
cmp qword ptr [r14+10h], 0
jz short loc_38E1F
mov rdi, [r14+28h]
call qword ptr [r14+20h]
test eax, eax
jz short loc_38E2F
cmp dword ptr [r14+30h], 0
jz short loc_38E4B
loc_38E1F:
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jnb short loc_38E4B
loc_38E2F:
movzx eax, byte ptr [rbx]
lea ecx, [rax-9]
cmp ecx, 5
jnb short loc_38E46
loc_38E3A:
mov rdi, r14
call stbi__get8
mov [rbx], al
jmp short loc_38E05
loc_38E46:
cmp eax, 20h ; ' '
jz short loc_38E3A
loc_38E4B:
cmp qword ptr [r14+10h], 0
jz short loc_38E65
mov rdi, [r14+28h]
call qword ptr [r14+20h]
test eax, eax
jz short loc_38E75
cmp dword ptr [r14+30h], 0
jz short loc_38ECD
loc_38E65:
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jnb short loc_38ECD
loc_38E75:
cmp byte ptr [rbx], 23h ; '#'
jnz short loc_38ECD
loc_38E7A:
cmp qword ptr [r14+10h], 0
jz short loc_38E98
mov rdi, [r14+28h]
call qword ptr [r14+20h]
test eax, eax
jz short loc_38EAC
cmp dword ptr [r14+30h], 0
jz loc_38E05
loc_38E98:
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jnb loc_38E05
loc_38EAC:
movzx eax, byte ptr [rbx]
cmp eax, 0Ah
jz loc_38E05
cmp eax, 0Dh
jz loc_38E05
mov rdi, r14
call stbi__get8
mov [rbx], al
jmp short loc_38E7A
loc_38ECD:
add rsp, 8
pop rbx
pop r14
retn
|
unsigned long long stbi__pnm_skip_whitespace(long long a1, char *a2)
{
int v2; // eax
unsigned long long result; // rax
int v4; // eax
while ( 1 )
{
LABEL_1:
if ( *(_QWORD *)(a1 + 16) )
{
if ( !(*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) )
goto LABEL_5;
if ( !*(_DWORD *)(a1 + 48) )
break;
}
if ( *(_QWORD *)(a1 + 192) >= *(_QWORD *)(a1 + 200) )
break;
LABEL_5:
v2 = (unsigned __int8)*a2;
if ( (unsigned int)(v2 - 9) >= 5 && v2 != 32 )
break;
*a2 = stbi__get8(a1);
}
if ( !*(_QWORD *)(a1 + 16) )
goto LABEL_11;
result = (*(long long ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40));
if ( !(_DWORD)result )
{
LABEL_12:
if ( *a2 != 35 )
return result;
while ( 1 )
{
if ( *(_QWORD *)(a1 + 16) )
{
if ( !(*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) )
goto LABEL_17;
if ( !*(_DWORD *)(a1 + 48) )
goto LABEL_1;
}
if ( *(_QWORD *)(a1 + 192) >= *(_QWORD *)(a1 + 200) )
goto LABEL_1;
LABEL_17:
v4 = (unsigned __int8)*a2;
if ( v4 == 10 || v4 == 13 )
goto LABEL_1;
*a2 = stbi__get8(a1);
}
}
if ( *(_DWORD *)(a1 + 48) )
{
LABEL_11:
result = *(_QWORD *)(a1 + 192);
if ( result < *(_QWORD *)(a1 + 200) )
goto LABEL_12;
}
return result;
}
|
stbi__pnm_skip_whitespace:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
LAB_00138e05:
CMP qword ptr [R14 + 0x10],0x0
JZ 0x00138e1f
MOV RDI,qword ptr [R14 + 0x28]
CALL qword ptr [R14 + 0x20]
TEST EAX,EAX
JZ 0x00138e2f
CMP dword ptr [R14 + 0x30],0x0
JZ 0x00138e4b
LAB_00138e1f:
MOV RAX,qword ptr [R14 + 0xc0]
CMP RAX,qword ptr [R14 + 0xc8]
JNC 0x00138e4b
LAB_00138e2f:
MOVZX EAX,byte ptr [RBX]
LEA ECX,[RAX + -0x9]
CMP ECX,0x5
JNC 0x00138e46
LAB_00138e3a:
MOV RDI,R14
CALL 0x00135752
MOV byte ptr [RBX],AL
JMP 0x00138e05
LAB_00138e46:
CMP EAX,0x20
JZ 0x00138e3a
LAB_00138e4b:
CMP qword ptr [R14 + 0x10],0x0
JZ 0x00138e65
MOV RDI,qword ptr [R14 + 0x28]
CALL qword ptr [R14 + 0x20]
TEST EAX,EAX
JZ 0x00138e75
CMP dword ptr [R14 + 0x30],0x0
JZ 0x00138ecd
LAB_00138e65:
MOV RAX,qword ptr [R14 + 0xc0]
CMP RAX,qword ptr [R14 + 0xc8]
JNC 0x00138ecd
LAB_00138e75:
CMP byte ptr [RBX],0x23
JNZ 0x00138ecd
LAB_00138e7a:
CMP qword ptr [R14 + 0x10],0x0
JZ 0x00138e98
MOV RDI,qword ptr [R14 + 0x28]
CALL qword ptr [R14 + 0x20]
TEST EAX,EAX
JZ 0x00138eac
CMP dword ptr [R14 + 0x30],0x0
JZ 0x00138e05
LAB_00138e98:
MOV RAX,qword ptr [R14 + 0xc0]
CMP RAX,qword ptr [R14 + 0xc8]
JNC 0x00138e05
LAB_00138eac:
MOVZX EAX,byte ptr [RBX]
CMP EAX,0xa
JZ 0x00138e05
CMP EAX,0xd
JZ 0x00138e05
MOV RDI,R14
CALL 0x00135752
MOV byte ptr [RBX],AL
JMP 0x00138e7a
LAB_00138ecd:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void stbi__pnm_skip_whitespace(long param_1,byte *param_2)
{
byte bVar1;
int iVar2;
LAB_00138e05:
do {
if (*(long *)(param_1 + 0x10) != 0) {
iVar2 = (**(code **)(param_1 + 0x20))(*(int8 *)(param_1 + 0x28));
if (iVar2 == 0) goto LAB_00138e2f;
if (*(int *)(param_1 + 0x30) != 0) goto LAB_00138e1f;
LAB_00138e4b:
if (*(long *)(param_1 + 0x10) != 0) {
iVar2 = (**(code **)(param_1 + 0x20))(*(int8 *)(param_1 + 0x28));
if (iVar2 == 0) goto LAB_00138e75;
if (*(int *)(param_1 + 0x30) == 0) {
return;
}
}
if (*(ulong *)(param_1 + 200) <= *(ulong *)(param_1 + 0xc0)) {
return;
}
LAB_00138e75:
if (*param_2 != 0x23) {
return;
}
do {
if (*(long *)(param_1 + 0x10) == 0) {
LAB_00138e98:
if (*(ulong *)(param_1 + 200) <= *(ulong *)(param_1 + 0xc0)) goto LAB_00138e05;
}
else {
iVar2 = (**(code **)(param_1 + 0x20))(*(int8 *)(param_1 + 0x28));
if (iVar2 != 0) {
if (*(int *)(param_1 + 0x30) != 0) goto LAB_00138e98;
goto LAB_00138e05;
}
}
if ((*param_2 == 10) || (*param_2 == 0xd)) goto LAB_00138e05;
bVar1 = stbi__get8(param_1);
*param_2 = bVar1;
} while( true );
}
LAB_00138e1f:
if (*(ulong *)(param_1 + 200) <= *(ulong *)(param_1 + 0xc0)) goto LAB_00138e4b;
LAB_00138e2f:
if ((4 < *param_2 - 9) && (*param_2 != 0x20)) goto LAB_00138e4b;
bVar1 = stbi__get8(param_1);
*param_2 = bVar1;
} while( true );
}
|
|
10,511 |
escape_quotes_for_mysql
|
eloqsql/mysys/charset.c
|
size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
char *to, size_t to_length,
const char *from, size_t length,
my_bool *overflow)
{
const char *to_start= to;
const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length);
#ifdef USE_MB
my_bool use_mb_flag= my_ci_use_mb(charset_info);
#endif
*overflow= FALSE;
for (end= from + length; from < end; from++)
{
#ifdef USE_MB
int tmp_length;
if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end)))
{
if (to + tmp_length > to_end)
{
*overflow= TRUE;
break;
}
while (tmp_length--)
*to++= *from++;
from--;
continue;
}
/*
We don't have the same issue here with a non-multi-byte character being
turned into a multi-byte character by the addition of an escaping
character, because we are only escaping the ' character with itself.
*/
#endif
if (*from == '\'')
{
if (to + 2 > to_end)
{
*overflow= TRUE;
break;
}
*to++= '\'';
*to++= '\'';
}
else
{
if (to + 1 > to_end)
{
*overflow= TRUE;
break;
}
*to++= *from;
}
}
*to= 0;
return (size_t) (to - to_start);
}
|
O0
|
c
|
escape_quotes_for_mysql:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2a115
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x2a120
movq -0x28(%rbp), %rax
shlq %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2a290
movb %al, -0x49(%rbp)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x2a269
movsbl -0x49(%rbp), %eax
cmpl $0x0, %eax
je 0x2a1df
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x2a2c0
movl %eax, -0x50(%rbp)
cmpl $0x0, %eax
je 0x2a1df
movq -0x10(%rbp), %rax
movslq -0x50(%rbp), %rcx
addq %rcx, %rax
cmpq -0x48(%rbp), %rax
jbe 0x2a19b
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0x2a269
jmp 0x2a19d
movl -0x50(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x50(%rbp)
cmpl $0x0, %eax
je 0x2a1d1
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x2a19d
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2a258
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x2a228
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x48(%rbp), %rax
jbe 0x2a202
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0x2a269
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x27, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x27, (%rax)
jmp 0x2a256
movq -0x10(%rbp), %rax
addq $0x1, %rax
cmpq -0x48(%rbp), %rax
jbe 0x2a23f
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0x2a269
movq -0x20(%rbp), %rax
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x2a258
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2a14e
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
escape_quotes_for_mysql:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
cmp [rbp+var_18], 0
jz short loc_2A115
mov rax, [rbp+var_18]
sub rax, 1
mov [rbp+var_60], rax
jmp short loc_2A120
loc_2A115:
mov rax, [rbp+var_28]
shl rax, 1
mov [rbp+var_60], rax
loc_2A120:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_60]
add rax, rcx
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
call my_ci_use_mb
mov [rbp+var_49], al
mov rax, [rbp+var_30]
mov byte ptr [rax], 0
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_40], rax
loc_2A14E:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_40]
jnb loc_2A269
movsx eax, [rbp+var_49]
cmp eax, 0
jz short loc_2A1DF
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_40]
call my_ismbchar
mov [rbp+var_50], eax
cmp eax, 0
jz short loc_2A1DF
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_50]
add rax, rcx
cmp rax, [rbp+var_48]
jbe short loc_2A19B
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp loc_2A269
loc_2A19B:
jmp short $+2
loc_2A19D:
mov eax, [rbp+var_50]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_50], ecx
cmp eax, 0
jz short loc_2A1D1
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_2A19D
loc_2A1D1:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp short loc_2A258
loc_2A1DF:
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 27h ; '''
jnz short loc_2A228
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_48]
jbe short loc_2A202
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp short loc_2A269
loc_2A202:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 27h ; '''
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 27h ; '''
jmp short loc_2A256
loc_2A228:
mov rax, [rbp+var_10]
add rax, 1
cmp rax, [rbp+var_48]
jbe short loc_2A23F
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp short loc_2A269
loc_2A23F:
mov rax, [rbp+var_20]
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
loc_2A256:
jmp short $+2
loc_2A258:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_2A14E
loc_2A269:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
sub rax, rcx
add rsp, 60h
pop rbp
retn
|
_BYTE * escape_quotes_for_mysql(long long a1, char *a2, long long a3, char *a4, long long a5, _BYTE *a6)
{
char *v7; // rax
char v8; // cl
char *v9; // rax
_BYTE *v10; // rax
char *v11; // rax
long long v13; // [rsp+0h] [rbp-60h]
int v14; // [rsp+10h] [rbp-50h]
char v15; // [rsp+17h] [rbp-49h]
unsigned long long v16; // [rsp+18h] [rbp-48h]
char *v17; // [rsp+20h] [rbp-40h]
char *v21; // [rsp+50h] [rbp-10h]
v21 = a2;
if ( a3 )
v13 = a3 - 1;
else
v13 = 2 * a5;
v16 = (unsigned long long)&a2[v13];
v15 = my_ci_use_mb(a1);
*a6 = 0;
v17 = &a4[a5];
while ( a4 < v17 )
{
if ( v15 && (v14 = my_ismbchar(a1, a4, v17)) != 0 )
{
if ( (unsigned long long)&v21[v14] > v16 )
{
*a6 = 1;
break;
}
while ( v14-- )
{
v7 = a4++;
v8 = *v7;
v9 = v21++;
*v9 = v8;
}
--a4;
}
else if ( *a4 == 39 )
{
if ( (unsigned long long)(v21 + 2) > v16 )
{
*a6 = 1;
break;
}
*v21 = 39;
v10 = v21 + 1;
v21 += 2;
*v10 = 39;
}
else
{
if ( (unsigned long long)(v21 + 1) > v16 )
{
*a6 = 1;
break;
}
v11 = v21++;
*v11 = *a4;
}
++a4;
}
*v21 = 0;
return (_BYTE *)(v21 - a2);
}
|
escape_quotes_for_mysql:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0012a115
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0012a120
LAB_0012a115:
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
LAB_0012a120:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x60]
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a290
MOV byte ptr [RBP + -0x49],AL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
LAB_0012a14e:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0012a269
MOVSX EAX,byte ptr [RBP + -0x49]
CMP EAX,0x0
JZ 0x0012a1df
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x0012a2c0
MOV dword ptr [RBP + -0x50],EAX
CMP EAX,0x0
JZ 0x0012a1df
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x50]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x0012a19b
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x0012a269
LAB_0012a19b:
JMP 0x0012a19d
LAB_0012a19d:
MOV EAX,dword ptr [RBP + -0x50]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x50],ECX
CMP EAX,0x0
JZ 0x0012a1d1
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x0012a19d
LAB_0012a1d1:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012a258
LAB_0012a1df:
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x27
JNZ 0x0012a228
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x0012a202
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x0012a269
LAB_0012a202:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x27
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x27
JMP 0x0012a256
LAB_0012a228:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x0012a23f
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x0012a269
LAB_0012a23f:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
LAB_0012a256:
JMP 0x0012a258
LAB_0012a258:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012a14e
LAB_0012a269:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long escape_quotes_for_mysql
(int8 param_1,char *param_2,long param_3,char *param_4,long param_5,
int1 *param_6)
{
char cVar1;
char *pcVar2;
long local_68;
int local_58;
char *local_28;
char *local_18;
if (param_3 == 0) {
local_68 = param_5 << 1;
}
else {
local_68 = param_3 + -1;
}
pcVar2 = param_2 + local_68;
cVar1 = my_ci_use_mb(param_1);
*param_6 = 0;
local_28 = param_4;
local_18 = param_2;
do {
if (param_4 + param_5 <= local_28) {
LAB_0012a269:
*local_18 = '\0';
return (long)local_18 - (long)param_2;
}
if ((cVar1 == '\0') ||
(local_58 = my_ismbchar(param_1,local_28,param_4 + param_5), local_58 == 0)) {
if (*local_28 == '\'') {
if (pcVar2 < local_18 + 2) {
*param_6 = 1;
goto LAB_0012a269;
}
*local_18 = '\'';
local_18[1] = '\'';
local_18 = local_18 + 2;
}
else {
if (pcVar2 < local_18 + 1) {
*param_6 = 1;
goto LAB_0012a269;
}
*local_18 = *local_28;
local_18 = local_18 + 1;
}
}
else {
if (pcVar2 < local_18 + local_58) {
*param_6 = 1;
goto LAB_0012a269;
}
while (local_58 != 0) {
*local_18 = *local_28;
local_58 = local_58 + -1;
local_28 = local_28 + 1;
local_18 = local_18 + 1;
}
local_28 = local_28 + -1;
}
local_28 = local_28 + 1;
} while( true );
}
|
|
10,512 |
js_iterator_constructor
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_iterator_constructor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
JSObject *p;
if (JS_TAG_OBJECT != JS_VALUE_GET_TAG(new_target))
return JS_ThrowTypeError(ctx, "constructor requires 'new'");
p = JS_VALUE_GET_OBJ(new_target);
if (p->class_id == JS_CLASS_C_FUNCTION)
if (p->u.cfunc.c_function.generic == js_iterator_constructor)
return JS_ThrowTypeError(ctx, "abstract class not constructable");
return js_create_from_ctor(ctx, new_target, JS_CLASS_ITERATOR);
}
|
O0
|
c
|
js_iterator_constructor:
subq $0x48, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movq 0x30(%rsp), %rax
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl %ecx, %eax
je 0x56d3b
movq 0x20(%rsp), %rdi
leaq 0xb9f93(%rip), %rsi # 0x110cbb
movb $0x0, %al
callq 0x2d300
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
jmp 0x56da9
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0xc, %eax
jne 0x56d86
movq 0x8(%rsp), %rax
leaq -0x6f(%rip), %rcx # 0x56cf0
cmpq %rcx, 0x38(%rax)
jne 0x56d84
movq 0x20(%rsp), %rdi
leaq 0xb9f65(%rip), %rsi # 0x110cd6
movb $0x0, %al
callq 0x2d300
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
jmp 0x56da9
jmp 0x56d86
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movl $0x27, %ecx
callq 0x54e00
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x48, %rsp
retq
nopl (%rax,%rax)
|
js_iterator_constructor:
sub rsp, 48h
mov [rsp+48h+var_20], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_28], rdi
mov [rsp+48h+var_2C], ecx
mov [rsp+48h+var_38], r8
mov rax, [rsp+48h+var_18]
mov ecx, eax
mov eax, 0FFFFFFFFh
cmp eax, ecx
jz short loc_56D3B
mov rdi, [rsp+48h+var_28]
lea rsi, aConstructorReq; "constructor requires 'new'"
mov al, 0
call JS_ThrowTypeError
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
jmp short loc_56DA9
loc_56D3B:
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_40], rax
mov rax, [rsp+48h+var_40]
movzx eax, word ptr [rax+6]
cmp eax, 0Ch
jnz short loc_56D86
mov rax, [rsp+48h+var_40]
lea rcx, js_iterator_constructor
cmp [rax+38h], rcx
jnz short loc_56D84
mov rdi, [rsp+48h+var_28]
lea rsi, aAbstractClassN; "abstract class not constructable"
mov al, 0
call JS_ThrowTypeError
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
jmp short loc_56DA9
loc_56D84:
jmp short $+2
loc_56D86:
mov rdi, [rsp+48h+var_28]
mov rsi, [rsp+48h+var_20]
mov rdx, [rsp+48h+var_18]
mov ecx, 27h ; '''
call js_create_from_ctor
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
loc_56DA9:
mov rax, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_8]
add rsp, 48h
retn
|
long long js_iterator_constructor(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
long long a14)
{
char v15; // [rsp+0h] [rbp-48h]
if ( (_DWORD)a3 != -1 )
return JS_ThrowTypeError(
a1,
(long long)"constructor requires 'new'",
a3,
(unsigned int)a3,
a13,
a14,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
v15);
if ( *(_WORD *)(a2 + 6) == 12 && *(long long ( **)())(a2 + 56) == js_iterator_constructor )
return JS_ThrowTypeError(
a1,
(long long)"abstract class not constructable",
a3,
(long long)js_iterator_constructor,
a13,
a14,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
v15);
return js_create_from_ctor(a1, a2, a3, 39);
}
|
js_iterator_constructor:
SUB RSP,0x48
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV qword ptr [RSP + 0x10],R8
MOV RAX,qword ptr [RSP + 0x30]
MOV ECX,EAX
MOV EAX,0xffffffff
CMP EAX,ECX
JZ 0x00156d3b
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x210cbb]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
JMP 0x00156da9
LAB_00156d3b:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0xc
JNZ 0x00156d86
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[0x156cf0]
CMP qword ptr [RAX + 0x38],RCX
JNZ 0x00156d84
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x210cd6]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
JMP 0x00156da9
LAB_00156d84:
JMP 0x00156d86
LAB_00156d86:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
MOV ECX,0x27
CALL 0x00154e00
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
LAB_00156da9:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int1 [16] js_iterator_constructor(int8 param_1,long param_2,int8 param_3)
{
int1 auVar1 [16];
if ((int)param_3 == -1) {
if ((*(short *)(param_2 + 6) == 0xc) && (*(code **)(param_2 + 0x38) == js_iterator_constructor))
{
auVar1 = JS_ThrowTypeError(param_1,"abstract class not constructable");
}
else {
auVar1 = js_create_from_ctor(param_1,param_2,param_3,0x27);
}
}
else {
auVar1 = JS_ThrowTypeError(param_1,"constructor requires \'new\'");
}
return auVar1;
}
|
|
10,513 |
js_iterator_constructor
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_iterator_constructor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
JSObject *p;
if (JS_TAG_OBJECT != JS_VALUE_GET_TAG(new_target))
return JS_ThrowTypeError(ctx, "constructor requires 'new'");
p = JS_VALUE_GET_OBJ(new_target);
if (p->class_id == JS_CLASS_C_FUNCTION)
if (p->u.cfunc.c_function.generic == js_iterator_constructor)
return JS_ThrowTypeError(ctx, "abstract class not constructable");
return js_create_from_ctor(ctx, new_target, JS_CLASS_ITERATOR);
}
|
O1
|
c
|
js_iterator_constructor:
pushq %rbx
subq $0x10, %rsp
movq %rsi, 0x8(%rsp)
cmpl $-0x1, %edx
jne 0x38691
movq 0x8(%rsp), %rax
cmpw $0xc, 0x6(%rax)
jne 0x3867d
leaq -0x22(%rip), %rcx # 0x38655
cmpq %rcx, 0x38(%rax)
je 0x386af
movq 0x8(%rsp), %rsi
movl $0x27, %ecx
callq 0x36d56
movq %rax, %rbx
jmp 0x386a6
leaq 0x695a8(%rip), %rsi # 0xa1c40
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22567
movl $0x6, %edx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x695a5(%rip), %rsi # 0xa1c5b
jmp 0x38698
|
js_iterator_constructor:
push rbx
sub rsp, 10h
mov [rsp+18h+var_10], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_38691
mov rax, [rsp+18h+var_10]
cmp word ptr [rax+6], 0Ch
jnz short loc_3867D
lea rcx, js_iterator_constructor
cmp [rax+38h], rcx
jz short loc_386AF
loc_3867D:
mov rsi, [rsp+18h+var_10]
mov ecx, 27h ; '''
call js_create_from_ctor
mov rbx, rax
jmp short loc_386A6
loc_38691:
lea rsi, aConstructorReq; "constructor requires 'new'"
loc_38698:
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
mov edx, 6
loc_386A6:
mov rax, rbx
add rsp, 10h
pop rbx
retn
loc_386AF:
lea rsi, aAbstractClassN; "abstract class not constructable"
jmp short loc_38698
|
unsigned long long js_iterator_constructor(
long long a1,
long long a2,
long long a3,
long long ( *a4)(),
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rbx
const char *v15; // rsi
char v17; // [rsp+0h] [rbp-18h]
if ( (_DWORD)a3 != -1 )
{
v15 = "constructor requires 'new'";
LABEL_6:
v14 = 0LL;
JS_ThrowTypeError(a1, (long long)v15, a3, (long long)a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v17);
return v14;
}
if ( *(_WORD *)(a2 + 6) == 12 )
{
a4 = js_iterator_constructor;
if ( *(long long ( **)())(a2 + 56) == js_iterator_constructor )
{
v15 = "abstract class not constructable";
goto LABEL_6;
}
}
return js_create_from_ctor(a1, a2, a3, 39);
}
|
js_iterator_constructor:
PUSH RBX
SUB RSP,0x10
MOV qword ptr [RSP + 0x8],RSI
CMP EDX,-0x1
JNZ 0x00138691
MOV RAX,qword ptr [RSP + 0x8]
CMP word ptr [RAX + 0x6],0xc
JNZ 0x0013867d
LEA RCX,[0x138655]
CMP qword ptr [RAX + 0x38],RCX
JZ 0x001386af
LAB_0013867d:
MOV RSI,qword ptr [RSP + 0x8]
MOV ECX,0x27
CALL 0x00136d56
MOV RBX,RAX
JMP 0x001386a6
LAB_00138691:
LEA RSI,[0x1a1c40]
LAB_00138698:
XOR EBX,EBX
XOR EAX,EAX
CALL 0x00122567
MOV EDX,0x6
LAB_001386a6:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
RET
LAB_001386af:
LEA RSI,[0x1a1c5b]
JMP 0x00138698
|
int8 js_iterator_constructor(int8 param_1,long param_2,int8 param_3)
{
int8 uVar1;
char *pcVar2;
if ((int)param_3 == -1) {
if ((*(short *)(param_2 + 6) != 0xc) || (*(code **)(param_2 + 0x38) != js_iterator_constructor))
{
uVar1 = js_create_from_ctor(param_1,param_2,param_3,0x27);
return uVar1;
}
pcVar2 = "abstract class not constructable";
}
else {
pcVar2 = "constructor requires \'new\'";
}
JS_ThrowTypeError(param_1,pcVar2);
return 0;
}
|
|
10,514 |
js_iterator_constructor
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_iterator_constructor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
JSObject *p;
if (JS_TAG_OBJECT != JS_VALUE_GET_TAG(new_target))
return JS_ThrowTypeError(ctx, "constructor requires 'new'");
p = JS_VALUE_GET_OBJ(new_target);
if (p->class_id == JS_CLASS_C_FUNCTION)
if (p->u.cfunc.c_function.generic == js_iterator_constructor)
return JS_ThrowTypeError(ctx, "abstract class not constructable");
return js_create_from_ctor(ctx, new_target, JS_CLASS_ITERATOR);
}
|
O2
|
c
|
js_iterator_constructor:
pushq %rbx
cmpl $-0x1, %edx
jne 0x31942
cmpw $0xc, 0x6(%rsi)
jne 0x31935
leaq -0x14(%rip), %rax # 0x3191b
cmpq %rax, 0x38(%rsi)
je 0x3195a
pushq $0x27
popq %rcx
callq 0x3045a
movq %rax, %rbx
jmp 0x31955
leaq 0x57231(%rip), %rsi # 0x88b7a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1c64d
pushq $0x6
popq %rdx
movq %rbx, %rax
popq %rbx
retq
leaq 0x57234(%rip), %rsi # 0x88b95
jmp 0x31949
|
js_iterator_constructor:
push rbx
cmp edx, 0FFFFFFFFh
jnz short loc_31942
cmp word ptr [rsi+6], 0Ch
jnz short loc_31935
lea rax, js_iterator_constructor
cmp [rsi+38h], rax
jz short loc_3195A
loc_31935:
push 27h ; '''
pop rcx
call js_create_from_ctor
mov rbx, rax
jmp short loc_31955
loc_31942:
lea rsi, aConstructorReq; "constructor requires 'new'"
loc_31949:
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
push 6
pop rdx
loc_31955:
mov rax, rbx
pop rbx
retn
loc_3195A:
lea rsi, aAbstractClassN; "abstract class not constructable"
jmp short loc_31949
|
unsigned long long js_iterator_constructor(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rbx
const char *v15; // rsi
char v17; // [rsp+0h] [rbp-8h]
if ( (_DWORD)a3 != -1 )
{
v15 = "constructor requires 'new'";
LABEL_6:
v14 = 0LL;
JS_ThrowTypeError(a1, (long long)v15, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v17);
return v14;
}
if ( *(_WORD *)(a2 + 6) == 12 && *(long long ( **)())(a2 + 56) == js_iterator_constructor )
{
v15 = "abstract class not constructable";
goto LABEL_6;
}
return js_create_from_ctor(a1, a2, a3, 39);
}
|
js_iterator_constructor:
PUSH RBX
CMP EDX,-0x1
JNZ 0x00131942
CMP word ptr [RSI + 0x6],0xc
JNZ 0x00131935
LEA RAX,[0x13191b]
CMP qword ptr [RSI + 0x38],RAX
JZ 0x0013195a
LAB_00131935:
PUSH 0x27
POP RCX
CALL 0x0013045a
MOV RBX,RAX
JMP 0x00131955
LAB_00131942:
LEA RSI,[0x188b7a]
LAB_00131949:
XOR EBX,EBX
XOR EAX,EAX
CALL 0x0011c64d
PUSH 0x6
POP RDX
LAB_00131955:
MOV RAX,RBX
POP RBX
RET
LAB_0013195a:
LEA RSI,[0x188b95]
JMP 0x00131949
|
int8 js_iterator_constructor(int8 param_1,long param_2,int param_3)
{
int8 uVar1;
char *pcVar2;
if (param_3 == -1) {
if ((*(short *)(param_2 + 6) != 0xc) || (*(code **)(param_2 + 0x38) != js_iterator_constructor))
{
uVar1 = js_create_from_ctor();
return uVar1;
}
pcVar2 = "abstract class not constructable";
}
else {
pcVar2 = "constructor requires \'new\'";
}
JS_ThrowTypeError(param_1,pcVar2);
return 0;
}
|
|
10,515 |
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, unsigned long)
|
monkey531[P]llama/common/json.hpp
|
explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0)
noexcept(std::is_nothrow_move_constructible<IteratorType>::value
&& std::is_nothrow_default_constructible<string_type>::value)
: anchor(std::move(it))
, array_index(array_index_)
{}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, unsigned long):
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups %xmm1, 0x10(%rdi)
movups %xmm0, (%rdi)
movq %rdx, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
addq $0x30, %rdi
leaq 0x31c37(%rip), %rsi # 0xb7593
leaq 0xf(%rsp), %rdx
callq 0x27852
leaq 0x60(%rbx), %rax
movq %rax, 0x50(%rbx)
andq $0x0, 0x58(%rbx)
movb $0x0, 0x60(%rbx)
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rdi
callq 0x27af1
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m:
push rbx
sub rsp, 10h
mov rbx, rdi
movups xmm0, xmmword ptr [rsi]
movups xmm1, xmmword ptr [rsi+10h]
movups xmmword ptr [rdi+10h], xmm1
movups xmmword ptr [rdi], xmm0
mov [rdi+20h], rdx
and qword ptr [rdi+28h], 0
add rdi, 30h ; '0'
lea rsi, aMinExp0+0Ah; "0"
lea rdx, [rsp+18h+var_9]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rax, [rbx+60h]
mov [rbx+50h], rax
and qword ptr [rbx+58h], 0
mov byte ptr [rbx+60h], 0
add rsp, 10h
pop rbx
retn
mov rdi, rax
call __clang_call_terminate
|
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::iteration_proxy_value(
long long a1,
__int128 *a2,
long long a3)
{
__int128 v3; // xmm0
long long result; // rax
v3 = *a2;
*(_OWORD *)(a1 + 16) = a2[1];
*(_OWORD *)a1 = v3;
*(_QWORD *)(a1 + 32) = a3;
*(_QWORD *)(a1 + 40) = 0LL;
std::string::basic_string<std::allocator<char>>((_QWORD *)(a1 + 48), (long long)"0");
result = a1 + 96;
*(_QWORD *)(a1 + 80) = a1 + 96;
*(_QWORD *)(a1 + 88) = 0LL;
*(_BYTE *)(a1 + 96) = 0;
return result;
}
|
iteration_proxy_value:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOVUPS XMM0,xmmword ptr [RSI]
MOVUPS XMM1,xmmword ptr [RSI + 0x10]
MOVUPS xmmword ptr [RDI + 0x10],XMM1
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x20],RDX
AND qword ptr [RDI + 0x28],0x0
ADD RDI,0x30
LAB_00185955:
LEA RSI,[0x1b7593]
LEA RDX,[RSP + 0xf]
CALL 0x00127852
LEA RAX,[RBX + 0x60]
MOV qword ptr [RBX + 0x50],RAX
AND qword ptr [RBX + 0x58],0x0
MOV byte ptr [RBX + 0x60],0x0
ADD RSP,0x10
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>
>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>, unsigned long) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::iteration_proxy_value
(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*this,int8 *param_2,int8 param_3)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
allocator local_9;
uVar1 = *param_2;
uVar2 = param_2[1];
uVar3 = param_2[3];
*(int8 *)(this + 0x10) = param_2[2];
*(int8 *)(this + 0x18) = uVar3;
*(int8 *)this = uVar1;
*(int8 *)(this + 8) = uVar2;
*(int8 *)(this + 0x20) = param_3;
*(int8 *)(this + 0x28) = 0;
/* try { // try from 00185955 to 00185965 has its CatchHandler @ 0018597d */
std::__cxx11::string::string<std::allocator<char>>((string *)(this + 0x30),"0",&local_9);
*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x50) = this + 0x60;
*(int8 *)(this + 0x58) = 0;
this[0x60] = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
)0x0;
return;
}
|
|
10,516 |
inline_mysql_file_open
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline File
inline_mysql_file_open(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *filename, int flags, myf myFlags)
{
File file;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename,
&locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
file= my_open(filename, flags, myFlags);
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
return file;
}
#endif
file= my_open(filename, flags, myFlags);
return file;
}
|
O0
|
c
|
inline_mysql_file_open:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x1b29f8(%rip), %rax # 0x215330
movq (%rax), %rax
movq 0x148(%rax), %rax
movl -0x8(%rbp), %esi
movq -0x20(%rbp), %rcx
leaq -0x88(%rbp), %rdi
movl $0x2, %edx
leaq -0x40(%rbp), %r8
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 0x629d2
leaq 0x1b29aa(%rip), %rax # 0x215330
movq (%rax), %rax
movq 0x1f0(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq *%rax
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x30(%rbp), %rdx
callq 0x666f0
movl %eax, -0x34(%rbp)
leaq 0x1b2979(%rip), %rax # 0x215330
movq (%rax), %rax
movq 0x200(%rax), %rax
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %esi
callq *%rax
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x629eb
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x30(%rbp), %rdx
callq 0x666f0
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
inline_mysql_file_open:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+148h]
mov esi, [rbp+var_8]
mov rcx, [rbp+var_20]
lea rdi, [rbp+var_88]
mov edx, 2
lea r8, [rbp+var_40]
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 short loc_629D2
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1F0h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call rax
mov rdi, [rbp+var_20]
mov esi, [rbp+var_24]
mov rdx, [rbp+var_30]
call my_open
mov [rbp+var_34], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+200h]
mov rdi, [rbp+var_40]
mov esi, [rbp+var_34]
call rax
mov eax, [rbp+var_34]
mov [rbp+var_4], eax
jmp short loc_629EB
loc_629D2:
mov rdi, [rbp+var_20]
mov esi, [rbp+var_24]
mov rdx, [rbp+var_30]
call my_open
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
mov [rbp+var_4], eax
loc_629EB:
mov eax, [rbp+var_4]
add rsp, 90h
pop rbp
retn
|
long long inline_mysql_file_open(
unsigned int a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5,
long long a6)
{
_BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF
long long v8; // [rsp+50h] [rbp-40h] BYREF
unsigned int v9; // [rsp+5Ch] [rbp-34h]
long long v10; // [rsp+60h] [rbp-30h]
unsigned int v11; // [rsp+6Ch] [rbp-24h]
long long v12; // [rsp+70h] [rbp-20h]
unsigned int v13; // [rsp+7Ch] [rbp-14h]
long long v14; // [rsp+80h] [rbp-10h]
unsigned int v15; // [rsp+88h] [rbp-8h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = a6;
v8 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v7, a1, 2LL, a4, &v8);
if ( v8 )
{
((void ( *)(long long, long long, _QWORD))PSI_server[62])(v8, v14, v13);
v9 = my_open(v12, v11, v10);
((void ( *)(long long, _QWORD))PSI_server[64])(v8, v9);
}
else
{
return (unsigned int)my_open(v12, v11, v10);
}
return v9;
}
|
inline_mysql_file_open:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x315330]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV ESI,dword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x88]
MOV EDX,0x2
LEA R8,[RBP + -0x40]
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 0x001629d2
LEA RAX,[0x315330]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1f0]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001666f0
MOV dword ptr [RBP + -0x34],EAX
LEA RAX,[0x315330]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x200]
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x34]
CALL RAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001629eb
LAB_001629d2:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001666f0
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x4],EAX
LAB_001629eb:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x90
POP RBP
RET
|
int4
inline_mysql_file_open
(int4 param_1,int8 param_2,int4 param_3,int8 param_4,
int4 param_5,int8 param_6)
{
int1 local_90 [72];
long local_48;
int4 local_3c;
int8 local_38;
int4 local_2c;
int8 local_28;
int4 local_1c;
int8 local_18;
int4 local_10;
int4 local_c;
local_38 = param_6;
local_2c = param_5;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
local_48 = (**(code **)(PSI_server + 0x148))(local_90,param_1,2,param_4,&local_48);
if (local_48 == 0) {
local_c = my_open(local_28,local_2c,local_38);
}
else {
(**(code **)(PSI_server + 0x1f0))(local_48,local_18,local_1c);
local_3c = my_open(local_28,local_2c,local_38);
(**(code **)(PSI_server + 0x200))(local_48,local_3c);
local_c = local_3c;
}
return local_c;
}
|
|
10,517 |
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>>>>>::next_byte_in_range(std::initializer_list<int>)
|
monkey531[P]llama/common/./json.hpp
|
bool next_byte_in_range(std::initializer_list<char_int_type> ranges)
{
JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6);
add(current);
for (auto range = ranges.begin(); range != ranges.end(); ++range)
{
get();
if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions)
{
add(current);
}
else
{
error_message = "invalid string: ill-formed UTF-8 byte";
return false;
}
}
return true;
}
|
O0
|
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>>>>>::next_byte_in_range(std::initializer_list<int>):
subq $0x48, %rsp
movq %rsi, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x91e00
cmpq $0x2, %rax
je 0x91c9e
leaq 0x30(%rsp), %rdi
callq 0x91e00
cmpq $0x4, %rax
je 0x91c9e
leaq 0x30(%rsp), %rdi
callq 0x91e00
cmpq $0x6, %rax
je 0x91c9e
leaq 0x136b3a(%rip), %rdi # 0x1c87be
movl $0x1da8, %esi # imm = 0x1DA8
leaq 0x136b7a(%rip), %rdx # 0x1c880a
leaq 0x1378ad(%rip), %rcx # 0x1c9544
movb $0x0, %al
callq 0x52c10
movq 0x18(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0x91a40
leaq 0x30(%rsp), %rdi
callq 0x91e10
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x91e20
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
je 0x91d6c
movq 0x18(%rsp), %rdi
callq 0x91640
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rax
movl (%rax), %ecx
xorl %eax, %eax
cmpl 0x14(%rdx), %ecx
movb %al, 0xf(%rsp)
jg 0x91d23
movq 0x18(%rsp), %rax
movl 0x14(%rax), %eax
movq 0x20(%rsp), %rcx
movq %rcx, %rdx
addq $0x4, %rdx
movq %rdx, 0x20(%rsp)
cmpl 0x4(%rcx), %eax
setle %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x91d31
jmp 0x91d40
movq 0x18(%rsp), %rdi
movl 0x14(%rdi), %esi
callq 0x91a40
jmp 0x91d57
movq 0x18(%rsp), %rax
leaq 0x137798(%rip), %rcx # 0x1c94e4
movq %rcx, 0x70(%rax)
movb $0x0, 0x47(%rsp)
jmp 0x91d71
jmp 0x91d59
movq 0x20(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x20(%rsp)
jmp 0x91cba
movb $0x1, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopl (%rax)
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE:
sub rsp, 48h
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_10], rdx
mov [rsp+48h+var_20], rdi
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_30], rax
lea rdi, [rsp+48h+var_18]
call _ZNKSt16initializer_listIiE4sizeEv; std::initializer_list<int>::size(void)
cmp rax, 2
jz short loc_91C9E
lea rdi, [rsp+48h+var_18]
call _ZNKSt16initializer_listIiE4sizeEv; std::initializer_list<int>::size(void)
cmp rax, 4
jz short loc_91C9E
lea rdi, [rsp+48h+var_18]
call _ZNKSt16initializer_listIiE4sizeEv; std::initializer_list<int>::size(void)
cmp rax, 6
jz short loc_91C9E
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1DA8h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRangesSize2Ran; "ranges.size() == 2 || ranges.size() == "...
mov al, 0
call _ggml_abort
loc_91C9E:
mov rdi, [rsp+48h+var_30]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3addEi; 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>>>::add(int)
lea rdi, [rsp+48h+var_18]
call _ZNKSt16initializer_listIiE5beginEv; std::initializer_list<int>::begin(void)
mov [rsp+48h+var_28], rax
loc_91CBA:
mov rax, [rsp+48h+var_28]
mov [rsp+48h+var_38], rax
lea rdi, [rsp+48h+var_18]
call _ZNKSt16initializer_listIiE3endEv; std::initializer_list<int>::end(void)
mov rcx, rax
mov rax, [rsp+48h+var_38]
cmp rax, rcx
jz loc_91D6C
mov rdi, [rsp+48h+var_30]
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 rdx, [rsp+48h+var_30]
mov rax, [rsp+48h+var_28]
mov ecx, [rax]
xor eax, eax
cmp ecx, [rdx+14h]
mov [rsp+48h+var_39], al
jg short loc_91D23
mov rax, [rsp+48h+var_30]
mov eax, [rax+14h]
mov rcx, [rsp+48h+var_28]
mov rdx, rcx
add rdx, 4
mov [rsp+48h+var_28], rdx
cmp eax, [rcx+4]
setle al
mov [rsp+48h+var_39], al
loc_91D23:
mov al, [rsp+48h+var_39]
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_91D31
jmp short loc_91D40
loc_91D31:
mov rdi, [rsp+48h+var_30]
mov esi, [rdi+14h]
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3addEi; 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>>>::add(int)
jmp short loc_91D57
loc_91D40:
mov rax, [rsp+48h+var_30]
lea rcx, aInvalidStringI; "invalid string: ill-formed UTF-8 byte"
mov [rax+70h], rcx
mov [rsp+48h+var_1], 0
jmp short loc_91D71
loc_91D57:
jmp short $+2
loc_91D59:
mov rax, [rsp+48h+var_28]
add rax, 4
mov [rsp+48h+var_28], rax
jmp loc_91CBA
loc_91D6C:
mov [rsp+48h+var_1], 1
loc_91D71:
mov al, [rsp+48h+var_1]
and al, 1
add rsp, 48h
retn
|
char 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>>>::next_byte_in_range(
long long a1,
long long a2,
long long a3)
{
_DWORD *v3; // rcx
bool v5; // [rsp+Fh] [rbp-39h]
_DWORD *i; // [rsp+20h] [rbp-28h]
_QWORD v7[2]; // [rsp+30h] [rbp-18h] BYREF
v7[0] = a2;
v7[1] = a3;
if ( std::initializer_list<int>::size(v7) != 2
&& std::initializer_list<int>::size(v7) != 4
&& std::initializer_list<int>::size(v7) != 6 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
7592LL,
"GGML_ASSERT(%s) failed",
"ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6");
}
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>>>::add(
a1,
*(_DWORD *)(a1 + 20));
for ( i = (_DWORD *)std::initializer_list<int>::begin(v7); i != (_DWORD *)std::initializer_list<int>::end(v7); ++i )
{
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);
v5 = 0;
if ( *i <= *(_DWORD *)(a1 + 20) )
{
v3 = i++;
v5 = *(_DWORD *)(a1 + 20) <= v3[1];
}
if ( !v5 )
{
*(_QWORD *)(a1 + 112) = "invalid string: ill-formed UTF-8 byte";
return 0;
}
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::add(
a1,
*(_DWORD *)(a1 + 20));
}
return 1;
}
|
next_byte_in_range:
SUB RSP,0x48
MOV qword ptr [RSP + 0x30],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x28],RDI
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x30]
CALL 0x00191e00
CMP RAX,0x2
JZ 0x00191c9e
LEA RDI,[RSP + 0x30]
CALL 0x00191e00
CMP RAX,0x4
JZ 0x00191c9e
LEA RDI,[RSP + 0x30]
CALL 0x00191e00
CMP RAX,0x6
JZ 0x00191c9e
LEA RDI,[0x2c87be]
MOV ESI,0x1da8
LEA RDX,[0x2c880a]
LEA RCX,[0x2c9544]
MOV AL,0x0
CALL 0x00152c10
LAB_00191c9e:
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x00191a40
LEA RDI,[RSP + 0x30]
CALL 0x00191e10
MOV qword ptr [RSP + 0x20],RAX
LAB_00191cba:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x30]
CALL 0x00191e20
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,RCX
JZ 0x00191d6c
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00191640
MOV RDX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RAX]
XOR EAX,EAX
CMP ECX,dword ptr [RDX + 0x14]
MOV byte ptr [RSP + 0xf],AL
JG 0x00191d23
MOV RAX,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RAX + 0x14]
MOV RCX,qword ptr [RSP + 0x20]
MOV RDX,RCX
ADD RDX,0x4
MOV qword ptr [RSP + 0x20],RDX
CMP EAX,dword ptr [RCX + 0x4]
SETLE AL
MOV byte ptr [RSP + 0xf],AL
LAB_00191d23:
MOV AL,byte ptr [RSP + 0xf]
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x00191d31
JMP 0x00191d40
LAB_00191d31:
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RDI + 0x14]
CALL 0x00191a40
JMP 0x00191d57
LAB_00191d40:
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[0x2c94e4]
MOV qword ptr [RAX + 0x70],RCX
MOV byte ptr [RSP + 0x47],0x0
JMP 0x00191d71
LAB_00191d57:
JMP 0x00191d59
LAB_00191d59:
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x4
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00191cba
LAB_00191d6c:
MOV byte ptr [RSP + 0x47],0x1
LAB_00191d71:
MOV AL,byte ptr [RSP + 0x47]
AND AL,0x1
ADD RSP,0x48
RET
|
/* 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 > > >::next_byte_in_range(std::initializer_list<int>) */
int1
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>>>
::next_byte_in_range
(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>>>
*param_1,int8 param_2,int8 param_3)
{
bool bVar1;
long lVar2;
int *piVar3;
int *local_28;
int8 local_18;
int8 local_10;
local_18 = param_2;
local_10 = param_3;
lVar2 = std::initializer_list<int>::size((initializer_list<int> *)&local_18);
if (((lVar2 != 2) &&
(lVar2 = std::initializer_list<int>::size((initializer_list<int> *)&local_18), lVar2 != 4)) &&
(lVar2 = std::initializer_list<int>::size((initializer_list<int> *)&local_18), lVar2 != 6)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",0x1da8,
"GGML_ASSERT(%s) failed",
"ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6");
}
add((int)param_1);
local_28 = (int *)std::initializer_list<int>::begin((initializer_list<int> *)&local_18);
while( true ) {
piVar3 = (int *)std::initializer_list<int>::end((initializer_list<int> *)&local_18);
if (local_28 == piVar3) {
return 1;
}
get(param_1);
bVar1 = false;
if (*local_28 <= *(int *)(param_1 + 0x14)) {
bVar1 = *(int *)(param_1 + 0x14) <= local_28[1];
local_28 = local_28 + 1;
}
if (!bVar1) break;
add((int)param_1);
local_28 = local_28 + 1;
}
*(char **)(param_1 + 0x70) = "invalid string: ill-formed UTF-8 byte";
return 0;
}
|
|
10,518 |
ggml_compute_forward_diag
|
llama.cpp/ggml/src/ggml-cpu/ops.cpp
|
void ggml_compute_forward_diag(
const ggml_compute_params * params,
ggml_tensor * dst) {
const ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_diag_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
}
|
O3
|
cpp
|
ggml_compute_forward_diag:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, 0x10(%rsp)
movq 0x98(%rsi), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, (%rax)
jne 0x3c22b
cmpl $0x0, (%rdi)
jne 0x3c219
movq 0x8(%rsp), %rcx
movq 0x10(%rcx), %rdx
movq 0x10(%rsp), %rax
cmpq 0x10(%rax), %rdx
jne 0x3c245
cmpq 0x18(%rax), %rdx
jne 0x3c264
cmpq $0x1, 0x18(%rcx)
jne 0x3c283
movq 0x20(%rcx), %rsi
movq %rsi, 0x38(%rsp)
cmpq 0x20(%rax), %rsi
jne 0x3c29f
movq 0x28(%rcx), %rsi
movq %rsi, 0x20(%rsp)
cmpq 0x28(%rax), %rsi
jne 0x3c2bb
cmpq $0x4, 0x30(%rcx)
jne 0x3c2d7
cmpq $0x4, 0x30(%rax)
jne 0x3c2f3
cmpq $0x0, 0x20(%rsp)
jle 0x3c219
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rcx
movq %rcx, 0x80(%rsp)
movq 0x48(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rcx
movq 0x40(%rax), %rsi
movq %rsi, 0x78(%rsp)
movq 0x48(%rax), %rax
movq %rax, 0x58(%rsp)
movq %rcx, 0xa0(%rsp)
leaq 0x4(%rcx), %rax
movq %rax, 0x98(%rsp)
leaq -0x4(,%rdx,4), %rax
movq %rax, 0x70(%rsp)
movq %rdx, %rax
negq %rax
movq %rax, 0x90(%rsp)
movl $0x4, %eax
movq %rax, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, (%rsp)
xorl %esi, %esi
movq %rdx, 0x50(%rsp)
movq %rsi, 0x68(%rsp)
cmpq $0x0, 0x38(%rsp)
jle 0x3c1ea
movq 0x28(%rsp), %rax
movq %rax, 0x48(%rsp)
movq (%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x40(%rsp)
xorl %esi, %esi
movq %rsi, 0x88(%rsp)
testq %rdx, %rdx
jle 0x3c1b3
movq 0x10(%rsp), %rax
movq 0xf8(%rax), %r14
movq 0x40(%rsp), %rax
leaq (%r14,%rax), %r15
movq 0x8(%rsp), %rax
movq 0xf8(%rax), %rbp
addq 0x18(%rsp), %rbp
addq 0x48(%rsp), %r14
movl $0x1, %ebx
xorl %r12d, %r12d
movq 0x70(%rsp), %r13
cmpq $0x1, %rbx
je 0x3c161
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0xa490
movq 0x50(%rsp), %rdx
vmovss -0x4(%rbp,%rbx,4), %xmm0
vmovss %xmm0, -0x4(%r15)
cmpq %rbx, %rdx
jle 0x3c184
movq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0xa490
movq 0x50(%rsp), %rdx
movq 0x90(%rsp), %rax
addq %rbx, %rax
incq %rax
incq %rbx
addq 0x98(%rsp), %r15
addq 0xa0(%rsp), %r14
addq $-0x4, %r13
addq $0x4, %r12
cmpq $0x1, %rax
jne 0x3c149
movq 0x88(%rsp), %rsi
incq %rsi
movq 0x78(%rsp), %rax
addq %rax, 0x40(%rsp)
movq 0x18(%rsp), %rcx
addq 0x80(%rsp), %rcx
movq %rcx, 0x18(%rsp)
addq %rax, 0x48(%rsp)
cmpq 0x38(%rsp), %rsi
jne 0x3c100
movq 0x68(%rsp), %rsi
incq %rsi
movq 0x58(%rsp), %rax
addq %rax, 0x30(%rsp)
movq (%rsp), %rcx
addq 0x60(%rsp), %rcx
movq %rcx, (%rsp)
addq %rax, 0x28(%rsp)
cmpq 0x20(%rsp), %rsi
jne 0x3c0d0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x367ae(%rip), %rdi # 0x729e0
leaq 0x2c427(%rip), %rdx # 0x68660
movl $0x11c2, %esi # imm = 0x11C2
xorl %eax, %eax
callq 0xaf60
leaq 0x36794(%rip), %rdi # 0x729e0
leaq 0x2c2f7(%rip), %rdx # 0x6854a
leaq 0x36ed4(%rip), %rcx # 0x7312e
movl $0x119b, %esi # imm = 0x119B
jmp 0x3c30d
leaq 0x36775(%rip), %rdi # 0x729e0
leaq 0x2c2d8(%rip), %rdx # 0x6854a
leaq 0x36ec1(%rip), %rcx # 0x7313a
movl $0x119c, %esi # imm = 0x119C
jmp 0x3c30d
leaq 0x36756(%rip), %rdi # 0x729e0
leaq 0x2c2b9(%rip), %rdx # 0x6854a
leaq 0x36eae(%rip), %rcx # 0x73146
movl $0x119d, %esi # imm = 0x119D
jmp 0x3c30d
leaq 0x3673a(%rip), %rdi # 0x729e0
leaq 0x2c29d(%rip), %rdx # 0x6854a
leaq 0x36e9c(%rip), %rcx # 0x73150
movl $0x119e, %esi # imm = 0x119E
jmp 0x3c30d
leaq 0x3671e(%rip), %rdi # 0x729e0
leaq 0x2c281(%rip), %rdx # 0x6854a
leaq 0x36e8c(%rip), %rcx # 0x7315c
movl $0x119f, %esi # imm = 0x119F
jmp 0x3c30d
leaq 0x36702(%rip), %rdi # 0x729e0
leaq 0x2c265(%rip), %rdx # 0x6854a
leaq 0x3691b(%rip), %rcx # 0x72c07
movl $0x11a1, %esi # imm = 0x11A1
jmp 0x3c30d
leaq 0x366e6(%rip), %rdi # 0x729e0
leaq 0x2c249(%rip), %rdx # 0x6854a
leaq 0x2c67e(%rip), %rcx # 0x68986
movl $0x11a2, %esi # imm = 0x11A2
xorl %eax, %eax
callq 0xaf60
|
ggml_compute_forward_diag:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov [rsp+0D8h+var_C8], rsi
mov rax, [rsi+98h]
mov [rsp+0D8h+var_D0], rax
cmp dword ptr [rax], 0
jnz loc_3C22B
cmp dword ptr [rdi], 0
jnz loc_3C219
mov rcx, [rsp+0D8h+var_D0]
mov rdx, [rcx+10h]
mov rax, [rsp+0D8h+var_C8]
cmp rdx, [rax+10h]
jnz loc_3C245
cmp rdx, [rax+18h]
jnz loc_3C264
cmp qword ptr [rcx+18h], 1
jnz loc_3C283
mov rsi, [rcx+20h]
mov [rsp+0D8h+var_A0], rsi
cmp rsi, [rax+20h]
jnz loc_3C29F
mov rsi, [rcx+28h]
mov [rsp+0D8h+var_B8], rsi
cmp rsi, [rax+28h]
jnz loc_3C2BB
cmp qword ptr [rcx+30h], 4
jnz loc_3C2D7
cmp qword ptr [rax+30h], 4
jnz loc_3C2F3
cmp [rsp+0D8h+var_B8], 0
jle loc_3C219
mov rax, [rsp+0D8h+var_D0]
mov rcx, [rax+40h]
mov [rsp+0D8h+var_58], rcx
mov rax, [rax+48h]
mov [rsp+0D8h+var_78], rax
mov rax, [rsp+0D8h+var_C8]
mov rcx, [rax+38h]
mov rsi, [rax+40h]
mov [rsp+0D8h+var_60], rsi
mov rax, [rax+48h]
mov [rsp+0D8h+var_80], rax
mov [rsp+0D8h+var_38], rcx
lea rax, [rcx+4]
mov [rsp+0D8h+var_40], rax
lea rax, ds:0FFFFFFFFFFFFFFFCh[rdx*4]
mov [rsp+0D8h+var_68], rax
mov rax, rdx
neg rax
mov [rsp+0D8h+var_48], rax
mov eax, 4
mov [rsp+0D8h+var_A8], rax
mov [rsp+0D8h+var_B0], 0
mov [rsp+0D8h+var_D8], 0
xor esi, esi
mov [rsp+0D8h+var_88], rdx
loc_3C0D0:
mov [rsp+0D8h+var_70], rsi
cmp [rsp+0D8h+var_A0], 0
jle loc_3C1EA
mov rax, [rsp+0D8h+var_B0]
mov [rsp+0D8h+var_90], rax
mov rax, [rsp+0D8h+var_D8]
mov [rsp+0D8h+var_C0], rax
mov rax, [rsp+0D8h+var_A8]
mov [rsp+0D8h+var_98], rax
xor esi, esi
loc_3C100:
mov [rsp+0D8h+var_50], rsi
test rdx, rdx
jle loc_3C1B3
mov rax, [rsp+0D8h+var_C8]
mov r14, [rax+0F8h]
mov rax, [rsp+0D8h+var_98]
lea r15, [r14+rax]
mov rax, [rsp+0D8h+var_D0]
mov rbp, [rax+0F8h]
add rbp, [rsp+0D8h+var_C0]
add r14, [rsp+0D8h+var_90]
mov ebx, 1
xor r12d, r12d
mov r13, [rsp+0D8h+var_68]
loc_3C149:
cmp rbx, 1
jz short loc_3C161
mov rdi, r14
xor esi, esi
mov rdx, r12
call _memset
mov rdx, [rsp+0D8h+var_88]
loc_3C161:
vmovss xmm0, dword ptr [rbp+rbx*4-4]
vmovss dword ptr [r15-4], xmm0
cmp rdx, rbx
jle short loc_3C184
mov rdi, r15
xor esi, esi
mov rdx, r13
call _memset
mov rdx, [rsp+0D8h+var_88]
loc_3C184:
mov rax, [rsp+0D8h+var_48]
add rax, rbx
inc rax
inc rbx
add r15, [rsp+0D8h+var_40]
add r14, [rsp+0D8h+var_38]
add r13, 0FFFFFFFFFFFFFFFCh
add r12, 4
cmp rax, 1
jnz short loc_3C149
loc_3C1B3:
mov rsi, [rsp+0D8h+var_50]
inc rsi
mov rax, [rsp+0D8h+var_60]
add [rsp+0D8h+var_98], rax
mov rcx, [rsp+0D8h+var_C0]
add rcx, [rsp+0D8h+var_58]
mov [rsp+0D8h+var_C0], rcx
add [rsp+0D8h+var_90], rax
cmp rsi, [rsp+0D8h+var_A0]
jnz loc_3C100
loc_3C1EA:
mov rsi, [rsp+0D8h+var_70]
inc rsi
mov rax, [rsp+0D8h+var_80]
add [rsp+0D8h+var_A8], rax
mov rcx, [rsp+0D8h+var_D8]
add rcx, [rsp+0D8h+var_78]
mov [rsp+0D8h+var_D8], rcx
add [rsp+0D8h+var_B0], rax
cmp rsi, [rsp+0D8h+var_B8]
jnz loc_3C0D0
loc_3C219:
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3C22B:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/llama."...
lea rdx, aFatalError; "fatal error"
mov esi, 11C2h
xor eax, eax
call _ggml_abort
loc_3C245:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNe00Ne0; "ne00 == ne0"
mov esi, 119Bh
jmp loc_3C30D
loc_3C264:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNe00Ne1; "ne00 == ne1"
mov esi, 119Ch
jmp loc_3C30D
loc_3C283:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNe011; "ne01 == 1"
mov esi, 119Dh
jmp short loc_3C30D
loc_3C29F:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNe02Ne2; "ne02 == ne2"
mov esi, 119Eh
jmp short loc_3C30D
loc_3C2BB:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNe03Ne3; "ne03 == ne3"
mov esi, 119Fh
jmp short loc_3C30D
loc_3C2D7:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNb00SizeofFloa; "nb00 == sizeof(float)"
mov esi, 11A1h
jmp short loc_3C30D
loc_3C2F3:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNb0SizeofFloat; "nb0 == sizeof(float)"
mov esi, 11A2h
loc_3C30D:
xor eax, eax
call _ggml_abort
|
long long ggml_compute_forward_diag(_DWORD *a1, _QWORD *a2)
{
long long result; // rax
long long v3; // rdx
long long v4; // rsi
long long v5; // rsi
long long v6; // r14
long long v9; // r14
long long v11; // r12
long long v12; // r13
long long v14; // rax
long long v15; // [rsp+0h] [rbp-D8h]
_QWORD *v16; // [rsp+8h] [rbp-D0h]
long long v18; // [rsp+18h] [rbp-C0h]
long long v19; // [rsp+20h] [rbp-B8h]
long long v20; // [rsp+28h] [rbp-B0h]
long long v21; // [rsp+30h] [rbp-A8h]
long long v22; // [rsp+38h] [rbp-A0h]
long long v23; // [rsp+40h] [rbp-98h]
long long v24; // [rsp+48h] [rbp-90h]
long long v25; // [rsp+50h] [rbp-88h]
long long v26; // [rsp+58h] [rbp-80h]
long long v27; // [rsp+60h] [rbp-78h]
long long v28; // [rsp+68h] [rbp-70h]
long long v29; // [rsp+70h] [rbp-68h]
long long v30; // [rsp+78h] [rbp-60h]
long long v31; // [rsp+80h] [rbp-58h]
long long v32; // [rsp+88h] [rbp-50h]
long long v33; // [rsp+90h] [rbp-48h]
long long v34; // [rsp+A0h] [rbp-38h]
result = a2[19];
v16 = (_QWORD *)result;
if ( *(_DWORD *)result )
{
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp", 4546LL, "fatal error");
LABEL_25:
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp",
4507LL,
"GGML_ASSERT(%s) failed",
"ne00 == ne0");
return ggml_compute_forward_diag_mask_inf();
}
if ( *a1 )
return result;
v3 = *(_QWORD *)(result + 16);
result = (long long)a2;
if ( v3 != a2[2] )
goto LABEL_25;
if ( v3 != a2[3] )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp",
4508LL,
"GGML_ASSERT(%s) failed",
"ne00 == ne1");
return ggml_compute_forward_diag_mask_inf();
}
if ( v16[3] != 1LL )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp",
4509LL,
"GGML_ASSERT(%s) failed",
"ne01 == 1");
return ggml_compute_forward_diag_mask_inf();
}
v22 = v16[4];
if ( v22 != a2[4] )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp",
4510LL,
"GGML_ASSERT(%s) failed",
"ne02 == ne2");
return ggml_compute_forward_diag_mask_inf();
}
v19 = v16[5];
if ( v19 != a2[5] )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp",
4511LL,
"GGML_ASSERT(%s) failed",
"ne03 == ne3");
return ggml_compute_forward_diag_mask_inf();
}
if ( v16[6] != 4LL )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp",
4513LL,
"GGML_ASSERT(%s) failed",
"nb00 == sizeof(float)");
return ggml_compute_forward_diag_mask_inf();
}
if ( a2[6] != 4LL )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp",
4514LL,
"GGML_ASSERT(%s) failed",
"nb0 == sizeof(float)");
return ggml_compute_forward_diag_mask_inf();
}
if ( v19 > 0 )
{
v31 = v16[8];
v27 = v16[9];
v30 = a2[8];
v26 = a2[9];
v34 = a2[7];
v29 = 4 * v3 - 4;
v33 = -v3;
v21 = 4LL;
v20 = 0LL;
v15 = 0LL;
v4 = 0LL;
v25 = v16[2];
do
{
v28 = v4;
if ( v22 > 0 )
{
v24 = v20;
v18 = v15;
v23 = v21;
v5 = 0LL;
do
{
v32 = v5;
if ( v3 > 0 )
{
v6 = a2[31];
_R15 = v6 + v23;
_RBP = v18 + v16[31];
v9 = v24 + v6;
_RBX = 1LL;
v11 = 0LL;
v12 = v29;
do
{
if ( _RBX != 1 )
{
memset(v9, 0LL, v11);
v3 = v25;
}
__asm
{
vmovss xmm0, dword ptr [rbp+rbx*4-4]
vmovss dword ptr [r15-4], xmm0
}
if ( v3 > _RBX )
{
memset(_R15, 0LL, v12);
v3 = v25;
}
v14 = _RBX + v33 + 1;
++_RBX;
_R15 += v34 + 4;
v9 += v34;
v12 -= 4LL;
v11 += 4LL;
}
while ( v14 != 1 );
}
++v5;
v23 += v30;
v18 += v31;
v24 += v30;
}
while ( v32 + 1 != v22 );
}
v4 = v28 + 1;
result = v26;
v21 += v26;
v15 += v27;
v20 += v26;
}
while ( v28 + 1 != v19 );
}
return result;
}
|
ggml_compute_forward_diag:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV qword ptr [RSP + 0x10],RSI
MOV RAX,qword ptr [RSI + 0x98]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RAX],0x0
JNZ 0x0013c22b
CMP dword ptr [RDI],0x0
JNZ 0x0013c219
MOV RCX,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RCX + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
CMP RDX,qword ptr [RAX + 0x10]
JNZ 0x0013c245
CMP RDX,qword ptr [RAX + 0x18]
JNZ 0x0013c264
CMP qword ptr [RCX + 0x18],0x1
JNZ 0x0013c283
MOV RSI,qword ptr [RCX + 0x20]
MOV qword ptr [RSP + 0x38],RSI
CMP RSI,qword ptr [RAX + 0x20]
JNZ 0x0013c29f
MOV RSI,qword ptr [RCX + 0x28]
MOV qword ptr [RSP + 0x20],RSI
CMP RSI,qword ptr [RAX + 0x28]
JNZ 0x0013c2bb
CMP qword ptr [RCX + 0x30],0x4
JNZ 0x0013c2d7
CMP qword ptr [RAX + 0x30],0x4
JNZ 0x0013c2f3
CMP qword ptr [RSP + 0x20],0x0
JLE 0x0013c219
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x40]
MOV qword ptr [RSP + 0x80],RCX
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RAX + 0x38]
MOV RSI,qword ptr [RAX + 0x40]
MOV qword ptr [RSP + 0x78],RSI
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0xa0],RCX
LEA RAX,[RCX + 0x4]
MOV qword ptr [RSP + 0x98],RAX
LEA RAX,[-0x4 + RDX*0x4]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,RDX
NEG RAX
MOV qword ptr [RSP + 0x90],RAX
MOV EAX,0x4
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP],0x0
XOR ESI,ESI
MOV qword ptr [RSP + 0x50],RDX
LAB_0013c0d0:
MOV qword ptr [RSP + 0x68],RSI
CMP qword ptr [RSP + 0x38],0x0
JLE 0x0013c1ea
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x40],RAX
XOR ESI,ESI
LAB_0013c100:
MOV qword ptr [RSP + 0x88],RSI
TEST RDX,RDX
JLE 0x0013c1b3
MOV RAX,qword ptr [RSP + 0x10]
MOV R14,qword ptr [RAX + 0xf8]
MOV RAX,qword ptr [RSP + 0x40]
LEA R15,[R14 + RAX*0x1]
MOV RAX,qword ptr [RSP + 0x8]
MOV RBP,qword ptr [RAX + 0xf8]
ADD RBP,qword ptr [RSP + 0x18]
ADD R14,qword ptr [RSP + 0x48]
MOV EBX,0x1
XOR R12D,R12D
MOV R13,qword ptr [RSP + 0x70]
LAB_0013c149:
CMP RBX,0x1
JZ 0x0013c161
MOV RDI,R14
XOR ESI,ESI
MOV RDX,R12
CALL 0x0010a490
MOV RDX,qword ptr [RSP + 0x50]
LAB_0013c161:
VMOVSS XMM0,dword ptr [RBP + RBX*0x4 + -0x4]
VMOVSS dword ptr [R15 + -0x4],XMM0
CMP RDX,RBX
JLE 0x0013c184
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R13
CALL 0x0010a490
MOV RDX,qword ptr [RSP + 0x50]
LAB_0013c184:
MOV RAX,qword ptr [RSP + 0x90]
ADD RAX,RBX
INC RAX
INC RBX
ADD R15,qword ptr [RSP + 0x98]
ADD R14,qword ptr [RSP + 0xa0]
ADD R13,-0x4
ADD R12,0x4
CMP RAX,0x1
JNZ 0x0013c149
LAB_0013c1b3:
MOV RSI,qword ptr [RSP + 0x88]
INC RSI
MOV RAX,qword ptr [RSP + 0x78]
ADD qword ptr [RSP + 0x40],RAX
MOV RCX,qword ptr [RSP + 0x18]
ADD RCX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x18],RCX
ADD qword ptr [RSP + 0x48],RAX
CMP RSI,qword ptr [RSP + 0x38]
JNZ 0x0013c100
LAB_0013c1ea:
MOV RSI,qword ptr [RSP + 0x68]
INC RSI
MOV RAX,qword ptr [RSP + 0x58]
ADD qword ptr [RSP + 0x30],RAX
MOV RCX,qword ptr [RSP]
ADD RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP],RCX
ADD qword ptr [RSP + 0x28],RAX
CMP RSI,qword ptr [RSP + 0x20]
JNZ 0x0013c0d0
LAB_0013c219:
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013c22b:
LEA RDI,[0x1729e0]
LEA RDX,[0x168660]
MOV ESI,0x11c2
XOR EAX,EAX
CALL 0x0010af60
LAB_0013c245:
LEA RDI,[0x1729e0]
LEA RDX,[0x16854a]
LEA RCX,[0x17312e]
MOV ESI,0x119b
JMP 0x0013c30d
LAB_0013c264:
LEA RDI,[0x1729e0]
LEA RDX,[0x16854a]
LEA RCX,[0x17313a]
MOV ESI,0x119c
JMP 0x0013c30d
LAB_0013c283:
LEA RDI,[0x1729e0]
LEA RDX,[0x16854a]
LEA RCX,[0x173146]
MOV ESI,0x119d
JMP 0x0013c30d
LAB_0013c29f:
LEA RDI,[0x1729e0]
LEA RDX,[0x16854a]
LEA RCX,[0x173150]
MOV ESI,0x119e
JMP 0x0013c30d
LAB_0013c2bb:
LEA RDI,[0x1729e0]
LEA RDX,[0x16854a]
LEA RCX,[0x17315c]
MOV ESI,0x119f
JMP 0x0013c30d
LAB_0013c2d7:
LEA RDI,[0x1729e0]
LEA RDX,[0x16854a]
LEA RCX,[0x172c07]
MOV ESI,0x11a1
JMP 0x0013c30d
LAB_0013c2f3:
LEA RDI,[0x1729e0]
LEA RDX,[0x16854a]
LEA RCX,[0x168986]
MOV ESI,0x11a2
LAB_0013c30d:
XOR EAX,EAX
CALL 0x0010af60
|
void ggml_compute_forward_diag(int *param_1,long param_2)
{
int *piVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
char *pcVar11;
long lVar12;
long lVar13;
long lVar14;
int8 uVar15;
size_t __n;
size_t __n_00;
void *__s;
void *__s_00;
bool bVar16;
long local_d8;
long local_c0;
long local_b0;
long local_a8;
long local_98;
long local_90;
piVar1 = *(int **)(param_2 + 0x98);
if (*piVar1 != 0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp",0x11c2,
"fatal error");
}
if (*param_1 != 0) {
return;
}
lVar2 = *(long *)(piVar1 + 4);
if (lVar2 == *(long *)(param_2 + 0x10)) {
if (lVar2 == *(long *)(param_2 + 0x18)) {
if (*(long *)(piVar1 + 6) == 1) {
lVar3 = *(long *)(piVar1 + 8);
if (lVar3 == *(long *)(param_2 + 0x20)) {
lVar4 = *(long *)(piVar1 + 10);
if (lVar4 == *(long *)(param_2 + 0x28)) {
if (*(long *)(piVar1 + 0xc) == 4) {
if (*(long *)(param_2 + 0x30) == 4) {
if (lVar4 < 1) {
return;
}
lVar5 = *(long *)(piVar1 + 0x10);
lVar6 = *(long *)(piVar1 + 0x12);
lVar7 = *(long *)(param_2 + 0x38);
lVar8 = *(long *)(param_2 + 0x40);
lVar9 = *(long *)(param_2 + 0x48);
local_a8 = 4;
local_b0 = 0;
local_d8 = 0;
lVar14 = 0;
do {
if (0 < lVar3) {
local_90 = local_b0;
local_c0 = local_d8;
local_98 = local_a8;
lVar13 = 0;
do {
if (0 < lVar2) {
__s_00 = (void *)(*(long *)(param_2 + 0xf8) + local_98);
lVar10 = *(long *)(piVar1 + 0x3e);
__s = (void *)(*(long *)(param_2 + 0xf8) + local_90);
__n = 0;
lVar12 = 1;
__n_00 = lVar2 * 4;
do {
__n_00 = __n_00 - 4;
if (lVar12 != 1) {
memset(__s,0,__n);
}
*(int4 *)((long)__s_00 + -4) =
*(int4 *)(lVar10 + local_c0 + -4 + lVar12 * 4);
if (lVar12 < lVar2) {
memset(__s_00,0,__n_00);
}
__s_00 = (void *)((long)__s_00 + lVar7 + 4);
__s = (void *)((long)__s + lVar7);
__n = __n + 4;
bVar16 = lVar12 != lVar2;
lVar12 = lVar12 + 1;
} while (bVar16);
}
lVar13 = lVar13 + 1;
local_98 = local_98 + lVar8;
local_c0 = local_c0 + lVar5;
local_90 = local_90 + lVar8;
} while (lVar13 != lVar3);
}
lVar14 = lVar14 + 1;
local_a8 = local_a8 + lVar9;
local_d8 = local_d8 + lVar6;
local_b0 = local_b0 + lVar9;
} while (lVar14 != lVar4);
return;
}
pcVar11 = "nb0 == sizeof(float)";
uVar15 = 0x11a2;
}
else {
pcVar11 = "nb00 == sizeof(float)";
uVar15 = 0x11a1;
}
}
else {
pcVar11 = "ne03 == ne3";
uVar15 = 0x119f;
}
}
else {
pcVar11 = "ne02 == ne2";
uVar15 = 0x119e;
}
}
else {
pcVar11 = "ne01 == 1";
uVar15 = 0x119d;
}
}
else {
pcVar11 = "ne00 == ne1";
uVar15 = 0x119c;
}
}
else {
pcVar11 = "ne00 == ne0";
uVar15 = 0x119b;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp",uVar15,
"GGML_ASSERT(%s) failed",pcVar11);
}
|
|
10,519 |
psi_rwlock_trywrlock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD
int psi_rwlock_trywrlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)
(&state, that->m_psi, PSI_RWLOCK_TRYWRITELOCK, file, line);
int result= rw_trywrlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
}
|
O0
|
c
|
psi_rwlock_trywrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1ab16e(%rip), %rax # 0x1d6b08
movq (%rax), %rax
movq 0x1b0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x90(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x3, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2c000
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x2b9f3
leaq 0x1ab128(%rip), %rax # 0x1d6b08
movq (%rax), %rax
movq 0x1b8(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
psi_rwlock_trywrlock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+90h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
mov edx, 3
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call my_rw_trywrlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_2B9F3
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_2B9F3:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_rwlock_trywrlock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[0] + 54))(
v6,
*(_QWORD *)(a1 + 144),
3LL,
a2,
a3);
v4 = my_rw_trywrlock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 55))(v5, v4);
return v4;
}
|
psi_rwlock_trywrlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x2d6b08]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1b0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x90]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x3
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012c000
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0012b9f3
LEA RAX,[0x2d6b08]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1b8]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_0012b9f3:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_rwlock_trywrlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
long local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1b0))
(local_50,*(int8 *)(param_1 + 0x90),3,param_2,param_3);
uVar1 = my_rw_trywrlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
|
|
10,520 |
ft_boolean_read_next
|
eloqsql/storage/myisam/ft_boolean_search.c
|
int ft_boolean_read_next(FT_INFO *ftb, char *record)
{
FTB_EXPR *ftbe;
FTB_WORD *ftbw;
MI_INFO *info=ftb->info;
my_off_t curdoc;
if (ftb->state != INDEX_SEARCH && ftb->state != INDEX_DONE)
return -1;
/* black magic ON */
if ((int) _mi_check_index(info, ftb->keynr) < 0)
return my_errno;
if (_mi_readinfo(info, F_RDLCK, 1))
return my_errno;
/* black magic OFF */
if (!ftb->queue.elements)
return my_errno=HA_ERR_END_OF_FILE;
/* Attention!!! Address of a local variable is used here! See err: label */
ftb->queue.first_cmp_arg=(void *)&curdoc;
while (ftb->state == INDEX_SEARCH &&
(curdoc=((FTB_WORD *)queue_top(& ftb->queue))->docid[0]) !=
HA_OFFSET_ERROR)
{
while (curdoc == (ftbw=(FTB_WORD *)queue_top(& ftb->queue))->docid[0])
{
if (unlikely(_ftb_climb_the_tree(ftb, ftbw, 0)))
{
my_errno= HA_ERR_OUT_OF_MEM;
goto err;
}
/* update queue */
_ft2_search(ftb, ftbw, 0);
queue_replace_top(&ftb->queue);
}
ftbe=ftb->root;
if (ftbe->docid[0]==curdoc && ftbe->cur_weight>0 &&
ftbe->yesses>=(ftbe->ythresh-ftbe->yweaks) && !ftbe->nos)
{
/* curdoc matched ! */
if (is_tree_inited(&ftb->no_dupes) &&
tree_insert(&ftb->no_dupes, &curdoc, 0,
ftb->no_dupes.custom_arg)->count >1)
/* but it managed already to get past this line once */
continue;
info->lastpos=curdoc;
/* Clear all states, except that the table was updated */
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
if (!(*info->read_record)(info,curdoc, (uchar*) record))
{
info->update|= HA_STATE_AKTIV; /* Record is read */
if (ftb->with_scan &&
ft_boolean_find_relevance(ftb,(uchar*) record,0)==0)
continue; /* no match */
my_errno=0;
goto err;
}
goto err;
}
}
ftb->state=INDEX_DONE;
my_errno=HA_ERR_END_OF_FILE;
err:
ftb->queue.first_cmp_arg=(void *)0;
return my_errno;
}
|
O3
|
c
|
ft_boolean_read_next:
movl 0x348(%rdi), %ecx
andl $-0x2, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl $0x2, %ecx
jne 0x5acd4
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %r15
movl 0x340(%rdi), %esi
movq %r15, %rdi
callq 0x4d224
testl %eax, %eax
js 0x5acbf
movq %r15, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x456ef
testl %eax, %eax
jne 0x5acbf
cmpl $0x0, 0x80(%rbx)
je 0x5acd5
leaq -0x30(%rbp), %rax
movq %rax, 0x78(%rbx)
cmpl $0x2, 0x348(%rbx)
jne 0x5ac9f
leaq 0x70(%rbx), %r12
leaq 0xa0(%rbx), %rax
movq %rax, -0x38(%rbp)
movq (%r12), %rax
movq 0x8(%rax), %r13
movq 0x10(%r13), %rax
movq %rax, -0x30(%rbp)
cmpq $-0x1, %rax
je 0x5ac9f
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x5acf4
testl %eax, %eax
jne 0x5ace7
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x5afb0
movq %r12, %rdi
movl $0x1, %esi
callq 0x72add
movq -0x30(%rbp), %rsi
movq 0x70(%rbx), %rax
movq 0x8(%rax), %r13
cmpq 0x10(%r13), %rsi
je 0x5aba1
movq 0x18(%rbx), %rax
cmpq %rsi, 0x10(%rax)
jne 0x5ac0b
movss 0x2c(%rax), %xmm0
ucomiss 0x4c410(%rip), %xmm0 # 0xa7008
jbe 0x5ac0b
movl 0x48(%rax), %ecx
subl 0x4c(%rax), %ecx
cmpl %ecx, 0x40(%rax)
jb 0x5ac0b
cmpl $0x0, 0x44(%rax)
je 0x5ac1d
cmpl $0x2, 0x348(%rbx)
je 0x5ab87
jmp 0x5ac9f
movq -0x38(%rbp), %rax
cmpq $0x0, (%rax)
je 0x5ac4a
movq 0x2d0(%rbx), %rcx
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0x74f2e
testl $0x7ffffffe, 0x10(%rax) # imm = 0x7FFFFFFE
jne 0x5ac0b
movq -0x30(%rbp), %rsi
movq %rsi, 0x170(%r15)
andl $0x401, 0x1d0(%r15) # imm = 0x401
movq %r15, %rdi
movq %r14, %rdx
callq *0x140(%r15)
testl %eax, %eax
jne 0x5acb7
orb $0x2, 0x1d0(%r15)
cmpb $0x0, 0x344(%rbx)
je 0x5acef
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2b2cf
ucomiss 0x4c373(%rip), %xmm0 # 0xa7008
jne 0x5acaf
jnp 0x5ac0b
jmp 0x5acaf
movl $0x3, 0x348(%rbx)
movl $0x89, %r13d
callq 0x721fe
movl %r13d, (%rax)
movq $0x0, 0x78(%rbx)
callq 0x721fe
movl (%rax), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x721fe
movl $0x89, (%rax)
movl $0x89, %eax
jmp 0x5acc6
movl $0x80, %r13d
jmp 0x5acaf
xorl %r13d, %r13d
jmp 0x5acaf
|
ft_boolean_read_next:
mov ecx, [rdi+348h]
and ecx, 0FFFFFFFEh
mov eax, 0FFFFFFFFh
cmp ecx, 2
jnz locret_5ACD4
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
mov r15, [rdi+8]
mov esi, [rdi+340h]
mov rdi, r15
call _mi_check_index
test eax, eax
js loc_5ACBF
mov rdi, r15
xor esi, esi
mov edx, 1
call _mi_readinfo
test eax, eax
jnz loc_5ACBF
cmp dword ptr [rbx+80h], 0
jz loc_5ACD5
lea rax, [rbp-30h]
mov [rbx+78h], rax
cmp dword ptr [rbx+348h], 2
jnz loc_5AC9F
lea r12, [rbx+70h]
lea rax, [rbx+0A0h]
mov [rbp-38h], rax
loc_5AB87:
mov rax, [r12]
mov r13, [rax+8]
mov rax, [r13+10h]
mov [rbp-30h], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_5AC9F
loc_5ABA1:
mov rdi, rbx
mov rsi, r13
xor edx, edx
call _ftb_climb_the_tree
test eax, eax
jnz loc_5ACE7
mov rdi, rbx
mov rsi, r13
xor edx, edx
call _ft2_search
mov rdi, r12
mov esi, 1
call _downheap
mov rsi, [rbp-30h]
mov rax, [rbx+70h]
mov r13, [rax+8]
cmp rsi, [r13+10h]
jz short loc_5ABA1
mov rax, [rbx+18h]
cmp [rax+10h], rsi
jnz short loc_5AC0B
movss xmm0, dword ptr [rax+2Ch]
ucomiss xmm0, cs:dword_A7008
jbe short loc_5AC0B
mov ecx, [rax+48h]
sub ecx, [rax+4Ch]
cmp [rax+40h], ecx
jb short loc_5AC0B
cmp dword ptr [rax+44h], 0
jz short loc_5AC1D
loc_5AC0B:
cmp dword ptr [rbx+348h], 2
jz loc_5AB87
jmp loc_5AC9F
loc_5AC1D:
mov rax, [rbp-38h]
cmp qword ptr [rax], 0
jz short loc_5AC4A
mov rcx, [rbx+2D0h]
mov rdi, [rbp-38h]
lea rsi, [rbp-30h]
xor edx, edx
call tree_insert
test dword ptr [rax+10h], 7FFFFFFEh
jnz short loc_5AC0B
mov rsi, [rbp-30h]
loc_5AC4A:
mov [r15+170h], rsi
and dword ptr [r15+1D0h], 401h
mov rdi, r15
mov rdx, r14
call qword ptr [r15+140h]
test eax, eax
jnz short loc_5ACB7
or byte ptr [r15+1D0h], 2
cmp byte ptr [rbx+344h], 0
jz short loc_5ACEF
xor r13d, r13d
mov rdi, rbx
mov rsi, r14
xor edx, edx
call ft_boolean_find_relevance
ucomiss xmm0, cs:dword_A7008
jnz short loc_5ACAF
jnp loc_5AC0B
jmp short loc_5ACAF
loc_5AC9F:
mov dword ptr [rbx+348h], 3
mov r13d, 89h
loc_5ACAF:
call _my_thread_var
mov [rax], r13d
loc_5ACB7:
mov qword ptr [rbx+78h], 0
loc_5ACBF:
call _my_thread_var
mov eax, [rax]
loc_5ACC6:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_5ACD4:
retn
loc_5ACD5:
call _my_thread_var
mov dword ptr [rax], 89h
mov eax, 89h
jmp short loc_5ACC6
loc_5ACE7:
mov r13d, 80h
jmp short loc_5ACAF
loc_5ACEF:
xor r13d, r13d
jmp short loc_5ACAF
|
long long ft_boolean_read_next(long long a1, long long a2)
{
long long result; // rax
long long v5; // r15
const char *v6; // rsi
long long v7; // rdi
long long v8; // r13
long long v9; // rax
int v10; // r13d
double relevance; // xmm0_8
_QWORD *v12; // [rsp-40h] [rbp-40h]
_QWORD v13[7]; // [rsp-38h] [rbp-38h] BYREF
result = 0xFFFFFFFFLL;
if ( (*(_DWORD *)(a1 + 840) & 0xFFFFFFFE) == 2 )
{
v5 = *(_QWORD *)(a1 + 8);
v6 = (const char *)*(unsigned int *)(a1 + 832);
v7 = v5;
if ( (int)mi_check_index((unsigned int *)v5, v6) < 0 )
return *(unsigned int *)my_thread_var(v7, v6);
v7 = v5;
v6 = 0LL;
if ( (unsigned int)mi_readinfo((long long *)v5, 0LL, 1) )
return *(unsigned int *)my_thread_var(v7, v6);
if ( !*(_DWORD *)(a1 + 128) )
{
*(_DWORD *)my_thread_var(v5, 0LL) = 137;
return 137LL;
}
*(_QWORD *)(a1 + 120) = v13;
if ( *(_DWORD *)(a1 + 840) != 2 )
goto LABEL_23;
v12 = (_QWORD *)(a1 + 160);
while ( 2 )
{
v8 = *(_QWORD *)(*(_QWORD *)(a1 + 112) + 8LL);
v13[0] = *(_QWORD *)(v8 + 16);
if ( v13[0] == -1LL )
goto LABEL_23;
do
{
v7 = a1;
v6 = (const char *)v8;
if ( (unsigned int)ftb_climb_the_tree(a1, v8, 0LL) )
{
v10 = 128;
goto LABEL_24;
}
ft2_search(a1, v8, 0LL);
v7 = a1 + 112;
downheap(a1 + 112, 1LL);
v6 = (const char *)v13[0];
v8 = *(_QWORD *)(*(_QWORD *)(a1 + 112) + 8LL);
}
while ( v13[0] == *(_QWORD *)(v8 + 16) );
v9 = *(_QWORD *)(a1 + 24);
if ( *(_QWORD *)(v9 + 16) != v13[0]
|| *(float *)(v9 + 44) <= 0.0
|| *(_DWORD *)(v9 + 64) < (unsigned int)(*(_DWORD *)(v9 + 72) - *(_DWORD *)(v9 + 76))
|| *(_DWORD *)(v9 + 68) )
{
LABEL_14:
if ( *(_DWORD *)(a1 + 840) == 2 )
continue;
LABEL_23:
*(_DWORD *)(a1 + 840) = 3;
v10 = 137;
goto LABEL_24;
}
break;
}
if ( *v12 )
{
v7 = a1 + 160;
v6 = (const char *)v13;
if ( (*(_DWORD *)(tree_insert(v12, v13, 0LL, *(_QWORD *)(a1 + 720)) + 16) & 0x7FFFFFFE) != 0 )
goto LABEL_14;
v6 = (const char *)v13[0];
}
*(_QWORD *)(v5 + 368) = v6;
*(_DWORD *)(v5 + 464) &= 0x401u;
v7 = v5;
if ( (*(unsigned int ( **)(long long, const char *, long long))(v5 + 320))(v5, v6, a2) )
goto LABEL_25;
*(_BYTE *)(v5 + 464) |= 2u;
if ( !*(_BYTE *)(a1 + 836) )
{
v10 = 0;
LABEL_24:
*(_DWORD *)my_thread_var(v7, v6) = v10;
LABEL_25:
*(_QWORD *)(a1 + 120) = 0LL;
return *(unsigned int *)my_thread_var(v7, v6);
}
v10 = 0;
v7 = a1;
v6 = (const char *)a2;
relevance = ft_boolean_find_relevance(a1, a2, 0);
if ( *(float *)&relevance != 0.0 )
goto LABEL_24;
goto LABEL_14;
}
return result;
}
|
ft_boolean_read_next:
MOV ECX,dword ptr [RDI + 0x348]
AND ECX,0xfffffffe
MOV EAX,0xffffffff
CMP ECX,0x2
JNZ 0x0015acd4
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
MOV R15,qword ptr [RDI + 0x8]
MOV ESI,dword ptr [RDI + 0x340]
MOV RDI,R15
CALL 0x0014d224
TEST EAX,EAX
JS 0x0015acbf
MOV RDI,R15
XOR ESI,ESI
MOV EDX,0x1
CALL 0x001456ef
TEST EAX,EAX
JNZ 0x0015acbf
CMP dword ptr [RBX + 0x80],0x0
JZ 0x0015acd5
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBX + 0x78],RAX
CMP dword ptr [RBX + 0x348],0x2
JNZ 0x0015ac9f
LEA R12,[RBX + 0x70]
LEA RAX,[RBX + 0xa0]
MOV qword ptr [RBP + -0x38],RAX
LAB_0015ab87:
MOV RAX,qword ptr [R12]
MOV R13,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R13 + 0x10]
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,-0x1
JZ 0x0015ac9f
LAB_0015aba1:
MOV RDI,RBX
MOV RSI,R13
XOR EDX,EDX
CALL 0x0015acf4
TEST EAX,EAX
JNZ 0x0015ace7
MOV RDI,RBX
MOV RSI,R13
XOR EDX,EDX
CALL 0x0015afb0
MOV RDI,R12
MOV ESI,0x1
CALL 0x00172add
MOV RSI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBX + 0x70]
MOV R13,qword ptr [RAX + 0x8]
CMP RSI,qword ptr [R13 + 0x10]
JZ 0x0015aba1
MOV RAX,qword ptr [RBX + 0x18]
CMP qword ptr [RAX + 0x10],RSI
JNZ 0x0015ac0b
MOVSS XMM0,dword ptr [RAX + 0x2c]
UCOMISS XMM0,dword ptr [0x001a7008]
JBE 0x0015ac0b
MOV ECX,dword ptr [RAX + 0x48]
SUB ECX,dword ptr [RAX + 0x4c]
CMP dword ptr [RAX + 0x40],ECX
JC 0x0015ac0b
CMP dword ptr [RAX + 0x44],0x0
JZ 0x0015ac1d
LAB_0015ac0b:
CMP dword ptr [RBX + 0x348],0x2
JZ 0x0015ab87
JMP 0x0015ac9f
LAB_0015ac1d:
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX],0x0
JZ 0x0015ac4a
MOV RCX,qword ptr [RBX + 0x2d0]
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x30]
XOR EDX,EDX
CALL 0x00174f2e
TEST dword ptr [RAX + 0x10],0x7ffffffe
JNZ 0x0015ac0b
MOV RSI,qword ptr [RBP + -0x30]
LAB_0015ac4a:
MOV qword ptr [R15 + 0x170],RSI
AND dword ptr [R15 + 0x1d0],0x401
MOV RDI,R15
MOV RDX,R14
CALL qword ptr [R15 + 0x140]
TEST EAX,EAX
JNZ 0x0015acb7
OR byte ptr [R15 + 0x1d0],0x2
CMP byte ptr [RBX + 0x344],0x0
JZ 0x0015acef
XOR R13D,R13D
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x0012b2cf
UCOMISS XMM0,dword ptr [0x001a7008]
JNZ 0x0015acaf
JNP 0x0015ac0b
JMP 0x0015acaf
LAB_0015ac9f:
MOV dword ptr [RBX + 0x348],0x3
MOV R13D,0x89
LAB_0015acaf:
CALL 0x001721fe
MOV dword ptr [RAX],R13D
LAB_0015acb7:
MOV qword ptr [RBX + 0x78],0x0
LAB_0015acbf:
CALL 0x001721fe
MOV EAX,dword ptr [RAX]
LAB_0015acc6:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_0015acd4:
RET
LAB_0015acd5:
CALL 0x001721fe
MOV dword ptr [RAX],0x89
MOV EAX,0x89
JMP 0x0015acc6
LAB_0015ace7:
MOV R13D,0x80
JMP 0x0015acaf
LAB_0015acef:
XOR R13D,R13D
JMP 0x0015acaf
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int4 ft_boolean_read_next(long param_1,int8 param_2)
{
long lVar1;
int iVar2;
long lVar3;
int4 *puVar4;
int4 uVar5;
float fVar6;
long local_38;
uVar5 = 0xffffffff;
if ((*(uint *)(param_1 + 0x348) & 0xfffffffe) == 2) {
lVar1 = *(long *)(param_1 + 8);
iVar2 = _mi_check_index(lVar1,*(int4 *)(param_1 + 0x340));
if ((-1 < iVar2) && (iVar2 = _mi_readinfo(lVar1,0,1), iVar2 == 0)) {
if (*(int *)(param_1 + 0x80) == 0) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x89;
return 0x89;
}
*(long **)(param_1 + 0x78) = &local_38;
if (*(int *)(param_1 + 0x348) == 2) {
do {
lVar3 = *(long *)(*(long *)(param_1 + 0x70) + 8);
local_38 = *(long *)(lVar3 + 0x10);
if (local_38 == -1) break;
do {
iVar2 = _ftb_climb_the_tree(param_1,lVar3,0);
if (iVar2 != 0) {
uVar5 = 0x80;
goto LAB_0015acaf;
}
_ft2_search(param_1,lVar3,0);
_downheap((long *)(param_1 + 0x70),1);
lVar3 = *(long *)(*(long *)(param_1 + 0x70) + 8);
} while (local_38 == *(long *)(lVar3 + 0x10));
lVar3 = *(long *)(param_1 + 0x18);
if (((((*(long *)(lVar3 + 0x10) == local_38) && (_DAT_001a7008 < *(float *)(lVar3 + 0x2c))
) && ((uint)(*(int *)(lVar3 + 0x48) - *(int *)(lVar3 + 0x4c)) <=
*(uint *)(lVar3 + 0x40))) && (*(int *)(lVar3 + 0x44) == 0)) &&
((*(long *)(param_1 + 0xa0) == 0 ||
(lVar3 = tree_insert((long *)(param_1 + 0xa0),&local_38,0,
*(int8 *)(param_1 + 0x2d0)),
(*(uint *)(lVar3 + 0x10) & 0x7ffffffe) == 0)))) {
*(long *)(lVar1 + 0x170) = local_38;
*(uint *)(lVar1 + 0x1d0) = *(uint *)(lVar1 + 0x1d0) & 0x401;
iVar2 = (**(code **)(lVar1 + 0x140))(lVar1,local_38,param_2);
if (iVar2 != 0) goto LAB_0015acb7;
*(byte *)(lVar1 + 0x1d0) = *(byte *)(lVar1 + 0x1d0) | 2;
if (*(char *)(param_1 + 0x344) == '\0') {
uVar5 = 0;
goto LAB_0015acaf;
}
fVar6 = (float)ft_boolean_find_relevance(param_1,param_2,0);
uVar5 = 0;
if ((fVar6 != _DAT_001a7008) || (uVar5 = 0, NAN(fVar6) || NAN(_DAT_001a7008)))
goto LAB_0015acaf;
}
} while (*(int *)(param_1 + 0x348) == 2);
}
*(int4 *)(param_1 + 0x348) = 3;
uVar5 = 0x89;
LAB_0015acaf:
puVar4 = (int4 *)_my_thread_var();
*puVar4 = uVar5;
LAB_0015acb7:
*(int8 *)(param_1 + 0x78) = 0;
}
puVar4 = (int4 *)_my_thread_var();
uVar5 = *puVar4;
}
return uVar5;
}
|
|
10,521 |
testing::internal::FilePath::CreateFolder() const
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-filepath.cc
|
bool FilePath::CreateFolder() const {
#ifdef GTEST_OS_WINDOWS_MOBILE
FilePath removed_sep(this->RemoveTrailingPathSeparator());
LPCWSTR unicode = String::AnsiToUtf16(removed_sep.c_str());
int result = CreateDirectory(unicode, nullptr) ? 0 : -1;
delete[] unicode;
#elif defined(GTEST_OS_WINDOWS)
int result = _mkdir(pathname_.c_str());
#elif defined(GTEST_OS_ESP8266) || defined(GTEST_OS_XTENSA) || \
defined(GTEST_OS_QURT) || defined(GTEST_OS_NXP_QN9090) || \
defined(GTEST_OS_NRF52)
// do nothing
int result = 0;
#else
int result = mkdir(pathname_.c_str(), 0777);
#endif // GTEST_OS_WINDOWS_MOBILE
if (result == -1) {
return this->DirectoryExists(); // An error is OK if the directory exists.
}
return true; // No error.
}
|
O1
|
cpp
|
testing::internal::FilePath::CreateFolder() const:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
movq (%rdi), %rdi
movl $0x1ff, %esi # imm = 0x1FF
callq 0x8210
movl %eax, %ecx
movb $0x1, %al
cmpl $-0x1, %ecx
jne 0x15dd3
leaq 0x8(%rsp), %r14
movl $0x90, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x82b0
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x8440
movl 0x18(%r14), %ecx
andl $0xf000, %ecx # imm = 0xF000
xorl $0x4000, %ecx # imm = 0x4000
orl %eax, %ecx
sete %al
addq $0x98, %rsp
popq %rbx
popq %r14
retq
|
_ZNK7testing8internal8FilePath12CreateFolderEv:
push r14
push rbx
sub rsp, 98h
mov rbx, rdi
mov rdi, [rdi]
mov esi, 1FFh
call _mkdir
mov ecx, eax
mov al, 1
cmp ecx, 0FFFFFFFFh
jnz short loc_15DD3
lea r14, [rsp+0A8h+var_A0]
mov edx, 90h
mov rdi, r14
xor esi, esi
call _memset
mov rdi, [rbx]
mov rsi, r14
call _stat
mov ecx, [r14+18h]
and ecx, 0F000h
xor ecx, 4000h
or ecx, eax
setz al
loc_15DD3:
add rsp, 98h
pop rbx
pop r14
retn
|
bool testing::internal::FilePath::CreateFolder(testing::internal::FilePath *this)
{
int v1; // ecx
bool result; // al
int v3; // eax
_BYTE v4[24]; // [rsp+8h] [rbp-A0h] BYREF
__int16 v5; // [rsp+20h] [rbp-88h]
v1 = mkdir(*(_QWORD *)this, 511LL);
result = 1;
if ( v1 == -1 )
{
memset(v4, 0LL, 144LL);
v3 = stat(*(_QWORD *)this, v4);
return (v3 | v5 & 0xF000 ^ 0x4000) == 0;
}
return result;
}
|
CreateFolder:
PUSH R14
PUSH RBX
SUB RSP,0x98
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
MOV ESI,0x1ff
CALL 0x00108210
MOV ECX,EAX
MOV AL,0x1
CMP ECX,-0x1
JNZ 0x00115dd3
LEA R14,[RSP + 0x8]
MOV EDX,0x90
MOV RDI,R14
XOR ESI,ESI
CALL 0x001082b0
MOV RDI,qword ptr [RBX]
MOV RSI,R14
CALL 0x00108440
MOV ECX,dword ptr [R14 + 0x18]
AND ECX,0xf000
XOR ECX,0x4000
OR ECX,EAX
SETZ AL
LAB_00115dd3:
ADD RSP,0x98
POP RBX
POP R14
RET
|
/* testing::internal::FilePath::CreateFolder() const */
int8 __thiscall testing::internal::FilePath::CreateFolder(FilePath *this)
{
int iVar1;
int4 extraout_var;
int8 uVar2;
int4 extraout_var_00;
stat local_a0;
iVar1 = mkdir(*(char **)this,0x1ff);
uVar2 = CONCAT71((int7)(CONCAT44(extraout_var,iVar1) >> 8),1);
if (iVar1 == -1) {
memset(&local_a0,0,0x90);
iVar1 = stat(*(char **)this,&local_a0);
uVar2 = CONCAT71((int7)(CONCAT44(extraout_var_00,iVar1) >> 8),
(local_a0.st_mode & 0xf000) == 0x4000 && iVar1 == 0);
}
return uVar2;
}
|
|
10,522 |
my_filename
|
eloqsql/mysys/my_div.c
|
char * my_filename(File fd)
{
DBUG_ENTER("my_filename");
if ((uint) fd >= (uint) my_file_limit || !my_file_info[fd].name)
DBUG_RETURN((char*) "UNKNOWN");
if (fd >= 0 && my_file_info[fd].type != UNOPEN)
{
DBUG_RETURN(my_file_info[fd].name);
}
else
DBUG_RETURN((char*) "UNOPENED"); /* Debug message */
}
|
O3
|
c
|
my_filename:
pushq %rbp
movq %rsp, %rbp
leaq 0x2c29bd(%rip), %rcx # 0x2f3280
leaq 0x3050c(%rip), %rax # 0x60dd6
cmpl %edi, (%rcx)
jbe 0x308ff
leaq 0x2c29b3(%rip), %rcx # 0x2f3288
movq (%rcx), %rcx
movslq %edi, %rdx
shlq $0x4, %rdx
movq (%rcx,%rdx), %rsi
testq %rsi, %rsi
je 0x308ff
testl %edi, %edi
js 0x308f8
addq %rdx, %rcx
cmpl $0x0, 0x8(%rcx)
movq %rsi, %rax
jne 0x308ff
leaq 0x304df(%rip), %rax # 0x60dde
popq %rbp
retq
nopl (%rax)
|
my_filename:
push rbp
mov rbp, rsp
lea rcx, my_file_limit
lea rax, aUnknown_0; "UNKNOWN"
cmp [rcx], edi
jbe short loc_308FF
lea rcx, my_file_info
mov rcx, [rcx]
movsxd rdx, edi
shl rdx, 4
mov rsi, [rcx+rdx]
test rsi, rsi
jz short loc_308FF
test edi, edi
js short loc_308F8
add rcx, rdx
cmp dword ptr [rcx+8], 0
mov rax, rsi
jnz short loc_308FF
loc_308F8:
lea rax, aUnopened; "UNOPENED"
loc_308FF:
pop rbp
retn
|
const char * my_filename(int a1)
{
const char *result; // rax
long long v2; // rdx
result = "UNKNOWN";
if ( my_file_limit > (unsigned int)a1 )
{
v2 = 16LL * a1;
if ( *(_QWORD *)((char *)my_file_info + v2) )
{
if ( a1 < 0 )
return "UNOPENED";
result = (const char *)*((_QWORD *)my_file_info + 2 * a1);
if ( !*(_DWORD *)((char *)my_file_info + v2 + 8) )
return "UNOPENED";
}
}
return result;
}
|
my_filename:
PUSH RBP
MOV RBP,RSP
LEA RCX,[0x3f3280]
LEA RAX,[0x160dd6]
CMP dword ptr [RCX],EDI
JBE 0x001308ff
LEA RCX,[0x3f3288]
MOV RCX,qword ptr [RCX]
MOVSXD RDX,EDI
SHL RDX,0x4
MOV RSI,qword ptr [RCX + RDX*0x1]
TEST RSI,RSI
JZ 0x001308ff
TEST EDI,EDI
JS 0x001308f8
ADD RCX,RDX
CMP dword ptr [RCX + 0x8],0x0
MOV RAX,RSI
JNZ 0x001308ff
LAB_001308f8:
LEA RAX,[0x160dde]
LAB_001308ff:
POP RBP
RET
|
char * my_filename(uint param_1)
{
char *pcVar1;
pcVar1 = "UNKNOWN";
if (param_1 < my_file_limit) {
if ((*(char **)(my_file_info + (long)(int)param_1 * 0x10) != (char *)0x0) &&
(((int)param_1 < 0 ||
(pcVar1 = *(char **)(my_file_info + (long)(int)param_1 * 0x10),
*(int *)(my_file_info + (long)(int)param_1 * 0x10 + 8) == 0)))) {
pcVar1 = "UNOPENED";
}
}
return pcVar1;
}
|
|
10,523 |
my_parse_charset_xml
|
eloqsql/strings/ctype.c
|
my_bool
my_parse_charset_xml(MY_CHARSET_LOADER *loader, const char *buf, size_t len)
{
MY_XML_PARSER p;
struct my_cs_file_info info;
my_bool rc;
my_charset_file_init(&info);
my_xml_parser_create(&p);
my_xml_set_enter_handler(&p,cs_enter);
my_xml_set_value_handler(&p,cs_value);
my_xml_set_leave_handler(&p,cs_leave);
info.loader= loader;
my_xml_set_user_data(&p, (void *) &info);
rc= (my_xml_parse(&p,buf,len) == MY_XML_OK) ? FALSE : TRUE;
my_xml_parser_free(&p);
my_charset_file_free(&info);
if (rc != MY_XML_OK)
{
const char *errstr= my_xml_error_string(&p);
if (sizeof(loader->error) > 32 + strlen(errstr))
{
/* We cannot use my_snprintf() here. See previous comment. */
sprintf(loader->error, "at line %d pos %d: %s",
my_xml_error_lineno(&p)+1,
(int) my_xml_error_pos(&p),
my_xml_error_string(&p));
}
}
return rc;
}
|
O3
|
c
|
my_parse_charset_xml:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x928, %rsp # imm = 0x928
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq -0x260(%rbp), %r15
movl $0xc8, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x25180
xorps %xmm0, %xmm0
movups %xmm0, -0x58(%r15)
movups %xmm0, -0x4f(%r15)
leaq -0x190(%rbp), %r13
movq %r13, %rdi
callq 0x3a400
leaq 0x10e(%rip), %rsi # 0x34df1
movq %r13, %rdi
callq 0x3a475
leaq 0x1ec(%rip), %rsi # 0x34ede
movq %r13, %rdi
callq 0x3a468
leaq 0x9e5(%rip), %rsi # 0x356e6
movq %r13, %rdi
callq 0x3a482
movq %rbx, -0x948(%rbp)
movq %rbx, 0xc8(%r15)
leaq -0x940(%rbp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3a48f
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x39960
movl %eax, %r14d
movq %r13, %rdi
callq 0x3a43c
movq -0x58(%r15), %rdi
movq 0x7a8(%rbx), %rax
callq *0x98(%rax)
testl %r14d, %r14d
je 0x34dc5
leaq -0x190(%rbp), %rdi
callq 0x3a49c
movq %rax, %rdi
callq 0x25120
addq $0x20, %rax
cmpq $0x7f, %rax
ja 0x34dc5
leaq -0x190(%rbp), %rbx
movq %rbx, %rdi
callq 0x3a4d9
leal 0x1(%rax), %r15d
movq %rbx, %rdi
callq 0x3a4a6
movq %rax, %r12
movq %rbx, %rdi
callq 0x3a49c
movq %rax, (%rsp)
leaq 0x2972d(%rip), %rcx # 0x5e4d4
movl $0x80, %edx
movq -0x948(%rbp), %rdi
movl $0x1, %esi
movl %r15d, %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0x251c0
testl %r14d, %r14d
setne %al
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x34dec
addq $0x928, %rsp # imm = 0x928
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x25320
|
my_parse_charset_xml:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 928h
mov r14, rdx
mov r12, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea r15, [rbp+var_260]
mov edx, 0C8h
mov rdi, r15
xor esi, esi
call _memset
xorps xmm0, xmm0
movups xmmword ptr [r15-58h], xmm0
movups xmmword ptr [r15-4Fh], xmm0
lea r13, [rbp+var_190]
mov rdi, r13
call my_xml_parser_create
lea rsi, cs_enter
mov rdi, r13
call my_xml_set_enter_handler
lea rsi, cs_value
mov rdi, r13
call my_xml_set_value_handler
lea rsi, cs_leave
mov rdi, r13
call my_xml_set_leave_handler
mov [rbp+var_948], rbx
mov [r15+0C8h], rbx
lea rbx, [rbp+var_940]
mov rdi, r13
mov rsi, rbx
call my_xml_set_user_data
mov rdi, r13
mov rsi, r12
mov rdx, r14
call my_xml_parse
mov r14d, eax
mov rdi, r13
call my_xml_parser_free
mov rdi, [r15-58h]
mov rax, [rbx+7A8h]
call qword ptr [rax+98h]
test r14d, r14d
jz short loc_34DC5
lea rdi, [rbp+var_190]
call my_xml_error_string
mov rdi, rax
call _strlen
add rax, 20h ; ' '
cmp rax, 7Fh
ja short loc_34DC5
lea rbx, [rbp+var_190]
mov rdi, rbx
call my_xml_error_lineno
lea r15d, [rax+1]
mov rdi, rbx
call my_xml_error_pos
mov r12, rax
mov rdi, rbx
call my_xml_error_string
mov [rsp+950h+var_950], rax
lea rcx, aAtLineDPosDS; "at line %d pos %d: %s"
mov edx, 80h
mov rdi, [rbp+var_948]
mov esi, 1
mov r8d, r15d
mov r9d, r12d
xor eax, eax
call ___sprintf_chk
loc_34DC5:
test r14d, r14d
setnz al
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_34DEC
add rsp, 928h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_34DEC:
call ___stack_chk_fail
|
bool my_parse_charset_xml(long long a1, long long a2, long long a3)
{
int v4; // r14d
long long v5; // rax
int v6; // r15d
int v7; // r12d
const char *v8; // rax
_QWORD v10[220]; // [rsp+10h] [rbp-940h] BYREF
_BYTE v11[200]; // [rsp+6F0h] [rbp-260h] BYREF
long long v12; // [rsp+7B8h] [rbp-198h]
_BYTE v13[352]; // [rsp+7C0h] [rbp-190h] BYREF
unsigned long long v14; // [rsp+920h] [rbp-30h]
v14 = __readfsqword(0x28u);
memset(v11, 0LL, sizeof(v11));
memset(&v10[209], 0, 25);
my_xml_parser_create(v13);
my_xml_set_enter_handler(v13, cs_enter);
my_xml_set_value_handler(v13, cs_value);
my_xml_set_leave_handler(v13, cs_leave);
v12 = a1;
my_xml_set_user_data(v13, v10);
v4 = my_xml_parse(v13, a2, a3);
my_xml_parser_free(v13);
(*(void ( **)(_QWORD))(v12 + 152))(v10[209]);
if ( v4 )
{
v5 = my_xml_error_string(v13);
if ( (unsigned long long)(strlen(v5) + 32) <= 0x7F )
{
v6 = my_xml_error_lineno(v13) + 1;
v7 = my_xml_error_pos(v13);
v8 = (const char *)my_xml_error_string(v13);
__sprintf_chk(a1, 1LL, 128LL, "at line %d pos %d: %s", v6, v7, v8);
}
}
return v4 != 0;
}
|
my_parse_charset_xml:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x928
MOV R14,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA R15,[RBP + -0x260]
MOV EDX,0xc8
MOV RDI,R15
XOR ESI,ESI
CALL 0x00125180
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + -0x58],XMM0
MOVUPS xmmword ptr [R15 + -0x4f],XMM0
LEA R13,[RBP + -0x190]
MOV RDI,R13
CALL 0x0013a400
LEA RSI,[0x134df1]
MOV RDI,R13
CALL 0x0013a475
LEA RSI,[0x134ede]
MOV RDI,R13
CALL 0x0013a468
LEA RSI,[0x1356e6]
MOV RDI,R13
CALL 0x0013a482
MOV qword ptr [RBP + -0x948],RBX
MOV qword ptr [R15 + 0xc8],RBX
LEA RBX,[RBP + -0x940]
MOV RDI,R13
MOV RSI,RBX
CALL 0x0013a48f
MOV RDI,R13
MOV RSI,R12
MOV RDX,R14
CALL 0x00139960
MOV R14D,EAX
MOV RDI,R13
CALL 0x0013a43c
MOV RDI,qword ptr [R15 + -0x58]
MOV RAX,qword ptr [RBX + 0x7a8]
CALL qword ptr [RAX + 0x98]
TEST R14D,R14D
JZ 0x00134dc5
LEA RDI,[RBP + -0x190]
CALL 0x0013a49c
MOV RDI,RAX
CALL 0x00125120
ADD RAX,0x20
CMP RAX,0x7f
JA 0x00134dc5
LEA RBX,[RBP + -0x190]
MOV RDI,RBX
CALL 0x0013a4d9
LEA R15D,[RAX + 0x1]
MOV RDI,RBX
CALL 0x0013a4a6
MOV R12,RAX
MOV RDI,RBX
CALL 0x0013a49c
MOV qword ptr [RSP],RAX
LEA RCX,[0x15e4d4]
MOV EDX,0x80
MOV RDI,qword ptr [RBP + -0x948]
MOV ESI,0x1
MOV R8D,R15D
MOV R9D,R12D
XOR EAX,EAX
CALL 0x001251c0
LAB_00134dc5:
TEST R14D,R14D
SETNZ AL
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00134dec
ADD RSP,0x928
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00134dec:
CALL 0x00125320
|
bool my_parse_charset_xml(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
int iVar2;
int4 uVar3;
char *__s;
size_t sVar4;
int8 uVar5;
long in_FS_OFFSET;
int1 local_948 [1672];
int8 local_2c0;
int1 uStack_2b8;
int7 uStack_2b7;
int1 uStack_2b0;
int8 uStack_2af;
int1 local_268 [200];
long local_1a0;
int1 local_198 [352];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
memset(local_268,0,200);
local_2c0 = 0;
uStack_2b8 = 0;
uStack_2b7 = 0;
uStack_2b0 = 0;
uStack_2af = 0;
my_xml_parser_create(local_198);
my_xml_set_enter_handler(local_198,cs_enter);
my_xml_set_value_handler(local_198,cs_value);
my_xml_set_leave_handler(local_198,cs_leave);
local_1a0 = param_1;
my_xml_set_user_data(local_198,local_948);
iVar1 = my_xml_parse(local_198,param_2,param_3);
my_xml_parser_free(local_198);
(**(code **)(local_1a0 + 0x98))(local_2c0);
if (iVar1 != 0) {
__s = (char *)my_xml_error_string(local_198);
sVar4 = strlen(__s);
if (sVar4 + 0x20 < 0x80) {
iVar2 = my_xml_error_lineno(local_198);
uVar3 = my_xml_error_pos(local_198);
uVar5 = my_xml_error_string(local_198);
__sprintf_chk(param_1,1,0x80,"at line %d pos %d: %s",iVar2 + 1,uVar3,uVar5);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return iVar1 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
10,524 |
common_log::set_file(char const*)
|
monkey531[P]llama/common/log.cpp
|
void set_file(const char * path) {
pause();
if (file) {
fclose(file);
}
if (path) {
file = fopen(path, "w");
} else {
file = nullptr;
}
resume();
}
|
O1
|
cpp
|
common_log::set_file(char const*):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x801e2
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x805f1
callq 0x18680
testq %r14, %r14
je 0x80607
leaq 0x2bb46(%rip), %rsi # 0xac143
movq %r14, %rdi
callq 0x187c0
jmp 0x80609
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8026a
|
_ZN10common_log8set_fileEPKc:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _ZN10common_log5pauseEv; common_log::pause(void)
mov rdi, [rbx+60h]
test rdi, rdi
jz short loc_805F1
call _fclose
loc_805F1:
test r14, r14
jz short loc_80607
lea rsi, aW; "w"
mov rdi, r14
call _fopen
jmp short loc_80609
loc_80607:
xor eax, eax
loc_80609:
mov [rbx+60h], rax
mov rdi, rbx; this
add rsp, 8
pop rbx
pop r14
jmp _ZN10common_log6resumeEv; common_log::resume(void)
|
long long common_log::set_file(common_log *this, const char *a2)
{
long long v3; // rdi
long long v4; // rax
common_log::pause(this);
v3 = *((_QWORD *)this + 12);
if ( v3 )
fclose(v3);
if ( a2 )
v4 = fopen(a2, "w");
else
v4 = 0LL;
*((_QWORD *)this + 12) = v4;
return common_log::resume(this);
}
|
set_file:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x001801e2
MOV RDI,qword ptr [RBX + 0x60]
TEST RDI,RDI
JZ 0x001805f1
CALL 0x00118680
LAB_001805f1:
TEST R14,R14
JZ 0x00180607
LEA RSI,[0x1ac143]
MOV RDI,R14
CALL 0x001187c0
JMP 0x00180609
LAB_00180607:
XOR EAX,EAX
LAB_00180609:
MOV qword ptr [RBX + 0x60],RAX
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0018026a
|
/* common_log::set_file(char const*) */
void __thiscall common_log::set_file(common_log *this,char *param_1)
{
FILE *pFVar1;
pause(this);
if (*(FILE **)(this + 0x60) != (FILE *)0x0) {
fclose(*(FILE **)(this + 0x60));
}
if (param_1 == (char *)0x0) {
pFVar1 = (FILE *)0x0;
}
else {
pFVar1 = fopen(param_1,"w");
}
*(FILE **)(this + 0x60) = pFVar1;
resume(this);
return;
}
|
|
10,525 |
common_log::set_file(char const*)
|
monkey531[P]llama/common/log.cpp
|
void set_file(const char * path) {
pause();
if (file) {
fclose(file);
}
if (path) {
file = fopen(path, "w");
} else {
file = nullptr;
}
resume();
}
|
O3
|
cpp
|
common_log::set_file(char const*):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x7ef50
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x7f361
callq 0x18680
testq %r14, %r14
je 0x7f377
leaq 0x29dc6(%rip), %rsi # 0xa9133
movq %r14, %rdi
callq 0x187c0
jmp 0x7f379
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7efd8
|
_ZN10common_log8set_fileEPKc:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _ZN10common_log5pauseEv; common_log::pause(void)
mov rdi, [rbx+60h]
test rdi, rdi
jz short loc_7F361
call _fclose
loc_7F361:
test r14, r14
jz short loc_7F377
lea rsi, aW; "w"
mov rdi, r14
call _fopen
jmp short loc_7F379
loc_7F377:
xor eax, eax
loc_7F379:
mov [rbx+60h], rax
mov rdi, rbx; this
add rsp, 8
pop rbx
pop r14
jmp _ZN10common_log6resumeEv; common_log::resume(void)
|
long long common_log::set_file(common_log *this, const char *a2)
{
long long v3; // rdi
long long v4; // rax
common_log::pause(this);
v3 = *((_QWORD *)this + 12);
if ( v3 )
fclose(v3);
if ( a2 )
v4 = fopen(a2, "w");
else
v4 = 0LL;
*((_QWORD *)this + 12) = v4;
return common_log::resume(this);
}
|
set_file:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x0017ef50
MOV RDI,qword ptr [RBX + 0x60]
TEST RDI,RDI
JZ 0x0017f361
CALL 0x00118680
LAB_0017f361:
TEST R14,R14
JZ 0x0017f377
LEA RSI,[0x1a9133]
MOV RDI,R14
CALL 0x001187c0
JMP 0x0017f379
LAB_0017f377:
XOR EAX,EAX
LAB_0017f379:
MOV qword ptr [RBX + 0x60],RAX
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0017efd8
|
/* common_log::set_file(char const*) */
void __thiscall common_log::set_file(common_log *this,char *param_1)
{
FILE *pFVar1;
pause(this);
if (*(FILE **)(this + 0x60) != (FILE *)0x0) {
fclose(*(FILE **)(this + 0x60));
}
if (param_1 == (char *)0x0) {
pFVar1 = (FILE *)0x0;
}
else {
pFVar1 = fopen(param_1,"w");
}
*(FILE **)(this + 0x60) = pFVar1;
resume(this);
return;
}
|
|
10,526 |
serial_cpp::MillisecondTimer::timespec_now()
|
ami-iit[P]serial_cpp/src/impl/unix.cc
|
timespec
MillisecondTimer::timespec_now ()
{
timespec time;
# ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
clock_serv_t cclock;
mach_timespec_t mts;
host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock);
clock_get_time(cclock, &mts);
mach_port_deallocate(mach_task_self(), cclock);
time.tv_sec = mts.tv_sec;
time.tv_nsec = mts.tv_nsec;
# else
clock_gettime(CLOCK_MONOTONIC, &time);
# endif
return time;
}
|
O1
|
cpp
|
serial_cpp::MillisecondTimer::timespec_now():
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rbx
movl $0x1, %edi
movq %rbx, %rsi
callq 0x3260
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
addq $0x10, %rsp
popq %rbx
retq
|
_ZN10serial_cpp16MillisecondTimer12timespec_nowEv:
push rbx
sub rsp, 10h
mov rbx, rsp
mov edi, 1
mov rsi, rbx
call _clock_gettime
mov rax, [rbx]
mov rdx, [rbx+8]
add rsp, 10h
pop rbx
retn
|
long long serial_cpp::MillisecondTimer::timespec_now(serial_cpp::MillisecondTimer *this)
{
long long v2; // [rsp+0h] [rbp-18h] BYREF
clock_gettime(1LL, &v2);
return v2;
}
|
timespec_now:
PUSH RBX
SUB RSP,0x10
MOV RBX,RSP
MOV EDI,0x1
MOV RSI,RBX
CALL 0x00103260
MOV RAX,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
ADD RSP,0x10
POP RBX
RET
|
/* serial_cpp::MillisecondTimer::timespec_now() */
timespec serial_cpp::MillisecondTimer::timespec_now(void)
{
timespec local_18;
clock_gettime(1,&local_18);
return local_18;
}
|
|
10,527 |
serial_cpp::MillisecondTimer::timespec_now()
|
ami-iit[P]serial_cpp/src/impl/unix.cc
|
timespec
MillisecondTimer::timespec_now ()
{
timespec time;
# ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
clock_serv_t cclock;
mach_timespec_t mts;
host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock);
clock_get_time(cclock, &mts);
mach_port_deallocate(mach_task_self(), cclock);
time.tv_sec = mts.tv_sec;
time.tv_nsec = mts.tv_nsec;
# else
clock_gettime(CLOCK_MONOTONIC, &time);
# endif
return time;
}
|
O2
|
cpp
|
serial_cpp::MillisecondTimer::timespec_now():
pushq %rbx
subq $0x10, %rsp
pushq $0x1
popq %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x3280
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
addq $0x10, %rsp
popq %rbx
retq
|
_ZN10serial_cpp16MillisecondTimer12timespec_nowEv:
push rbx
sub rsp, 10h
push 1
pop rdi
mov rbx, rsp
mov rsi, rbx
call _clock_gettime
mov rax, [rbx]
mov rdx, [rbx+8]
add rsp, 10h
pop rbx
retn
|
long long serial_cpp::MillisecondTimer::timespec_now(serial_cpp::MillisecondTimer *this)
{
long long v2; // [rsp+0h] [rbp-18h] BYREF
clock_gettime(1LL, &v2);
return v2;
}
|
timespec_now:
PUSH RBX
SUB RSP,0x10
PUSH 0x1
POP RDI
MOV RBX,RSP
MOV RSI,RBX
CALL 0x00103280
MOV RAX,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
ADD RSP,0x10
POP RBX
RET
|
/* serial_cpp::MillisecondTimer::timespec_now() */
timespec serial_cpp::MillisecondTimer::timespec_now(void)
{
timespec local_18;
clock_gettime(1,&local_18);
return local_18;
}
|
|
10,528 |
serial_cpp::MillisecondTimer::timespec_now()
|
ami-iit[P]serial_cpp/src/impl/unix.cc
|
timespec
MillisecondTimer::timespec_now ()
{
timespec time;
# ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
clock_serv_t cclock;
mach_timespec_t mts;
host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock);
clock_get_time(cclock, &mts);
mach_port_deallocate(mach_task_self(), cclock);
time.tv_sec = mts.tv_sec;
time.tv_nsec = mts.tv_nsec;
# else
clock_gettime(CLOCK_MONOTONIC, &time);
# endif
return time;
}
|
O3
|
cpp
|
serial_cpp::MillisecondTimer::timespec_now():
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rbx
movl $0x1, %edi
movq %rbx, %rsi
callq 0x3260
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
addq $0x10, %rsp
popq %rbx
retq
|
_ZN10serial_cpp16MillisecondTimer12timespec_nowEv:
push rbx
sub rsp, 10h
mov rbx, rsp
mov edi, 1
mov rsi, rbx
call _clock_gettime
mov rax, [rbx]
mov rdx, [rbx+8]
add rsp, 10h
pop rbx
retn
|
long long serial_cpp::MillisecondTimer::timespec_now(serial_cpp::MillisecondTimer *this)
{
long long v2; // [rsp+0h] [rbp-18h] BYREF
clock_gettime(1LL, &v2);
return v2;
}
|
timespec_now:
PUSH RBX
SUB RSP,0x10
MOV RBX,RSP
MOV EDI,0x1
MOV RSI,RBX
CALL 0x00103260
MOV RAX,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
ADD RSP,0x10
POP RBX
RET
|
/* serial_cpp::MillisecondTimer::timespec_now() */
timespec serial_cpp::MillisecondTimer::timespec_now(void)
{
timespec local_18;
clock_gettime(1,&local_18);
return local_18;
}
|
|
10,529 |
js_object_create
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_object_create(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue proto, props;
JSValue obj;
proto = argv[0];
if (!JS_IsObject(proto) && !JS_IsNull(proto))
return JS_ThrowTypeError(ctx, "object prototype may only be an Object or null");
obj = JS_NewObjectProto(ctx, proto);
if (JS_IsException(obj))
return JS_EXCEPTION;
props = argv[1];
if (!JS_IsUndefined(props)) {
if (JS_ObjectDefineProperties(ctx, obj, props)) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
}
return obj;
}
|
O1
|
c
|
js_object_create:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rdi, %r14
movq 0x8(%r8), %rdx
cmpl $-0x1, %edx
je 0x6f236
cmpl $0x2, %edx
jne 0x6f28f
movq (%r12), %rsi
movq %r14, %rdi
movl $0x1, %ecx
callq 0x202f1
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x6f283
movq %rax, %r15
movq 0x18(%r12), %r8
cmpl $0x3, %r8d
je 0x6f2ac
movq 0x10(%r12), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x704dd
testl %eax, %eax
je 0x6f2ac
movq 0x18(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1ccb2
xorl %r15d, %r15d
xorl %eax, %eax
movl $0x6, %ebx
jmp 0x6f2bf
leaq 0x31022(%rip), %rsi # 0xa02b8
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x21953
movl $0x6, %ebx
xorl %eax, %eax
jmp 0x6f2bf
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
movq %r15, %rax
andq %rcx, %rax
movl %r15d, %r15d
orq %rax, %r15
movq %r15, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
js_object_create:
push r15
push r14
push r12
push rbx
push rax
mov r12, r8
mov r14, rdi
mov rdx, [r8+8]
cmp edx, 0FFFFFFFFh
jz short loc_6F236
cmp edx, 2
jnz short loc_6F28F
loc_6F236:
mov rsi, [r12]
mov rdi, r14
mov ecx, 1
call JS_NewObjectProtoClass
mov rbx, rdx
cmp ebx, 6
jz short loc_6F283
mov r15, rax
mov r8, [r12+18h]
cmp r8d, 3
jz short loc_6F2AC
mov rcx, [r12+10h]
mov rdi, r14
mov rsi, r15
mov rdx, rbx
call JS_ObjectDefineProperties
test eax, eax
jz short loc_6F2AC
mov rdi, [r14+18h]
mov rsi, r15
mov rdx, rbx
call JS_FreeValueRT
loc_6F283:
xor r15d, r15d
xor eax, eax
mov ebx, 6
jmp short loc_6F2BF
loc_6F28F:
lea rsi, aObjectPrototyp; "object prototype may only be an Object "...
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
mov ebx, 6
xor eax, eax
jmp short loc_6F2BF
loc_6F2AC:
mov rcx, 0FFFFFFFF00000000h
mov rax, r15
and rax, rcx
mov r15d, r15d
loc_6F2BF:
or r15, rax
mov rax, r15
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
unsigned long long js_object_create(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13,
long long a14)
{
char v14; // al
long long v16; // rdx
long long v17; // rax
long long v18; // rdx
long long v19; // rbx
long long v20; // r15
unsigned long long v21; // rax
v16 = a13[1];
if ( (_DWORD)v16 == -1 || (_DWORD)v16 == 2 )
{
v17 = JS_NewObjectProtoClass(a1, *a13, v16, 1u);
v19 = v18;
if ( (_DWORD)v18 != 6 )
{
v20 = v17;
if ( (unsigned int)a13[3] == 3 || !(unsigned int)JS_ObjectDefineProperties(a1, v17, v18, a13[2]) )
{
v21 = v20 & 0xFFFFFFFF00000000LL;
v20 = (unsigned int)v20;
return v21 | v20;
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v20, v19);
}
v20 = 0LL;
v21 = 0LL;
}
else
{
v20 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"object prototype may only be an Object or null",
v16,
a12,
(long long)a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v14);
v21 = 0LL;
}
return v21 | v20;
}
|
js_object_create:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,R8
MOV R14,RDI
MOV RDX,qword ptr [R8 + 0x8]
CMP EDX,-0x1
JZ 0x0016f236
CMP EDX,0x2
JNZ 0x0016f28f
LAB_0016f236:
MOV RSI,qword ptr [R12]
MOV RDI,R14
MOV ECX,0x1
CALL 0x001202f1
MOV RBX,RDX
CMP EBX,0x6
JZ 0x0016f283
MOV R15,RAX
MOV R8,qword ptr [R12 + 0x18]
CMP R8D,0x3
JZ 0x0016f2ac
MOV RCX,qword ptr [R12 + 0x10]
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x001704dd
TEST EAX,EAX
JZ 0x0016f2ac
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R15
MOV RDX,RBX
CALL 0x0011ccb2
LAB_0016f283:
XOR R15D,R15D
XOR EAX,EAX
MOV EBX,0x6
JMP 0x0016f2bf
LAB_0016f28f:
LEA RSI,[0x1a02b8]
XOR R15D,R15D
MOV RDI,R14
XOR EAX,EAX
CALL 0x00121953
MOV EBX,0x6
XOR EAX,EAX
JMP 0x0016f2bf
LAB_0016f2ac:
MOV RCX,-0x100000000
MOV RAX,R15
AND RAX,RCX
MOV R15D,R15D
LAB_0016f2bf:
OR R15,RAX
MOV RAX,R15
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16] js_object_create(long param_1)
{
int iVar1;
ulong uVar2;
int8 uVar3;
int8 *in_R8;
ulong uVar4;
int1 auVar5 [16];
iVar1 = (int)in_R8[1];
if ((iVar1 != -1) && (iVar1 != 2)) {
uVar4 = 0;
JS_ThrowTypeError(param_1,"object prototype may only be an Object or null");
uVar3 = 6;
uVar2 = 0;
goto LAB_0016f2bf;
}
auVar5 = JS_NewObjectProtoClass(param_1,*in_R8,in_R8[1],1);
uVar3 = auVar5._8_8_;
uVar4 = auVar5._0_8_;
if (auVar5._8_4_ == 6) {
LAB_0016f283:
uVar4 = 0;
uVar2 = 0;
uVar3 = 6;
}
else {
if ((int)in_R8[3] != 3) {
iVar1 = JS_ObjectDefineProperties(param_1,uVar4,uVar3,in_R8[2]);
if (iVar1 != 0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,uVar3);
goto LAB_0016f283;
}
}
uVar2 = uVar4 & 0xffffffff00000000;
uVar4 = uVar4 & 0xffffffff;
}
LAB_0016f2bf:
auVar5._8_8_ = uVar3;
auVar5._0_8_ = uVar4 | uVar2;
return auVar5;
}
|
|
10,530 |
wqueue_release_queue
|
eloqsql/mysys/wqueue.c
|
void wqueue_release_queue(WQUEUE *wqueue)
{
struct st_my_thread_var *last= wqueue->last_thread;
struct st_my_thread_var *next= last->next;
struct st_my_thread_var *thread;
do
{
thread= next;
mysql_cond_signal(&thread->suspend);
next= thread->next;
thread->next= NULL;
}
while (thread != last);
wqueue->last_thread= NULL;
}
|
O0
|
c
|
wqueue_release_queue:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x1005b0
movq -0x20(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x88(%rax)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x100556
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
wqueue_release_queue:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax+88h]
mov [rbp+var_18], rax
loc_100556:
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
add rdi, 8
call inline_mysql_cond_signal_5
mov rax, [rbp+var_20]
mov rax, [rax+88h]
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
mov qword ptr [rax+88h], 0
mov rax, [rbp+var_20]
cmp rax, [rbp+var_10]
jnz short loc_100556
mov rax, [rbp+var_8]
mov qword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
long long * wqueue_release_queue(long long *a1)
{
long long *result; // rax
long long v2; // [rsp+0h] [rbp-20h]
long long v3; // [rsp+8h] [rbp-18h]
long long v4; // [rsp+10h] [rbp-10h]
v4 = *a1;
v3 = *(_QWORD *)(*a1 + 136);
do
{
v2 = v3;
inline_mysql_cond_signal_5(v3 + 8);
v3 = *(_QWORD *)(v3 + 136);
*(_QWORD *)(v2 + 136) = 0LL;
}
while ( v2 != v4 );
result = a1;
*a1 = 0LL;
return result;
}
| |||
10,531 |
wqueue_release_queue
|
eloqsql/mysys/wqueue.c
|
void wqueue_release_queue(WQUEUE *wqueue)
{
struct st_my_thread_var *last= wqueue->last_thread;
struct st_my_thread_var *next= last->next;
struct st_my_thread_var *thread;
do
{
thread= next;
mysql_cond_signal(&thread->suspend);
next= thread->next;
thread->next= NULL;
}
while (thread != last);
wqueue->last_thread= NULL;
}
|
O3
|
c
|
wqueue_release_queue:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x88(%r14), %r12
leaq 0x2df01e(%rip), %r15 # 0x386010
movq 0x38(%r12), %rdi
testq %rdi, %rdi
jne 0xa7024
leaq 0x8(%r12), %rdi
callq 0x295d0
movq 0x88(%r12), %rax
movq $0x0, 0x88(%r12)
cmpq %r14, %r12
movq %rax, %r12
jne 0xa6ff2
jmp 0xa702f
movq (%r15), %rax
callq *0x170(%rax)
jmp 0xa6ffc
movq $0x0, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
wqueue_release_queue:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
mov r14, [rdi]
mov r12, [r14+88h]
lea r15, PSI_server
loc_A6FF2:
mov rdi, [r12+38h]
test rdi, rdi
jnz short loc_A7024
loc_A6FFC:
lea rdi, [r12+8]
call _pthread_cond_signal
mov rax, [r12+88h]
mov qword ptr [r12+88h], 0
cmp r12, r14
mov r12, rax
jnz short loc_A6FF2
jmp short loc_A702F
loc_A7024:
mov rax, [r15]
call qword ptr [rax+170h]
jmp short loc_A6FFC
loc_A702F:
mov qword ptr [rbx], 0
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long wqueue_release_queue(long long *a1)
{
long long v1; // r14
long long v2; // r12
long long result; // rax
bool v4; // zf
v1 = *a1;
v2 = *(_QWORD *)(*a1 + 136);
do
{
if ( *(_QWORD *)(v2 + 56) )
PSI_server[46]();
pthread_cond_signal(v2 + 8);
result = *(_QWORD *)(v2 + 136);
*(_QWORD *)(v2 + 136) = 0LL;
v4 = v2 == v1;
v2 = result;
}
while ( !v4 );
*a1 = 0LL;
return result;
}
|
wqueue_release_queue:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
MOV R14,qword ptr [RDI]
MOV R12,qword ptr [R14 + 0x88]
LEA R15,[0x486010]
LAB_001a6ff2:
MOV RDI,qword ptr [R12 + 0x38]
TEST RDI,RDI
JNZ 0x001a7024
LAB_001a6ffc:
LEA RDI,[R12 + 0x8]
CALL 0x001295d0
MOV RAX,qword ptr [R12 + 0x88]
MOV qword ptr [R12 + 0x88],0x0
CMP R12,R14
MOV R12,RAX
JNZ 0x001a6ff2
JMP 0x001a702f
LAB_001a7024:
MOV RAX,qword ptr [R15]
CALL qword ptr [RAX + 0x170]
JMP 0x001a6ffc
LAB_001a702f:
MOV qword ptr [RBX],0x0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void wqueue_release_queue(long *param_1)
{
long lVar1;
long lVar2;
long lVar3;
bool bVar4;
lVar1 = *param_1;
lVar3 = *(long *)(lVar1 + 0x88);
do {
if (*(long *)(lVar3 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar3 + 8));
lVar2 = *(long *)(lVar3 + 0x88);
*(int8 *)(lVar3 + 0x88) = 0;
bVar4 = lVar3 != lVar1;
lVar3 = lVar2;
} while (bVar4);
*param_1 = 0;
return;
}
|
|
10,532 |
JS_NewCModule
|
bluesky950520[P]quickjs/quickjs.c
|
JSModuleDef *JS_NewCModule(JSContext *ctx, const char *name_str,
JSModuleInitFunc *func)
{
JSModuleDef *m;
JSAtom name;
name = JS_NewAtom(ctx, name_str);
if (name == JS_ATOM_NULL)
return NULL;
m = js_new_module_def(ctx, name);
m->init_func = func;
return m;
}
|
O0
|
c
|
JS_NewCModule:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x2e7b0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0x4f848
movq $0x0, 0x30(%rsp)
jmp 0x4f873
movq 0x28(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0x4f880
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x78(%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
|
JS_NewCModule:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_20], rdx
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_18]
call JS_NewAtom
mov [rsp+38h+var_2C], eax
cmp [rsp+38h+var_2C], 0
jnz short loc_4F848
mov [rsp+38h+var_8], 0
jmp short loc_4F873
loc_4F848:
mov rdi, [rsp+38h+var_10]
mov esi, [rsp+38h+var_2C]
call js_new_module_def
mov [rsp+38h+var_28], rax
mov rcx, [rsp+38h+var_20]
mov rax, [rsp+38h+var_28]
mov [rax+78h], rcx
mov rax, [rsp+38h+var_28]
mov [rsp+38h+var_8], rax
loc_4F873:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
|
long long JS_NewCModule(long long a1, unsigned __int8 *a2, long long a3)
{
unsigned int v4; // [rsp+Ch] [rbp-2Ch]
long long v5; // [rsp+10h] [rbp-28h]
v4 = JS_NewAtom(a1, a2);
if ( !v4 )
return 0LL;
v5 = js_new_module_def(a1, v4);
*(_QWORD *)(v5 + 120) = a3;
return v5;
}
|
JS_NewCModule:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x18],RDX
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x0012e7b0
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x0
JNZ 0x0014f848
MOV qword ptr [RSP + 0x30],0x0
JMP 0x0014f873
LAB_0014f848:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RSP + 0xc]
CALL 0x0014f880
MOV qword ptr [RSP + 0x10],RAX
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x78],RCX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x30],RAX
LAB_0014f873:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
long JS_NewCModule(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
int8 local_8;
iVar1 = JS_NewAtom(param_1,param_2);
if (iVar1 == 0) {
local_8 = 0;
}
else {
local_8 = js_new_module_def(param_1,iVar1);
*(int8 *)(local_8 + 0x78) = param_3;
}
return local_8;
}
|
|
10,533 |
JS_NewCModule
|
bluesky950520[P]quickjs/quickjs.c
|
JSModuleDef *JS_NewCModule(JSContext *ctx, const char *name_str,
JSModuleInitFunc *func)
{
JSModuleDef *m;
JSAtom name;
name = JS_NewAtom(ctx, name_str);
if (name == JS_ATOM_NULL)
return NULL;
m = js_new_module_def(ctx, name);
m->init_func = func;
return m;
}
|
O1
|
c
|
JS_NewCModule:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0xe270
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x23e1c
testl %eax, %eax
jne 0x348df
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movl %eax, %esi
callq 0x10214
movq %rbx, 0x78(%rax)
jmp 0x348d9
|
JS_NewCModule:
push r15
push r14
push rbx
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov rdi, rsi
call _strlen
mov rdi, r14
mov rsi, r15
mov rdx, rax
call JS_NewAtomLen
test eax, eax
jnz short loc_348DF
xor eax, eax
loc_348D9:
pop rbx
pop r14
pop r15
retn
loc_348DF:
mov rdi, r14
mov esi, eax
call js_new_module_def
mov [rax+78h], rbx
jmp short loc_348D9
|
long long JS_NewCModule(long long a1, unsigned __int8 *a2, long long a3)
{
long long v4; // rax
unsigned int v5; // eax
long long result; // rax
v4 = strlen(a2);
v5 = JS_NewAtomLen(a1, a2, v4);
if ( !v5 )
return 0LL;
result = js_new_module_def(a1, v5);
*(_QWORD *)(result + 120) = a3;
return result;
}
|
JS_NewCModule:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x0010e270
MOV RDI,R14
MOV RSI,R15
MOV RDX,RAX
CALL 0x00123e1c
TEST EAX,EAX
JNZ 0x001348df
XOR EAX,EAX
LAB_001348d9:
POP RBX
POP R14
POP R15
RET
LAB_001348df:
MOV RDI,R14
MOV ESI,EAX
CALL 0x00110214
MOV qword ptr [RAX + 0x78],RBX
JMP 0x001348d9
|
long JS_NewCModule(int8 param_1,char *param_2,int8 param_3)
{
int iVar1;
size_t sVar2;
long lVar3;
sVar2 = strlen(param_2);
iVar1 = JS_NewAtomLen(param_1,param_2,sVar2);
if (iVar1 == 0) {
lVar3 = 0;
}
else {
lVar3 = js_new_module_def(param_1,iVar1);
*(int8 *)(lVar3 + 0x78) = param_3;
}
return lVar3;
}
|
|
10,534 |
JS_NewCModule
|
bluesky950520[P]quickjs/quickjs.c
|
JSModuleDef *JS_NewCModule(JSContext *ctx, const char *name_str,
JSModuleInitFunc *func)
{
JSModuleDef *m;
JSAtom name;
name = JS_NewAtom(ctx, name_str);
if (name == JS_ATOM_NULL)
return NULL;
m = js_new_module_def(ctx, name);
m->init_func = func;
return m;
}
|
O2
|
c
|
JS_NewCModule:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
callq 0x1e021
testl %eax, %eax
je 0x2ca1e
movq %r14, %rdi
movl %eax, %esi
callq 0x2ca28
movq %rbx, 0x78(%rax)
jmp 0x2ca20
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
JS_NewCModule:
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rdi
call JS_NewAtom
test eax, eax
jz short loc_2CA1E
mov rdi, r14
mov esi, eax
call js_new_module_def
mov [rax+78h], rbx
jmp short loc_2CA20
loc_2CA1E:
xor eax, eax
loc_2CA20:
add rsp, 8
pop rbx
pop r14
retn
|
long long JS_NewCModule(long long a1, unsigned __int8 *a2, long long a3)
{
unsigned int v4; // eax
long long result; // rax
v4 = JS_NewAtom(a1, a2);
if ( !v4 )
return 0LL;
result = js_new_module_def(a1, v4);
*(_QWORD *)(result + 120) = a3;
return result;
}
|
JS_NewCModule:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RDI
CALL 0x0011e021
TEST EAX,EAX
JZ 0x0012ca1e
MOV RDI,R14
MOV ESI,EAX
CALL 0x0012ca28
MOV qword ptr [RAX + 0x78],RBX
JMP 0x0012ca20
LAB_0012ca1e:
XOR EAX,EAX
LAB_0012ca20:
ADD RSP,0x8
POP RBX
POP R14
RET
|
long JS_NewCModule(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
long lVar2;
iVar1 = JS_NewAtom();
if (iVar1 == 0) {
lVar2 = 0;
}
else {
lVar2 = js_new_module_def(param_1,iVar1);
*(int8 *)(lVar2 + 0x78) = param_3;
}
return lVar2;
}
|
|
10,535 |
allocate_node
|
7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c
|
static void allocate_node(ggml_gallocr_t galloc, struct ggml_tensor * node) {
ggml_tallocr_t alloc = node_tallocr(galloc, node);
if (node->data == NULL) {
if (ggml_is_view(node)) {
init_view(galloc, node, true);
} else {
// see if we can reuse a parent's buffer (inplace)
if (ggml_op_can_inplace(node->op)) {
for (int i = 0; i < GGML_MAX_SRC; i++) {
struct ggml_tensor * parent = node->src[i];
if (parent == NULL) {
break;
}
// if the node's data is external, then we cannot re-use it
if (ggml_tallocr_is_own(alloc, parent) == false) {
AT_PRINTF("not reusing parent %s for %s as %p is external\n", parent->name, node->name, parent->data);
continue;
}
struct hash_node * p_hn = hash_get(galloc, parent);
if (parent->data != NULL && p_hn->n_children == 1 && p_hn->n_views == 0 && ggml_are_same_layout(node, parent)) {
if (ggml_is_view(parent)) {
struct ggml_tensor * view_src = parent->view_src;
struct hash_node * view_src_hn = hash_get(galloc, view_src);
if (view_src_hn->n_views == 1 && view_src_hn->n_children == 0 && view_src->data == parent->data) {
// TODO: the offset of the view parent must be kept to ensure that the op doesn't overwrite
// the parent's data that it will need later (same layout requirement). the problem is that then
// we cannot free the tensor because the original address of the allocation is lost.
// adding a view_src pointer to the tensor would solve this and simplify the code dealing with views
// for now, we only reuse the parent's data if the offset is zero (view_src->data == parent->data)
AT_PRINTF("reusing view parent %s (%s) for %s\n", parent->name, view_src->name, node->name);
node->view_src = view_src;
view_src_hn->n_views += 1;
init_view(galloc, node, false);
return;
}
} else {
AT_PRINTF("reusing parent %s for %s\n", parent->name, node->name);
node->view_src = parent;
p_hn->n_views += 1;
init_view(galloc, node, false);
return;
}
}
}
}
ggml_tallocr_alloc(alloc, node);
}
}
}
|
O1
|
c
|
allocate_node:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
testq %r15, %r15
jne 0xb39c0
movq 0x28(%r14), %r15
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rsi
movq %rbx, %rdx
callq 0x96070
movq (%r15,%rax,8), %r15
cmpq $0x0, 0x118(%rbx)
je 0xb39d9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x108(%rbx)
je 0xb3a01
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb390c
movl 0x50(%rbx), %eax
cmpq $0x3d, %rax
ja 0xb3b9b
movabsq $0x200002e0041007ec, %rcx # imm = 0x200002E0041007EC
btq %rax, %rcx
jae 0xb3b9b
xorl %ebp, %ebp
movq 0xa0(%rbx,%rbp,8), %r12
testq %r12, %r12
je 0xb3b4c
movq (%r15), %rax
movl $0x4, %r13d
cmpq %rax, 0x8(%r12)
jne 0xb3b52
movq 0x108(%r12), %rcx
testq %rcx, %rcx
je 0xb3a60
cmpq %rax, 0x8(%rcx)
jne 0xb3b52
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rsi
movq %r12, %rdx
callq 0x96070
xorl %r13d, %r13d
cmpq $0x0, 0x118(%r12)
je 0xb3b52
movq 0x18(%r14), %rcx
cmpl $0x1, (%rcx,%rax,8)
jne 0xb3b52
cmpl $0x0, 0x4(%rcx,%rax,8)
jne 0xb3b52
movl (%rbx), %edx
cmpl (%r12), %edx
jne 0xb3b52
movq 0x10(%rbx), %rdx
cmpq 0x10(%r12), %rdx
jne 0xb3b52
movq 0x30(%rbx), %rdx
cmpq 0x30(%r12), %rdx
jne 0xb3b52
movl $0x7, %esi
movq %rsi, %rdx
cmpq $0xa, %rsi
je 0xb3aed
movq -0x20(%rbx,%rdx,8), %rsi
cmpq -0x20(%r12,%rdx,8), %rsi
jne 0xb3aed
movq (%rbx,%rdx,8), %rdi
leaq 0x1(%rdx), %rsi
cmpq (%r12,%rdx,8), %rdi
je 0xb3aca
addq $-0x7, %rdx
cmpq $0x3, %rdx
jb 0xb3b52
movq 0x108(%r12), %rdx
testq %rdx, %rdx
je 0xb3b67
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rsi
movq %rdx, (%rsp)
callq 0x96070
movq 0x18(%r14), %rcx
movl 0x4(%rcx,%rax,8), %edx
cmpl $0x1, %edx
jne 0xb3b52
cmpl $0x0, (%rcx,%rax,8)
jne 0xb3b52
movq (%rsp), %rdi
movq 0x118(%rdi), %rsi
cmpq 0x118(%r12), %rsi
jne 0xb3b52
movq %rdi, 0x108(%rbx)
incl %edx
movl %edx, 0x4(%rcx,%rax,8)
jmp 0xb3b76
movl $0x2, %r13d
testb $0x3, %r13b
jne 0xb3b91
incq %rbp
cmpq $0xa, %rbp
jne 0xb3a24
jmp 0xb3b8b
movq %r12, 0x108(%rbx)
movl $0x1, 0x4(%rcx,%rax,8)
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xb390c
movl $0x1, %r13d
jmp 0xb3b52
movl $0x2, %r13d
cmpl $0x2, %r13d
jne 0xb39ca
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb2e4c
|
allocate_node:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov r15, [rdi]
test r15, r15
jnz short loc_B39C0
mov r15, [r14+28h]
mov rdi, [r14+8]
mov rsi, [r14+10h]
mov rdx, rbx
call ggml_hash_find_or_insert
mov r15, [r15+rax*8]
loc_B39C0:
cmp qword ptr [rbx+118h], 0
jz short loc_B39D9
loc_B39CA:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B39D9:
cmp qword ptr [rbx+108h], 0
jz short loc_B3A01
mov rdi, r14
mov rsi, rbx
mov edx, 1
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp init_view
loc_B3A01:
mov eax, [rbx+50h]
cmp rax, 3Dh ; '='
ja loc_B3B9B
mov rcx, 200002E0041007ECh
bt rcx, rax
jnb loc_B3B9B
xor ebp, ebp
loc_B3A24:
mov r12, [rbx+rbp*8+0A0h]
test r12, r12
jz loc_B3B4C
mov rax, [r15]
mov r13d, 4
cmp [r12+8], rax
jnz loc_B3B52
mov rcx, [r12+108h]
test rcx, rcx
jz short loc_B3A60
cmp [rcx+8], rax
jnz loc_B3B52
loc_B3A60:
mov rdi, [r14+8]
mov rsi, [r14+10h]
mov rdx, r12
call ggml_hash_find_or_insert
xor r13d, r13d
cmp qword ptr [r12+118h], 0
jz loc_B3B52
mov rcx, [r14+18h]
cmp dword ptr [rcx+rax*8], 1
jnz loc_B3B52
cmp dword ptr [rcx+rax*8+4], 0
jnz loc_B3B52
mov edx, [rbx]
cmp edx, [r12]
jnz loc_B3B52
mov rdx, [rbx+10h]
cmp rdx, [r12+10h]
jnz loc_B3B52
mov rdx, [rbx+30h]
cmp rdx, [r12+30h]
jnz loc_B3B52
mov esi, 7
loc_B3ACA:
mov rdx, rsi
cmp rsi, 0Ah
jz short loc_B3AED
mov rsi, [rbx+rdx*8-20h]
cmp rsi, [r12+rdx*8-20h]
jnz short loc_B3AED
mov rdi, [rbx+rdx*8]
lea rsi, [rdx+1]
cmp rdi, [r12+rdx*8]
jz short loc_B3ACA
loc_B3AED:
add rdx, 0FFFFFFFFFFFFFFF9h
cmp rdx, 3
jb short loc_B3B52
mov rdx, [r12+108h]
test rdx, rdx
jz short loc_B3B67
mov rdi, [r14+8]
mov rsi, [r14+10h]
mov [rsp+38h+var_38], rdx
call ggml_hash_find_or_insert
mov rcx, [r14+18h]
mov edx, [rcx+rax*8+4]
cmp edx, 1
jnz short loc_B3B52
cmp dword ptr [rcx+rax*8], 0
jnz short loc_B3B52
mov rdi, [rsp+38h+var_38]
mov rsi, [rdi+118h]
cmp rsi, [r12+118h]
jnz short loc_B3B52
mov [rbx+108h], rdi
inc edx
mov [rcx+rax*8+4], edx
jmp short loc_B3B76
loc_B3B4C:
mov r13d, 2
loc_B3B52:
test r13b, 3
jnz short loc_B3B91
inc rbp
cmp rbp, 0Ah
jnz loc_B3A24
jmp short loc_B3B8B
loc_B3B67:
mov [rbx+108h], r12
mov dword ptr [rcx+rax*8+4], 1
loc_B3B76:
mov rdi, r14
mov rsi, rbx
xor edx, edx
call init_view
mov r13d, 1
jmp short loc_B3B52
loc_B3B8B:
mov r13d, 2
loc_B3B91:
cmp r13d, 2
jnz loc_B39CA
loc_B3B9B:
mov rdi, r15
mov rsi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp ggml_tallocr_alloc
|
unsigned long long allocate_node(long long **a1, unsigned long long a2)
{
unsigned long long result; // rax
long long *v4; // r15
long long *v5; // r15
long long v6; // rcx
long long i; // rbp
long long v8; // r12
int v9; // r13d
long long v10; // rcx
long long *v11; // rcx
long long v12; // rsi
long long v13; // rdx
unsigned long long v14; // rdx
long long *v15; // rcx
long long v16; // [rsp+0h] [rbp-38h]
v4 = *a1;
if ( !*a1 )
{
v5 = a1[5];
result = ggml_hash_find_or_insert((unsigned long long)a1[1], (long long)a1[2], a2);
v4 = (long long *)v5[result];
}
if ( *(_QWORD *)(a2 + 280) )
return result;
if ( *(_QWORD *)(a2 + 264) )
return init_view((long long *)a1, a2, 1);
result = *(unsigned int *)(a2 + 80);
if ( result > 0x3D )
return ggml_tallocr_alloc(v4, (_QWORD *)a2);
v6 = 0x200002E0041007ECLL;
if ( !_bittest64(&v6, result) )
return ggml_tallocr_alloc(v4, (_QWORD *)a2);
for ( i = 0LL; i != 10; ++i )
{
v8 = *(_QWORD *)(a2 + 8 * i + 160);
if ( !v8 )
{
v9 = 2;
goto LABEL_31;
}
result = *v4;
v9 = 4;
if ( *(_QWORD *)(v8 + 8) == *v4 )
{
v10 = *(_QWORD *)(v8 + 264);
if ( !v10 || *(_QWORD *)(v10 + 8) == result )
{
result = ggml_hash_find_or_insert((unsigned long long)a1[1], (long long)a1[2], *(_QWORD *)(a2 + 8 * i + 160));
v9 = 0;
if ( *(_QWORD *)(v8 + 280) )
{
v11 = a1[3];
if ( LODWORD(v11[result]) == 1
&& !HIDWORD(v11[result])
&& *(_DWORD *)a2 == *(_DWORD *)v8
&& *(_QWORD *)(a2 + 16) == *(_QWORD *)(v8 + 16)
&& *(_QWORD *)(a2 + 48) == *(_QWORD *)(v8 + 48) )
{
v12 = 7LL;
do
{
v13 = v12;
if ( v12 == 10 )
break;
if ( *(_QWORD *)(a2 + 8 * v12 - 32) != *(_QWORD *)(v8 + 8 * v12 - 32) )
break;
++v12;
}
while ( *(_QWORD *)(a2 + 8 * v13) == *(_QWORD *)(v8 + 8 * v13) );
if ( (unsigned long long)(v13 - 7) >= 3 )
{
v14 = *(_QWORD *)(v8 + 264);
if ( !v14 )
{
*(_QWORD *)(a2 + 264) = v8;
HIDWORD(v11[result]) = 1;
goto LABEL_35;
}
v16 = *(_QWORD *)(v8 + 264);
result = ggml_hash_find_or_insert((unsigned long long)a1[1], (long long)a1[2], v14);
v15 = a1[3];
if ( HIDWORD(v15[result]) == 1 && !LODWORD(v15[result]) && *(_QWORD *)(v16 + 280) == *(_QWORD *)(v8 + 280) )
{
*(_QWORD *)(a2 + 264) = v16;
HIDWORD(v15[result]) = 2;
LABEL_35:
result = init_view((long long *)a1, a2, 0);
v9 = 1;
}
}
}
}
}
}
LABEL_31:
if ( (v9 & 3) != 0 )
goto LABEL_36;
}
v9 = 2;
LABEL_36:
if ( v9 == 2 )
return ggml_tallocr_alloc(v4, (_QWORD *)a2);
return result;
}
| |||
10,536 |
allocate_node
|
7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c
|
static void allocate_node(ggml_gallocr_t galloc, struct ggml_tensor * node) {
ggml_tallocr_t alloc = node_tallocr(galloc, node);
if (node->data == NULL) {
if (ggml_is_view(node)) {
init_view(galloc, node, true);
} else {
// see if we can reuse a parent's buffer (inplace)
if (ggml_op_can_inplace(node->op)) {
for (int i = 0; i < GGML_MAX_SRC; i++) {
struct ggml_tensor * parent = node->src[i];
if (parent == NULL) {
break;
}
// if the node's data is external, then we cannot re-use it
if (ggml_tallocr_is_own(alloc, parent) == false) {
AT_PRINTF("not reusing parent %s for %s as %p is external\n", parent->name, node->name, parent->data);
continue;
}
struct hash_node * p_hn = hash_get(galloc, parent);
if (parent->data != NULL && p_hn->n_children == 1 && p_hn->n_views == 0 && ggml_are_same_layout(node, parent)) {
if (ggml_is_view(parent)) {
struct ggml_tensor * view_src = parent->view_src;
struct hash_node * view_src_hn = hash_get(galloc, view_src);
if (view_src_hn->n_views == 1 && view_src_hn->n_children == 0 && view_src->data == parent->data) {
// TODO: the offset of the view parent must be kept to ensure that the op doesn't overwrite
// the parent's data that it will need later (same layout requirement). the problem is that then
// we cannot free the tensor because the original address of the allocation is lost.
// adding a view_src pointer to the tensor would solve this and simplify the code dealing with views
// for now, we only reuse the parent's data if the offset is zero (view_src->data == parent->data)
AT_PRINTF("reusing view parent %s (%s) for %s\n", parent->name, view_src->name, node->name);
node->view_src = view_src;
view_src_hn->n_views += 1;
init_view(galloc, node, false);
return;
}
} else {
AT_PRINTF("reusing parent %s for %s\n", parent->name, node->name);
node->view_src = parent;
p_hn->n_views += 1;
init_view(galloc, node, false);
return;
}
}
}
}
ggml_tallocr_alloc(alloc, node);
}
}
}
|
O2
|
c
|
allocate_node:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x8fb36
cmpq $0x0, 0x118(%rbx)
je 0x8f80a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x108(%rbx)
je 0x8f830
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8f734
movq %rax, %r15
movl 0x50(%rbx), %eax
cmpq $0x3d, %rax
ja 0x8f911
movabsq $0x200002e0041007ec, %rcx # imm = 0x200002E0041007EC
btq %rax, %rcx
jae 0x8f911
xorl %ebp, %ebp
cmpq $0xa, %rbp
je 0x8f911
movq 0xa0(%rbx,%rbp,8), %r12
testq %r12, %r12
je 0x8f911
movq %r15, %rdi
movq %r12, %rsi
callq 0x8fb5d
testb %al, %al
je 0x8f909
movq %r14, %rdi
movq %r12, %rsi
callq 0x8f716
cmpq $0x0, 0x118(%r12)
je 0x8f909
cmpl $0x1, (%rax)
jne 0x8f909
cmpl $0x0, 0x4(%rax)
jne 0x8f909
movl (%rbx), %ecx
cmpl (%r12), %ecx
jne 0x8f909
pushq $0x6
popq %rcx
cmpq $0xa, %rcx
je 0x8f8d5
movq -0x20(%rbx,%rcx,8), %rdx
cmpq -0x20(%r12,%rcx,8), %rdx
jne 0x8f909
movq (%rbx,%rcx,8), %rdx
leaq 0x1(%rcx), %rsi
cmpq (%r12,%rcx,8), %rdx
movq %rsi, %rcx
je 0x8f8b0
jmp 0x8f909
movq 0x108(%r12), %r13
testq %r13, %r13
je 0x8f92a
movq %r14, %rdi
movq %r13, %rsi
callq 0x8f716
cmpl $0x1, 0x4(%rax)
jne 0x8f909
cmpl $0x0, (%rax)
jne 0x8f909
movq 0x118(%r13), %rcx
cmpq 0x118(%r12), %rcx
je 0x8f945
incq %rbp
jmp 0x8f856
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8ec88
movq %r12, 0x108(%rbx)
movl $0x1, 0x4(%rax)
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
jmp 0x8f81d
movq %r13, 0x108(%rbx)
movl $0x2, 0x4(%rax)
jmp 0x8f938
|
allocate_node:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
call node_tallocr
cmp qword ptr [rbx+118h], 0
jz short loc_8F80A
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8F80A:
cmp qword ptr [rbx+108h], 0
jz short loc_8F830
push 1
pop rdx
mov rdi, r14
mov rsi, rbx
loc_8F81D:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp init_view
loc_8F830:
mov r15, rax
mov eax, [rbx+50h]
cmp rax, 3Dh ; '='
ja loc_8F911
mov rcx, 200002E0041007ECh
bt rcx, rax
jnb loc_8F911
xor ebp, ebp
loc_8F856:
cmp rbp, 0Ah
jz loc_8F911
mov r12, [rbx+rbp*8+0A0h]
test r12, r12
jz loc_8F911
mov rdi, r15
mov rsi, r12
call ggml_tallocr_is_own
test al, al
jz loc_8F909
mov rdi, r14
mov rsi, r12
call hash_get
cmp qword ptr [r12+118h], 0
jz short loc_8F909
cmp dword ptr [rax], 1
jnz short loc_8F909
cmp dword ptr [rax+4], 0
jnz short loc_8F909
mov ecx, [rbx]
cmp ecx, [r12]
jnz short loc_8F909
push 6
pop rcx
loc_8F8B0:
cmp rcx, 0Ah
jz short loc_8F8D5
mov rdx, [rbx+rcx*8-20h]
cmp rdx, [r12+rcx*8-20h]
jnz short loc_8F909
mov rdx, [rbx+rcx*8]
lea rsi, [rcx+1]
cmp rdx, [r12+rcx*8]
mov rcx, rsi
jz short loc_8F8B0
jmp short loc_8F909
loc_8F8D5:
mov r13, [r12+108h]
test r13, r13
jz short loc_8F92A
mov rdi, r14
mov rsi, r13
call hash_get
cmp dword ptr [rax+4], 1
jnz short loc_8F909
cmp dword ptr [rax], 0
jnz short loc_8F909
mov rcx, [r13+118h]
cmp rcx, [r12+118h]
jz short loc_8F945
loc_8F909:
inc rbp
jmp loc_8F856
loc_8F911:
mov rdi, r15
mov rsi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp ggml_tallocr_alloc
loc_8F92A:
mov [rbx+108h], r12
mov dword ptr [rax+4], 1
loc_8F938:
mov rdi, r14
mov rsi, rbx
xor edx, edx
jmp loc_8F81D
loc_8F945:
mov [rbx+108h], r13
mov dword ptr [rax+4], 2
jmp short loc_8F938
|
long long allocate_node(_QWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7)
{
long long result; // rax
long long v8; // rcx
long long v9; // r8
long long v10; // r9
char v11; // dl
long long *v12; // r15
unsigned long long v13; // rax
long long v14; // rcx
long long i; // rbp
unsigned long long v16; // r12
_DWORD *v17; // rax
bool v18; // zf
long long v19; // r13
_DWORD *v20; // rax
result = node_tallocr(a1);
if ( !*(_QWORD *)(a2 + 280) )
{
if ( *(_QWORD *)(a2 + 264) )
{
v11 = 1;
return init_view((long long)a1, a2, v11, v8, v9, v10, a7);
}
else
{
v12 = (long long *)result;
v13 = *(unsigned int *)(a2 + 80);
if ( v13 <= 0x3D )
{
v14 = 0x200002E0041007ECLL;
if ( _bittest64(&v14, v13) )
{
for ( i = 0LL; ; ++i )
{
if ( i == 10 )
return ggml_tallocr_alloc(v12, (_QWORD *)a2);
v16 = *(_QWORD *)(a2 + 8 * i + 160);
if ( !v16 )
return ggml_tallocr_alloc(v12, (_QWORD *)a2);
if ( (unsigned __int8)ggml_tallocr_is_own(v12, *(_QWORD *)(a2 + 8 * i + 160)) )
{
v17 = (_DWORD *)hash_get(a1, v16);
if ( *(_QWORD *)(v16 + 280) )
{
if ( *v17 == 1 && !v17[1] && *(_DWORD *)a2 == *(_DWORD *)v16 )
{
v8 = 6LL;
while ( v8 != 10 )
{
if ( *(_QWORD *)(a2 + 8 * v8 - 32) == *(_QWORD *)(v16 + 8 * v8 - 32) )
{
v18 = *(_QWORD *)(a2 + 8 * v8) == *(_QWORD *)(v16 + 8 * v8);
++v8;
if ( v18 )
continue;
}
goto LABEL_24;
}
v19 = *(_QWORD *)(v16 + 264);
if ( !v19 )
{
*(_QWORD *)(a2 + 264) = v16;
v17[1] = 1;
LABEL_27:
v11 = 0;
return init_view((long long)a1, a2, v11, v8, v9, v10, a7);
}
v20 = (_DWORD *)hash_get(a1, *(_QWORD *)(v16 + 264));
if ( v20[1] == 1 && !*v20 )
{
v8 = *(_QWORD *)(v19 + 280);
if ( v8 == *(_QWORD *)(v16 + 280) )
{
*(_QWORD *)(a2 + 264) = v19;
v20[1] = 2;
goto LABEL_27;
}
}
}
}
}
LABEL_24:
;
}
}
}
return ggml_tallocr_alloc(v12, (_QWORD *)a2);
}
}
return result;
}
|
allocate_node:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
CALL 0x0018fb36
CMP qword ptr [RBX + 0x118],0x0
JZ 0x0018f80a
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018f80a:
CMP qword ptr [RBX + 0x108],0x0
JZ 0x0018f830
PUSH 0x1
POP RDX
MOV RDI,R14
MOV RSI,RBX
LAB_0018f81d:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018f734
LAB_0018f830:
MOV R15,RAX
MOV EAX,dword ptr [RBX + 0x50]
CMP RAX,0x3d
JA 0x0018f911
MOV RCX,0x200002e0041007ec
BT RCX,RAX
JNC 0x0018f911
XOR EBP,EBP
LAB_0018f856:
CMP RBP,0xa
JZ 0x0018f911
MOV R12,qword ptr [RBX + RBP*0x8 + 0xa0]
TEST R12,R12
JZ 0x0018f911
MOV RDI,R15
MOV RSI,R12
CALL 0x0018fb5d
TEST AL,AL
JZ 0x0018f909
MOV RDI,R14
MOV RSI,R12
CALL 0x0018f716
CMP qword ptr [R12 + 0x118],0x0
JZ 0x0018f909
CMP dword ptr [RAX],0x1
JNZ 0x0018f909
CMP dword ptr [RAX + 0x4],0x0
JNZ 0x0018f909
MOV ECX,dword ptr [RBX]
CMP ECX,dword ptr [R12]
JNZ 0x0018f909
PUSH 0x6
POP RCX
LAB_0018f8b0:
CMP RCX,0xa
JZ 0x0018f8d5
MOV RDX,qword ptr [RBX + RCX*0x8 + -0x20]
CMP RDX,qword ptr [R12 + RCX*0x8 + -0x20]
JNZ 0x0018f909
MOV RDX,qword ptr [RBX + RCX*0x8]
LEA RSI,[RCX + 0x1]
CMP RDX,qword ptr [R12 + RCX*0x8]
MOV RCX,RSI
JZ 0x0018f8b0
JMP 0x0018f909
LAB_0018f8d5:
MOV R13,qword ptr [R12 + 0x108]
TEST R13,R13
JZ 0x0018f92a
MOV RDI,R14
MOV RSI,R13
CALL 0x0018f716
CMP dword ptr [RAX + 0x4],0x1
JNZ 0x0018f909
CMP dword ptr [RAX],0x0
JNZ 0x0018f909
MOV RCX,qword ptr [R13 + 0x118]
CMP RCX,qword ptr [R12 + 0x118]
JZ 0x0018f945
LAB_0018f909:
INC RBP
JMP 0x0018f856
LAB_0018f911:
MOV RDI,R15
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018ec88
LAB_0018f92a:
MOV qword ptr [RBX + 0x108],R12
MOV dword ptr [RAX + 0x4],0x1
LAB_0018f938:
MOV RDI,R14
MOV RSI,RBX
XOR EDX,EDX
JMP 0x0018f81d
LAB_0018f945:
MOV qword ptr [RBX + 0x108],R13
MOV dword ptr [RAX + 0x4],0x2
JMP 0x0018f938
|
void allocate_node(int8 param_1,int *param_2)
{
int *piVar1;
long lVar2;
long lVar3;
char cVar4;
int8 uVar5;
int *piVar6;
long lVar7;
long lVar8;
uVar5 = node_tallocr();
if (*(long *)(param_2 + 0x46) != 0) {
return;
}
if (*(long *)(param_2 + 0x42) != 0) {
uVar5 = 1;
LAB_0018f81d:
init_view(param_1,param_2,uVar5);
return;
}
if (((ulong)(uint)param_2[0x14] < 0x3e) &&
((0x200002e0041007ecU >> ((ulong)(uint)param_2[0x14] & 0x3f) & 1) != 0)) {
lVar8 = 0;
while ((lVar8 != 10 && (piVar1 = *(int **)(param_2 + lVar8 * 2 + 0x28), piVar1 != (int *)0x0)))
{
cVar4 = ggml_tallocr_is_own(uVar5,piVar1);
if ((cVar4 != '\0') &&
((((piVar6 = (int *)hash_get(param_1,piVar1), *(long *)(piVar1 + 0x46) != 0 &&
(*piVar6 == 1)) && (piVar6[1] == 0)) && (*param_2 == *piVar1)))) {
lVar7 = 6;
while (lVar7 != 10) {
if ((*(long *)(param_2 + lVar7 * 2 + -8) != *(long *)(piVar1 + lVar7 * 2 + -8)) ||
(lVar2 = lVar7 * 2, lVar3 = lVar7 * 2, lVar7 = lVar7 + 1,
*(long *)(param_2 + lVar2) != *(long *)(piVar1 + lVar3))) goto LAB_0018f909;
}
lVar7 = *(long *)(piVar1 + 0x42);
if (lVar7 == 0) {
*(int **)(param_2 + 0x42) = piVar1;
piVar6[1] = 1;
LAB_0018f938:
uVar5 = 0;
goto LAB_0018f81d;
}
piVar6 = (int *)hash_get(param_1,lVar7);
if (((piVar6[1] == 1) && (*piVar6 == 0)) &&
(*(long *)(lVar7 + 0x118) == *(long *)(piVar1 + 0x46))) {
*(long *)(param_2 + 0x42) = lVar7;
piVar6[1] = 2;
goto LAB_0018f938;
}
}
LAB_0018f909:
lVar8 = lVar8 + 1;
}
}
ggml_tallocr_alloc(uVar5,param_2);
return;
}
|
|
10,537 |
my_uca_coll_init_utf8mb3
|
eloqsql/strings/ctype-uca.c
|
static my_bool
my_uca_coll_init_utf8mb3(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
if (my_coll_init_uca(cs, loader))
return TRUE;
if (my_uca_collation_can_optimize_no_contractions(cs))
my_uca_handler_map(cs, &my_uca_package_utf8mb3,
&my_uca_package_no_contractions_utf8mb3);
return FALSE;
}
|
O3
|
c
|
my_uca_coll_init_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3cdd8
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x3ecec
movzbl 0xb2(%rbx), %ecx
testq %rcx, %rcx
je 0x3ec9b
movq 0x60(%rbx), %rax
imulq $0x38, %rcx, %rcx
xorl %edx, %edx
cmpq $0x0, 0x18(%rax,%rdx)
jne 0x3ecea
addq $0x38, %rdx
cmpq %rdx, %rcx
jne 0x3ec8a
movq 0xc0(%rbx), %rcx
leaq 0x2e2917(%rip), %rdx # 0x3215c0
cmpq (%rdx), %rcx
je 0x3eccd
leaq 0x2e292b(%rip), %rax # 0x3215e0
cmpq 0x8(%rdx), %rcx
je 0x3ecd6
cmpq 0x10(%rdx), %rcx
je 0x3ecdc
cmpq 0x18(%rdx), %rcx
jne 0x3ecea
addq $0x18, %rax
jmp 0x3ece0
leaq 0x2e290c(%rip), %rax # 0x3215e0
jmp 0x3ece0
addq $0x8, %rax
jmp 0x3ece0
addq $0x10, %rax
movq (%rax), %rax
movq %rax, 0xc0(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
my_uca_coll_init_utf8mb3:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
call my_coll_init_uca
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_3ECEC
movzx ecx, byte ptr [rbx+0B2h]
test rcx, rcx
jz short loc_3EC9B
mov rax, [rbx+60h]
imul rcx, 38h ; '8'
xor edx, edx
loc_3EC8A:
cmp qword ptr [rax+rdx+18h], 0
jnz short loc_3ECEA
add rdx, 38h ; '8'
cmp rcx, rdx
jnz short loc_3EC8A
loc_3EC9B:
mov rcx, [rbx+0C0h]
lea rdx, my_uca_package_utf8mb3
cmp rcx, [rdx]
jz short loc_3ECCD
lea rax, my_uca_package_no_contractions_utf8mb3
cmp rcx, [rdx+8]
jz short loc_3ECD6
cmp rcx, [rdx+10h]
jz short loc_3ECDC
cmp rcx, [rdx+18h]
jnz short loc_3ECEA
add rax, 18h
jmp short loc_3ECE0
loc_3ECCD:
lea rax, my_uca_package_no_contractions_utf8mb3
jmp short loc_3ECE0
loc_3ECD6:
add rax, 8
jmp short loc_3ECE0
loc_3ECDC:
add rax, 10h
loc_3ECE0:
mov rax, [rax]
mov [rbx+0C0h], rax
loc_3ECEA:
xor eax, eax
loc_3ECEC:
add rsp, 8
pop rbx
pop rbp
retn
|
char my_uca_coll_init_utf8mb3(
long long a1,
long long ( **a2)(unsigned long long, unsigned long long, const char *))
{
char inited; // cl
char result; // al
long long v4; // rdx
long long ( **v5)(); // rcx
long long ( ***v6)(); // rax
inited = my_coll_init_uca(a1, a2);
result = 1;
if ( !inited )
{
if ( *(_BYTE *)(a1 + 178) )
{
v4 = 0LL;
while ( !*(_QWORD *)(*(_QWORD *)(a1 + 96) + v4 + 24) )
{
v4 += 56LL;
if ( 56LL * *(unsigned __int8 *)(a1 + 178) == v4 )
goto LABEL_6;
}
return 0;
}
LABEL_6:
v5 = *(long long ( ***)())(a1 + 192);
if ( v5 == my_uca_package_utf8mb3[0] )
{
v6 = my_uca_package_no_contractions_utf8mb3;
}
else if ( v5 == my_uca_package_utf8mb3[1] )
{
v6 = &my_uca_package_no_contractions_utf8mb3[1];
}
else if ( v5 == my_uca_package_utf8mb3[2] )
{
v6 = &my_uca_package_no_contractions_utf8mb3[2];
}
else
{
if ( v5 != my_uca_package_utf8mb3[3] )
return 0;
v6 = &my_uca_package_no_contractions_utf8mb3[3];
}
*(_QWORD *)(a1 + 192) = *v6;
return 0;
}
return result;
}
|
my_uca_coll_init_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x0013cdd8
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x0013ecec
MOVZX ECX,byte ptr [RBX + 0xb2]
TEST RCX,RCX
JZ 0x0013ec9b
MOV RAX,qword ptr [RBX + 0x60]
IMUL RCX,RCX,0x38
XOR EDX,EDX
LAB_0013ec8a:
CMP qword ptr [RAX + RDX*0x1 + 0x18],0x0
JNZ 0x0013ecea
ADD RDX,0x38
CMP RCX,RDX
JNZ 0x0013ec8a
LAB_0013ec9b:
MOV RCX,qword ptr [RBX + 0xc0]
LEA RDX,[0x4215c0]
CMP RCX,qword ptr [RDX]
JZ 0x0013eccd
LEA RAX,[0x4215e0]
CMP RCX,qword ptr [RDX + 0x8]
JZ 0x0013ecd6
CMP RCX,qword ptr [RDX + 0x10]
JZ 0x0013ecdc
CMP RCX,qword ptr [RDX + 0x18]
JNZ 0x0013ecea
ADD RAX,0x18
JMP 0x0013ece0
LAB_0013eccd:
LEA RAX,[0x4215e0]
JMP 0x0013ece0
LAB_0013ecd6:
ADD RAX,0x8
JMP 0x0013ece0
LAB_0013ecdc:
ADD RAX,0x10
LAB_0013ece0:
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBX + 0xc0],RAX
LAB_0013ecea:
XOR EAX,EAX
LAB_0013ecec:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 my_uca_coll_init_utf8mb3(long param_1)
{
int *puVar1;
char cVar2;
int **ppuVar3;
long lVar4;
cVar2 = my_coll_init_uca();
if (cVar2 != '\0') {
return 1;
}
if ((ulong)*(byte *)(param_1 + 0xb2) != 0) {
lVar4 = 0;
do {
if (*(long *)(*(long *)(param_1 + 0x60) + 0x18 + lVar4) != 0) {
return 0;
}
lVar4 = lVar4 + 0x38;
} while ((ulong)*(byte *)(param_1 + 0xb2) * 0x38 - lVar4 != 0);
}
puVar1 = *(int **)(param_1 + 0xc0);
if (puVar1 == my_uca_package_utf8mb3) {
ppuVar3 = &my_uca_package_no_contractions_utf8mb3;
}
else if (puVar1 == PTR_my_uca_collation_handler_nopad_utf8mb3_004215c8) {
ppuVar3 = &PTR_my_uca_collation_handler_nopad_no_contractions_utf8mb3_004215e8;
}
else if (puVar1 == PTR_my_uca_collation_handler_multilevel_utf8mb3_004215d0) {
ppuVar3 = &PTR_my_uca_collation_handler_multilevel_no_contractions_utf8mb3_004215f0;
}
else {
if (puVar1 != PTR_my_uca_collation_handler_nopad_multilevel_utf8mb3_004215d8) {
return 0;
}
ppuVar3 = &PTR_my_uca_collation_handler_nopad_multilevel_no_contractions_utf8mb3_004215f8;
}
*(int **)(param_1 + 0xc0) = *ppuVar3;
return 0;
}
|
|
10,538 |
ma_update_blob_record
|
eloqsql/storage/maria/ma_dynrec.c
|
my_bool _ma_update_blob_record(MARIA_HA *info, MARIA_RECORD_POS pos,
const uchar *oldrec __attribute__ ((unused)),
const uchar *record)
{
uchar *rec_buff;
int error;
ulong reclength,reclength2,extra;
my_bool buff_alloced;
extra= (ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER)+MARIA_SPLIT_LENGTH+
MARIA_DYN_DELETE_BLOCK_HEADER);
reclength= (info->s->base.pack_reclength+
_ma_calc_total_blob_length(info,record)+ extra);
#ifdef NOT_USED /* We now support big rows */
if (reclength > MARIA_DYN_MAX_ROW_LENGTH)
{
my_errno=HA_ERR_TO_BIG_ROW;
return 1;
}
#endif
alloc_on_stack(*info->stack_end_ptr, rec_buff, buff_alloced, reclength);
if (!rec_buff)
{
my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(1);
}
reclength2= _ma_rec_pack(info, rec_buff+
ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
record);
if (!reclength2)
{
error= 1;
goto err;
}
DBUG_ASSERT(reclength2 <= reclength);
error=update_dynamic_record(info,pos,
rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
reclength2);
err:
stack_alloc_free(rec_buff, buff_alloced);
return(error != 0);
}
|
O3
|
c
|
ma_update_blob_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq 0x3a0(%rax), %r12
movq %rcx, %rsi
callq 0x49bde
leaq (%r12,%rax), %rsi
addq $0x5c, %rsi
leaq -0x40(%rbp), %rcx
movq %rsi, (%rcx)
movq 0x78(%r14), %rax
movq (%rax), %rax
subq %rcx, %rax
subq %rsi, %rax
jbe 0x49cf0
cmpq $0x10000, %rax # imm = 0x10000
ja 0x49cd8
cmpq $0x1000, %rsi # imm = 0x1000
jb 0x49cf0
cmpq $0x8001, %rax # imm = 0x8001
jb 0x49cf0
movq %rsp, %r12
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r12
movq %r12, %rsp
movb $0x1, %al
movl %eax, -0x34(%rbp)
jmp 0x49d0b
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
callq 0xc3acd
testq %rax, %rax
je 0x49d4b
movq %rax, %r12
movl $0x0, -0x34(%rbp)
leaq 0x18(%r12), %r13
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x49251
testl %eax, %eax
je 0x49d39
movl %eax, %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x496e6
testb %al, %al
setne %bl
jmp 0x49d3b
movb $0x1, %bl
cmpb $0x0, -0x34(%rbp)
jne 0x49d58
movq %r12, %rdi
callq 0xc3cfa
jmp 0x49d58
callq 0xc5c9a
movl $0x80, (%rax)
movb $0x1, %bl
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x49d78
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2b280
|
_ma_update_blob_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rcx
mov rbx, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov r12, [rax+3A0h]
mov rsi, rcx
call _ma_calc_total_blob_length
lea rsi, [r12+rax]
add rsi, 5Ch ; '\'
lea rcx, [rbp+var_40]
mov [rcx], rsi
mov rax, [r14+78h]
mov rax, [rax]
sub rax, rcx
sub rax, rsi
jbe short loc_49CF0
cmp rax, 10000h
ja short loc_49CD8
cmp rsi, 1000h
jb short loc_49CF0
cmp rax, 8001h
jb short loc_49CF0
loc_49CD8:
mov r12, rsp
add rsi, 0Fh
and rsi, 0FFFFFFFFFFFFFFF0h
sub r12, rsi
mov rsp, r12
mov al, 1
mov [rbp+var_34], eax
jmp short loc_49D0B
loc_49CF0:
mov edx, offset stru_10010
xor edi, edi
call my_malloc
test rax, rax
jz short loc_49D4B
mov r12, rax
mov [rbp+var_34], 0
loc_49D0B:
lea r13, [r12+18h]
mov rdi, r14
mov rsi, r13
mov rdx, r15
call _ma_rec_pack
test eax, eax
jz short loc_49D39
mov ecx, eax
mov rdi, r14
mov rsi, rbx
mov rdx, r13
call update_dynamic_record
test al, al
setnz bl
jmp short loc_49D3B
loc_49D39:
mov bl, 1
loc_49D3B:
cmp byte ptr [rbp+var_34], 0
jnz short loc_49D58
mov rdi, r12
call my_free
jmp short loc_49D58
loc_49D4B:
call _my_thread_var
mov dword ptr [rax], 80h
mov bl, 1
loc_49D58:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_49D78
mov eax, ebx
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_49D78:
call ___stack_chk_fail
|
long long ma_update_blob_record(long long a1, long long a2, long long a3, unsigned __int8 *a4)
{
long long v6; // r12
unsigned long long v7; // rsi
unsigned long long v8; // rax
bool v9; // cc
unsigned long long v10; // rax
char *v11; // r12
long long v12; // rax
unsigned int v13; // eax
unsigned long long v15; // [rsp+0h] [rbp-40h] BYREF
int v16; // [rsp+Ch] [rbp-34h]
unsigned long long v17; // [rsp+10h] [rbp-30h]
v17 = __readfsqword(0x28u);
v6 = *(_QWORD *)(*(_QWORD *)a1 + 928LL);
v7 = v6 + ma_calc_total_blob_length((_QWORD *)a1, (long long)a4) + 92;
v15 = v7;
v8 = **(_QWORD **)(a1 + 120) - (_QWORD)&v15;
v9 = v8 <= v7;
v10 = v8 - v7;
if ( v9 || v10 <= 0x10000 && (v7 < 0x1000 || v10 < 0x8001) )
{
v12 = my_malloc(0LL, v7, &stru_10010);
if ( !v12 )
{
*(_DWORD *)my_thread_var(0LL) = 128;
LOBYTE(a2) = 1;
return (unsigned int)a2;
}
v11 = (char *)v12;
v16 = 0;
}
else
{
v11 = (char *)&v15 - ((v7 + 15) & 0xFFFFFFFFFFFFFFF0LL);
LOBYTE(v10) = 1;
v16 = v10;
}
v13 = ma_rec_pack((unsigned __int8 *)a1, v11 + 24, a4);
if ( v13 )
LOBYTE(a2) = update_dynamic_record((_QWORD *)a1, a2, (long long)(v11 + 24), v13);
else
LOBYTE(a2) = 1;
if ( !(_BYTE)v16 )
my_free(v11);
return (unsigned int)a2;
}
|
_ma_update_blob_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RCX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV R12,qword ptr [RAX + 0x3a0]
MOV RSI,RCX
CALL 0x00149bde
LEA RSI,[R12 + RAX*0x1]
ADD RSI,0x5c
LEA RCX,[RBP + -0x40]
MOV qword ptr [RCX],RSI
MOV RAX,qword ptr [R14 + 0x78]
MOV RAX,qword ptr [RAX]
SUB RAX,RCX
SUB RAX,RSI
JBE 0x00149cf0
CMP RAX,0x10000
JA 0x00149cd8
CMP RSI,0x1000
JC 0x00149cf0
CMP RAX,0x8001
JC 0x00149cf0
LAB_00149cd8:
MOV R12,RSP
ADD RSI,0xf
AND RSI,-0x10
SUB R12,RSI
MOV RSP,R12
MOV AL,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x00149d0b
LAB_00149cf0:
MOV EDX,0x10010
XOR EDI,EDI
CALL 0x001c3acd
TEST RAX,RAX
JZ 0x00149d4b
MOV R12,RAX
MOV dword ptr [RBP + -0x34],0x0
LAB_00149d0b:
LEA R13,[R12 + 0x18]
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
CALL 0x00149251
TEST EAX,EAX
JZ 0x00149d39
MOV ECX,EAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R13
CALL 0x001496e6
TEST AL,AL
SETNZ BL
JMP 0x00149d3b
LAB_00149d39:
MOV BL,0x1
LAB_00149d3b:
CMP byte ptr [RBP + -0x34],0x0
JNZ 0x00149d58
MOV RDI,R12
CALL 0x001c3cfa
JMP 0x00149d58
LAB_00149d4b:
CALL 0x001c5c9a
MOV dword ptr [RAX],0x80
MOV BL,0x1
LAB_00149d58:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00149d78
MOV EAX,EBX
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00149d78:
CALL 0x0012b280
|
ulong _ma_update_blob_record(long *param_1,int8 param_2,int8 param_3,int8 param_4)
{
long lVar1;
char cVar2;
int iVar3;
long lVar4;
ulong uVar5;
int1 *puVar6;
int4 *puVar7;
int7 uVar8;
ulong *puVar9;
long in_FS_OFFSET;
ulong local_48;
int4 local_3c;
long local_38;
puVar9 = &local_48;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *(long *)(*param_1 + 0x3a0);
lVar4 = _ma_calc_total_blob_length(param_1,param_4);
lVar1 = lVar1 + lVar4;
local_48 = lVar1 + 0x5c;
uVar5 = (*(long *)param_1[0xf] - (long)&local_48) - local_48;
uVar8 = (int7)((ulong)param_2 >> 8);
if (((ulong)(*(long *)param_1[0xf] - (long)&local_48) < local_48 || uVar5 == 0) ||
((uVar5 < 0x10001 && ((local_48 < 0x1000 || (uVar5 < 0x8001)))))) {
puVar6 = (int1 *)my_malloc(0,local_48,0x10010);
if (puVar6 == (int1 *)0x0) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x80;
uVar5 = CONCAT71(uVar8,1);
goto LAB_00149d58;
}
local_3c = 0;
puVar9 = &local_48;
}
else {
puVar6 = (int1 *)((long)&local_48 - (lVar1 + 0x6bU & 0xfffffffffffffff0));
local_3c = (int4)CONCAT71((int7)(uVar5 >> 8),1);
puVar9 = (ulong *)puVar6;
}
*(int8 *)((long)puVar9 + -8) = 0x149d1e;
iVar3 = _ma_rec_pack(param_1,puVar6 + 0x18,param_4);
if (iVar3 == 0) {
uVar5 = CONCAT71(uVar8,1);
}
else {
*(int8 *)((long)puVar9 + -8) = 0x149d32;
cVar2 = update_dynamic_record(param_1,param_2,puVar6 + 0x18,iVar3);
uVar5 = CONCAT71(uVar8,cVar2 != '\0');
}
if ((char)local_3c == '\0') {
*(int8 *)((long)puVar9 + -8) = 0x149d49;
my_free(puVar6);
}
LAB_00149d58:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar5 & 0xffffffff;
}
/* WARNING: Subroutine does not return */
*(code **)((long)puVar9 + -8) = _ma_delete_dynamic_record;
__stack_chk_fail();
}
|
|
10,539 |
coro::io_scheduler::event_to_poll_status(unsigned int)
|
AlayaLite/build_O3/_deps/libcoro-src/src/io_scheduler.cpp
|
auto io_scheduler::event_to_poll_status(uint32_t events) -> poll_status
{
if (events & EPOLLIN || events & EPOLLOUT)
{
return poll_status::event;
}
else if (events & EPOLLERR)
{
return poll_status::error;
}
else if (events & EPOLLRDHUP || events & EPOLLHUP)
{
return poll_status::closed;
}
throw std::runtime_error{"invalid epoll state"};
}
|
O3
|
cpp
|
coro::io_scheduler::event_to_poll_status(unsigned int):
pushq %r14
pushq %rbx
pushq %rax
xorl %eax, %eax
testb $0x5, %dil
jne 0x775c
movl $0x2, %eax
testb $0x8, %dil
jne 0x775c
movl $0x3, %eax
testl $0x2010, %edi # imm = 0x2010
je 0x7764
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x3150
movq %rax, %rbx
leaq 0x2d1b(%rip), %rsi # 0xa493
movq %rax, %rdi
callq 0x3100
movq 0x8869(%rip), %rsi # 0xfff0
movq 0x880a(%rip), %rdx # 0xff98
movq %rbx, %rdi
callq 0x3410
movq %rax, %r14
movq %rbx, %rdi
callq 0x3200
movq %r14, %rdi
callq 0x3430
nop
|
_ZN4coro12io_scheduler20event_to_poll_statusEj:
push r14
push rbx
push rax
xor eax, eax
test dil, 5
jnz short loc_775C
mov eax, 2
test dil, 8
jnz short loc_775C
mov eax, 3
test edi, 2010h
jz short loc_7764
loc_775C:
add rsp, 8
pop rbx
pop r14
retn
loc_7764:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aInvalidEpollSt; "invalid epoll state"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
|
long long coro::io_scheduler::event_to_poll_status(coro::io_scheduler *this)
{
long long result; // rax
std::runtime_error *exception; // rbx
result = 0LL;
if ( ((unsigned __int8)this & 5) == 0 )
{
result = 2LL;
if ( ((unsigned __int8)this & 8) == 0 )
{
result = 3LL;
if ( ((unsigned __int16)this & 0x2010) == 0 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "invalid epoll state");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
}
}
return result;
}
|
event_to_poll_status:
PUSH R14
PUSH RBX
PUSH RAX
XOR EAX,EAX
TEST DIL,0x5
JNZ 0x0010775c
MOV EAX,0x2
TEST DIL,0x8
JNZ 0x0010775c
MOV EAX,0x3
TEST EDI,0x2010
JZ 0x00107764
LAB_0010775c:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00107764:
MOV EDI,0x10
CALL 0x00103150
MOV RBX,RAX
LAB_00107771:
LEA RSI,[0x10a493]
MOV RDI,RAX
CALL 0x00103100
LAB_00107780:
MOV RSI,qword ptr [0x0010fff0]
MOV RDX,qword ptr [0x0010ff98]
MOV RDI,RBX
CALL 0x00103410
|
/* coro::io_scheduler::event_to_poll_status(unsigned int) */
int8 coro::io_scheduler::event_to_poll_status(uint param_1)
{
int8 uVar1;
runtime_error *this;
uVar1 = 0;
if ((((param_1 & 5) == 0) && (uVar1 = 2, (param_1 & 8) == 0)) &&
(uVar1 = 3, (param_1 & 0x2010) == 0)) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00107771 to 0010777f has its CatchHandler @ 00107796 */
std::runtime_error::runtime_error(this,"invalid epoll state");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0010fff0,PTR__runtime_error_0010ff98);
}
return uVar1;
}
|
|
10,540 |
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 0x1e946c(%rip), %rax # 0x2c00b8
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 0xd6d5f
leaq 0x1e9422(%rip), %rax # 0x2c00b8
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 0xf4630
movq %rax, -0x38(%rbp)
movq 0x10(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xd6d0a
cmpq $0x0, -0x38(%rbp)
jne 0xd6cef
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0xd6cfa
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0xd6cfa
movq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0xd6d37
cmpq $-0x1, -0x38(%rbp)
je 0xd6d1e
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0xd6d29
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0xd6d29
movq -0xa0(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x1e937a(%rip), %rax # 0x2c00b8
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 0xd6d83
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0xf4630
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_8:
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_D6D5F
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_D6D0A
cmp [rbp+var_38], 0
jnz short loc_D6CEF
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
jmp short loc_D6CFA
loc_D6CEF:
xor eax, eax
mov [rbp+var_98], rax
jmp short $+2
loc_D6CFA:
mov rax, [rbp+var_98]
mov [rbp+var_90], rax
jmp short loc_D6D37
loc_D6D0A:
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jz short loc_D6D1E
mov rax, [rbp+var_38]
mov [rbp+var_A0], rax
jmp short loc_D6D29
loc_D6D1E:
xor eax, eax
mov [rbp+var_A0], rax
jmp short $+2
loc_D6D29:
mov rax, [rbp+var_A0]
mov [rbp+var_90], rax
loc_D6D37:
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_D6D83
loc_D6D5F:
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_D6D83:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
|
long long inline_mysql_file_pread_8(
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,[0x3c00b8]
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 0x001d6d5f
LEA RAX,[0x3c00b8]
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 0x001f4630
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + 0x10]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001d6d0a
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x001d6cef
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x001d6cfa
LAB_001d6cef:
XOR EAX,EAX
MOV qword ptr [RBP + -0x98],RAX
JMP 0x001d6cfa
LAB_001d6cfa:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x90],RAX
JMP 0x001d6d37
LAB_001d6d0a:
CMP qword ptr [RBP + -0x38],-0x1
JZ 0x001d6d1e
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x001d6d29
LAB_001d6d1e:
XOR EAX,EAX
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x001d6d29
LAB_001d6d29:
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x90],RAX
LAB_001d6d37:
LEA RAX,[0x3c00b8]
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 0x001d6d83
LAB_001d6d5f:
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 0x001f4630
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_001d6d83:
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;
}
|
|
10,541 |
utf8ncasecmp
|
xtate/src/util-data/../util-data/utf8.h
|
utf8_constexpr14_impl int utf8ncasecmp(const utf8_int8_t *src1,
const utf8_int8_t *src2, size_t n) {
utf8_int32_t src1_lwr_cp = 0, src2_lwr_cp = 0, src1_upr_cp = 0,
src2_upr_cp = 0, src1_orig_cp = 0, src2_orig_cp = 0;
do {
const utf8_int8_t *const s1 = src1;
const utf8_int8_t *const s2 = src2;
/* first check that we have enough bytes left in n to contain an entire
* codepoint */
if (0 == n) {
return 0;
}
if ((1 == n) && ((0xc0 == (0xe0 & *s1)) || (0xc0 == (0xe0 & *s2)))) {
const utf8_int32_t c1 = (0xe0 & *s1);
const utf8_int32_t c2 = (0xe0 & *s2);
if (c1 != c2) {
return c1 - c2;
} else {
return 0;
}
}
if ((2 >= n) && ((0xe0 == (0xf0 & *s1)) || (0xe0 == (0xf0 & *s2)))) {
const utf8_int32_t c1 = (0xf0 & *s1);
const utf8_int32_t c2 = (0xf0 & *s2);
if (c1 != c2) {
return c1 - c2;
} else {
return 0;
}
}
if ((3 >= n) && ((0xf0 == (0xf8 & *s1)) || (0xf0 == (0xf8 & *s2)))) {
const utf8_int32_t c1 = (0xf8 & *s1);
const utf8_int32_t c2 = (0xf8 & *s2);
if (c1 != c2) {
return c1 - c2;
} else {
return 0;
}
}
src1 = utf8codepoint(src1, &src1_orig_cp);
src2 = utf8codepoint(src2, &src2_orig_cp);
n -= utf8codepointsize(src1_orig_cp);
src1_lwr_cp = utf8lwrcodepoint(src1_orig_cp);
src2_lwr_cp = utf8lwrcodepoint(src2_orig_cp);
src1_upr_cp = utf8uprcodepoint(src1_orig_cp);
src2_upr_cp = utf8uprcodepoint(src2_orig_cp);
/* check if the lowered codepoints match */
if ((0 == src1_orig_cp) && (0 == src2_orig_cp)) {
return 0;
} else if ((src1_lwr_cp == src2_lwr_cp) ||
(src1_upr_cp == src2_upr_cp)) {
continue;
}
/* if they don't match, then we return the difference between the
* characters
*/
return src1_lwr_cp - src2_lwr_cp;
} while (0 < n);
/* both utf8 strings matched */
return 0;
}
|
O3
|
c
|
utf8ncasecmp:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r12
xorl %eax, %eax
leaq 0x8(%rsp), %rcx
movl %eax, (%rcx)
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
cmpq $0x1, %rbx
je 0x4e2dc
testq %rbx, %rbx
je 0x4e3c8
cmpq $0x2, %rbx
ja 0x4e3b3
movb (%rdi), %al
movb (%r12), %cl
jmp 0x4e304
movzbl (%rdi), %eax
movl %eax, %edx
andl $-0x20, %edx
movb (%r12), %cl
movl %ecx, %esi
andb $-0x20, %sil
cmpl $0xc0, %edx
je 0x4e3f4
cmpb $-0x40, %sil
je 0x4e3f1
movl %eax, %edx
andb $-0x10, %dl
movl %ecx, %esi
andb $-0x10, %sil
cmpb $-0x20, %dl
je 0x4e3e2
cmpb $-0x20, %sil
je 0x4e3df
andb $-0x8, %al
andb $-0x8, %cl
cmpb $-0x10, %al
je 0x4e3ce
cmpb $-0x10, %cl
je 0x4e3cc
leaq 0x8(%rsp), %rsi
callq 0x4d73c
movq %rax, 0x10(%rsp)
movq %r12, %rdi
leaq 0xc(%rsp), %rsi
callq 0x4d73c
movq %rax, %r12
movl 0x8(%rsp), %edi
callq 0x4e414
movq %rax, %r14
movl 0x8(%rsp), %edi
callq 0x4d7e4
movl %eax, %ebp
movl 0xc(%rsp), %edi
callq 0x4d7e4
movl %eax, %r13d
movl 0x8(%rsp), %edi
callq 0x4db6e
movl %eax, %r15d
movl 0xc(%rsp), %edi
callq 0x4db6e
movl 0xc(%rsp), %ecx
orl 0x8(%rsp), %ecx
je 0x4e3c8
subl %r13d, %ebp
je 0x4e3a3
cmpl %eax, %r15d
jne 0x4e403
subq %r14, %rbx
movq 0x10(%rsp), %rdi
jne 0x4e2bb
jmp 0x4e3c8
cmpq $0x3, %rbx
jne 0x4e338
movb (%rdi), %al
movb (%r12), %cl
jmp 0x4e322
xorl %ebp, %ebp
jmp 0x4e403
movb $-0x10, %cl
movzbl %cl, %ecx
movzbl %al, %edx
subl %ecx, %edx
xorl %ebp, %ebp
cmpb %cl, %al
cmovnel %edx, %ebp
jmp 0x4e403
movb $-0x20, %sil
movzbl %sil, %eax
movzbl %dl, %ecx
subl %eax, %ecx
xorl %ebp, %ebp
cmpb %al, %dl
jmp 0x4e400
movb $-0x40, %sil
movzbl %sil, %eax
movl %edx, %ecx
subl %eax, %ecx
xorl %ebp, %ebp
cmpb %al, %dl
cmovnel %ecx, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
utf8ncasecmp:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r12, rsi
xor eax, eax
lea rcx, [rsp+48h+var_40]
mov [rcx], eax
lea rcx, [rsp+48h+var_3C]
mov [rcx], eax
loc_4E2BB:
cmp rbx, 1
jz short loc_4E2DC
test rbx, rbx
jz loc_4E3C8
cmp rbx, 2
ja loc_4E3B3
mov al, [rdi]
mov cl, [r12]
jmp short loc_4E304
loc_4E2DC:
movzx eax, byte ptr [rdi]
mov edx, eax
and edx, 0FFFFFFE0h
mov cl, [r12]
mov esi, ecx
and sil, 0E0h
cmp edx, 0C0h
jz loc_4E3F4
cmp sil, 0C0h
jz loc_4E3F1
loc_4E304:
mov edx, eax
and dl, 0F0h
mov esi, ecx
and sil, 0F0h
cmp dl, 0E0h
jz loc_4E3E2
cmp sil, 0E0h
jz loc_4E3DF
loc_4E322:
and al, 0F8h
and cl, 0F8h
cmp al, 0F0h
jz loc_4E3CE
cmp cl, 0F0h
jz loc_4E3CC
loc_4E338:
lea rsi, [rsp+48h+var_40]
call utf8codepoint
mov [rsp+48h+var_38], rax
mov rdi, r12
lea rsi, [rsp+48h+var_3C]
call utf8codepoint
mov r12, rax
mov edi, [rsp+48h+var_40]
call utf8codepointsize
mov r14, rax
mov edi, [rsp+48h+var_40]
call utf8lwrcodepoint
mov ebp, eax
mov edi, [rsp+48h+var_3C]
call utf8lwrcodepoint
mov r13d, eax
mov edi, [rsp+48h+var_40]
call utf8uprcodepoint
mov r15d, eax
mov edi, [rsp+48h+var_3C]
call utf8uprcodepoint
mov ecx, [rsp+48h+var_3C]
or ecx, [rsp+48h+var_40]
jz short loc_4E3C8
sub ebp, r13d
jz short loc_4E3A3
cmp r15d, eax
jnz short loc_4E403
loc_4E3A3:
sub rbx, r14
mov rdi, [rsp+48h+var_38]
jnz loc_4E2BB
jmp short loc_4E3C8
loc_4E3B3:
cmp rbx, 3
jnz loc_4E338
mov al, [rdi]
mov cl, [r12]
jmp loc_4E322
loc_4E3C8:
xor ebp, ebp
jmp short loc_4E403
loc_4E3CC:
mov cl, 0F0h
loc_4E3CE:
movzx ecx, cl
movzx edx, al
sub edx, ecx
xor ebp, ebp
cmp al, cl
cmovnz ebp, edx
jmp short loc_4E403
loc_4E3DF:
mov sil, 0E0h
loc_4E3E2:
movzx eax, sil
movzx ecx, dl
sub ecx, eax
xor ebp, ebp
cmp dl, al
jmp short loc_4E400
loc_4E3F1:
mov sil, 0C0h
loc_4E3F4:
movzx eax, sil
mov ecx, edx
sub ecx, eax
xor ebp, ebp
cmp dl, al
loc_4E400:
cmovnz ebp, ecx
loc_4E403:
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long utf8ncasecmp(char *a1, char *a2, unsigned long long a3)
{
char v5; // al
char v6; // cl
int v7; // edx
unsigned __int8 v8; // si
unsigned __int8 v9; // dl
unsigned __int8 v10; // si
unsigned __int8 v11; // al
unsigned __int8 v12; // cl
long long v13; // r14
int v14; // ebp
int v15; // r13d
int v16; // r15d
int v17; // eax
unsigned int v18; // ebp
unsigned int v19; // ecx
bool v20; // zf
long long v22; // [rsp+8h] [rbp-40h] BYREF
char *v23; // [rsp+10h] [rbp-38h]
v22 = 0LL;
while ( a3 != 1 )
{
if ( !a3 )
return 0;
if ( a3 <= 2 )
{
v5 = *a1;
v6 = *a2;
goto LABEL_8;
}
if ( a3 != 3 )
goto LABEL_12;
v5 = *a1;
v6 = *a2;
LABEL_10:
v11 = v5 & 0xF8;
v12 = v6 & 0xF8;
if ( v11 == 0xF0 )
goto LABEL_21;
if ( v12 == 0xF0 )
{
v12 = -16;
LABEL_21:
v18 = 0;
if ( v11 != v12 )
return v11 - (unsigned int)v12;
return v18;
}
LABEL_12:
v23 = utf8codepoint(a1, (int *)&v22);
a2 = utf8codepoint(a2, (int *)&v22 + 1);
v13 = utf8codepointsize((unsigned int)v22);
v14 = utf8lwrcodepoint(v22);
v15 = utf8lwrcodepoint(SHIDWORD(v22));
v16 = utf8uprcodepoint(v22);
v17 = utf8uprcodepoint(SHIDWORD(v22));
if ( v22 )
{
v18 = v14 - v15;
if ( v18 && v16 != v17 )
return v18;
a3 -= v13;
a1 = v23;
if ( a3 )
continue;
}
return 0;
}
v5 = *a1;
v7 = *a1 & 0xE0;
v6 = *a2;
v8 = *a2 & 0xE0;
if ( v7 == 192 )
goto LABEL_27;
if ( v8 == 0xC0 )
{
v8 = -64;
LABEL_27:
v19 = v7 - v8;
v18 = 0;
v20 = (_BYTE)v7 == v8;
goto LABEL_28;
}
LABEL_8:
v9 = v5 & 0xF0;
v10 = v6 & 0xF0;
if ( (v5 & 0xF0) == 0xE0 )
goto LABEL_25;
if ( v10 != 0xE0 )
goto LABEL_10;
v10 = -32;
LABEL_25:
v19 = v9 - v10;
v18 = 0;
v20 = v9 == v10;
LABEL_28:
if ( !v20 )
return v19;
return v18;
}
|
utf8ncasecmp:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R12,RSI
XOR EAX,EAX
LEA RCX,[RSP + 0x8]
MOV dword ptr [RCX],EAX
LEA RCX,[RSP + 0xc]
MOV dword ptr [RCX],EAX
LAB_0014e2bb:
CMP RBX,0x1
JZ 0x0014e2dc
TEST RBX,RBX
JZ 0x0014e3c8
CMP RBX,0x2
JA 0x0014e3b3
MOV AL,byte ptr [RDI]
MOV CL,byte ptr [R12]
JMP 0x0014e304
LAB_0014e2dc:
MOVZX EAX,byte ptr [RDI]
MOV EDX,EAX
AND EDX,0xffffffe0
MOV CL,byte ptr [R12]
MOV ESI,ECX
AND SIL,0xe0
CMP EDX,0xc0
JZ 0x0014e3f4
CMP SIL,0xc0
JZ 0x0014e3f1
LAB_0014e304:
MOV EDX,EAX
AND DL,0xf0
MOV ESI,ECX
AND SIL,0xf0
CMP DL,0xe0
JZ 0x0014e3e2
CMP SIL,0xe0
JZ 0x0014e3df
LAB_0014e322:
AND AL,0xf8
AND CL,0xf8
CMP AL,0xf0
JZ 0x0014e3ce
CMP CL,0xf0
JZ 0x0014e3cc
LAB_0014e338:
LEA RSI,[RSP + 0x8]
CALL 0x0014d73c
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,R12
LEA RSI,[RSP + 0xc]
CALL 0x0014d73c
MOV R12,RAX
MOV EDI,dword ptr [RSP + 0x8]
CALL 0x0014e414
MOV R14,RAX
MOV EDI,dword ptr [RSP + 0x8]
CALL 0x0014d7e4
MOV EBP,EAX
MOV EDI,dword ptr [RSP + 0xc]
CALL 0x0014d7e4
MOV R13D,EAX
MOV EDI,dword ptr [RSP + 0x8]
CALL 0x0014db6e
MOV R15D,EAX
MOV EDI,dword ptr [RSP + 0xc]
CALL 0x0014db6e
MOV ECX,dword ptr [RSP + 0xc]
OR ECX,dword ptr [RSP + 0x8]
JZ 0x0014e3c8
SUB EBP,R13D
JZ 0x0014e3a3
CMP R15D,EAX
JNZ 0x0014e403
LAB_0014e3a3:
SUB RBX,R14
MOV RDI,qword ptr [RSP + 0x10]
JNZ 0x0014e2bb
JMP 0x0014e3c8
LAB_0014e3b3:
CMP RBX,0x3
JNZ 0x0014e338
MOV AL,byte ptr [RDI]
MOV CL,byte ptr [R12]
JMP 0x0014e322
LAB_0014e3c8:
XOR EBP,EBP
JMP 0x0014e403
LAB_0014e3cc:
MOV CL,0xf0
LAB_0014e3ce:
MOVZX ECX,CL
MOVZX EDX,AL
SUB EDX,ECX
XOR EBP,EBP
CMP AL,CL
CMOVNZ EBP,EDX
JMP 0x0014e403
LAB_0014e3df:
MOV SIL,0xe0
LAB_0014e3e2:
MOVZX EAX,SIL
MOVZX ECX,DL
SUB ECX,EAX
XOR EBP,EBP
CMP DL,AL
JMP 0x0014e400
LAB_0014e3f1:
MOV SIL,0xc0
LAB_0014e3f4:
MOVZX EAX,SIL
MOV ECX,EDX
SUB ECX,EAX
XOR EBP,EBP
CMP DL,AL
LAB_0014e400:
CMOVNZ EBP,ECX
LAB_0014e403:
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int utf8ncasecmp(byte *param_1,byte *param_2,ulong param_3)
{
byte bVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
long lVar6;
byte bVar7;
uint uVar8;
byte bVar9;
bool bVar10;
int local_40;
int local_3c;
byte *local_38;
local_40 = 0;
local_3c = 0;
do {
if (param_3 == 1) {
bVar1 = *param_1;
uVar8 = bVar1 & 0xffffffe0;
bVar7 = *param_2;
bVar9 = bVar7 & 0xe0;
if (uVar8 != 0xc0) {
if (bVar9 != 0xc0) goto LAB_0014e304;
bVar9 = 0xc0;
}
iVar2 = uVar8 - bVar9;
bVar10 = (byte)uVar8 == bVar9;
goto LAB_0014e400;
}
if (param_3 == 0) {
return 0;
}
if (param_3 < 3) {
bVar1 = *param_1;
bVar7 = *param_2;
LAB_0014e304:
bVar9 = bVar7 & 0xf0;
if ((bVar1 & 0xf0) != 0xe0) {
if (bVar9 != 0xe0) goto LAB_0014e322;
bVar9 = 0xe0;
}
iVar2 = (bVar1 & 0xf0) - (uint)bVar9;
bVar10 = (bVar1 & 0xf0) == bVar9;
LAB_0014e400:
if (!bVar10) {
return iVar2;
}
return 0;
}
if (param_3 == 3) {
bVar1 = *param_1;
bVar7 = *param_2;
LAB_0014e322:
bVar1 = bVar1 & 0xf8;
bVar7 = bVar7 & 0xf8;
if (bVar1 == 0xf0) {
LAB_0014e3ce:
if (bVar1 != bVar7) {
return (uint)bVar1 - (uint)bVar7;
}
return 0;
}
if (bVar7 == 0xf0) {
bVar7 = 0xf0;
goto LAB_0014e3ce;
}
}
local_38 = (byte *)utf8codepoint(param_1,&local_40);
param_2 = (byte *)utf8codepoint(param_2,&local_3c);
lVar6 = utf8codepointsize(local_40);
iVar2 = utf8lwrcodepoint(local_40);
iVar3 = utf8lwrcodepoint(local_3c);
iVar4 = utf8uprcodepoint(local_40);
iVar5 = utf8uprcodepoint(local_3c);
if (local_3c == 0 && local_40 == 0) {
return 0;
}
if ((iVar2 - iVar3 != 0) && (iVar4 != iVar5)) {
return iVar2 - iVar3;
}
param_3 = param_3 - lVar6;
param_1 = local_38;
if (param_3 == 0) {
return 0;
}
} while( true );
}
|
|
10,542 |
tdc_iterate(THD*, char (*)(void*, void*), void*, bool)
|
eloqsql/sql/table_cache.cc
|
int tdc_iterate(THD *thd, my_hash_walk_action action, void *argument,
bool no_dups)
{
eliminate_duplicates_arg no_dups_argument;
LF_PINS *pins;
myf alloc_flags= 0;
uint hash_flags= HASH_UNIQUE;
int res;
if (thd)
{
fix_thd_pins(thd);
pins= thd->tdc_hash_pins;
alloc_flags= MY_THREAD_SPECIFIC;
hash_flags|= HASH_THREAD_SPECIFIC;
}
else
pins= lf_hash_get_pins(&tdc_hash);
if (!pins)
return ER_OUTOFMEMORY;
if (no_dups)
{
init_alloc_root(PSI_INSTRUMENT_ME, &no_dups_argument.root, 4096, 4096, MYF(alloc_flags));
my_hash_init(PSI_INSTRUMENT_ME, &no_dups_argument.hash, &my_charset_bin,
tdc_records(), 0, 0, eliminate_duplicates_get_key, 0,
hash_flags);
no_dups_argument.action= action;
no_dups_argument.argument= argument;
action= (my_hash_walk_action) eliminate_duplicates;
argument= &no_dups_argument;
}
res= lf_hash_iterate(&tdc_hash, pins, action, argument);
if (!thd)
lf_hash_put_pins(pins);
if (no_dups)
{
my_hash_free(&no_dups_argument.hash);
free_root(&no_dups_argument.root, MYF(0));
}
return res;
}
|
O0
|
cpp
|
tdc_iterate(THD*, char (*)(void*, void*), void*, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq $0x0, -0xf8(%rbp)
movl $0x1, -0xfc(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xc2c5c1
movq -0x10(%rbp), %rdi
callq 0xc2d900
movq -0x10(%rbp), %rax
movq 0x61d0(%rax), %rax
movq %rax, -0xf0(%rbp)
movq $0x10000, -0xf8(%rbp) # imm = 0x10000
movl -0xfc(%rbp), %eax
orl $0x2, %eax
movl %eax, -0xfc(%rbp)
jmp 0xc2c5d8
leaq 0x114f7e8(%rip), %rdi # 0x1d7bdb0
addq $0x28, %rdi
callq 0x13311d0
movq %rax, -0xf0(%rbp)
cmpq $0x0, -0xf0(%rbp)
jne 0xc2c5ee
movl $0x40d, -0x4(%rbp) # imm = 0x40D
jmp 0xc2c704
testb $0x1, -0x21(%rbp)
je 0xc2c6a1
leaq -0xe8(%rbp), %rsi
addq $0x70, %rsi
movq -0xf8(%rbp), %r8
xorl %edi, %edi
movl $0x1000, %ecx # imm = 0x1000
movq %rcx, %rdx
callq 0x1318ea0
leaq -0xe8(%rbp), %rax
movq %rax, -0x108(%rbp)
callq 0xc2d480
movq -0x108(%rbp), %rsi
movq %rax, %r8
movl -0xfc(%rbp), %eax
xorl %edx, %edx
leaq 0xf5f7cb(%rip), %rcx # 0x1b8be10
xorl %edi, %edi
movl %edi, %r9d
leaq 0x1f9f(%rip), %r10 # 0xc2e5f0
movl %edx, %edi
movq $0x0, (%rsp)
movq %r10, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movl %eax, 0x20(%rsp)
callq 0x1306d70
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x1f9e(%rip), %rax # 0xc2e630
movq %rax, -0x18(%rbp)
leaq -0xe8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0xf0(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0x114f6f9(%rip), %rdi # 0x1d7bdb0
callq 0x13330d0
movl %eax, -0x100(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xc2c6d5
movq -0xf0(%rbp), %rdi
callq 0x1331330
testb $0x1, -0x21(%rbp)
je 0xc2c6fb
leaq -0xe8(%rbp), %rdi
callq 0x1306e80
leaq -0xe8(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1319710
movl -0x100(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x130, %rsp # imm = 0x130
popq %rbp
retq
|
_Z11tdc_iterateP3THDPFcPvS1_ES1_b:
push rbp
mov rbp, rsp
sub rsp, 130h
mov al, cl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
and al, 1
mov [rbp+var_21], al
mov [rbp+var_F8], 0
mov [rbp+var_FC], 1
cmp [rbp+var_10], 0
jz short loc_C2C5C1
mov rdi, [rbp+var_10]; THD *
call _ZL12fix_thd_pinsP3THD; fix_thd_pins(THD *)
mov rax, [rbp+var_10]
mov rax, [rax+61D0h]
mov [rbp+var_F0], rax
mov [rbp+var_F8], 10000h
mov eax, [rbp+var_FC]
or eax, 2
mov [rbp+var_FC], eax
jmp short loc_C2C5D8
loc_C2C5C1:
lea rdi, _ZL8tdc_hash; tdc_hash
add rdi, 28h ; '('
call lf_pinbox_get_pins
mov [rbp+var_F0], rax
loc_C2C5D8:
cmp [rbp+var_F0], 0
jnz short loc_C2C5EE
mov [rbp+var_4], 40Dh
jmp loc_C2C704
loc_C2C5EE:
test [rbp+var_21], 1
jz loc_C2C6A1
lea rsi, [rbp+var_E8]
add rsi, 70h ; 'p'
mov r8, [rbp+var_F8]
xor edi, edi
mov ecx, 1000h
mov rdx, rcx
call init_alloc_root
lea rax, [rbp+var_E8]
mov [rbp+var_108], rax
call _Z11tdc_recordsv; tdc_records(void)
mov rsi, [rbp+var_108]
mov r8, rax
mov eax, [rbp+var_FC]
xor edx, edx
lea rcx, my_charset_bin
xor edi, edi
mov r9d, edi
lea r10, _ZL28eliminate_duplicates_get_keyPKhPmc; eliminate_duplicates_get_key(uchar const*,ulong *,char)
mov edi, edx
mov [rsp+130h+var_130], 0
mov [rsp+130h+var_128], r10
mov [rsp+130h+var_120], 0
mov [rsp+130h+var_118], 0
mov [rsp+130h+var_110], eax
call my_hash_init2
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
lea rax, _ZL20eliminate_duplicatesP11TDC_elementP24eliminate_duplicates_arg; eliminate_duplicates(TDC_element *,eliminate_duplicates_arg *)
mov [rbp+var_18], rax
lea rax, [rbp+var_E8]
mov [rbp+var_20], rax
loc_C2C6A1:
mov rsi, [rbp+var_F0]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
lea rdi, _ZL8tdc_hash; tdc_hash
call lf_hash_iterate
mov [rbp+var_100], eax
cmp [rbp+var_10], 0
jnz short loc_C2C6D5
mov rdi, [rbp+var_F0]
call lf_pinbox_put_pins
loc_C2C6D5:
test [rbp+var_21], 1
jz short loc_C2C6FB
lea rdi, [rbp+var_E8]
call my_hash_free
lea rdi, [rbp+var_E8]
add rdi, 70h ; 'p'
xor eax, eax
mov esi, eax
call free_root
loc_C2C6FB:
mov eax, [rbp+var_100]
mov [rbp+var_4], eax
loc_C2C704:
mov eax, [rbp+var_4]
add rsp, 130h
pop rbp
retn
|
long long tdc_iterate(THD *a1, long long ( *a2)(), _BYTE *a3, char a4)
{
int v4; // eax
unsigned int v6; // [rsp+30h] [rbp-100h]
int v7; // [rsp+34h] [rbp-FCh]
long long v8; // [rsp+38h] [rbp-F8h]
long long pins; // [rsp+40h] [rbp-F0h]
_BYTE v10[112]; // [rsp+48h] [rbp-E8h] BYREF
_QWORD v11[10]; // [rsp+B8h] [rbp-78h] BYREF
char v12; // [rsp+10Fh] [rbp-21h]
_BYTE *v13; // [rsp+110h] [rbp-20h]
long long ( *v14)(); // [rsp+118h] [rbp-18h]
THD *v15; // [rsp+120h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4 & 1;
v8 = 0LL;
v7 = 1;
if ( a1 )
{
fix_thd_pins(v15);
pins = *((_QWORD *)v15 + 3130);
v8 = 0x10000LL;
v7 = 3;
}
else
{
pins = lf_pinbox_get_pins((char *)&tdc_hash + 40);
}
if ( pins )
{
if ( (v12 & 1) != 0 )
{
init_alloc_root(0LL, v11, 4096LL, 4096LL, v8);
v4 = tdc_records();
my_hash_init2(
0,
(unsigned int)v10,
0,
(unsigned int)&my_charset_bin,
v4,
0,
0LL,
(long long)eliminate_duplicates_get_key,
0LL,
0LL,
v7);
v11[8] = v14;
v11[9] = v13;
v14 = eliminate_duplicates;
v13 = v10;
}
v6 = lf_hash_iterate(&tdc_hash, pins, v14, v13);
if ( !v15 )
lf_pinbox_put_pins(pins);
if ( (v12 & 1) != 0 )
{
my_hash_free(v10);
free_root(v11, 0LL);
}
return v6;
}
else
{
return 1037;
}
}
|
load_time_zone:
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 RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RDI
CALL 0x00875630
MOV RSI,qword ptr [RBP + -0x60]
MOV RDX,RAX
LEA RCX,[0x1d2ecb0]
LEA RDI,[RBP + -0x38]
MOV qword ptr [RBP + -0x58],RDI
CALL 0x0097e860
MOV RSI,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
LAB_00c2c59f:
CALL 0x00c22c60
LAB_00c2c5a4:
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00c2c5aa
LAB_00c2c5aa:
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + 0x78],RCX
CMP qword ptr [RAX + 0x78],0x0
SETZ AL
MOV byte ptr [RBP + -0x69],AL
LEA RDI,[RBP + -0x38]
CALL 0x0091bf40
MOV AL,byte ptr [RBP + -0x69]
AND AL,0x1
ADD RSP,0x70
POP RBP
RET
|
/* Event_basic::load_time_zone(THD*, st_mysql_const_lex_string const*) */
bool __thiscall
Event_basic::load_time_zone(Event_basic *this,THD *param_1,st_mysql_const_lex_string *param_2)
{
char *__s;
long lVar1;
size_t sVar2;
int8 uVar3;
String local_40 [32];
st_mysql_const_lex_string *local_20;
THD *local_18;
Event_basic *local_10;
__s = *(char **)param_2;
local_20 = param_2;
local_18 = param_1;
local_10 = this;
sVar2 = strlen(__s);
String::String(local_40,__s,sVar2,(charset_info_st *)&my_charset_latin1);
/* try { // try from 00c2c59f to 00c2c5a3 has its CatchHandler @ 00c2c5d5 */
uVar3 = my_tz_find(local_18,local_40);
*(int8 *)(this + 0x78) = uVar3;
lVar1 = *(long *)(this + 0x78);
String::~String(local_40);
return lVar1 == 0;
}
|
|
10,543 |
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::~serializer()
|
monkey531[P]llama/common/json.hpp
|
~serializer() = default;
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::~serializer():
pushq %rbx
movq %rdi, %rbx
movq 0x260(%rdi), %rdi
leaq 0x270(%rbx), %rax
cmpq %rax, %rdi
je 0x7c886
movq (%rax), %rsi
incq %rsi
callq 0x186a0
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x7c895
popq %rbx
jmp 0x319fe
popq %rbx
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEED2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+260h]; void *
lea rax, [rbx+270h]
cmp rdi, rax
jz short loc_7C886
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7C886:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_7C895
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7C895:
pop rbx
retn
|
void nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~serializer(
_QWORD *a1)
{
_QWORD *v2; // rdi
volatile signed __int32 *v3; // rdi
v2 = (_QWORD *)a1[76];
if ( v2 != a1 + 78 )
operator delete(v2, a1[78] + 1LL);
v3 = (volatile signed __int32 *)a1[1];
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
|
~serializer:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x260]
LEA RAX,[RBX + 0x270]
CMP RDI,RAX
JZ 0x0017c886
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x001186a0
LAB_0017c886:
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x0017c895
POP RBX
JMP 0x001319fe
LAB_0017c895:
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::~serializer() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::~serializer(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
if (*(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
**)(this + 0x260) != this + 0x270) {
operator_delete(*(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
**)(this + 0x260),*(long *)(this + 0x270) + 1);
}
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8));
return;
}
return;
}
|
|
10,544 |
ftxui::(anonymous namespace)::HBox::ComputeRequirement()
|
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/dom/hbox.cpp
|
void ComputeRequirement() override {
requirement_.min_x = 0;
requirement_.min_y = 0;
requirement_.flex_grow_x = 0;
requirement_.flex_grow_y = 0;
requirement_.flex_shrink_x = 0;
requirement_.flex_shrink_y = 0;
requirement_.selection = Requirement::NORMAL;
for (auto& child : children_) {
child->ComputeRequirement();
if (requirement_.selection < child->requirement().selection) {
requirement_.selection = child->requirement().selection;
requirement_.selected_box = child->requirement().selected_box;
requirement_.selected_box.x_min += requirement_.min_x;
requirement_.selected_box.x_max += requirement_.min_x;
}
requirement_.min_x += child->requirement().min_x;
requirement_.min_y =
std::max(requirement_.min_y, child->requirement().min_y);
}
}
|
O0
|
cpp
|
ftxui::(anonymous namespace)::HBox::ComputeRequirement():
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp # imm = 0x120
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x110(%rbp)
movl $0x0, 0x20(%rax)
movl $0x0, 0x24(%rax)
movl $0x0, 0x28(%rax)
movl $0x0, 0x2c(%rax)
movl $0x0, 0x30(%rax)
movl $0x0, 0x34(%rax)
movl $0x0, 0x38(%rax)
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x24830
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x24670
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x43cc0
testb $0x1, %al
jne 0x43713
jmp 0x43851
leaq -0x18(%rbp), %rdi
callq 0x24d40
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3e6c0
movq %rax, %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq -0x110(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x114(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3e6c0
movq %rax, %rsi
leaq -0x54(%rbp), %rdi
callq 0x3e6e0
movl -0x114(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x437cb
movq -0x28(%rbp), %rdi
callq 0x3e6c0
movq %rax, %rsi
leaq -0x80(%rbp), %rdi
callq 0x3e6e0
movq -0x110(%rbp), %rax
movl -0x68(%rbp), %ecx
movl %ecx, 0x38(%rax)
movq -0x28(%rbp), %rdi
callq 0x3e6c0
movq %rax, %rsi
leaq -0xac(%rbp), %rdi
callq 0x3e6e0
movq -0x110(%rbp), %rax
movq -0x90(%rbp), %rcx
movq %rcx, 0x3c(%rax)
movq -0x88(%rbp), %rcx
movq %rcx, 0x44(%rax)
movl 0x20(%rax), %ecx
addl 0x3c(%rax), %ecx
movl %ecx, 0x3c(%rax)
movl 0x20(%rax), %ecx
addl 0x40(%rax), %ecx
movl %ecx, 0x40(%rax)
movq -0x28(%rbp), %rdi
callq 0x3e6c0
movq %rax, %rsi
leaq -0xd8(%rbp), %rdi
callq 0x3e6e0
movq -0x110(%rbp), %rax
movl -0xd8(%rbp), %ecx
addl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
addq $0x20, %rax
addq $0x4, %rax
movq %rax, -0x120(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3e6c0
movq %rax, %rsi
leaq -0x104(%rbp), %rdi
callq 0x3e6e0
movq -0x120(%rbp), %rdi
leaq -0x104(%rbp), %rsi
addq $0x4, %rsi
callq 0x3e710
movq %rax, %rcx
movq -0x110(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x24(%rax)
leaq -0x18(%rbp), %rdi
callq 0x43d00
jmp 0x436fd
addq $0x120, %rsp # imm = 0x120
popq %rbp
retq
nopw (%rax,%rax)
|
_ZN5ftxui12_GLOBAL__N_14HBox18ComputeRequirementEv:
push rbp
mov rbp, rsp
sub rsp, 120h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_110], rax
mov dword ptr [rax+20h], 0
mov dword ptr [rax+24h], 0
mov dword ptr [rax+28h], 0
mov dword ptr [rax+2Ch], 0
mov dword ptr [rax+30h], 0
mov dword ptr [rax+34h], 0
mov dword ptr [rax+38h], 0
add rax, 8
mov [rbp+var_10], rax
mov rdi, [rbp+var_10]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE5beginEv; std::vector<std::shared_ptr<ftxui::Node>>::begin(void)
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE3endEv; std::vector<std::shared_ptr<ftxui::Node>>::end(void)
mov [rbp+var_20], rax
loc_436FD:
lea rdi, [rbp+var_18]
lea rsi, [rbp+var_20]
call _ZN9__gnu_cxxneIPSt10shared_ptrIN5ftxui4NodeEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<std::shared_ptr<ftxui::Node> *,std::vector<std::shared_ptr<ftxui::Node>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::Node> *,std::vector<std::shared_ptr<ftxui::Node>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::Node> *,std::vector<std::shared_ptr<ftxui::Node>>> const&)
test al, 1
jnz short loc_43713
jmp loc_43851
loc_43713:
lea rdi, [rbp+var_18]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN5ftxui4NodeEESt6vectorIS4_SaIS4_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::Node> *,std::vector<std::shared_ptr<ftxui::Node>>>::operator*(void)
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
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 rax, [rdi]
call qword ptr [rax+10h]
mov rax, [rbp+var_110]
mov eax, [rax+38h]
mov [rbp+var_114], eax
mov rdi, [rbp+var_28]
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 rsi, rax
lea rdi, [rbp+var_54]; this
call _ZN5ftxui4Node11requirementEv; ftxui::Node::requirement(void)
mov eax, [rbp+var_114]
cmp eax, [rbp+var_3C]
jge short loc_437CB
mov rdi, [rbp+var_28]
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 rsi, rax
lea rdi, [rbp+var_80]; this
call _ZN5ftxui4Node11requirementEv; ftxui::Node::requirement(void)
mov rax, [rbp+var_110]
mov ecx, [rbp+var_68]
mov [rax+38h], ecx
mov rdi, [rbp+var_28]
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 rsi, rax
lea rdi, [rbp+var_AC]; this
call _ZN5ftxui4Node11requirementEv; ftxui::Node::requirement(void)
mov rax, [rbp+var_110]
mov rcx, [rbp+var_90]
mov [rax+3Ch], rcx
mov rcx, [rbp+var_88]
mov [rax+44h], rcx
mov ecx, [rax+20h]
add ecx, [rax+3Ch]
mov [rax+3Ch], ecx
mov ecx, [rax+20h]
add ecx, [rax+40h]
mov [rax+40h], ecx
loc_437CB:
mov rdi, [rbp+var_28]
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 rsi, rax
lea rdi, [rbp+var_D8]; this
call _ZN5ftxui4Node11requirementEv; ftxui::Node::requirement(void)
mov rax, [rbp+var_110]
mov ecx, [rbp+var_D8]
add ecx, [rax+20h]
mov [rax+20h], ecx
add rax, 20h ; ' '
add rax, 4
mov [rbp+var_120], rax
mov rdi, [rbp+var_28]
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 rsi, rax
lea rdi, [rbp+var_104]; this
call _ZN5ftxui4Node11requirementEv; ftxui::Node::requirement(void)
mov rdi, [rbp+var_120]
lea rsi, [rbp+var_104]
add rsi, 4
call _ZSt3maxIiERKT_S2_S2_; std::max<int>(int const&,int const&)
mov rcx, rax
mov rax, [rbp+var_110]
mov ecx, [rcx]
mov [rax+24h], ecx
lea rdi, [rbp+var_18]
call _ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN5ftxui4NodeEESt6vectorIS4_SaIS4_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::Node> *,std::vector<std::shared_ptr<ftxui::Node>>>::operator++(void)
jmp loc_436FD
loc_43851:
add rsp, 120h
pop rbp
retn
|
long long ftxui::`anonymous namespace'::HBox::ComputeRequirement(ftxui::_anonymous_namespace_::HBox *this)
{
long long result; // rax
long long v2; // rax
long long v3; // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
int v8; // [rsp+Ch] [rbp-114h]
_BYTE v9[4]; // [rsp+1Ch] [rbp-104h] BYREF
_DWORD v10[10]; // [rsp+20h] [rbp-100h] BYREF
_DWORD v11[11]; // [rsp+48h] [rbp-D8h] BYREF
_BYTE v12[28]; // [rsp+74h] [rbp-ACh] BYREF
long long v13; // [rsp+90h] [rbp-90h]
long long v14; // [rsp+98h] [rbp-88h]
_BYTE v15[24]; // [rsp+A0h] [rbp-80h] BYREF
int v16; // [rsp+B8h] [rbp-68h]
_BYTE v17[24]; // [rsp+CCh] [rbp-54h] BYREF
int v18; // [rsp+E4h] [rbp-3Ch]
long long v19; // [rsp+F8h] [rbp-28h]
long long v20; // [rsp+100h] [rbp-20h] BYREF
_QWORD v21[3]; // [rsp+108h] [rbp-18h] BYREF
v21[2] = this;
*((_DWORD *)this + 8) = 0;
*((_DWORD *)this + 9) = 0;
*((_DWORD *)this + 10) = 0;
*((_DWORD *)this + 11) = 0;
*((_DWORD *)this + 12) = 0;
*((_DWORD *)this + 13) = 0;
*((_DWORD *)this + 14) = 0;
v21[1] = (char *)this + 8;
v21[0] = std::vector<std::shared_ptr<ftxui::Node>>::begin((long long)this + 8);
v20 = std::vector<std::shared_ptr<ftxui::Node>>::end((long long)this + 8);
while ( 1 )
{
result = __gnu_cxx::operator!=<std::shared_ptr<ftxui::Node> *,std::vector<std::shared_ptr<ftxui::Node>>>(v21, &v20);
if ( (result & 1) == 0 )
break;
v19 = __gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::Node> *,std::vector<std::shared_ptr<ftxui::Node>>>::operator*((long long)v21);
v2 = std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v19);
(*(void ( **)(long long))(*(_QWORD *)v2 + 16LL))(v2);
v8 = *((_DWORD *)this + 14);
v3 = std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v19);
ftxui::Node::requirement((ftxui::Node *)v17, v3);
if ( v8 < v18 )
{
v4 = std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v19);
ftxui::Node::requirement((ftxui::Node *)v15, v4);
*((_DWORD *)this + 14) = v16;
v5 = std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v19);
ftxui::Node::requirement((ftxui::Node *)v12, v5);
*(_QWORD *)((char *)this + 60) = v13;
*(_QWORD *)((char *)this + 68) = v14;
*((_DWORD *)this + 15) += *((_DWORD *)this + 8);
*((_DWORD *)this + 16) += *((_DWORD *)this + 8);
}
v6 = std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v19);
ftxui::Node::requirement((ftxui::Node *)v11, v6);
*((_DWORD *)this + 8) += v11[0];
v7 = std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v19);
ftxui::Node::requirement((ftxui::Node *)v9, v7);
*((_DWORD *)this + 9) = *std::max<int>((_DWORD *)this + 9, v10);
__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::Node> *,std::vector<std::shared_ptr<ftxui::Node>>>::operator++(v21);
}
return result;
}
|
ComputeRequirement:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x120
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x110],RAX
MOV dword ptr [RAX + 0x20],0x0
MOV dword ptr [RAX + 0x24],0x0
MOV dword ptr [RAX + 0x28],0x0
MOV dword ptr [RAX + 0x2c],0x0
MOV dword ptr [RAX + 0x30],0x0
MOV dword ptr [RAX + 0x34],0x0
MOV dword ptr [RAX + 0x38],0x0
ADD RAX,0x8
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00124830
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00124670
MOV qword ptr [RBP + -0x20],RAX
LAB_001436fd:
LEA RDI,[RBP + -0x18]
LEA RSI,[RBP + -0x20]
CALL 0x00143cc0
TEST AL,0x1
JNZ 0x00143713
JMP 0x00143851
LAB_00143713:
LEA RDI,[RBP + -0x18]
CALL 0x00124d40
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0013e6c0
MOV RDI,RAX
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x110]
MOV EAX,dword ptr [RAX + 0x38]
MOV dword ptr [RBP + -0x114],EAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0013e6c0
MOV RSI,RAX
LEA RDI,[RBP + -0x54]
CALL 0x0013e6e0
MOV EAX,dword ptr [RBP + -0x114]
CMP EAX,dword ptr [RBP + -0x3c]
JGE 0x001437cb
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0013e6c0
MOV RSI,RAX
LEA RDI,[RBP + -0x80]
CALL 0x0013e6e0
MOV RAX,qword ptr [RBP + -0x110]
MOV ECX,dword ptr [RBP + -0x68]
MOV dword ptr [RAX + 0x38],ECX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0013e6c0
MOV RSI,RAX
LEA RDI,[RBP + -0xac]
CALL 0x0013e6e0
MOV RAX,qword ptr [RBP + -0x110]
MOV RCX,qword ptr [RBP + -0x90]
MOV qword ptr [RAX + 0x3c],RCX
MOV RCX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX + 0x44],RCX
MOV ECX,dword ptr [RAX + 0x20]
ADD ECX,dword ptr [RAX + 0x3c]
MOV dword ptr [RAX + 0x3c],ECX
MOV ECX,dword ptr [RAX + 0x20]
ADD ECX,dword ptr [RAX + 0x40]
MOV dword ptr [RAX + 0x40],ECX
LAB_001437cb:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0013e6c0
MOV RSI,RAX
LEA RDI,[RBP + -0xd8]
CALL 0x0013e6e0
MOV RAX,qword ptr [RBP + -0x110]
MOV ECX,dword ptr [RBP + -0xd8]
ADD ECX,dword ptr [RAX + 0x20]
MOV dword ptr [RAX + 0x20],ECX
ADD RAX,0x20
ADD RAX,0x4
MOV qword ptr [RBP + -0x120],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0013e6c0
MOV RSI,RAX
LEA RDI,[RBP + -0x104]
CALL 0x0013e6e0
MOV RDI,qword ptr [RBP + -0x120]
LEA RSI,[RBP + -0x104]
ADD RSI,0x4
CALL 0x0013e710
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x110]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RAX + 0x24],ECX
LEA RDI,[RBP + -0x18]
CALL 0x00143d00
JMP 0x001436fd
LAB_00143851:
ADD RSP,0x120
POP RBP
RET
|
/* ftxui::(anonymous namespace)::HBox::ComputeRequirement() */
void __thiscall ftxui::(anonymous_namespace)::HBox::ComputeRequirement(HBox *this)
{
int iVar1;
bool bVar2;
long *plVar3;
int *piVar4;
int aiStack_108 [10];
int local_e0;
int8 local_98;
int8 local_90;
int4 local_70;
int local_44;
__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false> *local_30;
int8 local_28;
int8 local_20;
vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *local_18;
HBox *local_10;
*(int4 *)(this + 0x20) = 0;
*(int4 *)(this + 0x24) = 0;
*(int4 *)(this + 0x28) = 0;
*(int4 *)(this + 0x2c) = 0;
*(int4 *)(this + 0x30) = 0;
*(int4 *)(this + 0x34) = 0;
*(int4 *)(this + 0x38) = 0;
local_18 = (vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
(this + 8);
local_10 = this;
local_20 = std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>
::begin(local_18);
local_28 = std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>
::end(local_18);
while( true ) {
bVar2 = __gnu_cxx::operator!=((__normal_iterator *)&local_20,(__normal_iterator *)&local_28);
if (!bVar2) break;
local_30 = (__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false> *)
__gnu_cxx::
__normal_iterator<std::shared_ptr<ftxui::Node>*,std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>>
::operator*((__normal_iterator<std::shared_ptr<ftxui::Node>*,std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>>
*)&local_20);
plVar3 = (long *)std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->(local_30);
(**(code **)(*plVar3 + 0x10))();
iVar1 = *(int *)(this + 0x38);
std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->
(local_30);
Node::requirement();
if (iVar1 < local_44) {
std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->
(local_30);
Node::requirement();
*(int4 *)(this + 0x38) = local_70;
std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->
(local_30);
Node::requirement();
*(int8 *)(this + 0x3c) = local_98;
*(int8 *)(this + 0x44) = local_90;
*(int *)(this + 0x3c) = *(int *)(this + 0x20) + *(int *)(this + 0x3c);
*(int *)(this + 0x40) = *(int *)(this + 0x20) + *(int *)(this + 0x40);
}
std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->
(local_30);
Node::requirement();
*(int *)(this + 0x20) = local_e0 + *(int *)(this + 0x20);
std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->
(local_30);
Node::requirement();
piVar4 = std::max<int>((int *)(this + 0x24),aiStack_108);
*(int *)(this + 0x24) = *piVar4;
__gnu_cxx::
__normal_iterator<std::shared_ptr<ftxui::Node>*,std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>>
::operator++((__normal_iterator<std::shared_ptr<ftxui::Node>*,std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>>
*)&local_20);
}
return;
}
|
|
10,545 |
insert_at
|
eloqsql/mysys/queues.c
|
static void insert_at(QUEUE *queue, uchar *element, uint idx)
{
uint next_index, offset_to_key= queue->offset_to_key;
uint offset_to_queue_pos= queue->offset_to_queue_pos;
/* max_at_top swaps the comparison if we want to order by desc */
while ((next_index= idx >> 1) > 0 &&
queue->compare(queue->first_cmp_arg,
element + offset_to_key,
queue->root[next_index] + offset_to_key) *
queue->max_at_top < 0)
{
queue->root[idx]= queue->root[next_index];
if (offset_to_queue_pos)
(*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx;
idx= next_index;
}
queue->root[idx]= element;
if (offset_to_queue_pos)
(*(uint*) (element + offset_to_queue_pos-1))= idx;
}
|
O3
|
c
|
insert_at:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r15d
movq %rdi, %r14
movl 0x1c(%rdi), %r13d
cmpl $0x2, %edx
movq %rsi, -0x30(%rbp)
jae 0xa21d3
movl %r15d, %ebx
jmp 0xa222b
movl 0x18(%r14), %r12d
leaq (%rsi,%r12), %rax
movq %rax, -0x38(%rbp)
movl %r15d, %ebx
shrl %ebx
movq (%r14), %rax
movq 0x8(%r14), %rdi
movq (%rax,%rbx,8), %rdx
addq %r12, %rdx
movq -0x38(%rbp), %rsi
callq *0x28(%r14)
imull 0x24(%r14), %eax
testl %eax, %eax
jns 0xa21ce
movq (%r14), %rcx
movq (%rcx,%rbx,8), %rdx
movl %r15d, %eax
movq %rdx, (%rcx,%rax,8)
testq %r13, %r13
je 0xa2222
movq (%r14), %rcx
movq (%rcx,%rax,8), %rax
movl %r15d, -0x1(%rax,%r13)
cmpl $0x3, %r15d
movl %ebx, %r15d
ja 0xa21e2
movq (%r14), %rax
movl %ebx, %ecx
movq -0x30(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
testq %r13, %r13
je 0xa2242
movl %ebx, -0x1(%rdx,%r13)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
insert_at:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15d, edx
mov r14, rdi
mov r13d, [rdi+1Ch]
cmp edx, 2
mov [rbp+var_30], rsi
jnb short loc_A21D3
loc_A21CE:
mov ebx, r15d
jmp short loc_A222B
loc_A21D3:
mov r12d, [r14+18h]
lea rax, [rsi+r12]
mov [rbp+var_38], rax
mov ebx, r15d
loc_A21E2:
shr ebx, 1
mov rax, [r14]
mov rdi, [r14+8]
mov rdx, [rax+rbx*8]
add rdx, r12
mov rsi, [rbp+var_38]
call qword ptr [r14+28h]
imul eax, [r14+24h]
test eax, eax
jns short loc_A21CE
mov rcx, [r14]
mov rdx, [rcx+rbx*8]
mov eax, r15d
mov [rcx+rax*8], rdx
test r13, r13
jz short loc_A2222
mov rcx, [r14]
mov rax, [rcx+rax*8]
mov [rax+r13-1], r15d
loc_A2222:
cmp r15d, 3
mov r15d, ebx
ja short loc_A21E2
loc_A222B:
mov rax, [r14]
mov ecx, ebx
mov rdx, [rbp+var_30]
mov [rax+rcx*8], rdx
test r13, r13
jz short loc_A2242
mov [rdx+r13-1], ebx
loc_A2242:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long insert_at(long long *a1, long long a2, unsigned int a3)
{
unsigned int v3; // r15d
long long v4; // r13
long long v5; // rbx
long long v6; // r12
bool v7; // cc
long long result; // rax
v3 = a3;
v4 = *((unsigned int *)a1 + 7);
if ( a3 >= 2 )
{
v6 = *((unsigned int *)a1 + 6);
LODWORD(v5) = a3;
while ( 1 )
{
v5 = (unsigned int)v5 >> 1;
if ( (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, long long, long long))a1[5])(
a1[1],
a2 + v6,
v6 + *(_QWORD *)(*a1 + 8 * v5))) >= 0 )
break;
*(_QWORD *)(*a1 + 8LL * v3) = *(_QWORD *)(*a1 + 8 * v5);
if ( v4 )
*(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v3) + v4 - 1) = v3;
v7 = v3 <= 3;
v3 = v5;
if ( v7 )
goto LABEL_8;
}
}
LODWORD(v5) = v3;
LABEL_8:
result = *a1;
*(_QWORD *)(*a1 + 8LL * (unsigned int)v5) = a2;
if ( v4 )
*(_DWORD *)(a2 + v4 - 1) = v5;
return result;
}
|
insert_at:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15D,EDX
MOV R14,RDI
MOV R13D,dword ptr [RDI + 0x1c]
CMP EDX,0x2
MOV qword ptr [RBP + -0x30],RSI
JNC 0x001a21d3
LAB_001a21ce:
MOV EBX,R15D
JMP 0x001a222b
LAB_001a21d3:
MOV R12D,dword ptr [R14 + 0x18]
LEA RAX,[RSI + R12*0x1]
MOV qword ptr [RBP + -0x38],RAX
MOV EBX,R15D
LAB_001a21e2:
SHR EBX,0x1
MOV RAX,qword ptr [R14]
MOV RDI,qword ptr [R14 + 0x8]
MOV RDX,qword ptr [RAX + RBX*0x8]
ADD RDX,R12
MOV RSI,qword ptr [RBP + -0x38]
CALL qword ptr [R14 + 0x28]
IMUL EAX,dword ptr [R14 + 0x24]
TEST EAX,EAX
JNS 0x001a21ce
MOV RCX,qword ptr [R14]
MOV RDX,qword ptr [RCX + RBX*0x8]
MOV EAX,R15D
MOV qword ptr [RCX + RAX*0x8],RDX
TEST R13,R13
JZ 0x001a2222
MOV RCX,qword ptr [R14]
MOV RAX,qword ptr [RCX + RAX*0x8]
MOV dword ptr [RAX + R13*0x1 + -0x1],R15D
LAB_001a2222:
CMP R15D,0x3
MOV R15D,EBX
JA 0x001a21e2
LAB_001a222b:
MOV RAX,qword ptr [R14]
MOV ECX,EBX
MOV RDX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + RCX*0x8],RDX
TEST R13,R13
JZ 0x001a2242
MOV dword ptr [RDX + R13*0x1 + -0x1],EBX
LAB_001a2242:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void insert_at(long *param_1,long param_2,uint param_3)
{
uint uVar1;
ulong uVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
uint uVar6;
uVar4 = (ulong)param_3;
uVar5 = (ulong)*(uint *)((long)param_1 + 0x1c);
if (1 < param_3) {
uVar1 = *(uint *)(param_1 + 3);
do {
uVar2 = uVar4 >> 1;
iVar3 = (*(code *)param_1[5])
(param_1[1],param_2 + (ulong)uVar1,
*(long *)(*param_1 + uVar2 * 8) + (ulong)uVar1);
if (-1 < iVar3 * *(int *)((long)param_1 + 0x24)) break;
uVar6 = (uint)uVar4;
*(int8 *)(*param_1 + uVar4 * 8) = *(int8 *)(*param_1 + uVar2 * 8);
if (uVar5 != 0) {
*(uint *)(*(long *)(*param_1 + uVar4 * 8) + -1 + uVar5) = uVar6;
}
uVar4 = uVar2;
} while (3 < uVar6);
}
*(long *)(*param_1 + uVar4 * 8) = param_2;
if (uVar5 != 0) {
*(int *)(param_2 + -1 + uVar5) = (int)uVar4;
}
return;
}
|
|
10,546 |
partitioned_key_cache_insert
|
eloqsql/mysys/mf_keycache.c
|
static
int partitioned_key_cache_insert(PARTITIONED_KEY_CACHE_CB *keycache,
File file, my_off_t filepos, int level,
uchar *buff, uint length)
{
uint w_length;
uint offset= (uint) (filepos % keycache->key_cache_block_size);
DBUG_ENTER("partitioned_key_cache_insert");
DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u",
(uint) file,(ulong) filepos, length));
/* Write data in key_cache_block_size increments */
do
{
SIMPLE_KEY_CACHE_CB *partition= get_key_cache_partition(keycache,
file, filepos);
w_length= length;
set_if_smaller(w_length, keycache->key_cache_block_size - offset);
if (simple_key_cache_insert((void *) partition,
file, filepos, level,
buff, w_length))
DBUG_RETURN(1);
filepos+= w_length;
buff+= w_length;
offset = 0;
} while ((length-= w_length));
DBUG_RETURN(0);
}
|
O3
|
c
|
partitioned_key_cache_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebx
movq %r8, %r14
movl %ecx, -0x2c(%rbp)
movq %rdx, %r12
movq %rdi, %r13
movl 0x18(%rdi), %ecx
movq %rdx, %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %rcx
movslq %esi, %rax
movq %rax, -0x38(%rbp)
movl 0x18(%r13), %r15d
movq %r12, %rax
xorl %edx, %edx
divq %r15
movq -0x38(%rbp), %rsi
addq %rsi, %rax
movl 0x1c(%r13), %edi
xorl %edx, %edx
divq %rdi
movq 0x8(%r13), %rax
movq (%rax,%rdx,8), %rdi
subl %ecx, %r15d
cmpl %r15d, %ebx
cmovbl %ebx, %r15d
movq %r12, %rdx
movl -0x2c(%rbp), %ecx
movq %r14, %r8
movl %r15d, %r9d
callq 0x9996f
testl %eax, %eax
jne 0x9b282
movl %r15d, %eax
addq %rax, %r14
addq %rax, %r12
xorl %ecx, %ecx
subl %r15d, %ebx
jne 0x9b22d
jmp 0x9b287
movl $0x1, %ecx
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
partitioned_key_cache_insert:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebx, r9d
mov r14, r8
mov [rbp+var_2C], ecx
mov r12, rdx
mov r13, rdi
mov ecx, [rdi+18h]
mov rax, rdx
xor edx, edx
div rcx
mov rcx, rdx
movsxd rax, esi
mov [rbp+var_38], rax
loc_9B22D:
mov r15d, [r13+18h]
mov rax, r12
xor edx, edx
div r15
mov rsi, [rbp+var_38]
add rax, rsi
mov edi, [r13+1Ch]
xor edx, edx
div rdi
mov rax, [r13+8]
mov rdi, [rax+rdx*8]
sub r15d, ecx
cmp ebx, r15d
cmovb r15d, ebx
mov rdx, r12
mov ecx, [rbp+var_2C]
mov r8, r14
mov r9d, r15d
call simple_key_cache_insert
test eax, eax
jnz short loc_9B282
mov eax, r15d
add r14, rax
add r12, rax
xor ecx, ecx
sub ebx, r15d
jnz short loc_9B22D
jmp short loc_9B287
loc_9B282:
mov ecx, 1
loc_9B287:
mov eax, ecx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long partitioned_key_cache_insert(
long long a1,
signed int a2,
unsigned long long a3,
int a4,
long long a5,
unsigned int a6)
{
unsigned long long v8; // r12
unsigned long long v9; // rcx
unsigned int v10; // r15d
v8 = a3;
v9 = a3 % *(unsigned int *)(a1 + 24);
while ( 1 )
{
v10 = *(_DWORD *)(a1 + 24) - v9;
if ( a6 < v10 )
v10 = a6;
if ( (unsigned int)simple_key_cache_insert(
*(__m128i **)(*(_QWORD *)(a1 + 8)
+ 8 * ((a2 + v8 / *(unsigned int *)(a1 + 24)) % *(unsigned int *)(a1 + 28))),
a2,
v8,
a4,
a5,
v10) )
break;
a5 += v10;
v8 += v10;
LODWORD(v9) = 0;
a6 -= v10;
if ( !a6 )
return (unsigned int)v9;
}
LODWORD(v9) = 1;
return (unsigned int)v9;
}
|
partitioned_key_cache_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBX,R9D
MOV R14,R8
MOV dword ptr [RBP + -0x2c],ECX
MOV R12,RDX
MOV R13,RDI
MOV ECX,dword ptr [RDI + 0x18]
MOV RAX,RDX
XOR EDX,EDX
DIV RCX
MOV RCX,RDX
MOVSXD RAX,ESI
MOV qword ptr [RBP + -0x38],RAX
LAB_0019b22d:
MOV R15D,dword ptr [R13 + 0x18]
MOV RAX,R12
XOR EDX,EDX
DIV R15
MOV RSI,qword ptr [RBP + -0x38]
ADD RAX,RSI
MOV EDI,dword ptr [R13 + 0x1c]
XOR EDX,EDX
DIV RDI
MOV RAX,qword ptr [R13 + 0x8]
MOV RDI,qword ptr [RAX + RDX*0x8]
SUB R15D,ECX
CMP EBX,R15D
CMOVC R15D,EBX
MOV RDX,R12
MOV ECX,dword ptr [RBP + -0x2c]
MOV R8,R14
MOV R9D,R15D
CALL 0x0019996f
TEST EAX,EAX
JNZ 0x0019b282
MOV EAX,R15D
ADD R14,RAX
ADD R12,RAX
XOR ECX,ECX
SUB EBX,R15D
JNZ 0x0019b22d
JMP 0x0019b287
LAB_0019b282:
MOV ECX,0x1
LAB_0019b287:
MOV EAX,ECX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
partitioned_key_cache_insert
(long param_1,int param_2,ulong param_3,int4 param_4,long param_5,uint param_6)
{
int iVar1;
ulong uVar2;
uint uVar3;
uVar2 = param_3 % (ulong)*(uint *)(param_1 + 0x18);
while( true ) {
uVar3 = *(uint *)(param_1 + 0x18) - (int)uVar2;
if (param_6 < uVar3) {
uVar3 = param_6;
}
iVar1 = simple_key_cache_insert
(*(int8 *)
(*(long *)(param_1 + 8) +
((param_3 / *(uint *)(param_1 + 0x18) + (long)param_2) %
(ulong)*(uint *)(param_1 + 0x1c)) * 8),(long)param_2,param_3,param_4,param_5
,uVar3);
if (iVar1 != 0) break;
param_5 = param_5 + (ulong)uVar3;
param_3 = param_3 + uVar3;
uVar2 = 0;
param_6 = param_6 - uVar3;
if (param_6 == 0) {
return 0;
}
}
return 1;
}
|
|
10,547 |
multi_alloc_root
|
eloqsql/mysys/my_alloc.c
|
void *multi_alloc_root(MEM_ROOT *root, ...)
{
va_list args;
char **ptr, *start, *res;
size_t tot_length, length;
DBUG_ENTER("multi_alloc_root");
/*
We don't need to do DBUG_PRINT here as it will be done when alloc_root
is called
*/
va_start(args, root);
tot_length= 0;
while ((ptr= va_arg(args, char **)))
{
length= va_arg(args, uint);
tot_length+= ALIGN_SIZE(length);
}
va_end(args);
if (!(start= (char*) alloc_root(root, tot_length)))
DBUG_RETURN(0); /* purecov: inspected */
va_start(args, root);
res= start;
while ((ptr= va_arg(args, char **)))
{
*ptr= res;
length= va_arg(args, uint);
res+= ALIGN_SIZE(length);
}
va_end(args);
DBUG_RETURN((void*) start);
}
|
O0
|
c
|
multi_alloc_root:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp # imm = 0x170
testb %al, %al
je 0x2a811
movaps %xmm0, -0xe0(%rbp)
movaps %xmm1, -0xd0(%rbp)
movaps %xmm2, -0xc0(%rbp)
movaps %xmm3, -0xb0(%rbp)
movaps %xmm4, -0xa0(%rbp)
movaps %xmm5, -0x90(%rbp)
movaps %xmm6, -0x80(%rbp)
movaps %xmm7, -0x70(%rbp)
movq %r9, -0xe8(%rbp)
movq %r8, -0xf0(%rbp)
movq %rcx, -0xf8(%rbp)
movq %rdx, -0x100(%rbp)
movq %rsi, -0x108(%rbp)
movq %rdi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq $0x0, -0x50(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x114(%rbp)
cmpl $0x28, %eax
ja 0x2a89f
movq -0x120(%rbp), %rcx
movl -0x114(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x128(%rbp)
jmp 0x2a8bc
movq -0x120(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x2a956
leaq -0x30(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x12c(%rbp)
cmpl $0x28, %eax
ja 0x2a90f
movq -0x138(%rbp), %rcx
movl -0x12c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x140(%rbp)
jmp 0x2a92c
movq -0x138(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x2a864
leaq -0x30(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x2a520
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x2a980
jmp 0x2a973
movq $0x0, -0x8(%rbp)
jmp 0x2aab5
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x150(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x144(%rbp)
cmpl $0x28, %eax
ja 0x2a9e7
movq -0x150(%rbp), %rcx
movl -0x144(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x158(%rbp)
jmp 0x2aa04
movq -0x150(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x2aaa9
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
leaq -0x30(%rbp), %rax
movq %rax, -0x168(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x15c(%rbp)
cmpl $0x28, %eax
ja 0x2aa62
movq -0x168(%rbp), %rcx
movl -0x15c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x170(%rbp)
jmp 0x2aa7f
movq -0x168(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x2a9ac
leaq -0x30(%rbp), %rax
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x170, %rsp # imm = 0x170
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
multi_alloc_root:
push rbp
mov rbp, rsp
sub rsp, 170h
test al, al
jz short loc_2A811
movaps [rbp+var_E0], xmm0
movaps [rbp+var_D0], xmm1
movaps [rbp+var_C0], xmm2
movaps [rbp+var_B0], xmm3
movaps [rbp+var_A0], xmm4
movaps [rbp+var_90], xmm5
movaps [rbp+var_80], xmm6
movaps [rbp+var_70], xmm7
loc_2A811:
mov [rbp+var_E8], r9
mov [rbp+var_F0], r8
mov [rbp+var_F8], rcx
mov [rbp+var_100], rdx
mov [rbp+var_108], rsi
mov [rbp+var_10], rdi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 8
mov [rbp+var_50], 0
loc_2A864:
lea rax, [rbp+var_30]
mov [rbp+var_120], rax
mov eax, [rbp+var_30]
mov [rbp+var_114], eax
cmp eax, 28h ; '('
ja short loc_2A89F
mov rcx, [rbp+var_120]
mov edx, [rbp+var_114]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_128], rax
jmp short loc_2A8BC
loc_2A89F:
mov rcx, [rbp+var_120]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_128], rax
loc_2A8BC:
mov rax, [rbp+var_128]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_2A956
lea rax, [rbp+var_30]
mov [rbp+var_138], rax
mov eax, [rbp+var_30]
mov [rbp+var_12C], eax
cmp eax, 28h ; '('
ja short loc_2A90F
mov rcx, [rbp+var_138]
mov edx, [rbp+var_12C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_140], rax
jmp short loc_2A92C
loc_2A90F:
mov rcx, [rbp+var_138]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_140], rax
loc_2A92C:
mov rax, [rbp+var_140]
mov eax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, [rbp+var_50]
mov [rbp+var_50], rax
jmp loc_2A864
loc_2A956:
lea rax, [rbp+var_30]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_50]
call alloc_root
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_2A980
jmp short $+2
loc_2A973:
mov [rbp+var_8], 0
jmp loc_2AAB5
loc_2A980:
lea rax, [rbp+var_30]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 8
mov rax, [rbp+var_40]
mov [rbp+var_48], rax
loc_2A9AC:
lea rax, [rbp+var_30]
mov [rbp+var_150], rax
mov eax, [rbp+var_30]
mov [rbp+var_144], eax
cmp eax, 28h ; '('
ja short loc_2A9E7
mov rcx, [rbp+var_150]
mov edx, [rbp+var_144]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_158], rax
jmp short loc_2AA04
loc_2A9E7:
mov rcx, [rbp+var_150]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_158], rax
loc_2AA04:
mov rax, [rbp+var_158]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_2AAA9
mov rcx, [rbp+var_48]
mov rax, [rbp+var_38]
mov [rax], rcx
lea rax, [rbp+var_30]
mov [rbp+var_168], rax
mov eax, [rbp+var_30]
mov [rbp+var_15C], eax
cmp eax, 28h ; '('
ja short loc_2AA62
mov rcx, [rbp+var_168]
mov edx, [rbp+var_15C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_170], rax
jmp short loc_2AA7F
loc_2AA62:
mov rcx, [rbp+var_168]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_170], rax
loc_2AA7F:
mov rax, [rbp+var_170]
mov eax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, [rbp+var_48]
mov [rbp+var_48], rax
jmp loc_2A9AC
loc_2AAA9:
lea rax, [rbp+var_30]
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_2AAB5:
mov rax, [rbp+var_8]
add rsp, 170h
pop rbp
retn
|
char * multi_alloc_root(
_QWORD **a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char *v15; // rax
char *v16; // rax
char *v17; // rax
char *v18; // rax
char v20; // [rsp+60h] [rbp-110h] BYREF
long long v21; // [rsp+68h] [rbp-108h]
long long v22; // [rsp+70h] [rbp-100h]
long long v23; // [rsp+78h] [rbp-F8h]
long long v24; // [rsp+80h] [rbp-F0h]
long long v25; // [rsp+88h] [rbp-E8h]
__m128 v26; // [rsp+90h] [rbp-E0h]
__m128 v27; // [rsp+A0h] [rbp-D0h]
__m128 v28; // [rsp+B0h] [rbp-C0h]
__m128 v29; // [rsp+C0h] [rbp-B0h]
__m128 v30; // [rsp+D0h] [rbp-A0h]
__m128 v31; // [rsp+E0h] [rbp-90h]
__m128 v32; // [rsp+F0h] [rbp-80h]
__m128 v33; // [rsp+100h] [rbp-70h]
long long v34; // [rsp+118h] [rbp-58h]
long long i; // [rsp+120h] [rbp-50h]
char *j; // [rsp+128h] [rbp-48h]
char *v37; // [rsp+130h] [rbp-40h]
char **v38; // [rsp+138h] [rbp-38h]
int v39; // [rsp+140h] [rbp-30h]
int v40; // [rsp+144h] [rbp-2Ch]
char *v41; // [rsp+148h] [rbp-28h]
char *v42; // [rsp+150h] [rbp-20h]
_QWORD **v43; // [rsp+160h] [rbp-10h]
v26 = a7;
v27 = a8;
v28 = a9;
v29 = a10;
v30 = a11;
v31 = a12;
v32 = a13;
v33 = a14;
v25 = a6;
v24 = a5;
v23 = a4;
v22 = a3;
v21 = a2;
v43 = a1;
v42 = &v20;
v41 = &a15;
v40 = 48;
v39 = 8;
for ( i = 0LL; ; i += (v34 + 7) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( (unsigned int)v39 > 0x28 )
{
v15 = v41;
v41 += 8;
}
else
{
v15 = &v42[v39];
v39 += 8;
}
v38 = *(char ***)v15;
if ( !v38 )
break;
if ( (unsigned int)v39 > 0x28 )
{
v16 = v41;
v41 += 8;
}
else
{
v16 = &v42[v39];
v39 += 8;
}
v34 = *(unsigned int *)v16;
}
v37 = alloc_root(v43, i);
if ( !v37 )
return 0LL;
v42 = &v20;
v41 = &a15;
v40 = 48;
v39 = 8;
for ( j = v37; ; j += (v34 + 7) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( (unsigned int)v39 > 0x28 )
{
v17 = v41;
v41 += 8;
}
else
{
v17 = &v42[v39];
v39 += 8;
}
v38 = *(char ***)v17;
if ( !v38 )
break;
*v38 = j;
if ( (unsigned int)v39 > 0x28 )
{
v18 = v41;
v41 += 8;
}
else
{
v18 = &v42[v39];
v39 += 8;
}
v34 = *(unsigned int *)v18;
}
return v37;
}
|
multi_alloc_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x170
TEST AL,AL
JZ 0x0012a811
MOVAPS xmmword ptr [RBP + -0xe0],XMM0
MOVAPS xmmword ptr [RBP + -0xd0],XMM1
MOVAPS xmmword ptr [RBP + -0xc0],XMM2
MOVAPS xmmword ptr [RBP + -0xb0],XMM3
MOVAPS xmmword ptr [RBP + -0xa0],XMM4
MOVAPS xmmword ptr [RBP + -0x90],XMM5
MOVAPS xmmword ptr [RBP + -0x80],XMM6
MOVAPS xmmword ptr [RBP + -0x70],XMM7
LAB_0012a811:
MOV qword ptr [RBP + -0xe8],R9
MOV qword ptr [RBP + -0xf0],R8
MOV qword ptr [RBP + -0xf8],RCX
MOV qword ptr [RBP + -0x100],RDX
MOV qword ptr [RBP + -0x108],RSI
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x110]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x8
MOV qword ptr [RBP + -0x50],0x0
LAB_0012a864:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x120],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x114],EAX
CMP EAX,0x28
JA 0x0012a89f
MOV RCX,qword ptr [RBP + -0x120]
MOV EDX,dword ptr [RBP + -0x114]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x128],RAX
JMP 0x0012a8bc
LAB_0012a89f:
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x128],RAX
LAB_0012a8bc:
MOV RAX,qword ptr [RBP + -0x128]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x0012a956
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x138],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x12c],EAX
CMP EAX,0x28
JA 0x0012a90f
MOV RCX,qword ptr [RBP + -0x138]
MOV EDX,dword ptr [RBP + -0x12c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x140],RAX
JMP 0x0012a92c
LAB_0012a90f:
MOV RCX,qword ptr [RBP + -0x138]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x140],RAX
LAB_0012a92c:
MOV RAX,qword ptr [RBP + -0x140]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0012a864
LAB_0012a956:
LEA RAX,[RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x50]
CALL 0x0012a520
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JNZ 0x0012a980
JMP 0x0012a973
LAB_0012a973:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0012aab5
LAB_0012a980:
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x110]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x8
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x48],RAX
LAB_0012a9ac:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x150],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x144],EAX
CMP EAX,0x28
JA 0x0012a9e7
MOV RCX,qword ptr [RBP + -0x150]
MOV EDX,dword ptr [RBP + -0x144]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x158],RAX
JMP 0x0012aa04
LAB_0012a9e7:
MOV RCX,qword ptr [RBP + -0x150]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x158],RAX
LAB_0012aa04:
MOV RAX,qword ptr [RBP + -0x158]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x0012aaa9
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x168],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x15c],EAX
CMP EAX,0x28
JA 0x0012aa62
MOV RCX,qword ptr [RBP + -0x168]
MOV EDX,dword ptr [RBP + -0x15c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x170],RAX
JMP 0x0012aa7f
LAB_0012aa62:
MOV RCX,qword ptr [RBP + -0x168]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x170],RAX
LAB_0012aa7f:
MOV RAX,qword ptr [RBP + -0x170]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0012a9ac
LAB_0012aaa9:
LEA RAX,[RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_0012aab5:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x170
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
long multi_alloc_root(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
uint *local_178;
uint *local_160;
uint *local_148;
uint *local_130;
uint local_118 [2];
int8 local_110;
int8 local_108;
int8 local_100;
int8 local_f8;
int8 local_f0;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
ulong local_60;
long local_58;
long local_50;
long local_40;
uint local_38;
int4 local_34;
uint *local_30;
uint *local_28;
int8 local_18;
long local_10;
if (in_AL != '\0') {
local_e8 = param_1;
local_d8 = param_2;
local_c8 = param_3;
local_b8 = param_4;
local_a8 = param_5;
local_98 = param_6;
local_88 = param_7;
local_78 = param_8;
}
local_28 = local_118;
local_30 = (uint *)&stack0x00000008;
local_34 = 0x30;
local_38 = 8;
local_58 = 0;
while( true ) {
if (local_38 < 0x29) {
local_130 = (uint *)((long)local_28 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_130 = local_30;
local_30 = local_30 + 2;
}
local_40 = *(long *)local_130;
if (local_40 == 0) break;
if (local_38 < 0x29) {
local_148 = (uint *)((long)local_28 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_148 = local_30;
local_30 = local_30 + 2;
}
local_60 = (ulong)*local_148;
local_58 = (local_60 + 7 & 0xfffffffffffffff8) + local_58;
}
local_110 = param_10;
local_108 = param_11;
local_100 = param_12;
local_f8 = param_13;
local_f0 = param_14;
local_18 = param_9;
local_10 = alloc_root(param_9,local_58);
if (local_10 == 0) {
local_10 = 0;
}
else {
local_30 = (uint *)&stack0x00000008;
local_38 = 8;
local_50 = local_10;
while( true ) {
if (local_38 < 0x29) {
local_160 = (uint *)((long)local_118 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_160 = local_30;
local_30 = local_30 + 2;
}
if (*(long **)local_160 == (long *)0x0) break;
**(long **)local_160 = local_50;
if (local_38 < 0x29) {
local_178 = (uint *)((long)local_118 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_178 = local_30;
local_30 = local_30 + 2;
}
local_50 = ((ulong)*local_178 + 7 & 0xfffffffffffffff8) + local_50;
}
}
return local_10;
}
|
|
10,548 |
trnman_init
|
eloqsql/storage/maria/trnman.c
|
int trnman_init(TrID initial_trid)
{
DBUG_ENTER("trnman_init");
DBUG_PRINT("enter", ("initial_trid: %lu", (ulong) initial_trid));
short_trid_to_active_trn= (TRN **)my_malloc(PSI_INSTRUMENT_ME, SHORT_TRID_MAX*sizeof(TRN*),
MYF(MY_WME|MY_ZEROFILL));
if (unlikely(!short_trid_to_active_trn))
DBUG_RETURN(1);
short_trid_to_active_trn--; /* min short_id is 1 */
/*
Initialize lists.
active_list_max.min_read_from must be larger than any trid,
so that when an active list is empty we would could free
all committed list.
And committed_list_max itself can not be freed so
committed_list_max.commit_trid must not be smaller that
active_list_max.min_read_from
*/
active_list_max.trid= active_list_min.trid= 0;
active_list_max.min_read_from= MAX_TRID;
active_list_max.next= active_list_min.prev= 0;
active_list_max.prev= &active_list_min;
active_list_min.next= &active_list_max;
committed_list_max.commit_trid= MAX_TRID;
committed_list_max.next= committed_list_min.prev= 0;
committed_list_max.prev= &committed_list_min;
committed_list_min.next= &committed_list_max;
trnman_active_transactions= 0;
trnman_committed_transactions= 0;
trnman_allocated_transactions= 0;
/* This is needed for recovery and repair */
dummy_transaction_object.min_read_from= ~(TrID) 0;
dummy_transaction_object.first_undo_lsn= TRANSACTION_LOGGED_LONG_ID;
pool= 0;
global_trid_generator= initial_trid;
trid_min_read_from= initial_trid;
lf_hash_init(&trid_to_trn, sizeof(TRN*), LF_HASH_UNIQUE,
0, 0, trn_get_hash_key, 0);
DBUG_PRINT("info", ("mysql_mutex_init LOCK_trn_list"));
mysql_mutex_init(key_LOCK_trn_list, &LOCK_trn_list, MY_MUTEX_INIT_FAST);
DBUG_RETURN(0);
}
|
O0
|
c
|
trnman_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
jmp 0x7707e
xorl %edi, %edi
movl $0x7fff8, %esi # imm = 0x7FFF8
movl $0x30, %edx
callq 0xfc090
movq %rax, 0x40fd3a(%rip) # 0x486dd0
cmpq $0x0, 0x40fd32(%rip) # 0x486dd0
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x770c9
jmp 0x770bd
movl $0x1, -0x4(%rbp)
jmp 0x77226
movq 0x40fd00(%rip), %rax # 0x486dd0
addq $-0x8, %rax
movq %rax, 0x40fcf5(%rip) # 0x486dd0
movq $0x0, 0x40fd6a(%rip) # 0x486e50
movq $0x0, 0x40fe0f(%rip) # 0x486f00
movq $-0x1, 0x40fe0c(%rip) # 0x486f08
movq $0x0, 0x40fd41(%rip) # 0x486e48
movq $0x0, 0x40fdde(%rip) # 0x486ef0
leaq 0x40fcbf(%rip), %rax # 0x486dd8
movq %rax, 0x40fdd8(%rip) # 0x486ef8
leaq 0x40fd61(%rip), %rax # 0x486e88
movq %rax, 0x40fd12(%rip) # 0x486e40
movq $-0x1, 0x40fe87(%rip) # 0x486fc0
movq $0x0, 0x40ff14(%rip) # 0x487058
movq $0x0, 0x40fe51(%rip) # 0x486fa0
leaq 0x40fe92(%rip), %rax # 0x486fe8
movq %rax, 0x40fe4b(%rip) # 0x486fa8
leaq 0x40fdd4(%rip), %rax # 0x486f38
movq %rax, 0x40fee5(%rip) # 0x487050
movl $0x0, 0x40ff23(%rip) # 0x487098
movl $0x0, 0x40ff1d(%rip) # 0x48709c
movl $0x0, 0x40ff17(%rip) # 0x4870a0
leaq 0x40fab0(%rip), %rax # 0x486c40
movq $-0x1, 0x80(%rax)
leaq 0x40fa9e(%rip), %rax # 0x486c40
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movq %rcx, 0xa0(%rax)
movq $0x0, 0x40feea(%rip) # 0x4870a8
movq -0x10(%rbp), %rax
movq %rax, 0x40fee7(%rip) # 0x4870b0
movq -0x10(%rbp), %rax
movq %rax, 0x253e54(%rip) # 0x2cb028
leaq 0x40fedd(%rip), %rdi # 0x4870b8
movl $0x8, %esi
movl $0x1, %edx
xorl %r8d, %r8d
leaq 0x41(%rip), %r9 # 0x77230
xorl %eax, %eax
movl %r8d, %ecx
movq $0x0, (%rsp)
callq 0x106600
jmp 0x77203
leaq 0x40fb26(%rip), %rax # 0x486d30
movl (%rax), %edi
leaq 0x40ff6d(%rip), %rsi # 0x487180
leaq 0xc1b496(%rip), %rdx # 0xc926b0
callq 0x77260
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
|
trnman_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
jmp short $+2
loc_7707E:
xor edi, edi
mov esi, offset loc_7FFF8
mov edx, 30h ; '0'
call my_malloc
mov cs:short_trid_to_active_trn, rax
cmp cs:short_trid_to_active_trn, 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_770C9
jmp short $+2
loc_770BD:
mov [rbp+var_4], 1
jmp loc_77226
loc_770C9:
mov rax, cs:short_trid_to_active_trn
add rax, 0FFFFFFFFFFFFFFF8h
mov cs:short_trid_to_active_trn, rax
mov cs:qword_486E50, 0
mov cs:qword_486F00, 0
mov cs:qword_486F08, 0FFFFFFFFFFFFFFFFh
mov cs:qword_486E48, 0
mov cs:qword_486EF0, 0
lea rax, active_list_min
mov cs:qword_486EF8, rax
lea rax, active_list_max
mov cs:qword_486E40, rax
mov cs:qword_486FC0, 0FFFFFFFFFFFFFFFFh
mov cs:qword_487058, 0
mov cs:qword_486FA0, 0
lea rax, committed_list_min
mov cs:qword_486FA8, rax
lea rax, committed_list_max
mov cs:qword_487050, rax
mov cs:trnman_active_transactions, 0
mov cs:trnman_committed_transactions, 0
mov cs:trnman_allocated_transactions, 0
lea rax, dummy_transaction_object
mov qword ptr [rax+80h], 0FFFFFFFFFFFFFFFFh
lea rax, dummy_transaction_object
mov rcx, 8000000000000000h
mov [rax+0A0h], rcx
mov cs:pool, 0
mov rax, [rbp+var_10]
mov cs:global_trid_generator, rax
mov rax, [rbp+var_10]
mov cs:trid_min_read_from, rax
lea rdi, trid_to_trn
mov esi, 8
mov edx, 1
xor r8d, r8d
lea r9, trn_get_hash_key
xor eax, eax
mov ecx, r8d
mov [rsp+20h+var_20], 0
call lf_hash_init
jmp short $+2
loc_77203:
lea rax, key_LOCK_trn_list
mov edi, [rax]
lea rsi, LOCK_trn_list
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_2
mov [rbp+var_4], 0
loc_77226:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long trnman_init(long long a1)
{
short_trid_to_active_trn = my_malloc(0LL, &loc_7FFF8, 48LL);
if ( short_trid_to_active_trn )
{
short_trid_to_active_trn -= 8LL;
qword_486E50 = 0LL;
qword_486F00 = 0LL;
qword_486F08 = -1LL;
qword_486E48 = 0LL;
qword_486EF0 = 0LL;
qword_486EF8 = (long long)&active_list_min;
qword_486E40 = (long long)&active_list_max;
qword_486FC0 = -1LL;
qword_487058 = 0LL;
qword_486FA0 = 0LL;
qword_486FA8 = (long long)&committed_list_min;
qword_487050 = (long long)&committed_list_max;
trnman_active_transactions = 0;
trnman_committed_transactions = 0;
trnman_allocated_transactions = 0;
dummy_transaction_object[16] = -1LL;
dummy_transaction_object[20] = 0x8000000000000000LL;
pool = 0LL;
global_trid_generator = a1;
trid_min_read_from = a1;
lf_hash_init((unsigned int)&trid_to_trn, 8, 1, 0, 0, (unsigned int)trn_get_hash_key, 0LL);
inline_mysql_mutex_init_2(key_LOCK_trn_list, &LOCK_trn_list, &my_fast_mutexattr);
return 0;
}
else
{
return 1;
}
}
|
trnman_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
JMP 0x0017707e
LAB_0017707e:
XOR EDI,EDI
MOV ESI,0x7fff8
MOV EDX,0x30
CALL 0x001fc090
MOV qword ptr [0x00586dd0],RAX
CMP qword ptr [0x00586dd0],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001770c9
JMP 0x001770bd
LAB_001770bd:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00177226
LAB_001770c9:
MOV RAX,qword ptr [0x00586dd0]
ADD RAX,-0x8
MOV qword ptr [0x00586dd0],RAX
MOV qword ptr [0x00586e50],0x0
MOV qword ptr [0x00586f00],0x0
MOV qword ptr [0x00586f08],-0x1
MOV qword ptr [0x00586e48],0x0
MOV qword ptr [0x00586ef0],0x0
LEA RAX,[0x586dd8]
MOV qword ptr [0x00586ef8],RAX
LEA RAX,[0x586e88]
MOV qword ptr [0x00586e40],RAX
MOV qword ptr [0x00586fc0],-0x1
MOV qword ptr [0x00587058],0x0
MOV qword ptr [0x00586fa0],0x0
LEA RAX,[0x586fe8]
MOV qword ptr [0x00586fa8],RAX
LEA RAX,[0x586f38]
MOV qword ptr [0x00587050],RAX
MOV dword ptr [0x00587098],0x0
MOV dword ptr [0x0058709c],0x0
MOV dword ptr [0x005870a0],0x0
LEA RAX,[0x586c40]
MOV qword ptr [RAX + 0x80],-0x1
LEA RAX,[0x586c40]
MOV RCX,-0x8000000000000000
MOV qword ptr [RAX + 0xa0],RCX
MOV qword ptr [0x005870a8],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [0x005870b0],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [0x003cb028],RAX
LEA RDI,[0x5870b8]
MOV ESI,0x8
MOV EDX,0x1
XOR R8D,R8D
LEA R9,[0x177230]
XOR EAX,EAX
MOV ECX,R8D
MOV qword ptr [RSP],0x0
CALL 0x00206600
JMP 0x00177203
LAB_00177203:
LEA RAX,[0x586d30]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x587180]
LEA RDX,[0xd926b0]
CALL 0x00177260
MOV dword ptr [RBP + -0x4],0x0
LAB_00177226:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
bool trnman_init(int8 param_1)
{
long lVar1;
lVar1 = my_malloc(0,0x7fff8,0x30);
if (lVar1 != 0) {
short_trid_to_active_trn = lVar1 + -8;
active_list_min._120_8_ = 0;
active_list_max._120_8_ = 0;
active_list_max._128_8_ = 0xffffffffffffffff;
active_list_min._112_8_ = 0;
active_list_max._104_8_ = 0;
active_list_max._112_8_ = active_list_min;
active_list_min._104_8_ = active_list_max;
committed_list_max._136_8_ = 0xffffffffffffffff;
committed_list_min._112_8_ = 0;
committed_list_max._104_8_ = 0;
committed_list_max._112_8_ = committed_list_min;
committed_list_min._104_8_ = committed_list_max;
trnman_active_transactions = 0;
trnman_committed_transactions = 0;
trnman_allocated_transactions = 0;
dummy_transaction_object._128_8_ = 0xffffffffffffffff;
dummy_transaction_object._160_8_ = 0x8000000000000000;
pool = 0;
trid_min_read_from = param_1;
global_trid_generator = param_1;
lf_hash_init(trid_to_trn,8,1,0,0,trn_get_hash_key,0);
inline_mysql_mutex_init(key_LOCK_trn_list,LOCK_trn_list,&my_fast_mutexattr);
}
else {
short_trid_to_active_trn = 0;
}
return lVar1 == 0;
}
|
|
10,549 |
expand_tilde
|
eloqsql/mysys/mf_pack.c
|
static char * expand_tilde(char **path)
{
if (path[0][0] == FN_LIBCHAR)
return home_dir; /* ~/ expanded to home */
#ifdef HAVE_GETPWNAM
{
char *str,save;
struct passwd *user_entry;
if (!(str=strchr(*path,FN_LIBCHAR)))
str=strend(*path);
save= *str; *str= '\0';
user_entry=getpwnam(*path);
*str=save;
endpwent();
if (user_entry)
{
*path=str;
return user_entry->pw_dir;
}
}
#endif
return (char *) 0;
}
|
O0
|
c
|
expand_tilde:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x29fae
leaq 0x366336(%rip), %rax # 0x3902d8
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x2a02f
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x2f, %esi
callq 0x24100
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x29fd9
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x7ef40
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x241f0
movq %rax, -0x28(%rbp)
movb -0x19(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
callq 0x24330
cmpq $0x0, -0x28(%rbp)
je 0x2a027
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x2a02f
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
expand_tilde:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_29FAE
lea rax, home_dir
mov rax, [rax]
mov [rbp+var_8], rax
jmp loc_2A02F
loc_29FAE:
mov rax, [rbp+var_10]
mov rdi, [rax]
mov esi, 2Fh ; '/'
call _strchr
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_29FD9
mov rax, [rbp+var_10]
mov rdi, [rax]
call strend
mov [rbp+var_18], rax
loc_29FD9:
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_19], al
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov rdi, [rax]
call _getpwnam
mov [rbp+var_28], rax
mov cl, [rbp+var_19]
mov rax, [rbp+var_18]
mov [rax], cl
call _endpwent
cmp [rbp+var_28], 0
jz short loc_2A027
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_28]
mov rax, [rax+20h]
mov [rbp+var_8], rax
jmp short loc_2A02F
loc_2A027:
mov [rbp+var_8], 0
loc_2A02F:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long expand_tilde(char **a1)
{
long long v2; // [rsp+8h] [rbp-28h]
char v3; // [rsp+17h] [rbp-19h]
char *v4; // [rsp+18h] [rbp-18h]
if ( **a1 == 47 )
return home_dir;
v4 = (char *)strchr(*a1, 47LL);
if ( !v4 )
v4 = (char *)strend(*a1);
v3 = *v4;
*v4 = 0;
v2 = getpwnam(*a1);
*v4 = v3;
endpwent();
if ( !v2 )
return 0LL;
*a1 = v4;
return *(_QWORD *)(v2 + 32);
}
|
expand_tilde:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x00129fae
LEA RAX,[0x4902d8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012a02f
LAB_00129fae:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV ESI,0x2f
CALL 0x00124100
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x00129fd9
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0017ef40
MOV qword ptr [RBP + -0x18],RAX
LAB_00129fd9:
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x19],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x001241f0
MOV qword ptr [RBP + -0x28],RAX
MOV CL,byte ptr [RBP + -0x19]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
CALL 0x00124330
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0012a027
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012a02f
LAB_0012a027:
MOV qword ptr [RBP + -0x8],0x0
LAB_0012a02f:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
char * expand_tilde(int8 *param_1)
{
char cVar1;
passwd *ppVar2;
char *local_20;
char *local_10;
if (*(char *)*param_1 == '/') {
local_10 = home_dir;
}
else {
local_20 = strchr((char *)*param_1,0x2f);
if (local_20 == (char *)0x0) {
local_20 = (char *)strend(*param_1);
}
cVar1 = *local_20;
*local_20 = '\0';
ppVar2 = getpwnam((char *)*param_1);
*local_20 = cVar1;
endpwent();
if (ppVar2 == (passwd *)0x0) {
local_10 = (char *)0x0;
}
else {
*param_1 = local_20;
local_10 = ppVar2->pw_dir;
}
}
return local_10;
}
|
|
10,550 |
mthd_supported_buffer_type
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
my_bool mthd_supported_buffer_type(enum enum_field_types type)
{
switch (type) {
case MYSQL_TYPE_BIT:
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_DATE:
case MYSQL_TYPE_DATETIME:
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_DOUBLE:
case MYSQL_TYPE_FLOAT:
case MYSQL_TYPE_GEOMETRY:
case MYSQL_TYPE_INT24:
case MYSQL_TYPE_LONG:
case MYSQL_TYPE_LONG_BLOB:
case MYSQL_TYPE_LONGLONG:
case MYSQL_TYPE_MEDIUM_BLOB:
case MYSQL_TYPE_NEWDATE:
case MYSQL_TYPE_NEWDECIMAL:
case MYSQL_TYPE_NULL:
case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_JSON:
case MYSQL_TYPE_TIME:
case MYSQL_TYPE_TIMESTAMP:
case MYSQL_TYPE_TINY:
case MYSQL_TYPE_TINY_BLOB:
case MYSQL_TYPE_VAR_STRING:
case MYSQL_TYPE_YEAR:
return 1;
break;
default:
return 0;
break;
}
}
|
O3
|
c
|
mthd_supported_buffer_type:
pushq %rbp
movq %rsp, %rbp
movb $0x1, %al
cmpl $0x10, %edi
ja 0x8f106
cmpl $0xf, %edi
jne 0x8f11b
addl $0xffffff0b, %edi # imm = 0xFFFFFF0B
cmpl $0xa, %edi
ja 0x8f11d
movl $0x7f3, %ecx # imm = 0x7F3
btl %edi, %ecx
jae 0x8f11d
popq %rbp
retq
xorl %eax, %eax
jmp 0x8f11b
|
mthd_supported_buffer_type:
push rbp
mov rbp, rsp
mov al, 1
cmp edi, 10h
ja short loc_8F106
cmp edi, 0Fh
jnz short loc_8F11B
loc_8F106:
add edi, 0FFFFFF0Bh
cmp edi, 0Ah
ja short loc_8F11D
mov ecx, 7F3h
bt ecx, edi
jnb short loc_8F11D
loc_8F11B:
pop rbp
retn
loc_8F11D:
xor eax, eax
jmp short loc_8F11B
|
char mthd_supported_buffer_type(unsigned int a1)
{
char result; // al
unsigned int v2; // edi
int v3; // ecx
result = 1;
if ( a1 > 0x10 || a1 == 15 )
{
v2 = a1 - 245;
if ( v2 > 0xA )
return 0;
v3 = 2035;
if ( !_bittest(&v3, v2) )
return 0;
}
return result;
}
|
mthd_supported_buffer_type:
PUSH RBP
MOV RBP,RSP
MOV AL,0x1
CMP EDI,0x10
JA 0x0018f106
CMP EDI,0xf
JNZ 0x0018f11b
LAB_0018f106:
ADD EDI,0xffffff0b
CMP EDI,0xa
JA 0x0018f11d
MOV ECX,0x7f3
BT ECX,EDI
JNC 0x0018f11d
LAB_0018f11b:
POP RBP
RET
LAB_0018f11d:
XOR EAX,EAX
JMP 0x0018f11b
|
int8 mthd_supported_buffer_type(uint param_1)
{
int8 uVar1;
uVar1 = 1;
if (((0x10 < param_1) || (param_1 == 0xf)) &&
((10 < param_1 - 0xf5 || ((0x7f3U >> (param_1 - 0xf5 & 0x1f) & 1) == 0)))) {
uVar1 = 0;
}
return uVar1;
}
|
|
10,551 |
mysql_query_with_error_report
|
eloqsql/client/mysqldump.c
|
static int mysql_query_with_error_report(MYSQL *mysql_con, MYSQL_RES **res,
const char *query)
{
if (mysql_query(mysql_con, query) ||
(res && !((*res)= mysql_store_result(mysql_con))))
{
maybe_die(EX_MYSQLERR, "Couldn't execute '%s': %s (%d)",
query, mysql_error(mysql_con), mysql_errno(mysql_con));
return 1;
}
return 0;
}
|
O0
|
c
|
mysql_query_with_error_report:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4fe70
cmpl $0x0, %eax
jne 0x39393
cmpq $0x0, -0x18(%rbp)
je 0x393d8
movq -0x10(%rbp), %rdi
callq 0x514c0
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x393d8
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x537f0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x537c0
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl %eax, %r8d
movl $0x2, %edi
leaq 0x9ef8c(%rip), %rsi # 0xd8354
movb $0x0, %al
callq 0x3cbf0
movl $0x1, -0x4(%rbp)
jmp 0x393df
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
mysql_query_with_error_report:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call mysql_query
cmp eax, 0
jnz short loc_39393
cmp [rbp+var_18], 0
jz short loc_393D8
mov rdi, [rbp+var_10]
call mysql_store_result
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jnz short loc_393D8
loc_39393:
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_28]
mov r8d, eax
mov edi, 2
lea rsi, aCouldnTExecute; "Couldn't execute '%s': %s (%d)"
mov al, 0
call maybe_die
mov [rbp+var_4], 1
jmp short loc_393DF
loc_393D8:
mov [rbp+var_4], 0
loc_393DF:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long mysql_query_with_error_report(long long a1, long long *a2, long long a3)
{
long long v3; // rax
int v4; // eax
int v5; // r9d
int v7; // [rsp+8h] [rbp-28h]
int v8; // [rsp+10h] [rbp-20h]
v8 = a3;
if ( (unsigned int)mysql_query(a1, a3) || a2 && (v3 = mysql_store_result(a1), (*a2 = v3) == 0) )
{
v7 = mysql_error(a1);
v4 = mysql_errno(a1);
maybe_die(2, (unsigned int)"Couldn't execute '%s': %s (%d)", v8, v7, v4, v5, v8);
return 1;
}
else
{
return 0;
}
}
|
mysql_query_with_error_report:
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 RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0014fe70
CMP EAX,0x0
JNZ 0x00139393
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001393d8
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001514c0
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x001393d8
LAB_00139393:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001537f0
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001537c0
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,EAX
MOV EDI,0x2
LEA RSI,[0x1d8354]
MOV AL,0x0
CALL 0x0013cbf0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001393df
LAB_001393d8:
MOV dword ptr [RBP + -0x4],0x0
LAB_001393df:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 mysql_query_with_error_report(int8 param_1,long *param_2,int8 param_3)
{
int iVar1;
int4 uVar2;
long lVar3;
int8 uVar4;
int4 local_c;
iVar1 = mysql_query(param_1,param_3);
if (iVar1 == 0) {
if (param_2 != (long *)0x0) {
lVar3 = mysql_store_result(param_1);
*param_2 = lVar3;
if (lVar3 == 0) goto LAB_00139393;
}
local_c = 0;
}
else {
LAB_00139393:
uVar4 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
maybe_die(2,"Couldn\'t execute \'%s\': %s (%d)",param_3,uVar4,uVar2);
local_c = 1;
}
return local_c;
}
|
|
10,552 |
initialize_performance_schema(PFS_global_param*)
|
eloqsql/storage/perfschema/pfs_server.cc
|
struct PSI_bootstrap*
initialize_performance_schema(PFS_global_param *param)
{
if (!THR_PFS_initialized)
{
/* Pre-initialization failed. */
return NULL;
}
pfs_enabled= param->m_enabled;
pfs_automated_sizing(param);
init_timers();
init_event_name_sizing(param);
register_global_classes();
if (init_sync_class(param->m_mutex_class_sizing,
param->m_rwlock_class_sizing,
param->m_cond_class_sizing) ||
init_thread_class(param->m_thread_class_sizing) ||
init_table_share(param->m_table_share_sizing) ||
init_table_share_lock_stat(param->m_table_lock_stat_sizing) ||
init_table_share_index_stat(param->m_index_stat_sizing) ||
init_file_class(param->m_file_class_sizing) ||
init_stage_class(param->m_stage_class_sizing) ||
init_statement_class(param->m_statement_class_sizing) ||
init_socket_class(param->m_socket_class_sizing) ||
init_memory_class(param->m_memory_class_sizing) ||
init_instruments(param) ||
init_events_waits_history_long(
param->m_events_waits_history_long_sizing) ||
init_events_stages_history_long(
param->m_events_stages_history_long_sizing) ||
init_events_statements_history_long(
param->m_events_statements_history_long_sizing) ||
init_events_transactions_history_long(
param->m_events_transactions_history_long_sizing) ||
init_file_hash(param) ||
init_table_share_hash(param) ||
init_setup_actor(param) ||
init_setup_actor_hash(param) ||
init_setup_object(param) ||
init_setup_object_hash(param) ||
init_host(param) ||
init_host_hash(param) ||
init_user(param) ||
init_user_hash(param) ||
init_account(param) ||
init_account_hash(param) ||
init_digest(param) ||
init_digest_hash(param) ||
init_program(param) ||
init_program_hash(param) ||
init_prepared_stmt(param))
{
/*
The performance schema initialization failed.
Free the memory used, and disable the instrumentation.
*/
cleanup_performance_schema();
return NULL;
}
if (param->m_enabled)
{
/** Default values for SETUP_CONSUMERS */
flag_events_stages_current= param->m_consumer_events_stages_current_enabled;
flag_events_stages_history= param->m_consumer_events_stages_history_enabled;
flag_events_stages_history_long= param->m_consumer_events_stages_history_long_enabled;
flag_events_statements_current= param->m_consumer_events_statements_current_enabled;
flag_events_statements_history= param->m_consumer_events_statements_history_enabled;
flag_events_statements_history_long= param->m_consumer_events_statements_history_long_enabled;
flag_events_transactions_current= param->m_consumer_events_transactions_current_enabled;
flag_events_transactions_history= param->m_consumer_events_transactions_history_enabled;
flag_events_transactions_history_long= param->m_consumer_events_transactions_history_long_enabled;
flag_events_waits_current= param->m_consumer_events_waits_current_enabled;
flag_events_waits_history= param->m_consumer_events_waits_history_enabled;
flag_events_waits_history_long= param->m_consumer_events_waits_history_long_enabled;
flag_global_instrumentation= param->m_consumer_global_instrumentation_enabled;
flag_thread_instrumentation= param->m_consumer_thread_instrumentation_enabled;
flag_statements_digest= param->m_consumer_statement_digest_enabled;
}
else
{
flag_events_stages_current= false;
flag_events_stages_history= false;
flag_events_stages_history_long= false;
flag_events_statements_current= false;
flag_events_statements_history= false;
flag_events_statements_history_long= false;
flag_events_transactions_current= false;
flag_events_transactions_history= false;
flag_events_transactions_history_long= false;
flag_events_waits_current= false;
flag_events_waits_history= false;
flag_events_waits_history_long= false;
flag_global_instrumentation= false;
flag_thread_instrumentation= false;
flag_statements_digest= false;
}
pfs_initialized= true;
if (param->m_enabled)
{
install_default_setup(&PFS_bootstrap);
return &PFS_bootstrap;
}
return NULL;
}
|
O3
|
cpp
|
initialize_performance_schema(PFS_global_param*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x3971ab(%rip), %rax # 0x3d5a54
cmpb $0x1, (%rax)
jne 0x3eacf
movq %rdi, %rbx
movb (%rdi), %al
leaq 0x2dd762(%rip), %rcx # 0x31c020
movb %al, (%rcx)
callq 0x45da2
callq 0x4058c
movq %rbx, %rdi
callq 0x3ab1c
callq 0x3ab5f
movl 0x18(%rbx), %edi
movl 0x20(%rbx), %esi
movl 0x28(%rbx), %edx
callq 0x27c7a
testl %eax, %eax
jne 0x3eaca
movl 0x30(%rbx), %edi
callq 0x3af02
testl %eax, %eax
jne 0x3eaca
movl 0x38(%rbx), %edi
callq 0x3afac
testl %eax, %eax
jne 0x3eaca
movl 0x40(%rbx), %edi
callq 0x3b4a9
testl %eax, %eax
jne 0x3eaca
movl 0x48(%rbx), %edi
callq 0x3b4d7
testl %eax, %eax
jne 0x3eaca
movl 0x50(%rbx), %edi
callq 0x27d82
testl %eax, %eax
jne 0x3eaca
movl 0xd8(%rbx), %edi
callq 0x27dd9
testl %eax, %eax
jne 0x3eaca
movl 0xf0(%rbx), %edi
callq 0x27e30
testl %eax, %eax
jne 0x3eaca
movl 0x98(%rbx), %edi
callq 0x27e87
testl %eax, %eax
jne 0x3eaca
movl 0x140(%rbx), %edi
callq 0x27ede
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x27472
testl %eax, %eax
jne 0x3eaca
movl 0xa8(%rbx), %edi
callq 0x34078
testl %eax, %eax
jne 0x3eaca
movl 0xe8(%rbx), %edi
callq 0x330e0
testl %eax, %eax
jne 0x3eaca
movq 0x100(%rbx), %rdi
callq 0x337d8
testl %eax, %eax
jne 0x3eaca
movl 0x128(%rbx), %edi
callq 0x47644
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x35657
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x3afda
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x3f1bc
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x3f1e5
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x3fac8
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x3faf1
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x349e0
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x34a13
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x40ad4
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x40b07
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x44c00
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x44c33
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x32a70
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x32c95
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x46570
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x4661c
testl %eax, %eax
jne 0x3eaca
movq %rbx, %rdi
callq 0x46fb0
testl %eax, %eax
je 0x3eae3
callq 0x3ec2b
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x1, (%rbx)
jne 0x3eb2d
movb 0x1(%rbx), %al
movl %eax, -0x38(%rbp)
movb 0x2(%rbx), %al
movl %eax, -0x34(%rbp)
movb 0x3(%rbx), %dl
movb 0x4(%rbx), %sil
movb 0x5(%rbx), %dil
movb 0x6(%rbx), %r8b
movb 0x7(%rbx), %r9b
movb 0x8(%rbx), %r10b
movb 0x9(%rbx), %r11b
movb 0xa(%rbx), %r14b
movb 0xb(%rbx), %r15b
movb 0xc(%rbx), %r12b
movb 0xd(%rbx), %r13b
movb 0xe(%rbx), %al
movl %eax, -0x30(%rbp)
movb 0xf(%rbx), %al
movl %eax, -0x2c(%rbp)
jmp 0x3eb67
movl $0x0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
xorl %edx, %edx
xorl %esi, %esi
xorl %edi, %edi
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %r13d, %r13d
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
leaq 0x393452(%rip), %rax # 0x3d1fc0
movl -0x38(%rbp), %ecx
movb %cl, (%rax)
leaq 0x393486(%rip), %rax # 0x3d2000
movl -0x34(%rbp), %ecx
movb %cl, (%rax)
leaq 0x3934ba(%rip), %rax # 0x3d2040
movb %dl, (%rax)
leaq 0x3935f1(%rip), %rax # 0x3d2180
movb %sil, (%rax)
leaq 0x393627(%rip), %rax # 0x3d21c0
movb %dil, (%rax)
leaq 0x39365d(%rip), %rax # 0x3d2200
movb %r8b, (%rax)
leaq 0x397093(%rip), %rax # 0x3d5c40
movb %r9b, (%rax)
leaq 0x3970c9(%rip), %rax # 0x3d5c80
movb %r10b, (%rax)
leaq 0x3970ff(%rip), %rax # 0x3d5cc0
movb %r11b, (%rax)
leaq 0x393775(%rip), %rax # 0x3d2340
movb %r14b, (%rax)
leaq 0x3937ab(%rip), %rax # 0x3d2380
movb %r15b, (%rax)
leaq 0x3937e1(%rip), %rax # 0x3d23c0
movb %r12b, (%rax)
leaq 0x393817(%rip), %rax # 0x3d2400
movb %r13b, (%rax)
leaq 0x39384d(%rip), %rax # 0x3d2440
movl -0x30(%rbp), %ecx
movb %cl, (%rax)
leaq 0x2dd415(%rip), %rax # 0x31c014
movl -0x2c(%rbp), %ecx
movb %cl, (%rax)
leaq 0x354676(%rip), %rax # 0x393281
movb $0x1, (%rax)
cmpb $0x1, (%rbx)
jne 0x3eacf
leaq 0x2dd8e2(%rip), %rbx # 0x31c500
movq %rbx, %rdi
callq 0x2cd9e
jmp 0x3ead1
|
_Z29initialize_performance_schemaP16PFS_global_param:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
lea rax, THR_PFS_initialized
cmp byte ptr [rax], 1
jnz loc_3EACF
mov rbx, rdi
mov al, [rdi]
lea rcx, pfs_enabled
mov [rcx], al
call _Z20pfs_automated_sizingP16PFS_global_param; pfs_automated_sizing(PFS_global_param *)
call _Z11init_timersv; init_timers(void)
mov rdi, rbx
call _Z22init_event_name_sizingPK16PFS_global_param; init_event_name_sizing(PFS_global_param const*)
call _Z23register_global_classesv; register_global_classes(void)
mov edi, [rbx+18h]; unsigned int
mov esi, [rbx+20h]; unsigned int
mov edx, [rbx+28h]; unsigned int
call _Z15init_sync_classjjj; init_sync_class(uint,uint,uint)
test eax, eax
jnz loc_3EACA
mov edi, [rbx+30h]; unsigned int
call _Z17init_thread_classj; init_thread_class(uint)
test eax, eax
jnz loc_3EACA
mov edi, [rbx+38h]; unsigned int
call _Z16init_table_sharej; init_table_share(uint)
test eax, eax
jnz loc_3EACA
mov edi, [rbx+40h]; unsigned int
call _Z26init_table_share_lock_statj; init_table_share_lock_stat(uint)
test eax, eax
jnz loc_3EACA
mov edi, [rbx+48h]; unsigned int
call _Z27init_table_share_index_statj; init_table_share_index_stat(uint)
test eax, eax
jnz loc_3EACA
mov edi, [rbx+50h]; unsigned int
call _Z15init_file_classj; init_file_class(uint)
test eax, eax
jnz loc_3EACA
mov edi, [rbx+0D8h]; unsigned int
call _Z16init_stage_classj; init_stage_class(uint)
test eax, eax
jnz loc_3EACA
mov edi, [rbx+0F0h]; unsigned int
call _Z20init_statement_classj; init_statement_class(uint)
test eax, eax
jnz loc_3EACA
mov edi, [rbx+98h]; unsigned int
call _Z17init_socket_classj; init_socket_class(uint)
test eax, eax
jnz loc_3EACA
mov edi, [rbx+140h]; unsigned int
call _Z17init_memory_classj; init_memory_class(uint)
test eax, eax
jnz loc_3EACA
mov rdi, rbx
call _Z16init_instrumentsPK16PFS_global_param; init_instruments(PFS_global_param const*)
test eax, eax
jnz loc_3EACA
mov edi, [rbx+0A8h]; unsigned int
call _Z30init_events_waits_history_longj; init_events_waits_history_long(uint)
test eax, eax
jnz loc_3EACA
mov edi, [rbx+0E8h]; unsigned int
call _Z31init_events_stages_history_longj; init_events_stages_history_long(uint)
test eax, eax
jnz loc_3EACA
mov rdi, [rbx+100h]; unsigned __int64
call _Z35init_events_statements_history_longm; init_events_statements_history_long(ulong)
test eax, eax
jnz loc_3EACA
mov edi, [rbx+128h]; unsigned int
call _Z37init_events_transactions_history_longj; init_events_transactions_history_long(uint)
test eax, eax
jnz loc_3EACA
mov rdi, rbx
call _Z14init_file_hashPK16PFS_global_param; init_file_hash(PFS_global_param const*)
test eax, eax
jnz loc_3EACA
mov rdi, rbx
call _Z21init_table_share_hashPK16PFS_global_param; init_table_share_hash(PFS_global_param const*)
test eax, eax
jnz loc_3EACA
mov rdi, rbx
call _Z16init_setup_actorPK16PFS_global_param; init_setup_actor(PFS_global_param const*)
test eax, eax
jnz loc_3EACA
mov rdi, rbx
call _Z21init_setup_actor_hashPK16PFS_global_param; init_setup_actor_hash(PFS_global_param const*)
test eax, eax
jnz loc_3EACA
mov rdi, rbx
call _Z17init_setup_objectPK16PFS_global_param; init_setup_object(PFS_global_param const*)
test eax, eax
jnz loc_3EACA
mov rdi, rbx
call _Z22init_setup_object_hashPK16PFS_global_param; init_setup_object_hash(PFS_global_param const*)
test eax, eax
jnz loc_3EACA
mov rdi, rbx
call _Z9init_hostPK16PFS_global_param; init_host(PFS_global_param const*)
test eax, eax
jnz short loc_3EACA
mov rdi, rbx
call _Z14init_host_hashPK16PFS_global_param; init_host_hash(PFS_global_param const*)
test eax, eax
jnz short loc_3EACA
mov rdi, rbx
call _Z9init_userPK16PFS_global_param; init_user(PFS_global_param const*)
test eax, eax
jnz short loc_3EACA
mov rdi, rbx
call _Z14init_user_hashPK16PFS_global_param; init_user_hash(PFS_global_param const*)
test eax, eax
jnz short loc_3EACA
mov rdi, rbx
call _Z12init_accountPK16PFS_global_param; init_account(PFS_global_param const*)
test eax, eax
jnz short loc_3EACA
mov rdi, rbx
call _Z17init_account_hashPK16PFS_global_param; init_account_hash(PFS_global_param const*)
test eax, eax
jnz short loc_3EACA
mov rdi, rbx
call _Z11init_digestPK16PFS_global_param; init_digest(PFS_global_param const*)
test eax, eax
jnz short loc_3EACA
mov rdi, rbx
call _Z16init_digest_hashPK16PFS_global_param; init_digest_hash(PFS_global_param const*)
test eax, eax
jnz short loc_3EACA
mov rdi, rbx
call _Z12init_programPK16PFS_global_param; init_program(PFS_global_param const*)
test eax, eax
jnz short loc_3EACA
mov rdi, rbx
call _Z17init_program_hashPK16PFS_global_param; init_program_hash(PFS_global_param const*)
test eax, eax
jnz short loc_3EACA
mov rdi, rbx
call _Z18init_prepared_stmtPK16PFS_global_param; init_prepared_stmt(PFS_global_param const*)
test eax, eax
jz short loc_3EAE3
loc_3EACA:
call _ZL26cleanup_performance_schemav; cleanup_performance_schema(void)
loc_3EACF:
xor ebx, ebx
loc_3EAD1:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3EAE3:
cmp byte ptr [rbx], 1
jnz short loc_3EB2D
mov al, [rbx+1]
mov [rbp+var_38], eax
mov al, [rbx+2]
mov [rbp+var_34], eax
mov dl, [rbx+3]
mov sil, [rbx+4]
mov dil, [rbx+5]
mov r8b, [rbx+6]
mov r9b, [rbx+7]
mov r10b, [rbx+8]
mov r11b, [rbx+9]
mov r14b, [rbx+0Ah]
mov r15b, [rbx+0Bh]
mov r12b, [rbx+0Ch]
mov r13b, [rbx+0Dh]
mov al, [rbx+0Eh]
mov [rbp+var_30], eax
mov al, [rbx+0Fh]
mov [rbp+var_2C], eax
jmp short loc_3EB67
loc_3EB2D:
mov [rbp+var_38], 0
mov [rbp+var_34], 0
xor edx, edx
xor esi, esi
xor edi, edi
xor r8d, r8d
xor r9d, r9d
xor r10d, r10d
xor r11d, r11d
xor r14d, r14d
xor r15d, r15d
xor r12d, r12d
xor r13d, r13d
mov [rbp+var_30], 0
mov [rbp+var_2C], 0
loc_3EB67:
lea rax, flag_events_stages_current
mov ecx, [rbp+var_38]
mov [rax], cl
lea rax, flag_events_stages_history
mov ecx, [rbp+var_34]
mov [rax], cl
lea rax, flag_events_stages_history_long
mov [rax], dl
lea rax, flag_events_statements_current
mov [rax], sil
lea rax, flag_events_statements_history
mov [rax], dil
lea rax, flag_events_statements_history_long
mov [rax], r8b
lea rax, flag_events_transactions_current
mov [rax], r9b
lea rax, flag_events_transactions_history
mov [rax], r10b
lea rax, flag_events_transactions_history_long
mov [rax], r11b
lea rax, flag_events_waits_current
mov [rax], r14b
lea rax, flag_events_waits_history
mov [rax], r15b
lea rax, flag_events_waits_history_long
mov [rax], r12b
lea rax, flag_global_instrumentation
mov [rax], r13b
lea rax, flag_thread_instrumentation
mov ecx, [rbp+var_30]
mov [rax], cl
lea rax, flag_statements_digest
mov ecx, [rbp+var_2C]
mov [rax], cl
lea rax, pfs_initialized
mov byte ptr [rax], 1
cmp byte ptr [rbx], 1
jnz loc_3EACF
lea rbx, PFS_bootstrap
mov rdi, rbx
call _Z21install_default_setupP13PSI_bootstrap; install_default_setup(PSI_bootstrap *)
jmp loc_3EAD1
|
long long ( ** initialize_performance_schema(long long a1))(int)
{
long long ( **v2)(int); // rbx
char v4; // dl
char v5; // si
char v6; // di
char v7; // r8
char v8; // r9
char v9; // r10
char v10; // r11
char v11; // r14
char v12; // r15
char v13; // r12
char v14; // r13
char v15; // [rsp+8h] [rbp-38h]
char v16; // [rsp+Ch] [rbp-34h]
char v17; // [rsp+10h] [rbp-30h]
char v18; // [rsp+14h] [rbp-2Ch]
if ( THR_PFS_initialized[0] == 1 )
{
pfs_enabled = *(_BYTE *)a1;
pfs_automated_sizing();
init_timers();
init_event_name_sizing((_DWORD *)a1);
register_global_classes();
if ( (unsigned int)init_sync_class(*(_DWORD *)(a1 + 24), *(unsigned int *)(a1 + 32), *(_DWORD *)(a1 + 40))
|| (unsigned int)init_thread_class(*(_DWORD *)(a1 + 48))
|| init_table_share(*(_DWORD *)(a1 + 56))
|| init_table_share_lock_stat(*(_DWORD *)(a1 + 64))
|| init_table_share_index_stat(*(_DWORD *)(a1 + 72))
|| (unsigned int)init_file_class(*(_DWORD *)(a1 + 80))
|| (unsigned int)init_stage_class(*(_DWORD *)(a1 + 216))
|| (unsigned int)init_statement_class(*(_DWORD *)(a1 + 240))
|| (unsigned int)init_socket_class(*(_DWORD *)(a1 + 152))
|| (unsigned int)init_memory_class(*(_DWORD *)(a1 + 320))
|| (unsigned int)init_instruments(a1)
|| init_events_waits_history_long(*(_DWORD *)(a1 + 168))
|| init_events_stages_history_long(*(_DWORD *)(a1 + 232))
|| (unsigned int)init_events_statements_history_long(*(_QWORD *)(a1 + 256))
|| (unsigned int)init_events_transactions_history_long(*(_DWORD *)(a1 + 296))
|| (unsigned int)init_file_hash(a1)
|| (unsigned int)init_table_share_hash(a1)
|| (unsigned int)init_setup_actor(a1)
|| (unsigned int)init_setup_actor_hash(a1)
|| (unsigned int)init_setup_object(a1)
|| (unsigned int)init_setup_object_hash(a1)
|| init_host(a1)
|| (unsigned int)init_host_hash(a1)
|| (unsigned int)init_user(a1)
|| (unsigned int)init_user_hash(a1)
|| (unsigned int)init_account(a1)
|| (unsigned int)init_account_hash(a1)
|| (unsigned int)init_digest(a1)
|| (unsigned int)init_digest_hash(a1)
|| (unsigned int)init_program(a1)
|| (unsigned int)init_program_hash(a1)
|| (unsigned int)init_prepared_stmt(a1) )
{
cleanup_performance_schema();
}
else
{
if ( *(_BYTE *)a1 == 1 )
{
v15 = *(_BYTE *)(a1 + 1);
v16 = *(_BYTE *)(a1 + 2);
v4 = *(_BYTE *)(a1 + 3);
v5 = *(_BYTE *)(a1 + 4);
v6 = *(_BYTE *)(a1 + 5);
v7 = *(_BYTE *)(a1 + 6);
v8 = *(_BYTE *)(a1 + 7);
v9 = *(_BYTE *)(a1 + 8);
v10 = *(_BYTE *)(a1 + 9);
v11 = *(_BYTE *)(a1 + 10);
v12 = *(_BYTE *)(a1 + 11);
v13 = *(_BYTE *)(a1 + 12);
v14 = *(_BYTE *)(a1 + 13);
v17 = *(_BYTE *)(a1 + 14);
v18 = *(_BYTE *)(a1 + 15);
}
else
{
v15 = 0;
v16 = 0;
v4 = 0;
v5 = 0;
v6 = 0;
v7 = 0;
v8 = 0;
v9 = 0;
v10 = 0;
v11 = 0;
v12 = 0;
v13 = 0;
v14 = 0;
v17 = 0;
v18 = 0;
}
flag_events_stages_current = v15;
flag_events_stages_history = v16;
flag_events_stages_history_long = v4;
flag_events_statements_current = v5;
flag_events_statements_history = v6;
flag_events_statements_history_long = v7;
flag_events_transactions_current = v8;
flag_events_transactions_history = v9;
flag_events_transactions_history_long = v10;
flag_events_waits_current = v11;
flag_events_waits_history = v12;
flag_events_waits_history_long = v13;
flag_global_instrumentation[0] = v14;
flag_thread_instrumentation[0] = v17;
flag_statements_digest = v18;
pfs_initialized[0] = 1;
if ( *(_BYTE *)a1 == 1 )
{
v2 = &PFS_bootstrap;
install_default_setup();
return v2;
}
}
}
return 0LL;
}
|
initialize_performance_schema:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
LEA RAX,[0x4d5a54]
CMP byte ptr [RAX],0x1
JNZ 0x0013eacf
MOV RBX,RDI
MOV AL,byte ptr [RDI]
LEA RCX,[0x41c020]
MOV byte ptr [RCX],AL
CALL 0x00145da2
CALL 0x0014058c
MOV RDI,RBX
CALL 0x0013ab1c
CALL 0x0013ab5f
MOV EDI,dword ptr [RBX + 0x18]
MOV ESI,dword ptr [RBX + 0x20]
MOV EDX,dword ptr [RBX + 0x28]
CALL 0x00127c7a
TEST EAX,EAX
JNZ 0x0013eaca
MOV EDI,dword ptr [RBX + 0x30]
CALL 0x0013af02
TEST EAX,EAX
JNZ 0x0013eaca
MOV EDI,dword ptr [RBX + 0x38]
CALL 0x0013afac
TEST EAX,EAX
JNZ 0x0013eaca
MOV EDI,dword ptr [RBX + 0x40]
CALL 0x0013b4a9
TEST EAX,EAX
JNZ 0x0013eaca
MOV EDI,dword ptr [RBX + 0x48]
CALL 0x0013b4d7
TEST EAX,EAX
JNZ 0x0013eaca
MOV EDI,dword ptr [RBX + 0x50]
CALL 0x00127d82
TEST EAX,EAX
JNZ 0x0013eaca
MOV EDI,dword ptr [RBX + 0xd8]
CALL 0x00127dd9
TEST EAX,EAX
JNZ 0x0013eaca
MOV EDI,dword ptr [RBX + 0xf0]
CALL 0x00127e30
TEST EAX,EAX
JNZ 0x0013eaca
MOV EDI,dword ptr [RBX + 0x98]
CALL 0x00127e87
TEST EAX,EAX
JNZ 0x0013eaca
MOV EDI,dword ptr [RBX + 0x140]
CALL 0x00127ede
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x00127472
TEST EAX,EAX
JNZ 0x0013eaca
MOV EDI,dword ptr [RBX + 0xa8]
CALL 0x00134078
TEST EAX,EAX
JNZ 0x0013eaca
MOV EDI,dword ptr [RBX + 0xe8]
CALL 0x001330e0
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,qword ptr [RBX + 0x100]
CALL 0x001337d8
TEST EAX,EAX
JNZ 0x0013eaca
MOV EDI,dword ptr [RBX + 0x128]
CALL 0x00147644
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x00135657
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x0013afda
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x0013f1bc
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x0013f1e5
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x0013fac8
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x0013faf1
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x001349e0
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x00134a13
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x00140ad4
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x00140b07
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x00144c00
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x00144c33
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x00132a70
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x00132c95
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x00146570
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x0014661c
TEST EAX,EAX
JNZ 0x0013eaca
MOV RDI,RBX
CALL 0x00146fb0
TEST EAX,EAX
JZ 0x0013eae3
LAB_0013eaca:
CALL 0x0013ec2b
LAB_0013eacf:
XOR EBX,EBX
LAB_0013ead1:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013eae3:
CMP byte ptr [RBX],0x1
JNZ 0x0013eb2d
MOV AL,byte ptr [RBX + 0x1]
MOV dword ptr [RBP + -0x38],EAX
MOV AL,byte ptr [RBX + 0x2]
MOV dword ptr [RBP + -0x34],EAX
MOV DL,byte ptr [RBX + 0x3]
MOV SIL,byte ptr [RBX + 0x4]
MOV DIL,byte ptr [RBX + 0x5]
MOV R8B,byte ptr [RBX + 0x6]
MOV R9B,byte ptr [RBX + 0x7]
MOV R10B,byte ptr [RBX + 0x8]
MOV R11B,byte ptr [RBX + 0x9]
MOV R14B,byte ptr [RBX + 0xa]
MOV R15B,byte ptr [RBX + 0xb]
MOV R12B,byte ptr [RBX + 0xc]
MOV R13B,byte ptr [RBX + 0xd]
MOV AL,byte ptr [RBX + 0xe]
MOV dword ptr [RBP + -0x30],EAX
MOV AL,byte ptr [RBX + 0xf]
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0013eb67
LAB_0013eb2d:
MOV dword ptr [RBP + -0x38],0x0
MOV dword ptr [RBP + -0x34],0x0
XOR EDX,EDX
XOR ESI,ESI
XOR EDI,EDI
XOR R8D,R8D
XOR R9D,R9D
XOR R10D,R10D
XOR R11D,R11D
XOR R14D,R14D
XOR R15D,R15D
XOR R12D,R12D
XOR R13D,R13D
MOV dword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x2c],0x0
LAB_0013eb67:
LEA RAX,[0x4d1fc0]
MOV ECX,dword ptr [RBP + -0x38]
MOV byte ptr [RAX],CL
LEA RAX,[0x4d2000]
MOV ECX,dword ptr [RBP + -0x34]
MOV byte ptr [RAX],CL
LEA RAX,[0x4d2040]
MOV byte ptr [RAX],DL
LEA RAX,[0x4d2180]
MOV byte ptr [RAX],SIL
LEA RAX,[0x4d21c0]
MOV byte ptr [RAX],DIL
LEA RAX,[0x4d2200]
MOV byte ptr [RAX],R8B
LEA RAX,[0x4d5c40]
MOV byte ptr [RAX],R9B
LEA RAX,[0x4d5c80]
MOV byte ptr [RAX],R10B
LEA RAX,[0x4d5cc0]
MOV byte ptr [RAX],R11B
LEA RAX,[0x4d2340]
MOV byte ptr [RAX],R14B
LEA RAX,[0x4d2380]
MOV byte ptr [RAX],R15B
LEA RAX,[0x4d23c0]
MOV byte ptr [RAX],R12B
LEA RAX,[0x4d2400]
MOV byte ptr [RAX],R13B
LEA RAX,[0x4d2440]
MOV ECX,dword ptr [RBP + -0x30]
MOV byte ptr [RAX],CL
LEA RAX,[0x41c014]
MOV ECX,dword ptr [RBP + -0x2c]
MOV byte ptr [RAX],CL
LEA RAX,[0x493281]
MOV byte ptr [RAX],0x1
CMP byte ptr [RBX],0x1
JNZ 0x0013eacf
LEA RBX,[0x41c500]
MOV RDI,RBX
CALL 0x0012cd9e
JMP 0x0013ead1
|
/* initialize_performance_schema(PFS_global_param*) */
int ** initialize_performance_schema(PFS_global_param *param_1)
{
int iVar1;
if (THR_PFS_initialized == '\x01') {
pfs_enabled = *param_1;
pfs_automated_sizing(param_1);
init_timers();
init_event_name_sizing(param_1);
register_global_classes();
iVar1 = init_sync_class(*(uint *)(param_1 + 0x18),*(uint *)(param_1 + 0x20),
*(uint *)(param_1 + 0x28));
if ((((((((iVar1 == 0) && (iVar1 = init_thread_class(*(uint *)(param_1 + 0x30)), iVar1 == 0)) &&
(iVar1 = init_table_share(*(uint *)(param_1 + 0x38)), iVar1 == 0)) &&
(((iVar1 = init_table_share_lock_stat(*(uint *)(param_1 + 0x40)), iVar1 == 0 &&
(iVar1 = init_table_share_index_stat(*(uint *)(param_1 + 0x48)), iVar1 == 0)) &&
((iVar1 = init_file_class(*(uint *)(param_1 + 0x50)), iVar1 == 0 &&
((iVar1 = init_stage_class(*(uint *)(param_1 + 0xd8)), iVar1 == 0 &&
(iVar1 = init_statement_class(*(uint *)(param_1 + 0xf0)), iVar1 == 0)))))))) &&
(iVar1 = init_socket_class(*(uint *)(param_1 + 0x98)), iVar1 == 0)) &&
((((((iVar1 = init_memory_class(*(uint *)(param_1 + 0x140)), iVar1 == 0 &&
(iVar1 = init_instruments(param_1), iVar1 == 0)) &&
(iVar1 = init_events_waits_history_long(*(uint *)(param_1 + 0xa8)), iVar1 == 0)) &&
((iVar1 = init_events_stages_history_long(*(uint *)(param_1 + 0xe8)), iVar1 == 0 &&
(iVar1 = init_events_statements_history_long(*(ulong *)(param_1 + 0x100)), iVar1 == 0))
)) && (iVar1 = init_events_transactions_history_long(*(uint *)(param_1 + 0x128)),
iVar1 == 0)) &&
(((iVar1 = init_file_hash(param_1), iVar1 == 0 &&
(iVar1 = init_table_share_hash(param_1), iVar1 == 0)) &&
(((iVar1 = init_setup_actor(param_1), iVar1 == 0 &&
(((iVar1 = init_setup_actor_hash(param_1), iVar1 == 0 &&
(iVar1 = init_setup_object(param_1), iVar1 == 0)) &&
(iVar1 = init_setup_object_hash(param_1), iVar1 == 0)))) &&
(((iVar1 = init_host(param_1), iVar1 == 0 &&
(iVar1 = init_host_hash(param_1), iVar1 == 0)) &&
(iVar1 = init_user(param_1), iVar1 == 0)))))))))) &&
(((iVar1 = init_user_hash(param_1), iVar1 == 0 &&
(iVar1 = init_account(param_1), iVar1 == 0)) &&
((iVar1 = init_account_hash(param_1), iVar1 == 0 &&
(((iVar1 = init_digest(param_1), iVar1 == 0 &&
(iVar1 = init_digest_hash(param_1), iVar1 == 0)) &&
(iVar1 = init_program(param_1), iVar1 == 0)))))))) &&
((iVar1 = init_program_hash(param_1), iVar1 == 0 &&
(iVar1 = init_prepared_stmt(param_1), iVar1 == 0)))) {
if (*param_1 == (PFS_global_param)0x1) {
flag_events_stages_current = param_1[1];
flag_events_stages_history = param_1[2];
flag_events_stages_history_long = param_1[3];
flag_events_statements_current = param_1[4];
flag_events_statements_history = param_1[5];
flag_events_statements_history_long = param_1[6];
flag_events_transactions_current = param_1[7];
flag_events_transactions_history = param_1[8];
flag_events_transactions_history_long = param_1[9];
flag_events_waits_current = param_1[10];
flag_events_waits_history = param_1[0xb];
flag_events_waits_history_long = param_1[0xc];
flag_global_instrumentation = param_1[0xd];
flag_thread_instrumentation = param_1[0xe];
flag_statements_digest = param_1[0xf];
}
else {
flag_events_stages_current = (PFS_global_param)0x0;
flag_events_stages_history = (PFS_global_param)0x0;
flag_events_stages_history_long = (PFS_global_param)0x0;
flag_events_statements_current = (PFS_global_param)0x0;
flag_events_statements_history = (PFS_global_param)0x0;
flag_events_statements_history_long = (PFS_global_param)0x0;
flag_events_transactions_current = (PFS_global_param)0x0;
flag_events_transactions_history = (PFS_global_param)0x0;
flag_events_transactions_history_long = (PFS_global_param)0x0;
flag_events_waits_current = (PFS_global_param)0x0;
flag_events_waits_history = (PFS_global_param)0x0;
flag_events_waits_history_long = (PFS_global_param)0x0;
flag_global_instrumentation = (PFS_global_param)0x0;
flag_thread_instrumentation = (PFS_global_param)0x0;
flag_statements_digest = (PFS_global_param)0x0;
}
pfs_initialized = 1;
if (*param_1 == (PFS_global_param)0x1) {
install_default_setup((PSI_bootstrap *)&PFS_bootstrap);
return &PFS_bootstrap;
}
}
else {
cleanup_performance_schema();
}
}
return (int **)0x0;
}
|
|
10,553 |
minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type)
|
monkey531[P]llama/common/minja.hpp
|
static std::string typeToString(Type t) {
switch (t) {
case Type::Text: return "text";
case Type::Expression: return "expression";
case Type::If: return "if";
case Type::Else: return "else";
case Type::Elif: return "elif";
case Type::EndIf: return "endif";
case Type::For: return "for";
case Type::EndFor: return "endfor";
case Type::Set: return "set";
case Type::EndSet: return "endset";
case Type::Comment: return "comment";
case Type::Macro: return "macro";
case Type::EndMacro: return "endmacro";
case Type::Filter: return "filter";
case Type::EndFilter: return "endfilter";
case Type::Generation: return "generation";
case Type::EndGeneration: return "endgeneration";
case Type::Break: return "break";
case Type::Continue: return "continue";
}
return "Unknown";
}
|
O3
|
cpp
|
minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type):
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
cmpl $0x12, %esi
ja 0x5c8ff
movl %esi, %eax
leaq 0x4b36b(%rip), %rcx # 0xa7b10
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x4c11e(%rip), %rsi # 0xa88d3
leaq 0x4c11b(%rip), %rdx # 0xa88d7
jmp 0x5c90d
leaq 0x4c49e(%rip), %rsi # 0xa8c66
leaq 0x4c4a0(%rip), %rdx # 0xa8c6f
jmp 0x5c90d
leaq 0x4c45e(%rip), %rsi # 0xa8c39
leaq 0x4c45f(%rip), %rdx # 0xa8c41
jmp 0x5c90d
leaq 0x4c421(%rip), %rsi # 0xa8c0f
leaq 0x4c420(%rip), %rdx # 0xa8c15
jmp 0x5c90d
leaq 0x4c318(%rip), %rsi # 0xa8b19
leaq 0x4c315(%rip), %rdx # 0xa8b1d
jmp 0x5c90d
leaq 0x4efb8(%rip), %rsi # 0xab7cc
leaq 0x4efb8(%rip), %rdx # 0xab7d3
jmp 0x5c90d
leaq 0x4c37d(%rip), %rsi # 0xa8ba4
leaq 0x4c383(%rip), %rdx # 0xa8bb1
jmp 0x5c90d
leaq 0x4c30d(%rip), %rsi # 0xa8b47
leaq 0x4c308(%rip), %rdx # 0xa8b49
jmp 0x5c90d
leaq 0x4c41c(%rip), %rsi # 0xa8c69
leaq 0x4c41b(%rip), %rdx # 0xa8c6f
jmp 0x5c90d
leaq 0x4c2df(%rip), %rsi # 0xa8b3f
leaq 0x4c2dc(%rip), %rdx # 0xa8b43
jmp 0x5c90d
leaq 0x4c32a(%rip), %rsi # 0xa8b9d
leaq 0x4c329(%rip), %rdx # 0xa8ba3
jmp 0x5c90d
leaq 0x4cce3(%rip), %rsi # 0xa9569
leaq 0x4cce6(%rip), %rdx # 0xa9573
jmp 0x5c90d
leaq 0x4c3da(%rip), %rsi # 0xa8c70
leaq 0x4c3d8(%rip), %rdx # 0xa8c75
jmp 0x5c90d
leaq 0x4c29e(%rip), %rsi # 0xa8b44
leaq 0x4c29c(%rip), %rdx # 0xa8b49
jmp 0x5c90d
leaq 0x4c386(%rip), %rsi # 0xa8c3c
leaq 0x4c384(%rip), %rdx # 0xa8c41
jmp 0x5c90d
leaq 0x4c2da(%rip), %rsi # 0xa8ba0
leaq 0x4c2d6(%rip), %rdx # 0xa8ba3
jmp 0x5c90d
leaq 0x4c3a0(%rip), %rsi # 0xa8c76
leaq 0x4c3a1(%rip), %rdx # 0xa8c7e
jmp 0x5c90d
leaq 0x554eb(%rip), %rsi # 0xb1dd1
leaq 0x554e7(%rip), %rdx # 0xb1dd4
jmp 0x5c90d
leaq 0x4c2b1(%rip), %rsi # 0xa8ba7
leaq 0x4c2b4(%rip), %rdx # 0xa8bb1
jmp 0x5c90d
leaq 0x4eece(%rip), %rsi # 0xab7d4
leaq 0x4eece(%rip), %rdx # 0xab7db
movq %rbx, %rdi
callq 0x1c7c8
movq %rbx, %rax
popq %rbx
retq
|
_ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE:
push rbx
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
cmp esi, 12h; switch 19 cases
ja def_5C7AC; jumptable 000000000005C7AC default case
mov eax, esi
lea rcx, jpt_5C7AC
movsxd rax, ds:(jpt_5C7AC - 0A7B10h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_5C7AE:
lea rsi, aText; jumptable 000000000005C7AC case 0
lea rdx, aText+4; ""
jmp loc_5C90D
loc_5C7C1:
lea rsi, aEndfilter; jumptable 000000000005C7AC case 16
lea rdx, aEndfilter+9; ""
jmp loc_5C90D
loc_5C7D4:
lea rsi, aEndmacro; jumptable 000000000005C7AC case 14
lea rdx, aEndmacro+8; ""
jmp loc_5C90D
loc_5C7E7:
lea rsi, aEndset; jumptable 000000000005C7AC case 11
lea rdx, aEndset+6; ""
jmp loc_5C90D
loc_5C7FA:
lea rsi, aElif; jumptable 000000000005C7AC case 4
lea rdx, aElif+4; ""
jmp loc_5C90D
loc_5C80D:
lea rsi, aComment; jumptable 000000000005C7AC case 12
lea rdx, aComment+7; ""
jmp loc_5C90D
loc_5C820:
lea rsi, aEndgeneration; jumptable 000000000005C7AC case 9
lea rdx, aEndgeneration+0Dh; ""
jmp loc_5C90D
loc_5C833:
lea rsi, aEndif+3; jumptable 000000000005C7AC case 2
lea rdx, aEndif+5; ""
jmp loc_5C90D
loc_5C846:
lea rsi, aEndfilter+3; jumptable 000000000005C7AC case 15
lea rdx, aEndfilter+9; ""
jmp loc_5C90D
loc_5C859:
lea rsi, aElse; jumptable 000000000005C7AC case 3
lea rdx, aElse+4; ""
jmp loc_5C90D
loc_5C86C:
lea rsi, aEndfor; jumptable 000000000005C7AC case 7
lea rdx, aEndfor+6; ""
jmp loc_5C90D
loc_5C87F:
lea rsi, aExpectedLeftSi_0+24h; jumptable 000000000005C7AC case 1
lea rdx, aExpectedLeftSi_0+2Eh; ""
jmp short loc_5C90D
loc_5C88F:
lea rsi, aBreak; jumptable 000000000005C7AC case 17
lea rdx, aBreak+5; ""
jmp short loc_5C90D
loc_5C89F:
lea rsi, aEndif; jumptable 000000000005C7AC case 5
lea rdx, aEndif+5; ""
jmp short loc_5C90D
loc_5C8AF:
lea rsi, aEndmacro+3; jumptable 000000000005C7AC case 13
lea rdx, aEndmacro+8; ""
jmp short loc_5C90D
loc_5C8BF:
lea rsi, aEndfor+3; jumptable 000000000005C7AC case 6
lea rdx, aEndfor+6; ""
jmp short loc_5C90D
loc_5C8CF:
lea rsi, aContinue; jumptable 000000000005C7AC case 18
lea rdx, aContinue+8; ""
jmp short loc_5C90D
loc_5C8DF:
lea rsi, aAtLeastOneOfMi+2Fh; jumptable 000000000005C7AC case 10
lea rdx, aAtLeastOneOfMi+32h; ""
jmp short loc_5C90D
loc_5C8EF:
lea rsi, aEndgeneration+3; jumptable 000000000005C7AC case 8
lea rdx, aEndgeneration+0Dh; ""
jmp short loc_5C90D
def_5C7AC:
lea rsi, aUnknown; jumptable 000000000005C7AC default case
lea rdx, aUnknown+7; ""
loc_5C90D:
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
|
_QWORD * minja::TemplateToken::typeToString[abi:cxx11](_QWORD *a1, int a2)
{
char *v2; // rsi
char *v3; // rdx
*a1 = a1 + 2;
switch ( a2 )
{
case 0:
v2 = "text";
v3 = (char *)"";
break;
case 1:
v2 = (char *)"expression";
v3 = (char *)"";
break;
case 2:
v2 = "if";
v3 = "";
break;
case 3:
v2 = "else";
v3 = "";
break;
case 4:
v2 = "elif";
v3 = "";
break;
case 5:
v2 = "endif";
v3 = "";
break;
case 6:
v2 = "for";
v3 = "";
break;
case 7:
v2 = "endfor";
v3 = "";
break;
case 8:
v2 = "generation";
v3 = "";
break;
case 9:
v2 = "endgeneration";
v3 = "";
break;
case 10:
v2 = (char *)"set";
v3 = (char *)"";
break;
case 11:
v2 = "endset";
v3 = "";
break;
case 12:
v2 = "comment";
v3 = "";
break;
case 13:
v2 = "macro";
v3 = "";
break;
case 14:
v2 = "endmacro";
v3 = "";
break;
case 15:
v2 = "filter";
v3 = "";
break;
case 16:
v2 = "endfilter";
v3 = "";
break;
case 17:
v2 = "break";
v3 = "";
break;
case 18:
v2 = "continue";
v3 = "";
break;
default:
v2 = "Unknown";
v3 = "";
break;
}
std::string::_M_construct<char const*>((long long)a1, v2, (long long)v3);
return a1;
}
|
typeToString[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
CMP ESI,0x12
JA 0x0015c8ff
MOV EAX,ESI
LEA RCX,[0x1a7b10]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RSI,[0x1a88d3]
LEA RDX,[0x1a88d7]
JMP 0x0015c90d
caseD_10:
LEA RSI,[0x1a8c66]
LEA RDX,[0x1a8c6f]
JMP 0x0015c90d
caseD_e:
LEA RSI,[0x1a8c39]
LEA RDX,[0x1a8c41]
JMP 0x0015c90d
caseD_b:
LEA RSI,[0x1a8c0f]
LEA RDX,[0x1a8c15]
JMP 0x0015c90d
caseD_4:
LEA RSI,[0x1a8b19]
LEA RDX,[0x1a8b1d]
JMP 0x0015c90d
caseD_c:
LEA RSI,[0x1ab7cc]
LEA RDX,[0x1ab7d3]
JMP 0x0015c90d
caseD_9:
LEA RSI,[0x1a8ba4]
LEA RDX,[0x1a8bb1]
JMP 0x0015c90d
caseD_2:
LEA RSI,[0x1a8b47]
LEA RDX,[0x1a8b49]
JMP 0x0015c90d
caseD_f:
LEA RSI,[0x1a8c69]
LEA RDX,[0x1a8c6f]
JMP 0x0015c90d
caseD_3:
LEA RSI,[0x1a8b3f]
LEA RDX,[0x1a8b43]
JMP 0x0015c90d
caseD_7:
LEA RSI,[0x1a8b9d]
LEA RDX,[0x1a8ba3]
JMP 0x0015c90d
caseD_1:
LEA RSI,[0x1a9569]
LEA RDX,[0x1a9573]
JMP 0x0015c90d
caseD_11:
LEA RSI,[0x1a8c70]
LEA RDX,[0x1a8c75]
JMP 0x0015c90d
caseD_5:
LEA RSI,[0x1a8b44]
LEA RDX,[0x1a8b49]
JMP 0x0015c90d
caseD_d:
LEA RSI,[0x1a8c3c]
LEA RDX,[0x1a8c41]
JMP 0x0015c90d
caseD_6:
LEA RSI,[0x1a8ba0]
LEA RDX,[0x1a8ba3]
JMP 0x0015c90d
caseD_12:
LEA RSI,[0x1a8c76]
LEA RDX,[0x1a8c7e]
JMP 0x0015c90d
caseD_a:
LEA RSI,[0x1b1dd1]
LEA RDX,[0x1b1dd4]
JMP 0x0015c90d
caseD_8:
LEA RSI,[0x1a8ba7]
LEA RDX,[0x1a8bb1]
JMP 0x0015c90d
default:
LEA RSI,[0x1ab7d4]
LEA RDX,[0x1ab7db]
LAB_0015c90d:
MOV RDI,RBX
CALL 0x0011c7c8
MOV RAX,RBX
POP RBX
RET
|
/* minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type) */
TemplateToken * __thiscall
minja::TemplateToken::typeToString_abi_cxx11_(TemplateToken *this,int4 param_2)
{
char *pcVar1;
char *pcVar2;
*(TemplateToken **)this = this + 0x10;
switch(param_2) {
case 0:
pcVar2 = "text";
pcVar1 = "";
break;
case 1:
pcVar2 = "expression";
pcVar1 = "";
break;
case 2:
pcVar2 = "if";
pcVar1 = "";
break;
case 3:
pcVar2 = "else";
pcVar1 = "";
break;
case 4:
pcVar2 = "elif";
pcVar1 = "";
break;
case 5:
pcVar2 = "endif";
pcVar1 = "";
break;
case 6:
pcVar2 = "for";
pcVar1 = "";
break;
case 7:
pcVar2 = "endfor";
pcVar1 = "";
break;
case 8:
pcVar2 = "generation";
pcVar1 = "";
break;
case 9:
pcVar2 = "endgeneration";
pcVar1 = "";
break;
case 10:
pcVar2 = "set";
pcVar1 = "";
break;
case 0xb:
pcVar2 = "endset";
pcVar1 = "";
break;
case 0xc:
pcVar2 = "comment";
pcVar1 = "";
break;
case 0xd:
pcVar2 = "macro";
pcVar1 = "";
break;
case 0xe:
pcVar2 = "endmacro";
pcVar1 = "";
break;
case 0xf:
pcVar2 = "filter";
pcVar1 = "";
break;
case 0x10:
pcVar2 = "endfilter";
pcVar1 = "";
break;
case 0x11:
pcVar2 = "break";
pcVar1 = "";
break;
case 0x12:
pcVar2 = "continue";
pcVar1 = "";
break;
default:
pcVar2 = "Unknown";
pcVar1 = "";
}
std::__cxx11::string::_M_construct<char_const*>(this,pcVar2,pcVar1);
return this;
}
|
|
10,554 |
my_coll_rule_parse
|
eloqsql/strings/ctype-uca.c
|
static int
my_coll_rule_parse(MY_COLL_RULES *rules,
const char *str, const char *str_end)
{
MY_COLL_RULE_PARSER p;
my_coll_parser_init(&p, rules, str, str_end);
if (!my_coll_parser_exec(&p))
{
my_coll_lexem_print_error(my_coll_parser_curr(&p),
rules->loader->error,
sizeof(rules->loader->error) - 1,
p.errstr);
return 1;
}
return 0;
}
|
O0
|
c
|
my_coll_rule_parse:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp # imm = 0x1B0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x190(%rbp)
movq %rsi, -0x198(%rbp)
movq %rdx, -0x1a0(%rbp)
movq -0x190(%rbp), %rsi
movq -0x198(%rbp), %rdx
movq -0x1a0(%rbp), %rcx
leaq -0x180(%rbp), %rdi
callq 0x85710
leaq -0x180(%rbp), %rdi
callq 0x857c0
cmpl $0x0, %eax
jne 0x853bd
leaq -0x180(%rbp), %rdi
callq 0x85940
movq %rax, %rdi
movq -0x190(%rbp), %rax
movq 0x28(%rax), %rsi
leaq -0x180(%rbp), %rcx
addq $0xf8, %rcx
movl $0x7f, %edx
callq 0x85830
movl $0x1, -0x184(%rbp)
jmp 0x853c7
movl $0x0, -0x184(%rbp)
movl -0x184(%rbp), %eax
movl %eax, -0x1a4(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x853f4
movl -0x1a4(%rbp), %eax
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbp
retq
callq 0x26370
nopl (%rax)
|
my_coll_rule_parse:
push rbp
mov rbp, rsp
sub rsp, 1B0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_190], rdi
mov [rbp+var_198], rsi
mov [rbp+var_1A0], rdx
mov rsi, [rbp+var_190]
mov rdx, [rbp+var_198]
mov rcx, [rbp+var_1A0]
lea rdi, [rbp+var_180]
call my_coll_parser_init
lea rdi, [rbp+var_180]
call my_coll_parser_exec
cmp eax, 0
jnz short loc_853BD
lea rdi, [rbp+var_180]
call my_coll_parser_curr
mov rdi, rax
mov rax, [rbp+var_190]
mov rsi, [rax+28h]
lea rcx, [rbp+var_180]
add rcx, 0F8h
mov edx, 7Fh
call my_coll_lexem_print_error
mov [rbp+var_184], 1
jmp short loc_853C7
loc_853BD:
mov [rbp+var_184], 0
loc_853C7:
mov eax, [rbp+var_184]
mov [rbp+var_1A4], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_853F4
mov eax, [rbp+var_1A4]
add rsp, 1B0h
pop rbp
retn
loc_853F4:
call ___stack_chk_fail
|
long long my_coll_rule_parse(long long a1, long long a2, long long a3)
{
long long v3; // rax
_BYTE v6[248]; // [rsp+30h] [rbp-180h] BYREF
_QWORD v7[17]; // [rsp+128h] [rbp-88h] BYREF
v7[16] = __readfsqword(0x28u);
my_coll_parser_init(v6, a1, a2, a3);
if ( (unsigned int)my_coll_parser_exec(v6) )
{
return 0;
}
else
{
v3 = my_coll_parser_curr(v6);
my_coll_lexem_print_error(v3, *(_QWORD *)(a1 + 40), 127LL, v7);
return 1;
}
}
|
my_coll_rule_parse:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1b0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x190],RDI
MOV qword ptr [RBP + -0x198],RSI
MOV qword ptr [RBP + -0x1a0],RDX
MOV RSI,qword ptr [RBP + -0x190]
MOV RDX,qword ptr [RBP + -0x198]
MOV RCX,qword ptr [RBP + -0x1a0]
LEA RDI,[RBP + -0x180]
CALL 0x00185710
LEA RDI,[RBP + -0x180]
CALL 0x001857c0
CMP EAX,0x0
JNZ 0x001853bd
LEA RDI,[RBP + -0x180]
CALL 0x00185940
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x190]
MOV RSI,qword ptr [RAX + 0x28]
LEA RCX,[RBP + -0x180]
ADD RCX,0xf8
MOV EDX,0x7f
CALL 0x00185830
MOV dword ptr [RBP + -0x184],0x1
JMP 0x001853c7
LAB_001853bd:
MOV dword ptr [RBP + -0x184],0x0
LAB_001853c7:
MOV EAX,dword ptr [RBP + -0x184]
MOV dword ptr [RBP + -0x1a4],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001853f4
MOV EAX,dword ptr [RBP + -0x1a4]
ADD RSP,0x1b0
POP RBP
RET
LAB_001853f4:
CALL 0x00126370
|
bool my_coll_rule_parse(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
int8 uVar2;
long in_FS_OFFSET;
int1 local_188 [248];
int1 auStack_90 [128];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
my_coll_parser_init(local_188,param_1,param_2,param_3);
iVar1 = my_coll_parser_exec(local_188);
if (iVar1 == 0) {
uVar2 = my_coll_parser_curr(local_188);
my_coll_lexem_print_error(uVar2,*(int8 *)(param_1 + 0x28),0x7f,auStack_90);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return iVar1 == 0;
}
|
|
10,555 |
update_stats_free
|
seiftnesse[P]memoryallocator/src/custom_alloc_stats.c
|
void update_stats_free(size_t size) {
// Prevent underflow - don't subtract more than what we have
if (size > allocation_stats.total_allocated) {
HEAP_LOG("Warning: Freeing more memory than allocated: %zu > %zu\n",
size, allocation_stats.total_allocated);
allocation_stats.total_freed += allocation_stats.total_allocated;
allocation_stats.total_allocated = 0;
} else {
allocation_stats.total_allocated -= size;
allocation_stats.total_freed += size;
}
// Don't let allocation count go negative
if (allocation_stats.allocation_count > 0) {
allocation_stats.allocation_count--;
}
HEAP_LOG("Stats updated: freed %zu bytes, remaining=%zu, count=%zu\n",
size, allocation_stats.total_allocated, allocation_stats.allocation_count);
}
|
O3
|
c
|
update_stats_free:
movq 0x4103e06(%rip), %rax # 0x41060a0
xorl %ecx, %ecx
movq %rax, %rdx
subq %rdi, %rdx
cmovbq %rax, %rdi
cmovaeq %rdx, %rcx
addq %rdi, 0x4103df7(%rip) # 0x41060a8
movq %rcx, 0x4103de8(%rip) # 0x41060a0
movq 0x4103df1(%rip), %rax # 0x41060b0
testq %rax, %rax
je 0x22ce
decq %rax
movq %rax, 0x4103de2(%rip) # 0x41060b0
retq
|
update_stats_free:
mov rax, cs:allocation_stats
xor ecx, ecx
mov rdx, rax
sub rdx, rdi
cmovb rdi, rax
cmovnb rcx, rdx
add cs:qword_41060A8, rdi
mov cs:allocation_stats, rcx
mov rax, cs:qword_41060B0
test rax, rax
jz short locret_22CE
dec rax
mov cs:qword_41060B0, rax
locret_22CE:
retn
|
long long update_stats_free(unsigned long long a1)
{
long long v1; // rcx
long long result; // rax
v1 = 0LL;
if ( allocation_stats >= a1 )
v1 = allocation_stats - a1;
else
a1 = allocation_stats;
qword_41060A8 += a1;
allocation_stats = v1;
result = qword_41060B0;
if ( qword_41060B0 )
return --qword_41060B0;
return result;
}
|
update_stats_free:
MOV RAX,qword ptr [0x042060a0]
XOR ECX,ECX
MOV RDX,RAX
SUB RDX,RDI
CMOVC RDI,RAX
CMOVNC RCX,RDX
ADD qword ptr [0x042060a8],RDI
MOV qword ptr [0x042060a0],RCX
MOV RAX,qword ptr [0x042060b0]
TEST RAX,RAX
JZ 0x001022ce
DEC RAX
MOV qword ptr [0x042060b0],RAX
LAB_001022ce:
RET
|
void update_stats_free(ulong param_1)
{
long lVar1;
lVar1 = 0;
if (param_1 <= allocation_stats) {
lVar1 = allocation_stats - param_1;
allocation_stats = param_1;
}
DAT_042060a8 = DAT_042060a8 + allocation_stats;
allocation_stats = lVar1;
if (DAT_042060b0 != 0) {
DAT_042060b0 = DAT_042060b0 + -1;
}
return;
}
|
|
10,556 |
moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer()
|
AlayaLite/build_O0/_deps/concurrentqueue-src/concurrentqueue.h
|
~ExplicitProducer()
{
// Destruct any elements not yet dequeued.
// Since we're in the destructor, we can assume all elements
// are either completely dequeued or completely not (no halfways).
if (this->tailBlock != nullptr) { // Note this means there must be a block index too
// First find the block that's partially dequeued, if any
Block* halfDequeuedBlock = nullptr;
if ((this->headIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1)) != 0) {
// The head's not on a block boundary, meaning a block somewhere is partially dequeued
// (or the head block is the tail block and was fully dequeued, but the head/tail are still not on a boundary)
size_t i = (pr_blockIndexFront - pr_blockIndexSlotsUsed) & (pr_blockIndexSize - 1);
while (details::circular_less_than<index_t>(pr_blockIndexEntries[i].base + BLOCK_SIZE, this->headIndex.load(std::memory_order_relaxed))) {
i = (i + 1) & (pr_blockIndexSize - 1);
}
assert(details::circular_less_than<index_t>(pr_blockIndexEntries[i].base, this->headIndex.load(std::memory_order_relaxed)));
halfDequeuedBlock = pr_blockIndexEntries[i].block;
}
// Start at the head block (note the first line in the loop gives us the head from the tail on the first iteration)
auto block = this->tailBlock;
do {
block = block->next;
if (block->ConcurrentQueue::Block::template is_empty<explicit_context>()) {
continue;
}
size_t i = 0; // Offset into block
if (block == halfDequeuedBlock) {
i = static_cast<size_t>(this->headIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1));
}
// Walk through all the items in the block; if this is the tail block, we need to stop when we reach the tail index
auto lastValidIndex = (this->tailIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1)) == 0 ? BLOCK_SIZE : static_cast<size_t>(this->tailIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1));
while (i != BLOCK_SIZE && (block != this->tailBlock || i != lastValidIndex)) {
(*block)[i++]->~T();
}
} while (block != this->tailBlock);
}
// Destroy all blocks that we own
if (this->tailBlock != nullptr) {
auto block = this->tailBlock;
do {
auto nextBlock = block->next;
this->parent->add_block_to_free_list(block);
block = nextBlock;
} while (block != this->tailBlock);
}
// Destroy the block indices
auto header = static_cast<BlockIndexHeader*>(pr_blockIndexRaw);
while (header != nullptr) {
auto prev = static_cast<BlockIndexHeader*>(header->prev);
header->~BlockIndexHeader();
(Traits::free)(header);
header = prev;
}
}
|
O0
|
c
|
moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x6c0d0
movq 0x8(%rsp), %rdi
movl $0x88, %esi
callq 0x15780
addq $0x18, %rsp
retq
nopl (%rax)
|
_ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducerD0Ev:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rdi, [rsp+18h+var_8]
mov [rsp+18h+var_10], rdi
call _ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducerD2Ev; moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer()
mov rdi, [rsp+18h+var_10]; void *
mov esi, 88h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
add rsp, 18h
retn
|
void moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer(
_QWORD *a1,
void *a2)
{
moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer(
a1,
a2);
operator delete(a1, 0x88uLL);
}
|
~ExplicitProducer:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0016c0d0
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x88
CALL 0x00115780
ADD RSP,0x18
RET
|
/* moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,
moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer() */
void __thiscall
moodycamel::
ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::
ExplicitProducer::~ExplicitProducer(ExplicitProducer *this)
{
~ExplicitProducer(this);
operator_delete(this,0x88);
return;
}
|
|
10,557 |
tailoring_append
|
eloqsql/strings/ctype.c
|
static int
tailoring_append(MY_XML_PARSER *st,
const char *fmt, size_t len, const char *attr)
{
struct my_cs_file_info *i= (struct my_cs_file_info *) st->user_data;
size_t newlen= i->tailoring_length + len + 64; /* 64 for format */
if (MY_XML_OK == my_charset_file_tailoring_realloc(i, newlen))
{
char *dst= i->tailoring + i->tailoring_length;
sprintf(dst, fmt, (int) len, attr);
i->tailoring_length+= strlen(dst);
return MY_XML_OK;
}
return MY_XML_ERROR;
}
|
O3
|
c
|
tailoring_append:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r9
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x690(%rdi), %r13
leaq (%rdx,%r13), %rax
addq $0x40, %rax
cmpq %rax, 0x698(%rdi)
jbe 0x8dae3
movq 0x688(%rbx), %rax
jmp 0x8db27
movq %r9, %r14
addq %r15, %r13
movq 0x688(%rbx), %rdi
movq 0x7a8(%rbx), %rax
movq 0x90(%rax), %rax
addq $0x8040, %r13 # imm = 0x8040
movq %r13, 0x698(%rbx)
movq %r13, %rsi
callq *%rax
movq %rax, 0x688(%rbx)
testq %rax, %rax
je 0x8db6a
movq 0x690(%rbx), %r13
movq %r14, %r9
addq %rax, %r13
xorl %r14d, %r14d
movq %r13, %rdi
movl $0x1, %esi
movq $-0x1, %rdx
movq %r12, %rcx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x28220
movq %r13, %rdi
callq 0x28150
addq %rax, 0x690(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %r14d
jmp 0x8db58
|
tailoring_append:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r9, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov r13, [rdi+690h]
lea rax, [rdx+r13]
add rax, 40h ; '@'
cmp [rdi+698h], rax
jbe short loc_8DAE3
mov rax, [rbx+688h]
jmp short loc_8DB27
loc_8DAE3:
mov r14, r9
add r13, r15
mov rdi, [rbx+688h]
mov rax, [rbx+7A8h]
mov rax, [rax+90h]
add r13, 8040h
mov [rbx+698h], r13
mov rsi, r13
call rax
mov [rbx+688h], rax
test rax, rax
jz short loc_8DB6A
mov r13, [rbx+690h]
mov r9, r14
loc_8DB27:
add r13, rax
xor r14d, r14d
mov rdi, r13
mov esi, 1
mov rdx, 0FFFFFFFFFFFFFFFFh
mov rcx, r12
mov r8d, r15d
xor eax, eax
call ___sprintf_chk
mov rdi, r13
call _strlen
add [rbx+690h], rax
loc_8DB58:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8DB6A:
mov r14d, 1
jmp short loc_8DB58
|
long long tailoring_append(_QWORD *a1, const char *a2, long long a3, long long a4)
{
long long v4; // rax
long long v5; // r9
unsigned int v6; // r15d
long long v8; // r13
long long v9; // rax
long long v11; // rdi
long long ( *v12)(long long, long long); // rax
long long v13; // r13
long long v14; // r13
unsigned int v15; // r14d
long long v17; // [rsp-8h] [rbp-30h]
v17 = v4;
v5 = a4;
v6 = a3;
v8 = a1[210];
if ( a1[211] <= (unsigned long long)(a3 + v8 + 64) )
{
v11 = a1[209];
v12 = *(long long ( **)(long long, long long))(a1[245] + 144LL);
v13 = a3 + v8 + 32832;
a1[211] = v13;
v9 = v12(v11, v13);
a1[209] = v9;
if ( !v9 )
return 1;
v8 = a1[210];
v5 = a4;
}
else
{
v9 = a1[209];
}
v14 = v9 + v8;
v15 = 0;
__sprintf_chk(v14, 1LL, -1LL, a2, v6, v5, v17);
a1[210] += strlen(v14);
return v15;
}
|
tailoring_append:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R9,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV R13,qword ptr [RDI + 0x690]
LEA RAX,[RDX + R13*0x1]
ADD RAX,0x40
CMP qword ptr [RDI + 0x698],RAX
JBE 0x0018dae3
MOV RAX,qword ptr [RBX + 0x688]
JMP 0x0018db27
LAB_0018dae3:
MOV R14,R9
ADD R13,R15
MOV RDI,qword ptr [RBX + 0x688]
MOV RAX,qword ptr [RBX + 0x7a8]
MOV RAX,qword ptr [RAX + 0x90]
ADD R13,0x8040
MOV qword ptr [RBX + 0x698],R13
MOV RSI,R13
CALL RAX
MOV qword ptr [RBX + 0x688],RAX
TEST RAX,RAX
JZ 0x0018db6a
MOV R13,qword ptr [RBX + 0x690]
MOV R9,R14
LAB_0018db27:
ADD R13,RAX
XOR R14D,R14D
MOV RDI,R13
MOV ESI,0x1
MOV RDX,-0x1
MOV RCX,R12
MOV R8D,R15D
XOR EAX,EAX
CALL 0x00128220
MOV RDI,R13
CALL 0x00128150
ADD qword ptr [RBX + 0x690],RAX
LAB_0018db58:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018db6a:
MOV R14D,0x1
JMP 0x0018db58
|
int8 tailoring_append(long param_1,int8 param_2,ulong param_3,int8 param_4)
{
code *pcVar1;
long lVar2;
size_t sVar3;
long lVar4;
lVar4 = *(long *)(param_1 + 0x690);
if (param_3 + lVar4 + 0x40 < *(ulong *)(param_1 + 0x698)) {
lVar2 = *(long *)(param_1 + 0x688);
}
else {
pcVar1 = *(code **)(*(long *)(param_1 + 0x7a8) + 0x90);
lVar4 = lVar4 + param_3 + 0x8040;
*(long *)(param_1 + 0x698) = lVar4;
lVar2 = (*pcVar1)(*(int8 *)(param_1 + 0x688),lVar4);
*(long *)(param_1 + 0x688) = lVar2;
if (lVar2 == 0) {
return 1;
}
lVar4 = *(long *)(param_1 + 0x690);
}
__sprintf_chk((char *)(lVar4 + lVar2),1,0xffffffffffffffff,param_2,param_3 & 0xffffffff,param_4);
sVar3 = strlen((char *)(lVar4 + lVar2));
*(long *)(param_1 + 0x690) = *(long *)(param_1 + 0x690) + sVar3;
return 0;
}
|
|
10,558 |
my_convert
|
eloqsql/strings/ctype.c
|
uint32
my_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs,
const char *from, uint32 from_length,
CHARSET_INFO *from_cs, uint *errors)
{
uint32 length, length2;
/*
If any of the character sets is not ASCII compatible,
immediately switch to slow mb_wc->wc_mb method.
*/
if ((to_cs->state | from_cs->state) & MY_CS_NONASCII)
return my_convert_using_func(to, to_length,
to_cs, to_cs->cset->wc_mb,
from, from_length,
from_cs, from_cs->cset->mb_wc,
errors);
length= length2= MY_MIN(to_length, from_length);
#if defined(__i386__) || defined(__x86_64__)
/*
Special loop for i386, it allows to refer to a
non-aligned memory block as UINT32, which makes
it possible to copy four bytes at once. This
gives about 10% performance improvement comparing
to byte-by-byte loop.
*/
for ( ; length >= 4; length-= 4, from+= 4, to+= 4)
{
if ((*(uint32*)from) & 0x80808080)
break;
*((uint32*) to)= *((const uint32*) from);
}
#endif /* __i386__ */
for (; ; *to++= *from++, length--)
{
if (!length)
{
*errors= 0;
return length2;
}
if (*((unsigned char*) from) > 0x7F) /* A non-ASCII character */
{
uint32 copied_length= length2 - length;
to_length-= copied_length;
from_length-= copied_length;
return copied_length + my_convert_using_func(to, to_length, to_cs,
to_cs->cset->wc_mb,
from, from_length, from_cs,
from_cs->cset->mb_wc,
errors);
}
}
DBUG_ASSERT(FALSE); // Should never get to here
return 0; // Make compiler happy
}
|
O0
|
c
|
my_convert:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x38(%rbp), %rcx
orl 0xc(%rcx), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
je 0x153b53
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %eax
movl %eax, %r9d
movq -0x38(%rbp), %r11
movq -0x38(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %r10
movq 0x10(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x153940
movl %eax, -0x4(%rbp)
jmp 0x153c99
movl -0x14(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0x153b63
movl -0x14(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x153b69
movl -0x2c(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x40(%rbp)
movl %eax, -0x3c(%rbp)
cmpl $0x4, -0x3c(%rbp)
jb 0x153bb9
movq -0x28(%rbp), %rax
movl (%rax), %eax
andl $0x80808080, %eax # imm = 0x80808080
cmpl $0x0, %eax
je 0x153b8a
jmp 0x153bb9
movq -0x28(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x3c(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
jmp 0x153b72
jmp 0x153bbb
cmpl $0x0, -0x3c(%rbp)
jne 0x153bd6
movq 0x10(%rbp), %rax
movl $0x0, (%rax)
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x153c99
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x7f, %eax
jle 0x153c67
movl -0x40(%rbp), %eax
subl -0x3c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x44(%rbp), %ecx
movl -0x2c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %eax
movl %eax, %r9d
movq -0x38(%rbp), %r11
movq -0x38(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %r10
movq 0x10(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x153940
movl %eax, %ecx
movl -0x4c(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x153c99
jmp 0x153c69
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x153bbb
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_convert:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov [rbp+var_38], r9
mov rax, [rbp+var_20]
mov eax, [rax+0Ch]
mov rcx, [rbp+var_38]
or eax, [rcx+0Ch]
and eax, 2000h
cmp eax, 0
jz short loc_153B53
mov rdi, [rbp+var_10]
mov eax, [rbp+var_14]
mov esi, eax
mov rdx, [rbp+var_20]
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
mov rcx, [rax+30h]
mov r8, [rbp+var_28]
mov eax, [rbp+var_2C]
mov r9d, eax
mov r11, [rbp+var_38]
mov rax, [rbp+var_38]
mov rax, [rax+0B8h]
mov r10, [rax+28h]
mov rax, [rbp+arg_0]
mov [rsp+70h+var_70], r11
mov [rsp+70h+var_68], r10
mov [rsp+70h+var_60], rax
call my_convert_using_func
mov [rbp+var_4], eax
jmp loc_153C99
loc_153B53:
mov eax, [rbp+var_14]
cmp eax, [rbp+var_2C]
jnb short loc_153B63
mov eax, [rbp+var_14]
mov [rbp+var_48], eax
jmp short loc_153B69
loc_153B63:
mov eax, [rbp+var_2C]
mov [rbp+var_48], eax
loc_153B69:
mov eax, [rbp+var_48]
mov [rbp+var_40], eax
mov [rbp+var_3C], eax
loc_153B72:
cmp [rbp+var_3C], 4
jb short loc_153BB9
mov rax, [rbp+var_28]
mov eax, [rax]
and eax, 80808080h
cmp eax, 0
jz short loc_153B8A
jmp short loc_153BB9
loc_153B8A:
mov rax, [rbp+var_28]
mov ecx, [rax]
mov rax, [rbp+var_10]
mov [rax], ecx
mov eax, [rbp+var_3C]
sub eax, 4
mov [rbp+var_3C], eax
mov rax, [rbp+var_28]
add rax, 4
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
add rax, 4
mov [rbp+var_10], rax
jmp short loc_153B72
loc_153BB9:
jmp short $+2
loc_153BBB:
cmp [rbp+var_3C], 0
jnz short loc_153BD6
mov rax, [rbp+arg_0]
mov dword ptr [rax], 0
mov eax, [rbp+var_40]
mov [rbp+var_4], eax
jmp loc_153C99
loc_153BD6:
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
cmp eax, 7Fh
jle loc_153C67
mov eax, [rbp+var_40]
sub eax, [rbp+var_3C]
mov [rbp+var_44], eax
mov ecx, [rbp+var_44]
mov eax, [rbp+var_14]
sub eax, ecx
mov [rbp+var_14], eax
mov ecx, [rbp+var_44]
mov eax, [rbp+var_2C]
sub eax, ecx
mov [rbp+var_2C], eax
mov eax, [rbp+var_44]
mov [rbp+var_4C], eax
mov rdi, [rbp+var_10]
mov eax, [rbp+var_14]
mov esi, eax
mov rdx, [rbp+var_20]
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
mov rcx, [rax+30h]
mov r8, [rbp+var_28]
mov eax, [rbp+var_2C]
mov r9d, eax
mov r11, [rbp+var_38]
mov rax, [rbp+var_38]
mov rax, [rax+0B8h]
mov r10, [rax+28h]
mov rax, [rbp+arg_0]
mov [rsp+70h+var_70], r11
mov [rsp+70h+var_68], r10
mov [rsp+70h+var_60], rax
call my_convert_using_func
mov ecx, eax
mov eax, [rbp+var_4C]
add eax, ecx
mov [rbp+var_4], eax
jmp short loc_153C99
loc_153C67:
jmp short $+2
loc_153C69:
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
mov eax, [rbp+var_3C]
add eax, 0FFFFFFFFh
mov [rbp+var_3C], eax
jmp loc_153BBB
loc_153C99:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
|
long long my_convert(
long long a1,
unsigned int a2,
long long a3,
unsigned long long a4,
unsigned int a5,
long long a6,
_DWORD *a7)
{
char *v7; // rax
char v8; // cl
_BYTE *v9; // rax
unsigned int v11; // [rsp+28h] [rbp-48h]
unsigned int i; // [rsp+34h] [rbp-3Ch]
_DWORD *v13; // [rsp+48h] [rbp-28h]
_DWORD *v14; // [rsp+60h] [rbp-10h]
v14 = (_DWORD *)a1;
v13 = (_DWORD *)a4;
if ( ((*(_DWORD *)(a6 + 12) | *(_DWORD *)(a3 + 12)) & 0x2000) != 0 )
{
return (unsigned int)my_convert_using_func(
a1,
a2,
a3,
*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL),
a4,
a5,
a6,
*(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL),
a7);
}
else
{
if ( a2 >= a5 )
v11 = a5;
else
v11 = a2;
for ( i = v11; i >= 4 && (*v13 & 0x80808080) == 0; i -= 4 )
*v14++ = *v13++;
while ( 1 )
{
if ( !i )
{
*a7 = 0;
return v11;
}
if ( *(unsigned __int8 *)v13 > 0x7Fu )
break;
v7 = (char *)v13;
v13 = (_DWORD *)((char *)v13 + 1);
v8 = *v7;
v9 = v14;
v14 = (_DWORD *)((char *)v14 + 1);
*v9 = v8;
--i;
}
return (unsigned int)(my_convert_using_func(
(long long)v14,
a2 - (v11 - i),
a3,
*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL),
(unsigned long long)v13,
a5 - (v11 - i),
a6,
*(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL),
a7)
+ v11
- i);
}
}
| |||
10,559 |
my_convert
|
eloqsql/strings/ctype.c
|
uint32
my_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs,
const char *from, uint32 from_length,
CHARSET_INFO *from_cs, uint *errors)
{
uint32 length, length2;
/*
If any of the character sets is not ASCII compatible,
immediately switch to slow mb_wc->wc_mb method.
*/
if ((to_cs->state | from_cs->state) & MY_CS_NONASCII)
return my_convert_using_func(to, to_length,
to_cs, to_cs->cset->wc_mb,
from, from_length,
from_cs, from_cs->cset->mb_wc,
errors);
length= length2= MY_MIN(to_length, from_length);
#if defined(__i386__) || defined(__x86_64__)
/*
Special loop for i386, it allows to refer to a
non-aligned memory block as UINT32, which makes
it possible to copy four bytes at once. This
gives about 10% performance improvement comparing
to byte-by-byte loop.
*/
for ( ; length >= 4; length-= 4, from+= 4, to+= 4)
{
if ((*(uint32*)from) & 0x80808080)
break;
*((uint32*) to)= *((const uint32*) from);
}
#endif /* __i386__ */
for (; ; *to++= *from++, length--)
{
if (!length)
{
*errors= 0;
return length2;
}
if (*((unsigned char*) from) > 0x7F) /* A non-ASCII character */
{
uint32 copied_length= length2 - length;
to_length-= copied_length;
from_length-= copied_length;
return copied_length + my_convert_using_func(to, to_length, to_cs,
to_cs->cset->wc_mb,
from, from_length, from_cs,
from_cs->cset->mb_wc,
errors);
}
}
DBUG_ASSERT(FALSE); // Should never get to here
return 0; // Make compiler happy
}
|
O3
|
c
|
my_convert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rax
movl %r8d, %r9d
movq %rcx, %r8
movq 0x10(%rbp), %r10
movl 0xc(%rax), %ecx
orl 0xc(%rdx), %ecx
btl $0xd, %ecx
jb 0xdcad0
cmpl %r9d, %esi
movl %r9d, %ebx
cmovbl %esi, %ebx
movl %ebx, %ecx
cmpl $0x4, %ebx
jb 0xdcaa9
movl (%r8), %r11d
testl $0x80808080, %r11d # imm = 0x80808080
jne 0xdcaad
movl %r11d, (%rdi)
addl $-0x4, %ecx
addq $0x4, %r8
addq $0x4, %rdi
cmpl $0x3, %ecx
ja 0xdca8a
testl %ecx, %ecx
je 0xdcac7
movl %ecx, %r14d
xorl %r15d, %r15d
movb (%r8,%r15), %cl
testb %cl, %cl
js 0xdcafd
movb %cl, (%rdi,%r15)
incq %r15
cmpl %r15d, %r14d
jne 0xdcab3
movl $0x0, (%r10)
jmp 0xdcb42
movl %esi, %esi
movq 0xb8(%rdx), %rcx
movq 0x30(%rcx), %rcx
movl %r9d, %r9d
movq 0xb8(%rax), %r11
subq $0x8, %rsp
pushq %r10
pushq 0x28(%r11)
pushq %rax
callq 0xdc95f
addq $0x28, %rsp
jmp 0xdcb48
addl %r14d, %esi
subl %ebx, %esi
subl %r15d, %esi
addl %r14d, %r9d
subl %ebx, %r9d
subl %r15d, %r9d
movq 0xb8(%rdx), %rcx
movq 0x30(%rcx), %rcx
movq 0xb8(%rax), %r11
addq %r15, %rdi
addq %r15, %r8
subq $0x8, %rsp
pushq %r10
pushq 0x28(%r11)
pushq %rax
callq 0xdc95f
addq $0x20, %rsp
subl %r14d, %ebx
addl %r15d, %ebx
addl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
my_convert:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rax, r9
mov r9d, r8d
mov r8, rcx
mov r10, [rbp+arg_0]
mov ecx, [rax+0Ch]
or ecx, [rdx+0Ch]
bt ecx, 0Dh
jb short loc_DCAD0
cmp esi, r9d
mov ebx, r9d
cmovb ebx, esi
mov ecx, ebx
cmp ebx, 4
jb short loc_DCAA9
loc_DCA8A:
mov r11d, [r8]
test r11d, 80808080h
jnz short loc_DCAAD
mov [rdi], r11d
add ecx, 0FFFFFFFCh
add r8, 4
add rdi, 4
cmp ecx, 3
ja short loc_DCA8A
loc_DCAA9:
test ecx, ecx
jz short loc_DCAC7
loc_DCAAD:
mov r14d, ecx
xor r15d, r15d
loc_DCAB3:
mov cl, [r8+r15]
test cl, cl
js short loc_DCAFD
mov [rdi+r15], cl
inc r15
cmp r14d, r15d
jnz short loc_DCAB3
loc_DCAC7:
mov dword ptr [r10], 0
jmp short loc_DCB42
loc_DCAD0:
mov esi, esi
mov rcx, [rdx+0B8h]
mov rcx, [rcx+30h]
mov r9d, r9d
mov r11, [rax+0B8h]
sub rsp, 8
push r10
push qword ptr [r11+28h]
push rax
call my_convert_using_func
add rsp, 28h
jmp short loc_DCB48
loc_DCAFD:
add esi, r14d
sub esi, ebx
sub esi, r15d
add r9d, r14d
sub r9d, ebx
sub r9d, r15d
mov rcx, [rdx+0B8h]
mov rcx, [rcx+30h]
mov r11, [rax+0B8h]
add rdi, r15
add r8, r15
sub rsp, 8
push r10
push qword ptr [r11+28h]
push rax
call my_convert_using_func
add rsp, 20h
sub ebx, r14d
add ebx, r15d
add ebx, eax
loc_DCB42:
mov eax, ebx
add rsp, 8
loc_DCB48:
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long my_convert(
_DWORD *a1,
unsigned int a2,
long long a3,
long long a4,
unsigned int a5,
long long a6,
_DWORD *a7)
{
_DWORD *v9; // r8
unsigned int v10; // ebx
unsigned int v11; // ecx
unsigned int v12; // r14d
long long v13; // r15
char v14; // cl
v9 = (_DWORD *)a4;
if ( ((*(_DWORD *)(a3 + 12) | *(_DWORD *)(a6 + 12)) & 0x2000) != 0 )
return my_convert_using_func(
(long long)a1,
a2,
a3,
*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL),
a4,
a5,
a6,
*(long long ( **)(long long, long long *, long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL),
a7);
v10 = a5;
if ( a2 < a5 )
v10 = a2;
v11 = v10;
if ( v10 >= 4 )
{
while ( (*v9 & 0x80808080) == 0 )
{
*a1 = *v9;
v11 -= 4;
++v9;
++a1;
if ( v11 <= 3 )
goto LABEL_7;
}
goto LABEL_8;
}
LABEL_7:
if ( v11 )
{
LABEL_8:
v12 = v11;
v13 = 0LL;
do
{
v14 = *((_BYTE *)v9 + v13);
if ( v14 < 0 )
return (unsigned int)my_convert_using_func(
(long long)a1 + v13,
v12 + a2 - v10 - (unsigned int)v13,
a3,
*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184)
+ 48LL),
(long long)v9 + v13,
v12 + a5 - v10 - (unsigned int)v13,
a6,
*(long long ( **)(long long, long long *, long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL),
a7)
+ (_DWORD)v13
+ v10
- v12;
*((_BYTE *)a1 + v13++) = v14;
}
while ( v12 != (_DWORD)v13 );
}
*a7 = 0;
return v10;
}
|
my_convert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,R9
MOV R9D,R8D
MOV R8,RCX
MOV R10,qword ptr [RBP + 0x10]
MOV ECX,dword ptr [RAX + 0xc]
OR ECX,dword ptr [RDX + 0xc]
BT ECX,0xd
JC 0x001dcad0
CMP ESI,R9D
MOV EBX,R9D
CMOVC EBX,ESI
MOV ECX,EBX
CMP EBX,0x4
JC 0x001dcaa9
LAB_001dca8a:
MOV R11D,dword ptr [R8]
TEST R11D,0x80808080
JNZ 0x001dcaad
MOV dword ptr [RDI],R11D
ADD ECX,-0x4
ADD R8,0x4
ADD RDI,0x4
CMP ECX,0x3
JA 0x001dca8a
LAB_001dcaa9:
TEST ECX,ECX
JZ 0x001dcac7
LAB_001dcaad:
MOV R14D,ECX
XOR R15D,R15D
LAB_001dcab3:
MOV CL,byte ptr [R8 + R15*0x1]
TEST CL,CL
JS 0x001dcafd
MOV byte ptr [RDI + R15*0x1],CL
INC R15
CMP R14D,R15D
JNZ 0x001dcab3
LAB_001dcac7:
MOV dword ptr [R10],0x0
JMP 0x001dcb42
LAB_001dcad0:
MOV ESI,ESI
MOV RCX,qword ptr [RDX + 0xb8]
MOV RCX,qword ptr [RCX + 0x30]
MOV R9D,R9D
MOV R11,qword ptr [RAX + 0xb8]
SUB RSP,0x8
PUSH R10
PUSH qword ptr [R11 + 0x28]
PUSH RAX
CALL 0x001dc95f
ADD RSP,0x28
JMP 0x001dcb48
LAB_001dcafd:
ADD ESI,R14D
SUB ESI,EBX
SUB ESI,R15D
ADD R9D,R14D
SUB R9D,EBX
SUB R9D,R15D
MOV RCX,qword ptr [RDX + 0xb8]
MOV RCX,qword ptr [RCX + 0x30]
MOV R11,qword ptr [RAX + 0xb8]
ADD RDI,R15
ADD R8,R15
SUB RSP,0x8
PUSH R10
PUSH qword ptr [R11 + 0x28]
PUSH RAX
CALL 0x001dc95f
ADD RSP,0x20
SUB EBX,R14D
ADD EBX,R15D
ADD EBX,EAX
LAB_001dcb42:
MOV EAX,EBX
ADD RSP,0x8
LAB_001dcb48:
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong my_convert(uint *param_1,uint param_2,long param_3,uint *param_4,uint param_5,long param_6,
int4 *param_7)
{
int iVar1;
ulong uVar2;
uint uVar3;
uint uVar5;
int iVar6;
long lVar7;
ulong uVar4;
uVar2 = (ulong)param_5;
if (((*(uint *)(param_6 + 0xc) | *(uint *)(param_3 + 0xc)) >> 0xd & 1) == 0) {
if (param_2 < param_5) {
uVar2 = (ulong)param_2;
}
uVar5 = (uint)uVar2;
uVar3 = uVar5;
uVar4 = uVar2;
while (3 < uVar3) {
uVar3 = (uint)uVar4;
if ((*param_4 & 0x80808080) != 0) goto LAB_001dcaad;
*param_1 = *param_4;
uVar3 = uVar3 - 4;
uVar4 = (ulong)uVar3;
param_4 = param_4 + 1;
param_1 = param_1 + 1;
}
if (uVar3 != 0) {
LAB_001dcaad:
lVar7 = 0;
do {
if (*(char *)((long)param_4 + lVar7) < '\0') {
iVar6 = (int)lVar7;
iVar1 = my_convert_using_func
((long)param_1 + lVar7,((param_2 + uVar3) - uVar5) - iVar6,param_3,
*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),(long)param_4 + lVar7
,((param_5 + uVar3) - uVar5) - iVar6,param_6,
*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28),param_7);
return (ulong)((uVar5 - uVar3) + iVar6 + iVar1);
}
*(char *)((long)param_1 + lVar7) = *(char *)((long)param_4 + lVar7);
lVar7 = lVar7 + 1;
} while (uVar3 != (uint)lVar7);
}
*param_7 = 0;
}
else {
uVar2 = my_convert_using_func
(param_1,param_2,param_3,*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),
param_4,uVar2,param_6,*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28),
param_7);
}
return uVar2;
}
|
|
10,560 |
ftxui::TerminalInputParser::ParseMouse(bool, bool, std::vector<int, std::allocator<int>>)
|
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/terminal_input_parser.cpp
|
TerminalInputParser::Output TerminalInputParser::ParseMouse( // NOLINT
bool altered,
bool pressed,
std::vector<int> arguments) {
if (arguments.size() != 3) {
return SPECIAL;
}
(void)altered;
Output output(MOUSE);
output.mouse.button = Mouse::Button((arguments[0] & 3) + // NOLINT
((arguments[0] & 64) >> 4)); // NOLINT
output.mouse.motion = Mouse::Motion(pressed); // NOLINT
output.mouse.shift = bool(arguments[0] & 4); // NOLINT
output.mouse.meta = bool(arguments[0] & 8); // NOLINT
output.mouse.x = arguments[1]; // NOLINT
output.mouse.y = arguments[2]; // NOLINT
return output;
}
|
O3
|
cpp
|
ftxui::TerminalInputParser::ParseMouse(bool, bool, std::vector<int, std::allocator<int>>):
movq %rdi, %rax
movq (%r8), %rdx
movq 0x8(%r8), %rdi
subq %rdx, %rdi
movl $0x3, %esi
cmpq $0xc, %rdi
jne 0x33171
movl (%rdx), %esi
movl %esi, %edi
andl $0x3, %edi
movl %esi, %r8d
shrl $0x4, %r8d
andl $0x4, %r8d
orl %edi, %r8d
movl %r8d, 0x4(%rax)
movzbl %cl, %ecx
movl %ecx, 0x8(%rax)
movl %esi, %ecx
shrb $0x2, %cl
andb $0x1, %cl
movb %cl, 0xc(%rax)
shrb $0x3, %sil
andb $0x1, %sil
movb %sil, 0xd(%rax)
movq 0x4(%rdx), %rcx
movq %rcx, 0x10(%rax)
movl $0x4, %esi
movl %esi, (%rax)
retq
|
_ZN5ftxui19TerminalInputParser10ParseMouseEbbSt6vectorIiSaIiEE:
mov rax, rdi
mov rdx, [r8]
mov rdi, [r8+8]
sub rdi, rdx
mov esi, 3
cmp rdi, 0Ch
jnz short loc_33171
mov esi, [rdx]
mov edi, esi
and edi, 3
mov r8d, esi
shr r8d, 4
and r8d, 4
or r8d, edi
mov [rax+4], r8d
movzx ecx, cl
mov [rax+8], ecx
mov ecx, esi
shr cl, 2
and cl, 1
mov [rax+0Ch], cl
shr sil, 3
and sil, 1
mov [rax+0Dh], sil
mov rcx, [rdx+4]
mov [rax+10h], rcx
mov esi, 4
loc_33171:
mov [rax], esi
retn
|
long long ftxui::TerminalInputParser::ParseMouse(
long long a1,
long long a2,
long long a3,
unsigned __int8 a4,
int **a5)
{
long long result; // rax
int *v6; // rdx
int v7; // esi
unsigned int v8; // esi
result = a1;
v6 = *a5;
v7 = 3;
if ( (char *)a5[1] - (char *)*a5 == 12 )
{
v8 = *v6;
*(_DWORD *)(a1 + 4) = *v6 & 3 | ((unsigned int)*v6 >> 4) & 4;
*(_DWORD *)(a1 + 8) = a4;
*(_BYTE *)(a1 + 12) = (v8 & 4) != 0;
*(_BYTE *)(a1 + 13) = (v8 & 8) != 0;
*(_QWORD *)(a1 + 16) = *(_QWORD *)(v6 + 1);
v7 = 4;
}
*(_DWORD *)a1 = v7;
return result;
}
|
ParseMouse:
MOV RAX,RDI
MOV RDX,qword ptr [R8]
MOV RDI,qword ptr [R8 + 0x8]
SUB RDI,RDX
MOV ESI,0x3
CMP RDI,0xc
JNZ 0x00133171
MOV ESI,dword ptr [RDX]
MOV EDI,ESI
AND EDI,0x3
MOV R8D,ESI
SHR R8D,0x4
AND R8D,0x4
OR R8D,EDI
MOV dword ptr [RAX + 0x4],R8D
MOVZX ECX,CL
MOV dword ptr [RAX + 0x8],ECX
MOV ECX,ESI
SHR CL,0x2
AND CL,0x1
MOV byte ptr [RAX + 0xc],CL
SHR SIL,0x3
AND SIL,0x1
MOV byte ptr [RAX + 0xd],SIL
MOV RCX,qword ptr [RDX + 0x4]
MOV qword ptr [RAX + 0x10],RCX
MOV ESI,0x4
LAB_00133171:
MOV dword ptr [RAX],ESI
RET
|
/* ftxui::TerminalInputParser::ParseMouse(bool, bool, std::vector<int, std::allocator<int> >) */
void ftxui::TerminalInputParser::ParseMouse
(int4 *param_1,int8 param_2,int8 param_3,byte param_4,
int8 *param_5)
{
uint uVar1;
uint *puVar2;
int4 uVar3;
puVar2 = (uint *)*param_5;
uVar3 = 3;
if (param_5[1] - (long)puVar2 == 0xc) {
uVar1 = *puVar2;
param_1[1] = uVar1 >> 4 & 4 | uVar1 & 3;
param_1[2] = (uint)param_4;
*(byte *)(param_1 + 3) = (byte)uVar1 >> 2 & 1;
*(byte *)((long)param_1 + 0xd) = (byte)uVar1 >> 3 & 1;
*(int8 *)(param_1 + 4) = *(int8 *)(puVar2 + 1);
uVar3 = 4;
}
*param_1 = uVar3;
return;
}
|
|
10,561 |
std::enable_if<!std::is_array<httplib::ClientImpl>::value, std::unique_ptr<httplib::ClientImpl, std::default_delete<httplib::ClientImpl>>>::type httplib::detail::make_unique<httplib::ClientImpl, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int&)
|
hkr04[P]cpp-mcp/common/httplib.h
|
typename std::enable_if<!std::is_array<T>::value, std::unique_ptr<T>>::type
make_unique(Args &&...args) {
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
|
O1
|
c
|
std::enable_if<!std::is_array<httplib::ClientImpl>::value, std::unique_ptr<httplib::ClientImpl, std::default_delete<httplib::ClientImpl>>>::type httplib::detail::make_unique<httplib::ClientImpl, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movl $0x320, %edi # imm = 0x320
callq 0x8570
movq %rax, %rbx
movl (%r15), %edx
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
xorl %eax, %eax
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq 0x20(%rsp), %rcx
movq %rsp, %r8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x34850
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x3403a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8580
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x34051
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8580
movq %rbx, (%r14)
movq %r14, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x3407e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8580
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x34095
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8580
movl $0x320, %esi # imm = 0x320
movq %rbx, %rdi
callq 0x8580
movq %r14, %rdi
callq 0x8960
|
_ZN7httplib6detail11make_uniqueINS_10ClientImplEJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiEEENSt9enable_ifIXntsr3std8is_arrayIT_EE5valueESt10unique_ptrISD_St14default_deleteISD_EEE4typeEDpOT0_:
push r15; __int64
push r14; int
push r13; int
push r12; int
push rbx; int
sub rsp, 40h
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov edi, 320h; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
mov edx, [r15]; int
lea r15, [rsp+68h+var_38]
mov [r15-10h], r15
xor eax, eax
mov [r15-8], rax
mov [r15], al
lea r13, [rsp+68h+var_58]
mov [r13-10h], r13
mov [r13-8], rax
mov [r13+0], al
lea rcx, [rsp+68h+var_48]; int
mov r8, rsp; int
mov rdi, rbx; int
mov rsi, r12; int
call _ZN7httplib10ClientImplC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_S8_; httplib::ClientImpl::ClientImpl(std::string const&,int,std::string const&,std::string const&)
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r13
jz short loc_3403A
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3403A:
mov rdi, [rsp+68h+var_48]; void *
cmp rdi, r15
jz short loc_34051
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_34051:
mov [r14], rbx
mov rax, r14
add rsp, 40h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rsp+0]; void *
cmp rdi, r13
jz short loc_3407E
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3407E:
mov rdi, [rsp+arg_18]; void *
cmp rdi, r15
jz short loc_34095
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_34095:
mov esi, 320h; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, r14
call __Unwind_Resume
|
_QWORD * httplib::detail::make_unique<httplib::ClientImpl,std::string const&,int &>(
_QWORD *a1,
int a2,
int *a3)
{
long long v4; // rbx
int v5; // edx
int v6; // r9d
void *v8; // [rsp+0h] [rbp-68h] BYREF
long long v9; // [rsp+10h] [rbp-58h] BYREF
int v10; // [rsp+18h] [rbp-50h]
void *v11; // [rsp+20h] [rbp-48h] BYREF
long long v12; // [rsp+30h] [rbp-38h] BYREF
int v13; // [rsp+38h] [rbp-30h]
int v14; // [rsp+40h] [rbp-28h]
int v15; // [rsp+48h] [rbp-20h]
int v16; // [rsp+50h] [rbp-18h]
int v17; // [rsp+58h] [rbp-10h]
long long v18; // [rsp+60h] [rbp-8h]
v4 = operator new(0x320uLL);
v5 = *a3;
LOBYTE(v12) = 0;
LOBYTE(v9) = 0;
httplib::ClientImpl::ClientImpl(
v4,
a2,
v5,
(int)&v11,
(int)&v8,
v6,
&v9,
0,
v9,
v10,
&v12,
0,
v12,
v13,
v14,
v15,
v16,
v17,
v18);
if ( v8 != &v9 )
operator delete(v8, v9 + 1);
if ( v11 != &v12 )
operator delete(v11, v12 + 1);
*a1 = v4;
return a1;
}
|
make_unique<httplib::ClientImpl,std::__cxx11::string_const&,int&>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOV EDI,0x320
CALL 0x00108570
MOV RBX,RAX
MOV EDX,dword ptr [R15]
LEA R15,[RSP + 0x30]
MOV qword ptr [R15 + -0x10],R15
XOR EAX,EAX
MOV qword ptr [R15 + -0x8],RAX
MOV byte ptr [R15],AL
LEA R13,[RSP + 0x10]
MOV qword ptr [R13 + -0x10],R13
MOV qword ptr [R13 + -0x8],RAX
MOV byte ptr [R13],AL
LAB_00134011:
LEA RCX,[RSP + 0x20]
MOV R8,RSP
MOV RDI,RBX
MOV RSI,R12
CALL 0x00134850
LAB_00134024:
MOV RDI,qword ptr [RSP]
CMP RDI,R13
JZ 0x0013403a
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00108580
LAB_0013403a:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R15
JZ 0x00134051
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x00108580
LAB_00134051:
MOV qword ptr [R14],RBX
MOV RAX,R14
ADD RSP,0x40
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* std::enable_if<!std::is_array<httplib::ClientImpl>::value, std::unique_ptr<httplib::ClientImpl,
std::default_delete<httplib::ClientImpl> > >::type
httplib::detail::make_unique<httplib::ClientImpl, std::__cxx11::string const&,
int&>(std::__cxx11::string const&, int&) */
detail * __thiscall
httplib::detail::make_unique<httplib::ClientImpl,std::__cxx11::string_const&,int&>
(detail *this,string *param_1,int *param_2)
{
ClientImpl *this_00;
int1 *local_68;
int8 local_60;
int1 local_58;
int7 uStack_57;
int1 *local_48;
int8 local_40;
int1 local_38;
int7 uStack_37;
this_00 = (ClientImpl *)operator_new(800);
local_40 = 0;
local_38 = 0;
local_60 = 0;
local_58 = 0;
/* try { // try from 00134011 to 00134023 has its CatchHandler @ 00134065 */
local_68 = &local_58;
local_48 = &local_38;
ClientImpl::ClientImpl(this_00,param_1,*param_2,(string *)&local_48,(string *)&local_68);
if (local_68 != &local_58) {
operator_delete(local_68,CONCAT71(uStack_57,local_58) + 1);
}
if (local_48 != &local_38) {
operator_delete(local_48,CONCAT71(uStack_37,local_38) + 1);
}
*(ClientImpl **)this = this_00;
return this;
}
|
|
10,562 |
get_store_length
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
static size_t get_store_length(size_t length)
{
#define MAX_STORE_SIZE 9
unsigned char buffer[MAX_STORE_SIZE], *p;
/* We just store the length and subtract offset of our buffer
to determine the length */
p= mysql_net_store_length(buffer, length);
return p - buffer;
}
|
O0
|
c
|
get_store_length:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x11(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x33ac0
movq -0x38(%rbp), %rcx
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2b599
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
callq 0x17690
nop
|
get_store_length:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov rsi, [rbp+var_20]
lea rdi, [rbp+var_11]
mov [rbp+var_38], rdi
call mysql_net_store_length
mov rcx, [rbp+var_38]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
sub rax, rcx
mov [rbp+var_30], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2B599
mov rax, [rbp+var_30]
add rsp, 40h
pop rbp
retn
loc_2B599:
call ___stack_chk_fail
|
long long get_store_length(long long a1)
{
_BYTE v2[9]; // [rsp+2Fh] [rbp-11h] BYREF
unsigned long long v3; // [rsp+38h] [rbp-8h]
v3 = __readfsqword(0x28u);
return mysql_net_store_length(v2, a1) - (_QWORD)v2;
}
|
get_store_length:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x11]
MOV qword ptr [RBP + -0x38],RDI
CALL 0x00133ac0
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012b599
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x40
POP RBP
RET
LAB_0012b599:
CALL 0x00117690
|
long get_store_length(int8 param_1)
{
long lVar1;
long in_FS_OFFSET;
int1 local_19 [9];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = mysql_net_store_length(local_19,param_1);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return lVar1 - (long)local_19;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
10,563 |
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&)
|
llama.cpp/common/minja/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);
});
}
|
O3
|
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, 0x28(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
leaq 0xc0(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0x8(%rdx), %rbp
subq (%rdx), %rbp
je 0x9ca5e
sarq $0x5, %rbp
cmpq $0x1, %rbp
adcq $0x0, %rbp
xorl %ebx, %ebx
leaq 0xb8(%rsp), %r13
xorl %r12d, %r12d
movq (%r15), %rsi
addq %rbx, %rsi
movq %r13, %rdi
callq 0xc008a
movq %r12, (%rax)
incq %r12
addq $0x20, %rbx
cmpq %r12, %rbp
jne 0x9ca41
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x63ed8
leaq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x2784c
leaq 0x68(%rsp), %r14
leaq 0xb8(%rsp), %rsi
movq %r14, %rdi
callq 0xc047c
leaq 0x98(%rsp), %r15
movq %r15, %rdi
movq 0x28(%rsp), %rsi
callq 0xc011e
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl $0x88, %edi
callq 0x20220
movq %rax, %r12
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x63ed8
leaq 0x18(%r12), %rdi
leaq 0x28(%r12), %rbp
movq %rbp, 0x18(%r12)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
callq 0x2784c
leaq 0x40(%r12), %rax
movq 0x78(%rsp), %rdx
testq %rdx, %rdx
je 0x9cb45
leaq 0x70(%rsp), %rdi
movl (%rdi), %ecx
movq %rdx, 0x48(%r12)
movq 0x10(%rdi), %r8
movq 0x18(%rdi), %rsi
movq %rax, 0x8(%rdx)
leaq 0x90(%rsp), %rdx
movq (%rdx), %rax
movq %rax, 0x60(%r12)
movq $0x0, -0x18(%rdx)
movq %rdi, -0x10(%rdx)
movq %rdi, -0x8(%rdx)
movq %r8, %rax
jmp 0x9cb58
movq $0x0, 0x48(%r12)
leaq 0x60(%r12), %rdx
xorl %ecx, %ecx
movq %rax, %rsi
movq %rax, 0x50(%r12)
movq %rsi, 0x58(%r12)
movq $0x0, (%rdx)
movl %ecx, 0x40(%r12)
leaq 0x68(%r12), %rdi
movq %r15, %rsi
callq 0xc011e
movq %rsp, %rsi
movq %r12, (%rsi)
leaq 0x1c8(%rip), %rax # 0x9cd50
movq %rax, 0x18(%rsi)
leaq 0x7cb(%rip), %rax # 0x9d35e
movq %rax, 0x10(%rsi)
movq 0x20(%rsp), %rdi
callq 0xbae12
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x9cbb8
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xa8(%rsp), %rax
testq %rax, %rax
je 0x9cbd2
movq %r15, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq *%rax
movq %r14, %rdi
callq 0xc06de
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x9cbf1
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x20190
leaq 0x30(%rsp), %rdi
callq 0x2734c
leaq 0xb8(%rsp), %rdi
callq 0xc06de
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9cc99
jmp 0x9cc99
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x9cca4
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x9cca4
jmp 0x9cc99
movq %rax, %rbx
movq %r12, %rdi
addq $0x38, %rdi
callq 0xc06de
movq 0x18(%r12), %rdi
cmpq %rbp, %rdi
je 0x9cc66
movq (%rbp), %rsi
incq %rsi
callq 0x20190
jmp 0x9cc66
movq %rax, %rbx
movq %r12, %rdi
callq 0x2734c
jmp 0x9cc73
movq %rax, %rbx
movl $0x88, %esi
movq %r12, %rdi
callq 0x20190
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x9cca4
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x9cca4
movq %rax, %rdi
callq 0x2777d
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x9cd02
jmp 0x9cced
movq %rax, %rbx
movq %r14, %rdi
callq 0xc06de
jmp 0x9ccc0
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x9ccdc
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x20190
jmp 0x9ccdc
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2734c
jmp 0x9cced
jmp 0x9ccea
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0xc06de
movq %rbx, %rdi
callq 0x20b00
|
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov [rsp+118h+var_F0], rcx
mov r15, rdx
mov r14, rsi
mov [rsp+118h+var_F8], rdi
lea rax, [rsp+118h+var_58]
mov dword ptr [rax], 0
xor ecx, ecx
mov [rax+8], rcx
mov [rax+10h], rax
mov [rax+18h], rax
mov [rax+20h], rcx
mov rbp, [rdx+8]
sub rbp, [rdx]
jz short loc_9CA5E
sar rbp, 5
cmp rbp, 1
adc rbp, 0
xor ebx, ebx
lea r13, [rsp+118h+var_60]
xor r12d, r12d
loc_9CA41:
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], r12
inc r12
add rbx, 20h ; ' '
cmp rbp, r12
jnz short loc_9CA41
loc_9CA5E:
lea rdi, [rsp+118h+var_E8]
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
lea rdi, [rsp+118h+var_D0]
lea r13, [rsp+118h+var_C0]
mov [r13-10h], r13
mov rsi, [r14]
mov rdx, [r14+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea r14, [rsp+118h+var_B0]
lea rsi, [rsp+118h+var_60]
mov rdi, r14
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 r15, [rsp+118h+var_80]
mov rdi, r15
mov rsi, [rsp+118h+var_F0]
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_108], xmm0
movaps [rsp+118h+var_118], xmm0
mov edi, 88h; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea rsi, [rsp+118h+var_E8]
mov rdi, rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
lea rdi, [r12+18h]
lea rbp, [r12+28h]
mov [r12+18h], rbp
mov rsi, [rsp+118h+var_D0]
mov rdx, [rsp+118h+var_C8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rax, [r12+40h]
mov rdx, [rsp+118h+var_A0]
test rdx, rdx
jz short loc_9CB45
lea rdi, [rsp+118h+var_A8]
mov ecx, [rdi]
mov [r12+48h], rdx
mov r8, [rdi+10h]
mov rsi, [rdi+18h]
mov [rdx+8], rax
lea rdx, [rsp+118h+var_88]
mov rax, [rdx]
mov [r12+60h], rax
mov qword ptr [rdx-18h], 0
mov [rdx-10h], rdi
mov [rdx-8], rdi
mov rax, r8
jmp short loc_9CB58
loc_9CB45:
mov qword ptr [r12+48h], 0
lea rdx, [r12+60h]
xor ecx, ecx
mov rsi, rax
loc_9CB58:
mov [r12+50h], rax
mov [r12+58h], rsi
mov qword ptr [rdx], 0
mov [r12+40h], ecx
lea rdi, [r12+68h]
mov rsi, r15
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&)
mov rsi, rsp
mov [rsi], r12
lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E9_M_invokeERKSt9_Any_dataS6_S8_; 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; 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 rdi, [rsp+118h+var_F8]
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
mov rax, qword ptr [rsp+118h+var_108]
test rax, rax
jz short loc_9CBB8
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_9CBB8:
mov rax, [rsp+118h+var_70]
test rax, rax
jz short loc_9CBD2
mov rdi, r15
mov rsi, r15
mov edx, 3
call rax
loc_9CBD2:
mov rdi, r14
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, [rsp+118h+var_D0]; void *
cmp rdi, r13
jz short loc_9CBF1
mov rsi, [rsp+118h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9CBF1:
lea rdi, [rsp+118h+var_E8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+118h+var_60]
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()
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_9CC99
jmp short loc_9CC99
mov rbx, rax
mov rax, qword ptr [rsp+118h+var_108]
test rax, rax
jz short loc_9CCA4
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_9CCA4
jmp short loc_9CC99
mov rbx, rax
mov rdi, r12
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, [r12+18h]; void *
cmp rdi, rbp
jz short loc_9CC66
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9CC66
mov rbx, rax
loc_9CC66:
mov rdi, r12
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_9CC73
mov rbx, rax
loc_9CC73:
mov esi, 88h; unsigned __int64
mov rdi, r12; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rax, qword ptr [rsp+118h+var_108]
test rax, rax
jz short loc_9CCA4
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_9CCA4
loc_9CC99:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
loc_9CCA4:
lea rdi, [rsp+118h+var_E8]
call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; 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_9CCED
mov rbx, rax
mov rdi, r14
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_9CCC0
mov rbx, rax
loc_9CCC0:
mov rdi, [rsp+118h+var_D0]; void *
cmp rdi, r13
jz short loc_9CCDC
mov rsi, [rsp+118h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9CCDC
mov rbx, rax
loc_9CCDC:
lea rdi, [rsp+118h+var_E8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_9CCED
jmp short $+2
loc_9CCEA:
mov rbx, rax
loc_9CCED:
lea rdi, [rsp+118h+var_60]
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; // rbp
long long v7; // rbx
long long v8; // r12
long long v9; // r12
long long v10; // rax
long long v11; // rdx
int v12; // ecx
int *v13; // r8
int *v14; // rsi
long long *v15; // rdx
__int128 v17; // [rsp+0h] [rbp-118h] BYREF
__int128 v18; // [rsp+10h] [rbp-108h]
long long v19; // [rsp+20h] [rbp-F8h]
long long v20; // [rsp+28h] [rbp-F0h]
_QWORD v21[3]; // [rsp+30h] [rbp-E8h] BYREF
void *v22[2]; // [rsp+48h] [rbp-D0h] BYREF
_QWORD v23[2]; // [rsp+58h] [rbp-C0h] BYREF
_BYTE v24[8]; // [rsp+68h] [rbp-B0h] BYREF
int v25; // [rsp+70h] [rbp-A8h] BYREF
long long v26; // [rsp+78h] [rbp-A0h]
int *v27; // [rsp+80h] [rbp-98h]
int *v28; // [rsp+88h] [rbp-90h]
long long v29; // [rsp+90h] [rbp-88h] BYREF
_BYTE v30[16]; // [rsp+98h] [rbp-80h] BYREF
void ( *v31)(_BYTE *, _BYTE *, long long); // [rsp+A8h] [rbp-70h]
_BYTE v32[8]; // [rsp+B8h] [rbp-60h] BYREF
int v33; // [rsp+C0h] [rbp-58h] BYREF
long long v34; // [rsp+C8h] [rbp-50h]
int *v35; // [rsp+D0h] [rbp-48h]
int *v36; // [rsp+D8h] [rbp-40h]
long long v37; // [rsp+E0h] [rbp-38h]
v20 = a4;
v19 = a1;
v33 = 0;
v34 = 0LL;
v35 = &v33;
v36 = &v33;
v37 = 0LL;
v5 = a3[1] - *a3;
if ( v5 )
{
v6 = (v5 >> 5 == 0) + (v5 >> 5);
v7 = 0LL;
v8 = 0LL;
do
{
*(_QWORD *)std::map<std::string,unsigned long>::operator[](v32, v7 + *a3) = v8++;
v7 += 32LL;
}
while ( v6 != v8 );
}
std::vector<std::string>::vector((long long)v21, a3);
v22[0] = v23;
std::string::_M_construct<char *>((long long)v22, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
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(
v24,
v32);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v30, v20);
v18 = 0LL;
v17 = 0LL;
v9 = operator new(0x88uLL);
std::vector<std::string>::vector(v9, v21);
*(_QWORD *)(v9 + 24) = v9 + 40;
std::string::_M_construct<char *>(v9 + 24, (_BYTE *)v22[0], (long long)v22[0] + (unsigned long long)v22[1]);
v10 = v9 + 64;
v11 = v26;
if ( v26 )
{
v12 = v25;
*(_QWORD *)(v9 + 72) = v26;
v13 = v27;
v14 = v28;
*(_QWORD *)(v11 + 8) = v10;
v15 = &v29;
*(_QWORD *)(v9 + 96) = v29;
v26 = 0LL;
v27 = &v25;
v28 = &v25;
v10 = (long long)v13;
}
else
{
*(_QWORD *)(v9 + 72) = 0LL;
v15 = (long long *)(v9 + 96);
v12 = 0;
v14 = (int *)(v9 + 64);
}
*(_QWORD *)(v9 + 80) = v10;
*(_QWORD *)(v9 + 88) = v14;
*v15 = 0LL;
*(_DWORD *)(v9 + 64) = v12;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v9 + 104, v30);
*(_QWORD *)&v17 = v9;
*((_QWORD *)&v18 + 1) = 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;
*(_QWORD *)&v18 = 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(v19);
if ( 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 )
((void ( *)(__int128 *, __int128 *, long long))v18)(&v17, &v17, 3LL);
if ( v31 )
v31(v30, v30, 3LL);
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(v24);
if ( v22[0] != v23 )
operator delete(v22[0], v23[0] + 1LL);
std::vector<std::string>::~vector((long long)v21);
return 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(v32);
}
|
simple_function:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RSP + 0x28],RCX
MOV R15,RDX
MOV R14,RSI
MOV qword ptr [RSP + 0x20],RDI
LEA RAX,[RSP + 0xc0]
MOV dword ptr [RAX],0x0
XOR ECX,ECX
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x10],RAX
MOV qword ptr [RAX + 0x18],RAX
MOV qword ptr [RAX + 0x20],RCX
MOV RBP,qword ptr [RDX + 0x8]
SUB RBP,qword ptr [RDX]
JZ 0x0019ca5e
SAR RBP,0x5
CMP RBP,0x1
ADC RBP,0x0
XOR EBX,EBX
LEA R13,[RSP + 0xb8]
XOR R12D,R12D
LAB_0019ca41:
MOV RSI,qword ptr [R15]
ADD RSI,RBX
LAB_0019ca47:
MOV RDI,R13
CALL 0x001c008a
MOV qword ptr [RAX],R12
INC R12
ADD RBX,0x20
CMP RBP,R12
JNZ 0x0019ca41
LAB_0019ca5e:
LEA RDI,[RSP + 0x30]
MOV RSI,R15
CALL 0x00163ed8
LEA RDI,[RSP + 0x48]
LEA R13,[RSP + 0x58]
MOV qword ptr [R13 + -0x10],R13
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LAB_0019ca83:
CALL 0x0012784c
LEA R14,[RSP + 0x68]
LAB_0019ca8d:
LEA RSI,[RSP + 0xb8]
MOV RDI,R14
CALL 0x001c047c
LEA R15,[RSP + 0x98]
LAB_0019caa5:
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001c011e
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
LAB_0019cabe:
MOV EDI,0x88
CALL 0x00120220
LAB_0019cac8:
MOV R12,RAX
LEA RSI,[RSP + 0x30]
MOV RDI,RAX
CALL 0x00163ed8
LEA RDI,[R12 + 0x18]
LEA RBP,[R12 + 0x28]
MOV qword ptr [R12 + 0x18],RBP
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
ADD RDX,RSI
LAB_0019caf4:
CALL 0x0012784c
LEA RAX,[R12 + 0x40]
MOV RDX,qword ptr [RSP + 0x78]
TEST RDX,RDX
JZ 0x0019cb45
LEA RDI,[RSP + 0x70]
MOV ECX,dword ptr [RDI]
MOV qword ptr [R12 + 0x48],RDX
MOV R8,qword ptr [RDI + 0x10]
MOV RSI,qword ptr [RDI + 0x18]
MOV qword ptr [RDX + 0x8],RAX
LEA RDX,[RSP + 0x90]
MOV RAX,qword ptr [RDX]
MOV qword ptr [R12 + 0x60],RAX
MOV qword ptr [RDX + -0x18],0x0
MOV qword ptr [RDX + -0x10],RDI
MOV qword ptr [RDX + -0x8],RDI
MOV RAX,R8
JMP 0x0019cb58
LAB_0019cb45:
MOV qword ptr [R12 + 0x48],0x0
LEA RDX,[R12 + 0x60]
XOR ECX,ECX
MOV RSI,RAX
LAB_0019cb58:
MOV qword ptr [R12 + 0x50],RAX
MOV qword ptr [R12 + 0x58],RSI
MOV qword ptr [RDX],0x0
MOV dword ptr [R12 + 0x40],ECX
LEA RDI,[R12 + 0x68]
LAB_0019cb73:
MOV RSI,R15
CALL 0x001c011e
MOV RSI,RSP
MOV qword ptr [RSI],R12
LEA RAX,[0x19cd50]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x19d35e]
MOV qword ptr [RSI + 0x10],RAX
LAB_0019cb97:
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x001bae12
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x0019cbb8
LAB_0019cbab:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0019cbb8:
MOV RAX,qword ptr [RSP + 0xa8]
TEST RAX,RAX
JZ 0x0019cbd2
LAB_0019cbc5:
MOV RDI,R15
MOV RSI,R15
MOV EDX,0x3
CALL RAX
LAB_0019cbd2:
MOV RDI,R14
CALL 0x001c06de
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,R13
JZ 0x0019cbf1
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x00120190
LAB_0019cbf1:
LEA RDI,[RSP + 0x30]
CALL 0x0012734c
LEA RDI,[RSP + 0xb8]
CALL 0x001c06de
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&) */
void __thiscall
minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3)
{
long *plVar1;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar2;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar3;
long lVar4;
long lVar5;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar6;
long lVar7;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_118;
int8 uStack_110;
code *local_108;
code *pcStack_100;
minja *local_f8;
function *local_f0;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_e8 [24];
long *local_d0;
long local_c8;
long local_c0 [2];
_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_b0 [8];
int4 local_a8 [2];
long local_a0;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_98;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_90;
int8 local_88;
function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_80 [16];
code *local_70;
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
local_60 [8];
int4 local_58 [2];
int8 local_50;
int4 *local_48;
int4 *local_40;
int8 local_38;
local_48 = local_58;
local_58[0] = 0;
local_50 = 0;
local_38 = 0;
local_f8 = this;
local_f0 = param_3;
local_40 = local_48;
if (*(long *)(param_2 + 8) - *(long *)param_2 != 0) {
lVar5 = *(long *)(param_2 + 8) - *(long *)param_2 >> 5;
lVar4 = 0;
lVar7 = 0;
do {
/* try { // try from 0019ca47 to 0019ca4e has its CatchHandler @ 0019ccea */
plVar1 = (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_60,(string *)(*(long *)param_2 + lVar4));
*plVar1 = lVar7;
lVar7 = lVar7 + 1;
lVar4 = lVar4 + 0x20;
} while (lVar5 + (ulong)(lVar5 == 0) != lVar7);
}
/* try { // try from 0019ca5e to 0019ca6a has its CatchHandler @ 0019cce8 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_e8,param_2);
local_d0 = local_c0;
/* try { // try from 0019ca83 to 0019ca87 has its CatchHandler @ 0019ccd9 */
std::__cxx11::string::_M_construct<char*>
(&local_d0,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
/* try { // try from 0019ca8d to 0019ca9c has its CatchHandler @ 0019ccbd */
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_b0,(_Rb_tree *)local_60);
/* try { // try from 0019caa5 to 0019cab1 has its CatchHandler @ 0019ccb0 */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function
(local_80,local_f0);
local_108 = (code *)0x0;
pcStack_100 = (code *)0x0;
local_118 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)0x0;
uStack_110 = 0;
/* try { // try from 0019cabe to 0019cac7 has its CatchHandler @ 0019cca1 */
this_00 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)operator_new(0x88);
/* try { // try from 0019cac8 to 0019cad7 has its CatchHandler @ 0019cc70 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
(this_00,(vector *)local_e8);
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x18) =
this_00 + 0x28;
/* try { // try from 0019caf4 to 0019caf8 has its CatchHandler @ 0019cc63 */
std::__cxx11::string::_M_construct<char*>(this_00 + 0x18,local_d0,local_c8 + (long)local_d0);
pvVar2 = this_00 + 0x40;
if (local_a0 == 0) {
*(int8 *)(this_00 + 0x48) = 0;
pvVar3 = this_00 + 0x60;
local_a8[0] = 0;
pvVar6 = pvVar2;
}
else {
*(long *)(this_00 + 0x48) = local_a0;
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(local_a0 + 8) = pvVar2;
pvVar3 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88;
*(int8 *)(this_00 + 0x60) = local_88;
local_a0 = 0;
pvVar2 = local_98;
pvVar6 = local_90;
local_98 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a8;
local_90 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a8;
}
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x50) = pvVar2;
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x58) = pvVar6;
*(int8 *)pvVar3 = 0;
*(int4 *)(this_00 + 0x40) = local_a8[0];
/* try { // try from 0019cb73 to 0019cb7a has its CatchHandler @ 0019cc3c */
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),local_80);
pcStack_100 = 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_108 = 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_118 = this_00;
/* try { // try from 0019cb97 to 0019cba0 has its CatchHandler @ 0019cc1e */
Value::callable((Value *)local_f8,(function *)&local_118);
if (local_108 != (code *)0x0) {
/* try { // try from 0019cbab to 0019cbb7 has its CatchHandler @ 0019cc1c */
(*local_108)(&local_118,&local_118,3);
}
if (local_70 != (code *)0x0) {
/* try { // try from 0019cbc5 to 0019cbd1 has its CatchHandler @ 0019cc1a */
(*local_70)(local_80,local_80,3);
}
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_b0);
if (local_d0 != local_c0) {
operator_delete(local_d0,local_c0[0] + 1);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_e8);
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_60);
return;
}
|
|
10,564 |
minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, minja::BinaryOpExpr::Op)
|
monkey531[P]llama/common/minja.hpp
|
BinaryOpExpr(const Location & location, std::shared_ptr<Expression> && l, std::shared_ptr<Expression> && r, Op o)
: Expression(location), left(std::move(l)), right(std::move(r)), op(o) {}
|
O2
|
cpp
|
minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, minja::BinaryOpExpr::Op):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
callq 0x61ec6
leaq 0x8be72(%rip), %rax # 0xfa9d8
addq $0x10, %rax
movq %rax, (%r12)
andq $0x0, 0x28(%r12)
movups (%r15), %xmm0
andq $0x0, 0x8(%r15)
movups %xmm0, 0x20(%r12)
andq $0x0, (%r15)
andq $0x0, 0x38(%r12)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x30(%r12)
andq $0x0, (%r14)
movl %ebx, 0x40(%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
_ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE:
push r15
push r14
push r12
push rbx
push rax
mov ebx, r8d
mov r14, rcx
mov r15, rdx
mov r12, rdi
call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&)
lea rax, _ZTVN5minja12BinaryOpExprE; `vtable for'minja::BinaryOpExpr
add rax, 10h
mov [r12], rax
and qword ptr [r12+28h], 0
movups xmm0, xmmword ptr [r15]
and qword ptr [r15+8], 0
movups xmmword ptr [r12+20h], xmm0
and qword ptr [r15], 0
and qword ptr [r12+38h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [r12+30h], xmm0
and qword ptr [r14], 0
mov [r12+40h], ebx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long * minja::BinaryOpExpr::BinaryOpExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4, int a5)
{
long long *result; // rax
__int128 v9; // xmm0
__int128 v10; // xmm0
minja::Expression::Expression((_QWORD *)a1, a2);
result = &`vtable for'minja::BinaryOpExpr + 2;
*(_QWORD *)a1 = &`vtable for'minja::BinaryOpExpr + 2;
*(_QWORD *)(a1 + 40) = 0LL;
v9 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v9;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v10 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v10;
*(_QWORD *)a4 = 0LL;
*(_DWORD *)(a1 + 64) = a5;
return result;
}
|
BinaryOpExpr:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,R8D
MOV R14,RCX
MOV R15,RDX
MOV R12,RDI
CALL 0x00161ec6
LEA RAX,[0x1fa9d8]
ADD RAX,0x10
MOV qword ptr [R12],RAX
AND qword ptr [R12 + 0x28],0x0
MOVUPS XMM0,xmmword ptr [R15]
AND qword ptr [R15 + 0x8],0x0
MOVUPS xmmword ptr [R12 + 0x20],XMM0
AND qword ptr [R15],0x0
AND qword ptr [R12 + 0x38],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [R12 + 0x30],XMM0
AND qword ptr [R14],0x0
MOV dword ptr [R12 + 0x40],EBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&, minja::BinaryOpExpr::Op) */
void __thiscall
minja::BinaryOpExpr::BinaryOpExpr
(BinaryOpExpr *this,Location *param_1,int8 *param_2,int8 *param_3,
int4 param_5)
{
int8 uVar1;
Expression::Expression((Expression *)this,param_1);
*(int ***)this = &PTR_do_evaluate_001fa9e8;
*(int8 *)(this + 0x28) = 0;
uVar1 = param_2[1];
param_2[1] = 0;
*(int8 *)(this + 0x20) = *param_2;
*(int8 *)(this + 0x28) = uVar1;
*param_2 = 0;
*(int8 *)(this + 0x38) = 0;
uVar1 = param_3[1];
param_3[1] = 0;
*(int8 *)(this + 0x30) = *param_3;
*(int8 *)(this + 0x38) = uVar1;
*param_3 = 0;
*(int4 *)(this + 0x40) = param_5;
return;
}
|
|
10,565 |
maria_delete_all_rows
|
eloqsql/storage/maria/ma_delete_all.c
|
int maria_delete_all_rows(MARIA_HA *info)
{
MARIA_SHARE *share= info->s;
my_bool log_record;
LSN lsn;
#ifdef HAVE_MMAP
my_bool mmap_file= share->file_map != 0;
#endif
DBUG_ENTER("maria_delete_all_rows");
if (share->options & HA_OPTION_READ_ONLY_DATA)
{
DBUG_RETURN(my_errno=EACCES);
}
/**
@todo LOCK take X-lock on table here.
When we have versioning, if some other thread is looking at this table,
we cannot shrink the file like this.
*/
if (_ma_readinfo(info,F_WRLCK,1))
DBUG_RETURN(my_errno);
log_record= share->now_transactional && !share->temporary;
if (log_record)
{
/*
This record will be used by Recovery to finish the deletion if it
crashed. We force it to have a complete history in the log.
*/
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1];
uchar log_data[FILEID_STORE_SIZE];
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data);
if (unlikely(translog_write_record(&lsn, LOGREC_REDO_DELETE_ALL,
info->trn, info, 0,
sizeof(log_array)/sizeof(log_array[0]),
log_array, log_data, NULL) ||
translog_flush(lsn)))
goto err;
/*
If we fail in this function after this point, log and table will be
inconsistent.
*/
if (_ma_mark_file_changed(share))
goto err;
}
else
{
if (_ma_mark_file_changed(share))
goto err;
/* Other branch called function below when writing log record, in hook */
_ma_reset_status(info);
}
/* Remove old history as the table is now empty for everyone */
_ma_reset_state(info);
share->state.changed= 0;
/*
If we are using delayed keys or if the user has done changes to the tables
since it was locked then there may be key blocks in the page cache. Or
there may be data blocks there. We need to throw them away or they may
re-enter the emptied table or another table later.
*/
#ifdef HAVE_MMAP
if (mmap_file)
_ma_unmap_file(info);
#endif
if (_ma_flush_table_files(info, MARIA_FLUSH_DATA|MARIA_FLUSH_INDEX,
FLUSH_IGNORE_CHANGED, FLUSH_IGNORE_CHANGED) ||
mysql_file_chsize(info->dfile.file, 0, 0, MYF(MY_WME)) ||
mysql_file_chsize(share->kfile.file, share->base.keystart, 0, MYF(MY_WME)))
goto err;
if (_ma_initialize_data_file(share, info->dfile.file))
goto err;
if (log_record)
{
/*
Because LOGREC_REDO_DELETE_ALL does not operate on pages, it has the
following problem:
delete_all; inserts (redo_insert); all pages get flushed; checkpoint:
the dirty pages list will be empty. In recovery, delete_all is executed,
but redo_insert are skipped (dirty pages list is empty).
To avoid this, we need to set skip_redo_lsn now, and thus need to sync
files.
Also fixes the problem of:
bulk insert; insert; delete_all; crash:
"bulk insert" is skipped (no REDOs), so if "insert" would not be skipped
(if we didn't update skip_redo_lsn below) then "insert" would be tried
and fail, saying that it sees that the first page has to be created
though the inserted row has rownr>0.
*/
my_bool error= _ma_state_info_write(share,
MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
MA_STATE_INFO_WRITE_LOCK) ||
_ma_update_state_lsns(share, lsn, info->trn->trid, FALSE, FALSE) ||
_ma_sync_table_files(info);
info->trn->rec_lsn= LSN_IMPOSSIBLE;
if (error)
goto err;
}
if (info->opt_flag & WRITE_CACHE_USED)
reinit_io_cache(&info->rec_cache, WRITE_CACHE, 0, 1, 1);
_ma_writeinfo(info, WRITEINFO_UPDATE_KEYFILE);
#ifdef HAVE_MMAP
/* Map again */
if (mmap_file)
_ma_dynmap_file(info, (my_off_t) 0);
#endif
DBUG_RETURN(0);
err:
{
int save_errno=my_errno;
_ma_writeinfo(info, WRITEINFO_UPDATE_KEYFILE);
info->update|=HA_STATE_WRITTEN; /* Buffer changed */
DBUG_RETURN(my_errno=save_errno);
}
}
|
O3
|
c
|
maria_delete_all_rows:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq (%rdi), %r14
testb $0x1, 0x722(%r14)
jne 0x402d0
movq %rdi, %rbx
movq 0x5f0(%r14), %r13
movl $0x1, %esi
movl $0x1, %edx
callq 0x62f7e
testl %eax, %eax
je 0x402e6
callq 0xc14ee
movl (%rax), %r14d
jmp 0x404ab
callq 0xc14ee
movl $0xd, (%rax)
movl $0xd, %r14d
jmp 0x404ab
cmpb $0x0, 0x7e7(%r14)
je 0x402fe
cmpb $0x0, 0x7d9(%r14)
je 0x4042b
movq %r14, %rdi
callq 0x62ffe
testl %eax, %eax
jne 0x40487
movq %rbx, %rdi
callq 0x40545
movb $0x1, %r12b
movq %rbx, %rdi
callq 0x33cc0
movl $0x0, 0x170(%r14)
testq %r13, %r13
je 0x40339
movq %rbx, %rdi
callq 0x655ce
movq %rbx, %rdi
movl $0x3, %esi
movl $0x2, %edx
movl $0x2, %ecx
callq 0x5c2c4
testl %eax, %eax
jne 0x40487
movl 0x480(%rbx), %r15d
leaq 0x36e6b2(%rip), %rax # 0x3aea18
movq (%rax), %rax
leaq -0x80(%rbp), %rdi
movl %r15d, %esi
movl $0xd, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x40528
movl $0x10, %ecx
movl %r15d, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0xba94c
testl %eax, %eax
jne 0x40487
movl 0x760(%r14), %esi
movq 0x360(%r14), %rdx
movl $0x6c, %edi
callq 0x405e5
testl %eax, %eax
jne 0x40487
movl 0x480(%rbx), %esi
movq %r14, %rdi
callq 0x73297
testl %eax, %eax
jne 0x40487
testb %r12b, %r12b
je 0x404c5
testb $0x10, 0x61c(%rbx)
je 0x40403
leaq 0x4b8(%rbx), %rdi
movl $0x2, %esi
xorl %edx, %edx
movl $0x1, %ecx
movl $0x1, %r8d
callq 0xb0c0c
movq %rbx, %rdi
movl $0x1, %esi
callq 0x62f86
xorl %r14d, %r14d
testq %r13, %r13
je 0x404ab
movq %rbx, %rdi
xorl %esi, %esi
callq 0x66fcc
jmp 0x404ab
leaq -0x2c(%rbp), %rax
leaq -0x80(%rbp), %r10
movq %rax, 0x20(%r10)
movq $0x2, 0x28(%r10)
movq 0x8(%rbx), %rdx
subq $0x8, %rsp
leaq -0x38(%rbp), %rdi
movl $0x21, %esi
movq %rbx, %rcx
xorl %r8d, %r8d
movl $0x3, %r9d
pushq $0x0
pushq %rax
pushq %r10
callq 0x2b425
addq $0x20, %rsp
testb %al, %al
jne 0x40487
movq -0x38(%rbp), %rdi
callq 0x477d7
testb %al, %al
jne 0x40487
movq %r14, %rdi
callq 0x62ffe
testl %eax, %eax
je 0x404bd
callq 0xc14ee
movl (%rax), %r14d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x62f86
orb $0x4, 0x624(%rbx)
callq 0xc14ee
movl %r14d, (%rax)
movl %r14d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r12d, %r12d
jmp 0x40319
movq %r14, %rdi
movl $0x5, %esi
callq 0x5a5e6
testl %eax, %eax
jne 0x404f3
movq -0x38(%rbp), %rsi
movq 0x8(%rbx), %rax
movq 0x78(%rax), %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x733e2
testl %eax, %eax
je 0x40504
movq 0x8(%rbx), %rax
movq $0x0, 0x90(%rax)
jmp 0x40487
movq %rbx, %rdi
callq 0x5c4de
movq 0x8(%rbx), %rcx
movq $0x0, 0x90(%rcx)
testl %eax, %eax
jne 0x40487
jmp 0x403dc
leaq -0x2c(%rbp), %rcx
movq %rax, %rdi
movl %r15d, %esi
movq %rcx, %r15
movq %rcx, %rdx
callq 0x2ae6e
movl (%r15), %eax
jmp 0x40395
|
maria_delete_all_rows:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, [rdi]
test byte ptr [r14+722h], 1
jnz short loc_402D0
mov rbx, rdi
mov r13, [r14+5F0h]
mov esi, 1
mov edx, 1
call _ma_readinfo
test eax, eax
jz short loc_402E6
call _my_thread_var
mov r14d, [rax]
jmp loc_404AB
loc_402D0:
call _my_thread_var
mov dword ptr [rax], 0Dh
mov r14d, 0Dh
jmp loc_404AB
loc_402E6:
cmp byte ptr [r14+7E7h], 0
jz short loc_402FE
cmp byte ptr [r14+7D9h], 0
jz loc_4042B
loc_402FE:
mov rdi, r14
call _ma_mark_file_changed
test eax, eax
jnz loc_40487
mov rdi, rbx
call _ma_reset_status
mov r12b, 1
loc_40319:
mov rdi, rbx
call _ma_reset_state
mov dword ptr [r14+170h], 0
test r13, r13
jz short loc_40339
mov rdi, rbx
call _ma_unmap_file
loc_40339:
mov rdi, rbx
mov esi, 3
mov edx, 2
mov ecx, 2
call _ma_flush_table_files
test eax, eax
jnz loc_40487
mov r15d, [rbx+480h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_80]
mov esi, r15d
mov edx, 0Dh
call qword ptr [rax+158h]
test rax, rax
jnz loc_40528
mov ecx, 10h
mov edi, r15d
xor esi, esi
xor edx, edx
call my_chsize
loc_40395:
test eax, eax
jnz loc_40487
mov esi, [r14+760h]
mov rdx, [r14+360h]
mov edi, 6Ch ; 'l'
call inline_mysql_file_chsize
test eax, eax
jnz loc_40487
mov esi, [rbx+480h]
mov rdi, r14
call _ma_initialize_data_file
test eax, eax
jnz loc_40487
test r12b, r12b
jz loc_404C5
loc_403DC:
test byte ptr [rbx+61Ch], 10h
jz short loc_40403
lea rdi, [rbx+4B8h]
mov esi, 2
xor edx, edx
mov ecx, 1
mov r8d, 1
call reinit_io_cache
loc_40403:
mov rdi, rbx
mov esi, 1
call _ma_writeinfo
xor r14d, r14d
test r13, r13
jz loc_404AB
mov rdi, rbx
xor esi, esi
call _ma_dynmap_file
jmp loc_404AB
loc_4042B:
lea rax, [rbp+var_2C]
lea r10, [rbp+var_80]
mov [r10+20h], rax
mov qword ptr [r10+28h], 2
mov rdx, [rbx+8]
sub rsp, 8
lea rdi, [rbp+var_38]
mov esi, 21h ; '!'
mov rcx, rbx
xor r8d, r8d
mov r9d, 3
push 0
push rax
push r10
call translog_write_record
add rsp, 20h
test al, al
jnz short loc_40487
mov rdi, [rbp+var_38]
call translog_flush
test al, al
jnz short loc_40487
mov rdi, r14
call _ma_mark_file_changed
test eax, eax
jz short loc_404BD
loc_40487:
call _my_thread_var
mov r14d, [rax]
mov rdi, rbx
mov esi, 1
call _ma_writeinfo
or byte ptr [rbx+624h], 4
call _my_thread_var
mov [rax], r14d
loc_404AB:
mov eax, r14d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_404BD:
xor r12d, r12d
jmp loc_40319
loc_404C5:
mov rdi, r14
mov esi, 5
call _ma_state_info_write
test eax, eax
jnz short loc_404F3
mov rsi, [rbp+var_38]
mov rax, [rbx+8]
mov rdx, [rax+78h]
mov rdi, r14
xor ecx, ecx
xor r8d, r8d
call _ma_update_state_lsns
test eax, eax
jz short loc_40504
loc_404F3:
mov rax, [rbx+8]
mov qword ptr [rax+90h], 0
jmp short loc_40487
loc_40504:
mov rdi, rbx
call _ma_sync_table_files
mov rcx, [rbx+8]
mov qword ptr [rcx+90h], 0
test eax, eax
jnz loc_40487
jmp loc_403DC
loc_40528:
lea rcx, [rbp+var_2C]
mov rdi, rax
mov esi, r15d
mov r15, rcx
mov rdx, rcx
call maria_delete_all_rows_cold_1
mov eax, [r15]
jmp loc_40395
|
long long maria_delete_all_rows(unsigned int *a1)
{
long long v1; // r14
long long v3; // r13
unsigned int v4; // r14d
long long v5; // rdi
char v6; // r12
unsigned int v7; // r15d
long long v8; // rax
int v9; // eax
long long v10; // rdx
int v12; // eax
_OWORD v13[2]; // [rsp+0h] [rbp-80h] BYREF
_DWORD *v14; // [rsp+20h] [rbp-60h]
long long v15; // [rsp+28h] [rbp-58h]
long long v16; // [rsp+48h] [rbp-38h] BYREF
_DWORD v17[11]; // [rsp+54h] [rbp-2Ch] BYREF
v1 = *(_QWORD *)a1;
if ( (*(_BYTE *)(*(_QWORD *)a1 + 1826LL) & 1) != 0 )
{
*(_DWORD *)my_thread_var(a1) = 13;
return 13;
}
v3 = *(_QWORD *)(v1 + 1520);
if ( (unsigned int)ma_readinfo(a1, 1LL, 1LL) )
return *(unsigned int *)my_thread_var(a1);
if ( *(_BYTE *)(v1 + 2023) && !*(_BYTE *)(v1 + 2009) )
{
v14 = v17;
v15 = 2LL;
v10 = *((_QWORD *)a1 + 1);
v5 = (long long)&v16;
if ( (unsigned __int8)translog_write_record(
(unsigned long long)&v16,
(long long *)((char *)&qword_20 + 1),
v10,
a1,
0,
3,
v13,
v17,
0LL) )
goto LABEL_25;
v5 = v16;
if ( (unsigned __int8)translog_flush(v16) )
goto LABEL_25;
v5 = v1;
if ( (unsigned int)ma_mark_file_changed(v1) )
goto LABEL_25;
v6 = 0;
}
else
{
v5 = v1;
if ( (unsigned int)ma_mark_file_changed(v1) )
goto LABEL_25;
ma_reset_status(a1);
v6 = 1;
}
ma_reset_state(a1);
*(_DWORD *)(v1 + 368) = 0;
if ( v3 )
ma_unmap_file(a1);
v5 = (long long)a1;
if ( (unsigned int)ma_flush_table_files(a1, 3LL, 2LL, 2LL) )
goto LABEL_25;
v7 = a1[288];
v8 = ((long long ( *)(_OWORD *, _QWORD, long long))PSI_server[43])(v13, v7, 13LL);
if ( v8 )
{
v5 = v8;
maria_delete_all_rows_cold_1(v8, v7, v17);
v9 = v17[0];
}
else
{
v5 = v7;
v9 = my_chsize(v7, 0LL, 0LL, 16LL);
}
if ( v9 )
goto LABEL_25;
v5 = 108LL;
if ( (unsigned int)inline_mysql_file_chsize(108LL, *(unsigned int *)(v1 + 1888), *(_QWORD *)(v1 + 864)) )
goto LABEL_25;
v5 = v1;
if ( (unsigned int)ma_initialize_data_file(v1, a1[288]) )
goto LABEL_25;
if ( !v6 )
{
v5 = v1;
if ( (unsigned int)ma_state_info_write(v1, 5LL)
|| (v5 = v1, (unsigned int)ma_update_state_lsns(v1, v16, *(_QWORD *)(*((_QWORD *)a1 + 1) + 120LL), 0LL, 0LL)) )
{
*(_QWORD *)(*((_QWORD *)a1 + 1) + 144LL) = 0LL;
}
else
{
v5 = (long long)a1;
v12 = ma_sync_table_files(a1);
*(_QWORD *)(*((_QWORD *)a1 + 1) + 144LL) = 0LL;
if ( !v12 )
goto LABEL_18;
}
LABEL_25:
v4 = *(_DWORD *)my_thread_var(v5);
ma_writeinfo(a1, 1LL);
*((_BYTE *)a1 + 1572) |= 4u;
*(_DWORD *)my_thread_var(a1) = v4;
return v4;
}
LABEL_18:
if ( (a1[391] & 0x10) != 0 )
reinit_io_cache(a1 + 302, 2LL, 0LL, 1LL, 1LL);
ma_writeinfo(a1, 1LL);
v4 = 0;
if ( v3 )
ma_dynmap_file(a1, 0LL);
return v4;
}
|
maria_delete_all_rows:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,qword ptr [RDI]
TEST byte ptr [R14 + 0x722],0x1
JNZ 0x001402d0
MOV RBX,RDI
MOV R13,qword ptr [R14 + 0x5f0]
MOV ESI,0x1
MOV EDX,0x1
CALL 0x00162f7e
TEST EAX,EAX
JZ 0x001402e6
CALL 0x001c14ee
MOV R14D,dword ptr [RAX]
JMP 0x001404ab
LAB_001402d0:
CALL 0x001c14ee
MOV dword ptr [RAX],0xd
MOV R14D,0xd
JMP 0x001404ab
LAB_001402e6:
CMP byte ptr [R14 + 0x7e7],0x0
JZ 0x001402fe
CMP byte ptr [R14 + 0x7d9],0x0
JZ 0x0014042b
LAB_001402fe:
MOV RDI,R14
CALL 0x00162ffe
TEST EAX,EAX
JNZ 0x00140487
MOV RDI,RBX
CALL 0x00140545
MOV R12B,0x1
LAB_00140319:
MOV RDI,RBX
CALL 0x00133cc0
MOV dword ptr [R14 + 0x170],0x0
TEST R13,R13
JZ 0x00140339
MOV RDI,RBX
CALL 0x001655ce
LAB_00140339:
MOV RDI,RBX
MOV ESI,0x3
MOV EDX,0x2
MOV ECX,0x2
CALL 0x0015c2c4
TEST EAX,EAX
JNZ 0x00140487
MOV R15D,dword ptr [RBX + 0x480]
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x80]
MOV ESI,R15D
MOV EDX,0xd
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00140528
MOV ECX,0x10
MOV EDI,R15D
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001ba94c
LAB_00140395:
TEST EAX,EAX
JNZ 0x00140487
MOV ESI,dword ptr [R14 + 0x760]
MOV RDX,qword ptr [R14 + 0x360]
MOV EDI,0x6c
CALL 0x001405e5
TEST EAX,EAX
JNZ 0x00140487
MOV ESI,dword ptr [RBX + 0x480]
MOV RDI,R14
CALL 0x00173297
TEST EAX,EAX
JNZ 0x00140487
TEST R12B,R12B
JZ 0x001404c5
LAB_001403dc:
TEST byte ptr [RBX + 0x61c],0x10
JZ 0x00140403
LEA RDI,[RBX + 0x4b8]
MOV ESI,0x2
XOR EDX,EDX
MOV ECX,0x1
MOV R8D,0x1
CALL 0x001b0c0c
LAB_00140403:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00162f86
XOR R14D,R14D
TEST R13,R13
JZ 0x001404ab
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00166fcc
JMP 0x001404ab
LAB_0014042b:
LEA RAX,[RBP + -0x2c]
LEA R10,[RBP + -0x80]
MOV qword ptr [R10 + 0x20],RAX
MOV qword ptr [R10 + 0x28],0x2
MOV RDX,qword ptr [RBX + 0x8]
SUB RSP,0x8
LEA RDI,[RBP + -0x38]
MOV ESI,0x21
MOV RCX,RBX
XOR R8D,R8D
MOV R9D,0x3
PUSH 0x0
PUSH RAX
PUSH R10
CALL 0x0012b425
ADD RSP,0x20
TEST AL,AL
JNZ 0x00140487
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001477d7
TEST AL,AL
JNZ 0x00140487
MOV RDI,R14
CALL 0x00162ffe
TEST EAX,EAX
JZ 0x001404bd
LAB_00140487:
CALL 0x001c14ee
MOV R14D,dword ptr [RAX]
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00162f86
OR byte ptr [RBX + 0x624],0x4
CALL 0x001c14ee
MOV dword ptr [RAX],R14D
LAB_001404ab:
MOV EAX,R14D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001404bd:
XOR R12D,R12D
JMP 0x00140319
LAB_001404c5:
MOV RDI,R14
MOV ESI,0x5
CALL 0x0015a5e6
TEST EAX,EAX
JNZ 0x001404f3
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBX + 0x8]
MOV RDX,qword ptr [RAX + 0x78]
MOV RDI,R14
XOR ECX,ECX
XOR R8D,R8D
CALL 0x001733e2
TEST EAX,EAX
JZ 0x00140504
LAB_001404f3:
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RAX + 0x90],0x0
JMP 0x00140487
LAB_00140504:
MOV RDI,RBX
CALL 0x0015c4de
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RCX + 0x90],0x0
TEST EAX,EAX
JNZ 0x00140487
JMP 0x001403dc
LAB_00140528:
LEA RCX,[RBP + -0x2c]
MOV RDI,RAX
MOV ESI,R15D
MOV R15,RCX
MOV RDX,RCX
CALL 0x0012ae6e
MOV EAX,dword ptr [R15]
JMP 0x00140395
|
int4 maria_delete_all_rows(long *param_1)
{
int4 uVar1;
long lVar2;
long lVar3;
bool bVar4;
char cVar5;
int iVar6;
int4 *puVar7;
long lVar8;
int1 local_88 [32];
int *local_68;
int8 local_60;
int8 local_40;
int local_34;
lVar2 = *param_1;
if ((*(byte *)(lVar2 + 0x722) & 1) != 0) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0xd;
return 0xd;
}
lVar3 = *(long *)(lVar2 + 0x5f0);
iVar6 = _ma_readinfo(param_1,1,1);
if (iVar6 != 0) {
puVar7 = (int4 *)_my_thread_var();
return *puVar7;
}
if ((*(char *)(lVar2 + 0x7e7) == '\0') || (*(char *)(lVar2 + 0x7d9) != '\0')) {
iVar6 = _ma_mark_file_changed(lVar2);
if (iVar6 != 0) goto LAB_00140487;
_ma_reset_status(param_1);
bVar4 = true;
}
else {
local_68 = &local_34;
local_60 = 2;
cVar5 = translog_write_record(&local_40,0x21,param_1[1],param_1,0,3,local_88,local_68,0);
if (((cVar5 != '\0') || (cVar5 = translog_flush(local_40), cVar5 != '\0')) ||
(iVar6 = _ma_mark_file_changed(lVar2), iVar6 != 0)) goto LAB_00140487;
bVar4 = false;
}
_ma_reset_state(param_1);
*(int4 *)(lVar2 + 0x170) = 0;
if (lVar3 != 0) {
_ma_unmap_file(param_1);
}
iVar6 = _ma_flush_table_files(param_1,3,2,2);
if (iVar6 == 0) {
uVar1 = (int4)param_1[0x90];
lVar8 = (**(code **)(PSI_server + 0x158))(local_88,uVar1,0xd);
if (lVar8 == 0) {
local_34 = my_chsize(uVar1,0,0,0x10);
}
else {
maria_delete_all_rows_cold_1(lVar8,uVar1,&local_34);
}
if (((local_34 == 0) &&
(iVar6 = inline_mysql_file_chsize
(0x6c,*(int4 *)(lVar2 + 0x760),*(int8 *)(lVar2 + 0x360)),
iVar6 == 0)) && (iVar6 = _ma_initialize_data_file(lVar2,(int)param_1[0x90]), iVar6 == 0)) {
if (bVar4) {
LAB_001403dc:
if ((*(byte *)((long)param_1 + 0x61c) & 0x10) != 0) {
reinit_io_cache(param_1 + 0x97,2,0,1,1);
}
_ma_writeinfo(param_1,1);
if (lVar3 == 0) {
return 0;
}
_ma_dynmap_file(param_1,0);
return 0;
}
iVar6 = _ma_state_info_write(lVar2,5);
if ((iVar6 == 0) &&
(iVar6 = _ma_update_state_lsns(lVar2,local_40,*(int8 *)(param_1[1] + 0x78),0,0),
iVar6 == 0)) {
iVar6 = _ma_sync_table_files(param_1);
*(int8 *)(param_1[1] + 0x90) = 0;
if (iVar6 == 0) goto LAB_001403dc;
}
else {
*(int8 *)(param_1[1] + 0x90) = 0;
}
}
}
LAB_00140487:
puVar7 = (int4 *)_my_thread_var();
uVar1 = *puVar7;
_ma_writeinfo(param_1,1);
*(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 4;
puVar7 = (int4 *)_my_thread_var();
*puVar7 = uVar1;
return uVar1;
}
|
|
10,566 |
allocate_dynamic
|
eloqsql/mysys/array.c
|
my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements)
{
DBUG_ENTER("allocate_dynamic");
if (max_elements >= array->max_element)
{
uint size;
uchar *new_ptr;
size= (max_elements + array->alloc_increment)/array->alloc_increment;
size*= array->alloc_increment;
if (array->malloc_flags & MY_INIT_BUFFER_USED)
{
/*
In this senerio, the buffer is statically preallocated,
so we have to create an all-new malloc since we overflowed
*/
if (!(new_ptr= (uchar *) my_malloc(array->m_psi_key, size *
array->size_of_element,
MYF(array->malloc_flags | MY_WME))))
DBUG_RETURN(0);
memcpy(new_ptr, array->buffer,
array->elements * array->size_of_element);
array->malloc_flags&= ~MY_INIT_BUFFER_USED;
}
else if (!(new_ptr= (uchar*) my_realloc(array->m_psi_key,
array->buffer,size *
array->size_of_element,
MYF(MY_WME | MY_ALLOW_ZERO_PTR |
array->malloc_flags))))
DBUG_RETURN(TRUE);
array->buffer= new_ptr;
array->max_element= size;
}
DBUG_RETURN(FALSE);
}
|
O0
|
c
|
allocate_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jb 0x316b5
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
addl 0x10(%rcx), %eax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divl 0x10(%rcx)
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
imull -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
andq $0x100, %rax # imm = 0x100
cmpq $0x0, %rax
je 0x3165e
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %esi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
orq $0x10, %rdx
callq 0x2fcf0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x31623
jmp 0x3161a
movb $0x0, -0x1(%rbp)
jmp 0x316bb
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x24220
movq -0x10(%rbp), %rax
movabsq $0xfffffeff, %rcx # imm = 0xFFFFFEFF
andq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
jmp 0x316a0
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
orq $0x50, %rcx
callq 0x2fec0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x3169e
jmp 0x31698
movb $0x1, -0x1(%rbp)
jmp 0x316bb
jmp 0x316a0
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x316b7
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
allocate_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov eax, [rbp+var_14]
mov rcx, [rbp+var_10]
cmp eax, [rcx+0Ch]
jb loc_316B5
mov eax, [rbp+var_14]
mov rcx, [rbp+var_10]
add eax, [rcx+10h]
mov rcx, [rbp+var_10]
xor edx, edx
div dword ptr [rcx+10h]
mov [rbp+var_18], eax
mov rax, [rbp+var_10]
mov eax, [rax+10h]
imul eax, [rbp+var_18]
mov [rbp+var_18], eax
mov rax, [rbp+var_10]
mov rax, [rax+20h]
and rax, 100h
cmp rax, 0
jz short loc_3165E
mov rax, [rbp+var_10]
mov edi, [rax+18h]
mov eax, [rbp+var_18]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov esi, eax
mov rax, [rbp+var_10]
mov rdx, [rax+20h]
or rdx, 10h
call my_malloc
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_31623
jmp short $+2
loc_3161A:
mov [rbp+var_1], 0
jmp loc_316BB
loc_31623:
mov rdi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rsi, [rax]
mov rax, [rbp+var_10]
mov eax, [rax+8]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov edx, eax
call _memcpy
mov rax, [rbp+var_10]
mov rcx, 0FFFFFEFFh
and rcx, [rax+20h]
mov [rax+20h], rcx
jmp short loc_316A0
loc_3165E:
mov rax, [rbp+var_10]
mov edi, [rax+18h]
mov rax, [rbp+var_10]
mov rsi, [rax]
mov eax, [rbp+var_18]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov edx, eax
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
or rcx, 50h
call my_realloc
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_3169E
jmp short $+2
loc_31698:
mov [rbp+var_1], 1
jmp short loc_316BB
loc_3169E:
jmp short $+2
loc_316A0:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax], rcx
mov ecx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax+0Ch], ecx
loc_316B5:
jmp short $+2
loc_316B7:
mov [rbp+var_1], 0
loc_316BB:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char allocate_dynamic(long long *a1, unsigned int a2)
{
long long v3; // [rsp+0h] [rbp-20h]
unsigned int v4; // [rsp+8h] [rbp-18h]
if ( a2 < *((_DWORD *)a1 + 3) )
return 0;
v4 = (*((_DWORD *)a1 + 4) + a2) / *((_DWORD *)a1 + 4) * *((_DWORD *)a1 + 4);
if ( (a1[4] & 0x100) == 0 )
{
v3 = my_realloc(*((_DWORD *)a1 + 6), *a1, *((_DWORD *)a1 + 5) * v4, *((_BYTE *)a1 + 32) | 0x50u);
if ( !v3 )
return 1;
goto LABEL_8;
}
v3 = my_malloc(*((_DWORD *)a1 + 6), *((_DWORD *)a1 + 5) * v4, *((_DWORD *)a1 + 8) | 0x10u);
if ( v3 )
{
memcpy(v3, *a1, (unsigned int)(*((_DWORD *)a1 + 5) * *((_DWORD *)a1 + 2)));
a1[4] &= 0xFFFFFEFFuLL;
LABEL_8:
*a1 = v3;
*((_DWORD *)a1 + 3) = v4;
return 0;
}
return 0;
}
|
allocate_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0xc]
JC 0x001316b5
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x10]
ADD EAX,dword ptr [RCX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
XOR EDX,EDX
DIV dword ptr [RCX + 0x10]
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x10]
IMUL EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
AND RAX,0x100
CMP RAX,0x0
JZ 0x0013165e
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x18]
MOV EAX,dword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x20]
OR RDX,0x10
CALL 0x0012fcf0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x00131623
JMP 0x0013161a
LAB_0013161a:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001316bb
LAB_00131623:
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
CALL 0x00124220
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,0xfffffeff
AND RCX,qword ptr [RAX + 0x20]
MOV qword ptr [RAX + 0x20],RCX
JMP 0x001316a0
LAB_0013165e:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
OR RCX,0x50
CALL 0x0012fec0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0013169e
JMP 0x00131698
LAB_00131698:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001316bb
LAB_0013169e:
JMP 0x001316a0
LAB_001316a0:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],ECX
LAB_001316b5:
JMP 0x001316b7
LAB_001316b7:
MOV byte ptr [RBP + -0x1],0x0
LAB_001316bb:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 allocate_dynamic(int8 *param_1,uint param_2)
{
int iVar1;
void *local_28;
if (*(uint *)((long)param_1 + 0xc) <= param_2) {
iVar1 = *(int *)(param_1 + 2) * ((param_2 + *(int *)(param_1 + 2)) / *(uint *)(param_1 + 2));
if ((param_1[4] & 0x100) == 0) {
local_28 = (void *)my_realloc(*(int4 *)(param_1 + 3),*param_1,
iVar1 * *(int *)((long)param_1 + 0x14),param_1[4] | 0x50);
if (local_28 == (void *)0x0) {
return 1;
}
}
else {
local_28 = (void *)my_malloc(*(int4 *)(param_1 + 3),
iVar1 * *(int *)((long)param_1 + 0x14),param_1[4] | 0x10);
if (local_28 == (void *)0x0) {
return 0;
}
memcpy(local_28,(void *)*param_1,
(ulong)(uint)(*(int *)(param_1 + 1) * *(int *)((long)param_1 + 0x14)));
param_1[4] = param_1[4] & 0xfffffeff;
}
*param_1 = local_28;
*(int *)((long)param_1 + 0xc) = iVar1;
}
return 0;
}
|
|
10,567 |
google::protobuf::(anonymous namespace)::FieldValuePrinterWrapper::PrintMessageEnd(google::protobuf::Message const&, int, int, bool, google::protobuf::TextFormat::BaseTextGenerator*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/text_format.cc
|
void PrintMessageEnd(
const Message& message, int field_index, int field_count,
bool single_line_mode,
TextFormat::BaseTextGenerator* generator) const override {
generator->PrintString(delegate_->PrintMessageEnd(
message, field_index, field_count, single_line_mode));
}
|
O3
|
cpp
|
google::protobuf::(anonymous namespace)::FieldValuePrinterWrapper::PrintMessageEnd(google::protobuf::Message const&, int, int, bool, google::protobuf::TextFormat::BaseTextGenerator*) const:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbx
movl %r8d, %r9d
movl %ecx, %r8d
movl %edx, %ecx
movq %rsi, %rdx
movq 0x8(%rdi), %rsi
movq (%rsi), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq *0x70(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8048e
callq 0xf330
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x804ac
callq 0xf330
movq %rbx, %rdi
callq 0xf570
|
_ZNK6google8protobuf12_GLOBAL__N_124FieldValuePrinterWrapper15PrintMessageEndERKNS0_7MessageEiibPNS0_10TextFormat17BaseTextGeneratorE:
push r14
push rbx
sub rsp, 28h
mov rbx, r9
mov r9d, r8d
mov r8d, ecx
mov ecx, edx
mov rdx, rsi
mov rsi, [rdi+8]
mov rax, [rsi]
lea r14, [rsp+38h+var_30]
mov rdi, r14
call qword ptr [rax+70h]
mov rsi, [r14]
mov rdx, [r14+8]
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+28h]
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8048E
call __ZdlPv; operator delete(void *)
loc_8048E:
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_804AC
call __ZdlPv; operator delete(void *)
loc_804AC:
mov rdi, rbx
call __Unwind_Resume
|
void google::protobuf::`anonymous namespace'::FieldValuePrinterWrapper::PrintMessageEnd(
google::protobuf::_anonymous_namespace_::FieldValuePrinterWrapper *this,
const google::protobuf::Message *a2,
unsigned int a3,
unsigned int a4,
unsigned int a5,
google::protobuf::TextFormat::BaseTextGenerator *a6)
{
void *v7[2]; // [rsp+8h] [rbp-30h] BYREF
char v8; // [rsp+18h] [rbp-20h] BYREF
(*(void ( **)(void **, _QWORD, const google::protobuf::Message *, _QWORD, _QWORD, _QWORD))(**((_QWORD **)this + 1) + 112LL))(
v7,
*((_QWORD *)this + 1),
a2,
a3,
a4,
a5);
(*(void ( **)(google::protobuf::TextFormat::BaseTextGenerator *, void *, void *))(*(_QWORD *)a6 + 40LL))(
a6,
v7[0],
v7[1]);
if ( v7[0] != &v8 )
operator delete(v7[0]);
}
|
PrintMessageEnd:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,R9
MOV R9D,R8D
MOV R8D,ECX
MOV ECX,EDX
MOV RDX,RSI
MOV RSI,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RSI]
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL qword ptr [RAX + 0x70]
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RBX]
LAB_00180475:
MOV RDI,RBX
CALL qword ptr [RAX + 0x28]
LAB_0018047b:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0018048e
CALL 0x0010f330
LAB_0018048e:
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* google::protobuf::(anonymous
namespace)::FieldValuePrinterWrapper::PrintMessageEnd(google::protobuf::Message const&, int, int,
bool, google::protobuf::TextFormat::BaseTextGenerator*) const */
void __thiscall
google::protobuf::(anonymous_namespace)::FieldValuePrinterWrapper::PrintMessageEnd
(FieldValuePrinterWrapper *this,Message *param_1,int param_2,int param_3,bool param_4,
BaseTextGenerator *param_5)
{
int7 in_register_00000081;
int1 *local_30;
int8 local_28;
int1 local_20 [16];
(**(code **)(**(long **)(this + 8) + 0x70))
(&local_30,*(long **)(this + 8),param_1,param_2,param_3,
CONCAT71(in_register_00000081,param_4) & 0xffffffff);
/* try { // try from 00180475 to 0018047a has its CatchHandler @ 00180496 */
(**(code **)(*(long *)param_5 + 0x28))(param_5,local_30,local_28);
if (local_30 != local_20) {
operator_delete(local_30);
}
return;
}
|
|
10,568 |
js_set_isDisjointFrom
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_set_isDisjointFrom(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue item, iter, keys, has, next, rv, rval;
BOOL done, found;
JSMapState *s;
int64_t size;
int ok;
has = JS_UNDEFINED;
iter = JS_UNDEFINED;
keys = JS_UNDEFINED;
next = JS_UNDEFINED;
rval = JS_EXCEPTION;
s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET);
if (!s)
goto exception;
// order matters!
if (js_setlike_get_size(ctx, argv[0], &size) < 0)
goto exception;
if (js_setlike_get_has(ctx, argv[0], &has) < 0)
goto exception;
if (js_setlike_get_keys(ctx, argv[0], &keys) < 0)
goto exception;
if (s->record_count > size) {
iter = JS_Call(ctx, keys, argv[0], 0, NULL);
if (JS_IsException(iter))
goto exception;
next = JS_GetProperty(ctx, iter, JS_ATOM_next);
if (JS_IsException(next))
goto exception;
found = FALSE;
do {
item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
break;
item = map_normalize_key(ctx, item);
found = (NULL != map_find_record(ctx, s, item));
JS_FreeValue(ctx, item);
} while (!found);
} else {
iter = js_create_map_iterator(ctx, this_val, 0, NULL, MAGIC_SET);
if (JS_IsException(iter))
goto exception;
found = FALSE;
do {
item = js_map_iterator_next(ctx, iter, 0, NULL, &done, MAGIC_SET);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
break;
rv = JS_Call(ctx, has, argv[0], 1, &item);
JS_FreeValue(ctx, item);
ok = JS_ToBoolFree(ctx, rv); // returns -1 if rv is JS_EXCEPTION
if (ok < 0)
goto exception;
found = (ok > 0);
} while (!found);
}
rval = !found ? JS_TRUE : JS_FALSE;
exception:
JS_FreeValue(ctx, has);
JS_FreeValue(ctx, keys);
JS_FreeValue(ctx, iter);
JS_FreeValue(ctx, next);
return rval;
}
|
O1
|
c
|
js_set_isDisjointFrom:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r8, %r13
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %rbx
xorl %r12d, %r12d
movl %r12d, 0x58(%rsp)
movl $0x3, %ecx
movq %rcx, 0x60(%rsp)
movl %r12d, 0x68(%rsp)
movl $0x3, %eax
movq %rax, 0x40(%rsp)
movq %rcx, 0x70(%rsp)
movl $0x24, %ecx
callq 0x275b5
testq %rax, %rax
je 0x5027a
movq %rax, %r15
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0x90(%rsp), %rcx
movq %rbx, %rdi
callq 0x51de9
testl %eax, %eax
js 0x50277
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0x58(%rsp), %rcx
movq %rbx, %rdi
callq 0x51ebd
testl %eax, %eax
js 0x50277
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0x68(%rsp), %rcx
movq %rbx, %rdi
callq 0x51f57
testl %eax, %eax
js 0x50277
movl 0x18(%r15), %eax
cmpq %rax, 0x90(%rsp)
jge 0x502e9
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq (%r13), %rcx
movq 0x8(%r13), %r8
movl $0x0, 0x78(%rsp)
movq $0x3, 0x80(%rsp)
movups 0x78(%rsp), %xmm0
movups %xmm0, (%rsp)
movl $0x2, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0x284ca
movq %rax, %rbp
cmpl $0x6, %edx
movl $0x6, %r14d
jne 0x50410
xorl %r13d, %r13d
movq %rdx, %r15
jmp 0x5028b
xorl %r12d, %r12d
xorl %ebp, %ebp
movl $0x3, %r15d
xorl %r13d, %r13d
movl $0x6, %r14d
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq 0x40(%rsp), %rdx
callq 0x1d8c6
movq %r13, %rax
movq %r14, %rdx
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movl $0x1, %r9d
callq 0x4ffa9
movq %rax, %rbp
movq %rdx, %r15
xorl %r12d, %r12d
cmpl $0x6, %r15d
je 0x50282
movq %rbp, 0x30(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x88(%rsp)
xorl %ebp, %ebp
movl $0x1, (%rsp)
movq %rbx, %rdi
movq 0x30(%rsp), %rsi
movq %r15, %rdx
leaq 0x3c(%rsp), %r9
callq 0x51ff1
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
cmpl $0x6, %edx
je 0x5050d
cmpl $0x0, 0x3c(%rsp)
jne 0x50401
movq %r15, %r12
movq (%r13), %rcx
movq 0x8(%r13), %r8
movl $0x0, 0x78(%rsp)
movq $0x3, 0x80(%rsp)
movups 0x78(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
movq 0x88(%rsp), %rdx
movl $0x1, %r9d
callq 0x284ca
movq %rax, %r14
movq %rdx, %r15
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x22d0d
testl %eax, %eax
js 0x50520
setne %al
movzbl %al, %ebp
movq %r12, %r15
movl $0x0, %r12d
je 0x5032e
movl $0x3, %eax
movq %rax, 0x40(%rsp)
jmp 0x504fc
movl $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
movl $0x6b, %ecx
movq %rbp, %r8
movq %rdx, 0x28(%rsp)
movq %rdx, %r9
callq 0x22fa3
movq %rax, %r12
xorl %r13d, %r13d
movq %rdx, 0x40(%rsp)
cmpl $0x6, %edx
je 0x5054e
movq %rbp, 0x30(%rsp)
xorl %ebp, %ebp
leaq 0x3c(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, (%rsp)
movq %rbx, %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %r12, %rcx
movq 0x40(%rsp), %r8
xorl %r9d, %r9d
callq 0x41afc
movq %rdx, %rcx
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movl %ecx, %edx
cmpq $0x6, %rdx
je 0x50543
cmpl $0x0, 0x3c(%rsp)
jne 0x504f7
xorq $0x7, %rdx
movq %rax, %rsi
btrq $0x3f, %rsi
orq %rdx, %rsi
jne 0x504ba
xorl %eax, %eax
xorl %ecx, %ecx
movq %rax, 0x48(%rsp)
movq %rcx, 0x50(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x4748d
movq %rax, %r14
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
xorl %ebp, %ebp
testq %r14, %r14
setne %bpl
je 0x50456
movq 0x28(%rsp), %r15
xorl %r13d, %r13d
testl %ebp, %ebp
sete %r13b
movl $0x1, %r14d
jmp 0x50516
xorl %r13d, %r13d
movl $0x6, %r14d
movq 0x30(%rsp), %rbp
jmp 0x5028b
movl $0x3, %eax
movq %rax, 0x40(%rsp)
xorl %r13d, %r13d
movl $0x6, %r14d
movq 0x30(%rsp), %rbp
movq %r12, %r15
xorl %r12d, %r12d
jmp 0x5028b
movl $0x6, %r14d
movq 0x30(%rsp), %rbp
movq 0x28(%rsp), %r15
jmp 0x5028b
|
js_set_isDisjointFrom:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r13, r8
mov rbp, rdx
mov r14, rsi
mov rbx, rdi
xor r12d, r12d
mov dword ptr [rsp+0C8h+var_70], r12d
mov ecx, 3
mov [rsp+0C8h+var_68], rcx
mov dword ptr [rsp+0C8h+var_60], r12d
mov eax, 3
mov [rsp+0C8h+var_88], rax
mov [rsp+0C8h+var_58], rcx
mov ecx, 24h ; '$'
call JS_GetOpaque2
test rax, rax
jz loc_5027A
mov r15, rax
mov rsi, [r13+0]
mov rdx, [r13+8]
lea rcx, [rsp+0C8h+var_38]
mov rdi, rbx
call js_setlike_get_size
test eax, eax
js loc_50277
mov rsi, [r13+0]
mov rdx, [r13+8]
lea rcx, [rsp+0C8h+var_70]
mov rdi, rbx
call js_setlike_get_has
test eax, eax
js loc_50277
mov rsi, [r13+0]
mov rdx, [r13+8]
lea rcx, [rsp+0C8h+var_60]
mov rdi, rbx
call js_setlike_get_keys
test eax, eax
js short loc_50277
mov eax, [r15+18h]
cmp [rsp+0C8h+var_38], rax
jge loc_502E9
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_58]
mov rcx, [r13+0]
mov r8, [r13+8]
mov dword ptr [rsp+0C8h+var_50], 0
mov qword ptr [rsp+0C8h+var_50+8], 3
movups xmm0, [rsp+0C8h+var_50]
movups [rsp+0C8h+var_C8], xmm0
mov [rsp+0C8h+var_B0], 2
mov [rsp+0C8h+var_B8], 0
xor r12d, r12d
mov rdi, rbx
xor r9d, r9d
call JS_CallInternal
mov rbp, rax
cmp edx, 6
mov r14d, 6
jnz loc_50410
xor r13d, r13d
mov r15, rdx
jmp short loc_5028B
loc_50277:
xor r12d, r12d
loc_5027A:
xor ebp, ebp
mov r15d, 3
loc_50282:
xor r13d, r13d
mov r14d, 6
loc_5028B:
mov rsi, [rsp+0C8h+var_70]
mov rdx, [rsp+0C8h+var_68]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_58]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, rbp
mov rdx, r15
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, r12
mov rdx, [rsp+0C8h+var_88]
call JS_FreeValueRT
mov rax, r13
mov rdx, r14
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_502E9:
mov rdi, rbx
mov rsi, r14
mov rdx, rbp
mov r9d, 1
call js_create_map_iterator
mov rbp, rax
mov r15, rdx
xor r12d, r12d
cmp r15d, 6
jz loc_50282
mov [rsp+0C8h+var_98], rbp
mov rax, [rsp+0C8h+var_70]
mov [rsp+0C8h+var_A0], rax
mov rax, [rsp+0C8h+var_68]
mov [rsp+0C8h+var_40], rax
xor ebp, ebp
loc_5032E:
mov dword ptr [rsp+0C8h+var_C8], 1
mov rdi, rbx
mov rsi, [rsp+0C8h+var_98]
mov rdx, r15
lea r9, [rsp+0C8h+var_8C]
call js_map_iterator_next
mov [rsp+0C8h+var_80], rax
mov [rsp+0C8h+var_78], rdx
cmp edx, 6
jz loc_5050D
cmp [rsp+0C8h+var_8C], 0
jnz loc_50401
mov r12, r15
mov rcx, [r13+0]
mov r8, [r13+8]
mov dword ptr [rsp+0C8h+var_50], 0
mov qword ptr [rsp+0C8h+var_50+8], 3
movups xmm0, [rsp+0C8h+var_50]
movups [rsp+0C8h+var_C8], xmm0
lea rax, [rsp+0C8h+var_80]
mov [rsp+0C8h+var_B8], rax
mov [rsp+0C8h+var_B0], 2
mov rdi, rbx
mov rsi, [rsp+0C8h+var_A0]
mov rdx, [rsp+0C8h+var_40]
mov r9d, 1
call JS_CallInternal
mov r14, rax
mov r15, rdx
mov rsi, [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_78]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_ToBoolFree
test eax, eax
js loc_50520
setnz al
movzx ebp, al
mov r15, r12
mov r12d, 0
jz loc_5032E
loc_50401:
mov eax, 3
mov [rsp+0C8h+var_88], rax
jmp loc_504FC
loc_50410:
mov dword ptr [rsp+0C8h+var_C8+8], 0
mov qword ptr [rsp+0C8h+var_C8], 0
mov rdi, rbx
mov rsi, rbp
mov ecx, 6Bh ; 'k'
mov r8, rbp
mov [rsp+0C8h+var_A0], rdx
mov r9, rdx
call JS_GetPropertyInternal2
mov r12, rax
xor r13d, r13d
mov [rsp+0C8h+var_88], rdx
cmp edx, 6
jz loc_5054E
mov [rsp+0C8h+var_98], rbp
xor ebp, ebp
loc_50456:
lea rax, [rsp+0C8h+var_8C]
mov qword ptr [rsp+0C8h+var_C8+8], rax
mov qword ptr [rsp+0C8h+var_C8], 0
mov rdi, rbx
mov rsi, [rsp+0C8h+var_98]
mov rdx, [rsp+0C8h+var_A0]
mov rcx, r12
mov r8, [rsp+0C8h+var_88]
xor r9d, r9d
call JS_IteratorNext
mov rcx, rdx
mov [rsp+0C8h+var_80], rax
mov [rsp+0C8h+var_78], rdx
mov edx, ecx
cmp rdx, 6
jz loc_50543
cmp [rsp+0C8h+var_8C], 0
jnz short loc_504F7
xor rdx, 7
mov rsi, rax
btr rsi, 3Fh ; '?'
or rsi, rdx
jnz short loc_504BA
xor eax, eax
xor ecx, ecx
loc_504BA:
mov [rsp+0C8h+var_80], rax
mov [rsp+0C8h+var_78], rcx
mov rdi, rbx
mov rsi, r15
mov rdx, rax
call map_find_record
mov r14, rax
mov rsi, [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_78]
mov rdi, [rbx+18h]
call JS_FreeValueRT
xor ebp, ebp
test r14, r14
setnz bpl
jz loc_50456
loc_504F7:
mov r15, [rsp+0C8h+var_A0]
loc_504FC:
xor r13d, r13d
test ebp, ebp
setz r13b
mov r14d, 1
jmp short loc_50516
loc_5050D:
xor r13d, r13d
mov r14d, 6
loc_50516:
mov rbp, [rsp+0C8h+var_98]
jmp loc_5028B
loc_50520:
mov eax, 3
mov [rsp+0C8h+var_88], rax
xor r13d, r13d
mov r14d, 6
mov rbp, [rsp+0C8h+var_98]
mov r15, r12
xor r12d, r12d
jmp loc_5028B
loc_50543:
mov r14d, 6
mov rbp, [rsp+0C8h+var_98]
loc_5054E:
mov r15, [rsp+0C8h+var_A0]
jmp loc_5028B
|
_BOOL8 js_set_isDisjointFrom(
long long a1,
_DWORD *a2,
long long a3,
double a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
long long *a13)
{
_DWORD *PropertyInternal2; // r12
long long Opaque2; // rax
long long v17; // r15
long long v18; // rcx
long long v19; // r8
__m128 v20; // xmm4
__m128 v21; // xmm5
long long v22; // rcx
long long v23; // r8
double v24; // xmm0_8
unsigned long long v25; // rax
long long v26; // rdx
_DWORD *v27; // rbp
_BOOL8 v28; // r13
long long v29; // r15
unsigned long long map_iterator; // rax
int v32; // ecx
int v33; // r8d
long long v34; // rdx
BOOL v35; // ebp
__m128 v36; // xmm4
__m128 v37; // xmm5
long long v38; // rdx
long long v39; // r12
long long v40; // rcx
long long v41; // r8
unsigned long long v42; // r14
long long v43; // rdx
long long v44; // r15
int v45; // eax
long long v46; // rdx
unsigned long long v47; // rax
long long v48; // rdx
long long v49; // rcx
long long record; // r14
_DWORD *v51; // [rsp+28h] [rbp-A0h]
long long v52; // [rsp+28h] [rbp-A0h]
_DWORD *v53; // [rsp+30h] [rbp-98h]
int v54; // [rsp+3Ch] [rbp-8Ch] BYREF
long long v55; // [rsp+40h] [rbp-88h]
_DWORD *v56; // [rsp+48h] [rbp-80h] BYREF
long long v57; // [rsp+50h] [rbp-78h]
_DWORD *v58; // [rsp+58h] [rbp-70h] BYREF
long long v59; // [rsp+60h] [rbp-68h]
_DWORD *v60; // [rsp+68h] [rbp-60h] BYREF
long long v61; // [rsp+70h] [rbp-58h]
__m128 v62; // [rsp+78h] [rbp-50h]
long long v63; // [rsp+88h] [rbp-40h]
long long v64[7]; // [rsp+90h] [rbp-38h] BYREF
PropertyInternal2 = 0LL;
LODWORD(v58) = 0;
v59 = 3LL;
LODWORD(v60) = 0;
v55 = 3LL;
v61 = 3LL;
Opaque2 = JS_GetOpaque2(a1, (long long)a2, a3, 0x24u);
if ( !Opaque2 )
goto LABEL_9;
v17 = Opaque2;
if ( (int)js_setlike_get_size(a1, *a13, a13[1], v64) < 0
|| (int)js_setlike_get_has(a1, *a13, a13[1], &v58) < 0
|| (int)js_setlike_get_keys(a1, *a13, a13[1], &v60) < 0 )
{
PropertyInternal2 = 0LL;
LABEL_9:
v27 = 0LL;
v29 = 3LL;
LABEL_10:
v28 = 0LL;
goto LABEL_11;
}
if ( v64[0] >= *(unsigned int *)(v17 + 24) )
{
map_iterator = js_create_map_iterator(a1, a2, a3, v18, v19, 1);
v27 = (_DWORD *)map_iterator;
v29 = v34;
PropertyInternal2 = 0LL;
if ( (_DWORD)v34 != 6 )
{
v53 = (_DWORD *)map_iterator;
v51 = v58;
v63 = v59;
v35 = 0;
while ( 1 )
{
v56 = (_DWORD *)js_map_iterator_next(a1, (_DWORD)v53, v29, v32, v33, (unsigned int)&v54, 1);
v57 = v38;
if ( (_DWORD)v38 == 6 )
break;
if ( v54 )
goto LABEL_18;
v39 = v29;
v40 = *a13;
v41 = a13[1];
v62.m128_i32[0] = 0;
v62.m128_u64[1] = 3LL;
v42 = JS_CallInternal(
a1,
(long long)v51,
v63,
v40,
v41,
1LL,
v62,
a5,
a6,
a7,
v36,
v37,
a10,
a11,
0,
3,
(long long)&v56,
2u);
v44 = v43;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v56, v57);
v45 = JS_ToBoolFree(a1, v42, v44);
if ( v45 < 0 )
{
v55 = 3LL;
v28 = 0LL;
v27 = v53;
v29 = v39;
PropertyInternal2 = 0LL;
goto LABEL_11;
}
v35 = v45 != 0;
v29 = v39;
PropertyInternal2 = 0LL;
if ( v45 )
{
LABEL_18:
v55 = 3LL;
LABEL_27:
v28 = !v35;
goto LABEL_29;
}
}
v28 = 0LL;
LABEL_29:
v27 = v53;
goto LABEL_11;
}
goto LABEL_10;
}
v22 = *a13;
v23 = a13[1];
v62.m128_i32[0] = 0;
v62.m128_u64[1] = 3LL;
v24 = *(double *)v62.m128_u64;
PropertyInternal2 = 0LL;
v25 = JS_CallInternal(a1, (long long)v60, v61, v22, v23, 0LL, v62, a5, a6, a7, v20, v21, a10, a11, 0, 3, 0LL, 2u);
v27 = (_DWORD *)v25;
if ( (_DWORD)v26 == 6 )
{
v28 = 0LL;
v29 = v26;
}
else
{
v52 = v26;
PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2(a1, v25, v26, 0x6Bu, v25, v26, 0LL, 0);
v28 = 0LL;
v55 = v46;
if ( (_DWORD)v46 != 6 )
{
v53 = v27;
v35 = 0;
while ( 1 )
{
v47 = JS_IteratorNext(a1, (int)v53, v52, (int)PropertyInternal2, v55, 0, 0LL, &v54);
v49 = v48;
v56 = (_DWORD *)v47;
v57 = v48;
if ( (unsigned int)v48 == 6LL )
break;
if ( !v54 )
{
if ( !((unsigned int)v48 ^ 7LL | v47 & 0x7FFFFFFFFFFFFFFFLL) )
{
v47 = 0LL;
v49 = 0LL;
}
v56 = (_DWORD *)v47;
v57 = v49;
record = map_find_record(a1, v17, (_DWORD *)v47, v49, v24, (__m128d)a5);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v56, v57);
v35 = record != 0;
if ( !record )
continue;
}
v29 = v52;
goto LABEL_27;
}
v27 = v53;
}
v29 = v52;
}
LABEL_11:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v58, v59);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v60, v61);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v27, v29);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), PropertyInternal2, v55);
return v28;
}
|
js_set_isDisjointFrom:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R13,R8
MOV RBP,RDX
MOV R14,RSI
MOV RBX,RDI
XOR R12D,R12D
MOV dword ptr [RSP + 0x58],R12D
MOV ECX,0x3
MOV qword ptr [RSP + 0x60],RCX
MOV dword ptr [RSP + 0x68],R12D
MOV EAX,0x3
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x70],RCX
MOV ECX,0x24
CALL 0x001275b5
TEST RAX,RAX
JZ 0x0015027a
MOV R15,RAX
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
LEA RCX,[RSP + 0x90]
MOV RDI,RBX
CALL 0x00151de9
TEST EAX,EAX
JS 0x00150277
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
LEA RCX,[RSP + 0x58]
MOV RDI,RBX
CALL 0x00151ebd
TEST EAX,EAX
JS 0x00150277
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
LEA RCX,[RSP + 0x68]
MOV RDI,RBX
CALL 0x00151f57
TEST EAX,EAX
JS 0x00150277
MOV EAX,dword ptr [R15 + 0x18]
CMP qword ptr [RSP + 0x90],RAX
JGE 0x001502e9
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
MOV RCX,qword ptr [R13]
MOV R8,qword ptr [R13 + 0x8]
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x78]
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x18],0x2
MOV qword ptr [RSP + 0x10],0x0
XOR R12D,R12D
MOV RDI,RBX
XOR R9D,R9D
CALL 0x001284ca
MOV RBP,RAX
CMP EDX,0x6
MOV R14D,0x6
JNZ 0x00150410
XOR R13D,R13D
MOV R15,RDX
JMP 0x0015028b
LAB_00150277:
XOR R12D,R12D
LAB_0015027a:
XOR EBP,EBP
MOV R15D,0x3
LAB_00150282:
XOR R13D,R13D
MOV R14D,0x6
LAB_0015028b:
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011d8c6
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011d8c6
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,RBP
MOV RDX,R15
CALL 0x0011d8c6
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R12
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x0011d8c6
MOV RAX,R13
MOV RDX,R14
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001502e9:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RBP
MOV R9D,0x1
CALL 0x0014ffa9
MOV RBP,RAX
MOV R15,RDX
XOR R12D,R12D
CMP R15D,0x6
JZ 0x00150282
MOV qword ptr [RSP + 0x30],RBP
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x88],RAX
XOR EBP,EBP
LAB_0015032e:
MOV dword ptr [RSP],0x1
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,R15
LEA R9,[RSP + 0x3c]
CALL 0x00151ff1
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
CMP EDX,0x6
JZ 0x0015050d
CMP dword ptr [RSP + 0x3c],0x0
JNZ 0x00150401
MOV R12,R15
MOV RCX,qword ptr [R13]
MOV R8,qword ptr [R13 + 0x8]
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x78]
MOVUPS xmmword ptr [RSP],XMM0
LEA RAX,[RSP + 0x48]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0x2
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x88]
MOV R9D,0x1
CALL 0x001284ca
MOV R14,RAX
MOV R15,RDX
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011d8c6
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x00122d0d
TEST EAX,EAX
JS 0x00150520
SETNZ AL
MOVZX EBP,AL
MOV R15,R12
MOV R12D,0x0
JZ 0x0015032e
LAB_00150401:
MOV EAX,0x3
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001504fc
LAB_00150410:
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP],0x0
MOV RDI,RBX
MOV RSI,RBP
MOV ECX,0x6b
MOV R8,RBP
MOV qword ptr [RSP + 0x28],RDX
MOV R9,RDX
CALL 0x00122fa3
MOV R12,RAX
XOR R13D,R13D
MOV qword ptr [RSP + 0x40],RDX
CMP EDX,0x6
JZ 0x0015054e
MOV qword ptr [RSP + 0x30],RBP
XOR EBP,EBP
LAB_00150456:
LEA RAX,[RSP + 0x3c]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP],0x0
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x28]
MOV RCX,R12
MOV R8,qword ptr [RSP + 0x40]
XOR R9D,R9D
CALL 0x00141afc
MOV RCX,RDX
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
MOV EDX,ECX
CMP RDX,0x6
JZ 0x00150543
CMP dword ptr [RSP + 0x3c],0x0
JNZ 0x001504f7
XOR RDX,0x7
MOV RSI,RAX
BTR RSI,0x3f
OR RSI,RDX
JNZ 0x001504ba
XOR EAX,EAX
XOR ECX,ECX
LAB_001504ba:
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RCX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,RAX
CALL 0x0014748d
MOV R14,RAX
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011d8c6
XOR EBP,EBP
TEST R14,R14
SETNZ BPL
JZ 0x00150456
LAB_001504f7:
MOV R15,qword ptr [RSP + 0x28]
LAB_001504fc:
XOR R13D,R13D
TEST EBP,EBP
SETZ R13B
MOV R14D,0x1
JMP 0x00150516
LAB_0015050d:
XOR R13D,R13D
MOV R14D,0x6
LAB_00150516:
MOV RBP,qword ptr [RSP + 0x30]
JMP 0x0015028b
LAB_00150520:
MOV EAX,0x3
MOV qword ptr [RSP + 0x40],RAX
XOR R13D,R13D
MOV R14D,0x6
MOV RBP,qword ptr [RSP + 0x30]
MOV R15,R12
XOR R12D,R12D
JMP 0x0015028b
LAB_00150543:
MOV R14D,0x6
MOV RBP,qword ptr [RSP + 0x30]
LAB_0015054e:
MOV R15,qword ptr [RSP + 0x28]
JMP 0x0015028b
|
bool js_set_isDisjointFrom
(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
bool bVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
int iVar5;
long lVar6;
int8 uVar7;
long lVar8;
int8 uVar9;
ulong uVar10;
int8 uVar11;
bool bVar12;
int1 auVar13 [16];
int1 auVar14 [16];
int1 auVar15 [16];
int local_8c;
ulong local_88;
int1 local_80 [16];
int4 local_70;
int4 uStack_6c;
int8 local_68;
int4 local_60;
int4 uStack_5c;
int8 local_58;
int4 local_50;
uint uStack_4c;
int8 uStack_48;
int8 local_40;
long local_38;
local_70 = 0;
local_68 = 3;
local_60 = 0;
local_88 = 3;
local_58 = 3;
lVar6 = JS_GetOpaque2();
if ((((lVar6 == 0) ||
(iVar5 = js_setlike_get_size(param_1,*param_5,param_5[1],&local_38), iVar5 < 0)) ||
(iVar5 = js_setlike_get_has(param_1,*param_5,param_5[1],&local_70), iVar5 < 0)) ||
(iVar5 = js_setlike_get_keys(param_1,*param_5,param_5[1],&local_60), iVar5 < 0)) {
auVar13 = ZEXT816(3) << 0x40;
LAB_00150282:
auVar15._8_8_ = local_80._8_8_;
auVar15._0_8_ = local_80._0_8_;
auVar3._8_8_ = 0;
auVar3._0_8_ = local_88;
auVar14 = auVar3 << 0x40;
bVar12 = false;
}
else {
if (local_38 < (long)(ulong)*(uint *)(lVar6 + 0x18)) {
local_50 = 0;
uStack_48 = 3;
uVar10 = 0;
auVar13 = JS_CallInternal(param_1,CONCAT44(uStack_5c,local_60),local_58,*param_5,param_5[1],0,
(ulong)uStack_4c << 0x20,3,0,2);
auVar2._8_8_ = 0;
auVar2._0_8_ = local_88;
auVar14 = auVar2 << 0x40;
auVar15._8_8_ = local_80._8_8_;
auVar15._0_8_ = local_80._0_8_;
uVar9 = auVar13._8_8_;
uVar7 = auVar13._0_8_;
if (auVar13._8_4_ == 6) {
bVar12 = false;
goto LAB_0015028b;
}
auVar14 = JS_GetPropertyInternal2
(param_1,uVar7,uVar9,0x6b,uVar7,uVar9,0,uVar10 & 0xffffffff00000000);
auVar15._8_8_ = local_80._8_8_;
auVar15._0_8_ = local_80._0_8_;
local_88 = auVar14._8_8_;
uVar11 = auVar14._0_8_;
bVar12 = false;
if (auVar14._8_4_ == 6) goto LAB_0015028b;
bVar1 = false;
local_80 = auVar15;
do {
auVar15 = JS_IteratorNext(param_1,uVar7,uVar9,uVar11,local_88,0,0,&local_8c);
auVar14._8_8_ = local_88;
auVar14._0_8_ = uVar11;
uVar10 = auVar15._8_8_ & 0xffffffff;
if (uVar10 == 6) goto LAB_0015028b;
if (local_8c != 0) break;
if ((auVar15 & (int1 [16])0x7fffffffffffffff) == (int1 [16])0x0 && uVar10 == 7
) {
auVar15 = ZEXT816(0);
}
local_80 = auVar15;
lVar8 = map_find_record(param_1,lVar6,auVar15._0_8_);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_80._0_8_,local_80._8_8_);
bVar1 = lVar8 != 0;
auVar15 = local_80;
} while (lVar8 == 0);
}
else {
auVar13 = js_create_map_iterator(param_1,param_2,param_3);
if (auVar13._8_4_ == 6) goto LAB_00150282;
uVar7 = CONCAT44(uStack_6c,local_70);
local_40 = local_68;
bVar1 = false;
do {
auVar15 = js_map_iterator_next(param_1,auVar13._0_8_,auVar13._8_8_);
auVar4._8_8_ = 0;
auVar4._0_8_ = local_88;
auVar14 = auVar4 << 0x40;
if (auVar15._8_4_ == 6) {
bVar12 = false;
goto LAB_0015028b;
}
local_80 = auVar15;
if (local_8c != 0) break;
local_50 = 0;
uStack_48 = 3;
auVar15 = JS_CallInternal(param_1,uVar7,local_40,*param_5,param_5[1],1,
(ulong)uStack_4c << 0x20,3,local_80,2);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_80._0_8_,local_80._8_8_);
iVar5 = JS_ToBoolFree(param_1,auVar15._0_8_,auVar15._8_8_);
if (iVar5 < 0) {
bVar12 = false;
auVar14 = ZEXT816(3) << 0x40;
auVar15 = local_80;
goto LAB_0015028b;
}
bVar1 = iVar5 != 0;
} while (iVar5 == 0);
uVar11 = 0;
local_88 = 3;
auVar15 = local_80;
}
auVar14._8_8_ = local_88;
auVar14._0_8_ = uVar11;
bVar12 = !bVar1;
}
LAB_0015028b:
local_88 = auVar14._8_8_;
local_80 = auVar15;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),CONCAT44(uStack_6c,local_70),local_68);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),CONCAT44(uStack_5c,local_60),local_58);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar13._0_8_,auVar13._8_8_);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar14._0_8_,local_88);
return bVar12;
}
|
|
10,569 |
js_set_isDisjointFrom
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_set_isDisjointFrom(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue item, iter, keys, has, next, rv, rval;
BOOL done, found;
JSMapState *s;
int64_t size;
int ok;
has = JS_UNDEFINED;
iter = JS_UNDEFINED;
keys = JS_UNDEFINED;
next = JS_UNDEFINED;
rval = JS_EXCEPTION;
s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET);
if (!s)
goto exception;
// order matters!
if (js_setlike_get_size(ctx, argv[0], &size) < 0)
goto exception;
if (js_setlike_get_has(ctx, argv[0], &has) < 0)
goto exception;
if (js_setlike_get_keys(ctx, argv[0], &keys) < 0)
goto exception;
if (s->record_count > size) {
iter = JS_Call(ctx, keys, argv[0], 0, NULL);
if (JS_IsException(iter))
goto exception;
next = JS_GetProperty(ctx, iter, JS_ATOM_next);
if (JS_IsException(next))
goto exception;
found = FALSE;
do {
item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
break;
item = map_normalize_key(ctx, item);
found = (NULL != map_find_record(ctx, s, item));
JS_FreeValue(ctx, item);
} while (!found);
} else {
iter = js_create_map_iterator(ctx, this_val, 0, NULL, MAGIC_SET);
if (JS_IsException(iter))
goto exception;
found = FALSE;
do {
item = js_map_iterator_next(ctx, iter, 0, NULL, &done, MAGIC_SET);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
break;
rv = JS_Call(ctx, has, argv[0], 1, &item);
JS_FreeValue(ctx, item);
ok = JS_ToBoolFree(ctx, rv); // returns -1 if rv is JS_EXCEPTION
if (ok < 0)
goto exception;
found = (ok > 0);
} while (!found);
}
rval = !found ? JS_TRUE : JS_FALSE;
exception:
JS_FreeValue(ctx, has);
JS_FreeValue(ctx, keys);
JS_FreeValue(ctx, iter);
JS_FreeValue(ctx, next);
return rval;
}
|
O2
|
c
|
js_set_isDisjointFrom:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r12
movq %rdx, %r13
andl $0x0, 0x40(%rsp)
movq %rsi, %rbp
movq %rdi, %rbx
pushq $0x3
popq %r14
movq %r14, 0x48(%rsp)
andl $0x0, 0x50(%rsp)
movq %r14, 0x58(%rsp)
pushq $0x24
popq %rcx
callq 0x21207
testq %rax, %rax
je 0x44de5
movq %rax, %r15
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq 0x60(%rsp), %rcx
movq %rbx, %rdi
callq 0x4643b
testl %eax, %eax
js 0x44de5
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq 0x40(%rsp), %rcx
movq %rbx, %rdi
callq 0x464cf
testl %eax, %eax
js 0x44de5
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq 0x50(%rsp), %rcx
movq %rbx, %rdi
callq 0x46558
testl %eax, %eax
js 0x44de5
movl 0x18(%r15), %eax
cmpq %rax, 0x60(%rsp)
jge 0x44e52
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq (%r12), %rcx
movq 0x8(%r12), %r8
andq $0x0, (%rsp)
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0x21eb6
movq %rax, %r13
movq %rdx, %rbp
cmpl $0x6, %ebp
je 0x44e6f
pushq $0x6b
popq %rcx
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1b043
movq %rdx, %r14
cmpl $0x6, %r14d
movq %rax, 0x10(%rsp)
je 0x44df4
movq %rax, %r12
movq %r13, 0x38(%rsp)
movq %r14, 0x30(%rsp)
andq $0x0, (%rsp)
leaq 0x1c(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %rcx
movq %r14, %r8
xorl %r9d, %r9d
callq 0x398cc
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movl %edx, %ecx
cmpq $0x6, %rcx
je 0x44f42
cmpl $0x0, 0x1c(%rsp)
jne 0x44f4e
movq %rbp, %r14
xorq $0x7, %rcx
movq %rax, %rsi
btrq $0x3f, %rsi
orq %rcx, %rsi
movl $0x0, %r13d
movl $0x0, %ebp
je 0x44d97
movq %rax, %r13
movq %rdx, %rbp
movq %r13, 0x20(%rsp)
movq %rbp, 0x28(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0x3d80d
movq %rax, %r12
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1801e
testq %r12, %r12
movq 0x10(%rsp), %r12
movq 0x38(%rsp), %r13
movq %r14, %rbp
movq 0x30(%rsp), %r14
je 0x44d2b
pushq $0x1
jmp 0x44f44
movq $0x0, 0x10(%rsp)
xorl %r13d, %r13d
movq %r14, %rbp
xorl %r12d, %r12d
pushq $0x6
popq %r15
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %rbx, %rdi
callq 0x1801e
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq %rbx, %rdi
callq 0x1801e
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1801e
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x1801e
movq %r12, %rax
movq %r15, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x44ab2
movq %rax, %r13
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x44e7d
movq $0x0, 0x10(%rsp)
jmp 0x44df4
movq 0x40(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x30(%rsp)
movl $0x1, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
leaq 0x1c(%rsp), %r9
callq 0x465e1
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
cmpl $0x6, %edx
je 0x44f24
cmpl $0x0, 0x1c(%rsp)
jne 0x44f2d
movq (%r12), %rcx
movq 0x8(%r12), %r8
leaq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
pushq $0x1
popq %r9
callq 0x21eb6
movq %rax, %r15
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x1801e
movq %rbx, %rdi
movq %r15, %rsi
movq 0x10(%rsp), %rdx
callq 0x1cdfa
testl %eax, %eax
js 0x44f24
je 0x44e91
xorl %r12d, %r12d
pushq $0x1
jmp 0x44f29
xorl %r12d, %r12d
pushq $0x6
popq %r15
jmp 0x44f34
pushq $0x1
popq %r15
movq %r15, %r12
movq $0x0, 0x10(%rsp)
jmp 0x44dfb
pushq $0x6
popq %r15
xorl %r12d, %r12d
jmp 0x44dfb
pushq $0x1
popq %r15
movq %r15, %r12
jmp 0x44dfb
|
js_set_isDisjointFrom:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12, r8
mov r13, rdx
and dword ptr [rsp+98h+var_58], 0
mov rbp, rsi
mov rbx, rdi
push 3
pop r14
mov [rsp+98h+var_50], r14
and dword ptr [rsp+98h+var_48], 0
mov [rsp+98h+var_40], r14
push 24h ; '$'
pop rcx
call JS_GetOpaque2
test rax, rax
jz loc_44DE5
mov r15, rax
mov rsi, [r12]
mov rdx, [r12+8]
lea rcx, [rsp+98h+var_38]
mov rdi, rbx
call js_setlike_get_size
test eax, eax
js loc_44DE5
mov rsi, [r12]
mov rdx, [r12+8]
lea rcx, [rsp+98h+var_58]
mov rdi, rbx
call js_setlike_get_has
test eax, eax
js loc_44DE5
mov rsi, [r12]
mov rdx, [r12+8]
lea rcx, [rsp+98h+var_48]
mov rdi, rbx
call js_setlike_get_keys
test eax, eax
js loc_44DE5
mov eax, [r15+18h]
cmp [rsp+98h+var_38], rax
jge loc_44E52
mov rsi, [rsp+98h+var_48]
mov rdx, [rsp+98h+var_40]
mov rcx, [r12]
mov r8, [r12+8]
and [rsp+98h+var_98], 0
mov rdi, rbx
xor r9d, r9d
call JS_Call
mov r13, rax
mov rbp, rdx
cmp ebp, 6
jz loc_44E6F
push 6Bh ; 'k'
pop rcx
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
call JS_GetProperty
mov r14, rdx
cmp r14d, 6
mov [rsp+98h+var_88], rax
jz loc_44DF4
mov r12, rax
mov [rsp+98h+var_60], r13
mov [rsp+98h+var_68], r14
loc_44D2B:
and [rsp+98h+var_98], 0
lea rax, [rsp+98h+var_7C]
mov [rsp+98h+var_90], rax
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
mov rcx, r12
mov r8, r14
xor r9d, r9d
call JS_IteratorNext
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_70], rdx
mov ecx, edx
cmp rcx, 6
jz loc_44F42
cmp [rsp+98h+var_7C], 0
jnz loc_44F4E
mov r14, rbp
xor rcx, 7
mov rsi, rax
btr rsi, 3Fh ; '?'
or rsi, rcx
mov r13d, 0
mov ebp, 0
jz short loc_44D97
mov r13, rax
mov rbp, rdx
loc_44D97:
mov [rsp+98h+var_78], r13
mov [rsp+98h+var_70], rbp
mov rdi, rbx
mov rsi, r15
mov rdx, r13
mov rcx, rbp
call map_find_record
mov r12, rax
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
call JS_FreeValue
test r12, r12
mov r12, [rsp+98h+var_88]
mov r13, [rsp+98h+var_60]
mov rbp, r14
mov r14, [rsp+98h+var_68]
jz loc_44D2B
push 1
jmp loc_44F44
loc_44DE5:
mov [rsp+98h+var_88], 0
xor r13d, r13d
mov rbp, r14
loc_44DF4:
xor r12d, r12d
push 6
pop r15
loc_44DFB:
mov rsi, [rsp+98h+var_58]
mov rdx, [rsp+98h+var_50]
mov rdi, rbx
call JS_FreeValue
mov rsi, [rsp+98h+var_48]
mov rdx, [rsp+98h+var_40]
mov rdi, rbx
call JS_FreeValue
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
call JS_FreeValue
mov rdi, rbx
mov rsi, [rsp+98h+var_88]
mov rdx, r14
call JS_FreeValue
mov rax, r12
mov rdx, r15
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_44E52:
push 1
pop r9
mov rdi, rbx
mov rsi, rbp
mov rdx, r13
call js_create_map_iterator
mov r13, rax
mov rbp, rdx
cmp ebp, 6
jnz short loc_44E7D
loc_44E6F:
mov [rsp+98h+var_88], 0
jmp loc_44DF4
loc_44E7D:
mov rax, [rsp+98h+var_58]
mov [rsp+98h+var_60], rax
mov rax, [rsp+98h+var_50]
mov [rsp+98h+var_68], rax
loc_44E91:
mov dword ptr [rsp+98h+var_98], 1
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
lea r9, [rsp+98h+var_7C]
call js_map_iterator_next
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_70], rdx
cmp edx, 6
jz short loc_44F24
cmp [rsp+98h+var_7C], 0
jnz short loc_44F2D
mov rcx, [r12]
mov r8, [r12+8]
lea rax, [rsp+98h+var_78]
mov [rsp+98h+var_98], rax
mov rdi, rbx
mov rsi, [rsp+98h+var_60]
mov rdx, [rsp+98h+var_68]
push 1
pop r9
call JS_Call
mov r15, rax
mov [rsp+98h+var_88], rdx
mov rsi, [rsp+98h+var_78]
mov rdx, [rsp+98h+var_70]
mov rdi, rbx
call JS_FreeValue
mov rdi, rbx
mov rsi, r15
mov rdx, [rsp+98h+var_88]
call JS_ToBoolFree
test eax, eax
js short loc_44F24
jz loc_44E91
xor r12d, r12d
push 1
jmp short loc_44F29
loc_44F24:
xor r12d, r12d
push 6
loc_44F29:
pop r15
jmp short loc_44F34
loc_44F2D:
push 1
pop r15
mov r12, r15
loc_44F34:
mov [rsp+98h+var_88], 0
jmp loc_44DFB
loc_44F42:
push 6
loc_44F44:
pop r15
xor r12d, r12d
jmp loc_44DFB
loc_44F4E:
push 1
pop r15
mov r12, r15
jmp loc_44DFB
|
long long js_set_isDisjointFrom(long long a1, _DWORD *a2, long long a3, __m128d a4, long long a5, _QWORD *a6)
{
long long v8; // r14
long long Opaque2; // rax
long long v10; // r15
long long v11; // rcx
long long v12; // r8
long long v13; // rax
long long v14; // rdx
unsigned long long map_iterator; // r13
long long v16; // rbp
long long Property; // rax
long long v18; // rdx
int v19; // r12d
unsigned long long v20; // rax
long long v21; // rdx
long long v22; // r14
_DWORD *v23; // r13
long long v24; // rbp
long long record; // r12
bool v26; // zf
long long v27; // r12
int v29; // ecx
int v30; // r8d
long long v31; // rdx
long long v32; // rdx
long long v33; // r15
long long v34; // rdx
int v35; // eax
long long v36; // [rsp+10h] [rbp-88h]
long long v37; // [rsp+10h] [rbp-88h]
int v38; // [rsp+1Ch] [rbp-7Ch] BYREF
_DWORD *v39; // [rsp+20h] [rbp-78h] BYREF
long long v40; // [rsp+28h] [rbp-70h]
long long v41; // [rsp+30h] [rbp-68h]
long long v42; // [rsp+38h] [rbp-60h]
long long v43; // [rsp+40h] [rbp-58h] BYREF
long long v44; // [rsp+48h] [rbp-50h]
long long v45; // [rsp+50h] [rbp-48h] BYREF
long long v46; // [rsp+58h] [rbp-40h]
long long v47[7]; // [rsp+60h] [rbp-38h] BYREF
LODWORD(v43) = 0;
v8 = 3LL;
v44 = 3LL;
LODWORD(v45) = 0;
v46 = 3LL;
Opaque2 = JS_GetOpaque2(a1, (long long)a2, a3, 0x24u);
if ( !Opaque2
|| (v10 = Opaque2, (int)js_setlike_get_size(a1, *a6, a6[1], v47) < 0)
|| (int)js_setlike_get_has(a1, *a6, a6[1], &v43) < 0
|| (int)js_setlike_get_keys(a1, *a6, a6[1], &v45) < 0 )
{
v36 = 0LL;
map_iterator = 0LL;
v16 = 3LL;
goto LABEL_16;
}
if ( v47[0] < *(unsigned int *)(v10 + 24) )
{
v13 = JS_Call(a1, v45, v46, *a6, a6[1], 0, 0LL);
map_iterator = v13;
v16 = v14;
if ( (_DWORD)v14 != 6 )
{
Property = JS_GetProperty(a1, v13, v14, 107);
v8 = v18;
v36 = Property;
if ( (_DWORD)v18 != 6 )
{
v19 = Property;
v42 = map_iterator;
v41 = v18;
while ( 1 )
{
v20 = JS_IteratorNext(a1, map_iterator, v16, v19, v8, 0, 0LL, &v38);
v39 = (_DWORD *)v20;
v40 = v21;
if ( (unsigned int)v21 == 6LL )
{
LABEL_29:
v27 = 0LL;
goto LABEL_17;
}
if ( v38 )
break;
v22 = v16;
v23 = 0LL;
v24 = 0LL;
if ( (unsigned int)v21 ^ 7LL | v20 & 0x7FFFFFFFFFFFFFFFLL )
{
v23 = (_DWORD *)v20;
v24 = v21;
}
v39 = v23;
v40 = v24;
record = map_find_record(a1, v10, v23, v24, a4);
JS_FreeValue(a1, (long long)v23, v24);
v26 = record == 0;
v19 = v36;
map_iterator = v42;
v16 = v22;
v8 = v41;
if ( !v26 )
goto LABEL_29;
}
v27 = 1LL;
goto LABEL_17;
}
LABEL_16:
v27 = 0LL;
goto LABEL_17;
}
LABEL_19:
v36 = 0LL;
goto LABEL_16;
}
map_iterator = js_create_map_iterator(a1, a2, a3, v11, v12, 1);
v16 = v31;
if ( (_DWORD)v31 == 6 )
goto LABEL_19;
v42 = v43;
v41 = v44;
while ( 1 )
{
v39 = (_DWORD *)js_map_iterator_next(a1, map_iterator, v16, v29, v30, (unsigned int)&v38, 1);
v40 = v32;
if ( (_DWORD)v32 == 6 )
{
LABEL_26:
v27 = 0LL;
goto LABEL_28;
}
if ( v38 )
break;
v33 = JS_Call(a1, v42, v41, *a6, a6[1], 1, (long long)&v39);
v37 = v34;
JS_FreeValue(a1, (long long)v39, v40);
v35 = JS_ToBoolFree(a1, v33, v37);
if ( v35 < 0 )
goto LABEL_26;
if ( v35 )
{
v27 = 0LL;
goto LABEL_28;
}
}
v27 = 1LL;
LABEL_28:
v36 = 0LL;
LABEL_17:
JS_FreeValue(a1, v43, v44);
JS_FreeValue(a1, v45, v46);
JS_FreeValue(a1, map_iterator, v16);
JS_FreeValue(a1, v36, v8);
return v27;
}
|
js_set_isDisjointFrom:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R12,R8
MOV R13,RDX
AND dword ptr [RSP + 0x40],0x0
MOV RBP,RSI
MOV RBX,RDI
PUSH 0x3
POP R14
MOV qword ptr [RSP + 0x48],R14
AND dword ptr [RSP + 0x50],0x0
MOV qword ptr [RSP + 0x58],R14
PUSH 0x24
POP RCX
CALL 0x00121207
TEST RAX,RAX
JZ 0x00144de5
MOV R15,RAX
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
LEA RCX,[RSP + 0x60]
MOV RDI,RBX
CALL 0x0014643b
TEST EAX,EAX
JS 0x00144de5
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
LEA RCX,[RSP + 0x40]
MOV RDI,RBX
CALL 0x001464cf
TEST EAX,EAX
JS 0x00144de5
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
LEA RCX,[RSP + 0x50]
MOV RDI,RBX
CALL 0x00146558
TEST EAX,EAX
JS 0x00144de5
MOV EAX,dword ptr [R15 + 0x18]
CMP qword ptr [RSP + 0x60],RAX
JGE 0x00144e52
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [R12]
MOV R8,qword ptr [R12 + 0x8]
AND qword ptr [RSP],0x0
MOV RDI,RBX
XOR R9D,R9D
CALL 0x00121eb6
MOV R13,RAX
MOV RBP,RDX
CMP EBP,0x6
JZ 0x00144e6f
PUSH 0x6b
POP RCX
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011b043
MOV R14,RDX
CMP R14D,0x6
MOV qword ptr [RSP + 0x10],RAX
JZ 0x00144df4
MOV R12,RAX
MOV qword ptr [RSP + 0x38],R13
MOV qword ptr [RSP + 0x30],R14
LAB_00144d2b:
AND qword ptr [RSP],0x0
LEA RAX,[RSP + 0x1c]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
MOV RCX,R12
MOV R8,R14
XOR R9D,R9D
CALL 0x001398cc
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV ECX,EDX
CMP RCX,0x6
JZ 0x00144f42
CMP dword ptr [RSP + 0x1c],0x0
JNZ 0x00144f4e
MOV R14,RBP
XOR RCX,0x7
MOV RSI,RAX
BTR RSI,0x3f
OR RSI,RCX
MOV R13D,0x0
MOV EBP,0x0
JZ 0x00144d97
MOV R13,RAX
MOV RBP,RDX
LAB_00144d97:
MOV qword ptr [RSP + 0x20],R13
MOV qword ptr [RSP + 0x28],RBP
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
MOV RCX,RBP
CALL 0x0013d80d
MOV R12,RAX
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011801e
TEST R12,R12
MOV R12,qword ptr [RSP + 0x10]
MOV R13,qword ptr [RSP + 0x38]
MOV RBP,R14
MOV R14,qword ptr [RSP + 0x30]
JZ 0x00144d2b
PUSH 0x1
JMP 0x00144f44
LAB_00144de5:
MOV qword ptr [RSP + 0x10],0x0
XOR R13D,R13D
MOV RBP,R14
LAB_00144df4:
XOR R12D,R12D
PUSH 0x6
POP R15
LAB_00144dfb:
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
MOV RDI,RBX
CALL 0x0011801e
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
MOV RDI,RBX
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,R14
CALL 0x0011801e
MOV RAX,R12
MOV RDX,R15
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00144e52:
PUSH 0x1
POP R9
MOV RDI,RBX
MOV RSI,RBP
MOV RDX,R13
CALL 0x00144ab2
MOV R13,RAX
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x00144e7d
LAB_00144e6f:
MOV qword ptr [RSP + 0x10],0x0
JMP 0x00144df4
LAB_00144e7d:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x30],RAX
LAB_00144e91:
MOV dword ptr [RSP],0x1
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
LEA R9,[RSP + 0x1c]
CALL 0x001465e1
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
CMP EDX,0x6
JZ 0x00144f24
CMP dword ptr [RSP + 0x1c],0x0
JNZ 0x00144f2d
MOV RCX,qword ptr [R12]
MOV R8,qword ptr [R12 + 0x8]
LEA RAX,[RSP + 0x20]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x30]
PUSH 0x1
POP R9
CALL 0x00121eb6
MOV R15,RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
MOV RDI,RBX
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,R15
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x0011cdfa
TEST EAX,EAX
JS 0x00144f24
JZ 0x00144e91
XOR R12D,R12D
PUSH 0x1
JMP 0x00144f29
LAB_00144f24:
XOR R12D,R12D
PUSH 0x6
LAB_00144f29:
POP R15
JMP 0x00144f34
LAB_00144f2d:
PUSH 0x1
POP R15
MOV R12,R15
LAB_00144f34:
MOV qword ptr [RSP + 0x10],0x0
JMP 0x00144dfb
LAB_00144f42:
PUSH 0x6
LAB_00144f44:
POP R15
XOR R12D,R12D
JMP 0x00144dfb
LAB_00144f4e:
PUSH 0x1
POP R15
MOV R12,R15
JMP 0x00144dfb
|
int1 [16]
js_set_isDisjointFrom
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
long lVar2;
long lVar4;
ulong uVar5;
int8 uVar6;
int8 uVar7;
int8 uVar8;
int1 auVar9 [16];
int1 auVar10 [16];
int1 auVar11 [16];
int1 auVar12 [16];
int8 uStackY_a0;
int8 local_88;
int local_7c;
int1 local_78 [16];
int8 local_68;
int8 local_60;
int4 local_58;
int4 uStack_54;
int8 local_50;
int4 local_48;
int4 uStack_44;
int8 local_40;
long local_38;
int8 uVar3;
local_58 = 0;
local_50 = 3;
local_48 = 0;
local_40 = 3;
lVar2 = JS_GetOpaque2();
if ((((lVar2 == 0) ||
(iVar1 = js_setlike_get_size(param_1,*param_5,param_5[1],&local_38), iVar1 < 0)) ||
(iVar1 = js_setlike_get_has(param_1,*param_5,param_5[1],&local_58), iVar1 < 0)) ||
(iVar1 = js_setlike_get_keys(param_1,*param_5,param_5[1],&local_48), iVar1 < 0)) {
auVar10 = ZEXT816(3) << 0x40;
auVar9 = ZEXT816(3) << 0x40;
}
else {
if (local_38 < (long)(ulong)*(uint *)(lVar2 + 0x18)) {
auVar9 = JS_Call(param_1,CONCAT44(uStack_44,local_48),local_40,*param_5,param_5[1],0,0);
uVar7 = auVar9._8_8_;
if (auVar9._8_4_ != 6) {
auVar10 = JS_GetProperty(param_1,auVar9._0_8_,uVar7,0x6b);
uVar3 = auVar10._0_8_;
uVar6 = auVar10._8_8_;
uVar8 = auVar9._0_8_;
if (auVar10._8_4_ != 6) {
do {
local_60 = uVar8;
local_68 = uVar6;
uVar8 = local_60;
uVar6 = local_68;
auVar10._8_8_ = local_68;
auVar10._0_8_ = uVar3;
auVar9._8_8_ = uVar7;
auVar9._0_8_ = local_60;
auVar11 = JS_IteratorNext(param_1,local_60,uVar7,uVar3,local_68,0,0,&local_7c);
uVar5 = auVar11._8_8_ & 0xffffffff;
if (uVar5 == 6) {
uStackY_a0 = 6;
goto LAB_00144f44;
}
if (local_7c != 0) {
uStackY_a0 = 1;
uVar6 = 1;
uVar7 = uStackY_a0;
goto LAB_00144dfb;
}
local_78 = ZEXT816(0);
if ((auVar11 & (int1 [16])0x7fffffffffffffff) != (int1 [16])0x0 ||
uVar5 != 7) {
local_78 = auVar11;
}
uVar6 = local_78._8_8_;
uVar8 = local_78._0_8_;
lVar4 = map_find_record(param_1,lVar2,uVar8,uVar6);
JS_FreeValue(param_1,uVar8,uVar6);
uVar6 = local_68;
uVar8 = local_60;
} while (lVar4 == 0);
uStackY_a0 = 1;
auVar11 = local_78;
LAB_00144f44:
auVar10._8_8_ = uVar6;
auVar9._0_8_ = uVar8;
uVar7 = 0;
uVar6 = uStackY_a0;
goto LAB_00144dfb;
}
goto LAB_00144df4;
}
}
else {
auVar9 = js_create_map_iterator(param_1,param_2,param_3);
if (auVar9._8_4_ != 6) {
local_60 = CONCAT44(uStack_54,local_58);
local_68 = local_50;
do {
auVar11 = js_map_iterator_next(param_1,auVar9._0_8_,auVar9._8_8_);
local_78 = auVar11;
if (auVar11._8_4_ == 6) {
LAB_00144f24:
uStackY_a0 = 6;
goto LAB_00144f29;
}
if (local_7c != 0) {
uVar7 = 1;
uVar6 = uVar7;
goto LAB_00144f34;
}
auVar10 = JS_Call(param_1,local_60,local_68,*param_5,param_5[1],1,local_78);
JS_FreeValue(param_1,local_78._0_8_,local_78._8_8_);
iVar1 = JS_ToBoolFree(param_1,auVar10._0_8_,auVar10._8_8_);
if (iVar1 < 0) goto LAB_00144f24;
} while (iVar1 == 0);
uStackY_a0 = 1;
LAB_00144f29:
uVar7 = 0;
uVar6 = uStackY_a0;
auVar11 = local_78;
LAB_00144f34:
auVar10 = ZEXT816(3) << 0x40;
goto LAB_00144dfb;
}
}
auVar10 = ZEXT816(3) << 0x40;
}
LAB_00144df4:
auVar11._8_8_ = local_78._8_8_;
auVar11._0_8_ = local_78._0_8_;
uVar7 = 0;
uVar6 = 6;
LAB_00144dfb:
local_88 = auVar10._0_8_;
local_78 = auVar11;
JS_FreeValue(param_1,CONCAT44(uStack_54,local_58),local_50);
JS_FreeValue(param_1,CONCAT44(uStack_44,local_48),local_40);
JS_FreeValue(param_1,auVar9._0_8_,auVar9._8_8_);
JS_FreeValue(param_1,local_88,auVar10._8_8_);
auVar12._8_8_ = uVar6;
auVar12._0_8_ = uVar7;
return auVar12;
}
|
|
10,570 |
test_rope::initialize_tensors(ggml_context*)
|
monkey531[P]llama/tests/test-backend-ops.cpp
|
void initialize_tensors(ggml_context * ctx) override {
for (ggml_tensor * t = ggml_get_first_tensor(ctx); t != NULL; t = ggml_get_next_tensor(ctx, t)) {
if (t->type == GGML_TYPE_I32) {
// pos
const int num_pos_ids = (mode & GGML_ROPE_TYPE_MROPE) ? ne_a[2] * 4 : ne_a[2];
std::vector<int> data(num_pos_ids);
for (int i = 0; i < num_pos_ids; i++) {
data[i] = rand() % n_ctx;
}
ggml_backend_tensor_set(t, data.data(), 0, num_pos_ids * sizeof(int));
} else {
if (t->ne[0] == n_dims/2) {
// frequency factors in the range [0.9f, 1.1f]
init_tensor_uniform(t, 0.9f, 1.1f);
} else {
init_tensor_uniform(t);
}
}
}
}
|
O1
|
cpp
|
test_rope::initialize_tensors(ggml_context*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0xd1f0
testq %rax, %rax
je 0x39196
movq %rax, %r15
cmpl $0x1a, (%r15)
jne 0x3913c
movb 0x64(%r14), %cl
movq 0x50(%r14), %rbp
shrb $0x2, %cl
andb $0x2, %cl
shlq %cl, %rbp
movslq %ebp, %r12
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
leaq 0xf(%rsp), %rdx
callq 0x1d110
testl %r12d, %r12d
jle 0x39109
movl %ebp, %r12d
andl $0x7fffffff, %r12d # imm = 0x7FFFFFFF
xorl %r13d, %r13d
callq 0xd140
cltd
idivl 0x68(%r14)
movq 0x10(%rsp), %rax
movl %edx, (%rax,%r13,4)
incq %r13
cmpq %r13, %r12
jne 0x390ee
shlq $0x20, %rbp
movq 0x10(%rsp), %rsi
sarq $0x1e, %rbp
movq %r15, %rdi
xorl %edx, %edx
movq %rbp, %rcx
callq 0xd350
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3917f
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xd5e0
jmp 0x3917f
movl 0x60(%r14), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movslq %ecx, %rax
cmpq %rax, 0x10(%r15)
jne 0x39167
movq %r15, %rdi
movss 0xbed7(%rip), %xmm0 # 0x45034
movss 0xbed3(%rip), %xmm1 # 0x45038
jmp 0x3917a
movq %r15, %rdi
movss 0xbeb6(%rip), %xmm0 # 0x45028
movss 0xbe8a(%rip), %xmm1 # 0x45004
callq 0x15e07
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd5d0
movq %rax, %r15
testq %rax, %rax
jne 0x390ac
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x391bf
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xd5e0
movq %rbx, %rdi
callq 0xdb00
nop
|
_ZN9test_rope18initialize_tensorsEP12ggml_context:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rsi
mov r14, rdi
mov rdi, rsi
call _ggml_get_first_tensor
test rax, rax
jz loc_39196
mov r15, rax
loc_390AC:
cmp dword ptr [r15], 1Ah
jnz loc_3913C
mov cl, [r14+64h]
mov rbp, [r14+50h]
shr cl, 2
and cl, 2
shl rbp, cl
movsxd r12, ebp
lea rdi, [rsp+58h+var_48]
mov rsi, r12
lea rdx, [rsp+58h+var_49]
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
test r12d, r12d
jle short loc_39109
mov r12d, ebp
and r12d, 7FFFFFFFh
xor r13d, r13d
loc_390EE:
call _rand
cdq
idiv dword ptr [r14+68h]
mov rax, [rsp+58h+var_48]
mov [rax+r13*4], edx
inc r13
cmp r12, r13
jnz short loc_390EE
loc_39109:
shl rbp, 20h
mov rsi, [rsp+58h+var_48]
sar rbp, 1Eh
mov rdi, r15
xor edx, edx
mov rcx, rbp
call _ggml_backend_tensor_set
mov rdi, [rsp+58h+var_48]; void *
test rdi, rdi
jz short loc_3917F
mov rsi, [rsp+58h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3917F
loc_3913C:
mov eax, [r14+60h]
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
movsxd rax, ecx
cmp [r15+10h], rax
jnz short loc_39167
mov rdi, r15
movss xmm0, cs:dword_45034
movss xmm1, cs:dword_45038
jmp short loc_3917A
loc_39167:
mov rdi, r15
movss xmm0, cs:dword_45028
movss xmm1, cs:dword_45004
loc_3917A:
call _ZL19init_tensor_uniformP11ggml_tensorff; init_tensor_uniform(ggml_tensor *,float,float)
loc_3917F:
mov rdi, rbx
mov rsi, r15
call _ggml_get_next_tensor
mov r15, rax
test rax, rax
jnz loc_390AC
loc_39196:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_391BF
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_391BF:
mov rdi, rbx
call __Unwind_Resume
|
long long test_rope::initialize_tensors(long long a1, long long a2)
{
long long result; // rax
long long v3; // r15
long long v4; // rbp
long long v5; // r13
float v6; // xmm0_4
float v7; // xmm1_4
void *v8[9]; // [rsp+10h] [rbp-48h] BYREF
result = ggml_get_first_tensor(a2);
if ( result )
{
v3 = result;
do
{
if ( *(_DWORD *)v3 == 26 )
{
v4 = *(_QWORD *)(a1 + 80) << ((*(_BYTE *)(a1 + 100) >> 2) & 2);
std::vector<int>::vector((long long)v8, (int)v4);
if ( (int)v4 > 0 )
{
v5 = 0LL;
do
*((_DWORD *)v8[0] + v5++) = (int)rand() % *(_DWORD *)(a1 + 104);
while ( (v4 & 0x7FFFFFFF) != v5 );
}
ggml_backend_tensor_set(v3, v8[0], 0LL, 4LL * (int)v4);
if ( v8[0] )
operator delete(v8[0], (char *)v8[2] - (char *)v8[0]);
}
else
{
if ( *(_QWORD *)(v3 + 16) == *(_DWORD *)(a1 + 96) / 2 )
{
v6 = 0.89999998;
v7 = 1.1;
}
else
{
v6 = -1.0;
v7 = 1.0;
}
init_tensor_uniform((unsigned int *)v3, v6, v7);
}
result = ggml_get_next_tensor(a2, v3);
v3 = result;
}
while ( result );
}
return result;
}
|
initialize_tensors:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x0010d1f0
TEST RAX,RAX
JZ 0x00139196
MOV R15,RAX
LAB_001390ac:
CMP dword ptr [R15],0x1a
JNZ 0x0013913c
MOV CL,byte ptr [R14 + 0x64]
MOV RBP,qword ptr [R14 + 0x50]
SHR CL,0x2
AND CL,0x2
SHL RBP,CL
MOVSXD R12,EBP
LEA RDI,[RSP + 0x10]
MOV RSI,R12
LEA RDX,[RSP + 0xf]
CALL 0x0011d110
TEST R12D,R12D
JLE 0x00139109
MOV R12D,EBP
AND R12D,0x7fffffff
XOR R13D,R13D
LAB_001390ee:
CALL 0x0010d140
CDQ
IDIV dword ptr [R14 + 0x68]
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + R13*0x4],EDX
INC R13
CMP R12,R13
JNZ 0x001390ee
LAB_00139109:
SHL RBP,0x20
MOV RSI,qword ptr [RSP + 0x10]
SAR RBP,0x1e
LAB_00139116:
MOV RDI,R15
XOR EDX,EDX
MOV RCX,RBP
CALL 0x0010d350
LAB_00139123:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x0013917f
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0010d5e0
JMP 0x0013917f
LAB_0013913c:
MOV EAX,dword ptr [R14 + 0x60]
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
MOVSXD RAX,ECX
CMP qword ptr [R15 + 0x10],RAX
JNZ 0x00139167
MOV RDI,R15
MOVSS XMM0,dword ptr [0x00145034]
MOVSS XMM1,dword ptr [0x00145038]
JMP 0x0013917a
LAB_00139167:
MOV RDI,R15
MOVSS XMM0,dword ptr [0x00145028]
MOVSS XMM1,dword ptr [0x00145004]
LAB_0013917a:
CALL 0x00115e07
LAB_0013917f:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0010d5d0
MOV R15,RAX
TEST RAX,RAX
JNZ 0x001390ac
LAB_00139196:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* test_rope::initialize_tensors(ggml_context*) */
void __thiscall test_rope::initialize_tensors(test_rope *this,ggml_context *param_1)
{
int iVar1;
ggml_tensor *pgVar2;
uint uVar3;
long lVar4;
ulong uVar5;
float fVar6;
float fVar7;
void *local_48 [2];
long local_38;
for (pgVar2 = (ggml_tensor *)ggml_get_first_tensor(param_1); pgVar2 != (ggml_tensor *)0x0;
pgVar2 = (ggml_tensor *)ggml_get_next_tensor(param_1,pgVar2)) {
if (*(int *)pgVar2 == 0x1a) {
lVar4 = *(long *)(this + 0x50) << ((byte)this[100] >> 2 & 2);
uVar3 = (uint)lVar4;
std::vector<int,std::allocator<int>>::vector((ulong)local_48,(allocator *)(long)(int)uVar3);
if (0 < (int)uVar3) {
uVar5 = 0;
do {
iVar1 = rand();
*(int *)((long)local_48[0] + uVar5 * 4) = iVar1 % *(int *)(this + 0x68);
uVar5 = uVar5 + 1;
} while ((uVar3 & 0x7fffffff) != uVar5);
}
/* try { // try from 00139116 to 00139122 has its CatchHandler @ 001391a5 */
ggml_backend_tensor_set(pgVar2,local_48[0],0,(lVar4 << 0x20) >> 0x1e);
if (local_48[0] != (void *)0x0) {
operator_delete(local_48[0],local_38 - (long)local_48[0]);
}
}
else {
fVar6 = DAT_00145028;
fVar7 = DAT_00145004;
if (*(long *)(pgVar2 + 0x10) == (long)(*(int *)(this + 0x60) / 2)) {
fVar6 = DAT_00145034;
fVar7 = DAT_00145038;
}
init_tensor_uniform(pgVar2,fVar6,fVar7);
}
}
return;
}
|
|
10,571 |
thr_print_lock
|
eloqsql/mysys/thr_lock.c
|
static void thr_print_lock(const char* name,struct st_lock_list *list)
{
THR_LOCK_DATA *data,**prev;
uint count=0;
if (list->data)
{
printf("%-10s: ",name);
prev= &list->data;
for (data=list->data; data && count++ < MAX_LOCKS ; data=data->next)
{
printf("%p (%lu:%d); ", data, (ulong) data->owner->thread_id,
(int) data->type);
if (data->prev != prev)
printf("\nWarning: prev didn't point at previous lock\n");
prev= &data->next;
}
puts("");
if (prev != list->last)
printf("Warning: last didn't point at last lock\n");
}
}
|
O0
|
c
|
thr_print_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x3449c
movq -0x8(%rbp), %rsi
leaq 0x53b3d(%rip), %rdi # 0x87f0d
movb $0x0, %al
callq 0x24050
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x25(%rbp)
je 0x3440c
movl -0x24(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x24(%rbp)
cmpl $0x3e8, %eax # imm = 0x3E8
setb %al
movb %al, -0x25(%rbp)
movb -0x25(%rbp), %al
testb $0x1, %al
jne 0x34415
jmp 0x34472
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdx
movq -0x18(%rbp), %rax
movl 0x40(%rax), %ecx
leaq 0x53ae3(%rip), %rdi # 0x87f15
movb $0x0, %al
callq 0x24050
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x20(%rbp), %rax
je 0x34455
leaq 0x53ad5(%rip), %rdi # 0x87f23
movb $0x0, %al
callq 0x24050
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x343ea
leaq 0x570e3(%rip), %rdi # 0x8b55c
callq 0x24480
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x3449a
leaq 0x53abe(%rip), %rdi # 0x87f51
movb $0x0, %al
callq 0x24050
jmp 0x3449c
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
thr_print_lock:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_24], 0
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jz loc_3449C
mov rsi, [rbp+var_8]
lea rdi, a10s; "%-10s: "
mov al, 0
call _printf
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
loc_343EA:
xor eax, eax
cmp [rbp+var_18], 0
mov [rbp+var_25], al
jz short loc_3440C
mov eax, [rbp+var_24]
mov ecx, eax
add ecx, 1
mov [rbp+var_24], ecx
cmp eax, 3E8h
setb al
mov [rbp+var_25], al
loc_3440C:
mov al, [rbp+var_25]
test al, 1
jnz short loc_34415
jmp short loc_34472
loc_34415:
mov rsi, [rbp+var_18]
mov rax, [rbp+var_18]
mov rax, [rax]
mov rdx, [rax+8]
mov rax, [rbp+var_18]
mov ecx, [rax+40h]
lea rdi, aPLuD; "%p (%lu:%d); "
mov al, 0
call _printf
mov rax, [rbp+var_18]
mov rax, [rax+10h]
cmp rax, [rbp+var_20]
jz short loc_34455
lea rdi, aWarningPrevDid; "\nWarning: prev didn't point at previou"...
mov al, 0
call _printf
loc_34455:
mov rax, [rbp+var_18]
add rax, 8
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_18], rax
jmp loc_343EA
loc_34472:
lea rdi, asc_8B558+4; ""
call _puts
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
cmp rax, [rcx+8]
jz short loc_3449A
lea rdi, aWarningLastDid; "Warning: last didn't point at last lock"...
mov al, 0
call _printf
loc_3449A:
jmp short $+2
loc_3449C:
add rsp, 30h
pop rbp
retn
|
long long thr_print_lock(const char *a1, _QWORD *a2)
{
long long result; // rax
unsigned int v3; // eax
bool v4; // [rsp+Bh] [rbp-25h]
unsigned int v5; // [rsp+Ch] [rbp-24h]
_QWORD *v6; // [rsp+10h] [rbp-20h]
long long i; // [rsp+18h] [rbp-18h]
v5 = 0;
result = (long long)a2;
if ( *a2 )
{
printf("%-10s: ", a1);
v6 = a2;
for ( i = *a2; ; i = *(_QWORD *)(i + 8) )
{
v4 = 0;
if ( i )
{
v3 = v5++;
v4 = v3 < 0x3E8;
}
if ( !v4 )
break;
printf("%p (%lu:%d); ", (const void *)i, *(_QWORD *)(*(_QWORD *)i + 8LL), *(_DWORD *)(i + 64));
if ( *(_QWORD **)(i + 16) != v6 )
printf("\nWarning: prev didn't point at previous lock\n");
v6 = (_QWORD *)(i + 8);
}
puts("");
result = (long long)v6;
if ( v6 != (_QWORD *)a2[1] )
return printf("Warning: last didn't point at last lock\n");
}
return result;
}
|
thr_print_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x24],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JZ 0x0013449c
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[0x187f0d]
MOV AL,0x0
CALL 0x00124050
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_001343ea:
XOR EAX,EAX
CMP qword ptr [RBP + -0x18],0x0
MOV byte ptr [RBP + -0x25],AL
JZ 0x0013440c
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
ADD ECX,0x1
MOV dword ptr [RBP + -0x24],ECX
CMP EAX,0x3e8
SETC AL
MOV byte ptr [RBP + -0x25],AL
LAB_0013440c:
MOV AL,byte ptr [RBP + -0x25]
TEST AL,0x1
JNZ 0x00134415
JMP 0x00134472
LAB_00134415:
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x40]
LEA RDI,[0x187f15]
MOV AL,0x0
CALL 0x00124050
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x00134455
LEA RDI,[0x187f23]
MOV AL,0x0
CALL 0x00124050
LAB_00134455:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001343ea
LAB_00134472:
LEA RDI,[0x18b55c]
CALL 0x00124480
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x0013449a
LEA RDI,[0x187f51]
MOV AL,0x0
CALL 0x00124050
LAB_0013449a:
JMP 0x0013449c
LAB_0013449c:
ADD RSP,0x30
POP RBP
RET
|
void thr_print_lock(int8 param_1,long *param_2)
{
uint uVar1;
uint local_2c;
long *local_28;
long *local_20;
local_2c = 0;
if (*param_2 != 0) {
printf("%-10s: ",param_1);
local_20 = (long *)*param_2;
local_28 = param_2;
while( true ) {
uVar1 = local_2c;
if (local_20 != (long *)0x0) {
local_2c = local_2c + 1;
}
if (local_20 == (long *)0x0 || 999 < uVar1) break;
printf("%p (%lu:%d); ",local_20,*(int8 *)(*local_20 + 8),(ulong)*(uint *)(local_20 + 8))
;
if ((long *)local_20[2] != local_28) {
printf("\nWarning: prev didn\'t point at previous lock\n");
}
local_28 = local_20 + 1;
local_20 = (long *)local_20[1];
}
puts("");
if (local_28 != (long *)param_2[1]) {
printf("Warning: last didn\'t point at last lock\n");
}
}
return;
}
|
|
10,572 |
GetPixelDataSize
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
int GetPixelDataSize(int width, int height, int format)
{
int dataSize = 0; // Size in bytes
int bpp = 0; // Bits per pixel
switch (format)
{
case PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: bpp = 8; break;
case PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA:
case PIXELFORMAT_UNCOMPRESSED_R5G6B5:
case PIXELFORMAT_UNCOMPRESSED_R5G5B5A1:
case PIXELFORMAT_UNCOMPRESSED_R4G4B4A4: bpp = 16; break;
case PIXELFORMAT_UNCOMPRESSED_R8G8B8A8: bpp = 32; break;
case PIXELFORMAT_UNCOMPRESSED_R8G8B8: bpp = 24; break;
case PIXELFORMAT_UNCOMPRESSED_R32: bpp = 32; break;
case PIXELFORMAT_UNCOMPRESSED_R32G32B32: bpp = 32*3; break;
case PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: bpp = 32*4; break;
case PIXELFORMAT_UNCOMPRESSED_R16: bpp = 16; break;
case PIXELFORMAT_UNCOMPRESSED_R16G16B16: bpp = 16*3; break;
case PIXELFORMAT_UNCOMPRESSED_R16G16B16A16: bpp = 16*4; break;
case PIXELFORMAT_COMPRESSED_DXT1_RGB:
case PIXELFORMAT_COMPRESSED_DXT1_RGBA:
case PIXELFORMAT_COMPRESSED_ETC1_RGB:
case PIXELFORMAT_COMPRESSED_ETC2_RGB:
case PIXELFORMAT_COMPRESSED_PVRT_RGB:
case PIXELFORMAT_COMPRESSED_PVRT_RGBA: bpp = 4; break;
case PIXELFORMAT_COMPRESSED_DXT3_RGBA:
case PIXELFORMAT_COMPRESSED_DXT5_RGBA:
case PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA:
case PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA: bpp = 8; break;
case PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: bpp = 2; break;
default: break;
}
double bytesPerPixel = (double)bpp/8.0;
dataSize = (int)(bytesPerPixel*width*height); // Total data size in bytes
// Most compressed formats works on 4x4 blocks,
// if texture is smaller, minimum dataSize is 8 or 16
if ((width < 4) && (height < 4))
{
if ((format >= PIXELFORMAT_COMPRESSED_DXT1_RGB) && (format < PIXELFORMAT_COMPRESSED_DXT3_RGBA)) dataSize = 8;
else if ((format >= PIXELFORMAT_COMPRESSED_DXT3_RGBA) && (format < PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA)) dataSize = 16;
}
return dataSize;
}
|
O2
|
c
|
GetPixelDataSize:
leal -0x1(%rdx), %eax
xorpd %xmm0, %xmm0
cmpl $0x17, %eax
ja 0x7dfa1
movl %eax, %eax
leaq 0x549b4(%rip), %rcx # 0xd2950
movsd (%rcx,%rax,8), %xmm0
cvtsi2sd %edi, %xmm1
mulsd %xmm0, %xmm1
cvtsi2sd %esi, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
cmpl $0x4, %edi
setge %cl
cmpl $0x4, %esi
setge %sil
orb %cl, %sil
jne 0x7dfde
movl %edx, %ecx
andl $-0x2, %ecx
cmpl $0xe, %ecx
jne 0x7dfd5
pushq $0x8
popq %rax
retq
andl $-0x8, %edx
cmpl $0x10, %edx
cmovel %edx, %eax
retq
|
GetPixelDataSize:
lea eax, [rdx-1]
xorpd xmm0, xmm0
cmp eax, 17h
ja short loc_7DFA1
mov eax, eax
lea rcx, unk_D2950
movsd xmm0, qword ptr [rcx+rax*8]
loc_7DFA1:
cvtsi2sd xmm1, edi
mulsd xmm1, xmm0
cvtsi2sd xmm0, esi
mulsd xmm0, xmm1
cvttsd2si eax, xmm0
cmp edi, 4
setnl cl
cmp esi, 4
setnl sil
or sil, cl
jnz short locret_7DFDE
mov ecx, edx
and ecx, 0FFFFFFFEh
cmp ecx, 0Eh
jnz short loc_7DFD5
push 8
pop rax
retn
loc_7DFD5:
and edx, 0FFFFFFF8h
cmp edx, 10h
cmovz eax, edx
locret_7DFDE:
retn
|
long long GetPixelDataSize(int a1, int a2, int a3)
{
double v3; // xmm0_8
long long result; // rax
v3 = 0.0;
if ( (unsigned int)(a3 - 1) <= 0x17 )
v3 = dbl_D2950[a3 - 1];
result = (unsigned int)(int)((double)a2 * ((double)a1 * v3));
if ( a1 < 4 && a2 < 4 )
{
if ( (a3 & 0xFFFFFFFE) == 0xE )
{
return 8LL;
}
else if ( (a3 & 0xFFFFFFF8) == 0x10 )
{
return 16LL;
}
}
return result;
}
|
GetPixelDataSize:
LEA EAX,[RDX + -0x1]
XORPD XMM0,XMM0
CMP EAX,0x17
JA 0x0017dfa1
MOV EAX,EAX
LEA RCX,[0x1d2950]
MOVSD XMM0,qword ptr [RCX + RAX*0x8]
LAB_0017dfa1:
CVTSI2SD XMM1,EDI
MULSD XMM1,XMM0
CVTSI2SD XMM0,ESI
MULSD XMM0,XMM1
CVTTSD2SI EAX,XMM0
CMP EDI,0x4
SETGE CL
CMP ESI,0x4
SETGE SIL
OR SIL,CL
JNZ 0x0017dfde
MOV ECX,EDX
AND ECX,0xfffffffe
CMP ECX,0xe
JNZ 0x0017dfd5
PUSH 0x8
POP RAX
RET
LAB_0017dfd5:
AND EDX,0xfffffff8
CMP EDX,0x10
CMOVZ EAX,EDX
LAB_0017dfde:
RET
|
uint GetPixelDataSize(int param_1,int param_2,uint param_3)
{
uint uVar1;
double dVar2;
dVar2 = 0.0;
if (param_3 - 1 < 0x18) {
dVar2 = *(double *)(&DAT_001d2950 + (ulong)(param_3 - 1) * 8);
}
uVar1 = (uint)((double)param_2 * (double)param_1 * dVar2);
if (param_2 < 4 && param_1 < 4) {
if ((param_3 & 0xfffffffe) == 0xe) {
return 8;
}
if ((param_3 & 0xfffffff8) == 0x10) {
uVar1 = param_3 & 0xfffffff8;
}
}
return uVar1;
}
|
|
10,573 |
google::protobuf::UnknownFieldSet* google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>()
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/metadata_lite.h
|
PROTOBUF_NOINLINE T* mutable_unknown_fields_slow() {
Arena* my_arena = arena();
Container<T>* container = Arena::Create<Container<T>>(my_arena);
intptr_t message_owned_arena_tag = ptr_ & kMessageOwnedArenaTagMask;
// Two-step assignment works around a bug in clang's static analyzer:
// https://bugs.llvm.org/show_bug.cgi?id=34198.
ptr_ = reinterpret_cast<intptr_t>(container);
ptr_ |= kUnknownFieldsTagMask | message_owned_arena_tag;
container->arena = my_arena;
return &(container->unknown_fields);
}
|
O0
|
c
|
google::protobuf::UnknownFieldSet* google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>():
subq $0x108, %rsp # imm = 0x108
movq %rdi, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xdf2aa
movq 0x28(%rsp), %rdi
callq 0x801f0
movq (%rax), %rax
movq %rax, 0x58(%rsp)
jmp 0xdf2b9
movq 0x28(%rsp), %rdi
callq 0x80210
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x90(%rsp)
cmpq $0x0, 0x90(%rsp)
jne 0xdf348
movl $0x20, %edi
callq 0x13450
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x18(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0xdf5a0
jmp 0xdf30b
movq 0x18(%rsp), %rax
movq %rax, 0x98(%rsp)
jmp 0xdf544
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
callq 0x13400
movq 0x88(%rsp), %rdi
callq 0x13750
leaq 0x271(%rip), %rax # 0xdf5c0
movq %rax, 0x78(%rsp)
movq 0x90(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0xe8(%rsp)
movq $0x20, 0xe0(%rsp)
movq $0x8, 0xd8(%rsp)
movq %rax, 0xd0(%rsp)
leaq 0x199f80(%rip), %rax # 0x279310
movq %rax, 0xc8(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0xd0(%rsp)
jne 0xdf3df
movq 0x10(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq 0xc8(%rsp), %rcx
callq 0xdf5f0
movq %rax, 0xf0(%rsp)
jmp 0xdf514
cmpq $0x8, 0xd8(%rsp)
ja 0xdf458
movq 0xe0(%rsp), %rdi
callq 0xdf6a0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq 0xc8(%rsp), %rdx
callq 0x1816c0
movq %rax, 0xb8(%rsp)
movq %rdx, 0xc0(%rsp)
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rax
movq %rcx, (%rax)
movq 0xd0(%rsp), %rcx
movq 0xc0(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xb8(%rsp), %rax
movq %rax, 0xf0(%rsp)
jmp 0xdf514
movq 0x10(%rsp), %rdi
movq 0xe0(%rsp), %rsi
addq 0xd8(%rsp), %rsi
subq $0x8, %rsi
movq 0xc8(%rsp), %rdx
callq 0x1816c0
movq %rax, 0xa8(%rsp)
movq %rdx, 0xb0(%rsp)
movq 0xa8(%rsp), %rcx
movq 0xd8(%rsp), %rax
movq %rcx, 0x100(%rsp)
movq %rax, 0xf8(%rsp)
movq 0x100(%rsp), %rax
addq 0xf8(%rsp), %rax
subq $0x1, %rax
movq 0xf8(%rsp), %rcx
xorq $-0x1, %rcx
addq $0x1, %rcx
andq %rcx, %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rcx
movq 0xb0(%rsp), %rax
movq %rcx, (%rax)
movq 0xd0(%rsp), %rcx
movq 0xb0(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xa0(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rdi
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
movl $0x20, %edx
callq 0x13200
movq 0x8(%rsp), %rdi
callq 0xdf5a0
movq 0x8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x20(%rsp), %rax
movq 0x98(%rsp), %rcx
movq %rcx, 0x38(%rsp)
movq (%rax), %rcx
andq $0x2, %rcx
movq %rcx, 0x30(%rsp)
movq 0x38(%rsp), %rcx
movq %rcx, (%rax)
movq 0x30(%rsp), %rcx
orq $0x1, %rcx
orq (%rax), %rcx
movq %rcx, (%rax)
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movq 0x38(%rsp), %rax
addq $0x8, %rax
addq $0x108, %rsp # imm = 0x108
retq
nopw (%rax,%rax)
|
_ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v:
sub rsp, 108h
mov [rsp+108h+var_C0], rdi
mov rax, [rsp+108h+var_C0]
mov [rsp+108h+var_E8], rax
mov [rsp+108h+var_B8], rax
mov rax, [rsp+108h+var_B8]
mov [rsp+108h+var_E0], rax
mov [rsp+108h+var_A8], rax
mov rax, [rsp+108h+var_A8]
mov [rsp+108h+var_A0], rax
mov rax, [rsp+108h+var_A0]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_DF2AA
mov rdi, [rsp+108h+var_E0]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_13ContainerBaseEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::ContainerBase>(void)
mov rax, [rax]
mov [rsp+108h+var_B0], rax
jmp short loc_DF2B9
loc_DF2AA:
mov rdi, [rsp+108h+var_E0]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS0_5ArenaEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::Arena>(void)
mov [rsp+108h+var_B0], rax
loc_DF2B9:
mov rax, [rsp+108h+var_B0]
mov [rsp+108h+var_C8], rax
mov rax, [rsp+108h+var_C8]
mov [rsp+108h+var_98], rax
mov rax, [rsp+108h+var_98]
mov [rsp+108h+var_78], rax
cmp [rsp+108h+var_78], 0
jnz short loc_DF348
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
mov rax, rdi
mov [rsp+108h+var_F0], rax
xorps xmm0, xmm0
movaps xmmword ptr [rdi+10h], xmm0
movaps xmmword ptr [rdi], xmm0
call _ZN6google8protobuf8internal16InternalMetadata9ContainerINS0_15UnknownFieldSetEEC2Ev; google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>::Container(void)
jmp short $+2
loc_DF30B:
mov rax, [rsp+108h+var_F0]
mov [rsp+108h+var_70], rax
jmp loc_DF544
mov rdi, [rsp+arg_10]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
call __ZdlPv; operator delete(void *)
mov rdi, [rsp+arg_80]
call __Unwind_Resume
loc_DF348:
lea rax, _ZN6google8protobuf8internal21arena_destruct_objectINS1_16InternalMetadata9ContainerINS0_15UnknownFieldSetEEEEEvPv; google::protobuf::internal::arena_destruct_object<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void *)
mov [rsp+108h+var_90], rax
mov rcx, [rsp+108h+var_78]
mov rax, [rsp+108h+var_90]
mov [rsp+108h+var_20], rcx
mov [rsp+108h+var_28], 20h ; ' '
mov [rsp+108h+var_30], 8
mov [rsp+108h+var_38], rax
lea rax, _ZTIN6google8protobuf8internal16InternalMetadata9ContainerINS0_15UnknownFieldSetEEE; `typeinfo for'google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>
mov [rsp+108h+var_40], rax
mov rax, [rsp+108h+var_20]
mov [rsp+108h+var_F8], rax
cmp [rsp+108h+var_38], 0
jnz short loc_DF3DF
mov rdi, [rsp+108h+var_F8]; this
mov rsi, [rsp+108h+var_28]; unsigned __int64
mov rdx, [rsp+108h+var_30]; unsigned __int64
mov rcx, [rsp+108h+var_40]; type_info *
call _ZN6google8protobuf5Arena23AllocateAlignedWithHookEmmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithHook(ulong,ulong,std::type_info const*)
mov [rsp+108h+var_18], rax
jmp loc_DF514
loc_DF3DF:
cmp [rsp+108h+var_30], 8
ja short loc_DF458
mov rdi, [rsp+108h+var_28]; this
call _ZN6google8protobuf8internal10AlignUpTo8Em; google::protobuf::internal::AlignUpTo8(ulong)
mov rdi, [rsp+108h+var_F8]; this
mov rsi, rax; unsigned __int64
mov rdx, [rsp+108h+var_40]; type_info *
call _ZN6google8protobuf5Arena26AllocateAlignedWithCleanupEmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithCleanup(ulong,std::type_info const*)
mov [rsp+108h+var_50], rax
mov [rsp+108h+var_48], rdx
mov rcx, [rsp+108h+var_50]
mov rax, [rsp+108h+var_48]
mov [rax], rcx
mov rcx, [rsp+108h+var_38]
mov rax, [rsp+108h+var_48]
mov [rax+8], rcx
mov rax, [rsp+108h+var_50]
mov [rsp+108h+var_18], rax
jmp loc_DF514
loc_DF458:
mov rdi, [rsp+108h+var_F8]; this
mov rsi, [rsp+108h+var_28]
add rsi, [rsp+108h+var_30]
sub rsi, 8; unsigned __int64
mov rdx, [rsp+108h+var_40]; type_info *
call _ZN6google8protobuf5Arena26AllocateAlignedWithCleanupEmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithCleanup(ulong,std::type_info const*)
mov [rsp+108h+var_60], rax
mov [rsp+108h+var_58], rdx
mov rcx, [rsp+108h+var_60]
mov rax, [rsp+108h+var_30]
mov [rsp+108h+var_8], rcx
mov [rsp+108h+var_10], rax
mov rax, [rsp+108h+var_8]
add rax, [rsp+108h+var_10]
sub rax, 1
mov rcx, [rsp+108h+var_10]
xor rcx, 0FFFFFFFFFFFFFFFFh
add rcx, 1
and rax, rcx
mov [rsp+108h+var_68], rax
mov rcx, [rsp+108h+var_68]
mov rax, [rsp+108h+var_58]
mov [rax], rcx
mov rcx, [rsp+108h+var_38]
mov rax, [rsp+108h+var_58]
mov [rax+8], rcx
mov rax, [rsp+108h+var_68]
mov [rsp+108h+var_18], rax
loc_DF514:
mov rdi, [rsp+108h+var_18]
mov [rsp+108h+var_100], rdi
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rdi, [rsp+108h+var_100]
call _ZN6google8protobuf8internal16InternalMetadata9ContainerINS0_15UnknownFieldSetEEC2Ev; google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>::Container(void)
mov rax, [rsp+108h+var_100]
mov [rsp+108h+var_70], rax
loc_DF544:
mov rax, [rsp+108h+var_E8]
mov rcx, [rsp+108h+var_70]
mov [rsp+108h+var_D0], rcx
mov rcx, [rax]
and rcx, 2
mov [rsp+108h+var_D8], rcx
mov rcx, [rsp+108h+var_D0]
mov [rax], rcx
mov rcx, [rsp+108h+var_D8]
or rcx, 1
or rcx, [rax]
mov [rax], rcx
mov rcx, [rsp+108h+var_C8]
mov rax, [rsp+108h+var_D0]
mov [rax], rcx
mov rax, [rsp+108h+var_D0]
add rax, 8
add rsp, 108h
retn
|
_QWORD * google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(
_QWORD *a1,
unsigned long long a2)
{
unsigned long long v2; // rax
long long *v3; // rdx
_OWORD *v5; // [rsp+18h] [rbp-F0h]
long long v6; // [rsp+30h] [rbp-D8h]
google::protobuf::Arena *v7; // [rsp+58h] [rbp-B0h]
_QWORD *v8; // [rsp+98h] [rbp-70h]
long long AlignedWithCleanup; // [rsp+B8h] [rbp-50h]
long long AlignedWithHook; // [rsp+F0h] [rbp-18h]
if ( (*a1 & 1LL) != 0 )
v7 = *(google::protobuf::Arena **)google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::ContainerBase>(a1);
else
v7 = (google::protobuf::Arena *)google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::Arena>(a1);
if ( v7 )
{
if ( google::protobuf::internal::arena_destruct_object<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>> )
{
v2 = google::protobuf::internal::AlignUpTo8((google::protobuf::internal *)&qword_20, a2);
AlignedWithCleanup = google::protobuf::Arena::AllocateAlignedWithCleanup(
v7,
v2,
(const type_info *)&`typeinfo for'google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>);
*v3 = AlignedWithCleanup;
v3[1] = (long long)google::protobuf::internal::arena_destruct_object<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>;
AlignedWithHook = AlignedWithCleanup;
}
else
{
AlignedWithHook = google::protobuf::Arena::AllocateAlignedWithHook(
v7,
0x20uLL,
8uLL,
(const type_info *)&`typeinfo for'google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>);
}
memset(AlignedWithHook, 0LL, 32LL);
google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>::Container(AlignedWithHook);
v8 = (_QWORD *)AlignedWithHook;
}
else
{
v5 = (_OWORD *)operator new(0x20uLL);
v5[1] = 0LL;
*v5 = 0LL;
google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>::Container(v5);
v8 = v5;
}
v6 = *a1 & 2LL;
*a1 = v8;
*a1 |= v6 | 1;
*v8 = v7;
return v8 + 1;
}
|
mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>:
SUB RSP,0x108
MOV qword ptr [RSP + 0x48],RDI
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001df2aa
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001801f0
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x58],RAX
JMP 0x001df2b9
LAB_001df2aa:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00180210
MOV qword ptr [RSP + 0x58],RAX
LAB_001df2b9:
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x90],RAX
CMP qword ptr [RSP + 0x90],0x0
JNZ 0x001df348
MOV EDI,0x20
CALL 0x00113450
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RDI + 0x10],XMM0
MOVAPS xmmword ptr [RDI],XMM0
LAB_001df304:
CALL 0x001df5a0
LAB_001df309:
JMP 0x001df30b
LAB_001df30b:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x98],RAX
JMP 0x001df544
LAB_001df348:
LEA RAX,[0x1df5c0]
MOV qword ptr [RSP + 0x78],RAX
MOV RCX,qword ptr [RSP + 0x90]
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0xe8],RCX
MOV qword ptr [RSP + 0xe0],0x20
MOV qword ptr [RSP + 0xd8],0x8
MOV qword ptr [RSP + 0xd0],RAX
LEA RAX,[0x379310]
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0xe8]
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0xd0],0x0
JNZ 0x001df3df
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0xe0]
MOV RDX,qword ptr [RSP + 0xd8]
MOV RCX,qword ptr [RSP + 0xc8]
CALL 0x001df5f0
MOV qword ptr [RSP + 0xf0],RAX
JMP 0x001df514
LAB_001df3df:
CMP qword ptr [RSP + 0xd8],0x8
JA 0x001df458
MOV RDI,qword ptr [RSP + 0xe0]
CALL 0x001df6a0
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0xc8]
CALL 0x002816c0
MOV qword ptr [RSP + 0xb8],RAX
MOV qword ptr [RSP + 0xc0],RDX
MOV RCX,qword ptr [RSP + 0xb8]
MOV RAX,qword ptr [RSP + 0xc0]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0xd0]
MOV RAX,qword ptr [RSP + 0xc0]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0xf0],RAX
JMP 0x001df514
LAB_001df458:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0xe0]
ADD RSI,qword ptr [RSP + 0xd8]
SUB RSI,0x8
MOV RDX,qword ptr [RSP + 0xc8]
CALL 0x002816c0
MOV qword ptr [RSP + 0xa8],RAX
MOV qword ptr [RSP + 0xb0],RDX
MOV RCX,qword ptr [RSP + 0xa8]
MOV RAX,qword ptr [RSP + 0xd8]
MOV qword ptr [RSP + 0x100],RCX
MOV qword ptr [RSP + 0xf8],RAX
MOV RAX,qword ptr [RSP + 0x100]
ADD RAX,qword ptr [RSP + 0xf8]
SUB RAX,0x1
MOV RCX,qword ptr [RSP + 0xf8]
XOR RCX,-0x1
ADD RCX,0x1
AND RAX,RCX
MOV qword ptr [RSP + 0xa0],RAX
MOV RCX,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0xd0]
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0xf0],RAX
LAB_001df514:
MOV RDI,qword ptr [RSP + 0xf0]
MOV qword ptr [RSP + 0x8],RDI
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00113200
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001df5a0
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x98],RAX
LAB_001df544:
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x38],RCX
MOV RCX,qword ptr [RAX]
AND RCX,0x2
MOV qword ptr [RSP + 0x30],RCX
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x30]
OR RCX,0x1
OR RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0x38]
ADD RAX,0x8
ADD RSP,0x108
RET
|
/* WARNING: Removing unreachable block (ram,0x001df458) */
/* WARNING: Removing unreachable block (ram,0x001df3b0) */
/* google::protobuf::UnknownFieldSet*
google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>()
*/
UnknownFieldSet * __thiscall
google::protobuf::internal::InternalMetadata::
mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(InternalMetadata *this)
{
ContainerBase *pCVar1;
ulong uVar2;
int1 auVar3 [16];
Arena *local_b0;
Container<google::protobuf::UnknownFieldSet> *local_70;
if ((*(ulong *)this & 1) == 0) {
local_b0 = PtrValue<google::protobuf::Arena>(this);
}
else {
pCVar1 = PtrValue<google::protobuf::internal::InternalMetadata::ContainerBase>(this);
local_b0 = *(Arena **)pCVar1;
}
if (local_b0 == (Arena *)0x0) {
local_70 = (Container<google::protobuf::UnknownFieldSet> *)operator_new(0x20);
*(int8 *)(local_70 + 0x10) = 0;
*(int8 *)(local_70 + 0x18) = 0;
*(int8 *)local_70 = 0;
*(int8 *)(local_70 + 8) = 0;
/* try { // try from 001df304 to 001df308 has its CatchHandler @ 001df31d */
Container<google::protobuf::UnknownFieldSet>::Container(local_70);
}
else {
uVar2 = AlignUpTo8(0x20);
auVar3 = Arena::AllocateAlignedWithCleanup
(local_b0,uVar2,
(type_info *)&Container<google::protobuf::UnknownFieldSet>::typeinfo);
local_70 = auVar3._0_8_;
*auVar3._8_8_ = local_70;
auVar3._8_8_[1] =
arena_destruct_object<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>
;
memset(local_70,0,0x20);
Container<google::protobuf::UnknownFieldSet>::Container(local_70);
}
uVar2 = *(ulong *)this;
*(Container<google::protobuf::UnknownFieldSet> **)this = local_70;
*(ulong *)this = uVar2 & 2 | 1 | *(ulong *)this;
*(Arena **)local_70 = local_b0;
return (UnknownFieldSet *)(local_70 + 8);
}
|
|
10,574 |
translog_disable_purge
|
eloqsql/storage/maria/ma_loghandler.c
|
void translog_disable_purge()
{
mysql_mutex_lock(&log_descriptor.purger_lock);
log_purge_disabled++;
mysql_mutex_unlock(&log_descriptor.purger_lock);
}
|
O3
|
c
|
translog_disable_purge:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0xbb0a0e(%rip) # 0xbff680
jne 0x4ec9f
leaq 0xbb09c5(%rip), %rdi # 0xbff640
callq 0x29220
incl 0x3ae90a(%rip) # 0x3fd590
movq 0xbb09f3(%rip), %rdi # 0xbff680
testq %rdi, %rdi
jne 0x4eca6
leaq 0xbb09a7(%rip), %rdi # 0xbff640
popq %rbp
jmp 0x291e0
callq 0x2cd31
jmp 0x4ec80
leaq 0x337363(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x4ec92
|
translog_disable_purge:
push rbp
mov rbp, rsp
cmp cs:qword_BFF680, 0
jnz short loc_4EC9F
lea rdi, unk_BFF640
call _pthread_mutex_lock
loc_4EC80:
inc cs:log_purge_disabled
mov rdi, cs:qword_BFF680
test rdi, rdi
jnz short loc_4ECA6
loc_4EC92:
lea rdi, unk_BFF640
pop rbp
jmp _pthread_mutex_unlock
loc_4EC9F:
call translog_disable_purge_cold_1
jmp short loc_4EC80
loc_4ECA6:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_4EC92
|
long long translog_disable_purge()
{
if ( qword_BFF680 )
translog_disable_purge_cold_1();
else
pthread_mutex_lock(&unk_BFF640);
++log_purge_disabled;
if ( qword_BFF680 )
PSI_server[44]();
return pthread_mutex_unlock(&unk_BFF640);
}
|
translog_disable_purge:
PUSH RBP
MOV RBP,RSP
CMP qword ptr [0x00cff680],0x0
JNZ 0x0014ec9f
LEA RDI,[0xcff640]
CALL 0x00129220
LAB_0014ec80:
INC dword ptr [0x004fd590]
MOV RDI,qword ptr [0x00cff680]
TEST RDI,RDI
JNZ 0x0014eca6
LAB_0014ec92:
LEA RDI,[0xcff640]
POP RBP
JMP 0x001291e0
LAB_0014ec9f:
CALL 0x0012cd31
JMP 0x0014ec80
LAB_0014eca6:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0014ec92
|
void translog_disable_purge(void)
{
if (DAT_00cff680 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00cff640);
}
else {
translog_disable_purge_cold_1();
}
log_purge_disabled = log_purge_disabled + 1;
if (DAT_00cff680 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00cff640);
return;
}
|
|
10,575 |
minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op)
|
monkey531[P]llama/common/minja.hpp
|
UnaryOpExpr(const Location & location, std::shared_ptr<Expression> && e, Op o)
: Expression(location), expr(std::move(e)), op(o) {}
|
O2
|
cpp
|
minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op):
pushq %r15
pushq %r14
pushq %rbx
movl %ecx, %ebx
movq %rdx, %r14
movq %rdi, %r15
callq 0x7ed62
leaq 0xa061f(%rip), %rax # 0x11f358
addq $0x10, %rax
movq %rax, (%r15)
andq $0x0, 0x28(%r15)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x20(%r15)
andq $0x0, (%r14)
movl %ebx, 0x30(%r15)
popq %rbx
popq %r14
popq %r15
retq
nop
|
_ZN5minja11UnaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEENS0_2OpE:
push r15
push r14
push rbx
mov ebx, ecx
mov r14, rdx
mov r15, rdi
call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&)
lea rax, _ZTVN5minja11UnaryOpExprE; `vtable for'minja::UnaryOpExpr
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
mov [r15+30h], ebx
pop rbx
pop r14
pop r15
retn
|
long long * minja::UnaryOpExpr::UnaryOpExpr(long long a1, long long a2, __int128 *a3, int a4)
{
long long *result; // rax
__int128 v7; // xmm0
minja::Expression::Expression();
result = &`vtable for'minja::UnaryOpExpr + 2;
*(_QWORD *)a1 = &`vtable for'minja::UnaryOpExpr + 2;
*(_QWORD *)(a1 + 40) = 0LL;
v7 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v7;
*(_QWORD *)a3 = 0LL;
*(_DWORD *)(a1 + 48) = a4;
return result;
}
|
UnaryOpExpr:
PUSH R15
PUSH R14
PUSH RBX
MOV EBX,ECX
MOV R14,RDX
MOV R15,RDI
CALL 0x0017ed62
LEA RAX,[0x21f358]
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
MOV dword ptr [R15 + 0x30],EBX
POP RBX
POP R14
POP R15
RET
|
/* minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
minja::UnaryOpExpr::Op) */
void __thiscall
minja::UnaryOpExpr::UnaryOpExpr
(UnaryOpExpr *this,Location *param_1,int8 *param_2,int4 param_4)
{
int8 uVar1;
Expression::Expression((Expression *)this,param_1);
*(int ***)this = &PTR_do_evaluate_0021f368;
*(int8 *)(this + 0x28) = 0;
uVar1 = param_2[1];
param_2[1] = 0;
*(int8 *)(this + 0x20) = *param_2;
*(int8 *)(this + 0x28) = uVar1;
*param_2 = 0;
*(int4 *)(this + 0x30) = param_4;
return;
}
|
|
10,576 |
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<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<std::pair<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, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<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, minja::Value>*, std::vector<std::pair<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, minja::Value>, std::allocator<std::pair<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, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<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, minja::Value>*, std::vector<std::pair<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, minja::Value>, std::allocator<std::pair<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, minja::Value>>>>)
|
llama.cpp/common/json.hpp
|
iterator erase(iterator first, iterator last)
{
if (first == last)
{
return first;
}
const auto elements_affected = std::distance(first, last);
const auto offset = std::distance(Container::begin(), first);
// This is the start situation. We need to delete elements_affected
// elements (3 in this example: e, f, g), and need to return an
// iterator past the last deleted element (h in this example).
// Note that offset is the distance from the start of the vector
// to first. We will need this later.
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// first last
// Since we cannot move const Keys, we re-construct them in place.
// We start at first and re-construct (viz. copy) the elements from
// the back of the vector. Example for first iteration:
// ,--------.
// v | destroy e and re-construct with h
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// it it + elements_affected
for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it)
{
it->~value_type(); // destroy but keep allocation
new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it
}
// [ a, b, c, d, h, i, j, h, i, j ]
// ^ ^
// first last
// remove the unneeded elements at the end of the vector
Container::resize(this->size() - static_cast<size_type>(elements_affected));
// [ a, b, c, d, h, i, j ]
// ^ ^
// first last
// first is now pointing past the last deleted element, but we cannot
// use this iterator, because it may have been invalidated by the
// resize call. Instead, we can return begin() + offset.
return Container::begin() + offset;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<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<std::pair<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, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<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, minja::Value>*, std::vector<std::pair<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, minja::Value>, std::allocator<std::pair<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, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<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, minja::Value>*, std::vector<std::pair<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, minja::Value>, std::allocator<std::pair<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, minja::Value>>>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
cmpq %rdx, %rsi
je 0xf3a23
movq %rdx, %r15
movq %rdi, %rbx
movq %rdx, %rax
subq %r14, %rax
sarq $0x5, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movq %rax, 0x10(%rsp)
movq (%rdi), %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
leaq (%r15,%rbp), %r12
cmpq 0x8(%rbx), %r12
je 0xf39e2
leaq (%r14,%rbp), %r13
addq $0x50, %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x9524a
movq %r13, %rdi
callq 0x3488a
leaq (%r14,%rbp), %rdi
addq $0x48, %rdi
callq 0x46496
leaq (%r14,%rbp), %rdi
addq $0x38, %rdi
callq 0x46496
leaq (%r14,%rbp), %r13
addq $0x28, %r13
movq %r13, %rdi
callq 0x46496
movq -0x10(%r13), %rdi
testq %rdi, %rdi
je 0xf39b8
movq 0x7a605(%rip), %rax # 0x16df98
cmpb $0x0, (%rax)
je 0xf39a3
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xf39ad
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xf39b8
movq (%rdi), %rax
callq *0x18(%rax)
leaq (%r14,%rbp), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x9524a
movq %r13, %rdi
callq 0x3488a
movq %r13, %rdi
movq %r12, %rsi
callq 0xf3a36
addq $0x60, %rbp
jmp 0xf3931
movq %r14, %r15
subq 0x8(%rsp), %r15
movq 0x10(%rsp), %rax
leaq (%rax,%rax,2), %rsi
shlq $0x5, %rsi
addq %r14, %rsi
subq (%rbx), %rsi
addq %rbp, %rsi
sarq $0x5, %rsi
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rsi
subq %rax, %rsi
movq %rbx, %rdi
callq 0xf3ac2
addq (%rbx), %r15
movq %r15, %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
cmp rsi, rdx
jz loc_F3A23
mov r15, rdx
mov rbx, rdi
mov rax, rdx
sub rax, r14
sar rax, 5
mov rcx, 0AAAAAAAAAAAAAAABh
imul rax, rcx
mov [rsp+48h+var_38], rax
mov rax, [rdi]
mov [rsp+48h+var_40], rax
xor ebp, ebp
loc_F3931:
lea r12, [r15+rbp]
cmp r12, [rbx+8]
jz loc_F39E2
lea r13, [r14+rbp]
add r13, 50h ; 'P'
mov rdi, r13
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, r13
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 rdi, [r14+rbp]
add rdi, 48h ; 'H'
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [r14+rbp]
add rdi, 38h ; '8'
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r13, [r14+rbp]
add r13, 28h ; '('
mov rdi, r13
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [r13-10h]
test rdi, rdi
jz short loc_F39B8
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_F39A3
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_F39AD
loc_F39A3:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_F39AD:
cmp eax, 1
jnz short loc_F39B8
mov rax, [rdi]
call qword ptr [rax+18h]
loc_F39B8:
lea r13, [r14+rbp]
mov rdi, r13
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, r13
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, r13
mov rsi, r12
call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::pair(std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>&&)
add rbp, 60h ; '`'
jmp loc_F3931
loc_F39E2:
mov r15, r14
sub r15, [rsp+48h+var_40]
mov rax, [rsp+48h+var_38]
lea rsi, [rax+rax*2]
shl rsi, 5
add rsi, r14
sub rsi, [rbx]
add rsi, rbp
sar rsi, 5
mov rcx, 0AAAAAAAAAAAAAAABh
imul rsi, rcx
sub rsi, rax
mov rdi, rbx
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::resize(ulong)
add r15, [rbx]
mov r14, r15
loc_F3A23:
mov rax, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase(
long long *a1,
long long a2,
long long a3)
{
long long v3; // r14
long long i; // rbp
volatile signed __int32 *v7; // rdi
signed __int32 v8; // eax
long long v10; // [rsp+8h] [rbp-40h]
unsigned long long v11; // [rsp+10h] [rbp-38h]
v3 = a2;
if ( a2 != a3 )
{
v11 = 0xAAAAAAAAAAAAAAABLL * ((a3 - a2) >> 5);
v10 = *a1;
for ( i = 0LL; a3 + i != a1[1]; i += 96LL )
{
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 *)(a2 + i + 80));
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(a2 + i + 80);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 72));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 56));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 40));
v7 = *(volatile signed __int32 **)(a2 + i + 24);
if ( v7 )
{
if ( _libc_single_threaded )
{
v8 = *((_DWORD *)v7 + 3);
*((_DWORD *)v7 + 3) = v8 - 1;
}
else
{
v8 = _InterlockedExchangeAdd(v7 + 3, 0xFFFFFFFF);
}
if ( v8 == 1 )
(*(void ( **)(volatile signed __int32 *, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 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 *)(a2 + i));
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(a2 + i);
std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::pair(
a2 + i,
a3 + i);
}
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::resize(
a1,
0xAAAAAAAAAAAAAAABLL * ((long long)(i + a2 + 96 * v11 - *a1) >> 5) - v11);
return *a1 + a2 - v10;
}
return v3;
}
|
erase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
CMP RSI,RDX
JZ 0x001f3a23
MOV R15,RDX
MOV RBX,RDI
MOV RAX,RDX
SUB RAX,R14
SAR RAX,0x5
MOV RCX,-0x5555555555555555
IMUL RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP + 0x8],RAX
XOR EBP,EBP
LAB_001f3931:
LEA R12,[R15 + RBP*0x1]
CMP R12,qword ptr [RBX + 0x8]
JZ 0x001f39e2
LEA R13,[R14 + RBP*0x1]
ADD R13,0x50
MOV RDI,R13
XOR ESI,ESI
CALL 0x0019524a
MOV RDI,R13
CALL 0x0013488a
LEA RDI,[R14 + RBP*0x1]
ADD RDI,0x48
CALL 0x00146496
LEA RDI,[R14 + RBP*0x1]
ADD RDI,0x38
CALL 0x00146496
LEA R13,[R14 + RBP*0x1]
ADD R13,0x28
MOV RDI,R13
CALL 0x00146496
MOV RDI,qword ptr [R13 + -0x10]
TEST RDI,RDI
JZ 0x001f39b8
MOV RAX,qword ptr [0x0026df98]
CMP byte ptr [RAX],0x0
JZ 0x001f39a3
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001f39ad
LAB_001f39a3:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001f39ad:
CMP EAX,0x1
JNZ 0x001f39b8
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001f39b8:
LEA R13,[R14 + RBP*0x1]
MOV RDI,R13
XOR ESI,ESI
CALL 0x0019524a
MOV RDI,R13
CALL 0x0013488a
MOV RDI,R13
MOV RSI,R12
CALL 0x001f3a36
ADD RBP,0x60
JMP 0x001f3931
LAB_001f39e2:
MOV R15,R14
SUB R15,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
LEA RSI,[RAX + RAX*0x2]
SHL RSI,0x5
ADD RSI,R14
SUB RSI,qword ptr [RBX]
ADD RSI,RBP
SAR RSI,0x5
MOV RCX,-0x5555555555555555
IMUL RSI,RCX
SUB RSI,RAX
MOV RDI,RBX
CALL 0x001f3ac2
ADD R15,qword ptr [RBX]
MOV R14,R15
LAB_001f3a23:
MOV RAX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>*,
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> > > >,
__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>*,
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> > > >) */
long __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::erase(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,long param_2,long param_3)
{
int *piVar1;
long lVar2;
long *plVar3;
int iVar4;
long lVar5;
long lVar6;
data *pdVar7;
if (param_2 != param_3) {
lVar5 = param_3 - param_2 >> 5;
lVar2 = *(long *)this;
for (lVar6 = 0; (pair *)(param_3 + lVar6) != *(pair **)(this + 8); lVar6 = lVar6 + 0x60) {
pdVar7 = (data *)(param_2 + lVar6 + 0x50);
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(pdVar7,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(pdVar7);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x48));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x38));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x28));
plVar3 = *(long **)(param_2 + lVar6 + 0x18);
if (plVar3 != (long *)0x0) {
if (*PTR___libc_single_threaded_0026df98 == '\0') {
LOCK();
piVar1 = (int *)((long)plVar3 + 0xc);
iVar4 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar4 = *(int *)((long)plVar3 + 0xc);
*(int *)((long)plVar3 + 0xc) = iVar4 + -1;
}
if (iVar4 == 1) {
(**(code **)(*plVar3 + 0x18))();
}
}
pdVar7 = (data *)(param_2 + lVar6);
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(pdVar7,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(pdVar7);
std::
pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
::pair((pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
*)pdVar7,(pair *)(param_3 + lVar6));
}
std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::resize((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this,(((lVar5 * 0x20 + param_2) - *(long *)this) + lVar6 >> 5) * -0x5555555555555555
+ lVar5 * 0x5555555555555555);
param_2 = (param_2 - lVar2) + *(long *)this;
}
return param_2;
}
|
|
10,577 |
my_8bit_collation_flags_from_data
|
eloqsql/strings/ctype-simple.c
|
uint my_8bit_collation_flags_from_data(CHARSET_INFO *cs)
{
uint flags= 0;
if (cs->sort_order && cs->sort_order['A'] < cs->sort_order['a'] &&
cs->sort_order['a'] < cs->sort_order['B'])
flags|= MY_CS_CSSORT;
return flags;
}
|
O0
|
c
|
my_8bit_collation_flags_from_data:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0xe958d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movzbl 0x41(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rcx
movzbl 0x61(%rcx), %ecx
cmpl %ecx, %eax
jge 0xe958d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movzbl 0x61(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rcx
movzbl 0x42(%rcx), %ecx
cmpl %ecx, %eax
jge 0xe958d
movl -0xc(%rbp), %eax
orl $0x400, %eax # imm = 0x400
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_8bit_collation_flags_from_data:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+58h], 0
jz short loc_E958D
mov rax, [rbp+var_8]
mov rax, [rax+58h]
movzx eax, byte ptr [rax+41h]
mov rcx, [rbp+var_8]
mov rcx, [rcx+58h]
movzx ecx, byte ptr [rcx+61h]
cmp eax, ecx
jge short loc_E958D
mov rax, [rbp+var_8]
mov rax, [rax+58h]
movzx eax, byte ptr [rax+61h]
mov rcx, [rbp+var_8]
mov rcx, [rcx+58h]
movzx ecx, byte ptr [rcx+42h]
cmp eax, ecx
jge short loc_E958D
mov eax, [rbp+var_C]
or eax, 400h
mov [rbp+var_C], eax
loc_E958D:
mov eax, [rbp+var_C]
pop rbp
retn
|
long long my_8bit_collation_flags_from_data(long long a1)
{
unsigned int v2; // [rsp+0h] [rbp-Ch]
v2 = 0;
if ( *(_QWORD *)(a1 + 88)
&& *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 65LL) < (int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 97LL)
&& *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 97LL) < (int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 66LL) )
{
return 1024;
}
return v2;
}
|
my_8bit_collation_flags_from_data:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x58],0x0
JZ 0x001e958d
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX EAX,byte ptr [RAX + 0x41]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x58]
MOVZX ECX,byte ptr [RCX + 0x61]
CMP EAX,ECX
JGE 0x001e958d
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX EAX,byte ptr [RAX + 0x61]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x58]
MOVZX ECX,byte ptr [RCX + 0x42]
CMP EAX,ECX
JGE 0x001e958d
MOV EAX,dword ptr [RBP + -0xc]
OR EAX,0x400
MOV dword ptr [RBP + -0xc],EAX
LAB_001e958d:
MOV EAX,dword ptr [RBP + -0xc]
POP RBP
RET
|
int4 my_8bit_collation_flags_from_data(long param_1)
{
int4 local_14;
local_14 = 0;
if (((*(long *)(param_1 + 0x58) != 0) &&
(*(byte *)(*(long *)(param_1 + 0x58) + 0x41) < *(byte *)(*(long *)(param_1 + 0x58) + 0x61)))
&& (*(byte *)(*(long *)(param_1 + 0x58) + 0x61) < *(byte *)(*(long *)(param_1 + 0x58) + 0x42)))
{
local_14 = 0x400;
}
return local_14;
}
|
|
10,578 |
OrderedMap<QString, QString>::insert(QString const&, QString const&)
|
midoBB[P]pwrctl/QOrderedMap.h
|
typename OrderedMap<Key, Value>::iterator
OrderedMap<Key, Value>::insert(const Key &key, const Value &value) {
OMHashIterator it = data.find(key);
if (it == data.end()) {
// New key
QllIterator ioIter = insertOrder.insert(insertOrder.end(), key);
OMHashValue pair(value, ioIter);
data.insert(key, pair);
return iterator(ioIter, &data);
}
OMHashValue pair = it.value();
// remove old reference
insertOrder.erase(pair.second);
// Add new reference
QllIterator ioIter = insertOrder.insert(insertOrder.end(), key);
pair.first = value;
pair.second = ioIter;
data.insert(key, pair);
return iterator(ioIter, &data);
}
|
O3
|
c
|
OrderedMap<QString, QString>::insert(QString const&, QString const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
callq 0x16ebe
movq %rax, %rcx
orq %rdx, %rcx
jne 0x16dae
leaq 0x8(%rbx), %rdi
movq %rdi, %rsi
movq %r14, %rdx
callq 0x1614e
movq %rax, %r15
movq (%r12), %rax
movq %rax, (%rsp)
movq 0x8(%r12), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%r12), %rcx
movq %rcx, 0x10(%rsp)
testq %rax, %rax
je 0x16d97
lock
incl (%rax)
movq %rsp, %rdx
movq %r15, 0x18(%rdx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17474
jmp 0x16e44
movq 0x20(%rax), %rax
movq %rdx, %rcx
shrq $0x7, %rcx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
leaq (%rax,%rcx), %rsi
andl $0x7f, %edx
movq 0x80(%rax,%rcx), %rax
movzbl (%rdx,%rsi), %ecx
imulq $0x38, %rcx, %rcx
movq 0x18(%rax,%rcx), %rdx
movq %rdx, (%rsp)
movq 0x20(%rax,%rcx), %rsi
movq %rsi, 0x8(%rsp)
movq 0x28(%rax,%rcx), %rsi
movq %rsi, 0x10(%rsp)
testq %rdx, %rdx
je 0x16dfd
lock
incl (%rdx)
movq 0x30(%rax,%rcx), %rsi
movq %rsi, 0x18(%rsp)
leaq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x16cfe
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1614e
movq %rax, %r15
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x9e20
movq %r15, 0x18(%r13)
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x17474
movq (%rsp), %rax
testq %rax, %rax
je 0x16e65
lock
decl (%rax)
jne 0x16e65
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x9550
movq %r15, %rax
movq %rbx, %rdx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x16e7b
movq %rax, %rbx
movq (%rsp), %rax
testq %rax, %rax
je 0x16eb5
lock
decl (%rax)
jne 0x16eb5
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x9550
jmp 0x16eb5
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x16eb5
movq %rsp, %rsi
callq 0xa1cc
movq %rbx, %rdi
callq 0x93d0
nop
|
_ZN10OrderedMapI7QStringS0_E6insertERKS0_S3_:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov r12, rdx
mov r14, rsi
mov rbx, rdi
call _ZN5QHashI7QStringSt4pairIS0_St14_List_iteratorIS0_EEE4findERKS0_; QHash<QString,std::pair<QString,std::_List_iterator<QString>>>::find(QString const&)
mov rcx, rax
or rcx, rdx
jnz short loc_16DAE
lea rdi, [rbx+8]
mov rsi, rdi
mov rdx, r14
call _ZNSt7__cxx114listI7QStringSaIS1_EE6insertESt20_List_const_iteratorIS1_ERKS1_; std::list<QString>::insert(std::_List_const_iterator<QString>,QString const&)
mov r15, rax
mov rax, [r12]
mov [rsp+48h+var_48], rax
mov rcx, [r12+8]
mov [rsp+48h+var_40], rcx
mov rcx, [r12+10h]
mov [rsp+48h+var_38], rcx
test rax, rax
jz short loc_16D97
lock inc dword ptr [rax]
loc_16D97:
mov rdx, rsp
mov [rdx+18h], r15
mov rdi, rbx
mov rsi, r14
call _ZN5QHashI7QStringSt4pairIS0_St14_List_iteratorIS0_EEE7emplaceIJRKS4_EEENS5_8iteratorERKS0_DpOT_; QHash<QString,std::pair<QString,std::_List_iterator<QString>>>::emplace<std::pair<QString,std::_List_iterator<QString>> const&>(QString const&,std::pair<QString,std::_List_iterator<QString>> const&)
jmp loc_16E44
loc_16DAE:
mov rax, [rax+20h]
mov rcx, rdx
shr rcx, 7
lea rcx, [rcx+rcx*8]
shl rcx, 4
lea rsi, [rax+rcx]
and edx, 7Fh
mov rax, [rax+rcx+80h]
movzx ecx, byte ptr [rdx+rsi]
imul rcx, 38h ; '8'
mov rdx, [rax+rcx+18h]
mov [rsp+48h+var_48], rdx
mov rsi, [rax+rcx+20h]
mov [rsp+48h+var_40], rsi
mov rsi, [rax+rcx+28h]
mov [rsp+48h+var_38], rsi
test rdx, rdx
jz short loc_16DFD
lock inc dword ptr [rdx]
loc_16DFD:
mov rsi, [rax+rcx+30h]
mov [rsp+48h+var_30], rsi
lea r15, [rbx+8]
mov rdi, r15
call _ZNSt7__cxx114listI7QStringSaIS1_EE8_M_eraseESt14_List_iteratorIS1_E; std::list<QString>::_M_erase(std::_List_iterator<QString>)
mov rdi, r15
mov rsi, r15
mov rdx, r14
call _ZNSt7__cxx114listI7QStringSaIS1_EE6insertESt20_List_const_iteratorIS1_ERKS1_; std::list<QString>::insert(std::_List_const_iterator<QString>,QString const&)
mov r15, rax
mov r13, rsp
mov rdi, r13
mov rsi, r12
call __ZN7QStringaSERKS_; QString::operator=(QString const&)
mov [r13+18h], r15
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call _ZN5QHashI7QStringSt4pairIS0_St14_List_iteratorIS0_EEE7emplaceIJRKS4_EEENS5_8iteratorERKS0_DpOT_; QHash<QString,std::pair<QString,std::_List_iterator<QString>>>::emplace<std::pair<QString,std::_List_iterator<QString>> const&>(QString const&,std::pair<QString,std::_List_iterator<QString>> const&)
loc_16E44:
mov rax, [rsp+48h+var_48]
test rax, rax
jz short loc_16E65
lock dec dword ptr [rax]
jnz short loc_16E65
mov rdi, [rsp+48h+var_48]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_16E65:
mov rax, r15
mov rdx, rbx
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short $+2
loc_16E7B:
mov rbx, rax
mov rax, [rsp+0]
test rax, rax
jz short loc_16EB5
lock dec dword ptr [rax]
jnz short loc_16EB5
mov rdi, [rsp+0]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
jmp short loc_16EB5
mov rbx, rax
mov rdi, [rsp+0]
test rdi, rdi
jz short loc_16EB5
mov rsi, rsp
call _ZN10OrderedMapI7QStringS0_E6insertERKS0_S3__cold_1; OrderedMap<QString,QString>::insert(QString const&,QString const&) [clone]
loc_16EB5:
mov rdi, rbx
call __Unwind_Resume
|
std::__detail::_List_node_base * OrderedMap<QString,QString>::insert(long long a1, long long a2, long long a3)
{
__int128 v5; // rax
std::__detail::_List_node_base *v6; // r15
volatile signed __int32 *v7; // rax
long long v8; // rsi
long long v9; // rcx
volatile signed __int32 *v12; // [rsp+0h] [rbp-48h] BYREF
long long v13; // [rsp+8h] [rbp-40h]
long long v14; // [rsp+10h] [rbp-38h]
std::__detail::_List_node_base *v15; // [rsp+18h] [rbp-30h]
*(_QWORD *)&v5 = QHash<QString,std::pair<QString,std::_List_iterator<QString>>>::find();
if ( v5 == 0 )
{
v6 = std::list<QString>::insert(a1 + 8, (std::__detail::_List_node_base *)(a1 + 8), a2);
v7 = *(volatile signed __int32 **)a3;
v12 = v7;
v13 = *(_QWORD *)(a3 + 8);
v14 = *(_QWORD *)(a3 + 16);
if ( v7 )
_InterlockedIncrement(v7);
v15 = v6;
QHash<QString,std::pair<QString,std::_List_iterator<QString>>>::emplace<std::pair<QString,std::_List_iterator<QString>> const&>(
a1,
a2,
&v12);
}
else
{
v8 = *(_QWORD *)(v5 + 32) + 144LL * (*((_QWORD *)&v5 + 1) >> 7);
*(_QWORD *)&v5 = *(_QWORD *)(v8 + 128);
v9 = 56LL * *(unsigned __int8 *)((BYTE8(v5) & 0x7F) + v8);
*((_QWORD *)&v5 + 1) = *(_QWORD *)(v5 + v9 + 24);
v12 = (volatile signed __int32 *)*((_QWORD *)&v5 + 1);
v13 = *(_QWORD *)(v5 + v9 + 32);
v14 = *(_QWORD *)(v5 + v9 + 40);
if ( *((_QWORD *)&v5 + 1) )
_InterlockedIncrement(*((volatile signed __int32 **)&v5 + 1));
v15 = *(std::__detail::_List_node_base **)(v5 + v9 + 48);
std::list<QString>::_M_erase(a1 + 8, v15);
v6 = std::list<QString>::insert(a1 + 8, (std::__detail::_List_node_base *)(a1 + 8), a2);
QString::operator=(&v12, a3);
v15 = v6;
QHash<QString,std::pair<QString,std::_List_iterator<QString>>>::emplace<std::pair<QString,std::_List_iterator<QString>> const&>(
a1,
a2,
&v12);
}
if ( v12 && !_InterlockedDecrement(v12) )
QArrayData::deallocate(v12, 2LL, 8LL);
return v6;
}
|
insert:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R12,RDX
MOV R14,RSI
MOV RBX,RDI
CALL 0x00116ebe
MOV RCX,RAX
OR RCX,RDX
JNZ 0x00116dae
LEA RDI,[RBX + 0x8]
MOV RSI,RDI
MOV RDX,R14
CALL 0x0011614e
MOV R15,RAX
MOV RAX,qword ptr [R12]
MOV qword ptr [RSP],RAX
MOV RCX,qword ptr [R12 + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RCX,qword ptr [R12 + 0x10]
MOV qword ptr [RSP + 0x10],RCX
TEST RAX,RAX
JZ 0x00116d97
INC.LOCK dword ptr [RAX]
LAB_00116d97:
MOV RDX,RSP
MOV qword ptr [RDX + 0x18],R15
LAB_00116d9e:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00117474
JMP 0x00116e44
LAB_00116dae:
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,RDX
SHR RCX,0x7
LEA RCX,[RCX + RCX*0x8]
SHL RCX,0x4
LEA RSI,[RAX + RCX*0x1]
AND EDX,0x7f
MOV RAX,qword ptr [RAX + RCX*0x1 + 0x80]
MOVZX ECX,byte ptr [RDX + RSI*0x1]
IMUL RCX,RCX,0x38
MOV RDX,qword ptr [RAX + RCX*0x1 + 0x18]
MOV qword ptr [RSP],RDX
MOV RSI,qword ptr [RAX + RCX*0x1 + 0x20]
MOV qword ptr [RSP + 0x8],RSI
MOV RSI,qword ptr [RAX + RCX*0x1 + 0x28]
MOV qword ptr [RSP + 0x10],RSI
TEST RDX,RDX
JZ 0x00116dfd
INC.LOCK dword ptr [RDX]
LAB_00116dfd:
MOV RSI,qword ptr [RAX + RCX*0x1 + 0x30]
MOV qword ptr [RSP + 0x18],RSI
LEA R15,[RBX + 0x8]
MOV RDI,R15
CALL 0x00116cfe
LAB_00116e13:
MOV RDI,R15
MOV RSI,R15
MOV RDX,R14
CALL 0x0011614e
MOV R15,RAX
MOV R13,RSP
MOV RDI,R13
MOV RSI,R12
CALL 0x00109e20
MOV qword ptr [R13 + 0x18],R15
LAB_00116e36:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x00117474
LAB_00116e44:
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x00116e65
DEC.LOCK dword ptr [RAX]
JNZ 0x00116e65
MOV RDI,qword ptr [RSP]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x00109550
LAB_00116e65:
MOV RAX,R15
MOV RDX,RBX
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* OrderedMap<QString, QString>::insert(QString const&, QString const&) */
int1 [16] __thiscall
OrderedMap<QString,QString>::insert
(OrderedMap<QString,QString> *this,QString *param_1,QString *param_2)
{
list<QString,std::allocator<QString>> *plVar1;
long lVar2;
int8 uVar3;
long lVar4;
long lVar5;
int1 auVar6 [16];
QArrayData *local_48;
int8 local_40;
int8 local_38;
int8 local_30;
auVar6 = QHash<QString,std::pair<QString,std::_List_iterator<QString>>>::find
((QHash<QString,std::pair<QString,std::_List_iterator<QString>>> *)this,param_1
);
if (auVar6._0_8_ == 0 && auVar6._8_8_ == 0) {
uVar3 = std::__cxx11::list<QString,std::allocator<QString>>::insert
((list<QString,std::allocator<QString>> *)(this + 8),
(list<QString,std::allocator<QString>> *)(this + 8),param_1);
local_48 = *(QArrayData **)param_2;
local_40 = *(int8 *)(param_2 + 8);
local_38 = *(int8 *)(param_2 + 0x10);
if (local_48 != (QArrayData *)0x0) {
LOCK();
*(int *)local_48 = *(int *)local_48 + 1;
UNLOCK();
}
local_30 = uVar3;
/* try { // try from 00116d9e to 00116da8 has its CatchHandler @ 00116ea1 */
QHash<QString,std::pair<QString,std::_List_iterator<QString>>>::
emplace<std::pair<QString,std::_List_iterator<QString>>const&>
((QHash<QString,std::pair<QString,std::_List_iterator<QString>>> *)this,param_1,
(pair *)&local_48);
}
else {
lVar5 = *(long *)(auVar6._0_8_ + 0x20);
lVar4 = (auVar6._8_8_ >> 7) * 0x90;
lVar2 = *(long *)(lVar5 + 0x80 + lVar4);
lVar5 = (ulong)*(byte *)((ulong)(auVar6._8_4_ & 0x7f) + lVar5 + lVar4) * 0x38;
local_48 = *(QArrayData **)(lVar2 + 0x18 + lVar5);
local_40 = *(int8 *)(lVar2 + 0x20 + lVar5);
local_38 = *(int8 *)(lVar2 + 0x28 + lVar5);
if (local_48 != (QArrayData *)0x0) {
LOCK();
*(int *)local_48 = *(int *)local_48 + 1;
UNLOCK();
}
local_30 = *(int8 *)(lVar2 + 0x30 + lVar5);
plVar1 = (list<QString,std::allocator<QString>> *)(this + 8);
std::__cxx11::list<QString,std::allocator<QString>>::_M_erase(plVar1);
/* try { // try from 00116e13 to 00116e20 has its CatchHandler @ 00116e7b */
uVar3 = std::__cxx11::list<QString,std::allocator<QString>>::insert(plVar1,plVar1,param_1);
QString::operator=((QString *)&local_48,param_2);
local_30 = uVar3;
/* try { // try from 00116e36 to 00116e43 has its CatchHandler @ 00116e79 */
QHash<QString,std::pair<QString,std::_List_iterator<QString>>>::
emplace<std::pair<QString,std::_List_iterator<QString>>const&>
((QHash<QString,std::pair<QString,std::_List_iterator<QString>>> *)this,param_1,
(pair *)&local_48);
}
if (local_48 != (QArrayData *)0x0) {
LOCK();
*(int *)local_48 = *(int *)local_48 + -1;
UNLOCK();
if (*(int *)local_48 == 0) {
QArrayData::deallocate(local_48,2,8);
}
}
auVar6._8_8_ = this;
auVar6._0_8_ = uVar3;
return auVar6;
}
|
|
10,579 |
apply_one_rule
|
eloqsql/strings/ctype-uca.c
|
static my_bool
apply_one_rule(MY_CHARSET_LOADER *loader,
MY_COLL_RULES *rules, MY_COLL_RULE *r,
MY_UCA_WEIGHT_LEVEL *dst)
{
size_t nweights;
size_t nreset= my_coll_rule_reset_length(r); /* Length of reset sequence */
size_t nshift= my_coll_rule_shift_length(r); /* Length of shift sequence */
uint16 *to;
my_bool rc;
if ((rules->shift_after_method == my_shift_method_expand && r->diff[0]) ||
r->before_level == 1)
{
/*
Suppose we have this rule: &B[before primary] < C
i.e. we need to put C before B, but after A, so
the result order is: A < C < B.
Let primary weight of B be [BBBB].
We cannot just use [BBBB-1] as weight for C:
DUCET does not have enough unused weights between any two characters,
so using [BBBB-1] will likely make C equal to the previous character,
which is A, so we'll get this order instead of the desired: A = C < B.
To guarantee that that C is sorted after A, we'll use expansion
with a kind of "biggest possible character".
As "biggest possible character" we'll use "last_non_ignorable":
We'll compose weight for C as: [BBBB-1][MMMM+1]
where [MMMM] is weight for "last_non_ignorable".
We also do the same trick for "reset after" if the collation
option says so. E.g. for the rules "&B < C", weight for
C will be calculated as: [BBBB][MMMM+1]
At this point we only need to store codepoints
'B' and 'last_non_ignorable'. Actual weights for 'C'
will be calculated according to the above formula later,
in create_tailoring().
*/
if (!my_coll_rule_expand(r->base, MY_UCA_MAX_EXPANSION,
rules->uca->last_non_ignorable))
{
my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset);
return TRUE;
}
nreset= my_coll_rule_reset_length(r);
}
if (nshift >= 2) /* Contraction */
{
MY_CONTRACTIONS *contractions= &dst->contractions;
to= my_uca_init_one_contraction(contractions,
r->curr, (uint)nshift, r->with_context);
/* Store weights of the "reset to" character */
dst->contractions.nitems--; /* Temporarily hide - it's incomplete */
rc= my_char_weight_put(dst,
to, MY_UCA_CONTRACTION_MAX_WEIGHT_SIZE, &nweights,
r->base, nreset);
dst->contractions.nitems++; /* Activate, now it's complete */
}
else
{
my_wc_t pagec= (r->curr[0] >> 8);
DBUG_ASSERT(dst->weights[pagec]);
to= my_char_weight_addr(dst, r->curr[0]);
/* Store weights of the "reset to" character */
rc= my_char_weight_put(dst, to, dst->lengths[pagec], &nweights, r->base, nreset);
}
if (rc)
{
my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset);
return rc;
}
/* Apply level difference. */
return apply_shift(loader, rules, r, dst->levelno, to, nweights);
}
|
O0
|
c
|
apply_one_rule:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x87630
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
callq 0x87650
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1, 0x30(%rax)
jne 0x87009
movq -0x20(%rbp), %rax
cmpl $0x0, 0x80(%rax)
jne 0x87017
movq -0x20(%rbp), %rax
cmpq $0x1, 0x90(%rax)
jne 0x87068
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x78(%rax), %rdx
movl $0xa, %esi
callq 0x86a10
cmpl $0x0, %eax
jne 0x8705b
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %r8
leaq 0x2cbf8(%rip), %rdx # 0xb3c45
callq 0x87680
movb $0x1, -0x1(%rbp)
jmp 0x87188
movq -0x20(%rbp), %rdi
callq 0x87630
movq %rax, -0x38(%rbp)
cmpq $0x2, -0x40(%rbp)
jb 0x870e4
movq -0x28(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x50, %rsi
movq -0x40(%rbp), %rax
movl %eax, %edx
movq -0x20(%rbp), %rax
movsbl 0x98(%rax), %ecx
callq 0x871a0
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x20(%rbp), %r8
movq -0x38(%rbp), %r9
movl $0x11, %edx
leaq -0x30(%rbp), %rcx
callq 0x87740
movb %al, -0x49(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
jmp 0x8713b
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
shrq $0x8, %rax
movq %rax, -0x60(%rbp)
jmp 0x870f6
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movl %eax, %esi
callq 0x84f00
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x60(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %edx
movq -0x20(%rbp), %r8
movq -0x38(%rbp), %r9
leaq -0x30(%rbp), %rcx
callq 0x87740
movb %al, -0x49(%rbp)
cmpb $0x0, -0x49(%rbp)
je 0x87165
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %r8
leaq 0x2caed(%rip), %rdx # 0xb3c45
callq 0x87680
movb -0x49(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x87188
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x48(%rbp), %r8
movq -0x30(%rbp), %r9
callq 0x87940
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
apply_one_rule:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rdi, [rbp+var_20]
call my_coll_rule_reset_length
mov [rbp+var_38], rax
mov rdi, [rbp+var_20]
call my_coll_rule_shift_length
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
cmp dword ptr [rax+30h], 1
jnz short loc_87009
mov rax, [rbp+var_20]
cmp dword ptr [rax+80h], 0
jnz short loc_87017
loc_87009:
mov rax, [rbp+var_20]
cmp qword ptr [rax+90h], 1
jnz short loc_87068
loc_87017:
mov rdi, [rbp+var_20]
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rdx, [rax+78h]
mov esi, 0Ah
call my_coll_rule_expand
cmp eax, 0
jnz short loc_8705B
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_38]
lea rdx, aExpansion; "Expansion"
call my_charset_loader_error_for_rule
mov [rbp+var_1], 1
jmp loc_87188
loc_8705B:
mov rdi, [rbp+var_20]
call my_coll_rule_reset_length
mov [rbp+var_38], rax
loc_87068:
cmp [rbp+var_40], 2
jb short loc_870E4
mov rax, [rbp+var_28]
add rax, 18h
mov [rbp+var_58], rax
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_20]
add rsi, 50h ; 'P'
mov rax, [rbp+var_40]
mov edx, eax
mov rax, [rbp+var_20]
movsx ecx, byte ptr [rax+98h]
call my_uca_init_one_contraction
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov rcx, [rax+18h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+18h], rcx
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_48]
mov r8, [rbp+var_20]
mov r9, [rbp+var_38]
mov edx, 11h
lea rcx, [rbp+var_30]
call my_char_weight_put
mov [rbp+var_49], al
mov rax, [rbp+var_28]
mov rcx, [rax+18h]
add rcx, 1
mov [rax+18h], rcx
jmp short loc_8713B
loc_870E4:
mov rax, [rbp+var_20]
mov rax, [rax+50h]
shr rax, 8
mov [rbp+var_60], rax
jmp short $+2
loc_870F6:
mov rdi, [rbp+var_28]
mov rax, [rbp+var_20]
mov rax, [rax+50h]
mov esi, eax
call my_char_weight_addr
mov [rbp+var_48], rax
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_48]
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rcx, [rbp+var_60]
movzx eax, byte ptr [rax+rcx]
mov edx, eax
mov r8, [rbp+var_20]
mov r9, [rbp+var_38]
lea rcx, [rbp+var_30]
call my_char_weight_put
mov [rbp+var_49], al
loc_8713B:
cmp [rbp+var_49], 0
jz short loc_87165
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_38]
lea rdx, aExpansion; "Expansion"
call my_charset_loader_error_for_rule
mov al, [rbp+var_49]
mov [rbp+var_1], al
jmp short loc_87188
loc_87165:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_28]
mov ecx, [rax+30h]
mov r8, [rbp+var_48]
mov r9, [rbp+var_30]
call apply_shift
mov [rbp+var_1], al
loc_87188:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
|
char apply_one_rule(long long a1, long long a2, long long a3, _QWORD *a4)
{
long long v5; // [rsp+0h] [rbp-60h]
char v6; // [rsp+17h] [rbp-49h]
long long inited; // [rsp+18h] [rbp-48h]
unsigned long long v8; // [rsp+20h] [rbp-40h]
long long v9; // [rsp+28h] [rbp-38h]
long long v10; // [rsp+30h] [rbp-30h] BYREF
_QWORD *v11; // [rsp+38h] [rbp-28h]
long long v12; // [rsp+40h] [rbp-20h]
long long v13; // [rsp+48h] [rbp-18h]
long long v14; // [rsp+50h] [rbp-10h]
v14 = a1;
v13 = a2;
v12 = a3;
v11 = a4;
v9 = my_coll_rule_reset_length(a3);
v8 = my_coll_rule_shift_length(v12);
if ( *(_DWORD *)(a2 + 48) == 1 && *(_DWORD *)(v12 + 128) || *(_QWORD *)(v12 + 144) == 1LL )
{
if ( !(unsigned int)my_coll_rule_expand(v12, 0xAuLL, *(_QWORD *)(*(_QWORD *)(v13 + 8) + 120LL)) )
{
my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9);
return 1;
}
v9 = my_coll_rule_reset_length(v12);
}
if ( v8 < 2 )
{
v5 = *(_QWORD *)(v12 + 80) >> 8;
inited = my_char_weight_addr(v11, *(_QWORD *)(v12 + 80));
v6 = my_char_weight_put(v11, inited, *(unsigned __int8 *)(v11[1] + v5), &v10, v12, v9);
}
else
{
inited = my_uca_init_one_contraction(v11 + 3, v12 + 80, (unsigned int)v8, (unsigned int)*(char *)(v12 + 152));
--v11[3];
v6 = my_char_weight_put(v11, inited, 17LL, &v10, v12, v9);
++v11[3];
}
if ( !v6 )
return apply_shift(v14, v13, v12, *((unsigned int *)v11 + 12), inited, v10);
my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9);
return v6;
}
|
apply_one_rule:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00187630
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00187650
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x30],0x1
JNZ 0x00187009
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x80],0x0
JNZ 0x00187017
LAB_00187009:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x90],0x1
JNZ 0x00187068
LAB_00187017:
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RAX + 0x78]
MOV ESI,0xa
CALL 0x00186a10
CMP EAX,0x0
JNZ 0x0018705b
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x38]
LEA RDX,[0x1b3c45]
CALL 0x00187680
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00187188
LAB_0018705b:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00187630
MOV qword ptr [RBP + -0x38],RAX
LAB_00187068:
CMP qword ptr [RBP + -0x40],0x2
JC 0x001870e4
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x18
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x50
MOV RAX,qword ptr [RBP + -0x40]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOVSX ECX,byte ptr [RAX + 0x98]
CALL 0x001871a0
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x18]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x18],RCX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x48]
MOV R8,qword ptr [RBP + -0x20]
MOV R9,qword ptr [RBP + -0x38]
MOV EDX,0x11
LEA RCX,[RBP + -0x30]
CALL 0x00187740
MOV byte ptr [RBP + -0x49],AL
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x18]
ADD RCX,0x1
MOV qword ptr [RAX + 0x18],RCX
JMP 0x0018713b
LAB_001870e4:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x50]
SHR RAX,0x8
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001870f6
LAB_001870f6:
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x50]
MOV ESI,EAX
CALL 0x00184f00
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x60]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV EDX,EAX
MOV R8,qword ptr [RBP + -0x20]
MOV R9,qword ptr [RBP + -0x38]
LEA RCX,[RBP + -0x30]
CALL 0x00187740
MOV byte ptr [RBP + -0x49],AL
LAB_0018713b:
CMP byte ptr [RBP + -0x49],0x0
JZ 0x00187165
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x38]
LEA RDX,[0x1b3c45]
CALL 0x00187680
MOV AL,byte ptr [RBP + -0x49]
MOV byte ptr [RBP + -0x1],AL
JMP 0x00187188
LAB_00187165:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x30]
MOV R8,qword ptr [RBP + -0x48]
MOV R9,qword ptr [RBP + -0x30]
CALL 0x00187940
MOV byte ptr [RBP + -0x1],AL
LAB_00187188:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int8 apply_one_rule(int8 param_1,long param_2,long param_3,long param_4)
{
char extraout_AL;
int iVar1;
ulong uVar2;
int7 extraout_var;
int8 uVar3;
int7 uVar4;
int7 extraout_var_00;
char local_51;
int8 local_50;
int8 local_40;
int8 local_38;
long local_30;
long local_28;
long local_20;
int8 local_18;
char local_9;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_40 = my_coll_rule_reset_length(param_3);
uVar2 = my_coll_rule_shift_length(local_28);
if (((*(int *)(local_20 + 0x30) == 1) && (*(int *)(local_28 + 0x80) != 0)) ||
(*(long *)(local_28 + 0x90) == 1)) {
iVar1 = my_coll_rule_expand(local_28,10,*(int8 *)(*(long *)(local_20 + 8) + 0x78));
if (iVar1 == 0) {
my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40);
local_9 = '\x01';
uVar4 = extraout_var;
goto LAB_00187188;
}
local_40 = my_coll_rule_reset_length(local_28);
}
if (uVar2 < 2) {
uVar2 = *(ulong *)(local_28 + 0x50);
local_50 = my_char_weight_addr(local_30,*(ulong *)(local_28 + 0x50) & 0xffffffff);
local_51 = my_char_weight_put(local_30,local_50,
*(int1 *)(*(long *)(local_30 + 8) + (uVar2 >> 8)),&local_38,
local_28,local_40);
}
else {
local_50 = my_uca_init_one_contraction
(local_30 + 0x18,local_28 + 0x50,uVar2 & 0xffffffff,
(int)*(char *)(local_28 + 0x98));
*(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + -1;
local_51 = my_char_weight_put(local_30,local_50,0x11,&local_38,local_28,local_40);
*(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + 1;
}
if (local_51 == '\0') {
apply_shift(local_18,local_20,local_28,*(int4 *)(local_30 + 0x30),local_50,local_38);
uVar4 = extraout_var_00;
local_9 = extraout_AL;
}
else {
uVar3 = my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40);
uVar4 = (int7)((ulong)uVar3 >> 8);
local_9 = local_51;
}
LAB_00187188:
return CONCAT71(uVar4,local_9);
}
|
|
10,580 |
pvio_socket_write
|
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
|
ssize_t pvio_socket_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length)
{
ssize_t r;
struct st_pvio_socket *csock;
int timeout;
int send_flags= MSG_DONTWAIT;
#ifdef MSG_NOSIGNAL
send_flags|= MSG_NOSIGNAL;
#endif
if (!pvio || !pvio->data)
return -1;
csock= (struct st_pvio_socket *)pvio->data;
timeout = pvio->timeout[PVIO_WRITE_TIMEOUT];
while ((r = ma_send(csock->socket, (void *)buffer, length,send_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, FALSE, timeout) < 1)
return -1;
}
return r;
}
|
O0
|
c
|
pvio_socket_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x40, -0x38(%rbp)
movl -0x38(%rbp), %eax
orl $0x4000, %eax # imm = 0x4000
movl %eax, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x9be37
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x9be41
movq $-0x1, -0x8(%rbp)
jmp 0x9bebd
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x38(%rbp), %ecx
callq 0x9d390
movq %rax, -0x28(%rbp)
cmpq $-0x1, %rax
jne 0x9beb5
callq 0x3bb30
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
cmpl $0xb, -0x3c(%rbp)
jne 0x9be8c
cmpl $0x0, -0x34(%rbp)
jne 0x9be96
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x9bebd
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %edx
xorl %esi, %esi
callq 0x9bf60
cmpl $0x1, %eax
jge 0x9beb3
movq $-0x1, -0x8(%rbp)
jmp 0x9bebd
jmp 0x9be56
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
pvio_socket_write:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_38], 40h ; '@'
mov eax, [rbp+var_38]
or eax, 4000h
mov [rbp+var_38], eax
cmp [rbp+var_10], 0
jz short loc_9BE37
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_9BE41
loc_9BE37:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_9BEBD
loc_9BE41:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov eax, [rax+2Ch]
mov [rbp+var_34], eax
loc_9BE56:
mov rax, [rbp+var_30]
mov edi, [rax]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_38]
call ma_send
mov [rbp+var_28], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_9BEB5
call ___errno_location
mov eax, [rax]
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0Bh
jnz short loc_9BE8C
cmp [rbp+var_34], 0
jnz short loc_9BE96
loc_9BE8C:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_9BEBD
loc_9BE96:
mov rdi, [rbp+var_10]
mov edx, [rbp+var_34]
xor esi, esi
call pvio_socket_wait_io_or_timeout
cmp eax, 1
jge short loc_9BEB3
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_9BEBD
loc_9BEB3:
jmp short loc_9BE56
loc_9BEB5:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_9BEBD:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long pvio_socket_write(unsigned int **a1, long long a2, long long a3)
{
long long v3; // rdi
unsigned int v5; // [rsp+Ch] [rbp-34h]
unsigned int *v6; // [rsp+10h] [rbp-30h]
long long v7; // [rsp+18h] [rbp-28h]
if ( !a1 || !*a1 )
return -1LL;
v6 = *a1;
v5 = *((_DWORD *)a1 + 11);
while ( 1 )
{
v3 = *v6;
v7 = ma_send(v3, a2, a3, 16448LL);
if ( v7 != -1 )
break;
if ( *(_DWORD *)__errno_location(v3) != 11 || !v5 )
return -1LL;
if ( (int)pvio_socket_wait_io_or_timeout(a1, 0LL, v5) < 1 )
return -1LL;
}
return v7;
}
|
pvio_socket_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x38],0x40
MOV EAX,dword ptr [RBP + -0x38]
OR EAX,0x4000
MOV dword ptr [RBP + -0x38],EAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0019be37
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x0019be41
LAB_0019be37:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x0019bebd
LAB_0019be41:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x2c]
MOV dword ptr [RBP + -0x34],EAX
LAB_0019be56:
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x38]
CALL 0x0019d390
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,-0x1
JNZ 0x0019beb5
CALL 0x0013bb30
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0xb
JNZ 0x0019be8c
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x0019be96
LAB_0019be8c:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0019bebd
LAB_0019be96:
MOV RDI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x34]
XOR ESI,ESI
CALL 0x0019bf60
CMP EAX,0x1
JGE 0x0019beb3
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x0019bebd
LAB_0019beb3:
JMP 0x0019be56
LAB_0019beb5:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_0019bebd:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long pvio_socket_write(long *param_1,int8 param_2,int8 param_3)
{
int iVar1;
int4 *puVar2;
int iVar3;
long lVar4;
int *piVar5;
if ((param_1 != (long *)0x0) && (*param_1 != 0)) {
puVar2 = (int4 *)*param_1;
iVar1 = *(int *)((long)param_1 + 0x2c);
do {
lVar4 = ma_send(*puVar2,param_2,param_3,0x4040);
if (lVar4 != -1) {
return lVar4;
}
piVar5 = __errno_location();
if (*piVar5 != 0xb) {
return -1;
}
if (iVar1 == 0) {
return -1;
}
iVar3 = pvio_socket_wait_io_or_timeout(param_1,0,iVar1);
} while (0 < iVar3);
}
return -1;
}
|
|
10,581 |
diff
|
eloqsql/strings/dtoa.c
|
static Bigint *diff(Bigint *a, Bigint *b, Stack_alloc *alloc)
{
Bigint *c;
int i, wa, wb;
ULong *xa, *xae, *xb, *xbe, *xc;
ULLong borrow, y;
i= cmp(a,b);
if (!i)
{
c= Balloc(0, alloc);
c->wds= 1;
c->p.x[0]= 0;
return c;
}
if (i < 0)
{
c= a;
a= b;
b= c;
i= 1;
}
else
i= 0;
c= Balloc(a->k, alloc);
c->sign= i;
wa= a->wds;
xa= a->p.x;
xae= xa + wa;
wb= b->wds;
xb= b->p.x;
xbe= xb + wb;
xc= c->p.x;
borrow= 0;
do
{
y= (ULLong)*xa++ - *xb++ - borrow;
borrow= y >> 32 & (ULong)1;
*xc++= (ULong) (y & FFFFFFFF);
}
while (xb < xbe);
while (xa < xae)
{
y= *xa++ - borrow;
borrow= y >> 32 & (ULong)1;
*xc++= (ULong) (y & FFFFFFFF);
}
while (!*--xc)
wa--;
c->wds= wa;
return c;
}
|
O3
|
c
|
diff:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x14(%rdi), %eax
movslq 0x14(%rsi), %rdi
subl %edi, %eax
jne 0xd67df
movq (%rbx), %rax
leaq (%rax,%rdi,4), %rcx
movq (%rsi), %r8
leaq (%r8,%rdi,4), %rdi
addq $-0x4, %rdi
movl -0x4(%rcx), %r8d
movl (%rdi), %r9d
cmpl %r9d, %r8d
jne 0xd67d5
addq $-0x4, %rcx
addq $-0x4, %rdi
cmpq %rax, %rcx
ja 0xd679d
xorl %edi, %edi
movq %rdx, %rsi
callq 0xd625c
movl $0x1, 0x14(%rax)
movq (%rax), %rcx
movl $0x0, (%rcx)
jmp 0xd687b
xorl %eax, %eax
cmpl %r9d, %r8d
sbbl %eax, %eax
orl $0x1, %eax
movl %eax, %r14d
shrl $0x1f, %r14d
testl %eax, %eax
movq %rsi, %r15
cmovsq %rbx, %r15
cmovsq %rsi, %rbx
movl 0x8(%rbx), %edi
movq %rdx, %rsi
callq 0xd625c
movl %r14d, 0x10(%rax)
movslq 0x14(%rbx), %rcx
movq (%rbx), %r8
movslq 0x14(%r15), %rdx
movq (%r15), %r9
leaq (%r9,%rdx,4), %r10
movq (%rax), %rdx
xorl %edi, %edi
movq %r8, %rsi
movl (%r9), %r11d
addq %rdi, %r11
movl (%rsi), %edi
addq $0x4, %rsi
addq $0x4, %r9
subq %r11, %rdi
movl %edi, (%rdx)
shrq $0x20, %rdi
andl $0x1, %edi
addq $0x4, %rdx
cmpq %r10, %r9
jb 0xd681c
leaq (%r8,%rcx,4), %r8
cmpq %r8, %rsi
jae 0xd6867
movl (%rsi), %r9d
addq $0x4, %rsi
subq %rdi, %r9
movq %r9, %rdi
shrq $0x20, %rdi
andl $0x1, %edi
movl %r9d, (%rdx)
addq $0x4, %rdx
jmp 0xd6845
incl %ecx
addq $-0x4, %rdx
decl %ecx
cmpl $0x0, (%rdx)
leaq -0x4(%rdx), %rdx
je 0xd686d
movl %ecx, 0x14(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
diff:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov eax, [rdi+14h]
movsxd rdi, dword ptr [rsi+14h]
sub eax, edi
jnz short loc_D67DF
mov rax, [rbx]
lea rcx, [rax+rdi*4]
mov r8, [rsi]
lea rdi, [r8+rdi*4]
add rdi, 0FFFFFFFFFFFFFFFCh
loc_D679D:
mov r8d, [rcx-4]
mov r9d, [rdi]
cmp r8d, r9d
jnz short loc_D67D5
add rcx, 0FFFFFFFFFFFFFFFCh
add rdi, 0FFFFFFFFFFFFFFFCh
cmp rcx, rax
ja short loc_D679D
xor edi, edi
mov rsi, rdx
call Balloc
mov dword ptr [rax+14h], 1
mov rcx, [rax]
mov dword ptr [rcx], 0
jmp loc_D687B
loc_D67D5:
xor eax, eax
cmp r8d, r9d
sbb eax, eax
or eax, 1
loc_D67DF:
mov r14d, eax
shr r14d, 1Fh
test eax, eax
mov r15, rsi
cmovs r15, rbx
cmovs rbx, rsi
mov edi, [rbx+8]
mov rsi, rdx
call Balloc
mov [rax+10h], r14d
movsxd rcx, dword ptr [rbx+14h]
mov r8, [rbx]
movsxd rdx, dword ptr [r15+14h]
mov r9, [r15]
lea r10, [r9+rdx*4]
mov rdx, [rax]
xor edi, edi
mov rsi, r8
loc_D681C:
mov r11d, [r9]
add r11, rdi
mov edi, [rsi]
add rsi, 4
add r9, 4
sub rdi, r11
mov [rdx], edi
shr rdi, 20h
and edi, 1
add rdx, 4
cmp r9, r10
jb short loc_D681C
lea r8, [r8+rcx*4]
loc_D6845:
cmp rsi, r8
jnb short loc_D6867
mov r9d, [rsi]
add rsi, 4
sub r9, rdi
mov rdi, r9
shr rdi, 20h
and edi, 1
mov [rdx], r9d
add rdx, 4
jmp short loc_D6845
loc_D6867:
inc ecx
add rdx, 0FFFFFFFFFFFFFFFCh
loc_D686D:
dec ecx
cmp dword ptr [rdx], 0
lea rdx, [rdx-4]
jz short loc_D686D
mov [rax+14h], ecx
loc_D687B:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long diff(unsigned int **a1, unsigned int **a2, long long a3)
{
unsigned int **v3; // rbx
int v4; // eax
long long v5; // rdi
int v6; // eax
unsigned long long v7; // rcx
unsigned int *i; // rdi
unsigned int v9; // r8d
long long result; // rax
unsigned int v11; // r14d
unsigned int **v12; // r15
long long v13; // rcx
unsigned int *v14; // r8
unsigned int *v15; // r9
unsigned long long v16; // r10
_DWORD *v17; // rdx
long long v18; // rdi
unsigned int *v19; // rsi
long long v20; // r11
long long v21; // rdi
long long v22; // rdi
unsigned long long v23; // r8
long long v24; // r9
long long v25; // r9
int v26; // ecx
_DWORD *v27; // rdx
v3 = a1;
v4 = *((_DWORD *)a1 + 5);
v5 = *((int *)a2 + 5);
v6 = v4 - v5;
if ( !v6 )
{
v7 = (unsigned long long)&(*v3)[v5];
for ( i = &(*a2)[v5 - 1]; ; --i )
{
v9 = *(_DWORD *)(v7 - 4);
if ( v9 != *i )
break;
v7 -= 4LL;
if ( v7 <= (unsigned long long)*v3 )
{
result = Balloc(0, a3);
*(_DWORD *)(result + 20) = 1;
**(_DWORD **)result = 0;
return result;
}
}
v6 = v9 < *i ? -1 : 1;
}
v11 = (unsigned int)v6 >> 31;
v12 = a2;
if ( v6 < 0 )
{
v12 = v3;
v3 = a2;
}
result = Balloc(*((_DWORD *)v3 + 2), a3);
*(_DWORD *)(result + 16) = v11;
v13 = *((int *)v3 + 5);
v14 = *v3;
v15 = *v12;
v16 = (unsigned long long)&(*v12)[*((int *)v12 + 5)];
v17 = *(_DWORD **)result;
v18 = 0LL;
v19 = *v3;
do
{
v20 = v18 + *v15;
v21 = *v19++;
++v15;
v22 = v21 - v20;
*v17 = v22;
v18 = BYTE4(v22) & 1;
++v17;
}
while ( (unsigned long long)v15 < v16 );
v23 = (unsigned long long)&v14[v13];
while ( (unsigned long long)v19 < v23 )
{
v24 = *v19++;
v25 = v24 - v18;
v18 = BYTE4(v25) & 1;
*v17++ = v25;
}
v26 = v13 + 1;
v27 = v17 - 1;
do
--v26;
while ( *v27-- == 0 );
*(_DWORD *)(result + 20) = v26;
return result;
}
|
diff:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x14]
MOVSXD RDI,dword ptr [RSI + 0x14]
SUB EAX,EDI
JNZ 0x001d67df
MOV RAX,qword ptr [RBX]
LEA RCX,[RAX + RDI*0x4]
MOV R8,qword ptr [RSI]
LEA RDI,[R8 + RDI*0x4]
ADD RDI,-0x4
LAB_001d679d:
MOV R8D,dword ptr [RCX + -0x4]
MOV R9D,dword ptr [RDI]
CMP R8D,R9D
JNZ 0x001d67d5
ADD RCX,-0x4
ADD RDI,-0x4
CMP RCX,RAX
JA 0x001d679d
XOR EDI,EDI
MOV RSI,RDX
CALL 0x001d625c
MOV dword ptr [RAX + 0x14],0x1
MOV RCX,qword ptr [RAX]
MOV dword ptr [RCX],0x0
JMP 0x001d687b
LAB_001d67d5:
XOR EAX,EAX
CMP R8D,R9D
SBB EAX,EAX
OR EAX,0x1
LAB_001d67df:
MOV R14D,EAX
SHR R14D,0x1f
TEST EAX,EAX
MOV R15,RSI
CMOVS R15,RBX
CMOVS RBX,RSI
MOV EDI,dword ptr [RBX + 0x8]
MOV RSI,RDX
CALL 0x001d625c
MOV dword ptr [RAX + 0x10],R14D
MOVSXD RCX,dword ptr [RBX + 0x14]
MOV R8,qword ptr [RBX]
MOVSXD RDX,dword ptr [R15 + 0x14]
MOV R9,qword ptr [R15]
LEA R10,[R9 + RDX*0x4]
MOV RDX,qword ptr [RAX]
XOR EDI,EDI
MOV RSI,R8
LAB_001d681c:
MOV R11D,dword ptr [R9]
ADD R11,RDI
MOV EDI,dword ptr [RSI]
ADD RSI,0x4
ADD R9,0x4
SUB RDI,R11
MOV dword ptr [RDX],EDI
SHR RDI,0x20
AND EDI,0x1
ADD RDX,0x4
CMP R9,R10
JC 0x001d681c
LEA R8,[R8 + RCX*0x4]
LAB_001d6845:
CMP RSI,R8
JNC 0x001d6867
MOV R9D,dword ptr [RSI]
ADD RSI,0x4
SUB R9,RDI
MOV RDI,R9
SHR RDI,0x20
AND EDI,0x1
MOV dword ptr [RDX],R9D
ADD RDX,0x4
JMP 0x001d6845
LAB_001d6867:
INC ECX
ADD RDX,-0x4
LAB_001d686d:
DEC ECX
CMP dword ptr [RDX],0x0
LEA RDX,[RDX + -0x4]
JZ 0x001d686d
MOV dword ptr [RAX + 0x14],ECX
LAB_001d687b:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void diff(ulong *param_1,ulong *param_2,int8 param_3)
{
uint uVar1;
uint *puVar2;
uint uVar3;
int8 *puVar4;
int iVar5;
ulong uVar6;
int *piVar7;
ulong *puVar8;
uint *puVar9;
uint *puVar10;
long lVar11;
uint *puVar12;
iVar5 = *(int *)((long)param_2 + 0x14);
uVar3 = *(int *)((long)param_1 + 0x14) - iVar5;
if (uVar3 == 0) {
uVar6 = *param_1 + (long)iVar5 * 4;
puVar10 = (uint *)(*param_2 + (long)iVar5 * 4);
do {
puVar10 = puVar10 + -1;
if (*(uint *)(uVar6 - 4) != *puVar10) {
uVar3 = -(uint)(*(uint *)(uVar6 - 4) < *puVar10) | 1;
goto LAB_001d67df;
}
uVar6 = uVar6 - 4;
} while (*param_1 < uVar6);
puVar4 = (int8 *)Balloc(0,param_3);
*(int4 *)((long)puVar4 + 0x14) = 1;
*(int4 *)*puVar4 = 0;
}
else {
LAB_001d67df:
puVar8 = param_1;
if ((int)uVar3 < 0) {
puVar8 = param_2;
param_2 = param_1;
}
puVar4 = (int8 *)Balloc((int)puVar8[1],param_3);
*(uint *)(puVar4 + 2) = uVar3 >> 0x1f;
iVar5 = *(int *)((long)puVar8 + 0x14);
puVar2 = (uint *)*puVar8;
puVar12 = (uint *)*param_2;
puVar10 = puVar12 + *(int *)((long)param_2 + 0x14);
piVar7 = (int *)*puVar4;
uVar6 = 0;
puVar9 = puVar2;
do {
uVar3 = *puVar12;
uVar1 = *puVar9;
puVar9 = puVar9 + 1;
puVar12 = puVar12 + 1;
lVar11 = (ulong)uVar1 - (uVar3 + uVar6);
*piVar7 = (int)lVar11;
uVar6 = (ulong)((uint)((ulong)lVar11 >> 0x20) & 1);
piVar7 = piVar7 + 1;
} while (puVar12 < puVar10);
for (; puVar9 < puVar2 + iVar5; puVar9 = puVar9 + 1) {
lVar11 = *puVar9 - uVar6;
uVar6 = (ulong)((uint)((ulong)lVar11 >> 0x20) & 1);
*piVar7 = (int)lVar11;
piVar7 = piVar7 + 1;
}
iVar5 = iVar5 + 1;
do {
piVar7 = piVar7 + -1;
iVar5 = iVar5 + -1;
} while (*piVar7 == 0);
*(int *)((long)puVar4 + 0x14) = iVar5;
}
return;
}
|
|
10,582 |
JS_ToQuotedString
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_ToQuotedString(JSContext *ctx, JSValue val1)
{
JSValue val;
JSString *p;
int i;
uint32_t c;
StringBuffer b_s, *b = &b_s;
char buf[16];
val = JS_ToStringCheckObject(ctx, val1);
if (JS_IsException(val))
return val;
p = JS_VALUE_GET_STRING(val);
if (string_buffer_init(ctx, b, p->len + 2))
goto fail;
if (string_buffer_putc8(b, '\"'))
goto fail;
for(i = 0; i < p->len; ) {
c = string_getc(p, &i);
switch(c) {
case '\t':
c = 't';
goto quote;
case '\r':
c = 'r';
goto quote;
case '\n':
c = 'n';
goto quote;
case '\b':
c = 'b';
goto quote;
case '\f':
c = 'f';
goto quote;
case '\"':
case '\\':
quote:
if (string_buffer_putc8(b, '\\'))
goto fail;
if (string_buffer_putc8(b, c))
goto fail;
break;
default:
if (c < 32 || is_surrogate(c)) {
snprintf(buf, sizeof(buf), "\\u%04x", c);
if (string_buffer_write8(b, (uint8_t*)buf, 6))
goto fail;
} else {
if (string_buffer_putc(b, c))
goto fail;
}
break;
}
}
if (string_buffer_putc8(b, '\"'))
goto fail;
JS_FreeValue(ctx, val);
return string_buffer_end(b);
fail:
JS_FreeValue(ctx, val);
string_buffer_free(b);
return JS_EXCEPTION;
}
|
O0
|
c
|
JS_ToQuotedString:
subq $0xa8, %rsp
movq %rsi, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq %rdi, 0x80(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x6f510
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x871b7
movq 0x70(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x873e6
movq 0x70(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x80(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x68(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %edx
addl $0x2, %edx
callq 0x4f380
cmpl $0x0, %eax
je 0x871f1
jmp 0x873ae
movq 0x38(%rsp), %rdi
movl $0x22, %esi
callq 0x83280
cmpl $0x0, %eax
je 0x8720a
jmp 0x873ae
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
movq 0x68(%rsp), %rcx
movq 0x4(%rcx), %rcx
andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jge 0x87365
movq 0x68(%rsp), %rdi
leaq 0x64(%rsp), %rsi
callq 0x848a0
movl %eax, 0x60(%rsp)
movl 0x60(%rsp), %eax
movl %eax, 0xc(%rsp)
subl $0x8, %eax
je 0x872b0
jmp 0x87250
movl 0xc(%rsp), %eax
subl $0x9, %eax
je 0x87292
jmp 0x8725b
movl 0xc(%rsp), %eax
subl $0xa, %eax
je 0x872a6
jmp 0x87266
movl 0xc(%rsp), %eax
subl $0xc, %eax
je 0x872ba
jmp 0x87271
movl 0xc(%rsp), %eax
subl $0xd, %eax
je 0x8729c
jmp 0x8727c
movl 0xc(%rsp), %eax
subl $0x22, %eax
je 0x872c4
jmp 0x87287
movl 0xc(%rsp), %eax
subl $0x5c, %eax
je 0x872c4
jmp 0x872f9
movl $0x74, 0x60(%rsp)
jmp 0x872c6
movl $0x72, 0x60(%rsp)
jmp 0x872c6
movl $0x6e, 0x60(%rsp)
jmp 0x872c6
movl $0x62, 0x60(%rsp)
jmp 0x872c6
movl $0x66, 0x60(%rsp)
jmp 0x872c6
jmp 0x872c6
movq 0x38(%rsp), %rdi
movl $0x5c, %esi
callq 0x83280
cmpl $0x0, %eax
je 0x872df
jmp 0x873ae
movq 0x38(%rsp), %rdi
movl 0x60(%rsp), %esi
callq 0x83280
cmpl $0x0, %eax
je 0x872f7
jmp 0x873ae
jmp 0x87360
cmpl $0x20, 0x60(%rsp)
jb 0x8730e
movl 0x60(%rsp), %edi
callq 0x84e00
cmpl $0x0, %eax
je 0x87347
leaq 0x20(%rsp), %rdi
movl 0x60(%rsp), %ecx
movl $0x10, %esi
leaq 0x86209(%rip), %rdx # 0x10d52c
movb $0x0, %al
callq 0xe2d0
movq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x6, %edx
callq 0x6e860
cmpl $0x0, %eax
je 0x87345
jmp 0x873ae
jmp 0x8735e
movq 0x38(%rsp), %rdi
movl 0x60(%rsp), %esi
callq 0x4c7c0
cmpl $0x0, %eax
je 0x8735c
jmp 0x873ae
jmp 0x8735e
jmp 0x87360
jmp 0x87212
movq 0x38(%rsp), %rdi
movl $0x22, %esi
callq 0x83280
cmpl $0x0, %eax
je 0x8737b
jmp 0x873ae
movq 0x80(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x229d0
movq 0x38(%rsp), %rdi
callq 0x4c840
movq %rax, 0x98(%rsp)
movq %rdx, 0xa0(%rsp)
jmp 0x873e6
movq 0x80(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x229d0
movq 0x38(%rsp), %rdi
callq 0x511f0
movl $0x0, 0x98(%rsp)
movq $0x6, 0xa0(%rsp)
movq 0x98(%rsp), %rax
movq 0xa0(%rsp), %rdx
addq $0xa8, %rsp
retq
nop
|
JS_ToQuotedString:
sub rsp, 0A8h
mov [rsp+0A8h+var_20], rsi
mov [rsp+0A8h+var_18], rdx
mov [rsp+0A8h+var_28], rdi
lea rax, [rsp+0A8h+var_68]
mov [rsp+0A8h+var_70], rax
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_20]
mov rdx, [rsp+0A8h+var_18]
call JS_ToStringCheckObject
mov [rsp+0A8h+var_98], rax
mov [rsp+0A8h+var_90], rdx
mov rax, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_38], rax
mov rax, [rsp+0A8h+var_90]
mov [rsp+0A8h+var_30], rax
mov rdi, [rsp+0A8h+var_38]
mov rsi, [rsp+0A8h+var_30]
call JS_IsException_1
cmp eax, 0
jz short loc_871B7
mov rax, [rsp+0A8h+var_38]
mov [rsp+0A8h+var_10], rax
mov rax, [rsp+0A8h+var_30]
mov [rsp+0A8h+var_8], rax
jmp loc_873E6
loc_871B7:
mov rax, [rsp+0A8h+var_38]
mov [rsp+0A8h+var_40], rax
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_70]
mov rax, [rsp+0A8h+var_40]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov edx, eax
add edx, 2
call string_buffer_init
cmp eax, 0
jz short loc_871F1
jmp loc_873AE
loc_871F1:
mov rdi, [rsp+0A8h+var_70]
mov esi, 22h ; '"'
call string_buffer_putc8
cmp eax, 0
jz short loc_8720A
jmp loc_873AE
loc_8720A:
mov [rsp+0A8h+var_44], 0
loc_87212:
mov eax, [rsp+0A8h+var_44]
mov rcx, [rsp+0A8h+var_40]
mov rcx, [rcx+4]
and rcx, 7FFFFFFFh
cmp eax, ecx
jge loc_87365
mov rdi, [rsp+0A8h+var_40]
lea rsi, [rsp+0A8h+var_44]
call string_getc
mov [rsp+0A8h+var_48], eax
mov eax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_9C], eax
sub eax, 8
jz short loc_872B0
jmp short $+2
loc_87250:
mov eax, [rsp+0A8h+var_9C]
sub eax, 9
jz short loc_87292
jmp short $+2
loc_8725B:
mov eax, [rsp+0A8h+var_9C]
sub eax, 0Ah
jz short loc_872A6
jmp short $+2
loc_87266:
mov eax, [rsp+0A8h+var_9C]
sub eax, 0Ch
jz short loc_872BA
jmp short $+2
loc_87271:
mov eax, [rsp+0A8h+var_9C]
sub eax, 0Dh
jz short loc_8729C
jmp short $+2
loc_8727C:
mov eax, [rsp+0A8h+var_9C]
sub eax, 22h ; '"'
jz short loc_872C4
jmp short $+2
loc_87287:
mov eax, [rsp+0A8h+var_9C]
sub eax, 5Ch ; '\'
jz short loc_872C4
jmp short loc_872F9
loc_87292:
mov [rsp+0A8h+var_48], 74h ; 't'
jmp short loc_872C6
loc_8729C:
mov [rsp+0A8h+var_48], 72h ; 'r'
jmp short loc_872C6
loc_872A6:
mov [rsp+0A8h+var_48], 6Eh ; 'n'
jmp short loc_872C6
loc_872B0:
mov [rsp+0A8h+var_48], 62h ; 'b'
jmp short loc_872C6
loc_872BA:
mov [rsp+0A8h+var_48], 66h ; 'f'
jmp short loc_872C6
loc_872C4:
jmp short $+2
loc_872C6:
mov rdi, [rsp+0A8h+var_70]
mov esi, 5Ch ; '\'
call string_buffer_putc8
cmp eax, 0
jz short loc_872DF
jmp loc_873AE
loc_872DF:
mov rdi, [rsp+0A8h+var_70]
mov esi, [rsp+0A8h+var_48]
call string_buffer_putc8
cmp eax, 0
jz short loc_872F7
jmp loc_873AE
loc_872F7:
jmp short loc_87360
loc_872F9:
cmp [rsp+0A8h+var_48], 20h ; ' '
jb short loc_8730E
mov edi, [rsp+0A8h+var_48]
call is_surrogate
cmp eax, 0
jz short loc_87347
loc_8730E:
lea rdi, [rsp+0A8h+var_88]
mov ecx, [rsp+0A8h+var_48]
mov esi, 10h
lea rdx, aU04x; "\\u%04x"
mov al, 0
call _snprintf
mov rdi, [rsp+0A8h+var_70]
lea rsi, [rsp+0A8h+var_88]
mov edx, 6
call string_buffer_write8
cmp eax, 0
jz short loc_87345
jmp short loc_873AE
loc_87345:
jmp short loc_8735E
loc_87347:
mov rdi, [rsp+0A8h+var_70]
mov esi, [rsp+0A8h+var_48]
call string_buffer_putc
cmp eax, 0
jz short loc_8735C
jmp short loc_873AE
loc_8735C:
jmp short $+2
loc_8735E:
jmp short $+2
loc_87360:
jmp loc_87212
loc_87365:
mov rdi, [rsp+0A8h+var_70]
mov esi, 22h ; '"'
call string_buffer_putc8
cmp eax, 0
jz short loc_8737B
jmp short loc_873AE
loc_8737B:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_38]
mov rdx, [rsp+0A8h+var_30]
call JS_FreeValue
mov rdi, [rsp+0A8h+var_70]
call string_buffer_end
mov [rsp+0A8h+var_10], rax
mov [rsp+0A8h+var_8], rdx
jmp short loc_873E6
loc_873AE:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_38]
mov rdx, [rsp+0A8h+var_30]
call JS_FreeValue
mov rdi, [rsp+0A8h+var_70]
call string_buffer_free
mov dword ptr [rsp+0A8h+var_10], 0
mov [rsp+0A8h+var_8], 6
loc_873E6:
mov rax, [rsp+0A8h+var_10]
mov rdx, [rsp+0A8h+var_8]
add rsp, 0A8h
retn
|
long long JS_ToQuotedString(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rdx
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // rdx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
long long v26; // rcx
long long v27; // rdx
long long v28; // rcx
long long v29; // r8
long long v30; // r9
__m128 v31; // xmm4
__m128 v32; // xmm5
long long v33; // rdx
long long v34; // rcx
long long v35; // r8
long long v36; // r9
__m128 v37; // xmm4
__m128 v38; // xmm5
long long v39; // rdx
_BYTE v41[24]; // [rsp+20h] [rbp-88h] BYREF
long long *v42; // [rsp+38h] [rbp-70h]
char v43; // [rsp+40h] [rbp-68h] BYREF
unsigned int v44; // [rsp+60h] [rbp-48h]
int v45; // [rsp+64h] [rbp-44h] BYREF
long long v46; // [rsp+68h] [rbp-40h]
long long v47; // [rsp+70h] [rbp-38h]
long long v48; // [rsp+78h] [rbp-30h]
long long v49; // [rsp+80h] [rbp-28h]
long long v50; // [rsp+88h] [rbp-20h]
long long v51; // [rsp+90h] [rbp-18h]
long long v52; // [rsp+98h] [rbp-10h]
long long v53; // [rsp+A0h] [rbp-8h]
v50 = a2;
v51 = a3;
v49 = a1;
v42 = (long long *)&v43;
v47 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v48 = v14;
if ( !JS_IsException_1(v47, v14) )
{
v46 = v47;
if ( (unsigned int)string_buffer_init(v49, (long long)v42, (*(_DWORD *)(v47 + 4) & 0x7FFFFFFFu) + 2)
|| (unsigned int)string_buffer_putc8((long long)v42, 0x22u, a7, a8, a9, a10, v19, v20, a13, a14, v15, v16, v17, v18) )
{
goto LABEL_31;
}
v45 = 0;
while ( 1 )
{
v26 = *(_QWORD *)(v46 + 4) & 0x7FFFFFFFLL;
if ( v45 >= (int)v26 )
{
if ( !(unsigned int)string_buffer_putc8(
(long long)v42,
0x22u,
a7,
a8,
a9,
a10,
v24,
v25,
a13,
a14,
v21,
v26,
v22,
v23) )
{
JS_FreeValue(v49, v47, v48);
v52 = string_buffer_end((long long)v42);
v53 = v39;
return v52;
}
LABEL_31:
JS_FreeValue(v49, v47, v48);
string_buffer_free(v42);
LODWORD(v52) = 0;
v53 = 6LL;
return v52;
}
v44 = string_getc(v46, &v45);
if ( v44 == 8 )
break;
switch ( v44 )
{
case 9u:
v44 = 116;
goto LABEL_20;
case 0xAu:
v44 = 110;
goto LABEL_20;
case 0xCu:
v44 = 102;
LABEL_20:
if ( (unsigned int)string_buffer_putc8(
(long long)v42,
0x5Cu,
a7,
a8,
a9,
a10,
v31,
v32,
a13,
a14,
v27,
v28,
v29,
v30)
|| (unsigned int)string_buffer_putc8(
(long long)v42,
v44,
a7,
a8,
a9,
a10,
v37,
v38,
a13,
a14,
v33,
v34,
v35,
v36) )
{
goto LABEL_31;
}
break;
case 0xDu:
v44 = 114;
goto LABEL_20;
case 0x22u:
case 0x5Cu:
goto LABEL_20;
default:
if ( v44 < 0x20 || is_surrogate(v44) )
{
snprintf(v41, 16LL, "\\u%04x", v44);
if ( (unsigned int)string_buffer_write8((long long)v42, (long long)v41, 6) )
goto LABEL_31;
}
else if ( (unsigned int)string_buffer_putc((long long)v42, v44) )
{
goto LABEL_31;
}
break;
}
}
v44 = 98;
goto LABEL_20;
}
v52 = v47;
v53 = v48;
return v52;
}
|
JS_ToQuotedString:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x88],RSI
MOV qword ptr [RSP + 0x90],RDX
MOV qword ptr [RSP + 0x80],RDI
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
CALL 0x0016f510
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x78],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x001871b7
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x001873e6
LAB_001871b7:
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x68],RAX
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EDX,EAX
ADD EDX,0x2
CALL 0x0014f380
CMP EAX,0x0
JZ 0x001871f1
JMP 0x001873ae
LAB_001871f1:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,0x22
CALL 0x00183280
CMP EAX,0x0
JZ 0x0018720a
JMP 0x001873ae
LAB_0018720a:
MOV dword ptr [RSP + 0x64],0x0
LAB_00187212:
MOV EAX,dword ptr [RSP + 0x64]
MOV RCX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RCX + 0x4]
AND RCX,0x7fffffff
CMP EAX,ECX
JGE 0x00187365
MOV RDI,qword ptr [RSP + 0x68]
LEA RSI,[RSP + 0x64]
CALL 0x001848a0
MOV dword ptr [RSP + 0x60],EAX
MOV EAX,dword ptr [RSP + 0x60]
MOV dword ptr [RSP + 0xc],EAX
SUB EAX,0x8
JZ 0x001872b0
JMP 0x00187250
LAB_00187250:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x9
JZ 0x00187292
JMP 0x0018725b
LAB_0018725b:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0xa
JZ 0x001872a6
JMP 0x00187266
LAB_00187266:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0xc
JZ 0x001872ba
JMP 0x00187271
LAB_00187271:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0xd
JZ 0x0018729c
JMP 0x0018727c
LAB_0018727c:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x22
JZ 0x001872c4
JMP 0x00187287
LAB_00187287:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x5c
JZ 0x001872c4
JMP 0x001872f9
LAB_00187292:
MOV dword ptr [RSP + 0x60],0x74
JMP 0x001872c6
LAB_0018729c:
MOV dword ptr [RSP + 0x60],0x72
JMP 0x001872c6
LAB_001872a6:
MOV dword ptr [RSP + 0x60],0x6e
JMP 0x001872c6
LAB_001872b0:
MOV dword ptr [RSP + 0x60],0x62
JMP 0x001872c6
LAB_001872ba:
MOV dword ptr [RSP + 0x60],0x66
JMP 0x001872c6
LAB_001872c4:
JMP 0x001872c6
LAB_001872c6:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,0x5c
CALL 0x00183280
CMP EAX,0x0
JZ 0x001872df
JMP 0x001873ae
LAB_001872df:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x60]
CALL 0x00183280
CMP EAX,0x0
JZ 0x001872f7
JMP 0x001873ae
LAB_001872f7:
JMP 0x00187360
LAB_001872f9:
CMP dword ptr [RSP + 0x60],0x20
JC 0x0018730e
MOV EDI,dword ptr [RSP + 0x60]
CALL 0x00184e00
CMP EAX,0x0
JZ 0x00187347
LAB_0018730e:
LEA RDI,[RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x60]
MOV ESI,0x10
LEA RDX,[0x20d52c]
MOV AL,0x0
CALL 0x0010e2d0
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x20]
MOV EDX,0x6
CALL 0x0016e860
CMP EAX,0x0
JZ 0x00187345
JMP 0x001873ae
LAB_00187345:
JMP 0x0018735e
LAB_00187347:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x60]
CALL 0x0014c7c0
CMP EAX,0x0
JZ 0x0018735c
JMP 0x001873ae
LAB_0018735c:
JMP 0x0018735e
LAB_0018735e:
JMP 0x00187360
LAB_00187360:
JMP 0x00187212
LAB_00187365:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,0x22
CALL 0x00183280
CMP EAX,0x0
JZ 0x0018737b
JMP 0x001873ae
LAB_0018737b:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0014c840
MOV qword ptr [RSP + 0x98],RAX
MOV qword ptr [RSP + 0xa0],RDX
JMP 0x001873e6
LAB_001873ae:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x001511f0
MOV dword ptr [RSP + 0x98],0x0
MOV qword ptr [RSP + 0xa0],0x6
LAB_001873e6:
MOV RAX,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
ADD RSP,0xa8
RET
|
int1 [16] JS_ToQuotedString(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
int1 auVar2 [16];
char local_88 [24];
int1 *local_70;
int1 local_68 [32];
uint local_48;
int local_44;
long local_40;
int1 local_38 [16];
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_70 = local_68;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_38 = JS_ToStringCheckObject(param_1,param_2,param_3);
iVar1 = JS_IsException(local_38._0_8_,local_38._8_8_);
if (iVar1 == 0) {
local_40 = local_38._0_8_;
iVar1 = string_buffer_init(local_28,local_70,
((uint)*(int8 *)(local_38._0_8_ + 4) & 0x7fffffff) + 2);
if (iVar1 == 0) {
iVar1 = string_buffer_putc8(local_70,0x22);
if (iVar1 == 0) {
local_44 = 0;
do {
while( true ) {
if ((int)((uint)*(int8 *)(local_40 + 4) & 0x7fffffff) <= local_44) {
iVar1 = string_buffer_putc8(local_70,0x22);
if (iVar1 == 0) {
JS_FreeValue(local_28,local_38._0_8_,local_38._8_8_);
auVar2 = string_buffer_end(local_70);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
goto LAB_001873e6;
}
goto LAB_001873ae;
}
local_48 = string_getc(local_40,&local_44);
if (local_48 != 8) break;
local_48 = 0x62;
LAB_001872c6:
iVar1 = string_buffer_putc8(local_70,0x5c);
if (iVar1 != 0) goto LAB_001873ae;
iVar1 = string_buffer_putc8(local_70,local_48);
if (iVar1 != 0) goto LAB_001873ae;
}
if (local_48 == 9) {
local_48 = 0x74;
goto LAB_001872c6;
}
if (local_48 == 10) {
local_48 = 0x6e;
goto LAB_001872c6;
}
if (local_48 == 0xc) {
local_48 = 0x66;
goto LAB_001872c6;
}
if (local_48 == 0xd) {
local_48 = 0x72;
goto LAB_001872c6;
}
if ((local_48 == 0x22) || (local_48 == 0x5c)) goto LAB_001872c6;
if (local_48 < 0x20) {
LAB_0018730e:
snprintf(local_88,0x10,"\\u%04x",(ulong)local_48);
iVar1 = string_buffer_write8(local_70,local_88,6);
}
else {
iVar1 = is_surrogate(local_48);
if (iVar1 != 0) goto LAB_0018730e;
iVar1 = string_buffer_putc(local_70,local_48);
}
} while (iVar1 == 0);
}
}
LAB_001873ae:
JS_FreeValue(local_28,local_38._0_8_,local_38._8_8_);
string_buffer_free(local_70);
local_10 = 0;
local_8 = 6;
}
else {
local_10 = local_38._0_4_;
uStack_c = local_38._4_4_;
local_8 = local_38._8_8_;
}
LAB_001873e6:
auVar2._4_4_ = uStack_c;
auVar2._0_4_ = local_10;
auVar2._8_8_ = local_8;
return auVar2;
}
|
|
10,583 |
fn_format
|
eloqsql/mysys/mf_format.c
|
char * fn_format(char * to, const char *name, const char *dir,
const char *extension, uint flag)
{
char dev[FN_REFLEN], buff[FN_REFLEN], *pos, *startpos;
const char *ext;
reg1 size_t length;
size_t dev_length;
DBUG_ENTER("fn_format");
DBUG_ASSERT(name != NULL);
DBUG_ASSERT(extension != NULL);
DBUG_PRINT("enter",("name: %s dir: %s extension: %s flag: %d",
name,dir,extension,flag));
/* Copy and skip directory */
name+=(length=dirname_part(dev, (startpos=(char *) name), &dev_length));
if (length == 0 || (flag & MY_REPLACE_DIR))
{
/* Use given directory */
convert_dirname(dev,dir,NullS); /* Fix to this OS */
}
else if ((flag & MY_RELATIVE_PATH) && !test_if_hard_path(dev))
{
/* Put 'dir' before the given path */
strmake_buf(buff, dev);
pos=convert_dirname(dev,dir,NullS);
strmake(pos,buff,sizeof(buff)-1- (int) (pos-dev));
}
if (flag & MY_PACK_FILENAME)
pack_dirname(dev,dev); /* Put in ./.. and ~/.. */
if (flag & MY_UNPACK_FILENAME)
(void) unpack_dirname(dev,dev); /* Replace ~/.. with dir */
if (!(flag & MY_APPEND_EXT) &&
(pos= (char*) strchr(name,FN_EXTCHAR)) != NullS)
{
if ((flag & MY_REPLACE_EXT) == 0) /* If we should keep old ext */
{
length=strlength(name); /* Use old extension */
ext = "";
}
else
{
length= (size_t) (pos-(char*) name); /* Change extension */
ext= extension;
}
}
else
{
length=strlength(name); /* No ext, use the now one */
ext=extension;
}
if (strlen(dev)+length+strlen(ext) >= FN_REFLEN || length >= FN_LEN )
{
/* To long path, return original or NULL */
size_t tmp_length;
if (flag & MY_SAFE_PATH)
DBUG_RETURN(NullS);
tmp_length= strlength(startpos);
DBUG_PRINT("error",("dev: '%s' ext: '%s' length: %u",dev,ext,
(uint) length));
(void) strmake(to,startpos,MY_MIN(tmp_length,FN_REFLEN-1));
}
else
{
if (to == startpos)
{
bmove(buff,(uchar*) name,length); /* Save name for last copy */
name=buff;
}
pos=strmake(strmov(to,dev),name,length);
(void) strmov(pos,ext); /* Don't convert extension */
}
if (flag & MY_RETURN_REAL_PATH)
(void) my_realpath(to, to, MYF(0));
else if (flag & MY_RESOLVE_SYMLINKS)
{
strmov(buff,to);
(void) my_readlink(to, buff, MYF(0));
}
DBUG_RETURN(to);
}
|
O0
|
c
|
fn_format:
pushq %rbp
movq %rsp, %rbp
subq $0x6a0, %rsp # imm = 0x6A0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x620(%rbp)
movq %rsi, -0x628(%rbp)
movq %rdx, -0x630(%rbp)
movq %rcx, -0x638(%rbp)
movl %r8d, -0x63c(%rbp)
jmp 0x6dc8d
jmp 0x6dc8f
jmp 0x6dc91
jmp 0x6dc93
jmp 0x6dc95
leaq -0x210(%rbp), %rdi
movq -0x628(%rbp), %rsi
movq %rsi, -0x650(%rbp)
leaq -0x668(%rbp), %rdx
callq 0x6db30
movq %rax, -0x660(%rbp)
addq -0x628(%rbp), %rax
movq %rax, -0x628(%rbp)
cmpq $0x0, -0x660(%rbp)
je 0x6dce3
movl -0x63c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x6dcff
leaq -0x210(%rbp), %rdi
movq -0x630(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x6db90
jmp 0x6ddaf
movl -0x63c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x6ddad
leaq -0x210(%rbp), %rdi
callq 0x7d0d0
cmpl $0x0, %eax
jne 0x6ddad
leaq -0x610(%rbp), %rdi
xorl %esi, %esi
movl $0x200, %edx # imm = 0x200
callq 0x281c0
movb $0x2, -0x610(%rbp)
leaq -0x410(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0xd60f0
movq %rax, -0x670(%rbp)
leaq -0x210(%rbp), %rdi
movq -0x630(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x6db90
movq %rax, -0x648(%rbp)
movq -0x648(%rbp), %rdi
leaq -0x410(%rbp), %rsi
movq -0x648(%rbp), %rax
leaq -0x210(%rbp), %rcx
subq %rcx, %rax
cltq
movl $0x1ff, %edx # imm = 0x1FF
subq %rax, %rdx
callq 0xd60f0
jmp 0x6ddaf
movl -0x63c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x6ddd0
leaq -0x210(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x76db0
movl -0x63c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x6ddf1
leaq -0x210(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x77830
movl -0x63c(%rbp), %eax
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
jne 0x6de78
movq -0x628(%rbp), %rdi
movl $0x2e, %esi
callq 0x28110
movq %rax, -0x648(%rbp)
cmpq $0x0, %rax
je 0x6de78
movl -0x63c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x6de50
movq -0x628(%rbp), %rdi
callq 0x6e0a0
movq %rax, -0x660(%rbp)
leaq 0x6f5c4(%rip), %rax # 0xdd40b
movq %rax, -0x658(%rbp)
jmp 0x6de76
movq -0x648(%rbp), %rax
movq -0x628(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x660(%rbp)
movq -0x638(%rbp), %rax
movq %rax, -0x658(%rbp)
jmp 0x6de99
movq -0x628(%rbp), %rdi
callq 0x6e0a0
movq %rax, -0x660(%rbp)
movq -0x638(%rbp), %rax
movq %rax, -0x658(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x28140
addq -0x660(%rbp), %rax
movq %rax, -0x680(%rbp)
movq -0x658(%rbp), %rdi
callq 0x28140
movq %rax, %rcx
movq -0x680(%rbp), %rax
addq %rcx, %rax
cmpq $0x200, %rax # imm = 0x200
jae 0x6dee5
cmpq $0x100, -0x660(%rbp) # imm = 0x100
jb 0x6df7d
movl -0x63c(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x6df05
jmp 0x6def5
movq $0x0, -0x618(%rbp)
jmp 0x6e069
movq -0x650(%rbp), %rdi
callq 0x6e0a0
movq %rax, -0x678(%rbp)
jmp 0x6df1a
movq -0x620(%rbp), %rax
movq %rax, -0x690(%rbp)
movq -0x650(%rbp), %rax
movq %rax, -0x688(%rbp)
cmpq $0x1ff, -0x678(%rbp) # imm = 0x1FF
jae 0x6df53
movq -0x678(%rbp), %rax
movq %rax, -0x698(%rbp)
jmp 0x6df61
movl $0x1ff, %eax # imm = 0x1FF
movq %rax, -0x698(%rbp)
jmp 0x6df61
movq -0x688(%rbp), %rsi
movq -0x690(%rbp), %rdi
movq -0x698(%rbp), %rdx
callq 0xd60f0
jmp 0x6dff8
movq -0x620(%rbp), %rax
cmpq -0x650(%rbp), %rax
jne 0x6dfb5
leaq -0x410(%rbp), %rdi
movq -0x628(%rbp), %rsi
movq -0x660(%rbp), %rdx
callq 0x285c0
leaq -0x410(%rbp), %rax
movq %rax, -0x628(%rbp)
movq -0x620(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x28350
movq %rax, %rdi
movq -0x628(%rbp), %rsi
movq -0x660(%rbp), %rdx
callq 0xd60f0
movq %rax, -0x648(%rbp)
movq -0x648(%rbp), %rdi
movq -0x658(%rbp), %rsi
callq 0x28350
movl -0x63c(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x6e01f
movq -0x620(%rbp), %rdi
movq -0x620(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x81c80
jmp 0x6e059
movl -0x63c(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x6e057
leaq -0x410(%rbp), %rdi
movq -0x620(%rbp), %rsi
callq 0x28350
movq -0x620(%rbp), %rdi
leaq -0x410(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x81a80
jmp 0x6e059
jmp 0x6e05b
movq -0x620(%rbp), %rax
movq %rax, -0x618(%rbp)
movq -0x618(%rbp), %rax
movq %rax, -0x6a0(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x6e099
movq -0x6a0(%rbp), %rax
addq $0x6a0, %rsp # imm = 0x6A0
popq %rbp
retq
callq 0x28390
nop
|
fn_format:
push rbp
mov rbp, rsp
sub rsp, 6A0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_620], rdi
mov [rbp+var_628], rsi
mov [rbp+var_630], rdx
mov [rbp+var_638], rcx
mov [rbp+var_63C], r8d
jmp short $+2
loc_6DC8D:
jmp short $+2
loc_6DC8F:
jmp short $+2
loc_6DC91:
jmp short $+2
loc_6DC93:
jmp short $+2
loc_6DC95:
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_628]
mov [rbp+var_650], rsi
lea rdx, [rbp+var_668]
call dirname_part
mov [rbp+var_660], rax
add rax, [rbp+var_628]
mov [rbp+var_628], rax
cmp [rbp+var_660], 0
jz short loc_6DCE3
mov eax, [rbp+var_63C]
and eax, 1
cmp eax, 0
jz short loc_6DCFF
loc_6DCE3:
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_630]
xor eax, eax
mov edx, eax
call convert_dirname
jmp loc_6DDAF
loc_6DCFF:
mov eax, [rbp+var_63C]
and eax, 80h
cmp eax, 0
jz loc_6DDAD
lea rdi, [rbp+var_210]
call test_if_hard_path
cmp eax, 0
jnz loc_6DDAD
lea rdi, [rbp+var_610]
xor esi, esi
mov edx, 200h
call _memset
mov [rbp+var_610], 2
lea rdi, [rbp+var_410]
lea rsi, [rbp+var_210]
mov edx, 1FFh
call strmake
mov [rbp+var_670], rax
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_630]
xor eax, eax
mov edx, eax
call convert_dirname
mov [rbp+var_648], rax
mov rdi, [rbp+var_648]
lea rsi, [rbp+var_410]
mov rax, [rbp+var_648]
lea rcx, [rbp+var_210]
sub rax, rcx
cdqe
mov edx, 1FFh
sub rdx, rax
call strmake
loc_6DDAD:
jmp short $+2
loc_6DDAF:
mov eax, [rbp+var_63C]
and eax, 8
cmp eax, 0
jz short loc_6DDD0
lea rdi, [rbp+var_210]
lea rsi, [rbp+var_210]
call pack_dirname
loc_6DDD0:
mov eax, [rbp+var_63C]
and eax, 4
cmp eax, 0
jz short loc_6DDF1
lea rdi, [rbp+var_210]
lea rsi, [rbp+var_210]
call unpack_dirname
loc_6DDF1:
mov eax, [rbp+var_63C]
and eax, 100h
cmp eax, 0
jnz short loc_6DE78
mov rdi, [rbp+var_628]
mov esi, 2Eh ; '.'
call _strchr
mov [rbp+var_648], rax
cmp rax, 0
jz short loc_6DE78
mov eax, [rbp+var_63C]
and eax, 2
cmp eax, 0
jnz short loc_6DE50
mov rdi, [rbp+var_628]
call strlength
mov [rbp+var_660], rax
lea rax, asc_DD407+4; ""
mov [rbp+var_658], rax
jmp short loc_6DE76
loc_6DE50:
mov rax, [rbp+var_648]
mov rcx, [rbp+var_628]
sub rax, rcx
mov [rbp+var_660], rax
mov rax, [rbp+var_638]
mov [rbp+var_658], rax
loc_6DE76:
jmp short loc_6DE99
loc_6DE78:
mov rdi, [rbp+var_628]
call strlength
mov [rbp+var_660], rax
mov rax, [rbp+var_638]
mov [rbp+var_658], rax
loc_6DE99:
lea rdi, [rbp+var_210]
call _strlen
add rax, [rbp+var_660]
mov [rbp+var_680], rax
mov rdi, [rbp+var_658]
call _strlen
mov rcx, rax
mov rax, [rbp+var_680]
add rax, rcx
cmp rax, 200h
jnb short loc_6DEE5
cmp [rbp+var_660], 100h
jb loc_6DF7D
loc_6DEE5:
mov eax, [rbp+var_63C]
and eax, 40h
cmp eax, 0
jz short loc_6DF05
jmp short $+2
loc_6DEF5:
mov [rbp+var_618], 0
jmp loc_6E069
loc_6DF05:
mov rdi, [rbp+var_650]
call strlength
mov [rbp+var_678], rax
jmp short $+2
loc_6DF1A:
mov rax, [rbp+var_620]
mov [rbp+var_690], rax
mov rax, [rbp+var_650]
mov [rbp+var_688], rax
cmp [rbp+var_678], 1FFh
jnb short loc_6DF53
mov rax, [rbp+var_678]
mov [rbp+var_698], rax
jmp short loc_6DF61
loc_6DF53:
mov eax, 1FFh
mov [rbp+var_698], rax
jmp short $+2
loc_6DF61:
mov rsi, [rbp+var_688]
mov rdi, [rbp+var_690]
mov rdx, [rbp+var_698]
call strmake
jmp short loc_6DFF8
loc_6DF7D:
mov rax, [rbp+var_620]
cmp rax, [rbp+var_650]
jnz short loc_6DFB5
lea rdi, [rbp+var_410]
mov rsi, [rbp+var_628]
mov rdx, [rbp+var_660]
call _memmove
lea rax, [rbp+var_410]
mov [rbp+var_628], rax
loc_6DFB5:
mov rdi, [rbp+var_620]
lea rsi, [rbp+var_210]
call _stpcpy
mov rdi, rax
mov rsi, [rbp+var_628]
mov rdx, [rbp+var_660]
call strmake
mov [rbp+var_648], rax
mov rdi, [rbp+var_648]
mov rsi, [rbp+var_658]
call _stpcpy
loc_6DFF8:
mov eax, [rbp+var_63C]
and eax, 20h
cmp eax, 0
jz short loc_6E01F
mov rdi, [rbp+var_620]
mov rsi, [rbp+var_620]
xor eax, eax
mov edx, eax
call my_realpath
jmp short loc_6E059
loc_6E01F:
mov eax, [rbp+var_63C]
and eax, 10h
cmp eax, 0
jz short loc_6E057
lea rdi, [rbp+var_410]
mov rsi, [rbp+var_620]
call _stpcpy
mov rdi, [rbp+var_620]
lea rsi, [rbp+var_410]
xor eax, eax
mov edx, eax
call my_readlink
loc_6E057:
jmp short $+2
loc_6E059:
jmp short $+2
loc_6E05B:
mov rax, [rbp+var_620]
mov [rbp+var_618], rax
loc_6E069:
mov rax, [rbp+var_618]
mov [rbp+var_6A0], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_6E099
mov rax, [rbp+var_6A0]
add rsp, 6A0h
pop rbp
retn
loc_6E099:
call ___stack_chk_fail
|
_BYTE * fn_format(_BYTE *a1, _BYTE *a2, long long a3, char *a4, int a5)
{
long long v5; // rax
long long v6; // rax
unsigned long long v8; // [rsp+20h] [rbp-680h]
unsigned long long v9; // [rsp+28h] [rbp-678h]
long long v10; // [rsp+38h] [rbp-668h] BYREF
unsigned long long v11; // [rsp+40h] [rbp-660h]
char *v12; // [rsp+48h] [rbp-658h]
_BYTE *v13; // [rsp+50h] [rbp-650h]
_BYTE *v14; // [rsp+58h] [rbp-648h]
int v15; // [rsp+64h] [rbp-63Ch]
char *v16; // [rsp+68h] [rbp-638h]
long long v17; // [rsp+70h] [rbp-630h]
_BYTE *v18; // [rsp+78h] [rbp-628h]
_BYTE *v19; // [rsp+80h] [rbp-620h]
char v21[512]; // [rsp+90h] [rbp-610h] BYREF
_BYTE v22[512]; // [rsp+290h] [rbp-410h] BYREF
_BYTE v23[520]; // [rsp+490h] [rbp-210h] BYREF
unsigned long long v24; // [rsp+698h] [rbp-8h]
v24 = __readfsqword(0x28u);
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15 = a5;
v13 = a2;
v11 = dirname_part((long long)v23, a2, &v10);
v18 += v11;
if ( v11 && (v15 & 1) == 0 )
{
if ( (v15 & 0x80) != 0 && !(unsigned int)test_if_hard_path(v23) )
{
memset(v21, 0LL, sizeof(v21));
v21[0] = 2;
strmake(v22, v23, 511LL);
v14 = convert_dirname(v23, v17, 0LL);
strmake(v14, v22, 511LL - (int)((_DWORD)v14 - (unsigned int)v23));
}
}
else
{
convert_dirname(v23, v17, 0LL);
}
if ( (v15 & 8) != 0 )
pack_dirname(v23, v23);
if ( (v15 & 4) != 0 )
unpack_dirname(v23, v23);
if ( (v15 & 0x100) != 0 || (v14 = (_BYTE *)strchr(v18, 46LL)) == 0LL )
{
v11 = strlength(v18);
v12 = v16;
}
else if ( (v15 & 2) != 0 )
{
v11 = v14 - v18;
v12 = v16;
}
else
{
v11 = strlength(v18);
v12 = "";
}
v5 = strlen(v23);
v8 = v11 + v5;
if ( strlen(v12) + v8 < 0x200 && v11 < 0x100 )
{
if ( v19 == v13 )
{
memmove(v22, v18, v11);
v18 = v22;
}
v6 = stpcpy(v19, v23);
v14 = (_BYTE *)strmake(v6, v18, v11);
stpcpy(v14, v12);
}
else
{
if ( (v15 & 0x40) != 0 )
return 0LL;
v9 = strlength(v13);
if ( v9 >= 0x1FF )
strmake(v19, v13, 511LL);
else
strmake(v19, v13, v9);
}
if ( (v15 & 0x20) != 0 )
{
my_realpath(v19, v19, 0LL);
}
else if ( (v15 & 0x10) != 0 )
{
stpcpy(v22, v19);
my_readlink(v19, v22, 0LL);
}
return v19;
}
|
fn_format:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x6a0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x620],RDI
MOV qword ptr [RBP + -0x628],RSI
MOV qword ptr [RBP + -0x630],RDX
MOV qword ptr [RBP + -0x638],RCX
MOV dword ptr [RBP + -0x63c],R8D
JMP 0x0016dc8d
LAB_0016dc8d:
JMP 0x0016dc8f
LAB_0016dc8f:
JMP 0x0016dc91
LAB_0016dc91:
JMP 0x0016dc93
LAB_0016dc93:
JMP 0x0016dc95
LAB_0016dc95:
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x628]
MOV qword ptr [RBP + -0x650],RSI
LEA RDX,[RBP + -0x668]
CALL 0x0016db30
MOV qword ptr [RBP + -0x660],RAX
ADD RAX,qword ptr [RBP + -0x628]
MOV qword ptr [RBP + -0x628],RAX
CMP qword ptr [RBP + -0x660],0x0
JZ 0x0016dce3
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0016dcff
LAB_0016dce3:
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x630]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0016db90
JMP 0x0016ddaf
LAB_0016dcff:
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0016ddad
LEA RDI,[RBP + -0x210]
CALL 0x0017d0d0
CMP EAX,0x0
JNZ 0x0016ddad
LEA RDI,[RBP + -0x610]
XOR ESI,ESI
MOV EDX,0x200
CALL 0x001281c0
MOV byte ptr [RBP + -0x610],0x2
LEA RDI,[RBP + -0x410]
LEA RSI,[RBP + -0x210]
MOV EDX,0x1ff
CALL 0x001d60f0
MOV qword ptr [RBP + -0x670],RAX
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x630]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0016db90
MOV qword ptr [RBP + -0x648],RAX
MOV RDI,qword ptr [RBP + -0x648]
LEA RSI,[RBP + -0x410]
MOV RAX,qword ptr [RBP + -0x648]
LEA RCX,[RBP + -0x210]
SUB RAX,RCX
CDQE
MOV EDX,0x1ff
SUB RDX,RAX
CALL 0x001d60f0
LAB_0016ddad:
JMP 0x0016ddaf
LAB_0016ddaf:
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0016ddd0
LEA RDI,[RBP + -0x210]
LEA RSI,[RBP + -0x210]
CALL 0x00176db0
LAB_0016ddd0:
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x4
CMP EAX,0x0
JZ 0x0016ddf1
LEA RDI,[RBP + -0x210]
LEA RSI,[RBP + -0x210]
CALL 0x00177830
LAB_0016ddf1:
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x100
CMP EAX,0x0
JNZ 0x0016de78
MOV RDI,qword ptr [RBP + -0x628]
MOV ESI,0x2e
CALL 0x00128110
MOV qword ptr [RBP + -0x648],RAX
CMP RAX,0x0
JZ 0x0016de78
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x0016de50
MOV RDI,qword ptr [RBP + -0x628]
CALL 0x0016e0a0
MOV qword ptr [RBP + -0x660],RAX
LEA RAX,[0x1dd40b]
MOV qword ptr [RBP + -0x658],RAX
JMP 0x0016de76
LAB_0016de50:
MOV RAX,qword ptr [RBP + -0x648]
MOV RCX,qword ptr [RBP + -0x628]
SUB RAX,RCX
MOV qword ptr [RBP + -0x660],RAX
MOV RAX,qword ptr [RBP + -0x638]
MOV qword ptr [RBP + -0x658],RAX
LAB_0016de76:
JMP 0x0016de99
LAB_0016de78:
MOV RDI,qword ptr [RBP + -0x628]
CALL 0x0016e0a0
MOV qword ptr [RBP + -0x660],RAX
MOV RAX,qword ptr [RBP + -0x638]
MOV qword ptr [RBP + -0x658],RAX
LAB_0016de99:
LEA RDI,[RBP + -0x210]
CALL 0x00128140
ADD RAX,qword ptr [RBP + -0x660]
MOV qword ptr [RBP + -0x680],RAX
MOV RDI,qword ptr [RBP + -0x658]
CALL 0x00128140
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x680]
ADD RAX,RCX
CMP RAX,0x200
JNC 0x0016dee5
CMP qword ptr [RBP + -0x660],0x100
JC 0x0016df7d
LAB_0016dee5:
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x40
CMP EAX,0x0
JZ 0x0016df05
JMP 0x0016def5
LAB_0016def5:
MOV qword ptr [RBP + -0x618],0x0
JMP 0x0016e069
LAB_0016df05:
MOV RDI,qword ptr [RBP + -0x650]
CALL 0x0016e0a0
MOV qword ptr [RBP + -0x678],RAX
JMP 0x0016df1a
LAB_0016df1a:
MOV RAX,qword ptr [RBP + -0x620]
MOV qword ptr [RBP + -0x690],RAX
MOV RAX,qword ptr [RBP + -0x650]
MOV qword ptr [RBP + -0x688],RAX
CMP qword ptr [RBP + -0x678],0x1ff
JNC 0x0016df53
MOV RAX,qword ptr [RBP + -0x678]
MOV qword ptr [RBP + -0x698],RAX
JMP 0x0016df61
LAB_0016df53:
MOV EAX,0x1ff
MOV qword ptr [RBP + -0x698],RAX
JMP 0x0016df61
LAB_0016df61:
MOV RSI,qword ptr [RBP + -0x688]
MOV RDI,qword ptr [RBP + -0x690]
MOV RDX,qword ptr [RBP + -0x698]
CALL 0x001d60f0
JMP 0x0016dff8
LAB_0016df7d:
MOV RAX,qword ptr [RBP + -0x620]
CMP RAX,qword ptr [RBP + -0x650]
JNZ 0x0016dfb5
LEA RDI,[RBP + -0x410]
MOV RSI,qword ptr [RBP + -0x628]
MOV RDX,qword ptr [RBP + -0x660]
CALL 0x001285c0
LEA RAX,[RBP + -0x410]
MOV qword ptr [RBP + -0x628],RAX
LAB_0016dfb5:
MOV RDI,qword ptr [RBP + -0x620]
LEA RSI,[RBP + -0x210]
CALL 0x00128350
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x628]
MOV RDX,qword ptr [RBP + -0x660]
CALL 0x001d60f0
MOV qword ptr [RBP + -0x648],RAX
MOV RDI,qword ptr [RBP + -0x648]
MOV RSI,qword ptr [RBP + -0x658]
CALL 0x00128350
LAB_0016dff8:
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x20
CMP EAX,0x0
JZ 0x0016e01f
MOV RDI,qword ptr [RBP + -0x620]
MOV RSI,qword ptr [RBP + -0x620]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00181c80
JMP 0x0016e059
LAB_0016e01f:
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x10
CMP EAX,0x0
JZ 0x0016e057
LEA RDI,[RBP + -0x410]
MOV RSI,qword ptr [RBP + -0x620]
CALL 0x00128350
MOV RDI,qword ptr [RBP + -0x620]
LEA RSI,[RBP + -0x410]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00181a80
LAB_0016e057:
JMP 0x0016e059
LAB_0016e059:
JMP 0x0016e05b
LAB_0016e05b:
MOV RAX,qword ptr [RBP + -0x620]
MOV qword ptr [RBP + -0x618],RAX
LAB_0016e069:
MOV RAX,qword ptr [RBP + -0x618]
MOV qword ptr [RBP + -0x6a0],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0016e099
MOV RAX,qword ptr [RBP + -0x6a0]
ADD RSP,0x6a0
POP RBP
RET
LAB_0016e099:
CALL 0x00128390
|
char * fn_format(char *param_1,char *param_2,int8 param_3,char *param_4,uint param_5)
{
int iVar1;
size_t sVar2;
long lVar3;
char *pcVar4;
long in_FS_OFFSET;
ulong local_6a0;
int1 local_670 [8];
ulong local_668;
char *local_660;
char *local_658;
char *local_650;
uint local_644;
char *local_640;
int8 local_638;
char *local_630;
char *local_628;
char *local_620;
int1 local_618 [512];
char local_418 [512];
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_658 = param_2;
local_644 = param_5;
local_640 = param_4;
local_638 = param_3;
local_630 = param_2;
local_628 = param_1;
local_668 = dirname_part(local_218,param_2,local_670);
local_630 = local_630 + local_668;
if ((local_668 == 0) || ((local_644 & 1) != 0)) {
convert_dirname(local_218,local_638,0);
}
else if (((local_644 & 0x80) != 0) && (iVar1 = test_if_hard_path(local_218), iVar1 == 0)) {
memset(local_618,0,0x200);
local_618[0] = 2;
strmake(local_418,local_218,0x1ff);
local_650 = (char *)convert_dirname(local_218,local_638,0);
strmake(local_650,local_418,0x1ff - (long)((int)local_650 - (int)local_218));
}
if ((local_644 & 8) != 0) {
pack_dirname(local_218,local_218);
}
if ((local_644 & 4) != 0) {
unpack_dirname(local_218,local_218);
}
if (((local_644 & 0x100) == 0) && (local_650 = strchr(local_630,0x2e), local_650 != (char *)0x0))
{
if ((local_644 & 2) == 0) {
local_668 = strlength(local_630);
local_660 = "";
}
else {
local_668 = (long)local_650 - (long)local_630;
local_660 = local_640;
}
}
else {
local_668 = strlength(local_630);
local_660 = local_640;
}
sVar2 = strlen(local_218);
lVar3 = sVar2 + local_668;
sVar2 = strlen(local_660);
if ((lVar3 + sVar2 < 0x200) && (local_668 < 0x100)) {
if (local_628 == local_658) {
memmove(local_418,local_630,local_668);
local_630 = local_418;
}
pcVar4 = stpcpy(local_628,local_218);
local_650 = (char *)strmake(pcVar4,local_630,local_668);
stpcpy(local_650,local_660);
}
else {
if ((local_644 & 0x40) != 0) {
local_620 = (char *)0x0;
goto LAB_0016e069;
}
local_6a0 = strlength(local_658);
if (0x1fe < local_6a0) {
local_6a0 = 0x1ff;
}
strmake(local_628,local_658,local_6a0);
}
if ((local_644 & 0x20) == 0) {
if ((local_644 & 0x10) != 0) {
stpcpy(local_418,local_628);
my_readlink(local_628,local_418,0);
}
}
else {
my_realpath(local_628,local_628,0);
}
local_620 = local_628;
LAB_0016e069:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_620;
}
|
|
10,584 |
PAIRING_FinalVerify
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/aggregate.c
|
static bool_t PAIRING_FinalVerify(const PAIRING *ctx, const vec384fp12 GTsig)
{
vec384fp12 GT;
if (!(ctx->ctrl & AGGR_GT_SET))
return 0;
if (GTsig != NULL) {
vec_copy(GT, GTsig, sizeof(GT));
} else if (ctx->ctrl & AGGR_SIGN_SET) {
AggregatedSignature AggrSign;
switch (ctx->ctrl & MIN_SIG_OR_PK) {
case AGGR_MIN_SIG:
POINTonE1_from_Jacobian(&AggrSign.e1, &ctx->AggrSign.e1);
miller_loop_n(GT, (const POINTonE2_affine *)&BLS12_381_G2,
(const POINTonE1_affine *)&AggrSign.e1, 1);
break;
case AGGR_MIN_PK:
POINTonE2_from_Jacobian(&AggrSign.e2, &ctx->AggrSign.e2);
miller_loop_n(GT, (const POINTonE2_affine *)&AggrSign.e2,
(const POINTonE1_affine *)&BLS12_381_G1, 1);
break;
default:
return 0;
}
} else {
/*
* The aggregated signature was infinite, relation between the
* hashes and the public keys has to be VERY special...
*/
vec_copy(GT, BLS12_381_Rx.p12, sizeof(GT));
}
conjugate_fp12(GT);
mul_fp12(GT, GT, ctx->GT);
final_exp(GT, GT);
/* return GT==1 */
return vec_is_equal(GT[0][0], BLS12_381_Rx.p2, sizeof(GT[0][0])) &
vec_is_zero(GT[0][1], sizeof(GT) - sizeof(GT[0][0]));
}
|
O0
|
c
|
PAIRING_FinalVerify:
pushq %rbp
movq %rsp, %rbp
subq $0x390, %rsp # imm = 0x390
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0xb1a2e
movq $0x0, -0x8(%rbp)
jmp 0xb1b9c
cmpq $0x0, -0x18(%rbp)
je 0xb1a4f
leaq -0x260(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x240, %edx # imm = 0x240
callq 0xa8ad0
jmp 0xb1b1d
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xb1b03
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x3, %eax
movl %eax, -0x384(%rbp)
subl $0x1, %eax
je 0xb1a84
jmp 0xb1a77
movl -0x384(%rbp), %eax
subl $0x2, %eax
je 0xb1abc
jmp 0xb1af4
movq -0x10(%rbp), %rsi
addq $0x258, %rsi # imm = 0x258
leaq -0x380(%rbp), %rdi
callq 0xa8900
leaq -0x260(%rbp), %rdi
leaq 0x36787(%rip), %rsi # 0xe8230
leaq -0x380(%rbp), %rdx
movl $0x1, %ecx
callq 0xaf7b0
jmp 0xb1b01
movq -0x10(%rbp), %rsi
addq $0x258, %rsi # imm = 0x258
leaq -0x380(%rbp), %rdi
callq 0xaba40
leaq -0x260(%rbp), %rdi
leaq -0x380(%rbp), %rsi
leaq 0x36608(%rip), %rdx # 0xe80f0
movl $0x1, %ecx
callq 0xaf7b0
jmp 0xb1b01
movq $0x0, -0x8(%rbp)
jmp 0xb1b9c
jmp 0xb1b1b
leaq -0x260(%rbp), %rdi
leaq 0x36997(%rip), %rsi # 0xe84a8
movl $0x240, %edx # imm = 0x240
callq 0xa8ad0
jmp 0xb1b1d
leaq -0x260(%rbp), %rdi
callq 0xaf240
leaq -0x260(%rbp), %rdi
leaq -0x260(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x18, %rdx
callq 0xaee90
leaq -0x260(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0xb0100
leaq -0x260(%rbp), %rdi
leaq 0x36943(%rip), %rsi # 0xe84a8
movl $0x60, %edx
callq 0xab4c0
movq %rax, -0x390(%rbp)
leaq -0x260(%rbp), %rdi
addq $0x60, %rdi
movl $0x1e0, %esi # imm = 0x1E0
callq 0xa8cd0
movq %rax, %rcx
movq -0x390(%rbp), %rax
andq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x390, %rsp # imm = 0x390
popq %rbp
retq
nopl (%rax)
|
PAIRING_FinalVerify:
push rbp
mov rbp, rsp
sub rsp, 390h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 20h
cmp eax, 0
jnz short loc_B1A2E
mov [rbp+var_8], 0
jmp loc_B1B9C
loc_B1A2E:
cmp [rbp+var_18], 0
jz short loc_B1A4F
lea rdi, [rbp+var_260]
mov rsi, [rbp+var_18]
mov edx, 240h
call vec_copy
jmp loc_B1B1D
loc_B1A4F:
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 10h
cmp eax, 0
jz loc_B1B03
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 3
mov [rbp+var_384], eax
sub eax, 1
jz short loc_B1A84
jmp short $+2
loc_B1A77:
mov eax, [rbp+var_384]
sub eax, 2
jz short loc_B1ABC
jmp short loc_B1AF4
loc_B1A84:
mov rsi, [rbp+var_10]
add rsi, 258h
lea rdi, [rbp+var_380]
call POINTonE1_from_Jacobian
lea rdi, [rbp+var_260]
lea rsi, BLS12_381_G2
lea rdx, [rbp+var_380]
mov ecx, 1
call miller_loop_n
jmp short loc_B1B01
loc_B1ABC:
mov rsi, [rbp+var_10]
add rsi, 258h
lea rdi, [rbp+var_380]
call POINTonE2_from_Jacobian
lea rdi, [rbp+var_260]
lea rsi, [rbp+var_380]
lea rdx, BLS12_381_G1
mov ecx, 1
call miller_loop_n
jmp short loc_B1B01
loc_B1AF4:
mov [rbp+var_8], 0
jmp loc_B1B9C
loc_B1B01:
jmp short loc_B1B1B
loc_B1B03:
lea rdi, [rbp+var_260]
lea rsi, BLS12_381_Rx
mov edx, 240h
call vec_copy
loc_B1B1B:
jmp short $+2
loc_B1B1D:
lea rdi, [rbp+var_260]
call conjugate_fp12
lea rdi, [rbp+var_260]
lea rsi, [rbp+var_260]
mov rdx, [rbp+var_10]
add rdx, 18h
call mul_fp12
lea rdi, [rbp+var_260]
lea rsi, [rbp+var_260]
call final_exp
lea rdi, [rbp+var_260]
lea rsi, BLS12_381_Rx
mov edx, 60h ; '`'
call vec_is_equal
mov [rbp+var_390], rax
lea rdi, [rbp+var_260]
add rdi, 60h ; '`'
mov esi, 1E0h
call vec_is_zero
mov rcx, rax
mov rax, [rbp+var_390]
and rax, rcx
mov [rbp+var_8], rax
loc_B1B9C:
mov rax, [rbp+var_8]
add rsp, 390h
pop rbp
retn
|
unsigned long long PAIRING_FinalVerify(_DWORD *a1, long long a2)
{
unsigned long long is_equal; // [rsp+0h] [rbp-390h]
int v4; // [rsp+Ch] [rbp-384h]
_BYTE v5[288]; // [rsp+10h] [rbp-380h] BYREF
_BYTE v6[96]; // [rsp+130h] [rbp-260h] BYREF
long long v7; // [rsp+190h] [rbp-200h] BYREF
long long v8; // [rsp+378h] [rbp-18h]
_DWORD *v9; // [rsp+380h] [rbp-10h]
v9 = a1;
v8 = a2;
if ( (*a1 & 0x20) != 0 )
{
if ( v8 )
{
vec_copy((long long)v6, v8, 0x240uLL);
}
else if ( (*v9 & 0x10) != 0 )
{
v4 = *v9 & 3;
if ( v4 == 1 )
{
POINTonE1_from_Jacobian((long long)v5, (long long)(v9 + 150));
miller_loop_n((long long)v6, (long long)&BLS12_381_G2, (long long)v5, 1uLL);
}
else
{
if ( v4 != 2 )
return 0LL;
POINTonE2_from_Jacobian((long long)v5, (long long)(v9 + 150));
miller_loop_n((long long)v6, (long long)v5, (long long)&BLS12_381_G1, 1uLL);
}
}
else
{
vec_copy((long long)v6, (long long)&BLS12_381_Rx, 0x240uLL);
}
conjugate_fp12((long long)v6);
mul_fp12((long long)v6, (long long)v6, (long long)(v9 + 6));
final_exp((long long)v6, (long long)v6);
is_equal = vec_is_equal((long long)v6, (long long)&BLS12_381_Rx, 0x60uLL);
return vec_is_zero((long long)&v7, 0x1E0uLL) & is_equal;
}
return 0LL;
}
|
PAIRING_FinalVerify:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x390
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x20
CMP EAX,0x0
JNZ 0x001b1a2e
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001b1b9c
LAB_001b1a2e:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001b1a4f
LEA RDI,[RBP + -0x260]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x240
CALL 0x001a8ad0
JMP 0x001b1b1d
LAB_001b1a4f:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001b1b03
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x3
MOV dword ptr [RBP + -0x384],EAX
SUB EAX,0x1
JZ 0x001b1a84
JMP 0x001b1a77
LAB_001b1a77:
MOV EAX,dword ptr [RBP + -0x384]
SUB EAX,0x2
JZ 0x001b1abc
JMP 0x001b1af4
LAB_001b1a84:
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x258
LEA RDI,[RBP + -0x380]
CALL 0x001a8900
LEA RDI,[RBP + -0x260]
LEA RSI,[0x1e8230]
LEA RDX,[RBP + -0x380]
MOV ECX,0x1
CALL 0x001af7b0
JMP 0x001b1b01
LAB_001b1abc:
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x258
LEA RDI,[RBP + -0x380]
CALL 0x001aba40
LEA RDI,[RBP + -0x260]
LEA RSI,[RBP + -0x380]
LEA RDX,[0x1e80f0]
MOV ECX,0x1
CALL 0x001af7b0
JMP 0x001b1b01
LAB_001b1af4:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001b1b9c
LAB_001b1b01:
JMP 0x001b1b1b
LAB_001b1b03:
LEA RDI,[RBP + -0x260]
LEA RSI,[0x1e84a8]
MOV EDX,0x240
CALL 0x001a8ad0
LAB_001b1b1b:
JMP 0x001b1b1d
LAB_001b1b1d:
LEA RDI,[RBP + -0x260]
CALL 0x001af240
LEA RDI,[RBP + -0x260]
LEA RSI,[RBP + -0x260]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x18
CALL 0x001aee90
LEA RDI,[RBP + -0x260]
LEA RSI,[RBP + -0x260]
CALL 0x001b0100
LEA RDI,[RBP + -0x260]
LEA RSI,[0x1e84a8]
MOV EDX,0x60
CALL 0x001ab4c0
MOV qword ptr [RBP + -0x390],RAX
LEA RDI,[RBP + -0x260]
ADD RDI,0x60
MOV ESI,0x1e0
CALL 0x001a8cd0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x390]
AND RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_001b1b9c:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x390
POP RBP
RET
|
ulong PAIRING_FinalVerify(uint *param_1,long param_2)
{
ulong uVar1;
int1 local_388 [288];
int1 local_268 [96];
int1 auStack_208 [488];
long local_20;
uint *local_18;
ulong local_10;
if ((*param_1 & 0x20) == 0) {
local_10 = 0;
}
else {
local_20 = param_2;
local_18 = param_1;
if (param_2 == 0) {
if ((*param_1 & 0x10) == 0) {
vec_copy(local_268,BLS12_381_Rx,0x240);
}
else if ((*param_1 & 3) == 1) {
POINTonE1_from_Jacobian(local_388,param_1 + 0x96);
miller_loop_n(local_268,BLS12_381_G2,local_388,1);
}
else {
if ((*param_1 & 3) != 2) {
return 0;
}
POINTonE2_from_Jacobian(local_388,param_1 + 0x96);
miller_loop_n(local_268,local_388,BLS12_381_G1,1);
}
}
else {
vec_copy(local_268,param_2,0x240);
}
conjugate_fp12(local_268);
mul_fp12(local_268,local_268,local_18 + 6);
final_exp(local_268,local_268);
uVar1 = vec_is_equal(local_268,BLS12_381_Rx,0x60);
local_10 = vec_is_zero(auStack_208,0x1e0);
local_10 = uVar1 & local_10;
}
return local_10;
}
|
|
10,585 |
mi_dpointer
|
eloqsql/storage/myisam/mi_search.c
|
void _mi_dpointer(MI_INFO *info, uchar *buff, my_off_t pos)
{
if (!(info->s->options &
(HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) &&
pos != HA_OFFSET_ERROR)
pos/=info->s->base.pack_reclength;
switch (info->s->rec_reflength) {
#if SIZEOF_OFF_T > 4
case 8: mi_int8store(buff,pos); break;
case 7: mi_int7store(buff,pos); break;
case 6: mi_int6store(buff,pos); break;
case 5: mi_int5store(buff,pos); break;
#else
case 8: *buff++=0;
/* fall through */
case 7: *buff++=0;
/* fall through */
case 6: *buff++=0;
/* fall through */
case 5: *buff++=0;
/* fall through */
#endif
case 4: mi_int4store(buff,pos); break;
case 3: mi_int3store(buff,pos); break;
case 2: mi_int2store(buff,(uint) pos); break;
default: abort(); /* Impossible */
}
}
|
O0
|
c
|
mi_dpointer:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x318(%rax), %rax
andq $0x5, %rax
cmpq $0x0, %rax
jne 0x4e861
cmpq $-0x1, -0x18(%rbp)
je 0x4e861
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x148(%rax), %rcx
movq -0x18(%rbp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x338(%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x88(%rbp)
subl $0x6, %eax
ja 0x4eb48
movq -0x88(%rbp), %rax
leaq 0x938bf(%rip), %rcx # 0xe2150
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x30(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x30(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x30(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x7(%rax)
movq -0x38(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x6(%rax)
movq -0x38(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x38(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
jmp 0x4eb4d
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x6(%rax)
movq -0x40(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x40(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x40(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x48(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x48(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x48(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x4eb4d
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x50(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x50(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x50(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x58(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x58(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x4eb4d
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x60(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x60(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x60(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x68(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x4eb4d
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x70(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x70(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x70(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x4eb4d
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x78(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x78(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x4eb4d
movq -0x18(%rbp), %rax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x7c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x4eb4d
callq 0x281f0
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_mi_dpointer:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+318h]
and rax, 5
cmp rax, 0
jnz short loc_4E861
cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh
jz short loc_4E861
mov rax, [rbp+var_8]
mov rax, [rax]
mov rcx, [rax+148h]
mov rax, [rbp+var_18]
xor edx, edx
div rcx
mov [rbp+var_18], rax
loc_4E861:
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+338h]
add eax, 0FFFFFFFEh; switch 7 cases
mov ecx, eax
mov [rbp+var_88], rcx
sub eax, 6
ja def_4E898; jumptable 000000000004E898 default case
mov rax, [rbp+var_88]
lea rcx, jpt_4E898
movsxd rax, ds:(jpt_4E898 - 0E2150h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_4E89A:
mov rax, [rbp+var_18]; jumptable 000000000004E898 case 8
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_30]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_30]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_30]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+7], cl
mov rax, [rbp+var_38]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+6], cl
mov rax, [rbp+var_38]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_38]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
jmp loc_4EB4D
loc_4E942:
mov rax, [rbp+var_18]; jumptable 000000000004E898 case 7
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_48], rax
mov rax, [rbp+var_40]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+6], cl
mov rax, [rbp+var_40]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_40]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_40]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_48]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_48]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_48]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_4EB4D
loc_4E9C9:
mov rax, [rbp+var_18]; jumptable 000000000004E898 case 6
mov [rbp+var_50], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_58], rax
mov rax, [rbp+var_50]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_50]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_50]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_50]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_58]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_58]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_4EB4D
loc_4EA3F:
mov rax, [rbp+var_18]; jumptable 000000000004E898 case 5
mov [rbp+var_60], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_68], rax
mov rax, [rbp+var_60]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_60]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_60]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_60]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_68]
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_4EB4D
loc_4EAA4:
mov rax, [rbp+var_18]; jumptable 000000000004E898 case 4
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_70]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_70]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_70]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_4EB4D
loc_4EAED:
mov rax, [rbp+var_18]; jumptable 000000000004E898 case 3
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_78]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_78]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_4EB4D
loc_4EB25:
mov rax, [rbp+var_18]; jumptable 000000000004E898 case 2
mov [rbp+var_7C], eax
mov eax, [rbp+var_7C]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov eax, [rbp+var_7C]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_4EB4D
def_4E898:
call _abort; jumptable 000000000004E898 default case
loc_4EB4D:
add rsp, 90h
pop rbp
retn
|
_BYTE * mi_dpointer(long long a1, _BYTE *a2, unsigned long long a3)
{
_BYTE *result; // rax
unsigned long long v4; // [rsp+78h] [rbp-18h]
v4 = a3;
if ( (*(_QWORD *)(*(_QWORD *)a1 + 792LL) & 5LL) == 0 && a3 != -1LL )
v4 = a3 / *(_QWORD *)(*(_QWORD *)a1 + 328LL);
switch ( *(_DWORD *)(*(_QWORD *)a1 + 824LL) )
{
case 2:
a2[1] = v4;
result = a2;
*a2 = BYTE1(v4);
break;
case 3:
a2[2] = v4;
a2[1] = BYTE1(v4);
result = a2;
*a2 = BYTE2(v4);
break;
case 4:
a2[3] = v4;
a2[2] = BYTE1(v4);
a2[1] = BYTE2(v4);
result = a2;
*a2 = BYTE3(v4);
break;
case 5:
a2[4] = v4;
a2[3] = BYTE1(v4);
a2[2] = BYTE2(v4);
a2[1] = BYTE3(v4);
result = a2;
*a2 = BYTE4(v4);
break;
case 6:
a2[5] = v4;
a2[4] = BYTE1(v4);
a2[3] = BYTE2(v4);
a2[2] = BYTE3(v4);
a2[1] = BYTE4(v4);
result = a2;
*a2 = BYTE5(v4);
break;
case 7:
a2[6] = v4;
a2[5] = BYTE1(v4);
a2[4] = BYTE2(v4);
a2[3] = BYTE3(v4);
a2[2] = BYTE4(v4);
a2[1] = BYTE5(v4);
result = a2;
*a2 = BYTE6(v4);
break;
case 8:
a2[3] = BYTE4(v4);
a2[2] = BYTE5(v4);
a2[1] = BYTE6(v4);
*a2 = HIBYTE(v4);
a2[7] = v4;
a2[6] = BYTE1(v4);
a2[5] = BYTE2(v4);
result = a2;
a2[4] = BYTE3(v4);
break;
default:
abort();
}
return result;
}
|
_mi_dpointer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
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]
MOV RAX,qword ptr [RAX + 0x318]
AND RAX,0x5
CMP RAX,0x0
JNZ 0x0014e861
CMP qword ptr [RBP + -0x18],-0x1
JZ 0x0014e861
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x148]
MOV RAX,qword ptr [RBP + -0x18]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_0014e861:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x338]
ADD EAX,-0x2
MOV ECX,EAX
MOV qword ptr [RBP + -0x88],RCX
SUB EAX,0x6
JA 0x0014eb48
MOV RAX,qword ptr [RBP + -0x88]
LEA RCX,[0x1e2150]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_8:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x7],CL
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x6],CL
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
JMP 0x0014eb4d
caseD_7:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x6],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x48]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x48]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x48]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x0014eb4d
caseD_6:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x58]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x58]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x0014eb4d
caseD_5:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x60]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x60]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x60]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x68]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x0014eb4d
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x0014eb4d
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x78]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x78]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x0014eb4d
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x7c],EAX
MOV EAX,dword ptr [RBP + -0x7c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x7c]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x0014eb4d
default:
CALL 0x001281f0
LAB_0014eb4d:
ADD RSP,0x90
POP RBP
RET
|
void _mi_dpointer(long *param_1,int1 *param_2,ulong param_3)
{
int1 uVar1;
int1 uVar2;
int1 uVar3;
int1 uVar4;
int1 uVar5;
int1 uVar6;
int1 uVar7;
ulong local_20;
local_20 = param_3;
if (((*(ulong *)(*param_1 + 0x318) & 5) == 0) && (param_3 != 0xffffffffffffffff)) {
local_20 = param_3 / *(ulong *)(*param_1 + 0x148);
}
uVar4 = (int1)local_20;
uVar5 = (int1)(local_20 >> 8);
uVar6 = (int1)(local_20 >> 0x10);
uVar7 = (int1)(local_20 >> 0x18);
uVar1 = (int1)(local_20 >> 0x20);
uVar2 = (int1)(local_20 >> 0x28);
uVar3 = (int1)(local_20 >> 0x30);
switch(*(int4 *)(*param_1 + 0x338)) {
case 2:
param_2[1] = uVar4;
*param_2 = uVar5;
break;
case 3:
param_2[2] = uVar4;
param_2[1] = uVar5;
*param_2 = uVar6;
break;
case 4:
param_2[3] = uVar4;
param_2[2] = uVar5;
param_2[1] = uVar6;
*param_2 = uVar7;
break;
case 5:
param_2[4] = uVar4;
param_2[3] = uVar5;
param_2[2] = uVar6;
param_2[1] = uVar7;
*param_2 = uVar1;
break;
case 6:
param_2[5] = uVar4;
param_2[4] = uVar5;
param_2[3] = uVar6;
param_2[2] = uVar7;
param_2[1] = uVar1;
*param_2 = uVar2;
break;
case 7:
param_2[6] = uVar4;
param_2[5] = uVar5;
param_2[4] = uVar6;
param_2[3] = uVar7;
param_2[2] = uVar1;
param_2[1] = uVar2;
*param_2 = uVar3;
break;
case 8:
param_2[3] = uVar1;
param_2[2] = uVar2;
param_2[1] = uVar3;
*param_2 = (char)(local_20 >> 0x38);
param_2[7] = uVar4;
param_2[6] = uVar5;
param_2[5] = uVar6;
param_2[4] = uVar7;
break;
default:
/* WARNING: Subroutine does not return */
abort();
}
return;
}
|
|
10,586 |
my_wc_mb_latin1
|
eloqsql/strings/ctype-latin1.c
|
static
int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc,
uchar *str,
uchar *end __attribute__((unused)))
{
const uchar *pl;
if (str >= end)
return MY_CS_TOOSMALL;
if (wc > 0xFFFF)
return MY_CS_ILUNI;
pl= uni_to_cs[wc >> 8];
str[0]= pl ? pl[wc & 0xFF] : '\0';
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
}
|
O3
|
c
|
my_wc_mb_latin1:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x36084
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x36084
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rax
shrq $0x8, %rax
leaq 0x2b2293(%rip), %rcx # 0x2e82f0
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0x3606f
movzbl %sil, %ecx
movb (%rax,%rcx), %al
jmp 0x36071
xorl %eax, %eax
movb %al, (%rdx)
testb %al, %al
setne %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movzbl %cl, %eax
popq %rbp
retq
|
my_wc_mb_latin1:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_36084
xor eax, eax
cmp rsi, 0FFFFh
ja short locret_36084
push rbp
mov rbp, rsp
mov rax, rsi
shr rax, 8
lea rcx, uni_to_cs
mov rax, [rcx+rax*8]
test rax, rax
jz short loc_3606F
movzx ecx, sil
mov al, [rax+rcx]
jmp short loc_36071
loc_3606F:
xor eax, eax
loc_36071:
mov [rdx], al
test al, al
setnz al
test rsi, rsi
setz cl
or cl, al
movzx eax, cl
pop rbp
locret_36084:
retn
|
long long my_wc_mb_latin1(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rax
char v6; // al
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
v5 = (long long)*(&uni_to_cs + (a2 >> 8));
if ( v5 )
v6 = *(_BYTE *)(v5 + (unsigned __int8)a2);
else
v6 = 0;
*a3 = v6;
return (v6 != 0) | (unsigned __int8)(a2 == 0);
}
}
return result;
}
|
my_wc_mb_latin1:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00136084
XOR EAX,EAX
CMP RSI,0xffff
JA 0x00136084
PUSH RBP
MOV RBP,RSP
MOV RAX,RSI
SHR RAX,0x8
LEA RCX,[0x3e82f0]
MOV RAX,qword ptr [RCX + RAX*0x8]
TEST RAX,RAX
JZ 0x0013606f
MOVZX ECX,SIL
MOV AL,byte ptr [RAX + RCX*0x1]
JMP 0x00136071
LAB_0013606f:
XOR EAX,EAX
LAB_00136071:
MOV byte ptr [RDX],AL
TEST AL,AL
SETNZ AL
TEST RSI,RSI
SETZ CL
OR CL,AL
MOVZX EAX,CL
POP RBP
LAB_00136084:
RET
|
ulong my_wc_mb_latin1(int8 param_1,ulong param_2,char *param_3,char *param_4)
{
char cVar1;
ulong uVar2;
uVar2 = 0xffffff9b;
if ((param_3 < param_4) && (uVar2 = 0, param_2 < 0x10000)) {
if (*(long *)(uni_to_cs + (param_2 >> 8) * 8) == 0) {
cVar1 = '\0';
}
else {
cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8) * 8) + (param_2 & 0xff));
}
*param_3 = cVar1;
uVar2 = (ulong)(param_2 == 0 || cVar1 != '\0');
}
return uVar2;
}
|
|
10,587 |
get_this_host
|
eloqsql/libmariadb/unittest/libmariadb/my_test.h
|
void get_this_host(MYSQL *mysql)
{
MYSQL_RES *res;
MYSQL_ROW row;
if (mysql_query(mysql, "select substr(current_user(), locate('@', current_user())+1)"))
return;
if ((res= mysql_store_result(mysql)))
{
if ((row= mysql_fetch_row(res)))
this_host= strdup(row[0]);
mysql_free_result(res);
}
}
|
O3
|
c
|
get_this_host:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2160c(%rip), %rsi # 0x350f6
callq 0x1aed9
testl %eax, %eax
je 0x13afa
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
callq 0x1bdd1
testq %rax, %rax
je 0x13af3
movq %rax, %rbx
movq %rax, %rdi
callq 0x1bfd4
testq %rax, %rax
je 0x13b26
movq (%rax), %rdi
callq 0x137d0
movq %rax, 0x372f2(%rip) # 0x4ae18
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x16b86
|
get_this_host:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
lea rsi, aSelectSubstrCu; "select substr(current_user(), locate('@"...
call mysql_query
test eax, eax
jz short loc_13AFA
loc_13AF3:
add rsp, 8
pop rbx
pop rbp
retn
loc_13AFA:
mov rdi, rbx
call mysql_store_result
test rax, rax
jz short loc_13AF3
mov rbx, rax
mov rdi, rax
call mysql_fetch_row
test rax, rax
jz short loc_13B26
mov rdi, [rax]
call _strdup
mov cs:this_host, rax
loc_13B26:
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp mysql_free_result
|
long long get_this_host(long long a1)
{
long long result; // rax
long long v2; // rbx
_QWORD *row; // rax
result = mysql_query(a1, "select substr(current_user(), locate('@', current_user())+1)");
if ( !(_DWORD)result )
{
result = mysql_store_result(a1);
if ( result )
{
v2 = result;
row = (_QWORD *)mysql_fetch_row(result);
if ( row )
this_host = strdup(*row);
return mysql_free_result(v2);
}
}
return result;
}
|
get_this_host:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RSI,[0x1350f6]
CALL 0x0011aed9
TEST EAX,EAX
JZ 0x00113afa
LAB_00113af3:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00113afa:
MOV RDI,RBX
CALL 0x0011bdd1
TEST RAX,RAX
JZ 0x00113af3
MOV RBX,RAX
MOV RDI,RAX
CALL 0x0011bfd4
TEST RAX,RAX
JZ 0x00113b26
MOV RDI,qword ptr [RAX]
CALL 0x001137d0
MOV qword ptr [0x0014ae18],RAX
LAB_00113b26:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00116b86
|
void get_this_host(int8 param_1)
{
int iVar1;
long lVar2;
int8 *puVar3;
iVar1 = mysql_query(param_1,"select substr(current_user(), locate(\'@\', current_user())+1)");
if (iVar1 == 0) {
lVar2 = mysql_store_result(param_1);
if (lVar2 != 0) {
puVar3 = (int8 *)mysql_fetch_row(lVar2);
if (puVar3 != (int8 *)0x0) {
this_host = strdup((char *)*puVar3);
}
mysql_free_result(lVar2);
return;
}
}
return;
}
|
|
10,588 |
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const
|
monkey531[P]llama/common/minja.hpp
|
T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
}
|
O0
|
cpp
|
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const:
subq $0xa8, %rsp
movb %dl, %al
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
andb $0x1, %al
movb %al, 0x8f(%rsp)
movq 0x98(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq 0x90(%rsp), %rsi
callq 0x22dba0
testb $0x1, %al
jne 0x240e92
movb 0x8f(%rsp), %al
andb $0x1, %al
movb %al, 0xa7(%rsp)
jmp 0x240f02
movq 0x90(%rsp), %rsi
leaq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x21f840
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x22dd30
movq %rax, 0x18(%rsp)
jmp 0x240ebf
movq 0x18(%rsp), %rdi
callq 0x224010
movb %al, 0xf(%rsp)
jmp 0x240ecf
movb 0xf(%rsp), %al
andb $0x1, %al
movb %al, 0xa7(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x21f6a0
jmp 0x240f02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x21f6a0
jmp 0x240f13
movb 0xa7(%rsp), %al
andb $0x1, %al
addq $0xa8, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x64e40
nopl (%rax)
|
_ZNK5minja5Value3getIbEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_:
sub rsp, 0A8h
mov al, dl
mov [rsp+0A8h+var_10], rdi
mov [rsp+0A8h+var_18], rsi
and al, 1
mov [rsp+0A8h+var_19], al
mov rdi, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_88], rdi
mov rsi, [rsp+0A8h+var_18]
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, 1
jnz short loc_240E92
mov al, [rsp+0A8h+var_19]
and al, 1
mov [rsp+0A8h+var_1], al
jmp short loc_240F02
loc_240E92:
mov rsi, [rsp+0A8h+var_18]
lea rdi, [rsp+0A8h+var_70]
mov [rsp+0A8h+var_98], rdi
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, [rsp+0A8h+var_88]; this
mov rsi, [rsp+0A8h+var_98]; minja::Value *
call _ZNK5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov [rsp+0A8h+var_90], rax
jmp short $+2
loc_240EBF:
mov rdi, [rsp+0A8h+var_90]
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
mov [rsp+0A8h+var_99], al
jmp short $+2
loc_240ECF:
mov al, [rsp+0A8h+var_99]
and al, 1
mov [rsp+0A8h+var_1], al
lea rdi, [rsp+0A8h+var_70]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_240F02
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_30]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_240F13
loc_240F02:
mov al, [rsp+0A8h+var_1]
and al, 1
add rsp, 0A8h
retn
loc_240F13:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
|
char minja::Value::get<bool>(minja::Value *a1, long long a2, char a3)
{
minja::Value *v4; // [rsp+18h] [rbp-90h]
_BYTE v5[87]; // [rsp+38h] [rbp-70h] BYREF
char v6; // [rsp+8Fh] [rbp-19h]
long long v7; // [rsp+90h] [rbp-18h]
minja::Value *v8; // [rsp+98h] [rbp-10h]
char v9; // [rsp+A7h] [rbp-1h]
v8 = a1;
v7 = a2;
v6 = a3 & 1;
if ( minja::Value::contains((long long)a1, a2) )
{
minja::Value::Value((long long)v5, v7);
v4 = (minja::Value *)minja::Value::at(a1, (const minja::Value *)v5);
v9 = minja::Value::get<bool>(v4) & 1;
minja::Value::~Value((minja::Value *)v5);
}
else
{
v9 = v6;
}
return v9 & 1;
}
| |||
10,589 |
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const
|
monkey531[P]llama/common/minja.hpp
|
T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
}
|
O2
|
cpp
|
bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0xb8446
testb %al, %al
je 0xb9f84
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xb4520
movq %r14, %rdi
movq %r12, %rsi
callq 0xb634a
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb5fec
leaq 0x8(%rsp), %rdi
callq 0xb445e
jmp 0xb9f8f
movq %rbx, %rdi
movq %r12, %rsi
callq 0x28e20
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb445e
movq %rbx, %rdi
callq 0x293c0
|
_ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_RKS7_S8_:
push r15
push r14
push r12
push rbx
sub rsp, 58h
mov r12, rcx
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov rdi, rsi
mov rsi, rdx
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, al
jz short loc_B9F84
lea r12, [rsp+78h+var_70]
mov rdi, r12
mov rsi, r15
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, r14; this
mov rsi, r12; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rbx
mov rsi, rax
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
lea rdi, [rsp+78h+var_70]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_B9F8F
loc_B9F84:
mov rdi, rbx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_; std::string::basic_string(std::string&&)
loc_B9F8F:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
|
long long minja::Value::get<std::string>(long long a1, minja::Value *a2, long long a3, long long a4)
{
minja::Value *v5; // rax
_BYTE v7[112]; // [rsp+8h] [rbp-70h] BYREF
if ( minja::Value::contains((long long)a2) )
{
minja::Value::Value((long long)v7);
v5 = (minja::Value *)minja::Value::at(a2, (const minja::Value *)v7);
minja::Value::get<std::string>(a1, v5);
minja::Value::~Value((minja::Value *)v7);
}
else
{
std::string::basic_string(a1, a4);
}
return a1;
}
|
get<std::__cxx11::string>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R12,RCX
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV RSI,RDX
CALL 0x001b8446
TEST AL,AL
JZ 0x001b9f84
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R15
CALL 0x001b4520
LAB_001b9f62:
MOV RDI,R14
MOV RSI,R12
CALL 0x001b634a
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001b5fec
LAB_001b9f78:
LEA RDI,[RSP + 0x8]
CALL 0x001b445e
JMP 0x001b9f8f
LAB_001b9f84:
MOV RDI,RBX
MOV RSI,R12
CALL 0x00128e20
LAB_001b9f8f:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
|
/* std::__cxx11::string minja::Value::get<std::__cxx11::string >(std::__cxx11::string const&,
std::__cxx11::string) const */
string * minja::Value::get<std::__cxx11::string>
(string *param_1,string *param_2,string *param_3,string *param_4)
{
char cVar1;
Value local_70 [80];
cVar1 = contains(param_2);
if (cVar1 == '\0') {
std::__cxx11::string::string(param_1,param_4);
}
else {
Value(local_70,param_3);
/* try { // try from 001b9f62 to 001b9f77 has its CatchHandler @ 001b9f9e */
at((Value *)param_2,local_70);
get<std::__cxx11::string>();
~Value(local_70);
}
return param_1;
}
|
|
10,590 |
translog_read_record
|
eloqsql/storage/maria/ma_loghandler.c
|
translog_size_t translog_read_record(LSN lsn,
translog_size_t offset,
translog_size_t length,
uchar *buffer,
TRANSLOG_READER_DATA *data)
{
translog_size_t requested_length= length;
translog_size_t end= offset + length;
TRANSLOG_READER_DATA internal_data;
DBUG_ENTER("translog_read_record");
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
if (data == NULL)
{
DBUG_ASSERT(lsn != LSN_IMPOSSIBLE);
data= &internal_data;
}
if (lsn ||
(offset < data->current_offset &&
!(offset < data->read_header && offset + length < data->read_header)))
{
if (translog_init_reader_data(lsn, data))
DBUG_RETURN(0);
}
DBUG_PRINT("info", ("Offset: %lu length: %lu "
"Scanner: Cur: " LSN_FMT " Hrz: " LSN_FMT " "
"Lst: " LSN_FMT " Offset: %u(%x) fixed: %d",
(ulong) offset, (ulong) length,
LSN_IN_PARTS(data->scanner.page_addr),
LSN_IN_PARTS(data->scanner.horizon),
LSN_IN_PARTS(data->scanner.last_file_page),
(uint) data->scanner.page_offset,
(uint) data->scanner.page_offset,
data->scanner.fixed_horizon));
if (offset < data->read_header)
{
uint16 len= MY_MIN(data->read_header, end) - offset;
DBUG_PRINT("info",
("enter header offset: %lu length: %lu",
(ulong) offset, (ulong) length));
memcpy(buffer, data->header.header + offset, len);
length-= len;
if (length == 0)
{
translog_destroy_reader_data(data);
DBUG_RETURN(requested_length);
}
offset+= len;
buffer+= len;
DBUG_PRINT("info",
("len: %u offset: %lu curr: %lu length: %lu",
len, (ulong) offset, (ulong) data->current_offset,
(ulong) length));
}
/* TODO: find first page which we should read by offset */
/* read the record chunk by chunk */
for(;;)
{
uint page_end= data->current_offset + data->chunk_size;
DBUG_PRINT("info",
("enter body offset: %lu curr: %lu "
"length: %lu page_end: %lu",
(ulong) offset, (ulong) data->current_offset, (ulong) length,
(ulong) page_end));
if (offset < page_end)
{
uint len= page_end - offset;
set_if_smaller(len, length); /* in case we read beyond record's end */
DBUG_ASSERT(offset >= data->current_offset);
memcpy(buffer,
data->scanner.page + data->body_offset +
(offset - data->current_offset), len);
length-= len;
if (length == 0)
{
translog_destroy_reader_data(data);
DBUG_RETURN(requested_length);
}
offset+= len;
buffer+= len;
DBUG_PRINT("info",
("len: %u offset: %lu curr: %lu length: %lu",
len, (ulong) offset, (ulong) data->current_offset,
(ulong) length));
}
if (translog_record_read_next_chunk(data))
{
translog_destroy_reader_data(data);
DBUG_RETURN(requested_length - length);
}
}
}
|
O0
|
c
|
translog_read_record:
pushq %rbp
movq %rsp, %rbp
subq $0x24d0, %rsp # imm = 0x24D0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x2498(%rbp)
movl %esi, -0x249c(%rbp)
movl %edx, -0x24a0(%rbp)
movq %rcx, -0x24a8(%rbp)
movq %r8, -0x24b0(%rbp)
movl -0x24a0(%rbp), %eax
movl %eax, -0x24b4(%rbp)
movl -0x249c(%rbp), %eax
addl -0x24a0(%rbp), %eax
movl %eax, -0x24b8(%rbp)
jmp 0x8b2f9
cmpq $0x0, -0x24b0(%rbp)
jne 0x8b315
jmp 0x8b305
jmp 0x8b307
leaq -0x2488(%rbp), %rax
movq %rax, -0x24b0(%rbp)
cmpq $0x0, -0x2498(%rbp)
jne 0x8b36a
movl -0x249c(%rbp), %eax
movq -0x24b0(%rbp), %rcx
cmpl 0x246c(%rcx), %eax
jae 0x8b394
movl -0x249c(%rbp), %eax
movq -0x24b0(%rbp), %rcx
movzwl 0x2470(%rcx), %ecx
cmpl %ecx, %eax
jae 0x8b36a
movl -0x249c(%rbp), %eax
addl -0x24a0(%rbp), %eax
movq -0x24b0(%rbp), %rcx
movzwl 0x2470(%rcx), %ecx
cmpl %ecx, %eax
jb 0x8b394
movq -0x2498(%rbp), %rdi
movq -0x24b0(%rbp), %rsi
callq 0x8d6f0
cmpb $0x0, %al
je 0x8b392
jmp 0x8b383
movl $0x0, -0x248c(%rbp)
jmp 0x8b5e7
jmp 0x8b394
jmp 0x8b396
jmp 0x8b398
movl -0x249c(%rbp), %eax
movq -0x24b0(%rbp), %rcx
movzwl 0x2470(%rcx), %ecx
cmpl %ecx, %eax
jae 0x8b497
movq -0x24b0(%rbp), %rax
movzwl 0x2470(%rax), %eax
cmpl -0x24b8(%rbp), %eax
jae 0x8b3e0
movq -0x24b0(%rbp), %rax
movzwl 0x2470(%rax), %eax
movl %eax, -0x24c8(%rbp)
jmp 0x8b3ec
movl -0x24b8(%rbp), %eax
movl %eax, -0x24c8(%rbp)
movl -0x24c8(%rbp), %eax
subl -0x249c(%rbp), %eax
movw %ax, -0x24ba(%rbp)
jmp 0x8b401
movq -0x24a8(%rbp), %rdi
movq -0x24b0(%rbp), %rsi
addq $0x18, %rsi
movl -0x249c(%rbp), %eax
addq %rax, %rsi
movzwl -0x24ba(%rbp), %eax
movl %eax, %edx
callq 0x2a0c0
movzwl -0x24ba(%rbp), %ecx
movl -0x24a0(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24a0(%rbp)
cmpl $0x0, -0x24a0(%rbp)
jne 0x8b465
movq -0x24b0(%rbp), %rdi
callq 0x8d7e0
movl -0x24b4(%rbp), %eax
movl %eax, -0x248c(%rbp)
jmp 0x8b5e7
movzwl -0x24ba(%rbp), %eax
addl -0x249c(%rbp), %eax
movl %eax, -0x249c(%rbp)
movzwl -0x24ba(%rbp), %ecx
movq -0x24a8(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x24a8(%rbp)
jmp 0x8b495
jmp 0x8b497
jmp 0x8b499
movq -0x24b0(%rbp), %rax
movl 0x246c(%rax), %eax
movq -0x24b0(%rbp), %rcx
movzwl 0x2472(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x24c0(%rbp)
jmp 0x8b4be
movl -0x249c(%rbp), %eax
cmpl -0x24c0(%rbp), %eax
jae 0x8b5b2
movl -0x24c0(%rbp), %eax
subl -0x249c(%rbp), %eax
movl %eax, -0x24c4(%rbp)
movl -0x24c4(%rbp), %eax
cmpl -0x24a0(%rbp), %eax
jbe 0x8b4fc
movl -0x24a0(%rbp), %eax
movl %eax, -0x24c4(%rbp)
jmp 0x8b4fe
jmp 0x8b500
jmp 0x8b502
movq -0x24a8(%rbp), %rdi
movq -0x24b0(%rbp), %rax
movq 0x2450(%rax), %rsi
movq -0x24b0(%rbp), %rax
movl 0x2468(%rax), %eax
addq %rax, %rsi
movl -0x249c(%rbp), %eax
movq -0x24b0(%rbp), %rcx
subl 0x246c(%rcx), %eax
movl %eax, %eax
addq %rax, %rsi
movl -0x24c4(%rbp), %eax
movl %eax, %edx
callq 0x2a0c0
movl -0x24c4(%rbp), %ecx
movl -0x24a0(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24a0(%rbp)
cmpl $0x0, -0x24a0(%rbp)
jne 0x8b583
movq -0x24b0(%rbp), %rdi
callq 0x8d7e0
movl -0x24b4(%rbp), %eax
movl %eax, -0x248c(%rbp)
jmp 0x8b5e7
movl -0x24c4(%rbp), %eax
addl -0x249c(%rbp), %eax
movl %eax, -0x249c(%rbp)
movl -0x24c4(%rbp), %ecx
movq -0x24a8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x24a8(%rbp)
jmp 0x8b5b0
jmp 0x8b5b2
movq -0x24b0(%rbp), %rdi
callq 0x8d810
cmpb $0x0, %al
je 0x8b5e2
movq -0x24b0(%rbp), %rdi
callq 0x8d7e0
movl -0x24b4(%rbp), %eax
subl -0x24a0(%rbp), %eax
movl %eax, -0x248c(%rbp)
jmp 0x8b5e7
jmp 0x8b499
movl -0x248c(%rbp), %eax
movl %eax, -0x24cc(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x8b614
movl -0x24cc(%rbp), %eax
addq $0x24d0, %rsp # imm = 0x24D0
popq %rbp
retq
callq 0x2a260
nopl (%rax)
|
translog_read_record:
push rbp
mov rbp, rsp
sub rsp, 24D0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2498], rdi
mov [rbp+var_249C], esi
mov [rbp+var_24A0], edx
mov [rbp+var_24A8], rcx
mov [rbp+var_24B0], r8
mov eax, [rbp+var_24A0]
mov [rbp+var_24B4], eax
mov eax, [rbp+var_249C]
add eax, [rbp+var_24A0]
mov [rbp+var_24B8], eax
jmp short $+2
loc_8B2F9:
cmp [rbp+var_24B0], 0
jnz short loc_8B315
jmp short $+2
loc_8B305:
jmp short $+2
loc_8B307:
lea rax, [rbp+var_2488]
mov [rbp+var_24B0], rax
loc_8B315:
cmp [rbp+var_2498], 0
jnz short loc_8B36A
mov eax, [rbp+var_249C]
mov rcx, [rbp+var_24B0]
cmp eax, [rcx+246Ch]
jnb short loc_8B394
mov eax, [rbp+var_249C]
mov rcx, [rbp+var_24B0]
movzx ecx, word ptr [rcx+2470h]
cmp eax, ecx
jnb short loc_8B36A
mov eax, [rbp+var_249C]
add eax, [rbp+var_24A0]
mov rcx, [rbp+var_24B0]
movzx ecx, word ptr [rcx+2470h]
cmp eax, ecx
jb short loc_8B394
loc_8B36A:
mov rdi, [rbp+var_2498]
mov rsi, [rbp+var_24B0]
call translog_init_reader_data
cmp al, 0
jz short loc_8B392
jmp short $+2
loc_8B383:
mov [rbp+var_248C], 0
jmp loc_8B5E7
loc_8B392:
jmp short $+2
loc_8B394:
jmp short $+2
loc_8B396:
jmp short $+2
loc_8B398:
mov eax, [rbp+var_249C]
mov rcx, [rbp+var_24B0]
movzx ecx, word ptr [rcx+2470h]
cmp eax, ecx
jnb loc_8B497
mov rax, [rbp+var_24B0]
movzx eax, word ptr [rax+2470h]
cmp eax, [rbp+var_24B8]
jnb short loc_8B3E0
mov rax, [rbp+var_24B0]
movzx eax, word ptr [rax+2470h]
mov [rbp+var_24C8], eax
jmp short loc_8B3EC
loc_8B3E0:
mov eax, [rbp+var_24B8]
mov [rbp+var_24C8], eax
loc_8B3EC:
mov eax, [rbp+var_24C8]
sub eax, [rbp+var_249C]
mov [rbp+var_24BA], ax
jmp short $+2
loc_8B401:
mov rdi, [rbp+var_24A8]
mov rsi, [rbp+var_24B0]
add rsi, 18h
mov eax, [rbp+var_249C]
add rsi, rax
movzx eax, [rbp+var_24BA]
mov edx, eax
call _memcpy
movzx ecx, [rbp+var_24BA]
mov eax, [rbp+var_24A0]
sub eax, ecx
mov [rbp+var_24A0], eax
cmp [rbp+var_24A0], 0
jnz short loc_8B465
mov rdi, [rbp+var_24B0]
call translog_destroy_reader_data
mov eax, [rbp+var_24B4]
mov [rbp+var_248C], eax
jmp loc_8B5E7
loc_8B465:
movzx eax, [rbp+var_24BA]
add eax, [rbp+var_249C]
mov [rbp+var_249C], eax
movzx ecx, [rbp+var_24BA]
mov rax, [rbp+var_24A8]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_24A8], rax
jmp short $+2
loc_8B495:
jmp short $+2
loc_8B497:
jmp short $+2
loc_8B499:
mov rax, [rbp+var_24B0]
mov eax, [rax+246Ch]
mov rcx, [rbp+var_24B0]
movzx ecx, word ptr [rcx+2472h]
add eax, ecx
mov [rbp+var_24C0], eax
jmp short $+2
loc_8B4BE:
mov eax, [rbp+var_249C]
cmp eax, [rbp+var_24C0]
jnb loc_8B5B2
mov eax, [rbp+var_24C0]
sub eax, [rbp+var_249C]
mov [rbp+var_24C4], eax
mov eax, [rbp+var_24C4]
cmp eax, [rbp+var_24A0]
jbe short loc_8B4FC
mov eax, [rbp+var_24A0]
mov [rbp+var_24C4], eax
loc_8B4FC:
jmp short $+2
loc_8B4FE:
jmp short $+2
loc_8B500:
jmp short $+2
loc_8B502:
mov rdi, [rbp+var_24A8]
mov rax, [rbp+var_24B0]
mov rsi, [rax+2450h]
mov rax, [rbp+var_24B0]
mov eax, [rax+2468h]
add rsi, rax
mov eax, [rbp+var_249C]
mov rcx, [rbp+var_24B0]
sub eax, [rcx+246Ch]
mov eax, eax
add rsi, rax
mov eax, [rbp+var_24C4]
mov edx, eax
call _memcpy
mov ecx, [rbp+var_24C4]
mov eax, [rbp+var_24A0]
sub eax, ecx
mov [rbp+var_24A0], eax
cmp [rbp+var_24A0], 0
jnz short loc_8B583
mov rdi, [rbp+var_24B0]
call translog_destroy_reader_data
mov eax, [rbp+var_24B4]
mov [rbp+var_248C], eax
jmp short loc_8B5E7
loc_8B583:
mov eax, [rbp+var_24C4]
add eax, [rbp+var_249C]
mov [rbp+var_249C], eax
mov ecx, [rbp+var_24C4]
mov rax, [rbp+var_24A8]
mov ecx, ecx
add rax, rcx
mov [rbp+var_24A8], rax
jmp short $+2
loc_8B5B0:
jmp short $+2
loc_8B5B2:
mov rdi, [rbp+var_24B0]
call translog_record_read_next_chunk
cmp al, 0
jz short loc_8B5E2
mov rdi, [rbp+var_24B0]
call translog_destroy_reader_data
mov eax, [rbp+var_24B4]
sub eax, [rbp+var_24A0]
mov [rbp+var_248C], eax
jmp short loc_8B5E7
loc_8B5E2:
jmp loc_8B499
loc_8B5E7:
mov eax, [rbp+var_248C]
mov [rbp+var_24CC], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_8B614
mov eax, [rbp+var_24CC]
add rsp, 24D0h
pop rbp
retn
loc_8B614:
call ___stack_chk_fail
|
long long translog_read_record(long long a1, unsigned int a2, unsigned int a3, long long a4, char *a5)
{
__int16 v6; // [rsp+8h] [rbp-24C8h]
unsigned int v7; // [rsp+Ch] [rbp-24C4h]
unsigned int v8; // [rsp+10h] [rbp-24C0h]
unsigned __int16 v9; // [rsp+16h] [rbp-24BAh]
unsigned int v10; // [rsp+18h] [rbp-24B8h]
char *v12; // [rsp+20h] [rbp-24B0h]
unsigned int v14; // [rsp+30h] [rbp-24A0h]
unsigned int v15; // [rsp+34h] [rbp-249Ch]
char v17; // [rsp+48h] [rbp-2488h] BYREF
unsigned long long v18; // [rsp+24C8h] [rbp-8h]
v18 = __readfsqword(0x28u);
v15 = a2;
v14 = a3;
v12 = a5;
v10 = a3 + a2;
if ( !a5 )
v12 = &v17;
if ( (a1
|| a2 < *((_DWORD *)v12 + 2331)
&& (a2 >= *((unsigned __int16 *)v12 + 4664) || a3 + a2 >= *((unsigned __int16 *)v12 + 4664)))
&& (unsigned __int8)translog_init_reader_data(a1, v12) )
{
return 0;
}
else
{
if ( a2 >= *((unsigned __int16 *)v12 + 4664) )
goto LABEL_16;
if ( *((unsigned __int16 *)v12 + 4664) >= v10 )
v6 = v10;
else
v6 = *((_WORD *)v12 + 4664);
v9 = v6 - a2;
memcpy(a4, &v12[a2 + 24], (unsigned __int16)(v6 - a2));
v14 -= (unsigned __int16)(v6 - a2);
if ( v14 )
{
v15 = a2 + v9;
a4 += v9;
do
{
LABEL_16:
v8 = *((unsigned __int16 *)v12 + 4665) + *((_DWORD *)v12 + 2331);
if ( v15 < v8 )
{
v7 = v8 - v15;
if ( v8 - v15 > v14 )
v7 = v14;
memcpy(a4, v15 - *((_DWORD *)v12 + 2331) + *((unsigned int *)v12 + 2330) + *((_QWORD *)v12 + 1162), v7);
v14 -= v7;
if ( !v14 )
goto LABEL_14;
v15 += v7;
a4 += v7;
}
}
while ( !(unsigned __int8)translog_record_read_next_chunk(v12) );
translog_destroy_reader_data(v12);
return a3 - v14;
}
else
{
LABEL_14:
translog_destroy_reader_data(v12);
return a3;
}
}
}
|
translog_read_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x24d0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x2498],RDI
MOV dword ptr [RBP + -0x249c],ESI
MOV dword ptr [RBP + -0x24a0],EDX
MOV qword ptr [RBP + -0x24a8],RCX
MOV qword ptr [RBP + -0x24b0],R8
MOV EAX,dword ptr [RBP + -0x24a0]
MOV dword ptr [RBP + -0x24b4],EAX
MOV EAX,dword ptr [RBP + -0x249c]
ADD EAX,dword ptr [RBP + -0x24a0]
MOV dword ptr [RBP + -0x24b8],EAX
JMP 0x0018b2f9
LAB_0018b2f9:
CMP qword ptr [RBP + -0x24b0],0x0
JNZ 0x0018b315
JMP 0x0018b305
LAB_0018b305:
JMP 0x0018b307
LAB_0018b307:
LEA RAX,[RBP + -0x2488]
MOV qword ptr [RBP + -0x24b0],RAX
LAB_0018b315:
CMP qword ptr [RBP + -0x2498],0x0
JNZ 0x0018b36a
MOV EAX,dword ptr [RBP + -0x249c]
MOV RCX,qword ptr [RBP + -0x24b0]
CMP EAX,dword ptr [RCX + 0x246c]
JNC 0x0018b394
MOV EAX,dword ptr [RBP + -0x249c]
MOV RCX,qword ptr [RBP + -0x24b0]
MOVZX ECX,word ptr [RCX + 0x2470]
CMP EAX,ECX
JNC 0x0018b36a
MOV EAX,dword ptr [RBP + -0x249c]
ADD EAX,dword ptr [RBP + -0x24a0]
MOV RCX,qword ptr [RBP + -0x24b0]
MOVZX ECX,word ptr [RCX + 0x2470]
CMP EAX,ECX
JC 0x0018b394
LAB_0018b36a:
MOV RDI,qword ptr [RBP + -0x2498]
MOV RSI,qword ptr [RBP + -0x24b0]
CALL 0x0018d6f0
CMP AL,0x0
JZ 0x0018b392
JMP 0x0018b383
LAB_0018b383:
MOV dword ptr [RBP + -0x248c],0x0
JMP 0x0018b5e7
LAB_0018b392:
JMP 0x0018b394
LAB_0018b394:
JMP 0x0018b396
LAB_0018b396:
JMP 0x0018b398
LAB_0018b398:
MOV EAX,dword ptr [RBP + -0x249c]
MOV RCX,qword ptr [RBP + -0x24b0]
MOVZX ECX,word ptr [RCX + 0x2470]
CMP EAX,ECX
JNC 0x0018b497
MOV RAX,qword ptr [RBP + -0x24b0]
MOVZX EAX,word ptr [RAX + 0x2470]
CMP EAX,dword ptr [RBP + -0x24b8]
JNC 0x0018b3e0
MOV RAX,qword ptr [RBP + -0x24b0]
MOVZX EAX,word ptr [RAX + 0x2470]
MOV dword ptr [RBP + -0x24c8],EAX
JMP 0x0018b3ec
LAB_0018b3e0:
MOV EAX,dword ptr [RBP + -0x24b8]
MOV dword ptr [RBP + -0x24c8],EAX
LAB_0018b3ec:
MOV EAX,dword ptr [RBP + -0x24c8]
SUB EAX,dword ptr [RBP + -0x249c]
MOV word ptr [RBP + -0x24ba],AX
JMP 0x0018b401
LAB_0018b401:
MOV RDI,qword ptr [RBP + -0x24a8]
MOV RSI,qword ptr [RBP + -0x24b0]
ADD RSI,0x18
MOV EAX,dword ptr [RBP + -0x249c]
ADD RSI,RAX
MOVZX EAX,word ptr [RBP + -0x24ba]
MOV EDX,EAX
CALL 0x0012a0c0
MOVZX ECX,word ptr [RBP + -0x24ba]
MOV EAX,dword ptr [RBP + -0x24a0]
SUB EAX,ECX
MOV dword ptr [RBP + -0x24a0],EAX
CMP dword ptr [RBP + -0x24a0],0x0
JNZ 0x0018b465
MOV RDI,qword ptr [RBP + -0x24b0]
CALL 0x0018d7e0
MOV EAX,dword ptr [RBP + -0x24b4]
MOV dword ptr [RBP + -0x248c],EAX
JMP 0x0018b5e7
LAB_0018b465:
MOVZX EAX,word ptr [RBP + -0x24ba]
ADD EAX,dword ptr [RBP + -0x249c]
MOV dword ptr [RBP + -0x249c],EAX
MOVZX ECX,word ptr [RBP + -0x24ba]
MOV RAX,qword ptr [RBP + -0x24a8]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x24a8],RAX
JMP 0x0018b495
LAB_0018b495:
JMP 0x0018b497
LAB_0018b497:
JMP 0x0018b499
LAB_0018b499:
MOV RAX,qword ptr [RBP + -0x24b0]
MOV EAX,dword ptr [RAX + 0x246c]
MOV RCX,qword ptr [RBP + -0x24b0]
MOVZX ECX,word ptr [RCX + 0x2472]
ADD EAX,ECX
MOV dword ptr [RBP + -0x24c0],EAX
JMP 0x0018b4be
LAB_0018b4be:
MOV EAX,dword ptr [RBP + -0x249c]
CMP EAX,dword ptr [RBP + -0x24c0]
JNC 0x0018b5b2
MOV EAX,dword ptr [RBP + -0x24c0]
SUB EAX,dword ptr [RBP + -0x249c]
MOV dword ptr [RBP + -0x24c4],EAX
MOV EAX,dword ptr [RBP + -0x24c4]
CMP EAX,dword ptr [RBP + -0x24a0]
JBE 0x0018b4fc
MOV EAX,dword ptr [RBP + -0x24a0]
MOV dword ptr [RBP + -0x24c4],EAX
LAB_0018b4fc:
JMP 0x0018b4fe
LAB_0018b4fe:
JMP 0x0018b500
LAB_0018b500:
JMP 0x0018b502
LAB_0018b502:
MOV RDI,qword ptr [RBP + -0x24a8]
MOV RAX,qword ptr [RBP + -0x24b0]
MOV RSI,qword ptr [RAX + 0x2450]
MOV RAX,qword ptr [RBP + -0x24b0]
MOV EAX,dword ptr [RAX + 0x2468]
ADD RSI,RAX
MOV EAX,dword ptr [RBP + -0x249c]
MOV RCX,qword ptr [RBP + -0x24b0]
SUB EAX,dword ptr [RCX + 0x246c]
MOV EAX,EAX
ADD RSI,RAX
MOV EAX,dword ptr [RBP + -0x24c4]
MOV EDX,EAX
CALL 0x0012a0c0
MOV ECX,dword ptr [RBP + -0x24c4]
MOV EAX,dword ptr [RBP + -0x24a0]
SUB EAX,ECX
MOV dword ptr [RBP + -0x24a0],EAX
CMP dword ptr [RBP + -0x24a0],0x0
JNZ 0x0018b583
MOV RDI,qword ptr [RBP + -0x24b0]
CALL 0x0018d7e0
MOV EAX,dword ptr [RBP + -0x24b4]
MOV dword ptr [RBP + -0x248c],EAX
JMP 0x0018b5e7
LAB_0018b583:
MOV EAX,dword ptr [RBP + -0x24c4]
ADD EAX,dword ptr [RBP + -0x249c]
MOV dword ptr [RBP + -0x249c],EAX
MOV ECX,dword ptr [RBP + -0x24c4]
MOV RAX,qword ptr [RBP + -0x24a8]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x24a8],RAX
JMP 0x0018b5b0
LAB_0018b5b0:
JMP 0x0018b5b2
LAB_0018b5b2:
MOV RDI,qword ptr [RBP + -0x24b0]
CALL 0x0018d810
CMP AL,0x0
JZ 0x0018b5e2
MOV RDI,qword ptr [RBP + -0x24b0]
CALL 0x0018d7e0
MOV EAX,dword ptr [RBP + -0x24b4]
SUB EAX,dword ptr [RBP + -0x24a0]
MOV dword ptr [RBP + -0x248c],EAX
JMP 0x0018b5e7
LAB_0018b5e2:
JMP 0x0018b499
LAB_0018b5e7:
MOV EAX,dword ptr [RBP + -0x248c]
MOV dword ptr [RBP + -0x24cc],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0018b614
MOV EAX,dword ptr [RBP + -0x24cc]
ADD RSP,0x24d0
POP RBP
RET
LAB_0018b614:
CALL 0x0012a260
|
uint translog_read_record(long param_1,uint param_2,uint param_3,void *param_4,int1 *param_5)
{
char cVar1;
ushort uVar2;
long in_FS_OFFSET;
uint local_24d0;
uint local_24cc;
int1 *local_24b8;
void *local_24b0;
uint local_24a8;
uint local_24a4;
uint local_2494;
int1 local_2490 [9344];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_24d0 = param_2 + param_3;
local_24b8 = param_5;
if (param_5 == (int1 *)0x0) {
local_24b8 = local_2490;
}
if (((param_1 == 0) &&
((*(uint *)(local_24b8 + 0x246c) <= param_2 ||
((param_2 < *(ushort *)(local_24b8 + 0x2470) &&
(param_2 + param_3 < (uint)*(ushort *)(local_24b8 + 0x2470))))))) ||
(cVar1 = translog_init_reader_data(param_1,local_24b8), cVar1 == '\0')) {
local_24b0 = param_4;
local_24a8 = param_3;
local_24a4 = param_2;
local_2494 = param_3;
if (param_2 < *(ushort *)(local_24b8 + 0x2470)) {
if (*(ushort *)(local_24b8 + 0x2470) < local_24d0) {
local_24d0 = (uint)*(ushort *)(local_24b8 + 0x2470);
}
uVar2 = (short)local_24d0 - (short)param_2;
memcpy(param_4,local_24b8 + (ulong)param_2 + 0x18,(ulong)uVar2);
local_24a8 = param_3 - uVar2;
if (local_24a8 == 0) {
translog_destroy_reader_data(local_24b8);
goto LAB_0018b5e7;
}
local_24a4 = uVar2 + param_2;
local_24b0 = (void *)((long)param_4 + (long)(int)(uint)uVar2);
}
do {
if (local_24a4 < *(int *)(local_24b8 + 0x246c) + (uint)*(ushort *)(local_24b8 + 0x2472)) {
local_24cc = (*(int *)(local_24b8 + 0x246c) + (uint)*(ushort *)(local_24b8 + 0x2472)) -
local_24a4;
if (local_24a8 < local_24cc) {
local_24cc = local_24a8;
}
memcpy(local_24b0,
(void *)(*(long *)(local_24b8 + 0x2450) + (ulong)*(uint *)(local_24b8 + 0x2468) +
(ulong)(local_24a4 - *(int *)(local_24b8 + 0x246c))),(ulong)local_24cc);
local_24a8 = local_24a8 - local_24cc;
if (local_24a8 == 0) {
translog_destroy_reader_data(local_24b8);
goto LAB_0018b5e7;
}
local_24a4 = local_24cc + local_24a4;
local_24b0 = (void *)((long)local_24b0 + (ulong)local_24cc);
}
cVar1 = translog_record_read_next_chunk(local_24b8);
} while (cVar1 == '\0');
translog_destroy_reader_data(local_24b8);
local_2494 = param_3 - local_24a8;
}
else {
local_2494 = 0;
}
LAB_0018b5e7:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_2494;
}
|
|
10,591 |
my_read_charset_file
|
eloqsql/mysys/charset.c
|
static my_bool
my_read_charset_file(MY_CHARSET_LOADER *loader,
const char *filename,
myf myflags)
{
uchar *buf;
int fd;
size_t len, tmp_len;
MY_STAT stat_info;
if (!my_stat(filename, &stat_info, MYF(myflags)) ||
((len= (uint)stat_info.st_size) > MY_MAX_ALLOWED_BUF) ||
!(buf= (uchar*) my_malloc(key_memory_charset_loader,len,myflags)))
return TRUE;
if ((fd= mysql_file_open(key_file_charset, filename, O_RDONLY, myflags)) < 0)
goto error;
tmp_len= mysql_file_read(fd, buf, len, myflags);
mysql_file_close(fd, myflags);
if (tmp_len != len)
goto error;
if (my_parse_charset_xml(loader, (char *) buf, len))
{
my_printf_error(EE_UNKNOWN_CHARSET, "Error while parsing '%s': %s\n",
MYF(0), filename, loader->error);
goto error;
}
my_free(buf);
return FALSE;
error:
my_free(buf);
return TRUE;
}
|
O0
|
c
|
my_read_charset_file:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0xd0(%rbp), %rsi
callq 0x2dec0
cmpq $0x0, %rax
je 0x34eb6
movq -0xa0(%rbp), %rax
movl %eax, %eax
movq %rax, -0x38(%rbp)
cmpq $0x100000, %rax # imm = 0x100000
ja 0x34eb6
leaq 0x35cc27(%rip), %rax # 0x391ac4
movl (%rax), %edi
movq -0x38(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x2e060
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x34ebf
movb $0x1, -0x1(%rbp)
jmp 0x34f8b
leaq 0x35c2a2(%rip), %rax # 0x391168
movl (%rax), %edi
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r9
leaq 0x4ea47(%rip), %rsi # 0x8391e
movl $0x223, %edx # imm = 0x223
xorl %r8d, %r8d
callq 0x34fa0
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jge 0x34ef1
jmp 0x34f7e
movl -0x2c(%rbp), %edx
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x20(%rbp), %r9
leaq 0x4ea17(%rip), %rdi # 0x8391e
movl $0x225, %esi # imm = 0x225
callq 0x35090
movq %rax, -0x40(%rbp)
movl -0x2c(%rbp), %edx
movq -0x20(%rbp), %rcx
leaq 0x4e9fb(%rip), %rdi # 0x8391e
movl $0x226, %esi # imm = 0x226
callq 0x35200
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x34f39
jmp 0x34f7e
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x751c0
cmpb $0x0, %al
je 0x34f6f
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %r8
movl $0x16, %edi
leaq 0x4e9f5(%rip), %rsi # 0x83957
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x29300
jmp 0x34f7e
movq -0x28(%rbp), %rdi
callq 0x2e3e0
movb $0x0, -0x1(%rbp)
jmp 0x34f8b
movq -0x28(%rbp), %rdi
callq 0x2e3e0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0xd0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_read_charset_file:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_20]
lea rsi, [rbp+var_D0]
call my_stat
cmp rax, 0
jz short loc_34EB6
mov rax, [rbp+var_A0]
mov eax, eax
mov [rbp+var_38], rax
cmp rax, offset unk_100000
ja short loc_34EB6
lea rax, key_memory_charset_loader
mov edi, [rax]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_20]
call my_malloc
mov [rbp+var_28], rax
cmp rax, 0
jnz short loc_34EBF
loc_34EB6:
mov [rbp+var_1], 1
jmp loc_34F8B
loc_34EBF:
lea rax, key_file_charset
mov edi, [rax]
mov rcx, [rbp+var_18]
mov r9, [rbp+var_20]
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 223h
xor r8d, r8d
call inline_mysql_file_open
mov [rbp+var_2C], eax
cmp eax, 0
jge short loc_34EF1
jmp loc_34F7E
loc_34EF1:
mov edx, [rbp+var_2C]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_38]
mov r9, [rbp+var_20]
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 225h
call inline_mysql_file_read
mov [rbp+var_40], rax
mov edx, [rbp+var_2C]
mov rcx, [rbp+var_20]
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 226h
call inline_mysql_file_close
mov rax, [rbp+var_40]
cmp rax, [rbp+var_38]
jz short loc_34F39
jmp short loc_34F7E
loc_34F39:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_38]
call my_parse_charset_xml
cmp al, 0
jz short loc_34F6F
mov rcx, [rbp+var_18]
mov r8, [rbp+var_10]
mov edi, 16h
lea rsi, aErrorWhilePars; "Error while parsing '%s': %s\n"
xor eax, eax
mov edx, eax
mov al, 0
call my_printf_error
jmp short loc_34F7E
loc_34F6F:
mov rdi, [rbp+var_28]
call my_free
mov [rbp+var_1], 0
jmp short loc_34F8B
loc_34F7E:
mov rdi, [rbp+var_28]
call my_free
mov [rbp+var_1], 1
loc_34F8B:
mov al, [rbp+var_1]
add rsp, 0D0h
pop rbp
retn
|
char my_read_charset_file(long long a1, long long a2, long long a3)
{
_BYTE v4[48]; // [rsp+0h] [rbp-D0h] BYREF
long long v5; // [rsp+30h] [rbp-A0h]
long long v6; // [rsp+90h] [rbp-40h]
unsigned long long v7; // [rsp+98h] [rbp-38h]
int v8; // [rsp+A4h] [rbp-2Ch]
long long v9; // [rsp+A8h] [rbp-28h]
long long v10; // [rsp+B0h] [rbp-20h]
long long v11; // [rsp+B8h] [rbp-18h]
long long v12; // [rsp+C0h] [rbp-10h]
v12 = a1;
v11 = a2;
v10 = a3;
if ( my_stat(a2, (long long)v4, a3) )
{
v7 = (unsigned int)v5;
if ( (unsigned int)v5 <= (unsigned long long)&unk_100000 )
{
v9 = my_malloc(key_memory_charset_loader, v7, v10);
if ( v9 )
{
v8 = inline_mysql_file_open(
key_file_charset,
"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",
547LL,
v11,
0LL,
v10);
if ( v8 >= 0 )
{
v6 = inline_mysql_file_read(
"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",
549LL,
(unsigned int)v8,
v9,
v7,
v10);
inline_mysql_file_close(
"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",
550LL,
(unsigned int)v8,
v10);
if ( v6 == v7 )
{
if ( !(unsigned __int8)my_parse_charset_xml(v12, v9, v7) )
{
my_free(v9);
return 0;
}
my_printf_error(22, (long long)"Error while parsing '%s': %s\n", 0LL, v11, v12);
}
}
my_free(v9);
return 1;
}
}
}
return 1;
}
|
my_read_charset_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0xd0]
CALL 0x0012dec0
CMP RAX,0x0
JZ 0x00134eb6
MOV RAX,qword ptr [RBP + -0xa0]
MOV EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x100000
JA 0x00134eb6
LEA RAX,[0x491ac4]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0012e060
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JNZ 0x00134ebf
LAB_00134eb6:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00134f8b
LAB_00134ebf:
LEA RAX,[0x491168]
MOV EDI,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOV R9,qword ptr [RBP + -0x20]
LEA RSI,[0x18391e]
MOV EDX,0x223
XOR R8D,R8D
CALL 0x00134fa0
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JGE 0x00134ef1
JMP 0x00134f7e
LAB_00134ef1:
MOV EDX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x38]
MOV R9,qword ptr [RBP + -0x20]
LEA RDI,[0x18391e]
MOV ESI,0x225
CALL 0x00135090
MOV qword ptr [RBP + -0x40],RAX
MOV EDX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x20]
LEA RDI,[0x18391e]
MOV ESI,0x226
CALL 0x00135200
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x00134f39
JMP 0x00134f7e
LAB_00134f39:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x001751c0
CMP AL,0x0
JZ 0x00134f6f
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x10]
MOV EDI,0x16
LEA RSI,[0x183957]
XOR EAX,EAX
MOV EDX,EAX
MOV AL,0x0
CALL 0x00129300
JMP 0x00134f7e
LAB_00134f6f:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0012e3e0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00134f8b
LAB_00134f7e:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0012e3e0
MOV byte ptr [RBP + -0x1],0x1
LAB_00134f8b:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0xd0
POP RBP
RET
|
int1 my_read_charset_file(int8 param_1,int8 param_2,int8 param_3)
{
char cVar1;
long lVar2;
int1 local_d8 [48];
ulong local_a8;
ulong local_48;
ulong local_40;
int local_34;
long local_30;
int8 local_28;
int8 local_20;
int8 local_18;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
lVar2 = my_stat(param_2,local_d8,param_3);
if (((lVar2 != 0) && (local_40 = local_a8 & 0xffffffff, local_40 < 0x100001)) &&
(local_30 = my_malloc(key_memory_charset_loader,local_40,local_28), local_30 != 0)) {
local_34 = inline_mysql_file_open
(key_file_charset,
"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x223,local_20,
0,local_28);
if (-1 < local_34) {
local_48 = inline_mysql_file_read
("/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x225,
local_34,local_30,local_40,local_28);
inline_mysql_file_close
("/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x226,local_34,local_28)
;
if (local_48 == local_40) {
cVar1 = my_parse_charset_xml(local_18,local_30,local_40);
if (cVar1 == '\0') {
my_free(local_30);
return 0;
}
my_printf_error(0x16,"Error while parsing \'%s\': %s\n",0,local_20,local_18);
}
}
my_free(local_30);
}
return 1;
}
|
|
10,592 |
my_read_charset_file
|
eloqsql/mysys/charset.c
|
static my_bool
my_read_charset_file(MY_CHARSET_LOADER *loader,
const char *filename,
myf myflags)
{
uchar *buf;
int fd;
size_t len, tmp_len;
MY_STAT stat_info;
if (!my_stat(filename, &stat_info, MYF(myflags)) ||
((len= (uint)stat_info.st_size) > MY_MAX_ALLOWED_BUF) ||
!(buf= (uchar*) my_malloc(key_memory_charset_loader,len,myflags)))
return TRUE;
if ((fd= mysql_file_open(key_file_charset, filename, O_RDONLY, myflags)) < 0)
goto error;
tmp_len= mysql_file_read(fd, buf, len, myflags);
mysql_file_close(fd, myflags);
if (tmp_len != len)
goto error;
if (my_parse_charset_xml(loader, (char *) buf, len))
{
my_printf_error(EE_UNKNOWN_CHARSET, "Error while parsing '%s': %s\n",
MYF(0), filename, loader->error);
goto error;
}
my_free(buf);
return FALSE;
error:
my_free(buf);
return TRUE;
}
|
O3
|
c
|
my_read_charset_file:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x120(%rbp), %rsi
movq %r14, %rdi
callq 0x2acc3
testq %rax, %rax
je 0x2f174
movl -0xf0(%rbp), %r13d
cmpq $0x100000, %r13 # imm = 0x100000
ja 0x2f174
leaq 0x33ee78(%rip), %rax # 0x36ded4
movl (%rax), %edi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2ada5
testq %rax, %rax
je 0x2f174
movq %rax, %r15
movq %rbx, -0x38(%rbp)
leaq 0x33e4f0(%rip), %rax # 0x36d570
movl (%rax), %esi
leaq 0x2c7ddf(%rip), %rax # 0x2f6e68
movq (%rax), %rax
leaq -0x90(%rbp), %rdi
leaq -0x48(%rbp), %rbx
movl $0x2, %edx
movq %r14, %rcx
movq %rbx, %r8
callq *0x148(%rax)
movq %rax, (%rbx)
testq %rax, %rax
jne 0x2f186
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2b344
movl %eax, %ebx
testl %ebx, %ebx
js 0x2f16c
leaq 0x2c7d96(%rip), %rax # 0x2f6e68
movq (%rax), %rax
leaq -0x90(%rbp), %rdi
movl %ebx, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x2f1cf
movl %ebx, %edi
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x323a0
movq %rax, -0x30(%rbp)
leaq 0x2c7d5b(%rip), %rax # 0x2f6e68
movq (%rax), %rax
leaq -0x90(%rbp), %rdi
movl %ebx, %esi
movl $0x4, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x2f243
movl %ebx, %edi
movq %r12, %rsi
callq 0x2b4e9
cmpq %r13, -0x30(%rbp)
jne 0x2f16c
movq -0x38(%rbp), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x58f50
testb %al, %al
je 0x2f16c
leaq 0x3376d(%rip), %rsi # 0x628c4
movl $0x16, %edi
xorl %edx, %edx
movq %r14, %rcx
movq -0x38(%rbp), %r8
xorl %eax, %eax
callq 0x27d31
movq %r15, %rdi
callq 0x2afd2
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2c7cdb(%rip), %rcx # 0x2f6e68
movq (%rcx), %rcx
leaq 0x336f4(%rip), %rsi # 0x6288b
movq %rax, %rdi
movl $0x223, %edx # imm = 0x223
callq *0x1f0(%rcx)
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2b344
movl %eax, %ebx
leaq 0x2c7cad(%rip), %rax # 0x2f6e68
movq (%rax), %rax
movq -0x48(%rbp), %rdi
movl %ebx, %esi
callq *0x200(%rax)
jmp 0x2f0c3
movq %rax, %rcx
leaq 0x2c7c8f(%rip), %rax # 0x2f6e68
movq (%rax), %rax
leaq 0x336a8(%rip), %rdx # 0x6288b
movq %rcx, -0x40(%rbp)
movq %rcx, %rdi
movq %r13, %rsi
movl $0x225, %ecx # imm = 0x225
callq *0x210(%rax)
movl %ebx, %edi
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x323a0
xorl %esi, %esi
testq %rax, %rax
movl $0x0, %ecx
cmoveq %r13, %rcx
cmpq $-0x1, %rax
movq %rax, -0x30(%rbp)
cmovneq %rax, %rsi
testb $0x6, %r12b
cmovneq %rcx, %rsi
leaq 0x2c7c37(%rip), %rax # 0x2f6e68
movq (%rax), %rax
movq -0x40(%rbp), %rdi
callq *0x218(%rax)
jmp 0x2f106
movq %rax, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x24c0c
jmp 0x2f137
|
my_read_charset_file:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r12, rdx
mov r14, rsi
mov rbx, rdi
lea rsi, [rbp+var_120]
mov rdi, r14
call my_stat
test rax, rax
jz loc_2F174
mov r13d, [rbp+var_F0]
cmp r13, offset unk_100000
ja loc_2F174
lea rax, key_memory_charset_loader
mov edi, [rax]
mov rsi, r13
mov rdx, r12
call my_malloc
test rax, rax
jz loc_2F174
mov r15, rax
mov [rbp+var_38], rbx
lea rax, key_file_charset
mov esi, [rax]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_90]
lea rbx, [rbp+var_48]
mov edx, 2
mov rcx, r14
mov r8, rbx
call qword ptr [rax+148h]
mov [rbx], rax
test rax, rax
jnz loc_2F186
mov rdi, r14
xor esi, esi
mov rdx, r12
call my_open
mov ebx, eax
loc_2F0C3:
test ebx, ebx
js loc_2F16C
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_90]
mov esi, ebx
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_2F1CF
mov edi, ebx
mov rsi, r15
mov rdx, r13
mov rcx, r12
call my_read
mov [rbp+var_30], rax
loc_2F106:
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_90]
mov esi, ebx
mov edx, 4
call qword ptr [rax+158h]
test rax, rax
jnz loc_2F243
mov edi, ebx
mov rsi, r12
call my_close
loc_2F137:
cmp [rbp+var_30], r13
jnz short loc_2F16C
mov rdi, [rbp+var_38]
mov rsi, r15
mov rdx, r13
call my_parse_charset_xml
test al, al
jz short loc_2F16C
lea rsi, aErrorWhilePars; "Error while parsing '%s': %s\n"
mov edi, 16h
xor edx, edx
mov rcx, r14
mov r8, [rbp+var_38]
xor eax, eax
call my_printf_error
loc_2F16C:
mov rdi, r15
call my_free
loc_2F174:
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2F186:
lea rcx, PSI_server
mov rcx, [rcx]
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rax
mov edx, 223h
call qword ptr [rcx+1F0h]
mov rdi, r14
xor esi, esi
mov rdx, r12
call my_open
mov ebx, eax
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_48]
mov esi, ebx
call qword ptr [rax+200h]
jmp loc_2F0C3
loc_2F1CF:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov [rbp+var_40], rcx
mov rdi, rcx
mov rsi, r13
mov ecx, 225h
call qword ptr [rax+210h]
mov edi, ebx
mov rsi, r15
mov rdx, r13
mov rcx, r12
call my_read
xor esi, esi
test rax, rax
mov ecx, 0
cmovz rcx, r13
cmp rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_30], rax
cmovnz rsi, rax
test r12b, 6
cmovnz rsi, rcx
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_40]
call qword ptr [rax+218h]
jmp loc_2F106
loc_2F243:
mov rdi, rax
mov esi, ebx
mov rdx, r12
call my_read_charset_file_cold_1
jmp loc_2F137
|
long long my_read_charset_file(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long result; // rax
long long v14; // r13
long long v15; // r15
long long v16; // rax
long long v17; // rbx
long long v18; // rax
long long v19; // rax
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
long long v23; // rax
long long v24; // rdx
long long v25; // rsi
long long v26; // rcx
char v27[48]; // [rsp+0h] [rbp-120h] BYREF
unsigned int v28; // [rsp+30h] [rbp-F0h]
_BYTE v29[72]; // [rsp+90h] [rbp-90h] BYREF
long long v30; // [rsp+D8h] [rbp-48h] BYREF
long long v31; // [rsp+E0h] [rbp-40h]
long long v32; // [rsp+E8h] [rbp-38h]
long long v33; // [rsp+F0h] [rbp-30h]
result = my_stat(a2, (long long)v27, a3);
if ( result )
{
v14 = v28;
if ( v28 <= (unsigned long long)&unk_100000 )
{
result = my_malloc(key_memory_charset_loader, v28, a3);
if ( result )
{
v15 = result;
v32 = a1;
v16 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[0] + 41))(
v29,
key_file_charset,
2LL,
a2,
&v30);
v30 = v16;
if ( v16 )
{
(*((void ( **)(long long, const char *, long long))PSI_server[0] + 62))(
v16,
"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",
547LL);
v17 = (unsigned int)my_open(a2, 0, a3);
(*((void ( **)(long long, long long))PSI_server[0] + 64))(v30, v17);
}
else
{
LODWORD(v17) = my_open(a2, 0, a3);
}
if ( (int)v17 >= 0 )
{
v18 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server[0] + 43))(v29, (unsigned int)v17, 6LL);
if ( v18 )
{
v31 = v18;
(*((void ( **)(long long, long long, const char *, long long))PSI_server[0] + 66))(
v18,
v14,
"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",
549LL);
v23 = my_read((unsigned int)v17, v15, v14, a3);
v25 = 0LL;
v26 = 0LL;
if ( !v23 )
v26 = v14;
v33 = v23;
if ( v23 != -1 )
v25 = v23;
if ( (a3 & 6) != 0 )
v25 = v26;
(*((void ( **)(long long, long long, long long, long long))PSI_server[0] + 67))(v31, v25, v24, v26);
}
else
{
v33 = my_read((unsigned int)v17, v15, v14, a3);
}
v19 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server[0] + 43))(v29, (unsigned int)v17, 4LL);
if ( v19 )
my_read_charset_file_cold_1(v19, v17, a3);
else
my_close((unsigned int)v17, a3);
if ( v33 == v14 )
{
if ( (unsigned __int8)my_parse_charset_xml(v32, v15, v14) )
my_printf_error(
a4,
a5,
a6,
a7,
v21,
v22,
a10,
a11,
22LL,
(long long)"Error while parsing '%s': %s\n",
0LL,
a2,
v32,
v20,
v27[0]);
}
}
return my_free(v15);
}
}
}
return result;
}
|
my_read_charset_file:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R12,RDX
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[RBP + -0x120]
MOV RDI,R14
CALL 0x0012acc3
TEST RAX,RAX
JZ 0x0012f174
MOV R13D,dword ptr [RBP + -0xf0]
CMP R13,0x100000
JA 0x0012f174
LEA RAX,[0x46ded4]
MOV EDI,dword ptr [RAX]
MOV RSI,R13
MOV RDX,R12
CALL 0x0012ada5
TEST RAX,RAX
JZ 0x0012f174
MOV R15,RAX
MOV qword ptr [RBP + -0x38],RBX
LEA RAX,[0x46d570]
MOV ESI,dword ptr [RAX]
LEA RAX,[0x3f6e68]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x90]
LEA RBX,[RBP + -0x48]
MOV EDX,0x2
MOV RCX,R14
MOV R8,RBX
CALL qword ptr [RAX + 0x148]
MOV qword ptr [RBX],RAX
TEST RAX,RAX
JNZ 0x0012f186
MOV RDI,R14
XOR ESI,ESI
MOV RDX,R12
CALL 0x0012b344
MOV EBX,EAX
LAB_0012f0c3:
TEST EBX,EBX
JS 0x0012f16c
LEA RAX,[0x3f6e68]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x90]
MOV ESI,EBX
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0012f1cf
MOV EDI,EBX
MOV RSI,R15
MOV RDX,R13
MOV RCX,R12
CALL 0x001323a0
MOV qword ptr [RBP + -0x30],RAX
LAB_0012f106:
LEA RAX,[0x3f6e68]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x90]
MOV ESI,EBX
MOV EDX,0x4
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0012f243
MOV EDI,EBX
MOV RSI,R12
CALL 0x0012b4e9
LAB_0012f137:
CMP qword ptr [RBP + -0x30],R13
JNZ 0x0012f16c
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,R15
MOV RDX,R13
CALL 0x00158f50
TEST AL,AL
JZ 0x0012f16c
LEA RSI,[0x1628c4]
MOV EDI,0x16
XOR EDX,EDX
MOV RCX,R14
MOV R8,qword ptr [RBP + -0x38]
XOR EAX,EAX
CALL 0x00127d31
LAB_0012f16c:
MOV RDI,R15
CALL 0x0012afd2
LAB_0012f174:
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012f186:
LEA RCX,[0x3f6e68]
MOV RCX,qword ptr [RCX]
LEA RSI,[0x16288b]
MOV RDI,RAX
MOV EDX,0x223
CALL qword ptr [RCX + 0x1f0]
MOV RDI,R14
XOR ESI,ESI
MOV RDX,R12
CALL 0x0012b344
MOV EBX,EAX
LEA RAX,[0x3f6e68]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x48]
MOV ESI,EBX
CALL qword ptr [RAX + 0x200]
JMP 0x0012f0c3
LAB_0012f1cf:
MOV RCX,RAX
LEA RAX,[0x3f6e68]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x16288b]
MOV qword ptr [RBP + -0x40],RCX
MOV RDI,RCX
MOV RSI,R13
MOV ECX,0x225
CALL qword ptr [RAX + 0x210]
MOV EDI,EBX
MOV RSI,R15
MOV RDX,R13
MOV RCX,R12
CALL 0x001323a0
XOR ESI,ESI
TEST RAX,RAX
MOV ECX,0x0
CMOVZ RCX,R13
CMP RAX,-0x1
MOV qword ptr [RBP + -0x30],RAX
CMOVNZ RSI,RAX
TEST R12B,0x6
CMOVNZ RSI,RCX
LEA RAX,[0x3f6e68]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0x218]
JMP 0x0012f106
LAB_0012f243:
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R12
CALL 0x00124c0c
JMP 0x0012f137
|
void my_read_charset_file(int8 param_1,int8 param_2,ulong param_3)
{
char cVar1;
int iVar2;
long lVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
int1 local_128 [48];
uint local_f8;
int1 local_98 [72];
long local_50;
long local_48;
int8 local_40;
ulong local_38;
lVar3 = my_stat(param_2,local_128);
if ((lVar3 != 0) && (uVar7 = (ulong)local_f8, uVar7 < 0x100001)) {
lVar3 = my_malloc(key_memory_charset_loader,uVar7,param_3);
if (lVar3 != 0) {
local_40 = param_1;
local_50 = (**(code **)(PSI_server + 0x148))(local_98,key_file_charset,2,param_2,&local_50);
if (local_50 == 0) {
iVar2 = my_open(param_2,0,param_3);
}
else {
(**(code **)(PSI_server + 0x1f0))
(local_50,"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x223);
iVar2 = my_open(param_2,0,param_3);
(**(code **)(PSI_server + 0x200))(local_50,iVar2);
}
if (-1 < iVar2) {
lVar4 = (**(code **)(PSI_server + 0x158))(local_98,iVar2,6);
if (lVar4 == 0) {
local_38 = my_read(iVar2,lVar3,uVar7,param_3);
}
else {
local_48 = lVar4;
(**(code **)(PSI_server + 0x210))
(lVar4,uVar7,"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x225);
local_38 = my_read(iVar2,lVar3,uVar7,param_3);
uVar5 = 0;
if (local_38 == 0) {
uVar5 = uVar7;
}
uVar6 = 0;
if (local_38 != 0xffffffffffffffff) {
uVar6 = local_38;
}
if ((param_3 & 6) != 0) {
uVar6 = uVar5;
}
(**(code **)(PSI_server + 0x218))(local_48,uVar6);
}
lVar4 = (**(code **)(PSI_server + 0x158))(local_98,iVar2,4);
if (lVar4 == 0) {
my_close(iVar2,param_3);
}
else {
my_read_charset_file_cold_1(lVar4,iVar2,param_3);
}
if (local_38 == uVar7) {
cVar1 = my_parse_charset_xml(local_40,lVar3,uVar7);
if (cVar1 != '\0') {
my_printf_error(0x16,"Error while parsing \'%s\': %s\n",0,param_2,local_40);
}
}
}
my_free(lVar3);
}
}
return;
}
|
|
10,593 |
sp_add_point_to_mbr
|
eloqsql/storage/myisam/sp_key.c
|
static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims,
uchar byte_order __attribute__((unused)),
double *mbr)
{
double ord;
double *mbr_end= mbr + n_dims * 2;
while (mbr < mbr_end)
{
if ((*wkb) > end - 8)
return -1;
float8get(ord, (const uchar*) *wkb);
(*wkb)+= 8;
if (ord < *mbr)
*mbr= ord;
mbr++;
if (ord > *mbr)
*mbr= ord;
mbr++;
}
return 0;
}
|
O0
|
c
|
sp_add_point_to_mbr:
pushq %rbp
movq %rsp, %rbp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movb %al, -0x1d(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
shll %ecx
movl %ecx, %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0xd68ce
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
jbe 0xd6859
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd68d5
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x8, %rcx
movq %rcx, (%rax)
movsd -0x30(%rbp), %xmm1
movq -0x28(%rbp), %rax
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd6895
movsd -0x30(%rbp), %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movsd -0x30(%rbp), %xmm0
movq -0x28(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0xd68bd
movsd -0x30(%rbp), %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
jmp 0xd682e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
|
sp_add_point_to_mbr_0:
push rbp
mov rbp, rsp
mov al, cl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_1D], al
mov [rbp+var_28], r8
mov rax, [rbp+var_28]
mov ecx, [rbp+var_1C]
shl ecx, 1
mov ecx, ecx
shl rcx, 3
add rax, rcx
mov [rbp+var_38], rax
loc_D682E:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_38]
jnb loc_D68CE
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_18]
add rcx, 0FFFFFFFFFFFFFFF8h
cmp rax, rcx
jbe short loc_D6859
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_D68D5
loc_D6859:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 8
mov [rax], rcx
movsd xmm1, [rbp+var_30]
mov rax, [rbp+var_28]
movsd xmm0, qword ptr [rax]
ucomisd xmm0, xmm1
jbe short loc_D6895
movsd xmm0, [rbp+var_30]
mov rax, [rbp+var_28]
movsd qword ptr [rax], xmm0
loc_D6895:
mov rax, [rbp+var_28]
add rax, 8
mov [rbp+var_28], rax
movsd xmm0, [rbp+var_30]
mov rax, [rbp+var_28]
ucomisd xmm0, qword ptr [rax]
jbe short loc_D68BD
movsd xmm0, [rbp+var_30]
mov rax, [rbp+var_28]
movsd qword ptr [rax], xmm0
loc_D68BD:
mov rax, [rbp+var_28]
add rax, 8
mov [rbp+var_28], rax
jmp loc_D682E
loc_D68CE:
mov [rbp+var_4], 0
loc_D68D5:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long sp_add_point_to_mbr_0(unsigned long long *a1, long long a2, int a3, long long a4, double *a5)
{
double v6; // [rsp+8h] [rbp-30h]
double *i; // [rsp+10h] [rbp-28h]
double *v8; // [rsp+10h] [rbp-28h]
for ( i = a5; i < &a5[2 * a3]; i = v8 + 1 )
{
if ( *a1 > a2 - 8 )
return (unsigned int)-1;
v6 = *(double *)*a1;
*a1 += 8LL;
if ( *i > v6 )
*i = v6;
v8 = i + 1;
if ( v6 > *v8 )
*v8 = v6;
}
return 0;
}
|
sp_add_point_to_mbr:
PUSH RBP
MOV RBP,RSP
MOV AL,CL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV byte ptr [RBP + -0x1d],AL
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x1c]
SHL ECX,0x1
MOV ECX,ECX
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001d682e:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x001d68ce
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,-0x8
CMP RAX,RCX
JBE 0x001d6859
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001d68d5
LAB_001d6859:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x8
MOV qword ptr [RAX],RCX
MOVSD XMM1,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOVSD XMM0,qword ptr [RAX]
UCOMISD XMM0,XMM1
JBE 0x001d6895
MOVSD XMM0,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOVSD qword ptr [RAX],XMM0
LAB_001d6895:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x8
MOV qword ptr [RBP + -0x28],RAX
MOVSD XMM0,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
UCOMISD XMM0,qword ptr [RAX]
JBE 0x001d68bd
MOVSD XMM0,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOVSD qword ptr [RAX],XMM0
LAB_001d68bd:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x8
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001d682e
LAB_001d68ce:
MOV dword ptr [RBP + -0x4],0x0
LAB_001d68d5:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4
sp_add_point_to_mbr(ulong *param_1,long param_2,int param_3,int8 param_4,double *param_5)
{
double dVar1;
double *pdVar2;
double *local_30;
local_30 = param_5;
while( true ) {
if (param_5 + (uint)(param_3 << 1) <= local_30) {
return 0;
}
if (param_2 - 8U < *param_1) break;
dVar1 = *(double *)*param_1;
*param_1 = *param_1 + 8;
if (dVar1 < *local_30) {
*local_30 = dVar1;
}
pdVar2 = local_30 + 1;
if (*pdVar2 <= dVar1 && dVar1 != *pdVar2) {
*pdVar2 = dVar1;
}
local_30 = local_30 + 2;
}
return 0xffffffff;
}
|
|
10,594 |
translog_buffer_decrease_writers
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_buffer_decrease_writers(struct st_translog_buffer *buffer)
{
DBUG_ENTER("translog_buffer_decrease_writers");
translog_buffer_lock_assert_owner(buffer);
buffer->copy_to_buffer_in_progress--;
DBUG_PRINT("info",
("copy_to_buffer_in_progress. Buffer #%u %p progress: %d",
(uint) buffer->buffer_no, buffer,
buffer->copy_to_buffer_in_progress));
if (buffer->copy_to_buffer_in_progress == 0)
mysql_cond_broadcast(&buffer->waiting_filling_buffer);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
translog_buffer_decrease_writers:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x100078(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x100078(%rax)
jmp 0x39d81
movq -0x8(%rbp), %rax
cmpl $0x0, 0x100078(%rax)
jne 0x39d9e
movq -0x8(%rbp), %rdi
addq $0x100040, %rdi # imm = 0x100040
callq 0x33f90
jmp 0x39da0
jmp 0x39da2
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
translog_buffer_decrease_writers:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov ecx, [rax+100078h]
add ecx, 0FFFFFFFFh
mov [rax+100078h], ecx
jmp short $+2
loc_39D81:
mov rax, [rbp+var_8]
cmp dword ptr [rax+100078h], 0
jnz short loc_39D9E
mov rdi, [rbp+var_8]
add rdi, 100040h
call inline_mysql_cond_broadcast
loc_39D9E:
jmp short $+2
loc_39DA0:
jmp short $+2
loc_39DA2:
add rsp, 10h
pop rbp
retn
|
long long translog_buffer_decrease_writers(long long a1)
{
long long result; // rax
--*(_DWORD *)(a1 + 1048696);
result = a1;
if ( !*(_DWORD *)(a1 + 1048696) )
return inline_mysql_cond_broadcast(a1 + 1048640);
return result;
}
|
translog_buffer_decrease_writers:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x100078]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x100078],ECX
JMP 0x00139d81
LAB_00139d81:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x100078],0x0
JNZ 0x00139d9e
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x100040
CALL 0x00133f90
LAB_00139d9e:
JMP 0x00139da0
LAB_00139da0:
JMP 0x00139da2
LAB_00139da2:
ADD RSP,0x10
POP RBP
RET
|
void translog_buffer_decrease_writers(long param_1)
{
*(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_type + param_1) =
*(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_type + param_1) + -1;
if (*(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_type + param_1) == 0) {
inline_mysql_cond_broadcast((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1);
}
return;
}
|
|
10,595 |
plutovg_canvas_clip_preserve
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-canvas.c
|
void plutovg_canvas_clip_preserve(plutovg_canvas_t* canvas)
{
if(canvas->state->clipping) {
plutovg_rasterize(&canvas->fill_spans, canvas->path, &canvas->state->matrix, &canvas->clip_rect, NULL, canvas->state->winding);
plutovg_span_buffer_intersect(&canvas->clip_spans, &canvas->fill_spans, &canvas->state->clip_spans);
plutovg_span_buffer_copy(&canvas->state->clip_spans, &canvas->clip_spans);
} else {
plutovg_rasterize(&canvas->state->clip_spans, canvas->path, &canvas->state->matrix, &canvas->clip_rect, NULL, canvas->state->winding);
canvas->state->clipping = true;
}
}
|
O1
|
c
|
plutovg_canvas_clip_preserve:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %rdi
leaq 0x20(%rdi), %rdx
leaq 0x28(%rbx), %rcx
movl 0x80(%rdi), %r9d
cmpb $0x1, 0x90(%rdi)
jne 0x407d
leaq 0x58(%rbx), %r14
movq %r14, %rdi
xorl %r8d, %r8d
callq 0xd141
leaq 0x38(%rbx), %r15
movq 0x18(%rbx), %rdx
addq $0x60, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xcf5c
movq 0x18(%rbx), %rdi
addq $0x60, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xce0b
addq $0x60, %rdi
xorl %r8d, %r8d
callq 0xd141
movq 0x18(%rbx), %rax
movb $0x1, 0x90(%rax)
popq %rbx
popq %r14
popq %r15
retq
|
plutovg_canvas_clip_preserve:
push r15
push r14
push rbx
mov rbx, rdi
mov rsi, [rdi+10h]
mov rdi, [rdi+18h]
lea rdx, [rdi+20h]
lea rcx, [rbx+28h]
mov r9d, [rdi+80h]
cmp byte ptr [rdi+90h], 1
jnz short loc_407D
lea r14, [rbx+58h]
mov rdi, r14
xor r8d, r8d
call plutovg_rasterize
lea r15, [rbx+38h]
mov rdx, [rbx+18h]
add rdx, 60h ; '`'
mov rdi, r15
mov rsi, r14
call plutovg_span_buffer_intersect
mov rdi, [rbx+18h]
add rdi, 60h ; '`'
mov rsi, r15
pop rbx
pop r14
pop r15
jmp plutovg_span_buffer_copy
loc_407D:
add rdi, 60h ; '`'
xor r8d, r8d
call plutovg_rasterize
mov rax, [rbx+18h]
mov byte ptr [rax+90h], 1
pop rbx
pop r14
pop r15
retn
|
long long plutovg_canvas_clip_preserve(long long a1)
{
long long v2; // rsi
long long v3; // rdi
long long v4; // rdx
long long v5; // rcx
long long v6; // r9
long long result; // rax
v2 = *(_QWORD *)(a1 + 16);
v3 = *(_QWORD *)(a1 + 24);
v4 = v3 + 32;
v5 = a1 + 40;
v6 = *(unsigned int *)(v3 + 128);
if ( *(_BYTE *)(v3 + 144) == 1 )
{
plutovg_rasterize(a1 + 88, v2, v4, v5, 0LL, v6);
plutovg_span_buffer_intersect(a1 + 56, a1 + 88, *(_QWORD *)(a1 + 24) + 96LL);
return plutovg_span_buffer_copy(*(_QWORD *)(a1 + 24) + 96LL, a1 + 56);
}
else
{
plutovg_rasterize(v3 + 96, v2, v4, v5, 0LL, v6);
result = *(_QWORD *)(a1 + 24);
*(_BYTE *)(result + 144) = 1;
}
return result;
}
|
plutovg_canvas_clip_preserve:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RSI,qword ptr [RDI + 0x10]
MOV RDI,qword ptr [RDI + 0x18]
LEA RDX,[RDI + 0x20]
LEA RCX,[RBX + 0x28]
MOV R9D,dword ptr [RDI + 0x80]
CMP byte ptr [RDI + 0x90],0x1
JNZ 0x0010407d
LEA R14,[RBX + 0x58]
MOV RDI,R14
XOR R8D,R8D
CALL 0x0010d141
LEA R15,[RBX + 0x38]
MOV RDX,qword ptr [RBX + 0x18]
ADD RDX,0x60
MOV RDI,R15
MOV RSI,R14
CALL 0x0010cf5c
MOV RDI,qword ptr [RBX + 0x18]
ADD RDI,0x60
MOV RSI,R15
POP RBX
POP R14
POP R15
JMP 0x0010ce0b
LAB_0010407d:
ADD RDI,0x60
XOR R8D,R8D
CALL 0x0010d141
MOV RAX,qword ptr [RBX + 0x18]
MOV byte ptr [RAX + 0x90],0x1
POP RBX
POP R14
POP R15
RET
|
void plutovg_canvas_clip_preserve(long param_1)
{
long lVar1;
lVar1 = *(long *)(param_1 + 0x18);
if (*(char *)(lVar1 + 0x90) == '\x01') {
plutovg_rasterize(param_1 + 0x58,*(int8 *)(param_1 + 0x10),lVar1 + 0x20,param_1 + 0x28,0,
*(int4 *)(lVar1 + 0x80));
plutovg_span_buffer_intersect(param_1 + 0x38,param_1 + 0x58,*(long *)(param_1 + 0x18) + 0x60);
plutovg_span_buffer_copy(*(long *)(param_1 + 0x18) + 0x60,param_1 + 0x38);
return;
}
plutovg_rasterize(lVar1 + 0x60,*(int8 *)(param_1 + 0x10),lVar1 + 0x20,param_1 + 0x28,0,
*(int4 *)(lVar1 + 0x80));
*(int1 *)(*(long *)(param_1 + 0x18) + 0x90) = 1;
return;
}
|
|
10,596 |
plutovg_canvas_clip_preserve
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-canvas.c
|
void plutovg_canvas_clip_preserve(plutovg_canvas_t* canvas)
{
if(canvas->state->clipping) {
plutovg_rasterize(&canvas->fill_spans, canvas->path, &canvas->state->matrix, &canvas->clip_rect, NULL, canvas->state->winding);
plutovg_span_buffer_intersect(&canvas->clip_spans, &canvas->fill_spans, &canvas->state->clip_spans);
plutovg_span_buffer_copy(&canvas->state->clip_spans, &canvas->clip_spans);
} else {
plutovg_rasterize(&canvas->state->clip_spans, canvas->path, &canvas->state->matrix, &canvas->clip_rect, NULL, canvas->state->winding);
canvas->state->clipping = true;
}
}
|
O2
|
c
|
plutovg_canvas_clip_preserve:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %rdi
leaq 0x20(%rdi), %rdx
leaq 0x28(%rbx), %rcx
movl 0x80(%rdi), %r9d
cmpb $0x1, 0x90(%rdi)
jne 0x3f83
leaq 0x58(%rbx), %r14
movq %r14, %rdi
xorl %r8d, %r8d
callq 0xb71c
leaq 0x38(%rbx), %r15
movq 0x18(%rbx), %rdx
addq $0x60, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xb540
movq 0x18(%rbx), %rdi
addq $0x60, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xb3ed
addq $0x60, %rdi
xorl %r8d, %r8d
callq 0xb71c
movq 0x18(%rbx), %rax
movb $0x1, 0x90(%rax)
popq %rbx
popq %r14
popq %r15
retq
|
plutovg_canvas_clip_preserve:
push r15
push r14
push rbx
mov rbx, rdi
mov rsi, [rdi+10h]
mov rdi, [rdi+18h]
lea rdx, [rdi+20h]
lea rcx, [rbx+28h]
mov r9d, [rdi+80h]
cmp byte ptr [rdi+90h], 1
jnz short loc_3F83
lea r14, [rbx+58h]
mov rdi, r14
xor r8d, r8d
call plutovg_rasterize
lea r15, [rbx+38h]
mov rdx, [rbx+18h]
add rdx, 60h ; '`'
mov rdi, r15
mov rsi, r14
call plutovg_span_buffer_intersect
mov rdi, [rbx+18h]
add rdi, 60h ; '`'
mov rsi, r15
pop rbx
pop r14
pop r15
jmp plutovg_span_buffer_copy
loc_3F83:
add rdi, 60h ; '`'
xor r8d, r8d
call plutovg_rasterize
mov rax, [rbx+18h]
mov byte ptr [rax+90h], 1
pop rbx
pop r14
pop r15
retn
|
long long plutovg_canvas_clip_preserve(long long a1)
{
long long v2; // rsi
long long v3; // rdi
long long v4; // rdx
long long v5; // rcx
long long v6; // r9
long long result; // rax
v2 = *(_QWORD *)(a1 + 16);
v3 = *(_QWORD *)(a1 + 24);
v4 = v3 + 32;
v5 = a1 + 40;
v6 = *(unsigned int *)(v3 + 128);
if ( *(_BYTE *)(v3 + 144) == 1 )
{
plutovg_rasterize(a1 + 88, v2, v4, v5, 0LL, v6);
plutovg_span_buffer_intersect(a1 + 56, a1 + 88, *(_QWORD *)(a1 + 24) + 96LL);
return plutovg_span_buffer_copy(*(_QWORD *)(a1 + 24) + 96LL, a1 + 56);
}
else
{
plutovg_rasterize(v3 + 96, v2, v4, v5, 0LL, v6);
result = *(_QWORD *)(a1 + 24);
*(_BYTE *)(result + 144) = 1;
}
return result;
}
|
plutovg_canvas_clip_preserve:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RSI,qword ptr [RDI + 0x10]
MOV RDI,qword ptr [RDI + 0x18]
LEA RDX,[RDI + 0x20]
LEA RCX,[RBX + 0x28]
MOV R9D,dword ptr [RDI + 0x80]
CMP byte ptr [RDI + 0x90],0x1
JNZ 0x00103f83
LEA R14,[RBX + 0x58]
MOV RDI,R14
XOR R8D,R8D
CALL 0x0010b71c
LEA R15,[RBX + 0x38]
MOV RDX,qword ptr [RBX + 0x18]
ADD RDX,0x60
MOV RDI,R15
MOV RSI,R14
CALL 0x0010b540
MOV RDI,qword ptr [RBX + 0x18]
ADD RDI,0x60
MOV RSI,R15
POP RBX
POP R14
POP R15
JMP 0x0010b3ed
LAB_00103f83:
ADD RDI,0x60
XOR R8D,R8D
CALL 0x0010b71c
MOV RAX,qword ptr [RBX + 0x18]
MOV byte ptr [RAX + 0x90],0x1
POP RBX
POP R14
POP R15
RET
|
void plutovg_canvas_clip_preserve(long param_1)
{
long lVar1;
lVar1 = *(long *)(param_1 + 0x18);
if (*(char *)(lVar1 + 0x90) == '\x01') {
plutovg_rasterize(param_1 + 0x58,*(int8 *)(param_1 + 0x10),lVar1 + 0x20,param_1 + 0x28,0,
*(int4 *)(lVar1 + 0x80));
plutovg_span_buffer_intersect(param_1 + 0x38,param_1 + 0x58,*(long *)(param_1 + 0x18) + 0x60);
plutovg_span_buffer_copy(*(long *)(param_1 + 0x18) + 0x60,param_1 + 0x38);
return;
}
plutovg_rasterize(lVar1 + 0x60,*(int8 *)(param_1 + 0x10),lVar1 + 0x20,param_1 + 0x28,0,
*(int4 *)(lVar1 + 0x80));
*(int1 *)(*(long *)(param_1 + 0x18) + 0x90) = 1;
return;
}
|
|
10,597 |
MNN::Gather::UnPackTo(MNN::GatherT*, std::__1::function<void (void**, unsigned long)> const*) const
|
mnn-tts/MNN/schema/current/TensorflowOp_generated.h
|
inline void Gather::UnPackTo(GatherT *_o, const flatbuffers::resolver_function_t *_resolver) const {
(void)_o;
(void)_resolver;
{ auto _e = Tindices(); _o->Tindices = _e; };
{ auto _e = Tparams(); _o->Tparams = _e; };
{ auto _e = validateIndices(); _o->validateIndices = _e; };
{ auto _e = axis(); _o->axis = _e; };
}
|
O0
|
c
|
MNN::Gather::UnPackTo(MNN::GatherT*, std::__1::function<void (void**, unsigned long)> const*) const:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x202d0
movq 0x8(%rsp), %rdi
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
callq 0x202f0
movq 0x8(%rsp), %rdi
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x4(%rax)
callq 0x20310
movq 0x8(%rsp), %rdi
andb $0x1, %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %cl
movq 0x28(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x8(%rax)
callq 0x20340
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0xc(%rax)
addq $0x38, %rsp
retq
nopl (%rax)
|
_ZNK3MNN6Gather8UnPackToEPNS_7GatherTEPKNSt3__18functionIFvPPvmEEE:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
mov rdi, [rsp+38h+var_8]; this
mov [rsp+38h+var_30], rdi
call _ZNK3MNN6Gather8TindicesEv; MNN::Gather::Tindices(void)
mov rdi, [rsp+38h+var_30]; this
mov [rsp+38h+var_1C], eax
mov ecx, [rsp+38h+var_1C]
mov rax, [rsp+38h+var_10]
mov [rax], ecx
call _ZNK3MNN6Gather7TparamsEv; MNN::Gather::Tparams(void)
mov rdi, [rsp+38h+var_30]; this
mov [rsp+38h+var_20], eax
mov ecx, [rsp+38h+var_20]
mov rax, [rsp+38h+var_10]
mov [rax+4], ecx
call _ZNK3MNN6Gather15validateIndicesEv; MNN::Gather::validateIndices(void)
mov rdi, [rsp+38h+var_30]; this
and al, 1
mov [rsp+38h+var_21], al
mov cl, [rsp+38h+var_21]
mov rax, [rsp+38h+var_10]
and cl, 1
mov [rax+8], cl
call _ZNK3MNN6Gather4axisEv; MNN::Gather::axis(void)
mov [rsp+38h+var_28], eax
mov ecx, [rsp+38h+var_28]
mov rax, [rsp+38h+var_10]
mov [rax+0Ch], ecx
add rsp, 38h
retn
|
long long MNN::Gather::UnPackTo(MNN::Gather *a1, long long a2)
{
int v2; // ecx
long long result; // rax
*(_DWORD *)a2 = MNN::Gather::Tindices(a1);
*(_DWORD *)(a2 + 4) = MNN::Gather::Tparams(a1);
*(_BYTE *)(a2 + 8) = MNN::Gather::validateIndices(a1) & 1;
v2 = MNN::Gather::axis(a1);
result = a2;
*(_DWORD *)(a2 + 12) = v2;
return result;
}
|
UnPackTo:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV RDI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001202d0
MOV RDI,qword ptr [RSP + 0x8]
MOV dword ptr [RSP + 0x1c],EAX
MOV ECX,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RSP + 0x28]
MOV dword ptr [RAX],ECX
CALL 0x001202f0
MOV RDI,qword ptr [RSP + 0x8]
MOV dword ptr [RSP + 0x18],EAX
MOV ECX,dword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x28]
MOV dword ptr [RAX + 0x4],ECX
CALL 0x00120310
MOV RDI,qword ptr [RSP + 0x8]
AND AL,0x1
MOV byte ptr [RSP + 0x17],AL
MOV CL,byte ptr [RSP + 0x17]
MOV RAX,qword ptr [RSP + 0x28]
AND CL,0x1
MOV byte ptr [RAX + 0x8],CL
CALL 0x00120340
MOV dword ptr [RSP + 0x10],EAX
MOV ECX,dword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x28]
MOV dword ptr [RAX + 0xc],ECX
ADD RSP,0x38
RET
|
/* MNN::Gather::UnPackTo(MNN::GatherT*, std::function<void (void**, unsigned long)> const*) const */
void MNN::Gather::UnPackTo(GatherT *param_1,function *param_2)
{
byte bVar1;
int4 uVar2;
uVar2 = Tindices((Gather *)param_1);
*(int4 *)param_2 = uVar2;
uVar2 = Tparams((Gather *)param_1);
*(int4 *)(param_2 + 4) = uVar2;
bVar1 = validateIndices((Gather *)param_1);
param_2[8] = (function)(bVar1 & 1);
uVar2 = axis((Gather *)param_1);
*(int4 *)(param_2 + 0xc) = uVar2;
return;
}
|
|
10,598 |
stbi__bmp_test_raw(stbi__context*)
|
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
|
static int stbi__bmp_test_raw(stbi__context *s)
{
int r;
int sz;
if (stbi__get8(s) != 'B') return 0;
if (stbi__get8(s) != 'M') return 0;
stbi__get32le(s); // discard filesize
stbi__get16le(s); // discard reserved
stbi__get16le(s); // discard reserved
stbi__get32le(s); // discard data offset
sz = stbi__get32le(s);
r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124);
return r;
}
|
O0
|
c
|
stbi__bmp_test_raw(stbi__context*):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x17f50
movzbl %al, %eax
cmpl $0x42, %eax
je 0x1c958
movl $0x0, 0x24(%rsp)
jmp 0x1ca02
movq 0x18(%rsp), %rdi
callq 0x17f50
movzbl %al, %eax
cmpl $0x4d, %eax
je 0x1c977
movl $0x0, 0x24(%rsp)
jmp 0x1ca02
movq 0x18(%rsp), %rdi
callq 0x1ca10
movq 0x18(%rsp), %rdi
callq 0x1ca50
movq 0x18(%rsp), %rdi
callq 0x1ca50
movq 0x18(%rsp), %rdi
callq 0x1ca10
movq 0x18(%rsp), %rdi
callq 0x1ca10
movl %eax, 0x10(%rsp)
movb $0x1, %al
cmpl $0xc, 0x10(%rsp)
movb %al, 0xf(%rsp)
je 0x1c9ed
movb $0x1, %al
cmpl $0x28, 0x10(%rsp)
movb %al, 0xf(%rsp)
je 0x1c9ed
movb $0x1, %al
cmpl $0x38, 0x10(%rsp)
movb %al, 0xf(%rsp)
je 0x1c9ed
movb $0x1, %al
cmpl $0x6c, 0x10(%rsp)
movb %al, 0xf(%rsp)
je 0x1c9ed
cmpl $0x7c, 0x10(%rsp)
sete %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
|
_ZL18stbi__bmp_test_rawP13stbi__context:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rdi, [rsp+28h+var_10]
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
movzx eax, al
cmp eax, 42h ; 'B'
jz short loc_1C958
mov [rsp+28h+var_4], 0
jmp loc_1CA02
loc_1C958:
mov rdi, [rsp+28h+var_10]
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
movzx eax, al
cmp eax, 4Dh ; 'M'
jz short loc_1C977
mov [rsp+28h+var_4], 0
jmp loc_1CA02
loc_1C977:
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, [rsp+28h+var_10]
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov [rsp+28h+var_18], eax
mov al, 1
cmp [rsp+28h+var_18], 0Ch
mov [rsp+28h+var_19], al
jz short loc_1C9ED
mov al, 1
cmp [rsp+28h+var_18], 28h ; '('
mov [rsp+28h+var_19], al
jz short loc_1C9ED
mov al, 1
cmp [rsp+28h+var_18], 38h ; '8'
mov [rsp+28h+var_19], al
jz short loc_1C9ED
mov al, 1
cmp [rsp+28h+var_18], 6Ch ; 'l'
mov [rsp+28h+var_19], al
jz short loc_1C9ED
cmp [rsp+28h+var_18], 7Ch ; '|'
setz al
mov [rsp+28h+var_19], al
loc_1C9ED:
mov al, [rsp+28h+var_19]
and al, 1
movzx eax, al
mov [rsp+28h+var_14], eax
mov eax, [rsp+28h+var_14]
mov [rsp+28h+var_4], eax
loc_1CA02:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
_BOOL8 stbi__bmp_test_raw(long long a1)
{
bool v2; // [rsp+Fh] [rbp-19h]
int v3; // [rsp+10h] [rbp-18h]
if ( stbi__get8(a1) == 66 )
{
if ( stbi__get8(a1) == 77 )
{
stbi__get32le(a1);
stbi__get16le(a1);
stbi__get16le(a1);
stbi__get32le(a1);
v3 = stbi__get32le(a1);
v2 = 1;
if ( v3 != 12 )
{
v2 = 1;
if ( v3 != 40 )
{
v2 = 1;
if ( v3 != 56 )
{
v2 = 1;
if ( v3 != 108 )
return v3 == 124;
}
}
}
return v2;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
|
stbi__bmp_test_raw:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00117f50
MOVZX EAX,AL
CMP EAX,0x42
JZ 0x0011c958
MOV dword ptr [RSP + 0x24],0x0
JMP 0x0011ca02
LAB_0011c958:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00117f50
MOVZX EAX,AL
CMP EAX,0x4d
JZ 0x0011c977
MOV dword ptr [RSP + 0x24],0x0
JMP 0x0011ca02
LAB_0011c977:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0011ca10
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0011ca50
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0011ca50
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0011ca10
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0011ca10
MOV dword ptr [RSP + 0x10],EAX
MOV AL,0x1
CMP dword ptr [RSP + 0x10],0xc
MOV byte ptr [RSP + 0xf],AL
JZ 0x0011c9ed
MOV AL,0x1
CMP dword ptr [RSP + 0x10],0x28
MOV byte ptr [RSP + 0xf],AL
JZ 0x0011c9ed
MOV AL,0x1
CMP dword ptr [RSP + 0x10],0x38
MOV byte ptr [RSP + 0xf],AL
JZ 0x0011c9ed
MOV AL,0x1
CMP dword ptr [RSP + 0x10],0x6c
MOV byte ptr [RSP + 0xf],AL
JZ 0x0011c9ed
CMP dword ptr [RSP + 0x10],0x7c
SETZ AL
MOV byte ptr [RSP + 0xf],AL
LAB_0011c9ed:
MOV AL,byte ptr [RSP + 0xf]
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RSP + 0x14],EAX
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x24],EAX
LAB_0011ca02:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
/* stbi__bmp_test_raw(stbi__context*) */
bool stbi__bmp_test_raw(stbi__context *param_1)
{
char cVar1;
int iVar2;
bool local_19;
cVar1 = stbi__get8(param_1);
if (cVar1 == 'B') {
cVar1 = stbi__get8(param_1);
if (cVar1 == 'M') {
stbi__get32le(param_1);
stbi__get16le(param_1);
stbi__get16le(param_1);
stbi__get32le(param_1);
iVar2 = stbi__get32le(param_1);
local_19 = true;
if ((((iVar2 != 0xc) && (local_19 = true, iVar2 != 0x28)) && (local_19 = true, iVar2 != 0x38))
&& (local_19 = true, iVar2 != 0x6c)) {
local_19 = iVar2 == 0x7c;
}
}
else {
local_19 = false;
}
}
else {
local_19 = false;
}
return local_19;
}
|
|
10,599 |
inline_mysql_rwlock_init
|
eloqsql/include/mysql/psi/mysql_thread.h
|
static inline int inline_mysql_rwlock_init(
#ifdef HAVE_PSI_RWLOCK_INTERFACE
PSI_rwlock_key key,
#endif
mysql_rwlock_t *that)
{
#ifdef HAVE_PSI_RWLOCK_INTERFACE
that->m_psi= PSI_RWLOCK_CALL(init_rwlock)(key, &that->m_rwlock);
#else
that->m_psi= NULL;
#endif
/*
pthread_rwlockattr_t is not used in MySQL.
*/
return my_rwlock_init(&that->m_rwlock, NULL);
}
|
O0
|
c
|
inline_mysql_rwlock_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x2129ca(%rip), %rax # 0x2cb4e0
movq (%rax), %rax
movq 0x50(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x10(%rbp), %rdi
callq 0x1026f0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
inline_mysql_rwlock_init_1:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+50h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+90h], rcx
mov rdi, [rbp+var_10]
call my_rw_init
add rsp, 10h
pop rbp
retn
|
long long inline_mysql_rwlock_init_1(unsigned int a1, long long a2)
{
*(_QWORD *)(a2 + 144) = ((long long ( *)(_QWORD, long long))PSI_server[10])(a1, a2);
return my_rw_init(a2);
}
|
inline_mysql_rwlock_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[0x3cb4e0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x50]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x90],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x002026f0
ADD RSP,0x10
POP RBP
RET
|
void inline_mysql_rwlock_init(int4 param_1,long param_2)
{
int8 uVar1;
uVar1 = (**(code **)(PSI_server + 0x50))(param_1,param_2);
*(int8 *)(param_2 + 0x90) = uVar1;
my_rw_init(param_2);
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.