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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
59,800
|
mbedtls_ecp_gen_keypair_base
|
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/ecp.c
|
int mbedtls_ecp_gen_keypair_base(mbedtls_ecp_group *grp,
const mbedtls_ecp_point *G,
mbedtls_mpi *d, mbedtls_ecp_point *Q,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng)
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
ECP_VALIDATE_RET(grp != NULL);
ECP_VALIDATE_RET(d != NULL);
ECP_VALIDATE_RET(G != NULL);
ECP_VALIDATE_RET(Q != NULL);
ECP_VALIDATE_RET(f_rng != NULL);
MBEDTLS_MPI_CHK(mbedtls_ecp_gen_privkey(grp, d, f_rng, p_rng));
MBEDTLS_MPI_CHK(mbedtls_ecp_mul(grp, Q, d, G, f_rng, p_rng));
cleanup:
return ret;
}
|
O3
|
c
|
mbedtls_ecp_gen_keypair_base:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbp
movq %rdx, %rsi
movq %r8, %rdx
movq %r9, %rcx
callq 0x85e3d
testl %eax, %eax
jne 0x85f6e
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
callq 0x849ae
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
mbedtls_ecp_gen_keypair_base:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r9
mov r14, r8
mov r13, rcx
mov r12, rdx
mov r15, rsi
mov rbp, rdi
mov rsi, rdx
mov rdx, r8
mov rcx, r9
call mbedtls_ecp_gen_privkey
test eax, eax
jnz short loc_85F6E
mov rdi, rbp
mov rsi, r13
mov rdx, r12
mov rcx, r15
mov r8, r14
mov r9, rbx
call mbedtls_ecp_mul_restartable
loc_85F6E:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long mbedtls_ecp_gen_keypair_base(
int *a1,
long long a2,
_DWORD *a3,
long long a4,
long long ( *a5)(long long, unsigned long long, unsigned long long),
_QWORD *a6)
{
long long result; // rax
result = mbedtls_ecp_gen_privkey(a1, (long long)a3, a5, (long long)a6);
if ( !(_DWORD)result )
return mbedtls_ecp_mul_restartable(a1, a4, a3, a2, (long long ( *)())a5, a6);
return result;
}
|
mbedtls_ecp_gen_keypair_base:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R9
MOV R14,R8
MOV R13,RCX
MOV R12,RDX
MOV R15,RSI
MOV RBP,RDI
MOV RSI,RDX
MOV RDX,R8
MOV RCX,R9
CALL 0x00185e3d
TEST EAX,EAX
JNZ 0x00185f6e
MOV RDI,RBP
MOV RSI,R13
MOV RDX,R12
MOV RCX,R15
MOV R8,R14
MOV R9,RBX
CALL 0x001849ae
LAB_00185f6e:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void mbedtls_ecp_gen_keypair_base
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
int iVar1;
iVar1 = mbedtls_ecp_gen_privkey(param_1,param_3,param_5,param_6);
if (iVar1 == 0) {
mbedtls_ecp_mul_restartable(param_1,param_4,param_3,param_2,param_5,param_6);
}
return;
}
|
|
59,801
|
mysql_real_query
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
int STDCALL
mysql_real_query(MYSQL *mysql, const char *query, unsigned long length)
{
my_bool skip_result= OPT_EXT_VAL(mysql, multi_command);
if (length == (unsigned long)-1)
length= (unsigned long)strlen(query);
free_old_query(mysql);
if (ma_simple_command(mysql, COM_QUERY,query,length,1,0))
return(-1);
if (!skip_result && !mysql->options.extension->skip_read_response)
return(mysql->methods->db_read_query_result(mysql));
return(0);
}
|
O0
|
c
|
mysql_real_query:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x21140
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movsbl 0xa8(%rax), %eax
cmpl $0x0, %eax
je 0x21140
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movsbl 0xa8(%rax), %eax
movl %eax, -0x28(%rbp)
jmp 0x21147
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x21147
movl -0x28(%rbp), %eax
movb %al, -0x21(%rbp)
cmpq $-0x1, -0x20(%rbp)
jne 0x21161
movq -0x18(%rbp), %rdi
callq 0x131a0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x22270
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x3, %esi
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1af20
cmpl $0x0, %eax
je 0x21199
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x211d4
cmpb $0x0, -0x21(%rbp)
jne 0x211cd
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
cmpb $0x0, 0x148(%rax)
jne 0x211cd
movq -0x10(%rbp), %rax
movq 0x4d0(%rax), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movl %eax, -0x4(%rbp)
jmp 0x211d4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
mysql_real_query:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
cmp qword ptr [rax+480h], 0
jz short loc_21140
mov rax, [rbp+var_10]
mov rax, [rax+480h]
movsx eax, byte ptr [rax+0A8h]
cmp eax, 0
jz short loc_21140
mov rax, [rbp+var_10]
mov rax, [rax+480h]
movsx eax, byte ptr [rax+0A8h]
mov [rbp+var_28], eax
jmp short loc_21147
loc_21140:
xor eax, eax
mov [rbp+var_28], eax
jmp short $+2
loc_21147:
mov eax, [rbp+var_28]
mov [rbp+var_21], al
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jnz short loc_21161
mov rdi, [rbp+var_18]
call _strlen
mov [rbp+var_20], rax
loc_21161:
mov rdi, [rbp+var_10]
call free_old_query
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
mov esi, 3
mov r8d, 1
xor eax, eax
mov r9d, eax
call ma_simple_command
cmp eax, 0
jz short loc_21199
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_211D4
loc_21199:
cmp [rbp+var_21], 0
jnz short loc_211CD
mov rax, [rbp+var_10]
mov rax, [rax+480h]
cmp byte ptr [rax+148h], 0
jnz short loc_211CD
mov rax, [rbp+var_10]
mov rax, [rax+4D0h]
mov rax, [rax+20h]
mov rdi, [rbp+var_10]
call rax
mov [rbp+var_4], eax
jmp short loc_211D4
loc_211CD:
mov [rbp+var_4], 0
loc_211D4:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long mysql_real_query(long long a1, long long a2, long long a3)
{
char v4; // [rsp+8h] [rbp-28h]
long long v5; // [rsp+10h] [rbp-20h]
v5 = a3;
if ( *(_QWORD *)(a1 + 1152) && *(_BYTE *)(*(_QWORD *)(a1 + 1152) + 168LL) )
v4 = *(_BYTE *)(*(_QWORD *)(a1 + 1152) + 168LL);
else
v4 = 0;
if ( a3 == -1 )
v5 = strlen(a2);
free_old_query(a1);
if ( (unsigned int)ma_simple_command(a1, 3u, a2, v5, 1, 0LL) )
{
return (unsigned int)-1;
}
else if ( v4 || *(_BYTE *)(*(_QWORD *)(a1 + 1152) + 328LL) )
{
return 0;
}
else
{
return (unsigned int)(*(long long ( **)(long long))(*(_QWORD *)(a1 + 1232) + 32LL))(a1);
}
}
|
mysql_real_query:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x00121140
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOVSX EAX,byte ptr [RAX + 0xa8]
CMP EAX,0x0
JZ 0x00121140
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOVSX EAX,byte ptr [RAX + 0xa8]
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00121147
LAB_00121140:
XOR EAX,EAX
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00121147
LAB_00121147:
MOV EAX,dword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x21],AL
CMP qword ptr [RBP + -0x20],-0x1
JNZ 0x00121161
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001131a0
MOV qword ptr [RBP + -0x20],RAX
LAB_00121161:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00122270
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV ESI,0x3
MOV R8D,0x1
XOR EAX,EAX
MOV R9D,EAX
CALL 0x0011af20
CMP EAX,0x0
JZ 0x00121199
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001211d4
LAB_00121199:
CMP byte ptr [RBP + -0x21],0x0
JNZ 0x001211cd
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
CMP byte ptr [RAX + 0x148],0x0
JNZ 0x001211cd
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x20]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001211d4
LAB_001211cd:
MOV dword ptr [RBP + -0x4],0x0
LAB_001211d4:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 mysql_real_query(long param_1,char *param_2,size_t param_3)
{
char cVar1;
int iVar2;
int8 local_28;
int4 local_c;
if ((*(long *)(param_1 + 0x480) == 0) || (*(char *)(*(long *)(param_1 + 0x480) + 0xa8) == '\0')) {
cVar1 = '\0';
}
else {
cVar1 = *(char *)(*(long *)(param_1 + 0x480) + 0xa8);
}
local_28 = param_3;
if (param_3 == 0xffffffffffffffff) {
local_28 = strlen(param_2);
}
free_old_query(param_1);
iVar2 = ma_simple_command(param_1,3,param_2,local_28,1,0);
if (iVar2 == 0) {
if ((cVar1 == '\0') && (*(char *)(*(long *)(param_1 + 0x480) + 0x148) == '\0')) {
local_c = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x20))(param_1);
}
else {
local_c = 0;
}
}
else {
local_c = 0xffffffff;
}
return local_c;
}
|
|
59,802
|
mysql_real_query
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
int STDCALL
mysql_real_query(MYSQL *mysql, const char *query, unsigned long length)
{
my_bool skip_result= OPT_EXT_VAL(mysql, multi_command);
if (length == (unsigned long)-1)
length= (unsigned long)strlen(query);
free_old_query(mysql);
if (ma_simple_command(mysql, COM_QUERY,query,length,1,0))
return(-1);
if (!skip_result && !mysql->options.extension->skip_read_response)
return(mysql->methods->db_read_query_result(mysql));
return(0);
}
|
O3
|
c
|
mysql_real_query:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x480(%rdi), %rax
testq %rax, %rax
je 0x1c5de
cmpb $0x0, 0xa8(%rax)
setne %r13b
jmp 0x1c5e1
xorl %r13d, %r13d
cmpq $-0x1, %r15
jne 0x1c5f2
movq %r14, %rdi
callq 0x131c0
movq %rax, %r15
movq %rbx, %rdi
callq 0x1d18e
movq 0x4d0(%rbx), %rax
xorl %r12d, %r12d
movq %rbx, %rdi
movl $0x3, %esi
movq %r14, %rdx
movq %r15, %rcx
movl $0x1, %r8d
xorl %r9d, %r9d
callq *0x10(%rax)
xorl %ecx, %ecx
testl %eax, %eax
setne %al
orb %al, %r13b
testb $0x1, %r13b
je 0x1c637
movb %al, %cl
negl %ecx
movl %ecx, %r12d
jmp 0x1c647
movq 0x480(%rbx), %rax
cmpb $0x0, 0x148(%rax)
je 0x1c659
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4d0(%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x20(%rax)
|
mysql_real_query:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov rax, [rdi+480h]
test rax, rax
jz short loc_1C5DE
cmp byte ptr [rax+0A8h], 0
setnz r13b
jmp short loc_1C5E1
loc_1C5DE:
xor r13d, r13d
loc_1C5E1:
cmp r15, 0FFFFFFFFFFFFFFFFh
jnz short loc_1C5F2
mov rdi, r14
call _strlen
mov r15, rax
loc_1C5F2:
mov rdi, rbx
call free_old_query
mov rax, [rbx+4D0h]
xor r12d, r12d
mov rdi, rbx
mov esi, 3
mov rdx, r14
mov rcx, r15
mov r8d, 1
xor r9d, r9d
call qword ptr [rax+10h]
xor ecx, ecx
test eax, eax
setnz al
or r13b, al
test r13b, 1
jz short loc_1C637
mov cl, al
neg ecx
mov r12d, ecx
jmp short loc_1C647
loc_1C637:
mov rax, [rbx+480h]
cmp byte ptr [rax+148h], 0
jz short loc_1C659
loc_1C647:
mov eax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1C659:
mov rax, [rbx+4D0h]
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp qword ptr [rax+20h]
|
long long mysql_real_query(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long v4; // r15
long long v5; // rax
bool v6; // r13
unsigned int v7; // r12d
int v8; // eax
long long v9; // rdx
int v10; // ecx
bool v11; // al
long long v13; // [rsp-8h] [rbp-30h]
v13 = v3;
v4 = a3;
v5 = *(_QWORD *)(a1 + 1152);
if ( v5 )
v6 = *(_BYTE *)(v5 + 168) != 0;
else
v6 = 0;
if ( a3 == -1 )
v4 = strlen(a2);
free_old_query(a1);
v7 = 0;
v8 = (*(long long ( **)(long long, long long, long long, long long, long long, _QWORD, long long))(*(_QWORD *)(a1 + 1232)
+ 16LL))(
a1,
3LL,
a2,
v4,
1LL,
0LL,
v13);
v10 = 0;
v11 = v8 != 0;
if ( v11 || v6 )
{
LOBYTE(v10) = v11;
return (unsigned int)-v10;
}
if ( *(_BYTE *)(*(_QWORD *)(a1 + 1152) + 328LL) )
return v7;
return (*(long long ( **)(long long, long long, long long, _QWORD))(*(_QWORD *)(a1 + 1232) + 32LL))(
a1,
3LL,
v9,
0LL);
}
|
mysql_real_query:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x480]
TEST RAX,RAX
JZ 0x0011c5de
CMP byte ptr [RAX + 0xa8],0x0
SETNZ R13B
JMP 0x0011c5e1
LAB_0011c5de:
XOR R13D,R13D
LAB_0011c5e1:
CMP R15,-0x1
JNZ 0x0011c5f2
MOV RDI,R14
CALL 0x001131c0
MOV R15,RAX
LAB_0011c5f2:
MOV RDI,RBX
CALL 0x0011d18e
MOV RAX,qword ptr [RBX + 0x4d0]
XOR R12D,R12D
MOV RDI,RBX
MOV ESI,0x3
MOV RDX,R14
MOV RCX,R15
MOV R8D,0x1
XOR R9D,R9D
CALL qword ptr [RAX + 0x10]
XOR ECX,ECX
TEST EAX,EAX
SETNZ AL
OR R13B,AL
TEST R13B,0x1
JZ 0x0011c637
MOV CL,AL
NEG ECX
MOV R12D,ECX
JMP 0x0011c647
LAB_0011c637:
MOV RAX,qword ptr [RBX + 0x480]
CMP byte ptr [RAX + 0x148],0x0
JZ 0x0011c659
LAB_0011c647:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011c659:
MOV RAX,qword ptr [RBX + 0x4d0]
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP qword ptr [RAX + 0x20]
|
ulong mysql_real_query(long param_1,char *param_2,size_t param_3)
{
int iVar1;
ulong uVar2;
uint uVar3;
bool bVar4;
if (*(long *)(param_1 + 0x480) == 0) {
bVar4 = false;
}
else {
bVar4 = *(char *)(*(long *)(param_1 + 0x480) + 0xa8) != '\0';
}
if (param_3 == 0xffffffffffffffff) {
param_3 = strlen(param_2);
}
free_old_query(param_1);
uVar3 = 0;
iVar1 = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x10))(param_1,3,param_2,param_3,1,0);
if (bVar4 || iVar1 != 0) {
uVar3 = -(uint)(iVar1 != 0);
}
else if (*(char *)(*(long *)(param_1 + 0x480) + 0x148) == '\0') {
/* WARNING: Could not recover jumptable at 0x0011c671. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar2 = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x20))(param_1);
return uVar2;
}
return (ulong)uVar3;
}
|
|
59,803
|
mi_search_last
|
eloqsql/storage/myisam/mi_search.c
|
int _mi_search_last(register MI_INFO *info, register MI_KEYDEF *keyinfo,
register my_off_t pos)
{
uint nod_flag;
uchar *buff,*page;
DBUG_ENTER("_mi_search_last");
if (pos == HA_OFFSET_ERROR)
{
my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */
info->lastpos= HA_OFFSET_ERROR;
DBUG_RETURN(-1);
}
buff=info->buff;
do
{
if (!_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,buff,0))
{
info->lastpos= HA_OFFSET_ERROR;
DBUG_RETURN(-1);
}
page= buff+mi_getint(buff);
nod_flag=mi_test_if_nod(buff);
} while ((pos=_mi_kpos(nod_flag,page)) != HA_OFFSET_ERROR);
if (!_mi_get_last_key(info,keyinfo,buff,info->lastkey,page,
&info->lastkey_length))
DBUG_RETURN(-1);
info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length);
info->int_keypos=info->int_maxpos=page;
info->int_nod_flag=nod_flag;
info->int_keytree_version=keyinfo->version;
info->last_search_keypage=info->last_keypage;
info->page_changed=info->buff_used=0;
DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos));
DBUG_RETURN(0);
}
|
O0
|
c
|
mi_search_last:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $-0x1, -0x20(%rbp)
jne 0xc1e81
callq 0xfc1b0
movl $0x78, (%rax)
movq -0x10(%rbp), %rax
movq $-0x1, 0x170(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc2027
movq -0x10(%rbp), %rax
movq 0x100(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %r8
movl $0x3, %ecx
xorl %r9d, %r9d
callq 0xbd950
cmpq $0x0, %rax
jne 0xc1ece
movq -0x10(%rbp), %rax
movq $-0x1, 0x170(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc2027
movq -0x30(%rbp), %rax
movq -0x30(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
movq -0x30(%rbp), %rdx
movzbl (%rdx), %edx
movzwl %dx, %edx
shll $0x8, %edx
orl %edx, %ecx
movzwl %cx, %ecx
andl $0x7fff, %ecx # imm = 0x7FFF
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xc1f21
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x17c(%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0xc1f28
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0xc1f28
movl -0x3c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
movq -0x38(%rbp), %rsi
callq 0xbe8c0
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rax
jne 0xc1e90
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rcx
movq -0x38(%rbp), %r8
movq -0x10(%rbp), %r9
addq $0x1d8, %r9 # imm = 0x1D8
callq 0xc12e0
cmpq $0x0, %rax
jne 0xc1f87
jmp 0xc1f7b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc2027
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdx
movq -0x10(%rbp), %rax
movl 0x1d8(%rax), %eax
addq %rax, %rdx
xorl %esi, %esi
callq 0xbeb40
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x170(%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x130(%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0x128(%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x138(%rax)
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x13c(%rax)
movq -0x10(%rbp), %rax
movq 0x190(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x198(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x33d(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x33c(%rax)
jmp 0xc201e
jmp 0xc2020
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
|
_mi_search_last:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jnz short loc_C1E81
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
mov rax, [rbp+var_10]
mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_C2027
loc_C1E81:
mov rax, [rbp+var_10]
mov rax, [rax+100h]
mov [rbp+var_30], rax
loc_C1E90:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov r8, [rbp+var_30]
mov ecx, 3
xor r9d, r9d
call _mi_fetch_keypage
cmp rax, 0
jnz short loc_C1ECE
mov rax, [rbp+var_10]
mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_C2027
loc_C1ECE:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_30]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
mov rdx, [rbp+var_30]
movzx edx, byte ptr [rdx]
movzx edx, dx
shl edx, 8
or ecx, edx
movzx ecx, cx
and ecx, 7FFFh
mov ecx, ecx
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
and eax, 80h
cmp eax, 0
jz short loc_C1F21
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+17Ch]
mov [rbp+var_3C], eax
jmp short loc_C1F28
loc_C1F21:
xor eax, eax
mov [rbp+var_3C], eax
jmp short $+2
loc_C1F28:
mov eax, [rbp+var_3C]
mov [rbp+var_24], eax
mov edi, [rbp+var_24]
mov rsi, [rbp+var_38]
call _mi_kpos
mov [rbp+var_20], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz loc_C1E90
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
mov rax, [rbp+var_10]
mov rcx, [rax+108h]
mov r8, [rbp+var_38]
mov r9, [rbp+var_10]
add r9, 1D8h
call _mi_get_last_key
cmp rax, 0
jnz short loc_C1F87
jmp short $+2
loc_C1F7B:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_C2027
loc_C1F87:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rdx, [rax+108h]
mov rax, [rbp+var_10]
mov eax, [rax+1D8h]
add rdx, rax
xor esi, esi
call _mi_dpos
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+170h], rcx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_10]
mov [rax+130h], rcx
mov rax, [rbp+var_10]
mov [rax+128h], rcx
mov ecx, [rbp+var_24]
mov rax, [rbp+var_10]
mov [rax+138h], ecx
mov rax, [rbp+var_18]
mov ecx, [rax+1Ch]
mov rax, [rbp+var_10]
mov [rax+13Ch], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+190h]
mov rax, [rbp+var_10]
mov [rax+198h], rcx
mov rax, [rbp+var_10]
mov byte ptr [rax+33Dh], 0
mov rax, [rbp+var_10]
mov byte ptr [rax+33Ch], 0
jmp short $+2
loc_C201E:
jmp short $+2
loc_C2020:
mov [rbp+var_4], 0
loc_C2027:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long mi_search_last(long long a1, long long a2, long long a3)
{
unsigned int v4; // [rsp+4h] [rbp-3Ch]
unsigned long long v5; // [rsp+8h] [rbp-38h]
unsigned __int16 *v6; // [rsp+10h] [rbp-30h]
long long v7; // [rsp+20h] [rbp-20h]
v7 = a3;
if ( a3 == -1 )
{
*(_DWORD *)my_thread_var(a1, (const char *)a2) = 120;
*(_QWORD *)(a1 + 368) = -1LL;
return (unsigned int)-1;
}
else
{
v6 = *(unsigned __int16 **)(a1 + 256);
do
{
if ( !mi_fetch_keypage((_QWORD *)a1, a2, v7, 3, (int)v6, 0) )
{
*(_QWORD *)(a1 + 368) = -1LL;
return (unsigned int)-1;
}
v5 = (unsigned long long)v6 + (_byteswap_ushort(*v6) & 0x7FFF);
if ( (*(_BYTE *)v6 & 0x80) != 0 )
v4 = *(_DWORD *)(*(_QWORD *)a1 + 380LL);
else
v4 = 0;
v7 = mi_kpos(v4, v5);
}
while ( v7 != -1 );
if ( mi_get_last_key(a1, a2, v6, *(_BYTE **)(a1 + 264), v5, (_DWORD *)(a1 + 472)) )
{
*(_QWORD *)(a1 + 368) = mi_dpos(a1, 0, *(unsigned int *)(a1 + 472) + *(_QWORD *)(a1 + 264));
*(_QWORD *)(a1 + 304) = v5;
*(_QWORD *)(a1 + 296) = v5;
*(_DWORD *)(a1 + 312) = v4;
*(_DWORD *)(a1 + 316) = *(_DWORD *)(a2 + 28);
*(_QWORD *)(a1 + 408) = *(_QWORD *)(a1 + 400);
*(_BYTE *)(a1 + 829) = 0;
*(_BYTE *)(a1 + 828) = 0;
return 0;
}
else
{
return (unsigned int)-1;
}
}
}
|
_mi_search_last:
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
CMP qword ptr [RBP + -0x20],-0x1
JNZ 0x001c1e81
CALL 0x001fc1b0
MOV dword ptr [RAX],0x78
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],-0x1
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c2027
LAB_001c1e81:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100]
MOV qword ptr [RBP + -0x30],RAX
LAB_001c1e90:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x30]
MOV ECX,0x3
XOR R9D,R9D
CALL 0x001bd950
CMP RAX,0x0
JNZ 0x001c1ece
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],-0x1
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c2027
LAB_001c1ece:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
MOV RDX,qword ptr [RBP + -0x30]
MOVZX EDX,byte ptr [RDX]
MOVZX EDX,DX
SHL EDX,0x8
OR ECX,EDX
MOVZX ECX,CX
AND ECX,0x7fff
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001c1f21
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x17c]
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001c1f28
LAB_001c1f21:
XOR EAX,EAX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001c1f28
LAB_001c1f28:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x24],EAX
MOV EDI,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001be8c0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,-0x1
JNZ 0x001c1e90
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x108]
MOV R8,qword ptr [RBP + -0x38]
MOV R9,qword ptr [RBP + -0x10]
ADD R9,0x1d8
CALL 0x001c12e0
CMP RAX,0x0
JNZ 0x001c1f87
JMP 0x001c1f7b
LAB_001c1f7b:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c2027
LAB_001c1f87:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x108]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1d8]
ADD RDX,RAX
XOR ESI,ESI
CALL 0x001beb40
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x130],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x128],RCX
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x138],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x13c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x190]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x198],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33d],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33c],0x0
JMP 0x001c201e
LAB_001c201e:
JMP 0x001c2020
LAB_001c2020:
MOV dword ptr [RBP + -0x4],0x0
LAB_001c2027:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 _mi_search_last(long *param_1,long param_2,long param_3)
{
byte *pbVar1;
int4 *puVar2;
long lVar3;
byte *pbVar4;
int4 local_44;
long local_28;
int4 local_c;
if (param_3 == -1) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x78;
param_1[0x2e] = -1;
local_c = 0xffffffff;
}
else {
pbVar1 = (byte *)param_1[0x20];
local_28 = param_3;
do {
lVar3 = _mi_fetch_keypage(param_1,param_2,local_28,3,pbVar1,0);
if (lVar3 == 0) {
param_1[0x2e] = -1;
return 0xffffffff;
}
pbVar4 = pbVar1 + ((uint)pbVar1[1] | (*pbVar1 & 0x7f) << 8);
if ((*pbVar1 & 0x80) == 0) {
local_44 = 0;
}
else {
local_44 = *(int4 *)(*param_1 + 0x17c);
}
local_28 = _mi_kpos(local_44,pbVar4);
} while (local_28 != -1);
lVar3 = _mi_get_last_key(param_1,param_2,pbVar1,param_1[0x21],pbVar4,param_1 + 0x3b);
if (lVar3 == 0) {
local_c = 0xffffffff;
}
else {
lVar3 = _mi_dpos(param_1,0,param_1[0x21] + (ulong)*(uint *)(param_1 + 0x3b));
param_1[0x2e] = lVar3;
param_1[0x26] = (long)pbVar4;
param_1[0x25] = (long)pbVar4;
*(int4 *)(param_1 + 0x27) = local_44;
*(int4 *)((long)param_1 + 0x13c) = *(int4 *)(param_2 + 0x1c);
param_1[0x33] = param_1[0x32];
*(int1 *)((long)param_1 + 0x33d) = 0;
*(int1 *)((long)param_1 + 0x33c) = 0;
local_c = 0;
}
}
return local_c;
}
|
|
59,804
|
details::getCurrentTime[abi:cxx11]()
|
11AgReS1SoR11[P]Graph/Common/Logger/src/Logger.cpp
|
std::string getCurrentTime()
{
std::time_t now = std::time(nullptr);
char buf[20];
std::strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", std::localtime(&now));
return buf;
}
|
O3
|
cpp
|
details::getCurrentTime[abi:cxx11]():
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorl %edi, %edi
callq 0x21b0
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
callq 0x2140
leaq 0xbed(%rip), %rdx # 0x3010
leaq 0x10(%rsp), %r14
movl $0x14, %esi
movq %r14, %rdi
movq %rax, %rcx
callq 0x2160
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x20b0
leaq (%rsp,%rax), %rdx
addq $0x10, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2090
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN7details14getCurrentTimeB5cxx11Ev:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
xor edi, edi
call _time
lea rdi, [rsp+38h+var_30]
mov [rdi], rax
call _localtime
lea rdx, aYMDHMS; "%Y-%m-%d %H:%M:%S"
lea r14, [rsp+38h+var_28]
mov esi, 14h
mov rdi, r14
mov rcx, rax
call _strftime
lea rax, [rbx+10h]
mov [rbx], rax
mov rdi, r14
call _strlen
lea rdx, [rsp+rax+38h+var_38]
add rdx, 10h
mov rdi, rbx
mov rsi, r14
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
add rsp, 28h
pop rbx
pop r14
retn
|
_QWORD * details::getCurrentTime[abi:cxx11](_QWORD *a1)
{
long long v1; // rax
long long v2; // rax
_BYTE v4[40]; // [rsp+10h] [rbp-28h] BYREF
time(0LL);
v1 = localtime();
strftime(v4, 20LL, "%Y-%m-%d %H:%M:%S", v1);
*a1 = a1 + 2;
v2 = strlen(v4);
std::string::_M_construct<char const*>(a1, v4, &v4[v2]);
return a1;
}
|
getCurrentTime[abi:cxx11]:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
XOR EDI,EDI
CALL 0x001021b0
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RAX
CALL 0x00102140
LEA RDX,[0x103010]
LEA R14,[RSP + 0x10]
MOV ESI,0x14
MOV RDI,R14
MOV RCX,RAX
CALL 0x00102160
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RDI,R14
CALL 0x001020b0
LEA RDX,[RSP + RAX*0x1]
ADD RDX,0x10
MOV RDI,RBX
MOV RSI,R14
CALL 0x00102090
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* details::getCurrentTime[abi:cxx11]() */
details * __thiscall details::getCurrentTime_abi_cxx11_(details *this)
{
tm *__tp;
size_t sVar1;
time_t local_30;
char local_28 [24];
local_30 = time((time_t *)0x0);
__tp = localtime(&local_30);
strftime(local_28,0x14,"%Y-%m-%d %H:%M:%S",__tp);
*(details **)this = this + 0x10;
sVar1 = strlen(local_28);
std::__cxx11::string::_M_construct<char_const*>(this,local_28,local_28 + sVar1);
return this;
}
|
|
59,805
|
my_open
|
eloqsql/mysys/my_open.c
|
File my_open(const char *FileName, int Flags, myf MyFlags)
/* Path-name of file */
/* Read | write .. */
/* Special flags */
{
File fd;
DBUG_ENTER("my_open");
DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %lu",
FileName, Flags, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE | MY_FFNF)))
MyFlags|= my_global_flags;
#if defined(_WIN32)
fd= my_win_open(FileName, Flags);
#else
if (MyFlags & MY_NOSYMLINKS)
fd = open_nosymlinks(FileName, Flags | O_CLOEXEC, my_umask);
else
fd = open(FileName, Flags | O_CLOEXEC, my_umask);
#endif
fd= my_register_filename(fd, FileName, FILE_BY_OPEN,
EE_FILENOTFOUND, MyFlags);
DBUG_RETURN(fd);
}
|
O3
|
c
|
my_open:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %r15d
movq %rdi, %rbx
testb $0x19, %dl
jne 0x31932
leaq 0x33c1fb(%rip), %rax # 0x36db28
movq (%rax), %r14
jmp 0x31935
xorl %r14d, %r14d
orq %rdx, %r14
btl $0x9, %r14d
jb 0x31961
orl $0x80000, %r15d # imm = 0x80000
leaq 0x2c4d4b(%rip), %rax # 0x2f6698
movl (%rax), %edx
movq %rbx, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x24600
movl %eax, %r15d
jmp 0x319ad
leaq 0x2c4d30(%rip), %rax # 0x2f6698
movl (%rax), %r12d
leaq -0x24(%rbp), %rsi
movq %rbx, %rdi
callq 0x2c320
testq %rax, %rax
je 0x319a7
movl -0x24(%rbp), %edi
orl $0xa0000, %r15d # imm = 0xA0000
movq %rax, %rsi
movl %r15d, %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x242c0
movl %eax, %r15d
movl -0x24(%rbp), %edi
testl %edi, %edi
js 0x319ad
callq 0x24670
jmp 0x319ad
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
movl %r15d, %edi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1d, %ecx
movq %r14, %r8
callq 0x319d2
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
my_open:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r15d, esi
mov rbx, rdi
test dl, 19h
jnz short loc_31932
lea rax, my_global_flags
mov r14, [rax]
jmp short loc_31935
loc_31932:
xor r14d, r14d
loc_31935:
or r14, rdx
bt r14d, 9
jb short loc_31961
or r15d, 80000h
lea rax, my_umask
mov edx, [rax]
mov rdi, rbx
mov esi, r15d
xor eax, eax
call _open64
mov r15d, eax
jmp short loc_319AD
loc_31961:
lea rax, my_umask
mov r12d, [rax]
lea rsi, [rbp+var_24]
mov rdi, rbx
call my_open_parent_dir_nosymlinks
test rax, rax
jz short loc_319A7
mov edi, [rbp+var_24]
or r15d, 0A0000h
mov rsi, rax
mov edx, r15d
mov ecx, r12d
xor eax, eax
call _openat64
mov r15d, eax
mov edi, [rbp+var_24]
test edi, edi
js short loc_319AD
call _close
jmp short loc_319AD
loc_319A7:
mov r15d, 0FFFFFFFFh
loc_319AD:
mov edi, r15d
mov rsi, rbx
mov edx, 1
mov ecx, 1Dh
mov r8, r14
call my_register_filename
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long my_open(long long a1, int a2, long long a3)
{
long long v3; // r14
long long v4; // r14
unsigned int v5; // r15d
long long v6; // rax
unsigned int v8[9]; // [rsp+Ch] [rbp-24h] BYREF
if ( (a3 & 0x19) != 0 )
v3 = 0LL;
else
v3 = my_global_flags;
v4 = a3 | v3;
if ( (v4 & 0x200) != 0 )
{
v6 = my_open_parent_dir_nosymlinks(a1, v8);
if ( v6 )
{
v5 = openat64(v8[0], v6, a2 | 0xA0000u);
if ( (v8[0] & 0x80000000) == 0 )
close(v8[0]);
}
else
{
v5 = -1;
}
}
else
{
v5 = open64(a1, a2 | 0x80000u, my_umask);
}
return my_register_filename(v5, a1, 1LL, 29LL, v4);
}
|
my_open:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R15D,ESI
MOV RBX,RDI
TEST DL,0x19
JNZ 0x00131932
LEA RAX,[0x46db28]
MOV R14,qword ptr [RAX]
JMP 0x00131935
LAB_00131932:
XOR R14D,R14D
LAB_00131935:
OR R14,RDX
BT R14D,0x9
JC 0x00131961
OR R15D,0x80000
LEA RAX,[0x3f6698]
MOV EDX,dword ptr [RAX]
MOV RDI,RBX
MOV ESI,R15D
XOR EAX,EAX
CALL 0x00124600
MOV R15D,EAX
JMP 0x001319ad
LAB_00131961:
LEA RAX,[0x3f6698]
MOV R12D,dword ptr [RAX]
LEA RSI,[RBP + -0x24]
MOV RDI,RBX
CALL 0x0012c320
TEST RAX,RAX
JZ 0x001319a7
MOV EDI,dword ptr [RBP + -0x24]
OR R15D,0xa0000
MOV RSI,RAX
MOV EDX,R15D
MOV ECX,R12D
XOR EAX,EAX
CALL 0x001242c0
MOV R15D,EAX
MOV EDI,dword ptr [RBP + -0x24]
TEST EDI,EDI
JS 0x001319ad
CALL 0x00124670
JMP 0x001319ad
LAB_001319a7:
MOV R15D,0xffffffff
LAB_001319ad:
MOV EDI,R15D
MOV RSI,RBX
MOV EDX,0x1
MOV ECX,0x1d
MOV R8,R14
CALL 0x001319d2
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void my_open(char *param_1,uint param_2,ulong param_3)
{
uint uVar1;
int iVar2;
char *__file;
ulong uVar3;
int local_2c;
uVar1 = my_umask;
uVar3 = my_global_flags;
if ((param_3 & 0x19) != 0) {
uVar3 = 0;
}
if (((uint)(uVar3 | param_3) >> 9 & 1) == 0) {
iVar2 = open64(param_1,param_2 | 0x80000,(ulong)my_umask);
}
else {
__file = (char *)my_open_parent_dir_nosymlinks(param_1,&local_2c);
if (__file == (char *)0x0) {
iVar2 = -1;
}
else {
iVar2 = openat64(local_2c,__file,param_2 | 0xa0000,(ulong)uVar1);
if (-1 < local_2c) {
close(local_2c);
}
}
}
my_register_filename(iVar2,param_1,1,0x1d,uVar3 | param_3);
return;
}
|
|
59,806
|
thr_print_locks
|
eloqsql/mysys/thr_lock.c
|
void thr_print_locks(void)
{
LIST *list;
uint count=0;
mysql_mutex_lock(&THR_LOCK_lock);
puts("Current active THR (table level locks):");
for (list= thr_lock_thread_list; list && count++ < MAX_THREADS;
list= list_rest(list))
{
THR_LOCK *lock=(THR_LOCK*) list->data;
mysql_mutex_lock(&lock->mutex);
if ((lock->write.data || lock->read.data ||
lock->write_wait.data || lock->read_wait.data))
{
printf("lock: %p:", lock);
if ((lock->write_wait.data || lock->read_wait.data) &&
(! lock->read.data && ! lock->write.data))
printf(" WARNING: ");
if (lock->write.data)
printf(" write");
if (lock->write_wait.data)
printf(" write_wait");
if (lock->read.data)
printf(" read");
if (lock->read_wait.data)
printf(" read_wait");
puts("");
thr_print_lock("write",&lock->write);
thr_print_lock("write_wait",&lock->write_wait);
thr_print_lock("read",&lock->read);
thr_print_lock("read_wait",&lock->read_wait);
puts("");
}
mysql_mutex_unlock(&lock->mutex);
}
fflush(stdout);
mysql_mutex_unlock(&THR_LOCK_lock);
}
|
O0
|
c
|
thr_print_locks:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0xc(%rbp)
leaq 0x36224a(%rip), %rdi # 0x388a50
leaq 0x547f7(%rip), %rsi # 0x7b004
movl $0x61b, %edx # imm = 0x61B
callq 0x24810
leaq 0x54867(%rip), %rdi # 0x7b085
callq 0x24490
movq 0x36114e(%rip), %rax # 0x387978
movq %rax, -0x8(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x8(%rbp)
movb %al, -0x19(%rbp)
je 0x26850
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x3e8, %eax # imm = 0x3E8
setb %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x2685c
jmp 0x269ff
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
leaq 0x5478d(%rip), %rsi # 0x7b004
movl $0x621, %edx # imm = 0x621
callq 0x24810
movq -0x18(%rbp), %rax
cmpq $0x0, 0x90(%rax)
jne 0x268b7
movq -0x18(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x268b7
movq -0x18(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jne 0x268b7
movq -0x18(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x269e1
movq -0x18(%rbp), %rsi
leaq 0x547eb(%rip), %rdi # 0x7b0ad
movb $0x0, %al
callq 0x24050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jne 0x268e2
movq -0x18(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x26909
movq -0x18(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x26909
movq -0x18(%rbp), %rax
cmpq $0x0, 0x90(%rax)
jne 0x26909
leaq 0x547b5(%rip), %rdi # 0x7b0b7
movb $0x0, %al
callq 0x24050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0x26925
leaq 0x547a4(%rip), %rdi # 0x7b0c2
movb $0x0, %al
callq 0x24050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x26941
leaq 0x5478f(%rip), %rdi # 0x7b0c9
movb $0x0, %al
callq 0x24050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x2695a
leaq 0x58c6b(%rip), %rdi # 0x7f5be
movb $0x0, %al
callq 0x24050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x26973
leaq 0x54769(%rip), %rdi # 0x7b0d5
movb $0x0, %al
callq 0x24050
leaq 0x583c8(%rip), %rdi # 0x7ed42
callq 0x24490
movq -0x18(%rbp), %rsi
addq $0x90, %rsi
leaq 0x54732(%rip), %rdi # 0x7b0c3
callq 0x26a20
movq -0x18(%rbp), %rsi
addq $0x80, %rsi
leaq 0x54722(%rip), %rdi # 0x7b0ca
callq 0x26a20
movq -0x18(%rbp), %rsi
addq $0x70, %rsi
leaq 0x58c03(%rip), %rdi # 0x7f5bf
callq 0x26a20
movq -0x18(%rbp), %rsi
addq $0x60, %rsi
leaq 0x54706(%rip), %rdi # 0x7b0d6
callq 0x26a20
leaq 0x58366(%rip), %rdi # 0x7ed42
callq 0x24490
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x24880
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x2682e
movq 0x1a95ba(%rip), %rax # 0x1cffc0
movq (%rax), %rdi
callq 0x242f0
leaq 0x36203b(%rip), %rdi # 0x388a50
callq 0x24880
addq $0x20, %rsp
popq %rbp
retq
|
thr_print_locks:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], 0
lea rdi, THR_LOCK_lock
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 61Bh
call inline_mysql_mutex_lock
lea rdi, aCurrentActiveT; "Current active THR (table level locks):"
call _puts
mov rax, cs:thr_lock_thread_list
mov [rbp+var_8], rax
loc_2682E:
xor eax, eax
cmp [rbp+var_8], 0
mov [rbp+var_19], al
jz short loc_26850
mov eax, [rbp+var_C]
mov ecx, eax
add ecx, 1
mov [rbp+var_C], ecx
cmp eax, 3E8h
setb al
mov [rbp+var_19], al
loc_26850:
mov al, [rbp+var_19]
test al, 1
jnz short loc_2685C
jmp loc_269FF
loc_2685C:
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
add rdi, 18h
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 621h
call inline_mysql_mutex_lock
mov rax, [rbp+var_18]
cmp qword ptr [rax+90h], 0
jnz short loc_268B7
mov rax, [rbp+var_18]
cmp qword ptr [rax+70h], 0
jnz short loc_268B7
mov rax, [rbp+var_18]
cmp qword ptr [rax+80h], 0
jnz short loc_268B7
mov rax, [rbp+var_18]
cmp qword ptr [rax+60h], 0
jz loc_269E1
loc_268B7:
mov rsi, [rbp+var_18]
lea rdi, aLockP; "lock: %p:"
mov al, 0
call _printf
mov rax, [rbp+var_18]
cmp qword ptr [rax+80h], 0
jnz short loc_268E2
mov rax, [rbp+var_18]
cmp qword ptr [rax+60h], 0
jz short loc_26909
loc_268E2:
mov rax, [rbp+var_18]
cmp qword ptr [rax+70h], 0
jnz short loc_26909
mov rax, [rbp+var_18]
cmp qword ptr [rax+90h], 0
jnz short loc_26909
lea rdi, aWarning; " WARNING: "
mov al, 0
call _printf
loc_26909:
mov rax, [rbp+var_18]
cmp qword ptr [rax+90h], 0
jz short loc_26925
lea rdi, aWrite; " write"
mov al, 0
call _printf
loc_26925:
mov rax, [rbp+var_18]
cmp qword ptr [rax+80h], 0
jz short loc_26941
lea rdi, aWriteWait; " write_wait"
mov al, 0
call _printf
loc_26941:
mov rax, [rbp+var_18]
cmp qword ptr [rax+70h], 0
jz short loc_2695A
lea rdi, aTheEventWasCor+34h; " read"
mov al, 0
call _printf
loc_2695A:
mov rax, [rbp+var_18]
cmp qword ptr [rax+60h], 0
jz short loc_26973
lea rdi, aReadWait; " read_wait"
mov al, 0
call _printf
loc_26973:
lea rdi, asc_7ED3E+4; ""
call _puts
mov rsi, [rbp+var_18]
add rsi, 90h
lea rdi, aWrite+1; "write"
call thr_print_lock
mov rsi, [rbp+var_18]
add rsi, 80h
lea rdi, aWriteWait+1; "write_wait"
call thr_print_lock
mov rsi, [rbp+var_18]
add rsi, 70h ; 'p'
lea rdi, aTheEventWasCor+35h; "read"
call thr_print_lock
mov rsi, [rbp+var_18]
add rsi, 60h ; '`'
lea rdi, aReadWait+1; "read_wait"
call thr_print_lock
lea rdi, asc_7ED3E+4; ""
call _puts
loc_269E1:
mov rdi, [rbp+var_18]
add rdi, 18h
call inline_mysql_mutex_unlock
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp loc_2682E
loc_269FF:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
lea rdi, THR_LOCK_lock
call inline_mysql_mutex_unlock
add rsp, 20h
pop rbp
retn
|
long long thr_print_locks()
{
unsigned int v0; // eax
bool v2; // [rsp+7h] [rbp-19h]
_QWORD *v3; // [rsp+8h] [rbp-18h]
unsigned int v4; // [rsp+14h] [rbp-Ch]
long long i; // [rsp+18h] [rbp-8h]
v4 = 0;
inline_mysql_mutex_lock(
(long long)&THR_LOCK_lock,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",
0x61Bu);
puts("Current active THR (table level locks):");
for ( i = thr_lock_thread_list; ; i = *(_QWORD *)(i + 8) )
{
v2 = 0;
if ( i )
{
v0 = v4++;
v2 = v0 < 0x3E8;
}
if ( !v2 )
break;
v3 = *(_QWORD **)(i + 16);
inline_mysql_mutex_lock(
(long long)(v3 + 3),
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",
0x621u);
if ( v3[18] || v3[14] || v3[16] || v3[12] )
{
printf("lock: %p:", v3);
if ( (v3[16] || v3[12]) && !v3[14] && !v3[18] )
printf(" WARNING: ");
if ( v3[18] )
printf(" write");
if ( v3[16] )
printf(" write_wait");
if ( v3[14] )
printf(" read");
if ( v3[12] )
printf(" read_wait");
puts("");
thr_print_lock("write", v3 + 18);
thr_print_lock("write_wait", v3 + 16);
thr_print_lock("read", v3 + 14);
thr_print_lock("read_wait", v3 + 12);
puts("");
}
inline_mysql_mutex_unlock((long long)(v3 + 3));
}
fflush(stdout);
return inline_mysql_mutex_unlock((long long)&THR_LOCK_lock);
}
|
thr_print_locks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],0x0
LEA RDI,[0x488a50]
LEA RSI,[0x17b004]
MOV EDX,0x61b
CALL 0x00124810
LEA RDI,[0x17b085]
CALL 0x00124490
MOV RAX,qword ptr [0x00487978]
MOV qword ptr [RBP + -0x8],RAX
LAB_0012682e:
XOR EAX,EAX
CMP qword ptr [RBP + -0x8],0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x00126850
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
ADD ECX,0x1
MOV dword ptr [RBP + -0xc],ECX
CMP EAX,0x3e8
SETC AL
MOV byte ptr [RBP + -0x19],AL
LAB_00126850:
MOV AL,byte ptr [RBP + -0x19]
TEST AL,0x1
JNZ 0x0012685c
JMP 0x001269ff
LAB_0012685c:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
LEA RSI,[0x17b004]
MOV EDX,0x621
CALL 0x00124810
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x90],0x0
JNZ 0x001268b7
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x70],0x0
JNZ 0x001268b7
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x80],0x0
JNZ 0x001268b7
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x001269e1
LAB_001268b7:
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x17b0ad]
MOV AL,0x0
CALL 0x00124050
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x80],0x0
JNZ 0x001268e2
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x00126909
LAB_001268e2:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x70],0x0
JNZ 0x00126909
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x90],0x0
JNZ 0x00126909
LEA RDI,[0x17b0b7]
MOV AL,0x0
CALL 0x00124050
LAB_00126909:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x90],0x0
JZ 0x00126925
LEA RDI,[0x17b0c2]
MOV AL,0x0
CALL 0x00124050
LAB_00126925:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x80],0x0
JZ 0x00126941
LEA RDI,[0x17b0c9]
MOV AL,0x0
CALL 0x00124050
LAB_00126941:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x70],0x0
JZ 0x0012695a
LEA RDI,[0x17f5be]
MOV AL,0x0
CALL 0x00124050
LAB_0012695a:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x00126973
LEA RDI,[0x17b0d5]
MOV AL,0x0
CALL 0x00124050
LAB_00126973:
LEA RDI,[0x17ed42]
CALL 0x00124490
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x90
LEA RDI,[0x17b0c3]
CALL 0x00126a20
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x80
LEA RDI,[0x17b0ca]
CALL 0x00126a20
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x70
LEA RDI,[0x17f5bf]
CALL 0x00126a20
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x60
LEA RDI,[0x17b0d6]
CALL 0x00126a20
LEA RDI,[0x17ed42]
CALL 0x00124490
LAB_001269e1:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
CALL 0x00124880
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012682e
LAB_001269ff:
MOV RAX,qword ptr [0x002cffc0]
MOV RDI,qword ptr [RAX]
CALL 0x001242f0
LEA RDI,[0x488a50]
CALL 0x00124880
ADD RSP,0x20
POP RBP
RET
|
void thr_print_locks(void)
{
long lVar1;
uint uVar2;
uint local_14;
long local_10;
local_14 = 0;
inline_mysql_mutex_lock
(THR_LOCK_lock,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x61b);
puts("Current active THR (table level locks):");
local_10 = thr_lock_thread_list;
while( true ) {
uVar2 = local_14;
if (local_10 != 0) {
local_14 = local_14 + 1;
}
if (local_10 == 0 || 999 < uVar2) break;
lVar1 = *(long *)(local_10 + 0x10);
inline_mysql_mutex_lock
(lVar1 + 0x18,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x621);
if ((((*(long *)(lVar1 + 0x90) != 0) || (*(long *)(lVar1 + 0x70) != 0)) ||
(*(long *)(lVar1 + 0x80) != 0)) || (*(long *)(lVar1 + 0x60) != 0)) {
printf("lock: %p:",lVar1);
if (((*(long *)(lVar1 + 0x80) != 0) || (*(long *)(lVar1 + 0x60) != 0)) &&
((*(long *)(lVar1 + 0x70) == 0 && (*(long *)(lVar1 + 0x90) == 0)))) {
printf(" WARNING: ");
}
if (*(long *)(lVar1 + 0x90) != 0) {
printf(" write");
}
if (*(long *)(lVar1 + 0x80) != 0) {
printf(" write_wait");
}
if (*(long *)(lVar1 + 0x70) != 0) {
printf(" read");
}
if (*(long *)(lVar1 + 0x60) != 0) {
printf(" read_wait");
}
puts("");
thr_print_lock("write",lVar1 + 0x90);
thr_print_lock("write_wait",lVar1 + 0x80);
thr_print_lock("read",lVar1 + 0x70);
thr_print_lock("read_wait",lVar1 + 0x60);
puts("");
}
inline_mysql_mutex_unlock(lVar1 + 0x18);
local_10 = *(long *)(local_10 + 8);
}
fflush(*(FILE **)PTR_stdout_002cffc0);
inline_mysql_mutex_unlock(THR_LOCK_lock);
return;
}
|
|
59,807
|
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);
}
|
O0
|
c
|
ma_update_blob_record:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq $0x5c, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x51590
movq %rax, %rcx
movq -0x78(%rbp), %rax
addq %rcx, %rax
addq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movq (%rax), %rax
leaq -0x68(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x68(%rbp), %rax
jbe 0x51737
movq -0x70(%rbp), %rcx
subq -0x68(%rbp), %rcx
movl $0x10000, %eax # imm = 0x10000
cmpq %rcx, %rax
jb 0x51718
movq -0x70(%rbp), %rcx
subq -0x68(%rbp), %rcx
movl $0x8000, %eax # imm = 0x8000
cmpq %rcx, %rax
jae 0x51737
movl $0x1000, %eax # imm = 0x1000
cmpq -0x68(%rbp), %rax
ja 0x51737
movb $0x0, -0x59(%rbp)
movq -0x48(%rbp), %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x38(%rbp)
jmp 0x5174f
movb $0x1, -0x59(%rbp)
movq -0x48(%rbp), %rsi
xorl %edi, %edi
movl $0x10010, %edx # imm = 0x10010
callq 0xf5210
movq %rax, -0x38(%rbp)
jmp 0x51751
cmpq $0x0, -0x38(%rbp)
jne 0x51769
callq 0xf7a70
movl $0x80, (%rax)
movb $0x1, -0x9(%rbp)
jmp 0x517d3
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
addq $0x18, %rsi
movq -0x30(%rbp), %rdx
callq 0x504d0
movl %eax, %eax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x51794
movl $0x1, -0x3c(%rbp)
jmp 0x517b7
jmp 0x51796
jmp 0x51798
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq $0x18, %rdx
movq -0x50(%rbp), %rcx
callq 0x50ca0
movsbl %al, %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
movsbl -0x59(%rbp), %esi
callq 0x51630
cmpl $0x0, -0x3c(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
movb %al, -0x79(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x517f3
movb -0x79(%rbp), %al
movq %rbp, %rsp
popq %rbp
retq
callq 0x2a250
nopl (%rax,%rax)
|
_ma_update_blob_record:
push rbp
mov rbp, rsp
sub rsp, 80h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
mov [rbp+var_30], rcx
mov [rbp+var_58], 5Ch ; '\'
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax+3A0h]
mov [rbp+var_78], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_30]
call _ma_calc_total_blob_length
mov rcx, rax
mov rax, [rbp+var_78]
add rax, rcx
add rax, [rbp+var_58]
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov [rbp+var_68], rax
mov rax, [rbp+var_18]
mov rax, [rax+78h]
mov rax, [rax]
lea rcx, [rbp+var_68]
sub rax, rcx
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
cmp rax, [rbp+var_68]
jbe short loc_51737
mov rcx, [rbp+var_70]
sub rcx, [rbp+var_68]
mov eax, 10000h
cmp rax, rcx
jb short loc_51718
mov rcx, [rbp+var_70]
sub rcx, [rbp+var_68]
mov eax, 8000h
cmp rax, rcx
jnb short loc_51737
mov eax, 1000h
cmp rax, [rbp+var_68]
ja short loc_51737
loc_51718:
mov [rbp+var_59], 0
mov rcx, [rbp+var_48]
add rcx, 0Fh
and rcx, 0FFFFFFFFFFFFFFF0h
mov rax, rsp
sub rax, rcx
mov rsp, rax
mov [rbp+var_38], rax
jmp short loc_5174F
loc_51737:
mov [rbp+var_59], 1
mov rsi, [rbp+var_48]
xor edi, edi
mov edx, offset stru_10010
call my_malloc
mov [rbp+var_38], rax
loc_5174F:
jmp short $+2
loc_51751:
cmp [rbp+var_38], 0
jnz short loc_51769
call _my_thread_var
mov dword ptr [rax], 80h
mov [rbp+var_9], 1
jmp short loc_517D3
loc_51769:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_38]
add rsi, 18h
mov rdx, [rbp+var_30]
call _ma_rec_pack
mov eax, eax
mov [rbp+var_50], rax
cmp [rbp+var_50], 0
jnz short loc_51794
mov [rbp+var_3C], 1
jmp short loc_517B7
loc_51794:
jmp short $+2
loc_51796:
jmp short $+2
loc_51798:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_38]
add rdx, 18h
mov rcx, [rbp+var_50]
call update_dynamic_record
movsx eax, al
mov [rbp+var_3C], eax
loc_517B7:
mov rdi, [rbp+var_38]
movsx esi, [rbp+var_59]
call stack_alloc_free
cmp [rbp+var_3C], 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_9], al
loc_517D3:
mov al, [rbp+var_9]
mov [rbp+var_79], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_517F3
mov al, [rbp+var_79]
mov rsp, rbp
pop rbp
retn
loc_517F3:
call ___stack_chk_fail
|
bool ma_update_blob_record(long long a1, long long a2, long long a3, _BYTE *a4)
{
unsigned int v4; // eax
long long v6; // [rsp+0h] [rbp-80h] BYREF
long long v7; // [rsp+8h] [rbp-78h]
unsigned long long v8; // [rsp+10h] [rbp-70h]
unsigned long long v9; // [rsp+18h] [rbp-68h] BYREF
char v10; // [rsp+27h] [rbp-59h]
long long v11; // [rsp+28h] [rbp-58h]
unsigned long long v12; // [rsp+30h] [rbp-50h]
unsigned long long v13; // [rsp+38h] [rbp-48h]
int updated; // [rsp+44h] [rbp-3Ch]
long long v15; // [rsp+48h] [rbp-38h]
_BYTE *v16; // [rsp+50h] [rbp-30h]
long long v17; // [rsp+58h] [rbp-28h]
long long v18; // [rsp+60h] [rbp-20h]
_DWORD *v19; // [rsp+68h] [rbp-18h]
unsigned long long v21; // [rsp+78h] [rbp-8h]
v21 = __readfsqword(0x28u);
v19 = (_DWORD *)a1;
v18 = a2;
v17 = a3;
v16 = a4;
v11 = 92LL;
v7 = *(_QWORD *)(*(_QWORD *)a1 + 928LL);
v13 = ma_calc_total_blob_length((_QWORD *)a1, (long long)a4, a3) + v7 + 92;
v9 = v13;
v8 = **(_QWORD **)(a1 + 120) - (_QWORD)&v9;
if ( v8 <= v13 || v8 - v9 <= 0x10000 && (v8 - v9 <= 0x8000 || v9 < 0x1000) )
{
v10 = 1;
v15 = my_malloc(0LL, v13, &stru_10010);
}
else
{
v10 = 0;
v15 = (long long)&v6 - ((v13 + 15) & 0xFFFFFFFFFFFFFFF0LL);
}
if ( v15 )
{
v4 = ma_rec_pack(v19, (_BYTE *)(v15 + 24), v16);
v12 = v4;
if ( v4 )
updated = update_dynamic_record((long long)v19, v18, v15 + 24, v12);
else
updated = 1;
stack_alloc_free(v15, v10);
return updated != 0;
}
else
{
*(_DWORD *)my_thread_var() = 128;
return 1;
}
}
|
_ma_update_blob_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x28],RDX
MOV qword ptr [RBP + -0x30],RCX
MOV qword ptr [RBP + -0x58],0x5c
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV qword ptr [RBP + -0x78],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00151590
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,RCX
ADD RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RAX]
LEA RCX,[RBP + -0x68]
SUB RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x68]
JBE 0x00151737
MOV RCX,qword ptr [RBP + -0x70]
SUB RCX,qword ptr [RBP + -0x68]
MOV EAX,0x10000
CMP RAX,RCX
JC 0x00151718
MOV RCX,qword ptr [RBP + -0x70]
SUB RCX,qword ptr [RBP + -0x68]
MOV EAX,0x8000
CMP RAX,RCX
JNC 0x00151737
MOV EAX,0x1000
CMP RAX,qword ptr [RBP + -0x68]
JA 0x00151737
LAB_00151718:
MOV byte ptr [RBP + -0x59],0x0
MOV RCX,qword ptr [RBP + -0x48]
ADD RCX,0xf
AND RCX,-0x10
MOV RAX,RSP
SUB RAX,RCX
MOV RSP,RAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0015174f
LAB_00151737:
MOV byte ptr [RBP + -0x59],0x1
MOV RSI,qword ptr [RBP + -0x48]
XOR EDI,EDI
MOV EDX,0x10010
CALL 0x001f5210
MOV qword ptr [RBP + -0x38],RAX
LAB_0015174f:
JMP 0x00151751
LAB_00151751:
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x00151769
CALL 0x001f7a70
MOV dword ptr [RAX],0x80
MOV byte ptr [RBP + -0x9],0x1
JMP 0x001517d3
LAB_00151769:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x38]
ADD RSI,0x18
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001504d0
MOV EAX,EAX
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x50],0x0
JNZ 0x00151794
MOV dword ptr [RBP + -0x3c],0x1
JMP 0x001517b7
LAB_00151794:
JMP 0x00151796
LAB_00151796:
JMP 0x00151798
LAB_00151798:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x38]
ADD RDX,0x18
MOV RCX,qword ptr [RBP + -0x50]
CALL 0x00150ca0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x3c],EAX
LAB_001517b7:
MOV RDI,qword ptr [RBP + -0x38]
MOVSX ESI,byte ptr [RBP + -0x59]
CALL 0x00151630
CMP dword ptr [RBP + -0x3c],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x9],AL
LAB_001517d3:
MOV AL,byte ptr [RBP + -0x9]
MOV byte ptr [RBP + -0x79],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001517f3
MOV AL,byte ptr [RBP + -0x79]
MOV RSP,RBP
POP RBP
RET
LAB_001517f3:
CALL 0x0012a250
|
int8
_ma_update_blob_record(long *param_1,int8 param_2,int8 param_3,int8 param_4)
{
int8 uVar1;
long *plVar2;
char cVar3;
uint uVar4;
long lVar5;
int4 *puVar6;
ulong uVar7;
int1 *puVar8;
int iVar9;
int1 *puVar10;
long in_FS_OFFSET;
int1 auStack_88 [7];
bool local_81;
long local_80;
ulong local_78;
ulong local_70;
char local_61;
long local_60;
ulong local_58;
ulong local_50;
int local_44;
int1 *local_40;
int8 local_38;
int8 local_30;
int8 local_28;
long *local_20;
bool local_11;
long local_10;
puVar8 = auStack_88;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_60 = 0x5c;
local_80 = *(long *)(*param_1 + 0x3a0);
local_38 = param_4;
local_30 = param_3;
local_28 = param_2;
local_20 = param_1;
lVar5 = _ma_calc_total_blob_length(param_1,param_4);
local_70 = local_80 + lVar5 + local_60;
local_78 = *(long *)local_20[0xf] - (long)&local_70;
local_50 = local_70;
if ((local_70 < local_78) &&
((0x10000 < local_78 - local_70 || ((0x8000 < local_78 - local_70 && (0xfff < local_70)))))) {
local_61 = '\0';
puVar8 = auStack_88 + -(local_70 + 0xf & 0xfffffffffffffff0);
local_40 = puVar8;
}
else {
local_61 = '\x01';
local_40 = (int1 *)my_malloc(0,local_70,0x10010);
}
plVar2 = local_20;
uVar1 = local_38;
if (local_40 == (int1 *)0x0) {
*(int8 *)(puVar8 + -8) = 0x15175d;
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x80;
local_11 = true;
}
else {
puVar10 = local_40 + 0x18;
*(int8 *)(puVar8 + -8) = 0x15177e;
uVar4 = _ma_rec_pack(plVar2,puVar10,uVar1);
plVar2 = local_20;
uVar1 = local_28;
uVar7 = (ulong)uVar4;
local_58 = uVar7;
if (uVar7 == 0) {
local_44 = 1;
}
else {
puVar10 = local_40 + 0x18;
*(int8 *)(puVar8 + -8) = 0x1517b1;
cVar3 = update_dynamic_record(plVar2,uVar1,puVar10,uVar7);
local_44 = (int)cVar3;
}
puVar10 = local_40;
iVar9 = (int)local_61;
*(int8 *)(puVar8 + -8) = 0x1517c4;
stack_alloc_free(puVar10,iVar9);
local_11 = local_44 != 0;
}
local_81 = local_11;
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_11);
}
/* WARNING: Subroutine does not return */
*(int8 *)(puVar8 + -8) = 0x1517f8;
__stack_chk_fail();
}
|
|
59,808
|
js_os_symlink
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_os_symlink(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *target, *linkpath;
int err;
target = JS_ToCString(ctx, argv[0]);
if (!target)
return JS_EXCEPTION;
linkpath = JS_ToCString(ctx, argv[1]);
if (!linkpath) {
JS_FreeCString(ctx, target);
return JS_EXCEPTION;
}
err = js_get_errno(symlink(target, linkpath));
JS_FreeCString(ctx, target);
JS_FreeCString(ctx, linkpath);
return JS_NewInt32(ctx, err);
}
|
O0
|
c
|
js_os_symlink:
subq $0x78, %rsp
movq %rsi, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq %rdi, 0x30(%rsp)
movl %ecx, 0x2c(%rsp)
movq %r8, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x1aad0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x21865
movl $0x0, 0x48(%rsp)
movq $0x6, 0x50(%rsp)
jmp 0x2191b
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
callq 0x1aad0
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x218ab
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x30140
movl $0x0, 0x48(%rsp)
movq $0x6, 0x50(%rsp)
jmp 0x2191b
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0xe2d0
movslq %eax, %rdi
callq 0x19d40
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x30140
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x30140
movq 0x30(%rsp), %rcx
movl 0xc(%rsp), %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
movl %eax, 0x68(%rsp)
movq $0x0, 0x70(%rsp)
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rdx
addq $0x78, %rsp
retq
nopw (%rax,%rax)
|
js_os_symlink:
sub rsp, 78h
mov [rsp+78h+var_40], rsi
mov [rsp+78h+var_38], rdx
mov [rsp+78h+var_48], rdi
mov [rsp+78h+var_4C], ecx
mov [rsp+78h+var_58], r8
mov rdi, [rsp+78h+var_48]
mov rax, [rsp+78h+var_58]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString_0
mov [rsp+78h+var_60], rax
cmp [rsp+78h+var_60], 0
jnz short loc_21865
mov dword ptr [rsp+78h+var_30], 0
mov [rsp+78h+var_28], 6
jmp loc_2191B
loc_21865:
mov rdi, [rsp+78h+var_48]
mov rax, [rsp+78h+var_58]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
call JS_ToCString_0
mov [rsp+78h+var_68], rax
cmp [rsp+78h+var_68], 0
jnz short loc_218AB
mov rdi, [rsp+78h+var_48]
mov rsi, [rsp+78h+var_60]
call JS_FreeCString
mov dword ptr [rsp+78h+var_30], 0
mov [rsp+78h+var_28], 6
jmp short loc_2191B
loc_218AB:
mov rdi, [rsp+78h+var_60]
mov rsi, [rsp+78h+var_68]
call _symlink
movsxd rdi, eax
call js_get_errno
mov [rsp+78h+var_6C], eax
mov rdi, [rsp+78h+var_48]
mov rsi, [rsp+78h+var_60]
call JS_FreeCString
mov rdi, [rsp+78h+var_48]
mov rsi, [rsp+78h+var_68]
call JS_FreeCString
mov rcx, [rsp+78h+var_48]
mov eax, [rsp+78h+var_6C]
mov [rsp+78h+var_18], rcx
mov [rsp+78h+var_1C], eax
mov eax, [rsp+78h+var_1C]
mov dword ptr [rsp+78h+var_10], eax
mov [rsp+78h+var_8], 0
mov rcx, [rsp+78h+var_10]
mov rax, [rsp+78h+var_8]
mov [rsp+78h+var_30], rcx
mov [rsp+78h+var_28], rax
loc_2191B:
mov rax, [rsp+78h+var_30]
mov rdx, [rsp+78h+var_28]
add rsp, 78h
retn
|
long long js_os_symlink(long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6)
{
long long v6; // rcx
long long v7; // r8
long long v8; // r9
int v9; // eax
int errno; // [rsp+Ch] [rbp-6Ch]
long long v12; // [rsp+10h] [rbp-68h]
long long v13; // [rsp+18h] [rbp-60h]
long long v15; // [rsp+48h] [rbp-30h]
long long v16; // [rsp+68h] [rbp-10h]
v13 = JS_ToCString_0(a1, *a5, a5[1], a4, (long long)a5, a6);
if ( v13 )
{
v12 = JS_ToCString_0(a1, a5[2], a5[3], v6, v7, v8);
if ( v12 )
{
v9 = symlink(v13, v12);
errno = js_get_errno(v9);
JS_FreeCString(a1, v13);
JS_FreeCString(a1, v12);
LODWORD(v16) = errno;
return v16;
}
else
{
JS_FreeCString(a1, v13);
LODWORD(v15) = 0;
}
}
else
{
LODWORD(v15) = 0;
}
return v15;
}
|
js_os_symlink:
SUB RSP,0x78
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RSP + 0x30],RDI
MOV dword ptr [RSP + 0x2c],ECX
MOV qword ptr [RSP + 0x20],R8
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0011aad0
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x00121865
MOV dword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],0x6
JMP 0x0012191b
LAB_00121865:
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x0011aad0
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x001218ab
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00130140
MOV dword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],0x6
JMP 0x0012191b
LAB_001218ab:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0010e2d0
MOVSXD RDI,EAX
CALL 0x00119d40
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00130140
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00130140
MOV RCX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RSP + 0xc]
MOV qword ptr [RSP + 0x60],RCX
MOV dword ptr [RSP + 0x5c],EAX
MOV EAX,dword ptr [RSP + 0x5c]
MOV dword ptr [RSP + 0x68],EAX
MOV qword ptr [RSP + 0x70],0x0
MOV RCX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x48],RCX
MOV qword ptr [RSP + 0x50],RAX
LAB_0012191b:
MOV RAX,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
ADD RSP,0x78
RET
|
int1 [16] js_os_symlink(int8 param_1)
{
int1 auVar1 [16];
int iVar2;
char *__from;
char *__to;
int8 *in_R8;
int4 local_30;
int4 uStack_2c;
int8 local_28;
int4 uStack_c;
__from = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]);
if (__from == (char *)0x0) {
local_30 = 0;
local_28 = 6;
}
else {
__to = (char *)JS_ToCString(param_1,in_R8[2],in_R8[3]);
if (__to == (char *)0x0) {
JS_FreeCString(param_1,__from);
local_30 = 0;
local_28 = 6;
}
else {
iVar2 = symlink(__from,__to);
local_30 = js_get_errno((long)iVar2);
JS_FreeCString(param_1,__from);
JS_FreeCString(param_1,__to);
uStack_2c = uStack_c;
local_28 = 0;
}
}
auVar1._4_4_ = uStack_2c;
auVar1._0_4_ = local_30;
auVar1._8_8_ = local_28;
return auVar1;
}
|
|
59,809
|
my_hash_first
|
eloqsql/mysys/hash.c
|
uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length,
HASH_SEARCH_STATE *current_record)
{
uchar *res;
DBUG_ASSERT(my_hash_inited(hash));
res= my_hash_first_from_hash_value(hash,
hash->hash_function(hash->charset, key,
length ? length :
hash->key_length),
key, length, current_record);
return res;
}
|
O0
|
c
|
my_hash_first:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
jmp 0xe105a
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xe1093
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0xe109f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %rdx
callq *%rax
movq -0x48(%rbp), %rdi
movl %eax, %esi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
callq 0xe1120
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_hash_first:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
jmp short $+2
loc_E105A:
mov rax, [rbp+var_8]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov rax, [rax+58h]
mov [rbp+var_40], rax
mov rax, [rbp+var_8]
mov rax, [rax+68h]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
cmp [rbp+var_18], 0
jz short loc_E1093
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
jmp short loc_E109F
loc_E1093:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_50], rax
loc_E109F:
mov rax, [rbp+var_40]
mov rsi, [rbp+var_30]
mov rdi, [rbp+var_38]
mov rdx, [rbp+var_50]
call rax
mov rdi, [rbp+var_48]
mov esi, eax
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_20]
call my_hash_first_from_hash_value
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 50h
pop rbp
retn
|
long long my_hash_first(_QWORD *a1, long long a2, long long a3, long long a4)
{
unsigned int v4; // eax
long long ( *v6)(long long, long long, long long); // [rsp+10h] [rbp-40h]
long long v7; // [rsp+18h] [rbp-38h]
v6 = (long long ( *)(long long, long long, long long))a1[11];
v7 = a1[13];
if ( a3 )
v4 = v6(v7, a2, a3);
else
v4 = v6(v7, a2, a1[1]);
return my_hash_first_from_hash_value(a1, v4, a2, a3, a4);
}
|
my_hash_first:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
JMP 0x001e105a
LAB_001e105a:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x68]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001e1093
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001e109f
LAB_001e1093:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x50],RAX
LAB_001e109f:
MOV RAX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x50]
CALL RAX
MOV RDI,qword ptr [RBP + -0x48]
MOV ESI,EAX
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x20]
CALL 0x001e1120
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x50
POP RBP
RET
|
int8 my_hash_first(long param_1,int8 param_2,long param_3,int8 param_4)
{
int4 uVar1;
int8 uVar2;
int8 local_58;
local_58 = param_3;
if (param_3 == 0) {
local_58 = *(long *)(param_1 + 8);
}
uVar1 = (**(code **)(param_1 + 0x58))(*(int8 *)(param_1 + 0x68),param_2,local_58);
uVar2 = my_hash_first_from_hash_value(param_1,uVar1,param_2,param_3,param_4);
return uVar2;
}
|
|
59,810
|
mi_kpointer
|
eloqsql/storage/myisam/mi_search.c
|
void _mi_kpointer(register MI_INFO *info, register uchar *buff, my_off_t pos)
{
pos/=MI_MIN_KEY_BLOCK_LENGTH;
switch (info->s->base.key_reflength) {
#if SIZEOF_OFF_T > 4
case 7: mi_int7store(buff,pos); break;
case 6: mi_int6store(buff,pos); break;
case 5: mi_int5store(buff,pos); break;
#else
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;
case 1: buff[0]= (uchar) pos; break;
default: abort(); /* impossible */
}
}
|
O3
|
c
|
mi_kpointer:
movq (%rdi), %rax
movl 0x17c(%rax), %ecx
decl %ecx
cmpl $0x6, %ecx
ja 0x41597
movq %rdx, %rax
shrq $0xa, %rax
leaq 0x59e5d(%rip), %rdi # 0x9b31c
movslq (%rdi,%rcx,4), %rcx
addq %rdi, %rcx
jmpq *%rcx
movb %al, 0x1(%rsi)
shrq $0x12, %rdx
jmp 0x41591
movb %al, 0x4(%rsi)
movq %rdx, %rax
shrq $0x2a, %rax
movl %edx, %ecx
shrl $0x12, %ecx
movb %cl, 0x3(%rsi)
movq %rdx, %rcx
shrq $0x1a, %rcx
movb %cl, 0x2(%rsi)
shrq $0x22, %rdx
movb %dl, 0x1(%rsi)
jmp 0x41594
movb %al, 0x2(%rsi)
movl %edx, %eax
shrl $0x12, %eax
movb %al, 0x1(%rsi)
shrq $0x1a, %rdx
jmp 0x41591
movb %al, 0x3(%rsi)
movl %edx, %eax
shrl $0x12, %eax
movb %al, 0x2(%rsi)
movq %rdx, %rax
shrq $0x1a, %rax
movb %al, 0x1(%rsi)
shrq $0x22, %rdx
jmp 0x41591
movq %rdx, %rcx
shrq $0x2a, %rcx
movb %al, 0x5(%rsi)
movl %edx, %eax
shrl $0x12, %eax
movb %al, 0x4(%rsi)
movq %rdx, %rax
shrq $0x1a, %rax
movb %al, 0x3(%rsi)
movq %rdx, %rax
shrq $0x22, %rax
movb %al, 0x2(%rsi)
movb %cl, 0x1(%rsi)
shrq $0x32, %rdx
jmp 0x41591
movq %rdx, %rcx
shrq $0x2a, %rcx
movb %al, 0x6(%rsi)
movl %edx, %eax
shrl $0x12, %eax
movb %al, 0x5(%rsi)
movq %rdx, %rax
shrq $0x1a, %rax
movb %al, 0x4(%rsi)
movq %rdx, %rax
shrq $0x22, %rax
movb %al, 0x3(%rsi)
movb %cl, 0x2(%rsi)
movq %rdx, %rax
shrq $0x32, %rax
movb %al, 0x1(%rsi)
shrq $0x3a, %rdx
movq %rdx, %rax
movb %al, (%rsi)
retq
pushq %rbp
movq %rsp, %rbp
callq 0x281e0
|
_mi_kpointer:
mov rax, [rdi]
mov ecx, [rax+17Ch]
dec ecx; switch 7 cases
cmp ecx, 6
ja def_414C6; jumptable 00000000000414C6 default case
mov rax, rdx
shr rax, 0Ah
lea rdi, jpt_414C6
movsxd rcx, ds:(jpt_414C6 - 9B31Ch)[rdi+rcx*4]
add rcx, rdi
jmp rcx; switch jump
loc_414C8:
mov [rsi+1], al; jumptable 00000000000414C6 case 2
shr rdx, 12h
jmp loc_41591
loc_414D4:
mov [rsi+4], al; jumptable 00000000000414C6 case 5
mov rax, rdx
shr rax, 2Ah
mov ecx, edx
shr ecx, 12h
mov [rsi+3], cl
mov rcx, rdx
shr rcx, 1Ah
mov [rsi+2], cl
shr rdx, 22h
mov [rsi+1], dl
jmp loc_41594; jumptable 00000000000414C6 case 1
loc_414FC:
mov [rsi+2], al; jumptable 00000000000414C6 case 3
mov eax, edx
shr eax, 12h
mov [rsi+1], al
shr rdx, 1Ah
jmp loc_41591
loc_41510:
mov [rsi+3], al; jumptable 00000000000414C6 case 4
mov eax, edx
shr eax, 12h
mov [rsi+2], al
mov rax, rdx
shr rax, 1Ah
mov [rsi+1], al
shr rdx, 22h
jmp short loc_41591
loc_4152B:
mov rcx, rdx; jumptable 00000000000414C6 case 6
shr rcx, 2Ah
mov [rsi+5], al
mov eax, edx
shr eax, 12h
mov [rsi+4], al
mov rax, rdx
shr rax, 1Ah
mov [rsi+3], al
mov rax, rdx
shr rax, 22h
mov [rsi+2], al
mov [rsi+1], cl
shr rdx, 32h
jmp short loc_41591
loc_4155A:
mov rcx, rdx; jumptable 00000000000414C6 case 7
shr rcx, 2Ah
mov [rsi+6], al
mov eax, edx
shr eax, 12h
mov [rsi+5], al
mov rax, rdx
shr rax, 1Ah
mov [rsi+4], al
mov rax, rdx
shr rax, 22h
mov [rsi+3], al
mov [rsi+2], cl
mov rax, rdx
shr rax, 32h
mov [rsi+1], al
shr rdx, 3Ah
loc_41591:
mov rax, rdx
loc_41594:
mov [rsi], al; jumptable 00000000000414C6 case 1
retn
def_414C6:
push rbp; jumptable 00000000000414C6 default case
mov rbp, rsp
call _abort
|
unsigned long long mi_kpointer(long long a1, _BYTE *a2, unsigned long long a3)
{
unsigned long long result; // rax
unsigned long long v4; // rdx
result = a3 >> 10;
switch ( *(_DWORD *)(*(_QWORD *)a1 + 380LL) )
{
case 1:
goto LABEL_9;
case 2:
a2[1] = result;
v4 = a3 >> 18;
goto LABEL_8;
case 3:
a2[2] = result;
a2[1] = (unsigned int)a3 >> 18;
v4 = a3 >> 26;
goto LABEL_8;
case 4:
a2[3] = result;
a2[2] = (unsigned int)a3 >> 18;
a2[1] = a3 >> 26;
v4 = a3 >> 34;
goto LABEL_8;
case 5:
a2[4] = result;
result = a3 >> 42;
a2[3] = (unsigned int)a3 >> 18;
a2[2] = a3 >> 26;
a2[1] = a3 >> 34;
goto LABEL_9;
case 6:
a2[5] = result;
a2[4] = (unsigned int)a3 >> 18;
a2[3] = a3 >> 26;
a2[2] = a3 >> 34;
a2[1] = a3 >> 42;
v4 = a3 >> 50;
goto LABEL_8;
case 7:
a2[6] = result;
a2[5] = (unsigned int)a3 >> 18;
a2[4] = a3 >> 26;
a2[3] = a3 >> 34;
a2[2] = a3 >> 42;
a2[1] = a3 >> 50;
v4 = a3 >> 58;
LABEL_8:
result = v4;
LABEL_9:
*a2 = result;
return result;
default:
abort(a1);
}
}
|
_mi_kpointer:
MOV RAX,qword ptr [RDI]
MOV ECX,dword ptr [RAX + 0x17c]
DEC ECX
CMP ECX,0x6
JA 0x00141597
MOV RAX,RDX
SHR RAX,0xa
LEA RDI,[0x19b31c]
MOVSXD RCX,dword ptr [RDI + RCX*0x4]
ADD RCX,RDI
switchD:
JMP RCX
caseD_2:
MOV byte ptr [RSI + 0x1],AL
SHR RDX,0x12
JMP 0x00141591
caseD_5:
MOV byte ptr [RSI + 0x4],AL
MOV RAX,RDX
SHR RAX,0x2a
MOV ECX,EDX
SHR ECX,0x12
MOV byte ptr [RSI + 0x3],CL
MOV RCX,RDX
SHR RCX,0x1a
MOV byte ptr [RSI + 0x2],CL
SHR RDX,0x22
MOV byte ptr [RSI + 0x1],DL
JMP 0x00141594
caseD_3:
MOV byte ptr [RSI + 0x2],AL
MOV EAX,EDX
SHR EAX,0x12
MOV byte ptr [RSI + 0x1],AL
SHR RDX,0x1a
JMP 0x00141591
caseD_4:
MOV byte ptr [RSI + 0x3],AL
MOV EAX,EDX
SHR EAX,0x12
MOV byte ptr [RSI + 0x2],AL
MOV RAX,RDX
SHR RAX,0x1a
MOV byte ptr [RSI + 0x1],AL
SHR RDX,0x22
JMP 0x00141591
caseD_6:
MOV RCX,RDX
SHR RCX,0x2a
MOV byte ptr [RSI + 0x5],AL
MOV EAX,EDX
SHR EAX,0x12
MOV byte ptr [RSI + 0x4],AL
MOV RAX,RDX
SHR RAX,0x1a
MOV byte ptr [RSI + 0x3],AL
MOV RAX,RDX
SHR RAX,0x22
MOV byte ptr [RSI + 0x2],AL
MOV byte ptr [RSI + 0x1],CL
SHR RDX,0x32
JMP 0x00141591
caseD_7:
MOV RCX,RDX
SHR RCX,0x2a
MOV byte ptr [RSI + 0x6],AL
MOV EAX,EDX
SHR EAX,0x12
MOV byte ptr [RSI + 0x5],AL
MOV RAX,RDX
SHR RAX,0x1a
MOV byte ptr [RSI + 0x4],AL
MOV RAX,RDX
SHR RAX,0x22
MOV byte ptr [RSI + 0x3],AL
MOV byte ptr [RSI + 0x2],CL
MOV RAX,RDX
SHR RAX,0x32
MOV byte ptr [RSI + 0x1],AL
SHR RDX,0x3a
LAB_00141591:
MOV RAX,RDX
caseD_1:
MOV byte ptr [RSI],AL
RET
default:
PUSH RBP
MOV RBP,RSP
CALL 0x001281e0
|
void _mi_kpointer(long *param_1,byte *param_2,ulong param_3)
{
byte bVar1;
bVar1 = (byte)(param_3 >> 10);
switch(*(int4 *)(*param_1 + 0x17c)) {
case 1:
break;
case 2:
param_2[1] = bVar1;
bVar1 = (byte)(param_3 >> 0x12);
break;
case 3:
param_2[2] = bVar1;
param_2[1] = (byte)(param_3 >> 0x12);
bVar1 = (byte)(param_3 >> 0x1a);
break;
case 4:
param_2[3] = bVar1;
param_2[2] = (byte)(param_3 >> 0x12);
param_2[1] = (byte)(param_3 >> 0x1a);
bVar1 = (byte)(param_3 >> 0x22);
break;
case 5:
param_2[4] = bVar1;
bVar1 = (byte)(param_3 >> 0x2a);
param_2[3] = (byte)(param_3 >> 0x12);
param_2[2] = (byte)(param_3 >> 0x1a);
param_2[1] = (byte)(param_3 >> 0x22);
break;
case 6:
param_2[5] = bVar1;
param_2[4] = (byte)(param_3 >> 0x12);
param_2[3] = (byte)(param_3 >> 0x1a);
param_2[2] = (byte)(param_3 >> 0x22);
param_2[1] = (byte)(param_3 >> 0x2a);
bVar1 = (byte)(param_3 >> 0x32);
break;
case 7:
param_2[6] = bVar1;
param_2[5] = (byte)(param_3 >> 0x12);
param_2[4] = (byte)(param_3 >> 0x1a);
param_2[3] = (byte)(param_3 >> 0x22);
param_2[2] = (byte)(param_3 >> 0x2a);
param_2[1] = (byte)(param_3 >> 0x32);
bVar1 = (byte)(param_3 >> 0x3a);
break;
default:
/* WARNING: Subroutine does not return */
abort();
}
*param_2 = bVar1;
return;
}
|
|
59,811
|
my_freopen
|
eloqsql/mysys/my_fopen.c
|
FILE *my_freopen(const char *path, const char *mode, FILE *stream)
{
FILE *result;
#if defined(_WIN32)
result= my_win_freopen(path, mode, stream);
#else
result= freopen(path, mode, stream);
#endif
return result;
}
|
O0
|
c
|
my_freopen:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x29370
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_freopen:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _freopen64
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
|
long long my_freopen(long long a1, long long a2, long long a3)
{
return freopen64(a1, a2, a3);
}
|
my_freopen:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00129370
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
FILE * my_freopen(char *param_1,char *param_2,FILE *param_3)
{
FILE *pFVar1;
pFVar1 = freopen64(param_1,param_2,param_3);
return pFVar1;
}
|
|
59,812
|
trnman_trid_to_trn
|
eloqsql/storage/maria/trnman.c
|
TRN *trnman_trid_to_trn(TRN *trn, TrID trid)
{
TRN **found;
if (trid < trn->min_read_from)
return 0; /* it's committed eons ago */
found= lf_hash_search(&trid_to_trn, trn->pins, &trid, sizeof(trid));
if (found == NULL || found == MY_ERRPTR)
return 0; /* no luck */
/* we've found something */
mysql_mutex_lock(&(*found)->state_lock);
if ((*found)->short_id == 0)
{
mysql_mutex_unlock(&(*found)->state_lock);
lf_hash_search_unpin(trn->pins);
return 0; /* but it was a ghost */
}
lf_hash_search_unpin(trn->pins);
/* Gotcha! */
return *found;
}
|
O0
|
c
|
trnman_trid_to_trn:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x7970e
movq $0x0, -0x8(%rbp)
jmp 0x797d9
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0xc00d0c(%rip), %rdi # 0xc7a428
leaq -0x18(%rbp), %rdx
movl $0x8, %ecx
callq 0xfe710
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x79740
movl $0x1, %eax
cmpq %rax, -0x20(%rbp)
jne 0x7974d
movq $0x0, -0x8(%rbp)
jmp 0x797d9
movq -0x20(%rbp), %rax
movq (%rax), %rdi
addq $0x10, %rdi
leaq 0xd8f64(%rip), %rsi # 0x1526c3
movl $0x285, %edx # imm = 0x285
callq 0x78ff0
movq -0x20(%rbp), %rax
movq (%rax), %rax
movzwl 0xac(%rax), %eax
cmpl $0x0, %eax
jne 0x797b1
movq -0x20(%rbp), %rax
movq (%rax), %rdi
addq $0x10, %rdi
callq 0x79060
jmp 0x7978e
jmp 0x79790
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
xchgq %rax, 0x10(%rcx)
movq $0x0, -0x8(%rbp)
jmp 0x797d9
jmp 0x797b3
jmp 0x797b5
jmp 0x797b7
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
xchgq %rax, 0x10(%rcx)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
trnman_trid_to_trn:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+80h]
jnb short loc_7970E
mov [rbp+var_8], 0
jmp loc_797D9
loc_7970E:
mov rax, [rbp+var_10]
mov rsi, [rax]
lea rdi, trid_to_trn
lea rdx, [rbp+var_18]
mov ecx, 8
call lf_hash_search
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jz short loc_79740
mov eax, 1
cmp [rbp+var_20], rax
jnz short loc_7974D
loc_79740:
mov [rbp+var_8], 0
jmp loc_797D9
loc_7974D:
mov rax, [rbp+var_20]
mov rdi, [rax]
add rdi, 10h
lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 285h
call inline_mysql_mutex_lock_11
mov rax, [rbp+var_20]
mov rax, [rax]
movzx eax, word ptr [rax+0ACh]
cmp eax, 0
jnz short loc_797B1
mov rax, [rbp+var_20]
mov rdi, [rax]
add rdi, 10h
call inline_mysql_mutex_unlock_12
jmp short $+2
loc_7978E:
jmp short $+2
loc_79790:
mov rax, [rbp+var_10]
mov rcx, [rax]
mov [rbp+var_28], 0
mov rax, [rbp+var_28]
xchg rax, [rcx+10h]
mov [rbp+var_8], 0
jmp short loc_797D9
loc_797B1:
jmp short $+2
loc_797B3:
jmp short $+2
loc_797B5:
jmp short $+2
loc_797B7:
mov rax, [rbp+var_10]
mov rcx, [rax]
mov [rbp+var_30], 0
mov rax, [rbp+var_30]
xchg rax, [rcx+10h]
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_8], rax
loc_797D9:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long trnman_trid_to_trn(_QWORD *a1, unsigned long long a2)
{
unsigned long long v3; // [rsp+10h] [rbp-20h]
unsigned long long v4; // [rsp+18h] [rbp-18h] BYREF
_QWORD *v5; // [rsp+20h] [rbp-10h]
v5 = a1;
v4 = a2;
if ( a2 < a1[16] )
return 0LL;
v3 = lf_hash_search(&trid_to_trn, *v5, &v4, 8LL);
if ( v3 <= 1 )
return 0LL;
inline_mysql_mutex_lock_11(
*(_QWORD *)v3 + 16LL,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",
0x285u);
if ( *(_WORD *)(*(_QWORD *)v3 + 172LL) )
{
_InterlockedExchange64((volatile long long *)(*v5 + 16LL), 0LL);
return *(_QWORD *)v3;
}
else
{
inline_mysql_mutex_unlock_12(*(_QWORD *)v3 + 16LL);
_InterlockedExchange64((volatile long long *)(*v5 + 16LL), 0LL);
return 0LL;
}
}
|
trnman_trid_to_trn:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x80]
JNC 0x0017970e
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001797d9
LAB_0017970e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
LEA RDI,[0xd7a428]
LEA RDX,[RBP + -0x18]
MOV ECX,0x8
CALL 0x001fe710
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00179740
MOV EAX,0x1
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x0017974d
LAB_00179740:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001797d9
LAB_0017974d:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX]
ADD RDI,0x10
LEA RSI,[0x2526c3]
MOV EDX,0x285
CALL 0x00178ff0
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOVZX EAX,word ptr [RAX + 0xac]
CMP EAX,0x0
JNZ 0x001797b1
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX]
ADD RDI,0x10
CALL 0x00179060
JMP 0x0017978e
LAB_0017978e:
JMP 0x00179790
LAB_00179790:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],0x0
MOV RAX,qword ptr [RBP + -0x28]
XCHG qword ptr [RCX + 0x10],RAX
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001797d9
LAB_001797b1:
JMP 0x001797b3
LAB_001797b3:
JMP 0x001797b5
LAB_001797b5:
JMP 0x001797b7
LAB_001797b7:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],0x0
MOV RAX,qword ptr [RBP + -0x30]
XCHG qword ptr [RCX + 0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
LAB_001797d9:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long trnman_trid_to_trn(long *param_1,ulong param_2)
{
long *plVar1;
ulong local_20;
long *local_18;
long local_10;
if (param_2 < (ulong)param_1[0x10]) {
local_10 = 0;
}
else {
local_20 = param_2;
local_18 = param_1;
plVar1 = (long *)lf_hash_search(trid_to_trn,*param_1,&local_20,8);
if ((plVar1 == (long *)0x0) || (plVar1 == (long *)0x1)) {
local_10 = 0;
}
else {
inline_mysql_mutex_lock
(*plVar1 + 0x10,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",
0x285);
if (*(short *)(*plVar1 + 0xac) == 0) {
inline_mysql_mutex_unlock(*plVar1 + 0x10);
LOCK();
*(int8 *)(*local_18 + 0x10) = 0;
UNLOCK();
local_10 = 0;
}
else {
LOCK();
*(int8 *)(*local_18 + 0x10) = 0;
UNLOCK();
local_10 = *plVar1;
}
}
}
return local_10;
}
|
|
59,813
|
ma_check_print_error
|
eloqsql/storage/maria/unittest/../ma_check_standalone.h
|
void _ma_check_print_error(HA_CHECK *param, const char *fmt,...)
{
va_list args;
DBUG_ENTER("_ma_check_print_error");
DBUG_PRINT("enter", ("format: %s", fmt));
fflush(stdout);
if (!param->warning_printed && !param->error_printed)
{
if (param->testflag & T_SILENT)
fprintf(stderr,"%s: Aria file %s\n",my_progname_short,param->isam_file_name);
param->out_flag|= O_DATA_LOST;
}
param->error_printed++;
va_start(args,fmt);
fprintf(stderr,"%s: error: ",my_progname_short);
vfprintf(stderr, fmt, args);
fputc('\n',stderr);
fflush(stderr);
va_end(args);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
ma_check_print_error:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x2cca8
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x2ccce
movq 0x292303(%rip), %rax # 0x2befd8
movq (%rax), %rdi
callq 0x2a3d0
movq -0x8(%rbp), %rax
cmpb $0x0, 0x209a2(%rax)
jne 0x2cd4a
movq -0x8(%rbp), %rax
cmpl $0x0, 0x2096c(%rax)
jne 0x2cd4a
movq -0x8(%rbp), %rax
movq 0xb10(%rax), %rax
andq $0x400000, %rax # imm = 0x400000
cmpq $0x0, %rax
je 0x2cd37
movq 0x2922cb(%rip), %rax # 0x2befe0
movq (%rax), %rdi
leaq 0xc57949(%rip), %rax # 0xc84668
movq (%rax), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rcx
leaq 0x125b80(%rip), %rsi # 0x1528b0
movb $0x0, %al
callq 0x2a160
movq -0x8(%rbp), %rax
movl 0x20968(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x20968(%rax)
movq -0x8(%rbp), %rax
movl 0x2096c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x2096c(%rax)
leaq -0x30(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq 0x292258(%rip), %rax # 0x2befe0
movq (%rax), %rdi
leaq 0xc578d6(%rip), %rax # 0xc84668
movq (%rax), %rdx
leaq 0x125b34(%rip), %rsi # 0x1528d0
movb $0x0, %al
callq 0x2a160
movq 0x292236(%rip), %rax # 0x2befe0
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x2a7c0
movq 0x29221f(%rip), %rax # 0x2befe0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x2a670
movq 0x29220b(%rip), %rax # 0x2befe0
movq (%rax), %rdi
callq 0x2a3d0
leaq -0x30(%rbp), %rax
jmp 0x2cde3
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
|
_ma_check_print_error:
push rbp
mov rbp, rsp
sub rsp, 0E0h
test al, al
jz short loc_2CCA8
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_2CCA8:
mov [rbp+var_B8], r9
mov [rbp+var_C0], r8
mov [rbp+var_C8], rcx
mov [rbp+var_D0], rdx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_2CCCE:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, [rbp+var_8]
cmp byte ptr [rax+209A2h], 0
jnz short loc_2CD4A
mov rax, [rbp+var_8]
cmp dword ptr [rax+2096Ch], 0
jnz short loc_2CD4A
mov rax, [rbp+var_8]
mov rax, [rax+0B10h]
and rax, 400000h
cmp rax, 0
jz short loc_2CD37
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rax, my_progname_short
mov rdx, [rax]
mov rax, [rbp+var_8]
mov rcx, [rax]
lea rsi, aSAriaFileS; "%s: Aria file %s\n"
mov al, 0
call _fprintf
loc_2CD37:
mov rax, [rbp+var_8]
mov ecx, [rax+20968h]
or ecx, 4
mov [rax+20968h], ecx
loc_2CD4A:
mov rax, [rbp+var_8]
mov ecx, [rax+2096Ch]
add ecx, 1
mov [rax+2096Ch], ecx
lea rax, [rbp+var_30]
lea rcx, [rbp+var_E0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rax, my_progname_short
mov rdx, [rax]
lea rsi, aSError; "%s: error: "
mov al, 0
call _fprintf
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_30]
call _vfprintf
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov edi, 0Ah
call _fputc
mov rax, cs:stderr_ptr
mov rdi, [rax]
call _fflush
lea rax, [rbp+var_30]
jmp short $+2
loc_2CDE3:
add rsp, 0E0h
pop rbp
retn
|
_DWORD * ma_check_print_error(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-E0h] BYREF
long long v17; // [rsp+10h] [rbp-D0h]
long long v18; // [rsp+18h] [rbp-C8h]
long long v19; // [rsp+20h] [rbp-C0h]
long long v20; // [rsp+28h] [rbp-B8h]
__m128 v21; // [rsp+30h] [rbp-B0h]
__m128 v22; // [rsp+40h] [rbp-A0h]
__m128 v23; // [rsp+50h] [rbp-90h]
__m128 v24; // [rsp+60h] [rbp-80h]
__m128 v25; // [rsp+70h] [rbp-70h]
__m128 v26; // [rsp+80h] [rbp-60h]
__m128 v27; // [rsp+90h] [rbp-50h]
__m128 v28; // [rsp+A0h] [rbp-40h]
_DWORD v29[2]; // [rsp+B0h] [rbp-30h] BYREF
char *v30; // [rsp+B8h] [rbp-28h]
char *v31; // [rsp+C0h] [rbp-20h]
long long v32; // [rsp+D0h] [rbp-10h]
long long v33; // [rsp+D8h] [rbp-8h]
v21 = a7;
v22 = a8;
v23 = a9;
v24 = a10;
v25 = a11;
v26 = a12;
v27 = a13;
v28 = a14;
v20 = a6;
v19 = a5;
v18 = a4;
v17 = a3;
v33 = a1;
v32 = a2;
fflush(stdout);
if ( !*(_BYTE *)(a1 + 133538) && !*(_DWORD *)(v33 + 133484) )
{
if ( (*(_QWORD *)(v33 + 2832) & 0x400000LL) != 0 )
fprintf(stderr, "%s: Aria file %s\n", my_progname_short, *(const char **)v33);
*(_DWORD *)(v33 + 133480) |= 4u;
}
++*(_DWORD *)(v33 + 133484);
v31 = &v16;
v30 = &a15;
v29[1] = 48;
v29[0] = 16;
fprintf(stderr, "%s: error: ", my_progname_short);
vfprintf(stderr, v32, v29);
fputc(10LL, stderr);
fflush(stderr);
return v29;
}
|
_ma_check_print_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
TEST AL,AL
JZ 0x0012cca8
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_0012cca8:
MOV qword ptr [RBP + -0xb8],R9
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xd0],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x0012ccce
LAB_0012ccce:
MOV RAX,qword ptr [0x003befd8]
MOV RDI,qword ptr [RAX]
CALL 0x0012a3d0
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x209a2],0x0
JNZ 0x0012cd4a
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x2096c],0x0
JNZ 0x0012cd4a
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb10]
AND RAX,0x400000
CMP RAX,0x0
JZ 0x0012cd37
MOV RAX,qword ptr [0x003befe0]
MOV RDI,qword ptr [RAX]
LEA RAX,[0xd84668]
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
LEA RSI,[0x2528b0]
MOV AL,0x0
CALL 0x0012a160
LAB_0012cd37:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x20968]
OR ECX,0x4
MOV dword ptr [RAX + 0x20968],ECX
LAB_0012cd4a:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x2096c]
ADD ECX,0x1
MOV dword ptr [RAX + 0x2096c],ECX
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0xe0]
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],0x10
MOV RAX,qword ptr [0x003befe0]
MOV RDI,qword ptr [RAX]
LEA RAX,[0xd84668]
MOV RDX,qword ptr [RAX]
LEA RSI,[0x2528d0]
MOV AL,0x0
CALL 0x0012a160
MOV RAX,qword ptr [0x003befe0]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x30]
CALL 0x0012a7c0
MOV RAX,qword ptr [0x003befe0]
MOV RSI,qword ptr [RAX]
MOV EDI,0xa
CALL 0x0012a670
MOV RAX,qword ptr [0x003befe0]
MOV RDI,qword ptr [RAX]
CALL 0x0012a3d0
LEA RAX,[RBP + -0x30]
JMP 0x0012cde3
LAB_0012cde3:
ADD RSP,0xe0
POP RBP
RET
|
int4 *
_ma_check_print_error
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 *param_9,char *param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int1 local_e8 [16];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int4 local_38;
int4 local_34;
int1 *local_30;
int1 *local_28;
char *local_18;
int8 *local_10;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
local_18 = param_10;
local_10 = param_9;
fflush(*(FILE **)PTR_stdout_003befd8);
if ((*(char *)((long)local_10 + 0x209a2) == '\0') && (*(int *)((long)local_10 + 0x2096c) == 0)) {
if ((local_10[0x162] & 0x400000) != 0) {
fprintf(*(FILE **)PTR_stderr_003befe0,"%s: Aria file %s\n",my_progname_short,*local_10);
}
*(uint *)(local_10 + 0x412d) = *(uint *)(local_10 + 0x412d) | 4;
}
*(int *)((long)local_10 + 0x2096c) = *(int *)((long)local_10 + 0x2096c) + 1;
local_28 = local_e8;
local_30 = &stack0x00000008;
local_34 = 0x30;
local_38 = 0x10;
fprintf(*(FILE **)PTR_stderr_003befe0,"%s: error: ",my_progname_short);
vfprintf(*(FILE **)PTR_stderr_003befe0,local_18,&local_38);
fputc(10,*(FILE **)PTR_stderr_003befe0);
fflush(*(FILE **)PTR_stderr_003befe0);
return &local_38;
}
|
|
59,814
|
my_xml_leave
|
eloqsql/strings/xml.c
|
static int my_xml_leave(MY_XML_PARSER *p, const char *str, size_t slen)
{
char *e, *tag;
size_t glen;
char s[32];
char g[32];
int rc;
/* Find previous '/' or beginning */
for (e= p->attr.end; (e > p->attr.start) && (e[0] != '/') ; e--);
glen= (size_t) ((e[0] == '/') ? (p->attr.end - e - 1) : p->attr.end - e);
tag= e[0] == '/' ? e + 1 : e;
if (str && (slen != glen || memcmp(str, tag, slen)))
{
mstr(s,str,sizeof(s)-1,slen);
if (glen)
{
mstr(g, tag, sizeof(g)-1, glen);
sprintf(p->errstr,"'</%s>' unexpected ('</%s>' wanted)",s,g);
}
else
sprintf(p->errstr,"'</%s>' unexpected (END-OF-INPUT wanted)", s);
return MY_XML_ERROR;
}
if (p->flags & MY_XML_FLAG_RELATIVE_NAMES)
rc= p->leave_xml ? p->leave_xml(p, str, slen) : MY_XML_OK;
else
rc= (p->leave_xml ?
p->leave_xml(p, p->attr.start, p->attr.end - p->attr.start) :
MY_XML_OK);
*e='\0';
p->attr.end= e;
return rc;
}
|
O0
|
c
|
my_xml_leave:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x60(%rbp)
movq %rsi, -0x68(%rbp)
movq %rdx, -0x70(%rbp)
movq -0x60(%rbp), %rax
movq 0x120(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rcx
movq -0x60(%rbp), %rdx
xorl %eax, %eax
cmpq 0x118(%rdx), %rcx
movb %al, -0x8d(%rbp)
jbe 0xc7e1f
movq -0x78(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
setne %al
movb %al, -0x8d(%rbp)
movb -0x8d(%rbp), %al
testb $0x1, %al
jne 0xc7e2b
jmp 0xc7e3b
jmp 0xc7e2d
movq -0x78(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0xc7df3
movq -0x78(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xc7e66
movq -0x60(%rbp), %rax
movq 0x120(%rax), %rax
movq -0x78(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0xc7e7f
movq -0x60(%rbp), %rax
movq 0x120(%rax), %rax
movq -0x78(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x78(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xc7eaa
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0xc7eb5
movq -0x78(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0xc7f6d
movq -0x70(%rbp), %rax
cmpq -0x88(%rbp), %rax
jne 0xc7eee
movq -0x68(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x36ac0
cmpl $0x0, %eax
je 0xc7f6d
leaq -0x30(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rcx
movl $0x1f, %edx
callq 0xc8520
cmpq $0x0, -0x88(%rbp)
je 0xc7f47
leaq -0x50(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x88(%rbp), %rcx
movl $0x1f, %edx
callq 0xc8520
movq -0x60(%rbp), %rdi
addq $0x8, %rdi
leaq -0x30(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq 0x9cca(%rip), %rsi # 0xd1c08
movb $0x0, %al
callq 0x369c0
jmp 0xc7f61
movq -0x60(%rbp), %rdi
addq $0x8, %rdi
leaq -0x30(%rbp), %rdx
leaq 0x9cd2(%rip), %rsi # 0xd1c2c
movb $0x0, %al
callq 0x369c0
movl $0x1, -0x54(%rbp)
jmp 0xc8042
movq -0x60(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xc7fc2
movq -0x60(%rbp), %rax
cmpq $0x0, 0x158(%rax)
je 0xc7faa
movq -0x60(%rbp), %rax
movq 0x158(%rax), %rax
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq *%rax
movl %eax, -0xa4(%rbp)
jmp 0xc7fb4
xorl %eax, %eax
movl %eax, -0xa4(%rbp)
jmp 0xc7fb4
movl -0xa4(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0xc8023
movq -0x60(%rbp), %rax
cmpq $0x0, 0x158(%rax)
je 0xc800d
movq -0x60(%rbp), %rax
movq 0x158(%rax), %rax
movq -0x60(%rbp), %rdi
movq -0x60(%rbp), %rcx
movq 0x118(%rcx), %rsi
movq -0x60(%rbp), %rcx
movq 0x120(%rcx), %rdx
movq -0x60(%rbp), %rcx
movq 0x118(%rcx), %rcx
subq %rcx, %rdx
callq *%rax
movl %eax, -0xa8(%rbp)
jmp 0xc8017
xorl %eax, %eax
movl %eax, -0xa8(%rbp)
jmp 0xc8017
movl -0xa8(%rbp), %eax
movl %eax, -0x8c(%rbp)
movq -0x78(%rbp), %rax
movb $0x0, (%rax)
movq -0x78(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x120(%rax)
movl -0x8c(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0xac(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xc806c
movl -0xac(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
callq 0x362a0
nopw %cs:(%rax,%rax)
|
my_xml_leave:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_60], rdi
mov [rbp+var_68], rsi
mov [rbp+var_70], rdx
mov rax, [rbp+var_60]
mov rax, [rax+120h]
mov [rbp+var_78], rax
loc_C7DF3:
mov rcx, [rbp+var_78]
mov rdx, [rbp+var_60]
xor eax, eax
cmp rcx, [rdx+118h]
mov [rbp+var_8D], al
jbe short loc_C7E1F
mov rax, [rbp+var_78]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
setnz al
mov [rbp+var_8D], al
loc_C7E1F:
mov al, [rbp+var_8D]
test al, 1
jnz short loc_C7E2B
jmp short loc_C7E3B
loc_C7E2B:
jmp short $+2
loc_C7E2D:
mov rax, [rbp+var_78]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_78], rax
jmp short loc_C7DF3
loc_C7E3B:
mov rax, [rbp+var_78]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_C7E66
mov rax, [rbp+var_60]
mov rax, [rax+120h]
mov rcx, [rbp+var_78]
sub rax, rcx
sub rax, 1
mov [rbp+var_98], rax
jmp short loc_C7E7F
loc_C7E66:
mov rax, [rbp+var_60]
mov rax, [rax+120h]
mov rcx, [rbp+var_78]
sub rax, rcx
mov [rbp+var_98], rax
loc_C7E7F:
mov rax, [rbp+var_98]
mov [rbp+var_88], rax
mov rax, [rbp+var_78]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_C7EAA
mov rax, [rbp+var_78]
add rax, 1
mov [rbp+var_A0], rax
jmp short loc_C7EB5
loc_C7EAA:
mov rax, [rbp+var_78]
mov [rbp+var_A0], rax
loc_C7EB5:
mov rax, [rbp+var_A0]
mov [rbp+var_80], rax
cmp [rbp+var_68], 0
jz loc_C7F6D
mov rax, [rbp+var_70]
cmp rax, [rbp+var_88]
jnz short loc_C7EEE
mov rdi, [rbp+var_68]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_70]
call _memcmp
cmp eax, 0
jz short loc_C7F6D
loc_C7EEE:
lea rdi, [rbp+var_30]
mov rsi, [rbp+var_68]
mov rcx, [rbp+var_70]
mov edx, 1Fh
call mstr_0
cmp [rbp+var_88], 0
jz short loc_C7F47
lea rdi, [rbp+var_50]
mov rsi, [rbp+var_80]
mov rcx, [rbp+var_88]
mov edx, 1Fh
call mstr_0
mov rdi, [rbp+var_60]
add rdi, 8
lea rdx, [rbp+var_30]
lea rcx, [rbp+var_50]
lea rsi, aSUnexpectedSWa; "'</%s>' unexpected ('</%s>' wanted)"
mov al, 0
call _sprintf
jmp short loc_C7F61
loc_C7F47:
mov rdi, [rbp+var_60]
add rdi, 8
lea rdx, [rbp+var_30]
lea rsi, aSUnexpectedEnd; "'</%s>' unexpected (END-OF-INPUT wanted"...
mov al, 0
call _sprintf
loc_C7F61:
mov [rbp+var_54], 1
jmp loc_C8042
loc_C7F6D:
mov rax, [rbp+var_60]
mov eax, [rax]
and eax, 1
cmp eax, 0
jz short loc_C7FC2
mov rax, [rbp+var_60]
cmp qword ptr [rax+158h], 0
jz short loc_C7FAA
mov rax, [rbp+var_60]
mov rax, [rax+158h]
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_68]
mov rdx, [rbp+var_70]
call rax
mov [rbp+var_A4], eax
jmp short loc_C7FB4
loc_C7FAA:
xor eax, eax
mov [rbp+var_A4], eax
jmp short $+2
loc_C7FB4:
mov eax, [rbp+var_A4]
mov [rbp+var_8C], eax
jmp short loc_C8023
loc_C7FC2:
mov rax, [rbp+var_60]
cmp qword ptr [rax+158h], 0
jz short loc_C800D
mov rax, [rbp+var_60]
mov rax, [rax+158h]
mov rdi, [rbp+var_60]
mov rcx, [rbp+var_60]
mov rsi, [rcx+118h]
mov rcx, [rbp+var_60]
mov rdx, [rcx+120h]
mov rcx, [rbp+var_60]
mov rcx, [rcx+118h]
sub rdx, rcx
call rax
mov [rbp+var_A8], eax
jmp short loc_C8017
loc_C800D:
xor eax, eax
mov [rbp+var_A8], eax
jmp short $+2
loc_C8017:
mov eax, [rbp+var_A8]
mov [rbp+var_8C], eax
loc_C8023:
mov rax, [rbp+var_78]
mov byte ptr [rax], 0
mov rcx, [rbp+var_78]
mov rax, [rbp+var_60]
mov [rax+120h], rcx
mov eax, [rbp+var_8C]
mov [rbp+var_54], eax
loc_C8042:
mov eax, [rbp+var_54]
mov [rbp+var_AC], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_C806C
mov eax, [rbp+var_AC]
add rsp, 0B0h
pop rbp
retn
loc_C806C:
call ___stack_chk_fail
|
long long my_xml_leave(long long a1, long long a2, long long a3)
{
unsigned int v4; // [rsp+8h] [rbp-A8h]
unsigned int v5; // [rsp+Ch] [rbp-A4h]
_BYTE *v6; // [rsp+10h] [rbp-A0h]
long long v7; // [rsp+18h] [rbp-98h]
bool v8; // [rsp+23h] [rbp-8Dh]
unsigned int v9; // [rsp+24h] [rbp-8Ch]
_BYTE *i; // [rsp+38h] [rbp-78h]
char v13[32]; // [rsp+60h] [rbp-50h] BYREF
char v14[40]; // [rsp+80h] [rbp-30h] BYREF
unsigned long long v15; // [rsp+A8h] [rbp-8h]
v15 = __readfsqword(0x28u);
for ( i = *(_BYTE **)(a1 + 288); ; --i )
{
v8 = 0;
if ( (unsigned long long)i > *(_QWORD *)(a1 + 280) )
v8 = *i != 47;
if ( !v8 )
break;
}
if ( *i == 47 )
v7 = *(_QWORD *)(a1 + 288) - (_QWORD)i - 1LL;
else
v7 = *(_QWORD *)(a1 + 288) - (_QWORD)i;
if ( *i == 47 )
v6 = i + 1;
else
v6 = i;
if ( !a2 || a3 == v7 && !(unsigned int)memcmp(a2, v6, a3) )
{
if ( (*(_DWORD *)a1 & 1) != 0 )
{
if ( *(_QWORD *)(a1 + 344) )
v5 = (*(long long ( **)(long long, long long, long long))(a1 + 344))(a1, a2, a3);
else
v5 = 0;
v9 = v5;
}
else
{
if ( *(_QWORD *)(a1 + 344) )
v4 = (*(long long ( **)(long long, _QWORD, _QWORD))(a1 + 344))(
a1,
*(_QWORD *)(a1 + 280),
*(_QWORD *)(a1 + 288) - *(_QWORD *)(a1 + 280));
else
v4 = 0;
v9 = v4;
}
*i = 0;
*(_QWORD *)(a1 + 288) = i;
return v9;
}
else
{
mstr_0(v14, a2, 31LL, a3);
if ( v7 )
{
mstr_0(v13, v6, 31LL, v7);
sprintf(a1 + 8, "'</%s>' unexpected ('</%s>' wanted)", v14, v13);
}
else
{
sprintf(a1 + 8, "'</%s>' unexpected (END-OF-INPUT wanted)", v14);
}
return 1;
}
}
|
my_xml_leave:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x60],RDI
MOV qword ptr [RBP + -0x68],RSI
MOV qword ptr [RBP + -0x70],RDX
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x120]
MOV qword ptr [RBP + -0x78],RAX
LAB_001c7df3:
MOV RCX,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x60]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x118]
MOV byte ptr [RBP + -0x8d],AL
JBE 0x001c7e1f
MOV RAX,qword ptr [RBP + -0x78]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
SETNZ AL
MOV byte ptr [RBP + -0x8d],AL
LAB_001c7e1f:
MOV AL,byte ptr [RBP + -0x8d]
TEST AL,0x1
JNZ 0x001c7e2b
JMP 0x001c7e3b
LAB_001c7e2b:
JMP 0x001c7e2d
LAB_001c7e2d:
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x78],RAX
JMP 0x001c7df3
LAB_001c7e3b:
MOV RAX,qword ptr [RBP + -0x78]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001c7e66
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x120]
MOV RCX,qword ptr [RBP + -0x78]
SUB RAX,RCX
SUB RAX,0x1
MOV qword ptr [RBP + -0x98],RAX
JMP 0x001c7e7f
LAB_001c7e66:
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x120]
MOV RCX,qword ptr [RBP + -0x78]
SUB RAX,RCX
MOV qword ptr [RBP + -0x98],RAX
LAB_001c7e7f:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001c7eaa
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,0x1
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x001c7eb5
LAB_001c7eaa:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0xa0],RAX
LAB_001c7eb5:
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x80],RAX
CMP qword ptr [RBP + -0x68],0x0
JZ 0x001c7f6d
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x88]
JNZ 0x001c7eee
MOV RDI,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x70]
CALL 0x00136ac0
CMP EAX,0x0
JZ 0x001c7f6d
LAB_001c7eee:
LEA RDI,[RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x70]
MOV EDX,0x1f
CALL 0x001c8520
CMP qword ptr [RBP + -0x88],0x0
JZ 0x001c7f47
LEA RDI,[RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x80]
MOV RCX,qword ptr [RBP + -0x88]
MOV EDX,0x1f
CALL 0x001c8520
MOV RDI,qword ptr [RBP + -0x60]
ADD RDI,0x8
LEA RDX,[RBP + -0x30]
LEA RCX,[RBP + -0x50]
LEA RSI,[0x1d1c08]
MOV AL,0x0
CALL 0x001369c0
JMP 0x001c7f61
LAB_001c7f47:
MOV RDI,qword ptr [RBP + -0x60]
ADD RDI,0x8
LEA RDX,[RBP + -0x30]
LEA RSI,[0x1d1c2c]
MOV AL,0x0
CALL 0x001369c0
LAB_001c7f61:
MOV dword ptr [RBP + -0x54],0x1
JMP 0x001c8042
LAB_001c7f6d:
MOV RAX,qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RAX]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001c7fc2
MOV RAX,qword ptr [RBP + -0x60]
CMP qword ptr [RAX + 0x158],0x0
JZ 0x001c7faa
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x158]
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x70]
CALL RAX
MOV dword ptr [RBP + -0xa4],EAX
JMP 0x001c7fb4
LAB_001c7faa:
XOR EAX,EAX
MOV dword ptr [RBP + -0xa4],EAX
JMP 0x001c7fb4
LAB_001c7fb4:
MOV EAX,dword ptr [RBP + -0xa4]
MOV dword ptr [RBP + -0x8c],EAX
JMP 0x001c8023
LAB_001c7fc2:
MOV RAX,qword ptr [RBP + -0x60]
CMP qword ptr [RAX + 0x158],0x0
JZ 0x001c800d
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x158]
MOV RDI,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RCX + 0x118]
MOV RCX,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RCX + 0x120]
MOV RCX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RCX + 0x118]
SUB RDX,RCX
CALL RAX
MOV dword ptr [RBP + -0xa8],EAX
JMP 0x001c8017
LAB_001c800d:
XOR EAX,EAX
MOV dword ptr [RBP + -0xa8],EAX
JMP 0x001c8017
LAB_001c8017:
MOV EAX,dword ptr [RBP + -0xa8]
MOV dword ptr [RBP + -0x8c],EAX
LAB_001c8023:
MOV RAX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX],0x0
MOV RCX,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x120],RCX
MOV EAX,dword ptr [RBP + -0x8c]
MOV dword ptr [RBP + -0x54],EAX
LAB_001c8042:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0xac],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001c806c
MOV EAX,dword ptr [RBP + -0xac]
ADD RSP,0xb0
POP RBP
RET
LAB_001c806c:
CALL 0x001362a0
|
int4 my_xml_leave(uint *param_1,void *param_2,size_t param_3)
{
int iVar1;
long in_FS_OFFSET;
bool bVar2;
int4 local_b0;
int4 local_ac;
char *local_a8;
size_t local_a0;
int4 local_94;
char *local_80;
int4 local_5c;
int1 local_58 [32];
int1 local_38 [40];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_80 = *(char **)(param_1 + 0x48);
while( true ) {
bVar2 = false;
if (*(char **)(param_1 + 0x46) < local_80) {
bVar2 = *local_80 != '/';
}
if (!bVar2) break;
local_80 = local_80 + -1;
}
if (*local_80 == '/') {
local_a0 = (*(long *)(param_1 + 0x48) - (long)local_80) - 1;
}
else {
local_a0 = *(long *)(param_1 + 0x48) - (long)local_80;
}
if (*local_80 == '/') {
local_a8 = local_80 + 1;
}
else {
local_a8 = local_80;
}
if (param_2 == (void *)0x0) {
LAB_001c7f6d:
if ((*param_1 & 1) == 0) {
if (*(long *)(param_1 + 0x56) == 0) {
local_b0 = 0;
}
else {
local_b0 = (**(code **)(param_1 + 0x56))
(param_1,*(int8 *)(param_1 + 0x46),
*(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x46));
}
local_94 = local_b0;
}
else {
if (*(long *)(param_1 + 0x56) == 0) {
local_ac = 0;
}
else {
local_ac = (**(code **)(param_1 + 0x56))(param_1,param_2,param_3);
}
local_94 = local_ac;
}
*local_80 = '\0';
*(char **)(param_1 + 0x48) = local_80;
local_5c = local_94;
}
else {
if (param_3 == local_a0) {
iVar1 = memcmp(param_2,local_a8,param_3);
if (iVar1 == 0) goto LAB_001c7f6d;
}
mstr(local_38,param_2,0x1f,param_3);
if (local_a0 == 0) {
sprintf((char *)(param_1 + 2),"\'</%s>\' unexpected (END-OF-INPUT wanted)",local_38);
}
else {
mstr(local_58,local_a8,0x1f,local_a0);
sprintf((char *)(param_1 + 2),"\'</%s>\' unexpected (\'</%s>\' wanted)",local_38,local_58);
}
local_5c = 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_5c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
59,815
|
lunasvg::SVGFitToViewBox::viewBoxToViewTransform(lunasvg::Size const&) const
|
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
|
Transform SVGFitToViewBox::viewBoxToViewTransform(const Size& viewportSize) const
{
const auto& viewBoxRect = m_viewBox.value();
if(viewBoxRect.isEmpty() || viewportSize.isEmpty())
return Transform::Identity;
return m_preserveAspectRatio.getTransform(viewBoxRect, viewportSize);
}
|
O1
|
cpp
|
lunasvg::SVGFitToViewBox::viewBoxToViewTransform(lunasvg::Size const&) const:
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
ucomiss 0x14(%rsi), %xmm0
jae 0x10155
ucomiss 0x18(%rsi), %xmm0
jae 0x10155
movq %rdx, %rcx
ucomiss (%rdx), %xmm0
jae 0x10155
ucomiss 0x4(%rcx), %xmm0
jae 0x10155
leaq 0xc(%rsi), %rdx
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x203bc
jmp 0x1016a
leaq 0x4c20c(%rip), %rax # 0x5c368
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movups (%rax), %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
popq %rbx
retq
nop
|
_ZNK7lunasvg15SVGFitToViewBox22viewBoxToViewTransformERKNS_4SizeE:
push rbx
mov rbx, rdi
xorps xmm0, xmm0
ucomiss xmm0, dword ptr [rsi+14h]
jnb short loc_10155
ucomiss xmm0, dword ptr [rsi+18h]
jnb short loc_10155
mov rcx, rdx
ucomiss xmm0, dword ptr [rdx]
jnb short loc_10155
ucomiss xmm0, dword ptr [rcx+4]
jnb short loc_10155
lea rdx, [rsi+0Ch]
add rsi, 20h ; ' '
mov rdi, rbx; this
call _ZNK7lunasvg22SVGPreserveAspectRatio12getTransformERKNS_4RectERKNS_4SizeE; lunasvg::SVGPreserveAspectRatio::getTransform(lunasvg::Rect const&,lunasvg::Size const&)
jmp short loc_1016A
loc_10155:
lea rax, _ZN7lunasvg9Transform8IdentityE; lunasvg::Transform::Identity
mov rcx, [rax+10h]
mov [rbx+10h], rcx
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rbx], xmm0
loc_1016A:
mov rax, rbx
pop rbx
retn
|
lunasvg::Transform * lunasvg::SVGFitToViewBox::viewBoxToViewTransform(
lunasvg::Transform *this,
long long a2,
float *a3)
{
if ( *(float *)(a2 + 20) <= 0.0 || *(float *)(a2 + 24) <= 0.0 || *a3 <= 0.0 || a3[1] <= 0.0 )
{
*((_QWORD *)this + 2) = *((_QWORD *)&lunasvg::Transform::Identity + 2);
*(_OWORD *)this = lunasvg::Transform::Identity;
}
else
{
lunasvg::SVGPreserveAspectRatio::getTransform(this);
}
return this;
}
|
viewBoxToViewTransform:
PUSH RBX
MOV RBX,RDI
XORPS XMM0,XMM0
UCOMISS XMM0,dword ptr [RSI + 0x14]
JNC 0x00110155
UCOMISS XMM0,dword ptr [RSI + 0x18]
JNC 0x00110155
MOV RCX,RDX
UCOMISS XMM0,dword ptr [RDX]
JNC 0x00110155
UCOMISS XMM0,dword ptr [RCX + 0x4]
JNC 0x00110155
LEA RDX,[RSI + 0xc]
ADD RSI,0x20
MOV RDI,RBX
CALL 0x001203bc
JMP 0x0011016a
LAB_00110155:
LEA RAX,[0x15c368]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RBX + 0x10],RCX
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RBX],XMM0
LAB_0011016a:
MOV RAX,RBX
POP RBX
RET
|
/* lunasvg::SVGFitToViewBox::viewBoxToViewTransform(lunasvg::Size const&) const */
Size * lunasvg::SVGFitToViewBox::viewBoxToViewTransform(Size *param_1)
{
int8 uVar1;
float *in_RDX;
long in_RSI;
if ((((*(float *)(in_RSI + 0x14) <= 0.0) || (*(float *)(in_RSI + 0x18) <= 0.0)) ||
(*in_RDX <= 0.0)) || (in_RDX[1] <= 0.0)) {
*(int8 *)(param_1 + 0x10) = Transform::Identity._16_8_;
uVar1 = Transform::Identity._8_8_;
*(int8 *)param_1 = Transform::Identity._0_8_;
*(int8 *)(param_1 + 8) = uVar1;
}
else {
SVGPreserveAspectRatio::getTransform((Rect *)param_1,(Size *)(in_RSI + 0x20));
}
return param_1;
}
|
|
59,816
|
parser_parse_lambda
|
eshkol/src/frontend/parser/parser_lambda.c
|
AstNode* parser_parse_lambda(Parser* parser, size_t line, size_t column) {
// Parse the parameter list
if (!parser_match(parser, TOKEN_LPAREN)) {
parser_error(parser, "Expected '(' before parameter list");
return NULL;
}
// Create a new scope for the lambda
uint64_t lambda_scope_id = binding_system_enter_scope(parser->bindings);
if (lambda_scope_id == 0) {
parser_error(parser, "Failed to create scope for lambda");
return NULL;
}
size_t param_count = 0;
Parameter** params = arena_alloc(parser->arena, sizeof(Parameter*) * 16); // Arbitrary initial capacity
if (!params) {
parser_error(parser, "Failed to allocate memory for parameters");
binding_system_exit_scope(parser->bindings);
return NULL;
}
while (!parser_check(parser, TOKEN_RPAREN) && !parser_is_at_end(parser)) {
if (param_count >= 16) {
parser_error(parser, "Too many parameters");
binding_system_exit_scope(parser->bindings);
return NULL;
}
if (!parser_match(parser, TOKEN_IDENTIFIER)) {
parser_error(parser, "Expected parameter name");
binding_system_exit_scope(parser->bindings);
return NULL;
}
StringId param_name = parser->previous.value.string_id;
// Add the parameter to the binding system
uint64_t binding_id = binding_system_add_binding(parser->bindings, param_name, false);
if (binding_id == 0) {
parser_error(parser, "Failed to add binding for parameter");
binding_system_exit_scope(parser->bindings);
return NULL;
}
Parameter* param = parameter_create(parser->arena, param_name, NULL, parser->previous.line, parser->previous.column);
if (!param) {
parser_error(parser, "Failed to create parameter");
binding_system_exit_scope(parser->bindings);
return NULL;
}
params[param_count++] = param;
}
// Consume the closing parenthesis of the parameter list
parser_consume(parser, TOKEN_RPAREN, "Expected ')' after parameter list");
// Parse the function body
AstNode* body = NULL;
// Parse the body expressions
size_t body_expr_count = 0;
AstNode** body_exprs = arena_alloc(parser->arena, sizeof(AstNode*) * 16); // Arbitrary initial capacity
if (!body_exprs) {
parser_error(parser, "Failed to allocate memory for body expressions");
binding_system_exit_scope(parser->bindings);
return NULL;
}
while (!parser_check(parser, TOKEN_RPAREN) && !parser_is_at_end(parser)) {
if (body_expr_count >= 16) {
parser_error(parser, "Too many expressions in function body");
binding_system_exit_scope(parser->bindings);
return NULL;
}
AstNode* expr = parser_parse_expression(parser);
if (!expr) {
parser_error(parser, "Expected expression");
binding_system_exit_scope(parser->bindings);
return NULL;
}
body_exprs[body_expr_count++] = expr;
}
// Create a begin node for the body if there are multiple expressions
if (body_expr_count > 1) {
body = ast_create_begin(parser->arena, body_exprs, body_expr_count, line, column);
} else if (body_expr_count == 1) {
body = body_exprs[0];
} else {
parser_error(parser, "Expected at least one expression in function body");
binding_system_exit_scope(parser->bindings);
return NULL;
}
if (!body) {
parser_error(parser, "Failed to create function body");
binding_system_exit_scope(parser->bindings);
return NULL;
}
// Consume the closing parenthesis of the lambda form
parser_consume(parser, TOKEN_RPAREN, "Expected ')' after lambda");
// Exit the lambda scope
binding_system_exit_scope(parser->bindings);
// Create a lambda node
AstNode* lambda = ast_create_lambda(parser->arena, params, param_count, NULL, body, line, column);
if (!lambda) {
parser_error(parser, "Failed to create lambda node");
return NULL;
}
// Set the scope ID in the lambda node
lambda->scope_id = lambda_scope_id;
return lambda;
}
|
O3
|
c
|
parser_parse_lambda:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movl $0x1, %esi
callq 0x60f7
testb %al, %al
je 0x6e8f
movq 0x88(%rbx), %rdi
callq 0x7da0
testq %rax, %rax
je 0x6e98
movq %rax, -0x40(%rbp)
movq (%rbx), %rdi
movl $0x80, %esi
callq 0x32ff
testq %rax, %rax
je 0x6ef6
movq %rax, %r13
movq %r14, -0x38(%rbp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x60d5
xorl %r14d, %r14d
testb %al, %al
jne 0x6eac
movq %rbx, %rdi
callq 0x60ea
testb %al, %al
jne 0x6eac
cmpq $0x10, %r14
je 0x6f70
movq %rbx, %rdi
movl $0xb, %esi
callq 0x60f7
testb %al, %al
je 0x6f7c
movq 0x78(%rbx), %r15
movq 0x88(%rbx), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x8158
testq %rax, %rax
je 0x6f88
movq (%rbx), %rdi
movq 0x68(%rbx), %rcx
movq 0x70(%rbx), %r8
movq %r15, %rsi
xorl %edx, %edx
callq 0x7c78
testq %rax, %rax
je 0x6f94
movq %rax, (%r13,%r14,8)
incq %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x60d5
jmp 0x6e02
leaq 0x55d4(%rip), %rsi # 0xc46a
jmp 0x6e9f
leaq 0x55ee(%rip), %rsi # 0xc48d
movq %rbx, %rdi
callq 0x63dc
jmp 0x702e
movq %r12, -0x30(%rbp)
leaq 0x548f(%rip), %rdx # 0xc346
movq %rbx, %rdi
movl $0x2, %esi
callq 0x616f
movq (%rbx), %rdi
movl $0x80, %esi
callq 0x32ff
testq %rax, %rax
je 0x6f02
movq %rax, %r12
movq %rbx, %rdi
movl $0x2, %esi
callq 0x60d5
testb %al, %al
je 0x6f0e
leaq 0x54cc(%rip), %rsi # 0xc3bd
jmp 0x701a
leaq 0x53d9(%rip), %rsi # 0xc2d6
jmp 0x701a
leaq 0x545f(%rip), %rsi # 0xc368
jmp 0x701a
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x60ea
testb %al, %al
jne 0x6f4c
cmpq $0x10, %r15
je 0x6f9d
movq %rbx, %rdi
callq 0x6444
testq %rax, %rax
je 0x700a
movq %rax, (%r12,%r15,8)
incq %r15
movq %rbx, %rdi
movl $0x2, %esi
callq 0x60d5
testb %al, %al
je 0x6f11
cmpq $0x2, %r15
jb 0x6fa6
movq (%rbx), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq -0x30(%rbp), %r12
movq %r12, %rcx
movq -0x38(%rbp), %r8
callq 0x893b
movq %rax, %r15
jmp 0x6fb8
leaq 0x5388(%rip), %rsi # 0xc2ff
jmp 0x701a
leaq 0x5390(%rip), %rsi # 0xc313
jmp 0x701a
leaq 0x5520(%rip), %rsi # 0xc4af
jmp 0x701a
leaq 0x5390(%rip), %rsi # 0xc32b
jmp 0x701a
leaq 0x53f3(%rip), %rsi # 0xc397
jmp 0x701a
cmpq $0x1, %r15
jne 0x6eea
movq (%r12), %r15
movq -0x30(%rbp), %r12
testq %r15, %r15
je 0x7013
leaq 0x550f(%rip), %rdx # 0xc4d3
movq %rbx, %rdi
movl $0x2, %esi
callq 0x616f
movq 0x88(%rbx), %rdi
callq 0x7fd2
movq (%rbx), %rdi
movq -0x38(%rbp), %rax
movq %rax, (%rsp)
movq %r13, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %r15, %r8
movq %r12, %r9
callq 0x88b6
testq %rax, %rax
je 0x703f
movq -0x40(%rbp), %rcx
movq %rcx, 0x30(%rax)
jmp 0x7030
leaq 0x51e8(%rip), %rsi # 0xc1f9
jmp 0x701a
leaq 0x53d5(%rip), %rsi # 0xc3ef
movq %rbx, %rdi
callq 0x63dc
movq 0x88(%rbx), %rdi
callq 0x7fd2
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x54a7(%rip), %rsi # 0xc4ed
jmp 0x6e9f
nop
|
parser_parse_lambda:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rdx
mov r12, rsi
mov rbx, rdi
mov esi, 1
call parser_match
test al, al
jz loc_6E8F
mov rdi, [rbx+88h]
call binding_system_enter_scope
test rax, rax
jz loc_6E98
mov [rbp+var_40], rax
mov rdi, [rbx]
mov esi, 80h
call arena_alloc
test rax, rax
jz loc_6EF6
mov r13, rax
mov [rbp+var_38], r14
mov rdi, rbx
mov esi, 2
call parser_check
xor r14d, r14d
loc_6E02:
test al, al
jnz loc_6EAC
mov rdi, rbx
call parser_is_at_end
test al, al
jnz loc_6EAC
cmp r14, 10h
jz loc_6F70
mov rdi, rbx
mov esi, 0Bh
call parser_match
test al, al
jz loc_6F7C
mov r15, [rbx+78h]
mov rdi, [rbx+88h]
mov rsi, r15
xor edx, edx
call binding_system_add_binding
test rax, rax
jz loc_6F88
mov rdi, [rbx]
mov rcx, [rbx+68h]
mov r8, [rbx+70h]
mov rsi, r15
xor edx, edx
call parameter_create
test rax, rax
jz loc_6F94
mov [r13+r14*8+0], rax
inc r14
mov rdi, rbx
mov esi, 2
call parser_check
jmp loc_6E02
loc_6E8F:
lea rsi, aExpectedBefore; "Expected '(' before parameter list"
jmp short loc_6E9F
loc_6E98:
lea rsi, aFailedToCreate_3; "Failed to create scope for lambda"
loc_6E9F:
mov rdi, rbx
call parser_error
jmp loc_702E
loc_6EAC:
mov [rbp+var_30], r12
lea rdx, aExpectedAfterP; "Expected ')' after parameter list"
mov rdi, rbx
mov esi, 2
call parser_consume
mov rdi, [rbx]
mov esi, 80h
call arena_alloc
test rax, rax
jz short loc_6F02
mov r12, rax
mov rdi, rbx
mov esi, 2
call parser_check
test al, al
jz short loc_6F0E
loc_6EEA:
lea rsi, aExpectedAtLeas; "Expected at least one expression in fun"...
jmp loc_701A
loc_6EF6:
lea rsi, aFailedToAlloca_0; "Failed to allocate memory for parameter"...
jmp loc_701A
loc_6F02:
lea rsi, aFailedToAlloca_1; "Failed to allocate memory for body expr"...
jmp loc_701A
loc_6F0E:
xor r15d, r15d
loc_6F11:
mov rdi, rbx
call parser_is_at_end
test al, al
jnz short loc_6F4C
cmp r15, 10h
jz short loc_6F9D
mov rdi, rbx
call parser_parse_expression
test rax, rax
jz loc_700A
mov [r12+r15*8], rax
inc r15
mov rdi, rbx
mov esi, 2
call parser_check
test al, al
jz short loc_6F11
loc_6F4C:
cmp r15, 2
jb short loc_6FA6
mov rdi, [rbx]
mov rsi, r12
mov rdx, r15
mov r12, [rbp+var_30]
mov rcx, r12
mov r8, [rbp+var_38]
call ast_create_begin
mov r15, rax
jmp short loc_6FB8
loc_6F70:
lea rsi, aTooManyParamet; "Too many parameters"
jmp loc_701A
loc_6F7C:
lea rsi, aExpectedParame; "Expected parameter name"
jmp loc_701A
loc_6F88:
lea rsi, aFailedToAddBin_0; "Failed to add binding for parameter"
jmp loc_701A
loc_6F94:
lea rsi, aFailedToCreate_1; "Failed to create parameter"
jmp short loc_701A
loc_6F9D:
lea rsi, aTooManyExpress; "Too many expressions in function body"
jmp short loc_701A
loc_6FA6:
cmp r15, 1
jnz loc_6EEA
mov r15, [r12]
mov r12, [rbp+var_30]
loc_6FB8:
test r15, r15
jz short loc_7013
lea rdx, aExpectedAfterL; "Expected ')' after lambda"
mov rdi, rbx
mov esi, 2
call parser_consume
mov rdi, [rbx+88h]
call binding_system_exit_scope
mov rdi, [rbx]
mov rax, [rbp+var_38]
mov [rsp+50h+var_50], rax
mov rsi, r13
mov rdx, r14
xor ecx, ecx
mov r8, r15
mov r9, r12
call ast_create_lambda
test rax, rax
jz short loc_703F
mov rcx, [rbp+var_40]
mov [rax+30h], rcx
jmp short loc_7030
loc_700A:
lea rsi, aExpectedExpres; "Expected expression"
jmp short loc_701A
loc_7013:
lea rsi, aFailedToCreate_2; "Failed to create function body"
loc_701A:
mov rdi, rbx
call parser_error
mov rdi, [rbx+88h]
call binding_system_exit_scope
loc_702E:
xor eax, eax
loc_7030:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_703F:
lea rsi, aFailedToCreate_4; "Failed to create lambda node"
jmp loc_6E9F
|
long long parser_parse_lambda(long long *a1, long long a2, long long a3)
{
long long v4; // rdx
long long v5; // rcx
long long v6; // r8
long long v7; // r9
long long v8; // rax
long long v9; // rax
long long v10; // rdx
long long v11; // rcx
long long v12; // r8
long long v13; // r9
long long v14; // r13
bool v15; // al
long long v16; // r14
long long v17; // r15
long long v18; // rax
const char *v19; // rsi
long long v20; // rax
long long *v21; // r12
const char *v22; // rsi
unsigned long long v23; // r15
long long v24; // rax
long long *v25; // rsi
int v26; // r12d
long long begin; // r15
long long result; // rax
long long v29; // [rsp+10h] [rbp-40h]
long long v30; // [rsp+18h] [rbp-38h]
if ( (unsigned __int8)parser_match((long long)a1, 1) )
{
v8 = binding_system_enter_scope(a1[17]);
if ( v8 )
{
v29 = v8;
v9 = arena_alloc(*a1, 128LL);
if ( v9 )
{
v14 = v9;
v30 = a3;
v15 = parser_check((long long)a1, 2);
v16 = 0LL;
while ( !v15 && !parser_is_at_end((long long)a1) )
{
if ( v16 == 16 )
{
v22 = "Too many parameters";
goto LABEL_39;
}
if ( !(unsigned __int8)parser_match((long long)a1, 11) )
{
v22 = "Expected parameter name";
goto LABEL_39;
}
v17 = a1[15];
if ( !binding_system_add_binding(a1[17], v17, 0LL) )
{
v22 = "Failed to add binding for parameter";
goto LABEL_39;
}
v18 = parameter_create(*a1, v17, 0LL, a1[13], a1[14]);
if ( !v18 )
{
v22 = "Failed to create parameter";
goto LABEL_39;
}
*(_QWORD *)(v14 + 8 * v16++) = v18;
v15 = parser_check((long long)a1, 2);
}
parser_consume((long long)a1, 2, (long long)"Expected ')' after parameter list");
v20 = arena_alloc(*a1, 128LL);
if ( !v20 )
{
v22 = "Failed to allocate memory for body expressions";
goto LABEL_39;
}
v21 = (long long *)v20;
if ( parser_check((long long)a1, 2) )
{
LABEL_17:
v22 = "Expected at least one expression in function body";
goto LABEL_39;
}
v23 = 0LL;
do
{
if ( parser_is_at_end((long long)a1) )
break;
if ( v23 == 16 )
{
v22 = "Too many expressions in function body";
goto LABEL_39;
}
v24 = parser_parse_expression((long long)a1);
if ( !v24 )
{
v22 = "Expected expression";
goto LABEL_39;
}
v21[v23++] = v24;
}
while ( !parser_check((long long)a1, 2) );
if ( v23 < 2 )
{
if ( v23 != 1 )
goto LABEL_17;
begin = *v21;
v26 = a2;
}
else
{
v25 = v21;
v26 = a2;
begin = ast_create_begin(*a1, v25, v23, a2, v30);
}
if ( begin )
{
parser_consume((long long)a1, 2, (long long)"Expected ')' after lambda");
binding_system_exit_scope(a1[17]);
result = ast_create_lambda(*a1, v14, v16, 0, begin, v26, v30);
if ( result )
{
*(_QWORD *)(result + 48) = v29;
return result;
}
v19 = "Failed to create lambda node";
goto LABEL_14;
}
v22 = "Failed to create function body";
}
else
{
v22 = "Failed to allocate memory for parameters";
}
LABEL_39:
parser_error((long long)a1, (long long)v22, v10, v11, v12, v13);
binding_system_exit_scope(a1[17]);
return 0LL;
}
v19 = "Failed to create scope for lambda";
}
else
{
v19 = "Expected '(' before parameter list";
}
LABEL_14:
parser_error((long long)a1, (long long)v19, v4, v5, v6, v7);
return 0LL;
}
|
parser_parse_lambda:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RDX
MOV R12,RSI
MOV RBX,RDI
MOV ESI,0x1
CALL 0x001060f7
TEST AL,AL
JZ 0x00106e8f
MOV RDI,qword ptr [RBX + 0x88]
CALL 0x00107da0
TEST RAX,RAX
JZ 0x00106e98
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBX]
MOV ESI,0x80
CALL 0x001032ff
TEST RAX,RAX
JZ 0x00106ef6
MOV R13,RAX
MOV qword ptr [RBP + -0x38],R14
MOV RDI,RBX
MOV ESI,0x2
CALL 0x001060d5
XOR R14D,R14D
LAB_00106e02:
TEST AL,AL
JNZ 0x00106eac
MOV RDI,RBX
CALL 0x001060ea
TEST AL,AL
JNZ 0x00106eac
CMP R14,0x10
JZ 0x00106f70
MOV RDI,RBX
MOV ESI,0xb
CALL 0x001060f7
TEST AL,AL
JZ 0x00106f7c
MOV R15,qword ptr [RBX + 0x78]
MOV RDI,qword ptr [RBX + 0x88]
MOV RSI,R15
XOR EDX,EDX
CALL 0x00108158
TEST RAX,RAX
JZ 0x00106f88
MOV RDI,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x68]
MOV R8,qword ptr [RBX + 0x70]
MOV RSI,R15
XOR EDX,EDX
CALL 0x00107c78
TEST RAX,RAX
JZ 0x00106f94
MOV qword ptr [R13 + R14*0x8],RAX
INC R14
MOV RDI,RBX
MOV ESI,0x2
CALL 0x001060d5
JMP 0x00106e02
LAB_00106e8f:
LEA RSI,[0x10c46a]
JMP 0x00106e9f
LAB_00106e98:
LEA RSI,[0x10c48d]
LAB_00106e9f:
MOV RDI,RBX
CALL 0x001063dc
JMP 0x0010702e
LAB_00106eac:
MOV qword ptr [RBP + -0x30],R12
LEA RDX,[0x10c346]
MOV RDI,RBX
MOV ESI,0x2
CALL 0x0010616f
MOV RDI,qword ptr [RBX]
MOV ESI,0x80
CALL 0x001032ff
TEST RAX,RAX
JZ 0x00106f02
MOV R12,RAX
MOV RDI,RBX
MOV ESI,0x2
CALL 0x001060d5
TEST AL,AL
JZ 0x00106f0e
LAB_00106eea:
LEA RSI,[0x10c3bd]
JMP 0x0010701a
LAB_00106ef6:
LEA RSI,[0x10c2d6]
JMP 0x0010701a
LAB_00106f02:
LEA RSI,[0x10c368]
JMP 0x0010701a
LAB_00106f0e:
XOR R15D,R15D
LAB_00106f11:
MOV RDI,RBX
CALL 0x001060ea
TEST AL,AL
JNZ 0x00106f4c
CMP R15,0x10
JZ 0x00106f9d
MOV RDI,RBX
CALL 0x00106444
TEST RAX,RAX
JZ 0x0010700a
MOV qword ptr [R12 + R15*0x8],RAX
INC R15
MOV RDI,RBX
MOV ESI,0x2
CALL 0x001060d5
TEST AL,AL
JZ 0x00106f11
LAB_00106f4c:
CMP R15,0x2
JC 0x00106fa6
MOV RDI,qword ptr [RBX]
MOV RSI,R12
MOV RDX,R15
MOV R12,qword ptr [RBP + -0x30]
MOV RCX,R12
MOV R8,qword ptr [RBP + -0x38]
CALL 0x0010893b
MOV R15,RAX
JMP 0x00106fb8
LAB_00106f70:
LEA RSI,[0x10c2ff]
JMP 0x0010701a
LAB_00106f7c:
LEA RSI,[0x10c313]
JMP 0x0010701a
LAB_00106f88:
LEA RSI,[0x10c4af]
JMP 0x0010701a
LAB_00106f94:
LEA RSI,[0x10c32b]
JMP 0x0010701a
LAB_00106f9d:
LEA RSI,[0x10c397]
JMP 0x0010701a
LAB_00106fa6:
CMP R15,0x1
JNZ 0x00106eea
MOV R15,qword ptr [R12]
MOV R12,qword ptr [RBP + -0x30]
LAB_00106fb8:
TEST R15,R15
JZ 0x00107013
LEA RDX,[0x10c4d3]
MOV RDI,RBX
MOV ESI,0x2
CALL 0x0010616f
MOV RDI,qword ptr [RBX + 0x88]
CALL 0x00107fd2
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RSP],RAX
MOV RSI,R13
MOV RDX,R14
XOR ECX,ECX
MOV R8,R15
MOV R9,R12
CALL 0x001088b6
TEST RAX,RAX
JZ 0x0010703f
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x30],RCX
JMP 0x00107030
LAB_0010700a:
LEA RSI,[0x10c1f9]
JMP 0x0010701a
LAB_00107013:
LEA RSI,[0x10c3ef]
LAB_0010701a:
MOV RDI,RBX
CALL 0x001063dc
MOV RDI,qword ptr [RBX + 0x88]
CALL 0x00107fd2
LAB_0010702e:
XOR EAX,EAX
LAB_00107030:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0010703f:
LEA RSI,[0x10c4ed]
JMP 0x00106e9f
|
long parser_parse_lambda(int8 *param_1,int8 param_2,int8 param_3)
{
int8 uVar1;
char cVar2;
long lVar3;
long lVar4;
long lVar5;
long *plVar6;
char *pcVar7;
long lVar8;
ulong uVar9;
cVar2 = parser_match(param_1,1);
if (cVar2 == '\0') {
pcVar7 = "Expected \'(\' before parameter list";
goto LAB_00106e9f;
}
lVar3 = binding_system_enter_scope(param_1[0x11]);
if (lVar3 == 0) {
pcVar7 = "Failed to create scope for lambda";
goto LAB_00106e9f;
}
lVar4 = arena_alloc(*param_1,0x80);
if (lVar4 == 0) {
pcVar7 = "Failed to allocate memory for parameters";
goto LAB_0010701a;
}
cVar2 = parser_check(param_1,2);
lVar8 = 0;
while ((cVar2 == '\0' && (cVar2 = parser_is_at_end(param_1), cVar2 == '\0'))) {
if (lVar8 == 0x10) {
pcVar7 = "Too many parameters";
goto LAB_0010701a;
}
cVar2 = parser_match(param_1,0xb);
if (cVar2 == '\0') {
pcVar7 = "Expected parameter name";
goto LAB_0010701a;
}
uVar1 = param_1[0xf];
lVar5 = binding_system_add_binding(param_1[0x11],uVar1,0);
if (lVar5 == 0) {
pcVar7 = "Failed to add binding for parameter";
goto LAB_0010701a;
}
lVar5 = parameter_create(*param_1,uVar1,0,param_1[0xd],param_1[0xe]);
if (lVar5 == 0) {
pcVar7 = "Failed to create parameter";
goto LAB_0010701a;
}
*(long *)(lVar4 + lVar8 * 8) = lVar5;
lVar8 = lVar8 + 1;
cVar2 = parser_check(param_1,2);
}
parser_consume(param_1,2,"Expected \')\' after parameter list");
plVar6 = (long *)arena_alloc(*param_1,0x80);
if (plVar6 == (long *)0x0) {
pcVar7 = "Failed to allocate memory for body expressions";
goto LAB_0010701a;
}
cVar2 = parser_check(param_1,2);
if (cVar2 == '\0') {
uVar9 = 0;
do {
cVar2 = parser_is_at_end(param_1);
if (cVar2 != '\0') break;
if (uVar9 == 0x10) {
pcVar7 = "Too many expressions in function body";
goto LAB_0010701a;
}
lVar5 = parser_parse_expression(param_1);
if (lVar5 == 0) {
pcVar7 = "Expected expression";
goto LAB_0010701a;
}
plVar6[uVar9] = lVar5;
uVar9 = uVar9 + 1;
cVar2 = parser_check(param_1,2);
} while (cVar2 == '\0');
if (uVar9 < 2) {
if (uVar9 != 1) goto LAB_00106eea;
lVar5 = *plVar6;
}
else {
lVar5 = ast_create_begin(*param_1,plVar6,uVar9,param_2,param_3);
}
if (lVar5 != 0) {
parser_consume(param_1,2,"Expected \')\' after lambda");
binding_system_exit_scope(param_1[0x11]);
lVar4 = ast_create_lambda(*param_1,lVar4,lVar8,0,lVar5,param_2,param_3);
if (lVar4 != 0) {
*(long *)(lVar4 + 0x30) = lVar3;
return lVar4;
}
pcVar7 = "Failed to create lambda node";
LAB_00106e9f:
parser_error(param_1,pcVar7);
return 0;
}
pcVar7 = "Failed to create function body";
}
else {
LAB_00106eea:
pcVar7 = "Expected at least one expression in function body";
}
LAB_0010701a:
parser_error(param_1,pcVar7);
binding_system_exit_scope(param_1[0x11]);
return 0;
}
|
|
59,817
|
minja::ForNode::ForNode(minja::Location 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>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&)
|
llama.cpp/common/minja/minja.hpp
|
ForNode(const Location & loc, std::vector<std::string> && var_names, std::shared_ptr<Expression> && iterable,
std::shared_ptr<Expression> && condition, std::shared_ptr<TemplateNode> && body, bool recursive, std::shared_ptr<TemplateNode> && else_body)
: TemplateNode(loc), var_names(var_names), iterable(std::move(iterable)), condition(std::move(condition)), body(std::move(body)), recursive(recursive), else_body(std::move(else_body)) {}
|
O3
|
cpp
|
minja::ForNode::ForNode(minja::Location 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>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdi, %rbx
leaq 0x5954a(%rip), %rbp # 0xff550
addq $0x10, %rbp
movq %rbp, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0xa6036
movq 0x59f68(%rip), %rcx # 0xfff90
cmpb $0x0, (%rcx)
je 0xa6032
incl 0x8(%rax)
jmp 0xa6036
lock
incl 0x8(%rax)
leaq 0x10(%rbx), %r13
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x5957f(%rip), %rax # 0xff5c8
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
movq %rdx, %rsi
callq 0x393c6
movq 0x48(%rsp), %rax
movb 0x40(%rsp), %cl
xorl %edx, %edx
movq %rdx, 0x40(%rbx)
movups (%r12), %xmm0
movq %rdx, 0x8(%r12)
movups %xmm0, 0x38(%rbx)
movq %rdx, (%r12)
movq %rdx, 0x50(%rbx)
movups (%r15), %xmm0
movq %rdx, 0x8(%r15)
movups %xmm0, 0x48(%rbx)
movq %rdx, (%r15)
movq %rdx, 0x60(%rbx)
movups (%r14), %xmm0
movq %rdx, 0x8(%r14)
movups %xmm0, 0x58(%rbx)
movq %rdx, (%r14)
movb %cl, 0x68(%rbx)
movq %rdx, 0x78(%rbx)
movups (%rax), %xmm0
movq %rdx, 0x8(%rax)
movups %xmm0, 0x70(%rbx)
movq %rdx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbp, (%rbx)
movq %r13, %rdi
callq 0x34564
movq %r14, %rdi
callq 0x1c7d0
nop
|
_ZN5minja7ForNodeC2ERKNS_8LocationEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EEOSt10shared_ptrINS_10ExpressionEESH_OSE_INS_12TemplateNodeEEbSK_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r9
mov r15, r8
mov r12, rcx
mov rbx, rdi
lea rbp, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add rbp, 10h
mov [rdi], rbp
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_A6036
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_A6032
inc dword ptr [rax+8]
jmp short loc_A6036
loc_A6032:
lock inc dword ptr [rax+8]
loc_A6036:
lea r13, [rbx+10h]
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja7ForNodeE; `vtable for'minja::ForNode
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]
mov rsi, rdx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
mov rax, [rsp+38h+arg_8]
mov cl, [rsp+38h+arg_0]
xor edx, edx
mov [rbx+40h], rdx
movups xmm0, xmmword ptr [r12]
mov [r12+8], rdx
movups xmmword ptr [rbx+38h], xmm0
mov [r12], rdx
mov [rbx+50h], rdx
movups xmm0, xmmword ptr [r15]
mov [r15+8], rdx
movups xmmword ptr [rbx+48h], xmm0
mov [r15], rdx
mov [rbx+60h], rdx
movups xmm0, xmmword ptr [r14]
mov [r14+8], rdx
movups xmmword ptr [rbx+58h], xmm0
mov [r14], rdx
mov [rbx+68h], cl
mov [rbx+78h], rdx
movups xmm0, xmmword ptr [rax]
mov [rax+8], rdx
movups xmmword ptr [rbx+70h], xmm0
mov [rax], rdx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov [rbx], rbp
mov rdi, r13
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
|
long long minja::ForNode::ForNode(
long long a1,
_QWORD *a2,
_QWORD *a3,
__int128 *a4,
__int128 *a5,
__int128 *a6,
char a7,
__int128 *a8)
{
long long v11; // rax
long long result; // rax
__int128 v13; // xmm0
__int128 v14; // xmm0
__int128 v15; // xmm0
__int128 v16; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v11 = a2[1];
*(_QWORD *)(a1 + 16) = v11;
if ( v11 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v11 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v11 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::ForNode + 2;
std::vector<std::string>::vector(a1 + 32, a3);
result = (long long)a8;
*(_QWORD *)(a1 + 64) = 0LL;
v13 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 56) = v13;
*(_QWORD *)a4 = 0LL;
*(_QWORD *)(a1 + 80) = 0LL;
v14 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 72) = v14;
*(_QWORD *)a5 = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
v15 = *a6;
*((_QWORD *)a6 + 1) = 0LL;
*(_OWORD *)(a1 + 88) = v15;
*(_QWORD *)a6 = 0LL;
*(_BYTE *)(a1 + 104) = a7;
*(_QWORD *)(a1 + 120) = 0LL;
v16 = *a8;
*((_QWORD *)a8 + 1) = 0LL;
*(_OWORD *)(a1 + 112) = v16;
*(_QWORD *)a8 = 0LL;
return result;
}
|
ForNode:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R9
MOV R15,R8
MOV R12,RCX
MOV RBX,RDI
LEA RBP,[0x1ff550]
ADD RBP,0x10
MOV qword ptr [RDI],RBP
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x001a6036
MOV RCX,qword ptr [0x001fff90]
CMP byte ptr [RCX],0x0
JZ 0x001a6032
INC dword ptr [RAX + 0x8]
JMP 0x001a6036
LAB_001a6032:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001a6036:
LEA R13,[RBX + 0x10]
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x1ff5c8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LAB_001a6054:
MOV RSI,RDX
CALL 0x001393c6
LAB_001a605c:
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RSP + 0x40]
XOR EDX,EDX
MOV qword ptr [RBX + 0x40],RDX
MOVUPS XMM0,xmmword ptr [R12]
MOV qword ptr [R12 + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x38],XMM0
MOV qword ptr [R12],RDX
MOV qword ptr [RBX + 0x50],RDX
MOVUPS XMM0,xmmword ptr [R15]
MOV qword ptr [R15 + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x48],XMM0
MOV qword ptr [R15],RDX
MOV qword ptr [RBX + 0x60],RDX
MOVUPS XMM0,xmmword ptr [R14]
MOV qword ptr [R14 + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOV qword ptr [R14],RDX
MOV byte ptr [RBX + 0x68],CL
MOV qword ptr [RBX + 0x78],RDX
MOVUPS XMM0,xmmword ptr [RAX]
MOV qword ptr [RAX + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x70],XMM0
MOV qword ptr [RAX],RDX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > >&&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::ForNode::ForNode
(ForNode *this,Location *param_1,vector *param_2,shared_ptr *param_3,shared_ptr *param_4,
shared_ptr *param_5,bool param_6,shared_ptr *param_7)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_001ff560;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_001fff90 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_001ff5d8;
/* try { // try from 001a6054 to 001a605b has its CatchHandler @ 001a60c7 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x20),
param_2);
*(int8 *)(this + 0x40) = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x38) = *(int8 *)param_3;
*(int8 *)(this + 0x40) = uVar2;
*(int8 *)param_3 = 0;
*(int8 *)(this + 0x50) = 0;
uVar2 = *(int8 *)(param_4 + 8);
*(int8 *)(param_4 + 8) = 0;
*(int8 *)(this + 0x48) = *(int8 *)param_4;
*(int8 *)(this + 0x50) = uVar2;
*(int8 *)param_4 = 0;
*(int8 *)(this + 0x60) = 0;
uVar2 = *(int8 *)(param_5 + 8);
*(int8 *)(param_5 + 8) = 0;
*(int8 *)(this + 0x58) = *(int8 *)param_5;
*(int8 *)(this + 0x60) = uVar2;
*(int8 *)param_5 = 0;
this[0x68] = (ForNode)param_6;
*(int8 *)(this + 0x78) = 0;
uVar2 = *(int8 *)(param_7 + 8);
*(int8 *)(param_7 + 8) = 0;
*(int8 *)(this + 0x70) = *(int8 *)param_7;
*(int8 *)(this + 0x78) = uVar2;
*(int8 *)param_7 = 0;
return;
}
|
|
59,818
|
ast_create_and
|
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
|
AstNode* ast_create_and(Arena* arena, AstNode** exprs, size_t expr_count, size_t line, size_t column) {
AstNode* node = ast_create_node(arena, AST_AND, line, column);
if (!node) {
return NULL;
}
node->as.logical.exprs = exprs;
node->as.logical.expr_count = expr_count;
return node;
}
|
O2
|
c
|
ast_create_and:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
pushq $0x10
popq %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x99ac
testq %rax, %rax
je 0x9ced
movq %r14, 0x48(%rax)
movq %rbx, 0x50(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
ast_create_and:
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
push 10h
pop rsi
mov rdx, rcx
mov rcx, r8
call ast_create_node
test rax, rax
jz short loc_9CED
mov [rax+48h], r14
mov [rax+50h], rbx
loc_9CED:
add rsp, 8
pop rbx
pop r14
retn
|
long long ast_create_and(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long result; // rax
result = ast_create_node(a1, 16, a4, a5);
if ( result )
{
*(_QWORD *)(result + 72) = a2;
*(_QWORD *)(result + 80) = a3;
}
return result;
}
|
ast_create_and:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
PUSH 0x10
POP RSI
MOV RDX,RCX
MOV RCX,R8
CALL 0x001099ac
TEST RAX,RAX
JZ 0x00109ced
MOV qword ptr [RAX + 0x48],R14
MOV qword ptr [RAX + 0x50],RBX
LAB_00109ced:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void ast_create_and(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
long lVar1;
lVar1 = ast_create_node(param_1,0x10,param_4,param_5);
if (lVar1 != 0) {
*(int8 *)(lVar1 + 0x48) = param_2;
*(int8 *)(lVar1 + 0x50) = param_3;
}
return;
}
|
|
59,819
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::~Refinement()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
|
Refinement::~Refinement() {
for (int i = 0; i < (int)_fvarChannels.size(); ++i) {
delete _fvarChannels[i];
}
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::~Refinement():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x95945(%rip), %rax # 0xddf58
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x1e0(%rdi), %rdi
movq 0x1e8(%rbx), %rax
subq %rdi, %rax
shrq $0x3, %rax
testl %eax, %eax
jle 0x48673
xorl %r15d, %r15d
movq (%rdi,%r15,8), %r14
testq %r14, %r14
je 0x48654
movq %r14, %rdi
callq 0x397f0
movl $0x40, %esi
movq %r14, %rdi
callq 0x3a2d0
incq %r15
movq 0x1e0(%rbx), %rdi
movq 0x1e8(%rbx), %rax
subq %rdi, %rax
shrq $0x3, %rax
cltq
cmpq %rax, %r15
jl 0x48636
testq %rdi, %rdi
je 0x48687
movq 0x1f0(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0x1c8(%rbx), %rdi
testq %rdi, %rdi
je 0x486a2
movq 0x1d8(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0x1b0(%rbx), %rdi
testq %rdi, %rdi
je 0x486bd
movq 0x1c0(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0x198(%rbx), %rdi
testq %rdi, %rdi
je 0x486d8
movq 0x1a8(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0x180(%rbx), %rdi
testq %rdi, %rdi
je 0x486f3
movq 0x190(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0x168(%rbx), %rdi
testq %rdi, %rdi
je 0x4870e
movq 0x178(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0x150(%rbx), %rdi
testq %rdi, %rdi
je 0x48729
movq 0x160(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0x138(%rbx), %rdi
testq %rdi, %rdi
je 0x48744
movq 0x148(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0x120(%rbx), %rdi
testq %rdi, %rdi
je 0x4875f
movq 0x130(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0x108(%rbx), %rdi
testq %rdi, %rdi
je 0x4877a
movq 0x118(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0xf0(%rbx), %rdi
testq %rdi, %rdi
je 0x48795
movq 0x100(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0xd8(%rbx), %rdi
testq %rdi, %rdi
je 0x487b0
movq 0xe8(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0x487cb
movq 0xd0(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x487e6
movq 0xb8(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x48801
movq 0xa0(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x4881e
movq 0x88(%rbx), %rsi
subq %rdi, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x3a2d0
popq %rbx
popq %r14
popq %r15
retq
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal10RefinementD2Ev:
push r15; Alternative name is 'OpenSubdiv::v3_6_0::Vtr::internal::Refinement::~Refinement()'
push r14
push rbx
mov rbx, rdi
mov rax, cs:_ZTVN10OpenSubdiv6v3_6_03Vtr8internal10RefinementE_ptr
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+1E0h]
mov rax, [rbx+1E8h]
sub rax, rdi
shr rax, 3
test eax, eax
jle short loc_48673
xor r15d, r15d
loc_48636:
mov r14, [rdi+r15*8]
test r14, r14
jz short loc_48654
mov rdi, r14; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinementD2Ev; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::~FVarRefinement()
mov esi, 40h ; '@'; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_48654:
inc r15
mov rdi, [rbx+1E0h]; void *
mov rax, [rbx+1E8h]
sub rax, rdi
shr rax, 3
cdqe
cmp r15, rax
jl short loc_48636
loc_48673:
test rdi, rdi
jz short loc_48687
mov rsi, [rbx+1F0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_48687:
mov rdi, [rbx+1C8h]; void *
test rdi, rdi
jz short loc_486A2
mov rsi, [rbx+1D8h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_486A2:
mov rdi, [rbx+1B0h]; void *
test rdi, rdi
jz short loc_486BD
mov rsi, [rbx+1C0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_486BD:
mov rdi, [rbx+198h]; void *
test rdi, rdi
jz short loc_486D8
mov rsi, [rbx+1A8h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_486D8:
mov rdi, [rbx+180h]; void *
test rdi, rdi
jz short loc_486F3
mov rsi, [rbx+190h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_486F3:
mov rdi, [rbx+168h]; void *
test rdi, rdi
jz short loc_4870E
mov rsi, [rbx+178h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4870E:
mov rdi, [rbx+150h]; void *
test rdi, rdi
jz short loc_48729
mov rsi, [rbx+160h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_48729:
mov rdi, [rbx+138h]; void *
test rdi, rdi
jz short loc_48744
mov rsi, [rbx+148h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_48744:
mov rdi, [rbx+120h]; void *
test rdi, rdi
jz short loc_4875F
mov rsi, [rbx+130h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4875F:
mov rdi, [rbx+108h]; void *
test rdi, rdi
jz short loc_4877A
mov rsi, [rbx+118h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4877A:
mov rdi, [rbx+0F0h]; void *
test rdi, rdi
jz short loc_48795
mov rsi, [rbx+100h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_48795:
mov rdi, [rbx+0D8h]; void *
test rdi, rdi
jz short loc_487B0
mov rsi, [rbx+0E8h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_487B0:
mov rdi, [rbx+0C0h]; void *
test rdi, rdi
jz short loc_487CB
mov rsi, [rbx+0D0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_487CB:
mov rdi, [rbx+0A8h]; void *
test rdi, rdi
jz short loc_487E6
mov rsi, [rbx+0B8h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_487E6:
mov rdi, [rbx+90h]; void *
test rdi, rdi
jz short loc_48801
mov rsi, [rbx+0A0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_48801:
mov rdi, [rbx+78h]; void *
test rdi, rdi
jz short loc_4881E
mov rsi, [rbx+88h]
sub rsi, rdi; unsigned __int64
pop rbx
pop r14
pop r15
jmp __ZdlPvm; operator delete(void *,ulong)
loc_4881E:
pop rbx
pop r14
pop r15
retn
|
void OpenSubdiv::v3_6_0::Vtr::internal::Refinement::~Refinement(
OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this)
{
_QWORD *v2; // rdi
long long v3; // r15
void *v4; // r14
void *v5; // rdi
void *v6; // rdi
void *v7; // rdi
void *v8; // rdi
void *v9; // rdi
void *v10; // rdi
void *v11; // rdi
void *v12; // rdi
void *v13; // rdi
void *v14; // rdi
void *v15; // rdi
void *v16; // rdi
void *v17; // rdi
void *v18; // rdi
void *v19; // rdi
*(_QWORD *)this = &`vtable for'OpenSubdiv::v3_6_0::Vtr::internal::Refinement + 2;
v2 = (_QWORD *)*((_QWORD *)this + 60);
if ( (int)((*((_QWORD *)this + 61) - (_QWORD)v2) >> 3) > 0 )
{
v3 = 0LL;
do
{
v4 = (void *)v2[v3];
if ( v4 )
{
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::~FVarRefinement((OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement *)v2[v3]);
operator delete(v4, 0x40uLL);
}
++v3;
v2 = (_QWORD *)*((_QWORD *)this + 60);
}
while ( v3 < (int)((*((_QWORD *)this + 61) - (_QWORD)v2) >> 3) );
}
if ( v2 )
operator delete(v2, *((_QWORD *)this + 62) - (_QWORD)v2);
v5 = (void *)*((_QWORD *)this + 57);
if ( v5 )
operator delete(v5, *((_QWORD *)this + 59) - (_QWORD)v5);
v6 = (void *)*((_QWORD *)this + 54);
if ( v6 )
operator delete(v6, *((_QWORD *)this + 56) - (_QWORD)v6);
v7 = (void *)*((_QWORD *)this + 51);
if ( v7 )
operator delete(v7, *((_QWORD *)this + 53) - (_QWORD)v7);
v8 = (void *)*((_QWORD *)this + 48);
if ( v8 )
operator delete(v8, *((_QWORD *)this + 50) - (_QWORD)v8);
v9 = (void *)*((_QWORD *)this + 45);
if ( v9 )
operator delete(v9, *((_QWORD *)this + 47) - (_QWORD)v9);
v10 = (void *)*((_QWORD *)this + 42);
if ( v10 )
operator delete(v10, *((_QWORD *)this + 44) - (_QWORD)v10);
v11 = (void *)*((_QWORD *)this + 39);
if ( v11 )
operator delete(v11, *((_QWORD *)this + 41) - (_QWORD)v11);
v12 = (void *)*((_QWORD *)this + 36);
if ( v12 )
operator delete(v12, *((_QWORD *)this + 38) - (_QWORD)v12);
v13 = (void *)*((_QWORD *)this + 33);
if ( v13 )
operator delete(v13, *((_QWORD *)this + 35) - (_QWORD)v13);
v14 = (void *)*((_QWORD *)this + 30);
if ( v14 )
operator delete(v14, *((_QWORD *)this + 32) - (_QWORD)v14);
v15 = (void *)*((_QWORD *)this + 27);
if ( v15 )
operator delete(v15, *((_QWORD *)this + 29) - (_QWORD)v15);
v16 = (void *)*((_QWORD *)this + 24);
if ( v16 )
operator delete(v16, *((_QWORD *)this + 26) - (_QWORD)v16);
v17 = (void *)*((_QWORD *)this + 21);
if ( v17 )
operator delete(v17, *((_QWORD *)this + 23) - (_QWORD)v17);
v18 = (void *)*((_QWORD *)this + 18);
if ( v18 )
operator delete(v18, *((_QWORD *)this + 20) - (_QWORD)v18);
v19 = (void *)*((_QWORD *)this + 15);
if ( v19 )
operator delete(v19, *((_QWORD *)this + 17) - (_QWORD)v19);
}
|
~Refinement:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [0x001ddf58]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x1e0]
MOV RAX,qword ptr [RBX + 0x1e8]
SUB RAX,RDI
SHR RAX,0x3
TEST EAX,EAX
JLE 0x00148673
XOR R15D,R15D
LAB_00148636:
MOV R14,qword ptr [RDI + R15*0x8]
TEST R14,R14
JZ 0x00148654
MOV RDI,R14
CALL 0x001397f0
MOV ESI,0x40
MOV RDI,R14
CALL 0x0013a2d0
LAB_00148654:
INC R15
MOV RDI,qword ptr [RBX + 0x1e0]
MOV RAX,qword ptr [RBX + 0x1e8]
SUB RAX,RDI
SHR RAX,0x3
CDQE
CMP R15,RAX
JL 0x00148636
LAB_00148673:
TEST RDI,RDI
JZ 0x00148687
MOV RSI,qword ptr [RBX + 0x1f0]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_00148687:
MOV RDI,qword ptr [RBX + 0x1c8]
TEST RDI,RDI
JZ 0x001486a2
MOV RSI,qword ptr [RBX + 0x1d8]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_001486a2:
MOV RDI,qword ptr [RBX + 0x1b0]
TEST RDI,RDI
JZ 0x001486bd
MOV RSI,qword ptr [RBX + 0x1c0]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_001486bd:
MOV RDI,qword ptr [RBX + 0x198]
TEST RDI,RDI
JZ 0x001486d8
MOV RSI,qword ptr [RBX + 0x1a8]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_001486d8:
MOV RDI,qword ptr [RBX + 0x180]
TEST RDI,RDI
JZ 0x001486f3
MOV RSI,qword ptr [RBX + 0x190]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_001486f3:
MOV RDI,qword ptr [RBX + 0x168]
TEST RDI,RDI
JZ 0x0014870e
MOV RSI,qword ptr [RBX + 0x178]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_0014870e:
MOV RDI,qword ptr [RBX + 0x150]
TEST RDI,RDI
JZ 0x00148729
MOV RSI,qword ptr [RBX + 0x160]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_00148729:
MOV RDI,qword ptr [RBX + 0x138]
TEST RDI,RDI
JZ 0x00148744
MOV RSI,qword ptr [RBX + 0x148]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_00148744:
MOV RDI,qword ptr [RBX + 0x120]
TEST RDI,RDI
JZ 0x0014875f
MOV RSI,qword ptr [RBX + 0x130]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_0014875f:
MOV RDI,qword ptr [RBX + 0x108]
TEST RDI,RDI
JZ 0x0014877a
MOV RSI,qword ptr [RBX + 0x118]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_0014877a:
MOV RDI,qword ptr [RBX + 0xf0]
TEST RDI,RDI
JZ 0x00148795
MOV RSI,qword ptr [RBX + 0x100]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_00148795:
MOV RDI,qword ptr [RBX + 0xd8]
TEST RDI,RDI
JZ 0x001487b0
MOV RSI,qword ptr [RBX + 0xe8]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_001487b0:
MOV RDI,qword ptr [RBX + 0xc0]
TEST RDI,RDI
JZ 0x001487cb
MOV RSI,qword ptr [RBX + 0xd0]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_001487cb:
MOV RDI,qword ptr [RBX + 0xa8]
TEST RDI,RDI
JZ 0x001487e6
MOV RSI,qword ptr [RBX + 0xb8]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_001487e6:
MOV RDI,qword ptr [RBX + 0x90]
TEST RDI,RDI
JZ 0x00148801
MOV RSI,qword ptr [RBX + 0xa0]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_00148801:
MOV RDI,qword ptr [RBX + 0x78]
TEST RDI,RDI
JZ 0x0014881e
MOV RSI,qword ptr [RBX + 0x88]
SUB RSI,RDI
POP RBX
POP R14
POP R15
JMP 0x0013a2d0
LAB_0014881e:
POP RBX
POP R14
POP R15
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::~Refinement() */
void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Refinement::~Refinement(Refinement *this)
{
FVarRefinement *this_00;
void *pvVar1;
long lVar2;
*(int **)this = PTR_vtable_001ddf58 + 0x10;
pvVar1 = *(void **)(this + 0x1e0);
if (0 < (int)((ulong)(*(long *)(this + 0x1e8) - (long)pvVar1) >> 3)) {
lVar2 = 0;
do {
this_00 = *(FVarRefinement **)((long)pvVar1 + lVar2 * 8);
if (this_00 != (FVarRefinement *)0x0) {
FVarRefinement::~FVarRefinement(this_00);
operator_delete(this_00,0x40);
}
lVar2 = lVar2 + 1;
pvVar1 = *(void **)(this + 0x1e0);
} while (lVar2 < (int)((ulong)(*(long *)(this + 0x1e8) - (long)pvVar1) >> 3));
}
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x1f0) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x1c8);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x1d8) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x1b0);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x1c0) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x198);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x1a8) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x180);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 400) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x168);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x178) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x150);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x160) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x138);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x148) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x120);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x130) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x108);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x118) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0xf0);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x100) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0xd8);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0xe8) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0xc0);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0xd0) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0xa8);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0xb8) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x90);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0xa0) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x78);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x88) - (long)pvVar1);
return;
}
return;
}
|
|
59,820
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::~Refinement()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
|
Refinement::~Refinement() {
for (int i = 0; i < (int)_fvarChannels.size(); ++i) {
delete _fvarChannels[i];
}
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::~Refinement():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x97e25(%rip), %rax # 0xe1f60
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x1e0(%rdi), %rdi
movq 0x1e8(%rbx), %rax
subq %rdi, %rax
shrq $0x3, %rax
testl %eax, %eax
jle 0x4a19b
xorl %r15d, %r15d
movq (%rdi,%r15,8), %r14
testq %r14, %r14
je 0x4a16f
movq %r14, %rdi
callq 0x397d0
movl $0x40, %esi
movq %r14, %rdi
callq 0x3a2b0
incq %r15
movq 0x1e0(%rbx), %rdi
movq 0x1e8(%rbx), %rax
subq %rdi, %rax
shrq $0x3, %rax
cltq
cmpq %rax, %r15
jl 0x4a15e
testq %rdi, %rdi
je 0x4a1af
movq 0x1f0(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0x1c8(%rbx), %rdi
testq %rdi, %rdi
je 0x4a1ca
movq 0x1d8(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0x1b0(%rbx), %rdi
testq %rdi, %rdi
je 0x4a1e5
movq 0x1c0(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0x198(%rbx), %rdi
testq %rdi, %rdi
je 0x4a200
movq 0x1a8(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0x180(%rbx), %rdi
testq %rdi, %rdi
je 0x4a21b
movq 0x190(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0x168(%rbx), %rdi
testq %rdi, %rdi
je 0x4a236
movq 0x178(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0x150(%rbx), %rdi
testq %rdi, %rdi
je 0x4a251
movq 0x160(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0x138(%rbx), %rdi
testq %rdi, %rdi
je 0x4a26c
movq 0x148(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0x120(%rbx), %rdi
testq %rdi, %rdi
je 0x4a287
movq 0x130(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0x108(%rbx), %rdi
testq %rdi, %rdi
je 0x4a2a2
movq 0x118(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0xf0(%rbx), %rdi
testq %rdi, %rdi
je 0x4a2bd
movq 0x100(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0xd8(%rbx), %rdi
testq %rdi, %rdi
je 0x4a2d8
movq 0xe8(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0x4a2f3
movq 0xd0(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x4a30e
movq 0xb8(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x4a329
movq 0xa0(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x4a346
movq 0x88(%rbx), %rsi
subq %rdi, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x3a2b0
popq %rbx
popq %r14
popq %r15
retq
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal10RefinementD2Ev:
push r15; Alternative name is 'OpenSubdiv::v3_6_0::Vtr::internal::Refinement::~Refinement()'
push r14
push rbx
mov rbx, rdi
mov rax, cs:_ZTVN10OpenSubdiv6v3_6_03Vtr8internal10RefinementE_ptr
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+1E0h]
mov rax, [rbx+1E8h]
sub rax, rdi
shr rax, 3
test eax, eax
jle short loc_4A19B
xor r15d, r15d
loc_4A15E:
mov r14, [rdi+r15*8]
test r14, r14
jz short loc_4A16F
mov rdi, r14; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinementD2Ev; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::~FVarRefinement()
loc_4A16F:
mov esi, 40h ; '@'; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
inc r15
mov rdi, [rbx+1E0h]; void *
mov rax, [rbx+1E8h]
sub rax, rdi
shr rax, 3
cdqe
cmp r15, rax
jl short loc_4A15E
loc_4A19B:
test rdi, rdi
jz short loc_4A1AF
mov rsi, [rbx+1F0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A1AF:
mov rdi, [rbx+1C8h]; void *
test rdi, rdi
jz short loc_4A1CA
mov rsi, [rbx+1D8h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A1CA:
mov rdi, [rbx+1B0h]; void *
test rdi, rdi
jz short loc_4A1E5
mov rsi, [rbx+1C0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A1E5:
mov rdi, [rbx+198h]; void *
test rdi, rdi
jz short loc_4A200
mov rsi, [rbx+1A8h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A200:
mov rdi, [rbx+180h]; void *
test rdi, rdi
jz short loc_4A21B
mov rsi, [rbx+190h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A21B:
mov rdi, [rbx+168h]; void *
test rdi, rdi
jz short loc_4A236
mov rsi, [rbx+178h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A236:
mov rdi, [rbx+150h]; void *
test rdi, rdi
jz short loc_4A251
mov rsi, [rbx+160h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A251:
mov rdi, [rbx+138h]; void *
test rdi, rdi
jz short loc_4A26C
mov rsi, [rbx+148h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A26C:
mov rdi, [rbx+120h]; void *
test rdi, rdi
jz short loc_4A287
mov rsi, [rbx+130h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A287:
mov rdi, [rbx+108h]; void *
test rdi, rdi
jz short loc_4A2A2
mov rsi, [rbx+118h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A2A2:
mov rdi, [rbx+0F0h]; void *
test rdi, rdi
jz short loc_4A2BD
mov rsi, [rbx+100h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A2BD:
mov rdi, [rbx+0D8h]; void *
test rdi, rdi
jz short loc_4A2D8
mov rsi, [rbx+0E8h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A2D8:
mov rdi, [rbx+0C0h]; void *
test rdi, rdi
jz short loc_4A2F3
mov rsi, [rbx+0D0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A2F3:
mov rdi, [rbx+0A8h]; void *
test rdi, rdi
jz short loc_4A30E
mov rsi, [rbx+0B8h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A30E:
mov rdi, [rbx+90h]; void *
test rdi, rdi
jz short loc_4A329
mov rsi, [rbx+0A0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A329:
mov rdi, [rbx+78h]; void *
test rdi, rdi
jz short loc_4A346
mov rsi, [rbx+88h]
sub rsi, rdi; unsigned __int64
pop rbx
pop r14
pop r15
jmp __ZdlPvm; operator delete(void *,ulong)
loc_4A346:
pop rbx
pop r14
pop r15
retn
|
void OpenSubdiv::v3_6_0::Vtr::internal::Refinement::~Refinement(
OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this)
{
_QWORD *v2; // rdi
long long v3; // r15
void *v4; // r14
void *v5; // rdi
void *v6; // rdi
void *v7; // rdi
void *v8; // rdi
void *v9; // rdi
void *v10; // rdi
void *v11; // rdi
void *v12; // rdi
void *v13; // rdi
void *v14; // rdi
void *v15; // rdi
void *v16; // rdi
void *v17; // rdi
void *v18; // rdi
void *v19; // rdi
*(_QWORD *)this = &`vtable for'OpenSubdiv::v3_6_0::Vtr::internal::Refinement + 2;
v2 = (_QWORD *)*((_QWORD *)this + 60);
if ( (int)((*((_QWORD *)this + 61) - (_QWORD)v2) >> 3) > 0 )
{
v3 = 0LL;
do
{
v4 = (void *)v2[v3];
if ( v4 )
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::~FVarRefinement((OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement *)v2[v3]);
operator delete(v4, 0x40uLL);
++v3;
v2 = (_QWORD *)*((_QWORD *)this + 60);
}
while ( v3 < (int)((*((_QWORD *)this + 61) - (_QWORD)v2) >> 3) );
}
if ( v2 )
operator delete(v2, *((_QWORD *)this + 62) - (_QWORD)v2);
v5 = (void *)*((_QWORD *)this + 57);
if ( v5 )
operator delete(v5, *((_QWORD *)this + 59) - (_QWORD)v5);
v6 = (void *)*((_QWORD *)this + 54);
if ( v6 )
operator delete(v6, *((_QWORD *)this + 56) - (_QWORD)v6);
v7 = (void *)*((_QWORD *)this + 51);
if ( v7 )
operator delete(v7, *((_QWORD *)this + 53) - (_QWORD)v7);
v8 = (void *)*((_QWORD *)this + 48);
if ( v8 )
operator delete(v8, *((_QWORD *)this + 50) - (_QWORD)v8);
v9 = (void *)*((_QWORD *)this + 45);
if ( v9 )
operator delete(v9, *((_QWORD *)this + 47) - (_QWORD)v9);
v10 = (void *)*((_QWORD *)this + 42);
if ( v10 )
operator delete(v10, *((_QWORD *)this + 44) - (_QWORD)v10);
v11 = (void *)*((_QWORD *)this + 39);
if ( v11 )
operator delete(v11, *((_QWORD *)this + 41) - (_QWORD)v11);
v12 = (void *)*((_QWORD *)this + 36);
if ( v12 )
operator delete(v12, *((_QWORD *)this + 38) - (_QWORD)v12);
v13 = (void *)*((_QWORD *)this + 33);
if ( v13 )
operator delete(v13, *((_QWORD *)this + 35) - (_QWORD)v13);
v14 = (void *)*((_QWORD *)this + 30);
if ( v14 )
operator delete(v14, *((_QWORD *)this + 32) - (_QWORD)v14);
v15 = (void *)*((_QWORD *)this + 27);
if ( v15 )
operator delete(v15, *((_QWORD *)this + 29) - (_QWORD)v15);
v16 = (void *)*((_QWORD *)this + 24);
if ( v16 )
operator delete(v16, *((_QWORD *)this + 26) - (_QWORD)v16);
v17 = (void *)*((_QWORD *)this + 21);
if ( v17 )
operator delete(v17, *((_QWORD *)this + 23) - (_QWORD)v17);
v18 = (void *)*((_QWORD *)this + 18);
if ( v18 )
operator delete(v18, *((_QWORD *)this + 20) - (_QWORD)v18);
v19 = (void *)*((_QWORD *)this + 15);
if ( v19 )
operator delete(v19, *((_QWORD *)this + 17) - (_QWORD)v19);
}
|
~Refinement:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [0x001e1f60]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x1e0]
MOV RAX,qword ptr [RBX + 0x1e8]
SUB RAX,RDI
SHR RAX,0x3
TEST EAX,EAX
JLE 0x0014a19b
XOR R15D,R15D
LAB_0014a15e:
MOV R14,qword ptr [RDI + R15*0x8]
TEST R14,R14
JZ 0x0014a16f
MOV RDI,R14
CALL 0x001397d0
LAB_0014a16f:
MOV ESI,0x40
MOV RDI,R14
CALL 0x0013a2b0
INC R15
MOV RDI,qword ptr [RBX + 0x1e0]
MOV RAX,qword ptr [RBX + 0x1e8]
SUB RAX,RDI
SHR RAX,0x3
CDQE
CMP R15,RAX
JL 0x0014a15e
LAB_0014a19b:
TEST RDI,RDI
JZ 0x0014a1af
MOV RSI,qword ptr [RBX + 0x1f0]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a1af:
MOV RDI,qword ptr [RBX + 0x1c8]
TEST RDI,RDI
JZ 0x0014a1ca
MOV RSI,qword ptr [RBX + 0x1d8]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a1ca:
MOV RDI,qword ptr [RBX + 0x1b0]
TEST RDI,RDI
JZ 0x0014a1e5
MOV RSI,qword ptr [RBX + 0x1c0]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a1e5:
MOV RDI,qword ptr [RBX + 0x198]
TEST RDI,RDI
JZ 0x0014a200
MOV RSI,qword ptr [RBX + 0x1a8]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a200:
MOV RDI,qword ptr [RBX + 0x180]
TEST RDI,RDI
JZ 0x0014a21b
MOV RSI,qword ptr [RBX + 0x190]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a21b:
MOV RDI,qword ptr [RBX + 0x168]
TEST RDI,RDI
JZ 0x0014a236
MOV RSI,qword ptr [RBX + 0x178]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a236:
MOV RDI,qword ptr [RBX + 0x150]
TEST RDI,RDI
JZ 0x0014a251
MOV RSI,qword ptr [RBX + 0x160]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a251:
MOV RDI,qword ptr [RBX + 0x138]
TEST RDI,RDI
JZ 0x0014a26c
MOV RSI,qword ptr [RBX + 0x148]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a26c:
MOV RDI,qword ptr [RBX + 0x120]
TEST RDI,RDI
JZ 0x0014a287
MOV RSI,qword ptr [RBX + 0x130]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a287:
MOV RDI,qword ptr [RBX + 0x108]
TEST RDI,RDI
JZ 0x0014a2a2
MOV RSI,qword ptr [RBX + 0x118]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a2a2:
MOV RDI,qword ptr [RBX + 0xf0]
TEST RDI,RDI
JZ 0x0014a2bd
MOV RSI,qword ptr [RBX + 0x100]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a2bd:
MOV RDI,qword ptr [RBX + 0xd8]
TEST RDI,RDI
JZ 0x0014a2d8
MOV RSI,qword ptr [RBX + 0xe8]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a2d8:
MOV RDI,qword ptr [RBX + 0xc0]
TEST RDI,RDI
JZ 0x0014a2f3
MOV RSI,qword ptr [RBX + 0xd0]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a2f3:
MOV RDI,qword ptr [RBX + 0xa8]
TEST RDI,RDI
JZ 0x0014a30e
MOV RSI,qword ptr [RBX + 0xb8]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a30e:
MOV RDI,qword ptr [RBX + 0x90]
TEST RDI,RDI
JZ 0x0014a329
MOV RSI,qword ptr [RBX + 0xa0]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_0014a329:
MOV RDI,qword ptr [RBX + 0x78]
TEST RDI,RDI
JZ 0x0014a346
MOV RSI,qword ptr [RBX + 0x88]
SUB RSI,RDI
POP RBX
POP R14
POP R15
JMP 0x0013a2b0
LAB_0014a346:
POP RBX
POP R14
POP R15
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::~Refinement() */
void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Refinement::~Refinement(Refinement *this)
{
FVarRefinement *this_00;
void *pvVar1;
long lVar2;
*(int **)this = PTR_vtable_001e1f60 + 0x10;
pvVar1 = *(void **)(this + 0x1e0);
if (0 < (int)((ulong)(*(long *)(this + 0x1e8) - (long)pvVar1) >> 3)) {
lVar2 = 0;
do {
this_00 = *(FVarRefinement **)((long)pvVar1 + lVar2 * 8);
if (this_00 != (FVarRefinement *)0x0) {
FVarRefinement::~FVarRefinement(this_00);
}
operator_delete(this_00,0x40);
lVar2 = lVar2 + 1;
pvVar1 = *(void **)(this + 0x1e0);
} while (lVar2 < (int)((ulong)(*(long *)(this + 0x1e8) - (long)pvVar1) >> 3));
}
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x1f0) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x1c8);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x1d8) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x1b0);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x1c0) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x198);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x1a8) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x180);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 400) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x168);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x178) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x150);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x160) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x138);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x148) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x120);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x130) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x108);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x118) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0xf0);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x100) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0xd8);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0xe8) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0xc0);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0xd0) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0xa8);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0xb8) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x90);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0xa0) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x78);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x88) - (long)pvVar1);
return;
}
return;
}
|
|
59,821
|
ggml_count_equal
|
ngxson[P]ggml-easy/ggml/src/ggml.c
|
struct ggml_tensor * ggml_count_equal(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b) {
GGML_ASSERT(ggml_are_same_shape(a, b));
struct ggml_tensor * result = ggml_new_tensor_1d(ctx, GGML_TYPE_I64, 1);
result->op = GGML_OP_COUNT_EQUAL;
result->src[0] = a;
result->src[1] = b;
return result;
}
|
O0
|
c
|
ggml_count_equal:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x46730
testb $0x1, %al
jne 0x4bdf7
leaq 0x687da(%rip), %rdi # 0xb45b7
movl $0x8f5, %esi # imm = 0x8F5
leaq 0x68819(%rip), %rdx # 0xb4602
leaq 0x68961(%rip), %rcx # 0xb4751
movb $0x0, %al
callq 0x46780
movq 0x20(%rsp), %rdi
movl $0x1b, %esi
movl $0x1, %edx
callq 0x47b30
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl $0x11, 0x50(%rax)
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0xa0(%rax)
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
|
ggml_count_equal:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_18], rdx
mov rdi, [rsp+28h+var_10]
mov rsi, [rsp+28h+var_18]
call _ggml_are_same_shape
test al, 1
jnz short loc_4BDF7
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 8F5h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlAreSameSha_0; "ggml_are_same_shape(a, b)"
mov al, 0
call _ggml_abort
loc_4BDF7:
mov rdi, [rsp+28h+var_8]
mov esi, 1Bh
mov edx, 1
call _ggml_new_tensor_1d
mov [rsp+28h+var_20], rax
mov rax, [rsp+28h+var_20]
mov dword ptr [rax+50h], 11h
mov rcx, [rsp+28h+var_10]
mov rax, [rsp+28h+var_20]
mov [rax+98h], rcx
mov rcx, [rsp+28h+var_18]
mov rax, [rsp+28h+var_20]
mov [rax+0A0h], rcx
mov rax, [rsp+28h+var_20]
add rsp, 28h
retn
|
long long ggml_count_equal(long long a1, _QWORD *a2, _QWORD *a3)
{
long long result; // rax
if ( !ggml_are_same_shape(a2, a3) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
2293,
(long long)"GGML_ASSERT(%s) failed",
"ggml_are_same_shape(a, b)");
result = ggml_new_tensor_1d(a1, 0x1Bu, 1LL);
*(_DWORD *)(result + 80) = 17;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
return result;
}
|
ggml_count_equal:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00146730
TEST AL,0x1
JNZ 0x0014bdf7
LEA RDI,[0x1b45b7]
MOV ESI,0x8f5
LEA RDX,[0x1b4602]
LEA RCX,[0x1b4751]
MOV AL,0x0
CALL 0x00146780
LAB_0014bdf7:
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,0x1b
MOV EDX,0x1
CALL 0x00147b30
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0x50],0x11
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x98],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0xa0],RCX
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x28
RET
|
long ggml_count_equal(int8 param_1,int8 param_2,int8 param_3)
{
ulong uVar1;
long lVar2;
uVar1 = ggml_are_same_shape(param_2,param_3);
if ((uVar1 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x8f5,
"GGML_ASSERT(%s) failed","ggml_are_same_shape(a, b)");
}
lVar2 = ggml_new_tensor_1d(param_1,0x1b,1);
*(int4 *)(lVar2 + 0x50) = 0x11;
*(int8 *)(lVar2 + 0x98) = param_2;
*(int8 *)(lVar2 + 0xa0) = param_3;
return lVar2;
}
|
|
59,822
|
ggml_count_equal
|
ngxson[P]ggml-easy/ggml/src/ggml.c
|
struct ggml_tensor * ggml_count_equal(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b) {
GGML_ASSERT(ggml_are_same_shape(a, b));
struct ggml_tensor * result = ggml_new_tensor_1d(ctx, GGML_TYPE_I64, 1);
result->op = GGML_OP_COUNT_EQUAL;
result->src[0] = a;
result->src[1] = b;
return result;
}
|
O3
|
c
|
ggml_count_equal:
pushq %r14
pushq %rbx
pushq %rax
movq 0x10(%rsi), %rax
cmpq 0x10(%rdx), %rax
jne 0x1ab6e
movq %rdx, %rbx
movq %rsi, %r14
movq 0x18(%rsi), %rax
cmpq 0x18(%rdx), %rax
jne 0x1ab6e
movq 0x20(%r14), %rax
cmpq 0x20(%rbx), %rax
jne 0x1ab6e
movq 0x28(%r14), %rax
cmpq 0x28(%rbx), %rax
jne 0x1ab6e
movq %rsp, %rcx
movq $0x1, (%rcx)
movl $0x1b, %esi
movl $0x1, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x19c13
movl $0x11, 0x50(%rax)
movq %r14, 0x98(%rax)
movq %rbx, 0xa0(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2fa9e(%rip), %rdi # 0x4a613
leaq 0x2fae2(%rip), %rdx # 0x4a65e
leaq 0x2fc2a(%rip), %rcx # 0x4a7ad
movl $0x8f5, %esi # imm = 0x8F5
xorl %eax, %eax
callq 0x17c60
|
ggml_count_equal:
push r14
push rbx
push rax
mov rax, [rsi+10h]
cmp rax, [rdx+10h]
jnz short loc_1AB6E
mov rbx, rdx
mov r14, rsi
mov rax, [rsi+18h]
cmp rax, [rdx+18h]
jnz short loc_1AB6E
mov rax, [r14+20h]
cmp rax, [rbx+20h]
jnz short loc_1AB6E
mov rax, [r14+28h]
cmp rax, [rbx+28h]
jnz short loc_1AB6E
mov rcx, rsp
mov qword ptr [rcx], 1
mov esi, 1Bh
mov edx, 1
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov dword ptr [rax+50h], 11h
mov [rax+98h], r14
mov [rax+0A0h], rbx
add rsp, 8
pop rbx
pop r14
retn
loc_1AB6E:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlAreSameSha_0; "ggml_are_same_shape(a, b)"
mov esi, 8F5h
xor eax, eax
call _ggml_abort
|
long long ggml_count_equal(long long a1, _QWORD *a2, _QWORD *a3, long long a4, int a5, int a6)
{
long long v6; // rax
long long result; // rax
long long v9; // [rsp-8h] [rbp-18h] BYREF
v9 = v6;
if ( a2[2] != a3[2] || a2[3] != a3[3] || a2[4] != a3[4] || a2[5] != a3[5] )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
2293,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"ggml_are_same_shape(a, b)",
a5,
a6);
v9 = 1LL;
result = ggml_new_tensor_impl(a1, 0x1Bu, 1u, &v9, 0LL, 0LL);
*(_DWORD *)(result + 80) = 17;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
return result;
}
|
ggml_count_equal:
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RSI + 0x10]
CMP RAX,qword ptr [RDX + 0x10]
JNZ 0x0011ab6e
MOV RBX,RDX
MOV R14,RSI
MOV RAX,qword ptr [RSI + 0x18]
CMP RAX,qword ptr [RDX + 0x18]
JNZ 0x0011ab6e
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [RBX + 0x20]
JNZ 0x0011ab6e
MOV RAX,qword ptr [R14 + 0x28]
CMP RAX,qword ptr [RBX + 0x28]
JNZ 0x0011ab6e
MOV RCX,RSP
MOV qword ptr [RCX],0x1
MOV ESI,0x1b
MOV EDX,0x1
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00119c13
MOV dword ptr [RAX + 0x50],0x11
MOV qword ptr [RAX + 0x98],R14
MOV qword ptr [RAX + 0xa0],RBX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0011ab6e:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14a7ad]
MOV ESI,0x8f5
XOR EAX,EAX
CALL 0x00117c60
|
void ggml_count_equal(int8 param_1,long param_2,long param_3)
{
long lVar1;
int8 local_18;
if ((((*(long *)(param_2 + 0x10) == *(long *)(param_3 + 0x10)) &&
(*(long *)(param_2 + 0x18) == *(long *)(param_3 + 0x18))) &&
(*(long *)(param_2 + 0x20) == *(long *)(param_3 + 0x20))) &&
(*(long *)(param_2 + 0x28) == *(long *)(param_3 + 0x28))) {
local_18 = 1;
lVar1 = ggml_new_tensor_impl(param_1,0x1b,1,&local_18,0,0);
*(int4 *)(lVar1 + 0x50) = 0x11;
*(long *)(lVar1 + 0x98) = param_2;
*(long *)(lVar1 + 0xa0) = param_3;
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x8f5,
"GGML_ASSERT(%s) failed","ggml_are_same_shape(a, b)");
}
|
|
59,823
|
stbi_is_16_bit
|
monkey531[P]llama/examples/llava/../../common/stb_image.h
|
STBIDEF int stbi_is_16_bit(char const *filename)
{
FILE *f = stbi__fopen(filename, "rb");
int result;
if (!f) return stbi__err("can't fopen", "Unable to open file");
result = stbi_is_16_bit_from_file(f);
fclose(f);
return result;
}
|
O0
|
c
|
stbi_is_16_bit:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x6393c(%rip), %rsi # 0xeb3e1
callq 0x85d50
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x87ac9
leaq 0x64272(%rip), %rdi # 0xebd30
callq 0x85d80
movl %eax, 0x24(%rsp)
jmp 0x87ae9
movq 0x10(%rsp), %rdi
callq 0x7b410
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
callq 0x77ff0
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
|
stbi_is_16_bit:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rdi, [rsp+28h+var_10]; char *
lea rsi, aRb; "rb"
call _ZL11stbi__fopenPKcS0_; stbi__fopen(char const*,char const*)
mov [rsp+28h+var_18], rax
cmp [rsp+28h+var_18], 0
jnz short loc_87AC9
lea rdi, aCanTFopen; "can't fopen"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov [rsp+28h+var_4], eax
jmp short loc_87AE9
loc_87AC9:
mov rdi, [rsp+28h+var_18]
call _stbi_is_16_bit_from_file
mov [rsp+28h+var_1C], eax
mov rdi, [rsp+28h+var_18]
call _fclose
mov eax, [rsp+28h+var_1C]
mov [rsp+28h+var_4], eax
loc_87AE9:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long stbi_is_16_bit(const char *a1)
{
unsigned int is_16_bit_from_file; // [rsp+Ch] [rbp-1Ch]
long long v3; // [rsp+10h] [rbp-18h]
v3 = stbi__fopen(a1, "rb");
if ( v3 )
{
is_16_bit_from_file = stbi_is_16_bit_from_file(v3);
fclose(v3);
return is_16_bit_from_file;
}
else
{
return (unsigned int)stbi__err("can't fopen");
}
}
|
stbi_is_16_bit:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x1eb3e1]
CALL 0x00185d50
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x00187ac9
LEA RDI,[0x1ebd30]
CALL 0x00185d80
MOV dword ptr [RSP + 0x24],EAX
JMP 0x00187ae9
LAB_00187ac9:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0017b410
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00177ff0
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x24],EAX
LAB_00187ae9:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 stbi_is_16_bit(char *param_1)
{
FILE *__stream;
int4 local_4;
__stream = (FILE *)stbi__fopen(param_1,"rb");
if (__stream == (FILE *)0x0) {
local_4 = stbi__err("can\'t fopen");
}
else {
local_4 = stbi_is_16_bit_from_file(__stream);
fclose(__stream);
}
return local_4;
}
|
|
59,824
|
my_open
|
eloqsql/mysys/my_open.c
|
File my_open(const char *FileName, int Flags, myf MyFlags)
/* Path-name of file */
/* Read | write .. */
/* Special flags */
{
File fd;
DBUG_ENTER("my_open");
DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %lu",
FileName, Flags, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE | MY_FFNF)))
MyFlags|= my_global_flags;
#if defined(_WIN32)
fd= my_win_open(FileName, Flags);
#else
if (MyFlags & MY_NOSYMLINKS)
fd = open_nosymlinks(FileName, Flags | O_CLOEXEC, my_umask);
else
fd = open(FileName, Flags | O_CLOEXEC, my_umask);
#endif
fd= my_register_filename(fd, FileName, FILE_BY_OPEN,
EE_FILENOTFOUND, MyFlags);
DBUG_RETURN(fd);
}
|
O0
|
c
|
my_open:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x2fec5
movq -0x18(%rbp), %rax
andq $0x19, %rax
cmpq $0x0, %rax
jne 0x2fee5
leaq 0x356e8e(%rip), %rax # 0x386d68
movq (%rax), %rax
orq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
je 0x2ff15
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
orl $0x80000, %esi # imm = 0x80000
leaq 0x19f4ef(%rip), %rax # 0x1cf3f8
movl (%rax), %edx
callq 0x2ff70
movl %eax, -0x1c(%rbp)
jmp 0x2ff35
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
orl $0x80000, %esi # imm = 0x80000
leaq 0x19f4cf(%rip), %rax # 0x1cf3f8
movl (%rax), %edx
movb $0x0, %al
callq 0x24510
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %r8
movl $0x1, %edx
movl $0x1d, %ecx
callq 0x2ffe0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_open:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
jmp short $+2
loc_2FEC5:
mov rax, [rbp+var_18]
and rax, 19h
cmp rax, 0
jnz short loc_2FEE5
lea rax, my_global_flags
mov rax, [rax]
or rax, [rbp+var_18]
mov [rbp+var_18], rax
loc_2FEE5:
mov rax, [rbp+var_18]
and rax, 200h
cmp rax, 0
jz short loc_2FF15
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
or esi, 80000h
lea rax, my_umask
mov edx, [rax]
call open_nosymlinks
mov [rbp+var_1C], eax
jmp short loc_2FF35
loc_2FF15:
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
or esi, 80000h
lea rax, my_umask
mov edx, [rax]
mov al, 0
call _open64
mov [rbp+var_1C], eax
loc_2FF35:
mov edi, [rbp+var_1C]
mov rsi, [rbp+var_8]
mov r8, [rbp+var_18]
mov edx, 1
mov ecx, 1Dh
call my_register_filename
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
mov [rbp+var_20], eax
mov eax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
|
long long my_open(long long a1, int a2, long long a3)
{
unsigned int v4; // [rsp+4h] [rbp-1Ch]
long long v5; // [rsp+8h] [rbp-18h]
v5 = a3;
if ( (a3 & 0x19) == 0 )
v5 = a3 | my_global_flags;
if ( (v5 & 0x200) != 0 )
v4 = open_nosymlinks(a1, a2 | 0x80000u, my_umask);
else
v4 = open64(a1, a2 | 0x80000u, my_umask);
return (unsigned int)my_register_filename(v4, a1, 1LL, 29LL, v5);
}
|
my_open:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x0012fec5
LAB_0012fec5:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x19
CMP RAX,0x0
JNZ 0x0012fee5
LEA RAX,[0x486d68]
MOV RAX,qword ptr [RAX]
OR RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
LAB_0012fee5:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x200
CMP RAX,0x0
JZ 0x0012ff15
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
OR ESI,0x80000
LEA RAX,[0x2cf3f8]
MOV EDX,dword ptr [RAX]
CALL 0x0012ff70
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x0012ff35
LAB_0012ff15:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
OR ESI,0x80000
LEA RAX,[0x2cf3f8]
MOV EDX,dword ptr [RAX]
MOV AL,0x0
CALL 0x00124510
MOV dword ptr [RBP + -0x1c],EAX
LAB_0012ff35:
MOV EDI,dword ptr [RBP + -0x1c]
MOV RSI,qword ptr [RBP + -0x8]
MOV R8,qword ptr [RBP + -0x18]
MOV EDX,0x1
MOV ECX,0x1d
CALL 0x0012ffe0
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
int4 my_open(char *param_1,uint param_2,ulong param_3)
{
int4 uVar1;
int4 local_24;
int8 local_20;
local_20 = param_3;
if ((param_3 & 0x19) == 0) {
local_20 = my_global_flags | param_3;
}
if ((local_20 & 0x200) == 0) {
local_24 = open64(param_1,param_2 | 0x80000,(ulong)my_umask);
}
else {
local_24 = open_nosymlinks(param_1,param_2 | 0x80000,my_umask);
}
uVar1 = my_register_filename(local_24,param_1,1,0x1d,local_20);
return uVar1;
}
|
|
59,825
|
inline_mysql_cond_init
|
eloqsql/include/mysql/psi/mysql_thread.h
|
static inline int inline_mysql_cond_init(
#ifdef HAVE_PSI_COND_INTERFACE
PSI_cond_key key,
#endif
mysql_cond_t *that,
const pthread_condattr_t *attr)
{
#ifdef HAVE_PSI_COND_INTERFACE
that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond);
#else
that->m_psi= NULL;
#endif
return pthread_cond_init(&that->m_cond, attr);
}
|
O0
|
c
|
inline_mysql_cond_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x1c89de(%rip), %rax # 0x2bf0b8
movq (%rax), %rax
movq 0x60(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2a370
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
inline_mysql_cond_init_4:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+60h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+30h], rcx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _pthread_cond_init
add rsp, 20h
pop rbp
retn
|
long long inline_mysql_cond_init_4(unsigned int a1, long long a2, long long a3)
{
*(_QWORD *)(a2 + 48) = ((long long ( *)(_QWORD, long long))PSI_server[12])(a1, a2);
return pthread_cond_init(a2, a3);
}
|
inline_mysql_cond_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x3bf0b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x60]
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 + 0x30],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0012a370
ADD RSP,0x20
POP RBP
RET
|
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3)
{
longlong lVar1;
lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2);
param_2[1].__align = lVar1;
pthread_cond_init(param_2,param_3);
return;
}
|
|
59,826
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&)
|
monkey531[P]llama/common/json.hpp
|
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_string()))
{
JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j));
}
s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
}
|
O1
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0x3f9ce
movq 0x8(%r14), %rax
movq %rsi, %rdi
movq %rax, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x183b0
movl $0x20, %edi
callq 0x18350
movq %rax, %rbx
movq %r14, %rdi
callq 0x3e11c
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x6beb3(%rip), %rsi # 0xab8a5
leaq 0x10(%rsp), %rdi
callq 0x3e093
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x3dec4
xorl %ebp, %ebp
leaq 0x9c8ab(%rip), %rsi # 0xdc2c8
leaq 0xcd60(%rip), %rdx # 0x4c784
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3fa52
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x3fa52
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x3fa5f
movq %rbx, %rdi
callq 0x184f0
movq %r14, %rdi
callq 0x18ba0
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_3F9CE
mov rax, [r14+8]
mov rdi, rsi
mov rsi, rax
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_3F9CE:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeStri; "type must be string, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3FA52
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3FA52
mov r14, rax
mov bpl, 1
loc_3FA52:
test bpl, bpl
jz short loc_3FA5F
mov rdi, rbx; void *
call ___cxa_free_exception
loc_3FA5F:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::from_json<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>>(
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
(long long)"type must be string, but is ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return std::string::_M_assign(a2, *(_QWORD *)(a1 + 8));
}
|
from_json<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>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x0013f9ce
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,RSI
MOV RSI,RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x001183b0
LAB_0013f9ce:
MOV EDI,0x20
CALL 0x00118350
MOV RBX,RAX
MOV RDI,R14
CALL 0x0013e11c
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0013f9eb:
LEA RSI,[0x1ab8a5]
LEA RDI,[RSP + 0x10]
CALL 0x0013e093
MOV BPL,0x1
LAB_0013f9ff:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x0013dec4
XOR EBP,EBP
LEA RSI,[0x1dc2c8]
LEA RDX,[0x14c784]
MOV RDI,RBX
CALL 0x00118b30
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::string_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,string_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == (basic_json)0x3) {
std::__cxx11::string::_M_assign((string *)param_2);
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)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>
::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 0013f9eb to 0013f9fb has its CatchHandler @ 0013fa4c */
concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be string, but is ",&local_40);
/* try { // try from 0013f9ff to 0013fa2b has its CatchHandler @ 0013fa2c */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&type_error::typeinfo,exception::~exception);
}
|
|
59,827
|
UntrackAudioBuffer
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
|
void UntrackAudioBuffer(AudioBuffer *buffer)
{
ma_mutex_lock(&AUDIO.System.lock);
{
if (buffer->prev == NULL) AUDIO.Buffer.first = buffer->next;
else buffer->prev->next = buffer->next;
if (buffer->next == NULL) AUDIO.Buffer.last = buffer->prev;
else buffer->next->prev = buffer->prev;
buffer->prev = NULL;
buffer->next = NULL;
}
ma_mutex_unlock(&AUDIO.System.lock);
}
|
O0
|
c
|
UntrackAudioBuffer:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x19c80d(%rip), %rdi # 0x216930
addq $0x12b8, %rdi # imm = 0x12B8
callq 0x1d970
movq -0x8(%rbp), %rax
cmpq $0x0, 0x180(%rax)
jne 0x7a151
movq -0x8(%rbp), %rax
movq 0x178(%rax), %rax
movq %rax, 0x19dad9(%rip) # 0x217c28
jmp 0x7a16e
movq -0x8(%rbp), %rax
movq 0x178(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x180(%rax), %rax
movq %rcx, 0x178(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x178(%rax)
jne 0x7a190
movq -0x8(%rbp), %rax
movq 0x180(%rax), %rax
movq %rax, 0x19daa2(%rip) # 0x217c30
jmp 0x7a1ad
movq -0x8(%rbp), %rax
movq 0x180(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x178(%rax), %rax
movq %rcx, 0x180(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x180(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x178(%rax)
leaq 0x19c75e(%rip), %rdi # 0x216930
addq $0x12b8, %rdi # imm = 0x12B8
callq 0x1d9e0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
UntrackAudioBuffer:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
lea rdi, AUDIO
add rdi, 12B8h
call ma_mutex_lock
mov rax, [rbp+var_8]
cmp qword ptr [rax+180h], 0
jnz short loc_7A151
mov rax, [rbp+var_8]
mov rax, [rax+178h]
mov cs:qword_217C28, rax
jmp short loc_7A16E
loc_7A151:
mov rax, [rbp+var_8]
mov rcx, [rax+178h]
mov rax, [rbp+var_8]
mov rax, [rax+180h]
mov [rax+178h], rcx
loc_7A16E:
mov rax, [rbp+var_8]
cmp qword ptr [rax+178h], 0
jnz short loc_7A190
mov rax, [rbp+var_8]
mov rax, [rax+180h]
mov cs:qword_217C30, rax
jmp short loc_7A1AD
loc_7A190:
mov rax, [rbp+var_8]
mov rcx, [rax+180h]
mov rax, [rbp+var_8]
mov rax, [rax+178h]
mov [rax+180h], rcx
loc_7A1AD:
mov rax, [rbp+var_8]
mov qword ptr [rax+180h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+178h], 0
lea rdi, AUDIO
add rdi, 12B8h
call ma_mutex_unlock
add rsp, 10h
pop rbp
retn
|
long long UntrackAudioBuffer(long long a1)
{
ma_mutex_lock((long long)&AUDIO + 4792);
if ( *(_QWORD *)(a1 + 384) )
*(_QWORD *)(*(_QWORD *)(a1 + 384) + 376LL) = *(_QWORD *)(a1 + 376);
else
qword_217C28 = *(_QWORD *)(a1 + 376);
if ( *(_QWORD *)(a1 + 376) )
*(_QWORD *)(*(_QWORD *)(a1 + 376) + 384LL) = *(_QWORD *)(a1 + 384);
else
qword_217C30 = *(_QWORD *)(a1 + 384);
*(_QWORD *)(a1 + 384) = 0LL;
*(_QWORD *)(a1 + 376) = 0LL;
return ma_mutex_unlock((long long)&AUDIO + 4792);
}
|
UntrackAudioBuffer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[0x316930]
ADD RDI,0x12b8
CALL 0x0011d970
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x180],0x0
JNZ 0x0017a151
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x178]
MOV qword ptr [0x00317c28],RAX
JMP 0x0017a16e
LAB_0017a151:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x178]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x180]
MOV qword ptr [RAX + 0x178],RCX
LAB_0017a16e:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x178],0x0
JNZ 0x0017a190
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x180]
MOV qword ptr [0x00317c30],RAX
JMP 0x0017a1ad
LAB_0017a190:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x180]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x178]
MOV qword ptr [RAX + 0x180],RCX
LAB_0017a1ad:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x180],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x178],0x0
LEA RDI,[0x316930]
ADD RDI,0x12b8
CALL 0x0011d9e0
ADD RSP,0x10
POP RBP
RET
|
void UntrackAudioBuffer(long param_1)
{
ma_mutex_lock(0x317be8);
if (*(long *)(param_1 + 0x180) == 0) {
AUDIO._4856_8_ = *(int8 *)(param_1 + 0x178);
}
else {
*(int8 *)(*(long *)(param_1 + 0x180) + 0x178) = *(int8 *)(param_1 + 0x178);
}
if (*(long *)(param_1 + 0x178) == 0) {
AUDIO._4864_8_ = *(int8 *)(param_1 + 0x180);
}
else {
*(int8 *)(*(long *)(param_1 + 0x178) + 0x180) = *(int8 *)(param_1 + 0x180);
}
*(int8 *)(param_1 + 0x180) = 0;
*(int8 *)(param_1 + 0x178) = 0;
ma_mutex_unlock(0x317be8);
return;
}
|
|
59,828
|
UntrackAudioBuffer
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
|
void UntrackAudioBuffer(AudioBuffer *buffer)
{
ma_mutex_lock(&AUDIO.System.lock);
{
if (buffer->prev == NULL) AUDIO.Buffer.first = buffer->next;
else buffer->prev->next = buffer->next;
if (buffer->next == NULL) AUDIO.Buffer.last = buffer->prev;
else buffer->next->prev = buffer->prev;
buffer->prev = NULL;
buffer->next = NULL;
}
ma_mutex_unlock(&AUDIO.System.lock);
}
|
O2
|
c
|
UntrackAudioBuffer:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xea03e(%rip), %r14 # 0x124b48
movq %r14, %rdi
callq 0x97c0
movq 0x180(%rbx), %rax
leaq 0x178(%rax), %rcx
testq %rax, %rax
leaq 0xea05e(%rip), %rax # 0x124b88
cmovneq %rcx, %rax
movq 0x178(%rbx), %rcx
movq %rcx, (%rax)
leaq 0x180(%rcx), %rax
testq %rcx, %rcx
movq 0x180(%rbx), %rcx
leaq 0xea040(%rip), %rdx # 0x124b90
cmovneq %rax, %rdx
movq %rcx, (%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x178(%rbx)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x93b0
|
UntrackAudioBuffer:
push r14
push rbx
push rax
mov rbx, rdi
lea r14, unk_124B48
mov rdi, r14
call _pthread_mutex_lock
mov rax, [rbx+180h]
lea rcx, [rax+178h]
test rax, rax
lea rax, qword_124B88
cmovnz rax, rcx
mov rcx, [rbx+178h]
mov [rax], rcx
lea rax, [rcx+180h]
test rcx, rcx
mov rcx, [rbx+180h]
lea rdx, qword_124B90
cmovnz rdx, rax
mov [rdx], rcx
xorps xmm0, xmm0
movups xmmword ptr [rbx+178h], xmm0
mov rdi, r14
add rsp, 8
pop rbx
pop r14
jmp _pthread_mutex_unlock
|
long long UntrackAudioBuffer(long long a1)
{
long long v1; // rax
long long *v2; // rcx
bool v3; // zf
long long *v4; // rax
long long v5; // rcx
long long *v6; // rdx
pthread_mutex_lock(&unk_124B48);
v1 = *(_QWORD *)(a1 + 384);
v2 = (long long *)(v1 + 376);
v3 = v1 == 0;
v4 = &qword_124B88;
if ( !v3 )
v4 = v2;
v5 = *(_QWORD *)(a1 + 376);
*v4 = v5;
v6 = &qword_124B90;
if ( v5 )
v6 = (long long *)(v5 + 384);
*v6 = *(_QWORD *)(a1 + 384);
*(_OWORD *)(a1 + 376) = 0LL;
return pthread_mutex_unlock(&unk_124B48);
}
|
UntrackAudioBuffer:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA R14,[0x224b48]
MOV RDI,R14
CALL 0x001097c0
MOV RAX,qword ptr [RBX + 0x180]
LEA RCX,[RAX + 0x178]
TEST RAX,RAX
LEA RAX,[0x224b88]
CMOVNZ RAX,RCX
MOV RCX,qword ptr [RBX + 0x178]
MOV qword ptr [RAX],RCX
LEA RAX,[RCX + 0x180]
TEST RCX,RCX
MOV RCX,qword ptr [RBX + 0x180]
LEA RDX,[0x224b90]
CMOVNZ RDX,RAX
MOV qword ptr [RDX],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x178],XMM0
MOV RDI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP 0x001093b0
|
void UntrackAudioBuffer(long param_1)
{
long lVar1;
long *plVar2;
int8 *puVar3;
pthread_mutex_lock((pthread_mutex_t *)(AUDIO + 0x12b8));
plVar2 = (long *)(AUDIO + 0x12f8);
if (*(long *)(param_1 + 0x180) != 0) {
plVar2 = (long *)(*(long *)(param_1 + 0x180) + 0x178);
}
lVar1 = *(long *)(param_1 + 0x178);
*plVar2 = lVar1;
puVar3 = (int8 *)(AUDIO + 0x1300);
if (lVar1 != 0) {
puVar3 = (int8 *)(lVar1 + 0x180);
}
*puVar3 = *(int8 *)(param_1 + 0x180);
*(int8 *)(param_1 + 0x178) = 0;
*(int8 *)(param_1 + 0x180) = 0;
pthread_mutex_unlock((pthread_mutex_t *)(AUDIO + 0x12b8));
return;
}
|
|
59,829
|
UntrackAudioBuffer
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
|
void UntrackAudioBuffer(AudioBuffer *buffer)
{
ma_mutex_lock(&AUDIO.System.lock);
{
if (buffer->prev == NULL) AUDIO.Buffer.first = buffer->next;
else buffer->prev->next = buffer->next;
if (buffer->next == NULL) AUDIO.Buffer.last = buffer->prev;
else buffer->next->prev = buffer->prev;
buffer->prev = NULL;
buffer->next = NULL;
}
ma_mutex_unlock(&AUDIO.System.lock);
}
|
O3
|
c
|
UntrackAudioBuffer:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xf5fdb(%rip), %r14 # 0x138b28
movq %r14, %rdi
callq 0xa7d0
movq 0x180(%rbx), %rax
leaq 0x178(%rax), %rcx
testq %rax, %rax
leaq 0xf5ffb(%rip), %rax # 0x138b68
cmovneq %rcx, %rax
movq 0x178(%rbx), %rcx
movq %rcx, (%rax)
leaq 0x180(%rcx), %rax
testq %rcx, %rcx
movq 0x180(%rbx), %rcx
leaq 0xf5fdd(%rip), %rdx # 0x138b70
cmovneq %rax, %rdx
movq %rcx, (%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x178(%rbx)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa3c0
|
UntrackAudioBuffer:
push r14
push rbx
push rax
mov rbx, rdi
lea r14, unk_138B28
mov rdi, r14
call _pthread_mutex_lock
mov rax, [rbx+180h]
lea rcx, [rax+178h]
test rax, rax
lea rax, qword_138B68
cmovnz rax, rcx
mov rcx, [rbx+178h]
mov [rax], rcx
lea rax, [rcx+180h]
test rcx, rcx
mov rcx, [rbx+180h]
lea rdx, qword_138B70
cmovnz rdx, rax
mov [rdx], rcx
xorps xmm0, xmm0
movups xmmword ptr [rbx+178h], xmm0
mov rdi, r14
add rsp, 8
pop rbx
pop r14
jmp _pthread_mutex_unlock
|
long long UntrackAudioBuffer(long long a1)
{
long long v1; // rax
long long *v2; // rcx
bool v3; // zf
long long *v4; // rax
long long v5; // rcx
long long *v6; // rdx
pthread_mutex_lock(&unk_138B28);
v1 = *(_QWORD *)(a1 + 384);
v2 = (long long *)(v1 + 376);
v3 = v1 == 0;
v4 = &qword_138B68;
if ( !v3 )
v4 = v2;
v5 = *(_QWORD *)(a1 + 376);
*v4 = v5;
v6 = &qword_138B70;
if ( v5 )
v6 = (long long *)(v5 + 384);
*v6 = *(_QWORD *)(a1 + 384);
*(_OWORD *)(a1 + 376) = 0LL;
return pthread_mutex_unlock(&unk_138B28);
}
|
UntrackAudioBuffer:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA R14,[0x238b28]
MOV RDI,R14
CALL 0x0010a7d0
MOV RAX,qword ptr [RBX + 0x180]
LEA RCX,[RAX + 0x178]
TEST RAX,RAX
LEA RAX,[0x238b68]
CMOVNZ RAX,RCX
MOV RCX,qword ptr [RBX + 0x178]
MOV qword ptr [RAX],RCX
LEA RAX,[RCX + 0x180]
TEST RCX,RCX
MOV RCX,qword ptr [RBX + 0x180]
LEA RDX,[0x238b70]
CMOVNZ RDX,RAX
MOV qword ptr [RDX],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x178],XMM0
MOV RDI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0010a3c0
|
void UntrackAudioBuffer(long param_1)
{
long lVar1;
long *plVar2;
int8 *puVar3;
pthread_mutex_lock((pthread_mutex_t *)(AUDIO + 0x12b8));
plVar2 = (long *)(AUDIO + 0x12f8);
if (*(long *)(param_1 + 0x180) != 0) {
plVar2 = (long *)(*(long *)(param_1 + 0x180) + 0x178);
}
lVar1 = *(long *)(param_1 + 0x178);
*plVar2 = lVar1;
puVar3 = (int8 *)(AUDIO + 0x1300);
if (lVar1 != 0) {
puVar3 = (int8 *)(lVar1 + 0x180);
}
*puVar3 = *(int8 *)(param_1 + 0x180);
*(int8 *)(param_1 + 0x178) = 0;
*(int8 *)(param_1 + 0x180) = 0;
pthread_mutex_unlock((pthread_mutex_t *)(AUDIO + 0x12b8));
return;
}
|
|
59,830
|
codegen_compile_and_execute
|
tsotchke[P]eshkol/src/backend/codegen/compiler.c
|
int codegen_compile_and_execute(CodegenContext* context, const char* c_file, char** args, int argc) {
assert(context != NULL);
assert(c_file != NULL);
// Determine the include path based on the Eshkol directory
char include_path[1024] = {0};
// Get the path to the source file
char source_path[1024] = {0};
char *source_dir = NULL;
char *eshkol_dir = NULL;
// Get the absolute path of the source file
if (c_file[0] == '/') {
// Absolute path
strncpy(source_path, c_file, sizeof(source_path) - 1);
} else {
// Relative path, prepend current directory
char cwd[1024] = {0};
if (getcwd(cwd, sizeof(cwd)) == NULL) {
DiagnosticContext* diagnostics = codegen_context_get_diagnostics(context);
diagnostic_error(diagnostics, 0, 0, "Failed to get current working directory");
return -1;
}
snprintf(source_path, sizeof(source_path), "%s/%s", cwd, c_file);
}
// Extract the directory from the source path
source_dir = strdup(source_path);
char *last_slash = strrchr(source_dir, '/');
if (last_slash) {
*last_slash = '\0';
}
// Determine the Eshkol directory by finding "eshkol" in the source path
eshkol_dir = strstr(source_dir, "eshkol");
if (eshkol_dir) {
// If the source file is in the Eshkol directory or a subdirectory
// Set include path relative to the Eshkol root
*eshkol_dir = '\0'; // Truncate at "eshkol"
snprintf(include_path, sizeof(include_path), "%seshkol/include", source_dir);
} else {
// If the source file is outside the Eshkol directory
// Assume the Eshkol directory is a sibling of the current directory
snprintf(include_path, sizeof(include_path), "%s/eshkol/include", source_dir);
}
// Create a temporary executable name
char temp_executable[1024];
snprintf(temp_executable, sizeof(temp_executable), "/tmp/eshkol_temp_%d", getpid());
// Create command to compile the C file
char compile_cmd[1024];
// Create closure.c path based on the Eshkol directory
char closure_path[1024];
if (eshkol_dir) {
snprintf(closure_path, sizeof(closure_path), "%seshkol/src/core/utils/closure.c", source_dir);
} else {
snprintf(closure_path, sizeof(closure_path), "%s/src/core/utils/closure.c", source_dir);
}
snprintf(compile_cmd, sizeof(compile_cmd), "gcc -I%s -o %s %s %s", include_path, temp_executable, c_file, closure_path);
// Free allocated memory
free(source_dir);
// Compile the C file
int result = system(compile_cmd);
if (result != 0) {
DiagnosticContext* diagnostics = codegen_context_get_diagnostics(context);
diagnostic_error(diagnostics, 0, 0, "Failed to compile generated C code");
return -1;
}
// Create command to execute the compiled program
char execute_cmd[1024];
snprintf(execute_cmd, sizeof(execute_cmd), "%s", temp_executable);
// Add arguments
for (int i = 0; i < argc; i++) {
strcat(execute_cmd, " ");
strcat(execute_cmd, args[i]);
}
// Execute the compiled program
result = system(execute_cmd);
// Clean up the temporary executable
unlink(temp_executable);
return result;
}
|
O1
|
c
|
codegen_compile_and_execute:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1828, %rsp # imm = 0x1828
testq %rdi, %rdi
je 0xc108
movq %rsi, %r15
testq %rsi, %rsi
je 0xc127
movl %ecx, %ebp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0xc20(%rsp), %rdi
movl $0x400, %edx # imm = 0x400
xorl %esi, %esi
callq 0x21a0
leaq 0x820(%rsp), %rdi
movl $0x400, %edx # imm = 0x400
xorl %esi, %esi
callq 0x21a0
cmpb $0x2f, (%r15)
jne 0xbeec
leaq 0x820(%rsp), %rdi
movl $0x3ff, %edx # imm = 0x3FF
movq %r15, %rsi
callq 0x2070
jmp 0xbf5e
leaq 0x20(%rsp), %r12
movl $0x400, %edx # imm = 0x400
movq %r12, %rdi
xorl %esi, %esi
callq 0x21a0
movl $0x400, %esi # imm = 0x400
movq %r12, %rdi
callq 0x21b0
movq %rax, %r12
testq %rax, %rax
je 0xbf3a
leaq 0x11d16(%rip), %rdx # 0x1dc32
leaq 0x820(%rsp), %rdi
leaq 0x20(%rsp), %rcx
movl $0x400, %esi # imm = 0x400
movq %r15, %r8
xorl %eax, %eax
callq 0x2160
jmp 0xbf55
movq %r14, %rdi
callq 0xb838
leaq 0x11cc1(%rip), %rcx # 0x1dc0a
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3ef1
testq %r12, %r12
je 0xc078
leaq 0x820(%rsp), %rdi
callq 0x22d0
movq %rax, %r12
movq %rax, %rdi
movl $0x2f, %esi
callq 0x2170
testq %rax, %rax
je 0xbf83
movb $0x0, (%rax)
movl %ebp, 0x14(%rsp)
leaq 0x11caa(%rip), %rsi # 0x1dc38
movq %r12, %rdi
callq 0x22f0
testq %rax, %rax
movq %r14, 0x18(%rsp)
je 0xbfb3
movb $0x0, (%rax)
leaq 0x11c95(%rip), %rdx # 0x1dc3f
leaq 0x11cc5(%rip), %rbp # 0x1dc76
jmp 0xbfc1
leaq 0x11c96(%rip), %rdx # 0x1dc50
leaq 0x11cd7(%rip), %rbp # 0x1dc98
leaq 0xc20(%rsp), %rdi
movl $0x400, %esi # imm = 0x400
movq %r12, %rcx
xorl %eax, %eax
callq 0x2160
callq 0x20d0
leaq 0x11c7e(%rip), %rdx # 0x1dc62
leaq 0x20(%rsp), %r14
movl $0x400, %esi # imm = 0x400
movq %r14, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0x2160
leaq 0x1020(%rsp), %r13
movl $0x400, %esi # imm = 0x400
movq %r13, %rdi
movq %rbp, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x2160
movq %r13, (%rsp)
leaq 0x11c92(%rip), %rdx # 0x1dcb4
leaq 0x1420(%rsp), %r13
movl $0x400, %esi # imm = 0x400
movq %r13, %rdi
leaq 0xc20(%rsp), %rcx
movq %r14, %r8
movq %r15, %r9
xorl %eax, %eax
callq 0x2160
movq %r12, %rdi
callq 0x2030
movq %r13, %rdi
callq 0x2120
testl %eax, %eax
je 0xc07f
movq 0x18(%rsp), %rdi
callq 0xb838
leaq 0x11c5d(%rip), %rcx # 0x1dcc9
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3ef1
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
jmp 0xc0f4
leaq 0x11991(%rip), %rdx # 0x1da17
leaq 0x420(%rsp), %rdi
leaq 0x20(%rsp), %rcx
movl $0x400, %esi # imm = 0x400
xorl %eax, %eax
callq 0x2160
movl 0x14(%rsp), %eax
testl %eax, %eax
jle 0xc0db
movl %eax, %r15d
xorl %r12d, %r12d
leaq 0x420(%rsp), %r14
movq %r14, %rdi
callq 0x2100
movw $0x20, 0x420(%rsp,%rax)
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
callq 0x22a0
incq %r12
cmpq %r12, %r15
jne 0xc0b5
leaq 0x420(%rsp), %rdi
callq 0x2120
movl %eax, %ebx
leaq 0x20(%rsp), %rdi
callq 0x2060
movl %ebx, %eax
addq $0x1828, %rsp # imm = 0x1828
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xec58(%rip), %rdi # 0x1ad67
leaq 0x1183e(%rip), %rsi # 0x1d954
leaq 0x11a90(%rip), %rcx # 0x1dbad
movl $0x71, %edx
callq 0x2180
leaq 0x11acd(%rip), %rdi # 0x1dbfb
leaq 0x1181f(%rip), %rsi # 0x1d954
leaq 0x11a71(%rip), %rcx # 0x1dbad
movl $0x72, %edx
callq 0x2180
nop
|
codegen_compile_and_execute:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1828h
test rdi, rdi
jz loc_C108
mov r15, rsi
test rsi, rsi
jz loc_C127
mov ebp, ecx
mov rbx, rdx
mov r14, rdi
lea rdi, [rsp+1858h+var_C38]
mov edx, 400h
xor esi, esi
call _memset
lea rdi, [rsp+1858h+var_1038]
mov edx, 400h
xor esi, esi
call _memset
cmp byte ptr [r15], 2Fh ; '/'
jnz short loc_BEEC
lea rdi, [rsp+1858h+var_1038]
mov edx, 3FFh
mov rsi, r15
call _strncpy
jmp short loc_BF5E
loc_BEEC:
lea r12, [rsp+1858h+var_1838]
mov edx, 400h
mov rdi, r12
xor esi, esi
call _memset
mov esi, 400h
mov rdi, r12
call _getcwd
mov r12, rax
test rax, rax
jz short loc_BF3A
lea rdx, aSS; "%s/%s"
lea rdi, [rsp+1858h+var_1038]
lea rcx, [rsp+1858h+var_1838]
mov esi, 400h
mov r8, r15
xor eax, eax
call _snprintf
jmp short loc_BF55
loc_BF3A:
mov rdi, r14
call codegen_context_get_diagnostics
lea rcx, aFailedToGetCur; "Failed to get current working directory"
mov rdi, rax
xor esi, esi
xor edx, edx
call diagnostic_error
loc_BF55:
test r12, r12
jz loc_C078
loc_BF5E:
lea rdi, [rsp+1858h+var_1038]
call _strdup
mov r12, rax
mov rdi, rax
mov esi, 2Fh ; '/'
call _strrchr
test rax, rax
jz short loc_BF83
mov byte ptr [rax], 0
loc_BF83:
mov [rsp+1858h+var_1844], ebp
lea rsi, aEshkol; "eshkol"
mov rdi, r12
call _strstr
test rax, rax
mov [rsp+1858h+var_1840], r14
jz short loc_BFB3
mov byte ptr [rax], 0
lea rdx, aSeshkolInclude; "%seshkol/include"
lea rbp, aSeshkolSrcCore; "%seshkol/src/core/utils/closure.c"
jmp short loc_BFC1
loc_BFB3:
lea rdx, aSEshkolInclude; "%s/eshkol/include"
lea rbp, aSSrcCoreUtilsC; "%s/src/core/utils/closure.c"
loc_BFC1:
lea rdi, [rsp+1858h+var_C38]
mov esi, 400h
mov rcx, r12
xor eax, eax
call _snprintf
call _getpid
lea rdx, aTmpEshkolTempD; "/tmp/eshkol_temp_%d"
lea r14, [rsp+1858h+var_1838]
mov esi, 400h
mov rdi, r14
mov ecx, eax
xor eax, eax
call _snprintf
lea r13, [rsp+1858h+var_838]
mov esi, 400h
mov rdi, r13
mov rdx, rbp
mov rcx, r12
xor eax, eax
call _snprintf
mov [rsp+1858h+var_1858], r13
lea rdx, aGccISOSSS; "gcc -I%s -o %s %s %s"
lea r13, [rsp+1858h+var_438]
mov esi, 400h
mov rdi, r13
lea rcx, [rsp+1858h+var_C38]
mov r8, r14
mov r9, r15
xor eax, eax
call _snprintf
mov rdi, r12
call _free
mov rdi, r13
call _system
test eax, eax
jz short loc_C07F
mov rdi, [rsp+1858h+var_1840]
call codegen_context_get_diagnostics
lea rcx, aFailedToCompil; "Failed to compile generated C code"
mov rdi, rax
xor esi, esi
xor edx, edx
call diagnostic_error
loc_C078:
mov ebx, 0FFFFFFFFh
jmp short loc_C0F4
loc_C07F:
lea rdx, aOpeningOutputF+15h; "%s"
lea rdi, [rsp+1858h+var_1438]
lea rcx, [rsp+1858h+var_1838]
mov esi, 400h
xor eax, eax
call _snprintf
mov eax, [rsp+1858h+var_1844]
test eax, eax
jle short loc_C0DB
mov r15d, eax
xor r12d, r12d
lea r14, [rsp+1858h+var_1438]
loc_C0B5:
mov rdi, r14
call _strlen
mov [rsp+rax+1858h+var_1438], 20h ; ' '
mov rsi, [rbx+r12*8]
mov rdi, r14
call _strcat
inc r12
cmp r15, r12
jnz short loc_C0B5
loc_C0DB:
lea rdi, [rsp+1858h+var_1438]
call _system
mov ebx, eax
lea rdi, [rsp+1858h+var_1838]
call _unlink
loc_C0F4:
mov eax, ebx
add rsp, 1828h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C108:
lea rdi, aContextNull; "context != NULL"
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntCodegenComp; "int codegen_compile_and_execute(Codegen"...
mov edx, 71h ; 'q'
call ___assert_fail
loc_C127:
lea rdi, aCFileNull; "c_file != NULL"
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntCodegenComp; "int codegen_compile_and_execute(Codegen"...
mov edx, 72h ; 'r'
call ___assert_fail
|
long long codegen_compile_and_execute(long long a1, const char *a2, long long a3, int a4)
{
long long v6; // r12
long long *diagnostics; // rax
long long v8; // r8
long long v9; // r9
long long v10; // r12
_BYTE *v11; // rax
_BYTE *v12; // rax
const char *v13; // rbp
int v14; // eax
long long *v15; // rax
long long v16; // r8
long long v17; // r9
unsigned int v18; // ebx
long long i; // r12
int v21; // [rsp+14h] [rbp-1844h]
char v22[1024]; // [rsp+20h] [rbp-1838h] BYREF
_WORD v23[512]; // [rsp+420h] [rbp-1438h] BYREF
_BYTE v24[1024]; // [rsp+820h] [rbp-1038h] BYREF
char v25[1024]; // [rsp+C20h] [rbp-C38h] BYREF
char v26[1024]; // [rsp+1020h] [rbp-838h] BYREF
_BYTE v27[1080]; // [rsp+1420h] [rbp-438h] BYREF
if ( !a1 )
__assert_fail(
"context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/compiler.c",
113LL,
"int codegen_compile_and_execute(CodegenContext *, const char *, char **, int)");
if ( !a2 )
__assert_fail(
"c_file != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/compiler.c",
114LL,
"int codegen_compile_and_execute(CodegenContext *, const char *, char **, int)");
memset(v25, 0LL, sizeof(v25));
memset(v24, 0LL, sizeof(v24));
if ( *a2 == 47 )
{
strncpy(v24, a2, 1023LL);
}
else
{
memset(v22, 0LL, sizeof(v22));
v6 = getcwd(v22, 1024LL);
if ( v6 )
{
snprintf(v24, 1024LL, "%s/%s", v22, a2);
}
else
{
diagnostics = (long long *)codegen_context_get_diagnostics(a1);
diagnostic_error(diagnostics, 0, 0, (long long)"Failed to get current working directory", v8, v9);
}
if ( !v6 )
return (unsigned int)-1;
}
v10 = strdup(v24);
v11 = (_BYTE *)strrchr(v10, 47LL);
if ( v11 )
*v11 = 0;
v21 = a4;
v12 = (_BYTE *)strstr(v10, "eshkol");
if ( v12 )
{
*v12 = 0;
v13 = "%seshkol/src/core/utils/closure.c";
snprintf(v25, 1024LL, "%seshkol/include", v10);
}
else
{
v13 = "%s/src/core/utils/closure.c";
snprintf(v25, 1024LL, "%s/eshkol/include", v10);
}
v14 = getpid();
snprintf(v22, 1024LL, "/tmp/eshkol_temp_%d", v14);
snprintf(v26, 1024LL, v13, v10);
snprintf(v27, 1024LL, "gcc -I%s -o %s %s %s", v25, v22, a2, v26);
free(v10);
if ( (unsigned int)system(v27) )
{
v15 = (long long *)codegen_context_get_diagnostics(a1);
diagnostic_error(v15, 0, 0, (long long)"Failed to compile generated C code", v16, v17);
return (unsigned int)-1;
}
snprintf(v23, 1024LL, "%s", v22);
if ( v21 > 0 )
{
for ( i = 0LL; i != v21; strcat(v23, *(_QWORD *)(a3 + 8 * i++)) )
*(_WORD *)((char *)v23 + strlen(v23)) = 32;
}
v18 = system(v23);
unlink(v22);
return v18;
}
|
codegen_compile_and_execute:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1828
TEST RDI,RDI
JZ 0x0010c108
MOV R15,RSI
TEST RSI,RSI
JZ 0x0010c127
MOV EBP,ECX
MOV RBX,RDX
MOV R14,RDI
LEA RDI,[RSP + 0xc20]
MOV EDX,0x400
XOR ESI,ESI
CALL 0x001021a0
LEA RDI,[RSP + 0x820]
MOV EDX,0x400
XOR ESI,ESI
CALL 0x001021a0
CMP byte ptr [R15],0x2f
JNZ 0x0010beec
LEA RDI,[RSP + 0x820]
MOV EDX,0x3ff
MOV RSI,R15
CALL 0x00102070
JMP 0x0010bf5e
LAB_0010beec:
LEA R12,[RSP + 0x20]
MOV EDX,0x400
MOV RDI,R12
XOR ESI,ESI
CALL 0x001021a0
MOV ESI,0x400
MOV RDI,R12
CALL 0x001021b0
MOV R12,RAX
TEST RAX,RAX
JZ 0x0010bf3a
LEA RDX,[0x11dc32]
LEA RDI,[RSP + 0x820]
LEA RCX,[RSP + 0x20]
MOV ESI,0x400
MOV R8,R15
XOR EAX,EAX
CALL 0x00102160
JMP 0x0010bf55
LAB_0010bf3a:
MOV RDI,R14
CALL 0x0010b838
LEA RCX,[0x11dc0a]
MOV RDI,RAX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00103ef1
LAB_0010bf55:
TEST R12,R12
JZ 0x0010c078
LAB_0010bf5e:
LEA RDI,[RSP + 0x820]
CALL 0x001022d0
MOV R12,RAX
MOV RDI,RAX
MOV ESI,0x2f
CALL 0x00102170
TEST RAX,RAX
JZ 0x0010bf83
MOV byte ptr [RAX],0x0
LAB_0010bf83:
MOV dword ptr [RSP + 0x14],EBP
LEA RSI,[0x11dc38]
MOV RDI,R12
CALL 0x001022f0
TEST RAX,RAX
MOV qword ptr [RSP + 0x18],R14
JZ 0x0010bfb3
MOV byte ptr [RAX],0x0
LEA RDX,[0x11dc3f]
LEA RBP,[0x11dc76]
JMP 0x0010bfc1
LAB_0010bfb3:
LEA RDX,[0x11dc50]
LEA RBP,[0x11dc98]
LAB_0010bfc1:
LEA RDI,[RSP + 0xc20]
MOV ESI,0x400
MOV RCX,R12
XOR EAX,EAX
CALL 0x00102160
CALL 0x001020d0
LEA RDX,[0x11dc62]
LEA R14,[RSP + 0x20]
MOV ESI,0x400
MOV RDI,R14
MOV ECX,EAX
XOR EAX,EAX
CALL 0x00102160
LEA R13,[RSP + 0x1020]
MOV ESI,0x400
MOV RDI,R13
MOV RDX,RBP
MOV RCX,R12
XOR EAX,EAX
CALL 0x00102160
MOV qword ptr [RSP],R13
LEA RDX,[0x11dcb4]
LEA R13,[RSP + 0x1420]
MOV ESI,0x400
MOV RDI,R13
LEA RCX,[RSP + 0xc20]
MOV R8,R14
MOV R9,R15
XOR EAX,EAX
CALL 0x00102160
MOV RDI,R12
CALL 0x00102030
MOV RDI,R13
CALL 0x00102120
TEST EAX,EAX
JZ 0x0010c07f
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0010b838
LEA RCX,[0x11dcc9]
MOV RDI,RAX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00103ef1
LAB_0010c078:
MOV EBX,0xffffffff
JMP 0x0010c0f4
LAB_0010c07f:
LEA RDX,[0x11da17]
LEA RDI,[RSP + 0x420]
LEA RCX,[RSP + 0x20]
MOV ESI,0x400
XOR EAX,EAX
CALL 0x00102160
MOV EAX,dword ptr [RSP + 0x14]
TEST EAX,EAX
JLE 0x0010c0db
MOV R15D,EAX
XOR R12D,R12D
LEA R14,[RSP + 0x420]
LAB_0010c0b5:
MOV RDI,R14
CALL 0x00102100
MOV word ptr [RSP + RAX*0x1 + 0x420],0x20
MOV RSI,qword ptr [RBX + R12*0x8]
MOV RDI,R14
CALL 0x001022a0
INC R12
CMP R15,R12
JNZ 0x0010c0b5
LAB_0010c0db:
LEA RDI,[RSP + 0x420]
CALL 0x00102120
MOV EBX,EAX
LEA RDI,[RSP + 0x20]
CALL 0x00102060
LAB_0010c0f4:
MOV EAX,EBX
ADD RSP,0x1828
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0010c108:
LEA RDI,[0x11ad67]
LEA RSI,[0x11d954]
LEA RCX,[0x11dbad]
MOV EDX,0x71
CALL 0x00102180
LAB_0010c127:
LEA RDI,[0x11dbfb]
LEA RSI,[0x11d954]
LEA RCX,[0x11dbad]
MOV EDX,0x72
CALL 0x00102180
|
int codegen_compile_and_execute(long param_1,char *param_2,long param_3,uint param_4)
{
uint uVar1;
int iVar2;
char *pcVar3;
char *pcVar4;
int8 uVar5;
size_t sVar6;
char *__format;
ulong uVar7;
char local_1838 [1024];
char local_1438 [1024];
char local_1038 [1024];
char local_c38 [1024];
char local_838 [1024];
char local_438 [1032];
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/compiler.c"
,0x71,
"int codegen_compile_and_execute(CodegenContext *, const char *, char **, int)");
}
if (param_2 == (char *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("c_file != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/compiler.c"
,0x72,
"int codegen_compile_and_execute(CodegenContext *, const char *, char **, int)");
}
memset(local_c38,0,0x400);
memset(local_1038,0,0x400);
if (*param_2 == '/') {
strncpy(local_1038,param_2,0x3ff);
}
else {
memset(local_1838,0,0x400);
pcVar3 = getcwd(local_1838,0x400);
if (pcVar3 == (char *)0x0) {
uVar5 = codegen_context_get_diagnostics(param_1);
diagnostic_error(uVar5,0,0,"Failed to get current working directory");
return -1;
}
snprintf(local_1038,0x400,"%s/%s",local_1838,param_2);
}
pcVar3 = strdup(local_1038);
pcVar4 = strrchr(pcVar3,0x2f);
if (pcVar4 != (char *)0x0) {
*pcVar4 = '\0';
}
pcVar4 = strstr(pcVar3,"eshkol");
if (pcVar4 == (char *)0x0) {
pcVar4 = "%s/eshkol/include";
__format = "%s/src/core/utils/closure.c";
}
else {
*pcVar4 = '\0';
pcVar4 = "%seshkol/include";
__format = "%seshkol/src/core/utils/closure.c";
}
snprintf(local_c38,0x400,pcVar4,pcVar3);
uVar1 = getpid();
snprintf(local_1838,0x400,"/tmp/eshkol_temp_%d",(ulong)uVar1);
snprintf(local_838,0x400,__format,pcVar3);
snprintf(local_438,0x400,"gcc -I%s -o %s %s %s",local_c38,local_1838,param_2,local_838);
free(pcVar3);
iVar2 = system(local_438);
if (iVar2 != 0) {
uVar5 = codegen_context_get_diagnostics(param_1);
diagnostic_error(uVar5,0,0,"Failed to compile generated C code");
return -1;
}
snprintf(local_1438,0x400,"%s",local_1838);
if (0 < (int)param_4) {
uVar7 = 0;
do {
sVar6 = strlen(local_1438);
(local_1438 + sVar6)[0] = ' ';
(local_1438 + sVar6)[1] = '\0';
strcat(local_1438,*(char **)(param_3 + uVar7 * 8));
uVar7 = uVar7 + 1;
} while (param_4 != uVar7);
}
iVar2 = system(local_1438);
unlink(local_1838);
return iVar2;
}
|
|
59,831
|
my_strerror
|
eloqsql/strings/my_vsnprintf.c
|
const char* my_strerror(char *buf, size_t len, int nr)
{
char *msg= NULL;
buf[0]= '\0'; /* failsafe */
if (nr <= 0)
{
strmake(buf, (nr == 0 ?
"Internal error/check (Not system error)" :
"Internal error < 0 (Not system error)"),
len-1);
return buf;
}
/*
These (handler-) error messages are shared by perror, as required
by the principle of least surprise.
*/
if ((nr >= HA_ERR_FIRST) && (nr <= HA_ERR_LAST))
{
msg= (char *) handler_error_messages[nr - HA_ERR_FIRST];
strmake(buf, msg, len - 1);
}
else
{
/*
On Windows, do things the Windows way. On a system that supports both
the GNU and the XSI variant, use whichever was configured (GNU); if
this choice is not advertised, use the default (POSIX/XSI). Testing
for __GNUC__ is not sufficient to determine whether this choice exists.
*/
#if defined(_WIN32)
strerror_s(buf, len, nr);
#elif ((defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE >= 200112L)) || \
(defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \
! defined _GNU_SOURCE
strerror_r(nr, buf, len); /* I can build with or without GNU */
#elif defined(__GLIBC__) && defined (_GNU_SOURCE)
char *r= strerror_r(nr, buf, len);
if (r != buf) /* Want to help, GNU? */
strmake(buf, r, len - 1); /* Then don't. */
#else
strerror_r(nr, buf, len);
#endif
}
/*
strerror() return values are implementation-dependent, so let's
be pragmatic.
*/
if (!buf[0])
strmake(buf, "unknown error", len - 1);
return buf;
}
|
O0
|
c
|
my_strerror:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
cmpl $0x0, -0x1c(%rbp)
jg 0x281ce
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %ecx
leaq 0x51e47(%rip), %rsi # 0x79fed
leaq 0x51e18(%rip), %rax # 0x79fc5
cmpl $0x0, %ecx
cmoveq %rax, %rsi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
callq 0x28a40
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2826a
cmpl $0x78, -0x1c(%rbp)
jl 0x2820c
cmpl $0xc6, -0x1c(%rbp)
jg 0x2820c
movl -0x1c(%rbp), %eax
subl $0x78, %eax
movslq %eax, %rcx
leaq 0x1a5ee3(%rip), %rax # 0x1ce0d0
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
callq 0x28a40
jmp 0x28241
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x240d0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x2823f
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
callq 0x28a40
jmp 0x28241
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x28262
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
leaq 0x51db6(%rip), %rsi # 0x7a013
callq 0x28a40
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strerror:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], 0
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
cmp [rbp+var_1C], 0
jg short loc_281CE
mov rdi, [rbp+var_10]
mov ecx, [rbp+var_1C]
lea rsi, aInternalError0; "Internal error < 0 (Not system error)"
lea rax, aInternalErrorC; "Internal error/check (Not system error)"
cmp ecx, 0
cmovz rsi, rax
mov rdx, [rbp+var_18]
sub rdx, 1
call strmake
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
jmp loc_2826A
loc_281CE:
cmp [rbp+var_1C], 78h ; 'x'
jl short loc_2820C
cmp [rbp+var_1C], 0C6h
jg short loc_2820C
mov eax, [rbp+var_1C]
sub eax, 78h ; 'x'
movsxd rcx, eax
lea rax, handler_error_messages
mov rax, [rax+rcx*8]
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_18]
sub rdx, 1
call strmake
jmp short loc_28241
loc_2820C:
mov edi, [rbp+var_1C]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _strerror_r
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_10]
jz short loc_2823F
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_18]
sub rdx, 1
call strmake
loc_2823F:
jmp short $+2
loc_28241:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jnz short loc_28262
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
sub rdx, 1
lea rsi, aUnknownError; "unknown error"
call strmake
loc_28262:
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_2826A:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
_BYTE * my_strerror(_BYTE *a1, long long a2, int a3)
{
const char *v3; // rsi
long long v5; // [rsp+0h] [rbp-30h]
*a1 = 0;
if ( a3 > 0 )
{
if ( a3 < 120 || a3 > 198 )
{
v5 = strerror_r((unsigned int)a3, a1, a2);
if ( (_BYTE *)v5 != a1 )
strmake(a1, v5, a2 - 1);
}
else
{
strmake(a1, handler_error_messages[a3 - 120], a2 - 1);
}
if ( !*a1 )
strmake(a1, "unknown error", a2 - 1);
return a1;
}
else
{
v3 = "Internal error < 0 (Not system error)";
if ( !a3 )
v3 = "Internal error/check (Not system error)";
strmake(a1, v3, a2 - 1);
return a1;
}
}
|
my_strerror:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
CMP dword ptr [RBP + -0x1c],0x0
JG 0x001281ce
MOV RDI,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
LEA RSI,[0x179fed]
LEA RAX,[0x179fc5]
CMP ECX,0x0
CMOVZ RSI,RAX
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,0x1
CALL 0x00128a40
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012826a
LAB_001281ce:
CMP dword ptr [RBP + -0x1c],0x78
JL 0x0012820c
CMP dword ptr [RBP + -0x1c],0xc6
JG 0x0012820c
MOV EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x78
MOVSXD RCX,EAX
LEA RAX,[0x2ce0d0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,0x1
CALL 0x00128a40
JMP 0x00128241
LAB_0012820c:
MOV EDI,dword ptr [RBP + -0x1c]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001240d0
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x10]
JZ 0x0012823f
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,0x1
CALL 0x00128a40
LAB_0012823f:
JMP 0x00128241
LAB_00128241:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JNZ 0x00128262
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,0x1
LEA RSI,[0x17a013]
CALL 0x00128a40
LAB_00128262:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_0012826a:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
char * my_strerror(char *param_1,size_t param_2,int param_3)
{
char *pcVar1;
*param_1 = '\0';
if (param_3 < 1) {
pcVar1 = "Internal error < 0 (Not system error)";
if (param_3 == 0) {
pcVar1 = "Internal error/check (Not system error)";
}
strmake(param_1,pcVar1,param_2 - 1);
}
else {
if ((param_3 < 0x78) || (0xc6 < param_3)) {
pcVar1 = strerror_r(param_3,param_1,param_2);
if (pcVar1 != param_1) {
strmake(param_1,pcVar1,param_2 - 1);
}
}
else {
strmake(param_1,*(int8 *)(handler_error_messages + (long)(param_3 + -0x78) * 8),
param_2 - 1);
}
if (*param_1 == '\0') {
strmake(param_1,"unknown error",param_2 - 1);
}
}
return param_1;
}
|
|
59,832
|
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>>::operator++()
|
monkey531[P]llama/common/json.hpp
|
iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
std::advance(m_it.array_iterator, 1);
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
++m_it.primitive_iterator;
break;
}
}
return *this;
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rax)
jne 0xb158a
leaq 0x15de04(%rip), %rdi # 0x20f374
movl $0x33c0, %esi # imm = 0x33C0
leaq 0x157bce(%rip), %rdx # 0x20914a
leaq 0x163501(%rip), %rcx # 0x214a84
movb $0x0, %al
callq 0x5aed0
movq 0x8(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movq %rax, (%rsp)
subq $0x9, %rax
ja 0xb15e3
movq (%rsp), %rax
leaq 0x1587de(%rip), %rcx # 0x209d88
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0xb7390
jmp 0xb15f5
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0xb73e0
jmp 0xb15f5
jmp 0xb15e3
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
addq $0x10, %rdi
callq 0xb7430
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_10], rax
cmp qword ptr [rax], 0
jnz short loc_B158A
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 33C0h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov al, 0
call _ggml_abort
loc_B158A:
mov rax, [rsp+18h+var_10]
mov rax, [rax]
movzx eax, byte ptr [rax]
mov [rsp+18h+var_18], rax
sub rax, 9; switch 10 cases
ja short def_B15B1; jumptable 00000000000B15B1 default case
mov rax, [rsp+18h+var_18]
lea rcx, jpt_B15B1
movsxd rax, ds:(jpt_B15B1 - 209D88h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_B15B3:
mov rdi, [rsp+18h+var_10]; jumptable 00000000000B15B1 case 1
add rdi, 8
mov esi, 1
call _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSB_11ordered_mapESt6vectorS8_blmdSaNSB_14adl_serializerESE_IhSaIhEEvEEESE_ISJ_SaISJ_EEEEiEvRT_T0_; std::advance<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,int>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> &,int)
jmp short loc_B15F5
loc_B15C8:
mov rdi, [rsp+18h+var_10]; jumptable 00000000000B15B1 case 2
add rdi, 8
add rdi, 8
mov esi, 1
call _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES6_ISG_SaISG_EEEEiEvRT_T0_; std::advance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,int>(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>> &,int)
jmp short loc_B15F5
loc_B15E1:
jmp short $+2; jumptable 00000000000B15B1 cases 0,3-9
def_B15B1:
mov rdi, [rsp+18h+var_10]; jumptable 00000000000B15B1 default case
add rdi, 8
add rdi, 10h
call _ZN8nlohmann16json_abi_v3_11_36detail20primitive_iterator_tppEv; nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::operator++(void)
loc_B15F5:
mov rax, [rsp+18h+var_10]
add rsp, 18h
retn
|
_QWORD * nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator++(
_QWORD *a1)
{
if ( !*a1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
13248LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
switch ( *(_BYTE *)*a1 )
{
case 1:
std::advance<__gnu_cxx::__normal_iterator<std::pair<std::string const,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::vector<std::pair<std::string const,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>>>>,int>(
a1 + 1,
1LL);
break;
case 2:
std::advance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,int>(
a1 + 2,
1LL);
break;
default:
nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::operator++(a1 + 3);
break;
}
return a1;
}
|
operator++:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RAX],0x0
JNZ 0x001b158a
LEA RDI,[0x30f374]
MOV ESI,0x33c0
LEA RDX,[0x30914a]
LEA RCX,[0x314a84]
MOV AL,0x0
CALL 0x0015aed0
LAB_001b158a:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RSP],RAX
SUB RAX,0x9
JA 0x001b15e3
MOV RAX,qword ptr [RSP]
LEA RCX,[0x309d88]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
MOV ESI,0x1
CALL 0x001b7390
JMP 0x001b15f5
caseD_2:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
ADD RDI,0x8
MOV ESI,0x1
CALL 0x001b73e0
JMP 0x001b15f5
caseD_0:
JMP 0x001b15e3
default:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
ADD RDI,0x10
CALL 0x001b7430
LAB_001b15f5:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x18
RET
|
/* 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> >::TEMPNAMEPLACEHOLDERVALUE() */
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>>
* __thiscall
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>>
::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
if (*(long *)this == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x33c0,
"GGML_ASSERT(%s) failed","m_object != nullptr");
}
switch(**(int1 **)this) {
case 0:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
default:
primitive_iterator_t::operator++((primitive_iterator_t *)(this + 0x18));
break;
case 1:
std::
advance<__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>,int>
((__normal_iterator *)(this + 8),1);
break;
case 2:
std::
advance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>,int>
((__normal_iterator *)(this + 0x10),1);
}
return this;
}
|
|
59,833
|
set_prealloc_root
|
eloqsql/mysys/my_alloc.c
|
void set_prealloc_root(MEM_ROOT *root, char *ptr)
{
USED_MEM *next;
for (next=root->used; next ; next=next->next)
{
if ((char*) next <= ptr && (char*) next + next->size > ptr)
{
root->pre_alloc=next;
return;
}
}
for (next=root->free ; next ; next=next->next)
{
if ((char*) next <= ptr && (char*) next + next->size > ptr)
{
root->pre_alloc=next;
return;
}
}
}
|
O0
|
c
|
set_prealloc_root:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x432d8
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
ja 0x432c9
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
addq 0x10(%rcx), %rax
cmpq -0x10(%rbp), %rax
jbe 0x432c9
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x43323
jmp 0x432cb
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x43298
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x43323
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
ja 0x43314
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
addq 0x10(%rcx), %rax
cmpq -0x10(%rbp), %rax
jbe 0x43314
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x43323
jmp 0x43316
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x432e3
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
set_prealloc_root:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_18], rax
loc_43298:
cmp [rbp+var_18], 0
jz short loc_432D8
mov rax, [rbp+var_18]
cmp rax, [rbp+var_10]
ja short loc_432C9
mov rax, [rbp+var_18]
mov rcx, [rbp+var_18]
add rax, [rcx+10h]
cmp rax, [rbp+var_10]
jbe short loc_432C9
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
jmp short loc_43323
loc_432C9:
jmp short $+2
loc_432CB:
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_43298
loc_432D8:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
loc_432E3:
cmp [rbp+var_18], 0
jz short loc_43323
mov rax, [rbp+var_18]
cmp rax, [rbp+var_10]
ja short loc_43314
mov rax, [rbp+var_18]
mov rcx, [rbp+var_18]
add rax, [rcx+10h]
cmp rax, [rbp+var_10]
jbe short loc_43314
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
jmp short loc_43323
loc_43314:
jmp short $+2
loc_43316:
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_432E3
loc_43323:
pop rbp
retn
|
_QWORD * set_prealloc_root(_QWORD *a1, unsigned long long a2)
{
_QWORD *result; // rax
_QWORD *i; // [rsp+0h] [rbp-18h]
_QWORD *j; // [rsp+0h] [rbp-18h]
for ( i = (_QWORD *)a1[1]; i; i = (_QWORD *)*i )
{
if ( (unsigned long long)i <= a2 && (unsigned long long)i + i[2] > a2 )
{
result = a1;
a1[2] = i;
return result;
}
}
result = (_QWORD *)*a1;
for ( j = (_QWORD *)*a1; j; j = (_QWORD *)*j )
{
if ( (unsigned long long)j <= a2 && (unsigned long long)j + j[2] > a2 )
{
result = a1;
a1[2] = j;
return result;
}
result = (_QWORD *)*j;
}
return result;
}
|
set_prealloc_root:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
LAB_00143298:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001432d8
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x10]
JA 0x001432c9
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RCX + 0x10]
CMP RAX,qword ptr [RBP + -0x10]
JBE 0x001432c9
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x00143323
LAB_001432c9:
JMP 0x001432cb
LAB_001432cb:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00143298
LAB_001432d8:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_001432e3:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00143323
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x10]
JA 0x00143314
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RCX + 0x10]
CMP RAX,qword ptr [RBP + -0x10]
JBE 0x00143314
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x00143323
LAB_00143314:
JMP 0x00143316
LAB_00143316:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001432e3
LAB_00143323:
POP RBP
RET
|
void set_prealloc_root(int8 *param_1,int8 *param_2)
{
int8 *local_20;
local_20 = (int8 *)param_1[1];
while( true ) {
if (local_20 == (int8 *)0x0) {
local_20 = (int8 *)*param_1;
while( true ) {
if (local_20 == (int8 *)0x0) {
return;
}
if ((local_20 <= param_2) && (param_2 < (int8 *)((long)local_20 + local_20[2])))
break;
local_20 = (int8 *)*local_20;
}
param_1[2] = local_20;
return;
}
if ((local_20 <= param_2) && (param_2 < (int8 *)((long)local_20 + local_20[2]))) break;
local_20 = (int8 *)*local_20;
}
param_1[2] = local_20;
return;
}
|
|
59,834
|
ma_unpin_all_pages
|
eloqsql/storage/maria/ma_key_recover.c
|
void _ma_unpin_all_pages(MARIA_HA *info, LSN undo_lsn)
{
MARIA_PINNED_PAGE *page_link= ((MARIA_PINNED_PAGE*)
dynamic_array_ptr(&info->pinned_pages, 0));
MARIA_PINNED_PAGE *pinned_page= page_link + info->pinned_pages.elements;
DBUG_ENTER("_ma_unpin_all_pages");
DBUG_PRINT("info", ("undo_lsn: %lu", (ulong) undo_lsn));
if (!info->s->now_transactional)
DBUG_ASSERT(undo_lsn == LSN_IMPOSSIBLE || maria_in_recovery);
while (pinned_page-- != page_link)
{
/*
Note this assert fails if we got a disk error or the record file
is corrupted, which means we should have this enabled only in debug
builds.
*/
#ifdef EXTRA_DEBUG
DBUG_ASSERT((!pinned_page->changed ||
undo_lsn != LSN_IMPOSSIBLE || !info->s->now_transactional) ||
(info->s->state.changed & STATE_CRASHED_FLAGS));
#endif
pagecache_unlock_by_link(info->s->pagecache, pinned_page->link,
pinned_page->unlock, PAGECACHE_UNPIN,
info->trn->rec_lsn, undo_lsn,
pinned_page->changed, FALSE);
}
info->pinned_pages.elements= 0;
DBUG_VOID_RETURN;
}
|
O3
|
c
|
ma_unpin_all_pages:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x2f0(%rdi), %eax
testq %rax, %rax
je 0x42c92
movq %rsi, %r14
movq 0x2e8(%rbx), %r15
shlq $0x3, %rax
leaq (%rax,%rax,2), %r12
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq 0x600(%rax), %rdi
movq -0x18(%r15,%r12), %rsi
movl -0x10(%r15,%r12), %edx
movq 0x90(%rcx), %r8
movsbl -0x8(%r15,%r12), %eax
movl $0x3, %ecx
movq %r14, %r9
pushq $0x0
pushq %rax
callq 0x3dd15
addq $0x10, %rsp
addq $-0x18, %r12
jne 0x42c53
movl $0x0, 0x2f0(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_ma_unpin_all_pages:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
mov eax, [rdi+2F0h]
test rax, rax
jz short loc_42C92
mov r14, rsi
mov r15, [rbx+2E8h]
shl rax, 3
lea r12, [rax+rax*2]
loc_42C53:
mov rax, [rbx]
mov rcx, [rbx+8]
mov rdi, [rax+600h]
mov rsi, [r15+r12-18h]
mov edx, [r15+r12-10h]
mov r8, [rcx+90h]
movsx eax, byte ptr [r15+r12-8]
mov ecx, 3
mov r9, r14
push 0
push rax
call pagecache_unlock_by_link
add rsp, 10h
add r12, 0FFFFFFFFFFFFFFE8h
jnz short loc_42C53
loc_42C92:
mov dword ptr [rbx+2F0h], 0
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long ma_unpin_all_pages(long long a1, signed long long a2)
{
long long result; // rax
long long v3; // r15
long long v4; // r12
result = *(unsigned int *)(a1 + 752);
if ( *(_DWORD *)(a1 + 752) )
{
v3 = *(_QWORD *)(a1 + 744);
v4 = 24 * result;
do
{
result = pagecache_unlock_by_link(
*(_QWORD *)(*(_QWORD *)a1 + 1536LL),
*(_QWORD *)(v3 + v4 - 24),
*(_DWORD *)(v3 + v4 - 16),
3,
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 144LL),
a2,
*(_BYTE *)(v3 + v4 - 8));
v4 -= 24LL;
}
while ( v4 );
}
*(_DWORD *)(a1 + 752) = 0;
return result;
}
|
_ma_unpin_all_pages:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x2f0]
TEST RAX,RAX
JZ 0x00142c92
MOV R14,RSI
MOV R15,qword ptr [RBX + 0x2e8]
SHL RAX,0x3
LEA R12,[RAX + RAX*0x2]
LAB_00142c53:
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [R15 + R12*0x1 + -0x18]
MOV EDX,dword ptr [R15 + R12*0x1 + -0x10]
MOV R8,qword ptr [RCX + 0x90]
MOVSX EAX,byte ptr [R15 + R12*0x1 + -0x8]
MOV ECX,0x3
MOV R9,R14
PUSH 0x0
PUSH RAX
CALL 0x0013dd15
ADD RSP,0x10
ADD R12,-0x18
JNZ 0x00142c53
LAB_00142c92:
MOV dword ptr [RBX + 0x2f0],0x0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void _ma_unpin_all_pages(long *param_1,int8 param_2)
{
long lVar1;
long lVar2;
if ((ulong)*(uint *)(param_1 + 0x5e) != 0) {
lVar1 = param_1[0x5d];
lVar2 = (ulong)*(uint *)(param_1 + 0x5e) * 0x18;
do {
pagecache_unlock_by_link
(*(int8 *)(*param_1 + 0x600),*(int8 *)(lVar1 + -0x18 + lVar2),
*(int4 *)(lVar1 + -0x10 + lVar2),3,*(int8 *)(param_1[1] + 0x90),param_2
,(int)*(char *)(lVar1 + -8 + lVar2),0);
lVar2 = lVar2 + -0x18;
} while (lVar2 != 0);
}
*(int4 *)(param_1 + 0x5e) = 0;
return;
}
|
|
59,835
|
my_init
|
eloqsql/mysys/my_init.c
|
my_bool my_init(void)
{
char *str;
if (my_init_done)
return 0;
my_init_done= 1;
mysys_usage_id++;
my_umask= 0660; /* Default umask for new files */
my_umask_dir= 0700; /* Default umask for new directories */
my_global_flags= 0;
/* Default creation of new files */
if ((str= getenv("UMASK")) != 0)
my_umask= (int) (atoi_octal(str) | 0600);
/* Default creation of new dir's */
if ((str= getenv("UMASK_DIR")) != 0)
my_umask_dir= (int) (atoi_octal(str) | 0700);
init_glob_errs();
instrumented_stdin.m_file= stdin;
instrumented_stdin.m_psi= NULL; /* not yet instrumented */
mysql_stdin= & instrumented_stdin;
my_progname_short= "unknown";
if (my_progname)
my_progname_short= my_progname + dirname_length(my_progname);
/* Initialize our mutex handling */
my_mutex_init();
if (my_thread_global_init())
return 1;
#if defined(SAFEMALLOC) && !defined(DBUG_OFF)
dbug_sanity= sf_sanity;
#endif
/* $HOME is needed early to parse configuration files located in ~/ */
if ((home_dir= getenv("HOME")) != 0)
home_dir= intern_filename(home_dir_buff, home_dir);
{
DBUG_ENTER("my_init");
DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown"));
my_time_init();
my_win_init();
DBUG_PRINT("exit", ("home: '%s'", home_dir));
#ifdef _WIN32
if (win32_init_tcp_ip())
DBUG_RETURN(1);
#endif
#ifdef CHECK_UNLIKELY
init_my_likely();
#endif
DBUG_RETURN(0);
}
}
|
O0
|
c
|
my_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x360401(%rip), %rax # 0x387fe0
cmpb $0x0, (%rax)
je 0x27bed
movb $0x0, -0x1(%rbp)
jmp 0x27d76
leaq 0x3603ec(%rip), %rax # 0x387fe0
movb $0x1, (%rax)
leaq 0x3603e6(%rip), %rax # 0x387fe4
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x3603da(%rip), %rax # 0x387fe4
movl %ecx, (%rax)
leaq 0x1a8975(%rip), %rax # 0x1d0588
movl $0x1b0, (%rax) # imm = 0x1B0
leaq 0x1a896c(%rip), %rax # 0x1d058c
movl $0x1c0, (%rax) # imm = 0x1C0
leaq 0x36088b(%rip), %rax # 0x3884b8
movq $0x0, (%rax)
leaq 0x53713(%rip), %rdi # 0x7b34e
callq 0x24350
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x27c64
movq -0x10(%rbp), %rdi
callq 0x27d80
orq $0x180, %rax # imm = 0x180
movl %eax, %ecx
leaq 0x1a8926(%rip), %rax # 0x1d0588
movl %ecx, (%rax)
leaq 0x536e9(%rip), %rdi # 0x7b354
callq 0x24350
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x27c94
movq -0x10(%rbp), %rdi
callq 0x27d80
orq $0x1c0, %rax # imm = 0x1C0
movl %eax, %ecx
leaq 0x1a88fa(%rip), %rax # 0x1d058c
movl %ecx, (%rax)
callq 0x2dc70
movq 0x1a8338(%rip), %rax # 0x1cffd8
movq (%rax), %rax
movq %rax, 0x360346(%rip) # 0x387ff0
movq $0x0, 0x360343(%rip) # 0x387ff8
leaq 0x36032c(%rip), %rax # 0x387fe8
leaq 0x36032d(%rip), %rcx # 0x387ff0
movq %rcx, (%rax)
leaq 0x3603cb(%rip), %rax # 0x388098
leaq 0x5368a(%rip), %rcx # 0x7b35e
movq %rcx, (%rax)
leaq 0x3603b2(%rip), %rax # 0x388090
cmpq $0x0, (%rax)
je 0x27d12
leaq 0x3603a5(%rip), %rax # 0x388090
movq (%rax), %rax
movq %rax, -0x18(%rbp)
leaq 0x360397(%rip), %rax # 0x388090
movq (%rax), %rdi
callq 0x2f2e0
movq -0x18(%rbp), %rcx
addq %rax, %rcx
leaq 0x360389(%rip), %rax # 0x388098
movq %rcx, (%rax)
callq 0x29cf0
callq 0x290f0
cmpb $0x0, %al
je 0x27d26
movb $0x1, -0x1(%rbp)
jmp 0x27d76
leaq 0x53639(%rip), %rdi # 0x7b366
callq 0x24350
leaq 0x36034f(%rip), %rcx # 0x388088
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x27d65
leaq 0x36033f(%rip), %rax # 0x388088
movq (%rax), %rsi
leaq 0x36054d(%rip), %rdi # 0x3882a0
callq 0x2f830
movq %rax, %rcx
leaq 0x360326(%rip), %rax # 0x388088
movq %rcx, (%rax)
jmp 0x27d67
jmp 0x27d69
callq 0x27b60
jmp 0x27d70
jmp 0x27d72
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nop
|
my_init:
push rbp
mov rbp, rsp
sub rsp, 20h
lea rax, my_init_done
cmp byte ptr [rax], 0
jz short loc_27BED
mov [rbp+var_1], 0
jmp loc_27D76
loc_27BED:
lea rax, my_init_done
mov byte ptr [rax], 1
lea rax, mysys_usage_id
mov ecx, [rax]
add ecx, 1
lea rax, mysys_usage_id
mov [rax], ecx
lea rax, my_umask
mov dword ptr [rax], 1B0h
lea rax, my_umask_dir
mov dword ptr [rax], 1C0h
lea rax, my_global_flags
mov qword ptr [rax], 0
lea rdi, aUmask; "UMASK"
call _getenv
mov [rbp+var_10], rax
cmp rax, 0
jz short loc_27C64
mov rdi, [rbp+var_10]
call atoi_octal
or rax, 180h
mov ecx, eax
lea rax, my_umask
mov [rax], ecx
loc_27C64:
lea rdi, aUmaskDir; "UMASK_DIR"
call _getenv
mov [rbp+var_10], rax
cmp rax, 0
jz short loc_27C94
mov rdi, [rbp+var_10]
call atoi_octal
or rax, 1C0h
mov ecx, eax
lea rax, my_umask_dir
mov [rax], ecx
loc_27C94:
call init_glob_errs
mov rax, cs:stdin_ptr
mov rax, [rax]
mov cs:instrumented_stdin, rax
mov cs:qword_387FF8, 0
lea rax, mysql_stdin
lea rcx, instrumented_stdin
mov [rax], rcx
lea rax, my_progname_short
lea rcx, aUnknown_0; "unknown"
mov [rax], rcx
lea rax, my_progname
cmp qword ptr [rax], 0
jz short loc_27D12
lea rax, my_progname
mov rax, [rax]
mov [rbp+var_18], rax
lea rax, my_progname
mov rdi, [rax]
call dirname_length
mov rcx, [rbp+var_18]
add rcx, rax
lea rax, my_progname_short
mov [rax], rcx
loc_27D12:
call my_mutex_init
call my_thread_global_init
cmp al, 0
jz short loc_27D26
mov [rbp+var_1], 1
jmp short loc_27D76
loc_27D26:
lea rdi, aHome; "HOME"
call _getenv
lea rcx, home_dir
mov [rcx], rax
cmp rax, 0
jz short loc_27D65
lea rax, home_dir
mov rsi, [rax]
lea rdi, home_dir_buff
call intern_filename
mov rcx, rax
lea rax, home_dir
mov [rax], rcx
loc_27D65:
jmp short $+2
loc_27D67:
jmp short $+2
loc_27D69:
call my_time_init
jmp short $+2
loc_27D70:
jmp short $+2
loc_27D72:
mov [rbp+var_1], 0
loc_27D76:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char my_init()
{
long long v1; // [rsp+8h] [rbp-18h]
long long v2; // [rsp+10h] [rbp-10h]
long long v3; // [rsp+10h] [rbp-10h]
if ( my_init_done )
return 0;
my_init_done = 1;
++mysys_usage_id;
my_umask = 432;
my_umask_dir = 448;
my_global_flags = 0LL;
v2 = getenv("UMASK");
if ( v2 )
my_umask = atoi_octal(v2) | 0x180;
v3 = getenv("UMASK_DIR");
if ( v3 )
my_umask_dir = atoi_octal(v3) | 0x1C0;
init_glob_errs();
instrumented_stdin = stdin;
qword_387FF8 = 0LL;
mysql_stdin = &instrumented_stdin;
my_progname_short = "unknown";
if ( my_progname )
{
v1 = my_progname;
my_progname_short = dirname_length(my_progname) + v1;
}
my_mutex_init();
if ( (unsigned __int8)my_thread_global_init() )
return 1;
home_dir = getenv("HOME");
if ( home_dir )
home_dir = intern_filename(&home_dir_buff, home_dir);
my_time_init();
return 0;
}
|
my_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
LEA RAX,[0x487fe0]
CMP byte ptr [RAX],0x0
JZ 0x00127bed
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00127d76
LAB_00127bed:
LEA RAX,[0x487fe0]
MOV byte ptr [RAX],0x1
LEA RAX,[0x487fe4]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x487fe4]
MOV dword ptr [RAX],ECX
LEA RAX,[0x2d0588]
MOV dword ptr [RAX],0x1b0
LEA RAX,[0x2d058c]
MOV dword ptr [RAX],0x1c0
LEA RAX,[0x4884b8]
MOV qword ptr [RAX],0x0
LEA RDI,[0x17b34e]
CALL 0x00124350
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x00127c64
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00127d80
OR RAX,0x180
MOV ECX,EAX
LEA RAX,[0x2d0588]
MOV dword ptr [RAX],ECX
LAB_00127c64:
LEA RDI,[0x17b354]
CALL 0x00124350
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x00127c94
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00127d80
OR RAX,0x1c0
MOV ECX,EAX
LEA RAX,[0x2d058c]
MOV dword ptr [RAX],ECX
LAB_00127c94:
CALL 0x0012dc70
MOV RAX,qword ptr [0x002cffd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x00487ff0],RAX
MOV qword ptr [0x00487ff8],0x0
LEA RAX,[0x487fe8]
LEA RCX,[0x487ff0]
MOV qword ptr [RAX],RCX
LEA RAX,[0x488098]
LEA RCX,[0x17b35e]
MOV qword ptr [RAX],RCX
LEA RAX,[0x488090]
CMP qword ptr [RAX],0x0
JZ 0x00127d12
LEA RAX,[0x488090]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LEA RAX,[0x488090]
MOV RDI,qword ptr [RAX]
CALL 0x0012f2e0
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,RAX
LEA RAX,[0x488098]
MOV qword ptr [RAX],RCX
LAB_00127d12:
CALL 0x00129cf0
CALL 0x001290f0
CMP AL,0x0
JZ 0x00127d26
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00127d76
LAB_00127d26:
LEA RDI,[0x17b366]
CALL 0x00124350
LEA RCX,[0x488088]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x00127d65
LEA RAX,[0x488088]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x4882a0]
CALL 0x0012f830
MOV RCX,RAX
LEA RAX,[0x488088]
MOV qword ptr [RAX],RCX
LAB_00127d65:
JMP 0x00127d67
LAB_00127d67:
JMP 0x00127d69
LAB_00127d69:
CALL 0x00127b60
JMP 0x00127d70
LAB_00127d70:
JMP 0x00127d72
LAB_00127d72:
MOV byte ptr [RBP + -0x1],0x0
LAB_00127d76:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 my_init(void)
{
long lVar1;
char cVar2;
uint uVar3;
char *pcVar4;
long lVar5;
int1 local_9;
if (my_init_done == '\0') {
my_init_done = '\x01';
mysys_usage_id = mysys_usage_id + 1;
my_umask = 0x1b0;
my_umask_dir = 0x1c0;
my_global_flags = 0;
pcVar4 = getenv("UMASK");
if (pcVar4 != (char *)0x0) {
uVar3 = atoi_octal(pcVar4);
my_umask = uVar3 | 0x180;
}
pcVar4 = getenv("UMASK_DIR");
if (pcVar4 != (char *)0x0) {
uVar3 = atoi_octal(pcVar4);
my_umask_dir = uVar3 | 0x1c0;
}
init_glob_errs();
lVar1 = my_progname;
instrumented_stdin._0_8_ = *(int8 *)PTR_stdin_002cffd8;
instrumented_stdin._8_8_ = 0;
mysql_stdin = instrumented_stdin;
my_progname_short = "unknown";
if (my_progname != 0) {
lVar5 = dirname_length(my_progname);
my_progname_short = (char *)(lVar1 + lVar5);
}
my_mutex_init();
cVar2 = my_thread_global_init();
if (cVar2 == '\0') {
home_dir = getenv("HOME");
if (home_dir != (char *)0x0) {
home_dir = (char *)intern_filename(home_dir_buff,home_dir);
}
my_time_init();
local_9 = 0;
}
else {
local_9 = 1;
}
}
else {
local_9 = 0;
}
return local_9;
}
|
|
59,836
|
OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::AddFace(int, bool)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceVertex.cpp
|
void AddFace(int newFace, bool newTrailing) {
// Update the state of the Edge based on the added incident face:
if (boundary) {
if (newTrailing == trailing) {
// Edge is reversed
SetNonManifold();
} else if (newFace == (trailing ? prevFace : nextFace)) {
// Edge is repeated in the face
SetNonManifold();
} else {
// Edge is manifold thus far -- promote to interior
SetInterior();
SetFace(newFace, newTrailing);
}
} else if (interior) {
// More than two incident faces -- make non-manifold
SetNonManifold();
}
}
|
O0
|
cpp
|
OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::AddFace(int, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
andb $0x1, %al
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movb 0x4(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
je 0x18ad09
movq -0x18(%rbp), %rcx
movb -0xd(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb 0x4(%rcx), %cl
shrb $0x3, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movzwl %cx, %ecx
cmpl %ecx, %eax
jne 0x18ac9a
movq -0x18(%rbp), %rdi
callq 0xcf9d0
jmp 0x18ad07
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, -0x1c(%rbp)
movb 0x4(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
je 0x18acc3
movq -0x18(%rbp), %rax
movw 0x6(%rax), %ax
movw %ax, -0x1e(%rbp)
jmp 0x18accf
movq -0x18(%rbp), %rax
movw 0x8(%rax), %ax
movw %ax, -0x1e(%rbp)
movl -0x1c(%rbp), %eax
movw -0x1e(%rbp), %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jne 0x18ace8
movq -0x18(%rbp), %rdi
callq 0xcf9d0
jmp 0x18ad05
movq -0x18(%rbp), %rdi
callq 0xcbe00
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
movb -0xd(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0xd6170
jmp 0x18ad07
jmp 0x18ad28
movq -0x18(%rbp), %rax
movb 0x4(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
je 0x18ad26
movq -0x18(%rbp), %rdi
callq 0xcf9d0
jmp 0x18ad28
addq $0x20, %rsp
popq %rbp
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Bfr10FaceVertex4Edge7AddFaceEib:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
and al, 1
mov [rbp+var_D], al
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov al, [rax+4]
and al, 1
movzx eax, al
cmp ax, 0
jz loc_18AD09
mov rcx, [rbp+var_18]
mov al, [rbp+var_D]
and al, 1
movzx eax, al
mov cl, [rcx+4]
shr cl, 3
and cl, 1
movzx ecx, cl
movzx ecx, cx
cmp eax, ecx
jnz short loc_18AC9A
mov rdi, [rbp+var_18]; this
call __ZN10OpenSubdiv6v3_6_03Bfr10FaceVertex4Edge14SetNonManifoldEv; OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::SetNonManifold(void)
jmp short loc_18AD07
loc_18AC9A:
mov rax, [rbp+var_18]
mov ecx, [rbp+var_C]
mov [rbp+var_1C], ecx
mov al, [rax+4]
shr al, 3
and al, 1
movzx eax, al
cmp ax, 0
jz short loc_18ACC3
mov rax, [rbp+var_18]
mov ax, [rax+6]
mov [rbp+var_1E], ax
jmp short loc_18ACCF
loc_18ACC3:
mov rax, [rbp+var_18]
mov ax, [rax+8]
mov [rbp+var_1E], ax
loc_18ACCF:
mov eax, [rbp+var_1C]
mov cx, [rbp+var_1E]
movsx ecx, cx
cmp eax, ecx
jnz short loc_18ACE8
mov rdi, [rbp+var_18]; this
call __ZN10OpenSubdiv6v3_6_03Bfr10FaceVertex4Edge14SetNonManifoldEv; OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::SetNonManifold(void)
jmp short loc_18AD05
loc_18ACE8:
mov rdi, [rbp+var_18]; this
call __ZN10OpenSubdiv6v3_6_03Bfr10FaceVertex4Edge11SetInteriorEv; OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::SetInterior(void)
mov rdi, [rbp+var_18]; this
mov esi, [rbp+var_C]; int
mov al, [rbp+var_D]
and al, 1
movzx edx, al; bool
call __ZN10OpenSubdiv6v3_6_03Bfr10FaceVertex4Edge7SetFaceEib; OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::SetFace(int,bool)
loc_18AD05:
jmp short $+2
loc_18AD07:
jmp short loc_18AD28
loc_18AD09:
mov rax, [rbp+var_18]
mov al, [rax+4]
shr al, 1
and al, 1
movzx eax, al
cmp ax, 0
jz short loc_18AD26
mov rdi, [rbp+var_18]; this
call __ZN10OpenSubdiv6v3_6_03Bfr10FaceVertex4Edge14SetNonManifoldEv; OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::SetNonManifold(void)
loc_18AD26:
jmp short $+2
loc_18AD28:
add rsp, 20h
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::AddFace(
OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge *this,
int a2,
char a3)
{
long long result; // rax
__int16 v4; // [rsp+2h] [rbp-1Eh]
char v5; // [rsp+13h] [rbp-Dh]
v5 = a3 & 1;
if ( (*((_BYTE *)this + 4) & 1) != 0 )
{
if ( (a3 & 1) != ((*((_BYTE *)this + 4) & 8) != 0) )
{
v4 = (*((_BYTE *)this + 4) & 8) != 0 ? *((_WORD *)this + 3) : *((_WORD *)this + 4);
if ( a2 != v4 )
{
OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::SetInterior(this);
return OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::SetFace(this, a2, v5 & 1);
}
}
}
else
{
result = (*((_BYTE *)this + 4) & 2) != 0;
if ( (*((_BYTE *)this + 4) & 2) == 0 )
return result;
}
return OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::SetNonManifold(this);
}
| |||
59,837
|
OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::AddFace(int, bool)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceVertex.cpp
|
void AddFace(int newFace, bool newTrailing) {
// Update the state of the Edge based on the added incident face:
if (boundary) {
if (newTrailing == trailing) {
// Edge is reversed
SetNonManifold();
} else if (newFace == (trailing ? prevFace : nextFace)) {
// Edge is repeated in the face
SetNonManifold();
} else {
// Edge is manifold thus far -- promote to interior
SetInterior();
SetFace(newFace, newTrailing);
}
} else if (interior) {
// More than two incident faces -- make non-manifold
SetNonManifold();
}
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::AddFace(int, bool):
movb 0x4(%rdi), %al
testb $0x1, %al
jne 0x886aa
testb $0x2, %al
jne 0x886c6
retq
movl %eax, %ecx
andb $0x8, %cl
shrb $0x3, %cl
cmpb %dl, %cl
je 0x886c6
xorl %ecx, %ecx
testb $0x8, %al
sete %cl
movswl 0x6(%rdi,%rcx,2), %ecx
cmpl %esi, %ecx
jne 0x886ce
andb $-0x8, %al
orb $0x4, %al
movb %al, 0x4(%rdi)
retq
andb $-0xc, %al
leal (,%rdx,8), %ecx
orb %al, %cl
orb $0x2, %cl
movb %cl, 0x4(%rdi)
xorb $0x1, %dl
movzbl %dl, %eax
movw %si, 0x6(%rdi,%rax,2)
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Bfr10FaceVertex4Edge7AddFaceEib:
mov al, [rdi+4]
test al, 1
jnz short loc_886AA
test al, 2
jnz short loc_886C6
retn
loc_886AA:
mov ecx, eax
and cl, 8
shr cl, 3
cmp cl, dl
jz short loc_886C6
xor ecx, ecx
test al, 8
setz cl
movsx ecx, word ptr [rdi+rcx*2+6]
cmp ecx, esi
jnz short loc_886CE
loc_886C6:
and al, 0F8h
or al, 4
mov [rdi+4], al
retn
loc_886CE:
and al, 0F4h
lea ecx, ds:0[rdx*8]
or cl, al
or cl, 2
mov [rdi+4], cl
xor dl, 1
movzx eax, dl
mov [rdi+rax*2+6], si
retn
|
char OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::AddFace(
OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge *this,
int a2,
unsigned __int8 a3)
{
long long v3; // rax
LOBYTE(v3) = *((_BYTE *)this + 4);
if ( (v3 & 1) != 0 )
{
if ( (unsigned __int8)(v3 & 8) >> 3 != a3 && *((__int16 *)this + ((v3 & 8) == 0) + 3) != a2 )
{
*((_BYTE *)this + 4) = v3 & 0xF4 | (8 * a3) | 2;
v3 = a3 ^ 1u;
*((_WORD *)this + v3 + 3) = a2;
return v3;
}
}
else if ( (v3 & 2) == 0 )
{
return v3;
}
LOBYTE(v3) = v3 & 0xF8 | 4;
*((_BYTE *)this + 4) = v3;
return v3;
}
|
AddFace:
MOV AL,byte ptr [RDI + 0x4]
TEST AL,0x1
JNZ 0x001886aa
TEST AL,0x2
JNZ 0x001886c6
RET
LAB_001886aa:
MOV ECX,EAX
AND CL,0x8
SHR CL,0x3
CMP CL,DL
JZ 0x001886c6
XOR ECX,ECX
TEST AL,0x8
SETZ CL
MOVSX ECX,word ptr [RDI + RCX*0x2 + 0x6]
CMP ECX,ESI
JNZ 0x001886ce
LAB_001886c6:
AND AL,0xf8
OR AL,0x4
MOV byte ptr [RDI + 0x4],AL
RET
LAB_001886ce:
AND AL,0xf4
LEA ECX,[RDX*0x8]
OR CL,AL
OR CL,0x2
MOV byte ptr [RDI + 0x4],CL
XOR DL,0x1
MOVZX EAX,DL
MOV word ptr [RDI + RAX*0x2 + 0x6],SI
RET
|
/* OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::AddFace(int, bool) */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::FaceVertex::Edge::AddFace(Edge *this,int param_1,bool param_2)
{
Edge EVar1;
EVar1 = this[4];
if (((byte)EVar1 & 1) == 0) {
if (((byte)EVar1 & 2) == 0) {
return;
}
}
else if (((bool)(((byte)EVar1 & 8) >> 3) != param_2) &&
(*(short *)(this + (ulong)(((byte)EVar1 & 8) == 0) * 2 + 6) != param_1)) {
this[4] = (Edge)(param_2 * '\b' | (byte)EVar1 & 0xf4 | 2);
*(short *)(this + (ulong)!param_2 * 2 + 6) = (short)param_1;
return;
}
this[4] = (Edge)((byte)EVar1 & 0xf8 | 4);
return;
}
|
|
59,838
|
SettingValue_SliderUnsigned::layout() const
|
untodesu[P]voxelius/game/client/settings.cc
|
void SettingValue_SliderUnsigned::layout(void) const
{
auto current_value = static_cast<std::uint32_t>(value->get_value());
auto min_value = static_cast<std::uint32_t>(value->get_min_value());
auto max_value = static_cast<std::uint32_t>(value->get_max_value());
if(ImGui::SliderScalar(wid.c_str(), ImGuiDataType_U32, ¤t_value, &min_value, &max_value)) {
value->set_value(current_value);
}
layout_label();
layout_tooltip();
}
|
O1
|
cpp
|
SettingValue_SliderUnsigned::layout() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq 0x98(%rdi), %rax
movl 0x8(%rax), %ecx
leaq 0x14(%rsp), %rdx
movl %ecx, (%rdx)
movl 0xc(%rax), %esi
leaq 0x1c(%rsp), %rcx
movl %esi, (%rcx)
movl 0x10(%rax), %eax
leaq 0x18(%rsp), %r8
movl %eax, (%r8)
movq 0x78(%rdi), %rdi
movl $0x0, (%rsp)
movl $0x5, %esi
xorl %r9d, %r9d
callq 0xd4a59
testb %al, %al
je 0x68a9d
movq 0x98(%rbx), %r14
movl 0x14(%rsp), %eax
movl 0xc(%r14), %ecx
movl 0x10(%r14), %ebp
cmpl %eax, %ebp
cmovael %eax, %ebp
cmpl %eax, %ecx
cmoval %ecx, %ebp
movl %ebp, 0x8(%r14)
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x68a50
movl $0x4, %eax
movl $0xd1b71759, %ecx # imm = 0xD1B71759
movl %ebp, %edx
cmpl $0x63, %edx
jbe 0x68a49
cmpl $0x3e7, %edx # imm = 0x3E7
jbe 0x68a4e
cmpl $0x2710, %edx # imm = 0x2710
jb 0x68a50
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx # imm = 0x1869F
movl %esi, %edx
ja 0x68a18
addl $-0x3, %eax
jmp 0x68a50
addl $-0x2, %eax
jmp 0x68a50
decl %eax
movl %eax, %esi
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x20(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x26a10
movq (%r15), %rdi
movl 0x8(%r15), %esi
movl %ebp, %edx
callq 0x33590
addq $0x18, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x26ac0
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x68a9d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x268d0
movss 0x12d4b7(%rip), %xmm1 # 0x195f5c
xorps %xmm0, %xmm0
callq 0x10f0da
movq 0x30(%rbx), %rdi
xorl %esi, %esi
callq 0xcc66c
movq %rbx, %rdi
callq 0x68138
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZNK27SettingValue_SliderUnsigned6layoutEv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov rbx, rdi
mov rax, [rdi+98h]
mov ecx, [rax+8]
lea rdx, [rsp+68h+var_54]; int
mov [rdx], ecx
mov esi, [rax+0Ch]
lea rcx, [rsp+68h+var_4C]; void *
mov [rcx], esi
mov eax, [rax+10h]
lea r8, [rsp+68h+var_50]; void *
mov [r8], eax
mov rdi, [rdi+78h]; this
mov dword ptr [rsp+68h+var_68], 0; char *
mov esi, offset byte_5; char *
xor r9d, r9d; void *
call _ZN5ImGui12SliderScalarEPKciPvPKvS4_S1_i; ImGui::SliderScalar(char const*,int,void *,void const*,void const*,char const*,int)
test al, al
jz loc_68A9D
mov r14, [rbx+98h]
mov eax, [rsp+68h+var_54]
mov ecx, [r14+0Ch]
mov ebp, [r14+10h]
cmp ebp, eax
cmovnb ebp, eax
cmp ecx, eax
cmova ebp, ecx
mov [r14+8], ebp
mov eax, 1
cmp ebp, 0Ah
jb short loc_68A50
mov eax, 4
mov ecx, 0D1B71759h
mov edx, ebp
loc_68A18:
cmp edx, 63h ; 'c'
jbe short loc_68A49
cmp edx, 3E7h
jbe short loc_68A4E
cmp edx, 2710h
jb short loc_68A50
mov esi, edx
imul rsi, rcx
shr rsi, 2Dh
add eax, 4
cmp edx, 1869Fh
mov edx, esi
ja short loc_68A18
add eax, 0FFFFFFFDh
jmp short loc_68A50
loc_68A49:
add eax, 0FFFFFFFEh
jmp short loc_68A50
loc_68A4E:
dec eax
loc_68A50:
mov esi, eax
lea r12, [rsp+68h+var_38]
mov [r12-10h], r12
lea r15, [rsp+68h+var_48]
mov rdi, r15
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [r15]
mov esi, [r15+8]
mov edx, ebp
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
add r14, 18h
mov rdi, r14
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r15]; this
cmp rdi, r12
jz short loc_68A9D
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_68A9D:
movss xmm1, cs:flt_195F5C; float
xorps xmm0, xmm0; float
call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float)
mov rdi, [rbx+30h]; this
xor esi, esi; char *
call _ZN5ImGui15TextUnformattedEPKcS1_; ImGui::TextUnformatted(char const*,char const*)
mov rdi, rbx; this
call _ZNK12SettingValue14layout_tooltipEv; SettingValue::layout_tooltip(void)
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
void SettingValue_SliderUnsigned::layout(SettingValue_SliderUnsigned *this)
{
int *v2; // rax
ImGui *v3; // rdi
_DWORD *v4; // r14
unsigned int v5; // ebp
unsigned int v6; // eax
unsigned int v7; // edx
bool v8; // cc
double v9; // xmm0_8
const char *v10; // rdx
char *v11; // [rsp+0h] [rbp-68h]
int v12; // [rsp+8h] [rbp-60h]
int v13; // [rsp+14h] [rbp-54h] BYREF
int v14; // [rsp+18h] [rbp-50h] BYREF
int v15; // [rsp+1Ch] [rbp-4Ch] BYREF
char *v16; // [rsp+20h] [rbp-48h] BYREF
int v17; // [rsp+28h] [rbp-40h]
_QWORD v18[7]; // [rsp+30h] [rbp-38h] BYREF
v2 = (int *)*((_QWORD *)this + 19);
v13 = v2[2];
v15 = v2[3];
v14 = v2[4];
v3 = (ImGui *)*((_QWORD *)this + 15);
LODWORD(v11) = 0;
if ( (unsigned __int8)ImGui::SliderScalar(v3, &byte_5, (int)&v13, &v15, &v14, 0LL, v11, v12) )
{
v4 = (_DWORD *)*((_QWORD *)this + 19);
v5 = v4[4];
if ( v5 >= v13 )
v5 = v13;
if ( v4[3] > (unsigned int)v13 )
v5 = v4[3];
v4[2] = v5;
v6 = 1;
if ( v5 >= 0xA )
{
v6 = 4;
v7 = v5;
while ( 1 )
{
if ( v7 <= 0x63 )
{
v6 -= 2;
goto LABEL_15;
}
if ( v7 <= 0x3E7 )
break;
if ( v7 < 0x2710 )
goto LABEL_15;
v6 += 4;
v8 = v7 <= 0x1869F;
v7 /= 0x2710u;
if ( v8 )
{
v6 -= 3;
goto LABEL_15;
}
}
--v6;
}
LABEL_15:
v16 = (char *)v18;
v9 = std::string::_M_construct(&v16, v6, 0LL);
std::__detail::__to_chars_10_impl<unsigned int>(v16, v17, v5);
std::string::operator=(v4 + 6, &v16, v9);
v3 = (ImGui *)v16;
if ( v16 != (char *)v18 )
operator delete(v16, v18[0] + 1LL);
}
ImGui::SameLine(v3, 0.0, -1.0);
ImGui::TextUnformatted(*((ImGui **)this + 6), 0LL, v10);
SettingValue::layout_tooltip((ImGui **)this, 0LL);
}
|
layout:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x98]
MOV ECX,dword ptr [RAX + 0x8]
LEA RDX,[RSP + 0x14]
MOV dword ptr [RDX],ECX
MOV ESI,dword ptr [RAX + 0xc]
LEA RCX,[RSP + 0x1c]
MOV dword ptr [RCX],ESI
MOV EAX,dword ptr [RAX + 0x10]
LEA R8,[RSP + 0x18]
MOV dword ptr [R8],EAX
MOV RDI,qword ptr [RDI + 0x78]
MOV dword ptr [RSP],0x0
MOV ESI,0x5
XOR R9D,R9D
CALL 0x001d4a59
TEST AL,AL
JZ 0x00168a9d
MOV R14,qword ptr [RBX + 0x98]
MOV EAX,dword ptr [RSP + 0x14]
MOV ECX,dword ptr [R14 + 0xc]
MOV EBP,dword ptr [R14 + 0x10]
CMP EBP,EAX
CMOVNC EBP,EAX
CMP ECX,EAX
CMOVA EBP,ECX
MOV dword ptr [R14 + 0x8],EBP
MOV EAX,0x1
CMP EBP,0xa
JC 0x00168a50
MOV EAX,0x4
MOV ECX,0xd1b71759
MOV EDX,EBP
LAB_00168a18:
CMP EDX,0x63
JBE 0x00168a49
CMP EDX,0x3e7
JBE 0x00168a4e
CMP EDX,0x2710
JC 0x00168a50
MOV ESI,EDX
IMUL RSI,RCX
SHR RSI,0x2d
ADD EAX,0x4
CMP EDX,0x1869f
MOV EDX,ESI
JA 0x00168a18
ADD EAX,-0x3
JMP 0x00168a50
LAB_00168a49:
ADD EAX,-0x2
JMP 0x00168a50
LAB_00168a4e:
DEC EAX
LAB_00168a50:
MOV ESI,EAX
LEA R12,[RSP + 0x30]
MOV qword ptr [R12 + -0x10],R12
LEA R15,[RSP + 0x20]
MOV RDI,R15
XOR EDX,EDX
CALL 0x00126a10
MOV RDI,qword ptr [R15]
MOV ESI,dword ptr [R15 + 0x8]
MOV EDX,EBP
CALL 0x00133590
ADD R14,0x18
MOV RDI,R14
MOV RSI,R15
CALL 0x00126ac0
MOV RDI,qword ptr [R15]
CMP RDI,R12
JZ 0x00168a9d
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001268d0
LAB_00168a9d:
MOVSS XMM1,dword ptr [0x00295f5c]
XORPS XMM0,XMM0
CALL 0x0020f0da
MOV RDI,qword ptr [RBX + 0x30]
XOR ESI,ESI
CALL 0x001cc66c
MOV RDI,RBX
CALL 0x00168138
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* SettingValue_SliderUnsigned::layout() const */
void __thiscall SettingValue_SliderUnsigned::layout(SettingValue_SliderUnsigned *this)
{
long lVar1;
char cVar2;
char cVar3;
uint uVar4;
uint uVar5;
ulong uVar6;
uint local_54;
int4 local_50;
int4 local_4c;
long *local_48;
uint local_40;
long local_38 [2];
lVar1 = *(long *)(this + 0x98);
local_54 = *(uint *)(lVar1 + 8);
local_4c = *(int4 *)(lVar1 + 0xc);
local_50 = *(int4 *)(lVar1 + 0x10);
cVar3 = ImGui::SliderScalar(*(char **)(this + 0x78),5,&local_54,&local_4c,&local_50,(char *)0x0,0)
;
if (cVar3 != '\0') {
lVar1 = *(long *)(this + 0x98);
uVar5 = *(uint *)(lVar1 + 0x10);
if (local_54 <= *(uint *)(lVar1 + 0x10)) {
uVar5 = local_54;
}
if (local_54 < *(uint *)(lVar1 + 0xc)) {
uVar5 = *(uint *)(lVar1 + 0xc);
}
*(uint *)(lVar1 + 8) = uVar5;
cVar3 = '\x01';
if (9 < uVar5) {
uVar6 = (ulong)uVar5;
cVar2 = '\x04';
do {
cVar3 = cVar2;
uVar4 = (uint)uVar6;
if (uVar4 < 100) {
cVar3 = cVar3 + -2;
goto LAB_00168a50;
}
if (uVar4 < 1000) {
cVar3 = cVar3 + -1;
goto LAB_00168a50;
}
if (uVar4 < 10000) goto LAB_00168a50;
uVar6 = uVar6 / 10000;
cVar2 = cVar3 + '\x04';
} while (99999 < uVar4);
cVar3 = cVar3 + '\x01';
}
LAB_00168a50:
local_48 = local_38;
std::__cxx11::string::_M_construct((ulong)&local_48,cVar3);
std::__detail::__to_chars_10_impl<unsigned_int>((char *)local_48,local_40,uVar5);
std::__cxx11::string::operator=((string *)(lVar1 + 0x18),(string *)&local_48);
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
}
ImGui::SameLine(0.0,DAT_00295f5c);
ImGui::TextUnformatted(*(char **)(this + 0x30),(char *)0x0);
SettingValue::layout_tooltip((SettingValue *)this);
return;
}
|
|
59,839
|
SettingValue_SliderUnsigned::layout() const
|
untodesu[P]voxelius/game/client/settings.cc
|
void SettingValue_SliderUnsigned::layout(void) const
{
auto current_value = static_cast<std::uint32_t>(value->get_value());
auto min_value = static_cast<std::uint32_t>(value->get_min_value());
auto max_value = static_cast<std::uint32_t>(value->get_max_value());
if(ImGui::SliderScalar(wid.c_str(), ImGuiDataType_U32, ¤t_value, &min_value, &max_value)) {
value->set_value(current_value);
}
layout_label();
layout_tooltip();
}
|
O3
|
cpp
|
SettingValue_SliderUnsigned::layout() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq 0x98(%rdi), %rax
movl 0x8(%rax), %ecx
leaq 0x14(%rsp), %rdx
movl %ecx, (%rdx)
movl 0xc(%rax), %esi
leaq 0x1c(%rsp), %rcx
movl %esi, (%rcx)
movl 0x10(%rax), %eax
leaq 0x18(%rsp), %r8
movl %eax, (%r8)
movq 0x78(%rdi), %rdi
movl $0x0, (%rsp)
movl $0x5, %esi
xorl %r9d, %r9d
callq 0xd463a
testb %al, %al
je 0x69465
movq 0x98(%rbx), %r14
movl 0x14(%rsp), %eax
movl 0xc(%r14), %ecx
movl 0x10(%r14), %ebp
cmpl %eax, %ebp
cmovael %eax, %ebp
cmpl %eax, %ecx
cmoval %ecx, %ebp
movl %ebp, 0x8(%r14)
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x69418
movl $0x4, %eax
movl $0xd1b71759, %ecx # imm = 0xD1B71759
movl %ebp, %edx
cmpl $0x63, %edx
jbe 0x69411
cmpl $0x3e7, %edx # imm = 0x3E7
jbe 0x69416
cmpl $0x2710, %edx # imm = 0x2710
jb 0x69418
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx # imm = 0x1869F
movl %esi, %edx
ja 0x693e0
addl $-0x3, %eax
jmp 0x69418
addl $-0x2, %eax
jmp 0x69418
decl %eax
movl %eax, %esi
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x20(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x26a20
movq (%r15), %rdi
movl 0x8(%r15), %esi
movl %ebp, %edx
callq 0x32df4
addq $0x18, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x26ad0
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x69465
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x268e0
movss 0x129b1f(%rip), %xmm1 # 0x192f8c
xorps %xmm0, %xmm0
callq 0x10cf35
movq 0x30(%rbx), %rdi
xorl %esi, %esi
callq 0xcc66d
movq %rbx, %rdi
callq 0x68b00
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZNK27SettingValue_SliderUnsigned6layoutEv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov rbx, rdi
mov rax, [rdi+98h]
mov ecx, [rax+8]
lea rdx, [rsp+68h+var_54]; int
mov [rdx], ecx
mov esi, [rax+0Ch]
lea rcx, [rsp+68h+var_4C]; void *
mov [rcx], esi
mov eax, [rax+10h]
lea r8, [rsp+68h+var_50]; void *
mov [r8], eax
mov rdi, [rdi+78h]; this
mov dword ptr [rsp+68h+var_68], 0; char *
mov esi, offset byte_5; char *
xor r9d, r9d; void *
call _ZN5ImGui12SliderScalarEPKciPvPKvS4_S1_i; ImGui::SliderScalar(char const*,int,void *,void const*,void const*,char const*,int)
test al, al
jz loc_69465
mov r14, [rbx+98h]
mov eax, [rsp+68h+var_54]
mov ecx, [r14+0Ch]
mov ebp, [r14+10h]
cmp ebp, eax
cmovnb ebp, eax
cmp ecx, eax
cmova ebp, ecx
mov [r14+8], ebp
mov eax, 1
cmp ebp, 0Ah
jb short loc_69418
mov eax, 4
mov ecx, 0D1B71759h
mov edx, ebp
loc_693E0:
cmp edx, 63h ; 'c'
jbe short loc_69411
cmp edx, 3E7h
jbe short loc_69416
cmp edx, 2710h
jb short loc_69418
mov esi, edx
imul rsi, rcx
shr rsi, 2Dh
add eax, 4
cmp edx, 1869Fh
mov edx, esi
ja short loc_693E0
add eax, 0FFFFFFFDh
jmp short loc_69418
loc_69411:
add eax, 0FFFFFFFEh
jmp short loc_69418
loc_69416:
dec eax
loc_69418:
mov esi, eax
lea r12, [rsp+68h+var_38]
mov [r12-10h], r12
lea r15, [rsp+68h+var_48]
mov rdi, r15
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [r15]
mov esi, [r15+8]
mov edx, ebp
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
add r14, 18h
mov rdi, r14
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r15]; this
cmp rdi, r12
jz short loc_69465
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_69465:
movss xmm1, cs:flt_192F8C; float
xorps xmm0, xmm0; float
call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float)
mov rdi, [rbx+30h]; this
xor esi, esi; char *
call _ZN5ImGui15TextUnformattedEPKcS1_; ImGui::TextUnformatted(char const*,char const*)
mov rdi, rbx; this
call _ZNK12SettingValue14layout_tooltipEv; SettingValue::layout_tooltip(void)
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
void SettingValue_SliderUnsigned::layout(SettingValue_SliderUnsigned *this)
{
int *v2; // rax
ImGui *v3; // rdi
_DWORD *v4; // r14
unsigned int v5; // ebp
unsigned int v6; // eax
unsigned int v7; // edx
bool v8; // cc
double v9; // xmm0_8
const char *v10; // rdx
char *v11; // [rsp+0h] [rbp-68h]
int v12; // [rsp+8h] [rbp-60h]
int v13; // [rsp+14h] [rbp-54h] BYREF
int v14; // [rsp+18h] [rbp-50h] BYREF
int v15; // [rsp+1Ch] [rbp-4Ch] BYREF
char *v16; // [rsp+20h] [rbp-48h] BYREF
int v17; // [rsp+28h] [rbp-40h]
_QWORD v18[7]; // [rsp+30h] [rbp-38h] BYREF
v2 = (int *)*((_QWORD *)this + 19);
v13 = v2[2];
v15 = v2[3];
v14 = v2[4];
v3 = (ImGui *)*((_QWORD *)this + 15);
LODWORD(v11) = 0;
if ( (unsigned __int8)ImGui::SliderScalar(v3, &byte_5, (int)&v13, &v15, &v14, 0LL, v11, v12) )
{
v4 = (_DWORD *)*((_QWORD *)this + 19);
v5 = v4[4];
if ( v5 >= v13 )
v5 = v13;
if ( v4[3] > (unsigned int)v13 )
v5 = v4[3];
v4[2] = v5;
v6 = 1;
if ( v5 >= 0xA )
{
v6 = 4;
v7 = v5;
while ( 1 )
{
if ( v7 <= 0x63 )
{
v6 -= 2;
goto LABEL_15;
}
if ( v7 <= 0x3E7 )
break;
if ( v7 < 0x2710 )
goto LABEL_15;
v6 += 4;
v8 = v7 <= 0x1869F;
v7 /= 0x2710u;
if ( v8 )
{
v6 -= 3;
goto LABEL_15;
}
}
--v6;
}
LABEL_15:
v16 = (char *)v18;
v9 = std::string::_M_construct(&v16, v6, 0LL);
std::__detail::__to_chars_10_impl<unsigned int>(v16, v17, v5);
std::string::operator=(v4 + 6, &v16, v9);
v3 = (ImGui *)v16;
if ( v16 != (char *)v18 )
operator delete(v16, v18[0] + 1LL);
}
ImGui::SameLine(v3, 0.0, -1.0);
ImGui::TextUnformatted(*((ImGui **)this + 6), 0LL, v10);
SettingValue::layout_tooltip((ImGui **)this, 0LL);
}
|
layout:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x98]
MOV ECX,dword ptr [RAX + 0x8]
LEA RDX,[RSP + 0x14]
MOV dword ptr [RDX],ECX
MOV ESI,dword ptr [RAX + 0xc]
LEA RCX,[RSP + 0x1c]
MOV dword ptr [RCX],ESI
MOV EAX,dword ptr [RAX + 0x10]
LEA R8,[RSP + 0x18]
MOV dword ptr [R8],EAX
MOV RDI,qword ptr [RDI + 0x78]
MOV dword ptr [RSP],0x0
MOV ESI,0x5
XOR R9D,R9D
CALL 0x001d463a
TEST AL,AL
JZ 0x00169465
MOV R14,qword ptr [RBX + 0x98]
MOV EAX,dword ptr [RSP + 0x14]
MOV ECX,dword ptr [R14 + 0xc]
MOV EBP,dword ptr [R14 + 0x10]
CMP EBP,EAX
CMOVNC EBP,EAX
CMP ECX,EAX
CMOVA EBP,ECX
MOV dword ptr [R14 + 0x8],EBP
MOV EAX,0x1
CMP EBP,0xa
JC 0x00169418
MOV EAX,0x4
MOV ECX,0xd1b71759
MOV EDX,EBP
LAB_001693e0:
CMP EDX,0x63
JBE 0x00169411
CMP EDX,0x3e7
JBE 0x00169416
CMP EDX,0x2710
JC 0x00169418
MOV ESI,EDX
IMUL RSI,RCX
SHR RSI,0x2d
ADD EAX,0x4
CMP EDX,0x1869f
MOV EDX,ESI
JA 0x001693e0
ADD EAX,-0x3
JMP 0x00169418
LAB_00169411:
ADD EAX,-0x2
JMP 0x00169418
LAB_00169416:
DEC EAX
LAB_00169418:
MOV ESI,EAX
LEA R12,[RSP + 0x30]
MOV qword ptr [R12 + -0x10],R12
LEA R15,[RSP + 0x20]
MOV RDI,R15
XOR EDX,EDX
CALL 0x00126a20
MOV RDI,qword ptr [R15]
MOV ESI,dword ptr [R15 + 0x8]
MOV EDX,EBP
CALL 0x00132df4
ADD R14,0x18
MOV RDI,R14
MOV RSI,R15
CALL 0x00126ad0
MOV RDI,qword ptr [R15]
CMP RDI,R12
JZ 0x00169465
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001268e0
LAB_00169465:
MOVSS XMM1,dword ptr [0x00292f8c]
XORPS XMM0,XMM0
CALL 0x0020cf35
MOV RDI,qword ptr [RBX + 0x30]
XOR ESI,ESI
CALL 0x001cc66d
MOV RDI,RBX
CALL 0x00168b00
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* SettingValue_SliderUnsigned::layout() const */
void __thiscall SettingValue_SliderUnsigned::layout(SettingValue_SliderUnsigned *this)
{
long lVar1;
char cVar2;
char cVar3;
uint uVar4;
uint uVar5;
ulong uVar6;
uint local_54;
int4 local_50;
int4 local_4c;
long *local_48;
uint local_40;
long local_38 [2];
lVar1 = *(long *)(this + 0x98);
local_54 = *(uint *)(lVar1 + 8);
local_4c = *(int4 *)(lVar1 + 0xc);
local_50 = *(int4 *)(lVar1 + 0x10);
cVar3 = ImGui::SliderScalar(*(char **)(this + 0x78),5,&local_54,&local_4c,&local_50,(char *)0x0,0)
;
if (cVar3 != '\0') {
lVar1 = *(long *)(this + 0x98);
uVar5 = *(uint *)(lVar1 + 0x10);
if (local_54 <= *(uint *)(lVar1 + 0x10)) {
uVar5 = local_54;
}
if (local_54 < *(uint *)(lVar1 + 0xc)) {
uVar5 = *(uint *)(lVar1 + 0xc);
}
*(uint *)(lVar1 + 8) = uVar5;
cVar3 = '\x01';
if (9 < uVar5) {
uVar6 = (ulong)uVar5;
cVar2 = '\x04';
do {
cVar3 = cVar2;
uVar4 = (uint)uVar6;
if (uVar4 < 100) {
cVar3 = cVar3 + -2;
goto LAB_00169418;
}
if (uVar4 < 1000) {
cVar3 = cVar3 + -1;
goto LAB_00169418;
}
if (uVar4 < 10000) goto LAB_00169418;
uVar6 = uVar6 / 10000;
cVar2 = cVar3 + '\x04';
} while (99999 < uVar4);
cVar3 = cVar3 + '\x01';
}
LAB_00169418:
local_48 = local_38;
std::__cxx11::string::_M_construct((ulong)&local_48,cVar3);
std::__detail::__to_chars_10_impl<unsigned_int>((char *)local_48,local_40,uVar5);
std::__cxx11::string::operator=((string *)(lVar1 + 0x18),(string *)&local_48);
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
}
ImGui::SameLine(0.0,DAT_00292f8c);
ImGui::TextUnformatted(*(char **)(this + 0x30),(char *)0x0);
SettingValue::layout_tooltip((SettingValue *)this);
return;
}
|
|
59,840
|
testing::internal::StreamingListener::SocketWriter::MakeConnection()
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
void StreamingListener::SocketWriter::MakeConnection() {
GTEST_CHECK_(sockfd_ == -1)
<< "MakeConnection() can't be called when there is already a connection.";
addrinfo hints;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC; // To allow both IPv4 and IPv6 addresses.
hints.ai_socktype = SOCK_STREAM;
addrinfo* servinfo = nullptr;
// Use the getaddrinfo() to get a linked list of IP addresses for
// the given host name.
const int error_num =
getaddrinfo(host_name_.c_str(), port_num_.c_str(), &hints, &servinfo);
if (error_num != 0) {
GTEST_LOG_(WARNING) << "stream_result_to: getaddrinfo() failed: "
<< gai_strerror(error_num);
}
// Loop through all the results and connect to the first we can.
for (addrinfo* cur_addr = servinfo; sockfd_ == -1 && cur_addr != nullptr;
cur_addr = cur_addr->ai_next) {
sockfd_ = socket(cur_addr->ai_family, cur_addr->ai_socktype,
cur_addr->ai_protocol);
if (sockfd_ != -1) {
// Connect the client socket to the server socket.
if (connect(sockfd_, cur_addr->ai_addr, cur_addr->ai_addrlen) == -1) {
close(sockfd_);
sockfd_ = -1;
}
}
}
freeaddrinfo(servinfo); // all done with this structure
if (sockfd_ == -1) {
GTEST_LOG_(WARNING) << "stream_result_to: failed to connect to "
<< host_name_ << ":" << port_num_;
}
}
|
O0
|
cpp
|
testing::internal::StreamingListener::SocketWriter::MakeConnection():
subq $0xe8, %rsp
movq %rdi, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x70(%rsp)
cmpl $-0x1, 0x8(%rax)
sete %al
movzbl %al, %edi
andl $0x1, %edi
callq 0xb38e0
testb $0x1, %al
jne 0xd88b4
jmp 0xd88b9
jmp 0xd894d
leaq 0x3a5e6(%rip), %rdx # 0x112ea6
leaq 0xdc(%rsp), %rdi
movq %rdi, 0x60(%rsp)
movl $0x3, %esi
movl $0x1369, %ecx # imm = 0x1369
callq 0xb9070
movq 0x60(%rsp), %rdi
callq 0x1ea10
movq %rax, 0x68(%rsp)
jmp 0xd88ed
movq 0x68(%rsp), %rdi
leaq 0x3b5ba(%rip), %rsi # 0x113eb3
callq 0x146a0
movq %rax, 0x58(%rsp)
jmp 0xd8905
movq 0x58(%rsp), %rdi
leaq 0x3b5c3(%rip), %rsi # 0x113ed4
callq 0x146a0
jmp 0xd8918
leaq 0xdc(%rsp), %rdi
callq 0xb91e0
jmp 0xd894d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0xdc(%rsp), %rdi
callq 0xb91e0
jmp 0xd8c25
leaq 0x98(%rsp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x14390
movq 0x70(%rsp), %rdi
movl $0x0, 0x9c(%rsp)
movl $0x1, 0xa0(%rsp)
movq $0x0, 0x90(%rsp)
addq $0x10, %rdi
callq 0x1acc0
movq 0x70(%rsp), %rdi
movq %rax, 0x50(%rsp)
addq $0x30, %rdi
callq 0x1acc0
movq 0x50(%rsp), %rdi
movq %rax, %rsi
leaq 0x98(%rsp), %rdx
leaq 0x90(%rsp), %rcx
callq 0x148e0
movl %eax, 0x8c(%rsp)
cmpl $0x0, 0x8c(%rsp)
je 0xd8a72
leaq 0x3a4c9(%rip), %rdx # 0x112ea6
leaq 0x88(%rsp), %rdi
movq %rdi, 0x40(%rsp)
movl $0x1, %esi
movl $0x1377, %ecx # imm = 0x1377
callq 0xb9070
movq 0x40(%rsp), %rdi
callq 0x1ea10
movq %rax, 0x48(%rsp)
jmp 0xd8a0a
movq 0x48(%rsp), %rdi
leaq 0x3b503(%rip), %rsi # 0x113f19
callq 0x146a0
movq %rax, 0x38(%rsp)
jmp 0xd8a22
movl 0x8c(%rsp), %edi
callq 0x149f0
movq 0x38(%rsp), %rdi
movq %rax, %rsi
callq 0x146a0
jmp 0xd8a3d
leaq 0x88(%rsp), %rdi
callq 0xb91e0
jmp 0xd8a72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0x88(%rsp), %rdi
callq 0xb91e0
jmp 0xd8c25
movq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rcx
xorl %eax, %eax
cmpl $-0x1, 0x8(%rcx)
movb %al, 0x37(%rsp)
jne 0xd8aa3
cmpq $0x0, 0x80(%rsp)
setne %al
movb %al, 0x37(%rsp)
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0xd8ab0
jmp 0xd8b45
movq 0x80(%rsp), %rax
movl 0x4(%rax), %edi
movq 0x80(%rsp), %rax
movl 0x8(%rax), %esi
movq 0x80(%rsp), %rax
movl 0xc(%rax), %edx
callq 0x14150
movl %eax, %ecx
movq 0x70(%rsp), %rax
movl %ecx, 0x8(%rax)
cmpl $-0x1, 0x8(%rax)
je 0xd8b2a
movq 0x70(%rsp), %rax
movl 0x8(%rax), %edi
movq 0x80(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0x80(%rsp), %rax
movl 0x10(%rax), %edx
callq 0x14580
cmpl $-0x1, %eax
jne 0xd8b28
movq 0x70(%rsp), %rax
movl 0x8(%rax), %edi
callq 0x14df0
movq 0x70(%rsp), %rax
movl $0xffffffff, 0x8(%rax) # imm = 0xFFFFFFFF
jmp 0xd8b2a
jmp 0xd8b2c
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x80(%rsp)
jmp 0xd8a82
movq 0x90(%rsp), %rdi
callq 0x14950
movq 0x70(%rsp), %rax
cmpl $-0x1, 0x8(%rax)
jne 0xd8c1d
leaq 0x3a33e(%rip), %rdx # 0x112ea6
leaq 0x7c(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movl $0x1, %esi
movl $0x138c, %ecx # imm = 0x138C
callq 0xb9070
movq 0x20(%rsp), %rdi
callq 0x1ea10
movq %rax, 0x28(%rsp)
jmp 0xd8b92
movq 0x28(%rsp), %rdi
leaq 0x3b3a4(%rip), %rsi # 0x113f42
callq 0x146a0
movq %rax, 0x18(%rsp)
jmp 0xd8baa
movq 0x18(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x10, %rsi
callq 0x145e0
movq %rax, 0x10(%rsp)
jmp 0xd8bc4
movq 0x10(%rsp), %rdi
leaq 0x3b3c4(%rip), %rsi # 0x113f94
callq 0x146a0
movq %rax, 0x8(%rsp)
jmp 0xd8bdc
movq 0x8(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x30, %rsi
callq 0x145e0
jmp 0xd8bf1
leaq 0x7c(%rsp), %rdi
callq 0xb91e0
jmp 0xd8c1d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0x7c(%rsp), %rdi
callq 0xb91e0
jmp 0xd8c25
addq $0xe8, %rsp
retq
movq 0xd0(%rsp), %rdi
callq 0x14c80
nopw %cs:(%rax,%rax)
|
_ZN7testing8internal17StreamingListener12SocketWriter14MakeConnectionEv:
sub rsp, 0E8h
mov [rsp+0E8h+var_8], rdi
mov rax, [rsp+0E8h+var_8]
mov [rsp+0E8h+var_78], rax
cmp dword ptr [rax+8], 0FFFFFFFFh
setz al
movzx edi, al
and edi, 1; this
call _ZN7testing8internal6IsTrueEb; testing::internal::IsTrue(bool)
test al, 1
jnz short loc_D88B4
jmp short loc_D88B9
loc_D88B4:
jmp loc_D894D
loc_D88B9:
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+0E8h+var_C]; int
mov [rsp+0E8h+var_88], rdi
mov esi, 3
mov ecx, 1369h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, [rsp+0E8h+var_88]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov [rsp+0E8h+var_80], rax
jmp short $+2
loc_D88ED:
mov rdi, [rsp+0E8h+var_80]
lea rsi, aConditionSockf; "Condition sockfd_ == -1 failed. "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+0E8h+var_90], rax
jmp short $+2
loc_D8905:
mov rdi, [rsp+0E8h+var_90]
lea rsi, aMakeconnection; "MakeConnection() can't be called when t"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_D8918:
lea rdi, [rsp+0E8h+var_C]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_D894D
mov rcx, rax
mov eax, edx
mov [rsp+arg_C8], rcx
mov [rsp+arg_C4], eax
lea rdi, [rsp+arg_D4]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp loc_D8C25
loc_D894D:
lea rdi, [rsp+0E8h+var_50]
xor esi, esi
mov edx, 30h ; '0'
call _memset
mov rdi, [rsp+0E8h+var_78]
mov [rsp+0E8h+var_4C], 0
mov [rsp+0E8h+var_48], 1
mov [rsp+0E8h+var_58], 0
add rdi, 10h
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+0E8h+var_78]
mov [rsp+0E8h+var_98], rax
add rdi, 30h ; '0'
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+0E8h+var_98]
mov rsi, rax
lea rdx, [rsp+0E8h+var_50]
lea rcx, [rsp+0E8h+var_58]
call _getaddrinfo
mov dword ptr [rsp+0E8h+var_60+4], eax
cmp dword ptr [rsp+0E8h+var_60+4], 0
jz loc_D8A72
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+0E8h+var_60]; int
mov [rsp+0E8h+var_A8], rdi; __int64
mov esi, 1
mov ecx, 1377h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, [rsp+0E8h+var_A8]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov [rsp+0E8h+var_A0], rax
jmp short $+2
loc_D8A0A:
mov rdi, [rsp+0E8h+var_A0]
lea rsi, aStreamResultTo_0; "stream_result_to: getaddrinfo() failed:"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+0E8h+var_B0], rax
jmp short $+2
loc_D8A22:
mov edi, dword ptr [rsp+0E8h+var_60+4]
call _gai_strerror
mov rdi, [rsp+0E8h+var_B0]
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_D8A3D:
lea rdi, [rsp+0E8h+var_60]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_D8A72
mov rcx, rax
mov eax, edx
mov [rsp+arg_C8], rcx
mov [rsp+arg_C4], eax
lea rdi, [rsp+arg_80]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp loc_D8C25
loc_D8A72:
mov rax, [rsp+0E8h+var_58]
mov [rsp+0E8h+var_68], rax
loc_D8A82:
mov rcx, [rsp+0E8h+var_78]
xor eax, eax
cmp dword ptr [rcx+8], 0FFFFFFFFh
mov [rsp+0E8h+var_B1], al
jnz short loc_D8AA3
cmp [rsp+0E8h+var_68], 0
setnz al
mov [rsp+0E8h+var_B1], al
loc_D8AA3:
mov al, [rsp+0E8h+var_B1]
test al, 1
jnz short loc_D8AB0
jmp loc_D8B45
loc_D8AB0:
mov rax, [rsp+0E8h+var_68]
mov edi, [rax+4]
mov rax, [rsp+0E8h+var_68]
mov esi, [rax+8]
mov rax, [rsp+0E8h+var_68]
mov edx, [rax+0Ch]
call _socket
mov ecx, eax
mov rax, [rsp+0E8h+var_78]
mov [rax+8], ecx
cmp dword ptr [rax+8], 0FFFFFFFFh
jz short loc_D8B2A
mov rax, [rsp+0E8h+var_78]
mov edi, [rax+8]
mov rax, [rsp+0E8h+var_68]
mov rsi, [rax+18h]
mov rax, [rsp+0E8h+var_68]
mov edx, [rax+10h]
call _connect
cmp eax, 0FFFFFFFFh
jnz short loc_D8B28
mov rax, [rsp+0E8h+var_78]
mov edi, [rax+8]
call _close
mov rax, [rsp+0E8h+var_78]
mov dword ptr [rax+8], 0FFFFFFFFh
loc_D8B28:
jmp short $+2
loc_D8B2A:
jmp short $+2
loc_D8B2C:
mov rax, [rsp+0E8h+var_68]
mov rax, [rax+28h]
mov [rsp+0E8h+var_68], rax
jmp loc_D8A82
loc_D8B45:
mov rdi, [rsp+0E8h+var_58]
call _freeaddrinfo
mov rax, [rsp+0E8h+var_78]
cmp dword ptr [rax+8], 0FFFFFFFFh
jnz loc_D8C1D
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+0E8h+var_6C]; int
mov [rsp+0E8h+var_C8], rdi; int
mov esi, 1
mov ecx, 138Ch
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, [rsp+0E8h+var_C8]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov [rsp+0E8h+var_C0], rax
jmp short $+2
loc_D8B92:
mov rdi, [rsp+0E8h+var_C0]
lea rsi, aStreamResultTo_1; "stream_result_to: failed to connect to "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+0E8h+var_D0], rax
jmp short $+2
loc_D8BAA:
mov rdi, [rsp+0E8h+var_D0]
mov rsi, [rsp+0E8h+var_78]
add rsi, 10h
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+0E8h+var_D8], rax
jmp short $+2
loc_D8BC4:
mov rdi, [rsp+0E8h+var_D8]
lea rsi, aTrace+6; ":"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+0E8h+var_E0], rax
jmp short $+2
loc_D8BDC:
mov rdi, [rsp+0E8h+var_E0]
mov rsi, [rsp+0E8h+var_78]
add rsi, 30h ; '0'
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_D8BF1:
lea rdi, [rsp+0E8h+var_6C]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_D8C1D
mov rcx, rax
mov eax, edx
mov [rsp+arg_C8], rcx
mov [rsp+arg_C4], eax
lea rdi, [rsp+arg_74]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_D8C25
loc_D8C1D:
add rsp, 0E8h
retn
loc_D8C25:
mov rdi, [rsp+arg_C8]
call __Unwind_Resume
|
void testing::internal::StreamingListener::SocketWriter::MakeConnection(
testing::internal::StreamingListener::SocketWriter *this)
{
long long v1; // rax
long long v2; // rsi
long long v3; // [rsp+8h] [rbp-E0h]
long long v4; // [rsp+10h] [rbp-D8h]
long long v5; // [rsp+18h] [rbp-D0h]
void *v6; // [rsp+28h] [rbp-C0h]
bool v7; // [rsp+37h] [rbp-B1h]
long long v8; // [rsp+38h] [rbp-B0h]
void *v9; // [rsp+48h] [rbp-A0h]
long long v10; // [rsp+50h] [rbp-98h]
long long v11; // [rsp+58h] [rbp-90h]
void *Stream; // [rsp+68h] [rbp-80h]
int v13; // [rsp+7Ch] [rbp-6Ch] BYREF
long long i; // [rsp+80h] [rbp-68h]
long long v15; // [rsp+88h] [rbp-60h] BYREF
long long v16; // [rsp+90h] [rbp-58h] BYREF
_BYTE v17[4]; // [rsp+98h] [rbp-50h] BYREF
int v18; // [rsp+9Ch] [rbp-4Ch]
int v19; // [rsp+A0h] [rbp-48h]
int v20; // [rsp+DCh] [rbp-Ch] BYREF
testing::internal::StreamingListener::SocketWriter *v21; // [rsp+E0h] [rbp-8h]
v21 = this;
if ( (testing::internal::IsTrue((testing::internal *)(*((_DWORD *)this + 2) == -1)) & 1) == 0 )
{
testing::internal::GTestLog::GTestLog(
(testing::internal::GTestLog *)&v20,
3,
(long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc",
4969);
Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)&v20);
v11 = std::operator<<<std::char_traits<char>>(Stream, "Condition sockfd_ == -1 failed. ");
std::operator<<<std::char_traits<char>>(v11, "MakeConnection() can't be called when there is already a connection.");
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v20);
}
memset(v17, 0LL, 48LL);
v18 = 0;
v19 = 1;
v16 = 0LL;
v10 = std::string::c_str((long long)this + 16);
v1 = std::string::c_str((long long)this + 48);
HIDWORD(v15) = getaddrinfo(v10, v1, v17, &v16);
if ( HIDWORD(v15) )
{
testing::internal::GTestLog::GTestLog(
(testing::internal::GTestLog *)&v15,
1,
(long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc",
4983);
v9 = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)&v15);
v8 = std::operator<<<std::char_traits<char>>(v9, "stream_result_to: getaddrinfo() failed: ");
v2 = gai_strerror(HIDWORD(v15));
std::operator<<<std::char_traits<char>>(v8, v2);
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v15);
}
for ( i = v16; ; i = *(_QWORD *)(i + 40) )
{
v7 = 0;
if ( *((_DWORD *)this + 2) == -1 )
v7 = i != 0;
if ( !v7 )
break;
*((_DWORD *)this + 2) = socket(*(unsigned int *)(i + 4), *(unsigned int *)(i + 8), *(unsigned int *)(i + 12));
if ( *((_DWORD *)this + 2) != -1
&& (unsigned int)connect(*((unsigned int *)this + 2), *(_QWORD *)(i + 24), *(unsigned int *)(i + 16)) == -1 )
{
close(*((unsigned int *)this + 2));
*((_DWORD *)this + 2) = -1;
}
}
freeaddrinfo(v16);
if ( *((_DWORD *)this + 2) == -1 )
{
testing::internal::GTestLog::GTestLog(
(testing::internal::GTestLog *)&v13,
1,
(long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc",
5004);
v6 = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)&v13);
v5 = std::operator<<<std::char_traits<char>>(v6, "stream_result_to: failed to connect to ");
v4 = std::operator<<<char>(v5, (char *)this + 16);
v3 = std::operator<<<std::char_traits<char>>(v4, ":");
std::operator<<<char>(v3, (char *)this + 48);
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v13);
}
}
|
MakeConnection:
SUB RSP,0xe8
MOV qword ptr [RSP + 0xe0],RDI
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x70],RAX
CMP dword ptr [RAX + 0x8],-0x1
SETZ AL
MOVZX EDI,AL
AND EDI,0x1
CALL 0x001b38e0
TEST AL,0x1
JNZ 0x001d88b4
JMP 0x001d88b9
LAB_001d88b4:
JMP 0x001d894d
LAB_001d88b9:
LEA RDX,[0x212ea6]
LEA RDI,[RSP + 0xdc]
MOV qword ptr [RSP + 0x60],RDI
MOV ESI,0x3
MOV ECX,0x1369
CALL 0x001b9070
MOV RDI,qword ptr [RSP + 0x60]
LAB_001d88e1:
CALL 0x0011ea10
MOV qword ptr [RSP + 0x68],RAX
JMP 0x001d88ed
LAB_001d88ed:
MOV RDI,qword ptr [RSP + 0x68]
LEA RSI,[0x213eb3]
CALL 0x001146a0
MOV qword ptr [RSP + 0x58],RAX
JMP 0x001d8905
LAB_001d8905:
MOV RDI,qword ptr [RSP + 0x58]
LEA RSI,[0x213ed4]
CALL 0x001146a0
LAB_001d8916:
JMP 0x001d8918
LAB_001d8918:
LEA RDI,[RSP + 0xdc]
CALL 0x001b91e0
JMP 0x001d894d
LAB_001d894d:
LEA RDI,[RSP + 0x98]
XOR ESI,ESI
MOV EDX,0x30
CALL 0x00114390
MOV RDI,qword ptr [RSP + 0x70]
MOV dword ptr [RSP + 0x9c],0x0
MOV dword ptr [RSP + 0xa0],0x1
MOV qword ptr [RSP + 0x90],0x0
ADD RDI,0x10
CALL 0x0011acc0
MOV RDI,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x50],RAX
ADD RDI,0x30
CALL 0x0011acc0
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,RAX
LEA RDX,[RSP + 0x98]
LEA RCX,[RSP + 0x90]
CALL 0x001148e0
MOV dword ptr [RSP + 0x8c],EAX
CMP dword ptr [RSP + 0x8c],0x0
JZ 0x001d8a72
LEA RDX,[0x212ea6]
LEA RDI,[RSP + 0x88]
MOV qword ptr [RSP + 0x40],RDI
MOV ESI,0x1
MOV ECX,0x1377
CALL 0x001b9070
MOV RDI,qword ptr [RSP + 0x40]
LAB_001d89fe:
CALL 0x0011ea10
MOV qword ptr [RSP + 0x48],RAX
JMP 0x001d8a0a
LAB_001d8a0a:
MOV RDI,qword ptr [RSP + 0x48]
LEA RSI,[0x213f19]
CALL 0x001146a0
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001d8a22
LAB_001d8a22:
MOV EDI,dword ptr [RSP + 0x8c]
CALL 0x001149f0
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,RAX
CALL 0x001146a0
LAB_001d8a3b:
JMP 0x001d8a3d
LAB_001d8a3d:
LEA RDI,[RSP + 0x88]
CALL 0x001b91e0
JMP 0x001d8a72
LAB_001d8a72:
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x80],RAX
LAB_001d8a82:
MOV RCX,qword ptr [RSP + 0x70]
XOR EAX,EAX
CMP dword ptr [RCX + 0x8],-0x1
MOV byte ptr [RSP + 0x37],AL
JNZ 0x001d8aa3
CMP qword ptr [RSP + 0x80],0x0
SETNZ AL
MOV byte ptr [RSP + 0x37],AL
LAB_001d8aa3:
MOV AL,byte ptr [RSP + 0x37]
TEST AL,0x1
JNZ 0x001d8ab0
JMP 0x001d8b45
LAB_001d8ab0:
MOV RAX,qword ptr [RSP + 0x80]
MOV EDI,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RSP + 0x80]
MOV ESI,dword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0x80]
MOV EDX,dword ptr [RAX + 0xc]
CALL 0x00114150
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x70]
MOV dword ptr [RAX + 0x8],ECX
CMP dword ptr [RAX + 0x8],-0x1
JZ 0x001d8b2a
MOV RAX,qword ptr [RSP + 0x70]
MOV EDI,dword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0x80]
MOV EDX,dword ptr [RAX + 0x10]
CALL 0x00114580
CMP EAX,-0x1
JNZ 0x001d8b28
MOV RAX,qword ptr [RSP + 0x70]
MOV EDI,dword ptr [RAX + 0x8]
CALL 0x00114df0
MOV RAX,qword ptr [RSP + 0x70]
MOV dword ptr [RAX + 0x8],0xffffffff
LAB_001d8b28:
JMP 0x001d8b2a
LAB_001d8b2a:
JMP 0x001d8b2c
LAB_001d8b2c:
MOV RAX,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RSP + 0x80],RAX
JMP 0x001d8a82
LAB_001d8b45:
MOV RDI,qword ptr [RSP + 0x90]
CALL 0x00114950
MOV RAX,qword ptr [RSP + 0x70]
CMP dword ptr [RAX + 0x8],-0x1
JNZ 0x001d8c1d
LEA RDX,[0x212ea6]
LEA RDI,[RSP + 0x7c]
MOV qword ptr [RSP + 0x20],RDI
MOV ESI,0x1
MOV ECX,0x138c
CALL 0x001b9070
MOV RDI,qword ptr [RSP + 0x20]
LAB_001d8b86:
CALL 0x0011ea10
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001d8b92
LAB_001d8b92:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[0x213f42]
CALL 0x001146a0
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001d8baa
LAB_001d8baa:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x70]
ADD RSI,0x10
CALL 0x001145e0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001d8bc4
LAB_001d8bc4:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[0x213f94]
CALL 0x001146a0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001d8bdc
LAB_001d8bdc:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x70]
ADD RSI,0x30
CALL 0x001145e0
LAB_001d8bef:
JMP 0x001d8bf1
LAB_001d8bf1:
LEA RDI,[RSP + 0x7c]
CALL 0x001b91e0
JMP 0x001d8c1d
LAB_001d8c1d:
ADD RSP,0xe8
RET
|
/* testing::internal::StreamingListener::SocketWriter::MakeConnection() */
void __thiscall
testing::internal::StreamingListener::SocketWriter::MakeConnection(SocketWriter *this)
{
int iVar1;
ulong uVar2;
ostream *poVar3;
char *pcVar4;
char *__service;
GTestLog local_6c [4];
addrinfo *local_68;
GTestLog local_60 [4];
int local_5c;
addrinfo *local_58;
addrinfo local_50;
GTestLog local_c [4];
SocketWriter *local_8;
local_8 = this;
uVar2 = IsTrue(*(int *)(this + 8) == -1);
if ((uVar2 & 1) == 0) {
GTestLog::GTestLog(local_c,3,
"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc"
,0x1369);
/* try { // try from 001d88e1 to 001d8915 has its CatchHandler @ 001d8927 */
poVar3 = (ostream *)GTestLog::GetStream();
poVar3 = std::operator<<(poVar3,"Condition sockfd_ == -1 failed. ");
std::operator<<(poVar3,"MakeConnection() can\'t be called when there is already a connection.");
GTestLog::~GTestLog(local_c);
}
memset(&local_50,0,0x30);
local_50.ai_family = 0;
local_50.ai_socktype = 1;
local_58 = (addrinfo *)0x0;
pcVar4 = (char *)std::__cxx11::string::c_str((string *)(this + 0x10));
__service = (char *)std::__cxx11::string::c_str((string *)(this + 0x30));
local_5c = getaddrinfo(pcVar4,__service,&local_50,&local_58);
if (local_5c != 0) {
GTestLog::GTestLog(local_60,1,
"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc"
,0x1377);
/* try { // try from 001d89fe to 001d8a3a has its CatchHandler @ 001d8a4c */
poVar3 = (ostream *)GTestLog::GetStream();
poVar3 = std::operator<<(poVar3,"stream_result_to: getaddrinfo() failed: ");
pcVar4 = gai_strerror(local_5c);
std::operator<<(poVar3,pcVar4);
GTestLog::~GTestLog(local_60);
}
for (local_68 = local_58; *(int *)(this + 8) == -1 && local_68 != (addrinfo *)0x0;
local_68 = local_68->ai_next) {
iVar1 = socket(local_68->ai_family,local_68->ai_socktype,local_68->ai_protocol);
*(int *)(this + 8) = iVar1;
if ((*(int *)(this + 8) != -1) &&
(iVar1 = connect(*(int *)(this + 8),local_68->ai_addr,local_68->ai_addrlen), iVar1 == -1)) {
close(*(int *)(this + 8));
*(int4 *)(this + 8) = 0xffffffff;
}
}
freeaddrinfo(local_58);
if (*(int *)(this + 8) == -1) {
GTestLog::GTestLog(local_6c,1,
"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc"
,0x138c);
/* try { // try from 001d8b86 to 001d8bee has its CatchHandler @ 001d8bfd */
poVar3 = (ostream *)GTestLog::GetStream();
poVar3 = std::operator<<(poVar3,"stream_result_to: failed to connect to ");
poVar3 = std::operator<<(poVar3,(string *)(this + 0x10));
poVar3 = std::operator<<(poVar3,":");
std::operator<<(poVar3,(string *)(this + 0x30));
GTestLog::~GTestLog(local_6c);
}
return;
}
|
|
59,841
|
mysql_kill_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_kill_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_kill,
(parms->mysql, parms->pid),
parms->mysql,
int,
r_int)
}
|
O0
|
c
|
mysql_kill_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x84fe0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
mysql_kill_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
call mysql_kill
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
_DWORD * mysql_kill_start_internal(long long *a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL);
v2[2] = mysql_kill(*a1, a1[1]);
result = v2;
*v2 = 0;
return result;
}
|
mysql_kill_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x00184fe0
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_kill_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_kill(*param_1,param_1[1]);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
|
|
59,842
|
delete_tails
|
eloqsql/storage/maria/ma_blockrec.c
|
static my_bool delete_tails(MARIA_HA *info, MARIA_RECORD_POS *tails)
{
my_bool res= 0;
DBUG_ENTER("delete_tails");
for (; *tails; tails++)
{
if (delete_head_or_tail(info,
ma_recordpos_to_page(*tails),
ma_recordpos_to_dir_entry(*tails), 0, 1))
res= 1;
}
DBUG_RETURN(res);
}
|
O3
|
c
|
delete_tails:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rsi), %rax
testq %rax, %rax
je 0x4bcb4
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rbx
xorl %r15d, %r15d
movl $0x1, %r12d
movq %rax, %rsi
shrq $0x8, %rsi
movzbl %al, %edx
movq %r14, %rdi
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x4b171
testb %al, %al
movzbl %r15b, %r15d
cmovnel %r12d, %r15d
movq (%rbx), %rax
addq $0x8, %rbx
testq %rax, %rax
jne 0x4bc82
jmp 0x4bcb7
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
delete_tails:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rax, [rsi]
test rax, rax
jz short loc_4BCB4
mov rbx, rsi
mov r14, rdi
add rbx, 8
xor r15d, r15d
mov r12d, 1
loc_4BC82:
mov rsi, rax
shr rsi, 8
movzx edx, al
mov rdi, r14
xor ecx, ecx
mov r8d, 1
call delete_head_or_tail
test al, al
movzx r15d, r15b
cmovnz r15d, r12d
mov rax, [rbx]
add rbx, 8
test rax, rax
jnz short loc_4BC82
jmp short loc_4BCB7
loc_4BCB4:
xor r15d, r15d
loc_4BCB7:
mov eax, r15d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long delete_tails(_DWORD *a1, unsigned long long *a2)
{
unsigned long long v2; // rax
unsigned long long *v3; // rbx
unsigned int v4; // r15d
v2 = *a2;
if ( *a2 )
{
v3 = a2 + 1;
LOBYTE(v4) = 0;
do
{
v4 = (unsigned __int8)v4;
if ( (unsigned __int8)delete_head_or_tail(a1, v2 >> 8, (unsigned __int8)v2, 0, 1) )
v4 = 1;
v2 = *v3++;
}
while ( v2 );
}
else
{
return 0;
}
return v4;
}
|
delete_tails:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RAX,qword ptr [RSI]
TEST RAX,RAX
JZ 0x0014bcb4
MOV RBX,RSI
MOV R14,RDI
ADD RBX,0x8
XOR R15D,R15D
MOV R12D,0x1
LAB_0014bc82:
MOV RSI,RAX
SHR RSI,0x8
MOVZX EDX,AL
MOV RDI,R14
XOR ECX,ECX
MOV R8D,0x1
CALL 0x0014b171
TEST AL,AL
MOVZX R15D,R15B
CMOVNZ R15D,R12D
MOV RAX,qword ptr [RBX]
ADD RBX,0x8
TEST RAX,RAX
JNZ 0x0014bc82
JMP 0x0014bcb7
LAB_0014bcb4:
XOR R15D,R15D
LAB_0014bcb7:
MOV EAX,R15D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int4 delete_tails(int8 param_1,ulong *param_2)
{
char cVar1;
ulong uVar2;
int4 uVar3;
uVar2 = *param_2;
if (uVar2 == 0) {
uVar3 = 0;
}
else {
param_2 = param_2 + 1;
uVar3 = 0;
do {
cVar1 = delete_head_or_tail(param_1,uVar2 >> 8,uVar2 & 0xff,0,1);
if (cVar1 != '\0') {
uVar3 = 1;
}
uVar2 = *param_2;
param_2 = param_2 + 1;
} while (uVar2 != 0);
}
return uVar3;
}
|
|
59,843
|
unlink_block
|
eloqsql/storage/maria/ma_pagecache.c
|
static void unlink_block(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block)
{
DBUG_ENTER("unlink_block");
DBUG_PRINT("pagecache", ("unlink %p", block));
DBUG_ASSERT(block->next_used != NULL);
if (block->next_used == block)
{
/* The list contains only one member */
pagecache->used_last= pagecache->used_ins= NULL;
}
else
{
block->next_used->prev_used= block->prev_used;
*block->prev_used= block->next_used;
if (pagecache->used_last == block)
pagecache->used_last= STRUCT_PTR(PAGECACHE_BLOCK_LINK,
next_used, block->prev_used);
if (pagecache->used_ins == block)
pagecache->used_ins= STRUCT_PTR(PAGECACHE_BLOCK_LINK,
next_used, block->prev_used);
}
block->next_used= NULL;
KEYCACHE_THREAD_TRACE("unlink_block");
#if defined(PAGECACHE_DEBUG)
KEYCACHE_DBUG_ASSERT(pagecache->blocks_available != 0);
pagecache->blocks_available--;
KEYCACHE_DBUG_PRINT("pagecache",
("unlinked block: %p (%u) status: %x #requests: %u #available: %u",
block, PCBLOCK_NUMBER(pagecache, block),
block->status,
block->requests, pagecache->blocks_available));
PCBLOCK_INFO(block);
#endif
DBUG_VOID_RETURN;
}
|
O0
|
c
|
unlink_block:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x4056e
jmp 0x40570
jmp 0x40572
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x4059f
movq -0x8(%rbp), %rax
movq $0x0, 0xc0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xb8(%rax)
jmp 0x4060e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x405e8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x4060c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xc0(%rax)
jmp 0x4060e
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
jmp 0x4061b
popq %rbp
retq
nopl (%rax)
|
unlink_block:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_4056E:
jmp short $+2
loc_40570:
jmp short $+2
loc_40572:
mov rax, [rbp+var_10]
mov rax, [rax]
cmp rax, [rbp+var_10]
jnz short loc_4059F
mov rax, [rbp+var_8]
mov qword ptr [rax+0C0h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+0B8h], 0
jmp short loc_4060E
loc_4059F:
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rax], rcx
mov rax, [rbp+var_8]
mov rax, [rax+0B8h]
cmp rax, [rbp+var_10]
jnz short loc_405E8
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_8]
mov [rax+0B8h], rcx
loc_405E8:
mov rax, [rbp+var_8]
mov rax, [rax+0C0h]
cmp rax, [rbp+var_10]
jnz short loc_4060C
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_8]
mov [rax+0C0h], rcx
loc_4060C:
jmp short $+2
loc_4060E:
mov rax, [rbp+var_10]
mov qword ptr [rax], 0
jmp short $+2
loc_4061B:
pop rbp
retn
|
_QWORD * unlink_block(long long a1, _QWORD *a2)
{
_QWORD *result; // rax
if ( (_QWORD *)*a2 == a2 )
{
*(_QWORD *)(a1 + 192) = 0LL;
*(_QWORD *)(a1 + 184) = 0LL;
}
else
{
*(_QWORD *)(*a2 + 8LL) = a2[1];
*(_QWORD *)a2[1] = *a2;
if ( *(_QWORD **)(a1 + 184) == a2 )
*(_QWORD *)(a1 + 184) = a2[1];
if ( *(_QWORD **)(a1 + 192) == a2 )
*(_QWORD *)(a1 + 192) = a2[1];
}
result = a2;
*a2 = 0LL;
return result;
}
|
unlink_block:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x0014056e
LAB_0014056e:
JMP 0x00140570
LAB_00140570:
JMP 0x00140572
LAB_00140572:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x0014059f
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xc0],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xb8],0x0
JMP 0x0014060e
LAB_0014059f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001405e8
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xb8],RCX
LAB_001405e8:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xc0]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x0014060c
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xc0],RCX
LAB_0014060c:
JMP 0x0014060e
LAB_0014060e:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],0x0
JMP 0x0014061b
LAB_0014061b:
POP RBP
RET
|
void unlink_block(long param_1,long *param_2)
{
if ((long *)*param_2 == param_2) {
*(int8 *)(param_1 + 0xc0) = 0;
*(int8 *)(param_1 + 0xb8) = 0;
}
else {
*(long *)(*param_2 + 8) = param_2[1];
*(long *)param_2[1] = *param_2;
if (*(long **)(param_1 + 0xb8) == param_2) {
*(long *)(param_1 + 0xb8) = param_2[1];
}
if (*(long **)(param_1 + 0xc0) == param_2) {
*(long *)(param_1 + 0xc0) = param_2[1];
}
}
*param_2 = 0;
return;
}
|
|
59,844
|
unlink_block
|
eloqsql/storage/maria/ma_pagecache.c
|
static void unlink_block(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block)
{
DBUG_ENTER("unlink_block");
DBUG_PRINT("pagecache", ("unlink %p", block));
DBUG_ASSERT(block->next_used != NULL);
if (block->next_used == block)
{
/* The list contains only one member */
pagecache->used_last= pagecache->used_ins= NULL;
}
else
{
block->next_used->prev_used= block->prev_used;
*block->prev_used= block->next_used;
if (pagecache->used_last == block)
pagecache->used_last= STRUCT_PTR(PAGECACHE_BLOCK_LINK,
next_used, block->prev_used);
if (pagecache->used_ins == block)
pagecache->used_ins= STRUCT_PTR(PAGECACHE_BLOCK_LINK,
next_used, block->prev_used);
}
block->next_used= NULL;
KEYCACHE_THREAD_TRACE("unlink_block");
#if defined(PAGECACHE_DEBUG)
KEYCACHE_DBUG_ASSERT(pagecache->blocks_available != 0);
pagecache->blocks_available--;
KEYCACHE_DBUG_PRINT("pagecache",
("unlinked block: %p (%u) status: %x #requests: %u #available: %u",
block, PCBLOCK_NUMBER(pagecache, block),
block->status,
block->requests, pagecache->blocks_available));
PCBLOCK_INFO(block);
#endif
DBUG_VOID_RETURN;
}
|
O3
|
c
|
unlink_block:
movq (%rsi), %rax
cmpq %rsi, %rax
je 0x3da8a
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rax)
movq (%rsi), %rax
movq %rax, (%rcx)
cmpq %rsi, 0xb8(%rdi)
jne 0x3da73
movq 0x8(%rsi), %rax
movq %rax, 0xb8(%rdi)
cmpq %rsi, 0xc0(%rdi)
jne 0x3da87
movq 0x8(%rsi), %rax
movq %rax, 0xc0(%rdi)
popq %rbp
jmp 0x3da94
xorps %xmm0, %xmm0
movups %xmm0, 0xb8(%rdi)
movq $0x0, (%rsi)
retq
|
unlink_block:
mov rax, [rsi]
cmp rax, rsi
jz short loc_3DA8A
push rbp
mov rbp, rsp
mov rcx, [rsi+8]
mov [rax+8], rcx
mov rax, [rsi]
mov [rcx], rax
cmp [rdi+0B8h], rsi
jnz short loc_3DA73
mov rax, [rsi+8]
mov [rdi+0B8h], rax
loc_3DA73:
cmp [rdi+0C0h], rsi
jnz short loc_3DA87
mov rax, [rsi+8]
mov [rdi+0C0h], rax
loc_3DA87:
pop rbp
jmp short loc_3DA94
loc_3DA8A:
xorps xmm0, xmm0
movups xmmword ptr [rdi+0B8h], xmm0
loc_3DA94:
mov qword ptr [rsi], 0
retn
|
_QWORD * unlink_block(long long a1, _QWORD *a2)
{
_QWORD *result; // rax
_QWORD *v3; // rcx
result = (_QWORD *)*a2;
if ( (_QWORD *)*a2 == a2 )
{
*(_OWORD *)(a1 + 184) = 0LL;
}
else
{
v3 = (_QWORD *)a2[1];
result[1] = v3;
result = (_QWORD *)*a2;
*v3 = *a2;
if ( *(_QWORD **)(a1 + 184) == a2 )
{
result = (_QWORD *)a2[1];
*(_QWORD *)(a1 + 184) = result;
}
if ( *(_QWORD **)(a1 + 192) == a2 )
{
result = (_QWORD *)a2[1];
*(_QWORD *)(a1 + 192) = result;
}
}
*a2 = 0LL;
return result;
}
|
unlink_block:
MOV RAX,qword ptr [RSI]
CMP RAX,RSI
JZ 0x0013da8a
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RSI + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RCX],RAX
CMP qword ptr [RDI + 0xb8],RSI
JNZ 0x0013da73
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0xb8],RAX
LAB_0013da73:
CMP qword ptr [RDI + 0xc0],RSI
JNZ 0x0013da87
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0xc0],RAX
LAB_0013da87:
POP RBP
JMP 0x0013da94
LAB_0013da8a:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0xb8],XMM0
LAB_0013da94:
MOV qword ptr [RSI],0x0
RET
|
void unlink_block(long param_1,int8 *param_2)
{
int8 *puVar1;
if ((int8 *)*param_2 == param_2) {
*(int8 *)(param_1 + 0xb8) = 0;
*(int8 *)(param_1 + 0xc0) = 0;
}
else {
puVar1 = (int8 *)param_2[1];
((int8 *)*param_2)[1] = puVar1;
*puVar1 = *param_2;
if (*(int8 **)(param_1 + 0xb8) == param_2) {
*(int8 *)(param_1 + 0xb8) = param_2[1];
}
if (*(int8 **)(param_1 + 0xc0) == param_2) {
*(int8 *)(param_1 + 0xc0) = param_2[1];
}
}
*param_2 = 0;
return;
}
|
|
59,845
|
ImPlot3D::GetColormapColorU32(int, int)
|
zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d.cpp
|
ImU32 GetColormapColorU32(int idx, ImPlot3DColormap cmap) {
ImPlot3DContext& gp = *GImPlot3D;
cmap = cmap == IMPLOT3D_AUTO ? gp.Style.Colormap : cmap;
IM_ASSERT_USER_ERROR(cmap >= 0 && cmap < gp.ColormapData.Count, "Invalid colormap index!");
idx = idx % gp.ColormapData.GetKeyCount(cmap);
return gp.ColormapData.GetKeyColor(cmap, idx);
}
|
O0
|
cpp
|
ImPlot3D::GetColormapColorU32(int, int):
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl %esi, 0x10(%rsp)
movq 0x5b8775(%rip), %rax # 0x68f638
movq %rax, 0x8(%rsp)
cmpl $-0x1, 0x10(%rsp)
jne 0xd6ee0
movq 0x8(%rsp), %rax
movl 0x1d0(%rax), %eax
movl %eax, 0x4(%rsp)
jmp 0xd6ee8
movl 0x10(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
jl 0xd6f08
movl 0x10(%rsp), %eax
movq 0x8(%rsp), %rcx
cmpl 0x2a8(%rcx), %eax
jl 0xd6f1c
leaq 0x4fbac8(%rip), %rdi # 0x5d29d7
callq 0x4f7220
testb $0x1, %al
jne 0xd6f1a
jmp 0xd6f1c
jmp 0xd6f1c
jmp 0xd6f1e
movl 0x14(%rsp), %eax
movl %eax, (%rsp)
movq 0x8(%rsp), %rdi
addq $0x208, %rdi # imm = 0x208
movl 0x10(%rsp), %esi
callq 0xda0c0
movl %eax, %ecx
movl (%rsp), %eax
cltd
idivl %ecx
movl %edx, 0x14(%rsp)
movq 0x8(%rsp), %rdi
addq $0x208, %rdi # imm = 0x208
movl 0x10(%rsp), %esi
movl 0x14(%rsp), %edx
callq 0xda0f0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN8ImPlot3D19GetColormapColorU32Eii:
sub rsp, 18h
mov [rsp+18h+var_4], edi
mov [rsp+18h+var_8], esi
mov rax, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
mov [rsp+18h+var_10], rax
cmp [rsp+18h+var_8], 0FFFFFFFFh
jnz short loc_D6EE0
mov rax, [rsp+18h+var_10]
mov eax, [rax+1D0h]
mov [rsp+18h+var_14], eax
jmp short loc_D6EE8
loc_D6EE0:
mov eax, [rsp+18h+var_8]
mov [rsp+18h+var_14], eax
loc_D6EE8:
mov eax, [rsp+18h+var_14]
mov [rsp+18h+var_8], eax
cmp [rsp+18h+var_8], 0
jl short loc_D6F08
mov eax, [rsp+18h+var_8]
mov rcx, [rsp+18h+var_10]
cmp eax, [rcx+2A8h]
jl short loc_D6F1C
loc_D6F08:
lea rdi, aInvalidColorma; "Invalid colormap index!"
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
test al, 1
jnz short loc_D6F1A
jmp short loc_D6F1C
loc_D6F1A:
jmp short $+2
loc_D6F1C:
jmp short $+2
loc_D6F1E:
mov eax, [rsp+18h+var_4]
mov [rsp+18h+var_18], eax
mov rdi, [rsp+18h+var_10]
add rdi, 208h; this
mov esi, [rsp+18h+var_8]; int
call _ZNK20ImPlot3DColormapData11GetKeyCountEi; ImPlot3DColormapData::GetKeyCount(int)
mov ecx, eax
mov eax, [rsp+18h+var_18]
cdq
idiv ecx
mov [rsp+18h+var_4], edx
mov rdi, [rsp+18h+var_10]
add rdi, 208h; this
mov esi, [rsp+18h+var_8]; int
mov edx, [rsp+18h+var_4]; int
call _ZNK20ImPlot3DColormapData11GetKeyColorEii; ImPlot3DColormapData::GetKeyColor(int,int)
add rsp, 18h
retn
|
long long ImPlot3D::GetColormapColorU32(ImPlot3D *this, const char *a2)
{
int v3; // [rsp+4h] [rbp-14h]
long long v4; // [rsp+8h] [rbp-10h]
int v5; // [rsp+14h] [rbp-4h]
v4 = ImPlot3D::GImPlot3D;
if ( (_DWORD)a2 == -1 )
v3 = *(_DWORD *)(ImPlot3D::GImPlot3D + 464);
else
v3 = (int)a2;
if ( v3 < 0 || v3 >= *(_DWORD *)(ImPlot3D::GImPlot3D + 680) )
ImGui::ErrorLog((ImGui *)"Invalid colormap index!", a2);
v5 = (int)this % (int)ImPlot3DColormapData::GetKeyCount((ImPlot3DColormapData *)(v4 + 520), v3);
return ImPlot3DColormapData::GetKeyColor((ImPlot3DColormapData *)(v4 + 520), v3, v5);
}
|
GetColormapColorU32:
SUB RSP,0x18
MOV dword ptr [RSP + 0x14],EDI
MOV dword ptr [RSP + 0x10],ESI
MOV RAX,qword ptr [0x0078f638]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0x10],-0x1
JNZ 0x001d6ee0
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x1d0]
MOV dword ptr [RSP + 0x4],EAX
JMP 0x001d6ee8
LAB_001d6ee0:
MOV EAX,dword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x4],EAX
LAB_001d6ee8:
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [RSP + 0x10],EAX
CMP dword ptr [RSP + 0x10],0x0
JL 0x001d6f08
MOV EAX,dword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x8]
CMP EAX,dword ptr [RCX + 0x2a8]
JL 0x001d6f1c
LAB_001d6f08:
LEA RDI,[0x6d29d7]
CALL 0x005f7220
TEST AL,0x1
JNZ 0x001d6f1a
JMP 0x001d6f1c
LAB_001d6f1a:
JMP 0x001d6f1c
LAB_001d6f1c:
JMP 0x001d6f1e
LAB_001d6f1e:
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP],EAX
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x208
MOV ESI,dword ptr [RSP + 0x10]
CALL 0x001da0c0
MOV ECX,EAX
MOV EAX,dword ptr [RSP]
CDQ
IDIV ECX
MOV dword ptr [RSP + 0x14],EDX
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x208
MOV ESI,dword ptr [RSP + 0x10]
MOV EDX,dword ptr [RSP + 0x14]
CALL 0x001da0f0
ADD RSP,0x18
RET
|
/* ImPlot3D::GetColormapColorU32(int, int) */
void ImPlot3D::GetColormapColorU32(int param_1,int param_2)
{
long lVar1;
int iVar2;
int local_14;
lVar1 = GImPlot3D;
local_14 = param_2;
if (param_2 == -1) {
local_14 = *(int *)(GImPlot3D + 0x1d0);
}
if ((local_14 < 0) || (*(int *)(GImPlot3D + 0x2a8) <= local_14)) {
ImGui::ErrorLog("Invalid colormap index!");
}
iVar2 = ImPlot3DColormapData::GetKeyCount((ImPlot3DColormapData *)(lVar1 + 0x208),local_14);
ImPlot3DColormapData::GetKeyColor
((ImPlot3DColormapData *)(lVar1 + 0x208),local_14,param_1 % iVar2);
return;
}
|
|
59,846
|
BAIL_OUT
|
eloqsql/libmariadb/unittest/mytap/tap.c
|
void
BAIL_OUT(char const *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
fprintf(tapout, "Bail out! ");
vfprintf(tapout, fmt, ap);
emit_endl();
va_end(ap);
exit(255);
}
|
O0
|
c
|
BAIL_OUT:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0x2fba5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq 0x4e3d1(%rip), %rax # 0x7dfc8
movq (%rax), %rdi
leaq 0x3af0a(%rip), %rsi # 0x6ab0b
movb $0x0, %al
callq 0x14650
movq 0x4e3b9(%rip), %rax # 0x7dfc8
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x145d0
callq 0x30360
leaq -0x20(%rbp), %rax
movl $0xff, %edi
callq 0x14540
nopw %cs:(%rax,%rax)
|
BAIL_OUT:
push rbp
mov rbp, rsp
sub rsp, 0D0h
test al, al
jz short loc_2FBA5
movaps [rbp+var_A0], xmm0
movaps [rbp+var_90], xmm1
movaps [rbp+var_80], xmm2
movaps [rbp+var_70], xmm3
movaps [rbp+var_60], xmm4
movaps [rbp+var_50], xmm5
movaps [rbp+var_40], xmm6
movaps [rbp+var_30], xmm7
loc_2FBA5:
mov [rbp+var_A8], r9
mov [rbp+var_B0], r8
mov [rbp+var_B8], rcx
mov [rbp+var_C0], rdx
mov [rbp+var_C8], rsi
mov [rbp+var_8], rdi
lea rax, [rbp+var_20]
lea rcx, [rbp+var_D0]
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, cs:stdout_ptr
mov rdi, [rax]
lea rsi, aBailOut; "Bail out! "
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
mov rsi, [rbp+var_8]
lea rdx, [rbp+var_20]
call _vfprintf
call emit_endl
lea rax, [rbp+var_20]
mov edi, 0FFh
call _exit
|
void __noreturn BAIL_OUT(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v15; // [rsp+0h] [rbp-D0h] BYREF
long long v16; // [rsp+8h] [rbp-C8h]
long long v17; // [rsp+10h] [rbp-C0h]
long long v18; // [rsp+18h] [rbp-B8h]
long long v19; // [rsp+20h] [rbp-B0h]
long long v20; // [rsp+28h] [rbp-A8h]
__m128 v21; // [rsp+30h] [rbp-A0h]
__m128 v22; // [rsp+40h] [rbp-90h]
__m128 v23; // [rsp+50h] [rbp-80h]
__m128 v24; // [rsp+60h] [rbp-70h]
__m128 v25; // [rsp+70h] [rbp-60h]
__m128 v26; // [rsp+80h] [rbp-50h]
__m128 v27; // [rsp+90h] [rbp-40h]
__m128 v28; // [rsp+A0h] [rbp-30h]
_DWORD v29[2]; // [rsp+B0h] [rbp-20h] BYREF
char *v30; // [rsp+B8h] [rbp-18h]
char *v31; // [rsp+C0h] [rbp-10h]
long long v32; // [rsp+C8h] [rbp-8h]
v21 = a7;
v22 = a8;
v23 = a9;
v24 = a10;
v25 = a11;
v26 = a12;
v27 = a13;
v28 = a14;
v20 = a6;
v19 = a5;
v18 = a4;
v17 = a3;
v16 = a2;
v32 = a1;
v31 = &v15;
v30 = &a15;
v29[1] = 48;
v29[0] = 8;
fprintf(stdout, "Bail out! ");
vfprintf(stdout, v32, v29);
emit_endl();
exit(255LL);
}
|
BAIL_OUT:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
TEST AL,AL
JZ 0x0012fba5
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM1
MOVAPS xmmword ptr [RBP + -0x80],XMM2
MOVAPS xmmword ptr [RBP + -0x70],XMM3
MOVAPS xmmword ptr [RBP + -0x60],XMM4
MOVAPS xmmword ptr [RBP + -0x50],XMM5
MOVAPS xmmword ptr [RBP + -0x40],XMM6
MOVAPS xmmword ptr [RBP + -0x30],XMM7
LAB_0012fba5:
MOV qword ptr [RBP + -0xa8],R9
MOV qword ptr [RBP + -0xb0],R8
MOV qword ptr [RBP + -0xb8],RCX
MOV qword ptr [RBP + -0xc0],RDX
MOV qword ptr [RBP + -0xc8],RSI
MOV qword ptr [RBP + -0x8],RDI
LEA RAX,[RBP + -0x20]
LEA RCX,[RBP + -0xd0]
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 [0x0017dfc8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x16ab0b]
MOV AL,0x0
CALL 0x00114650
MOV RAX,qword ptr [0x0017dfc8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[RBP + -0x20]
CALL 0x001145d0
CALL 0x00130360
LEA RAX,[RBP + -0x20]
MOV EDI,0xff
CALL 0x00114540
|
void BAIL_OUT(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
char *param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int1 local_d8 [8];
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int4 local_28;
int4 local_24;
int1 *local_20;
int1 *local_18;
char *local_10;
if (in_AL != '\0') {
local_a8 = param_1;
local_98 = param_2;
local_88 = param_3;
local_78 = param_4;
local_68 = param_5;
local_58 = param_6;
local_48 = param_7;
local_38 = param_8;
}
local_18 = local_d8;
local_20 = &stack0x00000008;
local_24 = 0x30;
local_28 = 8;
local_d0 = param_10;
local_c8 = param_11;
local_c0 = param_12;
local_b8 = param_13;
local_b0 = param_14;
local_10 = param_9;
fprintf(*(FILE **)PTR_stdout_0017dfc8,"Bail out! ");
vfprintf(*(FILE **)PTR_stdout_0017dfc8,local_10,&local_28);
emit_endl();
/* WARNING: Subroutine does not return */
exit(0xff);
}
|
|
59,847
|
bitmap_is_subset
|
eloqsql/mysys/my_bitmap.c
|
my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2)
{
my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end;
DBUG_ASSERT(map1->bitmap && map2->bitmap);
DBUG_ASSERT(map1->n_bits==map2->n_bits);
end= map1->last_word_ptr;
while (m1 < end)
{
if ((*m1++) & ~(*m2++))
return 0;
}
/* here both maps have the same number of bits - see assert above */
return ((*m1 & ~*m2 & ~map1->last_word_mask) ? 0 : 1);
}
|
O0
|
c
|
bitmap_is_subset:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0xf1784
jmp 0xf1786
jmp 0xf1788
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0xf17d2
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x20(%rbp)
movl (%rax), %eax
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x4, %rdx
movq %rdx, -0x28(%rbp)
movl (%rcx), %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xf17d0
movb $0x0, -0x1(%rbp)
jmp 0xf17ff
jmp 0xf1794
movq -0x20(%rbp), %rax
movl (%rax), %edx
movq -0x28(%rbp), %rax
movl (%rax), %eax
xorl $-0x1, %eax
andl %eax, %edx
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
xorl $-0x1, %eax
andl %eax, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
bitmap_is_subset:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_28], rax
jmp short $+2
loc_F1784:
jmp short $+2
loc_F1786:
jmp short $+2
loc_F1788:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_30], rax
loc_F1794:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnb short loc_F17D2
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 4
mov [rbp+var_20], rcx
mov eax, [rax]
mov rcx, [rbp+var_28]
mov rdx, rcx
add rdx, 4
mov [rbp+var_28], rdx
mov ecx, [rcx]
xor ecx, 0FFFFFFFFh
and eax, ecx
cmp eax, 0
jz short loc_F17D0
mov [rbp+var_1], 0
jmp short loc_F17FF
loc_F17D0:
jmp short loc_F1794
loc_F17D2:
mov rax, [rbp+var_20]
mov edx, [rax]
mov rax, [rbp+var_28]
mov eax, [rax]
xor eax, 0FFFFFFFFh
and edx, eax
mov rax, [rbp+var_10]
mov eax, [rax+18h]
xor eax, 0FFFFFFFFh
and edx, eax
mov eax, 1
xor ecx, ecx
cmp edx, 0
cmovnz eax, ecx
mov [rbp+var_1], al
loc_F17FF:
mov al, [rbp+var_1]
pop rbp
retn
|
bool bitmap_is_subset(long long a1, _DWORD **a2)
{
_DWORD *v2; // rax
_DWORD *v3; // rcx
_DWORD *v5; // [rsp+8h] [rbp-28h]
_DWORD *v6; // [rsp+10h] [rbp-20h]
v6 = *(_DWORD **)a1;
v5 = *a2;
while ( (unsigned long long)v6 < *(_QWORD *)(a1 + 8) )
{
v2 = v6++;
v3 = v5++;
if ( (~*v3 & *v2) != 0 )
return 0;
}
return (~*(_DWORD *)(a1 + 24) & ~*v5 & *v6) == 0;
}
|
bitmap_is_subset:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001f1784
LAB_001f1784:
JMP 0x001f1786
LAB_001f1786:
JMP 0x001f1788
LAB_001f1788:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x30],RAX
LAB_001f1794:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x001f17d2
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x20],RCX
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,RCX
ADD RDX,0x4
MOV qword ptr [RBP + -0x28],RDX
MOV ECX,dword ptr [RCX]
XOR ECX,0xffffffff
AND EAX,ECX
CMP EAX,0x0
JZ 0x001f17d0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001f17ff
LAB_001f17d0:
JMP 0x001f1794
LAB_001f17d2:
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
XOR EAX,0xffffffff
AND EDX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x18]
XOR EAX,0xffffffff
AND EDX,EAX
MOV EAX,0x1
XOR ECX,ECX
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV byte ptr [RBP + -0x1],AL
LAB_001f17ff:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int8 bitmap_is_subset(int8 *param_1,int8 *param_2)
{
uint uVar1;
uint *local_30;
uint *local_28;
bool local_9;
ulong uVar2;
local_30 = (uint *)*param_2;
local_28 = (uint *)*param_1;
do {
if ((uint *)param_1[1] <= local_28) {
local_9 = (*local_28 & (*local_30 ^ 0xffffffff) & (*(uint *)(param_1 + 3) ^ 0xffffffff)) == 0;
uVar2 = 0;
goto LAB_001f17ff;
}
uVar1 = *local_28 & (*local_30 ^ 0xffffffff);
uVar2 = (ulong)uVar1;
local_30 = local_30 + 1;
local_28 = local_28 + 1;
} while (uVar1 == 0);
local_9 = false;
LAB_001f17ff:
return CONCAT71((int7)(uVar2 >> 8),local_9);
}
|
|
59,848
|
stbi__vertical_flip_slices(void*, int, int, int, int)
|
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
|
static void stbi__vertical_flip_slices(void *image, int w, int h, int z, int bytes_per_pixel)
{
int slice;
int slice_size = w * h * bytes_per_pixel;
stbi_uc *bytes = (stbi_uc *)image;
for (slice = 0; slice < z; ++slice) {
stbi__vertical_flip(bytes, w, h, bytes_per_pixel);
bytes += slice_size;
}
}
|
O0
|
c
|
stbi__vertical_flip_slices(void*, int, int, int, int):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
movl %r8d, 0x10(%rsp)
movl 0x1c(%rsp), %eax
imull 0x18(%rsp), %eax
imull 0x10(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x14(%rsp), %eax
jge 0xecbb
movq (%rsp), %rdi
movl 0x1c(%rsp), %esi
movl 0x18(%rsp), %edx
movl 0x10(%rsp), %ecx
callq 0x140c0
movl 0x8(%rsp), %ecx
movq (%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, (%rsp)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xec7d
addq $0x28, %rsp
retq
|
_ZL26stbi__vertical_flip_slicesPviiii:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_C], esi
mov [rsp+28h+var_10], edx
mov [rsp+28h+var_14], ecx
mov [rsp+28h+var_18], r8d
mov eax, [rsp+28h+var_C]
imul eax, [rsp+28h+var_10]
imul eax, [rsp+28h+var_18]
mov [rsp+28h+var_20], eax
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_28], rax
mov [rsp+28h+var_1C], 0
loc_EC7D:
mov eax, [rsp+28h+var_1C]
cmp eax, [rsp+28h+var_14]
jge short loc_ECBB
mov rdi, [rsp+28h+var_28]; void *
mov esi, [rsp+28h+var_C]; int
mov edx, [rsp+28h+var_10]; int
mov ecx, [rsp+28h+var_18]; int
call _ZL19stbi__vertical_flipPviii; stbi__vertical_flip(void *,int,int,int)
mov ecx, [rsp+28h+var_20]
mov rax, [rsp+28h+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rsp+28h+var_28], rax
mov eax, [rsp+28h+var_1C]
add eax, 1
mov [rsp+28h+var_1C], eax
jmp short loc_EC7D
loc_ECBB:
add rsp, 28h
retn
|
long long stbi__vertical_flip_slices(char *a1, int a2, int a3, int a4, int a5)
{
long long result; // rax
int v7; // [rsp+8h] [rbp-20h]
unsigned int i; // [rsp+Ch] [rbp-1Ch]
v7 = a5 * a3 * a2;
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= a4 )
break;
stbi__vertical_flip(a1, a2, a3, a5);
a1 += v7;
}
return result;
}
|
stbi__vertical_flip_slices:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ESI
MOV dword ptr [RSP + 0x18],EDX
MOV dword ptr [RSP + 0x14],ECX
MOV dword ptr [RSP + 0x10],R8D
MOV EAX,dword ptr [RSP + 0x1c]
IMUL EAX,dword ptr [RSP + 0x18]
IMUL EAX,dword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x8],EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP],RAX
MOV dword ptr [RSP + 0xc],0x0
LAB_0010ec7d:
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [RSP + 0x14]
JGE 0x0010ecbb
MOV RDI,qword ptr [RSP]
MOV ESI,dword ptr [RSP + 0x1c]
MOV EDX,dword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x10]
CALL 0x001140c0
MOV ECX,dword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RSP],RAX
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x0010ec7d
LAB_0010ecbb:
ADD RSP,0x28
RET
|
/* stbi__vertical_flip_slices(void*, int, int, int, int) */
void stbi__vertical_flip_slices(void *param_1,int param_2,int param_3,int param_4,int param_5)
{
int8 local_28;
int4 local_1c;
local_28 = param_1;
for (local_1c = 0; local_1c < param_4; local_1c = local_1c + 1) {
stbi__vertical_flip(local_28,param_2,param_3,param_5);
local_28 = (void *)((long)local_28 + (long)(param_2 * param_3 * param_5));
}
return;
}
|
|
59,849
|
thpool_add_work
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/CThreadPool/thpool.c
|
int thpool_add_work(thpool_* thpool_p, void *(*function_p)(void*), void* arg_p){
job* newjob;
newjob=(struct job*)malloc(sizeof(struct job));
if (newjob==NULL){
fprintf(stderr, "thpool_add_work(): Could not allocate memory for new job\n");
return -1;
}
/* add function and argument */
newjob->function=function_p;
newjob->arg=arg_p;
/* add job to queue */
pthread_mutex_lock(&thpool_p->jobqueue_p->rwmutex);
jobqueue_push(thpool_p, newjob);
pthread_mutex_unlock(&thpool_p->jobqueue_p->rwmutex);
return 0;
}
|
O0
|
c
|
thpool_add_work:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movl $0x18, %edi
callq 0x1130
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x177a
movq 0x2881(%rip), %rax # 0x3fe0
movq (%rax), %rdi
leaq 0x9cf(%rip), %rsi # 0x2138
movb $0x0, %al
callq 0x10d0
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x17c6
movq 0x10(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x11b0
movq 0x18(%rsp), %rdi
movq (%rsp), %rsi
callq 0x17d0
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x1120
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
|
thpool_add_work:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov [rsp+28h+var_20], rdx
mov edi, 18h
call _malloc
mov [rsp+28h+var_28], rax
cmp [rsp+28h+var_28], 0
jnz short loc_177A
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aThpoolAddWorkC; "thpool_add_work(): Could not allocate m"...
mov al, 0
call _fprintf
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp short loc_17C6
loc_177A:
mov rcx, [rsp+28h+var_18]
mov rax, [rsp+28h+var_28]
mov [rax+8], rcx
mov rcx, [rsp+28h+var_20]
mov rax, [rsp+28h+var_28]
mov [rax+10h], rcx
mov rax, [rsp+28h+var_10]
mov rdi, [rax+68h]
call _pthread_mutex_lock
mov rdi, [rsp+28h+var_10]
mov rsi, [rsp+28h+var_28]
call jobqueue_push
mov rax, [rsp+28h+var_10]
mov rdi, [rax+68h]
call _pthread_mutex_unlock
mov [rsp+28h+var_4], 0
loc_17C6:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long thpool_add_work(long long a1, long long a2, long long a3)
{
long long v4; // [rsp+0h] [rbp-28h]
v4 = malloc(24LL);
if ( v4 )
{
*(_QWORD *)(v4 + 8) = a2;
*(_QWORD *)(v4 + 16) = a3;
pthread_mutex_lock(*(_QWORD *)(a1 + 104));
jobqueue_push(a1, v4);
pthread_mutex_unlock(*(_QWORD *)(a1 + 104));
return 0;
}
else
{
fprintf(stderr, "thpool_add_work(): Could not allocate memory for new job\n");
return (unsigned int)-1;
}
}
|
thpool_add_work:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDX
MOV EDI,0x18
CALL 0x00101130
MOV qword ptr [RSP],RAX
CMP qword ptr [RSP],0x0
JNZ 0x0010177a
MOV RAX,qword ptr [0x00103fe0]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x102138]
MOV AL,0x0
CALL 0x001010d0
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x001017c6
LAB_0010177a:
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x68]
CALL 0x001011b0
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP]
CALL 0x001017d0
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x68]
CALL 0x00101120
MOV dword ptr [RSP + 0x24],0x0
LAB_001017c6:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 thpool_add_work(long param_1,int8 param_2,int8 param_3)
{
void *pvVar1;
int4 local_4;
pvVar1 = malloc(0x18);
if (pvVar1 == (void *)0x0) {
fprintf(*(FILE **)PTR_stderr_00103fe0,
"thpool_add_work(): Could not allocate memory for new job\n");
local_4 = 0xffffffff;
}
else {
*(int8 *)((long)pvVar1 + 8) = param_2;
*(int8 *)((long)pvVar1 + 0x10) = param_3;
pthread_mutex_lock(*(pthread_mutex_t **)(param_1 + 0x68));
jobqueue_push(param_1,pvVar1);
pthread_mutex_unlock(*(pthread_mutex_t **)(param_1 + 0x68));
local_4 = 0;
}
return local_4;
}
|
|
59,850
|
do_foo_outer() (.destroy)
|
corofx/tests/test_move.cpp
|
auto do_bar() -> task<vec, bar> {
auto x = vec{};
x.reserve(len);
for (auto i = std::size_t{}; i < len; ++i) {
x.push_back(i);
x = co_await bar{std::move(x)};
check(x[i] == i);
}
check(x.size() == len);
co_return x;
}
|
O3
|
cpp
|
do_foo_outer() (.destroy):
endbr64
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x28(%rdi), %r15
leaq 0x78(%rdi), %r14
leaq 0xa8(%rdi), %r12
cmpb $0x0, 0xb0(%rdi)
je 0x1f9b
cmpb $0x0, 0x70(%rbx)
je 0x204e
movq 0x58(%rbx), %rax
movups 0x60(%rbx), %xmm0
xorps %xmm1, %xmm1
movups %xmm1, 0x58(%rbx)
movq $0x0, 0x68(%rbx)
movq 0x78(%rbx), %rdi
movq 0x88(%rbx), %rsi
movq %rax, 0x78(%rbx)
movups %xmm0, 0x80(%rbx)
testq %rdi, %rdi
je 0x1e93
subq %rdi, %rsi
callq 0x1210
movq %r15, %rdi
callq 0x2566
movq 0xa8(%rbx), %rax
movq 0x78(%rbx), %rcx
movq 0x80(%rbx), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rax, %rdx
jbe 0x2053
xorl %edi, %edi
cmpq %rax, (%rcx,%rax,8)
sete %dil
leaq 0x3d52(%rip), %rsi # 0x5c20
callq 0x2908
movq (%r12), %rax
incq %rax
movq %rax, (%r12)
cmpq $0x9, %rax
jbe 0x1fc1
movq 0x80(%rbx), %rax
subq 0x78(%rbx), %rax
leaq 0x90(%rbx), %r15
xorl %edi, %edi
cmpq $0x50, %rax
sete %dil
leaq 0x3d2d(%rip), %rsi # 0x5c38
callq 0x2908
movq 0x78(%rbx), %rax
movq %rax, 0x90(%rbx)
movups 0x80(%rbx), %xmm0
movups %xmm0, 0x98(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0x26f0
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x1f5f
movq 0xa0(%rbx), %rsi
subq %rdi, %rsi
callq 0x1210
movq (%r14), %rdi
testq %rdi, %rdi
je 0x1f76
movq 0x88(%rbx), %rsi
subq %rdi, %rsi
callq 0x1210
movq $0x0, (%rbx)
movb $0x2, 0xb0(%rbx)
movq 0x10(%rbx), %rax
testq %rax, %rax
leaq 0x407e(%rip), %rdi # 0x6010
cmovneq %rax, %rdi
jmp 0x2044
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movl $0xa, %esi
movq %r14, %rdi
callq 0x2496
movq $0x0, (%r12)
xorl %eax, %eax
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
cmpq %rdx, %rsi
je 0x1fdd
movq %rax, (%rsi)
addq $0x8, %rsi
jmp 0x1ff6
movq %r14, %rdi
movq %r12, %rdx
callq 0x2762
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
leaq 0x50(%rbx), %rdi
leaq 0x40(%rbx), %rcx
movq 0x78(%rbx), %r8
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movq 0x20(%rbx), %rax
movq %r8, 0x28(%rbx)
movq %rsi, 0x30(%rbx)
movq %rdx, 0x38(%rbx)
movq %rbx, 0x40(%rbx)
movq %r15, 0x48(%rbx)
movq (%rax), %r8
movq %rax, %rsi
movq %r15, %rdx
callq *(%r8)
movb $0x0, 0x70(%rbx)
movb $0x1, 0xb0(%rbx)
movq 0x50(%rbx), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *(%rdi)
callq 0x1389
callq 0x13ac
endbr64
jmp 0x2062
endbr64
movq %rax, %r15
addq $0x10, %rbx
movq %r14, %rdi
callq 0x2544
movq %r15, %rdi
callq 0x1190
movq %rbx, %rdi
callq 0x242c
|
_Z6do_barv_resume:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
lea r15, [rdi+28h]
lea r14, [rdi+78h]
lea r12, [rdi+0A8h]
cmp byte ptr [rdi+0B0h], 0
jz loc_1F9B
cmp byte ptr [rbx+70h], 0
jz loc_204E
mov rax, [rbx+58h]
movups xmm0, xmmword ptr [rbx+60h]
xorps xmm1, xmm1
movups xmmword ptr [rbx+58h], xmm1
mov qword ptr [rbx+68h], 0
mov rdi, [rbx+78h]; void *
mov rsi, [rbx+88h]
mov [rbx+78h], rax
movups xmmword ptr [rbx+80h], xmm0
test rdi, rdi
jz short loc_1E93
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1E93:
mov rdi, r15
call _ZN6corofx14effect_awaiterI3barED2Ev; corofx::effect_awaiter<bar>::~effect_awaiter()
mov rax, [rbx+0A8h]
mov rcx, [rbx+78h]
mov rdx, [rbx+80h]
sub rdx, rcx
sar rdx, 3
cmp rdx, rax
jbe loc_2053
xor edi, edi
cmp [rcx+rax*8], rax
setz dil
lea rsi, off_5C20; "/workspace/llm4binary/github2025/corofx"...
call _ZN6corofx5checkEbSt15source_location; corofx::check(bool,std::source_location)
mov rax, [r12]
inc rax
mov [r12], rax
cmp rax, 9
jbe loc_1FC1
mov rax, [rbx+80h]
sub rax, [rbx+78h]
lea r15, [rbx+90h]
xor edi, edi
cmp rax, 50h ; 'P'
setz dil
lea rsi, off_5C38; "/workspace/llm4binary/github2025/corofx"...
call _ZN6corofx5checkEbSt15source_location; corofx::check(bool,std::source_location)
mov rax, [rbx+78h]
mov [rbx+90h], rax
movups xmm0, xmmword ptr [rbx+80h]
movups xmmword ptr [rbx+98h], xmm0
xorps xmm0, xmm0
movups xmmword ptr [r14], xmm0
mov qword ptr [r14+10h], 0
mov rdi, [rbx+18h]
mov rsi, r15
call _ZNSt8optionalISt6vectorImSaImEEEaSIS2_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS3_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES6_ISt6__and_IJSt9is_scalarIS2_ES7_IS2_NSt5decayISA_E4typeEEEEESt16is_constructibleIS2_JSA_EESt13is_assignableIRS2_SA_EEERS3_E4typeEOSA_
mov rdi, [rbx+90h]; void *
test rdi, rdi
jz short loc_1F5F
mov rsi, [rbx+0A0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1F5F:
mov rdi, [r14]; void *
test rdi, rdi
jz short loc_1F76
mov rsi, [rbx+88h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1F76:
mov qword ptr [rbx], 0
mov byte ptr [rbx+0B0h], 2
mov rax, [rbx+10h]
test rax, rax
lea rdi, _ZNSt7__n486116coroutine_handleINS_22noop_coroutine_promiseEE5_S_frE; std::__n4861::coroutine_handle<std::__n4861::noop_coroutine_promise>::_S_fr
cmovnz rdi, rax
jmp loc_2044
loc_1F9B:
xorps xmm0, xmm0
movups xmmword ptr [r14], xmm0
mov qword ptr [r14+10h], 0
mov esi, 0Ah
mov rdi, r14
call _ZNSt6vectorImSaImEE7reserveEm; std::vector<ulong>::reserve(ulong)
mov qword ptr [r12], 0
xor eax, eax
loc_1FC1:
mov rsi, [rbx+80h]
mov rdx, [rbx+88h]
cmp rsi, rdx
jz short loc_1FDD
mov [rsi], rax
add rsi, 8
jmp short loc_1FF6
loc_1FDD:
mov rdi, r14
mov rdx, r12
call _ZNSt6vectorImSaImEE17_M_realloc_insertIJRKmEEEvN9__gnu_cxx17__normal_iteratorIPmS1_EEDpOT_; std::vector<ulong>::_M_realloc_insert<ulong const&>(__gnu_cxx::__normal_iterator<ulong *,std::vector<ulong>>,ulong const&)
mov rsi, [rbx+80h]
mov rdx, [rbx+88h]
loc_1FF6:
lea rdi, [rbx+50h]
lea rcx, [rbx+40h]
mov r8, [rbx+78h]
xorps xmm0, xmm0
movups xmmword ptr [r14], xmm0
mov qword ptr [r14+10h], 0
mov rax, [rbx+20h]
mov [rbx+28h], r8
mov [rbx+30h], rsi
mov [rbx+38h], rdx
mov [rbx+40h], rbx
mov [rbx+48h], r15
mov r8, [rax]
mov rsi, rax
mov rdx, r15
call qword ptr [r8]
mov byte ptr [rbx+70h], 0
mov byte ptr [rbx+0B0h], 1
mov rdi, [rbx+50h]
loc_2044:
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp qword ptr [rdi]
loc_204E:
call _Z6do_barv_resume_cold_1; do_bar(void) [clone]
loc_2053:
call _Z6do_barv_resume_cold_2; do_bar(void) [clone]
endbr64
jmp short loc_2062
endbr64
loc_2062:
mov r15, rax
add rbx, 10h
mov rdi, r14
call _ZNSt6vectorImSaImEED2Ev; std::vector<ulong>::~vector()
mov rdi, r15; void *
call ___cxa_begin_catch
mov rdi, rbx; this
call _ZN6corofx12promise_base19unhandled_exceptionEv; corofx::promise_base::unhandled_exception(void)
|
long long do_bar(long long a1)
{
long long v2; // r15
long long v3; // r14
unsigned long long *v4; // r12
long long v5; // rax
__int128 v6; // xmm0
void *v7; // rdi
unsigned long long v8; // rsi
unsigned long long v9; // rax
long long v10; // rcx
unsigned long long v11; // rax
void *v12; // rdi
long long (**v13)(void); // rdi
unsigned long long *v14; // rsi
unsigned long long *v15; // rdx
_QWORD *v16; // rsi
long long v17; // r8
void ( ***v18)(long long, _QWORD, long long, long long); // rax
v2 = a1 + 40;
v3 = a1 + 120;
v4 = (unsigned long long *)(a1 + 168);
if ( !*(_BYTE *)(a1 + 176) )
{
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(a1 + 136) = 0LL;
std::vector<unsigned long>::reserve(a1 + 120, 10LL);
*v4 = 0LL;
v11 = 0LL;
LABEL_15:
v14 = *(unsigned long long **)(a1 + 128);
v15 = *(unsigned long long **)(a1 + 136);
if ( v14 == v15 )
{
std::vector<unsigned long>::_M_realloc_insert<unsigned long const&>(v3, v14, v4);
v16 = *(_QWORD **)(a1 + 128);
v15 = *(unsigned long long **)(a1 + 136);
}
else
{
*v14 = v11;
v16 = v14 + 1;
}
v17 = *(_QWORD *)(a1 + 120);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
v18 = *(void ( ****)(long long, _QWORD, long long, long long))(a1 + 32);
*(_QWORD *)(a1 + 40) = v17;
*(_QWORD *)(a1 + 48) = v16;
*(_QWORD *)(a1 + 56) = v15;
*(_QWORD *)(a1 + 64) = a1;
*(_QWORD *)(a1 + 72) = v2;
(**v18)(a1 + 80, v18, v2, a1 + 64);
*(_BYTE *)(a1 + 112) = 0;
*(_BYTE *)(a1 + 176) = 1;
v13 = *(long long (***)(void))(a1 + 80);
return (*v13)();
}
if ( !*(_BYTE *)(a1 + 112) )
do_bar();
v5 = *(_QWORD *)(a1 + 88);
v6 = *(_OWORD *)(a1 + 96);
*(_OWORD *)(a1 + 88) = 0LL;
*(_QWORD *)(a1 + 104) = 0LL;
v7 = *(void **)(a1 + 120);
v8 = *(_QWORD *)(a1 + 136);
*(_QWORD *)(a1 + 120) = v5;
*(_OWORD *)(a1 + 128) = v6;
if ( v7 )
{
v8 -= (unsigned long long)v7;
operator delete(v7, v8);
}
corofx::effect_awaiter<bar>::~effect_awaiter(v2, v8);
v9 = *(_QWORD *)(a1 + 168);
v10 = *(_QWORD *)(a1 + 120);
if ( (*(_QWORD *)(a1 + 128) - v10) >> 3 <= v9 )
do_bar();
corofx::check(*(_QWORD *)(v10 + 8 * v9) == v9, off_5C20);
v11 = *v4 + 1;
*v4 = v11;
if ( v11 <= 9 )
goto LABEL_15;
corofx::check(*(_QWORD *)(a1 + 128) - *(_QWORD *)(a1 + 120) == 80LL, off_5C38);
*(_QWORD *)(a1 + 144) = *(_QWORD *)(a1 + 120);
*(_OWORD *)(a1 + 152) = *(_OWORD *)(a1 + 128);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
std::optional<std::vector<unsigned long>>::operator=<std::vector<unsigned long>>(*(_QWORD *)(a1 + 24), a1 + 144);
v12 = *(void **)(a1 + 144);
if ( v12 )
operator delete(v12, *(_QWORD *)(a1 + 160) - (_QWORD)v12);
if ( *(_QWORD *)v3 )
operator delete(*(void **)v3, *(_QWORD *)(a1 + 136) - *(_QWORD *)v3);
*(_QWORD *)a1 = 0LL;
*(_BYTE *)(a1 + 176) = 2;
v13 = std::__n4861::coroutine_handle<std::__n4861::noop_coroutine_promise>::_S_fr;
if ( *(_QWORD *)(a1 + 16) )
v13 = *(long long (***)(void))(a1 + 16);
return (*v13)();
}
|
do_bar:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
LEA R15,[RDI + 0x28]
LEA R14,[RDI + 0x78]
LEA R12,[RDI + 0xa8]
CMP byte ptr [RDI + 0xb0],0x0
JZ 0x00101f9b
CMP byte ptr [RBX + 0x70],0x0
JZ 0x0010204e
MOV RAX,qword ptr [RBX + 0x58]
MOVUPS XMM0,xmmword ptr [RBX + 0x60]
XORPS XMM1,XMM1
MOVUPS xmmword ptr [RBX + 0x58],XMM1
MOV qword ptr [RBX + 0x68],0x0
MOV RDI,qword ptr [RBX + 0x78]
MOV RSI,qword ptr [RBX + 0x88]
MOV qword ptr [RBX + 0x78],RAX
MOVUPS xmmword ptr [RBX + 0x80],XMM0
TEST RDI,RDI
JZ 0x00101e93
SUB RSI,RDI
CALL 0x00101210
LAB_00101e93:
MOV RDI,R15
CALL 0x00102566
MOV RAX,qword ptr [RBX + 0xa8]
MOV RCX,qword ptr [RBX + 0x78]
MOV RDX,qword ptr [RBX + 0x80]
SUB RDX,RCX
SAR RDX,0x3
CMP RDX,RAX
JBE 0x00102053
XOR EDI,EDI
CMP qword ptr [RCX + RAX*0x8],RAX
SETZ DIL
LEA RSI,[0x105c20]
CALL 0x00102908
MOV RAX,qword ptr [R12]
INC RAX
MOV qword ptr [R12],RAX
CMP RAX,0x9
JBE 0x00101fc1
MOV RAX,qword ptr [RBX + 0x80]
SUB RAX,qword ptr [RBX + 0x78]
LEA R15,[RBX + 0x90]
XOR EDI,EDI
CMP RAX,0x50
SETZ DIL
LEA RSI,[0x105c38]
CALL 0x00102908
MOV RAX,qword ptr [RBX + 0x78]
MOV qword ptr [RBX + 0x90],RAX
MOVUPS XMM0,xmmword ptr [RBX + 0x80]
MOVUPS xmmword ptr [RBX + 0x98],XMM0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14],XMM0
MOV qword ptr [R14 + 0x10],0x0
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
CALL 0x001026f0
MOV RDI,qword ptr [RBX + 0x90]
TEST RDI,RDI
JZ 0x00101f5f
MOV RSI,qword ptr [RBX + 0xa0]
SUB RSI,RDI
CALL 0x00101210
LAB_00101f5f:
MOV RDI,qword ptr [R14]
TEST RDI,RDI
JZ 0x00101f76
MOV RSI,qword ptr [RBX + 0x88]
SUB RSI,RDI
CALL 0x00101210
LAB_00101f76:
MOV qword ptr [RBX],0x0
MOV byte ptr [RBX + 0xb0],0x2
MOV RAX,qword ptr [RBX + 0x10]
TEST RAX,RAX
LEA RDI,[0x106010]
CMOVNZ RDI,RAX
JMP 0x00102044
LAB_00101f9b:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14],XMM0
MOV qword ptr [R14 + 0x10],0x0
LAB_00101faa:
MOV ESI,0xa
MOV RDI,R14
CALL 0x00102496
MOV qword ptr [R12],0x0
XOR EAX,EAX
LAB_00101fc1:
MOV RSI,qword ptr [RBX + 0x80]
MOV RDX,qword ptr [RBX + 0x88]
CMP RSI,RDX
JZ 0x00101fdd
MOV qword ptr [RSI],RAX
ADD RSI,0x8
JMP 0x00101ff6
LAB_00101fdd:
MOV RDI,R14
MOV RDX,R12
CALL 0x00102762
LAB_00101fe8:
MOV RSI,qword ptr [RBX + 0x80]
MOV RDX,qword ptr [RBX + 0x88]
LAB_00101ff6:
LEA RDI,[RBX + 0x50]
LEA RCX,[RBX + 0x40]
MOV R8,qword ptr [RBX + 0x78]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14],XMM0
MOV qword ptr [R14 + 0x10],0x0
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x28],R8
MOV qword ptr [RBX + 0x30],RSI
MOV qword ptr [RBX + 0x38],RDX
MOV qword ptr [RBX + 0x40],RBX
MOV qword ptr [RBX + 0x48],R15
MOV R8,qword ptr [RAX]
MOV RSI,RAX
MOV RDX,R15
CALL qword ptr [R8]
MOV byte ptr [RBX + 0x70],0x0
MOV byte ptr [RBX + 0xb0],0x1
MOV RDI,qword ptr [RBX + 0x50]
LAB_00102044:
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP qword ptr [RDI]
LAB_0010204e:
CALL 0x00101389
LAB_00102053:
CALL 0x001013ac
LAB_00102058:
ENDBR64
JMP 0x00102062
LAB_00102062:
MOV R15,RAX
ADD RBX,0x10
MOV RDI,R14
CALL 0x00102544
MOV RDI,R15
CALL 0x00101190
MOV RDI,RBX
CALL 0x0010242c
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* do_bar() [clone .resume] */
void do_bar(void)
{
effect_awaiter<bar> *this;
vector<unsigned_long,std::allocator<unsigned_long>> *this_00;
ulong *puVar1;
void *pvVar2;
long lVar3;
int8 uVar4;
int8 uVar5;
ulong uVar6;
int8 uVar7;
ulong *puVar8;
ulong *puVar9;
int8 *in_RDI;
int8 *puVar10;
this = (effect_awaiter<bar> *)(in_RDI + 5);
this_00 = (vector<unsigned_long,std::allocator<unsigned_long>> *)(in_RDI + 0xf);
puVar1 = in_RDI + 0x15;
if (*(char *)(in_RDI + 0x16) == '\0') {
*(int8 *)this_00 = 0;
in_RDI[0x10] = 0;
in_RDI[0x11] = 0;
/* try { // try from 00101faa to 00101fb6 has its CatchHandler @ 0010205e */
std::vector<unsigned_long,std::allocator<unsigned_long>>::reserve(this_00,10);
*puVar1 = 0;
uVar6 = 0;
}
else {
if (*(char *)(in_RDI + 0xe) == '\0') {
do_bar();
LAB_00102053:
uVar7 = do_bar();
/* catch(type#1 @ 00000000) { ... } // from try @ 00101fdd with catch @ 00102058
*/
std::vector<unsigned_long,std::allocator<unsigned_long>>::~vector(this_00);
__cxa_begin_catch(uVar7);
/* WARNING: Subroutine does not return */
corofx::promise_base::unhandled_exception();
}
uVar7 = in_RDI[0xb];
uVar4 = in_RDI[0xc];
uVar5 = in_RDI[0xd];
in_RDI[0xb] = 0;
in_RDI[0xc] = 0;
in_RDI[0xd] = 0;
pvVar2 = (void *)in_RDI[0xf];
lVar3 = in_RDI[0x11];
in_RDI[0xf] = uVar7;
in_RDI[0x10] = uVar4;
in_RDI[0x11] = uVar5;
if (pvVar2 != (void *)0x0) {
operator_delete(pvVar2,lVar3 - (long)pvVar2);
}
corofx::effect_awaiter<bar>::~effect_awaiter(this);
uVar6 = in_RDI[0x15];
if ((ulong)((long)(in_RDI[0x10] - in_RDI[0xf]) >> 3) <= uVar6) goto LAB_00102053;
corofx::check(*(ulong *)(in_RDI[0xf] + uVar6 * 8) == uVar6,
&PTR_s__workspace_llm4binary_github2025_00105c20);
uVar6 = *puVar1 + 1;
*puVar1 = uVar6;
if (9 < uVar6) {
corofx::check(in_RDI[0x10] - in_RDI[0xf] == 0x50,
&PTR_s__workspace_llm4binary_github2025_00105c38);
in_RDI[0x12] = in_RDI[0xf];
in_RDI[0x13] = in_RDI[0x10];
in_RDI[0x14] = in_RDI[0x11];
*(int8 *)this_00 = 0;
in_RDI[0x10] = 0;
in_RDI[0x11] = 0;
std::optional<std::vector<unsigned_long,std::allocator<unsigned_long>>>::operator=
((optional<std::vector<unsigned_long,std::allocator<unsigned_long>>> *)in_RDI[3],
(vector *)(in_RDI + 0x12));
pvVar2 = (void *)in_RDI[0x12];
if (pvVar2 != (void *)0x0) {
operator_delete(pvVar2,in_RDI[0x14] - (long)pvVar2);
}
pvVar2 = *(void **)this_00;
if (pvVar2 != (void *)0x0) {
operator_delete(pvVar2,in_RDI[0x11] - (long)pvVar2);
}
*in_RDI = 0;
*(int1 *)(in_RDI + 0x16) = 2;
puVar10 = (int8 *)
std::__n4861::coroutine_handle<std::__n4861::noop_coroutine_promise>::_S_fr;
if ((int8 *)in_RDI[2] != (int8 *)0x0) {
puVar10 = (int8 *)in_RDI[2];
}
goto LAB_00102044;
}
}
puVar9 = (ulong *)in_RDI[0x10];
puVar8 = (ulong *)in_RDI[0x11];
if (puVar9 == puVar8) {
/* try { // try from 00101fdd to 00101fe7 has its CatchHandler @ 00102058 */
std::vector<unsigned_long,std::allocator<unsigned_long>>::
_M_realloc_insert<unsigned_long_const&>(this_00,puVar9,puVar1);
puVar9 = (ulong *)in_RDI[0x10];
puVar8 = (ulong *)in_RDI[0x11];
}
else {
*puVar9 = uVar6;
puVar9 = puVar9 + 1;
}
uVar7 = in_RDI[0xf];
*(int8 *)this_00 = 0;
in_RDI[0x10] = 0;
in_RDI[0x11] = 0;
in_RDI[5] = uVar7;
in_RDI[6] = puVar9;
in_RDI[7] = puVar8;
in_RDI[8] = in_RDI;
in_RDI[9] = this;
(*(code *)**(int8 **)in_RDI[4])(in_RDI + 10,(int8 *)in_RDI[4],this,in_RDI + 8);
*(int1 *)(in_RDI + 0xe) = 0;
*(int1 *)(in_RDI + 0x16) = 1;
puVar10 = (int8 *)in_RDI[10];
LAB_00102044:
/* WARNING: Could not recover jumptable at 0x0010204c. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)*puVar10)();
return;
}
|
|
59,851
|
translog_create_new_file
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_create_new_file()
{
TRANSLOG_FILE *file= (TRANSLOG_FILE*)my_malloc(PSI_INSTRUMENT_ME, sizeof(TRANSLOG_FILE),
MYF(0));
TRANSLOG_FILE *old= get_current_logfile();
uint32 file_no= LSN_FILE_NO(log_descriptor.horizon);
DBUG_ENTER("translog_create_new_file");
if (file == NULL)
goto error;
/*
Writes max_lsn to the file header before finishing it (there is no need
to lock file header buffer because it is still unfinished file, so only
one thread can finish the file and nobody interested of LSN of current
(unfinished) file, because no one can purge it).
*/
if (translog_max_lsn_to_header(old->handler.file, log_descriptor.max_lsn))
goto error;
mysql_rwlock_wrlock(&log_descriptor.open_files_lock);
DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 ==
log_descriptor.open_files.elements);
DBUG_ASSERT(file_no == log_descriptor.max_file + 1);
if (allocate_dynamic(&log_descriptor.open_files,
log_descriptor.max_file - log_descriptor.min_file + 2))
goto error_lock;
/* this call just expand the array */
if (insert_dynamic(&log_descriptor.open_files, (uchar*)&file))
goto error_lock;
if ((file->handler.file= create_logfile_by_number_no_cache(file_no)) == -1)
goto error_lock;
translog_file_init(file, file_no, 0);
log_descriptor.max_file++;
{
char *start= (char*) dynamic_element(&log_descriptor.open_files, 0,
TRANSLOG_FILE**);
memmove(start + sizeof(TRANSLOG_FILE*), start,
sizeof(TRANSLOG_FILE*) *
(log_descriptor.max_file - log_descriptor.min_file + 1 - 1));
}
/* can't fail we because we expanded array */
set_dynamic(&log_descriptor.open_files, (uchar*)&file, 0);
DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 ==
log_descriptor.open_files.elements);
mysql_rwlock_unlock(&log_descriptor.open_files_lock);
DBUG_PRINT("info", ("file_no: %lu", (ulong)file_no));
if (translog_write_file_header())
goto error;
if (ma_control_file_write_and_force(last_checkpoint_lsn, file_no,
max_trid_in_control_file,
recovery_failures))
goto error;
DBUG_RETURN(0);
error_lock:
mysql_rwlock_unlock(&log_descriptor.open_files_lock);
error:
translog_stop_writing();
my_free(file);
DBUG_RETURN(1);
}
|
O0
|
c
|
translog_create_new_file:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
xorl %edi, %edi
movl $0x58, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xfb390
movq %rax, -0x10(%rbp)
callq 0x99a50
movq %rax, -0x18(%rbp)
movq 0xbef01c(%rip), %rax # 0xc85198
sarq $0x20, %rax
movl %eax, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x9618f
jmp 0x9630a
movq -0x18(%rbp), %rax
movl 0x18(%rax), %edi
movq 0xbef043(%rip), %rsi # 0xc851e0
callq 0x96330
cmpb $0x0, %al
je 0x961ab
jmp 0x9630a
leaq 0x3ee39e(%rip), %rdi # 0x484550
addq $0x258, %rdi # imm = 0x258
leaq 0xc3a88(%rip), %rsi # 0x159c48
movl $0x687, %edx # imm = 0x687
callq 0x944b0
jmp 0x961cc
jmp 0x961ce
jmp 0x961d0
movl 0x3ee5ca(%rip), %esi # 0x4847a0
subl 0x3ee5c8(%rip), %esi # 0x4847a4
addl $0x2, %esi
leaq 0x3ee36a(%rip), %rdi # 0x484550
addq $0x228, %rdi # imm = 0x228
callq 0xe25f0
cmpb $0x0, %al
je 0x961fb
jmp 0x962f7
leaq 0x3ee34e(%rip), %rdi # 0x484550
addq $0x228, %rdi # imm = 0x228
leaq -0x10(%rbp), %rsi
callq 0xe22e0
cmpb $0x0, %al
je 0x9621b
jmp 0x962f7
movl -0x1c(%rbp), %edi
callq 0x8f620
movq -0x10(%rbp), %rcx
movl %eax, 0x18(%rcx)
cmpl $-0x1, %eax
jne 0x96234
jmp 0x962f7
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
xorl %edx, %edx
callq 0x8ed40
movl 0x3ee558(%rip), %eax # 0x4847a0
addl $0x1, %eax
movl %eax, 0x3ee54f(%rip) # 0x4847a0
movq 0x3ee520(%rip), %rax # 0x484778
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x28(%rbp), %rsi
movl 0x3ee532(%rip), %eax # 0x4847a0
subl 0x3ee530(%rip), %eax # 0x4847a4
addl $0x1, %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
shlq $0x3, %rdx
callq 0x29120
leaq 0x3ee2c2(%rip), %rdi # 0x484550
addq $0x228, %rdi # imm = 0x228
leaq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0xe2530
jmp 0x962a2
leaq 0x3ee2a7(%rip), %rdi # 0x484550
addq $0x258, %rdi # imm = 0x258
callq 0x94520
jmp 0x962b7
callq 0x95e90
cmpb $0x0, %al
je 0x962c2
jmp 0x9630a
leaq 0x3ed02f(%rip), %rax # 0x4832f8
movq (%rax), %rdi
movl -0x1c(%rbp), %esi
leaq 0x3ed032(%rip), %rax # 0x483308
movq (%rax), %rdx
leaq 0x3ed030(%rip), %rax # 0x483310
movzbl (%rax), %ecx
callq 0x8b460
cmpl $0x0, %eax
je 0x962ef
jmp 0x9630a
jmp 0x962f1
movb $0x0, -0x1(%rbp)
jmp 0x9631c
leaq 0x3ee252(%rip), %rdi # 0x484550
addq $0x258, %rdi # imm = 0x258
callq 0x94520
callq 0x8c400
movq -0x10(%rbp), %rdi
callq 0xfb710
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_create_new_file:
push rbp
mov rbp, rsp
sub rsp, 30h
xor edi, edi
mov esi, 58h ; 'X'
xor eax, eax
mov edx, eax
call my_malloc
mov [rbp+var_10], rax
call get_current_logfile
mov [rbp+var_18], rax
mov rax, cs:qword_C85198
sar rax, 20h
mov [rbp+var_1C], eax
cmp [rbp+var_10], 0
jnz short loc_9618F
jmp loc_9630A
loc_9618F:
mov rax, [rbp+var_18]
mov edi, [rax+18h]
mov rsi, cs:qword_C851E0
call translog_max_lsn_to_header
cmp al, 0
jz short loc_961AB
jmp loc_9630A
loc_961AB:
lea rdi, log_descriptor
add rdi, 258h
lea rsi, aWorkspaceLlm4b_24; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 687h
call inline_mysql_rwlock_wrlock_1
jmp short $+2
loc_961CC:
jmp short $+2
loc_961CE:
jmp short $+2
loc_961D0:
mov esi, cs:dword_4847A0
sub esi, cs:dword_4847A4
add esi, 2
lea rdi, log_descriptor
add rdi, 228h
call allocate_dynamic
cmp al, 0
jz short loc_961FB
jmp loc_962F7
loc_961FB:
lea rdi, log_descriptor
add rdi, 228h
lea rsi, [rbp+var_10]
call insert_dynamic
cmp al, 0
jz short loc_9621B
jmp loc_962F7
loc_9621B:
mov edi, [rbp+var_1C]
call create_logfile_by_number_no_cache
mov rcx, [rbp+var_10]
mov [rcx+18h], eax
cmp eax, 0FFFFFFFFh
jnz short loc_96234
jmp loc_962F7
loc_96234:
mov rdi, [rbp+var_10]
mov esi, [rbp+var_1C]
xor edx, edx
call translog_file_init
mov eax, cs:dword_4847A0
add eax, 1
mov cs:dword_4847A0, eax
mov rax, cs:qword_484778
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
add rdi, 8
mov rsi, [rbp+var_28]
mov eax, cs:dword_4847A0
sub eax, cs:dword_4847A4
add eax, 1
sub eax, 1
mov eax, eax
mov edx, eax
shl rdx, 3
call _memmove
lea rdi, log_descriptor
add rdi, 228h
lea rsi, [rbp+var_10]
xor edx, edx
call set_dynamic
jmp short $+2
loc_962A2:
lea rdi, log_descriptor
add rdi, 258h
call inline_mysql_rwlock_unlock_8
jmp short $+2
loc_962B7:
call translog_write_file_header
cmp al, 0
jz short loc_962C2
jmp short loc_9630A
loc_962C2:
lea rax, last_checkpoint_lsn
mov rdi, [rax]
mov esi, [rbp+var_1C]
lea rax, max_trid_in_control_file
mov rdx, [rax]
lea rax, recovery_failures
movzx ecx, byte ptr [rax]
call ma_control_file_write_and_force
cmp eax, 0
jz short loc_962EF
jmp short loc_9630A
loc_962EF:
jmp short $+2
loc_962F1:
mov [rbp+var_1], 0
jmp short loc_9631C
loc_962F7:
lea rdi, log_descriptor
add rdi, 258h
call inline_mysql_rwlock_unlock_8
loc_9630A:
call translog_stop_writing
mov rdi, [rbp+var_10]
call my_free
mov [rbp+var_1], 1
loc_9631C:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char translog_create_new_file()
{
long long v0; // rdx
long long v1; // rcx
int v2; // r8d
int v3; // r9d
int logfile_by_number_no_cache; // eax
long long v5; // rdx
unsigned int v7; // [rsp+14h] [rbp-1Ch]
long long current_logfile; // [rsp+18h] [rbp-18h]
long long v9; // [rsp+20h] [rbp-10h] BYREF
v9 = my_malloc(0LL, 88LL, 0LL);
current_logfile = get_current_logfile();
v7 = HIDWORD(qword_C85198);
if ( !v9 || (unsigned __int8)translog_max_lsn_to_header(*(unsigned int *)(current_logfile + 24), qword_C851E0) )
goto LABEL_10;
inline_mysql_rwlock_wrlock_1(
(long long)&log_descriptor[75],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x687u);
if ( (unsigned __int8)allocate_dynamic(&log_descriptor[69], (unsigned int)(dword_4847A0 - dword_4847A4 + 2))
|| (unsigned __int8)insert_dynamic(&log_descriptor[69], &v9)
|| (logfile_by_number_no_cache = create_logfile_by_number_no_cache(v7, (long long)&v9, v0, v1, v2, v3),
*(_DWORD *)(v9 + 24) = logfile_by_number_no_cache,
logfile_by_number_no_cache == -1) )
{
inline_mysql_rwlock_unlock_8((long long)&log_descriptor[75]);
LABEL_10:
translog_stop_writing();
my_free(v9);
return 1;
}
translog_file_init(v9, v7, 0);
memmove(qword_484778 + 8, qword_484778, 8LL * (unsigned int)(++dword_4847A0 - dword_4847A4));
set_dynamic(&log_descriptor[69], &v9, 0LL);
inline_mysql_rwlock_unlock_8((long long)&log_descriptor[75]);
if ( translog_write_file_header((long long)&log_descriptor[75], (long long)&v9, v5)
|| (unsigned int)ma_control_file_write_and_force(
last_checkpoint_lsn,
v7,
max_trid_in_control_file,
recovery_failures) )
{
goto LABEL_10;
}
return 0;
}
|
translog_create_new_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
XOR EDI,EDI
MOV ESI,0x58
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001fb390
MOV qword ptr [RBP + -0x10],RAX
CALL 0x00199a50
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [0x00d85198]
SAR RAX,0x20
MOV dword ptr [RBP + -0x1c],EAX
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0019618f
JMP 0x0019630a
LAB_0019618f:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,dword ptr [RAX + 0x18]
MOV RSI,qword ptr [0x00d851e0]
CALL 0x00196330
CMP AL,0x0
JZ 0x001961ab
JMP 0x0019630a
LAB_001961ab:
LEA RDI,[0x584550]
ADD RDI,0x258
LEA RSI,[0x259c48]
MOV EDX,0x687
CALL 0x001944b0
JMP 0x001961cc
LAB_001961cc:
JMP 0x001961ce
LAB_001961ce:
JMP 0x001961d0
LAB_001961d0:
MOV ESI,dword ptr [0x005847a0]
SUB ESI,dword ptr [0x005847a4]
ADD ESI,0x2
LEA RDI,[0x584550]
ADD RDI,0x228
CALL 0x001e25f0
CMP AL,0x0
JZ 0x001961fb
JMP 0x001962f7
LAB_001961fb:
LEA RDI,[0x584550]
ADD RDI,0x228
LEA RSI,[RBP + -0x10]
CALL 0x001e22e0
CMP AL,0x0
JZ 0x0019621b
JMP 0x001962f7
LAB_0019621b:
MOV EDI,dword ptr [RBP + -0x1c]
CALL 0x0018f620
MOV RCX,qword ptr [RBP + -0x10]
MOV dword ptr [RCX + 0x18],EAX
CMP EAX,-0x1
JNZ 0x00196234
JMP 0x001962f7
LAB_00196234:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x1c]
XOR EDX,EDX
CALL 0x0018ed40
MOV EAX,dword ptr [0x005847a0]
ADD EAX,0x1
MOV dword ptr [0x005847a0],EAX
MOV RAX,qword ptr [0x00584778]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x8
MOV RSI,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [0x005847a0]
SUB EAX,dword ptr [0x005847a4]
ADD EAX,0x1
SUB EAX,0x1
MOV EAX,EAX
MOV EDX,EAX
SHL RDX,0x3
CALL 0x00129120
LEA RDI,[0x584550]
ADD RDI,0x228
LEA RSI,[RBP + -0x10]
XOR EDX,EDX
CALL 0x001e2530
JMP 0x001962a2
LAB_001962a2:
LEA RDI,[0x584550]
ADD RDI,0x258
CALL 0x00194520
JMP 0x001962b7
LAB_001962b7:
CALL 0x00195e90
CMP AL,0x0
JZ 0x001962c2
JMP 0x0019630a
LAB_001962c2:
LEA RAX,[0x5832f8]
MOV RDI,qword ptr [RAX]
MOV ESI,dword ptr [RBP + -0x1c]
LEA RAX,[0x583308]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x583310]
MOVZX ECX,byte ptr [RAX]
CALL 0x0018b460
CMP EAX,0x0
JZ 0x001962ef
JMP 0x0019630a
LAB_001962ef:
JMP 0x001962f1
LAB_001962f1:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0019631c
LAB_001962f7:
LEA RDI,[0x584550]
ADD RDI,0x258
CALL 0x00194520
LAB_0019630a:
CALL 0x0018c400
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001fb710
MOV byte ptr [RBP + -0x1],0x1
LAB_0019631c:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 translog_create_new_file(void)
{
char cVar1;
int4 uVar2;
int iVar3;
long lVar4;
long local_18 [2];
local_18[0] = my_malloc(0,0x58,0);
lVar4 = get_current_logfile();
uVar2 = (int4)((ulong)DAT_00d85198 >> 0x20);
if ((local_18[0] != 0) &&
(cVar1 = translog_max_lsn_to_header(*(int4 *)(lVar4 + 0x18),DAT_00d851e0), cVar1 == '\0')
) {
inline_mysql_rwlock_wrlock
(&DAT_005847a8,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x687);
cVar1 = allocate_dynamic(&DAT_00584778,(DAT_005847a0 - DAT_005847a4) + 2);
if ((cVar1 == '\0') && (cVar1 = insert_dynamic(&DAT_00584778,local_18), cVar1 == '\0')) {
iVar3 = create_logfile_by_number_no_cache(uVar2);
*(int *)(local_18[0] + 0x18) = iVar3;
if (iVar3 != -1) {
translog_file_init(local_18[0],uVar2,0);
DAT_005847a0 = DAT_005847a0 + 1;
memmove((void *)((long)DAT_00584778 + 8),DAT_00584778,
(ulong)(uint)(DAT_005847a0 - DAT_005847a4) << 3);
set_dynamic(&DAT_00584778,local_18,0);
inline_mysql_rwlock_unlock(&DAT_005847a8);
cVar1 = translog_write_file_header();
if ((cVar1 == '\0') &&
(iVar3 = ma_control_file_write_and_force
(last_checkpoint_lsn,uVar2,max_trid_in_control_file,recovery_failures)
, iVar3 == 0)) {
return 0;
}
goto LAB_0019630a;
}
}
inline_mysql_rwlock_unlock(&DAT_005847a8);
}
LAB_0019630a:
translog_stop_writing();
my_free(local_18[0]);
return 1;
}
|
|
59,852
|
translog_create_new_file
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_create_new_file()
{
TRANSLOG_FILE *file= (TRANSLOG_FILE*)my_malloc(PSI_INSTRUMENT_ME, sizeof(TRANSLOG_FILE),
MYF(0));
TRANSLOG_FILE *old= get_current_logfile();
uint32 file_no= LSN_FILE_NO(log_descriptor.horizon);
DBUG_ENTER("translog_create_new_file");
if (file == NULL)
goto error;
/*
Writes max_lsn to the file header before finishing it (there is no need
to lock file header buffer because it is still unfinished file, so only
one thread can finish the file and nobody interested of LSN of current
(unfinished) file, because no one can purge it).
*/
if (translog_max_lsn_to_header(old->handler.file, log_descriptor.max_lsn))
goto error;
mysql_rwlock_wrlock(&log_descriptor.open_files_lock);
DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 ==
log_descriptor.open_files.elements);
DBUG_ASSERT(file_no == log_descriptor.max_file + 1);
if (allocate_dynamic(&log_descriptor.open_files,
log_descriptor.max_file - log_descriptor.min_file + 2))
goto error_lock;
/* this call just expand the array */
if (insert_dynamic(&log_descriptor.open_files, (uchar*)&file))
goto error_lock;
if ((file->handler.file= create_logfile_by_number_no_cache(file_no)) == -1)
goto error_lock;
translog_file_init(file, file_no, 0);
log_descriptor.max_file++;
{
char *start= (char*) dynamic_element(&log_descriptor.open_files, 0,
TRANSLOG_FILE**);
memmove(start + sizeof(TRANSLOG_FILE*), start,
sizeof(TRANSLOG_FILE*) *
(log_descriptor.max_file - log_descriptor.min_file + 1 - 1));
}
/* can't fail we because we expanded array */
set_dynamic(&log_descriptor.open_files, (uchar*)&file, 0);
DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 ==
log_descriptor.open_files.elements);
mysql_rwlock_unlock(&log_descriptor.open_files_lock);
DBUG_PRINT("info", ("file_no: %lu", (ulong)file_no));
if (translog_write_file_header())
goto error;
if (ma_control_file_write_and_force(last_checkpoint_lsn, file_no,
max_trid_in_control_file,
recovery_failures))
goto error;
DBUG_RETURN(0);
error_lock:
mysql_rwlock_unlock(&log_descriptor.open_files_lock);
error:
translog_stop_writing();
my_free(file);
DBUG_RETURN(1);
}
|
O3
|
c
|
translog_create_new_file:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0x58, %esi
xorl %edi, %edi
xorl %edx, %edx
callq 0xa5de1
movq %rax, %rbx
movq %rax, -0x18(%rbp)
callq 0x7028c
testq %rbx, %rbx
je 0x6f221
movl 0xb9a4e7(%rip), %ebx # 0xc0968c
movl 0x18(%rax), %edi
movq 0xb9a521(%rip), %rsi # 0xc096d0
callq 0x6f362
testb %al, %al
jne 0x6f221
cmpq $0x0, 0x399b68(%rip) # 0x408d28
jne 0x6f331
leaq 0x399acb(%rip), %rdi # 0x408c98
callq 0xaa545
movl 0x399ab8(%rip), %esi # 0x408c90
subl 0x399ab6(%rip), %esi # 0x408c94
addl $0x2, %esi
leaq 0x399a80(%rip), %rdi # 0x408c68
callq 0x97c3d
testb %al, %al
jne 0x6f205
leaq 0x399a70(%rip), %rdi # 0x408c68
leaq -0x18(%rbp), %rsi
callq 0x97aae
testb %al, %al
je 0x6f25a
movq 0x399b1c(%rip), %rdi # 0x408d28
testq %rdi, %rdi
jne 0x6f33b
leaq 0x399a7c(%rip), %rdi # 0x408c98
callq 0xaa5e6
xorl %eax, %eax
cmpl $0x3, 0x398606(%rip) # 0x407830
setne %al
addl %eax, %eax
movl %eax, 0x3985fb(%rip) # 0x407830
movb $0x1, 0xb9a6d4(%rip) # 0xc09910
movl $0x0, 0x399806(%rip) # 0x408a4c
movq -0x18(%rbp), %rdi
callq 0xa600e
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %ebx, %edi
callq 0x6a96c
movq -0x18(%rbp), %r14
movl %eax, 0x18(%r14)
cmpl $-0x1, %eax
je 0x6f205
leaq 0x8(%r14), %rdi
callq 0x7400f
leaq -0x513(%rip), %rax # 0x6ed6b
movq %rax, 0x28(%r14)
leaq 0x6b57(%rip), %rax # 0x75de0
movq %rax, 0x40(%r14)
movq %r14, 0x48(%r14)
movl %ebx, (%r14)
movw $0x0, 0x50(%r14)
movl 0x3999ef(%rip), %edx # 0x408c90
incl %edx
movl %edx, 0x3999e7(%rip) # 0x408c90
leaq 0x3999b8(%rip), %r14 # 0x408c68
movq 0x3999b1(%rip), %rsi # 0x408c68
leaq 0x8(%rsi), %rdi
subl 0x3999d3(%rip), %edx # 0x408c94
shlq $0x3, %rdx
callq 0x29110
leaq -0x18(%rbp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x97bc0
movq 0x399a49(%rip), %rdi # 0x408d28
testq %rdi, %rdi
jne 0x6f350
leaq 0x3999ad(%rip), %rdi # 0x408c98
callq 0xaa5e6
callq 0x6f094
testb %al, %al
jne 0x6f221
leaq 0x3984e4(%rip), %rax # 0x4077e8
movq (%rax), %rdi
leaq 0x3984ea(%rip), %rax # 0x4077f8
movq (%rax), %rdx
leaq 0x3984e8(%rip), %rax # 0x407800
movzbl (%rax), %ecx
movl %ebx, %esi
callq 0x67ef5
testl %eax, %eax
jne 0x6f221
xorl %eax, %eax
jmp 0x6f251
callq 0x2d29c
jmp 0x6f1d2
leaq 0x31dd2e(%rip), %rax # 0x38d070
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x6f215
leaq 0x31dd19(%rip), %rax # 0x38d070
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x6f2e4
|
translog_create_new_file:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov esi, 58h ; 'X'
xor edi, edi
xor edx, edx
call my_malloc
mov rbx, rax
mov [rbp+var_18], rax
call get_current_logfile
test rbx, rbx
jz loc_6F221
mov ebx, dword ptr cs:qword_C09688+4
mov edi, [rax+18h]
mov rsi, cs:qword_C096D0
call translog_max_lsn_to_header
test al, al
jnz short loc_6F221
cmp cs:qword_408D28, 0
jnz loc_6F331
lea rdi, unk_408C98
call my_rw_wrlock
loc_6F1D2:
mov esi, dword ptr cs:qword_408C90
sub esi, dword ptr cs:qword_408C90+4
add esi, 2
lea rdi, qword_408C68
call allocate_dynamic
test al, al
jnz short loc_6F205
lea rdi, qword_408C68
lea rsi, [rbp+var_18]
call insert_dynamic
test al, al
jz short loc_6F25A
loc_6F205:
mov rdi, cs:qword_408D28
test rdi, rdi
jnz loc_6F33B
loc_6F215:
lea rdi, unk_408C98
call my_rw_unlock
loc_6F221:
xor eax, eax
cmp cs:translog_status, 3
setnz al
add eax, eax
mov cs:translog_status, eax
mov byte ptr cs:word_C09910, 1
mov cs:dword_408A4C, 0
mov rdi, [rbp+var_18]
call my_free
mov al, 1
loc_6F251:
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
loc_6F25A:
mov edi, ebx
call create_logfile_by_number_no_cache
mov r14, [rbp+var_18]
mov [r14+18h], eax
cmp eax, 0FFFFFFFFh
jz short loc_6F205
lea rdi, [r14+8]
call pagecache_file_set_null_hooks
lea rax, translog_page_validator
mov [r14+28h], rax
lea rax, maria_flush_log_for_page_none
mov [r14+40h], rax
mov [r14+48h], r14
mov [r14], ebx
mov word ptr [r14+50h], 0
mov edx, dword ptr cs:qword_408C90
inc edx
mov dword ptr cs:qword_408C90, edx
lea r14, qword_408C68
mov rsi, cs:qword_408C68
lea rdi, [rsi+8]
sub edx, dword ptr cs:qword_408C90+4
shl rdx, 3
call _memmove
lea rsi, [rbp+var_18]
mov rdi, r14
xor edx, edx
call set_dynamic
mov rdi, cs:qword_408D28
test rdi, rdi
jnz short loc_6F350
loc_6F2E4:
lea rdi, unk_408C98
call my_rw_unlock
call translog_write_file_header
test al, al
jnz loc_6F221
lea rax, last_checkpoint_lsn
mov rdi, [rax]
lea rax, max_trid_in_control_file
mov rdx, [rax]
lea rax, recovery_failures
movzx ecx, byte ptr [rax]
mov esi, ebx
call ma_control_file_write_and_force
test eax, eax
jnz loc_6F221
xor eax, eax
jmp loc_6F251
loc_6F331:
call translog_create_new_file_cold_1
jmp loc_6F1D2
loc_6F33B:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp loc_6F215
loc_6F350:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp short loc_6F2E4
|
char translog_create_new_file()
{
long long current_logfile; // rax
unsigned int v1; // ebx
long long v2; // rdx
long long v3; // rcx
int v4; // r8d
int v5; // r9d
int logfile_by_number_no_cache; // eax
long long v8; // r14
_QWORD v9[3]; // [rsp+8h] [rbp-18h] BYREF
v9[0] = my_malloc(0LL, 88LL, 0LL);
current_logfile = get_current_logfile(0LL);
if ( !v9[0]
|| (v1 = HIDWORD(qword_C09688),
(unsigned __int8)translog_max_lsn_to_header(*(unsigned int *)(current_logfile + 24), qword_C096D0)) )
{
LABEL_10:
translog_status = 2 * (translog_status != 3);
LOBYTE(word_C09910) = 1;
dword_408A4C = 0;
my_free(v9[0]);
return 1;
}
if ( qword_408D28 )
translog_create_new_file_cold_1();
else
my_rw_wrlock(&unk_408C98);
if ( (unsigned __int8)allocate_dynamic(&qword_408C68, (unsigned int)(qword_408C90 - HIDWORD(qword_408C90) + 2))
|| (unsigned __int8)insert_dynamic(&qword_408C68, v9)
|| (logfile_by_number_no_cache = create_logfile_by_number_no_cache(v1, (long long)v9, v2, v3, v4, v5),
v8 = v9[0],
*(_DWORD *)(v9[0] + 24LL) = logfile_by_number_no_cache,
logfile_by_number_no_cache == -1) )
{
if ( qword_408D28 )
PSI_server[45]();
my_rw_unlock(&unk_408C98);
goto LABEL_10;
}
pagecache_file_set_null_hooks(v8 + 8);
*(_QWORD *)(v8 + 40) = translog_page_validator;
*(_QWORD *)(v8 + 64) = maria_flush_log_for_page_none;
*(_QWORD *)(v8 + 72) = v8;
*(_DWORD *)v8 = v1;
*(_WORD *)(v8 + 80) = 0;
LODWORD(qword_408C90) = qword_408C90 + 1;
memmove(qword_408C68 + 8, qword_408C68, 8LL * (unsigned int)(qword_408C90 - HIDWORD(qword_408C90)));
set_dynamic(&qword_408C68, v9, 0LL);
if ( qword_408D28 )
PSI_server[45]();
my_rw_unlock(&unk_408C98);
if ( translog_write_file_header((long long)&unk_408C98, (long long)v9)
|| (unsigned int)ma_control_file_write_and_force(
last_checkpoint_lsn,
v1,
max_trid_in_control_file,
(unsigned __int8)recovery_failures) )
{
goto LABEL_10;
}
return 0;
}
|
translog_create_new_file:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV ESI,0x58
XOR EDI,EDI
XOR EDX,EDX
CALL 0x001a5de1
MOV RBX,RAX
MOV qword ptr [RBP + -0x18],RAX
CALL 0x0017028c
TEST RBX,RBX
JZ 0x0016f221
MOV EBX,dword ptr [0x00d0968c]
MOV EDI,dword ptr [RAX + 0x18]
MOV RSI,qword ptr [0x00d096d0]
CALL 0x0016f362
TEST AL,AL
JNZ 0x0016f221
CMP qword ptr [0x00508d28],0x0
JNZ 0x0016f331
LEA RDI,[0x508c98]
CALL 0x001aa545
LAB_0016f1d2:
MOV ESI,dword ptr [0x00508c90]
SUB ESI,dword ptr [0x00508c94]
ADD ESI,0x2
LEA RDI,[0x508c68]
CALL 0x00197c3d
TEST AL,AL
JNZ 0x0016f205
LEA RDI,[0x508c68]
LEA RSI,[RBP + -0x18]
CALL 0x00197aae
TEST AL,AL
JZ 0x0016f25a
LAB_0016f205:
MOV RDI,qword ptr [0x00508d28]
TEST RDI,RDI
JNZ 0x0016f33b
LAB_0016f215:
LEA RDI,[0x508c98]
CALL 0x001aa5e6
LAB_0016f221:
XOR EAX,EAX
CMP dword ptr [0x00507830],0x3
SETNZ AL
ADD EAX,EAX
MOV dword ptr [0x00507830],EAX
MOV byte ptr [0x00d09910],0x1
MOV dword ptr [0x00508a4c],0x0
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001a600e
MOV AL,0x1
LAB_0016f251:
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
LAB_0016f25a:
MOV EDI,EBX
CALL 0x0016a96c
MOV R14,qword ptr [RBP + -0x18]
MOV dword ptr [R14 + 0x18],EAX
CMP EAX,-0x1
JZ 0x0016f205
LEA RDI,[R14 + 0x8]
CALL 0x0017400f
LEA RAX,[0x16ed6b]
MOV qword ptr [R14 + 0x28],RAX
LEA RAX,[0x175de0]
MOV qword ptr [R14 + 0x40],RAX
MOV qword ptr [R14 + 0x48],R14
MOV dword ptr [R14],EBX
MOV word ptr [R14 + 0x50],0x0
MOV EDX,dword ptr [0x00508c90]
INC EDX
MOV dword ptr [0x00508c90],EDX
LEA R14,[0x508c68]
MOV RSI,qword ptr [0x00508c68]
LEA RDI,[RSI + 0x8]
SUB EDX,dword ptr [0x00508c94]
SHL RDX,0x3
CALL 0x00129110
LEA RSI,[RBP + -0x18]
MOV RDI,R14
XOR EDX,EDX
CALL 0x00197bc0
MOV RDI,qword ptr [0x00508d28]
TEST RDI,RDI
JNZ 0x0016f350
LAB_0016f2e4:
LEA RDI,[0x508c98]
CALL 0x001aa5e6
CALL 0x0016f094
TEST AL,AL
JNZ 0x0016f221
LEA RAX,[0x5077e8]
MOV RDI,qword ptr [RAX]
LEA RAX,[0x5077f8]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x507800]
MOVZX ECX,byte ptr [RAX]
MOV ESI,EBX
CALL 0x00167ef5
TEST EAX,EAX
JNZ 0x0016f221
XOR EAX,EAX
JMP 0x0016f251
LAB_0016f331:
CALL 0x0012d29c
JMP 0x0016f1d2
LAB_0016f33b:
LEA RAX,[0x48d070]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x0016f215
LAB_0016f350:
LEA RAX,[0x48d070]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x0016f2e4
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 translog_create_new_file(void)
{
int4 uVar1;
char cVar2;
int iVar3;
int4 *puVar4;
long lVar5;
int4 *local_20;
puVar4 = (int4 *)my_malloc(0,0x58,0);
local_20 = puVar4;
lVar5 = get_current_logfile();
uVar1 = DAT_00d09688._4_4_;
if ((puVar4 != (int4 *)0x0) &&
(cVar2 = translog_max_lsn_to_header(*(int4 *)(lVar5 + 0x18),DAT_00d096d0), cVar2 == '\0')
) {
if (DAT_00508d28 == 0) {
my_rw_wrlock(&DAT_00508c98);
}
else {
translog_create_new_file_cold_1();
}
cVar2 = allocate_dynamic(&DAT_00508c68,(DAT_00508c90 - DAT_00508c94) + 2);
if ((cVar2 == '\0') && (cVar2 = insert_dynamic(&DAT_00508c68,&local_20), cVar2 == '\0')) {
iVar3 = create_logfile_by_number_no_cache(uVar1);
puVar4 = local_20;
local_20[6] = iVar3;
if (iVar3 != -1) {
pagecache_file_set_null_hooks(local_20 + 2);
*(code **)(puVar4 + 10) = translog_page_validator;
*(code **)(puVar4 + 0x10) = maria_flush_log_for_page_none;
*(int4 **)(puVar4 + 0x12) = puVar4;
*puVar4 = uVar1;
*(int2 *)(puVar4 + 0x14) = 0;
DAT_00508c90 = DAT_00508c90 + 1;
memmove((void *)((long)DAT_00508c68 + 8),DAT_00508c68,
(ulong)(uint)(DAT_00508c90 - DAT_00508c94) << 3);
set_dynamic(&DAT_00508c68,&local_20,0);
if (DAT_00508d28 != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(&DAT_00508c98);
cVar2 = translog_write_file_header();
if ((cVar2 == '\0') &&
(iVar3 = ma_control_file_write_and_force
(last_checkpoint_lsn,uVar1,max_trid_in_control_file,recovery_failures)
, iVar3 == 0)) {
return 0;
}
goto LAB_0016f221;
}
}
if (DAT_00508d28 != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(&DAT_00508c98);
}
LAB_0016f221:
translog_status = (uint)(translog_status != 3) * 2;
DAT_00d09910 = 1;
_DAT_00508a4c = 0;
my_free(local_20);
return 1;
}
|
|
59,853
|
get_pkcs_padding
|
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/cipher.c
|
static int get_pkcs_padding(unsigned char *input, size_t input_len,
size_t *data_len)
{
size_t i, pad_idx;
unsigned char padding_len, bad = 0;
if (NULL == input || NULL == data_len) {
return MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA;
}
padding_len = input[input_len - 1];
*data_len = input_len - padding_len;
/* Avoid logical || since it results in a branch */
bad |= ~mbedtls_ct_size_mask_ge(input_len, padding_len);
bad |= mbedtls_ct_size_bool_eq(padding_len, 0);
/* The number of bytes checked must be independent of padding_len,
* so pick input_len, which is usually 8 or 16 (one block) */
pad_idx = input_len - padding_len;
for (i = 0; i < input_len; i++) {
size_t mask = mbedtls_ct_size_mask_ge(i, pad_idx);
bad |= (input[i] ^ padding_len) & mask;
}
return -(int) mbedtls_ct_uint_if(bad, -MBEDTLS_ERR_CIPHER_INVALID_PADDING, 0);
}
|
O3
|
c
|
get_pkcs_padding:
testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
movl $0xffff9f00, %eax # imm = 0xFFFF9F00
jne 0x9aa2e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movb -0x1(%rdi,%rsi), %bpl
movzbl %bpl, %r13d
movq %rsi, %r15
subq %r13, %r15
movq %r15, (%rdx)
movq %rsi, %rdi
movq %r13, %rsi
callq 0x82449
movq %rax, %r12
movq %r13, %rdi
xorl %esi, %esi
callq 0x82457
notl %r12d
orl %eax, %r12d
testq %rbx, %rbx
je 0x9aa0e
xorl %r13d, %r13d
movq %r13, %rdi
movq %r15, %rsi
callq 0x82449
movb (%r14,%r13), %cl
xorb %bpl, %cl
andb %cl, %al
orb %al, %r12b
incq %r13
cmpq %r13, %rbx
jne 0x9a9ef
movzbl %r12b, %edi
movl $0x6200, %esi # imm = 0x6200
xorl %edx, %edx
callq 0x82477
negl %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
get_pkcs_padding:
test rdi, rdi
setz al
test rdx, rdx
setz cl
or cl, al
mov eax, 0FFFF9F00h
jnz locret_9AA2E
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov bpl, [rdi+rsi-1]
movzx r13d, bpl
mov r15, rsi
sub r15, r13
mov [rdx], r15
mov rdi, rsi
mov rsi, r13
call mbedtls_ct_size_mask_ge
mov r12, rax
mov rdi, r13
xor esi, esi
call mbedtls_ct_size_bool_eq
not r12d
or r12d, eax
test rbx, rbx
jz short loc_9AA0E
xor r13d, r13d
loc_9A9EF:
mov rdi, r13
mov rsi, r15
call mbedtls_ct_size_mask_ge
mov cl, [r14+r13]
xor cl, bpl
and al, cl
or r12b, al
inc r13
cmp rbx, r13
jnz short loc_9A9EF
loc_9AA0E:
movzx edi, r12b
mov esi, 6200h
xor edx, edx
call mbedtls_ct_uint_if
neg eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_9AA2E:
retn
|
long long get_pkcs_padding(long long a1, long long a2, long long *a3)
{
long long result; // rax
unsigned __int8 v4; // bp
long long v5; // r15
char v6; // r12
unsigned __int8 v7; // r12
long long i; // r13
result = 4294942464LL;
if ( a1 != 0 && a3 != 0LL )
{
v4 = *(_BYTE *)(a1 + a2 - 1);
v5 = a2 - v4;
*a3 = v5;
v6 = mbedtls_ct_size_mask_ge(a2, v4);
v7 = mbedtls_ct_size_bool_eq(v4, 0LL) | ~v6;
if ( a2 )
{
for ( i = 0LL; i != a2; ++i )
v7 |= (v4 ^ *(_BYTE *)(a1 + i)) & (unsigned __int8)mbedtls_ct_size_mask_ge(i, v5);
}
return (unsigned int)-mbedtls_ct_uint_if(v7, 0x6200u, 0);
}
return result;
}
|
get_pkcs_padding:
TEST RDI,RDI
SETZ AL
TEST RDX,RDX
SETZ CL
OR CL,AL
MOV EAX,0xffff9f00
JNZ 0x0019aa2e
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV BPL,byte ptr [RDI + RSI*0x1 + -0x1]
MOVZX R13D,BPL
MOV R15,RSI
SUB R15,R13
MOV qword ptr [RDX],R15
MOV RDI,RSI
MOV RSI,R13
CALL 0x00182449
MOV R12,RAX
MOV RDI,R13
XOR ESI,ESI
CALL 0x00182457
NOT R12D
OR R12D,EAX
TEST RBX,RBX
JZ 0x0019aa0e
XOR R13D,R13D
LAB_0019a9ef:
MOV RDI,R13
MOV RSI,R15
CALL 0x00182449
MOV CL,byte ptr [R14 + R13*0x1]
XOR CL,BPL
AND AL,CL
OR R12B,AL
INC R13
CMP RBX,R13
JNZ 0x0019a9ef
LAB_0019aa0e:
MOVZX EDI,R12B
MOV ESI,0x6200
XOR EDX,EDX
CALL 0x00182477
NEG EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_0019aa2e:
RET
|
int get_pkcs_padding(long param_1,long param_2,long *param_3)
{
byte bVar1;
byte bVar2;
byte bVar3;
int iVar4;
ulong uVar5;
long lVar6;
iVar4 = -0x6100;
if (param_3 != (long *)0x0 && param_1 != 0) {
bVar1 = *(byte *)(param_1 + -1 + param_2);
uVar5 = (ulong)bVar1;
*param_3 = param_2 - uVar5;
bVar2 = mbedtls_ct_size_mask_ge(param_2,uVar5);
bVar3 = mbedtls_ct_size_bool_eq(uVar5,0);
bVar3 = ~bVar2 | bVar3;
if (param_2 != 0) {
lVar6 = 0;
do {
bVar2 = mbedtls_ct_size_mask_ge(lVar6,param_2 - uVar5);
bVar3 = bVar3 | bVar2 & (*(byte *)(param_1 + lVar6) ^ bVar1);
lVar6 = lVar6 + 1;
} while (param_2 != lVar6);
}
iVar4 = mbedtls_ct_uint_if(bVar3,0x6200,0);
iVar4 = -iVar4;
}
return iVar4;
}
|
|
59,854
|
blst_scalar_from_uint64
|
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c
|
void blst_scalar_from_uint64(pow256 ret, const unsigned long long a[4])
{
const union {
long one;
char little;
} is_endian = { 1 };
size_t i;
if ((uptr_t)ret==(uptr_t)a && is_endian.little)
return;
for(i = 0; i < 4; i++) {
unsigned long long w = a[i];
*ret++ = (byte)w;
*ret++ = (byte)(w >> 8);
*ret++ = (byte)(w >> 16);
*ret++ = (byte)(w >> 24);
*ret++ = (byte)(w >> 32);
*ret++ = (byte)(w >> 40);
*ret++ = (byte)(w >> 48);
*ret++ = (byte)(w >> 56);
}
}
|
O3
|
c
|
blst_scalar_from_uint64:
pushq %rbp
movq %rsp, %rbp
cmpq %rsi, %rdi
je 0x65a66
xorl %eax, %eax
movq (%rsi,%rax,8), %rcx
movq %rcx, (%rdi,%rax,8)
incq %rax
cmpq $0x4, %rax
jne 0x65a55
popq %rbp
retq
|
blst_scalar_from_uint64:
push rbp
mov rbp, rsp
cmp rdi, rsi
jz short loc_65A66
xor eax, eax
loc_65A55:
mov rcx, [rsi+rax*8]
mov [rdi+rax*8], rcx
inc rax
cmp rax, 4
jnz short loc_65A55
loc_65A66:
pop rbp
retn
|
void blst_scalar_from_uint64(long long a1, long long a2)
{
long long i; // rax
if ( a1 != a2 )
{
for ( i = 0LL; i != 4; ++i )
*(_QWORD *)(a1 + 8 * i) = *(_QWORD *)(a2 + 8 * i);
}
}
|
blst_scalar_from_uint64:
PUSH RBP
MOV RBP,RSP
CMP RDI,RSI
JZ 0x00165a66
XOR EAX,EAX
LAB_00165a55:
MOV RCX,qword ptr [RSI + RAX*0x8]
MOV qword ptr [RDI + RAX*0x8],RCX
INC RAX
CMP RAX,0x4
JNZ 0x00165a55
LAB_00165a66:
POP RBP
RET
|
void blst_scalar_from_uint64(long param_1,long param_2)
{
long lVar1;
if (param_1 != param_2) {
lVar1 = 0;
do {
*(int8 *)(param_1 + lVar1 * 8) = *(int8 *)(param_2 + lVar1 * 8);
lVar1 = lVar1 + 1;
} while (lVar1 != 4);
}
return;
}
|
|
59,855
|
js_number_isSafeInteger
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_number_isSafeInteger(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
double d;
if (!JS_IsNumber(argv[0]))
return JS_FALSE;
if (unlikely(JS_ToFloat64(ctx, &d, argv[0])))
return JS_EXCEPTION;
return js_bool(is_safe_integer(d));
}
|
O2
|
c
|
js_number_isSafeInteger:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movq 0x8(%r8), %rcx
pushq $0x1
popq %rbx
cmpl $0x7, %ecx
je 0x6aaed
testl %ecx, %ecx
jne 0x6ab68
movq (%r8), %rdx
leaq 0x8(%rsp), %rsi
callq 0x24e2f
testl %eax, %eax
jne 0x6ab65
movq 0x8(%rsp), %xmm0
movdqa %xmm0, 0x10(%rsp)
movq %xmm0, %rax
movdqa 0x1de59(%rip), %xmm1 # 0x88970
pand %xmm0, %xmm1
movdqa %xmm1, 0x20(%rsp)
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
setl %bpl
callq 0xe8f0
ucomisd 0x10(%rsp), %xmm0
setnp %al
sete %cl
andb %al, %cl
andb %bpl, %cl
movsd 0x1df13(%rip), %xmm0 # 0x88a68
ucomisd 0x20(%rsp), %xmm0
setae %al
andb %cl, %al
movzbl %al, %eax
jmp 0x6ab6a
pushq $0x6
popq %rbx
xorl %eax, %eax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
|
js_number_isSafeInteger:
push rbp
push rbx
sub rsp, 38h
mov rcx, [r8+8]
push 1
pop rbx
cmp ecx, 7
jz short loc_6AAED
test ecx, ecx
jnz short loc_6AB68
loc_6AAED:
mov rdx, [r8]
lea rsi, [rsp+48h+var_40]
call JS_ToFloat64
test eax, eax
jnz short loc_6AB65
movq xmm0, [rsp+48h+var_40]
movdqa [rsp+48h+var_38], xmm0
movq rax, xmm0
movdqa xmm1, cs:xmmword_88970
pand xmm1, xmm0
movdqa [rsp+48h+var_28], xmm1
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
setl bpl
call _floor
ucomisd xmm0, qword ptr [rsp+48h+var_38]
setnp al
setz cl
and cl, al
and cl, bpl
movsd xmm0, cs:qword_88A68
ucomisd xmm0, qword ptr [rsp+48h+var_28]
setnb al
and al, cl
movzx eax, al
jmp short loc_6AB6A
loc_6AB65:
push 6
pop rbx
loc_6AB68:
xor eax, eax
loc_6AB6A:
mov rdx, rbx
add rsp, 38h
pop rbx
pop rbp
retn
|
long long js_number_isSafeInteger(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long v5; // rcx
bool v6; // bp
double v7; // xmm0_8
long long v9; // [rsp+8h] [rbp-40h] BYREF
__m128i v10; // [rsp+10h] [rbp-38h]
__m128i v11; // [rsp+20h] [rbp-28h]
v5 = *(_QWORD *)(a5 + 8);
if ( (_DWORD)v5 != 7 && (_DWORD)v5 || (unsigned int)JS_ToFloat64(a1, (long long)&v9, *(_DWORD **)a5, v5) )
return 0LL;
v10 = _mm_loadl_epi64((const __m128i *)&v9);
v11 = _mm_and_si128(_mm_load_si128((const __m128i *)&xmmword_88970), v10);
v6 = (v10.m128i_i64[0] & 0x7FFFFFFFFFFFFFFFuLL) < 0x7FF0000000000000LL;
v7 = floor(*(double *)v10.m128i_i64);
return (v6 && v7 == *(double *)v10.m128i_i64) & (unsigned __int8)(*(double *)v11.m128i_i64 <= 9.007199254740991e15);
}
|
js_number_isSafeInteger:
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RCX,qword ptr [R8 + 0x8]
PUSH 0x1
POP RBX
CMP ECX,0x7
JZ 0x0016aaed
TEST ECX,ECX
JNZ 0x0016ab68
LAB_0016aaed:
MOV RDX,qword ptr [R8]
LEA RSI,[RSP + 0x8]
CALL 0x00124e2f
TEST EAX,EAX
JNZ 0x0016ab65
MOVQ XMM0,qword ptr [RSP + 0x8]
MOVDQA xmmword ptr [RSP + 0x10],XMM0
MOVQ RAX,XMM0
MOVDQA XMM1,xmmword ptr [0x00188970]
PAND XMM1,XMM0
MOVDQA xmmword ptr [RSP + 0x20],XMM1
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
SETL BPL
CALL 0x0010e8f0
UCOMISD XMM0,qword ptr [RSP + 0x10]
SETNP AL
SETZ CL
AND CL,AL
AND CL,BPL
MOVSD XMM0,qword ptr [0x00188a68]
UCOMISD XMM0,qword ptr [RSP + 0x20]
SETNC AL
AND AL,CL
MOVZX EAX,AL
JMP 0x0016ab6a
LAB_0016ab65:
PUSH 0x6
POP RBX
LAB_0016ab68:
XOR EAX,EAX
LAB_0016ab6a:
MOV RDX,RBX
ADD RSP,0x38
POP RBX
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
bool js_number_isSafeInteger(int8 param_1)
{
bool bVar1;
int iVar2;
int8 *in_R8;
double dVar3;
double local_40;
double local_38;
int8 uStack_30;
double local_28;
int8 uStack_20;
if ((((int)in_R8[1] == 7) || ((int)in_R8[1] == 0)) &&
(iVar2 = JS_ToFloat64(param_1,&local_40,*in_R8), iVar2 == 0)) {
local_38 = local_40;
uStack_30 = 0;
local_28 = (double)(_DAT_00188970 & (ulong)local_40);
uStack_20 = 0;
dVar3 = floor(local_40);
bVar1 = local_28 <= DAT_00188a68 &&
(dVar3 == local_38 && (ulong)ABS(local_40) < 0x7ff0000000000000);
}
else {
bVar1 = false;
}
return bVar1;
}
|
|
59,856
|
list_free
|
eloqsql/libmariadb/libmariadb/ma_list.c
|
void list_free(LIST *root, unsigned int free_data)
{
LIST *next;
while (root)
{
next=root->next;
if (free_data)
free(root->data);
free(root);
root=next;
}
}
|
O0
|
c
|
list_free:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x878b8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x878a5
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x601e0
movq -0x8(%rbp), %rdi
callq 0x601e0
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8787f
addq $0x20, %rsp
popq %rbp
retq
nop
|
list_free:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
loc_8787F:
cmp [rbp+var_8], 0
jz short loc_878B8
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_18], rax
cmp [rbp+var_C], 0
jz short loc_878A5
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
call _free
loc_878A5:
mov rdi, [rbp+var_8]
call _free
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_8787F
loc_878B8:
add rsp, 20h
pop rbp
retn
|
long long list_free(long long a1, int a2)
{
long long result; // rax
long long v3; // [rsp+8h] [rbp-18h]
while ( a1 )
{
v3 = *(_QWORD *)(a1 + 8);
if ( a2 )
free(*(_QWORD *)(a1 + 16));
free(a1);
result = v3;
a1 = v3;
}
return result;
}
|
list_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
LAB_0018787f:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001878b8
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x001878a5
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x001601e0
LAB_001878a5:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001601e0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0018787f
LAB_001878b8:
ADD RSP,0x20
POP RBP
RET
|
void list_free(void *param_1,int param_2)
{
void *pvVar1;
int8 local_10;
local_10 = param_1;
while (local_10 != (void *)0x0) {
pvVar1 = *(void **)((long)local_10 + 8);
if (param_2 != 0) {
free(*(void **)((long)local_10 + 0x10));
}
free(local_10);
local_10 = pvVar1;
}
return;
}
|
|
59,857
|
thr_merge_locks
|
eloqsql/mysys/thr_lock.c
|
void thr_merge_locks(THR_LOCK_DATA **data, uint old_count, uint new_count)
{
THR_LOCK_DATA **pos, **end, **first_lock= 0;
DBUG_ENTER("thr_merge_lock");
/* Remove marks on old locks to make them sort before new ones */
for (pos=data, end= pos + old_count; pos < end ; pos++)
(*pos)->priority&= ~THR_LOCK_LATE_PRIV;
/* Mark new locks with LATE_PRIV to make them sort after org ones */
for (pos=data + old_count, end= pos + new_count; pos < end ; pos++)
(*pos)->priority|= THR_LOCK_LATE_PRIV;
sort_locks(data, old_count + new_count);
for (pos=data ; pos < end ; pos++)
{
/* Check if lock was unlocked before */
if (pos[0]->type == TL_UNLOCK || ! pos[0]->lock->fix_status)
{
DBUG_PRINT("info", ("lock skipped. unlocked: %d fix_status: %d",
pos[0]->type == TL_UNLOCK,
pos[0]->lock->fix_status == 0));
continue;
}
/*
If same table as previous table use pointer to previous status
information to ensure that all read/write tables shares same
state.
*/
if (first_lock && pos[0]->lock == first_lock[0]->lock)
(pos[0]->lock->fix_status)((*first_lock)->status_param,
(*pos)->status_param);
else
{
/* Different lock, use this as base for next lock */
first_lock= pos;
(pos[0]->lock->fix_status)((*first_lock)->status_param, 0);
}
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
thr_merge_locks:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %eax
leaq (%rdi,%rax,8), %rax
testl %esi, %esi
je 0xa3463
movq %rbx, %rcx
movq (%rcx), %rdi
andl $-0x2, 0x48(%rdi)
addq $0x8, %rcx
cmpq %rax, %rcx
jb 0xa3453
movl %edx, %ecx
leaq (%rax,%rcx,8), %r14
testl %edx, %edx
je 0xa347d
movq (%rax), %rcx
orl $0x1, 0x48(%rcx)
addq $0x8, %rax
cmpq %r14, %rax
jb 0xa346d
addl %esi, %edx
movq %rbx, %rdi
movl %edx, %esi
callq 0xa3337
cmpq %rbx, %r14
jbe 0xa34d8
xorl %r15d, %r15d
movq (%rbx), %rcx
cmpl $0x0, 0x40(%rcx)
je 0xa34cf
movq 0x18(%rcx), %rdx
movq 0xe0(%rdx), %rax
testq %rax, %rax
je 0xa34cf
testq %r15, %r15
je 0xa34b8
movq (%r15), %rsi
cmpq 0x18(%rsi), %rdx
je 0xa34c5
movq 0x28(%rcx), %rdi
xorl %esi, %esi
callq *%rax
movq %rbx, %r15
jmp 0xa34cf
movq 0x28(%rsi), %rdi
movq 0x28(%rcx), %rsi
callq *%rax
addq $0x8, %rbx
cmpq %r14, %rbx
jb 0xa3491
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
thr_merge_locks:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov eax, esi
lea rax, [rdi+rax*8]
test esi, esi
jz short loc_A3463
mov rcx, rbx
loc_A3453:
mov rdi, [rcx]
and dword ptr [rdi+48h], 0FFFFFFFEh
add rcx, 8
cmp rcx, rax
jb short loc_A3453
loc_A3463:
mov ecx, edx
lea r14, [rax+rcx*8]
test edx, edx
jz short loc_A347D
loc_A346D:
mov rcx, [rax]
or dword ptr [rcx+48h], 1
add rax, 8
cmp rax, r14
jb short loc_A346D
loc_A347D:
add edx, esi
mov rdi, rbx
mov esi, edx
call sort_locks
cmp r14, rbx
jbe short loc_A34D8
xor r15d, r15d
loc_A3491:
mov rcx, [rbx]
cmp dword ptr [rcx+40h], 0
jz short loc_A34CF
mov rdx, [rcx+18h]
mov rax, [rdx+0E0h]
test rax, rax
jz short loc_A34CF
test r15, r15
jz short loc_A34B8
mov rsi, [r15]
cmp rdx, [rsi+18h]
jz short loc_A34C5
loc_A34B8:
mov rdi, [rcx+28h]
xor esi, esi
call rax
mov r15, rbx
jmp short loc_A34CF
loc_A34C5:
mov rdi, [rsi+28h]
mov rsi, [rcx+28h]
call rax
loc_A34CF:
add rbx, 8
cmp rbx, r14
jb short loc_A3491
loc_A34D8:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
void thr_merge_locks(_QWORD *a1, int a2, int a3)
{
_QWORD *v3; // rbx
_QWORD *v4; // rax
_QWORD *v5; // rcx
unsigned long long v6; // r14
_QWORD *v7; // r15
long long v8; // rcx
long long v9; // rdx
void ( *v10)(_QWORD, _QWORD); // rax
v3 = a1;
v4 = &a1[a2];
if ( a2 )
{
v5 = a1;
do
*(_DWORD *)(*v5++ + 72LL) &= ~1u;
while ( v5 < v4 );
}
v6 = (unsigned long long)&v4[a3];
if ( a3 )
{
do
*(_DWORD *)(*v4++ + 72LL) |= 1u;
while ( (unsigned long long)v4 < v6 );
}
sort_locks(a1, a2 + a3);
if ( v6 > (unsigned long long)a1 )
{
v7 = 0LL;
do
{
v8 = *v3;
if ( *(_DWORD *)(*v3 + 64LL) )
{
v9 = *(_QWORD *)(v8 + 24);
v10 = *(void ( **)(_QWORD, _QWORD))(v9 + 224);
if ( v10 )
{
if ( v7 && v9 == *(_QWORD *)(*v7 + 24LL) )
{
v10(*(_QWORD *)(*v7 + 40LL), *(_QWORD *)(v8 + 40));
}
else
{
v10(*(_QWORD *)(v8 + 40), 0LL);
v7 = v3;
}
}
}
++v3;
}
while ( (unsigned long long)v3 < v6 );
}
}
|
thr_merge_locks:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EAX,ESI
LEA RAX,[RDI + RAX*0x8]
TEST ESI,ESI
JZ 0x001a3463
MOV RCX,RBX
LAB_001a3453:
MOV RDI,qword ptr [RCX]
AND dword ptr [RDI + 0x48],0xfffffffe
ADD RCX,0x8
CMP RCX,RAX
JC 0x001a3453
LAB_001a3463:
MOV ECX,EDX
LEA R14,[RAX + RCX*0x8]
TEST EDX,EDX
JZ 0x001a347d
LAB_001a346d:
MOV RCX,qword ptr [RAX]
OR dword ptr [RCX + 0x48],0x1
ADD RAX,0x8
CMP RAX,R14
JC 0x001a346d
LAB_001a347d:
ADD EDX,ESI
MOV RDI,RBX
MOV ESI,EDX
CALL 0x001a3337
CMP R14,RBX
JBE 0x001a34d8
XOR R15D,R15D
LAB_001a3491:
MOV RCX,qword ptr [RBX]
CMP dword ptr [RCX + 0x40],0x0
JZ 0x001a34cf
MOV RDX,qword ptr [RCX + 0x18]
MOV RAX,qword ptr [RDX + 0xe0]
TEST RAX,RAX
JZ 0x001a34cf
TEST R15,R15
JZ 0x001a34b8
MOV RSI,qword ptr [R15]
CMP RDX,qword ptr [RSI + 0x18]
JZ 0x001a34c5
LAB_001a34b8:
MOV RDI,qword ptr [RCX + 0x28]
XOR ESI,ESI
CALL RAX
MOV R15,RBX
JMP 0x001a34cf
LAB_001a34c5:
MOV RDI,qword ptr [RSI + 0x28]
MOV RSI,qword ptr [RCX + 0x28]
CALL RAX
LAB_001a34cf:
ADD RBX,0x8
CMP RBX,R14
JC 0x001a3491
LAB_001a34d8:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void thr_merge_locks(long *param_1,uint param_2,uint param_3)
{
long lVar1;
code *pcVar2;
long *plVar3;
long *plVar4;
plVar3 = param_1 + param_2;
plVar4 = param_1;
if (param_2 != 0) {
do {
*(uint *)(*plVar4 + 0x48) = *(uint *)(*plVar4 + 0x48) & 0xfffffffe;
plVar4 = plVar4 + 1;
} while (plVar4 < plVar3);
}
plVar4 = plVar3 + param_3;
if (param_3 != 0) {
do {
*(uint *)(*plVar3 + 0x48) = *(uint *)(*plVar3 + 0x48) | 1;
plVar3 = plVar3 + 1;
} while (plVar3 < plVar4);
}
sort_locks(param_1,param_3 + param_2);
if (param_1 < plVar4) {
plVar3 = (long *)0x0;
do {
lVar1 = *param_1;
if (*(int *)(lVar1 + 0x40) != 0) {
pcVar2 = *(code **)(*(long *)(lVar1 + 0x18) + 0xe0);
if (pcVar2 != (code *)0x0) {
if ((plVar3 == (long *)0x0) || (*(long *)(lVar1 + 0x18) != *(long *)(*plVar3 + 0x18))) {
(*pcVar2)(*(int8 *)(lVar1 + 0x28),0);
plVar3 = param_1;
}
else {
(*pcVar2)(*(int8 *)(*plVar3 + 0x28),*(int8 *)(lVar1 + 0x28));
}
}
}
param_1 = param_1 + 1;
} while (param_1 < plVar4);
}
return;
}
|
|
59,858
|
translog_buffer_lock
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_buffer_lock(struct st_translog_buffer *buffer)
{
DBUG_ENTER("translog_buffer_lock");
DBUG_PRINT("enter",
("Lock buffer #%u: %p", buffer->buffer_no,
buffer));
mysql_mutex_lock(&buffer->mutex);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
translog_buffer_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x45cce
movq -0x8(%rbp), %rdi
addq $0x100090, %rdi # imm = 0x100090
leaq 0x138668(%rip), %rsi # 0x17e348
movl $0x6cb, %edx # imm = 0x6CB
callq 0x45870
jmp 0x45cec
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_buffer_lock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_45CCE:
mov rdi, [rbp+var_8]
add rdi, 100090h
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 6CBh
call inline_mysql_mutex_lock_4
jmp short $+2
loc_45CEC:
add rsp, 10h
pop rbp
retn
|
long long translog_buffer_lock(long long a1)
{
return inline_mysql_mutex_lock_4(
a1 + 1048720,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x6CBu);
}
|
translog_buffer_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x00145cce
LAB_00145cce:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x100090
LEA RSI,[0x27e348]
MOV EDX,0x6cb
CALL 0x00145870
JMP 0x00145cec
LAB_00145cec:
ADD RSP,0x10
POP RBP
RET
|
void translog_buffer_lock(long param_1)
{
inline_mysql_mutex_lock
(param_1 + 0x100090,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x6cb);
return;
}
|
|
59,859
|
translog_buffer_lock
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_buffer_lock(struct st_translog_buffer *buffer)
{
DBUG_ENTER("translog_buffer_lock");
DBUG_PRINT("enter",
("Lock buffer #%u: %p", buffer->buffer_no,
buffer));
mysql_mutex_lock(&buffer->mutex);
DBUG_VOID_RETURN;
}
|
O3
|
c
|
translog_buffer_lock:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
addq $0x100090, %rdi # imm = 0x100090
cmpq $0x0, 0x1000d0(%rax)
jne 0x43751
popq %rbp
jmp 0x2a230
leaq 0xb5b90(%rip), %rsi # 0xf92e8
movl $0x6cb, %edx # imm = 0x6CB
popq %rbp
jmp 0x312ea
|
translog_buffer_lock:
push rbp
mov rbp, rsp
mov rax, rdi
add rdi, 100090h
cmp qword ptr [rax+1000D0h], 0
jnz short loc_43751
pop rbp
jmp _pthread_mutex_lock
loc_43751:
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 6CBh
pop rbp
jmp psi_mutex_lock
|
long long translog_buffer_lock(long long a1)
{
long long v2; // rdi
v2 = a1 + 1048720;
if ( *(_QWORD *)(a1 + 1048784) )
return psi_mutex_lock(v2, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x6CBu);
else
return pthread_mutex_lock(v2);
}
|
translog_buffer_lock:
PUSH RBP
MOV RBP,RSP
MOV RAX,RDI
ADD RDI,0x100090
CMP qword ptr [RAX + 0x1000d0],0x0
JNZ 0x00143751
POP RBP
JMP 0x0012a230
LAB_00143751:
LEA RSI,[0x1f92e8]
MOV EDX,0x6cb
POP RBP
JMP 0x001312ea
|
void translog_buffer_lock(long param_1)
{
pthread_mutex_t *__mutex;
__mutex = (pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + param_1);
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + param_1) == 0) {
pthread_mutex_lock(__mutex);
return;
}
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x6cb);
return;
}
|
|
59,860
|
ma_bitmap_set
|
eloqsql/storage/maria/ma_bitmap.c
|
my_bool _ma_bitmap_set(MARIA_HA *info, pgcache_page_no_t page, my_bool head,
uint empty_space)
{
MARIA_FILE_BITMAP *bitmap= &info->s->bitmap;
uint bits;
my_bool res;
DBUG_ENTER("_ma_bitmap_set");
DBUG_PRINT("enter", ("page: %lu head: %d empty_space: %u",
(ulong) page, head, empty_space));
mysql_mutex_lock(&info->s->bitmap.bitmap_lock);
bits= (head ?
_ma_free_size_to_head_pattern(bitmap, empty_space) :
free_size_to_tail_pattern(bitmap, empty_space));
res= set_page_bits(info, bitmap, page, bits);
mysql_mutex_unlock(&info->s->bitmap.bitmap_lock);
DBUG_RETURN(res);
}
|
O0
|
c
|
ma_bitmap_set:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq $0xa10, %rax # imm = 0xA10
movq %rax, -0x20(%rbp)
jmp 0x6496b
movq -0x8(%rbp), %rax
movq (%rax), %rdi
addq $0xa10, %rdi # imm = 0xA10
addq $0x88, %rdi
leaq 0xedb12(%rip), %rsi # 0x152499
movl $0xb55, %edx # imm = 0xB55
callq 0x62550
movsbl -0x11(%rbp), %eax
cmpl $0x0, %eax
je 0x649ab
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x62e00
movl %eax, -0x2c(%rbp)
jmp 0x649ba
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x64780
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x24(%rbp), %ecx
callq 0x64570
movb %al, -0x25(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
addq $0xa10, %rdi # imm = 0xA10
addq $0x88, %rdi
callq 0x62800
movb -0x25(%rbp), %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
|
_ma_bitmap_set:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_11], al
mov [rbp+var_18], ecx
mov rax, [rbp+var_8]
mov rax, [rax]
add rax, 0A10h
mov [rbp+var_20], rax
jmp short $+2
loc_6496B:
mov rax, [rbp+var_8]
mov rdi, [rax]
add rdi, 0A10h
add rdi, 88h
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0B55h
call inline_mysql_mutex_lock_8
movsx eax, [rbp+var_11]
cmp eax, 0
jz short loc_649AB
mov rdi, [rbp+var_20]
mov esi, [rbp+var_18]
call _ma_free_size_to_head_pattern
mov [rbp+var_2C], eax
jmp short loc_649BA
loc_649AB:
mov rdi, [rbp+var_20]
mov esi, [rbp+var_18]
call free_size_to_tail_pattern
mov [rbp+var_2C], eax
loc_649BA:
mov eax, [rbp+var_2C]
mov [rbp+var_24], eax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_24]
call set_page_bits
mov [rbp+var_25], al
mov rax, [rbp+var_8]
mov rdi, [rax]
add rdi, 0A10h
add rdi, 88h
call inline_mysql_mutex_unlock_8
mov al, [rbp+var_25]
mov [rbp+var_2D], al
mov al, [rbp+var_2D]
add rsp, 30h
pop rbp
retn
|
char ma_bitmap_set(long long *a1, unsigned long long a2, char a3, unsigned int a4)
{
unsigned int v5; // [rsp+4h] [rbp-2Ch]
char v6; // [rsp+Bh] [rbp-25h]
_DWORD *v7; // [rsp+10h] [rbp-20h]
v7 = (_DWORD *)(*a1 + 2576);
inline_mysql_mutex_lock_8(
*a1 + 2712,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c",
0xB55u);
if ( a3 )
v5 = ma_free_size_to_head_pattern(v7, a4);
else
v5 = free_size_to_tail_pattern(v7, a4);
v6 = set_page_bits(a1, (long long)v7, a2, v5);
inline_mysql_mutex_unlock_8(*a1 + 2712);
return v6;
}
|
_ma_bitmap_set:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,DL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV byte ptr [RBP + -0x11],AL
MOV dword ptr [RBP + -0x18],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
ADD RAX,0xa10
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0016496b
LAB_0016496b:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
ADD RDI,0xa10
ADD RDI,0x88
LEA RSI,[0x252499]
MOV EDX,0xb55
CALL 0x00162550
MOVSX EAX,byte ptr [RBP + -0x11]
CMP EAX,0x0
JZ 0x001649ab
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x18]
CALL 0x00162e00
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001649ba
LAB_001649ab:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x18]
CALL 0x00164780
MOV dword ptr [RBP + -0x2c],EAX
LAB_001649ba:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x24]
CALL 0x00164570
MOV byte ptr [RBP + -0x25],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
ADD RDI,0xa10
ADD RDI,0x88
CALL 0x00162800
MOV AL,byte ptr [RBP + -0x25]
MOV byte ptr [RBP + -0x2d],AL
MOV AL,byte ptr [RBP + -0x2d]
ADD RSP,0x30
POP RBP
RET
|
int1 _ma_bitmap_set(long *param_1,int8 param_2,char param_3,int4 param_4)
{
int1 uVar1;
long lVar2;
int4 local_34;
lVar2 = *param_1 + 0xa10;
inline_mysql_mutex_lock
(*param_1 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c",
0xb55);
if (param_3 == '\0') {
local_34 = free_size_to_tail_pattern(lVar2,param_4);
}
else {
local_34 = _ma_free_size_to_head_pattern(lVar2,param_4);
}
uVar1 = set_page_bits(param_1,lVar2,param_2,local_34);
inline_mysql_mutex_unlock(*param_1 + 0xa98);
return uVar1;
}
|
|
59,861
|
ma_store_length
|
eloqsql/storage/maria/ma_blockrec.c
|
uchar *ma_store_length(uchar *to, ulong nr)
{
if (nr < 251)
{
*to=(uchar) nr;
return to+1;
}
if (nr < 65536)
{
if (nr <= 255)
{
to[0]= (uchar) 251;
to[1]= (uchar) nr;
return to+2;
}
to[0]= (uchar) 252;
int2store(to+1, nr);
return to+3;
}
if (nr < 16777216)
{
*to++= (uchar) 253;
int3store(to, nr);
return to+3;
}
*to++= (uchar) 254;
int4store(to, nr);
return to+4;
}
|
O3
|
c
|
ma_store_length:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rcx
movq %rdi, %rax
cmpq $0xfa, %rsi
ja 0x5ed49
movb %cl, (%rax)
movl $0x1, %ecx
addq %rcx, %rax
popq %rbp
retq
cmpq $0xffff, %rcx # imm = 0xFFFF
ja 0x5ed68
cmpq $0xff, %rcx
ja 0x5ed87
movb $-0x5, (%rax)
movb %cl, 0x1(%rax)
movl $0x2, %ecx
jmp 0x5ed44
cmpq $0xffffff, %rcx # imm = 0xFFFFFF
ja 0x5ed95
movb $-0x3, (%rax)
movb %cl, 0x1(%rax)
movb %ch, 0x2(%rax)
shrl $0x10, %ecx
movb %cl, 0x3(%rax)
movl $0x4, %ecx
jmp 0x5ed44
movb $-0x4, (%rax)
movw %cx, 0x1(%rax)
movl $0x3, %ecx
jmp 0x5ed44
movb $-0x2, (%rax)
movl %ecx, 0x1(%rax)
movl $0x5, %ecx
jmp 0x5ed44
|
ma_store_length:
push rbp
mov rbp, rsp
mov rcx, rsi
mov rax, rdi
cmp rsi, 0FAh
ja short loc_5ED49
mov [rax], cl
mov ecx, 1
loc_5ED44:
add rax, rcx
pop rbp
retn
loc_5ED49:
cmp rcx, 0FFFFh
ja short loc_5ED68
cmp rcx, 0FFh
ja short loc_5ED87
mov byte ptr [rax], 0FBh
mov [rax+1], cl
mov ecx, 2
jmp short loc_5ED44
loc_5ED68:
cmp rcx, 0FFFFFFh
ja short loc_5ED95
mov byte ptr [rax], 0FDh
mov [rax+1], cl
mov [rax+2], ch
shr ecx, 10h
mov [rax+3], cl
mov ecx, 4
jmp short loc_5ED44
loc_5ED87:
mov byte ptr [rax], 0FCh
mov [rax+1], cx
mov ecx, 3
jmp short loc_5ED44
loc_5ED95:
mov byte ptr [rax], 0FEh
mov [rax+1], ecx
mov ecx, 5
jmp short loc_5ED44
|
long long ma_store_length(long long a1, unsigned long long a2)
{
long long v2; // rcx
if ( a2 > 0xFA )
{
if ( a2 > 0xFFFF )
{
if ( a2 > 0xFFFFFF )
{
*(_BYTE *)a1 = -2;
*(_DWORD *)(a1 + 1) = a2;
v2 = 5LL;
}
else
{
*(_BYTE *)a1 = -3;
*(_WORD *)(a1 + 1) = a2;
*(_BYTE *)(a1 + 3) = BYTE2(a2);
v2 = 4LL;
}
}
else if ( a2 > 0xFF )
{
*(_BYTE *)a1 = -4;
*(_WORD *)(a1 + 1) = a2;
v2 = 3LL;
}
else
{
*(_BYTE *)a1 = -5;
*(_BYTE *)(a1 + 1) = a2;
v2 = 2LL;
}
}
else
{
*(_BYTE *)a1 = a2;
v2 = 1LL;
}
return v2 + a1;
}
|
ma_store_length:
PUSH RBP
MOV RBP,RSP
MOV RCX,RSI
MOV RAX,RDI
CMP RSI,0xfa
JA 0x0015ed49
MOV byte ptr [RAX],CL
MOV ECX,0x1
LAB_0015ed44:
ADD RAX,RCX
POP RBP
RET
LAB_0015ed49:
CMP RCX,0xffff
JA 0x0015ed68
CMP RCX,0xff
JA 0x0015ed87
MOV byte ptr [RAX],0xfb
MOV byte ptr [RAX + 0x1],CL
MOV ECX,0x2
JMP 0x0015ed44
LAB_0015ed68:
CMP RCX,0xffffff
JA 0x0015ed95
MOV byte ptr [RAX],0xfd
MOV byte ptr [RAX + 0x1],CL
MOV byte ptr [RAX + 0x2],CH
SHR ECX,0x10
MOV byte ptr [RAX + 0x3],CL
MOV ECX,0x4
JMP 0x0015ed44
LAB_0015ed87:
MOV byte ptr [RAX],0xfc
MOV word ptr [RAX + 0x1],CX
MOV ECX,0x3
JMP 0x0015ed44
LAB_0015ed95:
MOV byte ptr [RAX],0xfe
MOV dword ptr [RAX + 0x1],ECX
MOV ECX,0x5
JMP 0x0015ed44
|
int1 * ma_store_length(int1 *param_1,ulong param_2)
{
int1 uVar1;
long lVar2;
uVar1 = (int1)param_2;
if (param_2 < 0xfb) {
*param_1 = uVar1;
lVar2 = 1;
}
else if (param_2 < 0x10000) {
if (param_2 < 0x100) {
*param_1 = 0xfb;
param_1[1] = uVar1;
lVar2 = 2;
}
else {
*param_1 = 0xfc;
*(short *)(param_1 + 1) = (short)param_2;
lVar2 = 3;
}
}
else if (param_2 < 0x1000000) {
*param_1 = 0xfd;
param_1[1] = uVar1;
param_1[2] = (char)(param_2 >> 8);
param_1[3] = (char)(param_2 >> 0x10);
lVar2 = 4;
}
else {
*param_1 = 0xfe;
*(int *)(param_1 + 1) = (int)param_2;
lVar2 = 5;
}
return param_1 + lVar2;
}
|
|
59,862
|
rw_pr_init
|
eloqsql/mysys/thr_rwlock.c
|
int rw_pr_init(rw_pr_lock_t *rwlock)
{
pthread_mutex_init(&rwlock->lock, NULL);
pthread_cond_init(&rwlock->no_active_readers, NULL);
rwlock->active_readers= 0;
rwlock->writers_waiting_readers= 0;
rwlock->active_writer= FALSE;
#ifdef SAFE_MUTEX
rwlock->writer_thread= 0;
#endif
return 0;
}
|
O3
|
c
|
rw_pr_init:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0x28600
leaq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0x284e0
movq $0x0, 0x58(%rbx)
movb $0x0, 0x60(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
rw_pr_init:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
xor esi, esi
call _pthread_mutex_init
lea rdi, [rbx+28h]
xor esi, esi
call _pthread_cond_init
mov qword ptr [rbx+58h], 0
mov byte ptr [rbx+60h], 0
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
|
long long rw_pr_init(long long a1)
{
pthread_mutex_init(a1, 0LL);
pthread_cond_init(a1 + 40, 0LL);
*(_QWORD *)(a1 + 88) = 0LL;
*(_BYTE *)(a1 + 96) = 0;
return 0LL;
}
|
rw_pr_init:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
XOR ESI,ESI
CALL 0x00128600
LEA RDI,[RBX + 0x28]
XOR ESI,ESI
CALL 0x001284e0
MOV qword ptr [RBX + 0x58],0x0
MOV byte ptr [RBX + 0x60],0x0
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 rw_pr_init(pthread_mutex_t *param_1)
{
pthread_mutex_init(param_1,(pthread_mutexattr_t *)0x0);
pthread_cond_init((pthread_cond_t *)(param_1 + 1),(pthread_condattr_t *)0x0);
*(int8 *)((long)param_1 + 0x58) = 0;
*(int1 *)((long)param_1 + 0x60) = 0;
return 0;
}
|
|
59,863
|
find_and_rename_file(PFS_thread*, char const*, unsigned int, char const*, unsigned int)
|
eloqsql/storage/perfschema/pfs_instr.cc
|
void find_and_rename_file(PFS_thread *thread, const char *old_filename,
uint old_len, const char *new_filename, uint new_len)
{
PFS_file *pfs;
assert(thread != NULL);
LF_PINS *pins= get_filename_hash_pins(thread);
if (unlikely(pins == NULL))
{
global_file_container.m_lost++;
return;
}
/*
Normalize the old file name.
*/
char safe_buffer[FN_REFLEN];
const char *safe_filename;
if (old_len >= FN_REFLEN)
{
memcpy(safe_buffer, old_filename, FN_REFLEN - 1);
safe_buffer[FN_REFLEN - 1]= 0;
safe_filename= safe_buffer;
}
else
safe_filename= old_filename;
char buffer[FN_REFLEN];
char dirbuffer[FN_REFLEN];
size_t dirlen;
const char *normalized_filename;
uint normalized_length;
dirlen= dirname_length(safe_filename);
if (dirlen == 0)
{
dirbuffer[0]= FN_CURLIB;
dirbuffer[1]= FN_LIBCHAR;
dirbuffer[2]= '\0';
}
else
{
memcpy(dirbuffer, safe_filename, dirlen);
dirbuffer[dirlen]= '\0';
}
if (my_realpath(buffer, dirbuffer, MYF(0)) != 0)
{
global_file_container.m_lost++;
return;
}
/* Append the unresolved file name to the resolved path */
char *ptr= buffer + strlen(buffer);
char *buf_end= &buffer[sizeof(buffer)-1];
if ((buf_end > ptr) && (*(ptr-1) != FN_LIBCHAR))
*ptr++= FN_LIBCHAR;
if (buf_end > ptr)
strncpy(ptr, safe_filename + dirlen, buf_end - ptr);
*buf_end= '\0';
normalized_filename= buffer;
normalized_length= (uint)strlen(normalized_filename);
PFS_file **entry;
entry= reinterpret_cast<PFS_file**>
(lf_hash_search(&pfs_filename_hash, pins,
normalized_filename, normalized_length));
if (entry && (entry != MY_ERRPTR))
pfs= *entry;
else
{
lf_hash_search_unpin(pins);
return;
}
lf_hash_delete(&pfs_filename_hash, pins,
pfs->m_filename, pfs->m_filename_length);
/*
Normalize the new file name.
*/
if (new_len >= FN_REFLEN)
{
memcpy(safe_buffer, new_filename, FN_REFLEN - 1);
safe_buffer[FN_REFLEN - 1]= 0;
safe_filename= safe_buffer;
}
else
safe_filename= new_filename;
dirlen= dirname_length(safe_filename);
if (dirlen == 0)
{
dirbuffer[0]= FN_CURLIB;
dirbuffer[1]= FN_LIBCHAR;
dirbuffer[2]= '\0';
}
else
{
memcpy(dirbuffer, safe_filename, dirlen);
dirbuffer[dirlen]= '\0';
}
if (my_realpath(buffer, dirbuffer, MYF(0)) != 0)
{
global_file_container.m_lost++;
return;
}
/* Append the unresolved file name to the resolved path */
ptr= buffer + strlen(buffer);
buf_end= &buffer[sizeof(buffer)-1];
if ((buf_end > ptr) && (*(ptr-1) != FN_LIBCHAR))
*ptr++= FN_LIBCHAR;
if (buf_end > ptr)
strncpy(ptr, safe_filename + dirlen, buf_end - ptr);
*buf_end= '\0';
normalized_filename= buffer;
normalized_length= (uint)strlen(normalized_filename);
memcpy(pfs->m_filename, normalized_filename, normalized_length);
pfs->m_filename[normalized_length]= '\0';
pfs->m_filename_length= normalized_length;
int res;
res= lf_hash_insert(&pfs_filename_hash, pins, &pfs);
if (likely(res == 0))
return;
else
{
global_file_container.deallocate(pfs);
global_file_container.m_lost++;
return;
}
}
|
O0
|
cpp
|
find_and_rename_file(PFS_thread*, char const*, unsigned int, char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x6a0, %rsp # imm = 0x6A0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x618(%rbp)
movq %rsi, -0x620(%rbp)
movl %edx, -0x624(%rbp)
movq %rcx, -0x630(%rbp)
movl %r8d, -0x634(%rbp)
movq -0x618(%rbp), %rdi
callq 0x2f780
movq %rax, -0x648(%rbp)
cmpq $0x0, -0x648(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x2fe0f
leaq 0x39df0f(%rip), %rax # 0x3cdd08
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x39df01(%rip), %rax # 0x3cdd08
movq %rcx, (%rax)
jmp 0x302cf
cmpl $0x200, -0x624(%rbp) # imm = 0x200
jb 0x2fe47
leaq -0x210(%rbp), %rdi
movq -0x620(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x26280
movb $0x0, -0x11(%rbp)
leaq -0x210(%rbp), %rax
movq %rax, -0x650(%rbp)
jmp 0x2fe55
movq -0x620(%rbp), %rax
movq %rax, -0x650(%rbp)
movq -0x650(%rbp), %rdi
callq 0x58150
movq %rax, -0x658(%rbp)
cmpq $0x0, -0x658(%rbp)
jne 0x2fe89
movb $0x2e, -0x610(%rbp)
movb $0x2f, -0x60f(%rbp)
movb $0x0, -0x60e(%rbp)
jmp 0x2feb2
leaq -0x610(%rbp), %rdi
movq -0x650(%rbp), %rsi
movq -0x658(%rbp), %rdx
callq 0x26280
movq -0x658(%rbp), %rax
movb $0x0, -0x610(%rbp,%rax)
leaq -0x410(%rbp), %rdi
leaq -0x610(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x597a0
cmpl $0x0, %eax
je 0x2feeb
leaq 0x39de33(%rip), %rax # 0x3cdd08
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x39de25(%rip), %rax # 0x3cdd08
movq %rcx, (%rax)
jmp 0x302cf
leaq -0x410(%rbp), %rax
movq %rax, -0x698(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x26150
movq %rax, %rcx
movq -0x698(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x670(%rbp)
leaq -0x410(%rbp), %rax
addq $0x1ff, %rax # imm = 0x1FF
movq %rax, -0x678(%rbp)
movq -0x678(%rbp), %rax
cmpq -0x670(%rbp), %rax
jbe 0x2ff65
movq -0x670(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
je 0x2ff65
movq -0x670(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x670(%rbp)
movb $0x2f, (%rax)
movq -0x678(%rbp), %rax
cmpq -0x670(%rbp), %rax
jbe 0x2ffa0
movq -0x670(%rbp), %rdi
movq -0x650(%rbp), %rsi
addq -0x658(%rbp), %rsi
movq -0x678(%rbp), %rdx
movq -0x670(%rbp), %rax
subq %rax, %rdx
callq 0x261a0
movq -0x678(%rbp), %rax
movb $0x0, (%rax)
leaq -0x410(%rbp), %rax
movq %rax, -0x660(%rbp)
movq -0x660(%rbp), %rdi
callq 0x26150
movl %eax, -0x664(%rbp)
movq -0x648(%rbp), %rsi
movq -0x660(%rbp), %rdx
movl -0x664(%rbp), %ecx
leaq 0x3d9f1b(%rip), %rdi # 0x409f00
callq 0x5d790
movq %rax, -0x680(%rbp)
cmpq $0x0, -0x680(%rbp)
je 0x3001c
movl $0x1, %eax
cmpq %rax, -0x680(%rbp)
je 0x3001c
movq -0x680(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x640(%rbp)
jmp 0x30044
jmp 0x3001e
jmp 0x30020
jmp 0x30022
movq -0x648(%rbp), %rcx
movq $0x0, -0x688(%rbp)
movq -0x688(%rbp), %rax
xchgq %rax, 0x10(%rcx)
jmp 0x302cf
movq -0x648(%rbp), %rsi
movq -0x640(%rbp), %rdx
addq $0x18, %rdx
movq -0x640(%rbp), %rax
movl 0x218(%rax), %ecx
leaq 0x3d9e96(%rip), %rdi # 0x409f00
callq 0x5cd70
cmpl $0x200, -0x634(%rbp) # imm = 0x200
jb 0x300a7
leaq -0x210(%rbp), %rdi
movq -0x630(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x26280
movb $0x0, -0x11(%rbp)
leaq -0x210(%rbp), %rax
movq %rax, -0x650(%rbp)
jmp 0x300b5
movq -0x630(%rbp), %rax
movq %rax, -0x650(%rbp)
movq -0x650(%rbp), %rdi
callq 0x58150
movq %rax, -0x658(%rbp)
cmpq $0x0, -0x658(%rbp)
jne 0x300e9
movb $0x2e, -0x610(%rbp)
movb $0x2f, -0x60f(%rbp)
movb $0x0, -0x60e(%rbp)
jmp 0x30112
leaq -0x610(%rbp), %rdi
movq -0x650(%rbp), %rsi
movq -0x658(%rbp), %rdx
callq 0x26280
movq -0x658(%rbp), %rax
movb $0x0, -0x610(%rbp,%rax)
leaq -0x410(%rbp), %rdi
leaq -0x610(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x597a0
cmpl $0x0, %eax
je 0x3014b
leaq 0x39dbd3(%rip), %rax # 0x3cdd08
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x39dbc5(%rip), %rax # 0x3cdd08
movq %rcx, (%rax)
jmp 0x302cf
leaq -0x410(%rbp), %rax
movq %rax, -0x6a0(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x26150
movq %rax, %rcx
movq -0x6a0(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x670(%rbp)
leaq -0x410(%rbp), %rax
addq $0x1ff, %rax # imm = 0x1FF
movq %rax, -0x678(%rbp)
movq -0x678(%rbp), %rax
cmpq -0x670(%rbp), %rax
jbe 0x301c5
movq -0x670(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
je 0x301c5
movq -0x670(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x670(%rbp)
movb $0x2f, (%rax)
movq -0x678(%rbp), %rax
cmpq -0x670(%rbp), %rax
jbe 0x30200
movq -0x670(%rbp), %rdi
movq -0x650(%rbp), %rsi
addq -0x658(%rbp), %rsi
movq -0x678(%rbp), %rdx
movq -0x670(%rbp), %rax
subq %rax, %rdx
callq 0x261a0
movq -0x678(%rbp), %rax
movb $0x0, (%rax)
leaq -0x410(%rbp), %rax
movq %rax, -0x660(%rbp)
movq -0x660(%rbp), %rdi
callq 0x26150
movl %eax, -0x664(%rbp)
movq -0x640(%rbp), %rdi
addq $0x18, %rdi
movq -0x660(%rbp), %rsi
movl -0x664(%rbp), %eax
movl %eax, %edx
callq 0x26280
movq -0x640(%rbp), %rax
movl -0x664(%rbp), %ecx
movb $0x0, 0x18(%rax,%rcx)
movl -0x664(%rbp), %ecx
movq -0x640(%rbp), %rax
movl %ecx, 0x218(%rax)
movq -0x648(%rbp), %rsi
leaq 0x3d9c84(%rip), %rdi # 0x409f00
leaq -0x640(%rbp), %rdx
callq 0x5c770
movl %eax, -0x68c(%rbp)
cmpl $0x0, -0x68c(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x302a4
jmp 0x302cf
movq -0x640(%rbp), %rsi
leaq 0x39da56(%rip), %rdi # 0x3cdd08
callq 0x34d10
leaq 0x39da4a(%rip), %rax # 0x3cdd08
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x39da3c(%rip), %rax # 0x3cdd08
movq %rcx, (%rax)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x302ea
addq $0x6a0, %rsp # imm = 0x6A0
popq %rbp
retq
callq 0x26360
nop
|
_Z20find_and_rename_fileP10PFS_threadPKcjS2_j:
push rbp
mov rbp, rsp
sub rsp, 6A0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_618], rdi
mov [rbp+var_620], rsi
mov [rbp+var_624], edx
mov [rbp+var_630], rcx
mov [rbp+var_634], r8d
mov rdi, [rbp+var_618]; PFS_thread *
call _Z22get_filename_hash_pinsP10PFS_thread; get_filename_hash_pins(PFS_thread *)
mov [rbp+var_648], rax
cmp [rbp+var_648], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_2FE0F
lea rax, global_file_container
mov rcx, [rax]
add rcx, 1
lea rax, global_file_container
mov [rax], rcx
jmp loc_302CF
loc_2FE0F:
cmp [rbp+var_624], 200h
jb short loc_2FE47
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_620]
mov edx, 1FFh
call _memcpy
mov [rbp+var_11], 0
lea rax, [rbp+var_210]
mov [rbp+var_650], rax
jmp short loc_2FE55
loc_2FE47:
mov rax, [rbp+var_620]
mov [rbp+var_650], rax
loc_2FE55:
mov rdi, [rbp+var_650]
call dirname_length
mov [rbp+var_658], rax
cmp [rbp+var_658], 0
jnz short loc_2FE89
mov [rbp+var_610], 2Eh ; '.'
mov [rbp+var_60F], 2Fh ; '/'
mov [rbp+var_60E], 0
jmp short loc_2FEB2
loc_2FE89:
lea rdi, [rbp+var_610]
mov rsi, [rbp+var_650]
mov rdx, [rbp+var_658]
call _memcpy
mov rax, [rbp+var_658]
mov [rbp+rax+var_610], 0
loc_2FEB2:
lea rdi, [rbp+var_410]
lea rsi, [rbp+var_610]
xor eax, eax
mov edx, eax
call my_realpath
cmp eax, 0
jz short loc_2FEEB
lea rax, global_file_container
mov rcx, [rax]
add rcx, 1
lea rax, global_file_container
mov [rax], rcx
jmp loc_302CF
loc_2FEEB:
lea rax, [rbp+var_410]
mov [rbp+var_698], rax
lea rdi, [rbp+var_410]
call _strlen
mov rcx, rax
mov rax, [rbp+var_698]
add rax, rcx
mov [rbp+var_670], rax
lea rax, [rbp+var_410]
add rax, 1FFh
mov [rbp+var_678], rax
mov rax, [rbp+var_678]
cmp rax, [rbp+var_670]
jbe short loc_2FF65
mov rax, [rbp+var_670]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jz short loc_2FF65
mov rax, [rbp+var_670]
mov rcx, rax
add rcx, 1
mov [rbp+var_670], rcx
mov byte ptr [rax], 2Fh ; '/'
loc_2FF65:
mov rax, [rbp+var_678]
cmp rax, [rbp+var_670]
jbe short loc_2FFA0
mov rdi, [rbp+var_670]
mov rsi, [rbp+var_650]
add rsi, [rbp+var_658]
mov rdx, [rbp+var_678]
mov rax, [rbp+var_670]
sub rdx, rax
call _strncpy
loc_2FFA0:
mov rax, [rbp+var_678]
mov byte ptr [rax], 0
lea rax, [rbp+var_410]
mov [rbp+var_660], rax
mov rdi, [rbp+var_660]
call _strlen
mov [rbp+var_664], eax
mov rsi, [rbp+var_648]
mov rdx, [rbp+var_660]
mov ecx, [rbp+var_664]
lea rdi, pfs_filename_hash
call lf_hash_search
mov [rbp+var_680], rax
cmp [rbp+var_680], 0
jz short loc_3001C
mov eax, 1
cmp [rbp+var_680], rax
jz short loc_3001C
mov rax, [rbp+var_680]
mov rax, [rax]
mov [rbp+var_640], rax
jmp short loc_30044
loc_3001C:
jmp short $+2
loc_3001E:
jmp short $+2
loc_30020:
jmp short $+2
loc_30022:
mov rcx, [rbp+var_648]
mov [rbp+var_688], 0
mov rax, [rbp+var_688]
xchg rax, [rcx+10h]
jmp loc_302CF
loc_30044:
mov rsi, [rbp+var_648]
mov rdx, [rbp+var_640]
add rdx, 18h
mov rax, [rbp+var_640]
mov ecx, [rax+218h]
lea rdi, pfs_filename_hash
call lf_hash_delete
cmp [rbp+var_634], 200h
jb short loc_300A7
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_630]
mov edx, 1FFh
call _memcpy
mov [rbp+var_11], 0
lea rax, [rbp+var_210]
mov [rbp+var_650], rax
jmp short loc_300B5
loc_300A7:
mov rax, [rbp+var_630]
mov [rbp+var_650], rax
loc_300B5:
mov rdi, [rbp+var_650]
call dirname_length
mov [rbp+var_658], rax
cmp [rbp+var_658], 0
jnz short loc_300E9
mov [rbp+var_610], 2Eh ; '.'
mov [rbp+var_60F], 2Fh ; '/'
mov [rbp+var_60E], 0
jmp short loc_30112
loc_300E9:
lea rdi, [rbp+var_610]
mov rsi, [rbp+var_650]
mov rdx, [rbp+var_658]
call _memcpy
mov rax, [rbp+var_658]
mov [rbp+rax+var_610], 0
loc_30112:
lea rdi, [rbp+var_410]
lea rsi, [rbp+var_610]
xor eax, eax
mov edx, eax
call my_realpath
cmp eax, 0
jz short loc_3014B
lea rax, global_file_container
mov rcx, [rax]
add rcx, 1
lea rax, global_file_container
mov [rax], rcx
jmp loc_302CF
loc_3014B:
lea rax, [rbp+var_410]
mov [rbp+var_6A0], rax
lea rdi, [rbp+var_410]
call _strlen
mov rcx, rax
mov rax, [rbp+var_6A0]
add rax, rcx
mov [rbp+var_670], rax
lea rax, [rbp+var_410]
add rax, 1FFh
mov [rbp+var_678], rax
mov rax, [rbp+var_678]
cmp rax, [rbp+var_670]
jbe short loc_301C5
mov rax, [rbp+var_670]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jz short loc_301C5
mov rax, [rbp+var_670]
mov rcx, rax
add rcx, 1
mov [rbp+var_670], rcx
mov byte ptr [rax], 2Fh ; '/'
loc_301C5:
mov rax, [rbp+var_678]
cmp rax, [rbp+var_670]
jbe short loc_30200
mov rdi, [rbp+var_670]
mov rsi, [rbp+var_650]
add rsi, [rbp+var_658]
mov rdx, [rbp+var_678]
mov rax, [rbp+var_670]
sub rdx, rax
call _strncpy
loc_30200:
mov rax, [rbp+var_678]
mov byte ptr [rax], 0
lea rax, [rbp+var_410]
mov [rbp+var_660], rax
mov rdi, [rbp+var_660]
call _strlen
mov [rbp+var_664], eax
mov rdi, [rbp+var_640]
add rdi, 18h
mov rsi, [rbp+var_660]
mov eax, [rbp+var_664]
mov edx, eax
call _memcpy
mov rax, [rbp+var_640]
mov ecx, [rbp+var_664]
mov byte ptr [rax+rcx+18h], 0
mov ecx, [rbp+var_664]
mov rax, [rbp+var_640]
mov [rax+218h], ecx
mov rsi, [rbp+var_648]
lea rdi, pfs_filename_hash
lea rdx, [rbp+var_640]
call lf_hash_insert
mov [rbp+var_68C], eax
cmp [rbp+var_68C], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_302A4
jmp short loc_302CF
loc_302A4:
mov rsi, [rbp+var_640]
lea rdi, global_file_container
call _ZN29PFS_buffer_scalable_containerI8PFS_fileLi4096ELi4096E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE10deallocateEPS0_; PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::deallocate(PFS_file*)
lea rax, global_file_container
mov rcx, [rax]
add rcx, 1
lea rax, global_file_container
mov [rax], rcx
loc_302CF:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_302EA
add rsp, 6A0h
pop rbp
retn
loc_302EA:
call ___stack_chk_fail
|
unsigned long long find_and_rename_file(
PFS_thread *a1,
const char *a2,
unsigned int a3,
const char *a4,
unsigned int a5)
{
long long v5; // rax
_BYTE *v6; // rax
long long v7; // rax
_BYTE *v8; // rax
long long *v10; // [rsp+20h] [rbp-680h]
unsigned long long v11; // [rsp+30h] [rbp-670h]
unsigned long long v12; // [rsp+30h] [rbp-670h]
unsigned int v13; // [rsp+3Ch] [rbp-664h]
unsigned int v14; // [rsp+3Ch] [rbp-664h]
long long v15; // [rsp+48h] [rbp-658h]
long long v16; // [rsp+48h] [rbp-658h]
const char *v17; // [rsp+50h] [rbp-650h]
const char *v18; // [rsp+50h] [rbp-650h]
long long filename_hash_pins; // [rsp+58h] [rbp-648h]
long long v20; // [rsp+60h] [rbp-640h] BYREF
unsigned int v21; // [rsp+6Ch] [rbp-634h]
const char *v22; // [rsp+70h] [rbp-630h]
unsigned int v23; // [rsp+7Ch] [rbp-624h]
const char *v24; // [rsp+80h] [rbp-620h]
PFS_thread *v25; // [rsp+88h] [rbp-618h]
char v26[512]; // [rsp+90h] [rbp-610h] BYREF
_BYTE v27[511]; // [rsp+290h] [rbp-410h] BYREF
char v28; // [rsp+48Fh] [rbp-211h] BYREF
_BYTE v29[511]; // [rsp+490h] [rbp-210h] BYREF
char v30; // [rsp+68Fh] [rbp-11h]
unsigned long long v31; // [rsp+698h] [rbp-8h]
v31 = __readfsqword(0x28u);
v25 = a1;
v24 = a2;
v23 = a3;
v22 = a4;
v21 = a5;
filename_hash_pins = get_filename_hash_pins(a1);
if ( filename_hash_pins )
{
if ( v23 < 0x200 )
{
v17 = v24;
v5 = dirname_length(v24);
}
else
{
memcpy(v29, v24, sizeof(v29));
v30 = 0;
v17 = v29;
v5 = dirname_length(v29);
}
v15 = v5;
if ( v5 )
{
memcpy(v26, v17, v5);
v26[v15] = 0;
}
else
{
strcpy(v26, "./");
}
if ( (unsigned int)my_realpath(v27, v26, 0LL) )
{
++global_file_container[0];
}
else
{
v11 = (unsigned long long)&v27[strlen(v27)];
if ( (unsigned long long)&v28 > v11 && *(_BYTE *)(v11 - 1) != 47 )
{
v6 = (_BYTE *)v11++;
*v6 = 47;
}
if ( (unsigned long long)&v28 > v11 )
strncpy(v11, &v17[v15], &v29[-v11 - 1]);
v28 = 0;
v13 = strlen(v27);
v10 = (long long *)lf_hash_search(&pfs_filename_hash, filename_hash_pins, v27, v13);
if ( (unsigned long long)v10 < 2 )
{
_InterlockedExchange64((volatile long long *)(filename_hash_pins + 16), 0LL);
}
else
{
v20 = *v10;
lf_hash_delete(&pfs_filename_hash, filename_hash_pins, v20 + 24, *(unsigned int *)(v20 + 536));
if ( v21 < 0x200 )
{
v18 = v22;
v7 = dirname_length(v22);
}
else
{
memcpy(v29, v22, sizeof(v29));
v30 = 0;
v18 = v29;
v7 = dirname_length(v29);
}
v16 = v7;
if ( v7 )
{
memcpy(v26, v18, v7);
v26[v16] = 0;
}
else
{
strcpy(v26, "./");
}
if ( (unsigned int)my_realpath(v27, v26, 0LL) )
{
++global_file_container[0];
}
else
{
v12 = (unsigned long long)&v27[strlen(v27)];
if ( (unsigned long long)&v28 > v12 && *(_BYTE *)(v12 - 1) != 47 )
{
v8 = (_BYTE *)v12++;
*v8 = 47;
}
if ( (unsigned long long)&v28 > v12 )
strncpy(v12, &v18[v16], &v29[-v12 - 1]);
v28 = 0;
v14 = strlen(v27);
memcpy(v20 + 24, v27, v14);
*(_BYTE *)(v20 + v14 + 24) = 0;
*(_DWORD *)(v20 + 536) = v14;
if ( (unsigned int)lf_hash_insert(&pfs_filename_hash, filename_hash_pins, &v20) )
{
PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::deallocate(
global_file_container,
v20);
++global_file_container[0];
}
}
}
}
}
else
{
++global_file_container[0];
}
return __readfsqword(0x28u);
}
|
find_and_rename_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x6a0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x618],RDI
MOV qword ptr [RBP + -0x620],RSI
MOV dword ptr [RBP + -0x624],EDX
MOV qword ptr [RBP + -0x630],RCX
MOV dword ptr [RBP + -0x634],R8D
MOV RDI,qword ptr [RBP + -0x618]
CALL 0x0012f780
MOV qword ptr [RBP + -0x648],RAX
CMP qword ptr [RBP + -0x648],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0012fe0f
LEA RAX,[0x4cdd08]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x4cdd08]
MOV qword ptr [RAX],RCX
JMP 0x001302cf
LAB_0012fe0f:
CMP dword ptr [RBP + -0x624],0x200
JC 0x0012fe47
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x620]
MOV EDX,0x1ff
CALL 0x00126280
MOV byte ptr [RBP + -0x11],0x0
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x650],RAX
JMP 0x0012fe55
LAB_0012fe47:
MOV RAX,qword ptr [RBP + -0x620]
MOV qword ptr [RBP + -0x650],RAX
LAB_0012fe55:
MOV RDI,qword ptr [RBP + -0x650]
CALL 0x00158150
MOV qword ptr [RBP + -0x658],RAX
CMP qword ptr [RBP + -0x658],0x0
JNZ 0x0012fe89
MOV byte ptr [RBP + -0x610],0x2e
MOV byte ptr [RBP + -0x60f],0x2f
MOV byte ptr [RBP + -0x60e],0x0
JMP 0x0012feb2
LAB_0012fe89:
LEA RDI,[RBP + -0x610]
MOV RSI,qword ptr [RBP + -0x650]
MOV RDX,qword ptr [RBP + -0x658]
CALL 0x00126280
MOV RAX,qword ptr [RBP + -0x658]
MOV byte ptr [RBP + RAX*0x1 + -0x610],0x0
LAB_0012feb2:
LEA RDI,[RBP + -0x410]
LEA RSI,[RBP + -0x610]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001597a0
CMP EAX,0x0
JZ 0x0012feeb
LEA RAX,[0x4cdd08]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x4cdd08]
MOV qword ptr [RAX],RCX
JMP 0x001302cf
LAB_0012feeb:
LEA RAX,[RBP + -0x410]
MOV qword ptr [RBP + -0x698],RAX
LEA RDI,[RBP + -0x410]
CALL 0x00126150
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x698]
ADD RAX,RCX
MOV qword ptr [RBP + -0x670],RAX
LEA RAX,[RBP + -0x410]
ADD RAX,0x1ff
MOV qword ptr [RBP + -0x678],RAX
MOV RAX,qword ptr [RBP + -0x678]
CMP RAX,qword ptr [RBP + -0x670]
JBE 0x0012ff65
MOV RAX,qword ptr [RBP + -0x670]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JZ 0x0012ff65
MOV RAX,qword ptr [RBP + -0x670]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x670],RCX
MOV byte ptr [RAX],0x2f
LAB_0012ff65:
MOV RAX,qword ptr [RBP + -0x678]
CMP RAX,qword ptr [RBP + -0x670]
JBE 0x0012ffa0
MOV RDI,qword ptr [RBP + -0x670]
MOV RSI,qword ptr [RBP + -0x650]
ADD RSI,qword ptr [RBP + -0x658]
MOV RDX,qword ptr [RBP + -0x678]
MOV RAX,qword ptr [RBP + -0x670]
SUB RDX,RAX
CALL 0x001261a0
LAB_0012ffa0:
MOV RAX,qword ptr [RBP + -0x678]
MOV byte ptr [RAX],0x0
LEA RAX,[RBP + -0x410]
MOV qword ptr [RBP + -0x660],RAX
MOV RDI,qword ptr [RBP + -0x660]
CALL 0x00126150
MOV dword ptr [RBP + -0x664],EAX
MOV RSI,qword ptr [RBP + -0x648]
MOV RDX,qword ptr [RBP + -0x660]
MOV ECX,dword ptr [RBP + -0x664]
LEA RDI,[0x509f00]
CALL 0x0015d790
MOV qword ptr [RBP + -0x680],RAX
CMP qword ptr [RBP + -0x680],0x0
JZ 0x0013001c
MOV EAX,0x1
CMP qword ptr [RBP + -0x680],RAX
JZ 0x0013001c
MOV RAX,qword ptr [RBP + -0x680]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x640],RAX
JMP 0x00130044
LAB_0013001c:
JMP 0x0013001e
LAB_0013001e:
JMP 0x00130020
LAB_00130020:
JMP 0x00130022
LAB_00130022:
MOV RCX,qword ptr [RBP + -0x648]
MOV qword ptr [RBP + -0x688],0x0
MOV RAX,qword ptr [RBP + -0x688]
XCHG qword ptr [RCX + 0x10],RAX
JMP 0x001302cf
LAB_00130044:
MOV RSI,qword ptr [RBP + -0x648]
MOV RDX,qword ptr [RBP + -0x640]
ADD RDX,0x18
MOV RAX,qword ptr [RBP + -0x640]
MOV ECX,dword ptr [RAX + 0x218]
LEA RDI,[0x509f00]
CALL 0x0015cd70
CMP dword ptr [RBP + -0x634],0x200
JC 0x001300a7
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x630]
MOV EDX,0x1ff
CALL 0x00126280
MOV byte ptr [RBP + -0x11],0x0
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x650],RAX
JMP 0x001300b5
LAB_001300a7:
MOV RAX,qword ptr [RBP + -0x630]
MOV qword ptr [RBP + -0x650],RAX
LAB_001300b5:
MOV RDI,qword ptr [RBP + -0x650]
CALL 0x00158150
MOV qword ptr [RBP + -0x658],RAX
CMP qword ptr [RBP + -0x658],0x0
JNZ 0x001300e9
MOV byte ptr [RBP + -0x610],0x2e
MOV byte ptr [RBP + -0x60f],0x2f
MOV byte ptr [RBP + -0x60e],0x0
JMP 0x00130112
LAB_001300e9:
LEA RDI,[RBP + -0x610]
MOV RSI,qword ptr [RBP + -0x650]
MOV RDX,qword ptr [RBP + -0x658]
CALL 0x00126280
MOV RAX,qword ptr [RBP + -0x658]
MOV byte ptr [RBP + RAX*0x1 + -0x610],0x0
LAB_00130112:
LEA RDI,[RBP + -0x410]
LEA RSI,[RBP + -0x610]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001597a0
CMP EAX,0x0
JZ 0x0013014b
LEA RAX,[0x4cdd08]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x4cdd08]
MOV qword ptr [RAX],RCX
JMP 0x001302cf
LAB_0013014b:
LEA RAX,[RBP + -0x410]
MOV qword ptr [RBP + -0x6a0],RAX
LEA RDI,[RBP + -0x410]
CALL 0x00126150
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x6a0]
ADD RAX,RCX
MOV qword ptr [RBP + -0x670],RAX
LEA RAX,[RBP + -0x410]
ADD RAX,0x1ff
MOV qword ptr [RBP + -0x678],RAX
MOV RAX,qword ptr [RBP + -0x678]
CMP RAX,qword ptr [RBP + -0x670]
JBE 0x001301c5
MOV RAX,qword ptr [RBP + -0x670]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JZ 0x001301c5
MOV RAX,qword ptr [RBP + -0x670]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x670],RCX
MOV byte ptr [RAX],0x2f
LAB_001301c5:
MOV RAX,qword ptr [RBP + -0x678]
CMP RAX,qword ptr [RBP + -0x670]
JBE 0x00130200
MOV RDI,qword ptr [RBP + -0x670]
MOV RSI,qword ptr [RBP + -0x650]
ADD RSI,qword ptr [RBP + -0x658]
MOV RDX,qword ptr [RBP + -0x678]
MOV RAX,qword ptr [RBP + -0x670]
SUB RDX,RAX
CALL 0x001261a0
LAB_00130200:
MOV RAX,qword ptr [RBP + -0x678]
MOV byte ptr [RAX],0x0
LEA RAX,[RBP + -0x410]
MOV qword ptr [RBP + -0x660],RAX
MOV RDI,qword ptr [RBP + -0x660]
CALL 0x00126150
MOV dword ptr [RBP + -0x664],EAX
MOV RDI,qword ptr [RBP + -0x640]
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x660]
MOV EAX,dword ptr [RBP + -0x664]
MOV EDX,EAX
CALL 0x00126280
MOV RAX,qword ptr [RBP + -0x640]
MOV ECX,dword ptr [RBP + -0x664]
MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0
MOV ECX,dword ptr [RBP + -0x664]
MOV RAX,qword ptr [RBP + -0x640]
MOV dword ptr [RAX + 0x218],ECX
MOV RSI,qword ptr [RBP + -0x648]
LEA RDI,[0x509f00]
LEA RDX,[RBP + -0x640]
CALL 0x0015c770
MOV dword ptr [RBP + -0x68c],EAX
CMP dword ptr [RBP + -0x68c],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001302a4
JMP 0x001302cf
LAB_001302a4:
MOV RSI,qword ptr [RBP + -0x640]
LEA RDI,[0x4cdd08]
CALL 0x00134d10
LEA RAX,[0x4cdd08]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x4cdd08]
MOV qword ptr [RAX],RCX
LAB_001302cf:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001302ea
ADD RSP,0x6a0
POP RBP
RET
LAB_001302ea:
CALL 0x00126360
|
/* find_and_rename_file(PFS_thread*, char const*, unsigned int, char const*, unsigned int) */
void find_and_rename_file(PFS_thread *param_1,char *param_2,uint param_3,char *param_4,uint param_5)
{
int iVar1;
long lVar2;
size_t sVar3;
size_t sVar4;
char *pcVar5;
long *plVar6;
long in_FS_OFFSET;
char *local_678;
char *local_658;
PFS_file *local_648;
uint local_63c;
char *local_638;
uint local_62c;
char *local_628;
PFS_thread *local_620;
int1 local_618 [511];
char acStack_419 [512];
char local_219 [512];
int1 local_19;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_63c = param_5;
local_638 = param_4;
local_62c = param_3;
local_628 = param_2;
local_620 = param_1;
lVar2 = get_filename_hash_pins(param_1);
if (lVar2 == 0) {
global_file_container = global_file_container + 1;
}
else {
if (local_62c < 0x200) {
local_658 = local_628;
}
else {
memcpy(local_219 + 1,local_628,0x1ff);
local_19 = 0;
local_658 = local_219 + 1;
}
sVar3 = dirname_length(local_658);
if (sVar3 == 0) {
local_618[0] = 0x2e;
local_618[1] = 0x2f;
local_618[2] = 0;
}
else {
memcpy(local_618,local_658,sVar3);
local_618[sVar3] = 0;
}
iVar1 = my_realpath(acStack_419 + 1,local_618,0);
if (iVar1 == 0) {
sVar4 = strlen(acStack_419 + 1);
pcVar5 = acStack_419 + sVar4 + 1;
local_678 = pcVar5;
if ((pcVar5 < local_219) && (acStack_419[sVar4] != '/')) {
local_678 = acStack_419 + sVar4 + 2;
*pcVar5 = '/';
}
if (local_678 < local_219) {
strncpy(local_678,local_658 + sVar3,(long)local_219 - (long)local_678);
}
local_219[0] = '\0';
sVar3 = strlen(acStack_419 + 1);
plVar6 = (long *)lf_hash_search(pfs_filename_hash,lVar2,acStack_419 + 1,sVar3 & 0xffffffff);
if ((plVar6 == (long *)0x0) || (plVar6 == (long *)0x1)) {
LOCK();
*(int8 *)(lVar2 + 0x10) = 0;
UNLOCK();
}
else {
local_648 = (PFS_file *)*plVar6;
lf_hash_delete(pfs_filename_hash,lVar2,local_648 + 0x18,*(int4 *)(local_648 + 0x218));
if (local_63c < 0x200) {
local_658 = local_638;
}
else {
memcpy(local_219 + 1,local_638,0x1ff);
local_19 = 0;
local_658 = local_219 + 1;
}
sVar3 = dirname_length(local_658);
if (sVar3 == 0) {
local_618[0] = 0x2e;
local_618[1] = 0x2f;
local_618[2] = 0;
}
else {
memcpy(local_618,local_658,sVar3);
local_618[sVar3] = 0;
}
iVar1 = my_realpath(acStack_419 + 1,local_618,0);
if (iVar1 == 0) {
sVar4 = strlen(acStack_419 + 1);
pcVar5 = acStack_419 + sVar4 + 1;
local_678 = pcVar5;
if ((pcVar5 < local_219) && (acStack_419[sVar4] != '/')) {
local_678 = acStack_419 + sVar4 + 2;
*pcVar5 = '/';
}
if (local_678 < local_219) {
strncpy(local_678,local_658 + sVar3,(long)local_219 - (long)local_678);
}
local_219[0] = '\0';
sVar3 = strlen(acStack_419 + 1);
memcpy(local_648 + 0x18,acStack_419 + 1,sVar3 & 0xffffffff);
local_648[(sVar3 & 0xffffffff) + 0x18] = (PFS_file)0x0;
*(int *)(local_648 + 0x218) = (int)sVar3;
iVar1 = lf_hash_insert(pfs_filename_hash,lVar2,&local_648);
if (iVar1 != 0) {
PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>
::deallocate((PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>
*)&global_file_container,local_648);
global_file_container = global_file_container + 1;
}
}
else {
global_file_container = global_file_container + 1;
}
}
}
else {
global_file_container = global_file_container + 1;
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
|
|
59,864
|
find_and_rename_file(PFS_thread*, char const*, unsigned int, char const*, unsigned int)
|
eloqsql/storage/perfschema/pfs_instr.cc
|
void find_and_rename_file(PFS_thread *thread, const char *old_filename,
uint old_len, const char *new_filename, uint new_len)
{
PFS_file *pfs;
assert(thread != NULL);
LF_PINS *pins= get_filename_hash_pins(thread);
if (unlikely(pins == NULL))
{
global_file_container.m_lost++;
return;
}
/*
Normalize the old file name.
*/
char safe_buffer[FN_REFLEN];
const char *safe_filename;
if (old_len >= FN_REFLEN)
{
memcpy(safe_buffer, old_filename, FN_REFLEN - 1);
safe_buffer[FN_REFLEN - 1]= 0;
safe_filename= safe_buffer;
}
else
safe_filename= old_filename;
char buffer[FN_REFLEN];
char dirbuffer[FN_REFLEN];
size_t dirlen;
const char *normalized_filename;
uint normalized_length;
dirlen= dirname_length(safe_filename);
if (dirlen == 0)
{
dirbuffer[0]= FN_CURLIB;
dirbuffer[1]= FN_LIBCHAR;
dirbuffer[2]= '\0';
}
else
{
memcpy(dirbuffer, safe_filename, dirlen);
dirbuffer[dirlen]= '\0';
}
if (my_realpath(buffer, dirbuffer, MYF(0)) != 0)
{
global_file_container.m_lost++;
return;
}
/* Append the unresolved file name to the resolved path */
char *ptr= buffer + strlen(buffer);
char *buf_end= &buffer[sizeof(buffer)-1];
if ((buf_end > ptr) && (*(ptr-1) != FN_LIBCHAR))
*ptr++= FN_LIBCHAR;
if (buf_end > ptr)
strncpy(ptr, safe_filename + dirlen, buf_end - ptr);
*buf_end= '\0';
normalized_filename= buffer;
normalized_length= (uint)strlen(normalized_filename);
PFS_file **entry;
entry= reinterpret_cast<PFS_file**>
(lf_hash_search(&pfs_filename_hash, pins,
normalized_filename, normalized_length));
if (entry && (entry != MY_ERRPTR))
pfs= *entry;
else
{
lf_hash_search_unpin(pins);
return;
}
lf_hash_delete(&pfs_filename_hash, pins,
pfs->m_filename, pfs->m_filename_length);
/*
Normalize the new file name.
*/
if (new_len >= FN_REFLEN)
{
memcpy(safe_buffer, new_filename, FN_REFLEN - 1);
safe_buffer[FN_REFLEN - 1]= 0;
safe_filename= safe_buffer;
}
else
safe_filename= new_filename;
dirlen= dirname_length(safe_filename);
if (dirlen == 0)
{
dirbuffer[0]= FN_CURLIB;
dirbuffer[1]= FN_LIBCHAR;
dirbuffer[2]= '\0';
}
else
{
memcpy(dirbuffer, safe_filename, dirlen);
dirbuffer[dirlen]= '\0';
}
if (my_realpath(buffer, dirbuffer, MYF(0)) != 0)
{
global_file_container.m_lost++;
return;
}
/* Append the unresolved file name to the resolved path */
ptr= buffer + strlen(buffer);
buf_end= &buffer[sizeof(buffer)-1];
if ((buf_end > ptr) && (*(ptr-1) != FN_LIBCHAR))
*ptr++= FN_LIBCHAR;
if (buf_end > ptr)
strncpy(ptr, safe_filename + dirlen, buf_end - ptr);
*buf_end= '\0';
normalized_filename= buffer;
normalized_length= (uint)strlen(normalized_filename);
memcpy(pfs->m_filename, normalized_filename, normalized_length);
pfs->m_filename[normalized_length]= '\0';
pfs->m_filename_length= normalized_length;
int res;
res= lf_hash_insert(&pfs_filename_hash, pins, &pfs);
if (likely(res == 0))
return;
else
{
global_file_container.deallocate(pfs);
global_file_container.m_lost++;
return;
}
}
|
O3
|
cpp
|
find_and_rename_file(PFS_thread*, char const*, unsigned int, char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x618, %rsp # imm = 0x618
movl %r8d, %r15d
movq %rcx, -0x640(%rbp)
movl %edx, %r13d
movq %rsi, %r12
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x808(%rdi), %rbx
testq %rbx, %rbx
je 0x306ec
cmpl $0x200, %r13d # imm = 0x200
jb 0x30473
leaq -0x230(%rbp), %r14
movl $0x1ff, %edx # imm = 0x1FF
movq %r14, %rdi
movq %r12, %rsi
callq 0x26290
movb $0x0, 0x1ff(%r14)
movq %r14, %r12
movq %r12, %rdi
callq 0x44cc0
movq %rax, %r13
testq %rax, %rax
je 0x304a5
leaq -0x630(%rbp), %rdi
movl $0x200, %ecx # imm = 0x200
movq %r12, %rsi
movq %r13, %rdx
callq 0x265f0
movb $0x0, -0x630(%rbp,%r13)
jmp 0x304b5
movw $0x2f2e, -0x630(%rbp) # imm = 0x2F2E
movb $0x0, -0x62e(%rbp)
leaq -0x430(%rbp), %rdi
leaq -0x630(%rbp), %rsi
xorl %edx, %edx
callq 0x459d9
testl %eax, %eax
je 0x304dd
leaq 0x3608c3(%rip), %rax # 0x390d98
incq (%rax)
jmp 0x306cb
leaq -0x430(%rbp), %rdi
callq 0x26150
cmpq $0x1fe, %rax # imm = 0x1FE
jg 0x3052c
cmpb $0x2f, -0x431(%rbp,%rax)
je 0x3050e
movb $0x2f, -0x430(%rbp,%rax)
cmpq $0x1fe, %rax # imm = 0x1FE
je 0x3052c
incq %rax
leaq (%rax,%rbp), %rdi
addq $-0x430, %rdi # imm = 0xFBD0
addq %r13, %r12
movl $0x1ff, %edx # imm = 0x1FF
subq %rax, %rdx
movq %r12, %rsi
callq 0x261a0
leaq -0x430(%rbp), %r14
movb $0x0, 0x1ff(%r14)
movq %r14, %rdi
callq 0x26150
leaq 0x39c9f6(%rip), %rdi # 0x3ccf40
movq %rbx, %rsi
movq %r14, %rdx
movl %eax, %ecx
callq 0x2c462
cmpq $0x2, %rax
jae 0x30568
xorl %eax, %eax
xchgq %rax, 0x10(%rbx)
jmp 0x306cb
movq (%rax), %r13
movq %r13, -0x638(%rbp)
leaq 0x18(%r13), %rdx
movl 0x218(%r13), %ecx
leaq 0x39c9bc(%rip), %rdi # 0x3ccf40
movq %rbx, %rsi
callq 0x2bf34
cmpl $0x1ff, %r15d # imm = 0x1FF
jbe 0x305ba
leaq -0x230(%rbp), %r14
movl $0x1ff, %edx # imm = 0x1FF
movq %r14, %rdi
movq -0x640(%rbp), %rsi
callq 0x26290
movb $0x0, 0x1ff(%r14)
jmp 0x305c1
movq -0x640(%rbp), %r14
movq %r14, %rdi
callq 0x44cc0
movq %rax, %r15
testq %rax, %rax
je 0x305f3
leaq -0x630(%rbp), %rdi
movl $0x200, %ecx # imm = 0x200
movq %r14, %rsi
movq %r15, %rdx
callq 0x265f0
movb $0x0, -0x630(%rbp,%r15)
jmp 0x30603
movw $0x2f2e, -0x630(%rbp) # imm = 0x2F2E
movb $0x0, -0x62e(%rbp)
leaq -0x430(%rbp), %rdi
leaq -0x630(%rbp), %rsi
xorl %edx, %edx
callq 0x459d9
testl %eax, %eax
jne 0x304ce
leaq -0x430(%rbp), %rdi
callq 0x26150
cmpq $0x1fe, %rax # imm = 0x1FE
jg 0x30676
cmpb $0x2f, -0x431(%rbp,%rax)
je 0x30651
movb $0x2f, -0x430(%rbp,%rax)
cmpq $0x1fe, %rax # imm = 0x1FE
je 0x30676
incq %rax
leaq (%rax,%rbp), %rdi
addq $-0x430, %rdi # imm = 0xFBD0
addq %r15, %r14
movl $0x1ff, %edx # imm = 0x1FF
subq %rax, %rdx
movq %r14, %rsi
callq 0x261a0
movq -0x638(%rbp), %r13
xorl %eax, %eax
leaq -0x430(%rbp), %r14
movb %al, 0x1ff(%r14)
movq %r14, %rdi
callq 0x26150
movq %rax, %r15
leaq 0x18(%r13), %rdi
movl %r15d, %r12d
movq %r14, %rsi
movq %r12, %rdx
callq 0x26290
xorl %eax, %eax
movb %al, 0x18(%r13,%r12)
movl %r15d, 0x218(%r13)
leaq 0x39c888(%rip), %rdi # 0x3ccf40
leaq -0x638(%rbp), %rdx
movq %rbx, %rsi
callq 0x2bc03
testl %eax, %eax
jne 0x30720
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x3072e
addq $0x618, %rsp # imm = 0x618
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x1, 0x39c916(%rip) # 0x3cd009
jne 0x304ce
movq %rdi, %r14
leaq 0x39c865(%rip), %rdi # 0x3ccf68
callq 0x2ba28
movq %rax, 0x808(%r14)
testq %rax, %rax
je 0x304ce
movq %rax, %rbx
jmp 0x30448
leaq -0x638(%rbp), %rdi
callq 0x27286
jmp 0x306cb
callq 0x263a0
|
_Z20find_and_rename_fileP10PFS_threadPKcjS2_j:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 618h
mov r15d, r8d
mov [rbp+var_640], rcx
mov r13d, edx
mov r12, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rbx, [rdi+808h]
test rbx, rbx
jz loc_306EC
loc_30448:
cmp r13d, 200h
jb short loc_30473
lea r14, [rbp+var_230]
mov edx, 1FFh
mov rdi, r14
mov rsi, r12
call _memcpy
mov byte ptr [r14+1FFh], 0
mov r12, r14
loc_30473:
mov rdi, r12
call dirname_length
mov r13, rax
test rax, rax
jz short loc_304A5
lea rdi, [rbp+var_630]
mov ecx, 200h
mov rsi, r12
mov rdx, r13
call ___memcpy_chk
mov byte ptr [rbp+r13+var_630], 0
jmp short loc_304B5
loc_304A5:
mov [rbp+var_630], 2F2Eh
mov [rbp+var_62E], 0
loc_304B5:
lea rdi, [rbp+var_430]
lea rsi, [rbp+var_630]
xor edx, edx
call my_realpath
test eax, eax
jz short loc_304DD
loc_304CE:
lea rax, global_file_container
inc qword ptr [rax]
jmp loc_306CB
loc_304DD:
lea rdi, [rbp+var_430]
call _strlen
cmp rax, 1FEh
jg short loc_3052C
cmp [rbp+rax+var_431], 2Fh ; '/'
jz short loc_3050E
mov [rbp+rax+var_430], 2Fh ; '/'
cmp rax, 1FEh
jz short loc_3052C
inc rax
loc_3050E:
lea rdi, [rax+rbp]
add rdi, 0FFFFFFFFFFFFFBD0h
add r12, r13
mov edx, 1FFh
sub rdx, rax
mov rsi, r12
call _strncpy
loc_3052C:
lea r14, [rbp+var_430]
mov byte ptr [r14+1FFh], 0
mov rdi, r14
call _strlen
lea rdi, pfs_filename_hash
mov rsi, rbx
mov rdx, r14
mov ecx, eax
call lf_hash_search
cmp rax, 2
jnb short loc_30568
xor eax, eax
xchg rax, [rbx+10h]
jmp loc_306CB
loc_30568:
mov r13, [rax]
mov [rbp+var_638], r13
lea rdx, [r13+18h]
mov ecx, [r13+218h]
lea rdi, pfs_filename_hash
mov rsi, rbx
call lf_hash_delete
cmp r15d, 1FFh
jbe short loc_305BA
lea r14, [rbp+var_230]
mov edx, 1FFh
mov rdi, r14
mov rsi, [rbp+var_640]
call _memcpy
mov byte ptr [r14+1FFh], 0
jmp short loc_305C1
loc_305BA:
mov r14, [rbp+var_640]
loc_305C1:
mov rdi, r14
call dirname_length
mov r15, rax
test rax, rax
jz short loc_305F3
lea rdi, [rbp+var_630]
mov ecx, 200h
mov rsi, r14
mov rdx, r15
call ___memcpy_chk
mov byte ptr [rbp+r15+var_630], 0
jmp short loc_30603
loc_305F3:
mov [rbp+var_630], 2F2Eh
mov [rbp+var_62E], 0
loc_30603:
lea rdi, [rbp+var_430]
lea rsi, [rbp+var_630]
xor edx, edx
call my_realpath
test eax, eax
jnz loc_304CE
lea rdi, [rbp+var_430]
call _strlen
cmp rax, 1FEh
jg short loc_30676
cmp [rbp+rax+var_431], 2Fh ; '/'
jz short loc_30651
mov [rbp+rax+var_430], 2Fh ; '/'
cmp rax, 1FEh
jz short loc_30676
inc rax
loc_30651:
lea rdi, [rax+rbp]
add rdi, 0FFFFFFFFFFFFFBD0h
add r14, r15
mov edx, 1FFh
sub rdx, rax
mov rsi, r14
call _strncpy
mov r13, [rbp+var_638]
loc_30676:
xor eax, eax
lea r14, [rbp+var_430]
mov [r14+1FFh], al
mov rdi, r14
call _strlen
mov r15, rax
lea rdi, [r13+18h]
mov r12d, r15d
mov rsi, r14
mov rdx, r12
call _memcpy
xor eax, eax
mov [r13+r12+18h], al
mov [r13+218h], r15d
lea rdi, pfs_filename_hash
lea rdx, [rbp+var_638]
mov rsi, rbx
call lf_hash_insert
test eax, eax
jnz short loc_30720
loc_306CB:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_3072E
add rsp, 618h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_306EC:
cmp cs:_ZL20filename_hash_inited, 1; filename_hash_inited
jnz loc_304CE
mov r14, rdi
lea rdi, unk_3CCF68
call lf_pinbox_get_pins
mov [r14+808h], rax
test rax, rax
jz loc_304CE
mov rbx, rax
jmp loc_30448
loc_30720:
lea rdi, [rbp+var_638]
call _Z20find_and_rename_fileP10PFS_threadPKcjS2_j_cold_1; find_and_rename_file(PFS_thread *,char const*,uint,char const*,uint) [clone]
jmp short loc_306CB
loc_3072E:
call ___stack_chk_fail
|
unsigned long long find_and_rename_file(
PFS_thread *a1,
const char *a2,
unsigned int a3,
const char *a4,
unsigned int a5)
{
const char *v7; // r12
volatile long long *v8; // rbx
long long v9; // rax
long long v10; // r13
long long v11; // rax
unsigned int v12; // eax
volatile __int32 **v13; // rax
volatile __int32 *v14; // r13
const char *v15; // r14
long long v16; // rax
long long v17; // r15
long long v18; // rax
unsigned int v19; // r15d
long long pins; // rax
volatile __int32 *v23; // [rsp+8h] [rbp-638h] BYREF
char v24[512]; // [rsp+10h] [rbp-630h] BYREF
_BYTE v25[511]; // [rsp+210h] [rbp-430h] BYREF
char v26; // [rsp+40Fh] [rbp-231h]
_BYTE v27[511]; // [rsp+410h] [rbp-230h] BYREF
char v28; // [rsp+60Fh] [rbp-31h]
unsigned long long v29; // [rsp+610h] [rbp-30h]
v7 = a2;
v29 = __readfsqword(0x28u);
v8 = (volatile long long *)*((_QWORD *)a1 + 257);
if ( !v8 )
{
if ( filename_hash_inited != 1
|| (pins = lf_pinbox_get_pins((long long)&unk_3CCF68), (*((_QWORD *)a1 + 257) = pins) == 0LL) )
{
LABEL_8:
++global_file_container[0];
return __readfsqword(0x28u);
}
v8 = (volatile long long *)pins;
}
if ( a3 >= 0x200 )
{
memcpy(v27, a2, sizeof(v27));
v28 = 0;
v7 = v27;
}
v9 = dirname_length(v7);
v10 = v9;
if ( v9 )
{
__memcpy_chk(v24, v7, v9, 512LL);
v24[v10] = 0;
}
else
{
strcpy(v24, "./");
}
if ( (unsigned int)my_realpath(v25, v24, 0LL) )
goto LABEL_8;
v11 = strlen(v25);
if ( v11 <= 510 )
{
if ( v24[v11 + 511] != 47 )
{
v25[v11] = 47;
if ( v11 == 510 )
goto LABEL_14;
++v11;
}
strncpy(&v25[v11], &v7[v10], 511 - v11);
}
LABEL_14:
v26 = 0;
v12 = strlen(v25);
v13 = (volatile __int32 **)lf_hash_search((long long)&pfs_filename_hash, v8, (long long)v25, v12);
if ( (unsigned long long)v13 < 2 )
{
_InterlockedExchange64(v8 + 2, 0LL);
return __readfsqword(0x28u);
}
v14 = *v13;
v23 = v14;
lf_hash_delete((long long)&pfs_filename_hash, v8, (long long)(v14 + 6), *((_DWORD *)v14 + 134));
if ( a5 <= 0x1FF )
{
v15 = a4;
}
else
{
v15 = v27;
memcpy(v27, a4, sizeof(v27));
v28 = 0;
}
v16 = dirname_length(v15);
v17 = v16;
if ( v16 )
{
__memcpy_chk(v24, v15, v16, 512LL);
v24[v17] = 0;
}
else
{
strcpy(v24, "./");
}
if ( (unsigned int)my_realpath(v25, v24, 0LL) )
goto LABEL_8;
v18 = strlen(v25);
if ( v18 <= 510 )
{
if ( v24[v18 + 511] != 47 )
{
v25[v18] = 47;
if ( v18 == 510 )
goto LABEL_28;
++v18;
}
strncpy(&v25[v18], &v15[v17], 511 - v18);
v14 = v23;
}
LABEL_28:
v26 = 0;
v19 = strlen(v25);
memcpy(v14 + 6, v25, v19);
*((_BYTE *)v14 + v19 + 24) = 0;
*((_DWORD *)v14 + 134) = v19;
if ( (unsigned int)lf_hash_insert((long long)&pfs_filename_hash, (long long)v8, (long long)&v23) )
find_and_rename_file(&v23);
return __readfsqword(0x28u);
}
|
find_and_rename_file:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x618
MOV R15D,R8D
MOV qword ptr [RBP + -0x640],RCX
MOV R13D,EDX
MOV R12,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RBX,qword ptr [RDI + 0x808]
TEST RBX,RBX
JZ 0x001306ec
LAB_00130448:
CMP R13D,0x200
JC 0x00130473
LEA R14,[RBP + -0x230]
MOV EDX,0x1ff
MOV RDI,R14
MOV RSI,R12
CALL 0x00126290
MOV byte ptr [R14 + 0x1ff],0x0
MOV R12,R14
LAB_00130473:
MOV RDI,R12
CALL 0x00144cc0
MOV R13,RAX
TEST RAX,RAX
JZ 0x001304a5
LEA RDI,[RBP + -0x630]
MOV ECX,0x200
MOV RSI,R12
MOV RDX,R13
CALL 0x001265f0
MOV byte ptr [RBP + R13*0x1 + -0x630],0x0
JMP 0x001304b5
LAB_001304a5:
MOV word ptr [RBP + -0x630],0x2f2e
MOV byte ptr [RBP + -0x62e],0x0
LAB_001304b5:
LEA RDI,[RBP + -0x430]
LEA RSI,[RBP + -0x630]
XOR EDX,EDX
CALL 0x001459d9
TEST EAX,EAX
JZ 0x001304dd
LAB_001304ce:
LEA RAX,[0x490d98]
INC qword ptr [RAX]
JMP 0x001306cb
LAB_001304dd:
LEA RDI,[RBP + -0x430]
CALL 0x00126150
CMP RAX,0x1fe
JG 0x0013052c
CMP byte ptr [RBP + RAX*0x1 + -0x431],0x2f
JZ 0x0013050e
MOV byte ptr [RBP + RAX*0x1 + -0x430],0x2f
CMP RAX,0x1fe
JZ 0x0013052c
INC RAX
LAB_0013050e:
LEA RDI,[RAX + RBP*0x1]
ADD RDI,-0x430
ADD R12,R13
MOV EDX,0x1ff
SUB RDX,RAX
MOV RSI,R12
CALL 0x001261a0
LAB_0013052c:
LEA R14,[RBP + -0x430]
MOV byte ptr [R14 + 0x1ff],0x0
MOV RDI,R14
CALL 0x00126150
LEA RDI,[0x4ccf40]
MOV RSI,RBX
MOV RDX,R14
MOV ECX,EAX
CALL 0x0012c462
CMP RAX,0x2
JNC 0x00130568
XOR EAX,EAX
XCHG qword ptr [RBX + 0x10],RAX
JMP 0x001306cb
LAB_00130568:
MOV R13,qword ptr [RAX]
MOV qword ptr [RBP + -0x638],R13
LEA RDX,[R13 + 0x18]
MOV ECX,dword ptr [R13 + 0x218]
LEA RDI,[0x4ccf40]
MOV RSI,RBX
CALL 0x0012bf34
CMP R15D,0x1ff
JBE 0x001305ba
LEA R14,[RBP + -0x230]
MOV EDX,0x1ff
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x640]
CALL 0x00126290
MOV byte ptr [R14 + 0x1ff],0x0
JMP 0x001305c1
LAB_001305ba:
MOV R14,qword ptr [RBP + -0x640]
LAB_001305c1:
MOV RDI,R14
CALL 0x00144cc0
MOV R15,RAX
TEST RAX,RAX
JZ 0x001305f3
LEA RDI,[RBP + -0x630]
MOV ECX,0x200
MOV RSI,R14
MOV RDX,R15
CALL 0x001265f0
MOV byte ptr [RBP + R15*0x1 + -0x630],0x0
JMP 0x00130603
LAB_001305f3:
MOV word ptr [RBP + -0x630],0x2f2e
MOV byte ptr [RBP + -0x62e],0x0
LAB_00130603:
LEA RDI,[RBP + -0x430]
LEA RSI,[RBP + -0x630]
XOR EDX,EDX
CALL 0x001459d9
TEST EAX,EAX
JNZ 0x001304ce
LEA RDI,[RBP + -0x430]
CALL 0x00126150
CMP RAX,0x1fe
JG 0x00130676
CMP byte ptr [RBP + RAX*0x1 + -0x431],0x2f
JZ 0x00130651
MOV byte ptr [RBP + RAX*0x1 + -0x430],0x2f
CMP RAX,0x1fe
JZ 0x00130676
INC RAX
LAB_00130651:
LEA RDI,[RAX + RBP*0x1]
ADD RDI,-0x430
ADD R14,R15
MOV EDX,0x1ff
SUB RDX,RAX
MOV RSI,R14
CALL 0x001261a0
MOV R13,qword ptr [RBP + -0x638]
LAB_00130676:
XOR EAX,EAX
LEA R14,[RBP + -0x430]
MOV byte ptr [R14 + 0x1ff],AL
MOV RDI,R14
CALL 0x00126150
MOV R15,RAX
LEA RDI,[R13 + 0x18]
MOV R12D,R15D
MOV RSI,R14
MOV RDX,R12
CALL 0x00126290
XOR EAX,EAX
MOV byte ptr [R13 + R12*0x1 + 0x18],AL
MOV dword ptr [R13 + 0x218],R15D
LEA RDI,[0x4ccf40]
LEA RDX,[RBP + -0x638]
MOV RSI,RBX
CALL 0x0012bc03
TEST EAX,EAX
JNZ 0x00130720
LAB_001306cb:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0013072e
ADD RSP,0x618
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001306ec:
CMP byte ptr [0x004cd009],0x1
JNZ 0x001304ce
MOV R14,RDI
LEA RDI,[0x4ccf68]
CALL 0x0012ba28
MOV qword ptr [R14 + 0x808],RAX
TEST RAX,RAX
JZ 0x001304ce
MOV RBX,RAX
JMP 0x00130448
LAB_00130720:
LEA RDI,[RBP + -0x638]
CALL 0x00127286
JMP 0x001306cb
LAB_0013072e:
CALL 0x001263a0
|
/* find_and_rename_file(PFS_thread*, char const*, unsigned int, char const*, unsigned int) */
void find_and_rename_file(PFS_thread *param_1,char *param_2,uint param_3,char *param_4,uint param_5)
{
int iVar1;
long lVar2;
size_t sVar3;
long *plVar4;
long lVar5;
char *pcVar6;
char *pcVar7;
uint extraout_EDX;
uint uVar8;
long in_FS_OFFSET;
long local_640;
int2 local_638;
int1 local_636;
char acStack_439 [512];
int1 local_239;
char local_238 [511];
int1 local_39;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcVar6 = *(char **)(param_1 + 0x808);
uVar8 = param_5;
if (pcVar6 == (char *)0x0) {
if (filename_hash_inited == '\x01') {
pcVar6 = (char *)lf_pinbox_get_pins(0x4ccf68);
*(char **)(param_1 + 0x808) = pcVar6;
if (pcVar6 != (char *)0x0) goto LAB_00130448;
}
}
else {
LAB_00130448:
pcVar7 = param_2;
if (0x1ff < param_3) {
pcVar7 = local_238;
memcpy(pcVar7,param_2,0x1ff);
local_39 = 0;
}
lVar2 = dirname_length(pcVar7);
if (lVar2 == 0) {
local_638 = 0x2f2e;
local_636 = 0;
}
else {
__memcpy_chk(&local_638,pcVar7,lVar2,0x200);
*(int1 *)((long)&local_638 + lVar2) = 0;
}
iVar1 = my_realpath(acStack_439 + 1,&local_638,0);
if (iVar1 == 0) {
sVar3 = strlen(acStack_439 + 1);
if ((long)sVar3 < 0x1ff) {
if (acStack_439[sVar3] != '/') {
acStack_439[sVar3 + 1] = '/';
if (sVar3 == 0x1fe) goto LAB_0013052c;
sVar3 = sVar3 + 1;
}
strncpy(acStack_439 + sVar3 + 1,pcVar7 + lVar2,0x1ff - sVar3);
}
LAB_0013052c:
local_239 = 0;
sVar3 = strlen(acStack_439 + 1);
plVar4 = (long *)lf_hash_search(pfs_filename_hash,pcVar6,acStack_439 + 1,sVar3 & 0xffffffff);
if (plVar4 < (long *)0x2) {
LOCK();
pcVar6[0x10] = '\0';
pcVar6[0x11] = '\0';
pcVar6[0x12] = '\0';
pcVar6[0x13] = '\0';
pcVar6[0x14] = '\0';
pcVar6[0x15] = '\0';
pcVar6[0x16] = '\0';
pcVar6[0x17] = '\0';
UNLOCK();
goto LAB_001306cb;
}
lVar2 = *plVar4;
pcVar7 = (char *)(ulong)*(uint *)(lVar2 + 0x218);
local_640 = lVar2;
lf_hash_delete(pfs_filename_hash,pcVar6,lVar2 + 0x18);
if (0x1ff < param_5) {
memcpy(local_238,param_4,0x1ff);
local_39 = 0;
param_4 = local_238;
}
lVar5 = dirname_length(param_4);
if (lVar5 == 0) {
local_638 = 0x2f2e;
local_636 = 0;
}
else {
pcVar7 = (char *)0x200;
__memcpy_chk(&local_638,param_4,lVar5);
*(int1 *)((long)&local_638 + lVar5) = 0;
}
iVar1 = my_realpath(acStack_439 + 1,&local_638,0);
if (iVar1 == 0) {
sVar3 = strlen(acStack_439 + 1);
if ((long)sVar3 < 0x1ff) {
if (acStack_439[sVar3] != '/') {
acStack_439[sVar3 + 1] = '/';
if (sVar3 == 0x1fe) goto LAB_00130676;
sVar3 = sVar3 + 1;
}
strncpy(acStack_439 + sVar3 + 1,param_4 + lVar5,0x1ff - sVar3);
lVar2 = local_640;
}
LAB_00130676:
local_239 = 0;
sVar3 = strlen(acStack_439 + 1);
memcpy((void *)(lVar2 + 0x18),acStack_439 + 1,sVar3 & 0xffffffff);
*(int1 *)(lVar2 + 0x18 + (sVar3 & 0xffffffff)) = 0;
*(int *)(lVar2 + 0x218) = (int)sVar3;
iVar1 = lf_hash_insert(pfs_filename_hash,pcVar6,&local_640);
if (iVar1 != 0) {
find_and_rename_file((PFS_thread *)&local_640,pcVar6,extraout_EDX,pcVar7,uVar8);
}
goto LAB_001306cb;
}
}
}
global_file_container = global_file_container + 1;
LAB_001306cb:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
|
|
59,865
|
simple_key_cache_insert
|
eloqsql/mysys/mf_keycache.c
|
static
int simple_key_cache_insert(SIMPLE_KEY_CACHE_CB *keycache,
File file, my_off_t filepos, int level,
uchar *buff, uint length)
{
int error= 0;
DBUG_ENTER("key_cache_insert");
DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u",
(uint) file,(ulong) filepos, length));
if (keycache->key_cache_inited)
{
/* Key cache is used */
reg1 BLOCK_LINK *block;
uint read_length;
uint offset;
int page_st;
my_bool locked_and_incremented= FALSE;
/*
When the keycache is once initialized, we use the cache_lock to
reliably distinguish the cases of normal operation, resizing, and
disabled cache. We always increment and decrement
'cnt_for_resize_op' so that a resizer can wait for pending I/O.
*/
keycache_pthread_mutex_lock(&keycache->cache_lock);
/*
We do not load index data into a disabled cache nor into an
ongoing resize.
*/
if (!keycache->can_be_used || keycache->in_resize)
goto no_key_cache;
/* Register the pseudo I/O for the next resize. */
inc_counter_for_resize_op(keycache);
locked_and_incremented= TRUE;
/* Loaded data may not always be aligned to cache blocks. */
offset= (uint) (filepos % keycache->key_cache_block_size);
/* Load data in key_cache_block_size increments. */
do
{
/* Cache could be disabled or resizing in a later iteration. */
if (!keycache->can_be_used || keycache->in_resize)
goto no_key_cache;
/* Start loading at the beginning of the cache block. */
filepos-= offset;
/* Do not load beyond the end of the cache block. */
read_length= length;
set_if_smaller(read_length, keycache->key_cache_block_size-offset);
KEYCACHE_DBUG_ASSERT(read_length > 0);
/* The block has been read by the caller already. */
keycache->global_cache_read++;
/* Request the cache block that matches file/pos. */
keycache->global_cache_r_requests++;
block= find_key_block(keycache, file, filepos, level, 0, &page_st);
if (!block)
{
/*
This happens only for requests submitted during key cache
resize. The block is not in the cache and shall not go in.
Stop loading index data.
*/
goto no_key_cache;
}
if (!(block->status & BLOCK_ERROR))
{
if (page_st == PAGE_WAIT_TO_BE_READ)
{
/*
this is a secondary request for a block to be read into the
cache. The block is in eviction. It is not yet assigned to
the requested file block (It does not point to the right
hash_link). So we cannot call remove_reader() on the block.
And we cannot access the hash_link directly here. We need to
wait until the assignment is complete. read_block_secondary()
executes the correct wait.
*/
read_block_secondary(keycache, block);
/*
A secondary request must now have the block assigned to the
requested file block.
*/
DBUG_ASSERT(block->hash_link->file == file);
DBUG_ASSERT(block->hash_link->diskpos == filepos);
}
else if (page_st == PAGE_TO_BE_READ &&
(offset || (read_length < keycache->key_cache_block_size)))
{
/*
this is a primary request for a block to be read into the
cache and the supplied data does not fill the whole block.
This function is called on behalf of a LOAD INDEX INTO CACHE
statement, which is a read-only task and allows other
readers. It is possible that a parallel running reader tries
to access this block. If it needs more data than has been
supplied here, it would report an error. To be sure that we
have all data in the block that is available in the file, we
read the block ourselves.
Though reading again what the caller did read already is an
expensive operation, we need to do this for correctness.
*/
read_block_primary(keycache, block, keycache->key_cache_block_size,
read_length + offset);
}
else if (page_st == PAGE_TO_BE_READ)
{
/*
This is a new block in the cache. If we come here, we have
data for the whole block.
*/
DBUG_ASSERT(block->hash_link->requests);
DBUG_ASSERT(block->status & BLOCK_IN_USE);
DBUG_ASSERT((page_st == PAGE_TO_BE_READ) ||
(block->status & BLOCK_READ));
#if !defined(SERIALIZED_READ_FROM_CACHE)
keycache_pthread_mutex_unlock(&keycache->cache_lock);
/*
Here other threads may step in and register as secondary readers.
They will register in block->wqueue[COND_FOR_REQUESTED].
*/
#endif
/* Copy data from buff */
memcpy(block->buffer+offset, buff, (size_t) read_length);
#if !defined(SERIALIZED_READ_FROM_CACHE)
keycache_pthread_mutex_lock(&keycache->cache_lock);
DBUG_ASSERT(block->status & BLOCK_IN_USE);
DBUG_ASSERT((page_st == PAGE_TO_BE_READ) ||
(block->status & BLOCK_READ));
#endif
/*
After the data is in the buffer, we can declare the block
valid. Now other threads do not need to register as
secondary readers any more. They can immediately access the
block.
*/
block->status|= BLOCK_READ;
block->length= read_length+offset;
/*
Do not set block->offset here. If this block is marked
BLOCK_CHANGED later, we want to flush only the modified part. So
only a writer may set block->offset down from
keycache->key_cache_block_size.
*/
KEYCACHE_DBUG_PRINT("key_cache_insert",
("primary request: new page in cache"));
/* Signal all pending requests. */
release_whole_queue(&block->wqueue[COND_FOR_REQUESTED]);
}
else
{
/*
page_st == PAGE_READ. The block is in the buffer. All data
must already be present. Blocks are always read with all
data available on file. Assert that the block does not have
less contents than the preloader supplies. If the caller has
data beyond block->length, it means that a file write has
been done while this block was in cache and not extended
with the new data. If the condition is met, we can simply
ignore the block.
*/
DBUG_ASSERT((page_st == PAGE_READ) &&
(read_length + offset <= block->length));
}
/*
A secondary request must now have the block assigned to the
requested file block. It does not hurt to check it for primary
requests too.
*/
DBUG_ASSERT(block->hash_link->file == file);
DBUG_ASSERT(block->hash_link->diskpos == filepos);
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
} /* end of if (!(block->status & BLOCK_ERROR)) */
remove_reader(block);
/* Error injection for coverage testing. */
DBUG_EXECUTE_IF("key_cache_insert_block_error",
block->status|= BLOCK_ERROR; errno=EIO;);
/* Do not link erroneous blocks into the LRU ring, but free them. */
if (!(block->status & BLOCK_ERROR))
{
/*
Link the block into the LRU ring if it's the last submitted
request for the block. This enables eviction for the block.
*/
unreg_request(keycache, block, 1);
}
else
{
free_block(keycache, block);
error= 1;
break;
}
buff+= read_length;
filepos+= read_length+offset;
offset= 0;
} while ((length-= read_length));
no_key_cache:
if (locked_and_incremented)
dec_counter_for_resize_op(keycache);
keycache_pthread_mutex_unlock(&keycache->cache_lock);
}
DBUG_RETURN(error);
}
|
O0
|
c
|
simple_key_cache_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
jmp 0x745f7
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x748bd
movb $0x0, -0x45(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x65411(%rip), %rsi # 0xd9a2b
movl $0xbe2, %edx # imm = 0xBE2
callq 0x71ab0
movq -0x8(%rbp), %rax
cmpb $0x0, 0x3(%rax)
je 0x7463b
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x74640
jmp 0x7489e
movq -0x8(%rbp), %rdi
callq 0x71bd0
movb $0x1, -0x45(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0x3(%rax)
je 0x74679
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x7467e
jmp 0x7489e
movl -0x40(%rbp), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %ecx
subl -0x40(%rbp), %ecx
cmpl %ecx, %eax
jbe 0x746b2
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
subl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x746b4
jmp 0x746b6
jmp 0x746b8
movq -0x8(%rbp), %rax
movq 0x158(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x158(%rax)
movq -0x8(%rbp), %rax
movq 0x150(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x150(%rax)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
xorl %r8d, %r8d
leaq -0x44(%rbp), %r9
callq 0x71bf0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x7470e
jmp 0x7489e
movq -0x38(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x7481d
cmpl $0x2, -0x44(%rbp)
jne 0x7473f
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x72630
jmp 0x74736
jmp 0x74738
jmp 0x7473a
jmp 0x7480f
cmpl $0x1, -0x44(%rbp)
jne 0x74776
cmpl $0x0, -0x40(%rbp)
jne 0x74757
movl -0x3c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0x74776
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
movl -0x3c(%rbp), %ecx
addl -0x40(%rbp), %ecx
callq 0x72530
jmp 0x7480d
cmpl $0x1, -0x44(%rbp)
jne 0x74805
jmp 0x74782
jmp 0x74784
jmp 0x74786
jmp 0x74788
jmp 0x7478a
jmp 0x7478c
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0x724d0
movq -0x38(%rbp), %rax
movq 0x40(%rax), %rdi
movl -0x40(%rbp), %eax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
movl -0x3c(%rbp), %eax
movl %eax, %edx
callq 0x28290
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x65261(%rip), %rsi # 0xd9a2b
movl $0xc4b, %edx # imm = 0xC4B
callq 0x71ab0
jmp 0x747d6
jmp 0x747d8
jmp 0x747da
movq -0x38(%rbp), %rax
movl 0x50(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x50(%rax)
movl -0x3c(%rbp), %ecx
addl -0x40(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x4c(%rax)
jmp 0x747f6
movq -0x38(%rbp), %rdi
addq $0x28, %rdi
callq 0x738d0
jmp 0x7480b
jmp 0x74807
jmp 0x74809
jmp 0x7480b
jmp 0x7480d
jmp 0x7480f
jmp 0x74811
jmp 0x74813
jmp 0x74815
jmp 0x74817
jmp 0x74819
jmp 0x7481b
jmp 0x7481d
movq -0x38(%rbp), %rdi
callq 0x72670
jmp 0x74828
movq -0x38(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x7484b
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x1, %edx
callq 0x726d0
jmp 0x74861
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x72860
movl $0x1, -0x30(%rbp)
jmp 0x7489c
movl -0x3c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x3c(%rbp), %eax
addl -0x40(%rbp), %eax
movl %eax, %eax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x3c(%rbp), %ecx
movl -0x2c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x74662
jmp 0x7489e
cmpb $0x0, -0x45(%rbp)
je 0x748ad
movq -0x8(%rbp), %rdi
callq 0x729d0
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0x724d0
jmp 0x748bf
movl -0x30(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
|
simple_key_cache_insert:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_2C], r9d
mov [rbp+var_30], 0
jmp short $+2
loc_745F7:
mov rax, [rbp+var_8]
cmp byte ptr [rax], 0
jz loc_748BD
mov [rbp+var_45], 0
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0BE2h
call inline_mysql_mutex_lock_9
mov rax, [rbp+var_8]
cmp byte ptr [rax+3], 0
jz short loc_7463B
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+1]
cmp eax, 0
jz short loc_74640
loc_7463B:
jmp loc_7489E
loc_74640:
mov rdi, [rbp+var_8]
call inc_counter_for_resize_op
mov [rbp+var_45], 1
mov rax, [rbp+var_18]
mov rcx, [rbp+var_8]
mov ecx, [rcx+18h]
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_40], eax
loc_74662:
mov rax, [rbp+var_8]
cmp byte ptr [rax+3], 0
jz short loc_74679
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+1]
cmp eax, 0
jz short loc_7467E
loc_74679:
jmp loc_7489E
loc_7467E:
mov eax, [rbp+var_40]
mov ecx, eax
mov rax, [rbp+var_18]
sub rax, rcx
mov [rbp+var_18], rax
mov eax, [rbp+var_2C]
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_8]
mov ecx, [rcx+18h]
sub ecx, [rbp+var_40]
cmp eax, ecx
jbe short loc_746B2
mov rax, [rbp+var_8]
mov eax, [rax+18h]
sub eax, [rbp+var_40]
mov [rbp+var_3C], eax
loc_746B2:
jmp short $+2
loc_746B4:
jmp short $+2
loc_746B6:
jmp short $+2
loc_746B8:
mov rax, [rbp+var_8]
mov rcx, [rax+158h]
add rcx, 1
mov [rax+158h], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+150h]
add rcx, 1
mov [rax+150h], rcx
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_1C]
xor r8d, r8d
lea r9, [rbp+var_44]
call find_key_block
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_7470E
jmp loc_7489E
loc_7470E:
mov rax, [rbp+var_38]
mov eax, [rax+50h]
and eax, 1
cmp eax, 0
jnz loc_7481D
cmp [rbp+var_44], 2
jnz short loc_7473F
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_38]
call read_block_secondary
jmp short $+2
loc_74736:
jmp short $+2
loc_74738:
jmp short $+2
loc_7473A:
jmp loc_7480F
loc_7473F:
cmp [rbp+var_44], 1
jnz short loc_74776
cmp [rbp+var_40], 0
jnz short loc_74757
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_8]
cmp eax, [rcx+18h]
jnb short loc_74776
loc_74757:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_8]
mov edx, [rax+18h]
mov ecx, [rbp+var_3C]
add ecx, [rbp+var_40]
call read_block_primary
jmp loc_7480D
loc_74776:
cmp [rbp+var_44], 1
jnz loc_74805
jmp short $+2
loc_74782:
jmp short $+2
loc_74784:
jmp short $+2
loc_74786:
jmp short $+2
loc_74788:
jmp short $+2
loc_7478A:
jmp short $+2
loc_7478C:
mov rdi, [rbp+var_8]
add rdi, 0C0h
call inline_mysql_mutex_unlock_9
mov rax, [rbp+var_38]
mov rdi, [rax+40h]
mov eax, [rbp+var_40]
add rdi, rax
mov rsi, [rbp+var_28]
mov eax, [rbp+var_3C]
mov edx, eax
call _memcpy
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0C4Bh
call inline_mysql_mutex_lock_9
jmp short $+2
loc_747D6:
jmp short $+2
loc_747D8:
jmp short $+2
loc_747DA:
mov rax, [rbp+var_38]
mov ecx, [rax+50h]
or ecx, 2
mov [rax+50h], ecx
mov ecx, [rbp+var_3C]
add ecx, [rbp+var_40]
mov rax, [rbp+var_38]
mov [rax+4Ch], ecx
jmp short $+2
loc_747F6:
mov rdi, [rbp+var_38]
add rdi, 28h ; '('
call release_whole_queue
jmp short loc_7480B
loc_74805:
jmp short $+2
loc_74807:
jmp short $+2
loc_74809:
jmp short $+2
loc_7480B:
jmp short $+2
loc_7480D:
jmp short $+2
loc_7480F:
jmp short $+2
loc_74811:
jmp short $+2
loc_74813:
jmp short $+2
loc_74815:
jmp short $+2
loc_74817:
jmp short $+2
loc_74819:
jmp short $+2
loc_7481B:
jmp short $+2
loc_7481D:
mov rdi, [rbp+var_38]
call remove_reader
jmp short $+2
loc_74828:
mov rax, [rbp+var_38]
mov eax, [rax+50h]
and eax, 1
cmp eax, 0
jnz short loc_7484B
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_38]
mov edx, 1
call unreg_request
jmp short loc_74861
loc_7484B:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_38]
call free_block
mov [rbp+var_30], 1
jmp short loc_7489C
loc_74861:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_28]
mov ecx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov eax, [rbp+var_3C]
add eax, [rbp+var_40]
mov eax, eax
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov [rbp+var_40], 0
mov ecx, [rbp+var_3C]
mov eax, [rbp+var_2C]
sub eax, ecx
mov [rbp+var_2C], eax
cmp eax, 0
jnz loc_74662
loc_7489C:
jmp short $+2
loc_7489E:
cmp [rbp+var_45], 0
jz short loc_748AD
mov rdi, [rbp+var_8]
call dec_counter_for_resize_op
loc_748AD:
mov rdi, [rbp+var_8]
add rdi, 0C0h
call inline_mysql_mutex_unlock_9
loc_748BD:
jmp short $+2
loc_748BF:
mov eax, [rbp+var_30]
mov [rbp+var_4C], eax
mov eax, [rbp+var_4C]
add rsp, 50h
pop rbp
retn
|
long long simple_key_cache_insert(
_QWORD *a1,
unsigned int a2,
unsigned long long a3,
int a4,
long long a5,
unsigned int a6)
{
char v7; // [rsp+Bh] [rbp-45h]
int v8; // [rsp+Ch] [rbp-44h] BYREF
unsigned int v9; // [rsp+10h] [rbp-40h]
unsigned int v10; // [rsp+14h] [rbp-3Ch]
long long key_block; // [rsp+18h] [rbp-38h]
unsigned int v12; // [rsp+20h] [rbp-30h]
unsigned int v13; // [rsp+24h] [rbp-2Ch]
long long v14; // [rsp+28h] [rbp-28h]
int v15; // [rsp+34h] [rbp-1Ch]
unsigned long long v16; // [rsp+38h] [rbp-18h]
unsigned int v17; // [rsp+44h] [rbp-Ch]
_QWORD *v18; // [rsp+48h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = a5;
v13 = a6;
v12 = 0;
if ( *(_BYTE *)a1 )
{
v7 = 0;
inline_mysql_mutex_lock_9(
(long long)(v18 + 24),
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xBE2u);
if ( *((_BYTE *)v18 + 3) && !*((_BYTE *)v18 + 1) )
{
inc_counter_for_resize_op((long long)v18);
v7 = 1;
v9 = v16 % *((unsigned int *)v18 + 6);
do
{
if ( !*((_BYTE *)v18 + 3) || *((_BYTE *)v18 + 1) )
break;
v16 -= v9;
v10 = v13;
if ( v13 > *((_DWORD *)v18 + 6) - v9 )
v10 = *((_DWORD *)v18 + 6) - v9;
++v18[43];
++v18[42];
key_block = find_key_block((long long)v18, v17, v16, v15, 0, &v8);
if ( !key_block )
break;
if ( (*(_DWORD *)(key_block + 80) & 1) == 0 )
{
if ( v8 == 2 )
{
read_block_secondary((long long)v18, key_block);
}
else if ( v8 == 1 && (v9 || v10 < *((_DWORD *)v18 + 6)) )
{
read_block_primary((long long)v18, key_block, *((_DWORD *)v18 + 6), v9 + v10);
}
else if ( v8 == 1 )
{
inline_mysql_mutex_unlock_9((long long)(v18 + 24));
memcpy(v9 + *(_QWORD *)(key_block + 64), v14, v10);
inline_mysql_mutex_lock_9(
(long long)(v18 + 24),
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xC4Bu);
*(_DWORD *)(key_block + 80) |= 2u;
*(_DWORD *)(key_block + 76) = v9 + v10;
release_whole_queue((_QWORD *)(key_block + 40));
}
}
remove_reader(key_block);
if ( (*(_DWORD *)(key_block + 80) & 1) != 0 )
{
free_block((long long)v18, key_block);
v12 = 1;
break;
}
unreg_request(v18, key_block, 1);
v14 += v10;
v16 += v9 + v10;
v9 = 0;
v13 -= v10;
}
while ( v13 );
}
if ( v7 )
dec_counter_for_resize_op((long long)v18);
inline_mysql_mutex_unlock_9((long long)(v18 + 24));
}
return v12;
}
|
simple_key_cache_insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x2c],R9D
MOV dword ptr [RBP + -0x30],0x0
JMP 0x001745f7
LAB_001745f7:
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX],0x0
JZ 0x001748bd
MOV byte ptr [RBP + -0x45],0x0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RSI,[0x1d9a2b]
MOV EDX,0xbe2
CALL 0x00171ab0
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x3],0x0
JZ 0x0017463b
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x0
JZ 0x00174640
LAB_0017463b:
JMP 0x0017489e
LAB_00174640:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00171bd0
MOV byte ptr [RBP + -0x45],0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x18]
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x40],EAX
LAB_00174662:
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x3],0x0
JZ 0x00174679
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x0
JZ 0x0017467e
LAB_00174679:
JMP 0x0017489e
LAB_0017467e:
MOV EAX,dword ptr [RBP + -0x40]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x18]
SUB ECX,dword ptr [RBP + -0x40]
CMP EAX,ECX
JBE 0x001746b2
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x18]
SUB EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x3c],EAX
LAB_001746b2:
JMP 0x001746b4
LAB_001746b4:
JMP 0x001746b6
LAB_001746b6:
JMP 0x001746b8
LAB_001746b8:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x158]
ADD RCX,0x1
MOV qword ptr [RAX + 0x158],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x150]
ADD RCX,0x1
MOV qword ptr [RAX + 0x150],RCX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
XOR R8D,R8D
LEA R9,[RBP + -0x44]
CALL 0x00171bf0
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0017470e
JMP 0x0017489e
LAB_0017470e:
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x50]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x0017481d
CMP dword ptr [RBP + -0x44],0x2
JNZ 0x0017473f
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x00172630
JMP 0x00174736
LAB_00174736:
JMP 0x00174738
LAB_00174738:
JMP 0x0017473a
LAB_0017473a:
JMP 0x0017480f
LAB_0017473f:
CMP dword ptr [RBP + -0x44],0x1
JNZ 0x00174776
CMP dword ptr [RBP + -0x40],0x0
JNZ 0x00174757
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x18]
JNC 0x00174776
LAB_00174757:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0x18]
MOV ECX,dword ptr [RBP + -0x3c]
ADD ECX,dword ptr [RBP + -0x40]
CALL 0x00172530
JMP 0x0017480d
LAB_00174776:
CMP dword ptr [RBP + -0x44],0x1
JNZ 0x00174805
JMP 0x00174782
LAB_00174782:
JMP 0x00174784
LAB_00174784:
JMP 0x00174786
LAB_00174786:
JMP 0x00174788
LAB_00174788:
JMP 0x0017478a
LAB_0017478a:
JMP 0x0017478c
LAB_0017478c:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
CALL 0x001724d0
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x40]
MOV EAX,dword ptr [RBP + -0x40]
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x3c]
MOV EDX,EAX
CALL 0x00128290
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RSI,[0x1d9a2b]
MOV EDX,0xc4b
CALL 0x00171ab0
JMP 0x001747d6
LAB_001747d6:
JMP 0x001747d8
LAB_001747d8:
JMP 0x001747da
LAB_001747da:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x50]
OR ECX,0x2
MOV dword ptr [RAX + 0x50],ECX
MOV ECX,dword ptr [RBP + -0x3c]
ADD ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x4c],ECX
JMP 0x001747f6
LAB_001747f6:
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x28
CALL 0x001738d0
JMP 0x0017480b
LAB_00174805:
JMP 0x00174807
LAB_00174807:
JMP 0x00174809
LAB_00174809:
JMP 0x0017480b
LAB_0017480b:
JMP 0x0017480d
LAB_0017480d:
JMP 0x0017480f
LAB_0017480f:
JMP 0x00174811
LAB_00174811:
JMP 0x00174813
LAB_00174813:
JMP 0x00174815
LAB_00174815:
JMP 0x00174817
LAB_00174817:
JMP 0x00174819
LAB_00174819:
JMP 0x0017481b
LAB_0017481b:
JMP 0x0017481d
LAB_0017481d:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00172670
JMP 0x00174828
LAB_00174828:
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x50]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x0017484b
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,0x1
CALL 0x001726d0
JMP 0x00174861
LAB_0017484b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x00172860
MOV dword ptr [RBP + -0x30],0x1
JMP 0x0017489c
LAB_00174861:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,dword ptr [RBP + -0x40]
MOV EAX,EAX
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x40],0x0
MOV ECX,dword ptr [RBP + -0x3c]
MOV EAX,dword ptr [RBP + -0x2c]
SUB EAX,ECX
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x00174662
LAB_0017489c:
JMP 0x0017489e
LAB_0017489e:
CMP byte ptr [RBP + -0x45],0x0
JZ 0x001748ad
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001729d0
LAB_001748ad:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
CALL 0x001724d0
LAB_001748bd:
JMP 0x001748bf
LAB_001748bf:
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4c],EAX
MOV EAX,dword ptr [RBP + -0x4c]
ADD RSP,0x50
POP RBP
RET
|
int4
simple_key_cache_insert
(char *param_1,int4 param_2,ulong param_3,int4 param_4,void *param_5,
uint param_6)
{
bool bVar1;
int local_4c;
uint local_48;
uint local_44;
long local_40;
int4 local_38;
uint local_34;
void *local_30;
int4 local_24;
ulong local_20;
int4 local_14;
char *local_10;
local_38 = 0;
if (*param_1 != '\0') {
bVar1 = false;
local_34 = param_6;
local_30 = param_5;
local_24 = param_4;
local_20 = param_3;
local_14 = param_2;
local_10 = param_1;
inline_mysql_mutex_lock
(param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xbe2);
if ((local_10[3] != '\0') && (local_10[1] == '\0')) {
inc_counter_for_resize_op(local_10);
bVar1 = true;
local_48 = (uint)(local_20 % (ulong)*(uint *)(local_10 + 0x18));
do {
if ((local_10[3] == '\0') || (local_10[1] != '\0')) break;
local_20 = local_20 - local_48;
local_44 = local_34;
if (*(int *)(local_10 + 0x18) - local_48 < local_34) {
local_44 = *(int *)(local_10 + 0x18) - local_48;
}
*(long *)(local_10 + 0x158) = *(long *)(local_10 + 0x158) + 1;
*(long *)(local_10 + 0x150) = *(long *)(local_10 + 0x150) + 1;
local_40 = find_key_block(local_10,local_14,local_20,local_24,0,&local_4c);
if (local_40 == 0) break;
if ((*(uint *)(local_40 + 0x50) & 1) == 0) {
if (local_4c == 2) {
read_block_secondary(local_10,local_40);
}
else if ((local_4c == 1) && ((local_48 != 0 || (local_44 < *(uint *)(local_10 + 0x18)))))
{
read_block_primary(local_10,local_40,*(int4 *)(local_10 + 0x18),
local_44 + local_48);
}
else if (local_4c == 1) {
inline_mysql_mutex_unlock(local_10 + 0xc0);
memcpy((void *)(*(long *)(local_40 + 0x40) + (ulong)local_48),local_30,(ulong)local_44);
inline_mysql_mutex_lock
(local_10 + 0xc0,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xc4b);
*(uint *)(local_40 + 0x50) = *(uint *)(local_40 + 0x50) | 2;
*(uint *)(local_40 + 0x4c) = local_44 + local_48;
release_whole_queue(local_40 + 0x28);
}
}
remove_reader(local_40);
if ((*(uint *)(local_40 + 0x50) & 1) != 0) {
free_block(local_10,local_40);
local_38 = 1;
break;
}
unreg_request(local_10,local_40,1);
local_30 = (void *)((long)local_30 + (ulong)local_44);
local_20 = (local_44 + local_48) + local_20;
local_48 = 0;
local_34 = local_34 - local_44;
} while (local_34 != 0);
}
if (bVar1) {
dec_counter_for_resize_op(local_10);
}
inline_mysql_mutex_unlock(local_10 + 0xc0);
}
return local_38;
}
|
|
59,866
|
mysql_list_fields_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_list_fields_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_list_fields,
(parms->mysql, parms->table, parms->wild),
parms->mysql,
MYSQL_RES *,
r_ptr)
}
|
O0
|
c
|
mysql_list_fields_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x44030
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mysql_list_fields_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
mov rax, [rbp+var_10]
mov rdx, [rax+10h]
call mysql_list_fields
mov [rbp+var_18], rax
mov rcx, [rbp+var_18]
mov rax, [rbp+var_20]
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
long long mysql_list_fields_start_internal(long long a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
*(_QWORD *)(v2 + 8) = mysql_list_fields(*(_QWORD *)a1, *(const char **)(a1 + 8), *(const char **)(a1 + 16));
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_list_fields_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x10]
CALL 0x00144030
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_list_fields_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_list_fields(*param_1,param_1[1],param_1[2]);
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
59,867
|
set_setup_object_key(PFS_setup_object_key*, enum_object_type, char const*, unsigned int, char const*, unsigned int)
|
eloqsql/storage/perfschema/pfs_setup_object.cc
|
static void set_setup_object_key(PFS_setup_object_key *key,
enum_object_type object_type,
const char *schema, uint schema_length,
const char *object, uint object_length)
{
assert(schema_length <= NAME_LEN);
assert(object_length <= NAME_LEN);
char *ptr= &key->m_hash_key[0];
ptr[0]= (char) object_type;
ptr++;
if (schema_length)
{
memcpy(ptr, schema, schema_length);
ptr+= schema_length;
}
ptr[0]= 0;
ptr++;
if (object_length)
{
memcpy(ptr, object, object_length);
ptr+= object_length;
}
ptr[0]= 0;
ptr++;
key->m_key_length= (uint)(ptr - &key->m_hash_key[0]);
}
|
O0
|
cpp
|
set_setup_object_key(PFS_setup_object_key*, enum_object_type, char const*, unsigned int, char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0xc(%rbp), %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x49275
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %eax
movl %eax, %edx
callq 0x26280
movl -0x1c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x492b0
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %edx
callq 0x26280
movl -0x2c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x184(%rax)
addq $0x40, %rsp
popq %rbp
retq
|
_ZL20set_setup_object_keyP20PFS_setup_object_key16enum_object_typePKcjS3_j:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_2C], r9d
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
mov eax, [rbp+var_C]
mov cl, al
mov rax, [rbp+var_38]
mov [rax], cl
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
cmp [rbp+var_1C], 0
jz short loc_49275
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_18]
mov eax, [rbp+var_1C]
mov edx, eax
call _memcpy
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_38]
mov ecx, ecx
add rax, rcx
mov [rbp+var_38], rax
loc_49275:
mov rax, [rbp+var_38]
mov byte ptr [rax], 0
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
cmp [rbp+var_2C], 0
jz short loc_492B0
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_28]
mov eax, [rbp+var_2C]
mov edx, eax
call _memcpy
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_38]
mov ecx, ecx
add rax, rcx
mov [rbp+var_38], rax
loc_492B0:
mov rax, [rbp+var_38]
mov byte ptr [rax], 0
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+184h], ecx
add rsp, 40h
pop rbp
retn
|
long long set_setup_object_key(long long a1, char a2, long long a3, unsigned int a4, long long a5, unsigned int a6)
{
long long result; // rax
_BYTE *v7; // [rsp+8h] [rbp-38h]
_BYTE *v8; // [rsp+8h] [rbp-38h]
*(_BYTE *)a1 = a2;
v7 = (_BYTE *)(a1 + 1);
if ( a4 )
{
memcpy(v7, a3, a4);
v7 += a4;
}
*v7 = 0;
v8 = v7 + 1;
if ( a6 )
{
memcpy(v8, a5, a6);
v8 += a6;
}
*v8 = 0;
result = a1;
*(_DWORD *)(a1 + 388) = (_DWORD)v8 + 1 - a1;
return result;
}
|
set_setup_object_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x2c],R9D
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0xc]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00149275
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x1c]
MOV EDX,EAX
CALL 0x00126280
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_00149275:
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x001492b0
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x2c]
MOV EDX,EAX
CALL 0x00126280
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001492b0:
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x184],ECX
ADD RSP,0x40
POP RBP
RET
|
/* set_setup_object_key(PFS_setup_object_key*, enum_object_type, char const*, unsigned int, char
const*, unsigned int) */
void set_setup_object_key
(int1 *param_1,int1 param_2,void *param_3,uint param_4,void *param_5,
uint param_6)
{
int1 *local_40;
*param_1 = param_2;
local_40 = param_1 + 1;
if (param_4 != 0) {
memcpy(local_40,param_3,(ulong)param_4);
local_40 = local_40 + param_4;
}
*local_40 = 0;
local_40 = local_40 + 1;
if (param_6 != 0) {
memcpy(local_40,param_5,(ulong)param_6);
local_40 = local_40 + param_6;
}
*local_40 = 0;
*(int *)(param_1 + 0x184) = ((int)local_40 + 1) - (int)param_1;
return;
}
|
|
59,868
|
JS_NumberIsInteger
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_NumberIsInteger(JSContext *ctx, JSValue val)
{
double d;
if (!JS_IsNumber(val))
return FALSE;
if (unlikely(JS_ToFloat64(ctx, &d, val)))
return -1;
return isfinite(d) && floor(d) == d;
}
|
O0
|
c
|
JS_NumberIsInteger:
subq $0x38, %rsp
movq %rsi, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq %rdi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x506d0
cmpl $0x0, %eax
jne 0x36824
movl $0x0, 0x34(%rsp)
jmp 0x368bd
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
leaq 0x10(%rsp), %rsi
callq 0x38580
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3685e
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x368bd
movsd 0x10(%rsp), %xmm0
movq %xmm0, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq %rcx, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
subq %rcx, %rax
setl %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0xf(%rsp)
jne 0x36893
jmp 0x368b0
movsd 0x10(%rsp), %xmm0
callq 0xe850
ucomisd 0x10(%rsp), %xmm0
sete %al
setnp %cl
andb %cl, %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_NumberIsInteger:
sub rsp, 38h
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_10], rdx
mov [rsp+38h+var_20], rdi
mov rdi, [rsp+38h+var_18]
mov rsi, [rsp+38h+var_10]
call JS_IsNumber
cmp eax, 0
jnz short loc_36824
mov [rsp+38h+var_4], 0
jmp loc_368BD
loc_36824:
mov rdi, [rsp+38h+var_20]
mov rdx, [rsp+38h+var_18]
mov rcx, [rsp+38h+var_10]
lea rsi, [rsp+38h+var_28]
call JS_ToFloat64
cmp eax, 0
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_3685E
mov [rsp+38h+var_4], 0FFFFFFFFh
jmp short loc_368BD
loc_3685E:
movsd xmm0, [rsp+38h+var_28]
movq rax, xmm0
mov rcx, 7FFFFFFFFFFFFFFFh
and rax, rcx
mov rcx, 7FF0000000000000h
sub rax, rcx
setl cl
xor eax, eax
test cl, 1
mov [rsp+38h+var_29], al
jnz short loc_36893
jmp short loc_368B0
loc_36893:
movsd xmm0, [rsp+38h+var_28]
call _floor
ucomisd xmm0, [rsp+38h+var_28]
setz al
setnp cl
and al, cl
mov [rsp+38h+var_29], al
loc_368B0:
mov al, [rsp+38h+var_29]
and al, 1
movzx eax, al
mov [rsp+38h+var_4], eax
loc_368BD:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
|
long long JS_NumberIsInteger(long long a1, long long a2, long long a3)
{
double v3; // xmm0_8
bool v5; // [rsp+Fh] [rbp-29h]
double v6; // [rsp+10h] [rbp-28h] BYREF
long long v7; // [rsp+18h] [rbp-20h]
long long v8; // [rsp+20h] [rbp-18h]
long long v9; // [rsp+28h] [rbp-10h]
v8 = a2;
v9 = a3;
v7 = a1;
if ( (unsigned int)JS_IsNumber(a2, a3) )
{
if ( (unsigned int)JS_ToFloat64(v7, &v6, v8, v9) )
{
return (unsigned int)-1;
}
else
{
v5 = 0;
if ( (*(_QWORD *)&v6 & 0x7FFFFFFFFFFFFFFFuLL) < 0x7FF0000000000000LL )
{
v3 = floor(v6);
return v3 == v6;
}
return v5;
}
}
else
{
return 0;
}
}
|
JS_NumberIsInteger:
SUB RSP,0x38
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x28],RDX
MOV qword ptr [RSP + 0x18],RDI
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001506d0
CMP EAX,0x0
JNZ 0x00136824
MOV dword ptr [RSP + 0x34],0x0
JMP 0x001368bd
LAB_00136824:
MOV RDI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x10]
CALL 0x00138580
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0013685e
MOV dword ptr [RSP + 0x34],0xffffffff
JMP 0x001368bd
LAB_0013685e:
MOVSD XMM0,qword ptr [RSP + 0x10]
MOVQ RAX,XMM0
MOV RCX,0x7fffffffffffffff
AND RAX,RCX
MOV RCX,0x7ff0000000000000
SUB RAX,RCX
SETL CL
XOR EAX,EAX
TEST CL,0x1
MOV byte ptr [RSP + 0xf],AL
JNZ 0x00136893
JMP 0x001368b0
LAB_00136893:
MOVSD XMM0,qword ptr [RSP + 0x10]
CALL 0x0010e850
UCOMISD XMM0,qword ptr [RSP + 0x10]
SETZ AL
SETNP CL
AND AL,CL
MOV byte ptr [RSP + 0xf],AL
LAB_001368b0:
MOV AL,byte ptr [RSP + 0xf]
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RSP + 0x34],EAX
LAB_001368bd:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
uint JS_NumberIsInteger(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
double dVar2;
bool local_29;
double local_28;
int8 local_20;
int8 local_18;
int8 local_10;
uint local_4;
local_20 = param_1;
local_18 = param_2;
local_10 = param_3;
iVar1 = JS_IsNumber(param_2,param_3);
if (iVar1 == 0) {
local_4 = 0;
}
else {
iVar1 = JS_ToFloat64(local_20,&local_28,local_18,local_10);
if (iVar1 == 0) {
local_29 = false;
if ((ulong)ABS(local_28) < 0x7ff0000000000000) {
dVar2 = floor(local_28);
local_29 = dVar2 == local_28;
}
local_4 = (uint)local_29;
}
else {
local_4 = 0xffffffff;
}
}
return local_4;
}
|
|
59,869
|
JS_NumberIsInteger
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_NumberIsInteger(JSContext *ctx, JSValue val)
{
double d;
if (!JS_IsNumber(val))
return FALSE;
if (unlikely(JS_ToFloat64(ctx, &d, val)))
return -1;
return isfinite(d) && floor(d) == d;
}
|
O3
|
c
|
JS_NumberIsInteger:
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rcx
movq %rsi, %rdx
xorl %ebx, %ebx
cmpl $0x7, %ecx
je 0xfc25
testl %ecx, %ecx
jne 0xfc81
cmpl $0x2, %ecx
ja 0xfc30
cvtsi2sd %edx, %xmm0
jmp 0xfc50
cmpl $0x7, %ecx
jne 0xfc3c
movq %rdx, %xmm0
jmp 0xfc50
leaq 0x8(%rsp), %rsi
callq 0x3f579
testl %eax, %eax
jne 0xfc89
movq 0x8(%rsp), %xmm0
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rcx, %rax
jg 0xfc81
movq %xmm0, (%rsp)
callq 0xe860
cmpeqsd (%rsp), %xmm0
movq %xmm0, %rbx
andl $0x1, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
pushq $-0x1
popq %rbx
jmp 0xfc81
|
JS_NumberIsInteger:
push rbx
sub rsp, 10h
mov rcx, rdx
mov rdx, rsi
xor ebx, ebx
cmp ecx, 7
jz short loc_FC25
test ecx, ecx
jnz short loc_FC81
loc_FC25:
cmp ecx, 2
ja short loc_FC30
cvtsi2sd xmm0, edx
jmp short loc_FC50
loc_FC30:
cmp ecx, 7
jnz short loc_FC3C
movq xmm0, rdx
jmp short loc_FC50
loc_FC3C:
lea rsi, [rsp+18h+var_10]
call __JS_ToFloat64Free
test eax, eax
jnz short loc_FC89
movq xmm0, [rsp+18h+var_10]
loc_FC50:
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FEFFFFFFFFFFFFFh
cmp rax, rcx
jg short loc_FC81
movq [rsp+18h+var_18], xmm0
call _floor
cmpeqsd xmm0, [rsp+18h+var_18]
movq rbx, xmm0
and ebx, 1
loc_FC81:
mov eax, ebx
add rsp, 10h
pop rbx
retn
loc_FC89:
push 0FFFFFFFFFFFFFFFFh
pop rbx
jmp short loc_FC81
|
long long JS_NumberIsInteger(__m128d a1, long long a2, unsigned long long a3, unsigned int a4)
{
unsigned int v4; // ebx
__m128d v5; // rt1
double v7; // [rsp+0h] [rbp-18h]
v4 = 0;
if ( a4 == 7 || !a4 )
{
if ( a4 > 2 )
a1 = (__m128d)a3;
else
a1.m128d_f64[0] = (double)(int)a3;
if ( (*(_QWORD *)&a1.m128d_f64[0] & 0x7FFFFFFFFFFFFFFFuLL) <= 0x7FEFFFFFFFFFFFFFLL )
{
v7 = a1.m128d_f64[0];
a1.m128d_f64[0] = floor(a1.m128d_f64[0]);
v5.m128d_f64[0] = v7;
return *(_OWORD *)&_mm_cmpeq_sd(a1, v5) & 1;
}
}
return v4;
}
|
JS_NumberIsInteger:
PUSH RBX
SUB RSP,0x10
MOV RCX,RDX
MOV RDX,RSI
XOR EBX,EBX
CMP ECX,0x7
JZ 0x0010fc25
TEST ECX,ECX
JNZ 0x0010fc81
LAB_0010fc25:
CMP ECX,0x2
JA 0x0010fc30
CVTSI2SD XMM0,EDX
JMP 0x0010fc50
LAB_0010fc30:
CMP ECX,0x7
JNZ 0x0010fc3c
MOVQ XMM0,RDX
JMP 0x0010fc50
LAB_0010fc3c:
LEA RSI,[RSP + 0x8]
CALL 0x0013f579
TEST EAX,EAX
JNZ 0x0010fc89
MOVQ XMM0,qword ptr [RSP + 0x8]
LAB_0010fc50:
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7fefffffffffffff
CMP RAX,RCX
JG 0x0010fc81
MOVQ qword ptr [RSP],XMM0
CALL 0x0010e860
CMPEQSD XMM0,qword ptr [RSP]
MOVQ RBX,XMM0
AND EBX,0x1
LAB_0010fc81:
MOV EAX,EBX
ADD RSP,0x10
POP RBX
RET
LAB_0010fc89:
PUSH -0x1
POP RBX
JMP 0x0010fc81
|
uint JS_NumberIsInteger(int8 param_1,double param_2,uint param_3)
{
int iVar1;
uint uVar2;
double dVar3;
double local_10;
uVar2 = 0;
if ((param_3 == 7) || (param_3 == 0)) {
if (param_3 < 3) {
param_2 = (double)SUB84(param_2,0);
}
else if ((param_3 != 7) &&
(iVar1 = __JS_ToFloat64Free(param_1,&local_10), param_2 = local_10, iVar1 != 0)) {
return 0xffffffff;
}
if ((ulong)ABS(param_2) < 0x7ff0000000000000) {
dVar3 = floor(param_2);
uVar2 = -(uint)(dVar3 == param_2) & 1;
}
}
return uVar2;
}
|
|
59,870
|
common_log::add(ggml_log_level, char const*, __va_list_tag*)
|
monkey531[P]llama/common/log.cpp
|
void add(enum ggml_log_level level, const char * fmt, va_list args) {
std::lock_guard<std::mutex> lock(mtx);
if (!running) {
// discard messages while the worker thread is paused
return;
}
auto & entry = entries[tail];
{
// cannot use args twice, so make a copy in case we need to expand the buffer
va_list args_copy;
va_copy(args_copy, args);
#if 1
const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args);
if (n >= entry.msg.size()) {
entry.msg.resize(n + 1);
vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args_copy);
}
#else
// hack for bolding arguments
std::stringstream ss;
for (int i = 0; fmt[i] != 0; i++) {
if (fmt[i] == '%') {
ss << LOG_COL_BOLD;
while (fmt[i] != ' ' && fmt[i] != ')' && fmt[i] != ']' && fmt[i] != 0) ss << fmt[i++];
ss << LOG_COL_DEFAULT;
if (fmt[i] == 0) break;
}
ss << fmt[i];
}
const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args);
if (n >= entry.msg.size()) {
entry.msg.resize(n + 1);
vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args_copy);
}
#endif
va_end(args_copy);
}
entry.level = level;
entry.prefix = prefix;
entry.timestamp = 0;
if (timestamps) {
entry.timestamp = t_us() - t_start;
}
entry.is_end = false;
tail = (tail + 1) % entries.size();
if (tail == head) {
// expand the buffer
std::vector<common_log_entry> new_entries(2*entries.size());
size_t new_tail = 0;
do {
new_entries[new_tail] = std::move(entries[head]);
head = (head + 1) % entries.size();
new_tail = (new_tail + 1);
} while (head != tail);
head = 0;
tail = new_tail;
for (size_t i = tail; i < new_entries.size(); i++) {
new_entries[i].msg.resize(256);
}
entries = std::move(new_entries);
}
cv.notify_one();
}
|
O3
|
cpp
|
common_log::add(ggml_log_level, char const*, __va_list_tag*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x1bcc0
testl %eax, %eax
jne 0xcca3e
cmpb $0x1, 0x6a(%rbx)
jne 0xcca27
movl %ebp, 0xc(%rsp)
movq 0x78(%rbx), %r13
movq 0x98(%rbx), %rax
leaq (%rax,%rax,2), %rbp
shlq $0x4, %rbp
movq %r13, %r12
addq %rbp, %r12
movq 0x10(%r15), %rax
movq %rax, 0x40(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x10(%r13,%rbp), %rdi
movq 0x18(%r13,%rbp), %rsi
subq %rdi, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x1c198
movslq %eax, %rsi
movq 0x18(%r13,%rbp), %rax
subq 0x10(%r13,%rbp), %rax
cmpq %rsi, %rax
ja 0xcc826
leaq 0x10(,%rbp), %rdi
addq %r13, %rdi
incq %rsi
callq 0x7f060
movq 0x10(%r12), %rdi
movq 0x18(%r12), %rsi
subq %rdi, %rsi
leaq 0x30(%rsp), %rcx
movq %r14, %rdx
callq 0x1c198
movl 0xc(%rsp), %eax
movl %eax, (%r12)
movb 0x68(%rbx), %al
movb %al, 0x4(%r12)
movq $0x0, 0x8(%r12)
cmpb $0x1, 0x69(%rbx)
jne 0xcc86e
callq 0x1b090
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
subq 0x70(%rbx), %rdx
movq %rdx, 0x8(%r12)
movb $0x0, 0x28(%r12)
movq 0x80(%rbx), %rsi
movq 0x98(%rbx), %rax
incq %rax
subq 0x78(%rbx), %rsi
sarq $0x4, %rsi
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r14, %rsi
xorl %edx, %edx
divq %rsi
movq %rdx, 0x98(%rbx)
cmpq 0x90(%rbx), %rdx
jne 0xcca1e
addq %rsi, %rsi
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %rbx, (%rsp)
callq 0xcd4b0
movq 0x78(%rbx), %rcx
movq 0x90(%rbx), %rdx
movl $0x10, %r12d
xorl %ebp, %ebp
xorl %r13d, %r13d
leaq (%rdx,%rdx,2), %rax
shlq $0x4, %rax
movq 0x10(%rsp), %r15
movq %r14, %rbx
leaq (%rcx,%rax), %r14
addq $0x10, %r14
movups -0x10(%r14), %xmm0
movups %xmm0, (%r15,%rbp)
leaq (%r15,%r12), %rdi
movq %r14, %rsi
callq 0xcd52e
movb 0x18(%r14), %al
movq %rbx, %r14
movq (%rsp), %rbx
movb %al, 0x28(%r15,%rbp)
movq 0x90(%rbx), %rax
incq %rax
movq 0x78(%rbx), %rcx
movq 0x80(%rbx), %rsi
movq %rsi, %rdi
subq %rcx, %rdi
sarq $0x4, %rdi
imulq %r14, %rdi
xorl %edx, %edx
divq %rdi
movq %rdx, 0x90(%rbx)
incq %r13
addq $0x30, %r12
addq $0x30, %rbp
cmpq 0x98(%rbx), %rdx
jne 0xcc8e0
movq $0x0, 0x90(%rbx)
movq %r13, 0x98(%rbx)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
imulq %r14, %rdx
cmpq %rdx, %r13
jae 0xcc9d0
addq %r12, %rdi
movl $0x100, %esi # imm = 0x100
callq 0x7f060
incq %r13
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, %rcx
subq %rdi, %rcx
sarq $0x4, %rcx
imulq %r14, %rcx
addq $0x30, %r12
cmpq %rcx, %r13
jb 0xcc994
movq 0x78(%rbx), %rcx
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
movq %rdi, 0x78(%rbx)
movq %rax, 0x80(%rbx)
leaq 0x10(%rsp), %r14
movq 0x10(%r14), %rax
movq %rax, 0x88(%rbx)
leaq 0x30(%rsp), %rdi
movq %rcx, (%rdi)
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
callq 0xccd26
movq %r14, %rdi
callq 0xccd26
leaq 0x30(%rbx), %rdi
callq 0x1b450
movq %rbx, %rdi
callq 0x1b6a0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x1b5d0
jmp 0xcca4b
movq %rbx, (%rsp)
movq %rax, %r14
jmp 0xcca5d
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0xccd26
movq (%rsp), %rdi
callq 0x1b6a0
movq %r14, %rdi
callq 0x1bf90
|
_ZN10common_log3addE14ggml_log_levelPKcP13__va_list_tag:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
call _pthread_mutex_lock
test eax, eax
jnz loc_CCA3E
cmp byte ptr [rbx+6Ah], 1
jnz loc_CCA27
mov [rsp+78h+var_6C], ebp
mov r13, [rbx+78h]
mov rax, [rbx+98h]
lea rbp, [rax+rax*2]
shl rbp, 4
mov r12, r13
add r12, rbp
mov rax, [r15+10h]
mov [rsp+78h+var_38], rax
movups xmm0, xmmword ptr [r15]
movaps [rsp+78h+var_48], xmm0
mov rdi, [r13+rbp+10h]
mov rsi, [r13+rbp+18h]
sub rsi, rdi
mov rdx, r14
mov rcx, r15
call vsnprintf
movsxd rsi, eax
mov rax, [r13+rbp+18h]
sub rax, [r13+rbp+10h]
cmp rax, rsi
ja short loc_CC826
lea rdi, ds:10h[rbp]
add rdi, r13
inc rsi
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
mov rdi, [r12+10h]; this
mov rsi, [r12+18h]
sub rsi, rdi
lea rcx, [rsp+78h+var_48]
mov rdx, r14
call vsnprintf
loc_CC826:
mov eax, [rsp+78h+var_6C]
mov [r12], eax
mov al, [rbx+68h]
mov [r12+4], al
mov qword ptr [r12+8], 0
cmp byte ptr [rbx+69h], 1
jnz short loc_CC86E
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov rcx, 20C49BA5E353F7CFh
imul rcx
mov rax, rdx
shr rax, 3Fh
sar rdx, 7
add rdx, rax
sub rdx, [rbx+70h]
mov [r12+8], rdx
loc_CC86E:
mov byte ptr [r12+28h], 0
mov rsi, [rbx+80h]
mov rax, [rbx+98h]
inc rax
sub rsi, [rbx+78h]
sar rsi, 4
mov r14, 0AAAAAAAAAAAAAAABh
imul rsi, r14
xor edx, edx
div rsi
mov [rbx+98h], rdx
cmp rdx, [rbx+90h]
jnz loc_CCA1E
add rsi, rsi
lea rdi, [rsp+78h+var_68]
lea rdx, [rsp+78h+var_48]
mov [rsp+78h+var_78], rbx
call _ZNSt6vectorI16common_log_entrySaIS0_EEC2EmRKS1_; std::vector<common_log_entry>::vector(ulong,std::allocator<common_log_entry> const&)
mov rcx, [rbx+78h]
mov rdx, [rbx+90h]
mov r12d, 10h
xor ebp, ebp
xor r13d, r13d
loc_CC8E0:
lea rax, [rdx+rdx*2]
shl rax, 4
mov r15, [rsp+78h+var_68]
mov rbx, r14
lea r14, [rcx+rax]
add r14, 10h
movups xmm0, xmmword ptr [r14-10h]
movups xmmword ptr [r15+rbp], xmm0
lea rdi, [r15+r12]
mov rsi, r14
call _ZNSt6vectorIcSaIcEE14_M_move_assignEOS1_St17integral_constantIbLb1EE; std::vector<char>::_M_move_assign(std::vector<char>&&,std::integral_constant<bool,true>)
mov al, [r14+18h]
mov r14, rbx
mov rbx, [rsp+78h+var_78]
mov [r15+rbp+28h], al
mov rax, [rbx+90h]
inc rax
mov rcx, [rbx+78h]
mov rsi, [rbx+80h]
mov rdi, rsi
sub rdi, rcx
sar rdi, 4
imul rdi, r14
xor edx, edx
div rdi
mov [rbx+90h], rdx
inc r13
add r12, 30h ; '0'
add rbp, 30h ; '0'
cmp rdx, [rbx+98h]
jnz loc_CC8E0
mov qword ptr [rbx+90h], 0
mov [rbx+98h], r13
mov rdi, [rsp+78h+var_68]
mov rax, [rsp+78h+var_60]
mov rdx, rax
sub rdx, rdi
sar rdx, 4
imul rdx, r14
cmp r13, rdx
jnb short loc_CC9D0
loc_CC994:
add rdi, r12
mov esi, 100h
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
inc r13
mov rdi, [rsp+78h+var_68]
mov rax, [rsp+78h+var_60]
mov rcx, rax
sub rcx, rdi
sar rcx, 4
imul rcx, r14
add r12, 30h ; '0'
cmp r13, rcx
jb short loc_CC994
mov rcx, [rbx+78h]
mov rsi, [rbx+80h]
loc_CC9D0:
mov rdx, [rbx+88h]
mov [rbx+78h], rdi
mov [rbx+80h], rax
lea r14, [rsp+78h+var_68]
mov rax, [r14+10h]
mov [rbx+88h], rax
lea rdi, [rsp+78h+var_48]
mov [rdi], rcx
mov [rdi+8], rsi
mov [rdi+10h], rdx
xorps xmm0, xmm0
movaps xmmword ptr [r14], xmm0
mov qword ptr [r14+10h], 0
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
mov rdi, r14
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
loc_CCA1E:
lea rdi, [rbx+30h]; this
call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void)
loc_CCA27:
mov rdi, rbx
call _pthread_mutex_unlock
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CCA3E:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
jmp short loc_CCA4B
mov [rsp+78h+var_78], rbx
loc_CCA4B:
mov r14, rax
jmp short loc_CCA5D
mov r14, rax
lea rdi, [rsp+78h+var_68]
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
loc_CCA5D:
mov rdi, [rsp+78h+var_78]
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
|
long long common_log::add(long long a1, int a2, long long a3, __int128 *a4)
{
_QWORD *v6; // rbx
int v7; // eax
long long v8; // r13
long long v9; // rbp
long long v10; // r12
std::chrono::_V2::system_clock *v11; // rdi
unsigned long long v12; // rsi
unsigned long long v13; // r14
unsigned long long v14; // rsi
unsigned long long v15; // rdx
long long v16; // rcx
unsigned long long v17; // rdx
long long v18; // r12
long long v19; // rbp
unsigned long long v20; // r13
long long v21; // r15
unsigned long long v22; // rbx
long long v23; // r14
char v24; // al
long long v25; // rsi
__int128 v26; // kr00_16
long long v27; // rdx
_QWORD *v29; // [rsp+0h] [rbp-78h]
__int128 v31; // [rsp+10h] [rbp-68h] BYREF
long long v32; // [rsp+20h] [rbp-58h]
__int128 v33; // [rsp+30h] [rbp-48h] BYREF
long long v34; // [rsp+40h] [rbp-38h]
v6 = (_QWORD *)a1;
v7 = pthread_mutex_lock();
if ( v7 )
std::__throw_system_error(v7);
if ( *(_BYTE *)(a1 + 106) == 1 )
{
v8 = *(_QWORD *)(a1 + 120);
v9 = 48LL * *(_QWORD *)(a1 + 152);
v10 = v9 + v8;
v34 = *((_QWORD *)a4 + 2);
v33 = *a4;
v11 = *(std::chrono::_V2::system_clock **)(v8 + v9 + 16);
v12 = (int)vsnprintf(v11, *(_QWORD *)(v8 + v9 + 24) - (_QWORD)v11, a3, a4);
if ( *(_QWORD *)(v8 + v9 + 24) - *(_QWORD *)(v8 + v9 + 16) <= v12 )
{
std::vector<char>::resize((_QWORD *)(v8 + v9 + 16), v12 + 1);
v11 = *(std::chrono::_V2::system_clock **)(v10 + 16);
vsnprintf(v11, *(_QWORD *)(v10 + 24) - (_QWORD)v11, a3, &v33);
}
*(_DWORD *)v10 = a2;
*(_BYTE *)(v10 + 4) = *((_BYTE *)v6 + 104);
*(_QWORD *)(v10 + 8) = 0LL;
if ( *((_BYTE *)v6 + 105) == 1 )
*(_QWORD *)(v10 + 8) = std::chrono::_V2::system_clock::now(v11) / 1000LL - v6[14];
*(_BYTE *)(v10 + 40) = 0;
v13 = 0xAAAAAAAAAAAAAAABLL;
v14 = 0xAAAAAAAAAAAAAAABLL * ((long long)(v6[16] - v6[15]) >> 4);
v15 = (v6[19] + 1LL) % v14;
v6[19] = v15;
if ( v15 == v6[18] )
{
v29 = v6;
std::vector<common_log_entry>::vector(&v31, 2 * v14, &v33);
v16 = v6[15];
v17 = v6[18];
v18 = 16LL;
v19 = 0LL;
v20 = 0LL;
do
{
v21 = v31;
v22 = v13;
v23 = v16 + 48 * v17 + 16;
*(_OWORD *)(v31 + v19) = *(_OWORD *)(v16 + 48 * v17);
std::vector<char>::_M_move_assign(v21 + v18, v23);
v24 = *(_BYTE *)(v23 + 24);
v13 = v22;
v6 = v29;
*(_BYTE *)(v21 + v19 + 40) = v24;
v16 = v29[15];
v25 = v29[16];
v17 = (v29[18] + 1LL) % (v13 * ((v25 - v16) >> 4));
v29[18] = v17;
++v20;
v18 += 48LL;
v19 += 48LL;
}
while ( v17 != v29[19] );
v29[18] = 0LL;
v29[19] = v20;
v26 = v31;
if ( v20 < v13 * ((long long)(*((_QWORD *)&v31 + 1) - v31) >> 4) )
{
do
{
std::vector<char>::resize((_QWORD *)(v18 + v26), 0x100uLL);
++v20;
v18 += 48LL;
v26 = v31;
}
while ( v20 < v13 * ((long long)(*((_QWORD *)&v31 + 1) - v31) >> 4) );
v16 = v29[15];
v25 = v29[16];
}
v27 = v29[17];
*(_OWORD *)(v29 + 15) = v26;
v29[17] = v32;
*(_QWORD *)&v33 = v16;
*((_QWORD *)&v33 + 1) = v25;
v34 = v27;
v31 = 0LL;
v32 = 0LL;
std::vector<common_log_entry>::~vector(&v33);
std::vector<common_log_entry>::~vector(&v31);
}
std::condition_variable::notify_one((std::condition_variable *)(v6 + 6));
}
return pthread_mutex_unlock(v6);
}
|
add:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x0011bcc0
TEST EAX,EAX
JNZ 0x001cca3e
CMP byte ptr [RBX + 0x6a],0x1
JNZ 0x001cca27
MOV dword ptr [RSP + 0xc],EBP
MOV R13,qword ptr [RBX + 0x78]
MOV RAX,qword ptr [RBX + 0x98]
LEA RBP,[RAX + RAX*0x2]
SHL RBP,0x4
MOV R12,R13
ADD R12,RBP
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x40],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOV RDI,qword ptr [R13 + RBP*0x1 + 0x10]
MOV RSI,qword ptr [R13 + RBP*0x1 + 0x18]
SUB RSI,RDI
MOV RDX,R14
MOV RCX,R15
CALL 0x0011c198
MOVSXD RSI,EAX
MOV RAX,qword ptr [R13 + RBP*0x1 + 0x18]
SUB RAX,qword ptr [R13 + RBP*0x1 + 0x10]
CMP RAX,RSI
JA 0x001cc826
LEA RDI,[0x10 + RBP*0x1]
ADD RDI,R13
INC RSI
LAB_001cc807:
CALL 0x0017f060
MOV RDI,qword ptr [R12 + 0x10]
MOV RSI,qword ptr [R12 + 0x18]
SUB RSI,RDI
LEA RCX,[RSP + 0x30]
MOV RDX,R14
CALL 0x0011c198
LAB_001cc826:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [R12],EAX
MOV AL,byte ptr [RBX + 0x68]
MOV byte ptr [R12 + 0x4],AL
MOV qword ptr [R12 + 0x8],0x0
CMP byte ptr [RBX + 0x69],0x1
JNZ 0x001cc86e
CALL 0x0011b090
MOV RCX,0x20c49ba5e353f7cf
IMUL RCX
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x7
ADD RDX,RAX
SUB RDX,qword ptr [RBX + 0x70]
MOV qword ptr [R12 + 0x8],RDX
LAB_001cc86e:
MOV byte ptr [R12 + 0x28],0x0
MOV RSI,qword ptr [RBX + 0x80]
MOV RAX,qword ptr [RBX + 0x98]
INC RAX
SUB RSI,qword ptr [RBX + 0x78]
SAR RSI,0x4
MOV R14,-0x5555555555555555
IMUL RSI,R14
XOR EDX,EDX
DIV RSI
MOV qword ptr [RBX + 0x98],RDX
CMP RDX,qword ptr [RBX + 0x90]
JNZ 0x001cca1e
ADD RSI,RSI
LAB_001cc8b7:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x30]
MOV qword ptr [RSP],RBX
CALL 0x001cd4b0
MOV RCX,qword ptr [RBX + 0x78]
MOV RDX,qword ptr [RBX + 0x90]
MOV R12D,0x10
XOR EBP,EBP
XOR R13D,R13D
LAB_001cc8e0:
LEA RAX,[RDX + RDX*0x2]
SHL RAX,0x4
MOV R15,qword ptr [RSP + 0x10]
MOV RBX,R14
LEA R14,[RCX + RAX*0x1]
ADD R14,0x10
MOVUPS XMM0,xmmword ptr [R14 + -0x10]
MOVUPS xmmword ptr [R15 + RBP*0x1],XMM0
LEA RDI,[R15 + R12*0x1]
MOV RSI,R14
CALL 0x001cd52e
MOV AL,byte ptr [R14 + 0x18]
MOV R14,RBX
MOV RBX,qword ptr [RSP]
MOV byte ptr [R15 + RBP*0x1 + 0x28],AL
MOV RAX,qword ptr [RBX + 0x90]
INC RAX
MOV RCX,qword ptr [RBX + 0x78]
MOV RSI,qword ptr [RBX + 0x80]
MOV RDI,RSI
SUB RDI,RCX
SAR RDI,0x4
IMUL RDI,R14
XOR EDX,EDX
DIV RDI
MOV qword ptr [RBX + 0x90],RDX
INC R13
ADD R12,0x30
ADD RBP,0x30
CMP RDX,qword ptr [RBX + 0x98]
JNZ 0x001cc8e0
MOV qword ptr [RBX + 0x90],0x0
MOV qword ptr [RBX + 0x98],R13
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV RDX,RAX
SUB RDX,RDI
SAR RDX,0x4
IMUL RDX,R14
CMP R13,RDX
JNC 0x001cc9d0
LAB_001cc994:
ADD RDI,R12
LAB_001cc997:
MOV ESI,0x100
CALL 0x0017f060
LAB_001cc9a1:
INC R13
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,RAX
SUB RCX,RDI
SAR RCX,0x4
IMUL RCX,R14
ADD R12,0x30
CMP R13,RCX
JC 0x001cc994
MOV RCX,qword ptr [RBX + 0x78]
MOV RSI,qword ptr [RBX + 0x80]
LAB_001cc9d0:
MOV RDX,qword ptr [RBX + 0x88]
MOV qword ptr [RBX + 0x78],RDI
MOV qword ptr [RBX + 0x80],RAX
LEA R14,[RSP + 0x10]
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RBX + 0x88],RAX
LEA RDI,[RSP + 0x30]
MOV qword ptr [RDI],RCX
MOV qword ptr [RDI + 0x8],RSI
MOV qword ptr [RDI + 0x10],RDX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14],XMM0
MOV qword ptr [R14 + 0x10],0x0
CALL 0x001ccd26
MOV RDI,R14
CALL 0x001ccd26
LAB_001cca1e:
LEA RDI,[RBX + 0x30]
CALL 0x0011b450
LAB_001cca27:
MOV RDI,RBX
CALL 0x0011b6a0
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cca3e:
MOV EDI,EAX
CALL 0x0011b5d0
|
/* common_log::add(ggml_log_level, char const*, __va_list_tag*) */
void __thiscall common_log::add(common_log *this,int4 param_2,char *param_3,long *param_4)
{
int4 *puVar1;
char *__s;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int iVar5;
long lVar6;
ulong uVar7;
long lVar8;
long lVar9;
int4 *puVar10;
long lVar11;
ulong uVar12;
long local_68;
long lStack_60;
int8 local_58;
long local_48;
long lStack_40;
long local_38;
iVar5 = pthread_mutex_lock((pthread_mutex_t *)this);
if (iVar5 == 0) {
if (this[0x6a] == (common_log)0x1) {
lVar6 = *(long *)(this + 0x78);
lVar8 = *(long *)(this + 0x98) * 0x30;
puVar10 = (int4 *)(lVar6 + lVar8);
local_38 = param_4[2];
local_48 = *param_4;
lStack_40 = param_4[1];
__s = *(char **)(lVar6 + 0x10 + lVar8);
iVar5 = vsnprintf(__s,*(long *)(lVar6 + 0x18 + lVar8) - (long)__s,param_3,param_4);
if ((ulong)(*(long *)(lVar6 + 0x18 + lVar8) - *(long *)(lVar6 + 0x10 + lVar8)) <=
(ulong)(long)iVar5) {
/* try { // try from 001cc807 to 001cc80b has its CatchHandler @ 001cca47 */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(lVar8 + 0x10 + lVar6),(long)iVar5 + 1);
vsnprintf(*(char **)(puVar10 + 4),*(long *)(puVar10 + 6) - (long)*(char **)(puVar10 + 4),
param_3,&local_48);
}
*puVar10 = param_2;
*(common_log *)(puVar10 + 1) = this[0x68];
*(int8 *)(puVar10 + 2) = 0;
if (this[0x69] == (common_log)0x1) {
lVar6 = std::chrono::_V2::system_clock::now();
*(long *)(puVar10 + 2) = lVar6 / 1000 - *(long *)(this + 0x70);
}
*(int1 *)(puVar10 + 10) = 0;
lVar6 = *(long *)(this + 0x80) - *(long *)(this + 0x78) >> 4;
uVar7 = (*(long *)(this + 0x98) + 1U) % (ulong)(lVar6 * -0x5555555555555555);
*(ulong *)(this + 0x98) = uVar7;
if (uVar7 == *(ulong *)(this + 0x90)) {
/* try { // try from 001cc8b7 to 001cc8c9 has its CatchHandler @ 001cca45 */
std::vector<common_log_entry,std::allocator<common_log_entry>>::vector
((ulong)&local_68,(allocator *)(lVar6 * 0x5555555555555556));
lVar6 = *(long *)(this + 0x78);
uVar7 = *(ulong *)(this + 0x90);
lVar11 = 0x10;
lVar8 = 0;
uVar12 = 0;
do {
lVar9 = local_68;
puVar10 = (int4 *)(lVar6 + uVar7 * 0x30);
uVar2 = puVar10[1];
uVar3 = puVar10[2];
uVar4 = puVar10[3];
puVar1 = (int4 *)(local_68 + lVar8);
*puVar1 = *puVar10;
puVar1[1] = uVar2;
puVar1[2] = uVar3;
puVar1[3] = uVar4;
std::vector<char,std::allocator<char>>::_M_move_assign(local_68 + lVar11,puVar10 + 4);
*(int1 *)(lVar9 + 0x28 + lVar8) = *(int1 *)(puVar10 + 10);
lVar6 = *(long *)(this + 0x78);
lVar9 = *(long *)(this + 0x80);
uVar7 = (*(long *)(this + 0x90) + 1U) %
(ulong)((lVar9 - lVar6 >> 4) * -0x5555555555555555);
*(ulong *)(this + 0x90) = uVar7;
uVar12 = uVar12 + 1;
lVar11 = lVar11 + 0x30;
lVar8 = lVar8 + 0x30;
} while (uVar7 != *(ulong *)(this + 0x98));
*(int8 *)(this + 0x90) = 0;
*(ulong *)(this + 0x98) = uVar12;
if (uVar12 < (ulong)((lStack_60 - local_68 >> 4) * -0x5555555555555555)) {
do {
/* try { // try from 001cc997 to 001cc9a0 has its CatchHandler @ 001cca50 */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(local_68 + lVar11),0x100);
uVar12 = uVar12 + 1;
lVar11 = lVar11 + 0x30;
} while (uVar12 < (ulong)((lStack_60 - local_68 >> 4) * -0x5555555555555555));
lVar6 = *(long *)(this + 0x78);
lVar9 = *(long *)(this + 0x80);
}
local_38 = *(long *)(this + 0x88);
*(long *)(this + 0x78) = local_68;
*(long *)(this + 0x80) = lStack_60;
*(int8 *)(this + 0x88) = local_58;
local_68 = 0;
lStack_60 = 0;
local_58 = 0;
local_48 = lVar6;
lStack_40 = lVar9;
std::vector<common_log_entry,std::allocator<common_log_entry>>::~vector
((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48);
std::vector<common_log_entry,std::allocator<common_log_entry>>::~vector
((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_68);
}
std::condition_variable::notify_one();
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar5);
}
|
|
59,871
|
pagecache_unlock
|
eloqsql/storage/maria/ma_pagecache.c
|
void pagecache_unlock(PAGECACHE *pagecache,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno,
enum pagecache_page_lock lock,
enum pagecache_page_pin pin,
LSN first_REDO_LSN_for_page,
LSN lsn, my_bool was_changed)
{
PAGECACHE_BLOCK_LINK *block;
int page_st;
DBUG_ENTER("pagecache_unlock");
DBUG_PRINT("enter", ("fd: %u page: %lu %s %s",
(uint) file->file, (ulong) pageno,
page_cache_page_lock_str[lock],
page_cache_page_pin_str[pin]));
/* we do not allow any lock/pin increasing here */
DBUG_ASSERT(pin != PAGECACHE_PIN);
DBUG_ASSERT(lock != PAGECACHE_LOCK_READ && lock != PAGECACHE_LOCK_WRITE);
pagecache_pthread_mutex_lock(&pagecache->cache_lock);
/*
As soon as we keep lock cache can be used, and we have lock because want
to unlock.
*/
DBUG_ASSERT(pagecache->can_be_used);
inc_counter_for_resize_op(pagecache);
/* See NOTE for pagecache_unlock about registering requests */
block= find_block(pagecache, file, pageno, 0, 0, 0,
pin == PAGECACHE_PIN_LEFT_UNPINNED, FALSE, &page_st);
PCBLOCK_INFO(block);
DBUG_ASSERT(block != 0 && page_st == PAGE_READ);
if (first_REDO_LSN_for_page)
{
DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE_UNLOCK);
DBUG_ASSERT(pin == PAGECACHE_UNPIN);
pagecache_set_block_rec_lsn(block, first_REDO_LSN_for_page);
}
if (lsn != LSN_IMPOSSIBLE)
check_and_set_lsn(pagecache, lsn, block);
/* if we lock for write we must link the block to changed blocks */
DBUG_ASSERT((block->status & PCBLOCK_DIRECT_W) == 0 ||
(lock == PAGECACHE_LOCK_WRITE_UNLOCK ||
lock == PAGECACHE_LOCK_WRITE_TO_READ ||
lock == PAGECACHE_LOCK_LEFT_WRITELOCKED));
/*
if was_changed then status should be PCBLOCK_DIRECT_W or marked
as dirty
*/
DBUG_ASSERT(!was_changed || (block->status & PCBLOCK_DIRECT_W) ||
(block->status & PCBLOCK_CHANGED));
if ((block->status & PCBLOCK_DIRECT_W) &&
(lock == PAGECACHE_LOCK_WRITE_UNLOCK ||
lock == PAGECACHE_LOCK_WRITE_TO_READ))
{
if (!(block->status & PCBLOCK_CHANGED) && was_changed)
link_to_changed_list(pagecache, block);
block->status&= ~PCBLOCK_DIRECT_W;
DBUG_PRINT("info", ("Drop PCBLOCK_DIRECT_W for block: %p", block));
}
if (make_lock_and_pin(pagecache, block, lock, pin, FALSE))
{
DBUG_ASSERT(0); /* should not happend */
}
remove_reader(block);
/*
Link the block into the LRU chain if it's the last submitted request
for the block and block will not be pinned.
See NOTE for pagecache_unlock about registering requests.
*/
if (pin != PAGECACHE_PIN_LEFT_PINNED)
unreg_request(pagecache, block, 1);
dec_counter_for_resize_op(pagecache);
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
DBUG_VOID_RETURN;
}
|
O3
|
c
|
pagecache_unlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r12
movl %r8d, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movb 0x18(%rbp), %al
movb %al, -0x29(%rbp)
movq 0x10(%rbp), %rbx
addq $0xc8, %rdi
cmpq $0x0, 0x108(%r14)
movq %rdi, -0x40(%rbp)
jne 0x6c3d9
callq 0x291d0
incq 0x68(%r14)
xorl %eax, %eax
cmpl $0x1, -0x30(%rbp)
sete %al
subq $0x8, %rsp
leaq -0x44(%rbp), %r10
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r10
pushq $0x0
pushq %rax
callq 0x6c428
addq $0x20, %rsp
movq %rax, %r13
testq %r12, %r12
je 0x6c28f
movabsq $0xffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFF
cmpq %rax, 0x88(%r13)
jne 0x6c28f
movq %r12, 0x88(%r13)
testq %rbx, %rbx
je 0x6c2a2
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x6ca72
movl -0x34(%rbp), %edx
movl %edx, %eax
andl $-0x2, %eax
cmpl $0x6, %eax
jne 0x6c33d
movzwl 0x74(%r13), %eax
movzwl %ax, %ecx
movl %ecx, %esi
andl $0x40, %esi
je 0x6c33d
cmpb $0x0, -0x29(%rbp)
je 0x6c333
andl $0x20, %ecx
jne 0x6c333
movq %r13, %rax
addq $0x10, %rax
movq 0x10(%r13), %rsi
movq 0x18(%r13), %rcx
testq %rsi, %rsi
je 0x6c2ea
movq %rcx, 0x18(%rsi)
movq (%rax), %rsi
jmp 0x6c2ec
xorl %esi, %esi
movq %rsi, (%rcx)
movq 0x128(%r14), %rcx
movq 0x20(%r13), %rdi
movl 0x28(%r14), %esi
decl %esi
andl 0x28(%rdi), %esi
leaq (%rcx,%rsi,8), %rcx
movq %rcx, 0x18(%r13)
movq (%rcx), %rsi
movq %rsi, 0x10(%r13)
testq %rsi, %rsi
je 0x6c31b
movq %rax, 0x18(%rsi)
movq %r13, (%rcx)
orb $0x20, 0x74(%r13)
incq 0x58(%r14)
incq 0x168(%r14)
movzwl 0x74(%r13), %eax
andl $0xffbf, %eax # imm = 0xFFBF
movw %ax, 0x74(%r13)
movq %r14, %rdi
movq %r13, %rsi
movl -0x30(%rbp), %ecx
callq 0x6cb2f
movq 0x20(%r13), %rax
decl 0x68(%rax)
jne 0x6c372
movq 0x28(%r13), %rbx
testq %rbx, %rbx
je 0x6c372
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
jne 0x6c401
movq %rbx, %rdi
callq 0x29540
cmpl $0x0, -0x30(%rbp)
je 0x6c388
movq %r14, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x6cc9f
decq 0x68(%r14)
jne 0x6c3b6
movq 0x110(%r14), %rax
testq %rax, %rax
je 0x6c3b6
movq 0x88(%rax), %rbx
movq 0x38(%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
jne 0x6c416
movq %rbx, %rdi
callq 0x29540
movq 0x108(%r14), %rdi
testq %rdi, %rdi
jne 0x6c3ef
movq -0x40(%rbp), %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x291a0
leaq 0x6f371(%rip), %rsi # 0xdb751
movl $0xc97, %edx # imm = 0xC97
callq 0x2ee6f
jmp 0x6c239
leaq 0x31ac5a(%rip), %rax # 0x387050
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x6c3c2
leaq 0x31ac48(%rip), %rax # 0x387050
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x6c36a
leaq 0x31ac33(%rip), %rax # 0x387050
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x6c3ae
|
pagecache_unlock:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, r9
mov [rbp+var_30], r8d
mov [rbp+var_34], ecx
mov r13, rdx
mov r15, rsi
mov r14, rdi
mov al, [rbp+arg_8]
mov [rbp+var_29], al
mov rbx, [rbp+arg_0]
add rdi, 0C8h
cmp qword ptr [r14+108h], 0
mov [rbp+var_40], rdi
jnz loc_6C3D9
call _pthread_mutex_lock
loc_6C239:
inc qword ptr [r14+68h]
xor eax, eax
cmp [rbp+var_30], 1
setz al
sub rsp, 8
lea r10, [rbp+var_44]
mov rdi, r14
mov rsi, r15
mov rdx, r13
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
push r10
push 0
push rax
call find_block
add rsp, 20h
mov r13, rax
test r12, r12
jz short loc_6C28F
mov rax, 0FFFFFFFFFFFFFFh
cmp [r13+88h], rax
jnz short loc_6C28F
mov [r13+88h], r12
loc_6C28F:
test rbx, rbx
jz short loc_6C2A2
mov rdi, r14
mov rsi, rbx
mov rdx, r13
call check_and_set_lsn
loc_6C2A2:
mov edx, [rbp+var_34]
mov eax, edx
and eax, 0FFFFFFFEh
cmp eax, 6
jnz loc_6C33D
movzx eax, word ptr [r13+74h]
movzx ecx, ax
mov esi, ecx
and esi, 40h
jz short loc_6C33D
cmp [rbp+var_29], 0
jz short loc_6C333
and ecx, 20h
jnz short loc_6C333
mov rax, r13
add rax, 10h
mov rsi, [r13+10h]
mov rcx, [r13+18h]
test rsi, rsi
jz short loc_6C2EA
mov [rsi+18h], rcx
mov rsi, [rax]
jmp short loc_6C2EC
loc_6C2EA:
xor esi, esi
loc_6C2EC:
mov [rcx], rsi
mov rcx, [r14+128h]
mov rdi, [r13+20h]
mov esi, [r14+28h]
dec esi
and esi, [rdi+28h]
lea rcx, [rcx+rsi*8]
mov [r13+18h], rcx
mov rsi, [rcx]
mov [r13+10h], rsi
test rsi, rsi
jz short loc_6C31B
mov [rsi+18h], rax
loc_6C31B:
mov [rcx], r13
or byte ptr [r13+74h], 20h
inc qword ptr [r14+58h]
inc qword ptr [r14+168h]
movzx eax, word ptr [r13+74h]
loc_6C333:
and eax, 0FFBFh
mov [r13+74h], ax
loc_6C33D:
mov rdi, r14
mov rsi, r13
mov ecx, [rbp+var_30]
call make_lock_and_pin
mov rax, [r13+20h]
dec dword ptr [rax+68h]
jnz short loc_6C372
mov rbx, [r13+28h]
test rbx, rbx
jz short loc_6C372
mov rdi, [rbx+30h]
test rdi, rdi
jnz loc_6C401
loc_6C36A:
mov rdi, rbx
call _pthread_cond_signal
loc_6C372:
cmp [rbp+var_30], 0
jz short loc_6C388
mov rdi, r14
mov rsi, r13
mov edx, 1
call unreg_request
loc_6C388:
dec qword ptr [r14+68h]
jnz short loc_6C3B6
mov rax, [r14+110h]
test rax, rax
jz short loc_6C3B6
mov rbx, [rax+88h]
mov rdi, [rbx+38h]
add rbx, 8
test rdi, rdi
jnz short loc_6C416
loc_6C3AE:
mov rdi, rbx
call _pthread_cond_signal
loc_6C3B6:
mov rdi, [r14+108h]
test rdi, rdi
jnz short loc_6C3EF
loc_6C3C2:
mov rdi, [rbp+var_40]
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_6C3D9:
lea rsi, aWorkspaceLlm4b_33; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0C97h
call psi_mutex_lock
jmp loc_6C239
loc_6C3EF:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_6C3C2
loc_6C401:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp loc_6C36A
loc_6C416:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_6C3AE
|
long long pagecache_unlock(
long long a1,
int a2,
int a3,
unsigned int a4,
unsigned int a5,
long long a6,
long long a7,
char a8)
{
long long v11; // rdi
bool v12; // zf
long long block; // r13
long long v14; // rdx
__int16 v15; // ax
long long *v16; // rax
long long v17; // rsi
_QWORD *v18; // rcx
long long v19; // rsi
long long *v20; // rcx
long long v21; // rsi
long long v22; // rax
long long v23; // rbx
long long v24; // rax
long long v25; // rbx
long long v26; // rdi
long long v27; // rbx
char v29[4]; // [rsp+Ch] [rbp-44h] BYREF
long long v30; // [rsp+10h] [rbp-40h]
unsigned int v31; // [rsp+1Ch] [rbp-34h]
unsigned int v32; // [rsp+20h] [rbp-30h]
char v33; // [rsp+27h] [rbp-29h]
v32 = a5;
v31 = a4;
v33 = a8;
v11 = a1 + 200;
v12 = *(_QWORD *)(a1 + 264) == 0LL;
v30 = v11;
if ( v12 )
pthread_mutex_lock(v11);
else
psi_mutex_lock(v11, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0xC97u);
++*(_QWORD *)(a1 + 104);
block = find_block(a1, a2, a3, 0, 0, 0, v32 == 1, 0, (long long)v29);
if ( a6 && *(_QWORD *)(block + 136) == 0xFFFFFFFFFFFFFFLL )
*(_QWORD *)(block + 136) = a6;
if ( a7 )
check_and_set_lsn(a1, a7, block);
v14 = v31;
if ( (v31 & 0xFFFFFFFE) == 6 )
{
v15 = *(_WORD *)(block + 116);
if ( (v15 & 0x40) != 0 )
{
if ( v33 && (*(_WORD *)(block + 116) & 0x20) == 0 )
{
v16 = (long long *)(block + 16);
v17 = *(_QWORD *)(block + 16);
v18 = *(_QWORD **)(block + 24);
if ( v17 )
{
*(_QWORD *)(v17 + 24) = v18;
v19 = *v16;
}
else
{
v19 = 0LL;
}
*v18 = v19;
v20 = (long long *)(*(_QWORD *)(a1 + 296)
+ 8LL * (*(_DWORD *)(*(_QWORD *)(block + 32) + 40LL) & (unsigned int)(*(_DWORD *)(a1 + 40) - 1)));
*(_QWORD *)(block + 24) = v20;
v21 = *v20;
*(_QWORD *)(block + 16) = *v20;
if ( v21 )
*(_QWORD *)(v21 + 24) = v16;
*v20 = block;
*(_BYTE *)(block + 116) |= 0x20u;
++*(_QWORD *)(a1 + 88);
++*(_QWORD *)(a1 + 360);
v15 = *(_WORD *)(block + 116);
}
*(_WORD *)(block + 116) = v15 & 0xFFBF;
}
}
make_lock_and_pin(a1, block, v14, v32);
v22 = *(_QWORD *)(block + 32);
v12 = (*(_DWORD *)(v22 + 104))-- == 1;
if ( v12 )
{
v23 = *(_QWORD *)(block + 40);
if ( v23 )
{
if ( *(_QWORD *)(v23 + 48) )
PSI_server[46]();
pthread_cond_signal(v23);
}
}
if ( v32 )
unreg_request(a1, block, 1LL);
v12 = (*(_QWORD *)(a1 + 104))-- == 1LL;
if ( v12 )
{
v24 = *(_QWORD *)(a1 + 272);
if ( v24 )
{
v25 = *(_QWORD *)(v24 + 136);
v26 = *(_QWORD *)(v25 + 56);
v27 = v25 + 8;
if ( v26 )
PSI_server[46]();
pthread_cond_signal(v27);
}
}
if ( *(_QWORD *)(a1 + 264) )
PSI_server[44]();
return pthread_mutex_unlock(v30);
}
|
pagecache_unlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,R9
MOV dword ptr [RBP + -0x30],R8D
MOV dword ptr [RBP + -0x34],ECX
MOV R13,RDX
MOV R15,RSI
MOV R14,RDI
MOV AL,byte ptr [RBP + 0x18]
MOV byte ptr [RBP + -0x29],AL
MOV RBX,qword ptr [RBP + 0x10]
ADD RDI,0xc8
CMP qword ptr [R14 + 0x108],0x0
MOV qword ptr [RBP + -0x40],RDI
JNZ 0x0016c3d9
CALL 0x001291d0
LAB_0016c239:
INC qword ptr [R14 + 0x68]
XOR EAX,EAX
CMP dword ptr [RBP + -0x30],0x1
SETZ AL
SUB RSP,0x8
LEA R10,[RBP + -0x44]
MOV RDI,R14
MOV RSI,R15
MOV RDX,R13
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
PUSH R10
PUSH 0x0
PUSH RAX
CALL 0x0016c428
ADD RSP,0x20
MOV R13,RAX
TEST R12,R12
JZ 0x0016c28f
MOV RAX,0xffffffffffffff
CMP qword ptr [R13 + 0x88],RAX
JNZ 0x0016c28f
MOV qword ptr [R13 + 0x88],R12
LAB_0016c28f:
TEST RBX,RBX
JZ 0x0016c2a2
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R13
CALL 0x0016ca72
LAB_0016c2a2:
MOV EDX,dword ptr [RBP + -0x34]
MOV EAX,EDX
AND EAX,0xfffffffe
CMP EAX,0x6
JNZ 0x0016c33d
MOVZX EAX,word ptr [R13 + 0x74]
MOVZX ECX,AX
MOV ESI,ECX
AND ESI,0x40
JZ 0x0016c33d
CMP byte ptr [RBP + -0x29],0x0
JZ 0x0016c333
AND ECX,0x20
JNZ 0x0016c333
MOV RAX,R13
ADD RAX,0x10
MOV RSI,qword ptr [R13 + 0x10]
MOV RCX,qword ptr [R13 + 0x18]
TEST RSI,RSI
JZ 0x0016c2ea
MOV qword ptr [RSI + 0x18],RCX
MOV RSI,qword ptr [RAX]
JMP 0x0016c2ec
LAB_0016c2ea:
XOR ESI,ESI
LAB_0016c2ec:
MOV qword ptr [RCX],RSI
MOV RCX,qword ptr [R14 + 0x128]
MOV RDI,qword ptr [R13 + 0x20]
MOV ESI,dword ptr [R14 + 0x28]
DEC ESI
AND ESI,dword ptr [RDI + 0x28]
LEA RCX,[RCX + RSI*0x8]
MOV qword ptr [R13 + 0x18],RCX
MOV RSI,qword ptr [RCX]
MOV qword ptr [R13 + 0x10],RSI
TEST RSI,RSI
JZ 0x0016c31b
MOV qword ptr [RSI + 0x18],RAX
LAB_0016c31b:
MOV qword ptr [RCX],R13
OR byte ptr [R13 + 0x74],0x20
INC qword ptr [R14 + 0x58]
INC qword ptr [R14 + 0x168]
MOVZX EAX,word ptr [R13 + 0x74]
LAB_0016c333:
AND EAX,0xffbf
MOV word ptr [R13 + 0x74],AX
LAB_0016c33d:
MOV RDI,R14
MOV RSI,R13
MOV ECX,dword ptr [RBP + -0x30]
CALL 0x0016cb2f
MOV RAX,qword ptr [R13 + 0x20]
DEC dword ptr [RAX + 0x68]
JNZ 0x0016c372
MOV RBX,qword ptr [R13 + 0x28]
TEST RBX,RBX
JZ 0x0016c372
MOV RDI,qword ptr [RBX + 0x30]
TEST RDI,RDI
JNZ 0x0016c401
LAB_0016c36a:
MOV RDI,RBX
CALL 0x00129540
LAB_0016c372:
CMP dword ptr [RBP + -0x30],0x0
JZ 0x0016c388
MOV RDI,R14
MOV RSI,R13
MOV EDX,0x1
CALL 0x0016cc9f
LAB_0016c388:
DEC qword ptr [R14 + 0x68]
JNZ 0x0016c3b6
MOV RAX,qword ptr [R14 + 0x110]
TEST RAX,RAX
JZ 0x0016c3b6
MOV RBX,qword ptr [RAX + 0x88]
MOV RDI,qword ptr [RBX + 0x38]
ADD RBX,0x8
TEST RDI,RDI
JNZ 0x0016c416
LAB_0016c3ae:
MOV RDI,RBX
CALL 0x00129540
LAB_0016c3b6:
MOV RDI,qword ptr [R14 + 0x108]
TEST RDI,RDI
JNZ 0x0016c3ef
LAB_0016c3c2:
MOV RDI,qword ptr [RBP + -0x40]
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001291a0
LAB_0016c3d9:
LEA RSI,[0x1db751]
MOV EDX,0xc97
CALL 0x0012ee6f
JMP 0x0016c239
LAB_0016c3ef:
LEA RAX,[0x487050]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0016c3c2
LAB_0016c401:
LEA RAX,[0x487050]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x0016c36a
LAB_0016c416:
LEA RAX,[0x487050]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x0016c3ae
|
void pagecache_unlock(long param_1,int8 param_2,int8 param_3,uint param_4,int param_5,
long param_6,long param_7,char param_8)
{
int *piVar1;
long *plVar2;
int8 *puVar3;
long lVar4;
pthread_cond_t *__cond;
ushort uVar5;
long lVar6;
int8 uVar7;
int1 local_4c [4];
pthread_mutex_t *local_48;
uint local_3c;
int local_38;
char local_31;
local_31 = param_8;
local_48 = (pthread_mutex_t *)(param_1 + 200);
local_3c = param_4;
local_38 = param_5;
if (*(long *)(param_1 + 0x108) == 0) {
pthread_mutex_lock(local_48);
}
else {
psi_mutex_lock(local_48,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0xc97);
}
*(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + 1;
lVar6 = find_block(param_1,param_2,param_3,0,0,0,local_38 == 1,0,local_4c);
if ((param_6 != 0) && (*(long *)(lVar6 + 0x88) == 0xffffffffffffff)) {
*(long *)(lVar6 + 0x88) = param_6;
}
if (param_7 != 0) {
check_and_set_lsn(param_1,param_7,lVar6);
}
if (((local_3c & 0xfffffffe) == 6) && (uVar5 = *(ushort *)(lVar6 + 0x74), (uVar5 & 0x40) != 0)) {
if ((local_31 != '\0') && ((uVar5 & 0x20) == 0)) {
puVar3 = *(int8 **)(lVar6 + 0x18);
if (*(long *)(lVar6 + 0x10) == 0) {
uVar7 = 0;
}
else {
*(int8 **)(*(long *)(lVar6 + 0x10) + 0x18) = puVar3;
uVar7 = *(int8 *)(lVar6 + 0x10);
}
*puVar3 = uVar7;
plVar2 = (long *)(*(long *)(param_1 + 0x128) +
(ulong)(*(int *)(param_1 + 0x28) - 1U &
*(uint *)(*(long *)(lVar6 + 0x20) + 0x28)) * 8);
*(long **)(lVar6 + 0x18) = plVar2;
lVar4 = *plVar2;
*(long *)(lVar6 + 0x10) = lVar4;
if (lVar4 != 0) {
*(int8 **)(lVar4 + 0x18) = (int8 *)(lVar6 + 0x10);
}
*plVar2 = lVar6;
*(byte *)(lVar6 + 0x74) = *(byte *)(lVar6 + 0x74) | 0x20;
*(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + 1;
*(long *)(param_1 + 0x168) = *(long *)(param_1 + 0x168) + 1;
uVar5 = *(ushort *)(lVar6 + 0x74);
}
*(ushort *)(lVar6 + 0x74) = uVar5 & 0xffbf;
}
make_lock_and_pin(param_1,lVar6,local_3c,local_38);
piVar1 = (int *)(*(long *)(lVar6 + 0x20) + 0x68);
*piVar1 = *piVar1 + -1;
if ((*piVar1 == 0) &&
(__cond = *(pthread_cond_t **)(lVar6 + 0x28), __cond != (pthread_cond_t *)0x0)) {
if (__cond[1].__align != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal(__cond);
}
if (local_38 != 0) {
unreg_request(param_1,lVar6,1);
}
plVar2 = (long *)(param_1 + 0x68);
*plVar2 = *plVar2 + -1;
if ((*plVar2 == 0) && (*(long *)(param_1 + 0x110) != 0)) {
lVar6 = *(long *)(*(long *)(param_1 + 0x110) + 0x88);
if (*(long *)(lVar6 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar6 + 8));
}
if (*(long *)(param_1 + 0x108) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(local_48);
return;
}
|
|
59,872
|
find_where_to_split_row
|
eloqsql/storage/maria/ma_bitmap.c
|
static uint find_where_to_split_row(MARIA_SHARE *share, MARIA_ROW *row,
uint extents, uint split_size)
{
uint *lengths, *lengths_end;
/*
Ensure we have the minimum required space on head page:
- Header + length of field lengths (row->min_length)
- Number of extents
- One extent
*/
uint row_length= (row->min_length +
size_to_store_key_length(extents) +
ROW_EXTENT_SIZE);
DBUG_ASSERT(row_length <= split_size);
/*
Store first in all_field_lengths the different parts that are written
to the row. This needs to be in same order as in
ma_block_rec.c::write_block_record()
*/
row->null_field_lengths[-3]= extents * ROW_EXTENT_SIZE;
row->null_field_lengths[-2]= share->base.fixed_not_null_fields_length;
row->null_field_lengths[-1]= row->field_lengths_length;
for (lengths= row->null_field_lengths - EXTRA_LENGTH_FIELDS,
lengths_end= (lengths + share->base.fields - share->base.blobs +
EXTRA_LENGTH_FIELDS); lengths < lengths_end; lengths++)
{
if (row_length + *lengths > split_size)
break;
row_length+= *lengths;
}
return row_length;
}
|
O3
|
c
|
find_where_to_split_row:
pushq %rbp
movq %rsp, %rbp
movl 0x68(%rsi), %eax
xorl %r8d, %r8d
cmpl $0xff, %edx
setae %r8b
leal (%rax,%r8,2), %r8d
addl $0x8, %r8d
leal (,%rdx,8), %eax
subl %edx, %eax
movq 0x58(%rsi), %rdx
movl %eax, -0xc(%rdx)
movl 0x3d0(%rdi), %eax
movq 0x58(%rsi), %rdx
movl %eax, -0x8(%rdx)
movl 0xa8(%rsi), %eax
movq 0x58(%rsi), %rdx
movl %eax, -0x4(%rdx)
movl 0x3c8(%rdi), %r9d
movl 0x3f0(%rdi), %eax
leaq (,%r9,4), %rdx
shlq $0x2, %rax
subq %rax, %rdx
addq $-0xc, %rdx
cmpq $-0x17, %rdx
jl 0x54bec
movq 0x58(%rsi), %rdx
leaq (%rdx,%r9,4), %rsi
subq %rax, %rsi
addq $-0xc, %rdx
movl %r8d, %eax
movl (%rdx), %r8d
addl %eax, %r8d
cmpl %ecx, %r8d
ja 0x54bef
addq $0x4, %rdx
movl %r8d, %eax
cmpq %rsi, %rdx
jb 0x54bd0
jmp 0x54bef
movl %r8d, %eax
popq %rbp
retq
|
find_where_to_split_row:
push rbp
mov rbp, rsp
mov eax, [rsi+68h]
xor r8d, r8d
cmp edx, 0FFh
setnb r8b
lea r8d, [rax+r8*2]
add r8d, 8
lea eax, ds:0[rdx*8]
sub eax, edx
mov rdx, [rsi+58h]
mov [rdx-0Ch], eax
mov eax, [rdi+3D0h]
mov rdx, [rsi+58h]
mov [rdx-8], eax
mov eax, [rsi+0A8h]
mov rdx, [rsi+58h]
mov [rdx-4], eax
mov r9d, [rdi+3C8h]
mov eax, [rdi+3F0h]
lea rdx, ds:0[r9*4]
shl rax, 2
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF4h
cmp rdx, 0FFFFFFFFFFFFFFE9h
jl short loc_54BEC
mov rdx, [rsi+58h]
lea rsi, [rdx+r9*4]
sub rsi, rax
add rdx, 0FFFFFFFFFFFFFFF4h
loc_54BD0:
mov eax, r8d
mov r8d, [rdx]
add r8d, eax
cmp r8d, ecx
ja short loc_54BEF
add rdx, 4
mov eax, r8d
cmp rdx, rsi
jb short loc_54BD0
jmp short loc_54BEF
loc_54BEC:
mov eax, r8d
loc_54BEF:
pop rbp
retn
|
long long find_where_to_split_row(unsigned int *a1, long long a2, unsigned int a3, unsigned int a4)
{
unsigned int v4; // r8d
long long v5; // r9
long long v6; // rax
long long v7; // rdx
unsigned long long v8; // rsi
_DWORD *v9; // rdx
long long result; // rax
v4 = *(_DWORD *)(a2 + 104) + 2 * (a3 >= 0xFF) + 8;
*(_DWORD *)(*(_QWORD *)(a2 + 88) - 12LL) = 7 * a3;
*(_DWORD *)(*(_QWORD *)(a2 + 88) - 8LL) = a1[244];
*(_DWORD *)(*(_QWORD *)(a2 + 88) - 4LL) = *(_DWORD *)(a2 + 168);
v5 = a1[242];
v6 = 4LL * a1[252];
if ( 4 * v5 - v6 - 12 < -23 )
return v4;
v7 = *(_QWORD *)(a2 + 88);
v8 = v7 + 4 * v5 - v6;
v9 = (_DWORD *)(v7 - 12);
do
{
result = v4;
v4 += *v9;
if ( v4 > a4 )
break;
++v9;
result = v4;
}
while ( (unsigned long long)v9 < v8 );
return result;
}
|
find_where_to_split_row:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RSI + 0x68]
XOR R8D,R8D
CMP EDX,0xff
SETNC R8B
LEA R8D,[RAX + R8*0x2]
ADD R8D,0x8
LEA EAX,[RDX*0x8]
SUB EAX,EDX
MOV RDX,qword ptr [RSI + 0x58]
MOV dword ptr [RDX + -0xc],EAX
MOV EAX,dword ptr [RDI + 0x3d0]
MOV RDX,qword ptr [RSI + 0x58]
MOV dword ptr [RDX + -0x8],EAX
MOV EAX,dword ptr [RSI + 0xa8]
MOV RDX,qword ptr [RSI + 0x58]
MOV dword ptr [RDX + -0x4],EAX
MOV R9D,dword ptr [RDI + 0x3c8]
MOV EAX,dword ptr [RDI + 0x3f0]
LEA RDX,[R9*0x4]
SHL RAX,0x2
SUB RDX,RAX
ADD RDX,-0xc
CMP RDX,-0x17
JL 0x00154bec
MOV RDX,qword ptr [RSI + 0x58]
LEA RSI,[RDX + R9*0x4]
SUB RSI,RAX
ADD RDX,-0xc
LAB_00154bd0:
MOV EAX,R8D
MOV R8D,dword ptr [RDX]
ADD R8D,EAX
CMP R8D,ECX
JA 0x00154bef
ADD RDX,0x4
MOV EAX,R8D
CMP RDX,RSI
JC 0x00154bd0
JMP 0x00154bef
LAB_00154bec:
MOV EAX,R8D
LAB_00154bef:
POP RBP
RET
|
uint find_where_to_split_row(long param_1,long param_2,uint param_3,uint param_4)
{
int *piVar1;
uint uVar2;
uint uVar3;
uVar2 = *(int *)(param_2 + 0x68) + (uint)(0xfe < param_3) * 2 + 8;
*(uint *)(*(long *)(param_2 + 0x58) + -0xc) = param_3 * 7;
*(int4 *)(*(long *)(param_2 + 0x58) + -8) = *(int4 *)(param_1 + 0x3d0);
*(int4 *)(*(long *)(param_2 + 0x58) + -4) = *(int4 *)(param_2 + 0xa8);
if (-0x18 < (long)((ulong)*(uint *)(param_1 + 0x3c8) * 4 + (ulong)*(uint *)(param_1 + 0x3f0) * -4
+ -0xc)) {
piVar1 = (int *)(*(long *)(param_2 + 0x58) + -0xc);
uVar3 = uVar2;
do {
uVar2 = *piVar1 + uVar3;
if (param_4 < uVar2) {
return uVar3;
}
piVar1 = piVar1 + 1;
uVar3 = uVar2;
} while (piVar1 < (int *)(*(long *)(param_2 + 0x58) + (ulong)*(uint *)(param_1 + 0x3c8) * 4 +
(ulong)*(uint *)(param_1 + 0x3f0) * -4));
}
return uVar2;
}
|
|
59,873
|
ma_calc_length_for_store_length
|
eloqsql/storage/maria/ma_blockrec.c
|
uint ma_calc_length_for_store_length(ulong nr)
{
if (nr < 251)
return 1;
if (nr < 65536)
{
if (nr <= 255)
return 2;
return 3;
}
if (nr < 16777216)
return 4;
return 5;
}
|
O3
|
c
|
ma_calc_length_for_store_length:
pushq %rbp
movq %rsp, %rbp
movl $0x1, %eax
cmpq $0xfb, %rdi
jb 0x50232
cmpq $0xffff, %rdi # imm = 0xFFFF
ja 0x50223
cmpq $0x100, %rdi # imm = 0x100
movl $0x3, %eax
jmp 0x5022f
cmpq $0x1000000, %rdi # imm = 0x1000000
movl $0x5, %eax
sbbl $0x0, %eax
popq %rbp
retq
|
ma_calc_length_for_store_length:
push rbp
mov rbp, rsp
mov eax, 1
cmp rdi, 0FBh
jb short loc_50232
cmp rdi, 0FFFFh
ja short loc_50223
cmp rdi, 100h
mov eax, 3
jmp short loc_5022F
loc_50223:
cmp rdi, 1000000h
mov eax, 5
loc_5022F:
sbb eax, 0
loc_50232:
pop rbp
retn
|
long long ma_calc_length_for_store_length(unsigned long long a1)
{
long long result; // rax
bool v2; // cf
int v3; // eax
result = 1LL;
if ( a1 >= 0xFB )
{
if ( a1 > 0xFFFF )
{
v2 = a1 < 0x1000000;
v3 = 5;
}
else
{
v2 = a1 < 0x100;
v3 = 3;
}
return v3 - (unsigned int)v2;
}
return result;
}
|
ma_calc_length_for_store_length:
PUSH RBP
MOV RBP,RSP
MOV EAX,0x1
CMP RDI,0xfb
JC 0x00150232
CMP RDI,0xffff
JA 0x00150223
CMP RDI,0x100
MOV EAX,0x3
JMP 0x0015022f
LAB_00150223:
CMP RDI,0x1000000
MOV EAX,0x5
LAB_0015022f:
SBB EAX,0x0
LAB_00150232:
POP RBP
RET
|
int ma_calc_length_for_store_length(ulong param_1)
{
int iVar1;
bool bVar2;
iVar1 = 1;
if (0xfa < param_1) {
if (param_1 < 0x10000) {
bVar2 = param_1 < 0x100;
iVar1 = 3;
}
else {
bVar2 = param_1 < 0x1000000;
iVar1 = 5;
}
iVar1 = iVar1 - (uint)bVar2;
}
return iVar1;
}
|
|
59,874
|
minja::ExpressionTemplateToken::ExpressionTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&)
|
monkey531[P]llama/common/minja.hpp
|
ExpressionTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && e) : TemplateToken(Type::Expression, location, pre, post), expr(std::move(e)) {}
|
O2
|
cpp
|
minja::ExpressionTemplateToken::ExpressionTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&):
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %r8d
movl %edx, %ecx
movq %rsi, %rdx
movq %rdi, %r14
pushq $0x1
popq %rsi
callq 0x61b9e
leaq 0x8d38f(%rip), %rax # 0xfeaf8
addq $0x10, %rax
movq %rax, (%r14)
andq $0x0, 0x38(%r14)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x30(%r14)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZN5minja23ExpressionTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_10ExpressionEE:
push r14
push rbx
push rax
mov rbx, r8
mov r8d, ecx
mov ecx, edx
mov rdx, rsi
mov r14, rdi
push 1
pop rsi
call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling)
lea rax, _ZTVN5minja23ExpressionTemplateTokenE; `vtable for'minja::ExpressionTemplateToken
add rax, 10h
mov [r14], rax
and qword ptr [r14+38h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r14+30h], xmm0
and qword ptr [rbx], 0
add rsp, 8
pop rbx
pop r14
retn
|
long long * minja::ExpressionTemplateToken::ExpressionTemplateToken(
long long a1,
long long a2,
int a3,
int a4,
__int128 *a5)
{
long long *result; // rax
__int128 v7; // xmm0
minja::TemplateToken::TemplateToken(a1, 1, a2, a3, a4);
result = &`vtable for'minja::ExpressionTemplateToken + 2;
*(_QWORD *)a1 = &`vtable for'minja::ExpressionTemplateToken + 2;
*(_QWORD *)(a1 + 56) = 0LL;
v7 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v7;
*(_QWORD *)a5 = 0LL;
return result;
}
|
ExpressionTemplateToken:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R8D,ECX
MOV ECX,EDX
MOV RDX,RSI
MOV R14,RDI
PUSH 0x1
POP RSI
CALL 0x00161b9e
LEA RAX,[0x1feaf8]
ADD RAX,0x10
MOV qword ptr [R14],RAX
AND qword ptr [R14 + 0x38],0x0
MOVUPS XMM0,xmmword ptr [RBX]
AND qword ptr [RBX + 0x8],0x0
MOVUPS xmmword ptr [R14 + 0x30],XMM0
AND qword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::ExpressionTemplateToken::ExpressionTemplateToken(minja::Location const&,
minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::ExpressionTemplateToken::ExpressionTemplateToken
(ExpressionTemplateToken *this,int8 param_1,int4 param_3,int4 param_4,
int8 *param_5)
{
int8 uVar1;
TemplateToken::TemplateToken((TemplateToken *)this,1,param_1,param_3,param_4);
*(int ***)this = &PTR__ExpressionTemplateToken_001feb08;
*(int8 *)(this + 0x38) = 0;
uVar1 = param_5[1];
param_5[1] = 0;
*(int8 *)(this + 0x30) = *param_5;
*(int8 *)(this + 0x38) = uVar1;
*param_5 = 0;
return;
}
|
|
59,875
|
google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/implicit_weak_message.h
|
uint8_t* _InternalSerialize(uint8_t* target,
io::EpsCopyOutputStream* stream) const final {
if (data_ == nullptr) {
return target;
}
return stream->WriteRaw(data_->data(), static_cast<int>(data_->size()),
target);
}
|
O3
|
c
|
google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0xbbc71
movq (%rax), %rsi
movq 0x8(%rax), %rax
movq (%rdx), %rcx
subq %rbx, %rcx
movslq %eax, %r14
cmpq %r14, %rcx
jl 0xbbc7c
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2ceb0
addq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdx, %rdi
movl %eax, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7a27c
|
_ZNK6google8protobuf8internal19ImplicitWeakMessage18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE:
push r14
push rbx
push rax
mov rbx, rsi
mov rax, [rdi+10h]
test rax, rax
jz short loc_BBC71
mov rsi, [rax]; void *
mov rax, [rax+8]
mov rcx, [rdx]
sub rcx, rbx
movsxd r14, eax
cmp rcx, r14
jl short loc_BBC7C
mov rdi, rbx
mov rdx, r14
call _memcpy
add rbx, r14
loc_BBC71:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
loc_BBC7C:
mov rdi, rdx; this
mov edx, eax; int
mov rcx, rbx; unsigned __int8 *
add rsp, 8
pop rbx
pop r14
jmp _ZN6google8protobuf2io19EpsCopyOutputStream16WriteRawFallbackEPKviPh; google::protobuf::io::EpsCopyOutputStream::WriteRawFallback(void const*,int,uchar *)
|
unsigned __int8 * google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(
google::protobuf::internal::ImplicitWeakMessage *this,
unsigned __int8 *a2,
google::protobuf::io::EpsCopyOutputStream *a3)
{
long long v4; // rax
char *v5; // rsi
long long v6; // rax
long long v7; // r14
v4 = *((_QWORD *)this + 2);
if ( !v4 )
return a2;
v5 = *(char **)v4;
v6 = *(_QWORD *)(v4 + 8);
v7 = (int)v6;
if ( *(_QWORD *)a3 - (_QWORD)a2 >= (int)v6 )
{
memcpy(a2);
a2 += v7;
return a2;
}
return google::protobuf::io::EpsCopyOutputStream::WriteRawFallback(a3, v5, v6, a2);
}
|
_InternalSerialize:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV RAX,qword ptr [RDI + 0x10]
TEST RAX,RAX
JZ 0x001bbc71
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RDX]
SUB RCX,RBX
MOVSXD R14,EAX
CMP RCX,R14
JL 0x001bbc7c
MOV RDI,RBX
MOV RDX,R14
CALL 0x0012ceb0
ADD RBX,R14
LAB_001bbc71:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001bbc7c:
MOV RDI,RDX
MOV EDX,EAX
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0017a27c
|
/* google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(unsigned char*,
google::protobuf::io::EpsCopyOutputStream*) const */
uchar * __thiscall
google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize
(ImplicitWeakMessage *this,uchar *param_1,EpsCopyOutputStream *param_2)
{
int8 *puVar1;
uchar *puVar2;
size_t __n;
puVar1 = *(int8 **)(this + 0x10);
if (puVar1 != (int8 *)0x0) {
__n = (size_t)(int)puVar1[1];
if (*(long *)param_2 - (long)param_1 < (long)__n) {
puVar2 = (uchar *)io::EpsCopyOutputStream::WriteRawFallback
(param_2,(void *)*puVar1,(int)puVar1[1],param_1);
return puVar2;
}
memcpy(param_1,(void *)*puVar1,__n);
param_1 = param_1 + __n;
}
return param_1;
}
|
|
59,876
|
gc_decref
|
bluesky950520[P]quickjs/quickjs.c
|
static void gc_decref(JSRuntime *rt)
{
struct list_head *el, *el1;
JSGCObjectHeader *p;
init_list_head(&rt->tmp_obj_list);
/* decrement the refcount of all the children of all the GC
objects and move the GC objects with zero refcount to
tmp_obj_list */
list_for_each_safe(el, el1, &rt->gc_obj_list) {
p = list_entry(el, JSGCObjectHeader, link);
assert(p->mark == 0);
mark_children(rt, p, gc_decref_child);
p->mark = 1;
if (p->ref_count == 0) {
list_del(&p->link);
list_add_tail(&p->link, &rt->tmp_obj_list);
}
}
}
|
O0
|
c
|
gc_decref:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
addq $0xb8, %rdi
callq 0x22390
movq 0x20(%rsp), %rax
movq 0xa0(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
addq $0x98, %rcx
cmpq %rcx, %rax
je 0x2ad09
movq 0x18(%rsp), %rax
addq $-0x8, %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
leaq 0x34a6e(%rip), %rdx # 0x5f710
callq 0x5f210
movq 0x8(%rsp), %rax
movb 0x4(%rax), %cl
andb $0xf, %cl
orb $0x10, %cl
movb %cl, 0x4(%rax)
movq 0x8(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x2acea
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
callq 0x23c30
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
movq 0x20(%rsp), %rsi
addq $0xb8, %rsi
callq 0x23a50
jmp 0x2acec
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x2ac69
addq $0x28, %rsp
retq
nop
|
gc_decref:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov rdi, [rsp+28h+var_8]
add rdi, 0B8h
call init_list_head_0
mov rax, [rsp+28h+var_8]
mov rax, [rax+0A0h]
mov [rsp+28h+var_10], rax
mov rax, [rsp+28h+var_10]
mov rax, [rax+8]
mov [rsp+28h+var_18], rax
loc_2AC69:
mov rax, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_8]
add rcx, 98h
cmp rax, rcx
jz loc_2AD09
mov rax, [rsp+28h+var_10]
add rax, 0FFFFFFFFFFFFFFF8h
mov [rsp+28h+var_20], rax
mov rdi, [rsp+28h+var_8]
mov rsi, [rsp+28h+var_20]
lea rdx, gc_decref_child
call mark_children
mov rax, [rsp+28h+var_20]
mov cl, [rax+4]
and cl, 0Fh
or cl, 10h
mov [rax+4], cl
mov rax, [rsp+28h+var_20]
cmp dword ptr [rax], 0
jnz short loc_2ACEA
mov rdi, [rsp+28h+var_20]
add rdi, 8
call list_del_0
mov rdi, [rsp+28h+var_20]
add rdi, 8
mov rsi, [rsp+28h+var_8]
add rsi, 0B8h
call list_add_tail_0
loc_2ACEA:
jmp short $+2
loc_2ACEC:
mov rax, [rsp+28h+var_18]
mov [rsp+28h+var_10], rax
mov rax, [rsp+28h+var_10]
mov rax, [rax+8]
mov [rsp+28h+var_18], rax
jmp loc_2AC69
loc_2AD09:
add rsp, 28h
retn
|
_QWORD * gc_decref(_QWORD *a1)
{
_QWORD *result; // rax
_QWORD *i; // [rsp+10h] [rbp-18h]
_QWORD *v3; // [rsp+18h] [rbp-10h]
init_list_head_0(a1 + 23);
v3 = (_QWORD *)a1[20];
for ( i = (_QWORD *)v3[1]; ; i = (_QWORD *)i[1] )
{
result = v3;
if ( v3 == a1 + 19 )
break;
mark_children(a1, v3 - 1, gc_decref_child);
*((_BYTE *)v3 - 4) = *((_BYTE *)v3 - 4) & 0xF | 0x10;
if ( !*((_DWORD *)v3 - 2) )
{
list_del_0(v3);
list_add_tail_0((long long)v3, a1 + 23);
}
v3 = i;
}
return result;
}
|
gc_decref:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0xb8
CALL 0x00122390
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0xa0]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
LAB_0012ac69:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
ADD RCX,0x98
CMP RAX,RCX
JZ 0x0012ad09
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,-0x8
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x8]
LEA RDX,[0x15f710]
CALL 0x0015f210
MOV RAX,qword ptr [RSP + 0x8]
MOV CL,byte ptr [RAX + 0x4]
AND CL,0xf
OR CL,0x10
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX],0x0
JNZ 0x0012acea
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
CALL 0x00123c30
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
MOV RSI,qword ptr [RSP + 0x20]
ADD RSI,0xb8
CALL 0x00123a50
LAB_0012acea:
JMP 0x0012acec
LAB_0012acec:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x0012ac69
LAB_0012ad09:
ADD RSP,0x28
RET
|
void gc_decref(long param_1)
{
long local_18;
long local_10;
init_list_head(param_1 + 0xb8);
local_10 = *(long *)(param_1 + 0xa0);
local_18 = *(long *)(local_10 + 8);
while (local_10 != param_1 + 0x98) {
mark_children(param_1,(int *)(local_10 + -8),gc_decref_child);
*(byte *)(local_10 + -4) = *(byte *)(local_10 + -4) & 0xf | 0x10;
if (*(int *)(local_10 + -8) == 0) {
list_del(local_10);
list_add_tail(local_10,param_1 + 0xb8);
}
local_10 = local_18;
local_18 = *(long *)(local_18 + 8);
}
return;
}
|
|
59,877
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::insert(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&)
|
monkey531[P]llama/common/json.hpp
|
std::pair<iterator, bool> insert( const value_type& value )
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, value.first))
{
return {it, false};
}
}
Container::push_back(value);
return {--this->end(), true};
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::insert(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rbx
cmpq 0x8(%r14), %rbx
je 0x88ef9
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3a920
testb %al, %al
jne 0x88f10
addq $0x30, %rbx
jmp 0x88ede
movq %r14, %rdi
movq %r15, %rsi
callq 0x88f1c
movq 0x8(%r14), %rbx
addq $-0x30, %rbx
movb $0x1, %dl
jmp 0x88f12
xorl %edx, %edx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_:
push r15
push r14
push rbx
mov r15, rsi
mov r14, rdi
mov rbx, [rdi]
loc_88EDE:
cmp rbx, [r14+8]
jz short loc_88EF9
mov rdi, rbx
mov rsi, r15
call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_
test al, al
jnz short loc_88F10
add rbx, 30h ; '0'
jmp short loc_88EDE
loc_88EF9:
mov rdi, r14
mov rsi, r15
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE9push_backERKSG_; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::push_back(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFD0h
mov dl, 1
jmp short loc_88F12
loc_88F10:
xor edx, edx
loc_88F12:
mov rax, rbx
pop rbx
pop r14
pop r15
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,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::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::insert(
_QWORD **a1,
_QWORD *a2)
{
_QWORD *i; // rbx
for ( i = *a1; i != a1[1]; i += 6 )
{
if ( std::operator==<char>(i, a2) )
return (long long)i;
}
std::vector<std::pair<std::string const,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>>>::push_back(
a1,
a2);
return (long long)(a1[1] - 6);
}
|
insert:
PUSH R15
PUSH R14
PUSH RBX
MOV R15,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
LAB_00188ede:
CMP RBX,qword ptr [R14 + 0x8]
JZ 0x00188ef9
MOV RDI,RBX
MOV RSI,R15
CALL 0x0013a920
TEST AL,AL
JNZ 0x00188f10
ADD RBX,0x30
JMP 0x00188ede
LAB_00188ef9:
MOV RDI,R14
MOV RSI,R15
CALL 0x00188f1c
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x30
MOV DL,0x1
JMP 0x00188f12
LAB_00188f10:
XOR EDX,EDX
LAB_00188f12:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
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::less<void>, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > >::insert(std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > const&) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::insert(ordered_map<std::__cxx11::string,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,pair *param_1)
{
char cVar1;
int8 extraout_RDX;
int8 uVar2;
string *psVar3;
int1 auVar4 [16];
psVar3 = *(string **)this;
do {
if (psVar3 == *(string **)(this + 8)) {
std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::push_back((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)this,param_1);
psVar3 = (string *)(*(long *)(this + 8) + -0x30);
uVar2 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_00188f12:
auVar4._8_8_ = uVar2;
auVar4._0_8_ = psVar3;
return auVar4;
}
cVar1 = std::operator==(psVar3,(string *)param_1);
if (cVar1 != '\0') {
uVar2 = 0;
goto LAB_00188f12;
}
psVar3 = psVar3 + 0x30;
} while( true );
}
|
|
59,878
|
DepthAnything::predict(cv::Mat const&)
|
Depths-CPP/include/depth_anything.hpp
|
cv::Mat DepthAnything::predict(const cv::Mat &image)
{
try
{
std::vector<int64_t> inputTensorShape = {1, 3, inputImageShape.height, inputImageShape.width};
std::vector<float> blob;
cv::Mat preprocessedImage = preprocessSingle(image, blob, inputTensorShape);
Ort::MemoryInfo memoryInfo = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault);
Ort::Value inputTensor = Ort::Value::CreateTensor<float>(
memoryInfo,
blob.data(),
blob.size(),
inputTensorShape.data(),
inputTensorShape.size());
std::vector<Ort::Value> outputTensors = session->Run(
Ort::RunOptions{nullptr},
inputNames.data(),
&inputTensor,
numInputs,
outputNames.data(),
numOutputs);
return postprocessSingle(image.size(), outputTensors[0]);
}
catch (const Ort::Exception &e)
{
throw;
}
}
|
O0
|
cpp
|
DepthAnything::predict(cv::Mat const&):
subq $0x1b8, %rsp # imm = 0x1B8
movq %rdi, 0x68(%rsp)
movq %rdi, %rax
movq %rax, 0x70(%rsp)
movq %rdi, 0x1b0(%rsp)
movq %rsi, 0x1a8(%rsp)
movq %rdx, 0x1a0(%rsp)
movq 0x1a8(%rsp), %rax
movq %rax, 0x78(%rsp)
movq $0x1, 0x158(%rsp)
movq $0x3, 0x160(%rsp)
movslq 0x20(%rax), %rcx
movq %rcx, 0x168(%rsp)
movslq 0x1c(%rax), %rax
movq %rax, 0x170(%rsp)
leaq 0x158(%rsp), %rax
movq %rax, 0x178(%rsp)
movq $0x4, 0x180(%rsp)
leaq 0x157(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x2daa0
movq 0x80(%rsp), %rcx
movq 0x178(%rsp), %rsi
movq 0x180(%rsp), %rdx
leaq 0x188(%rsp), %rdi
callq 0x2dab0
jmp 0x25a01
leaq 0x157(%rsp), %rdi
callq 0x2db40
leaq 0x128(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x2db50
movq 0x78(%rsp), %rsi
movq 0x60(%rsp), %rcx
movq 0x1a0(%rsp), %rdx
leaq 0xc8(%rsp), %rdi
leaq 0x188(%rsp), %r8
callq 0x244d0
jmp 0x25a49
leaq 0xc0(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2db60
jmp 0x25a5f
leaq 0xc0(%rsp), %rdi
callq 0x2dc20
movq %rax, 0x40(%rsp)
leaq 0x128(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x2dc30
movq 0x30(%rsp), %rdi
movq %rax, 0x48(%rsp)
callq 0x2dc50
movq %rax, 0x50(%rsp)
leaq 0x188(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x2dc70
movq 0x38(%rsp), %rdi
movq %rax, 0x58(%rsp)
callq 0x2c950
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq %rax, %r9
leaq 0xb8(%rsp), %rdi
callq 0x2dbc0
jmp 0x25ade
movq 0x78(%rsp), %rdi
addq $0x10, %rdi
callq 0x2c730
movq %rax, 0x28(%rsp)
xorl %eax, %eax
movl %eax, %esi
leaq 0x98(%rsp), %rdi
callq 0x2de20
jmp 0x25b04
movq 0x78(%rsp), %rdi
addq $0x40, %rdi
callq 0x2de40
movq 0x78(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0xb8(%rdi), %rax
movq %rax, 0x20(%rsp)
addq $0x70, %rdi
callq 0x2de40
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r9
movq %rax, %rdx
movq 0x78(%rsp), %rax
movq 0xc0(%rax), %rdi
movq %rsp, %rax
movq %rdi, 0x8(%rax)
movq %rdx, (%rax)
leaq 0xa0(%rsp), %rdi
leaq 0x98(%rsp), %rdx
leaq 0xb8(%rsp), %r8
callq 0x2dc90
jmp 0x25b78
leaq 0x98(%rsp), %rdi
callq 0x2de60
movq 0x1a0(%rsp), %rsi
addq $0x40, %rsi
leaq 0x90(%rsp), %rdi
callq 0x2de70
jmp 0x25ba0
xorl %eax, %eax
movl %eax, %esi
leaq 0xa0(%rsp), %rdi
callq 0x2deb0
movq 0x68(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq %rax, %rcx
leaq 0x90(%rsp), %rdx
callq 0x25180
jmp 0x25bcd
leaq 0xa0(%rsp), %rdi
callq 0x2ded0
leaq 0xb8(%rsp), %rdi
callq 0x2df30
leaq 0xc0(%rsp), %rdi
callq 0x2df40
leaq 0xc8(%rsp), %rdi
callq 0x230a0
leaq 0x128(%rsp), %rdi
callq 0x2cdd0
leaq 0x188(%rsp), %rdi
callq 0x2ccf0
movq 0x70(%rsp), %rax
addq $0x1b8, %rsp # imm = 0x1B8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
leaq 0x157(%rsp), %rdi
callq 0x2db40
jmp 0x25d31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
jmp 0x25d17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
jmp 0x25d0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
jmp 0x25cfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
jmp 0x25cf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x2de60
jmp 0x25cf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x2ded0
leaq 0xb8(%rsp), %rdi
callq 0x2df30
leaq 0xc0(%rsp), %rdi
callq 0x2df40
leaq 0xc8(%rsp), %rdi
callq 0x230a0
leaq 0x128(%rsp), %rdi
callq 0x2cdd0
leaq 0x188(%rsp), %rdi
callq 0x2ccf0
movl 0x144(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x25d7a
movq 0x148(%rsp), %rdi
callq 0x23370
movq %rax, 0x88(%rsp)
callq 0x23620
jmp 0x25d8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
callq 0x23610
jmp 0x25d78
jmp 0x25d7a
movq 0x148(%rsp), %rdi
callq 0x23430
movq %rax, %rdi
callq 0x2cdc0
nop
|
_ZN13DepthAnything7predictERKN2cv3MatE:
sub rsp, 1B8h
mov qword ptr [rsp+1B8h+var_150], rdi; int
mov rax, rdi
mov qword ptr [rsp+1B8h+var_148], rax; int
mov [rsp+1B8h+var_8], rdi
mov qword ptr [rsp+1B8h+var_10], rsi
mov [rsp+1B8h+var_18], rdx
mov rax, qword ptr [rsp+1B8h+var_10]
mov qword ptr [rsp+1B8h+var_140], rax; int
mov qword ptr [rsp+1B8h+var_61+1], 1
mov [rsp+1B8h+var_58], 3
movsxd rcx, dword ptr [rax+20h]
mov [rsp+1B8h+var_50], rcx
movsxd rax, dword ptr [rax+1Ch]
mov [rsp+1B8h+var_48], rax
lea rax, [rsp+1B8h+var_61+1]
mov [rsp+1B8h+var_40], rax
mov [rsp+1B8h+var_38], 4
lea rdi, [rsp+1B8h+var_61]
mov qword ptr [rsp+1B8h+var_138], rdi; int
call _ZNSaIlEC2Ev; std::allocator<long>::allocator(void)
mov rcx, qword ptr [rsp+1B8h+var_138]
mov rsi, [rsp+1B8h+var_40]
mov rdx, [rsp+1B8h+var_38]
lea rdi, [rsp+1B8h+var_30]
call _ZNSt6vectorIlSaIlEEC2ESt16initializer_listIlERKS0_; std::vector<long>::vector(std::initializer_list<long>,std::allocator<long> const&)
jmp short $+2
loc_25A01:
lea rdi, [rsp+1B8h+var_61]
call _ZNSaIlED2Ev; std::allocator<long>::~allocator()
lea rdi, [rsp+1B8h+var_90]
mov qword ptr [rsp+1B8h+var_158], rdi; char
call _ZNSt6vectorIfSaIfEEC2Ev; std::vector<float>::vector(void)
mov rsi, qword ptr [rsp+1B8h+var_140]
mov rcx, qword ptr [rsp+1B8h+var_158]
mov rdx, [rsp+1B8h+var_18]
lea rdi, [rsp+1B8h+var_F0]
lea r8, [rsp+1B8h+var_30]
call _ZN13DepthAnything16preprocessSingleERKN2cv3MatERSt6vectorIfSaIfEERS4_IlSaIlEE; DepthAnything::preprocessSingle(cv::Mat const&,std::vector<float> &,std::vector&<long,std::allocator<long>>)
jmp short $+2
loc_25A49:
lea rdi, [rsp+1B8h+var_F8]
mov esi, 1
xor edx, edx
call _ZN3Ort10MemoryInfo9CreateCpuE16OrtAllocatorType10OrtMemType; Ort::MemoryInfo::CreateCpu(OrtAllocatorType,OrtMemType)
jmp short $+2
loc_25A5F:
lea rdi, [rsp+1B8h+var_F8]
call _ZNK3Ort6detail4BaseI13OrtMemoryInfoEcvPS2_Ev; Ort::detail::Base<OrtMemoryInfo>::operator OrtMemoryInfo*(void)
mov qword ptr [rsp+1B8h+var_178], rax; char
lea rdi, [rsp+1B8h+var_90]
mov qword ptr [rsp+1B8h+var_188], rdi; int
call _ZNSt6vectorIfSaIfEE4dataEv; std::vector<float>::data(void)
mov rdi, qword ptr [rsp+1B8h+var_188]
mov qword ptr [rsp+1B8h+var_170], rax; int
call _ZNKSt6vectorIfSaIfEE4sizeEv; std::vector<float>::size(void)
mov qword ptr [rsp+1B8h+var_168], rax; int
lea rdi, [rsp+1B8h+var_30]
mov qword ptr [rsp+1B8h+var_180], rdi; int
call _ZNSt6vectorIlSaIlEE4dataEv; std::vector<long>::data(void)
mov rdi, qword ptr [rsp+1B8h+var_180]
mov qword ptr [rsp+1B8h+var_160], rax; int
call _ZNKSt6vectorIlSaIlEE4sizeEv; std::vector<long>::size(void)
mov rsi, qword ptr [rsp+1B8h+var_178]
mov rdx, qword ptr [rsp+1B8h+var_170]
mov rcx, qword ptr [rsp+1B8h+var_168]
mov r8, qword ptr [rsp+1B8h+var_160]
mov r9, rax
lea rdi, [rsp+1B8h+var_100]
call _ZN3Ort5Value12CreateTensorIfEES0_PK13OrtMemoryInfoPT_mPKlm; Ort::Value::CreateTensor<float>(OrtMemoryInfo const*,float *,ulong,long const*,ulong)
jmp short $+2
loc_25ADE:
mov rdi, qword ptr [rsp+1B8h+var_140]
add rdi, 10h
call _ZNKSt10unique_ptrIN3Ort7SessionESt14default_deleteIS1_EEptEv; std::unique_ptr<Ort::Session>::operator->(void)
mov qword ptr [rsp+1B8h+var_190], rax; char
xor eax, eax
mov esi, eax
lea rdi, [rsp+1B8h+var_120]
call _ZN3Ort10RunOptionsC2EDn; Ort::RunOptions::RunOptions(decltype(nullptr))
jmp short $+2
loc_25B04:
mov rdi, qword ptr [rsp+1B8h+var_140]
add rdi, 40h ; '@'
call _ZNSt6vectorIPKcSaIS1_EE4dataEv; std::vector<char const*>::data(void)
mov rdi, qword ptr [rsp+1B8h+var_140]
mov qword ptr [rsp+1B8h+var_1A0], rax; int
mov rax, [rdi+0B8h]
mov qword ptr [rsp+1B8h+var_198], rax; int
add rdi, 70h ; 'p'
call _ZNSt6vectorIPKcSaIS1_EE4dataEv; std::vector<char const*>::data(void)
mov rsi, qword ptr [rsp+1B8h+var_190]
mov rcx, qword ptr [rsp+1B8h+var_1A0]
mov r9, qword ptr [rsp+1B8h+var_198]
mov rdx, rax
mov rax, qword ptr [rsp+1B8h+var_140]
mov rdi, [rax+0C0h]
mov rax, rsp
mov [rax+8], rdi
mov [rax], rdx
lea rdi, [rsp+1B8h+var_118]
lea rdx, [rsp+1B8h+var_120]
lea r8, [rsp+1B8h+var_100]
call _ZN3Ort6detail11SessionImplI10OrtSessionE3RunERKNS_10RunOptionsEPKPKcPKNS_5ValueEmSA_m; Ort::detail::SessionImpl<OrtSession>::Run(Ort::RunOptions const&,char const* const*,Ort::Value const*,ulong,char const* const*,ulong)
jmp short $+2
loc_25B78:
lea rdi, [rsp+1B8h+var_120]; this
call _ZN3Ort10RunOptionsD2Ev; Ort::RunOptions::~RunOptions()
mov rsi, [rsp+1B8h+var_18]
add rsi, 40h ; '@'
lea rdi, [rsp+1B8h+var_128]
call _ZNK2cv7MatSizeclEv; cv::MatSize::operator()(void)
jmp short $+2
loc_25BA0:
xor eax, eax
mov esi, eax
lea rdi, [rsp+1B8h+var_118]
call _ZNSt6vectorIN3Ort5ValueESaIS1_EEixEm; std::vector<Ort::Value>::operator[](ulong)
mov rdi, qword ptr [rsp+1B8h+var_150]; int
mov rsi, qword ptr [rsp+1B8h+var_140]; int
mov rcx, rax; int
lea rdx, [rsp+1B8h+var_128]; int
call _ZN13DepthAnything17postprocessSingleERKN2cv5Size_IiEERKN3Ort5ValueE; DepthAnything::postprocessSingle(cv::Size_<int> const&,Ort::Value const&)
jmp short $+2
loc_25BCD:
lea rdi, [rsp+1B8h+var_118]
call _ZNSt6vectorIN3Ort5ValueESaIS1_EED2Ev; std::vector<Ort::Value>::~vector()
lea rdi, [rsp+1B8h+var_100]; this
call _ZN3Ort5ValueD2Ev; Ort::Value::~Value()
lea rdi, [rsp+1B8h+var_F8]; this
call _ZN3Ort10MemoryInfoD2Ev; Ort::MemoryInfo::~MemoryInfo()
lea rdi, [rsp+1B8h+var_F0]; this
call __ZN2cv3MatD1Ev; cv::Mat::~Mat()
lea rdi, [rsp+1B8h+var_90]
call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector()
lea rdi, [rsp+1B8h+var_30]
call _ZNSt6vectorIlSaIlEED2Ev; std::vector<long>::~vector()
mov rax, qword ptr [rsp+1B8h+var_148]
add rsp, 1B8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+1B8h+var_70], rcx
mov [rsp+1B8h+var_74], eax
lea rdi, [rsp+1B8h+var_61]
call _ZNSaIlED2Ev; std::allocator<long>::~allocator()
jmp loc_25D31
mov rcx, rax
mov eax, edx
mov [rsp+1B8h+var_70], rcx
mov [rsp+1B8h+var_74], eax
jmp loc_25D17
mov rcx, rax
mov eax, edx
mov [rsp+1B8h+var_70], rcx
mov [rsp+1B8h+var_74], eax
jmp loc_25D0A
mov rcx, rax
mov eax, edx
mov [rsp+1B8h+var_70], rcx
mov [rsp+1B8h+var_74], eax
jmp short loc_25CFD
mov rcx, rax
mov eax, edx
mov [rsp+1B8h+var_70], rcx
mov [rsp+1B8h+var_74], eax
jmp short loc_25CF0
mov rcx, rax
mov eax, edx
mov [rsp+1B8h+var_70], rcx
mov [rsp+1B8h+var_74], eax
lea rdi, [rsp+1B8h+var_120]; this
call _ZN3Ort10RunOptionsD2Ev; Ort::RunOptions::~RunOptions()
jmp short loc_25CF0
mov rcx, rax
mov eax, edx
mov [rsp+1B8h+var_70], rcx
mov [rsp+1B8h+var_74], eax
lea rdi, [rsp+1B8h+var_118]
call _ZNSt6vectorIN3Ort5ValueESaIS1_EED2Ev; std::vector<Ort::Value>::~vector()
loc_25CF0:
lea rdi, [rsp+1B8h+var_100]; this
call _ZN3Ort5ValueD2Ev; Ort::Value::~Value()
loc_25CFD:
lea rdi, [rsp+1B8h+var_F8]; this
call _ZN3Ort10MemoryInfoD2Ev; Ort::MemoryInfo::~MemoryInfo()
loc_25D0A:
lea rdi, [rsp+1B8h+var_F0]; this
call __ZN2cv3MatD1Ev; cv::Mat::~Mat()
loc_25D17:
lea rdi, [rsp+1B8h+var_90]
call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector()
lea rdi, [rsp+1B8h+var_30]
call _ZNSt6vectorIlSaIlEED2Ev; std::vector<long>::~vector()
loc_25D31:
mov eax, [rsp+1B8h+var_74]
mov ecx, 1
cmp eax, ecx
jnz short loc_25D7A
mov rdi, [rsp+1B8h+var_70]; void *
call ___cxa_begin_catch
mov [rsp+1B8h+var_130], rax
call ___cxa_rethrow
|
DepthAnything * DepthAnything::predict(
DepthAnything *this,
const cv::Mat *a2,
cv::Mat *a3,
double a4,
__m128 a5)
{
int v5; // r8d
int v6; // r9d
long long v7; // rax
long long v8; // rax
long long v9; // rax
int v11; // [rsp+18h] [rbp-1A0h]
int v12[2]; // [rsp+20h] [rbp-198h]
int v13; // [rsp+28h] [rbp-190h]
char v14[8]; // [rsp+40h] [rbp-178h]
int v15[2]; // [rsp+48h] [rbp-170h]
int v16[2]; // [rsp+50h] [rbp-168h]
int v17[2]; // [rsp+58h] [rbp-160h]
int v18; // [rsp+90h] [rbp-128h] BYREF
_BYTE v19[8]; // [rsp+98h] [rbp-120h] BYREF
_BYTE v20[24]; // [rsp+A0h] [rbp-118h] BYREF
_BYTE v21[8]; // [rsp+B8h] [rbp-100h] BYREF
_BYTE v22[8]; // [rsp+C0h] [rbp-F8h] BYREF
char v23[96]; // [rsp+C8h] [rbp-F0h] BYREF
char v24[4]; // [rsp+128h] [rbp-90h] BYREF
char v25; // [rsp+157h] [rbp-61h] BYREF
_QWORD v26[4]; // [rsp+158h] [rbp-60h] BYREF
_QWORD *v27; // [rsp+178h] [rbp-40h]
long long v28; // [rsp+180h] [rbp-38h]
int v29[6]; // [rsp+188h] [rbp-30h] BYREF
cv::Mat *v30; // [rsp+1A0h] [rbp-18h]
int v31[2]; // [rsp+1A8h] [rbp-10h]
DepthAnything *v32; // [rsp+1B0h] [rbp-8h]
v32 = this;
*(_QWORD *)v31 = a2;
v30 = a3;
v26[0] = 1LL;
v26[1] = 3LL;
v26[2] = *((int *)a2 + 8);
v26[3] = *((int *)a2 + 7);
v27 = v26;
v28 = 4LL;
std::allocator<long>::allocator();
std::vector<long>::vector((unsigned int)v29, (_DWORD)v27, v28, (unsigned int)&v25, v5, v6);
std::allocator<long>::~allocator(&v25);
std::vector<float>::vector();
DepthAnything::preprocessSingle((DepthUtils *)v23, (long long)a2, v30, (long long)v24, (long long)v29, a4, a5);
Ort::MemoryInfo::CreateCpu(v22, 1LL, 0LL);
*(_QWORD *)v14 = Ort::detail::Base<OrtMemoryInfo>::operator OrtMemoryInfo*(v22);
*(_QWORD *)v15 = std::vector<float>::data();
*(_QWORD *)v16 = std::vector<float>::size(v24);
*(_QWORD *)v17 = std::vector<long>::data();
v7 = std::vector<long>::size(v29);
Ort::Value::CreateTensor<float>(v21, *(_QWORD *)v14, *(_QWORD *)v15, *(_QWORD *)v16, *(_QWORD *)v17, v7);
v13 = std::unique_ptr<Ort::Session>::operator->((char *)a2 + 16);
Ort::RunOptions::RunOptions(v19, 0LL);
v11 = std::vector<char const*>::data((char *)a2 + 64);
*(_QWORD *)v12 = *((_QWORD *)a2 + 23);
v8 = std::vector<char const*>::data((char *)a2 + 112);
Ort::detail::SessionImpl<OrtSession>::Run(
(unsigned int)v20,
v13,
(unsigned int)v19,
v11,
(unsigned int)v21,
v12[0],
v8,
*((_QWORD *)a2 + 24));
Ort::RunOptions::~RunOptions((Ort::RunOptions *)v19);
cv::MatSize::operator()(&v18, (char *)v30 + 64);
v9 = std::vector<Ort::Value>::operator[](v20, 0LL);
DepthAnything::postprocessSingle(this, (long long)a2, (long long)&v18, v9, a4, a5);
std::vector<Ort::Value>::~vector(v20);
Ort::Value::~Value((Ort::Value *)v21);
Ort::MemoryInfo::~MemoryInfo((Ort::MemoryInfo *)v22);
cv::Mat::~Mat((cv::Mat *)v23);
std::vector<float>::~vector(v24);
std::vector<long>::~vector(v29);
return this;
}
|
predict:
SUB RSP,0x1b8
MOV qword ptr [RSP + 0x68],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x70],RAX
MOV qword ptr [RSP + 0x1b0],RDI
MOV qword ptr [RSP + 0x1a8],RSI
MOV qword ptr [RSP + 0x1a0],RDX
MOV RAX,qword ptr [RSP + 0x1a8]
MOV qword ptr [RSP + 0x78],RAX
MOV qword ptr [RSP + 0x158],0x1
MOV qword ptr [RSP + 0x160],0x3
MOVSXD RCX,dword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0x168],RCX
MOVSXD RAX,dword ptr [RAX + 0x1c]
MOV qword ptr [RSP + 0x170],RAX
LEA RAX,[RSP + 0x158]
MOV qword ptr [RSP + 0x178],RAX
MOV qword ptr [RSP + 0x180],0x4
LEA RDI,[RSP + 0x157]
MOV qword ptr [RSP + 0x80],RDI
CALL 0x0012daa0
MOV RCX,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x178]
MOV RDX,qword ptr [RSP + 0x180]
LAB_001259f2:
LEA RDI,[RSP + 0x188]
CALL 0x0012dab0
JMP 0x00125a01
LAB_00125a01:
LEA RDI,[RSP + 0x157]
CALL 0x0012db40
LEA RDI,[RSP + 0x128]
MOV qword ptr [RSP + 0x60],RDI
CALL 0x0012db50
MOV RSI,qword ptr [RSP + 0x78]
MOV RCX,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x1a0]
LAB_00125a32:
LEA RDI,[RSP + 0xc8]
LEA R8,[RSP + 0x188]
CALL 0x001244d0
JMP 0x00125a49
LAB_00125a49:
LEA RDI,[RSP + 0xc0]
MOV ESI,0x1
XOR EDX,EDX
CALL 0x0012db60
JMP 0x00125a5f
LAB_00125a5f:
LEA RDI,[RSP + 0xc0]
CALL 0x0012dc20
MOV qword ptr [RSP + 0x40],RAX
LEA RDI,[RSP + 0x128]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x0012dc30
MOV RDI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x48],RAX
CALL 0x0012dc50
MOV qword ptr [RSP + 0x50],RAX
LEA RDI,[RSP + 0x188]
MOV qword ptr [RSP + 0x38],RDI
CALL 0x0012dc70
MOV RDI,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x58],RAX
CALL 0x0012c950
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x50]
MOV R8,qword ptr [RSP + 0x58]
MOV R9,RAX
LAB_00125acf:
LEA RDI,[RSP + 0xb8]
CALL 0x0012dbc0
JMP 0x00125ade
LAB_00125ade:
MOV RDI,qword ptr [RSP + 0x78]
ADD RDI,0x10
CALL 0x0012c730
MOV qword ptr [RSP + 0x28],RAX
LAB_00125af1:
XOR EAX,EAX
MOV ESI,EAX
LEA RDI,[RSP + 0x98]
CALL 0x0012de20
JMP 0x00125b04
LAB_00125b04:
MOV RDI,qword ptr [RSP + 0x78]
ADD RDI,0x40
CALL 0x0012de40
MOV RDI,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV qword ptr [RSP + 0x20],RAX
ADD RDI,0x70
CALL 0x0012de40
MOV RSI,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x18]
MOV R9,qword ptr [RSP + 0x20]
MOV RDX,RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV RDI,qword ptr [RAX + 0xc0]
LAB_00125b4f:
MOV RAX,RSP
MOV qword ptr [RAX + 0x8],RDI
MOV qword ptr [RAX],RDX
LEA RDI,[RSP + 0xa0]
LEA RDX,[RSP + 0x98]
LEA R8,[RSP + 0xb8]
CALL 0x0012dc90
JMP 0x00125b78
LAB_00125b78:
LEA RDI,[RSP + 0x98]
CALL 0x0012de60
MOV RSI,qword ptr [RSP + 0x1a0]
ADD RSI,0x40
LAB_00125b91:
LEA RDI,[RSP + 0x90]
CALL 0x0012de70
JMP 0x00125ba0
LAB_00125ba0:
XOR EAX,EAX
MOV ESI,EAX
LEA RDI,[RSP + 0xa0]
CALL 0x0012deb0
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x78]
MOV RCX,RAX
LEA RDX,[RSP + 0x90]
CALL 0x00125180
LAB_00125bcb:
JMP 0x00125bcd
LAB_00125bcd:
LEA RDI,[RSP + 0xa0]
CALL 0x0012ded0
LEA RDI,[RSP + 0xb8]
CALL 0x0012df30
LEA RDI,[RSP + 0xc0]
CALL 0x0012df40
LEA RDI,[RSP + 0xc8]
CALL 0x001230a0
LEA RDI,[RSP + 0x128]
CALL 0x0012cdd0
LEA RDI,[RSP + 0x188]
CALL 0x0012ccf0
MOV RAX,qword ptr [RSP + 0x70]
ADD RSP,0x1b8
RET
|
/* DepthAnything::predict(cv::Mat const&) */
Mat * DepthAnything::predict(Mat *param_1)
{
OrtMemoryInfo *pOVar1;
float *pfVar2;
ulong uVar3;
long *plVar4;
ulong uVar5;
char **ppcVar6;
vector *in_RDX;
vector *in_RSI;
MatSize local_128 [8];
RunOptions local_120 [8];
RunOptions local_118 [24];
Value local_100 [8];
MemoryInfo local_f8 [8];
Mat local_f0 [96];
vector<float,std::allocator<float>> local_90 [47];
allocator<long> local_61;
int8 local_60;
int8 local_58;
long local_50;
long local_48;
int8 *local_40;
int8 local_38;
vector<long,std::allocator<long>> local_30 [24];
vector *local_18;
Mat *local_8;
local_60 = 1;
local_58 = 3;
local_50 = (long)*(int *)(in_RSI + 0x20);
local_48 = (long)*(int *)(in_RSI + 0x1c);
local_40 = &local_60;
local_38 = 4;
local_18 = in_RDX;
local_8 = param_1;
std::allocator<long>::allocator(&local_61);
/* try { // try from 001259f2 to 001259fe has its CatchHandler @ 00125c28 */
std::vector<long,std::allocator<long>>::vector(local_30,local_40,local_38,&local_61);
std::allocator<long>::~allocator(&local_61);
std::vector<float,std::allocator<float>>::vector(local_90);
/* try { // try from 00125a32 to 00125a46 has its CatchHandler @ 00125c4e */
preprocessSingle(local_f0,in_RSI,local_18);
/* try { // try from 00125a49 to 00125a5c has its CatchHandler @ 00125c67 */
Ort::MemoryInfo::CreateCpu(local_f8,1,0);
pOVar1 = Ort::detail::Base::operator_cast_to_OrtMemoryInfo_((Base *)local_f8);
pfVar2 = (float *)std::vector<float,std::allocator<float>>::data(local_90);
uVar3 = std::vector<float,std::allocator<float>>::size(local_90);
plVar4 = (long *)std::vector<long,std::allocator<long>>::data(local_30);
uVar5 = std::vector<long,std::allocator<long>>::size(local_30);
/* try { // try from 00125acf to 00125adb has its CatchHandler @ 00125c80 */
Ort::Value::CreateTensor<float>(local_100,pOVar1,pfVar2,uVar3,plVar4,uVar5);
ppcVar6 = (char **)std::unique_ptr<Ort::Session,std::default_delete<Ort::Session>>::operator->
((unique_ptr<Ort::Session,std::default_delete<Ort::Session>> *)
(in_RSI + 0x10));
/* try { // try from 00125af1 to 00125b01 has its CatchHandler @ 00125c96 */
Ort::RunOptions::RunOptions(local_120,(_func_decltype_nullptr *)0x0);
uVar5 = std::vector<char_const*,std::allocator<char_const*>>::data
((vector<char_const*,std::allocator<char_const*>> *)(in_RSI + 0x40));
uVar3 = *(ulong *)(in_RSI + 0xb8);
std::vector<char_const*,std::allocator<char_const*>>::data
((vector<char_const*,std::allocator<char_const*>> *)(in_RSI + 0x70));
/* try { // try from 00125b4f to 00125b75 has its CatchHandler @ 00125cac */
Ort::detail::SessionImpl<OrtSession>::Run
(local_118,ppcVar6,(Value *)local_120,uVar5,(char **)local_100,uVar3);
Ort::RunOptions::~RunOptions(local_120);
/* try { // try from 00125b91 to 00125bca has its CatchHandler @ 00125ccf */
cv::MatSize::operator()(local_128);
std::vector<Ort::Value,std::allocator<Ort::Value>>::operator[]
((vector<Ort::Value,std::allocator<Ort::Value>> *)local_118,0);
postprocessSingle((Size_ *)param_1,(Value *)in_RSI);
std::vector<Ort::Value,std::allocator<Ort::Value>>::~vector
((vector<Ort::Value,std::allocator<Ort::Value>> *)local_118);
Ort::Value::~Value(local_100);
Ort::MemoryInfo::~MemoryInfo(local_f8);
cv::Mat::~Mat(local_f0);
std::vector<float,std::allocator<float>>::~vector(local_90);
std::vector<long,std::allocator<long>>::~vector(local_30);
return param_1;
}
|
|
59,879
|
DepthAnything::predict(cv::Mat const&)
|
Depths-CPP/include/depth_anything.hpp
|
cv::Mat DepthAnything::predict(const cv::Mat &image)
{
try
{
std::vector<int64_t> inputTensorShape = {1, 3, inputImageShape.height, inputImageShape.width};
std::vector<float> blob;
cv::Mat preprocessedImage = preprocessSingle(image, blob, inputTensorShape);
Ort::MemoryInfo memoryInfo = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault);
Ort::Value inputTensor = Ort::Value::CreateTensor<float>(
memoryInfo,
blob.data(),
blob.size(),
inputTensorShape.data(),
inputTensorShape.size());
std::vector<Ort::Value> outputTensors = session->Run(
Ort::RunOptions{nullptr},
inputNames.data(),
&inputTensor,
numInputs,
outputNames.data(),
numOutputs);
return postprocessSingle(image.size(), outputTensors[0]);
}
catch (const Ort::Exception &e)
{
throw;
}
}
|
O3
|
cpp
|
DepthAnything::predict(cv::Mat const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0x88(%rsp), %rsi
movq $0x1, (%rsi)
movq $0x3, 0x8(%rsi)
movslq 0x20(%r12), %rax
movq %rax, 0x10(%rsi)
movslq 0x1c(%r12), %rax
movq %rax, 0x18(%rsi)
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rcx
movl $0x4, %edx
callq 0xcf58
vpxor %xmm0, %xmm0, %xmm0
leaq 0x30(%rsp), %rcx
vmovdqa %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
leaq 0x88(%rsp), %rdi
leaq 0x50(%rsp), %r8
movq %r12, %rsi
movq %r15, %rdx
callq 0x8266
movq 0xc11d(%rip), %rax # 0x15358
movq %rsp, %rbx
movl $0x1, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq *0x228(%rax)
movq %rax, %rdi
callq 0xd22a
movq (%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
subq %rsi, %rdx
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
subq %rcx, %r8
sarq $0x3, %r8
movq 0xc0d9(%rip), %rax # 0x15358
subq $0x8, %rsp
movq %rdi, 0x28(%rsp)
movl $0x1, %r9d
pushq %rbx
callq *0x188(%rax)
addq $0x10, %rsp
movq %rax, %rdi
callq 0xd22a
movq %r15, 0x68(%rsp)
movq %r14, 0x70(%rsp)
movq %rsp, %rdi
movq (%rdi), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%r12), %r13
movq 0x40(%r12), %rbx
movq 0xb8(%r12), %rax
movq %rax, 0x80(%rsp)
movq 0x70(%r12), %rax
movq %rax, 0x78(%rsp)
movq 0xc0(%r12), %rbp
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rbp, %rsi
callq 0xe6a6
testq %rbp, %rbp
je 0x9341
movq %rsp, %r14
leaq 0x28(%rsp), %r15
movq %rbp, %r12
movq $0x0, 0x28(%rsp)
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x9331
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x933c
movq %r14, %rdi
movq %r15, %rdx
callq 0xe7b0
decq %r12
jne 0x930a
movq 0xc010(%rip), %rax # 0x15358
movq (%r13), %rdi
leaq 0x18(%rsp), %rcx
xorl %esi, %esi
movq %rbx, %rdx
movq 0x80(%rsp), %r8
movq 0x78(%rsp), %r9
pushq (%rsp)
pushq %rbp
callq *0x48(%rax)
addq $0x10, %rsp
movq %rax, %rdi
callq 0xd22a
movq 0xbfdb(%rip), %rax # 0x15358
xorl %edi, %edi
callq *0x308(%rax)
movq 0x70(%rsp), %rbx
movq 0x68(%rsp), %rax
movq 0x40(%rax), %rax
vmovq (%rax), %xmm0
vprolq $0x20, %xmm0, %xmm0
leaq 0x28(%rsp), %rdx
vmovq %xmm0, (%rdx)
movq (%rsp), %rcx
movq %rbx, %rdi
callq 0x8c16
movq %rsp, %rdi
callq 0xcfa0
movq 0x18(%rsp), %rdi
movq 0xbf91(%rip), %rax # 0x15358
callq *0x300(%rax)
movq 0xbf84(%rip), %rax # 0x15358
movq 0x20(%rsp), %rdi
callq *0x2f0(%rax)
leaq 0x88(%rsp), %rdi
callq 0x70a0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x9403
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x7300
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x941a
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x7300
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9515
jmp 0x9515
movq %rdx, %r15
movq %rax, %rbx
movq %rsp, %rdi
callq 0xcfa0
jmp 0x948d
jmp 0x9515
movq %rdx, %r15
movq %rax, %rbx
jmp 0x949f
movq %rdx, %r15
movq %rax, %rbx
jmp 0x94b1
movq %rdx, %r15
movq %rax, %rbx
jmp 0x94be
movq %rdx, %r15
movq %rax, %rbx
jmp 0x94ec
jmp 0x9470
movq %rdx, %r15
movq %rax, %rbx
movq %rsp, %rdi
callq 0xcfa0
movq 0xbed3(%rip), %rax # 0x15358
xorl %edi, %edi
callq *0x308(%rax)
movq 0x18(%rsp), %rdi
movq 0xbebf(%rip), %rax # 0x15358
callq *0x300(%rax)
movq 0xbeb2(%rip), %rax # 0x15358
movq 0x20(%rsp), %rdi
callq *0x2f0(%rax)
leaq 0x88(%rsp), %rdi
callq 0x70a0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x94d5
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x7300
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x94ec
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x7300
cmpl $0x1, %r15d
jne 0x9509
movq %rbx, %rdi
callq 0x72e0
callq 0x7550
jmp 0x9515
movq %rax, %rbx
callq 0x7540
movq %rbx, %rdi
callq 0x73a0
jmp 0x9515
jmp 0x9515
movq %rax, %rdi
callq 0xcd26
nop
|
_ZN13DepthAnything7predictERKN2cv3MatE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov r15, rdx
mov r12, rsi
mov r14, rdi
lea rsi, [rsp+118h+var_90]
mov qword ptr [rsi], 1
mov qword ptr [rsi+8], 3
movsxd rax, dword ptr [r12+20h]
mov [rsi+10h], rax
movsxd rax, dword ptr [r12+1Ch]
mov [rsi+18h], rax
lea rdi, [rsp+118h+var_C8]
lea rcx, [rsp+118h+var_E8]
mov edx, 4
call _ZNSt6vectorIlSaIlEEC2ESt16initializer_listIlERKS0_; std::vector<long>::vector(std::initializer_list<long>,std::allocator<long> const&)
vpxor xmm0, xmm0, xmm0
lea rcx, [rsp+118h+var_E8]
vmovdqa xmmword ptr [rcx], xmm0
mov qword ptr [rcx+10h], 0
lea rdi, [rsp+118h+var_90]; this
lea r8, [rsp+118h+var_C8]
mov rsi, r12
mov rdx, r15
call _ZN13DepthAnything16preprocessSingleERKN2cv3MatERSt6vectorIfSaIfEERS4_IlSaIlEE; DepthAnything::preprocessSingle(cv::Mat const&,std::vector<float> &,std::vector&<long,std::allocator<long>>)
mov rax, cs:_ZN3Ort6GlobalIvE4api_E; Ort::Global<void>::api_
mov rbx, rsp
mov edi, 1
xor esi, esi
mov rdx, rbx
call qword ptr [rax+228h]
mov rdi, rax
call _ZN3Ort12ThrowOnErrorEP9OrtStatus; Ort::ThrowOnError(OrtStatus *)
mov rdi, [rsp+118h+var_118]
mov rsi, [rsp+118h+var_E8]
mov rdx, [rsp+118h+var_E0]
sub rdx, rsi
mov rcx, [rsp+118h+var_C8]
mov r8, [rsp+118h+var_C0]
sub r8, rcx
sar r8, 3
mov rax, cs:_ZN3Ort6GlobalIvE4api_E; Ort::Global<void>::api_
sub rsp, 8
mov [rsp+120h+var_F8], rdi
mov r9d, 1
push rbx
call qword ptr [rax+188h]
add rsp, 10h
mov rdi, rax
call _ZN3Ort12ThrowOnErrorEP9OrtStatus; Ort::ThrowOnError(OrtStatus *)
mov [rsp+118h+var_B0], r15
mov [rsp+118h+var_A8], r14
mov rdi, rsp
mov rax, [rdi]
mov [rsp+118h+var_100], rax
mov r13, [r12+10h]
mov rbx, [r12+40h]
mov rax, [r12+0B8h]
mov [rsp+118h+var_98], rax
mov rax, [r12+70h]
mov [rsp+118h+var_A0], rax
mov rbp, [r12+0C0h]
vpxor xmm0, xmm0, xmm0
vmovdqa xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov rsi, rbp
call _ZNSt6vectorIN3Ort5ValueESaIS1_EE7reserveEm; std::vector<Ort::Value>::reserve(ulong)
test rbp, rbp
jz short loc_9341
mov r14, rsp
lea r15, [rsp+118h+var_F0]
mov r12, rbp
loc_930A:
mov [rsp+118h+var_F0], 0
mov rsi, [rsp+118h+var_110]
cmp rsi, [rsp+118h+var_108]
jz short loc_9331
mov qword ptr [rsi], 0
add rsi, 8
mov [rsp+118h+var_110], rsi
jmp short loc_933C
loc_9331:
mov rdi, r14
mov rdx, r15
call _ZNSt6vectorIN3Ort5ValueESaIS1_EE17_M_realloc_insertIJDnEEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_; std::vector<Ort::Value>::_M_realloc_insert<decltype(nullptr)>(__gnu_cxx::__normal_iterator<Ort::Value*,std::vector<Ort::Value>>,decltype(nullptr) &&)
loc_933C:
dec r12
jnz short loc_930A
loc_9341:
mov rax, cs:_ZN3Ort6GlobalIvE4api_E; Ort::Global<void>::api_
mov rdi, [r13+0]
lea rcx, [rsp+118h+var_100]
xor esi, esi
mov rdx, rbx
mov r8, [rsp+118h+var_98]
mov r9, [rsp+118h+var_A0]
push [rsp+118h+var_118]
push rbp
call qword ptr [rax+48h]
add rsp, 10h
mov rdi, rax
call _ZN3Ort12ThrowOnErrorEP9OrtStatus; Ort::ThrowOnError(OrtStatus *)
mov rax, cs:_ZN3Ort6GlobalIvE4api_E; Ort::Global<void>::api_
xor edi, edi
call qword ptr [rax+308h]
mov rbx, [rsp+118h+var_A8]
mov rax, [rsp+118h+var_B0]
mov rax, [rax+40h]
vmovq xmm0, qword ptr [rax]
vprolq xmm0, xmm0, 20h ; ' '
lea rdx, [rsp+118h+var_F0]
vmovq qword ptr [rdx], xmm0
mov rcx, [rsp+118h+var_118]
mov rdi, rbx; this
call _ZN13DepthAnything17postprocessSingleERKN2cv5Size_IiEERKN3Ort5ValueE; DepthAnything::postprocessSingle(cv::Size_<int> const&,Ort::Value const&)
mov rdi, rsp
call _ZNSt6vectorIN3Ort5ValueESaIS1_EED2Ev; std::vector<Ort::Value>::~vector()
mov rdi, [rsp+118h+var_100]
mov rax, cs:_ZN3Ort6GlobalIvE4api_E; Ort::Global<void>::api_
call qword ptr [rax+300h]
mov rax, cs:_ZN3Ort6GlobalIvE4api_E; Ort::Global<void>::api_
mov rdi, [rsp+118h+var_F8]
call qword ptr [rax+2F0h]
lea rdi, [rsp+118h+var_90]; this
call __ZN2cv3MatD1Ev; cv::Mat::~Mat()
mov rdi, [rsp+118h+var_E8]; void *
test rdi, rdi
jz short loc_9403
mov rsi, [rsp+118h+var_D8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9403:
mov rdi, [rsp+118h+var_C8]; void *
test rdi, rdi
jz short loc_941A
mov rsi, [rsp+118h+var_B8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_941A:
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp loc_9515
jmp loc_9515
mov r15, rdx
mov rbx, rax
mov rdi, rsp
call _ZNSt6vectorIN3Ort5ValueESaIS1_EED2Ev; std::vector<Ort::Value>::~vector()
jmp short loc_948D
jmp loc_9515
mov r15, rdx
mov rbx, rax
jmp short loc_949F
mov r15, rdx
mov rbx, rax
jmp short loc_94B1
mov r15, rdx
mov rbx, rax
jmp short loc_94BE
mov r15, rdx
mov rbx, rax
jmp short loc_94EC
jmp short $+2
loc_9470:
mov r15, rdx
mov rbx, rax
mov rdi, rsp
call _ZNSt6vectorIN3Ort5ValueESaIS1_EED2Ev; std::vector<Ort::Value>::~vector()
mov rax, cs:_ZN3Ort6GlobalIvE4api_E; Ort::Global<void>::api_
xor edi, edi
call qword ptr [rax+308h]
loc_948D:
mov rdi, [rsp+118h+var_100]
mov rax, cs:_ZN3Ort6GlobalIvE4api_E; Ort::Global<void>::api_
call qword ptr [rax+300h]
loc_949F:
mov rax, cs:_ZN3Ort6GlobalIvE4api_E; Ort::Global<void>::api_
mov rdi, [rsp+118h+var_F8]
call qword ptr [rax+2F0h]
loc_94B1:
lea rdi, [rsp+118h+var_90]; this
call __ZN2cv3MatD1Ev; cv::Mat::~Mat()
loc_94BE:
mov rdi, [rsp+118h+var_E8]; void *
test rdi, rdi
jz short loc_94D5
mov rsi, [rsp+118h+var_D8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_94D5:
mov rdi, [rsp+118h+var_C8]; void *
test rdi, rdi
jz short loc_94EC
mov rsi, [rsp+118h+var_B8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_94EC:
cmp r15d, 1
jnz short loc_9509
mov rdi, rbx; void *
call ___cxa_begin_catch
call ___cxa_rethrow
jmp short loc_9515
mov rbx, rax
call ___cxa_end_catch
loc_9509:
mov rdi, rbx
call __Unwind_Resume
jmp short loc_9515
jmp short $+2
loc_9515:
mov rdi, rax
call __clang_call_terminate
|
cv::Mat * DepthAnything::predict(
DepthAnything *this,
const cv::Mat *a2,
cv::Mat *a3,
__m128 _XMM0,
__m128 a5)
{
long long v8; // rax
long long v9; // rax
_QWORD *v11; // r13
long long v12; // rbx
long long v13; // rbp
long long v15; // r12
_QWORD *v16; // rsi
long long v17; // rax
double v18; // xmm0_8
cv::Mat *v19; // rbx
_QWORD *v25; // [rsp+0h] [rbp-118h] BYREF
_QWORD *v26; // [rsp+8h] [rbp-110h]
_QWORD *v27; // [rsp+10h] [rbp-108h]
_QWORD *v28; // [rsp+18h] [rbp-100h] BYREF
_QWORD *v29; // [rsp+20h] [rbp-F8h]
long long v30; // [rsp+28h] [rbp-F0h] BYREF
void *v31[2]; // [rsp+30h] [rbp-E8h] BYREF
long long v32; // [rsp+40h] [rbp-D8h]
void *v33[3]; // [rsp+50h] [rbp-C8h] BYREF
cv::Mat *v34; // [rsp+68h] [rbp-B0h]
cv::Mat *v35; // [rsp+70h] [rbp-A8h]
long long v36; // [rsp+78h] [rbp-A0h]
long long v37; // [rsp+80h] [rbp-98h]
_QWORD v38[18]; // [rsp+88h] [rbp-90h] BYREF
v38[0] = 1LL;
v38[1] = 3LL;
v38[2] = *((int *)a2 + 8);
v38[3] = *((int *)a2 + 7);
*(double *)_XMM0.m128_u64 = std::vector<long>::vector(v33, v38, 4LL, v31);
__asm { vpxor xmm0, xmm0, xmm0 }
_RCX = v31;
__asm { vmovdqa xmmword ptr [rcx], xmm0 }
v32 = 0LL;
DepthAnything::preprocessSingle((cv::Mat *)v38, (long long)a2, a3, (long long)v31, (long long)v33, *(double *)&_XMM0, a5);
v8 = (*(long long ( **)(long long, _QWORD, _QWORD **))(Ort::Global<void>::api_ + 552))(1LL, 0LL, &v25);
*(double *)&_XMM0 = Ort::ThrowOnError(v8);
v29 = v25;
v9 = (*(long long ( **)(_QWORD *, void *, signed long long, void *, signed long long, long long, double, _QWORD **))(Ort::Global<void>::api_ + 392))(
v25,
v31[0],
(char *)v31[1] - (char *)v31[0],
v33[0],
((char *)v33[1] - (char *)v33[0]) >> 3,
1LL,
*(double *)&_XMM0,
&v25);
*(double *)&_XMM0 = Ort::ThrowOnError(v9);
v34 = a3;
v35 = this;
_RDI = &v25;
v28 = v25;
v11 = (_QWORD *)*((_QWORD *)a2 + 2);
v12 = *((_QWORD *)a2 + 8);
v37 = *((_QWORD *)a2 + 23);
v36 = *((_QWORD *)a2 + 14);
v13 = *((_QWORD *)a2 + 24);
__asm
{
vpxor xmm0, xmm0, xmm0
vmovdqa xmmword ptr [rdi], xmm0
}
v27 = 0LL;
std::vector<Ort::Value>::reserve(&v25, v13);
if ( v13 )
{
v15 = v13;
do
{
v30 = 0LL;
v16 = v26;
if ( v26 == v27 )
{
std::vector<Ort::Value>::_M_realloc_insert<decltype(nullptr)>(&v25, v26, &v30);
}
else
{
*v26 = 0LL;
v26 = v16 + 1;
}
--v15;
}
while ( v15 );
}
v17 = (*(long long ( **)(_QWORD, _QWORD, long long, _QWORD **, long long, long long, long long, _QWORD *))(Ort::Global<void>::api_ + 72))(
*v11,
0LL,
v12,
&v28,
v37,
v36,
v13,
v25);
v18 = Ort::ThrowOnError(v17);
(*(void ( **)(_QWORD, double))(Ort::Global<void>::api_ + 776))(0LL, v18);
v19 = v35;
_RAX = *((_QWORD *)v34 + 8);
__asm
{
vmovq xmm0, qword ptr [rax]
vprolq xmm0, xmm0, 20h ; ' '
}
_RDX = &v30;
__asm { vmovq qword ptr [rdx], xmm0 }
DepthAnything::postprocessSingle(v19, _XMM0, a5, 0LL, &v30, v25);
std::vector<Ort::Value>::~vector(&v25);
(*(void ( **)(_QWORD *))(Ort::Global<void>::api_ + 768))(v28);
(*(void ( **)(_QWORD *))(Ort::Global<void>::api_ + 752))(v29);
cv::Mat::~Mat((cv::Mat *)v38);
if ( v31[0] )
operator delete(v31[0], v32 - (unsigned long long)v31[0]);
if ( v33[0] )
operator delete(v33[0], (char *)v33[2] - (char *)v33[0]);
return v19;
}
|
predict:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
LEA RSI,[RSP + 0x88]
MOV qword ptr [RSI],0x1
MOV qword ptr [RSI + 0x8],0x3
MOVSXD RAX,dword ptr [R12 + 0x20]
MOV qword ptr [RSI + 0x10],RAX
MOVSXD RAX,dword ptr [R12 + 0x1c]
MOV qword ptr [RSI + 0x18],RAX
LAB_001091f3:
LEA RDI,[RSP + 0x50]
LEA RCX,[RSP + 0x30]
MOV EDX,0x4
CALL 0x0010cf58
VPXOR XMM0,XMM0,XMM0
LEA RCX,[RSP + 0x30]
VMOVDQA xmmword ptr [RCX],XMM0
MOV qword ptr [RCX + 0x10],0x0
LAB_0010921c:
LEA RDI,[RSP + 0x88]
LEA R8,[RSP + 0x50]
MOV RSI,R12
MOV RDX,R15
CALL 0x00108266
LAB_00109234:
MOV RAX,qword ptr [0x00115358]
MOV RBX,RSP
MOV EDI,0x1
XOR ESI,ESI
MOV RDX,RBX
CALL qword ptr [RAX + 0x228]
LAB_0010924e:
MOV RDI,RAX
CALL 0x0010d22a
LAB_00109256:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
SUB RDX,RSI
MOV RCX,qword ptr [RSP + 0x50]
MOV R8,qword ptr [RSP + 0x58]
SUB R8,RCX
SAR R8,0x3
MOV RAX,qword ptr [0x00115358]
SUB RSP,0x8
MOV qword ptr [RSP + 0x28],RDI
MOV R9D,0x1
PUSH RBX
CALL qword ptr [RAX + 0x188]
ADD RSP,0x10
LAB_00109299:
MOV RDI,RAX
CALL 0x0010d22a
MOV qword ptr [RSP + 0x68],R15
MOV qword ptr [RSP + 0x70],R14
MOV RDI,RSP
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP + 0x18],RAX
MOV R13,qword ptr [R12 + 0x10]
MOV RBX,qword ptr [R12 + 0x40]
MOV RAX,qword ptr [R12 + 0xb8]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [R12 + 0x70]
MOV qword ptr [RSP + 0x78],RAX
MOV RBP,qword ptr [R12 + 0xc0]
VPXOR XMM0,XMM0,XMM0
VMOVDQA xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
LAB_001092f2:
MOV RSI,RBP
CALL 0x0010e6a6
TEST RBP,RBP
JZ 0x00109341
MOV R14,RSP
LEA R15,[RSP + 0x28]
MOV R12,RBP
LAB_0010930a:
MOV qword ptr [RSP + 0x28],0x0
MOV RSI,qword ptr [RSP + 0x8]
CMP RSI,qword ptr [RSP + 0x10]
JZ 0x00109331
MOV qword ptr [RSI],0x0
ADD RSI,0x8
MOV qword ptr [RSP + 0x8],RSI
JMP 0x0010933c
LAB_00109331:
MOV RDI,R14
MOV RDX,R15
CALL 0x0010e7b0
LAB_0010933c:
DEC R12
JNZ 0x0010930a
LAB_00109341:
MOV RAX,qword ptr [0x00115358]
MOV RDI,qword ptr [R13]
LEA RCX,[RSP + 0x18]
XOR ESI,ESI
MOV RDX,RBX
MOV R8,qword ptr [RSP + 0x80]
MOV R9,qword ptr [RSP + 0x78]
PUSH qword ptr [RSP]
PUSH RBP
CALL qword ptr [RAX + 0x48]
ADD RSP,0x10
LAB_0010936e:
MOV RDI,RAX
CALL 0x0010d22a
MOV RAX,qword ptr [0x00115358]
LAB_0010937d:
XOR EDI,EDI
CALL qword ptr [RAX + 0x308]
MOV RBX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RAX + 0x40]
VMOVQ XMM0,qword ptr [RAX]
VPROLQ XMM0,XMM0,0x20
LEA RDX,[RSP + 0x28]
VMOVQ qword ptr [RDX],XMM0
MOV RCX,qword ptr [RSP]
LAB_001093ab:
MOV RDI,RBX
CALL 0x00108c16
MOV RDI,RSP
CALL 0x0010cfa0
MOV RDI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [0x00115358]
LAB_001093c7:
CALL qword ptr [RAX + 0x300]
MOV RAX,qword ptr [0x00115358]
LAB_001093d4:
MOV RDI,qword ptr [RSP + 0x20]
CALL qword ptr [RAX + 0x2f0]
LEA RDI,[RSP + 0x88]
CALL 0x001070a0
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x00109403
MOV RSI,qword ptr [RSP + 0x40]
SUB RSI,RDI
CALL 0x00107300
LAB_00109403:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x0010941a
MOV RSI,qword ptr [RSP + 0x60]
SUB RSI,RDI
CALL 0x00107300
LAB_0010941a:
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* DepthAnything::predict(cv::Mat const&) */
Size_ * DepthAnything::predict(Mat *param_1)
{
int8 *puVar1;
int8 uVar2;
ulong uVar3;
Mat *pMVar4;
OrtStatus *pOVar5;
vector *in_RDX;
vector *in_RSI;
Value *pVVar6;
ulong uVar7;
int1 auVar8 [16];
int1 local_118 [16];
int8 *local_108;
int8 local_100;
int8 local_f8;
int8 local_f0;
int1 local_e8 [16];
long local_d8;
void *local_c8;
long local_c0;
long local_b8;
vector *local_b0;
Mat *local_a8;
int8 local_a0;
int8 local_98;
int8 local_90;
int8 local_88;
long local_80;
long local_78;
local_90 = 1;
local_88 = 3;
local_80 = (long)*(int *)(in_RSI + 0x20);
local_78 = (long)*(int *)(in_RSI + 0x1c);
/* try { // try from 001091f3 to 00109206 has its CatchHandler @ 00109466 */
std::vector<long,std::allocator<long>>::vector
((vector<long,std::allocator<long>> *)&local_c8,&local_90,4,local_e8);
local_e8 = (int1 [16])0x0;
local_d8 = 0;
/* try { // try from 0010921c to 00109233 has its CatchHandler @ 0010945e */
preprocessSingle((Mat *)&local_90,in_RSI,in_RDX);
pOVar5 = (OrtStatus *)(**(code **)(Ort::Global<void>::api_ + 0x228))(1,0,local_118);
/* try { // try from 0010924e to 00109255 has its CatchHandler @ 00109456 */
Ort::ThrowOnError(pOVar5);
local_f8 = local_118._0_8_;
pOVar5 = (OrtStatus *)
(**(code **)(Ort::Global<void>::api_ + 0x188))
(local_118._0_8_,local_e8._0_8_,local_e8._8_8_ - local_e8._0_8_,local_c8,
local_c0 - (long)local_c8 >> 3,1,local_118);
/* try { // try from 00109299 to 001092a0 has its CatchHandler @ 0010944e */
Ort::ThrowOnError(pOVar5);
local_100 = local_118._0_8_;
puVar1 = *(int8 **)(in_RSI + 0x10);
uVar2 = *(int8 *)(in_RSI + 0x40);
local_98 = *(int8 *)(in_RSI + 0xb8);
local_a0 = *(int8 *)(in_RSI + 0x70);
uVar3 = *(ulong *)(in_RSI + 0xc0);
local_118 = (int1 [16])0x0;
local_108 = (int8 *)0x0;
local_b0 = in_RDX;
local_a8 = param_1;
/* try { // try from 001092f2 to 001092f9 has its CatchHandler @ 0010946e */
std::vector<Ort::Value,std::allocator<Ort::Value>>::reserve
((vector<Ort::Value,std::allocator<Ort::Value>> *)local_118,uVar3);
if (uVar3 != 0) {
uVar7 = uVar3;
do {
local_f0 = 0;
if ((int8 *)local_118._8_8_ == local_108) {
/* try { // try from 00109331 to 0010933b has its CatchHandler @ 00109470 */
std::vector<Ort::Value,std::allocator<Ort::Value>>::_M_realloc_insert<decltype(nullptr)>
(local_118,local_118._8_8_,&local_f0);
}
else {
*(int8 *)local_118._8_8_ = 0;
local_118._8_8_ = (int8 *)(local_118._8_8_ + 8);
}
uVar7 = uVar7 - 1;
} while (uVar7 != 0);
}
pVVar6 = (Value *)0x0;
pOVar5 = (OrtStatus *)
(**(code **)(Ort::Global<void>::api_ + 0x48))
(*puVar1,0,uVar2,&local_100,local_98,local_a0,uVar3,local_118._0_8_);
/* try { // try from 0010936e to 00109375 has its CatchHandler @ 0010946e */
Ort::ThrowOnError(pOVar5);
/* try { // try from 0010937d to 00109384 has its CatchHandler @ 00109449 */
(**(code **)(Ort::Global<void>::api_ + 0x308))(0);
pMVar4 = local_a8;
auVar8._8_8_ = 0;
auVar8._0_8_ = **(ulong **)(local_b0 + 0x40);
auVar8 = vprolq_avx512vl(auVar8,0x20);
local_f0 = auVar8._0_8_;
/* try { // try from 001093ab to 001093b2 has its CatchHandler @ 00109439 */
postprocessSingle((Size_ *)local_a8,pVVar6);
std::vector<Ort::Value,std::allocator<Ort::Value>>::~vector
((vector<Ort::Value,std::allocator<Ort::Value>> *)local_118);
/* try { // try from 001093c7 to 001093cc has its CatchHandler @ 00109434 */
(**(code **)(Ort::Global<void>::api_ + 0x300))(local_100);
/* try { // try from 001093d4 to 001093de has its CatchHandler @ 0010942f */
(**(code **)(Ort::Global<void>::api_ + 0x2f0))(local_f8);
cv::Mat::~Mat((Mat *)&local_90);
if ((void *)local_e8._0_8_ != (void *)0x0) {
operator_delete((void *)local_e8._0_8_,local_d8 - local_e8._0_8_);
}
if (local_c8 != (void *)0x0) {
operator_delete(local_c8,local_b8 - (long)local_c8);
}
return (Size_ *)pMVar4;
}
|
|
59,880
|
spdlog::details::os::mkdir_(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/os-inl.h
|
static SPDLOG_INLINE bool mkdir_(const filename_t &path) {
#ifdef _WIN32
#ifdef SPDLOG_WCHAR_FILENAMES
return ::_wmkdir(path.c_str()) == 0;
#else
return ::_mkdir(path.c_str()) == 0;
#endif
#else
return ::mkdir(path.c_str(), mode_t(0755)) == 0;
#endif
}
|
O0
|
c
|
spdlog::details::os::mkdir_(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rdi
callq 0x20e00
movq %rax, %rdi
movl $0x1ed, %esi # imm = 0x1ED
callq 0x15320
cmpl $0x0, %eax
sete %al
andb $0x1, %al
popq %rcx
retq
nopw %cs:(%rax,%rax)
|
_ZN6spdlog7details2osL6mkdir_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rax
mov [rsp+8+var_8], rdi
mov rdi, [rsp+8+var_8]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, rax
mov esi, 1EDh
call _mkdir
cmp eax, 0
setz al
and al, 1
pop rcx
retn
|
bool spdlog::details::os::mkdir_(long long a1)
{
long long v1; // rax
v1 = std::string::c_str(a1);
return (unsigned int)mkdir(v1, 493LL) == 0;
}
|
mkdir_:
PUSH RAX
MOV qword ptr [RSP],RDI
MOV RDI,qword ptr [RSP]
CALL 0x00120e00
MOV RDI,RAX
MOV ESI,0x1ed
CALL 0x00115320
CMP EAX,0x0
SETZ AL
AND AL,0x1
POP RCX
RET
|
/* spdlog::details::os::mkdir_(std::__cxx11::string const&) */
bool spdlog::details::os::mkdir_(string *param_1)
{
char *__path;
int iVar1;
__path = (char *)std::__cxx11::string::c_str(param_1);
iVar1 = mkdir(__path,0x1ed);
return iVar1 == 0;
}
|
|
59,881
|
push_state
|
bluesky950520[P]quickjs/libregexp.c
|
static int push_state(REExecContext *s,
uint8_t **capture,
StackInt *stack, size_t stack_len,
const uint8_t *pc, const uint8_t *cptr,
REExecStateEnum type, size_t count)
{
REExecState *rs;
uint8_t *new_stack;
size_t new_size, i, n;
StackInt *stack_buf;
if (unlikely((s->state_stack_len + 1) > s->state_stack_size)) {
/* reallocate the stack */
new_size = s->state_stack_size * 3 / 2;
if (new_size < 8)
new_size = 8;
new_stack = lre_realloc(s->opaque, s->state_stack, new_size * s->state_size);
if (!new_stack)
return -1;
s->state_stack_size = new_size;
s->state_stack = new_stack;
}
rs = (REExecState *)(s->state_stack + s->state_stack_len * s->state_size);
s->state_stack_len++;
rs->type = type;
rs->count = count;
rs->stack_len = stack_len;
rs->cptr = cptr;
rs->pc = pc;
n = 2 * s->capture_count;
for(i = 0; i < n; i++)
rs->buf[i] = capture[i];
stack_buf = (StackInt *)(rs->buf + n);
for(i = 0; i < stack_len; i++)
stack_buf[i] = stack[i];
return 0;
}
|
O1
|
c
|
push_state:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r13
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbp
movq 0x40(%rdi), %rdi
movq 0x48(%rbp), %rax
incq %rax
cmpq %rdi, %rax
ja 0x98074
movq 0x48(%rsp), %rcx
movl 0x40(%rsp), %edx
movq 0x38(%rbp), %rsi
movq 0x48(%rbp), %rdi
movq 0x30(%rbp), %r8
imulq %rdi, %r8
leaq (%rsi,%r8), %rax
incq %rdi
movq %rdi, 0x48(%rbp)
movb %dl, (%rsi,%r8)
movq %rcx, 0x8(%rsi,%r8)
movb %bl, 0x1(%rsi,%r8)
movq %r13, 0x10(%rsi,%r8)
movq %r12, 0x18(%rsi,%r8)
movl 0x14(%rbp), %edx
leal (%rdx,%rdx), %ecx
movslq %ecx, %rcx
testl %edx, %edx
je 0x98040
cmpq $0x1, %rcx
movq %rcx, %rdx
adcq $0x0, %rdx
xorl %esi, %esi
movq (%r15,%rsi,8), %rdi
movq %rdi, 0x20(%rax,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x9802f
testq %rbx, %rbx
je 0x98063
leaq (%rax,%rcx,8), %rcx
addq $0x20, %rcx
xorl %eax, %eax
xorl %edx, %edx
movq (%r14,%rdx,8), %rsi
movq %rsi, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rbx
jne 0x98051
jmp 0x98065
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x40(%rbp), %rdx
movq %rbp, %rsi
callq 0x139a1
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testb $0x1, %cl
je 0x97fd9
jmp 0x98065
nop
|
push_state:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13, r9
mov r12, r8
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov rbp, rdi
mov rdi, [rdi+40h]
mov rax, [rbp+48h]
inc rax
cmp rax, rdi
ja loc_98074
loc_97FD9:
mov rcx, [rsp+38h+arg_8]
mov edx, [rsp+38h+arg_0]
mov rsi, [rbp+38h]
mov rdi, [rbp+48h]
mov r8, [rbp+30h]
imul r8, rdi
lea rax, [rsi+r8]
inc rdi
mov [rbp+48h], rdi
mov [rsi+r8], dl
mov [rsi+r8+8], rcx
mov [rsi+r8+1], bl
mov [rsi+r8+10h], r13
mov [rsi+r8+18h], r12
mov edx, [rbp+14h]
lea ecx, [rdx+rdx]
movsxd rcx, ecx
test edx, edx
jz short loc_98040
cmp rcx, 1
mov rdx, rcx
adc rdx, 0
xor esi, esi
loc_9802F:
mov rdi, [r15+rsi*8]
mov [rax+rsi*8+20h], rdi
inc rsi
cmp rdx, rsi
jnz short loc_9802F
loc_98040:
test rbx, rbx
jz short loc_98063
lea rcx, [rax+rcx*8]
add rcx, 20h ; ' '
xor eax, eax
xor edx, edx
loc_98051:
mov rsi, [r14+rdx*8]
mov [rcx+rdx*8], rsi
inc rdx
cmp rbx, rdx
jnz short loc_98051
jmp short loc_98065
loc_98063:
xor eax, eax
loc_98065:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_98074:
lea rdx, [rbp+40h]
mov rsi, rbp
call push_state_cold_1
mov ecx, eax
mov eax, 0FFFFFFFFh
test cl, 1
jz loc_97FD9
jmp short loc_98065
|
long long push_state(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
char a7,
long long a8)
{
unsigned long long v14; // rdi
long long v15; // rdi
long long v16; // rax
int v17; // edx
long long v18; // rcx
long long v19; // rsi
long long v20; // rcx
long long result; // rax
long long v22; // rdx
char v23; // cl
v14 = *(_QWORD *)(a1 + 64);
if ( *(_QWORD *)(a1 + 72) + 1LL <= v14
|| (v23 = push_state_cold_1(v14, (_QWORD *)a1, (unsigned long long *)(a1 + 64)), result = 0xFFFFFFFFLL, (v23 & 1) == 0) )
{
v15 = *(_QWORD *)(a1 + 72);
v16 = *(_QWORD *)(a1 + 56) + v15 * *(_QWORD *)(a1 + 48);
*(_QWORD *)(a1 + 72) = v15 + 1;
*(_BYTE *)v16 = a7;
*(_QWORD *)(v16 + 8) = a8;
*(_BYTE *)(v16 + 1) = a4;
*(_QWORD *)(v16 + 16) = a6;
*(_QWORD *)(v16 + 24) = a5;
v17 = *(_DWORD *)(a1 + 20);
v18 = 2 * v17;
if ( v17 )
{
v19 = 0LL;
do
{
*(_QWORD *)(v16 + 8 * v19 + 32) = *(_QWORD *)(a2 + 8 * v19);
++v19;
}
while ( (v18 == 0) + v18 != v19 );
}
if ( a4 )
{
v20 = v16 + 8 * v18 + 32;
result = 0LL;
v22 = 0LL;
do
{
*(_QWORD *)(v20 + 8 * v22) = *(_QWORD *)(a3 + 8 * v22);
++v22;
}
while ( a4 != v22 );
}
else
{
return 0LL;
}
}
return result;
}
|
push_state:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13,R9
MOV R12,R8
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV RBP,RDI
MOV RDI,qword ptr [RDI + 0x40]
MOV RAX,qword ptr [RBP + 0x48]
INC RAX
CMP RAX,RDI
JA 0x00198074
LAB_00197fd9:
MOV RCX,qword ptr [RSP + 0x48]
MOV EDX,dword ptr [RSP + 0x40]
MOV RSI,qword ptr [RBP + 0x38]
MOV RDI,qword ptr [RBP + 0x48]
MOV R8,qword ptr [RBP + 0x30]
IMUL R8,RDI
LEA RAX,[RSI + R8*0x1]
INC RDI
MOV qword ptr [RBP + 0x48],RDI
MOV byte ptr [RSI + R8*0x1],DL
MOV qword ptr [RSI + R8*0x1 + 0x8],RCX
MOV byte ptr [RSI + R8*0x1 + 0x1],BL
MOV qword ptr [RSI + R8*0x1 + 0x10],R13
MOV qword ptr [RSI + R8*0x1 + 0x18],R12
MOV EDX,dword ptr [RBP + 0x14]
LEA ECX,[RDX + RDX*0x1]
MOVSXD RCX,ECX
TEST EDX,EDX
JZ 0x00198040
CMP RCX,0x1
MOV RDX,RCX
ADC RDX,0x0
XOR ESI,ESI
LAB_0019802f:
MOV RDI,qword ptr [R15 + RSI*0x8]
MOV qword ptr [RAX + RSI*0x8 + 0x20],RDI
INC RSI
CMP RDX,RSI
JNZ 0x0019802f
LAB_00198040:
TEST RBX,RBX
JZ 0x00198063
LEA RCX,[RAX + RCX*0x8]
ADD RCX,0x20
XOR EAX,EAX
XOR EDX,EDX
LAB_00198051:
MOV RSI,qword ptr [R14 + RDX*0x8]
MOV qword ptr [RCX + RDX*0x8],RSI
INC RDX
CMP RBX,RDX
JNZ 0x00198051
JMP 0x00198065
LAB_00198063:
XOR EAX,EAX
LAB_00198065:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00198074:
LEA RDX,[RBP + 0x40]
MOV RSI,RBP
CALL 0x001139a1
MOV ECX,EAX
MOV EAX,0xffffffff
TEST CL,0x1
JZ 0x00197fd9
JMP 0x00198065
|
int8
push_state(long param_1,long param_2,long param_3,long param_4,int8 param_5,int8 param_6
,int1 param_7,int8 param_8)
{
long lVar1;
uint uVar2;
long lVar3;
long lVar4;
long lVar5;
if ((*(ulong *)(param_1 + 0x40) < *(long *)(param_1 + 0x48) + 1U) &&
(uVar2 = push_state_cold_1(*(ulong *)(param_1 + 0x40),param_1,param_1 + 0x40), (uVar2 & 1) != 0
)) {
return 0xffffffff;
}
lVar1 = *(long *)(param_1 + 0x38);
lVar5 = *(long *)(param_1 + 0x30) * *(long *)(param_1 + 0x48);
*(long *)(param_1 + 0x48) = *(long *)(param_1 + 0x48) + 1;
*(int1 *)(lVar1 + lVar5) = param_7;
*(int8 *)(lVar1 + 8 + lVar5) = param_8;
*(char *)(lVar1 + 1 + lVar5) = (char)param_4;
*(int8 *)(lVar1 + 0x10 + lVar5) = param_6;
*(int8 *)(lVar1 + 0x18 + lVar5) = param_5;
lVar3 = (long)(*(int *)(param_1 + 0x14) * 2);
if (*(int *)(param_1 + 0x14) != 0) {
lVar4 = 0;
do {
*(int8 *)(lVar1 + lVar5 + 0x20 + lVar4 * 8) = *(int8 *)(param_2 + lVar4 * 8);
lVar4 = lVar4 + 1;
} while (lVar3 + (ulong)(lVar3 == 0) != lVar4);
}
if (param_4 != 0) {
lVar4 = 0;
do {
*(int8 *)(lVar1 + lVar5 + lVar3 * 8 + 0x20 + lVar4 * 8) =
*(int8 *)(param_3 + lVar4 * 8);
lVar4 = lVar4 + 1;
} while (param_4 != lVar4);
}
return 0;
}
|
|
59,882
|
push_state
|
bluesky950520[P]quickjs/libregexp.c
|
static int push_state(REExecContext *s,
uint8_t **capture,
StackInt *stack, size_t stack_len,
const uint8_t *pc, const uint8_t *cptr,
REExecStateEnum type, size_t count)
{
REExecState *rs;
uint8_t *new_stack;
size_t new_size, i, n;
StackInt *stack_buf;
if (unlikely((s->state_stack_len + 1) > s->state_stack_size)) {
/* reallocate the stack */
new_size = s->state_stack_size * 3 / 2;
if (new_size < 8)
new_size = 8;
new_stack = lre_realloc(s->opaque, s->state_stack, new_size * s->state_size);
if (!new_stack)
return -1;
s->state_stack_size = new_size;
s->state_stack = new_stack;
}
rs = (REExecState *)(s->state_stack + s->state_stack_len * s->state_size);
s->state_stack_len++;
rs->type = type;
rs->count = count;
rs->stack_len = stack_len;
rs->cptr = cptr;
rs->pc = pc;
n = 2 * s->capture_count;
for(i = 0; i < n; i++)
rs->buf[i] = capture[i];
stack_buf = (StackInt *)(rs->buf + n);
for(i = 0; i < stack_len; i++)
stack_buf[i] = stack[i];
return 0;
}
|
O2
|
c
|
push_state:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r13
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbp
movq 0x40(%rdi), %rax
movq 0x48(%rdi), %rcx
leaq 0x1(%rcx), %rdx
cmpq %rax, %rdx
ja 0x7ee46
movq 0x38(%rbp), %rax
movq 0x48(%rsp), %rsi
movl 0x40(%rsp), %edi
imulq 0x30(%rbp), %rcx
movq %rdx, 0x48(%rbp)
addq %rcx, %rax
addq $0x20, %rax
movb %dil, -0x20(%rax)
movq %rsi, -0x18(%rax)
movb %bl, -0x1f(%rax)
movq %r13, -0x10(%rax)
movq %r12, -0x8(%rax)
movslq 0x14(%rbp), %rcx
addq %rcx, %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x7ee2c
movq (%r15,%rdx,8), %rsi
movq %rsi, (%rax,%rdx,8)
incq %rdx
jmp 0x7ee1a
leaq (%rax,%rcx,8), %rcx
xorl %eax, %eax
xorl %edx, %edx
cmpq %rdx, %rbx
je 0x7ee92
movq (%r14,%rdx,8), %rsi
movq %rsi, (%rcx,%rdx,8)
incq %rdx
jmp 0x7ee34
leaq (%rax,%rax,2), %rax
shrq %rax
cmpq $0x9, %rax
pushq $0x8
popq %rcx
cmovaeq %rax, %rcx
movq 0x28(%rbp), %rdi
movq 0x38(%rbp), %rsi
movq 0x30(%rbp), %rdx
movq %rcx, (%rsp)
imulq %rcx, %rdx
callq 0x2cba5
testq %rax, %rax
je 0x7ee8f
movq (%rsp), %rcx
movq %rcx, 0x40(%rbp)
movq %rax, 0x38(%rbp)
movq 0x48(%rbp), %rcx
leaq 0x1(%rcx), %rdx
jmp 0x7ede5
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
push_state:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13, r9
mov r12, r8
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov rbp, rdi
mov rax, [rdi+40h]
mov rcx, [rdi+48h]
lea rdx, [rcx+1]
cmp rdx, rax
ja short loc_7EE46
mov rax, [rbp+38h]
loc_7EDE5:
mov rsi, [rsp+38h+arg_8]
mov edi, [rsp+38h+arg_0]
imul rcx, [rbp+30h]
mov [rbp+48h], rdx
add rax, rcx
add rax, 20h ; ' '
mov [rax-20h], dil
mov [rax-18h], rsi
mov [rax-1Fh], bl
mov [rax-10h], r13
mov [rax-8], r12
movsxd rcx, dword ptr [rbp+14h]
add rcx, rcx
xor edx, edx
loc_7EE1A:
cmp rcx, rdx
jz short loc_7EE2C
mov rsi, [r15+rdx*8]
mov [rax+rdx*8], rsi
inc rdx
jmp short loc_7EE1A
loc_7EE2C:
lea rcx, [rax+rcx*8]
xor eax, eax
xor edx, edx
loc_7EE34:
cmp rbx, rdx
jz short loc_7EE92
mov rsi, [r14+rdx*8]
mov [rcx+rdx*8], rsi
inc rdx
jmp short loc_7EE34
loc_7EE46:
lea rax, [rax+rax*2]
shr rax, 1
cmp rax, 9
push 8
pop rcx
cmovnb rcx, rax
mov rdi, [rbp+28h]
mov rsi, [rbp+38h]
mov rdx, [rbp+30h]
mov [rsp+38h+var_38], rcx
imul rdx, rcx
call lre_realloc
test rax, rax
jz short loc_7EE8F
mov rcx, [rsp+38h+var_38]
mov [rbp+40h], rcx
mov [rbp+38h], rax
mov rcx, [rbp+48h]
lea rdx, [rcx+1]
jmp loc_7EDE5
loc_7EE8F:
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_7EE92:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long push_state(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
char a7,
long long a8)
{
unsigned long long v12; // rax
long long v13; // rcx
long long v14; // rdx
long long v15; // rax
long long v16; // rcx
long long v17; // rax
long long v18; // rcx
long long i; // rdx
long long v20; // rcx
long long result; // rax
long long j; // rdx
unsigned long long v23; // rax
long long v24; // rcx
long long v25; // [rsp+0h] [rbp-38h]
v12 = *(_QWORD *)(a1 + 64);
v13 = *(_QWORD *)(a1 + 72);
v14 = v13 + 1;
if ( v13 + 1 > v12 )
{
v23 = (3 * v12) >> 1;
v24 = 8LL;
if ( v23 >= 9 )
v24 = v23;
v25 = v24;
v15 = lre_realloc(*(_QWORD *)(a1 + 40), *(_QWORD *)(a1 + 56), v24 * *(_QWORD *)(a1 + 48));
if ( !v15 )
return -1LL;
*(_QWORD *)(a1 + 64) = v25;
*(_QWORD *)(a1 + 56) = v15;
v13 = *(_QWORD *)(a1 + 72);
v14 = v13 + 1;
}
else
{
v15 = *(_QWORD *)(a1 + 56);
}
v16 = *(_QWORD *)(a1 + 48) * v13;
*(_QWORD *)(a1 + 72) = v14;
v17 = v16 + v15 + 32;
*(_BYTE *)(v17 - 32) = a7;
*(_QWORD *)(v17 - 24) = a8;
*(_BYTE *)(v17 - 31) = a4;
*(_QWORD *)(v17 - 16) = a6;
*(_QWORD *)(v17 - 8) = a5;
v18 = 2LL * *(int *)(a1 + 20);
for ( i = 0LL; v18 != i; ++i )
*(_QWORD *)(v17 + 8 * i) = *(_QWORD *)(a2 + 8 * i);
v20 = v17 + 8 * v18;
result = 0LL;
for ( j = 0LL; a4 != j; ++j )
*(_QWORD *)(v20 + 8 * j) = *(_QWORD *)(a3 + 8 * j);
return result;
}
|
push_state:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13,R9
MOV R12,R8
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV RBP,RDI
MOV RAX,qword ptr [RDI + 0x40]
MOV RCX,qword ptr [RDI + 0x48]
LEA RDX,[RCX + 0x1]
CMP RDX,RAX
JA 0x0017ee46
MOV RAX,qword ptr [RBP + 0x38]
LAB_0017ede5:
MOV RSI,qword ptr [RSP + 0x48]
MOV EDI,dword ptr [RSP + 0x40]
IMUL RCX,qword ptr [RBP + 0x30]
MOV qword ptr [RBP + 0x48],RDX
ADD RAX,RCX
ADD RAX,0x20
MOV byte ptr [RAX + -0x20],DIL
MOV qword ptr [RAX + -0x18],RSI
MOV byte ptr [RAX + -0x1f],BL
MOV qword ptr [RAX + -0x10],R13
MOV qword ptr [RAX + -0x8],R12
MOVSXD RCX,dword ptr [RBP + 0x14]
ADD RCX,RCX
XOR EDX,EDX
LAB_0017ee1a:
CMP RCX,RDX
JZ 0x0017ee2c
MOV RSI,qword ptr [R15 + RDX*0x8]
MOV qword ptr [RAX + RDX*0x8],RSI
INC RDX
JMP 0x0017ee1a
LAB_0017ee2c:
LEA RCX,[RAX + RCX*0x8]
XOR EAX,EAX
XOR EDX,EDX
LAB_0017ee34:
CMP RBX,RDX
JZ 0x0017ee92
MOV RSI,qword ptr [R14 + RDX*0x8]
MOV qword ptr [RCX + RDX*0x8],RSI
INC RDX
JMP 0x0017ee34
LAB_0017ee46:
LEA RAX,[RAX + RAX*0x2]
SHR RAX,0x1
CMP RAX,0x9
PUSH 0x8
POP RCX
CMOVNC RCX,RAX
MOV RDI,qword ptr [RBP + 0x28]
MOV RSI,qword ptr [RBP + 0x38]
MOV RDX,qword ptr [RBP + 0x30]
MOV qword ptr [RSP],RCX
IMUL RDX,RCX
CALL 0x0012cba5
TEST RAX,RAX
JZ 0x0017ee8f
MOV RCX,qword ptr [RSP]
MOV qword ptr [RBP + 0x40],RCX
MOV qword ptr [RBP + 0x38],RAX
MOV RCX,qword ptr [RBP + 0x48]
LEA RDX,[RCX + 0x1]
JMP 0x0017ede5
LAB_0017ee8f:
PUSH -0x1
POP RAX
LAB_0017ee92:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
push_state(long param_1,long param_2,long param_3,long param_4,int8 param_5,int8 param_6
,int1 param_7,int8 param_8)
{
int iVar1;
int1 *puVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
long lVar6;
lVar6 = *(long *)(param_1 + 0x48);
uVar5 = lVar6 + 1;
if (*(ulong *)(param_1 + 0x40) < uVar5) {
uVar3 = *(ulong *)(param_1 + 0x40) * 3 >> 1;
uVar5 = 8;
if (8 < uVar3) {
uVar5 = uVar3;
}
lVar4 = lre_realloc(*(int8 *)(param_1 + 0x28),*(int8 *)(param_1 + 0x38),
*(long *)(param_1 + 0x30) * uVar5);
if (lVar4 == 0) {
return 0xffffffffffffffff;
}
*(ulong *)(param_1 + 0x40) = uVar5;
*(long *)(param_1 + 0x38) = lVar4;
lVar6 = *(long *)(param_1 + 0x48);
uVar5 = lVar6 + 1;
}
else {
lVar4 = *(long *)(param_1 + 0x38);
}
*(ulong *)(param_1 + 0x48) = uVar5;
puVar2 = (int1 *)(lVar4 + lVar6 * *(long *)(param_1 + 0x30));
*puVar2 = param_7;
*(int8 *)(puVar2 + 8) = param_8;
puVar2[1] = (char)param_4;
*(int8 *)(puVar2 + 0x10) = param_6;
*(int8 *)(puVar2 + 0x18) = param_5;
iVar1 = *(int *)(param_1 + 0x14);
for (lVar6 = 0; (long)iVar1 * 2 != lVar6; lVar6 = lVar6 + 1) {
*(int8 *)(puVar2 + lVar6 * 8 + 0x20) = *(int8 *)(param_2 + lVar6 * 8);
}
for (lVar6 = 0; param_4 != lVar6; lVar6 = lVar6 + 1) {
*(int8 *)(puVar2 + lVar6 * 8 + (long)iVar1 * 0x10 + 0x20) =
*(int8 *)(param_3 + lVar6 * 8);
}
return 0;
}
|
|
59,883
|
bool fmt::v10::detail::dragonbox::check_divisibility_and_divide_by_pow10<1>(unsigned int&)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format-inl.h
|
auto check_divisibility_and_divide_by_pow10(uint32_t& n) noexcept -> bool {
// The numbers below are chosen such that:
// 1. floor(n/d) = floor(nm / 2^k) where d=10 or d=100,
// 2. nm mod 2^k < m if and only if n is divisible by d,
// where m is magic_number, k is shift_amount
// and d is divisor.
//
// Item 1 is a common technique of replacing division by a constant with
// multiplication, see e.g. "Division by Invariant Integers Using
// Multiplication" by Granlund and Montgomery (1994). magic_number (m) is set
// to ceil(2^k/d) for large enough k.
// The idea for item 2 originates from Schubfach.
constexpr auto info = div_small_pow10_infos[N - 1];
FMT_ASSERT(n <= info.divisor * 10, "n is too large");
constexpr uint32_t magic_number =
(1u << info.shift_amount) / info.divisor + 1;
n *= magic_number;
const uint32_t comparison_mask = (1u << info.shift_amount) - 1;
bool result = (n & comparison_mask) < magic_number;
n >>= info.shift_amount;
return result;
}
|
O0
|
c
|
bool fmt::v10::detail::dragonbox::check_divisibility_and_divide_by_pow10<1>(unsigned int&):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x86e78(%rip), %rax # 0x152088
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
cmpl $0x3e8, (%rax) # imm = 0x3E8
setbe %al
andb $0x1, %al
movb %al, 0x17(%rsp)
leaq 0x17(%rsp), %rdi
leaq 0x8754d(%rip), %rsi # 0x152782
callq 0x855d0
movl $0x290, 0x10(%rsp) # imm = 0x290
movq 0x20(%rsp), %rax
imull $0x290, (%rax), %ecx # imm = 0x290
movl %ecx, (%rax)
movl $0xffff, 0xc(%rsp) # imm = 0xFFFF
movq 0x20(%rsp), %rax
movl (%rax), %eax
andl $0xffff, %eax # imm = 0xFFFF
cmpl $0x290, %eax # imm = 0x290
setb %al
andb $0x1, %al
movb %al, 0xb(%rsp)
movq 0x20(%rsp), %rax
movl (%rax), %ecx
shrl $0x10, %ecx
movl %ecx, (%rax)
movb 0xb(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopl (%rax,%rax)
|
_ZN3fmt3v106detail9dragonbox38check_divisibility_and_divide_by_pow10ILi2EEEbRj:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov rax, cs:qword_152088
mov [rsp+28h+var_10], rax
mov rax, [rsp+28h+var_8]
cmp dword ptr [rax], 3E8h
setbe al
and al, 1
mov [rsp+28h+var_11], al
lea rdi, [rsp+28h+var_11]
lea rsi, aNIsTooLarge; "n is too large"
call _ZN3fmt3v106detail13ignore_unusedIJbA15_cEEEvDpRKT_; fmt::v10::detail::ignore_unused<bool,char [15]>(bool,char [15] const&)
mov [rsp+28h+var_18], 290h
mov rax, [rsp+28h+var_8]
imul ecx, [rax], 290h
mov [rax], ecx
mov [rsp+28h+var_1C], 0FFFFh
mov rax, [rsp+28h+var_8]
mov eax, [rax]
and eax, 0FFFFh
cmp eax, 290h
setb al
and al, 1
mov [rsp+28h+var_1D], al
mov rax, [rsp+28h+var_8]
mov ecx, [rax]
shr ecx, 10h
mov [rax], ecx
mov al, [rsp+28h+var_1D]
and al, 1
add rsp, 28h
retn
|
bool fmt::v10::detail::dragonbox::check_divisibility_and_divide_by_pow10<2>(_DWORD *a1)
{
bool v2; // [rsp+Bh] [rbp-1Dh]
fmt::v10::detail::ignore_unused<bool,char [15]>();
*a1 *= 656;
v2 = (unsigned __int16)*a1 < 0x290u;
*a1 >>= 16;
return v2;
}
|
check_divisibility_and_divide_by_pow10<2>:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr [0x00252088]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x20]
CMP dword ptr [RAX],0x3e8
SETBE AL
AND AL,0x1
MOV byte ptr [RSP + 0x17],AL
LEA RDI,[RSP + 0x17]
LEA RSI,[0x252782]
CALL 0x001855d0
MOV dword ptr [RSP + 0x10],0x290
MOV RAX,qword ptr [RSP + 0x20]
IMUL ECX,dword ptr [RAX],0x290
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + 0xc],0xffff
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX]
AND EAX,0xffff
CMP EAX,0x290
SETC AL
AND AL,0x1
MOV byte ptr [RSP + 0xb],AL
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RAX]
SHR ECX,0x10
MOV dword ptr [RAX],ECX
MOV AL,byte ptr [RSP + 0xb]
AND AL,0x1
ADD RSP,0x28
RET
|
/* bool fmt::v10::detail::dragonbox::check_divisibility_and_divide_by_pow10<2>(unsigned int&) */
bool fmt::v10::detail::dragonbox::check_divisibility_and_divide_by_pow10<2>(uint *param_1)
{
uint uVar1;
bool local_11;
int8 local_10;
uint *local_8;
local_10 = DAT_00252088;
local_11 = *param_1 < 0x3e9;
local_8 = param_1;
ignore_unused<bool,char[15]>(&local_11,"n is too large");
*local_8 = *local_8 * 0x290;
uVar1 = *local_8;
*local_8 = *local_8 >> 0x10;
return (uVar1 & 0xffff) < 0x290;
}
|
|
59,884
|
fs_get_cache_directory[abi:cxx11]()
|
llama.cpp/common/common.cpp
|
std::string fs_get_cache_directory() {
std::string cache_directory = "";
auto ensure_trailing_slash = [](std::string p) {
// Make sure to add trailing slash
if (p.back() != DIRECTORY_SEPARATOR) {
p += DIRECTORY_SEPARATOR;
}
return p;
};
if (getenv("LLAMA_CACHE")) {
cache_directory = std::getenv("LLAMA_CACHE");
} else {
#ifdef __linux__
if (std::getenv("XDG_CACHE_HOME")) {
cache_directory = std::getenv("XDG_CACHE_HOME");
} else {
cache_directory = std::getenv("HOME") + std::string("/.cache/");
}
#elif defined(__APPLE__)
cache_directory = std::getenv("HOME") + std::string("/Library/Caches/");
#elif defined(_WIN32)
cache_directory = std::getenv("LOCALAPPDATA");
#endif // __linux__
cache_directory = ensure_trailing_slash(cache_directory);
cache_directory += "llama.cpp";
}
return ensure_trailing_slash(cache_directory);
}
|
O3
|
cpp
|
fs_get_cache_directory[abi:cxx11]():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x26aad(%rip), %rdx # 0x11e7b1
leaq 0x28(%rsp), %rdi
movq %rdx, %rsi
callq 0x27fa8
leaq 0x2b851(%rip), %rdi # 0x123569
callq 0x20cb0
testq %rax, %rax
je 0xf7d4e
movq %rax, %r14
leaq 0x28(%rsp), %r15
movq 0x8(%r15), %r12
movq %rax, %rdi
callq 0x20660
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x20840
jmp 0xf7f6e
leaq 0x2b820(%rip), %rdi # 0x123575
callq 0x20cb0
testq %rax, %rax
je 0xf7d8b
movq %rax, %r14
leaq 0x28(%rsp), %r15
movq 0x8(%r15), %r12
movq %rax, %rdi
callq 0x20660
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x20840
jmp 0xf7e89
leaq 0x2b7ed(%rip), %rdi # 0x12357f
callq 0x20cb0
movq %rax, %r14
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2b7d6(%rip), %rsi # 0x123584
leaq 0x2b7d7(%rip), %rdx # 0x12358c
leaq 0x88(%rsp), %rdi
callq 0x27fa8
movq %r14, %rdi
callq 0x20660
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
movq %rax, %r8
callq 0x20230
movq %rax, %r15
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rax
movq %r15, %r12
addq $0x10, %r12
cmpq %r12, %rax
je 0xf7e10
movq %rax, 0x68(%rsp)
movq 0x10(%r15), %rax
movq %rax, 0x78(%rsp)
movq 0x8(%r15), %rbp
jmp 0xf7e23
movq 0x8(%r15), %rbp
leaq 0x1(%rbp), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x200e0
leaq 0x68(%rsp), %r13
movq %rbp, 0x8(%r13)
movq %r12, (%r15)
movq $0x0, 0x8(%r15)
movb $0x0, 0x10(%r15)
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
callq 0x208a0
movq (%r13), %rdi
cmpq %r14, %rdi
je 0xf7e5f
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x20170
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
leaq 0x38(%rsp), %rbp
je 0xf7e89
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x20170
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x27e94
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
cmpb $0x2f, -0x1(%rax,%rcx)
je 0xf7ece
leaq 0x8(%rsp), %rdi
movl $0x2f, %esi
callq 0x21370
movq 0x8(%rsp), %rax
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
cmpq %r14, %rax
je 0xf7ef2
movq %rax, 0x68(%rsp)
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0xf7f06
movq 0x10(%rsp), %r13
leaq 0x1(%r13), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x200e0
leaq 0x68(%rsp), %r12
movq %r13, 0x8(%r12)
movq %r14, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x208a0
movq (%r12), %rdi
cmpq %r15, %rdi
je 0xf7f46
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x20170
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xf7f5d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20170
leaq 0x1a28d(%rip), %rsi # 0x1121f1
leaq 0x28(%rsp), %rdi
callq 0x20b20
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x27e94
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
cmpb $0x2f, -0x1(%rax,%rcx)
je 0xf7fb3
leaq 0x48(%rsp), %rdi
movl $0x2f, %esi
callq 0x21370
movq 0x48(%rsp), %rax
leaq 0x10(%rbx), %rdi
movq %rdi, (%rbx)
cmpq %r14, %rax
je 0xf7fd2
movq %rax, (%rbx)
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rbx)
movq 0x50(%rsp), %r15
jmp 0xf7fe3
movq 0x50(%rsp), %r15
leaq 0x1(%r15), %rdx
movq %r14, %rsi
callq 0x200e0
movq %r15, 0x8(%rbx)
movq %r14, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
movb $0x0, 0x58(%rsp)
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0xf8011
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x20170
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0xf8077
movq 0x98(%rsp), %rsi
jmp 0xf806a
jmp 0xf8074
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xf8077
movq 0x18(%rsp), %rsi
jmp 0xf806a
jmp 0xf8074
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0xf8077
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x20170
jmp 0xf8077
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0xf808e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x20170
movq %rbx, %rdi
callq 0x20ad0
|
_Z22fs_get_cache_directoryB5cxx11v:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov rbx, rdi
lea rbp, [rsp+0D8h+var_A0]
mov [rbp-10h], rbp
lea rdx, aExampleToolCal+1Dh; ""
lea rdi, [rsp+0D8h+var_B0]
mov rsi, rdx
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, aLlamaCache; "LLAMA_CACHE"
call _getenv
test rax, rax
jz short loc_F7D4E
mov r14, rax
lea r15, [rsp+0D8h+var_B0]
mov r12, [r15+8]
mov rdi, rax
call _strlen
mov rdi, r15
xor esi, esi
mov rdx, r12
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
jmp loc_F7F6E
loc_F7D4E:
lea rdi, aXdgCacheHome; "XDG_CACHE_HOME"
call _getenv
test rax, rax
jz short loc_F7D8B
mov r14, rax
lea r15, [rsp+0D8h+var_B0]
mov r12, [r15+8]
mov rdi, rax
call _strlen
mov rdi, r15
xor esi, esi
mov rdx, r12
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
jmp loc_F7E89
loc_F7D8B:
lea rdi, aXdgCacheHome+0Ah; "HOME"
call _getenv
mov r14, rax
lea r12, [rsp+0D8h+var_40]
mov [r12-10h], r12
lea rsi, aCache; "/.cache/"
lea rdx, aCache+8; ""
lea rdi, [rsp+0D8h+var_50]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, r14
call _strlen
lea rdi, [rsp+0D8h+var_50]
xor esi, esi
xor edx, edx
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
mov r15, rax
lea r14, [rsp+0D8h+var_60]
mov [r14-10h], r14
mov rax, [rax]
mov r12, r15
add r12, 10h
cmp rax, r12
jz short loc_F7E10
mov [rsp+0D8h+var_70], rax
mov rax, [r15+10h]
mov [rsp+0D8h+var_60], rax
mov rbp, [r15+8]
jmp short loc_F7E23
loc_F7E10:
mov rbp, [r15+8]
lea rdx, [rbp+1]
mov rdi, r14
mov rsi, r12
call _memcpy
loc_F7E23:
lea r13, [rsp+0D8h+var_70]
mov [r13+8], rbp
mov [r15], r12
mov qword ptr [r15+8], 0
mov byte ptr [r15+10h], 0
lea rdi, [rsp+0D8h+var_B0]
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r13+0]; void *
cmp rdi, r14
jz short loc_F7E5F
mov rsi, [rsp+0D8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F7E5F:
mov rdi, [rsp+0D8h+var_50]; void *
lea rax, [rsp+0D8h+var_40]
cmp rdi, rax
lea rbp, [rsp+0D8h+var_A0]
jz short loc_F7E89
mov rsi, [rsp+0D8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F7E89:
lea r14, [rsp+0D8h+var_C0]
mov [r14-10h], r14
mov rsi, [rsp+0D8h+var_B0]
mov rdx, [rsp+0D8h+var_A8]
add rdx, rsi
lea rdi, [rsp+0D8h+var_D0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, [rsp+0D8h+var_D0]
mov rcx, [rsp+0D8h+var_C8]
cmp byte ptr [rax+rcx-1], 2Fh ; '/'
jz short loc_F7ECE
lea rdi, [rsp+0D8h+var_D0]
mov esi, 2Fh ; '/'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rax, [rsp+0D8h+var_D0]
loc_F7ECE:
lea r15, [rsp+0D8h+var_60]
mov [r15-10h], r15
cmp rax, r14
jz short loc_F7EF2
mov [rsp+0D8h+var_70], rax
mov r13, [rsp+0D8h+var_C8]
mov rax, [rsp+0D8h+var_C0]
mov [rsp+0D8h+var_60], rax
jmp short loc_F7F06
loc_F7EF2:
mov r13, [rsp+0D8h+var_C8]
lea rdx, [r13+1]
mov rdi, r15
mov rsi, r14
call _memcpy
loc_F7F06:
lea r12, [rsp+0D8h+var_70]
mov [r12+8], r13
mov [rsp+0D8h+var_D0], r14
mov [rsp+0D8h+var_C8], 0
mov byte ptr [rsp+0D8h+var_C0], 0
lea rdi, [rsp+0D8h+var_B0]
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r12]; void *
cmp rdi, r15
jz short loc_F7F46
mov rsi, [rsp+0D8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F7F46:
mov rdi, [rsp+0D8h+var_D0]; void *
cmp rdi, r14
jz short loc_F7F5D
mov rsi, [rsp+0D8h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F7F5D:
lea rsi, aPrintSourceAbl+2Dh; "llama.cpp"
lea rdi, [rsp+0D8h+var_B0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_F7F6E:
lea r14, [rsp+0D8h+var_80]
mov [r14-10h], r14
mov rsi, [rsp+0D8h+var_B0]
mov rdx, [rsp+0D8h+var_A8]
add rdx, rsi
lea rdi, [rsp+0D8h+var_90]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, [rsp+0D8h+var_90]
mov rcx, [rsp+0D8h+var_88]
cmp byte ptr [rax+rcx-1], 2Fh ; '/'
jz short loc_F7FB3
lea rdi, [rsp+0D8h+var_90]
mov esi, 2Fh ; '/'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rax, [rsp+0D8h+var_90]
loc_F7FB3:
lea rdi, [rbx+10h]
mov [rbx], rdi
cmp rax, r14
jz short loc_F7FD2
mov [rbx], rax
mov rax, [rsp+0D8h+var_80]
mov [rbx+10h], rax
mov r15, [rsp+0D8h+var_88]
jmp short loc_F7FE3
loc_F7FD2:
mov r15, [rsp+0D8h+var_88]
lea rdx, [r15+1]
mov rsi, r14
call _memcpy
loc_F7FE3:
mov [rbx+8], r15
mov [rsp+0D8h+var_90], r14
mov [rsp+0D8h+var_88], 0
mov byte ptr [rsp+0D8h+var_80], 0
mov rdi, [rsp+0D8h+var_B0]; void *
cmp rdi, rbp
jz short loc_F8011
mov rsi, [rsp+0D8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F8011:
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_80]
cmp rdi, r12
jz short loc_F8077
mov rsi, [rsp+arg_90]
jmp short loc_F806A
jmp short loc_F8074
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r14
jz short loc_F8077
mov rsi, [rsp+arg_10]
jmp short loc_F806A
jmp short loc_F8074
mov rbx, rax
mov rdi, [rsp+arg_40]; void *
cmp rdi, r14
jz short loc_F8077
mov rsi, [rsp+arg_50]
loc_F806A:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_F8077
loc_F8074:
mov rbx, rax
loc_F8077:
mov rdi, [rsp+arg_20]; void *
cmp rdi, rbp
jz short loc_F808E
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F808E:
mov rdi, rbx
call __Unwind_Resume
|
_QWORD * fs_get_cache_directory[abi:cxx11](_QWORD *a1)
{
long long v1; // rax
long long v2; // r14
long long v3; // r12
long long v4; // rax
long long v5; // rax
long long v6; // r14
long long v7; // r12
long long v8; // rax
long long v9; // r14
long long v10; // r15
long long v11; // rbp
_QWORD *v12; // rax
long long v13; // r13
_QWORD *v14; // rax
long long v15; // r15
void *v17; // [rsp+8h] [rbp-D0h] BYREF
long long v18; // [rsp+10h] [rbp-C8h]
_QWORD v19[2]; // [rsp+18h] [rbp-C0h] BYREF
void *v20; // [rsp+28h] [rbp-B0h] BYREF
long long v21; // [rsp+30h] [rbp-A8h]
_QWORD v22[2]; // [rsp+38h] [rbp-A0h] BYREF
_QWORD *v23; // [rsp+48h] [rbp-90h] BYREF
long long v24; // [rsp+50h] [rbp-88h]
_QWORD v25[2]; // [rsp+58h] [rbp-80h] BYREF
_QWORD *v26; // [rsp+68h] [rbp-70h] BYREF
long long v27; // [rsp+70h] [rbp-68h]
_QWORD v28[2]; // [rsp+78h] [rbp-60h] BYREF
void *v29[2]; // [rsp+88h] [rbp-50h] BYREF
_QWORD v30[8]; // [rsp+98h] [rbp-40h] BYREF
v20 = v22;
std::string::_M_construct<char const*>((long long)&v20, "", (long long)"");
v1 = getenv("LLAMA_CACHE");
if ( v1 )
{
v2 = v1;
v3 = v21;
v4 = strlen(v1);
std::string::_M_replace(&v20, 0LL, v3, v2, v4);
}
else
{
v5 = getenv("XDG_CACHE_HOME");
if ( v5 )
{
v6 = v5;
v7 = v21;
v8 = strlen(v5);
std::string::_M_replace(&v20, 0LL, v7, v6, v8);
}
else
{
v9 = getenv("HOME");
v29[0] = v30;
std::string::_M_construct<char const*>((long long)v29, "/.cache/", (long long)"");
strlen(v9);
v10 = std::string::replace(v29, 0LL, 0LL);
v26 = v28;
if ( *(_QWORD *)v10 == v10 + 16 )
{
v11 = *(_QWORD *)(v10 + 8);
memcpy(v28, v10 + 16, v11 + 1);
}
else
{
v26 = *(_QWORD **)v10;
v28[0] = *(_QWORD *)(v10 + 16);
v11 = *(_QWORD *)(v10 + 8);
}
v27 = v11;
*(_QWORD *)v10 = v10 + 16;
*(_QWORD *)(v10 + 8) = 0LL;
*(_BYTE *)(v10 + 16) = 0;
std::string::operator=(&v20, &v26);
if ( v26 != v28 )
operator delete(v26, v28[0] + 1LL);
if ( v29[0] != v30 )
operator delete(v29[0], v30[0] + 1LL);
}
v17 = v19;
std::string::_M_construct<char *>((long long)&v17, v20, (long long)v20 + v21);
v12 = v17;
if ( *((char *)v17 + v18 - 1) != 47 )
{
std::string::push_back(&v17, 47LL);
v12 = v17;
}
v26 = v28;
if ( v12 == v19 )
{
v13 = v18;
memcpy(v28, v19, v18 + 1);
}
else
{
v26 = v12;
v13 = v18;
v28[0] = v19[0];
}
v27 = v13;
v17 = v19;
v18 = 0LL;
LOBYTE(v19[0]) = 0;
std::string::operator=(&v20, &v26);
if ( v26 != v28 )
operator delete(v26, v28[0] + 1LL);
if ( v17 != v19 )
operator delete(v17, v19[0] + 1LL);
std::string::append(&v20, "llama.cpp");
}
v23 = v25;
std::string::_M_construct<char *>((long long)&v23, v20, (long long)v20 + v21);
v14 = v23;
if ( *((_BYTE *)v23 + v24 - 1) != 47 )
{
std::string::push_back(&v23, 47LL);
v14 = v23;
}
*a1 = a1 + 2;
if ( v14 == v25 )
{
v15 = v24;
memcpy(a1 + 2, v25, v24 + 1);
}
else
{
*a1 = v14;
a1[2] = v25[0];
v15 = v24;
}
a1[1] = v15;
v23 = v25;
v24 = 0LL;
LOBYTE(v25[0]) = 0;
if ( v20 != v22 )
operator delete(v20, v22[0] + 1LL);
return a1;
}
|
fs_get_cache_directory[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV RBX,RDI
LEA RBP,[RSP + 0x38]
MOV qword ptr [RBP + -0x10],RBP
LEA RDX,[0x21e7b1]
LEA RDI,[RSP + 0x28]
MOV RSI,RDX
CALL 0x00127fa8
LEA RDI,[0x223569]
CALL 0x00120cb0
TEST RAX,RAX
JZ 0x001f7d4e
MOV R14,RAX
LEA R15,[RSP + 0x28]
MOV R12,qword ptr [R15 + 0x8]
MOV RDI,RAX
CALL 0x00120660
LAB_001f7d36:
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R12
MOV RCX,R14
MOV R8,RAX
CALL 0x00120840
JMP 0x001f7f6e
LAB_001f7d4e:
LEA RDI,[0x223575]
CALL 0x00120cb0
TEST RAX,RAX
JZ 0x001f7d8b
MOV R14,RAX
LEA R15,[RSP + 0x28]
MOV R12,qword ptr [R15 + 0x8]
MOV RDI,RAX
CALL 0x00120660
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R12
MOV RCX,R14
MOV R8,RAX
CALL 0x00120840
JMP 0x001f7e89
LAB_001f7d8b:
LEA RDI,[0x22357f]
CALL 0x00120cb0
MOV R14,RAX
LEA R12,[RSP + 0x98]
MOV qword ptr [R12 + -0x10],R12
LAB_001f7da7:
LEA RSI,[0x223584]
LEA RDX,[0x22358c]
LEA RDI,[RSP + 0x88]
CALL 0x00127fa8
MOV RDI,R14
CALL 0x00120660
LAB_001f7dca:
LEA RDI,[RSP + 0x88]
XOR ESI,ESI
XOR EDX,EDX
MOV RCX,R14
MOV R8,RAX
CALL 0x00120230
LAB_001f7de1:
MOV R15,RAX
LEA R14,[RSP + 0x78]
MOV qword ptr [R14 + -0x10],R14
MOV RAX,qword ptr [RAX]
MOV R12,R15
ADD R12,0x10
CMP RAX,R12
JZ 0x001f7e10
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x78],RAX
MOV RBP,qword ptr [R15 + 0x8]
JMP 0x001f7e23
LAB_001f7e10:
MOV RBP,qword ptr [R15 + 0x8]
LEA RDX,[RBP + 0x1]
MOV RDI,R14
MOV RSI,R12
CALL 0x001200e0
LAB_001f7e23:
LEA R13,[RSP + 0x68]
MOV qword ptr [R13 + 0x8],RBP
MOV qword ptr [R15],R12
MOV qword ptr [R15 + 0x8],0x0
MOV byte ptr [R15 + 0x10],0x0
LEA RDI,[RSP + 0x28]
MOV RSI,R13
CALL 0x001208a0
MOV RDI,qword ptr [R13]
CMP RDI,R14
JZ 0x001f7e5f
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x00120170
LAB_001f7e5f:
MOV RDI,qword ptr [RSP + 0x88]
LEA RAX,[RSP + 0x98]
CMP RDI,RAX
LEA RBP,[RSP + 0x38]
JZ 0x001f7e89
MOV RSI,qword ptr [RSP + 0x98]
INC RSI
CALL 0x00120170
LAB_001f7e89:
LEA R14,[RSP + 0x18]
MOV qword ptr [R14 + -0x10],R14
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
ADD RDX,RSI
LAB_001f7e9f:
LEA RDI,[RSP + 0x8]
CALL 0x00127e94
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x10]
CMP byte ptr [RAX + RCX*0x1 + -0x1],0x2f
JZ 0x001f7ece
LAB_001f7eba:
LEA RDI,[RSP + 0x8]
MOV ESI,0x2f
CALL 0x00121370
LAB_001f7ec9:
MOV RAX,qword ptr [RSP + 0x8]
LAB_001f7ece:
LEA R15,[RSP + 0x78]
MOV qword ptr [R15 + -0x10],R15
CMP RAX,R14
JZ 0x001f7ef2
MOV qword ptr [RSP + 0x68],RAX
MOV R13,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x78],RAX
JMP 0x001f7f06
LAB_001f7ef2:
MOV R13,qword ptr [RSP + 0x10]
LEA RDX,[R13 + 0x1]
MOV RDI,R15
MOV RSI,R14
CALL 0x001200e0
LAB_001f7f06:
LEA R12,[RSP + 0x68]
MOV qword ptr [R12 + 0x8],R13
MOV qword ptr [RSP + 0x8],R14
MOV qword ptr [RSP + 0x10],0x0
MOV byte ptr [RSP + 0x18],0x0
LEA RDI,[RSP + 0x28]
MOV RSI,R12
CALL 0x001208a0
MOV RDI,qword ptr [R12]
CMP RDI,R15
JZ 0x001f7f46
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x00120170
LAB_001f7f46:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x001f7f5d
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00120170
LAB_001f7f5d:
LEA RSI,[0x2121f1]
LEA RDI,[RSP + 0x28]
CALL 0x00120b20
LAB_001f7f6e:
LEA R14,[RSP + 0x58]
MOV qword ptr [R14 + -0x10],R14
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
ADD RDX,RSI
LEA RDI,[RSP + 0x48]
CALL 0x00127e94
MOV RAX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x50]
CMP byte ptr [RAX + RCX*0x1 + -0x1],0x2f
JZ 0x001f7fb3
LAB_001f7f9f:
LEA RDI,[RSP + 0x48]
MOV ESI,0x2f
CALL 0x00121370
LAB_001f7fae:
MOV RAX,qword ptr [RSP + 0x48]
LAB_001f7fb3:
LEA RDI,[RBX + 0x10]
MOV qword ptr [RBX],RDI
CMP RAX,R14
JZ 0x001f7fd2
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RBX + 0x10],RAX
MOV R15,qword ptr [RSP + 0x50]
JMP 0x001f7fe3
LAB_001f7fd2:
MOV R15,qword ptr [RSP + 0x50]
LEA RDX,[R15 + 0x1]
MOV RSI,R14
CALL 0x001200e0
LAB_001f7fe3:
MOV qword ptr [RBX + 0x8],R15
MOV qword ptr [RSP + 0x48],R14
MOV qword ptr [RSP + 0x50],0x0
MOV byte ptr [RSP + 0x58],0x0
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,RBP
JZ 0x001f8011
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00120170
LAB_001f8011:
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* fs_get_cache_directory[abi:cxx11]() */
void fs_get_cache_directory_abi_cxx11_(void)
{
char *pcVar1;
char *pcVar2;
int8 *puVar3;
long lVar4;
int8 *in_RDI;
long *__src;
long *local_d0;
long local_c8;
int1 local_c0;
int7 uStack_bf;
long *local_b0;
char *local_a8;
long local_a0 [2];
int1 *local_90;
long local_88;
int1 local_80;
int7 uStack_7f;
long *local_70;
long local_68;
long local_60 [2];
long *local_50 [2];
long local_40 [2];
local_b0 = local_a0;
std::__cxx11::string::_M_construct<char_const*>(&local_b0);
pcVar1 = getenv("LLAMA_CACHE");
pcVar2 = local_a8;
if (pcVar1 == (char *)0x0) {
pcVar1 = getenv("XDG_CACHE_HOME");
pcVar2 = local_a8;
if (pcVar1 == (char *)0x0) {
pcVar2 = getenv("HOME");
local_50[0] = local_40;
/* try { // try from 001f7da7 to 001f7dc1 has its CatchHandler @ 001f8040 */
std::__cxx11::string::_M_construct<char_const*>(local_50,"/.cache/","");
strlen(pcVar2);
/* try { // try from 001f7dca to 001f7de0 has its CatchHandler @ 001f8026 */
puVar3 = (int8 *)
std::__cxx11::string::replace((ulong)local_50,0,(char *)0x0,(ulong)pcVar2);
local_70 = (long *)*puVar3;
__src = puVar3 + 2;
if (local_70 == __src) {
lVar4 = puVar3[1];
local_70 = local_60;
memcpy(local_60,__src,lVar4 + 1);
}
else {
local_60[0] = puVar3[2];
lVar4 = puVar3[1];
}
*puVar3 = __src;
puVar3[1] = 0;
*(int1 *)(puVar3 + 2) = 0;
local_68 = lVar4;
std::__cxx11::string::operator=((string *)&local_b0,(string *)&local_70);
if (local_70 != local_60) {
operator_delete(local_70,local_60[0] + 1);
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
}
else {
strlen(pcVar1);
std::__cxx11::string::_M_replace((ulong)&local_b0,0,pcVar2,(ulong)pcVar1);
}
/* try { // try from 001f7e9f to 001f7ea8 has its CatchHandler @ 001f8056 */
local_d0 = (long *)&local_c0;
std::__cxx11::string::_M_construct<char*>(&local_d0,local_b0,local_a8 + (long)local_b0);
if (*(char *)((long)local_d0 + local_c8 + -1) != '/') {
/* try { // try from 001f7eba to 001f7ec8 has its CatchHandler @ 001f8042 */
std::__cxx11::string::push_back((char)&local_d0);
}
if (local_d0 == (long *)&local_c0) {
local_70 = local_60;
memcpy(local_60,&local_c0,local_c8 + 1);
}
else {
local_70 = local_d0;
local_60[0] = CONCAT71(uStack_bf,local_c0);
}
local_68 = local_c8;
local_c8 = 0;
local_c0 = 0;
local_d0 = (long *)&local_c0;
std::__cxx11::string::operator=((string *)&local_b0,(string *)&local_70);
if (local_70 != local_60) {
operator_delete(local_70,local_60[0] + 1);
}
if (local_d0 != (long *)&local_c0) {
operator_delete(local_d0,CONCAT71(uStack_bf,local_c0) + 1);
}
/* try { // try from 001f7f5d to 001f7f8d has its CatchHandler @ 001f8074 */
std::__cxx11::string::append((char *)&local_b0);
}
else {
strlen(pcVar1);
/* try { // try from 001f7d36 to 001f7d85 has its CatchHandler @ 001f8074 */
std::__cxx11::string::_M_replace((ulong)&local_b0,0,pcVar2,(ulong)pcVar1);
}
local_90 = &local_80;
std::__cxx11::string::_M_construct<char*>(&local_90,local_b0,local_a8 + (long)local_b0);
if (local_90[local_88 + -1] != '/') {
/* try { // try from 001f7f9f to 001f7fad has its CatchHandler @ 001f8058 */
std::__cxx11::string::push_back((char)&local_90);
}
*in_RDI = in_RDI + 2;
if (local_90 == &local_80) {
memcpy(in_RDI + 2,&local_80,local_88 + 1);
}
else {
*in_RDI = local_90;
in_RDI[2] = CONCAT71(uStack_7f,local_80);
}
in_RDI[1] = local_88;
local_88 = 0;
local_80 = 0;
if (local_b0 != local_a0) {
local_90 = &local_80;
operator_delete(local_b0,local_a0[0] + 1);
}
return;
}
|
|
59,885
|
compute_tensor_elements_recursive
|
tsotchke[P]eshkol/src/core/utils/autodiff.c
|
static void compute_tensor_elements_recursive(
Arena* arena,
float (*f)(VectorF*),
VectorF* x,
size_t order,
size_t* indices,
size_t current_index,
size_t current_order,
float* tensor,
size_t* tensor_index
) {
if (current_order == order) {
// Base case: compute the derivative
// Create a copy of x for finite differences
VectorF* x_copy = vector_f_copy(arena, x);
if (!x_copy) return;
// Compute the derivative using finite differences
const float h = 1e-4f; // Small step size
float result = 0.0f;
// For each combination of indices, perturb the corresponding variables
// and compute the derivative using finite differences
for (size_t i = 0; i < order; i++) {
size_t idx = indices[i];
x_copy->data[idx] += h;
// Compute f(x + h*e_i)
float f_plus = f(x_copy);
// Compute f(x - h*e_i)
x_copy->data[idx] -= 2.0f * h;
float f_minus = f(x_copy);
// Reset x_copy
x_copy->data[idx] += h;
// Update result
result += (f_plus - f_minus) / (2.0f * h);
}
// Store the result in the tensor
tensor[*tensor_index] = result;
(*tensor_index)++;
return;
}
// Recursive case: try all possible indices
for (size_t i = current_index; i < x->dim; i++) {
indices[current_order] = i;
compute_tensor_elements_recursive(
arena, f, x, order, indices, i,
current_order + 1, tensor, tensor_index
);
}
}
|
O0
|
c
|
compute_tensor_elements_recursive:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
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
cmpq -0x20(%rbp), %rax
jne 0xbe6b
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4040
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xbd6a
jmp 0xbeda
movss 0x163a(%rip), %xmm0 # 0xd3ac
movss %xmm0, -0x3c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xbe46
movq -0x28(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq -0x50(%rbp), %rcx
movss 0x15f7(%rip), %xmm0 # 0xd3ac
addss (%rax,%rcx,4), %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rdi
callq *%rax
movss %xmm0, -0x54(%rbp)
movq -0x38(%rbp), %rax
movq -0x50(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movss 0x22b5(%rip), %xmm1 # 0xe098
subss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rdi
callq *%rax
movss %xmm0, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq -0x50(%rbp), %rcx
movss 0x15a1(%rip), %xmm0 # 0xd3ac
addss (%rax,%rcx,4), %xmm0
movss %xmm0, (%rax,%rcx,4)
movss -0x54(%rbp), %xmm0
subss -0x58(%rbp), %xmm0
movss 0x2271(%rip), %xmm1 # 0xe098
divss %xmm1, %xmm0
addss -0x40(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0xbd87
movss -0x40(%rbp), %xmm0
movq 0x18(%rbp), %rax
movq 0x20(%rbp), %rcx
movq (%rcx), %rcx
movss %xmm0, (%rax,%rcx,4)
movq 0x20(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0xbeda
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0xbeda
movq -0x60(%rbp), %rdx
movq -0x28(%rbp), %rax
movq 0x10(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x60(%rbp), %r9
movq 0x10(%rbp), %r11
addq $0x1, %r11
movq 0x18(%rbp), %r10
movq 0x20(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0xbd10
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0xbe73
addq $0x80, %rsp
popq %rbp
retq
|
compute_tensor_elements_recursive:
push rbp
mov rbp, rsp
sub rsp, 80h
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
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+arg_0]
cmp rax, [rbp+var_20]
jnz loc_BE6B
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
call vector_f_copy
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_BD6A
jmp loc_BEDA
loc_BD6A:
movss xmm0, cs:dword_D3AC
movss [rbp+var_3C], xmm0
xorps xmm0, xmm0
movss [rbp+var_40], xmm0
mov [rbp+var_48], 0
loc_BD87:
mov rax, [rbp+var_48]
cmp rax, [rbp+var_20]
jnb loc_BE46
mov rax, [rbp+var_28]
mov rcx, [rbp+var_48]
mov rax, [rax+rcx*8]
mov [rbp+var_50], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_50]
movss xmm0, cs:dword_D3AC
addss xmm0, dword ptr [rax+rcx*4]
movss dword ptr [rax+rcx*4], xmm0
mov rax, [rbp+var_10]
mov rdi, [rbp+var_38]
call rax
movss [rbp+var_54], xmm0
mov rax, [rbp+var_38]
mov rcx, [rbp+var_50]
movss xmm0, dword ptr [rax+rcx*4]
movss xmm1, cs:dword_E098
subss xmm0, xmm1
movss dword ptr [rax+rcx*4], xmm0
mov rax, [rbp+var_10]
mov rdi, [rbp+var_38]
call rax
movss [rbp+var_58], xmm0
mov rax, [rbp+var_38]
mov rcx, [rbp+var_50]
movss xmm0, cs:dword_D3AC
addss xmm0, dword ptr [rax+rcx*4]
movss dword ptr [rax+rcx*4], xmm0
movss xmm0, [rbp+var_54]
subss xmm0, [rbp+var_58]
movss xmm1, cs:dword_E098
divss xmm0, xmm1
addss xmm0, [rbp+var_40]
movss [rbp+var_40], xmm0
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
jmp loc_BD87
loc_BE46:
movss xmm0, [rbp+var_40]
mov rax, [rbp+arg_8]
mov rcx, [rbp+arg_10]
mov rcx, [rcx]
movss dword ptr [rax+rcx*4], xmm0
mov rax, [rbp+arg_10]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
jmp short loc_BEDA
loc_BE6B:
mov rax, [rbp+var_30]
mov [rbp+var_60], rax
loc_BE73:
mov rax, [rbp+var_60]
mov rcx, [rbp+var_18]
cmp rax, [rcx+10h]
jnb short loc_BEDA
mov rdx, [rbp+var_60]
mov rax, [rbp+var_28]
mov rcx, [rbp+arg_0]
mov [rax+rcx*8], rdx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_28]
mov r9, [rbp+var_60]
mov r11, [rbp+arg_0]
add r11, 1
mov r10, [rbp+arg_8]
mov rax, [rbp+arg_10]
mov [rsp+80h+var_80], r11
mov [rsp+80h+var_78], r10
mov [rsp+80h+var_70], rax
call compute_tensor_elements_recursive
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_BE73
loc_BEDA:
add rsp, 80h
pop rbp
retn
|
float * compute_tensor_elements_recursive(
_QWORD *a1,
float ( *a2)(float *),
long long a3,
unsigned long long a4,
long long a5,
_QWORD *a6,
long long a7,
long long a8,
float *a9)
{
float *result; // rax
float v11; // [rsp+28h] [rbp-58h]
float v12; // [rsp+2Ch] [rbp-54h]
long long v13; // [rsp+30h] [rbp-50h]
unsigned long long i; // [rsp+38h] [rbp-48h]
float v15; // [rsp+40h] [rbp-40h]
float *v16; // [rsp+48h] [rbp-38h]
if ( a7 == a4 )
{
result = (float *)vector_f_copy(a1, a3);
v16 = result;
if ( result )
{
v15 = 0.0;
for ( i = 0LL; i < a4; ++i )
{
v13 = *(_QWORD *)(a5 + 8 * i);
v16[v13] = v16[v13] + 0.000099999997;
v12 = a2(v16);
v16[v13] = v16[v13] - 0.00019999999;
v11 = a2(v16);
v16[v13] = v16[v13] + 0.000099999997;
v15 = (float)((float)(v12 - v11) / 0.00019999999) + v15;
}
*(float *)(a8 + 4LL * *(_QWORD *)a9) = v15;
result = a9;
++*(_QWORD *)a9;
}
}
else
{
while ( 1 )
{
result = (float *)a6;
if ( (unsigned long long)a6 >= *(_QWORD *)(a3 + 16) )
break;
*(_QWORD *)(a5 + 8 * a7) = a6;
compute_tensor_elements_recursive((_DWORD)a1, (_DWORD)a2, a3, a4, a5, (_DWORD)a6, a7 + 1, a8, (long long)a9);
a6 = (_QWORD *)((char *)a6 + 1);
}
}
return result;
}
|
compute_tensor_elements_recursive:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
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]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0010be6b
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00104040
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0010bd6a
JMP 0x0010beda
LAB_0010bd6a:
MOVSS XMM0,dword ptr [0x0010d388]
MOVSS dword ptr [RBP + -0x3c],XMM0
XORPS XMM0,XMM0
MOVSS dword ptr [RBP + -0x40],XMM0
MOV qword ptr [RBP + -0x48],0x0
LAB_0010bd87:
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x0010be46
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x50]
MOVSS XMM0,dword ptr [0x0010d388]
ADDSS XMM0,dword ptr [RAX + RCX*0x4]
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RBP + -0x38]
CALL RAX
MOVSS dword ptr [RBP + -0x54],XMM0
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x50]
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MOVSS XMM1,dword ptr [0x0010e060]
SUBSS XMM0,XMM1
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RBP + -0x38]
CALL RAX
MOVSS dword ptr [RBP + -0x58],XMM0
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x50]
MOVSS XMM0,dword ptr [0x0010d388]
ADDSS XMM0,dword ptr [RAX + RCX*0x4]
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOVSS XMM0,dword ptr [RBP + -0x54]
SUBSS XMM0,dword ptr [RBP + -0x58]
MOVSS XMM1,dword ptr [0x0010e060]
DIVSS XMM0,XMM1
ADDSS XMM0,dword ptr [RBP + -0x40]
MOVSS dword ptr [RBP + -0x40],XMM0
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0010bd87
LAB_0010be46:
MOVSS XMM0,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,qword ptr [RBP + 0x20]
MOV RCX,qword ptr [RCX]
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOV RAX,qword ptr [RBP + 0x20]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
JMP 0x0010beda
LAB_0010be6b:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x60],RAX
LAB_0010be73:
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x0010beda
MOV RDX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x28]
MOV R9,qword ptr [RBP + -0x60]
MOV R11,qword ptr [RBP + 0x10]
ADD R11,0x1
MOV R10,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x20]
MOV qword ptr [RSP],R11
MOV qword ptr [RSP + 0x8],R10
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0010bd10
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0010be73
LAB_0010beda:
ADD RSP,0x80
POP RBP
RET
|
void compute_tensor_elements_recursive
(int8 param_1,code *param_2,long param_3,ulong param_4,long param_5,
ulong param_6,ulong param_7,long param_8,long *param_9)
{
long lVar1;
long lVar2;
float fVar3;
float fVar4;
int8 local_68;
int8 local_50;
int4 local_48;
local_68 = param_6;
if (param_7 == param_4) {
lVar2 = vector_f_copy(param_1,param_3);
if (lVar2 != 0) {
local_48 = 0.0;
for (local_50 = 0; local_50 < param_4; local_50 = local_50 + 1) {
lVar1 = *(long *)(param_5 + local_50 * 8);
*(float *)(lVar2 + lVar1 * 4) = DAT_0010d388 + *(float *)(lVar2 + lVar1 * 4);
fVar3 = (float)(*param_2)(lVar2);
*(float *)(lVar2 + lVar1 * 4) = *(float *)(lVar2 + lVar1 * 4) - DAT_0010e060;
fVar4 = (float)(*param_2)(lVar2);
*(float *)(lVar2 + lVar1 * 4) = DAT_0010d388 + *(float *)(lVar2 + lVar1 * 4);
local_48 = (fVar3 - fVar4) / DAT_0010e060 + local_48;
}
*(float *)(param_8 + *param_9 * 4) = local_48;
*param_9 = *param_9 + 1;
}
}
else {
for (; local_68 < *(ulong *)(param_3 + 0x10); local_68 = local_68 + 1) {
*(ulong *)(param_5 + param_7 * 8) = local_68;
compute_tensor_elements_recursive
(param_1,param_2,param_3,param_4,param_5,local_68,param_7 + 1,param_8,param_9);
}
}
return;
}
|
|
59,886
|
compute_tensor_elements_recursive
|
tsotchke[P]eshkol/src/core/utils/autodiff.c
|
static void compute_tensor_elements_recursive(
Arena* arena,
float (*f)(VectorF*),
VectorF* x,
size_t order,
size_t* indices,
size_t current_index,
size_t current_order,
float* tensor,
size_t* tensor_index
) {
if (current_order == order) {
// Base case: compute the derivative
// Create a copy of x for finite differences
VectorF* x_copy = vector_f_copy(arena, x);
if (!x_copy) return;
// Compute the derivative using finite differences
const float h = 1e-4f; // Small step size
float result = 0.0f;
// For each combination of indices, perturb the corresponding variables
// and compute the derivative using finite differences
for (size_t i = 0; i < order; i++) {
size_t idx = indices[i];
x_copy->data[idx] += h;
// Compute f(x + h*e_i)
float f_plus = f(x_copy);
// Compute f(x - h*e_i)
x_copy->data[idx] -= 2.0f * h;
float f_minus = f(x_copy);
// Reset x_copy
x_copy->data[idx] += h;
// Update result
result += (f_plus - f_minus) / (2.0f * h);
}
// Store the result in the tensor
tensor[*tensor_index] = result;
(*tensor_index)++;
return;
}
// Recursive case: try all possible indices
for (size_t i = current_index; i < x->dim; i++) {
indices[current_order] = i;
compute_tensor_elements_recursive(
arena, f, x, order, indices, i,
current_order + 1, tensor, tensor_index
);
}
}
|
O3
|
c
|
compute_tensor_elements_recursive:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rdx, %r8
movq %rsi, %r14
movq %rdi, %r13
movq 0x60(%rsp), %rax
movq 0x58(%rsp), %rbp
movq 0x50(%rsp), %rdx
cmpq %rcx, %rdx
jne 0x8336
movq %r13, %rdi
movq %r8, %rsi
movq %rax, %rbp
callq 0x3316
movq 0x50(%rsp), %rcx
testq %rax, %rax
je 0x83bb
testq %rcx, %rcx
je 0x83a3
movq %rax, %r15
xorps %xmm0, %xmm0
xorl %r12d, %r12d
movss %xmm0, 0x8(%rsp)
movq (%rbx,%r12,8), %r13
movss (%r15,%r13,4), %xmm0
movss 0x2180(%rip), %xmm1 # 0xa44c
addss %xmm1, %xmm0
movss %xmm0, (%r15,%r13,4)
movq %r15, %rdi
callq *%r14
movss %xmm0, (%rsp)
movss (%r15,%r13,4), %xmm0
addss 0x2f35(%rip), %xmm0 # 0xb224
movss %xmm0, (%r15,%r13,4)
movq %r15, %rdi
callq *%r14
movss (%r15,%r13,4), %xmm1
addss 0x2143(%rip), %xmm1 # 0xa44c
movss %xmm1, (%r15,%r13,4)
movss (%rsp), %xmm1
subss %xmm0, %xmm1
movss 0x8(%rsp), %xmm0
divss 0x2efa(%rip), %xmm1 # 0xb220
addss %xmm1, %xmm0
incq %r12
cmpq %r12, 0x50(%rsp)
jne 0x82b4
jmp 0x83a6
movq %r9, %r12
cmpq %r9, 0x10(%r8)
jbe 0x83bb
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10(%rsp)
movq %r8, 0x8(%rsp)
movq %rcx, (%rsp)
movq %r12, (%rbx,%rdx,8)
subq $0x8, %rsp
movq %r13, %rdi
movq %r14, %rsi
movq %r8, %rdx
movq %rbx, %r8
movq %r12, %r9
pushq %rax
pushq %rbp
pushq 0x28(%rsp)
movq %rbx, %r15
movq %r14, %rbx
movq %rax, %r14
callq 0x8254
movq 0x28(%rsp), %r8
movq %r14, %rax
movq %rbx, %r14
movq %r15, %rbx
movq 0x20(%rsp), %rcx
movq 0x70(%rsp), %rdx
addq $0x20, %rsp
incq %r12
cmpq 0x10(%r8), %r12
jb 0x8351
jmp 0x83bb
xorps %xmm0, %xmm0
movq (%rbp), %rax
movq 0x58(%rsp), %rcx
movss %xmm0, (%rcx,%rax,4)
incq %rax
movq %rax, (%rbp)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
compute_tensor_elements_recursive:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, r8
mov r8, rdx
mov r14, rsi
mov r13, rdi
mov rax, [rsp+48h+arg_10]
mov rbp, [rsp+48h+arg_8]
mov rdx, [rsp+48h+arg_0]
cmp rdx, rcx
jnz loc_8336
mov rdi, r13
mov rsi, r8
mov rbp, rax
call vector_f_copy
mov rcx, [rsp+48h+arg_0]
test rax, rax
jz loc_83BB
test rcx, rcx
jz loc_83A3
mov r15, rax
xorps xmm0, xmm0
xor r12d, r12d
loc_82B4:
movss dword ptr [rsp+48h+var_40], xmm0
mov r13, [rbx+r12*8]
movss xmm0, dword ptr [r15+r13*4]
movss xmm1, cs:dword_A44C
addss xmm0, xmm1
movss dword ptr [r15+r13*4], xmm0
mov rdi, r15
call r14
movss dword ptr [rsp+48h+var_48], xmm0
movss xmm0, dword ptr [r15+r13*4]
addss xmm0, cs:dword_B224
movss dword ptr [r15+r13*4], xmm0
mov rdi, r15
call r14
movss xmm1, dword ptr [r15+r13*4]
addss xmm1, cs:dword_A44C
movss dword ptr [r15+r13*4], xmm1
movss xmm1, dword ptr [rsp+48h+var_48]
subss xmm1, xmm0
movss xmm0, dword ptr [rsp+48h+var_40]
divss xmm1, cs:dword_B220
addss xmm0, xmm1
inc r12
cmp [rsp+48h+arg_0], r12
jnz short loc_82B4
jmp short loc_83A6
loc_8336:
mov r12, r9
cmp [r8+10h], r9
jbe short loc_83BB
lea rsi, [rdx+1]
mov [rsp+48h+var_38], rsi
mov [rsp+48h+var_40], r8
mov [rsp+48h+var_48], rcx
loc_8351:
mov [rbx+rdx*8], r12
sub rsp, 8
mov rdi, r13
mov rsi, r14
mov rdx, r8
mov r8, rbx
mov r9, r12
push rax
push rbp
push [rsp+60h+var_38]
mov r15, rbx
mov rbx, r14
mov r14, rax
call compute_tensor_elements_recursive
mov r8, [rsp+68h+var_40]
mov rax, r14
mov r14, rbx
mov rbx, r15
mov rcx, [rsp+68h+var_48]
mov rdx, [rsp+68h+arg_0]
add rsp, 20h
inc r12
cmp r12, [r8+10h]
jb short loc_8351
jmp short loc_83BB
loc_83A3:
xorps xmm0, xmm0
loc_83A6:
mov rax, [rbp+0]
mov rcx, [rsp+48h+arg_8]
movss dword ptr [rcx+rax*4], xmm0
inc rax
mov [rbp+0], rax
loc_83BB:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long compute_tensor_elements_recursive(
_QWORD *a1,
float ( *a2)(long long, long long, long long, long long),
long long a3,
long long a4,
long long a5,
unsigned long long a6,
long long a7,
long long a8,
long long *a9)
{
long long result; // rax
long long v13; // rdx
long long v14; // rsi
long long v15; // rdx
long long v16; // rcx
long long v17; // r15
float v18; // xmm0_4
long long i; // r12
long long v20; // r13
float v21; // xmm0_4
unsigned long long v22; // r12
int v23; // esi
int v24; // edx
int v25; // r8d
long long v26; // r15
float ( *v27)(long long, long long, long long, long long); // rbx
long long v28; // r14
long long v29; // rax
float v30; // [rsp+0h] [rbp-48h]
int v31; // [rsp+0h] [rbp-48h]
float v32; // [rsp+8h] [rbp-40h]
long long v33; // [rsp+8h] [rbp-40h]
result = (long long)a9;
v13 = a7;
if ( a7 == a4 )
{
v14 = a3;
result = vector_f_copy(a1, a3);
v16 = a7;
if ( result )
{
if ( a7 )
{
v17 = result;
v18 = 0.0;
for ( i = 0LL; i != a7; ++i )
{
v32 = v18;
v20 = *(_QWORD *)(a5 + 8 * i);
*(float *)(v17 + 4 * v20) = *(float *)(v17 + 4 * v20) + 0.000099999997;
v30 = a2(v17, v14, v15, v16);
*(float *)(v17 + 4 * v20) = *(float *)(v17 + 4 * v20) + -0.00019999999;
v21 = ((float ( *)(long long))a2)(v17);
*(float *)(v17 + 4 * v20) = *(float *)(v17 + 4 * v20) + 0.000099999997;
v18 = v32 + (float)((float)(v30 - v21) / 0.00019999999);
}
}
else
{
v18 = 0.0;
}
v29 = *a9;
*(float *)(a8 + 4 * v29) = v18;
result = v29 + 1;
*a9 = result;
}
}
else
{
v22 = a6;
if ( *(_QWORD *)(a3 + 16) > a6 )
{
v33 = a3;
v31 = a4;
do
{
*(_QWORD *)(a5 + 8 * v13) = v22;
v23 = (int)a2;
v24 = a3;
v25 = a5;
v26 = a5;
v27 = a2;
v28 = result;
compute_tensor_elements_recursive((_DWORD)a1, v23, v24, a4, v25, v22, a7 + 1, a8, result);
LODWORD(a3) = v33;
result = v28;
a2 = v27;
a5 = v26;
LODWORD(a4) = v31;
v13 = a7;
++v22;
}
while ( v22 < *(_QWORD *)(v33 + 16) );
}
}
return result;
}
| |||
59,887
|
vec_is_equal
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/vect.h
|
static inline bool_t vec_is_equal(const void *a, const void *b, size_t num)
{
const limb_t *ap = (const limb_t *)a;
const limb_t *bp = (const limb_t *)b;
limb_t acc;
size_t i;
#ifndef __BLST_NO_ASM__
bool_t vec_is_equal_16x(const void *a, const void *b, size_t num);
if ((num & 15) == 0)
return vec_is_equal_16x(a, b, num);
#endif
num /= sizeof(limb_t);
for (acc = 0, i = 0; i < num; i++)
acc |= ap[i] ^ bp[i];
return is_zero(acc);
}
|
O0
|
c
|
vec_is_equal:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
andq $0xf, %rax
cmpq $0x0, %rax
jne 0xa9eb9
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xc59c0
movq %rax, -0x8(%rbp)
jmp 0xa9f1a
movq -0x20(%rbp), %rax
shrq $0x3, %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xa9f0d
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rdx
xorq (%rcx,%rdx,8), %rax
orq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xa9ed5
movq -0x38(%rbp), %rdi
callq 0xa7240
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
|
vec_is_equal:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
and rax, 0Fh
cmp rax, 0
jnz short loc_A9EB9
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call vec_is_equal_16x
mov [rbp+var_8], rax
jmp short loc_A9F1A
loc_A9EB9:
mov rax, [rbp+var_20]
shr rax, 3
mov [rbp+var_20], rax
mov [rbp+var_38], 0
mov [rbp+var_40], 0
loc_A9ED5:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_20]
jnb short loc_A9F0D
mov rax, [rbp+var_28]
mov rcx, [rbp+var_40]
mov rax, [rax+rcx*8]
mov rcx, [rbp+var_30]
mov rdx, [rbp+var_40]
xor rax, [rcx+rdx*8]
or rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp short loc_A9ED5
loc_A9F0D:
mov rdi, [rbp+var_38]
call is_zero
mov [rbp+var_8], rax
loc_A9F1A:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
unsigned long long vec_is_equal(long long a1, long long a2, unsigned long long a3)
{
unsigned long long i; // [rsp+0h] [rbp-40h]
long long v5; // [rsp+8h] [rbp-38h]
if ( (a3 & 0xF) == 0 )
return vec_is_equal_16x(a1, a2, a3);
v5 = 0LL;
for ( i = 0LL; i < a3 >> 3; ++i )
v5 |= *(_QWORD *)(a2 + 8 * i) ^ *(_QWORD *)(a1 + 8 * i);
return is_zero(v5);
}
|
vec_is_equal:
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 RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0xf
CMP RAX,0x0
JNZ 0x001a9eb9
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001c59c0
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a9f1a
LAB_001a9eb9:
MOV RAX,qword ptr [RBP + -0x20]
SHR RAX,0x3
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x38],0x0
MOV qword ptr [RBP + -0x40],0x0
LAB_001a9ed5:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001a9f0d
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x40]
XOR RAX,qword ptr [RCX + RDX*0x8]
OR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001a9ed5
LAB_001a9f0d:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001a7240
MOV qword ptr [RBP + -0x8],RAX
LAB_001a9f1a:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 vec_is_equal(long param_1,long param_2,ulong param_3)
{
int8 local_48;
int8 local_40;
int8 local_10;
if ((param_3 & 0xf) == 0) {
local_10 = vec_is_equal_16x(param_1,param_2,param_3);
}
else {
local_40 = 0;
for (local_48 = 0; local_48 < param_3 >> 3; local_48 = local_48 + 1) {
local_40 = *(ulong *)(param_1 + local_48 * 8) ^ *(ulong *)(param_2 + local_48 * 8) | local_40;
}
local_10 = is_zero(local_40);
}
return local_10;
}
|
|
59,888
|
my_snprintf_8bit
|
eloqsql/strings/ctype-simple.c
|
size_t my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n __attribute__((unused)),
const char* fmt, ...)
{
va_list args;
size_t result;
va_start(args,fmt);
result= my_vsnprintf(to, n, fmt, args);
va_end(args);
return result;
}
|
O0
|
c
|
my_snprintf_8bit:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp # imm = 0x100
testb %al, %al
je 0x5309e
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
movq %r9, -0xd8(%rbp)
movq %r8, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0x100(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x20, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x862c0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq $0x100, %rsp # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_snprintf_8bit:
push rbp
mov rbp, rsp
sub rsp, 100h
test al, al
jz short loc_5309E
movaps [rbp+var_D0], xmm0
movaps [rbp+var_C0], xmm1
movaps [rbp+var_B0], xmm2
movaps [rbp+var_A0], xmm3
movaps [rbp+var_90], xmm4
movaps [rbp+var_80], xmm5
movaps [rbp+var_70], xmm6
movaps [rbp+var_60], xmm7
loc_5309E:
mov [rbp+var_D8], r9
mov [rbp+var_E0], r8
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
lea rax, [rbp+var_100]
mov [rbp+var_30], rax
lea rax, [rbp+arg_0]
mov [rbp+var_38], rax
mov [rbp+var_3C], 30h ; '0'
mov [rbp+var_40], 20h ; ' '
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
lea rcx, [rbp+var_40]
call my_vsnprintf
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
add rsp, 100h
pop rbp
retn
|
long long my_snprintf_8bit(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-100h] BYREF
long long v17; // [rsp+20h] [rbp-E0h]
long long v18; // [rsp+28h] [rbp-D8h]
__m128 v19; // [rsp+30h] [rbp-D0h]
__m128 v20; // [rsp+40h] [rbp-C0h]
__m128 v21; // [rsp+50h] [rbp-B0h]
__m128 v22; // [rsp+60h] [rbp-A0h]
__m128 v23; // [rsp+70h] [rbp-90h]
__m128 v24; // [rsp+80h] [rbp-80h]
__m128 v25; // [rsp+90h] [rbp-70h]
__m128 v26; // [rsp+A0h] [rbp-60h]
_DWORD v27[2]; // [rsp+C0h] [rbp-40h] BYREF
char *v28; // [rsp+C8h] [rbp-38h]
char *v29; // [rsp+D0h] [rbp-30h]
long long v30; // [rsp+E0h] [rbp-20h]
long long v31; // [rsp+E8h] [rbp-18h]
long long v32; // [rsp+F0h] [rbp-10h]
long long v33; // [rsp+F8h] [rbp-8h]
v19 = a7;
v20 = a8;
v21 = a9;
v22 = a10;
v23 = a11;
v24 = a12;
v25 = a13;
v26 = a14;
v18 = a6;
v17 = a5;
v33 = a1;
v32 = a2;
v31 = a3;
v30 = a4;
v29 = &v16;
v28 = &a15;
v27[1] = 48;
v27[0] = 32;
return my_vsnprintf(a2, a3, a4, v27);
}
|
my_snprintf_8bit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x100
TEST AL,AL
JZ 0x0015309e
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
MOVAPS xmmword ptr [RBP + -0xc0],XMM1
MOVAPS xmmword ptr [RBP + -0xb0],XMM2
MOVAPS xmmword ptr [RBP + -0xa0],XMM3
MOVAPS xmmword ptr [RBP + -0x90],XMM4
MOVAPS xmmword ptr [RBP + -0x80],XMM5
MOVAPS xmmword ptr [RBP + -0x70],XMM6
MOVAPS xmmword ptr [RBP + -0x60],XMM7
LAB_0015309e:
MOV qword ptr [RBP + -0xd8],R9
MOV qword ptr [RBP + -0xe0],R8
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
LEA RAX,[RBP + -0x100]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x30
MOV dword ptr [RBP + -0x40],0x20
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
LEA RCX,[RBP + -0x40]
CALL 0x001862c0
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RSP,0x100
POP RBP
RET
|
int8
my_snprintf_8bit(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;
int8 uVar1;
int1 local_108 [32];
int8 local_e8;
int8 local_e0;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int4 local_48;
int4 local_44;
int1 *local_40;
int1 *local_38;
int8 local_28;
int8 local_20;
int8 local_18;
int8 local_10;
if (in_AL != '\0') {
local_d8 = param_1;
local_c8 = param_2;
local_b8 = param_3;
local_a8 = param_4;
local_98 = param_5;
local_88 = param_6;
local_78 = param_7;
local_68 = param_8;
}
local_38 = local_108;
local_40 = &stack0x00000008;
local_44 = 0x30;
local_48 = 0x20;
local_e8 = param_13;
local_e0 = param_14;
local_28 = param_12;
local_20 = param_11;
local_18 = param_10;
local_10 = param_9;
uVar1 = my_vsnprintf(param_10,param_11,param_12,&local_48);
return uVar1;
}
|
|
59,889
|
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>::push_back(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>&&)
|
llama.cpp/common/json.hpp
|
void push_back(basic_json&& val)
{
// push_back only works for null objects or arrays
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
}
// transform null object into an array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value = value_t::array;
assert_invariant();
}
// add element to array (move semantics)
const auto old_capacity = m_data.m_value.array->capacity();
m_data.m_value.array->push_back(std::move(val));
set_parent(m_data.m_value.array->back(), old_capacity);
// if val is moved from, basic_json move constructor marks it null, so we do not call the destructor
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
jne 0xd1c1c
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x21250
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x886ee
jmp 0xd1c21
cmpl $0x2, %eax
jne 0xd1c35
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x8c504
movl $0x20, %edi
callq 0x21700
movq %rax, %rbx
movq %r14, %rdi
callq 0x8dda0
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x51914(%rip), %rsi # 0x12356d
leaq 0x10(%rsp), %rdi
callq 0x839c6
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi # imm = 0x134
movq %r14, %rcx
callq 0x8dbc8
xorl %ebp, %ebp
leaq 0x923ac(%rip), %rsi # 0x164030
leaq -0x57cfd(%rip), %rdx # 0x79f8e
movq %rbx, %rdi
callq 0x21b50
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd1cb1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x211a0
testb %bpl, %bpl
jne 0xd1cbb
jmp 0xd1cc3
movq %rax, %r14
movq %rbx, %rdi
callq 0x220a0
movq %r14, %rdi
callq 0x21c10
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backEOSD_:
push rbp; void *
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jnz short loc_D1C1C
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
jmp short loc_D1C21
loc_D1C1C:
cmp eax, 2
jnz short loc_D1C35
loc_D1C21:
mov rdi, [r14+8]
mov rsi, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
loc_D1C35:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUsePushB; "cannot use push_back() with "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 134h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_D1CB1
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D1CB1:
test bpl, bpl
jnz short loc_D1CBB
jmp short loc_D1CC3
mov r14, rax
loc_D1CBB:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_D1CC3:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back(
long long a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v5; // [rsp+8h] [rbp-40h] BYREF
_QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 )
{
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
"cannot use push_back() with ",
&v5);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
308,
v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
else
{
*(_BYTE *)a1 = 2;
v2 = operator new(0x18uLL);
*(_OWORD *)v2 = 0LL;
*(_QWORD *)(v2 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v2;
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 *)a1);
}
return std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<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>>(
*(_QWORD *)(a1 + 8),
a2);
}
|
push_back:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JNZ 0x001d1c1c
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x00121250
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x001886ee
JMP 0x001d1c21
LAB_001d1c1c:
CMP EAX,0x2
JNZ 0x001d1c35
LAB_001d1c21:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x0018c504
LAB_001d1c35:
MOV EDI,0x20
CALL 0x00121700
MOV RBX,RAX
MOV RDI,R14
CALL 0x0018dda0
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001d1c52:
LEA RSI,[0x22356d]
LEA RDI,[RSP + 0x10]
CALL 0x001839c6
MOV BPL,0x1
LAB_001d1c66:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x134
MOV RCX,R14
CALL 0x0018dbc8
XOR EBP,EBP
LEA RSI,[0x264030]
LEA RDX,[0x179f8e]
MOV RDI,RBX
CALL 0x00121b50
|
/* 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>::push_back(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>&&) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::push_back(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,basic_json *param_1)
{
int8 *puVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
puVar1 = (int8 *)operator_new(0x18);
*puVar1 = 0;
puVar1[1] = 0;
puVar1[2] = 0;
*(int8 **)(this + 8) = puVar1;
assert_invariant(SUB81(this,0));
}
else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001d1c52 to 001d1c62 has its CatchHandler @ 001d1cb8 */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"cannot use push_back() with ",&local_40);
/* try { // try from 001d1c66 to 001d1c92 has its CatchHandler @ 001d1c93 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x134,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<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>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8),param_1);
return;
}
|
|
59,890
|
read_user_name
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
void read_user_name(char *name)
{
if (geteuid() == 0)
strcpy(name,"root"); /* allow use of surun */
else
{
#ifdef HAVE_GETPWUID
struct passwd *skr;
const char *str;
if ((skr=getpwuid(geteuid())) != NULL)
{
str=skr->pw_name;
} else if ((str=getlogin()) == NULL)
{
if (!(str=getenv("USER")) && !(str=getenv("LOGNAME")) &&
!(str=getenv("LOGIN")))
str="UNKNOWN_USER";
}
ma_strmake(name,str,USERNAME_LENGTH);
#elif defined(HAVE_CUSERID)
(void) cuserid(name);
#else
ma_strmake(name,"UNKNOWN_USER", USERNAME_LENGTH);
#endif
}
return;
}
|
O0
|
c
|
read_user_name:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
callq 0x36260
cmpl $0x0, %eax
jne 0x3aecb
movq -0x8(%rbp), %rdi
leaq 0x8eef3(%rip), %rsi # 0xc9db4
callq 0x363f0
jmp 0x3af60
callq 0x36260
movl %eax, %edi
callq 0x361e0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x3aeee
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x3af4e
callq 0x36590
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3af4c
leaq 0x8eecb(%rip), %rdi # 0xc9dcf
callq 0x36760
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3af4a
leaq 0x8ee9f(%rip), %rdi # 0xc9db9
callq 0x36760
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3af4a
leaq 0x8ee91(%rip), %rdi # 0xc9dc1
callq 0x36760
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3af4a
leaq 0x8ee81(%rip), %rax # 0xc9dc7
movq %rax, -0x18(%rbp)
jmp 0x3af4c
jmp 0x3af4e
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x55d20
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
read_user_name:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
call _geteuid
cmp eax, 0
jnz short loc_3AECB
mov rdi, [rbp+var_8]
lea rsi, aRoot; "root"
call _strcpy
jmp loc_3AF60
loc_3AECB:
call _geteuid
mov edi, eax
call _getpwuid
mov [rbp+var_10], rax
cmp rax, 0
jz short loc_3AEEE
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_3AF4E
loc_3AEEE:
call _getlogin
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3AF4C
lea rdi, aUnknownUser+8; "USER"
call _getenv
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3AF4A
lea rdi, aLogname; "LOGNAME"
call _getenv
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3AF4A
lea rdi, aLogin; "LOGIN"
call _getenv
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3AF4A
lea rax, aUnknownUser; "UNKNOWN_USER"
mov [rbp+var_18], rax
loc_3AF4A:
jmp short $+2
loc_3AF4C:
jmp short $+2
loc_3AF4E:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov edx, 200h
call ma_strmake
loc_3AF60:
add rsp, 20h
pop rbp
retn
|
long long read_user_name(long long a1)
{
unsigned int v2; // eax
const char *v3; // [rsp+8h] [rbp-18h]
_QWORD *v4; // [rsp+10h] [rbp-10h]
if ( !(unsigned int)geteuid() )
return strcpy(a1, "root");
v2 = geteuid();
v4 = (_QWORD *)getpwuid(v2);
if ( v4 )
return ma_strmake(a1, *v4, 512LL);
v3 = (const char *)getlogin();
if ( !v3 )
{
v3 = (const char *)getenv("USER");
if ( !v3 )
{
v3 = (const char *)getenv("LOGNAME");
if ( !v3 )
{
v3 = (const char *)getenv("LOGIN");
if ( !v3 )
v3 = "UNKNOWN_USER";
}
}
}
return ma_strmake(a1, v3, 512LL);
}
|
read_user_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
CALL 0x00136260
CMP EAX,0x0
JNZ 0x0013aecb
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1c9db4]
CALL 0x001363f0
JMP 0x0013af60
LAB_0013aecb:
CALL 0x00136260
MOV EDI,EAX
CALL 0x001361e0
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x0013aeee
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013af4e
LAB_0013aeee:
CALL 0x00136590
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013af4c
LEA RDI,[0x1c9dcf]
CALL 0x00136760
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013af4a
LEA RDI,[0x1c9db9]
CALL 0x00136760
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013af4a
LEA RDI,[0x1c9dc1]
CALL 0x00136760
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013af4a
LEA RAX,[0x1c9dc7]
MOV qword ptr [RBP + -0x18],RAX
LAB_0013af4a:
JMP 0x0013af4c
LAB_0013af4c:
JMP 0x0013af4e
LAB_0013af4e:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x200
CALL 0x00155d20
LAB_0013af60:
ADD RSP,0x20
POP RBP
RET
|
void read_user_name(char *param_1)
{
__uid_t _Var1;
passwd *ppVar2;
char *local_20;
_Var1 = geteuid();
if (_Var1 == 0) {
strcpy(param_1,"root");
}
else {
_Var1 = geteuid();
ppVar2 = getpwuid(_Var1);
if (ppVar2 == (passwd *)0x0) {
local_20 = getlogin();
if ((((local_20 == (char *)0x0) && (local_20 = getenv("USER"), local_20 == (char *)0x0)) &&
(local_20 = getenv("LOGNAME"), local_20 == (char *)0x0)) &&
(local_20 = getenv("LOGIN"), local_20 == (char *)0x0)) {
local_20 = "UNKNOWN_USER";
}
}
else {
local_20 = ppVar2->pw_name;
}
ma_strmake(param_1,local_20,0x200);
}
return;
}
|
|
59,891
|
my_fprintf
|
eloqsql/strings/my_vsnprintf.c
|
int my_fprintf(FILE *stream, const char* format, ...)
{
int result;
va_list args;
va_start(args, format);
result= my_vfprintf(stream, format, args);
va_end(args);
return result;
}
|
O3
|
c
|
my_fprintf:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
leaq -0xd0(%rbp), %r10
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x5a3b4
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
leaq -0x20(%rbp), %rdx
movq %r10, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rdx)
callq 0x5a278
addq $0xd0, %rsp
popq %rbp
retq
nop
|
my_fprintf:
push rbp
mov rbp, rsp
sub rsp, 0D0h
lea r10, [rbp+var_D0]
mov [r10+10h], rdx
mov [r10+18h], rcx
mov [r10+20h], r8
mov [r10+28h], r9
test al, al
jz short loc_5A3B4
movaps [rbp+var_A0], xmm0
movaps [rbp+var_90], xmm1
movaps [rbp+var_80], xmm2
movaps [rbp+var_70], xmm3
movaps [rbp+var_60], xmm4
movaps [rbp+var_50], xmm5
movaps [rbp+var_40], xmm6
movaps [rbp+var_30], xmm7
loc_5A3B4:
lea rdx, [rbp+var_20]
mov [rdx+10h], r10
lea rax, [rbp+arg_0]
mov [rdx+8], rax
mov rax, 3000000010h
mov [rdx], rax
call my_vfprintf
add rsp, 0D0h
pop rbp
retn
|
long long my_fprintf(
long long a1,
unsigned __int8 *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-D0h] BYREF
long long v17; // [rsp+10h] [rbp-C0h]
long long v18; // [rsp+18h] [rbp-B8h]
long long v19; // [rsp+20h] [rbp-B0h]
long long v20; // [rsp+28h] [rbp-A8h]
__m128 v21; // [rsp+30h] [rbp-A0h]
__m128 v22; // [rsp+40h] [rbp-90h]
__m128 v23; // [rsp+50h] [rbp-80h]
__m128 v24; // [rsp+60h] [rbp-70h]
__m128 v25; // [rsp+70h] [rbp-60h]
__m128 v26; // [rsp+80h] [rbp-50h]
__m128 v27; // [rsp+90h] [rbp-40h]
__m128 v28; // [rsp+A0h] [rbp-30h]
_QWORD v29[4]; // [rsp+B0h] [rbp-20h] BYREF
v21 = a7;
v22 = a8;
v23 = a9;
v24 = a10;
v25 = a11;
v26 = a12;
v27 = a13;
v28 = a14;
v17 = a3;
v18 = a4;
v19 = a5;
v20 = a6;
v29[2] = &v16;
v29[1] = &a15;
v29[0] = 0x3000000010LL;
return my_vfprintf(a1, a2, (unsigned int *)v29);
}
|
my_fprintf:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
LEA R10,[RBP + -0xd0]
MOV qword ptr [R10 + 0x10],RDX
MOV qword ptr [R10 + 0x18],RCX
MOV qword ptr [R10 + 0x20],R8
MOV qword ptr [R10 + 0x28],R9
TEST AL,AL
JZ 0x0015a3b4
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM1
MOVAPS xmmword ptr [RBP + -0x80],XMM2
MOVAPS xmmword ptr [RBP + -0x70],XMM3
MOVAPS xmmword ptr [RBP + -0x60],XMM4
MOVAPS xmmword ptr [RBP + -0x50],XMM5
MOVAPS xmmword ptr [RBP + -0x40],XMM6
MOVAPS xmmword ptr [RBP + -0x30],XMM7
LAB_0015a3b4:
LEA RDX,[RBP + -0x20]
MOV qword ptr [RDX + 0x10],R10
LEA RAX,[RBP + 0x10]
MOV qword ptr [RDX + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [RDX],RAX
CALL 0x0015a278
ADD RSP,0xd0
POP RBP
RET
|
void my_fprintf(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int1 local_d8 [16];
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int8 local_28;
int1 *local_20;
int1 *local_18;
local_18 = local_d8;
if (in_AL != '\0') {
local_a8 = param_1;
local_98 = param_2;
local_88 = param_3;
local_78 = param_4;
local_68 = param_5;
local_58 = param_6;
local_48 = param_7;
local_38 = param_8;
}
local_20 = &stack0x00000008;
local_28 = 0x3000000010;
local_c8 = param_11;
local_c0 = param_12;
local_b8 = param_13;
local_b0 = param_14;
my_vfprintf();
return;
}
|
|
59,892
|
psi_rwlock_wrlock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD
int psi_rwlock_wrlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)
(&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line);
int result= rw_wrlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
}
|
O0
|
c
|
psi_rwlock_wrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1a57ce(%rip), %rax # 0x1d5dc8
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 $0x1, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x30b60
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x30653
leaq 0x1a5788(%rip), %rax # 0x1d5dc8
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_wrlock:
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, 1
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call my_rw_wrlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_30653
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_30653:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_rwlock_wrlock(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),
1LL,
a2,
a3);
v4 = my_rw_wrlock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 55))(v5, v4);
return v4;
}
|
psi_rwlock_wrlock:
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,[0x2d5dc8]
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,0x1
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00130b60
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x00130653
LEA RAX,[0x2d5dc8]
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_00130653:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_rwlock_wrlock(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),1,param_2,param_3);
uVar1 = my_rw_wrlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
|
|
59,893
|
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(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t)
|
monkey531[P]llama/common/json.hpp
|
serializer(output_adapter_t<char> s, const char ichar,
error_handler_t error_handler_ = error_handler_t::strict)
: o(std::move(s))
, loc(std::localeconv())
, thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep)))
, decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point)))
, indent_char(ichar)
, indent_string(512, indent_char)
, error_handler(error_handler_)
{}
|
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(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %rbx
xorl %r15d, %r15d
movq %r15, 0x8(%rdi)
movups (%rsi), %xmm0
movq %r15, 0x8(%rsi)
movups %xmm0, (%rdi)
movq %r15, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
callq 0x1c180
movq %rax, 0x50(%rbx)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xbbd59
movb (%rcx), %r15b
movb %r15b, 0x58(%rbx)
movq (%rax), %rax
testq %rax, %rax
je 0xbbd69
movb (%rax), %al
jmp 0xbbd6b
xorl %eax, %eax
movb %al, 0x59(%rbx)
leaq 0x5a(%rbx), %rdi
movl $0x200, %edx # imm = 0x200
xorl %esi, %esi
callq 0x1b500
movb %r14b, 0x25a(%rbx)
leaq 0x260(%rbx), %rdi
leaq 0x270(%rbx), %rax
movq %rax, 0x260(%rbx)
movsbl %r14b, %edx
movl $0x200, %esi # imm = 0x200
callq 0x1ba60
movl %ebp, 0x280(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xbbdca
callq 0x33c28
movq %r14, %rdi
callq 0x1bff0
|
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt10shared_ptrINS1_23output_adapter_protocolIcEEEcNS1_15error_handler_tE:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, ecx
mov r14d, edx
mov rbx, rdi
xor r15d, r15d
mov [rdi+8], r15
movups xmm0, xmmword ptr [rsi]
mov [rsi+8], r15
movups xmmword ptr [rdi], xmm0
mov [rsi], r15
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
call _localeconv
mov [rbx+50h], rax
mov rcx, [rax+8]
test rcx, rcx
jz short loc_BBD59
mov r15b, [rcx]
loc_BBD59:
mov [rbx+58h], r15b
mov rax, [rax]
test rax, rax
jz short loc_BBD69
mov al, [rax]
jmp short loc_BBD6B
loc_BBD69:
xor eax, eax
loc_BBD6B:
mov [rbx+59h], al
lea rdi, [rbx+5Ah]
mov edx, 200h
xor esi, esi
call _memset
mov [rbx+25Ah], r14b
lea rdi, [rbx+260h]
lea rax, [rbx+270h]
mov [rbx+260h], rax
movsx edx, r14b
mov esi, 200h
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov [rbx+280h], ebp
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_BBDCA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_BBDCA:
mov rdi, r14
call __Unwind_Resume
|
long long 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(
long long a1,
__int128 *a2,
char a3,
int a4)
{
char v6; // r15
__int128 v7; // xmm0
long long v8; // rax
char *v9; // rcx
char *v10; // rax
char v11; // al
long long result; // rax
v6 = 0;
*(_QWORD *)(a1 + 8) = 0LL;
v7 = *a2;
*((_QWORD *)a2 + 1) = 0LL;
*(_OWORD *)a1 = v7;
*(_QWORD *)a2 = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
v8 = localeconv(a1);
*(_QWORD *)(a1 + 80) = v8;
v9 = *(char **)(v8 + 8);
if ( v9 )
v6 = *v9;
*(_BYTE *)(a1 + 88) = v6;
v10 = *(char **)v8;
if ( v10 )
v11 = *v10;
else
v11 = 0;
*(_BYTE *)(a1 + 89) = v11;
memset(a1 + 90, 0LL, 512LL);
*(_BYTE *)(a1 + 602) = a3;
*(_QWORD *)(a1 + 608) = a1 + 624;
result = std::string::_M_construct(a1 + 608, 512LL, (unsigned int)a3);
*(_DWORD *)(a1 + 640) = a4;
return result;
}
|
serializer:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV R14D,EDX
MOV RBX,RDI
XOR R15D,R15D
MOV qword ptr [RDI + 0x8],R15
MOVUPS XMM0,xmmword ptr [RSI]
MOV qword ptr [RSI + 0x8],R15
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RSI],R15
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
CALL 0x0011c180
MOV qword ptr [RBX + 0x50],RAX
MOV RCX,qword ptr [RAX + 0x8]
TEST RCX,RCX
JZ 0x001bbd59
MOV R15B,byte ptr [RCX]
LAB_001bbd59:
MOV byte ptr [RBX + 0x58],R15B
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001bbd69
MOV AL,byte ptr [RAX]
JMP 0x001bbd6b
LAB_001bbd69:
XOR EAX,EAX
LAB_001bbd6b:
MOV byte ptr [RBX + 0x59],AL
LEA RDI,[RBX + 0x5a]
MOV EDX,0x200
XOR ESI,ESI
CALL 0x0011b500
MOV byte ptr [RBX + 0x25a],R14B
LEA RDI,[RBX + 0x260]
LEA RAX,[RBX + 0x270]
MOV qword ptr [RBX + 0x260],RAX
LAB_001bbd9a:
MOVSX EDX,R14B
MOV ESI,0x200
CALL 0x0011ba60
LAB_001bbda8:
MOV dword ptr [RBX + 0x280],EBP
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
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(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>
>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) */
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,int8 *param_2,
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>>
param_3,int4 param_4)
{
int8 uVar1;
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>>
sVar2;
lconv *plVar3;
sVar2 = (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>>
)0x0;
*(int8 *)(this + 8) = 0;
uVar1 = param_2[1];
param_2[1] = 0;
*(int8 *)this = *param_2;
*(int8 *)(this + 8) = uVar1;
*param_2 = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
plVar3 = localeconv();
*(lconv **)(this + 0x50) = plVar3;
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>>
*)plVar3->thousands_sep !=
(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>>
*)0x0) {
sVar2 = *(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>>
*)plVar3->thousands_sep;
}
this[0x58] = sVar2;
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>>
*)plVar3->decimal_point ==
(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>>
*)0x0) {
sVar2 = (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>>
)0x0;
}
else {
sVar2 = *(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>>
*)plVar3->decimal_point;
}
this[0x59] = sVar2;
memset(this + 0x5a,0,0x200);
this[0x25a] = param_3;
*(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;
/* try { // try from 001bbd9a to 001bbda7 has its CatchHandler @ 001bbdb9 */
std::__cxx11::string::_M_construct((ulong)(this + 0x260),'\0');
*(int4 *)(this + 0x280) = param_4;
return;
}
|
|
59,894
|
google::protobuf::ServiceDescriptorProto::_internal_mutable_options()
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.h
|
inline ::PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::_internal_mutable_options() {
_impl_._has_bits_[0] |= 0x00000002u;
if (_impl_.options_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::ServiceOptions>(GetArenaForAllocation());
_impl_.options_ = p;
}
return _impl_.options_;
}
|
O0
|
c
|
google::protobuf::ServiceDescriptorProto::_internal_mutable_options():
subq $0x28, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x20(%rsp), %rcx
movslq 0x1c(%rsp), %rdx
movl (%rcx,%rdx,4), %esi
orl $0x2, %esi
movl %esi, (%rcx,%rdx,4)
cmpq $0x0, 0x38(%rax)
jne 0x81ac6
movq (%rsp), %rdi
callq 0x80180
movq %rax, %rdi
callq 0x81ae0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movq 0x8(%rsp), %rcx
movq %rcx, 0x38(%rax)
movq (%rsp), %rax
movq 0x38(%rax), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN6google8protobuf22ServiceDescriptorProto25_internal_mutable_optionsEv:
sub rsp, 28h
mov [rsp+28h+var_18], rdi
mov rax, [rsp+28h+var_18]
mov [rsp+28h+var_28], rax
mov rcx, rax
add rcx, 10h
mov [rsp+28h+var_8], rcx
mov [rsp+28h+var_C], 0
mov rcx, [rsp+28h+var_8]
movsxd rdx, [rsp+28h+var_C]
mov esi, [rcx+rdx*4]
or esi, 2
mov [rcx+rdx*4], esi
cmp qword ptr [rax+38h], 0
jnz short loc_81AC6
mov rdi, [rsp+28h+var_28]; this
call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void)
mov rdi, rax; int
call _ZN6google8protobuf11MessageLite18CreateMaybeMessageINS0_14ServiceOptionsEEEPT_PNS0_5ArenaE; google::protobuf::MessageLite::CreateMaybeMessage<google::protobuf::ServiceOptions>(google::protobuf::Arena *)
mov rcx, rax
mov rax, [rsp+28h+var_28]
mov [rsp+28h+var_20], rcx
mov rcx, [rsp+28h+var_20]
mov [rax+38h], rcx
loc_81AC6:
mov rax, [rsp+28h+var_28]
mov rax, [rax+38h]
add rsp, 28h
retn
|
long long google::protobuf::ServiceDescriptorProto::_internal_mutable_options(
google::protobuf::ServiceDescriptorProto *this)
{
int ArenaForAllocation; // eax
*((_DWORD *)this + 4) |= 2u;
if ( !*((_QWORD *)this + 7) )
{
ArenaForAllocation = google::protobuf::MessageLite::GetArenaForAllocation(this);
*((_QWORD *)this + 7) = google::protobuf::MessageLite::CreateMaybeMessage<google::protobuf::ServiceOptions>(ArenaForAllocation);
}
return *((_QWORD *)this + 7);
}
|
_internal_mutable_options:
SUB RSP,0x28
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV RCX,RAX
ADD RCX,0x10
MOV qword ptr [RSP + 0x20],RCX
MOV dword ptr [RSP + 0x1c],0x0
MOV RCX,qword ptr [RSP + 0x20]
MOVSXD RDX,dword ptr [RSP + 0x1c]
MOV ESI,dword ptr [RCX + RDX*0x4]
OR ESI,0x2
MOV dword ptr [RCX + RDX*0x4],ESI
CMP qword ptr [RAX + 0x38],0x0
JNZ 0x00181ac6
MOV RDI,qword ptr [RSP]
CALL 0x00180180
MOV RDI,RAX
CALL 0x00181ae0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RCX
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x38],RCX
LAB_00181ac6:
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0x38]
ADD RSP,0x28
RET
|
/* google::protobuf::ServiceDescriptorProto::_internal_mutable_options() */
int8 __thiscall
google::protobuf::ServiceDescriptorProto::_internal_mutable_options(ServiceDescriptorProto *this)
{
Arena *pAVar1;
ServiceOptions *pSVar2;
*(uint *)(this + 0x10) = *(uint *)(this + 0x10) | 2;
if (*(long *)(this + 0x38) == 0) {
pAVar1 = (Arena *)MessageLite::GetArenaForAllocation((MessageLite *)this);
pSVar2 = MessageLite::CreateMaybeMessage<google::protobuf::ServiceOptions>(pAVar1);
*(ServiceOptions **)(this + 0x38) = pSVar2;
}
return *(int8 *)(this + 0x38);
}
|
|
59,895
|
copy_typelib
|
eloqsql/mysys/typelib.c
|
TYPELIB *copy_typelib(MEM_ROOT *root, const TYPELIB *from)
{
TYPELIB *to;
uint i;
if (!from)
return NULL;
if (!(to= (TYPELIB*) alloc_root(root, sizeof(TYPELIB))))
return NULL;
if (!(to->type_names= (const char **)
alloc_root(root, (sizeof(char *) + sizeof(int)) * (from->count + 1))))
return NULL;
to->type_lengths= (unsigned int *)(to->type_names + from->count + 1);
to->count= from->count;
if (from->name)
{
if (!(to->name= strdup_root(root, from->name)))
return NULL;
}
else
to->name= NULL;
for (i= 0; i < from->count; i++)
{
if (!(to->type_names[i]= strmake_root(root, from->type_names[i],
from->type_lengths[i])))
return NULL;
to->type_lengths[i]= from->type_lengths[i];
}
to->type_names[to->count]= NULL;
to->type_lengths[to->count]= 0;
return to;
}
|
O0
|
c
|
copy_typelib:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x83884
movq $0x0, -0x8(%rbp)
jmp 0x83a01
movq -0x10(%rbp), %rdi
movl $0x20, %esi
callq 0x79780
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x838a9
movq $0x0, -0x8(%rbp)
jmp 0x83a01
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %eax
addl $0x1, %eax
movl %eax, %eax
imulq $0xc, %rax, %rsi
callq 0x79780
movq -0x20(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x838dc
movq $0x0, -0x8(%rbp)
jmp 0x83a01
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movl (%rax), %eax
shlq $0x3, %rax
addq %rax, %rcx
addq $0x8, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x83942
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x79ff0
movq -0x20(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
jne 0x83940
movq $0x0, -0x8(%rbp)
jmp 0x83a01
jmp 0x8394e
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x839ce
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x24(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, %edx
callq 0x7a030
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x24(%rbp), %edx
movq %rax, (%rcx,%rdx,8)
cmpq $0x0, %rax
jne 0x839a7
movq $0x0, -0x8(%rbp)
jmp 0x83a01
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x24(%rbp), %ecx
movl (%rax,%rcx,4), %edx
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x24(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x83955
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
movq $0x0, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
movl $0x0, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
copy_typelib:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_18], 0
jnz short loc_83884
mov [rbp+var_8], 0
jmp loc_83A01
loc_83884:
mov rdi, [rbp+var_10]
mov esi, 20h ; ' '
call alloc_root
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_838A9
mov [rbp+var_8], 0
jmp loc_83A01
loc_838A9:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov eax, [rax]
add eax, 1
mov eax, eax
imul rsi, rax, 0Ch
call alloc_root
mov rcx, [rbp+var_20]
mov [rcx+10h], rax
cmp rax, 0
jnz short loc_838DC
mov [rbp+var_8], 0
jmp loc_83A01
loc_838DC:
mov rax, [rbp+var_20]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov eax, [rax]
shl rax, 3
add rcx, rax
add rcx, 8
mov rax, [rbp+var_20]
mov [rax+18h], rcx
mov rax, [rbp+var_18]
mov ecx, [rax]
mov rax, [rbp+var_20]
mov [rax], ecx
mov rax, [rbp+var_18]
cmp qword ptr [rax+8], 0
jz short loc_83942
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+8]
call strdup_root
mov rcx, [rbp+var_20]
mov [rcx+8], rax
cmp rax, 0
jnz short loc_83940
mov [rbp+var_8], 0
jmp loc_83A01
loc_83940:
jmp short loc_8394E
loc_83942:
mov rax, [rbp+var_20]
mov qword ptr [rax+8], 0
loc_8394E:
mov [rbp+var_24], 0
loc_83955:
mov eax, [rbp+var_24]
mov rcx, [rbp+var_18]
cmp eax, [rcx]
jnb short loc_839CE
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov ecx, [rbp+var_24]
mov rsi, [rax+rcx*8]
mov rax, [rbp+var_18]
mov rax, [rax+18h]
mov ecx, [rbp+var_24]
mov eax, [rax+rcx*4]
mov edx, eax
call strmake_root
mov rcx, [rbp+var_20]
mov rcx, [rcx+10h]
mov edx, [rbp+var_24]
mov [rcx+rdx*8], rax
cmp rax, 0
jnz short loc_839A7
mov [rbp+var_8], 0
jmp short loc_83A01
loc_839A7:
mov rax, [rbp+var_18]
mov rax, [rax+18h]
mov ecx, [rbp+var_24]
mov edx, [rax+rcx*4]
mov rax, [rbp+var_20]
mov rax, [rax+18h]
mov ecx, [rbp+var_24]
mov [rax+rcx*4], edx
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp short loc_83955
loc_839CE:
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_20]
mov ecx, [rcx]
mov qword ptr [rax+rcx*8], 0
mov rax, [rbp+var_20]
mov rax, [rax+18h]
mov rcx, [rbp+var_20]
mov ecx, [rcx]
mov dword ptr [rax+rcx*4], 0
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_83A01:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
char * copy_typelib(_QWORD **a1, unsigned int *a2)
{
char *v2; // rax
long long v3; // rax
char *v4; // rax
unsigned int i; // [rsp+Ch] [rbp-24h]
char *v7; // [rsp+10h] [rbp-20h]
if ( !a2 )
return 0LL;
v7 = alloc_root(a1, 32LL);
if ( !v7 )
return 0LL;
v2 = alloc_root(a1, 12LL * (*a2 + 1));
*((_QWORD *)v7 + 2) = v2;
if ( !v2 )
return 0LL;
*((_QWORD *)v7 + 3) = 8LL * *a2 + *((_QWORD *)v7 + 2) + 8;
*(_DWORD *)v7 = *a2;
if ( *((_QWORD *)a2 + 1) )
{
v3 = strdup_root((long long)a1, *((_QWORD *)a2 + 1));
*((_QWORD *)v7 + 1) = v3;
if ( !v3 )
return 0LL;
}
else
{
*((_QWORD *)v7 + 1) = 0LL;
}
for ( i = 0; i < *a2; ++i )
{
v4 = strmake_root(a1, *(_QWORD *)(*((_QWORD *)a2 + 2) + 8LL * i), *(unsigned int *)(*((_QWORD *)a2 + 3) + 4LL * i));
*(_QWORD *)(*((_QWORD *)v7 + 2) + 8LL * i) = v4;
if ( !v4 )
return 0LL;
*(_DWORD *)(*((_QWORD *)v7 + 3) + 4LL * i) = *(_DWORD *)(*((_QWORD *)a2 + 3) + 4LL * i);
}
*(_QWORD *)(*((_QWORD *)v7 + 2) + 8LL * *(unsigned int *)v7) = 0LL;
*(_DWORD *)(*((_QWORD *)v7 + 3) + 4LL * *(unsigned int *)v7) = 0;
return v7;
}
|
copy_typelib:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00183884
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00183a01
LAB_00183884:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x20
CALL 0x00179780
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x001838a9
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00183a01
LAB_001838a9:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
ADD EAX,0x1
MOV EAX,EAX
IMUL RSI,RAX,0xc
CALL 0x00179780
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JNZ 0x001838dc
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00183a01
LAB_001838dc:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
SHL RAX,0x3
ADD RCX,RAX
ADD RCX,0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00183942
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x00179ff0
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RCX + 0x8],RAX
CMP RAX,0x0
JNZ 0x00183940
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00183a01
LAB_00183940:
JMP 0x0018394e
LAB_00183942:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x8],0x0
LAB_0018394e:
MOV dword ptr [RBP + -0x24],0x0
LAB_00183955:
MOV EAX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x18]
CMP EAX,dword ptr [RCX]
JNC 0x001839ce
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV ECX,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV ECX,dword ptr [RBP + -0x24]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV EDX,EAX
CALL 0x0017a030
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x10]
MOV EDX,dword ptr [RBP + -0x24]
MOV qword ptr [RCX + RDX*0x8],RAX
CMP RAX,0x0
JNZ 0x001839a7
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00183a01
LAB_001839a7:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV ECX,dword ptr [RBP + -0x24]
MOV EDX,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x18]
MOV ECX,dword ptr [RBP + -0x24]
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x00183955
LAB_001839ce:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX]
MOV qword ptr [RAX + RCX*0x8],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RAX + RCX*0x4],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_00183a01:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
uint * copy_typelib(int8 param_1,uint *param_2)
{
long lVar1;
uint local_2c;
uint *local_10;
if (param_2 == (uint *)0x0) {
local_10 = (uint *)0x0;
}
else {
local_10 = (uint *)alloc_root(param_1,0x20);
if (local_10 == (uint *)0x0) {
local_10 = (uint *)0x0;
}
else {
lVar1 = alloc_root(param_1,(ulong)(*param_2 + 1) * 0xc);
*(long *)(local_10 + 4) = lVar1;
if (lVar1 == 0) {
local_10 = (uint *)0x0;
}
else {
*(ulong *)(local_10 + 6) = *(long *)(local_10 + 4) + (ulong)*param_2 * 8 + 8;
*local_10 = *param_2;
if (*(long *)(param_2 + 2) == 0) {
local_10[2] = 0;
local_10[3] = 0;
}
else {
lVar1 = strdup_root(param_1,*(int8 *)(param_2 + 2));
*(long *)(local_10 + 2) = lVar1;
if (lVar1 == 0) {
return (uint *)0x0;
}
}
for (local_2c = 0; local_2c < *param_2; local_2c = local_2c + 1) {
lVar1 = strmake_root(param_1,*(int8 *)(*(long *)(param_2 + 4) + (ulong)local_2c * 8)
,*(int4 *)(*(long *)(param_2 + 6) + (ulong)local_2c * 4));
*(long *)(*(long *)(local_10 + 4) + (ulong)local_2c * 8) = lVar1;
if (lVar1 == 0) {
return (uint *)0x0;
}
*(int4 *)(*(long *)(local_10 + 6) + (ulong)local_2c * 4) =
*(int4 *)(*(long *)(param_2 + 6) + (ulong)local_2c * 4);
}
*(int8 *)(*(long *)(local_10 + 4) + (ulong)*local_10 * 8) = 0;
*(int4 *)(*(long *)(local_10 + 6) + (ulong)*local_10 * 4) = 0;
}
}
}
return local_10;
}
|
|
59,896
|
copy_typelib
|
eloqsql/mysys/typelib.c
|
TYPELIB *copy_typelib(MEM_ROOT *root, const TYPELIB *from)
{
TYPELIB *to;
uint i;
if (!from)
return NULL;
if (!(to= (TYPELIB*) alloc_root(root, sizeof(TYPELIB))))
return NULL;
if (!(to->type_names= (const char **)
alloc_root(root, (sizeof(char *) + sizeof(int)) * (from->count + 1))))
return NULL;
to->type_lengths= (unsigned int *)(to->type_names + from->count + 1);
to->count= from->count;
if (from->name)
{
if (!(to->name= strdup_root(root, from->name)))
return NULL;
}
else
to->name= NULL;
for (i= 0; i < from->count; i++)
{
if (!(to->type_names[i]= strmake_root(root, from->type_names[i],
from->type_lengths[i])))
return NULL;
to->type_lengths[i]= from->type_lengths[i];
}
to->type_names[to->count]= NULL;
to->type_lengths[to->count]= 0;
return to;
}
|
O3
|
c
|
copy_typelib:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x6457b
movq %rsi, %r14
movq %rdi, %r15
movl $0x20, %esi
callq 0x5e1ff
testq %rax, %rax
je 0x6457b
movq %rax, %rbx
movl (%r14), %eax
incl %eax
shlq $0x2, %rax
leaq (%rax,%rax,2), %rsi
movq %r15, %rdi
callq 0x5e1ff
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x6457b
movl (%r14), %ecx
leaq (%rax,%rcx,8), %rax
addq $0x8, %rax
movq %rax, 0x18(%rbx)
movl (%r14), %eax
movl %eax, (%rbx)
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0x64589
movq %r15, %rdi
callq 0x5e59a
movq %rax, 0x8(%rbx)
testq %rax, %rax
jne 0x64591
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, 0x8(%rbx)
cmpl $0x0, (%r14)
je 0x645da
xorl %r12d, %r12d
movq 0x10(%r14), %rax
movq 0x18(%r14), %rcx
movq (%rax,%r12,8), %rsi
movl (%rcx,%r12,4), %edx
movq %r15, %rdi
callq 0x5e5c1
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
testq %rax, %rax
je 0x6457b
movq 0x18(%r14), %rax
movl (%rax,%r12,4), %eax
movq 0x18(%rbx), %rcx
movl %eax, (%rcx,%r12,4)
incq %r12
movl (%r14), %eax
cmpq %rax, %r12
jb 0x6459a
movq 0x10(%rbx), %rax
movl (%rbx), %ecx
movq $0x0, (%rax,%rcx,8)
movq 0x18(%rbx), %rax
movl (%rbx), %ecx
movl $0x0, (%rax,%rcx,4)
jmp 0x6457d
|
copy_typelib:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
test rsi, rsi
jz short loc_6457B
mov r14, rsi
mov r15, rdi
mov esi, 20h ; ' '
call alloc_root
test rax, rax
jz short loc_6457B
mov rbx, rax
mov eax, [r14]
inc eax
shl rax, 2
lea rsi, [rax+rax*2]
mov rdi, r15
call alloc_root
mov [rbx+10h], rax
test rax, rax
jz short loc_6457B
mov ecx, [r14]
lea rax, [rax+rcx*8]
add rax, 8
mov [rbx+18h], rax
mov eax, [r14]
mov [rbx], eax
mov rsi, [r14+8]
test rsi, rsi
jz short loc_64589
mov rdi, r15
call strdup_root
mov [rbx+8], rax
test rax, rax
jnz short loc_64591
loc_6457B:
xor ebx, ebx
loc_6457D:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_64589:
mov qword ptr [rbx+8], 0
loc_64591:
cmp dword ptr [r14], 0
jz short loc_645DA
xor r12d, r12d
loc_6459A:
mov rax, [r14+10h]
mov rcx, [r14+18h]
mov rsi, [rax+r12*8]
mov edx, [rcx+r12*4]
mov rdi, r15
call strmake_root
mov rcx, [rbx+10h]
mov [rcx+r12*8], rax
test rax, rax
jz short loc_6457B
mov rax, [r14+18h]
mov eax, [rax+r12*4]
mov rcx, [rbx+18h]
mov [rcx+r12*4], eax
inc r12
mov eax, [r14]
cmp r12, rax
jb short loc_6459A
loc_645DA:
mov rax, [rbx+10h]
mov ecx, [rbx]
mov qword ptr [rax+rcx*8], 0
mov rax, [rbx+18h]
mov ecx, [rbx]
mov dword ptr [rax+rcx*4], 0
jmp short loc_6457D
|
char * copy_typelib(long long a1, unsigned int *a2)
{
char *v3; // rax
char *v4; // rbx
char *v5; // rax
long long v6; // rsi
long long v7; // rax
long long v9; // r12
char *v10; // rax
if ( !a2 )
return 0LL;
v3 = alloc_root(a1, 32LL);
if ( !v3 )
return 0LL;
v4 = v3;
v5 = alloc_root(a1, 12LL * (*a2 + 1));
*((_QWORD *)v4 + 2) = v5;
if ( !v5 )
return 0LL;
*((_QWORD *)v4 + 3) = &v5[8 * *a2 + 8];
*(_DWORD *)v4 = *a2;
v6 = *((_QWORD *)a2 + 1);
if ( v6 )
{
v7 = strdup_root(a1, v6);
*((_QWORD *)v4 + 1) = v7;
if ( !v7 )
return 0LL;
}
else
{
*((_QWORD *)v4 + 1) = 0LL;
}
if ( !*a2 )
{
LABEL_13:
*(_QWORD *)(*((_QWORD *)v4 + 2) + 8LL * *(unsigned int *)v4) = 0LL;
*(_DWORD *)(*((_QWORD *)v4 + 3) + 4LL * *(unsigned int *)v4) = 0;
return v4;
}
v9 = 0LL;
while ( 1 )
{
v10 = strmake_root(a1, *(_QWORD *)(*((_QWORD *)a2 + 2) + 8 * v9), *(unsigned int *)(*((_QWORD *)a2 + 3) + 4 * v9));
*(_QWORD *)(*((_QWORD *)v4 + 2) + 8 * v9) = v10;
if ( !v10 )
return 0LL;
*(_DWORD *)(*((_QWORD *)v4 + 3) + 4 * v9) = *(_DWORD *)(*((_QWORD *)a2 + 3) + 4 * v9);
if ( ++v9 >= (unsigned long long)*a2 )
goto LABEL_13;
}
}
|
copy_typelib:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
TEST RSI,RSI
JZ 0x0016457b
MOV R14,RSI
MOV R15,RDI
MOV ESI,0x20
CALL 0x0015e1ff
TEST RAX,RAX
JZ 0x0016457b
MOV RBX,RAX
MOV EAX,dword ptr [R14]
INC EAX
SHL RAX,0x2
LEA RSI,[RAX + RAX*0x2]
MOV RDI,R15
CALL 0x0015e1ff
MOV qword ptr [RBX + 0x10],RAX
TEST RAX,RAX
JZ 0x0016457b
MOV ECX,dword ptr [R14]
LEA RAX,[RAX + RCX*0x8]
ADD RAX,0x8
MOV qword ptr [RBX + 0x18],RAX
MOV EAX,dword ptr [R14]
MOV dword ptr [RBX],EAX
MOV RSI,qword ptr [R14 + 0x8]
TEST RSI,RSI
JZ 0x00164589
MOV RDI,R15
CALL 0x0015e59a
MOV qword ptr [RBX + 0x8],RAX
TEST RAX,RAX
JNZ 0x00164591
LAB_0016457b:
XOR EBX,EBX
LAB_0016457d:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00164589:
MOV qword ptr [RBX + 0x8],0x0
LAB_00164591:
CMP dword ptr [R14],0x0
JZ 0x001645da
XOR R12D,R12D
LAB_0016459a:
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RAX + R12*0x8]
MOV EDX,dword ptr [RCX + R12*0x4]
MOV RDI,R15
CALL 0x0015e5c1
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RCX + R12*0x8],RAX
TEST RAX,RAX
JZ 0x0016457b
MOV RAX,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [RAX + R12*0x4]
MOV RCX,qword ptr [RBX + 0x18]
MOV dword ptr [RCX + R12*0x4],EAX
INC R12
MOV EAX,dword ptr [R14]
CMP R12,RAX
JC 0x0016459a
LAB_001645da:
MOV RAX,qword ptr [RBX + 0x10]
MOV ECX,dword ptr [RBX]
MOV qword ptr [RAX + RCX*0x8],0x0
MOV RAX,qword ptr [RBX + 0x18]
MOV ECX,dword ptr [RBX]
MOV dword ptr [RAX + RCX*0x4],0x0
JMP 0x0016457d
|
uint * copy_typelib(int8 param_1,uint *param_2)
{
uint *puVar1;
long lVar2;
ulong uVar3;
if ((param_2 != (uint *)0x0) && (puVar1 = (uint *)alloc_root(param_1,0x20), puVar1 != (uint *)0x0)
) {
lVar2 = alloc_root(param_1,(ulong)(*param_2 + 1) * 0xc);
*(long *)(puVar1 + 4) = lVar2;
if (lVar2 != 0) {
*(ulong *)(puVar1 + 6) = lVar2 + (ulong)*param_2 * 8 + 8;
*puVar1 = *param_2;
if (*(long *)(param_2 + 2) == 0) {
puVar1[2] = 0;
puVar1[3] = 0;
}
else {
lVar2 = strdup_root(param_1);
*(long *)(puVar1 + 2) = lVar2;
if (lVar2 == 0) {
return (uint *)0x0;
}
}
if (*param_2 != 0) {
uVar3 = 0;
do {
lVar2 = strmake_root(param_1,*(int8 *)(*(long *)(param_2 + 4) + uVar3 * 8),
*(int4 *)(*(long *)(param_2 + 6) + uVar3 * 4));
*(long *)(*(long *)(puVar1 + 4) + uVar3 * 8) = lVar2;
if (lVar2 == 0) {
return (uint *)0x0;
}
*(int4 *)(*(long *)(puVar1 + 6) + uVar3 * 4) =
*(int4 *)(*(long *)(param_2 + 6) + uVar3 * 4);
uVar3 = uVar3 + 1;
} while (uVar3 < *param_2);
}
*(int8 *)(*(long *)(puVar1 + 4) + (ulong)*puVar1 * 8) = 0;
*(int4 *)(*(long *)(puVar1 + 6) + (ulong)*puVar1 * 4) = 0;
return puVar1;
}
}
return (uint *)0x0;
}
|
|
59,897
|
vemit_tap
|
eloqsql/unittest/mytap/tap.c
|
static void
vemit_tap(int pass, char const *fmt, va_list ap)
{
fprintf(tapout, "%sok %d%s",
pass ? "" : "not ",
++g_test.last,
(fmt && *fmt) ? " - " : "");
if (fmt && *fmt)
vfprintf(tapout, fmt, ap);
fflush(tapout);
}
|
O3
|
c
|
vemit_tap:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %eax
movq 0x2f3c34(%rip), %r15 # 0x385fa8
movq (%r15), %rdi
testl %eax, %eax
leaq 0x4af2e(%rip), %rcx # 0xdd2ae
leaq 0x4ed72(%rip), %rax # 0xe10f9
cmovneq %rax, %rcx
movl 0xb6f932(%rip), %r8d # 0xc01cc4
incl %r8d
movl %r8d, 0xb6f928(%rip) # 0xc01cc4
testq %rsi, %rsi
je 0x923e3
movq %rdx, %rbx
movq %rsi, %r14
cmpb $0x0, (%rsi)
leaq 0x4af02(%rip), %r9 # 0xdd2b3
cmoveq %rax, %r9
leaq 0x4aee8(%rip), %rdx # 0xdd2a4
movl $0x1, %esi
xorl %eax, %eax
callq 0x29200
cmpb $0x0, (%r14)
je 0x923fd
movq (%r15), %rdi
movl $0x1, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x29750
jmp 0x923fd
leaq 0x4aeba(%rip), %rdx # 0xdd2a4
leaq 0x4ed08(%rip), %r9 # 0xe10f9
movl $0x1, %esi
xorl %eax, %eax
callq 0x29200
movq (%r15), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x29400
|
vemit_tap:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov eax, edi
mov r15, cs:stdout_ptr
mov rdi, [r15]
test eax, eax
lea rcx, aNot; "not "
lea rax, asc_E10F5+4; ""
cmovnz rcx, rax
mov r8d, cs:dword_C01CC4
inc r8d
mov cs:dword_C01CC4, r8d
test rsi, rsi
jz short loc_923E3
mov rbx, rdx
mov r14, rsi
cmp byte ptr [rsi], 0
lea r9, asc_DD2B3; " - "
cmovz r9, rax
lea rdx, aSokDS; "%sok %d%s"
mov esi, 1
xor eax, eax
call ___fprintf_chk
cmp byte ptr [r14], 0
jz short loc_923FD
mov rdi, [r15]
mov esi, 1
mov rdx, r14
mov rcx, rbx
call ___vfprintf_chk
jmp short loc_923FD
loc_923E3:
lea rdx, aSokDS; "%sok %d%s"
lea r9, asc_E10F5+4; ""
mov esi, 1
xor eax, eax
call ___fprintf_chk
loc_923FD:
mov rdi, [r15]
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _fflush
|
long long vemit_tap(int a1, _BYTE *a2, long long a3)
{
const char *v3; // rcx
int v4; // r8d
const char *v6; // r9
v3 = "not ";
if ( a1 )
v3 = "";
v4 = ++dword_C01CC4;
if ( a2 )
{
v6 = " - ";
if ( !*a2 )
v6 = "";
__fprintf_chk(stdout, 1LL, "%sok %d%s", v3, v4, v6);
if ( *a2 )
__vfprintf_chk(stdout, 1LL, a2, a3);
}
else
{
__fprintf_chk(stdout, 1LL, "%sok %d%s", v3, v4, "");
}
return fflush(stdout);
}
|
vemit_tap:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EAX,EDI
MOV R15,qword ptr [0x00485fa8]
MOV RDI,qword ptr [R15]
TEST EAX,EAX
LEA RCX,[0x1dd2ae]
LEA RAX,[0x1e10f9]
CMOVNZ RCX,RAX
MOV R8D,dword ptr [0x00d01cc4]
INC R8D
MOV dword ptr [0x00d01cc4],R8D
TEST RSI,RSI
JZ 0x001923e3
MOV RBX,RDX
MOV R14,RSI
CMP byte ptr [RSI],0x0
LEA R9,[0x1dd2b3]
CMOVZ R9,RAX
LEA RDX,[0x1dd2a4]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00129200
CMP byte ptr [R14],0x0
JZ 0x001923fd
MOV RDI,qword ptr [R15]
MOV ESI,0x1
MOV RDX,R14
MOV RCX,RBX
CALL 0x00129750
JMP 0x001923fd
LAB_001923e3:
LEA RDX,[0x1dd2a4]
LEA R9,[0x1e10f9]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00129200
LAB_001923fd:
MOV RDI,qword ptr [R15]
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00129400
|
void vemit_tap(int param_1,char *param_2,int8 param_3)
{
int *puVar1;
int *puVar2;
int *puVar3;
puVar1 = PTR_stdout_00485fa8;
puVar2 = &DAT_001dd2ae;
if (param_1 != 0) {
puVar2 = &DAT_001e10f9;
}
DAT_00d01cc4 = DAT_00d01cc4 + 1;
if (param_2 == (char *)0x0) {
__fprintf_chk(*(int8 *)PTR_stdout_00485fa8,1,"%sok %d%s",puVar2,DAT_00d01cc4,&DAT_001e10f9
);
}
else {
puVar3 = &DAT_001dd2b3;
if (*param_2 == '\0') {
puVar3 = &DAT_001e10f9;
}
__fprintf_chk(*(int8 *)PTR_stdout_00485fa8,1,"%sok %d%s",puVar2,DAT_00d01cc4,puVar3);
if (*param_2 != '\0') {
__vfprintf_chk(*(int8 *)puVar1,1,param_2,param_3);
}
}
fflush(*(FILE **)puVar1);
return;
}
|
|
59,898
|
my_xml_enter
|
eloqsql/strings/xml.c
|
static int my_xml_enter(MY_XML_PARSER *st, const char *str, size_t len)
{
if (my_xml_attr_ensure_space(st, len + 1 /* the separator char */))
return MY_XML_ERROR;
if (st->attr.end > st->attr.start)
{
st->attr.end[0]= '/';
st->attr.end++;
}
memcpy(st->attr.end, str, len);
st->attr.end+= len;
st->attr.end[0]= '\0';
if (st->flags & MY_XML_FLAG_RELATIVE_NAMES)
return st->enter ? st->enter(st, str, len) : MY_XML_OK;
else
return st->enter ?
st->enter(st, st->attr.start, st->attr.end - st->attr.start) : MY_XML_OK;
}
|
O3
|
c
|
my_xml_enter:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x120(%rdi), %rdi
movq 0x110(%rbx), %rcx
movq 0x118(%rbx), %rax
movq %rdi, %r12
subq %rax, %r12
addq %r12, %rdx
addq $0x2, %rdx
cmpq %rcx, %rdx
jbe 0x5b165
leaq 0x2(%r14), %rax
movq $-0x3, %rdx
subq %r14, %rdx
shrq %rdx
cmpq %rcx, %rdx
leaq (%rax,%rcx,2), %rax
movq $-0x1, %rdx
cmovaq %rax, %rdx
movq %rdx, 0x110(%rbx)
movq 0x108(%rbx), %rsi
xorl %edi, %edi
testq %rsi, %rsi
je 0x5b113
xorl %ecx, %ecx
callq 0x2b690
movq %rax, 0x108(%rbx)
jmp 0x5b148
movq %rdx, %rsi
xorl %edx, %edx
callq 0x2b56d
movq %rax, 0x108(%rbx)
testq %rax, %rax
je 0x5b1e3
leaq 0x88(%rbx), %rsi
leaq 0x1(%r12), %rdx
movq %rax, %rdi
callq 0x24240
movq 0x108(%rbx), %rax
movq %rax, 0x118(%rbx)
addq %rax, %r12
movq %r12, 0x120(%rbx)
movq %r12, %rdi
testq %rax, %rax
je 0x5b1f5
cmpq %rax, %rdi
jbe 0x5b17e
movb $0x2f, (%rdi)
movq 0x120(%rbx), %rdi
incq %rdi
movq %rdi, 0x120(%rbx)
movq %r15, %rsi
movq %r14, %rdx
callq 0x24240
movq 0x120(%rbx), %rax
leaq (%rax,%r14), %rcx
movq %rcx, 0x120(%rbx)
movb $0x0, (%rax,%r14)
testb $0x1, (%rbx)
movq 0x148(%rbx), %rax
jne 0x5b1c7
testq %rax, %rax
je 0x5b1df
movq 0x118(%rbx), %rsi
movq 0x120(%rbx), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
jmp 0x5b1d5
testq %rax, %rax
je 0x5b1df
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
xorl %eax, %eax
jmp 0x5b1fa
movq $0x0, 0x118(%rbx)
movq %r12, 0x120(%rbx)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
my_xml_enter:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rdi, [rdi+120h]
mov rcx, [rbx+110h]
mov rax, [rbx+118h]
mov r12, rdi
sub r12, rax
add rdx, r12
add rdx, 2
cmp rdx, rcx
jbe loc_5B165
lea rax, [r14+2]
mov rdx, 0FFFFFFFFFFFFFFFDh
sub rdx, r14
shr rdx, 1
cmp rdx, rcx
lea rax, [rax+rcx*2]
mov rdx, 0FFFFFFFFFFFFFFFFh
cmova rdx, rax
mov [rbx+110h], rdx
mov rsi, [rbx+108h]
xor edi, edi
test rsi, rsi
jz short loc_5B113
xor ecx, ecx
call my_realloc
mov [rbx+108h], rax
jmp short loc_5B148
loc_5B113:
mov rsi, rdx
xor edx, edx
call my_malloc
mov [rbx+108h], rax
test rax, rax
jz loc_5B1E3
lea rsi, [rbx+88h]
lea rdx, [r12+1]
mov rdi, rax
call _memcpy
mov rax, [rbx+108h]
loc_5B148:
mov [rbx+118h], rax
add r12, rax
mov [rbx+120h], r12
mov rdi, r12
test rax, rax
jz loc_5B1F5
loc_5B165:
cmp rdi, rax
jbe short loc_5B17E
mov byte ptr [rdi], 2Fh ; '/'
mov rdi, [rbx+120h]
inc rdi
mov [rbx+120h], rdi
loc_5B17E:
mov rsi, r15
mov rdx, r14
call _memcpy
mov rax, [rbx+120h]
lea rcx, [rax+r14]
mov [rbx+120h], rcx
mov byte ptr [rax+r14], 0
test byte ptr [rbx], 1
mov rax, [rbx+148h]
jnz short loc_5B1C7
test rax, rax
jz short loc_5B1DF
mov rsi, [rbx+118h]
mov rdx, [rbx+120h]
sub rdx, rsi
mov rdi, rbx
jmp short loc_5B1D5
loc_5B1C7:
test rax, rax
jz short loc_5B1DF
mov rdi, rbx
mov rsi, r15
mov rdx, r14
loc_5B1D5:
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp rax
loc_5B1DF:
xor eax, eax
jmp short loc_5B1FA
loc_5B1E3:
mov qword ptr [rbx+118h], 0
mov [rbx+120h], r12
loc_5B1F5:
mov eax, 1
loc_5B1FA:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long my_xml_enter(long long a1, long long a2, long long a3)
{
_BYTE *v6; // rdi
unsigned long long v7; // rcx
unsigned long long v8; // rax
_BYTE *v9; // r12
bool v10; // cc
unsigned long long v11; // rdx
long long v12; // rsi
long long v13; // rax
_BYTE *v14; // r12
_BYTE *v15; // rcx
long long ( *v16)(long long, long long, long long); // rax
long long v17; // rsi
long long v18; // rdx
long long v19; // rdi
v6 = *(_BYTE **)(a1 + 288);
v7 = *(_QWORD *)(a1 + 272);
v8 = *(_QWORD *)(a1 + 280);
v9 = &v6[-v8];
if ( (unsigned long long)&v6[a3 - v8 + 2] > v7 )
{
v10 = (unsigned long long)(-3 - a3) >> 1 <= v7;
v11 = -1LL;
if ( !v10 )
v11 = a3 + 2 + 2 * v7;
*(_QWORD *)(a1 + 272) = v11;
v12 = *(_QWORD *)(a1 + 264);
if ( v12 )
{
v8 = my_realloc(0, v12, v11, 0);
*(_QWORD *)(a1 + 264) = v8;
}
else
{
v13 = my_malloc(0, v11, 0);
*(_QWORD *)(a1 + 264) = v13;
if ( !v13 )
{
*(_QWORD *)(a1 + 280) = 0LL;
*(_QWORD *)(a1 + 288) = v9;
return 1LL;
}
memcpy(v13, a1 + 136, v9 + 1);
v8 = *(_QWORD *)(a1 + 264);
}
*(_QWORD *)(a1 + 280) = v8;
v14 = &v9[v8];
*(_QWORD *)(a1 + 288) = v14;
v6 = v14;
if ( v8 )
goto LABEL_9;
return 1LL;
}
LABEL_9:
if ( (unsigned long long)v6 > v8 )
{
*v6 = 47;
v6 = (_BYTE *)(*(_QWORD *)(a1 + 288) + 1LL);
*(_QWORD *)(a1 + 288) = v6;
}
memcpy(v6, a2, a3);
v15 = (_BYTE *)(*(_QWORD *)(a1 + 288) + a3);
*(_QWORD *)(a1 + 288) = v15;
*v15 = 0;
v16 = *(long long ( **)(long long, long long, long long))(a1 + 328);
if ( (*(_BYTE *)a1 & 1) != 0 )
{
if ( v16 )
{
v19 = a1;
v17 = a2;
v18 = a3;
return v16(v19, v17, v18);
}
}
else if ( v16 )
{
v17 = *(_QWORD *)(a1 + 280);
v18 = *(_QWORD *)(a1 + 288) - v17;
v19 = a1;
return v16(v19, v17, v18);
}
return 0LL;
}
|
my_xml_enter:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x120]
MOV RCX,qword ptr [RBX + 0x110]
MOV RAX,qword ptr [RBX + 0x118]
MOV R12,RDI
SUB R12,RAX
ADD RDX,R12
ADD RDX,0x2
CMP RDX,RCX
JBE 0x0015b165
LEA RAX,[R14 + 0x2]
MOV RDX,-0x3
SUB RDX,R14
SHR RDX,0x1
CMP RDX,RCX
LEA RAX,[RAX + RCX*0x2]
MOV RDX,-0x1
CMOVA RDX,RAX
MOV qword ptr [RBX + 0x110],RDX
MOV RSI,qword ptr [RBX + 0x108]
XOR EDI,EDI
TEST RSI,RSI
JZ 0x0015b113
XOR ECX,ECX
CALL 0x0012b690
MOV qword ptr [RBX + 0x108],RAX
JMP 0x0015b148
LAB_0015b113:
MOV RSI,RDX
XOR EDX,EDX
CALL 0x0012b56d
MOV qword ptr [RBX + 0x108],RAX
TEST RAX,RAX
JZ 0x0015b1e3
LEA RSI,[RBX + 0x88]
LEA RDX,[R12 + 0x1]
MOV RDI,RAX
CALL 0x00124240
MOV RAX,qword ptr [RBX + 0x108]
LAB_0015b148:
MOV qword ptr [RBX + 0x118],RAX
ADD R12,RAX
MOV qword ptr [RBX + 0x120],R12
MOV RDI,R12
TEST RAX,RAX
JZ 0x0015b1f5
LAB_0015b165:
CMP RDI,RAX
JBE 0x0015b17e
MOV byte ptr [RDI],0x2f
MOV RDI,qword ptr [RBX + 0x120]
INC RDI
MOV qword ptr [RBX + 0x120],RDI
LAB_0015b17e:
MOV RSI,R15
MOV RDX,R14
CALL 0x00124240
MOV RAX,qword ptr [RBX + 0x120]
LEA RCX,[RAX + R14*0x1]
MOV qword ptr [RBX + 0x120],RCX
MOV byte ptr [RAX + R14*0x1],0x0
TEST byte ptr [RBX],0x1
MOV RAX,qword ptr [RBX + 0x148]
JNZ 0x0015b1c7
TEST RAX,RAX
JZ 0x0015b1df
MOV RSI,qword ptr [RBX + 0x118]
MOV RDX,qword ptr [RBX + 0x120]
SUB RDX,RSI
MOV RDI,RBX
JMP 0x0015b1d5
LAB_0015b1c7:
TEST RAX,RAX
JZ 0x0015b1df
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
LAB_0015b1d5:
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP RAX
LAB_0015b1df:
XOR EAX,EAX
JMP 0x0015b1fa
LAB_0015b1e3:
MOV qword ptr [RBX + 0x118],0x0
MOV qword ptr [RBX + 0x120],R12
LAB_0015b1f5:
MOV EAX,0x1
LAB_0015b1fa:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 my_xml_enter(byte *param_1,void *param_2,size_t param_3)
{
ulong uVar1;
code *UNRECOVERED_JUMPTABLE;
int1 *puVar2;
void *__dest;
int8 uVar3;
long lVar4;
long lVar5;
int1 *__dest_00;
__dest_00 = *(int1 **)(param_1 + 0x120);
uVar1 = *(ulong *)(param_1 + 0x110);
puVar2 = *(int1 **)(param_1 + 0x118);
lVar5 = (long)__dest_00 - (long)puVar2;
if (uVar1 < param_3 + lVar5 + 2) {
lVar4 = -1;
if (uVar1 < -param_3 - 3 >> 1) {
lVar4 = param_3 + 2 + uVar1 * 2;
}
*(long *)(param_1 + 0x110) = lVar4;
if (*(long *)(param_1 + 0x108) == 0) {
__dest = (void *)my_malloc(0,lVar4,0);
*(void **)(param_1 + 0x108) = __dest;
if (__dest != (void *)0x0) {
memcpy(__dest,param_1 + 0x88,lVar5 + 1);
puVar2 = *(int1 **)(param_1 + 0x108);
goto LAB_0015b148;
}
param_1[0x118] = 0;
param_1[0x119] = 0;
param_1[0x11a] = 0;
param_1[0x11b] = 0;
param_1[0x11c] = 0;
param_1[0x11d] = 0;
param_1[0x11e] = 0;
param_1[0x11f] = 0;
*(long *)(param_1 + 0x120) = lVar5;
}
else {
puVar2 = (int1 *)my_realloc();
*(int1 **)(param_1 + 0x108) = puVar2;
LAB_0015b148:
*(int1 **)(param_1 + 0x118) = puVar2;
__dest_00 = puVar2 + lVar5;
*(int1 **)(param_1 + 0x120) = __dest_00;
if (puVar2 != (int1 *)0x0) goto LAB_0015b165;
}
uVar3 = 1;
}
else {
LAB_0015b165:
if (puVar2 < __dest_00) {
*__dest_00 = 0x2f;
__dest_00 = (int1 *)(*(long *)(param_1 + 0x120) + 1);
*(int1 **)(param_1 + 0x120) = __dest_00;
}
memcpy(__dest_00,param_2,param_3);
lVar5 = *(long *)(param_1 + 0x120);
*(size_t *)(param_1 + 0x120) = lVar5 + param_3;
*(int1 *)(lVar5 + param_3) = 0;
UNRECOVERED_JUMPTABLE = *(code **)(param_1 + 0x148);
if ((*param_1 & 1) == 0) {
if (UNRECOVERED_JUMPTABLE != (code *)0x0) {
param_2 = *(void **)(param_1 + 0x118);
param_3 = *(long *)(param_1 + 0x120) - (long)param_2;
LAB_0015b1d5:
/* WARNING: Could not recover jumptable at 0x0015b1dd. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar3 = (*UNRECOVERED_JUMPTABLE)(param_1,param_2,param_3);
return uVar3;
}
}
else if (UNRECOVERED_JUMPTABLE != (code *)0x0) goto LAB_0015b1d5;
uVar3 = 0;
}
return uVar3;
}
|
|
59,899
|
YogaTest_static_position_relative_child_top_percentage_Test::YogaTest_static_position_relative_child_top_percentage_Test()
|
yoga-mod/tests/generated/YGStaticPositionTest.cpp
|
TEST(YogaTest, static_position_relative_child_top_percentage) {
YGConfigRef config = YGConfigNew();
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetWidth(root_child0, 200);
YGNodeStyleSetHeight(root_child0, 200);
YGNodeInsertChild(root, root_child0, 0);
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic);
YGNodeStyleSetWidth(root_child0_child0, 100);
YGNodeStyleSetHeight(root_child0_child0, 100);
YGNodeInsertChild(root_child0, root_child0_child0, 0);
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeTop, 50);
YGNodeStyleSetWidth(root_child0_child0_child0, 50);
YGNodeStyleSetHeight(root_child0_child0_child0, 50);
YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root));
ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root));
ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0));
ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0));
ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0));
ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0));
ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0));
ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0));
ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0));
ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0));
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL);
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root));
ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root));
ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0));
ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0));
ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0));
ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0));
ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0));
ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0));
ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0));
ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0));
ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0));
ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0));
YGNodeFreeRecursive(root);
YGConfigFree(config);
}
|
O0
|
cpp
|
YogaTest_static_position_relative_child_top_percentage_Test::YogaTest_static_position_relative_child_top_percentage_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x7047d0
movq -0x10(%rbp), %rax
leaq 0x19cde4(%rip), %rcx # 0x86eba8
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
_ZN59YogaTest_static_position_relative_child_top_percentage_TestC2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN7testing4TestC2Ev; testing::Test::Test(void)
mov rax, [rbp+var_10]
lea rcx, _ZTV59YogaTest_static_position_relative_child_top_percentage_Test; `vtable for'YogaTest_static_position_relative_child_top_percentage_Test
add rcx, 10h
mov [rax], rcx
add rsp, 10h
pop rbp
retn
|
void YogaTest_static_position_relative_child_top_percentage_Test::YogaTest_static_position_relative_child_top_percentage_Test(
YogaTest_static_position_relative_child_top_percentage_Test *this)
{
testing::Test::Test(this);
*(_QWORD *)this = (char *)&`vtable for'YogaTest_static_position_relative_child_top_percentage_Test + 16;
}
|
TestFactoryImpl:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x00192fb0
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x96dd60]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RSP,0x10
POP RBP
RET
|
/* testing::internal::TestFactoryImpl<YogaTest_percentage_width_height_int_parent_size_Test>::TestFactoryImpl()
*/
void __thiscall
testing::internal::TestFactoryImpl<YogaTest_percentage_width_height_int_parent_size_Test>::
TestFactoryImpl(TestFactoryImpl<YogaTest_percentage_width_height_int_parent_size_Test> *this)
{
TestFactoryBase::TestFactoryBase((TestFactoryBase *)this);
*(int ***)this = &PTR__TestFactoryImpl_0096dd70;
return;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.