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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
60,500
|
strcasestart
|
bluesky950520[P]quickjs/libbf.c
|
static int strcasestart(const char *str, const char *val, const char **ptr)
{
const char *p, *q;
p = str;
q = val;
while (*q != '\0') {
if (bf_tolower(*p) != *q)
return 0;
p++;
q++;
}
if (ptr)
*ptr = p;
return 1;
}
|
O2
|
c
|
strcasestart:
movzbl (%rsi), %eax
testl %eax, %eax
je 0x78b34
movzbl (%rdi), %ecx
leal -0x41(%rcx), %r8d
movl %ecx, %r9d
orl $0x20, %r9d
cmpl $0x1a, %r8d
cmovael %ecx, %r9d
cmpl %eax, %r9d
jne 0x78b40
incq %rdi
incq %rsi
jmp 0x78b0a
pushq $0x1
popq %rax
testq %rdx, %rdx
je 0x78b3f
movq %rdi, (%rdx)
retq
xorl %eax, %eax
retq
|
strcasestart:
movzx eax, byte ptr [rsi]
test eax, eax
jz short loc_78B34
movzx ecx, byte ptr [rdi]
lea r8d, [rcx-41h]
mov r9d, ecx
or r9d, 20h
cmp r8d, 1Ah
cmovnb r9d, ecx
cmp r9d, eax
jnz short loc_78B40
inc rdi
inc rsi
jmp short strcasestart
loc_78B34:
push 1
pop rax
test rdx, rdx
jz short locret_78B3F
mov [rdx], rdi
locret_78B3F:
retn
loc_78B40:
xor eax, eax
retn
|
long long strcasestart(unsigned __int8 *a1, _BYTE *a2, _QWORD *a3)
{
int v3; // r9d
long long result; // rax
while ( *a2 )
{
v3 = *a1 | 0x20;
if ( (unsigned int)*a1 - 65 >= 0x1A )
v3 = *a1;
if ( v3 != (unsigned __int8)*a2 )
return 0LL;
++a1;
++a2;
}
result = 1LL;
if ( a3 )
*a3 = a1;
return result;
}
|
strcasestart:
MOVZX EAX,byte ptr [RSI]
TEST EAX,EAX
JZ 0x00178b34
MOVZX ECX,byte ptr [RDI]
LEA R8D,[RCX + -0x41]
MOV R9D,ECX
OR R9D,0x20
CMP R8D,0x1a
CMOVNC R9D,ECX
CMP R9D,EAX
JNZ 0x00178b40
INC RDI
INC RSI
JMP 0x00178b0a
LAB_00178b34:
PUSH 0x1
POP RAX
TEST RDX,RDX
JZ 0x00178b3f
MOV qword ptr [RDX],RDI
LAB_00178b3f:
RET
LAB_00178b40:
XOR EAX,EAX
RET
|
int8 strcasestart(byte *param_1,byte *param_2,int8 *param_3)
{
byte bVar1;
byte bVar2;
while( true ) {
if (*param_2 == 0) {
if (param_3 != (int8 *)0x0) {
*param_3 = param_1;
}
return 1;
}
bVar1 = *param_1;
bVar2 = bVar1 | 0x20;
if (0x19 < bVar1 - 0x41) {
bVar2 = bVar1;
}
if (bVar2 != *param_2) break;
param_1 = param_1 + 1;
param_2 = param_2 + 1;
}
return 0;
}
|
|
60,501
|
ma_bin_search
|
eloqsql/storage/maria/ma_search.c
|
int _ma_bin_search(const MARIA_KEY *key, const MARIA_PAGE *ma_page,
uint32 comp_flag, uchar **ret_pos,
uchar *buff __attribute__((unused)), my_bool *last_key)
{
int UNINIT_VAR(flag);
uint page_flag;
uint start, mid, end, save_end, totlength, nod_flag;
uint not_used[2];
MARIA_KEYDEF *keyinfo= key->keyinfo;
MARIA_SHARE *share= keyinfo->share;
uchar *page;
DBUG_ENTER("_ma_bin_search");
page_flag= ma_page->flag;
if (page_flag & KEYPAGE_FLAG_HAS_TRANSID)
{
/* Keys have varying length, can't use binary search */
DBUG_RETURN(_ma_seq_search(key, ma_page, comp_flag, ret_pos, buff,
last_key));
}
nod_flag= ma_page->node;
totlength= keyinfo->keylength + nod_flag;
DBUG_ASSERT(ma_page->size >= share->keypage_header + nod_flag + totlength);
start=0;
mid=1;
save_end= end= ((ma_page->size - nod_flag - share->keypage_header) /
totlength-1);
DBUG_PRINT("test",("page_length: %u end: %u", ma_page->size, end));
page= ma_page->buff + share->keypage_header + nod_flag;
while (start != end)
{
mid= (start+end)/2;
if ((flag=ha_key_cmp(keyinfo->seg, page + (uint) mid * totlength,
key->data, key->data_length + key->ref_length,
comp_flag, not_used))
>= 0)
end=mid;
else
start=mid+1;
}
if (mid != start)
flag=ha_key_cmp(keyinfo->seg, page + (uint) start * totlength,
key->data, key->data_length + key->ref_length, comp_flag,
not_used);
if (flag < 0)
start++; /* point at next, bigger key */
*ret_pos= (page + (uint) start * totlength);
*last_key= end == save_end;
DBUG_PRINT("exit",("flag: %d keypos: %d",flag,start));
DBUG_RETURN(flag);
}
|
O3
|
c
|
ma_bin_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbx
movq %rcx, %r14
movl %edx, %r10d
movq %rdi, %r9
testb $0x2, 0x2c(%rsi)
jne 0x6e00e
movq 0x8(%r9), %rdx
movq (%rdx), %rcx
movl 0x20(%rsi), %eax
movl 0x28(%rsi), %edi
movq %rdx, -0x40(%rbp)
movzwl 0xaa(%rdx), %r13d
addl %edi, %r13d
movl 0x744(%rcx), %r12d
subl %r12d, %eax
subl %edi, %eax
xorl %edx, %edx
divl %r13d
addq 0x10(%rsi), %r12
xorl %r15d, %r15d
addq %rdi, %r12
decl %eax
movl %eax, -0x2c(%rbp)
je 0x6dfba
movq %r12, -0x38(%rbp)
movq %r14, -0x48(%rbp)
movq %rbx, -0x50(%rbp)
xorl %ecx, %ecx
movl -0x2c(%rbp), %eax
movl %eax, %r14d
movl %r13d, -0x30(%rbp)
leal (%rcx,%r14), %ebx
shrl %ebx
movq -0x40(%rbp), %rax
movq 0xc0(%rax), %rdi
movl %ebx, %esi
imull %r13d, %esi
addq -0x38(%rbp), %rsi
movq (%r9), %rdx
movq %rcx, %r15
movl 0x14(%r9), %ecx
movq %r9, %r12
addl 0x10(%r9), %ecx
movl %r10d, %r13d
movl %r10d, %r8d
leaq -0x58(%rbp), %r9
callq 0xa316a
movq %r15, %rcx
movl %ebx, %r15d
testl %eax, %eax
jns 0x6df97
leal 0x1(%rbx), %ecx
movl %r14d, %r15d
movl %r15d, %r14d
cmpl %r15d, %ecx
movl %r13d, %r10d
movl -0x30(%rbp), %r13d
movq %r12, %r9
jne 0x6df4c
cmpl %r15d, %ebx
movq -0x50(%rbp), %rbx
movq -0x48(%rbp), %r14
movq -0x38(%rbp), %r12
je 0x6dfe6
movq -0x40(%rbp), %rax
movq 0xc0(%rax), %rdi
movl %r15d, %esi
imull %r13d, %esi
addq %r12, %rsi
movq (%r9), %rdx
movl 0x14(%r9), %ecx
addl 0x10(%r9), %ecx
leaq -0x58(%rbp), %r9
movl %r10d, %r8d
callq 0xa316a
movl %eax, %ecx
shrl $0x1f, %ecx
addl %r15d, %ecx
imull %r13d, %ecx
addq %rcx, %r12
movq %r12, (%r14)
cmpl -0x2c(%rbp), %r15d
sete (%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r9, %rdi
movl %r10d, %edx
movq %r14, %rcx
movq %rbx, %r9
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6e02d
|
_ma_bin_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, r9
mov r14, rcx
mov r10d, edx
mov r9, rdi
test byte ptr [rsi+2Ch], 2
jnz loc_6E00E
mov rdx, [r9+8]
mov rcx, [rdx]
mov eax, [rsi+20h]
mov edi, [rsi+28h]
mov [rbp+var_40], rdx
movzx r13d, word ptr [rdx+0AAh]
add r13d, edi
mov r12d, [rcx+744h]
sub eax, r12d
sub eax, edi
xor edx, edx
div r13d
add r12, [rsi+10h]
xor r15d, r15d
add r12, rdi
dec eax
mov [rbp+var_2C], eax
jz loc_6DFBA
mov [rbp+var_38], r12
mov [rbp+var_48], r14
mov [rbp+var_50], rbx
xor ecx, ecx
mov eax, [rbp+var_2C]
mov r14d, eax
mov [rbp+var_30], r13d
loc_6DF4C:
lea ebx, [rcx+r14]
shr ebx, 1
mov rax, [rbp+var_40]
mov rdi, [rax+0C0h]
mov esi, ebx
imul esi, r13d
add rsi, [rbp+var_38]
mov rdx, [r9]
mov r15, rcx
mov ecx, [r9+14h]
mov r12, r9
add ecx, [r9+10h]
mov r13d, r10d
mov r8d, r10d
lea r9, [rbp+var_58]
call ha_key_cmp
mov rcx, r15
mov r15d, ebx
test eax, eax
jns short loc_6DF97
lea ecx, [rbx+1]
mov r15d, r14d
loc_6DF97:
mov r14d, r15d
cmp ecx, r15d
mov r10d, r13d
mov r13d, [rbp+var_30]
mov r9, r12
jnz short loc_6DF4C
cmp ebx, r15d
mov rbx, [rbp+var_50]
mov r14, [rbp+var_48]
mov r12, [rbp+var_38]
jz short loc_6DFE6
loc_6DFBA:
mov rax, [rbp+var_40]
mov rdi, [rax+0C0h]
mov esi, r15d
imul esi, r13d
add rsi, r12
mov rdx, [r9]
mov ecx, [r9+14h]
add ecx, [r9+10h]
lea r9, [rbp+var_58]
mov r8d, r10d
call ha_key_cmp
loc_6DFE6:
mov ecx, eax
shr ecx, 1Fh
add ecx, r15d
imul ecx, r13d
add r12, rcx
mov [r14], r12
cmp r15d, [rbp+var_2C]
setz byte ptr [rbx]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6E00E:
mov rdi, r9
mov edx, r10d
mov rcx, r14
mov r9, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp $+5
|
long long ma_bin_search(_QWORD *a1, long long a2, unsigned int a3, _QWORD *a4, long long a5, bool *a6)
{
_QWORD *v7; // r14
unsigned int v8; // r10d
_QWORD *v9; // r9
long long *v10; // rdx
long long v11; // rcx
int v12; // eax
long long v13; // rdi
unsigned int v14; // r13d
long long v15; // r12
unsigned int v16; // eax
unsigned int v17; // r15d
long long v18; // r12
long long v19; // rcx
unsigned int v20; // r14d
unsigned int v21; // ebx
long long v22; // rsi
long long v23; // r15
_QWORD *v24; // r12
unsigned int v25; // r13d
long long result; // rax
bool v27; // zf
char v28[8]; // [rsp+8h] [rbp-58h] BYREF
bool *v29; // [rsp+10h] [rbp-50h]
_QWORD *v30; // [rsp+18h] [rbp-48h]
long long v31; // [rsp+20h] [rbp-40h]
long long v32; // [rsp+28h] [rbp-38h]
unsigned int v33; // [rsp+30h] [rbp-30h]
unsigned int v34; // [rsp+34h] [rbp-2Ch]
v7 = a4;
v8 = a3;
v9 = a1;
if ( (*(_BYTE *)(a2 + 44) & 2) != 0 )
return ma_seq_search(a1, a2, a3, a4, a5, a6);
v10 = (long long *)a1[1];
v11 = *v10;
v12 = *(_DWORD *)(a2 + 32);
v13 = *(unsigned int *)(a2 + 40);
v31 = v9[1];
v14 = v13 + *((unsigned __int16 *)v10 + 85);
v15 = *(unsigned int *)(v11 + 1860);
v16 = (v12 - (int)v15 - (int)v13) / v14;
v17 = 0;
v18 = v13 + *(_QWORD *)(a2 + 16) + v15;
v34 = v16 - 1;
if ( v16 == 1 )
goto LABEL_8;
v32 = v18;
v30 = v7;
v29 = a6;
v19 = 0LL;
v20 = v34;
v33 = v14;
do
{
v21 = ((unsigned int)v19 + v20) >> 1;
v22 = v32 + v14 * v21;
v23 = v19;
v24 = v9;
v25 = v8;
result = ha_key_cmp(
*(_QWORD *)(v31 + 192),
v22,
*v9,
(unsigned int)(*((_DWORD *)v9 + 4) + *((_DWORD *)v9 + 5)),
v8,
v28);
v19 = v23;
v17 = v21;
if ( (int)result < 0 )
{
v19 = v21 + 1;
v17 = v20;
}
v20 = v17;
v8 = v25;
v14 = v33;
v9 = v24;
}
while ( (_DWORD)v19 != v17 );
v27 = v21 == v17;
a6 = v29;
v7 = v30;
v18 = v32;
if ( !v27 )
LABEL_8:
result = ha_key_cmp(
*(_QWORD *)(v31 + 192),
v18 + v14 * v17,
*v9,
(unsigned int)(*((_DWORD *)v9 + 4) + *((_DWORD *)v9 + 5)),
v8,
v28);
*v7 = v14 * (v17 + ((unsigned int)result >> 31)) + v18;
*a6 = v17 == v34;
return result;
}
|
_ma_bin_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,R9
MOV R14,RCX
MOV R10D,EDX
MOV R9,RDI
TEST byte ptr [RSI + 0x2c],0x2
JNZ 0x0016e00e
MOV RDX,qword ptr [R9 + 0x8]
MOV RCX,qword ptr [RDX]
MOV EAX,dword ptr [RSI + 0x20]
MOV EDI,dword ptr [RSI + 0x28]
MOV qword ptr [RBP + -0x40],RDX
MOVZX R13D,word ptr [RDX + 0xaa]
ADD R13D,EDI
MOV R12D,dword ptr [RCX + 0x744]
SUB EAX,R12D
SUB EAX,EDI
XOR EDX,EDX
DIV R13D
ADD R12,qword ptr [RSI + 0x10]
XOR R15D,R15D
ADD R12,RDI
DEC EAX
MOV dword ptr [RBP + -0x2c],EAX
JZ 0x0016dfba
MOV qword ptr [RBP + -0x38],R12
MOV qword ptr [RBP + -0x48],R14
MOV qword ptr [RBP + -0x50],RBX
XOR ECX,ECX
MOV EAX,dword ptr [RBP + -0x2c]
MOV R14D,EAX
MOV dword ptr [RBP + -0x30],R13D
LAB_0016df4c:
LEA EBX,[RCX + R14*0x1]
SHR EBX,0x1
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0xc0]
MOV ESI,EBX
IMUL ESI,R13D
ADD RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [R9]
MOV R15,RCX
MOV ECX,dword ptr [R9 + 0x14]
MOV R12,R9
ADD ECX,dword ptr [R9 + 0x10]
MOV R13D,R10D
MOV R8D,R10D
LEA R9,[RBP + -0x58]
CALL 0x001a316a
MOV RCX,R15
MOV R15D,EBX
TEST EAX,EAX
JNS 0x0016df97
LEA ECX,[RBX + 0x1]
MOV R15D,R14D
LAB_0016df97:
MOV R14D,R15D
CMP ECX,R15D
MOV R10D,R13D
MOV R13D,dword ptr [RBP + -0x30]
MOV R9,R12
JNZ 0x0016df4c
CMP EBX,R15D
MOV RBX,qword ptr [RBP + -0x50]
MOV R14,qword ptr [RBP + -0x48]
MOV R12,qword ptr [RBP + -0x38]
JZ 0x0016dfe6
LAB_0016dfba:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0xc0]
MOV ESI,R15D
IMUL ESI,R13D
ADD RSI,R12
MOV RDX,qword ptr [R9]
MOV ECX,dword ptr [R9 + 0x14]
ADD ECX,dword ptr [R9 + 0x10]
LEA R9,[RBP + -0x58]
MOV R8D,R10D
CALL 0x001a316a
LAB_0016dfe6:
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,R15D
IMUL ECX,R13D
ADD R12,RCX
MOV qword ptr [R14],R12
CMP R15D,dword ptr [RBP + -0x2c]
SETZ byte ptr [RBX]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016e00e:
MOV RDI,R9
MOV EDX,R10D
MOV RCX,R14
MOV R9,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0016e02d
|
void _ma_bin_search(int8 *param_1,long param_2,int4 param_3,long *param_4,
int8 param_5,int8 param_6)
{
uint uVar1;
int iVar2;
uint uVar3;
uint uVar4;
long lVar5;
uint uVar6;
int1 local_60 [8];
int8 local_58;
long *local_50;
long *local_48;
long local_40;
uint local_38;
uint local_34;
if ((*(byte *)(param_2 + 0x2c) & 2) != 0) {
_ma_seq_search(param_1,param_2,param_3,param_4,param_5,param_6);
return;
}
local_48 = (long *)param_1[1];
uVar3 = *(uint *)(param_2 + 0x28);
uVar6 = *(ushort *)((long)local_48 + 0xaa) + uVar3;
lVar5 = (ulong)*(uint *)(*local_48 + 0x744) + *(long *)(param_2 + 0x10) + (ulong)uVar3;
uVar1 = ((*(int *)(param_2 + 0x20) - *(uint *)(*local_48 + 0x744)) - uVar3) / uVar6 - 1;
uVar3 = 0;
local_34 = uVar1;
if (uVar1 != 0) {
uVar3 = 0;
local_58 = param_6;
local_50 = param_4;
local_40 = lVar5;
local_38 = uVar6;
do {
uVar4 = uVar3 + uVar1 >> 1;
iVar2 = ha_key_cmp(local_48[0x18],(ulong)(uVar4 * local_38) + local_40,*param_1,
*(int *)((long)param_1 + 0x14) + *(int *)(param_1 + 2),param_3,local_60);
uVar6 = uVar4;
if (iVar2 < 0) {
uVar3 = uVar4 + 1;
uVar6 = uVar1;
}
uVar1 = uVar6;
} while (uVar3 != uVar1);
param_6 = local_58;
lVar5 = local_40;
param_4 = local_50;
uVar6 = local_38;
uVar3 = uVar1;
if (uVar4 == uVar1) goto LAB_0016dfe6;
}
iVar2 = ha_key_cmp(local_48[0x18],(ulong)(uVar3 * uVar6) + lVar5,*param_1,
*(int *)((long)param_1 + 0x14) + *(int *)(param_1 + 2),param_3,local_60);
local_58 = param_6;
local_50 = param_4;
LAB_0016dfe6:
*local_50 = lVar5 + (ulong)((uVar3 - (iVar2 >> 0x1f)) * uVar6);
*(bool *)local_58 = uVar3 == local_34;
return;
}
|
|
60,502
|
translog_init_reader_data
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_init_reader_data(LSN lsn,
TRANSLOG_READER_DATA *data)
{
int read_header;
DBUG_ENTER("translog_init_reader_data");
if (translog_scanner_init(lsn, 1, &data->scanner, 1) ||
((read_header=
translog_read_record_header_scan(&data->scanner, &data->header, 1))
== RECHEADER_READ_ERROR))
DBUG_RETURN(1);
data->read_header= read_header;
data->body_offset= data->header.non_header_data_start_offset;
data->chunk_size= data->header.non_header_data_len;
data->current_offset= data->read_header;
data->current_group= 0;
data->current_chunk= 0;
data->eor= 0;
DBUG_PRINT("info", ("read_header: %u "
"body_offset: %u chunk_size: %u current_offset: %lu",
(uint) data->read_header,
(uint) data->body_offset,
(uint) data->chunk_size, (ulong) data->current_offset));
DBUG_RETURN(0);
}
|
O0
|
c
|
translog_init_reader_data:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x438, %rdx # imm = 0x438
movl $0x1, %ecx
movl %ecx, %esi
callq 0x57ea0
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x5ac84
movq -0x18(%rbp), %rdi
addq $0x438, %rdi # imm = 0x438
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x5aa40
movl %eax, -0x1c(%rbp)
cmpl $-0x1, %eax
jne 0x5ac8f
jmp 0x5ac86
movb $0x1, -0x1(%rbp)
jmp 0x5ad0f
movl -0x1c(%rbp), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x2470(%rax)
movq -0x18(%rbp), %rax
movzwl 0x432(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2468(%rax)
movq -0x18(%rbp), %rax
movw 0x434(%rax), %cx
movq -0x18(%rbp), %rax
movw %cx, 0x2472(%rax)
movq -0x18(%rbp), %rax
movzwl 0x2470(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x246c(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x2474(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x2478(%rax)
movq -0x18(%rbp), %rax
movb $0x0, 0x247c(%rax)
jmp 0x5ad09
jmp 0x5ad0b
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
translog_init_reader_data:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
add rdx, 438h
mov ecx, 1
mov esi, ecx
call translog_scanner_init
movsx eax, al
cmp eax, 0
jnz short loc_5AC84
mov rdi, [rbp+var_18]
add rdi, 438h
mov rsi, [rbp+var_18]
mov edx, 1
call translog_read_record_header_scan
mov [rbp+var_1C], eax
cmp eax, 0FFFFFFFFh
jnz short loc_5AC8F
loc_5AC84:
jmp short $+2
loc_5AC86:
mov [rbp+var_1], 1
jmp loc_5AD0F
loc_5AC8F:
mov eax, [rbp+var_1C]
mov cx, ax
mov rax, [rbp+var_18]
mov [rax+2470h], cx
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+432h]
mov rax, [rbp+var_18]
mov [rax+2468h], ecx
mov rax, [rbp+var_18]
mov cx, [rax+434h]
mov rax, [rbp+var_18]
mov [rax+2472h], cx
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+2470h]
mov rax, [rbp+var_18]
mov [rax+246Ch], ecx
mov rax, [rbp+var_18]
mov dword ptr [rax+2474h], 0
mov rax, [rbp+var_18]
mov dword ptr [rax+2478h], 0
mov rax, [rbp+var_18]
mov byte ptr [rax+247Ch], 0
jmp short $+2
loc_5AD09:
jmp short $+2
loc_5AD0B:
mov [rbp+var_1], 0
loc_5AD0F:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char translog_init_reader_data(long long a1, long long a2)
{
int record_header_scan; // [rsp+4h] [rbp-1Ch]
if ( translog_scanner_init(a1, 1, a2 + 1080, 1) )
return 1;
record_header_scan = translog_read_record_header_scan(a2 + 1080, a2, 1);
if ( record_header_scan == -1 )
return 1;
*(_WORD *)(a2 + 9328) = record_header_scan;
*(_DWORD *)(a2 + 9320) = *(unsigned __int16 *)(a2 + 1074);
*(_WORD *)(a2 + 9330) = *(_WORD *)(a2 + 1076);
*(_DWORD *)(a2 + 9324) = *(unsigned __int16 *)(a2 + 9328);
*(_DWORD *)(a2 + 9332) = 0;
*(_DWORD *)(a2 + 9336) = 0;
*(_BYTE *)(a2 + 9340) = 0;
return 0;
}
|
translog_init_reader_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,0x438
MOV ECX,0x1
MOV ESI,ECX
CALL 0x00157ea0
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x0015ac84
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x438
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x1
CALL 0x0015aa40
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,-0x1
JNZ 0x0015ac8f
LAB_0015ac84:
JMP 0x0015ac86
LAB_0015ac86:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015ad0f
LAB_0015ac8f:
MOV EAX,dword ptr [RBP + -0x1c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX + 0x2470],CX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RAX + 0x432]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2468],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV CX,word ptr [RAX + 0x434]
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX + 0x2472],CX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RAX + 0x2470]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x246c],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2474],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2478],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x247c],0x0
JMP 0x0015ad09
LAB_0015ad09:
JMP 0x0015ad0b
LAB_0015ad0b:
MOV byte ptr [RBP + -0x1],0x0
LAB_0015ad0f:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 translog_init_reader_data(int8 param_1,long param_2)
{
char cVar1;
int iVar2;
cVar1 = translog_scanner_init(param_1,1,param_2 + 0x438);
if ((cVar1 == '\0') &&
(iVar2 = translog_read_record_header_scan(param_2 + 0x438,param_2,1), iVar2 != -1)) {
*(short *)(param_2 + 0x2470) = (short)iVar2;
*(uint *)(param_2 + 0x2468) = (uint)*(ushort *)(param_2 + 0x432);
*(int2 *)(param_2 + 0x2472) = *(int2 *)(param_2 + 0x434);
*(uint *)(param_2 + 0x246c) = (uint)*(ushort *)(param_2 + 0x2470);
*(int4 *)(param_2 + 0x2474) = 0;
*(int4 *)(param_2 + 0x2478) = 0;
*(int1 *)(param_2 + 0x247c) = 0;
return 0;
}
return 1;
}
|
|
60,503
|
my_sync_dir
|
eloqsql/mysys/my_sync.c
|
int my_sync_dir(const char *dir_name __attribute__((unused)),
myf my_flags __attribute__((unused)))
{
#ifdef NEED_EXPLICIT_SYNC_DIR
static const char cur_dir_name[]= {FN_CURLIB, 0};
File dir_fd;
int res= 0;
const char *correct_dir_name;
DBUG_ENTER("my_sync_dir");
DBUG_PRINT("my",("Dir: '%s' my_flags: %lu", dir_name, my_flags));
/* Sometimes the path does not contain an explicit directory */
correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name;
/*
Syncing a dir may give EINVAL on tmpfs on Linux, which is ok.
EIO on the other hand is very important. Hence MY_IGNORE_BADFD.
*/
if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0)
{
if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD)))
res= 2;
if (my_close(dir_fd, MYF(my_flags)))
res= 3;
}
else
res= 1;
DBUG_RETURN(res);
#else
return 0;
#endif
}
|
O0
|
c
|
my_sync_dir:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
jmp 0x8c639
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x8c652
leaq 0x5a670(%rip), %rax # 0xe6cbc
movq %rax, -0x28(%rbp)
jmp 0x8c65a
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rdx
xorl %esi, %esi
callq 0x8b840
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jl 0x8c6af
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rsi
orq $0x20, %rsi
callq 0x8c490
cmpl $0x0, %eax
je 0x8c695
movl $0x2, -0x18(%rbp)
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x8bad0
cmpl $0x0, %eax
je 0x8c6ad
movl $0x3, -0x18(%rbp)
jmp 0x8c6b6
movl $0x1, -0x18(%rbp)
jmp 0x8c6b8
movl -0x18(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_sync_dir:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], 0
jmp short $+2
loc_8C639:
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_8C652
lea rax, my_sync_dir_cur_dir_name
mov [rbp+var_28], rax
jmp short loc_8C65A
loc_8C652:
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
loc_8C65A:
mov rax, [rbp+var_28]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
mov rdx, [rbp+var_10]
xor esi, esi
call my_open
mov [rbp+var_14], eax
cmp eax, 0
jl short loc_8C6AF
mov edi, [rbp+var_14]
mov rsi, [rbp+var_10]
or rsi, 20h
call my_sync
cmp eax, 0
jz short loc_8C695
mov [rbp+var_18], 2
loc_8C695:
mov edi, [rbp+var_14]
mov rsi, [rbp+var_10]
call my_close
cmp eax, 0
jz short loc_8C6AD
mov [rbp+var_18], 3
loc_8C6AD:
jmp short loc_8C6B6
loc_8C6AF:
mov [rbp+var_18], 1
loc_8C6B6:
jmp short $+2
loc_8C6B8:
mov eax, [rbp+var_18]
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
add rsp, 30h
pop rbp
retn
|
long long my_sync_dir(_BYTE *a1, long long a2)
{
void *v3; // [rsp+8h] [rbp-28h]
unsigned int v4; // [rsp+18h] [rbp-18h]
signed int v5; // [rsp+1Ch] [rbp-14h]
v4 = 0;
if ( *a1 )
v3 = a1;
else
v3 = &my_sync_dir_cur_dir_name;
v5 = my_open((long long)v3, 0, a2);
if ( v5 < 0 )
{
return 1;
}
else
{
if ( (unsigned int)my_sync(v5, (unsigned int)a2 | 0x20) )
v4 = 2;
if ( (unsigned int)my_close(v5, a2) )
return 3;
}
return v4;
}
|
my_sync_dir:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x18],0x0
JMP 0x0018c639
LAB_0018c639:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x0018c652
LEA RAX,[0x1e6cbc]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0018c65a
LAB_0018c652:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_0018c65a:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x0018b840
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JL 0x0018c6af
MOV EDI,dword ptr [RBP + -0x14]
MOV RSI,qword ptr [RBP + -0x10]
OR RSI,0x20
CALL 0x0018c490
CMP EAX,0x0
JZ 0x0018c695
MOV dword ptr [RBP + -0x18],0x2
LAB_0018c695:
MOV EDI,dword ptr [RBP + -0x14]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0018bad0
CMP EAX,0x0
JZ 0x0018c6ad
MOV dword ptr [RBP + -0x18],0x3
LAB_0018c6ad:
JMP 0x0018c6b6
LAB_0018c6af:
MOV dword ptr [RBP + -0x18],0x1
LAB_0018c6b6:
JMP 0x0018c6b8
LAB_0018c6b8:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
ADD RSP,0x30
POP RBP
RET
|
int4 my_sync_dir(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
char *local_30;
int4 local_20;
local_20 = 0;
local_30 = param_1;
if (*param_1 == '\0') {
local_30 = ".";
}
iVar1 = my_open(local_30,0,param_2);
if (iVar1 < 0) {
local_20 = 1;
}
else {
iVar2 = my_sync(iVar1,param_2 | 0x20);
if (iVar2 != 0) {
local_20 = 2;
}
iVar1 = my_close(iVar1,param_2);
if (iVar1 != 0) {
local_20 = 3;
}
}
return local_20;
}
|
|
60,504
|
my_sync_dir
|
eloqsql/mysys/my_sync.c
|
int my_sync_dir(const char *dir_name __attribute__((unused)),
myf my_flags __attribute__((unused)))
{
#ifdef NEED_EXPLICIT_SYNC_DIR
static const char cur_dir_name[]= {FN_CURLIB, 0};
File dir_fd;
int res= 0;
const char *correct_dir_name;
DBUG_ENTER("my_sync_dir");
DBUG_PRINT("my",("Dir: '%s' my_flags: %lu", dir_name, my_flags));
/* Sometimes the path does not contain an explicit directory */
correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name;
/*
Syncing a dir may give EINVAL on tmpfs on Linux, which is ok.
EIO on the other hand is very important. Hence MY_IGNORE_BADFD.
*/
if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0)
{
if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD)))
res= 2;
if (my_close(dir_fd, MYF(my_flags)))
res= 3;
}
else
res= 1;
DBUG_RETURN(res);
#else
return 0;
#endif
}
|
O3
|
c
|
my_sync_dir:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, (%rdi)
movq %rsi, %rbx
leaq 0x387f0(%rip), %rax # 0x69bf8
cmoveq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x30678
testl %eax, %eax
js 0x3144f
movl %eax, %r14d
movq %rbx, %rsi
orq $0x20, %rsi
movl %eax, %edi
callq 0x312c0
xorl %r15d, %r15d
testl %eax, %eax
setne %r15b
addl %r15d, %r15d
movl %r14d, %edi
movq %rbx, %rsi
callq 0x3081d
testl %eax, %eax
movl $0x3, %eax
cmovel %r15d, %eax
jmp 0x31454
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
my_sync_dir:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
cmp byte ptr [rdi], 0
mov rbx, rsi
lea rax, my_sync_dir_cur_dir_name
cmovz rdi, rax
xor esi, esi
mov rdx, rbx
call my_open
test eax, eax
js short loc_3144F
mov r14d, eax
mov rsi, rbx
or rsi, 20h
mov edi, eax
call my_sync
xor r15d, r15d
test eax, eax
setnz r15b
add r15d, r15d
mov edi, r14d
mov rsi, rbx
call my_close
test eax, eax
mov eax, 3
cmovz eax, r15d
jmp short loc_31454
loc_3144F:
mov eax, 1
loc_31454:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long my_sync_dir(_BYTE *a1, long long a2)
{
int v2; // eax
unsigned int v3; // r14d
unsigned int v4; // r15d
bool v5; // zf
long long result; // rax
if ( !*a1 )
a1 = &my_sync_dir_cur_dir_name;
v2 = my_open((long long)a1, 0, a2);
if ( v2 < 0 )
return 1LL;
v3 = v2;
v4 = 2 * ((unsigned int)my_sync((unsigned int)v2, a2 | 0x20) != 0);
v5 = (unsigned int)my_close(v3, a2) == 0;
result = 3LL;
if ( v5 )
return v4;
return result;
}
|
my_sync_dir:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
CMP byte ptr [RDI],0x0
MOV RBX,RSI
LEA RAX,[0x169bf8]
CMOVZ RDI,RAX
XOR ESI,ESI
MOV RDX,RBX
CALL 0x00130678
TEST EAX,EAX
JS 0x0013144f
MOV R14D,EAX
MOV RSI,RBX
OR RSI,0x20
MOV EDI,EAX
CALL 0x001312c0
XOR R15D,R15D
TEST EAX,EAX
SETNZ R15B
ADD R15D,R15D
MOV EDI,R14D
MOV RSI,RBX
CALL 0x0013081d
TEST EAX,EAX
MOV EAX,0x3
CMOVZ EAX,R15D
JMP 0x00131454
LAB_0013144f:
MOV EAX,0x1
LAB_00131454:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
char my_sync_dir(char *param_1,ulong param_2)
{
char cVar1;
int iVar2;
int iVar3;
if (*param_1 == '\0') {
param_1 = ".";
}
iVar2 = my_open(param_1,0,param_2);
if (iVar2 < 0) {
cVar1 = '\x01';
}
else {
iVar3 = my_sync(iVar2,param_2 | 0x20);
iVar2 = my_close(iVar2,param_2);
cVar1 = '\x03';
if (iVar2 == 0) {
cVar1 = (iVar3 != 0) * '\x02';
}
}
return cVar1;
}
|
|
60,505
|
ggml_compute_forward_flash_attn_back
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
|
static void ggml_compute_forward_flash_attn_back(
const struct ggml_compute_params * params,
const bool masked,
struct ggml_tensor * dst) {
const struct ggml_tensor * q = dst->src[0];
switch (q->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_flash_attn_back_f32(params, masked, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
}
|
O0
|
c
|
ggml_compute_forward_flash_attn_back:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
testl %eax, %eax
jne 0x1900a
jmp 0x18ff3
movq -0x8(%rbp), %rdi
movb -0x9(%rbp), %al
movq -0x18(%rbp), %rdx
andb $0x1, %al
movzbl %al, %esi
callq 0x36a20
jmp 0x19024
leaq 0x5ab51(%rip), %rdi # 0x73b62
movl $0x2c2e, %esi # imm = 0x2C2E
leaq 0x5ada0(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
ggml_compute_forward_flash_attn_back:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov [rbp+var_8], rdi
and al, 1
mov [rbp+var_9], al
mov [rbp+var_18], rdx
mov rax, [rbp+var_18]
mov rax, [rax+98h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov eax, [rax]
test eax, eax
jnz short loc_1900A
jmp short $+2
loc_18FF3:
mov rdi, [rbp+var_8]
mov al, [rbp+var_9]
mov rdx, [rbp+var_18]
and al, 1
movzx esi, al
call ggml_compute_forward_flash_attn_back_f32
jmp short loc_19024
loc_1900A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 2C2Eh
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_19024:
add rsp, 20h
pop rbp
retn
|
double ggml_compute_forward_flash_attn_back(long long a1, char a2, long long a3)
{
double result; // xmm0_8
if ( **(_DWORD **)(a3 + 152) )
return ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
11310LL,
"fatal error");
ggml_compute_forward_flash_attn_back_f32(a1, a2 & 1, a3);
return result;
}
|
ggml_compute_forward_flash_attn_back:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
AND AL,0x1
MOV byte ptr [RBP + -0x9],AL
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
TEST EAX,EAX
JNZ 0x0011900a
JMP 0x00118ff3
LAB_00118ff3:
MOV RDI,qword ptr [RBP + -0x8]
MOV AL,byte ptr [RBP + -0x9]
MOV RDX,qword ptr [RBP + -0x18]
AND AL,0x1
MOVZX ESI,AL
CALL 0x00136a20
JMP 0x00119024
LAB_0011900a:
LEA RDI,[0x173b62]
MOV ESI,0x2c2e
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_00119024:
ADD RSP,0x20
POP RBP
RET
|
void ggml_compute_forward_flash_attn_back(int8 param_1,byte param_2,long param_3)
{
if (**(int **)(param_3 + 0x98) == 0) {
ggml_compute_forward_flash_attn_back_f32(param_1,param_2 & 1,param_3);
}
else {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x2c2e,"fatal error");
}
return;
}
|
|
60,506
|
minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, minja::BinaryOpExpr::Op)
|
monkey531[P]llama/common/minja.hpp
|
BinaryOpExpr(const Location & location, std::shared_ptr<Expression> && l, std::shared_ptr<Expression> && r, Op o)
: Expression(location), left(std::move(l)), right(std::move(r)), op(o) {}
|
O2
|
cpp
|
minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, minja::BinaryOpExpr::Op):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
callq 0x62cfa
leaq 0x8f02e(%rip), %rax # 0xfe9c8
addq $0x10, %rax
movq %rax, (%r12)
andq $0x0, 0x28(%r12)
movups (%r15), %xmm0
andq $0x0, 0x8(%r15)
movups %xmm0, 0x20(%r12)
andq $0x0, (%r15)
andq $0x0, 0x38(%r12)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x30(%r12)
andq $0x0, (%r14)
movl %ebx, 0x40(%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
_ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE:
push r15
push r14
push r12
push rbx
push rax
mov ebx, r8d
mov r14, rcx
mov r15, rdx
mov r12, rdi
call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&)
lea rax, _ZTVN5minja12BinaryOpExprE; `vtable for'minja::BinaryOpExpr
add rax, 10h
mov [r12], rax
and qword ptr [r12+28h], 0
movups xmm0, xmmword ptr [r15]
and qword ptr [r15+8], 0
movups xmmword ptr [r12+20h], xmm0
and qword ptr [r15], 0
and qword ptr [r12+38h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [r12+30h], xmm0
and qword ptr [r14], 0
mov [r12+40h], ebx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long * minja::BinaryOpExpr::BinaryOpExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4, int a5)
{
long long *result; // rax
__int128 v9; // xmm0
__int128 v10; // xmm0
minja::Expression::Expression((_QWORD *)a1, a2);
result = &`vtable for'minja::BinaryOpExpr + 2;
*(_QWORD *)a1 = &`vtable for'minja::BinaryOpExpr + 2;
*(_QWORD *)(a1 + 40) = 0LL;
v9 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v9;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v10 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v10;
*(_QWORD *)a4 = 0LL;
*(_DWORD *)(a1 + 64) = a5;
return result;
}
|
BinaryOpExpr:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,R8D
MOV R14,RCX
MOV R15,RDX
MOV R12,RDI
CALL 0x00162cfa
LEA RAX,[0x1fe9c8]
ADD RAX,0x10
MOV qword ptr [R12],RAX
AND qword ptr [R12 + 0x28],0x0
MOVUPS XMM0,xmmword ptr [R15]
AND qword ptr [R15 + 0x8],0x0
MOVUPS xmmword ptr [R12 + 0x20],XMM0
AND qword ptr [R15],0x0
AND qword ptr [R12 + 0x38],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [R12 + 0x30],XMM0
AND qword ptr [R14],0x0
MOV dword ptr [R12 + 0x40],EBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&, minja::BinaryOpExpr::Op) */
void __thiscall
minja::BinaryOpExpr::BinaryOpExpr
(BinaryOpExpr *this,Location *param_1,int8 *param_2,int8 *param_3,
int4 param_5)
{
int8 uVar1;
Expression::Expression((Expression *)this,param_1);
*(int ***)this = &PTR_do_evaluate_001fe9d8;
*(int8 *)(this + 0x28) = 0;
uVar1 = param_2[1];
param_2[1] = 0;
*(int8 *)(this + 0x20) = *param_2;
*(int8 *)(this + 0x28) = uVar1;
*param_2 = 0;
*(int8 *)(this + 0x38) = 0;
uVar1 = param_3[1];
param_3[1] = 0;
*(int8 *)(this + 0x30) = *param_3;
*(int8 *)(this + 0x38) = uVar1;
*param_3 = 0;
*(int4 *)(this + 0x40) = param_5;
return;
}
|
|
60,507
|
mi_readinfo
|
eloqsql/storage/myisam/mi_locking.c
|
int _mi_readinfo(register MI_INFO *info, int lock_type, int check_keybuffer)
{
DBUG_ENTER("_mi_readinfo");
if (info->lock_type == F_UNLCK)
{
MYISAM_SHARE *share=info->s;
if (!share->tot_locks)
{
if (my_lock(share->kfile,lock_type,0L,F_TO_EOF,
info->lock_wait | MY_SEEK_NOT_DONE))
DBUG_RETURN(1);
if (mi_state_info_read_dsk(share->kfile, &share->state, 1))
{
int error= my_errno ? my_errno : HA_ERR_FILE_TOO_SHORT;
(void) my_lock(share->kfile,F_UNLCK,0L,F_TO_EOF,
MYF(MY_SEEK_NOT_DONE));
my_errno= error;
DBUG_RETURN(1);
}
}
if (check_keybuffer)
(void) _mi_test_if_changed(info);
info->invalidator=info->s->invalidator;
}
else if (lock_type == F_WRLCK && info->lock_type == F_RDLCK)
{
my_errno=EACCES; /* Not allowed to change */
DBUG_RETURN(-1); /* when have read_lock() */
}
DBUG_RETURN(0);
}
|
O0
|
c
|
mi_readinfo:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x1f4(%rax)
jne 0xb1213
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x368(%rax)
jne 0xb11e9
movq -0x20(%rbp), %rax
movl 0x350(%rax), %edi
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rax
movq 0x330(%rax), %r8
orq $0x20, %r8
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xf3530
cmpl $0x0, %eax
je 0xb116a
jmp 0xb115e
movl $0x1, -0x4(%rbp)
jmp 0xb1245
movq -0x20(%rbp), %rax
movl 0x350(%rax), %edi
movq -0x20(%rbp), %rsi
movl $0x1, %edx
callq 0xb8c70
cmpl $0x0, %eax
je 0xb11e7
callq 0xf60c0
cmpl $0x0, (%rax)
je 0xb119d
callq 0xf60c0
movl (%rax), %eax
movl %eax, -0x28(%rbp)
jmp 0xb11a7
movl $0xaf, %eax
movl %eax, -0x28(%rbp)
jmp 0xb11a7
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl 0x350(%rax), %edi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %ecx
movl $0x20, %r8d
movq %rcx, %rdx
callq 0xf3530
movl -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
callq 0xf60c0
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xb1245
jmp 0xb11e9
cmpl $0x0, -0x18(%rbp)
je 0xb11f8
movq -0x10(%rbp), %rdi
callq 0xb0c70
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x2f0(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x148(%rax)
jmp 0xb123c
cmpl $0x1, -0x14(%rbp)
jne 0xb123a
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1f4(%rax)
jne 0xb123a
callq 0xf60c0
movl $0xd, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb1245
jmp 0xb123c
jmp 0xb123e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
|
_mi_readinfo:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov rax, [rbp+var_10]
cmp dword ptr [rax+1F4h], 2
jnz loc_B1213
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
cmp dword ptr [rax+368h], 0
jnz loc_B11E9
mov rax, [rbp+var_20]
mov edi, [rax+350h]
mov esi, [rbp+var_14]
mov rax, [rbp+var_10]
mov r8, [rax+330h]
or r8, 20h
xor eax, eax
mov ecx, eax
mov rdx, rcx
call my_lock
cmp eax, 0
jz short loc_B116A
jmp short $+2
loc_B115E:
mov [rbp+var_4], 1
jmp loc_B1245
loc_B116A:
mov rax, [rbp+var_20]
mov edi, [rax+350h]
mov rsi, [rbp+var_20]
mov edx, 1
call mi_state_info_read_dsk
cmp eax, 0
jz short loc_B11E7
call _my_thread_var
cmp dword ptr [rax], 0
jz short loc_B119D
call _my_thread_var
mov eax, [rax]
mov [rbp+var_28], eax
jmp short loc_B11A7
loc_B119D:
mov eax, 0AFh
mov [rbp+var_28], eax
jmp short $+2
loc_B11A7:
mov eax, [rbp+var_28]
mov [rbp+var_24], eax
mov rax, [rbp+var_20]
mov edi, [rax+350h]
mov esi, 2
xor eax, eax
mov ecx, eax
mov r8d, 20h ; ' '
mov rdx, rcx
call my_lock
mov eax, [rbp+var_24]
mov [rbp+var_2C], eax
call _my_thread_var
mov ecx, [rbp+var_2C]
mov [rax], ecx
mov [rbp+var_4], 1
jmp short loc_B1245
loc_B11E7:
jmp short $+2
loc_B11E9:
cmp [rbp+var_18], 0
jz short loc_B11F8
mov rdi, [rbp+var_10]
call _mi_test_if_changed
loc_B11F8:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rax+2F0h]
mov rax, [rbp+var_10]
mov [rax+148h], rcx
jmp short loc_B123C
loc_B1213:
cmp [rbp+var_14], 1
jnz short loc_B123A
mov rax, [rbp+var_10]
cmp dword ptr [rax+1F4h], 0
jnz short loc_B123A
call _my_thread_var
mov dword ptr [rax], 0Dh
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_B1245
loc_B123A:
jmp short $+2
loc_B123C:
jmp short $+2
loc_B123E:
mov [rbp+var_4], 0
loc_B1245:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long mi_readinfo(long long *a1, const char *a2, int a3)
{
long long v3; // rdi
long long v4; // rdi
int v6; // [rsp+8h] [rbp-28h]
long long v7; // [rsp+10h] [rbp-20h]
if ( *((_DWORD *)a1 + 125) != 2 )
{
if ( (_DWORD)a2 == 1 && !*((_DWORD *)a1 + 125) )
{
*(_DWORD *)my_thread_var(a1, a2) = 13;
return (unsigned int)-1;
}
return 0;
}
v7 = *a1;
if ( *(_DWORD *)(*a1 + 872) )
goto LABEL_10;
if ( (unsigned int)my_lock(*(unsigned int *)(v7 + 848), (unsigned int)a2, 0LL, 0LL, a1[102] | 0x20) )
return 1;
v3 = *(unsigned int *)(v7 + 848);
if ( !(unsigned int)mi_state_info_read_dsk(v3, v7, 1LL) )
{
LABEL_10:
if ( a3 )
mi_test_if_changed(a1);
a1[41] = *(_QWORD *)(*a1 + 752);
return 0;
}
if ( *(_DWORD *)my_thread_var(v3, (const char *)v7) )
v6 = *(_DWORD *)my_thread_var(v3, (const char *)v7);
else
v6 = 175;
v4 = *(unsigned int *)(v7 + 848);
my_lock(v4, 2LL, 0LL, 0LL, 32LL);
*(_DWORD *)my_thread_var(v4, (_BYTE *)&dword_0 + 2) = v6;
return 1;
}
|
_mi_readinfo:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x1f4],0x2
JNZ 0x001b1213
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x001b11e9
MOV RAX,qword ptr [RBP + -0x20]
MOV EDI,dword ptr [RAX + 0x350]
MOV ESI,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RAX + 0x330]
OR R8,0x20
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001f3530
CMP EAX,0x0
JZ 0x001b116a
JMP 0x001b115e
LAB_001b115e:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b1245
LAB_001b116a:
MOV RAX,qword ptr [RBP + -0x20]
MOV EDI,dword ptr [RAX + 0x350]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,0x1
CALL 0x001b8c70
CMP EAX,0x0
JZ 0x001b11e7
CALL 0x001f60c0
CMP dword ptr [RAX],0x0
JZ 0x001b119d
CALL 0x001f60c0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001b11a7
LAB_001b119d:
MOV EAX,0xaf
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001b11a7
LAB_001b11a7:
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EDI,dword ptr [RAX + 0x350]
MOV ESI,0x2
XOR EAX,EAX
MOV ECX,EAX
MOV R8D,0x20
MOV RDX,RCX
CALL 0x001f3530
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x2c],EAX
CALL 0x001f60c0
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b1245
LAB_001b11e7:
JMP 0x001b11e9
LAB_001b11e9:
CMP dword ptr [RBP + -0x18],0x0
JZ 0x001b11f8
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001b0c70
LAB_001b11f8:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x2f0]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x148],RCX
JMP 0x001b123c
LAB_001b1213:
CMP dword ptr [RBP + -0x14],0x1
JNZ 0x001b123a
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x1f4],0x0
JNZ 0x001b123a
CALL 0x001f60c0
MOV dword ptr [RAX],0xd
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001b1245
LAB_001b123a:
JMP 0x001b123c
LAB_001b123c:
JMP 0x001b123e
LAB_001b123e:
MOV dword ptr [RBP + -0x4],0x0
LAB_001b1245:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 _mi_readinfo(long *param_1,int param_2,int param_3)
{
long lVar1;
int iVar2;
int *piVar3;
int4 *puVar4;
int4 local_30;
if (*(int *)((long)param_1 + 500) == 2) {
lVar1 = *param_1;
if (*(int *)(lVar1 + 0x368) == 0) {
iVar2 = my_lock(*(int4 *)(lVar1 + 0x350),param_2,0,0,param_1[0x66] | 0x20);
if (iVar2 != 0) {
return 1;
}
iVar2 = mi_state_info_read_dsk(*(int4 *)(lVar1 + 0x350),lVar1,1);
if (iVar2 != 0) {
piVar3 = (int *)_my_thread_var();
if (*piVar3 == 0) {
local_30 = 0xaf;
}
else {
puVar4 = (int4 *)_my_thread_var();
local_30 = *puVar4;
}
my_lock(*(int4 *)(lVar1 + 0x350),2,0,0,0x20);
puVar4 = (int4 *)_my_thread_var();
*puVar4 = local_30;
return 1;
}
}
if (param_3 != 0) {
_mi_test_if_changed(param_1);
}
param_1[0x29] = *(long *)(*param_1 + 0x2f0);
}
else if ((param_2 == 1) && (*(int *)((long)param_1 + 500) == 0)) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0xd;
return 0xffffffff;
}
return 0;
}
|
|
60,508
|
alloc_free
|
eloqsql/mysys/lf_alloc-pin.c
|
static void alloc_free(uchar *first,
uchar volatile *last,
LF_ALLOCATOR *allocator)
{
/*
we need a union here to access type-punned pointer reliably.
otherwise gcc -fstrict-aliasing will not see 'tmp' changed in the loop
*/
union { uchar * node; void *ptr; } tmp;
tmp.node= allocator->top;
do
{
anext_node(last)= tmp.node;
} while (!my_atomic_casptr((void **)(char *)&allocator->top,
(void **)&tmp.ptr, first) && LF_BACKOFF());
}
|
O0
|
c
|
alloc_free:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x38(%rcx), %ecx
movq %rdx, (%rax,%rcx)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdx
lock
cmpxchgq %rdx, 0x48(%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x39(%rbp)
movq %rcx, -0x38(%rbp)
testb $0x1, %al
jne 0x5bda6
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movb -0x39(%rbp), %al
andb $0x1, %al
movb %al, -0x29(%rbp)
xorl %eax, %eax
testb $0x1, -0x29(%rbp)
movb %al, -0x3a(%rbp)
jne 0x5bdc7
callq 0x5bf90
cmpl $0x0, %eax
setne %al
movb %al, -0x3a(%rbp)
movb -0x3a(%rbp), %al
testb $0x1, %al
jne 0x5bd60
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
alloc_free:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_18]
mov rax, [rax+48h]
mov [rbp+var_20], rax
loc_5BD60:
mov rdx, [rbp+var_20]
mov rax, [rbp+var_10]
mov rcx, [rbp+var_18]
mov ecx, [rcx+38h]
mov [rax+rcx], rdx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
mov rdx, [rbp+var_28]
lock cmpxchg [rcx+48h], rdx
mov rcx, rax
setz al
mov [rbp+var_39], al
mov [rbp+var_38], rcx
test al, 1
jnz short loc_5BDA6
mov rax, [rbp+var_38]
mov [rbp+var_20], rax
loc_5BDA6:
mov al, [rbp+var_39]
and al, 1
mov [rbp+var_29], al
xor eax, eax
test [rbp+var_29], 1
mov [rbp+var_3A], al
jnz short loc_5BDC7
call LF_BACKOFF
cmp eax, 0
setnz al
mov [rbp+var_3A], al
loc_5BDC7:
mov al, [rbp+var_3A]
test al, 1
jnz short loc_5BD60
add rsp, 40h
pop rbp
retn
|
bool alloc_free(signed long long a1, long long a2, long long a3)
{
signed long long v3; // rcx
bool result; // al
bool v5; // [rsp+6h] [rbp-3Ah]
bool v6; // [rsp+7h] [rbp-39h]
signed long long v7; // [rsp+20h] [rbp-20h]
v7 = *(_QWORD *)(a3 + 72);
do
{
*(_QWORD *)(a2 + *(unsigned int *)(a3 + 56)) = v7;
v3 = _InterlockedCompareExchange64((volatile signed long long *)(a3 + 72), a1, v7);
v6 = v7 == v3;
if ( v7 != v3 )
v7 = v3;
v5 = 0;
if ( !v6 )
v5 = (unsigned int)LF_BACKOFF() != 0;
result = v5;
}
while ( v5 );
return result;
}
|
alloc_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RBP + -0x20],RAX
LAB_0015bd60:
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x38]
MOV qword ptr [RAX + RCX*0x1],RDX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CMPXCHG.LOCK qword ptr [RCX + 0x48],RDX
MOV RCX,RAX
SETZ AL
MOV byte ptr [RBP + -0x39],AL
MOV qword ptr [RBP + -0x38],RCX
TEST AL,0x1
JNZ 0x0015bda6
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x20],RAX
LAB_0015bda6:
MOV AL,byte ptr [RBP + -0x39]
AND AL,0x1
MOV byte ptr [RBP + -0x29],AL
XOR EAX,EAX
TEST byte ptr [RBP + -0x29],0x1
MOV byte ptr [RBP + -0x3a],AL
JNZ 0x0015bdc7
CALL 0x0015bf90
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x3a],AL
LAB_0015bdc7:
MOV AL,byte ptr [RBP + -0x3a]
TEST AL,0x1
JNZ 0x0015bd60
ADD RSP,0x40
POP RBP
RET
|
void alloc_free(long param_1,long param_2,long param_3)
{
int iVar1;
long lVar2;
bool bVar3;
bool bVar4;
int8 local_28;
local_28 = *(long *)(param_3 + 0x48);
do {
*(long *)(param_2 + (ulong)*(uint *)(param_3 + 0x38)) = local_28;
LOCK();
lVar2 = *(long *)(param_3 + 0x48);
bVar3 = local_28 == lVar2;
if (bVar3) {
*(long *)(param_3 + 0x48) = param_1;
lVar2 = local_28;
}
UNLOCK();
if (!bVar3) {
local_28 = lVar2;
}
bVar4 = false;
if (!bVar3) {
iVar1 = LF_BACKOFF();
bVar4 = iVar1 != 0;
}
} while (bVar4);
return;
}
|
|
60,509
|
JS_AtomGetKind
|
bluesky950520[P]quickjs/quickjs.c
|
static JSAtomKindEnum JS_AtomGetKind(JSContext *ctx, JSAtom v)
{
JSRuntime *rt;
JSAtomStruct *p;
rt = ctx->rt;
if (__JS_AtomIsTaggedInt(v))
return JS_ATOM_KIND_STRING;
p = rt->atom_array[v];
switch(p->atom_type) {
case JS_ATOM_TYPE_STRING:
return JS_ATOM_KIND_STRING;
case JS_ATOM_TYPE_GLOBAL_SYMBOL:
return JS_ATOM_KIND_SYMBOL;
case JS_ATOM_TYPE_SYMBOL:
switch(p->hash) {
case JS_ATOM_HASH_SYMBOL:
return JS_ATOM_KIND_SYMBOL;
case JS_ATOM_HASH_PRIVATE:
return JS_ATOM_KIND_PRIVATE;
default:
abort();
}
default:
abort();
}
return (JSAtomKindEnum){-1}; // pacify compiler
}
|
O0
|
c
|
JS_AtomGetKind:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
movl 0x24(%rsp), %edi
callq 0x360c0
cmpl $0x0, %eax
je 0x60826
movl $0x0, 0x34(%rsp)
jmp 0x608bf
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rax
movl 0x24(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x3e, %rax
movl %eax, %ecx
movl %ecx, 0xc(%rsp)
subq $0x1, %rax
je 0x6086d
jmp 0x60857
movl 0xc(%rsp), %eax
subl $0x2, %eax
je 0x60877
jmp 0x60862
movl 0xc(%rsp), %eax
subl $0x3, %eax
je 0x60881
jmp 0x608ba
movl $0x0, 0x34(%rsp)
jmp 0x608bf
movl $0x1, 0x34(%rsp)
jmp 0x608bf
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
andl $0x3fffffff, %eax # imm = 0x3FFFFFFF
movl %eax, 0x8(%rsp)
je 0x608a1
jmp 0x60896
movl 0x8(%rsp), %eax
subl $0x1, %eax
je 0x608ab
jmp 0x608b5
movl $0x1, 0x34(%rsp)
jmp 0x608bf
movl $0x2, 0x34(%rsp)
jmp 0x608bf
callq 0xe090
callq 0xe090
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
|
JS_AtomGetKind:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_14], esi
mov rax, [rsp+38h+var_10]
mov rax, [rax+18h]
mov [rsp+38h+var_20], rax
mov edi, [rsp+38h+var_14]
call __JS_AtomIsTaggedInt
cmp eax, 0
jz short loc_60826
mov [rsp+38h+var_4], 0
jmp loc_608BF
loc_60826:
mov rax, [rsp+38h+var_20]
mov rax, [rax+68h]
mov ecx, [rsp+38h+var_14]
mov rax, [rax+rcx*8]
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_28]
mov rax, [rax+4]
shr rax, 3Eh
mov ecx, eax
mov [rsp+38h+var_2C], ecx
sub rax, 1
jz short loc_6086D
jmp short $+2
loc_60857:
mov eax, [rsp+38h+var_2C]
sub eax, 2
jz short loc_60877
jmp short $+2
loc_60862:
mov eax, [rsp+38h+var_2C]
sub eax, 3
jz short loc_60881
jmp short loc_608BA
loc_6086D:
mov [rsp+38h+var_4], 0
jmp short loc_608BF
loc_60877:
mov [rsp+38h+var_4], 1
jmp short loc_608BF
loc_60881:
mov rax, [rsp+38h+var_28]
mov eax, [rax+8]
and eax, 3FFFFFFFh
mov [rsp+38h+var_30], eax
jz short loc_608A1
jmp short $+2
loc_60896:
mov eax, [rsp+38h+var_30]
sub eax, 1
jz short loc_608AB
jmp short loc_608B5
loc_608A1:
mov [rsp+38h+var_4], 1
jmp short loc_608BF
loc_608AB:
mov [rsp+38h+var_4], 2
jmp short loc_608BF
loc_608B5:
call _abort
loc_608BA:
call _abort
loc_608BF:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
|
long long JS_AtomGetKind(long long a1, unsigned int a2)
{
int v3; // [rsp+Ch] [rbp-2Ch]
long long v4; // [rsp+10h] [rbp-28h]
long long v5; // [rsp+18h] [rbp-20h]
v5 = *(_QWORD *)(a1 + 24);
if ( _JS_AtomIsTaggedInt(a2) )
{
return 0;
}
else
{
v4 = *(_QWORD *)(*(_QWORD *)(v5 + 104) + 8LL * a2);
v3 = *(_QWORD *)(v4 + 4) >> 62;
if ( *(_QWORD *)(v4 + 4) >> 62 == 1LL )
{
return 0;
}
else if ( v3 == 2 )
{
return 1;
}
else
{
if ( v3 != 3 )
abort((const char *)a2);
if ( (*(_DWORD *)(v4 + 8) & 0x3FFFFFFF) != 0 )
{
if ( (*(_DWORD *)(v4 + 8) & 0x3FFFFFFF) != 1 )
abort((const char *)a2);
return 2;
}
else
{
return 1;
}
}
}
}
|
JS_AtomGetKind:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV dword ptr [RSP + 0x24],ESI
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV EDI,dword ptr [RSP + 0x24]
CALL 0x001360c0
CMP EAX,0x0
JZ 0x00160826
MOV dword ptr [RSP + 0x34],0x0
JMP 0x001608bf
LAB_00160826:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV ECX,dword ptr [RSP + 0x24]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x3e
MOV ECX,EAX
MOV dword ptr [RSP + 0xc],ECX
SUB RAX,0x1
JZ 0x0016086d
JMP 0x00160857
LAB_00160857:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x2
JZ 0x00160877
JMP 0x00160862
LAB_00160862:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x3
JZ 0x00160881
JMP 0x001608ba
LAB_0016086d:
MOV dword ptr [RSP + 0x34],0x0
JMP 0x001608bf
LAB_00160877:
MOV dword ptr [RSP + 0x34],0x1
JMP 0x001608bf
LAB_00160881:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX + 0x8]
AND EAX,0x3fffffff
MOV dword ptr [RSP + 0x8],EAX
JZ 0x001608a1
JMP 0x00160896
LAB_00160896:
MOV EAX,dword ptr [RSP + 0x8]
SUB EAX,0x1
JZ 0x001608ab
JMP 0x001608b5
LAB_001608a1:
MOV dword ptr [RSP + 0x34],0x1
JMP 0x001608bf
LAB_001608ab:
MOV dword ptr [RSP + 0x34],0x2
JMP 0x001608bf
LAB_001608b5:
CALL 0x0010e090
LAB_001608ba:
CALL 0x0010e090
LAB_001608bf:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
int4 JS_AtomGetKind(long param_1,uint param_2)
{
long lVar1;
ulong uVar2;
int iVar3;
uint uVar4;
int4 local_4;
lVar1 = *(long *)(param_1 + 0x18);
iVar3 = __JS_AtomIsTaggedInt(param_2);
if (iVar3 == 0) {
lVar1 = *(long *)(*(long *)(lVar1 + 0x68) + (ulong)param_2 * 8);
uVar2 = *(ulong *)(lVar1 + 4);
uVar4 = (uint)(uVar2 >> 0x3e);
if (uVar2 >> 0x3e == 1) {
local_4 = 0;
}
else if (uVar4 == 2) {
local_4 = 1;
}
else {
if (uVar4 != 3) {
/* WARNING: Subroutine does not return */
abort();
}
uVar4 = *(uint *)(lVar1 + 8) & 0x3fffffff;
if (uVar4 == 0) {
local_4 = 1;
}
else {
if (uVar4 != 1) {
/* WARNING: Subroutine does not return */
abort();
}
local_4 = 2;
}
}
}
else {
local_4 = 0;
}
return local_4;
}
|
|
60,510
|
JS_AtomGetKind
|
bluesky950520[P]quickjs/quickjs.c
|
static JSAtomKindEnum JS_AtomGetKind(JSContext *ctx, JSAtom v)
{
JSRuntime *rt;
JSAtomStruct *p;
rt = ctx->rt;
if (__JS_AtomIsTaggedInt(v))
return JS_ATOM_KIND_STRING;
p = rt->atom_array[v];
switch(p->atom_type) {
case JS_ATOM_TYPE_STRING:
return JS_ATOM_KIND_STRING;
case JS_ATOM_TYPE_GLOBAL_SYMBOL:
return JS_ATOM_KIND_SYMBOL;
case JS_ATOM_TYPE_SYMBOL:
switch(p->hash) {
case JS_ATOM_HASH_SYMBOL:
return JS_ATOM_KIND_SYMBOL;
case JS_ATOM_HASH_PRIVATE:
return JS_ATOM_KIND_PRIVATE;
default:
abort();
}
default:
abort();
}
return (JSAtomKindEnum){-1}; // pacify compiler
}
|
O1
|
c
|
JS_AtomGetKind:
pushq %rax
xorl %eax, %eax
testl %esi, %esi
js 0x3d7e6
movq 0x18(%rdi), %rcx
movq 0x68(%rcx), %rcx
movl %esi, %edx
movq (%rcx,%rdx,8), %rcx
movq 0x4(%rcx), %rcx
movq %rcx, %rdx
shrq $0x3e, %rdx
leaq 0x5f3ad(%rip), %rsi # 0x9cb68
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movl $0x1, %eax
jmp 0x3d7e6
shrq $0x20, %rcx
movl $0x1, %eax
andl $0x3fffffff, %ecx # imm = 0x3FFFFFFF
je 0x3d7e6
cmpl $0x1, %ecx
jne 0x3d7e8
movl $0x2, %eax
popq %rcx
retq
callq 0xe090
|
JS_AtomGetKind:
push rax
xor eax, eax
test esi, esi
js short loc_3D7E6; jumptable 000000000003D7C2 case 1
mov rcx, [rdi+18h]
mov rcx, [rcx+68h]
mov edx, esi
mov rcx, [rcx+rdx*8]
mov rcx, [rcx+4]
mov rdx, rcx
shr rdx, 3Eh
lea rsi, jpt_3D7C2
movsxd rdx, ds:(jpt_3D7C2 - 9CB68h)[rsi+rdx*4]; switch 4 cases
add rdx, rsi
jmp rdx; switch jump
loc_3D7C4:
mov eax, 1; jumptable 000000000003D7C2 case 2
jmp short loc_3D7E6; jumptable 000000000003D7C2 case 1
loc_3D7CB:
shr rcx, 20h; jumptable 000000000003D7C2 case 3
mov eax, 1
and ecx, 3FFFFFFFh
jz short loc_3D7E6; jumptable 000000000003D7C2 case 1
cmp ecx, 1
jnz short loc_3D7E8; jumptable 000000000003D7C2 case 0
mov eax, 2
loc_3D7E6:
pop rcx; jumptable 000000000003D7C2 case 1
retn
loc_3D7E8:
call _abort; jumptable 000000000003D7C2 case 0
|
long long JS_AtomGetKind(long long a1, int a2)
{
long long result; // rax
unsigned long long v3; // rcx
result = 0LL;
if ( a2 >= 0 )
{
v3 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a2) + 4LL);
switch ( v3 >> 62 )
{
case 0uLL:
goto LABEL_8;
case 1uLL:
return result;
case 2uLL:
return 1LL;
case 3uLL:
result = 1LL;
if ( (v3 & 0x3FFFFFFF00000000LL) == 0 )
return result;
if ( (HIDWORD(v3) & 0x3FFFFFFF) != 1 )
LABEL_8:
abort((const char *)a1);
result = 2LL;
break;
}
}
return result;
}
| |||
60,511
|
JS_AtomGetKind
|
bluesky950520[P]quickjs/quickjs.c
|
static JSAtomKindEnum JS_AtomGetKind(JSContext *ctx, JSAtom v)
{
JSRuntime *rt;
JSAtomStruct *p;
rt = ctx->rt;
if (__JS_AtomIsTaggedInt(v))
return JS_ATOM_KIND_STRING;
p = rt->atom_array[v];
switch(p->atom_type) {
case JS_ATOM_TYPE_STRING:
return JS_ATOM_KIND_STRING;
case JS_ATOM_TYPE_GLOBAL_SYMBOL:
return JS_ATOM_KIND_SYMBOL;
case JS_ATOM_TYPE_SYMBOL:
switch(p->hash) {
case JS_ATOM_HASH_SYMBOL:
return JS_ATOM_KIND_SYMBOL;
case JS_ATOM_HASH_PRIVATE:
return JS_ATOM_KIND_PRIVATE;
default:
abort();
}
default:
abort();
}
return (JSAtomKindEnum){-1}; // pacify compiler
}
|
O2
|
c
|
JS_AtomGetKind:
pushq %rax
xorl %eax, %eax
testl %esi, %esi
js 0x36081
movq 0x18(%rdi), %rcx
movq 0x68(%rcx), %rcx
movl %esi, %edx
movq (%rcx,%rdx,8), %rcx
movq 0x4(%rcx), %rcx
movq %rcx, %rdx
shrq $0x3e, %rdx
leaq 0x4db4c(%rip), %rsi # 0x83bac
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
shrq $0x20, %rcx
andl $0x3fffffff, %ecx # imm = 0x3FFFFFFF
je 0x3607e
cmpl $0x1, %ecx
jne 0x36083
pushq $0x2
jmp 0x36080
pushq $0x1
popq %rax
popq %rcx
retq
callq 0xe090
|
JS_AtomGetKind:
push rax
xor eax, eax
test esi, esi
js short loc_36081; jumptable 0000000000036067 case 1
mov rcx, [rdi+18h]
mov rcx, [rcx+68h]
mov edx, esi
mov rcx, [rcx+rdx*8]
mov rcx, [rcx+4]
mov rdx, rcx
shr rdx, 3Eh
lea rsi, jpt_36067
movsxd rdx, ds:(jpt_36067 - 83BACh)[rsi+rdx*4]; switch 4 cases
add rdx, rsi
jmp rdx; switch jump
loc_36069:
shr rcx, 20h; jumptable 0000000000036067 case 3
and ecx, 3FFFFFFFh
jz short loc_3607E; jumptable 0000000000036067 case 2
cmp ecx, 1
jnz short loc_36083; jumptable 0000000000036067 case 0
push 2
jmp short loc_36080
loc_3607E:
push 1; jumptable 0000000000036067 case 2
loc_36080:
pop rax
loc_36081:
pop rcx; jumptable 0000000000036067 case 1
retn
loc_36083:
call _abort; jumptable 0000000000036067 case 0
|
long long JS_AtomGetKind(long long a1, int a2)
{
long long result; // rax
unsigned long long v3; // rcx
long long v4; // [rsp-10h] [rbp-10h]
result = 0LL;
if ( a2 >= 0 )
{
v3 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a2) + 4LL);
switch ( v3 >> 62 )
{
case 0uLL:
goto LABEL_9;
case 1uLL:
return result;
case 2uLL:
goto LABEL_6;
case 3uLL:
if ( (v3 & 0x3FFFFFFF00000000LL) != 0 )
{
if ( (HIDWORD(v3) & 0x3FFFFFFF) != 1 )
LABEL_9:
abort((const char *)a1);
v4 = 2LL;
}
else
{
LABEL_6:
v4 = 1LL;
}
result = v4;
break;
}
}
return result;
}
|
JS_AtomGetKind:
PUSH RAX
XOR EAX,EAX
TEST ESI,ESI
JS 0x00136081
MOV RCX,qword ptr [RDI + 0x18]
MOV RCX,qword ptr [RCX + 0x68]
MOV EDX,ESI
MOV RCX,qword ptr [RCX + RDX*0x8]
MOV RCX,qword ptr [RCX + 0x4]
MOV RDX,RCX
SHR RDX,0x3e
LEA RSI,[0x183bac]
MOVSXD RDX,dword ptr [RSI + RDX*0x4]
ADD RDX,RSI
JMP RDX
LAB_00136081:
POP RCX
RET
|
int8 JS_AtomGetKind(long param_1,uint param_2)
{
int8 uVar1;
if (-1 < (int)param_2) {
/* WARNING: Could not recover jumptable at 0x00136067. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar1 = (*(code *)(&DAT_00183bac +
*(int *)(&DAT_00183bac +
(*(ulong *)(*(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) +
(ulong)param_2 * 8) + 4) >> 0x3e) * 4)))
(param_1,&DAT_00183bac,
&DAT_00183bac +
*(int *)(&DAT_00183bac +
(*(ulong *)(*(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) +
(ulong)param_2 * 8) + 4) >> 0x3e) * 4));
return uVar1;
}
return 0;
}
|
|
60,512
|
translog_scanner_eol
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_scanner_eol(TRANSLOG_SCANNER_DATA *scanner)
{
DBUG_ENTER("translog_scanner_eol");
DBUG_PRINT("enter",
("Horizon: " LSN_FMT " Current: (%u, 0x%x+0x%x=0x%x)",
LSN_IN_PARTS(scanner->horizon),
LSN_IN_PARTS(scanner->page_addr),
(uint) scanner->page_offset,
(uint) (LSN_OFFSET(scanner->page_addr) + scanner->page_offset)));
if (scanner->horizon > (scanner->page_addr +
scanner->page_offset))
{
DBUG_PRINT("info", ("Horizon is not reached"));
DBUG_RETURN(0);
}
if (scanner->fixed_horizon)
{
DBUG_PRINT("info", ("Horizon is fixed and reached"));
DBUG_RETURN(1);
}
scanner->horizon= translog_get_horizon();
DBUG_PRINT("info",
("Horizon is re-read, EOL: %d",
scanner->horizon <= (scanner->page_addr +
scanner->page_offset)));
DBUG_RETURN(scanner->horizon <= (scanner->page_addr +
scanner->page_offset));
}
|
O3
|
c
|
translog_scanner_eol:
movl 0x2028(%rdi), %eax
addq 0x2000(%rdi), %rax
cmpq %rax, 0x2008(%rdi)
jle 0x39748
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x1, %al
cmpb $0x0, 0x202c(%rdi)
jne 0x3977b
callq 0x355b0
movq %rax, 0x2008(%rbx)
movl 0x2028(%rbx), %ecx
addq 0x2000(%rbx), %rcx
cmpq %rcx, %rax
setle %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
translog_scanner_eol:
mov eax, [rdi+2028h]
add rax, [rdi+2000h]
cmp [rdi+2008h], rax
jle short loc_39748
xor eax, eax
retn
loc_39748:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov al, 1
cmp byte ptr [rdi+202Ch], 0
jnz short loc_3977B
call translog_get_horizon
mov [rbx+2008h], rax
mov ecx, [rbx+2028h]
add rcx, [rbx+2000h]
cmp rax, rcx
setle al
loc_3977B:
add rsp, 8
pop rbx
pop rbp
retn
|
bool translog_scanner_eol(long long a1)
{
bool result; // al
long long horizon; // rax
if ( *(_QWORD *)(a1 + 8200) > (signed long long)(*(_QWORD *)(a1 + 0x2000) + *(unsigned int *)(a1 + 8232)) )
return 0;
result = 1;
if ( !*(_BYTE *)(a1 + 8236) )
{
horizon = translog_get_horizon();
*(_QWORD *)(a1 + 8200) = horizon;
return horizon <= *(_QWORD *)(a1 + 0x2000) + *(unsigned int *)(a1 + 8232);
}
return result;
}
|
translog_scanner_eol:
MOV EAX,dword ptr [RDI + 0x2028]
ADD RAX,qword ptr [RDI + 0x2000]
CMP qword ptr [RDI + 0x2008],RAX
JLE 0x00139748
XOR EAX,EAX
RET
LAB_00139748:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV AL,0x1
CMP byte ptr [RDI + 0x202c],0x0
JNZ 0x0013977b
CALL 0x001355b0
MOV qword ptr [RBX + 0x2008],RAX
MOV ECX,dword ptr [RBX + 0x2028]
ADD RCX,qword ptr [RBX + 0x2000]
CMP RAX,RCX
SETLE AL
LAB_0013977b:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
bool translog_scanner_eol(long param_1)
{
bool bVar1;
long lVar2;
if ((long)((ulong)*(uint *)(param_1 + 0x2028) + *(long *)(param_1 + 0x2000)) <
*(long *)(param_1 + 0x2008)) {
return false;
}
bVar1 = true;
if (*(char *)(param_1 + 0x202c) == '\0') {
lVar2 = translog_get_horizon();
*(long *)(param_1 + 0x2008) = lVar2;
bVar1 = lVar2 <= (long)((ulong)*(uint *)(param_1 + 0x2028) + *(long *)(param_1 + 0x2000));
}
return bVar1;
}
|
|
60,513
|
free_sh
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static void free_sh(JSRuntime *rt, JSOSSignalHandler *sh)
{
list_del(&sh->link);
JS_FreeValueRT(rt, sh->func);
js_free_rt(rt, sh);
}
|
O2
|
c
|
free_sh:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
movq 0x18(%rsi), %rsi
movq 0x20(%rbx), %rdx
callq 0x1bbe1
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1ac7b
|
free_sh:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov rax, [rsi]
mov rcx, [rsi+8]
mov [rax+8], rcx
mov [rcx], rax
xorps xmm0, xmm0
movups xmmword ptr [rsi], xmm0
mov rsi, [rsi+18h]
mov rdx, [rbx+20h]
call JS_FreeValueRT
mov rdi, r14
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp js_free_rt
|
long long free_sh(long long a1, long long *a2)
{
long long v2; // rax
_QWORD *v3; // rcx
v2 = *a2;
v3 = (_QWORD *)a2[1];
*(_QWORD *)(v2 + 8) = v3;
*v3 = v2;
*(_OWORD *)a2 = 0LL;
JS_FreeValueRT(a1, a2[3], a2[4]);
return js_free_rt(a1, a2);
}
|
free_sh:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RSI]
MOV RCX,qword ptr [RSI + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RCX],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI],XMM0
MOV RSI,qword ptr [RSI + 0x18]
MOV RDX,qword ptr [RBX + 0x20]
CALL 0x0011bbe1
MOV RDI,R14
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0011ac7b
|
void free_sh(int8 param_1,long *param_2)
{
long lVar1;
long *plVar2;
lVar1 = *param_2;
plVar2 = (long *)param_2[1];
*(long **)(lVar1 + 8) = plVar2;
*plVar2 = lVar1;
*param_2 = 0;
param_2[1] = 0;
JS_FreeValueRT(param_1,param_2[3],param_2[4]);
js_free_rt(param_1,param_2);
return;
}
|
|
60,514
|
my_strtoull
|
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
|
static unsigned long long my_strtoull(const char *str, size_t len, const char **end, int *err)
{
unsigned long long val = 0;
const char *p = str;
const char *end_str = p + len;
for (; p < end_str; p++)
{
if (*p < '0' || *p > '9')
break;
if (val > ULONGLONG_MAX /10 || val*10 > ULONGLONG_MAX - (*p - '0'))
{
*err = ERANGE;
break;
}
val = val * 10 + *p -'0';
}
if (p == str)
/* Did not parse anything.*/
*err = ERANGE;
*end = p;
return val;
}
|
O0
|
c
|
my_strtoull:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x3049e
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x30436
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jle 0x30438
jmp 0x3049e
movabsq $0x1999999999999999, %rax # imm = 0x1999999999999999
cmpq %rax, -0x28(%rbp)
ja 0x30469
imulq $0xa, -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movsbl (%rcx), %ecx
subl $0x30, %ecx
movslq %ecx, %rdx
movq $-0x1, %rcx
subq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x30475
movq -0x20(%rbp), %rax
movl $0x22, (%rax)
jmp 0x3049e
imulq $0xa, -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movsbq (%rcx), %rcx
addq %rcx, %rax
subq $0x30, %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x30410
movq -0x30(%rbp), %rax
cmpq -0x8(%rbp), %rax
jne 0x304b2
movq -0x20(%rbp), %rax
movl $0x22, (%rax)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strtoull:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], 0
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
add rax, [rbp+var_10]
mov [rbp+var_38], rax
loc_30410:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb loc_3049E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jl short loc_30436
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
jle short loc_30438
loc_30436:
jmp short loc_3049E
loc_30438:
mov rax, 1999999999999999h
cmp [rbp+var_28], rax
ja short loc_30469
imul rax, [rbp+var_28], 0Ah
mov rcx, [rbp+var_30]
movsx ecx, byte ptr [rcx]
sub ecx, 30h ; '0'
movsxd rdx, ecx
mov rcx, 0FFFFFFFFFFFFFFFFh
sub rcx, rdx
cmp rax, rcx
jbe short loc_30475
loc_30469:
mov rax, [rbp+var_20]
mov dword ptr [rax], 22h ; '"'
jmp short loc_3049E
loc_30475:
imul rax, [rbp+var_28], 0Ah
mov rcx, [rbp+var_30]
movsx rcx, byte ptr [rcx]
add rax, rcx
sub rax, 30h ; '0'
mov [rbp+var_28], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp loc_30410
loc_3049E:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_8]
jnz short loc_304B2
mov rax, [rbp+var_20]
mov dword ptr [rax], 22h ; '"'
loc_304B2:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_28]
pop rbp
retn
|
unsigned long long my_strtoull(char *a1, long long a2, char **a3, _DWORD *a4)
{
char *i; // [rsp+8h] [rbp-30h]
unsigned long long v6; // [rsp+10h] [rbp-28h]
v6 = 0LL;
for ( i = a1; i < &a1[a2] && *i >= 48 && *i <= 57; ++i )
{
if ( v6 > 0x1999999999999999LL || 10 * v6 > -1LL - (*i - 48) )
{
*a4 = 34;
break;
}
v6 = *i + 10 * v6 - 48;
}
if ( i == a1 )
*a4 = 34;
*a3 = i;
return v6;
}
|
my_strtoull:
PUSH RBP
MOV RBP,RSP
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],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
LAB_00130410:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0013049e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JL 0x00130436
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
JLE 0x00130438
LAB_00130436:
JMP 0x0013049e
LAB_00130438:
MOV RAX,0x1999999999999999
CMP qword ptr [RBP + -0x28],RAX
JA 0x00130469
IMUL RAX,qword ptr [RBP + -0x28],0xa
MOV RCX,qword ptr [RBP + -0x30]
MOVSX ECX,byte ptr [RCX]
SUB ECX,0x30
MOVSXD RDX,ECX
MOV RCX,-0x1
SUB RCX,RDX
CMP RAX,RCX
JBE 0x00130475
LAB_00130469:
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x22
JMP 0x0013049e
LAB_00130475:
IMUL RAX,qword ptr [RBP + -0x28],0xa
MOV RCX,qword ptr [RBP + -0x30]
MOVSX RCX,byte ptr [RCX]
ADD RAX,RCX
SUB RAX,0x30
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00130410
LAB_0013049e:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x8]
JNZ 0x001304b2
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x22
LAB_001304b2:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
POP RBP
RET
|
ulong my_strtoull(char *param_1,long param_2,int8 *param_3,int4 *param_4)
{
ulong uVar1;
char *local_38;
ulong local_30;
local_30 = 0;
local_38 = param_1;
while( true ) {
if (((param_1 + param_2 <= local_38) || (*local_38 < '0')) || ('9' < *local_38))
goto LAB_0013049e;
if ((0x1999999999999999 < local_30) ||
(uVar1 = -(long)(*local_38 + -0x30) - 1, uVar1 <= local_30 * 10 && local_30 * 10 - uVar1 != 0
)) break;
local_30 = (local_30 * 10 + (long)*local_38) - 0x30;
local_38 = local_38 + 1;
}
*param_4 = 0x22;
LAB_0013049e:
if (local_38 == param_1) {
*param_4 = 0x22;
}
*param_3 = local_38;
return local_30;
}
|
|
60,515
|
my_strtoull
|
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
|
static unsigned long long my_strtoull(const char *str, size_t len, const char **end, int *err)
{
unsigned long long val = 0;
const char *p = str;
const char *end_str = p + len;
for (; p < end_str; p++)
{
if (*p < '0' || *p > '9')
break;
if (val > ULONGLONG_MAX /10 || val*10 > ULONGLONG_MAX - (*p - '0'))
{
*err = ERANGE;
break;
}
val = val * 10 + *p -'0';
}
if (p == str)
/* Did not parse anything.*/
*err = ERANGE;
*end = p;
return val;
}
|
O3
|
c
|
my_strtoull:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
testq %rsi, %rsi
jle 0x24b0d
addq %rdi, %rsi
xorl %r8d, %r8d
movabsq $0x1999999999999999, %r9 # imm = 0x1999999999999999
xorl %eax, %eax
movsbq (%rdi,%r8), %r10
leal -0x3a(%r10), %r11d
cmpb $-0xa, %r11b
jb 0x24b17
cmpq %r9, %rax
ja 0x24b11
leaq (%rax,%rax), %r11
leaq (%r11,%r11,4), %r11
movl $0x2f, %ebx
subq %r10, %rbx
cmpq %rbx, %r11
ja 0x24b11
leaq (%r11,%r10), %rax
addq $-0x30, %rax
leaq (%rdi,%r8), %r10
incq %r10
incq %r8
cmpq %rsi, %r10
jb 0x24ac8
addq %r8, %rdi
jmp 0x24b25
xorl %eax, %eax
jmp 0x24b1f
movl $0x22, (%rcx)
addq %r8, %rdi
testq %r8, %r8
jne 0x24b25
movl $0x22, (%rcx)
movq %rdi, (%rdx)
popq %rbx
popq %rbp
retq
|
my_strtoull:
push rbp
mov rbp, rsp
push rbx
test rsi, rsi
jle short loc_24B0D
add rsi, rdi
xor r8d, r8d
mov r9, 1999999999999999h
xor eax, eax
loc_24AC8:
movsx r10, byte ptr [rdi+r8]
lea r11d, [r10-3Ah]
cmp r11b, 0F6h
jb short loc_24B17
cmp rax, r9
ja short loc_24B11
lea r11, [rax+rax]
lea r11, [r11+r11*4]
mov ebx, 2Fh ; '/'
sub rbx, r10
cmp r11, rbx
ja short loc_24B11
lea rax, [r11+r10]
add rax, 0FFFFFFFFFFFFFFD0h
lea r10, [rdi+r8]
inc r10
inc r8
cmp r10, rsi
jb short loc_24AC8
add rdi, r8
jmp short loc_24B25
loc_24B0D:
xor eax, eax
jmp short loc_24B1F
loc_24B11:
mov dword ptr [rcx], 22h ; '"'
loc_24B17:
add rdi, r8
test r8, r8
jnz short loc_24B25
loc_24B1F:
mov dword ptr [rcx], 22h ; '"'
loc_24B25:
mov [rdx], rdi
pop rbx
pop rbp
retn
|
unsigned long long my_strtoull(long long a1, long long a2, _QWORD *a3, _DWORD *a4)
{
unsigned long long v4; // rsi
long long v5; // r8
unsigned long long result; // rax
long long v7; // r10
unsigned long long v8; // r10
if ( a2 <= 0 )
{
result = 0LL;
LABEL_11:
*a4 = 34;
goto LABEL_12;
}
v4 = a1 + a2;
v5 = 0LL;
result = 0LL;
while ( 1 )
{
v7 = *(char *)(a1 + v5);
if ( (unsigned __int8)(v7 - 58) < 0xF6u )
break;
if ( result > 0x1999999999999999LL || 10 * result > 47 - v7 )
{
*a4 = 34;
break;
}
result = 10 * result + v7 - 48;
v8 = a1 + v5++ + 1;
if ( v8 >= v4 )
{
a1 += v5;
goto LABEL_12;
}
}
a1 += v5;
if ( !v5 )
goto LABEL_11;
LABEL_12:
*a3 = a1;
return result;
}
|
my_strtoull:
PUSH RBP
MOV RBP,RSP
PUSH RBX
TEST RSI,RSI
JLE 0x00124b0d
ADD RSI,RDI
XOR R8D,R8D
MOV R9,0x1999999999999999
XOR EAX,EAX
LAB_00124ac8:
MOVSX R10,byte ptr [RDI + R8*0x1]
LEA R11D,[R10 + -0x3a]
CMP R11B,0xf6
JC 0x00124b17
CMP RAX,R9
JA 0x00124b11
LEA R11,[RAX + RAX*0x1]
LEA R11,[R11 + R11*0x4]
MOV EBX,0x2f
SUB RBX,R10
CMP R11,RBX
JA 0x00124b11
LEA RAX,[R11 + R10*0x1]
ADD RAX,-0x30
LEA R10,[RDI + R8*0x1]
INC R10
INC R8
CMP R10,RSI
JC 0x00124ac8
ADD RDI,R8
JMP 0x00124b25
LAB_00124b0d:
XOR EAX,EAX
JMP 0x00124b1f
LAB_00124b11:
MOV dword ptr [RCX],0x22
LAB_00124b17:
ADD RDI,R8
TEST R8,R8
JNZ 0x00124b25
LAB_00124b1f:
MOV dword ptr [RCX],0x22
LAB_00124b25:
MOV qword ptr [RDX],RDI
POP RBX
POP RBP
RET
|
ulong my_strtoull(long param_1,long param_2,long *param_3,int4 *param_4)
{
long lVar1;
char cVar2;
ulong uVar3;
long lVar4;
if (param_2 < 1) {
uVar3 = 0;
LAB_00124b1f:
*param_4 = 0x22;
}
else {
lVar4 = 0;
uVar3 = 0;
do {
cVar2 = *(char *)(param_1 + lVar4);
if ((byte)(cVar2 - 0x3aU) < 0xf6) {
LAB_00124b17:
param_1 = param_1 + lVar4;
if (lVar4 == 0) goto LAB_00124b1f;
goto LAB_00124b25;
}
if ((0x1999999999999999 < uVar3) || (0x2fU - (long)cVar2 < uVar3 * 10)) {
*param_4 = 0x22;
goto LAB_00124b17;
}
uVar3 = (uVar3 * 10 + (long)cVar2) - 0x30;
lVar1 = param_1 + lVar4;
lVar4 = lVar4 + 1;
} while (lVar1 + 1U < (ulong)(param_2 + param_1));
param_1 = param_1 + lVar4;
}
LAB_00124b25:
*param_3 = param_1;
return uVar3;
}
|
|
60,516
|
uf_blob
|
eloqsql/storage/myisam/mi_packrec.c
|
static void uf_blob(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
if (get_bit(bit_buff))
bzero((uchar*) to,(end-to));
else
{
ulong length=get_bits(bit_buff,rec->space_length_bits);
uint pack_length=(uint) (end-to)-portable_sizeof_char_ptr;
if (bit_buff->blob_pos+length > bit_buff->blob_end)
{
bit_buff->error=1;
bzero((uchar*) to,(end-to));
return;
}
decode_bytes(rec,bit_buff,bit_buff->blob_pos,bit_buff->blob_pos+length);
_mi_store_blob_length((uchar*) to,pack_length,length);
memcpy(to+pack_length, &bit_buff->blob_pos, sizeof(char*));
bit_buff->blob_pos+=length;
}
}
|
O3
|
c
|
uf_blob:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0x83887
movl (%r15), %r12d
decl %eax
movl %eax, 0x4(%r15)
btl %eax, %r12d
jae 0x838a4
subq %r14, %rbx
jmp 0x83921
movq %r15, %rdi
callq 0x82339
movl $0x1f, 0x4(%r15)
movl (%r15), %r12d
movl $0x1f, %eax
testl %r12d, %r12d
js 0x8387f
movq %r13, %rdx
movl 0x1c(%r13), %r13d
movl %eax, %ecx
subl %r13d, %ecx
movq %rdx, -0x30(%rbp)
jae 0x838f0
subl %eax, %r13d
movl %eax, %eax
leaq 0x5e00e(%rip), %rcx # 0xe18d0
andl (%rcx,%rax,4), %r12d
movl %r13d, %ecx
shll %cl, %r12d
movq %r15, %rdi
callq 0x82339
movl $0x20, %eax
subl %r13d, %eax
movl %eax, 0x4(%r15)
movl (%r15), %eax
negl %r13d
movl %r13d, %ecx
shrl %cl, %eax
addl %eax, %r12d
jmp 0x83905
movl %ecx, 0x4(%r15)
shrl %cl, %r12d
movl 0x1c(%rdx), %eax
leaq 0x5dfcf(%rip), %rcx # 0xe18d0
andl (%rcx,%rax,4), %r12d
movl %r12d, %r13d
subq %r14, %rbx
movq 0x18(%r15), %rdx
leaq (%rdx,%r13), %rcx
cmpq 0x20(%r15), %rcx
jbe 0x8393c
movl $0x1, 0x28(%r15)
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292a0
addl $-0x8, %ebx
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x82c2a
movq %r14, %rdi
movl %ebx, %esi
movl %r13d, %edx
callq 0x79017
movq 0x18(%r15), %rax
movq %rax, (%r14,%rbx)
addq %r13, 0x18(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
uf_blob_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r13, rdi
mov eax, [rsi+4]
test eax, eax
jz short loc_83887
mov r12d, [r15]
dec eax
mov [r15+4], eax
bt r12d, eax
jnb short loc_838A4
loc_8387F:
sub rbx, r14
jmp loc_83921
loc_83887:
mov rdi, r15
call fill_buffer_0
mov dword ptr [r15+4], 1Fh
mov r12d, [r15]
mov eax, 1Fh
test r12d, r12d
js short loc_8387F
loc_838A4:
mov rdx, r13
mov r13d, [r13+1Ch]
mov ecx, eax
sub ecx, r13d
mov [rbp+var_30], rdx
jnb short loc_838F0
sub r13d, eax
mov eax, eax
lea rcx, mask_0
and r12d, [rcx+rax*4]
mov ecx, r13d
shl r12d, cl
mov rdi, r15
call fill_buffer_0
mov eax, 20h ; ' '
sub eax, r13d
mov [r15+4], eax
mov eax, [r15]
neg r13d
mov ecx, r13d
shr eax, cl
add r12d, eax
jmp short loc_83905
loc_838F0:
mov [r15+4], ecx
shr r12d, cl
mov eax, [rdx+1Ch]
lea rcx, mask_0
and r12d, [rcx+rax*4]
loc_83905:
mov r13d, r12d
sub rbx, r14
mov rdx, [r15+18h]
lea rcx, [rdx+r13]
cmp rcx, [r15+20h]
jbe short loc_8393C
mov dword ptr [r15+28h], 1
loc_83921:
mov rdi, r14
xor esi, esi
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
loc_8393C:
add ebx, 0FFFFFFF8h
mov rdi, [rbp+var_30]
mov rsi, r15
call decode_bytes_0
mov rdi, r14
mov esi, ebx
mov edx, r13d
call _mi_store_blob_length
mov rax, [r15+18h]
mov [r14+rbx], rax
add [r15+18h], r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long uf_blob_0(long long a1, long long a2, _BYTE *a3, long long a4)
{
int v6; // eax
unsigned int v7; // r12d
unsigned int v8; // eax
long long v9; // rbx
unsigned int v10; // r13d
int v11; // ecx
int v12; // r13d
int v13; // r12d
unsigned int v14; // r12d
_BYTE *v15; // rdx
_BYTE *v16; // rcx
long long result; // rax
long long v18; // rbx
v6 = *(_DWORD *)(a2 + 4);
if ( v6 )
{
v7 = *(_DWORD *)a2;
v8 = v6 - 1;
*(_DWORD *)(a2 + 4) = v8;
if ( _bittest((const int *)&v7, v8) )
{
LABEL_3:
v9 = a4 - (_QWORD)a3;
return memset(a3, 0LL, v9);
}
}
else
{
fill_buffer_0(a2);
*(_DWORD *)(a2 + 4) = 31;
v7 = *(_DWORD *)a2;
v8 = 31;
if ( *(int *)a2 < 0 )
goto LABEL_3;
}
v10 = *(_DWORD *)(a1 + 28);
v11 = v8 - v10;
if ( v8 >= v10 )
{
*(_DWORD *)(a2 + 4) = v11;
v14 = mask_0[*(unsigned int *)(a1 + 28)] & (v7 >> v11);
}
else
{
v12 = v10 - v8;
v13 = (mask_0[v8] & v7) << v12;
fill_buffer_0(a2);
*(_DWORD *)(a2 + 4) = 32 - v12;
v14 = (*(_DWORD *)a2 >> -(char)v12) + v13;
}
v9 = a4 - (_QWORD)a3;
v15 = *(_BYTE **)(a2 + 24);
v16 = &v15[v14];
if ( (unsigned long long)v16 > *(_QWORD *)(a2 + 32) )
{
*(_DWORD *)(a2 + 40) = 1;
return memset(a3, 0LL, v9);
}
v18 = (unsigned int)(v9 - 8);
decode_bytes_0(a1, a2, v15, v16);
mi_store_blob_length(a3, v18, v14);
result = *(_QWORD *)(a2 + 24);
*(_QWORD *)&a3[v18] = result;
*(_QWORD *)(a2 + 24) += v14;
return result;
}
|
uf_blob:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R13,RDI
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JZ 0x00183887
MOV R12D,dword ptr [R15]
DEC EAX
MOV dword ptr [R15 + 0x4],EAX
BT R12D,EAX
JNC 0x001838a4
LAB_0018387f:
SUB RBX,R14
JMP 0x00183921
LAB_00183887:
MOV RDI,R15
CALL 0x00182339
MOV dword ptr [R15 + 0x4],0x1f
MOV R12D,dword ptr [R15]
MOV EAX,0x1f
TEST R12D,R12D
JS 0x0018387f
LAB_001838a4:
MOV RDX,R13
MOV R13D,dword ptr [R13 + 0x1c]
MOV ECX,EAX
SUB ECX,R13D
MOV qword ptr [RBP + -0x30],RDX
JNC 0x001838f0
SUB R13D,EAX
MOV EAX,EAX
LEA RCX,[0x1e18d0]
AND R12D,dword ptr [RCX + RAX*0x4]
MOV ECX,R13D
SHL R12D,CL
MOV RDI,R15
CALL 0x00182339
MOV EAX,0x20
SUB EAX,R13D
MOV dword ptr [R15 + 0x4],EAX
MOV EAX,dword ptr [R15]
NEG R13D
MOV ECX,R13D
SHR EAX,CL
ADD R12D,EAX
JMP 0x00183905
LAB_001838f0:
MOV dword ptr [R15 + 0x4],ECX
SHR R12D,CL
MOV EAX,dword ptr [RDX + 0x1c]
LEA RCX,[0x1e18d0]
AND R12D,dword ptr [RCX + RAX*0x4]
LAB_00183905:
MOV R13D,R12D
SUB RBX,R14
MOV RDX,qword ptr [R15 + 0x18]
LEA RCX,[RDX + R13*0x1]
CMP RCX,qword ptr [R15 + 0x20]
JBE 0x0018393c
MOV dword ptr [R15 + 0x28],0x1
LAB_00183921:
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292a0
LAB_0018393c:
ADD EBX,-0x8
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R15
CALL 0x00182c2a
MOV RDI,R14
MOV ESI,EBX
MOV EDX,R13D
CALL 0x00179017
MOV RAX,qword ptr [R15 + 0x18]
MOV qword ptr [R14 + RBX*0x1],RAX
ADD qword ptr [R15 + 0x18],R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void uf_blob(long param_1,uint *param_2,void *param_3,long param_4)
{
uint uVar1;
uint uVar2;
uint uVar3;
byte bVar4;
size_t __n;
uint uVar5;
ulong uVar6;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar5 = *param_2;
uVar3 = 0x1f;
if (-1 < (int)uVar5) goto LAB_001838a4;
}
else {
uVar5 = *param_2;
uVar3 = param_2[1] - 1;
param_2[1] = uVar3;
if ((uVar5 >> (uVar3 & 0x1f) & 1) == 0) {
LAB_001838a4:
uVar1 = *(uint *)(param_1 + 0x1c);
if (uVar3 < uVar1) {
uVar2 = (&mask)[uVar3];
bVar4 = (byte)(uVar1 - uVar3);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar1 - uVar3);
uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f));
}
else {
param_2[1] = uVar3 - uVar1;
uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)];
}
uVar6 = (ulong)uVar5;
__n = param_4 - (long)param_3;
if (*(long *)(param_2 + 6) + uVar6 <= *(ulong *)(param_2 + 8)) {
uVar5 = (int)__n - 8;
decode_bytes(param_1,param_2);
_mi_store_blob_length(param_3,uVar5,uVar6);
*(int8 *)((long)param_3 + (ulong)uVar5) = *(int8 *)(param_2 + 6);
*(ulong *)(param_2 + 6) = *(long *)(param_2 + 6) + uVar6;
return;
}
param_2[10] = 1;
goto LAB_00183921;
}
}
__n = param_4 - (long)param_3;
LAB_00183921:
memset(param_3,0,__n);
return;
}
|
|
60,517
|
stbi__YCbCr_to_RGB_simd(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, int, int)
|
monkey531[P]llama/examples/llava/../../common/stb_image.h
|
static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc const *pcb, stbi_uc const *pcr, int count, int step)
{
int i = 0;
#ifdef STBI_SSE2
// step == 3 is pretty ugly on the final interleave, and i'm not convinced
// it's useful in practice (you wouldn't use it for textures, for example).
// so just accelerate step == 4 case.
if (step == 4) {
// this is a fairly straightforward implementation and not super-optimized.
__m128i signflip = _mm_set1_epi8(-0x80);
__m128i cr_const0 = _mm_set1_epi16( (short) ( 1.40200f*4096.0f+0.5f));
__m128i cr_const1 = _mm_set1_epi16( - (short) ( 0.71414f*4096.0f+0.5f));
__m128i cb_const0 = _mm_set1_epi16( - (short) ( 0.34414f*4096.0f+0.5f));
__m128i cb_const1 = _mm_set1_epi16( (short) ( 1.77200f*4096.0f+0.5f));
__m128i y_bias = _mm_set1_epi8((char) (unsigned char) 128);
__m128i xw = _mm_set1_epi16(255); // alpha channel
for (; i+7 < count; i += 8) {
// load
__m128i y_bytes = _mm_loadl_epi64((__m128i *) (y+i));
__m128i cr_bytes = _mm_loadl_epi64((__m128i *) (pcr+i));
__m128i cb_bytes = _mm_loadl_epi64((__m128i *) (pcb+i));
__m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128
__m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128
// unpack to short (and left-shift cr, cb by 8)
__m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes);
__m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased);
__m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased);
// color transform
__m128i yws = _mm_srli_epi16(yw, 4);
__m128i cr0 = _mm_mulhi_epi16(cr_const0, crw);
__m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw);
__m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1);
__m128i cr1 = _mm_mulhi_epi16(crw, cr_const1);
__m128i rws = _mm_add_epi16(cr0, yws);
__m128i gwt = _mm_add_epi16(cb0, yws);
__m128i bws = _mm_add_epi16(yws, cb1);
__m128i gws = _mm_add_epi16(gwt, cr1);
// descale
__m128i rw = _mm_srai_epi16(rws, 4);
__m128i bw = _mm_srai_epi16(bws, 4);
__m128i gw = _mm_srai_epi16(gws, 4);
// back to byte, set up for transpose
__m128i brb = _mm_packus_epi16(rw, bw);
__m128i gxb = _mm_packus_epi16(gw, xw);
// transpose to interleave channels
__m128i t0 = _mm_unpacklo_epi8(brb, gxb);
__m128i t1 = _mm_unpackhi_epi8(brb, gxb);
__m128i o0 = _mm_unpacklo_epi16(t0, t1);
__m128i o1 = _mm_unpackhi_epi16(t0, t1);
// store
_mm_storeu_si128((__m128i *) (out + 0), o0);
_mm_storeu_si128((__m128i *) (out + 16), o1);
out += 32;
}
}
#endif
#ifdef STBI_NEON
// in this version, step=3 support would be easy to add. but is there demand?
if (step == 4) {
// this is a fairly straightforward implementation and not super-optimized.
uint8x8_t signflip = vdup_n_u8(0x80);
int16x8_t cr_const0 = vdupq_n_s16( (short) ( 1.40200f*4096.0f+0.5f));
int16x8_t cr_const1 = vdupq_n_s16( - (short) ( 0.71414f*4096.0f+0.5f));
int16x8_t cb_const0 = vdupq_n_s16( - (short) ( 0.34414f*4096.0f+0.5f));
int16x8_t cb_const1 = vdupq_n_s16( (short) ( 1.77200f*4096.0f+0.5f));
for (; i+7 < count; i += 8) {
// load
uint8x8_t y_bytes = vld1_u8(y + i);
uint8x8_t cr_bytes = vld1_u8(pcr + i);
uint8x8_t cb_bytes = vld1_u8(pcb + i);
int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip));
int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip));
// expand to s16
int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4));
int16x8_t crw = vshll_n_s8(cr_biased, 7);
int16x8_t cbw = vshll_n_s8(cb_biased, 7);
// color transform
int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0);
int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0);
int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1);
int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1);
int16x8_t rws = vaddq_s16(yws, cr0);
int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1);
int16x8_t bws = vaddq_s16(yws, cb1);
// undo scaling, round, convert to byte
uint8x8x4_t o;
o.val[0] = vqrshrun_n_s16(rws, 4);
o.val[1] = vqrshrun_n_s16(gws, 4);
o.val[2] = vqrshrun_n_s16(bws, 4);
o.val[3] = vdup_n_u8(255);
// store, interleaving r/g/b/a
vst4_u8(out, o);
out += 8*4;
}
}
#endif
for (; i < count; ++i) {
int y_fixed = (y[i] << 20) + (1<<19); // rounding
int r,g,b;
int cr = pcr[i] - 128;
int cb = pcb[i] - 128;
r = y_fixed + cr* stbi__float2fixed(1.40200f);
g = y_fixed + cr*-stbi__float2fixed(0.71414f) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000);
b = y_fixed + cb* stbi__float2fixed(1.77200f);
r >>= 20;
g >>= 20;
b >>= 20;
if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; }
if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; }
if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; }
out[0] = (stbi_uc)r;
out[1] = (stbi_uc)g;
out[2] = (stbi_uc)b;
out[3] = 255;
out += step;
}
}
|
O2
|
c
|
stbi__YCbCr_to_RGB_simd(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq %r8d, %rax
xorl %r8d, %r8d
cmpl $0x4, %r9d
jne 0x406d7
movdqa 0x856c8(%rip), %xmm0 # 0xc5cb0
movdqa 0x856d0(%rip), %xmm1 # 0xc5cc0
movdqa 0x856d8(%rip), %xmm2 # 0xc5cd0
movdqa 0x856e0(%rip), %xmm3 # 0xc5ce0
movdqa 0x856e8(%rip), %xmm4 # 0xc5cf0
movdqa 0x856f0(%rip), %xmm5 # 0xc5d00
leaq 0x7(%r8), %r10
cmpq %rax, %r10
jge 0x406d7
movq (%rsi,%r8), %xmm6
movq (%rcx,%r8), %xmm7
movq (%rdx,%r8), %xmm8
movdqa %xmm0, %xmm9
punpcklbw %xmm6, %xmm9 # xmm9 = xmm9[0],xmm6[0],xmm9[1],xmm6[1],xmm9[2],xmm6[2],xmm9[3],xmm6[3],xmm9[4],xmm6[4],xmm9[5],xmm6[5],xmm9[6],xmm6[6],xmm9[7],xmm6[7]
pxor %xmm0, %xmm7
pxor %xmm10, %xmm10
punpcklbw %xmm7, %xmm10 # xmm10 = xmm10[0],xmm7[0],xmm10[1],xmm7[1],xmm10[2],xmm7[2],xmm10[3],xmm7[3],xmm10[4],xmm7[4],xmm10[5],xmm7[5],xmm10[6],xmm7[6],xmm10[7],xmm7[7]
pxor %xmm0, %xmm8
pxor %xmm7, %xmm7
punpcklbw %xmm8, %xmm7 # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1],xmm7[2],xmm8[2],xmm7[3],xmm8[3],xmm7[4],xmm8[4],xmm7[5],xmm8[5],xmm7[6],xmm8[6],xmm7[7],xmm8[7]
psrlw $0x4, %xmm9
movdqa %xmm10, %xmm6
pmulhw %xmm1, %xmm6
movdqa %xmm7, %xmm8
pmulhw %xmm2, %xmm8
pmulhw %xmm3, %xmm7
pmulhw %xmm4, %xmm10
paddw %xmm9, %xmm6
paddw %xmm9, %xmm8
paddw %xmm10, %xmm8
paddw %xmm9, %xmm7
psraw $0x4, %xmm6
psraw $0x4, %xmm7
packuswb %xmm7, %xmm6
psraw $0x4, %xmm8
packuswb %xmm5, %xmm8
movdqa %xmm6, %xmm7
punpcklbw %xmm8, %xmm7 # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1],xmm7[2],xmm8[2],xmm7[3],xmm8[3],xmm7[4],xmm8[4],xmm7[5],xmm8[5],xmm7[6],xmm8[6],xmm7[7],xmm8[7]
punpckhbw %xmm8, %xmm6 # xmm6 = xmm6[8],xmm8[8],xmm6[9],xmm8[9],xmm6[10],xmm8[10],xmm6[11],xmm8[11],xmm6[12],xmm8[12],xmm6[13],xmm8[13],xmm6[14],xmm8[14],xmm6[15],xmm8[15]
movdqa %xmm7, %xmm8
punpcklwd %xmm6, %xmm8 # xmm8 = xmm8[0],xmm6[0],xmm8[1],xmm6[1],xmm8[2],xmm6[2],xmm8[3],xmm6[3]
punpckhwd %xmm6, %xmm7 # xmm7 = xmm7[4],xmm6[4],xmm7[5],xmm6[5],xmm7[6],xmm6[6],xmm7[7],xmm6[7]
movdqu %xmm8, (%rdi)
movdqu %xmm7, 0x10(%rdi)
addq $0x20, %rdi
addq $0x8, %r8
jmp 0x40610
movslq %r9d, %r9
addq $0x3, %rdi
movl $0xff, %ebp
cmpq %rax, %r8
jge 0x407a9
movzbl (%rsi,%r8), %ebx
shll $0x14, %ebx
movzbl (%rcx,%r8), %r14d
addl $-0x80, %r14d
imull $0x166f00, %r14d, %r10d # imm = 0x166F00
leal (%r10,%rbx), %r11d
addl $0x80000, %r11d # imm = 0x80000
sarl $0x14, %r11d
xorl %r10d, %r10d
testl %r11d, %r11d
cmovlel %r10d, %r11d
cmpl %ebp, %r11d
jl 0x40728
movl $0xff, %r11d
movzbl (%rdx,%r8), %r15d
addl $-0x80, %r15d
imull $0xfff49300, %r14d, %r14d # imm = 0xFFF49300
leal (%r14,%rbx), %r12d
addl $0x80000, %r12d # imm = 0x80000
imull $0xfffa7e00, %r15d, %r14d # imm = 0xFFFA7E00
andl $0xffff0000, %r14d # imm = 0xFFFF0000
addl %r12d, %r14d
sarl $0x14, %r14d
testl %r14d, %r14d
jg 0x40760
xorl %r14d, %r14d
cmpl %ebp, %r14d
jl 0x4076b
movl $0xff, %r14d
imull $0x1c5a00, %r15d, %r15d # imm = 0x1C5A00
addl %r15d, %ebx
addl $0x80000, %ebx # imm = 0x80000
sarl $0x14, %ebx
testl %ebx, %ebx
cmovgl %ebx, %r10d
cmpl %ebp, %r10d
jl 0x4078f
movl $0xff, %r10d
movb %r11b, -0x3(%rdi)
movb %r14b, -0x2(%rdi)
movb %r10b, -0x1(%rdi)
movb $-0x1, (%rdi)
incq %r8
addq %r9, %rdi
jmp 0x406e3
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_ZL23stbi__YCbCr_to_RGB_simdPhPKhS1_S1_ii:
push rbp
push r15
push r14
push r12
push rbx
movsxd rax, r8d
xor r8d, r8d
cmp r9d, 4
jnz loc_406D7
movdqa xmm0, cs:xmmword_C5CB0
movdqa xmm1, cs:xmmword_C5CC0
movdqa xmm2, cs:xmmword_C5CD0
movdqa xmm3, cs:xmmword_C5CE0
movdqa xmm4, cs:xmmword_C5CF0
movdqa xmm5, cs:xmmword_C5D00
loc_40610:
lea r10, [r8+7]
cmp r10, rax
jge loc_406D7
movq xmm6, qword ptr [rsi+r8]
movq xmm7, qword ptr [rcx+r8]
movq xmm8, qword ptr [rdx+r8]
movdqa xmm9, xmm0
punpcklbw xmm9, xmm6
pxor xmm7, xmm0
pxor xmm10, xmm10
punpcklbw xmm10, xmm7
pxor xmm8, xmm0
pxor xmm7, xmm7
punpcklbw xmm7, xmm8
psrlw xmm9, 4
movdqa xmm6, xmm10
pmulhw xmm6, xmm1
movdqa xmm8, xmm7
pmulhw xmm8, xmm2
pmulhw xmm7, xmm3
pmulhw xmm10, xmm4
paddw xmm6, xmm9
paddw xmm8, xmm9
paddw xmm8, xmm10
paddw xmm7, xmm9
psraw xmm6, 4
psraw xmm7, 4
packuswb xmm6, xmm7
psraw xmm8, 4
packuswb xmm8, xmm5
movdqa xmm7, xmm6
punpcklbw xmm7, xmm8
punpckhbw xmm6, xmm8
movdqa xmm8, xmm7
punpcklwd xmm8, xmm6
punpckhwd xmm7, xmm6
movdqu xmmword ptr [rdi], xmm8
movdqu xmmword ptr [rdi+10h], xmm7
add rdi, 20h ; ' '
add r8, 8
jmp loc_40610
loc_406D7:
movsxd r9, r9d
add rdi, 3
mov ebp, 0FFh
loc_406E3:
cmp r8, rax
jge loc_407A9
movzx ebx, byte ptr [rsi+r8]
shl ebx, 14h
movzx r14d, byte ptr [rcx+r8]
add r14d, 0FFFFFF80h
imul r10d, r14d, 166F00h
lea r11d, [r10+rbx]
add r11d, 80000h
sar r11d, 14h
xor r10d, r10d
test r11d, r11d
cmovle r11d, r10d
cmp r11d, ebp
jl short loc_40728
mov r11d, 0FFh
loc_40728:
movzx r15d, byte ptr [rdx+r8]
add r15d, 0FFFFFF80h
imul r14d, 0FFF49300h
lea r12d, [r14+rbx]
add r12d, 80000h
imul r14d, r15d, 0FFFA7E00h
and r14d, 0FFFF0000h
add r14d, r12d
sar r14d, 14h
test r14d, r14d
jg short loc_40760
xor r14d, r14d
loc_40760:
cmp r14d, ebp
jl short loc_4076B
mov r14d, 0FFh
loc_4076B:
imul r15d, 1C5A00h
add ebx, r15d
add ebx, 80000h
sar ebx, 14h
test ebx, ebx
cmovg r10d, ebx
cmp r10d, ebp
jl short loc_4078F
mov r10d, 0FFh
loc_4078F:
mov [rdi-3], r11b
mov [rdi-2], r14b
mov [rdi-1], r10b
mov byte ptr [rdi], 0FFh
inc r8
add rdi, r9
jmp loc_406E3
loc_407A9:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long stbi__YCbCr_to_RGB_simd(
__m128i *a1,
const unsigned __int8 *a2,
const unsigned __int8 *a3,
const unsigned __int8 *a4,
int a5,
int a6)
{
long long result; // rax
long long v7; // r8
__m128i si128; // xmm0
__m128i v9; // xmm1
__m128i v10; // xmm2
__m128i v11; // xmm3
__m128i v12; // xmm4
__m128i v13; // xmm5
__m128i v14; // xmm10
__m128i v15; // xmm7
__m128i v16; // xmm9
__m128i v17; // xmm6
__m128i v18; // xmm8
__m128i v19; // xmm7
__m128i v20; // xmm6
unsigned __int8 *v21; // rdi
int v22; // ebx
int v23; // r14d
int v24; // r11d
int v25; // r10d
int v26; // r15d
int v27; // r14d
int v28; // ebx
result = a5;
v7 = 0LL;
if ( a6 == 4 )
{
si128 = _mm_load_si128((const __m128i *)&xmmword_C5CB0);
v9 = _mm_load_si128((const __m128i *)&xmmword_C5CC0);
v10 = _mm_load_si128((const __m128i *)&xmmword_C5CD0);
v11 = _mm_load_si128((const __m128i *)&xmmword_C5CE0);
v12 = _mm_load_si128((const __m128i *)&xmmword_C5CF0);
v13 = _mm_load_si128((const __m128i *)&xmmword_C5D00);
while ( v7 + 7 < result )
{
v14 = _mm_unpacklo_epi8((__m128i)0LL, _mm_xor_si128(_mm_loadl_epi64((const __m128i *)&a4[v7]), si128));
v15 = _mm_unpacklo_epi8((__m128i)0LL, _mm_xor_si128(_mm_loadl_epi64((const __m128i *)&a3[v7]), si128));
v16 = _mm_srli_epi16(_mm_unpacklo_epi8(si128, _mm_loadl_epi64((const __m128i *)&a2[v7])), 4u);
v17 = _mm_packus_epi16(
_mm_srai_epi16(_mm_add_epi16(_mm_mulhi_epi16(v14, v9), v16), 4u),
_mm_srai_epi16(_mm_add_epi16(_mm_mulhi_epi16(v15, v11), v16), 4u));
v18 = _mm_packus_epi16(
_mm_srai_epi16(
_mm_add_epi16(_mm_add_epi16(_mm_mulhi_epi16(v15, v10), v16), _mm_mulhi_epi16(v14, v12)),
4u),
v13);
v19 = _mm_unpacklo_epi8(v17, v18);
v20 = _mm_unpackhi_epi8(v17, v18);
*a1 = _mm_unpacklo_epi16(v19, v20);
a1[1] = _mm_unpackhi_epi16(v19, v20);
a1 += 2;
v7 += 8LL;
}
}
v21 = &a1->m128i_u8[3];
while ( v7 < result )
{
v22 = a2[v7] << 20;
v23 = a4[v7] - 128;
v24 = (1470208 * v23 + v22 + 0x80000) >> 20;
v25 = 0;
if ( v24 <= 0 )
v24 = 0;
if ( v24 >= 255 )
LOBYTE(v24) = -1;
v26 = a3[v7] - 128;
v27 = (int)(-748800 * v23 + v22 + 0x80000 + ((-360960 * v26) & 0xFFFF0000)) >> 20;
if ( v27 <= 0 )
v27 = 0;
if ( v27 >= 255 )
LOBYTE(v27) = -1;
v28 = (1858048 * v26 + v22 + 0x80000) >> 20;
if ( v28 > 0 )
v25 = v28;
if ( v25 >= 255 )
LOBYTE(v25) = -1;
*(v21 - 3) = v24;
*(v21 - 2) = v27;
*(v21 - 1) = v25;
*v21 = -1;
++v7;
v21 += a6;
}
return result;
}
|
stbi__YCbCr_to_RGB_simd:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOVSXD RAX,R8D
XOR R8D,R8D
CMP R9D,0x4
JNZ 0x001406d7
MOVDQA XMM0,xmmword ptr [0x001c5cb0]
MOVDQA XMM1,xmmword ptr [0x001c5cc0]
MOVDQA XMM2,xmmword ptr [0x001c5cd0]
MOVDQA XMM3,xmmword ptr [0x001c5ce0]
MOVDQA XMM4,xmmword ptr [0x001c5cf0]
MOVDQA XMM5,xmmword ptr [0x001c5d00]
LAB_00140610:
LEA R10,[R8 + 0x7]
CMP R10,RAX
JGE 0x001406d7
MOVQ XMM6,qword ptr [RSI + R8*0x1]
MOVQ XMM7,qword ptr [RCX + R8*0x1]
MOVQ XMM8,qword ptr [RDX + R8*0x1]
MOVDQA XMM9,XMM0
PUNPCKLBW XMM9,XMM6
PXOR XMM7,XMM0
PXOR XMM10,XMM10
PUNPCKLBW XMM10,XMM7
PXOR XMM8,XMM0
PXOR XMM7,XMM7
PUNPCKLBW XMM7,XMM8
PSRLW XMM9,0x4
MOVDQA XMM6,XMM10
PMULHW XMM6,XMM1
MOVDQA XMM8,XMM7
PMULHW XMM8,XMM2
PMULHW XMM7,XMM3
PMULHW XMM10,XMM4
PADDW XMM6,XMM9
PADDW XMM8,XMM9
PADDW XMM8,XMM10
PADDW XMM7,XMM9
PSRAW XMM6,0x4
PSRAW XMM7,0x4
PACKUSWB XMM6,XMM7
PSRAW XMM8,0x4
PACKUSWB XMM8,XMM5
MOVDQA XMM7,XMM6
PUNPCKLBW XMM7,XMM8
PUNPCKHBW XMM6,XMM8
MOVDQA XMM8,XMM7
PUNPCKLWD XMM8,XMM6
PUNPCKHWD XMM7,XMM6
MOVDQU xmmword ptr [RDI],XMM8
MOVDQU xmmword ptr [RDI + 0x10],XMM7
ADD RDI,0x20
ADD R8,0x8
JMP 0x00140610
LAB_001406d7:
MOVSXD R9,R9D
ADD RDI,0x3
MOV EBP,0xff
LAB_001406e3:
CMP R8,RAX
JGE 0x001407a9
MOVZX EBX,byte ptr [RSI + R8*0x1]
SHL EBX,0x14
MOVZX R14D,byte ptr [RCX + R8*0x1]
ADD R14D,-0x80
IMUL R10D,R14D,0x166f00
LEA R11D,[R10 + RBX*0x1]
ADD R11D,0x80000
SAR R11D,0x14
XOR R10D,R10D
TEST R11D,R11D
CMOVLE R11D,R10D
CMP R11D,EBP
JL 0x00140728
MOV R11D,0xff
LAB_00140728:
MOVZX R15D,byte ptr [RDX + R8*0x1]
ADD R15D,-0x80
IMUL R14D,R14D,-0xb6d00
LEA R12D,[R14 + RBX*0x1]
ADD R12D,0x80000
IMUL R14D,R15D,-0x58200
AND R14D,0xffff0000
ADD R14D,R12D
SAR R14D,0x14
TEST R14D,R14D
JG 0x00140760
XOR R14D,R14D
LAB_00140760:
CMP R14D,EBP
JL 0x0014076b
MOV R14D,0xff
LAB_0014076b:
IMUL R15D,R15D,0x1c5a00
ADD EBX,R15D
ADD EBX,0x80000
SAR EBX,0x14
TEST EBX,EBX
CMOVG R10D,EBX
CMP R10D,EBP
JL 0x0014078f
MOV R10D,0xff
LAB_0014078f:
MOV byte ptr [RDI + -0x3],R11B
MOV byte ptr [RDI + -0x2],R14B
MOV byte ptr [RDI + -0x1],R10B
MOV byte ptr [RDI],0xff
INC R8
ADD RDI,R9
JMP 0x001406e3
LAB_001407a9:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* stbi__YCbCr_to_RGB_simd(unsigned char*, unsigned char const*, unsigned char const*, unsigned char
const*, int, int) */
void stbi__YCbCr_to_RGB_simd
(uchar *param_1,uchar *param_2,uchar *param_3,uchar *param_4,int param_5,int param_6)
{
char cVar1;
short sVar2;
short sVar3;
short sVar4;
short sVar5;
short sVar6;
short sVar7;
short sVar8;
short sVar9;
short sVar10;
short sVar11;
short sVar12;
short sVar13;
short sVar14;
short sVar15;
short sVar16;
short sVar17;
short sVar18;
short sVar19;
short sVar20;
short sVar21;
short sVar22;
short sVar23;
short sVar24;
int1 auVar25 [16];
int1 auVar26 [16];
int1 auVar27 [14];
int1 auVar28 [12];
unkbyte10 Var29;
int1 auVar30 [14];
int1 auVar31 [12];
unkbyte9 Var32;
int1 auVar33 [12];
int1 auVar34 [12];
int1 auVar35 [12];
int1 auVar36 [12];
int1 auVar37 [12];
int1 auVar38 [12];
int6 uVar39;
int4 uVar40;
int2 uVar41;
int1 auVar42 [16];
int1 auVar43 [16];
int1 auVar44 [16];
int1 auVar45 [16];
int1 auVar46 [16];
short sVar47;
short sVar48;
short sVar49;
short sVar50;
short sVar51;
short sVar52;
short sVar53;
short sVar54;
int iVar55;
uchar *puVar56;
long lVar57;
int iVar58;
int iVar59;
int iVar60;
int2 uVar61;
int1 auVar67 [16];
int1 auVar68 [16];
int1 auVar70 [16];
int1 auVar71 [16];
int1 auVar72 [16];
int1 auVar73 [16];
int1 auVar74 [16];
int1 auVar75 [16];
int1 auVar76 [16];
int1 auVar77 [16];
ushort uVar81;
ushort uVar89;
ushort uVar90;
ushort uVar91;
ushort uVar92;
ushort uVar93;
ushort uVar94;
int1 auVar82 [16];
ushort uVar95;
int1 auVar96 [16];
int4 uVar62;
int6 uVar63;
int8 uVar64;
int1 auVar65 [12];
int1 auVar66 [14];
int1 auVar69 [16];
int1 auVar78 [16];
int1 auVar79 [16];
int1 auVar80 [16];
int1 auVar83 [16];
int1 auVar84 [16];
int1 auVar85 [16];
int1 auVar86 [16];
int1 auVar87 [16];
int1 auVar88 [16];
sVar54 = _UNK_001c5d0e;
sVar53 = _UNK_001c5d0c;
sVar52 = _UNK_001c5d0a;
sVar51 = _UNK_001c5d08;
sVar50 = _UNK_001c5d06;
sVar49 = _UNK_001c5d04;
sVar48 = _UNK_001c5d02;
sVar47 = _DAT_001c5d00;
auVar46 = _DAT_001c5cf0;
auVar45 = _DAT_001c5ce0;
auVar44 = _DAT_001c5cd0;
auVar43 = _DAT_001c5cc0;
auVar42 = _DAT_001c5cb0;
lVar57 = 0;
if (param_6 == 4) {
for (; lVar57 + 7 < (long)param_5; lVar57 = lVar57 + 8) {
uVar64 = *(int8 *)(param_2 + lVar57);
auVar70._8_8_ = 0;
auVar70._0_8_ = *(ulong *)(param_4 + lVar57);
auVar74._8_8_ = 0;
auVar74._0_8_ = *(ulong *)(param_3 + lVar57);
auVar88._0_14_ = auVar42._0_14_;
auVar88[0xe] = auVar42[7];
auVar88[0xf] = (char)((ulong)uVar64 >> 0x38);
auVar87._14_2_ = auVar88._14_2_;
auVar87._0_13_ = auVar42._0_13_;
auVar87[0xd] = (char)((ulong)uVar64 >> 0x30);
auVar86._13_3_ = auVar87._13_3_;
auVar86._0_12_ = auVar42._0_12_;
auVar86[0xc] = auVar42[6];
auVar85._12_4_ = auVar86._12_4_;
auVar85._0_11_ = auVar42._0_11_;
auVar85[0xb] = (char)((ulong)uVar64 >> 0x28);
auVar84._11_5_ = auVar85._11_5_;
auVar84._0_10_ = auVar42._0_10_;
auVar84[10] = auVar42[5];
auVar83._10_6_ = auVar84._10_6_;
auVar83._0_9_ = auVar42._0_9_;
auVar83[9] = (char)((ulong)uVar64 >> 0x20);
auVar82._9_7_ = auVar83._9_7_;
auVar82._0_8_ = auVar42._0_8_;
auVar82[8] = auVar42[4];
Var29 = CONCAT91(CONCAT81(auVar82._8_8_,(char)((ulong)uVar64 >> 0x18)),auVar42[3]);
auVar28._2_10_ = Var29;
auVar28[1] = (char)((ulong)uVar64 >> 0x10);
auVar28[0] = auVar42[2];
auVar27._2_12_ = auVar28;
auVar27[1] = (char)((ulong)uVar64 >> 8);
auVar27[0] = auVar42[1];
auVar70 = auVar70 ^ auVar42;
auVar33[10] = 0;
auVar33._0_10_ = SUB1610((int1 [16])0x0,0);
auVar33[0xb] = auVar70[5];
auVar35[9] = auVar70[4];
auVar35._0_9_ = SUB169((int1 [16])0x0,0);
auVar35._10_2_ = auVar33._10_2_;
auVar37._9_3_ = auVar35._9_3_;
auVar37._0_9_ = (unkuint9)0;
auVar75._1_10_ = SUB1610(ZEXT516(CONCAT41(auVar37._8_4_,auVar70[3])) << 0x38,6);
auVar75[0] = auVar70[2];
auVar75._11_5_ = 0;
auVar67._1_12_ = SUB1612(auVar75 << 0x28,4);
auVar67[0] = auVar70[1];
auVar67._13_3_ = 0;
auVar96._1_14_ = SUB1614(auVar67 << 0x18,2);
auVar96[0] = auVar70[0];
auVar96[0xf] = 0;
auVar74 = auVar74 ^ auVar42;
auVar34[10] = 0;
auVar34._0_10_ = SUB1610((int1 [16])0x0,0);
auVar34[0xb] = auVar74[5];
auVar36[9] = auVar74[4];
auVar36._0_9_ = SUB169((int1 [16])0x0,0);
auVar36._10_2_ = auVar34._10_2_;
auVar38._9_3_ = auVar36._9_3_;
auVar38._0_9_ = (unkuint9)0;
auVar26._1_10_ = SUB1610(ZEXT516(CONCAT41(auVar38._8_4_,auVar74[3])) << 0x38,6);
auVar26[0] = auVar74[2];
auVar26._11_5_ = 0;
auVar25._1_12_ = SUB1612(auVar26 << 0x28,4);
auVar25[0] = auVar74[1];
auVar25._13_3_ = 0;
auVar71._1_14_ = SUB1614(auVar25 << 0x18,2);
auVar71[0] = auVar74[0];
auVar71[0xf] = 0;
uVar81 = CONCAT11((char)uVar64,auVar42[0]) >> 4;
uVar89 = auVar27._0_2_ >> 4;
uVar90 = auVar28._0_2_ >> 4;
uVar91 = (ushort)Var29 >> 4;
uVar92 = auVar82._8_2_ >> 4;
uVar93 = auVar84._10_2_ >> 4;
uVar94 = auVar86._12_2_ >> 4;
uVar95 = auVar87._14_2_ >> 4;
auVar67 = pmulhw(auVar96 << 8,auVar43);
auVar75 = pmulhw(auVar71 << 8,auVar44);
auVar71 = pmulhw(auVar71 << 8,auVar45);
auVar96 = pmulhw(auVar96 << 8,auVar46);
auVar68._0_2_ = auVar67._0_2_ + uVar81;
auVar68._2_2_ = auVar67._2_2_ + uVar89;
auVar68._4_2_ = auVar67._4_2_ + uVar90;
auVar68._6_2_ = auVar67._6_2_ + uVar91;
auVar68._8_2_ = auVar67._8_2_ + uVar92;
auVar68._10_2_ = auVar67._10_2_ + uVar93;
auVar68._12_2_ = auVar67._12_2_ + uVar94;
auVar68._14_2_ = auVar67._14_2_ + uVar95;
auVar76._0_2_ = auVar75._0_2_ + uVar81 + auVar96._0_2_;
auVar76._2_2_ = auVar75._2_2_ + uVar89 + auVar96._2_2_;
auVar76._4_2_ = auVar75._4_2_ + uVar90 + auVar96._4_2_;
auVar76._6_2_ = auVar75._6_2_ + uVar91 + auVar96._6_2_;
auVar76._8_2_ = auVar75._8_2_ + uVar92 + auVar96._8_2_;
auVar76._10_2_ = auVar75._10_2_ + uVar93 + auVar96._10_2_;
auVar76._12_2_ = auVar75._12_2_ + uVar94 + auVar96._12_2_;
auVar76._14_2_ = auVar75._14_2_ + uVar95 + auVar96._14_2_;
auVar72._0_2_ = auVar71._0_2_ + uVar81;
auVar72._2_2_ = auVar71._2_2_ + uVar89;
auVar72._4_2_ = auVar71._4_2_ + uVar90;
auVar72._6_2_ = auVar71._6_2_ + uVar91;
auVar72._8_2_ = auVar71._8_2_ + uVar92;
auVar72._10_2_ = auVar71._10_2_ + uVar93;
auVar72._12_2_ = auVar71._12_2_ + uVar94;
auVar72._14_2_ = auVar71._14_2_ + uVar95;
auVar96 = psraw(auVar68,4);
auVar71 = psraw(auVar72,4);
sVar2 = auVar96._0_2_;
sVar3 = auVar96._2_2_;
sVar5 = auVar96._4_2_;
sVar7 = auVar96._6_2_;
sVar9 = auVar96._8_2_;
sVar11 = auVar96._10_2_;
sVar13 = auVar96._12_2_;
sVar15 = auVar96._14_2_;
cVar1 = (0 < sVar15) * (sVar15 < 0x100) * auVar96[0xe] - (0xff < sVar15);
sVar17 = auVar71._0_2_;
sVar18 = auVar71._2_2_;
sVar19 = auVar71._4_2_;
sVar20 = auVar71._6_2_;
sVar21 = auVar71._8_2_;
sVar22 = auVar71._10_2_;
sVar23 = auVar71._12_2_;
sVar24 = auVar71._14_2_;
auVar67 = psraw(auVar76,4);
sVar15 = auVar67._0_2_;
sVar4 = auVar67._2_2_;
sVar6 = auVar67._4_2_;
sVar8 = auVar67._6_2_;
sVar10 = auVar67._8_2_;
sVar12 = auVar67._10_2_;
sVar14 = auVar67._12_2_;
sVar16 = auVar67._14_2_;
uVar41 = CONCAT11((0 < sVar16) * (sVar16 < 0x100) * auVar67[0xe] - (0xff < sVar16),cVar1);
uVar40 = CONCAT31(CONCAT21(uVar41,(0 < sVar14) * (sVar14 < 0x100) * auVar67[0xc] -
(0xff < sVar14)),
(0 < sVar13) * (sVar13 < 0x100) * auVar96[0xc] - (0xff < sVar13));
uVar39 = CONCAT51(CONCAT41(uVar40,(0 < sVar12) * (sVar12 < 0x100) * auVar67[10] -
(0xff < sVar12)),
(0 < sVar11) * (sVar11 < 0x100) * auVar96[10] - (0xff < sVar11));
Var32 = CONCAT72(CONCAT61(uVar39,(0 < sVar10) * (sVar10 < 0x100) * auVar67[8] -
(0xff < sVar10)),
CONCAT11((0 < sVar9) * (sVar9 < 0x100) * auVar96[8] - (0xff < sVar9),cVar1));
Var29 = CONCAT91(CONCAT81((long)((unkuint9)Var32 >> 8),
(0 < sVar8) * (sVar8 < 0x100) * auVar67[6] - (0xff < sVar8)),
(0 < sVar7) * (sVar7 < 0x100) * auVar96[6] - (0xff < sVar7));
auVar31._2_10_ = Var29;
auVar31[1] = (0 < sVar6) * (sVar6 < 0x100) * auVar67[4] - (0xff < sVar6);
auVar31[0] = (0 < sVar5) * (sVar5 < 0x100) * auVar96[4] - (0xff < sVar5);
auVar30._2_12_ = auVar31;
auVar30[1] = (0 < sVar4) * (sVar4 < 0x100) * auVar67[2] - (0xff < sVar4);
auVar30[0] = (0 < sVar3) * (sVar3 < 0x100) * auVar96[2] - (0xff < sVar3);
auVar73._0_2_ =
CONCAT11((0 < sVar15) * (sVar15 < 0x100) * auVar67[0] - (0xff < sVar15),
(0 < sVar2) * (sVar2 < 0x100) * auVar96[0] - (0xff < sVar2));
auVar73._2_14_ = auVar30;
uVar61 = CONCAT11((0 < sVar47) * (sVar47 < 0x100) * (char)sVar47 - (0xff < sVar47),
(0 < sVar17) * (sVar17 < 0x100) * auVar71[0] - (0xff < sVar17));
uVar62 = CONCAT13((0 < sVar48) * (sVar48 < 0x100) * (char)sVar48 - (0xff < sVar48),
CONCAT12((0 < sVar18) * (sVar18 < 0x100) * auVar71[2] - (0xff < sVar18),
uVar61));
uVar63 = CONCAT15((0 < sVar49) * (sVar49 < 0x100) * (char)sVar49 - (0xff < sVar49),
CONCAT14((0 < sVar19) * (sVar19 < 0x100) * auVar71[4] - (0xff < sVar19),
uVar62));
uVar64 = CONCAT17((0 < sVar50) * (sVar50 < 0x100) * (char)sVar50 - (0xff < sVar50),
CONCAT16((0 < sVar20) * (sVar20 < 0x100) * auVar71[6] - (0xff < sVar20),
uVar63));
auVar65._0_10_ =
CONCAT19((0 < sVar51) * (sVar51 < 0x100) * (char)sVar51 - (0xff < sVar51),
CONCAT18((0 < sVar21) * (sVar21 < 0x100) * auVar71[8] - (0xff < sVar21),uVar64))
;
auVar65[10] = (0 < sVar22) * (sVar22 < 0x100) * auVar71[10] - (0xff < sVar22);
auVar65[0xb] = (0 < sVar52) * (sVar52 < 0x100) * (char)sVar52 - (0xff < sVar52);
auVar66[0xc] = (0 < sVar23) * (sVar23 < 0x100) * auVar71[0xc] - (0xff < sVar23);
auVar66._0_12_ = auVar65;
auVar66[0xd] = (0 < sVar53) * (sVar53 < 0x100) * (char)sVar53 - (0xff < sVar53);
auVar69[0xe] = (0 < sVar24) * (sVar24 < 0x100) * auVar71[0xe] - (0xff < sVar24);
auVar69._0_14_ = auVar66;
auVar69[0xf] = (0 < sVar54) * (sVar54 < 0x100) * (char)sVar54 - (0xff < sVar54);
auVar80._0_12_ = auVar73._0_12_;
auVar80._12_2_ = (short)Var29;
auVar80._14_2_ = (short)((ulong)uVar64 >> 0x30);
auVar79._12_4_ = auVar80._12_4_;
auVar79._0_10_ = auVar73._0_10_;
auVar79._10_2_ = (short)((uint6)uVar63 >> 0x20);
auVar78._10_6_ = auVar79._10_6_;
auVar78._0_8_ = auVar73._0_8_;
auVar78._8_2_ = auVar31._0_2_;
auVar77._8_8_ = auVar78._8_8_;
auVar77._6_2_ = (short)((uint)uVar62 >> 0x10);
auVar77._4_2_ = auVar30._0_2_;
auVar77._2_2_ = uVar61;
auVar77._0_2_ = auVar73._0_2_;
*(int1 (*) [16])param_1 = auVar77;
*(short *)*(int1 (*) [16])((long)param_1 + 0x10) = (short)((unkuint9)Var32 >> 8);
*(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 2) =
(short)((unkuint10)auVar65._0_10_ >> 0x40);
*(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 4) = (short)uVar39;
*(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 6) = auVar65._10_2_;
*(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 8) = (short)uVar40;
*(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 10) = auVar66._12_2_;
*(int2 *)(*(int1 (*) [16])((long)param_1 + 0x10) + 0xc) = uVar41;
*(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 0xe) = auVar69._14_2_;
param_1 = (uchar *)((long)param_1 + 0x20);
}
}
puVar56 = *(int1 (*) [16])param_1 + 3;
for (; lVar57 < param_5; lVar57 = lVar57 + 1) {
iVar58 = (uint)param_2[lVar57] * 0x100000;
iVar59 = (int)((param_4[lVar57] - 0x80) * 0x166f00 + iVar58 + 0x80000) >> 0x14;
if (iVar59 < 1) {
iVar59 = 0;
}
if (0xfe < iVar59) {
iVar59 = 0xff;
}
iVar60 = ((param_3[lVar57] - 0x80) * -0x58200 & 0xffff0000) +
(param_4[lVar57] - 0x80) * -0xb6d00 + iVar58 + 0x80000;
if (iVar60 >> 0x14 < 1) {
iVar60 = 0;
}
iVar60 = iVar60 >> 0x14;
if (0xfe < iVar60) {
iVar60 = 0xff;
}
iVar55 = (int)(iVar58 + (param_3[lVar57] - 0x80) * 0x1c5a00 + 0x80000) >> 0x14;
iVar58 = 0;
if (0 < iVar55) {
iVar58 = iVar55;
}
if (0xfe < iVar58) {
iVar58 = 0xff;
}
puVar56[-3] = (uchar)iVar59;
puVar56[-2] = (uchar)iVar60;
puVar56[-1] = (uchar)iVar58;
*puVar56 = 0xff;
puVar56 = puVar56 + param_6;
}
return;
}
|
|
60,518
|
cleanup_dirname
|
eloqsql/mysys/mf_pack.c
|
size_t cleanup_dirname(register char *to, const char *from)
{
reg5 size_t length;
reg2 char * pos;
reg3 char * from_ptr;
reg4 char * start;
char parent[5], /* for "FN_PARENTDIR" */
buff[FN_REFLEN + 1],*end_parentdir;
#ifdef BACKSLASH_MBTAIL
CHARSET_INFO *fs= fs_character_set();
#endif
DBUG_ENTER("cleanup_dirname");
DBUG_PRINT("enter",("from: '%s'",from));
start=buff;
from_ptr=(char *) from;
#ifdef FN_DEVCHAR
if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0)
{ /* Skip device part */
length=(size_t) (pos-from_ptr)+1;
start=strnmov(buff,from_ptr,length); from_ptr+=length;
}
#endif
parent[0]=FN_LIBCHAR;
length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent);
for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++)
{
#ifdef BACKSLASH_MBTAIL
uint l;
if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2)))
{
for (l-- ; l ; *++pos= *from_ptr++, l--);
start= pos + 1; /* Don't look inside multi-byte char */
continue;
}
#endif
if (*pos == '/')
*pos = FN_LIBCHAR;
if (*pos == FN_LIBCHAR)
{
if ((size_t) (pos-start) > length && memcmp(pos-length,parent,length) == 0)
{ /* If .../../; skip prev */
pos-=length;
if (pos != start)
{ /* not /../ */
pos--;
if (*pos == FN_HOMELIB && (pos == start || pos[-1] == FN_LIBCHAR))
{
if (!home_dir)
{
pos+=length+1; /* Don't unpack ~/.. */
continue;
}
pos=strmov(buff,home_dir)-1; /* Unpacks ~/.. */
if (*pos == FN_LIBCHAR)
pos--; /* home ended with '/' */
}
if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR))
{
if (my_getwd(curr_dir,FN_REFLEN,MYF(0)))
{
pos+=length+1; /* Don't unpack ./.. */
continue;
}
pos=strmov(buff,curr_dir)-1; /* Unpacks ./.. */
if (*pos == FN_LIBCHAR)
pos--; /* home ended with '/' */
}
end_parentdir=pos;
while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */
pos--;
if (pos[1] == FN_HOMELIB ||
(pos >= start && memcmp(pos, parent, length) == 0))
{ /* Don't remove ~user/ */
pos=strmov(end_parentdir+1,parent);
*pos=FN_LIBCHAR;
continue;
}
}
}
else if ((size_t) (pos-start) == length-1 &&
!memcmp(start,parent+1,length-1))
start=pos; /* Starts with "../" */
else if (pos-start > 0 && pos[-1] == FN_LIBCHAR)
{
#ifdef FN_NETWORK_DRIVES
if (pos-start != 1)
#endif
pos--; /* Remove dupplicate '/' */
}
else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR)
pos-=2; /* Skip /./ */
}
}
(void) strmov(to,buff);
DBUG_PRINT("exit",("to: '%s'",to));
DBUG_RETURN((size_t) (pos-buff));
}
|
O0
|
c
|
cleanup_dirname:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp # imm = 0x260
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
jmp 0x2d5e8
leaq -0x210(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x220(%rbp), %rax
movq %rax, -0x238(%rbp)
movb $0x2f, -0xd(%rbp)
leaq -0xd(%rbp), %rdi
addq $0x1, %rdi
leaq 0x4ca93(%rip), %rsi # 0x7a0aa
callq 0x242b0
leaq -0xd(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x228(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x238(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x238(%rbp)
movb (%rax), %al
movq -0x230(%rbp), %rcx
movb %al, (%rcx)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x2da31
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x2d67d
movq -0x230(%rbp), %rax
movb $0x2f, (%rax)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x2da18
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq -0x228(%rbp), %rax
jbe 0x2d934
movq -0x230(%rbp), %rdi
xorl %eax, %eax
subq -0x228(%rbp), %rax
addq %rax, %rdi
leaq -0xd(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x24140
cmpl $0x0, %eax
jne 0x2d934
movq -0x228(%rbp), %rdx
movq -0x230(%rbp), %rax
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0x2d92f
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7e, %eax
jne 0x2d7bf
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0x2d750
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x2d7bf
leaq 0x357301(%rip), %rax # 0x384a58
cmpq $0x0, (%rax)
jne 0x2d77b
movq -0x228(%rbp), %rax
addq $0x1, %rax
addq -0x230(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0x2da1a
leaq -0x210(%rbp), %rdi
leaq 0x3572cf(%rip), %rax # 0x384a58
movq (%rax), %rsi
callq 0x242b0
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x2d7bd
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x2d7bf
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x2d86b
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0x2d7f2
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x2d86b
leaq 0x357277(%rip), %rdi # 0x384a70
movl $0x200, %esi # imm = 0x200
xorl %eax, %eax
movl %eax, %edx
callq 0x2e680
cmpl $0x0, %eax
je 0x2d82a
movq -0x228(%rbp), %rax
addq $0x1, %rax
addq -0x230(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0x2da1a
leaq -0x210(%rbp), %rdi
leaq 0x357238(%rip), %rsi # 0x384a70
callq 0x242b0
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x2d869
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x2d86b
movq -0x230(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0x230(%rbp), %rcx
xorl %eax, %eax
cmpq -0x240(%rbp), %rcx
movb %al, -0x249(%rbp)
jb 0x2d8a7
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
setne %al
movb %al, -0x249(%rbp)
movb -0x249(%rbp), %al
testb $0x1, %al
jne 0x2d8b3
jmp 0x2d8c7
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x2d879
movq -0x230(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x7e, %eax
je 0x2d903
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
jb 0x2d92d
movq -0x230(%rbp), %rdi
leaq -0xd(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x24140
cmpl $0x0, %eax
jne 0x2d92d
movq -0x248(%rbp), %rdi
addq $0x1, %rdi
leaq -0xd(%rbp), %rsi
callq 0x242b0
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movb $0x2f, (%rax)
jmp 0x2da1a
jmp 0x2d92f
jmp 0x2da16
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
movq -0x228(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x2d98c
movq -0x240(%rbp), %rdi
leaq -0xd(%rbp), %rsi
addq $0x1, %rsi
movq -0x228(%rbp), %rdx
subq $0x1, %rdx
callq 0x24140
cmpl $0x0, %eax
jne 0x2d98c
movq -0x230(%rbp), %rax
movq %rax, -0x240(%rbp)
jmp 0x2da14
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq $0x0, %rax
jle 0x2d9c7
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x2d9c7
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x2da12
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0x2da10
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2e, %eax
jne 0x2da10
movq -0x230(%rbp), %rax
movsbl -0x2(%rax), %eax
cmpl $0x2f, %eax
jne 0x2da10
movq -0x230(%rbp), %rax
addq $-0x2, %rax
movq %rax, -0x230(%rbp)
jmp 0x2da12
jmp 0x2da14
jmp 0x2da16
jmp 0x2da18
jmp 0x2da1a
movq -0x230(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x2d638
movq -0x218(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x242b0
jmp 0x2da46
jmp 0x2da48
movq -0x230(%rbp), %rax
leaq -0x210(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x258(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2da82
movq -0x258(%rbp), %rax
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
callq 0x242e0
nopw (%rax,%rax)
|
cleanup_dirname:
push rbp
mov rbp, rsp
sub rsp, 260h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
jmp short $+2
loc_2D5E8:
lea rax, [rbp+var_210]
mov [rbp+var_240], rax
mov rax, [rbp+var_220]
mov [rbp+var_238], rax
mov [rbp+var_D], 2Fh ; '/'
lea rdi, [rbp+var_D]
add rdi, 1
lea rsi, asc_7A0AA; ".."
call _stpcpy
lea rcx, [rbp+var_D]
sub rax, rcx
mov [rbp+var_228], rax
mov rax, [rbp+var_240]
mov [rbp+var_230], rax
loc_2D638:
mov rax, [rbp+var_238]
mov rcx, rax
add rcx, 1
mov [rbp+var_238], rcx
mov al, [rax]
mov rcx, [rbp+var_230]
mov [rcx], al
movsx eax, al
cmp eax, 0
jz loc_2DA31
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_2D67D
mov rax, [rbp+var_230]
mov byte ptr [rax], 2Fh ; '/'
loc_2D67D:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz loc_2DA18
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, [rbp+var_228]
jbe loc_2D934
mov rdi, [rbp+var_230]
xor eax, eax
sub rax, [rbp+var_228]
add rdi, rax
lea rsi, [rbp+var_D]
mov rdx, [rbp+var_228]
call _memcmp
cmp eax, 0
jnz loc_2D934
mov rdx, [rbp+var_228]
mov rax, [rbp+var_230]
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz loc_2D92F
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 7Eh ; '~'
jnz loc_2D7BF
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz short loc_2D750
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_2D7BF
loc_2D750:
lea rax, home_dir
cmp qword ptr [rax], 0
jnz short loc_2D77B
mov rax, [rbp+var_228]
add rax, 1
add rax, [rbp+var_230]
mov [rbp+var_230], rax
jmp loc_2DA1A
loc_2D77B:
lea rdi, [rbp+var_210]
lea rax, home_dir
mov rsi, [rax]
call _stpcpy
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_2D7BD
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
loc_2D7BD:
jmp short $+2
loc_2D7BF:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jnz loc_2D86B
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz short loc_2D7F2
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_2D86B
loc_2D7F2:
lea rdi, curr_dir
mov esi, 200h
xor eax, eax
mov edx, eax
call my_getwd
cmp eax, 0
jz short loc_2D82A
mov rax, [rbp+var_228]
add rax, 1
add rax, [rbp+var_230]
mov [rbp+var_230], rax
jmp loc_2DA1A
loc_2D82A:
lea rdi, [rbp+var_210]
lea rsi, curr_dir
call _stpcpy
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_2D869
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
loc_2D869:
jmp short $+2
loc_2D86B:
mov rax, [rbp+var_230]
mov [rbp+var_248], rax
loc_2D879:
mov rcx, [rbp+var_230]
xor eax, eax
cmp rcx, [rbp+var_240]
mov [rbp+var_249], al
jb short loc_2D8A7
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
setnz al
mov [rbp+var_249], al
loc_2D8A7:
mov al, [rbp+var_249]
test al, 1
jnz short loc_2D8B3
jmp short loc_2D8C7
loc_2D8B3:
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
jmp short loc_2D879
loc_2D8C7:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax+1]
cmp eax, 7Eh ; '~'
jz short loc_2D903
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jb short loc_2D92D
mov rdi, [rbp+var_230]
lea rsi, [rbp+var_D]
mov rdx, [rbp+var_228]
call _memcmp
cmp eax, 0
jnz short loc_2D92D
loc_2D903:
mov rdi, [rbp+var_248]
add rdi, 1
lea rsi, [rbp+var_D]
call _stpcpy
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
mov byte ptr [rax], 2Fh ; '/'
jmp loc_2DA1A
loc_2D92D:
jmp short $+2
loc_2D92F:
jmp loc_2DA16
loc_2D934:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
mov rcx, [rbp+var_228]
sub rcx, 1
cmp rax, rcx
jnz short loc_2D98C
mov rdi, [rbp+var_240]
lea rsi, [rbp+var_D]
add rsi, 1
mov rdx, [rbp+var_228]
sub rdx, 1
call _memcmp
cmp eax, 0
jnz short loc_2D98C
mov rax, [rbp+var_230]
mov [rbp+var_240], rax
jmp loc_2DA14
loc_2D98C:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, 0
jle short loc_2D9C7
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_2D9C7
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
jmp short loc_2DA12
loc_2D9C7:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, 1
jle short loc_2DA10
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Eh ; '.'
jnz short loc_2DA10
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-2]
cmp eax, 2Fh ; '/'
jnz short loc_2DA10
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_230], rax
loc_2DA10:
jmp short $+2
loc_2DA12:
jmp short $+2
loc_2DA14:
jmp short $+2
loc_2DA16:
jmp short $+2
loc_2DA18:
jmp short $+2
loc_2DA1A:
mov rax, [rbp+var_230]
add rax, 1
mov [rbp+var_230], rax
jmp loc_2D638
loc_2DA31:
mov rdi, [rbp+var_218]
lea rsi, [rbp+var_210]
call _stpcpy
jmp short $+2
loc_2DA46:
jmp short $+2
loc_2DA48:
mov rax, [rbp+var_230]
lea rcx, [rbp+var_210]
sub rax, rcx
mov [rbp+var_258], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2DA82
mov rax, [rbp+var_258]
add rsp, 260h
pop rbp
retn
loc_2DA82:
call ___stack_chk_fail
|
long long cleanup_dirname(long long a1, _BYTE *a2)
{
_BYTE *v2; // rax
bool v4; // [rsp+17h] [rbp-249h]
_BYTE *v5; // [rsp+18h] [rbp-248h]
_BYTE *v6; // [rsp+20h] [rbp-240h]
_BYTE *i; // [rsp+30h] [rbp-230h]
unsigned long long v9; // [rsp+38h] [rbp-228h]
long long v10; // [rsp+48h] [rbp-218h]
_BYTE v11[515]; // [rsp+50h] [rbp-210h] BYREF
char v12; // [rsp+253h] [rbp-Dh] BYREF
_BYTE v13[12]; // [rsp+254h] [rbp-Ch] BYREF
*(_QWORD *)&v13[4] = __readfsqword(0x28u);
v10 = a1;
v6 = v11;
v12 = 47;
v9 = stpcpy(v13, "..") - (_QWORD)&v12;
for ( i = v11; ; ++i )
{
v2 = a2++;
LOBYTE(v2) = *v2;
*i = (_BYTE)v2;
if ( !(_BYTE)v2 )
break;
if ( *i == 47 )
*i = 47;
if ( *i == 47 )
{
if ( i - v6 > v9 && !(unsigned int)memcmp(&i[-v9], &v12, v9) )
{
i -= v9;
if ( i != v6 )
{
if ( *--i == 126 && (i == v6 || *(i - 1) == 47) )
{
if ( !home_dir )
{
i += v9 + 1;
continue;
}
i = (_BYTE *)(stpcpy(v11, home_dir) - 1);
if ( *i == 47 )
--i;
}
if ( *i == 46 && (i == v6 || *(i - 1) == 47) )
{
if ( (unsigned int)my_getwd(&curr_dir, 512LL, 0LL) )
{
i += v9 + 1;
continue;
}
i = (_BYTE *)(stpcpy(v11, &curr_dir) - 1);
if ( *i == 47 )
--i;
}
v5 = i;
while ( 1 )
{
v4 = 0;
if ( i >= v6 )
v4 = *i != 47;
if ( !v4 )
break;
--i;
}
if ( i[1] == 126 || i >= v6 && !(unsigned int)memcmp(i, &v12, v9) )
{
i = (_BYTE *)stpcpy(v5 + 1, &v12);
*i = 47;
}
}
}
else if ( i - v6 == v9 - 1 && !(unsigned int)memcmp(v6, v13, v9 - 1) )
{
v6 = i;
}
else if ( i - v6 > 0 && *(i - 1) == 47 )
{
--i;
}
else if ( i - v6 > 1 && *(i - 1) == 46 && *(i - 2) == 47 )
{
i -= 2;
}
}
}
stpcpy(v10, v11);
return i - v11;
}
|
cleanup_dirname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x260
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
JMP 0x0012d5e8
LAB_0012d5e8:
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x240],RAX
MOV RAX,qword ptr [RBP + -0x220]
MOV qword ptr [RBP + -0x238],RAX
MOV byte ptr [RBP + -0xd],0x2f
LEA RDI,[RBP + -0xd]
ADD RDI,0x1
LEA RSI,[0x17a0aa]
CALL 0x001242b0
LEA RCX,[RBP + -0xd]
SUB RAX,RCX
MOV qword ptr [RBP + -0x228],RAX
MOV RAX,qword ptr [RBP + -0x240]
MOV qword ptr [RBP + -0x230],RAX
LAB_0012d638:
MOV RAX,qword ptr [RBP + -0x238]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x238],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x230]
MOV byte ptr [RCX],AL
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0012da31
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0012d67d
MOV RAX,qword ptr [RBP + -0x230]
MOV byte ptr [RAX],0x2f
LAB_0012d67d:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0012da18
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,qword ptr [RBP + -0x228]
JBE 0x0012d934
MOV RDI,qword ptr [RBP + -0x230]
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x228]
ADD RDI,RAX
LEA RSI,[RBP + -0xd]
MOV RDX,qword ptr [RBP + -0x228]
CALL 0x00124140
CMP EAX,0x0
JNZ 0x0012d934
MOV RDX,qword ptr [RBP + -0x228]
MOV RAX,qword ptr [RBP + -0x230]
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x0012d92f
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7e
JNZ 0x0012d7bf
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x0012d750
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x0012d7bf
LAB_0012d750:
LEA RAX,[0x484a58]
CMP qword ptr [RAX],0x0
JNZ 0x0012d77b
MOV RAX,qword ptr [RBP + -0x228]
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x230],RAX
JMP 0x0012da1a
LAB_0012d77b:
LEA RDI,[RBP + -0x210]
LEA RAX,[0x484a58]
MOV RSI,qword ptr [RAX]
CALL 0x001242b0
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0012d7bd
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
LAB_0012d7bd:
JMP 0x0012d7bf
LAB_0012d7bf:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
JNZ 0x0012d86b
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x0012d7f2
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x0012d86b
LAB_0012d7f2:
LEA RDI,[0x484a70]
MOV ESI,0x200
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0012e680
CMP EAX,0x0
JZ 0x0012d82a
MOV RAX,qword ptr [RBP + -0x228]
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x230],RAX
JMP 0x0012da1a
LAB_0012d82a:
LEA RDI,[RBP + -0x210]
LEA RSI,[0x484a70]
CALL 0x001242b0
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0012d869
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
LAB_0012d869:
JMP 0x0012d86b
LAB_0012d86b:
MOV RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x248],RAX
LAB_0012d879:
MOV RCX,qword ptr [RBP + -0x230]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x240]
MOV byte ptr [RBP + -0x249],AL
JC 0x0012d8a7
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
SETNZ AL
MOV byte ptr [RBP + -0x249],AL
LAB_0012d8a7:
MOV AL,byte ptr [RBP + -0x249]
TEST AL,0x1
JNZ 0x0012d8b3
JMP 0x0012d8c7
LAB_0012d8b3:
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x0012d879
LAB_0012d8c7:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x7e
JZ 0x0012d903
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JC 0x0012d92d
MOV RDI,qword ptr [RBP + -0x230]
LEA RSI,[RBP + -0xd]
MOV RDX,qword ptr [RBP + -0x228]
CALL 0x00124140
CMP EAX,0x0
JNZ 0x0012d92d
LAB_0012d903:
MOV RDI,qword ptr [RBP + -0x248]
ADD RDI,0x1
LEA RSI,[RBP + -0xd]
CALL 0x001242b0
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOV byte ptr [RAX],0x2f
JMP 0x0012da1a
LAB_0012d92d:
JMP 0x0012d92f
LAB_0012d92f:
JMP 0x0012da16
LAB_0012d934:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x228]
SUB RCX,0x1
CMP RAX,RCX
JNZ 0x0012d98c
MOV RDI,qword ptr [RBP + -0x240]
LEA RSI,[RBP + -0xd]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x228]
SUB RDX,0x1
CALL 0x00124140
CMP EAX,0x0
JNZ 0x0012d98c
MOV RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x240],RAX
JMP 0x0012da14
LAB_0012d98c:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,0x0
JLE 0x0012d9c7
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x0012d9c7
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x0012da12
LAB_0012d9c7:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,0x1
JLE 0x0012da10
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2e
JNZ 0x0012da10
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x2]
CMP EAX,0x2f
JNZ 0x0012da10
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x2
MOV qword ptr [RBP + -0x230],RAX
LAB_0012da10:
JMP 0x0012da12
LAB_0012da12:
JMP 0x0012da14
LAB_0012da14:
JMP 0x0012da16
LAB_0012da16:
JMP 0x0012da18
LAB_0012da18:
JMP 0x0012da1a
LAB_0012da1a:
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x0012d638
LAB_0012da31:
MOV RDI,qword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x001242b0
JMP 0x0012da46
LAB_0012da46:
JMP 0x0012da48
LAB_0012da48:
MOV RAX,qword ptr [RBP + -0x230]
LEA RCX,[RBP + -0x210]
SUB RAX,RCX
MOV qword ptr [RBP + -0x258],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012da82
MOV RAX,qword ptr [RBP + -0x258]
ADD RSP,0x260
POP RBP
RET
LAB_0012da82:
CALL 0x001242e0
|
long cleanup_dirname(char *param_1,char *param_2)
{
char cVar1;
int iVar2;
char *pcVar3;
ulong __n;
char *pcVar4;
long in_FS_OFFSET;
bool bVar5;
char *local_248;
char *local_240;
char *local_238;
char local_218 [515];
char local_15;
char acStack_14 [4];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_248 = local_218;
local_15 = '/';
pcVar3 = stpcpy(acStack_14,"..");
__n = (long)pcVar3 - (long)&local_15;
local_240 = param_2;
local_238 = local_248;
do {
cVar1 = *local_240;
*local_238 = cVar1;
if (cVar1 == '\0') {
stpcpy(param_1,local_218);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return (long)local_238 - (long)local_218;
}
if (*local_238 == '/') {
*local_238 = '/';
}
if (*local_238 == '/') {
if ((__n < (ulong)((long)local_238 - (long)local_248)) &&
(iVar2 = memcmp(local_238 + -__n,&local_15,__n), iVar2 == 0)) {
local_238 = local_238 + -__n;
if (local_238 != local_248) {
pcVar3 = local_238 + -1;
if ((*pcVar3 == '~') && ((pcVar3 == local_248 || (local_238[-2] == '/')))) {
if (home_dir == (char *)0x0) {
local_238 = pcVar3 + __n + 1;
goto LAB_0012da1a;
}
pcVar4 = stpcpy(local_218,home_dir);
pcVar3 = pcVar4 + -1;
if (pcVar4[-1] == '/') {
pcVar3 = pcVar4 + -2;
}
}
local_238 = pcVar3;
pcVar3 = local_238;
if ((*local_238 == '.') && ((local_238 == local_248 || (local_238[-1] == '/')))) {
iVar2 = my_getwd(&curr_dir,0x200,0);
if (iVar2 != 0) {
local_238 = local_238 + __n + 1;
goto LAB_0012da1a;
}
pcVar4 = stpcpy(local_218,&curr_dir);
local_238 = pcVar4 + -1;
pcVar3 = local_238;
if (*local_238 == '/') {
local_238 = pcVar4 + -2;
pcVar3 = local_238;
}
}
while( true ) {
bVar5 = false;
if (local_248 <= local_238) {
bVar5 = *local_238 != '/';
}
if (!bVar5) break;
local_238 = local_238 + -1;
}
if ((local_238[1] == '~') ||
((local_248 <= local_238 && (iVar2 = memcmp(local_238,&local_15,__n), iVar2 == 0)))) {
local_238 = stpcpy(pcVar3 + 1,&local_15);
*local_238 = '/';
}
}
}
else if (((long)local_238 - (long)local_248 == __n - 1) &&
(iVar2 = memcmp(local_248,acStack_14,__n - 1), iVar2 == 0)) {
local_248 = local_238;
}
else if (((long)local_238 - (long)local_248 < 1) || (local_238[-1] != '/')) {
if ((1 < (long)local_238 - (long)local_248) &&
((local_238[-1] == '.' && (local_238[-2] == '/')))) {
local_238 = local_238 + -2;
}
}
else {
local_238 = local_238 + -1;
}
}
LAB_0012da1a:
local_238 = local_238 + 1;
local_240 = local_240 + 1;
} while( true );
}
|
|
60,519
|
exchange_func
|
bluesky950520[P]quickjs/cutils.c
|
static inline exchange_f exchange_func(const void *base, size_t size) {
switch (((uintptr_t)base | (uintptr_t)size) & 15) {
case 0:
if (size == sizeof(uint64_t) * 2)
return exchange_one_int128;
else
return exchange_int128s;
case 8:
if (size == sizeof(uint64_t))
return exchange_one_int64;
else
return exchange_int64s;
case 4:
case 12:
if (size == sizeof(uint32_t))
return exchange_one_int32;
else
return exchange_int32s;
case 2:
case 6:
case 10:
case 14:
if (size == sizeof(uint16_t))
return exchange_one_int16;
else
return exchange_int16s;
default:
if (size == 1)
return exchange_one_byte;
else
return exchange_bytes;
}
}
|
O2
|
c
|
exchange_func:
orl %esi, %edi
andl $0xf, %edi
cmpl $0xe, %edi
ja 0x16cfd
leaq 0x6c5d8(%rip), %rax # 0x8327c
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpq $0x2, %rsi
leaq 0x287(%rip), %rcx # 0x16f3f
leaq 0x28d(%rip), %rax # 0x16f4c
jmp 0x16d0f
cmpq $0x4, %rsi
leaq 0x24b(%rip), %rcx # 0x16f17
leaq 0x24d(%rip), %rax # 0x16f20
jmp 0x16d0f
cmpq $0x10, %rsi
leaq 0x1c7(%rip), %rcx # 0x16ea7
leaq 0x1d5(%rip), %rax # 0x16ebc
jmp 0x16d0f
cmpq $0x8, %rsi
leaq 0x1f5(%rip), %rcx # 0x16ee9
leaq 0x1fb(%rip), %rax # 0x16ef6
jmp 0x16d0f
cmpq $0x1, %rsi
leaq 0x266(%rip), %rcx # 0x16f6e
leaq 0x268(%rip), %rax # 0x16f77
cmoveq %rcx, %rax
retq
|
exchange_func:
or edi, esi
and edi, 0Fh
cmp edi, 0Eh; switch 15 cases
ja short def_16CAB; jumptable 0000000000016CAB default case, cases 1,3,5,7,9,11,13
lea rax, jpt_16CAB
movsxd rcx, ds:(jpt_16CAB - 8327Ch)[rax+rdi*4]
add rcx, rax
jmp rcx; switch jump
loc_16CAD:
cmp rsi, 2; jumptable 0000000000016CAB cases 2,6,10,14
lea rcx, exchange_one_int16
lea rax, exchange_int16s
jmp short loc_16D0F
loc_16CC1:
cmp rsi, 4; jumptable 0000000000016CAB cases 4,12
lea rcx, exchange_one_int32
lea rax, exchange_int32s
jmp short loc_16D0F
loc_16CD5:
cmp rsi, 10h; jumptable 0000000000016CAB case 0
lea rcx, exchange_one_int128
lea rax, exchange_int128s
jmp short loc_16D0F
loc_16CE9:
cmp rsi, 8; jumptable 0000000000016CAB case 8
lea rcx, exchange_one_int64
lea rax, exchange_int64s
jmp short loc_16D0F
def_16CAB:
cmp rsi, 1; jumptable 0000000000016CAB default case, cases 1,3,5,7,9,11,13
lea rcx, exchange_one_byte
lea rax, exchange_bytes
loc_16D0F:
cmovz rax, rcx
retn
|
long long ( * exchange_func(unsigned __int8 a1, long long a2))()
{
bool v2; // zf
long long ( *v3)(); // rcx
long long ( *result)(); // rax
switch ( ((unsigned __int8)a2 | a1) & 0xF )
{
case 0:
v2 = a2 == 16;
v3 = exchange_one_int128;
result = exchange_int128s;
break;
case 2:
case 6:
case 0xA:
case 0xE:
v2 = a2 == 2;
v3 = exchange_one_int16;
result = exchange_int16s;
break;
case 4:
case 0xC:
v2 = a2 == 4;
v3 = exchange_one_int32;
result = exchange_int32s;
break;
case 8:
v2 = a2 == 8;
v3 = exchange_one_int64;
result = exchange_int64s;
break;
default:
v2 = a2 == 1;
v3 = exchange_one_byte;
result = exchange_bytes;
break;
}
if ( v2 )
return v3;
return result;
}
|
exchange_func:
OR EDI,ESI
AND EDI,0xf
CMP EDI,0xe
JA 0x00116cfd
LEA RAX,[0x18327c]
MOVSXD RCX,dword ptr [RAX + RDI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_2:
CMP RSI,0x2
LEA RCX,[0x116f3f]
LEA RAX,[0x116f4c]
JMP 0x00116d0f
caseD_4:
CMP RSI,0x4
LEA RCX,[0x116f17]
LEA RAX,[0x116f20]
JMP 0x00116d0f
caseD_0:
CMP RSI,0x10
LEA RCX,[0x116ea7]
LEA RAX,[0x116ebc]
JMP 0x00116d0f
caseD_8:
CMP RSI,0x8
LEA RCX,[0x116ee9]
LEA RAX,[0x116ef6]
JMP 0x00116d0f
caseD_1:
CMP RSI,0x1
LEA RCX,[0x116f6e]
LEA RAX,[0x116f77]
LAB_00116d0f:
CMOVZ RAX,RCX
RET
|
code * exchange_func(uint param_1,long param_2)
{
code *pcVar1;
code *pcVar2;
bool bVar3;
switch((param_1 | (uint)param_2) & 0xf) {
case 0:
bVar3 = param_2 == 0x10;
pcVar2 = exchange_one_int128;
pcVar1 = exchange_int128s;
break;
default:
bVar3 = param_2 == 1;
pcVar2 = exchange_one_byte;
pcVar1 = exchange_bytes;
break;
case 2:
case 6:
case 10:
case 0xe:
bVar3 = param_2 == 2;
pcVar2 = exchange_one_int16;
pcVar1 = exchange_int16s;
break;
case 4:
case 0xc:
bVar3 = param_2 == 4;
pcVar2 = exchange_one_int32;
pcVar1 = exchange_int32s;
break;
case 8:
bVar3 = param_2 == 8;
pcVar2 = exchange_one_int64;
pcVar1 = exchange_int64s;
}
if (bVar3) {
pcVar1 = pcVar2;
}
return pcVar1;
}
|
|
60,520
|
get_head_or_tail_page
|
eloqsql/storage/maria/ma_blockrec.c
|
static my_bool get_head_or_tail_page(MARIA_HA *info,
const MARIA_BITMAP_BLOCK *block,
uchar *buff, uint length, uint page_type,
enum pagecache_page_lock lock,
struct st_row_pos_info *res)
{
uint block_size;
MARIA_PINNED_PAGE page_link;
MARIA_SHARE *share= info->s;
DBUG_ENTER("get_head_or_tail_page");
DBUG_PRINT("enter", ("page_type: %u length: %u", page_type, length));
block_size= share->block_size;
if (block->org_bitmap_value == 0) /* Empty block */
{
/* New page */
make_empty_page(info, buff, page_type, 1);
res->buff= buff;
res->empty_space= res->length= (block_size - PAGE_OVERHEAD_SIZE(share));
res->data= (buff + PAGE_HEADER_SIZE(share));
res->dir= res->data + res->length;
res->rownr= 0;
DBUG_ASSERT(length <= res->length);
}
else
{
uchar *dir;
/* Read old page */
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
res->buff= pagecache_read(share->pagecache, &info->dfile,
block->page, 0, 0, share->page_type,
lock, &page_link.link);
page_link.changed= res->buff != 0;
push_dynamic(&info->pinned_pages, (void*) &page_link);
if (!page_link.changed)
{
_ma_set_fatal_error(info, my_errno);
DBUG_RETURN(1);
}
DBUG_ASSERT((uint) (res->buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) ==
page_type);
if (!(dir= find_free_position(info, res->buff, block_size, &res->rownr,
&res->length, &res->empty_space,
page_type == HEAD_PAGE)))
goto crashed;
if (res->length < length)
{
if (res->empty_space + res->length >= length)
{
_ma_compact_block_page(share,
res->buff, res->rownr, 1,
(page_type == HEAD_PAGE ?
info->trn->min_read_from : 0),
(page_type == HEAD_PAGE ?
share->base.min_block_length :
0));
/* All empty space are now after current position */
dir= dir_entry_pos(res->buff, block_size, res->rownr);
res->length= res->empty_space= uint2korr(dir+2);
}
if (res->length < length)
{
DBUG_PRINT("error", ("length: %u res->length: %u empty_space: %u",
length, res->length, res->empty_space));
goto crashed; /* Wrong bitmap information */
}
}
res->dir= dir;
res->data= res->buff + uint2korr(dir);
}
DBUG_RETURN(0);
crashed:
DBUG_ASSERT(!maria_assert_if_crashed_table);
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); /* File crashed */
DBUG_RETURN(1);
}
|
O3
|
c
|
get_head_or_tail_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbx
movl %ecx, %r12d
movq %rdi, %r14
movq (%rdi), %rcx
movl 0x7bc(%rcx), %r13d
cmpb $0x0, 0x15(%rsi)
je 0x63ee9
movl %r8d, -0x2c(%rbp)
leaq -0x58(%rbp), %r15
movl $0x6, 0x8(%r15)
movq 0x600(%rcx), %rdi
leaq 0x470(%r14), %rax
movq (%rsi), %rdx
movq %rcx, -0x38(%rbp)
movl 0x7d4(%rcx), %r9d
movq %rax, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
pushq %r15
pushq $0x4
callq 0x33566
addq $0x10, %rsp
movq %rax, (%rbx)
testq %rax, %rax
setne 0x10(%r15)
leaq 0x2e8(%r14), %rdi
movq %r15, %rsi
callq 0x92af2
cmpb $0x0, 0x10(%r15)
je 0x63f3c
movl %r12d, -0x30(%rbp)
movq (%rbx), %r15
movq (%r14), %rdx
movzbl 0x8(%r15), %r10d
movzbl 0x9(%r15), %ecx
leaq (%r15,%r13), %r12
movzwl 0xa(%r15), %eax
movl %eax, 0x20(%rbx)
cmpl $0xff, %ecx
je 0x63f4b
cmpb %r10b, %cl
jae 0x640c5
leal (,%rcx,4), %esi
movq %r12, %rax
subq %rsi, %rax
movq $-0x8, %rdi
subq %rsi, %rdi
movzbl -0x5(%rax), %eax
movb %al, 0x9(%r15)
cmpq $0xff, %rax
je 0x63ebe
shll $0x2, %eax
movq %r12, %r8
subq %rax, %r8
movb $-0x1, -0x6(%r8)
leaq (%r12,%rdi), %rax
cmpq $-0x9, %rdi
jg 0x63fb2
movzwl 0x4(%r12,%rdi), %r8d
addq $0x4, %rdi
testl %r8d, %r8d
je 0x63ec2
movzwl 0x2(%r12,%rdi), %edi
addl %r8d, %edi
jmp 0x63fbb
movq %rdx, %r15
movq %r14, %rdi
movq %rdx, %rsi
movl %r8d, %edx
movq %rcx, %r14
movl $0x1, %ecx
callq 0x603b2
movq %r15, (%rbx)
subl 0xc18(%r14), %r13d
addl $-0x14, %r13d
movl %r13d, 0x18(%rbx)
movl %r13d, 0x20(%rbx)
movl 0xc18(%r14), %eax
addl $0xc, %eax
addq %r15, %rax
movq %rax, 0x8(%rbx)
addq %rax, %r13
movq %r13, 0x10(%rbx)
movl $0x0, 0x1c(%rbx)
jmp 0x640e4
callq 0xa2a4e
movl (%rax), %esi
movq %r14, %rdi
jmp 0x640cd
cmpl $0xff, %r10d
je 0x640c5
leal -0x4(,%r10,4), %ecx
subq %rcx, %r12
movq (%r14), %rdi
testl %r10d, %r10d
je 0x640f5
leaq -0x8(%r12), %rsi
movzwl -0x8(%r12), %edx
movzwl -0x6(%r12), %ecx
subl %r15d, %esi
leal (%rcx,%rdx), %r8d
addl $0x4, %r8d
cmpl %esi, %r8d
jbe 0x63fed
leal -0x1(%r10), %edx
cmpl $0x1, -0x2c(%rbp)
movq %r10, -0x40(%rbp)
jne 0x63ff1
movq 0x8(%r14), %rax
movq 0x80(%rax), %r8
movl 0x3b8(%rdi), %r9d
jmp 0x63ff7
movl 0xc18(%rdx), %edi
addl $0xc, %edi
movq %r13, %rdx
subq %rsi, %rdx
leaq (%rdx,%r15), %rsi
addq $-0xb, %rsi
movq %rsi, %rdx
cmpb $0x0, -0x1(%rsi)
jne 0x63fdb
leaq -0x4(%rdx), %rsi
cmpb $0x0, (%rdx)
je 0x63fc9
movzwl -0x1(%rdx), %edx
subl %edi, %edx
movw %di, (%rax)
leaq 0x2(%rax), %r12
movl %ecx, %r10d
jmp 0x64049
addl %edx, %ecx
jmp 0x64024
xorl %r8d, %r8d
xorl %r9d, %r9d
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x5d050
movzwl -0x8(%r12), %edx
movzwl -0x6(%r12), %ecx
movzwl 0xa(%r15), %eax
movl %eax, 0x20(%rbx)
cmpl $0x4, %eax
movq -0x40(%rbp), %r10
jb 0x640c5
addl %edx, %ecx
addl $-0x4, %eax
movl %eax, 0x20(%rbx)
leal 0x1(%r10), %eax
movb %al, 0x8(%r15)
leaq -0xc(%r12), %rax
addl %ecx, %r15d
movl %eax, %edx
subl %r15d, %edx
movw %cx, -0xc(%r12)
addq $-0xa, %r12
movw $0x0, (%r12)
movl %r10d, 0x1c(%rbx)
movl %edx, 0x18(%rbx)
movl -0x30(%rbp), %r15d
cmpl %r15d, %edx
jae 0x640d6
movl 0x20(%rbx), %ecx
addl %edx, %ecx
cmpl %r15d, %ecx
jb 0x640c0
movq (%rbx), %rsi
cmpl $0x1, -0x2c(%rbp)
jne 0x6408b
movq 0x8(%r14), %rax
movq 0x80(%rax), %r8
movq -0x38(%rbp), %rdi
movl 0x3b8(%rdi), %r9d
jmp 0x64095
xorl %r8d, %r8d
xorl %r9d, %r9d
movq -0x38(%rbp), %rdi
movl %r10d, %edx
movl $0x1, %ecx
callq 0x5d050
addq (%rbx), %r13
movl 0x1c(%rbx), %eax
shll $0x2, %eax
subq %rax, %r13
movzwl -0x6(%r13), %edx
addq $-0x8, %r13
movl %edx, 0x20(%rbx)
movl %edx, 0x18(%rbx)
movq %r13, %rax
cmpl %r15d, %edx
jae 0x640d6
movq %r14, %rdi
movl $0x7f, %esi
callq 0x37978
movb $0x1, %al
jmp 0x640e6
movq %rax, 0x10(%rbx)
movzwl (%rax), %eax
addq (%rbx), %rax
movq %rax, 0x8(%rbx)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0xc18(%rdi), %ecx
addl $0xc, %ecx
jmp 0x64024
|
get_head_or_tail_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, r9
mov r12d, ecx
mov r14, rdi
mov rcx, [rdi]
mov r13d, [rcx+7BCh]
cmp byte ptr [rsi+15h], 0
jz loc_63EE9
mov [rbp+var_2C], r8d
lea r15, [rbp+var_58]
mov dword ptr [r15+8], 6
mov rdi, [rcx+600h]
lea rax, [r14+470h]
mov rdx, [rsi]
mov [rbp+var_38], rcx
mov r9d, [rcx+7D4h]
mov rsi, rax
xor ecx, ecx
xor r8d, r8d
push r15
push 4
call pagecache_read
add rsp, 10h
mov [rbx], rax
test rax, rax
setnz byte ptr [r15+10h]
lea rdi, [r14+2E8h]
mov rsi, r15
call insert_dynamic
cmp byte ptr [r15+10h], 0
jz loc_63F3C
mov [rbp+var_30], r12d
mov r15, [rbx]
mov rdx, [r14]
movzx r10d, byte ptr [r15+8]
movzx ecx, byte ptr [r15+9]
lea r12, [r15+r13]
movzx eax, word ptr [r15+0Ah]
mov [rbx+20h], eax
cmp ecx, 0FFh
jz loc_63F4B
cmp cl, r10b
jnb loc_640C5
lea esi, ds:0[rcx*4]
mov rax, r12
sub rax, rsi
mov rdi, 0FFFFFFFFFFFFFFF8h
sub rdi, rsi
movzx eax, byte ptr [rax-5]
mov [r15+9], al
cmp rax, 0FFh
jz short loc_63EBE
shl eax, 2
mov r8, r12
sub r8, rax
mov byte ptr [r8-6], 0FFh
loc_63EBE:
lea rax, [r12+rdi]
loc_63EC2:
cmp rdi, 0FFFFFFFFFFFFFFF7h
jg loc_63FB2
movzx r8d, word ptr [r12+rdi+4]
add rdi, 4
test r8d, r8d
jz short loc_63EC2
movzx edi, word ptr [r12+rdi+2]
add edi, r8d
jmp loc_63FBB
loc_63EE9:
mov r15, rdx
mov rdi, r14
mov rsi, rdx
mov edx, r8d
mov r14, rcx
mov ecx, 1
call make_empty_page
mov [rbx], r15
sub r13d, [r14+0C18h]
add r13d, 0FFFFFFECh
mov [rbx+18h], r13d
mov [rbx+20h], r13d
mov eax, [r14+0C18h]
add eax, 0Ch
add rax, r15
mov [rbx+8], rax
add r13, rax
mov [rbx+10h], r13
mov dword ptr [rbx+1Ch], 0
jmp loc_640E4
loc_63F3C:
call _my_thread_var
mov esi, [rax]
mov rdi, r14
jmp loc_640CD
loc_63F4B:
cmp r10d, 0FFh
jz loc_640C5
lea ecx, ds:0FFFFFFFFFFFFFFFCh[r10*4]
sub r12, rcx
mov rdi, [r14]
test r10d, r10d
jz loc_640F5
lea rsi, [r12-8]
movzx edx, word ptr [r12-8]
movzx ecx, word ptr [r12-6]
sub esi, r15d
lea r8d, [rcx+rdx]
add r8d, 4
cmp r8d, esi
jbe short loc_63FED
lea edx, [r10-1]
cmp [rbp+var_2C], 1
mov [rbp+var_40], r10
jnz short loc_63FF1
mov rax, [r14+8]
mov r8, [rax+80h]
mov r9d, [rdi+3B8h]
jmp short loc_63FF7
loc_63FB2:
mov edi, [rdx+0C18h]
add edi, 0Ch
loc_63FBB:
mov rdx, r13
sub rdx, rsi
lea rsi, [rdx+r15]
add rsi, 0FFFFFFFFFFFFFFF5h
loc_63FC9:
mov rdx, rsi
cmp byte ptr [rsi-1], 0
jnz short loc_63FDB
lea rsi, [rdx-4]
cmp byte ptr [rdx], 0
jz short loc_63FC9
loc_63FDB:
movzx edx, word ptr [rdx-1]
sub edx, edi
mov [rax], di
lea r12, [rax+2]
mov r10d, ecx
jmp short loc_64049
loc_63FED:
add ecx, edx
jmp short loc_64024
loc_63FF1:
xor r8d, r8d
xor r9d, r9d
loc_63FF7:
mov rsi, r15
xor ecx, ecx
call _ma_compact_block_page
movzx edx, word ptr [r12-8]
movzx ecx, word ptr [r12-6]
movzx eax, word ptr [r15+0Ah]
mov [rbx+20h], eax
cmp eax, 4
mov r10, [rbp+var_40]
jb loc_640C5
add ecx, edx
loc_64024:
add eax, 0FFFFFFFCh
mov [rbx+20h], eax
lea eax, [r10+1]
mov [r15+8], al
lea rax, [r12-0Ch]
add r15d, ecx
mov edx, eax
sub edx, r15d
mov [r12-0Ch], cx
add r12, 0FFFFFFFFFFFFFFF6h
loc_64049:
mov word ptr [r12], 0
mov [rbx+1Ch], r10d
mov [rbx+18h], edx
mov r15d, [rbp+var_30]
cmp edx, r15d
jnb short loc_640D6
mov ecx, [rbx+20h]
add ecx, edx
cmp ecx, r15d
jb short loc_640C0
mov rsi, [rbx]
cmp [rbp+var_2C], 1
jnz short loc_6408B
mov rax, [r14+8]
mov r8, [rax+80h]
mov rdi, [rbp+var_38]
mov r9d, [rdi+3B8h]
jmp short loc_64095
loc_6408B:
xor r8d, r8d
xor r9d, r9d
mov rdi, [rbp+var_38]
loc_64095:
mov edx, r10d
mov ecx, 1
call _ma_compact_block_page
add r13, [rbx]
mov eax, [rbx+1Ch]
shl eax, 2
sub r13, rax
movzx edx, word ptr [r13-6]
add r13, 0FFFFFFFFFFFFFFF8h
mov [rbx+20h], edx
mov [rbx+18h], edx
mov rax, r13
loc_640C0:
cmp edx, r15d
jnb short loc_640D6
loc_640C5:
mov rdi, r14
mov esi, 7Fh
loc_640CD:
call _ma_set_fatal_error
mov al, 1
jmp short loc_640E6
loc_640D6:
mov [rbx+10h], rax
movzx eax, word ptr [rax]
add rax, [rbx]
mov [rbx+8], rax
loc_640E4:
xor eax, eax
loc_640E6:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_640F5:
mov ecx, [rdi+0C18h]
add ecx, 0Ch
jmp loc_64024
|
char get_head_or_tail_page(long long *a1, long long a2, _BYTE *a3, unsigned int a4, int a5, long long a6)
{
long long v9; // rcx
long long v10; // r13
long long v11; // rdi
long long v12; // rdx
long long v13; // rax
long long v14; // r8
int v15; // r9d
long long v16; // r15
long long v17; // rdx
long long v18; // r10
long long v19; // rcx
long long v20; // r12
unsigned int v21; // eax
long long v22; // rsi
long long v23; // rdi
long long v24; // rax
_WORD *v25; // rax
int v26; // edi
long long v28; // r14
long long v29; // r13
_BYTE *v30; // rax
long long v31; // rsi
long long *v32; // rdi
long long v33; // r12
long long v34; // rdi
int v35; // edx
int v36; // ecx
unsigned long long v37; // r8
unsigned int v38; // r9d
long long v39; // rsi
_BYTE *v40; // rdx
_WORD *v41; // r12
int v42; // ecx
unsigned int v43; // r15d
unsigned long long v44; // r8
long long v45; // rdi
unsigned int v46; // r9d
long long v47; // r13
long long v49; // [rsp+8h] [rbp-58h] BYREF
int v50; // [rsp+10h] [rbp-50h]
bool v51; // [rsp+18h] [rbp-48h]
long long v52; // [rsp+20h] [rbp-40h]
long long v53; // [rsp+28h] [rbp-38h]
unsigned int v54; // [rsp+30h] [rbp-30h]
int v55; // [rsp+34h] [rbp-2Ch]
v9 = *a1;
v10 = *(unsigned int *)(*a1 + 1980);
if ( !*(_BYTE *)(a2 + 21) )
{
v28 = *a1;
make_empty_page((long long)a1, a3, a5, 1);
*(_QWORD *)a6 = a3;
v29 = (unsigned int)(v10 - *(_DWORD *)(v28 + 3096) - 20);
*(_DWORD *)(a6 + 24) = v29;
*(_DWORD *)(a6 + 32) = v29;
v30 = &a3[*(_DWORD *)(v28 + 3096) + 12];
*(_QWORD *)(a6 + 8) = v30;
*(_QWORD *)(a6 + 16) = &v30[v29];
*(_DWORD *)(a6 + 28) = 0;
return 0;
}
v55 = a5;
v50 = 6;
v11 = *(_QWORD *)(v9 + 1536);
v12 = *(_QWORD *)a2;
v53 = v9;
v13 = pagecache_read(v11, (long long)(a1 + 142), v12, 0, 0LL, *(_DWORD *)(v9 + 2004), 4u, &v49);
*(_QWORD *)a6 = v13;
v51 = v13 != 0;
insert_dynamic(a1 + 93, &v49);
if ( !v51 )
{
v31 = *(unsigned int *)my_thread_var(a1 + 93, (const char *)&v49);
v32 = a1;
LABEL_36:
ma_set_fatal_error(v32, v31, v17, v19, v14, v15);
return 1;
}
v54 = a4;
v16 = *(_QWORD *)a6;
v17 = *a1;
v18 = *(unsigned __int8 *)(*(_QWORD *)a6 + 8LL);
v19 = *(unsigned __int8 *)(*(_QWORD *)a6 + 9LL);
v20 = *(_QWORD *)a6 + v10;
v21 = *(unsigned __int16 *)(*(_QWORD *)a6 + 10LL);
*(_DWORD *)(a6 + 32) = v21;
if ( (_DWORD)v19 != 255 )
{
if ( (unsigned __int8)v19 < (unsigned __int8)v18 )
{
v22 = (unsigned int)(4 * v19);
v23 = -8 - v22;
v24 = *(unsigned __int8 *)(v20 - v22 - 5);
*(_BYTE *)(v16 + 9) = v24;
if ( v24 != 255 )
{
v14 = v20 - (unsigned int)(4 * v24);
*(_BYTE *)(v14 - 6) = -1;
}
v25 = (_WORD *)(v20 + v23);
while ( v23 <= -9 )
{
v14 = *(unsigned __int16 *)(v20 + v23 + 4);
v23 += 4LL;
if ( (_DWORD)v14 )
{
v26 = v14 + *(unsigned __int16 *)(v20 + v23 + 2);
goto LABEL_19;
}
}
v26 = *(_DWORD *)(v17 + 3096) + 12;
LABEL_19:
v39 = v10 - v22 + v16 - 11;
do
{
v40 = (_BYTE *)v39;
if ( *(_BYTE *)(v39 - 1) )
break;
v39 -= 4LL;
}
while ( !*v40 );
v17 = (unsigned int)*(unsigned __int16 *)(v40 - 1) - v26;
*v25 = v26;
v41 = v25 + 1;
LODWORD(v18) = v19;
goto LABEL_28;
}
LABEL_35:
v32 = a1;
v31 = 127LL;
goto LABEL_36;
}
if ( (_DWORD)v18 == 255 )
goto LABEL_35;
v33 = v20 - (unsigned int)(4 * v18 - 4);
v34 = *a1;
if ( (_DWORD)v18 )
{
v35 = *(unsigned __int16 *)(v33 - 8);
v36 = *(unsigned __int16 *)(v33 - 6);
v14 = (unsigned int)(v36 + v35 + 4);
if ( (unsigned int)v14 <= (int)v33 - 8 - (int)v16 )
{
v42 = v35 + v36;
}
else
{
v52 = v18;
if ( v55 == 1 )
{
v37 = *(_QWORD *)(a1[1] + 128);
v38 = *(_DWORD *)(v34 + 952);
}
else
{
v37 = 0LL;
v38 = 0;
}
ma_compact_block_page(v34, v16, v18 - 1, 0, v37, v38);
v17 = *(unsigned __int16 *)(v33 - 8);
v19 = *(unsigned __int16 *)(v33 - 6);
v21 = *(unsigned __int16 *)(v16 + 10);
*(_DWORD *)(a6 + 32) = v21;
LODWORD(v18) = v52;
if ( v21 < 4 )
goto LABEL_35;
v42 = v17 + v19;
}
}
else
{
v42 = *(_DWORD *)(v34 + 3096) + 12;
}
*(_DWORD *)(a6 + 32) = v21 - 4;
*(_BYTE *)(v16 + 8) = v18 + 1;
v25 = (_WORD *)(v33 - 12);
v17 = (unsigned int)(v33 - 12 - (v42 + v16));
*(_WORD *)(v33 - 12) = v42;
v41 = (_WORD *)(v33 - 10);
LABEL_28:
*v41 = 0;
*(_DWORD *)(a6 + 28) = v18;
*(_DWORD *)(a6 + 24) = v17;
v43 = v54;
if ( (unsigned int)v17 < v54 )
{
v19 = (unsigned int)(v17 + *(_DWORD *)(a6 + 32));
if ( (unsigned int)v19 >= v54 )
{
if ( v55 == 1 )
{
v44 = *(_QWORD *)(a1[1] + 128);
v45 = v53;
v46 = *(_DWORD *)(v53 + 952);
}
else
{
v44 = 0LL;
v46 = 0;
v45 = v53;
}
ma_compact_block_page(v45, *(_QWORD *)a6, v18, 1, v44, v46);
v47 = *(_QWORD *)a6 + v10 - (unsigned int)(4 * *(_DWORD *)(a6 + 28));
v17 = *(unsigned __int16 *)(v47 - 6);
*(_DWORD *)(a6 + 32) = v17;
*(_DWORD *)(a6 + 24) = v17;
v25 = (_WORD *)(v47 - 8);
}
if ( (unsigned int)v17 < v43 )
goto LABEL_35;
}
*(_QWORD *)(a6 + 16) = v25;
*(_QWORD *)(a6 + 8) = *(_QWORD *)a6 + (unsigned __int16)*v25;
return 0;
}
|
get_head_or_tail_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,R9
MOV R12D,ECX
MOV R14,RDI
MOV RCX,qword ptr [RDI]
MOV R13D,dword ptr [RCX + 0x7bc]
CMP byte ptr [RSI + 0x15],0x0
JZ 0x00163ee9
MOV dword ptr [RBP + -0x2c],R8D
LEA R15,[RBP + -0x58]
MOV dword ptr [R15 + 0x8],0x6
MOV RDI,qword ptr [RCX + 0x600]
LEA RAX,[R14 + 0x470]
MOV RDX,qword ptr [RSI]
MOV qword ptr [RBP + -0x38],RCX
MOV R9D,dword ptr [RCX + 0x7d4]
MOV RSI,RAX
XOR ECX,ECX
XOR R8D,R8D
PUSH R15
PUSH 0x4
CALL 0x00133566
ADD RSP,0x10
MOV qword ptr [RBX],RAX
TEST RAX,RAX
SETNZ byte ptr [R15 + 0x10]
LEA RDI,[R14 + 0x2e8]
MOV RSI,R15
CALL 0x00192af2
CMP byte ptr [R15 + 0x10],0x0
JZ 0x00163f3c
MOV dword ptr [RBP + -0x30],R12D
MOV R15,qword ptr [RBX]
MOV RDX,qword ptr [R14]
MOVZX R10D,byte ptr [R15 + 0x8]
MOVZX ECX,byte ptr [R15 + 0x9]
LEA R12,[R15 + R13*0x1]
MOVZX EAX,word ptr [R15 + 0xa]
MOV dword ptr [RBX + 0x20],EAX
CMP ECX,0xff
JZ 0x00163f4b
CMP CL,R10B
JNC 0x001640c5
LEA ESI,[RCX*0x4]
MOV RAX,R12
SUB RAX,RSI
MOV RDI,-0x8
SUB RDI,RSI
MOVZX EAX,byte ptr [RAX + -0x5]
MOV byte ptr [R15 + 0x9],AL
CMP RAX,0xff
JZ 0x00163ebe
SHL EAX,0x2
MOV R8,R12
SUB R8,RAX
MOV byte ptr [R8 + -0x6],0xff
LAB_00163ebe:
LEA RAX,[R12 + RDI*0x1]
LAB_00163ec2:
CMP RDI,-0x9
JG 0x00163fb2
MOVZX R8D,word ptr [R12 + RDI*0x1 + 0x4]
ADD RDI,0x4
TEST R8D,R8D
JZ 0x00163ec2
MOVZX EDI,word ptr [R12 + RDI*0x1 + 0x2]
ADD EDI,R8D
JMP 0x00163fbb
LAB_00163ee9:
MOV R15,RDX
MOV RDI,R14
MOV RSI,RDX
MOV EDX,R8D
MOV R14,RCX
MOV ECX,0x1
CALL 0x001603b2
MOV qword ptr [RBX],R15
SUB R13D,dword ptr [R14 + 0xc18]
ADD R13D,-0x14
MOV dword ptr [RBX + 0x18],R13D
MOV dword ptr [RBX + 0x20],R13D
MOV EAX,dword ptr [R14 + 0xc18]
ADD EAX,0xc
ADD RAX,R15
MOV qword ptr [RBX + 0x8],RAX
ADD R13,RAX
MOV qword ptr [RBX + 0x10],R13
MOV dword ptr [RBX + 0x1c],0x0
JMP 0x001640e4
LAB_00163f3c:
CALL 0x001a2a4e
MOV ESI,dword ptr [RAX]
MOV RDI,R14
JMP 0x001640cd
LAB_00163f4b:
CMP R10D,0xff
JZ 0x001640c5
LEA ECX,[-0x4 + R10*0x4]
SUB R12,RCX
MOV RDI,qword ptr [R14]
TEST R10D,R10D
JZ 0x001640f5
LEA RSI,[R12 + -0x8]
MOVZX EDX,word ptr [R12 + -0x8]
MOVZX ECX,word ptr [R12 + -0x6]
SUB ESI,R15D
LEA R8D,[RCX + RDX*0x1]
ADD R8D,0x4
CMP R8D,ESI
JBE 0x00163fed
LEA EDX,[R10 + -0x1]
CMP dword ptr [RBP + -0x2c],0x1
MOV qword ptr [RBP + -0x40],R10
JNZ 0x00163ff1
MOV RAX,qword ptr [R14 + 0x8]
MOV R8,qword ptr [RAX + 0x80]
MOV R9D,dword ptr [RDI + 0x3b8]
JMP 0x00163ff7
LAB_00163fb2:
MOV EDI,dword ptr [RDX + 0xc18]
ADD EDI,0xc
LAB_00163fbb:
MOV RDX,R13
SUB RDX,RSI
LEA RSI,[RDX + R15*0x1]
ADD RSI,-0xb
LAB_00163fc9:
MOV RDX,RSI
CMP byte ptr [RSI + -0x1],0x0
JNZ 0x00163fdb
LEA RSI,[RDX + -0x4]
CMP byte ptr [RDX],0x0
JZ 0x00163fc9
LAB_00163fdb:
MOVZX EDX,word ptr [RDX + -0x1]
SUB EDX,EDI
MOV word ptr [RAX],DI
LEA R12,[RAX + 0x2]
MOV R10D,ECX
JMP 0x00164049
LAB_00163fed:
ADD ECX,EDX
JMP 0x00164024
LAB_00163ff1:
XOR R8D,R8D
XOR R9D,R9D
LAB_00163ff7:
MOV RSI,R15
XOR ECX,ECX
CALL 0x0015d050
MOVZX EDX,word ptr [R12 + -0x8]
MOVZX ECX,word ptr [R12 + -0x6]
MOVZX EAX,word ptr [R15 + 0xa]
MOV dword ptr [RBX + 0x20],EAX
CMP EAX,0x4
MOV R10,qword ptr [RBP + -0x40]
JC 0x001640c5
ADD ECX,EDX
LAB_00164024:
ADD EAX,-0x4
MOV dword ptr [RBX + 0x20],EAX
LEA EAX,[R10 + 0x1]
MOV byte ptr [R15 + 0x8],AL
LEA RAX,[R12 + -0xc]
ADD R15D,ECX
MOV EDX,EAX
SUB EDX,R15D
MOV word ptr [R12 + -0xc],CX
ADD R12,-0xa
LAB_00164049:
MOV word ptr [R12],0x0
MOV dword ptr [RBX + 0x1c],R10D
MOV dword ptr [RBX + 0x18],EDX
MOV R15D,dword ptr [RBP + -0x30]
CMP EDX,R15D
JNC 0x001640d6
MOV ECX,dword ptr [RBX + 0x20]
ADD ECX,EDX
CMP ECX,R15D
JC 0x001640c0
MOV RSI,qword ptr [RBX]
CMP dword ptr [RBP + -0x2c],0x1
JNZ 0x0016408b
MOV RAX,qword ptr [R14 + 0x8]
MOV R8,qword ptr [RAX + 0x80]
MOV RDI,qword ptr [RBP + -0x38]
MOV R9D,dword ptr [RDI + 0x3b8]
JMP 0x00164095
LAB_0016408b:
XOR R8D,R8D
XOR R9D,R9D
MOV RDI,qword ptr [RBP + -0x38]
LAB_00164095:
MOV EDX,R10D
MOV ECX,0x1
CALL 0x0015d050
ADD R13,qword ptr [RBX]
MOV EAX,dword ptr [RBX + 0x1c]
SHL EAX,0x2
SUB R13,RAX
MOVZX EDX,word ptr [R13 + -0x6]
ADD R13,-0x8
MOV dword ptr [RBX + 0x20],EDX
MOV dword ptr [RBX + 0x18],EDX
MOV RAX,R13
LAB_001640c0:
CMP EDX,R15D
JNC 0x001640d6
LAB_001640c5:
MOV RDI,R14
MOV ESI,0x7f
LAB_001640cd:
CALL 0x00137978
MOV AL,0x1
JMP 0x001640e6
LAB_001640d6:
MOV qword ptr [RBX + 0x10],RAX
MOVZX EAX,word ptr [RAX]
ADD RAX,qword ptr [RBX]
MOV qword ptr [RBX + 0x8],RAX
LAB_001640e4:
XOR EAX,EAX
LAB_001640e6:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001640f5:
MOV ECX,dword ptr [RDI + 0xc18]
ADD ECX,0xc
JMP 0x00164024
|
int8
get_head_or_tail_page
(long *param_1,int8 *param_2,long param_3,uint param_4,int param_5,long *param_6)
{
byte bVar1;
byte bVar2;
ushort uVar3;
ushort uVar4;
ushort uVar5;
long lVar6;
long lVar7;
uint uVar8;
char *pcVar9;
long lVar10;
int4 *puVar11;
int8 uVar12;
uint uVar13;
int4 uVar14;
ulong uVar15;
char *pcVar16;
int iVar17;
long lVar18;
ushort *puVar19;
uint uVar20;
ulong uVar21;
ushort *puVar22;
int1 local_60 [8];
int4 local_58;
char local_50;
ulong local_48;
long local_40;
uint local_38;
int local_34;
lVar10 = *param_1;
uVar20 = *(uint *)(lVar10 + 0x7bc);
uVar21 = (ulong)uVar20;
if (*(char *)((long)param_2 + 0x15) == '\0') {
make_empty_page(param_1,param_3,param_5,1);
*param_6 = param_3;
uVar20 = (uVar20 - *(int *)(lVar10 + 0xc18)) - 0x14;
*(uint *)(param_6 + 3) = uVar20;
*(uint *)(param_6 + 4) = uVar20;
param_3 = (ulong)(*(int *)(lVar10 + 0xc18) + 0xc) + param_3;
param_6[1] = param_3;
param_6[2] = (ulong)uVar20 + param_3;
*(int4 *)((long)param_6 + 0x1c) = 0;
LAB_001640e4:
uVar12 = 0;
}
else {
local_58 = 6;
local_40 = lVar10;
local_34 = param_5;
lVar10 = pagecache_read(*(int8 *)(lVar10 + 0x600),param_1 + 0x8e,*param_2,0,0,
*(int4 *)(lVar10 + 0x7d4),4,local_60);
*param_6 = lVar10;
local_50 = lVar10 != 0;
insert_dynamic(param_1 + 0x5d,local_60);
if (local_50 == '\0') {
puVar11 = (int4 *)_my_thread_var();
uVar14 = *puVar11;
}
else {
lVar6 = *param_6;
lVar7 = *param_1;
bVar1 = *(byte *)(lVar6 + 8);
bVar2 = *(byte *)(lVar6 + 9);
lVar10 = lVar6 + uVar21;
uVar13 = (uint)*(ushort *)(lVar6 + 10);
*(uint *)(param_6 + 4) = (uint)*(ushort *)(lVar6 + 10);
uVar20 = (uint)bVar2;
local_38 = param_4;
if (uVar20 == 0xff) {
if (bVar1 != 0xff) {
lVar10 = lVar10 - (ulong)((uint)bVar1 * 4 - 4);
lVar7 = *param_1;
uVar20 = (uint)bVar1;
if (bVar1 == 0) {
iVar17 = *(int *)(lVar7 + 0xc18) + 0xc;
}
else if ((uint)(((int)lVar10 + -8) - (int)lVar6) <
(uint)*(ushort *)(lVar10 + -6) + (uint)*(ushort *)(lVar10 + -8) + 4) {
if (local_34 == 1) {
uVar12 = *(int8 *)(param_1[1] + 0x80);
uVar14 = *(int4 *)(lVar7 + 0x3b8);
}
else {
uVar12 = 0;
uVar14 = 0;
}
local_48 = (ulong)bVar1;
_ma_compact_block_page(lVar7,lVar6,bVar1 - 1,0,uVar12,uVar14);
uVar3 = *(ushort *)(lVar10 + -8);
uVar4 = *(ushort *)(lVar10 + -6);
uVar5 = *(ushort *)(lVar6 + 10);
uVar13 = (uint)uVar5;
*(uint *)(param_6 + 4) = (uint)uVar5;
if (uVar5 < 4) goto LAB_001640c5;
iVar17 = (uint)uVar4 + (uint)uVar3;
uVar20 = (uint)local_48;
}
else {
iVar17 = (uint)*(ushort *)(lVar10 + -6) + (uint)*(ushort *)(lVar10 + -8);
}
*(uint *)(param_6 + 4) = uVar13 - 4;
*(char *)(lVar6 + 8) = (char)uVar20 + '\x01';
puVar22 = (ushort *)(lVar10 + -0xc);
uVar13 = (int)puVar22 - ((int)lVar6 + iVar17);
*(short *)(lVar10 + -0xc) = (short)iVar17;
puVar19 = (ushort *)(lVar10 + -10);
goto LAB_00164049;
}
}
else if (bVar2 < bVar1) {
uVar15 = (ulong)((uint)bVar2 * 4);
lVar18 = -8 - uVar15;
bVar1 = *(byte *)((lVar10 - uVar15) + -5);
*(byte *)(lVar6 + 9) = bVar1;
if (bVar1 != 0xff) {
*(int1 *)(lVar10 + (ulong)bVar1 * -4 + -6) = 0xff;
}
puVar22 = (ushort *)(lVar10 + lVar18);
do {
if (-9 < lVar18) {
iVar17 = *(int *)(lVar7 + 0xc18) + 0xc;
goto LAB_00163fbb;
}
uVar3 = *(ushort *)(lVar10 + 4 + lVar18);
lVar18 = lVar18 + 4;
} while (uVar3 == 0);
iVar17 = (uint)*(ushort *)(lVar10 + 2 + lVar18) + (uint)uVar3;
LAB_00163fbb:
pcVar9 = (char *)((uVar21 - uVar15) + lVar6 + -0xb);
do {
pcVar16 = pcVar9;
if (pcVar16[-1] != '\0') break;
pcVar9 = pcVar16 + -4;
} while (*pcVar16 == '\0');
uVar13 = (uint)*(ushort *)(pcVar16 + -1) - iVar17;
*puVar22 = (ushort)iVar17;
puVar19 = puVar22 + 1;
LAB_00164049:
uVar8 = local_38;
*puVar19 = 0;
*(uint *)((long)param_6 + 0x1c) = uVar20;
*(uint *)(param_6 + 3) = uVar13;
if (uVar13 < local_38) {
if (local_38 <= (int)param_6[4] + uVar13) {
if (local_34 == 1) {
uVar12 = *(int8 *)(param_1[1] + 0x80);
uVar14 = *(int4 *)(local_40 + 0x3b8);
}
else {
uVar12 = 0;
uVar14 = 0;
}
_ma_compact_block_page(local_40,*param_6,uVar20,1,uVar12,uVar14);
lVar10 = (uVar21 + *param_6) - (ulong)(uint)(*(int *)((long)param_6 + 0x1c) << 2);
uVar3 = *(ushort *)(lVar10 + -6);
uVar13 = (uint)uVar3;
puVar22 = (ushort *)(lVar10 + -8);
*(uint *)(param_6 + 4) = (uint)uVar3;
*(uint *)(param_6 + 3) = (uint)uVar3;
}
if (uVar13 < uVar8) goto LAB_001640c5;
}
param_6[2] = (long)puVar22;
param_6[1] = (ulong)*puVar22 + *param_6;
goto LAB_001640e4;
}
LAB_001640c5:
uVar14 = 0x7f;
}
_ma_set_fatal_error(param_1,uVar14);
uVar12 = 1;
}
return uVar12;
}
|
|
60,521
|
minja::Value::insert(unsigned long, minja::Value const&)
|
monkey531[P]llama/common/minja.hpp
|
void insert(size_t index, const Value& v) {
if (!array_)
throw std::runtime_error("Value is not an array: " + dump());
array_->insert(array_->begin() + index, v);
}
|
O2
|
cpp
|
minja::Value::insert(unsigned long, minja::Value const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x5fc6c
imulq $0x50, %rsi, %rsi
addq (%rdi), %rsi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x60d00
pushq $0x10
popq %rdi
callq 0x223e0
movq %rax, %rbx
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x4dcc6
leaq 0x3f8a3(%rip), %rsi # 0x9f531
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x3a58f
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x22c80
xorl %ebp, %ebp
movq 0x8333c(%rip), %rsi # 0xe2ff0
movq 0x832ad(%rip), %rdx # 0xe2f68
movq %rbx, %rdi
callq 0x22d40
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x22f98
jmp 0x5fcd8
movq %rax, %r14
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x22f98
testb %bpl, %bpl
jne 0x5fcea
jmp 0x5fcf2
movq %rax, %r14
movq %rbx, %rdi
callq 0x225c0
movq %r14, %rdi
callq 0x22da0
|
_ZN5minja5Value6insertEmRKS0_:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
mov rdi, [rdi+10h]
test rdi, rdi
jz short loc_5FC6C
imul rsi, 50h ; 'P'
add rsi, [rdi]
add rsp, 40h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN5minja5ValueESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_; std::vector<minja::Value>::insert(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>,minja::Value const&)
loc_5FC6C:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr; "Value is not an array: "
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+58h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_5FCD8
mov r14, rax
mov bpl, 1
loc_5FCD8:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_5FCEA
jmp short loc_5FCF2
mov r14, rax
loc_5FCEA:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_5FCF2:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::insert(minja::Value *this, long long a2, const minja::Value *a3)
{
_QWORD *v4; // rdi
void *exception; // rbx
_BYTE v7[32]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v8[56]; // [rsp+20h] [rbp-38h] BYREF
v4 = (_QWORD *)*((_QWORD *)this + 2);
if ( !v4 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v7, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v8, (long long)"Value is not an array: ", (long long)v7);
std::runtime_error::runtime_error(exception, v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return std::vector<minja::Value>::insert(v4, *v4 + 80 * a2, a3);
}
|
insert:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x10]
TEST RDI,RDI
JZ 0x0015fc6c
IMUL RSI,RSI,0x50
ADD RSI,qword ptr [RDI]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
JMP 0x00160d00
LAB_0015fc6c:
PUSH 0x10
POP RDI
CALL 0x001223e0
MOV RBX,RAX
LAB_0015fc77:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0014dcc6
LAB_0015fc87:
LEA RSI,[0x19f531]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0013a58f
MOV BPL,0x1
LAB_0015fc9e:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00122c80
XOR EBP,EBP
MOV RSI,qword ptr [0x001e2ff0]
MOV RDX,qword ptr [0x001e2f68]
MOV RDI,RBX
CALL 0x00122d40
|
/* minja::Value::insert(unsigned long, minja::Value const&) */
void minja::Value::insert(ulong param_1,Value *param_2)
{
vector<minja::Value,std::allocator<minja::Value>> *pvVar1;
runtime_error *this;
int1 auStack_58 [32];
string local_38 [32];
pvVar1 = *(vector<minja::Value,std::allocator<minja::Value>> **)(param_1 + 0x10);
if (pvVar1 != (vector<minja::Value,std::allocator<minja::Value>> *)0x0) {
std::vector<minja::Value,std::allocator<minja::Value>>::insert
(pvVar1,(long)param_2 * 0x50 + *(long *)pvVar1);
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015fc77 to 0015fc86 has its CatchHandler @ 0015fce7 */
dump_abi_cxx11_((int)auStack_58,SUB81(param_1,0));
/* try { // try from 0015fc87 to 0015fc9a has its CatchHandler @ 0015fcd2 */
std::operator+((char *)local_38,(string *)"Value is not an array: ");
/* try { // try from 0015fc9e to 0015fcc2 has its CatchHandler @ 0015fcc3 */
std::runtime_error::runtime_error(this,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001e2ff0,PTR__runtime_error_001e2f68);
}
|
|
60,522
|
void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<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>&, 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>::array_t&&)
|
monkey531[P]llama/common/json.hpp
|
static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr)
{
j.m_data.m_value.destroy(j.m_data.m_type);
j.m_data.m_type = value_t::array;
j.m_data.m_value = std::move(arr);
j.set_parents();
j.assert_invariant();
}
|
O1
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<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>&, 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>::array_t&&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
movzbl (%r14), %esi
callq 0x5cbfa
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x1a870
movups (%rbx), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x56f38
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE2EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_ONSJ_7array_tE:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
add rdi, 8
movzx esi, byte ptr [r14]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE; 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>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t)
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
movups xmm0, xmmword ptr [rbx]
movups xmmword ptr [rax], xmm0
mov rcx, [rbx+10h]
mov [rax+10h], rcx
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
add rsp, 8
pop rbx
pop r14
jmp _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)
|
long long nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<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>>(
unsigned __int8 *a1,
long long a2)
{
long long result; // rax
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>::json_value::destroy(
(long long **)a1 + 1,
*a1);
*a1 = 2;
result = operator new(0x18uLL);
*(_OWORD *)result = *(_OWORD *)a2;
*(_QWORD *)(result + 16) = *(_QWORD *)(a2 + 16);
*(_OWORD *)a2 = 0LL;
*(_QWORD *)(a2 + 16) = 0LL;
*((_QWORD *)a1 + 1) = result;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
return result;
}
|
construct<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 R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
ADD RDI,0x8
MOVZX ESI,byte ptr [R14]
CALL 0x0015cbfa
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x0011a870
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS xmmword ptr [RAX],XMM0
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00156f38
|
/* void
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<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>&, 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>::array_t&&) */
void nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::
construct<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,array_t *param_2)
{
int8 uVar1;
int8 *puVar2;
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>
::json_value::destroy((json_value *)(param_1 + 8),*param_1);
*param_1 = (basic_json)0x2;
puVar2 = (int8 *)operator_new(0x18);
uVar1 = *(int8 *)(param_2 + 8);
*puVar2 = *(int8 *)param_2;
puVar2[1] = uVar1;
puVar2[2] = *(int8 *)(param_2 + 0x10);
*(int8 *)param_2 = 0;
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(param_2 + 0x10) = 0;
*(int8 **)(param_1 + 8) = puVar2;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(param_1,0));
return;
}
|
|
60,523
|
Generator::gen_if_pred(NodeIfPred const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::PredVisitor::operator()(NodeIfPredElif const*) const
|
BhuvanGudi[P]LexiParse/src/generation.hpp
|
void operator()(const NodeIfPredElif* elif) const
{
gen.m_output << " ;; elif\n";
gen.gen_expr(elif->expr);
gen.pop("rax");
const std::string label = gen.create_label();
gen.m_output << " test rax, rax\n";
gen.m_output << " jz " << label << "\n";
gen.gen_scope(elif->scope);
gen.m_output << " jmp " << end_label << "\n";
if (elif->pred.has_value()) {
gen.m_output << label << ":\n";
gen.gen_if_pred(elif->pred.value(), end_label);
}
}
|
O0
|
cpp
|
Generator::gen_if_pred(NodeIfPred const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::PredVisitor::operator()(NodeIfPredElif const*) const:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq (%rax), %rdi
addq $0x28, %rdi
leaq 0x1d40(%rip), %rsi # 0x17579
callq 0x31c0
movq -0x80(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x114c0
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x78(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x32e0
movq -0x70(%rbp), %rdx
leaq 0x1be5(%rip), %rsi # 0x17459
leaq -0x30(%rbp), %rdi
callq 0x90b0
jmp 0x1587f
movq -0x78(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x114f0
jmp 0x1588e
leaq -0x30(%rbp), %rdi
callq 0x3bd0
leaq -0x31(%rbp), %rdi
callq 0x3220
movq -0x80(%rbp), %rax
movq (%rax), %rsi
leaq -0x68(%rbp), %rdi
callq 0x15440
movq -0x80(%rbp), %rax
movq (%rax), %rdi
addq $0x28, %rdi
leaq 0x1c81(%rip), %rsi # 0x17543
callq 0x31c0
jmp 0x158c9
movq -0x80(%rbp), %rax
movq (%rax), %rdi
addq $0x28, %rdi
leaq 0x1c7b(%rip), %rsi # 0x17556
callq 0x31c0
movq %rax, -0x88(%rbp)
jmp 0x158e9
movq -0x88(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x31a0
movq %rax, -0x90(%rbp)
jmp 0x15902
movq -0x90(%rbp), %rdi
leaq 0x1aec(%rip), %rsi # 0x173fc
callq 0x31c0
jmp 0x15917
movq -0x80(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x144c0
jmp 0x1592d
movq -0x80(%rbp), %rax
movq (%rax), %rdi
addq $0x28, %rdi
leaq 0x1c1f(%rip), %rsi # 0x1755e
callq 0x31c0
movq %rax, -0x98(%rbp)
jmp 0x1594d
movq -0x98(%rbp), %rdi
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x31a0
movq %rax, -0xa0(%rbp)
jmp 0x1596a
movq -0xa0(%rbp), %rdi
leaq 0x1a84(%rip), %rsi # 0x173fc
callq 0x31c0
jmp 0x1597f
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x15520
testb $0x1, %al
jne 0x15995
jmp 0x15a52
movq -0x80(%rbp), %rax
movq (%rax), %rdi
addq $0x28, %rdi
leaq -0x68(%rbp), %rsi
callq 0x31a0
movq %rax, -0xa8(%rbp)
jmp 0x159b2
movq -0xa8(%rbp), %rdi
leaq 0x1a1a(%rip), %rsi # 0x173da
callq 0x31c0
jmp 0x159c7
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x15580
movq %rax, -0xb0(%rbp)
jmp 0x159eb
movq -0xb8(%rbp), %rdi
movq -0x80(%rbp), %rax
movq -0xb0(%rbp), %rcx
movq (%rcx), %rsi
movq 0x8(%rax), %rdx
callq 0x15540
jmp 0x15a0b
jmp 0x15a52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x15a30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3bd0
leaq -0x31(%rbp), %rdi
callq 0x3220
jmp 0x15a64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x3bd0
jmp 0x15a64
leaq -0x68(%rbp), %rdi
callq 0x3bd0
addq $0xc0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x32d0
nopl (%rax)
|
_ZZN9Generator11gen_if_predEPK10NodeIfPredRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK11PredVisitorclEPK14NodeIfPredElif:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_80], rax
mov rdi, [rax]
add rdi, 28h ; '('
lea rsi, aElif_1; " ;; elif\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rax, [rbp+var_80]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax]
call _ZN9Generator8gen_exprEPK8NodeExpr; Generator::gen_expr(NodeExpr const*)
mov rax, [rbp+var_80]
mov rax, [rax]
mov [rbp+var_78], rax
lea rdi, [rbp+var_31]
mov [rbp+var_70], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_70]
lea rsi, aRax; "rax"
lea rdi, [rbp+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_1587F:
mov rdi, [rbp+var_78]
lea rsi, [rbp+var_30]
call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&)
jmp short $+2
loc_1588E:
lea rdi, [rbp+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_31]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rbp+var_80]
mov rsi, [rax]
lea rdi, [rbp+var_68]
call _ZN9Generator12create_labelB5cxx11Ev; Generator::create_label(void)
mov rax, [rbp+var_80]
mov rdi, [rax]
add rdi, 28h ; '('
lea rsi, aTestRaxRax; " test rax, rax\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_158C9:
mov rax, [rbp+var_80]
mov rdi, [rax]
add rdi, 28h ; '('
lea rsi, aJz; " jz "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_88], rax
jmp short $+2
loc_158E9:
mov rdi, [rbp+var_88]
lea rsi, [rbp+var_68]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_90], rax
jmp short $+2
loc_15902:
mov rdi, [rbp+var_90]
lea rsi, aMovRdi0+0Eh; "\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_15917:
mov rax, [rbp+var_80]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
call _ZN9Generator9gen_scopeEPK9NodeScope; Generator::gen_scope(NodeScope const*)
jmp short $+2
loc_1592D:
mov rax, [rbp+var_80]
mov rdi, [rax]
add rdi, 28h ; '('
lea rsi, aJmp; " jmp "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_98], rax
jmp short $+2
loc_1594D:
mov rdi, [rbp+var_98]
mov rax, [rbp+var_80]
mov rsi, [rax+8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_A0], rax
jmp short $+2
loc_1596A:
mov rdi, [rbp+var_A0]
lea rsi, aMovRdi0+0Eh; "\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_1597F:
mov rdi, [rbp+var_10]
add rdi, 10h
call _ZNKSt8optionalIP10NodeIfPredE9has_valueEv; std::optional<NodeIfPred *>::has_value(void)
test al, 1
jnz short loc_15995
jmp loc_15A52
loc_15995:
mov rax, [rbp+var_80]
mov rdi, [rax]
add rdi, 28h ; '('
lea rsi, [rbp+var_68]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_A8], rax
jmp short $+2
loc_159B2:
mov rdi, [rbp+var_A8]
lea rsi, aGlobalStartSta+14h; ":\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_159C7:
mov rax, [rbp+var_80]
mov rax, [rax]
mov [rbp+var_B8], rax
mov rdi, [rbp+var_10]
add rdi, 10h
call _ZNKRSt8optionalIP10NodeIfPredE5valueEv; std::optional<NodeIfPred *>::value(void)
mov [rbp+var_B0], rax
jmp short $+2
loc_159EB:
mov rdi, [rbp+var_B8]
mov rax, [rbp+var_80]
mov rcx, [rbp+var_B0]
mov rsi, [rcx]
mov rdx, [rax+8]
call _ZN9Generator11gen_if_predEPK10NodeIfPredRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::gen_if_pred(NodeIfPred const*,std::string const&)
jmp short $+2
loc_15A0B:
jmp short loc_15A52
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_15A30
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_15A30:
lea rdi, [rbp+var_31]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_15A64
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_68]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_15A64
loc_15A52:
lea rdi, [rbp+var_68]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 0C0h
pop rbp
retn
loc_15A64:
mov rdi, [rbp+var_40]
call __Unwind_Resume
|
long long Generator::gen_if_pred(NodeIfPred const*,std::string const&)::PredVisitor::operator()(
long long *a1,
long long *a2)
{
long long v3; // [rsp+8h] [rbp-B8h]
long long *v4; // [rsp+10h] [rbp-B0h]
long long v5; // [rsp+18h] [rbp-A8h]
long long v6; // [rsp+20h] [rbp-A0h]
long long v7; // [rsp+28h] [rbp-98h]
long long v8; // [rsp+30h] [rbp-90h]
long long v9; // [rsp+38h] [rbp-88h]
long long v10; // [rsp+48h] [rbp-78h]
_BYTE v11[36]; // [rsp+58h] [rbp-68h] BYREF
char v12; // [rsp+8Fh] [rbp-31h] BYREF
_BYTE v13[32]; // [rsp+90h] [rbp-30h] BYREF
long long *v14; // [rsp+B0h] [rbp-10h]
long long *v15; // [rsp+B8h] [rbp-8h]
v15 = a1;
v14 = a2;
std::operator<<<std::char_traits<char>>(*a1 + 40, " ;; elif\n");
Generator::gen_expr(*a1, *a2);
v10 = *a1;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v13, (long long)"rax", (long long)&v12);
Generator::pop(v10, (long long)v13);
std::string::~string((long long)v13);
std::allocator<char>::~allocator(&v12);
Generator::create_label[abi:cxx11]((long long)v11, *a1);
std::operator<<<std::char_traits<char>>(*a1 + 40, " test rax, rax\n");
v9 = std::operator<<<std::char_traits<char>>(*a1 + 40, " jz ");
v8 = std::operator<<<char>(v9, v11);
std::operator<<<std::char_traits<char>>(v8, "\n");
Generator::gen_scope((Generator *)*a1, v14[1]);
v7 = std::operator<<<std::char_traits<char>>(*a1 + 40, " jmp ");
v6 = std::operator<<<char>(v7, a1[1]);
std::operator<<<std::char_traits<char>>(v6, "\n");
if ( (std::optional<NodeIfPred *>::has_value((long long)(v14 + 2)) & 1) != 0 )
{
v5 = std::operator<<<char>(*a1 + 40, v11);
std::operator<<<std::char_traits<char>>(v5, ":\n");
v3 = *a1;
v4 = (long long *)std::optional<NodeIfPred *>::value((long long)(v14 + 2));
Generator::gen_if_pred(v3, *v4, a1[1]);
}
return std::string::~string((long long)v11);
}
|
operator():
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x80],RAX
MOV RDI,qword ptr [RAX]
ADD RDI,0x28
LEA RSI,[0x117579]
CALL 0x001031c0
MOV RAX,qword ptr [RBP + -0x80]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
CALL 0x001114c0
MOV RAX,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x78],RAX
LEA RDI,[RBP + -0x31]
MOV qword ptr [RBP + -0x70],RDI
CALL 0x001032e0
MOV RDX,qword ptr [RBP + -0x70]
LAB_0011586d:
LEA RSI,[0x117459]
LEA RDI,[RBP + -0x30]
CALL 0x001090b0
JMP 0x0011587f
LAB_0011587f:
MOV RDI,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x30]
CALL 0x001114f0
LAB_0011588c:
JMP 0x0011588e
LAB_0011588e:
LEA RDI,[RBP + -0x30]
CALL 0x00103bd0
LEA RDI,[RBP + -0x31]
CALL 0x00103220
MOV RAX,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RAX]
LEA RDI,[RBP + -0x68]
CALL 0x00115440
MOV RAX,qword ptr [RBP + -0x80]
MOV RDI,qword ptr [RAX]
ADD RDI,0x28
LAB_001158bb:
LEA RSI,[0x117543]
CALL 0x001031c0
JMP 0x001158c9
LAB_001158c9:
MOV RAX,qword ptr [RBP + -0x80]
MOV RDI,qword ptr [RAX]
ADD RDI,0x28
LEA RSI,[0x117556]
CALL 0x001031c0
MOV qword ptr [RBP + -0x88],RAX
JMP 0x001158e9
LAB_001158e9:
MOV RDI,qword ptr [RBP + -0x88]
LEA RSI,[RBP + -0x68]
CALL 0x001031a0
MOV qword ptr [RBP + -0x90],RAX
JMP 0x00115902
LAB_00115902:
MOV RDI,qword ptr [RBP + -0x90]
LEA RSI,[0x1173fc]
CALL 0x001031c0
JMP 0x00115917
LAB_00115917:
MOV RAX,qword ptr [RBP + -0x80]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001144c0
JMP 0x0011592d
LAB_0011592d:
MOV RAX,qword ptr [RBP + -0x80]
MOV RDI,qword ptr [RAX]
ADD RDI,0x28
LEA RSI,[0x11755e]
CALL 0x001031c0
MOV qword ptr [RBP + -0x98],RAX
JMP 0x0011594d
LAB_0011594d:
MOV RDI,qword ptr [RBP + -0x98]
MOV RAX,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001031a0
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x0011596a
LAB_0011596a:
MOV RDI,qword ptr [RBP + -0xa0]
LEA RSI,[0x1173fc]
CALL 0x001031c0
JMP 0x0011597f
LAB_0011597f:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10
CALL 0x00115520
TEST AL,0x1
JNZ 0x00115995
JMP 0x00115a52
LAB_00115995:
MOV RAX,qword ptr [RBP + -0x80]
MOV RDI,qword ptr [RAX]
ADD RDI,0x28
LEA RSI,[RBP + -0x68]
CALL 0x001031a0
MOV qword ptr [RBP + -0xa8],RAX
JMP 0x001159b2
LAB_001159b2:
MOV RDI,qword ptr [RBP + -0xa8]
LEA RSI,[0x1173da]
CALL 0x001031c0
JMP 0x001159c7
LAB_001159c7:
MOV RAX,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xb8],RAX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10
CALL 0x00115580
MOV qword ptr [RBP + -0xb0],RAX
JMP 0x001159eb
LAB_001159eb:
MOV RDI,qword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RBP + -0x80]
MOV RCX,qword ptr [RBP + -0xb0]
MOV RSI,qword ptr [RCX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00115540
LAB_00115a09:
JMP 0x00115a0b
LAB_00115a0b:
JMP 0x00115a52
LAB_00115a52:
LEA RDI,[RBP + -0x68]
CALL 0x00103bd0
ADD RSP,0xc0
POP RBP
RET
|
/* Generator::gen_if_pred(NodeIfPred const*, std::__cxx11::string
const&)::PredVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeIfPredElif const*) const */
void __thiscall
Generator::gen_if_pred(NodeIfPred_const*,std::__cxx11::string_const&)::PredVisitor::operator()
(PredVisitor *this,NodeIfPredElif *param_1)
{
Generator *pGVar1;
ostream *poVar2;
ulong uVar3;
int8 *puVar4;
string local_70 [55];
allocator local_39;
string local_38 [32];
NodeIfPredElif *local_18;
PredVisitor *local_10;
local_18 = param_1;
local_10 = this;
std::operator<<((ostream *)(*(long *)this + 0x28)," ;; elif\n");
gen_expr(*(Generator **)this,*(NodeExpr **)local_18);
pGVar1 = *(Generator **)this;
std::allocator<char>::allocator();
/* try { // try from 0011586d to 0011587c has its CatchHandler @ 00115a0d */
std::__cxx11::string::string<std::allocator<char>>(local_38,"rax",&local_39);
/* try { // try from 0011587f to 0011588b has its CatchHandler @ 00115a1b */
pop(pGVar1,local_38);
std::__cxx11::string::~string(local_38);
std::allocator<char>::~allocator((allocator<char> *)&local_39);
create_label_abi_cxx11_();
/* try { // try from 001158bb to 00115a08 has its CatchHandler @ 00115a3b */
std::operator<<((ostream *)(*(long *)this + 0x28)," test rax, rax\n");
poVar2 = std::operator<<((ostream *)(*(long *)this + 0x28)," jz ");
poVar2 = std::operator<<(poVar2,local_70);
std::operator<<(poVar2,"\n");
gen_scope(*(Generator **)this,*(NodeScope **)(local_18 + 8));
poVar2 = std::operator<<((ostream *)(*(long *)this + 0x28)," jmp ");
poVar2 = std::operator<<(poVar2,*(string **)(this + 8));
std::operator<<(poVar2,"\n");
uVar3 = std::optional<NodeIfPred*>::has_value((optional<NodeIfPred*> *)(local_18 + 0x10));
if ((uVar3 & 1) != 0) {
poVar2 = std::operator<<((ostream *)(*(long *)this + 0x28),local_70);
std::operator<<(poVar2,":\n");
pGVar1 = *(Generator **)this;
puVar4 = (int8 *)
std::optional<NodeIfPred*>::value((optional<NodeIfPred*> *)(local_18 + 0x10));
gen_if_pred(pGVar1,(NodeIfPred *)*puVar4,*(string **)(this + 8));
}
std::__cxx11::string::~string(local_70);
return;
}
|
|
60,524
|
Generator::gen_if_pred(NodeIfPred const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::PredVisitor::operator()(NodeIfPredElif const*) const
|
BhuvanGudi[P]LexiParse/src/generation.hpp
|
void operator()(const NodeIfPredElif* elif) const
{
gen.m_output << " ;; elif\n";
gen.gen_expr(elif->expr);
gen.pop("rax");
const std::string label = gen.create_label();
gen.m_output << " test rax, rax\n";
gen.m_output << " jz " << label << "\n";
gen.gen_scope(elif->scope);
gen.m_output << " jmp " << end_label << "\n";
if (elif->pred.has_value()) {
gen.m_output << label << ":\n";
gen.gen_if_pred(elif->pred.value(), end_label);
}
}
|
O1
|
cpp
|
Generator::gen_if_pred(NodeIfPred const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::PredVisitor::operator()(NodeIfPredElif const*) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
addq $0x28, %rdi
leaq 0xa8c(%rip), %rsi # 0x9565
movl $0xc, %edx
callq 0x2230
movq (%r14), %rax
movq (%rbx), %rsi
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movzbl 0x8(%rsi), %eax
leaq 0x423c(%rip), %rcx # 0xcd38
callq *(%rcx,%rax,8)
movq (%r14), %r15
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x932(%rip), %rsi # 0x9445
leaq 0x92e(%rip), %rdx # 0x9448
leaq 0x8(%rsp), %rdi
callq 0x73ac
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x75ea
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8b48
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq (%r14), %rsi
leaq 0x8(%rsp), %rdi
callq 0x89cc
movq (%r14), %rdi
addq $0x28, %rdi
leaq 0x9cc(%rip), %rsi # 0x952f
movl $0x12, %edx
callq 0x2230
movq (%r14), %r15
addq $0x28, %r15
leaq 0x9c7(%rip), %rsi # 0x9542
movl $0x7, %edx
movq %r15, %rdi
callq 0x2230
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x2230
leaq 0x868(%rip), %rsi # 0x9409
movl $0x1, %edx
movq %rax, %rdi
callq 0x2230
movq (%r14), %rdi
movq 0x8(%rbx), %rsi
callq 0x846a
movq (%r14), %r15
addq $0x28, %r15
leaq 0x982(%rip), %rsi # 0x954a
movl $0x8, %edx
movq %r15, %rdi
callq 0x2230
movq 0x8(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x2230
leaq 0x81a(%rip), %rsi # 0x9409
movl $0x1, %edx
movq %rax, %rdi
callq 0x2230
cmpb $0x1, 0x18(%rbx)
jne 0x8c50
movq (%r14), %rdi
addq $0x28, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2230
leaq 0x7c8(%rip), %rsi # 0x93e7
movl $0x2, %edx
movq %rax, %rdi
callq 0x2230
cmpb $0x0, 0x18(%rbx)
je 0x8c73
movups (%r14), %xmm0
movq 0x10(%rbx), %rsi
leaq 0x28(%rsp), %rdi
movups %xmm0, (%rdi)
movzbl 0x8(%rsi), %eax
leaq 0x4133(%rip), %rcx # 0xcd80
callq *(%rcx,%rax,8)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8c67
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x38a0
jmp 0x8c7f
movq %rax, %rbx
jmp 0x8c99
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8c99
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x22d0
nop
|
_ZZN9Generator11gen_if_predEPK10NodeIfPredRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK11PredVisitorclEPK14NodeIfPredElif:
push r15
push r14
push r12
push rbx
sub rsp, 38h
mov rbx, rsi
mov r14, rdi
mov rdi, [rdi]
add rdi, 28h ; '('
lea rsi, aElif_1; " ;; elif\n"
mov edx, 0Ch
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [r14]
mov rsi, [rbx]
lea rdi, [rsp+58h+var_50]
mov [rdi], rax
movzx eax, byte ptr [rsi+8]
lea rcx, _ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE; std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE - 0CD38h)[rcx+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)
mov r15, [r14]
lea r12, [rsp+58h+var_40]
mov [r12-10h], r12
lea rsi, aRax; "rax"
lea rdx, aRax+3; ""
lea rdi, [rsp+58h+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)
lea rsi, [rsp+58h+var_50]
mov rdi, r15
call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&)
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r12
jz short loc_8B48
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8B48:
mov rsi, [r14]
lea rdi, [rsp+58h+var_50]
call _ZN9Generator12create_labelB5cxx11Ev; Generator::create_label(void)
mov rdi, [r14]
add rdi, 28h ; '('
lea rsi, aTestRaxRax; " test rax, rax\n"
mov edx, 12h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, [r14]
add r15, 28h ; '('
lea rsi, aJz; " jz "
mov edx, 7
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rsp+58h+var_50]
mov rdx, [rsp+58h+var_48]
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aMovRdi0+0Eh; "\n"
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [r14]; this
mov rsi, [rbx+8]
call _ZN9Generator9gen_scopeEPK9NodeScope; Generator::gen_scope(NodeScope const*)
mov r15, [r14]
add r15, 28h ; '('
lea rsi, aJmp; " jmp "
mov edx, 8
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [r14+8]
mov rsi, [rax]
mov rdx, [rax+8]
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aMovRdi0+0Eh; "\n"
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
cmp byte ptr [rbx+18h], 1
jnz short loc_8C50
mov rdi, [r14]
add rdi, 28h ; '('
mov rsi, [rsp+58h+var_50]
mov rdx, [rsp+58h+var_48]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aGlobalStartSta+14h; ":\n"
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
cmp byte ptr [rbx+18h], 0
jz short loc_8C73
movups xmm0, xmmword ptr [r14]
mov rsi, [rbx+10h]
lea rdi, [rsp+58h+var_30]
movups xmmword ptr [rdi], xmm0
movzx eax, byte ptr [rsi+8]
lea rcx, _ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator11gen_if_predEPK10NodeIfPredRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11PredVisitorJRKSt7variantIJP14NodeIfPredElifP14NodeIfPredElseEEEE9_S_vtableE; std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_if_pred(NodeIfPred const*,std::string const&)::PredVisitor &,std::variant<NodeIfPredElif *,NodeIfPredElse *> const&>::_S_vtable
call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator11gen_if_predEPK10NodeIfPredRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11PredVisitorJRKSt7variantIJP14NodeIfPredElifP14NodeIfPredElseEEEE9_S_vtableE - 0CD80h)[rcx+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_if_pred(NodeIfPred const*,std::string const&)::PredVisitor &,std::variant<NodeIfPredElif *,NodeIfPredElse *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_if_pred(NodeIfPred const*,std::string const&)::PredVisitor &,std::variant<NodeIfPredElif *,NodeIfPredElse *> const&)
loc_8C50:
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r12
jz short loc_8C67
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8C67:
add rsp, 38h
pop rbx
pop r12
pop r14
pop r15
retn
loc_8C73:
call _ZSt27__throw_bad_optional_accessv; std::__throw_bad_optional_access(void)
jmp short loc_8C7F
mov rbx, rax
jmp short loc_8C99
loc_8C7F:
mov rbx, rax
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r12
jz short loc_8C99
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8C99:
mov rdi, rbx
call __Unwind_Resume
|
void Generator::gen_if_pred(NodeIfPred const*,std::string const&)::PredVisitor::operator()(
long long a1,
long long a2)
{
long long v3; // rsi
void *v4; // r15
long long v5; // rdx
long long v6; // r15
long long v7; // rax
long long v8; // r15
long long v9; // rax
long long v10; // rax
long long v11; // rsi
void *v12; // [rsp+8h] [rbp-50h] BYREF
long long v13; // [rsp+10h] [rbp-48h]
_QWORD v14[2]; // [rsp+18h] [rbp-40h] BYREF
_OWORD v15[3]; // [rsp+28h] [rbp-30h] BYREF
std::__ostream_insert<char,std::char_traits<char>>(*(_QWORD *)a1 + 40LL, " ;; elif\n", 12LL);
v3 = *(_QWORD *)a2;
v12 = *(void **)a1;
((void ( *)(long long *, long long))*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
+ *(unsigned __int8 *)(v3 + 8)))(
(long long *)&v12,
v3);
v4 = *(void **)a1;
v12 = v14;
std::string::_M_construct<char const*>((long long *)&v12, "rax", (long long)"");
Generator::pop((long long)v4, &v12);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
Generator::create_label[abi:cxx11]((long long)&v12, *(_QWORD *)a1, v5);
std::__ostream_insert<char,std::char_traits<char>>(*(_QWORD *)a1 + 40LL, " test rax, rax\n", 18LL);
v6 = *(_QWORD *)a1 + 40LL;
std::__ostream_insert<char,std::char_traits<char>>(v6, " jz ", 7LL);
v7 = std::__ostream_insert<char,std::char_traits<char>>(v6, v12, v13);
std::__ostream_insert<char,std::char_traits<char>>(v7, "\n", 1LL);
Generator::gen_scope(*(Generator **)a1, *(_QWORD *)(a2 + 8));
v8 = *(_QWORD *)a1 + 40LL;
std::__ostream_insert<char,std::char_traits<char>>(v8, " jmp ", 8LL);
v9 = std::__ostream_insert<char,std::char_traits<char>>(
v8,
**(_QWORD **)(a1 + 8),
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL));
std::__ostream_insert<char,std::char_traits<char>>(v9, "\n", 1LL);
if ( *(_BYTE *)(a2 + 24) == 1 )
{
v10 = std::__ostream_insert<char,std::char_traits<char>>(*(_QWORD *)a1 + 40LL, v12, v13);
std::__ostream_insert<char,std::char_traits<char>>(v10, ":\n", 2LL);
if ( !*(_BYTE *)(a2 + 24) )
std::__throw_bad_optional_access();
v11 = *(_QWORD *)(a2 + 16);
v15[0] = *(_OWORD *)a1;
((void ( *)(long long, _QWORD *))*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_if_pred(NodeIfPred const*,std::string const&)::PredVisitor &,std::variant<NodeIfPredElif *,NodeIfPredElse *> const&>::_S_vtable
+ *(unsigned __int8 *)(v11 + 8)))(
(long long)v15,
(_QWORD *)v11);
}
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
}
|
operator():
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI]
ADD RDI,0x28
LEA RSI,[0x109565]
MOV EDX,0xc
CALL 0x00102230
MOV RAX,qword ptr [R14]
MOV RSI,qword ptr [RBX]
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RAX
MOVZX EAX,byte ptr [RSI + 0x8]
LEA RCX,[0x10cd38]
CALL qword ptr [RCX + RAX*0x8]
MOV R15,qword ptr [R14]
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LAB_00108b0c:
LEA RSI,[0x109445]
LEA RDX,[0x109448]
LEA RDI,[RSP + 0x8]
CALL 0x001073ac
LAB_00108b24:
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x001075ea
LAB_00108b31:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x00108b48
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00102200
LAB_00108b48:
MOV RSI,qword ptr [R14]
LEA RDI,[RSP + 0x8]
CALL 0x001089cc
MOV RDI,qword ptr [R14]
ADD RDI,0x28
LAB_00108b5c:
LEA RSI,[0x10952f]
MOV EDX,0x12
CALL 0x00102230
MOV R15,qword ptr [R14]
ADD R15,0x28
LEA RSI,[0x109542]
MOV EDX,0x7
MOV RDI,R15
CALL 0x00102230
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
MOV RDI,R15
CALL 0x00102230
LEA RSI,[0x109409]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00102230
MOV RDI,qword ptr [R14]
MOV RSI,qword ptr [RBX + 0x8]
CALL 0x0010846a
MOV R15,qword ptr [R14]
ADD R15,0x28
LEA RSI,[0x10954a]
MOV EDX,0x8
MOV RDI,R15
CALL 0x00102230
MOV RAX,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV RDI,R15
CALL 0x00102230
LEA RSI,[0x109409]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00102230
CMP byte ptr [RBX + 0x18],0x1
JNZ 0x00108c50
MOV RDI,qword ptr [R14]
ADD RDI,0x28
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x00102230
LEA RSI,[0x1093e7]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00102230
CMP byte ptr [RBX + 0x18],0x0
JZ 0x00108c73
MOVUPS XMM0,xmmword ptr [R14]
MOV RSI,qword ptr [RBX + 0x10]
LEA RDI,[RSP + 0x28]
MOVUPS xmmword ptr [RDI],XMM0
MOVZX EAX,byte ptr [RSI + 0x8]
LEA RCX,[0x10cd80]
CALL qword ptr [RCX + RAX*0x8]
LAB_00108c50:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x00108c67
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00102200
LAB_00108c67:
ADD RSP,0x38
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00108c73:
CALL 0x001038a0
|
/* Generator::gen_if_pred(NodeIfPred const*, std::__cxx11::string
const&)::PredVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeIfPredElif const*) const */
void __thiscall
Generator::gen_if_pred(NodeIfPred_const*,std::__cxx11::string_const&)::PredVisitor::operator()
(PredVisitor *this,NodeIfPredElif *param_1)
{
Generator *this_00;
long lVar1;
ostream *poVar2;
long *local_50;
long local_48;
long local_40 [2];
int4 local_30;
int4 uStack_2c;
int4 uStack_28;
int4 uStack_24;
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(*(long *)this + 0x28)," ;; elif\n",0xc);
local_50 = *(long **)this;
(**(code **)(std::__detail::__variant::
__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr_const*)::ExprVisitor&,std::variant<NodeTerm*,NodeBinExpr*>const&>
::_S_vtable + (ulong)*(byte *)(*(long *)param_1 + 8) * 8))();
this_00 = *(Generator **)this;
/* try { // try from 00108b0c to 00108b23 has its CatchHandler @ 00108c7a */
local_50 = local_40;
std::__cxx11::string::_M_construct<char_const*>(&local_50,&DAT_00109445,&DAT_00109448);
/* try { // try from 00108b24 to 00108b30 has its CatchHandler @ 00108c78 */
pop(this_00,(string *)&local_50);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
create_label_abi_cxx11_();
/* try { // try from 00108b5c to 00108c77 has its CatchHandler @ 00108c7f */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(*(long *)this + 0x28)," test rax, rax\n",0x12);
lVar1 = *(long *)this;
std::__ostream_insert<char,std::char_traits<char>>((ostream *)(lVar1 + 0x28)," jz ",7);
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(lVar1 + 0x28),(char *)local_50,local_48);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1);
gen_scope(*(Generator **)this,*(NodeScope **)(param_1 + 8));
lVar1 = *(long *)this;
std::__ostream_insert<char,std::char_traits<char>>((ostream *)(lVar1 + 0x28)," jmp ",8);
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(lVar1 + 0x28),(char *)**(int8 **)(this + 8),
(*(int8 **)(this + 8))[1]);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1);
if (param_1[0x18] == (NodeIfPredElif)0x1) {
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(*(long *)this + 0x28),(char *)local_50,local_48);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,":\n",2);
if (param_1[0x18] == (NodeIfPredElif)0x0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_optional_access();
}
local_30 = *(int4 *)this;
uStack_2c = *(int4 *)(this + 4);
uStack_28 = *(int4 *)(this + 8);
uStack_24 = *(int4 *)(this + 0xc);
(**(code **)(std::__detail::__variant::
__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_if_pred(NodeIfPred_const*,std::__cxx11::string_const&)::PredVisitor&,std::variant<NodeIfPredElif*,NodeIfPredElse*>const&>
::_S_vtable + (ulong)*(byte *)(*(long *)(param_1 + 0x10) + 8) * 8))();
}
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
return;
}
|
|
60,525
|
Generator::gen_if_pred(NodeIfPred const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::PredVisitor::operator()(NodeIfPredElif const*) const
|
BhuvanGudi[P]LexiParse/src/generation.hpp
|
void operator()(const NodeIfPredElif* elif) const
{
gen.m_output << " ;; elif\n";
gen.gen_expr(elif->expr);
gen.pop("rax");
const std::string label = gen.create_label();
gen.m_output << " test rax, rax\n";
gen.m_output << " jz " << label << "\n";
gen.gen_scope(elif->scope);
gen.m_output << " jmp " << end_label << "\n";
if (elif->pred.has_value()) {
gen.m_output << label << ":\n";
gen.gen_if_pred(elif->pred.value(), end_label);
}
}
|
O2
|
cpp
|
Generator::gen_if_pred(NodeIfPred const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::PredVisitor::operator()(NodeIfPredElif const*) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
addq $0x28, %rdi
leaq 0x151c(%rip), %rsi # 0x8539
callq 0x21a0
movq (%rbx), %rax
movq (%r14), %rsi
movq %rsp, %rdi
movq %rax, (%rdi)
movzbl 0x8(%rsi), %eax
leaq 0x5d07(%rip), %rcx # 0xcd40
callq *(%rcx,%rax,8)
movq (%rbx), %r15
leaq 0x13d3(%rip), %rsi # 0x8419
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x43bc
movq %rsp, %rsi
movq %r15, %rdi
callq 0x5e6e
movq %rsp, %rdi
callq 0x27ea
movq (%rbx), %rsi
movq %rsp, %rdi
callq 0x6f64
movq (%rbx), %rdi
addq $0x28, %rdi
leaq 0x1484(%rip), %rsi # 0x8503
callq 0x21a0
movq (%rbx), %rdi
addq $0x28, %rdi
leaq 0x1484(%rip), %rsi # 0x8516
callq 0x21a0
movq %rsp, %rsi
movq %rax, %rdi
callq 0x2190
leaq 0x1334(%rip), %rsi # 0x83dd
movq %rax, %rdi
callq 0x21a0
movq (%rbx), %rdi
movq 0x8(%r14), %rsi
callq 0x6a9e
movq (%rbx), %rdi
addq $0x28, %rdi
leaq 0x1453(%rip), %rsi # 0x851e
callq 0x21a0
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2190
leaq 0x12fa(%rip), %rsi # 0x83dd
movq %rax, %rdi
callq 0x21a0
cmpb $0x1, 0x18(%r14)
jne 0x7140
movq (%rbx), %rdi
addq $0x28, %rdi
movq %rsp, %rsi
callq 0x2190
leaq 0x12b3(%rip), %rsi # 0x83bb
movq %rax, %rdi
callq 0x21a0
addq $0x10, %r14
movq (%rbx), %r15
movq %r14, %rdi
callq 0x6fdc
movq (%rax), %rsi
movq 0x8(%rbx), %rax
leaq 0x20(%rsp), %rdi
movq %r15, (%rdi)
movq %rax, 0x8(%rdi)
movzbl 0x8(%rsi), %eax
leaq 0x5c4b(%rip), %rcx # 0xcd88
callq *(%rcx,%rax,8)
movq %rsp, %rdi
callq 0x27ea
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x7159
movq %rax, %rbx
jmp 0x7164
movq %rax, %rbx
movq %rsp, %rdi
callq 0x27ea
movq %rbx, %rdi
callq 0x2270
|
_ZZN9Generator11gen_if_predEPK10NodeIfPredRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK11PredVisitorclEPK14NodeIfPredElif:
push r15
push r14
push rbx
sub rsp, 30h
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi]
add rdi, 28h ; '('
lea rsi, aElif_1; " ;; elif\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rax, [rbx]
mov rsi, [r14]
mov rdi, rsp
mov [rdi], rax
movzx eax, byte ptr [rsi+8]
lea rcx, _ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE; std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE - 0CD40h)[rcx+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)
mov r15, [rbx]
lea rsi, aRax; "rax"
mov rdi, rsp
lea rdx, [rsp+48h+var_28]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rsi, rsp
mov rdi, r15
call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&)
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rsi, [rbx]
mov rdi, rsp
call _ZN9Generator12create_labelB5cxx11Ev; Generator::create_label(void)
mov rdi, [rbx]
add rdi, 28h ; '('
lea rsi, aTestRaxRax; " test rax, rax\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, [rbx]
add rdi, 28h ; '('
lea rsi, aJz; " jz "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, rsp
mov rdi, rax
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aMovRdi0+0Eh; "\n"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, [rbx]; this
mov rsi, [r14+8]
call _ZN9Generator9gen_scopeEPK9NodeScope; Generator::gen_scope(NodeScope const*)
mov rdi, [rbx]
add rdi, 28h ; '('
lea rsi, aJmp; " jmp "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [rbx+8]
mov rdi, rax
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aMovRdi0+0Eh; "\n"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
cmp byte ptr [r14+18h], 1
jnz short loc_7140
mov rdi, [rbx]
add rdi, 28h ; '('
mov rsi, rsp
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aGlobalStartSta+14h; ":\n"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
add r14, 10h
mov r15, [rbx]
mov rdi, r14
call _ZNKRSt8optionalIP10NodeIfPredE5valueEv; std::optional<NodeIfPred *>::value(void)
mov rsi, [rax]
mov rax, [rbx+8]
lea rdi, [rsp+48h+var_28]
mov [rdi], r15
mov [rdi+8], rax
movzx eax, byte ptr [rsi+8]
lea rcx, _ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator11gen_if_predEPK10NodeIfPredRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11PredVisitorJRKSt7variantIJP14NodeIfPredElifP14NodeIfPredElseEEEE9_S_vtableE; std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_if_pred(NodeIfPred const*,std::string const&)::PredVisitor &,std::variant<NodeIfPredElif *,NodeIfPredElse *> const&>::_S_vtable
call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator11gen_if_predEPK10NodeIfPredRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11PredVisitorJRKSt7variantIJP14NodeIfPredElifP14NodeIfPredElseEEEE9_S_vtableE - 0CD88h)[rcx+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_if_pred(NodeIfPred const*,std::string const&)::PredVisitor &,std::variant<NodeIfPredElif *,NodeIfPredElse *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_if_pred(NodeIfPred const*,std::string const&)::PredVisitor &,std::variant<NodeIfPredElif *,NodeIfPredElse *> const&)
loc_7140:
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 30h
pop rbx
pop r14
pop r15
retn
jmp short loc_7159
mov rbx, rax
jmp short loc_7164
loc_7159:
mov rbx, rax
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_7164:
mov rdi, rbx
call __Unwind_Resume
|
long long Generator::gen_if_pred(NodeIfPred const*,std::string const&)::PredVisitor::operator()(
long long *a1,
long long *a2,
long long a3)
{
long long v4; // rsi
long long v5; // r15
long long v6; // rdx
long long v7; // rdx
long long v8; // rdx
long long v9; // rdx
long long v10; // rax
long long v11; // rax
long long v12; // rdx
long long v13; // rdx
long long v14; // rax
long long v15; // rax
long long v16; // rdx
long long result; // rax
long long v18; // rax
long long v19; // rdx
long long v20; // r15
long long v21; // rsi
long long v22; // rax
_QWORD v23[9]; // [rsp+0h] [rbp-48h] BYREF
std::operator<<<std::char_traits<char>>(*a1 + 40, " ;; elif\n", a3);
v4 = *a2;
v23[0] = *a1;
((void ( *)(_QWORD *))*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
+ *(unsigned __int8 *)(v4 + 8)))(v23);
v5 = *a1;
std::string::basic_string<std::allocator<char>>(v23, (long long)"rax");
Generator::pop(v5, (long long)v23, v6);
std::string::~string();
Generator::create_label[abi:cxx11]((long long)v23, *a1, v7);
std::operator<<<std::char_traits<char>>(*a1 + 40, " test rax, rax\n", v8);
v10 = std::operator<<<std::char_traits<char>>(*a1 + 40, " jz ", v9);
v11 = std::operator<<<char>(v10, v23);
std::operator<<<std::char_traits<char>>(v11, "\n", v12);
Generator::gen_scope((Generator *)*a1, (long long **)a2[1]);
v14 = std::operator<<<std::char_traits<char>>(*a1 + 40, " jmp ", v13);
v15 = std::operator<<<char>(v14, a1[1]);
result = std::operator<<<std::char_traits<char>>(v15, "\n", v16);
if ( *((_BYTE *)a2 + 24) == 1 )
{
v18 = std::operator<<<char>(*a1 + 40, v23);
std::operator<<<std::char_traits<char>>(v18, ":\n", v19);
v20 = *a1;
v21 = *(_QWORD *)std::optional<NodeIfPred *>::value((long long)(a2 + 2));
v22 = a1[1];
v23[4] = v20;
v23[5] = v22;
result = (*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_if_pred(NodeIfPred const*,std::string const&)::PredVisitor &,std::variant<NodeIfPredElif *,NodeIfPredElse *> const&>::_S_vtable
+ *(unsigned __int8 *)(v21 + 8)))();
}
std::string::~string();
return result;
}
|
operator():
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
ADD RDI,0x28
LEA RSI,[0x108539]
CALL 0x001021a0
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [R14]
MOV RDI,RSP
MOV qword ptr [RDI],RAX
MOVZX EAX,byte ptr [RSI + 0x8]
LEA RCX,[0x10cd40]
CALL qword ptr [RCX + RAX*0x8]
MOV R15,qword ptr [RBX]
LAB_0010703f:
LEA RSI,[0x108419]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x001043bc
LAB_00107053:
MOV RSI,RSP
MOV RDI,R15
CALL 0x00105e6e
LAB_0010705e:
MOV RDI,RSP
CALL 0x001027ea
MOV RSI,qword ptr [RBX]
MOV RDI,RSP
CALL 0x00106f64
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
LAB_00107078:
LEA RSI,[0x108503]
CALL 0x001021a0
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
LEA RSI,[0x108516]
CALL 0x001021a0
MOV RSI,RSP
MOV RDI,RAX
CALL 0x00102190
LEA RSI,[0x1083dd]
MOV RDI,RAX
CALL 0x001021a0
MOV RDI,qword ptr [RBX]
MOV RSI,qword ptr [R14 + 0x8]
CALL 0x00106a9e
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
LEA RSI,[0x10851e]
CALL 0x001021a0
MOV RSI,qword ptr [RBX + 0x8]
MOV RDI,RAX
CALL 0x00102190
LEA RSI,[0x1083dd]
MOV RDI,RAX
CALL 0x001021a0
CMP byte ptr [R14 + 0x18],0x1
JNZ 0x00107140
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
MOV RSI,RSP
CALL 0x00102190
LEA RSI,[0x1083bb]
MOV RDI,RAX
CALL 0x001021a0
ADD R14,0x10
MOV R15,qword ptr [RBX]
MOV RDI,R14
CALL 0x00106fdc
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x8]
LEA RDI,[RSP + 0x20]
MOV qword ptr [RDI],R15
MOV qword ptr [RDI + 0x8],RAX
MOVZX EAX,byte ptr [RSI + 0x8]
LEA RCX,[0x10cd88]
CALL qword ptr [RCX + RAX*0x8]
LAB_00107140:
MOV RDI,RSP
CALL 0x001027ea
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
|
/* Generator::gen_if_pred(NodeIfPred const*, std::__cxx11::string
const&)::PredVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeIfPredElif const*) const */
void __thiscall
Generator::gen_if_pred(NodeIfPred_const*,std::__cxx11::string_const&)::PredVisitor::operator()
(PredVisitor *this,NodeIfPredElif *param_1)
{
Generator *this_00;
int8 uVar1;
ostream *poVar2;
long *plVar3;
int8 local_48 [4];
int8 local_28;
int8 local_20;
std::operator<<((ostream *)(*(long *)this + 0x28)," ;; elif\n");
local_48[0] = *(int8 *)this;
(**(code **)(std::__detail::__variant::
__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr_const*)::ExprVisitor&,std::variant<NodeTerm*,NodeBinExpr*>const&>
::_S_vtable + (ulong)*(byte *)(*(long *)param_1 + 8) * 8))();
this_00 = *(Generator **)this;
/* try { // try from 0010703f to 00107052 has its CatchHandler @ 00107154 */
std::__cxx11::string::string<std::allocator<char>>
((string *)local_48,"rax",(allocator *)&local_28);
/* try { // try from 00107053 to 0010705d has its CatchHandler @ 00107152 */
pop(this_00,(string *)local_48);
std::__cxx11::string::~string((string *)local_48);
create_label_abi_cxx11_();
/* try { // try from 00107078 to 0010713f has its CatchHandler @ 00107159 */
std::operator<<((ostream *)(*(long *)this + 0x28)," test rax, rax\n");
poVar2 = std::operator<<((ostream *)(*(long *)this + 0x28)," jz ");
poVar2 = std::operator<<(poVar2,(string *)local_48);
std::operator<<(poVar2,"\n");
gen_scope(*(Generator **)this,*(NodeScope **)(param_1 + 8));
poVar2 = std::operator<<((ostream *)(*(long *)this + 0x28)," jmp ");
poVar2 = std::operator<<(poVar2,*(string **)(this + 8));
std::operator<<(poVar2,"\n");
if (param_1[0x18] == (NodeIfPredElif)0x1) {
poVar2 = std::operator<<((ostream *)(*(long *)this + 0x28),(string *)local_48);
std::operator<<(poVar2,":\n");
uVar1 = *(int8 *)this;
plVar3 = (long *)std::optional<NodeIfPred*>::value();
local_20 = *(int8 *)(this + 8);
local_28 = uVar1;
(**(code **)(std::__detail::__variant::
__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_if_pred(NodeIfPred_const*,std::__cxx11::string_const&)::PredVisitor&,std::variant<NodeIfPredElif*,NodeIfPredElse*>const&>
::_S_vtable + (ulong)*(byte *)(*plVar3 + 8) * 8))();
}
std::__cxx11::string::~string((string *)local_48);
return;
}
|
|
60,526
|
coro::scheduler::init_impl(unsigned long)
|
tinyCoroLab/src/scheduler.cpp
|
auto scheduler::init_impl(size_t ctx_cnt) noexcept -> void
{
// TODO[lab2b]: Add you codes
detail::init_meta_info();
m_ctx_cnt = ctx_cnt;
m_ctxs = detail::ctx_container{};
m_ctxs.reserve(m_ctx_cnt);
for (int i = 0; i < m_ctx_cnt; i++)
{
m_ctxs.emplace_back(std::make_unique<context>());
}
m_dispatcher.init(m_ctx_cnt, &m_ctxs);
}
|
O0
|
cpp
|
coro::scheduler::init_impl(unsigned long):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x692f0
movq 0x10(%rsp), %rax
movq 0x48(%rsp), %rcx
movq %rcx, (%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x30(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xd830
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
movq %rdi, 0x18(%rsp)
callq 0x69320
movq 0x8(%rsp), %rdi
callq 0xd940
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdi
movq (%rax), %rsi
callq 0x69360
jmp 0x69190
movl $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rcx
movslq 0x2c(%rsp), %rax
cmpq (%rcx), %rax
jae 0x691e7
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, (%rsp)
leaq 0x20(%rsp), %rdi
callq 0x694f0
jmp 0x691c0
movq (%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x69470
jmp 0x691d0
leaq 0x20(%rsp), %rdi
callq 0xdab0
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x69198
movq 0x10(%rsp), %rdx
movq %rdx, %rdi
addq $0x20, %rdi
movq (%rdx), %rsi
addq $0x8, %rdx
callq 0x69540
addq $0x58, %rsp
retq
movq %rax, %rdi
callq 0xca70
nopl (%rax)
|
_ZN4coro9scheduler9init_implEm:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov rax, [rsp+58h+var_8]
mov [rsp+58h+var_48], rax
call _ZN4coro6detail14init_meta_infoEv; coro::detail::init_meta_info(void)
mov rax, [rsp+58h+var_48]
mov rcx, [rsp+58h+var_10]
mov [rax], rcx
xorps xmm0, xmm0
movaps [rsp+58h+var_28], xmm0
mov [rsp+58h+var_18], 0
lea rdi, [rsp+58h+var_28]
mov [rsp+58h+var_50], rdi
call _ZNSt6vectorISt10unique_ptrIN4coro7contextESt14default_deleteIS2_EESaIS5_EEC2Ev; std::vector<std::unique_ptr<coro::context>>::vector(void)
mov rsi, [rsp+58h+var_50]
mov rdi, [rsp+58h+var_48]
add rdi, 8
mov [rsp+58h+var_40], rdi
call _ZNSt6vectorISt10unique_ptrIN4coro7contextESt14default_deleteIS2_EESaIS5_EEaSEOS7_; std::vector<std::unique_ptr<coro::context>>::operator=(std::vector<std::unique_ptr<coro::context>>&&)
mov rdi, [rsp+58h+var_50]
call _ZNSt6vectorISt10unique_ptrIN4coro7contextESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<coro::context>>::~vector()
mov rax, [rsp+58h+var_48]
mov rdi, [rsp+58h+var_40]
mov rsi, [rax]
call _ZNSt6vectorISt10unique_ptrIN4coro7contextESt14default_deleteIS2_EESaIS5_EE7reserveEm; std::vector<std::unique_ptr<coro::context>>::reserve(ulong)
jmp short $+2
loc_69190:
mov [rsp+58h+var_2C], 0
loc_69198:
mov rcx, [rsp+58h+var_48]
movsxd rax, [rsp+58h+var_2C]
cmp rax, [rcx]
jnb short loc_691E7
mov rax, [rsp+58h+var_48]
add rax, 8
mov [rsp+58h+var_58], rax
lea rdi, [rsp+58h+var_38]
call _ZSt11make_uniqueIN4coro7contextEJEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<coro::context>()
jmp short $+2
loc_691C0:
mov rdi, [rsp+58h+var_58]
lea rsi, [rsp+58h+var_38]
call _ZNSt6vectorISt10unique_ptrIN4coro7contextESt14default_deleteIS2_EESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::unique_ptr<coro::context>>::emplace_back<std::unique_ptr<coro::context>>(std::unique_ptr<coro::context> &&)
jmp short $+2
loc_691D0:
lea rdi, [rsp+58h+var_38]
call _ZNSt10unique_ptrIN4coro7contextESt14default_deleteIS1_EED2Ev; std::unique_ptr<coro::context>::~unique_ptr()
mov eax, [rsp+58h+var_2C]
add eax, 1
mov [rsp+58h+var_2C], eax
jmp short loc_69198
loc_691E7:
mov rdx, [rsp+58h+var_48]
mov rdi, rdx
add rdi, 20h ; ' '
mov rsi, [rdx]
add rdx, 8
call _ZN4coro6detail10dispatcherILNS0_17dispatch_strategyE0EE4initEmPSt6vectorISt10unique_ptrINS_7contextESt14default_deleteIS6_EESaIS9_EE; coro::detail::dispatcher<(coro::detail::dispatch_strategy)0>::init(ulong,std::vector<std::unique_ptr<coro::context>> *)
add rsp, 58h
retn
mov rdi, rax
call __clang_call_terminate
|
long long coro::scheduler::init_impl(coro::scheduler *this, long long a2)
{
_BYTE v3[12]; // [rsp+20h] [rbp-38h] BYREF
int i; // [rsp+2Ch] [rbp-2Ch]
__int128 v5; // [rsp+30h] [rbp-28h] BYREF
long long v6; // [rsp+40h] [rbp-18h]
long long v7; // [rsp+48h] [rbp-10h]
coro::scheduler *v8; // [rsp+50h] [rbp-8h]
v8 = this;
v7 = a2;
coro::detail::init_meta_info(this);
*(_QWORD *)this = a2;
v5 = 0LL;
v6 = 0LL;
std::vector<std::unique_ptr<coro::context>>::vector((long long)&v5);
std::vector<std::unique_ptr<coro::context>>::operator=((char *)this + 8, &v5);
std::vector<std::unique_ptr<coro::context>>::~vector((long long *)&v5);
std::vector<std::unique_ptr<coro::context>>::reserve((char *)this + 8, *(_QWORD *)this);
for ( i = 0; (unsigned long long)i < *(_QWORD *)this; ++i )
{
std::make_unique<coro::context>(v3);
std::vector<std::unique_ptr<coro::context>>::emplace_back<std::unique_ptr<coro::context>>((char *)this + 8, v3);
std::unique_ptr<coro::context>::~unique_ptr((long long)v3);
}
return coro::detail::dispatcher<(coro::detail::dispatch_strategy)0>::init(
(char *)this + 32,
*(_QWORD *)this,
(char *)this + 8);
}
|
init_impl:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001692f0
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX],RCX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOV qword ptr [RSP + 0x40],0x0
LEA RDI,[RSP + 0x30]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0010d830
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x8
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00169320
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0010d940
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RAX]
LAB_00169189:
CALL 0x00169360
JMP 0x00169190
LAB_00169190:
MOV dword ptr [RSP + 0x2c],0x0
LAB_00169198:
MOV RCX,qword ptr [RSP + 0x10]
MOVSXD RAX,dword ptr [RSP + 0x2c]
CMP RAX,qword ptr [RCX]
JNC 0x001691e7
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x8
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x20]
CALL 0x001694f0
JMP 0x001691c0
LAB_001691c0:
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0x20]
CALL 0x00169470
JMP 0x001691d0
LAB_001691d0:
LEA RDI,[RSP + 0x20]
CALL 0x0010dab0
MOV EAX,dword ptr [RSP + 0x2c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x00169198
LAB_001691e7:
MOV RDX,qword ptr [RSP + 0x10]
MOV RDI,RDX
ADD RDI,0x20
MOV RSI,qword ptr [RDX]
ADD RDX,0x8
CALL 0x00169540
ADD RSP,0x58
RET
|
/* coro::scheduler::init_impl(unsigned long) */
void __thiscall coro::scheduler::init_impl(scheduler *this,ulong param_1)
{
unique_ptr local_38 [12];
int local_2c;
int8 local_28;
int8 uStack_20;
int8 local_18;
ulong local_10;
scheduler *local_8;
local_10 = param_1;
local_8 = this;
detail::init_meta_info();
*(ulong *)this = local_10;
local_28 = 0;
uStack_20 = 0;
local_18 = 0;
std::
vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
::vector((vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
*)&local_28);
std::
vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
::operator=((vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
*)(this + 8),(vector *)&local_28);
std::
vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
::~vector((vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
*)&local_28);
/* try { // try from 00169189 to 001691cd has its CatchHandler @ 00169204 */
std::
vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
::reserve((vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
*)(this + 8),*(ulong *)this);
for (local_2c = 0; (ulong)(long)local_2c < *(ulong *)this; local_2c = local_2c + 1) {
std::make_unique<coro::context>();
std::
vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
::emplace_back<std::unique_ptr<coro::context,std::default_delete<coro::context>>>
((vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
*)(this + 8),local_38);
std::unique_ptr<coro::context,std::default_delete<coro::context>>::~unique_ptr
((unique_ptr<coro::context,std::default_delete<coro::context>> *)local_38);
}
detail::dispatcher<(coro::detail::dispatch_strategy)0>::init
((ulong)(this + 0x20),*(vector **)this);
return;
}
|
|
60,527
|
minja::Value::insert(unsigned long, minja::Value const&)
|
monkey531[P]llama/common/minja.hpp
|
void insert(size_t index, const Value& v) {
if (!array_)
throw std::runtime_error("Value is not an array: " + dump());
array_->insert(array_->begin() + index, v);
}
|
O3
|
cpp
|
minja::Value::insert(unsigned long, minja::Value const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x98b3e
leaq (%rsi,%rsi,4), %rsi
shlq $0x4, %rsi
addq (%rdi), %rsi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x9a276
movl $0x10, %edi
callq 0x1b450
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8c0b0
leaq 0x5c7c4(%rip), %rsi # 0xf5328
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7e879
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be70
xorl %ebp, %ebp
movq 0x9845e(%rip), %rsi # 0x130fe8
movq 0x983c7(%rip), %rdx # 0x130f58
movq %rbx, %rdi
callq 0x1bf60
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98bb7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b910
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98bd2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b910
testb %bpl, %bpl
jne 0x98bfc
jmp 0x98c04
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98bfc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0x98bfc
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b690
movq %r14, %rdi
callq 0x1bff0
|
_ZN5minja5Value6insertEmRKS0_:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
mov rdi, [rdi+10h]
test rdi, rdi
jz short loc_98B3E
lea rsi, [rsi+rsi*4]
shl rsi, 4
add rsi, [rdi]
add rsp, 40h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN5minja5ValueESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_; std::vector<minja::Value>::insert(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>,minja::Value const&)
loc_98B3E:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr; "Value is not an array: "
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_98BB7
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_98BB7:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_98BD2
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_98BD2:
test bpl, bpl
jnz short loc_98BFC
jmp short loc_98C04
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_98BFC
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_98BFC
mov r14, rax
loc_98BFC:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_98C04:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::insert(minja::Value *this, long long a2, const minja::Value *a3)
{
_QWORD *v4; // rdi
void *exception; // rbx
_BYTE v7[16]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v8[16]; // [rsp+20h] [rbp-38h] BYREF
v4 = (_QWORD *)*((_QWORD *)this + 2);
if ( !v4 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v7, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v8, (long long)"Value is not an array: ", (long long)v7);
std::runtime_error::runtime_error(exception, v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return std::vector<minja::Value>::insert(v4, *v4 + 80 * a2, a3);
}
|
insert:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x10]
TEST RDI,RDI
JZ 0x00198b3e
LEA RSI,[RSI + RSI*0x4]
SHL RSI,0x4
ADD RSI,qword ptr [RDI]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
JMP 0x0019a276
LAB_00198b3e:
MOV EDI,0x10
CALL 0x0011b450
MOV RBX,RAX
LAB_00198b4b:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018c0b0
LAB_00198b5d:
LEA RSI,[0x1f5328]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017e879
MOV BPL,0x1
LAB_00198b74:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011be70
XOR EBP,EBP
MOV RSI,qword ptr [0x00230fe8]
MOV RDX,qword ptr [0x00230f58]
MOV RDI,RBX
CALL 0x0011bf60
|
/* minja::Value::insert(unsigned long, minja::Value const&) */
void minja::Value::insert(ulong param_1,Value *param_2)
{
vector<minja::Value,std::allocator<minja::Value>> *pvVar1;
runtime_error *this;
int1 auStack_58 [32];
string local_38 [32];
pvVar1 = *(vector<minja::Value,std::allocator<minja::Value>> **)(param_1 + 0x10);
if (pvVar1 != (vector<minja::Value,std::allocator<minja::Value>> *)0x0) {
std::vector<minja::Value,std::allocator<minja::Value>>::insert
(pvVar1,(long)param_2 * 0x50 + *(long *)pvVar1);
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00198b4b to 00198b5c has its CatchHandler @ 00198bf9 */
dump_abi_cxx11_((int)auStack_58,SUB81(param_1,0));
/* try { // try from 00198b5d to 00198b70 has its CatchHandler @ 00198bd9 */
std::operator+((char *)local_38,(string *)"Value is not an array: ");
/* try { // try from 00198b74 to 00198b98 has its CatchHandler @ 00198b99 */
std::runtime_error::runtime_error(this,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f58);
}
|
|
60,528
|
js_reflect_construct
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_reflect_construct(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue func, array_arg, new_target;
JSValue *tab, ret;
uint32_t len;
func = argv[0];
array_arg = argv[1];
if (argc > 2) {
new_target = argv[2];
if (!JS_IsConstructor(ctx, new_target))
return JS_ThrowTypeError(ctx, "not a constructor");
} else {
new_target = func;
}
tab = build_arg_list(ctx, &len, array_arg);
if (!tab)
return JS_EXCEPTION;
ret = JS_CallConstructor2(ctx, func, new_target, len, tab);
free_arg_list(ctx, tab, len);
return ret;
}
|
O1
|
c
|
js_reflect_construct:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %eax
movq %rdi, %rbx
movq (%r8), %r14
movq 0x8(%r8), %r15
movq 0x10(%r8), %rdx
movq 0x18(%r8), %rcx
movq %r14, %r12
movq %r15, %r13
cmpl $0x3, %eax
jl 0x7e544
movq 0x20(%r8), %r12
movq 0x28(%r8), %r13
movq %r12, 0x10(%rsp)
cmpl $-0x1, %r13d
jne 0x7e528
movq 0x10(%rsp), %rax
testb $0x10, 0x5(%rax)
jne 0x7e544
leaq 0x211b1(%rip), %rsi # 0x9f6e0
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %r14d
jmp 0x7e5ab
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x3f55b
testq %rax, %rax
je 0x7e5a2
movq %rax, %rbp
movl 0xc(%rsp), %r9d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movl %r9d, %r12d
pushq $0x2
pushq %rax
callq 0x2fa61
addq $0x10, %rsp
movq %rax, %r15
movq %rdx, %r14
movq %rbx, %rdi
movq %rbp, %rsi
movl %r12d, %edx
callq 0x3f6cd
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %r15, %rax
movl %r15d, %r15d
jmp 0x7e5ad
movl $0x6, %r14d
xorl %r15d, %r15d
xorl %eax, %eax
orq %rax, %r15
movq %r15, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_reflect_construct:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov eax, ecx
mov rbx, rdi
mov r14, [r8]
mov r15, [r8+8]
mov rdx, [r8+10h]
mov rcx, [r8+18h]
mov r12, r14
mov r13, r15
cmp eax, 3
jl short loc_7E544
mov r12, [r8+20h]
mov r13, [r8+28h]
mov [rsp+48h+var_38], r12
cmp r13d, 0FFFFFFFFh
jnz short loc_7E528
mov rax, [rsp+48h+var_38]
test byte ptr [rax+5], 10h
jnz short loc_7E544
loc_7E528:
lea rsi, aNotAConstructo; "not a constructor"
xor r15d, r15d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r14d, 6
jmp short loc_7E5AB
loc_7E544:
lea rsi, [rsp+48h+var_3C]
mov rdi, rbx
call build_arg_list
test rax, rax
jz short loc_7E5A2
mov rbp, rax
mov r9d, [rsp+48h+var_3C]
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov rcx, r12
mov r8, r13
mov r12d, r9d
push 2
push rax
call JS_CallConstructorInternal
add rsp, 10h
mov r15, rax
mov r14, rdx
mov rdi, rbx
mov rsi, rbp
mov edx, r12d
call free_arg_list
mov rax, 0FFFFFFFF00000000h
and rax, r15
mov r15d, r15d
jmp short loc_7E5AD
loc_7E5A2:
mov r14d, 6
xor r15d, r15d
loc_7E5AB:
xor eax, eax
loc_7E5AD:
or r15, rax
mov rax, r15
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_reflect_construct(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
int a12,
long long *a13,
long long a14)
{
long long v15; // r14
long long v16; // r15
long long v17; // rdx
long long v18; // rcx
unsigned long long v19; // r12
long long v20; // r13
unsigned long long v21; // r15
long long v22; // rax
__m128 v23; // xmm4
__m128 v24; // xmm5
long long v25; // rbp
unsigned long long v26; // rcx
unsigned int v27; // r12d
unsigned long long v28; // rax
char v30; // [rsp+0h] [rbp-48h]
unsigned int v31; // [rsp+Ch] [rbp-3Ch] BYREF
unsigned long long v32; // [rsp+10h] [rbp-38h]
v15 = *a13;
v16 = a13[1];
v17 = a13[2];
v18 = a13[3];
v19 = *a13;
v20 = v16;
if ( a12 >= 3 )
{
v19 = a13[4];
v20 = a13[5];
v32 = v19;
if ( (_DWORD)v20 != -1 || (*(_BYTE *)(v32 + 5) & 0x10) == 0 )
{
v21 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"not a constructor",
v17,
v18,
(long long)a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v30);
LABEL_8:
v28 = 0LL;
return v28 | v21;
}
}
v22 = build_arg_list(a1, &v31, v17, v18, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9);
if ( !v22 )
{
v21 = 0LL;
goto LABEL_8;
}
v25 = v22;
v26 = v19;
v27 = v31;
v21 = JS_CallConstructorInternal(a1, v15, v16, v26, v20, v31, a2, a3, a4, a5, v23, v24, a8, a9, v22, 2);
free_arg_list(a1, v25, v27);
v28 = v21 & 0xFFFFFFFF00000000LL;
v21 = (unsigned int)v21;
return v28 | v21;
}
|
js_reflect_construct:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EAX,ECX
MOV RBX,RDI
MOV R14,qword ptr [R8]
MOV R15,qword ptr [R8 + 0x8]
MOV RDX,qword ptr [R8 + 0x10]
MOV RCX,qword ptr [R8 + 0x18]
MOV R12,R14
MOV R13,R15
CMP EAX,0x3
JL 0x0017e544
MOV R12,qword ptr [R8 + 0x20]
MOV R13,qword ptr [R8 + 0x28]
MOV qword ptr [RSP + 0x10],R12
CMP R13D,-0x1
JNZ 0x0017e528
MOV RAX,qword ptr [RSP + 0x10]
TEST byte ptr [RAX + 0x5],0x10
JNZ 0x0017e544
LAB_0017e528:
LEA RSI,[0x19f6e0]
XOR R15D,R15D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00122567
MOV R14D,0x6
JMP 0x0017e5ab
LAB_0017e544:
LEA RSI,[RSP + 0xc]
MOV RDI,RBX
CALL 0x0013f55b
TEST RAX,RAX
JZ 0x0017e5a2
MOV RBP,RAX
MOV R9D,dword ptr [RSP + 0xc]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV RCX,R12
MOV R8,R13
MOV R12D,R9D
PUSH 0x2
PUSH RAX
CALL 0x0012fa61
ADD RSP,0x10
MOV R15,RAX
MOV R14,RDX
MOV RDI,RBX
MOV RSI,RBP
MOV EDX,R12D
CALL 0x0013f6cd
MOV RAX,-0x100000000
AND RAX,R15
MOV R15D,R15D
JMP 0x0017e5ad
LAB_0017e5a2:
MOV R14D,0x6
XOR R15D,R15D
LAB_0017e5ab:
XOR EAX,EAX
LAB_0017e5ad:
OR R15,RAX
MOV RAX,R15
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_reflect_construct
(int8 param_1,int8 param_2,int8 param_3,int param_4,long *param_5)
{
long lVar1;
long lVar2;
long lVar3;
ulong uVar4;
long lVar5;
long lVar6;
int8 uVar7;
ulong uVar8;
int1 auVar9 [16];
int4 local_3c;
long local_38;
lVar1 = *param_5;
lVar2 = param_5[1];
lVar5 = lVar1;
lVar6 = lVar2;
if (param_4 < 3) {
LAB_0017e544:
lVar3 = build_arg_list(param_1,&local_3c,param_5[2],param_5[3]);
if (lVar3 != 0) {
auVar9 = JS_CallConstructorInternal(param_1,lVar1,lVar2,lVar5,lVar6,local_3c,lVar3,2);
uVar7 = auVar9._8_8_;
free_arg_list(param_1,lVar3,local_3c);
uVar4 = auVar9._0_8_ & 0xffffffff00000000;
uVar8 = auVar9._0_8_ & 0xffffffff;
goto LAB_0017e5ad;
}
}
else {
lVar5 = param_5[4];
lVar6 = param_5[5];
local_38 = lVar5;
if (((int)lVar6 == -1) && ((*(byte *)(lVar5 + 5) & 0x10) != 0)) goto LAB_0017e544;
JS_ThrowTypeError(param_1,"not a constructor");
}
uVar8 = 0;
uVar7 = 6;
uVar4 = 0;
LAB_0017e5ad:
auVar9._8_8_ = uVar7;
auVar9._0_8_ = uVar8 | uVar4;
return auVar9;
}
|
|
60,529
|
mjv_moveCamera
|
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_vis_interact.c
|
void mjv_moveCamera(const mjModel* m, int action, mjtNum reldx, mjtNum reldy,
const mjvScene* scn, mjvCamera* cam) {
mjtNum headpos[3], forward[3];
mjtNum vec[3], dif[3], scl;
// fixed camera: nothing to do
if (cam->type == mjCAMERA_FIXED) {
return;
}
// process action
switch ((mjtMouse) action) {
case mjMOUSE_ROTATE_V:
case mjMOUSE_ROTATE_H:
cam->azimuth -= reldx * 180.0;
cam->elevation -= reldy * 180.0;
break;
case mjMOUSE_MOVE_V:
case mjMOUSE_MOVE_H:
// do not move lookat point of tracking camera
if (cam->type == mjCAMERA_TRACKING) {
return;
}
// get camera info and align
mjv_cameraInModel(headpos, forward, NULL, scn);
convert2D(vec, action, reldx, reldy, forward);
// compute scaling: rendered lookat displacement = mouse displacement
mju_sub3(dif, cam->lookat, headpos);
scl = mjv_frustumHeight(scn) * mju_dot3(dif, forward);
// move lookat point in opposite direction
mju_addToScl3(cam->lookat, vec, -scl);
break;
case mjMOUSE_ZOOM:
cam->distance -= mju_log(1 + cam->distance/m->stat.extent/3) * reldy * 9 * m->stat.extent;
break;
default:
mjERROR("unexpected action %d", action);
}
// clamp camera parameters
if (cam->azimuth > 180) {
cam->azimuth -= 360;
}
if (cam->azimuth < -180) {
cam->azimuth += 360;
}
if (cam->elevation > 89) {
cam->elevation = 89;
}
if (cam->elevation < -89) {
cam->elevation = -89;
}
if (cam->distance < 0.01*m->stat.extent) {
cam->distance = 0.01*m->stat.extent;
}
if (cam->distance > 100*m->stat.extent) {
cam->distance = 100*m->stat.extent;
}
}
|
O0
|
c
|
mjv_moveCamera:
subq $0x4d8, %rsp # imm = 0x4D8
movq %rdi, 0x4d0(%rsp)
movl %esi, 0x4cc(%rsp)
vmovsd %xmm0, 0x4c0(%rsp)
vmovsd %xmm1, 0x4b8(%rsp)
movq %rdx, 0x4b0(%rsp)
movq %rcx, 0x4a8(%rsp)
movq 0x4a8(%rsp), %rax
cmpl $0x2, (%rax)
jne 0x2eb50a
jmp 0x2eb914
movl 0x4cc(%rsp), %eax
movl %eax, 0x14(%rsp)
decl %eax
subl $0x2, %eax
jb 0x2eb542
jmp 0x2eb51e
movl 0x14(%rsp), %eax
addl $-0x3, %eax
subl $0x2, %eax
jb 0x2eb5cb
jmp 0x2eb530
movl 0x14(%rsp), %eax
subl $0x5, %eax
je 0x2eb6ca
jmp 0x2eb75c
vmovsd 0x4c0(%rsp), %xmm0
movq 0x4a8(%rsp), %rax
vmovsd 0x30(%rax), %xmm1
vmovq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
vmovq %rcx, %xmm0
vmovsd 0x22c839(%rip), %xmm2 # 0x517db0
vmulsd %xmm2, %xmm0, %xmm0
vaddsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x30(%rax)
vmovsd 0x4b8(%rsp), %xmm0
movq 0x4a8(%rsp), %rax
vmovsd 0x38(%rax), %xmm1
vmovq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
vmovq %rcx, %xmm0
vmovsd 0x22c7f7(%rip), %xmm2 # 0x517db0
vmulsd %xmm2, %xmm0, %xmm0
vaddsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x38(%rax)
jmp 0x2eb7ae
movq 0x4a8(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x2eb5dd
jmp 0x2eb914
leaq 0x490(%rsp), %rdi
leaq 0x470(%rsp), %rsi
movq 0x4b0(%rsp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x4aa70
leaq 0x450(%rsp), %rdi
movl 0x4cc(%rsp), %esi
vmovsd 0x4c0(%rsp), %xmm0
vmovsd 0x4b8(%rsp), %xmm1
leaq 0x470(%rsp), %rdx
callq 0x2eb920
leaq 0x430(%rsp), %rdi
movq 0x4a8(%rsp), %rsi
addq $0x10, %rsi
leaq 0x490(%rsp), %rdx
callq 0x492b0
movq 0x4b0(%rsp), %rdi
callq 0x4aa80
vmovsd %xmm0, 0x8(%rsp)
leaq 0x430(%rsp), %rdi
leaq 0x470(%rsp), %rsi
callq 0x49360
vmovaps %xmm0, %xmm1
vmovsd 0x8(%rsp), %xmm0
vmulsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x428(%rsp)
movq 0x4a8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x450(%rsp), %rsi
vmovsd 0x428(%rsp), %xmm0
vmovq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
vmovq %rax, %xmm0
callq 0x49310
jmp 0x2eb7ae
movq 0x4a8(%rsp), %rax
vmovsd 0x28(%rax), %xmm0
movq 0x4d0(%rsp), %rax
vdivsd 0x4f8(%rax), %xmm0, %xmm0
vmovsd 0x22c481(%rip), %xmm1 # 0x517b70
vdivsd %xmm1, %xmm0, %xmm1
vmovsd 0x22c45d(%rip), %xmm0 # 0x517b58
vaddsd %xmm1, %xmm0, %xmm0
callq 0x4a9e0
vmulsd 0x4b8(%rsp), %xmm0, %xmm0
vmovsd 0x22c693(%rip), %xmm1 # 0x517da8
vmulsd %xmm1, %xmm0, %xmm0
movq 0x4d0(%rsp), %rax
vmovsd 0x4f8(%rax), %xmm2
movq 0x4a8(%rsp), %rax
vmovsd 0x28(%rax), %xmm1
vmovq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
vmovq %rcx, %xmm0
vmulsd %xmm2, %xmm0, %xmm0
vaddsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x28(%rax)
jmp 0x2eb7ae
movq $0xe, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x23e19b(%rip), %rsi # 0x52990c
movl $0x400, %edx # imm = 0x400
callq 0x49400
leaq 0x20(%rsp), %rdi
addq 0x18(%rsp), %rdi
movl $0x400, %esi # imm = 0x400
subq 0x18(%rsp), %rsi
movl 0x4cc(%rsp), %ecx
leaq 0x23e17e(%rip), %rdx # 0x52991b
movb $0x0, %al
callq 0x49410
leaq 0x20(%rsp), %rdi
callq 0x49420
movq 0x4a8(%rsp), %rax
vmovsd 0x30(%rax), %xmm0
vmovsd 0x22c5ed(%rip), %xmm1 # 0x517db0
vucomisd %xmm1, %xmm0
jbe 0x2eb7e7
movq 0x4a8(%rsp), %rax
vmovsd 0x30(%rax), %xmm0
vmovsd 0x22c53a(%rip), %xmm1 # 0x517d18
vsubsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x30(%rax)
movq 0x4a8(%rsp), %rax
vmovsd 0x22c5c1(%rip), %xmm0 # 0x517db8
vucomisd 0x30(%rax), %xmm0
jbe 0x2eb818
movq 0x4a8(%rsp), %rax
vmovsd 0x22c50a(%rip), %xmm0 # 0x517d18
vaddsd 0x30(%rax), %xmm0, %xmm0
vmovsd %xmm0, 0x30(%rax)
movq 0x4a8(%rsp), %rax
vmovsd 0x38(%rax), %xmm0
vmovsd 0x22c593(%rip), %xmm1 # 0x517dc0
vucomisd %xmm1, %xmm0
jbe 0x2eb848
movq 0x4a8(%rsp), %rax
vmovsd 0x22c57d(%rip), %xmm0 # 0x517dc0
vmovsd %xmm0, 0x38(%rax)
movq 0x4a8(%rsp), %rax
vmovsd 0x22c570(%rip), %xmm0 # 0x517dc8
vucomisd 0x38(%rax), %xmm0
jbe 0x2eb874
movq 0x4a8(%rsp), %rax
vmovsd 0x22c559(%rip), %xmm0 # 0x517dc8
vmovsd %xmm0, 0x38(%rax)
movq 0x4a8(%rsp), %rax
vmovsd 0x28(%rax), %xmm1
movq 0x4d0(%rsp), %rax
vmovsd 0x22c41f(%rip), %xmm0 # 0x517cb0
vmulsd 0x4f8(%rax), %xmm0, %xmm0
vucomisd %xmm1, %xmm0
jbe 0x2eb8c4
movq 0x4d0(%rsp), %rax
vmovsd 0x22c401(%rip), %xmm0 # 0x517cb0
vmulsd 0x4f8(%rax), %xmm0, %xmm0
movq 0x4a8(%rsp), %rax
vmovsd %xmm0, 0x28(%rax)
movq 0x4a8(%rsp), %rax
vmovsd 0x28(%rax), %xmm0
movq 0x4d0(%rsp), %rax
vmovsd 0x22c3ff(%rip), %xmm1 # 0x517ce0
vmulsd 0x4f8(%rax), %xmm1, %xmm1
vucomisd %xmm1, %xmm0
jbe 0x2eb914
movq 0x4d0(%rsp), %rax
vmovsd 0x22c3e1(%rip), %xmm0 # 0x517ce0
vmulsd 0x4f8(%rax), %xmm0, %xmm0
movq 0x4a8(%rsp), %rax
vmovsd %xmm0, 0x28(%rax)
addq $0x4d8, %rsp # imm = 0x4D8
retq
nopl (%rax)
|
mjv_moveCamera:
sub rsp, 4D8h
mov [rsp+4D8h+var_8], rdi
mov [rsp+4D8h+var_C], esi
vmovsd [rsp+4D8h+var_18], xmm0
vmovsd [rsp+4D8h+var_20], xmm1
mov [rsp+4D8h+var_28], rdx
mov [rsp+4D8h+var_30], rcx
mov rax, [rsp+4D8h+var_30]
cmp dword ptr [rax], 2
jnz short loc_2EB50A
jmp loc_2EB914
loc_2EB50A:
mov eax, [rsp+4D8h+var_C]
mov [rsp+4D8h+var_4C4], eax
dec eax
sub eax, 2
jb short loc_2EB542
jmp short $+2
loc_2EB51E:
mov eax, [rsp+4D8h+var_4C4]
add eax, 0FFFFFFFDh
sub eax, 2
jb loc_2EB5CB
jmp short $+2
loc_2EB530:
mov eax, [rsp+4D8h+var_4C4]
sub eax, 5
jz loc_2EB6CA
jmp loc_2EB75C
loc_2EB542:
vmovsd xmm0, [rsp+4D8h+var_18]
mov rax, [rsp+4D8h+var_30]
vmovsd xmm1, qword ptr [rax+30h]
vmovq rcx, xmm0
mov rdx, 8000000000000000h
xor rcx, rdx
vmovq xmm0, rcx
vmovsd xmm2, cs:qword_517DB0
vmulsd xmm0, xmm0, xmm2
vaddsd xmm0, xmm0, xmm1
vmovsd qword ptr [rax+30h], xmm0
vmovsd xmm0, [rsp+4D8h+var_20]
mov rax, [rsp+4D8h+var_30]
vmovsd xmm1, qword ptr [rax+38h]
vmovq rcx, xmm0
mov rdx, 8000000000000000h
xor rcx, rdx
vmovq xmm0, rcx
vmovsd xmm2, cs:qword_517DB0
vmulsd xmm0, xmm0, xmm2
vaddsd xmm0, xmm0, xmm1
vmovsd qword ptr [rax+38h], xmm0
jmp loc_2EB7AE
loc_2EB5CB:
mov rax, [rsp+4D8h+var_30]
cmp dword ptr [rax], 1
jnz short loc_2EB5DD
jmp loc_2EB914
loc_2EB5DD:
lea rdi, [rsp+4D8h+var_48]
lea rsi, [rsp+4D8h+var_68]
mov rcx, [rsp+4D8h+var_28]
xor eax, eax
mov edx, eax
call _mjv_cameraInModel
lea rdi, [rsp+4D8h+var_88]
mov esi, [rsp+4D8h+var_C]
vmovsd xmm0, [rsp+4D8h+var_18]
vmovsd xmm1, [rsp+4D8h+var_20]
lea rdx, [rsp+4D8h+var_68]
call convert2D
lea rdi, [rsp+4D8h+var_A8]
mov rsi, [rsp+4D8h+var_30]
add rsi, 10h
lea rdx, [rsp+4D8h+var_48]
call _mju_sub3
mov rdi, [rsp+4D8h+var_28]
call _mjv_frustumHeight
vmovsd [rsp+4D8h+var_4D0], xmm0
lea rdi, [rsp+4D8h+var_A8]
lea rsi, [rsp+4D8h+var_68]
call _mju_dot3
vmovaps xmm1, xmm0
vmovsd xmm0, [rsp+4D8h+var_4D0]
vmulsd xmm0, xmm0, xmm1
vmovsd [rsp+4D8h+var_B0], xmm0
mov rdi, [rsp+4D8h+var_30]
add rdi, 10h
lea rsi, [rsp+4D8h+var_88]
vmovsd xmm0, [rsp+4D8h+var_B0]
vmovq rax, xmm0
mov rcx, 8000000000000000h
xor rax, rcx
vmovq xmm0, rax
call _mju_addToScl3
jmp loc_2EB7AE
loc_2EB6CA:
mov rax, [rsp+4D8h+var_30]
vmovsd xmm0, qword ptr [rax+28h]
mov rax, [rsp+4D8h+var_8]
vdivsd xmm0, xmm0, qword ptr [rax+4F8h]
vmovsd xmm1, cs:qword_517B70
vdivsd xmm1, xmm0, xmm1
vmovsd xmm0, cs:qword_517B58
vaddsd xmm0, xmm0, xmm1
call _log
vmulsd xmm0, xmm0, [rsp+4D8h+var_20]
vmovsd xmm1, cs:qword_517DA8
vmulsd xmm0, xmm0, xmm1
mov rax, [rsp+4D8h+var_8]
vmovsd xmm2, qword ptr [rax+4F8h]
mov rax, [rsp+4D8h+var_30]
vmovsd xmm1, qword ptr [rax+28h]
vmovq rcx, xmm0
mov rdx, 8000000000000000h
xor rcx, rdx
vmovq xmm0, rcx
vmulsd xmm0, xmm0, xmm2
vaddsd xmm0, xmm0, xmm1
vmovsd qword ptr [rax+28h], xmm0
jmp short loc_2EB7AE
loc_2EB75C:
mov [rsp+4D8h+var_4C0], 0Eh
lea rdi, [rsp+4D8h+var_4B8]
lea rsi, aMjvMovecamera_0; "mjv_moveCamera"
mov edx, 400h
call _strncpy
lea rdi, [rsp+4D8h+var_4B8]
add rdi, [rsp+4D8h+var_4C0]
mov esi, 400h
sub rsi, [rsp+4D8h+var_4C0]
mov ecx, [rsp+4D8h+var_C]
lea rdx, aUnexpectedActi; ": unexpected action %d"
mov al, 0
call _snprintf
lea rdi, [rsp+4D8h+var_4B8]
call _mju_error_raw
loc_2EB7AE:
mov rax, [rsp+4D8h+var_30]
vmovsd xmm0, qword ptr [rax+30h]
vmovsd xmm1, cs:qword_517DB0
vucomisd xmm0, xmm1
jbe short loc_2EB7E7
mov rax, [rsp+4D8h+var_30]
vmovsd xmm0, qword ptr [rax+30h]
vmovsd xmm1, cs:qword_517D18
vsubsd xmm0, xmm0, xmm1
vmovsd qword ptr [rax+30h], xmm0
loc_2EB7E7:
mov rax, [rsp+4D8h+var_30]
vmovsd xmm0, cs:qword_517DB8
vucomisd xmm0, qword ptr [rax+30h]
jbe short loc_2EB818
mov rax, [rsp+4D8h+var_30]
vmovsd xmm0, cs:qword_517D18
vaddsd xmm0, xmm0, qword ptr [rax+30h]
vmovsd qword ptr [rax+30h], xmm0
loc_2EB818:
mov rax, [rsp+4D8h+var_30]
vmovsd xmm0, qword ptr [rax+38h]
vmovsd xmm1, cs:qword_517DC0
vucomisd xmm0, xmm1
jbe short loc_2EB848
mov rax, [rsp+4D8h+var_30]
vmovsd xmm0, cs:qword_517DC0
vmovsd qword ptr [rax+38h], xmm0
loc_2EB848:
mov rax, [rsp+4D8h+var_30]
vmovsd xmm0, cs:qword_517DC8
vucomisd xmm0, qword ptr [rax+38h]
jbe short loc_2EB874
mov rax, [rsp+4D8h+var_30]
vmovsd xmm0, cs:qword_517DC8
vmovsd qword ptr [rax+38h], xmm0
loc_2EB874:
mov rax, [rsp+4D8h+var_30]
vmovsd xmm1, qword ptr [rax+28h]
mov rax, [rsp+4D8h+var_8]
vmovsd xmm0, cs:qword_517CB0
vmulsd xmm0, xmm0, qword ptr [rax+4F8h]
vucomisd xmm0, xmm1
jbe short loc_2EB8C4
mov rax, [rsp+4D8h+var_8]
vmovsd xmm0, cs:qword_517CB0
vmulsd xmm0, xmm0, qword ptr [rax+4F8h]
mov rax, [rsp+4D8h+var_30]
vmovsd qword ptr [rax+28h], xmm0
loc_2EB8C4:
mov rax, [rsp+4D8h+var_30]
vmovsd xmm0, qword ptr [rax+28h]
mov rax, [rsp+4D8h+var_8]
vmovsd xmm1, cs:qword_517CE0
vmulsd xmm1, xmm1, qword ptr [rax+4F8h]
vucomisd xmm0, xmm1
jbe short loc_2EB914
mov rax, [rsp+4D8h+var_8]
vmovsd xmm0, cs:qword_517CE0
vmulsd xmm0, xmm0, qword ptr [rax+4F8h]
mov rax, [rsp+4D8h+var_30]
vmovsd qword ptr [rax+28h], xmm0
loc_2EB914:
add rsp, 4D8h
retn
|
_DWORD * mjv_moveCamera(_DWORD *a1, unsigned int a2, long long a3, _DWORD *a4, __m128 _XMM0, __m128 _XMM1)
{
_DWORD *result; // rax
char v50; // cf
bool v51; // zf
_BYTE v87[14]; // [rsp+20h] [rbp-4B8h] BYREF
__int16 v88; // [rsp+2Eh] [rbp-4AAh] BYREF
_BYTE v90[32]; // [rsp+430h] [rbp-A8h] BYREF
_BYTE v91[32]; // [rsp+450h] [rbp-88h] BYREF
_BYTE v92[32]; // [rsp+470h] [rbp-68h] BYREF
_BYTE v93[24]; // [rsp+490h] [rbp-48h] BYREF
_DWORD *v94; // [rsp+4A8h] [rbp-30h]
long long v95; // [rsp+4B0h] [rbp-28h]
unsigned int v98; // [rsp+4CCh] [rbp-Ch]
_DWORD *v99; // [rsp+4D0h] [rbp-8h]
v99 = a1;
v98 = a2;
__asm
{
vmovsd [rsp+4D8h+var_18], xmm0
vmovsd [rsp+4D8h+var_20], xmm1
}
v95 = a3;
v94 = a4;
result = a4;
if ( *a4 != 2 )
{
if ( v98 - 1 < 2 )
{
__asm { vmovsd xmm0, [rsp+4D8h+var_18] }
_RAX = v94;
__asm
{
vmovsd xmm1, qword ptr [rax+30h]
vmovq rcx, xmm0
}
_RCX ^= 0x8000000000000000LL;
__asm
{
vmovq xmm0, rcx
vmovsd xmm2, cs:qword_517DB0
vmulsd xmm0, xmm0, xmm2
vaddsd xmm0, xmm0, xmm1
vmovsd qword ptr [rax+30h], xmm0
vmovsd xmm0, [rsp+4D8h+var_20]
}
_RAX = v94;
__asm
{
vmovsd xmm1, qword ptr [rax+38h]
vmovq rcx, xmm0
}
_RCX ^= 0x8000000000000000LL;
v50 = 0;
v51 = _RCX == 0;
__asm
{
vmovq xmm0, rcx
vmovsd xmm2, cs:qword_517DB0
vmulsd xmm0, xmm0, xmm2
vaddsd xmm0, xmm0, xmm1
vmovsd qword ptr [rax+38h], xmm0
}
}
else if ( v98 - 3 < 2 )
{
result = v94;
if ( *v94 == 1 )
return result;
mjv_cameraInModel((long long)v93, (long long)v92, 0LL, v95, _XMM0);
__asm
{
vmovsd xmm0, [rsp+4D8h+var_18]
vmovsd xmm1, [rsp+4D8h+var_20]
}
convert2D(v91, v98, v92, *(double *)_XMM0.m128_u64, *(double *)&_XMM1);
mju_sub3(v90, v94 + 4, v93);
_XMM0 = mjv_frustumHeight(v95, _XMM0);
__asm { vmovsd [rsp+4D8h+var_4D0], xmm0 }
*(double *)&_XMM0 = mju_dot3(v90, v92);
__asm
{
vmovaps xmm1, xmm0
vmovsd xmm0, [rsp+4D8h+var_4D0]
vmulsd xmm0, xmm0, xmm1
vmovsd [rsp+4D8h+var_B0], xmm0
vmovsd xmm0, [rsp+4D8h+var_B0]
vmovq rax, xmm0
}
_RAX ^= 0x8000000000000000LL;
__asm { vmovq xmm0, rax }
mju_addToScl3(v94 + 4, v91, *(double *)&_XMM0);
}
else if ( v98 == 5 )
{
_RAX = v94;
__asm
{
vmovsd xmm0, qword ptr [rax+28h]
vdivsd xmm0, xmm0, qword ptr [rax+4F8h]
vmovsd xmm1, cs:qword_517B70
vdivsd xmm1, xmm0, xmm1
vmovsd xmm0, cs:qword_517B58
vaddsd xmm0, xmm0, xmm1
}
*(double *)&_XMM0 = log(*(double *)&_XMM0);
__asm
{
vmulsd xmm0, xmm0, [rsp+4D8h+var_20]
vmovsd xmm1, cs:qword_517DA8
vmulsd xmm0, xmm0, xmm1
}
_RAX = v99;
__asm { vmovsd xmm2, qword ptr [rax+4F8h] }
_RAX = v94;
__asm
{
vmovsd xmm1, qword ptr [rax+28h]
vmovq rcx, xmm0
}
_RCX ^= 0x8000000000000000LL;
v50 = 0;
v51 = _RCX == 0;
__asm
{
vmovq xmm0, rcx
vmulsd xmm0, xmm0, xmm2
vaddsd xmm0, xmm0, xmm1
vmovsd qword ptr [rax+28h], xmm0
}
}
else
{
strncpy(v87, "mjv_moveCamera", 1024LL);
snprintf(&v88, 1010LL, ": unexpected action %d", v98);
mju_error_raw(v87);
}
_RAX = v94;
__asm
{
vmovsd xmm0, qword ptr [rax+30h]
vmovsd xmm1, cs:qword_517DB0
vucomisd xmm0, xmm1
}
if ( !(v50 | v51) )
{
_RAX = v94;
__asm
{
vmovsd xmm0, qword ptr [rax+30h]
vmovsd xmm1, cs:qword_517D18
vsubsd xmm0, xmm0, xmm1
vmovsd qword ptr [rax+30h], xmm0
}
}
_RAX = v94;
__asm
{
vmovsd xmm0, cs:qword_517DB8
vucomisd xmm0, qword ptr [rax+30h]
}
if ( !(v50 | v51) )
{
_RAX = v94;
__asm
{
vmovsd xmm0, cs:qword_517D18
vaddsd xmm0, xmm0, qword ptr [rax+30h]
vmovsd qword ptr [rax+30h], xmm0
}
}
_RAX = v94;
__asm
{
vmovsd xmm0, qword ptr [rax+38h]
vmovsd xmm1, cs:qword_517DC0
vucomisd xmm0, xmm1
}
if ( !(v50 | v51) )
{
_RAX = v94;
__asm
{
vmovsd xmm0, cs:qword_517DC0
vmovsd qword ptr [rax+38h], xmm0
}
}
_RAX = v94;
__asm
{
vmovsd xmm0, cs:qword_517DC8
vucomisd xmm0, qword ptr [rax+38h]
}
if ( !(v50 | v51) )
{
_RAX = v94;
__asm
{
vmovsd xmm0, cs:qword_517DC8
vmovsd qword ptr [rax+38h], xmm0
}
}
_RAX = v94;
__asm
{
vmovsd xmm1, qword ptr [rax+28h]
vmovsd xmm0, cs:qword_517CB0
vmulsd xmm0, xmm0, qword ptr [rax+4F8h]
vucomisd xmm0, xmm1
}
if ( !(v50 | v51) )
{
__asm
{
vmovsd xmm0, cs:qword_517CB0
vmulsd xmm0, xmm0, qword ptr [rax+4F8h]
}
_RAX = v94;
__asm { vmovsd qword ptr [rax+28h], xmm0 }
}
_RAX = v94;
__asm { vmovsd xmm0, qword ptr [rax+28h] }
result = v99;
__asm
{
vmovsd xmm1, cs:qword_517CE0
vmulsd xmm1, xmm1, qword ptr [rax+4F8h]
vucomisd xmm0, xmm1
}
if ( !(v50 | v51) )
{
__asm
{
vmovsd xmm0, cs:qword_517CE0
vmulsd xmm0, xmm0, qword ptr [rax+4F8h]
}
result = v94;
__asm { vmovsd qword ptr [rax+28h], xmm0 }
}
}
return result;
}
| |||
60,530
|
mjv_moveCamera
|
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_vis_interact.c
|
void mjv_moveCamera(const mjModel* m, int action, mjtNum reldx, mjtNum reldy,
const mjvScene* scn, mjvCamera* cam) {
mjtNum headpos[3], forward[3];
mjtNum vec[3], dif[3], scl;
// fixed camera: nothing to do
if (cam->type == mjCAMERA_FIXED) {
return;
}
// process action
switch ((mjtMouse) action) {
case mjMOUSE_ROTATE_V:
case mjMOUSE_ROTATE_H:
cam->azimuth -= reldx * 180.0;
cam->elevation -= reldy * 180.0;
break;
case mjMOUSE_MOVE_V:
case mjMOUSE_MOVE_H:
// do not move lookat point of tracking camera
if (cam->type == mjCAMERA_TRACKING) {
return;
}
// get camera info and align
mjv_cameraInModel(headpos, forward, NULL, scn);
convert2D(vec, action, reldx, reldy, forward);
// compute scaling: rendered lookat displacement = mouse displacement
mju_sub3(dif, cam->lookat, headpos);
scl = mjv_frustumHeight(scn) * mju_dot3(dif, forward);
// move lookat point in opposite direction
mju_addToScl3(cam->lookat, vec, -scl);
break;
case mjMOUSE_ZOOM:
cam->distance -= mju_log(1 + cam->distance/m->stat.extent/3) * reldy * 9 * m->stat.extent;
break;
default:
mjERROR("unexpected action %d", action);
}
// clamp camera parameters
if (cam->azimuth > 180) {
cam->azimuth -= 360;
}
if (cam->azimuth < -180) {
cam->azimuth += 360;
}
if (cam->elevation > 89) {
cam->elevation = 89;
}
if (cam->elevation < -89) {
cam->elevation = -89;
}
if (cam->distance < 0.01*m->stat.extent) {
cam->distance = 0.01*m->stat.extent;
}
if (cam->distance > 100*m->stat.extent) {
cam->distance = 100*m->stat.extent;
}
}
|
O3
|
c
|
mjv_moveCamera:
movl (%rcx), %eax
cmpl $0x2, %eax
je 0xa71a5
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x488, %rsp # imm = 0x488
movq %rcx, %rbx
movl %esi, %r15d
movq %rdi, %r14
leal -0x1(%r15), %ecx
cmpl $0x2, %ecx
jb 0xa7036
leal -0x3(%r15), %ecx
cmpl $0x2, %ecx
jae 0xa7055
cmpl $0x1, %eax
je 0xa7194
movq %rdx, %r12
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rbp
movq %rbp, %rsi
xorl %edx, %edx
movq %r12, %rcx
vmovaps %xmm1, (%rsp)
vmovaps %xmm0, 0x10(%rsp)
callq 0x2e510
leaq 0x20(%rsp), %rdi
movl %r15d, %esi
vmovapd 0x10(%rsp), %xmm0
vmovaps (%rsp), %xmm1
movq %rbp, %rdx
callq 0xa71a6
leaq 0x10(%rbx), %r15
leaq 0x40(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
leaq 0x80(%rsp), %rdx
callq 0x2d100
movq %r12, %rdi
callq 0x2e520
vmovapd %xmm0, (%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2d1b0
vmovddup 0x115b85(%rip), %xmm1 # xmm1 = mem[0,0]
vxorpd (%rsp), %xmm1, %xmm1
vmulsd %xmm1, %xmm0, %xmm0
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
callq 0x2d140
jmp 0xa70e7
vunpcklpd %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0]
vmovddup 0x115db6(%rip), %xmm1 # xmm1 = mem[0,0]
vmulpd %xmm1, %xmm0, %xmm0
vaddpd 0x30(%rbx), %xmm0, %xmm0
vmovupd %xmm0, 0x30(%rbx)
jmp 0xa70e7
cmpl $0x5, %r15d
jne 0xa70a5
vmovsd 0x28(%rbx), %xmm0
vdivsd 0x4f8(%r14), %xmm0, %xmm0
vdivsd 0x115b87(%rip), %xmm0, %xmm0 # 0x1bcbf8
vaddsd 0x115b57(%rip), %xmm0, %xmm0 # 0x1bcbd0
vmovapd %xmm1, (%rsp)
callq 0x2e4a0
vmulsd (%rsp), %xmm0, %xmm0
vmulsd 0x115d60(%rip), %xmm0, %xmm0 # 0x1bcdf0
vmulsd 0x4f8(%r14), %xmm0, %xmm0
vaddsd 0x28(%rbx), %xmm0, %xmm0
vmovsd %xmm0, 0x28(%rbx)
jmp 0xa70e7
leaq 0x127f4c(%rip), %rsi # 0x1ceff8
leaq 0x80(%rsp), %r12
movl $0x400, %edx # imm = 0x400
movq %r12, %rdi
callq 0x2d240
leaq 0x8e(%rsp), %rdi
leaq 0x127f37(%rip), %rdx # 0x1cf007
movl $0x3f2, %esi # imm = 0x3F2
movl %r15d, %ecx
xorl %eax, %eax
callq 0x2d250
movq %r12, %rdi
callq 0x2d260
vmovsd 0x30(%rbx), %xmm0
vmovsd 0x115d0c(%rip), %xmm1 # 0x1bce00
vucomisd %xmm1, %xmm0
vaddsd 0x115d08(%rip), %xmm0, %xmm2 # 0x1bce08
vcmpltsd %xmm0, %xmm1, %xmm1
vblendvpd %xmm1, %xmm2, %xmm0, %xmm0
ja 0xa711b
vmovsd 0x115ce3(%rip), %xmm1 # 0x1bcdf8
vucomisd %xmm0, %xmm1
jbe 0xa7137
vaddsd 0x115c35(%rip), %xmm0, %xmm1 # 0x1bcd58
vcmpltsd 0x115ccc(%rip), %xmm0, %xmm2 # 0x1bcdf8
vblendvpd %xmm2, %xmm1, %xmm0, %xmm0
vmovlpd %xmm0, 0x30(%rbx)
vmovsd 0x38(%rbx), %xmm1
vmovsd 0x115ccc(%rip), %xmm0 # 0x1bce10
vucomisd %xmm0, %xmm1
ja 0xa7158
vmovsd 0x115cc6(%rip), %xmm0 # 0x1bce18
vucomisd %xmm1, %xmm0
jbe 0xa715d
vmovsd %xmm0, 0x38(%rbx)
vmovsd 0x28(%rbx), %xmm0
vmovsd 0x4f8(%r14), %xmm1
vmulsd 0x115bf5(%rip), %xmm1, %xmm2 # 0x1bcd68
vucomisd %xmm0, %xmm2
vmaxsd %xmm0, %xmm2, %xmm0
vmulsd 0x115c9d(%rip), %xmm1, %xmm1 # 0x1bce20
ja 0xa718b
vucomisd %xmm1, %xmm0
jbe 0xa7194
vminsd %xmm0, %xmm1, %xmm0
vmovsd %xmm0, 0x28(%rbx)
addq $0x488, %rsp # imm = 0x488
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
mjv_moveCamera:
mov eax, [rcx]
cmp eax, 2
jz locret_A71A5
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 488h
mov rbx, rcx
mov r15d, esi
mov r14, rdi
lea ecx, [r15-1]
cmp ecx, 2
jb loc_A7036
lea ecx, [r15-3]
cmp ecx, 2
jnb loc_A7055
cmp eax, 1
jz loc_A7194
mov r12, rdx
lea rdi, [rsp+4B8h+var_438]
lea rbp, [rsp+4B8h+var_458]
mov rsi, rbp
xor edx, edx
mov rcx, r12
vmovaps [rsp+4B8h+var_4B8], xmm1
vmovaps [rsp+4B8h+var_4A8], xmm0
call _mjv_cameraInModel
lea rdi, [rsp+4B8h+var_498]
mov esi, r15d
vmovapd xmm0, [rsp+4B8h+var_4A8]
vmovaps xmm1, [rsp+4B8h+var_4B8]
mov rdx, rbp
call convert2D
lea r15, [rbx+10h]
lea r13, [rsp+4B8h+var_478]
mov rdi, r13
mov rsi, r15
lea rdx, [rsp+4B8h+var_438]
call _mju_sub3
mov rdi, r12
call _mjv_frustumHeight
vmovapd [rsp+4B8h+var_4B8], xmm0
mov rdi, r13
mov rsi, rbp
call _mju_dot3
vmovddup xmm1, cs:qword_1BCBA0
vxorpd xmm1, xmm1, [rsp+4B8h+var_4B8]
vmulsd xmm0, xmm0, xmm1
mov rdi, r15
lea rsi, [rsp+4B8h+var_498]
call _mju_addToScl3
jmp loc_A70E7
loc_A7036:
vunpcklpd xmm0, xmm0, xmm1
vmovddup xmm1, cs:qword_1BCDF8
vmulpd xmm0, xmm0, xmm1
vaddpd xmm0, xmm0, xmmword ptr [rbx+30h]
vmovupd xmmword ptr [rbx+30h], xmm0
jmp loc_A70E7
loc_A7055:
cmp r15d, 5
jnz short loc_A70A5
vmovsd xmm0, qword ptr [rbx+28h]
vdivsd xmm0, xmm0, qword ptr [r14+4F8h]
vdivsd xmm0, xmm0, cs:qword_1BCBF8
vaddsd xmm0, xmm0, cs:qword_1BCBD0
vmovapd [rsp+4B8h+var_4B8], xmm1
call _log
vmulsd xmm0, xmm0, qword ptr [rsp+4B8h+var_4B8]
vmulsd xmm0, xmm0, cs:qword_1BCDF0
vmulsd xmm0, xmm0, qword ptr [r14+4F8h]
vaddsd xmm0, xmm0, qword ptr [rbx+28h]
vmovsd qword ptr [rbx+28h], xmm0
jmp short loc_A70E7
loc_A70A5:
lea rsi, aMjvMovecamera_0; "mjv_moveCamera"
lea r12, [rsp+4B8h+var_438]
mov edx, 400h
mov rdi, r12
call _strncpy
lea rdi, [rsp+4B8h+var_42A]
lea rdx, aUnexpectedActi; ": unexpected action %d"
mov esi, 3F2h
mov ecx, r15d
xor eax, eax
call _snprintf
mov rdi, r12
call _mju_error_raw
loc_A70E7:
vmovsd xmm0, qword ptr [rbx+30h]
vmovsd xmm1, cs:qword_1BCE00
vucomisd xmm0, xmm1
vaddsd xmm2, xmm0, cs:qword_1BCE08
vcmpltsd xmm1, xmm1, xmm0
vblendvpd xmm0, xmm0, xmm2, xmm1
ja short loc_A711B
vmovsd xmm1, cs:qword_1BCDF8
vucomisd xmm1, xmm0
jbe short loc_A7137
loc_A711B:
vaddsd xmm1, xmm0, cs:qword_1BCD58
vcmpltsd xmm2, xmm0, cs:qword_1BCDF8
vblendvpd xmm0, xmm0, xmm1, xmm2
vmovlpd qword ptr [rbx+30h], xmm0
loc_A7137:
vmovsd xmm1, qword ptr [rbx+38h]
vmovsd xmm0, cs:qword_1BCE10
vucomisd xmm1, xmm0
ja short loc_A7158
vmovsd xmm0, cs:qword_1BCE18
vucomisd xmm0, xmm1
jbe short loc_A715D
loc_A7158:
vmovsd qword ptr [rbx+38h], xmm0
loc_A715D:
vmovsd xmm0, qword ptr [rbx+28h]
vmovsd xmm1, qword ptr [r14+4F8h]
vmulsd xmm2, xmm1, cs:qword_1BCD68
vucomisd xmm2, xmm0
vmaxsd xmm0, xmm2, xmm0
vmulsd xmm1, xmm1, cs:qword_1BCE20
ja short loc_A718B
vucomisd xmm0, xmm1
jbe short loc_A7194
loc_A718B:
vminsd xmm0, xmm1, xmm0
vmovsd qword ptr [rbx+28h], xmm0
loc_A7194:
add rsp, 488h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_A71A5:
retn
|
void mjv_moveCamera(
long long a1,
unsigned int a2,
long long a3,
_DWORD *a4,
__m128 _XMM0,
__m128 _XMM1,
__m128 a7,
__m128 a8)
{
bool v10; // cf
bool v11; // zf
_BYTE v53[32]; // [rsp+20h] [rbp-498h] BYREF
_BYTE v54[32]; // [rsp+40h] [rbp-478h] BYREF
_BYTE v55[32]; // [rsp+60h] [rbp-458h] BYREF
_BYTE v56[14]; // [rsp+80h] [rbp-438h] BYREF
_BYTE v57[1066]; // [rsp+8Eh] [rbp-42Ah] BYREF
if ( *a4 != 2 )
{
_RBX = a4;
_R14 = a1;
v10 = a2 - 1 < 2;
v11 = a2 == 3;
if ( a2 - 1 < 2 )
{
__asm
{
vunpcklpd xmm0, xmm0, xmm1
vmovddup xmm1, cs:qword_1BCDF8
vmulpd xmm0, xmm0, xmm1
vaddpd xmm0, xmm0, xmmword ptr [rbx+30h]
vmovupd xmmword ptr [rbx+30h], xmm0
}
}
else if ( a2 - 3 >= 2 )
{
if ( a2 == 5 )
{
__asm
{
vmovsd xmm0, qword ptr [rbx+28h]
vdivsd xmm0, xmm0, qword ptr [r14+4F8h]
vdivsd xmm0, xmm0, cs:qword_1BCBF8
vaddsd xmm0, xmm0, cs:qword_1BCBD0
vmovapd [rsp+4B8h+var_4B8], xmm1
}
*(double *)&_XMM0 = log(*(double *)&_XMM0);
__asm
{
vmulsd xmm0, xmm0, qword ptr [rsp+4B8h+var_4B8]
vmulsd xmm0, xmm0, cs:qword_1BCDF0
vmulsd xmm0, xmm0, qword ptr [r14+4F8h]
vaddsd xmm0, xmm0, qword ptr [rbx+28h]
vmovsd qword ptr [rbx+28h], xmm0
}
}
else
{
strncpy(v56, "mjv_moveCamera", 1024LL);
snprintf(v57, 1010LL, ": unexpected action %d", a2);
mju_error_raw(v56);
}
}
else
{
if ( *a4 == 1 )
return;
__asm
{
vmovaps [rsp+4B8h+var_4B8], xmm1
vmovaps [rsp+4B8h+var_4A8], xmm0
}
mjv_cameraInModel((long long)v56, (long long)v55, 0LL, a3, _XMM0, *(double *)_XMM1.m128_u64, a7, a8);
__asm
{
vmovapd xmm0, [rsp+4B8h+var_4A8]
vmovaps xmm1, [rsp+4B8h+var_4B8]
}
convert2D(v53, a2, v55, *(double *)&_XMM0, *(double *)&_XMM1);
mju_sub3(v54, _RBX + 4, v56);
_XMM0 = mjv_frustumHeight(a3);
__asm { vmovapd [rsp+4B8h+var_4B8], xmm0 }
*(double *)&_XMM0 = mju_dot3(v54, v55);
__asm
{
vmovddup xmm1, cs:qword_1BCBA0
vxorpd xmm1, xmm1, [rsp+4B8h+var_4B8]
vmulsd xmm0, xmm0, xmm1
}
mju_addToScl3(_RBX + 4, v53);
}
__asm
{
vmovsd xmm0, qword ptr [rbx+30h]
vmovsd xmm1, cs:qword_1BCE00
vucomisd xmm0, xmm1
vaddsd xmm2, xmm0, cs:qword_1BCE08
vcmpltsd xmm1, xmm1, xmm0
vblendvpd xmm0, xmm0, xmm2, xmm1
}
if ( v10 || v11 )
{
__asm
{
vmovsd xmm1, cs:qword_1BCDF8
vucomisd xmm1, xmm0
}
}
else
{
__asm
{
vaddsd xmm1, xmm0, cs:qword_1BCD58
vcmpltsd xmm2, xmm0, cs:qword_1BCDF8
vblendvpd xmm0, xmm0, xmm1, xmm2
vmovlpd qword ptr [rbx+30h], xmm0
}
}
__asm
{
vmovsd xmm1, qword ptr [rbx+38h]
vmovsd xmm0, cs:qword_1BCE10
vucomisd xmm1, xmm0
}
if ( v10 || v11 )
{
__asm
{
vmovsd xmm0, cs:qword_1BCE18
vucomisd xmm0, xmm1
}
}
else
{
__asm { vmovsd qword ptr [rbx+38h], xmm0 }
}
__asm
{
vmovsd xmm0, qword ptr [rbx+28h]
vmovsd xmm1, qword ptr [r14+4F8h]
vmulsd xmm2, xmm1, cs:qword_1BCD68
vucomisd xmm2, xmm0
vmaxsd xmm0, xmm2, xmm0
vmulsd xmm1, xmm1, cs:qword_1BCE20
}
if ( v10 || v11 )
{
__asm { vucomisd xmm0, xmm1 }
}
else
{
__asm
{
vminsd xmm0, xmm1, xmm0
vmovsd qword ptr [rbx+28h], xmm0
}
}
}
}
|
mjv_moveCamera:
MOV EAX,dword ptr [RCX]
CMP EAX,0x2
JZ 0x001a71a5
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x488
MOV RBX,RCX
MOV R15D,ESI
MOV R14,RDI
LEA ECX,[R15 + -0x1]
CMP ECX,0x2
JC 0x001a7036
LEA ECX,[R15 + -0x3]
CMP ECX,0x2
JNC 0x001a7055
CMP EAX,0x1
JZ 0x001a7194
MOV R12,RDX
LEA RDI,[RSP + 0x80]
LEA RBP,[RSP + 0x60]
MOV RSI,RBP
XOR EDX,EDX
MOV RCX,R12
VMOVAPS xmmword ptr [RSP],XMM1
VMOVAPS xmmword ptr [RSP + 0x10],XMM0
CALL 0x0012e510
LEA RDI,[RSP + 0x20]
MOV ESI,R15D
VMOVAPD XMM0,xmmword ptr [RSP + 0x10]
VMOVAPS XMM1,xmmword ptr [RSP]
MOV RDX,RBP
CALL 0x001a71a6
LEA R15,[RBX + 0x10]
LEA R13,[RSP + 0x40]
MOV RDI,R13
MOV RSI,R15
LEA RDX,[RSP + 0x80]
CALL 0x0012d100
MOV RDI,R12
CALL 0x0012e520
VMOVAPD xmmword ptr [RSP],XMM0
MOV RDI,R13
MOV RSI,RBP
CALL 0x0012d1b0
VMOVDDUP XMM1,qword ptr [0x002bcba0]
VXORPD XMM1,XMM1,xmmword ptr [RSP]
VMULSD XMM0,XMM0,XMM1
MOV RDI,R15
LEA RSI,[RSP + 0x20]
CALL 0x0012d140
JMP 0x001a70e7
LAB_001a7036:
VUNPCKLPD XMM0,XMM0,XMM1
VMOVDDUP XMM1,qword ptr [0x002bcdf8]
VMULPD XMM0,XMM0,XMM1
VADDPD XMM0,XMM0,xmmword ptr [RBX + 0x30]
VMOVUPD xmmword ptr [RBX + 0x30],XMM0
JMP 0x001a70e7
LAB_001a7055:
CMP R15D,0x5
JNZ 0x001a70a5
VMOVSD XMM0,qword ptr [RBX + 0x28]
VDIVSD XMM0,XMM0,qword ptr [R14 + 0x4f8]
VDIVSD XMM0,XMM0,qword ptr [0x002bcbf8]
VADDSD XMM0,XMM0,qword ptr [0x002bcbd0]
VMOVAPD xmmword ptr [RSP],XMM1
CALL 0x0012e4a0
VMULSD XMM0,XMM0,qword ptr [RSP]
VMULSD XMM0,XMM0,qword ptr [0x002bcdf0]
VMULSD XMM0,XMM0,qword ptr [R14 + 0x4f8]
VADDSD XMM0,XMM0,qword ptr [RBX + 0x28]
VMOVSD qword ptr [RBX + 0x28],XMM0
JMP 0x001a70e7
LAB_001a70a5:
LEA RSI,[0x2ceff8]
LEA R12,[RSP + 0x80]
MOV EDX,0x400
MOV RDI,R12
CALL 0x0012d240
LEA RDI,[RSP + 0x8e]
LEA RDX,[0x2cf007]
MOV ESI,0x3f2
MOV ECX,R15D
XOR EAX,EAX
CALL 0x0012d250
MOV RDI,R12
CALL 0x0012d260
LAB_001a70e7:
VMOVSD XMM0,qword ptr [RBX + 0x30]
VMOVSD XMM1,qword ptr [0x002bce00]
VUCOMISD XMM0,XMM1
VADDSD XMM2,XMM0,qword ptr [0x002bce08]
VCMPLTSD XMM1,XMM1,XMM0
VBLENDVPD XMM0,XMM0,XMM2,XMM1
JA 0x001a711b
VMOVSD XMM1,qword ptr [0x002bcdf8]
VUCOMISD XMM1,XMM0
JBE 0x001a7137
LAB_001a711b:
VADDSD XMM1,XMM0,qword ptr [0x002bcd58]
VCMPLTSD XMM2,XMM0,qword ptr [0x002bcdf8]
VBLENDVPD XMM0,XMM0,XMM1,XMM2
VMOVLPD qword ptr [RBX + 0x30],XMM0
LAB_001a7137:
VMOVSD XMM1,qword ptr [RBX + 0x38]
VMOVSD XMM0,qword ptr [0x002bce10]
VUCOMISD XMM1,XMM0
JA 0x001a7158
VMOVSD XMM0,qword ptr [0x002bce18]
VUCOMISD XMM0,XMM1
JBE 0x001a715d
LAB_001a7158:
VMOVSD qword ptr [RBX + 0x38],XMM0
LAB_001a715d:
VMOVSD XMM0,qword ptr [RBX + 0x28]
VMOVSD XMM1,qword ptr [R14 + 0x4f8]
VMULSD XMM2,XMM1,qword ptr [0x002bcd68]
VUCOMISD XMM2,XMM0
VMAXSD XMM0,XMM2,XMM0
VMULSD XMM1,XMM1,qword ptr [0x002bce20]
JA 0x001a718b
VUCOMISD XMM0,XMM1
JBE 0x001a7194
LAB_001a718b:
VMINSD XMM0,XMM1,XMM0
VMOVSD qword ptr [RBX + 0x28],XMM0
LAB_001a7194:
ADD RSP,0x488
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_001a71a5:
RET
|
void mjv_moveCamera(long param_1,uint param_2,int8 param_3,int *param_4)
{
int8 uVar1;
int1 auVar2 [16];
double dVar3;
ulong uVar4;
double dVar5;
int1 auVar6 [16];
int1 auVar7 [16];
int1 in_ZMM0 [64];
int1 auVar8 [16];
int1 auVar9 [16];
int1 auVar10 [16];
int1 in_ZMM1 [64];
int1 auVar11 [16];
int1 auVar12 [16];
double local_4b8;
int8 local_4a8;
int1 local_498 [32];
int1 local_478 [32];
int1 local_458 [32];
char local_438 [14];
char local_42a [1018];
if (*param_4 != 2) {
if (param_2 - 1 < 2) {
auVar8 = vunpcklpd_avx(in_ZMM0._0_16_,in_ZMM1._0_16_);
dVar5 = auVar8._8_8_ * DAT_002bcdf8;
*(double *)(param_4 + 0xc) = auVar8._0_8_ * DAT_002bcdf8 + *(double *)(param_4 + 0xc);
*(double *)(param_4 + 0xe) = dVar5 + *(double *)(param_4 + 0xe);
}
else {
local_4b8 = in_ZMM1._0_8_;
if (param_2 - 3 < 2) {
if (*param_4 == 1) {
return;
}
mjv_cameraInModel(local_438,local_458,0,param_3);
local_4a8 = in_ZMM0._0_8_;
convert2D(local_4a8,local_4b8,local_498,param_2,local_458);
mju_sub3(local_478,param_4 + 4,local_438);
uVar4 = mjv_frustumHeight(param_3);
dVar5 = (double)mju_dot3(local_478,local_458);
mju_addToScl3(dVar5 * (double)(DAT_002bcba0 ^ uVar4),param_4 + 4,local_498);
}
else if (param_2 == 5) {
dVar5 = log((*(double *)(param_4 + 10) / *(double *)(param_1 + 0x4f8)) / DAT_002bcbf8 +
DAT_002bcbd0);
*(double *)(param_4 + 10) =
dVar5 * local_4b8 * DAT_002bcdf0 * *(double *)(param_1 + 0x4f8) +
*(double *)(param_4 + 10);
}
else {
strncpy(local_438,"mjv_moveCamera",0x400);
snprintf(local_42a,0x3f2,": unexpected action %d",(ulong)param_2);
mju_error_raw(local_438);
}
}
dVar5 = *(double *)(param_4 + 0xc);
auVar6._8_8_ = 0;
auVar6._0_8_ = dVar5;
auVar8._8_8_ = 0;
auVar8._0_8_ = DAT_002bce00;
auVar8 = vcmpsd_avx(auVar8,auVar6,1);
auVar11._8_8_ = 0;
auVar11._0_8_ = dVar5 + DAT_002bce08;
auVar8 = vblendvpd_avx(auVar6,auVar11,auVar8);
if ((DAT_002bce00 < dVar5) || (auVar8._0_8_ < DAT_002bcdf8)) {
auVar2._8_8_ = 0;
auVar2._0_8_ = DAT_002bcdf8;
auVar6 = vcmpsd_avx(auVar8,auVar2,1);
auVar9._8_8_ = 0;
auVar9._0_8_ = auVar8._0_8_ + DAT_002bcd58;
auVar8 = vblendvpd_avx(auVar8,auVar9,auVar6);
uVar1 = vmovlpd_avx(auVar8);
*(int8 *)(param_4 + 0xc) = uVar1;
}
dVar5 = DAT_002bce10;
if ((DAT_002bce10 < *(double *)(param_4 + 0xe)) ||
(dVar5 = DAT_002bce18, *(double *)(param_4 + 0xe) < DAT_002bce18)) {
*(double *)(param_4 + 0xe) = dVar5;
}
auVar7._8_8_ = 0;
auVar7._0_8_ = *(double *)(param_4 + 10);
dVar5 = *(double *)(param_1 + 0x4f8) * DAT_002bcd68;
auVar12._8_8_ = 0;
auVar12._0_8_ = dVar5;
auVar8 = vmaxsd_avx(auVar12,auVar7);
dVar3 = *(double *)(param_1 + 0x4f8) * DAT_002bce20;
if ((*(double *)(param_4 + 10) < dVar5) || (dVar3 < auVar8._0_8_)) {
auVar10._8_8_ = 0;
auVar10._0_8_ = dVar3;
auVar8 = vminsd_avx(auVar10,auVar8);
*(long *)(param_4 + 10) = auVar8._0_8_;
}
}
return;
}
|
|
60,531
|
js_proxy_has
|
bluesky950520[P]quickjs/quickjs.c
|
static int js_proxy_has(JSContext *ctx, JSValue obj, JSAtom atom)
{
JSProxyData *s;
JSValue method, ret1, atom_val;
int ret, res;
JSObject *p;
JSValue args[2];
BOOL res2;
s = get_proxy_method(ctx, &method, obj, JS_ATOM_has);
if (!s)
return -1;
if (JS_IsUndefined(method))
return JS_HasProperty(ctx, s->target, atom);
atom_val = JS_AtomToValue(ctx, atom);
if (JS_IsException(atom_val)) {
JS_FreeValue(ctx, method);
return -1;
}
args[0] = s->target;
args[1] = atom_val;
ret1 = JS_CallFree(ctx, method, s->handler, 2, args);
JS_FreeValue(ctx, atom_val);
if (JS_IsException(ret1))
return -1;
ret = JS_ToBoolFree(ctx, ret1);
if (!ret) {
JSPropertyDescriptor desc;
p = JS_VALUE_GET_OBJ(s->target);
res = JS_GetOwnPropertyInternal(ctx, &desc, p, atom);
if (res < 0)
return -1;
if (res) {
res2 = !(desc.flags & JS_PROP_CONFIGURABLE);
js_free_desc(ctx, &desc);
if (res2 || !p->extensible) {
JS_ThrowTypeError(ctx, "proxy: inconsistent has");
return -1;
}
}
}
return ret;
}
|
O0
|
c
|
js_proxy_has:
subq $0x118, %rsp # imm = 0x118
movq %rsi, 0x100(%rsp)
movq %rdx, 0x108(%rsp)
movq %rdi, 0xf8(%rsp)
movl %ecx, 0xf4(%rsp)
movq 0xf8(%rsp), %rdi
movq 0x100(%rsp), %rdx
movq 0x108(%rsp), %rcx
leaq 0xd8(%rsp), %rsi
movl $0x64, %r8d
callq 0x60070
movq %rax, 0xe8(%rsp)
cmpq $0x0, 0xe8(%rsp)
jne 0x8a794
movl $0xffffffff, 0x114(%rsp) # imm = 0xFFFFFFFF
jmp 0x8aa57
movq 0xd8(%rsp), %rdi
movq 0xe0(%rsp), %rsi
callq 0x2e260
cmpl $0x0, %eax
je 0x8a7dd
movq 0xf8(%rsp), %rdi
movq 0xe8(%rsp), %rax
movl 0xf4(%rsp), %ecx
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x30ed0
movl %eax, 0x114(%rsp)
jmp 0x8aa57
movq 0xf8(%rsp), %rdi
movl 0xf4(%rsp), %esi
callq 0x28e30
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xb8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x8a85c
movq 0xf8(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
callq 0x23c90
movl $0xffffffff, 0x114(%rsp) # imm = 0xFFFFFFFF
jmp 0x8aa57
movq 0xe8(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x80(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0xf8(%rsp), %rdi
movq 0xe8(%rsp), %r8
leaq 0x80(%rsp), %rax
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
movq 0x10(%r8), %rcx
movq 0x18(%r8), %r8
movl $0x2, %r9d
movq %rax, (%rsp)
callq 0x2e280
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xf8(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
callq 0x23c90
movq 0xc8(%rsp), %rdi
movq 0xd0(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x8a945
movl $0xffffffff, 0x114(%rsp) # imm = 0xFFFFFFFF
jmp 0x8aa57
movq 0xf8(%rsp), %rdi
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
callq 0x2e330
movl %eax, 0xb4(%rsp)
cmpl $0x0, 0xb4(%rsp)
jne 0x8aa49
movq 0xe8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0xf8(%rsp), %rdi
movq 0xa8(%rsp), %rdx
movl 0xf4(%rsp), %ecx
leaq 0x20(%rsp), %rsi
callq 0x301c0
movl %eax, 0xb0(%rsp)
cmpl $0x0, 0xb0(%rsp)
jge 0x8a9cc
movl $0xffffffff, 0x114(%rsp) # imm = 0xFFFFFFFF
jmp 0x8aa57
cmpl $0x0, 0xb0(%rsp)
je 0x8aa47
movl 0x20(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x7c(%rsp)
movq 0xf8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x60a00
cmpl $0x0, 0x7c(%rsp)
jne 0x8aa18
movq 0xa8(%rsp), %rax
movb 0x5(%rax), %al
andb $0x1, %al
cmpb $0x0, %al
jne 0x8aa45
movq 0xf8(%rsp), %rdi
leaq 0x84766(%rip), %rsi # 0x10f18d
movb $0x0, %al
callq 0x2d300
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movl $0xffffffff, 0x114(%rsp) # imm = 0xFFFFFFFF
jmp 0x8aa57
jmp 0x8aa47
jmp 0x8aa49
movl 0xb4(%rsp), %eax
movl %eax, 0x114(%rsp)
movl 0x114(%rsp), %eax
addq $0x118, %rsp # imm = 0x118
retq
nopw %cs:(%rax,%rax)
|
js_proxy_has:
sub rsp, 118h
mov [rsp+118h+var_18], rsi
mov [rsp+118h+var_10], rdx
mov [rsp+118h+var_20], rdi
mov [rsp+118h+var_24], ecx
mov rdi, [rsp+118h+var_20]
mov rdx, [rsp+118h+var_18]
mov rcx, [rsp+118h+var_10]
lea rsi, [rsp+118h+var_40]
mov r8d, 64h ; 'd'
call get_proxy_method
mov [rsp+118h+var_30], rax
cmp [rsp+118h+var_30], 0
jnz short loc_8A794
mov [rsp+118h+var_4], 0FFFFFFFFh
jmp loc_8AA57
loc_8A794:
mov rdi, [rsp+118h+var_40]
mov rsi, [rsp+118h+var_38]
call JS_IsUndefined_0
cmp eax, 0
jz short loc_8A7DD
mov rdi, [rsp+118h+var_20]
mov rax, [rsp+118h+var_30]
mov ecx, [rsp+118h+var_24]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_HasProperty
mov [rsp+118h+var_4], eax
jmp loc_8AA57
loc_8A7DD:
mov rdi, [rsp+118h+var_20]
mov esi, [rsp+118h+var_24]
call JS_AtomToValue
mov [rsp+118h+var_B0], rax
mov [rsp+118h+var_A8], rdx
mov rax, [rsp+118h+var_B0]
mov [rsp+118h+var_60], rax
mov rax, [rsp+118h+var_A8]
mov [rsp+118h+var_58], rax
mov rdi, [rsp+118h+var_60]
mov rsi, [rsp+118h+var_58]
call JS_IsException_1
cmp eax, 0
jz short loc_8A85C
mov rdi, [rsp+118h+var_20]
mov rsi, [rsp+118h+var_40]
mov rdx, [rsp+118h+var_38]
call JS_FreeValue
mov [rsp+118h+var_4], 0FFFFFFFFh
jmp loc_8AA57
loc_8A85C:
mov rax, [rsp+118h+var_30]
mov rcx, [rax]
mov [rsp+118h+var_98], rcx
mov rax, [rax+8]
mov [rsp+118h+var_90], rax
mov rax, [rsp+118h+var_60]
mov [rsp+118h+var_88], rax
mov rax, [rsp+118h+var_58]
mov [rsp+118h+var_80], rax
mov rdi, [rsp+118h+var_20]
mov r8, [rsp+118h+var_30]
lea rax, [rsp+118h+var_98]
mov rsi, [rsp+118h+var_40]
mov rdx, [rsp+118h+var_38]
mov rcx, [r8+10h]
mov r8, [r8+18h]
mov r9d, 2
mov [rsp+118h+var_118], rax
call JS_CallFree
mov [rsp+118h+var_C0], rax
mov [rsp+118h+var_B8], rdx
mov rax, [rsp+118h+var_C0]
mov [rsp+118h+var_50], rax
mov rax, [rsp+118h+var_B8]
mov [rsp+118h+var_48], rax
mov rdi, [rsp+118h+var_20]
mov rsi, [rsp+118h+var_60]
mov rdx, [rsp+118h+var_58]
call JS_FreeValue
mov rdi, [rsp+118h+var_50]
mov rsi, [rsp+118h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_8A945
mov [rsp+118h+var_4], 0FFFFFFFFh
jmp loc_8AA57
loc_8A945:
mov rdi, [rsp+118h+var_20]
mov rsi, [rsp+118h+var_50]
mov rdx, [rsp+118h+var_48]
call JS_ToBoolFree
mov [rsp+118h+var_64], eax
cmp [rsp+118h+var_64], 0
jnz loc_8AA49
mov rax, [rsp+118h+var_30]
mov rax, [rax]
mov [rsp+118h+var_70], rax
mov rdi, [rsp+118h+var_20]
mov rdx, [rsp+118h+var_70]
mov ecx, [rsp+118h+var_24]
lea rsi, [rsp+118h+var_F8]
call JS_GetOwnPropertyInternal
mov [rsp+118h+var_68], eax
cmp [rsp+118h+var_68], 0
jge short loc_8A9CC
mov [rsp+118h+var_4], 0FFFFFFFFh
jmp loc_8AA57
loc_8A9CC:
cmp [rsp+118h+var_68], 0
jz short loc_8AA47
mov eax, [rsp+118h+var_F8]
and eax, 1
cmp eax, 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
mov [rsp+118h+var_9C], eax
mov rdi, [rsp+118h+var_20]
lea rsi, [rsp+118h+var_F8]
call js_free_desc
cmp [rsp+118h+var_9C], 0
jnz short loc_8AA18
mov rax, [rsp+118h+var_70]
mov al, [rax+5]
and al, 1
cmp al, 0
jnz short loc_8AA45
loc_8AA18:
mov rdi, [rsp+118h+var_20]
lea rsi, aProxyInconsist_5; "proxy: inconsistent has"
mov al, 0
call JS_ThrowTypeError
mov [rsp+118h+var_108], rax
mov [rsp+118h+var_100], rdx
mov [rsp+118h+var_4], 0FFFFFFFFh
jmp short loc_8AA57
loc_8AA45:
jmp short $+2
loc_8AA47:
jmp short $+2
loc_8AA49:
mov eax, [rsp+118h+var_64]
mov [rsp+118h+var_4], eax
loc_8AA57:
mov eax, [rsp+118h+var_4]
add rsp, 118h
retn
|
long long js_proxy_has(
long long a1,
long long a2,
long long a3,
unsigned int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
long long v13; // rdx
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
__m128 v18; // xmm4
__m128 v19; // xmm5
char v21; // [rsp+0h] [rbp-118h]
long long v22[7]; // [rsp+20h] [rbp-F8h] BYREF
long long v23; // [rsp+58h] [rbp-C0h]
long long v24; // [rsp+60h] [rbp-B8h]
long long v25; // [rsp+68h] [rbp-B0h]
long long v26; // [rsp+70h] [rbp-A8h]
BOOL v27; // [rsp+7Ch] [rbp-9Ch]
_QWORD v28[5]; // [rsp+80h] [rbp-98h] BYREF
long long v29; // [rsp+A8h] [rbp-70h]
int OwnPropertyInternal; // [rsp+B0h] [rbp-68h]
unsigned int v31; // [rsp+B4h] [rbp-64h]
long long v32; // [rsp+B8h] [rbp-60h]
long long v33; // [rsp+C0h] [rbp-58h]
long long v34; // [rsp+C8h] [rbp-50h]
long long v35; // [rsp+D0h] [rbp-48h]
long long v36; // [rsp+D8h] [rbp-40h] BYREF
long long v37; // [rsp+E0h] [rbp-38h]
long long *proxy_method; // [rsp+E8h] [rbp-30h]
unsigned int v39; // [rsp+F4h] [rbp-24h]
long long v40; // [rsp+F8h] [rbp-20h]
long long v41; // [rsp+100h] [rbp-18h]
long long v42; // [rsp+108h] [rbp-10h]
v41 = a2;
v42 = a3;
v40 = a1;
v39 = a4;
proxy_method = (long long *)get_proxy_method(a1, &v36, a2, a3, 100);
if ( proxy_method )
{
if ( JS_IsUndefined_0(v36, v37) )
{
return (unsigned int)JS_HasProperty(v40, *proxy_method, proxy_method[1], v39);
}
else
{
v25 = JS_AtomToValue(v40, v39);
v26 = v12;
v32 = v25;
v33 = v12;
if ( JS_IsException_1(v25, v12) )
{
JS_FreeValue(v40, v36, v37);
return (unsigned int)-1;
}
else
{
v28[0] = *proxy_method;
v28[1] = proxy_method[1];
v28[2] = v32;
v28[3] = v33;
v23 = JS_CallFree(v40, v36, v37, proxy_method[2], proxy_method[3], 2, (long long)v28);
v24 = v13;
v34 = v23;
v35 = v13;
JS_FreeValue(v40, v32, v33);
if ( !JS_IsException_1(v34, v35) )
{
v31 = JS_ToBoolFree(v40, v34, v35);
if ( !v31 )
{
v29 = *proxy_method;
OwnPropertyInternal = JS_GetOwnPropertyInternal(v40, (long long)v22, v29, v39);
if ( OwnPropertyInternal < 0 )
return (unsigned int)-1;
if ( OwnPropertyInternal )
{
v27 = (v22[0] & 1) == 0;
js_free_desc(v40, v22);
if ( v27 || (*(_BYTE *)(v29 + 5) & 1) == 0 )
{
JS_ThrowTypeError(
v40,
(long long)"proxy: inconsistent has",
v14,
v15,
v16,
v17,
a5,
a6,
a7,
a8,
v18,
v19,
a11,
a12,
v21);
return (unsigned int)-1;
}
}
}
return v31;
}
return (unsigned int)-1;
}
}
}
else
{
return (unsigned int)-1;
}
}
|
js_proxy_has:
SUB RSP,0x118
MOV qword ptr [RSP + 0x100],RSI
MOV qword ptr [RSP + 0x108],RDX
MOV qword ptr [RSP + 0xf8],RDI
MOV dword ptr [RSP + 0xf4],ECX
MOV RDI,qword ptr [RSP + 0xf8]
MOV RDX,qword ptr [RSP + 0x100]
MOV RCX,qword ptr [RSP + 0x108]
LEA RSI,[RSP + 0xd8]
MOV R8D,0x64
CALL 0x00160070
MOV qword ptr [RSP + 0xe8],RAX
CMP qword ptr [RSP + 0xe8],0x0
JNZ 0x0018a794
MOV dword ptr [RSP + 0x114],0xffffffff
JMP 0x0018aa57
LAB_0018a794:
MOV RDI,qword ptr [RSP + 0xd8]
MOV RSI,qword ptr [RSP + 0xe0]
CALL 0x0012e260
CMP EAX,0x0
JZ 0x0018a7dd
MOV RDI,qword ptr [RSP + 0xf8]
MOV RAX,qword ptr [RSP + 0xe8]
MOV ECX,dword ptr [RSP + 0xf4]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00130ed0
MOV dword ptr [RSP + 0x114],EAX
JMP 0x0018aa57
LAB_0018a7dd:
MOV RDI,qword ptr [RSP + 0xf8]
MOV ESI,dword ptr [RSP + 0xf4]
CALL 0x00128e30
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0xc0],RAX
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x0018a85c
MOV RDI,qword ptr [RSP + 0xf8]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
CALL 0x00123c90
MOV dword ptr [RSP + 0x114],0xffffffff
JMP 0x0018aa57
LAB_0018a85c:
MOV RAX,qword ptr [RSP + 0xe8]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0x80],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0xc0]
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0xf8]
MOV R8,qword ptr [RSP + 0xe8]
LEA RAX,[RSP + 0x80]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
MOV RCX,qword ptr [R8 + 0x10]
MOV R8,qword ptr [R8 + 0x18]
MOV R9D,0x2
MOV qword ptr [RSP],RAX
CALL 0x0012e280
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RDX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xd0],RAX
MOV RDI,qword ptr [RSP + 0xf8]
MOV RSI,qword ptr [RSP + 0xb8]
MOV RDX,qword ptr [RSP + 0xc0]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0xc8]
MOV RSI,qword ptr [RSP + 0xd0]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x0018a945
MOV dword ptr [RSP + 0x114],0xffffffff
JMP 0x0018aa57
LAB_0018a945:
MOV RDI,qword ptr [RSP + 0xf8]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
CALL 0x0012e330
MOV dword ptr [RSP + 0xb4],EAX
CMP dword ptr [RSP + 0xb4],0x0
JNZ 0x0018aa49
MOV RAX,qword ptr [RSP + 0xe8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0xa8],RAX
MOV RDI,qword ptr [RSP + 0xf8]
MOV RDX,qword ptr [RSP + 0xa8]
MOV ECX,dword ptr [RSP + 0xf4]
LEA RSI,[RSP + 0x20]
CALL 0x001301c0
MOV dword ptr [RSP + 0xb0],EAX
CMP dword ptr [RSP + 0xb0],0x0
JGE 0x0018a9cc
MOV dword ptr [RSP + 0x114],0xffffffff
JMP 0x0018aa57
LAB_0018a9cc:
CMP dword ptr [RSP + 0xb0],0x0
JZ 0x0018aa47
MOV EAX,dword ptr [RSP + 0x20]
AND EAX,0x1
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RSP + 0x7c],EAX
MOV RDI,qword ptr [RSP + 0xf8]
LEA RSI,[RSP + 0x20]
CALL 0x00160a00
CMP dword ptr [RSP + 0x7c],0x0
JNZ 0x0018aa18
MOV RAX,qword ptr [RSP + 0xa8]
MOV AL,byte ptr [RAX + 0x5]
AND AL,0x1
CMP AL,0x0
JNZ 0x0018aa45
LAB_0018aa18:
MOV RDI,qword ptr [RSP + 0xf8]
LEA RSI,[0x20f18d]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV dword ptr [RSP + 0x114],0xffffffff
JMP 0x0018aa57
LAB_0018aa45:
JMP 0x0018aa47
LAB_0018aa47:
JMP 0x0018aa49
LAB_0018aa49:
MOV EAX,dword ptr [RSP + 0xb4]
MOV dword ptr [RSP + 0x114],EAX
LAB_0018aa57:
MOV EAX,dword ptr [RSP + 0x114]
ADD RSP,0x118
RET
|
int js_proxy_has(int8 param_1,int8 param_2,int8 param_3,int4 param_4)
{
int iVar1;
uint local_f8 [14];
int1 local_c0 [16];
int1 local_b0 [16];
uint local_9c;
long local_98;
long local_90;
int1 local_88 [16];
long local_70;
int local_68;
int local_64;
int1 local_60 [16];
int1 local_50 [16];
int8 local_40;
int8 local_38;
long *local_30;
int4 local_24;
int8 local_20;
int8 local_18;
int8 local_10;
int local_4;
local_24 = param_4;
local_20 = param_1;
local_18 = param_2;
local_10 = param_3;
local_30 = (long *)get_proxy_method(param_1,&local_40,param_2,param_3,100);
if (local_30 == (long *)0x0) {
local_4 = -1;
}
else {
iVar1 = JS_IsUndefined(local_40,local_38);
if (iVar1 == 0) {
local_b0 = JS_AtomToValue(local_20,local_24);
local_60 = local_b0;
iVar1 = JS_IsException(local_b0._0_8_,local_b0._8_8_);
if (iVar1 == 0) {
local_98 = *local_30;
local_90 = local_30[1];
local_88 = local_60;
local_c0 = JS_CallFree(local_20,local_40,local_38,local_30[2],local_30[3],2,&local_98);
local_50 = local_c0;
JS_FreeValue(local_20,local_60._0_8_,local_60._8_8_);
iVar1 = JS_IsException(local_50._0_8_,local_50._8_8_);
if (iVar1 == 0) {
local_64 = JS_ToBoolFree(local_20,local_50._0_8_,local_50._8_8_);
if (local_64 == 0) {
local_70 = *local_30;
local_68 = JS_GetOwnPropertyInternal(local_20,local_f8,local_70,local_24);
if (local_68 < 0) {
return -1;
}
if (local_68 != 0) {
local_9c = (uint)(((local_f8[0] & 1) != 0 ^ 0xffU) & 1);
js_free_desc(local_20,local_f8);
if ((local_9c != 0) || ((*(byte *)(local_70 + 5) & 1) == 0)) {
JS_ThrowTypeError(local_20,"proxy: inconsistent has");
return -1;
}
}
}
local_4 = local_64;
}
else {
local_4 = -1;
}
}
else {
JS_FreeValue(local_20,local_40,local_38);
local_4 = -1;
}
}
else {
local_4 = JS_HasProperty(local_20,*local_30,local_30[1],local_24);
}
}
return local_4;
}
|
|
60,532
|
js_proxy_has
|
bluesky950520[P]quickjs/quickjs.c
|
static int js_proxy_has(JSContext *ctx, JSValue obj, JSAtom atom)
{
JSProxyData *s;
JSValue method, ret1, atom_val;
int ret, res;
JSObject *p;
JSValue args[2];
BOOL res2;
s = get_proxy_method(ctx, &method, obj, JS_ATOM_has);
if (!s)
return -1;
if (JS_IsUndefined(method))
return JS_HasProperty(ctx, s->target, atom);
atom_val = JS_AtomToValue(ctx, atom);
if (JS_IsException(atom_val)) {
JS_FreeValue(ctx, method);
return -1;
}
args[0] = s->target;
args[1] = atom_val;
ret1 = JS_CallFree(ctx, method, s->handler, 2, args);
JS_FreeValue(ctx, atom_val);
if (JS_IsException(ret1))
return -1;
ret = JS_ToBoolFree(ctx, ret1);
if (!ret) {
JSPropertyDescriptor desc;
p = JS_VALUE_GET_OBJ(s->target);
res = JS_GetOwnPropertyInternal(ctx, &desc, p, atom);
if (res < 0)
return -1;
if (res) {
res2 = !(desc.flags & JS_PROP_CONFIGURABLE);
js_free_desc(ctx, &desc);
if (res2 || !p->extensible) {
JS_ThrowTypeError(ctx, "proxy: inconsistent has");
return -1;
}
}
}
return ret;
}
|
O1
|
c
|
js_proxy_has:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %ecx, %r14d
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x18(%rsp), %rsi
movl $0x64, %r8d
callq 0x3d3e0
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x4f00a
movq %rax, %r15
movq 0x20(%rsp), %r12
cmpl $0x3, %r12d
je 0x4f01e
movq %rbx, %rdi
movl %r14d, 0xc(%rsp)
movl %r14d, %esi
xorl %edx, %edx
callq 0x2075a
movq %rdx, %r14
cmpl $0x6, %r14d
jne 0x4ef4e
movq 0x18(%rsp), %rsi
movq 0x18(%rbx), %rdi
movq %r12, %rdx
callq 0x1d8c6
jmp 0x4f00a
movq %rax, %r13
movups (%r15), %xmm0
leaq 0x60(%rsp), %rax
movaps %xmm0, (%rax)
movq %r13, 0x10(%rax)
movq %r14, 0x18(%rax)
movq 0x18(%rsp), %rsi
movq 0x10(%r15), %rcx
movq 0x18(%r15), %r8
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r12, %rdx
movl $0x2, %r9d
callq 0x22c9d
movq %rax, 0x10(%rsp)
movq %rdx, %r12
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1d8c6
cmpl $0x6, %r12d
je 0x4f00a
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x22d0d
movl %eax, %ebp
testl %eax, %eax
jne 0x4f00a
movq (%r15), %r14
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
movl 0xc(%rsp), %ecx
callq 0x23bd9
testl %eax, %eax
js 0x4f005
je 0x4f00a
leaq 0x28(%rsp), %rsi
movb (%rsi), %r15b
movq %rbx, %rdi
callq 0x3d8c3
testb $0x1, %r15b
je 0x4eff4
testb $0x1, 0x5(%r14)
jne 0x4f00a
leaq 0x5112e(%rip), %rsi # 0xa0129
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
movl %r14d, %ecx
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf753
|
js_proxy_has:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r14d, ecx
mov rcx, rdx
mov rdx, rsi
mov rbx, rdi
lea rsi, [rsp+0B8h+var_A0]
mov r8d, 64h ; 'd'
call get_proxy_method
mov ebp, 0FFFFFFFFh
test rax, rax
jz loc_4F00A
mov r15, rax
mov r12, [rsp+0B8h+var_98]
cmp r12d, 3
jz loc_4F01E
mov rdi, rbx
mov [rsp+0B8h+var_AC], r14d
mov esi, r14d
xor edx, edx
call __JS_AtomToValue
mov r14, rdx
cmp r14d, 6
jnz short loc_4EF4E
mov rsi, [rsp+0B8h+var_A0]
mov rdi, [rbx+18h]
mov rdx, r12
call JS_FreeValueRT
jmp loc_4F00A
loc_4EF4E:
mov r13, rax
movups xmm0, xmmword ptr [r15]
lea rax, [rsp+0B8h+var_58]
movaps xmmword ptr [rax], xmm0
mov [rax+10h], r13
mov [rax+18h], r14
mov rsi, [rsp+0B8h+var_A0]
mov rcx, [r15+10h]
mov r8, [r15+18h]
mov [rsp+0B8h+var_B8], rax
mov rdi, rbx
mov rdx, r12
mov r9d, 2
call JS_CallFree
mov [rsp+0B8h+var_A8], rax
mov r12, rdx
mov rdi, [rbx+18h]
mov rsi, r13
mov rdx, r14
call JS_FreeValueRT
cmp r12d, 6
jz short loc_4F00A
mov rdi, rbx
mov rsi, [rsp+0B8h+var_A8]
mov rdx, r12
call JS_ToBoolFree
mov ebp, eax
test eax, eax
jnz short loc_4F00A
mov r14, [r15]
lea rsi, [rsp+0B8h+var_90]
mov rdi, rbx
mov rdx, r14
mov ecx, [rsp+0B8h+var_AC]
call JS_GetOwnPropertyInternal
test eax, eax
js short loc_4F005
jz short loc_4F00A
lea rsi, [rsp+0B8h+var_90]
mov r15b, [rsi]
mov rdi, rbx
call js_free_desc
test r15b, 1
jz short loc_4EFF4
test byte ptr [r14+5], 1
jnz short loc_4F00A
loc_4EFF4:
lea rsi, aProxyInconsist_5; "proxy: inconsistent has"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
loc_4F005:
mov ebp, 0FFFFFFFFh
loc_4F00A:
mov eax, ebp
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4F01E:
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
mov ecx, r14d
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_HasProperty
|
long long js_proxy_has(
long long a1,
long long a2,
long long a3,
unsigned int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
long long a13,
long long a14)
{
long long *proxy_method; // rax
unsigned int v16; // ebp
long long *v17; // r15
long long v18; // r12
long long v19; // rax
long long v20; // rdx
long long v21; // r14
_DWORD *v22; // r13
__m128 v23; // xmm0
long long v24; // rdx
long long v25; // r12
long long v26; // r14
int OwnPropertyInternal; // eax
char v28; // r15
long long v29; // rdx
long long v30; // rcx
long long v31; // r8
long long v32; // r9
__m128 v33; // xmm4
__m128 v34; // xmm5
char v36; // [rsp+0h] [rbp-B8h]
int v37; // [rsp+Ch] [rbp-ACh]
long long v38; // [rsp+10h] [rbp-A8h]
_DWORD *v39; // [rsp+18h] [rbp-A0h] BYREF
long long v40; // [rsp+20h] [rbp-98h]
_BYTE v41[56]; // [rsp+28h] [rbp-90h] BYREF
__m128 v42; // [rsp+60h] [rbp-58h] BYREF
long long v43; // [rsp+70h] [rbp-48h]
long long v44; // [rsp+78h] [rbp-40h]
proxy_method = (long long *)get_proxy_method(
a1,
(unsigned long long *)&v39,
a2,
a3,
100LL,
a14,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12);
v16 = -1;
if ( !proxy_method )
return v16;
v17 = proxy_method;
v18 = v40;
if ( (_DWORD)v40 != 3 )
{
v37 = a4;
v19 = _JS_AtomToValue(a1, a4, 0);
v21 = v20;
if ( (_DWORD)v20 == 6 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v39, v18);
}
else
{
v22 = (_DWORD *)v19;
v23 = *(__m128 *)v17;
v42 = *(__m128 *)v17;
v43 = v19;
v44 = v20;
v38 = JS_CallFree(a1, v39, v18, v17[2], v17[3], 2, (long long)&v42);
v25 = v24;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v22, v21);
if ( (_DWORD)v25 == 6 )
return v16;
v16 = JS_ToBoolFree(a1, v38, v25);
if ( v16 )
return v16;
v26 = *v17;
OwnPropertyInternal = JS_GetOwnPropertyInternal(a1, (long long)v41, *v17, v37);
if ( OwnPropertyInternal >= 0 )
{
if ( !OwnPropertyInternal )
return v16;
v28 = v41[0];
js_free_desc(a1, (long long)v41);
if ( (v28 & 1) != 0 && (*(_BYTE *)(v26 + 5) & 1) != 0 )
return v16;
JS_ThrowTypeError(
a1,
(long long)"proxy: inconsistent has",
v29,
v30,
v31,
v32,
v23,
a6,
a7,
a8,
v33,
v34,
a11,
a12,
v36);
}
return (unsigned int)-1;
}
return v16;
}
return JS_HasProperty(a1, *proxy_method, proxy_method[1], a4);
}
|
js_proxy_has:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14D,ECX
MOV RCX,RDX
MOV RDX,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x18]
MOV R8D,0x64
CALL 0x0013d3e0
MOV EBP,0xffffffff
TEST RAX,RAX
JZ 0x0014f00a
MOV R15,RAX
MOV R12,qword ptr [RSP + 0x20]
CMP R12D,0x3
JZ 0x0014f01e
MOV RDI,RBX
MOV dword ptr [RSP + 0xc],R14D
MOV ESI,R14D
XOR EDX,EDX
CALL 0x0012075a
MOV R14,RDX
CMP R14D,0x6
JNZ 0x0014ef4e
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,R12
CALL 0x0011d8c6
JMP 0x0014f00a
LAB_0014ef4e:
MOV R13,RAX
MOVUPS XMM0,xmmword ptr [R15]
LEA RAX,[RSP + 0x60]
MOVAPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],R13
MOV qword ptr [RAX + 0x18],R14
MOV RSI,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [R15 + 0x10]
MOV R8,qword ptr [R15 + 0x18]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV RDX,R12
MOV R9D,0x2
CALL 0x00122c9d
MOV qword ptr [RSP + 0x10],RAX
MOV R12,RDX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R13
MOV RDX,R14
CALL 0x0011d8c6
CMP R12D,0x6
JZ 0x0014f00a
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,R12
CALL 0x00122d0d
MOV EBP,EAX
TEST EAX,EAX
JNZ 0x0014f00a
MOV R14,qword ptr [R15]
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
MOV RDX,R14
MOV ECX,dword ptr [RSP + 0xc]
CALL 0x00123bd9
TEST EAX,EAX
JS 0x0014f005
JZ 0x0014f00a
LEA RSI,[RSP + 0x28]
MOV R15B,byte ptr [RSI]
MOV RDI,RBX
CALL 0x0013d8c3
TEST R15B,0x1
JZ 0x0014eff4
TEST byte ptr [R14 + 0x5],0x1
JNZ 0x0014f00a
LAB_0014eff4:
LEA RSI,[0x1a0129]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00122567
LAB_0014f005:
MOV EBP,0xffffffff
LAB_0014f00a:
MOV EAX,EBP
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014f01e:
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,RBX
MOV ECX,R14D
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0010f753
|
ulong js_proxy_has(long param_1,int8 param_2,int8 param_3,int4 param_4)
{
long lVar1;
uint uVar2;
int iVar3;
long *plVar4;
int8 uVar5;
int8 uVar6;
ulong uVar7;
int1 auVar8 [16];
int8 local_a0;
int8 local_98;
byte local_90 [56];
int4 local_58;
int4 uStack_54;
int4 uStack_50;
int4 uStack_4c;
int1 local_48 [16];
plVar4 = (long *)get_proxy_method(param_1,&local_a0,param_2,param_3,100);
uVar7 = 0xffffffff;
if (plVar4 != (long *)0x0) {
if ((int)local_98 == 3) {
uVar7 = JS_HasProperty(param_1,*plVar4,plVar4[1],param_4);
return uVar7;
}
local_48 = __JS_AtomToValue(param_1,param_4,0);
uVar6 = local_48._8_8_;
uVar5 = local_48._0_8_;
if (local_48._8_4_ == 6) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_a0,local_98);
}
else {
local_58 = (int4)*plVar4;
uStack_54 = *(int4 *)((long)plVar4 + 4);
uStack_50 = (int4)plVar4[1];
uStack_4c = *(int4 *)((long)plVar4 + 0xc);
auVar8 = JS_CallFree(param_1,local_a0,local_98,plVar4[2],plVar4[3],2,&local_58);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar5,uVar6);
if (auVar8._8_4_ != 6) {
uVar2 = JS_ToBoolFree(param_1,auVar8._0_8_,auVar8._8_8_);
uVar7 = (ulong)uVar2;
if (uVar2 == 0) {
lVar1 = *plVar4;
iVar3 = JS_GetOwnPropertyInternal(param_1,local_90,lVar1,param_4);
if (-1 < iVar3) {
if (iVar3 == 0) {
return uVar7;
}
js_free_desc(param_1);
if (((local_90[0] & 1) != 0) && ((*(byte *)(lVar1 + 5) & 1) != 0)) {
return uVar7;
}
JS_ThrowTypeError(param_1,"proxy: inconsistent has");
}
uVar7 = 0xffffffff;
}
}
}
}
return uVar7;
}
|
|
60,533
|
google::protobuf::DescriptorBuilder::OptionInterpreter::SetInt32(int, int, google::protobuf::FieldDescriptor::Type, google::protobuf::UnknownFieldSet*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
void DescriptorBuilder::OptionInterpreter::SetInt32(
int number, int32_t value, FieldDescriptor::Type type,
UnknownFieldSet* unknown_fields) {
switch (type) {
case FieldDescriptor::TYPE_INT32:
unknown_fields->AddVarint(
number, static_cast<uint64_t>(static_cast<int64_t>(value)));
break;
case FieldDescriptor::TYPE_SFIXED32:
unknown_fields->AddFixed32(number, static_cast<uint32_t>(value));
break;
case FieldDescriptor::TYPE_SINT32:
unknown_fields->AddVarint(
number, internal::WireFormatLite::ZigZagEncode32(value));
break;
default:
GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_INT32: " << type;
break;
}
}
|
O3
|
cpp
|
google::protobuf::DescriptorBuilder::OptionInterpreter::SetInt32(int, int, google::protobuf::FieldDescriptor::Type, google::protobuf::UnknownFieldSet*):
pushq %r14
pushq %rbx
subq $0x48, %rsp
cmpl $0x11, %ecx
je 0xdc2a2
movl %ecx, %ebx
cmpl $0xf, %ecx
je 0xdc293
cmpl $0x5, %ebx
jne 0xdc2b9
movslq %edx, %rdx
jmp 0xdc2aa
movq %r8, %rdi
addq $0x48, %rsp
popq %rbx
popq %r14
jmp 0xa318c
leal (%rdx,%rdx), %eax
sarl $0x1f, %edx
xorl %eax, %edx
movq %r8, %rdi
addq $0x48, %rsp
popq %rbx
popq %r14
jmp 0xa314e
leaq 0x8fbd3(%rip), %rdx # 0x16be93
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x3, %esi
movl $0x1f95, %ecx # imm = 0x1F95
callq 0x857c2
leaq 0x91f50(%rip), %rsi # 0x16e22e
movq %r14, %rdi
callq 0x852c0
movq %rax, %rdi
movl %ebx, %esi
callq 0x855e8
leaq 0xf(%rsp), %rdi
movq %rax, %rsi
callq 0x8539a
leaq 0x10(%rsp), %rdi
callq 0x857e0
addq $0x48, %rsp
popq %rbx
popq %r14
retq
jmp 0xdc311
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x857e0
movq %rbx, %rdi
callq 0x2e220
|
_ZN6google8protobuf17DescriptorBuilder17OptionInterpreter8SetInt32EiiNS0_15FieldDescriptor4TypeEPNS0_15UnknownFieldSetE:
push r14
push rbx
sub rsp, 48h
cmp ecx, 11h
jz short loc_DC2A2
mov ebx, ecx
cmp ecx, 0Fh
jz short loc_DC293
cmp ebx, 5
jnz short loc_DC2B9
movsxd rdx, edx; unsigned int
jmp short loc_DC2AA
loc_DC293:
mov rdi, r8; this
add rsp, 48h
pop rbx
pop r14
jmp _ZN6google8protobuf15UnknownFieldSet10AddFixed32Eij; google::protobuf::UnknownFieldSet::AddFixed32(int,uint)
loc_DC2A2:
lea eax, [rdx+rdx]
sar edx, 1Fh
xor edx, eax; unsigned __int64
loc_DC2AA:
mov rdi, r8; this
add rsp, 48h
pop rbx
pop r14
jmp _ZN6google8protobuf15UnknownFieldSet9AddVarintEim; google::protobuf::UnknownFieldSet::AddVarint(int,ulong)
loc_DC2B9:
lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/aimrt_"...
lea r14, [rsp+58h+var_48]
mov rdi, r14
mov esi, 3
mov ecx, 1F95h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aInvalidWireTyp_0; "Invalid wire type for CPPTYPE_INT32: "
mov rdi, r14
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov rdi, rax
mov esi, ebx
call _ZN6google8protobuf8internal10LogMessagelsEi; google::protobuf::internal::LogMessage::operator<<(int)
lea rdi, [rsp+58h+var_49]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+58h+var_48]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
add rsp, 48h
pop rbx
pop r14
retn
jmp short $+2
loc_DC311:
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, rbx
call __Unwind_Resume
|
void google::protobuf::DescriptorBuilder::OptionInterpreter::SetInt32(
long long a1,
unsigned int a2,
long long a3,
unsigned int a4,
google::protobuf::UnknownFieldSet *a5)
{
long long v6; // rax
char *v7; // rdx
google::protobuf::internal::LogMessage *v8; // rax
char v9; // [rsp+Fh] [rbp-49h] BYREF
_BYTE v10[72]; // [rsp+10h] [rbp-48h] BYREF
switch ( a4 )
{
case 0x11u:
a3 = (2 * (_DWORD)a3) ^ (unsigned int)((int)a3 >> 31);
goto LABEL_7;
case 0xFu:
google::protobuf::UnknownFieldSet::AddFixed32(a5, a2, a3);
return;
case 5u:
a3 = (int)a3;
LABEL_7:
google::protobuf::UnknownFieldSet::AddVarint(a5, a2, a3);
return;
}
google::protobuf::internal::LogMessage::LogMessage(
(long long)v10,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc",
8085);
v6 = google::protobuf::internal::LogMessage::operator<<(
(long long)v10,
(long long)"Invalid wire type for CPPTYPE_INT32: ");
v8 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(v6, a4, v7);
google::protobuf::internal::LogFinisher::operator=((long long)&v9, v8);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v10);
}
|
SetInt32:
PUSH R14
PUSH RBX
SUB RSP,0x48
CMP ECX,0x11
JZ 0x001dc2a2
MOV EBX,ECX
CMP ECX,0xf
JZ 0x001dc293
CMP EBX,0x5
JNZ 0x001dc2b9
MOVSXD RDX,EDX
JMP 0x001dc2aa
LAB_001dc293:
MOV RDI,R8
ADD RSP,0x48
POP RBX
POP R14
JMP 0x001a318c
LAB_001dc2a2:
LEA EAX,[RDX + RDX*0x1]
SAR EDX,0x1f
XOR EDX,EAX
LAB_001dc2aa:
MOV RDI,R8
ADD RSP,0x48
POP RBX
POP R14
JMP 0x001a314e
LAB_001dc2b9:
LEA RDX,[0x26be93]
LEA R14,[RSP + 0x10]
MOV RDI,R14
MOV ESI,0x3
MOV ECX,0x1f95
CALL 0x001857c2
LAB_001dc2d7:
LEA RSI,[0x26e22e]
MOV RDI,R14
CALL 0x001852c0
MOV RDI,RAX
MOV ESI,EBX
CALL 0x001855e8
LAB_001dc2f0:
LEA RDI,[RSP + 0xf]
MOV RSI,RAX
CALL 0x0018539a
LAB_001dc2fd:
LEA RDI,[RSP + 0x10]
CALL 0x001857e0
ADD RSP,0x48
POP RBX
POP R14
RET
|
/* google::protobuf::DescriptorBuilder::OptionInterpreter::SetInt32(int, int,
google::protobuf::FieldDescriptor::Type, google::protobuf::UnknownFieldSet*) */
void __thiscall
google::protobuf::DescriptorBuilder::OptionInterpreter::SetInt32
(int8 param_1_00,int param_1,uint param_2,int param_4,UnknownFieldSet *param_5)
{
LogMessage *pLVar1;
ulong uVar2;
LogFinisher local_49;
LogMessage local_48 [56];
if (param_4 == 0x11) {
uVar2 = (ulong)((int)param_2 >> 0x1f ^ param_2 * 2);
}
else {
if (param_4 == 0xf) {
UnknownFieldSet::AddFixed32(param_5,param_1,param_2);
return;
}
if (param_4 != 5) {
internal::LogMessage::LogMessage
(local_48,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc"
,0x1f95);
/* try { // try from 001dc2d7 to 001dc2ef has its CatchHandler @ 001dc311 */
pLVar1 = (LogMessage *)
internal::LogMessage::operator<<(local_48,"Invalid wire type for CPPTYPE_INT32: ");
pLVar1 = (LogMessage *)internal::LogMessage::operator<<(pLVar1,param_4);
/* try { // try from 001dc2f0 to 001dc2fc has its CatchHandler @ 001dc30f */
internal::LogFinisher::operator=(&local_49,pLVar1);
internal::LogMessage::~LogMessage(local_48);
return;
}
uVar2 = (ulong)(int)param_2;
}
UnknownFieldSet::AddVarint(param_5,param_1,uVar2);
return;
}
|
|
60,534
|
void google::protobuf::internal::InternalMetadata::DoMergeFrom<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/message_lite.cc
|
void InternalMetadata::DoMergeFrom<std::string>(const std::string& other) {
mutable_unknown_fields<std::string>()->append(other);
}
|
O3
|
cpp
|
void google::protobuf::internal::InternalMetadata::DoMergeFrom<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rax
movq (%rdi), %rdi
testb $0x1, %dil
je 0x9e98b
andq $-0x4, %rdi
addq $0x8, %rdi
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
popq %rbx
jmp 0x13a4e
movq %rax, %rdi
callq 0x9c058
movq %rax, %rdi
jmp 0x9e97e
|
_ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRKT_:
push rbx
mov rbx, rsi
mov rax, rdi
mov rdi, [rdi]
test dil, 1
jz short loc_9E98B
and rdi, 0FFFFFFFFFFFFFFFCh
add rdi, 8
loc_9E97E:
mov rsi, [rbx]
mov rdx, [rbx+8]
pop rbx
jmp _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
loc_9E98B:
mov rdi, rax
call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<std::string>(void)
mov rdi, rax
jmp short loc_9E97E
|
_QWORD * google::protobuf::internal::InternalMetadata::DoMergeFrom<std::string>(long long *a1, long long a2)
{
long long v3; // rdi
_QWORD *v4; // rdi
v3 = *a1;
if ( (v3 & 1) != 0 )
v4 = (_QWORD *)((v3 & 0xFFFFFFFFFFFFFFFCLL) + 8);
else
v4 = (_QWORD *)google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<std::string>(a1);
return std::string::_M_append(v4, *(_BYTE **)a2, *(_QWORD *)(a2 + 8));
}
|
DoMergeFrom<std::__cxx11::string>:
PUSH RBX
MOV RBX,RSI
MOV RAX,RDI
MOV RDI,qword ptr [RDI]
TEST DIL,0x1
JZ 0x0019e98b
AND RDI,-0x4
ADD RDI,0x8
LAB_0019e97e:
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
POP RBX
JMP 0x00113a4e
LAB_0019e98b:
MOV RDI,RAX
CALL 0x0019c058
MOV RDI,RAX
JMP 0x0019e97e
|
/* void google::protobuf::internal::InternalMetadata::DoMergeFrom<std::__cxx11::string
>(std::__cxx11::string const&) */
void __thiscall
google::protobuf::internal::InternalMetadata::DoMergeFrom<std::__cxx11::string>
(InternalMetadata *this,string *param_1)
{
string *this_00;
if ((*(ulong *)this & 1) == 0) {
this_00 = mutable_unknown_fields_slow<std::__cxx11::string>(this);
}
else {
this_00 = (string *)((*(ulong *)this & 0xfffffffffffffffc) + 8);
}
std::__cxx11::string::_M_append(this_00,*(char **)param_1,*(ulong *)(param_1 + 8));
return;
}
|
|
60,535
|
bitmap_get_first
|
eloqsql/mysys/my_bitmap.c
|
uint bitmap_get_first(const MY_BITMAP *map)
{
uchar *byte_ptr;
uint i,j,k;
my_bitmap_map *data_ptr, *end= map->last_word_ptr;
DBUG_ASSERT(map->bitmap);
data_ptr= map->bitmap;
*map->last_word_ptr|= map->last_word_mask;
for (i=0; data_ptr < end; data_ptr++, i++)
if (*data_ptr != 0xFFFFFFFF)
goto found;
if ((*data_ptr | map->last_word_mask) == 0xFFFFFFFF)
return MY_BIT_NONE;
found:
byte_ptr= (uchar*)data_ptr;
for (j=0; ; j++, byte_ptr++)
{
if (*byte_ptr != 0xFF)
{
for (k=0; ; k++)
{
if (!(*byte_ptr & (1 << k)))
return (i*32) + (j*8) + k;
}
}
}
DBUG_ASSERT(0);
return MY_BIT_NONE; /* Impossible */
}
|
O3
|
c
|
bitmap_get_first:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
movl 0x18(%rdi), %eax
orl %eax, (%rdx)
xorl %eax, %eax
cmpq %rdx, %rcx
jae 0x9e751
xorl %eax, %eax
movl (%rcx), %r8d
cmpl $-0x1, %r8d
jne 0x9e75f
addq $0x4, %rcx
incl %eax
cmpq %rdx, %rcx
jb 0x9e73d
movl (%rcx), %r8d
movl 0x18(%rdi), %edx
orl %r8d, %edx
cmpl $-0x1, %edx
je 0x9e798
xorl %edx, %edx
movl $0x0, %esi
cmpb $-0x1, %r8b
jne 0x9e780
incq %rcx
xorl %esi, %esi
movb (%rcx), %r8b
addl $0x8, %esi
incq %rcx
cmpb $-0x1, %r8b
je 0x9e771
movzbl %r8b, %ecx
btl %edx, %ecx
leal 0x1(%rdx), %edx
jb 0x9e784
shll $0x5, %eax
addl %eax, %esi
leal (%rdx,%rsi), %eax
decl %eax
jmp 0x9e79d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbp
retq
|
bitmap_get_first:
push rbp
mov rbp, rsp
mov rcx, [rdi]
mov rdx, [rdi+8]
mov eax, [rdi+18h]
or [rdx], eax
xor eax, eax
cmp rcx, rdx
jnb short loc_9E751
xor eax, eax
loc_9E73D:
mov r8d, [rcx]
cmp r8d, 0FFFFFFFFh
jnz short loc_9E75F
add rcx, 4
inc eax
cmp rcx, rdx
jb short loc_9E73D
loc_9E751:
mov r8d, [rcx]
mov edx, [rdi+18h]
or edx, r8d
cmp edx, 0FFFFFFFFh
jz short loc_9E798
loc_9E75F:
xor edx, edx
mov esi, 0
cmp r8b, 0FFh
jnz short loc_9E780
inc rcx
xor esi, esi
loc_9E771:
mov r8b, [rcx]
add esi, 8
inc rcx
cmp r8b, 0FFh
jz short loc_9E771
loc_9E780:
movzx ecx, r8b
loc_9E784:
bt ecx, edx
lea edx, [rdx+1]
jb short loc_9E784
shl eax, 5
add esi, eax
lea eax, [rdx+rsi]
dec eax
jmp short loc_9E79D
loc_9E798:
mov eax, 0FFFFFFFFh
loc_9E79D:
pop rbp
retn
|
long long bitmap_get_first(long long a1)
{
_DWORD *v1; // rcx
_DWORD *v2; // rdx
int v3; // eax
int v4; // r8d
unsigned int v5; // edx
int v6; // esi
_BYTE *v7; // rcx
int v8; // ecx
v1 = *(_DWORD **)a1;
v2 = *(_DWORD **)(a1 + 8);
*v2 |= *(_DWORD *)(a1 + 24);
v3 = 0;
if ( v1 >= v2 )
{
LABEL_5:
v4 = *v1;
if ( (*v1 | *(_DWORD *)(a1 + 24)) == -1 )
return 0xFFFFFFFFLL;
}
else
{
v3 = 0;
while ( 1 )
{
v4 = *v1;
if ( *v1 != -1 )
break;
++v1;
++v3;
if ( v1 >= v2 )
goto LABEL_5;
}
}
v5 = 0;
v6 = 0;
if ( (_BYTE)v4 == 0xFF )
{
v7 = (char *)v1 + 1;
v6 = 0;
do
{
LOBYTE(v4) = *v7;
v6 += 8;
++v7;
}
while ( (_BYTE)v4 == 0xFF );
}
v8 = (unsigned __int8)v4;
while ( _bittest(&v8, v5++) )
;
return v5 + 32 * v3 + v6 - 1;
}
|
bitmap_get_first:
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
MOV EAX,dword ptr [RDI + 0x18]
OR dword ptr [RDX],EAX
XOR EAX,EAX
CMP RCX,RDX
JNC 0x0019e751
XOR EAX,EAX
LAB_0019e73d:
MOV R8D,dword ptr [RCX]
CMP R8D,-0x1
JNZ 0x0019e75f
ADD RCX,0x4
INC EAX
CMP RCX,RDX
JC 0x0019e73d
LAB_0019e751:
MOV R8D,dword ptr [RCX]
MOV EDX,dword ptr [RDI + 0x18]
OR EDX,R8D
CMP EDX,-0x1
JZ 0x0019e798
LAB_0019e75f:
XOR EDX,EDX
MOV ESI,0x0
CMP R8B,0xff
JNZ 0x0019e780
INC RCX
XOR ESI,ESI
LAB_0019e771:
MOV R8B,byte ptr [RCX]
ADD ESI,0x8
INC RCX
CMP R8B,0xff
JZ 0x0019e771
LAB_0019e780:
MOVZX ECX,R8B
LAB_0019e784:
BT ECX,EDX
LEA EDX,[RDX + 0x1]
JC 0x0019e784
SHL EAX,0x5
ADD ESI,EAX
LEA EAX,[RDX + RSI*0x1]
DEC EAX
JMP 0x0019e79d
LAB_0019e798:
MOV EAX,0xffffffff
LAB_0019e79d:
POP RBP
RET
|
int bitmap_get_first(int8 *param_1)
{
uint *puVar1;
uint uVar2;
int iVar3;
uint *puVar4;
uint uVar5;
int iVar6;
uint uVar7;
puVar4 = (uint *)*param_1;
puVar1 = (uint *)param_1[1];
*puVar1 = *puVar1 | *(uint *)(param_1 + 3);
iVar3 = 0;
if (puVar4 < puVar1) {
iVar3 = 0;
do {
uVar7 = *puVar4;
if (uVar7 != 0xffffffff) goto LAB_0019e75f;
puVar4 = puVar4 + 1;
iVar3 = iVar3 + 1;
} while (puVar4 < puVar1);
}
uVar7 = *puVar4;
if ((*(uint *)(param_1 + 3) | uVar7) == 0xffffffff) {
iVar3 = -1;
}
else {
LAB_0019e75f:
uVar5 = 0;
iVar6 = 0;
if ((char)uVar7 == -1) {
iVar6 = 0;
do {
puVar4 = (uint *)((long)puVar4 + 1);
uVar7 = (uint)*(byte *)puVar4;
iVar6 = iVar6 + 8;
} while (*(byte *)puVar4 == 0xff);
}
do {
uVar2 = uVar5 & 0x1f;
uVar5 = uVar5 + 1;
} while (((uVar7 & 0xff) >> uVar2 & 1) != 0);
iVar3 = uVar5 + iVar6 + iVar3 * 0x20 + -1;
}
return iVar3;
}
|
|
60,536
|
intx::internal::udivrem_by2(unsigned long*, int, intx::uint<128u>)
|
corpus-core[P]colibri-stateless/build_O2/_deps/intx-src/include/intx/intx.hpp
|
inline uint128 udivrem_by2(uint64_t u[], int len, uint128 d) noexcept
{
INTX_REQUIRE(len >= 3);
const auto reciprocal = reciprocal_3by2(d);
auto rem = uint128{u[len - 2], u[len - 1]}; // Set the 2 top words as remainder.
u[len - 1] = u[len - 2] = 0; // Reset these words being a part of the result quotient.
auto it = &u[len - 3];
do
{
std::tie(*it, rem) = udivrem_3by2(rem[1], rem[0], *it, d, reciprocal);
} while (it-- != &u[0]);
return rem;
}
|
O2
|
cpp
|
intx::internal::udivrem_by2(unsigned long*, int, intx::uint<128u>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x2, %esi
jle 0x393bf
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movq %rdx, %rdi
movq %rcx, %rsi
callq 0x39763
movq %rax, %r12
movl %ebp, %ebp
movq -0x10(%r15,%rbp,8), %rdx
movq -0x8(%r15,%rbp,8), %rsi
xorps %xmm0, %xmm0
movups %xmm0, -0x10(%r15,%rbp,8)
shlq $0x3, %rbp
leaq 0x10(%rsp), %r13
movq -0x18(%r15,%rbp), %rcx
movq %r12, (%rsp)
movq %r13, %rdi
movq %r14, %r8
movq %rbx, %r9
callq 0x397d5
movq 0x10(%rsp), %rax
movq %rax, -0x18(%r15,%rbp)
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rsi
addq $-0x8, %rbp
cmpq $0x10, %rbp
jne 0x39375
movq %rdx, %rax
movq %rsi, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3dcc9(%rip), %rdi # 0x7708f
leaq 0x3db51(%rip), %rsi # 0x76f1e
leaq 0x3dc7c(%rip), %rcx # 0x77050
movl $0x65c, %edx # imm = 0x65C
callq 0x22110
|
_ZN4intx8internal11udivrem_by2EPmiNS_4uintILj128EEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
cmp esi, 2
jle loc_393BF
mov rbx, rcx
mov r14, rdx
mov ebp, esi
mov r15, rdi
mov rdi, rdx
mov rsi, rcx
call _ZN4intx15reciprocal_3by2ENS_4uintILj128EEE; intx::reciprocal_3by2(intx::uint<128u>)
mov r12, rax
mov ebp, ebp
mov rdx, [r15+rbp*8-10h]
mov rsi, [r15+rbp*8-8]
xorps xmm0, xmm0
movups xmmword ptr [r15+rbp*8-10h], xmm0
shl rbp, 3
lea r13, [rsp+58h+var_48]
loc_39375:
mov rcx, [r15+rbp-18h]
mov [rsp+58h+var_58], r12
mov rdi, r13
mov r8, r14
mov r9, rbx
call _ZN4intx12udivrem_3by2EmmmNS_4uintILj128EEEm; intx::udivrem_3by2(ulong,ulong,ulong,intx::uint<128u>,ulong)
mov rax, [rsp+58h+var_48]
mov [r15+rbp-18h], rax
mov rdx, [rsp+58h+var_40]
mov rsi, [rsp+58h+var_38]
add rbp, 0FFFFFFFFFFFFFFF8h
cmp rbp, 10h
jnz short loc_39375
mov rax, rdx
mov rdx, rsi
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_393BF:
lea rdi, aDlen3+1; "len >= 3"
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aUint128IntxInt; "uint128 intx::internal::udivrem_by2(uin"...
mov edx, 65Ch
call ___assert_fail
|
long long intx::internal::udivrem_by2(long long a1, unsigned int a2, long long a3, long long a4)
{
int v4; // ebx
int v5; // r14d
long long v7; // r12
long long v8; // rdx
long long v9; // rsi
long long v10; // rbp
long long v12; // [rsp+10h] [rbp-48h] BYREF
long long v13; // [rsp+18h] [rbp-40h]
long long v14; // [rsp+20h] [rbp-38h]
if ( (int)a2 <= 2 )
__assert_fail(
"len >= 3",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O2/_deps/intx-src/include/intx/intx.hpp",
1628LL,
"uint128 intx::internal::udivrem_by2(uint64_t *, int, uint128)");
v4 = a4;
v5 = a3;
v7 = intx::reciprocal_3by2(a3, a4);
v8 = *(_QWORD *)(a1 + 8LL * a2 - 16);
v9 = *(_QWORD *)(a1 + 8LL * a2 - 8);
*(_OWORD *)(a1 + 8LL * a2 - 16) = 0LL;
v10 = 8LL * a2;
do
{
intx::udivrem_3by2((unsigned int)&v12, v9, v8, *(_QWORD *)(a1 + v10 - 24), v5, v4, v7);
*(_QWORD *)(a1 + v10 - 24) = v12;
LODWORD(v8) = v13;
LODWORD(v9) = v14;
v10 -= 8LL;
}
while ( v10 != 16 );
return v13;
}
|
udivrem_by2:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
CMP ESI,0x2
JLE 0x001393bf
MOV RBX,RCX
MOV R14,RDX
MOV EBP,ESI
MOV R15,RDI
MOV RDI,RDX
MOV RSI,RCX
CALL 0x00139763
MOV R12,RAX
MOV EBP,EBP
MOV RDX,qword ptr [R15 + RBP*0x8 + -0x10]
MOV RSI,qword ptr [R15 + RBP*0x8 + -0x8]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + RBP*0x8 + -0x10],XMM0
SHL RBP,0x3
LEA R13,[RSP + 0x10]
LAB_00139375:
MOV RCX,qword ptr [R15 + RBP*0x1 + -0x18]
MOV qword ptr [RSP],R12
MOV RDI,R13
MOV R8,R14
MOV R9,RBX
CALL 0x001397d5
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [R15 + RBP*0x1 + -0x18],RAX
MOV RDX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
ADD RBP,-0x8
CMP RBP,0x10
JNZ 0x00139375
MOV RAX,RDX
MOV RDX,RSI
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001393bf:
LEA RDI,[0x17708f]
LEA RSI,[0x176f1e]
LEA RCX,[0x177050]
MOV EDX,0x65c
CALL 0x00122110
|
/* intx::internal::udivrem_by2(unsigned long*, int, intx::uint<128u>) */
int1 [16] __thiscall
intx::internal::udivrem_by2(internal *this,uint param_2,intx *param_3,int8 param_4)
{
int1 auVar1 [16];
int8 uVar2;
int8 uVar3;
ulong uVar4;
long lVar5;
int8 uVar6;
int8 local_48;
int8 local_40;
int8 local_38;
if (2 < (int)param_2) {
uVar2 = reciprocal_3by2(param_3,param_4);
uVar4 = (ulong)param_2;
uVar3 = *(int8 *)(this + uVar4 * 8 + -0x10);
uVar6 = *(int8 *)(this + uVar4 * 8 + -8);
*(int8 *)(this + uVar4 * 8 + -0x10) = 0;
*(int8 *)(this + uVar4 * 8 + -0x10 + 8) = 0;
lVar5 = uVar4 << 3;
do {
udivrem_3by2(&local_48,uVar6,uVar3,*(int8 *)(this + lVar5 + -0x18),param_3,param_4,uVar2
);
*(int8 *)(this + lVar5 + -0x18) = local_48;
auVar1._8_8_ = local_38;
auVar1._0_8_ = local_40;
lVar5 = lVar5 + -8;
uVar3 = local_40;
uVar6 = local_38;
} while (lVar5 != 0x10);
return auVar1;
}
/* WARNING: Subroutine does not return */
__assert_fail("len >= 3",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O2/_deps/intx-src/include/intx/intx.hpp"
,0x65c,"uint128 intx::internal::udivrem_by2(uint64_t *, int, uint128)");
}
|
|
60,537
|
bitmap_is_clear_all
|
eloqsql/mysys/my_bitmap.c
|
my_bool bitmap_is_clear_all(const MY_BITMAP *map)
{
my_bitmap_map *data_ptr= map->bitmap;
my_bitmap_map *end= map->last_word_ptr;
DBUG_ASSERT(map->n_bits > 0);
for (; data_ptr < end; data_ptr++)
if (*data_ptr)
return FALSE;
return (*data_ptr & ~map->last_word_mask) == 0;
}
|
O0
|
c
|
bitmap_is_clear_all:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xf2b71
jmp 0xf2b73
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xf2b9c
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0xf2b8c
movb $0x0, -0x1(%rbp)
jmp 0xf2bbc
jmp 0xf2b8e
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0xf2b73
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
bitmap_is_clear_all:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_20], rax
jmp short $+2
loc_F2B71:
jmp short $+2
loc_F2B73:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_F2B9C
mov rax, [rbp+var_18]
cmp dword ptr [rax], 0
jz short loc_F2B8C
mov [rbp+var_1], 0
jmp short loc_F2BBC
loc_F2B8C:
jmp short $+2
loc_F2B8E:
mov rax, [rbp+var_18]
add rax, 4
mov [rbp+var_18], rax
jmp short loc_F2B73
loc_F2B9C:
mov rax, [rbp+var_18]
mov eax, [rax]
mov rcx, [rbp+var_10]
mov ecx, [rcx+18h]
xor ecx, 0FFFFFFFFh
and eax, ecx
cmp eax, 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_1], al
loc_F2BBC:
mov al, [rbp+var_1]
pop rbp
retn
|
bool bitmap_is_clear_all(long long a1)
{
_DWORD *i; // [rsp+8h] [rbp-18h]
for ( i = *(_DWORD **)a1; (unsigned long long)i < *(_QWORD *)(a1 + 8); ++i )
{
if ( *i )
return 0;
}
return (~*(_DWORD *)(a1 + 24) & *i) == 0;
}
|
bitmap_is_clear_all:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001f2b71
LAB_001f2b71:
JMP 0x001f2b73
LAB_001f2b73:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001f2b9c
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0x0
JZ 0x001f2b8c
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001f2bbc
LAB_001f2b8c:
JMP 0x001f2b8e
LAB_001f2b8e:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x4
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001f2b73
LAB_001f2b9c:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x18]
XOR ECX,0xffffffff
AND EAX,ECX
CMP EAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
LAB_001f2bbc:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int8 bitmap_is_clear_all(int8 *param_1)
{
uint *local_20;
bool local_9;
local_20 = (uint *)*param_1;
do {
if ((uint *)param_1[1] <= local_20) {
local_9 = (*local_20 & (*(uint *)(param_1 + 3) ^ 0xffffffff)) == 0;
local_20 = (uint *)0x0;
LAB_001f2bbc:
return CONCAT71((int7)((ulong)local_20 >> 8),local_9);
}
if (*local_20 != 0) {
local_9 = false;
goto LAB_001f2bbc;
}
local_20 = local_20 + 1;
} while( true );
}
|
|
60,538
|
LefDefParser::lefiViaRule::addNumProp(char const*, double, char const*, char)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiViaRule.cpp
|
void
lefiViaRule::addNumProp(const char *name,
const double d,
const char *value,
const char type)
{
int len = strlen(name) + 1;
if (numProps_ == propsAllocated_) {
int i;
int max;
int lim;
char **nn;
char **nv;
double *nd;
char *nt;
if (propsAllocated_ == 0)
propsAllocated_ = 1; // initialize propsAllocated_
max = propsAllocated_ *= 2;
lim = numProps_;
nn = (char**) lefMalloc(sizeof(char*) * max);
nv = (char**) lefMalloc(sizeof(char*) * max);
nd = (double*) lefMalloc(sizeof(double) * max);
nt = (char*) lefMalloc(sizeof(char) * max);
for (i = 0; i < lim; i++) {
nn[i] = names_[i];
nv[i] = values_[i];
nd[i] = dvalues_[i];
nt[i] = types_[i];
}
lefFree((char*) (names_));
lefFree((char*) (values_));
lefFree((char*) (dvalues_));
lefFree((char*) (types_));
names_ = nn;
values_ = nv;
dvalues_ = nd;
types_ = nt;
}
names_[numProps_] = (char*) lefMalloc(sizeof(char) * len);
strcpy(names_[numProps_], name);
len = strlen(value) + 1;
values_[numProps_] = (char*) lefMalloc(sizeof(char) * len);
strcpy(values_[numProps_], value);
dvalues_[numProps_] = d;
types_[numProps_] = type;
numProps_ += 1;
}
|
O0
|
cpp
|
LefDefParser::lefiViaRule::addNumProp(char const*, double, char const*, char):
subq $0x68, %rsp
movb %cl, %al
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movsd %xmm0, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movb %al, 0x47(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rdi
callq 0x20e0
movq 0x8(%rsp), %rcx
addq $0x1, %rax
movl %eax, 0x40(%rsp)
movl 0x1d8(%rcx), %eax
cmpl 0x1dc(%rcx), %eax
jne 0x4a448
movq 0x8(%rsp), %rax
cmpl $0x0, 0x1dc(%rax)
jne 0x4a2bf
movq 0x8(%rsp), %rax
movl $0x1, 0x1dc(%rax)
movq 0x8(%rsp), %rax
movl 0x1dc(%rax), %ecx
shll %ecx
movl %ecx, 0x1dc(%rax)
movl %ecx, 0x38(%rsp)
movl 0x1d8(%rax), %eax
movl %eax, 0x34(%rsp)
movslq 0x38(%rsp), %rdi
shlq $0x3, %rdi
callq 0x4f550
movq %rax, 0x28(%rsp)
movslq 0x38(%rsp), %rdi
shlq $0x3, %rdi
callq 0x4f550
movq %rax, 0x20(%rsp)
movslq 0x38(%rsp), %rdi
shlq $0x3, %rdi
callq 0x4f550
movq %rax, 0x18(%rsp)
movslq 0x38(%rsp), %rdi
shlq $0x0, %rdi
callq 0x4f550
movq %rax, 0x10(%rsp)
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x34(%rsp), %eax
jge 0x4a3cf
movq 0x8(%rsp), %rax
movq 0x1e0(%rax), %rcx
movslq 0x3c(%rsp), %rdx
movq (%rcx,%rdx,8), %rsi
movq 0x28(%rsp), %rcx
movslq 0x3c(%rsp), %rdx
movq %rsi, (%rcx,%rdx,8)
movq 0x1e8(%rax), %rcx
movslq 0x3c(%rsp), %rdx
movq (%rcx,%rdx,8), %rsi
movq 0x20(%rsp), %rcx
movslq 0x3c(%rsp), %rdx
movq %rsi, (%rcx,%rdx,8)
movq 0x1f0(%rax), %rcx
movslq 0x3c(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x18(%rsp), %rcx
movslq 0x3c(%rsp), %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq 0x1f8(%rax), %rax
movslq 0x3c(%rsp), %rcx
movb (%rax,%rcx), %dl
movq 0x10(%rsp), %rax
movslq 0x3c(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x4a334
movq 0x8(%rsp), %rax
movq 0x1e0(%rax), %rdi
callq 0x52810
movq 0x8(%rsp), %rax
movq 0x1e8(%rax), %rdi
callq 0x52810
movq 0x8(%rsp), %rax
movq 0x1f0(%rax), %rdi
callq 0x52810
movq 0x8(%rsp), %rax
movq 0x1f8(%rax), %rdi
callq 0x52810
movq 0x8(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x1e0(%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x1e8(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x1f0(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x1f8(%rax)
movslq 0x40(%rsp), %rdi
shlq $0x0, %rdi
callq 0x4f550
movq 0x8(%rsp), %rcx
movq %rax, %rsi
movq 0x1e0(%rcx), %rax
movslq 0x1d8(%rcx), %rdx
movq %rsi, (%rax,%rdx,8)
movq 0x1e0(%rcx), %rax
movslq 0x1d8(%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x58(%rsp), %rsi
callq 0x2270
movq 0x48(%rsp), %rdi
callq 0x20e0
addq $0x1, %rax
movl %eax, 0x40(%rsp)
movslq 0x40(%rsp), %rdi
shlq $0x0, %rdi
callq 0x4f550
movq 0x8(%rsp), %rcx
movq %rax, %rsi
movq 0x1e8(%rcx), %rax
movslq 0x1d8(%rcx), %rdx
movq %rsi, (%rax,%rdx,8)
movq 0x1e8(%rcx), %rax
movslq 0x1d8(%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x48(%rsp), %rsi
callq 0x2270
movq 0x8(%rsp), %rax
movsd 0x50(%rsp), %xmm0
movq 0x1f0(%rax), %rcx
movslq 0x1d8(%rax), %rdx
movsd %xmm0, (%rcx,%rdx,8)
movb 0x47(%rsp), %sil
movq 0x1f8(%rax), %rcx
movslq 0x1d8(%rax), %rdx
movb %sil, (%rcx,%rdx)
movl 0x1d8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1d8(%rax)
addq $0x68, %rsp
retq
nopl (%rax,%rax)
|
_ZN12LefDefParser11lefiViaRule10addNumPropEPKcdS2_c:
sub rsp, 68h
mov al, cl
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
movsd [rsp+68h+var_18], xmm0
mov [rsp+68h+var_20], rdx
mov [rsp+68h+var_21], al
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_60], rax
mov rdi, [rsp+68h+var_10]
call _strlen
mov rcx, [rsp+68h+var_60]
add rax, 1
mov [rsp+68h+var_28], eax
mov eax, [rcx+1D8h]
cmp eax, [rcx+1DCh]
jnz loc_4A448
mov rax, [rsp+68h+var_60]
cmp dword ptr [rax+1DCh], 0
jnz short loc_4A2BF
mov rax, [rsp+68h+var_60]
mov dword ptr [rax+1DCh], 1
loc_4A2BF:
mov rax, [rsp+68h+var_60]
mov ecx, [rax+1DCh]
shl ecx, 1
mov [rax+1DCh], ecx
mov [rsp+68h+var_30], ecx
mov eax, [rax+1D8h]
mov [rsp+68h+var_34], eax
movsxd rdi, [rsp+68h+var_30]
shl rdi, 3; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+68h+var_40], rax
movsxd rdi, [rsp+68h+var_30]
shl rdi, 3; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+68h+var_48], rax
movsxd rdi, [rsp+68h+var_30]
shl rdi, 3; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+68h+var_50], rax
movsxd rdi, [rsp+68h+var_30]
shl rdi, 0; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+68h+var_58], rax
mov [rsp+68h+var_2C], 0
loc_4A334:
mov eax, [rsp+68h+var_2C]
cmp eax, [rsp+68h+var_34]
jge loc_4A3CF
mov rax, [rsp+68h+var_60]
mov rcx, [rax+1E0h]
movsxd rdx, [rsp+68h+var_2C]
mov rsi, [rcx+rdx*8]
mov rcx, [rsp+68h+var_40]
movsxd rdx, [rsp+68h+var_2C]
mov [rcx+rdx*8], rsi
mov rcx, [rax+1E8h]
movsxd rdx, [rsp+68h+var_2C]
mov rsi, [rcx+rdx*8]; unsigned __int64
mov rcx, [rsp+68h+var_48]
movsxd rdx, [rsp+68h+var_2C]
mov [rcx+rdx*8], rsi
mov rcx, [rax+1F0h]
movsxd rdx, [rsp+68h+var_2C]
movsd xmm0, qword ptr [rcx+rdx*8]
mov rcx, [rsp+68h+var_50]
movsxd rdx, [rsp+68h+var_2C]
movsd qword ptr [rcx+rdx*8], xmm0
mov rax, [rax+1F8h]
movsxd rcx, [rsp+68h+var_2C]
mov dl, [rax+rcx]
mov rax, [rsp+68h+var_58]
movsxd rcx, [rsp+68h+var_2C]
mov [rax+rcx], dl
mov eax, [rsp+68h+var_2C]
add eax, 1
mov [rsp+68h+var_2C], eax
jmp loc_4A334
loc_4A3CF:
mov rax, [rsp+68h+var_60]
mov rdi, [rax+1E0h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rax, [rsp+68h+var_60]
mov rdi, [rax+1E8h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rax, [rsp+68h+var_60]
mov rdi, [rax+1F0h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rax, [rsp+68h+var_60]
mov rdi, [rax+1F8h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rax, [rsp+68h+var_60]
mov rcx, [rsp+68h+var_40]
mov [rax+1E0h], rcx
mov rcx, [rsp+68h+var_48]
mov [rax+1E8h], rcx
mov rcx, [rsp+68h+var_50]
mov [rax+1F0h], rcx
mov rcx, [rsp+68h+var_58]
mov [rax+1F8h], rcx
loc_4A448:
movsxd rdi, [rsp+68h+var_28]
shl rdi, 0; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, [rsp+68h+var_60]
mov rsi, rax
mov rax, [rcx+1E0h]
movsxd rdx, dword ptr [rcx+1D8h]
mov [rax+rdx*8], rsi
mov rax, [rcx+1E0h]
movsxd rcx, dword ptr [rcx+1D8h]
mov rdi, [rax+rcx*8]
mov rsi, [rsp+68h+var_10]; unsigned __int64
call _strcpy
mov rdi, [rsp+68h+var_20]
call _strlen
add rax, 1
mov [rsp+68h+var_28], eax
movsxd rdi, [rsp+68h+var_28]
shl rdi, 0; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, [rsp+68h+var_60]
mov rsi, rax
mov rax, [rcx+1E8h]
movsxd rdx, dword ptr [rcx+1D8h]
mov [rax+rdx*8], rsi
mov rax, [rcx+1E8h]
movsxd rcx, dword ptr [rcx+1D8h]
mov rdi, [rax+rcx*8]
mov rsi, [rsp+68h+var_20]
call _strcpy
mov rax, [rsp+68h+var_60]
movsd xmm0, [rsp+68h+var_18]
mov rcx, [rax+1F0h]
movsxd rdx, dword ptr [rax+1D8h]
movsd qword ptr [rcx+rdx*8], xmm0
mov sil, [rsp+68h+var_21]
mov rcx, [rax+1F8h]
movsxd rdx, dword ptr [rax+1D8h]
mov [rcx+rdx], sil
mov ecx, [rax+1D8h]
add ecx, 1
mov [rax+1D8h], ecx
add rsp, 68h
retn
|
LefDefParser::lefiViaRule * LefDefParser::lefiViaRule::addNumProp(
LefDefParser::lefiViaRule *this,
char *a2,
double a3,
const char *a4,
char a5)
{
int v5; // ecx
LefDefParser::lefiViaRule *result; // rax
long long v7; // [rsp+10h] [rbp-58h]
long long v8; // [rsp+18h] [rbp-50h]
long long v9; // [rsp+20h] [rbp-48h]
long long v10; // [rsp+28h] [rbp-40h]
int v11; // [rsp+34h] [rbp-34h]
int v12; // [rsp+38h] [rbp-30h]
int i; // [rsp+3Ch] [rbp-2Ch]
int v14; // [rsp+40h] [rbp-28h]
int v15; // [rsp+40h] [rbp-28h]
const char *v18; // [rsp+58h] [rbp-10h]
v18 = a2;
v14 = strlen(a2) + 1;
if ( *((_DWORD *)this + 118) == *((_DWORD *)this + 119) )
{
if ( !*((_DWORD *)this + 119) )
*((_DWORD *)this + 119) = 1;
v5 = 2 * *((_DWORD *)this + 119);
*((_DWORD *)this + 119) = v5;
v12 = v5;
v11 = *((_DWORD *)this + 118);
v10 = LefDefParser::lefMalloc((LefDefParser *)(8LL * v5), (unsigned long long)a2);
v9 = LefDefParser::lefMalloc((LefDefParser *)(8LL * v12), (unsigned long long)a2);
v8 = LefDefParser::lefMalloc((LefDefParser *)(8LL * v12), (unsigned long long)a2);
v7 = LefDefParser::lefMalloc((LefDefParser *)v12, (unsigned long long)a2);
for ( i = 0; i < v11; ++i )
{
*(_QWORD *)(v10 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 60) + 8LL * i);
a2 = *(char **)(*((_QWORD *)this + 61) + 8LL * i);
*(_QWORD *)(v9 + 8LL * i) = a2;
*(_QWORD *)(v8 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 62) + 8LL * i);
*(_BYTE *)(v7 + i) = *(_BYTE *)(*((_QWORD *)this + 63) + i);
}
LefDefParser::lefFree(*((LefDefParser **)this + 60), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 61), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 62), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 63), a2);
*((_QWORD *)this + 60) = v10;
*((_QWORD *)this + 61) = v9;
*((_QWORD *)this + 62) = v8;
*((_QWORD *)this + 63) = v7;
}
*(_QWORD *)(*((_QWORD *)this + 60) + 8LL * *((int *)this + 118)) = LefDefParser::lefMalloc(
(LefDefParser *)v14,
(unsigned long long)a2);
strcpy(*(_QWORD *)(*((_QWORD *)this + 60) + 8LL * *((int *)this + 118)), v18);
v15 = strlen(a4) + 1;
*(_QWORD *)(*((_QWORD *)this + 61) + 8LL * *((int *)this + 118)) = LefDefParser::lefMalloc(
(LefDefParser *)v15,
(unsigned long long)v18);
strcpy(*(_QWORD *)(*((_QWORD *)this + 61) + 8LL * *((int *)this + 118)), a4);
result = this;
*(double *)(*((_QWORD *)this + 62) + 8LL * *((int *)this + 118)) = a3;
*(_BYTE *)(*((_QWORD *)this + 63) + (int)(*((_DWORD *)this + 118))++) = a5;
return result;
}
|
addNumProp:
SUB RSP,0x68
MOV AL,CL
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOVSD qword ptr [RSP + 0x50],XMM0
MOV qword ptr [RSP + 0x48],RDX
MOV byte ptr [RSP + 0x47],AL
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001020e0
MOV RCX,qword ptr [RSP + 0x8]
ADD RAX,0x1
MOV dword ptr [RSP + 0x40],EAX
MOV EAX,dword ptr [RCX + 0x1d8]
CMP EAX,dword ptr [RCX + 0x1dc]
JNZ 0x0014a448
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x1dc],0x0
JNZ 0x0014a2bf
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0x1dc],0x1
LAB_0014a2bf:
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RAX + 0x1dc]
SHL ECX,0x1
MOV dword ptr [RAX + 0x1dc],ECX
MOV dword ptr [RSP + 0x38],ECX
MOV EAX,dword ptr [RAX + 0x1d8]
MOV dword ptr [RSP + 0x34],EAX
MOVSXD RDI,dword ptr [RSP + 0x38]
SHL RDI,0x3
CALL 0x0014f550
MOV qword ptr [RSP + 0x28],RAX
MOVSXD RDI,dword ptr [RSP + 0x38]
SHL RDI,0x3
CALL 0x0014f550
MOV qword ptr [RSP + 0x20],RAX
MOVSXD RDI,dword ptr [RSP + 0x38]
SHL RDI,0x3
CALL 0x0014f550
MOV qword ptr [RSP + 0x18],RAX
MOVSXD RDI,dword ptr [RSP + 0x38]
SHL RDI,0x0
CALL 0x0014f550
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x3c],0x0
LAB_0014a334:
MOV EAX,dword ptr [RSP + 0x3c]
CMP EAX,dword ptr [RSP + 0x34]
JGE 0x0014a3cf
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x1e0]
MOVSXD RDX,dword ptr [RSP + 0x3c]
MOV RSI,qword ptr [RCX + RDX*0x8]
MOV RCX,qword ptr [RSP + 0x28]
MOVSXD RDX,dword ptr [RSP + 0x3c]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV RCX,qword ptr [RAX + 0x1e8]
MOVSXD RDX,dword ptr [RSP + 0x3c]
MOV RSI,qword ptr [RCX + RDX*0x8]
MOV RCX,qword ptr [RSP + 0x20]
MOVSXD RDX,dword ptr [RSP + 0x3c]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV RCX,qword ptr [RAX + 0x1f0]
MOVSXD RDX,dword ptr [RSP + 0x3c]
MOVSD XMM0,qword ptr [RCX + RDX*0x8]
MOV RCX,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RSP + 0x3c]
MOVSD qword ptr [RCX + RDX*0x8],XMM0
MOV RAX,qword ptr [RAX + 0x1f8]
MOVSXD RCX,dword ptr [RSP + 0x3c]
MOV DL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP + 0x3c]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RSP + 0x3c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x3c],EAX
JMP 0x0014a334
LAB_0014a3cf:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x1e0]
CALL 0x00152810
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x1e8]
CALL 0x00152810
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x1f0]
CALL 0x00152810
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x1f8]
CALL 0x00152810
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0x1e0],RCX
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x1e8],RCX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x1f0],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x1f8],RCX
LAB_0014a448:
MOVSXD RDI,dword ptr [RSP + 0x40]
SHL RDI,0x0
CALL 0x0014f550
MOV RCX,qword ptr [RSP + 0x8]
MOV RSI,RAX
MOV RAX,qword ptr [RCX + 0x1e0]
MOVSXD RDX,dword ptr [RCX + 0x1d8]
MOV qword ptr [RAX + RDX*0x8],RSI
MOV RAX,qword ptr [RCX + 0x1e0]
MOVSXD RCX,dword ptr [RCX + 0x1d8]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00102270
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x001020e0
ADD RAX,0x1
MOV dword ptr [RSP + 0x40],EAX
MOVSXD RDI,dword ptr [RSP + 0x40]
SHL RDI,0x0
CALL 0x0014f550
MOV RCX,qword ptr [RSP + 0x8]
MOV RSI,RAX
MOV RAX,qword ptr [RCX + 0x1e8]
MOVSXD RDX,dword ptr [RCX + 0x1d8]
MOV qword ptr [RAX + RDX*0x8],RSI
MOV RAX,qword ptr [RCX + 0x1e8]
MOVSXD RCX,dword ptr [RCX + 0x1d8]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00102270
MOV RAX,qword ptr [RSP + 0x8]
MOVSD XMM0,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RAX + 0x1f0]
MOVSXD RDX,dword ptr [RAX + 0x1d8]
MOVSD qword ptr [RCX + RDX*0x8],XMM0
MOV SIL,byte ptr [RSP + 0x47]
MOV RCX,qword ptr [RAX + 0x1f8]
MOVSXD RDX,dword ptr [RAX + 0x1d8]
MOV byte ptr [RCX + RDX*0x1],SIL
MOV ECX,dword ptr [RAX + 0x1d8]
ADD ECX,0x1
MOV dword ptr [RAX + 0x1d8],ECX
ADD RSP,0x68
RET
|
/* LefDefParser::lefiViaRule::addNumProp(char const*, double, char const*, char) */
void __thiscall
LefDefParser::lefiViaRule::addNumProp
(lefiViaRule *this,char *param_1,double param_2,char *param_3,char param_4)
{
int iVar1;
size_t sVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
int8 uVar7;
int iVar8;
int local_2c;
sVar2 = strlen(param_1);
if (*(int *)(this + 0x1d8) == *(int *)(this + 0x1dc)) {
if (*(int *)(this + 0x1dc) == 0) {
*(int4 *)(this + 0x1dc) = 1;
}
iVar8 = *(int *)(this + 0x1dc) << 1;
*(int *)(this + 0x1dc) = iVar8;
iVar1 = *(int *)(this + 0x1d8);
lVar3 = lefMalloc((long)iVar8 << 3);
lVar4 = lefMalloc((long)iVar8 << 3);
lVar5 = lefMalloc((long)iVar8 << 3);
lVar6 = lefMalloc((long)iVar8);
for (local_2c = 0; local_2c < iVar1; local_2c = local_2c + 1) {
*(int8 *)(lVar3 + (long)local_2c * 8) =
*(int8 *)(*(long *)(this + 0x1e0) + (long)local_2c * 8);
*(int8 *)(lVar4 + (long)local_2c * 8) =
*(int8 *)(*(long *)(this + 0x1e8) + (long)local_2c * 8);
*(int8 *)(lVar5 + (long)local_2c * 8) =
*(int8 *)(*(long *)(this + 0x1f0) + (long)local_2c * 8);
*(int1 *)(lVar6 + local_2c) = *(int1 *)(*(long *)(this + 0x1f8) + (long)local_2c);
}
lefFree(*(void **)(this + 0x1e0));
lefFree(*(void **)(this + 0x1e8));
lefFree(*(void **)(this + 0x1f0));
lefFree(*(void **)(this + 0x1f8));
*(long *)(this + 0x1e0) = lVar3;
*(long *)(this + 0x1e8) = lVar4;
*(long *)(this + 0x1f0) = lVar5;
*(long *)(this + 0x1f8) = lVar6;
}
uVar7 = lefMalloc((long)((int)sVar2 + 1));
*(int8 *)(*(long *)(this + 0x1e0) + (long)*(int *)(this + 0x1d8) * 8) = uVar7;
strcpy(*(char **)(*(long *)(this + 0x1e0) + (long)*(int *)(this + 0x1d8) * 8),param_1);
sVar2 = strlen(param_3);
uVar7 = lefMalloc((long)((int)sVar2 + 1));
*(int8 *)(*(long *)(this + 0x1e8) + (long)*(int *)(this + 0x1d8) * 8) = uVar7;
strcpy(*(char **)(*(long *)(this + 0x1e8) + (long)*(int *)(this + 0x1d8) * 8),param_3);
*(double *)(*(long *)(this + 0x1f0) + (long)*(int *)(this + 0x1d8) * 8) = param_2;
*(char *)(*(long *)(this + 0x1f8) + (long)*(int *)(this + 0x1d8)) = param_4;
*(int *)(this + 0x1d8) = *(int *)(this + 0x1d8) + 1;
return;
}
|
|
60,539
|
LefDefParser::lefwLayerAntennaAreaDiffReducePwl(int, double*, double*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwLayerAntennaAreaDiffReducePwl(int numPwls,
double *diffAreas,
double *metalDiffFactors)
{
int i;
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING
&& lefwState != LEFW_LAYER_START && lefwState != LEFW_LAYER)
return LEFW_BAD_ORDER;
if (!lefwIsRouting && !lefwIsCut)
return LEFW_BAD_DATA;
/* WANDA
if (versionNum < 5.4)
return LEFW_WRONG_VERSION;
*/
if (numPwls < 2)
return LEFW_BAD_DATA;
if (lefwWriteEncrypt) {
encPrint(lefwFile, (char*) " ANTENNAAREADIFFREDUCEPWL ( ");
for (i = 0; i < numPwls; i++)
encPrint(lefwFile, (char*) "( %.11g %.11g ) ", *diffAreas++,
*metalDiffFactors++);
encPrint(lefwFile, (char*) ") ;\n");
} else {
fprintf(lefwFile, " ANTENNAAREADIFFREDUCEPWL ( ");
for (i = 0; i < numPwls; i++)
fprintf(lefwFile, "( %.11g %.11g ) ", *diffAreas++,
*metalDiffFactors++);
fprintf(lefwFile, ") ;\n");
}
lefwLines++;
return LEFW_OK;
}
|
O3
|
cpp
|
LefDefParser::lefwLayerAntennaAreaDiffReducePwl(int, double*, double*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x763fe(%rip), %r12 # 0x8d0f0
movq (%r12), %rcx
testq %rcx, %rcx
je 0x16db3
movq %rdx, %rbx
leaq 0x76637(%rip), %rax # 0x8d340
movl (%rax), %edx
movl $0x2, %eax
cmpl $0x1f, %edx
ja 0x16e22
movq %rsi, %r14
movl $0x900000c0, %esi # imm = 0x900000C0
btl %edx, %esi
jae 0x16e22
movl %edi, %ebp
leaq 0x76681(%rip), %rax # 0x8d3b4
leaq 0x7663a(%rip), %rdx # 0x8d374
movl (%rdx), %edx
orl (%rax), %edx
sete %dl
movl $0x3, %eax
cmpl $0x2, %edi
jl 0x16e22
testb %dl, %dl
jne 0x16e22
cmpb $0x1, 0x7667e(%rip) # 0x8d3dc
jne 0x16dba
leaq 0x44801(%rip), %rsi # 0x5b568
xorl %r13d, %r13d
movq %rcx, %rdi
xorl %eax, %eax
callq 0x55afd
movl %ebp, %ebp
leaq 0x445e1(%rip), %r15 # 0x5b35e
movq (%r12), %rdi
movsd (%r14,%r13,8), %xmm0
movsd (%rbx,%r13,8), %xmm1
movq %r15, %rsi
movb $0x2, %al
callq 0x55afd
incq %r13
cmpl %r13d, %ebp
jne 0x16d7d
movq (%r12), %rdi
leaq 0x416e7(%rip), %rsi # 0x58491
xorl %eax, %eax
callq 0x55afd
jmp 0x16e17
movl $0x1, %eax
jmp 0x16e22
leaq 0x447a7(%rip), %rdi # 0x5b568
movl $0x1e, %esi
movl $0x1, %edx
callq 0x23d0
movl %ebp, %r13d
xorl %ebp, %ebp
leaq 0x44582(%rip), %r15 # 0x5b35e
movq (%r12), %rdi
movsd (%r14,%rbp,8), %xmm0
movsd (%rbx,%rbp,8), %xmm1
movq %r15, %rsi
movb $0x2, %al
callq 0x22e0
incq %rbp
cmpl %ebp, %r13d
jne 0x16ddc
movq (%r12), %rcx
leaq 0x41689(%rip), %rdi # 0x58491
movl $0x4, %esi
movl $0x1, %edx
callq 0x23d0
leaq 0x7651e(%rip), %rax # 0x8d33c
incl (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN12LefDefParser33lefwLayerAntennaAreaDiffReducePwlEiPdS0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
lea r12, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rcx, [r12]
test rcx, rcx
jz loc_16DB3
mov rbx, rdx
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov edx, [rax]
mov eax, 2
cmp edx, 1Fh
ja loc_16E22
mov r14, rsi
mov esi, 900000C0h
bt esi, edx
jnb loc_16E22
mov ebp, edi
lea rax, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting
lea rdx, _ZN12LefDefParser9lefwIsCutE; LefDefParser::lefwIsCut
mov edx, [rdx]
or edx, [rax]
setz dl
mov eax, 3
cmp edi, 2
jl loc_16E22
test dl, dl
jnz loc_16E22
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_16DBA
lea rsi, aAntennaareadif; " ANTENNAAREADIFFREDUCEPWL ( "
xor r13d, r13d
mov rdi, rcx
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
mov ebp, ebp
lea r15, a11g11g_0; "( %.11g %.11g ) "
loc_16D7D:
mov rdi, [r12]
movsd xmm0, qword ptr [r14+r13*8]
movsd xmm1, qword ptr [rbx+r13*8]
mov rsi, r15
mov al, 2
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
inc r13
cmp ebp, r13d
jnz short loc_16D7D
mov rdi, [r12]
lea rsi, aRectFFFF+1Dh; ") ;\n"
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_16E17
loc_16DB3:
mov eax, 1
jmp short loc_16E22
loc_16DBA:
lea rdi, aAntennaareadif; " ANTENNAAREADIFFREDUCEPWL ( "
mov esi, 1Eh
mov edx, 1
call _fwrite
mov r13d, ebp
xor ebp, ebp
lea r15, a11g11g_0; "( %.11g %.11g ) "
loc_16DDC:
mov rdi, [r12]
movsd xmm0, qword ptr [r14+rbp*8]
movsd xmm1, qword ptr [rbx+rbp*8]
mov rsi, r15
mov al, 2
call _fprintf
inc rbp
cmp r13d, ebp
jnz short loc_16DDC
mov rcx, [r12]
lea rdi, aRectFFFF+1Dh; ") ;\n"
mov esi, 4
mov edx, 1
call _fwrite
loc_16E17:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
inc dword ptr [rax]
xor eax, eax
loc_16E22:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long LefDefParser::lefwLayerAntennaAreaDiffReducePwl(
LefDefParser *this,
long long a2,
double *a3,
double *a4,
int a5,
int a6)
{
long long result; // rax
int v9; // esi
int v10; // edx
long long v11; // r13
int v12; // edx
int v13; // ecx
int v14; // r8d
int v15; // r9d
long long v16; // rbp
if ( !*(_QWORD *)&LefDefParser::lefwFile )
return 1LL;
result = 2LL;
if ( LefDefParser::lefwState <= 0x1F )
{
v9 = -1879048000;
if ( _bittest(&v9, LefDefParser::lefwState) )
{
v10 = LefDefParser::lefwIsRouting | LefDefParser::lefwIsCut;
result = 3LL;
if ( (int)this >= 2 )
{
if ( LefDefParser::lefwIsRouting | LefDefParser::lefwIsCut )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
{
v11 = 0LL;
LOBYTE(v10) = (LefDefParser::lefwIsRouting | LefDefParser::lefwIsCut) == 0;
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" ANTENNAAREADIFFREDUCEPWL ( ",
v10,
LefDefParser::lefwFile,
a5,
a6);
do
{
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"( %.11g %.11g ) ", v12, v13, v14, v15);
++v11;
}
while ( (_DWORD)this != (_DWORD)v11 );
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)") ;\n", v12, v13, v14, v15);
}
else
{
fwrite(" ANTENNAAREADIFFREDUCEPWL ( ", 30LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile);
v16 = 0LL;
do
{
fprintf(*(_QWORD *)&LefDefParser::lefwFile, "( %.11g %.11g ) ", *(double *)(a2 + 8 * v16), a3[v16]);
++v16;
}
while ( (_DWORD)this != (_DWORD)v16 );
fwrite(") ;\n", 4LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile);
}
++LefDefParser::lefwLines;
return 0LL;
}
}
}
}
return result;
}
|
lefwLayerAntennaAreaDiffReducePwl:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
LEA R12,[0x18d0f0]
MOV RCX,qword ptr [R12]
TEST RCX,RCX
JZ 0x00116db3
MOV RBX,RDX
LEA RAX,[0x18d340]
MOV EDX,dword ptr [RAX]
MOV EAX,0x2
CMP EDX,0x1f
JA 0x00116e22
MOV R14,RSI
MOV ESI,0x900000c0
BT ESI,EDX
JNC 0x00116e22
MOV EBP,EDI
LEA RAX,[0x18d3b4]
LEA RDX,[0x18d374]
MOV EDX,dword ptr [RDX]
OR EDX,dword ptr [RAX]
SETZ DL
MOV EAX,0x3
CMP EDI,0x2
JL 0x00116e22
TEST DL,DL
JNZ 0x00116e22
CMP byte ptr [0x0018d3dc],0x1
JNZ 0x00116dba
LEA RSI,[0x15b568]
XOR R13D,R13D
MOV RDI,RCX
XOR EAX,EAX
CALL 0x00155afd
MOV EBP,EBP
LEA R15,[0x15b35e]
LAB_00116d7d:
MOV RDI,qword ptr [R12]
MOVSD XMM0,qword ptr [R14 + R13*0x8]
MOVSD XMM1,qword ptr [RBX + R13*0x8]
MOV RSI,R15
MOV AL,0x2
CALL 0x00155afd
INC R13
CMP EBP,R13D
JNZ 0x00116d7d
MOV RDI,qword ptr [R12]
LEA RSI,[0x158491]
XOR EAX,EAX
CALL 0x00155afd
JMP 0x00116e17
LAB_00116db3:
MOV EAX,0x1
JMP 0x00116e22
LAB_00116dba:
LEA RDI,[0x15b568]
MOV ESI,0x1e
MOV EDX,0x1
CALL 0x001023d0
MOV R13D,EBP
XOR EBP,EBP
LEA R15,[0x15b35e]
LAB_00116ddc:
MOV RDI,qword ptr [R12]
MOVSD XMM0,qword ptr [R14 + RBP*0x8]
MOVSD XMM1,qword ptr [RBX + RBP*0x8]
MOV RSI,R15
MOV AL,0x2
CALL 0x001022e0
INC RBP
CMP R13D,EBP
JNZ 0x00116ddc
MOV RCX,qword ptr [R12]
LEA RDI,[0x158491]
MOV ESI,0x4
MOV EDX,0x1
CALL 0x001023d0
LAB_00116e17:
LEA RAX,[0x18d33c]
INC dword ptr [RAX]
XOR EAX,EAX
LAB_00116e22:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::lefwLayerAntennaAreaDiffReducePwl(int, double*, double*) */
int8
LefDefParser::lefwLayerAntennaAreaDiffReducePwl(int param_1,double *param_2,double *param_3)
{
int8 uVar1;
long lVar2;
if (lefwFile == (_IO_FILE *)0x0) {
uVar1 = 1;
}
else {
uVar1 = 2;
if ((lefwState < 0x20) && ((0x900000c0U >> (lefwState & 0x1f) & 1) != 0)) {
uVar1 = 3;
if ((1 < param_1) && (lefwIsCut != 0 || lefwIsRouting != 0)) {
if (lefwWriteEncrypt == '\x01') {
lVar2 = 0;
encPrint(lefwFile," ANTENNAAREADIFFREDUCEPWL ( ");
do {
encPrint(lefwFile,"( %.11g %.11g ) ",param_2[lVar2],param_3[lVar2]);
lVar2 = lVar2 + 1;
} while (param_1 != (int)lVar2);
encPrint(lefwFile,") ;\n");
}
else {
fwrite(" ANTENNAAREADIFFREDUCEPWL ( ",0x1e,1,lefwFile);
lVar2 = 0;
do {
fprintf(lefwFile,"( %.11g %.11g ) ",param_2[lVar2],param_3[lVar2]);
lVar2 = lVar2 + 1;
} while (param_1 != (int)lVar2);
fwrite(") ;\n",4,1,lefwFile);
}
lefwLines = lefwLines + 1;
uVar1 = 0;
}
}
}
return uVar1;
}
|
|
60,540
|
get_charset
|
eloqsql/mysys/charset.c
|
CHARSET_INFO *get_charset(uint cs_number, myf flags)
{
CHARSET_INFO *cs= NULL;
if (cs_number == default_charset_info->number)
return default_charset_info;
my_pthread_once(&charsets_initialized, init_available_charsets);
if (cs_number < array_elements(all_charsets))
{
MY_CHARSET_LOADER loader;
my_charset_loader_init_mysys(&loader);
cs= get_internal_charset(&loader, cs_number, flags);
}
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
cs_string[0]='#';
int10_to_str(cs_number, cs_string+1, 10);
my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file);
}
return cs;
}
|
O0
|
c
|
get_charset:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp # imm = 0x320
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x2fc(%rbp)
movq %rsi, -0x308(%rbp)
movq $0x0, -0x310(%rbp)
movl -0x2fc(%rbp), %eax
leaq 0x31acc3(%rip), %rcx # 0x38cbc0
movq (%rcx), %rcx
cmpl (%rcx), %eax
jne 0x71f1a
leaq 0x31acb5(%rip), %rax # 0x38cbc0
movq (%rax), %rax
movq %rax, -0x2f8(%rbp)
jmp 0x71fec
leaq 0x328bc3(%rip), %rdi # 0x39aae4
leaq -0x548(%rip), %rsi # 0x719e0
callq 0x2a280
cmpl $0x800, -0x2fc(%rbp) # imm = 0x800
jae 0x71f65
leaq -0xb8(%rbp), %rdi
callq 0x71000
movl -0x2fc(%rbp), %esi
movq -0x308(%rbp), %rdx
leaq -0xb8(%rbp), %rdi
callq 0x72030
movq %rax, -0x310(%rbp)
cmpq $0x0, -0x310(%rbp)
jne 0x71fde
movq -0x308(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x71fde
leaq -0x2d0(%rbp), %rdi
callq 0x716a0
movq %rax, %rdi
leaq 0x11539(%rip), %rsi # 0x834cf
callq 0x2a2b0
movb $0x23, -0x2f0(%rbp)
movl -0x2fc(%rbp), %eax
movl %eax, %edi
leaq -0x2f0(%rbp), %rsi
addq $0x1, %rsi
movl $0xa, %edx
callq 0x6b620
leaq -0x2f0(%rbp), %rdx
leaq -0x2d0(%rbp), %rcx
movl $0x16, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x755e0
movq -0x310(%rbp), %rax
movq %rax, -0x2f8(%rbp)
movq -0x2f8(%rbp), %rax
movq %rax, -0x318(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x7201c
movq -0x318(%rbp), %rax
addq $0x320, %rsp # imm = 0x320
popq %rbp
retq
callq 0x2a2e0
nopw %cs:(%rax,%rax)
|
get_charset:
push rbp
mov rbp, rsp
sub rsp, 320h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2FC], edi
mov [rbp+var_308], rsi
mov [rbp+var_310], 0
mov eax, [rbp+var_2FC]
lea rcx, default_charset_info
mov rcx, [rcx]
cmp eax, [rcx]
jnz short loc_71F1A
lea rax, default_charset_info
mov rax, [rax]
mov [rbp+var_2F8], rax
jmp loc_71FEC
loc_71F1A:
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
cmp [rbp+var_2FC], 800h
jnb short loc_71F65
lea rdi, [rbp+var_B8]
call my_charset_loader_init_mysys
mov esi, [rbp+var_2FC]
mov rdx, [rbp+var_308]
lea rdi, [rbp+var_B8]
call get_internal_charset
mov [rbp+var_310], rax
loc_71F65:
cmp [rbp+var_310], 0
jnz short loc_71FDE
mov rax, [rbp+var_308]
and rax, 10h
cmp rax, 0
jz short loc_71FDE
lea rdi, [rbp+var_2D0]
call get_charsets_dir
mov rdi, rax
lea rsi, aIndexXml; "Index.xml"
call _stpcpy
mov [rbp+var_2F0], 23h ; '#'
mov eax, [rbp+var_2FC]
mov edi, eax
lea rsi, [rbp+var_2F0]
add rsi, 1
mov edx, 0Ah
call int10_to_str
lea rdx, [rbp+var_2F0]
lea rcx, [rbp+var_2D0]
mov edi, 16h
mov esi, 4
mov al, 0
call my_error
loc_71FDE:
mov rax, [rbp+var_310]
mov [rbp+var_2F8], rax
loc_71FEC:
mov rax, [rbp+var_2F8]
mov [rbp+var_318], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_7201C
mov rax, [rbp+var_318]
add rsp, 320h
pop rbp
retn
loc_7201C:
call ___stack_chk_fail
|
void * get_charset(unsigned int a1, long long a2)
{
long long charsets_dir; // rax
int v3; // r8d
int v4; // r9d
long long internal_charset; // [rsp+10h] [rbp-310h]
char v8; // [rsp+30h] [rbp-2F0h] BYREF
_BYTE v9[31]; // [rsp+31h] [rbp-2EFh] BYREF
_BYTE v10[536]; // [rsp+50h] [rbp-2D0h] BYREF
_BYTE v11[176]; // [rsp+268h] [rbp-B8h] BYREF
unsigned long long v12; // [rsp+318h] [rbp-8h]
v12 = __readfsqword(0x28u);
internal_charset = 0LL;
if ( a1 == *(_DWORD *)default_charset_info )
return default_charset_info;
pthread_once(&charsets_initialized, init_available_charsets);
if ( a1 < 0x800 )
{
my_charset_loader_init_mysys((long long)v11);
internal_charset = get_internal_charset(v11, a1, a2);
}
if ( !internal_charset && (a2 & 0x10) != 0 )
{
charsets_dir = get_charsets_dir(v10);
stpcpy(charsets_dir, "Index.xml");
v8 = 35;
int10_to_str(a1, v9, 10);
my_error(22, 4, (unsigned int)&v8, (unsigned int)v10, v3, v4);
}
return (void *)internal_charset;
}
|
get_charset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x320
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x2fc],EDI
MOV qword ptr [RBP + -0x308],RSI
MOV qword ptr [RBP + -0x310],0x0
MOV EAX,dword ptr [RBP + -0x2fc]
LEA RCX,[0x48cbc0]
MOV RCX,qword ptr [RCX]
CMP EAX,dword ptr [RCX]
JNZ 0x00171f1a
LEA RAX,[0x48cbc0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x2f8],RAX
JMP 0x00171fec
LAB_00171f1a:
LEA RDI,[0x49aae4]
LEA RSI,[0x1719e0]
CALL 0x0012a280
CMP dword ptr [RBP + -0x2fc],0x800
JNC 0x00171f65
LEA RDI,[RBP + -0xb8]
CALL 0x00171000
MOV ESI,dword ptr [RBP + -0x2fc]
MOV RDX,qword ptr [RBP + -0x308]
LEA RDI,[RBP + -0xb8]
CALL 0x00172030
MOV qword ptr [RBP + -0x310],RAX
LAB_00171f65:
CMP qword ptr [RBP + -0x310],0x0
JNZ 0x00171fde
MOV RAX,qword ptr [RBP + -0x308]
AND RAX,0x10
CMP RAX,0x0
JZ 0x00171fde
LEA RDI,[RBP + -0x2d0]
CALL 0x001716a0
MOV RDI,RAX
LEA RSI,[0x1834cf]
CALL 0x0012a2b0
MOV byte ptr [RBP + -0x2f0],0x23
MOV EAX,dword ptr [RBP + -0x2fc]
MOV EDI,EAX
LEA RSI,[RBP + -0x2f0]
ADD RSI,0x1
MOV EDX,0xa
CALL 0x0016b620
LEA RDX,[RBP + -0x2f0]
LEA RCX,[RBP + -0x2d0]
MOV EDI,0x16
MOV ESI,0x4
MOV AL,0x0
CALL 0x001755e0
LAB_00171fde:
MOV RAX,qword ptr [RBP + -0x310]
MOV qword ptr [RBP + -0x2f8],RAX
LAB_00171fec:
MOV RAX,qword ptr [RBP + -0x2f8]
MOV qword ptr [RBP + -0x318],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0017201c
MOV RAX,qword ptr [RBP + -0x318]
ADD RSP,0x320
POP RBP
RET
LAB_0017201c:
CALL 0x0012a2e0
|
int * get_charset(uint param_1,ulong param_2)
{
char *__dest;
long in_FS_OFFSET;
int *local_318;
int *local_300;
int1 local_2f8;
int1 auStack_2f7 [31];
int1 local_2d8 [536];
int1 local_c0 [176];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_318 = (int *)0x0;
if (param_1 == *(uint *)default_charset_info) {
local_300 = default_charset_info;
}
else {
pthread_once(&charsets_initialized,init_available_charsets);
if (param_1 < 0x800) {
my_charset_loader_init_mysys(local_c0);
local_318 = (int *)get_internal_charset(local_c0,param_1,param_2);
}
if ((local_318 == (int *)0x0) && ((param_2 & 0x10) != 0)) {
__dest = (char *)get_charsets_dir(local_2d8);
stpcpy(__dest,"Index.xml");
local_2f8 = 0x23;
int10_to_str(param_1,auStack_2f7,10);
my_error(0x16,4,&local_2f8,local_2d8);
}
local_300 = local_318;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_300;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
60,541
|
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<bool&>(bool&, bool)
|
llama.cpp/common/json.hpp
|
std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
}
|
O3
|
cpp
|
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<bool&>(bool&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movl 0x38(%rdi), %ecx
cmpq %rax, 0x20(%rdi)
sete %dl
testl %ecx, %ecx
sete %dil
andb %dl, %dil
cmpb $0x1, %dil
je 0x8b7fa
movl %ecx, %ecx
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
leaq -0x1(%rcx), %rdx
addq $0x3e, %rcx
testq %rdx, %rdx
cmovnsq %rdx, %rcx
sarq $0x6, %rcx
leaq (%rax,%rcx,8), %rax
leaq 0x3f(%r15), %rcx
andq %rdx, %rcx
xorl %edi, %edi
cmpq %r15, %rcx
setbe %dil
movq -0x8(%rax,%rdi,8), %rax
btq %rdx, %rax
jae 0x8b68d
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq (%rsi), %rsi
movq %r14, %rdi
callq 0x8b894
movq %r14, %rdi
movl $0x1, %esi
callq 0x84452
testb %bpl, %bpl
jne 0x8b63a
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
shrq $0x3, %rax
movl %eax, 0xc(%rsp)
movb $0x5, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x8b81b
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq *0x98(%rbx)
testb %al, %al
je 0x8b7ce
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x8b697
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x8b7ce
movzbl (%rax), %ecx
cmpl $0x1, %ecx
je 0x8b6f1
cmpl $0x2, %ecx
jne 0x8b820
movq 0x8(%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x88268
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x8b7ca
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x8b7ea
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x84452
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x84452
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x865be
movq %r15, %rdi
xorl %esi, %esi
callq 0x84452
movq %r15, %rdi
callq 0x88b6c
movq (%rbx), %r14
jmp 0x8b7ca
movq 0x58(%rbx), %rax
movl 0x60(%rbx), %ecx
cmpq %rax, 0x48(%rbx)
sete %dl
testl %ecx, %ecx
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x8b82e
movl %ecx, %esi
leaq -0x1(%rsi), %rcx
movq %rsi, %rdx
addq $0x3e, %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
leaq (%rax,%rdx,8), %rdi
leaq 0x3f(%r15), %rdx
andq %rcx, %rdx
xorl %r8d, %r8d
cmpq %r15, %rdx
setbe %r8b
movl $0x1, %edx
shlq %cl, %rdx
andq -0x8(%rdi,%r8,8), %rdx
subl $0x1, %esi
movl %esi, 0x60(%rbx)
jae 0x8b763
movl $0x3f, 0x60(%rbx)
addq $-0x8, %rax
movq %rax, 0x58(%rbx)
testq %rdx, %rdx
je 0x8b7ce
cmpq $0x0, 0x70(%rbx)
je 0x8b84f
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x84452
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x84452
movq 0x70(%rbx), %rdi
movq %r15, %rsi
callq 0x865be
movq %r15, %rdi
xorl %esi, %esi
callq 0x84452
movq %r15, %rdi
callq 0x88b6c
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x8b7d3
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x84452
movq %r15, %rdi
callq 0x88b6c
movl %ebx, %eax
movq %r14, %rdx
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8d011(%rip), %rdi # 0x118812
leaq 0x8d045(%rip), %rdx # 0x11884d
leaq 0x8df70(%rip), %rcx # 0x11977f
movl $0x1c28, %esi # imm = 0x1C28
xorl %eax, %eax
callq 0x20e40
callq 0x21280
leaq 0x8df6c(%rip), %rcx # 0x119793
movl $0x1c4b, %esi # imm = 0x1C4B
jmp 0x8b83a
leaq 0x8df9c(%rip), %rcx # 0x1197d1
movl $0x1c57, %esi # imm = 0x1C57
leaq 0x8cfd1(%rip), %rdi # 0x118812
leaq 0x8d005(%rip), %rdx # 0x11884d
xorl %eax, %eax
callq 0x20e40
leaq 0x8cfbc(%rip), %rdi # 0x118812
leaq 0x8cff0(%rip), %rdx # 0x11884d
leaq 0x8df85(%rip), %rcx # 0x1197e9
movl $0x1c60, %esi # imm = 0x1C60
xorl %eax, %eax
callq 0x20e40
jmp 0x8b872
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x84452
movq %r14, %rdi
callq 0x88b6c
movq %rbx, %rdi
callq 0x20ad0
|
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRmEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov ebp, edx
mov rbx, rdi
mov rax, [rdi+30h]
mov ecx, [rdi+38h]
cmp [rdi+20h], rax
setz dl
test ecx, ecx
setz dil
and dil, dl
cmp dil, 1
jz loc_8B7FA
mov ecx, ecx
mov r15, 8000000000000000h
lea rdx, [rcx-1]
add rcx, 3Eh ; '>'
test rdx, rdx
cmovns rcx, rdx
sar rcx, 6
lea rax, [rax+rcx*8]
lea rcx, [r15+3Fh]
and rcx, rdx
xor edi, edi
cmp rcx, r15
setbe dil
mov rax, [rax+rdi*8-8]
bt rax, rdx
jnb loc_8B68D
xorps xmm0, xmm0
lea r14, [rsp+68h+var_58]
movaps xmmword ptr [r14], xmm0
mov rsi, [rsi]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE6EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_17number_unsigned_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<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> &,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>::number_unsigned_t)
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)
test bpl, bpl
jnz short loc_8B63A
mov rax, [rbx+10h]
sub rax, [rbx+8]
shr rax, 3
mov [rsp+68h+var_5C], eax
mov [rsp+68h+var_5D], 5
cmp qword ptr [rbx+90h], 0
jz loc_8B81B
lea rdi, [rbx+80h]
lea rsi, [rsp+68h+var_5C]
lea rdx, [rsp+68h+var_5D]
lea rcx, [rsp+68h+var_58]
call qword ptr [rbx+98h]
test al, al
jz loc_8B7CE
loc_8B63A:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_8B697
mov rax, [rax-8]
test rax, rax
jz loc_8B7CE
movzx ecx, byte ptr [rax]
cmp ecx, 1
jz loc_8B6F1
cmp ecx, 2
jnz loc_8B820
mov rdi, [rax+8]
lea rsi, [rsp+68h+var_58]
call _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> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_8B7CA
loc_8B68D:
xor ebx, ebx
xor r14d, r14d
jmp loc_8B7EA
loc_8B697:
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_38]
movaps xmmword ptr [r15], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rbx]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(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>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx]
jmp loc_8B7CA
loc_8B6F1:
mov rax, [rbx+58h]
mov ecx, [rbx+60h]
cmp [rbx+48h], rax
setz dl
test ecx, ecx
setz sil
and sil, dl
cmp sil, 1
jz loc_8B82E
mov esi, ecx
lea rcx, [rsi-1]
mov rdx, rsi
add rdx, 3Eh ; '>'
test rcx, rcx
cmovns rdx, rcx
sar rdx, 6
lea rdi, [rax+rdx*8]
lea rdx, [r15+3Fh]
and rdx, rcx
xor r8d, r8d
cmp rdx, r15
setbe r8b
mov edx, 1
shl rdx, cl
and rdx, [rdi+r8*8-8]
sub esi, 1
mov [rbx+60h], esi
jnb short loc_8B763
mov dword ptr [rbx+60h], 3Fh ; '?'
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbx+58h], rax
loc_8B763:
test rdx, rdx
jz short loc_8B7CE
cmp qword ptr [rbx+70h], 0
jz loc_8B84F
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_48]
movaps xmmword ptr [r15], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rbx+70h]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(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>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx+70h]
loc_8B7CA:
mov bl, 1
jmp short loc_8B7D3
loc_8B7CE:
xor ebx, ebx
xor r14d, r14d
loc_8B7D3:
lea r15, [rsp+68h+var_58]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_8B7EA:
mov eax, ebx
mov rdx, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_8B7FA:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1C28h
xor eax, eax
call _ggml_abort
loc_8B81B:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_8B820:
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
mov esi, 1C4Bh
jmp short loc_8B83A
loc_8B82E:
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
mov esi, 1C57h
loc_8B83A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
xor eax, eax
call _ggml_abort
loc_8B84F:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
mov esi, 1C60h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_8B872:
mov rbx, rax
lea r14, [rsp+68h+var_58]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, rbx
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<unsigned long &>(
long long a1,
_QWORD *a2,
char a3)
{
unsigned int v4; // ebx
long long v5; // rax
unsigned int v6; // ecx
signed long long v7; // rdx
long long v8; // rcx
long long v9; // rax
long long v10; // rax
unsigned __int8 *v11; // rax
int v12; // ecx
long long v13; // rax
unsigned int v14; // ecx
long long v15; // rsi
long long v16; // rcx
long long v17; // rdx
long long v18; // rdx
const char *v20; // rcx
long long v21; // rsi
long long v22; // rax
long long v23; // rbx
char v24; // [rsp+Bh] [rbp-5Dh] BYREF
int v25; // [rsp+Ch] [rbp-5Ch] BYREF
__int128 v26; // [rsp+10h] [rbp-58h] BYREF
__int128 v27; // [rsp+20h] [rbp-48h] BYREF
_OWORD v28[3]; // [rsp+30h] [rbp-38h] BYREF
v4 = a1;
v5 = *(_QWORD *)(a1 + 48);
v6 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
goto LABEL_28;
}
v7 = v6 - 1LL;
v8 = v6 + 62LL;
if ( v7 >= 0 )
v8 = v7;
v9 = *(_QWORD *)(v5 + 8 * (v8 >> 6) + 8LL * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8);
if ( _bittest64(&v9, v7) )
{
v26 = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<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>>(
&v26,
*a2);
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 *)&v26);
if ( a3 )
{
LABEL_8:
v10 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v10 )
{
v28[0] = v26;
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 *)&v26);
LOBYTE(v26) = 0;
*((_QWORD *)&v26 + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v28);
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,
(long long)v28);
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 *)v28);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v28);
goto LABEL_23;
}
v11 = *(unsigned __int8 **)(v10 - 8);
if ( v11 )
{
v12 = *v11;
if ( v12 != 1 )
{
if ( v12 == 2 )
{
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 *)v11 + 1),
(long long)&v26);
LABEL_23:
LOBYTE(v4) = 1;
LABEL_25:
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 *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26);
return v4;
}
v20 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
v21 = 7243LL;
goto LABEL_31;
}
v13 = *(_QWORD *)(a1 + 88);
v14 = *(_DWORD *)(a1 + 96);
if ( *(_QWORD *)(a1 + 72) == v13 && v14 == 0 )
{
v20 = "!key_keep_stack.empty()";
v21 = 7255LL;
LABEL_31:
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", v21, "GGML_ASSERT(%s) failed", v20);
goto LABEL_32;
}
v15 = v14;
v16 = v14 - 1LL;
v17 = v15 + 62;
if ( v16 >= 0 )
v17 = v16;
v18 = *(_QWORD *)(v13 + 8 * (v17 >> 6) + 8LL * ((v16 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v16);
*(_DWORD *)(a1 + 96) = v15 - 1;
if ( !(_DWORD)v15 )
{
*(_DWORD *)(a1 + 96) = 63;
*(_QWORD *)(a1 + 88) = v13 - 8;
}
if ( v18 )
{
if ( *(_QWORD *)(a1 + 112) )
{
v27 = v26;
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 *)&v26);
LOBYTE(v26) = 0;
*((_QWORD *)&v26 + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v27);
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 + 112),
(long long)&v27);
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 *)&v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v27);
goto LABEL_23;
}
LABEL_32:
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
v23 = v22;
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 *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26);
_Unwind_Resume(v23);
}
}
LABEL_24:
v4 = 0;
goto LABEL_25;
}
v25 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3;
v24 = 5;
if ( *(_QWORD *)(a1 + 144) )
{
if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))(
a1 + 128,
&v25,
&v24,
&v26) )
goto LABEL_24;
goto LABEL_8;
}
LABEL_28:
std::__throw_bad_function_call();
}
return 0;
}
|
handle_value<unsigned_long&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV EBP,EDX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x30]
MOV ECX,dword ptr [RDI + 0x38]
CMP qword ptr [RDI + 0x20],RAX
SETZ DL
TEST ECX,ECX
SETZ DIL
AND DIL,DL
CMP DIL,0x1
JZ 0x0018b7fa
MOV ECX,ECX
MOV R15,-0x8000000000000000
LEA RDX,[RCX + -0x1]
ADD RCX,0x3e
TEST RDX,RDX
CMOVNS RCX,RDX
SAR RCX,0x6
LEA RAX,[RAX + RCX*0x8]
LEA RCX,[R15 + 0x3f]
AND RCX,RDX
XOR EDI,EDI
CMP RCX,R15
SETBE DIL
MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8]
BT RAX,RDX
JNC 0x0018b68d
XORPS XMM0,XMM0
LEA R14,[RSP + 0x10]
MOVAPS xmmword ptr [R14],XMM0
MOV RSI,qword ptr [RSI]
MOV RDI,R14
CALL 0x0018b894
MOV RDI,R14
MOV ESI,0x1
CALL 0x00184452
TEST BPL,BPL
JNZ 0x0018b63a
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x5
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0018b81b
LEA RDI,[RBX + 0x80]
LAB_0018b61d:
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
LEA RCX,[RSP + 0x10]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JZ 0x0018b7ce
LAB_0018b63a:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0018b697
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x0018b7ce
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x1
JZ 0x0018b6f1
CMP ECX,0x2
JNZ 0x0018b820
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x10]
CALL 0x00188268
LAB_0018b674:
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x0018b7ca
LAB_0018b68d:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x0018b7ea
LAB_0018b697:
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x30]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x00184452
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x00184452
MOV RDI,qword ptr [RBX]
MOV RSI,R15
CALL 0x001865be
MOV RDI,R15
XOR ESI,ESI
CALL 0x00184452
MOV RDI,R15
CALL 0x00188b6c
MOV R14,qword ptr [RBX]
JMP 0x0018b7ca
LAB_0018b6f1:
MOV RAX,qword ptr [RBX + 0x58]
MOV ECX,dword ptr [RBX + 0x60]
CMP qword ptr [RBX + 0x48],RAX
SETZ DL
TEST ECX,ECX
SETZ SIL
AND SIL,DL
CMP SIL,0x1
JZ 0x0018b82e
MOV ESI,ECX
LEA RCX,[RSI + -0x1]
MOV RDX,RSI
ADD RDX,0x3e
TEST RCX,RCX
CMOVNS RDX,RCX
SAR RDX,0x6
LEA RDI,[RAX + RDX*0x8]
LEA RDX,[R15 + 0x3f]
AND RDX,RCX
XOR R8D,R8D
CMP RDX,R15
SETBE R8B
MOV EDX,0x1
SHL RDX,CL
AND RDX,qword ptr [RDI + R8*0x8 + -0x8]
SUB ESI,0x1
MOV dword ptr [RBX + 0x60],ESI
JNC 0x0018b763
MOV dword ptr [RBX + 0x60],0x3f
ADD RAX,-0x8
MOV qword ptr [RBX + 0x58],RAX
LAB_0018b763:
TEST RDX,RDX
JZ 0x0018b7ce
CMP qword ptr [RBX + 0x70],0x0
JZ 0x0018b84f
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x20]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x00184452
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x00184452
MOV RDI,qword ptr [RBX + 0x70]
MOV RSI,R15
CALL 0x001865be
MOV RDI,R15
XOR ESI,ESI
CALL 0x00184452
MOV RDI,R15
CALL 0x00188b6c
MOV R14,qword ptr [RBX + 0x70]
LAB_0018b7ca:
MOV BL,0x1
JMP 0x0018b7d3
LAB_0018b7ce:
XOR EBX,EBX
XOR R14D,R14D
LAB_0018b7d3:
LEA R15,[RSP + 0x10]
MOV RDI,R15
XOR ESI,ESI
CALL 0x00184452
MOV RDI,R15
CALL 0x00188b6c
LAB_0018b7ea:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0018b7fa:
LEA RDI,[0x218812]
LEA RDX,[0x21884d]
LEA RCX,[0x21977f]
MOV ESI,0x1c28
XOR EAX,EAX
CALL 0x00120e40
LAB_0018b81b:
CALL 0x00121280
LAB_0018b820:
LEA RCX,[0x219793]
MOV ESI,0x1c4b
JMP 0x0018b83a
LAB_0018b82e:
LEA RCX,[0x2197d1]
MOV ESI,0x1c57
LAB_0018b83a:
LEA RDI,[0x218812]
LEA RDX,[0x21884d]
XOR EAX,EAX
CALL 0x00120e40
LAB_0018b84f:
LEA RDI,[0x218812]
LEA RDX,[0x21884d]
LEA RCX,[0x2197e9]
MOV ESI,0x1c60
XOR EAX,EAX
CALL 0x00120e40
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<unsigned long&>(unsigned long&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<unsigned_long&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong *param_1,bool param_2)
{
uint uVar1;
char cVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
int8 uVar6;
bool bVar7;
long lVar8;
int1 auVar9 [16];
int1 local_5d;
int4 local_5c;
ulong local_58;
int8 uStack_50;
ulong local_48;
int8 uStack_40;
ulong local_38;
int8 uStack_30;
uVar1 = *(uint *)(this + 0x38);
if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) &
1) == 0) {
uVar5 = 0;
lVar8 = 0;
goto LAB_0018b7ea;
}
local_58 = 0;
uStack_50 = 0;
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(&local_58,*param_1);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
if (param_2) {
LAB_0018b63a:
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
local_38 = local_58;
uStack_30 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_38,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)this,(data *)&local_38);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_38);
lVar8 = *(long *)this;
}
else {
pcVar4 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar4 == (char *)0x0) goto LAB_0018b7ce;
if (*pcVar4 == '\x01') {
lVar8 = *(long *)(this + 0x58);
uVar1 = *(uint *)(this + 0x60);
if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) {
pcVar4 = "!key_keep_stack.empty()";
uVar6 = 0x1c57;
goto LAB_0018b83a;
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8);
*(uint *)(this + 0x60) = uVar1 - 1;
if (uVar1 == 0) {
*(int4 *)(this + 0x60) = 0x3f;
*(long *)(this + 0x58) = lVar8 + -8;
}
if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_0018b7ce;
if (*(long *)(this + 0x70) == 0) {
/* try { // try from 0018b84f to 0018b86f has its CatchHandler @ 0018b870 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1c60,
"GGML_ASSERT(%s) failed","object_element");
}
local_48 = local_58;
uStack_40 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_48,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(this + 0x70),(data *)&local_48);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_48);
lVar8 = *(long *)(this + 0x70);
}
else {
if (*pcVar4 != '\x02') {
pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
uVar6 = 0x1c4b;
LAB_0018b83a:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar6,
"GGML_ASSERT(%s) failed",pcVar4);
}
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>>>
**)(pcVar4 + 8),(basic_json *)&local_58);
lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
}
uVar5 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
local_5c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3);
local_5d = 5;
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 0018b81b to 0018b84e has its CatchHandler @ 0018b872 */
std::__throw_bad_function_call();
}
/* try { // try from 0018b61d to 0018b673 has its CatchHandler @ 0018b872 */
cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_5c,&local_5d,&local_58);
if (cVar2 != '\0') goto LAB_0018b63a;
LAB_0018b7ce:
uVar5 = 0;
lVar8 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_58,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_58);
LAB_0018b7ea:
auVar9._0_8_ = uVar5 & 0xffffffff;
auVar9._8_8_ = lVar8;
return auVar9;
}
|
|
60,542
|
inline_mysql_file_open(unsigned int, char const*, unsigned int, char const*, int, unsigned long)
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline File
inline_mysql_file_open(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *filename, int flags, myf myFlags)
{
File file;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename,
&locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
file= my_open(filename, flags, myFlags);
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
return file;
}
#endif
file= my_open(filename, flags, myFlags);
return file;
}
|
O0
|
c
|
inline_mysql_file_open(unsigned int, char const*, unsigned int, char const*, int, unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
leaq 0xcb6658(%rip), %rax # 0x13feeb0
movq (%rax), %rax
movq 0x148(%rax), %rax
movl -0x8(%rbp), %esi
movq -0x20(%rbp), %rcx
leaq -0x88(%rbp), %rdi
movl $0x2, %edx
leaq -0x40(%rbp), %r8
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x7488e4
leaq 0xcb6618(%rip), %rax # 0x13feeb0
movq (%rax), %rax
movq 0x1f0(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq *%rax
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x30(%rbp), %rdx
callq 0xc1b630
movl %eax, -0x34(%rbp)
leaq 0xcb65e7(%rip), %rax # 0x13feeb0
movq (%rax), %rax
movq 0x200(%rax), %rax
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %esi
callq *%rax
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x7488fd
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x30(%rbp), %rdx
callq 0xc1b630
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZL22inline_mysql_file_openjPKcjS0_im_7:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+148h]
mov esi, [rbp+var_8]
mov rcx, [rbp+var_20]
lea rdi, [rbp+var_88]
mov edx, 2
lea r8, [rbp+var_40]
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_7488E4
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1F0h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call rax
mov rdi, [rbp+var_20]
mov esi, [rbp+var_24]
mov rdx, [rbp+var_30]
call my_open
mov [rbp+var_34], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+200h]
mov rdi, [rbp+var_40]
mov esi, [rbp+var_34]
call rax
mov eax, [rbp+var_34]
mov [rbp+var_4], eax
jmp short loc_7488FD
loc_7488E4:
mov rdi, [rbp+var_20]
mov esi, [rbp+var_24]
mov rdx, [rbp+var_30]
call my_open
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
mov [rbp+var_4], eax
loc_7488FD:
mov eax, [rbp+var_4]
add rsp, 90h
pop rbp
retn
|
long long inline_mysql_file_open(
unsigned int a1,
const char *a2,
unsigned int a3,
const char *a4,
unsigned int a5,
long long a6)
{
_BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF
long long v8; // [rsp+50h] [rbp-40h] BYREF
unsigned int v9; // [rsp+5Ch] [rbp-34h]
long long v10; // [rsp+60h] [rbp-30h]
unsigned int v11; // [rsp+6Ch] [rbp-24h]
const char *v12; // [rsp+70h] [rbp-20h]
unsigned int v13; // [rsp+7Ch] [rbp-14h]
const char *v14; // [rsp+80h] [rbp-10h]
unsigned int v15; // [rsp+88h] [rbp-8h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = a6;
v8 = ((long long ( *)(_BYTE *, _QWORD, long long, const char *, long long *))PSI_server[41])(v7, a1, 2LL, a4, &v8);
if ( v8 )
{
((void ( *)(long long, const char *, _QWORD))PSI_server[62])(v8, v14, v13);
v9 = my_open(v12, v11, v10);
((void ( *)(long long, _QWORD))PSI_server[64])(v8, v9);
}
else
{
return (unsigned int)my_open(v12, v11, v10);
}
return v9;
}
|
get_keyinfo_by_key_no:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x00745d60
TEST AL,0x1
JNZ 0x00748855
JMP 0x00748863
LAB_00748855:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00748882
LAB_00748863:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0xa8]
MOV ECX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0xc0
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_00748882:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
/* st_join_table::get_keyinfo_by_key_no(unsigned int) */
long __thiscall st_join_table::get_keyinfo_by_key_no(st_join_table *this,uint param_1)
{
ulong uVar1;
long local_28;
uVar1 = is_hash_join_key_no(param_1);
if ((uVar1 & 1) == 0) {
local_28 = *(long *)(*(long *)this + 0xa8) + (ulong)param_1 * 0xc0;
}
else {
local_28 = *(long *)(this + 0x18);
}
return local_28;
}
|
|
60,543
|
minja::Value::contains(minja::Value const&) const
|
llama.cpp/common/minja/minja.hpp
|
bool contains(const Value & value) const {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (array_) {
for (const auto& item : *array_) {
if (item.to_bool() && item == value) return true;
}
return false;
} else if (object_) {
if (!value.is_hashable()) throw std::runtime_error("Unashable type: " + value.dump());
return object_->find(value.primitive_) != object_->end();
} else {
throw std::runtime_error("contains can only be called on arrays and objects: " + dump());
}
}
|
O3
|
cpp
|
minja::Value::contains(minja::Value const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rdi), %rax
movq 0x20(%rdi), %r12
testq %r12, %r12
jne 0x773b0
testq %rax, %rax
jne 0x773b0
cmpb $0x0, 0x40(%r15)
jne 0x773b0
cmpq $0x0, 0x30(%r15)
je 0x77460
testq %rax, %rax
je 0x773e6
movq (%rax), %r14
movq 0x8(%rax), %r15
cmpq %r15, %r14
je 0x773e2
movq %r14, %rdi
callq 0x75bac
testb %al, %al
je 0x773dc
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7778c
testb %al, %al
jne 0x77451
addq $0x50, %r14
jmp 0x773bc
xorl %eax, %eax
jmp 0x77453
testq %r12, %r12
je 0x77492
cmpq $0x0, 0x10(%rbx)
jne 0x774ef
cmpq $0x0, 0x20(%rbx)
jne 0x774ef
cmpq $0x0, 0x30(%rbx)
jne 0x774ef
movq (%r12), %r14
cmpq 0x8(%r12), %r14
je 0x77446
addq $0x40, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x72f7c
testb %al, %al
jne 0x77439
addq $0x60, %r14
cmpq 0x8(%r12), %r14
jne 0x7741f
movq %r14, %rax
movq 0x20(%r15), %rcx
movq 0x8(%rcx), %r14
jmp 0x77449
movq %r14, %rax
cmpq %r14, %rax
setne %al
jmp 0x77453
movb $0x1, %al
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1c460
movq %rax, %r14
leaq 0x54b06(%rip), %rsi # 0xcbf7a
movq %rax, %rdi
callq 0x1c280
movq 0x88b35(%rip), %rsi # 0xfffb8
movq 0x88aee(%rip), %rdx # 0xfff78
movq %r14, %rdi
callq 0x1c7b0
movl $0x10, %edi
callq 0x1c460
movq %rax, %r14
movq %rsp, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x6cb9a
leaq 0x54dc5(%rip), %rsi # 0xcc27d
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x66b64
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1c2c0
xorl %ebp, %ebp
movq 0x88ada(%rip), %rsi # 0xfffb8
movq 0x88a93(%rip), %rdx # 0xfff78
movq %r14, %rdi
callq 0x1c7b0
jmp 0x7754a
movl $0x10, %edi
callq 0x1c460
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x6cb9a
leaq 0x54d57(%rip), %rsi # 0xcc26c
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x66b64
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1c2c0
xorl %ebp, %ebp
movq 0x88a7d(%rip), %rsi # 0xfffb8
movq 0x88a36(%rip), %rdx # 0xfff78
movq %r14, %rdi
callq 0x1c7b0
jmp 0x7754e
jmp 0x7758e
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7756c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1c110
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x77587
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1c110
testb %bpl, %bpl
jne 0x775b5
jmp 0x775bd
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x775b5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1c110
jmp 0x775b5
jmp 0x775b2
jmp 0x775b2
movq %rax, %rbx
movq %r14, %rdi
callq 0x1caa0
movq %rbx, %rdi
callq 0x1c7d0
nop
|
_ZNK5minja5Value8containsERKS0_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov rbx, rsi
mov r15, rdi
mov rax, [rdi+10h]
mov r12, [rdi+20h]
test r12, r12
jnz short loc_773B0
test rax, rax
jnz short loc_773B0
cmp byte ptr [r15+40h], 0
jnz short loc_773B0
cmp qword ptr [r15+30h], 0
jz loc_77460
loc_773B0:
test rax, rax
jz short loc_773E6
mov r14, [rax]
mov r15, [rax+8]
loc_773BC:
cmp r14, r15
jz short loc_773E2
mov rdi, r14; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
test al, al
jz short loc_773DC
mov rdi, r14
mov rsi, rbx
call _ZNK5minja5ValueeqERKS0_; minja::Value::operator==(minja::Value const&)
test al, al
jnz short loc_77451
loc_773DC:
add r14, 50h ; 'P'
jmp short loc_773BC
loc_773E2:
xor eax, eax
jmp short loc_77453
loc_773E6:
test r12, r12
jz loc_77492
cmp qword ptr [rbx+10h], 0
jnz loc_774EF
cmp qword ptr [rbx+20h], 0
jnz loc_774EF
cmp qword ptr [rbx+30h], 0
jnz loc_774EF
mov r14, [r12]
cmp r14, [r12+8]
jz short loc_77446
add rbx, 40h ; '@'
loc_7741F:
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_77439
add r14, 60h ; '`'
cmp r14, [r12+8]
jnz short loc_7741F
loc_77439:
mov rax, r14
mov rcx, [r15+20h]
mov r14, [rcx+8]
jmp short loc_77449
loc_77446:
mov rax, r14
loc_77449:
cmp rax, r14
setnz al
jmp short loc_77453
loc_77451:
mov al, 1
loc_77453:
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_77460:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_77492:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, r15
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aContainsCanOnl; "contains can only be called on arrays a"...
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_7754A
loc_774EF:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_7754A:
jmp short loc_7754E
jmp short loc_7758E
loc_7754E:
mov rbx, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7756C
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7756C:
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_77587
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77587:
test bpl, bpl
jnz short loc_775B5
jmp short loc_775BD
loc_7758E:
mov rbx, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_775B5
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_775B5
jmp short loc_775B2
jmp short $+2
loc_775B2:
mov rbx, rax
loc_775B5:
mov rdi, r14; void *
call ___cxa_free_exception
loc_775BD:
mov rdi, rbx
call __Unwind_Resume
|
bool minja::Value::contains(minja::Value *this, const minja::Value *a2, __m128d a3)
{
minja::Value **v3; // rax
unsigned __int8 **v4; // r12
minja::Value *v5; // r14
minja::Value *v6; // r15
unsigned __int8 *v8; // r14
unsigned __int8 *v9; // rax
std::runtime_error *exception; // r14
void *v11; // r14
void *v12; // r14
_BYTE v13[16]; // [rsp+0h] [rbp-68h] BYREF
_QWORD v14[2]; // [rsp+20h] [rbp-48h] BYREF
v3 = (minja::Value **)*((_QWORD *)this + 2);
v4 = (unsigned __int8 **)*((_QWORD *)this + 4);
if ( !v4 && !v3 && !*((_BYTE *)this + 64) && !*((_QWORD *)this + 6) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v3 )
{
v5 = *v3;
v6 = v3[1];
while ( 1 )
{
if ( v5 == v6 )
return 0;
if ( (unsigned __int8)minja::Value::to_bool(v5) && (unsigned __int8)minja::Value::operator==(v5, a2) )
break;
v5 = (minja::Value *)((char *)v5 + 80);
}
return 1;
}
else
{
if ( !v4 )
{
v11 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v13, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>(v14, (long long)"contains can only be called on arrays and objects: ", (long long)v13);
std::runtime_error::runtime_error(v11, v14);
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *((_QWORD *)a2 + 2) || *((_QWORD *)a2 + 4) || *((_QWORD *)a2 + 6) )
{
v12 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v13, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>(v14, (long long)"Unashable type: ", (long long)v13);
std::runtime_error::runtime_error(v12, v14);
__cxa_throw(
v12,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v8 = *v4;
if ( *v4 == v4[1] )
{
v9 = *v4;
}
else
{
do
{
if ( (unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v8, (unsigned __int8 *)a2 + 64, a3) )
break;
v8 += 96;
}
while ( v8 != v4[1] );
v9 = v8;
v8 = *(unsigned __int8 **)(*((_QWORD *)this + 4) + 8LL);
}
return v9 != v8;
}
}
|
contains:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV R12,qword ptr [RDI + 0x20]
TEST R12,R12
JNZ 0x001773b0
TEST RAX,RAX
JNZ 0x001773b0
CMP byte ptr [R15 + 0x40],0x0
JNZ 0x001773b0
CMP qword ptr [R15 + 0x30],0x0
JZ 0x00177460
LAB_001773b0:
TEST RAX,RAX
JZ 0x001773e6
MOV R14,qword ptr [RAX]
MOV R15,qword ptr [RAX + 0x8]
LAB_001773bc:
CMP R14,R15
JZ 0x001773e2
MOV RDI,R14
CALL 0x00175bac
TEST AL,AL
JZ 0x001773dc
MOV RDI,R14
MOV RSI,RBX
CALL 0x0017778c
TEST AL,AL
JNZ 0x00177451
LAB_001773dc:
ADD R14,0x50
JMP 0x001773bc
LAB_001773e2:
XOR EAX,EAX
JMP 0x00177453
LAB_001773e6:
TEST R12,R12
JZ 0x00177492
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x001774ef
CMP qword ptr [RBX + 0x20],0x0
JNZ 0x001774ef
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x001774ef
MOV R14,qword ptr [R12]
CMP R14,qword ptr [R12 + 0x8]
JZ 0x00177446
ADD RBX,0x40
LAB_0017741f:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00172f7c
TEST AL,AL
JNZ 0x00177439
ADD R14,0x60
CMP R14,qword ptr [R12 + 0x8]
JNZ 0x0017741f
LAB_00177439:
MOV RAX,R14
MOV RCX,qword ptr [R15 + 0x20]
MOV R14,qword ptr [RCX + 0x8]
JMP 0x00177449
LAB_00177446:
MOV RAX,R14
LAB_00177449:
CMP RAX,R14
SETNZ AL
JMP 0x00177453
LAB_00177451:
MOV AL,0x1
LAB_00177453:
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00177460:
MOV EDI,0x10
CALL 0x0011c460
MOV R14,RAX
LAB_0017746d:
LEA RSI,[0x1cbf7a]
MOV RDI,RAX
CALL 0x0011c280
LAB_0017747c:
MOV RSI,qword ptr [0x001fffb8]
MOV RDX,qword ptr [0x001fff78]
MOV RDI,R14
CALL 0x0011c7b0
LAB_00177492:
MOV EDI,0x10
CALL 0x0011c460
MOV R14,RAX
LAB_0017749f:
MOV RDI,RSP
MOV RSI,R15
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0016cb9a
LAB_001774b1:
LEA RSI,[0x1cc27d]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00166b64
MOV BPL,0x1
LAB_001774c8:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011c2c0
XOR EBP,EBP
MOV RSI,qword ptr [0x001fffb8]
MOV RDX,qword ptr [0x001fff78]
MOV RDI,R14
CALL 0x0011c7b0
LAB_001774ef:
MOV EDI,0x10
CALL 0x0011c460
MOV R14,RAX
LAB_001774fc:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0016cb9a
LAB_0017750e:
LEA RSI,[0x1cc26c]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00166b64
MOV BPL,0x1
LAB_00177525:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011c2c0
XOR EBP,EBP
MOV RSI,qword ptr [0x001fffb8]
MOV RDX,qword ptr [0x001fff78]
MOV RDI,R14
CALL 0x0011c7b0
|
/* minja::Value::contains(minja::Value const&) const */
bool __thiscall minja::Value::contains(Value *this,Value *param_1)
{
int8 *puVar1;
long *plVar2;
Value *pVVar3;
char cVar4;
runtime_error *prVar5;
Value *this_00;
basic_json *pbVar6;
basic_json *pbVar7;
bool bVar8;
int1 auStack_68 [32];
string local_48 [32];
puVar1 = *(int8 **)(this + 0x10);
plVar2 = *(long **)(this + 0x20);
if ((((plVar2 == (long *)0x0) && (puVar1 == (int8 *)0x0)) && (this[0x40] == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0017746d to 0017747b has its CatchHandler @ 001775b2 */
std::runtime_error::runtime_error(prVar5,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78);
}
if (puVar1 == (int8 *)0x0) {
if (plVar2 == (long *)0x0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0017749f to 001774b0 has its CatchHandler @ 001775b0 */
dump_abi_cxx11_((int)auStack_68,SUB81(this,0));
/* try { // try from 001774b1 to 001774c4 has its CatchHandler @ 0017758e */
std::operator+((char *)local_48,
(string *)"contains can only be called on arrays and objects: ");
/* try { // try from 001774c8 to 001774ec has its CatchHandler @ 0017754e */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78);
}
if (((*(long *)(param_1 + 0x10) != 0) || (*(long *)(param_1 + 0x20) != 0)) ||
(*(long *)(param_1 + 0x30) != 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001774fc to 0017750d has its CatchHandler @ 001775ae */
dump_abi_cxx11_((int)auStack_68,SUB81(param_1,0));
/* try { // try from 0017750e to 00177521 has its CatchHandler @ 0017754c */
std::operator+((char *)local_48,(string *)"Unashable type: ");
/* try { // try from 00177525 to 00177549 has its CatchHandler @ 0017754a */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78);
}
pbVar6 = (basic_json *)*plVar2;
pbVar7 = pbVar6;
if (pbVar6 != (basic_json *)plVar2[1]) {
do {
cVar4 = nlohmann::json_abi_v3_11_3::operator==(pbVar6,(basic_json *)(param_1 + 0x40));
if (cVar4 != '\0') break;
pbVar6 = pbVar6 + 0x60;
} while (pbVar6 != (basic_json *)plVar2[1]);
pbVar7 = *(basic_json **)(*(long *)(this + 0x20) + 8);
}
bVar8 = pbVar6 != pbVar7;
}
else {
pVVar3 = (Value *)puVar1[1];
for (this_00 = (Value *)*puVar1; this_00 != pVVar3; this_00 = this_00 + 0x50) {
cVar4 = to_bool(this_00);
if ((cVar4 != '\0') && (cVar4 = operator==(this_00,param_1), cVar4 != '\0')) {
return true;
}
}
bVar8 = false;
}
return bVar8;
}
|
|
60,544
|
lshift
|
eloqsql/libmariadb/libmariadb/ma_dtoa.c
|
static Bigint *lshift(Bigint *b, int k, Stack_alloc *alloc)
{
int i, k1, n, n1;
Bigint *b1;
ULong *x, *x1, *xe, z;
n= k >> 5;
k1= b->k;
n1= n + b->wds + 1;
for (i= b->maxwds; n1 > i; i<<= 1)
k1++;
b1= Balloc(k1, alloc);
x1= b1->p.x;
for (i= 0; i < n; i++)
*x1++= 0;
x= b->p.x;
xe= x + b->wds;
if (k&= 0x1f)
{
k1= 32 - k;
z= 0;
do
{
*x1++= *x << k | z;
z= *x++ >> k1;
}
while (x < xe);
if ((*x1= z))
++n1;
}
else
do
*x1++= *x++;
while (x < xe);
b1->wds= n1 - 1;
Bfree(b, alloc);
return b1;
}
|
O0
|
c
|
lshift:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %eax
sarl $0x5, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
addl 0x14(%rcx), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0x58b0b
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x1c(%rbp)
jmp 0x58af0
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x58e60
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x58b55
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x40(%rbp)
movl $0x0, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x58b2d
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0x14(%rcx), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl -0xc(%rbp), %eax
andl $0x1f, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
je 0x58bf4
movl $0x20, %eax
subl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl -0xc(%rbp), %ecx
shll %cl, %eax
movl %eax, %ecx
orl -0x4c(%rbp), %ecx
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x40(%rbp)
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x38(%rbp)
movl (%rax), %eax
movl -0x20(%rbp), %ecx
shrl %cl, %eax
movl %eax, -0x4c(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0x58b97
movl -0x4c(%rbp), %eax
movq -0x40(%rbp), %rcx
movl %eax, (%rcx)
cmpl $0x0, %eax
je 0x58bf2
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x58c24
jmp 0x58bf6
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x38(%rbp)
movl (%rax), %ecx
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x40(%rbp)
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0x58bf6
jmp 0x58c24
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x58960
movq -0x30(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
lshift:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov eax, [rbp+var_C]
sar eax, 5
mov [rbp+var_24], eax
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov [rbp+var_20], eax
mov eax, [rbp+var_24]
mov rcx, [rbp+var_8]
add eax, [rcx+14h]
add eax, 1
mov [rbp+var_28], eax
mov rax, [rbp+var_8]
mov eax, [rax+0Ch]
mov [rbp+var_1C], eax
loc_58AF0:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_1C]
jle short loc_58B0B
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
mov eax, [rbp+var_1C]
shl eax, 1
mov [rbp+var_1C], eax
jmp short loc_58AF0
loc_58B0B:
mov edi, [rbp+var_20]
mov rsi, [rbp+var_18]
call Balloc
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_40], rax
mov [rbp+var_1C], 0
loc_58B2D:
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_24]
jge short loc_58B55
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 4
mov [rbp+var_40], rcx
mov dword ptr [rax], 0
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_58B2D
loc_58B55:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
movsxd rcx, dword ptr [rcx+14h]
shl rcx, 2
add rax, rcx
mov [rbp+var_48], rax
mov eax, [rbp+var_C]
and eax, 1Fh
mov [rbp+var_C], eax
cmp eax, 0
jz short loc_58BF4
mov eax, 20h ; ' '
sub eax, [rbp+var_C]
mov [rbp+var_20], eax
mov [rbp+var_4C], 0
loc_58B97:
mov rax, [rbp+var_38]
mov eax, [rax]
mov ecx, [rbp+var_C]
shl eax, cl
mov ecx, eax
or ecx, [rbp+var_4C]
mov rax, [rbp+var_40]
mov rdx, rax
add rdx, 4
mov [rbp+var_40], rdx
mov [rax], ecx
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 4
mov [rbp+var_38], rcx
mov eax, [rax]
mov ecx, [rbp+var_20]
shr eax, cl
mov [rbp+var_4C], eax
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jb short loc_58B97
mov eax, [rbp+var_4C]
mov rcx, [rbp+var_40]
mov [rcx], eax
cmp eax, 0
jz short loc_58BF2
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
loc_58BF2:
jmp short loc_58C24
loc_58BF4:
jmp short $+2
loc_58BF6:
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 4
mov [rbp+var_38], rcx
mov ecx, [rax]
mov rax, [rbp+var_40]
mov rdx, rax
add rdx, 4
mov [rbp+var_40], rdx
mov [rax], ecx
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jb short loc_58BF6
jmp short $+2
loc_58C24:
mov ecx, [rbp+var_28]
sub ecx, 1
mov rax, [rbp+var_30]
mov [rax+14h], ecx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
call Bfree
mov rax, [rbp+var_30]
add rsp, 50h
pop rbp
retn
|
long long lshift(unsigned long long a1, int a2, unsigned long long *a3)
{
int *v3; // rax
int *v4; // rax
int *v5; // rax
int *v6; // rax
int v7; // ecx
int *v8; // rax
int v10; // [rsp+4h] [rbp-4Ch]
unsigned long long v11; // [rsp+8h] [rbp-48h]
int *v12; // [rsp+10h] [rbp-40h]
int *v13; // [rsp+18h] [rbp-38h]
long long v14; // [rsp+20h] [rbp-30h]
int v15; // [rsp+28h] [rbp-28h]
unsigned int v16; // [rsp+30h] [rbp-20h]
int i; // [rsp+34h] [rbp-1Ch]
int j; // [rsp+34h] [rbp-1Ch]
char v20; // [rsp+44h] [rbp-Ch]
v16 = *(_DWORD *)(a1 + 8);
v15 = *(_DWORD *)(a1 + 20) + (a2 >> 5) + 1;
for ( i = *(_DWORD *)(a1 + 12); v15 > i; i *= 2 )
++v16;
v14 = Balloc(v16, a3);
v12 = *(int **)v14;
for ( j = 0; j < a2 >> 5; ++j )
{
v3 = v12++;
*v3 = 0;
}
v13 = *(int **)a1;
v11 = 4LL * *(int *)(a1 + 20) + *(_QWORD *)a1;
v20 = a2 & 0x1F;
if ( (a2 & 0x1F) != 0 )
{
v10 = 0;
do
{
v4 = v12++;
*v4 = v10 | (*v13 << v20);
v5 = v13++;
v10 = (unsigned int)*v5 >> (32 - v20);
}
while ( (unsigned long long)v13 < v11 );
*v12 = v10;
if ( v10 )
++v15;
}
else
{
do
{
v6 = v13++;
v7 = *v6;
v8 = v12++;
*v8 = v7;
}
while ( (unsigned long long)v13 < v11 );
}
*(_DWORD *)(v14 + 20) = v15 - 1;
Bfree(a1, a3);
return v14;
}
|
lshift:
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 EAX,dword ptr [RBP + -0xc]
SAR EAX,0x5
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x8]
ADD EAX,dword ptr [RCX + 0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0xc]
MOV dword ptr [RBP + -0x1c],EAX
LAB_00158af0:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x1c]
JLE 0x00158b0b
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x1c]
SHL EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00158af0
LAB_00158b0b:
MOV EDI,dword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00158e60
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x1c],0x0
LAB_00158b2d:
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x24]
JGE 0x00158b55
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x40],RCX
MOV dword ptr [RAX],0x0
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00158b2d
LAB_00158b55:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RCX + 0x14]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x1f
MOV dword ptr [RBP + -0xc],EAX
CMP EAX,0x0
JZ 0x00158bf4
MOV EAX,0x20
SUB EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x20],EAX
MOV dword ptr [RBP + -0x4c],0x0
LAB_00158b97:
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xc]
SHL EAX,CL
MOV ECX,EAX
OR ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x40],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x38],RCX
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
SHR EAX,CL
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x00158b97
MOV EAX,dword ptr [RBP + -0x4c]
MOV RCX,qword ptr [RBP + -0x40]
MOV dword ptr [RCX],EAX
CMP EAX,0x0
JZ 0x00158bf2
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
LAB_00158bf2:
JMP 0x00158c24
LAB_00158bf4:
JMP 0x00158bf6
LAB_00158bf6:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x38],RCX
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x40],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x00158bf6
JMP 0x00158c24
LAB_00158c24:
MOV ECX,dword ptr [RBP + -0x28]
SUB ECX,0x1
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x14],ECX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00158960
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x50
POP RBP
RET
|
int8 * lshift(int8 *param_1,uint param_2,int8 param_3)
{
sbyte sVar1;
int iVar2;
int8 *puVar3;
uint *puVar4;
uint *puVar5;
uint *puVar6;
uint local_54;
uint *local_48;
uint *local_40;
int local_30;
int local_28;
int local_24;
local_28 = *(int *)(param_1 + 1);
iVar2 = ((int)param_2 >> 5) + *(int *)((long)param_1 + 0x14);
local_30 = iVar2 + 1;
for (local_24 = *(int *)((long)param_1 + 0xc); local_24 < local_30; local_24 = local_24 << 1) {
local_28 = local_28 + 1;
}
puVar3 = (int8 *)Balloc(local_28,param_3);
local_48 = (uint *)*puVar3;
for (local_24 = 0; local_24 < (int)param_2 >> 5; local_24 = local_24 + 1) {
*local_48 = 0;
local_48 = local_48 + 1;
}
local_40 = (uint *)*param_1;
puVar4 = local_40 + *(int *)((long)param_1 + 0x14);
if ((param_2 & 0x1f) == 0) {
do {
puVar5 = local_40 + 1;
*local_48 = *local_40;
local_48 = local_48 + 1;
local_40 = puVar5;
} while (puVar5 < puVar4);
}
else {
sVar1 = (sbyte)(param_2 & 0x1f);
local_54 = 0;
do {
puVar6 = local_48 + 1;
*local_48 = *local_40 << sVar1 | local_54;
puVar5 = local_40 + 1;
local_54 = *local_40 >> (0x20U - sVar1 & 0x1f);
local_48 = puVar6;
local_40 = puVar5;
} while (puVar5 < puVar4);
*puVar6 = local_54;
if (local_54 != 0) {
local_30 = iVar2 + 2;
}
}
*(int *)((long)puVar3 + 0x14) = local_30 + -1;
Bfree(param_1,param_3);
return puVar3;
}
|
|
60,545
|
CLI::Option::reduced_results[abi:cxx11]() const
|
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/impl/Option_inl.hpp
|
CLI11_NODISCARD CLI11_INLINE results_t Option::reduced_results() const {
results_t res = proc_results_.empty() ? results_ : proc_results_;
if(current_option_state_ < option_state::reduced) {
if(current_option_state_ == option_state::parsing) {
res = results_;
_validate_results(res);
}
if(!res.empty()) {
results_t extra;
_reduce_results(extra, res);
if(!extra.empty()) {
res = std::move(extra);
}
}
}
return res;
}
|
O1
|
cpp
|
CLI::Option::reduced_results[abi:cxx11]() const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x230, %rsi # imm = 0x230
movq 0x230(%r14), %rax
leaq 0x218(%r14), %r15
cmpq 0x238(%r14), %rax
cmoveq %r15, %rsi
callq 0x13372
movb 0x248(%r14), %al
cmpb $0x3, %al
jg 0xaf35
testb %al, %al
jne 0xaea7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x133fc
movq %r14, %rdi
movq %rbx, %rsi
callq 0x13576
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
je 0xaf35
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x138ec
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq %rcx, %rax
je 0xaf2d
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rbx), %rdx
movups 0x8(%rbx), %xmm0
movq %rax, (%rbx)
movq %rcx, 0x8(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rsi
movq %rdx, (%rdi)
movups %xmm0, 0x8(%rdi)
movq %rax, (%rsp)
movq %rcx, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
callq 0xaf62
movq %rsp, %rdi
callq 0xaf62
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0xaf62
jmp 0xaf52
movq %rax, %r14
movq %rbx, %rdi
callq 0xaf62
movq %r14, %rdi
callq 0x7780
|
_ZNK3CLI6Option15reduced_resultsB5cxx11Ev:
push r15
push r14
push rbx
sub rsp, 40h
mov r14, rsi
mov rbx, rdi
add rsi, 230h
mov rax, [r14+230h]
lea r15, [r14+218h]
cmp rax, [r14+238h]
cmovz rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
mov al, [r14+248h]
cmp al, 3
jg loc_AF35
test al, al
jnz short loc_AEA7
mov rdi, rbx
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEaSERKS7_; std::vector<std::string>::operator=(std::vector<std::string> const&)
mov rdi, r14; int
mov rsi, rbx
call _ZNK3CLI6Option17_validate_resultsERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE; CLI::Option::_validate_results(std::vector<std::string> &)
loc_AEA7:
mov rax, [rbx]
cmp rax, [rbx+8]
jz loc_AF35
xorps xmm0, xmm0
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
mov qword ptr [rsi+10h], 0
mov rdi, r14; int
mov rdx, rbx
call _ZNK3CLI6Option15_reduce_resultsERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKS9_; CLI::Option::_reduce_results(std::vector<std::string> &,std::vector<std::string> const&)
mov rax, [rsp+58h+var_58]
mov rcx, [rsp+58h+var_50]
cmp rax, rcx
jz short loc_AF2D
xorps xmm0, xmm0
lea rdi, [rsp+58h+var_38]
movaps xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov rdx, [rbx]
movups xmm0, xmmword ptr [rbx+8]
mov [rbx], rax
mov [rbx+8], rcx
mov rax, [rsp+58h+var_48]
mov [rbx+10h], rax
mov rax, [rdi]
mov rcx, [rdi+8]
mov rsi, [rdi+10h]
mov [rdi], rdx
movups xmmword ptr [rdi+8], xmm0
mov [rsp+58h+var_58], rax
mov [rsp+58h+var_50], rcx
mov [rsp+58h+var_48], rsi
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_AF2D:
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_AF35:
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_AF52
mov r14, rax
loc_AF52:
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __Unwind_Resume
|
long long * CLI::Option::reduced_results[abi:cxx11](long long *a1, long long a2)
{
long long v3; // rsi
char v4; // al
__int128 *v5; // rsi
long long v6; // rcx
long long v7; // rdx
__int128 v8; // xmm0
__int128 v9; // kr00_16
__int128 v11; // [rsp+0h] [rbp-58h] BYREF
__int128 *v12; // [rsp+10h] [rbp-48h]
_OWORD v13[3]; // [rsp+20h] [rbp-38h] BYREF
v3 = a2 + 560;
if ( *(_QWORD *)(a2 + 560) == *(_QWORD *)(a2 + 568) )
v3 = a2 + 536;
std::vector<std::string>::vector(a1, v3);
v4 = *(_BYTE *)(a2 + 584);
if ( v4 <= 3 )
{
if ( !v4 )
{
std::vector<std::string>::operator=(a1, a2 + 536);
CLI::Option::_validate_results(a2);
}
if ( *a1 != a1[1] )
{
v5 = &v11;
v11 = 0LL;
v12 = 0LL;
CLI::Option::_reduce_results(a2);
v6 = *((_QWORD *)&v11 + 1);
if ( (_QWORD)v11 != *((_QWORD *)&v11 + 1) )
{
memset(v13, 0, 24);
v7 = *a1;
v8 = *(_OWORD *)(a1 + 1);
*a1 = v11;
a1[1] = v6;
a1[2] = (long long)v12;
v9 = v13[0];
v5 = *(__int128 **)&v13[1];
*(_QWORD *)&v13[0] = v7;
*(_OWORD *)((char *)v13 + 8) = v8;
v11 = v9;
v12 = v5;
std::vector<std::string>::~vector(v13, v5);
}
std::vector<std::string>::~vector(&v11, v5);
}
}
return a1;
}
|
reduced_results[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RBX,RDI
ADD RSI,0x230
MOV RAX,qword ptr [R14 + 0x230]
LEA R15,[R14 + 0x218]
CMP RAX,qword ptr [R14 + 0x238]
CMOVZ RSI,R15
CALL 0x00113372
MOV AL,byte ptr [R14 + 0x248]
CMP AL,0x3
JG 0x0010af35
TEST AL,AL
JNZ 0x0010aea7
LAB_0010ae91:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001133fc
MOV RDI,R14
MOV RSI,RBX
CALL 0x00113576
LAB_0010aea7:
MOV RAX,qword ptr [RBX]
CMP RAX,qword ptr [RBX + 0x8]
JZ 0x0010af35
XORPS XMM0,XMM0
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x10],0x0
LAB_0010aec5:
MOV RDI,R14
MOV RDX,RBX
CALL 0x001138ec
LAB_0010aed0:
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
CMP RAX,RCX
JZ 0x0010af2d
XORPS XMM0,XMM0
LEA RDI,[RSP + 0x20]
MOVAPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RDX,qword ptr [RBX]
MOVUPS XMM0,xmmword ptr [RBX + 0x8]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],RCX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RBX + 0x10],RAX
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
MOV RSI,qword ptr [RDI + 0x10]
MOV qword ptr [RDI],RDX
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],RSI
CALL 0x0010af62
LAB_0010af2d:
MOV RDI,RSP
CALL 0x0010af62
LAB_0010af35:
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
|
/* CLI::Option::reduced_results[abi:cxx11]() const */
void CLI::Option::reduced_results_abi_cxx11_(void)
{
vector *in_RSI;
vector *pvVar1;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *in_RDI;
long local_58;
long lStack_50;
int8 local_48;
int8 local_38;
int8 uStack_30;
int8 local_28;
pvVar1 = in_RSI + 0x230;
if (*(long *)(in_RSI + 0x230) == *(long *)(in_RSI + 0x238)) {
pvVar1 = in_RSI + 0x218;
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(in_RDI,pvVar1);
if ((char)in_RSI[0x248] < '\x04') {
if (in_RSI[0x248] == (vector)0x0) {
/* try { // try from 0010ae91 to 0010aea6 has its CatchHandler @ 0010af4f */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator=
(in_RDI,in_RSI + 0x218);
_validate_results(in_RSI);
}
if (*(long *)in_RDI != *(long *)(in_RDI + 8)) {
local_58 = 0;
lStack_50 = 0;
local_48 = 0;
/* try { // try from 0010aec5 to 0010aecf has its CatchHandler @ 0010af42 */
_reduce_results((Option *)in_RSI,(vector *)&local_58,(vector *)in_RDI);
if (local_58 != lStack_50) {
local_38 = *(int8 *)in_RDI;
uStack_30 = *(int8 *)(in_RDI + 8);
local_28 = *(int8 *)(in_RDI + 0x10);
*(long *)in_RDI = local_58;
*(long *)(in_RDI + 8) = lStack_50;
*(int8 *)(in_RDI + 0x10) = local_48;
local_58 = 0;
lStack_50 = 0;
local_48 = 0;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_38);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_58);
}
}
return;
}
|
|
60,546
|
my_strnxfrm_tis620
|
eloqsql/strings/ctype-tis620.c
|
static size_t
my_strnxfrm_tis620(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
size_t len, dstlen0= dstlen;
len= MY_MIN(dstlen, srclen);
memcpy(dst, src, len);
len= thai2sortable(dst, len);
set_if_smaller(dstlen, nweights);
set_if_smaller(len, dstlen);
len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen,
(uint)(dstlen - len), flags, 0);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0)
{
size_t fill_length= dstlen0 - len;
my_ci_fill(cs, (char*) dst + len, fill_length, cs->pad_char);
len= dstlen0;
}
return len;
}
|
O0
|
c
|
my_strnxfrm_tis620:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x478ae
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x478b6
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x24210
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x479a0
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x478f3
movl -0x1c(%rbp), %eax
movq %rax, -0x18(%rbp)
jmp 0x478f5
jmp 0x478f7
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x47909
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x4790b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rcx
addq -0x18(%rbp), %rcx
movq -0x18(%rbp), %rax
subq -0x38(%rbp), %rax
movl %eax, %r8d
movl 0x10(%rbp), %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x41f60
movq %rax, -0x38(%rbp)
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x4798f
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x4798f
movq -0x40(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x8(%rbp), %rax
movzbl 0xb0(%rax), %ecx
callq 0x47b40
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
my_strnxfrm_tis620:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
cmp rax, [rbp+var_30]
jnb short loc_478AE
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
jmp short loc_478B6
loc_478AE:
mov rax, [rbp+var_30]
mov [rbp+var_50], rax
loc_478B6:
mov rax, [rbp+var_50]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_38]
call _memcpy
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
call thai2sortable
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_1C]
cmp rax, rcx
jbe short loc_478F3
mov eax, [rbp+var_1C]
mov [rbp+var_18], rax
loc_478F3:
jmp short $+2
loc_478F5:
jmp short $+2
loc_478F7:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_18]
jbe short loc_47909
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
loc_47909:
jmp short $+2
loc_4790B:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
add rdx, [rbp+var_38]
mov rcx, [rbp+var_10]
add rcx, [rbp+var_18]
mov rax, [rbp+var_18]
sub rax, [rbp+var_38]
mov r8d, eax
mov r9d, [rbp+arg_0]
xor eax, eax
mov [rsp+60h+var_60], 0
call my_strxfrm_pad_desc_and_reverse
mov [rbp+var_38], rax
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_4798F
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
jnb short loc_4798F
mov rax, [rbp+var_40]
sub rax, [rbp+var_38]
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
add rsi, [rbp+var_38]
mov rdx, [rbp+var_48]
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax+0B0h]
call my_ci_fill_1
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
loc_4798F:
mov rax, [rbp+var_38]
add rsp, 60h
pop rbp
retn
|
unsigned long long my_strnxfrm_tis620(
long long a1,
long long a2,
unsigned long long a3,
unsigned int a4,
long long a5,
unsigned long long a6,
unsigned int a7)
{
unsigned long long v8; // [rsp+10h] [rbp-50h]
unsigned long long v10; // [rsp+28h] [rbp-38h]
unsigned long long v11; // [rsp+28h] [rbp-38h]
unsigned long long v13; // [rsp+48h] [rbp-18h]
v13 = a3;
if ( a3 >= a6 )
v8 = a6;
else
v8 = a3;
memcpy(a2, a5, v8);
v10 = thai2sortable(a2, v8);
if ( v13 > a4 )
v13 = a4;
if ( v10 > v13 )
v10 = v13;
v11 = my_strxfrm_pad_desc_and_reverse(a1, a2, v10 + a2, v13 + a2, (int)v13 - (int)v10, a7, 0);
if ( (a7 & 0x80) != 0 && v11 < a3 )
{
my_ci_fill_1(a1, v11 + a2, a3 - v11, *(unsigned __int8 *)(a1 + 176));
return a3;
}
return v11;
}
|
my_strnxfrm_tis620:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x001478ae
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001478b6
LAB_001478ae:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x50],RAX
LAB_001478b6:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x00124210
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001479a0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
CMP RAX,RCX
JBE 0x001478f3
MOV EAX,dword ptr [RBP + -0x1c]
MOV qword ptr [RBP + -0x18],RAX
LAB_001478f3:
JMP 0x001478f5
LAB_001478f5:
JMP 0x001478f7
LAB_001478f7:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x00147909
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
LAB_00147909:
JMP 0x0014790b
LAB_0014790b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RBP + -0x38]
MOV R8D,EAX
MOV R9D,dword ptr [RBP + 0x10]
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x00141f60
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0014798f
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0014798f
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX + 0xb0]
CALL 0x00147b40
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
LAB_0014798f:
MOV RAX,qword ptr [RBP + -0x38]
ADD RSP,0x60
POP RBP
RET
|
ulong my_strnxfrm_tis620(long param_1,void *param_2,ulong param_3,uint param_4,void *param_5,
ulong param_6,uint param_7)
{
size_t local_58;
ulong local_40;
ulong local_20;
local_58 = param_6;
if (param_3 < param_6) {
local_58 = param_3;
}
memcpy(param_2,param_5,local_58);
local_40 = thai2sortable(param_2,local_58);
local_20 = param_3;
if (param_4 < param_3) {
local_20 = (ulong)param_4;
}
if (local_20 < local_40) {
local_40 = local_20;
}
local_40 = my_strxfrm_pad_desc_and_reverse
(param_1,param_2,(long)param_2 + local_40,(long)param_2 + local_20,
(int)local_20 - (int)local_40,param_7,0);
if (((param_7 & 0x80) != 0) && (local_40 < param_3)) {
my_ci_fill(param_1,(long)param_2 + local_40,param_3 - local_40,*(int1 *)(param_1 + 0xb0));
local_40 = param_3;
}
return local_40;
}
|
|
60,547
|
my_strnxfrm_tis620
|
eloqsql/strings/ctype-tis620.c
|
static size_t
my_strnxfrm_tis620(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
size_t len, dstlen0= dstlen;
len= MY_MIN(dstlen, srclen);
memcpy(dst, src, len);
len= thai2sortable(dst, len);
set_if_smaller(dstlen, nweights);
set_if_smaller(len, dstlen);
len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen,
(uint)(dstlen - len), flags, 0);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0)
{
size_t fill_length= dstlen0 - len;
my_ci_fill(cs, (char*) dst + len, fill_length, cs->pad_char);
len= dstlen0;
}
return len;
}
|
O3
|
c
|
my_strnxfrm_tis620:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r13
movl %ecx, %r12d
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq %r9, %rdx
cmovbq %rdx, %r13
movq %rsi, %rdi
movq %r8, %rsi
movq %r13, %rdx
callq 0x24220
movq %r14, %rdi
movq %r13, %rsi
callq 0x3a703
movl %r12d, %r8d
cmpq %rbx, %r8
cmovaeq %rbx, %r8
cmpq %r8, %r13
cmovaeq %r8, %r13
leaq (%r14,%r13), %rdx
leaq (%r14,%r8), %rcx
subl %r13d, %r8d
movl $0x0, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
movl 0x10(%rbp), %r12d
movl %r12d, %r9d
callq 0x3746c
testb %r12b, %r12b
jns 0x3a6f4
movq %rbx, %rdx
subq %rax, %rdx
jbe 0x3a6f4
addq %rax, %r14
movzbl 0xb0(%r15), %ecx
movq 0xb8(%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
callq *0x78(%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_strnxfrm_tis620:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13, r9
mov r12d, ecx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
cmp rdx, r9
cmovb r13, rdx
mov rdi, rsi
mov rsi, r8
mov rdx, r13
call _memcpy
mov rdi, r14
mov rsi, r13
call thai2sortable
mov r8d, r12d
cmp r8, rbx
cmovnb r8, rbx
cmp r13, r8
cmovnb r13, r8
lea rdx, [r14+r13]
lea rcx, [r14+r8]
sub r8d, r13d
mov [rsp+30h+var_30], 0
mov rdi, r15
mov rsi, r14
mov r12d, [rbp+arg_0]
mov r9d, r12d
call my_strxfrm_pad_desc_and_reverse
test r12b, r12b
jns short loc_3A6F4
mov rdx, rbx
sub rdx, rax
jbe short loc_3A6F4
add r14, rax
movzx ecx, byte ptr [r15+0B0h]
mov rax, [r15+0B8h]
mov rdi, r15
mov rsi, r14
call qword ptr [rax+78h]
mov rax, rbx
loc_3A6F4:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long my_strnxfrm_tis620(
long long a1,
long long a2,
unsigned long long a3,
unsigned int a4,
long long a5,
unsigned long long a6,
unsigned int a7)
{
unsigned long long v7; // r13
unsigned long long v10; // r8
unsigned long long result; // rax
v7 = a6;
if ( a3 < a6 )
v7 = a3;
memcpy(a2, a5, v7);
thai2sortable(a2, v7);
v10 = a4;
if ( a4 >= a3 )
v10 = a3;
if ( v7 >= v10 )
v7 = v10;
result = my_strxfrm_pad_desc_and_reverse(a1, a2, a2 + v7, a2 + v10, (int)v10 - (int)v7, a7, 0);
if ( (a7 & 0x80u) != 0 && a3 > result )
{
(*(void ( **)(long long, unsigned long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))(
a1,
result + a2,
a3 - result,
*(unsigned __int8 *)(a1 + 176));
return a3;
}
return result;
}
|
my_strnxfrm_tis620:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13,R9
MOV R12D,ECX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CMP RDX,R9
CMOVC R13,RDX
MOV RDI,RSI
MOV RSI,R8
MOV RDX,R13
CALL 0x00124220
MOV RDI,R14
MOV RSI,R13
CALL 0x0013a703
MOV R8D,R12D
CMP R8,RBX
CMOVNC R8,RBX
CMP R13,R8
CMOVNC R13,R8
LEA RDX,[R14 + R13*0x1]
LEA RCX,[R14 + R8*0x1]
SUB R8D,R13D
MOV dword ptr [RSP],0x0
MOV RDI,R15
MOV RSI,R14
MOV R12D,dword ptr [RBP + 0x10]
MOV R9D,R12D
CALL 0x0013746c
TEST R12B,R12B
JNS 0x0013a6f4
MOV RDX,RBX
SUB RDX,RAX
JBE 0x0013a6f4
ADD R14,RAX
MOVZX ECX,byte ptr [R15 + 0xb0]
MOV RAX,qword ptr [R15 + 0xb8]
MOV RDI,R15
MOV RSI,R14
CALL qword ptr [RAX + 0x78]
MOV RAX,RBX
LAB_0013a6f4:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_strnxfrm_tis620(long param_1,void *param_2,ulong param_3,uint param_4,void *param_5,
ulong param_6,int4 param_7)
{
int8 in_RAX;
ulong uVar1;
uint uVar2;
uVar2 = (uint)((ulong)in_RAX >> 0x20);
if (param_3 < param_6) {
param_6 = param_3;
}
memcpy(param_2,param_5,param_6);
thai2sortable(param_2,param_6);
uVar1 = (ulong)param_4;
if (param_3 <= param_4) {
uVar1 = param_3;
}
if (uVar1 <= param_6) {
param_6 = uVar1;
}
uVar1 = my_strxfrm_pad_desc_and_reverse
(param_1,param_2,(long)param_2 + param_6,(long)param_2 + uVar1,
(int)uVar1 - (int)param_6,param_7,(ulong)uVar2 << 0x20);
if (((char)param_7 < '\0') && (uVar1 <= param_3 && param_3 - uVar1 != 0)) {
(**(code **)(*(long *)(param_1 + 0xb8) + 0x78))
(param_1,(long)param_2 + uVar1,param_3 - uVar1,*(int1 *)(param_1 + 0xb0));
uVar1 = param_3;
}
return uVar1;
}
|
|
60,548
|
SDL_RenderTexture
|
SDL3Lite/source/SDL3/SDL_Renderer.cpp
|
bool SDL_RenderTexture(SDL_Renderer* renderer, SDL_Texture* texture, const SDL_FRect* srcrect, const SDL_FRect* dstrect)
{
assert(renderer);
assert(texture);
SDL::Rect2f srcRect;
SDL::Rect2f dstRect;
if (srcrect == NULL)
{
srcRect = SDL::Rect2f(0, 0, (float)texture->GetSize().x, (float)texture->GetSize().y);
}
else
{
srcRect = srcrect;
}
if (dstrect == NULL)
{
dstRect = SDL::Rect2f(0, 0, (float)renderer->GetSize().x, (float)renderer->GetSize().y);
}
else
{
dstRect = dstrect;
}
renderer->Draw(texture, dstRect, srcRect);
return true;
}
|
O0
|
cpp
|
SDL_RenderTexture:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x260f1
jmp 0x26110
leaq 0xda3f(%rip), %rdi # 0x33b37
leaq 0xd997(%rip), %rsi # 0x33a96
movl $0xb2, %edx
leaq 0xdbb4(%rip), %rcx # 0x33cbf
callq 0x1a190
cmpq $0x0, -0x10(%rbp)
je 0x26119
jmp 0x26138
leaq 0xdbfb(%rip), %rdi # 0x33d1b
leaq 0xd96f(%rip), %rsi # 0x33a96
movl $0xb3, %edx
leaq 0xdb8c(%rip), %rcx # 0x33cbf
callq 0x1a190
leaq -0x30(%rbp), %rdi
callq 0x2c900
leaq -0x40(%rbp), %rdi
callq 0x2c900
cmpq $0x0, -0x18(%rbp)
jne 0x26196
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
cvtsi2ssl (%rax), %xmm0
movss %xmm0, -0x64(%rbp)
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movss -0x64(%rbp), %xmm2
cvtsi2ssl 0x4(%rax), %xmm3
leaq -0x50(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x2c930
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2ca20
jmp 0x261a3
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2cac0
cmpq $0x0, -0x20(%rbp)
jne 0x261ef
movq -0x8(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
cvtsi2ssl (%rax), %xmm0
movss %xmm0, -0x68(%rbp)
movq -0x8(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movss -0x68(%rbp), %xmm2
cvtsi2ssl 0x4(%rax), %xmm3
leaq -0x60(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x2c930
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2ca20
jmp 0x261fc
movq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x2cac0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
leaq -0x40(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq *0x48(%rax)
movb $0x1, %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
|
SDL_RenderTexture:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
cmp [rbp+var_8], 0
jz short loc_260F1
jmp short loc_26110
loc_260F1:
lea rdi, aRenderer; "renderer"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/SDL3Li"...
mov edx, 0B2h
lea rcx, aBoolSdlRendert; "bool SDL_RenderTexture(SDL_Renderer *, "...
call ___assert_fail
loc_26110:
cmp [rbp+var_10], 0
jz short loc_26119
jmp short loc_26138
loc_26119:
lea rdi, aTexture; "texture"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/SDL3Li"...
mov edx, 0B3h
lea rcx, aBoolSdlRendert; "bool SDL_RenderTexture(SDL_Renderer *, "...
call ___assert_fail
loc_26138:
lea rdi, [rbp+var_30]; this
call _ZN3SDL6Rect2fC2Ev; SDL::Rect2f::Rect2f(void)
lea rdi, [rbp+var_40]; this
call _ZN3SDL6Rect2fC2Ev; SDL::Rect2f::Rect2f(void)
cmp [rbp+var_18], 0
jnz short loc_26196
mov rdi, [rbp+var_10]
mov rax, [rdi]
call qword ptr [rax+10h]
cvtsi2ss xmm0, dword ptr [rax]
movss [rbp+var_64], xmm0
mov rdi, [rbp+var_10]
mov rax, [rdi]
call qword ptr [rax+10h]
movss xmm2, [rbp+var_64]; float
cvtsi2ss xmm3, dword ptr [rax+4]; float
lea rdi, [rbp+var_50]; this
xorps xmm1, xmm1; float
movaps xmm0, xmm1; float
call _ZN3SDL6Rect2fC2Effff; SDL::Rect2f::Rect2f(float,float,float,float)
lea rdi, [rbp+var_30]
lea rsi, [rbp+var_50]
call _ZN3SDL6Rect2faSERKS0_; SDL::Rect2f::operator=(SDL::Rect2f const&)
jmp short loc_261A3
loc_26196:
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_30]
call _ZN3SDL6Rect2faSEPK9SDL_FRect; SDL::Rect2f::operator=(SDL_FRect const*)
loc_261A3:
cmp [rbp+var_20], 0
jnz short loc_261EF
mov rdi, [rbp+var_8]
mov rax, [rdi]
call qword ptr [rax+18h]
cvtsi2ss xmm0, dword ptr [rax]
movss [rbp+var_68], xmm0
mov rdi, [rbp+var_8]
mov rax, [rdi]
call qword ptr [rax+18h]
movss xmm2, [rbp+var_68]; float
cvtsi2ss xmm3, dword ptr [rax+4]; float
lea rdi, [rbp+var_60]; this
xorps xmm1, xmm1; float
movaps xmm0, xmm1; float
call _ZN3SDL6Rect2fC2Effff; SDL::Rect2f::Rect2f(float,float,float,float)
lea rdi, [rbp+var_40]
lea rsi, [rbp+var_60]
call _ZN3SDL6Rect2faSERKS0_; SDL::Rect2f::operator=(SDL::Rect2f const&)
jmp short loc_261FC
loc_261EF:
mov rsi, [rbp+var_20]
lea rdi, [rbp+var_40]
call _ZN3SDL6Rect2faSEPK9SDL_FRect; SDL::Rect2f::operator=(SDL_FRect const*)
loc_261FC:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rax, [rdi]
lea rdx, [rbp+var_40]
lea rcx, [rbp+var_30]
call qword ptr [rax+48h]
mov al, 1
and al, 1
add rsp, 70h
pop rbp
retn
|
char SDL_RenderTexture(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
long long v5; // rax
float v7; // [rsp+8h] [rbp-68h]
float v8; // [rsp+Ch] [rbp-64h]
_BYTE v9[16]; // [rsp+10h] [rbp-60h] BYREF
_BYTE v10[16]; // [rsp+20h] [rbp-50h] BYREF
_BYTE v11[16]; // [rsp+30h] [rbp-40h] BYREF
_BYTE v12[16]; // [rsp+40h] [rbp-30h] BYREF
long long v13; // [rsp+50h] [rbp-20h]
long long v14; // [rsp+58h] [rbp-18h]
long long v15; // [rsp+60h] [rbp-10h]
long long v16; // [rsp+68h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
if ( !a1 )
__assert_fail(
"renderer",
"/workspace/llm4binary/github2025/SDL3Lite/source/SDL3/SDL_Renderer.cpp",
178LL,
"bool SDL_RenderTexture(SDL_Renderer *, SDL_Texture *, const SDL_FRect *, const SDL_FRect *)");
if ( !v15 )
__assert_fail(
"texture",
"/workspace/llm4binary/github2025/SDL3Lite/source/SDL3/SDL_Renderer.cpp",
179LL,
"bool SDL_RenderTexture(SDL_Renderer *, SDL_Texture *, const SDL_FRect *, const SDL_FRect *)");
SDL::Rect2f::Rect2f((SDL::Rect2f *)v12);
SDL::Rect2f::Rect2f((SDL::Rect2f *)v11);
if ( v14 )
{
SDL::Rect2f::operator=(v12, v14);
}
else
{
v8 = (float)*(int *)(*(long long ( **)(long long))(*(_QWORD *)v15 + 16LL))(v15);
v4 = (*(long long ( **)(long long))(*(_QWORD *)v15 + 16LL))(v15);
SDL::Rect2f::Rect2f((SDL::Rect2f *)v10, 0.0, 0.0, v8, (float)*(int *)(v4 + 4));
SDL::Rect2f::operator=(v12, v10);
}
if ( v13 )
{
SDL::Rect2f::operator=(v11, v13);
}
else
{
v7 = (float)*(int *)(*(long long ( **)(long long))(*(_QWORD *)v16 + 24LL))(v16);
v5 = (*(long long ( **)(long long))(*(_QWORD *)v16 + 24LL))(v16);
SDL::Rect2f::Rect2f((SDL::Rect2f *)v9, 0.0, 0.0, v7, (float)*(int *)(v5 + 4));
SDL::Rect2f::operator=(v11, v9);
}
(*(void ( **)(long long, long long, _BYTE *, _BYTE *))(*(_QWORD *)v16 + 72LL))(v16, v15, v11, v12);
return 1;
}
|
SDL_RenderTexture:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001260f1
JMP 0x00126110
LAB_001260f1:
LEA RDI,[0x133b37]
LEA RSI,[0x133a96]
MOV EDX,0xb2
LEA RCX,[0x133cbf]
CALL 0x0011a190
LAB_00126110:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00126119
JMP 0x00126138
LAB_00126119:
LEA RDI,[0x133d1b]
LEA RSI,[0x133a96]
MOV EDX,0xb3
LEA RCX,[0x133cbf]
CALL 0x0011a190
LAB_00126138:
LEA RDI,[RBP + -0x30]
CALL 0x0012c900
LEA RDI,[RBP + -0x40]
CALL 0x0012c900
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00126196
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
CVTSI2SS XMM0,dword ptr [RAX]
MOVSS dword ptr [RBP + -0x64],XMM0
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
MOVSS XMM2,dword ptr [RBP + -0x64]
CVTSI2SS XMM3,dword ptr [RAX + 0x4]
LEA RDI,[RBP + -0x50]
XORPS XMM1,XMM1
MOVAPS XMM0,XMM1
CALL 0x0012c930
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x50]
CALL 0x0012ca20
JMP 0x001261a3
LAB_00126196:
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x30]
CALL 0x0012cac0
LAB_001261a3:
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001261ef
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
CVTSI2SS XMM0,dword ptr [RAX]
MOVSS dword ptr [RBP + -0x68],XMM0
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
MOVSS XMM2,dword ptr [RBP + -0x68]
CVTSI2SS XMM3,dword ptr [RAX + 0x4]
LEA RDI,[RBP + -0x60]
XORPS XMM1,XMM1
MOVAPS XMM0,XMM1
CALL 0x0012c930
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x60]
CALL 0x0012ca20
JMP 0x001261fc
LAB_001261ef:
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x40]
CALL 0x0012cac0
LAB_001261fc:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RDI]
LEA RDX,[RBP + -0x40]
LEA RCX,[RBP + -0x30]
CALL qword ptr [RAX + 0x48]
MOV AL,0x1
AND AL,0x1
ADD RSP,0x70
POP RBP
RET
|
int8 SDL_RenderTexture(long *param_1,long *param_2,SDL_FRect *param_3,SDL_FRect *param_4)
{
int iVar1;
int *piVar2;
long lVar3;
Rect2f local_68 [16];
Rect2f local_58 [16];
Rect2f local_48 [16];
Rect2f local_38 [16];
SDL_FRect *local_28;
SDL_FRect *local_20;
long *local_18;
long *local_10;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
if (param_1 == (long *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("renderer",
"/workspace/llm4binary/github2025/SDL3Lite/source/SDL3/SDL_Renderer.cpp",0xb2,
"bool SDL_RenderTexture(SDL_Renderer *, SDL_Texture *, const SDL_FRect *, const SDL_FRect *)"
);
}
if (param_2 != (long *)0x0) {
SDL::Rect2f::Rect2f(local_38);
SDL::Rect2f::Rect2f(local_48);
if (local_20 == (SDL_FRect *)0x0) {
piVar2 = (int *)(**(code **)(*local_18 + 0x10))();
iVar1 = *piVar2;
lVar3 = (**(code **)(*local_18 + 0x10))();
SDL::Rect2f::Rect2f(local_58,0.0,0.0,(float)iVar1,(float)*(int *)(lVar3 + 4));
SDL::Rect2f::operator=(local_38,local_58);
}
else {
SDL::Rect2f::operator=(local_38,local_20);
}
if (local_28 == (SDL_FRect *)0x0) {
piVar2 = (int *)(**(code **)(*local_10 + 0x18))();
iVar1 = *piVar2;
lVar3 = (**(code **)(*local_10 + 0x18))();
SDL::Rect2f::Rect2f(local_68,0.0,0.0,(float)iVar1,(float)*(int *)(lVar3 + 4));
SDL::Rect2f::operator=(local_48,local_68);
}
else {
SDL::Rect2f::operator=(local_48,local_28);
}
(**(code **)(*local_10 + 0x48))(local_10,local_18,local_48,local_38);
return 1;
}
/* WARNING: Subroutine does not return */
__assert_fail("texture","/workspace/llm4binary/github2025/SDL3Lite/source/SDL3/SDL_Renderer.cpp",
0xb3,
"bool SDL_RenderTexture(SDL_Renderer *, SDL_Texture *, const SDL_FRect *, const SDL_FRect *)"
);
}
|
|
60,549
|
aimrt::util::BufferArrayView::BufferArrayView(aimrt::util::BufferArray const&)
|
aimrt_mujoco_sim/_deps/aimrt-src/src/interface/aimrt_core_plugin_interface/../aimrt_module_cpp_interface/util/buffer.h
|
explicit BufferArrayView(const BufferArray& buffer_array) {
size_t len = buffer_array.Size();
aimrt_buffer_t* data = buffer_array.Data();
buffer_array_view_vec_.reserve(len);
for (size_t ii = 0; ii < len; ++ii) {
aimrt_buffer_t buffer = data[ii];
buffer_array_view_vec_.emplace_back(
aimrt_buffer_view_t{.data = buffer.data, .len = buffer.len});
}
SyncCType();
}
|
O0
|
c
|
aimrt::util::BufferArrayView::BufferArrayView(aimrt::util::BufferArray const&):
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x70(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
callq 0xe2620
movq 0x68(%rsp), %rdi
callq 0xe2630
movq %rax, 0x18(%rsp)
jmp 0xe06d6
movq 0x18(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x68(%rsp), %rdi
callq 0xe2640
movq %rax, (%rsp)
jmp 0xe06f0
movq 0x10(%rsp), %rdi
movq (%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rsi
callq 0xe2650
jmp 0xe070a
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x60(%rsp), %rax
jae 0xe0787
movq 0x10(%rsp), %rdi
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
shlq $0x4, %rcx
movups (%rax,%rcx), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x20(%rsp), %rsi
callq 0xe2760
jmp 0xe075b
jmp 0xe075d
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0xe0713
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
callq 0xe2820
jmp 0xe0798
movq 0x10(%rsp), %rdi
callq 0xe27e0
jmp 0xe0793
addq $0x78, %rsp
retq
movq 0x58(%rsp), %rdi
callq 0x92a70
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN5aimrt4util15BufferArrayViewC2ERKNS0_11BufferArrayE:
sub rsp, 78h
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_10], rsi
mov rdi, [rsp+78h+var_8]
mov [rsp+78h+var_70], rdi
mov rax, rdi
mov [rsp+78h+var_68], rax
call _ZNSt6vectorI19aimrt_buffer_view_tSaIS0_EEC2Ev; std::vector<aimrt_buffer_view_t>::vector(void)
mov rdi, [rsp+78h+var_10]; this
call _ZNK5aimrt4util11BufferArray4SizeEv; aimrt::util::BufferArray::Size(void)
mov [rsp+78h+var_60], rax
jmp short $+2
loc_E06D6:
mov rax, [rsp+78h+var_60]
mov [rsp+78h+var_18], rax
mov rdi, [rsp+78h+var_10]; this
call _ZNK5aimrt4util11BufferArray4DataEv; aimrt::util::BufferArray::Data(void)
mov [rsp+78h+var_78], rax
jmp short $+2
loc_E06F0:
mov rdi, [rsp+78h+var_68]
mov rax, [rsp+78h+var_78]
mov [rsp+78h+var_30], rax
mov rsi, [rsp+78h+var_18]
call _ZNSt6vectorI19aimrt_buffer_view_tSaIS0_EE7reserveEm; std::vector<aimrt_buffer_view_t>::reserve(ulong)
jmp short $+2
loc_E070A:
mov [rsp+78h+var_38], 0
loc_E0713:
mov rax, [rsp+78h+var_38]
cmp rax, [rsp+78h+var_18]
jnb short loc_E0787
mov rdi, [rsp+78h+var_68]
mov rax, [rsp+78h+var_30]
mov rcx, [rsp+78h+var_38]
shl rcx, 4
movups xmm0, xmmword ptr [rax+rcx]
movaps [rsp+78h+var_48], xmm0
mov rax, qword ptr [rsp+78h+var_48]
mov [rsp+78h+var_58], rax
mov rax, qword ptr [rsp+78h+var_48+8]
mov [rsp+78h+var_50], rax
lea rsi, [rsp+78h+var_58]
call _ZNSt6vectorI19aimrt_buffer_view_tSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<aimrt_buffer_view_t>::emplace_back<aimrt_buffer_view_t>(aimrt_buffer_view_t &&)
jmp short $+2
loc_E075B:
jmp short $+2
loc_E075D:
mov rax, [rsp+78h+var_38]
add rax, 1
mov [rsp+78h+var_38], rax
jmp short loc_E0713
mov rdi, [rsp+arg_0]
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
call _ZNSt6vectorI19aimrt_buffer_view_tSaIS0_EED2Ev; std::vector<aimrt_buffer_view_t>::~vector()
jmp short loc_E0798
loc_E0787:
mov rdi, [rsp+78h+var_68]; this
call _ZN5aimrt4util15BufferArrayView9SyncCTypeEv; aimrt::util::BufferArrayView::SyncCType(void)
jmp short $+2
loc_E0793:
add rsp, 78h
retn
loc_E0798:
mov rdi, [rsp+arg_50]
call __Unwind_Resume
|
long long aimrt::util::BufferArrayView::BufferArrayView(
aimrt::util::BufferArrayView *this,
const aimrt::util::BufferArray *a2)
{
__int128 v3; // [rsp+20h] [rbp-58h] BYREF
__int128 v4; // [rsp+30h] [rbp-48h]
unsigned long long i; // [rsp+40h] [rbp-38h]
long long v6; // [rsp+48h] [rbp-30h]
unsigned long long v7; // [rsp+60h] [rbp-18h]
aimrt::util::BufferArray *v8; // [rsp+68h] [rbp-10h]
aimrt::util::BufferArrayView *v9; // [rsp+70h] [rbp-8h]
v9 = this;
v8 = a2;
std::vector<aimrt_buffer_view_t>::vector();
v7 = aimrt::util::BufferArray::Size(a2);
v6 = aimrt::util::BufferArray::Data(a2);
std::vector<aimrt_buffer_view_t>::reserve(this, v7);
for ( i = 0LL; i < v7; ++i )
{
v4 = *(_OWORD *)(v6 + 16 * i);
v3 = v4;
std::vector<aimrt_buffer_view_t>::emplace_back<aimrt_buffer_view_t>(this, &v3);
}
return aimrt::util::BufferArrayView::SyncCType(this);
}
|
BufferArrayView:
SUB RSP,0x78
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RSI
MOV RDI,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001e2620
MOV RDI,qword ptr [RSP + 0x68]
LAB_001e06ca:
CALL 0x001e2630
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001e06d6
LAB_001e06d6:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x60],RAX
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x001e2640
MOV qword ptr [RSP],RAX
JMP 0x001e06f0
LAB_001e06f0:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x48],RAX
MOV RSI,qword ptr [RSP + 0x60]
CALL 0x001e2650
JMP 0x001e070a
LAB_001e070a:
MOV qword ptr [RSP + 0x40],0x0
LAB_001e0713:
MOV RAX,qword ptr [RSP + 0x40]
CMP RAX,qword ptr [RSP + 0x60]
JNC 0x001e0787
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x40]
SHL RCX,0x4
MOVUPS XMM0,xmmword ptr [RAX + RCX*0x1]
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
LEA RSI,[RSP + 0x20]
CALL 0x001e2760
JMP 0x001e075b
LAB_001e075b:
JMP 0x001e075d
LAB_001e075d:
MOV RAX,qword ptr [RSP + 0x40]
ADD RAX,0x1
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001e0713
LAB_001e0787:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001e27e0
LAB_001e0791:
JMP 0x001e0793
LAB_001e0793:
ADD RSP,0x78
RET
|
/* aimrt::util::BufferArrayView::BufferArrayView(aimrt::util::BufferArray const&) */
void __thiscall
aimrt::util::BufferArrayView::BufferArrayView(BufferArrayView *this,BufferArray *param_1)
{
int8 *puVar1;
int8 local_58;
int8 local_50;
int8 local_48;
int8 uStack_40;
ulong local_38;
long local_30;
ulong local_18;
BufferArray *local_10;
BufferArrayView *local_8;
local_10 = param_1;
local_8 = this;
std::vector<aimrt_buffer_view_t,std::allocator<aimrt_buffer_view_t>>::vector
((vector<aimrt_buffer_view_t,std::allocator<aimrt_buffer_view_t>> *)this);
/* try { // try from 001e06ca to 001e0790 has its CatchHandler @ 001e076d */
local_18 = BufferArray::Size(local_10);
local_30 = BufferArray::Data(local_10);
std::vector<aimrt_buffer_view_t,std::allocator<aimrt_buffer_view_t>>::reserve
((vector<aimrt_buffer_view_t,std::allocator<aimrt_buffer_view_t>> *)this,local_18);
for (local_38 = 0; local_38 < local_18; local_38 = local_38 + 1) {
puVar1 = (int8 *)(local_30 + local_38 * 0x10);
local_58 = *puVar1;
local_50 = puVar1[1];
local_48 = local_58;
uStack_40 = local_50;
std::vector<aimrt_buffer_view_t,std::allocator<aimrt_buffer_view_t>>::
emplace_back<aimrt_buffer_view_t>
((vector<aimrt_buffer_view_t,std::allocator<aimrt_buffer_view_t>> *)this,
(aimrt_buffer_view_t *)&local_58);
}
SyncCType(this);
return;
}
|
|
60,550
|
aimrt::util::BufferArrayView::BufferArrayView(aimrt::util::BufferArray const&)
|
aimrt_mujoco_sim/_deps/aimrt-src/src/interface/aimrt_core_plugin_interface/../aimrt_module_cpp_interface/util/buffer.h
|
explicit BufferArrayView(const BufferArray& buffer_array) {
size_t len = buffer_array.Size();
aimrt_buffer_t* data = buffer_array.Data();
buffer_array_view_vec_.reserve(len);
for (size_t ii = 0; ii < len; ++ii) {
aimrt_buffer_t buffer = data[ii];
buffer_array_view_vec_.emplace_back(
aimrt_buffer_view_t{.data = buffer.data, .len = buffer.len});
}
SyncCType();
}
|
O3
|
c
|
aimrt::util::BufferArrayView::BufferArrayView(aimrt::util::BufferArray const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %r12
movq 0x8(%rsi), %r14
movq %r14, %rsi
callq 0x3d428
testq %r14, %r14
je 0x3d043
addq $0x8, %r12
leaq 0x8(%rsp), %r15
movups -0x8(%r12), %xmm0
movups %xmm0, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3d02f
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rbx)
jmp 0x3d03a
movq %rbx, %rdi
movq %r15, %rdx
callq 0x3d4e6
addq $0x10, %r12
decq %r14
jne 0x3d00b
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rax, 0x18(%rbx)
subq %rax, %rcx
sarq $0x4, %rcx
movq %rcx, 0x20(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3d067
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3d07e
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1f250
movq %r14, %rdi
callq 0x1ffd0
|
_ZN5aimrt4util15BufferArrayViewC2ERKNS0_11BufferArrayE:
push r15
push r14
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov r12, [rsi]
mov r14, [rsi+8]
mov rsi, r14
call _ZNSt6vectorI19aimrt_buffer_view_tSaIS0_EE7reserveEm; std::vector<aimrt_buffer_view_t>::reserve(ulong)
test r14, r14
jz short loc_3D043
add r12, 8
lea r15, [rsp+38h+var_30]
loc_3D00B:
movups xmm0, xmmword ptr [r12-8]
movups [rsp+38h+var_30], xmm0
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_3D02F
movups xmm0, [rsp+38h+var_30]
movups xmmword ptr [rsi], xmm0
add qword ptr [rbx+8], 10h
jmp short loc_3D03A
loc_3D02F:
mov rdi, rbx
mov rdx, r15
call _ZNSt6vectorI19aimrt_buffer_view_tSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_; std::vector<aimrt_buffer_view_t>::_M_realloc_insert<aimrt_buffer_view_t>(__gnu_cxx::__normal_iterator<aimrt_buffer_view_t*,std::vector<aimrt_buffer_view_t>>,aimrt_buffer_view_t &&)
loc_3D03A:
add r12, 10h
dec r14
jnz short loc_3D00B
loc_3D043:
mov rax, [rbx]
mov rcx, [rbx+8]
mov [rbx+18h], rax
sub rcx, rax
sar rcx, 4
mov [rbx+20h], rcx
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short $+2
loc_3D067:
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_3D07E
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3D07E:
mov rdi, r14
call __Unwind_Resume
|
long long aimrt::util::BufferArrayView::BufferArrayView(long long *a1, long long *a2)
{
long long v2; // r12
long long v3; // r14
long long v4; // r12
_OWORD *v5; // rsi
long long result; // rax
long long v7; // rcx
_OWORD v8[3]; // [rsp+8h] [rbp-30h] BYREF
*(_OWORD *)a1 = 0LL;
a1[2] = 0LL;
v2 = *a2;
v3 = a2[1];
std::vector<aimrt_buffer_view_t>::reserve(a1, v3);
if ( v3 )
{
v4 = v2 + 8;
do
{
v8[0] = *(_OWORD *)(v4 - 8);
v5 = (_OWORD *)a1[1];
if ( v5 == (_OWORD *)a1[2] )
{
std::vector<aimrt_buffer_view_t>::_M_realloc_insert<aimrt_buffer_view_t>(a1, v5, v8);
}
else
{
*v5 = v8[0];
a1[1] += 16LL;
}
v4 += 16LL;
--v3;
}
while ( v3 );
}
result = *a1;
v7 = a1[1];
a1[3] = *a1;
a1[4] = (v7 - result) >> 4;
return result;
}
|
BufferArrayView:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV R12,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
LAB_0013cff5:
MOV RSI,R14
CALL 0x0013d428
TEST R14,R14
JZ 0x0013d043
ADD R12,0x8
LEA R15,[RSP + 0x8]
LAB_0013d00b:
MOVUPS XMM0,xmmword ptr [R12 + -0x8]
MOVUPS xmmword ptr [RSP + 0x8],XMM0
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x0013d02f
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
MOVUPS xmmword ptr [RSI],XMM0
ADD qword ptr [RBX + 0x8],0x10
JMP 0x0013d03a
LAB_0013d02f:
MOV RDI,RBX
MOV RDX,R15
CALL 0x0013d4e6
LAB_0013d03a:
ADD R12,0x10
DEC R14
JNZ 0x0013d00b
LAB_0013d043:
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x18],RAX
SUB RCX,RAX
SAR RCX,0x4
MOV qword ptr [RBX + 0x20],RCX
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
/* aimrt::util::BufferArrayView::BufferArrayView(aimrt::util::BufferArray const&) */
void __thiscall
aimrt::util::BufferArrayView::BufferArrayView(BufferArrayView *this,BufferArray *param_1)
{
long lVar1;
int8 *puVar2;
int8 uVar3;
int8 *puVar4;
ulong uVar5;
int4 local_30;
int4 uStack_2c;
int4 uStack_28;
int4 uStack_24;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
lVar1 = *(long *)param_1;
uVar5 = *(ulong *)(param_1 + 8);
/* try { // try from 0013cff5 to 0013cffc has its CatchHandler @ 0013d065 */
std::vector<aimrt_buffer_view_t,std::allocator<aimrt_buffer_view_t>>::reserve
((vector<aimrt_buffer_view_t,std::allocator<aimrt_buffer_view_t>> *)this,uVar5);
if (uVar5 != 0) {
puVar4 = (int8 *)(lVar1 + 8);
do {
local_30 = *(int4 *)(puVar4 + -1);
uStack_2c = *(int4 *)((long)puVar4 + -4);
uStack_28 = *(int4 *)puVar4;
uStack_24 = *(int4 *)((long)puVar4 + 4);
uVar3 = *puVar4;
puVar2 = *(int8 **)(this + 8);
if (puVar2 == *(int8 **)(this + 0x10)) {
/* try { // try from 0013d02f to 0013d039 has its CatchHandler @ 0013d067 */
std::vector<aimrt_buffer_view_t,std::allocator<aimrt_buffer_view_t>>::
_M_realloc_insert<aimrt_buffer_view_t>
((vector<aimrt_buffer_view_t,std::allocator<aimrt_buffer_view_t>> *)this,puVar2,
&local_30);
}
else {
*puVar2 = puVar4[-1];
puVar2[1] = uVar3;
*(long *)(this + 8) = *(long *)(this + 8) + 0x10;
}
puVar4 = puVar4 + 2;
uVar5 = uVar5 - 1;
} while (uVar5 != 0);
}
*(long *)(this + 0x18) = *(long *)this;
*(long *)(this + 0x20) = *(long *)(this + 8) - *(long *)this >> 4;
return;
}
|
|
60,551
|
ma_feof
|
eloqsql/libmariadb/libmariadb/ma_io.c
|
int ma_feof(MA_FILE *file)
{
if (!file)
return -1;
switch (file->type) {
case MA_FILE_LOCAL:
return feof((FILE *)file->ptr);
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
return rio_plugin->methods->mfeof(file);
break;
#endif
default:
return -1;
}
}
|
O0
|
c
|
ma_feof:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x5d54c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5d59c
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0x5d566
jmp 0x5d55c
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x5d578
jmp 0x5d595
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x37050
movl %eax, -0x4(%rbp)
jmp 0x5d59c
leaq 0x393a51(%rip), %rax # 0x3f0fd0
movq (%rax), %rax
movq 0x58(%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movl %eax, -0x4(%rbp)
jmp 0x5d59c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_feof:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0
jnz short loc_5D54C
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_5D59C
loc_5D54C:
mov rax, [rbp+var_10]
mov eax, [rax]
mov [rbp+var_14], eax
sub eax, 1
jz short loc_5D566
jmp short $+2
loc_5D55C:
mov eax, [rbp+var_14]
sub eax, 2
jz short loc_5D578
jmp short loc_5D595
loc_5D566:
mov rax, [rbp+var_10]
mov rdi, [rax+8]
call _feof
mov [rbp+var_4], eax
jmp short loc_5D59C
loc_5D578:
lea rax, rio_plugin
mov rax, [rax]
mov rax, [rax+58h]
mov rax, [rax+10h]
mov rdi, [rbp+var_10]
call rax
mov [rbp+var_4], eax
jmp short loc_5D59C
loc_5D595:
mov [rbp+var_4], 0FFFFFFFFh
loc_5D59C:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long ma_feof(long long a1)
{
if ( a1 )
{
if ( *(_DWORD *)a1 == 1 )
{
return (unsigned int)feof(*(_QWORD *)(a1 + 8));
}
else if ( *(_DWORD *)a1 == 2 )
{
return (unsigned int)(*(long long ( **)(long long))(*(_QWORD *)(rio_plugin + 88LL) + 16LL))(a1);
}
else
{
return (unsigned int)-1;
}
}
else
{
return (unsigned int)-1;
}
}
|
ma_feof:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0015d54c
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0015d59c
LAB_0015d54c:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x14],EAX
SUB EAX,0x1
JZ 0x0015d566
JMP 0x0015d55c
LAB_0015d55c:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x2
JZ 0x0015d578
JMP 0x0015d595
LAB_0015d566:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00137050
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015d59c
LAB_0015d578:
LEA RAX,[0x4f0fd0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x58]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015d59c
LAB_0015d595:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_0015d59c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int ma_feof(int *param_1)
{
int local_c;
if (param_1 == (int *)0x0) {
local_c = -1;
}
else if (*param_1 == 1) {
local_c = feof(*(FILE **)(param_1 + 2));
}
else if (*param_1 == 2) {
local_c = (**(code **)(*(long *)(rio_plugin + 0x58) + 0x10))(param_1);
}
else {
local_c = -1;
}
return local_c;
}
|
|
60,552
|
process_dbl_arg
|
eloqsql/strings/my_vsnprintf.c
|
static char *process_dbl_arg(char *to, char *end, size_t width,
double par, char arg_type)
{
if (width == MAX_WIDTH)
width= FLT_DIG; /* width not set, use default */
else if (width >= FLOATING_POINT_DECIMALS)
width= FLOATING_POINT_DECIMALS - 1; /* max.precision for my_fcvt() */
width= MY_MIN(width, (size_t)(end-to) - 1);
if (arg_type == 'f')
to+= my_fcvt(par, (int)width , to, NULL);
else
to+= my_gcvt(par, MY_GCVT_ARG_DOUBLE, (int) width , to, NULL);
return to;
}
|
O0
|
c
|
process_dbl_arg:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movb %al, -0x21(%rbp)
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
jne 0x75612
movq $0x6, -0x18(%rbp)
jmp 0x75623
cmpq $0x1f, -0x18(%rbp)
jb 0x75621
movq $0x1e, -0x18(%rbp)
jmp 0x75623
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
subq %rdx, %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x75645
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x75658
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movsbl -0x21(%rbp), %eax
cmpl $0x66, %eax
jne 0x7568b
movsd -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl %eax, %edi
movq -0x8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x6d720
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x756b0
movsd -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl %eax, %esi
movq -0x8(%rbp), %rdx
movl $0x1, %edi
xorl %eax, %eax
movl %eax, %ecx
callq 0x6f160
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
process_dbl_arg:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
movsd [rbp+var_20], xmm0
mov [rbp+var_21], al
cmp [rbp+var_18], 0FFFFh
jnz short loc_75612
mov [rbp+var_18], 6
jmp short loc_75623
loc_75612:
cmp [rbp+var_18], 1Fh
jb short loc_75621
mov [rbp+var_18], 1Eh
loc_75621:
jmp short $+2
loc_75623:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rdx, [rbp+var_8]
sub rcx, rdx
sub rcx, 1
cmp rax, rcx
jnb short loc_75645
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
jmp short loc_75658
loc_75645:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
sub rax, rcx
sub rax, 1
mov [rbp+var_30], rax
loc_75658:
mov rax, [rbp+var_30]
mov [rbp+var_18], rax
movsx eax, [rbp+var_21]
cmp eax, 66h ; 'f'
jnz short loc_7568B
movsd xmm0, [rbp+var_20]
mov rax, [rbp+var_18]
mov edi, eax
mov rsi, [rbp+var_8]
xor eax, eax
mov edx, eax
call my_fcvt
add rax, [rbp+var_8]
mov [rbp+var_8], rax
jmp short loc_756B0
loc_7568B:
movsd xmm0, [rbp+var_20]
mov rax, [rbp+var_18]
mov esi, eax
mov rdx, [rbp+var_8]
mov edi, 1
xor eax, eax
mov ecx, eax
call my_gcvt
add rax, [rbp+var_8]
mov [rbp+var_8], rax
loc_756B0:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
_BYTE * process_dbl_arg(_BYTE *a1, long long a2, unsigned long long a3, char a4, double a5)
{
int v6; // [rsp+0h] [rbp-30h]
unsigned long long v7; // [rsp+18h] [rbp-18h]
v7 = a3;
if ( a3 == 0xFFFF )
{
v7 = 6LL;
}
else if ( a3 >= 0x1F )
{
v7 = 30LL;
}
if ( v7 >= a2 - (long long)a1 - 1 )
v6 = a2 - (_DWORD)a1 - 1;
else
v6 = v7;
if ( a4 == 102 )
return &a1[my_fcvt(v6, a1, 0LL, a5)];
else
return &a1[my_gcvt(1, v6, a1, 0LL, a5)];
}
|
process_dbl_arg:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,CL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOVSD qword ptr [RBP + -0x20],XMM0
MOV byte ptr [RBP + -0x21],AL
CMP qword ptr [RBP + -0x18],0xffff
JNZ 0x00175612
MOV qword ptr [RBP + -0x18],0x6
JMP 0x00175623
LAB_00175612:
CMP qword ptr [RBP + -0x18],0x1f
JC 0x00175621
MOV qword ptr [RBP + -0x18],0x1e
LAB_00175621:
JMP 0x00175623
LAB_00175623:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
SUB RCX,RDX
SUB RCX,0x1
CMP RAX,RCX
JNC 0x00175645
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00175658
LAB_00175645:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
SUB RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_00175658:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x18],RAX
MOVSX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x66
JNZ 0x0017568b
MOVSD XMM0,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
MOV RSI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0016d720
ADD RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001756b0
LAB_0017568b:
MOVSD XMM0,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV ESI,EAX
MOV RDX,qword ptr [RBP + -0x8]
MOV EDI,0x1
XOR EAX,EAX
MOV ECX,EAX
CALL 0x0016f160
ADD RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x8],RAX
LAB_001756b0:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long process_dbl_arg(int8 param_1,long param_2,long param_3,ulong param_4,char param_5)
{
int8 local_38;
int8 local_20;
int8 local_10;
if (param_4 == 0xffff) {
local_20 = 6;
}
else {
local_20 = param_4;
if (0x1e < param_4) {
local_20 = 0x1e;
}
}
if (local_20 < (param_3 - param_2) - 1U) {
local_38 = local_20;
}
else {
local_38 = (param_3 - param_2) - 1;
}
if (param_5 == 'f') {
local_10 = my_fcvt(param_1,local_38 & 0xffffffff,param_2,0);
}
else {
local_10 = my_gcvt(param_1,1,local_38 & 0xffffffff,param_2,0);
}
local_10 = local_10 + param_2;
return local_10;
}
|
|
60,553
|
bf_asin_internal
|
bluesky950520[P]quickjs/libbf.c
|
static int bf_asin_internal(bf_t *r, const bf_t *a, limb_t prec, void *opaque)
{
bf_context_t *s = r->ctx;
BOOL is_acos = (BOOL)(intptr_t)opaque;
bf_t T_s, *T = &T_s;
limb_t prec1, prec2;
/* asin(x) = atan(x/sqrt(1-x^2))
acos(x) = pi/2 - asin(x) */
prec1 = prec + 8;
/* increase the precision in x^2 to compensate the cancellation in
(1-x^2) if x is close to 1 */
/* XXX: use less precision when possible */
if (a->expn >= 0)
prec2 = BF_PREC_INF;
else
prec2 = prec1;
bf_init(s, T);
bf_mul(T, a, a, prec2, BF_RNDN);
bf_neg(T);
bf_add_si(T, T, 1, prec2, BF_RNDN);
bf_sqrt(r, T, prec1, BF_RNDN);
bf_div(T, a, r, prec1, BF_RNDN);
if (is_acos)
bf_neg(T);
bf_atan_internal(r, T, prec1, (void *)(intptr_t)is_acos);
bf_delete(T);
return BF_ST_INEXACT;
}
|
O0
|
c
|
bf_asin_internal:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
movq 0x70(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rax
movl %eax, 0x4c(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
movq 0x68(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jl 0xefee3
movabsq $0x3fffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFFF
movq %rax, 0x8(%rsp)
jmp 0xefeed
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xe4cb0
movq 0x18(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x8(%rsp), %rcx
xorl %r8d, %r8d
callq 0xe73c0
movq 0x18(%rsp), %rdi
callq 0xe8e90
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rcx
movl $0x1, %edx
xorl %r8d, %r8d
callq 0xe7fc0
movq 0x70(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
xorl %ecx, %ecx
callq 0xe8b70
movq 0x18(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x10(%rsp), %rcx
xorl %r8d, %r8d
callq 0xe9110
cmpl $0x0, 0x4c(%rsp)
je 0xeff81
movq 0x18(%rsp), %rdi
callq 0xe8e90
movq 0x70(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
movslq 0x4c(%rsp), %rcx
callq 0xef560
movq 0x18(%rsp), %rdi
callq 0xe8110
movl $0x10, %eax
addq $0x78, %rsp
retq
nop
|
bf_asin_internal:
sub rsp, 78h
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_10], rsi
mov [rsp+78h+var_18], rdx
mov [rsp+78h+var_20], rcx
mov rax, [rsp+78h+var_8]
mov rax, [rax]
mov [rsp+78h+var_28], rax
mov rax, [rsp+78h+var_20]
mov [rsp+78h+var_2C], eax
lea rax, [rsp+78h+var_58]
mov [rsp+78h+var_60], rax
mov rax, [rsp+78h+var_18]
add rax, 8
mov [rsp+78h+var_68], rax
mov rax, [rsp+78h+var_10]
cmp qword ptr [rax+10h], 0
jl short loc_EFEE3
mov rax, 3FFFFFFFFFFFFFFFh
mov [rsp+78h+var_70], rax
jmp short loc_EFEED
loc_EFEE3:
mov rax, [rsp+78h+var_68]
mov [rsp+78h+var_70], rax
loc_EFEED:
mov rdi, [rsp+78h+var_28]
mov rsi, [rsp+78h+var_60]
call bf_init
mov rdi, [rsp+78h+var_60]
mov rsi, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_10]
mov rcx, [rsp+78h+var_70]
xor r8d, r8d
call bf_mul
mov rdi, [rsp+78h+var_60]
call bf_neg_0
mov rdi, [rsp+78h+var_60]
mov rsi, [rsp+78h+var_60]
mov rcx, [rsp+78h+var_70]
mov edx, 1
xor r8d, r8d
call bf_add_si
mov rdi, [rsp+78h+var_8]
mov rsi, [rsp+78h+var_60]
mov rdx, [rsp+78h+var_68]
xor ecx, ecx
call bf_sqrt
mov rdi, [rsp+78h+var_60]
mov rsi, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_8]
mov rcx, [rsp+78h+var_68]
xor r8d, r8d
call bf_div
cmp [rsp+78h+var_2C], 0
jz short loc_EFF81
mov rdi, [rsp+78h+var_60]
call bf_neg_0
loc_EFF81:
mov rdi, [rsp+78h+var_8]
mov rsi, [rsp+78h+var_60]
mov rdx, [rsp+78h+var_68]
movsxd rcx, [rsp+78h+var_2C]
call bf_atan_internal
mov rdi, [rsp+78h+var_60]
call bf_delete_0
mov eax, 10h
add rsp, 78h
retn
|
long long bf_asin_internal(long long *a1, long long *a2, long long a3, long long a4)
{
long long v4; // rdx
long long v5; // rcx
long long v6; // r8
long long v7; // r9
long long v9; // [rsp+8h] [rbp-70h]
unsigned long long v10; // [rsp+10h] [rbp-68h]
long long v11[5]; // [rsp+20h] [rbp-58h] BYREF
int v12; // [rsp+4Ch] [rbp-2Ch]
long long v13; // [rsp+50h] [rbp-28h]
long long v14; // [rsp+58h] [rbp-20h]
long long v15; // [rsp+60h] [rbp-18h]
long long *v16; // [rsp+68h] [rbp-10h]
long long *v17; // [rsp+70h] [rbp-8h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v13 = *a1;
v12 = a4;
v10 = a3 + 8;
if ( a2[2] < 0 )
v9 = a3 + 8;
else
v9 = 0x3FFFFFFFFFFFFFFFLL;
bf_init(v13, (long long)v11);
bf_mul(v11, (long long)v16, (long long)v16, v9, 0);
bf_neg_0((long long)v11);
bf_add_si(v11, (long long)v11, 1LL, v9, 0);
bf_sqrt((long long)v17, (long long)v11, v10, 0);
bf_div(v11, v16, v17, v10, 0);
if ( v12 )
bf_neg_0((long long)v11);
bf_atan_internal(v17, v11, v10, v12);
bf_delete_0(v11, (long long)v11, v4, v5, v6, v7);
return 16LL;
}
|
bf_asin_internal:
SUB RSP,0x78
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RSI
MOV qword ptr [RSP + 0x60],RDX
MOV qword ptr [RSP + 0x58],RCX
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RSP + 0x4c],EAX
LEA RAX,[RSP + 0x20]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x60]
ADD RAX,0x8
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x68]
CMP qword ptr [RAX + 0x10],0x0
JL 0x001efee3
MOV RAX,0x3fffffffffffffff
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001efeed
LAB_001efee3:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
LAB_001efeed:
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x001e4cb0
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RSP + 0x8]
XOR R8D,R8D
CALL 0x001e73c0
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001e8e90
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x8]
MOV EDX,0x1
XOR R8D,R8D
CALL 0x001e7fc0
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x10]
XOR ECX,ECX
CALL 0x001e8b70
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
MOV RCX,qword ptr [RSP + 0x10]
XOR R8D,R8D
CALL 0x001e9110
CMP dword ptr [RSP + 0x4c],0x0
JZ 0x001eff81
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001e8e90
LAB_001eff81:
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP + 0x4c]
CALL 0x001ef560
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001e8110
MOV EAX,0x10
ADD RSP,0x78
RET
|
int8 bf_asin_internal(int8 *param_1,long param_2,long param_3,int8 param_4)
{
long lVar1;
long local_70;
int1 local_58 [44];
int local_2c;
int8 local_28;
int8 local_20;
long local_18;
long local_10;
int8 *local_8;
local_28 = *param_1;
local_2c = (int)param_4;
lVar1 = param_3 + 8;
local_70 = lVar1;
if (-1 < *(long *)(param_2 + 0x10)) {
local_70 = 0x3fffffffffffffff;
}
local_20 = param_4;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
bf_init(local_28,local_58);
bf_mul(local_58,local_10,local_10,local_70,0);
bf_neg(local_58);
bf_add_si(local_58,local_58,1,local_70,0);
bf_sqrt(local_8,local_58,lVar1,0);
bf_div(local_58,local_10,local_8,lVar1,0);
if (local_2c != 0) {
bf_neg(local_58);
}
bf_atan_internal(local_8,local_58,lVar1,(long)local_2c);
bf_delete(local_58);
return 0x10;
}
|
|
60,554
|
mi_rec_pos
|
eloqsql/storage/myisam/mi_search.c
|
my_off_t _mi_rec_pos(MYISAM_SHARE *s, uchar *ptr)
{
my_off_t pos;
switch (s->rec_reflength) {
#if SIZEOF_OFF_T > 4
case 8:
pos= (my_off_t) mi_uint8korr(ptr);
if (pos == HA_OFFSET_ERROR)
return HA_OFFSET_ERROR; /* end of list */
break;
case 7:
pos= (my_off_t) mi_uint7korr(ptr);
if (pos == (((my_off_t) 1) << 56) -1)
return HA_OFFSET_ERROR; /* end of list */
break;
case 6:
pos= (my_off_t) mi_uint6korr(ptr);
if (pos == (((my_off_t) 1) << 48) -1)
return HA_OFFSET_ERROR; /* end of list */
break;
case 5:
pos= (my_off_t) mi_uint5korr(ptr);
if (pos == (((my_off_t) 1) << 40) -1)
return HA_OFFSET_ERROR; /* end of list */
break;
#else
case 8:
case 7:
case 6:
case 5:
ptr+= (s->rec_reflength-4);
/* fall through */
#endif
case 4:
pos= (my_off_t) mi_uint4korr(ptr);
if (pos == (my_off_t) (uint32) ~0L)
return HA_OFFSET_ERROR;
break;
case 3:
pos= (my_off_t) mi_uint3korr(ptr);
if (pos == (my_off_t) (1 << 24) -1)
return HA_OFFSET_ERROR;
break;
case 2:
pos= (my_off_t) mi_uint2korr(ptr);
if (pos == (my_off_t) (1 << 16) -1)
return HA_OFFSET_ERROR;
break;
default: abort(); /* Impossible */
}
return ((s->options &
(HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ? pos :
pos*s->base.pack_reclength);
}
|
O0
|
c
|
mi_rec_pos:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x338(%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x6, %eax
ja 0xc1e44
movq -0x28(%rbp), %rax
leaq 0x98bcd(%rip), %rcx # 0x15a834
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movzbl 0x7(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x6(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, %eax
movq -0x18(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
movq -0x18(%rbp), %rdx
movzbl 0x2(%rdx), %edx
shll $0x8, %edx
orl %edx, %ecx
movq -0x18(%rbp), %rdx
movzbl 0x1(%rdx), %edx
shll $0x10, %edx
orl %edx, %ecx
movq -0x18(%rbp), %rdx
movzbl (%rdx), %edx
shll $0x18, %edx
orl %edx, %ecx
movl %ecx, %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpq $-0x1, -0x20(%rbp)
jne 0xc1cf0
movq $-0x1, -0x8(%rbp)
jmp 0xc1e84
jmp 0xc1e49
movq -0x18(%rbp), %rdi
callq 0xc18b0
movq %rax, -0x20(%rbp)
movabsq $0xffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFF
cmpq %rax, -0x20(%rbp)
jne 0xc1d1f
movq $-0x1, -0x8(%rbp)
jmp 0xc1e84
jmp 0xc1e49
movq -0x18(%rbp), %rdi
callq 0xc1910
movq %rax, -0x20(%rbp)
movabsq $0xffffffffffff, %rax # imm = 0xFFFFFFFFFFFF
cmpq %rax, -0x20(%rbp)
jne 0xc1d4e
movq $-0x1, -0x8(%rbp)
jmp 0xc1e84
jmp 0xc1e49
movq -0x18(%rbp), %rdi
callq 0xc1960
movq %rax, -0x20(%rbp)
movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF
cmpq %rax, -0x20(%rbp)
jne 0xc1d7d
movq $-0x1, -0x8(%rbp)
jmp 0xc1e84
jmp 0xc1e49
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, -0x20(%rbp)
jne 0xc1dce
movq $-0x1, -0x8(%rbp)
jmp 0xc1e84
jmp 0xc1e49
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
cmpq $0xffffff, -0x20(%rbp) # imm = 0xFFFFFF
jne 0xc1e0b
movq $-0x1, -0x8(%rbp)
jmp 0xc1e84
jmp 0xc1e49
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movq %rax, -0x20(%rbp)
cmpq $0xffff, -0x20(%rbp) # imm = 0xFFFF
jne 0xc1e42
movq $-0x1, -0x8(%rbp)
jmp 0xc1e84
jmp 0xc1e49
callq 0x2a5d0
movq -0x10(%rbp), %rax
movq 0x318(%rax), %rax
andq $0x5, %rax
cmpq $0x0, %rax
je 0xc1e68
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xc1e7c
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
imulq 0x148(%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
|
_mi_rec_pos:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov eax, [rax+338h]
add eax, 0FFFFFFFEh; switch 7 cases
mov ecx, eax
mov [rbp+var_28], rcx
sub eax, 6
ja def_C1C6E; jumptable 00000000000C1C6E default case
mov rax, [rbp+var_28]
lea rcx, jpt_C1C6E
movsxd rax, ds:(jpt_C1C6E - 15A834h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_C1C70:
mov rax, [rbp+var_18]; jumptable 00000000000C1C6E case 8
movzx eax, byte ptr [rax+7]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+6]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+5]
shl ecx, 10h
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+4]
shl ecx, 18h
or eax, ecx
mov eax, eax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+3]
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+2]
shl edx, 8
or ecx, edx
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+1]
shl edx, 10h
or ecx, edx
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx]
shl edx, 18h
or ecx, edx
mov ecx, ecx
shl rcx, 20h
or rax, rcx
mov [rbp+var_20], rax
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jnz short loc_C1CF0
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_C1E84
loc_C1CF0:
jmp loc_C1E49
loc_C1CF5:
mov rdi, [rbp+var_18]; jumptable 00000000000C1C6E case 7
call mi_uint7korr_0
mov [rbp+var_20], rax
mov rax, 0FFFFFFFFFFFFFFh
cmp [rbp+var_20], rax
jnz short loc_C1D1F
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_C1E84
loc_C1D1F:
jmp loc_C1E49
loc_C1D24:
mov rdi, [rbp+var_18]; jumptable 00000000000C1C6E case 6
call mi_uint6korr_0
mov [rbp+var_20], rax
mov rax, 0FFFFFFFFFFFFh
cmp [rbp+var_20], rax
jnz short loc_C1D4E
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_C1E84
loc_C1D4E:
jmp loc_C1E49
loc_C1D53:
mov rdi, [rbp+var_18]; jumptable 00000000000C1C6E case 5
call mi_uint5korr_0
mov [rbp+var_20], rax
mov rax, 0FFFFFFFFFFh
cmp [rbp+var_20], rax
jnz short loc_C1D7D
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_C1E84
loc_C1D7D:
jmp loc_C1E49
loc_C1D82:
mov rax, [rbp+var_18]; jumptable 00000000000C1C6E case 4
movzx eax, byte ptr [rax+3]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 10h
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
shl ecx, 18h
or eax, ecx
mov eax, eax
mov [rbp+var_20], rax
mov eax, 0FFFFFFFFh
cmp [rbp+var_20], rax
jnz short loc_C1DCE
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_C1E84
loc_C1DCE:
jmp short loc_C1E49
loc_C1DD0:
mov rax, [rbp+var_18]; jumptable 00000000000C1C6E case 3
movzx eax, byte ptr [rax+2]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov [rbp+var_20], rax
cmp [rbp+var_20], 0FFFFFFh
jnz short loc_C1E0B
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_C1E84
loc_C1E0B:
jmp short loc_C1E49
loc_C1E0D:
mov rax, [rbp+var_18]; jumptable 00000000000C1C6E case 2
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_20], rax
cmp [rbp+var_20], 0FFFFh
jnz short loc_C1E42
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_C1E84
loc_C1E42:
jmp short loc_C1E49
def_C1C6E:
call _abort; jumptable 00000000000C1C6E default case
loc_C1E49:
mov rax, [rbp+var_10]
mov rax, [rax+318h]
and rax, 5
cmp rax, 0
jz short loc_C1E68
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
jmp short loc_C1E7C
loc_C1E68:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
imul rax, [rcx+148h]
mov [rbp+var_30], rax
loc_C1E7C:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_C1E84:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long mi_rec_pos(long long a1, unsigned int *a2, long long a3)
{
unsigned long long v4; // [rsp+0h] [rbp-30h]
unsigned long long v5; // [rsp+10h] [rbp-20h]
long long v6; // [rsp+28h] [rbp-8h]
switch ( *(_DWORD *)(a1 + 824) )
{
case 2:
v5 = _byteswap_ushort(*(_WORD *)a2);
if ( v5 != 0xFFFF )
goto LABEL_24;
v6 = -1LL;
break;
case 3:
v5 = (*(unsigned __int8 *)a2 << 16) | (*((unsigned __int8 *)a2 + 1) << 8) | (unsigned int)*((unsigned __int8 *)a2
+ 2);
if ( v5 != 0xFFFFFF )
goto LABEL_24;
v6 = -1LL;
break;
case 4:
v5 = _byteswap_ulong(*a2);
if ( v5 != 0xFFFFFFFF )
goto LABEL_24;
v6 = -1LL;
break;
case 5:
v5 = mi_uint5korr_0(a2);
if ( v5 != 0xFFFFFFFFFFLL )
goto LABEL_24;
v6 = -1LL;
break;
case 6:
v5 = mi_uint6korr_0(a2);
if ( v5 != 0xFFFFFFFFFFFFLL )
goto LABEL_24;
v6 = -1LL;
break;
case 7:
v5 = mi_uint7korr_0(a2);
if ( v5 != 0xFFFFFFFFFFFFFFLL )
goto LABEL_24;
v6 = -1LL;
break;
case 8:
v5 = ((unsigned long long)_byteswap_ulong(*a2) << 32) | _byteswap_ulong(a2[1]);
if ( v5 == -1LL )
{
v6 = -1LL;
}
else
{
LABEL_24:
if ( (*(_QWORD *)(a1 + 792) & 5LL) != 0 )
v4 = v5;
else
v4 = *(_QWORD *)(a1 + 328) * v5;
v6 = v4;
}
break;
default:
abort(a1, a2, a3);
}
return v6;
}
|
_mi_rec_pos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x338]
ADD EAX,-0x2
MOV ECX,EAX
MOV qword ptr [RBP + -0x28],RCX
SUB EAX,0x6
JA 0x001c1e44
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x25a834]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_8:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x7]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x6]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x5]
SHL ECX,0x10
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x4]
SHL ECX,0x18
OR EAX,ECX
MOV EAX,EAX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x3]
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x2]
SHL EDX,0x8
OR ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x1]
SHL EDX,0x10
OR ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX]
SHL EDX,0x18
OR ECX,EDX
MOV ECX,ECX
SHL RCX,0x20
OR RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],-0x1
JNZ 0x001c1cf0
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001c1e84
LAB_001c1cf0:
JMP 0x001c1e49
caseD_7:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001c18b0
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,0xffffffffffffff
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x001c1d1f
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001c1e84
LAB_001c1d1f:
JMP 0x001c1e49
caseD_6:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001c1910
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,0xffffffffffff
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x001c1d4e
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001c1e84
LAB_001c1d4e:
JMP 0x001c1e49
caseD_5:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001c1960
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,0xffffffffff
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x001c1d7d
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001c1e84
LAB_001c1d7d:
JMP 0x001c1e49
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x10
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
SHL ECX,0x18
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,0xffffffff
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x001c1dce
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001c1e84
LAB_001c1dce:
JMP 0x001c1e49
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0xffffff
JNZ 0x001c1e0b
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001c1e84
LAB_001c1e0b:
JMP 0x001c1e49
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0xffff
JNZ 0x001c1e42
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001c1e84
LAB_001c1e42:
JMP 0x001c1e49
default:
CALL 0x0012a5d0
LAB_001c1e49:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x318]
AND RAX,0x5
CMP RAX,0x0
JZ 0x001c1e68
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001c1e7c
LAB_001c1e68:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
IMUL RAX,qword ptr [RCX + 0x148]
MOV qword ptr [RBP + -0x30],RAX
LAB_001c1e7c:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_001c1e84:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
ulong _mi_rec_pos(long param_1,int1 *param_2)
{
ulong local_38;
ulong local_28;
switch(*(int4 *)(param_1 + 0x338)) {
case 2:
local_28 = (ulong)CONCAT11(*param_2,param_2[1]);
if (local_28 == 0xffff) {
return 0xffffffffffffffff;
}
break;
case 3:
local_28 = (ulong)CONCAT12(*param_2,CONCAT11(param_2[1],param_2[2]));
if (local_28 == 0xffffff) {
return 0xffffffffffffffff;
}
break;
case 4:
local_28 = (ulong)CONCAT13(*param_2,CONCAT12(param_2[1],CONCAT11(param_2[2],param_2[3])));
if (local_28 == 0xffffffff) {
return 0xffffffffffffffff;
}
break;
case 5:
local_28 = mi_uint5korr(param_2);
if (local_28 == 0xffffffffff) {
return 0xffffffffffffffff;
}
break;
case 6:
local_28 = mi_uint6korr(param_2);
if (local_28 == 0xffffffffffff) {
return 0xffffffffffffffff;
}
break;
case 7:
local_28 = mi_uint7korr(param_2);
if (local_28 == 0xffffffffffffff) {
return 0xffffffffffffffff;
}
break;
case 8:
local_28 = CONCAT44(CONCAT13(*param_2,CONCAT12(param_2[1],CONCAT11(param_2[2],param_2[3]))),
CONCAT13(param_2[4],CONCAT12(param_2[5],CONCAT11(param_2[6],param_2[7]))));
if (local_28 == 0xffffffffffffffff) {
return 0xffffffffffffffff;
}
break;
default:
/* WARNING: Subroutine does not return */
abort();
}
if ((*(ulong *)(param_1 + 0x318) & 5) == 0) {
local_38 = local_28 * *(long *)(param_1 + 0x148);
}
else {
local_38 = local_28;
}
return local_38;
}
|
|
60,555
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double)
|
hkr04[P]cpp-mcp/common/json.hpp
|
boundaries compute_boundaries(FloatType value)
{
JSON_ASSERT(std::isfinite(value));
JSON_ASSERT(value > 0);
// Convert the IEEE representation into a diyfp.
//
// If v is denormal:
// value = 0.F * 2^(1 - bias) = ( F) * 2^(1 - bias - (p-1))
// If v is normalized:
// value = 1.F * 2^(E - bias) = (2^(p-1) + F) * 2^(E - bias - (p-1))
static_assert(std::numeric_limits<FloatType>::is_iec559,
"internal error: dtoa_short requires an IEEE-754 floating-point implementation");
constexpr int kPrecision = std::numeric_limits<FloatType>::digits; // = p (includes the hidden bit)
constexpr int kBias = std::numeric_limits<FloatType>::max_exponent - 1 + (kPrecision - 1);
constexpr int kMinExp = 1 - kBias;
constexpr std::uint64_t kHiddenBit = std::uint64_t{1} << (kPrecision - 1); // = 2^(p-1)
using bits_type = typename std::conditional<kPrecision == 24, std::uint32_t, std::uint64_t >::type;
const auto bits = static_cast<std::uint64_t>(reinterpret_bits<bits_type>(value));
const std::uint64_t E = bits >> (kPrecision - 1);
const std::uint64_t F = bits & (kHiddenBit - 1);
const bool is_denormal = E == 0;
const diyfp v = is_denormal
? diyfp(F, kMinExp)
: diyfp(F + kHiddenBit, static_cast<int>(E) - kBias);
// Compute the boundaries m- and m+ of the floating-point value
// v = f * 2^e.
//
// Determine v- and v+, the floating-point predecessor and successor if v,
// respectively.
//
// v- = v - 2^e if f != 2^(p-1) or e == e_min (A)
// = v - 2^(e-1) if f == 2^(p-1) and e > e_min (B)
//
// v+ = v + 2^e
//
// Let m- = (v- + v) / 2 and m+ = (v + v+) / 2. All real numbers _strictly_
// between m- and m+ round to v, regardless of how the input rounding
// algorithm breaks ties.
//
// ---+-------------+-------------+-------------+-------------+--- (A)
// v- m- v m+ v+
//
// -----------------+------+------+-------------+-------------+--- (B)
// v- m- v m+ v+
const bool lower_boundary_is_closer = F == 0 && E > 1;
const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1);
const diyfp m_minus = lower_boundary_is_closer
? diyfp(4 * v.f - 1, v.e - 2) // (B)
: diyfp(2 * v.f - 1, v.e - 1); // (A)
// Determine the normalized w+ = m+.
const diyfp w_plus = diyfp::normalize(m_plus);
// Determine w- = m- such that e_(w-) = e_(w+).
const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e);
return {diyfp::normalize(v), w_minus, w_plus};
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double):
movq %rdi, %rax
movq %xmm0, %rdi
movabsq $0x10000000000000, %r10 # imm = 0x10000000000000
decq %r10
andq %rdi, %r10
movq %rdi, %rcx
shrq $0x34, %rcx
movq %r10, %r8
btsq $0x34, %r8
testq %rcx, %rcx
cmoveq %r10, %r8
leal -0x433(%rcx), %ecx
movl $0xfffffbce, %r11d # imm = 0xFFFFFBCE
cmovnel %ecx, %r11d
leaq (%r8,%r8), %rsi
leaq 0x1(,%r8,2), %rdx
leal -0x1(%r11), %ecx
movl %ecx, %r9d
addq %rdx, %rdx
decl %r9d
testq %rdx, %rdx
jns 0xb528
pushq %rbp
pushq %rbx
movq %r8, %rbx
movl %r11d, %ebp
addq %rbx, %rbx
decl %ebp
testq %rbx, %rbx
jns 0xb53b
testq %r10, %r10
sete %r10b
shrq $0x35, %rdi
setne %dil
shlq $0x2, %r8
addl $-0x2, %r11d
testb %r10b, %dil
cmovneq %r8, %rsi
cmovnel %r11d, %ecx
decq %rsi
subl %r9d, %ecx
shlq %cl, %rsi
movq %rbx, (%rax)
movl %ebp, 0x8(%rax)
movq %rsi, 0x10(%rax)
movl %r9d, 0x18(%rax)
movq %rdx, 0x20(%rax)
movl %r9d, 0x28(%rax)
popq %rbx
popq %rbp
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18compute_boundariesIdEENS2_10boundariesET_:
mov rax, rdi
movq rdi, xmm0
mov r10, 10000000000000h
dec r10
and r10, rdi
mov rcx, rdi
shr rcx, 34h
mov r8, r10
bts r8, 34h ; '4'
test rcx, rcx
cmovz r8, r10
lea ecx, [rcx-433h]
mov r11d, 0FFFFFBCEh
cmovnz r11d, ecx
lea rsi, [r8+r8]
lea rdx, ds:1[r8*2]
lea ecx, [r11-1]
mov r9d, ecx
loc_B528:
add rdx, rdx
dec r9d
test rdx, rdx
jns short loc_B528
push rbp
push rbx
mov rbx, r8
mov ebp, r11d
loc_B53B:
add rbx, rbx
dec ebp
test rbx, rbx
jns short loc_B53B
test r10, r10
setz r10b
shr rdi, 35h
setnz dil
shl r8, 2
add r11d, 0FFFFFFFEh
test dil, r10b
cmovnz rsi, r8
cmovnz ecx, r11d
dec rsi
sub ecx, r9d
shl rsi, cl
mov [rax], rbx
mov [rax+8], ebp
mov [rax+10h], rsi
mov [rax+18h], r9d
mov [rax+20h], rdx
mov [rax+28h], r9d
pop rbx
pop rbp
retn
|
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(long long a1, double a2)
{
long long result; // rax
long long v3; // r8
int v4; // r11d
long long v5; // rsi
long long v6; // rdx
char v7; // cl
int v8; // r9d
long long v9; // rbx
int v10; // ebp
long long v11; // r8
char v12; // r11
result = a1;
v3 = *(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL | 0x10000000000000LL;
if ( !(*(_QWORD *)&a2 >> 52) )
v3 = *(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL;
v4 = -1074;
if ( *(_QWORD *)&a2 >> 52 )
v4 = (*(_QWORD *)&a2 >> 52) - 1075;
v5 = 2 * v3;
v6 = 2 * v3 + 1;
v7 = v4 - 1;
v8 = v4 - 1;
do
{
v6 *= 2LL;
--v8;
}
while ( v6 >= 0 );
v9 = v3;
v10 = v4;
do
{
v9 *= 2LL;
--v10;
}
while ( v9 >= 0 );
v11 = 4 * v3;
v12 = v4 - 2;
if ( (*(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL) == 0 && *(_QWORD *)&a2 >> 53 != 0LL )
{
v5 = v11;
v7 = v12;
}
*(_QWORD *)a1 = v9;
*(_DWORD *)(a1 + 8) = v10;
*(_QWORD *)(a1 + 16) = (v5 - 1) << (v7 - (unsigned __int8)v8);
*(_DWORD *)(a1 + 24) = v8;
*(_QWORD *)(a1 + 32) = v6;
*(_DWORD *)(a1 + 40) = v8;
return result;
}
|
compute_boundaries<double>:
MOV RAX,RDI
MOVQ RDI,XMM0
MOV R10,0x10000000000000
DEC R10
AND R10,RDI
MOV RCX,RDI
SHR RCX,0x34
MOV R8,R10
BTS R8,0x34
TEST RCX,RCX
CMOVZ R8,R10
LEA ECX,[RCX + -0x433]
MOV R11D,0xfffffbce
CMOVNZ R11D,ECX
LEA RSI,[R8 + R8*0x1]
LEA RDX,[0x1 + R8*0x2]
LEA ECX,[R11 + -0x1]
MOV R9D,ECX
LAB_0010b528:
ADD RDX,RDX
DEC R9D
TEST RDX,RDX
JNS 0x0010b528
PUSH RBP
PUSH RBX
MOV RBX,R8
MOV EBP,R11D
LAB_0010b53b:
ADD RBX,RBX
DEC EBP
TEST RBX,RBX
JNS 0x0010b53b
TEST R10,R10
SETZ R10B
SHR RDI,0x35
SETNZ DIL
SHL R8,0x2
ADD R11D,-0x2
TEST DIL,R10B
CMOVNZ RSI,R8
CMOVNZ ECX,R11D
DEC RSI
SUB ECX,R9D
SHL RSI,CL
MOV qword ptr [RAX],RBX
MOV dword ptr [RAX + 0x8],EBP
MOV qword ptr [RAX + 0x10],RSI
MOV dword ptr [RAX + 0x18],R9D
MOV qword ptr [RAX + 0x20],RDX
MOV dword ptr [RAX + 0x28],R9D
POP RBX
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>
(dtoa_impl *this,double param_1)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
int iVar5;
ulong uVar6;
int iVar7;
ulong uVar8;
int iVar9;
bool bVar10;
uVar8 = (ulong)param_1 & 0xfffffffffffff;
bVar10 = (ulong)param_1 >> 0x34 == 0;
uVar6 = uVar8 | 0x10000000000000;
if (bVar10) {
uVar6 = uVar8;
}
iVar9 = -0x432;
if (!bVar10) {
iVar9 = (uint)((ulong)param_1 >> 0x34) - 0x433;
}
lVar3 = uVar6 * 2 + 1;
iVar7 = iVar9 + -1;
do {
lVar3 = lVar3 * 2;
iVar7 = iVar7 + -1;
uVar4 = uVar6;
iVar5 = iVar9;
} while (-1 < lVar3);
do {
uVar4 = uVar4 * 2;
iVar5 = iVar5 + -1;
} while (-1 < (long)uVar4);
iVar1 = iVar9 + -1;
lVar2 = uVar6 * 2;
if ((ulong)param_1 >> 0x35 != 0 && uVar8 == 0) {
iVar1 = iVar9 + -2;
lVar2 = uVar6 << 2;
}
*(ulong *)this = uVar4;
*(int *)(this + 8) = iVar5;
*(long *)(this + 0x10) = lVar2 + -1 << ((char)iVar1 - (char)iVar7 & 0x3fU);
*(int *)(this + 0x18) = iVar7;
*(long *)(this + 0x20) = lVar3;
*(int *)(this + 0x28) = iVar7;
return;
}
|
|
60,556
|
js_alloc_string
|
bluesky950520[P]quickjs/quickjs.c
|
static JSString *js_alloc_string(JSContext *ctx, int max_len, int is_wide_char)
{
JSString *p;
p = js_alloc_string_rt(ctx->rt, max_len, is_wide_char);
if (unlikely(!p)) {
JS_ThrowOutOfMemory(ctx);
return NULL;
}
return p;
}
|
O0
|
c
|
js_alloc_string:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movl 0x24(%rsp), %esi
movl 0x20(%rsp), %edx
callq 0x5c260
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x28507
movq 0x28(%rsp), %rdi
callq 0x20950
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq $0x0, 0x30(%rsp)
jmp 0x28511
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
|
js_alloc_string:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_14], esi
mov [rsp+38h+var_18], edx
mov rax, [rsp+38h+var_10]
mov rdi, [rax+18h]
mov esi, [rsp+38h+var_14]
mov edx, [rsp+38h+var_18]
call js_alloc_string_rt
mov [rsp+38h+var_20], rax
cmp [rsp+38h+var_20], 0
setnz al
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_28507
mov rdi, [rsp+38h+var_10]
call JS_ThrowOutOfMemory
mov [rsp+38h+var_30], rax
mov [rsp+38h+var_28], rdx
mov [rsp+38h+var_8], 0
jmp short loc_28511
loc_28507:
mov rax, [rsp+38h+var_20]
mov [rsp+38h+var_8], rax
loc_28511:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
|
long long js_alloc_string(long long a1, unsigned int a2, unsigned int a3)
{
int v3; // edx
long long v4; // rcx
int v5; // r8d
int v6; // r9d
long long v8; // [rsp+18h] [rbp-20h]
v8 = js_alloc_string_rt(*(_QWORD *)(a1 + 24), a2, a3);
if ( v8 )
return v8;
JS_ThrowOutOfMemory(a1, a2, v3, v4, v5, v6);
return 0LL;
}
|
js_alloc_string:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV dword ptr [RSP + 0x24],ESI
MOV dword ptr [RSP + 0x20],EDX
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
MOV ESI,dword ptr [RSP + 0x24]
MOV EDX,dword ptr [RSP + 0x20]
CALL 0x0015c260
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00128507
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00120950
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x30],0x0
JMP 0x00128511
LAB_00128507:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x30],RAX
LAB_00128511:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
long js_alloc_string(long param_1,int4 param_2,int4 param_3)
{
long local_8;
local_8 = js_alloc_string_rt(*(int8 *)(param_1 + 0x18),param_2,param_3);
if (local_8 == 0) {
JS_ThrowOutOfMemory(param_1);
local_8 = 0;
}
return local_8;
}
|
|
60,557
|
JS_AddIntrinsicPromise
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_AddIntrinsicPromise(JSContext *ctx)
{
JSRuntime *rt = ctx->rt;
JSValue obj1;
if (!JS_IsRegisteredClass(rt, JS_CLASS_PROMISE)) {
init_class_range(rt, js_async_class_def, JS_CLASS_PROMISE,
countof(js_async_class_def));
rt->class_array[JS_CLASS_PROMISE_RESOLVE_FUNCTION].call = js_promise_resolve_function_call;
rt->class_array[JS_CLASS_PROMISE_REJECT_FUNCTION].call = js_promise_resolve_function_call;
rt->class_array[JS_CLASS_ASYNC_FUNCTION].call = js_async_function_call;
rt->class_array[JS_CLASS_ASYNC_FUNCTION_RESOLVE].call = js_async_function_resolve_call;
rt->class_array[JS_CLASS_ASYNC_FUNCTION_REJECT].call = js_async_function_resolve_call;
rt->class_array[JS_CLASS_ASYNC_GENERATOR_FUNCTION].call = js_async_generator_function_call;
}
/* Promise */
ctx->class_proto[JS_CLASS_PROMISE] = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_PROMISE],
js_promise_proto_funcs,
countof(js_promise_proto_funcs));
obj1 = JS_NewCFunction2(ctx, js_promise_constructor, "Promise", 1,
JS_CFUNC_constructor, 0);
ctx->promise_ctor = js_dup(obj1);
JS_SetPropertyFunctionList(ctx, obj1,
js_promise_funcs,
countof(js_promise_funcs));
JS_NewGlobalCConstructor2(ctx, obj1, "Promise",
ctx->class_proto[JS_CLASS_PROMISE]);
/* Used to squelch a -Wcast-function-type warning. */
JSCFunctionType ft;
/* AsyncFunction */
ctx->class_proto[JS_CLASS_ASYNC_FUNCTION] = JS_NewObjectProto(ctx, ctx->function_proto);
ft.generic_magic = js_function_constructor;
obj1 = JS_NewCFunction3(ctx, ft.generic,
"AsyncFunction", 1,
JS_CFUNC_constructor_or_func_magic, JS_FUNC_ASYNC,
ctx->function_ctor);
JS_SetPropertyFunctionList(ctx,
ctx->class_proto[JS_CLASS_ASYNC_FUNCTION],
js_async_function_proto_funcs,
countof(js_async_function_proto_funcs));
JS_SetConstructor2(ctx, obj1, ctx->class_proto[JS_CLASS_ASYNC_FUNCTION],
0, JS_PROP_CONFIGURABLE);
JS_FreeValue(ctx, obj1);
/* AsyncIteratorPrototype */
ctx->async_iterator_proto = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->async_iterator_proto,
js_async_iterator_proto_funcs,
countof(js_async_iterator_proto_funcs));
/* AsyncFromSyncIteratorPrototype */
ctx->class_proto[JS_CLASS_ASYNC_FROM_SYNC_ITERATOR] =
JS_NewObjectProto(ctx, ctx->async_iterator_proto);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_ASYNC_FROM_SYNC_ITERATOR],
js_async_from_sync_iterator_proto_funcs,
countof(js_async_from_sync_iterator_proto_funcs));
/* AsyncGeneratorPrototype */
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR] =
JS_NewObjectProto(ctx, ctx->async_iterator_proto);
JS_SetPropertyFunctionList(ctx,
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR],
js_async_generator_proto_funcs,
countof(js_async_generator_proto_funcs));
/* AsyncGeneratorFunction */
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR_FUNCTION] =
JS_NewObjectProto(ctx, ctx->function_proto);
ft.generic_magic = js_function_constructor;
obj1 = JS_NewCFunction3(ctx, ft.generic,
"AsyncGeneratorFunction", 1,
JS_CFUNC_constructor_or_func_magic,
JS_FUNC_ASYNC_GENERATOR,
ctx->function_ctor);
JS_SetPropertyFunctionList(ctx,
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR_FUNCTION],
js_async_generator_function_proto_funcs,
countof(js_async_generator_function_proto_funcs));
JS_SetConstructor2(ctx, ctx->class_proto[JS_CLASS_ASYNC_GENERATOR_FUNCTION],
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR],
JS_PROP_CONFIGURABLE, JS_PROP_CONFIGURABLE);
JS_SetConstructor2(ctx, obj1, ctx->class_proto[JS_CLASS_ASYNC_GENERATOR_FUNCTION],
0, JS_PROP_CONFIGURABLE);
JS_FreeValue(ctx, obj1);
}
|
O1
|
c
|
JS_AddIntrinsicPromise:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %r14
cmpl $0x32, 0x78(%r14)
jb 0x1e68b
movq 0x80(%r14), %rax
cmpl $0x0, 0x7a8(%rax)
jne 0x1e6f1
leaq 0xa765e(%rip), %rsi # 0xc5cf0
movq %r14, %rdi
movl $0x31, %edx
movl $0x9, %ecx
callq 0x1c235
movq 0x80(%r14), %rax
leaq 0x17197(%rip), %rcx # 0x35849
movq %rcx, 0x7e8(%rax)
movq %rcx, 0x810(%rax)
leaq -0xe08e(%rip), %rcx # 0x10639
movq %rcx, 0x838(%rax)
leaq 0x17354(%rip), %rcx # 0x35a29
movq %rcx, 0x860(%rax)
movq %rcx, 0x888(%rax)
leaq -0xdf69(%rip), %rcx # 0x10781
movq %rcx, 0x8d8(%rax)
movq 0x40(%rbx), %r14
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x202f1
movq %rax, 0x310(%r14)
movq %rdx, 0x318(%r14)
movq 0x40(%rbx), %rax
movq 0x310(%rax), %rsi
movq 0x318(%rax), %rdx
leaq 0xa8e7a(%rip), %rcx # 0xc75b0
movq %rbx, %rdi
movl $0x4, %r8d
callq 0x32053
movups 0x48(%rbx), %xmm0
movups %xmm0, (%rsp)
leaq 0x173a7(%rip), %rsi # 0x35afa
leaq 0x7ef9e(%rip), %rdx # 0x9d6f8
movq %rbx, %rdi
movl $0x1, %ecx
movl $0x2, %r8d
xorl %r9d, %r9d
callq 0x203f2
movq %rax, %r14
movq %rdx, %r15
movq %rax, 0x18(%rsp)
cmpl $-0x9, %r15d
jb 0x1e788
movq 0x18(%rsp), %rax
incl (%rax)
movq %r14, 0x88(%rbx)
movq %r15, 0x90(%rbx)
leaq 0xa8e93(%rip), %rcx # 0xc7630
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x9, %r8d
callq 0x32053
movq 0x40(%rbx), %rax
movq 0x310(%rax), %r8
movq 0x318(%rax), %r9
leaq 0x7ef2e(%rip), %rcx # 0x9d6f8
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x35596
movq 0x40(%rbx), %r14
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x202f1
movq %rax, 0x340(%r14)
movq %rdx, 0x348(%r14)
movups 0x58(%rbx), %xmm0
movups %xmm0, (%rsp)
leaq 0x17556(%rip), %r14 # 0x35d64
leaq 0x7eeeb(%rip), %rdx # 0x9d700
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %ecx
movl $0x5, %r8d
movl $0x2, %r9d
callq 0x203f2
movq %rax, %r15
movq %rdx, %r12
movq 0x40(%rbx), %rax
movq 0x340(%rax), %rsi
movq 0x348(%rax), %rdx
leaq 0xa8f00(%rip), %rcx # 0xc7750
movq %rbx, %rdi
movl $0x1, %r8d
callq 0x32053
movq 0x40(%rbx), %rax
movq 0x340(%rax), %rcx
movq 0x348(%rax), %r8
movl %ebp, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %r9d, %r9d
callq 0x3260b
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1ccb2
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x202f1
movq %rax, 0x160(%rbx)
movq %rdx, 0x168(%rbx)
leaq 0xa750f(%rip), %rcx # 0xc5dd0
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %r8d
callq 0x32053
movq 0x40(%rbx), %r15
movq 0x160(%rbx), %rsi
movq 0x168(%rbx), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x202f1
movq %rax, 0x370(%r15)
movq %rdx, 0x378(%r15)
movq 0x40(%rbx), %rax
movq 0x370(%rax), %rsi
movq 0x378(%rax), %rdx
leaq 0xa74d8(%rip), %rcx # 0xc5df0
movq %rbx, %rdi
movl $0x3, %r8d
callq 0x32053
movq 0x40(%rbx), %r15
movq 0x160(%rbx), %rsi
movq 0x168(%rbx), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x202f1
movq %rax, 0x390(%r15)
movq %rdx, 0x398(%r15)
movq 0x40(%rbx), %rax
movq 0x390(%rax), %rsi
movq 0x398(%rax), %rdx
leaq 0xa8e04(%rip), %rcx # 0xc7770
movq %rbx, %rdi
movl $0x4, %r8d
callq 0x32053
movq 0x40(%rbx), %r15
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x202f1
movq %rax, 0x380(%r15)
movq %rdx, 0x388(%r15)
movups 0x58(%rbx), %xmm0
movups %xmm0, (%rsp)
leaq 0x7ed5e(%rip), %rdx # 0x9d70e
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %ecx
movl $0x5, %r8d
movl $0x3, %r9d
callq 0x203f2
movq %rax, %r14
movq %rdx, %r15
movq 0x40(%rbx), %rax
movq 0x380(%rax), %rsi
movq 0x388(%rax), %rdx
leaq 0xa8e05(%rip), %rcx # 0xc77f0
movq %rbx, %rdi
movl $0x1, %r8d
callq 0x32053
movq 0x40(%rbx), %rax
movq 0x380(%rax), %rsi
movq 0x388(%rax), %rdx
movq 0x390(%rax), %rcx
movq 0x398(%rax), %r8
movl %ebp, (%rsp)
movq %rbx, %rdi
movl $0x1, %r9d
callq 0x3260b
movq 0x40(%rbx), %rax
movq 0x380(%rax), %rcx
movq 0x388(%rax), %r8
movl %ebp, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %r9d, %r9d
callq 0x3260b
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1ccb2
|
JS_AddIntrinsicPromise:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov rbx, rdi
mov r14, [rdi+18h]
cmp dword ptr [r14+78h], 32h ; '2'
jb short loc_1E68B
mov rax, [r14+80h]
cmp dword ptr [rax+7A8h], 0
jnz short loc_1E6F1
loc_1E68B:
lea rsi, js_async_class_def
mov rdi, r14
mov edx, 31h ; '1'
mov ecx, 9
call init_class_range
mov rax, [r14+80h]
lea rcx, js_promise_resolve_function_call
mov [rax+7E8h], rcx
mov [rax+810h], rcx
lea rcx, js_async_function_call
mov [rax+838h], rcx
lea rcx, js_async_function_resolve_call
mov [rax+860h], rcx
mov [rax+888h], rcx
lea rcx, js_async_generator_function_call
mov [rax+8D8h], rcx
loc_1E6F1:
mov r14, [rbx+40h]
mov rsi, [r14+10h]
mov rdx, [r14+18h]
mov ebp, 1
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r14+310h], rax
mov [r14+318h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+310h]
mov rdx, [rax+318h]
lea rcx, js_promise_proto_funcs
mov rdi, rbx
mov r8d, 4
call JS_SetPropertyFunctionList
movups xmm0, xmmword ptr [rbx+48h]
movups [rsp+48h+var_48], xmm0
lea rsi, js_promise_constructor
lea rdx, aPromise; "Promise"
mov rdi, rbx
mov ecx, 1
mov r8d, 2
xor r9d, r9d
call JS_NewCFunction3
mov r14, rax
mov r15, rdx
mov [rsp+48h+var_30], rax
cmp r15d, 0FFFFFFF7h
jb short loc_1E788
mov rax, [rsp+48h+var_30]
inc dword ptr [rax]
loc_1E788:
mov [rbx+88h], r14
mov [rbx+90h], r15
lea rcx, js_promise_funcs
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov r8d, 9
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov r8, [rax+310h]
mov r9, [rax+318h]
lea rcx, aPromise; "Promise"
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_NewGlobalCConstructor2
mov r14, [rbx+40h]
mov rsi, [rbx+48h]
mov rdx, [rbx+50h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r14+340h], rax
mov [r14+348h], rdx
movups xmm0, xmmword ptr [rbx+58h]
movups [rsp+48h+var_48], xmm0
lea r14, js_function_constructor
lea rdx, aAsyncfunction; "AsyncFunction"
mov rdi, rbx
mov rsi, r14
mov ecx, 1
mov r8d, 5
mov r9d, 2
call JS_NewCFunction3
mov r15, rax
mov r12, rdx
mov rax, [rbx+40h]
mov rsi, [rax+340h]
mov rdx, [rax+348h]
lea rcx, js_async_function_proto_funcs
mov rdi, rbx
mov r8d, 1
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov rcx, [rax+340h]
mov r8, [rax+348h]
mov dword ptr [rsp+48h+var_48], ebp
mov rdi, rbx
mov rsi, r15
mov rdx, r12
xor r9d, r9d
call JS_SetConstructor2
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r12
call JS_FreeValueRT
mov rax, [rbx+40h]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [rbx+160h], rax
mov [rbx+168h], rdx
lea rcx, js_async_iterator_proto_funcs
mov rdi, rbx
mov rsi, rax
mov r8d, 1
call JS_SetPropertyFunctionList
mov r15, [rbx+40h]
mov rsi, [rbx+160h]
mov rdx, [rbx+168h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r15+370h], rax
mov [r15+378h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+370h]
mov rdx, [rax+378h]
lea rcx, js_async_from_sync_iterator_proto_funcs
mov rdi, rbx
mov r8d, 3
call JS_SetPropertyFunctionList
mov r15, [rbx+40h]
mov rsi, [rbx+160h]
mov rdx, [rbx+168h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r15+390h], rax
mov [r15+398h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+390h]
mov rdx, [rax+398h]
lea rcx, js_async_generator_proto_funcs
mov rdi, rbx
mov r8d, 4
call JS_SetPropertyFunctionList
mov r15, [rbx+40h]
mov rsi, [rbx+48h]
mov rdx, [rbx+50h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r15+380h], rax
mov [r15+388h], rdx
movups xmm0, xmmword ptr [rbx+58h]
movups [rsp+48h+var_48], xmm0
lea rdx, aAsyncgenerator; "AsyncGeneratorFunction"
mov rdi, rbx
mov rsi, r14
mov ecx, 1
mov r8d, 5
mov r9d, 3
call JS_NewCFunction3
mov r14, rax
mov r15, rdx
mov rax, [rbx+40h]
mov rsi, [rax+380h]
mov rdx, [rax+388h]
lea rcx, js_async_generator_function_proto_funcs
mov rdi, rbx
mov r8d, 1
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov rsi, [rax+380h]
mov rdx, [rax+388h]
mov rcx, [rax+390h]
mov r8, [rax+398h]
mov dword ptr [rsp+48h+var_48], ebp
mov rdi, rbx
mov r9d, 1
call JS_SetConstructor2
mov rax, [rbx+40h]
mov rcx, [rax+380h]
mov r8, [rax+388h]
mov dword ptr [rsp+48h+var_48], ebp
mov rdi, rbx
mov rsi, r14
mov rdx, r15
xor r9d, r9d
call JS_SetConstructor2
mov rdi, [rbx+18h]
mov rsi, r14
mov rdx, r15
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp JS_FreeValueRT
|
long long JS_AddIntrinsicPromise(long long *a1)
{
long long v1; // r14
_QWORD *v2; // rax
_QWORD *v3; // r14
long long v4; // rdx
long long v5; // rdx
_DWORD *v6; // r14
long long v7; // r15
long long v8; // r14
long long v9; // rdx
_DWORD *v10; // r15
long long v11; // rdx
long long v12; // r12
long long v13; // rax
long long v14; // rdx
long long v15; // r15
long long v16; // rdx
long long v17; // r15
long long v18; // rdx
long long v19; // r15
long long v20; // rdx
_DWORD *v21; // r14
long long v22; // rdx
long long v23; // r15
v1 = a1[3];
if ( *(_DWORD *)(v1 + 120) < 0x32u || !*(_DWORD *)(*(_QWORD *)(v1 + 128) + 1960LL) )
{
init_class_range(a1[3], (long long)&js_async_class_def, 0x31u, 9);
v2 = *(_QWORD **)(v1 + 128);
v2[253] = js_promise_resolve_function_call;
v2[258] = js_promise_resolve_function_call;
v2[263] = js_async_function_call;
v2[268] = js_async_function_resolve_call;
v2[273] = js_async_function_resolve_call;
v2[283] = js_async_generator_function_call;
}
v3 = (_QWORD *)a1[8];
v3[98] = JS_NewObjectProtoClass(a1, v3[2], v3[3], 1LL);
v3[99] = v4;
JS_SetPropertyFunctionList(a1, *(_QWORD *)(a1[8] + 784), *(_QWORD *)(a1[8] + 792), &js_promise_proto_funcs, 4LL);
v6 = (_DWORD *)JS_NewCFunction3(
(_DWORD)a1,
(unsigned int)js_promise_constructor,
(unsigned int)"Promise",
1,
2,
0,
a1[9],
a1[10]);
v7 = v5;
if ( (unsigned int)v5 >= 0xFFFFFFF7 )
++*v6;
a1[17] = (long long)v6;
a1[18] = v5;
JS_SetPropertyFunctionList(a1, v6, v5, &js_promise_funcs, 9LL);
JS_NewGlobalCConstructor2(a1, v6, v7, "Promise", *(_QWORD *)(a1[8] + 784), *(_QWORD *)(a1[8] + 792));
v8 = a1[8];
*(_QWORD *)(v8 + 832) = JS_NewObjectProtoClass(a1, a1[9], a1[10], 1LL);
*(_QWORD *)(v8 + 840) = v9;
v10 = (_DWORD *)JS_NewCFunction3(
(_DWORD)a1,
(unsigned int)js_function_constructor,
(unsigned int)"AsyncFunction",
1,
5,
2,
a1[11],
a1[12]);
v12 = v11;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(a1[8] + 832),
*(_QWORD *)(a1[8] + 840),
&js_async_function_proto_funcs,
1LL);
JS_SetConstructor2(a1, v10, v12, *(_QWORD *)(a1[8] + 832), *(_QWORD *)(a1[8] + 840), 0LL, 1);
JS_FreeValueRT(a1[3], v10, v12);
v13 = JS_NewObjectProtoClass(a1, *(_QWORD *)(a1[8] + 16), *(_QWORD *)(a1[8] + 24), 1LL);
a1[44] = v13;
a1[45] = v14;
JS_SetPropertyFunctionList(a1, v13, v14, &js_async_iterator_proto_funcs, 1LL);
v15 = a1[8];
*(_QWORD *)(v15 + 880) = JS_NewObjectProtoClass(a1, a1[44], a1[45], 1LL);
*(_QWORD *)(v15 + 888) = v16;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(a1[8] + 880),
*(_QWORD *)(a1[8] + 888),
&js_async_from_sync_iterator_proto_funcs,
3LL);
v17 = a1[8];
*(_QWORD *)(v17 + 912) = JS_NewObjectProtoClass(a1, a1[44], a1[45], 1LL);
*(_QWORD *)(v17 + 920) = v18;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(a1[8] + 912),
*(_QWORD *)(a1[8] + 920),
&js_async_generator_proto_funcs,
4LL);
v19 = a1[8];
*(_QWORD *)(v19 + 896) = JS_NewObjectProtoClass(a1, a1[9], a1[10], 1LL);
*(_QWORD *)(v19 + 904) = v20;
v21 = (_DWORD *)JS_NewCFunction3(
(_DWORD)a1,
(unsigned int)js_function_constructor,
(unsigned int)"AsyncGeneratorFunction",
1,
5,
3,
a1[11],
a1[12]);
v23 = v22;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(a1[8] + 896),
*(_QWORD *)(a1[8] + 904),
&js_async_generator_function_proto_funcs,
1LL);
JS_SetConstructor2(
a1,
*(_QWORD *)(a1[8] + 896),
*(_QWORD *)(a1[8] + 904),
*(_QWORD *)(a1[8] + 912),
*(_QWORD *)(a1[8] + 920),
1LL,
1);
JS_SetConstructor2(a1, v21, v23, *(_QWORD *)(a1[8] + 896), *(_QWORD *)(a1[8] + 904), 0LL, 1);
return JS_FreeValueRT(a1[3], v21, v23);
}
|
JS_AddIntrinsicPromise:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x18]
CMP dword ptr [R14 + 0x78],0x32
JC 0x0011e68b
MOV RAX,qword ptr [R14 + 0x80]
CMP dword ptr [RAX + 0x7a8],0x0
JNZ 0x0011e6f1
LAB_0011e68b:
LEA RSI,[0x1c5cf0]
MOV RDI,R14
MOV EDX,0x31
MOV ECX,0x9
CALL 0x0011c235
MOV RAX,qword ptr [R14 + 0x80]
LEA RCX,[0x135849]
MOV qword ptr [RAX + 0x7e8],RCX
MOV qword ptr [RAX + 0x810],RCX
LEA RCX,[0x110639]
MOV qword ptr [RAX + 0x838],RCX
LEA RCX,[0x135a29]
MOV qword ptr [RAX + 0x860],RCX
MOV qword ptr [RAX + 0x888],RCX
LEA RCX,[0x110781]
MOV qword ptr [RAX + 0x8d8],RCX
LAB_0011e6f1:
MOV R14,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x18]
MOV EBP,0x1
MOV RDI,RBX
MOV ECX,0x1
CALL 0x001202f1
MOV qword ptr [R14 + 0x310],RAX
MOV qword ptr [R14 + 0x318],RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x310]
MOV RDX,qword ptr [RAX + 0x318]
LEA RCX,[0x1c75b0]
MOV RDI,RBX
MOV R8D,0x4
CALL 0x00132053
MOVUPS XMM0,xmmword ptr [RBX + 0x48]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x135afa]
LEA RDX,[0x19d6f8]
MOV RDI,RBX
MOV ECX,0x1
MOV R8D,0x2
XOR R9D,R9D
CALL 0x001203f2
MOV R14,RAX
MOV R15,RDX
MOV qword ptr [RSP + 0x18],RAX
CMP R15D,-0x9
JC 0x0011e788
MOV RAX,qword ptr [RSP + 0x18]
INC dword ptr [RAX]
LAB_0011e788:
MOV qword ptr [RBX + 0x88],R14
MOV qword ptr [RBX + 0x90],R15
LEA RCX,[0x1c7630]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV R8D,0x9
CALL 0x00132053
MOV RAX,qword ptr [RBX + 0x40]
MOV R8,qword ptr [RAX + 0x310]
MOV R9,qword ptr [RAX + 0x318]
LEA RCX,[0x19d6f8]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x00135596
MOV R14,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RBX + 0x48]
MOV RDX,qword ptr [RBX + 0x50]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x001202f1
MOV qword ptr [R14 + 0x340],RAX
MOV qword ptr [R14 + 0x348],RDX
MOVUPS XMM0,xmmword ptr [RBX + 0x58]
MOVUPS xmmword ptr [RSP],XMM0
LEA R14,[0x135d64]
LEA RDX,[0x19d700]
MOV RDI,RBX
MOV RSI,R14
MOV ECX,0x1
MOV R8D,0x5
MOV R9D,0x2
CALL 0x001203f2
MOV R15,RAX
MOV R12,RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x340]
MOV RDX,qword ptr [RAX + 0x348]
LEA RCX,[0x1c7750]
MOV RDI,RBX
MOV R8D,0x1
CALL 0x00132053
MOV RAX,qword ptr [RBX + 0x40]
MOV RCX,qword ptr [RAX + 0x340]
MOV R8,qword ptr [RAX + 0x348]
MOV dword ptr [RSP],EBP
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
XOR R9D,R9D
CALL 0x0013260b
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R12
CALL 0x0011ccb2
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x001202f1
MOV qword ptr [RBX + 0x160],RAX
MOV qword ptr [RBX + 0x168],RDX
LEA RCX,[0x1c5dd0]
MOV RDI,RBX
MOV RSI,RAX
MOV R8D,0x1
CALL 0x00132053
MOV R15,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RBX + 0x160]
MOV RDX,qword ptr [RBX + 0x168]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x001202f1
MOV qword ptr [R15 + 0x370],RAX
MOV qword ptr [R15 + 0x378],RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x370]
MOV RDX,qword ptr [RAX + 0x378]
LEA RCX,[0x1c5df0]
MOV RDI,RBX
MOV R8D,0x3
CALL 0x00132053
MOV R15,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RBX + 0x160]
MOV RDX,qword ptr [RBX + 0x168]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x001202f1
MOV qword ptr [R15 + 0x390],RAX
MOV qword ptr [R15 + 0x398],RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x390]
MOV RDX,qword ptr [RAX + 0x398]
LEA RCX,[0x1c7770]
MOV RDI,RBX
MOV R8D,0x4
CALL 0x00132053
MOV R15,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RBX + 0x48]
MOV RDX,qword ptr [RBX + 0x50]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x001202f1
MOV qword ptr [R15 + 0x380],RAX
MOV qword ptr [R15 + 0x388],RDX
MOVUPS XMM0,xmmword ptr [RBX + 0x58]
MOVUPS xmmword ptr [RSP],XMM0
LEA RDX,[0x19d70e]
MOV RDI,RBX
MOV RSI,R14
MOV ECX,0x1
MOV R8D,0x5
MOV R9D,0x3
CALL 0x001203f2
MOV R14,RAX
MOV R15,RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x380]
MOV RDX,qword ptr [RAX + 0x388]
LEA RCX,[0x1c77f0]
MOV RDI,RBX
MOV R8D,0x1
CALL 0x00132053
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x380]
MOV RDX,qword ptr [RAX + 0x388]
MOV RCX,qword ptr [RAX + 0x390]
MOV R8,qword ptr [RAX + 0x398]
MOV dword ptr [RSP],EBP
MOV RDI,RBX
MOV R9D,0x1
CALL 0x0013260b
MOV RAX,qword ptr [RBX + 0x40]
MOV RCX,qword ptr [RAX + 0x380]
MOV R8,qword ptr [RAX + 0x388]
MOV dword ptr [RSP],EBP
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
XOR R9D,R9D
CALL 0x0013260b
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R14
MOV RDX,R15
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0011ccb2
|
void JS_AddIntrinsicPromise(long param_1)
{
long lVar1;
int *piVar2;
int1 auVar3 [16];
lVar1 = *(long *)(param_1 + 0x18);
if ((*(uint *)(lVar1 + 0x78) < 0x32) || (*(int *)(*(long *)(lVar1 + 0x80) + 0x7a8) == 0)) {
init_class_range(lVar1,js_async_class_def,0x31,9);
lVar1 = *(long *)(lVar1 + 0x80);
*(code **)(lVar1 + 0x7e8) = js_promise_resolve_function_call;
*(code **)(lVar1 + 0x810) = js_promise_resolve_function_call;
*(code **)(lVar1 + 0x838) = js_async_function_call;
*(code **)(lVar1 + 0x860) = js_async_function_resolve_call;
*(code **)(lVar1 + 0x888) = js_async_function_resolve_call;
*(code **)(lVar1 + 0x8d8) = js_async_generator_function_call;
}
lVar1 = *(long *)(param_1 + 0x40);
auVar3 = JS_NewObjectProtoClass
(param_1,*(int8 *)(lVar1 + 0x10),*(int8 *)(lVar1 + 0x18),1);
*(int1 (*) [16])(lVar1 + 0x310) = auVar3;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x310),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x318),js_promise_proto_funcs,4);
auVar3 = JS_NewCFunction3(param_1,js_promise_constructor,"Promise",1,2,0,
*(int4 *)(param_1 + 0x48),*(int4 *)(param_1 + 0x50));
piVar2 = auVar3._0_8_;
if (0xfffffff6 < auVar3._8_4_) {
*piVar2 = *piVar2 + 1;
}
*(int1 (*) [16])(param_1 + 0x88) = auVar3;
JS_SetPropertyFunctionList(param_1,piVar2,auVar3._8_8_,js_promise_funcs,9);
JS_NewGlobalCConstructor2
(param_1,piVar2,auVar3._8_8_,"Promise",
*(int8 *)(*(long *)(param_1 + 0x40) + 0x310),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x318));
lVar1 = *(long *)(param_1 + 0x40);
auVar3 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),1);
*(int1 (*) [16])(lVar1 + 0x340) = auVar3;
auVar3 = JS_NewCFunction3(param_1,js_function_constructor,"AsyncFunction",1,5,2,
*(int4 *)(param_1 + 0x58),*(int4 *)(param_1 + 0x60));
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x340),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x348),js_async_function_proto_funcs,1);
JS_SetConstructor2(param_1,auVar3._0_8_,auVar3._8_8_,
*(int8 *)(*(long *)(param_1 + 0x40) + 0x340),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x348),0,1);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar3._0_8_,auVar3._8_8_);
auVar3 = JS_NewObjectProtoClass
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x18),1);
*(int1 (*) [16])(param_1 + 0x160) = auVar3;
JS_SetPropertyFunctionList(param_1,auVar3._0_8_,auVar3._8_8_,js_async_iterator_proto_funcs,1);
lVar1 = *(long *)(param_1 + 0x40);
auVar3 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x160),*(int8 *)(param_1 + 0x168),1);
*(int1 (*) [16])(lVar1 + 0x370) = auVar3;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x370),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x378),
js_async_from_sync_iterator_proto_funcs,3);
lVar1 = *(long *)(param_1 + 0x40);
auVar3 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x160),*(int8 *)(param_1 + 0x168),1);
*(int1 (*) [16])(lVar1 + 0x390) = auVar3;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x390),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x398),js_async_generator_proto_funcs,4);
lVar1 = *(long *)(param_1 + 0x40);
auVar3 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),1);
*(int1 (*) [16])(lVar1 + 0x380) = auVar3;
auVar3 = JS_NewCFunction3(param_1,js_function_constructor,"AsyncGeneratorFunction",1,5,3,
*(int4 *)(param_1 + 0x58),*(int4 *)(param_1 + 0x60));
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x380),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x388),
js_async_generator_function_proto_funcs,1);
lVar1 = *(long *)(param_1 + 0x40);
JS_SetConstructor2(param_1,*(int8 *)(lVar1 + 0x380),*(int8 *)(lVar1 + 0x388),
*(int8 *)(lVar1 + 0x390),*(int8 *)(lVar1 + 0x398),1,1);
JS_SetConstructor2(param_1,auVar3._0_8_,auVar3._8_8_,
*(int8 *)(*(long *)(param_1 + 0x40) + 0x380),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x388),0,1);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar3._0_8_,auVar3._8_8_);
return;
}
|
|
60,558
|
JS_AddIntrinsicPromise
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_AddIntrinsicPromise(JSContext *ctx)
{
JSRuntime *rt = ctx->rt;
JSValue obj1;
if (!JS_IsRegisteredClass(rt, JS_CLASS_PROMISE)) {
init_class_range(rt, js_async_class_def, JS_CLASS_PROMISE,
countof(js_async_class_def));
rt->class_array[JS_CLASS_PROMISE_RESOLVE_FUNCTION].call = js_promise_resolve_function_call;
rt->class_array[JS_CLASS_PROMISE_REJECT_FUNCTION].call = js_promise_resolve_function_call;
rt->class_array[JS_CLASS_ASYNC_FUNCTION].call = js_async_function_call;
rt->class_array[JS_CLASS_ASYNC_FUNCTION_RESOLVE].call = js_async_function_resolve_call;
rt->class_array[JS_CLASS_ASYNC_FUNCTION_REJECT].call = js_async_function_resolve_call;
rt->class_array[JS_CLASS_ASYNC_GENERATOR_FUNCTION].call = js_async_generator_function_call;
}
/* Promise */
ctx->class_proto[JS_CLASS_PROMISE] = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_PROMISE],
js_promise_proto_funcs,
countof(js_promise_proto_funcs));
obj1 = JS_NewCFunction2(ctx, js_promise_constructor, "Promise", 1,
JS_CFUNC_constructor, 0);
ctx->promise_ctor = js_dup(obj1);
JS_SetPropertyFunctionList(ctx, obj1,
js_promise_funcs,
countof(js_promise_funcs));
JS_NewGlobalCConstructor2(ctx, obj1, "Promise",
ctx->class_proto[JS_CLASS_PROMISE]);
/* Used to squelch a -Wcast-function-type warning. */
JSCFunctionType ft;
/* AsyncFunction */
ctx->class_proto[JS_CLASS_ASYNC_FUNCTION] = JS_NewObjectProto(ctx, ctx->function_proto);
ft.generic_magic = js_function_constructor;
obj1 = JS_NewCFunction3(ctx, ft.generic,
"AsyncFunction", 1,
JS_CFUNC_constructor_or_func_magic, JS_FUNC_ASYNC,
ctx->function_ctor);
JS_SetPropertyFunctionList(ctx,
ctx->class_proto[JS_CLASS_ASYNC_FUNCTION],
js_async_function_proto_funcs,
countof(js_async_function_proto_funcs));
JS_SetConstructor2(ctx, obj1, ctx->class_proto[JS_CLASS_ASYNC_FUNCTION],
0, JS_PROP_CONFIGURABLE);
JS_FreeValue(ctx, obj1);
/* AsyncIteratorPrototype */
ctx->async_iterator_proto = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->async_iterator_proto,
js_async_iterator_proto_funcs,
countof(js_async_iterator_proto_funcs));
/* AsyncFromSyncIteratorPrototype */
ctx->class_proto[JS_CLASS_ASYNC_FROM_SYNC_ITERATOR] =
JS_NewObjectProto(ctx, ctx->async_iterator_proto);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_ASYNC_FROM_SYNC_ITERATOR],
js_async_from_sync_iterator_proto_funcs,
countof(js_async_from_sync_iterator_proto_funcs));
/* AsyncGeneratorPrototype */
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR] =
JS_NewObjectProto(ctx, ctx->async_iterator_proto);
JS_SetPropertyFunctionList(ctx,
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR],
js_async_generator_proto_funcs,
countof(js_async_generator_proto_funcs));
/* AsyncGeneratorFunction */
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR_FUNCTION] =
JS_NewObjectProto(ctx, ctx->function_proto);
ft.generic_magic = js_function_constructor;
obj1 = JS_NewCFunction3(ctx, ft.generic,
"AsyncGeneratorFunction", 1,
JS_CFUNC_constructor_or_func_magic,
JS_FUNC_ASYNC_GENERATOR,
ctx->function_ctor);
JS_SetPropertyFunctionList(ctx,
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR_FUNCTION],
js_async_generator_function_proto_funcs,
countof(js_async_generator_function_proto_funcs));
JS_SetConstructor2(ctx, ctx->class_proto[JS_CLASS_ASYNC_GENERATOR_FUNCTION],
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR],
JS_PROP_CONFIGURABLE, JS_PROP_CONFIGURABLE);
JS_SetConstructor2(ctx, obj1, ctx->class_proto[JS_CLASS_ASYNC_GENERATOR_FUNCTION],
0, JS_PROP_CONFIGURABLE);
JS_FreeValue(ctx, obj1);
}
|
O3
|
c
|
JS_AddIntrinsicPromise:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %r14
cmpl $0x32, 0x78(%r14)
jb 0x1ece1
movq 0x80(%r14), %rax
cmpl $0x0, 0x7a8(%rax)
jne 0x1ed47
leaq 0xaa008(%rip), %rsi # 0xc8cf0
movq %r14, %rdi
movl $0x31, %edx
movl $0x9, %ecx
callq 0x1caf4
movq 0x80(%r14), %rax
leaq 0x17d71(%rip), %rcx # 0x36a79
movq %rcx, 0x7e8(%rax)
movq %rcx, 0x810(%rax)
leaq -0xe40a(%rip), %rcx # 0x10913
movq %rcx, 0x838(%rax)
leaq 0x17f51(%rip), %rcx # 0x36c7c
movq %rcx, 0x860(%rax)
movq %rcx, 0x888(%rax)
leaq -0xe2d1(%rip), %rcx # 0x10a6f
movq %rcx, 0x8d8(%rax)
movq 0x40(%rbx), %r14
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x20a15
movq %rax, 0x310(%r14)
movq %rdx, 0x318(%r14)
movq 0x40(%rbx), %rax
movq 0x310(%rax), %rsi
movq 0x318(%rax), %rdx
leaq 0xab829(%rip), %rcx # 0xca5b0
movq %rbx, %rdi
movl $0x4, %r8d
callq 0x3302c
movups 0x48(%rbx), %xmm0
movups %xmm0, (%rsp)
leaq 0x17f63(%rip), %rsi # 0x36d07
leaq 0x8191d(%rip), %rdx # 0xa06c8
movq %rbx, %rdi
movl $0x1, %ecx
movl $0x2, %r8d
xorl %r9d, %r9d
callq 0x20afb
movq %rax, %r14
movq %rdx, %r15
cmpl $-0x9, %r15d
jb 0x1edd0
incl (%r14)
movq %r14, 0x88(%rbx)
movq %r15, 0x90(%rbx)
leaq 0xab84b(%rip), %rcx # 0xca630
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x9, %r8d
callq 0x3302c
movq 0x40(%rbx), %rax
movq 0x310(%rax), %r8
movq 0x318(%rax), %r9
leaq 0x818b6(%rip), %rcx # 0xa06c8
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x36781
movq 0x40(%rbx), %r14
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x20a15
movq %rax, 0x340(%r14)
movq %rdx, 0x348(%r14)
movups 0x58(%rbx), %xmm0
movups %xmm0, (%rsp)
leaq 0x18186(%rip), %rsi # 0x36fe1
leaq 0x8186e(%rip), %rdx # 0xa06d0
movq %rbx, %rdi
movl $0x1, %ecx
movl $0x5, %r8d
movl $0x2, %r9d
callq 0x20afb
movq %rax, %r14
movq %rdx, %r15
movq 0x40(%rbx), %rax
movq 0x340(%rax), %rsi
movq 0x348(%rax), %rdx
leaq 0xab8b6(%rip), %rcx # 0xca750
movq %rbx, %rdi
movl $0x1, %r8d
callq 0x3302c
movq 0x40(%rbx), %rax
movq 0x340(%rax), %rcx
movq 0x348(%rax), %r8
movl $0x1, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %r9d, %r9d
callq 0x335b0
cmpl $-0x9, %r15d
jb 0x1eef5
movq 0x18(%rbx), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x1eef5
movq %r14, %rsi
movq %r15, %rdx
callq 0x20d90
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x20a15
movq %rax, 0x160(%rbx)
movq %rdx, 0x168(%rbx)
leaq 0xa9ead(%rip), %rcx # 0xc8dd0
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %r8d
callq 0x3302c
movq 0x40(%rbx), %r14
movq 0x160(%rbx), %rsi
movq 0x168(%rbx), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x20a15
movq %rax, 0x370(%r14)
movq %rdx, 0x378(%r14)
movq 0x40(%rbx), %rax
movq 0x370(%rax), %rsi
movq 0x378(%rax), %rdx
leaq 0xa9e76(%rip), %rcx # 0xc8df0
movq %rbx, %rdi
movl $0x3, %r8d
callq 0x3302c
movq 0x40(%rbx), %r14
movq 0x160(%rbx), %rsi
movq 0x168(%rbx), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x20a15
movq %rax, 0x390(%r14)
movq %rdx, 0x398(%r14)
movq 0x40(%rbx), %rax
movq 0x390(%rax), %rsi
movq 0x398(%rax), %rdx
leaq 0xab7a2(%rip), %rcx # 0xca770
movq %rbx, %rdi
movl $0x4, %r8d
callq 0x3302c
movq 0x40(%rbx), %r14
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x20a15
movq %rax, 0x380(%r14)
movq %rdx, 0x388(%r14)
movups 0x58(%rbx), %xmm0
movups %xmm0, (%rsp)
leaq 0x17fcf(%rip), %rsi # 0x36fe1
leaq 0x816c5(%rip), %rdx # 0xa06de
movq %rbx, %rdi
movl $0x1, %ecx
movl $0x5, %r8d
movl $0x3, %r9d
callq 0x20afb
movq %rax, %r14
movq %rdx, %r15
movq 0x40(%rbx), %rax
movq 0x380(%rax), %rsi
movq 0x388(%rax), %rdx
leaq 0xab79f(%rip), %rcx # 0xca7f0
movq %rbx, %rdi
movl $0x1, %r8d
callq 0x3302c
movq 0x40(%rbx), %rax
movq 0x380(%rax), %rsi
movq 0x388(%rax), %rdx
movq 0x390(%rax), %rcx
movq 0x398(%rax), %r8
movl %ebp, (%rsp)
movq %rbx, %rdi
movl $0x1, %r9d
callq 0x335b0
movq 0x40(%rbx), %rax
movq 0x380(%rax), %rcx
movq 0x388(%rax), %r8
movl %ebp, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %r9d, %r9d
callq 0x335b0
cmpl $-0x9, %r15d
jb 0x1f0e3
movq 0x18(%rbx), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x1f0e3
movq %r14, %rsi
movq %r15, %rdx
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x20d90
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
JS_AddIntrinsicPromise:
push rbp
push r15
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
mov r14, [rdi+18h]
cmp dword ptr [r14+78h], 32h ; '2'
jb short loc_1ECE1
mov rax, [r14+80h]
cmp dword ptr [rax+7A8h], 0
jnz short loc_1ED47
loc_1ECE1:
lea rsi, js_async_class_def
mov rdi, r14
mov edx, 31h ; '1'
mov ecx, 9
call init_class_range
mov rax, [r14+80h]
lea rcx, js_promise_resolve_function_call
mov [rax+7E8h], rcx
mov [rax+810h], rcx
lea rcx, js_async_function_call
mov [rax+838h], rcx
lea rcx, js_async_function_resolve_call
mov [rax+860h], rcx
mov [rax+888h], rcx
lea rcx, js_async_generator_function_call
mov [rax+8D8h], rcx
loc_1ED47:
mov r14, [rbx+40h]
mov rsi, [r14+10h]
mov rdx, [r14+18h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r14+310h], rax
mov [r14+318h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+310h]
mov rdx, [rax+318h]
lea rcx, js_promise_proto_funcs
mov rdi, rbx
mov r8d, 4
call JS_SetPropertyFunctionList
movups xmm0, xmmword ptr [rbx+48h]
movups [rsp+38h+var_38], xmm0
lea rsi, js_promise_constructor
lea rdx, aPromise; "Promise"
mov rdi, rbx
mov ecx, 1
mov r8d, 2
xor r9d, r9d
call JS_NewCFunction3
mov r14, rax
mov r15, rdx
cmp r15d, 0FFFFFFF7h
jb short loc_1EDD0
inc dword ptr [r14]
loc_1EDD0:
mov [rbx+88h], r14
mov [rbx+90h], r15
lea rcx, js_promise_funcs
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov r8d, 9
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov r8, [rax+310h]
mov r9, [rax+318h]
lea rcx, aPromise; "Promise"
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_NewGlobalCConstructor2
mov r14, [rbx+40h]
mov rsi, [rbx+48h]
mov rdx, [rbx+50h]
mov ebp, 1
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r14+340h], rax
mov [r14+348h], rdx
movups xmm0, xmmword ptr [rbx+58h]
movups [rsp+38h+var_38], xmm0
lea rsi, js_function_constructor
lea rdx, aAsyncfunction; "AsyncFunction"
mov rdi, rbx
mov ecx, 1
mov r8d, 5
mov r9d, 2
call JS_NewCFunction3
mov r14, rax
mov r15, rdx
mov rax, [rbx+40h]
mov rsi, [rax+340h]
mov rdx, [rax+348h]
lea rcx, js_async_function_proto_funcs
mov rdi, rbx
mov r8d, 1
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov rcx, [rax+340h]
mov r8, [rax+348h]
mov dword ptr [rsp+38h+var_38], 1
mov rdi, rbx
mov rsi, r14
mov rdx, r15
xor r9d, r9d
call JS_SetConstructor2
cmp r15d, 0FFFFFFF7h
jb short loc_1EEF5
mov rdi, [rbx+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_1EEF5
mov rsi, r14
mov rdx, r15
call js_free_value_rt
loc_1EEF5:
mov rax, [rbx+40h]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [rbx+160h], rax
mov [rbx+168h], rdx
lea rcx, js_async_iterator_proto_funcs
mov rdi, rbx
mov rsi, rax
mov r8d, 1
call JS_SetPropertyFunctionList
mov r14, [rbx+40h]
mov rsi, [rbx+160h]
mov rdx, [rbx+168h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r14+370h], rax
mov [r14+378h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+370h]
mov rdx, [rax+378h]
lea rcx, js_async_from_sync_iterator_proto_funcs
mov rdi, rbx
mov r8d, 3
call JS_SetPropertyFunctionList
mov r14, [rbx+40h]
mov rsi, [rbx+160h]
mov rdx, [rbx+168h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r14+390h], rax
mov [r14+398h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+390h]
mov rdx, [rax+398h]
lea rcx, js_async_generator_proto_funcs
mov rdi, rbx
mov r8d, 4
call JS_SetPropertyFunctionList
mov r14, [rbx+40h]
mov rsi, [rbx+48h]
mov rdx, [rbx+50h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r14+380h], rax
mov [r14+388h], rdx
movups xmm0, xmmword ptr [rbx+58h]
movups [rsp+38h+var_38], xmm0
lea rsi, js_function_constructor
lea rdx, aAsyncgenerator; "AsyncGeneratorFunction"
mov rdi, rbx
mov ecx, 1
mov r8d, 5
mov r9d, 3
call JS_NewCFunction3
mov r14, rax
mov r15, rdx
mov rax, [rbx+40h]
mov rsi, [rax+380h]
mov rdx, [rax+388h]
lea rcx, js_async_generator_function_proto_funcs
mov rdi, rbx
mov r8d, 1
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov rsi, [rax+380h]
mov rdx, [rax+388h]
mov rcx, [rax+390h]
mov r8, [rax+398h]
mov dword ptr [rsp+38h+var_38], ebp
mov rdi, rbx
mov r9d, 1
call JS_SetConstructor2
mov rax, [rbx+40h]
mov rcx, [rax+380h]
mov r8, [rax+388h]
mov dword ptr [rsp+38h+var_38], ebp
mov rdi, rbx
mov rsi, r14
mov rdx, r15
xor r9d, r9d
call JS_SetConstructor2
cmp r15d, 0FFFFFFF7h
jb short loc_1F0E3
mov rdi, [rbx+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_1F0E3
mov rsi, r14
mov rdx, r15
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
jmp js_free_value_rt
loc_1F0E3:
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long JS_AddIntrinsicPromise(long long *a1)
{
long long v2; // r14
_QWORD *v3; // rax
_QWORD *v4; // r14
long long v5; // rdx
_DWORD *v6; // rax
long long v7; // rdx
_DWORD *v8; // r14
long long v9; // r15
long long v10; // r14
long long v11; // rdx
_DWORD *v12; // r14
long long v13; // rdx
long long v14; // r15
long long v15; // rdi
int v16; // eax
long long v17; // rax
long long v18; // rdx
long long v19; // r14
long long v20; // rdx
long long v21; // r14
long long v22; // rdx
long long v23; // r14
long long v24; // rdx
_DWORD *v25; // r14
long long v26; // rdx
long long v27; // r15
long long result; // rax
long long v29; // rdi
v2 = a1[3];
if ( *(_DWORD *)(v2 + 120) < 0x32u || !*(_DWORD *)(*(_QWORD *)(v2 + 128) + 1960LL) )
{
init_class_range(a1[3], (long long)&js_async_class_def, 0x31u, 9);
v3 = *(_QWORD **)(v2 + 128);
v3[253] = js_promise_resolve_function_call;
v3[258] = js_promise_resolve_function_call;
v3[263] = js_async_function_call;
v3[268] = js_async_function_resolve_call;
v3[273] = js_async_function_resolve_call;
v3[283] = js_async_generator_function_call;
}
v4 = (_QWORD *)a1[8];
v4[98] = JS_NewObjectProtoClass(a1, v4[2], v4[3], 1LL);
v4[99] = v5;
JS_SetPropertyFunctionList(a1, *(_QWORD *)(a1[8] + 784), *(_QWORD *)(a1[8] + 792), &js_promise_proto_funcs, 4LL);
v6 = (_DWORD *)JS_NewCFunction3(
(_DWORD)a1,
(unsigned int)js_promise_constructor,
(unsigned int)"Promise",
1,
2,
0,
a1[9],
a1[10]);
v8 = v6;
v9 = v7;
if ( (unsigned int)v7 >= 0xFFFFFFF7 )
++*v6;
a1[17] = (long long)v6;
a1[18] = v7;
JS_SetPropertyFunctionList(a1, v6, v7, &js_promise_funcs, 9LL);
JS_NewGlobalCConstructor2(a1, v8, v9, "Promise", *(_QWORD *)(a1[8] + 784), *(_QWORD *)(a1[8] + 792));
v10 = a1[8];
*(_QWORD *)(v10 + 832) = JS_NewObjectProtoClass(a1, a1[9], a1[10], 1LL);
*(_QWORD *)(v10 + 840) = v11;
v12 = (_DWORD *)JS_NewCFunction3(
(_DWORD)a1,
(unsigned int)js_function_constructor,
(unsigned int)"AsyncFunction",
1,
5,
2,
a1[11],
a1[12]);
v14 = v13;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(a1[8] + 832),
*(_QWORD *)(a1[8] + 840),
&js_async_function_proto_funcs,
1LL);
JS_SetConstructor2(a1, v12, v14, *(_QWORD *)(a1[8] + 832), *(_QWORD *)(a1[8] + 840), 0LL, 1);
if ( (unsigned int)v14 >= 0xFFFFFFF7 )
{
v15 = a1[3];
v16 = (*v12)--;
if ( v16 <= 1 )
js_free_value_rt(v15, v12);
}
v17 = JS_NewObjectProtoClass(a1, *(_QWORD *)(a1[8] + 16), *(_QWORD *)(a1[8] + 24), 1LL);
a1[44] = v17;
a1[45] = v18;
JS_SetPropertyFunctionList(a1, v17, v18, &js_async_iterator_proto_funcs, 1LL);
v19 = a1[8];
*(_QWORD *)(v19 + 880) = JS_NewObjectProtoClass(a1, a1[44], a1[45], 1LL);
*(_QWORD *)(v19 + 888) = v20;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(a1[8] + 880),
*(_QWORD *)(a1[8] + 888),
&js_async_from_sync_iterator_proto_funcs,
3LL);
v21 = a1[8];
*(_QWORD *)(v21 + 912) = JS_NewObjectProtoClass(a1, a1[44], a1[45], 1LL);
*(_QWORD *)(v21 + 920) = v22;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(a1[8] + 912),
*(_QWORD *)(a1[8] + 920),
&js_async_generator_proto_funcs,
4LL);
v23 = a1[8];
*(_QWORD *)(v23 + 896) = JS_NewObjectProtoClass(a1, a1[9], a1[10], 1LL);
*(_QWORD *)(v23 + 904) = v24;
v25 = (_DWORD *)JS_NewCFunction3(
(_DWORD)a1,
(unsigned int)js_function_constructor,
(unsigned int)"AsyncGeneratorFunction",
1,
5,
3,
a1[11],
a1[12]);
v27 = v26;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(a1[8] + 896),
*(_QWORD *)(a1[8] + 904),
&js_async_generator_function_proto_funcs,
1LL);
JS_SetConstructor2(
a1,
*(_QWORD *)(a1[8] + 896),
*(_QWORD *)(a1[8] + 904),
*(_QWORD *)(a1[8] + 912),
*(_QWORD *)(a1[8] + 920),
1LL,
1);
result = JS_SetConstructor2(a1, v25, v27, *(_QWORD *)(a1[8] + 896), *(_QWORD *)(a1[8] + 904), 0LL, 1);
if ( (unsigned int)v27 >= 0xFFFFFFF7 )
{
v29 = a1[3];
result = (unsigned int)*v25;
*v25 = result - 1;
if ( (int)result <= 1 )
return js_free_value_rt(v29, v25);
}
return result;
}
|
JS_AddIntrinsicPromise:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x18]
CMP dword ptr [R14 + 0x78],0x32
JC 0x0011ece1
MOV RAX,qword ptr [R14 + 0x80]
CMP dword ptr [RAX + 0x7a8],0x0
JNZ 0x0011ed47
LAB_0011ece1:
LEA RSI,[0x1c8cf0]
MOV RDI,R14
MOV EDX,0x31
MOV ECX,0x9
CALL 0x0011caf4
MOV RAX,qword ptr [R14 + 0x80]
LEA RCX,[0x136a79]
MOV qword ptr [RAX + 0x7e8],RCX
MOV qword ptr [RAX + 0x810],RCX
LEA RCX,[0x110913]
MOV qword ptr [RAX + 0x838],RCX
LEA RCX,[0x136c7c]
MOV qword ptr [RAX + 0x860],RCX
MOV qword ptr [RAX + 0x888],RCX
LEA RCX,[0x110a6f]
MOV qword ptr [RAX + 0x8d8],RCX
LAB_0011ed47:
MOV R14,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x18]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00120a15
MOV qword ptr [R14 + 0x310],RAX
MOV qword ptr [R14 + 0x318],RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x310]
MOV RDX,qword ptr [RAX + 0x318]
LEA RCX,[0x1ca5b0]
MOV RDI,RBX
MOV R8D,0x4
CALL 0x0013302c
MOVUPS XMM0,xmmword ptr [RBX + 0x48]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x136d07]
LEA RDX,[0x1a06c8]
MOV RDI,RBX
MOV ECX,0x1
MOV R8D,0x2
XOR R9D,R9D
CALL 0x00120afb
MOV R14,RAX
MOV R15,RDX
CMP R15D,-0x9
JC 0x0011edd0
INC dword ptr [R14]
LAB_0011edd0:
MOV qword ptr [RBX + 0x88],R14
MOV qword ptr [RBX + 0x90],R15
LEA RCX,[0x1ca630]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV R8D,0x9
CALL 0x0013302c
MOV RAX,qword ptr [RBX + 0x40]
MOV R8,qword ptr [RAX + 0x310]
MOV R9,qword ptr [RAX + 0x318]
LEA RCX,[0x1a06c8]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x00136781
MOV R14,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RBX + 0x48]
MOV RDX,qword ptr [RBX + 0x50]
MOV EBP,0x1
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00120a15
MOV qword ptr [R14 + 0x340],RAX
MOV qword ptr [R14 + 0x348],RDX
MOVUPS XMM0,xmmword ptr [RBX + 0x58]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x136fe1]
LEA RDX,[0x1a06d0]
MOV RDI,RBX
MOV ECX,0x1
MOV R8D,0x5
MOV R9D,0x2
CALL 0x00120afb
MOV R14,RAX
MOV R15,RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x340]
MOV RDX,qword ptr [RAX + 0x348]
LEA RCX,[0x1ca750]
MOV RDI,RBX
MOV R8D,0x1
CALL 0x0013302c
MOV RAX,qword ptr [RBX + 0x40]
MOV RCX,qword ptr [RAX + 0x340]
MOV R8,qword ptr [RAX + 0x348]
MOV dword ptr [RSP],0x1
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
XOR R9D,R9D
CALL 0x001335b0
CMP R15D,-0x9
JC 0x0011eef5
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x0011eef5
MOV RSI,R14
MOV RDX,R15
CALL 0x00120d90
LAB_0011eef5:
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00120a15
MOV qword ptr [RBX + 0x160],RAX
MOV qword ptr [RBX + 0x168],RDX
LEA RCX,[0x1c8dd0]
MOV RDI,RBX
MOV RSI,RAX
MOV R8D,0x1
CALL 0x0013302c
MOV R14,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RBX + 0x160]
MOV RDX,qword ptr [RBX + 0x168]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00120a15
MOV qword ptr [R14 + 0x370],RAX
MOV qword ptr [R14 + 0x378],RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x370]
MOV RDX,qword ptr [RAX + 0x378]
LEA RCX,[0x1c8df0]
MOV RDI,RBX
MOV R8D,0x3
CALL 0x0013302c
MOV R14,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RBX + 0x160]
MOV RDX,qword ptr [RBX + 0x168]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00120a15
MOV qword ptr [R14 + 0x390],RAX
MOV qword ptr [R14 + 0x398],RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x390]
MOV RDX,qword ptr [RAX + 0x398]
LEA RCX,[0x1ca770]
MOV RDI,RBX
MOV R8D,0x4
CALL 0x0013302c
MOV R14,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RBX + 0x48]
MOV RDX,qword ptr [RBX + 0x50]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00120a15
MOV qword ptr [R14 + 0x380],RAX
MOV qword ptr [R14 + 0x388],RDX
MOVUPS XMM0,xmmword ptr [RBX + 0x58]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x136fe1]
LEA RDX,[0x1a06de]
MOV RDI,RBX
MOV ECX,0x1
MOV R8D,0x5
MOV R9D,0x3
CALL 0x00120afb
MOV R14,RAX
MOV R15,RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x380]
MOV RDX,qword ptr [RAX + 0x388]
LEA RCX,[0x1ca7f0]
MOV RDI,RBX
MOV R8D,0x1
CALL 0x0013302c
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x380]
MOV RDX,qword ptr [RAX + 0x388]
MOV RCX,qword ptr [RAX + 0x390]
MOV R8,qword ptr [RAX + 0x398]
MOV dword ptr [RSP],EBP
MOV RDI,RBX
MOV R9D,0x1
CALL 0x001335b0
MOV RAX,qword ptr [RBX + 0x40]
MOV RCX,qword ptr [RAX + 0x380]
MOV R8,qword ptr [RAX + 0x388]
MOV dword ptr [RSP],EBP
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
XOR R9D,R9D
CALL 0x001335b0
CMP R15D,-0x9
JC 0x0011f0e3
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x0011f0e3
MOV RSI,R14
MOV RDX,R15
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00120d90
LAB_0011f0e3:
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
|
void JS_AddIntrinsicPromise(long param_1)
{
int iVar1;
long lVar2;
int8 uVar3;
int *piVar4;
int1 auVar5 [16];
lVar2 = *(long *)(param_1 + 0x18);
if ((*(uint *)(lVar2 + 0x78) < 0x32) || (*(int *)(*(long *)(lVar2 + 0x80) + 0x7a8) == 0)) {
init_class_range(lVar2,js_async_class_def,0x31,9);
lVar2 = *(long *)(lVar2 + 0x80);
*(code **)(lVar2 + 0x7e8) = js_promise_resolve_function_call;
*(code **)(lVar2 + 0x810) = js_promise_resolve_function_call;
*(code **)(lVar2 + 0x838) = js_async_function_call;
*(code **)(lVar2 + 0x860) = js_async_function_resolve_call;
*(code **)(lVar2 + 0x888) = js_async_function_resolve_call;
*(code **)(lVar2 + 0x8d8) = js_async_generator_function_call;
}
lVar2 = *(long *)(param_1 + 0x40);
auVar5 = JS_NewObjectProtoClass
(param_1,*(int8 *)(lVar2 + 0x10),*(int8 *)(lVar2 + 0x18),1);
*(int1 (*) [16])(lVar2 + 0x310) = auVar5;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x310),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x318),js_promise_proto_funcs,4);
auVar5 = JS_NewCFunction3(param_1,js_promise_constructor,"Promise",1,2,0,
*(int4 *)(param_1 + 0x48),*(int4 *)(param_1 + 0x50));
piVar4 = auVar5._0_8_;
if (0xfffffff6 < auVar5._8_4_) {
*piVar4 = *piVar4 + 1;
}
*(int1 (*) [16])(param_1 + 0x88) = auVar5;
JS_SetPropertyFunctionList(param_1,piVar4,auVar5._8_8_,js_promise_funcs,9);
JS_NewGlobalCConstructor2
(param_1,piVar4,auVar5._8_8_,"Promise",
*(int8 *)(*(long *)(param_1 + 0x40) + 0x310),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x318));
lVar2 = *(long *)(param_1 + 0x40);
auVar5 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),1);
*(int1 (*) [16])(lVar2 + 0x340) = auVar5;
auVar5 = JS_NewCFunction3(param_1,js_function_constructor,"AsyncFunction",1,5,2,
*(int4 *)(param_1 + 0x58),*(int4 *)(param_1 + 0x60));
piVar4 = auVar5._0_8_;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x340),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x348),js_async_function_proto_funcs,1);
JS_SetConstructor2(param_1,piVar4,auVar5._8_8_,*(int8 *)(*(long *)(param_1 + 0x40) + 0x340),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x348),0,1);
if (0xfffffff6 < auVar5._8_4_) {
uVar3 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar4;
*piVar4 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar3,piVar4,auVar5._8_8_);
}
}
auVar5 = JS_NewObjectProtoClass
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x18),1);
*(int1 (*) [16])(param_1 + 0x160) = auVar5;
JS_SetPropertyFunctionList(param_1,auVar5._0_8_,auVar5._8_8_,js_async_iterator_proto_funcs,1);
lVar2 = *(long *)(param_1 + 0x40);
auVar5 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x160),*(int8 *)(param_1 + 0x168),1);
*(int1 (*) [16])(lVar2 + 0x370) = auVar5;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x370),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x378),
js_async_from_sync_iterator_proto_funcs,3);
lVar2 = *(long *)(param_1 + 0x40);
auVar5 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x160),*(int8 *)(param_1 + 0x168),1);
*(int1 (*) [16])(lVar2 + 0x390) = auVar5;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x390),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x398),js_async_generator_proto_funcs,4);
lVar2 = *(long *)(param_1 + 0x40);
auVar5 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),1);
*(int1 (*) [16])(lVar2 + 0x380) = auVar5;
auVar5 = JS_NewCFunction3(param_1,js_function_constructor,"AsyncGeneratorFunction",1,5,3,
*(int4 *)(param_1 + 0x58),*(int4 *)(param_1 + 0x60));
piVar4 = auVar5._0_8_;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x380),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x388),
js_async_generator_function_proto_funcs,1);
lVar2 = *(long *)(param_1 + 0x40);
JS_SetConstructor2(param_1,*(int8 *)(lVar2 + 0x380),*(int8 *)(lVar2 + 0x388),
*(int8 *)(lVar2 + 0x390),*(int8 *)(lVar2 + 0x398),1,1);
JS_SetConstructor2(param_1,piVar4,auVar5._8_8_,*(int8 *)(*(long *)(param_1 + 0x40) + 0x380),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x388),0,1);
if (0xfffffff6 < auVar5._8_4_) {
uVar3 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar4;
*piVar4 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar3,piVar4,auVar5._8_8_);
return;
}
}
return;
}
|
|
60,559
|
bf_print_str
|
bluesky950520[P]quickjs/libbf.c
|
void bf_print_str(const char *str, const bf_t *a)
{
slimb_t i;
printf("%s=", str);
if (a->expn == BF_EXP_NAN) {
printf("NaN");
} else {
if (a->sign)
putchar('-');
if (a->expn == BF_EXP_ZERO) {
putchar('0');
} else if (a->expn == BF_EXP_INF) {
printf("Inf");
} else {
printf("0x0.");
for(i = a->len - 1; i >= 0; i--)
printf(FMT_LIMB, a->tab[i]);
printf("p%" PRId_LIMB, a->expn);
}
}
printf("\n");
}
|
O1
|
c
|
bf_print_str:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x1d2e9(%rip), %rdi # 0xa1a3e
xorl %eax, %eax
callq 0xe280
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, 0x10(%rbx)
jne 0x84775
leaq 0x1a7ec(%rip), %rdi # 0x9ef5f
jmp 0x847b0
cmpl $0x0, 0x8(%rbx)
je 0x84785
movl $0x2d, %edi
callq 0xe080
movq 0x10(%rbx), %rax
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rcx, %rax
je 0x847a9
negq %rax
jno 0x847c6
movl $0x30, %edi
callq 0xe080
jmp 0x847b7
leaq 0x1d292(%rip), %rdi # 0xa1a42
xorl %eax, %eax
callq 0xe280
movl $0xa, %edi
popq %rbx
popq %r14
popq %r15
jmp 0xe080
leaq 0x1d279(%rip), %rdi # 0xa1a46
xorl %eax, %eax
callq 0xe280
movq 0x18(%rbx), %r15
movq %r15, %rax
decq %rax
js 0x84802
leaq 0x1d250(%rip), %r14 # 0xa1a37
movq 0x20(%rbx), %rax
movq -0x8(%rax,%r15,8), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0xe280
decq %r15
testq %r15, %r15
jg 0x847e7
movq 0x10(%rbx), %rsi
leaq 0x1d23e(%rip), %rdi # 0xa1a4b
xorl %eax, %eax
callq 0xe280
jmp 0x847b7
|
bf_print_str:
push r15
push r14
push rbx
mov rbx, rsi
mov rsi, rdi
lea rdi, aS_2; "%s="
xor eax, eax
call _printf
mov rax, 7FFFFFFFFFFFFFFFh
cmp [rbx+10h], rax
jnz short loc_84775
lea rdi, aDateValueIsNan+0Eh; "NaN"
jmp short loc_847B0
loc_84775:
cmp dword ptr [rbx+8], 0
jz short loc_84785
mov edi, 2Dh ; '-'
call _putchar
loc_84785:
mov rax, [rbx+10h]
mov rcx, 7FFFFFFFFFFFFFFEh
cmp rax, rcx
jz short loc_847A9
neg rax
jno short loc_847C6
mov edi, 30h ; '0'
call _putchar
jmp short loc_847B7
loc_847A9:
lea rdi, aInf; "Inf"
loc_847B0:
xor eax, eax
call _printf
loc_847B7:
mov edi, 0Ah
pop rbx
pop r14
pop r15
jmp _putchar
loc_847C6:
lea rdi, a0x0; "0x0."
xor eax, eax
call _printf
mov r15, [rbx+18h]
mov rax, r15
dec rax
js short loc_84802
lea r14, a016lx; "%016lx"
loc_847E7:
mov rax, [rbx+20h]
mov rsi, [rax+r15*8-8]
mov rdi, r14
xor eax, eax
call _printf
dec r15
test r15, r15
jg short loc_847E7
loc_84802:
mov rsi, [rbx+10h]
lea rdi, aPLd; "p%ld"
xor eax, eax
call _printf
jmp short loc_847B7
|
long long bf_print_str(const char *a1, long long a2)
{
long long v2; // rax
long long v4; // r15
printf("%s=", a1);
if ( *(_QWORD *)(a2 + 16) == 0x7FFFFFFFFFFFFFFFLL )
{
printf("NaN");
}
else
{
if ( *(_DWORD *)(a2 + 8) )
putchar(45LL);
v2 = *(_QWORD *)(a2 + 16);
if ( v2 == 0x7FFFFFFFFFFFFFFELL )
{
printf("Inf");
}
else if ( __OFSUB__(-v2, 1LL) )
{
putchar(48LL);
}
else
{
printf("0x0.");
v4 = *(_QWORD *)(a2 + 24);
if ( v4 - 1 >= 0 )
{
do
printf("%016lx", *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8 * v4-- - 8));
while ( v4 > 0 );
}
printf("p%ld", *(_QWORD *)(a2 + 16));
}
}
return putchar(10LL);
}
|
bf_print_str:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV RSI,RDI
LEA RDI,[0x1a1a3e]
XOR EAX,EAX
CALL 0x0010e280
MOV RAX,0x7fffffffffffffff
CMP qword ptr [RBX + 0x10],RAX
JNZ 0x00184775
LEA RDI,[0x19ef5f]
JMP 0x001847b0
LAB_00184775:
CMP dword ptr [RBX + 0x8],0x0
JZ 0x00184785
MOV EDI,0x2d
CALL 0x0010e080
LAB_00184785:
MOV RAX,qword ptr [RBX + 0x10]
MOV RCX,0x7ffffffffffffffe
CMP RAX,RCX
JZ 0x001847a9
NEG RAX
JNO 0x001847c6
MOV EDI,0x30
CALL 0x0010e080
JMP 0x001847b7
LAB_001847a9:
LEA RDI,[0x1a1a42]
LAB_001847b0:
XOR EAX,EAX
CALL 0x0010e280
LAB_001847b7:
MOV EDI,0xa
POP RBX
POP R14
POP R15
JMP 0x0010e080
LAB_001847c6:
LEA RDI,[0x1a1a46]
XOR EAX,EAX
CALL 0x0010e280
MOV R15,qword ptr [RBX + 0x18]
MOV RAX,R15
DEC RAX
JS 0x00184802
LEA R14,[0x1a1a37]
LAB_001847e7:
MOV RAX,qword ptr [RBX + 0x20]
MOV RSI,qword ptr [RAX + R15*0x8 + -0x8]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0010e280
DEC R15
TEST R15,R15
JG 0x001847e7
LAB_00184802:
MOV RSI,qword ptr [RBX + 0x10]
LEA RDI,[0x1a1a4b]
XOR EAX,EAX
CALL 0x0010e280
JMP 0x001847b7
|
/* WARNING: Removing unreachable block (ram,0x0018479d) */
void bf_print_str(int8 param_1,long param_2)
{
char *__format;
long lVar1;
printf("%s=",param_1);
if (*(long *)(param_2 + 0x10) == 0x7fffffffffffffff) {
__format = "NaN";
}
else {
if (*(int *)(param_2 + 8) != 0) {
putchar(0x2d);
}
if (*(long *)(param_2 + 0x10) != 0x7ffffffffffffffe) {
printf("0x0.");
lVar1 = *(long *)(param_2 + 0x18);
if (-1 < lVar1 + -1) {
do {
printf("%016lx",*(int8 *)(*(long *)(param_2 + 0x20) + -8 + lVar1 * 8));
lVar1 = lVar1 + -1;
} while (0 < lVar1);
}
printf("p%ld",*(int8 *)(param_2 + 0x10));
goto LAB_001847b7;
}
__format = "Inf";
}
printf(__format);
LAB_001847b7:
putchar(10);
return;
}
|
|
60,560
|
bf_print_str
|
bluesky950520[P]quickjs/libbf.c
|
void bf_print_str(const char *str, const bf_t *a)
{
slimb_t i;
printf("%s=", str);
if (a->expn == BF_EXP_NAN) {
printf("NaN");
} else {
if (a->sign)
putchar('-');
if (a->expn == BF_EXP_ZERO) {
putchar('0');
} else if (a->expn == BF_EXP_INF) {
printf("Inf");
} else {
printf("0x0.");
for(i = a->len - 1; i >= 0; i--)
printf(FMT_LIMB, a->tab[i]);
printf("p%" PRId_LIMB, a->expn);
}
}
printf("\n");
}
|
O3
|
c
|
bf_print_str:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x1d88b(%rip), %rdi # 0xa49ee
xorl %eax, %eax
callq 0xe280
movq 0x10(%rbx), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, %rax
jne 0x87186
leaq 0x1ad95(%rip), %rdi # 0xa1f19
jmp 0x871c1
cmpl $0x0, 0x8(%rbx)
je 0x8719a
movl $0x2d, %edi
callq 0xe080
movq 0x10(%rbx), %rax
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rcx, %rax
je 0x871ba
negq %rax
jno 0x871d7
movl $0x30, %edi
callq 0xe080
jmp 0x871c8
leaq 0x1d831(%rip), %rdi # 0xa49f2
xorl %eax, %eax
callq 0xe280
movl $0xa, %edi
popq %rbx
popq %r14
popq %r15
jmp 0xe080
leaq 0x1d818(%rip), %rdi # 0xa49f6
xorl %eax, %eax
callq 0xe280
movq 0x18(%rbx), %r15
movq %r15, %rax
decq %rax
js 0x87210
leaq 0x1d7ef(%rip), %r14 # 0xa49e7
movq 0x20(%rbx), %rax
movq -0x8(%rax,%r15,8), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0xe280
decq %r15
jne 0x871f8
movq 0x10(%rbx), %rsi
leaq 0x1d7e0(%rip), %rdi # 0xa49fb
xorl %eax, %eax
callq 0xe280
jmp 0x871c8
|
bf_print_str:
push r15
push r14
push rbx
mov rbx, rsi
mov rsi, rdi
lea rdi, aS_2; "%s="
xor eax, eax
call _printf
mov rax, [rbx+10h]
mov rcx, 7FFFFFFFFFFFFFFFh
cmp rax, rcx
jnz short loc_87186
lea rdi, aDateValueIsNan+0Eh; "NaN"
jmp short loc_871C1
loc_87186:
cmp dword ptr [rbx+8], 0
jz short loc_8719A
mov edi, 2Dh ; '-'
call _putchar
mov rax, [rbx+10h]
loc_8719A:
mov rcx, 7FFFFFFFFFFFFFFEh
cmp rax, rcx
jz short loc_871BA
neg rax
jno short loc_871D7
mov edi, 30h ; '0'
call _putchar
jmp short loc_871C8
loc_871BA:
lea rdi, aInf; "Inf"
loc_871C1:
xor eax, eax
call _printf
loc_871C8:
mov edi, 0Ah
pop rbx
pop r14
pop r15
jmp _putchar
loc_871D7:
lea rdi, a0x0; "0x0."
xor eax, eax
call _printf
mov r15, [rbx+18h]
mov rax, r15
dec rax
js short loc_87210
lea r14, a016lx; "%016lx"
loc_871F8:
mov rax, [rbx+20h]
mov rsi, [rax+r15*8-8]
mov rdi, r14
xor eax, eax
call _printf
dec r15
jnz short loc_871F8
loc_87210:
mov rsi, [rbx+10h]
lea rdi, aPLd; "p%ld"
xor eax, eax
call _printf
jmp short loc_871C8
|
long long bf_print_str(const char *a1, long long a2)
{
long long v2; // rax
long long v4; // r15
printf("%s=", a1);
v2 = *(_QWORD *)(a2 + 16);
if ( v2 == 0x7FFFFFFFFFFFFFFFLL )
{
printf("NaN");
}
else
{
if ( *(_DWORD *)(a2 + 8) )
{
putchar(45LL);
v2 = *(_QWORD *)(a2 + 16);
}
if ( v2 == 0x7FFFFFFFFFFFFFFELL )
{
printf("Inf");
}
else if ( __OFSUB__(-v2, 1LL) )
{
putchar(48LL);
}
else
{
printf("0x0.");
v4 = *(_QWORD *)(a2 + 24);
if ( v4 - 1 >= 0 )
{
do
printf("%016lx", *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8 * v4-- - 8));
while ( v4 );
}
printf("p%ld", *(_QWORD *)(a2 + 16));
}
}
return putchar(10LL);
}
|
bf_print_str:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV RSI,RDI
LEA RDI,[0x1a49ee]
XOR EAX,EAX
CALL 0x0010e280
MOV RAX,qword ptr [RBX + 0x10]
MOV RCX,0x7fffffffffffffff
CMP RAX,RCX
JNZ 0x00187186
LEA RDI,[0x1a1f19]
JMP 0x001871c1
LAB_00187186:
CMP dword ptr [RBX + 0x8],0x0
JZ 0x0018719a
MOV EDI,0x2d
CALL 0x0010e080
MOV RAX,qword ptr [RBX + 0x10]
LAB_0018719a:
MOV RCX,0x7ffffffffffffffe
CMP RAX,RCX
JZ 0x001871ba
NEG RAX
JNO 0x001871d7
MOV EDI,0x30
CALL 0x0010e080
JMP 0x001871c8
LAB_001871ba:
LEA RDI,[0x1a49f2]
LAB_001871c1:
XOR EAX,EAX
CALL 0x0010e280
LAB_001871c8:
MOV EDI,0xa
POP RBX
POP R14
POP R15
JMP 0x0010e080
LAB_001871d7:
LEA RDI,[0x1a49f6]
XOR EAX,EAX
CALL 0x0010e280
MOV R15,qword ptr [RBX + 0x18]
MOV RAX,R15
DEC RAX
JS 0x00187210
LEA R14,[0x1a49e7]
LAB_001871f8:
MOV RAX,qword ptr [RBX + 0x20]
MOV RSI,qword ptr [RAX + R15*0x8 + -0x8]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0010e280
DEC R15
JNZ 0x001871f8
LAB_00187210:
MOV RSI,qword ptr [RBX + 0x10]
LEA RDI,[0x1a49fb]
XOR EAX,EAX
CALL 0x0010e280
JMP 0x001871c8
|
/* WARNING: Removing unreachable block (ram,0x001871ae) */
void bf_print_str(int8 param_1,long param_2)
{
char *__format;
long lVar1;
printf("%s=",param_1);
lVar1 = *(long *)(param_2 + 0x10);
if (lVar1 == 0x7fffffffffffffff) {
__format = "NaN";
}
else {
if (*(int *)(param_2 + 8) != 0) {
putchar(0x2d);
lVar1 = *(long *)(param_2 + 0x10);
}
if (lVar1 != 0x7ffffffffffffffe) {
printf("0x0.");
lVar1 = *(long *)(param_2 + 0x18);
if (-1 < lVar1 + -1) {
do {
printf("%016lx",*(int8 *)(*(long *)(param_2 + 0x20) + -8 + lVar1 * 8));
lVar1 = lVar1 + -1;
} while (lVar1 != 0);
}
printf("p%ld",*(int8 *)(param_2 + 0x10));
goto LAB_001871c8;
}
__format = "Inf";
}
printf(__format);
LAB_001871c8:
putchar(10);
return;
}
|
|
60,561
|
MyCTX_gcm::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int)
|
eloqsql/mysys_ssl/my_crypt.cc
|
int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen,
const uchar *iv, uint ivlen)
{
compile_time_assert(MY_AES_CTX_SIZE >= sizeof(MyCTX_gcm));
int res= MyCTX::init(cipher, encrypt, key, klen, iv, ivlen);
int real_ivlen= EVP_CIPHER_CTX_iv_length(ctx);
aad= iv + real_ivlen;
aadlen= ivlen - real_ivlen;
return res;
}
|
O3
|
cpp
|
MyCTX_gcm::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %rdi, %rbx
movl 0x10(%rbp), %r12d
testq %rsi, %rsi
je 0x2ff15
movl %edx, %r9d
movq 0xc8(%rbx), %rdi
xorl %r13d, %r13d
xorl %edx, %edx
movq %r14, %r8
callq 0x29710
cmpl $0x1, %eax
pushq $-0x65
popq %r15
cmovel %r13d, %r15d
movq 0xc8(%rbx), %rdi
callq 0x29390
cltq
addq %rax, %r14
movq %r14, 0xd0(%rbx)
subl %eax, %r12d
movl %r12d, 0xd8(%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x66
popq %r15
jmp 0x2fee1
nop
|
_ZN9MyCTX_gcm4initEPK13evp_cipher_stiPKhjS4_j:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r9
mov rbx, rdi
mov r12d, [rbp+arg_0]
test rsi, rsi
jz short loc_2FF15
mov r9d, edx
mov rdi, [rbx+0C8h]
xor r13d, r13d
xor edx, edx
mov r8, r14
call _EVP_CipherInit_ex
cmp eax, 1
push 0FFFFFFFFFFFFFF9Bh
pop r15
cmovz r15d, r13d
loc_2FEE1:
mov rdi, [rbx+0C8h]
call _EVP_CIPHER_CTX_get_iv_length
cdqe
add r14, rax
mov [rbx+0D0h], r14
sub r12d, eax
mov [rbx+0D8h], r12d
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2FF15:
push 0FFFFFFFFFFFFFF9Ah
pop r15
jmp short loc_2FEE1
|
long long MyCTX_gcm::init(long long a1, long long a2, unsigned int a3, long long a4, long long a5, long long a6, int a7)
{
long long v7; // rax
unsigned int v9; // r15d
int iv_length; // eax
if ( a2 )
{
v9 = -101;
if ( (unsigned int)EVP_CipherInit_ex(*(_QWORD *)(a1 + 200), a2, 0LL, a4, a6, a3, v7) == 1 )
v9 = 0;
}
else
{
v9 = -102;
}
iv_length = EVP_CIPHER_CTX_get_iv_length(*(_QWORD *)(a1 + 200));
*(_QWORD *)(a1 + 208) = iv_length + a6;
*(_DWORD *)(a1 + 216) = a7 - iv_length;
return v9;
}
|
init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R9
MOV RBX,RDI
MOV R12D,dword ptr [RBP + 0x10]
TEST RSI,RSI
JZ 0x0012ff15
MOV R9D,EDX
MOV RDI,qword ptr [RBX + 0xc8]
XOR R13D,R13D
XOR EDX,EDX
MOV R8,R14
CALL 0x00129710
CMP EAX,0x1
PUSH -0x65
POP R15
CMOVZ R15D,R13D
LAB_0012fee1:
MOV RDI,qword ptr [RBX + 0xc8]
CALL 0x00129390
CDQE
ADD R14,RAX
MOV qword ptr [RBX + 0xd0],R14
SUB R12D,EAX
MOV dword ptr [RBX + 0xd8],R12D
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012ff15:
PUSH -0x66
POP R15
JMP 0x0012fee1
|
/* MyCTX_gcm::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char
const*, unsigned int) */
int4 __thiscall
MyCTX_gcm::init(MyCTX_gcm *this,evp_cipher_st *param_1,int param_2,uchar *param_3,uint param_4,
uchar *param_5,uint param_6)
{
int iVar1;
int4 uVar2;
if (param_1 == (evp_cipher_st *)0x0) {
uVar2 = 0xffffff9a;
}
else {
iVar1 = EVP_CipherInit_ex(*(EVP_CIPHER_CTX **)(this + 200),param_1,(ENGINE *)0x0,param_3,param_5
,param_2);
uVar2 = 0xffffff9b;
if (iVar1 == 1) {
uVar2 = 0;
}
}
iVar1 = EVP_CIPHER_CTX_get_iv_length(*(int8 *)(this + 200));
*(uchar **)(this + 0xd0) = param_5 + iVar1;
*(uint *)(this + 0xd8) = param_6 - iVar1;
return uVar2;
}
|
|
60,562
|
testing::MatcherDescriberInterface const* testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::GetDescriberImpl<testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>>(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&)
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/include/gtest/gtest-matchers.h
|
static const MatcherDescriberInterface* GetDescriberImpl(
const MatcherBase& m) {
// If the impl is a MatcherDescriberInterface, then return it.
// Otherwise use MatcherBase itself.
// This allows us to implement the GetDescriber() function without support
// from the impl, but some users really want to get their impl back when
// they call GetDescriber().
// We use std::get on a tuple as a workaround of not having `if constexpr`.
return std::get<(
std::is_convertible<decltype(&P::Get(m)),
const MatcherDescriberInterface*>::value
? 1
: 0)>(std::make_tuple(&m, &P::Get(m)));
}
|
O1
|
c
|
testing::MatcherDescriberInterface const* testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::GetDescriberImpl<testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>>(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&):
movq %rdi, %rax
retq
|
_ZN7testing8internal11MatcherBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE16GetDescriberImplINS8_11ValuePolicyINS0_9EqMatcherIS7_EELb0EEEEEPKNS_25MatcherDescriberInterfaceERKS8_:
mov rax, rdi
retn
|
long long testing::internal::MatcherBase<std::string>::GetDescriberImpl<testing::internal::MatcherBase<std::string>::ValuePolicy<testing::internal::EqMatcher<std::string>,false>>(
long long a1)
{
return a1;
}
|
GetDescriberImpl<testing::internal::MatcherBase<std::__cxx11::string>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string>,false>>:
MOV RAX,RDI
RET
|
/* testing::MatcherDescriberInterface const* testing::internal::MatcherBase<std::__cxx11::string
>::GetDescriberImpl<testing::internal::MatcherBase<std::__cxx11::string
>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string >, false>
>(testing::internal::MatcherBase<std::__cxx11::string > const&) */
MatcherDescriberInterface *
testing::internal::MatcherBase<std::__cxx11::string>::
GetDescriberImpl<testing::internal::MatcherBase<std::__cxx11::string>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string>,false>>
(MatcherBase *param_1)
{
return (MatcherDescriberInterface *)param_1;
}
|
|
60,563
|
nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int)
|
ng-log[P]ng-log/src/signalhandler.cc
|
void AppendUint64(uint64 number, unsigned radix) {
unsigned i = 0;
while (cursor_ + i < end_) {
const uint64 tmp = number % radix;
number /= radix;
cursor_[i] = static_cast<char>(tmp < 10 ? '0' + tmp : 'a' + tmp - 10);
++i;
if (number == 0) {
break;
}
}
// Reverse the bytes written.
std::reverse(cursor_, cursor_ + i);
cursor_ += i;
}
|
O1
|
cpp
|
nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int):
movl %edx, %r8d
xorl %ecx, %ecx
movl %ecx, %r9d
addq 0x8(%rdi), %r9
cmpq 0x10(%rdi), %r9
jae 0x2031e
movq %rsi, %rax
xorl %edx, %edx
divq %r8
leal 0x57(%rdx), %r10d
movl %edx, %r11d
orb $0x30, %r11b
cmpq $0xa, %rdx
movzbl %r11b, %edx
movzbl %r10b, %r10d
cmovbl %edx, %r10d
movb %r10b, (%r9)
incl %ecx
cmpq %r8, %rsi
movq %rax, %rsi
jae 0x202e1
movq 0x8(%rdi), %rdx
movl %ecx, %eax
testl %ecx, %ecx
setne %sil
leaq (%rdx,%rax), %rcx
decq %rcx
cmpq %rdx, %rcx
seta %r8b
andb %sil, %r8b
cmpb $0x1, %r8b
jne 0x20361
incq %rdx
movb -0x1(%rdx), %sil
movb (%rcx), %r8b
movb %r8b, -0x1(%rdx)
movb %sil, (%rcx)
decq %rcx
leaq 0x1(%rdx), %rsi
cmpq %rcx, %rdx
movq %rsi, %rdx
jb 0x20344
addq %rax, 0x8(%rdi)
retq
|
_ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj:
mov r8d, edx
xor ecx, ecx
loc_202E1:
mov r9d, ecx
add r9, [rdi+8]
cmp r9, [rdi+10h]
jnb short loc_2031E
mov rax, rsi
xor edx, edx
div r8
lea r10d, [rdx+57h]
mov r11d, edx
or r11b, 30h
cmp rdx, 0Ah
movzx edx, r11b
movzx r10d, r10b
cmovb r10d, edx
mov [r9], r10b
inc ecx
cmp rsi, r8
mov rsi, rax
jnb short loc_202E1
loc_2031E:
mov rdx, [rdi+8]
mov eax, ecx
test ecx, ecx
setnz sil
lea rcx, [rdx+rax]
dec rcx
cmp rcx, rdx
setnbe r8b
and r8b, sil
cmp r8b, 1
jnz short loc_20361
inc rdx
loc_20344:
mov sil, [rdx-1]
mov r8b, [rcx]
mov [rdx-1], r8b
mov [rcx], sil
dec rcx
lea rsi, [rdx+1]
cmp rdx, rcx
mov rdx, rsi
jb short loc_20344
loc_20361:
add [rdi+8], rax
retn
|
long long nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(
nglog::_anonymous_namespace_::MinimalFormatter *this,
unsigned long long a2,
unsigned int a3)
{
unsigned int v3; // ecx
_BYTE *v4; // r9
char v5; // r10
bool v6; // cf
unsigned long long v7; // rdx
long long result; // rax
bool v9; // si
_BYTE *v10; // rcx
unsigned long long v11; // rdx
char v12; // si
v3 = 0;
do
{
v4 = (_BYTE *)(*((_QWORD *)this + 1) + v3);
if ( (unsigned long long)v4 >= *((_QWORD *)this + 2) )
break;
v5 = a2 % a3 + 87;
if ( a2 % a3 < 0xA )
v5 = (a2 % a3) | 0x30;
*v4 = v5;
++v3;
v6 = a2 < a3;
a2 /= a3;
}
while ( !v6 );
v7 = *((_QWORD *)this + 1);
result = v3;
v9 = v3 != 0;
v10 = (_BYTE *)(v7 + v3 - 1);
if ( v9 && (unsigned long long)v10 > v7 )
{
v11 = v7 + 1;
do
{
v12 = *(_BYTE *)(v11 - 1);
*(_BYTE *)(v11 - 1) = *v10;
*v10-- = v12;
v6 = v11++ < (unsigned long long)v10;
}
while ( v6 );
}
*((_QWORD *)this + 1) += result;
return result;
}
|
AppendUint64:
MOV R8D,EDX
XOR ECX,ECX
LAB_001202e1:
MOV R9D,ECX
ADD R9,qword ptr [RDI + 0x8]
CMP R9,qword ptr [RDI + 0x10]
JNC 0x0012031e
MOV RAX,RSI
XOR EDX,EDX
DIV R8
LEA R10D,[RDX + 0x57]
MOV R11D,EDX
OR R11B,0x30
CMP RDX,0xa
MOVZX EDX,R11B
MOVZX R10D,R10B
CMOVC R10D,EDX
MOV byte ptr [R9],R10B
INC ECX
CMP RSI,R8
MOV RSI,RAX
JNC 0x001202e1
LAB_0012031e:
MOV RDX,qword ptr [RDI + 0x8]
MOV EAX,ECX
TEST ECX,ECX
SETNZ SIL
LEA RCX,[RDX + RAX*0x1]
DEC RCX
CMP RCX,RDX
SETA R8B
AND R8B,SIL
CMP R8B,0x1
JNZ 0x00120361
INC RDX
LAB_00120344:
MOV SIL,byte ptr [RDX + -0x1]
MOV R8B,byte ptr [RCX]
MOV byte ptr [RDX + -0x1],R8B
MOV byte ptr [RCX],SIL
DEC RCX
LEA RSI,[RDX + 0x1]
CMP RDX,RCX
MOV RDX,RSI
JC 0x00120344
LAB_00120361:
ADD qword ptr [RDI + 0x8],RAX
RET
|
/* nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int) */
void __thiscall
nglog::(anonymous_namespace)::MinimalFormatter::AppendUint64
(MinimalFormatter *this,ulong param_1,uint param_2)
{
int1 uVar1;
int1 *puVar2;
int1 auVar3 [16];
int1 auVar4 [16];
byte bVar5;
uint uVar6;
int1 *puVar7;
int1 *puVar8;
ulong uVar9;
byte bVar10;
bool bVar11;
uVar9 = CONCAT44(0,param_2);
uVar6 = 0;
do {
if (*(byte **)(this + 0x10) <= (byte *)((ulong)uVar6 + *(long *)(this + 8))) break;
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar9;
auVar4._8_8_ = 0;
auVar4._0_8_ = param_1;
bVar5 = SUB161(auVar4 % auVar3,0);
bVar10 = bVar5 + 0x57;
if (SUB168(auVar4 % auVar3,0) < 10) {
bVar10 = bVar5 | 0x30;
}
*(byte *)((ulong)uVar6 + *(long *)(this + 8)) = bVar10;
uVar6 = uVar6 + 1;
bVar11 = uVar9 <= param_1;
param_1 = param_1 / uVar9;
} while (bVar11);
puVar2 = *(int1 **)(this + 8);
puVar7 = puVar2 + ((ulong)uVar6 - 1);
if (puVar2 < puVar7 && uVar6 != 0) {
do {
puVar8 = puVar2 + 1;
uVar1 = *puVar2;
*puVar2 = *puVar7;
*puVar7 = uVar1;
puVar7 = puVar7 + -1;
puVar2 = puVar8;
} while (puVar8 < puVar7);
}
*(ulong *)(this + 8) = *(long *)(this + 8) + (ulong)uVar6;
return;
}
|
|
60,564
|
testing::internal::StreamingListener::OnTestIterationStart(testing::UnitTest const&, int)
|
giladroyz[P]FindPeaks/build_O2/_deps/googletest-src/googletest/src/gtest-internal-inl.h
|
void OnTestIterationStart(const UnitTest& /* unit_test */,
int iteration) override {
SendLn("event=TestIterationStart&iteration=" +
StreamableToString(iteration));
}
|
O2
|
c
|
testing::internal::StreamingListener::OnTestIterationStart(testing::UnitTest const&, int):
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
movl %edx, (%rsi)
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x24526
leaq 0xb884(%rip), %rsi # 0x354a5
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x24719
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x2a5ec
leaq 0x8(%rsp), %rdi
callq 0x8ad8
leaq 0x28(%rsp), %rdi
callq 0x8ad8
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8ad8
jmp 0x29c69
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x8ad8
movq %rbx, %rdi
callq 0x89a0
nop
|
_ZN7testing8internal17StreamingListener20OnTestIterationStartERKNS_8UnitTestEi:
push r14
push rbx
sub rsp, 48h
mov rbx, rdi
lea rsi, [rsp+58h+var_54]
mov [rsi], edx
lea r14, [rsp+58h+var_30]
mov rdi, r14
call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&)
lea rsi, aEventTestitera; "event=TestIterationStart&iteration="
lea rdi, [rsp+58h+var_50]
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rsi, [rsp+58h+var_50]
mov rdi, rbx
call _ZN7testing8internal17StreamingListener6SendLnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::StreamingListener::SendLn(std::string const&)
lea rdi, [rsp+58h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+58h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 48h
pop rbx
pop r14
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_29C69
mov rbx, rax
loc_29C69:
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
void testing::internal::StreamingListener::OnTestIterationStart(
testing::internal::StreamingListener *this,
const testing::UnitTest *a2,
int a3)
{
int v3; // [rsp+4h] [rbp-54h] BYREF
_BYTE v4[32]; // [rsp+8h] [rbp-50h] BYREF
_BYTE v5[48]; // [rsp+28h] [rbp-30h] BYREF
v3 = a3;
testing::internal::StreamableToString<int>((long long)v5, (long long)&v3);
std::operator+<char>((long long)v4, (long long)"event=TestIterationStart&iteration=", (long long)v5);
testing::internal::StreamingListener::SendLn(this, v4);
std::string::~string(v4);
std::string::~string(v5);
}
|
OnTestIterationStart:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
LEA RSI,[RSP + 0x4]
MOV dword ptr [RSI],EDX
LEA R14,[RSP + 0x28]
MOV RDI,R14
CALL 0x00124526
LAB_00129c1a:
LEA RSI,[0x1354a5]
LEA RDI,[RSP + 0x8]
MOV RDX,R14
CALL 0x00124719
LAB_00129c2e:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0012a5ec
LAB_00129c3b:
LEA RDI,[RSP + 0x8]
CALL 0x00108ad8
LEA RDI,[RSP + 0x28]
CALL 0x00108ad8
ADD RSP,0x48
POP RBX
POP R14
RET
|
/* testing::internal::StreamingListener::OnTestIterationStart(testing::UnitTest const&, int) */
void __thiscall
testing::internal::StreamingListener::OnTestIterationStart
(StreamingListener *this,UnitTest *param_1,int param_2)
{
int local_54;
string local_50 [32];
internal local_30 [32];
local_54 = param_2;
StreamableToString<int>(local_30,&local_54);
/* try { // try from 00129c1a to 00129c2d has its CatchHandler @ 00129c66 */
std::operator+((char *)local_50,(string *)"event=TestIterationStart&iteration=");
/* try { // try from 00129c2e to 00129c3a has its CatchHandler @ 00129c57 */
SendLn(this,local_50);
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string((string *)local_30);
return;
}
|
|
60,565
|
psi_mutex_lock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD int psi_mutex_lock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_LOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, FALSE, file, line);
# else
int result= pthread_mutex_lock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
}
|
O0
|
c
|
psi_mutex_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1b666e(%rip), %rax # 0x238378
movq (%rax), %rax
movq 0x190(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x37290
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x81d5d
leaq 0x1b662e(%rip), %rax # 0x238378
movq (%rax), %rax
movq 0x198(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
psi_mutex_lock:
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+190h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+40h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
xor edx, edx
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_81D5D
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+198h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_81D5D:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_mutex_lock(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, _QWORD, long long, _QWORD))PSI_server + 50))(
v6,
*(_QWORD *)(a1 + 64),
0LL,
a2,
a3);
v4 = pthread_mutex_lock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server + 51))(v5, v4);
return v4;
}
|
psi_mutex_lock:
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,[0x338378]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x190]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00137290
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x00181d5d
LEA RAX,[0x338378]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x198]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_00181d5d:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int psi_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
pthread_mutex_t *local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),0,param_2,param_3);
iVar1 = pthread_mutex_lock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
|
|
60,566
|
ma_state_info_read_dsk
|
eloqsql/storage/maria/ma_open.c
|
uint _ma_state_info_read_dsk(File file __attribute__((unused)),
MARIA_STATE_INFO *state __attribute__((unused)))
{
#ifdef MARIA_EXTERNAL_LOCKING
uchar buff[MARIA_STATE_INFO_SIZE + MARIA_STATE_EXTRA_SIZE];
/* trick to detect transactional tables */
DBUG_ASSERT(state->create_rename_lsn == LSN_IMPOSSIBLE);
if (!maria_single_user)
{
if (mysql_file_pread(file, buff, state->state_length, 0L, MYF(MY_NABP)))
return 1;
_ma_state_info_read(buff, state);
}
#endif
return 0;
}
|
O0
|
c
|
ma_state_info_read_dsk:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
xorl %eax, %eax
popq %rbp
retq
nop
|
_ma_state_info_read_dsk:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
xor eax, eax
pop rbp
retn
|
long long ma_state_info_read_dsk()
{
return 0LL;
}
|
_ma_state_info_read_dsk:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
XOR EAX,EAX
POP RBP
RET
|
int8 _ma_state_info_read_dsk(void)
{
return 0;
}
|
|
60,567
|
ggml_get_tensor
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
struct ggml_tensor * ggml_get_tensor(struct ggml_context * ctx, const char * name) {
struct ggml_object * obj = ctx->objects_begin;
char * const mem_buffer = ctx->mem_buffer;
while (obj != NULL) {
if (obj->type == GGML_OBJECT_TYPE_TENSOR) {
struct ggml_tensor * cur = (struct ggml_tensor *)(mem_buffer + obj->offs);
if (strcmp(cur->name, name) == 0) {
return cur;
}
}
obj = obj->next;
}
return NULL;
}
|
O1
|
c
|
ggml_get_tensor:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x18(%rdi), %r15
testq %r15, %r15
je 0x1beed
movq %rsi, %rbx
movq 0x8(%rdi), %r12
cmpl $0x0, 0x18(%r15)
jne 0x1bee4
movq (%r15), %rax
leaq (%r12,%rax), %r13
leaq (%r12,%rax), %rdi
addq $0x100, %rdi # imm = 0x100
movq %rbx, %rsi
callq 0x18810
testl %eax, %eax
cmoveq %r13, %r14
je 0x1bef0
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x1bebb
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
ggml_get_tensor:
push r15
push r14
push r13
push r12
push rbx
mov r15, [rdi+18h]
test r15, r15
jz short loc_1BEED
mov rbx, rsi
mov r12, [rdi+8]
loc_1BEBB:
cmp dword ptr [r15+18h], 0
jnz short loc_1BEE4
mov rax, [r15]
lea r13, [r12+rax]
lea rdi, [r12+rax]
add rdi, 100h
mov rsi, rbx
call _strcmp
test eax, eax
cmovz r14, r13
jz short loc_1BEF0
loc_1BEE4:
mov r15, [r15+10h]
test r15, r15
jnz short loc_1BEBB
loc_1BEED:
xor r14d, r14d
loc_1BEF0:
mov rax, r14
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
long long ggml_get_tensor(long long a1, long long a2)
{
long long v2; // r15
long long v3; // r12
long long v4; // r13
v2 = *(_QWORD *)(a1 + 24);
if ( !v2 )
return 0LL;
v3 = *(_QWORD *)(a1 + 8);
while ( 1 )
{
if ( !*(_DWORD *)(v2 + 24) )
{
v4 = v3 + *(_QWORD *)v2;
if ( !(unsigned int)strcmp(v4 + 256, a2) )
break;
}
v2 = *(_QWORD *)(v2 + 16);
if ( !v2 )
return 0LL;
}
return v4;
}
|
ggml_get_tensor:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R15,qword ptr [RDI + 0x18]
TEST R15,R15
JZ 0x0011beed
MOV RBX,RSI
MOV R12,qword ptr [RDI + 0x8]
LAB_0011bebb:
CMP dword ptr [R15 + 0x18],0x0
JNZ 0x0011bee4
MOV RAX,qword ptr [R15]
LEA R13,[R12 + RAX*0x1]
LEA RDI,[R12 + RAX*0x1]
ADD RDI,0x100
MOV RSI,RBX
CALL 0x00118810
TEST EAX,EAX
CMOVZ R14,R13
JZ 0x0011bef0
LAB_0011bee4:
MOV R15,qword ptr [R15 + 0x10]
TEST R15,R15
JNZ 0x0011bebb
LAB_0011beed:
XOR R14D,R14D
LAB_0011bef0:
MOV RAX,R14
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
long ggml_get_tensor(long param_1,char *param_2)
{
long lVar1;
long lVar2;
int iVar3;
long *plVar4;
plVar4 = *(long **)(param_1 + 0x18);
if (plVar4 != (long *)0x0) {
lVar1 = *(long *)(param_1 + 8);
do {
if ((int)plVar4[3] == 0) {
lVar2 = *plVar4;
iVar3 = strcmp((char *)(lVar1 + lVar2 + 0x100),param_2);
if (iVar3 == 0) {
return lVar1 + lVar2;
}
}
plVar4 = (long *)plVar4[2];
} while (plVar4 != (long *)0x0);
}
return 0;
}
|
|
60,568
|
ggml_get_tensor
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
struct ggml_tensor * ggml_get_tensor(struct ggml_context * ctx, const char * name) {
struct ggml_object * obj = ctx->objects_begin;
char * const mem_buffer = ctx->mem_buffer;
while (obj != NULL) {
if (obj->type == GGML_OBJECT_TYPE_TENSOR) {
struct ggml_tensor * cur = (struct ggml_tensor *)(mem_buffer + obj->offs);
if (strcmp(cur->name, name) == 0) {
return cur;
}
}
obj = obj->next;
}
return NULL;
}
|
O3
|
c
|
ggml_get_tensor:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x18(%rdi), %r15
testq %r15, %r15
je 0x1ac0a
movq %rsi, %r14
movq 0x8(%rdi), %rbx
cmpl $0x0, 0x18(%r15)
jne 0x1ac01
movq (%r15), %r12
leaq (%rbx,%r12), %rdi
addq $0x100, %rdi # imm = 0x100
movq %r14, %rsi
callq 0x17800
testl %eax, %eax
je 0x1ac1b
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x1abe0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
addq %r12, %rbx
jmp 0x1ac0c
|
ggml_get_tensor:
push r15
push r14
push r12
push rbx
push rax
mov r15, [rdi+18h]
test r15, r15
jz short loc_1AC0A
mov r14, rsi
mov rbx, [rdi+8]
loc_1ABE0:
cmp dword ptr [r15+18h], 0
jnz short loc_1AC01
mov r12, [r15]
lea rdi, [rbx+r12]
add rdi, 100h
mov rsi, r14
call _strcmp
test eax, eax
jz short loc_1AC1B
loc_1AC01:
mov r15, [r15+10h]
test r15, r15
jnz short loc_1ABE0
loc_1AC0A:
xor ebx, ebx
loc_1AC0C:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_1AC1B:
add rbx, r12
jmp short loc_1AC0C
|
long long ggml_get_tensor(long long a1, long long a2)
{
long long *v2; // r15
long long v3; // rbx
long long v4; // r12
v2 = *(long long **)(a1 + 24);
if ( !v2 )
return 0LL;
v3 = *(_QWORD *)(a1 + 8);
while ( 1 )
{
if ( !*((_DWORD *)v2 + 6) )
{
v4 = *v2;
if ( !(unsigned int)strcmp(v3 + *v2 + 256, a2) )
break;
}
v2 = (long long *)v2[2];
if ( !v2 )
return 0LL;
}
return v4 + v3;
}
|
ggml_get_tensor:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,qword ptr [RDI + 0x18]
TEST R15,R15
JZ 0x0011ac0a
MOV R14,RSI
MOV RBX,qword ptr [RDI + 0x8]
LAB_0011abe0:
CMP dword ptr [R15 + 0x18],0x0
JNZ 0x0011ac01
MOV R12,qword ptr [R15]
LEA RDI,[RBX + R12*0x1]
ADD RDI,0x100
MOV RSI,R14
CALL 0x00117800
TEST EAX,EAX
JZ 0x0011ac1b
LAB_0011ac01:
MOV R15,qword ptr [R15 + 0x10]
TEST R15,R15
JNZ 0x0011abe0
LAB_0011ac0a:
XOR EBX,EBX
LAB_0011ac0c:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0011ac1b:
ADD RBX,R12
JMP 0x0011ac0c
|
long ggml_get_tensor(long param_1,char *param_2)
{
long lVar1;
long lVar2;
int iVar3;
long *plVar4;
plVar4 = *(long **)(param_1 + 0x18);
if (plVar4 != (long *)0x0) {
lVar1 = *(long *)(param_1 + 8);
do {
if ((int)plVar4[3] == 0) {
lVar2 = *plVar4;
iVar3 = strcmp((char *)(lVar1 + lVar2 + 0x100),param_2);
if (iVar3 == 0) {
return lVar1 + lVar2;
}
}
plVar4 = (long *)plVar4[2];
} while (plVar4 != (long *)0x0);
}
return 0;
}
|
|
60,569
|
mi_indexes_are_disabled
|
eloqsql/storage/myisam/mi_open.c
|
int mi_indexes_are_disabled(MI_INFO *info)
{
MYISAM_SHARE *share= info->s;
/*
No keys or all are enabled. keys is the number of keys. Left shifted
gives us only one bit set. When decreased by one, gives us all all bits
up to this one set and it gets unset.
*/
if (!share->base.keys ||
(mi_is_all_keys_active(share->state.key_map, share->base.keys)))
return 0;
/* All are disabled */
if (mi_is_any_key_active(share->state.key_map))
return 1;
/*
We have keys. Some enabled, some disabled.
Don't check for any non-unique disabled but return directly 2
*/
return 2;
}
|
O3
|
c
|
mi_indexes_are_disabled:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
movl 0x180(%rdx), %ecx
xorl %eax, %eax
testq %rcx, %rcx
je 0x80964
movq 0xc0(%rdx), %rdx
movq $-0x1, %rsi
movq $-0x1, %rdi
shlq %cl, %rdi
cmpl $0x40, %ecx
notq %rdi
cmovaeq %rsi, %rdi
cmpq %rdi, %rdx
je 0x80964
xorl %eax, %eax
cmpq $0x1, %rdx
adcl $0x1, %eax
popq %rbp
retq
nop
|
mi_indexes_are_disabled:
push rbp
mov rbp, rsp
mov rdx, [rdi]
mov ecx, [rdx+180h]
xor eax, eax
test rcx, rcx
jz short loc_80964
mov rdx, [rdx+0C0h]
mov rsi, 0FFFFFFFFFFFFFFFFh
mov rdi, 0FFFFFFFFFFFFFFFFh
shl rdi, cl
cmp ecx, 40h ; '@'
not rdi
cmovnb rdi, rsi
cmp rdx, rdi
jz short loc_80964
xor eax, eax
cmp rdx, 1
adc eax, 1
loc_80964:
pop rbp
retn
|
long long mi_indexes_are_disabled(long long a1)
{
unsigned int v1; // ecx
long long result; // rax
long long v3; // rdx
long long v4; // rdi
v1 = *(_DWORD *)(*(_QWORD *)a1 + 384LL);
result = 0LL;
if ( v1 )
{
v3 = *(_QWORD *)(*(_QWORD *)a1 + 192LL);
v4 = ~(-1LL << v1);
if ( v1 >= 0x40 )
v4 = -1LL;
if ( v3 != v4 )
return (unsigned int)(v3 == 0) + 1;
}
return result;
}
|
mi_indexes_are_disabled:
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI]
MOV ECX,dword ptr [RDX + 0x180]
XOR EAX,EAX
TEST RCX,RCX
JZ 0x00180964
MOV RDX,qword ptr [RDX + 0xc0]
MOV RSI,-0x1
MOV RDI,-0x1
SHL RDI,CL
CMP ECX,0x40
NOT RDI
CMOVNC RDI,RSI
CMP RDX,RDI
JZ 0x00180964
XOR EAX,EAX
CMP RDX,0x1
ADC EAX,0x1
LAB_00180964:
POP RBP
RET
|
char mi_indexes_are_disabled(long *param_1)
{
uint uVar1;
ulong uVar2;
char cVar3;
ulong uVar4;
uVar1 = *(uint *)(*param_1 + 0x180);
cVar3 = '\0';
if (uVar1 != 0) {
uVar2 = *(ulong *)(*param_1 + 0xc0);
uVar4 = ~(-1L << ((byte)uVar1 & 0x3f));
if (0x3f < uVar1) {
uVar4 = 0xffffffffffffffff;
}
if (uVar2 != uVar4) {
cVar3 = (uVar2 == 0) + '\x01';
}
}
return cVar3;
}
|
|
60,570
|
test_large_inflate
|
3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/test/example.c
|
void test_large_inflate(compr, comprLen, uncompr, uncomprLen)
Byte *compr, *uncompr;
uLong comprLen, uncomprLen;
{
int err;
z_stream d_stream; /* decompression stream */
strcpy((char*)uncompr, "garbage");
d_stream.zalloc = zalloc;
d_stream.zfree = zfree;
d_stream.opaque = (voidpf)0;
d_stream.next_in = compr;
d_stream.avail_in = (uInt)comprLen;
err = inflateInit(&d_stream);
CHECK_ERR(err, "inflateInit");
for (;;) {
d_stream.next_out = uncompr; /* discard the output */
d_stream.avail_out = (uInt)uncomprLen;
err = inflate(&d_stream, Z_NO_FLUSH);
if (err == Z_STREAM_END) break;
CHECK_ERR(err, "large inflate");
}
err = inflateEnd(&d_stream);
CHECK_ERR(err, "inflateEnd");
if (d_stream.total_out != 2*uncomprLen + comprLen/2) {
fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out);
exit(1);
} else {
printf("large_inflate(): OK\n");
}
}
|
O3
|
c
|
test_large_inflate:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movabsq $0x65676162726167, %rax # imm = 0x65676162726167
movq %rax, (%rdx)
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %rax
movups %xmm0, 0x40(%rax)
movq $0x0, 0x50(%rax)
movq %rdi, (%rax)
movl %r14d, 0x8(%rax)
leaq 0xf59(%rip), %rsi # 0x4140
movq %rax, %rdi
movl $0x70, %edx
callq 0x21d0
testl %eax, %eax
jne 0x3257
leaq 0x8(%rsp), %r12
movq %r15, 0x20(%rsp)
movl %ebx, 0x28(%rsp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x2060
testl %eax, %eax
je 0x31fd
cmpl $0x1, %eax
jne 0x3250
leaq 0x8(%rsp), %rdi
callq 0x2170
testl %eax, %eax
jne 0x325e
movq 0x30(%rsp), %rdi
shrq %r14
leaq (%r14,%rbx,2), %rax
cmpq %rax, %rdi
jne 0x3265
leaq 0x10f4(%rip), %rdi # 0x4333
callq 0x2070
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x278a
movl %eax, %edi
callq 0x2712
movl %eax, %edi
callq 0x273c
callq 0x2766
|
test_large_inflate:
push r15
push r14
push r12
push rbx
sub rsp, 78h
mov rbx, rcx
mov r15, rdx
mov r14, rsi
mov rax, 65676162726167h
mov [rdx], rax
xorps xmm0, xmm0
lea rax, [rsp+98h+var_90]
movups xmmword ptr [rax+40h], xmm0
mov qword ptr [rax+50h], 0
mov [rax], rdi
mov [rax+8], r14d
lea rsi, a1213; "1.2.13"
mov rdi, rax
mov edx, 70h ; 'p'
call _inflateInit_
test eax, eax
jnz short loc_3257
lea r12, [rsp+98h+var_90]
loc_31FD:
mov [rsp+98h+var_78], r15
mov [rsp+98h+var_70], ebx
mov rdi, r12
xor esi, esi
call _inflate
test eax, eax
jz short loc_31FD
cmp eax, 1
jnz short loc_3250
lea rdi, [rsp+98h+var_90]
call _inflateEnd
test eax, eax
jnz short loc_325E
mov rdi, [rsp+98h+var_68]
shr r14, 1
lea rax, [r14+rbx*2]
cmp rdi, rax
jnz short loc_3265
lea rdi, aLargeInflateOk; "large_inflate(): OK"
call _puts
add rsp, 78h
pop rbx
pop r12
pop r14
pop r15
retn
loc_3250:
mov edi, eax
call test_large_inflate_cold_4
loc_3257:
mov edi, eax
call test_large_inflate_cold_1
loc_325E:
mov edi, eax
call test_large_inflate_cold_2
loc_3265:
call test_large_inflate_cold_3
|
long long test_large_inflate(long long a1, unsigned long long a2, _QWORD *a3, long long a4)
{
int v6; // eax
int v7; // eax
int v8; // eax
long long v10; // [rsp+8h] [rbp-90h] BYREF
int v11; // [rsp+10h] [rbp-88h]
_QWORD *v12; // [rsp+20h] [rbp-78h]
int v13; // [rsp+28h] [rbp-70h]
long long v14; // [rsp+30h] [rbp-68h]
__int128 v15; // [rsp+48h] [rbp-50h]
long long v16; // [rsp+58h] [rbp-40h]
*a3 = 0x65676162726167LL;
v15 = 0LL;
v16 = 0LL;
v10 = a1;
v11 = a2;
v6 = inflateInit_(&v10, "1.2.13", 112LL);
if ( v6 )
test_large_inflate_cold_1(v6);
do
{
v12 = a3;
v13 = a4;
v7 = inflate(&v10, 0LL);
}
while ( !v7 );
if ( v7 != 1 )
test_large_inflate_cold_4(v7);
v8 = inflateEnd(&v10);
if ( v8 )
test_large_inflate_cold_2(v8);
if ( v14 != (a2 >> 1) + 2 * a4 )
test_large_inflate_cold_3(v14);
return puts("large_inflate(): OK");
}
|
test_large_inflate:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV RBX,RCX
MOV R15,RDX
MOV R14,RSI
MOV RAX,0x65676162726167
MOV qword ptr [RDX],RAX
XORPS XMM0,XMM0
LEA RAX,[RSP + 0x8]
MOVUPS xmmword ptr [RAX + 0x40],XMM0
MOV qword ptr [RAX + 0x50],0x0
MOV qword ptr [RAX],RDI
MOV dword ptr [RAX + 0x8],R14D
LEA RSI,[0x104140]
MOV RDI,RAX
MOV EDX,0x70
CALL 0x001021d0
TEST EAX,EAX
JNZ 0x00103257
LEA R12,[RSP + 0x8]
LAB_001031fd:
MOV qword ptr [RSP + 0x20],R15
MOV dword ptr [RSP + 0x28],EBX
MOV RDI,R12
XOR ESI,ESI
CALL 0x00102060
TEST EAX,EAX
JZ 0x001031fd
CMP EAX,0x1
JNZ 0x00103250
LEA RDI,[RSP + 0x8]
CALL 0x00102170
TEST EAX,EAX
JNZ 0x0010325e
MOV RDI,qword ptr [RSP + 0x30]
SHR R14,0x1
LEA RAX,[R14 + RBX*0x2]
CMP RDI,RAX
JNZ 0x00103265
LEA RDI,[0x104333]
CALL 0x00102070
ADD RSP,0x78
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00103250:
MOV EDI,EAX
CALL 0x0010278a
LAB_00103257:
MOV EDI,EAX
CALL 0x00102712
LAB_0010325e:
MOV EDI,EAX
CALL 0x0010273c
LAB_00103265:
CALL 0x00102766
|
ulong test_large_inflate(int8 param_1,ulong param_2,int8 *param_3,long param_4)
{
int iVar1;
uint uVar2;
int iVar3;
size_t sVar4;
ulong uVar5;
int8 uVar6;
void *__ptr;
void *__ptr_00;
char **ppcVar7;
int8 *extraout_RDX;
char *__s1;
int4 uVar8;
char *pcVar9;
ulong uVar10;
char *pcVar11;
char *pcVar12;
ulong uVar13;
ulong *puVar14;
int8 *unaff_R12;
int8 uStack_2f0;
char *pcStack_2e8;
int1 *puStack_2e0;
char *pcStack_2d8;
ulong uStack_2c8;
int4 uStack_2c0;
char *pcStack_2b0;
int4 uStack_2a8;
int8 uStack_288;
int8 uStack_280;
int8 uStack_278;
long lStack_268;
char *pcStack_258;
int1 *puStack_250;
code *pcStack_248;
char *pcStack_240;
int iStack_238;
int1 *puStack_228;
int4 uStack_220;
int8 uStack_200;
int8 uStack_1f8;
int8 uStack_1f0;
long lStack_1e0;
int8 *puStack_1d0;
ulong uStack_1c8;
code *pcStack_1c0;
ulong uStack_1b8;
uint uStack_1b0;
int8 *puStack_1a0;
int4 uStack_198;
int8 uStack_178;
int8 uStack_170;
int8 uStack_168;
ulong *puStack_148;
ulong uStack_140;
code *pcStack_138;
char *pcStack_128;
uint uStack_120;
ulong uStack_110;
int4 uStack_108;
ulong uStack_100;
int8 uStack_e8;
int8 uStack_e0;
int8 uStack_d8;
long lStack_b8;
int8 *puStack_b0;
ulong uStack_a8;
code *pcStack_a0;
int8 local_90;
int4 local_88;
int8 *local_78;
int4 local_70;
ulong local_68;
int8 local_50;
int8 uStack_48;
int8 local_40;
*param_3 = 0x65676162726167;
local_50 = 0;
uStack_48 = 0;
local_40 = 0;
local_88 = (int4)param_2;
pcVar9 = "1.2.13";
pcStack_a0 = (code *)0x1031f4;
local_90 = param_1;
iVar1 = inflateInit_(&local_90,"1.2.13",0x70);
if (iVar1 == 0) {
unaff_R12 = &local_90;
do {
local_70 = (int4)param_4;
pcVar9 = (char *)0x0;
pcStack_a0 = (code *)0x103210;
local_78 = param_3;
iVar1 = inflate(unaff_R12);
} while (iVar1 == 0);
if (iVar1 != 1) {
pcStack_a0 = (code *)0x103257;
iVar1 = test_large_inflate_cold_4(iVar1);
goto LAB_00103257;
}
pcStack_a0 = (code *)0x103223;
uVar2 = inflateEnd(&local_90);
if (uVar2 != 0) goto LAB_0010325e;
param_2 = param_2 >> 1;
uVar5 = local_68;
if (local_68 == param_2 + param_4 * 2) {
pcStack_a0 = (code *)0x103244;
uVar2 = puts("large_inflate(): OK");
return (ulong)uVar2;
}
}
else {
LAB_00103257:
pcStack_a0 = (code *)0x10325e;
uVar2 = test_large_inflate_cold_1(iVar1);
LAB_0010325e:
uVar5 = (ulong)uVar2;
pcStack_a0 = (code *)0x103265;
test_large_inflate_cold_2();
}
pcStack_a0 = test_flush;
test_large_inflate_cold_3();
pcStack_138 = (code *)0x10328a;
lStack_b8 = param_4;
puStack_b0 = unaff_R12;
uStack_a8 = param_2;
pcStack_a0 = (code *)param_3;
sVar4 = strlen(hello);
uStack_e8 = 0;
uStack_e0 = 0;
uStack_d8 = 0;
uVar10 = 0xffffffff;
ppcVar7 = (char **)0x70;
pcStack_138 = (code *)0x1032b7;
iVar1 = deflateInit_(&pcStack_128,0xffffffff,"1.2.13");
if (iVar1 == 0) {
pcStack_128 = hello;
uStack_120 = 3;
uStack_108 = (int4)*(ulong *)pcVar9;
uVar10 = 3;
pcStack_138 = (code *)0x1032dd;
uStack_110 = uVar5;
iVar1 = deflate();
if (iVar1 != 0) goto LAB_0010332a;
*(char *)(uVar5 + 3) = *(char *)(uVar5 + 3) + '\x01';
uStack_120 = (int)sVar4 - 2;
sVar4 = (size_t)uStack_120;
uVar10 = 4;
pcStack_138 = (code *)0x1032fc;
uVar2 = deflate();
if (1 < uVar2) goto LAB_00103331;
pcStack_138 = (code *)0x10330b;
uVar2 = deflateEnd(&pcStack_128);
if (uVar2 == 0) {
*(ulong *)pcVar9 = uStack_100;
return uStack_100;
}
}
else {
pcStack_138 = (code *)0x10332a;
iVar1 = test_flush_cold_1(iVar1);
LAB_0010332a:
pcStack_138 = (code *)0x103331;
uVar2 = test_flush_cold_2(iVar1);
LAB_00103331:
pcStack_138 = (code *)0x103338;
uVar2 = test_flush_cold_4(uVar2);
}
uVar13 = (ulong)uVar2;
pcStack_138 = test_sync;
test_flush_cold_3();
*extraout_RDX = 0x65676162726167;
uStack_178 = 0;
uStack_170 = 0;
uStack_168 = 0;
uStack_1b0 = 2;
pcVar11 = "1.2.13";
pcStack_1c0 = (code *)0x10338e;
uStack_1b8 = uVar13;
puStack_148 = (ulong *)pcVar9;
uStack_140 = uVar5;
pcStack_138 = (code *)sVar4;
iVar1 = inflateInit_(&uStack_1b8,"1.2.13",0x70);
if (iVar1 == 0) {
uStack_198 = SUB84(ppcVar7,0);
pcVar11 = (char *)0x0;
pcStack_1c0 = (code *)0x1033a4;
puStack_1a0 = extraout_RDX;
iVar1 = inflate();
if (iVar1 != 0) goto LAB_001033fc;
uStack_1b0 = (int)uVar10 - 2;
uVar10 = (ulong)uStack_1b0;
pcStack_1c0 = (code *)0x1033b8;
iVar1 = inflateSync();
if (iVar1 != 0) goto LAB_00103403;
pcVar11 = (char *)0x4;
pcStack_1c0 = (code *)0x1033c9;
iVar1 = inflate(&uStack_1b8);
if (iVar1 != 1) goto LAB_0010340a;
pcStack_1c0 = (code *)0x1033d6;
uVar2 = inflateEnd(&uStack_1b8);
if (uVar2 == 0) {
pcStack_1c0 = (code *)0x1033eb;
uVar2 = printf("after inflateSync(): hel%s\n",extraout_RDX);
return (ulong)uVar2;
}
}
else {
pcStack_1c0 = (code *)0x1033fc;
iVar1 = test_sync_cold_1(iVar1);
LAB_001033fc:
pcStack_1c0 = (code *)0x103403;
iVar1 = test_sync_cold_2(iVar1);
LAB_00103403:
pcStack_1c0 = (code *)0x10340a;
test_sync_cold_3(iVar1);
LAB_0010340a:
pcStack_1c0 = (code *)0x10340f;
uVar2 = test_sync_cold_4();
}
puVar14 = (ulong *)(ulong)uVar2;
pcStack_1c0 = test_dict_deflate;
test_sync_cold_5();
uStack_200 = 0;
uStack_1f8 = 0;
uStack_1f0 = 0;
uVar8 = 9;
pcVar9 = (char *)0x70;
pcStack_248 = (code *)0x10344d;
puStack_1d0 = extraout_RDX;
uStack_1c8 = uVar10;
pcStack_1c0 = (code *)ppcVar7;
iVar1 = deflateInit_(&pcStack_240,9,"1.2.13");
if (iVar1 == 0) {
uVar8 = 0x104355;
pcStack_248 = (code *)0x103465;
iVar1 = deflateSetDictionary(&pcStack_240,"hello",6);
if (iVar1 != 0) goto LAB_001034c3;
dictId = lStack_1e0;
uStack_220 = SUB84(pcVar11,0);
pcStack_240 = hello;
pcStack_248 = (code *)0x10348e;
puStack_228 = (int1 *)puVar14;
sVar4 = strlen(hello);
iStack_238 = (int)sVar4 + 1;
uVar8 = 4;
pcStack_248 = (code *)0x1034a1;
iVar1 = deflate(&pcStack_240);
ppcVar7 = &pcStack_240;
if (iVar1 != 1) goto LAB_001034ca;
pcStack_248 = (code *)0x1034ae;
uVar5 = deflateEnd(&pcStack_240);
ppcVar7 = &pcStack_240;
if ((int)uVar5 == 0) {
return uVar5;
}
}
else {
pcStack_248 = (code *)0x1034c3;
iVar1 = test_dict_deflate_cold_1(iVar1);
LAB_001034c3:
pcStack_248 = (code *)0x1034ca;
test_dict_deflate_cold_2(iVar1);
LAB_001034ca:
pcStack_248 = (code *)0x1034cf;
uVar5 = test_dict_deflate_cold_3();
}
uVar5 = uVar5 & 0xffffffff;
pcStack_248 = test_dict_inflate;
test_dict_deflate_cold_4();
builtin_strncpy(__s1,"garbage",8);
uStack_288 = 0;
uStack_280 = 0;
uStack_278 = 0;
pcVar12 = "1.2.13";
uStack_2c8 = uVar5;
uStack_2c0 = uVar8;
pcStack_258 = pcVar11;
puStack_250 = (int1 *)puVar14;
pcStack_248 = (code *)ppcVar7;
iVar1 = inflateInit_(&uStack_2c8,"1.2.13",0x70);
if (iVar1 == 0) {
uStack_2a8 = SUB84(pcVar9,0);
pcVar9 = "hello";
pcStack_2b0 = __s1;
do {
pcVar12 = (char *)0x0;
iVar1 = inflate(&uStack_2c8);
if (iVar1 == 2) {
if (lStack_268 != dictId) {
iVar1 = test_dict_inflate_cold_2();
puVar14 = &uStack_2c8;
goto LAB_001035b6;
}
pcVar12 = "hello";
iVar1 = inflateSetDictionary(&uStack_2c8,"hello",6);
}
else if (iVar1 == 1) goto LAB_00103577;
} while (iVar1 == 0);
test_dict_inflate_cold_5(iVar1);
LAB_00103577:
iVar1 = inflateEnd(&uStack_2c8);
puVar14 = &uStack_2c8;
if (iVar1 == 0) {
pcVar12 = hello;
pcVar11 = __s1;
iVar3 = strcmp(__s1,hello);
iVar1 = (int)pcVar11;
puVar14 = &uStack_2c8;
if (iVar3 == 0) {
uVar2 = printf("inflate with dictionary: %s\n",__s1);
return (ulong)uVar2;
}
goto LAB_001035c4;
}
}
else {
LAB_001035b6:
iVar1 = test_dict_inflate_cold_1(iVar1);
}
test_dict_inflate_cold_3();
LAB_001035c4:
test_dict_inflate_cold_4();
uStack_2f0 = 40000;
pcStack_2e8 = __s1;
puStack_2e0 = (int1 *)puVar14;
pcStack_2d8 = pcVar9;
pcVar9 = (char *)zlibVersion();
if (*pcVar9 == '1') {
pcVar9 = (char *)zlibVersion();
iVar3 = strcmp(pcVar9,"1.2.13");
if (iVar3 != 0) {
main_cold_2();
}
uVar6 = zlibCompileFlags();
printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n","1.2.13",0x12d0,uVar6);
__ptr = calloc(40000,1);
__ptr_00 = calloc(40000,1);
if ((__ptr != (void *)0x0) && (__ptr_00 != (void *)0x0)) {
test_compress(__ptr,40000,__ptr_00,40000);
if (iVar1 < 2) {
pcVar9 = "foo.gz";
}
else {
pcVar9 = *(char **)(pcVar12 + 8);
}
test_gzio(pcVar9,__ptr_00,40000);
test_deflate(__ptr,40000);
test_inflate(__ptr,40000,__ptr_00,40000);
test_large_deflate(__ptr,40000,__ptr_00,40000);
test_large_inflate(__ptr,40000,__ptr_00,40000);
test_flush(__ptr,&uStack_2f0);
test_sync(__ptr,uStack_2f0,__ptr_00,40000);
test_dict_deflate(__ptr,40000);
test_dict_inflate(__ptr,40000,__ptr_00,40000);
free(__ptr);
free(__ptr_00);
return 0;
}
}
else {
main_cold_1();
}
puts("out of memory");
/* WARNING: Subroutine does not return */
exit(1);
}
|
|
60,571
|
ggml_compute_forward_pool_1d_sk_p0
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
|
static void ggml_compute_forward_pool_1d_sk_p0(
const struct ggml_compute_params * params,
const enum ggml_op_pool op,
const int k,
struct ggml_tensor * dst) {
const struct ggml_tensor * src = dst->src[0];
assert(src->type == GGML_TYPE_F32 || src->type == GGML_TYPE_F16);
if (params->ith != 0) {
return;
}
const char * cdata = (const char *)src->data;
const char * const data_end = cdata + ggml_nbytes(src);
float * drow = (float *)dst->data;
const int64_t rs = dst->ne[0];
while (cdata < data_end) {
const void * srow = (const void *)cdata;
int j = 0;
for (int64_t i = 0; i < rs; ++i) {
switch (op) {
case GGML_OP_POOL_AVG: drow[i] = 0; break;
case GGML_OP_POOL_MAX: drow[i] = -FLT_MAX; break;
case GGML_OP_POOL_COUNT: GGML_ABORT("fatal error");
}
for (int ki = 0; ki < k; ++ki) {
const float srow_j = (src->type == GGML_TYPE_F32) ? ((const float*)srow)[j] : GGML_FP16_TO_FP32(((const ggml_fp16_t*)srow)[j]);
switch (op) {
case GGML_OP_POOL_AVG: drow[i] += srow_j; break;
case GGML_OP_POOL_MAX: if (srow_j > drow[i]) drow[i] = srow_j; break;
case GGML_OP_POOL_COUNT: GGML_ABORT("fatal error");
}
++j;
}
switch (op) {
case GGML_OP_POOL_AVG: drow[i] /= k; break;
case GGML_OP_POOL_MAX: break;
case GGML_OP_POOL_COUNT: GGML_ABORT("fatal error");
}
}
cdata += src->nb[1];
drow += rs;
}
}
|
O0
|
c
|
ggml_compute_forward_pool_1d_sk_p0:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x340ba
movq -0x20(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x340bc
jmp 0x340db
leaq 0x41388(%rip), %rdi # 0x7544b
leaq 0x3fa98(%rip), %rsi # 0x73b62
movl $0x27c6, %edx # imm = 0x27C6
leaq 0x413ae(%rip), %rcx # 0x75484
callq 0xd690
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
je 0x340e9
jmp 0x3433c
movq -0x20(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rdi
callq 0xd0d0
movq %rax, %rcx
movq -0x68(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x3433c
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x40(%rbp), %rax
jge 0x34317
movl -0xc(%rbp), %eax
movl %eax, -0x6c(%rbp)
testl %eax, %eax
je 0x34198
jmp 0x34171
movl -0x6c(%rbp), %eax
subl $0x1, %eax
je 0x34185
jmp 0x3417b
movl -0x6c(%rbp), %eax
subl $0x2, %eax
je 0x341af
jmp 0x341c9
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rcx
vpxor %xmm0, %xmm0, %xmm0
vmovss %xmm0, (%rax,%rcx,4)
jmp 0x341c9
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rcx
vmovss 0x3f930(%rip), %xmm0 # 0x73ad8
vmovss %xmm0, (%rax,%rcx,4)
jmp 0x341c9
leaq 0x3f9ac(%rip), %rdi # 0x73b62
movl $0x27d9, %esi # imm = 0x27D9
leaq 0x3fbfb(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x342ab
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x341f9
movq -0x48(%rbp), %rax
movslq -0x4c(%rbp), %rcx
vmovss (%rax,%rcx,4), %xmm0
vmovss %xmm0, -0x70(%rbp)
jmp 0x3420f
movq -0x48(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movzwl (%rax,%rcx,2), %edi
callq 0xfab0
vmovss %xmm0, -0x70(%rbp)
vmovss -0x70(%rbp), %xmm0
vmovss %xmm0, -0x60(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x74(%rbp)
testl %eax, %eax
je 0x34252
jmp 0x34225
movl -0x74(%rbp), %eax
subl $0x1, %eax
je 0x34239
jmp 0x3422f
movl -0x74(%rbp), %eax
subl $0x2, %eax
je 0x3427a
jmp 0x34294
vmovss -0x60(%rbp), %xmm0
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rcx
vaddss (%rax,%rcx,4), %xmm0, %xmm0
vmovss %xmm0, (%rax,%rcx,4)
jmp 0x34294
vmovss -0x60(%rbp), %xmm0
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rcx
vucomiss (%rax,%rcx,4), %xmm0
jbe 0x34278
vmovss -0x60(%rbp), %xmm0
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rcx
vmovss %xmm0, (%rax,%rcx,4)
jmp 0x34294
leaq 0x3f8e1(%rip), %rdi # 0x73b62
movl $0x27e0, %esi # imm = 0x27E0
leaq 0x3fb30(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x341d0
movl -0xc(%rbp), %eax
movl %eax, -0x78(%rbp)
testl %eax, %eax
je 0x342e8
jmp 0x342b7
movl -0x78(%rbp), %eax
subl $0x1, %eax
je 0x342cb
jmp 0x342c1
movl -0x78(%rbp), %eax
subl $0x2, %eax
je 0x342ea
jmp 0x34304
vcvtsi2ssl -0x10(%rbp), %xmm0, %xmm1
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rcx
vmovss (%rax,%rcx,4), %xmm0
vdivss %xmm1, %xmm0, %xmm0
vmovss %xmm0, (%rax,%rcx,4)
jmp 0x34304
jmp 0x34304
leaq 0x3f871(%rip), %rdi # 0x73b62
movl $0x27e7, %esi # imm = 0x27E7
leaq 0x3fac0(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
jmp 0x34306
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x34157
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x40(%rbp), %rax
shlq $0x2, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x34132
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ggml_compute_forward_pool_1d_sk_p0:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_18], rcx
mov rax, [rbp+var_18]
mov rax, [rax+98h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
cmp dword ptr [rax], 0
jz short loc_340BA
mov rax, [rbp+var_20]
cmp dword ptr [rax], 1
jnz short loc_340BC
loc_340BA:
jmp short loc_340DB
loc_340BC:
lea rdi, aSrcTypeGgmlTyp; "src->type == GGML_TYPE_F32 || src->type"...
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 27C6h
lea rcx, aVoidGgmlComput_21; "void ggml_compute_forward_pool_1d_sk_p0"...
call ___assert_fail
loc_340DB:
mov rax, [rbp+var_8]
cmp dword ptr [rax], 0
jz short loc_340E9
jmp loc_3433C
loc_340E9:
mov rax, [rbp+var_20]
mov rax, [rax+0F8h]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_68], rax
mov rdi, [rbp+var_20]
call _ggml_nbytes
mov rcx, rax
mov rax, [rbp+var_68]
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax+0F8h]
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov [rbp+var_40], rax
loc_34132:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnb loc_3433C
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
mov [rbp+var_4C], 0
mov [rbp+var_58], 0
loc_34157:
mov rax, [rbp+var_58]
cmp rax, [rbp+var_40]
jge loc_34317
mov eax, [rbp+var_C]
mov [rbp+var_6C], eax
test eax, eax
jz short loc_34198
jmp short $+2
loc_34171:
mov eax, [rbp+var_6C]
sub eax, 1
jz short loc_34185
jmp short $+2
loc_3417B:
mov eax, [rbp+var_6C]
sub eax, 2
jz short loc_341AF
jmp short loc_341C9
loc_34185:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_58]
vpxor xmm0, xmm0, xmm0
vmovss dword ptr [rax+rcx*4], xmm0
jmp short loc_341C9
loc_34198:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_58]
vmovss xmm0, cs:dword_73AD8
vmovss dword ptr [rax+rcx*4], xmm0
jmp short loc_341C9
loc_341AF:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 27D9h
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_341C9:
mov [rbp+var_5C], 0
loc_341D0:
mov eax, [rbp+var_5C]
cmp eax, [rbp+var_10]
jge loc_342AB
mov rax, [rbp+var_20]
cmp dword ptr [rax], 0
jnz short loc_341F9
mov rax, [rbp+var_48]
movsxd rcx, [rbp+var_4C]
vmovss xmm0, dword ptr [rax+rcx*4]
vmovss [rbp+var_70], xmm0
jmp short loc_3420F
loc_341F9:
mov rax, [rbp+var_48]
movsxd rcx, [rbp+var_4C]
movzx edi, word ptr [rax+rcx*2]
call ggml_lookup_fp16_to_fp32
vmovss [rbp+var_70], xmm0
loc_3420F:
vmovss xmm0, [rbp+var_70]
vmovss [rbp+var_60], xmm0
mov eax, [rbp+var_C]
mov [rbp+var_74], eax
test eax, eax
jz short loc_34252
jmp short $+2
loc_34225:
mov eax, [rbp+var_74]
sub eax, 1
jz short loc_34239
jmp short $+2
loc_3422F:
mov eax, [rbp+var_74]
sub eax, 2
jz short loc_3427A
jmp short loc_34294
loc_34239:
vmovss xmm0, [rbp+var_60]
mov rax, [rbp+var_38]
mov rcx, [rbp+var_58]
vaddss xmm0, xmm0, dword ptr [rax+rcx*4]
vmovss dword ptr [rax+rcx*4], xmm0
jmp short loc_34294
loc_34252:
vmovss xmm0, [rbp+var_60]
mov rax, [rbp+var_38]
mov rcx, [rbp+var_58]
vucomiss xmm0, dword ptr [rax+rcx*4]
jbe short loc_34278
vmovss xmm0, [rbp+var_60]
mov rax, [rbp+var_38]
mov rcx, [rbp+var_58]
vmovss dword ptr [rax+rcx*4], xmm0
loc_34278:
jmp short loc_34294
loc_3427A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 27E0h
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_34294:
mov eax, [rbp+var_4C]
add eax, 1
mov [rbp+var_4C], eax
mov eax, [rbp+var_5C]
add eax, 1
mov [rbp+var_5C], eax
jmp loc_341D0
loc_342AB:
mov eax, [rbp+var_C]
mov [rbp+var_78], eax
test eax, eax
jz short loc_342E8
jmp short $+2
loc_342B7:
mov eax, [rbp+var_78]
sub eax, 1
jz short loc_342CB
jmp short $+2
loc_342C1:
mov eax, [rbp+var_78]
sub eax, 2
jz short loc_342EA
jmp short loc_34304
loc_342CB:
vcvtsi2ss xmm1, xmm0, [rbp+var_10]
mov rax, [rbp+var_38]
mov rcx, [rbp+var_58]
vmovss xmm0, dword ptr [rax+rcx*4]
vdivss xmm0, xmm0, xmm1
vmovss dword ptr [rax+rcx*4], xmm0
jmp short loc_34304
loc_342E8:
jmp short loc_34304
loc_342EA:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 27E7h
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_34304:
jmp short $+2
loc_34306:
mov rax, [rbp+var_58]
add rax, 1
mov [rbp+var_58], rax
jmp loc_34157
loc_34317:
mov rax, [rbp+var_20]
mov rax, [rax+38h]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rax, [rbp+var_40]
shl rax, 2
add rax, [rbp+var_38]
mov [rbp+var_38], rax
jmp loc_34132
loc_3433C:
add rsp, 80h
pop rbp
retn
|
_DWORD * ggml_compute_forward_pool_1d_sk_p0(_DWORD *a1, int a2, int a3, _QWORD *a4, __m128 _XMM0)
{
_DWORD *result; // rax
int k; // [rsp+24h] [rbp-5Ch]
long long j; // [rsp+28h] [rbp-58h]
int v27; // [rsp+34h] [rbp-4Ch]
long long i; // [rsp+40h] [rbp-40h]
long long v29; // [rsp+48h] [rbp-38h]
unsigned long long v30; // [rsp+50h] [rbp-30h]
_DWORD *v31; // [rsp+58h] [rbp-28h]
long long v32; // [rsp+60h] [rbp-20h]
v32 = a4[19];
if ( *(_DWORD *)v32 > 1u )
__assert_fail(
"src->type == GGML_TYPE_F32 || src->type == GGML_TYPE_F16",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
10182LL,
"void ggml_compute_forward_pool_1d_sk_p0(const struct ggml_compute_params *, const enum ggml_op_pool, const int, st"
"ruct ggml_tensor *)");
result = a1;
if ( !*a1 )
{
v31 = *(_DWORD **)(v32 + 248);
v30 = (unsigned long long)v31 + ggml_nbytes(v32);
v29 = a4[31];
for ( i = a4[2]; ; v29 += 4 * i )
{
result = v31;
if ( (unsigned long long)v31 >= v30 )
break;
v27 = 0;
for ( j = 0LL; j < i; ++j )
{
if ( a2 )
{
if ( a2 == 1 )
{
_RAX = v29;
_RCX = j;
__asm
{
vpxor xmm0, xmm0, xmm0
vmovss dword ptr [rax+rcx*4], xmm0
}
}
else if ( a2 == 2 )
{
*(double *)_XMM0.m128_u64 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggm"
"l-cpu/ggml-cpu.c",
10201LL,
"fatal error");
}
}
else
{
_RAX = v29;
_RCX = j;
__asm
{
vmovss xmm0, cs:dword_73AD8
vmovss dword ptr [rax+rcx*4], xmm0
}
}
for ( k = 0; k < a3; ++k )
{
if ( *(_DWORD *)v32 )
{
_XMM0 = ggml_lookup_fp16_to_fp32(*((_WORD *)v31 + v27));
__asm { vmovss [rbp+var_70], xmm0 }
}
else
{
_RAX = v31;
_RCX = v27;
__asm
{
vmovss xmm0, dword ptr [rax+rcx*4]
vmovss [rbp+var_70], xmm0
}
}
__asm
{
vmovss xmm0, [rbp+var_70]
vmovss [rbp+var_60], xmm0
}
if ( a2 )
{
if ( a2 == 1 )
{
__asm { vmovss xmm0, [rbp+var_60] }
_RAX = v29;
_RCX = j;
__asm
{
vaddss xmm0, xmm0, dword ptr [rax+rcx*4]
vmovss dword ptr [rax+rcx*4], xmm0
}
}
else if ( a2 == 2 )
{
*(double *)_XMM0.m128_u64 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/g"
"gml-cpu/ggml-cpu.c",
10208LL,
"fatal error");
}
}
else
{
__asm { vmovss xmm0, [rbp+var_60] }
_RAX = v29;
_RCX = j;
__asm { vucomiss xmm0, dword ptr [rax+rcx*4] }
}
++v27;
}
if ( a2 )
{
if ( a2 == 1 )
{
__asm { vcvtsi2ss xmm1, xmm0, [rbp+var_10] }
_RAX = v29;
_RCX = j;
__asm
{
vmovss xmm0, dword ptr [rax+rcx*4]
vdivss xmm0, xmm0, xmm1
vmovss dword ptr [rax+rcx*4], xmm0
}
}
else if ( a2 == 2 )
{
*(double *)_XMM0.m128_u64 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggm"
"l-cpu/ggml-cpu.c",
10215LL,
"fatal error");
}
}
}
v31 = (_DWORD *)((char *)v31 + *(_QWORD *)(v32 + 56));
}
}
return result;
}
|
ggml_compute_forward_pool_1d_sk_p0:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV qword ptr [RBP + -0x18],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x0
JZ 0x001340ba
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x1
JNZ 0x001340bc
LAB_001340ba:
JMP 0x001340db
LAB_001340bc:
LEA RDI,[0x17544b]
LEA RSI,[0x173b62]
MOV EDX,0x27c6
LEA RCX,[0x175484]
CALL 0x0010d690
LAB_001340db:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX],0x0
JZ 0x001340e9
JMP 0x0013433c
LAB_001340e9:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xf8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0010d0d0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0xf8]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x40],RAX
LAB_00134132:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x0013433c
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV dword ptr [RBP + -0x4c],0x0
MOV qword ptr [RBP + -0x58],0x0
LAB_00134157:
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x40]
JGE 0x00134317
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x6c],EAX
TEST EAX,EAX
JZ 0x00134198
JMP 0x00134171
LAB_00134171:
MOV EAX,dword ptr [RBP + -0x6c]
SUB EAX,0x1
JZ 0x00134185
JMP 0x0013417b
LAB_0013417b:
MOV EAX,dword ptr [RBP + -0x6c]
SUB EAX,0x2
JZ 0x001341af
JMP 0x001341c9
LAB_00134185:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x58]
VPXOR XMM0,XMM0,XMM0
VMOVSS dword ptr [RAX + RCX*0x4],XMM0
JMP 0x001341c9
LAB_00134198:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x58]
VMOVSS XMM0,dword ptr [0x00173ad8]
VMOVSS dword ptr [RAX + RCX*0x4],XMM0
JMP 0x001341c9
LAB_001341af:
LEA RDI,[0x173b62]
MOV ESI,0x27d9
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_001341c9:
MOV dword ptr [RBP + -0x5c],0x0
LAB_001341d0:
MOV EAX,dword ptr [RBP + -0x5c]
CMP EAX,dword ptr [RBP + -0x10]
JGE 0x001342ab
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x0
JNZ 0x001341f9
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + -0x4c]
VMOVSS XMM0,dword ptr [RAX + RCX*0x4]
VMOVSS dword ptr [RBP + -0x70],XMM0
JMP 0x0013420f
LAB_001341f9:
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + -0x4c]
MOVZX EDI,word ptr [RAX + RCX*0x2]
CALL 0x0010fab0
VMOVSS dword ptr [RBP + -0x70],XMM0
LAB_0013420f:
VMOVSS XMM0,dword ptr [RBP + -0x70]
VMOVSS dword ptr [RBP + -0x60],XMM0
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x74],EAX
TEST EAX,EAX
JZ 0x00134252
JMP 0x00134225
LAB_00134225:
MOV EAX,dword ptr [RBP + -0x74]
SUB EAX,0x1
JZ 0x00134239
JMP 0x0013422f
LAB_0013422f:
MOV EAX,dword ptr [RBP + -0x74]
SUB EAX,0x2
JZ 0x0013427a
JMP 0x00134294
LAB_00134239:
VMOVSS XMM0,dword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x58]
VADDSS XMM0,XMM0,dword ptr [RAX + RCX*0x4]
VMOVSS dword ptr [RAX + RCX*0x4],XMM0
JMP 0x00134294
LAB_00134252:
VMOVSS XMM0,dword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x58]
VUCOMISS XMM0,dword ptr [RAX + RCX*0x4]
JBE 0x00134278
VMOVSS XMM0,dword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x58]
VMOVSS dword ptr [RAX + RCX*0x4],XMM0
LAB_00134278:
JMP 0x00134294
LAB_0013427a:
LEA RDI,[0x173b62]
MOV ESI,0x27e0
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_00134294:
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4c],EAX
MOV EAX,dword ptr [RBP + -0x5c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x5c],EAX
JMP 0x001341d0
LAB_001342ab:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x78],EAX
TEST EAX,EAX
JZ 0x001342e8
JMP 0x001342b7
LAB_001342b7:
MOV EAX,dword ptr [RBP + -0x78]
SUB EAX,0x1
JZ 0x001342cb
JMP 0x001342c1
LAB_001342c1:
MOV EAX,dword ptr [RBP + -0x78]
SUB EAX,0x2
JZ 0x001342ea
JMP 0x00134304
LAB_001342cb:
VCVTSI2SS XMM1,XMM0,dword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x58]
VMOVSS XMM0,dword ptr [RAX + RCX*0x4]
VDIVSS XMM0,XMM0,XMM1
VMOVSS dword ptr [RAX + RCX*0x4],XMM0
JMP 0x00134304
LAB_001342e8:
JMP 0x00134304
LAB_001342ea:
LEA RDI,[0x173b62]
MOV ESI,0x27e7
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_00134304:
JMP 0x00134306
LAB_00134306:
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x1
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00134157
LAB_00134317:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x40]
SHL RAX,0x2
ADD RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00134132
LAB_0013433c:
ADD RSP,0x80
POP RBP
RET
|
void ggml_compute_forward_pool_1d_sk_p0(int *param_1,int param_2,int param_3,long param_4)
{
int *piVar1;
long lVar2;
ulong uVar3;
float local_78;
int local_64;
long local_60;
int local_54;
long local_40;
ulong local_30;
piVar1 = *(int **)(param_4 + 0x98);
if ((*piVar1 != 0) && (*piVar1 != 1)) {
/* WARNING: Subroutine does not return */
__assert_fail("src->type == GGML_TYPE_F32 || src->type == GGML_TYPE_F16",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x27c6,
"void ggml_compute_forward_pool_1d_sk_p0(const struct ggml_compute_params *, const enum ggml_op_pool, const int, struct ggml_tensor *)"
);
}
if (*param_1 == 0) {
local_30 = *(ulong *)(piVar1 + 0x3e);
lVar2 = ggml_nbytes(piVar1);
uVar3 = local_30 + lVar2;
local_40 = *(long *)(param_4 + 0xf8);
lVar2 = *(long *)(param_4 + 0x10);
for (; local_30 < uVar3; local_30 = *(long *)(piVar1 + 0xe) + local_30) {
local_54 = 0;
for (local_60 = 0; local_60 < lVar2; local_60 = local_60 + 1) {
if (param_2 == 0) {
*(int4 *)(local_40 + local_60 * 4) = DAT_00173ad8;
}
else if (param_2 == 1) {
*(int4 *)(local_40 + local_60 * 4) = 0;
}
else if (param_2 == 2) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x27d9,"fatal error");
}
for (local_64 = 0; local_64 < param_3; local_64 = local_64 + 1) {
if (*piVar1 == 0) {
local_78 = *(float *)(local_30 + (long)local_54 * 4);
}
else {
local_78 = (float)ggml_lookup_fp16_to_fp32
(*(int2 *)(local_30 + (long)local_54 * 2));
}
if (param_2 == 0) {
if (*(float *)(local_40 + local_60 * 4) < local_78) {
*(float *)(local_40 + local_60 * 4) = local_78;
}
}
else if (param_2 == 1) {
*(float *)(local_40 + local_60 * 4) = local_78 + *(float *)(local_40 + local_60 * 4);
}
else if (param_2 == 2) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x27e0,"fatal error");
}
local_54 = local_54 + 1;
}
if (param_2 != 0) {
if (param_2 == 1) {
*(float *)(local_40 + local_60 * 4) =
*(float *)(local_40 + local_60 * 4) / (float)param_3;
}
else if (param_2 == 2) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x27e7,"fatal error");
}
}
}
local_40 = lVar2 * 4 + local_40;
}
}
return;
}
|
|
60,572
|
google::protobuf::DescriptorBuilder::AddNotDefinedError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::Message const&, google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
void DescriptorBuilder::AddNotDefinedError(
const std::string& element_name, const Message& descriptor,
DescriptorPool::ErrorCollector::ErrorLocation location,
const std::string& undefined_symbol) {
if (possible_undeclared_dependency_ == nullptr &&
undefine_resolved_name_.empty()) {
AddError(element_name, descriptor, location,
"\"" + undefined_symbol + "\" is not defined.");
} else {
if (possible_undeclared_dependency_ != nullptr) {
AddError(element_name, descriptor, location,
"\"" + possible_undeclared_dependency_name_ +
"\" seems to be defined in \"" +
possible_undeclared_dependency_->name() +
"\", which is not "
"imported by \"" +
filename_ +
"\". To use it here, please "
"add the necessary import.");
}
if (!undefine_resolved_name_.empty()) {
AddError(element_name, descriptor, location,
"\"" + undefined_symbol + "\" is resolved to \"" +
undefine_resolved_name_ +
"\", which is not defined. "
"The innermost scope is searched first in name resolution. "
"Consider using a leading '.'(i.e., \"." +
undefined_symbol + "\") to start from the outermost scope.");
}
}
}
|
O0
|
cpp
|
google::protobuf::DescriptorBuilder::AddNotDefinedError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::Message const&, google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x268, %rsp # imm = 0x268
movq %rdi, 0x260(%rsp)
movq %rsi, 0x258(%rsp)
movq %rdx, 0x250(%rsp)
movl %ecx, 0x24c(%rsp)
movq %r8, 0x240(%rsp)
movq 0x260(%rsp), %rax
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x100(%rax)
jne 0x42b9e
movq 0x68(%rsp), %rdi
addq $0x128, %rdi # imm = 0x128
callq 0x147f0
testb $0x1, %al
jne 0x42ab3
jmp 0x42b9e
movq 0x258(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x250(%rsp), %rax
movq %rax, 0x50(%rsp)
movl 0x24c(%rsp), %eax
movl %eax, 0x5c(%rsp)
movq 0x240(%rsp), %rdx
leaq 0x1abd2f(%rip), %rsi # 0x1ee816
leaq 0x200(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x19210
movq 0x60(%rsp), %rsi
leaq 0x1ab0de(%rip), %rdx # 0x1edbe3
leaq 0x220(%rsp), %rdi
callq 0x191c0
jmp 0x42b14
movl 0x5c(%rsp), %ecx
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rsi
movq 0x68(%rsp), %rdi
leaq 0x220(%rsp), %r8
callq 0x42730
jmp 0x42b36
leaq 0x220(%rsp), %rdi
callq 0x13290
leaq 0x200(%rsp), %rdi
callq 0x13290
jmp 0x43032
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f8(%rsp)
movl %eax, 0x1f4(%rsp)
jmp 0x42b8c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f8(%rsp)
movl %eax, 0x1f4(%rsp)
leaq 0x220(%rsp), %rdi
callq 0x13290
leaq 0x200(%rsp), %rdi
callq 0x13290
jmp 0x4303a
movq 0x68(%rsp), %rax
cmpq $0x0, 0x100(%rax)
je 0x42df6
movq 0x68(%rsp), %rdx
movq 0x258(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x250(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x24c(%rsp), %eax
movl %eax, 0x3c(%rsp)
addq $0x108, %rdx # imm = 0x108
leaq 0x1abc2d(%rip), %rsi # 0x1ee816
leaq 0x130(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x19210
movq 0x40(%rsp), %rsi
leaq 0x1aafee(%rip), %rdx # 0x1edbf5
leaq 0x150(%rsp), %rdi
callq 0x191c0
jmp 0x42c16
movq 0x68(%rsp), %rax
movq 0x100(%rax), %rdi
callq 0x15860
movq %rax, 0x20(%rsp)
jmp 0x42c2e
movq 0x20(%rsp), %rdx
leaq 0x170(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0x26650
jmp 0x42c4a
leaq 0x1aafbf(%rip), %rdx # 0x1edc10
leaq 0x190(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x191c0
jmp 0x42c68
movq 0x68(%rsp), %rdx
addq $0x38, %rdx
leaq 0x1b0(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x26650
jmp 0x42c88
leaq 0x1aaf9f(%rip), %rdx # 0x1edc2e
leaq 0x1d0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x191c0
jmp 0x42ca6
movl 0x3c(%rsp), %ecx
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rsi
movq 0x68(%rsp), %rdi
leaq 0x1d0(%rsp), %r8
callq 0x42730
jmp 0x42cc8
leaq 0x1d0(%rsp), %rdi
callq 0x13290
leaq 0x1b0(%rsp), %rdi
callq 0x13290
leaq 0x190(%rsp), %rdi
callq 0x13290
leaq 0x170(%rsp), %rdi
callq 0x13290
leaq 0x150(%rsp), %rdi
callq 0x13290
leaq 0x130(%rsp), %rdi
callq 0x13290
jmp 0x42df6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f8(%rsp)
movl %eax, 0x1f4(%rsp)
jmp 0x42de4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f8(%rsp)
movl %eax, 0x1f4(%rsp)
jmp 0x42dd7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f8(%rsp)
movl %eax, 0x1f4(%rsp)
jmp 0x42dca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f8(%rsp)
movl %eax, 0x1f4(%rsp)
jmp 0x42dbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f8(%rsp)
movl %eax, 0x1f4(%rsp)
jmp 0x42db0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f8(%rsp)
movl %eax, 0x1f4(%rsp)
leaq 0x1d0(%rsp), %rdi
callq 0x13290
leaq 0x1b0(%rsp), %rdi
callq 0x13290
leaq 0x190(%rsp), %rdi
callq 0x13290
leaq 0x170(%rsp), %rdi
callq 0x13290
leaq 0x150(%rsp), %rdi
callq 0x13290
leaq 0x130(%rsp), %rdi
callq 0x13290
jmp 0x4303a
movq 0x68(%rsp), %rdi
addq $0x128, %rdi # imm = 0x128
callq 0x147f0
testb $0x1, %al
jne 0x43030
movq 0x258(%rsp), %rax
movq %rax, (%rsp)
movq 0x250(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x24c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x240(%rsp), %rdx
leaq 0x1ab9d4(%rip), %rsi # 0x1ee816
leaq 0x70(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x19210
movq 0x18(%rsp), %rsi
leaq 0x1aae06(%rip), %rdx # 0x1edc63
leaq 0x90(%rsp), %rdi
callq 0x191c0
jmp 0x42e6c
movq 0x68(%rsp), %rdx
addq $0x128, %rdx # imm = 0x128
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x26650
jmp 0x42e8f
leaq 0x1aade0(%rip), %rdx # 0x1edc76
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x191c0
jmp 0x42ead
movq 0x240(%rsp), %rdx
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x26650
jmp 0x42ecc
leaq 0x1aae1c(%rip), %rdx # 0x1edcef
leaq 0x110(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x191c0
jmp 0x42eea
movl 0x14(%rsp), %ecx
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
movq 0x68(%rsp), %rdi
leaq 0x110(%rsp), %r8
callq 0x42730
jmp 0x42f0b
leaq 0x110(%rsp), %rdi
callq 0x13290
leaq 0xf0(%rsp), %rdi
callq 0x13290
leaq 0xd0(%rsp), %rdi
callq 0x13290
leaq 0xb0(%rsp), %rdi
callq 0x13290
leaq 0x90(%rsp), %rdi
callq 0x13290
leaq 0x70(%rsp), %rdi
callq 0x13290
jmp 0x43030
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f8(%rsp)
movl %eax, 0x1f4(%rsp)
jmp 0x43024
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f8(%rsp)
movl %eax, 0x1f4(%rsp)
jmp 0x43017
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f8(%rsp)
movl %eax, 0x1f4(%rsp)
jmp 0x4300a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f8(%rsp)
movl %eax, 0x1f4(%rsp)
jmp 0x42ffd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f8(%rsp)
movl %eax, 0x1f4(%rsp)
jmp 0x42ff0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f8(%rsp)
movl %eax, 0x1f4(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x13290
leaq 0xf0(%rsp), %rdi
callq 0x13290
leaq 0xd0(%rsp), %rdi
callq 0x13290
leaq 0xb0(%rsp), %rdi
callq 0x13290
leaq 0x90(%rsp), %rdi
callq 0x13290
leaq 0x70(%rsp), %rdi
callq 0x13290
jmp 0x4303a
jmp 0x43032
addq $0x268, %rsp # imm = 0x268
retq
movq 0x1f8(%rsp), %rdi
callq 0x13750
nopw (%rax,%rax)
|
_ZN6google8protobuf17DescriptorBuilder18AddNotDefinedErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationES9_:
sub rsp, 268h
mov [rsp+268h+var_8], rdi
mov qword ptr [rsp+268h+var_10], rsi
mov [rsp+268h+var_18], rdx
mov [rsp+268h+var_1C], ecx
mov qword ptr [rsp+268h+var_28], r8
mov rax, [rsp+268h+var_8]
mov [rsp+268h+var_200], rax
cmp qword ptr [rax+100h], 0
jnz loc_42B9E
mov rdi, [rsp+268h+var_200]
add rdi, 128h
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_42AB3
jmp loc_42B9E
loc_42AB3:
mov rax, qword ptr [rsp+268h+var_10]
mov [rsp+268h+var_220], rax
mov rax, [rsp+268h+var_18]
mov [rsp+268h+var_218], rax
mov eax, [rsp+268h+var_1C]
mov [rsp+268h+var_20C], eax
mov rdx, qword ptr [rsp+268h+var_28]; int
lea rsi, aNoteThatEnumVa+82h; int
lea rdi, [rsp+268h+var_68]; int
mov [rsp+268h+var_208], rdi
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rsi, [rsp+268h+var_208]
lea rdx, aIsNotDefined; "\" is not defined."
lea rdi, [rsp+268h+var_48]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_42B14:
mov ecx, [rsp+268h+var_20C]
mov rdx, [rsp+268h+var_218]
mov rsi, [rsp+268h+var_220]
mov rdi, [rsp+268h+var_200]
lea r8, [rsp+268h+var_48]
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationES9_; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,std::string const&)
jmp short $+2
loc_42B36:
lea rdi, [rsp+268h+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+268h+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_43032
mov rcx, rax
mov eax, edx
mov [rsp+arg_1F0], rcx
mov [rsp+arg_1EC], eax
jmp short loc_42B8C
mov rcx, rax
mov eax, edx
mov [rsp+arg_1F0], rcx
mov [rsp+arg_1EC], eax
lea rdi, [rsp+arg_218]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_42B8C:
lea rdi, [rsp+arg_1F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_4303A
loc_42B9E:
mov rax, [rsp+268h+var_200]
cmp qword ptr [rax+100h], 0
jz loc_42DF6
mov rdx, [rsp+268h+var_200]
mov rax, qword ptr [rsp+268h+var_10]
mov qword ptr [rsp+268h+var_240], rax; int
mov rax, [rsp+268h+var_18]
mov [rsp+268h+var_238], rax; __int64
mov eax, [rsp+268h+var_1C]
mov [rsp+268h+var_22C], eax
add rdx, 108h; int
lea rsi, aNoteThatEnumVa+82h; int
lea rdi, [rsp+268h+var_138]; int
mov [rsp+268h+var_228], rdi
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rsi, [rsp+268h+var_228]
lea rdx, aSeemsToBeDefin; "\" seems to be defined in \""
lea rdi, [rsp+268h+var_118]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_42C16:
mov rax, [rsp+268h+var_200]
mov rdi, [rax+100h]
call _ZNK6google8protobuf14FileDescriptor4nameB5cxx11Ev; google::protobuf::FileDescriptor::name(void)
mov [rsp+268h+var_248], rax
jmp short $+2
loc_42C2E:
mov rdx, [rsp+268h+var_248]
lea rdi, [rsp+268h+var_F8]
lea rsi, [rsp+268h+var_118]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
jmp short $+2
loc_42C4A:
lea rdx, aWhichIsNotImpo; "\", which is not imported by \""
lea rdi, [rsp+268h+var_D8]
lea rsi, [rsp+268h+var_F8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_42C68:
mov rdx, [rsp+268h+var_200]
add rdx, 38h ; '8'
lea rdi, [rsp+268h+var_B8]
lea rsi, [rsp+268h+var_D8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
jmp short $+2
loc_42C88:
lea rdx, aToUseItHerePle; "\". To use it here, please add the nec"...
lea rdi, [rsp+268h+var_98]
lea rsi, [rsp+268h+var_B8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_42CA6:
mov ecx, [rsp+268h+var_22C]
mov rdx, [rsp+268h+var_238]
mov rsi, qword ptr [rsp+268h+var_240]
mov rdi, [rsp+268h+var_200]
lea r8, [rsp+268h+var_98]
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationES9_; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,std::string const&)
jmp short $+2
loc_42CC8:
lea rdi, [rsp+268h+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+268h+var_B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+268h+var_D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+268h+var_F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+268h+var_118]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+268h+var_138]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_42DF6
mov rcx, rax
mov eax, edx
mov [rsp+arg_1F0], rcx
mov [rsp+arg_1EC], eax
jmp loc_42DE4
mov rcx, rax
mov eax, edx
mov [rsp+arg_1F0], rcx
mov [rsp+arg_1EC], eax
jmp loc_42DD7
mov rcx, rax
mov eax, edx
mov [rsp+arg_1F0], rcx
mov [rsp+arg_1EC], eax
jmp short loc_42DCA
mov rcx, rax
mov eax, edx
mov [rsp+arg_1F0], rcx
mov [rsp+arg_1EC], eax
jmp short loc_42DBD
mov rcx, rax
mov eax, edx
mov [rsp+arg_1F0], rcx
mov [rsp+arg_1EC], eax
jmp short loc_42DB0
mov rcx, rax
mov eax, edx
mov [rsp+arg_1F0], rcx
mov [rsp+arg_1EC], eax
lea rdi, [rsp+arg_1C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_42DB0:
lea rdi, [rsp+arg_1A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_42DBD:
lea rdi, [rsp+arg_188]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_42DCA:
lea rdi, [rsp+arg_168]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_42DD7:
lea rdi, [rsp+arg_148]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_42DE4:
lea rdi, [rsp+arg_128]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_4303A
loc_42DF6:
mov rdi, [rsp+268h+var_200]
add rdi, 128h
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_43030
mov rax, qword ptr [rsp+268h+var_10]
mov qword ptr [rsp+268h+var_268], rax; int
mov rax, [rsp+268h+var_18]
mov qword ptr [rsp+268h+var_260], rax; int
mov eax, [rsp+268h+var_1C]
mov [rsp+268h+var_254], eax
mov rdx, qword ptr [rsp+268h+var_28]; int
lea rsi, aNoteThatEnumVa+82h; int
lea rdi, [rsp+268h+var_1F8]; int
mov qword ptr [rsp+268h+var_250], rdi; int
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rsi, qword ptr [rsp+268h+var_250]
lea rdx, aIsResolvedTo; "\" is resolved to \""
lea rdi, [rsp+268h+var_1D8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_42E6C:
mov rdx, [rsp+268h+var_200]
add rdx, 128h
lea rdi, [rsp+268h+var_1B8]
lea rsi, [rsp+268h+var_1D8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
jmp short $+2
loc_42E8F:
lea rdx, aWhichIsNotDefi; "\", which is not defined. The innermost"...
lea rdi, [rsp+268h+var_198]
lea rsi, [rsp+268h+var_1B8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_42EAD:
mov rdx, qword ptr [rsp+268h+var_28]
lea rdi, [rsp+268h+var_178]
lea rsi, [rsp+268h+var_198]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
jmp short $+2
loc_42ECC:
lea rdx, aToStartFromThe; "\") to start from the outermost scope."
lea rdi, [rsp+268h+var_158]
lea rsi, [rsp+268h+var_178]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_42EEA:
mov ecx, [rsp+268h+var_254]
mov rdx, qword ptr [rsp+268h+var_260]
mov rsi, qword ptr [rsp+268h+var_268]
mov rdi, [rsp+268h+var_200]
lea r8, [rsp+268h+var_158]
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationES9_; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,std::string const&)
jmp short $+2
loc_42F0B:
lea rdi, [rsp+268h+var_158]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+268h+var_178]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+268h+var_198]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+268h+var_1B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+268h+var_1D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+268h+var_1F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_43030
mov rcx, rax
mov eax, edx
mov [rsp+arg_1F0], rcx
mov [rsp+arg_1EC], eax
jmp loc_43024
mov rcx, rax
mov eax, edx
mov [rsp+arg_1F0], rcx
mov [rsp+arg_1EC], eax
jmp loc_43017
mov rcx, rax
mov eax, edx
mov [rsp+arg_1F0], rcx
mov [rsp+arg_1EC], eax
jmp short loc_4300A
mov rcx, rax
mov eax, edx
mov [rsp+arg_1F0], rcx
mov [rsp+arg_1EC], eax
jmp short loc_42FFD
mov rcx, rax
mov eax, edx
mov [rsp+arg_1F0], rcx
mov [rsp+arg_1EC], eax
jmp short loc_42FF0
mov rcx, rax
mov eax, edx
mov [rsp+arg_1F0], rcx
mov [rsp+arg_1EC], eax
lea rdi, [rsp+arg_108]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_42FF0:
lea rdi, [rsp+arg_E8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_42FFD:
lea rdi, [rsp+arg_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_4300A:
lea rdi, [rsp+arg_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_43017:
lea rdi, [rsp+arg_88]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_43024:
lea rdi, [rsp+arg_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_4303A
loc_43030:
jmp short $+2
loc_43032:
add rsp, 268h
retn
loc_4303A:
mov rdi, [rsp+arg_1F0]
call __Unwind_Resume
|
char google::protobuf::DescriptorBuilder::AddNotDefinedError(
long long a1,
long long a2,
long long a3,
unsigned int a4,
long long a5)
{
char result; // al
long long v6; // [rsp+0h] [rbp-268h]
long long v7; // [rsp+8h] [rbp-260h]
unsigned int v8; // [rsp+14h] [rbp-254h]
long long v9; // [rsp+20h] [rbp-248h]
long long v10; // [rsp+28h] [rbp-240h]
long long v11; // [rsp+30h] [rbp-238h]
unsigned int v12; // [rsp+3Ch] [rbp-22Ch]
long long v13; // [rsp+48h] [rbp-220h]
long long v14; // [rsp+50h] [rbp-218h]
unsigned int v15; // [rsp+5Ch] [rbp-20Ch]
int v16[8]; // [rsp+70h] [rbp-1F8h] BYREF
_BYTE v17[32]; // [rsp+90h] [rbp-1D8h] BYREF
_BYTE v18[32]; // [rsp+B0h] [rbp-1B8h] BYREF
_BYTE v19[32]; // [rsp+D0h] [rbp-198h] BYREF
_BYTE v20[32]; // [rsp+F0h] [rbp-178h] BYREF
_BYTE v21[32]; // [rsp+110h] [rbp-158h] BYREF
int v22[8]; // [rsp+130h] [rbp-138h] BYREF
_BYTE v23[32]; // [rsp+150h] [rbp-118h] BYREF
_BYTE v24[32]; // [rsp+170h] [rbp-F8h] BYREF
_BYTE v25[32]; // [rsp+190h] [rbp-D8h] BYREF
_BYTE v26[32]; // [rsp+1B0h] [rbp-B8h] BYREF
_BYTE v27[48]; // [rsp+1D0h] [rbp-98h] BYREF
int v28[8]; // [rsp+200h] [rbp-68h] BYREF
_BYTE v29[32]; // [rsp+220h] [rbp-48h] BYREF
int v30[2]; // [rsp+240h] [rbp-28h]
unsigned int v31; // [rsp+24Ch] [rbp-1Ch]
long long v32; // [rsp+250h] [rbp-18h]
int v33[2]; // [rsp+258h] [rbp-10h]
long long v34; // [rsp+260h] [rbp-8h]
v34 = a1;
*(_QWORD *)v33 = a2;
v32 = a3;
v31 = a4;
*(_QWORD *)v30 = a5;
if ( *(_QWORD *)(a1 + 256) || !std::string::empty(a1 + 296) )
{
if ( *(_QWORD *)(a1 + 256) )
{
v10 = *(_QWORD *)v33;
v11 = v32;
v12 = v31;
std::operator+<char>((long long)v22, (long long)"\"", a1 + 264);
std::operator+<char>((long long)v23, (long long)v22, (long long)"\" seems to be defined in \"");
v9 = google::protobuf::FileDescriptor::name[abi:cxx11](*(_QWORD *)(a1 + 256));
std::operator+<char>((long long)v24, (long long)v23, v9);
std::operator+<char>((long long)v25, (long long)v24, (long long)"\", which is not imported by \"");
std::operator+<char>((long long)v26, (long long)v25, a1 + 56);
std::operator+<char>((long long)v27, (long long)v26, (long long)"\". To use it here, please add the necessary import.");
google::protobuf::DescriptorBuilder::AddError(a1, v10, v11, v12, (long long)v27);
std::string::~string(v27);
std::string::~string(v26);
std::string::~string(v25);
std::string::~string(v24);
std::string::~string(v23);
std::string::~string(v22);
}
result = std::string::empty(a1 + 296);
if ( (result & 1) == 0 )
{
v6 = *(_QWORD *)v33;
v7 = v32;
v8 = v31;
std::operator+<char>((long long)v16, (long long)"\"", *(long long *)v30);
std::operator+<char>((long long)v17, (long long)v16, (long long)"\" is resolved to \"");
std::operator+<char>((long long)v18, (long long)v17, a1 + 296);
std::operator+<char>(
(long long)v19,
(long long)v18,
(long long)"\", which is not defined. The innermost scope is searched first in name resolution. Consider using a le"
"ading '.'(i.e., \".");
std::operator+<char>((long long)v20, (long long)v19, *(long long *)v30);
std::operator+<char>((long long)v21, (long long)v20, (long long)"\") to start from the outermost scope.");
google::protobuf::DescriptorBuilder::AddError(a1, v6, v7, v8, (long long)v21);
std::string::~string(v21);
std::string::~string(v20);
std::string::~string(v19);
std::string::~string(v18);
std::string::~string(v17);
return std::string::~string(v16);
}
}
else
{
v13 = *(_QWORD *)v33;
v14 = v32;
v15 = v31;
std::operator+<char>((long long)v28, (long long)"\"", *(long long *)v30);
std::operator+<char>((long long)v29, (long long)v28, (long long)"\" is not defined.");
google::protobuf::DescriptorBuilder::AddError(a1, v13, v14, v15, (long long)v29);
std::string::~string(v29);
return std::string::~string(v28);
}
return result;
}
|
AddNotDefinedError:
SUB RSP,0x268
MOV qword ptr [RSP + 0x260],RDI
MOV qword ptr [RSP + 0x258],RSI
MOV qword ptr [RSP + 0x250],RDX
MOV dword ptr [RSP + 0x24c],ECX
MOV qword ptr [RSP + 0x240],R8
MOV RAX,qword ptr [RSP + 0x260]
MOV qword ptr [RSP + 0x68],RAX
CMP qword ptr [RAX + 0x100],0x0
JNZ 0x00142b9e
MOV RDI,qword ptr [RSP + 0x68]
ADD RDI,0x128
CALL 0x001147f0
TEST AL,0x1
JNZ 0x00142ab3
JMP 0x00142b9e
LAB_00142ab3:
MOV RAX,qword ptr [RSP + 0x258]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x250]
MOV qword ptr [RSP + 0x50],RAX
MOV EAX,dword ptr [RSP + 0x24c]
MOV dword ptr [RSP + 0x5c],EAX
MOV RDX,qword ptr [RSP + 0x240]
LEA RSI,[0x2ee816]
LEA RDI,[RSP + 0x200]
MOV qword ptr [RSP + 0x60],RDI
CALL 0x00119210
MOV RSI,qword ptr [RSP + 0x60]
LAB_00142afe:
LEA RDX,[0x2edbe3]
LEA RDI,[RSP + 0x220]
CALL 0x001191c0
JMP 0x00142b14
LAB_00142b14:
MOV ECX,dword ptr [RSP + 0x5c]
MOV RDX,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RSP + 0x68]
LEA R8,[RSP + 0x220]
CALL 0x00142730
LAB_00142b34:
JMP 0x00142b36
LAB_00142b36:
LEA RDI,[RSP + 0x220]
CALL 0x00113290
LEA RDI,[RSP + 0x200]
CALL 0x00113290
JMP 0x00143032
LAB_00142b9e:
MOV RAX,qword ptr [RSP + 0x68]
CMP qword ptr [RAX + 0x100],0x0
JZ 0x00142df6
MOV RDX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RSP + 0x258]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x250]
MOV qword ptr [RSP + 0x30],RAX
MOV EAX,dword ptr [RSP + 0x24c]
MOV dword ptr [RSP + 0x3c],EAX
ADD RDX,0x108
LEA RSI,[0x2ee816]
LEA RDI,[RSP + 0x130]
MOV qword ptr [RSP + 0x40],RDI
CALL 0x00119210
MOV RSI,qword ptr [RSP + 0x40]
LAB_00142c00:
LEA RDX,[0x2edbf5]
LEA RDI,[RSP + 0x150]
CALL 0x001191c0
JMP 0x00142c16
LAB_00142c16:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDI,qword ptr [RAX + 0x100]
LAB_00142c22:
CALL 0x00115860
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00142c2e
LAB_00142c2e:
MOV RDX,qword ptr [RSP + 0x20]
LEA RDI,[RSP + 0x170]
LEA RSI,[RSP + 0x150]
CALL 0x00126650
JMP 0x00142c4a
LAB_00142c4a:
LEA RDX,[0x2edc10]
LEA RDI,[RSP + 0x190]
LEA RSI,[RSP + 0x170]
CALL 0x001191c0
JMP 0x00142c68
LAB_00142c68:
MOV RDX,qword ptr [RSP + 0x68]
ADD RDX,0x38
LAB_00142c71:
LEA RDI,[RSP + 0x1b0]
LEA RSI,[RSP + 0x190]
CALL 0x00126650
JMP 0x00142c88
LAB_00142c88:
LEA RDX,[0x2edc2e]
LEA RDI,[RSP + 0x1d0]
LEA RSI,[RSP + 0x1b0]
CALL 0x001191c0
JMP 0x00142ca6
LAB_00142ca6:
MOV ECX,dword ptr [RSP + 0x3c]
MOV RDX,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RSP + 0x68]
LEA R8,[RSP + 0x1d0]
CALL 0x00142730
LAB_00142cc6:
JMP 0x00142cc8
LAB_00142cc8:
LEA RDI,[RSP + 0x1d0]
CALL 0x00113290
LEA RDI,[RSP + 0x1b0]
CALL 0x00113290
LEA RDI,[RSP + 0x190]
CALL 0x00113290
LEA RDI,[RSP + 0x170]
CALL 0x00113290
LEA RDI,[RSP + 0x150]
CALL 0x00113290
LEA RDI,[RSP + 0x130]
CALL 0x00113290
JMP 0x00142df6
LAB_00142df6:
MOV RDI,qword ptr [RSP + 0x68]
ADD RDI,0x128
CALL 0x001147f0
TEST AL,0x1
JNZ 0x00143030
MOV RAX,qword ptr [RSP + 0x258]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x250]
MOV qword ptr [RSP + 0x8],RAX
MOV EAX,dword ptr [RSP + 0x24c]
MOV dword ptr [RSP + 0x14],EAX
MOV RDX,qword ptr [RSP + 0x240]
LEA RSI,[0x2ee816]
LEA RDI,[RSP + 0x70]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00119210
MOV RSI,qword ptr [RSP + 0x18]
LAB_00142e56:
LEA RDX,[0x2edc63]
LEA RDI,[RSP + 0x90]
CALL 0x001191c0
JMP 0x00142e6c
LAB_00142e6c:
MOV RDX,qword ptr [RSP + 0x68]
ADD RDX,0x128
LAB_00142e78:
LEA RDI,[RSP + 0xb0]
LEA RSI,[RSP + 0x90]
CALL 0x00126650
JMP 0x00142e8f
LAB_00142e8f:
LEA RDX,[0x2edc76]
LEA RDI,[RSP + 0xd0]
LEA RSI,[RSP + 0xb0]
CALL 0x001191c0
JMP 0x00142ead
LAB_00142ead:
MOV RDX,qword ptr [RSP + 0x240]
LAB_00142eb5:
LEA RDI,[RSP + 0xf0]
LEA RSI,[RSP + 0xd0]
CALL 0x00126650
JMP 0x00142ecc
LAB_00142ecc:
LEA RDX,[0x2edcef]
LEA RDI,[RSP + 0x110]
LEA RSI,[RSP + 0xf0]
CALL 0x001191c0
JMP 0x00142eea
LAB_00142eea:
MOV ECX,dword ptr [RSP + 0x14]
MOV RDX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x68]
LEA R8,[RSP + 0x110]
CALL 0x00142730
LAB_00142f09:
JMP 0x00142f0b
LAB_00142f0b:
LEA RDI,[RSP + 0x110]
CALL 0x00113290
LEA RDI,[RSP + 0xf0]
CALL 0x00113290
LEA RDI,[RSP + 0xd0]
CALL 0x00113290
LEA RDI,[RSP + 0xb0]
CALL 0x00113290
LEA RDI,[RSP + 0x90]
CALL 0x00113290
LEA RDI,[RSP + 0x70]
CALL 0x00113290
JMP 0x00143030
LAB_00143030:
JMP 0x00143032
LAB_00143032:
ADD RSP,0x268
RET
|
/* google::protobuf::DescriptorBuilder::AddNotDefinedError(std::__cxx11::string const&,
google::protobuf::Message const&,
google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation, std::__cxx11::string const&) */
void __thiscall
google::protobuf::DescriptorBuilder::AddNotDefinedError
(DescriptorBuilder *this,int8 param_1,int8 param_2,int4 param_4,
int8 param_5)
{
int4 uVar1;
int8 uVar2;
int8 uVar3;
ulong uVar4;
string local_1f8 [32];
string local_1d8 [32];
string local_1b8 [32];
string local_198 [32];
string local_178 [32];
string local_158 [32];
string local_138 [32];
string local_118 [32];
string local_f8 [32];
string local_d8 [32];
string local_b8 [32];
string local_98 [48];
string local_68 [32];
string local_48 [32];
int8 local_28;
int4 local_1c;
int8 local_18;
int8 local_10;
DescriptorBuilder *local_8;
local_28 = param_5;
local_1c = param_4;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
if ((*(long *)(this + 0x100) == 0) &&
(uVar4 = std::__cxx11::string::empty((string *)(this + 0x128)), uVar3 = local_10,
uVar2 = local_18, uVar1 = local_1c, (uVar4 & 1) != 0)) {
std::operator+((char *)local_68,(string *)0x2ee816);
/* try { // try from 00142afe to 00142b11 has its CatchHandler @ 00142b55 */
std::operator+(local_48,(char *)local_68);
/* try { // try from 00142b14 to 00142b33 has its CatchHandler @ 00142b6b */
AddError(this,uVar3,uVar2,uVar1,local_48);
std::__cxx11::string::~string(local_48);
std::__cxx11::string::~string(local_68);
}
else {
uVar3 = local_10;
uVar2 = local_18;
uVar1 = local_1c;
if (*(long *)(this + 0x100) != 0) {
std::operator+((char *)local_138,(string *)0x2ee816);
/* try { // try from 00142c00 to 00142c13 has its CatchHandler @ 00142d1b */
std::operator+(local_118,(char *)local_138);
/* try { // try from 00142c22 to 00142c47 has its CatchHandler @ 00142d34 */
FileDescriptor::name_abi_cxx11_(*(FileDescriptor **)(this + 0x100));
std::operator+(local_f8,local_118);
/* try { // try from 00142c4a to 00142c65 has its CatchHandler @ 00142d4d */
std::operator+(local_d8,(char *)local_f8);
/* try { // try from 00142c71 to 00142c85 has its CatchHandler @ 00142d63 */
std::operator+(local_b8,local_d8);
/* try { // try from 00142c88 to 00142ca3 has its CatchHandler @ 00142d79 */
std::operator+(local_98,(char *)local_b8);
/* try { // try from 00142ca6 to 00142cc5 has its CatchHandler @ 00142d8f */
AddError(this,uVar3,uVar2,uVar1,local_98);
std::__cxx11::string::~string(local_98);
std::__cxx11::string::~string(local_b8);
std::__cxx11::string::~string(local_d8);
std::__cxx11::string::~string(local_f8);
std::__cxx11::string::~string(local_118);
std::__cxx11::string::~string(local_138);
}
uVar4 = std::__cxx11::string::empty((string *)(this + 0x128));
uVar3 = local_10;
uVar2 = local_18;
uVar1 = local_1c;
if ((uVar4 & 1) == 0) {
std::operator+((char *)local_1f8,(string *)0x2ee816);
/* try { // try from 00142e56 to 00142e69 has its CatchHandler @ 00142f5b */
std::operator+(local_1d8,(char *)local_1f8);
/* try { // try from 00142e78 to 00142e8c has its CatchHandler @ 00142f74 */
std::operator+(local_1b8,local_1d8);
/* try { // try from 00142e8f to 00142eaa has its CatchHandler @ 00142f8d */
std::operator+(local_198,(char *)local_1b8);
/* try { // try from 00142eb5 to 00142ec9 has its CatchHandler @ 00142fa3 */
std::operator+(local_178,local_198);
/* try { // try from 00142ecc to 00142ee7 has its CatchHandler @ 00142fb9 */
std::operator+(local_158,(char *)local_178);
/* try { // try from 00142eea to 00142f08 has its CatchHandler @ 00142fcf */
AddError(this,uVar3,uVar2,uVar1,local_158);
std::__cxx11::string::~string(local_158);
std::__cxx11::string::~string(local_178);
std::__cxx11::string::~string(local_198);
std::__cxx11::string::~string(local_1b8);
std::__cxx11::string::~string(local_1d8);
std::__cxx11::string::~string(local_1f8);
}
}
return;
}
|
|
60,573
|
ma_put_key_in_record
|
eloqsql/storage/maria/ma_key.c
|
static int _ma_put_key_in_record(register MARIA_HA *info, uint keynr,
my_bool unpack_blobs, uchar *record)
{
reg2 uchar *key;
uchar *pos,*key_end;
reg1 HA_KEYSEG *keyseg;
uchar *blob_ptr;
DBUG_ENTER("_ma_put_key_in_record");
blob_ptr= info->lastkey_buff2; /* Place to put blob parts */
key= info->last_key.data; /* Key that was read */
key_end= key + info->last_key.data_length;
for (keyseg=info->s->keyinfo[keynr].seg ; keyseg->type ;keyseg++)
{
if (keyseg->null_bit)
{
if (!*key++)
{
record[keyseg->null_pos]|= keyseg->null_bit;
continue;
}
record[keyseg->null_pos]&= ~keyseg->null_bit;
}
if (keyseg->type == HA_KEYTYPE_BIT)
{
uint length= keyseg->length;
if (keyseg->bit_length)
{
uchar bits= *key++;
set_rec_bits(bits, record + keyseg->bit_pos, keyseg->bit_start,
keyseg->bit_length);
length--;
}
else
{
clr_rec_bits(record + keyseg->bit_pos, keyseg->bit_start,
keyseg->bit_length);
}
memcpy(record + keyseg->start, key, length);
key+= length;
continue;
}
if (keyseg->flag & HA_SPACE_PACK)
{
uint length;
get_key_length(length,key);
#ifdef CHECK_KEYS
if (length > keyseg->length || key+length > key_end)
goto err;
#endif
pos= record+keyseg->start;
if (keyseg->type != (int) HA_KEYTYPE_NUM)
{
memcpy(pos,key,(size_t) length);
my_ci_fill(keyseg->charset, (char*) pos + length,
keyseg->length - length,
' ');
}
else
{
bfill(pos,keyseg->length-length,' ');
memcpy(pos+keyseg->length-length,key,(size_t) length);
}
key+=length;
continue;
}
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint length;
get_key_length(length,key);
#ifdef CHECK_KEYS
if (length > keyseg->length || key+length > key_end)
goto err;
#endif
/* Store key length */
if (keyseg->bit_start == 1)
*(uchar*) (record+keyseg->start)= (uchar) length;
else
int2store(record+keyseg->start, length);
/* And key data */
memcpy(record+keyseg->start + keyseg->bit_start, key, length);
key+= length;
}
else if (keyseg->flag & HA_BLOB_PART)
{
uint length;
get_key_length(length,key);
#ifdef CHECK_KEYS
if (length > keyseg->length || key+length > key_end)
goto err;
#endif
if (unpack_blobs)
{
memcpy(record+keyseg->start+keyseg->bit_start,
&blob_ptr, sizeof(char*));
memcpy(blob_ptr,key,length);
blob_ptr+=length;
/* The above changed info->lastkey2. Inform maria_rnext_same(). */
info->update&= ~HA_STATE_RNEXT_SAME;
_ma_store_blob_length(record+keyseg->start,
(uint) keyseg->bit_start,length);
}
key+=length;
}
else if (keyseg->flag & HA_SWAP_KEY)
{
uchar *to= record+keyseg->start+keyseg->length;
uchar *end= key+keyseg->length;
#ifdef CHECK_KEYS
if (end > key_end)
goto err;
#endif
do
{
*--to= *key++;
} while (key != end);
continue;
}
else
{
#ifdef CHECK_KEYS
if (key+keyseg->length > key_end)
goto err;
#endif
memcpy(record+keyseg->start, key, (size_t) keyseg->length);
key+= keyseg->length;
}
}
DBUG_RETURN(0);
err:
DBUG_PRINT("info",("error"));
DBUG_RETURN(1); /* Crashed row */
}
|
O3
|
c
|
ma_put_key_in_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r12
movl %edx, -0x44(%rbp)
movq (%rdi), %rax
movq 0x570(%rax), %rax
movl %esi, %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
movq 0xc0(%rax,%rcx), %r15
movb 0x18(%r15), %cl
testb %cl, %cl
je 0x42ad7
movq 0x200(%rdi), %r13
movl 0x210(%rdi), %eax
addq %r13, %rax
movq %rax, -0x40(%rbp)
leaq 0x18(%r15), %rax
movq %rdi, -0x60(%rbp)
movq 0x390(%rdi), %rdx
movq %rdx, -0x50(%rbp)
leaq -0x1(%r12), %rdx
movq %rdx, -0x58(%rbp)
movq %r12, -0x30(%rbp)
movb 0x19(%r15), %dl
testb %dl, %dl
je 0x42789
leaq 0x1(%r13), %rbx
cmpb $0x0, (%r13)
je 0x4285b
notb %dl
movl 0xc(%r15), %ecx
andb %dl, (%r12,%rcx)
movb (%rax), %cl
movq %rbx, %r13
cmpb $0x13, %cl
jne 0x4280b
movzwl 0x14(%r15), %esi
movzbl 0x1b(%r15), %eax
testl %eax, %eax
je 0x4287c
movzbl (%r13), %edi
movzwl 0x10(%r15), %r8d
movzbl 0x1a(%r15), %edx
movl $0xffffffff, %r9d # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r9d
notl %r9d
movl %edx, %ecx
shll %cl, %r9d
movzbl (%r12,%r8), %ecx
notl %r9d
andl %ecx, %r9d
movl %edi, %r10d
movl %edx, %ecx
shll %cl, %r10d
orl %r9d, %r10d
movb %r10b, (%r12,%r8)
addl %edx, %eax
cmpl $0x9, %eax
jb 0x42801
movzbl 0x1(%r12,%r8), %r9d
addb $-0x8, %al
movl %eax, %ecx
shrl %cl, %r9d
shll %cl, %r9d
movb $0x8, %cl
subb %dl, %cl
shrl %cl, %edi
orl %r9d, %edi
movb %dil, 0x1(%r12,%r8)
incq %r13
decl %esi
jmp 0x4289a
movzwl 0x12(%r15), %eax
testb $0x1, %al
jne 0x42868
testb $0x8, %al
jne 0x428ba
testb $0x20, %al
jne 0x42978
movzwl 0x14(%r15), %edx
leaq (%rdx,%r13), %rcx
testb $0x40, %al
jne 0x42a07
cmpq -0x40(%rbp), %rcx
ja 0x42ae8
movl 0x8(%r15), %edi
addq %r12, %rdi
movq %r13, %rsi
callq 0x2a0a0
movzwl 0x14(%r15), %ebx
addq %r13, %rbx
jmp 0x42aba
movl 0xc(%r15), %eax
orb %dl, (%r12,%rax)
jmp 0x42aba
movzbl (%r13), %edi
cmpl $0xff, %edi
je 0x428d5
movl $0x1, %esi
jmp 0x428e6
movzbl 0x1a(%r15), %ecx
cmpl $0x9, %ecx
jb 0x4289a
addb $-0x8, %cl
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
shll %cl, %eax
movzwl 0x10(%r15), %ecx
andb %al, 0x1(%r12,%rcx)
movl 0x8(%r15), %edi
addq %r12, %rdi
movl %esi, %r14d
movq %r13, %rsi
movq %r14, %rdx
callq 0x2a0a0
addq %r14, %r13
movq %r13, %rbx
jmp 0x42aba
movzbl (%r13), %ecx
cmpl $0xff, %ecx
je 0x42993
movl $0x1, %edx
jmp 0x429a4
movzwl 0x1(%r13), %eax
rolw $0x8, %ax
movzwl %ax, %edi
movl $0x3, %esi
movzwl 0x14(%r15), %edx
movl $0x1, %eax
subl %edi, %edx
jb 0x42ad9
addq %rsi, %r13
movl %edi, %r14d
leaq (%r14,%r13), %rbx
cmpq -0x40(%rbp), %rbx
ja 0x42ad9
movl 0x8(%r15), %r12d
addq -0x30(%rbp), %r12
cmpb $0x7, %cl
jne 0x4293e
movq %r12, %rdi
movl $0x20, %esi
callq 0x2a290
movzwl 0x14(%r15), %edi
addq %r12, %rdi
subq %r14, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x2a0a0
jmp 0x4296f
movl %edi, -0x34(%rbp)
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x2a0a0
movq (%r15), %rdi
addq %r14, %r12
movzwl 0x14(%r15), %edx
subl -0x34(%rbp), %edx
movq 0xb8(%rdi), %rax
movq %r12, %rsi
movl $0x20, %ecx
callq *0x78(%rax)
movq -0x30(%rbp), %r12
jmp 0x42aba
movzbl (%r13), %esi
cmpl $0xff, %esi
je 0x42a2d
movl $0x1, %ecx
jmp 0x42a3e
movzwl 0x1(%r13), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
movl $0x3, %edx
movzwl 0x14(%r15), %esi
movl $0x1, %eax
cmpl %esi, %ecx
ja 0x42ad9
addq %rdx, %r13
movl %ecx, %edx
leaq (%rdx,%r13), %rbx
cmpq -0x40(%rbp), %rbx
ja 0x42ad9
cmpb $0x1, 0x1a(%r15)
jne 0x429de
movl 0x8(%r15), %eax
movq -0x30(%rbp), %r12
movb %cl, (%r12,%rax)
jmp 0x429eb
movl 0x8(%r15), %eax
movq -0x30(%rbp), %r12
movw %cx, (%r12,%rax)
movl 0x8(%r15), %eax
addq %r12, %rax
movzbl 0x1a(%r15), %edi
addq %rax, %rdi
movq %r13, %rsi
callq 0x2a0a0
jmp 0x42aba
cmpq -0x40(%rbp), %rcx
ja 0x42ae8
movl 0x8(%r15), %eax
addq -0x58(%rbp), %rax
movb (%r13), %cl
incq %r13
movb %cl, (%rax,%rdx)
decq %rdx
jne 0x42a19
jmp 0x428b2
movzwl 0x1(%r13), %eax
rolw $0x8, %ax
movzwl %ax, %esi
movl $0x3, %ecx
movzwl 0x14(%r15), %edx
movl $0x1, %eax
cmpl %edx, %esi
ja 0x42ad9
addq %rcx, %r13
movl %esi, %r12d
leaq (%r12,%r13), %rbx
cmpq -0x40(%rbp), %rbx
ja 0x42ad9
cmpb $0x0, -0x44(%rbp)
je 0x4296f
movl 0x8(%r15), %eax
addq -0x30(%rbp), %rax
movzbl 0x1a(%r15), %ecx
movq -0x50(%rbp), %r14
movq %r14, (%rcx,%rax)
movq %r14, %rdi
movl %esi, -0x34(%rbp)
movq %r13, %rsi
movq %r12, %rdx
callq 0x2a0a0
movq -0x60(%rbp), %rax
andb $-0x11, 0x625(%rax)
addq %r12, %r14
movq %r14, -0x50(%rbp)
movq -0x30(%rbp), %r12
movl 0x8(%r15), %edi
addq %r12, %rdi
movzbl 0x1a(%r15), %esi
movl -0x34(%rbp), %edx
callq 0x499c2
leaq 0x20(%r15), %rdx
movb 0x38(%r15), %cl
addq $0x38, %r15
movq %r15, %rax
movq %rbx, %r13
movq %rdx, %r15
testb %cl, %cl
jne 0x42763
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x42ad9
|
_ma_put_key_in_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12, rcx
mov [rbp+var_44], edx
mov rax, [rdi]
mov rax, [rax+570h]
mov ecx, esi
imul rcx, 118h
mov r15, [rax+rcx+0C0h]
mov cl, [r15+18h]
test cl, cl
jz loc_42AD7
mov r13, [rdi+200h]
mov eax, [rdi+210h]
add rax, r13
mov [rbp+var_40], rax
lea rax, [r15+18h]
mov [rbp+var_60], rdi
mov rdx, [rdi+390h]
mov [rbp+var_50], rdx
lea rdx, [r12-1]
mov [rbp+var_58], rdx
mov [rbp+var_30], r12
loc_42763:
mov dl, [r15+19h]
test dl, dl
jz short loc_42789
lea rbx, [r13+1]
cmp byte ptr [r13+0], 0
jz loc_4285B
not dl
mov ecx, [r15+0Ch]
and [r12+rcx], dl
mov cl, [rax]
mov r13, rbx
loc_42789:
cmp cl, 13h
jnz short loc_4280B
movzx esi, word ptr [r15+14h]
movzx eax, byte ptr [r15+1Bh]
test eax, eax
jz loc_4287C
movzx edi, byte ptr [r13+0]
movzx r8d, word ptr [r15+10h]
movzx edx, byte ptr [r15+1Ah]
mov r9d, 0FFFFFFFFh
mov ecx, eax
shl r9d, cl
not r9d
mov ecx, edx
shl r9d, cl
movzx ecx, byte ptr [r12+r8]
not r9d
and r9d, ecx
mov r10d, edi
mov ecx, edx
shl r10d, cl
or r10d, r9d
mov [r12+r8], r10b
add eax, edx
cmp eax, 9
jb short loc_42801
movzx r9d, byte ptr [r12+r8+1]
add al, 0F8h
mov ecx, eax
shr r9d, cl
shl r9d, cl
mov cl, 8
sub cl, dl
shr edi, cl
or edi, r9d
mov [r12+r8+1], dil
loc_42801:
inc r13
dec esi
jmp loc_4289A
loc_4280B:
movzx eax, word ptr [r15+12h]
test al, 1
jnz short loc_42868
test al, 8
jnz loc_428BA
test al, 20h
jnz loc_42978
movzx edx, word ptr [r15+14h]
lea rcx, [rdx+r13]
test al, 40h
jnz loc_42A07
cmp rcx, [rbp+var_40]
ja loc_42AE8
mov edi, [r15+8]
add rdi, r12
mov rsi, r13
call _memcpy
movzx ebx, word ptr [r15+14h]
add rbx, r13
jmp loc_42ABA
loc_4285B:
mov eax, [r15+0Ch]
or [r12+rax], dl
jmp loc_42ABA
loc_42868:
movzx edi, byte ptr [r13+0]
cmp edi, 0FFh
jz short loc_428D5
mov esi, 1
jmp short loc_428E6
loc_4287C:
movzx ecx, byte ptr [r15+1Ah]
cmp ecx, 9
jb short loc_4289A
add cl, 0F8h
mov eax, 0FFFFFFFFh
shl eax, cl
movzx ecx, word ptr [r15+10h]
and [r12+rcx+1], al
loc_4289A:
mov edi, [r15+8]
add rdi, r12
mov r14d, esi
mov rsi, r13
mov rdx, r14
call _memcpy
add r13, r14
loc_428B2:
mov rbx, r13
jmp loc_42ABA
loc_428BA:
movzx ecx, byte ptr [r13+0]
cmp ecx, 0FFh
jz loc_42993
mov edx, 1
jmp loc_429A4
loc_428D5:
movzx eax, word ptr [r13+1]
rol ax, 8
movzx edi, ax
mov esi, 3
loc_428E6:
movzx edx, word ptr [r15+14h]
mov eax, 1
sub edx, edi
jb loc_42AD9
add r13, rsi
mov r14d, edi
lea rbx, [r14+r13]
cmp rbx, [rbp+var_40]
ja loc_42AD9
mov r12d, [r15+8]
add r12, [rbp+var_30]
cmp cl, 7
jnz short loc_4293E
mov rdi, r12
mov esi, 20h ; ' '
call _memset
movzx edi, word ptr [r15+14h]
add rdi, r12
sub rdi, r14
mov rsi, r13
mov rdx, r14
call _memcpy
jmp short loc_4296F
loc_4293E:
mov [rbp+var_34], edi
mov rdi, r12
mov rsi, r13
mov rdx, r14
call _memcpy
mov rdi, [r15]
add r12, r14
movzx edx, word ptr [r15+14h]
sub edx, [rbp+var_34]
mov rax, [rdi+0B8h]
mov rsi, r12
mov ecx, 20h ; ' '
call qword ptr [rax+78h]
loc_4296F:
mov r12, [rbp+var_30]
jmp loc_42ABA
loc_42978:
movzx esi, byte ptr [r13+0]
cmp esi, 0FFh
jz loc_42A2D
mov ecx, 1
jmp loc_42A3E
loc_42993:
movzx eax, word ptr [r13+1]
rol ax, 8
movzx ecx, ax
mov edx, 3
loc_429A4:
movzx esi, word ptr [r15+14h]
mov eax, 1
cmp ecx, esi
ja loc_42AD9
add r13, rdx
mov edx, ecx
lea rbx, [rdx+r13]
cmp rbx, [rbp+var_40]
ja loc_42AD9
cmp byte ptr [r15+1Ah], 1
jnz short loc_429DE
mov eax, [r15+8]
mov r12, [rbp+var_30]
mov [r12+rax], cl
jmp short loc_429EB
loc_429DE:
mov eax, [r15+8]
mov r12, [rbp+var_30]
mov [r12+rax], cx
loc_429EB:
mov eax, [r15+8]
add rax, r12
movzx edi, byte ptr [r15+1Ah]
add rdi, rax
mov rsi, r13
call _memcpy
jmp loc_42ABA
loc_42A07:
cmp rcx, [rbp+var_40]
ja loc_42AE8
mov eax, [r15+8]
add rax, [rbp+var_58]
loc_42A19:
mov cl, [r13+0]
inc r13
mov [rax+rdx], cl
dec rdx
jnz short loc_42A19
jmp loc_428B2
loc_42A2D:
movzx eax, word ptr [r13+1]
rol ax, 8
movzx esi, ax
mov ecx, 3
loc_42A3E:
movzx edx, word ptr [r15+14h]
mov eax, 1
cmp esi, edx
ja loc_42AD9
add r13, rcx
mov r12d, esi
lea rbx, [r12+r13]
cmp rbx, [rbp+var_40]
ja short loc_42AD9
cmp byte ptr [rbp+var_44], 0
jz loc_4296F
mov eax, [r15+8]
add rax, [rbp+var_30]
movzx ecx, byte ptr [r15+1Ah]
mov r14, [rbp+var_50]
mov [rcx+rax], r14
mov rdi, r14
mov [rbp+var_34], esi
mov rsi, r13
mov rdx, r12
call _memcpy
mov rax, [rbp+var_60]
and byte ptr [rax+625h], 0EFh
add r14, r12
mov [rbp+var_50], r14
mov r12, [rbp+var_30]
mov edi, [r15+8]
add rdi, r12
movzx esi, byte ptr [r15+1Ah]
mov edx, [rbp+var_34]
call _ma_store_blob_length
loc_42ABA:
lea rdx, [r15+20h]
mov cl, [r15+38h]
add r15, 38h ; '8'
mov rax, r15
mov r13, rbx
mov r15, rdx
test cl, cl
jnz loc_42763
loc_42AD7:
xor eax, eax
loc_42AD9:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_42AE8:
mov eax, 1
jmp short loc_42AD9
|
long long ma_put_key_in_record(long long a1, unsigned int a2, char a3, long long a4)
{
_QWORD *v5; // r15
char v6; // cl
unsigned __int8 *v7; // r13
char *v8; // rax
char v9; // dl
unsigned __int8 *v10; // rbx
unsigned int v11; // esi
int v12; // eax
unsigned int v13; // edi
long long v14; // r8
int v15; // edx
unsigned int v16; // eax
__int16 v17; // ax
long long v18; // rdx
unsigned __int8 *v19; // rcx
unsigned int v20; // edi
long long v21; // rsi
unsigned int v22; // ecx
unsigned int v23; // ecx
long long v24; // rdx
unsigned int v25; // edx
long long result; // rax
bool v27; // cf
long long v28; // rdx
unsigned __int8 *v29; // r13
long long v30; // r12
unsigned int v31; // esi
long long v32; // rcx
unsigned __int8 *v33; // r13
long long v34; // rax
char v35; // cl
unsigned __int8 *v36; // r13
long long v38; // [rsp+8h] [rbp-58h]
long long v39; // [rsp+10h] [rbp-50h]
unsigned __int8 *v41; // [rsp+20h] [rbp-40h]
long long v42; // [rsp+30h] [rbp-30h]
v5 = *(_QWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 1392LL) + 280LL * a2 + 192);
v6 = *((_BYTE *)v5 + 24);
if ( v6 )
{
v7 = *(unsigned __int8 **)(a1 + 512);
v41 = &v7[*(unsigned int *)(a1 + 528)];
v8 = (char *)(v5 + 3);
v39 = *(_QWORD *)(a1 + 912);
v38 = a4 - 1;
v42 = a4;
do
{
v9 = *((_BYTE *)v5 + 25);
if ( v9 )
{
v10 = v7 + 1;
if ( !*v7 )
{
*(_BYTE *)(a4 + *((unsigned int *)v5 + 3)) |= v9;
goto LABEL_51;
}
*(_BYTE *)(a4 + *((unsigned int *)v5 + 3)) &= ~v9;
v6 = *v8;
++v7;
}
if ( v6 == 19 )
{
v11 = *((unsigned __int16 *)v5 + 10);
v12 = *((unsigned __int8 *)v5 + 27);
if ( *((_BYTE *)v5 + 27) )
{
v13 = *v7;
v14 = *((unsigned __int16 *)v5 + 8);
v15 = *((unsigned __int8 *)v5 + 26);
*(_BYTE *)(a4 + v14) = *(_BYTE *)(a4 + v14) & ~(~(-1 << v12) << *((_BYTE *)v5 + 26)) | (*v7 << *((_BYTE *)v5 + 26));
v16 = v15 + v12;
if ( v16 >= 9 )
*(_BYTE *)(a4 + v14 + 1) = (*(unsigned __int8 *)(a4 + v14 + 1) >> (v16 - 8) << (v16 - 8)) | (v13 >> (8 - v15));
++v7;
--v11;
}
else
{
v22 = *((unsigned __int8 *)v5 + 26);
if ( v22 >= 9 )
*(_BYTE *)(a4 + *((unsigned __int16 *)v5 + 8) + 1) &= -1 << (v22 - 8);
}
memcpy(a4 + *((unsigned int *)v5 + 2), v7, v11);
v7 += v11;
LABEL_23:
v10 = v7;
goto LABEL_51;
}
v17 = *((_WORD *)v5 + 9);
if ( (v17 & 1) != 0 )
{
v20 = *v7;
if ( v20 == 255 )
{
v20 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8);
v21 = 3LL;
}
else
{
v21 = 1LL;
}
v25 = *((unsigned __int16 *)v5 + 10);
result = 1LL;
v27 = v25 < v20;
v28 = v25 - v20;
if ( v27 )
return result;
v29 = &v7[v21];
v10 = &v29[v20];
if ( v10 > v41 )
return result;
v30 = v42 + *((unsigned int *)v5 + 2);
if ( v6 == 7 )
{
memset(v42 + *((unsigned int *)v5 + 2), 32LL, v28);
memcpy(v30 + *((unsigned __int16 *)v5 + 10) - v20, v29, v20);
}
else
{
memcpy(v30, v29, v20);
(*(void ( **)(_QWORD, long long, _QWORD, long long))(*(_QWORD *)(*v5 + 184LL) + 120LL))(
*v5,
v20 + v30,
*((unsigned __int16 *)v5 + 10) - v20,
32LL);
}
LABEL_32:
a4 = v42;
goto LABEL_51;
}
if ( (v17 & 8) != 0 )
{
v23 = *v7;
if ( v23 == 255 )
{
v23 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8);
v24 = 3LL;
}
else
{
v24 = 1LL;
}
result = 1LL;
if ( v23 > *((unsigned __int16 *)v5 + 10) )
return result;
v33 = &v7[v24];
v10 = &v33[v23];
if ( v10 > v41 )
return result;
a4 = v42;
if ( *((_BYTE *)v5 + 26) == 1 )
*(_BYTE *)(v42 + *((unsigned int *)v5 + 2)) = v23;
else
*(_WORD *)(v42 + *((unsigned int *)v5 + 2)) = v23;
memcpy(v42 + *((unsigned int *)v5 + 2) + *((unsigned __int8 *)v5 + 26), v33, v23);
}
else
{
if ( (v17 & 0x20) != 0 )
{
v31 = *v7;
if ( v31 == 255 )
{
v31 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8);
v32 = 3LL;
}
else
{
v32 = 1LL;
}
result = 1LL;
if ( v31 > *((unsigned __int16 *)v5 + 10) )
return result;
v36 = &v7[v32];
v10 = &v36[v31];
if ( v10 > v41 )
return result;
if ( a3 )
{
*(_QWORD *)(*((unsigned __int8 *)v5 + 26) + v42 + *((unsigned int *)v5 + 2)) = v39;
memcpy(v39, v36, v31);
*(_BYTE *)(a1 + 1573) &= ~0x10u;
v39 += v31;
a4 = v42;
ma_store_blob_length(v42 + *((unsigned int *)v5 + 2), *((unsigned __int8 *)v5 + 26), v31);
goto LABEL_51;
}
goto LABEL_32;
}
v18 = *((unsigned __int16 *)v5 + 10);
v19 = &v7[v18];
if ( (v17 & 0x40) != 0 )
{
if ( v19 > v41 )
return 1LL;
v34 = v38 + *((unsigned int *)v5 + 2);
do
{
v35 = *v7++;
*(_BYTE *)(v34 + v18--) = v35;
}
while ( v18 );
goto LABEL_23;
}
if ( v19 > v41 )
return 1LL;
memcpy(a4 + *((unsigned int *)v5 + 2), v7, v18);
v10 = &v7[*((unsigned __int16 *)v5 + 10)];
}
LABEL_51:
v6 = *((_BYTE *)v5 + 56);
v8 = (char *)(v5 + 7);
v7 = v10;
v5 += 4;
}
while ( v6 );
}
return 0LL;
}
|
_ma_put_key_in_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12,RCX
MOV dword ptr [RBP + -0x44],EDX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,ESI
IMUL RCX,RCX,0x118
MOV R15,qword ptr [RAX + RCX*0x1 + 0xc0]
MOV CL,byte ptr [R15 + 0x18]
TEST CL,CL
JZ 0x00142ad7
MOV R13,qword ptr [RDI + 0x200]
MOV EAX,dword ptr [RDI + 0x210]
ADD RAX,R13
MOV qword ptr [RBP + -0x40],RAX
LEA RAX,[R15 + 0x18]
MOV qword ptr [RBP + -0x60],RDI
MOV RDX,qword ptr [RDI + 0x390]
MOV qword ptr [RBP + -0x50],RDX
LEA RDX,[R12 + -0x1]
MOV qword ptr [RBP + -0x58],RDX
MOV qword ptr [RBP + -0x30],R12
LAB_00142763:
MOV DL,byte ptr [R15 + 0x19]
TEST DL,DL
JZ 0x00142789
LEA RBX,[R13 + 0x1]
CMP byte ptr [R13],0x0
JZ 0x0014285b
NOT DL
MOV ECX,dword ptr [R15 + 0xc]
AND byte ptr [R12 + RCX*0x1],DL
MOV CL,byte ptr [RAX]
MOV R13,RBX
LAB_00142789:
CMP CL,0x13
JNZ 0x0014280b
MOVZX ESI,word ptr [R15 + 0x14]
MOVZX EAX,byte ptr [R15 + 0x1b]
TEST EAX,EAX
JZ 0x0014287c
MOVZX EDI,byte ptr [R13]
MOVZX R8D,word ptr [R15 + 0x10]
MOVZX EDX,byte ptr [R15 + 0x1a]
MOV R9D,0xffffffff
MOV ECX,EAX
SHL R9D,CL
NOT R9D
MOV ECX,EDX
SHL R9D,CL
MOVZX ECX,byte ptr [R12 + R8*0x1]
NOT R9D
AND R9D,ECX
MOV R10D,EDI
MOV ECX,EDX
SHL R10D,CL
OR R10D,R9D
MOV byte ptr [R12 + R8*0x1],R10B
ADD EAX,EDX
CMP EAX,0x9
JC 0x00142801
MOVZX R9D,byte ptr [R12 + R8*0x1 + 0x1]
ADD AL,0xf8
MOV ECX,EAX
SHR R9D,CL
SHL R9D,CL
MOV CL,0x8
SUB CL,DL
SHR EDI,CL
OR EDI,R9D
MOV byte ptr [R12 + R8*0x1 + 0x1],DIL
LAB_00142801:
INC R13
DEC ESI
JMP 0x0014289a
LAB_0014280b:
MOVZX EAX,word ptr [R15 + 0x12]
TEST AL,0x1
JNZ 0x00142868
TEST AL,0x8
JNZ 0x001428ba
TEST AL,0x20
JNZ 0x00142978
MOVZX EDX,word ptr [R15 + 0x14]
LEA RCX,[RDX + R13*0x1]
TEST AL,0x40
JNZ 0x00142a07
CMP RCX,qword ptr [RBP + -0x40]
JA 0x00142ae8
MOV EDI,dword ptr [R15 + 0x8]
ADD RDI,R12
MOV RSI,R13
CALL 0x0012a0a0
MOVZX EBX,word ptr [R15 + 0x14]
ADD RBX,R13
JMP 0x00142aba
LAB_0014285b:
MOV EAX,dword ptr [R15 + 0xc]
OR byte ptr [R12 + RAX*0x1],DL
JMP 0x00142aba
LAB_00142868:
MOVZX EDI,byte ptr [R13]
CMP EDI,0xff
JZ 0x001428d5
MOV ESI,0x1
JMP 0x001428e6
LAB_0014287c:
MOVZX ECX,byte ptr [R15 + 0x1a]
CMP ECX,0x9
JC 0x0014289a
ADD CL,0xf8
MOV EAX,0xffffffff
SHL EAX,CL
MOVZX ECX,word ptr [R15 + 0x10]
AND byte ptr [R12 + RCX*0x1 + 0x1],AL
LAB_0014289a:
MOV EDI,dword ptr [R15 + 0x8]
ADD RDI,R12
MOV R14D,ESI
MOV RSI,R13
MOV RDX,R14
CALL 0x0012a0a0
ADD R13,R14
LAB_001428b2:
MOV RBX,R13
JMP 0x00142aba
LAB_001428ba:
MOVZX ECX,byte ptr [R13]
CMP ECX,0xff
JZ 0x00142993
MOV EDX,0x1
JMP 0x001429a4
LAB_001428d5:
MOVZX EAX,word ptr [R13 + 0x1]
ROL AX,0x8
MOVZX EDI,AX
MOV ESI,0x3
LAB_001428e6:
MOVZX EDX,word ptr [R15 + 0x14]
MOV EAX,0x1
SUB EDX,EDI
JC 0x00142ad9
ADD R13,RSI
MOV R14D,EDI
LEA RBX,[R14 + R13*0x1]
CMP RBX,qword ptr [RBP + -0x40]
JA 0x00142ad9
MOV R12D,dword ptr [R15 + 0x8]
ADD R12,qword ptr [RBP + -0x30]
CMP CL,0x7
JNZ 0x0014293e
MOV RDI,R12
MOV ESI,0x20
CALL 0x0012a290
MOVZX EDI,word ptr [R15 + 0x14]
ADD RDI,R12
SUB RDI,R14
MOV RSI,R13
MOV RDX,R14
CALL 0x0012a0a0
JMP 0x0014296f
LAB_0014293e:
MOV dword ptr [RBP + -0x34],EDI
MOV RDI,R12
MOV RSI,R13
MOV RDX,R14
CALL 0x0012a0a0
MOV RDI,qword ptr [R15]
ADD R12,R14
MOVZX EDX,word ptr [R15 + 0x14]
SUB EDX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R12
MOV ECX,0x20
CALL qword ptr [RAX + 0x78]
LAB_0014296f:
MOV R12,qword ptr [RBP + -0x30]
JMP 0x00142aba
LAB_00142978:
MOVZX ESI,byte ptr [R13]
CMP ESI,0xff
JZ 0x00142a2d
MOV ECX,0x1
JMP 0x00142a3e
LAB_00142993:
MOVZX EAX,word ptr [R13 + 0x1]
ROL AX,0x8
MOVZX ECX,AX
MOV EDX,0x3
LAB_001429a4:
MOVZX ESI,word ptr [R15 + 0x14]
MOV EAX,0x1
CMP ECX,ESI
JA 0x00142ad9
ADD R13,RDX
MOV EDX,ECX
LEA RBX,[RDX + R13*0x1]
CMP RBX,qword ptr [RBP + -0x40]
JA 0x00142ad9
CMP byte ptr [R15 + 0x1a],0x1
JNZ 0x001429de
MOV EAX,dword ptr [R15 + 0x8]
MOV R12,qword ptr [RBP + -0x30]
MOV byte ptr [R12 + RAX*0x1],CL
JMP 0x001429eb
LAB_001429de:
MOV EAX,dword ptr [R15 + 0x8]
MOV R12,qword ptr [RBP + -0x30]
MOV word ptr [R12 + RAX*0x1],CX
LAB_001429eb:
MOV EAX,dword ptr [R15 + 0x8]
ADD RAX,R12
MOVZX EDI,byte ptr [R15 + 0x1a]
ADD RDI,RAX
MOV RSI,R13
CALL 0x0012a0a0
JMP 0x00142aba
LAB_00142a07:
CMP RCX,qword ptr [RBP + -0x40]
JA 0x00142ae8
MOV EAX,dword ptr [R15 + 0x8]
ADD RAX,qword ptr [RBP + -0x58]
LAB_00142a19:
MOV CL,byte ptr [R13]
INC R13
MOV byte ptr [RAX + RDX*0x1],CL
DEC RDX
JNZ 0x00142a19
JMP 0x001428b2
LAB_00142a2d:
MOVZX EAX,word ptr [R13 + 0x1]
ROL AX,0x8
MOVZX ESI,AX
MOV ECX,0x3
LAB_00142a3e:
MOVZX EDX,word ptr [R15 + 0x14]
MOV EAX,0x1
CMP ESI,EDX
JA 0x00142ad9
ADD R13,RCX
MOV R12D,ESI
LEA RBX,[R12 + R13*0x1]
CMP RBX,qword ptr [RBP + -0x40]
JA 0x00142ad9
CMP byte ptr [RBP + -0x44],0x0
JZ 0x0014296f
MOV EAX,dword ptr [R15 + 0x8]
ADD RAX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [R15 + 0x1a]
MOV R14,qword ptr [RBP + -0x50]
MOV qword ptr [RCX + RAX*0x1],R14
MOV RDI,R14
MOV dword ptr [RBP + -0x34],ESI
MOV RSI,R13
MOV RDX,R12
CALL 0x0012a0a0
MOV RAX,qword ptr [RBP + -0x60]
AND byte ptr [RAX + 0x625],0xef
ADD R14,R12
MOV qword ptr [RBP + -0x50],R14
MOV R12,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [R15 + 0x8]
ADD RDI,R12
MOVZX ESI,byte ptr [R15 + 0x1a]
MOV EDX,dword ptr [RBP + -0x34]
CALL 0x001499c2
LAB_00142aba:
LEA RDX,[R15 + 0x20]
MOV CL,byte ptr [R15 + 0x38]
ADD R15,0x38
MOV RAX,R15
MOV R13,RBX
MOV R15,RDX
TEST CL,CL
JNZ 0x00142763
LAB_00142ad7:
XOR EAX,EAX
LAB_00142ad9:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00142ae8:
MOV EAX,0x1
JMP 0x00142ad9
|
int8 _ma_put_key_in_record(long *param_1,ulong param_2,char param_3,long param_4)
{
byte bVar1;
byte bVar2;
ushort uVar3;
byte bVar4;
byte *pbVar5;
long *plVar6;
char cVar7;
long lVar8;
ulong uVar9;
uint uVar10;
void *__dest;
byte *__src;
byte *pbVar11;
long *plVar12;
void *local_58;
plVar12 = *(long **)(*(long *)(*param_1 + 0x570) + 0xc0 + (param_2 & 0xffffffff) * 0x118);
cVar7 = (char)plVar12[3];
if (cVar7 != '\0') {
pbVar5 = (byte *)param_1[0x40] + *(uint *)(param_1 + 0x42);
plVar6 = plVar12 + 3;
local_58 = (void *)param_1[0x72];
pbVar11 = (byte *)param_1[0x40];
do {
bVar4 = *(byte *)((long)plVar12 + 0x19);
__src = pbVar11;
if (bVar4 == 0) {
LAB_00142789:
if (cVar7 == '\x13') {
uVar3 = *(ushort *)((long)plVar12 + 0x14);
uVar10 = (uint)uVar3;
bVar4 = *(byte *)((long)plVar12 + 0x1b);
if (bVar4 == 0) {
if (8 < *(byte *)((long)plVar12 + 0x1a)) {
pbVar11 = (byte *)(param_4 + 1 + (ulong)*(ushort *)(plVar12 + 2));
*pbVar11 = *pbVar11 & (byte)(-1 << (*(byte *)((long)plVar12 + 0x1a) - 8 & 0x1f));
}
}
else {
bVar1 = *__src;
uVar9 = (ulong)*(ushort *)(plVar12 + 2);
bVar2 = *(byte *)((long)plVar12 + 0x1a);
*(byte *)(param_4 + uVar9) =
bVar1 << (bVar2 & 0x1f) |
~(byte)(~(-1 << (bVar4 & 0x1f)) << (bVar2 & 0x1f)) & *(byte *)(param_4 + uVar9);
if (8 < (uint)bVar4 + (uint)bVar2) {
bVar4 = (char)((uint)bVar4 + (uint)bVar2) - 8;
*(byte *)(param_4 + 1 + uVar9) =
bVar1 >> (8 - bVar2 & 0x1f) |
(*(byte *)(param_4 + 1 + uVar9) >> (bVar4 & 0x1f)) << (bVar4 & 0x1f);
}
__src = __src + 1;
uVar10 = uVar3 - 1;
}
memcpy((void *)((ulong)*(uint *)(plVar12 + 1) + param_4),__src,(ulong)uVar10);
__src = __src + uVar10;
}
else {
uVar3 = *(ushort *)((long)plVar12 + 0x12);
if ((uVar3 & 1) == 0) {
if ((uVar3 & 8) == 0) {
if ((uVar3 & 0x20) == 0) {
uVar9 = (ulong)*(ushort *)((long)plVar12 + 0x14);
if ((uVar3 & 0x40) == 0) {
if (pbVar5 < __src + uVar9) {
return 1;
}
memcpy((void *)((ulong)*(uint *)(plVar12 + 1) + param_4),__src,uVar9);
__src = __src + *(ushort *)((long)plVar12 + 0x14);
}
else {
if (pbVar5 < __src + uVar9) {
return 1;
}
uVar10 = *(uint *)(plVar12 + 1);
do {
bVar4 = *__src;
__src = __src + 1;
*(byte *)((ulong)uVar10 + param_4 + -1 + uVar9) = bVar4;
uVar9 = uVar9 - 1;
} while (uVar9 != 0);
}
}
else {
uVar10 = (uint)*__src;
if (*__src == 0xff) {
uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8)
;
lVar8 = 3;
}
else {
lVar8 = 1;
}
if (*(ushort *)((long)plVar12 + 0x14) < uVar10) {
return 1;
}
pbVar11 = __src + lVar8;
uVar9 = (ulong)uVar10;
__src = pbVar11 + uVar9;
if (pbVar5 < __src) {
return 1;
}
if (param_3 != '\0') {
*(void **)((ulong)*(byte *)((long)plVar12 + 0x1a) +
(ulong)*(uint *)(plVar12 + 1) + param_4) = local_58;
memcpy(local_58,pbVar11,uVar9);
*(byte *)((long)param_1 + 0x625) = *(byte *)((long)param_1 + 0x625) & 0xef;
local_58 = (void *)((long)local_58 + uVar9);
_ma_store_blob_length
((ulong)*(uint *)(plVar12 + 1) + param_4,
*(int1 *)((long)plVar12 + 0x1a),uVar10);
}
}
}
else {
uVar10 = (uint)*__src;
if (*__src == 0xff) {
uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8);
lVar8 = 3;
}
else {
lVar8 = 1;
}
if (*(ushort *)((long)plVar12 + 0x14) < uVar10) {
return 1;
}
pbVar11 = __src + lVar8;
__src = pbVar11 + uVar10;
if (pbVar5 < __src) {
return 1;
}
if (*(char *)((long)plVar12 + 0x1a) == '\x01') {
*(char *)(param_4 + (ulong)*(uint *)(plVar12 + 1)) = (char)uVar10;
}
else {
*(short *)(param_4 + (ulong)*(uint *)(plVar12 + 1)) = (short)uVar10;
}
memcpy((void *)((ulong)*(byte *)((long)plVar12 + 0x1a) +
(ulong)*(uint *)(plVar12 + 1) + param_4),pbVar11,(ulong)uVar10);
}
}
else {
uVar10 = (uint)*__src;
if (*__src == 0xff) {
uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8);
lVar8 = 3;
}
else {
lVar8 = 1;
}
if (*(ushort *)((long)plVar12 + 0x14) < uVar10) {
return 1;
}
pbVar11 = __src + lVar8;
uVar9 = (ulong)uVar10;
__src = pbVar11 + uVar9;
if (pbVar5 < __src) {
return 1;
}
__dest = (void *)((ulong)*(uint *)(plVar12 + 1) + param_4);
if (cVar7 == '\a') {
memset(__dest,0x20,(ulong)(*(ushort *)((long)plVar12 + 0x14) - uVar10));
memcpy((void *)((long)__dest + (*(ushort *)((long)plVar12 + 0x14) - uVar9)),pbVar11,
uVar9);
}
else {
memcpy(__dest,pbVar11,uVar9);
(**(code **)(*(long *)(*plVar12 + 0xb8) + 0x78))
(*plVar12,(long)__dest + uVar9,*(ushort *)((long)plVar12 + 0x14) - uVar10,
0x20);
}
}
}
}
else {
__src = pbVar11 + 1;
if (*pbVar11 != 0) {
pbVar11 = (byte *)(param_4 + (ulong)*(uint *)((long)plVar12 + 0xc));
*pbVar11 = *pbVar11 & ~bVar4;
cVar7 = (char)*plVar6;
goto LAB_00142789;
}
pbVar11 = (byte *)(param_4 + (ulong)*(uint *)((long)plVar12 + 0xc));
*pbVar11 = *pbVar11 | bVar4;
}
cVar7 = (char)plVar12[7];
plVar6 = plVar12 + 7;
pbVar11 = __src;
plVar12 = plVar12 + 4;
} while (cVar7 != '\0');
}
return 0;
}
|
|
60,574
|
my_message_stderr
|
eloqsql/mysys/my_mess.c
|
void my_message_stderr(uint error __attribute__((unused)),
const char *str, myf MyFlags)
{
DBUG_ENTER("my_message_stderr");
DBUG_PRINT("enter",("message: %s",str));
(void) fflush(stdout);
if (MyFlags & (ME_NOTE | ME_ERROR_LOG_ONLY))
DBUG_VOID_RETURN;
if (MyFlags & ME_BELL)
(void) fputc('\007', stderr);
if (my_progname)
{
(void)fputs(my_progname,stderr); (void)fputs(": ",stderr);
}
(void)fputs(str,stderr);
(void)fputc('\n',stderr);
(void)fflush(stderr);
DBUG_VOID_RETURN;
}
|
O3
|
c
|
my_message_stderr:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq 0x2e3eac(%rip), %rax # 0x383fa8
movq (%rax), %rdi
callq 0x29400
testl $0x480, %r14d # imm = 0x480
je 0xa0112
popq %rbx
popq %r14
popq %rbp
retq
testb $0x4, %r14b
je 0xa012c
movq 0x2e3e91(%rip), %rax # 0x383fb0
movq (%rax), %rsi
movl $0x7, %edi
callq 0x296d0
leaq 0xb67c6d(%rip), %rax # 0xc07da0
movq (%rax), %rdi
testq %rdi, %rdi
je 0xa0140
callq 0x2eb65
movq 0x2e3e69(%rip), %r14 # 0x383fb0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x292e0
movq (%r14), %rsi
movl $0xa, %edi
callq 0x296d0
movq (%r14), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x29400
nop
|
my_message_stderr:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rdx
mov rbx, rsi
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
test r14d, 480h
jz short loc_A0112
pop rbx
pop r14
pop rbp
retn
loc_A0112:
test r14b, 4
jz short loc_A012C
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov edi, 7
call _fputc
loc_A012C:
lea rax, my_progname
mov rdi, [rax]
test rdi, rdi
jz short loc_A0140
call my_message_stderr_cold_1
loc_A0140:
mov r14, cs:stderr_ptr
mov rsi, [r14]
mov rdi, rbx
call _fputs
mov rsi, [r14]
mov edi, 0Ah
call _fputc
mov rdi, [r14]
pop rbx
pop r14
pop rbp
jmp _fflush
|
long long my_message_stderr(long long a1, long long a2, __int16 a3)
{
long long result; // rax
result = fflush(stdout);
if ( (a3 & 0x480) == 0 )
{
if ( (a3 & 4) != 0 )
fputc(7LL);
if ( my_progname )
my_message_stderr_cold_1((long long)my_progname);
fputs(a2, stderr);
fputc(10LL);
return fflush(stderr);
}
return result;
}
|
my_message_stderr:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RDX
MOV RBX,RSI
MOV RAX,qword ptr [0x00483fa8]
MOV RDI,qword ptr [RAX]
CALL 0x00129400
TEST R14D,0x480
JZ 0x001a0112
POP RBX
POP R14
POP RBP
RET
LAB_001a0112:
TEST R14B,0x4
JZ 0x001a012c
MOV RAX,qword ptr [0x00483fb0]
MOV RSI,qword ptr [RAX]
MOV EDI,0x7
CALL 0x001296d0
LAB_001a012c:
LEA RAX,[0xd07da0]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x001a0140
CALL 0x0012eb65
LAB_001a0140:
MOV R14,qword ptr [0x00483fb0]
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x001292e0
MOV RSI,qword ptr [R14]
MOV EDI,0xa
CALL 0x001296d0
MOV RDI,qword ptr [R14]
POP RBX
POP R14
POP RBP
JMP 0x00129400
|
void my_message_stderr(int8 param_1,char *param_2,ulong param_3)
{
int *puVar1;
fflush(*(FILE **)PTR_stdout_00483fa8);
if ((param_3 & 0x480) != 0) {
return;
}
if ((param_3 & 4) != 0) {
fputc(7,*(FILE **)PTR_stderr_00483fb0);
}
if (my_progname != 0) {
my_message_stderr_cold_1();
}
puVar1 = PTR_stderr_00483fb0;
fputs(param_2,*(FILE **)PTR_stderr_00483fb0);
fputc(10,*(FILE **)puVar1);
fflush(*(FILE **)puVar1);
return;
}
|
|
60,575
|
evmone::baseline::(anonymous namespace)::analyze_jumpdests(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>)
|
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/baseline_analysis.cpp
|
CodeAnalysis::JumpdestMap analyze_jumpdests(bytes_view code)
{
// To find if op is any PUSH opcode (OP_PUSH1 <= op <= OP_PUSH32)
// it can be noticed that OP_PUSH32 is INT8_MAX (0x7f) therefore
// static_cast<int8_t>(op) <= OP_PUSH32 is always true and can be skipped.
static_assert(OP_PUSH32 == std::numeric_limits<int8_t>::max());
CodeAnalysis::JumpdestMap map(code.size()); // Allocate and init bitmap with zeros.
for (size_t i = 0; i < code.size(); ++i)
{
const auto op = code[i];
if (static_cast<int8_t>(op) >= OP_PUSH1) // If any PUSH opcode (see explanation above).
i += op - size_t{OP_PUSH1 - 1}; // Skip PUSH data.
else if (INTX_UNLIKELY(op == OP_JUMPDEST))
map[i] = true;
}
return map;
}
|
O0
|
cpp
|
evmone::baseline::(anonymous namespace)::analyze_jumpdests(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movb $0x0, -0x19(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x3cf80
movq %rax, -0x60(%rbp)
leaq -0x1a(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x78be0
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x78c00
jmp 0x97013
leaq -0x1a(%rbp), %rdi
callq 0x78c40
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x3cf80
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq %rcx, %rax
jae 0x970fe
movq -0x38(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x67e90
movb (%rax), %al
movb %al, -0x39(%rbp)
movsbl -0x39(%rbp), %eax
cmpl $0x60, %eax
jl 0x9708c
movzbl -0x39(%rbp), %eax
subq $0x5f, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x970eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x1a(%rbp), %rdi
callq 0x78c40
jmp 0x9711e
movzbl -0x39(%rbp), %eax
cmpl $0x5b, %eax
jne 0x970e9
movq -0x68(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x78e70
movq %rdx, -0x88(%rbp)
movq %rax, -0x80(%rbp)
jmp 0x970af
movq -0x88(%rbp), %rax
movq -0x80(%rbp), %rcx
movq %rcx, -0x50(%rbp)
movq %rax, -0x48(%rbp)
leaq -0x50(%rbp), %rdi
movl $0x1, %esi
callq 0x78ed0
jmp 0x970e9
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x70520
jmp 0x9711e
jmp 0x970eb
jmp 0x970ed
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x97024
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x97111
movq -0x68(%rbp), %rdi
callq 0x70520
movq -0x70(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x23410
nopw (%rax,%rax)
|
_ZN6evmone8baseline12_GLOBAL__N_117analyze_jumpdestsESt17basic_string_viewIhN4evmc11byte_traitsIhEEE:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_68], rdi
mov rax, rdi
mov [rbp+var_70], rax
mov [rbp+var_8], rdi
mov [rbp+var_18], rsi
mov [rbp+var_10], rdx
mov [rbp+var_19], 0
lea rdi, [rbp+var_18]
call _ZNKSt17basic_string_viewIhN4evmc11byte_traitsIhEEE4sizeEv; std::basic_string_view<uchar,evmc::byte_traits<uchar>>::size(void)
mov [rbp+var_60], rax
lea rdi, [rbp+var_1A]
mov [rbp+var_58], rdi
call _ZNSaIbEC2Ev; std::allocator<bool>::allocator(void)
mov rdi, [rbp+var_68]
mov rsi, [rbp+var_60]
mov rdx, [rbp+var_58]
call _ZNSt6vectorIbSaIbEEC2EmRKS0_; std::vector<bool>::vector(ulong,std::allocator<bool> const&)
jmp short $+2
loc_97013:
lea rdi, [rbp+var_1A]
call _ZNSaIbED2Ev; std::allocator<bool>::~allocator()
mov [rbp+var_38], 0
loc_97024:
mov rax, [rbp+var_38]
mov [rbp+var_78], rax
lea rdi, [rbp+var_18]
call _ZNKSt17basic_string_viewIhN4evmc11byte_traitsIhEEE4sizeEv; std::basic_string_view<uchar,evmc::byte_traits<uchar>>::size(void)
mov rcx, rax
mov rax, [rbp+var_78]
cmp rax, rcx
jnb loc_970FE
mov rsi, [rbp+var_38]
lea rdi, [rbp+var_18]
call _ZNKSt17basic_string_viewIhN4evmc11byte_traitsIhEEEixEm; std::basic_string_view<uchar,evmc::byte_traits<uchar>>::operator[](ulong)
mov al, [rax]
mov [rbp+var_39], al
movsx eax, [rbp+var_39]
cmp eax, 60h ; '`'
jl short loc_9708C
movzx eax, [rbp+var_39]
sub rax, 5Fh ; '_'
add rax, [rbp+var_38]
mov [rbp+var_38], rax
jmp short loc_970EB
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
lea rdi, [rbp+var_1A]
call _ZNSaIbED2Ev; std::allocator<bool>::~allocator()
jmp loc_9711E
loc_9708C:
movzx eax, [rbp+var_39]
cmp eax, 5Bh ; '['
jnz short loc_970E9
mov rdi, [rbp+var_68]
mov rsi, [rbp+var_38]
call _ZNSt6vectorIbSaIbEEixEm; std::vector<bool>::operator[](ulong)
mov [rbp+var_88], rdx
mov [rbp+var_80], rax
jmp short $+2
loc_970AF:
mov rax, [rbp+var_88]
mov rcx, [rbp+var_80]
mov [rbp+var_50], rcx
mov [rbp+var_48], rax
lea rdi, [rbp+var_50]
mov esi, 1
call _ZNSt14_Bit_referenceaSEb; std::_Bit_reference::operator=(bool)
jmp short loc_970E9
mov rdi, [rbp+var_68]
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
call _ZNSt6vectorIbSaIbEED2Ev; std::vector<bool>::~vector()
jmp short loc_9711E
loc_970E9:
jmp short $+2
loc_970EB:
jmp short $+2
loc_970ED:
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
jmp loc_97024
loc_970FE:
mov [rbp+var_19], 1
test [rbp+var_19], 1
jnz short loc_97111
mov rdi, [rbp+var_68]
call _ZNSt6vectorIbSaIbEED2Ev; std::vector<bool>::~vector()
loc_97111:
mov rax, [rbp+var_70]
add rsp, 90h
pop rbp
retn
loc_9711E:
mov rdi, [rbp+var_28]
call __Unwind_Resume
|
long long evmone::baseline::`anonymous namespace'::analyze_jumpdests(long long a1, long long a2, long long a3)
{
long long v3; // rdx
unsigned long long v5; // [rsp+18h] [rbp-78h]
long long v6; // [rsp+30h] [rbp-60h]
_QWORD v7[2]; // [rsp+40h] [rbp-50h] BYREF
unsigned __int8 v8; // [rsp+57h] [rbp-39h]
unsigned long long i; // [rsp+58h] [rbp-38h]
_BYTE v10[2]; // [rsp+76h] [rbp-1Ah] BYREF
_QWORD v11[3]; // [rsp+78h] [rbp-18h] BYREF
v11[2] = a1;
v11[0] = a2;
v11[1] = a3;
v10[1] = 0;
v6 = std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>::size((long long)v11);
std::allocator<bool>::allocator((long long)v10);
std::vector<bool>::vector(a1, v6, (long long)v10);
std::allocator<bool>::~allocator();
for ( i = 0LL; ; ++i )
{
v5 = i;
if ( v5 >= std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>::size((long long)v11) )
break;
v8 = *(_BYTE *)std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>::operator[]((long long)v11, i);
if ( (char)v8 < 96 )
{
if ( v8 == 91 )
{
v7[0] = std::vector<bool>::operator[](a1, i);
v7[1] = v3;
std::_Bit_reference::operator=((long long)v7, 1);
}
}
else
{
i += v8 - 95LL;
}
}
return a1;
}
|
analyze_jumpdests:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x68],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x70],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RBP + -0x19],0x0
LEA RDI,[RBP + -0x18]
CALL 0x0013cf80
MOV qword ptr [RBP + -0x60],RAX
LEA RDI,[RBP + -0x1a]
MOV qword ptr [RBP + -0x58],RDI
CALL 0x00178be0
MOV RDI,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RBP + -0x58]
LAB_0019700c:
CALL 0x00178c00
JMP 0x00197013
LAB_00197013:
LEA RDI,[RBP + -0x1a]
CALL 0x00178c40
MOV qword ptr [RBP + -0x38],0x0
LAB_00197024:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x78],RAX
LEA RDI,[RBP + -0x18]
CALL 0x0013cf80
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x78]
CMP RAX,RCX
JNC 0x001970fe
MOV RSI,qword ptr [RBP + -0x38]
LEA RDI,[RBP + -0x18]
CALL 0x00167e90
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x39],AL
MOVSX EAX,byte ptr [RBP + -0x39]
CMP EAX,0x60
JL 0x0019708c
MOVZX EAX,byte ptr [RBP + -0x39]
SUB RAX,0x5f
ADD RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001970eb
LAB_0019708c:
MOVZX EAX,byte ptr [RBP + -0x39]
CMP EAX,0x5b
JNZ 0x001970e9
MOV RDI,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RBP + -0x38]
LAB_0019709d:
CALL 0x00178e70
LAB_001970a2:
MOV qword ptr [RBP + -0x88],RDX
MOV qword ptr [RBP + -0x80],RAX
JMP 0x001970af
LAB_001970af:
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x50],RCX
MOV qword ptr [RBP + -0x48],RAX
LEA RDI,[RBP + -0x50]
MOV ESI,0x1
CALL 0x00178ed0
JMP 0x001970e9
LAB_001970e9:
JMP 0x001970eb
LAB_001970eb:
JMP 0x001970ed
LAB_001970ed:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00197024
LAB_001970fe:
MOV byte ptr [RBP + -0x19],0x1
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x00197111
MOV RDI,qword ptr [RBP + -0x68]
CALL 0x00170520
LAB_00197111:
MOV RAX,qword ptr [RBP + -0x70]
ADD RSP,0x90
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00197108) */
/* evmone::baseline::(anonymous namespace)::analyze_jumpdests(std::basic_string_view<unsigned char,
evmc::byte_traits<unsigned char> >) */
vector<bool,std::allocator<bool>> *
evmone::baseline::(anonymous_namespace)::analyze_jumpdests
(vector<bool,std::allocator<bool>> *param_1,int8 param_2,int8 param_3)
{
ulong uVar1;
ulong uVar2;
byte *pbVar3;
int1 auVar4 [16];
int1 local_58 [16];
byte local_41;
ulong local_40;
allocator local_22;
int1 local_21;
int8 local_20;
int8 local_18;
vector<bool,std::allocator<bool>> *local_10;
local_21 = 0;
local_20 = param_2;
local_18 = param_3;
local_10 = param_1;
uVar1 = std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>::size
((basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>> *)&local_20)
;
std::allocator<bool>::allocator();
/* try { // try from 0019700c to 00197010 has its CatchHandler @ 00197072 */
std::vector<bool,std::allocator<bool>>::vector(param_1,uVar1,&local_22);
std::allocator<bool>::~allocator((allocator<bool> *)&local_22);
local_40 = 0;
while( true ) {
uVar1 = local_40;
uVar2 = std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>::size
((basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>> *)
&local_20);
if (uVar2 <= uVar1) break;
pbVar3 = (byte *)std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>::
operator[]((basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>> *
)&local_20,local_40);
local_41 = *pbVar3;
if ((char)local_41 < '`') {
if (local_41 == 0x5b) {
/* try { // try from 0019709d to 001970a1 has its CatchHandler @ 001970d2 */
auVar4 = std::vector<bool,std::allocator<bool>>::operator[](param_1,local_40);
local_58 = auVar4;
std::_Bit_reference::operator=((_Bit_reference *)local_58,true);
}
}
else {
local_40 = ((ulong)local_41 - 0x5f) + local_40;
}
local_40 = local_40 + 1;
}
return param_1;
}
|
|
60,576
|
calc_num_leafes
|
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
|
static int calc_num_leafes(const ssz_ob_t* ob, bool only_used) {
const ssz_def_t* def = ob->def;
switch (def->type) {
case SSZ_TYPE_CONTAINER:
return def->def.container.len;
case SSZ_TYPE_VECTOR:
if (is_basic_type(def->def.vector.type))
return (def->def.vector.len * ssz_fixed_length(def->def.vector.type) + 31) >> 5;
else
return def->def.vector.len;
case SSZ_TYPE_LIST: {
uint32_t len = only_used ? ssz_len(*ob) : def->def.vector.len;
if (is_basic_type(def->def.vector.type))
return (len * ssz_fixed_length(def->def.vector.type) + 31) >> 5;
else
return len;
}
case SSZ_TYPE_BIT_LIST:
return (((only_used ? ssz_len(*ob) : def->def.vector.len) + 255) >> 8);
case SSZ_TYPE_BIT_VECTOR:
return (def->def.vector.len + 255) >> 8;
default:
return 1;
}
}
|
O0
|
c
|
calc_num_leafes:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x4, %eax
ja 0xa3480
movq -0x30(%rbp), %rax
leaq 0x447b8(%rip), %rcx # 0xe7aec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0xa3487
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xa1a10
testb $0x1, %al
jne 0xa335f
jmp 0xa3392
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x9f6c0
movq %rax, %rcx
movq -0x38(%rbp), %rax
imulq %rcx, %rax
addq $0x1f, %rax
shrq $0x5, %rax
movl %eax, -0x4(%rbp)
jmp 0xa3487
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0xa3487
testb $0x1, -0x11(%rbp)
je 0xa33ce
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa0830
movl %eax, -0x3c(%rbp)
jmp 0xa33d8
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xa1a10
testb $0x1, %al
jne 0xa33f1
jmp 0xa341d
movl -0x24(%rbp), %eax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x9f6c0
movq %rax, %rcx
movq -0x48(%rbp), %rax
imulq %rcx, %rax
addq $0x1f, %rax
shrq $0x5, %rax
movl %eax, -0x4(%rbp)
jmp 0xa3487
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xa3487
testb $0x1, -0x11(%rbp)
je 0xa3452
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa0830
movl %eax, -0x4c(%rbp)
jmp 0xa345c
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addl $0xff, %eax
shrl $0x8, %eax
movl %eax, -0x4(%rbp)
jmp 0xa3487
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
addl $0xff, %eax
shrl $0x8, %eax
movl %eax, -0x4(%rbp)
jmp 0xa3487
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
|
calc_num_leafes:
push rbp
mov rbp, rsp
sub rsp, 70h
mov al, sil
mov [rbp+var_10], rdi
and al, 1
mov [rbp+var_11], al
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov eax, [rax+8]
add eax, 0FFFFFFFEh; switch 5 cases
mov ecx, eax
mov [rbp+var_30], rcx
sub eax, 4
ja def_A333B; jumptable 00000000000A333B default case
mov rax, [rbp+var_30]
lea rcx, jpt_A333B
movsxd rax, ds:(jpt_A333B - 0E7AECh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_A333D:
mov rax, [rbp+var_20]; jumptable 00000000000A333B case 2
mov eax, [rax+18h]
mov [rbp+var_4], eax
jmp loc_A3487
loc_A334C:
mov rax, [rbp+var_20]; jumptable 00000000000A333B case 3
mov rdi, [rax+10h]
call is_basic_type
test al, 1
jnz short loc_A335F
jmp short loc_A3392
loc_A335F:
mov rax, [rbp+var_20]
mov eax, [rax+18h]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
mov rdi, [rax+10h]
call ssz_fixed_length
mov rcx, rax
mov rax, [rbp+var_38]
imul rax, rcx
add rax, 1Fh
shr rax, 5
mov [rbp+var_4], eax
jmp loc_A3487
loc_A3392:
mov rax, [rbp+var_20]
mov eax, [rax+18h]
mov [rbp+var_4], eax
jmp loc_A3487
loc_A33A1:
test [rbp+var_11], 1; jumptable 00000000000A333B case 4
jz short loc_A33CE
mov rax, [rbp+var_10]
mov rcx, [rax]
mov [rsp+70h+var_70], rcx
mov rcx, [rax+8]
mov [rsp+70h+var_68], rcx
mov rax, [rax+10h]
mov [rsp+70h+var_60], rax
call ssz_len
mov [rbp+var_3C], eax
jmp short loc_A33D8
loc_A33CE:
mov rax, [rbp+var_20]
mov eax, [rax+18h]
mov [rbp+var_3C], eax
loc_A33D8:
mov eax, [rbp+var_3C]
mov [rbp+var_24], eax
mov rax, [rbp+var_20]
mov rdi, [rax+10h]
call is_basic_type
test al, 1
jnz short loc_A33F1
jmp short loc_A341D
loc_A33F1:
mov eax, [rbp+var_24]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov rdi, [rax+10h]
call ssz_fixed_length
mov rcx, rax
mov rax, [rbp+var_48]
imul rax, rcx
add rax, 1Fh
shr rax, 5
mov [rbp+var_4], eax
jmp short loc_A3487
loc_A341D:
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_A3487
loc_A3425:
test [rbp+var_11], 1; jumptable 00000000000A333B case 6
jz short loc_A3452
mov rax, [rbp+var_10]
mov rcx, [rax]
mov [rsp+70h+var_70], rcx
mov rcx, [rax+8]
mov [rsp+70h+var_68], rcx
mov rax, [rax+10h]
mov [rsp+70h+var_60], rax
call ssz_len
mov [rbp+var_4C], eax
jmp short loc_A345C
loc_A3452:
mov rax, [rbp+var_20]
mov eax, [rax+18h]
mov [rbp+var_4C], eax
loc_A345C:
mov eax, [rbp+var_4C]
add eax, 0FFh
shr eax, 8
mov [rbp+var_4], eax
jmp short loc_A3487
loc_A346C:
mov rax, [rbp+var_20]; jumptable 00000000000A333B case 5
mov eax, [rax+18h]
add eax, 0FFh
shr eax, 8
mov [rbp+var_4], eax
jmp short loc_A3487
def_A333B:
mov [rbp+var_4], 1; jumptable 00000000000A333B default case
loc_A3487:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
|
long long calc_num_leafes(long long a1, char a2, int a3, long long a4, int a5, int a6)
{
int v7; // [rsp+24h] [rbp-4Ch]
unsigned int v8; // [rsp+34h] [rbp-3Ch]
long long v9; // [rsp+38h] [rbp-38h]
long long v10; // [rsp+50h] [rbp-20h]
unsigned int v11; // [rsp+6Ch] [rbp-4h]
v10 = *(_QWORD *)(a1 + 16);
switch ( *(_DWORD *)(v10 + 8) )
{
case 2:
v11 = *(_DWORD *)(v10 + 24);
break;
case 3:
if ( is_basic_type(*(_QWORD *)(v10 + 16)) )
{
v9 = *(unsigned int *)(v10 + 24);
v11 = (unsigned long long)(ssz_fixed_length(*(_DWORD **)(v10 + 16)) * v9 + 31) >> 5;
}
else
{
v11 = *(_DWORD *)(v10 + 24);
}
break;
case 4:
if ( (a2 & 1) != 0 )
v8 = ssz_len(
a1,
a2,
a3,
*(_QWORD *)(a1 + 8),
a5,
a6,
*(_QWORD *)a1,
*(unsigned __int8 **)(a1 + 8),
*(_QWORD *)(a1 + 16));
else
v8 = *(_DWORD *)(v10 + 24);
if ( is_basic_type(*(_QWORD *)(v10 + 16)) )
v11 = (ssz_fixed_length(*(_DWORD **)(v10 + 16)) * (unsigned long long)v8 + 31) >> 5;
else
v11 = v8;
break;
case 5:
v11 = (unsigned int)(*(_DWORD *)(v10 + 24) + 255) >> 8;
break;
case 6:
if ( (a2 & 1) != 0 )
v7 = ssz_len(
a1,
a2,
a3,
*(_QWORD *)(a1 + 8),
a5,
a6,
*(_QWORD *)a1,
*(unsigned __int8 **)(a1 + 8),
*(_QWORD *)(a1 + 16));
else
v7 = *(_DWORD *)(v10 + 24);
v11 = (unsigned int)(v7 + 255) >> 8;
break;
default:
v11 = 1;
break;
}
return v11;
}
|
calc_num_leafes:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV AL,SIL
MOV qword ptr [RBP + -0x10],RDI
AND AL,0x1
MOV byte ptr [RBP + -0x11],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x8]
ADD EAX,-0x2
MOV ECX,EAX
MOV qword ptr [RBP + -0x30],RCX
SUB EAX,0x4
JA 0x001a3480
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x1e7aec]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_2:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001a3487
caseD_3:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x001a1a10
TEST AL,0x1
JNZ 0x001a335f
JMP 0x001a3392
LAB_001a335f:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x0019f6c0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
IMUL RAX,RCX
ADD RAX,0x1f
SHR RAX,0x5
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001a3487
LAB_001a3392:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001a3487
caseD_4:
TEST byte ptr [RBP + -0x11],0x1
JZ 0x001a33ce
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001a0830
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001a33d8
LAB_001a33ce:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x3c],EAX
LAB_001a33d8:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x001a1a10
TEST AL,0x1
JNZ 0x001a33f1
JMP 0x001a341d
LAB_001a33f1:
MOV EAX,dword ptr [RBP + -0x24]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x0019f6c0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x48]
IMUL RAX,RCX
ADD RAX,0x1f
SHR RAX,0x5
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001a3487
LAB_001a341d:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001a3487
caseD_6:
TEST byte ptr [RBP + -0x11],0x1
JZ 0x001a3452
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001a0830
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x001a345c
LAB_001a3452:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x4c],EAX
LAB_001a345c:
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,0xff
SHR EAX,0x8
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001a3487
caseD_5:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
ADD EAX,0xff
SHR EAX,0x8
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001a3487
default:
MOV dword ptr [RBP + -0x4],0x1
LAB_001a3487:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
uint calc_num_leafes(long param_1,byte param_2)
{
uint uVar1;
ulong uVar2;
long lVar3;
int local_54;
uint local_44;
uint local_c;
lVar3 = *(long *)(param_1 + 0x10);
switch(*(int4 *)(lVar3 + 8)) {
case 2:
local_c = *(uint *)(lVar3 + 0x18);
break;
case 3:
uVar2 = is_basic_type(*(int8 *)(lVar3 + 0x10));
if ((uVar2 & 1) == 0) {
local_c = *(uint *)(lVar3 + 0x18);
}
else {
uVar1 = *(uint *)(lVar3 + 0x18);
lVar3 = ssz_fixed_length(*(int8 *)(lVar3 + 0x10));
local_c = (uint)((ulong)uVar1 * lVar3 + 0x1f >> 5);
}
break;
case 4:
if ((param_2 & 1) == 0) {
local_44 = *(uint *)(lVar3 + 0x18);
}
else {
local_44 = ssz_len();
}
uVar2 = is_basic_type(*(int8 *)(lVar3 + 0x10));
if ((uVar2 & 1) == 0) {
local_c = local_44;
}
else {
lVar3 = ssz_fixed_length(*(int8 *)(lVar3 + 0x10));
local_c = (uint)((ulong)local_44 * lVar3 + 0x1f >> 5);
}
break;
case 5:
local_c = *(int *)(lVar3 + 0x18) + 0xffU >> 8;
break;
case 6:
if ((param_2 & 1) == 0) {
local_54 = *(int *)(lVar3 + 0x18);
}
else {
local_54 = ssz_len();
}
local_c = local_54 + 0xffU >> 8;
break;
default:
local_c = 1;
}
return local_c;
}
|
|
60,577
|
calc_num_leafes
|
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
|
static int calc_num_leafes(const ssz_ob_t* ob, bool only_used) {
const ssz_def_t* def = ob->def;
switch (def->type) {
case SSZ_TYPE_CONTAINER:
return def->def.container.len;
case SSZ_TYPE_VECTOR:
if (is_basic_type(def->def.vector.type))
return (def->def.vector.len * ssz_fixed_length(def->def.vector.type) + 31) >> 5;
else
return def->def.vector.len;
case SSZ_TYPE_LIST: {
uint32_t len = only_used ? ssz_len(*ob) : def->def.vector.len;
if (is_basic_type(def->def.vector.type))
return (len * ssz_fixed_length(def->def.vector.type) + 31) >> 5;
else
return len;
}
case SSZ_TYPE_BIT_LIST:
return (((only_used ? ssz_len(*ob) : def->def.vector.len) + 255) >> 8);
case SSZ_TYPE_BIT_VECTOR:
return (def->def.vector.len + 255) >> 8;
default:
return 1;
}
}
|
O2
|
c
|
calc_num_leafes:
pushq %rbx
subq $0x20, %rsp
movq 0x10(%rdi), %rbx
movl 0x8(%rbx), %eax
addl $-0x2, %eax
cmpl $0x4, %eax
ja 0x4e0f5
leaq 0x313bd(%rip), %rcx # 0x7f444
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x18(%rbx), %eax
jmp 0x4e133
testb %sil, %sil
je 0x4e0fa
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rsp)
movups (%rdi), %xmm0
movups %xmm0, (%rsp)
callq 0x4c626
jmp 0x4e0fd
testb %sil, %sil
je 0x4e107
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rsp)
movups (%rdi), %xmm0
movups %xmm0, (%rsp)
callq 0x4c626
jmp 0x4e10a
movl $0xff, %eax
addl 0x18(%rbx), %eax
jmp 0x4e102
movq 0x10(%rbx), %rdi
movl 0x8(%rdi), %eax
cmpl $0x8, %eax
ja 0x4e090
movl $0x103, %ecx # imm = 0x103
btl %eax, %ecx
jae 0x4e090
movl 0x18(%rbx), %ebx
jmp 0x4e122
pushq $0x1
popq %rax
jmp 0x4e133
movl 0x18(%rbx), %eax
addl $0xff, %eax
shrl $0x8, %eax
jmp 0x4e133
movl 0x18(%rbx), %eax
movq 0x10(%rbx), %rdi
movl 0x8(%rdi), %ecx
cmpl $0x8, %ecx
ja 0x4e133
movl $0x103, %edx # imm = 0x103
btl %ecx, %edx
jae 0x4e133
movl %eax, %ebx
callq 0x4bc4b
imulq %rbx, %rax
addq $0x1f, %rax
shrq $0x5, %rax
addq $0x20, %rsp
popq %rbx
retq
|
calc_num_leafes:
push rbx
sub rsp, 20h
mov rbx, [rdi+10h]
mov eax, [rbx+8]
add eax, 0FFFFFFFEh; switch 5 cases
cmp eax, 4
ja short def_4E08E; jumptable 000000000004E08E default case
lea rcx, jpt_4E08E
movsxd rax, ds:(jpt_4E08E - 7F444h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_4E090:
mov eax, [rbx+18h]; jumptable 000000000004E08E case 2
jmp loc_4E133
loc_4E098:
test sil, sil; jumptable 000000000004E08E case 6
jz short loc_4E0FA
mov rax, [rdi+10h]
mov [rsp+28h+var_18], rax
movups xmm0, xmmword ptr [rdi]
movups [rsp+28h+var_28], xmm0
call ssz_len
jmp short loc_4E0FD
loc_4E0B4:
test sil, sil; jumptable 000000000004E08E case 4
jz short loc_4E107
mov rax, [rdi+10h]
mov [rsp+28h+var_18], rax
movups xmm0, xmmword ptr [rdi]
movups [rsp+28h+var_28], xmm0
call ssz_len
jmp short loc_4E10A
loc_4E0D0:
mov eax, 0FFh; jumptable 000000000004E08E case 5
add eax, [rbx+18h]
jmp short loc_4E102
loc_4E0DA:
mov rdi, [rbx+10h]; jumptable 000000000004E08E case 3
mov eax, [rdi+8]
cmp eax, 8
ja short loc_4E090; jumptable 000000000004E08E case 2
mov ecx, 103h
bt ecx, eax
jnb short loc_4E090; jumptable 000000000004E08E case 2
mov ebx, [rbx+18h]
jmp short loc_4E122
def_4E08E:
push 1; jumptable 000000000004E08E default case
pop rax
jmp short loc_4E133
loc_4E0FA:
mov eax, [rbx+18h]
loc_4E0FD:
add eax, 0FFh
loc_4E102:
shr eax, 8
jmp short loc_4E133
loc_4E107:
mov eax, [rbx+18h]
loc_4E10A:
mov rdi, [rbx+10h]
mov ecx, [rdi+8]
cmp ecx, 8
ja short loc_4E133
mov edx, 103h
bt edx, ecx
jnb short loc_4E133
mov ebx, eax
loc_4E122:
call ssz_fixed_length
imul rax, rbx
add rax, 1Fh
shr rax, 5
loc_4E133:
add rsp, 20h
pop rbx
retn
|
long long calc_num_leafes(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
long long v6; // rbx
long long result; // rax
int v8; // eax
unsigned int v9; // eax
_DWORD *v10; // rdi
unsigned int v11; // eax
int v12; // ecx
long long v13; // rbx
unsigned int v14; // ecx
int v15; // edx
v6 = *(_QWORD *)(a1 + 16);
switch ( *(_DWORD *)(v6 + 8) )
{
case 2:
return *(unsigned int *)(v6 + 24);
case 3:
v10 = *(_DWORD **)(v6 + 16);
v11 = v10[2];
if ( v11 > 8 )
return *(unsigned int *)(v6 + 24);
v12 = 259;
if ( !_bittest(&v12, v11) )
return *(unsigned int *)(v6 + 24);
v13 = *(unsigned int *)(v6 + 24);
return (unsigned long long)(v13 * ssz_fixed_length(v10) + 31) >> 5;
case 4:
if ( (_BYTE)a2 )
result = ssz_len(a1, a2, a3, a4, a5, a6, *(_OWORD *)a1, *(unsigned int **)(a1 + 8), *(_QWORD *)(a1 + 16));
else
result = *(unsigned int *)(v6 + 24);
v10 = *(_DWORD **)(v6 + 16);
v14 = v10[2];
if ( v14 > 8 )
return result;
v15 = 259;
if ( !_bittest(&v15, v14) )
return result;
v13 = (unsigned int)result;
return (unsigned long long)(v13 * ssz_fixed_length(v10) + 31) >> 5;
case 5:
v9 = *(_DWORD *)(v6 + 24) + 255;
return v9 >> 8;
case 6:
if ( (_BYTE)a2 )
v8 = ssz_len(a1, a2, a3, a4, a5, a6, *(_OWORD *)a1, *(unsigned int **)(a1 + 8), *(_QWORD *)(a1 + 16));
else
v8 = *(_DWORD *)(v6 + 24);
v9 = v8 + 255;
return v9 >> 8;
default:
return 1LL;
}
}
|
calc_num_leafes:
PUSH RBX
SUB RSP,0x20
MOV RBX,qword ptr [RDI + 0x10]
MOV EAX,dword ptr [RBX + 0x8]
ADD EAX,-0x2
CMP EAX,0x4
JA 0x0014e0f5
LEA RCX,[0x17f444]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_2:
MOV EAX,dword ptr [RBX + 0x18]
JMP 0x0014e133
caseD_6:
TEST SIL,SIL
JZ 0x0014e0fa
MOV RAX,qword ptr [RDI + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RDI]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0014c626
JMP 0x0014e0fd
caseD_4:
TEST SIL,SIL
JZ 0x0014e107
MOV RAX,qword ptr [RDI + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RDI]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0014c626
JMP 0x0014e10a
caseD_5:
MOV EAX,0xff
ADD EAX,dword ptr [RBX + 0x18]
JMP 0x0014e102
caseD_3:
MOV RDI,qword ptr [RBX + 0x10]
MOV EAX,dword ptr [RDI + 0x8]
CMP EAX,0x8
JA 0x0014e090
MOV ECX,0x103
BT ECX,EAX
JNC 0x0014e090
MOV EBX,dword ptr [RBX + 0x18]
JMP 0x0014e122
default:
PUSH 0x1
POP RAX
JMP 0x0014e133
LAB_0014e0fa:
MOV EAX,dword ptr [RBX + 0x18]
LAB_0014e0fd:
ADD EAX,0xff
LAB_0014e102:
SHR EAX,0x8
JMP 0x0014e133
LAB_0014e107:
MOV EAX,dword ptr [RBX + 0x18]
LAB_0014e10a:
MOV RDI,qword ptr [RBX + 0x10]
MOV ECX,dword ptr [RDI + 0x8]
CMP ECX,0x8
JA 0x0014e133
MOV EDX,0x103
BT EDX,ECX
JNC 0x0014e133
MOV EBX,EAX
LAB_0014e122:
CALL 0x0014bc4b
IMUL RAX,RBX
ADD RAX,0x1f
SHR RAX,0x5
LAB_0014e133:
ADD RSP,0x20
POP RBX
RET
|
ulong calc_num_leafes(long param_1,char param_2)
{
uint uVar1;
int iVar2;
ulong uVar3;
long lVar4;
lVar4 = *(long *)(param_1 + 0x10);
switch(*(int4 *)(lVar4 + 8)) {
case 3:
uVar1 = *(uint *)(*(long *)(lVar4 + 0x10) + 8);
if ((uVar1 < 9) && ((0x103U >> (uVar1 & 0x1f) & 1) != 0)) {
uVar3 = (ulong)*(uint *)(lVar4 + 0x18);
goto LAB_0014e122;
}
case 2:
uVar3 = (ulong)*(uint *)(lVar4 + 0x18);
break;
case 4:
if (param_2 == '\0') {
uVar3 = (ulong)*(uint *)(lVar4 + 0x18);
}
else {
uVar3 = ssz_len();
}
uVar1 = *(uint *)(*(long *)(lVar4 + 0x10) + 8);
if (8 < uVar1) {
return uVar3;
}
if ((0x103U >> (uVar1 & 0x1f) & 1) == 0) {
return uVar3;
}
uVar3 = uVar3 & 0xffffffff;
LAB_0014e122:
lVar4 = ssz_fixed_length();
return lVar4 * uVar3 + 0x1f >> 5;
case 5:
iVar2 = *(int *)(lVar4 + 0x18);
goto LAB_0014e102;
case 6:
if (param_2 == '\0') {
iVar2 = *(int *)(lVar4 + 0x18);
}
else {
iVar2 = ssz_len();
}
LAB_0014e102:
uVar3 = (ulong)(iVar2 + 0xffU >> 8);
break;
default:
uVar3 = 1;
}
return uVar3;
}
|
|
60,578
|
log2_ceil
|
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
|
static inline uint32_t log2_ceil(uint32_t val) {
if (val < 2) return 0;
// Use MSVC intrinsic for counting leading zeros
unsigned long index;
#if defined(_MSC_VER)
_BitScanReverse(&index, val);
uint32_t floor_log2 = index;
#else
uint32_t floor_log2 = 31 - __builtin_clz(val);
#endif
return (val & (val - 1)) == 0 ? floor_log2 : floor_log2 + 1;
}
|
O0
|
c
|
log2_ceil:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x2, -0x8(%rbp)
jae 0xa1a66
movl $0x0, -0x4(%rbp)
jmp 0xa1aa0
movl -0x8(%rbp), %eax
bsrl %eax, %ecx
xorl $0x1f, %ecx
movl $0x1f, %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x8(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xa1a91
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0xa1a9a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
log2_ceil:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
cmp [rbp+var_8], 2
jnb short loc_A1A66
mov [rbp+var_4], 0
jmp short loc_A1AA0
loc_A1A66:
mov eax, [rbp+var_8]
bsr ecx, eax
xor ecx, 1Fh
mov eax, 1Fh
sub eax, ecx
mov [rbp+var_14], eax
mov eax, [rbp+var_8]
mov ecx, [rbp+var_8]
sub ecx, 1
and eax, ecx
cmp eax, 0
jnz short loc_A1A91
mov eax, [rbp+var_14]
mov [rbp+var_18], eax
jmp short loc_A1A9A
loc_A1A91:
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_18], eax
loc_A1A9A:
mov eax, [rbp+var_18]
mov [rbp+var_4], eax
loc_A1AA0:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long log2_ceil(unsigned int a1)
{
int v1; // ecx
if ( a1 >= 2 )
{
_BitScanReverse((unsigned int *)&v1, a1);
if ( ((a1 - 1) & a1) != 0 )
return (unsigned int)(31 - (v1 ^ 0x1F) + 1);
else
return (unsigned int)(31 - (v1 ^ 0x1F));
}
else
{
return 0;
}
}
|
log2_ceil:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
CMP dword ptr [RBP + -0x8],0x2
JNC 0x001a1a66
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001a1aa0
LAB_001a1a66:
MOV EAX,dword ptr [RBP + -0x8]
BSR ECX,EAX
XOR ECX,0x1f
MOV EAX,0x1f
SUB EAX,ECX
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x8]
SUB ECX,0x1
AND EAX,ECX
CMP EAX,0x0
JNZ 0x001a1a91
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x001a1a9a
LAB_001a1a91:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
LAB_001a1a9a:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x4],EAX
LAB_001a1aa0:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int log2_ceil(uint param_1)
{
uint uVar1;
int4 uStack_20;
int4 local_c;
if (param_1 < 2) {
local_c = 0;
}
else {
uVar1 = 0x1f;
if (param_1 != 0) {
for (; param_1 >> uVar1 == 0; uVar1 = uVar1 - 1) {
}
}
uStack_20 = -(uVar1 ^ 0x1f) + 0x1f;
if ((param_1 & param_1 - 1) != 0) {
uStack_20 = -(uVar1 ^ 0x1f) + 0x20;
}
local_c = uStack_20;
}
return local_c;
}
|
|
60,579
|
log2_ceil
|
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
|
static inline uint32_t log2_ceil(uint32_t val) {
if (val < 2) return 0;
// Use MSVC intrinsic for counting leading zeros
unsigned long index;
#if defined(_MSC_VER)
_BitScanReverse(&index, val);
uint32_t floor_log2 = index;
#else
uint32_t floor_log2 = 31 - __builtin_clz(val);
#endif
return (val & (val - 1)) == 0 ? floor_log2 : floor_log2 + 1;
}
|
O2
|
c
|
log2_ceil:
xorl %eax, %eax
cmpl $0x2, %edi
jb 0x4d01c
bsrl %edi, %ecx
movl %ecx, %eax
xorl $-0x20, %eax
leal -0x1(%rdi), %edx
addl $0x21, %eax
testl %edx, %edi
cmovel %ecx, %eax
retq
|
log2_ceil:
xor eax, eax
cmp edi, 2
jb short locret_4D01C
bsr ecx, edi
mov eax, ecx
xor eax, 0FFFFFFE0h
lea edx, [rdi-1]
add eax, 21h ; '!'
test edi, edx
cmovz eax, ecx
locret_4D01C:
retn
|
long long log2_ceil(unsigned int a1)
{
long long result; // rax
unsigned int v2; // ecx
result = 0LL;
if ( a1 >= 2 )
{
_BitScanReverse(&v2, a1);
result = (v2 ^ 0xFFFFFFE0) + 33;
if ( ((a1 - 1) & a1) == 0 )
return v2;
}
return result;
}
|
log2_ceil:
XOR EAX,EAX
CMP EDI,0x2
JC 0x0014d01c
BSR ECX,EDI
MOV EAX,ECX
XOR EAX,0xffffffe0
LEA EDX,[RDI + -0x1]
ADD EAX,0x21
TEST EDI,EDX
CMOVZ EAX,ECX
LAB_0014d01c:
RET
|
uint log2_ceil(uint param_1)
{
uint uVar1;
uint uVar2;
uVar2 = 0;
if (1 < param_1) {
uVar1 = 0x1f;
if (param_1 != 0) {
for (; param_1 >> uVar1 == 0; uVar1 = uVar1 - 1) {
}
}
uVar2 = (uVar1 ^ 0xffffffe0) + 0x21;
if ((param_1 & param_1 - 1) == 0) {
uVar2 = uVar1;
}
}
return uVar2;
}
|
|
60,580
|
CheckStackTrace2(int)
|
ng-log[P]ng-log/src/stacktrace_unittest.cc
|
static void ATTRIBUTE_NOINLINE CheckStackTrace2(int i) {
ADJUST_ADDRESS_RANGE_FROM_RA(&expected_range[4]);
INIT_ADDRESS_RANGE(CheckStackTrace2, start, end, &expected_range[3]);
DECLARE_ADDRESS_LABEL(start);
for (int j = i; j >= 0; j--) {
CheckStackTrace3(j);
}
DECLARE_ADDRESS_LABEL(end);
}
|
O1
|
cpp
|
CheckStackTrace2(int):
pushq %rbx
subq $0x90, %rsp
movl %edi, %ebx
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq %rax, 0x288ec(%rip) # 0x319e0
jae 0x9197
movq $0x0, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x91da
movq 0x10(%rsp), %r8
movq 0x288cd(%rip), %rdx # 0x319e8
cmpq %rdx, %r8
jbe 0x9144
movq 0x288b9(%rip), %rcx # 0x319e0
leaq 0x19f82(%rip), %rdi # 0x230b0
movq %rcx, %rsi
xorl %eax, %eax
callq 0x7060
movq 0x10(%rsp), %rax
movq %rax, 0x288a4(%rip) # 0x319e8
leaq 0x2f(%rip), %rax # 0x917a
movq %rax, 0x2887e(%rip) # 0x319d0
leaq 0x35(%rip), %rcx # 0x918e
movq %rcx, 0x28878(%rip) # 0x319d8
cmpq %rcx, %rax
jae 0x91b9
movq $0x0, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x9220
testl %ebx, %ebx
js 0x918e
movl %ebx, %edi
callq 0x931f
leal -0x1(%rbx), %eax
testl %ebx, %ebx
movl %eax, %ebx
jg 0x917e
addq $0x90, %rsp
popq %rbx
retq
leaq 0x28842(%rip), %rsi # 0x319e0
leaq 0x19f6a(%rip), %rcx # 0x2310f
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xa13b
jmp 0x9103
leaq 0x28810(%rip), %rsi # 0x319d0
leaq 0x28811(%rip), %rdx # 0x319d8
leaq 0x19f62(%rip), %rcx # 0x23130
leaq 0x10(%rsp), %rdi
callq 0xa2c3
jmp 0x916e
movq 0x8(%rsp), %rax
xorl %edx, %edx
movq %rdx, 0x8(%rsp)
leaq 0x28(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x20(%rsp)
leaq 0x19e42(%rip), %rsi # 0x2303c
leaq 0x30(%rsp), %rdi
movl $0xbc, %edx
callq 0xed5e
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0xb492
leaq 0x30(%rsp), %rdi
callq 0xed64
movq 0x10(%rsp), %rax
xorl %edx, %edx
movq %rdx, 0x10(%rsp)
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x18(%rsp)
leaq 0x19dfc(%rip), %rsi # 0x2303c
leaq 0x30(%rsp), %rdi
movl $0xbd, %edx
callq 0xed5e
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0xb492
leaq 0x30(%rsp), %rdi
callq 0xed64
jmp 0x9268
movq %rbx, %rdi
callq 0xed64
movq %rax, %rdi
callq 0x9fcd
movq %rax, %rbx
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x928f
leaq 0x8(%rsp), %rdi
callq 0xa294
movq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x92ac
leaq 0x18(%rsp), %rdi
callq 0xa294
movq $0x0, 0x18(%rsp)
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x9317
leaq 0x10(%rsp), %rdi
jmp 0x9312
movq %rax, %rbx
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x92dd
leaq 0x28(%rsp), %rdi
callq 0xa294
movq $0x0, 0x28(%rsp)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x92fa
leaq 0x20(%rsp), %rdi
callq 0xa294
movq $0x0, 0x20(%rsp)
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x9317
leaq 0x8(%rsp), %rdi
callq 0xa294
movq %rbx, %rdi
callq 0x7990
|
_ZL16CheckStackTrace2i:
push rbx
sub rsp, 90h
mov ebx, edi
mov rax, [rsp+98h]
mov [rsp+98h+var_88], rax
cmp cs:qword_319E0, rax
jnb loc_9197
mov [rsp+98h+var_90], 0
loc_9103:
cmp [rsp+98h+var_90], 0
jnz loc_91DA
mov r8, [rsp+98h+var_88]
mov rdx, cs:qword_319E8
cmp r8, rdx
jbe short loc_9144
mov rcx, cs:qword_319E0
lea rdi, aAdjustingRange; "Adjusting range from %p..%p to %p..%p\n"
mov rsi, rcx
xor eax, eax
call _printf
mov rax, [rsp+98h+var_88]
mov cs:qword_319E8, rax
loc_9144:
lea rax, loc_917A
mov cs:qword_319D0, rax
lea rcx, loc_918E
mov cs:qword_319D8, rcx
cmp rax, rcx
jnb short loc_91B9
mov [rsp+98h+var_88], 0
loc_916E:
cmp [rsp+98h+var_88], 0
jnz loc_9220
loc_917A:
test ebx, ebx
js short loc_918E
loc_917E:
mov edi, ebx; int
call _ZL16CheckStackTrace3i; CheckStackTrace3(int)
lea eax, [rbx-1]
test ebx, ebx
mov ebx, eax
jg short loc_917E
loc_918E:
add rsp, 90h
pop rbx
retn
loc_9197:
lea rsi, qword_319E0
lea rcx, aExpectedRange4_0; "(&expected_range[4])->start < ra"
lea rdi, [rsp+98h+var_90]
lea rdx, [rsp+98h+var_88]
call _ZN5nglog8internal17MakeCheckOpStringIPKvPvEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteISB_EERKT_RKT0_PKc; nglog::internal::MakeCheckOpString<void const*,void *>(void const* const&,void * const&,char const*)
jmp loc_9103
loc_91B9:
lea rsi, qword_319D0
lea rdx, qword_319D8
lea rcx, aExpectedRange3; "(&expected_range[3])->start < (&expecte"...
lea rdi, [rsp+98h+var_88]
call _ZN5nglog8internal17MakeCheckOpStringIPKvS3_EESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteISA_EERKT_RKT0_PKc; nglog::internal::MakeCheckOpString<void const*,void const*>(void const* const&,void const* const&,char const*)
jmp short loc_916E
loc_91DA:
mov rax, [rsp+98h+var_90]
xor edx, edx
mov [rsp+98h+var_90], rdx
lea rcx, [rsp+98h+var_70]
mov [rcx], rax
mov [rsp+98h+var_78], rdx
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+98h+var_68]
mov edx, 0BCh
call _ZN5nglog15LogMessageFatalC2EPKciRKNS_8internal13CheckOpStringE; nglog::LogMessageFatal::LogMessageFatal(char const*,int,nglog::internal::CheckOpString const&)
lea rbx, [rsp+98h+var_68]
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rdi, [rsp+98h+var_68]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_9220:
mov rax, [rsp+98h+var_88]
xor edx, edx
mov [rsp+98h+var_88], rdx
lea rcx, [rsp+98h+var_90]
mov [rcx], rax
mov [rsp+98h+var_80], rdx
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+98h+var_68]
mov edx, 0BDh
call _ZN5nglog15LogMessageFatalC2EPKciRKNS_8internal13CheckOpStringE; nglog::LogMessageFatal::LogMessageFatal(char const*,int,nglog::internal::CheckOpString const&)
lea rbx, [rsp+98h+var_68]
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rdi, [rsp+98h+var_68]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_9268:
mov rdi, rbx; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rsi, [rsp+98h+var_90]
test rsi, rsi
jz short loc_928F
lea rdi, [rsp+98h+var_90]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_928F:
mov [rsp+98h+var_90], 0
mov rsi, [rsp+98h+var_80]
test rsi, rsi
jz short loc_92AC
lea rdi, [rsp+98h+var_80]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_92AC:
mov [rsp+98h+var_80], 0
mov rsi, [rsp+98h+var_88]
test rsi, rsi
jz short loc_9317
lea rdi, [rsp+98h+var_88]
jmp short loc_9312
mov rbx, rax
mov rsi, [rsp+98h+var_70]
test rsi, rsi
jz short loc_92DD
lea rdi, [rsp+98h+var_70]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_92DD:
mov [rsp+98h+var_70], 0
mov rsi, [rsp+98h+var_78]
test rsi, rsi
jz short loc_92FA
lea rdi, [rsp+98h+var_78]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_92FA:
mov [rsp+98h+var_78], 0
mov rsi, [rsp+98h+var_90]
test rsi, rsi
jz short loc_9317
lea rdi, [rsp+98h+var_90]
loc_9312:
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_9317:
mov rdi, rbx
call __Unwind_Resume
|
long long CheckStackTrace2(int a1)
{
int v1; // ebx
long long result; // rax
long long v4; // rax
long long v5; // rax
long long v6; // [rsp+8h] [rbp-90h] BYREF
_QWORD v7[4]; // [rsp+10h] [rbp-88h] BYREF
_BYTE v8[104]; // [rsp+30h] [rbp-68h] BYREF
unsigned long long retaddr; // [rsp+98h] [rbp+0h]
v1 = a1;
v7[0] = retaddr;
if ( qword_319E0 >= retaddr )
nglog::internal::MakeCheckOpString<void const*,void *>(&v6, &qword_319E0, v7, "(&expected_range[4])->start < ra");
else
v6 = 0LL;
if ( v6 )
{
v4 = v6;
v6 = 0LL;
v7[3] = v4;
v7[2] = 0LL;
nglog::LogMessageFatal::LogMessageFatal(
v8,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/stacktrace_unittest.cc",
188LL);
nglog::LogMessage::stream((nglog::LogMessage *)v8);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v8);
}
if ( v7[0] > (unsigned long long)qword_319E8 )
{
printf("Adjusting range from %p..%p to %p..%p\n", qword_319E0);
qword_319E8 = v7[0];
}
result = (long long)&loc_917A;
qword_319D0 = (long long)&loc_917A;
qword_319D8 = (long long)&loc_918E;
if ( &loc_917A >= &loc_918E )
result = nglog::internal::MakeCheckOpString<void const*,void const*>(
v7,
&qword_319D0,
&qword_319D8,
"(&expected_range[3])->start < (&expected_range[3])->end");
else
v7[0] = 0LL;
if ( v7[0] )
{
v5 = v7[0];
v7[0] = 0LL;
v6 = v5;
v7[1] = 0LL;
nglog::LogMessageFatal::LogMessageFatal(
v8,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/stacktrace_unittest.cc",
189LL);
nglog::LogMessage::stream((nglog::LogMessage *)v8);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v8);
}
if ( a1 >= 0 )
{
do
{
CheckStackTrace3(v1);
result = (unsigned int)(v1 - 1);
}
while ( v1-- > 0 );
}
return result;
}
|
CheckStackTrace2:
PUSH RBX
SUB RSP,0x90
MOV EBX,EDI
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [0x001319e0],RAX
JNC 0x00109197
MOV qword ptr [RSP + 0x8],0x0
LAB_00109103:
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x001091da
MOV R8,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [0x001319e8]
CMP R8,RDX
JBE 0x00109144
MOV RCX,qword ptr [0x001319e0]
LEA RDI,[0x1230b0]
MOV RSI,RCX
XOR EAX,EAX
CALL 0x00107060
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [0x001319e8],RAX
LAB_00109144:
LEA RAX,[0x10917a]
MOV qword ptr [0x001319d0],RAX
LEA RCX,[0x10918e]
MOV qword ptr [0x001319d8],RCX
CMP RAX,RCX
JNC 0x001091b9
MOV qword ptr [RSP + 0x10],0x0
LAB_0010916e:
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x00109220
LAB_0010917a:
TEST EBX,EBX
JS 0x0010918e
LAB_0010917e:
MOV EDI,EBX
CALL 0x0010931f
LEA EAX,[RBX + -0x1]
TEST EBX,EBX
MOV EBX,EAX
JG 0x0010917e
LAB_0010918e:
ADD RSP,0x90
POP RBX
RET
LAB_00109197:
LEA RSI,[0x1319e0]
LEA RCX,[0x12310f]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x10]
CALL 0x0010a13b
JMP 0x00109103
LAB_001091b9:
LEA RSI,[0x1319d0]
LEA RDX,[0x1319d8]
LEA RCX,[0x123130]
LEA RDI,[RSP + 0x10]
CALL 0x0010a2c3
JMP 0x0010916e
LAB_001091da:
MOV RAX,qword ptr [RSP + 0x8]
XOR EDX,EDX
MOV qword ptr [RSP + 0x8],RDX
LEA RCX,[RSP + 0x28]
MOV qword ptr [RCX],RAX
MOV qword ptr [RSP + 0x20],RDX
LAB_001091f3:
LEA RSI,[0x12303c]
LEA RDI,[RSP + 0x30]
MOV EDX,0xbc
CALL 0x0010ed5e
LAB_00109209:
LEA RBX,[RSP + 0x30]
MOV RDI,RBX
CALL 0x0010b492
LAB_00109216:
LEA RDI,[RSP + 0x30]
CALL 0x0010ed64
LAB_00109220:
MOV RAX,qword ptr [RSP + 0x10]
XOR EDX,EDX
MOV qword ptr [RSP + 0x10],RDX
LEA RCX,[RSP + 0x8]
MOV qword ptr [RCX],RAX
MOV qword ptr [RSP + 0x18],RDX
LAB_00109239:
LEA RSI,[0x12303c]
LEA RDI,[RSP + 0x30]
MOV EDX,0xbd
CALL 0x0010ed5e
LAB_0010924f:
LEA RBX,[RSP + 0x30]
MOV RDI,RBX
CALL 0x0010b492
LAB_0010925c:
LEA RDI,[RSP + 0x30]
CALL 0x0010ed64
LAB_00109266:
JMP 0x00109268
LAB_00109268:
MOV RDI,RBX
CALL 0x0010ed64
LAB_00109270:
MOV RDI,RAX
CALL 0x00109fcd
|
/* WARNING: Removing unreachable block (ram,0x001091b9) */
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CheckStackTrace2(int) */
void CheckStackTrace2(int param_1)
{
bool bVar1;
int8 uVar2;
void *unaff_retaddr;
void *local_90;
void *local_88;
int8 local_80;
int8 local_78;
long local_70;
LogMessageFatal local_68 [96];
local_88 = unaff_retaddr;
if (_DAT_001319e0 < unaff_retaddr) {
local_90 = (void *)0x0;
}
else {
nglog::internal::MakeCheckOpString<void_const*,void*>
((internal *)&local_90,(void **)&DAT_001319e0,&local_88,
"(&expected_range[4])->start < ra");
}
local_70 = (long)local_90;
if (local_90 == (void *)0x0) {
if (_DAT_001319e8 < local_88) {
printf("Adjusting range from %p..%p to %p..%p\n",_DAT_001319e0);
_DAT_001319e8 = local_88;
}
_DAT_001319d0 = 0x10917a;
_DAT_001319d8 = 0x10918e;
local_88 = (void *)0x0;
if (-1 < param_1) {
do {
CheckStackTrace3(param_1);
bVar1 = 0 < param_1;
param_1 = param_1 + -1;
} while (bVar1);
}
return;
}
local_90 = (void *)0x0;
local_78 = 0;
/* try { // try from 001091f3 to 00109208 has its CatchHandler @ 001092c6 */
nglog::LogMessageFatal::LogMessageFatal
(local_68,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/stacktrace_unittest.cc",
0xbc,(CheckOpString *)&local_70);
/* try { // try from 00109209 to 00109215 has its CatchHandler @ 00109268 */
nglog::LogMessage::stream((LogMessage *)local_68);
/* try { // try from 00109216 to 0010921f has its CatchHandler @ 001092c6 */
nglog::LogMessageFatal::~LogMessageFatal(local_68);
local_90 = local_88;
local_88 = (void *)0x0;
local_80 = 0;
/* try { // try from 00109239 to 0010924e has its CatchHandler @ 00109278 */
nglog::LogMessageFatal::LogMessageFatal
(local_68,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/stacktrace_unittest.cc",
0xbd,(CheckOpString *)&local_90);
/* try { // try from 0010924f to 0010925b has its CatchHandler @ 00109266 */
nglog::LogMessage::stream((LogMessage *)local_68);
/* try { // try from 0010925c to 00109265 has its CatchHandler @ 00109278 */
nglog::LogMessageFatal::~LogMessageFatal(local_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 0010924f with catch @ 00109266
*/
/* catch(type#1 @ 00000000) { ... } // from try @ 00109209 with catch @ 00109268
try { // try from 00109268 to 0010926f has its CatchHandler @ 00109270 */
uVar2 = nglog::LogMessageFatal::~LogMessageFatal(local_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 00109268 with catch @ 00109270
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar2);
}
|
|
60,581
|
psi_rwlock_trywrlock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD
int psi_rwlock_trywrlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)
(&state, that->m_psi, PSI_RWLOCK_TRYWRITELOCK, file, line);
int result= rw_trywrlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
}
|
O0
|
c
|
psi_rwlock_trywrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x23d02e(%rip), %rax # 0x301fb8
movq (%rax), %rax
movq 0x1b0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x90(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x3, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0xc6730
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xc4fe3
leaq 0x23cfe8(%rip), %rax # 0x301fb8
movq (%rax), %rax
movq 0x1b8(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
psi_rwlock_trywrlock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+90h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
mov edx, 3
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call my_rw_trywrlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_C4FE3
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_C4FE3:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_rwlock_trywrlock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server + 54))(
v6,
*(_QWORD *)(a1 + 144),
3LL,
a2,
a3);
v4 = my_rw_trywrlock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server + 55))(v5, v4);
return v4;
}
|
psi_rwlock_trywrlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x401fb8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1b0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x90]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x3
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001c6730
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001c4fe3
LEA RAX,[0x401fb8]
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_001c4fe3:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_rwlock_trywrlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
long local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1b0))
(local_50,*(int8 *)(param_1 + 0x90),3,param_2,param_3);
uVar1 = my_rw_trywrlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
|
|
60,582
|
stbiw__jpg_calcBits
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image-write.h
|
static void stbiw__jpg_calcBits(int val, unsigned short bits[2]) {
int tmp1 = val < 0 ? -val : val;
val = val < 0 ? val-1 : val;
bits[1] = 1;
while(tmp1 >>= 1) {
++bits[1];
}
bits[0] = val & ((1<<bits[1])-1);
}
|
O2
|
c
|
stbiw__jpg_calcBits:
movl %edi, %eax
negl %eax
cmovsl %edi, %eax
pushq $0x1
popq %rcx
cmpl $0x2, %eax
jb 0x17695
shrl %eax
incl %ecx
jmp 0x1768a
movw %cx, 0x2(%rsi)
movl %edi, %eax
sarl $0x1f, %eax
pushq $-0x1
popq %rdx
shll %cl, %edx
addl %edi, %eax
notl %edx
andl %eax, %edx
movw %dx, (%rsi)
retq
nopl (%rax)
|
stbiw__jpg_calcBits:
mov eax, edi
neg eax
cmovs eax, edi
push 1
pop rcx
loc_1768A:
cmp eax, 2
jb short loc_17695
shr eax, 1
inc ecx
jmp short loc_1768A
loc_17695:
mov [rsi+2], cx
mov eax, edi
sar eax, 1Fh
push 0FFFFFFFFFFFFFFFFh
pop rdx
shl edx, cl
add eax, edi
not edx
and edx, eax
mov [rsi], dx
retn
|
long long stbiw__jpg_calcBits(int a1, _WORD *a2)
{
unsigned int v2; // eax
__int16 v3; // cx
long long result; // rax
v2 = -a1;
if ( a1 > 0 )
v2 = a1;
v3 = 1;
while ( v2 >= 2 )
{
v2 >>= 1;
++v3;
}
a2[1] = v3;
result = (unsigned int)(a1 + (a1 >> 31));
*a2 = (a1 + (a1 >> 31)) & ~(-1 << v3);
return result;
}
|
stbiw__jpg_calcBits:
MOV EAX,EDI
NEG EAX
CMOVS EAX,EDI
PUSH 0x1
POP RCX
LAB_0011768a:
CMP EAX,0x2
JC 0x00117695
SHR EAX,0x1
INC ECX
JMP 0x0011768a
LAB_00117695:
MOV word ptr [RSI + 0x2],CX
MOV EAX,EDI
SAR EAX,0x1f
PUSH -0x1
POP RDX
SHL EDX,CL
ADD EAX,EDI
NOT EDX
AND EDX,EAX
MOV word ptr [RSI],DX
RET
|
void stbiw__jpg_calcBits(uint param_1,ushort *param_2)
{
uint uVar1;
ushort uVar2;
uVar1 = -param_1;
if (0 < (int)param_1) {
uVar1 = param_1;
}
uVar2 = 1;
for (; 1 < uVar1; uVar1 = uVar1 >> 1) {
uVar2 = uVar2 + 1;
}
param_2[1] = uVar2;
*param_2 = ~(ushort)(-1 << ((byte)uVar2 & 0x1f)) & (short)((int)param_1 >> 0x1f) + (short)param_1;
return;
}
|
|
60,583
|
OpenSubdiv::v3_6_0::Bfr::FaceSurface::isRegular() const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/../bfr/../bfr/../bfr/vertexTag.h
|
bool HasInfSharpEdges() const { return _infSharpEdges; }
|
O3
|
c
|
OpenSubdiv::v3_6_0::Bfr::FaceSurface::isRegular() const:
movzwl 0x88(%rdi), %eax
testb $-0x4c, %al
je 0x88526
xorl %eax, %eax
retq
testb $0x1, %al
jne 0x88559
testb $0x2, %al
jne 0x88523
movq (%rdi), %rcx
movq 0x10(%rdi), %rax
cmpl $0x4, 0xc(%rcx)
movzwl 0x6(%rax), %ecx
jne 0x885d2
movzwl 0x12(%rax), %edx
orw 0x1e(%rax), %dx
orw 0x2a(%rax), %dx
orl %edx, %ecx
cmpw $0x4, %cx
sete %al
retq
movq (%rdi), %rax
xorl %ecx, %ecx
cmpl $0x4, 0xc(%rax)
setne %dl
movslq 0x8(%rax), %r8
movb $0x1, %al
testq %r8, %r8
jle 0x88525
movb %dl, %cl
leal 0x4(,%rcx,2), %ecx
movl %ecx, %edx
shrl %edx
movq 0x10(%rdi), %rsi
shlq $0x2, %r8
leaq (%r8,%r8,2), %rdi
xorl %r8d, %r8d
movzwl (%rsi,%r8), %r9d
testb $0x2, %r9b
jne 0x885ad
movswl 0x6(%rsi,%r8), %r10d
testb $0x1, %r9b
jne 0x885bb
cmpl %r10d, %ecx
je 0x885c4
jmp 0x88523
cmpw $0x1, 0x6(%rsi,%r8)
je 0x885c4
jmp 0x88523
cmpl %r10d, %edx
jne 0x88523
addq $0xc, %r8
cmpq %r8, %rdi
jne 0x8858c
jmp 0x88525
cmpw $0x6, %cx
jne 0x88523
cmpw $0x6, 0x12(%rax)
jne 0x88523
cmpw $0x6, 0x1e(%rax)
jmp 0x88555
nop
|
_ZNK10OpenSubdiv6v3_6_03Bfr11FaceSurface9isRegularEv:
movzx eax, word ptr [rdi+88h]
test al, 0B4h
jz short loc_88526
loc_88523:
xor eax, eax
locret_88525:
retn
loc_88526:
test al, 1
jnz short loc_88559
test al, 2
jnz short loc_88523
mov rcx, [rdi]
mov rax, [rdi+10h]
cmp dword ptr [rcx+0Ch], 4
movzx ecx, word ptr [rax+6]
jnz loc_885D2
movzx edx, word ptr [rax+12h]
or dx, [rax+1Eh]
or dx, [rax+2Ah]
or ecx, edx
cmp cx, 4
loc_88555:
setz al
retn
loc_88559:
mov rax, [rdi]
xor ecx, ecx
cmp dword ptr [rax+0Ch], 4
setnz dl
movsxd r8, dword ptr [rax+8]
mov al, 1
test r8, r8
jle short locret_88525
mov cl, dl
lea ecx, ds:4[rcx*2]
mov edx, ecx
shr edx, 1
mov rsi, [rdi+10h]
shl r8, 2
lea rdi, [r8+r8*2]
xor r8d, r8d
loc_8858C:
movzx r9d, word ptr [rsi+r8]
test r9b, 2
jnz short loc_885AD
movsx r10d, word ptr [rsi+r8+6]
test r9b, 1
jnz short loc_885BB
cmp ecx, r10d
jz short loc_885C4
jmp loc_88523
loc_885AD:
cmp word ptr [rsi+r8+6], 1
jz short loc_885C4
jmp loc_88523
loc_885BB:
cmp edx, r10d
jnz loc_88523
loc_885C4:
add r8, 0Ch
cmp rdi, r8
jnz short loc_8858C
jmp locret_88525
loc_885D2:
cmp cx, 6
jnz loc_88523
cmp word ptr [rax+12h], 6
jnz loc_88523
cmp word ptr [rax+1Eh], 6
jmp loc_88555
|
char OpenSubdiv::v3_6_0::Bfr::FaceSurface::isRegular(OpenSubdiv::v3_6_0::Bfr::FaceSurface *this)
{
__int16 v1; // ax
char result; // al
_WORD *v3; // rax
unsigned __int16 v4; // cx
int v6; // ecx
long long v7; // r8
unsigned int v8; // ecx
long long v9; // rsi
long long v10; // rdi
long long v11; // r8
__int16 v12; // r9
int v13; // r10d
v1 = *((_WORD *)this + 68);
if ( (v1 & 0xB4) != 0 )
return 0;
if ( (v1 & 1) == 0 )
{
if ( (v1 & 2) == 0 )
{
v3 = (_WORD *)*((_QWORD *)this + 2);
v4 = v3[3];
if ( *(_DWORD *)(*(_QWORD *)this + 12LL) == 4 )
return ((unsigned __int16)(v3[21] | v3[15] | v3[9]) | v4) == 4;
if ( v4 == 6 && v3[9] == 6 )
return v3[15] == 6;
}
return 0;
}
v6 = 0;
v7 = *(int *)(*(_QWORD *)this + 8LL);
result = 1;
if ( v7 > 0 )
{
LOBYTE(v6) = *(_DWORD *)(*(_QWORD *)this + 12LL) != 4;
v8 = 2 * v6 + 4;
v9 = *((_QWORD *)this + 2);
v10 = 12 * v7;
v11 = 0LL;
do
{
v12 = *(_WORD *)(v9 + v11);
if ( (v12 & 2) != 0 )
{
if ( *(_WORD *)(v9 + v11 + 6) != 1 )
return 0;
}
else
{
v13 = *(__int16 *)(v9 + v11 + 6);
if ( (v12 & 1) != 0 )
{
if ( v8 >> 1 != v13 )
return 0;
}
else if ( v8 != v13 )
{
return 0;
}
}
v11 += 12LL;
}
while ( v10 != v11 );
}
return result;
}
|
isRegular:
MOVZX EAX,word ptr [RDI + 0x88]
TEST AL,0xb4
JZ 0x00188526
LAB_00188523:
XOR EAX,EAX
LAB_00188525:
RET
LAB_00188526:
TEST AL,0x1
JNZ 0x00188559
TEST AL,0x2
JNZ 0x00188523
MOV RCX,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x10]
CMP dword ptr [RCX + 0xc],0x4
MOVZX ECX,word ptr [RAX + 0x6]
JNZ 0x001885d2
MOVZX EDX,word ptr [RAX + 0x12]
OR DX,word ptr [RAX + 0x1e]
OR DX,word ptr [RAX + 0x2a]
OR ECX,EDX
CMP CX,0x4
LAB_00188555:
SETZ AL
RET
LAB_00188559:
MOV RAX,qword ptr [RDI]
XOR ECX,ECX
CMP dword ptr [RAX + 0xc],0x4
SETNZ DL
MOVSXD R8,dword ptr [RAX + 0x8]
MOV AL,0x1
TEST R8,R8
JLE 0x00188525
MOV CL,DL
LEA ECX,[0x4 + RCX*0x2]
MOV EDX,ECX
SHR EDX,0x1
MOV RSI,qword ptr [RDI + 0x10]
SHL R8,0x2
LEA RDI,[R8 + R8*0x2]
XOR R8D,R8D
LAB_0018858c:
MOVZX R9D,word ptr [RSI + R8*0x1]
TEST R9B,0x2
JNZ 0x001885ad
MOVSX R10D,word ptr [RSI + R8*0x1 + 0x6]
TEST R9B,0x1
JNZ 0x001885bb
CMP ECX,R10D
JZ 0x001885c4
JMP 0x00188523
LAB_001885ad:
CMP word ptr [RSI + R8*0x1 + 0x6],0x1
JZ 0x001885c4
JMP 0x00188523
LAB_001885bb:
CMP EDX,R10D
JNZ 0x00188523
LAB_001885c4:
ADD R8,0xc
CMP RDI,R8
JNZ 0x0018858c
JMP 0x00188525
LAB_001885d2:
CMP CX,0x6
JNZ 0x00188523
CMP word ptr [RAX + 0x12],0x6
JNZ 0x00188523
CMP word ptr [RAX + 0x1e],0x6
JMP 0x00188555
|
/* OpenSubdiv::v3_6_0::Bfr::FaceSurface::isRegular() const */
int8 __thiscall OpenSubdiv::v3_6_0::Bfr::FaceSurface::isRegular(FaceSurface *this)
{
ushort uVar1;
long lVar2;
long lVar3;
uint uVar4;
int8 uVar5;
uint uVar6;
long lVar7;
bool bVar8;
uVar1 = *(ushort *)(this + 0x88);
if ((uVar1 & 0xb4) == 0) {
if ((uVar1 & 1) != 0) {
lVar2 = *(long *)this;
uVar5 = CONCAT71((int7)((ulong)lVar2 >> 8),1);
if ((long)*(int *)(lVar2 + 8) < 1) {
return uVar5;
}
uVar6 = (uint)(*(int *)(lVar2 + 0xc) != 4) * 2 + 4;
lVar3 = *(long *)(this + 0x10);
lVar7 = 0;
do {
if ((*(ushort *)(lVar3 + lVar7) & 2) == 0) {
uVar4 = uVar6 >> 1;
if ((*(ushort *)(lVar3 + lVar7) & 1) == 0) {
uVar4 = uVar6;
}
if (uVar4 != (int)*(short *)(lVar3 + 6 + lVar7)) {
return 0;
}
}
else if (*(short *)(lVar3 + 6 + lVar7) != 1) {
return 0;
}
lVar7 = lVar7 + 0xc;
if ((long)*(int *)(lVar2 + 8) * 0xc == lVar7) {
return uVar5;
}
} while( true );
}
if ((uVar1 & 2) == 0) {
lVar2 = *(long *)(this + 0x10);
if (*(int *)(*(long *)this + 0xc) == 4) {
bVar8 = (ushort)(*(ushort *)(lVar2 + 6) |
*(ushort *)(lVar2 + 0x12) | *(ushort *)(lVar2 + 0x1e) |
*(ushort *)(lVar2 + 0x2a)) == 4;
}
else {
if (*(ushort *)(lVar2 + 6) != 6) {
return 0;
}
if (*(short *)(lVar2 + 0x12) != 6) {
return 0;
}
bVar8 = *(short *)(lVar2 + 0x1e) == 6;
}
return CONCAT71((int7)((ulong)lVar2 >> 8),bVar8);
}
}
return 0;
}
|
|
60,584
|
sp_get_polygon_mbr
|
eloqsql/storage/myisam/sp_key.c
|
static int sp_get_polygon_mbr(uchar *(*wkb), uchar *end, uint n_dims,
uchar byte_order, double *mbr)
{
uint n_linear_rings;
uint n_points;
n_linear_rings = uint4korr((*wkb));
(*wkb) += 4;
for (; n_linear_rings > 0; --n_linear_rings)
{
n_points = uint4korr((*wkb));
(*wkb) += 4;
for (; n_points > 0; --n_points)
{
/* Add next point to mbr */
if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr))
return -1;
}
}
return 0;
}
|
O0
|
c
|
sp_get_polygon_mbr:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movb %al, -0x1d(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0x2c(%rbp)
jbe 0xd67be
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0x30(%rbp)
jbe 0xd67b1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movb -0x1d(%rbp), %al
movq -0x28(%rbp), %r8
movzbl %al, %ecx
callq 0xd67d0
cmpl $0x0, %eax
je 0xd67a4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd67c5
jmp 0xd67a6
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xd6776
jmp 0xd67b3
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xd6756
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
|
sp_get_polygon_mbr_0:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, cl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_1D], al
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_2C], eax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
loc_D6756:
cmp [rbp+var_2C], 0
jbe short loc_D67BE
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_30], eax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
loc_D6776:
cmp [rbp+var_30], 0
jbe short loc_D67B1
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov al, [rbp+var_1D]
mov r8, [rbp+var_28]
movzx ecx, al
call sp_add_point_to_mbr_0
cmp eax, 0
jz short loc_D67A4
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_D67C5
loc_D67A4:
jmp short $+2
loc_D67A6:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
jmp short loc_D6776
loc_D67B1:
jmp short $+2
loc_D67B3:
mov eax, [rbp+var_2C]
add eax, 0FFFFFFFFh
mov [rbp+var_2C], eax
jmp short loc_D6756
loc_D67BE:
mov [rbp+var_4], 0
loc_D67C5:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long sp_get_polygon_mbr_0(_DWORD **a1, long long a2, unsigned int a3, unsigned __int8 a4, long long a5)
{
int j; // [rsp+0h] [rbp-30h]
int i; // [rsp+4h] [rbp-2Ch]
for ( i = *(*a1)++; i; --i )
{
for ( j = *(*a1)++; j; --j )
{
if ( (unsigned int)sp_add_point_to_mbr_0(a1, a2, a3, a4, a5) )
return (unsigned int)-1;
}
}
return 0;
}
|
sp_get_polygon_mbr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,CL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV byte ptr [RBP + -0x1d],AL
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
LAB_001d6756:
CMP dword ptr [RBP + -0x2c],0x0
JBE 0x001d67be
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
LAB_001d6776:
CMP dword ptr [RBP + -0x30],0x0
JBE 0x001d67b1
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV AL,byte ptr [RBP + -0x1d]
MOV R8,qword ptr [RBP + -0x28]
MOVZX ECX,AL
CALL 0x001d67d0
CMP EAX,0x0
JZ 0x001d67a4
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001d67c5
LAB_001d67a4:
JMP 0x001d67a6
LAB_001d67a6:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d6776
LAB_001d67b1:
JMP 0x001d67b3
LAB_001d67b3:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001d6756
LAB_001d67be:
MOV dword ptr [RBP + -0x4],0x0
LAB_001d67c5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4
sp_get_polygon_mbr(long *param_1,int8 param_2,int4 param_3,int1 param_4,
int8 param_5)
{
int iVar1;
int local_38;
int local_34;
local_34 = *(int *)*param_1;
*param_1 = *param_1 + 4;
do {
if (local_34 == 0) {
return 0;
}
local_38 = *(int *)*param_1;
*param_1 = *param_1 + 4;
for (; local_38 != 0; local_38 = local_38 + -1) {
iVar1 = sp_add_point_to_mbr(param_1,param_2,param_3,param_4,param_5);
if (iVar1 != 0) {
return 0xffffffff;
}
}
local_34 = local_34 + -1;
} while( true );
}
|
|
60,585
|
dirname_part
|
eloqsql/mysys/mf_dirname.c
|
size_t dirname_part(char *to, const char *name, size_t *to_res_length)
{
size_t length;
DBUG_ENTER("dirname_part");
DBUG_PRINT("enter",("'%s'",name));
length=dirname_length(name);
*to_res_length= (size_t) (convert_dirname(to, name, name+length) - to);
DBUG_RETURN(length);
}
|
O3
|
c
|
dirname_part:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
leaq -0x1(%rsi), %rdx
movq %rsi, %rax
movzbl (%rax), %ecx
cmpl $0x2f, %ecx
je 0x46afe
testl %ecx, %ecx
jne 0x46b01
jmp 0x46b06
movq %rax, %rdx
incq %rax
jmp 0x46af0
incq %rdx
movq %rdx, %r15
subq %rsi, %r15
movq %r14, %rdi
callq 0x46b2b
subq %r14, %rax
movq %rax, (%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
dirname_part:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rdi
lea rdx, [rsi-1]
mov rax, rsi
loc_46AF0:
movzx ecx, byte ptr [rax]
cmp ecx, 2Fh ; '/'
jz short loc_46AFE
test ecx, ecx
jnz short loc_46B01
jmp short loc_46B06
loc_46AFE:
mov rdx, rax
loc_46B01:
inc rax
jmp short loc_46AF0
loc_46B06:
inc rdx
mov r15, rdx
sub r15, rsi
mov rdi, r14
call convert_dirname
sub rax, r14
mov [rbx], rax
mov rax, r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long dirname_part(long long a1, _BYTE *a2, _QWORD *a3)
{
_BYTE *v4; // rdx
_BYTE *i; // rax
long long v6; // r15
v4 = a2 - 1;
for ( i = a2; *i == 47; ++i )
{
v4 = i;
LABEL_6:
;
}
if ( *i )
goto LABEL_6;
v6 = v4 + 1 - a2;
*a3 = convert_dirname(a1) - a1;
return v6;
}
|
dirname_part:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RDI
LEA RDX,[RSI + -0x1]
MOV RAX,RSI
LAB_00146af0:
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x2f
JZ 0x00146afe
TEST ECX,ECX
JNZ 0x00146b01
JMP 0x00146b06
LAB_00146afe:
MOV RDX,RAX
LAB_00146b01:
INC RAX
JMP 0x00146af0
LAB_00146b06:
INC RDX
MOV R15,RDX
SUB R15,RSI
MOV RDI,R14
CALL 0x00146b2b
SUB RAX,R14
MOV qword ptr [RBX],RAX
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
char * dirname_part(long param_1,char *param_2,long *param_3)
{
char *pcVar1;
long lVar2;
char *pcVar3;
char *pcVar4;
pcVar3 = param_2 + -1;
for (pcVar1 = param_2; (pcVar4 = pcVar1, *pcVar1 == '/' || (pcVar4 = pcVar3, *pcVar1 != '\0'));
pcVar1 = pcVar1 + 1) {
pcVar3 = pcVar4;
}
lVar2 = convert_dirname(param_1);
*param_3 = lVar2 - param_1;
return pcVar3 + (1 - (long)param_2);
}
|
|
60,586
|
Catch::ScopedMessage::~ScopedMessage()
|
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
|
ScopedMessage::~ScopedMessage() {
if ( !uncaught_exceptions() && !m_moved ){
getResultCapture().popScopedMessage(m_info);
}
}
|
O3
|
cpp
|
Catch::ScopedMessage::~ScopedMessage():
pushq %rbx
movq %rdi, %rbx
callq 0x17980
testl %eax, %eax
jg 0x4c52a
cmpb $0x0, 0x48(%rbx)
jne 0x4c52a
callq 0x4c3b2
movq (%rax), %rcx
movq %rax, %rdi
movq %rbx, %rsi
callq *0x60(%rcx)
movq 0x10(%rbx), %rdi
addq $0x20, %rbx
cmpq %rbx, %rdi
je 0x4c543
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x17150
popq %rbx
retq
movq %rax, %rdi
callq 0x1f2c3
|
_ZN5Catch13ScopedMessageD2Ev:
push rbx
mov rbx, rdi
call __ZSt19uncaught_exceptionsv; std::uncaught_exceptions(void)
test eax, eax
jg short loc_4C52A
cmp byte ptr [rbx+48h], 0
jnz short loc_4C52A
call _ZN5Catch16getResultCaptureEv; Catch::getResultCapture(void)
mov rcx, [rax]
mov rdi, rax
mov rsi, rbx
call qword ptr [rcx+60h]
loc_4C52A:
mov rdi, [rbx+10h]; void *
add rbx, 20h ; ' '
cmp rdi, rbx
jz short loc_4C543
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_4C543:
pop rbx
retn
mov rdi, rax
call __clang_call_terminate
|
void Catch::ScopedMessage::~ScopedMessage(Catch::ScopedMessage *this, double a2)
{
long long ResultCapture; // rax
_QWORD *v4; // rdi
_QWORD *v5; // rbx
if ( (int)std::uncaught_exceptions() <= 0 && !*((_BYTE *)this + 72) )
{
ResultCapture = Catch::getResultCapture(this, a2);
(*(void ( **)(long long, Catch::ScopedMessage *))(*(_QWORD *)ResultCapture + 96LL))(ResultCapture, this);
}
v4 = (_QWORD *)*((_QWORD *)this + 2);
v5 = (_QWORD *)((char *)this + 32);
if ( v4 != v5 )
operator delete(v4, *v5 + 1LL);
}
|
~ScopedMessage:
PUSH RBX
MOV RBX,RDI
CALL 0x00117980
TEST EAX,EAX
JG 0x0014c52a
CMP byte ptr [RBX + 0x48],0x0
JNZ 0x0014c52a
LAB_0014c519:
CALL 0x0014c3b2
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
MOV RSI,RBX
CALL qword ptr [RCX + 0x60]
LAB_0014c52a:
MOV RDI,qword ptr [RBX + 0x10]
ADD RBX,0x20
CMP RDI,RBX
JZ 0x0014c543
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x00117150
LAB_0014c543:
POP RBX
RET
|
/* Catch::ScopedMessage::~ScopedMessage() */
void __thiscall Catch::ScopedMessage::~ScopedMessage(ScopedMessage *this)
{
int iVar1;
long *plVar2;
iVar1 = std::uncaught_exceptions();
if ((iVar1 < 1) && (this[0x48] == (ScopedMessage)0x0)) {
/* try { // try from 0014c519 to 0014c529 has its CatchHandler @ 0014c545 */
plVar2 = (long *)getResultCapture();
(**(code **)(*plVar2 + 0x60))(plVar2,this);
}
if (*(ScopedMessage **)(this + 0x10) != this + 0x20) {
operator_delete(*(ScopedMessage **)(this + 0x10),*(long *)(this + 0x20) + 1);
return;
}
return;
}
|
|
60,587
|
my_numcells_cp932
|
eloqsql/strings/ctype-cp932.c
|
static
size_t my_numcells_cp932(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen= 0;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b >= 0xA1 && *b <= 0xDF)
{
clen++;
b++;
}
else if (*b > 0x7F)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
}
|
O3
|
c
|
my_numcells_cp932:
cmpq %rdx, %rsi
jae 0x36117
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0x1, %ecx
movb (%rsi), %dil
leal 0x5f(%rdi), %r8d
shrb $0x7, %dil
movzbl %dil, %edi
incq %rdi
cmpb $0x3f, %r8b
cmovbq %rcx, %rdi
addq %rdi, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0x360f0
popq %rbp
retq
xorl %eax, %eax
retq
|
my_numcells_cp932:
cmp rsi, rdx
jnb short loc_36117
push rbp
mov rbp, rsp
xor eax, eax
mov ecx, 1
loc_360F0:
mov dil, [rsi]
lea r8d, [rdi+5Fh]
shr dil, 7
movzx edi, dil
inc rdi
cmp r8b, 3Fh ; '?'
cmovb rdi, rcx
add rax, rdi
add rsi, rdi
cmp rsi, rdx
jb short loc_360F0
pop rbp
retn
loc_36117:
xor eax, eax
retn
|
long long my_numcells_cp932(long long a1, _BYTE *a2, unsigned long long a3)
{
long long result; // rax
long long v4; // rdi
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = (*a2 >> 7) + 1LL;
if ( (unsigned __int8)(*a2 + 95) < 0x3Fu )
v4 = 1LL;
result += v4;
a2 += v4;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
|
my_numcells_cp932:
CMP RSI,RDX
JNC 0x00136117
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
MOV ECX,0x1
LAB_001360f0:
MOV DIL,byte ptr [RSI]
LEA R8D,[RDI + 0x5f]
SHR DIL,0x7
MOVZX EDI,DIL
INC RDI
CMP R8B,0x3f
CMOVC RDI,RCX
ADD RAX,RDI
ADD RSI,RDI
CMP RSI,RDX
JC 0x001360f0
POP RBP
RET
LAB_00136117:
XOR EAX,EAX
RET
|
long my_numcells_cp932(int8 param_1,byte *param_2,byte *param_3)
{
long lVar1;
long lVar2;
if (param_2 < param_3) {
lVar1 = 0;
do {
lVar2 = (ulong)(*param_2 >> 7) + 1;
if ((byte)(*param_2 + 0x5f) < 0x3f) {
lVar2 = 1;
}
lVar1 = lVar1 + lVar2;
param_2 = param_2 + lVar2;
} while (param_2 < param_3);
return lVar1;
}
return 0;
}
|
|
60,588
|
evmone::instr::core::signextend(evmone::StackTop)
|
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/instructions.hpp
|
inline void signextend(StackTop stack) noexcept
{
const auto& ext = stack.pop();
auto& x = stack.top();
if (ext < 31) // For 31 we also don't need to do anything.
{
const auto e = ext[0]; // uint256 -> uint64.
const auto sign_word_index =
static_cast<size_t>(e / sizeof(e)); // Index of the word with the sign bit.
const auto sign_byte_index = e % sizeof(e); // Index of the sign byte in the sign word.
auto& sign_word = x[sign_word_index];
const auto sign_byte_offset = sign_byte_index * 8;
const auto sign_byte = sign_word >> sign_byte_offset; // Move sign byte to position 0.
// Sign-extend the "sign" byte and move it to the right position. Value bits are zeros.
const auto sext_byte = static_cast<uint64_t>(int64_t{static_cast<int8_t>(sign_byte)});
const auto sext = sext_byte << sign_byte_offset;
const auto sign_mask = ~uint64_t{0} << sign_byte_offset;
const auto value = sign_word & ~sign_mask; // Reset extended bytes.
sign_word = sext | value; // Combine the result word.
// Produce bits (all zeros or ones) for extended words. This is done by SAR of
// the sign-extended byte. Shift by any value 7-63 would work.
const auto sign_ex = static_cast<uint64_t>(static_cast<int64_t>(sext_byte) >> 8);
for (size_t i = 3; i > sign_word_index; --i)
x[i] = sign_ex; // Clear extended words.
}
}
|
O0
|
cpp
|
evmone::instr::core::signextend(evmone::StackTop):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x611b0
movq %rax, -0x10(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x611d0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1f, -0x1c(%rbp)
leaq -0x1c(%rbp), %rsi
callq 0x67660
testb $0x1, %al
jne 0x67556
jmp 0x67653
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x61430
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shrq $0x3, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
andq $0x7, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x61450
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
shlq $0x3, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rcx
shrq %cl, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movsbq %al, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x48(%rbp), %rcx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rcx
movq $-0x1, %rax
shlq %cl, %rax
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq -0x68(%rbp), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x60(%rbp), %rcx
orq -0x70(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rax
sarq $0x8, %rax
movq %rax, -0x78(%rbp)
movq $0x3, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x67651
movq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x61450
movq -0x88(%rbp), %rcx
movq %rcx, (%rax)
movq -0x80(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x67617
jmp 0x67653
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN6evmone5instr4core10signextendENS_8StackTopE:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
lea rdi, [rbp+var_8]; this
call _ZN6evmone8StackTop3popEv; evmone::StackTop::pop(void)
mov [rbp+var_10], rax
lea rdi, [rbp+var_8]; this
call _ZN6evmone8StackTop3topEv; evmone::StackTop::top(void)
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
mov [rbp+var_1C], 1Fh
lea rsi, [rbp+var_1C]
call _ZN4intxltILj256EivEEbRKNS_4uintIXT_EEERKT0_; intx::operator<<256u,int,void>(intx::uint<256u> const&,int const&)
test al, 1
jnz short loc_67556
jmp loc_67653
loc_67556:
mov rdi, [rbp+var_10]
xor eax, eax
mov esi, eax
call _ZNK4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong)
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
shr rax, 3
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
and rax, 7
mov [rbp+var_38], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_30]
call _ZN4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong)
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
shl rax, 3
mov [rbp+var_48], rax
mov rax, [rbp+var_40]
mov rax, [rax]
mov rcx, [rbp+var_48]
shr rax, cl
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
movsx rax, al
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_48]
shl rax, cl
mov [rbp+var_60], rax
mov rcx, [rbp+var_48]
mov rax, 0FFFFFFFFFFFFFFFFh
shl rax, cl
mov [rbp+var_68], rax
mov rax, [rbp+var_40]
mov rax, [rax]
mov rcx, [rbp+var_68]
xor rcx, 0FFFFFFFFFFFFFFFFh
and rax, rcx
mov [rbp+var_70], rax
mov rcx, [rbp+var_60]
or rcx, [rbp+var_70]
mov rax, [rbp+var_40]
mov [rax], rcx
mov rax, [rbp+var_58]
sar rax, 8
mov [rbp+var_78], rax
mov [rbp+var_80], 3
loc_67617:
mov rax, [rbp+var_80]
cmp rax, [rbp+var_30]
jbe short loc_67651
mov rax, [rbp+var_78]
mov [rbp+var_88], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_80]
call _ZN4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong)
mov rcx, [rbp+var_88]
mov [rax], rcx
mov rax, [rbp+var_80]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_80], rax
jmp short loc_67617
loc_67651:
jmp short $+2
loc_67653:
add rsp, 90h
pop rbp
retn
|
long long evmone::instr::core::signextend(long long a1)
{
long long result; // rax
_QWORD *v2; // rax
unsigned long long i; // [rsp+10h] [rbp-80h]
long long v4; // [rsp+38h] [rbp-58h]
_QWORD *v5; // [rsp+50h] [rbp-40h]
long long v6; // [rsp+58h] [rbp-38h]
unsigned long long v7; // [rsp+60h] [rbp-30h]
int v8; // [rsp+74h] [rbp-1Ch] BYREF
long long v9; // [rsp+78h] [rbp-18h]
long long v10; // [rsp+80h] [rbp-10h]
long long v11; // [rsp+88h] [rbp-8h] BYREF
v11 = a1;
v10 = evmone::StackTop::pop((evmone::StackTop *)&v11);
v9 = evmone::StackTop::top((evmone::StackTop *)&v11);
v8 = 31;
result = intx::operator<<256u,int,void>(v10, &v8);
if ( (result & 1) != 0 )
{
v2 = (_QWORD *)intx::uint<256u>::operator[](v10, 0LL);
v7 = *v2 >> 3;
v6 = *v2 & 7LL;
v5 = (_QWORD *)intx::uint<256u>::operator[](v9, v7);
v4 = (char)(*v5 >> (8 * (unsigned __int8)v6));
*v5 = ~(-1LL << (8 * (unsigned __int8)v6)) & *v5 | (v4 << (8 * (unsigned __int8)v6));
for ( i = 3LL; ; --i )
{
result = i;
if ( i <= v7 )
break;
*(_QWORD *)intx::uint<256u>::operator[](v9, i) = v4 >> 8;
}
}
return result;
}
|
signextend:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[RBP + -0x8]
CALL 0x001611b0
MOV qword ptr [RBP + -0x10],RAX
LEA RDI,[RBP + -0x8]
CALL 0x001611d0
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x1c],0x1f
LEA RSI,[RBP + -0x1c]
CALL 0x00167660
TEST AL,0x1
JNZ 0x00167556
JMP 0x00167653
LAB_00167556:
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00161430
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
SHR RAX,0x3
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x7
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00161450
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
SHL RAX,0x3
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x48]
SHR RAX,CL
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVSX RAX,AL
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x48]
SHL RAX,CL
MOV qword ptr [RBP + -0x60],RAX
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,-0x1
SHL RAX,CL
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x68]
XOR RCX,-0x1
AND RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV RCX,qword ptr [RBP + -0x60]
OR RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x58]
SAR RAX,0x8
MOV qword ptr [RBP + -0x78],RAX
MOV qword ptr [RBP + -0x80],0x3
LAB_00167617:
MOV RAX,qword ptr [RBP + -0x80]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x00167651
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x88],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x80]
CALL 0x00161450
MOV RCX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x80]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x80],RAX
JMP 0x00167617
LAB_00167651:
JMP 0x00167653
LAB_00167653:
ADD RSP,0x90
POP RBP
RET
|
/* evmone::instr::core::signextend(evmone::StackTop) */
void evmone::instr::core::signextend(int8 param_1)
{
ulong uVar1;
bool bVar2;
ulong *puVar3;
ulong uVar4;
long lVar5;
long *plVar6;
sbyte sVar7;
ulong local_88;
int local_24;
uint<256u> *local_20;
uint *local_18;
int8 local_10;
local_10 = param_1;
local_18 = (uint *)StackTop::pop((StackTop *)&local_10);
local_20 = (uint<256u> *)StackTop::top((StackTop *)&local_10);
local_24 = 0x1f;
bVar2 = intx::operator<(local_18,&local_24);
if (bVar2) {
puVar3 = (ulong *)intx::uint<256u>::operator[]((uint<256u> *)local_18,0);
uVar1 = *puVar3;
uVar4 = uVar1 >> 3;
puVar3 = (ulong *)intx::uint<256u>::operator[](local_20,uVar4);
sVar7 = (sbyte)((uVar1 & 7) << 3);
lVar5 = (long)(char)(*puVar3 >> sVar7);
*puVar3 = lVar5 << sVar7 | *puVar3 & (-1L << sVar7 ^ 0xffffffffffffffffU);
for (local_88 = 3; uVar4 < local_88; local_88 = local_88 - 1) {
plVar6 = (long *)intx::uint<256u>::operator[](local_20,local_88);
*plVar6 = lVar5 >> 8;
}
}
return;
}
|
|
60,589
|
my_charpos_utf16
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_charpos_utf16(CHARSET_INFO *cs,
const char *b, const char *e, size_t pos)
{
const char *b0= b;
uint charlen;
for ( ; pos; b+= charlen, pos--)
{
if (!(charlen= my_ismbchar(cs, b, e)))
return (e + 2 - b0); /* Error, return pos outside the string */
}
return (size_t) (pos ? (e + 2 - b0) : (b - b0));
}
|
O3
|
c
|
my_charpos_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsi, %r12
testq %rcx, %rcx
je 0xc2fa1
movq %rcx, %r15
movq %rdx, %r14
movq %rdi, %r13
movq %rbx, %r12
movq 0xb8(%r13), %rax
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq *0xc0(%rax)
cmpl $0x1, %eax
jle 0xc2f9a
movl %eax, %eax
addq %rax, %r12
decq %r15
jne 0xc2f73
jmp 0xc2fa1
addq $0x2, %r14
movq %r14, %r12
subq %rbx, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_charpos_utf16:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r12, rsi
test rcx, rcx
jz short loc_C2FA1
mov r15, rcx
mov r14, rdx
mov r13, rdi
mov r12, rbx
loc_C2F73:
mov rax, [r13+0B8h]
mov rdi, r13
mov rsi, r12
mov rdx, r14
call qword ptr [rax+0C0h]
cmp eax, 1
jle short loc_C2F9A
mov eax, eax
add r12, rax
dec r15
jnz short loc_C2F73
jmp short loc_C2FA1
loc_C2F9A:
add r14, 2
mov r12, r14
loc_C2FA1:
sub r12, rbx
mov rax, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_charpos_utf16(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // r12
long long v5; // r15
int v7; // eax
v4 = a2;
if ( a4 )
{
v5 = a4;
v4 = a2;
while ( 1 )
{
v7 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v4, a3);
if ( v7 <= 1 )
break;
v4 += (unsigned int)v7;
if ( !--v5 )
return v4 - a2;
}
v4 = a3 + 2;
}
return v4 - a2;
}
|
my_charpos_utf16:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R12,RSI
TEST RCX,RCX
JZ 0x001c2fa1
MOV R15,RCX
MOV R14,RDX
MOV R13,RDI
MOV R12,RBX
LAB_001c2f73:
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R14
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x1
JLE 0x001c2f9a
MOV EAX,EAX
ADD R12,RAX
DEC R15
JNZ 0x001c2f73
JMP 0x001c2fa1
LAB_001c2f9a:
ADD R14,0x2
MOV R12,R14
LAB_001c2fa1:
SUB R12,RBX
MOV RAX,R12
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_charpos_utf16(long param_1,long param_2,long param_3,long param_4)
{
uint uVar1;
long lVar2;
lVar2 = param_2;
if (param_4 != 0) {
do {
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,lVar2,param_3);
if ((int)uVar1 < 2) {
lVar2 = param_3 + 2;
break;
}
lVar2 = lVar2 + (ulong)uVar1;
param_4 = param_4 + -1;
} while (param_4 != 0);
}
return lVar2 - param_2;
}
|
|
60,590
|
my_rw_init
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_init(my_rw_lock_t *rwp)
{
pthread_condattr_t cond_attr;
pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST);
pthread_condattr_init( &cond_attr );
pthread_cond_init( &rwp->readers, &cond_attr );
pthread_cond_init( &rwp->writers, &cond_attr );
pthread_condattr_destroy(&cond_attr);
rwp->state = 0;
rwp->waiters = 0;
#ifdef SAFE_MUTEX
rwp->write_thread = 0;
#endif
return(0);
}
|
O0
|
c
|
my_rw_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x379c01(%rip), %rsi # 0x3ae388
callq 0x24430
leaq -0xc(%rbp), %rdi
callq 0x24080
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
leaq -0xc(%rbp), %rsi
callq 0x24340
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
leaq -0xc(%rbp), %rsi
callq 0x24340
leaq -0xc(%rbp), %rdi
callq 0x24170
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_rw_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
lea rsi, my_fast_mutexattr
call _pthread_mutex_init
lea rdi, [rbp+var_C]
call _pthread_condattr_init
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
lea rsi, [rbp+var_C]
call _pthread_cond_init
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
lea rsi, [rbp+var_C]
call _pthread_cond_init
lea rdi, [rbp+var_C]
call _pthread_condattr_destroy
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
xor eax, eax
add rsp, 10h
pop rbp
retn
|
long long my_rw_init(long long a1)
{
_BYTE v2[4]; // [rsp+4h] [rbp-Ch] BYREF
long long v3; // [rsp+8h] [rbp-8h]
v3 = a1;
pthread_mutex_init(a1, &my_fast_mutexattr);
pthread_condattr_init(v2);
pthread_cond_init(v3 + 40, v2);
pthread_cond_init(v3 + 88, v2);
pthread_condattr_destroy(v2);
*(_DWORD *)(v3 + 136) = 0;
*(_DWORD *)(v3 + 140) = 0;
return 0LL;
}
|
my_rw_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x4ae388]
CALL 0x00124430
LEA RDI,[RBP + -0xc]
CALL 0x00124080
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
LEA RSI,[RBP + -0xc]
CALL 0x00124340
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
LEA RSI,[RBP + -0xc]
CALL 0x00124340
LEA RDI,[RBP + -0xc]
CALL 0x00124170
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],0x0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 my_rw_init(pthread_mutex_t *param_1)
{
pthread_condattr_t local_14;
pthread_mutex_t *local_10;
local_10 = param_1;
pthread_mutex_init(param_1,(pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_condattr_init(&local_14);
pthread_cond_init((pthread_cond_t *)(local_10 + 1),&local_14);
pthread_cond_init((pthread_cond_t *)((long)local_10 + 0x58),&local_14);
pthread_condattr_destroy(&local_14);
*(int4 *)((long)local_10 + 0x88) = 0;
*(int4 *)((long)local_10 + 0x8c) = 0;
return 0;
}
|
|
60,591
|
Bfree
|
eloqsql/strings/dtoa.c
|
static void Bfree(Bigint *v, Stack_alloc *alloc)
{
char *gptr= (char*) v; /* generic pointer */
if (gptr < alloc->begin || gptr >= alloc->end)
free(gptr);
else if (v->k <= Kmax)
{
/*
Maintain free lists only for stack objects: this way we don't
have to bother with freeing lists in the end of dtoa;
heap should not be used normally anyway.
*/
v->p.next= alloc->freelist[v->k];
alloc->freelist[v->k]= v;
}
}
|
O3
|
c
|
Bfree:
pushq %rbp
movq %rsp, %rbp
cmpq %rdi, (%rsi)
ja 0xd61d5
cmpq %rdi, 0x10(%rsi)
jbe 0xd61d5
movslq 0x8(%rdi), %rax
cmpq $0xf, %rax
jg 0xd61d3
movq 0x18(%rsi,%rax,8), %rcx
movq %rcx, (%rdi)
movq %rdi, 0x18(%rsi,%rax,8)
popq %rbp
retq
popq %rbp
jmp 0x29160
|
Bfree:
push rbp
mov rbp, rsp
cmp [rsi], rdi
ja short loc_D61D5
cmp [rsi+10h], rdi
jbe short loc_D61D5
movsxd rax, dword ptr [rdi+8]
cmp rax, 0Fh
jg short loc_D61D3
mov rcx, [rsi+rax*8+18h]
mov [rdi], rcx
mov [rsi+rax*8+18h], rdi
loc_D61D3:
pop rbp
retn
loc_D61D5:
pop rbp
jmp _free
|
long long Bfree(unsigned long long a1, unsigned long long *a2)
{
long long result; // rax
if ( *a2 > a1 || a2[2] <= a1 )
return free(a1);
result = *(int *)(a1 + 8);
if ( result <= 15 )
{
*(_QWORD *)a1 = a2[result + 3];
a2[result + 3] = a1;
}
return result;
}
|
Bfree:
PUSH RBP
MOV RBP,RSP
CMP qword ptr [RSI],RDI
JA 0x001d61d5
CMP qword ptr [RSI + 0x10],RDI
JBE 0x001d61d5
MOVSXD RAX,dword ptr [RDI + 0x8]
CMP RAX,0xf
JG 0x001d61d3
MOV RCX,qword ptr [RSI + RAX*0x8 + 0x18]
MOV qword ptr [RDI],RCX
MOV qword ptr [RSI + RAX*0x8 + 0x18],RDI
LAB_001d61d3:
POP RBP
RET
LAB_001d61d5:
POP RBP
JMP 0x00129160
|
void Bfree(ulong *param_1,ulong *param_2)
{
long lVar1;
if (((ulong *)*param_2 <= param_1) && (param_1 < (ulong *)param_2[2])) {
lVar1 = (long)(int)param_1[1];
if (lVar1 < 0x10) {
*param_1 = param_2[lVar1 + 3];
param_2[lVar1 + 3] = (ulong)param_1;
}
return;
}
free(param_1);
return;
}
|
|
60,592
|
JS_ToInt64SatFree
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_ToInt64SatFree(JSContext *ctx, int64_t *pres, JSValue val)
{
uint32_t tag;
redo:
tag = JS_VALUE_GET_NORM_TAG(val);
switch(tag) {
case JS_TAG_INT:
case JS_TAG_BOOL:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
*pres = JS_VALUE_GET_INT(val);
return 0;
case JS_TAG_EXCEPTION:
*pres = 0;
return -1;
case JS_TAG_FLOAT64:
{
double d = JS_VALUE_GET_FLOAT64(val);
if (isnan(d)) {
*pres = 0;
} else {
if (d < INT64_MIN)
*pres = INT64_MIN;
else if (d >= 0x1p63)
*pres = INT64_MAX;
else
*pres = (int64_t)d;
}
}
return 0;
default:
val = JS_ToNumberFree(ctx, val);
if (JS_IsException(val)) {
*pres = 0;
return -1;
}
goto redo;
}
}
|
O2
|
c
|
JS_ToInt64SatFree:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rax
movq %rsi, %rbx
movq %rdi, %r15
pushq $-0x1
popq %r14
xorl %r12d, %r12d
cmpl $0x4, %ecx
jb 0x208e2
cmpl $0x6, %ecx
je 0x208e8
cmpl $0x7, %ecx
je 0x208fa
movq %r15, %rdi
movq %rax, %rsi
movq %rcx, %rdx
callq 0x2d69a
movq %rdx, %rcx
cmpl $0x6, %ecx
jne 0x208bb
jmp 0x208e8
movslq %eax, %r12
xorl %r14d, %r14d
movq %r12, (%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %xmm0
xorl %r14d, %r14d
ucomisd %xmm0, %xmm0
jp 0x20936
movabsq $0x7fffffffffffffff, %r12 # imm = 0x7FFFFFFFFFFFFFFF
movsd 0x637ce(%rip), %xmm1 # 0x840e8
ucomisd %xmm0, %xmm1
jbe 0x20925
incq %r12
jmp 0x208e8
ucomisd 0x637c3(%rip), %xmm0 # 0x840f0
jae 0x208e8
cvttsd2si %xmm0, %r12
jmp 0x208e8
xorl %r12d, %r12d
jmp 0x208e8
|
JS_ToInt64SatFree:
push r15
push r14
push r12
push rbx
push rax
mov rax, rdx
mov rbx, rsi
mov r15, rdi
push 0FFFFFFFFFFFFFFFFh
pop r14
xor r12d, r12d
loc_208BB:
cmp ecx, 4
jb short loc_208E2
cmp ecx, 6
jz short loc_208E8
cmp ecx, 7
jz short loc_208FA
mov rdi, r15
mov rsi, rax
mov rdx, rcx
call JS_ToNumberFree
mov rcx, rdx
cmp ecx, 6
jnz short loc_208BB
jmp short loc_208E8
loc_208E2:
movsxd r12, eax
xor r14d, r14d
loc_208E8:
mov [rbx], r12
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_208FA:
movq xmm0, rax
xor r14d, r14d
ucomisd xmm0, xmm0
jp short loc_20936
mov r12, 7FFFFFFFFFFFFFFFh
movsd xmm1, cs:qword_840E8
ucomisd xmm1, xmm0
jbe short loc_20925
inc r12
jmp short loc_208E8
loc_20925:
ucomisd xmm0, cs:qword_840F0
jnb short loc_208E8
cvttsd2si r12, xmm0
jmp short loc_208E8
loc_20936:
xor r12d, r12d
jmp short loc_208E8
|
long long JS_ToInt64SatFree(long long a1, unsigned long long *a2, long long a3, long long a4)
{
unsigned int v5; // r14d
unsigned long long v6; // r12
long long v7; // rdx
v5 = -1;
v6 = 0LL;
while ( 1 )
{
if ( (unsigned int)a4 < 4 )
{
v6 = (int)a3;
v5 = 0;
goto LABEL_8;
}
if ( (_DWORD)a4 == 6 )
goto LABEL_8;
if ( (_DWORD)a4 == 7 )
break;
*(double *)&a3 = COERCE_DOUBLE(JS_ToNumberFree(a1, a3, a4));
a4 = v7;
if ( (_DWORD)v7 == 6 )
goto LABEL_8;
}
v5 = 0;
v6 = 0x7FFFFFFFFFFFFFFFLL;
if ( *(double *)&a3 >= -9.223372036854776e18 )
{
if ( *(double *)&a3 < 9.223372036854776e18 )
v6 = (unsigned int)(int)*(double *)&a3;
}
else
{
v6 = 0x8000000000000000LL;
}
LABEL_8:
*a2 = v6;
return v5;
}
|
JS_ToInt64SatFree:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RAX,RDX
MOV RBX,RSI
MOV R15,RDI
PUSH -0x1
POP R14
XOR R12D,R12D
LAB_001208bb:
CMP ECX,0x4
JC 0x001208e2
CMP ECX,0x6
JZ 0x001208e8
CMP ECX,0x7
JZ 0x001208fa
MOV RDI,R15
MOV RSI,RAX
MOV RDX,RCX
CALL 0x0012d69a
MOV RCX,RDX
CMP ECX,0x6
JNZ 0x001208bb
JMP 0x001208e8
LAB_001208e2:
MOVSXD R12,EAX
XOR R14D,R14D
LAB_001208e8:
MOV qword ptr [RBX],R12
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001208fa:
MOVQ XMM0,RAX
XOR R14D,R14D
UCOMISD XMM0,XMM0
JP 0x00120936
MOV R12,0x7fffffffffffffff
MOVSD XMM1,qword ptr [0x001840e8]
UCOMISD XMM1,XMM0
JBE 0x00120925
INC R12
JMP 0x001208e8
LAB_00120925:
UCOMISD XMM0,qword ptr [0x001840f0]
JNC 0x001208e8
CVTTSD2SI R12,XMM0
JMP 0x001208e8
LAB_00120936:
XOR R12D,R12D
JMP 0x001208e8
|
int4 JS_ToInt64SatFree(int8 param_1,long *param_2,int8 param_3,int8 param_4)
{
double dVar1;
uint uVar2;
long lVar3;
int4 uVar4;
int1 auVar5 [16];
auVar5._8_8_ = param_4;
auVar5._0_8_ = param_3;
uVar4 = 0xffffffff;
lVar3 = 0;
while( true ) {
dVar1 = auVar5._0_8_;
uVar2 = auVar5._8_4_;
if (uVar2 < 4) {
lVar3 = (long)auVar5._0_4_;
uVar4 = 0;
goto LAB_001208e8;
}
if (uVar2 == 6) goto LAB_001208e8;
if (uVar2 == 7) break;
auVar5 = JS_ToNumberFree(param_1,dVar1,auVar5._8_8_);
if (auVar5._8_4_ == 6) {
LAB_001208e8:
*param_2 = lVar3;
return uVar4;
}
}
if (NAN(dVar1)) {
lVar3 = 0;
uVar4 = 0;
}
else {
lVar3 = 0x7fffffffffffffff;
uVar4 = 0;
if (DAT_001840e8 <= dVar1) {
if (dVar1 < DAT_001840f0) {
lVar3 = (long)dVar1;
uVar4 = 0;
}
}
else {
lVar3 = -0x8000000000000000;
}
}
goto LAB_001208e8;
}
|
|
60,593
|
JS_ToInt64SatFree
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_ToInt64SatFree(JSContext *ctx, int64_t *pres, JSValue val)
{
uint32_t tag;
redo:
tag = JS_VALUE_GET_NORM_TAG(val);
switch(tag) {
case JS_TAG_INT:
case JS_TAG_BOOL:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
*pres = JS_VALUE_GET_INT(val);
return 0;
case JS_TAG_EXCEPTION:
*pres = 0;
return -1;
case JS_TAG_FLOAT64:
{
double d = JS_VALUE_GET_FLOAT64(val);
if (isnan(d)) {
*pres = 0;
} else {
if (d < INT64_MIN)
*pres = INT64_MIN;
else if (d >= 0x1p63)
*pres = INT64_MAX;
else
*pres = (int64_t)d;
}
}
return 0;
default:
val = JS_ToNumberFree(ctx, val);
if (JS_IsException(val)) {
*pres = 0;
return -1;
}
goto redo;
}
}
|
O3
|
c
|
JS_ToInt64SatFree:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rax
movq %rsi, %rbx
movq %rdi, %r15
xorl %r12d, %r12d
cmpl $0x4, %ecx
jb 0x27281
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
cmpl $0x6, %ecx
je 0x27287
cmpl $0x7, %ecx
je 0x27299
movq %r15, %rdi
movq %rax, %rsi
movq %rcx, %rdx
xorl %ecx, %ecx
callq 0x43a59
movq %rdx, %rcx
cmpl $0x6, %ecx
jne 0x27252
jmp 0x27287
movslq %eax, %r12
xorl %r14d, %r14d
movq %r12, (%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %xmm0
xorl %r14d, %r14d
ucomisd %xmm0, %xmm0
jp 0x272d5
movabsq $0x7fffffffffffffff, %r12 # imm = 0x7FFFFFFFFFFFFFFF
movsd 0x78ebf(%rip), %xmm1 # 0xa0178
ucomisd %xmm0, %xmm1
jbe 0x272c4
incq %r12
jmp 0x27287
ucomisd 0x78eb4(%rip), %xmm0 # 0xa0180
jae 0x27287
cvttsd2si %xmm0, %r12
jmp 0x27287
xorl %r12d, %r12d
jmp 0x27287
|
JS_ToInt64SatFree:
push r15
push r14
push r12
push rbx
push rax
mov rax, rdx
mov rbx, rsi
mov r15, rdi
xor r12d, r12d
loc_27252:
cmp ecx, 4
jb short loc_27281
mov r14d, 0FFFFFFFFh
cmp ecx, 6
jz short loc_27287
cmp ecx, 7
jz short loc_27299
mov rdi, r15
mov rsi, rax
mov rdx, rcx
xor ecx, ecx
call JS_ToNumberHintFree
mov rcx, rdx
cmp ecx, 6
jnz short loc_27252
jmp short loc_27287
loc_27281:
movsxd r12, eax
xor r14d, r14d
loc_27287:
mov [rbx], r12
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_27299:
movq xmm0, rax
xor r14d, r14d
ucomisd xmm0, xmm0
jp short loc_272D5
mov r12, 7FFFFFFFFFFFFFFFh
movsd xmm1, cs:qword_A0178
ucomisd xmm1, xmm0
jbe short loc_272C4
inc r12
jmp short loc_27287
loc_272C4:
ucomisd xmm0, cs:qword_A0180
jnb short loc_27287
cvttsd2si r12, xmm0
jmp short loc_27287
loc_272D5:
xor r12d, r12d
jmp short loc_27287
|
long long JS_ToInt64SatFree(long long a1, unsigned long long *a2, long long a3, long long a4)
{
unsigned long long v5; // r12
unsigned int v6; // r14d
long long v7; // rdx
v5 = 0LL;
while ( 1 )
{
if ( (unsigned int)a4 < 4 )
{
v5 = (int)a3;
v6 = 0;
goto LABEL_8;
}
v6 = -1;
if ( (_DWORD)a4 == 6 )
goto LABEL_8;
if ( (_DWORD)a4 == 7 )
break;
*(double *)&a3 = COERCE_DOUBLE(JS_ToNumberHintFree(a1, a3, a4, 0LL));
a4 = v7;
if ( (_DWORD)v7 == 6 )
goto LABEL_8;
}
v6 = 0;
v5 = 0x7FFFFFFFFFFFFFFFLL;
if ( *(double *)&a3 >= -9.223372036854776e18 )
{
if ( *(double *)&a3 < 9.223372036854776e18 )
v5 = (unsigned int)(int)*(double *)&a3;
}
else
{
v5 = 0x8000000000000000LL;
}
LABEL_8:
*a2 = v5;
return v6;
}
|
JS_ToInt64SatFree:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RAX,RDX
MOV RBX,RSI
MOV R15,RDI
XOR R12D,R12D
LAB_00127252:
CMP ECX,0x4
JC 0x00127281
MOV R14D,0xffffffff
CMP ECX,0x6
JZ 0x00127287
CMP ECX,0x7
JZ 0x00127299
MOV RDI,R15
MOV RSI,RAX
MOV RDX,RCX
XOR ECX,ECX
CALL 0x00143a59
MOV RCX,RDX
CMP ECX,0x6
JNZ 0x00127252
JMP 0x00127287
LAB_00127281:
MOVSXD R12,EAX
XOR R14D,R14D
LAB_00127287:
MOV qword ptr [RBX],R12
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00127299:
MOVQ XMM0,RAX
XOR R14D,R14D
UCOMISD XMM0,XMM0
JP 0x001272d5
MOV R12,0x7fffffffffffffff
MOVSD XMM1,qword ptr [0x001a0178]
UCOMISD XMM1,XMM0
JBE 0x001272c4
INC R12
JMP 0x00127287
LAB_001272c4:
UCOMISD XMM0,qword ptr [0x001a0180]
JNC 0x00127287
CVTTSD2SI R12,XMM0
JMP 0x00127287
LAB_001272d5:
XOR R12D,R12D
JMP 0x00127287
|
int8 JS_ToInt64SatFree(int8 param_1,long *param_2,int8 param_3,int8 param_4)
{
double dVar1;
uint uVar2;
long lVar3;
int8 uVar4;
int8 uVar5;
int1 auVar6 [16];
auVar6._8_8_ = param_4;
auVar6._0_8_ = param_3;
lVar3 = 0;
while( true ) {
dVar1 = auVar6._0_8_;
uVar2 = auVar6._8_4_;
if (uVar2 < 4) {
lVar3 = (long)auVar6._0_4_;
uVar4 = 0;
goto LAB_00127287;
}
uVar4 = 0xffffffff;
if (uVar2 == 6) goto LAB_00127287;
if (uVar2 == 7) break;
auVar6 = JS_ToNumberHintFree(param_1,dVar1,auVar6._8_8_,0);
if (auVar6._8_4_ == 6) {
LAB_00127287:
*param_2 = lVar3;
return uVar4;
}
}
uVar5 = 0;
uVar4 = 0;
if (NAN(dVar1)) {
lVar3 = 0;
}
else {
lVar3 = 0x7fffffffffffffff;
uVar4 = uVar5;
if (DAT_001a0178 <= dVar1) {
if (dVar1 < DAT_001a0180) {
lVar3 = (long)dVar1;
}
}
else {
lVar3 = -0x8000000000000000;
}
}
goto LAB_00127287;
}
|
|
60,594
|
ma_pvio_start_ssl
|
eloqsql/libmariadb/libmariadb/ma_pvio.c
|
my_bool ma_pvio_start_ssl(MARIADB_PVIO *pvio)
{
if (!pvio || !pvio->mysql)
return 1;
CLEAR_CLIENT_ERROR(pvio->mysql);
if (!(pvio->ctls= ma_pvio_tls_init(pvio->mysql)))
{
return 1;
}
if (ma_pvio_tls_connect(pvio->ctls))
{
free(pvio->ctls);
pvio->ctls= NULL;
return 1;
}
/* default behaviour:
1. peer certificate verification
2. verify CN (requires option ssl_verify_check)
3. verrify finger print
*/
if ((pvio->mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) &&
ma_pvio_tls_verify_server_cert(pvio->ctls))
return 1;
if (pvio->mysql->options.extension &&
((pvio->mysql->options.extension->tls_fp && pvio->mysql->options.extension->tls_fp[0]) ||
(pvio->mysql->options.extension->tls_fp_list && pvio->mysql->options.extension->tls_fp_list[0])))
{
if (ma_pvio_tls_check_fp(pvio->ctls,
pvio->mysql->options.extension->tls_fp,
pvio->mysql->options.extension->tls_fp_list))
return 1;
}
return 0;
}
|
O3
|
c
|
ma_pvio_start_ssl:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movb $0x1, %bl
testq %rdi, %rdi
je 0x1e5c0
movq %rdi, %r14
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x1e5c0
movl $0x0, 0x90(%rax)
movq 0x40(%r14), %rax
movw $0x30, 0x29b(%rax)
movl $0x30303030, 0x297(%rax) # imm = 0x30303030
movq 0x40(%r14), %rax
movb $0x0, 0x97(%rax)
movq 0x40(%r14), %rdi
movq 0x2a0(%rdi), %rax
testq %rax, %rax
je 0x1e52b
movl $0x0, 0x4(%rax)
movq 0x40(%r14), %rdi
callq 0x1e63c
movq %rax, 0x38(%r14)
testq %rax, %rax
je 0x1e5c0
movq %rax, %rdi
callq 0x1e6a4
testb %al, %al
je 0x1e55c
movq 0x38(%r14), %rdi
callq 0x13570
movq $0x0, 0x38(%r14)
jmp 0x1e5c0
movq 0x40(%r14), %rax
testb $0x40, 0x36b(%rax)
je 0x1e57a
movq 0x38(%r14), %rdi
callq 0x1e6e8
testl %eax, %eax
jne 0x1e5c0
movq 0x40(%r14), %rax
movq 0x480(%rax), %rax
testq %rax, %rax
je 0x1e5be
movq 0x90(%rax), %rsi
testq %rsi, %rsi
je 0x1e5a0
cmpb $0x0, (%rsi)
je 0x1e5a0
movq 0x98(%rax), %rdx
jmp 0x1e5b1
movq 0x98(%rax), %rdx
testq %rdx, %rdx
je 0x1e5be
cmpb $0x0, (%rdx)
je 0x1e5be
movq 0x38(%r14), %rdi
callq 0x1e738
testb %al, %al
jne 0x1e5c0
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
ma_pvio_start_ssl:
push rbp
mov rbp, rsp
push r14
push rbx
mov bl, 1
test rdi, rdi
jz loc_1E5C0
mov r14, rdi
mov rax, [rdi+40h]
test rax, rax
jz loc_1E5C0
mov dword ptr [rax+90h], 0
mov rax, [r14+40h]
mov word ptr [rax+29Bh], 30h ; '0'
mov dword ptr [rax+297h], 30303030h
mov rax, [r14+40h]
mov byte ptr [rax+97h], 0
mov rdi, [r14+40h]
mov rax, [rdi+2A0h]
test rax, rax
jz short loc_1E52B
mov dword ptr [rax+4], 0
mov rdi, [r14+40h]
loc_1E52B:
call ma_pvio_tls_init
mov [r14+38h], rax
test rax, rax
jz loc_1E5C0
mov rdi, rax
call ma_pvio_tls_connect
test al, al
jz short loc_1E55C
mov rdi, [r14+38h]
call _free
mov qword ptr [r14+38h], 0
jmp short loc_1E5C0
loc_1E55C:
mov rax, [r14+40h]
test byte ptr [rax+36Bh], 40h
jz short loc_1E57A
mov rdi, [r14+38h]
call ma_pvio_tls_verify_server_cert
test eax, eax
jnz short loc_1E5C0
mov rax, [r14+40h]
loc_1E57A:
mov rax, [rax+480h]
test rax, rax
jz short loc_1E5BE
mov rsi, [rax+90h]
test rsi, rsi
jz short loc_1E5A0
cmp byte ptr [rsi], 0
jz short loc_1E5A0
mov rdx, [rax+98h]
jmp short loc_1E5B1
loc_1E5A0:
mov rdx, [rax+98h]
test rdx, rdx
jz short loc_1E5BE
cmp byte ptr [rdx], 0
jz short loc_1E5BE
loc_1E5B1:
mov rdi, [r14+38h]
call ma_pvio_tls_check_fp
test al, al
jnz short loc_1E5C0
loc_1E5BE:
xor ebx, ebx
loc_1E5C0:
mov eax, ebx
pop rbx
pop r14
pop rbp
retn
|
long long ma_pvio_start_ssl(long long a1)
{
unsigned int v1; // ebx
long long v3; // rax
long long v4; // rdi
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
_BYTE *v9; // rsi
_BYTE *v10; // rdx
LOBYTE(v1) = 1;
if ( a1 )
{
v3 = *(_QWORD *)(a1 + 64);
if ( v3 )
{
*(_DWORD *)(v3 + 144) = 0;
strcpy((char *)(*(_QWORD *)(a1 + 64) + 663LL), "00000");
*(_BYTE *)(*(_QWORD *)(a1 + 64) + 151LL) = 0;
v4 = *(_QWORD *)(a1 + 64);
v5 = *(_QWORD *)(v4 + 672);
if ( v5 )
{
*(_DWORD *)(v5 + 4) = 0;
v4 = *(_QWORD *)(a1 + 64);
}
v6 = ma_pvio_tls_init(v4);
*(_QWORD *)(a1 + 56) = v6;
if ( v6 )
{
if ( (unsigned __int8)ma_pvio_tls_connect(v6) )
{
free(*(_QWORD *)(a1 + 56));
*(_QWORD *)(a1 + 56) = 0LL;
return v1;
}
v7 = *(_QWORD *)(a1 + 64);
if ( (*(_BYTE *)(v7 + 875) & 0x40) != 0 )
{
if ( (unsigned int)ma_pvio_tls_verify_server_cert(*(_QWORD *)(a1 + 56)) )
return v1;
v7 = *(_QWORD *)(a1 + 64);
}
v8 = *(_QWORD *)(v7 + 1152);
if ( v8 )
{
v9 = *(_BYTE **)(v8 + 144);
if ( v9 && *v9 )
{
v10 = *(_BYTE **)(v8 + 152);
}
else
{
v10 = *(_BYTE **)(v8 + 152);
if ( !v10 || !*v10 )
return 0;
}
if ( (unsigned __int8)ma_pvio_tls_check_fp(*(_QWORD *)(a1 + 56), v9, v10) )
return v1;
}
return 0;
}
}
}
return v1;
}
|
ma_pvio_start_ssl:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV BL,0x1
TEST RDI,RDI
JZ 0x0011e5c0
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0x40]
TEST RAX,RAX
JZ 0x0011e5c0
MOV dword ptr [RAX + 0x90],0x0
MOV RAX,qword ptr [R14 + 0x40]
MOV word ptr [RAX + 0x29b],0x30
MOV dword ptr [RAX + 0x297],0x30303030
MOV RAX,qword ptr [R14 + 0x40]
MOV byte ptr [RAX + 0x97],0x0
MOV RDI,qword ptr [R14 + 0x40]
MOV RAX,qword ptr [RDI + 0x2a0]
TEST RAX,RAX
JZ 0x0011e52b
MOV dword ptr [RAX + 0x4],0x0
MOV RDI,qword ptr [R14 + 0x40]
LAB_0011e52b:
CALL 0x0011e63c
MOV qword ptr [R14 + 0x38],RAX
TEST RAX,RAX
JZ 0x0011e5c0
MOV RDI,RAX
CALL 0x0011e6a4
TEST AL,AL
JZ 0x0011e55c
MOV RDI,qword ptr [R14 + 0x38]
CALL 0x00113570
MOV qword ptr [R14 + 0x38],0x0
JMP 0x0011e5c0
LAB_0011e55c:
MOV RAX,qword ptr [R14 + 0x40]
TEST byte ptr [RAX + 0x36b],0x40
JZ 0x0011e57a
MOV RDI,qword ptr [R14 + 0x38]
CALL 0x0011e6e8
TEST EAX,EAX
JNZ 0x0011e5c0
MOV RAX,qword ptr [R14 + 0x40]
LAB_0011e57a:
MOV RAX,qword ptr [RAX + 0x480]
TEST RAX,RAX
JZ 0x0011e5be
MOV RSI,qword ptr [RAX + 0x90]
TEST RSI,RSI
JZ 0x0011e5a0
CMP byte ptr [RSI],0x0
JZ 0x0011e5a0
MOV RDX,qword ptr [RAX + 0x98]
JMP 0x0011e5b1
LAB_0011e5a0:
MOV RDX,qword ptr [RAX + 0x98]
TEST RDX,RDX
JZ 0x0011e5be
CMP byte ptr [RDX],0x0
JZ 0x0011e5be
LAB_0011e5b1:
MOV RDI,qword ptr [R14 + 0x38]
CALL 0x0011e738
TEST AL,AL
JNZ 0x0011e5c0
LAB_0011e5be:
XOR EBX,EBX
LAB_0011e5c0:
MOV EAX,EBX
POP RBX
POP R14
POP RBP
RET
|
ulong ma_pvio_start_ssl(long param_1)
{
char *pcVar1;
char cVar2;
int iVar3;
long lVar4;
char *pcVar5;
int8 unaff_RBX;
ulong uVar6;
uVar6 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if ((param_1 == 0) || (*(long *)(param_1 + 0x40) == 0)) goto LAB_0011e5c0;
*(int4 *)(*(long *)(param_1 + 0x40) + 0x90) = 0;
lVar4 = *(long *)(param_1 + 0x40);
*(int2 *)(lVar4 + 0x29b) = 0x30;
*(int4 *)(lVar4 + 0x297) = 0x30303030;
*(int1 *)(*(long *)(param_1 + 0x40) + 0x97) = 0;
lVar4 = *(long *)(param_1 + 0x40);
if (*(long *)(lVar4 + 0x2a0) != 0) {
*(int4 *)(*(long *)(lVar4 + 0x2a0) + 4) = 0;
lVar4 = *(long *)(param_1 + 0x40);
}
lVar4 = ma_pvio_tls_init(lVar4);
*(long *)(param_1 + 0x38) = lVar4;
if (lVar4 == 0) goto LAB_0011e5c0;
cVar2 = ma_pvio_tls_connect(lVar4);
if (cVar2 != '\0') {
free(*(void **)(param_1 + 0x38));
*(int8 *)(param_1 + 0x38) = 0;
goto LAB_0011e5c0;
}
lVar4 = *(long *)(param_1 + 0x40);
if ((*(byte *)(lVar4 + 0x36b) & 0x40) != 0) {
iVar3 = ma_pvio_tls_verify_server_cert(*(int8 *)(param_1 + 0x38));
if (iVar3 != 0) goto LAB_0011e5c0;
lVar4 = *(long *)(param_1 + 0x40);
}
lVar4 = *(long *)(lVar4 + 0x480);
if (lVar4 != 0) {
pcVar1 = *(char **)(lVar4 + 0x90);
if ((pcVar1 == (char *)0x0) || (*pcVar1 == '\0')) {
pcVar5 = *(char **)(lVar4 + 0x98);
if ((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) goto LAB_0011e5be;
}
else {
pcVar5 = *(char **)(lVar4 + 0x98);
}
cVar2 = ma_pvio_tls_check_fp(*(int8 *)(param_1 + 0x38),pcVar1,pcVar5);
if (cVar2 != '\0') goto LAB_0011e5c0;
}
LAB_0011e5be:
uVar6 = 0;
LAB_0011e5c0:
return uVar6 & 0xffffffff;
}
|
|
60,595
|
do_rename_temporary(THD*, TABLE_LIST*, TABLE_LIST*)
|
eloqsql/sql/sql_rename.cc
|
static bool
do_rename_temporary(THD *thd, TABLE_LIST *ren_table, TABLE_LIST *new_table)
{
LEX_CSTRING *new_alias;
DBUG_ENTER("do_rename_temporary");
new_alias= (lower_case_table_names == 2) ? &new_table->alias :
&new_table->table_name;
if (thd->find_temporary_table(new_table, THD::TMP_TABLE_ANY))
{
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_alias->str);
DBUG_RETURN(1); // This can't be skipped
}
DBUG_RETURN(thd->rename_temporary_table(ren_table->table,
&new_table->db, new_alias));
}
|
O0
|
cpp
|
do_rename_temporary(THD*, TABLE_LIST*, TABLE_LIST*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0xfd65d1(%rip), %rax # 0x15bd4cc
cmpl $0x2, (%rax)
jne 0x5e6f0e
movq -0x20(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x30(%rbp)
jmp 0x5e6f1a
movq -0x20(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0x2, %edx
callq 0x7f88a0
cmpq $0x0, %rax
je 0x5e6f57
movq -0x28(%rbp), %rax
movq (%rax), %rdx
movl $0x41a, %edi # imm = 0x41A
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0xc12a30
movb $0x1, -0x1(%rbp)
jmp 0x5e6f7e
jmp 0x5e6f59
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x100(%rax), %rsi
movq -0x20(%rbp), %rdx
addq $0x18, %rdx
movq -0x28(%rbp), %rcx
callq 0x7f9b60
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZL19do_rename_temporaryP3THDP10TABLE_LISTS2_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
lea rax, lower_case_table_names
cmp dword ptr [rax], 2
jnz short loc_5E6F0E
mov rax, [rbp+var_20]
add rax, 48h ; 'H'
mov [rbp+var_30], rax
jmp short loc_5E6F1A
loc_5E6F0E:
mov rax, [rbp+var_20]
add rax, 28h ; '('
mov [rbp+var_30], rax
loc_5E6F1A:
mov rax, [rbp+var_30]
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov edx, 2
call _ZN3THD20find_temporary_tableEPK10TABLE_LISTNS_21Temporary_table_stateE; THD::find_temporary_table(TABLE_LIST const*,THD::Temporary_table_state)
cmp rax, 0
jz short loc_5E6F57
mov rax, [rbp+var_28]
mov rdx, [rax]
mov edi, 41Ah
xor eax, eax
mov esi, eax
mov al, 0
call my_error
mov [rbp+var_1], 1
jmp short loc_5E6F7E
loc_5E6F57:
jmp short $+2
loc_5E6F59:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+100h]
mov rdx, [rbp+var_20]
add rdx, 18h
mov rcx, [rbp+var_28]
call _ZN3THD22rename_temporary_tableEP5TABLEPK25st_mysql_const_lex_stringS4_; THD::rename_temporary_table(TABLE *,st_mysql_const_lex_string const*,st_mysql_const_lex_string const*)
and al, 1
mov [rbp+var_1], al
loc_5E6F7E:
mov al, [rbp+var_1]
and al, 1
add rsp, 30h
pop rbp
retn
|
char do_rename_temporary(THD *a1, TABLE_LIST *a2, TABLE_LIST *a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
char *v7; // [rsp+0h] [rbp-30h]
if ( lower_case_table_names == 2 )
v7 = (char *)a3 + 72;
else
v7 = (char *)a3 + 40;
if ( !THD::find_temporary_table(a1, a3, 2LL) )
return THD::rename_temporary_table(a1, *((_QWORD *)a2 + 32), (char *)a3 + 24, v7) & 1;
my_error(1050, 0, *(_QWORD *)v7, v3, v4, v5);
return 1;
}
|
operator=:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
POP RBP
RET
|
/* ilink::TEMPNAMEPLACEHOLDERVALUE(ilink const&) */
void __thiscall ilink::operator=(ilink *this,ilink *param_1)
{
*(int8 *)(this + 8) = *(int8 *)(param_1 + 8);
*(int8 *)(this + 0x10) = *(int8 *)(param_1 + 0x10);
return;
}
|
|
60,596
|
flux::common::Source::getRange(flux::common::SourceRange const&) const
|
kvthweatt[P]FluxLang/src/common/source.cpp
|
std::string_view Source::getRange(const SourceRange& range) const {
size_t start_offset = positionToOffset(range.start);
size_t end_offset = positionToOffset(range.end);
if (end_offset <= start_offset) {
return "";
}
return text_.substr(start_offset, end_offset - start_offset);
}
|
O1
|
cpp
|
flux::common::Source::getRange(flux::common::SourceRange const&) const:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x9ebe
movq %rax, %rbx
addq $0x10, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x9ebe
subq %rbx, %rax
jbe 0x9e96
movq (%r14), %rcx
movq %rcx, %rdx
subq %rbx, %rdx
jb 0x9ea5
cmpq %rax, %rdx
cmovbq %rdx, %rax
movq 0x8(%r14), %rdx
addq %rbx, %rdx
jmp 0x9e9f
leaq 0x21432(%rip), %rdx # 0x2b2cf
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x218aa(%rip), %rdi # 0x2b756
leaq 0x21889(%rip), %rsi # 0x2b73c
movq %rbx, %rdx
xorl %eax, %eax
callq 0x6380
nop
|
_ZNK4flux6common6Source8getRangeERKNS0_11SourceRangeE:
push r15
push r14
push rbx
mov r15, rsi
mov r14, rdi
call _ZNK4flux6common6Source16positionToOffsetERKNS0_14SourcePositionE; flux::common::Source::positionToOffset(flux::common::SourcePosition const&)
mov rbx, rax
add r15, 10h
mov rdi, r14
mov rsi, r15
call _ZNK4flux6common6Source16positionToOffsetERKNS0_14SourcePositionE; flux::common::Source::positionToOffset(flux::common::SourcePosition const&)
sub rax, rbx
jbe short loc_9E96
mov rcx, [r14]
mov rdx, rcx
sub rdx, rbx
jb short loc_9EA5
cmp rdx, rax
cmovb rax, rdx
mov rdx, [r14+8]
add rdx, rbx
jmp short loc_9E9F
loc_9E96:
lea rdx, asc_2B2CE+1; ""
xor eax, eax
loc_9E9F:
pop rbx
pop r14
pop r15
retn
loc_9EA5:
lea rdi, aSPosWhichIsZuS; "%s: __pos (which is %zu) > __size (whic"...
lea rsi, aBasicStringVie; "basic_string_view::substr"
mov rdx, rbx
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
|
unsigned long long flux::common::Source::getRange(unsigned long long *a1, long long a2)
{
unsigned long long v2; // rbx
unsigned long long v3; // rax
bool v4; // cc
unsigned long long result; // rax
v2 = ((long long (*)(void))flux::common::Source::positionToOffset)();
v3 = flux::common::Source::positionToOffset(a1, a2 + 16);
v4 = v3 <= v2;
result = v3 - v2;
if ( v4 )
return 0LL;
if ( *a1 < v2 )
std::__throw_out_of_range_fmt(
"%s: __pos (which is %zu) > __size (which is %zu)",
"basic_string_view::substr",
v2,
*a1);
if ( *a1 - v2 < result )
return *a1 - v2;
return result;
}
|
getRange:
PUSH R15
PUSH R14
PUSH RBX
MOV R15,RSI
MOV R14,RDI
CALL 0x00109ebe
MOV RBX,RAX
ADD R15,0x10
MOV RDI,R14
MOV RSI,R15
CALL 0x00109ebe
SUB RAX,RBX
JBE 0x00109e96
MOV RCX,qword ptr [R14]
MOV RDX,RCX
SUB RDX,RBX
JC 0x00109ea5
CMP RDX,RAX
CMOVC RAX,RDX
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RBX
JMP 0x00109e9f
LAB_00109e96:
LEA RDX,[0x12b2cf]
XOR EAX,EAX
LAB_00109e9f:
POP RBX
POP R14
POP R15
RET
LAB_00109ea5:
LEA RDI,[0x12b756]
LEA RSI,[0x12b73c]
MOV RDX,RBX
XOR EAX,EAX
CALL 0x00106380
|
/* flux::common::Source::getRange(flux::common::SourceRange const&) const */
int1 [16] __thiscall flux::common::Source::getRange(Source *this,SourceRange *param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
int *puVar4;
int1 auVar5 [16];
uVar1 = positionToOffset(this,(SourcePosition *)param_1);
uVar2 = positionToOffset(this,(SourcePosition *)(param_1 + 0x10));
uVar3 = uVar2 - uVar1;
if (uVar2 < uVar1 || uVar3 == 0) {
puVar4 = &DAT_0012b2cf;
uVar3 = 0;
}
else {
uVar2 = *(ulong *)this - uVar1;
if (*(ulong *)this < uVar1) {
/* WARNING: Subroutine does not return */
std::__throw_out_of_range_fmt
("%s: __pos (which is %zu) > __size (which is %zu)","basic_string_view::substr",
uVar1);
}
if (uVar2 < uVar3) {
uVar3 = uVar2;
}
puVar4 = (int *)(*(long *)(this + 8) + uVar1);
}
auVar5._8_8_ = puVar4;
auVar5._0_8_ = uVar3;
return auVar5;
}
|
|
60,597
|
pvio_socket_has_data
|
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
|
my_bool pvio_socket_has_data(MARIADB_PVIO *pvio, ssize_t *data_len)
{
struct st_pvio_socket *csock= NULL;
char tmp_buf;
ssize_t len;
my_bool mode;
if (!pvio || !pvio->data)
return 0;
csock= (struct st_pvio_socket *)pvio->data;
/* MSG_PEEK: Peeks at the incoming data. The data is copied into the buffer,
but is not removed from the input queue.
*/
pvio_socket_blocking(pvio, 0, &mode);
len= recv(csock->socket, &tmp_buf, sizeof(tmp_buf), MSG_PEEK);
pvio_socket_blocking(pvio, mode, 0);
if (len < 0)
return 1;
*data_len= len;
return 0;
}
|
O0
|
c
|
pvio_socket_has_data:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x423f9
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x423ff
movb $0x0, -0x1(%rbp)
jmp 0x42463
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
leaq -0x31(%rbp), %rdx
callq 0x413a0
movq -0x20(%rbp), %rax
movl (%rax), %edi
leaq -0x21(%rbp), %rsi
movl $0x1, %edx
movl $0x2, %ecx
callq 0x13160
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movsbl -0x31(%rbp), %esi
callq 0x413a0
cmpq $0x0, -0x30(%rbp)
jge 0x42454
movb $0x1, -0x1(%rbp)
jmp 0x42463
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
pvio_socket_has_data:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], 0
cmp [rbp+var_10], 0
jz short loc_423F9
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_423FF
loc_423F9:
mov [rbp+var_1], 0
jmp short loc_42463
loc_423FF:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
xor esi, esi
lea rdx, [rbp+var_31]
call pvio_socket_blocking
mov rax, [rbp+var_20]
mov edi, [rax]
lea rsi, [rbp+var_21]
mov edx, 1
mov ecx, 2
call _recv
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
xor eax, eax
mov edx, eax
movsx esi, [rbp+var_31]
call pvio_socket_blocking
cmp [rbp+var_30], 0
jge short loc_42454
mov [rbp+var_1], 1
jmp short loc_42463
loc_42454:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_1], 0
loc_42463:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
|
char pvio_socket_has_data(unsigned int **a1, long long *a2)
{
char v3; // [rsp+Fh] [rbp-31h] BYREF
long long v4; // [rsp+10h] [rbp-30h]
char v5; // [rsp+1Fh] [rbp-21h] BYREF
unsigned int *v6; // [rsp+20h] [rbp-20h]
long long *v7; // [rsp+28h] [rbp-18h]
unsigned int **v8; // [rsp+30h] [rbp-10h]
v8 = a1;
v7 = a2;
v6 = 0LL;
if ( !a1 || !*v8 )
return 0;
v6 = *v8;
pvio_socket_blocking(v8, 0, &v3);
v4 = recv(*v6, &v5, 1LL, 2LL);
pvio_socket_blocking(v8, v3, 0LL);
if ( v4 < 0 )
return 1;
*v7 = v4;
return 0;
}
|
pvio_socket_has_data:
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],0x0
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001423f9
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x001423ff
LAB_001423f9:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00142463
LAB_001423ff:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
LEA RDX,[RBP + -0x31]
CALL 0x001413a0
MOV RAX,qword ptr [RBP + -0x20]
MOV EDI,dword ptr [RAX]
LEA RSI,[RBP + -0x21]
MOV EDX,0x1
MOV ECX,0x2
CALL 0x00113160
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV EDX,EAX
MOVSX ESI,byte ptr [RBP + -0x31]
CALL 0x001413a0
CMP qword ptr [RBP + -0x30],0x0
JGE 0x00142454
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00142463
LAB_00142454:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x1],0x0
LAB_00142463:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1 pvio_socket_has_data(long *param_1,long *param_2)
{
char local_39;
long local_38;
int1 local_29;
int *local_28;
long *local_20;
long *local_18;
int1 local_9;
if ((param_1 == (long *)0x0) || (*param_1 == 0)) {
local_9 = 0;
}
else {
local_28 = (int *)*param_1;
local_20 = param_2;
local_18 = param_1;
pvio_socket_blocking(param_1,0,&local_39);
local_38 = recv(*local_28,&local_29,1,2);
pvio_socket_blocking(local_18,(int)local_39,0);
if (local_38 < 0) {
local_9 = 1;
}
else {
*local_20 = local_38;
local_9 = 0;
}
}
return local_9;
}
|
|
60,598
|
my_fstat
|
eloqsql/mysys/my_lib.c
|
int my_fstat(File Filedes, MY_STAT *stat_area,
myf MyFlags __attribute__((unused)))
{
DBUG_ENTER("my_fstat");
DBUG_PRINT("my",("fd: %d MyFlags: %lu", Filedes, MyFlags));
#ifdef _WIN32
DBUG_RETURN(my_win_fstat(Filedes, stat_area));
#elif defined HAVE_valgrind
{
int s= fstat(Filedes, stat_area);
if (!s)
MSAN_STAT_WORKAROUND(stat_area);
DBUG_RETURN(s);
}
#else
DBUG_RETURN(fstat(Filedes, (struct stat *) stat_area));
#endif
}
|
O0
|
c
|
my_fstat:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0xfbd45
jmp 0xfbd47
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x2a550
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
|
my_fstat:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_FBD45:
jmp short $+2
loc_FBD47:
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call _fstat64
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
add rsp, 20h
pop rbp
retn
|
long long my_fstat(unsigned int a1, long long a2)
{
return (unsigned int)fstat64(a1, a2);
}
|
my_fstat:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x001fbd45
LAB_001fbd45:
JMP 0x001fbd47
LAB_001fbd47:
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0012a550
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD RSP,0x20
POP RBP
RET
|
int my_fstat(int param_1,stat64 *param_2)
{
int iVar1;
iVar1 = fstat64(param_1,param_2);
return iVar1;
}
|
|
60,599
|
testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocator<testing::internal::TraceInfo>>>::ValueHolder* testing::internal::CheckedDowncastToActualType<testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocator<testing::internal::TraceInfo>>>::ValueHolder, testing::internal::ThreadLocalValueHolderBase>(testing::internal::ThreadLocalValueHolderBase*)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h
|
Derived* CheckedDowncastToActualType(Base* base) {
static_assert(std::is_base_of<Base, Derived>::value,
"target type not derived from source type");
#if GTEST_HAS_RTTI
GTEST_CHECK_(base == nullptr || dynamic_cast<Derived*>(base) != nullptr);
#endif
return static_cast<Derived*>(base);
}
|
O0
|
c
|
testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocator<testing::internal::TraceInfo>>>::ValueHolder* testing::internal::CheckedDowncastToActualType<testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocator<testing::internal::TraceInfo>>>::ValueHolder, testing::internal::ThreadLocalValueHolderBase>(testing::internal::ThreadLocalValueHolderBase*):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movb $0x1, %al
cmpq $0x0, 0x30(%rsp)
movb %al, 0x1b(%rsp)
je 0xfec03
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0xfebea
movq 0x10(%rsp), %rdi
leaq 0x85c55(%rip), %rsi # 0x184828
leaq 0x85c5e(%rip), %rdx # 0x184838
xorl %eax, %eax
movl %eax, %ecx
callq 0x167f0
movq %rax, 0x8(%rsp)
jmp 0xfebf3
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0xfebf3
movq 0x8(%rsp), %rax
cmpq $0x0, %rax
setne %al
movb %al, 0x1b(%rsp)
movb 0x1b(%rsp), %al
movzbl %al, %edi
andl $0x1, %edi
callq 0xbc040
testb $0x1, %al
jne 0xfec18
jmp 0xfec1a
jmp 0xfec79
leaq 0x1f949(%rip), %rdx # 0x11e56a
leaq 0x2c(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x3, %esi
movl $0x4aa, %ecx # imm = 0x4AA
callq 0xc17d0
movq (%rsp), %rdi
callq 0x20a90
movq %rax, %rdi
leaq 0x1fc0d(%rip), %rsi # 0x11e859
callq 0x166e0
jmp 0xfec53
leaq 0x2c(%rsp), %rdi
callq 0xc1940
jmp 0xfec79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x2c(%rsp), %rdi
callq 0xc1940
jmp 0xfec83
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x16cf0
nopl (%rax)
|
_ZN7testing8internal27CheckedDowncastToActualTypeINS0_11ThreadLocalISt6vectorINS0_9TraceInfoESaIS4_EEE11ValueHolderENS0_26ThreadLocalValueHolderBaseEEEPT_PT0_:
sub rsp, 38h
mov qword ptr [rsp+38h+var_8], rdi; int
mov al, 1
cmp qword ptr [rsp+38h+var_8], 0
mov [rsp+38h+var_1D], al
jz short loc_FEC03
mov rax, qword ptr [rsp+38h+var_8]
mov [rsp+38h+lpsrc], rax; int
cmp rax, 0
jz short loc_FEBEA
mov rdi, [rsp+38h+lpsrc]; lpsrc
lea rsi, _ZTIN7testing8internal26ThreadLocalValueHolderBaseE; bool
lea rdx, _ZTIN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE11ValueHolderE; lpdtype
xor eax, eax
mov ecx, eax; s2d
call ___dynamic_cast
mov qword ptr [rsp+38h+var_30], rax; int
jmp short loc_FEBF3
loc_FEBEA:
xor eax, eax
mov qword ptr [rsp+38h+var_30], rax
jmp short $+2
loc_FEBF3:
mov rax, qword ptr [rsp+38h+var_30]
cmp rax, 0
setnz al
mov [rsp+38h+var_1D], al
loc_FEC03:
mov al, [rsp+38h+var_1D]
movzx edi, al
and edi, 1; this
call _ZN7testing8internal6IsTrueEb; testing::internal::IsTrue(bool)
test al, 1
jnz short loc_FEC18
jmp short loc_FEC1A
loc_FEC18:
jmp short loc_FEC79
loc_FEC1A:
lea rdx, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+38h+var_C]; int
mov [rsp+38h+var_38], rdi; int
mov esi, 3
mov ecx, 4AAh
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, [rsp+38h+var_38]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov rdi, rax
lea rsi, aConditionBaseN; "Condition base == nullptr || dynamic_ca"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_FEC53:
lea rdi, [rsp+38h+var_C]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_FEC79
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
lea rdi, [rsp+arg_24]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_FEC83
loc_FEC79:
mov rax, qword ptr [rsp+38h+var_8]
add rsp, 38h
retn
loc_FEC83:
mov rdi, [rsp+arg_18]
call __Unwind_Resume
|
long long testing::internal::CheckedDowncastToActualType<testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo>>::ValueHolder,testing::internal::ThreadLocalValueHolderBase>(
long long a1)
{
void *Stream; // rax
bool v3; // [rsp+1Bh] [rbp-1Dh]
int v4; // [rsp+2Ch] [rbp-Ch] BYREF
int v5[2]; // [rsp+30h] [rbp-8h]
*(_QWORD *)v5 = a1;
v3 = 1;
if ( a1 )
v3 = __dynamic_cast(
*(const void **)v5,
(const struct __class_type_info *)&`typeinfo for'testing::internal::ThreadLocalValueHolderBase,
(const struct __class_type_info *)&`typeinfo for'testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo>>::ValueHolder,
0LL) != 0LL;
if ( (testing::internal::IsTrue((testing::internal *)v3) & 1) == 0 )
{
testing::internal::GTestLog::GTestLog(
(testing::internal::GTestLog *)&v4,
3,
(long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h",
1194);
Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)&v4);
std::operator<<<std::char_traits<char>>(
Stream,
"Condition base == nullptr || dynamic_cast<Derived*>(base) != nullptr failed. ");
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v4);
}
return *(_QWORD *)v5;
}
|
CheckedDowncastToActualType<testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo,std::allocator<testing::internal::TraceInfo>>>::ValueHolder,testing::internal::ThreadLocalValueHolderBase>:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV AL,0x1
CMP qword ptr [RSP + 0x30],0x0
MOV byte ptr [RSP + 0x1b],AL
JZ 0x001fec03
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
CMP RAX,0x0
JZ 0x001febea
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[0x284828]
LEA RDX,[0x284838]
XOR EAX,EAX
MOV ECX,EAX
CALL 0x001167f0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001febf3
LAB_001febea:
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001febf3
LAB_001febf3:
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,0x0
SETNZ AL
MOV byte ptr [RSP + 0x1b],AL
LAB_001fec03:
MOV AL,byte ptr [RSP + 0x1b]
MOVZX EDI,AL
AND EDI,0x1
CALL 0x001bc040
TEST AL,0x1
JNZ 0x001fec18
JMP 0x001fec1a
LAB_001fec18:
JMP 0x001fec79
LAB_001fec1a:
LEA RDX,[0x21e56a]
LEA RDI,[RSP + 0x2c]
MOV qword ptr [RSP],RDI
MOV ESI,0x3
MOV ECX,0x4aa
CALL 0x001c17d0
MOV RDI,qword ptr [RSP]
CALL 0x00120a90
MOV RDI,RAX
LAB_001fec45:
LEA RSI,[0x21e859]
CALL 0x001166e0
LAB_001fec51:
JMP 0x001fec53
LAB_001fec53:
LEA RDI,[RSP + 0x2c]
CALL 0x001c1940
JMP 0x001fec79
LAB_001fec79:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
/* testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo,
std::allocator<testing::internal::TraceInfo> > >::ValueHolder*
testing::internal::CheckedDowncastToActualType<testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo,
std::allocator<testing::internal::TraceInfo> > >::ValueHolder,
testing::internal::ThreadLocalValueHolderBase>(testing::internal::ThreadLocalValueHolderBase*) */
ValueHolder *
testing::internal::
CheckedDowncastToActualType<testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo,std::allocator<testing::internal::TraceInfo>>>::ValueHolder,testing::internal::ThreadLocalValueHolderBase>
(ThreadLocalValueHolderBase *param_1)
{
ulong uVar1;
ostream *poVar2;
int8 in_R8;
int8 in_R9;
long local_30;
bool local_1d;
GTestLog local_c [4];
ValueHolder *local_8;
local_1d = true;
local_8 = (ValueHolder *)param_1;
if (param_1 != (ThreadLocalValueHolderBase *)0x0) {
if (param_1 == (ThreadLocalValueHolderBase *)0x0) {
local_30 = 0;
}
else {
local_30 = __dynamic_cast(param_1,&ThreadLocalValueHolderBase::typeinfo,
&ThreadLocal<std::vector<testing::internal::TraceInfo,std::allocator<testing::internal::TraceInfo>>>
::ValueHolder::typeinfo,0);
}
local_1d = local_30 != 0;
}
uVar1 = IsTrue(local_1d);
if ((uVar1 & 1) == 0) {
GTestLog::GTestLog(local_c,3,
"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h"
,0x4aa,in_R8,in_R9,local_c);
poVar2 = (ostream *)GTestLog::GetStream();
/* try { // try from 001fec45 to 001fec50 has its CatchHandler @ 001fec5f */
std::operator<<(poVar2,
"Condition base == nullptr || dynamic_cast<Derived*>(base) != nullptr failed. ")
;
GTestLog::~GTestLog(local_c);
}
return local_8;
}
|
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.