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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
33,800 | my_hash_delete | eloqsql/mysys/hash.c | my_bool my_hash_delete(HASH *hash, uchar *record)
{
uint pos2,idx,empty_index;
my_hash_value_type pos_hashnr, lastpos_hashnr;
size_t blength;
HASH_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty;
DBUG_ENTER("my_hash_delete");
if (!hash->records)
DBUG_RETURN(1);
blength=hash->blength;
data=dynamic_element(&hash->array,0,HASH_LINK*);
/* Search after record with key */
pos= data + my_hash_mask(rec_hashnr(hash, record), blength, hash->records);
gpos = 0;
while (pos->data != record)
{
gpos=pos;
if (pos->next == NO_RECORD)
DBUG_RETURN(1); /* Key not found */
pos=data+pos->next;
}
if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1;
lastpos=data+hash->records;
/* Remove link to record */
empty=pos; empty_index=(uint) (empty-data);
if (gpos)
gpos->next=pos->next; /* unlink current ptr */
else if (pos->next != NO_RECORD)
{
empty=data+(empty_index=pos->next);
pos[0]= empty[0];
}
if (empty == lastpos) /* last key at wrong pos or no next link */
goto exit;
/* Move the last key (lastpos) */
lastpos_hashnr= lastpos->hash_nr;
/* pos is where lastpos should be */
pos= data + my_hash_mask(lastpos_hashnr, hash->blength, hash->records);
if (pos == empty) /* Move to empty position. */
{
empty[0]=lastpos[0];
goto exit;
}
pos_hashnr= pos->hash_nr;
/* pos3 is where the pos should be */
pos3= data + my_hash_mask(pos_hashnr, hash->blength, hash->records);
if (pos != pos3)
{ /* pos is on wrong posit */
empty[0]=pos[0]; /* Save it here */
pos[0]=lastpos[0]; /* This should be here */
movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index);
goto exit;
}
pos2= my_hash_mask(lastpos_hashnr, blength, hash->records + 1);
if (pos2 == my_hash_mask(pos_hashnr, blength, hash->records + 1))
{ /* Identical key-positions */
if (pos2 != hash->records)
{
empty[0]=lastpos[0];
movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index);
goto exit;
}
idx= (uint) (pos-data); /* Link pos->next after lastpos */
}
else idx= NO_RECORD; /* Different positions merge */
empty[0]=lastpos[0];
movelink(data,idx,empty_index,pos->next);
pos->next=empty_index;
exit:
(void) pop_dynamic(&hash->array);
if (hash->free)
(*hash->free)((uchar*) record);
DBUG_RETURN(0);
} | O0 | c | my_hash_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x32b79
jmp 0x32b70
movb $0x1, -0x1(%rbp)
jmp 0x32ef2
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x32f00
movl %eax, %edi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x32380
movl %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
je 0x32c15
movq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
cmpl $-0x1, (%rax)
jne 0x32bfe
jmp 0x32bf5
movb $0x1, -0x1(%rbp)
jmp 0x32ef2
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
jmp 0x32bd4
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x18(%rcx)
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jae 0x32c44
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
shrq %rcx
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, -0x24(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x32c8a
movq -0x58(%rbp), %rax
movl (%rax), %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
jmp 0x32cc5
movq -0x58(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x32cc3
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, -0x24(%rbp)
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x58(%rbp), %rax
movq -0x68(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x32cc5
movq -0x68(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x32cd4
jmp 0x32ec6
movq -0x48(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x78(%rbp)
movl -0x2c(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x32380
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x68(%rbp), %rax
jne 0x32d36
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x32ec6
movq -0x58(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x28(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x32380
movl %eax, %ecx
movq -0x80(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
je 0x32ddc
movq -0x68(%rbp), %rax
movq -0x58(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %esi
movq -0x60(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %edx
movl -0x24(%rbp), %ecx
callq 0x32b10
jmp 0x32ec6
movl -0x2c(%rbp), %edi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
addq $0x1, %rdx
callq 0x32380
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x28(%rbp), %edi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
addq $0x1, %rdx
callq 0x32380
movl %eax, %ecx
movl -0x84(%rbp), %eax
cmpl %ecx, %eax
jne 0x32e8b
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0x32e77
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %esi
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %edx
movl -0x24(%rbp), %ecx
callq 0x32b10
jmp 0x32ec6
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, -0x20(%rbp)
jmp 0x32e92
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movl -0x20(%rbp), %esi
movl -0x24(%rbp), %edx
movq -0x58(%rbp), %rax
movl (%rax), %ecx
callq 0x32b10
movl -0x24(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x37610
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x32eec
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
jmp 0x32eee
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x90, %rsp
popq %rbp
retq
nop
| my_hash_delete:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
cmp qword ptr [rax+18h], 0
jnz short loc_32B79
jmp short $+2
loc_32B70:
mov [rbp+var_1], 1
jmp loc_32EF2
loc_32B79:
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_70], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call rec_hashnr
mov edi, eax
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov ecx, eax
mov rax, [rbp+var_70]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_58], rax
mov [rbp+var_50], 0
loc_32BD4:
mov rax, [rbp+var_58]
mov rax, [rax+8]
cmp rax, [rbp+var_18]
jz short loc_32C15
mov rax, [rbp+var_58]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
cmp dword ptr [rax], 0FFFFFFFFh
jnz short loc_32BFE
jmp short $+2
loc_32BF5:
mov [rbp+var_1], 1
jmp loc_32EF2
loc_32BFE:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_58]
mov ecx, [rcx]
shl rcx, 4
add rax, rcx
mov [rbp+var_58], rax
jmp short loc_32BD4
loc_32C15:
mov rcx, [rbp+var_10]
mov rax, [rcx+18h]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rcx+18h], rax
mov rcx, [rbp+var_10]
mov rcx, [rcx+10h]
shr rcx, 1
cmp rax, rcx
jnb short loc_32C44
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
shr rcx, 1
mov [rax+10h], rcx
loc_32C44:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
mov rcx, [rcx+18h]
shl rcx, 4
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_58]
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov [rbp+var_24], eax
cmp [rbp+var_50], 0
jz short loc_32C8A
mov rax, [rbp+var_58]
mov ecx, [rax]
mov rax, [rbp+var_50]
mov [rax], ecx
jmp short loc_32CC5
loc_32C8A:
mov rax, [rbp+var_58]
cmp dword ptr [rax], 0FFFFFFFFh
jz short loc_32CC3
mov rax, [rbp+var_40]
mov rcx, [rbp+var_58]
mov ecx, [rcx]
mov [rbp+var_24], ecx
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_68], rax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_68]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
loc_32CC3:
jmp short $+2
loc_32CC5:
mov rax, [rbp+var_68]
cmp rax, [rbp+var_48]
jnz short loc_32CD4
jmp loc_32EC6
loc_32CD4:
mov rax, [rbp+var_48]
mov eax, [rax+4]
mov [rbp+var_2C], eax
mov rax, [rbp+var_40]
mov [rbp+var_78], rax
mov edi, [rbp+var_2C]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov ecx, eax
mov rax, [rbp+var_78]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
cmp rax, [rbp+var_68]
jnz short loc_32D36
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
jmp loc_32EC6
loc_32D36:
mov rax, [rbp+var_58]
mov eax, [rax+4]
mov [rbp+var_28], eax
mov rax, [rbp+var_40]
mov [rbp+var_80], rax
mov edi, [rbp+var_28]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov ecx, eax
mov rax, [rbp+var_80]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_60], rax
mov rax, [rbp+var_58]
cmp rax, [rbp+var_60]
jz short loc_32DDC
mov rax, [rbp+var_68]
mov rcx, [rbp+var_58]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rax, [rbp+var_58]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_40]
mov rax, [rbp+var_58]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov esi, eax
mov rax, [rbp+var_60]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov edx, eax
mov ecx, [rbp+var_24]
call movelink
jmp loc_32EC6
loc_32DDC:
mov edi, [rbp+var_2C]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
add rdx, 1
call my_hash_mask
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
mov [rbp+var_84], eax
mov edi, [rbp+var_28]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
add rdx, 1
call my_hash_mask
mov ecx, eax
mov eax, [rbp+var_84]
cmp eax, ecx
jnz short loc_32E8B
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
cmp rax, [rcx+18h]
jz short loc_32E77
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_40]
mov rax, [rbp+var_48]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov esi, eax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov edx, eax
mov ecx, [rbp+var_24]
call movelink
jmp short loc_32EC6
loc_32E77:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov [rbp+var_20], eax
jmp short loc_32E92
loc_32E8B:
mov [rbp+var_20], 0FFFFFFFFh
loc_32E92:
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_40]
mov esi, [rbp+var_20]
mov edx, [rbp+var_24]
mov rax, [rbp+var_58]
mov ecx, [rax]
call movelink
mov ecx, [rbp+var_24]
mov rax, [rbp+var_58]
mov [rax], ecx
loc_32EC6:
mov rdi, [rbp+var_10]
add rdi, 28h ; '('
call pop_dynamic
mov rax, [rbp+var_10]
cmp qword ptr [rax+60h], 0
jz short loc_32EEC
mov rax, [rbp+var_10]
mov rax, [rax+60h]
mov rdi, [rbp+var_18]
call rax
loc_32EEC:
jmp short $+2
loc_32EEE:
mov [rbp+var_1], 0
loc_32EF2:
mov al, [rbp+var_1]
add rsp, 90h
pop rbp
retn
| char my_hash_delete(long long a1, long long a2)
{
unsigned int v2; // eax
unsigned long long v3; // rax
_QWORD *v5; // [rsp+28h] [rbp-68h]
long long v6; // [rsp+30h] [rbp-60h]
unsigned int *v7; // [rsp+38h] [rbp-58h]
long long v8; // [rsp+38h] [rbp-58h]
_DWORD *v9; // [rsp+40h] [rbp-50h]
long long v10; // [rsp+48h] [rbp-48h]
long long v11; // [rsp+50h] [rbp-40h]
unsigned long long v12; // [rsp+58h] [rbp-38h]
unsigned int v13; // [rsp+64h] [rbp-2Ch]
unsigned int v14; // [rsp+68h] [rbp-28h]
unsigned int v15; // [rsp+6Ch] [rbp-24h]
int v16; // [rsp+70h] [rbp-20h]
int v17; // [rsp+74h] [rbp-1Ch]
if ( !*(_QWORD *)(a1 + 24) )
return 1;
v12 = *(_QWORD *)(a1 + 16);
v11 = *(_QWORD *)(a1 + 40);
v2 = rec_hashnr(a1, a2);
v7 = (unsigned int *)(16LL * (unsigned int)my_hash_mask(v2, v12, *(_QWORD *)(a1 + 24)) + v11);
v9 = 0LL;
while ( *((_QWORD *)v7 + 1) != a2 )
{
v9 = v7;
if ( *v7 == -1 )
return 1;
v7 = (unsigned int *)(16LL * *v7 + v11);
}
v3 = *(_QWORD *)(a1 + 24) - 1LL;
*(_QWORD *)(a1 + 24) = v3;
if ( v3 < *(_QWORD *)(a1 + 16) >> 1 )
*(_QWORD *)(a1 + 16) >>= 1;
v10 = 16LL * *(_QWORD *)(a1 + 24) + v11;
v5 = v7;
v15 = ((long long)v7 - v11) >> 4;
if ( v9 )
{
*v9 = *v7;
}
else if ( *v7 != -1 )
{
v15 = *v7;
v5 = (_QWORD *)(16LL * *v7 + v11);
*(_QWORD *)v7 = *v5;
*((_QWORD *)v7 + 1) = v5[1];
}
if ( v5 != (_QWORD *)v10 )
{
v13 = *(_DWORD *)(v10 + 4);
v8 = 16LL * (unsigned int)my_hash_mask(v13, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) + v11;
if ( (_QWORD *)v8 == v5 )
{
*v5 = *(_QWORD *)v10;
v5[1] = *(_QWORD *)(v10 + 8);
}
else
{
v14 = *(_DWORD *)(v8 + 4);
v6 = 16LL * (unsigned int)my_hash_mask(v14, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) + v11;
if ( v8 == v6 )
{
v17 = my_hash_mask(v13, v12, *(_QWORD *)(a1 + 24) + 1LL);
if ( v17 == (unsigned int)my_hash_mask(v14, v12, *(_QWORD *)(a1 + 24) + 1LL) )
{
if ( v17 != *(_QWORD *)(a1 + 24) )
{
*v5 = *(_QWORD *)v10;
v5[1] = *(_QWORD *)(v10 + 8);
movelink(v11, (v10 - v11) >> 4, (v8 - v11) >> 4, v15);
goto LABEL_25;
}
v16 = (v8 - v11) >> 4;
}
else
{
v16 = -1;
}
*v5 = *(_QWORD *)v10;
v5[1] = *(_QWORD *)(v10 + 8);
movelink(v11, v16, v15, *(_DWORD *)v8);
*(_DWORD *)v8 = v15;
goto LABEL_25;
}
*v5 = *(_QWORD *)v8;
v5[1] = *(_QWORD *)(v8 + 8);
*(_QWORD *)v8 = *(_QWORD *)v10;
*(_QWORD *)(v8 + 8) = *(_QWORD *)(v10 + 8);
movelink(v11, (v8 - v11) >> 4, (v6 - v11) >> 4, v15);
}
}
LABEL_25:
pop_dynamic(a1 + 40);
if ( *(_QWORD *)(a1 + 96) )
(*(void ( **)(long long))(a1 + 96))(a2);
return 0;
}
| my_hash_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x00132b79
JMP 0x00132b70
LAB_00132b70:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00132ef2
LAB_00132b79:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00132f00
MOV EDI,EAX
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x00132380
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV qword ptr [RBP + -0x50],0x0
LAB_00132bd4:
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x18]
JZ 0x00132c15
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
CMP dword ptr [RAX],-0x1
JNZ 0x00132bfe
JMP 0x00132bf5
LAB_00132bf5:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00132ef2
LAB_00132bfe:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RCX]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00132bd4
LAB_00132c15:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RCX + 0x18]
ADD RAX,-0x1
MOV qword ptr [RCX + 0x18],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x10]
SHR RCX,0x1
CMP RAX,RCX
JNC 0x00132c44
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
SHR RCX,0x1
MOV qword ptr [RAX + 0x10],RCX
LAB_00132c44:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x18]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV dword ptr [RBP + -0x24],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x00132c8a
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
JMP 0x00132cc5
LAB_00132c8a:
MOV RAX,qword ptr [RBP + -0x58]
CMP dword ptr [RAX],-0x1
JZ 0x00132cc3
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RBP + -0x24],ECX
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
LAB_00132cc3:
JMP 0x00132cc5
LAB_00132cc5:
MOV RAX,qword ptr [RBP + -0x68]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x00132cd4
JMP 0x00132ec6
LAB_00132cd4:
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x78],RAX
MOV EDI,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x00132380
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x78]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x00132d36
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x00132ec6
LAB_00132d36:
MOV RAX,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x80],RAX
MOV EDI,dword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x00132380
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x80]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x60]
JZ 0x00132ddc
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV EDX,EAX
MOV ECX,dword ptr [RBP + -0x24]
CALL 0x00132b10
JMP 0x00132ec6
LAB_00132ddc:
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
ADD RDX,0x1
CALL 0x00132380
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x84],EAX
MOV EDI,dword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
ADD RDX,0x1
CALL 0x00132380
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x84]
CMP EAX,ECX
JNZ 0x00132e8b
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x18]
JZ 0x00132e77
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV EDX,EAX
MOV ECX,dword ptr [RBP + -0x24]
CALL 0x00132b10
JMP 0x00132ec6
LAB_00132e77:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV dword ptr [RBP + -0x20],EAX
JMP 0x00132e92
LAB_00132e8b:
MOV dword ptr [RBP + -0x20],0xffffffff
LAB_00132e92:
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RAX]
CALL 0x00132b10
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x58]
MOV dword ptr [RAX],ECX
LAB_00132ec6:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x28
CALL 0x00137610
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x00132eec
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x60]
MOV RDI,qword ptr [RBP + -0x18]
CALL RAX
LAB_00132eec:
JMP 0x00132eee
LAB_00132eee:
MOV byte ptr [RBP + -0x1],0x0
LAB_00132ef2:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x90
POP RBP
RET
|
int1 my_hash_delete(long param_1,long param_2)
{
int8 uVar1;
long lVar2;
int4 uVar3;
uint uVar4;
uint uVar5;
uint uVar6;
ulong uVar7;
uint *puVar8;
uint *puVar9;
uint *puVar10;
uint *local_70;
uint *local_60;
uint *local_58;
uint local_2c;
int4 local_28;
if (*(long *)(param_1 + 0x18) == 0) {
return 1;
}
uVar1 = *(int8 *)(param_1 + 0x10);
lVar2 = *(long *)(param_1 + 0x28);
uVar3 = rec_hashnr(param_1,param_2);
uVar4 = my_hash_mask(uVar3,uVar1,*(int8 *)(param_1 + 0x18));
local_58 = (uint *)0x0;
while (local_60 = (uint *)(lVar2 + (ulong)uVar4 * 0x10), *(long *)(local_60 + 2) != param_2) {
local_58 = local_60;
if (*local_60 == 0xffffffff) {
return 1;
}
uVar4 = *local_60;
}
uVar7 = *(long *)(param_1 + 0x18) - 1;
*(ulong *)(param_1 + 0x18) = uVar7;
if (uVar7 < *(ulong *)(param_1 + 0x10) >> 1) {
*(ulong *)(param_1 + 0x10) = *(ulong *)(param_1 + 0x10) >> 1;
}
puVar8 = (uint *)(lVar2 + *(long *)(param_1 + 0x18) * 0x10);
local_70 = local_60;
local_2c = (uint)((long)local_60 - lVar2 >> 4);
if (local_58 == (uint *)0x0) {
if (*local_60 != 0xffffffff) {
local_2c = *local_60;
local_70 = (uint *)(lVar2 + (ulong)local_2c * 0x10);
*(int8 *)local_60 = *(int8 *)local_70;
*(int8 *)(local_60 + 2) = *(int8 *)(local_70 + 2);
}
}
else {
*local_58 = *local_60;
}
if (local_70 != puVar8) {
uVar4 = puVar8[1];
uVar5 = my_hash_mask(uVar4,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18));
puVar9 = (uint *)(lVar2 + (ulong)uVar5 * 0x10);
if (puVar9 == local_70) {
*(int8 *)local_70 = *(int8 *)puVar8;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2);
}
else {
uVar5 = puVar9[1];
uVar6 = my_hash_mask(uVar5,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18));
puVar10 = (uint *)(lVar2 + (ulong)uVar6 * 0x10);
if (puVar9 == puVar10) {
uVar4 = my_hash_mask(uVar4,uVar1,*(long *)(param_1 + 0x18) + 1);
uVar5 = my_hash_mask(uVar5,uVar1,*(long *)(param_1 + 0x18) + 1);
if (uVar4 == uVar5) {
if ((ulong)uVar4 != *(ulong *)(param_1 + 0x18)) {
*(int8 *)local_70 = *(int8 *)puVar8;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2);
movelink(lVar2,(long)puVar8 - lVar2 >> 4 & 0xffffffff,
(long)puVar9 - lVar2 >> 4 & 0xffffffff,local_2c);
goto LAB_00132ec6;
}
local_28 = (int4)((long)puVar9 - lVar2 >> 4);
}
else {
local_28 = 0xffffffff;
}
*(int8 *)local_70 = *(int8 *)puVar8;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2);
movelink(lVar2,local_28,local_2c,*puVar9);
*puVar9 = local_2c;
}
else {
*(int8 *)local_70 = *(int8 *)puVar9;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar9 + 2);
*(int8 *)puVar9 = *(int8 *)puVar8;
*(int8 *)(puVar9 + 2) = *(int8 *)(puVar8 + 2);
movelink(lVar2,(long)puVar9 - lVar2 >> 4 & 0xffffffff,
(long)puVar10 - lVar2 >> 4 & 0xffffffff,local_2c);
}
}
}
LAB_00132ec6:
pop_dynamic(param_1 + 0x28);
if (*(long *)(param_1 + 0x60) != 0) {
(**(code **)(param_1 + 0x60))(param_2);
}
return 0;
}
| |
33,801 | std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char) | monkey531[P]llama/common/common.h | static std::vector<T> string_split(const std::string & str, char delim) {
static_assert(!std::is_same<T, std::string>::value, "Please use the specialized version for std::string");
std::vector<T> values;
std::istringstream str_stream(str);
std::string token;
while (std::getline(str_stream, token, delim)) {
T value;
std::istringstream token_stream(token);
token_stream >> value;
values.push_back(value);
}
return values;
} | O0 | c | std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char):
subq $0x378, %rsp # imm = 0x378
movq %rdi, 0x18(%rsp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, 0x20(%rsp)
movq %rdi, 0x370(%rsp)
movq %rsi, 0x368(%rsp)
movb %al, 0x367(%rsp)
movb $0x0, 0x366(%rsp)
callq 0x63370
movq 0x368(%rsp), %rsi
leaq 0x1e0(%rsp), %rdi
movl $0x8, %edx
callq 0x5a830
jmp 0x887d6
leaq 0x1b0(%rsp), %rdi
callq 0x5a610
movsbl 0x367(%rsp), %edx
leaq 0x1e0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x5a040
movq %rax, 0x10(%rsp)
jmp 0x88807
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x5a650
movb %al, 0xf(%rsp)
jmp 0x88821
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x8882e
jmp 0x888cd
leaq 0x28(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
movl $0x8, %edx
callq 0x5a830
jmp 0x88847
leaq 0x28(%rsp), %rdi
leaq 0x1ac(%rsp), %rsi
callq 0x5b4b0
jmp 0x8885b
movq 0x18(%rsp), %rdi
leaq 0x1ac(%rsp), %rsi
callq 0xe94d0
jmp 0x8886f
leaq 0x28(%rsp), %rdi
callq 0x5a9f0
jmp 0x887e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
jmp 0x8892e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
jmp 0x888fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x5a9f0
jmp 0x888fb
movb $0x1, 0x366(%rsp)
leaq 0x1b0(%rsp), %rdi
callq 0x5b588
leaq 0x1e0(%rsp), %rdi
callq 0x5a9f0
testb $0x1, 0x366(%rsp)
jne 0x88921
jmp 0x88917
leaq 0x1b0(%rsp), %rdi
callq 0x5b588
leaq 0x1e0(%rsp), %rdi
callq 0x5a9f0
jmp 0x8892e
movq 0x18(%rsp), %rdi
callq 0x62300
movq 0x20(%rsp), %rax
addq $0x378, %rsp # imm = 0x378
retq
movq 0x18(%rsp), %rdi
callq 0x62300
movq 0x1d8(%rsp), %rdi
callq 0x5abf0
nopw %cs:(%rax,%rax)
| _ZL12string_splitIiESt6vectorIT_SaIS1_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
sub rsp, 378h
mov [rsp+378h+var_360], rdi
mov al, dl
mov rcx, rdi
mov [rsp+378h+var_358], rcx
mov [rsp+378h+var_8], rdi
mov [rsp+378h+var_10], rsi
mov [rsp+378h+var_11], al
mov [rsp+378h+var_12], 0
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov rsi, [rsp+378h+var_10]
lea rdi, [rsp+378h+var_198]
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
jmp short $+2
loc_887D6:
lea rdi, [rsp+378h+var_1C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
loc_887E3:
movsx edx, [rsp+378h+var_11]
lea rdi, [rsp+378h+var_198]
lea rsi, [rsp+378h+var_1C8]
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov [rsp+378h+var_368], rax
jmp short $+2
loc_88807:
mov rdi, [rsp+378h+var_368]
mov rax, [rdi]
mov rax, [rax-18h]
add rdi, rax
call __ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv; std::ios::operator bool(void)
mov [rsp+378h+var_369], al
jmp short $+2
loc_88821:
mov al, [rsp+378h+var_369]
test al, 1
jnz short loc_8882E
jmp loc_888CD
loc_8882E:
lea rdi, [rsp+378h+var_350]
lea rsi, [rsp+378h+var_1C8]
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
jmp short $+2
loc_88847:
lea rdi, [rsp+378h+var_350]
lea rsi, [rsp+378h+var_1CC]
call __ZNSirsERi; std::istream::operator>>(int &)
jmp short $+2
loc_8885B:
mov rdi, [rsp+378h+var_360]
lea rsi, [rsp+378h+var_1CC]
call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&)
jmp short $+2
loc_8886F:
lea rdi, [rsp+378h+var_350]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
jmp loc_887E3
mov rcx, rax
mov eax, edx
mov [rsp+arg_1D0], rcx
mov [rsp+arg_1CC], eax
jmp loc_8892E
mov rcx, rax
mov eax, edx
mov [rsp+arg_1D0], rcx
mov [rsp+arg_1CC], eax
jmp short loc_888FB
mov rcx, rax
mov eax, edx
mov [rsp+arg_1D0], rcx
mov [rsp+arg_1CC], eax
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
jmp short loc_888FB
loc_888CD:
mov [rsp+378h+var_12], 1
lea rdi, [rsp+378h+var_1C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+378h+var_198]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
test [rsp+378h+var_12], 1
jnz short loc_88921
jmp short loc_88917
loc_888FB:
lea rdi, [rsp+arg_1A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+arg_1D8]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
jmp short loc_8892E
loc_88917:
mov rdi, [rsp+378h+var_360]
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
loc_88921:
mov rax, [rsp+378h+var_358]
add rsp, 378h
retn
loc_8892E:
mov rdi, [rsp+arg_10]
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
mov rdi, [rsp+arg_1D0]
call __Unwind_Resume
| long long * string_split<int>(long long *a1, long long a2, char a3)
{
_QWORD *v4; // [rsp+10h] [rbp-368h]
_BYTE v5[388]; // [rsp+28h] [rbp-350h] BYREF
_BYTE v6[4]; // [rsp+1ACh] [rbp-1CCh] BYREF
_BYTE v7[48]; // [rsp+1B0h] [rbp-1C8h] BYREF
_BYTE v8[390]; // [rsp+1E0h] [rbp-198h] BYREF
char v9; // [rsp+366h] [rbp-12h]
char v10; // [rsp+367h] [rbp-11h]
long long v11; // [rsp+368h] [rbp-10h]
long long *v12; // [rsp+370h] [rbp-8h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = 0;
std::vector<int>::vector((long long)a1);
std::istringstream::basic_istringstream(v8, a2, 8LL);
std::string::basic_string(v7);
while ( 1 )
{
v4 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v8, v7, (unsigned int)v10);
if ( (std::ios::operator bool((char *)v4 + *(_QWORD *)(*v4 - 24LL)) & 1) == 0 )
break;
std::istringstream::basic_istringstream(v5, v7, 8LL);
std::istream::operator>>(v5, v6);
std::vector<int>::push_back(a1, v6);
std::istringstream::~istringstream(v5);
}
v9 = 1;
std::string::~string(v7);
std::istringstream::~istringstream(v8);
if ( (v9 & 1) == 0 )
std::vector<int>::~vector(a1);
return a1;
}
| string_split<int>:
SUB RSP,0x378
MOV qword ptr [RSP + 0x18],RDI
MOV AL,DL
MOV RCX,RDI
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x370],RDI
MOV qword ptr [RSP + 0x368],RSI
MOV byte ptr [RSP + 0x367],AL
MOV byte ptr [RSP + 0x366],0x0
CALL 0x00163370
MOV RSI,qword ptr [RSP + 0x368]
LAB_001887c2:
LEA RDI,[RSP + 0x1e0]
MOV EDX,0x8
CALL 0x0015a830
JMP 0x001887d6
LAB_001887d6:
LEA RDI,[RSP + 0x1b0]
CALL 0x0015a610
LAB_001887e3:
MOVSX EDX,byte ptr [RSP + 0x367]
LAB_001887eb:
LEA RDI,[RSP + 0x1e0]
LEA RSI,[RSP + 0x1b0]
CALL 0x0015a040
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00188807
LAB_00188807:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
ADD RDI,RAX
CALL 0x0015a650
MOV byte ptr [RSP + 0xf],AL
JMP 0x00188821
LAB_00188821:
MOV AL,byte ptr [RSP + 0xf]
TEST AL,0x1
JNZ 0x0018882e
JMP 0x001888cd
LAB_0018882e:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x1b0]
MOV EDX,0x8
CALL 0x0015a830
JMP 0x00188847
LAB_00188847:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x1ac]
CALL 0x0015b4b0
JMP 0x0018885b
LAB_0018885b:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x1ac]
CALL 0x001e94d0
LAB_0018886d:
JMP 0x0018886f
LAB_0018886f:
LEA RDI,[RSP + 0x28]
CALL 0x0015a9f0
JMP 0x001887e3
LAB_001888cd:
MOV byte ptr [RSP + 0x366],0x1
LEA RDI,[RSP + 0x1b0]
CALL 0x0015b588
LEA RDI,[RSP + 0x1e0]
CALL 0x0015a9f0
TEST byte ptr [RSP + 0x366],0x1
JNZ 0x00188921
JMP 0x00188917
LAB_00188917:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00162300
LAB_00188921:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x378
RET
|
/* std::vector<int, std::allocator<int> > string_split<int>(std::__cxx11::string const&, char) */
string * string_split<int>(string *param_1,char param_2)
{
bool bVar1;
istream *piVar2;
char in_DL;
int7 in_register_00000031;
istringstream local_350 [388];
int local_1cc;
string local_1c8 [48];
istringstream local_198 [390];
byte local_12;
char local_11;
int8 local_10;
string *local_8;
local_10 = CONCAT71(in_register_00000031,param_2);
local_12 = 0;
local_11 = in_DL;
local_8 = param_1;
std::vector<int,std::allocator<int>>::vector((vector<int,std::allocator<int>> *)param_1);
/* try { // try from 001887c2 to 001887d3 has its CatchHandler @ 0018887e */
std::__cxx11::istringstream::istringstream(local_198,local_10,8);
std::__cxx11::string::string(local_1c8);
while( true ) {
/* try { // try from 001887eb to 00188844 has its CatchHandler @ 00188897 */
piVar2 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)local_198,local_1c8,local_11);
bVar1 = std::ios::operator_cast_to_bool((ios *)(piVar2 + *(long *)(*(long *)piVar2 + -0x18)));
if (!bVar1) break;
std::__cxx11::istringstream::istringstream(local_350,local_1c8,8);
/* try { // try from 00188847 to 0018886c has its CatchHandler @ 001888ad */
std::istream::operator>>((istream *)local_350,&local_1cc);
std::vector<int,std::allocator<int>>::push_back
((vector<int,std::allocator<int>> *)param_1,&local_1cc);
std::__cxx11::istringstream::~istringstream(local_350);
}
local_12 = 1;
std::__cxx11::string::~string(local_1c8);
std::__cxx11::istringstream::~istringstream(local_198);
if ((local_12 & 1) == 0) {
std::vector<int,std::allocator<int>>::~vector((vector<int,std::allocator<int>> *)param_1);
}
return param_1;
}
| |
33,802 | std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char) | monkey531[P]llama/common/common.h | static std::vector<T> string_split(const std::string & str, char delim) {
static_assert(!std::is_same<T, std::string>::value, "Please use the specialized version for std::string");
std::vector<T> values;
std::istringstream str_stream(str);
std::string token;
while (std::getline(str_stream, token, delim)) {
T value;
std::istringstream token_stream(token);
token_stream >> value;
values.push_back(value);
}
return values;
} | O2 | c | std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp # imm = 0x328
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x28(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x23f00
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rsp), %r15
pushq $0x2c
popq %rbp
leaq 0x1a8(%rsp), %r12
pushq $0x8
popq %r13
leaq 0x4(%rsp), %r14
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x24090
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x37ac8
movq %r12, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x23f00
movq %r12, %rdi
movq %r14, %rsi
callq 0x235b0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x52a44
movq %r12, %rdi
callq 0x23440
jmp 0x37a7d
leaq 0x8(%rsp), %rdi
callq 0x241f8
leaq 0x28(%rsp), %rdi
callq 0x23440
movq %rbx, %rax
addq $0x328, %rsp # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x37b21
jmp 0x37af8
movq %rax, %r14
jmp 0x37b0d
movq %rax, %r14
leaq 0x1a8(%rsp), %rdi
callq 0x23440
leaq 0x8(%rsp), %rdi
callq 0x241f8
leaq 0x28(%rsp), %rdi
callq 0x23440
movq %rbx, %rdi
callq 0x27e7a
movq %r14, %rdi
callq 0x23fc0
nop
| _ZL12string_splitIiESt6vectorIT_SaIS1_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 328h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
and qword ptr [rdi+10h], 0
lea rdi, [rsp+358h+var_330]
push 8
pop rdx
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea rax, [rsp+358h+var_340]
mov [rax-10h], rax
and qword ptr [rax-8], 0
mov byte ptr [rax], 0
lea r15, [rsp+358h+var_350]
push 2Ch ; ','
pop rbp
lea r12, [rsp+358h+var_1B0]
push 8
pop r13
lea r14, [rsp+358h+var_354]
loc_37A7D:
lea rdi, [rsp+358h+var_330]
mov rsi, r15
mov edx, ebp
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_37AC8
mov rdi, r12
mov rsi, r15
mov edx, r13d
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
mov rdi, r12
mov rsi, r14
call __ZNSirsERi; std::istream::operator>>(int &)
mov rdi, rbx
mov rsi, r14
call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&)
mov rdi, r12
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
jmp short loc_37A7D
loc_37AC8:
lea rdi, [rsp+358h+var_350]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+358h+var_330]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
mov rax, rbx
add rsp, 328h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
jmp short loc_37B21
jmp short $+2
loc_37AF8:
mov r14, rax
jmp short loc_37B0D
mov r14, rax
lea rdi, [rsp+arg_1A0]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
loc_37B0D:
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
loc_37B21:
mov rdi, rbx
call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base()
mov rdi, r14
call __Unwind_Resume
| long long string_split<int>(long long a1, long long a2)
{
_QWORD *v2; // rax
_BYTE v4[4]; // [rsp+4h] [rbp-354h] BYREF
_QWORD v5[2]; // [rsp+8h] [rbp-350h] BYREF
char v6; // [rsp+18h] [rbp-340h] BYREF
_BYTE v7[384]; // [rsp+28h] [rbp-330h] BYREF
_BYTE v8[432]; // [rsp+1A8h] [rbp-1B0h] BYREF
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
std::istringstream::basic_istringstream(v7, a2, 8LL);
v5[0] = &v6;
v5[1] = 0LL;
v6 = 0;
while ( 1 )
{
v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v7, v5, 44LL);
if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 )
break;
std::istringstream::basic_istringstream(v8, v5, 8LL);
std::istream::operator>>(v8, v4);
std::vector<int>::push_back(a1, v4);
std::istringstream::~istringstream(v8);
}
std::string::~string(v5);
std::istringstream::~istringstream(v7);
return a1;
}
| string_split<int>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x328
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
AND qword ptr [RDI + 0x10],0x0
LAB_00137a46:
LEA RDI,[RSP + 0x28]
PUSH 0x8
POP RDX
CALL 0x00123f00
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
AND qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
LEA R15,[RSP + 0x8]
PUSH 0x2c
POP RBP
LEA R12,[RSP + 0x1a8]
PUSH 0x8
POP R13
LEA R14,[RSP + 0x4]
LAB_00137a7d:
LEA RDI,[RSP + 0x28]
MOV RSI,R15
MOV EDX,EBP
CALL 0x00124090
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00137ac8
LAB_00137a9a:
MOV RDI,R12
MOV RSI,R15
MOV EDX,R13D
CALL 0x00123f00
LAB_00137aa8:
MOV RDI,R12
MOV RSI,R14
CALL 0x001235b0
MOV RDI,RBX
MOV RSI,R14
CALL 0x00152a44
LAB_00137abe:
MOV RDI,R12
CALL 0x00123440
JMP 0x00137a7d
LAB_00137ac8:
LEA RDI,[RSP + 0x8]
CALL 0x001241f8
LEA RDI,[RSP + 0x28]
CALL 0x00123440
MOV RAX,RBX
ADD RSP,0x328
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::vector<int, std::allocator<int> > string_split<int>(std::__cxx11::string const&, char) */
string * string_split<int>(string *param_1,char param_2)
{
istream *piVar1;
int7 in_register_00000031;
int local_354;
int1 *local_350;
int8 local_348;
int1 local_340 [16];
istringstream local_330 [384];
istream local_1b0 [384];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
/* try { // try from 00137a46 to 00137a52 has its CatchHandler @ 00137af1 */
std::__cxx11::istringstream::istringstream(local_330,CONCAT71(in_register_00000031,param_2),8);
local_350 = local_340;
local_348 = 0;
local_340[0] = 0;
while( true ) {
/* try { // try from 00137a7d to 00137a8b has its CatchHandler @ 00137af8 */
piVar1 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)local_330,(string *)&local_350,',');
if (((byte)piVar1[*(long *)(*(long *)piVar1 + -0x18) + 0x20] & 5) != 0) break;
/* try { // try from 00137a9a to 00137aa7 has its CatchHandler @ 00137af6 */
std::__cxx11::istringstream::istringstream((istringstream *)local_1b0,(string *)&local_350,8);
/* try { // try from 00137aa8 to 00137abd has its CatchHandler @ 00137afd */
std::istream::operator>>(local_1b0,&local_354);
std::vector<int,std::allocator<int>>::push_back
((vector<int,std::allocator<int>> *)param_1,&local_354);
std::__cxx11::istringstream::~istringstream((istringstream *)local_1b0);
}
std::__cxx11::string::~string((string *)&local_350);
std::__cxx11::istringstream::~istringstream(local_330);
return param_1;
}
| |
33,803 | testing::internal::PrettyUnitTestResultPrinter::OnTestPartResult(testing::TestPartResult const&) | seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc | void PrettyUnitTestResultPrinter::OnTestPartResult(
const TestPartResult& result) {
switch (result.type()) {
// If the test part succeeded, we don't need to do anything.
case TestPartResult::kSuccess:
return;
default:
// Print failure message from the assertion
// (e.g. expected this and got that).
PrintTestPartResult(result);
fflush(stdout);
}
} | O1 | cpp | testing::internal::PrettyUnitTestResultPrinter::OnTestPartResult(testing::TestPartResult const&):
cmpl $0x0, (%rsi)
je 0x26dc8
pushq %rax
movq %rsi, %rdi
callq 0x26dc9
movq 0x331c1(%rip), %rax # 0x59f80
movq (%rax), %rdi
popq %rax
jmp 0x95f0
retq
| _ZN7testing8internal27PrettyUnitTestResultPrinter16OnTestPartResultERKNS_14TestPartResultE:
cmp dword ptr [rsi], 0
jz short locret_26DC8
push rax
mov rdi, rsi; this
call _ZN7testing8internalL19PrintTestPartResultERKNS_14TestPartResultE; testing::internal::PrintTestPartResult(testing::TestPartResult const&)
mov rax, cs:stdout_ptr
mov rdi, [rax]
pop rax
jmp _fflush
locret_26DC8:
retn
| long long testing::internal::PrettyUnitTestResultPrinter::OnTestPartResult(
testing::internal::PrettyUnitTestResultPrinter *this,
const testing::TestPartResult *a2)
{
long long result; // rax
if ( *(_DWORD *)a2 )
{
testing::internal::PrintTestPartResult(a2, a2);
return fflush(stdout);
}
return result;
}
| OnTestPartResult:
CMP dword ptr [RSI],0x0
JZ 0x00126dc8
PUSH RAX
MOV RDI,RSI
CALL 0x00126dc9
MOV RAX,qword ptr [0x00159f80]
MOV RDI,qword ptr [RAX]
POP RAX
JMP 0x001095f0
LAB_00126dc8:
RET
|
/* testing::internal::PrettyUnitTestResultPrinter::OnTestPartResult(testing::TestPartResult const&)
*/
void __thiscall
testing::internal::PrettyUnitTestResultPrinter::OnTestPartResult
(PrettyUnitTestResultPrinter *this,TestPartResult *param_1)
{
if (*(int *)param_1 != 0) {
PrintTestPartResult(param_1);
fflush(*(FILE **)PTR_stdout_00159f80);
return;
}
return;
}
| |
33,804 | CLI::Option::type_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/Option.hpp | Option *type_name(std::string typeval) {
type_name_fn([typeval]() { return typeval; });
return this;
} | O3 | cpp | CLI::Option::type_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x177be
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x2e19a
leaq 0x128(%rbx), %rdi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x2e1f8
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x2e0d0
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2e0e6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0xc95c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2e114
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rdi
callq 0x7780
| _ZN3CLI6Option9type_nameENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
sub rsp, 40h
mov rbx, rdi
lea r15, [rsp+58h+var_48]
mov [r15-10h], r15
mov rax, [rsi]
mov rdx, [rsi+8]
add rdx, rax
mov r14, rsp
mov rdi, r14
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rsp+58h+var_38]
mov rsi, r14
call _ZNSt8functionIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvEEC2IZN3CLI6Option9type_nameES5_EUlvE_vEEOT_; std::function<std::string ()(void)>::function<CLI::Option::type_name(std::string)::{lambda(void)#1},void>(CLI::Option::type_name(std::string)::{lambda(void)#1} &&)
lea rdi, [rbx+128h]
lea r14, [rsp+58h+var_38]
mov rsi, r14
call _ZNSt8functionIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvEEaSEOS7_; std::function<std::string ()(void)>::operator=(std::function<std::string ()(void)>&&)
mov rax, [r14+10h]
test rax, rax
jz short loc_2E0D0
lea rdi, [rsp+58h+var_38]
mov rsi, rdi
mov edx, 3
call rax
loc_2E0D0:
mov rdi, [rsp+58h+var_58]; void *
cmp rdi, r15
jz short loc_2E0E6
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2E0E6:
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop r15
retn
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, [rsp+58h+var_58]; void *
cmp rdi, r15
jz short loc_2E114
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2E114:
mov rdi, rbx
call __Unwind_Resume
| long long CLI::Option::type_name(long long a1, long long a2)
{
void *v3[2]; // [rsp+0h] [rbp-58h] BYREF
_QWORD v4[2]; // [rsp+10h] [rbp-48h] BYREF
_BYTE v5[16]; // [rsp+20h] [rbp-38h] BYREF
void ( *v6)(_BYTE *, _BYTE *, long long); // [rsp+30h] [rbp-28h]
v3[0] = v4;
std::string::_M_construct<char *>((long long)v3, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
std::function<std::string ()(void)>::function<CLI::Option::type_name(std::string)::{lambda(void)#1},void>(v5, v3);
std::function<std::string ()(void)>::operator=(a1 + 296, v5);
if ( v6 )
v6(v5, v5, 3LL);
if ( v3[0] != v4 )
operator delete(v3[0], v4[0] + 1LL);
return a1;
}
| type_name:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
MOV RAX,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
ADD RDX,RAX
MOV R14,RSP
MOV RDI,R14
MOV RSI,RAX
CALL 0x001177be
LAB_0012e097:
LEA RDI,[RSP + 0x20]
MOV RSI,R14
CALL 0x0012e19a
LEA RDI,[RBX + 0x128]
LEA R14,[RSP + 0x20]
MOV RSI,R14
CALL 0x0012e1f8
MOV RAX,qword ptr [R14 + 0x10]
TEST RAX,RAX
JZ 0x0012e0d0
LAB_0012e0c1:
LEA RDI,[RSP + 0x20]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0012e0d0:
MOV RDI,qword ptr [RSP]
CMP RDI,R15
JZ 0x0012e0e6
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00107430
LAB_0012e0e6:
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
|
/* CLI::Option::type_name(std::__cxx11::string) */
Option * __thiscall CLI::Option::type_name(Option *this,long *param_2)
{
long *local_58 [2];
long local_48 [2];
_lambda___1_ local_38 [16];
code *local_28;
local_58[0] = local_48;
std::__cxx11::string::_M_construct<char*>(local_58,*param_2,param_2[1] + *param_2);
/* try { // try from 0012e097 to 0012e0a3 has its CatchHandler @ 0012e0fb */
std::function<std::__cxx11::string()>::
function<CLI::Option::type_name(std::__cxx11::string)::_lambda()_1_,void>(local_38);
std::function<std::__cxx11::string()>::operator=
((function<std::__cxx11::string()> *)(this + 0x128),(function *)local_38);
if (local_28 != (code *)0x0) {
/* try { // try from 0012e0c1 to 0012e0cf has its CatchHandler @ 0012e0f3 */
(*local_28)(local_38,local_38,3);
}
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
return this;
}
| |
33,805 | spdlog::details::source_linenum_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h | void format(const details::log_msg &msg, const std::tm &, memory_buf_t &dest) override {
if (msg.source.empty()) {
ScopedPadder p(0, padinfo_, dest);
return;
}
auto field_size = ScopedPadder::count_digits(msg.source.line);
ScopedPadder p(field_size, padinfo_, dest);
fmt_helper::append_int(msg.source.line, dest);
} | O0 | c | spdlog::details::source_linenum_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&):
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x88(%rsp), %rdi
addq $0x38, %rdi
callq 0x8f690
testb $0x1, %al
jne 0xa1ce8
jmp 0xa1d10
movq 0x8(%rsp), %rdx
addq $0x8, %rdx
movq 0x78(%rsp), %rcx
leaq 0x50(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x95af0
leaq 0x50(%rsp), %rdi
callq 0x95be0
jmp 0xa1d63
movq 0x88(%rsp), %rax
movl 0x40(%rax), %edi
callq 0xa0bb0
movq 0x8(%rsp), %rdx
movl %eax, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, %esi
addq $0x8, %rdx
movq 0x78(%rsp), %rcx
leaq 0x20(%rsp), %rdi
callq 0x95af0
movq 0x88(%rsp), %rax
movl 0x40(%rax), %edi
movq 0x78(%rsp), %rsi
callq 0x8f320
jmp 0xa1d59
leaq 0x20(%rsp), %rdi
callq 0x95be0
addq $0x98, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x95be0
movq 0x18(%rsp), %rdi
callq 0x15dd0
nopl (%rax)
| _ZN6spdlog7details24source_linenum_formatterINS0_13scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE:
sub rsp, 98h
mov [rsp+98h+var_8], rdi
mov [rsp+98h+var_10], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_20], rcx
mov rax, [rsp+98h+var_8]
mov [rsp+98h+var_90], rax
mov rdi, [rsp+98h+var_10]
add rdi, 38h ; '8'; this
call _ZNK6spdlog10source_loc5emptyEv; spdlog::source_loc::empty(void)
test al, 1
jnz short loc_A1CE8
jmp short loc_A1D10
loc_A1CE8:
mov rdx, [rsp+98h+var_90]
add rdx, 8
mov rcx, [rsp+98h+var_20]
lea rdi, [rsp+98h+var_48]
xor eax, eax
mov esi, eax
call _ZN6spdlog7details13scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::scoped_padder::scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
lea rdi, [rsp+98h+var_48]; this
call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder()
jmp short loc_A1D63
loc_A1D10:
mov rax, [rsp+98h+var_10]
mov edi, [rax+40h]
call _ZN6spdlog7details13scoped_padder12count_digitsIiEEjT_; spdlog::details::scoped_padder::count_digits<int>(int)
mov rdx, [rsp+98h+var_90]
mov [rsp+98h+var_4C], eax
mov eax, [rsp+98h+var_4C]
mov esi, eax
add rdx, 8
mov rcx, [rsp+98h+var_20]
lea rdi, [rsp+98h+var_78]
call _ZN6spdlog7details13scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::scoped_padder::scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
mov rax, [rsp+98h+var_10]
mov edi, [rax+40h]
mov rsi, [rsp+98h+var_20]
call _ZN6spdlog7details10fmt_helper10append_intIiEEvT_RN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_int<int>(int,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
jmp short $+2
loc_A1D59:
lea rdi, [rsp+98h+var_78]; this
call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder()
loc_A1D63:
add rsp, 98h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
lea rdi, [rsp+arg_18]; this
call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder()
mov rdi, [rsp+arg_10]
call __Unwind_Resume
| void spdlog::details::source_linenum_formatter<spdlog::details::scoped_padder>::format(
long long a1,
long long a2,
long long a3,
_QWORD *a4)
{
_BYTE v4[44]; // [rsp+20h] [rbp-78h] BYREF
unsigned int v5; // [rsp+4Ch] [rbp-4Ch]
_BYTE v6[40]; // [rsp+50h] [rbp-48h] BYREF
_QWORD *v7; // [rsp+78h] [rbp-20h]
long long v8; // [rsp+80h] [rbp-18h]
long long v9; // [rsp+88h] [rbp-10h]
long long v10; // [rsp+90h] [rbp-8h]
v10 = a1;
v9 = a2;
v8 = a3;
v7 = a4;
if ( spdlog::source_loc::empty((spdlog::source_loc *)(a2 + 56)) )
{
spdlog::details::scoped_padder::scoped_padder(
(spdlog::details::scoped_padder *)v6,
0LL,
(_QWORD *)(a1 + 8),
(long long)v7);
spdlog::details::scoped_padder::~scoped_padder((spdlog::details::scoped_padder *)v6);
}
else
{
v5 = spdlog::details::scoped_padder::count_digits<int>(*(_DWORD *)(v9 + 64));
spdlog::details::scoped_padder::scoped_padder(
(spdlog::details::scoped_padder *)v4,
v5,
(_QWORD *)(a1 + 8),
(long long)v7);
spdlog::details::fmt_helper::append_int<int>(*(_DWORD *)(v9 + 64), v7);
spdlog::details::scoped_padder::~scoped_padder((spdlog::details::scoped_padder *)v4);
}
}
| format:
SUB RSP,0x98
MOV qword ptr [RSP + 0x90],RDI
MOV qword ptr [RSP + 0x88],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x78],RCX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x88]
ADD RDI,0x38
CALL 0x0018f690
TEST AL,0x1
JNZ 0x001a1ce8
JMP 0x001a1d10
LAB_001a1ce8:
MOV RDX,qword ptr [RSP + 0x8]
ADD RDX,0x8
MOV RCX,qword ptr [RSP + 0x78]
LEA RDI,[RSP + 0x50]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00195af0
LEA RDI,[RSP + 0x50]
CALL 0x00195be0
JMP 0x001a1d63
LAB_001a1d10:
MOV RAX,qword ptr [RSP + 0x88]
MOV EDI,dword ptr [RAX + 0x40]
CALL 0x001a0bb0
MOV RDX,qword ptr [RSP + 0x8]
MOV dword ptr [RSP + 0x4c],EAX
MOV EAX,dword ptr [RSP + 0x4c]
MOV ESI,EAX
ADD RDX,0x8
MOV RCX,qword ptr [RSP + 0x78]
LEA RDI,[RSP + 0x20]
CALL 0x00195af0
MOV RAX,qword ptr [RSP + 0x88]
MOV EDI,dword ptr [RAX + 0x40]
MOV RSI,qword ptr [RSP + 0x78]
LAB_001a1d52:
CALL 0x0018f320
LAB_001a1d57:
JMP 0x001a1d59
LAB_001a1d59:
LEA RDI,[RSP + 0x20]
CALL 0x00195be0
LAB_001a1d63:
ADD RSP,0x98
RET
|
/* spdlog::details::source_linenum_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg
const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */
void __thiscall
spdlog::details::source_linenum_formatter<spdlog::details::scoped_padder>::format
(source_linenum_formatter<spdlog::details::scoped_padder> *this,log_msg *param_1,
tm *param_2,basic_memory_buffer *param_3)
{
ulong uVar1;
scoped_padder local_78 [44];
uint local_4c;
scoped_padder local_48 [40];
basic_memory_buffer *local_20;
tm *local_18;
log_msg *local_10;
source_linenum_formatter<spdlog::details::scoped_padder> *local_8;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
uVar1 = source_loc::empty((source_loc *)(param_1 + 0x38));
if ((uVar1 & 1) == 0) {
local_4c = scoped_padder::count_digits<int>(*(int *)(local_10 + 0x40));
scoped_padder::scoped_padder(local_78,(ulong)local_4c,(padding_info *)(this + 8),local_20);
/* try { // try from 001a1d52 to 001a1d56 has its CatchHandler @ 001a1d6b */
fmt_helper::append_int<int>(*(int *)(local_10 + 0x40),local_20);
scoped_padder::~scoped_padder(local_78);
}
else {
scoped_padder::scoped_padder(local_48,0,(padding_info *)(this + 8),local_20);
scoped_padder::~scoped_padder(local_48);
}
return;
}
| |
33,806 | my_init_mysys_psi_keys | eloqsql/mysys/my_init.c | void my_init_mysys_psi_keys()
{
const char* category= "mysys";
int count;
count= sizeof(all_mysys_mutexes)/sizeof(all_mysys_mutexes[0]);
mysql_mutex_register(category, all_mysys_mutexes, count);
count= sizeof(all_mysys_conds)/sizeof(all_mysys_conds[0]);
mysql_cond_register(category, all_mysys_conds, count);
count= sizeof(all_mysys_rwlocks)/sizeof(all_mysys_rwlocks[0]);
mysql_rwlock_register(category, all_mysys_rwlocks, count);
count= sizeof(all_mysys_threads)/sizeof(all_mysys_threads[0]);
mysql_thread_register(category, all_mysys_threads, count);
count= sizeof(all_mysys_files)/sizeof(all_mysys_files[0]);
mysql_file_register(category, all_mysys_files, count);
count= array_elements(all_mysys_stages);
mysql_stage_register(category, all_mysys_stages, count);
} | O0 | c | my_init_mysys_psi_keys:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x6125f(%rip), %rax # 0x15592e
movq %rax, -0x8(%rbp)
movl $0x13, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cd338(%rip), %rsi # 0x2c1a20
callq 0xf4780
movl $0x7, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cd4ee(%rip), %rsi # 0x2c1bf0
callq 0xf47c0
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cd584(%rip), %rsi # 0x2c1ca0
callq 0xf4800
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cd58a(%rip), %rsi # 0x2c1cc0
callq 0xf4840
movl $0x2, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cd590(%rip), %rsi # 0x2c1ce0
callq 0xf4880
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cd2a6(%rip), %rsi # 0x2c1a10
callq 0xf48c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_init_mysys_psi_keys:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, aMysys; "mysys"
mov [rbp+var_8], rax
mov [rbp+var_C], 13h
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_mutexes
call inline_mysql_mutex_register_0
mov [rbp+var_C], 7
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_conds
call inline_mysql_cond_register_0
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_rwlocks
call inline_mysql_rwlock_register_0
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_threads
call inline_mysql_thread_register_0
mov [rbp+var_C], 2
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_files
call inline_mysql_file_register_0
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_stages
call inline_mysql_stage_register
add rsp, 10h
pop rbp
retn
| long long my_init_mysys_psi_keys()
{
inline_mysql_mutex_register_0("mysys", &all_mysys_mutexes, 19LL);
inline_mysql_cond_register_0("mysys", &all_mysys_conds, 7LL);
inline_mysql_rwlock_register_0("mysys", &all_mysys_rwlocks, 1LL);
inline_mysql_thread_register_0("mysys", &all_mysys_threads, 1LL);
inline_mysql_file_register_0("mysys", &all_mysys_files, 2LL);
return inline_mysql_stage_register("mysys", &all_mysys_stages, 1LL);
}
| my_init_mysys_psi_keys:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[0x25592e]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0xc],0x13
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3c1a20]
CALL 0x001f4780
MOV dword ptr [RBP + -0xc],0x7
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3c1bf0]
CALL 0x001f47c0
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3c1ca0]
CALL 0x001f4800
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3c1cc0]
CALL 0x001f4840
MOV dword ptr [RBP + -0xc],0x2
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3c1ce0]
CALL 0x001f4880
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3c1a10]
CALL 0x001f48c0
ADD RSP,0x10
POP RBP
RET
|
void my_init_mysys_psi_keys(void)
{
inline_mysql_mutex_register("mysys",all_mysys_mutexes,0x13);
inline_mysql_cond_register("mysys",all_mysys_conds,7);
inline_mysql_rwlock_register("mysys",all_mysys_rwlocks,1);
inline_mysql_thread_register("mysys",all_mysys_threads,1);
inline_mysql_file_register("mysys",all_mysys_files,2);
inline_mysql_stage_register("mysys",&all_mysys_stages,1);
return;
}
| |
33,807 | evmone::advanced::(anonymous namespace)::op_jumpi(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&) | corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/advanced_instructions.cpp | const Instruction* op_jumpi(const Instruction* instr, AdvancedExecutionState& state) noexcept
{
if (state.stack[1] != 0)
{
instr = op_jump(instr, state); // target
(void)state.stack.pop(); // condition
}
else
{
(void)state.stack.pop(); // target
(void)state.stack.pop(); // condition
instr = opx_beginblock(instr, state); // follow-by block
}
return instr;
} | O3 | cpp | evmone::advanced::(anonymous namespace)::op_jumpi(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&):
pushq %rbx
movq %rsi, %rbx
movq 0x228(%rsi), %rax
movdqu -0x20(%rax), %xmm0
movdqu -0x10(%rax), %xmm1
por %xmm0, %xmm1
ptest %xmm1, %xmm1
je 0x4d449
movq %rbx, %rsi
callq 0x4d35d
addq $-0x20, 0x228(%rbx)
popq %rbx
retq
addq $-0x40, %rax
movq %rax, 0x228(%rbx)
movq %rbx, %rsi
popq %rbx
jmp 0x4d4f1
| _ZN6evmone8advanced12_GLOBAL__N_18op_jumpiEPKNS0_11InstructionERNS0_22AdvancedExecutionStateE:
push rbx
mov rbx, rsi
mov rax, [rsi+228h]
movdqu xmm0, xmmword ptr [rax-20h]
movdqu xmm1, xmmword ptr [rax-10h]
por xmm1, xmm0
ptest xmm1, xmm1
jz short loc_4D449
mov rsi, rbx
call _ZN6evmone8advanced12_GLOBAL__N_17op_jumpEPKNS0_11InstructionERNS0_22AdvancedExecutionStateE; evmone::advanced::`anonymous namespace'::op_jump(evmone::advanced::Instruction const*,evmone::advanced::AdvancedExecutionState &)
add qword ptr [rbx+228h], 0FFFFFFFFFFFFFFE0h
pop rbx
retn
loc_4D449:
add rax, 0FFFFFFFFFFFFFFC0h
mov [rbx+228h], rax
mov rsi, rbx
pop rbx
jmp _ZN6evmone8advanced12_GLOBAL__N_114opx_beginblockEPKNS0_11InstructionERNS0_22AdvancedExecutionStateE; evmone::advanced::`anonymous namespace'::opx_beginblock(evmone::advanced::Instruction const*,evmone::advanced::AdvancedExecutionState &)
| long long evmone::advanced::`anonymous namespace'::op_jumpi(long long a1, long long a2)
{
long long v2; // rax
__m128i v3; // xmm1
long long result; // rax
v2 = *(_QWORD *)(a2 + 552);
v3 = _mm_or_si128(_mm_loadu_si128((const __m128i *)(v2 - 16)), _mm_loadu_si128((const __m128i *)(v2 - 32)));
if ( _mm_testz_si128(v3, v3) )
{
*(_QWORD *)(a2 + 552) = v2 - 64;
return evmone::advanced::`anonymous namespace'::opx_beginblock(a1, a2);
}
else
{
result = evmone::advanced::`anonymous namespace'::op_jump(a1, a2);
*(_QWORD *)(a2 + 552) -= 32LL;
}
return result;
}
| op_jumpi:
PUSH RBX
MOV RBX,RSI
MOV RAX,qword ptr [RSI + 0x228]
MOVDQU XMM0,xmmword ptr [RAX + -0x20]
MOVDQU XMM1,xmmword ptr [RAX + -0x10]
POR XMM1,XMM0
PTEST XMM1,XMM1
JZ 0x0014d449
MOV RSI,RBX
CALL 0x0014d35d
ADD qword ptr [RBX + 0x228],-0x20
POP RBX
RET
LAB_0014d449:
ADD RAX,-0x40
MOV qword ptr [RBX + 0x228],RAX
MOV RSI,RBX
POP RBX
JMP 0x0014d4f1
|
/* evmone::advanced::(anonymous namespace)::op_jumpi(evmone::advanced::Instruction const*,
evmone::advanced::AdvancedExecutionState&) */
void evmone::advanced::(anonymous_namespace)::op_jumpi
(Instruction *param_1,AdvancedExecutionState *param_2)
{
long lVar1;
lVar1 = *(long *)(param_2 + 0x228);
if (*(int1 (*) [16])(lVar1 + -0x10) != (int1 [16])0x0 ||
*(int1 (*) [16])(lVar1 + -0x20) != (int1 [16])0x0) {
op_jump(param_1,param_2);
*(long *)(param_2 + 0x228) = *(long *)(param_2 + 0x228) + -0x20;
return;
}
*(long *)(param_2 + 0x228) = lVar1 + -0x40;
opx_beginblock(param_1,param_2);
return;
}
| |
33,808 | TextReplace | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c | char *TextReplace(const char *text, const char *replace, const char *by)
{
// Sanity checks and initialization
if (!text || !replace || !by) return NULL;
char *result = NULL;
char *insertPoint = NULL; // Next insert point
char *temp = NULL; // Temp pointer
int replaceLen = 0; // Replace string length of (the string to remove)
int byLen = 0; // Replacement length (the string to replace by)
int lastReplacePos = 0; // Distance between replace and end of last replace
int count = 0; // Number of replacements
replaceLen = TextLength(replace);
if (replaceLen == 0) return NULL; // Empty replace causes infinite loop during count
byLen = TextLength(by);
// Count the number of replacements needed
insertPoint = (char *)text;
for (count = 0; (temp = strstr(insertPoint, replace)); count++) insertPoint = temp + replaceLen;
// Allocate returning string and point temp to it
temp = result = (char *)RL_MALLOC(TextLength(text) + (byLen - replaceLen)*count + 1);
if (!result) return NULL; // Memory could not be allocated
// First time through the loop, all the variable are set correctly from here on,
// - 'temp' points to the end of the result string
// - 'insertPoint' points to the next occurrence of replace in text
// - 'text' points to the remainder of text after "end of replace"
while (count--)
{
insertPoint = strstr(text, replace);
lastReplacePos = (int)(insertPoint - text);
temp = strncpy(temp, text, lastReplacePos) + lastReplacePos;
temp = strcpy(temp, by) + byLen;
text += lastReplacePos + replaceLen; // Move to next "end of replace"
}
// Copy remaind text part after replacement to result (pointed by moving temp)
strcpy(temp, text);
return result;
} | O0 | c | TextReplace:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xe6f59
cmpq $0x0, -0x18(%rbp)
je 0xe6f59
cmpq $0x0, -0x20(%rbp)
jne 0xe6f66
movq $0x0, -0x8(%rbp)
jmp 0xe70d2
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0xe5fe0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jne 0xe6fb9
movq $0x0, -0x8(%rbp)
jmp 0xe70d2
movq -0x20(%rbp), %rdi
callq 0xe5fe0
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x48(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa140
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0xe7005
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xe6fd4
movq -0x10(%rbp), %rdi
callq 0xe5fe0
movl -0x40(%rbp), %ecx
subl -0x3c(%rbp), %ecx
imull -0x48(%rbp), %ecx
addl %ecx, %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edi
callq 0xa6e0
movq %rax, -0x28(%rbp)
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xe7042
movq $0x0, -0x8(%rbp)
jmp 0xe70d2
jmp 0xe7044
movl -0x48(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x48(%rbp)
cmpl $0x0, %eax
je 0xe70bd
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa140
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x44(%rbp), %rdx
callq 0xa290
movslq -0x44(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xa4a0
movslq -0x40(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl -0x44(%rbp), %ecx
addl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0xe7044
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xa4a0
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| TextReplace:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_10], 0
jz short loc_E6F59
cmp [rbp+var_18], 0
jz short loc_E6F59
cmp [rbp+var_20], 0
jnz short loc_E6F66
loc_E6F59:
mov [rbp+var_8], 0
jmp loc_E70D2
loc_E6F66:
mov [rbp+var_28], 0
mov [rbp+var_30], 0
mov [rbp+var_38], 0
mov [rbp+var_3C], 0
mov [rbp+var_40], 0
mov [rbp+var_44], 0
mov [rbp+var_48], 0
mov rdi, [rbp+var_18]
call TextLength
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jnz short loc_E6FB9
mov [rbp+var_8], 0
jmp loc_E70D2
loc_E6FB9:
mov rdi, [rbp+var_20]
call TextLength
mov [rbp+var_40], eax
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov [rbp+var_48], 0
loc_E6FD4:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_18]
call _strstr
mov [rbp+var_38], rax
cmp rax, 0
jz short loc_E7005
mov rax, [rbp+var_38]
movsxd rcx, [rbp+var_3C]
add rax, rcx
mov [rbp+var_30], rax
mov eax, [rbp+var_48]
add eax, 1
mov [rbp+var_48], eax
jmp short loc_E6FD4
loc_E7005:
mov rdi, [rbp+var_10]
call TextLength
mov ecx, [rbp+var_40]
sub ecx, [rbp+var_3C]
imul ecx, [rbp+var_48]
add eax, ecx
add eax, 1
mov eax, eax
mov edi, eax
call _malloc
mov [rbp+var_28], rax
mov [rbp+var_38], rax
cmp [rbp+var_28], 0
jnz short loc_E7042
mov [rbp+var_8], 0
jmp loc_E70D2
loc_E7042:
jmp short $+2
loc_E7044:
mov eax, [rbp+var_48]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_48], ecx
cmp eax, 0
jz short loc_E70BD
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _strstr
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
sub rax, rcx
mov [rbp+var_44], eax
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_10]
movsxd rdx, [rbp+var_44]
call _strncpy
movsxd rcx, [rbp+var_44]
add rax, rcx
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_20]
call _strcpy
movsxd rcx, [rbp+var_40]
add rax, rcx
mov [rbp+var_38], rax
mov ecx, [rbp+var_44]
add ecx, [rbp+var_3C]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp short loc_E7044
loc_E70BD:
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_10]
call _strcpy
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_E70D2:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long TextReplace(_BYTE *a1, _BYTE *a2, _BYTE *a3)
{
long long v3; // rdx
long long i; // rax
long long v5; // rdx
int v6; // eax
long long v7; // rdx
long long v9; // rax
int v11; // [rsp+8h] [rbp-48h]
int v12; // [rsp+10h] [rbp-40h]
_BYTE v13[12]; // [rsp+14h] [rbp-3Ch]
int v14; // [rsp+20h] [rbp-30h]
long long v15; // [rsp+28h] [rbp-28h]
_BYTE *v17; // [rsp+40h] [rbp-10h]
v17 = a1;
if ( !a1 || !a2 || !a3 )
return 0LL;
*(_QWORD *)v13 = (unsigned int)TextLength(a2);
if ( !*(_DWORD *)v13 )
return 0LL;
v12 = TextLength(a3);
v11 = 0;
for ( i = strstr(a1, a2, v3); i; i = strstr(*(int *)v13 + i, a2, v5) )
++v11;
v6 = TextLength(a1);
v15 = malloc((unsigned int)(v11 * (v12 - *(_DWORD *)v13) + v6 + 1));
*(_QWORD *)&v13[4] = v15;
if ( !v15 )
return 0LL;
while ( v11-- )
{
v14 = strstr(v17, a2, v7);
v9 = strncpy(*(_QWORD *)&v13[4], v17, v14 - (int)v17);
*(_QWORD *)&v13[4] = v12 + strcpy(v14 - (int)v17 + v9, a3);
v17 += *(_DWORD *)v13 + v14 - (int)v17;
}
strcpy(*(_QWORD *)&v13[4], v17);
return v15;
}
| TextReplace:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001e6f59
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001e6f59
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001e6f66
LAB_001e6f59:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001e70d2
LAB_001e6f66:
MOV qword ptr [RBP + -0x28],0x0
MOV qword ptr [RBP + -0x30],0x0
MOV qword ptr [RBP + -0x38],0x0
MOV dword ptr [RBP + -0x3c],0x0
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x44],0x0
MOV dword ptr [RBP + -0x48],0x0
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001e5fe0
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JNZ 0x001e6fb9
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001e70d2
LAB_001e6fb9:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001e5fe0
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV dword ptr [RBP + -0x48],0x0
LAB_001e6fd4:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0010a140
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x001e7005
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,dword ptr [RBP + -0x3c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV EAX,dword ptr [RBP + -0x48]
ADD EAX,0x1
MOV dword ptr [RBP + -0x48],EAX
JMP 0x001e6fd4
LAB_001e7005:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001e5fe0
MOV ECX,dword ptr [RBP + -0x40]
SUB ECX,dword ptr [RBP + -0x3c]
IMUL ECX,dword ptr [RBP + -0x48]
ADD EAX,ECX
ADD EAX,0x1
MOV EAX,EAX
MOV EDI,EAX
CALL 0x0010a6e0
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001e7042
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001e70d2
LAB_001e7042:
JMP 0x001e7044
LAB_001e7044:
MOV EAX,dword ptr [RBP + -0x48]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x48],ECX
CMP EAX,0x0
JZ 0x001e70bd
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0010a140
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
MOV dword ptr [RBP + -0x44],EAX
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x44]
CALL 0x0010a290
MOVSXD RCX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0010a4a0
MOVSXD RCX,dword ptr [RBP + -0x40]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV ECX,dword ptr [RBP + -0x44]
ADD ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001e7044
LAB_001e70bd:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0010a4a0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_001e70d2:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
char * TextReplace(char *param_1,char *param_2,char *param_3)
{
int iVar1;
int iVar2;
int iVar3;
char *pcVar4;
int local_50;
char *local_40;
char *local_38;
char *local_18;
char *local_10;
if (((param_1 == (char *)0x0) || (param_2 == (char *)0x0)) || (param_3 == (char *)0x0)) {
local_10 = (char *)0x0;
}
else {
iVar1 = TextLength(param_2);
if (iVar1 == 0) {
local_10 = (char *)0x0;
}
else {
iVar2 = TextLength(param_3);
local_50 = 0;
local_38 = param_1;
while (local_38 = strstr(local_38,param_2), local_38 != (char *)0x0) {
local_38 = local_38 + iVar1;
local_50 = local_50 + 1;
}
iVar3 = TextLength(param_1);
local_10 = (char *)malloc((ulong)(iVar3 + (iVar2 - iVar1) * local_50 + 1));
local_40 = local_10;
local_18 = param_1;
if (local_10 == (char *)0x0) {
local_10 = (char *)0x0;
}
else {
while (local_50 != 0) {
pcVar4 = strstr(local_18,param_2);
iVar3 = (int)pcVar4 - (int)local_18;
pcVar4 = strncpy(local_40,local_18,(long)iVar3);
pcVar4 = strcpy(pcVar4 + iVar3,param_3);
local_18 = local_18 + (iVar3 + iVar1);
local_50 = local_50 + -1;
local_40 = pcVar4 + iVar2;
}
strcpy(local_40,local_18);
}
}
}
return local_10;
}
| |
33,809 | TextReplace | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c | char *TextReplace(const char *text, const char *replace, const char *by)
{
// Sanity checks and initialization
if (!text || !replace || !by) return NULL;
char *result = NULL;
char *insertPoint = NULL; // Next insert point
char *temp = NULL; // Temp pointer
int replaceLen = 0; // Replace string length of (the string to remove)
int byLen = 0; // Replacement length (the string to replace by)
int lastReplacePos = 0; // Distance between replace and end of last replace
int count = 0; // Number of replacements
replaceLen = TextLength(replace);
if (replaceLen == 0) return NULL; // Empty replace causes infinite loop during count
byLen = TextLength(by);
// Count the number of replacements needed
insertPoint = (char *)text;
for (count = 0; (temp = strstr(insertPoint, replace)); count++) insertPoint = temp + replaceLen;
// Allocate returning string and point temp to it
temp = result = (char *)RL_MALLOC(TextLength(text) + (byLen - replaceLen)*count + 1);
if (!result) return NULL; // Memory could not be allocated
// First time through the loop, all the variable are set correctly from here on,
// - 'temp' points to the end of the result string
// - 'insertPoint' points to the next occurrence of replace in text
// - 'text' points to the remainder of text after "end of replace"
while (count--)
{
insertPoint = strstr(text, replace);
lastReplacePos = (int)(insertPoint - text);
temp = strncpy(temp, text, lastReplacePos) + lastReplacePos;
temp = strcpy(temp, by) + byLen;
text += lastReplacePos + replaceLen; // Move to next "end of replace"
}
// Copy remaind text part after replacement to result (pointed by moving temp)
strcpy(temp, text);
return result;
} | O2 | c | TextReplace:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movq %rdx, 0x10(%rsp)
testq %rdx, %rdx
sete %al
orb %cl, %al
jne 0x7264b
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x71c85
xorl %r14d, %r14d
testl %eax, %eax
je 0x7264b
movl %eax, %r12d
movq 0x10(%rsp), %rdi
callq 0x71c85
movl %eax, %r13d
movslq %r12d, %rbp
movl %eax, (%rsp)
movl %r12d, 0xc(%rsp)
subl %r12d, %r13d
pushq $0x1
popq %r12
movq %rbx, %rax
movq %rax, %rdi
movq %r15, %rsi
callq 0x9120
testq %rax, %rax
je 0x725e1
addq %rbp, %rax
decl %r14d
addl %r13d, %r12d
jmp 0x725c6
movq %rbx, %rdi
callq 0x71c85
addl %eax, %r12d
movq %r12, %rdi
callq 0x96e0
testq %rax, %rax
je 0x7264b
movslq (%rsp), %rbp
movq %rax, (%rsp)
movq %rax, %r13
testl %r14d, %r14d
je 0x7265c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9120
subq %rbx, %rax
movslq %eax, %r12
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x9280
addq %r12, %r13
movq %r13, %rdi
movq 0x10(%rsp), %rsi
callq 0x94a0
addq %rbp, %r13
addl 0xc(%rsp), %r12d
movslq %r12d, %rax
addq %rax, %rbx
incl %r14d
jmp 0x72604
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
movq %rbx, %rsi
callq 0x94a0
movq (%rsp), %rax
jmp 0x7264d
| TextReplace:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
test rdi, rdi
setz al
test rsi, rsi
setz cl
or cl, al
mov [rsp+48h+var_38], rdx
test rdx, rdx
setz al
or al, cl
jnz loc_7264B
mov r15, rsi
mov rbx, rdi
mov rdi, rsi
call TextLength
xor r14d, r14d
test eax, eax
jz loc_7264B
mov r12d, eax
mov rdi, [rsp+48h+var_38]
call TextLength
mov r13d, eax
movsxd rbp, r12d
mov dword ptr [rsp+48h+var_48], eax
mov [rsp+48h+var_3C], r12d
sub r13d, r12d
push 1
pop r12
mov rax, rbx
loc_725C6:
mov rdi, rax
mov rsi, r15
call _strstr
test rax, rax
jz short loc_725E1
add rax, rbp
dec r14d
add r12d, r13d
jmp short loc_725C6
loc_725E1:
mov rdi, rbx
call TextLength
add r12d, eax
mov rdi, r12
call _malloc
test rax, rax
jz short loc_7264B
movsxd rbp, dword ptr [rsp+48h+var_48]
mov [rsp+48h+var_48], rax
mov r13, rax
loc_72604:
test r14d, r14d
jz short loc_7265C
mov rdi, rbx
mov rsi, r15
call _strstr
sub rax, rbx
movsxd r12, eax
mov rdi, r13
mov rsi, rbx
mov rdx, r12
call _strncpy
add r13, r12
mov rdi, r13
mov rsi, [rsp+48h+var_38]
call _strcpy
add r13, rbp
add r12d, [rsp+48h+var_3C]
movsxd rax, r12d
add rbx, rax
inc r14d
jmp short loc_72604
loc_7264B:
xor eax, eax
loc_7264D:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7265C:
mov rdi, r13
mov rsi, rbx
call _strcpy
mov rax, [rsp+48h+var_48]
jmp short loc_7264D
| long long TextReplace(long long a1, long long a2, long long a3)
{
long long v3; // rbx
int v4; // eax
int v5; // r14d
int v6; // r12d
long long v7; // rbp
int v8; // r13d
int v9; // r12d
long long v10; // rax
long long v11; // rax
int v12; // eax
long long v13; // rax
long long v14; // rbp
long long v15; // r13
long long v16; // r12
long long v17; // r13
int v19; // [rsp+0h] [rbp-48h]
long long v20; // [rsp+0h] [rbp-48h]
int v21; // [rsp+Ch] [rbp-3Ch]
if ( a1 == 0 || a2 == 0 || a3 == 0 )
return 0LL;
v3 = a1;
v4 = TextLength(a2);
v5 = 0;
if ( !v4 )
return 0LL;
v6 = v4;
v7 = v4;
v19 = TextLength(a3);
v21 = v6;
v8 = v19 - v6;
v9 = 1;
v10 = a1;
while ( 1 )
{
v11 = strstr(v10, a2);
if ( !v11 )
break;
v10 = v7 + v11;
--v5;
v9 += v8;
}
v12 = TextLength(a1);
v13 = malloc((unsigned int)(v12 + v9));
if ( !v13 )
return 0LL;
v14 = v19;
v20 = v13;
v15 = v13;
while ( v5 )
{
v16 = (int)(strstr(v3, a2) - v3);
strncpy(v15, v3, v16);
v17 = v16 + v15;
strcpy(v17, a3);
v15 = v14 + v17;
v3 += v21 + (int)v16;
++v5;
}
strcpy(v15, v3);
return v20;
}
| TextReplace:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
TEST RDI,RDI
SETZ AL
TEST RSI,RSI
SETZ CL
OR CL,AL
MOV qword ptr [RSP + 0x10],RDX
TEST RDX,RDX
SETZ AL
OR AL,CL
JNZ 0x0017264b
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x00171c85
XOR R14D,R14D
TEST EAX,EAX
JZ 0x0017264b
MOV R12D,EAX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00171c85
MOV R13D,EAX
MOVSXD RBP,R12D
MOV dword ptr [RSP],EAX
MOV dword ptr [RSP + 0xc],R12D
SUB R13D,R12D
PUSH 0x1
POP R12
MOV RAX,RBX
LAB_001725c6:
MOV RDI,RAX
MOV RSI,R15
CALL 0x00109120
TEST RAX,RAX
JZ 0x001725e1
ADD RAX,RBP
DEC R14D
ADD R12D,R13D
JMP 0x001725c6
LAB_001725e1:
MOV RDI,RBX
CALL 0x00171c85
ADD R12D,EAX
MOV RDI,R12
CALL 0x001096e0
TEST RAX,RAX
JZ 0x0017264b
MOVSXD RBP,dword ptr [RSP]
MOV qword ptr [RSP],RAX
MOV R13,RAX
LAB_00172604:
TEST R14D,R14D
JZ 0x0017265c
MOV RDI,RBX
MOV RSI,R15
CALL 0x00109120
SUB RAX,RBX
MOVSXD R12,EAX
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R12
CALL 0x00109280
ADD R13,R12
MOV RDI,R13
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001094a0
ADD R13,RBP
ADD R12D,dword ptr [RSP + 0xc]
MOVSXD RAX,R12D
ADD RBX,RAX
INC R14D
JMP 0x00172604
LAB_0017264b:
XOR EAX,EAX
LAB_0017264d:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017265c:
MOV RDI,R13
MOV RSI,RBX
CALL 0x001094a0
MOV RAX,qword ptr [RSP]
JMP 0x0017264d
|
char * TextReplace(char *param_1,char *param_2,char *param_3)
{
int iVar1;
int iVar2;
int iVar3;
char *pcVar4;
char *pcVar5;
int iVar6;
char *__dest;
int iVar7;
if (param_3 != (char *)0x0 && (param_2 != (char *)0x0 && param_1 != (char *)0x0)) {
iVar1 = TextLength(param_2);
iVar7 = 0;
if (iVar1 != 0) {
iVar2 = TextLength(param_3);
iVar6 = 1;
pcVar4 = param_1;
while (pcVar4 = strstr(pcVar4,param_2), pcVar4 != (char *)0x0) {
pcVar4 = pcVar4 + iVar1;
iVar7 = iVar7 + -1;
iVar6 = iVar6 + (iVar2 - iVar1);
}
iVar3 = TextLength(param_1);
pcVar4 = (char *)malloc((ulong)(uint)(iVar6 + iVar3));
if (pcVar4 != (char *)0x0) {
__dest = pcVar4;
for (; iVar7 != 0; iVar7 = iVar7 + 1) {
pcVar5 = strstr(param_1,param_2);
iVar6 = (int)pcVar5 - (int)param_1;
strncpy(__dest,param_1,(long)iVar6);
strcpy(__dest + iVar6,param_3);
__dest = __dest + iVar6 + iVar2;
param_1 = param_1 + (iVar6 + iVar1);
}
strcpy(__dest,param_1);
return pcVar4;
}
}
}
return (char *)0x0;
}
| |
33,810 | TextReplace | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c | char *TextReplace(const char *text, const char *replace, const char *by)
{
// Sanity checks and initialization
if (!text || !replace || !by) return NULL;
char *result = NULL;
char *insertPoint = NULL; // Next insert point
char *temp = NULL; // Temp pointer
int replaceLen = 0; // Replace string length of (the string to remove)
int byLen = 0; // Replacement length (the string to replace by)
int lastReplacePos = 0; // Distance between replace and end of last replace
int count = 0; // Number of replacements
replaceLen = TextLength(replace);
if (replaceLen == 0) return NULL; // Empty replace causes infinite loop during count
byLen = TextLength(by);
// Count the number of replacements needed
insertPoint = (char *)text;
for (count = 0; (temp = strstr(insertPoint, replace)); count++) insertPoint = temp + replaceLen;
// Allocate returning string and point temp to it
temp = result = (char *)RL_MALLOC(TextLength(text) + (byLen - replaceLen)*count + 1);
if (!result) return NULL; // Memory could not be allocated
// First time through the loop, all the variable are set correctly from here on,
// - 'temp' points to the end of the result string
// - 'insertPoint' points to the next occurrence of replace in text
// - 'text' points to the remainder of text after "end of replace"
while (count--)
{
insertPoint = strstr(text, replace);
lastReplacePos = (int)(insertPoint - text);
temp = strncpy(temp, text, lastReplacePos) + lastReplacePos;
temp = strcpy(temp, by) + byLen;
text += lastReplacePos + replaceLen; // Move to next "end of replace"
}
// Copy remaind text part after replacement to result (pointed by moving temp)
strcpy(temp, text);
return result;
} | O3 | c | TextReplace:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %al
orb %cl, %al
jne 0x85b5f
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
cmpb $0x0, (%rsi)
je 0x85b62
movq %rdi, %rbx
xorl %r12d, %r12d
cmpb $0x0, 0x1(%r15,%r12)
leaq 0x1(%r12), %r12
jne 0x85a72
xorl %r13d, %r13d
testl %r12d, %r12d
je 0x85b62
cmpb $0x0, (%rdx)
je 0x85a9f
xorl %r13d, %r13d
cmpb $0x0, 0x1(%rdx,%r13)
leaq 0x1(%r13), %r13
jne 0x85a93
movq %rdx, 0x10(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa130
xorl %ebp, %ebp
movl $0x0, %r14d
testq %rax, %rax
je 0x85add
movslq %r12d, %rcx
movq %rcx, (%rsp)
xorl %r14d, %r14d
addq (%rsp), %rax
incl %r14d
movq %rax, %rdi
movq %r15, %rsi
callq 0xa130
testq %rax, %rax
jne 0x85ac6
cmpb $0x0, (%rbx)
je 0x85aef
xorl %ebp, %ebp
cmpb $0x0, 0x1(%rbx,%rbp)
leaq 0x1(%rbp), %rbp
jne 0x85ae4
movl %r13d, %eax
subl %r12d, %eax
imull %r14d, %eax
leal (%rax,%rbp), %edi
incl %edi
callq 0xa6f0
testq %rax, %rax
je 0x85b62
testl %r14d, %r14d
movq %rax, 0x8(%rsp)
je 0x85b66
movslq %r13d, %rcx
movq %rcx, (%rsp)
movq %rax, %r13
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa130
subq %rbx, %rax
movslq %eax, %rbp
movq %r13, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0xa290
addq %rbp, %r13
movq %r13, %rdi
movq 0x10(%rsp), %rsi
callq 0xa4b0
addq (%rsp), %r13
addl %r12d, %ebp
movslq %ebp, %rax
addq %rax, %rbx
decl %r14d
jne 0x85b1c
jmp 0x85b69
xorl %eax, %eax
retq
xorl %eax, %eax
jmp 0x85b79
movq %rax, %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0xa4b0
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| TextReplace:
test rdi, rdi
setz al
test rsi, rsi
setz cl
or cl, al
test rdx, rdx
setz al
or al, cl
jnz loc_85B5F
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rsi
cmp byte ptr [rsi], 0
jz loc_85B62
mov rbx, rdi
xor r12d, r12d
loc_85A72:
cmp byte ptr [r15+r12+1], 0
lea r12, [r12+1]
jnz short loc_85A72
xor r13d, r13d
test r12d, r12d
jz loc_85B62
cmp byte ptr [rdx], 0
jz short loc_85A9F
xor r13d, r13d
loc_85A93:
cmp byte ptr [rdx+r13+1], 0
lea r13, [r13+1]
jnz short loc_85A93
loc_85A9F:
mov [rsp+48h+var_38], rdx
mov rdi, rbx
mov rsi, r15
call _strstr
xor ebp, ebp
mov r14d, 0
test rax, rax
jz short loc_85ADD
movsxd rcx, r12d
mov [rsp+48h+var_48], rcx
xor r14d, r14d
loc_85AC6:
add rax, [rsp+48h+var_48]
inc r14d
mov rdi, rax
mov rsi, r15
call _strstr
test rax, rax
jnz short loc_85AC6
loc_85ADD:
cmp byte ptr [rbx], 0
jz short loc_85AEF
xor ebp, ebp
loc_85AE4:
cmp byte ptr [rbx+rbp+1], 0
lea rbp, [rbp+1]
jnz short loc_85AE4
loc_85AEF:
mov eax, r13d
sub eax, r12d
imul eax, r14d
lea edi, [rax+rbp]
inc edi
call _malloc
test rax, rax
jz short loc_85B62
test r14d, r14d
mov [rsp+48h+var_40], rax
jz short loc_85B66
movsxd rcx, r13d
mov [rsp+48h+var_48], rcx
mov r13, rax
loc_85B1C:
mov rdi, rbx
mov rsi, r15
call _strstr
sub rax, rbx
movsxd rbp, eax
mov rdi, r13
mov rsi, rbx
mov rdx, rbp
call _strncpy
add r13, rbp
mov rdi, r13
mov rsi, [rsp+48h+var_38]
call _strcpy
add r13, [rsp+48h+var_48]
add ebp, r12d
movsxd rax, ebp
add rbx, rax
dec r14d
jnz short loc_85B1C
jmp short loc_85B69
loc_85B5F:
xor eax, eax
retn
loc_85B62:
xor eax, eax
jmp short loc_85B79
loc_85B66:
mov r13, rax
loc_85B69:
mov rdi, r13
mov rsi, rbx
call _strcpy
mov rax, [rsp+48h+var_40]
loc_85B79:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long TextReplace(_BYTE *a1, _BYTE *a2, _BYTE *a3)
{
_BYTE *v3; // rbx
long long v4; // r12
bool v5; // zf
long long v6; // r13
long long v7; // rax
long long v8; // rbp
int v9; // r14d
long long v10; // rax
long long v11; // r13
long long v12; // rbp
long long v13; // r13
long long v15; // [rsp+0h] [rbp-48h]
long long v16; // [rsp+8h] [rbp-40h]
if ( a1 == 0LL || a2 == 0LL || a3 == 0LL )
return 0LL;
if ( !*a2 )
return 0LL;
v3 = a1;
v4 = 0LL;
do
v5 = a2[++v4] == 0;
while ( !v5 );
LODWORD(v6) = 0;
if ( !(_DWORD)v4 )
return 0LL;
if ( *a3 )
{
v6 = 0LL;
do
v5 = a3[++v6] == 0;
while ( !v5 );
}
v7 = strstr(a1, a2);
LODWORD(v8) = 0;
v9 = 0;
if ( v7 )
{
v9 = 0;
do
{
++v9;
v7 = strstr((int)v4 + v7, a2);
}
while ( v7 );
}
if ( *a1 )
{
v8 = 0LL;
do
v5 = a1[++v8] == 0;
while ( !v5 );
}
v10 = malloc((unsigned int)(v9 * (v6 - v4) + v8 + 1));
if ( !v10 )
return 0LL;
v16 = v10;
if ( v9 )
{
v15 = (int)v6;
v11 = v10;
do
{
v12 = (int)(strstr(v3, a2) - (_DWORD)v3);
strncpy(v11, v3, v12);
v13 = v12 + v11;
strcpy(v13, a3);
v11 = v15 + v13;
v3 += (int)v4 + (int)v12;
--v9;
}
while ( v9 );
}
else
{
v11 = v10;
}
strcpy(v11, v3);
return v16;
}
| TextReplace:
TEST RDI,RDI
SETZ AL
TEST RSI,RSI
SETZ CL
OR CL,AL
TEST RDX,RDX
SETZ AL
OR AL,CL
JNZ 0x00185b5f
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RSI
CMP byte ptr [RSI],0x0
JZ 0x00185b62
MOV RBX,RDI
XOR R12D,R12D
LAB_00185a72:
CMP byte ptr [R15 + R12*0x1 + 0x1],0x0
LEA R12,[R12 + 0x1]
JNZ 0x00185a72
XOR R13D,R13D
TEST R12D,R12D
JZ 0x00185b62
CMP byte ptr [RDX],0x0
JZ 0x00185a9f
XOR R13D,R13D
LAB_00185a93:
CMP byte ptr [RDX + R13*0x1 + 0x1],0x0
LEA R13,[R13 + 0x1]
JNZ 0x00185a93
LAB_00185a9f:
MOV qword ptr [RSP + 0x10],RDX
MOV RDI,RBX
MOV RSI,R15
CALL 0x0010a130
XOR EBP,EBP
MOV R14D,0x0
TEST RAX,RAX
JZ 0x00185add
MOVSXD RCX,R12D
MOV qword ptr [RSP],RCX
XOR R14D,R14D
LAB_00185ac6:
ADD RAX,qword ptr [RSP]
INC R14D
MOV RDI,RAX
MOV RSI,R15
CALL 0x0010a130
TEST RAX,RAX
JNZ 0x00185ac6
LAB_00185add:
CMP byte ptr [RBX],0x0
JZ 0x00185aef
XOR EBP,EBP
LAB_00185ae4:
CMP byte ptr [RBX + RBP*0x1 + 0x1],0x0
LEA RBP,[RBP + 0x1]
JNZ 0x00185ae4
LAB_00185aef:
MOV EAX,R13D
SUB EAX,R12D
IMUL EAX,R14D
LEA EDI,[RAX + RBP*0x1]
INC EDI
CALL 0x0010a6f0
TEST RAX,RAX
JZ 0x00185b62
TEST R14D,R14D
MOV qword ptr [RSP + 0x8],RAX
JZ 0x00185b66
MOVSXD RCX,R13D
MOV qword ptr [RSP],RCX
MOV R13,RAX
LAB_00185b1c:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0010a130
SUB RAX,RBX
MOVSXD RBP,EAX
MOV RDI,R13
MOV RSI,RBX
MOV RDX,RBP
CALL 0x0010a290
ADD R13,RBP
MOV RDI,R13
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0010a4b0
ADD R13,qword ptr [RSP]
ADD EBP,R12D
MOVSXD RAX,EBP
ADD RBX,RAX
DEC R14D
JNZ 0x00185b1c
JMP 0x00185b69
LAB_00185b5f:
XOR EAX,EAX
RET
LAB_00185b62:
XOR EAX,EAX
JMP 0x00185b79
LAB_00185b66:
MOV R13,RAX
LAB_00185b69:
MOV RDI,R13
MOV RSI,RBX
CALL 0x0010a4b0
MOV RAX,qword ptr [RSP + 0x8]
LAB_00185b79:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
char * TextReplace(char *param_1,char *param_2,char *param_3)
{
long lVar1;
int iVar2;
char *pcVar3;
char *pcVar4;
long lVar5;
int iVar6;
long lVar7;
char *__dest;
int iVar8;
if (param_3 == (char *)0x0 || (param_2 == (char *)0x0 || param_1 == (char *)0x0)) {
return (char *)0x0;
}
if (*param_2 != '\0') {
lVar5 = 0;
do {
lVar7 = lVar5 + 1;
lVar5 = lVar5 + 1;
} while (param_2[lVar7] != '\0');
lVar7 = 0;
iVar6 = (int)lVar5;
if (iVar6 != 0) {
if (*param_3 != '\0') {
lVar7 = 0;
do {
lVar5 = lVar7 + 1;
lVar7 = lVar7 + 1;
} while (param_3[lVar5] != '\0');
}
pcVar3 = strstr(param_1,param_2);
lVar5 = 0;
iVar8 = 0;
if (pcVar3 != (char *)0x0) {
iVar8 = 0;
do {
iVar8 = iVar8 + 1;
pcVar3 = strstr(pcVar3 + iVar6,param_2);
} while (pcVar3 != (char *)0x0);
}
if (*param_1 != '\0') {
lVar5 = 0;
do {
lVar1 = lVar5 + 1;
lVar5 = lVar5 + 1;
} while (param_1[lVar1] != '\0');
}
pcVar3 = (char *)malloc((ulong)(((int)lVar7 - iVar6) * iVar8 + (int)lVar5 + 1));
if (pcVar3 != (char *)0x0) {
__dest = pcVar3;
if (iVar8 != 0) {
do {
pcVar4 = strstr(param_1,param_2);
iVar2 = (int)pcVar4 - (int)param_1;
strncpy(__dest,param_1,(long)iVar2);
strcpy(__dest + iVar2,param_3);
__dest = __dest + iVar2 + (int)lVar7;
param_1 = param_1 + (iVar2 + iVar6);
iVar8 = iVar8 + -1;
} while (iVar8 != 0);
}
strcpy(__dest,param_1);
return pcVar3;
}
}
}
return (char *)0x0;
}
| |
33,811 | ftxui::ScreenInteractive::WithRestoredIO(std::function<void ()>) | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/screen_interactive.cpp | Closure ScreenInteractive::WithRestoredIO(Closure fn) { // NOLINT
return [this, fn] {
Uninstall();
fn();
Install();
};
} | O1 | cpp | ftxui::ScreenInteractive::WithRestoredIO(std::function<void ()>):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
leaq 0x8(%rsp), %rbx
movq %rsi, -0x8(%rbx)
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x314a2
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
movl $0x28, %edi
callq 0xb3e0
movq (%rsp), %rcx
movq %rcx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq $0x0, 0x18(%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq 0x18(%rsp), %rcx
testq %rcx, %rcx
je 0x2e961
movq %rax, %rdx
addq $0x8, %rdx
leaq 0x18(%rsp), %rsi
movups (%rbx), %xmm0
movups %xmm0, (%rdx)
movq %rcx, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
movq %rax, (%r14)
leaq 0x2755(%rip), %rax # 0x310c0
movq %rax, 0x18(%r14)
leaq 0x2780(%rip), %rax # 0x310f6
movq %rax, 0x10(%r14)
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x2e991
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x2e9c0
movq %rax, %r14
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x2e9b8
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
movq %r14, %rdi
callq 0xb780
movq %rax, %rdi
callq 0x106a9
| _ZN5ftxui17ScreenInteractive14WithRestoredIOESt8functionIFvvEE:
push r14
push rbx
sub rsp, 28h
mov r14, rdi
lea rbx, [rsp+38h+var_30]
mov [rbx-8], rsi
mov rdi, rbx
mov rsi, rdx
call _ZNSt8functionIFvvEEC2ERKS1_; std::function<void ()(void)>::function(std::function<void ()(void)> const&)
xorps xmm0, xmm0
movups xmmword ptr [r14+10h], xmm0
movups xmmword ptr [r14], xmm0
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, [rsp+38h+var_38]
mov [rax], rcx
xorps xmm0, xmm0
movups xmmword ptr [rax+8], xmm0
mov qword ptr [rax+18h], 0
mov rcx, [rsp+38h+var_18]
mov [rax+20h], rcx
mov rcx, [rsp+38h+var_20]
test rcx, rcx
jz short loc_2E961
mov rdx, rax
add rdx, 8
lea rsi, [rsp+38h+var_20]
movups xmm0, xmmword ptr [rbx]
movups xmmword ptr [rdx], xmm0
mov [rax+18h], rcx
xorps xmm0, xmm0
movups xmmword ptr [rsi], xmm0
loc_2E961:
mov [r14], rax
lea rax, _ZNSt17_Function_handlerIFvvEZN5ftxui17ScreenInteractive14WithRestoredIOESt8functionIS0_EE3$_0E9_M_invokeERKSt9_Any_data; std::_Function_handler<void ()(void),ftxui::ScreenInteractive::WithRestoredIO(std::function<void ()(void)>)::$_0>::_M_invoke(std::_Any_data const&)
mov [r14+18h], rax
lea rax, _ZNSt17_Function_handlerIFvvEZN5ftxui17ScreenInteractive14WithRestoredIOESt8functionIS0_EE3$_0E10_M_managerERSt9_Any_dataRKS7_St18_Manager_operation; std::_Function_handler<void ()(void),ftxui::ScreenInteractive::WithRestoredIO(std::function<void ()(void)>)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [r14+10h], rax
mov rax, [rsp+38h+var_20]
test rax, rax
jz short loc_2E991
mov rdi, rbx
mov rsi, rbx
mov edx, 3
call rax
loc_2E991:
mov rax, r14
add rsp, 28h
pop rbx
pop r14
retn
jmp short loc_2E9C0
mov r14, rax
mov rax, [rsp+38h+var_20]
test rax, rax
jz short loc_2E9B8
mov rdi, rbx
mov rsi, rbx
mov edx, 3
call rax
loc_2E9B8:
mov rdi, r14
call __Unwind_Resume
loc_2E9C0:
mov rdi, rax
call __clang_call_terminate
| long long ftxui::ScreenInteractive::WithRestoredIO(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long v4; // rcx
__int128 v6; // [rsp+8h] [rbp-30h] BYREF
__int128 v7; // [rsp+18h] [rbp-20h]
std::function<void ()(void)>::function(&v6, a3);
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v3 = operator new(0x28uLL);
*(_QWORD *)v3 = a2;
*(_OWORD *)(v3 + 8) = 0LL;
*(_QWORD *)(v3 + 24) = 0LL;
*(_QWORD *)(v3 + 32) = *((_QWORD *)&v7 + 1);
v4 = v7;
if ( (_QWORD)v7 )
{
*(_OWORD *)(v3 + 8) = v6;
*(_QWORD *)(v3 + 24) = v4;
v7 = 0LL;
}
*(_QWORD *)a1 = v3;
*(_QWORD *)(a1 + 24) = std::_Function_handler<void ()(void),ftxui::ScreenInteractive::WithRestoredIO(std::function<void ()(void)>)::$_0>::_M_invoke;
*(_QWORD *)(a1 + 16) = std::_Function_handler<void ()(void),ftxui::ScreenInteractive::WithRestoredIO(std::function<void ()(void)>)::$_0>::_M_manager;
if ( (_QWORD)v7 )
((void ( *)(__int128 *, __int128 *, long long))v7)(&v6, &v6, 3LL);
return a1;
}
| WithRestoredIO:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RDI
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX + -0x8],RSI
MOV RDI,RBX
MOV RSI,RDX
CALL 0x001314a2
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x10],XMM0
MOVUPS xmmword ptr [R14],XMM0
LAB_0012e912:
MOV EDI,0x28
CALL 0x0010b3e0
MOV RCX,qword ptr [RSP]
MOV qword ptr [RAX],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x8],XMM0
MOV qword ptr [RAX + 0x18],0x0
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RSP + 0x18]
TEST RCX,RCX
JZ 0x0012e961
MOV RDX,RAX
ADD RDX,0x8
LEA RSI,[RSP + 0x18]
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS xmmword ptr [RDX],XMM0
MOV qword ptr [RAX + 0x18],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI],XMM0
LAB_0012e961:
MOV qword ptr [R14],RAX
LEA RAX,[0x1310c0]
MOV qword ptr [R14 + 0x18],RAX
LEA RAX,[0x1310f6]
MOV qword ptr [R14 + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x18]
TEST RAX,RAX
JZ 0x0012e991
LAB_0012e984:
MOV RDI,RBX
MOV RSI,RBX
MOV EDX,0x3
CALL RAX
LAB_0012e991:
MOV RAX,R14
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* ftxui::ScreenInteractive::WithRestoredIO(std::function<void ()>) */
int8 *
ftxui::ScreenInteractive::WithRestoredIO(int8 *param_1,int8 param_2,function *param_3)
{
int8 *puVar1;
int8 local_30;
int8 uStack_28;
code *local_20;
int8 uStack_18;
std::function<void()>::function((function<void()> *)&local_30,param_3);
param_1[2] = 0;
param_1[3] = 0;
*param_1 = 0;
param_1[1] = 0;
/* try { // try from 0012e912 to 0012e91b has its CatchHandler @ 0012e99e */
puVar1 = (int8 *)operator_new(0x28);
*puVar1 = param_2;
puVar1[1] = 0;
puVar1[2] = 0;
puVar1[3] = 0;
puVar1[4] = uStack_18;
if (local_20 != (code *)0x0) {
puVar1[1] = local_30;
puVar1[2] = uStack_28;
puVar1[3] = local_20;
local_20 = (code *)0x0;
uStack_18 = 0;
}
*param_1 = puVar1;
param_1[3] = std::
_Function_handler<void(),ftxui::ScreenInteractive::WithRestoredIO(std::function<void()>)::$_0>
::_M_invoke;
param_1[2] = std::
_Function_handler<void(),ftxui::ScreenInteractive::WithRestoredIO(std::function<void()>)::$_0>
::_M_manager;
if (local_20 != (code *)0x0) {
/* try { // try from 0012e984 to 0012e990 has its CatchHandler @ 0012e99c */
(*local_20)((function<void()> *)&local_30,(function<void()> *)&local_30,3);
}
return param_1;
}
| |
33,812 | mi_mark_file_changed | eloqsql/storage/myisam/mi_locking.c | int _mi_mark_file_changed(MI_INFO *info)
{
uchar buff[3];
register MYISAM_SHARE *share=info->s;
DBUG_ENTER("_mi_mark_file_changed");
if (!(share->state.changed & STATE_CHANGED) || ! share->global_changed)
{
share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_OPTIMIZED_KEYS);
if (!share->global_changed)
{
share->global_changed=1;
share->state.open_count++;
}
if (!share->temporary)
{
mi_int2store(buff,share->state.open_count);
buff[2]=1; /* Mark that it's changed */
DBUG_RETURN((int)mysql_file_pwrite(share->kfile, buff, sizeof(buff),
sizeof(share->state.header),
MYF(MY_NABP)));
}
}
DBUG_RETURN(0);
} | O3 | c | mi_mark_file_changed:
movq (%rdi), %rax
movb 0xf0(%rax), %cl
movb 0x380(%rax), %dl
testb $0x1, %cl
jne 0x7e021
orb $0x19, %cl
movb %cl, 0xf0(%rax)
testb %dl, %dl
jne 0x7e03b
jmp 0x7e02e
testb %dl, %dl
jne 0x7e044
orb $0x19, %cl
movb %cl, 0xf0(%rax)
movb $0x1, 0x380(%rax)
incl 0xec(%rax)
cmpb $0x0, 0x382(%rax)
je 0x7e047
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movl 0xec(%rax), %ecx
movb %cl, -0x12(%rbp)
movb %ch, -0x13(%rbp)
movb $0x1, -0x11(%rbp)
movl 0x350(%rax), %ebx
leaq 0x30e359(%rip), %rax # 0x38c3c8
movq (%rax), %rax
leaq -0x68(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x7e0ac
leaq -0x13(%rbp), %rsi
movl $0x3, %edx
movl $0x18, %ecx
movl $0x4, %r8d
movl %ebx, %edi
callq 0xa50ca
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x13(%rbp), %rdx
leaq -0x20(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rcx
callq 0x2ea89
movq (%r14), %rax
jmp 0x7e0a3
| _mi_mark_file_changed:
mov rax, [rdi]
mov cl, [rax+0F0h]
mov dl, [rax+380h]
test cl, 1
jnz short loc_7E021
or cl, 19h
mov [rax+0F0h], cl
test dl, dl
jnz short loc_7E03B
jmp short loc_7E02E
loc_7E021:
test dl, dl
jnz short loc_7E044
or cl, 19h
mov [rax+0F0h], cl
loc_7E02E:
mov byte ptr [rax+380h], 1
inc dword ptr [rax+0ECh]
loc_7E03B:
cmp byte ptr [rax+382h], 0
jz short loc_7E047
loc_7E044:
xor eax, eax
retn
loc_7E047:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 60h
mov ecx, [rax+0ECh]
mov [rbp-12h], cl
mov [rbp-13h], ch
mov byte ptr [rbp-11h], 1
mov ebx, [rax+350h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp-68h]
mov esi, ebx
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_7E0AC
lea rsi, [rbp-13h]
mov edx, 3
mov ecx, 18h
mov r8d, 4
mov edi, ebx
call my_pwrite
loc_7E0A3:
add rsp, 60h
pop rbx
pop r14
pop rbp
retn
loc_7E0AC:
lea rdx, [rbp-13h]
lea r14, [rbp-20h]
mov rdi, rax
mov esi, ebx
mov rcx, r14
call _mi_mark_file_changed_cold_1
mov rax, [r14]
jmp short loc_7E0A3
| long long mi_mark_file_changed(long long *a1)
{
long long v1; // rax
char v2; // cl
char v3; // dl
__int16 v5; // kr00_2
unsigned int v6; // ebx
long long v7; // rax
long long v8; // [rsp-70h] [rbp-70h] BYREF
long long v9; // [rsp-28h] [rbp-28h] BYREF
_BYTE v10[27]; // [rsp-1Bh] [rbp-1Bh] BYREF
v1 = *a1;
v2 = *(_BYTE *)(*a1 + 240);
v3 = *(_BYTE *)(*a1 + 896);
if ( (v2 & 1) != 0 )
{
if ( v3 )
return 0LL;
*(_BYTE *)(v1 + 240) = v2 | 0x19;
}
else
{
*(_BYTE *)(v1 + 240) = v2 | 0x19;
if ( v3 )
goto LABEL_7;
}
*(_BYTE *)(v1 + 896) = 1;
++*(_DWORD *)(v1 + 236);
LABEL_7:
if ( *(_BYTE *)(v1 + 898) )
return 0LL;
v5 = *(_DWORD *)(v1 + 236);
v10[0] = HIBYTE(v5);
v10[1] = v5;
v10[2] = 1;
v6 = *(_DWORD *)(v1 + 848);
v7 = ((long long ( *)(long long *, _QWORD, long long))PSI_server[43])(&v8, v6, 7LL);
if ( !v7 )
return my_pwrite(v6, v10, 3LL, 24LL, 4LL);
mi_mark_file_changed_cold_1(v7, v6, (long long)v10, &v9);
return v9;
}
| _mi_mark_file_changed:
MOV RAX,qword ptr [RDI]
MOV CL,byte ptr [RAX + 0xf0]
MOV DL,byte ptr [RAX + 0x380]
TEST CL,0x1
JNZ 0x0017e021
OR CL,0x19
MOV byte ptr [RAX + 0xf0],CL
TEST DL,DL
JNZ 0x0017e03b
JMP 0x0017e02e
LAB_0017e021:
TEST DL,DL
JNZ 0x0017e044
OR CL,0x19
MOV byte ptr [RAX + 0xf0],CL
LAB_0017e02e:
MOV byte ptr [RAX + 0x380],0x1
INC dword ptr [RAX + 0xec]
LAB_0017e03b:
CMP byte ptr [RAX + 0x382],0x0
JZ 0x0017e047
LAB_0017e044:
XOR EAX,EAX
RET
LAB_0017e047:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV ECX,dword ptr [RAX + 0xec]
MOV byte ptr [RBP + -0x12],CL
MOV byte ptr [RBP + -0x13],CH
MOV byte ptr [RBP + -0x11],0x1
MOV EBX,dword ptr [RAX + 0x350]
LEA RAX,[0x48c3c8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x68]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0017e0ac
LEA RSI,[RBP + -0x13]
MOV EDX,0x3
MOV ECX,0x18
MOV R8D,0x4
MOV EDI,EBX
CALL 0x001a50ca
LAB_0017e0a3:
ADD RSP,0x60
POP RBX
POP R14
POP RBP
RET
LAB_0017e0ac:
LEA RDX,[RBP + -0x13]
LEA R14,[RBP + -0x20]
MOV RDI,RAX
MOV ESI,EBX
MOV RCX,R14
CALL 0x0012ea89
MOV RAX,qword ptr [R14]
JMP 0x0017e0a3
|
int8 _mi_mark_file_changed(long *param_1)
{
byte bVar1;
int4 uVar2;
long lVar3;
int1 local_70 [72];
int8 local_28;
int1 local_1b;
int1 local_1a;
int1 local_19;
lVar3 = *param_1;
bVar1 = *(byte *)(lVar3 + 0xf0);
if ((bVar1 & 1) == 0) {
*(byte *)(lVar3 + 0xf0) = bVar1 | 0x19;
if (*(char *)(lVar3 + 0x380) != '\0') goto LAB_0017e03b;
}
else {
if (*(char *)(lVar3 + 0x380) != '\0') {
return 0;
}
*(byte *)(lVar3 + 0xf0) = bVar1 | 0x19;
}
*(int1 *)(lVar3 + 0x380) = 1;
*(int *)(lVar3 + 0xec) = *(int *)(lVar3 + 0xec) + 1;
LAB_0017e03b:
if (*(char *)(lVar3 + 0x382) != '\0') {
return 0;
}
local_1a = (int1)*(int4 *)(lVar3 + 0xec);
local_1b = (int1)((uint)*(int4 *)(lVar3 + 0xec) >> 8);
local_19 = 1;
uVar2 = *(int4 *)(lVar3 + 0x350);
lVar3 = (**(code **)(PSI_server + 0x158))(local_70,uVar2,7);
if (lVar3 == 0) {
local_28 = my_pwrite(uVar2,&local_1b,3,0x18,4);
}
else {
_mi_mark_file_changed_cold_1(lVar3,uVar2,&local_1b,&local_28);
}
return local_28;
}
| |
33,813 | nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::end() const | monkey531[P]llama/common/./json.hpp | iteration_proxy_value<IteratorType> end() const noexcept
{
return iteration_proxy_value<IteratorType>(container->end());
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::end() const:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movq %rcx, 0x18(%rsp)
movzbl (%rax), %ecx
cmpl $0x2, %ecx
je 0xe3cec
cmpl $0x1, %ecx
jne 0xe3cfb
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0xe3d04
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0xe3d04
movq $0x1, 0x18(%rsp)
movq %rsp, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xad2c4
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
| _ZNK8nlohmann16json_abi_v3_11_36detail15iteration_proxyINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3endEv:
push rbx
sub rsp, 20h
mov rbx, rdi
mov rax, [rsi]
mov [rsp+28h+var_28], rax
xorps xmm0, xmm0
movups [rsp+28h+var_20], xmm0
mov rcx, 8000000000000000h
mov [rsp+28h+var_10], rcx
movzx ecx, byte ptr [rax]
cmp ecx, 2
jz short loc_E3CEC
cmp ecx, 1
jnz short loc_E3CFB
mov rax, [rax+8]
mov rax, [rax+8]
mov qword ptr [rsp+28h+var_20], rax
jmp short loc_E3D04
loc_E3CEC:
mov rax, [rax+8]
mov rax, [rax+8]
mov qword ptr [rsp+28h+var_20+8], rax
jmp short loc_E3D04
loc_E3CFB:
mov [rsp+28h+var_10], 1
loc_E3D04:
mov rsi, rsp
mov rdi, rbx
xor edx, edx
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESH_m; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,ulong)
mov rax, rbx
add rsp, 20h
pop rbx
retn
| long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(
long long a1,
unsigned __int8 **a2)
{
unsigned __int8 *v2; // rax
int v3; // ecx
unsigned __int8 *v5; // [rsp+0h] [rbp-28h] BYREF
__int128 v6; // [rsp+8h] [rbp-20h]
long long v7; // [rsp+18h] [rbp-10h]
v2 = *a2;
v5 = v2;
v6 = 0LL;
v7 = 0x8000000000000000LL;
v3 = *v2;
if ( v3 == 2 )
{
*((_QWORD *)&v6 + 1) = *(_QWORD *)(*((_QWORD *)v2 + 1) + 8LL);
}
else if ( v3 == 1 )
{
*(_QWORD *)&v6 = *(_QWORD *)(*((_QWORD *)v2 + 1) + 8LL);
}
else
{
v7 = 1LL;
}
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::iteration_proxy_value(
a1,
(__int128 *)&v5,
0LL);
return a1;
}
| end:
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
MOV RAX,qword ptr [RSI]
MOV qword ptr [RSP],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x8],XMM0
MOV RCX,-0x8000000000000000
MOV qword ptr [RSP + 0x18],RCX
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x2
JZ 0x001e3cec
CMP ECX,0x1
JNZ 0x001e3cfb
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001e3d04
LAB_001e3cec:
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001e3d04
LAB_001e3cfb:
MOV qword ptr [RSP + 0x18],0x1
LAB_001e3d04:
MOV RSI,RSP
MOV RDI,RBX
XOR EDX,EDX
CALL 0x001ad2c4
MOV RAX,RBX
ADD RSP,0x20
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > >::end() const */
void nlohmann::json_abi_v3_11_3::detail::
iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::end(void)
{
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::iteration_proxy_value();
return;
}
| |
33,814 | mbr_join | eloqsql/storage/myisam/rt_split.c | static void mbr_join(double *a, const double *b, int n_dim)
{
double *end = a + n_dim * 2;
do
{
if (a[0] > b[0])
a[0] = b[0];
if (a[1] < b[1])
a[1] = b[1];
a += 2;
b += 2;
}while (a != end);
} | O0 | c | mbr_join:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0xdae38
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm1
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xdae62
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0xdae16
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mbr_join_0:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_8]
mov ecx, [rbp+var_14]
shl ecx, 1
movsxd rcx, ecx
shl rcx, 3
add rax, rcx
mov [rbp+var_20], rax
loc_DAE16:
mov rax, [rbp+var_8]
movsd xmm0, qword ptr [rax]
mov rax, [rbp+var_10]
ucomisd xmm0, qword ptr [rax]
jbe short loc_DAE38
mov rax, [rbp+var_10]
movsd xmm0, qword ptr [rax]
mov rax, [rbp+var_8]
movsd qword ptr [rax], xmm0
loc_DAE38:
mov rax, [rbp+var_8]
movsd xmm1, qword ptr [rax+8]
mov rax, [rbp+var_10]
movsd xmm0, qword ptr [rax+8]
ucomisd xmm0, xmm1
jbe short loc_DAE62
mov rax, [rbp+var_10]
movsd xmm0, qword ptr [rax+8]
mov rax, [rbp+var_8]
movsd qword ptr [rax+8], xmm0
loc_DAE62:
mov rax, [rbp+var_8]
add rax, 10h
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
add rax, 10h
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
cmp rax, [rbp+var_20]
jnz short loc_DAE16
pop rbp
retn
| double * mbr_join_0(double *a1, double *a2, int a3)
{
double *result; // rax
double *v5; // [rsp+18h] [rbp-8h]
v5 = a1;
do
{
if ( *v5 > *a2 )
*v5 = *a2;
if ( a2[1] > v5[1] )
v5[1] = a2[1];
v5 += 2;
a2 += 2;
result = v5;
}
while ( v5 != &a1[2 * a3] );
return result;
}
| mbr_join:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x14]
SHL ECX,0x1
MOVSXD RCX,ECX
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001dae16:
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM0,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
UCOMISD XMM0,qword ptr [RAX]
JBE 0x001dae38
MOV RAX,qword ptr [RBP + -0x10]
MOVSD XMM0,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOVSD qword ptr [RAX],XMM0
LAB_001dae38:
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM1,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOVSD XMM0,qword ptr [RAX + 0x8]
UCOMISD XMM0,XMM1
JBE 0x001dae62
MOV RAX,qword ptr [RBP + -0x10]
MOVSD XMM0,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOVSD qword ptr [RAX + 0x8],XMM0
LAB_001dae62:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x10
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x10
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001dae16
POP RBP
RET
|
void mbr_join(double *param_1,double *param_2,int param_3)
{
double *local_18;
double *local_10;
local_18 = param_2;
local_10 = param_1;
do {
if (*local_18 <= *local_10 && *local_10 != *local_18) {
*local_10 = *local_18;
}
if (local_10[1] < local_18[1]) {
local_10[1] = local_18[1];
}
local_10 = local_10 + 2;
local_18 = local_18 + 2;
} while (local_10 != param_1 + (param_3 << 1));
return;
}
| |
33,815 | blst_aggregate_in_g1 | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/aggregate.c | BLST_ERROR blst_aggregate_in_g1(POINTonE1 *out, const POINTonE1 *in,
const unsigned char *zwire)
{
POINTonE1 P[1];
BLST_ERROR ret;
ret = POINTonE1_Deserialize_Z((POINTonE1_affine *)P, zwire);
if (ret != BLST_SUCCESS)
return ret;
if (vec_is_zero(P, sizeof(POINTonE1_affine))) {
if (in == NULL)
vec_zero(out, sizeof(*out));
return BLST_SUCCESS;
}
vec_copy(P->Z, BLS12_381_Rx.p, sizeof(P->Z));
if (!POINTonE1_in_G1(P))
return BLST_POINT_NOT_IN_GROUP;
if (in == NULL)
vec_copy(out, P, sizeof(P));
else
POINTonE1_dadd_affine(out, in, (POINTonE1_affine *)P);
return BLST_SUCCESS;
} | O0 | c | blst_aggregate_in_g1:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0xb0(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xa7dc0
movl %eax, -0xb4(%rbp)
cmpl $0x0, -0xb4(%rbp)
je 0xb07e4
movl -0xb4(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xb0889
leaq -0xb0(%rbp), %rdi
movl $0x60, %esi
callq 0xa7680
cmpq $0x0, %rax
je 0xb0819
cmpq $0x0, -0x18(%rbp)
jne 0xb0810
movq -0x10(%rbp), %rdi
movl $0x90, %esi
callq 0xa7170
movl $0x0, -0x4(%rbp)
jmp 0xb0889
leaq -0xb0(%rbp), %rdi
addq $0x60, %rdi
leaq 0x3586d(%rip), %rsi # 0xe6098
movl $0x30, %edx
callq 0xa7480
leaq -0xb0(%rbp), %rdi
callq 0xaa240
cmpq $0x0, %rax
jne 0xb0850
movl $0x3, -0x4(%rbp)
jmp 0xb0889
cmpq $0x0, -0x18(%rbp)
jne 0xb086e
movq -0x10(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movl $0x90, %edx
callq 0xa7480
jmp 0xb0882
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0xa8b30
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| blst_aggregate_in_g1:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
lea rdi, [rbp+var_B0]
mov rsi, [rbp+var_20]
call POINTonE1_Deserialize_Z
mov [rbp+var_B4], eax
cmp [rbp+var_B4], 0
jz short loc_B07E4
mov eax, [rbp+var_B4]
mov [rbp+var_4], eax
jmp loc_B0889
loc_B07E4:
lea rdi, [rbp+var_B0]
mov esi, 60h ; '`'
call vec_is_zero
cmp rax, 0
jz short loc_B0819
cmp [rbp+var_18], 0
jnz short loc_B0810
mov rdi, [rbp+var_10]
mov esi, 90h
call vec_zero
loc_B0810:
mov [rbp+var_4], 0
jmp short loc_B0889
loc_B0819:
lea rdi, [rbp+var_B0]
add rdi, 60h ; '`'
lea rsi, BLS12_381_Rx
mov edx, 30h ; '0'
call vec_copy
lea rdi, [rbp+var_B0]
call POINTonE1_in_G1
cmp rax, 0
jnz short loc_B0850
mov [rbp+var_4], 3
jmp short loc_B0889
loc_B0850:
cmp [rbp+var_18], 0
jnz short loc_B086E
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_B0]
mov edx, 90h
call vec_copy
jmp short loc_B0882
loc_B086E:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
lea rdx, [rbp+var_B0]
call POINTonE1_dadd_affine
loc_B0882:
mov [rbp+var_4], 0
loc_B0889:
mov eax, [rbp+var_4]
add rsp, 0C0h
pop rbp
retn
| long long blst_aggregate_in_g1(long long a1, long long a2, char *a3)
{
unsigned int v4; // [rsp+Ch] [rbp-B4h]
_BYTE v5[96]; // [rsp+10h] [rbp-B0h] BYREF
_QWORD v6[7]; // [rsp+70h] [rbp-50h] BYREF
long long v7; // [rsp+A8h] [rbp-18h]
long long v8; // [rsp+B0h] [rbp-10h]
v8 = a1;
v7 = a2;
v6[6] = a3;
v4 = POINTonE1_Deserialize_Z((long long)v5, a3);
if ( v4 )
{
return v4;
}
else if ( vec_is_zero((long long)v5, 0x60uLL) )
{
if ( !v7 )
vec_zero(v8, 0x90uLL);
return 0;
}
else
{
vec_copy((long long)v6, (long long)&BLS12_381_Rx, 0x30uLL);
if ( POINTonE1_in_G1((long long)v5) )
{
if ( v7 )
POINTonE1_dadd_affine(v8, v7, (long long)v5);
else
vec_copy(v8, (long long)v5, 0x90uLL);
return 0;
}
else
{
return 3;
}
}
}
| blst_aggregate_in_g1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
LEA RDI,[RBP + -0xb0]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001a7dc0
MOV dword ptr [RBP + -0xb4],EAX
CMP dword ptr [RBP + -0xb4],0x0
JZ 0x001b07e4
MOV EAX,dword ptr [RBP + -0xb4]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001b0889
LAB_001b07e4:
LEA RDI,[RBP + -0xb0]
MOV ESI,0x60
CALL 0x001a7680
CMP RAX,0x0
JZ 0x001b0819
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x001b0810
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x90
CALL 0x001a7170
LAB_001b0810:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001b0889
LAB_001b0819:
LEA RDI,[RBP + -0xb0]
ADD RDI,0x60
LEA RSI,[0x1e6098]
MOV EDX,0x30
CALL 0x001a7480
LEA RDI,[RBP + -0xb0]
CALL 0x001aa240
CMP RAX,0x0
JNZ 0x001b0850
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001b0889
LAB_001b0850:
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x001b086e
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0xb0]
MOV EDX,0x90
CALL 0x001a7480
JMP 0x001b0882
LAB_001b086e:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDX,[RBP + -0xb0]
CALL 0x001a8b30
LAB_001b0882:
MOV dword ptr [RBP + -0x4],0x0
LAB_001b0889:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xc0
POP RBP
RET
|
int blst_aggregate_in_g1(int8 param_1,long param_2,int8 param_3)
{
long lVar1;
int1 local_b8 [96];
int1 auStack_58 [48];
int8 local_28;
long local_20;
int8 local_18;
int local_c;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_c = POINTonE1_Deserialize_Z(local_b8,param_3);
if (local_c == 0) {
lVar1 = vec_is_zero(local_b8,0x60);
if (lVar1 == 0) {
vec_copy(auStack_58,BLS12_381_Rx,0x30);
lVar1 = POINTonE1_in_G1(local_b8);
if (lVar1 == 0) {
local_c = 3;
}
else {
if (local_20 == 0) {
vec_copy(local_18,local_b8,0x90);
}
else {
POINTonE1_dadd_affine(local_18,local_20,local_b8);
}
local_c = 0;
}
}
else {
if (local_20 == 0) {
vec_zero(local_18,0x90);
}
local_c = 0;
}
}
return local_c;
}
| |
33,816 | ma_open | eloqsql/libmariadb/libmariadb/ma_io.c | MA_FILE *ma_open(const char *location, const char *mode, MYSQL *mysql)
{
int CodePage= -1;
FILE *fp= NULL;
MA_FILE *ma_file= NULL;
if (!location || !location[0])
return NULL;
#ifdef HAVE_REMOTEIO
if (strstr(location, "://"))
goto remote;
#endif
#ifdef _WIN32
if (mysql && mysql->charset)
CodePage= madb_get_windows_cp(mysql->charset->csname);
#endif
if (CodePage == -1)
{
if (!(fp= fopen(location, mode)))
{
return NULL;
}
}
#ifdef _WIN32
/* See CONC-44: we need to support non ascii filenames too, so we convert
current character set to wchar_t and try to open the file via _wsopen */
else
{
wchar_t *w_filename= NULL;
wchar_t *w_mode= NULL;
int len;
DWORD Length;
len= MultiByteToWideChar(CodePage, 0, location, (int)strlen(location), NULL, 0);
if (!len)
return NULL;
if (!(w_filename= (wchar_t *)calloc(1, (len + 1) * sizeof(wchar_t))))
{
my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return NULL;
}
Length= len;
len= MultiByteToWideChar(CodePage, 0, location, (int)strlen(location), w_filename, (int)Length);
if (!len)
{
/* todo: error handling */
free(w_filename);
return NULL;
}
len= (int)strlen(mode);
if (!(w_mode= (wchar_t *)calloc(1, (len + 1) * sizeof(wchar_t))))
{
my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
free(w_filename);
return NULL;
}
Length= len;
len= MultiByteToWideChar(CodePage, 0, mode, (int)strlen(mode), w_mode, (int)Length);
if (!len)
{
/* todo: error handling */
free(w_filename);
free(w_mode);
return NULL;
}
fp= _wfopen(w_filename, w_mode);
free(w_filename);
free(w_mode);
}
#endif
if (fp)
{
ma_file= (MA_FILE *)malloc(sizeof(MA_FILE));
if (!ma_file)
{
fclose(fp);
my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return NULL;
}
ma_file->type= MA_FILE_LOCAL;
ma_file->ptr= (void *)fp;
}
return ma_file;
#ifdef HAVE_REMOTEIO
remote:
/* check if plugin for remote io is available and try
* to open location */
{
MYSQL mysql;
if (rio_plugin ||(rio_plugin= (struct st_mysql_client_plugin_REMOTEIO *)
mysql_client_find_plugin(&mysql, NULL, MARIADB_CLIENT_REMOTEIO_PLUGIN)))
return rio_plugin->methods->mopen(location, mode);
return NULL;
}
#endif
} | O3 | c | ma_open:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x500, %rsp # imm = 0x500
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
testq %rdi, %rdi
je 0x56a08
movq %rdi, %r12
cmpb $0x0, (%rdi)
je 0x56a08
movq %rdx, %r15
movq %rsi, %r14
leaq 0x4de32(%rip), %rsi # 0xa47bf
movq %r12, %rdi
callq 0x374a0
testq %rax, %rax
je 0x569d7
leaq 0x3709af(%rip), %r15 # 0x3c7350
movq (%r15), %rax
testq %rax, %rax
jne 0x569c6
xorl %ebx, %ebx
leaq -0x520(%rbp), %rdi
xorl %esi, %esi
movl $0x64, %edx
callq 0x5686c
movq %rax, (%r15)
testq %rax, %rax
je 0x56a0a
movq 0x58(%rax), %rax
movq %r12, %rdi
movq %r14, %rsi
callq *(%rax)
movq %rax, %rbx
jmp 0x56a0a
movq %r12, %rdi
movq %r14, %rsi
callq 0x37ac0
testq %rax, %rax
je 0x56a08
movq %rax, %r14
movl $0x10, %edi
callq 0x37950
testq %rax, %rax
je 0x56a2c
movq %rax, %rbx
movl $0x1, (%rax)
movq %r14, 0x8(%rax)
jmp 0x56a0a
xorl %ebx, %ebx
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x56a53
movq %rbx, %rax
addq $0x500, %rsp # imm = 0x500
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x37450
leaq 0x2f6b45(%rip), %rax # 0x34d580
movq (%rax), %rdx
xorl %ebx, %ebx
movq %r15, %rdi
movl $0x7d8, %esi # imm = 0x7D8
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x4459d
jmp 0x56a0a
callq 0x372b0
| ma_open:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 500h
mov rax, fs:28h
mov [rbp+var_28], rax
test rdi, rdi
jz loc_56A08
mov r12, rdi
cmp byte ptr [rdi], 0
jz loc_56A08
mov r15, rdx
mov r14, rsi
lea rsi, asc_A47BF; "://"
mov rdi, r12
call _strstr
test rax, rax
jz short loc_569D7
lea r15, rio_plugin
mov rax, [r15]
test rax, rax
jnz short loc_569C6
xor ebx, ebx
lea rdi, [rbp+var_520]
xor esi, esi
mov edx, 64h ; 'd'
call mysql_client_find_plugin
mov [r15], rax
test rax, rax
jz short loc_56A0A
loc_569C6:
mov rax, [rax+58h]
mov rdi, r12
mov rsi, r14
call qword ptr [rax]
mov rbx, rax
jmp short loc_56A0A
loc_569D7:
mov rdi, r12
mov rsi, r14
call _fopen64
test rax, rax
jz short loc_56A08
mov r14, rax
mov edi, 10h
call _malloc
test rax, rax
jz short loc_56A2C
mov rbx, rax
mov dword ptr [rax], 1
mov [rax+8], r14
jmp short loc_56A0A
loc_56A08:
xor ebx, ebx
loc_56A0A:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_56A53
mov rax, rbx
add rsp, 500h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_56A2C:
mov rdi, r14
call _fclose
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
xor ebx, ebx
mov rdi, r15
mov esi, 7D8h
xor ecx, ecx
xor eax, eax
call my_set_error
jmp short loc_56A0A
loc_56A53:
call ___stack_chk_fail
| long long ma_open(
_BYTE *a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v12; // rcx
long long v13; // r8
long long v14; // r9
double v15; // xmm4_8
double v16; // xmm5_8
long long plugin; // rax
long long v18; // rbx
long long v19; // rax
long long v20; // r14
long long v21; // rax
char v23[1272]; // [rsp+0h] [rbp-520h] BYREF
unsigned long long v24; // [rsp+4F8h] [rbp-28h]
v24 = __readfsqword(0x28u);
if ( !a1 || !*a1 )
return 0LL;
if ( !strstr(a1, "://") )
{
v19 = fopen64(a1, a2);
if ( v19 )
{
v20 = v19;
v21 = malloc(16LL);
if ( v21 )
{
v18 = v21;
*(_DWORD *)v21 = 1;
*(_QWORD *)(v21 + 8) = v20;
}
else
{
fclose(v20);
v18 = 0LL;
my_set_error(a3, 2008, (long long)SQLSTATE_UNKNOWN, 0LL);
}
return v18;
}
return 0LL;
}
plugin = rio_plugin;
if ( rio_plugin )
return (**(long long ( ***)(_BYTE *, long long))(plugin + 88))(a1, a2);
v18 = 0LL;
plugin = mysql_client_find_plugin((long long)v23, 0LL, 100, a4, a5, a6, a7, v15, v16, a10, a11, v12, v13, v14, v23[0]);
rio_plugin = plugin;
if ( plugin )
return (**(long long ( ***)(_BYTE *, long long))(plugin + 88))(a1, a2);
return v18;
}
| ma_open:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x500
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
TEST RDI,RDI
JZ 0x00156a08
MOV R12,RDI
CMP byte ptr [RDI],0x0
JZ 0x00156a08
MOV R15,RDX
MOV R14,RSI
LEA RSI,[0x1a47bf]
MOV RDI,R12
CALL 0x001374a0
TEST RAX,RAX
JZ 0x001569d7
LEA R15,[0x4c7350]
MOV RAX,qword ptr [R15]
TEST RAX,RAX
JNZ 0x001569c6
XOR EBX,EBX
LEA RDI,[RBP + -0x520]
XOR ESI,ESI
MOV EDX,0x64
CALL 0x0015686c
MOV qword ptr [R15],RAX
TEST RAX,RAX
JZ 0x00156a0a
LAB_001569c6:
MOV RAX,qword ptr [RAX + 0x58]
MOV RDI,R12
MOV RSI,R14
CALL qword ptr [RAX]
MOV RBX,RAX
JMP 0x00156a0a
LAB_001569d7:
MOV RDI,R12
MOV RSI,R14
CALL 0x00137ac0
TEST RAX,RAX
JZ 0x00156a08
MOV R14,RAX
MOV EDI,0x10
CALL 0x00137950
TEST RAX,RAX
JZ 0x00156a2c
MOV RBX,RAX
MOV dword ptr [RAX],0x1
MOV qword ptr [RAX + 0x8],R14
JMP 0x00156a0a
LAB_00156a08:
XOR EBX,EBX
LAB_00156a0a:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00156a53
MOV RAX,RBX
ADD RSP,0x500
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00156a2c:
MOV RDI,R14
CALL 0x00137450
LEA RAX,[0x44d580]
MOV RDX,qword ptr [RAX]
XOR EBX,EBX
MOV RDI,R15
MOV ESI,0x7d8
XOR ECX,ECX
XOR EAX,EAX
CALL 0x0014459d
JMP 0x00156a0a
LAB_00156a53:
CALL 0x001372b0
|
int4 * ma_open(char *param_1,char *param_2,int8 param_3)
{
char *pcVar1;
int4 *puVar2;
FILE *__stream;
long in_FS_OFFSET;
int1 local_528 [1272];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
if ((param_1 != (char *)0x0) && (*param_1 != '\0')) {
pcVar1 = strstr(param_1,"://");
if (pcVar1 != (char *)0x0) {
if (rio_plugin == 0) {
puVar2 = (int4 *)0x0;
rio_plugin = mysql_client_find_plugin(local_528,0,100);
if (rio_plugin == 0) goto LAB_00156a0a;
}
puVar2 = (int4 *)(*(code *)**(int8 **)(rio_plugin + 0x58))(param_1,param_2);
goto LAB_00156a0a;
}
__stream = fopen64(param_1,param_2);
if (__stream != (FILE *)0x0) {
puVar2 = (int4 *)malloc(0x10);
if (puVar2 == (int4 *)0x0) {
fclose(__stream);
puVar2 = (int4 *)0x0;
my_set_error(param_3,0x7d8,SQLSTATE_UNKNOWN,0);
}
else {
*puVar2 = 1;
*(FILE **)(puVar2 + 2) = __stream;
}
goto LAB_00156a0a;
}
}
puVar2 = (int4 *)0x0;
LAB_00156a0a:
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return puVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
33,817 | wstr_to_str | eloqsql/strings/ctype-uca.c | static void
wstr_to_str(char *str, size_t length, my_wc_t *wc, size_t wlength)
{
const char *end= str + length;
char *s;
size_t i, rem;
for (s= str, i= 0; (rem= (end - s)) > 0 && i < wlength; i++)
{
if ((wc[i] >= '0' && wc[i] <= '9') ||
(wc[i] >= 'a' && wc[i] <= 'z') ||
(wc[i] >= 'A' && wc[i] <= 'Z'))
s+= my_snprintf(s, rem, "%c", (int) wc[i]);
else
s+= my_snprintf(s, rem, "\\u%04X", (int) wc[i]);
}
} | O0 | c | wstr_to_str:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rax, %rcx
movq %rcx, -0x40(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x41(%rbp)
jbe 0xe64bc
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
setb %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xe64c8
jmp 0xe658f
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq $0x30, (%rax,%rcx,8)
jb 0xe64e6
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq $0x39, (%rax,%rcx,8)
jbe 0xe6522
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq $0x61, (%rax,%rcx,8)
jb 0xe6504
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq $0x7a, (%rax,%rcx,8)
jbe 0xe6522
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq $0x41, (%rax,%rcx,8)
jb 0xe6550
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq $0x5a, (%rax,%rcx,8)
ja 0xe6550
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
leaq 0x33997(%rip), %rdx # 0x119ed6
movb $0x0, %al
callq 0x10bfb0
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xe657c
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
leaq 0x3396c(%rip), %rdx # 0x119ed9
movb $0x0, %al
callq 0x10bfb0
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xe657e
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xe6494
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| wstr_to_str:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_8]
add rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
mov [rbp+var_38], 0
loc_E6494:
mov rcx, [rbp+var_28]
mov rax, [rbp+var_30]
sub rcx, rax
mov [rbp+var_40], rcx
xor eax, eax
cmp rcx, 0
mov [rbp+var_41], al
jbe short loc_E64BC
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
setb al
mov [rbp+var_41], al
loc_E64BC:
mov al, [rbp+var_41]
test al, 1
jnz short loc_E64C8
jmp loc_E658F
loc_E64C8:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_38]
cmp qword ptr [rax+rcx*8], 30h ; '0'
jb short loc_E64E6
mov rax, [rbp+var_18]
mov rcx, [rbp+var_38]
cmp qword ptr [rax+rcx*8], 39h ; '9'
jbe short loc_E6522
loc_E64E6:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_38]
cmp qword ptr [rax+rcx*8], 61h ; 'a'
jb short loc_E6504
mov rax, [rbp+var_18]
mov rcx, [rbp+var_38]
cmp qword ptr [rax+rcx*8], 7Ah ; 'z'
jbe short loc_E6522
loc_E6504:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_38]
cmp qword ptr [rax+rcx*8], 41h ; 'A'
jb short loc_E6550
mov rax, [rbp+var_18]
mov rcx, [rbp+var_38]
cmp qword ptr [rax+rcx*8], 5Ah ; 'Z'
ja short loc_E6550
loc_E6522:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_40]
mov rax, [rbp+var_18]
mov rcx, [rbp+var_38]
mov rax, [rax+rcx*8]
mov ecx, eax
lea rdx, aC; "%c"
mov al, 0
call my_snprintf
add rax, [rbp+var_30]
mov [rbp+var_30], rax
jmp short loc_E657C
loc_E6550:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_40]
mov rax, [rbp+var_18]
mov rcx, [rbp+var_38]
mov rax, [rax+rcx*8]
mov ecx, eax
lea rdx, aU04x; "\\u%04X"
mov al, 0
call my_snprintf
add rax, [rbp+var_30]
mov [rbp+var_30], rax
loc_E657C:
jmp short $+2
loc_E657E:
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
jmp loc_E6494
loc_E658F:
add rsp, 50h
pop rbp
retn
| bool wstr_to_str(long long a1, long long a2, long long a3, unsigned long long a4, int a5, int a6)
{
bool result; // al
bool v7; // [rsp+Fh] [rbp-41h]
int v8; // [rsp+10h] [rbp-40h]
unsigned long long i; // [rsp+18h] [rbp-38h]
long long v10; // [rsp+20h] [rbp-30h]
long long v11; // [rsp+28h] [rbp-28h]
v11 = a2 + a1;
v10 = a1;
for ( i = 0LL; ; ++i )
{
v8 = v11 - v10;
v7 = 0;
if ( v11 != v10 )
v7 = i < a4;
result = v7;
if ( !v7 )
break;
if ( (*(_QWORD *)(a3 + 8 * i) < 0x30uLL || *(_QWORD *)(a3 + 8 * i) > 0x39uLL)
&& (*(_QWORD *)(a3 + 8 * i) < 0x61uLL || *(_QWORD *)(a3 + 8 * i) > 0x7AuLL)
&& (*(_QWORD *)(a3 + 8 * i) < 0x41uLL || *(_QWORD *)(a3 + 8 * i) > 0x5AuLL) )
{
v10 += my_snprintf(v10, v8, (unsigned int)"\\u%04X", *(_QWORD *)(a3 + 8 * i), a5, a6);
}
else
{
v10 += my_snprintf(v10, v8, (unsigned int)"%c", *(_QWORD *)(a3 + 8 * i), a5, a6);
}
}
return result;
}
| wstr_to_str:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x38],0x0
LAB_001e6494:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x30]
SUB RCX,RAX
MOV qword ptr [RBP + -0x40],RCX
XOR EAX,EAX
CMP RCX,0x0
MOV byte ptr [RBP + -0x41],AL
JBE 0x001e64bc
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
SETC AL
MOV byte ptr [RBP + -0x41],AL
LAB_001e64bc:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x001e64c8
JMP 0x001e658f
LAB_001e64c8:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + RCX*0x8],0x30
JC 0x001e64e6
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + RCX*0x8],0x39
JBE 0x001e6522
LAB_001e64e6:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + RCX*0x8],0x61
JC 0x001e6504
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + RCX*0x8],0x7a
JBE 0x001e6522
LAB_001e6504:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + RCX*0x8],0x41
JC 0x001e6550
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + RCX*0x8],0x5a
JA 0x001e6550
LAB_001e6522:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,EAX
LEA RDX,[0x219ed6]
MOV AL,0x0
CALL 0x0020bfb0
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001e657c
LAB_001e6550:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,EAX
LEA RDX,[0x219ed9]
MOV AL,0x0
CALL 0x0020bfb0
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
LAB_001e657c:
JMP 0x001e657e
LAB_001e657e:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001e6494
LAB_001e658f:
ADD RSP,0x50
POP RBP
RET
|
void wstr_to_str(long param_1,long param_2,long param_3,ulong param_4)
{
long lVar1;
ulong local_40;
long local_38;
local_40 = 0;
for (local_38 = param_1; lVar1 = (param_1 + param_2) - local_38, lVar1 != 0 && local_40 < param_4;
local_38 = lVar1 + local_38) {
if ((((*(ulong *)(param_3 + local_40 * 8) < 0x30) || (0x39 < *(ulong *)(param_3 + local_40 * 8))
) && ((*(ulong *)(param_3 + local_40 * 8) < 0x61 ||
(0x7a < *(ulong *)(param_3 + local_40 * 8))))) &&
((*(ulong *)(param_3 + local_40 * 8) < 0x41 || (0x5a < *(ulong *)(param_3 + local_40 * 8)))))
{
lVar1 = my_snprintf(local_38,lVar1,"\\u%04X",*(ulong *)(param_3 + local_40 * 8) & 0xffffffff);
}
else {
lVar1 = my_snprintf(local_38,lVar1,&DAT_00219ed6,
*(ulong *)(param_3 + local_40 * 8) & 0xffffffff);
}
local_40 = local_40 + 1;
}
return;
}
| |
33,818 | CustomAllocTest_RandomAllocFreePattern_Test::CustomAllocTest_RandomAllocFreePattern_Test() | seiftnesse[P]memoryallocator/tests/test_allocator.cpp | TEST_F(CustomAllocTest, RandomAllocFreePattern) {
std::vector<std::pair<void *, size_t> > active_blocks;
std::mt19937 rng(std::chrono::steady_clock::now().time_since_epoch().count());
// Perform a mix of random allocations and frees
for (int i = 0; i < STRESS_ITERATIONS * 2; i++) {
bool shouldAllocate = active_blocks.empty() ||
(active_blocks.size() < 5000 &&
std::uniform_int_distribution<>(0, 2)(rng) != 0);
if (shouldAllocate) {
// Do an allocation
size_t size = randomSize(TINY_SIZE, LARGE_SIZE);
void *ptr = _malloc(size);
if (ptr) {
fillMemory(ptr, size, randomPattern());
active_blocks.push_back({ptr, size});
}
} else {
// Do a free of a random block
size_t index = std::uniform_int_distribution<size_t>(0, active_blocks.size() - 1)(rng);
_free(active_blocks[index].first);
active_blocks.erase(active_blocks.begin() + index);
}
// Periodically check if we can do some large allocations
if (i % 1000 == 0 && i > 0) {
void *large = _malloc(LARGE_SIZE);
if (large) {
fillMemory(large, LARGE_SIZE, 0xEE);
_free(large);
}
}
}
// Free any remaining blocks
for (auto &[ptr, size]: active_blocks) {
_free(ptr);
}
} | O0 | cpp | CustomAllocTest_RandomAllocFreePattern_Test::CustomAllocTest_RandomAllocFreePattern_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x163d0
movq -0x10(%rbp), %rax
leaq 0x8aab4(%rip), %rcx # 0xa23b8
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN43CustomAllocTest_RandomAllocFreePattern_TestC2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN15CustomAllocTestC2Ev; CustomAllocTest::CustomAllocTest(void)
mov rax, [rbp+var_10]
lea rcx, _ZTV43CustomAllocTest_RandomAllocFreePattern_Test; `vtable for'CustomAllocTest_RandomAllocFreePattern_Test
add rcx, 10h
mov [rax], rcx
add rsp, 10h
pop rbp
retn
| void CustomAllocTest_RandomAllocFreePattern_Test::CustomAllocTest_RandomAllocFreePattern_Test(
CustomAllocTest_RandomAllocFreePattern_Test *this)
{
CustomAllocTest::CustomAllocTest(this);
*(_QWORD *)this = &`vtable for'CustomAllocTest_RandomAllocFreePattern_Test + 2;
}
| CustomAllocTest_RandomAllocFreePattern_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x001163d0
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x1a23b8]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RSP,0x10
POP RBP
RET
|
/* CustomAllocTest_RandomAllocFreePattern_Test::CustomAllocTest_RandomAllocFreePattern_Test() */
void __thiscall
CustomAllocTest_RandomAllocFreePattern_Test::CustomAllocTest_RandomAllocFreePattern_Test
(CustomAllocTest_RandomAllocFreePattern_Test *this)
{
CustomAllocTest::CustomAllocTest((CustomAllocTest *)this);
*(int ***)this = &PTR__CustomAllocTest_RandomAllocFreePattern_Test_001a23c8;
return;
}
| |
33,819 | CustomAllocTest_RandomAllocFreePattern_Test::CustomAllocTest_RandomAllocFreePattern_Test() | seiftnesse[P]memoryallocator/tests/test_allocator.cpp | TEST_F(CustomAllocTest, RandomAllocFreePattern) {
std::vector<std::pair<void *, size_t> > active_blocks;
std::mt19937 rng(std::chrono::steady_clock::now().time_since_epoch().count());
// Perform a mix of random allocations and frees
for (int i = 0; i < STRESS_ITERATIONS * 2; i++) {
bool shouldAllocate = active_blocks.empty() ||
(active_blocks.size() < 5000 &&
std::uniform_int_distribution<>(0, 2)(rng) != 0);
if (shouldAllocate) {
// Do an allocation
size_t size = randomSize(TINY_SIZE, LARGE_SIZE);
void *ptr = _malloc(size);
if (ptr) {
fillMemory(ptr, size, randomPattern());
active_blocks.push_back({ptr, size});
}
} else {
// Do a free of a random block
size_t index = std::uniform_int_distribution<size_t>(0, active_blocks.size() - 1)(rng);
_free(active_blocks[index].first);
active_blocks.erase(active_blocks.begin() + index);
}
// Periodically check if we can do some large allocations
if (i % 1000 == 0 && i > 0) {
void *large = _malloc(LARGE_SIZE);
if (large) {
fillMemory(large, LARGE_SIZE, 0xEE);
_free(large);
}
}
}
// Free any remaining blocks
for (auto &[ptr, size]: active_blocks) {
_free(ptr);
}
} | O1 | cpp | CustomAllocTest_RandomAllocFreePattern_Test::CustomAllocTest_RandomAllocFreePattern_Test():
pushq %rbx
movq %rdi, %rbx
callq 0x242c6
movl $0x10, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x94c0
nop
| _ZN43CustomAllocTest_RandomAllocFreePattern_TestD0Ev:
push rbx
mov rbx, rdi
call _ZN7testing4TestD2Ev; testing::Test::~Test()
mov esi, 10h; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void CustomAllocTest_RandomAllocFreePattern_Test::~CustomAllocTest_RandomAllocFreePattern_Test(
CustomAllocTest_RandomAllocFreePattern_Test *this)
{
testing::Test::~Test(this);
operator delete(this, 0x10uLL);
}
| ~CustomAllocTest_RandomAllocFreePattern_Test:
PUSH RBX
MOV RBX,RDI
CALL 0x001242c6
MOV ESI,0x10
MOV RDI,RBX
POP RBX
JMP 0x001094c0
|
/* CustomAllocTest_RandomAllocFreePattern_Test::~CustomAllocTest_RandomAllocFreePattern_Test() */
void __thiscall
CustomAllocTest_RandomAllocFreePattern_Test::~CustomAllocTest_RandomAllocFreePattern_Test
(CustomAllocTest_RandomAllocFreePattern_Test *this)
{
testing::Test::~Test((Test *)this);
operator_delete(this,0x10);
return;
}
| |
33,820 | ma_hashtbl_free | eloqsql/libmariadb/libmariadb/ma_hashtbl.c | void ma_hashtbl_free(MA_HASHTBL *hash)
{
if (hash->free)
{
uint i,records;
MA_HASHTBL_LINK *data=dynamic_element(&hash->array,0,MA_HASHTBL_LINK*);
for (i=0,records=hash->records ; i < records ; i++)
(*hash->free)(data[i].data);
hash->free=0;
}
ma_delete_dynamic(&hash->array);
hash->records=0;
return;
} | O3 | c | ma_hashtbl_free:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x38(%rdi)
je 0x30843
movl 0x8(%rbx), %r14d
testq %r14, %r14
je 0x3083b
movq 0x18(%rbx), %r15
shlq $0x4, %r14
xorl %r12d, %r12d
movq 0x8(%r15,%r12), %rdi
callq *0x38(%rbx)
addq $0x10, %r12
cmpq %r12, %r14
jne 0x3082a
movq $0x0, 0x38(%rbx)
leaq 0x18(%rbx), %rdi
callq 0x2fc1c
movl $0x0, 0x8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| ma_hashtbl_free:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
cmp qword ptr [rdi+38h], 0
jz short loc_30843
mov r14d, [rbx+8]
test r14, r14
jz short loc_3083B
mov r15, [rbx+18h]
shl r14, 4
xor r12d, r12d
loc_3082A:
mov rdi, [r15+r12+8]
call qword ptr [rbx+38h]
add r12, 10h
cmp r14, r12
jnz short loc_3082A
loc_3083B:
mov qword ptr [rbx+38h], 0
loc_30843:
lea rdi, [rbx+18h]
call ma_delete_dynamic
mov dword ptr [rbx+8], 0
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ma_hashtbl_free(long long a1)
{
long long v1; // r15
long long v2; // r14
long long v3; // r12
long long result; // rax
if ( *(_QWORD *)(a1 + 56) )
{
if ( *(_DWORD *)(a1 + 8) )
{
v1 = *(_QWORD *)(a1 + 24);
v2 = 16LL * *(unsigned int *)(a1 + 8);
v3 = 0LL;
do
{
(*(void ( **)(_QWORD))(a1 + 56))(*(_QWORD *)(v1 + v3 + 8));
v3 += 16LL;
}
while ( v2 != v3 );
}
*(_QWORD *)(a1 + 56) = 0LL;
}
result = ma_delete_dynamic((long long *)(a1 + 24));
*(_DWORD *)(a1 + 8) = 0;
return result;
}
| ma_hashtbl_free:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
CMP qword ptr [RDI + 0x38],0x0
JZ 0x00130843
MOV R14D,dword ptr [RBX + 0x8]
TEST R14,R14
JZ 0x0013083b
MOV R15,qword ptr [RBX + 0x18]
SHL R14,0x4
XOR R12D,R12D
LAB_0013082a:
MOV RDI,qword ptr [R15 + R12*0x1 + 0x8]
CALL qword ptr [RBX + 0x38]
ADD R12,0x10
CMP R14,R12
JNZ 0x0013082a
LAB_0013083b:
MOV qword ptr [RBX + 0x38],0x0
LAB_00130843:
LEA RDI,[RBX + 0x18]
CALL 0x0012fc1c
MOV dword ptr [RBX + 0x8],0x0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void ma_hashtbl_free(long param_1)
{
uint uVar1;
long lVar2;
long lVar3;
if (*(long *)(param_1 + 0x38) != 0) {
uVar1 = *(uint *)(param_1 + 8);
if ((ulong)uVar1 != 0) {
lVar2 = *(long *)(param_1 + 0x18);
lVar3 = 0;
do {
(**(code **)(param_1 + 0x38))(*(int8 *)(lVar2 + 8 + lVar3));
lVar3 = lVar3 + 0x10;
} while ((ulong)uVar1 << 4 != lVar3);
}
*(int8 *)(param_1 + 0x38) = 0;
}
ma_delete_dynamic(param_1 + 0x18);
*(int4 *)(param_1 + 8) = 0;
return;
}
| |
33,821 | translog_buffer_lock | eloqsql/storage/maria/ma_loghandler.c | static void translog_buffer_lock(struct st_translog_buffer *buffer)
{
DBUG_ENTER("translog_buffer_lock");
DBUG_PRINT("enter",
("Lock buffer #%u: %p", buffer->buffer_no,
buffer));
mysql_mutex_lock(&buffer->mutex);
DBUG_VOID_RETURN;
} | O0 | c | translog_buffer_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x2e1de
movq -0x8(%rbp), %rdi
addq $0x100090, %rdi # imm = 0x100090
leaq 0x12341a(%rip), %rsi # 0x15160a
movl $0x6cb, %edx # imm = 0x6CB
callq 0x2dd80
jmp 0x2e1fc
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| translog_buffer_lock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_2E1DE:
mov rdi, [rbp+var_8]
add rdi, 100090h
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 6CBh
call inline_mysql_mutex_lock
jmp short $+2
loc_2E1FC:
add rsp, 10h
pop rbp
retn
| long long translog_buffer_lock(long long a1)
{
return inline_mysql_mutex_lock(
a1 + 1048720,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x6CBu);
}
| translog_buffer_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0012e1de
LAB_0012e1de:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x100090
LEA RSI,[0x25160a]
MOV EDX,0x6cb
CALL 0x0012dd80
JMP 0x0012e1fc
LAB_0012e1fc:
ADD RSP,0x10
POP RBP
RET
|
void translog_buffer_lock(long param_1)
{
inline_mysql_mutex_lock
(param_1 + 0x100090,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x6cb);
return;
}
| |
33,822 | js_regexp_escape | bluesky950520[P]quickjs/quickjs.c | static JSValue js_regexp_escape(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
StringBuffer b_s, *b = &b_s;
JSString *p;
uint32_t c, i;
char s[16];
if (!JS_IsString(argv[0]))
return JS_ThrowTypeError(ctx, "not a string");
p = JS_VALUE_GET_STRING(argv[0]);
string_buffer_init2(ctx, b, 0, p->is_wide_char);
for (i = 0; i < p->len; i++) {
c = p->is_wide_char ? (uint32_t)p->u.str16[i] : (uint32_t)p->u.str8[i];
if (c < 33) {
if (c >= 9 && c <= 13) {
string_buffer_putc8(b, '\\');
string_buffer_putc8(b, "tnvfr"[c - 9]);
} else {
goto hex2;
}
} else if (c < 128) {
if ((c >= '0' && c <= '9')
|| (c >= 'A' && c <= 'Z')
|| (c >= 'a' && c <= 'z')) {
if (i == 0)
goto hex2;
} else if (strchr(",-=<>#&!%:;@~'`\"", c)) {
goto hex2;
} else if (c != '_') {
string_buffer_putc8(b, '\\');
}
string_buffer_putc8(b, c);
} else if (c < 256) {
hex2:
snprintf(s, sizeof(s), "\\x%02x", c);
string_buffer_puts8(b, s);
} else if (is_surrogate(c) || lre_is_white_space(c) || c == 0xFEFF) {
snprintf(s, sizeof(s), "\\u%04x", c);
string_buffer_puts8(b, s);
} else {
string_buffer_putc16(b, c);
}
}
return string_buffer_end(b);
} | O0 | c | js_regexp_escape:
subq $0x98, %rsp
movq %rsi, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq %rdi, 0x70(%rsp)
movl %ecx, 0x6c(%rsp)
movq %r8, 0x60(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x60(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x4f450
cmpl $0x0, %eax
jne 0x84b1a
movq 0x70(%rsp), %rdi
leaq 0x889f2(%rip), %rsi # 0x10d4f0
movb $0x0, %al
callq 0x2c040
movq %rax, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
jmp 0x84d57
movq 0x60(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x70(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
movzbl %al, %ecx
xorl %edx, %edx
callq 0x4c6f0
movl $0x0, 0x28(%rsp)
movl 0x28(%rsp), %eax
movq 0x30(%rsp), %rcx
movq 0x4(%rcx), %rcx
andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x84d3d
movq 0x30(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
movzbl %al, %eax
cmpl $0x0, %eax
je 0x84b9d
movq 0x30(%rsp), %rax
movl 0x28(%rsp), %ecx
movzwl 0x18(%rax,%rcx,2), %eax
movl %eax, 0xc(%rsp)
jmp 0x84baf
movq 0x30(%rsp), %rax
movl 0x28(%rsp), %ecx
movzbl 0x18(%rax,%rcx), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x2c(%rsp)
cmpl $0x21, 0x2c(%rsp)
jae 0x84c07
cmpl $0x9, 0x2c(%rsp)
jb 0x84bfd
cmpl $0xd, 0x2c(%rsp)
ja 0x84bfd
movq 0x38(%rsp), %rdi
movl $0x5c, %esi
callq 0x83280
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %eax
subl $0x9, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x8891c(%rip), %rax # 0x10d50e
movzbl (%rax,%rcx), %esi
callq 0x83280
jmp 0x84c02
jmp 0x84c97
jmp 0x84d2b
cmpl $0x80, 0x2c(%rsp)
jae 0x84c8b
cmpl $0x30, 0x2c(%rsp)
jb 0x84c1f
cmpl $0x39, 0x2c(%rsp)
jbe 0x84c3b
cmpl $0x41, 0x2c(%rsp)
jb 0x84c2d
cmpl $0x5a, 0x2c(%rsp)
jbe 0x84c3b
cmpl $0x61, 0x2c(%rsp)
jb 0x84c46
cmpl $0x7a, 0x2c(%rsp)
ja 0x84c46
cmpl $0x0, 0x28(%rsp)
jne 0x84c44
jmp 0x84c97
jmp 0x84c78
movl 0x2c(%rsp), %esi
leaq 0x888c3(%rip), %rdi # 0x10d514
callq 0xe270
cmpq $0x0, %rax
je 0x84c5e
jmp 0x84c97
cmpl $0x5f, 0x2c(%rsp)
je 0x84c74
movq 0x38(%rsp), %rdi
movl $0x5c, %esi
callq 0x83280
jmp 0x84c76
jmp 0x84c78
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x83280
jmp 0x84d29
cmpl $0x100, 0x2c(%rsp) # imm = 0x100
jae 0x84cc4
jmp 0x84c97
leaq 0x10(%rsp), %rdi
movl 0x2c(%rsp), %ecx
movl $0x10, %esi
leaq 0x88879(%rip), %rdx # 0x10d525
movb $0x0, %al
callq 0xe2d0
movq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x84db0
jmp 0x84d27
movl 0x2c(%rsp), %edi
callq 0x84e00
cmpl $0x0, %eax
jne 0x84cea
movl 0x2c(%rsp), %edi
callq 0x103c90
cmpl $0x0, %eax
jne 0x84cea
cmpl $0xfeff, 0x2c(%rsp) # imm = 0xFEFF
jne 0x84d17
leaq 0x10(%rsp), %rdi
movl 0x2c(%rsp), %ecx
movl $0x10, %esi
leaq 0x8882d(%rip), %rdx # 0x10d52c
movb $0x0, %al
callq 0xe2d0
movq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x84db0
jmp 0x84d25
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x7d3d0
jmp 0x84d27
jmp 0x84d29
jmp 0x84d2b
jmp 0x84d2d
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x84b54
movq 0x38(%rsp), %rdi
callq 0x4c840
movq %rax, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rdx
addq $0x98, %rsp
retq
nop
| js_regexp_escape:
sub rsp, 98h
mov [rsp+98h+var_20], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_28], rdi
mov [rsp+98h+var_2C], ecx
mov [rsp+98h+var_38], r8
lea rax, [rsp+98h+var_58]
mov [rsp+98h+var_60], rax
mov rax, [rsp+98h+var_38]
mov rdi, [rax]
mov rsi, [rax+8]
call JS_IsString_0
cmp eax, 0
jnz short loc_84B1A
mov rdi, [rsp+98h+var_28]
lea rsi, aNotAString; "not a string"
mov al, 0
call JS_ThrowTypeError
mov [rsp+98h+var_10], rax
mov [rsp+98h+var_8], rdx
jmp loc_84D57
loc_84B1A:
mov rax, [rsp+98h+var_38]
mov rax, [rax]
mov [rsp+98h+var_68], rax
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_60]
mov rax, [rsp+98h+var_68]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
movzx ecx, al
xor edx, edx
call string_buffer_init2
mov [rsp+98h+var_70], 0
loc_84B54:
mov eax, [rsp+98h+var_70]
mov rcx, [rsp+98h+var_68]
mov rcx, [rcx+4]
and rcx, 7FFFFFFFh
cmp eax, ecx
jnb loc_84D3D
mov rax, [rsp+98h+var_68]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
movzx eax, al
cmp eax, 0
jz short loc_84B9D
mov rax, [rsp+98h+var_68]
mov ecx, [rsp+98h+var_70]
movzx eax, word ptr [rax+rcx*2+18h]
mov [rsp+98h+var_8C], eax
jmp short loc_84BAF
loc_84B9D:
mov rax, [rsp+98h+var_68]
mov ecx, [rsp+98h+var_70]
movzx eax, byte ptr [rax+rcx+18h]
mov [rsp+98h+var_8C], eax
loc_84BAF:
mov eax, [rsp+98h+var_8C]
mov [rsp+98h+var_6C], eax
cmp [rsp+98h+var_6C], 21h ; '!'
jnb short loc_84C07
cmp [rsp+98h+var_6C], 9
jb short loc_84BFD
cmp [rsp+98h+var_6C], 0Dh
ja short loc_84BFD
mov rdi, [rsp+98h+var_60]
mov esi, 5Ch ; '\'
call string_buffer_putc8
mov rdi, [rsp+98h+var_60]
mov eax, [rsp+98h+var_6C]
sub eax, 9
mov eax, eax
mov ecx, eax
lea rax, aTnvfr; "tnvfr"
movzx esi, byte ptr [rax+rcx]
call string_buffer_putc8
jmp short loc_84C02
loc_84BFD:
jmp loc_84C97
loc_84C02:
jmp loc_84D2B
loc_84C07:
cmp [rsp+98h+var_6C], 80h
jnb short loc_84C8B
cmp [rsp+98h+var_6C], 30h ; '0'
jb short loc_84C1F
cmp [rsp+98h+var_6C], 39h ; '9'
jbe short loc_84C3B
loc_84C1F:
cmp [rsp+98h+var_6C], 41h ; 'A'
jb short loc_84C2D
cmp [rsp+98h+var_6C], 5Ah ; 'Z'
jbe short loc_84C3B
loc_84C2D:
cmp [rsp+98h+var_6C], 61h ; 'a'
jb short loc_84C46
cmp [rsp+98h+var_6C], 7Ah ; 'z'
ja short loc_84C46
loc_84C3B:
cmp [rsp+98h+var_70], 0
jnz short loc_84C44
jmp short loc_84C97
loc_84C44:
jmp short loc_84C78
loc_84C46:
mov esi, [rsp+98h+var_6C]
lea rdi, asc_10D514; ",-=<>#&!%:;@~'`\""
call _strchr
cmp rax, 0
jz short loc_84C5E
jmp short loc_84C97
loc_84C5E:
cmp [rsp+98h+var_6C], 5Fh ; '_'
jz short loc_84C74
mov rdi, [rsp+98h+var_60]
mov esi, 5Ch ; '\'
call string_buffer_putc8
loc_84C74:
jmp short $+2
loc_84C76:
jmp short $+2
loc_84C78:
mov rdi, [rsp+98h+var_60]
mov esi, [rsp+98h+var_6C]
call string_buffer_putc8
jmp loc_84D29
loc_84C8B:
cmp [rsp+98h+var_6C], 100h
jnb short loc_84CC4
jmp short $+2
loc_84C97:
lea rdi, [rsp+98h+var_88]
mov ecx, [rsp+98h+var_6C]
mov esi, 10h
lea rdx, aX02x; "\\x%02x"
mov al, 0
call _snprintf
mov rdi, [rsp+98h+var_60]
lea rsi, [rsp+98h+var_88]
call string_buffer_puts8
jmp short loc_84D27
loc_84CC4:
mov edi, [rsp+98h+var_6C]
call is_surrogate
cmp eax, 0
jnz short loc_84CEA
mov edi, [rsp+98h+var_6C]
call lre_is_white_space
cmp eax, 0
jnz short loc_84CEA
cmp [rsp+98h+var_6C], 0FEFFh
jnz short loc_84D17
loc_84CEA:
lea rdi, [rsp+98h+var_88]
mov ecx, [rsp+98h+var_6C]
mov esi, 10h
lea rdx, aU04x; "\\u%04x"
mov al, 0
call _snprintf
mov rdi, [rsp+98h+var_60]
lea rsi, [rsp+98h+var_88]
call string_buffer_puts8
jmp short loc_84D25
loc_84D17:
mov rdi, [rsp+98h+var_60]
mov esi, [rsp+98h+var_6C]
call string_buffer_putc16
loc_84D25:
jmp short $+2
loc_84D27:
jmp short $+2
loc_84D29:
jmp short $+2
loc_84D2B:
jmp short $+2
loc_84D2D:
mov eax, [rsp+98h+var_70]
add eax, 1
mov [rsp+98h+var_70], eax
jmp loc_84B54
loc_84D3D:
mov rdi, [rsp+98h+var_60]
call string_buffer_end
mov [rsp+98h+var_10], rax
mov [rsp+98h+var_8], rdx
loc_84D57:
mov rax, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_8]
add rsp, 98h
retn
| long long js_regexp_escape(
long long a1,
long long a2,
long long a3,
int a4,
long long *a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v13; // rdx
long long v14; // rcx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
long long v19; // rdx
long long v20; // rdx
long long v21; // r8
long long v22; // r9
__m128 v23; // xmm4
__m128 v24; // xmm5
long long v25; // rcx
long long v26; // rdx
long long v27; // r8
long long v28; // r9
__m128 v29; // xmm4
__m128 v30; // xmm5
long long v31; // rdx
char v33; // [rsp+0h] [rbp-98h]
unsigned int v34; // [rsp+Ch] [rbp-8Ch]
_BYTE v35[24]; // [rsp+10h] [rbp-88h] BYREF
unsigned int i; // [rsp+28h] [rbp-70h]
unsigned int v37; // [rsp+2Ch] [rbp-6Ch]
long long v38; // [rsp+30h] [rbp-68h]
char *v39; // [rsp+38h] [rbp-60h]
char v40; // [rsp+40h] [rbp-58h] BYREF
long long *v41; // [rsp+60h] [rbp-38h]
int v42; // [rsp+6Ch] [rbp-2Ch]
long long v43; // [rsp+70h] [rbp-28h]
long long v44; // [rsp+78h] [rbp-20h]
long long v45; // [rsp+80h] [rbp-18h]
long long v46; // [rsp+88h] [rbp-10h]
long long v47; // [rsp+90h] [rbp-8h]
v44 = a2;
v45 = a3;
v43 = a1;
v42 = a4;
v41 = a5;
v39 = &v40;
if ( JS_IsString_0(*a5, a5[1]) )
{
v38 = *v41;
string_buffer_init2(v43, (long long)v39, 0, (*(_QWORD *)(v38 + 4) & 0x80000000LL) != 0);
for ( i = 0; ; ++i )
{
if ( i >= (*(_DWORD *)(v38 + 4) & 0x7FFFFFFFu) )
{
v46 = string_buffer_end((long long)v39);
v47 = v31;
return v46;
}
v25 = i;
v34 = (*(_QWORD *)(v38 + 4) & 0x80000000LL) != 0
? *(unsigned __int16 *)(v38 + 2LL * i + 24)
: *(unsigned __int8 *)(v38 + i + 24);
v37 = v34;
if ( v34 < 0x21 )
break;
if ( v37 < 0x80 )
{
if ( (v37 < 0x30 || v37 > 0x39) && (v37 < 0x41 || v37 > 0x5A) && (v37 < 0x61 || v37 > 0x7A) )
{
if ( !strchr(",-=<>#&!%:;@~'`\"", v37) )
{
if ( v37 != 95 )
string_buffer_putc8((long long)v39, 0x5Cu, a6, a7, a8, a9, v23, v24, a12, a13, v20, v25, v21, v22);
LABEL_25:
string_buffer_putc8((long long)v39, v37, a6, a7, a8, a9, v23, v24, a12, a13, v20, v25, v21, v22);
continue;
}
}
else if ( i )
{
goto LABEL_25;
}
goto LABEL_27;
}
if ( v37 < 0x100 )
goto LABEL_27;
if ( (unsigned int)is_surrogate(v37) || (unsigned int)lre_is_white_space(v37) || v37 == 65279 )
{
snprintf(v35, 16LL, "\\u%04x", v37);
string_buffer_puts8(v39, v35);
}
else
{
string_buffer_putc16((long long)v39, v37);
}
LABEL_33:
;
}
if ( v37 >= 9 && v37 <= 0xD )
{
string_buffer_putc8((long long)v39, 0x5Cu, a6, a7, a8, a9, v23, v24, a12, a13, v20, i, v21, v22);
string_buffer_putc8(
(long long)v39,
(unsigned __int8)aTnvfr[v37 - 9],
a6,
a7,
a8,
a9,
v29,
v30,
a12,
a13,
v26,
v37 - 9,
v27,
v28);
goto LABEL_33;
}
LABEL_27:
snprintf(v35, 16LL, "\\x%02x", v37);
string_buffer_puts8(v39, v35);
goto LABEL_33;
}
v46 = JS_ThrowTypeError(v43, (long long)"not a string", v13, v14, v15, v16, a6, a7, a8, a9, v17, v18, a12, a13, v33);
v47 = v19;
return v46;
}
| js_regexp_escape:
SUB RSP,0x98
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x70],RDI
MOV dword ptr [RSP + 0x6c],ECX
MOV qword ptr [RSP + 0x60],R8
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x0014f450
CMP EAX,0x0
JNZ 0x00184b1a
MOV RDI,qword ptr [RSP + 0x70]
LEA RSI,[0x20d4f0]
MOV AL,0x0
CALL 0x0012c040
MOV qword ptr [RSP + 0x88],RAX
MOV qword ptr [RSP + 0x90],RDX
JMP 0x00184d57
LAB_00184b1a:
MOV RAX,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
MOVZX ECX,AL
XOR EDX,EDX
CALL 0x0014c6f0
MOV dword ptr [RSP + 0x28],0x0
LAB_00184b54:
MOV EAX,dword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RCX + 0x4]
AND RCX,0x7fffffff
CMP EAX,ECX
JNC 0x00184d3d
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00184b9d
MOV RAX,qword ptr [RSP + 0x30]
MOV ECX,dword ptr [RSP + 0x28]
MOVZX EAX,word ptr [RAX + RCX*0x2 + 0x18]
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00184baf
LAB_00184b9d:
MOV RAX,qword ptr [RSP + 0x30]
MOV ECX,dword ptr [RSP + 0x28]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x18]
MOV dword ptr [RSP + 0xc],EAX
LAB_00184baf:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x2c],EAX
CMP dword ptr [RSP + 0x2c],0x21
JNC 0x00184c07
CMP dword ptr [RSP + 0x2c],0x9
JC 0x00184bfd
CMP dword ptr [RSP + 0x2c],0xd
JA 0x00184bfd
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,0x5c
CALL 0x00183280
MOV RDI,qword ptr [RSP + 0x38]
MOV EAX,dword ptr [RSP + 0x2c]
SUB EAX,0x9
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x20d50e]
MOVZX ESI,byte ptr [RAX + RCX*0x1]
CALL 0x00183280
JMP 0x00184c02
LAB_00184bfd:
JMP 0x00184c97
LAB_00184c02:
JMP 0x00184d2b
LAB_00184c07:
CMP dword ptr [RSP + 0x2c],0x80
JNC 0x00184c8b
CMP dword ptr [RSP + 0x2c],0x30
JC 0x00184c1f
CMP dword ptr [RSP + 0x2c],0x39
JBE 0x00184c3b
LAB_00184c1f:
CMP dword ptr [RSP + 0x2c],0x41
JC 0x00184c2d
CMP dword ptr [RSP + 0x2c],0x5a
JBE 0x00184c3b
LAB_00184c2d:
CMP dword ptr [RSP + 0x2c],0x61
JC 0x00184c46
CMP dword ptr [RSP + 0x2c],0x7a
JA 0x00184c46
LAB_00184c3b:
CMP dword ptr [RSP + 0x28],0x0
JNZ 0x00184c44
JMP 0x00184c97
LAB_00184c44:
JMP 0x00184c78
LAB_00184c46:
MOV ESI,dword ptr [RSP + 0x2c]
LEA RDI,[0x20d514]
CALL 0x0010e270
CMP RAX,0x0
JZ 0x00184c5e
JMP 0x00184c97
LAB_00184c5e:
CMP dword ptr [RSP + 0x2c],0x5f
JZ 0x00184c74
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,0x5c
CALL 0x00183280
LAB_00184c74:
JMP 0x00184c76
LAB_00184c76:
JMP 0x00184c78
LAB_00184c78:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x2c]
CALL 0x00183280
JMP 0x00184d29
LAB_00184c8b:
CMP dword ptr [RSP + 0x2c],0x100
JNC 0x00184cc4
JMP 0x00184c97
LAB_00184c97:
LEA RDI,[RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x2c]
MOV ESI,0x10
LEA RDX,[0x20d525]
MOV AL,0x0
CALL 0x0010e2d0
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x10]
CALL 0x00184db0
JMP 0x00184d27
LAB_00184cc4:
MOV EDI,dword ptr [RSP + 0x2c]
CALL 0x00184e00
CMP EAX,0x0
JNZ 0x00184cea
MOV EDI,dword ptr [RSP + 0x2c]
CALL 0x00203c90
CMP EAX,0x0
JNZ 0x00184cea
CMP dword ptr [RSP + 0x2c],0xfeff
JNZ 0x00184d17
LAB_00184cea:
LEA RDI,[RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x2c]
MOV ESI,0x10
LEA RDX,[0x20d52c]
MOV AL,0x0
CALL 0x0010e2d0
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x10]
CALL 0x00184db0
JMP 0x00184d25
LAB_00184d17:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x2c]
CALL 0x0017d3d0
LAB_00184d25:
JMP 0x00184d27
LAB_00184d27:
JMP 0x00184d29
LAB_00184d29:
JMP 0x00184d2b
LAB_00184d2b:
JMP 0x00184d2d
LAB_00184d2d:
MOV EAX,dword ptr [RSP + 0x28]
ADD EAX,0x1
MOV dword ptr [RSP + 0x28],EAX
JMP 0x00184b54
LAB_00184d3d:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0014c840
MOV qword ptr [RSP + 0x88],RAX
MOV qword ptr [RSP + 0x90],RDX
LAB_00184d57:
MOV RAX,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
int1 [16]
js_regexp_escape(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
long *param_5)
{
int iVar1;
char *pcVar2;
int1 auVar3 [16];
uint local_8c;
char local_88 [24];
uint local_70;
uint local_6c;
long local_68;
int1 *local_60;
int1 local_58 [32];
long *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
local_60 = local_58;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
iVar1 = JS_IsString(*param_5,param_5[1]);
if (iVar1 == 0) {
auVar3 = JS_ThrowTypeError(local_28,"not a string");
}
else {
local_68 = *local_38;
string_buffer_init2(local_28,local_60,0,(byte)(*(ulong *)(local_68 + 4) >> 0x1f) & 1);
for (local_70 = 0; local_70 < ((uint)*(int8 *)(local_68 + 4) & 0x7fffffff);
local_70 = local_70 + 1) {
if ((*(ulong *)(local_68 + 4) >> 0x1f & 1) == 0) {
local_8c = (uint)*(byte *)(local_68 + 0x18 + (ulong)local_70);
}
else {
local_8c = (uint)*(ushort *)(local_68 + 0x18 + (ulong)local_70 * 2);
}
local_6c = local_8c;
if (local_8c < 0x21) {
if ((local_8c < 9) || (0xd < local_8c)) goto LAB_00184c97;
string_buffer_putc8(local_60,0x5c);
string_buffer_putc8(local_60,"tnvfr"[local_6c - 9]);
}
else if (local_8c < 0x80) {
if ((((local_8c < 0x30) || (0x39 < local_8c)) && ((local_8c < 0x41 || (0x5a < local_8c))))
&& ((local_8c < 0x61 || (0x7a < local_8c)))) {
pcVar2 = strchr(",-=<>#&!%:;@~\'`\"",local_8c);
if (pcVar2 == (char *)0x0) {
if (local_6c != 0x5f) {
string_buffer_putc8(local_60,0x5c);
}
goto LAB_00184c78;
}
}
else if (local_70 != 0) {
LAB_00184c78:
string_buffer_putc8(local_60,local_6c);
goto LAB_00184d2b;
}
LAB_00184c97:
snprintf(local_88,0x10,"\\x%02x",(ulong)local_6c);
string_buffer_puts8(local_60,local_88);
}
else {
if (local_8c < 0x100) goto LAB_00184c97;
iVar1 = is_surrogate(local_8c);
if (((iVar1 == 0) && (iVar1 = lre_is_white_space(local_6c), iVar1 == 0)) &&
(local_6c != 0xfeff)) {
string_buffer_putc16(local_60,local_6c);
}
else {
snprintf(local_88,0x10,"\\u%04x",(ulong)local_6c);
string_buffer_puts8(local_60,local_88);
}
}
LAB_00184d2b:
}
auVar3 = string_buffer_end(local_60);
}
return auVar3;
}
| |
33,823 | js_regexp_escape | bluesky950520[P]quickjs/quickjs.c | static JSValue js_regexp_escape(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
StringBuffer b_s, *b = &b_s;
JSString *p;
uint32_t c, i;
char s[16];
if (!JS_IsString(argv[0]))
return JS_ThrowTypeError(ctx, "not a string");
p = JS_VALUE_GET_STRING(argv[0]);
string_buffer_init2(ctx, b, 0, p->is_wide_char);
for (i = 0; i < p->len; i++) {
c = p->is_wide_char ? (uint32_t)p->u.str16[i] : (uint32_t)p->u.str8[i];
if (c < 33) {
if (c >= 9 && c <= 13) {
string_buffer_putc8(b, '\\');
string_buffer_putc8(b, "tnvfr"[c - 9]);
} else {
goto hex2;
}
} else if (c < 128) {
if ((c >= '0' && c <= '9')
|| (c >= 'A' && c <= 'Z')
|| (c >= 'a' && c <= 'z')) {
if (i == 0)
goto hex2;
} else if (strchr(",-=<>#&!%:;@~'`\"", c)) {
goto hex2;
} else if (c != '_') {
string_buffer_putc8(b, '\\');
}
string_buffer_putc8(b, c);
} else if (c < 256) {
hex2:
snprintf(s, sizeof(s), "\\x%02x", c);
string_buffer_puts8(b, s);
} else if (is_surrogate(c) || lre_is_white_space(c) || c == 0xFEFF) {
snprintf(s, sizeof(s), "\\u%04x", c);
string_buffer_puts8(b, s);
} else {
string_buffer_putc16(b, c);
}
}
return string_buffer_end(b);
} | O1 | c | js_regexp_escape:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpl $-0x7, 0x8(%r8)
jne 0x4bc48
movq (%r8), %r13
movl 0x4(%r13), %edx
shrl $0x1f, %edx
movq %rdi, (%rsp)
movq $0x0, 0x10(%rsp)
movl %edx, 0x18(%rsp)
movl $0x0, 0x1c(%rsp)
xorl %esi, %esi
callq 0x1ff5f
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x4bc6f
movq 0x4(%r13), %rax
testl $0x7fffffff, %eax # imm = 0x7FFFFFFF
je 0x4bc3b
movq %rsp, %rbx
leaq 0x20(%rsp), %r15
xorl %r12d, %r12d
testl %eax, %eax
js 0x4bb0b
movzbl 0x18(%r13,%r12), %ebp
jmp 0x4bb11
movzwl 0x18(%r13,%r12,2), %ebp
cmpl $0x20, %ebp
ja 0x4bb47
leal -0x9(%rbp), %r14d
cmpl $0x4, %r14d
ja 0x4bbb9
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x4ac4d
movl %r14d, %eax
leaq 0x529d7(%rip), %rcx # 0x9e512
movzbl (%rax,%rcx), %esi
movq %rbx, %rdi
jmp 0x4bc1e
cmpl $0x7f, %ebp
ja 0x4bb7a
leal -0x30(%rbp), %eax
cmpl $0xa, %eax
setb %al
leal -0x41(%rbp), %ecx
cmpl $0x1a, %ecx
setb %cl
orb %al, %cl
leal -0x61(%rbp), %eax
cmpl $0x1a, %eax
setb %al
orb %cl, %al
cmpb $0x1, %al
jne 0x4bba1
testq %r12, %r12
jne 0x4bc19
jmp 0x4bbb9
cmpl $0xff, %ebp
jbe 0x4bbb9
movl %ebp, %eax
andl $0xf800, %eax # imm = 0xF800
cmpl $0xd800, %eax # imm = 0xD800
jne 0x4bbe8
movl $0x10, %esi
movq %r15, %rdi
leaq 0x52991(%rip), %rdx # 0x9e530
jmp 0x4bbc8
movl $0x11, %edx
leaq 0x5296b(%rip), %rdi # 0x9e518
movl %ebp, %esi
callq 0xe430
testq %rax, %rax
je 0x4bc07
movl $0x10, %esi
movq %r15, %rdi
leaq 0x52961(%rip), %rdx # 0x9e529
movl %ebp, %ecx
xorl %eax, %eax
callq 0xe2d0
movq %r15, %rdi
callq 0xe240
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x41424
jmp 0x4bc23
movl %ebp, %edi
callq 0x97d8f
cmpl $0xfeff, %ebp # imm = 0xFEFF
je 0x4bb90
testl %eax, %eax
jne 0x4bb90
movq %rbx, %rdi
movl %ebp, %esi
callq 0x46bcb
jmp 0x4bc23
cmpl $0x5f, %ebp
je 0x4bc19
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x4ac4d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4ac4d
incq %r12
movq 0x4(%r13), %rax
movl %eax, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
cmpq %rcx, %r12
jb 0x4baff
movq %rsp, %rdi
callq 0x32830
movq %rax, %rbx
jmp 0x4bc5d
leaq 0x528a5(%rip), %rsi # 0x9e4f4
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x21953
movl $0x6, %edx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x14(%rsp)
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
jmp 0x4bae5
| js_regexp_escape:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
cmp dword ptr [r8+8], 0FFFFFFF9h
jnz loc_4BC48
mov r13, [r8]
mov edx, [r13+4]
shr edx, 1Fh
mov [rsp+68h+var_68], rdi
mov [rsp+68h+var_58], 0
mov [rsp+68h+var_50], edx
mov [rsp+68h+var_4C], 0
xor esi, esi
call js_alloc_string
mov [rsp+68h+var_60], rax
test rax, rax
jz loc_4BC6F
loc_4BAE5:
mov rax, [r13+4]
test eax, 7FFFFFFFh
jz loc_4BC3B
mov rbx, rsp
lea r15, [rsp+68h+var_48]
xor r12d, r12d
loc_4BAFF:
test eax, eax
js short loc_4BB0B
movzx ebp, byte ptr [r13+r12+18h]
jmp short loc_4BB11
loc_4BB0B:
movzx ebp, word ptr [r13+r12*2+18h]
loc_4BB11:
cmp ebp, 20h ; ' '
ja short loc_4BB47
lea r14d, [rbp-9]
cmp r14d, 4
ja loc_4BBB9
mov rdi, rbx
mov esi, 5Ch ; '\'
call string_buffer_putc8
mov eax, r14d
lea rcx, aTnvfr; "tnvfr"
movzx esi, byte ptr [rax+rcx]
mov rdi, rbx
jmp loc_4BC1E
loc_4BB47:
cmp ebp, 7Fh
ja short loc_4BB7A
lea eax, [rbp-30h]
cmp eax, 0Ah
setb al
lea ecx, [rbp-41h]
cmp ecx, 1Ah
setb cl
or cl, al
lea eax, [rbp-61h]
cmp eax, 1Ah
setb al
or al, cl
cmp al, 1
jnz short loc_4BBA1
test r12, r12
jnz loc_4BC19
jmp short loc_4BBB9
loc_4BB7A:
cmp ebp, 0FFh
jbe short loc_4BBB9
mov eax, ebp
and eax, 0F800h
cmp eax, 0D800h
jnz short loc_4BBE8
loc_4BB90:
mov esi, 10h
mov rdi, r15
lea rdx, aU04x; "\\u%04x"
jmp short loc_4BBC8
loc_4BBA1:
mov edx, 11h
lea rdi, asc_9E518; ",-=<>#&!%:;@~'`\""
mov esi, ebp
call _memchr
test rax, rax
jz short loc_4BC07
loc_4BBB9:
mov esi, 10h
mov rdi, r15
lea rdx, aX02x; "\\x%02x"
loc_4BBC8:
mov ecx, ebp
xor eax, eax
call _snprintf
mov rdi, r15
call _strlen
mov rdi, rbx
mov rsi, r15
mov edx, eax
call string_buffer_write8
jmp short loc_4BC23
loc_4BBE8:
mov edi, ebp
call lre_is_white_space
cmp ebp, 0FEFFh
jz short loc_4BB90
test eax, eax
jnz short loc_4BB90
mov rdi, rbx
mov esi, ebp
call string_buffer_putc16
jmp short loc_4BC23
loc_4BC07:
cmp ebp, 5Fh ; '_'
jz short loc_4BC19
mov rdi, rbx
mov esi, 5Ch ; '\'
call string_buffer_putc8
loc_4BC19:
mov rdi, rbx
mov esi, ebp
loc_4BC1E:
call string_buffer_putc8
loc_4BC23:
inc r12
mov rax, [r13+4]
mov ecx, eax
and ecx, 7FFFFFFFh
cmp r12, rcx
jb loc_4BAFF
loc_4BC3B:
mov rdi, rsp
call string_buffer_end
mov rbx, rax
jmp short loc_4BC5D
loc_4BC48:
lea rsi, aNotAString; "not a string"
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
mov edx, 6
loc_4BC5D:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4BC6F:
mov dword ptr [rsp+68h+var_58+4], 0
mov [rsp+68h+var_4C], 0FFFFFFFFh
jmp loc_4BAE5
| _DWORD * js_regexp_escape(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
_DWORD *a13,
long long a14)
{
long long v14; // r13
unsigned int v15; // edx
unsigned long long v16; // rsi
long long v17; // rdx
unsigned long long v18; // rcx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
long long v23; // rax
unsigned long long v24; // r12
unsigned int v25; // ebp
long long v26; // rcx
int v27; // eax
int is_white_space; // eax
long long v29; // rbx
long long v31; // [rsp+0h] [rbp-68h] BYREF
long long v32; // [rsp+8h] [rbp-60h]
long long v33; // [rsp+10h] [rbp-58h]
long long v34; // [rsp+18h] [rbp-50h]
_BYTE v35[72]; // [rsp+20h] [rbp-48h] BYREF
if ( a13[2] == -7 )
{
v14 = *(_QWORD *)a13;
v15 = *(_DWORD *)(*(_QWORD *)a13 + 4LL) >> 31;
v31 = a1;
v33 = 0LL;
v34 = v15;
v16 = 0LL;
v32 = js_alloc_string(a1, 0LL, v15);
if ( !v32 )
{
HIDWORD(v33) = 0;
HIDWORD(v34) = -1;
}
v23 = *(_QWORD *)(v14 + 4);
if ( (v23 & 0x7FFFFFFF) != 0 )
{
v24 = 0LL;
while ( 1 )
{
v25 = (int)v23 < 0 ? *(unsigned __int16 *)(v14 + 2 * v24 + 24) : *(unsigned __int8 *)(v14 + v24 + 24);
if ( v25 <= 0x20 )
break;
if ( v25 <= 0x7F )
{
v26 = v25 - 65;
LOBYTE(v26) = v25 - 48 < 0xA || (unsigned int)v26 < 0x1A;
if ( ((unsigned __int8)v26 | (v25 - 97 < 0x1A)) == 1 )
{
if ( v24 )
goto LABEL_27;
}
else if ( !memchr(",-=<>#&!%:;@~'`\"", v25, 17LL) )
{
if ( v25 != 95 )
string_buffer_putc8((long long)&v31, 0x5Cu, a2, a3, a4, a5, v21, v22, a8, a9, v17, v26, v19, v20);
LABEL_27:
v16 = v25;
LABEL_28:
string_buffer_putc8((long long)&v31, v16, a2, a3, a4, a5, v21, v22, a8, a9, v17, v26, v19, v20);
goto LABEL_29;
}
goto LABEL_20;
}
if ( v25 <= 0xFF )
goto LABEL_20;
if ( (v25 & 0xF800) != 0xD800 )
{
is_white_space = lre_is_white_space(v25, v16, v17, v18, v19, v20, v31, v32, v33, v34);
if ( v25 != 65279 && !is_white_space )
{
v16 = v25;
string_buffer_putc16((long long)&v31, v25);
goto LABEL_29;
}
}
snprintf(v35, 16LL, "\\u%04x", v25);
LABEL_21:
v27 = strlen(v35);
v16 = (unsigned long long)v35;
string_buffer_write8((long long)&v31, (long long)v35, v27);
LABEL_29:
++v24;
v23 = *(_QWORD *)(v14 + 4);
v18 = v23 & 0x7FFFFFFF;
if ( v24 >= v18 )
return string_buffer_end((long long)&v31);
}
if ( v25 - 9 <= 4 )
{
string_buffer_putc8((long long)&v31, 0x5Cu, a2, a3, a4, a5, v21, v22, a8, a9, v17, v18, v19, v20);
v26 = (long long)"tnvfr";
v16 = (unsigned __int8)aTnvfr[v25 - 9];
goto LABEL_28;
}
LABEL_20:
snprintf(v35, 16LL, "\\x%02x", v25);
goto LABEL_21;
}
return string_buffer_end((long long)&v31);
}
else
{
v29 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a string", a11, a12, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, v31);
}
return (_DWORD *)v29;
}
| js_regexp_escape:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
CMP dword ptr [R8 + 0x8],-0x7
JNZ 0x0014bc48
MOV R13,qword ptr [R8]
MOV EDX,dword ptr [R13 + 0x4]
SHR EDX,0x1f
MOV qword ptr [RSP],RDI
MOV qword ptr [RSP + 0x10],0x0
MOV dword ptr [RSP + 0x18],EDX
MOV dword ptr [RSP + 0x1c],0x0
XOR ESI,ESI
CALL 0x0011ff5f
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x0014bc6f
LAB_0014bae5:
MOV RAX,qword ptr [R13 + 0x4]
TEST EAX,0x7fffffff
JZ 0x0014bc3b
MOV RBX,RSP
LEA R15,[RSP + 0x20]
XOR R12D,R12D
LAB_0014baff:
TEST EAX,EAX
JS 0x0014bb0b
MOVZX EBP,byte ptr [R13 + R12*0x1 + 0x18]
JMP 0x0014bb11
LAB_0014bb0b:
MOVZX EBP,word ptr [R13 + R12*0x2 + 0x18]
LAB_0014bb11:
CMP EBP,0x20
JA 0x0014bb47
LEA R14D,[RBP + -0x9]
CMP R14D,0x4
JA 0x0014bbb9
MOV RDI,RBX
MOV ESI,0x5c
CALL 0x0014ac4d
MOV EAX,R14D
LEA RCX,[0x19e512]
MOVZX ESI,byte ptr [RAX + RCX*0x1]
MOV RDI,RBX
JMP 0x0014bc1e
LAB_0014bb47:
CMP EBP,0x7f
JA 0x0014bb7a
LEA EAX,[RBP + -0x30]
CMP EAX,0xa
SETC AL
LEA ECX,[RBP + -0x41]
CMP ECX,0x1a
SETC CL
OR CL,AL
LEA EAX,[RBP + -0x61]
CMP EAX,0x1a
SETC AL
OR AL,CL
CMP AL,0x1
JNZ 0x0014bba1
TEST R12,R12
JNZ 0x0014bc19
JMP 0x0014bbb9
LAB_0014bb7a:
CMP EBP,0xff
JBE 0x0014bbb9
MOV EAX,EBP
AND EAX,0xf800
CMP EAX,0xd800
JNZ 0x0014bbe8
LAB_0014bb90:
MOV ESI,0x10
MOV RDI,R15
LEA RDX,[0x19e530]
JMP 0x0014bbc8
LAB_0014bba1:
MOV EDX,0x11
LEA RDI,[0x19e518]
MOV ESI,EBP
CALL 0x0010e430
TEST RAX,RAX
JZ 0x0014bc07
LAB_0014bbb9:
MOV ESI,0x10
MOV RDI,R15
LEA RDX,[0x19e529]
LAB_0014bbc8:
MOV ECX,EBP
XOR EAX,EAX
CALL 0x0010e2d0
MOV RDI,R15
CALL 0x0010e240
MOV RDI,RBX
MOV RSI,R15
MOV EDX,EAX
CALL 0x00141424
JMP 0x0014bc23
LAB_0014bbe8:
MOV EDI,EBP
CALL 0x00197d8f
CMP EBP,0xfeff
JZ 0x0014bb90
TEST EAX,EAX
JNZ 0x0014bb90
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00146bcb
JMP 0x0014bc23
LAB_0014bc07:
CMP EBP,0x5f
JZ 0x0014bc19
MOV RDI,RBX
MOV ESI,0x5c
CALL 0x0014ac4d
LAB_0014bc19:
MOV RDI,RBX
MOV ESI,EBP
LAB_0014bc1e:
CALL 0x0014ac4d
LAB_0014bc23:
INC R12
MOV RAX,qword ptr [R13 + 0x4]
MOV ECX,EAX
AND ECX,0x7fffffff
CMP R12,RCX
JC 0x0014baff
LAB_0014bc3b:
MOV RDI,RSP
CALL 0x00132830
MOV RBX,RAX
JMP 0x0014bc5d
LAB_0014bc48:
LEA RSI,[0x19e4f4]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x00121953
MOV EDX,0x6
LAB_0014bc5d:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014bc6f:
MOV dword ptr [RSP + 0x14],0x0
MOV dword ptr [RSP + 0x1c],0xffffffff
JMP 0x0014bae5
|
int8 js_regexp_escape(int8 param_1)
{
long lVar1;
int iVar2;
ulong uVar3;
void *pvVar4;
size_t sVar5;
int8 uVar6;
char *__format;
uint __c;
long *in_R8;
ulong uVar7;
int8 local_68;
long local_60;
ulong local_58;
uint local_50;
int4 local_4c;
char local_48 [24];
if ((int)in_R8[1] == -7) {
lVar1 = *in_R8;
local_50 = *(uint *)(lVar1 + 4) >> 0x1f;
local_58 = 0;
local_4c = 0;
local_68 = param_1;
local_60 = js_alloc_string(param_1,0);
if (local_60 == 0) {
local_58 = local_58 & 0xffffffff;
local_4c = 0xffffffff;
}
uVar3 = *(ulong *)(lVar1 + 4);
if ((uVar3 & 0x7fffffff) != 0) {
uVar7 = 0;
do {
if ((int)uVar3 < 0) {
__c = (uint)*(ushort *)(lVar1 + 0x18 + uVar7 * 2);
}
else {
__c = (uint)*(byte *)(lVar1 + 0x18 + uVar7);
}
if (__c < 0x21) {
if (__c - 9 < 5) {
string_buffer_putc8(&local_68,0x5c);
__c = (uint)(byte)"tnvfr"[__c - 9];
goto LAB_0014bc1e;
}
LAB_0014bbb9:
__format = "\\x%02x";
LAB_0014bbc8:
snprintf(local_48,0x10,__format,(ulong)__c);
sVar5 = strlen(local_48);
string_buffer_write8(&local_68,local_48,sVar5 & 0xffffffff);
}
else {
if (0x7f < __c) {
if (__c < 0x100) goto LAB_0014bbb9;
if ((((__c & 0xf800) != 0xd800) && (iVar2 = lre_is_white_space(__c), __c != 0xfeff)) &&
(iVar2 == 0)) {
string_buffer_putc16(&local_68,__c);
goto LAB_0014bc23;
}
__format = "\\u%04x";
goto LAB_0014bbc8;
}
if (__c - 0x61 < 0x1a || (__c - 0x41 < 0x1a || __c - 0x30 < 10)) {
if (uVar7 == 0) goto LAB_0014bbb9;
}
else {
pvVar4 = memchr(",-=<>#&!%:;@~\'`\"",__c,0x11);
if (pvVar4 != (void *)0x0) goto LAB_0014bbb9;
if (__c != 0x5f) {
string_buffer_putc8(&local_68,0x5c);
}
}
LAB_0014bc1e:
string_buffer_putc8(&local_68,__c);
}
LAB_0014bc23:
uVar7 = uVar7 + 1;
uVar3 = *(ulong *)(lVar1 + 4);
} while (uVar7 < ((uint)uVar3 & 0x7fffffff));
}
uVar6 = string_buffer_end(&local_68);
}
else {
uVar6 = 0;
JS_ThrowTypeError(param_1,"not a string");
}
return uVar6;
}
| |
33,824 | js_regexp_escape | bluesky950520[P]quickjs/quickjs.c | static JSValue js_regexp_escape(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
StringBuffer b_s, *b = &b_s;
JSString *p;
uint32_t c, i;
char s[16];
if (!JS_IsString(argv[0]))
return JS_ThrowTypeError(ctx, "not a string");
p = JS_VALUE_GET_STRING(argv[0]);
string_buffer_init2(ctx, b, 0, p->is_wide_char);
for (i = 0; i < p->len; i++) {
c = p->is_wide_char ? (uint32_t)p->u.str16[i] : (uint32_t)p->u.str8[i];
if (c < 33) {
if (c >= 9 && c <= 13) {
string_buffer_putc8(b, '\\');
string_buffer_putc8(b, "tnvfr"[c - 9]);
} else {
goto hex2;
}
} else if (c < 128) {
if ((c >= '0' && c <= '9')
|| (c >= 'A' && c <= 'Z')
|| (c >= 'a' && c <= 'z')) {
if (i == 0)
goto hex2;
} else if (strchr(",-=<>#&!%:;@~'`\"", c)) {
goto hex2;
} else if (c != '_') {
string_buffer_putc8(b, '\\');
}
string_buffer_putc8(b, c);
} else if (c < 256) {
hex2:
snprintf(s, sizeof(s), "\\x%02x", c);
string_buffer_puts8(b, s);
} else if (is_surrogate(c) || lre_is_white_space(c) || c == 0xFEFF) {
snprintf(s, sizeof(s), "\\u%04x", c);
string_buffer_puts8(b, s);
} else {
string_buffer_putc16(b, c);
}
}
return string_buffer_end(b);
} | O3 | c | js_regexp_escape:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpl $-0x7, 0x8(%r8)
jne 0x4da89
movq (%r8), %r13
movl 0x4(%r13), %edx
shrl $0x1f, %edx
movq %rdi, (%rsp)
movq $0x0, 0x10(%rsp)
movl %edx, 0x18(%rsp)
movl $0x0, 0x1c(%rsp)
xorl %esi, %esi
callq 0x20686
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x4dab0
movq 0x4(%r13), %rax
testl $0x7fffffff, %eax # imm = 0x7FFFFFFF
je 0x4da7c
movq %rsp, %rbx
leaq 0x20(%rsp), %r15
xorl %r12d, %r12d
testl %eax, %eax
js 0x4d94c
movzbl 0x18(%r13,%r12), %ebp
jmp 0x4d952
movzwl 0x18(%r13,%r12,2), %ebp
cmpl $0x20, %ebp
ja 0x4d988
leal -0x9(%rbp), %r14d
cmpl $0x4, %r14d
ja 0x4d9fa
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x4cb90
movl %r14d, %eax
leaq 0x53b66(%rip), %rcx # 0xa14e2
movzbl (%rax,%rcx), %esi
movq %rbx, %rdi
jmp 0x4da5f
cmpl $0x7f, %ebp
ja 0x4d9bb
leal -0x30(%rbp), %eax
cmpl $0xa, %eax
setb %al
leal -0x41(%rbp), %ecx
cmpl $0x1a, %ecx
setb %cl
orb %al, %cl
leal -0x61(%rbp), %eax
cmpl $0x1a, %eax
setb %al
orb %cl, %al
cmpb $0x1, %al
jne 0x4d9e2
testq %r12, %r12
jne 0x4da5a
jmp 0x4d9fa
cmpl $0xff, %ebp
jbe 0x4d9fa
movl %ebp, %eax
andl $0xf800, %eax # imm = 0xF800
cmpl $0xd800, %eax # imm = 0xD800
jne 0x4da29
movl $0x10, %esi
movq %r15, %rdi
leaq 0x53b20(%rip), %rdx # 0xa1500
jmp 0x4da09
movl $0x11, %edx
leaq 0x53afa(%rip), %rdi # 0xa14e8
movl %ebp, %esi
callq 0xe430
testq %rax, %rax
je 0x4da48
movl $0x10, %esi
movq %r15, %rdi
leaq 0x53af0(%rip), %rdx # 0xa14f9
movl %ebp, %ecx
xorl %eax, %eax
callq 0xe2d0
movq %r15, %rdi
callq 0xe240
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x42ef0
jmp 0x4da64
movl %ebp, %edi
callq 0x9a67d
cmpl $0xfeff, %ebp # imm = 0xFEFF
je 0x4d9d1
testl %eax, %eax
jne 0x4d9d1
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4886d
jmp 0x4da64
cmpl $0x5f, %ebp
je 0x4da5a
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x4cb90
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4cb90
incq %r12
movq 0x4(%r13), %rax
movl %eax, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
cmpq %rcx, %r12
jb 0x4d940
movq %rsp, %rdi
callq 0x33675
movq %rax, %rbx
jmp 0x4da9e
leaq 0x53a34(%rip), %rsi # 0xa14c4
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2214f
movl $0x6, %edx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x14(%rsp)
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
jmp 0x4d926
| js_regexp_escape:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
cmp dword ptr [r8+8], 0FFFFFFF9h
jnz loc_4DA89
mov r13, [r8]
mov edx, [r13+4]
shr edx, 1Fh
mov [rsp+68h+var_68], rdi
mov [rsp+68h+var_58], 0
mov [rsp+68h+var_50], edx
mov [rsp+68h+var_4C], 0
xor esi, esi
call js_alloc_string
mov [rsp+68h+var_60], rax
test rax, rax
jz loc_4DAB0
loc_4D926:
mov rax, [r13+4]
test eax, 7FFFFFFFh
jz loc_4DA7C
mov rbx, rsp
lea r15, [rsp+68h+var_48]
xor r12d, r12d
loc_4D940:
test eax, eax
js short loc_4D94C
movzx ebp, byte ptr [r13+r12+18h]
jmp short loc_4D952
loc_4D94C:
movzx ebp, word ptr [r13+r12*2+18h]
loc_4D952:
cmp ebp, 20h ; ' '
ja short loc_4D988
lea r14d, [rbp-9]
cmp r14d, 4
ja loc_4D9FA
mov rdi, rbx
mov esi, 5Ch ; '\'
call string_buffer_putc8
mov eax, r14d
lea rcx, aTnvfr; "tnvfr"
movzx esi, byte ptr [rax+rcx]
mov rdi, rbx
jmp loc_4DA5F
loc_4D988:
cmp ebp, 7Fh
ja short loc_4D9BB
lea eax, [rbp-30h]
cmp eax, 0Ah
setb al
lea ecx, [rbp-41h]
cmp ecx, 1Ah
setb cl
or cl, al
lea eax, [rbp-61h]
cmp eax, 1Ah
setb al
or al, cl
cmp al, 1
jnz short loc_4D9E2
test r12, r12
jnz loc_4DA5A
jmp short loc_4D9FA
loc_4D9BB:
cmp ebp, 0FFh
jbe short loc_4D9FA
mov eax, ebp
and eax, 0F800h
cmp eax, 0D800h
jnz short loc_4DA29
loc_4D9D1:
mov esi, 10h
mov rdi, r15
lea rdx, aU04x; "\\u%04x"
jmp short loc_4DA09
loc_4D9E2:
mov edx, 11h
lea rdi, asc_A14E8; ",-=<>#&!%:;@~'`\""
mov esi, ebp
call _memchr
test rax, rax
jz short loc_4DA48
loc_4D9FA:
mov esi, 10h
mov rdi, r15
lea rdx, aX02x; "\\x%02x"
loc_4DA09:
mov ecx, ebp
xor eax, eax
call _snprintf
mov rdi, r15
call _strlen
mov rdi, rbx
mov rsi, r15
mov edx, eax
call string_buffer_write8
jmp short loc_4DA64
loc_4DA29:
mov edi, ebp
call lre_is_white_space
cmp ebp, 0FEFFh
jz short loc_4D9D1
test eax, eax
jnz short loc_4D9D1
mov rdi, rbx
mov esi, ebp
call string_buffer_putc16
jmp short loc_4DA64
loc_4DA48:
cmp ebp, 5Fh ; '_'
jz short loc_4DA5A
mov rdi, rbx
mov esi, 5Ch ; '\'
call string_buffer_putc8
loc_4DA5A:
mov rdi, rbx
mov esi, ebp
loc_4DA5F:
call string_buffer_putc8
loc_4DA64:
inc r12
mov rax, [r13+4]
mov ecx, eax
and ecx, 7FFFFFFFh
cmp r12, rcx
jb loc_4D940
loc_4DA7C:
mov rdi, rsp
call string_buffer_end
mov rbx, rax
jmp short loc_4DA9E
loc_4DA89:
lea rsi, aNotAString; "not a string"
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
mov edx, 6
loc_4DA9E:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4DAB0:
mov dword ptr [rsp+68h+var_58+4], 0
mov [rsp+68h+var_4C], 0FFFFFFFFh
jmp loc_4D926
| long long js_regexp_escape(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
_DWORD *a13,
long long a14)
{
long long v14; // r13
unsigned int v15; // edx
unsigned long long v16; // rsi
long long v17; // rdx
unsigned long long v18; // rcx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
long long v23; // rax
unsigned long long v24; // r12
unsigned int v25; // ebp
long long v26; // rcx
int v27; // eax
int is_white_space; // eax
long long v29; // rbx
long long v31; // [rsp+0h] [rbp-68h] BYREF
long long v32; // [rsp+8h] [rbp-60h]
long long v33; // [rsp+10h] [rbp-58h]
long long v34; // [rsp+18h] [rbp-50h]
_BYTE v35[72]; // [rsp+20h] [rbp-48h] BYREF
if ( a13[2] == -7 )
{
v14 = *(_QWORD *)a13;
v15 = *(_DWORD *)(*(_QWORD *)a13 + 4LL) >> 31;
v31 = a1;
v33 = 0LL;
v34 = v15;
v16 = 0LL;
v32 = js_alloc_string(a1, 0LL, v15);
if ( !v32 )
{
HIDWORD(v33) = 0;
HIDWORD(v34) = -1;
}
v23 = *(_QWORD *)(v14 + 4);
if ( (v23 & 0x7FFFFFFF) != 0 )
{
v24 = 0LL;
while ( 1 )
{
v25 = (int)v23 < 0 ? *(unsigned __int16 *)(v14 + 2 * v24 + 24) : *(unsigned __int8 *)(v14 + v24 + 24);
if ( v25 <= 0x20 )
break;
if ( v25 <= 0x7F )
{
v26 = v25 - 65;
LOBYTE(v26) = v25 - 48 < 0xA || (unsigned int)v26 < 0x1A;
if ( ((unsigned __int8)v26 | (v25 - 97 < 0x1A)) == 1 )
{
if ( v24 )
goto LABEL_27;
}
else if ( !memchr(",-=<>#&!%:;@~'`\"", v25, 17LL) )
{
if ( v25 != 95 )
string_buffer_putc8((long long)&v31, 0x5Cu, a2, a3, a4, a5, v21, v22, a8, a9, v17, v26, v19, v20);
LABEL_27:
v16 = v25;
LABEL_28:
string_buffer_putc8((long long)&v31, v16, a2, a3, a4, a5, v21, v22, a8, a9, v17, v26, v19, v20);
goto LABEL_29;
}
goto LABEL_20;
}
if ( v25 <= 0xFF )
goto LABEL_20;
if ( (v25 & 0xF800) != 0xD800 )
{
is_white_space = lre_is_white_space(v25, v16, v17, v18, v19, v20, v31, v32, v33, v34);
if ( v25 != 65279 && !is_white_space )
{
v16 = v25;
string_buffer_putc16((long long)&v31, v25);
goto LABEL_29;
}
}
snprintf(v35, 16LL, "\\u%04x", v25);
LABEL_21:
v27 = strlen(v35);
v16 = (unsigned long long)v35;
string_buffer_write8((long long)&v31, (long long)v35, v27);
LABEL_29:
++v24;
v23 = *(_QWORD *)(v14 + 4);
v18 = v23 & 0x7FFFFFFF;
if ( v24 >= v18 )
return string_buffer_end(&v31);
}
if ( v25 - 9 <= 4 )
{
string_buffer_putc8((long long)&v31, 0x5Cu, a2, a3, a4, a5, v21, v22, a8, a9, v17, v18, v19, v20);
v26 = (long long)"tnvfr";
v16 = (unsigned __int8)aTnvfr[v25 - 9];
goto LABEL_28;
}
LABEL_20:
snprintf(v35, 16LL, "\\x%02x", v25);
goto LABEL_21;
}
return string_buffer_end(&v31);
}
else
{
v29 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a string", a11, a12, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, v31);
}
return v29;
}
| js_regexp_escape:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
CMP dword ptr [R8 + 0x8],-0x7
JNZ 0x0014da89
MOV R13,qword ptr [R8]
MOV EDX,dword ptr [R13 + 0x4]
SHR EDX,0x1f
MOV qword ptr [RSP],RDI
MOV qword ptr [RSP + 0x10],0x0
MOV dword ptr [RSP + 0x18],EDX
MOV dword ptr [RSP + 0x1c],0x0
XOR ESI,ESI
CALL 0x00120686
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x0014dab0
LAB_0014d926:
MOV RAX,qword ptr [R13 + 0x4]
TEST EAX,0x7fffffff
JZ 0x0014da7c
MOV RBX,RSP
LEA R15,[RSP + 0x20]
XOR R12D,R12D
LAB_0014d940:
TEST EAX,EAX
JS 0x0014d94c
MOVZX EBP,byte ptr [R13 + R12*0x1 + 0x18]
JMP 0x0014d952
LAB_0014d94c:
MOVZX EBP,word ptr [R13 + R12*0x2 + 0x18]
LAB_0014d952:
CMP EBP,0x20
JA 0x0014d988
LEA R14D,[RBP + -0x9]
CMP R14D,0x4
JA 0x0014d9fa
MOV RDI,RBX
MOV ESI,0x5c
CALL 0x0014cb90
MOV EAX,R14D
LEA RCX,[0x1a14e2]
MOVZX ESI,byte ptr [RAX + RCX*0x1]
MOV RDI,RBX
JMP 0x0014da5f
LAB_0014d988:
CMP EBP,0x7f
JA 0x0014d9bb
LEA EAX,[RBP + -0x30]
CMP EAX,0xa
SETC AL
LEA ECX,[RBP + -0x41]
CMP ECX,0x1a
SETC CL
OR CL,AL
LEA EAX,[RBP + -0x61]
CMP EAX,0x1a
SETC AL
OR AL,CL
CMP AL,0x1
JNZ 0x0014d9e2
TEST R12,R12
JNZ 0x0014da5a
JMP 0x0014d9fa
LAB_0014d9bb:
CMP EBP,0xff
JBE 0x0014d9fa
MOV EAX,EBP
AND EAX,0xf800
CMP EAX,0xd800
JNZ 0x0014da29
LAB_0014d9d1:
MOV ESI,0x10
MOV RDI,R15
LEA RDX,[0x1a1500]
JMP 0x0014da09
LAB_0014d9e2:
MOV EDX,0x11
LEA RDI,[0x1a14e8]
MOV ESI,EBP
CALL 0x0010e430
TEST RAX,RAX
JZ 0x0014da48
LAB_0014d9fa:
MOV ESI,0x10
MOV RDI,R15
LEA RDX,[0x1a14f9]
LAB_0014da09:
MOV ECX,EBP
XOR EAX,EAX
CALL 0x0010e2d0
MOV RDI,R15
CALL 0x0010e240
MOV RDI,RBX
MOV RSI,R15
MOV EDX,EAX
CALL 0x00142ef0
JMP 0x0014da64
LAB_0014da29:
MOV EDI,EBP
CALL 0x0019a67d
CMP EBP,0xfeff
JZ 0x0014d9d1
TEST EAX,EAX
JNZ 0x0014d9d1
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0014886d
JMP 0x0014da64
LAB_0014da48:
CMP EBP,0x5f
JZ 0x0014da5a
MOV RDI,RBX
MOV ESI,0x5c
CALL 0x0014cb90
LAB_0014da5a:
MOV RDI,RBX
MOV ESI,EBP
LAB_0014da5f:
CALL 0x0014cb90
LAB_0014da64:
INC R12
MOV RAX,qword ptr [R13 + 0x4]
MOV ECX,EAX
AND ECX,0x7fffffff
CMP R12,RCX
JC 0x0014d940
LAB_0014da7c:
MOV RDI,RSP
CALL 0x00133675
MOV RBX,RAX
JMP 0x0014da9e
LAB_0014da89:
LEA RSI,[0x1a14c4]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x0012214f
MOV EDX,0x6
LAB_0014da9e:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014dab0:
MOV dword ptr [RSP + 0x14],0x0
MOV dword ptr [RSP + 0x1c],0xffffffff
JMP 0x0014d926
|
int8 js_regexp_escape(int8 param_1)
{
long lVar1;
int iVar2;
ulong uVar3;
void *pvVar4;
size_t sVar5;
int8 uVar6;
char *__format;
uint __c;
long *in_R8;
ulong uVar7;
int8 local_68;
long local_60;
ulong local_58;
uint local_50;
int4 local_4c;
char local_48 [24];
if ((int)in_R8[1] == -7) {
lVar1 = *in_R8;
local_50 = *(uint *)(lVar1 + 4) >> 0x1f;
local_58 = 0;
local_4c = 0;
local_68 = param_1;
local_60 = js_alloc_string(param_1,0);
if (local_60 == 0) {
local_58 = local_58 & 0xffffffff;
local_4c = 0xffffffff;
}
uVar3 = *(ulong *)(lVar1 + 4);
if ((uVar3 & 0x7fffffff) != 0) {
uVar7 = 0;
do {
if ((int)uVar3 < 0) {
__c = (uint)*(ushort *)(lVar1 + 0x18 + uVar7 * 2);
}
else {
__c = (uint)*(byte *)(lVar1 + 0x18 + uVar7);
}
if (__c < 0x21) {
if (__c - 9 < 5) {
string_buffer_putc8(&local_68,0x5c);
__c = (uint)(byte)"tnvfr"[__c - 9];
goto LAB_0014da5f;
}
LAB_0014d9fa:
__format = "\\x%02x";
LAB_0014da09:
snprintf(local_48,0x10,__format,(ulong)__c);
sVar5 = strlen(local_48);
string_buffer_write8(&local_68,local_48,sVar5 & 0xffffffff);
}
else {
if (0x7f < __c) {
if (__c < 0x100) goto LAB_0014d9fa;
if ((((__c & 0xf800) != 0xd800) && (iVar2 = lre_is_white_space(__c), __c != 0xfeff)) &&
(iVar2 == 0)) {
string_buffer_putc16(&local_68,__c);
goto LAB_0014da64;
}
__format = "\\u%04x";
goto LAB_0014da09;
}
if (__c - 0x61 < 0x1a || (__c - 0x41 < 0x1a || __c - 0x30 < 10)) {
if (uVar7 == 0) goto LAB_0014d9fa;
}
else {
pvVar4 = memchr(",-=<>#&!%:;@~\'`\"",__c,0x11);
if (pvVar4 != (void *)0x0) goto LAB_0014d9fa;
if (__c != 0x5f) {
string_buffer_putc8(&local_68,0x5c);
}
}
LAB_0014da5f:
string_buffer_putc8(&local_68,__c);
}
LAB_0014da64:
uVar7 = uVar7 + 1;
uVar3 = *(ulong *)(lVar1 + 4);
} while (uVar7 < ((uint)uVar3 & 0x7fffffff));
}
uVar6 = string_buffer_end(&local_68);
}
else {
uVar6 = 0;
JS_ThrowTypeError(param_1,"not a string");
}
return uVar6;
}
| |
33,825 | add_stop_slave | eloqsql/client/mysqldump.c | static int add_stop_slave(void)
{
if (opt_comments)
fprintf(md_result_file,
"\n--\n-- stop slave statement to make a recovery dump)\n--\n\n");
if (multi_source)
fprintf(md_result_file, "STOP ALL SLAVES;\n");
else
fprintf(md_result_file, "STOP SLAVE;\n");
return(0);
} | O0 | c | add_stop_slave:
pushq %rbp
movq %rsp, %rbp
cmpb $0x0, 0x3c637f(%rip) # 0x4015ea
je 0x3b282
movq 0x3c623c(%rip), %rdi # 0x4014b0
leaq 0xa0842(%rip), %rsi # 0xdbabd
movb $0x0, %al
callq 0x381d0
cmpl $0x0, 0x3c6397(%rip) # 0x401620
je 0x3b2a2
movq 0x3c621e(%rip), %rdi # 0x4014b0
leaq 0xa085e(%rip), %rsi # 0xdbaf7
movb $0x0, %al
callq 0x381d0
jmp 0x3b2b7
movq 0x3c6207(%rip), %rdi # 0x4014b0
leaq 0xa0859(%rip), %rsi # 0xdbb09
movb $0x0, %al
callq 0x381d0
xorl %eax, %eax
popq %rbp
retq
nopl (%rax,%rax)
| add_stop_slave:
push rbp
mov rbp, rsp
cmp cs:opt_comments, 0
jz short loc_3B282
mov rdi, cs:md_result_file
lea rsi, aStopSlaveState; "\n--\n-- stop slave statement to make a"...
mov al, 0
call _fprintf
loc_3B282:
cmp cs:multi_source, 0
jz short loc_3B2A2
mov rdi, cs:md_result_file
lea rsi, aStopAllSlaves; "STOP ALL SLAVES;\n"
mov al, 0
call _fprintf
jmp short loc_3B2B7
loc_3B2A2:
mov rdi, cs:md_result_file
lea rsi, aStopSlave; "STOP SLAVE;\n"
mov al, 0
call _fprintf
loc_3B2B7:
xor eax, eax
pop rbp
retn
| long long add_stop_slave()
{
if ( opt_comments )
fprintf(md_result_file, "\n--\n-- stop slave statement to make a recovery dump)\n--\n\n");
if ( multi_source )
fprintf(md_result_file, "STOP ALL SLAVES;\n");
else
fprintf(md_result_file, "STOP SLAVE;\n");
return 0LL;
}
| add_stop_slave:
PUSH RBP
MOV RBP,RSP
CMP byte ptr [0x005015ea],0x0
JZ 0x0013b282
MOV RDI,qword ptr [0x005014b0]
LEA RSI,[0x1dbabd]
MOV AL,0x0
CALL 0x001381d0
LAB_0013b282:
CMP dword ptr [0x00501620],0x0
JZ 0x0013b2a2
MOV RDI,qword ptr [0x005014b0]
LEA RSI,[0x1dbaf7]
MOV AL,0x0
CALL 0x001381d0
JMP 0x0013b2b7
LAB_0013b2a2:
MOV RDI,qword ptr [0x005014b0]
LEA RSI,[0x1dbb09]
MOV AL,0x0
CALL 0x001381d0
LAB_0013b2b7:
XOR EAX,EAX
POP RBP
RET
|
int8 add_stop_slave(void)
{
if (opt_comments != '\0') {
fprintf(md_result_file,"\n--\n-- stop slave statement to make a recovery dump)\n--\n\n");
}
if (multi_source == 0) {
fprintf(md_result_file,"STOP SLAVE;\n");
}
else {
fprintf(md_result_file,"STOP ALL SLAVES;\n");
}
return 0;
}
| |
33,826 | qshell_cmd_tictactoe | navaro[P]qoraal-tictactoe/src/tictactoe.c | static int32_t qshell_cmd_tictactoe(SVC_SHELL_IF_T *pif, char** argv, int argc)
{
svc_shell_print(pif, SVC_SHELL_OUT_STD, "\n=== Demonstration Game ===\n");
int board[9] = {0,0,0, 0,0,0, 0,0,0};
int current_player = 0;
while (!check_winner(board, 0) && !board_full(board)) {
if (current_player == 1) {
int action = choose_move_epsilon(board, 0.0);
if (action == -1)
break;
board[action] = 1;
svc_shell_print(pif, SVC_SHELL_OUT_STD, "\nAI moves at position %d:\n", action);
print_board(pif, board);
current_player = -1;
} else {
int legal_moves[9], count = 0;
for (int i = 0; i < 9; i++) {
if (board[i] == 0)
legal_moves[count++] = i;
}
if (count == 0)
break;
int move = legal_moves[rand() % count];
board[move] = -1;
svc_shell_print(pif, SVC_SHELL_OUT_STD, "\nOpponent moves at position %d:\n", move);
print_board(pif, board);
current_player = 1;
}
}
int winner = check_winner(board, 0);
if (winner == 1)
svc_shell_print(pif, SVC_SHELL_OUT_STD, "\nAI wins the demonstration game!\n");
else if (winner == -1)
svc_shell_print(pif, SVC_SHELL_OUT_STD, "\nOpponent wins the demonstration game!\n");
else
svc_shell_print(pif, SVC_SHELL_OUT_STD, "\nIt's a draw in the demonstration game!\n");
return EOK;
} | O3 | c | qshell_cmd_tictactoe:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x15d51(%rip), %rdx # 0x26c3c
xorl %r15d, %r15d
movl $0x1, %esi
xorl %eax, %eax
callq 0x17c60
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %r14
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movl $0x0, 0x20(%r14)
leaq 0x15f07(%rip), %r13 # 0x26e20
leaq 0x15d39(%rip), %r12 # 0x26c59
movl $0x8, %eax
movslq -0x8(%rax,%r13), %rcx
movl -0x50(%rbp,%rcx,4), %ecx
testl %ecx, %ecx
je 0x10f4b
movslq -0x4(%rax,%r13), %rdx
cmpl -0x50(%rbp,%rdx,4), %ecx
jne 0x10f4b
movslq (%rax,%r13), %rdx
cmpl -0x50(%rbp,%rdx,4), %ecx
je 0x11038
addq $0xc, %rax
cmpq $0x68, %rax
jne 0x10f25
cmpl $0x0, -0x50(%rbp)
je 0x10f84
movq $-0x1, %rax
cmpq $0x7, %rax
je 0x11038
leaq 0x1(%rax), %rcx
cmpl $0x0, -0x48(%rbp,%rax,4)
movq %rcx, %rax
jne 0x10f62
cmpq $0x7, %rcx
ja 0x11038
testb $0x1, %r15b
je 0x10fca
xorps %xmm0, %xmm0
movq %r14, %rdi
callq 0x11bc9
cmpl $-0x1, %eax
je 0x11038
movslq %eax, %rcx
movl $0x1, -0x50(%rbp,%rcx,4)
movq %rbx, %rdi
movl $0x1, %esi
movq %r12, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x17c60
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11e15
jmp 0x1102f
xorl %eax, %eax
xorl %r12d, %r12d
cmpl $0x0, -0x50(%rbp,%rax,4)
jne 0x10fe0
movslq %r12d, %rcx
incl %r12d
movl %eax, -0x80(%rbp,%rcx,4)
incq %rax
cmpq $0x9, %rax
jne 0x10fcf
testl %r12d, %r12d
je 0x11038
callq 0x65c0
cltd
idivl %r12d
movslq %edx, %rax
movslq -0x80(%rbp,%rax,4), %rcx
movl $0xffffffff, -0x50(%rbp,%rcx,4) # imm = 0xFFFFFFFF
movq %rbx, %rdi
movl $0x1, %esi
leaq 0x15c5e(%rip), %rdx # 0x26c74
xorl %eax, %eax
callq 0x17c60
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11e15
leaq 0x15c2a(%rip), %r12 # 0x26c59
xorb $0x1, %r15b
jmp 0x10f20
movl $0x8, %eax
leaq 0x15c9b(%rip), %rdx # 0x26cdf
movslq -0x8(%rax,%r13), %rcx
movl -0x50(%rbp,%rcx,4), %ecx
testl %ecx, %ecx
je 0x11066
movslq -0x4(%rax,%r13), %rsi
cmpl -0x50(%rbp,%rsi,4), %ecx
jne 0x11066
movslq (%rax,%r13), %rsi
cmpl -0x50(%rbp,%rsi,4), %ecx
je 0x11072
addq $0xc, %rax
cmpq $0x68, %rax
jne 0x11044
jmp 0x11095
cmpl $-0x1, %ecx
leaq 0x15c3b(%rip), %rax # 0x26cb7
leaq 0x15c5c(%rip), %rsi # 0x26cdf
cmoveq %rax, %rsi
cmpl $0x1, %ecx
leaq 0x15c04(%rip), %rdx # 0x26c95
cmovneq %rsi, %rdx
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x17c60
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| qshell_cmd_tictactoe:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
lea rdx, aDemonstrationG; "\n=== Demonstration Game ===\n"
xor r15d, r15d
mov esi, 1
xor eax, eax
call svc_shell_print
xorps xmm0, xmm0
lea r14, [rbp+var_50]
movaps xmmword ptr [r14+10h], xmm0
movaps xmmword ptr [r14], xmm0
mov dword ptr [r14+20h], 0
lea r13, unk_26E20
lea r12, aAiMovesAtPosit; "\nAI moves at position %d:\n"
loc_10F20:
mov eax, 8
loc_10F25:
movsxd rcx, dword ptr [rax+r13-8]
mov ecx, [rbp+rcx*4+var_50]
test ecx, ecx
jz short loc_10F4B
movsxd rdx, dword ptr [rax+r13-4]
cmp ecx, [rbp+rdx*4+var_50]
jnz short loc_10F4B
movsxd rdx, dword ptr [rax+r13]
cmp ecx, [rbp+rdx*4+var_50]
jz loc_11038
loc_10F4B:
add rax, 0Ch
cmp rax, 68h ; 'h'
jnz short loc_10F25
cmp [rbp+var_50], 0
jz short loc_10F84
mov rax, 0FFFFFFFFFFFFFFFFh
loc_10F62:
cmp rax, 7
jz loc_11038
lea rcx, [rax+1]
cmp [rbp+rax*4+var_48], 0
mov rax, rcx
jnz short loc_10F62
cmp rcx, 7
ja loc_11038
loc_10F84:
test r15b, 1
jz short loc_10FCA
xorps xmm0, xmm0
mov rdi, r14
call choose_move_epsilon
cmp eax, 0FFFFFFFFh
jz loc_11038
movsxd rcx, eax
mov [rbp+rcx*4+var_50], 1
mov rdi, rbx
mov esi, 1
mov rdx, r12
mov ecx, eax
xor eax, eax
call svc_shell_print
mov rdi, rbx
mov rsi, r14
call print_board
jmp short loc_1102F
loc_10FCA:
xor eax, eax
xor r12d, r12d
loc_10FCF:
cmp [rbp+rax*4+var_50], 0
jnz short loc_10FE0
movsxd rcx, r12d
inc r12d
mov [rbp+rcx*4+var_80], eax
loc_10FE0:
inc rax
cmp rax, 9
jnz short loc_10FCF
test r12d, r12d
jz short loc_11038
call _rand
cdq
idiv r12d
movsxd rax, edx
movsxd rcx, [rbp+rax*4+var_80]
mov [rbp+rcx*4+var_50], 0FFFFFFFFh
mov rdi, rbx
mov esi, 1
lea rdx, aOpponentMovesA; "\nOpponent moves at position %d:\n"
xor eax, eax
call svc_shell_print
mov rdi, rbx
mov rsi, r14
call print_board
lea r12, aAiMovesAtPosit; "\nAI moves at position %d:\n"
loc_1102F:
xor r15b, 1
jmp loc_10F20
loc_11038:
mov eax, 8
lea rdx, aItSADrawInTheD; "\nIt's a draw in the demonstration game"...
loc_11044:
movsxd rcx, dword ptr [rax+r13-8]
mov ecx, [rbp+rcx*4+var_50]
test ecx, ecx
jz short loc_11066
movsxd rsi, dword ptr [rax+r13-4]
cmp ecx, [rbp+rsi*4+var_50]
jnz short loc_11066
movsxd rsi, dword ptr [rax+r13]
cmp ecx, [rbp+rsi*4+var_50]
jz short loc_11072
loc_11066:
add rax, 0Ch
cmp rax, 68h ; 'h'
jnz short loc_11044
jmp short loc_11095
loc_11072:
cmp ecx, 0FFFFFFFFh
lea rax, aOpponentWinsTh; "\nOpponent wins the demonstration game!"...
lea rsi, aItSADrawInTheD; "\nIt's a draw in the demonstration game"...
cmovz rsi, rax
cmp ecx, 1
lea rdx, aAiWinsTheDemon; "\nAI wins the demonstration game!\n"
cmovnz rdx, rsi
loc_11095:
mov rdi, rbx
mov esi, 1
xor eax, eax
call svc_shell_print
xor eax, eax
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long qshell_cmd_tictactoe(long long a1, long long a2, long long a3, int a4, int a5, int a6)
{
long long v6; // rbx
char v7; // r15
int v8; // r8d
int v9; // r9d
long long i; // rax
int v11; // ecx
long long v12; // rax
unsigned long long v13; // rcx
int v15; // eax
long long v16; // rax
int v17; // r12d
long long v18; // rcx
long long v19; // rcx
int v20; // r8d
int v21; // r9d
long long v22; // rax
char *v23; // rdx
int v24; // ecx
char *v25; // rsi
_DWORD v27[12]; // [rsp+0h] [rbp-80h]
_DWORD v28[20]; // [rsp+30h] [rbp-50h] BYREF
v6 = a1;
v7 = 0;
svc_shell_print(a1, 1, (unsigned int)aDemonstrationG, a4, a5, a6, v27[0]);
memset(v28, 0, 36);
while ( 2 )
{
for ( i = 8LL; i != 104; i += 12LL )
{
v11 = v28[*(int *)((char *)&unk_26E20 + i - 8)];
if ( v11 && v11 == v28[*(int *)((char *)&unk_26E20 + i - 4)] && v11 == v28[*(int *)((char *)&unk_26E20 + i)] )
goto LABEL_22;
}
if ( !v28[0] )
{
LABEL_12:
if ( (v7 & 1) != 0 )
{
v15 = choose_move_epsilon(v28, 0.0);
if ( v15 == -1 )
goto LABEL_22;
v28[v15] = 1;
svc_shell_print(v6, 1, (unsigned int)aAiMovesAtPosit, v15, v8, v9, v27[0]);
a1 = v6;
print_board(v6, v28);
}
else
{
v16 = 0LL;
v17 = 0;
do
{
if ( !v28[v16] )
{
v18 = v17++;
v27[v18] = v16;
}
++v16;
}
while ( v16 != 9 );
if ( !v17 )
goto LABEL_22;
v19 = (int)v27[(int)rand(a1) % v17];
v28[v19] = -1;
svc_shell_print(v6, 1, (unsigned int)aOpponentMovesA, v19, v20, v21, v27[0]);
a1 = v6;
print_board(v6, v28);
}
v7 ^= 1u;
continue;
}
break;
}
v12 = -1LL;
while ( v12 != 7 )
{
v13 = v12 + 1;
if ( v28[v12++ + 2] == 0 )
{
if ( v13 > 7 )
break;
goto LABEL_12;
}
}
LABEL_22:
v22 = 8LL;
v23 = aItSADrawInTheD;
while ( 1 )
{
v24 = v28[*(int *)((char *)&unk_26E20 + v22 - 8)];
if ( v24 )
{
if ( v24 == v28[*(int *)((char *)&unk_26E20 + v22 - 4)] && v24 == v28[*(int *)((char *)&unk_26E20 + v22)] )
break;
}
v22 += 12LL;
if ( v22 == 104 )
goto LABEL_32;
}
v25 = aItSADrawInTheD;
if ( v24 == -1 )
v25 = aOpponentWinsTh;
v23 = aAiWinsTheDemon;
if ( v24 != 1 )
LODWORD(v23) = (_DWORD)v25;
LABEL_32:
svc_shell_print(v6, 1, (_DWORD)v23, v24, v8, v9, v27[0]);
return 0LL;
}
| qshell_cmd_tictactoe:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
LEA RDX,[0x126c3c]
XOR R15D,R15D
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00117c60
XORPS XMM0,XMM0
LEA R14,[RBP + -0x50]
MOVAPS xmmword ptr [R14 + 0x10],XMM0
MOVAPS xmmword ptr [R14],XMM0
MOV dword ptr [R14 + 0x20],0x0
LEA R13,[0x126e20]
LEA R12,[0x126c59]
LAB_00110f20:
MOV EAX,0x8
LAB_00110f25:
MOVSXD RCX,dword ptr [RAX + R13*0x1 + -0x8]
MOV ECX,dword ptr [RBP + RCX*0x4 + -0x50]
TEST ECX,ECX
JZ 0x00110f4b
MOVSXD RDX,dword ptr [RAX + R13*0x1 + -0x4]
CMP ECX,dword ptr [RBP + RDX*0x4 + -0x50]
JNZ 0x00110f4b
MOVSXD RDX,dword ptr [RAX + R13*0x1]
CMP ECX,dword ptr [RBP + RDX*0x4 + -0x50]
JZ 0x00111038
LAB_00110f4b:
ADD RAX,0xc
CMP RAX,0x68
JNZ 0x00110f25
CMP dword ptr [RBP + -0x50],0x0
JZ 0x00110f84
MOV RAX,-0x1
LAB_00110f62:
CMP RAX,0x7
JZ 0x00111038
LEA RCX,[RAX + 0x1]
CMP dword ptr [RBP + RAX*0x4 + -0x48],0x0
MOV RAX,RCX
JNZ 0x00110f62
CMP RCX,0x7
JA 0x00111038
LAB_00110f84:
TEST R15B,0x1
JZ 0x00110fca
XORPS XMM0,XMM0
MOV RDI,R14
CALL 0x00111bc9
CMP EAX,-0x1
JZ 0x00111038
MOVSXD RCX,EAX
MOV dword ptr [RBP + RCX*0x4 + -0x50],0x1
MOV RDI,RBX
MOV ESI,0x1
MOV RDX,R12
MOV ECX,EAX
XOR EAX,EAX
CALL 0x00117c60
MOV RDI,RBX
MOV RSI,R14
CALL 0x00111e15
JMP 0x0011102f
LAB_00110fca:
XOR EAX,EAX
XOR R12D,R12D
LAB_00110fcf:
CMP dword ptr [RBP + RAX*0x4 + -0x50],0x0
JNZ 0x00110fe0
MOVSXD RCX,R12D
INC R12D
MOV dword ptr [RBP + RCX*0x4 + -0x80],EAX
LAB_00110fe0:
INC RAX
CMP RAX,0x9
JNZ 0x00110fcf
TEST R12D,R12D
JZ 0x00111038
CALL 0x001065c0
CDQ
IDIV R12D
MOVSXD RAX,EDX
MOVSXD RCX,dword ptr [RBP + RAX*0x4 + -0x80]
MOV dword ptr [RBP + RCX*0x4 + -0x50],0xffffffff
MOV RDI,RBX
MOV ESI,0x1
LEA RDX,[0x126c74]
XOR EAX,EAX
CALL 0x00117c60
MOV RDI,RBX
MOV RSI,R14
CALL 0x00111e15
LEA R12,[0x126c59]
LAB_0011102f:
XOR R15B,0x1
JMP 0x00110f20
LAB_00111038:
MOV EAX,0x8
LEA RDX,[0x126cdf]
LAB_00111044:
MOVSXD RCX,dword ptr [RAX + R13*0x1 + -0x8]
MOV ECX,dword ptr [RBP + RCX*0x4 + -0x50]
TEST ECX,ECX
JZ 0x00111066
MOVSXD RSI,dword ptr [RAX + R13*0x1 + -0x4]
CMP ECX,dword ptr [RBP + RSI*0x4 + -0x50]
JNZ 0x00111066
MOVSXD RSI,dword ptr [RAX + R13*0x1]
CMP ECX,dword ptr [RBP + RSI*0x4 + -0x50]
JZ 0x00111072
LAB_00111066:
ADD RAX,0xc
CMP RAX,0x68
JNZ 0x00111044
JMP 0x00111095
LAB_00111072:
CMP ECX,-0x1
LEA RAX,[0x126cb7]
LEA RSI,[0x126cdf]
CMOVZ RSI,RAX
CMP ECX,0x1
LEA RDX,[0x126c95]
CMOVNZ RDX,RSI
LAB_00111095:
MOV RDI,RBX
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00117c60
XOR EAX,EAX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 qshell_cmd_tictactoe(int8 param_1)
{
ulong uVar1;
int iVar2;
int iVar3;
long lVar4;
ulong uVar5;
long lVar6;
char *pcVar7;
char *pcVar8;
bool bVar9;
int aiStack_88 [12];
int local_58 [10];
bVar9 = false;
svc_shell_print(param_1,1,s_____Demonstration_Game_____00126c3c);
local_58[4] = 0;
local_58[5] = 0;
local_58[6] = 0;
local_58[7] = 0;
local_58[0] = 0;
local_58[1] = 0;
local_58[2] = 0;
local_58[3] = 0;
local_58[8] = 0;
do {
lVar4 = 8;
do {
iVar2 = local_58[*(int *)(lVar4 + 0x126e18)];
if (((iVar2 != 0) && (iVar2 == local_58[*(int *)(lVar4 + 0x126e1c)])) &&
(iVar2 == local_58[*(int *)((long)&DAT_00126e20 + lVar4)])) goto LAB_00111038;
lVar4 = lVar4 + 0xc;
} while (lVar4 != 0x68);
if (local_58[0] != 0) {
uVar5 = 0xffffffffffffffff;
do {
if (uVar5 == 7) goto LAB_00111038;
uVar1 = uVar5 + 1;
lVar4 = uVar5 + 2;
uVar5 = uVar1;
} while (local_58[lVar4] != 0);
if (7 < uVar1) break;
}
if (bVar9) {
iVar2 = choose_move_epsilon(0,local_58);
if (iVar2 == -1) break;
local_58[iVar2] = 1;
svc_shell_print(param_1,1,s_AI_moves_at_position__d__00126c59,iVar2);
print_board(param_1,local_58);
}
else {
lVar4 = 0;
iVar2 = 0;
do {
if (local_58[lVar4] == 0) {
lVar6 = (long)iVar2;
iVar2 = iVar2 + 1;
aiStack_88[lVar6] = (int)lVar4;
}
lVar4 = lVar4 + 1;
} while (lVar4 != 9);
if (iVar2 == 0) break;
iVar3 = rand();
local_58[aiStack_88[iVar3 % iVar2]] = -1;
svc_shell_print(param_1,1,s_Opponent_moves_at_position__d__00126c74);
print_board(param_1,local_58);
}
bVar9 = (bool)(bVar9 ^ 1);
} while( true );
LAB_00111038:
lVar4 = 8;
pcVar7 = s_It_s_a_draw_in_the_demonstration_00126cdf;
while (((iVar2 = local_58[*(int *)(lVar4 + 0x126e18)], iVar2 == 0 ||
(iVar2 != local_58[*(int *)(lVar4 + 0x126e1c)])) ||
(iVar2 != local_58[*(int *)((long)&DAT_00126e20 + lVar4)]))) {
lVar4 = lVar4 + 0xc;
if (lVar4 == 0x68) {
LAB_00111095:
svc_shell_print(param_1,1,pcVar7);
return 0;
}
}
pcVar8 = s_It_s_a_draw_in_the_demonstration_00126cdf;
if (iVar2 == -1) {
pcVar8 = s_Opponent_wins_the_demonstration_g_00126cb7;
}
pcVar7 = s_AI_wins_the_demonstration_game__00126c95;
if (iVar2 != 1) {
pcVar7 = pcVar8;
}
goto LAB_00111095;
}
| |
33,827 | spdlog::details::periodic_worker::~periodic_worker() | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/periodic_worker-inl.h | SPDLOG_INLINE periodic_worker::~periodic_worker() {
if (worker_thread_.joinable()) {
{
std::lock_guard<std::mutex> lock(mutex_);
active_ = false;
}
cv_.notify_one();
worker_thread_.join();
}
} | O0 | c | spdlog::details::periodic_worker::~periodic_worker():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
addq $0x8, %rdi
callq 0x1eb20
testb $0x1, %al
jne 0xc0c41
jmp 0xc0c84
movq (%rsp), %rsi
addq $0x10, %rsi
leaq 0x8(%rsp), %rdi
callq 0x390b0
jmp 0xc0c55
movq (%rsp), %rax
movb $0x0, (%rax)
leaq 0x8(%rsp), %rdi
callq 0x390e0
movq (%rsp), %rdi
addq $0x38, %rdi
callq 0x15380
movq (%rsp), %rdi
addq $0x8, %rdi
callq 0x15d60
jmp 0xc0c82
jmp 0xc0c84
movq (%rsp), %rdi
addq $0x38, %rdi
callq 0x15e50
movq (%rsp), %rdi
addq $0x8, %rdi
callq 0x1eb00
addq $0x18, %rsp
retq
movq %rax, %rdi
callq 0x1f240
nopl (%rax,%rax)
| _ZN6spdlog7details15periodic_workerD2Ev:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rdi, [rsp+18h+var_8]
mov [rsp+18h+var_18], rdi
add rdi, 8; this
call _ZNKSt6thread8joinableEv; std::thread::joinable(void)
test al, 1
jnz short loc_C0C41
jmp short loc_C0C84
loc_C0C41:
mov rsi, [rsp+18h+var_18]
add rsi, 10h
lea rdi, [rsp+18h+var_10]
call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
jmp short $+2
loc_C0C55:
mov rax, [rsp+18h+var_18]
mov byte ptr [rax], 0
lea rdi, [rsp+18h+var_10]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
mov rdi, [rsp+18h+var_18]
add rdi, 38h ; '8'; this
call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void)
mov rdi, [rsp+18h+var_18]
add rdi, 8; this
call __ZNSt6thread4joinEv; std::thread::join(void)
jmp short $+2
loc_C0C82:
jmp short $+2
loc_C0C84:
mov rdi, [rsp+18h+var_18]
add rdi, 38h ; '8'; this
call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable()
mov rdi, [rsp+18h+var_18]
add rdi, 8; this
call _ZNSt6threadD2Ev; std::thread::~thread()
add rsp, 18h
retn
mov rdi, rax
call __clang_call_terminate
| void spdlog::details::periodic_worker::~periodic_worker(spdlog::details::periodic_worker *this)
{
std::mutex *v1[2]; // [rsp+8h] [rbp-10h] BYREF
v1[1] = this;
if ( std::thread::joinable((spdlog::details::periodic_worker *)((char *)this + 8)) )
{
std::lock_guard<std::mutex>::lock_guard(v1, (spdlog::details::periodic_worker *)((char *)this + 16));
*(_BYTE *)this = 0;
std::lock_guard<std::mutex>::~lock_guard(v1);
std::condition_variable::notify_one((spdlog::details::periodic_worker *)((char *)this + 56));
std::thread::join((spdlog::details::periodic_worker *)((char *)this + 8));
}
std::condition_variable::~condition_variable((spdlog::details::periodic_worker *)((char *)this + 56));
std::thread::~thread((spdlog::details::periodic_worker *)((char *)this + 8));
}
| ~periodic_worker:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RDI
ADD RDI,0x8
CALL 0x0011eb20
TEST AL,0x1
JNZ 0x001c0c41
JMP 0x001c0c84
LAB_001c0c41:
MOV RSI,qword ptr [RSP]
ADD RSI,0x10
LAB_001c0c49:
LEA RDI,[RSP + 0x8]
CALL 0x001390b0
JMP 0x001c0c55
LAB_001c0c55:
MOV RAX,qword ptr [RSP]
MOV byte ptr [RAX],0x0
LEA RDI,[RSP + 0x8]
CALL 0x001390e0
MOV RDI,qword ptr [RSP]
ADD RDI,0x38
CALL 0x00115380
MOV RDI,qword ptr [RSP]
ADD RDI,0x8
CALL 0x00115d60
JMP 0x001c0c82
LAB_001c0c82:
JMP 0x001c0c84
LAB_001c0c84:
MOV RDI,qword ptr [RSP]
ADD RDI,0x38
CALL 0x00115e50
MOV RDI,qword ptr [RSP]
ADD RDI,0x8
CALL 0x0011eb00
ADD RSP,0x18
RET
|
/* spdlog::details::periodic_worker::~periodic_worker() */
void __thiscall spdlog::details::periodic_worker::~periodic_worker(periodic_worker *this)
{
ulong uVar1;
lock_guard<std::mutex> local_10 [8];
periodic_worker *local_8;
local_8 = this;
uVar1 = std::thread::joinable((thread *)(this + 8));
if ((uVar1 & 1) != 0) {
/* try { // try from 001c0c49 to 001c0c7f has its CatchHandler @ 001c0ca3 */
std::lock_guard<std::mutex>::lock_guard(local_10,(mutex *)(this + 0x10));
*this = (periodic_worker)0x0;
std::lock_guard<std::mutex>::~lock_guard(local_10);
std::condition_variable::notify_one();
std::thread::join();
}
std::condition_variable::~condition_variable((condition_variable *)(this + 0x38));
std::thread::~thread((thread *)(this + 8));
return;
}
| |
33,828 | mi_search_last | eloqsql/storage/myisam/mi_search.c | int _mi_search_last(register MI_INFO *info, register MI_KEYDEF *keyinfo,
register my_off_t pos)
{
uint nod_flag;
uchar *buff,*page;
DBUG_ENTER("_mi_search_last");
if (pos == HA_OFFSET_ERROR)
{
my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */
info->lastpos= HA_OFFSET_ERROR;
DBUG_RETURN(-1);
}
buff=info->buff;
do
{
if (!_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,buff,0))
{
info->lastpos= HA_OFFSET_ERROR;
DBUG_RETURN(-1);
}
page= buff+mi_getint(buff);
nod_flag=mi_test_if_nod(buff);
} while ((pos=_mi_kpos(nod_flag,page)) != HA_OFFSET_ERROR);
if (!_mi_get_last_key(info,keyinfo,buff,info->lastkey,page,
&info->lastkey_length))
DBUG_RETURN(-1);
info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length);
info->int_keypos=info->int_maxpos=page;
info->int_nod_flag=nod_flag;
info->int_keytree_version=keyinfo->version;
info->last_search_keypage=info->last_keypage;
info->page_changed=info->buff_used=0;
DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos));
DBUG_RETURN(0);
} | O0 | c | mi_search_last:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $-0x1, -0x20(%rbp)
jne 0xc2551
callq 0xf6090
movl $0x78, (%rax)
movq -0x10(%rbp), %rax
movq $-0x1, 0x170(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc26f7
movq -0x10(%rbp), %rax
movq 0x100(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %r8
movl $0x3, %ecx
xorl %r9d, %r9d
callq 0xbe020
cmpq $0x0, %rax
jne 0xc259e
movq -0x10(%rbp), %rax
movq $-0x1, 0x170(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc26f7
movq -0x30(%rbp), %rax
movq -0x30(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
movq -0x30(%rbp), %rdx
movzbl (%rdx), %edx
movzwl %dx, %edx
shll $0x8, %edx
orl %edx, %ecx
movzwl %cx, %ecx
andl $0x7fff, %ecx # imm = 0x7FFF
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xc25f1
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x17c(%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0xc25f8
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0xc25f8
movl -0x3c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
movq -0x38(%rbp), %rsi
callq 0xbef90
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rax
jne 0xc2560
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rcx
movq -0x38(%rbp), %r8
movq -0x10(%rbp), %r9
addq $0x1d8, %r9 # imm = 0x1D8
callq 0xc19b0
cmpq $0x0, %rax
jne 0xc2657
jmp 0xc264b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc26f7
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdx
movq -0x10(%rbp), %rax
movl 0x1d8(%rax), %eax
addq %rax, %rdx
xorl %esi, %esi
callq 0xbf210
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x170(%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x130(%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0x128(%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x138(%rax)
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x13c(%rax)
movq -0x10(%rbp), %rax
movq 0x190(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x198(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x33d(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x33c(%rax)
jmp 0xc26ee
jmp 0xc26f0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
| _mi_search_last:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jnz short loc_C2551
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
mov rax, [rbp+var_10]
mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_C26F7
loc_C2551:
mov rax, [rbp+var_10]
mov rax, [rax+100h]
mov [rbp+var_30], rax
loc_C2560:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov r8, [rbp+var_30]
mov ecx, 3
xor r9d, r9d
call _mi_fetch_keypage
cmp rax, 0
jnz short loc_C259E
mov rax, [rbp+var_10]
mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_C26F7
loc_C259E:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_30]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
mov rdx, [rbp+var_30]
movzx edx, byte ptr [rdx]
movzx edx, dx
shl edx, 8
or ecx, edx
movzx ecx, cx
and ecx, 7FFFh
mov ecx, ecx
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
and eax, 80h
cmp eax, 0
jz short loc_C25F1
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+17Ch]
mov [rbp+var_3C], eax
jmp short loc_C25F8
loc_C25F1:
xor eax, eax
mov [rbp+var_3C], eax
jmp short $+2
loc_C25F8:
mov eax, [rbp+var_3C]
mov [rbp+var_24], eax
mov edi, [rbp+var_24]
mov rsi, [rbp+var_38]
call _mi_kpos
mov [rbp+var_20], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz loc_C2560
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
mov rax, [rbp+var_10]
mov rcx, [rax+108h]
mov r8, [rbp+var_38]
mov r9, [rbp+var_10]
add r9, 1D8h
call _mi_get_last_key
cmp rax, 0
jnz short loc_C2657
jmp short $+2
loc_C264B:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_C26F7
loc_C2657:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rdx, [rax+108h]
mov rax, [rbp+var_10]
mov eax, [rax+1D8h]
add rdx, rax
xor esi, esi
call _mi_dpos
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+170h], rcx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_10]
mov [rax+130h], rcx
mov rax, [rbp+var_10]
mov [rax+128h], rcx
mov ecx, [rbp+var_24]
mov rax, [rbp+var_10]
mov [rax+138h], ecx
mov rax, [rbp+var_18]
mov ecx, [rax+1Ch]
mov rax, [rbp+var_10]
mov [rax+13Ch], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+190h]
mov rax, [rbp+var_10]
mov [rax+198h], rcx
mov rax, [rbp+var_10]
mov byte ptr [rax+33Dh], 0
mov rax, [rbp+var_10]
mov byte ptr [rax+33Ch], 0
jmp short $+2
loc_C26EE:
jmp short $+2
loc_C26F0:
mov [rbp+var_4], 0
loc_C26F7:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long mi_search_last(long long a1, long long a2, long long a3)
{
unsigned int v4; // [rsp+4h] [rbp-3Ch]
unsigned long long v5; // [rsp+8h] [rbp-38h]
unsigned __int16 *v6; // [rsp+10h] [rbp-30h]
long long v7; // [rsp+20h] [rbp-20h]
v7 = a3;
if ( a3 == -1 )
{
*(_DWORD *)my_thread_var(a1, (const char *)a2) = 120;
*(_QWORD *)(a1 + 368) = -1LL;
return (unsigned int)-1;
}
else
{
v6 = *(unsigned __int16 **)(a1 + 256);
do
{
if ( !mi_fetch_keypage((_QWORD *)a1, a2, v7, 3, (int)v6, 0) )
{
*(_QWORD *)(a1 + 368) = -1LL;
return (unsigned int)-1;
}
v5 = (unsigned long long)v6 + (_byteswap_ushort(*v6) & 0x7FFF);
if ( (*(_BYTE *)v6 & 0x80) != 0 )
v4 = *(_DWORD *)(*(_QWORD *)a1 + 380LL);
else
v4 = 0;
v7 = mi_kpos(v4, v5);
}
while ( v7 != -1 );
if ( mi_get_last_key(a1, a2, v6, *(_BYTE **)(a1 + 264), v5, (_DWORD *)(a1 + 472)) )
{
*(_QWORD *)(a1 + 368) = mi_dpos(a1, 0, *(unsigned int *)(a1 + 472) + *(_QWORD *)(a1 + 264));
*(_QWORD *)(a1 + 304) = v5;
*(_QWORD *)(a1 + 296) = v5;
*(_DWORD *)(a1 + 312) = v4;
*(_DWORD *)(a1 + 316) = *(_DWORD *)(a2 + 28);
*(_QWORD *)(a1 + 408) = *(_QWORD *)(a1 + 400);
*(_BYTE *)(a1 + 829) = 0;
*(_BYTE *)(a1 + 828) = 0;
return 0;
}
else
{
return (unsigned int)-1;
}
}
}
| _mi_search_last:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x20],-0x1
JNZ 0x001c2551
CALL 0x001f6090
MOV dword ptr [RAX],0x78
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],-0x1
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c26f7
LAB_001c2551:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100]
MOV qword ptr [RBP + -0x30],RAX
LAB_001c2560:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x30]
MOV ECX,0x3
XOR R9D,R9D
CALL 0x001be020
CMP RAX,0x0
JNZ 0x001c259e
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],-0x1
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c26f7
LAB_001c259e:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
MOV RDX,qword ptr [RBP + -0x30]
MOVZX EDX,byte ptr [RDX]
MOVZX EDX,DX
SHL EDX,0x8
OR ECX,EDX
MOVZX ECX,CX
AND ECX,0x7fff
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001c25f1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x17c]
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001c25f8
LAB_001c25f1:
XOR EAX,EAX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001c25f8
LAB_001c25f8:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x24],EAX
MOV EDI,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001bef90
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,-0x1
JNZ 0x001c2560
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x108]
MOV R8,qword ptr [RBP + -0x38]
MOV R9,qword ptr [RBP + -0x10]
ADD R9,0x1d8
CALL 0x001c19b0
CMP RAX,0x0
JNZ 0x001c2657
JMP 0x001c264b
LAB_001c264b:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c26f7
LAB_001c2657:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x108]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1d8]
ADD RDX,RAX
XOR ESI,ESI
CALL 0x001bf210
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x130],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x128],RCX
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x138],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x13c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x190]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x198],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33d],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33c],0x0
JMP 0x001c26ee
LAB_001c26ee:
JMP 0x001c26f0
LAB_001c26f0:
MOV dword ptr [RBP + -0x4],0x0
LAB_001c26f7:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 _mi_search_last(long *param_1,long param_2,long param_3)
{
byte *pbVar1;
int4 *puVar2;
long lVar3;
byte *pbVar4;
int4 local_44;
long local_28;
int4 local_c;
if (param_3 == -1) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x78;
param_1[0x2e] = -1;
local_c = 0xffffffff;
}
else {
pbVar1 = (byte *)param_1[0x20];
local_28 = param_3;
do {
lVar3 = _mi_fetch_keypage(param_1,param_2,local_28,3,pbVar1,0);
if (lVar3 == 0) {
param_1[0x2e] = -1;
return 0xffffffff;
}
pbVar4 = pbVar1 + ((uint)pbVar1[1] | (*pbVar1 & 0x7f) << 8);
if ((*pbVar1 & 0x80) == 0) {
local_44 = 0;
}
else {
local_44 = *(int4 *)(*param_1 + 0x17c);
}
local_28 = _mi_kpos(local_44,pbVar4);
} while (local_28 != -1);
lVar3 = _mi_get_last_key(param_1,param_2,pbVar1,param_1[0x21],pbVar4,param_1 + 0x3b);
if (lVar3 == 0) {
local_c = 0xffffffff;
}
else {
lVar3 = _mi_dpos(param_1,0,param_1[0x21] + (ulong)*(uint *)(param_1 + 0x3b));
param_1[0x2e] = lVar3;
param_1[0x26] = (long)pbVar4;
param_1[0x25] = (long)pbVar4;
*(int4 *)(param_1 + 0x27) = local_44;
*(int4 *)((long)param_1 + 0x13c) = *(int4 *)(param_2 + 0x1c);
param_1[0x33] = param_1[0x32];
*(int1 *)((long)param_1 + 0x33d) = 0;
*(int1 *)((long)param_1 + 0x33c) = 0;
local_c = 0;
}
}
return local_c;
}
| |
33,829 | ftb_check_phrase | eloqsql/storage/myisam/ft_boolean_search.c | static int _ftb_check_phrase(FTB *ftb, const uchar *document, uint len,
FTB_EXPR *ftbe, struct st_mysql_ftparser *parser)
{
MY_FTB_PHRASE_PARAM ftb_param;
MYSQL_FTPARSER_PARAM *param;
DBUG_ENTER("_ftb_check_phrase");
DBUG_ASSERT(parser);
if (! (param= ftparser_call_initializer(ftb->info, ftb->keynr, 1)))
DBUG_RETURN(0);
ftb_param.phrase= ftbe->phrase;
ftb_param.document= ftbe->document;
ftb_param.cs= ftb->charset;
ftb_param.phrase_length= list_length(ftbe->phrase);
ftb_param.document_length= 1;
ftb_param.match= 0;
param->mysql_parse= ftb_check_phrase_internal;
param->mysql_add_word= ftb_phrase_add_word;
param->mysql_ftparam= (void *)&ftb_param;
param->cs= ftb->charset;
param->doc= (char *) document;
param->length= len;
param->flags= 0;
param->mode= MYSQL_FTPARSER_WITH_STOPWORDS;
if (unlikely(parser->parse(param)))
return -1;
DBUG_RETURN(ftb_param.match ? 1 : 0);
} | O0 | c | ftb_check_phrase:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
jmp 0x9f4dd
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x340(%rax), %esi
movl $0x1, %edx
callq 0xa1e90
movq %rax, -0x60(%rbp)
cmpq $0x0, %rax
jne 0x9f511
jmp 0x9f505
movl $0x0, -0x4(%rbp)
jmp 0x9f5f7
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xdeb40
movl %eax, -0x40(%rbp)
movl $0x1, -0x3c(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x60(%rbp), %rax
leaq 0xa2(%rip), %rcx # 0x9f600
movq %rcx, (%rax)
movq -0x60(%rbp), %rax
leaq 0x114(%rip), %rcx # 0x9f680
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rax
leaq -0x58(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0x1c(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x60(%rbp), %rax
movl $0x0, 0x34(%rax)
movq -0x60(%rbp), %rax
movl $0x1, 0x38(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x60(%rbp), %rdi
callq *%rax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x9f5e2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9f5f7
jmp 0x9f5e4
movl -0x38(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
| _ftb_check_phrase:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
jmp short $+2
loc_9F4DD:
mov rax, [rbp+var_10]
mov rdi, [rax+8]
mov rax, [rbp+var_10]
mov esi, [rax+340h]
mov edx, 1
call ftparser_call_initializer
mov [rbp+var_60], rax
cmp rax, 0
jnz short loc_9F511
jmp short $+2
loc_9F505:
mov [rbp+var_4], 0
jmp loc_9F5F7
loc_9F511:
mov rax, [rbp+var_28]
mov rax, [rax+30h]
mov [rbp+var_58], rax
mov rax, [rbp+var_28]
mov rax, [rax+38h]
mov [rbp+var_50], rax
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov rdi, [rax+30h]
call list_length
mov [rbp+var_40], eax
mov [rbp+var_3C], 1
mov [rbp+var_38], 0
mov rax, [rbp+var_60]
lea rcx, ftb_check_phrase_internal
mov [rax], rcx
mov rax, [rbp+var_60]
lea rcx, ftb_phrase_add_word
mov [rax+8], rcx
mov rax, [rbp+var_60]
lea rcx, [rbp+var_58]
mov [rax+18h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
mov rax, [rbp+var_60]
mov [rax+20h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_60]
mov [rax+28h], rcx
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_60]
mov [rax+30h], ecx
mov rax, [rbp+var_60]
mov dword ptr [rax+34h], 0
mov rax, [rbp+var_60]
mov dword ptr [rax+38h], 1
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov rdi, [rbp+var_60]
call rax
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_9F5E2
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_9F5F7
loc_9F5E2:
jmp short $+2
loc_9F5E4:
mov edx, [rbp+var_38]
xor eax, eax
mov ecx, 1
cmp edx, 0
cmovnz eax, ecx
mov [rbp+var_4], eax
loc_9F5F7:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long ftb_check_phrase(long long a1, long long a2, int a3, long long a4, long long a5)
{
long long v6; // [rsp+0h] [rbp-60h]
_QWORD v7[3]; // [rsp+8h] [rbp-58h] BYREF
int v8; // [rsp+20h] [rbp-40h]
int v9; // [rsp+24h] [rbp-3Ch]
int v10; // [rsp+28h] [rbp-38h]
long long v11; // [rsp+30h] [rbp-30h]
long long v12; // [rsp+38h] [rbp-28h]
int v13; // [rsp+44h] [rbp-1Ch]
long long v14; // [rsp+48h] [rbp-18h]
long long v15; // [rsp+50h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v6 = ftparser_call_initializer(*(_QWORD *)(v15 + 8), *(unsigned int *)(v15 + 832), 1LL);
if ( v6 )
{
v7[0] = *(_QWORD *)(v12 + 48);
v7[1] = *(_QWORD *)(v12 + 56);
v7[2] = *(_QWORD *)(v15 + 16);
v8 = list_length(*(_QWORD *)(v12 + 48));
v9 = 1;
v10 = 0;
*(_QWORD *)v6 = ftb_check_phrase_internal;
*(_QWORD *)(v6 + 8) = ftb_phrase_add_word;
*(_QWORD *)(v6 + 24) = v7;
*(_QWORD *)(v6 + 32) = *(_QWORD *)(v15 + 16);
*(_QWORD *)(v6 + 40) = v14;
*(_DWORD *)(v6 + 48) = v13;
*(_DWORD *)(v6 + 52) = 0;
*(_DWORD *)(v6 + 56) = 1;
if ( (*(unsigned int ( **)(long long))(v11 + 8))(v6) )
return (unsigned int)-1;
else
return v10 != 0;
}
else
{
return 0;
}
}
| _ftb_check_phrase:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
JMP 0x0019f4dd
LAB_0019f4dd:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x340]
MOV EDX,0x1
CALL 0x001a1e90
MOV qword ptr [RBP + -0x60],RAX
CMP RAX,0x0
JNZ 0x0019f511
JMP 0x0019f505
LAB_0019f505:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0019f5f7
LAB_0019f511:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x30]
CALL 0x001deb40
MOV dword ptr [RBP + -0x40],EAX
MOV dword ptr [RBP + -0x3c],0x1
MOV dword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x60]
LEA RCX,[0x19f600]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x60]
LEA RCX,[0x19f680]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x60]
LEA RCX,[RBP + -0x58]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x28],RCX
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX + 0x30],ECX
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX + 0x34],0x0
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX + 0x38],0x1
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x60]
CALL RAX
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0019f5e2
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0019f5f7
LAB_0019f5e2:
JMP 0x0019f5e4
LAB_0019f5e4:
MOV EDX,dword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ECX,0x1
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_0019f5f7:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
uint _ftb_check_phrase(long param_1,int8 param_2,int4 param_3,long param_4,long param_5)
{
int iVar1;
int8 *puVar2;
int8 local_60;
int8 local_58;
int8 local_50;
int4 local_48;
int4 local_44;
int local_40;
long local_38;
long local_30;
int4 local_24;
int8 local_20;
long local_18;
uint local_c;
local_38 = param_5;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
puVar2 = (int8 *)
ftparser_call_initializer
(*(int8 *)(param_1 + 8),*(int4 *)(param_1 + 0x340),1);
if (puVar2 == (int8 *)0x0) {
local_c = 0;
}
else {
local_60 = *(int8 *)(local_30 + 0x30);
local_58 = *(int8 *)(local_30 + 0x38);
local_50 = *(int8 *)(local_18 + 0x10);
local_48 = list_length(*(int8 *)(local_30 + 0x30));
local_44 = 1;
local_40 = 0;
*puVar2 = ftb_check_phrase_internal;
puVar2[1] = ftb_phrase_add_word;
puVar2[3] = &local_60;
puVar2[4] = *(int8 *)(local_18 + 0x10);
puVar2[5] = local_20;
*(int4 *)(puVar2 + 6) = local_24;
*(int4 *)((long)puVar2 + 0x34) = 0;
*(int4 *)(puVar2 + 7) = 1;
iVar1 = (**(code **)(local_38 + 8))(puVar2);
if (iVar1 == 0) {
local_c = (uint)(local_40 != 0);
}
else {
local_c = 0xffffffff;
}
}
return local_c;
}
| |
33,830 | escape_quotes_for_mysql | eloqsql/mysys/charset.c | size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
char *to, size_t to_length,
const char *from, size_t length,
my_bool *overflow)
{
const char *to_start= to;
const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length);
#ifdef USE_MB
my_bool use_mb_flag= my_ci_use_mb(charset_info);
#endif
*overflow= FALSE;
for (end= from + length; from < end; from++)
{
#ifdef USE_MB
int tmp_length;
if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end)))
{
if (to + tmp_length > to_end)
{
*overflow= TRUE;
break;
}
while (tmp_length--)
*to++= *from++;
from--;
continue;
}
/*
We don't have the same issue here with a non-multi-byte character being
turned into a multi-byte character by the addition of an escaping
character, because we are only escaping the ' character with itself.
*/
#endif
if (*from == '\'')
{
if (to + 2 > to_end)
{
*overflow= TRUE;
break;
}
*to++= '\'';
*to++= '\'';
}
else
{
if (to + 1 > to_end)
{
*overflow= TRUE;
break;
}
*to++= *from;
}
}
*to= 0;
return (size_t) (to - to_start);
} | O3 | c | escape_quotes_for_mysql:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
leaq (%r8,%r8), %rax
subq $0x1, %r12
cmovbq %rax, %r12
movq %rdi, -0x40(%rbp)
movl 0x9c(%rdi), %r13d
movq %r9, -0x38(%rbp)
movb $0x0, (%r9)
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
testq %r8, %r8
jle 0x2b5db
movq %r8, %r15
movq %rcx, %r14
movq -0x30(%rbp), %rbx
addq %rbx, %r12
addq %rcx, %r15
cmpl $0x2, %r13d
jb 0x2b576
movq -0x40(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %r14, %rsi
movq %r15, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
jge 0x2b59b
movb (%r14), %cl
cmpb $0x27, %cl
jne 0x2b58e
leaq 0x2(%rbx), %rax
cmpq %r12, %rax
ja 0x2b5d1
movw $0x2727, (%rbx) # imm = 0x2727
jmp 0x2b5c4
leaq 0x1(%rbx), %rax
cmpq %r12, %rax
ja 0x2b5d1
movb %cl, (%rbx)
jmp 0x2b5c4
movl %eax, %ecx
movl %eax, %eax
addq %rbx, %rax
cmpq %r12, %rax
ja 0x2b5d1
decq %r14
movq %r14, %rdx
leaq 0x1(%rdx), %r14
leaq 0x1(%rbx), %rax
movb 0x1(%rdx), %dl
movb %dl, (%rbx)
movq %r14, %rdx
movq %rax, %rbx
decl %ecx
jne 0x2b5ad
incq %r14
movq %rax, %rbx
cmpq %r15, %r14
jb 0x2b554
jmp 0x2b5db
movq -0x38(%rbp), %rax
movb $0x1, (%rax)
movq %rbx, %rax
movb $0x0, (%rax)
subq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| escape_quotes_for_mysql:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, rdx
lea rax, [r8+r8]
sub r12, 1
cmovb r12, rax
mov [rbp+var_40], rdi
mov r13d, [rdi+9Ch]
mov [rbp+var_38], r9
mov byte ptr [r9], 0
mov [rbp+var_30], rsi
mov rax, rsi
test r8, r8
jle loc_2B5DB
mov r15, r8
mov r14, rcx
mov rbx, [rbp+var_30]
add r12, rbx
add r15, rcx
loc_2B554:
cmp r13d, 2
jb short loc_2B576
mov rdi, [rbp+var_40]
mov rax, [rdi+0B8h]
mov rsi, r14
mov rdx, r15
call qword ptr [rax+0C0h]
cmp eax, 2
jge short loc_2B59B
loc_2B576:
mov cl, [r14]
cmp cl, 27h ; '''
jnz short loc_2B58E
lea rax, [rbx+2]
cmp rax, r12
ja short loc_2B5D1
mov word ptr [rbx], 2727h
jmp short loc_2B5C4
loc_2B58E:
lea rax, [rbx+1]
cmp rax, r12
ja short loc_2B5D1
mov [rbx], cl
jmp short loc_2B5C4
loc_2B59B:
mov ecx, eax
mov eax, eax
add rax, rbx
cmp rax, r12
ja short loc_2B5D1
dec r14
mov rdx, r14
loc_2B5AD:
lea r14, [rdx+1]
lea rax, [rbx+1]
mov dl, [rdx+1]
mov [rbx], dl
mov rdx, r14
mov rbx, rax
dec ecx
jnz short loc_2B5AD
loc_2B5C4:
inc r14
mov rbx, rax
cmp r14, r15
jb short loc_2B554
jmp short loc_2B5DB
loc_2B5D1:
mov rax, [rbp+var_38]
mov byte ptr [rax], 1
mov rax, rbx
loc_2B5DB:
mov byte ptr [rax], 0
sub rax, [rbp+var_30]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BYTE * escape_quotes_for_mysql(long long a1, _BYTE *a2, long long a3, _BYTE *a4, long long a5, _BYTE *a6)
{
long long v6; // r12
unsigned int v7; // r13d
_BYTE *v8; // rax
_BYTE *v9; // r14
_WORD *v10; // rbx
unsigned long long v11; // r12
unsigned long long v12; // r15
int v13; // eax
int v14; // ecx
_BYTE *v15; // rdx
v6 = a3 - 1;
if ( !a3 )
v6 = 2 * a5;
v7 = *(_DWORD *)(a1 + 156);
*a6 = 0;
v8 = a2;
if ( a5 > 0 )
{
v9 = a4;
v10 = a2;
v11 = (unsigned long long)&a2[v6];
v12 = (unsigned long long)&a4[a5];
do
{
if ( v7 >= 2
&& (v13 = (*(long long ( **)(long long, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v9,
v12),
v13 >= 2) )
{
v14 = v13;
if ( (unsigned long long)v10 + (unsigned int)v13 > v11 )
{
LABEL_17:
*a6 = 1;
v8 = v10;
break;
}
v15 = v9 - 1;
do
{
v9 = v15 + 1;
v8 = (char *)v10 + 1;
*(_BYTE *)v10 = *++v15;
v10 = (_WORD *)((char *)v10 + 1);
--v14;
}
while ( v14 );
}
else if ( *v9 == 39 )
{
v8 = v10 + 1;
if ( (unsigned long long)(v10 + 1) > v11 )
goto LABEL_17;
*v10 = 10023;
}
else
{
v8 = (char *)v10 + 1;
if ( (unsigned long long)v10 + 1 > v11 )
goto LABEL_17;
*(_BYTE *)v10 = *v9;
}
++v9;
v10 = v8;
}
while ( (unsigned long long)v9 < v12 );
}
*v8 = 0;
return (_BYTE *)(v8 - a2);
}
| escape_quotes_for_mysql:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,RDX
LEA RAX,[R8 + R8*0x1]
SUB R12,0x1
CMOVC R12,RAX
MOV qword ptr [RBP + -0x40],RDI
MOV R13D,dword ptr [RDI + 0x9c]
MOV qword ptr [RBP + -0x38],R9
MOV byte ptr [R9],0x0
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
TEST R8,R8
JLE 0x0012b5db
MOV R15,R8
MOV R14,RCX
MOV RBX,qword ptr [RBP + -0x30]
ADD R12,RBX
ADD R15,RCX
LAB_0012b554:
CMP R13D,0x2
JC 0x0012b576
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R14
MOV RDX,R15
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
JGE 0x0012b59b
LAB_0012b576:
MOV CL,byte ptr [R14]
CMP CL,0x27
JNZ 0x0012b58e
LEA RAX,[RBX + 0x2]
CMP RAX,R12
JA 0x0012b5d1
MOV word ptr [RBX],0x2727
JMP 0x0012b5c4
LAB_0012b58e:
LEA RAX,[RBX + 0x1]
CMP RAX,R12
JA 0x0012b5d1
MOV byte ptr [RBX],CL
JMP 0x0012b5c4
LAB_0012b59b:
MOV ECX,EAX
MOV EAX,EAX
ADD RAX,RBX
CMP RAX,R12
JA 0x0012b5d1
DEC R14
MOV RDX,R14
LAB_0012b5ad:
LEA R14,[RDX + 0x1]
LEA RAX,[RBX + 0x1]
MOV DL,byte ptr [RDX + 0x1]
MOV byte ptr [RBX],DL
MOV RDX,R14
MOV RBX,RAX
DEC ECX
JNZ 0x0012b5ad
LAB_0012b5c4:
INC R14
MOV RBX,RAX
CMP R14,R15
JC 0x0012b554
JMP 0x0012b5db
LAB_0012b5d1:
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x1
MOV RAX,RBX
LAB_0012b5db:
MOV byte ptr [RAX],0x0
SUB RAX,qword ptr [RBP + -0x30]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long escape_quotes_for_mysql
(long param_1,char *param_2,long param_3,char *param_4,long param_5,
int1 *param_6)
{
uint uVar1;
uint uVar2;
char *pcVar3;
char *pcVar4;
char *pcVar5;
long lVar6;
char *pcVar7;
char *pcVar8;
lVar6 = param_3 + -1;
if (param_3 == 0) {
lVar6 = param_5 * 2;
}
uVar1 = *(uint *)(param_1 + 0x9c);
*param_6 = 0;
pcVar3 = param_2;
if (0 < param_5) {
pcVar7 = param_2 + lVar6;
pcVar8 = param_4 + param_5;
pcVar5 = param_2;
do {
if ((uVar1 < 2) ||
(uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_4,pcVar8),
(int)uVar2 < 2)) {
if (*param_4 == '\'') {
pcVar3 = pcVar5 + 2;
if (pcVar7 < pcVar3) {
LAB_0012b5d1:
*param_6 = 1;
pcVar3 = pcVar5;
break;
}
pcVar5[0] = '\'';
pcVar5[1] = '\'';
}
else {
pcVar3 = pcVar5 + 1;
if (pcVar7 < pcVar3) goto LAB_0012b5d1;
*pcVar5 = *param_4;
}
}
else {
if (pcVar7 < pcVar5 + uVar2) goto LAB_0012b5d1;
pcVar4 = param_4 + -1;
do {
param_4 = pcVar4 + 1;
pcVar3 = pcVar5 + 1;
*pcVar5 = pcVar4[1];
uVar2 = uVar2 - 1;
pcVar4 = param_4;
pcVar5 = pcVar3;
} while (uVar2 != 0);
}
param_4 = param_4 + 1;
pcVar5 = pcVar3;
} while (param_4 < pcVar8);
}
*pcVar3 = '\0';
return (long)pcVar3 - (long)param_2;
}
| |
33,831 | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::decode(unsigned char&, unsigned int&, unsigned char) | llama.cpp/common/json.hpp | static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, const std::uint8_t byte) noexcept
{
static const std::array<std::uint8_t, 400> utf8d =
{
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF
8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF
0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF
0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF
0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2
1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4
1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6
1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8
}
};
JSON_ASSERT(byte < utf8d.size());
const std::uint8_t type = utf8d[byte];
codep = (state != UTF8_ACCEPT)
? (byte & 0x3fu) | (codep << 6u)
: (0xFFu >> type) & (byte);
const std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type);
JSON_ASSERT(index < utf8d.size());
state = utf8d[index];
return state;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::decode(unsigned char&, unsigned int&, unsigned char):
pushq %rax
movl %edx, %ecx
leaq 0x9de31(%rip), %rax # 0x1202d9
movzbl (%rax,%rcx), %ecx
cmpb $0x0, (%rdi)
je 0x824c2
andb $0x3f, %dl
movzbl %dl, %r8d
movl (%rsi), %edx
shll $0x6, %edx
orl %r8d, %edx
jmp 0x824d1
movl $0xff, %r8d
shrl %cl, %r8d
movzbl %dl, %edx
andl %r8d, %edx
movl %edx, (%rsi)
movzbl (%rdi), %edx
shll $0x4, %edx
movl %ecx, %ecx
addq %rdx, %rcx
addq $0x100, %rcx # imm = 0x100
cmpq $0x190, %rcx # imm = 0x190
jae 0x824f5
movb (%rax,%rcx), %al
movb %al, (%rdi)
popq %rcx
retq
leaq 0x9a884(%rip), %rdi # 0x11cd80
leaq 0x92ca8(%rip), %rdx # 0x1151ab
leaq 0x9bc39(%rip), %rcx # 0x11e143
movl $0x49fb, %esi # imm = 0x49FB
xorl %eax, %eax
callq 0x20ed0
movq %rax, %rdi
callq 0x2a257
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE6decodeERhRjh:
push rax
mov ecx, edx
lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE6decodeERhRjhE5utf8d; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::decode(uchar &,uint &,uchar)::utf8d
movzx ecx, byte ptr [rax+rcx]
cmp byte ptr [rdi], 0
jz short loc_824C2
and dl, 3Fh
movzx r8d, dl
mov edx, [rsi]
shl edx, 6
or edx, r8d
jmp short loc_824D1
loc_824C2:
mov r8d, 0FFh
shr r8d, cl
movzx edx, dl
and edx, r8d
loc_824D1:
mov [rsi], edx
movzx edx, byte ptr [rdi]
shl edx, 4
mov ecx, ecx
add rcx, rdx
add rcx, 100h
cmp rcx, 190h
jnb short loc_824F5
mov al, [rax+rcx]
mov [rdi], al
pop rcx
retn
loc_824F5:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIndexUtf8dSize; "index < utf8d.size()"
mov esi, 49FBh
xor eax, eax
call _ggml_abort
mov rdi, rax
call __clang_call_terminate
| unsigned __int8 nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::decode(
unsigned __int8 *a1,
unsigned int *a2,
int a3)
{
unsigned int v3; // ecx
unsigned int v4; // edx
unsigned long long v5; // rcx
unsigned __int8 result; // al
void *v7; // rax
v3 = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::decode(unsigned char &,unsigned int &,unsigned char)::utf8d[a3];
if ( *a1 )
v4 = a3 & 0x3F | (*a2 << 6);
else
v4 = (0xFFu >> v3) & (unsigned __int8)a3;
*a2 = v4;
v5 = 16 * (unsigned int)*a1 + (unsigned long long)v3 + 256;
if ( v5 >= 0x190 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
18939LL,
"GGML_ASSERT(%s) failed",
"index < utf8d.size()");
_clang_call_terminate(v7);
}
result = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::decode(unsigned char &,unsigned int &,unsigned char)::utf8d[v5];
*a1 = result;
return result;
}
| decode:
PUSH RAX
MOV ECX,EDX
LEA RAX,[0x2202d9]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
CMP byte ptr [RDI],0x0
JZ 0x001824c2
AND DL,0x3f
MOVZX R8D,DL
MOV EDX,dword ptr [RSI]
SHL EDX,0x6
OR EDX,R8D
JMP 0x001824d1
LAB_001824c2:
MOV R8D,0xff
SHR R8D,CL
MOVZX EDX,DL
AND EDX,R8D
LAB_001824d1:
MOV dword ptr [RSI],EDX
MOVZX EDX,byte ptr [RDI]
SHL EDX,0x4
MOV ECX,ECX
ADD RCX,RDX
ADD RCX,0x100
CMP RCX,0x190
JNC 0x001824f5
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RDI],AL
POP RCX
RET
LAB_001824f5:
LEA RDI,[0x21cd80]
LEA RDX,[0x2151ab]
LEA RCX,[0x21e143]
MOV ESI,0x49fb
XOR EAX,EAX
CALL 0x00120ed0
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::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> >::decode(unsigned char&, unsigned int&, unsigned char) */
void nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>
::decode(uchar *param_1,uint *param_2,uchar param_3)
{
byte bVar1;
long lVar2;
uint uVar3;
int7 in_register_00000011;
bVar1 = decode(unsigned_char&,unsigned_int&,unsigned_char)::utf8d
[CONCAT71(in_register_00000011,param_3) & 0xffffffff];
if (*param_1 == '\0') {
uVar3 = (uint)param_3 & 0xffU >> (bVar1 & 0x1f);
}
else {
uVar3 = *param_2 << 6 | (uint)(param_3 & 0x3f);
}
*param_2 = uVar3;
lVar2 = (ulong)bVar1 + (ulong)*param_1 * 0x10;
if (lVar2 + 0x100U < 400) {
*param_1 = decode(unsigned_char&,unsigned_int&,unsigned_char)::utf8d[lVar2 + 0x100];
return;
}
/* try { // try from 001824f5 to 00182515 has its CatchHandler @ 00182516 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x49fb,
"GGML_ASSERT(%s) failed","index < utf8d.size()");
}
| |
33,832 | trnman_init | eloqsql/storage/maria/trnman.c | int trnman_init(TrID initial_trid)
{
DBUG_ENTER("trnman_init");
DBUG_PRINT("enter", ("initial_trid: %lu", (ulong) initial_trid));
short_trid_to_active_trn= (TRN **)my_malloc(PSI_INSTRUMENT_ME, SHORT_TRID_MAX*sizeof(TRN*),
MYF(MY_WME|MY_ZEROFILL));
if (unlikely(!short_trid_to_active_trn))
DBUG_RETURN(1);
short_trid_to_active_trn--; /* min short_id is 1 */
/*
Initialize lists.
active_list_max.min_read_from must be larger than any trid,
so that when an active list is empty we would could free
all committed list.
And committed_list_max itself can not be freed so
committed_list_max.commit_trid must not be smaller that
active_list_max.min_read_from
*/
active_list_max.trid= active_list_min.trid= 0;
active_list_max.min_read_from= MAX_TRID;
active_list_max.next= active_list_min.prev= 0;
active_list_max.prev= &active_list_min;
active_list_min.next= &active_list_max;
committed_list_max.commit_trid= MAX_TRID;
committed_list_max.next= committed_list_min.prev= 0;
committed_list_max.prev= &committed_list_min;
committed_list_min.next= &committed_list_max;
trnman_active_transactions= 0;
trnman_committed_transactions= 0;
trnman_allocated_transactions= 0;
/* This is needed for recovery and repair */
dummy_transaction_object.min_read_from= ~(TrID) 0;
dummy_transaction_object.first_undo_lsn= TRANSACTION_LOGGED_LONG_ID;
pool= 0;
global_trid_generator= initial_trid;
trid_min_read_from= initial_trid;
lf_hash_init(&trid_to_trn, sizeof(TRN*), LF_HASH_UNIQUE,
0, 0, trn_get_hash_key, 0);
DBUG_PRINT("info", ("mysql_mutex_init LOCK_trn_list"));
mysql_mutex_init(key_LOCK_trn_list, &LOCK_trn_list, MY_MUTEX_INIT_FAST);
DBUG_RETURN(0);
} | O0 | c | trnman_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
jmp 0x7399e
xorl %edi, %edi
movl $0x7fff8, %esi # imm = 0x7FFF8
movl $0x30, %edx
callq 0xf5190
movq %rax, 0x40640a(%rip) # 0x479dc0
cmpq $0x0, 0x406402(%rip) # 0x479dc0
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x739e9
jmp 0x739dd
movl $0x1, -0x4(%rbp)
jmp 0x73b46
movq 0x4063d0(%rip), %rax # 0x479dc0
addq $-0x8, %rax
movq %rax, 0x4063c5(%rip) # 0x479dc0
movq $0x0, 0x40643a(%rip) # 0x479e40
movq $0x0, 0x4064df(%rip) # 0x479ef0
movq $-0x1, 0x4064dc(%rip) # 0x479ef8
movq $0x0, 0x406411(%rip) # 0x479e38
movq $0x0, 0x4064ae(%rip) # 0x479ee0
leaq 0x40638f(%rip), %rax # 0x479dc8
movq %rax, 0x4064a8(%rip) # 0x479ee8
leaq 0x406431(%rip), %rax # 0x479e78
movq %rax, 0x4063e2(%rip) # 0x479e30
movq $-0x1, 0x406557(%rip) # 0x479fb0
movq $0x0, 0x4065e4(%rip) # 0x47a048
movq $0x0, 0x406521(%rip) # 0x479f90
leaq 0x406562(%rip), %rax # 0x479fd8
movq %rax, 0x40651b(%rip) # 0x479f98
leaq 0x4064a4(%rip), %rax # 0x479f28
movq %rax, 0x4065b5(%rip) # 0x47a040
movl $0x0, 0x4065f3(%rip) # 0x47a088
movl $0x0, 0x4065ed(%rip) # 0x47a08c
movl $0x0, 0x4065e7(%rip) # 0x47a090
leaq 0x406180(%rip), %rax # 0x479c30
movq $-0x1, 0x80(%rax)
leaq 0x40616e(%rip), %rax # 0x479c30
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movq %rcx, 0xa0(%rax)
movq $0x0, 0x4065ba(%rip) # 0x47a098
movq -0x10(%rbp), %rax
movq %rax, 0x4065b7(%rip) # 0x47a0a0
movq -0x10(%rbp), %rax
movq %rax, 0x24a724(%rip) # 0x2be218
leaq 0x4065ad(%rip), %rdi # 0x47a0a8
movl $0x8, %esi
movl $0x1, %edx
xorl %r8d, %r8d
leaq 0x41(%rip), %r9 # 0x73b50
xorl %eax, %eax
movl %r8d, %ecx
movq $0x0, (%rsp)
callq 0xfed80
jmp 0x73b23
leaq 0x4061f6(%rip), %rax # 0x479d20
movl (%rax), %edi
leaq 0x40663d(%rip), %rsi # 0x47a170
leaq 0xc11b56(%rip), %rdx # 0xc85690
callq 0x73b80
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
| trnman_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
jmp short $+2
loc_7399E:
xor edi, edi
mov esi, 7FFF8h
mov edx, 30h ; '0'
call my_malloc
mov cs:short_trid_to_active_trn, rax
cmp cs:short_trid_to_active_trn, 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_739E9
jmp short $+2
loc_739DD:
mov [rbp+var_4], 1
jmp loc_73B46
loc_739E9:
mov rax, cs:short_trid_to_active_trn
add rax, 0FFFFFFFFFFFFFFF8h
mov cs:short_trid_to_active_trn, rax
mov cs:qword_479E40, 0
mov cs:qword_479EF0, 0
mov cs:qword_479EF8, 0FFFFFFFFFFFFFFFFh
mov cs:qword_479E38, 0
mov cs:qword_479EE0, 0
lea rax, active_list_min
mov cs:qword_479EE8, rax
lea rax, active_list_max
mov cs:qword_479E30, rax
mov cs:qword_479FB0, 0FFFFFFFFFFFFFFFFh
mov cs:qword_47A048, 0
mov cs:qword_479F90, 0
lea rax, committed_list_min
mov cs:qword_479F98, rax
lea rax, committed_list_max
mov cs:qword_47A040, rax
mov cs:trnman_active_transactions, 0
mov cs:trnman_committed_transactions, 0
mov cs:trnman_allocated_transactions, 0
lea rax, dummy_transaction_object
mov qword ptr [rax+80h], 0FFFFFFFFFFFFFFFFh
lea rax, dummy_transaction_object
mov rcx, 8000000000000000h
mov [rax+0A0h], rcx
mov cs:pool, 0
mov rax, [rbp+var_10]
mov cs:global_trid_generator, rax
mov rax, [rbp+var_10]
mov cs:trid_min_read_from, rax
lea rdi, trid_to_trn
mov esi, 8
mov edx, 1
xor r8d, r8d
lea r9, trn_get_hash_key
xor eax, eax
mov ecx, r8d
mov [rsp+20h+var_20], 0
call lf_hash_init
jmp short $+2
loc_73B23:
lea rax, key_LOCK_trn_list
mov edi, [rax]
lea rsi, LOCK_trn_list
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_2
mov [rbp+var_4], 0
loc_73B46:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long trnman_init(long long a1)
{
short_trid_to_active_trn = my_malloc(0LL, 524280LL, 48LL);
if ( short_trid_to_active_trn )
{
short_trid_to_active_trn -= 8LL;
qword_479E40 = 0LL;
qword_479EF0 = 0LL;
qword_479EF8 = -1LL;
qword_479E38 = 0LL;
qword_479EE0 = 0LL;
qword_479EE8 = (long long)&active_list_min;
qword_479E30 = (long long)&active_list_max;
qword_479FB0 = -1LL;
qword_47A048 = 0LL;
qword_479F90 = 0LL;
qword_479F98 = (long long)&committed_list_min;
qword_47A040 = (long long)&committed_list_max;
trnman_active_transactions = 0;
trnman_committed_transactions = 0;
trnman_allocated_transactions = 0;
dummy_transaction_object[16] = -1LL;
dummy_transaction_object[20] = 0x8000000000000000LL;
pool = 0LL;
global_trid_generator = a1;
trid_min_read_from = a1;
lf_hash_init((unsigned int)&trid_to_trn, 8, 1, 0, 0, (unsigned int)trn_get_hash_key, 0LL);
inline_mysql_mutex_init_2(key_LOCK_trn_list, &LOCK_trn_list, &my_fast_mutexattr);
return 0;
}
else
{
return 1;
}
}
| trnman_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
JMP 0x0017399e
LAB_0017399e:
XOR EDI,EDI
MOV ESI,0x7fff8
MOV EDX,0x30
CALL 0x001f5190
MOV qword ptr [0x00579dc0],RAX
CMP qword ptr [0x00579dc0],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001739e9
JMP 0x001739dd
LAB_001739dd:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00173b46
LAB_001739e9:
MOV RAX,qword ptr [0x00579dc0]
ADD RAX,-0x8
MOV qword ptr [0x00579dc0],RAX
MOV qword ptr [0x00579e40],0x0
MOV qword ptr [0x00579ef0],0x0
MOV qword ptr [0x00579ef8],-0x1
MOV qword ptr [0x00579e38],0x0
MOV qword ptr [0x00579ee0],0x0
LEA RAX,[0x579dc8]
MOV qword ptr [0x00579ee8],RAX
LEA RAX,[0x579e78]
MOV qword ptr [0x00579e30],RAX
MOV qword ptr [0x00579fb0],-0x1
MOV qword ptr [0x0057a048],0x0
MOV qword ptr [0x00579f90],0x0
LEA RAX,[0x579fd8]
MOV qword ptr [0x00579f98],RAX
LEA RAX,[0x579f28]
MOV qword ptr [0x0057a040],RAX
MOV dword ptr [0x0057a088],0x0
MOV dword ptr [0x0057a08c],0x0
MOV dword ptr [0x0057a090],0x0
LEA RAX,[0x579c30]
MOV qword ptr [RAX + 0x80],-0x1
LEA RAX,[0x579c30]
MOV RCX,-0x8000000000000000
MOV qword ptr [RAX + 0xa0],RCX
MOV qword ptr [0x0057a098],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [0x0057a0a0],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [0x003be218],RAX
LEA RDI,[0x57a0a8]
MOV ESI,0x8
MOV EDX,0x1
XOR R8D,R8D
LEA R9,[0x173b50]
XOR EAX,EAX
MOV ECX,R8D
MOV qword ptr [RSP],0x0
CALL 0x001fed80
JMP 0x00173b23
LAB_00173b23:
LEA RAX,[0x579d20]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x57a170]
LEA RDX,[0xd85690]
CALL 0x00173b80
MOV dword ptr [RBP + -0x4],0x0
LAB_00173b46:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
bool trnman_init(int8 param_1)
{
long lVar1;
lVar1 = my_malloc(0,0x7fff8,0x30);
if (lVar1 != 0) {
short_trid_to_active_trn = lVar1 + -8;
active_list_min._120_8_ = 0;
active_list_max._120_8_ = 0;
active_list_max._128_8_ = 0xffffffffffffffff;
active_list_min._112_8_ = 0;
active_list_max._104_8_ = 0;
active_list_max._112_8_ = active_list_min;
active_list_min._104_8_ = active_list_max;
committed_list_max._136_8_ = 0xffffffffffffffff;
committed_list_min._112_8_ = 0;
committed_list_max._104_8_ = 0;
committed_list_max._112_8_ = committed_list_min;
committed_list_min._104_8_ = committed_list_max;
trnman_active_transactions = 0;
trnman_committed_transactions = 0;
trnman_allocated_transactions = 0;
dummy_transaction_object._128_8_ = 0xffffffffffffffff;
dummy_transaction_object._160_8_ = 0x8000000000000000;
pool = 0;
trid_min_read_from = param_1;
global_trid_generator = param_1;
lf_hash_init(trid_to_trn,8,1,0,0,trn_get_hash_key,0);
inline_mysql_mutex_init(key_LOCK_trn_list,LOCK_trn_list,&my_fast_mutexattr);
}
else {
short_trid_to_active_trn = 0;
}
return lVar1 == 0;
}
| |
33,833 | trnman_init | eloqsql/storage/maria/trnman.c | int trnman_init(TrID initial_trid)
{
DBUG_ENTER("trnman_init");
DBUG_PRINT("enter", ("initial_trid: %lu", (ulong) initial_trid));
short_trid_to_active_trn= (TRN **)my_malloc(PSI_INSTRUMENT_ME, SHORT_TRID_MAX*sizeof(TRN*),
MYF(MY_WME|MY_ZEROFILL));
if (unlikely(!short_trid_to_active_trn))
DBUG_RETURN(1);
short_trid_to_active_trn--; /* min short_id is 1 */
/*
Initialize lists.
active_list_max.min_read_from must be larger than any trid,
so that when an active list is empty we would could free
all committed list.
And committed_list_max itself can not be freed so
committed_list_max.commit_trid must not be smaller that
active_list_max.min_read_from
*/
active_list_max.trid= active_list_min.trid= 0;
active_list_max.min_read_from= MAX_TRID;
active_list_max.next= active_list_min.prev= 0;
active_list_max.prev= &active_list_min;
active_list_min.next= &active_list_max;
committed_list_max.commit_trid= MAX_TRID;
committed_list_max.next= committed_list_min.prev= 0;
committed_list_max.prev= &committed_list_min;
committed_list_min.next= &committed_list_max;
trnman_active_transactions= 0;
trnman_committed_transactions= 0;
trnman_allocated_transactions= 0;
/* This is needed for recovery and repair */
dummy_transaction_object.min_read_from= ~(TrID) 0;
dummy_transaction_object.first_undo_lsn= TRANSACTION_LOGGED_LONG_ID;
pool= 0;
global_trid_generator= initial_trid;
trid_min_read_from= initial_trid;
lf_hash_init(&trid_to_trn, sizeof(TRN*), LF_HASH_UNIQUE,
0, 0, trn_get_hash_key, 0);
DBUG_PRINT("info", ("mysql_mutex_init LOCK_trn_list"));
mysql_mutex_init(key_LOCK_trn_list, &LOCK_trn_list, MY_MUTEX_INIT_FAST);
DBUG_RETURN(0);
} | O3 | c | trnman_init:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
xorl %ebx, %ebx
pushq $0x30
popq %rdx
movl $0x7fff8, %esi # imm = 0x7FFF8
xorl %edi, %edi
callq 0xa1359
movq %rax, 0x3d495d(%rip) # 0x3ff150
testq %rax, %rax
je 0x2a93f
andq $0x0, 0x3d49cc(%rip) # 0x3ff1d0
andq $0x0, 0x3d4a74(%rip) # 0x3ff280
addq $-0x8, %rax
orq $-0x1, 0x3d4a70(%rip) # 0x3ff288
movq %rax, 0x3d4931(%rip) # 0x3ff150
andq $0x0, 0x3d49a1(%rip) # 0x3ff1c8
leaq 0x3d492a(%rip), %rax # 0x3ff158
andq $0x0, 0x3d4a3a(%rip) # 0x3ff270
leaq 0x3d49cb(%rip), %rcx # 0x3ff208
orq $-0x1, 0x3d4afb(%rip) # 0x3ff340
movq %rax, 0x3d4a2c(%rip) # 0x3ff278
andq $0x0, 0x3d4b84(%rip) # 0x3ff3d8
movq %rcx, 0x3d4965(%rip) # 0x3ff1c0
andq $0x0, 0x3d4abd(%rip) # 0x3ff320
leaq 0x3d4a4e(%rip), %rax # 0x3ff2b8
andl $0x0, 0x3d4ba7(%rip) # 0x3ff418
leaq 0x3d4af0(%rip), %rcx # 0x3ff368
andl $0x0, 0x3d4b9d(%rip) # 0x3ff41c
movq %rcx, 0x3d4aa2(%rip) # 0x3ff328
andl $0x0, 0x3d4b93(%rip) # 0x3ff420
leaq 0x3d472c(%rip), %rcx # 0x3fefc0
orq $-0x1, 0x80(%rcx)
movq %rax, 0x3d4b2d(%rip) # 0x3ff3d0
andq $0x0, 0x3d4b7d(%rip) # 0x3ff428
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0xa0(%rcx)
movq %r14, 0x3d4b6d(%rip) # 0x3ff430
movq %r14, 0x35a8be(%rip) # 0x385188
andq $0x0, (%rsp)
leaq 0x3d4b62(%rip), %rdi # 0x3ff438
leaq 0x31610(%rip), %r9 # 0x5beed
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xa728c
leaq 0x3d47bc(%rip), %rax # 0x3ff0b0
movl (%rax), %edi
leaq 0x35c753(%rip), %rax # 0x387050
movq (%rax), %rax
leaq 0x3d4bf9(%rip), %r14 # 0x3ff500
movq %r14, %rsi
callq *0x40(%rax)
movq %rax, 0x3d4c2c(%rip) # 0x3ff540
movq %r14, 0x3d4c1d(%rip) # 0x3ff538
xorps %xmm0, %xmm0
movups %xmm0, 0x3d4c03(%rip) # 0x3ff528
leaq 0xbe00f4(%rip), %rsi # 0xc0aa20
movq %r14, %rdi
callq 0x292f0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x1
popq %rbx
jmp 0x2a934
| trnman_init:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov r14, rdi
xor ebx, ebx
push 30h ; '0'
pop rdx
mov esi, 7FFF8h
xor edi, edi
call my_malloc
mov cs:short_trid_to_active_trn, rax
test rax, rax
jz loc_2A93F
and cs:qword_3FF1D0, 0
and cs:qword_3FF280, 0
add rax, 0FFFFFFFFFFFFFFF8h
or cs:qword_3FF288, 0FFFFFFFFFFFFFFFFh
mov cs:short_trid_to_active_trn, rax
and cs:qword_3FF1C8, 0
lea rax, active_list_min
and cs:qword_3FF270, 0
lea rcx, active_list_max
or cs:qword_3FF340, 0FFFFFFFFFFFFFFFFh
mov cs:qword_3FF278, rax
and cs:qword_3FF3D8, 0
mov cs:qword_3FF1C0, rcx
and cs:qword_3FF320, 0
lea rax, committed_list_max
and cs:trnman_active_transactions, 0
lea rcx, committed_list_min
and cs:trnman_committed_transactions, 0
mov cs:qword_3FF328, rcx
and cs:trnman_allocated_transactions, 0
lea rcx, dummy_transaction_object
or qword ptr [rcx+80h], 0FFFFFFFFFFFFFFFFh
mov cs:qword_3FF3D0, rax
and cs:pool, 0
mov rax, 8000000000000000h
mov [rcx+0A0h], rax
mov cs:global_trid_generator, r14
mov cs:trid_min_read_from, r14
and [rsp+20h+var_20], 0
lea rdi, trid_to_trn
lea r9, trn_get_hash_key
push 8
pop rsi
push 1
pop rdx
xor ecx, ecx
xor r8d, r8d
call lf_hash_init
lea rax, key_LOCK_trn_list
mov edi, [rax]
lea rax, PSI_server
mov rax, [rax]
lea r14, LOCK_trn_list
mov rsi, r14
call qword ptr [rax+40h]
mov cs:qword_3FF540, rax
mov cs:qword_3FF538, r14
xorps xmm0, xmm0
movups cs:xmmword_3FF528, xmm0
lea rsi, my_fast_mutexattr
mov rdi, r14
call _pthread_mutex_init
loc_2A934:
mov eax, ebx
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
loc_2A93F:
push 1
pop rbx
jmp short loc_2A934
| long long trnman_init(long long a1)
{
unsigned int v1; // ebx
long long v2; // rax
v1 = 0;
v2 = my_malloc(0LL, 524280LL, 48LL);
short_trid_to_active_trn = v2;
if ( v2 )
{
qword_3FF1D0 = 0LL;
qword_3FF280 = 0LL;
qword_3FF288 = -1LL;
short_trid_to_active_trn = v2 - 8;
qword_3FF1C8 = 0LL;
qword_3FF270 = 0LL;
qword_3FF340 = -1LL;
qword_3FF278 = (long long)&active_list_min;
qword_3FF3D8 = 0LL;
qword_3FF1C0 = (long long)&active_list_max;
qword_3FF320 = 0LL;
trnman_active_transactions = 0;
trnman_committed_transactions = 0;
qword_3FF328 = (long long)&committed_list_min;
trnman_allocated_transactions = 0;
dummy_transaction_object[16] = -1LL;
qword_3FF3D0 = (long long)&committed_list_max;
pool = 0LL;
dummy_transaction_object[20] = 0x8000000000000000LL;
global_trid_generator = a1;
trid_min_read_from = a1;
lf_hash_init((unsigned int)&trid_to_trn, 8, 1, 0, 0, (unsigned int)trn_get_hash_key, 0LL);
qword_3FF540 = ((long long ( *)(_QWORD, void *))PSI_server[8])(key_LOCK_trn_list, &LOCK_trn_list);
qword_3FF538 = (long long)&LOCK_trn_list;
xmmword_3FF528 = 0LL;
pthread_mutex_init(&LOCK_trn_list, &my_fast_mutexattr);
}
else
{
return 1;
}
return v1;
}
| trnman_init:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDI
XOR EBX,EBX
PUSH 0x30
POP RDX
MOV ESI,0x7fff8
XOR EDI,EDI
CALL 0x001a1359
MOV qword ptr [0x004ff150],RAX
TEST RAX,RAX
JZ 0x0012a93f
AND qword ptr [0x004ff1d0],0x0
AND qword ptr [0x004ff280],0x0
ADD RAX,-0x8
OR qword ptr [0x004ff288],-0x1
MOV qword ptr [0x004ff150],RAX
AND qword ptr [0x004ff1c8],0x0
LEA RAX,[0x4ff158]
AND qword ptr [0x004ff270],0x0
LEA RCX,[0x4ff208]
OR qword ptr [0x004ff340],-0x1
MOV qword ptr [0x004ff278],RAX
AND qword ptr [0x004ff3d8],0x0
MOV qword ptr [0x004ff1c0],RCX
AND qword ptr [0x004ff320],0x0
LEA RAX,[0x4ff2b8]
AND dword ptr [0x004ff418],0x0
LEA RCX,[0x4ff368]
AND dword ptr [0x004ff41c],0x0
MOV qword ptr [0x004ff328],RCX
AND dword ptr [0x004ff420],0x0
LEA RCX,[0x4fefc0]
OR qword ptr [RCX + 0x80],-0x1
MOV qword ptr [0x004ff3d0],RAX
AND qword ptr [0x004ff428],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [RCX + 0xa0],RAX
MOV qword ptr [0x004ff430],R14
MOV qword ptr [0x00485188],R14
AND qword ptr [RSP],0x0
LEA RDI,[0x4ff438]
LEA R9,[0x15beed]
PUSH 0x8
POP RSI
PUSH 0x1
POP RDX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x001a728c
LEA RAX,[0x4ff0b0]
MOV EDI,dword ptr [RAX]
LEA RAX,[0x487050]
MOV RAX,qword ptr [RAX]
LEA R14,[0x4ff500]
MOV RSI,R14
CALL qword ptr [RAX + 0x40]
MOV qword ptr [0x004ff540],RAX
MOV qword ptr [0x004ff538],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [0x004ff528],XMM0
LEA RSI,[0xd0aa20]
MOV RDI,R14
CALL 0x001292f0
LAB_0012a934:
MOV EAX,EBX
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
LAB_0012a93f:
PUSH 0x1
POP RBX
JMP 0x0012a934
|
bool trnman_init(int8 param_1)
{
long lVar1;
lVar1 = my_malloc(0,0x7fff8,0x30);
if (lVar1 == 0) {
short_trid_to_active_trn = 0;
}
else {
active_list_min._120_8_ = 0;
active_list_max._120_8_ = 0;
short_trid_to_active_trn = lVar1 + -8;
active_list_max._128_8_ = 0xffffffffffffffff;
active_list_min._112_8_ = 0;
active_list_max._104_8_ = 0;
committed_list_max._136_8_ = 0xffffffffffffffff;
active_list_max._112_8_ = active_list_min;
committed_list_min._112_8_ = 0;
active_list_min._104_8_ = active_list_max;
committed_list_max._104_8_ = 0;
trnman_active_transactions = 0;
trnman_committed_transactions = 0;
committed_list_max._112_8_ = committed_list_min;
trnman_allocated_transactions = 0;
dummy_transaction_object._128_8_ = 0xffffffffffffffff;
committed_list_min._104_8_ = committed_list_max;
pool = 0;
dummy_transaction_object._160_8_ = 0x8000000000000000;
trid_min_read_from = param_1;
global_trid_generator = param_1;
lf_hash_init(trid_to_trn,8,1,0,0,trn_get_hash_key,0);
LOCK_trn_list._64_8_ = (**(code **)(PSI_server + 0x40))(key_LOCK_trn_list,LOCK_trn_list);
LOCK_trn_list._56_8_ = LOCK_trn_list;
LOCK_trn_list._40_8_ = 0;
LOCK_trn_list._48_8_ = 0;
pthread_mutex_init((pthread_mutex_t *)LOCK_trn_list,(pthread_mutexattr_t *)&my_fast_mutexattr);
}
return lVar1 == 0;
}
| |
33,834 | plutovg_text_iterator_next | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c | plutovg_codepoint_t plutovg_text_iterator_next(plutovg_text_iterator_t* it)
{
plutovg_codepoint_t codepoint = 0;
switch(it->encoding) {
case PLUTOVG_TEXT_ENCODING_LATIN1: {
const uint8_t* text = it->text;
codepoint = text[it->index++];
break;
} case PLUTOVG_TEXT_ENCODING_UTF8: {
static const uint8_t trailing[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5
};
static const uint32_t offsets[6] = {
0x00000000, 0x00003080, 0x000E2080, 0x03C82080, 0xFA082080, 0x82082080
};
const uint8_t* text = it->text;
uint8_t trailing_offset = trailing[text[it->index]];
uint32_t offset_value = offsets[trailing_offset];
while(it->index < it->length - 1 && trailing_offset > 0) {
codepoint += text[it->index++];
codepoint <<= 6;
trailing_offset--;
}
codepoint += text[it->index++];
codepoint -= offset_value;
break;
} case PLUTOVG_TEXT_ENCODING_UTF16: {
const uint16_t* text = it->text;
codepoint = text[it->index++];
if(((codepoint) & 0xfffffc00) == 0xd800) {
if(it->index < it->length && (((codepoint) & 0xfffffc00) == 0xdc00)) {
uint16_t trail = text[it->index++];
codepoint = (codepoint << 10) + trail - ((0xD800u << 10) - 0x10000u + 0xDC00u);
}
}
break;
} case PLUTOVG_TEXT_ENCODING_UTF32: {
const uint32_t* text = it->text;
codepoint = text[it->index++];
break;
} default:
assert(false);
}
return codepoint;
} | O0 | c | plutovg_text_iterator_next:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movq %rax, -0x48(%rbp)
subq $0x3, %rax
ja 0x5e0e
movq -0x48(%rbp), %rax
leaq 0x3540d(%rip), %rcx # 0x3b060
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rdx
movl 0x10(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x10(%rdx)
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
jmp 0x5e2d
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0x10(%rcx), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x35473(%rip), %rax # 0x3b120
movb (%rax,%rcx), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
movl %eax, %ecx
leaq 0x35560(%rip), %rax # 0x3b220
movl (%rax,%rcx,4), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x8(%rbp), %rax
movl 0x8(%rax), %edx
subl $0x1, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x49(%rbp)
jge 0x5ced
movzbl -0x21(%rbp), %eax
cmpl $0x0, %eax
setg %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x5cf6
jmp 0x5d29
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rdx
movl 0x10(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x10(%rdx)
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
shll $0x6, %eax
movl %eax, -0xc(%rbp)
movb -0x21(%rbp), %al
addb $-0x1, %al
movb %al, -0x21(%rbp)
jmp 0x5cc6
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rdx
movl 0x10(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x10(%rdx)
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x28(%rbp), %ecx
movl -0xc(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xc(%rbp)
jmp 0x5e2d
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rdx
movl 0x10(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x10(%rdx)
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $0xfffffc00, %eax # imm = 0xFFFFFC00
cmpl $0xd800, %eax # imm = 0xD800
jne 0x5de3
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x5de1
movl -0xc(%rbp), %eax
andl $0xfffffc00, %eax # imm = 0xFFFFFC00
cmpl $0xdc00, %eax # imm = 0xDC00
jne 0x5de1
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rdx
movl 0x10(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x10(%rdx)
movslq %ecx, %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x32(%rbp)
movl -0xc(%rbp), %eax
shll $0xa, %eax
movzwl -0x32(%rbp), %ecx
addl %ecx, %eax
subl $0x35fdc00, %eax # imm = 0x35FDC00
movl %eax, -0xc(%rbp)
jmp 0x5de3
jmp 0x5e2d
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rdx
movl 0x10(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x10(%rdx)
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xc(%rbp)
jmp 0x5e2d
leaq 0x3546b(%rip), %rdi # 0x3b280
leaq 0x3546a(%rip), %rsi # 0x3b286
movl $0x69, %edx
leaq 0x354c2(%rip), %rcx # 0x3b2ea
callq 0x30b0
movl -0xc(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| plutovg_text_iterator_next:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rax, [rbp+var_8]
mov eax, [rax+0Ch]
mov [rbp+var_48], rax
sub rax, 3; switch 4 cases
ja def_5C5A; jumptable 0000000000005C5A default case
mov rax, [rbp+var_48]
lea rcx, jpt_5C5A
movsxd rax, ds:(jpt_5C5A - 3B060h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_5C5C:
mov rax, [rbp+var_8]; jumptable 0000000000005C5A case 0
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rdx, [rbp+var_8]
mov ecx, [rdx+10h]
mov esi, ecx
add esi, 1
mov [rdx+10h], esi
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_C], eax
jmp loc_5E2D
loc_5C89:
mov rax, [rbp+var_8]; jumptable 0000000000005C5A case 1
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
movsxd rcx, dword ptr [rcx+10h]
movzx eax, byte ptr [rax+rcx]
mov ecx, eax
lea rax, plutovg_text_iterator_next_trailing
mov al, [rax+rcx]
mov [rbp+var_21], al
movzx eax, [rbp+var_21]
mov ecx, eax
lea rax, plutovg_text_iterator_next_offsets
mov eax, [rax+rcx*4]
mov [rbp+var_28], eax
loc_5CC6:
mov rax, [rbp+var_8]
mov ecx, [rax+10h]
mov rax, [rbp+var_8]
mov edx, [rax+8]
sub edx, 1
xor eax, eax
cmp ecx, edx
mov [rbp+var_49], al
jge short loc_5CED
movzx eax, [rbp+var_21]
cmp eax, 0
setnle al
mov [rbp+var_49], al
loc_5CED:
mov al, [rbp+var_49]
test al, 1
jnz short loc_5CF6
jmp short loc_5D29
loc_5CF6:
mov rax, [rbp+var_20]
mov rdx, [rbp+var_8]
mov ecx, [rdx+10h]
mov esi, ecx
add esi, 1
mov [rdx+10h], esi
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
add eax, [rbp+var_C]
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
shl eax, 6
mov [rbp+var_C], eax
mov al, [rbp+var_21]
add al, 0FFh
mov [rbp+var_21], al
jmp short loc_5CC6
loc_5D29:
mov rax, [rbp+var_20]
mov rdx, [rbp+var_8]
mov ecx, [rdx+10h]
mov esi, ecx
add esi, 1
mov [rdx+10h], esi
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
add eax, [rbp+var_C]
mov [rbp+var_C], eax
mov ecx, [rbp+var_28]
mov eax, [rbp+var_C]
sub eax, ecx
mov [rbp+var_C], eax
jmp loc_5E2D
loc_5D59:
mov rax, [rbp+var_8]; jumptable 0000000000005C5A case 2
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rdx, [rbp+var_8]
mov ecx, [rdx+10h]
mov esi, ecx
add esi, 1
mov [rdx+10h], esi
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
and eax, 0FFFFFC00h
cmp eax, 0D800h
jnz short loc_5DE3
mov rax, [rbp+var_8]
mov eax, [rax+10h]
mov rcx, [rbp+var_8]
cmp eax, [rcx+8]
jge short loc_5DE1
mov eax, [rbp+var_C]
and eax, 0FFFFFC00h
cmp eax, 0DC00h
jnz short loc_5DE1
mov rax, [rbp+var_30]
mov rdx, [rbp+var_8]
mov ecx, [rdx+10h]
mov esi, ecx
add esi, 1
mov [rdx+10h], esi
movsxd rcx, ecx
mov ax, [rax+rcx*2]
mov [rbp+var_32], ax
mov eax, [rbp+var_C]
shl eax, 0Ah
movzx ecx, [rbp+var_32]
add eax, ecx
sub eax, 35FDC00h
mov [rbp+var_C], eax
loc_5DE1:
jmp short $+2
loc_5DE3:
jmp short loc_5E2D
loc_5DE5:
mov rax, [rbp+var_8]; jumptable 0000000000005C5A case 3
mov rax, [rax]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov rdx, [rbp+var_8]
mov ecx, [rdx+10h]
mov esi, ecx
add esi, 1
mov [rdx+10h], esi
movsxd rcx, ecx
mov eax, [rax+rcx*4]
mov [rbp+var_C], eax
jmp short loc_5E2D
def_5C5A:
lea rdi, aFalse; jumptable 0000000000005C5A default case
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 69h ; 'i'
lea rcx, aPlutovgCodepoi; "plutovg_codepoint_t plutovg_text_iterat"...
call ___assert_fail
loc_5E2D:
mov eax, [rbp+var_C]
add rsp, 50h
pop rbp
retn
| long long plutovg_text_iterator_next(long long *a1)
{
long long v1; // rax
int v2; // ecx
int v3; // ecx
int v4; // ecx
long long v5; // rax
int v6; // ecx
int v7; // ecx
long long v8; // rax
int v9; // ecx
bool v11; // [rsp+7h] [rbp-49h]
long long v12; // [rsp+20h] [rbp-30h]
int v13; // [rsp+28h] [rbp-28h]
unsigned __int8 v14; // [rsp+2Fh] [rbp-21h]
long long v15; // [rsp+30h] [rbp-20h]
int v16; // [rsp+44h] [rbp-Ch]
unsigned int v17; // [rsp+44h] [rbp-Ch]
v16 = 0;
switch ( *((_DWORD *)a1 + 3) )
{
case 0:
v1 = *a1;
v2 = *((_DWORD *)a1 + 4);
*((_DWORD *)a1 + 4) = v2 + 1;
v17 = *(unsigned __int8 *)(v1 + v2);
break;
case 1:
v15 = *a1;
v14 = plutovg_text_iterator_next_trailing[*(unsigned __int8 *)(*a1 + *((int *)a1 + 4))];
v13 = plutovg_text_iterator_next_offsets[v14];
while ( 1 )
{
v11 = 0;
if ( *((_DWORD *)a1 + 4) < *((_DWORD *)a1 + 2) - 1 )
v11 = v14 != 0;
if ( !v11 )
break;
v3 = *((_DWORD *)a1 + 4);
*((_DWORD *)a1 + 4) = v3 + 1;
v16 = (v16 + *(unsigned __int8 *)(v15 + v3)) << 6;
--v14;
}
v4 = *((_DWORD *)a1 + 4);
*((_DWORD *)a1 + 4) = v4 + 1;
v17 = v16 + *(unsigned __int8 *)(v15 + v4) - v13;
break;
case 2:
v12 = *a1;
v5 = *a1;
v6 = *((_DWORD *)a1 + 4);
*((_DWORD *)a1 + 4) = v6 + 1;
v17 = *(unsigned __int16 *)(v5 + 2LL * v6);
if ( (v17 & 0xFFFFFC00) == 0xD800 && *((_DWORD *)a1 + 4) < *((_DWORD *)a1 + 2) && (v17 & 0xFFFFFC00) == 0xDC00 )
{
v7 = *((_DWORD *)a1 + 4);
*((_DWORD *)a1 + 4) = v7 + 1;
v17 = *(unsigned __int16 *)(v12 + 2LL * v7) + (v17 << 10) - 56613888;
}
break;
case 3:
v8 = *a1;
v9 = *((_DWORD *)a1 + 4);
*((_DWORD *)a1 + 4) = v9 + 1;
v17 = *(_DWORD *)(v8 + 4LL * v9);
break;
default:
__assert_fail(
"false",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c",
105LL,
"plutovg_codepoint_t plutovg_text_iterator_next(plutovg_text_iterator_t *)");
}
return v17;
}
| plutovg_text_iterator_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0xc]
MOV qword ptr [RBP + -0x48],RAX
SUB RAX,0x3
JA 0x00105e0e
MOV RAX,qword ptr [RBP + -0x48]
LEA RCX,[0x13b060]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RDX + 0x10]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RDX + 0x10],ESI
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0xc],EAX
JMP 0x00105e2d
caseD_1:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RCX + 0x10]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV ECX,EAX
LEA RAX,[0x13b120]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x21]
MOV ECX,EAX
LEA RAX,[0x13b220]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RBP + -0x28],EAX
LAB_00105cc6:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0x8]
SUB EDX,0x1
XOR EAX,EAX
CMP ECX,EDX
MOV byte ptr [RBP + -0x49],AL
JGE 0x00105ced
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x49],AL
LAB_00105ced:
MOV AL,byte ptr [RBP + -0x49]
TEST AL,0x1
JNZ 0x00105cf6
JMP 0x00105d29
LAB_00105cf6:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RDX + 0x10]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RDX + 0x10],ESI
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
ADD EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
SHL EAX,0x6
MOV dword ptr [RBP + -0xc],EAX
MOV AL,byte ptr [RBP + -0x21]
ADD AL,0xff
MOV byte ptr [RBP + -0x21],AL
JMP 0x00105cc6
LAB_00105d29:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RDX + 0x10]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RDX + 0x10],ESI
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
ADD EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0xc],EAX
MOV ECX,dword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0xc]
SUB EAX,ECX
MOV dword ptr [RBP + -0xc],EAX
JMP 0x00105e2d
caseD_2:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RDX + 0x10]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RDX + 0x10],ESI
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0xfffffc00
CMP EAX,0xd800
JNZ 0x00105de3
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x8]
JGE 0x00105de1
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0xfffffc00
CMP EAX,0xdc00
JNZ 0x00105de1
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RDX + 0x10]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RDX + 0x10],ESI
MOVSXD RCX,ECX
MOV AX,word ptr [RAX + RCX*0x2]
MOV word ptr [RBP + -0x32],AX
MOV EAX,dword ptr [RBP + -0xc]
SHL EAX,0xa
MOVZX ECX,word ptr [RBP + -0x32]
ADD EAX,ECX
SUB EAX,0x35fdc00
MOV dword ptr [RBP + -0xc],EAX
LAB_00105de1:
JMP 0x00105de3
LAB_00105de3:
JMP 0x00105e2d
caseD_3:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RDX + 0x10]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RDX + 0x10],ESI
MOVSXD RCX,ECX
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RBP + -0xc],EAX
JMP 0x00105e2d
default:
LEA RDI,[0x13b280]
LEA RSI,[0x13b286]
MOV EDX,0x69
LEA RCX,[0x13b2ea]
CALL 0x001030b0
LAB_00105e2d:
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x50
POP RBP
RET
|
uint plutovg_text_iterator_next(long *param_1)
{
int iVar1;
long lVar2;
long lVar3;
byte local_29;
uint local_14;
local_14 = 0;
switch(*(int4 *)((long)param_1 + 0xc)) {
case 0:
lVar3 = param_1[2];
*(int *)(param_1 + 2) = (int)lVar3 + 1;
local_14 = (uint)*(byte *)(*param_1 + (long)(int)lVar3);
break;
case 1:
lVar3 = *param_1;
local_29 = plutovg_text_iterator_next_trailing[*(byte *)(lVar3 + (int)param_1[2])];
iVar1 = *(int *)(plutovg_text_iterator_next_offsets + (ulong)local_29 * 4);
for (; (int)param_1[2] < (int)param_1[1] + -1 && local_29 != 0; local_29 = local_29 - 1) {
lVar2 = param_1[2];
*(int *)(param_1 + 2) = (int)lVar2 + 1;
local_14 = (*(byte *)(lVar3 + (int)lVar2) + local_14) * 0x40;
}
lVar2 = param_1[2];
*(int *)(param_1 + 2) = (int)lVar2 + 1;
local_14 = (*(byte *)(lVar3 + (int)lVar2) + local_14) - iVar1;
break;
case 2:
lVar3 = param_1[2];
*(int *)(param_1 + 2) = (int)lVar3 + 1;
local_14 = (uint)*(ushort *)(*param_1 + (long)(int)lVar3 * 2);
if ((((local_14 & 0xfffffc00) == 0xd800) && ((int)param_1[2] < (int)param_1[1])) &&
((local_14 & 0xfffffc00) == 0xdc00)) {
lVar3 = param_1[2];
*(int *)(param_1 + 2) = (int)lVar3 + 1;
local_14 = local_14 * 0x400 + (uint)*(ushort *)(*param_1 + (long)(int)lVar3 * 2) + 0xfca02400;
}
break;
case 3:
lVar3 = param_1[2];
*(int *)(param_1 + 2) = (int)lVar3 + 1;
local_14 = *(uint *)(*param_1 + (long)(int)lVar3 * 4);
break;
default:
/* WARNING: Subroutine does not return */
__assert_fail("false",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c"
,0x69,"plutovg_codepoint_t plutovg_text_iterator_next(plutovg_text_iterator_t *)")
;
}
return local_14;
}
| |
33,835 | plutovg_text_iterator_next | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c | plutovg_codepoint_t plutovg_text_iterator_next(plutovg_text_iterator_t* it)
{
plutovg_codepoint_t codepoint = 0;
switch(it->encoding) {
case PLUTOVG_TEXT_ENCODING_LATIN1: {
const uint8_t* text = it->text;
codepoint = text[it->index++];
break;
} case PLUTOVG_TEXT_ENCODING_UTF8: {
static const uint8_t trailing[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5
};
static const uint32_t offsets[6] = {
0x00000000, 0x00003080, 0x000E2080, 0x03C82080, 0xFA082080, 0x82082080
};
const uint8_t* text = it->text;
uint8_t trailing_offset = trailing[text[it->index]];
uint32_t offset_value = offsets[trailing_offset];
while(it->index < it->length - 1 && trailing_offset > 0) {
codepoint += text[it->index++];
codepoint <<= 6;
trailing_offset--;
}
codepoint += text[it->index++];
codepoint -= offset_value;
break;
} case PLUTOVG_TEXT_ENCODING_UTF16: {
const uint16_t* text = it->text;
codepoint = text[it->index++];
if(((codepoint) & 0xfffffc00) == 0xd800) {
if(it->index < it->length && (((codepoint) & 0xfffffc00) == 0xdc00)) {
uint16_t trail = text[it->index++];
codepoint = (codepoint << 10) + trail - ((0xD800u << 10) - 0x10000u + 0xDC00u);
}
}
break;
} case PLUTOVG_TEXT_ENCODING_UTF32: {
const uint32_t* text = it->text;
codepoint = text[it->index++];
break;
} default:
assert(false);
}
return codepoint;
} | O1 | c | plutovg_text_iterator_next:
pushq %rax
movl 0xc(%rdi), %eax
cmpq $0x3, %rax
ja 0x4703
leaq 0x1ea45(%rip), %rcx # 0x23080
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rdi), %rax
movslq 0x10(%rdi), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x10(%rdi)
movzbl (%rax,%rcx), %eax
jmp 0x4701
movq (%rdi), %rax
movslq 0x10(%rdi), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x10(%rdi)
movzwl (%rax,%rcx,2), %eax
jmp 0x4701
movq (%rdi), %rax
movslq 0x10(%rdi), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x10(%rdi)
movl (%rax,%rcx,4), %eax
jmp 0x4701
movq (%rdi), %rax
movl 0x10(%rdi), %ecx
movslq %ecx, %r8
movzbl (%rax,%r8), %r11d
leaq 0x1eac9(%rip), %rdx # 0x23160
movzbl (%r11,%rdx), %r9d
leaq 0x1ebbd(%rip), %rdx # 0x23260
movl (%rdx,%r9,4), %edx
movslq 0x8(%rdi), %r10
decq %r10
xorl %esi, %esi
cmpl %r10d, %r8d
jge 0x46f0
andl $-0x40, %r11d
cmpl $0xc0, %r11d
jne 0x46f0
incq %r8
decb %r9b
xorl %esi, %esi
incl %ecx
movl %ecx, 0x10(%rdi)
movzbl -0x1(%rax,%r8), %r11d
addl %r11d, %esi
shll $0x6, %esi
addb $-0x1, %r9b
setb %r11b
cmpq %r10, %r8
jge 0x46f0
incq %r8
testb %r11b, %r11b
jne 0x46ca
subl %edx, %esi
leal 0x1(%rcx), %edx
movl %edx, 0x10(%rdi)
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
addl %esi, %eax
popq %rcx
retq
leaq 0x1ebaa(%rip), %rdi # 0x232b4
leaq 0x1eba9(%rip), %rsi # 0x232ba
leaq 0x1ec06(%rip), %rcx # 0x2331e
movl $0x69, %edx
callq 0x30b0
| plutovg_text_iterator_next:
push rax
mov eax, [rdi+0Ch]
cmp rax, 3; switch 4 cases
ja def_4642; jumptable 0000000000004642 default case
lea rcx, jpt_4642
movsxd rax, ds:(jpt_4642 - 23080h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_4644:
mov rax, [rdi]; jumptable 0000000000004642 case 0
movsxd rcx, dword ptr [rdi+10h]
lea edx, [rcx+1]
mov [rdi+10h], edx
movzx eax, byte ptr [rax+rcx]
jmp loc_4701
loc_465A:
mov rax, [rdi]; jumptable 0000000000004642 case 2
movsxd rcx, dword ptr [rdi+10h]
lea edx, [rcx+1]
mov [rdi+10h], edx
movzx eax, word ptr [rax+rcx*2]
jmp loc_4701
loc_4670:
mov rax, [rdi]; jumptable 0000000000004642 case 3
movsxd rcx, dword ptr [rdi+10h]
lea edx, [rcx+1]
mov [rdi+10h], edx
mov eax, [rax+rcx*4]
jmp short loc_4701
loc_4682:
mov rax, [rdi]; jumptable 0000000000004642 case 1
mov ecx, [rdi+10h]
movsxd r8, ecx
movzx r11d, byte ptr [rax+r8]
lea rdx, plutovg_text_iterator_next_trailing
movzx r9d, byte ptr [r11+rdx]
lea rdx, plutovg_text_iterator_next_offsets
mov edx, [rdx+r9*4]
movsxd r10, dword ptr [rdi+8]
dec r10
xor esi, esi
cmp r8d, r10d
jge short loc_46F0
and r11d, 0FFFFFFC0h
cmp r11d, 0C0h
jnz short loc_46F0
inc r8
dec r9b
xor esi, esi
loc_46CA:
inc ecx
mov [rdi+10h], ecx
movzx r11d, byte ptr [rax+r8-1]
add esi, r11d
shl esi, 6
add r9b, 0FFh
setb r11b
cmp r8, r10
jge short loc_46F0
inc r8
test r11b, r11b
jnz short loc_46CA
loc_46F0:
sub esi, edx
lea edx, [rcx+1]
mov [rdi+10h], edx
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
add eax, esi
loc_4701:
pop rcx
retn
def_4642:
lea rdi, aFalse; jumptable 0000000000004642 default case
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aPlutovgCodepoi; "plutovg_codepoint_t plutovg_text_iterat"...
mov edx, 69h ; 'i'
call ___assert_fail
| long long plutovg_text_iterator_next(long long *a1)
{
long long v1; // rax
long long v2; // rcx
long long result; // rax
long long v4; // rax
long long v5; // rcx
long long v6; // rax
long long v7; // rcx
long long v8; // rax
int v9; // ecx
long long v10; // r11
long long v11; // r9
int v12; // edx
long long v13; // r10
int v14; // esi
long long v15; // r8
char v16; // r9
bool v17; // cf
switch ( *((_DWORD *)a1 + 3) )
{
case 0:
v1 = *a1;
v2 = *((int *)a1 + 4);
*((_DWORD *)a1 + 4) = v2 + 1;
result = *(unsigned __int8 *)(v1 + v2);
break;
case 1:
v8 = *a1;
v9 = *((_DWORD *)a1 + 4);
v10 = *(unsigned __int8 *)(*a1 + v9);
v11 = plutovg_text_iterator_next_trailing[v10];
v12 = plutovg_text_iterator_next_offsets[v11];
v13 = *((int *)a1 + 2) - 1LL;
v14 = 0;
if ( v9 < (int)v13 && (v10 & 0xFFFFFFC0) == 0xC0 )
{
v15 = v9 + 1LL;
v16 = v11 - 1;
v14 = 0;
do
{
*((_DWORD *)a1 + 4) = ++v9;
v14 = (*(unsigned __int8 *)(v8 + v15 - 1) + v14) << 6;
v17 = v16-- != 0;
if ( v15 >= v13 )
break;
++v15;
}
while ( v17 );
}
*((_DWORD *)a1 + 4) = v9 + 1;
result = v14 - v12 + (unsigned int)*(unsigned __int8 *)(v8 + v9);
break;
case 2:
v4 = *a1;
v5 = *((int *)a1 + 4);
*((_DWORD *)a1 + 4) = v5 + 1;
result = *(unsigned __int16 *)(v4 + 2 * v5);
break;
case 3:
v6 = *a1;
v7 = *((int *)a1 + 4);
*((_DWORD *)a1 + 4) = v7 + 1;
result = *(unsigned int *)(v6 + 4 * v7);
break;
default:
__assert_fail(
"false",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c",
105LL,
"plutovg_codepoint_t plutovg_text_iterator_next(plutovg_text_iterator_t *)");
}
return result;
}
| plutovg_text_iterator_next:
PUSH RAX
MOV EAX,dword ptr [RDI + 0xc]
CMP RAX,0x3
JA 0x00104703
LEA RCX,[0x123080]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RAX,qword ptr [RDI]
MOVSXD RCX,dword ptr [RDI + 0x10]
LEA EDX,[RCX + 0x1]
MOV dword ptr [RDI + 0x10],EDX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
JMP 0x00104701
caseD_2:
MOV RAX,qword ptr [RDI]
MOVSXD RCX,dword ptr [RDI + 0x10]
LEA EDX,[RCX + 0x1]
MOV dword ptr [RDI + 0x10],EDX
MOVZX EAX,word ptr [RAX + RCX*0x2]
JMP 0x00104701
caseD_3:
MOV RAX,qword ptr [RDI]
MOVSXD RCX,dword ptr [RDI + 0x10]
LEA EDX,[RCX + 0x1]
MOV dword ptr [RDI + 0x10],EDX
MOV EAX,dword ptr [RAX + RCX*0x4]
JMP 0x00104701
caseD_1:
MOV RAX,qword ptr [RDI]
MOV ECX,dword ptr [RDI + 0x10]
MOVSXD R8,ECX
MOVZX R11D,byte ptr [RAX + R8*0x1]
LEA RDX,[0x123160]
MOVZX R9D,byte ptr [R11 + RDX*0x1]
LEA RDX,[0x123260]
MOV EDX,dword ptr [RDX + R9*0x4]
MOVSXD R10,dword ptr [RDI + 0x8]
DEC R10
XOR ESI,ESI
CMP R8D,R10D
JGE 0x001046f0
AND R11D,0xffffffc0
CMP R11D,0xc0
JNZ 0x001046f0
INC R8
DEC R9B
XOR ESI,ESI
LAB_001046ca:
INC ECX
MOV dword ptr [RDI + 0x10],ECX
MOVZX R11D,byte ptr [RAX + R8*0x1 + -0x1]
ADD ESI,R11D
SHL ESI,0x6
ADD R9B,0xff
SETC R11B
CMP R8,R10
JGE 0x001046f0
INC R8
TEST R11B,R11B
JNZ 0x001046ca
LAB_001046f0:
SUB ESI,EDX
LEA EDX,[RCX + 0x1]
MOV dword ptr [RDI + 0x10],EDX
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
ADD EAX,ESI
LAB_00104701:
POP RCX
RET
default:
LEA RDI,[0x1232b4]
LEA RSI,[0x1232ba]
LEA RCX,[0x12331e]
MOV EDX,0x69
CALL 0x001030b0
|
uint plutovg_text_iterator_next(long *param_1)
{
int iVar1;
long lVar2;
uint uVar3;
int iVar4;
int iVar5;
long lVar6;
byte bVar7;
long lVar8;
switch(*(int4 *)((long)param_1 + 0xc)) {
case 0:
lVar2 = param_1[2];
*(int *)(param_1 + 2) = (int)lVar2 + 1;
uVar3 = (uint)*(byte *)(*param_1 + (long)(int)lVar2);
break;
case 1:
lVar2 = *param_1;
iVar4 = (int)param_1[2];
lVar6 = (long)iVar4;
bVar7 = plutovg_text_iterator_next_trailing[*(byte *)(lVar2 + lVar6)];
iVar1 = *(int *)(plutovg_text_iterator_next_offsets + (ulong)bVar7 * 4);
lVar8 = (long)(int)param_1[1] + -1;
iVar5 = 0;
if ((iVar4 < (int)lVar8) && (iVar5 = 0, (*(byte *)(lVar2 + lVar6) & 0xc0) == 0xc0)) {
iVar5 = 0;
do {
bVar7 = bVar7 - 1;
lVar6 = lVar6 + 1;
iVar4 = iVar4 + 1;
*(int *)(param_1 + 2) = iVar4;
iVar5 = (iVar5 + (uint)*(byte *)(lVar2 + -1 + lVar6)) * 0x40;
if (lVar8 <= lVar6) break;
} while (bVar7 != 0);
}
*(int *)(param_1 + 2) = iVar4 + 1;
uVar3 = (uint)*(byte *)(lVar2 + iVar4) + (iVar5 - iVar1);
break;
case 2:
lVar2 = param_1[2];
*(int *)(param_1 + 2) = (int)lVar2 + 1;
uVar3 = (uint)*(ushort *)(*param_1 + (long)(int)lVar2 * 2);
break;
case 3:
lVar2 = param_1[2];
*(int *)(param_1 + 2) = (int)lVar2 + 1;
uVar3 = *(uint *)(*param_1 + (long)(int)lVar2 * 4);
break;
default:
/* WARNING: Subroutine does not return */
__assert_fail("false",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c"
,0x69,"plutovg_codepoint_t plutovg_text_iterator_next(plutovg_text_iterator_t *)")
;
}
return uVar3;
}
| |
33,836 | translog_write_variable_record_1chunk | eloqsql/storage/maria/ma_loghandler.c | static my_bool
translog_write_variable_record_1chunk(LSN *lsn,
enum translog_record_type type,
MARIA_HA *tbl_info,
SHORT_TRANSACTION_ID short_trid,
struct st_translog_parts *parts,
struct st_translog_buffer
*buffer_to_flush, uint16 header_length,
TRN *trn, void *hook_arg)
{
int rc;
uchar chunk0_header[1 + 2 + 5 + 2];
DBUG_ENTER("translog_write_variable_record_1chunk");
translog_lock_assert_owner();
if (buffer_to_flush)
translog_buffer_lock_assert_owner(buffer_to_flush);
translog_write_variable_record_1group_header(parts, type, short_trid,
header_length, chunk0_header);
set_lsn(lsn, log_descriptor.horizon);
if (translog_set_lsn_for_files(LSN_FILE_NO(*lsn), LSN_FILE_NO(*lsn),
*lsn, TRUE) ||
(log_record_type_descriptor[type].inwrite_hook &&
(*log_record_type_descriptor[type].inwrite_hook)(type, trn, tbl_info,
lsn, hook_arg)))
{
translog_unlock();
rc= 1;
goto err;
}
rc= translog_write_parts_on_page(&log_descriptor.horizon,
&log_descriptor.bc,
parts->total_record_length, parts);
log_descriptor.bc.buffer->last_lsn= *lsn;
DBUG_PRINT("info", ("last_lsn set to " LSN_FMT " buffer: %p",
LSN_IN_PARTS(log_descriptor.bc.buffer->last_lsn),
log_descriptor.bc.buffer));
translog_unlock();
/*
check if we switched buffer and need process it (current buffer is
unlocked already => we will not delay other threads
*/
err:
if (buffer_to_flush != NULL)
{
if (!rc)
rc= translog_buffer_flush(buffer_to_flush);
translog_buffer_unlock(buffer_to_flush);
}
DBUG_RETURN(rc);
} | O0 | c | translog_write_variable_record_1chunk:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movw %cx, %ax
movq 0x20(%rbp), %rcx
movq 0x18(%rbp), %rcx
movw 0x10(%rbp), %cx
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movl %esi, -0x24(%rbp)
movq %rdx, -0x30(%rbp)
movw %ax, -0x32(%rbp)
movq %r8, -0x40(%rbp)
movq %r9, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x59ec4
jmp 0x59ec4
movq -0x40(%rbp), %rdi
movl -0x24(%rbp), %esi
movw -0x32(%rbp), %cx
movw 0x10(%rbp), %ax
leaq -0x12(%rbp), %r8
movzwl %cx, %edx
movzwl %ax, %ecx
callq 0x5b320
movq -0x20(%rbp), %rdi
movq 0xc2011b(%rip), %rsi # 0xc7a008
callq 0x5b3f0
movq -0x20(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, %edi
movq -0x20(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, %esi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movl $0x1, %ecx
callq 0x5b420
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x59f73
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x41e28f(%rip), %rax # 0x4781c0
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x59f81
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x41e275(%rip), %rax # 0x4781c0
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %edi
movq 0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq 0x20(%rbp), %r8
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
je 0x59f81
callq 0x501e0
movl $0x1, -0x4c(%rbp)
jmp 0x59fcb
movq -0x40(%rbp), %rax
movl 0x4(%rax), %edx
movq -0x40(%rbp), %rcx
leaq 0x41f42d(%rip), %rsi # 0x4793c0
movq %rsi, %rdi
addq $0x800c48, %rdi # imm = 0x800C48
addq $0x800c50, %rsi # imm = 0x800C50
callq 0x5b5c0
movsbl %al, %eax
movl %eax, -0x4c(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq 0xc2007b(%rip), %rax # 0xc7a038
movq %rcx, 0x100000(%rax)
jmp 0x59fc6
callq 0x501e0
cmpq $0x0, -0x48(%rbp)
je 0x59ff0
cmpl $0x0, -0x4c(%rbp)
jne 0x59fe7
movq -0x48(%rbp), %rdi
callq 0x563a0
movsbl %al, %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rdi
callq 0x501b0
jmp 0x59ff2
movl -0x4c(%rbp), %eax
movb %al, -0x4d(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5a013
movb -0x4d(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
callq 0x2a270
nopl (%rax,%rax)
| translog_write_variable_record_1chunk:
push rbp
mov rbp, rsp
sub rsp, 50h
mov ax, cx
mov rcx, [rbp+arg_10]
mov rcx, [rbp+arg_8]
mov cx, [rbp+arg_0]
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_20], rdi
mov [rbp+var_24], esi
mov [rbp+var_30], rdx
mov [rbp+var_32], ax
mov [rbp+var_40], r8
mov [rbp+var_48], r9
cmp [rbp+var_48], 0
jz short loc_59EC4
jmp short $+2
loc_59EC4:
mov rdi, [rbp+var_40]
mov esi, [rbp+var_24]
mov cx, [rbp+var_32]
mov ax, [rbp+arg_0]
lea r8, [rbp+var_12]
movzx edx, cx
movzx ecx, ax
call translog_write_variable_record_1group_header
mov rdi, [rbp+var_20]
mov rsi, cs:qword_C7A008
call set_lsn
mov rax, [rbp+var_20]
mov rax, [rax]
sar rax, 20h
mov edi, eax
mov rax, [rbp+var_20]
mov rax, [rax]
sar rax, 20h
mov esi, eax
mov rax, [rbp+var_20]
mov rdx, [rax]
mov ecx, 1
call translog_set_lsn_for_files
movsx eax, al
cmp eax, 0
jnz short loc_59F73
mov eax, [rbp+var_24]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
cmp qword ptr [rax+10h], 0
jz short loc_59F81
mov eax, [rbp+var_24]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
mov rax, [rax+10h]
mov edi, [rbp+var_24]
mov rsi, [rbp+arg_8]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_20]
mov r8, [rbp+arg_10]
call rax
movsx eax, al
cmp eax, 0
jz short loc_59F81
loc_59F73:
call translog_unlock
mov [rbp+var_4C], 1
jmp short loc_59FCB
loc_59F81:
mov rax, [rbp+var_40]
mov edx, [rax+4]
mov rcx, [rbp+var_40]
lea rsi, log_descriptor
mov rdi, rsi
add rdi, 800C48h
add rsi, 800C50h
call translog_write_parts_on_page
movsx eax, al
mov [rbp+var_4C], eax
mov rax, [rbp+var_20]
mov rcx, [rax]
mov rax, cs:qword_C7A038
mov [rax+100000h], rcx
jmp short $+2
loc_59FC6:
call translog_unlock
loc_59FCB:
cmp [rbp+var_48], 0
jz short loc_59FF0
cmp [rbp+var_4C], 0
jnz short loc_59FE7
mov rdi, [rbp+var_48]
call translog_buffer_flush
movsx eax, al
mov [rbp+var_4C], eax
loc_59FE7:
mov rdi, [rbp+var_48]
call translog_buffer_unlock
loc_59FF0:
jmp short $+2
loc_59FF2:
mov eax, [rbp+var_4C]
mov [rbp+var_4D], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5A013
mov al, [rbp+var_4D]
add rsp, 50h
pop rbp
retn
loc_5A013:
call ___stack_chk_fail
| char translog_write_variable_record_1chunk(
_QWORD *a1,
unsigned int a2,
long long a3,
unsigned __int16 a4,
long long a5,
long long a6,
unsigned __int16 a7,
long long a8,
long long a9)
{
int v10; // [rsp+4h] [rbp-4Ch]
_BYTE v14[10]; // [rsp+3Eh] [rbp-12h] BYREF
unsigned long long v15; // [rsp+48h] [rbp-8h]
v15 = __readfsqword(0x28u);
translog_write_variable_record_1group_header(a5, a2, a4, a7, v14);
set_lsn(a1, qword_C7A008);
if ( (unsigned __int8)translog_set_lsn_for_files((unsigned int)HIDWORD(*a1), (unsigned int)HIDWORD(*a1), *a1, 1LL)
|| *(_QWORD *)&log_record_type_descriptor[18 * a2 + 4]
&& (*(unsigned __int8 ( **)(_QWORD, long long, long long, _QWORD *, long long))&log_record_type_descriptor[18 * a2 + 4])(
a2,
a8,
a3,
a1,
a9) )
{
translog_unlock();
v10 = 1;
}
else
{
v10 = (char)translog_write_parts_on_page(
&log_descriptor[1048969],
&log_descriptor[1048970],
*(unsigned int *)(a5 + 4),
a5);
*(_QWORD *)(qword_C7A038 + 0x100000) = *a1;
translog_unlock();
}
if ( a6 )
{
if ( !v10 )
LOBYTE(v10) = translog_buffer_flush(a6);
translog_buffer_unlock(a6);
}
return v10;
}
| translog_write_variable_record_1chunk:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV AX,CX
MOV RCX,qword ptr [RBP + 0x20]
MOV RCX,qword ptr [RBP + 0x18]
MOV CX,word ptr [RBP + 0x10]
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x20],RDI
MOV dword ptr [RBP + -0x24],ESI
MOV qword ptr [RBP + -0x30],RDX
MOV word ptr [RBP + -0x32],AX
MOV qword ptr [RBP + -0x40],R8
MOV qword ptr [RBP + -0x48],R9
CMP qword ptr [RBP + -0x48],0x0
JZ 0x00159ec4
JMP 0x00159ec4
LAB_00159ec4:
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x24]
MOV CX,word ptr [RBP + -0x32]
MOV AX,word ptr [RBP + 0x10]
LEA R8,[RBP + -0x12]
MOVZX EDX,CX
MOVZX ECX,AX
CALL 0x0015b320
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [0x00d7a008]
CALL 0x0015b3f0
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX]
MOV ECX,0x1
CALL 0x0015b420
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x00159f73
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
LEA RAX,[0x5781c0]
IMUL RCX,RCX,0x48
ADD RAX,RCX
CMP qword ptr [RAX + 0x10],0x0
JZ 0x00159f81
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
LEA RAX,[0x5781c0]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV EDI,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + 0x20]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00159f81
LAB_00159f73:
CALL 0x001501e0
MOV dword ptr [RBP + -0x4c],0x1
JMP 0x00159fcb
LAB_00159f81:
MOV RAX,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[0x5793c0]
MOV RDI,RSI
ADD RDI,0x800c48
ADD RSI,0x800c50
CALL 0x0015b5c0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [0x00d7a038]
MOV qword ptr [RAX + 0x100000],RCX
JMP 0x00159fc6
LAB_00159fc6:
CALL 0x001501e0
LAB_00159fcb:
CMP qword ptr [RBP + -0x48],0x0
JZ 0x00159ff0
CMP dword ptr [RBP + -0x4c],0x0
JNZ 0x00159fe7
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001563a0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x4c],EAX
LAB_00159fe7:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001501b0
LAB_00159ff0:
JMP 0x00159ff2
LAB_00159ff2:
MOV EAX,dword ptr [RBP + -0x4c]
MOV byte ptr [RBP + -0x4d],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015a013
MOV AL,byte ptr [RBP + -0x4d]
ADD RSP,0x50
POP RBP
RET
LAB_0015a013:
CALL 0x0012a270
|
int8
translog_write_variable_record_1chunk
(long *param_1,uint param_2,int8 param_3,int2 param_4,long param_5,
long param_6,int2 param_7,int8 param_8,int8 param_9)
{
char cVar1;
long in_FS_OFFSET;
int1 local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
translog_write_variable_record_1group_header(param_5,param_2,param_4,param_7,local_1a);
set_lsn(param_1,DAT_00d7a008);
cVar1 = translog_set_lsn_for_files
(*param_1 >> 0x20 & 0xffffffff,*param_1 >> 0x20 & 0xffffffff,*param_1,1);
if ((cVar1 == '\0') &&
((*(long *)(log_record_type_descriptor + (ulong)param_2 * 0x48 + 0x10) == 0 ||
(cVar1 = (**(code **)(log_record_type_descriptor + (ulong)param_2 * 0x48 + 0x10))
(param_2,param_8,param_3,param_1,param_9), cVar1 == '\0')))) {
cVar1 = translog_write_parts_on_page
(&DAT_00d7a008,&DAT_00d7a010,*(int4 *)(param_5 + 4),param_5);
*(long *)(DAT_00d7a038 + 0x100000) = *param_1;
translog_unlock();
}
else {
translog_unlock();
cVar1 = '\x01';
}
if (param_6 != 0) {
if (cVar1 == '\0') {
cVar1 = translog_buffer_flush(param_6);
}
translog_buffer_unlock(param_6);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),cVar1);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
33,837 | thr_reschedule_write_lock | eloqsql/mysys/thr_lock.c | my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data,
ulong lock_wait_timeout)
{
THR_LOCK *lock=data->lock;
enum thr_lock_type write_lock_type;
DBUG_ENTER("thr_reschedule_write_lock");
mysql_mutex_lock(&lock->mutex);
if (!lock->read_wait.data) /* No waiting read locks */
{
mysql_mutex_unlock(&lock->mutex);
DBUG_RETURN(0);
}
write_lock_type= data->type;
data->type=TL_WRITE_DELAYED;
if (lock->update_status)
(*lock->update_status)(data->status_param);
if (((*data->prev)=data->next)) /* remove from lock-list */
data->next->prev= data->prev;
else
lock->write.last=data->prev;
if ((data->next=lock->write_wait.data)) /* Put first in lock_list */
data->next->prev= &data->next;
else
lock->write_wait.last= &data->next;
data->prev= &lock->write_wait.data;
data->cond=get_cond(); /* This was zero */
lock->write_wait.data=data;
free_all_read_locks(lock,0);
mysql_mutex_unlock(&lock->mutex);
DBUG_RETURN(thr_upgrade_write_delay_lock(data, write_lock_type,
lock_wait_timeout));
} | O0 | c | thr_reschedule_write_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
leaq 0x5b09d(%rip), %rsi # 0x154688
movl $0x5de, %edx # imm = 0x5DE
callq 0xf7900
movq -0x20(%rbp), %rax
cmpq $0x0, 0x60(%rax)
jne 0xf9616
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
callq 0xf7970
movb $0x0, -0x1(%rbp)
jmp 0xf972f
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl $0x9, 0x40(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
je 0xf964e
movq -0x20(%rbp), %rax
movq 0xc0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0xf967d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
jmp 0xf9690
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x20(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x10(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
je 0xf96bf
movq -0x10(%rbp), %rcx
addq $0x8, %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
jmp 0xf96d2
movq -0x10(%rbp), %rcx
addq $0x8, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x20(%rbp), %rcx
addq $0x80, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
callq 0xf9740
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0xf9750
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
callq 0xf7970
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0xf9040
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| thr_reschedule_write_lock:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
add rdi, 18h
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 5DEh
call inline_mysql_mutex_lock_27
mov rax, [rbp+var_20]
cmp qword ptr [rax+60h], 0
jnz short loc_F9616
mov rdi, [rbp+var_20]
add rdi, 18h
call inline_mysql_mutex_unlock_28
mov [rbp+var_1], 0
jmp loc_F972F
loc_F9616:
mov rax, [rbp+var_10]
mov eax, [rax+40h]
mov [rbp+var_24], eax
mov rax, [rbp+var_10]
mov dword ptr [rax+40h], 9
mov rax, [rbp+var_20]
cmp qword ptr [rax+0C0h], 0
jz short loc_F964E
mov rax, [rbp+var_20]
mov rax, [rax+0C0h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+28h]
call rax
loc_F964E:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov rcx, [rcx+10h]
mov [rcx], rax
cmp rax, 0
jz short loc_F967D
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rax+10h], rcx
jmp short loc_F9690
loc_F967D:
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
mov rax, [rbp+var_20]
mov [rax+98h], rcx
loc_F9690:
mov rax, [rbp+var_20]
mov rax, [rax+80h]
mov rcx, [rbp+var_10]
mov [rcx+8], rax
cmp rax, 0
jz short loc_F96BF
mov rcx, [rbp+var_10]
add rcx, 8
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rax+10h], rcx
jmp short loc_F96D2
loc_F96BF:
mov rcx, [rbp+var_10]
add rcx, 8
mov rax, [rbp+var_20]
mov [rax+88h], rcx
loc_F96D2:
mov rcx, [rbp+var_20]
add rcx, 80h
mov rax, [rbp+var_10]
mov [rax+10h], rcx
call get_cond
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+20h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_20]
mov [rax+80h], rcx
mov rdi, [rbp+var_20]
xor esi, esi
call free_all_read_locks
mov rdi, [rbp+var_20]
add rdi, 18h
call inline_mysql_mutex_unlock_28
mov rdi, [rbp+var_10]
mov esi, [rbp+var_24]
mov rdx, [rbp+var_18]
call thr_upgrade_write_delay_lock
mov [rbp+var_1], al
loc_F972F:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char thr_reschedule_write_lock(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rax
int v5; // [rsp+Ch] [rbp-24h]
long long v6; // [rsp+10h] [rbp-20h]
v6 = *(_QWORD *)(a1 + 24);
inline_mysql_mutex_lock_27(v6 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x5DEu);
if ( *(_QWORD *)(v6 + 96) )
{
v5 = *(_DWORD *)(a1 + 64);
*(_DWORD *)(a1 + 64) = 9;
if ( *(_QWORD *)(v6 + 192) )
(*(void ( **)(_QWORD))(v6 + 192))(*(_QWORD *)(a1 + 40));
v2 = *(_QWORD *)(a1 + 8);
**(_QWORD **)(a1 + 16) = v2;
if ( v2 )
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL) = *(_QWORD *)(a1 + 16);
else
*(_QWORD *)(v6 + 152) = *(_QWORD *)(a1 + 16);
v3 = *(_QWORD *)(v6 + 128);
*(_QWORD *)(a1 + 8) = v3;
if ( v3 )
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL) = a1 + 8;
else
*(_QWORD *)(v6 + 136) = a1 + 8;
*(_QWORD *)(a1 + 16) = v6 + 128;
*(_QWORD *)(a1 + 32) = get_cond();
*(_QWORD *)(v6 + 128) = a1;
free_all_read_locks(v6, 0LL);
inline_mysql_mutex_unlock_28(v6 + 24);
return thr_upgrade_write_delay_lock(a1, v5, a2);
}
else
{
inline_mysql_mutex_unlock_28(v6 + 24);
return 0;
}
}
| thr_reschedule_write_lock:
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 RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x18
LEA RSI,[0x254688]
MOV EDX,0x5de
CALL 0x001f7900
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x60],0x0
JNZ 0x001f9616
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x18
CALL 0x001f7970
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001f972f
LAB_001f9616:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x40]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x40],0x9
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xc0],0x0
JZ 0x001f964e
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x28]
CALL RAX
LAB_001f964e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x001f967d
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001f9690
LAB_001f967d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x98],RCX
LAB_001f9690:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x80]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x8],RAX
CMP RAX,0x0
JZ 0x001f96bf
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001f96d2
LAB_001f96bf:
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x88],RCX
LAB_001f96d2:
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,0x80
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
CALL 0x001f9740
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x80],RCX
MOV RDI,qword ptr [RBP + -0x20]
XOR ESI,ESI
CALL 0x001f9750
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x18
CALL 0x001f7970
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001f9040
MOV byte ptr [RBP + -0x1],AL
LAB_001f972f:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 thr_reschedule_write_lock(long param_1,int8 param_2)
{
int4 uVar1;
long lVar2;
long lVar3;
int8 uVar4;
int1 local_9;
lVar2 = *(long *)(param_1 + 0x18);
inline_mysql_mutex_lock
(lVar2 + 0x18,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x5de);
if (*(long *)(lVar2 + 0x60) == 0) {
inline_mysql_mutex_unlock(lVar2 + 0x18);
local_9 = 0;
}
else {
uVar1 = *(int4 *)(param_1 + 0x40);
*(int4 *)(param_1 + 0x40) = 9;
if (*(long *)(lVar2 + 0xc0) != 0) {
(**(code **)(lVar2 + 0xc0))(*(int8 *)(param_1 + 0x28));
}
lVar3 = *(long *)(param_1 + 8);
**(long **)(param_1 + 0x10) = lVar3;
if (lVar3 == 0) {
*(int8 *)(lVar2 + 0x98) = *(int8 *)(param_1 + 0x10);
}
else {
*(int8 *)(*(long *)(param_1 + 8) + 0x10) = *(int8 *)(param_1 + 0x10);
}
lVar3 = *(long *)(lVar2 + 0x80);
*(long *)(param_1 + 8) = lVar3;
if (lVar3 == 0) {
*(long *)(lVar2 + 0x88) = param_1 + 8;
}
else {
*(long *)(*(long *)(param_1 + 8) + 0x10) = param_1 + 8;
}
*(long *)(param_1 + 0x10) = lVar2 + 0x80;
uVar4 = get_cond();
*(int8 *)(param_1 + 0x20) = uVar4;
*(long *)(lVar2 + 0x80) = param_1;
free_all_read_locks(lVar2,0);
inline_mysql_mutex_unlock(lVar2 + 0x18);
local_9 = thr_upgrade_write_delay_lock(param_1,uVar1,param_2);
}
return local_9;
}
| |
33,838 | thr_reschedule_write_lock | eloqsql/mysys/thr_lock.c | my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data,
ulong lock_wait_timeout)
{
THR_LOCK *lock=data->lock;
enum thr_lock_type write_lock_type;
DBUG_ENTER("thr_reschedule_write_lock");
mysql_mutex_lock(&lock->mutex);
if (!lock->read_wait.data) /* No waiting read locks */
{
mysql_mutex_unlock(&lock->mutex);
DBUG_RETURN(0);
}
write_lock_type= data->type;
data->type=TL_WRITE_DELAYED;
if (lock->update_status)
(*lock->update_status)(data->status_param);
if (((*data->prev)=data->next)) /* remove from lock-list */
data->next->prev= data->prev;
else
lock->write.last=data->prev;
if ((data->next=lock->write_wait.data)) /* Put first in lock_list */
data->next->prev= &data->next;
else
lock->write_wait.last= &data->next;
data->prev= &lock->write_wait.data;
data->cond=get_cond(); /* This was zero */
lock->write_wait.data=data;
free_all_read_locks(lock,0);
mysql_mutex_unlock(&lock->mutex);
DBUG_RETURN(thr_upgrade_write_delay_lock(data, write_lock_type,
lock_wait_timeout));
} | O3 | c | thr_reschedule_write_lock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%rdi), %r12
leaq 0x18(%r12), %rbx
cmpq $0x0, 0x58(%r12)
jne 0xa3e57
movq %rbx, %rdi
callq 0x29220
cmpq $0x0, 0x60(%r12)
je 0xa3e34
movq %r14, -0x38(%rbp)
leaq 0x60(%r12), %r13
movl 0x40(%r15), %eax
movl %eax, -0x2c(%rbp)
movl $0x9, 0x40(%r15)
movq 0xc0(%r12), %rax
testq %rax, %rax
je 0xa3d08
movq 0x28(%r15), %rdi
callq *%rax
leaq 0x8(%r15), %rax
movq 0x8(%r15), %rcx
movq 0x10(%r15), %rdx
movq %rcx, (%rdx)
leaq 0x98(%r12), %rdx
leaq 0x10(%rcx), %rsi
testq %rcx, %rcx
cmoveq %rdx, %rsi
movq 0x10(%r15), %rcx
movq %rcx, (%rsi)
leaq 0x80(%r12), %rcx
movq 0x80(%r12), %rdx
movq %rdx, 0x8(%r15)
leaq 0x88(%r12), %rsi
leaq 0x10(%rdx), %rdi
testq %rdx, %rdx
cmoveq %rsi, %rdi
movq %rax, (%rdi)
movq %rcx, 0x10(%r15)
callq 0xa1b22
addq $0x8, %rax
movq %rax, 0x20(%r15)
movq %r15, 0x80(%r12)
movq 0x60(%r12), %r14
movq 0x78(%r12), %rax
movq %r14, (%rax)
movq 0x78(%r12), %rax
movq %rax, 0x10(%r14)
movq 0x68(%r12), %rax
movq %rax, 0x78(%r12)
movq %r13, 0x68(%r12)
movq 0x20(%r14), %r13
cmpl $0x5, 0x40(%r14)
jne 0xa3dac
incl 0xa8(%r12)
movq $0x0, 0x20(%r14)
movq 0x30(%r13), %rdi
testq %rdi, %rdi
jne 0xa3dd0
movq %r13, %rdi
callq 0x295c0
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0xa3d99
jmp 0xa3de2
leaq 0x2e2239(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x170(%rax)
jmp 0xa3dbd
movq 0x68(%r12), %rax
movq $0x0, (%rax)
cmpq $0x0, 0x60(%r12)
jne 0xa3e02
movq $0x0, 0xa0(%r12)
movq 0x58(%r12), %rdi
testq %rdi, %rdi
movq -0x38(%rbp), %r14
jne 0xa3e70
movq %rbx, %rdi
callq 0x291e0
movq %r15, %rdi
movl -0x2c(%rbp), %esi
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa381b
movq 0x58(%r12), %rdi
testq %rdi, %rdi
jne 0xa3e82
movq %rbx, %rdi
callq 0x291e0
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x389ab(%rip), %rsi # 0xdc809
movq %rbx, %rdi
movl $0x5de, %edx # imm = 0x5DE
callq 0x2eb8f
jmp 0xa3cd1
leaq 0x2e2199(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xa3e10
leaq 0x2e2187(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xa3e3e
| thr_reschedule_write_lock:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
mov r15, rdi
mov r12, [rdi+18h]
lea rbx, [r12+18h]
cmp qword ptr [r12+58h], 0
jnz loc_A3E57
mov rdi, rbx
call _pthread_mutex_lock
loc_A3CD1:
cmp qword ptr [r12+60h], 0
jz loc_A3E34
mov [rbp+var_38], r14
lea r13, [r12+60h]
mov eax, [r15+40h]
mov [rbp+var_2C], eax
mov dword ptr [r15+40h], 9
mov rax, [r12+0C0h]
test rax, rax
jz short loc_A3D08
mov rdi, [r15+28h]
call rax
loc_A3D08:
lea rax, [r15+8]
mov rcx, [r15+8]
mov rdx, [r15+10h]
mov [rdx], rcx
lea rdx, [r12+98h]
lea rsi, [rcx+10h]
test rcx, rcx
cmovz rsi, rdx
mov rcx, [r15+10h]
mov [rsi], rcx
lea rcx, [r12+80h]
mov rdx, [r12+80h]
mov [r15+8], rdx
lea rsi, [r12+88h]
lea rdi, [rdx+10h]
test rdx, rdx
cmovz rdi, rsi
mov [rdi], rax
mov [r15+10h], rcx
call _my_thread_var
add rax, 8
mov [r15+20h], rax
mov [r12+80h], r15
mov r14, [r12+60h]
mov rax, [r12+78h]
mov [rax], r14
mov rax, [r12+78h]
mov [r14+10h], rax
mov rax, [r12+68h]
mov [r12+78h], rax
mov [r12+68h], r13
loc_A3D99:
mov r13, [r14+20h]
cmp dword ptr [r14+40h], 5
jnz short loc_A3DAC
inc dword ptr [r12+0A8h]
loc_A3DAC:
mov qword ptr [r14+20h], 0
mov rdi, [r13+30h]
test rdi, rdi
jnz short loc_A3DD0
loc_A3DBD:
mov rdi, r13
call _pthread_cond_signal
mov r14, [r14+8]
test r14, r14
jnz short loc_A3D99
jmp short loc_A3DE2
loc_A3DD0:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_A3DBD
loc_A3DE2:
mov rax, [r12+68h]
mov qword ptr [rax], 0
cmp qword ptr [r12+60h], 0
jnz short loc_A3E02
mov qword ptr [r12+0A0h], 0
loc_A3E02:
mov rdi, [r12+58h]
test rdi, rdi
mov r14, [rbp+var_38]
jnz short loc_A3E70
loc_A3E10:
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r15
mov esi, [rbp+var_2C]
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp thr_upgrade_write_delay_lock
loc_A3E34:
mov rdi, [r12+58h]
test rdi, rdi
jnz short loc_A3E82
loc_A3E3E:
mov rdi, rbx
call _pthread_mutex_unlock
xor eax, eax
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A3E57:
lea rsi, aWorkspaceLlm4b_23; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 5DEh
call psi_mutex_lock
jmp loc_A3CD1
loc_A3E70:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_A3E10
loc_A3E82:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_A3E3E
| char thr_reschedule_write_lock(long long a1, long long a2)
{
long long v3; // r12
void ( *v4)(_QWORD); // rax
long long v5; // rax
long long v6; // rcx
_QWORD *v7; // rsi
long long v8; // rdx
long long *v9; // rdi
long long v10; // r14
long long v11; // r13
int v14; // [rsp+14h] [rbp-2Ch]
v3 = *(_QWORD *)(a1 + 24);
if ( *(_QWORD *)(v3 + 88) )
psi_mutex_lock(v3 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x5DEu);
else
pthread_mutex_lock(v3 + 24);
if ( *(_QWORD *)(v3 + 96) )
{
v14 = *(_DWORD *)(a1 + 64);
*(_DWORD *)(a1 + 64) = 9;
v4 = *(void ( **)(_QWORD))(v3 + 192);
if ( v4 )
v4(*(_QWORD *)(a1 + 40));
v5 = a1 + 8;
v6 = *(_QWORD *)(a1 + 8);
**(_QWORD **)(a1 + 16) = v6;
v7 = (_QWORD *)(v6 + 16);
if ( !v6 )
v7 = (_QWORD *)(v3 + 152);
*v7 = *(_QWORD *)(a1 + 16);
v8 = *(_QWORD *)(v3 + 128);
*(_QWORD *)(a1 + 8) = v8;
v9 = (long long *)(v8 + 16);
if ( !v8 )
v9 = (long long *)(v3 + 136);
*v9 = v5;
*(_QWORD *)(a1 + 16) = v3 + 128;
*(_QWORD *)(a1 + 32) = my_thread_var(v9, (const char *)(v3 + 136)) + 8;
*(_QWORD *)(v3 + 128) = a1;
v10 = *(_QWORD *)(v3 + 96);
**(_QWORD **)(v3 + 120) = v10;
*(_QWORD *)(v10 + 16) = *(_QWORD *)(v3 + 120);
*(_QWORD *)(v3 + 120) = *(_QWORD *)(v3 + 104);
*(_QWORD *)(v3 + 104) = v3 + 96;
do
{
v11 = *(_QWORD *)(v10 + 32);
if ( *(_DWORD *)(v10 + 64) == 5 )
++*(_DWORD *)(v3 + 168);
*(_QWORD *)(v10 + 32) = 0LL;
if ( *(_QWORD *)(v11 + 48) )
PSI_server[46]();
pthread_cond_signal(v11);
v10 = *(_QWORD *)(v10 + 8);
}
while ( v10 );
**(_QWORD **)(v3 + 104) = 0LL;
if ( !*(_QWORD *)(v3 + 96) )
*(_QWORD *)(v3 + 160) = 0LL;
if ( *(_QWORD *)(v3 + 88) )
PSI_server[44]();
pthread_mutex_unlock(v3 + 24);
return thr_upgrade_write_delay_lock(a1, v14, a2);
}
else
{
if ( *(_QWORD *)(v3 + 88) )
PSI_server[44]();
pthread_mutex_unlock(v3 + 24);
return 0;
}
}
| thr_reschedule_write_lock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV R15,RDI
MOV R12,qword ptr [RDI + 0x18]
LEA RBX,[R12 + 0x18]
CMP qword ptr [R12 + 0x58],0x0
JNZ 0x001a3e57
MOV RDI,RBX
CALL 0x00129220
LAB_001a3cd1:
CMP qword ptr [R12 + 0x60],0x0
JZ 0x001a3e34
MOV qword ptr [RBP + -0x38],R14
LEA R13,[R12 + 0x60]
MOV EAX,dword ptr [R15 + 0x40]
MOV dword ptr [RBP + -0x2c],EAX
MOV dword ptr [R15 + 0x40],0x9
MOV RAX,qword ptr [R12 + 0xc0]
TEST RAX,RAX
JZ 0x001a3d08
MOV RDI,qword ptr [R15 + 0x28]
CALL RAX
LAB_001a3d08:
LEA RAX,[R15 + 0x8]
MOV RCX,qword ptr [R15 + 0x8]
MOV RDX,qword ptr [R15 + 0x10]
MOV qword ptr [RDX],RCX
LEA RDX,[R12 + 0x98]
LEA RSI,[RCX + 0x10]
TEST RCX,RCX
CMOVZ RSI,RDX
MOV RCX,qword ptr [R15 + 0x10]
MOV qword ptr [RSI],RCX
LEA RCX,[R12 + 0x80]
MOV RDX,qword ptr [R12 + 0x80]
MOV qword ptr [R15 + 0x8],RDX
LEA RSI,[R12 + 0x88]
LEA RDI,[RDX + 0x10]
TEST RDX,RDX
CMOVZ RDI,RSI
MOV qword ptr [RDI],RAX
MOV qword ptr [R15 + 0x10],RCX
CALL 0x001a1b22
ADD RAX,0x8
MOV qword ptr [R15 + 0x20],RAX
MOV qword ptr [R12 + 0x80],R15
MOV R14,qword ptr [R12 + 0x60]
MOV RAX,qword ptr [R12 + 0x78]
MOV qword ptr [RAX],R14
MOV RAX,qword ptr [R12 + 0x78]
MOV qword ptr [R14 + 0x10],RAX
MOV RAX,qword ptr [R12 + 0x68]
MOV qword ptr [R12 + 0x78],RAX
MOV qword ptr [R12 + 0x68],R13
LAB_001a3d99:
MOV R13,qword ptr [R14 + 0x20]
CMP dword ptr [R14 + 0x40],0x5
JNZ 0x001a3dac
INC dword ptr [R12 + 0xa8]
LAB_001a3dac:
MOV qword ptr [R14 + 0x20],0x0
MOV RDI,qword ptr [R13 + 0x30]
TEST RDI,RDI
JNZ 0x001a3dd0
LAB_001a3dbd:
MOV RDI,R13
CALL 0x001295c0
MOV R14,qword ptr [R14 + 0x8]
TEST R14,R14
JNZ 0x001a3d99
JMP 0x001a3de2
LAB_001a3dd0:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x001a3dbd
LAB_001a3de2:
MOV RAX,qword ptr [R12 + 0x68]
MOV qword ptr [RAX],0x0
CMP qword ptr [R12 + 0x60],0x0
JNZ 0x001a3e02
MOV qword ptr [R12 + 0xa0],0x0
LAB_001a3e02:
MOV RDI,qword ptr [R12 + 0x58]
TEST RDI,RDI
MOV R14,qword ptr [RBP + -0x38]
JNZ 0x001a3e70
LAB_001a3e10:
MOV RDI,RBX
CALL 0x001291e0
MOV RDI,R15
MOV ESI,dword ptr [RBP + -0x2c]
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001a381b
LAB_001a3e34:
MOV RDI,qword ptr [R12 + 0x58]
TEST RDI,RDI
JNZ 0x001a3e82
LAB_001a3e3e:
MOV RDI,RBX
CALL 0x001291e0
XOR EAX,EAX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a3e57:
LEA RSI,[0x1dc809]
MOV RDI,RBX
MOV EDX,0x5de
CALL 0x0012eb8f
JMP 0x001a3cd1
LAB_001a3e70:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001a3e10
LAB_001a3e82:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001a3e3e
|
int8 thr_reschedule_write_lock(long param_1,int8 param_2)
{
pthread_mutex_t *__mutex;
int4 uVar1;
long lVar2;
pthread_cond_t *__cond;
long lVar3;
int8 uVar4;
int8 *puVar5;
long *plVar6;
lVar2 = *(long *)(param_1 + 0x18);
__mutex = (pthread_mutex_t *)(lVar2 + 0x18);
if (*(long *)(lVar2 + 0x58) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x5de);
}
if (*(long *)(lVar2 + 0x60) != 0) {
uVar1 = *(int4 *)(param_1 + 0x40);
*(int4 *)(param_1 + 0x40) = 9;
if (*(code **)(lVar2 + 0xc0) != (code *)0x0) {
(**(code **)(lVar2 + 0xc0))(*(int8 *)(param_1 + 0x28));
}
lVar3 = *(long *)(param_1 + 8);
**(long **)(param_1 + 0x10) = lVar3;
puVar5 = (int8 *)(lVar3 + 0x10);
if (lVar3 == 0) {
puVar5 = (int8 *)(lVar2 + 0x98);
}
*puVar5 = *(int8 *)(param_1 + 0x10);
lVar3 = *(long *)(lVar2 + 0x80);
*(long *)(param_1 + 8) = lVar3;
plVar6 = (long *)(lVar3 + 0x10);
if (lVar3 == 0) {
plVar6 = (long *)(lVar2 + 0x88);
}
*plVar6 = param_1 + 8;
*(long *)(param_1 + 0x10) = lVar2 + 0x80;
lVar3 = _my_thread_var();
*(long *)(param_1 + 0x20) = lVar3 + 8;
*(long *)(lVar2 + 0x80) = param_1;
lVar3 = *(long *)(lVar2 + 0x60);
**(long **)(lVar2 + 0x78) = lVar3;
*(int8 *)(lVar3 + 0x10) = *(int8 *)(lVar2 + 0x78);
*(int8 *)(lVar2 + 0x78) = *(int8 *)(lVar2 + 0x68);
*(long *)(lVar2 + 0x68) = lVar2 + 0x60;
do {
__cond = *(pthread_cond_t **)(lVar3 + 0x20);
if (*(int *)(lVar3 + 0x40) == 5) {
*(int *)(lVar2 + 0xa8) = *(int *)(lVar2 + 0xa8) + 1;
}
*(int8 *)(lVar3 + 0x20) = 0;
if (__cond[1].__align != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal(__cond);
lVar3 = *(long *)(lVar3 + 8);
} while (lVar3 != 0);
**(int8 **)(lVar2 + 0x68) = 0;
if (*(long *)(lVar2 + 0x60) == 0) {
*(int8 *)(lVar2 + 0xa0) = 0;
}
if (*(long *)(lVar2 + 0x58) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
uVar4 = thr_upgrade_write_delay_lock(param_1,uVar1,param_2);
return uVar4;
}
if (*(long *)(lVar2 + 0x58) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return 0;
}
| |
33,839 | glfwSetWindowAspectRatio | untodesu[P]riteg/build_O1/_deps/glfw-src/src/window.c | GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* handle, int numer, int denom)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
assert(window != NULL);
assert(numer != 0);
assert(denom != 0);
_GLFW_REQUIRE_INIT();
if (numer != GLFW_DONT_CARE && denom != GLFW_DONT_CARE)
{
if (numer <= 0 || denom <= 0)
{
_glfwInputError(GLFW_INVALID_VALUE,
"Invalid window aspect ratio %i:%i",
numer, denom);
return;
}
}
window->numer = numer;
window->denom = denom;
if (window->monitor || !window->resizable)
return;
_glfwPlatformSetWindowAspectRatio(window, numer, denom);
} | O1 | c | glfwSetWindowAspectRatio:
pushq %rax
testq %rdi, %rdi
je 0x1d7c2
movl %edx, %ecx
movl %esi, %edx
testl %esi, %esi
je 0x1d7e1
testl %ecx, %ecx
je 0x1d800
leaq 0x86ee0(%rip), %rax # 0xa4638
cmpl $0x0, (%rax)
je 0x1d7a3
cmpl $-0x1, %edx
sete %al
cmpl $-0x1, %ecx
sete %sil
orb %al, %sil
jne 0x1d794
testl %edx, %edx
setg %al
testl %ecx, %ecx
setg %sil
testb %sil, %al
jne 0x1d794
leaq 0x62e98(%rip), %rsi # 0x8061e
movl $0x10004, %edi # imm = 0x10004
xorl %eax, %eax
popq %r8
jmp 0x19081
movl %edx, 0x60(%rdi)
movl %ecx, 0x64(%rdi)
cmpq $0x0, 0x40(%rdi)
je 0x1d7b2
popq %rax
retq
movl $0x10001, %edi # imm = 0x10001
xorl %esi, %esi
xorl %eax, %eax
popq %rcx
jmp 0x19081
cmpl $0x0, 0x8(%rdi)
je 0x1d7a1
movl %edx, %esi
movl %ecx, %edx
popq %rax
jmp 0x22fc8
leaq 0x45e35(%rip), %rdi # 0x635fe
leaq 0x62a72(%rip), %rsi # 0x80242
leaq 0x62dfb(%rip), %rcx # 0x805d2
movl $0x268, %edx # imm = 0x268
callq 0xc540
leaq 0x62e20(%rip), %rdi # 0x80608
leaq 0x62a53(%rip), %rsi # 0x80242
leaq 0x62ddc(%rip), %rcx # 0x805d2
movl $0x269, %edx # imm = 0x269
callq 0xc540
leaq 0x62e0c(%rip), %rdi # 0x80613
leaq 0x62a34(%rip), %rsi # 0x80242
leaq 0x62dbd(%rip), %rcx # 0x805d2
movl $0x26a, %edx # imm = 0x26A
callq 0xc540
| glfwSetWindowAspectRatio:
push rax
test rdi, rdi
jz loc_1D7C2
mov ecx, edx
mov edx, esi
test esi, esi
jz loc_1D7E1
test ecx, ecx
jz loc_1D800
lea rax, _glfw
cmp dword ptr [rax], 0
jz short loc_1D7A3
cmp edx, 0FFFFFFFFh
setz al
cmp ecx, 0FFFFFFFFh
setz sil
or sil, al
jnz short loc_1D794
test edx, edx
setnle al
test ecx, ecx
setnle sil
test al, sil
jnz short loc_1D794
lea rsi, aInvalidWindowA; "Invalid window aspect ratio %i:%i"
mov edi, 10004h
xor eax, eax
pop r8
jmp _glfwInputError
loc_1D794:
mov [rdi+60h], edx
mov [rdi+64h], ecx
cmp qword ptr [rdi+40h], 0
jz short loc_1D7B2
loc_1D7A1:
pop rax
retn
loc_1D7A3:
mov edi, 10001h
xor esi, esi
xor eax, eax
pop rcx
jmp _glfwInputError
loc_1D7B2:
cmp dword ptr [rdi+8], 0
jz short loc_1D7A1
mov esi, edx
mov edx, ecx
pop rax
jmp _glfwPlatformSetWindowAspectRatio
loc_1D7C2:
lea rdi, aWindowNull; "window != NULL"
lea rsi, aWorkspaceLlm4b_15; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGlfwsetwin_5; "void glfwSetWindowAspectRatio(GLFWwindo"...
mov edx, 268h
call ___assert_fail
loc_1D7E1:
lea rdi, aNumer0; "numer != 0"
lea rsi, aWorkspaceLlm4b_15; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGlfwsetwin_5; "void glfwSetWindowAspectRatio(GLFWwindo"...
mov edx, 269h
call ___assert_fail
loc_1D800:
lea rdi, aDenom0; "denom != 0"
lea rsi, aWorkspaceLlm4b_15; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGlfwsetwin_5; "void glfwSetWindowAspectRatio(GLFWwindo"...
mov edx, 26Ah
call ___assert_fail
| long long ( * glfwSetWindowAspectRatio(long long a1, unsigned int a2, unsigned int a3))(_QWORD, _QWORD)
{
long long ( *result)(_QWORD, _QWORD); // rax
if ( !a1 )
__assert_fail(
"window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/window.c",
616LL,
"void glfwSetWindowAspectRatio(GLFWwindow *, int, int)");
if ( !a2 )
__assert_fail(
"numer != 0",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/window.c",
617LL,
"void glfwSetWindowAspectRatio(GLFWwindow *, int, int)");
if ( !a3 )
__assert_fail(
"denom != 0",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/window.c",
618LL,
"void glfwSetWindowAspectRatio(GLFWwindow *, int, int)");
if ( !glfw[0] )
return glfwInputError(0x10001u, 0LL, a2);
if ( a2 != -1 && a3 != -1 && ((int)a3 <= 0 || (int)a2 <= 0) )
return glfwInputError(0x10004u, (long long)"Invalid window aspect ratio %i:%i", a2, a3);
*(_DWORD *)(a1 + 96) = a2;
*(_DWORD *)(a1 + 100) = a3;
if ( !*(_QWORD *)(a1 + 64) )
{
if ( *(_DWORD *)(a1 + 8) )
return (long long ( *)(_QWORD, _QWORD))glfwPlatformSetWindowAspectRatio(a1, a2, a3);
}
return result;
}
| glfwSetWindowAspectRatio:
PUSH RAX
TEST RDI,RDI
JZ 0x0011d7c2
MOV ECX,EDX
MOV EDX,ESI
TEST ESI,ESI
JZ 0x0011d7e1
TEST ECX,ECX
JZ 0x0011d800
LEA RAX,[0x1a4638]
CMP dword ptr [RAX],0x0
JZ 0x0011d7a3
CMP EDX,-0x1
SETZ AL
CMP ECX,-0x1
SETZ SIL
OR SIL,AL
JNZ 0x0011d794
TEST EDX,EDX
SETG AL
TEST ECX,ECX
SETG SIL
TEST AL,SIL
JNZ 0x0011d794
LEA RSI,[0x18061e]
MOV EDI,0x10004
XOR EAX,EAX
POP R8
JMP 0x00119081
LAB_0011d794:
MOV dword ptr [RDI + 0x60],EDX
MOV dword ptr [RDI + 0x64],ECX
CMP qword ptr [RDI + 0x40],0x0
JZ 0x0011d7b2
LAB_0011d7a1:
POP RAX
RET
LAB_0011d7a3:
MOV EDI,0x10001
XOR ESI,ESI
XOR EAX,EAX
POP RCX
JMP 0x00119081
LAB_0011d7b2:
CMP dword ptr [RDI + 0x8],0x0
JZ 0x0011d7a1
MOV ESI,EDX
MOV EDX,ECX
POP RAX
JMP 0x00122fc8
LAB_0011d7c2:
LEA RDI,[0x1635fe]
LEA RSI,[0x180242]
LEA RCX,[0x1805d2]
MOV EDX,0x268
CALL 0x0010c540
LAB_0011d7e1:
LEA RDI,[0x180608]
LEA RSI,[0x180242]
LEA RCX,[0x1805d2]
MOV EDX,0x269
CALL 0x0010c540
LAB_0011d800:
LEA RDI,[0x180613]
LEA RSI,[0x180242]
LEA RCX,[0x1805d2]
MOV EDX,0x26a
CALL 0x0010c540
|
int8 glfwSetWindowAspectRatio(long param_1,int param_2,int param_3)
{
int8 in_RAX;
int8 uVar1;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/window.c"
,0x268,"void glfwSetWindowAspectRatio(GLFWwindow *, int, int)");
}
if (param_2 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("numer != 0",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/window.c"
,0x269,"void glfwSetWindowAspectRatio(GLFWwindow *, int, int)");
}
if (param_3 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("denom != 0",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/window.c"
,0x26a,"void glfwSetWindowAspectRatio(GLFWwindow *, int, int)");
}
if (_glfw != 0) {
if ((param_3 != -1 && param_2 != -1) && (param_2 < 1 || param_3 < 1)) {
uVar1 = _glfwInputError(0x10004,"Invalid window aspect ratio %i:%i",param_2,param_3,in_RAX);
return uVar1;
}
*(int *)(param_1 + 0x60) = param_2;
*(int *)(param_1 + 100) = param_3;
if ((*(long *)(param_1 + 0x40) == 0) && (*(int *)(param_1 + 8) != 0)) {
uVar1 = _glfwPlatformSetWindowAspectRatio(param_1,param_2,param_3);
return uVar1;
}
return in_RAX;
}
uVar1 = _glfwInputError(0x10001,0,param_2,in_RAX);
return uVar1;
}
| |
33,840 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const | monkey531[P]llama/common/json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x97099
movq %rsi, %r15
movq 0x8(%r14), %rdi
callq 0x9a71a
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x970f7
addq $0x20, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x265e0
movq %rax, %rbx
movq %r14, %rdi
callq 0x6a830
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3b33e(%rip), %rsi # 0xd23f9
leaq 0x8(%rsp), %rdi
callq 0x99d09
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x7f4da
xorl %ebp, %ebp
leaq 0x880c2(%rip), %rsi # 0x11f1a8
leaq -0x2fba5(%rip), %rdx # 0x67548
movq %rbx, %rdi
callq 0x275b0
jmp 0x97161
pushq $0x20
popq %rdi
callq 0x265e0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x2ac52
leaq 0x3b30e(%rip), %rsi # 0xd2429
leaq 0x3b30d(%rip), %rcx # 0xd242f
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x9a313
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x9a77e
xorl %ebp, %ebp
leaq 0x87fd6(%rip), %rsi # 0x11f128
leaq -0x2fc11(%rip), %rdx # 0x67548
movq %rbx, %rdi
callq 0x275b0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x27998
jmp 0x97176
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
jmp 0x97187
jmp 0x97193
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x27998
testb %bpl, %bpl
jne 0x97196
jmp 0x9719e
movq %rax, %r14
movq %rbx, %rdi
callq 0x268f0
movq %r14, %rdi
callq 0x27660
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_97099
mov r15, rsi
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_970F7
add rax, 20h ; ' '
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_97099:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_40]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_97161
loc_970F7:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_60]
lea rdx, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_97161:
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_97176
mov r14, rax
mov bpl, 1
loc_97176:
lea rdi, [rsp+68h+var_40]
jmp short loc_97187
jmp short loc_97193
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
loc_97187:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_97196
jmp short loc_9719E
loc_97193:
mov r14, rax
loc_97196:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_9719E:
mov rdi, r14
call __Unwind_Resume
| long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
long long a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx
char v6; // [rsp+0h] [rbp-68h]
int v7[6]; // [rsp+8h] [rbp-60h] BYREF
char v8; // [rsp+20h] [rbp-48h]
const char *v9; // [rsp+28h] [rbp-40h] BYREF
int v10; // [rsp+30h] [rbp-38h]
int v11; // [rsp+38h] [rbp-30h]
char v12; // [rsp+40h] [rbp-28h]
int v13; // [rsp+48h] [rbp-20h]
int v14; // [rsp+50h] [rbp-18h]
int v15; // [rsp+58h] [rbp-10h]
char v16; // [rsp+60h] [rbp-8h]
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v9 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v7, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
304,
(long long)v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(_QWORD *)(a1 + 8));
if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::string::basic_string<std::allocator<char>>(&v9, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v7,
"key '",
&v9,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v5,
403,
v6,
v7[0],
v7[2],
v7[4],
v8,
(int)v9,
v10,
v11,
v12,
v13,
v14,
v15,
v16);
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v2 + 32;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x00197099
MOV R15,RSI
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x0019a71a
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x001970f7
ADD RAX,0x20
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00197099:
PUSH 0x20
POP RDI
CALL 0x001265e0
MOV RBX,RAX
MOV RDI,R14
CALL 0x0016a830
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_001970b4:
LEA RSI,[0x1d23f9]
LEA RDI,[RSP + 0x8]
CALL 0x00199d09
MOV BPL,0x1
LAB_001970c8:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0017f4da
XOR EBP,EBP
LEA RSI,[0x21f1a8]
LEA RDX,[0x167548]
MOV RDI,RBX
CALL 0x001275b0
LAB_001970f7:
PUSH 0x20
POP RDI
CALL 0x001265e0
MOV RBX,RAX
LAB_00197102:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
MOV RSI,R15
CALL 0x0012ac52
LAB_00197114:
LEA RSI,[0x1d2429]
LEA RCX,[0x1d242f]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x0019a313
MOV BPL,0x1
LAB_00197134:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0019a77e
XOR EBP,EBP
LEA RSI,[0x21f128]
LEA RDX,[0x167548]
MOV RDI,RBX
CALL 0x001275b0
|
long _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long lVar1;
int8 uVar2;
allocator local_61;
detail local_60 [32];
char *local_40 [4];
if (*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>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40[0] = (char *)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>
::type_name(param_1);
/* try { // try from 001970b4 to 001970c4 has its CatchHandler @ 00197193 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_60,"cannot use at() with ",local_40);
/* try { // try from 001970c8 to 001970f4 has its CatchHandler @ 0019717f */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x130,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(*(int8 *)(param_1 + 8));
if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) {
return lVar1 + 0x20;
}
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 00197102 to 00197113 has its CatchHandler @ 0019717d */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61);
/* try { // try from 00197114 to 00197130 has its CatchHandler @ 00197170 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_60,"key \'",(string *)local_40,"\' not found");
/* try { // try from 00197134 to 00197160 has its CatchHandler @ 00197161 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x193,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
| |
33,841 | ps_fetch_int32 | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static
void ps_fetch_int32(MYSQL_BIND *r_param, const MYSQL_FIELD * const field,
unsigned char **row)
{
switch (r_param->buffer_type) {
/* case MYSQL_TYPE_TINY:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 1);
break;
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_SHORT:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 2);
break; */
case MYSQL_TYPE_INT24:
case MYSQL_TYPE_LONG:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 4);
break;
default:
{
int32 sval= sint4korr(*row);
longlong lval= field->flags & UNSIGNED_FLAG ? (longlong)(uint32) sval : (longlong)sval;
convert_from_long(r_param, field, lval, field->flags & UNSIGNED_FLAG);
(*row) += 4;
}
break;
}
} | O3 | c | ps_fetch_int32:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl 0x60(%rdi), %eax
cmpl $0x9, %eax
je 0x26741
cmpl $0x3, %eax
jne 0x26754
movq %rbx, %rdx
movl $0x4, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x25b24
movq (%rbx), %rax
movslq (%rax), %rax
movl 0x64(%rsi), %ecx
andl $0x20, %ecx
movl %eax, %edx
cmoveq %rax, %rdx
callq 0x271ff
addq $0x4, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| ps_fetch_int32:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
mov eax, [rdi+60h]
cmp eax, 9
jz short loc_26741
cmp eax, 3
jnz short loc_26754
loc_26741:
mov rdx, rbx
mov ecx, 4
add rsp, 8
pop rbx
pop rbp
jmp ps_fetch_from_1_to_8_bytes
loc_26754:
mov rax, [rbx]
movsxd rax, dword ptr [rax]
mov ecx, [rsi+64h]
and ecx, 20h
mov edx, eax
cmovz rdx, rax
call convert_from_long
add qword ptr [rbx], 4
add rsp, 8
pop rbx
pop rbp
retn
| long long ps_fetch_int32(long long a1, long long a2, _BYTE **a3)
{
int v4; // eax
long long result; // rax
long long v6; // rdx
v4 = *(_DWORD *)(a1 + 96);
if ( v4 == 9 || v4 == 3 )
return ps_fetch_from_1_to_8_bytes(a1, a2, a3, 4u);
v6 = *(unsigned int *)*a3;
if ( (*(_DWORD *)(a2 + 100) & 0x20) == 0 )
v6 = *(int *)*a3;
result = convert_from_long(a1, a2, v6, *(_DWORD *)(a2 + 100) & 0x20);
*a3 += 4;
return result;
}
| ps_fetch_int32:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV EAX,dword ptr [RDI + 0x60]
CMP EAX,0x9
JZ 0x00126741
CMP EAX,0x3
JNZ 0x00126754
LAB_00126741:
MOV RDX,RBX
MOV ECX,0x4
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00125b24
LAB_00126754:
MOV RAX,qword ptr [RBX]
MOVSXD RAX,dword ptr [RAX]
MOV ECX,dword ptr [RSI + 0x64]
AND ECX,0x20
MOV EDX,EAX
CMOVZ RDX,RAX
CALL 0x001271ff
ADD qword ptr [RBX],0x4
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void ps_fetch_int32(long param_1,long param_2,long *param_3)
{
ulong uVar1;
if ((*(int *)(param_1 + 0x60) != 9) && (*(int *)(param_1 + 0x60) != 3)) {
uVar1 = (ulong)*(uint *)*param_3;
if ((*(uint *)(param_2 + 100) & 0x20) == 0) {
uVar1 = (long)(int)*(uint *)*param_3;
}
convert_from_long(param_1,param_2,uVar1);
*param_3 = *param_3 + 4;
return;
}
ps_fetch_from_1_to_8_bytes(param_1,param_2,param_3,4);
return;
}
| |
33,842 | ImPlot::SetupAxisLimits(int, double, double, int) | zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp | void SetupAxisLimits(ImAxis idx, double min_lim, double max_lim, ImPlotCond cond) {
ImPlotContext& gp = *GImPlot;
IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked,
"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!"); // get plot and axis
ImPlotPlot& plot = *gp.CurrentPlot;
ImPlotAxis& axis = plot.Axes[idx];
IM_ASSERT_USER_ERROR(axis.Enabled, "Axis is not enabled! Did you forget to call SetupAxis()?");
if (!plot.Initialized || cond == ImPlotCond_Always)
axis.SetRange(min_lim, max_lim);
axis.HasRange = true;
axis.RangeCond = cond;
} | O1 | cpp | ImPlot::SetupAxisLimits(int, double, double, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movl %edi, %ebp
movq 0x27e75f(%rip), %r14 # 0x336ca0
movq 0x50(%r14), %rax
testq %rax, %rax
je 0xb8553
cmpb $0x1, 0x9de(%rax)
jne 0xb855f
leaq 0x1dc9ea(%rip), %rdi # 0x294f44
callq 0x2161f4
movq 0x50(%r14), %r15
movslq %ebp, %rax
imulq $0x178, %rax, %r14 # imm = 0x178
cmpb $0x0, 0x184(%r15,%r14)
jne 0xb8584
leaq 0x1e2074(%rip), %rdi # 0x29a5f3
callq 0x2161f4
addq %r15, %r14
addq $0x18, %r14
cmpl $0x1, %ebx
je 0xb859a
cmpb $0x0, 0x9dd(%r15)
jne 0xb85ae
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0xc82a4
movb $0x1, 0x16f(%r14)
movl %ebx, 0x20(%r14)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ZN6ImPlot15SetupAxisLimitsEiddi:
push rbp
push r15
push r14
push rbx
sub rsp, 18h
mov ebx, esi
movsd [rsp+38h+var_28], xmm1
movsd [rsp+38h+var_30], xmm0
mov ebp, edi
mov r14, cs:GImPlot
mov rax, [r14+50h]
test rax, rax
jz short loc_B8553
cmp byte ptr [rax+9DEh], 1
jnz short loc_B855F
loc_B8553:
lea rdi, aSetupNeedsToBe; "Setup needs to be called after BeginPlo"...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_B855F:
mov r15, [r14+50h]
movsxd rax, ebp
imul r14, rax, 178h
cmp byte ptr [r15+r14+184h], 0
jnz short loc_B8584
lea rdi, aAxisIsNotEnabl; "Axis is not enabled! Did you forget to "...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_B8584:
add r14, r15
add r14, 18h
cmp ebx, 1
jz short loc_B859A
cmp byte ptr [r15+9DDh], 0
jnz short loc_B85AE
loc_B859A:
mov rdi, r14; this
movsd xmm0, [rsp+38h+var_30]; double
movsd xmm1, [rsp+38h+var_28]; double
call _ZN10ImPlotAxis8SetRangeEdd; ImPlotAxis::SetRange(double,double)
loc_B85AE:
mov byte ptr [r14+16Fh], 1
mov [r14+20h], ebx
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long ImPlot::SetupAxisLimits(ImPlot *this, const char *a2, double a3, double a4)
{
ImGui *v4; // r14
long long v5; // rax
long long v6; // r15
long long result; // rax
long long v8; // r14
long long v9; // r14
v4 = GImPlot;
v5 = *((_QWORD *)GImPlot + 10);
if ( !v5 || *(_BYTE *)(v5 + 2526) == 1 )
ImGui::ErrorLog(
(ImGui *)"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!",
a2);
v6 = *((_QWORD *)v4 + 10);
result = (int)this;
v8 = 376LL * (int)this;
if ( !*(_BYTE *)(v6 + v8 + 388) )
result = ImGui::ErrorLog((ImGui *)"Axis is not enabled! Did you forget to call SetupAxis()?", a2);
v9 = v6 + v8 + 24;
if ( (_DWORD)a2 == 1 || !*(_BYTE *)(v6 + 2525) )
result = ImPlotAxis::SetRange((ImPlotAxis *)v9, a3, a4);
*(_BYTE *)(v9 + 367) = 1;
*(_DWORD *)(v9 + 32) = (_DWORD)a2;
return result;
}
| SetupAxisLimits:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV EBX,ESI
MOVSD qword ptr [RSP + 0x10],XMM1
MOVSD qword ptr [RSP + 0x8],XMM0
MOV EBP,EDI
MOV R14,qword ptr [0x00436ca0]
MOV RAX,qword ptr [R14 + 0x50]
TEST RAX,RAX
JZ 0x001b8553
CMP byte ptr [RAX + 0x9de],0x1
JNZ 0x001b855f
LAB_001b8553:
LEA RDI,[0x394f44]
CALL 0x003161f4
LAB_001b855f:
MOV R15,qword ptr [R14 + 0x50]
MOVSXD RAX,EBP
IMUL R14,RAX,0x178
CMP byte ptr [R15 + R14*0x1 + 0x184],0x0
JNZ 0x001b8584
LEA RDI,[0x39a5f3]
CALL 0x003161f4
LAB_001b8584:
ADD R14,R15
ADD R14,0x18
CMP EBX,0x1
JZ 0x001b859a
CMP byte ptr [R15 + 0x9dd],0x0
JNZ 0x001b85ae
LAB_001b859a:
MOV RDI,R14
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVSD XMM1,qword ptr [RSP + 0x10]
CALL 0x001c82a4
LAB_001b85ae:
MOV byte ptr [R14 + 0x16f],0x1
MOV dword ptr [R14 + 0x20],EBX
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* ImPlot::SetupAxisLimits(int, double, double, int) */
void ImPlot::SetupAxisLimits(int param_1,double param_2,double param_3,int param_4)
{
long lVar1;
long lVar2;
lVar1 = GImPlot;
if ((*(long *)(GImPlot + 0x50) == 0) || (*(char *)(*(long *)(GImPlot + 0x50) + 0x9de) == '\x01'))
{
ImGui::ErrorLog(
"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!"
);
}
lVar1 = *(long *)(lVar1 + 0x50);
if (*(char *)(lVar1 + 0x184 + (long)param_1 * 0x178) == '\0') {
ImGui::ErrorLog("Axis is not enabled! Did you forget to call SetupAxis()?");
}
lVar2 = (long)param_1 * 0x178 + lVar1;
if ((param_4 == 1) || (*(char *)(lVar1 + 0x9dd) == '\0')) {
ImPlotAxis::SetRange((ImPlotAxis *)(lVar2 + 0x18),param_2,param_3);
}
*(int1 *)(lVar2 + 0x187) = 1;
*(int *)(lVar2 + 0x38) = param_4;
return;
}
| |
33,843 | nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*) | monkey531[P]llama/common/./json.hpp | static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x86eb9(%rip), %rsi # 0xf4380
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3bddc
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x3f08c
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x4f2a0
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rcx
callq 0x3f023
leaq 0x8(%rsp), %rdi
callq 0x29678
leaq 0x48(%rsp), %rdi
callq 0x29678
leaq 0x28(%rsp), %rdi
callq 0x29678
movq 0x68(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6cff0
leaq 0x68(%rsp), %rdi
callq 0x29678
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x6d583
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x29678
jmp 0x6d56f
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x29678
jmp 0x6d57e
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x29678
jmp 0x6d58d
movq %rax, %rbx
movq %rbx, %rdi
callq 0x293c0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
push rbp
push r15
push r14
push rbx
sub rsp, 88h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
lea rsi, aInvalidIterato; "invalid_iterator"
lea rdi, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_A1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0A8h+var_60]
lea rsi, [rsp+0A8h+var_80]
mov edx, ebp
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea rdi, [rsp+0A8h+var_A0]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*)
lea rdi, [rsp+0A8h+var_40]
lea rsi, [rsp+0A8h+var_60]
lea rdx, [rsp+0A8h+var_A0]
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&)
lea rdi, [rsp+0A8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdx, [rsp+0A8h+var_40]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator(int,char const*)
lea rdi, [rsp+0A8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 88h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_60]
jmp short loc_6D583
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6D56F
mov rbx, rax
loc_6D56F:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6D57E
mov rbx, rax
loc_6D57E:
lea rdi, [rsp+arg_20]; void *
loc_6D583:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6D58D
mov rbx, rax
loc_6D58D:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::invalid_iterator * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
nlohmann::json_abi_v3_11_3::detail::invalid_iterator *this,
int a2,
long long a3)
{
_QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF
_QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF
_BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF
char *v8[8]; // [rsp+68h] [rbp-40h] BYREF
std::string::basic_string<std::allocator<char>>(v6, (long long)"invalid_iterator");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v7, (long long)v6, a2);
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(v5);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(
(long long)v8,
(long long)v7,
(long long)v5,
a3);
std::string::~string(v5);
std::string::~string(v7);
std::string::~string(v6);
nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator(this, a2, v8[0]);
std::string::~string(v8);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x88
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
LAB_0016d4c0:
LEA RSI,[0x1f4380]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
CALL 0x0013bddc
LAB_0016d4d6:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x0013f08c
LAB_0016d4e7:
LEA RDI,[RSP + 0x8]
MOV RSI,R15
CALL 0x0014f2a0
LAB_0016d4f4:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RCX,R14
CALL 0x0013f023
LEA RDI,[RSP + 0x8]
CALL 0x00129678
LEA RDI,[RSP + 0x48]
CALL 0x00129678
LEA RDI,[RSP + 0x28]
CALL 0x00129678
MOV RDX,qword ptr [RSP + 0x68]
LAB_0016d52e:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0016cff0
LAB_0016d538:
LEA RDI,[RSP + 0x68]
CALL 0x00129678
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R14
POP R15
POP RBP
RET
|
invalid_iterator *
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(invalid_iterator *param_1,int param_2,string *param_3)
{
allocator local_a1;
basic_json local_a0 [32];
string local_80 [32];
exception local_60 [32];
char *local_40 [4];
/* try { // try from 0016d4c0 to 0016d4d5 has its CatchHandler @ 0016d58a */
std::__cxx11::string::string<std::allocator<char>>(local_80,"invalid_iterator",&local_a1);
/* try { // try from 0016d4d6 to 0016d4e6 has its CatchHandler @ 0016d57b */
nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,param_2);
/* try { // try from 0016d4e7 to 0016d4f3 has its CatchHandler @ 0016d56c */
nlohmann::json_abi_v3_11_3::detail::exception::
diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(local_a0);
/* try { // try from 0016d4f4 to 0016d50a has its CatchHandler @ 0016d55d */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&>
((detail *)local_40,(string *)local_60,(string *)local_a0,param_3);
std::__cxx11::string::~string((string *)local_a0);
std::__cxx11::string::~string((string *)local_60);
std::__cxx11::string::~string(local_80);
/* try { // try from 0016d52e to 0016d537 has its CatchHandler @ 0016d553 */
nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator
(param_1,param_2,local_40[0]);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
| |
33,844 | nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*) | monkey531[P]llama/common/./json.hpp | static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xceca8(%rip), %rsi # 0x14834d
leaq 0xcecb1(%rip), %rdx # 0x14835d
leaq 0x28(%rsp), %rdi
callq 0x4b514
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x43a68
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movq 0x8(%r15), %rsi
addq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x200d0
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1f310
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1f310
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1f310
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x7974f
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1fae0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7976a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x79781
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x43c64
leaq 0x1296a9(%rip), %rax # 0x1a2e40
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x797b1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x7983f
movq 0x18(%rsp), %rsi
jmp 0x79837
movq %rax, %rbx
jmp 0x79828
movq %rax, %rbx
jmp 0x7983f
movq %rdx, %rbx
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x79801
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1fae0
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x88(%rsp), %r12
movq %r14, %rsi
movq %r15, %rcx
movl %ebx, %r8d
movq %r12, %r9
callq 0x20dca
movq (%r12), %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x7983f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq %rbx, %rdi
callq 0x20380
nop
| _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15, rdx
mov ebp, esi
mov rbx, rdi
lea r13, [rsp+0C8h+var_90]
mov [r13-10h], r13
lea rsi, aInvalidIterato; "invalid_iterator"
lea rdx, aInvalidIterato+10h; ""
lea rdi, [rsp+0C8h+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0C8h+var_80]; int
lea rsi, [rsp+0C8h+var_A0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea r14, [rsp+0C8h+var_50]
mov [r14-10h], r14
xor eax, eax
mov [r14-8], rax
mov [r14], al
lea r12, [rsp+0C8h+var_B0]
mov [r12-10h], r12
mov [r12-8], rax
mov [r12], al
mov rsi, [r15+8]
add rsi, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rsi, qword ptr [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_58]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0C8h+var_60]; void *
cmp rdi, r14
jz short loc_7974F
mov rsi, [rsp+0C8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7974F:
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7976A
mov rsi, [rsp+0C8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7976A:
mov rdi, [rsp+0C8h+var_A0]; void *
cmp rdi, r13
jz short loc_79781
mov rsi, [rsp+0C8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_79781:
mov rdx, [rsp+0C8h+var_C0]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*)
lea rax, off_1A2E40
mov [rbx], rax
mov rdi, [rsp+0C8h+var_C0]; void *
cmp rdi, r12
jz short loc_797B1
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_797B1:
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r12
jz short loc_7983F
mov rsi, [rsp+arg_10]
jmp short loc_79837
mov rbx, rax
jmp short loc_79828
mov rbx, rax
jmp short loc_7983F
mov rbx, rdx
mov r15, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_79801
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_79801:
lea rdi, [rsp+arg_60]
lea rdx, [rsp+arg_40]
lea r12, [rsp+arg_80]
mov rsi, r14
mov rcx, r15
mov r8d, ebx
mov r9, r12
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ__cold_1
mov rbx, [r12]
loc_79828:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_7983F
mov rsi, [rsp+arg_30]
loc_79837:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7983F:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
nlohmann::json_abi_v3_11_3::detail::exception *this,
int a2,
_QWORD *a3)
{
char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF
void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF
int v9[2]; // [rsp+48h] [rbp-80h] BYREF
long long v10; // [rsp+50h] [rbp-78h]
long long v11; // [rsp+58h] [rbp-70h] BYREF
void *v12; // [rsp+68h] [rbp-60h]
long long v13; // [rsp+70h] [rbp-58h]
_QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF
v7[0] = v8;
std::string::_M_construct<char const*>((long long)v7, "invalid_iterator", (long long)"");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2);
v12 = v14;
v13 = 0LL;
LOBYTE(v14[0]) = 0;
v5[0] = (char *)v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
std::string::reserve(v5, v10 + a3[1]);
std::string::_M_append(v5, *(_QWORD *)v9);
std::string::_M_append(v5, v12);
std::string::_M_append(v5, *a3);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
if ( *(long long **)v9 != &v11 )
operator delete(*(void **)v9, v11 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]);
*(_QWORD *)this = off_1A2E40;
if ( (_QWORD *)v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R15,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LAB_0017969e:
LEA RSI,[0x24834d]
LEA RDX,[0x24835d]
LEA RDI,[RSP + 0x28]
CALL 0x0014b514
LAB_001796b6:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x00143a68
LEA R14,[RSP + 0x78]
MOV qword ptr [R14 + -0x10],R14
XOR EAX,EAX
MOV qword ptr [R14 + -0x8],RAX
MOV byte ptr [R14],AL
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],RAX
MOV byte ptr [R12],AL
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,qword ptr [RSP + 0x50]
LAB_001796f5:
LEA RDI,[RSP + 0x8]
CALL 0x001200d0
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
LEA RDI,[RSP + 0x8]
CALL 0x0011f310
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
LEA RDI,[RSP + 0x8]
CALL 0x0011f310
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x0011f310
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x0017974f
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0011fae0
LAB_0017974f:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0017976a
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011fae0
LAB_0017976a:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x00179781
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011fae0
LAB_00179781:
MOV RDX,qword ptr [RSP + 0x8]
LAB_00179786:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00143c64
LAB_00179790:
LEA RAX,[0x2a2e40]
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x001797b1
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011fae0
LAB_001797b1:
MOV RAX,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
exception *
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(exception *param_1,int param_2,ulong *param_3)
{
char *local_c0;
int8 local_b8;
char local_b0;
int7 uStack_af;
long *local_a0 [2];
long local_90 [2];
long *local_80 [2];
long local_70 [2];
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
/* try { // try from 0017969e to 001796b5 has its CatchHandler @ 001797df */
local_a0[0] = local_90;
std::__cxx11::string::_M_construct<char_const*>(local_a0,"invalid_iterator","");
/* try { // try from 001796b6 to 001796c6 has its CatchHandler @ 001797da */
nlohmann::json_abi_v3_11_3::detail::exception::name
((exception *)local_80,(string *)local_a0,param_2);
local_58 = 0;
local_50 = 0;
local_b8 = 0;
local_b0 = '\0';
/* try { // try from 001796f5 to 00179737 has its CatchHandler @ 001797e4 */
local_c0 = &local_b0;
local_60 = &local_50;
std::__cxx11::string::reserve((ulong)&local_c0);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60);
std::__cxx11::string::_M_append((char *)&local_c0,*param_3);
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
if (local_80[0] != local_70) {
operator_delete(local_80[0],local_70[0] + 1);
}
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
/* try { // try from 00179786 to 0017978f has its CatchHandler @ 001797c6 */
nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0);
*(int ***)param_1 = &PTR__exception_002a2e40;
if (local_c0 != &local_b0) {
operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1);
}
return param_1;
}
| |
33,845 | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]) | llama.cpp/common/common.cpp | bool parse_cpu_range(const std::string & range, bool (&boolmask)[GGML_MAX_N_THREADS]) {
size_t dash_loc = range.find('-');
if (dash_loc == std::string::npos) {
LOG_ERR("Format of CPU range is invalid! Expected [<start>]-[<end>].\n");
return false;
}
size_t start_i;
size_t end_i;
if (dash_loc == 0) {
start_i = 0;
} else {
start_i = std::stoull(range.substr(0, dash_loc));
if (start_i >= GGML_MAX_N_THREADS) {
LOG_ERR("Start index out of bounds!\n");
return false;
}
}
if (dash_loc == range.length() - 1) {
end_i = GGML_MAX_N_THREADS - 1;
} else {
end_i = std::stoull(range.substr(dash_loc + 1));
if (end_i >= GGML_MAX_N_THREADS) {
LOG_ERR("End index out of bounds!\n");
return false;
}
}
for (size_t i = start_i; i <= end_i; i++) {
boolmask[i] = true;
}
return true;
} | O3 | cpp | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x2d, %esi
xorl %edx, %edx
callq 0x21250
movq %rax, %r12
testq %rax, %rax
je 0xf66fe
cmpq $-0x1, %r12
jne 0xf670b
leaq 0x6e254(%rip), %rax # 0x164938
cmpl $0x0, (%rax)
js 0xf68bc
callq 0x10d65b
leaq 0x2e23a(%rip), %rdx # 0x124933
jmp 0xf6884
movq %rbx, 0x10(%rsp)
movq %r12, %r14
jmp 0xf67c5
movq %rbx, 0x10(%rsp)
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x210f0
movq (%r14), %rbp
callq 0x21110
movq %rax, %r13
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movl $0x0, (%r13)
leaq 0x8(%rsp), %rbx
movq %rbp, %rdi
movq %rbx, %rsi
movl $0xa, %edx
callq 0x20de0
cmpq %rbp, (%rbx)
je 0xf68cf
movq %rax, %r14
movl (%r13), %eax
testl %eax, %eax
je 0xf6778
cmpl $0x22, %eax
jne 0xf6780
leaq 0x2eadb(%rip), %rdi # 0x12524e
callq 0x20a40
movl 0x4(%rsp), %eax
movl %eax, (%r13)
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf679b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x20180
cmpq $0x200, %r14 # imm = 0x200
jb 0xf67c5
leaq 0x6e18d(%rip), %rax # 0x164938
cmpl $0x0, (%rax)
js 0xf68bc
callq 0x10d65b
leaq 0x2e1b0(%rip), %rdx # 0x124970
jmp 0xf6884
movq 0x8(%r15), %rax
decq %rax
movl $0x1ff, %r13d # imm = 0x1FF
cmpq %rax, %r12
je 0xf6897
incq %r12
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq $-0x1, %rcx
callq 0x210f0
movq (%rbx), %rbx
callq 0x21110
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x8(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x20de0
cmpq %rbx, (%r12)
je 0xf68db
movq %rax, %r13
movl (%r15), %eax
testl %eax, %eax
je 0xf6845
cmpl $0x22, %eax
jne 0xf6848
leaq 0x2ea0e(%rip), %rdi # 0x12524e
callq 0x20a40
movl %ebp, (%r15)
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf6863
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x20180
cmpq $0x200, %r13 # imm = 0x200
jb 0xf6897
leaq 0x6e0c5(%rip), %rax # 0x164938
cmpl $0x0, (%rax)
js 0xf68bc
callq 0x10d65b
leaq 0x2e108(%rip), %rdx # 0x12498c
xorl %ebp, %ebp
movq %rax, %rdi
movl $0x4, %esi
xorl %eax, %eax
callq 0x10d6f8
jmp 0xf68be
movb $0x1, %bpl
cmpq %r13, %r14
ja 0xf68be
movq 0x10(%rsp), %rdi
addq %r14, %rdi
subq %r14, %r13
incq %r13
movl $0x1, %esi
movq %r13, %rdx
callq 0x20500
jmp 0xf68be
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2e978(%rip), %rdi # 0x12524e
callq 0x20230
leaq 0x2e96c(%rip), %rdi # 0x12524e
callq 0x20230
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0xf68f3
movl %ebp, (%r15)
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x224fc
jmp 0xf6925
movq %rax, %rbx
cmpl $0x0, (%r13)
jne 0xf6916
movl 0x4(%rsp), %eax
movl %eax, (%r13)
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x22519
movq %rbx, %rdi
callq 0x20af0
| _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rsi
mov r15, rdi
mov esi, 2Dh ; '-'
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r12, rax
test rax, rax
jz short loc_F66FE
cmp r12, 0FFFFFFFFFFFFFFFFh
jnz short loc_F670B
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_F68BC
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aFormatOfCpuRan; "Format of CPU range is invalid! Expecte"...
jmp loc_F6884
loc_F66FE:
mov [rsp+68h+var_58], rbx
mov r14, r12
jmp loc_F67C5
loc_F670B:
mov [rsp+68h+var_58], rbx
lea r14, [rsp+68h+var_50]
mov rdi, r14
mov rsi, r15
xor edx, edx
mov rcx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rbp, [r14]
call ___errno_location
mov r13, rax
mov eax, [rax]
mov [rsp+68h+var_64], eax
mov dword ptr [r13+0], 0
lea rbx, [rsp+68h+var_60]
mov rdi, rbp
mov rsi, rbx
mov edx, 0Ah
call _strtoull
cmp [rbx], rbp
jz loc_F68CF
mov r14, rax
mov eax, [r13+0]
test eax, eax
jz short loc_F6778
cmp eax, 22h ; '"'
jnz short loc_F6780
lea rdi, aStoull; "stoull"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_F6778:
mov eax, [rsp+68h+var_64]
mov [r13+0], eax
loc_F6780:
lea rax, [rsp+68h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_F679B
mov rsi, [rsp+68h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F679B:
cmp r14, 200h
jb short loc_F67C5
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_F68BC
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aStartIndexOutO; "Start index out of bounds!\n"
jmp loc_F6884
loc_F67C5:
mov rax, [r15+8]
dec rax
mov r13d, 1FFh
cmp r12, rax
jz loc_F6897
inc r12
lea rbx, [rsp+68h+var_50]
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rbx, [rbx]
call ___errno_location
mov r15, rax
mov ebp, [rax]
mov dword ptr [rax], 0
lea r12, [rsp+68h+var_60]
mov rdi, rbx
mov rsi, r12
mov edx, 0Ah
call _strtoull
cmp [r12], rbx
jz loc_F68DB
mov r13, rax
mov eax, [r15]
test eax, eax
jz short loc_F6845
cmp eax, 22h ; '"'
jnz short loc_F6848
lea rdi, aStoull; "stoull"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_F6845:
mov [r15], ebp
loc_F6848:
lea rax, [rsp+68h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_F6863
mov rsi, [rsp+68h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F6863:
cmp r13, 200h
jb short loc_F6897
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_F68BC
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aEndIndexOutOfB; "End index out of bounds!\n"
loc_F6884:
xor ebp, ebp
mov rdi, rax
mov esi, 4
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short loc_F68BE
loc_F6897:
mov bpl, 1
cmp r14, r13
ja short loc_F68BE
mov rdi, [rsp+68h+var_58]
add rdi, r14
sub r13, r14
inc r13
mov esi, 1
mov rdx, r13
call _memset
jmp short loc_F68BE
loc_F68BC:
xor ebp, ebp
loc_F68BE:
mov eax, ebp
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_F68CF:
lea rdi, aStoull; "stoull"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
loc_F68DB:
lea rdi, aStoull; "stoull"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
mov rbx, rax
cmp dword ptr [r15], 0
jnz short loc_F68F3
mov [r15], ebp
loc_F68F3:
lea rdi, [rsp+68h+var_60]
lea rsi, [rsp+68h+var_50]
call _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b_cold_1; parse_cpu_range(std::string const&,bool (&)[512]) [clone]
jmp short loc_F6925
mov rbx, rax
cmp dword ptr [r13+0], 0
jnz short loc_F6916
mov eax, [rsp+68h+var_64]
mov [r13+0], eax
loc_F6916:
lea rdi, [rsp+68h+var_60]
lea rsi, [rsp+68h+var_50]
call _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b_cold_2; parse_cpu_range(std::string const&,bool (&)[512]) [clone]
loc_F6925:
mov rdi, rbx
call __Unwind_Resume
| long long parse_cpu_range(long long a1, long long a2)
{
void *v2; // rbp
_DWORD *v3; // r15
long long v4; // rax
long long v5; // r12
int v6; // eax
int v7; // ecx
int v8; // r8d
int v9; // r9d
const char *v10; // rdx
unsigned long long v11; // r14
int *v12; // r13
long long v13; // rax
unsigned long long v14; // r13
void *v15; // rbx
long long v16; // rax
long long v18; // rbx
int v19; // [rsp+4h] [rbp-64h]
void *v20; // [rsp+8h] [rbp-60h] BYREF
long long v21; // [rsp+10h] [rbp-58h]
void *v22[2]; // [rsp+18h] [rbp-50h] BYREF
_QWORD v23[8]; // [rsp+28h] [rbp-40h] BYREF
v3 = (_DWORD *)a1;
v4 = std::string::find(a1, 45LL, 0LL);
v5 = v4;
if ( v4 )
{
if ( v4 == -1 )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v10 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
LABEL_27:
LODWORD(v2) = 0;
common_log_add(v6, 4, (_DWORD)v10, v7, v8, v9);
return (unsigned int)v2;
}
goto LABEL_30;
}
v21 = a2;
std::string::substr(v22, a1, 0LL, v4);
v2 = v22[0];
v12 = (int *)__errno_location(v22);
v19 = *v12;
*v12 = 0;
v13 = strtoull(v2, &v20, 10LL);
if ( v20 == v2 )
{
std::__throw_invalid_argument("stoull");
goto LABEL_33;
}
v11 = v13;
if ( *v12 )
{
if ( *v12 == 34 )
std::__throw_out_of_range("stoull");
}
else
{
*v12 = v19;
}
if ( v22[0] != v23 )
operator delete(v22[0], v23[0] + 1LL);
if ( v11 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v10 = "Start index out of bounds!\n";
goto LABEL_27;
}
LABEL_30:
LODWORD(v2) = 0;
return (unsigned int)v2;
}
}
else
{
v21 = a2;
v11 = 0LL;
}
v14 = 511LL;
if ( v5 == *(_QWORD *)(a1 + 8) - 1LL )
goto LABEL_28;
std::string::substr(v22, a1, v5 + 1, -1LL);
v15 = v22[0];
v3 = (_DWORD *)__errno_location(v22);
LODWORD(v2) = *v3;
*v3 = 0;
v16 = strtoull(v15, &v20, 10LL);
if ( v20 == v15 )
{
LABEL_33:
v18 = std::__throw_invalid_argument("stoull");
if ( !*v3 )
*v3 = (_DWORD)v2;
parse_cpu_range((long long)&v20, v22);
_Unwind_Resume(v18);
}
v14 = v16;
if ( *v3 )
{
if ( *v3 == 34 )
std::__throw_out_of_range("stoull");
}
else
{
*v3 = (_DWORD)v2;
}
if ( v22[0] != v23 )
operator delete(v22[0], v23[0] + 1LL);
if ( v14 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v10 = "End index out of bounds!\n";
goto LABEL_27;
}
goto LABEL_30;
}
LABEL_28:
LOBYTE(v2) = 1;
if ( v11 <= v14 )
memset(v11 + v21, 1LL, v14 - v11 + 1);
return (unsigned int)v2;
}
| parse_cpu_range:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RSI
MOV R15,RDI
MOV ESI,0x2d
XOR EDX,EDX
CALL 0x00121250
MOV R12,RAX
TEST RAX,RAX
JZ 0x001f66fe
CMP R12,-0x1
JNZ 0x001f670b
LEA RAX,[0x264938]
CMP dword ptr [RAX],0x0
JS 0x001f68bc
CALL 0x0020d65b
LEA RDX,[0x224933]
JMP 0x001f6884
LAB_001f66fe:
MOV qword ptr [RSP + 0x10],RBX
MOV R14,R12
JMP 0x001f67c5
LAB_001f670b:
MOV qword ptr [RSP + 0x10],RBX
LEA R14,[RSP + 0x18]
MOV RDI,R14
MOV RSI,R15
XOR EDX,EDX
MOV RCX,R12
CALL 0x001210f0
MOV RBP,qword ptr [R14]
CALL 0x00121110
MOV R13,RAX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x4],EAX
MOV dword ptr [R13],0x0
LEA RBX,[RSP + 0x8]
MOV RDI,RBP
MOV RSI,RBX
MOV EDX,0xa
CALL 0x00120de0
CMP qword ptr [RBX],RBP
JZ 0x001f68cf
MOV R14,RAX
MOV EAX,dword ptr [R13]
TEST EAX,EAX
JZ 0x001f6778
CMP EAX,0x22
JNZ 0x001f6780
LAB_001f676c:
LEA RDI,[0x22524e]
CALL 0x00120a40
LAB_001f6778:
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R13],EAX
LAB_001f6780:
LEA RAX,[RSP + 0x28]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001f679b
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x00120180
LAB_001f679b:
CMP R14,0x200
JC 0x001f67c5
LEA RAX,[0x264938]
CMP dword ptr [RAX],0x0
JS 0x001f68bc
CALL 0x0020d65b
LEA RDX,[0x224970]
JMP 0x001f6884
LAB_001f67c5:
MOV RAX,qword ptr [R15 + 0x8]
DEC RAX
MOV R13D,0x1ff
CMP R12,RAX
JZ 0x001f6897
INC R12
LEA RBX,[RSP + 0x18]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV RCX,-0x1
CALL 0x001210f0
MOV RBX,qword ptr [RBX]
CALL 0x00121110
MOV R15,RAX
MOV EBP,dword ptr [RAX]
MOV dword ptr [RAX],0x0
LEA R12,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV EDX,0xa
CALL 0x00120de0
CMP qword ptr [R12],RBX
JZ 0x001f68db
MOV R13,RAX
MOV EAX,dword ptr [R15]
TEST EAX,EAX
JZ 0x001f6845
CMP EAX,0x22
JNZ 0x001f6848
LAB_001f6839:
LEA RDI,[0x22524e]
CALL 0x00120a40
LAB_001f6845:
MOV dword ptr [R15],EBP
LAB_001f6848:
LEA RAX,[RSP + 0x28]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001f6863
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x00120180
LAB_001f6863:
CMP R13,0x200
JC 0x001f6897
LEA RAX,[0x264938]
CMP dword ptr [RAX],0x0
JS 0x001f68bc
CALL 0x0020d65b
LEA RDX,[0x22498c]
LAB_001f6884:
XOR EBP,EBP
MOV RDI,RAX
MOV ESI,0x4
XOR EAX,EAX
CALL 0x0020d6f8
JMP 0x001f68be
LAB_001f6897:
MOV BPL,0x1
CMP R14,R13
JA 0x001f68be
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,R14
SUB R13,R14
INC R13
MOV ESI,0x1
MOV RDX,R13
CALL 0x00120500
JMP 0x001f68be
LAB_001f68bc:
XOR EBP,EBP
LAB_001f68be:
MOV EAX,EBP
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001f68cf:
LEA RDI,[0x22524e]
CALL 0x00120230
LAB_001f68db:
LEA RDI,[0x22524e]
CALL 0x00120230
LAB_001f68e7:
MOV RBX,RAX
CMP dword ptr [R15],0x0
JNZ 0x001f68f3
MOV dword ptr [R15],EBP
LAB_001f68f3:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x18]
CALL 0x001224fc
JMP 0x001f6925
LAB_001f6925:
MOV RDI,RBX
CALL 0x00120af0
|
/* parse_cpu_range(std::__cxx11::string const&, bool (&) [512]) */
ulong parse_cpu_range(string *param_1,bool *param_2)
{
int iVar1;
uint uVar2;
long *__nptr;
long lVar3;
int8 uVar4;
int *piVar5;
ulong uVar6;
char *pcVar7;
long *unaff_RBP;
ulong uVar8;
ulonglong uVar9;
long *local_60;
bool *local_58;
long *local_50 [2];
long local_40 [2];
lVar3 = std::__cxx11::string::find((char)param_1,0x2d);
if (lVar3 == 0) {
uVar6 = 0;
local_58 = param_2;
LAB_001f67c5:
uVar9 = 0x1ff;
if (lVar3 != *(long *)(param_1 + 8) + -1) {
std::__cxx11::string::substr((ulong)local_50,(ulong)param_1);
__nptr = local_50[0];
param_1 = (string *)__errno_location();
uVar2 = *(uint *)param_1;
unaff_RBP = (long *)(ulong)uVar2;
*(uint *)param_1 = 0;
uVar9 = strtoull((char *)__nptr,(char **)&local_60,10);
if (local_60 == __nptr) {
LAB_001f68db:
/* try { // try from 001f68db to 001f68e6 has its CatchHandler @ 001f68e7 */
uVar4 = std::__throw_invalid_argument("stoull");
/* catch() { ... } // from try @ 001f6839 with catch @ 001f68e7
catch() { ... } // from try @ 001f68db with catch @ 001f68e7 */
if (*(uint *)param_1 == 0) {
*(uint *)param_1 = (uint)unaff_RBP;
}
parse_cpu_range((string *)&local_60,(bool *)local_50);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar4);
}
if (*(uint *)param_1 == 0) {
*(uint *)param_1 = uVar2;
}
else if (*(uint *)param_1 == 0x22) {
/* try { // try from 001f6839 to 001f6844 has its CatchHandler @ 001f68e7 */
/* WARNING: Subroutine does not return */
std::__throw_out_of_range("stoull");
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
if (0x1ff < uVar9) {
if (common_log_verbosity_thold < 0) goto LAB_001f68bc;
uVar4 = common_log_main();
pcVar7 = "End index out of bounds!\n";
goto LAB_001f6884;
}
}
uVar8 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
if (uVar6 <= uVar9) {
memset(local_58 + uVar6,1,(uVar9 - uVar6) + 1);
}
}
else {
if (lVar3 == -1) {
if (common_log_verbosity_thold < 0) {
LAB_001f68bc:
uVar8 = 0;
goto LAB_001f68be;
}
uVar4 = common_log_main();
pcVar7 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
}
else {
local_58 = param_2;
std::__cxx11::string::substr((ulong)local_50,(ulong)param_1);
unaff_RBP = local_50[0];
piVar5 = __errno_location();
iVar1 = *piVar5;
*piVar5 = 0;
uVar6 = strtoull((char *)unaff_RBP,(char **)&local_60,10);
if (local_60 == unaff_RBP) {
/* try { // try from 001f68cf to 001f68da has its CatchHandler @ 001f6904 */
std::__throw_invalid_argument("stoull");
goto LAB_001f68db;
}
if (*piVar5 == 0) {
*piVar5 = iVar1;
}
else if (*piVar5 == 0x22) {
/* try { // try from 001f676c to 001f6777 has its CatchHandler @ 001f6904 */
/* WARNING: Subroutine does not return */
std::__throw_out_of_range("stoull");
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
if (uVar6 < 0x200) goto LAB_001f67c5;
if (common_log_verbosity_thold < 0) goto LAB_001f68bc;
uVar4 = common_log_main();
pcVar7 = "Start index out of bounds!\n";
}
LAB_001f6884:
uVar8 = 0;
common_log_add(uVar4,4,pcVar7);
}
LAB_001f68be:
return uVar8 & 0xffffffff;
}
| |
33,846 | cs_copy_data | eloqsql/mysys/charset.c | static int cs_copy_data(struct charset_info_st *to, CHARSET_INFO *from)
{
to->number= from->number ? from->number : to->number;
/* Don't replace csname if already set */
if (from->cs_name.str && !to->cs_name.str)
{
if (!(to->cs_name.str= my_once_memdup(from->cs_name.str,
from->cs_name.length + 1,
MYF(MY_WME))))
goto err;
to->cs_name.length= from->cs_name.length;
}
if (from->coll_name.str)
{
if (!(to->coll_name.str= my_once_memdup(from->coll_name.str,
from->coll_name.length + 1,
MYF(MY_WME))))
goto err;
to->coll_name.length= from->coll_name.length;
}
if (from->comment)
if (!(to->comment= my_once_strdup(from->comment,MYF(MY_WME))))
goto err;
if (from->m_ctype)
{
if (!(to->m_ctype= (uchar*) my_once_memdup((char*) from->m_ctype,
MY_CS_CTYPE_TABLE_SIZE,
MYF(MY_WME))))
goto err;
if (init_state_maps(to))
goto err;
}
if (from->to_lower)
if (!(to->to_lower= (uchar*) my_once_memdup((char*) from->to_lower,
MY_CS_TO_LOWER_TABLE_SIZE,
MYF(MY_WME))))
goto err;
if (from->to_upper)
if (!(to->to_upper= (uchar*) my_once_memdup((char*) from->to_upper,
MY_CS_TO_UPPER_TABLE_SIZE,
MYF(MY_WME))))
goto err;
if (from->sort_order)
{
if (!(to->sort_order= (uchar*) my_once_memdup((char*) from->sort_order,
MY_CS_SORT_ORDER_TABLE_SIZE,
MYF(MY_WME))))
goto err;
}
if (from->tab_to_uni)
{
uint sz= MY_CS_TO_UNI_TABLE_SIZE*sizeof(uint16);
if (!(to->tab_to_uni= (uint16*) my_once_memdup((char*)from->tab_to_uni,
sz, MYF(MY_WME))))
goto err;
}
if (from->tailoring)
if (!(to->tailoring= my_once_strdup(from->tailoring,MYF(MY_WME))))
goto err;
return 0;
err:
return 1;
} | O0 | c | cs_copy_data:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x6e8f4
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
jmp 0x6e8fd
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x6e95d
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x6e95d
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
addq $0x1, %rsi
movl $0x10, %edx
callq 0x8b1f0
movq -0x10(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x6e94d
jmp 0x6eb39
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x6e9a9
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x1, %rsi
movl $0x10, %edx
callq 0x8b1f0
movq -0x10(%rbp), %rcx
movq %rax, 0x20(%rcx)
cmpq $0x0, %rax
jne 0x6e999
jmp 0x6eb39
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x6e9db
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdi
movl $0x10, %esi
callq 0x8b190
movq -0x10(%rbp), %rcx
movq %rax, 0x30(%rcx)
cmpq $0x0, %rax
jne 0x6e9d9
jmp 0x6eb39
jmp 0x6e9db
movq -0x18(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x6ea24
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rdi
movl $0x101, %esi # imm = 0x101
movl $0x10, %edx
callq 0x8b1f0
movq -0x10(%rbp), %rcx
movq %rax, 0x40(%rcx)
cmpq $0x0, %rax
jne 0x6ea10
jmp 0x6eb39
movq -0x10(%rbp), %rdi
callq 0x6ec50
cmpb $0x0, %al
je 0x6ea22
jmp 0x6eb39
jmp 0x6ea24
movq -0x18(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x6ea5b
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rdi
movl $0x100, %esi # imm = 0x100
movl $0x10, %edx
callq 0x8b1f0
movq -0x10(%rbp), %rcx
movq %rax, 0x48(%rcx)
cmpq $0x0, %rax
jne 0x6ea59
jmp 0x6eb39
jmp 0x6ea5b
movq -0x18(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x6ea92
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
movl $0x100, %esi # imm = 0x100
movl $0x10, %edx
callq 0x8b1f0
movq -0x10(%rbp), %rcx
movq %rax, 0x50(%rcx)
cmpq $0x0, %rax
jne 0x6ea90
jmp 0x6eb39
jmp 0x6ea92
movq -0x18(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x6eac6
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rdi
movl $0x100, %esi # imm = 0x100
movl $0x10, %edx
callq 0x8b1f0
movq -0x10(%rbp), %rcx
movq %rax, 0x58(%rcx)
cmpq $0x0, %rax
jne 0x6eac4
jmp 0x6eb39
jmp 0x6eac6
movq -0x18(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x6eb01
movl $0x200, -0x1c(%rbp) # imm = 0x200
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rdi
movl -0x1c(%rbp), %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x8b1f0
movq -0x10(%rbp), %rcx
movq %rax, 0x68(%rcx)
cmpq $0x0, %rax
jne 0x6eaff
jmp 0x6eb39
jmp 0x6eb01
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x6eb30
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
movl $0x10, %esi
callq 0x8b190
movq -0x10(%rbp), %rcx
movq %rax, 0x38(%rcx)
cmpq $0x0, %rax
jne 0x6eb2e
jmp 0x6eb39
jmp 0x6eb30
movl $0x0, -0x4(%rbp)
jmp 0x6eb40
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| cs_copy_data:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
cmp dword ptr [rax], 0
jz short loc_6E8F4
mov rax, [rbp+var_18]
mov eax, [rax]
mov [rbp+var_20], eax
jmp short loc_6E8FD
loc_6E8F4:
mov rax, [rbp+var_10]
mov eax, [rax]
mov [rbp+var_20], eax
loc_6E8FD:
mov ecx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax], ecx
mov rax, [rbp+var_18]
cmp qword ptr [rax+10h], 0
jz short loc_6E95D
mov rax, [rbp+var_10]
cmp qword ptr [rax+10h], 0
jnz short loc_6E95D
mov rax, [rbp+var_18]
mov rdi, [rax+10h]
mov rax, [rbp+var_18]
mov rsi, [rax+18h]
add rsi, 1
mov edx, 10h
call my_once_memdup
mov rcx, [rbp+var_10]
mov [rcx+10h], rax
cmp rax, 0
jnz short loc_6E94D
jmp loc_6EB39
loc_6E94D:
mov rax, [rbp+var_18]
mov rcx, [rax+18h]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
loc_6E95D:
mov rax, [rbp+var_18]
cmp qword ptr [rax+20h], 0
jz short loc_6E9A9
mov rax, [rbp+var_18]
mov rdi, [rax+20h]
mov rax, [rbp+var_18]
mov rsi, [rax+28h]
add rsi, 1
mov edx, 10h
call my_once_memdup
mov rcx, [rbp+var_10]
mov [rcx+20h], rax
cmp rax, 0
jnz short loc_6E999
jmp loc_6EB39
loc_6E999:
mov rax, [rbp+var_18]
mov rcx, [rax+28h]
mov rax, [rbp+var_10]
mov [rax+28h], rcx
loc_6E9A9:
mov rax, [rbp+var_18]
cmp qword ptr [rax+30h], 0
jz short loc_6E9DB
mov rax, [rbp+var_18]
mov rdi, [rax+30h]
mov esi, 10h
call my_once_strdup
mov rcx, [rbp+var_10]
mov [rcx+30h], rax
cmp rax, 0
jnz short loc_6E9D9
jmp loc_6EB39
loc_6E9D9:
jmp short $+2
loc_6E9DB:
mov rax, [rbp+var_18]
cmp qword ptr [rax+40h], 0
jz short loc_6EA24
mov rax, [rbp+var_18]
mov rdi, [rax+40h]
mov esi, 101h
mov edx, 10h
call my_once_memdup
mov rcx, [rbp+var_10]
mov [rcx+40h], rax
cmp rax, 0
jnz short loc_6EA10
jmp loc_6EB39
loc_6EA10:
mov rdi, [rbp+var_10]
call init_state_maps
cmp al, 0
jz short loc_6EA22
jmp loc_6EB39
loc_6EA22:
jmp short $+2
loc_6EA24:
mov rax, [rbp+var_18]
cmp qword ptr [rax+48h], 0
jz short loc_6EA5B
mov rax, [rbp+var_18]
mov rdi, [rax+48h]
mov esi, 100h
mov edx, 10h
call my_once_memdup
mov rcx, [rbp+var_10]
mov [rcx+48h], rax
cmp rax, 0
jnz short loc_6EA59
jmp loc_6EB39
loc_6EA59:
jmp short $+2
loc_6EA5B:
mov rax, [rbp+var_18]
cmp qword ptr [rax+50h], 0
jz short loc_6EA92
mov rax, [rbp+var_18]
mov rdi, [rax+50h]
mov esi, 100h
mov edx, 10h
call my_once_memdup
mov rcx, [rbp+var_10]
mov [rcx+50h], rax
cmp rax, 0
jnz short loc_6EA90
jmp loc_6EB39
loc_6EA90:
jmp short $+2
loc_6EA92:
mov rax, [rbp+var_18]
cmp qword ptr [rax+58h], 0
jz short loc_6EAC6
mov rax, [rbp+var_18]
mov rdi, [rax+58h]
mov esi, 100h
mov edx, 10h
call my_once_memdup
mov rcx, [rbp+var_10]
mov [rcx+58h], rax
cmp rax, 0
jnz short loc_6EAC4
jmp short loc_6EB39
loc_6EAC4:
jmp short $+2
loc_6EAC6:
mov rax, [rbp+var_18]
cmp qword ptr [rax+68h], 0
jz short loc_6EB01
mov [rbp+var_1C], 200h
mov rax, [rbp+var_18]
mov rdi, [rax+68h]
mov eax, [rbp+var_1C]
mov esi, eax
mov edx, 10h
call my_once_memdup
mov rcx, [rbp+var_10]
mov [rcx+68h], rax
cmp rax, 0
jnz short loc_6EAFF
jmp short loc_6EB39
loc_6EAFF:
jmp short $+2
loc_6EB01:
mov rax, [rbp+var_18]
cmp qword ptr [rax+38h], 0
jz short loc_6EB30
mov rax, [rbp+var_18]
mov rdi, [rax+38h]
mov esi, 10h
call my_once_strdup
mov rcx, [rbp+var_10]
mov [rcx+38h], rax
cmp rax, 0
jnz short loc_6EB2E
jmp short loc_6EB39
loc_6EB2E:
jmp short $+2
loc_6EB30:
mov [rbp+var_4], 0
jmp short loc_6EB40
loc_6EB39:
mov [rbp+var_4], 1
loc_6EB40:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long cs_copy_data(int *a1, int *a2)
{
long long v2; // rax
long long v3; // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rax
int v12; // [rsp+0h] [rbp-20h]
if ( *a2 )
v12 = *a2;
else
v12 = *a1;
*a1 = v12;
if ( *((_QWORD *)a2 + 2) && !*((_QWORD *)a1 + 2) )
{
v2 = my_once_memdup(*((_QWORD *)a2 + 2), *((_QWORD *)a2 + 3) + 1LL, 16LL);
*((_QWORD *)a1 + 2) = v2;
if ( !v2 )
return 1;
*((_QWORD *)a1 + 3) = *((_QWORD *)a2 + 3);
}
if ( !*((_QWORD *)a2 + 4) )
goto LABEL_11;
v3 = my_once_memdup(*((_QWORD *)a2 + 4), *((_QWORD *)a2 + 5) + 1LL, 16LL);
*((_QWORD *)a1 + 4) = v3;
if ( !v3 )
return 1;
*((_QWORD *)a1 + 5) = *((_QWORD *)a2 + 5);
LABEL_11:
if ( *((_QWORD *)a2 + 6) )
{
v4 = my_once_strdup(*((_QWORD *)a2 + 6), 16LL);
*((_QWORD *)a1 + 6) = v4;
if ( !v4 )
return 1;
}
if ( *((_QWORD *)a2 + 8) )
{
v5 = my_once_memdup(*((_QWORD *)a2 + 8), 257LL, 16LL);
*((_QWORD *)a1 + 8) = v5;
if ( !v5 || (unsigned __int8)init_state_maps(a1) )
return 1;
}
if ( *((_QWORD *)a2 + 9) )
{
v6 = my_once_memdup(*((_QWORD *)a2 + 9), 256LL, 16LL);
*((_QWORD *)a1 + 9) = v6;
if ( !v6 )
return 1;
}
if ( *((_QWORD *)a2 + 10) )
{
v7 = my_once_memdup(*((_QWORD *)a2 + 10), 256LL, 16LL);
*((_QWORD *)a1 + 10) = v7;
if ( !v7 )
return 1;
}
if ( *((_QWORD *)a2 + 11) )
{
v8 = my_once_memdup(*((_QWORD *)a2 + 11), 256LL, 16LL);
*((_QWORD *)a1 + 11) = v8;
if ( !v8 )
return 1;
}
if ( *((_QWORD *)a2 + 13) )
{
v9 = my_once_memdup(*((_QWORD *)a2 + 13), 512LL, 16LL);
*((_QWORD *)a1 + 13) = v9;
if ( !v9 )
return 1;
}
if ( *((_QWORD *)a2 + 7) )
{
v10 = my_once_strdup(*((_QWORD *)a2 + 7), 16LL);
*((_QWORD *)a1 + 7) = v10;
if ( !v10 )
return 1;
}
return 0;
}
| cs_copy_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0x0
JZ 0x0016e8f4
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x20],EAX
JMP 0x0016e8fd
LAB_0016e8f4:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x20],EAX
LAB_0016e8fd:
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0016e95d
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x10],0x0
JNZ 0x0016e95d
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x18]
ADD RSI,0x1
MOV EDX,0x10
CALL 0x0018b1f0
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JNZ 0x0016e94d
JMP 0x0016eb39
LAB_0016e94d:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
LAB_0016e95d:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x0016e9a9
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x28]
ADD RSI,0x1
MOV EDX,0x10
CALL 0x0018b1f0
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x20],RAX
CMP RAX,0x0
JNZ 0x0016e999
JMP 0x0016eb39
LAB_0016e999:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x28],RCX
LAB_0016e9a9:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x30],0x0
JZ 0x0016e9db
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x30]
MOV ESI,0x10
CALL 0x0018b190
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x30],RAX
CMP RAX,0x0
JNZ 0x0016e9d9
JMP 0x0016eb39
LAB_0016e9d9:
JMP 0x0016e9db
LAB_0016e9db:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x0016ea24
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x40]
MOV ESI,0x101
MOV EDX,0x10
CALL 0x0018b1f0
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x40],RAX
CMP RAX,0x0
JNZ 0x0016ea10
JMP 0x0016eb39
LAB_0016ea10:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0016ec50
CMP AL,0x0
JZ 0x0016ea22
JMP 0x0016eb39
LAB_0016ea22:
JMP 0x0016ea24
LAB_0016ea24:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x48],0x0
JZ 0x0016ea5b
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x48]
MOV ESI,0x100
MOV EDX,0x10
CALL 0x0018b1f0
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x48],RAX
CMP RAX,0x0
JNZ 0x0016ea59
JMP 0x0016eb39
LAB_0016ea59:
JMP 0x0016ea5b
LAB_0016ea5b:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x50],0x0
JZ 0x0016ea92
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x50]
MOV ESI,0x100
MOV EDX,0x10
CALL 0x0018b1f0
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x50],RAX
CMP RAX,0x0
JNZ 0x0016ea90
JMP 0x0016eb39
LAB_0016ea90:
JMP 0x0016ea92
LAB_0016ea92:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x58],0x0
JZ 0x0016eac6
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x58]
MOV ESI,0x100
MOV EDX,0x10
CALL 0x0018b1f0
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x58],RAX
CMP RAX,0x0
JNZ 0x0016eac4
JMP 0x0016eb39
LAB_0016eac4:
JMP 0x0016eac6
LAB_0016eac6:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x68],0x0
JZ 0x0016eb01
MOV dword ptr [RBP + -0x1c],0x200
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x68]
MOV EAX,dword ptr [RBP + -0x1c]
MOV ESI,EAX
MOV EDX,0x10
CALL 0x0018b1f0
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x68],RAX
CMP RAX,0x0
JNZ 0x0016eaff
JMP 0x0016eb39
LAB_0016eaff:
JMP 0x0016eb01
LAB_0016eb01:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x0016eb30
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x38]
MOV ESI,0x10
CALL 0x0018b190
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x38],RAX
CMP RAX,0x0
JNZ 0x0016eb2e
JMP 0x0016eb39
LAB_0016eb2e:
JMP 0x0016eb30
LAB_0016eb30:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016eb40
LAB_0016eb39:
MOV dword ptr [RBP + -0x4],0x1
LAB_0016eb40:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 cs_copy_data(int *param_1,int *param_2)
{
char cVar1;
long lVar2;
int local_28;
int4 local_c;
if (*param_2 == 0) {
local_28 = *param_1;
}
else {
local_28 = *param_2;
}
*param_1 = local_28;
if ((*(long *)(param_2 + 4) == 0) || (*(long *)(param_1 + 4) != 0)) {
LAB_0016e95d:
if (*(long *)(param_2 + 8) != 0) {
lVar2 = my_once_memdup(*(int8 *)(param_2 + 8),*(long *)(param_2 + 10) + 1,0x10);
*(long *)(param_1 + 8) = lVar2;
if (lVar2 == 0) goto LAB_0016eb39;
*(int8 *)(param_1 + 10) = *(int8 *)(param_2 + 10);
}
if (*(long *)(param_2 + 0xc) != 0) {
lVar2 = my_once_strdup(*(int8 *)(param_2 + 0xc),0x10);
*(long *)(param_1 + 0xc) = lVar2;
if (lVar2 == 0) goto LAB_0016eb39;
}
if (*(long *)(param_2 + 0x10) != 0) {
lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x10),0x101,0x10);
*(long *)(param_1 + 0x10) = lVar2;
if ((lVar2 == 0) || (cVar1 = init_state_maps(param_1), cVar1 != '\0')) goto LAB_0016eb39;
}
if (*(long *)(param_2 + 0x12) != 0) {
lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x12),0x100,0x10);
*(long *)(param_1 + 0x12) = lVar2;
if (lVar2 == 0) goto LAB_0016eb39;
}
if (*(long *)(param_2 + 0x14) != 0) {
lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x14),0x100,0x10);
*(long *)(param_1 + 0x14) = lVar2;
if (lVar2 == 0) goto LAB_0016eb39;
}
if (*(long *)(param_2 + 0x16) != 0) {
lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x16),0x100,0x10);
*(long *)(param_1 + 0x16) = lVar2;
if (lVar2 == 0) goto LAB_0016eb39;
}
if (*(long *)(param_2 + 0x1a) != 0) {
lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x1a),0x200,0x10);
*(long *)(param_1 + 0x1a) = lVar2;
if (lVar2 == 0) goto LAB_0016eb39;
}
if (*(long *)(param_2 + 0xe) != 0) {
lVar2 = my_once_strdup(*(int8 *)(param_2 + 0xe),0x10);
*(long *)(param_1 + 0xe) = lVar2;
if (lVar2 == 0) goto LAB_0016eb39;
}
local_c = 0;
}
else {
lVar2 = my_once_memdup(*(int8 *)(param_2 + 4),*(long *)(param_2 + 6) + 1,0x10);
*(long *)(param_1 + 4) = lVar2;
if (lVar2 != 0) {
*(int8 *)(param_1 + 6) = *(int8 *)(param_2 + 6);
goto LAB_0016e95d;
}
LAB_0016eb39:
local_c = 1;
}
return local_c;
}
| |
33,847 | minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/./minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!left) throw std::runtime_error("BinaryOpExpr.left is null");
if (!right) throw std::runtime_error("BinaryOpExpr.right is null");
auto l = left->evaluate(context);
auto do_eval = [&](const Value & l) -> Value {
if (op == Op::Is || op == Op::IsNot) {
auto t = dynamic_cast<VariableExpr*>(right.get());
if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable");
auto eval = [&]() {
const auto & name = t->get_name();
if (name == "none") return l.is_null();
if (name == "boolean") return l.is_boolean();
if (name == "integer") return l.is_number_integer();
if (name == "float") return l.is_number_float();
if (name == "number") return l.is_number();
if (name == "string") return l.is_string();
if (name == "mapping") return l.is_object();
if (name == "iterable") return l.is_iterable();
if (name == "sequence") return l.is_array();
if (name == "defined") return !l.is_null();
throw std::runtime_error("Unknown type for 'is' operator: " + name);
};
auto value = eval();
return Value(op == Op::Is ? value : !value);
}
if (op == Op::And) {
if (!l.to_bool()) return Value(false);
return right->evaluate(context).to_bool();
} else if (op == Op::Or) {
if (l.to_bool()) return l;
return right->evaluate(context);
}
auto r = right->evaluate(context);
switch (op) {
case Op::StrConcat: return l.to_str() + r.to_str();
case Op::Add: return l + r;
case Op::Sub: return l - r;
case Op::Mul: return l * r;
case Op::Div: return l / r;
case Op::MulMul: return std::pow(l.get<double>(), r.get<double>());
case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>();
case Op::Mod: return l.get<int64_t>() % r.get<int64_t>();
case Op::Eq: return l == r;
case Op::Ne: return l != r;
case Op::Lt: return l < r;
case Op::Gt: return l > r;
case Op::Le: return l <= r;
case Op::Ge: return l >= r;
case Op::In: return (r.is_array() || r.is_object()) && r.contains(l);
case Op::NotIn: return !(r.is_array() && r.contains(l));
default: break;
}
throw std::runtime_error("Unknown binary operator");
};
if (l.is_callable()) {
return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) {
auto ll = l.call(context, args);
return do_eval(ll); //args[0].second);
});
} else {
return do_eval(l);
}
} | O3 | cpp | minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r15
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x57095
cmpq $0x0, 0x30(%r15)
je 0x570b3
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x3d5f2
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
cmpq $0x0, 0x30(%r12)
je 0x56fe1
leaq 0x88(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x4ed98
movups 0x8(%rsp), %xmm0
leaq 0x88(%rsp), %rsi
movups %xmm0, 0x50(%rsi)
leaq 0x18(%rsp), %rdi
callq 0x57248
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x571dc
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x56f71
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x3d970
movq %r14, %rdi
callq 0x4a5c0
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x56f99
callq 0x2f80e
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x56fab
callq 0x2f80e
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x56fbd
callq 0x2f80e
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x5700a
movq 0x98fcf(%rip), %rax # 0xeffa0
cmpb $0x0, (%rax)
je 0x56ff5
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x56fff
leaq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x57332
jmp 0x5700a
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x5700a
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x78(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x3d970
movq %r14, %rdi
callq 0x4a5c0
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x5702f
callq 0x2f80e
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x5703e
callq 0x2f80e
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x5704d
callq 0x2f80e
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x57083
movq 0x98f42(%rip), %rax # 0xeffa0
cmpb $0x0, (%rax)
je 0x5706e
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x57078
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x57083
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x18360
movq %rax, %r14
leaq 0x64319(%rip), %rsi # 0xbb3c2
movq %rax, %rdi
callq 0x18270
jmp 0x570cf
movl $0x10, %edi
callq 0x18360
movq %rax, %r14
leaq 0x64315(%rip), %rsi # 0xbb3dc
movq %rax, %rdi
callq 0x18270
movq 0x98f1a(%rip), %rsi # 0xefff0
movq 0x98ea3(%rip), %rdx # 0xeff80
movq %r14, %rdi
callq 0x18b30
jmp 0x57130
jmp 0x57116
jmp 0x570eb
movq %rax, %rbx
movq %r14, %rdi
callq 0x18500
jmp 0x5713d
movq %rax, %rbx
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x57121
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x57121
movq %rax, %rdi
callq 0x2ad73
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x572a6
jmp 0x57133
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3d8e4
movq %rbx, %rdi
callq 0x18b90
nop
| _ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r12
push rbx
sub rsp, 0E8h
mov r15, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz loc_57095
cmp qword ptr [r15+30h], 0
jz loc_570B3
mov r14, rdx
mov rbx, rdi
lea r12, [rsp+108h+var_D0]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov qword ptr [rsp+108h+var_100], r15
mov qword ptr [rsp+108h+var_100+8], r14
cmp qword ptr [r12+30h], 0
jz loc_56FE1
lea rdi, [rsp+108h+var_80]; this
lea rsi, [rsp+108h+var_D0]; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
movups xmm0, [rsp+108h+var_100]
lea rsi, [rsp+108h+var_80]
movups xmmword ptr [rsi+50h], xmm0
lea rdi, [rsp+108h+var_F0]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&)
lea rsi, [rsp+108h+var_F0]
mov rdi, rbx
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
mov rax, [rsp+108h+var_E0]
test rax, rax
jz short loc_56F71
lea rdi, [rsp+108h+var_F0]
mov rsi, rdi
mov edx, 3
call rax
loc_56F71:
lea r14, [rsp+108h+var_40]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_56F99
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_56F99:
mov rdi, [rsp+108h+var_58]
test rdi, rdi
jz short loc_56FAB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_56FAB:
mov rdi, [rsp+108h+var_68]
test rdi, rdi
jz short loc_56FBD
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_56FBD:
mov rdi, [rsp+108h+var_78]
test rdi, rdi
jz short loc_5700A
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_56FF5
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_56FFF
loc_56FE1:
lea rsi, [rsp+108h+var_100]
lea rdx, [rsp+108h+var_D0]
mov rdi, rbx; this
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&)
jmp short loc_5700A
loc_56FF5:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_56FFF:
cmp eax, 1
jnz short loc_5700A
mov rax, [rdi]
call qword ptr [rax+18h]
loc_5700A:
lea r14, [rsp+108h+var_90]
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, [r14-8]
test rdi, rdi
jz short loc_5702F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5702F:
mov rdi, [rsp+108h+var_A8]
test rdi, rdi
jz short loc_5703E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5703E:
mov rdi, [rsp+108h+var_B8]
test rdi, rdi
jz short loc_5704D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5704D:
mov rdi, [rsp+108h+var_C8]
test rdi, rdi
jz short loc_57083
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_5706E
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_57078
loc_5706E:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_57078:
cmp eax, 1
jnz short loc_57083
mov rax, [rdi]
call qword ptr [rax+18h]
loc_57083:
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r14
pop r15
retn
loc_57095:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_570CF
loc_570B3:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_570CF:
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_57130
jmp short loc_57116
jmp short $+2
loc_570EB:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_5713D
mov rbx, rax
mov rax, [rsp+108h+var_E0]
test rax, rax
jz short loc_57121
lea rdi, [rsp+108h+var_F0]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_57121
loc_57116:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
loc_57121:
lea rdi, [rsp+108h+var_80]
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENUlS5_RNS_14ArgumentsValueEE_D2Ev; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue()
jmp short loc_57133
loc_57130:
mov rbx, rax
loc_57133:
lea rdi, [rsp+108h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_5713D:
mov rdi, rbx
call __Unwind_Resume
| minja::Value * minja::BinaryOpExpr::do_evaluate(minja::Value *this, long long a2, long long a3)
{
void (***v4)(void); // rsi
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v11; // rdi
signed __int32 v12; // eax
long long v13; // rdi
signed __int32 v14; // eax
std::runtime_error *exception; // r14
__int128 v17; // [rsp+8h] [rbp-100h]
_BYTE v18[16]; // [rsp+18h] [rbp-F0h] BYREF
void ( *v19)(_BYTE *, _BYTE *, long long); // [rsp+28h] [rbp-E0h]
_BYTE v20[8]; // [rsp+38h] [rbp-D0h] BYREF
long long v21; // [rsp+40h] [rbp-C8h]
volatile signed __int32 *v22; // [rsp+50h] [rbp-B8h]
volatile signed __int32 *v23; // [rsp+60h] [rbp-A8h]
long long v24; // [rsp+68h] [rbp-A0h]
volatile signed __int32 *v25; // [rsp+70h] [rbp-98h]
void **v26[2]; // [rsp+78h] [rbp-90h] BYREF
_BYTE v27[8]; // [rsp+88h] [rbp-80h] BYREF
long long v28; // [rsp+90h] [rbp-78h]
volatile signed __int32 *v29; // [rsp+A0h] [rbp-68h]
volatile signed __int32 *v30; // [rsp+B0h] [rbp-58h]
volatile signed __int32 *v31; // [rsp+C0h] [rbp-48h]
void **v32[2]; // [rsp+C8h] [rbp-40h] BYREF
__int128 v33; // [rsp+D8h] [rbp-30h]
v4 = *(void (****)(void))(a2 + 32);
if ( !v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null");
goto LABEL_34;
}
if ( !*(_QWORD *)(a2 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.right is null");
LABEL_34:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v20, v4);
*(_QWORD *)&v17 = a2;
*((_QWORD *)&v17 + 1) = a3;
if ( v24 )
{
minja::Value::Value((minja::Value *)v27, (const minja::Value *)v20);
v33 = v17;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(v18);
minja::Value::callable((_DWORD)this, (unsigned int)v18, v7, v8, v9, v10);
if ( v19 )
v19(v18, v18, 3LL);
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 *)v32);
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(v32);
if ( v31 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v31);
if ( v30 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30);
if ( v29 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v29);
v11 = v28;
if ( v28 )
{
if ( _libc_single_threaded )
{
v12 = *(_DWORD *)(v28 + 12);
*(_DWORD *)(v28 + 12) = v12 - 1;
}
else
{
v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(v28 + 12), 0xFFFFFFFF);
}
if ( v12 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL);
}
}
else
{
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(this);
}
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);
if ( v25 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v25);
if ( v23 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v23);
if ( v22 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v22);
v13 = v21;
if ( v21 )
{
if ( _libc_single_threaded )
{
v14 = *(_DWORD *)(v21 + 12);
*(_DWORD *)(v21 + 12) = v14 - 1;
}
else
{
v14 = _InterlockedExchangeAdd((volatile signed __int32 *)(v21 + 12), 0xFFFFFFFF);
}
if ( v14 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v13 + 24LL))(v13, 0LL);
}
return this;
}
| do_evaluate:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R15,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x00157095
CMP qword ptr [R15 + 0x30],0x0
JZ 0x001570b3
MOV R14,RDX
MOV RBX,RDI
LEA R12,[RSP + 0x38]
MOV RDI,R12
CALL 0x0013d5f2
MOV qword ptr [RSP + 0x8],R15
MOV qword ptr [RSP + 0x10],R14
CMP qword ptr [R12 + 0x30],0x0
JZ 0x00156fe1
LAB_00156f1e:
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x38]
CALL 0x0014ed98
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x88]
MOVUPS xmmword ptr [RSI + 0x50],XMM0
LAB_00156f41:
LEA RDI,[RSP + 0x18]
CALL 0x00157248
LAB_00156f4b:
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x001571dc
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x00156f71
LAB_00156f62:
LEA RDI,[RSP + 0x18]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00156f71:
LEA R14,[RSP + 0xc8]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013d970
MOV RDI,R14
CALL 0x0014a5c0
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x00156f99
CALL 0x0012f80e
LAB_00156f99:
MOV RDI,qword ptr [RSP + 0xb0]
TEST RDI,RDI
JZ 0x00156fab
CALL 0x0012f80e
LAB_00156fab:
MOV RDI,qword ptr [RSP + 0xa0]
TEST RDI,RDI
JZ 0x00156fbd
CALL 0x0012f80e
LAB_00156fbd:
MOV RDI,qword ptr [RSP + 0x90]
TEST RDI,RDI
JZ 0x0015700a
MOV RAX,qword ptr [0x001effa0]
CMP byte ptr [RAX],0x0
JZ 0x00156ff5
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00156fff
LAB_00156fe1:
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x00157332
LAB_00156ff3:
JMP 0x0015700a
LAB_00156ff5:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00156fff:
CMP EAX,0x1
JNZ 0x0015700a
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0015700a:
LEA R14,[RSP + 0x78]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013d970
MOV RDI,R14
CALL 0x0014a5c0
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x0015702f
CALL 0x0012f80e
LAB_0015702f:
MOV RDI,qword ptr [RSP + 0x60]
TEST RDI,RDI
JZ 0x0015703e
CALL 0x0012f80e
LAB_0015703e:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x0015704d
CALL 0x0012f80e
LAB_0015704d:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x00157083
MOV RAX,qword ptr [0x001effa0]
CMP byte ptr [RAX],0x0
JZ 0x0015706e
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00157078
LAB_0015706e:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00157078:
CMP EAX,0x1
JNZ 0x00157083
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_00157083:
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00157095:
MOV EDI,0x10
CALL 0x00118360
MOV R14,RAX
LAB_001570a2:
LEA RSI,[0x1bb3c2]
MOV RDI,RAX
CALL 0x00118270
LAB_001570b1:
JMP 0x001570cf
LAB_001570b3:
MOV EDI,0x10
CALL 0x00118360
MOV R14,RAX
LAB_001570c0:
LEA RSI,[0x1bb3dc]
MOV RDI,RAX
CALL 0x00118270
LAB_001570cf:
MOV RSI,qword ptr [0x001efff0]
MOV RDX,qword ptr [0x001eff80]
MOV RDI,R14
CALL 0x00118b30
|
/* minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
shared_ptr * minja::BinaryOpExpr::do_evaluate(shared_ptr *param_1)
{
int *piVar1;
int iVar2;
runtime_error *this;
int8 in_RDX;
long in_RSI;
long local_100;
int8 uStack_f8;
_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ local_f0 [16];
code *local_e0;
Expression local_d0 [8];
long *local_c8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_a8;
long local_a0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98;
data local_90 [16];
Value local_80 [8];
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
data local_40 [16];
long local_30;
int8 uStack_28;
if (*(shared_ptr **)(in_RSI + 0x20) == (shared_ptr *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001570a2 to 001570b0 has its CatchHandler @ 001570eb */
std::runtime_error::runtime_error(this,"BinaryOpExpr.left is null");
}
else {
if (*(long *)(in_RSI + 0x30) != 0) {
Expression::evaluate(local_d0,*(shared_ptr **)(in_RSI + 0x20));
if (local_a0 == 0) {
/* try { // try from 00156fe1 to 00156ff2 has its CatchHandler @ 001570e5 */
const::{lambda(minja::Value_const&)#1}::operator()
((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100);
}
else {
/* try { // try from 00156f1e to 00156f2f has its CatchHandler @ 00157130 */
local_100 = in_RSI;
uStack_f8 = in_RDX;
minja::Value::Value(local_80,(Value *)local_d0);
local_30 = local_100;
uStack_28 = uStack_f8;
/* try { // try from 00156f41 to 00156f4a has its CatchHandler @ 0015711e */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>::
function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)_1_,void>
(local_f0);
/* try { // try from 00156f4b to 00156f57 has its CatchHandler @ 001570f8 */
minja::Value::callable((Value *)param_1,local_f0);
if (local_e0 != (code *)0x0) {
/* try { // try from 00156f62 to 00156f70 has its CatchHandler @ 001570e7 */
(*local_e0)(local_f0,local_f0,3);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68);
}
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_90,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_90);
if (local_98 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_98);
}
if (local_a8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_a8);
}
if (local_b8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b8);
}
if (local_c8 != (long *)0x0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
piVar1 = (int *)((long)local_c8 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_c8 + 0xc);
*(int *)((long)local_c8 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_c8 + 0x18))();
}
}
return param_1;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001570c0 to 001570ce has its CatchHandler @ 001570e9 */
std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80);
}
| |
33,848 | bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const | monkey531[P]llama/common/json.hpp | bool operator==(const IterImpl& other) const
{
// if objects are not the same, the comparison is undefined
if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object))
{
JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object));
}
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
return (m_it.object_iterator == other.m_it.object_iterator);
case value_t::array:
return (m_it.array_iterator == other.m_it.array_iterator);
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
return (m_it.primitive_iterator == other.m_it.primitive_iterator);
}
} | O0 | cpp | bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x20(%rsp)
movq (%rax), %rax
movq 0x70(%rsp), %rcx
cmpq (%rcx), %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb4676
jmp 0xb473b
movb $0x1, 0x3b(%rsp)
movl $0x20, %edi
callq 0x5a6a0
movq %rax, 0x10(%rsp)
leaq 0x4f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5b0d0
movq 0x18(%rsp), %rdx
leaq 0x158d32(%rip), %rsi # 0x20d3d7
leaq 0x50(%rsp), %rdi
callq 0x61fc0
jmp 0xb46b1
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rax
movq (%rax), %rcx
movl $0xd4, %esi
leaq 0x50(%rsp), %rdx
callq 0xb4830
jmp 0xb46cf
movq 0x10(%rsp), %rdi
movb $0x0, 0x3b(%rsp)
leaq 0x1eb668(%rip), %rsi # 0x29fd48
leaq 0x2f9(%rip), %rdx # 0xb49e0
callq 0x5ab00
jmp 0xb482f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
jmp 0xb4719
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x5b558
leaq 0x4f(%rsp), %rdi
callq 0x5b530
testb $0x1, 0x3b(%rsp)
jne 0xb472c
jmp 0xb4736
movq 0x10(%rsp), %rdi
callq 0x5af70
jmp 0xb4825
movq 0x20(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xb4767
leaq 0x157c61(%rip), %rdi # 0x20c3ae
movl $0x3422, %esi # imm = 0x3422
leaq 0x151a7d(%rip), %rdx # 0x2061d6
leaq 0x15d284(%rip), %rcx # 0x2119e4
movb $0x0, %al
callq 0x5aee0
movq 0x20(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movq %rax, 0x8(%rsp)
subq $0x9, %rax
ja 0xb47e0
movq 0x8(%rsp), %rax
leaq 0x1526bf(%rip), %rcx # 0x206e48
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
movq 0x70(%rsp), %rsi
addq $0x8, %rsi
callq 0xb49f0
andb $0x1, %al
movb %al, 0x87(%rsp)
jmp 0xb4814
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
movq 0x70(%rsp), %rsi
addq $0x8, %rsi
addq $0x8, %rsi
callq 0xb4a30
andb $0x1, %al
movb %al, 0x87(%rsp)
jmp 0xb4814
jmp 0xb47e0
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xb4a70
andb $0x1, %al
movb %al, 0x87(%rsp)
movb 0x87(%rsp), %al
andb $0x1, %al
addq $0x88, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x5abc0
nop
| _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_:
sub rsp, 88h
mov qword ptr [rsp+88h+var_10], rdi; int
mov qword ptr [rsp+88h+var_18], rsi; char
mov rax, qword ptr [rsp+88h+var_10]
mov qword ptr [rsp+88h+var_68], rax; int
mov rax, [rax]
mov rcx, qword ptr [rsp+88h+var_18]
cmp rax, [rcx]
setnz al
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_B4676
jmp loc_B473B
loc_B4676:
mov [rsp+88h+var_4D], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+88h+var_78], rax; int
lea rdi, [rsp+88h+var_39]
mov qword ptr [rsp+88h+var_70], rdi; char
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+88h+var_70]
lea rsi, aCannotCompareI; "cannot compare iterators of different c"...
lea rdi, [rsp+88h+var_38]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_B46B1:
mov rdi, [rsp+88h+var_78]; int
mov rax, qword ptr [rsp+88h+var_68]
mov rcx, [rax]
mov esi, 0D4h
lea rdx, [rsp+88h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_B46CF:
mov rdi, [rsp+88h+var_78]; void *
mov [rsp+88h+var_4D], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorD2Ev; void (*)(void *)
call ___cxa_throw
jmp loc_B482F
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
jmp short loc_B4719
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_B4719:
lea rdi, [rsp+arg_47]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rsp+arg_33], 1
jnz short loc_B472C
jmp short loc_B4736
loc_B472C:
mov rdi, [rsp+arg_8]; void *
call ___cxa_free_exception
loc_B4736:
jmp loc_B4825
loc_B473B:
mov rax, qword ptr [rsp+88h+var_68]
cmp qword ptr [rax], 0
jnz short loc_B4767
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 3422h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov al, 0
call _ggml_abort
loc_B4767:
mov rax, qword ptr [rsp+88h+var_68]
mov rax, [rax]
movzx eax, byte ptr [rax]
mov [rsp+88h+var_80], rax
sub rax, 9; switch 10 cases
ja short def_B4790; jumptable 00000000000B4790 default case
mov rax, [rsp+88h+var_80]
lea rcx, jpt_B4790
movsxd rax, ds:(jpt_B4790 - 206E48h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_B4792:
mov rdi, qword ptr [rsp+88h+var_68]; jumptable 00000000000B4790 case 1
add rdi, 8
mov rsi, qword ptr [rsp+88h+var_18]
add rsi, 8
call _ZN9__gnu_cxxeqIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&)
and al, 1
mov [rsp+88h+var_1], al
jmp short loc_B4814
loc_B47B4:
mov rdi, qword ptr [rsp+88h+var_68]; jumptable 00000000000B4790 case 2
add rdi, 8
add rdi, 8
mov rsi, qword ptr [rsp+88h+var_18]
add rsi, 8
add rsi, 8
call _ZN9__gnu_cxxeqIPN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EEEEbRKNS_17__normal_iteratorIT_T0_EESO_; __gnu_cxx::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> *,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>>>(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>> const&,__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>> const&)
and al, 1
mov [rsp+88h+var_1], al
jmp short loc_B4814
loc_B47DE:
jmp short $+2; jumptable 00000000000B4790 cases 0,3-9
def_B4790:
mov rax, qword ptr [rsp+88h+var_68]; jumptable 00000000000B4790 default case
mov rax, [rax+18h]
mov [rsp+88h+var_58], rax
mov rax, qword ptr [rsp+88h+var_18]
mov rax, [rax+18h]
mov [rsp+88h+var_60], rax
mov rdi, [rsp+88h+var_58]
mov rsi, [rsp+88h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detaileqENS1_20primitive_iterator_tES2_; nlohmann::json_abi_v3_11_3::detail::operator==(nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t,nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t)
and al, 1
mov [rsp+88h+var_1], al
loc_B4814:
mov al, [rsp+88h+var_1]
and al, 1
add rsp, 88h
retn
loc_B4825:
mov rdi, [rsp+arg_38]
call __Unwind_Resume
loc_B482F:
nop
| _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_:
SUB RSP,0x88
MOV qword ptr [RSP + 0x78],RDI
MOV qword ptr [RSP + 0x70],RSI
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RSP + 0x70]
CMP RAX,qword ptr [RCX]
SETNZ AL
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x001b4676
JMP 0x001b473b
LAB_001b4676:
MOV byte ptr [RSP + 0x3b],0x1
MOV EDI,0x20
CALL 0x0015a6a0
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x4f]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x0015b0d0
MOV RDX,qword ptr [RSP + 0x18]
LAB_001b469e:
LEA RSI,[0x30d3d7]
LEA RDI,[RSP + 0x50]
CALL 0x00161fc0
JMP 0x001b46b1
LAB_001b46b1:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RAX]
LAB_001b46be:
MOV ESI,0xd4
LEA RDX,[RSP + 0x50]
CALL 0x001b4830
JMP 0x001b46cf
LAB_001b46cf:
MOV RDI,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0x3b],0x0
LEA RSI,[0x39fd48]
LEA RDX,[0x1b49e0]
CALL 0x0015ab00
LAB_001b473b:
MOV RAX,qword ptr [RSP + 0x20]
CMP qword ptr [RAX],0x0
JNZ 0x001b4767
LEA RDI,[0x30c3ae]
MOV ESI,0x3422
LEA RDX,[0x3061d6]
LEA RCX,[0x3119e4]
MOV AL,0x0
CALL 0x0015aee0
LAB_001b4767:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RSP + 0x8],RAX
SUB RAX,0x9
JA 0x001b47e0
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[0x306e48]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x8
MOV RSI,qword ptr [RSP + 0x70]
ADD RSI,0x8
CALL 0x001b49f0
AND AL,0x1
MOV byte ptr [RSP + 0x87],AL
JMP 0x001b4814
caseD_2:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x8
ADD RDI,0x8
MOV RSI,qword ptr [RSP + 0x70]
ADD RSI,0x8
ADD RSI,0x8
CALL 0x001b4a30
AND AL,0x1
MOV byte ptr [RSP + 0x87],AL
JMP 0x001b4814
caseD_0:
JMP 0x001b47e0
default:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001b4a70
AND AL,0x1
MOV byte ptr [RSP + 0x87],AL
LAB_001b4814:
MOV AL,byte ptr [RSP + 0x87]
AND AL,0x1
ADD RSP,0x88
RET
|
int8
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
(long *param_1,long *param_2)
{
byte extraout_AL;
int8 uVar1;
int7 extraout_var;
int7 extraout_var_00;
int7 extraout_var_01;
int7 uVar2;
allocator local_39;
string local_38 [32];
long *local_18;
long *local_10;
bool local_1;
local_18 = param_2;
local_10 = param_1;
if (*param_1 != *param_2) {
uVar1 = __cxa_allocate_exception(0x20);
std::allocator<char>::allocator();
/* try { // try from 001b469e to 001b46ae has its CatchHandler @ 001b46f1 */
std::__cxx11::string::string<std::allocator<char>>
(local_38,"cannot compare iterators of different containers",&local_39);
/* try { // try from 001b46be to 001b46eb has its CatchHandler @ 001b4701 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0xd4,local_38,*param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_3::detail::invalid_iterator::~invalid_iterator);
}
if (*param_1 == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x3422,
"GGML_ASSERT(%s) failed","m_object != nullptr");
}
switch(*(int1 *)*param_1) {
case 0:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
default:
nlohmann::json_abi_v3_11_3::detail::operator==(param_1[3],local_18[3]);
local_1 = (bool)(extraout_AL & 1);
uVar2 = extraout_var_01;
break;
case 1:
local_1 = __gnu_cxx::operator==
((__normal_iterator *)(param_1 + 1),(__normal_iterator *)(local_18 + 1));
uVar2 = extraout_var;
break;
case 2:
local_1 = __gnu_cxx::operator==
((__normal_iterator *)(param_1 + 2),(__normal_iterator *)(local_18 + 2));
uVar2 = extraout_var_00;
}
return CONCAT71(uVar2,local_1);
}
| ||
33,849 | bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const | monkey531[P]llama/common/json.hpp | bool operator==(const IterImpl& other) const
{
// if objects are not the same, the comparison is undefined
if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object))
{
JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object));
}
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
return (m_it.object_iterator == other.m_it.object_iterator);
case value_t::array:
return (m_it.array_iterator == other.m_it.array_iterator);
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
return (m_it.primitive_iterator == other.m_it.primitive_iterator);
}
} | O2 | cpp | bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movq (%rdi), %rax
cmpq (%rsi), %rax
jne 0x678dd
testq %rax, %rax
je 0x6792e
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x678bf
cmpl $0x1, %eax
jne 0x678c9
movq 0x8(%r14), %rax
cmpq 0x8(%rsi), %rax
jmp 0x678d1
movq 0x10(%r14), %rax
cmpq 0x10(%rsi), %rax
jmp 0x678d1
movq 0x18(%r14), %rax
cmpq 0x18(%rsi), %rax
sete %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23460
movq %rax, %rbx
leaq 0x4853b(%rip), %rsi # 0xafe2a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x26f76
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0xd4, %esi
callq 0x67976
xorl %ebp, %ebp
leaq 0x925e9(%rip), %rsi # 0xf9f08
leaq -0x280a6(%rip), %rdx # 0x3f880
movq %rbx, %rdi
callq 0x23f20
leaq 0x474c1(%rip), %rdi # 0xaedf6
leaq 0x47504(%rip), %rdx # 0xaee40
leaq 0x4c6aa(%rip), %rcx # 0xb3fed
movl $0x3422, %esi # imm = 0x3422
xorl %eax, %eax
callq 0x23ed0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x241d8
testb %bpl, %bpl
jne 0x67966
jmp 0x6796e
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23fa0
| _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
mov rax, [rdi]
cmp rax, [rsi]
jnz short loc_678DD
test rax, rax
jz loc_6792E
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_678BF
cmp eax, 1
jnz short loc_678C9
mov rax, [r14+8]
cmp rax, [rsi+8]
jmp short loc_678D1
loc_678BF:
mov rax, [r14+10h]
cmp rax, [rsi+10h]
jmp short loc_678D1
loc_678C9:
mov rax, [r14+18h]
cmp rax, [rsi+18h]
loc_678D1:
setz al
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_678DD:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aCannotCompareI; "cannot compare iterators of different c"...
lea rdi, [rsp+48h+var_38]
lea rdx, [rsp+48h+var_39]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rcx, [r14]
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 0D4h; int
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_6792E:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 3422h
xor eax, eax
call _ggml_abort
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_67966
jmp short loc_6796E
mov r14, rax
loc_67966:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6796E:
mov rdi, r14
call __Unwind_Resume
| _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOV RAX,qword ptr [RDI]
CMP RAX,qword ptr [RSI]
JNZ 0x001678dd
TEST RAX,RAX
JZ 0x0016792e
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x001678bf
CMP EAX,0x1
JNZ 0x001678c9
MOV RAX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RSI + 0x8]
JMP 0x001678d1
LAB_001678bf:
MOV RAX,qword ptr [R14 + 0x10]
CMP RAX,qword ptr [RSI + 0x10]
JMP 0x001678d1
LAB_001678c9:
MOV RAX,qword ptr [R14 + 0x18]
CMP RAX,qword ptr [RSI + 0x18]
LAB_001678d1:
SETZ AL
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001678dd:
PUSH 0x20
POP RDI
CALL 0x00123460
MOV RBX,RAX
LAB_001678e8:
LEA RSI,[0x1afe2a]
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
CALL 0x00126f76
MOV RCX,qword ptr [R14]
MOV BPL,0x1
LAB_00167904:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0xd4
CALL 0x00167976
XOR EBP,EBP
LEA RSI,[0x1f9f08]
LEA RDX,[0x13f880]
MOV RDI,RBX
CALL 0x00123f20
LAB_0016792e:
LEA RDI,[0x1aedf6]
LEA RDX,[0x1aee40]
LEA RCX,[0x1b3fed]
MOV ESI,0x3422
XOR EAX,EAX
CALL 0x00123ed0
|
int8
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
(int8 *param_1,int8 *param_2)
{
char *pcVar1;
long lVar2;
int8 uVar3;
bool bVar4;
allocator local_39;
string local_38 [32];
pcVar1 = (char *)*param_1;
if (pcVar1 != (char *)*param_2) {
uVar3 = __cxa_allocate_exception(0x20);
/* try { // try from 001678e8 to 001678fd has its CatchHandler @ 00167963 */
std::__cxx11::string::string<std::allocator<char>>
(local_38,"cannot compare iterators of different containers",&local_39);
/* try { // try from 00167904 to 0016792d has its CatchHandler @ 0016794f */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar3,0xd4,local_38,*param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if (pcVar1 != (char *)0x0) {
if (*pcVar1 == '\x02') {
lVar2 = param_1[2];
bVar4 = lVar2 == param_2[2];
}
else if (*pcVar1 == '\x01') {
lVar2 = param_1[1];
bVar4 = lVar2 == param_2[1];
}
else {
lVar2 = param_1[3];
bVar4 = lVar2 == param_2[3];
}
return CONCAT71((int7)((ulong)lVar2 >> 8),bVar4);
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x3422,
"GGML_ASSERT(%s) failed","m_object != nullptr");
}
| ||
33,850 | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool) | monkey531[P]llama/common/sampling.cpp | std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const llama_tokens & draft, bool grammar_first) {
std::vector<int> idxs(draft.size() + 1);
for (size_t i = 0; i < idxs.size(); ++i) {
idxs[i] = i;
}
return common_sampler_sample_and_accept_n(gsmpl, ctx, idxs, draft, grammar_first);
} | O1 | cpp | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x2, %rsi
incq %rsi
leaq 0x10(%rsp), %r13
leaq 0xf(%rsp), %rdx
movq %r13, %rdi
callq 0x7a518
movq (%r13), %rax
movq 0x8(%r13), %rdx
subq %rax, %rdx
je 0xcfd26
sarq $0x2, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
leaq 0x1(%rdx), %rcx
andq $-0x2, %rcx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1]
movdqa 0x1935c(%rip), %xmm1 # 0xe9010
xorl %edx, %edx
movdqa 0x19362(%rip), %xmm2 # 0xe9020
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x19372(%rip), %xmm4 # 0xe9040
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7 # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5 # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0xcfd03
movl %edx, (%rax,%rdx,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0xcfd19
leal 0x1(%rdx), %esi
movl %esi, 0x4(%rax,%rdx,4)
addq $0x2, %rdx
paddq %xmm4, %xmm1
cmpq %rdx, %rcx
jne 0xcfcce
movzbl %bpl, %r9d
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0xcfaa5
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xcfd57
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8e0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xcfd83
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8e0
movq %rbx, %rdi
callq 0x1bfb0
| _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, r8d
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rsi, [rcx+8]
sub rsi, [rcx]
sar rsi, 2
inc rsi
lea r13, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_49]
mov rdi, r13
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
mov rax, [r13+0]
mov rdx, [r13+8]
sub rdx, rax
jz loc_CFD26
sar rdx, 2
cmp rdx, 1
adc rdx, 0
lea rcx, [rdx+1]
and rcx, 0FFFFFFFFFFFFFFFEh
dec rdx
movq xmm0, rdx
pshufd xmm0, xmm0, 44h ; 'D'
movdqa xmm1, cs:xmmword_E9010
xor edx, edx
movdqa xmm2, cs:xmmword_E9020
pxor xmm0, xmm2
pcmpeqd xmm3, xmm3
movdqa xmm4, cs:xmmword_E9040
loc_CFCCE:
movdqa xmm5, xmm1
pxor xmm5, xmm2
movdqa xmm6, xmm5
pcmpgtd xmm6, xmm0
pcmpeqd xmm5, xmm0
pshufd xmm7, xmm5, 0F5h
pand xmm7, xmm6
pshufd xmm5, xmm6, 0F5h
por xmm5, xmm7
movd esi, xmm5
not esi
test sil, 1
jz short loc_CFD03
mov [rax+rdx*4], edx
loc_CFD03:
pxor xmm5, xmm3
pextrw esi, xmm5, 4
test sil, 1
jz short loc_CFD19
lea esi, [rdx+1]
mov [rax+rdx*4+4], esi
loc_CFD19:
add rdx, 2
paddq xmm1, xmm4
cmp rcx, rdx
jnz short loc_CFCCE
loc_CFD26:
movzx r9d, bpl
lea rcx, [rsp+58h+var_48]
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov r8, r14
call _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b; common_sampler_sample_and_accept_n(common_sampler *,llama_context *,std::vector<int> const&,std::vector<int> const&,bool)
mov rdi, [rsp+58h+var_48]; void *
test rdi, rdi
jz short loc_CFD57
mov rsi, [rsp+58h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CFD57:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_CFD83
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CFD83:
mov rdi, rbx
call __Unwind_Resume
| long long * common_sampler_sample_and_accept_n(
long long *a1,
_QWORD *a2,
long long a3,
_QWORD *a4,
unsigned __int8 a5)
{
_DWORD *v8; // rax
long long v9; // rdx
unsigned long long v10; // rcx
__m128i v11; // xmm0
__m128i si128; // xmm1
long long v13; // rdx
__m128i v14; // xmm2
__m128i v15; // xmm0
__m128i v16; // xmm4
__m128i v17; // xmm5
__m128i v18; // xmm6
__m128i v19; // xmm5
void *v21; // [rsp+10h] [rbp-48h] BYREF
_BYTE *v22; // [rsp+18h] [rbp-40h]
long long v23; // [rsp+20h] [rbp-38h]
std::vector<int>::vector((long long)&v21, ((long long)(a4[1] - *a4) >> 2) + 1);
v8 = v21;
if ( v22 != v21 )
{
v9 = ((v22 - (_BYTE *)v21) >> 2 == 0) + ((v22 - (_BYTE *)v21) >> 2);
v10 = (v9 + 1) & 0xFFFFFFFFFFFFFFFELL;
v11 = _mm_shuffle_epi32((__m128i)(unsigned long long)(v9 - 1), 68);
si128 = _mm_load_si128((const __m128i *)&xmmword_E9010);
v13 = 0LL;
v14 = _mm_load_si128((const __m128i *)&xmmword_E9020);
v15 = _mm_xor_si128(v11, v14);
v16 = _mm_load_si128((const __m128i *)&xmmword_E9040);
do
{
v17 = _mm_xor_si128(si128, v14);
v18 = _mm_cmpgt_epi32(v17, v15);
v19 = _mm_or_si128(
_mm_shuffle_epi32(v18, 245),
_mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v17, v15), 245), v18));
if ( (~_mm_cvtsi128_si32(v19) & 1) != 0 )
v8[v13] = v13;
if ( (_mm_extract_epi16(_mm_xor_si128(v19, (__m128i)-1LL), 4) & 1) != 0 )
v8[v13 + 1] = v13 + 1;
v13 += 2LL;
si128 = _mm_add_epi64(si128, v16);
}
while ( v10 != v13 );
}
common_sampler_sample_and_accept_n(a1, a2, a3, &v21, a4, a5);
if ( v21 )
operator delete(v21, v23 - (_QWORD)v21);
return a1;
}
| common_sampler_sample_and_accept_n:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,R8D
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RCX + 0x8]
SUB RSI,qword ptr [RCX]
SAR RSI,0x2
INC RSI
LEA R13,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RDI,R13
CALL 0x0017a518
MOV RAX,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
SUB RDX,RAX
JZ 0x001cfd26
SAR RDX,0x2
CMP RDX,0x1
ADC RDX,0x0
LEA RCX,[RDX + 0x1]
AND RCX,-0x2
DEC RDX
MOVQ XMM0,RDX
PSHUFD XMM0,XMM0,0x44
MOVDQA XMM1,xmmword ptr [0x001e9010]
XOR EDX,EDX
MOVDQA XMM2,xmmword ptr [0x001e9020]
PXOR XMM0,XMM2
PCMPEQD XMM3,XMM3
MOVDQA XMM4,xmmword ptr [0x001e9040]
LAB_001cfcce:
MOVDQA XMM5,XMM1
PXOR XMM5,XMM2
MOVDQA XMM6,XMM5
PCMPGTD XMM6,XMM0
PCMPEQD XMM5,XMM0
PSHUFD XMM7,XMM5,0xf5
PAND XMM7,XMM6
PSHUFD XMM5,XMM6,0xf5
POR XMM5,XMM7
MOVD ESI,XMM5
NOT ESI
TEST SIL,0x1
JZ 0x001cfd03
MOV dword ptr [RAX + RDX*0x4],EDX
LAB_001cfd03:
PXOR XMM5,XMM3
PEXTRW ESI,XMM5,0x4
TEST SIL,0x1
JZ 0x001cfd19
LEA ESI,[RDX + 0x1]
MOV dword ptr [RAX + RDX*0x4 + 0x4],ESI
LAB_001cfd19:
ADD RDX,0x2
PADDQ XMM1,XMM4
CMP RCX,RDX
JNZ 0x001cfcce
LAB_001cfd26:
MOVZX R9D,BPL
LEA RCX,[RSP + 0x10]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV R8,R14
CALL 0x001cfaa5
LAB_001cfd40:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001cfd57
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0011b8e0
LAB_001cfd57:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int,
std::allocator<int> > const&, bool) */
common_sampler *
common_sampler_sample_and_accept_n
(common_sampler *param_1,llama_context *param_2,vector *param_3,bool param_4)
{
int1 auVar1 [16];
long lVar2;
long lVar3;
int7 in_register_00000009;
long lVar4;
long lVar5;
ulong uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [16];
void *local_48;
long local_40;
long local_38;
std::vector<int,std::allocator<int>>::vector
((ulong)&local_48,
(allocator *)
((((long *)CONCAT71(in_register_00000009,param_4))[1] -
*(long *)CONCAT71(in_register_00000009,param_4) >> 2) + 1));
lVar3 = _UNK_001e9048;
lVar2 = _DAT_001e9040;
auVar1 = _DAT_001e9020;
if (local_40 - (long)local_48 != 0) {
lVar4 = local_40 - (long)local_48 >> 2;
lVar4 = lVar4 + (ulong)(lVar4 == 0);
lVar5 = lVar4 + -1;
auVar7._8_4_ = (int)lVar5;
auVar7._0_8_ = lVar5;
auVar7._12_4_ = (int)((ulong)lVar5 >> 0x20);
uVar6 = 0;
auVar7 = auVar7 ^ _DAT_001e9020;
auVar8 = _DAT_001e9010;
do {
auVar9 = auVar8 ^ auVar1;
if ((bool)(~(auVar9._4_4_ == auVar7._4_4_ && auVar7._0_4_ < auVar9._0_4_ ||
auVar7._4_4_ < auVar9._4_4_) & 1)) {
*(int *)((long)local_48 + uVar6 * 4) = (int)uVar6;
}
if ((auVar9._12_4_ != auVar7._12_4_ || auVar9._8_4_ <= auVar7._8_4_) &&
auVar9._12_4_ <= auVar7._12_4_) {
*(int *)((long)local_48 + uVar6 * 4 + 4) = (int)uVar6 + 1;
}
uVar6 = uVar6 + 2;
lVar5 = auVar8._8_8_;
auVar8._0_8_ = auVar8._0_8_ + lVar2;
auVar8._8_8_ = lVar5 + lVar3;
} while ((lVar4 + 1U & 0xfffffffffffffffe) != uVar6);
}
/* try { // try from 001cfd26 to 001cfd3f has its CatchHandler @ 001cfd69 */
common_sampler_sample_and_accept_n(param_1,param_2,param_3,(vector *)&local_48,param_4);
if (local_48 != (void *)0x0) {
operator_delete(local_48,local_38 - (long)local_48);
}
return param_1;
}
| |
33,851 | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool) | monkey531[P]llama/common/sampling.cpp | std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const llama_tokens & draft, bool grammar_first) {
std::vector<int> idxs(draft.size() + 1);
for (size_t i = 0; i < idxs.size(); ++i) {
idxs[i] = i;
}
return common_sampler_sample_and_accept_n(gsmpl, ctx, idxs, draft, grammar_first);
} | O3 | cpp | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x2, %rsi
incq %rsi
leaq 0x10(%rsp), %r13
leaq 0xf(%rsp), %rdx
movq %r13, %rdi
callq 0x799a2
movq (%r13), %rax
movq 0x8(%r13), %rdx
subq %rax, %rdx
je 0xce130
sarq $0x2, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
leaq 0x1(%rdx), %rcx
andq $-0x2, %rcx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1]
movdqa 0x17f52(%rip), %xmm1 # 0xe6010
xorl %edx, %edx
movdqa 0x17f58(%rip), %xmm2 # 0xe6020
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x17f68(%rip), %xmm4 # 0xe6040
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7 # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5 # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0xce10d
movl %edx, (%rax,%rdx,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0xce123
leal 0x1(%rdx), %esi
movl %esi, 0x4(%rax,%rdx,4)
addq $0x2, %rdx
paddq %xmm4, %xmm1
cmpq %rdx, %rcx
jne 0xce0d8
movzbl %bpl, %r9d
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0xcdeb1
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xce161
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1a8e0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xce18d
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1a8e0
movq %rbx, %rdi
callq 0x1afb0
| _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, r8d
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rsi, [rcx+8]
sub rsi, [rcx]
sar rsi, 2
inc rsi
lea r13, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_49]
mov rdi, r13
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
mov rax, [r13+0]
mov rdx, [r13+8]
sub rdx, rax
jz loc_CE130
sar rdx, 2
cmp rdx, 1
adc rdx, 0
lea rcx, [rdx+1]
and rcx, 0FFFFFFFFFFFFFFFEh
dec rdx
movq xmm0, rdx
pshufd xmm0, xmm0, 44h ; 'D'
movdqa xmm1, cs:xmmword_E6010
xor edx, edx
movdqa xmm2, cs:xmmword_E6020
pxor xmm0, xmm2
pcmpeqd xmm3, xmm3
movdqa xmm4, cs:xmmword_E6040
loc_CE0D8:
movdqa xmm5, xmm1
pxor xmm5, xmm2
movdqa xmm6, xmm5
pcmpgtd xmm6, xmm0
pcmpeqd xmm5, xmm0
pshufd xmm7, xmm5, 0F5h
pand xmm7, xmm6
pshufd xmm5, xmm6, 0F5h
por xmm5, xmm7
movd esi, xmm5
not esi
test sil, 1
jz short loc_CE10D
mov [rax+rdx*4], edx
loc_CE10D:
pxor xmm5, xmm3
pextrw esi, xmm5, 4
test sil, 1
jz short loc_CE123
lea esi, [rdx+1]
mov [rax+rdx*4+4], esi
loc_CE123:
add rdx, 2
paddq xmm1, xmm4
cmp rcx, rdx
jnz short loc_CE0D8
loc_CE130:
movzx r9d, bpl
lea rcx, [rsp+58h+var_48]
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov r8, r14
call _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b; common_sampler_sample_and_accept_n(common_sampler *,llama_context *,std::vector<int> const&,std::vector<int> const&,bool)
mov rdi, [rsp+58h+var_48]; void *
test rdi, rdi
jz short loc_CE161
mov rsi, [rsp+58h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CE161:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_CE18D
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CE18D:
mov rdi, rbx
call __Unwind_Resume
| long long * common_sampler_sample_and_accept_n(
long long *a1,
_QWORD *a2,
long long a3,
long long *a4,
unsigned __int8 a5)
{
_DWORD *v8; // rax
long long v9; // rdx
unsigned long long v10; // rcx
__m128i v11; // xmm0
__m128i si128; // xmm1
long long v13; // rdx
__m128i v14; // xmm2
__m128i v15; // xmm0
__m128i v16; // xmm4
__m128i v17; // xmm5
__m128i v18; // xmm6
__m128i v19; // xmm5
void *v21; // [rsp+10h] [rbp-48h] BYREF
_BYTE *v22; // [rsp+18h] [rbp-40h]
long long v23; // [rsp+20h] [rbp-38h]
std::vector<int>::vector((long long)&v21, ((a4[1] - *a4) >> 2) + 1);
v8 = v21;
if ( v22 != v21 )
{
v9 = ((v22 - (_BYTE *)v21) >> 2 == 0) + ((v22 - (_BYTE *)v21) >> 2);
v10 = (v9 + 1) & 0xFFFFFFFFFFFFFFFELL;
v11 = _mm_shuffle_epi32((__m128i)(unsigned long long)(v9 - 1), 68);
si128 = _mm_load_si128((const __m128i *)&xmmword_E6010);
v13 = 0LL;
v14 = _mm_load_si128((const __m128i *)&xmmword_E6020);
v15 = _mm_xor_si128(v11, v14);
v16 = _mm_load_si128((const __m128i *)&xmmword_E6040);
do
{
v17 = _mm_xor_si128(si128, v14);
v18 = _mm_cmpgt_epi32(v17, v15);
v19 = _mm_or_si128(
_mm_shuffle_epi32(v18, 245),
_mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v17, v15), 245), v18));
if ( (~_mm_cvtsi128_si32(v19) & 1) != 0 )
v8[v13] = v13;
if ( (_mm_extract_epi16(_mm_xor_si128(v19, (__m128i)-1LL), 4) & 1) != 0 )
v8[v13 + 1] = v13 + 1;
v13 += 2LL;
si128 = _mm_add_epi64(si128, v16);
}
while ( v10 != v13 );
}
common_sampler_sample_and_accept_n(a1, a2, a3, &v21, a4, a5);
if ( v21 )
operator delete(v21, v23 - (_QWORD)v21);
return a1;
}
| common_sampler_sample_and_accept_n:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,R8D
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RCX + 0x8]
SUB RSI,qword ptr [RCX]
SAR RSI,0x2
INC RSI
LEA R13,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RDI,R13
CALL 0x001799a2
MOV RAX,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
SUB RDX,RAX
JZ 0x001ce130
SAR RDX,0x2
CMP RDX,0x1
ADC RDX,0x0
LEA RCX,[RDX + 0x1]
AND RCX,-0x2
DEC RDX
MOVQ XMM0,RDX
PSHUFD XMM0,XMM0,0x44
MOVDQA XMM1,xmmword ptr [0x001e6010]
XOR EDX,EDX
MOVDQA XMM2,xmmword ptr [0x001e6020]
PXOR XMM0,XMM2
PCMPEQD XMM3,XMM3
MOVDQA XMM4,xmmword ptr [0x001e6040]
LAB_001ce0d8:
MOVDQA XMM5,XMM1
PXOR XMM5,XMM2
MOVDQA XMM6,XMM5
PCMPGTD XMM6,XMM0
PCMPEQD XMM5,XMM0
PSHUFD XMM7,XMM5,0xf5
PAND XMM7,XMM6
PSHUFD XMM5,XMM6,0xf5
POR XMM5,XMM7
MOVD ESI,XMM5
NOT ESI
TEST SIL,0x1
JZ 0x001ce10d
MOV dword ptr [RAX + RDX*0x4],EDX
LAB_001ce10d:
PXOR XMM5,XMM3
PEXTRW ESI,XMM5,0x4
TEST SIL,0x1
JZ 0x001ce123
LEA ESI,[RDX + 0x1]
MOV dword ptr [RAX + RDX*0x4 + 0x4],ESI
LAB_001ce123:
ADD RDX,0x2
PADDQ XMM1,XMM4
CMP RCX,RDX
JNZ 0x001ce0d8
LAB_001ce130:
MOVZX R9D,BPL
LEA RCX,[RSP + 0x10]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV R8,R14
CALL 0x001cdeb1
LAB_001ce14a:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001ce161
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0011a8e0
LAB_001ce161:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int,
std::allocator<int> > const&, bool) */
common_sampler *
common_sampler_sample_and_accept_n
(common_sampler *param_1,llama_context *param_2,vector *param_3,bool param_4)
{
int1 auVar1 [16];
long lVar2;
long lVar3;
int7 in_register_00000009;
long lVar4;
long lVar5;
ulong uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [16];
void *local_48;
long local_40;
long local_38;
std::vector<int,std::allocator<int>>::vector
((ulong)&local_48,
(allocator *)
((((long *)CONCAT71(in_register_00000009,param_4))[1] -
*(long *)CONCAT71(in_register_00000009,param_4) >> 2) + 1));
lVar3 = _UNK_001e6048;
lVar2 = _DAT_001e6040;
auVar1 = _DAT_001e6020;
if (local_40 - (long)local_48 != 0) {
lVar4 = local_40 - (long)local_48 >> 2;
lVar4 = lVar4 + (ulong)(lVar4 == 0);
lVar5 = lVar4 + -1;
auVar7._8_4_ = (int)lVar5;
auVar7._0_8_ = lVar5;
auVar7._12_4_ = (int)((ulong)lVar5 >> 0x20);
uVar6 = 0;
auVar7 = auVar7 ^ _DAT_001e6020;
auVar8 = _DAT_001e6010;
do {
auVar9 = auVar8 ^ auVar1;
if ((bool)(~(auVar9._4_4_ == auVar7._4_4_ && auVar7._0_4_ < auVar9._0_4_ ||
auVar7._4_4_ < auVar9._4_4_) & 1)) {
*(int *)((long)local_48 + uVar6 * 4) = (int)uVar6;
}
if ((auVar9._12_4_ != auVar7._12_4_ || auVar9._8_4_ <= auVar7._8_4_) &&
auVar9._12_4_ <= auVar7._12_4_) {
*(int *)((long)local_48 + uVar6 * 4 + 4) = (int)uVar6 + 1;
}
uVar6 = uVar6 + 2;
lVar5 = auVar8._8_8_;
auVar8._0_8_ = auVar8._0_8_ + lVar2;
auVar8._8_8_ = lVar5 + lVar3;
} while ((lVar4 + 1U & 0xfffffffffffffffe) != uVar6);
}
/* try { // try from 001ce130 to 001ce149 has its CatchHandler @ 001ce173 */
common_sampler_sample_and_accept_n(param_1,param_2,param_3,(vector *)&local_48,param_4);
if (local_48 != (void *)0x0) {
operator_delete(local_48,local_38 - (long)local_48);
}
return param_1;
}
| |
33,852 | test_bug44495 | eloqsql/tests/mysql_client_test.c | static void test_bug44495()
{
int rc;
MYSQL con;
MYSQL_STMT *stmt;
DBUG_ENTER("test_bug44495");
myheader("test_44495");
rc= mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1");
myquery(rc);
rc= mysql_query(mysql, "CREATE PROCEDURE p1(IN arg VARCHAR(25))"
" BEGIN SET @stmt = CONCAT('SELECT \"', arg, '\"');"
" PREPARE ps1 FROM @stmt;"
" EXECUTE ps1;"
" DROP PREPARE ps1;"
"END;");
myquery(rc);
DIE_UNLESS(mysql_client_init(&con));
DIE_UNLESS(mysql_real_connect(&con, opt_host, opt_user, opt_password,
current_db, opt_port, opt_unix_socket,
CLIENT_MULTI_RESULTS));
stmt= mysql_simple_prepare(&con, "CALL p1('abc')");
check_stmt(stmt);
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= my_process_stmt_result(stmt);
DIE_UNLESS(rc == 1);
mysql_stmt_close(stmt);
mysql_close(&con);
rc= mysql_query(mysql, "DROP PROCEDURE p1");
myquery(rc);
DBUG_VOID_RETURN;
} | O3 | c | test_bug44495:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x508, %rsp # imm = 0x508
movq %fs:0x28, %rax
movq %rax, -0x10(%rbp)
cmpb $0x1, 0x39d61a(%rip) # 0x41a4c1
jg 0x7cf28
movq 0x323110(%rip), %rbx # 0x39ffc0
movq (%rbx), %rdi
leaq 0x6260a(%rip), %rdx # 0xdf4c4
movl $0x1, %esi
xorl %eax, %eax
callq 0x39240
movq (%rbx), %rdi
movl 0x39d83d(%rip), %ecx # 0x41a70c
leal 0x1(%rcx), %eax
movl %eax, 0x39d834(%rip) # 0x41a70c
movl 0x39d829(%rip), %r8d # 0x41a708
movl 0x39d606(%rip), %r9d # 0x41a4ec
subq $0x8, %rsp
leaq 0x78568(%rip), %r10 # 0xf5459
leaq 0x638d4(%rip), %rdx # 0xe07cc
movl $0x1, %esi
xorl %eax, %eax
pushq %r10
callq 0x39240
addq $0x10, %rsp
movq (%rbx), %rdi
leaq 0x625e8(%rip), %rdx # 0xdf4fc
movl $0x1, %esi
xorl %eax, %eax
callq 0x39240
movq (%rbx), %rdi
callq 0x394b0
movq 0x39d599(%rip), %rdi # 0x41a4c8
leaq 0x769a8(%rip), %rsi # 0xf38de
callq 0x3b116
testl %eax, %eax
jne 0x7d046
movq 0x39d57e(%rip), %rdi # 0x41a4c8
leaq 0x78513(%rip), %rsi # 0xf5464
callq 0x3b116
testl %eax, %eax
jne 0x7d065
leaq -0x508(%rbp), %rdi
callq 0x3d9b1
testq %rax, %rax
je 0x7d084
movq 0x39d7ae(%rip), %rsi # 0x41a728
movq 0x39e7e7(%rip), %rdx # 0x41b768
movq 0x39d798(%rip), %rcx # 0x41a720
movl 0x39e7c9(%rip), %r9d # 0x41b758
leaq 0x323a7a(%rip), %r8 # 0x3a0a10
leaq -0x508(%rbp), %rdi
pushq $0x20000 # imm = 0x20000
pushq 0x39e7b8(%rip) # 0x41b760
callq 0x3ac6c
addq $0x10, %rsp
testq %rax, %rax
je 0x7d09c
leaq 0x785b2(%rip), %rsi # 0xf5573
leaq -0x508(%rbp), %rdi
callq 0x3ba15
testq %rax, %rax
je 0x7d0b4
movq %rax, %rbx
movq %rax, %rdi
callq 0x3b510
testl %eax, %eax
jne 0x7d0d3
movq %rbx, %rdi
callq 0x3bc81
cmpl $0x1, %eax
jne 0x7d0f3
movq %rbx, %rdi
callq 0x3b639
leaq -0x508(%rbp), %rdi
callq 0x3b059
movq 0x39d4b3(%rip), %rdi # 0x41a4c8
leaq 0x76fe3(%rip), %rsi # 0xf3fff
callq 0x3b116
testl %eax, %eax
jne 0x7d10b
movq %fs:0x28, %rax
cmpq -0x10(%rbp), %rax
jne 0x7d12a
addq $0x508, %rsp # imm = 0x508
popq %rbx
popq %rbp
retq
xorl %edi, %edi
callq 0x3ba57
leaq 0x61d58(%rip), %rdi # 0xdedac
leaq 0x78064(%rip), %rdx # 0xf50bf
movl $0x4850, %esi # imm = 0x4850
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x61d39(%rip), %rdi # 0xdedac
leaq 0x78045(%rip), %rdx # 0xf50bf
movl $0x4858, %esi # imm = 0x4858
callq 0x3bb30
leaq 0x61d21(%rip), %rdi # 0xdedac
leaq 0x7573a(%rip), %rdx # 0xf27cc
movl $0x485a, %esi # imm = 0x485A
callq 0x3bb30
leaq 0x61d09(%rip), %rdi # 0xdedac
leaq 0x78451(%rip), %rdx # 0xf54fb
movl $0x485e, %esi # imm = 0x485E
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x61cea(%rip), %rdi # 0xdedac
leaq 0x61a41(%rip), %rdx # 0xdeb0a
movl $0x4861, %esi # imm = 0x4861
callq 0x3bb30
movq %rbx, %rdi
callq 0x3bbbe
leaq 0x61cca(%rip), %rdi # 0xdedac
leaq 0x6d87e(%rip), %rdx # 0xea967
movl $0x4864, %esi # imm = 0x4864
callq 0x3bb30
leaq 0x61cb2(%rip), %rdi # 0xdedac
leaq 0x63f29(%rip), %rdx # 0xe102a
movl $0x4867, %esi # imm = 0x4867
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x61c93(%rip), %rdi # 0xdedac
leaq 0x77f9f(%rip), %rdx # 0xf50bf
movl $0x486e, %esi # imm = 0x486E
callq 0x3bb30
callq 0x39290
| test_bug44495:
push rbp
mov rbp, rsp
push rbx
sub rsp, 508h
mov rax, fs:28h
mov [rbp+var_10], rax
cmp cs:opt_silent, 1
jg short loc_7CF28
mov rbx, cs:stdout_ptr
mov rdi, [rbx]
lea rdx, asc_DF4C4; "\n\n###################################"...
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [rbx]
mov ecx, cs:test_count
lea eax, [rcx+1]
mov cs:test_count, eax
mov r8d, cs:iter_count
mov r9d, cs:opt_count
sub rsp, 8
lea r10, aTest44495; "test_44495"
lea rdx, aUOfUUS; "%u of (%u/%u): %s"
mov esi, 1
xor eax, eax
push r10
call ___fprintf_chk
add rsp, 10h
mov rdi, [rbx]
lea rdx, asc_DF4FC; " \n###################################"...
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [rbx]
call _fflush
loc_7CF28:
mov rdi, cs:mysql
lea rsi, aDropProcedureI_0; "DROP PROCEDURE IF EXISTS p1"
call wrap_mysql_query
test eax, eax
jnz loc_7D046
mov rdi, cs:mysql
lea rsi, aCreateProcedur_21; "CREATE PROCEDURE p1(IN arg VARCHAR(25))"...
call wrap_mysql_query
test eax, eax
jnz loc_7D065
lea rdi, [rbp+var_508]
call mysql_client_init
test rax, rax
jz loc_7D084
mov rsi, cs:opt_host
mov rdx, cs:opt_user
mov rcx, cs:opt_password
mov r9d, cs:opt_port
lea r8, current_db; "client_test_db"
lea rdi, [rbp+var_508]
push 20000h
push cs:opt_unix_socket
call wrap_mysql_real_connect
add rsp, 10h
test rax, rax
jz loc_7D09C
lea rsi, aCallP1Abc; "CALL p1('abc')"
lea rdi, [rbp+var_508]
call mysql_simple_prepare
test rax, rax
jz loc_7D0B4
mov rbx, rax
mov rdi, rax
call wrap_mysql_stmt_execute
test eax, eax
jnz loc_7D0D3
mov rdi, rbx
call my_process_stmt_result
cmp eax, 1
jnz loc_7D0F3
mov rdi, rbx
call wrap_mysql_stmt_close
lea rdi, [rbp+var_508]
call wrap_mysql_close
mov rdi, cs:mysql
lea rsi, aDropProcedureP_0; "DROP PROCEDURE p1"
call wrap_mysql_query
test eax, eax
jnz loc_7D10B
mov rax, fs:28h
cmp rax, [rbp+var_10]
jnz loc_7D12A
add rsp, 508h
pop rbx
pop rbp
retn
loc_7D046:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 4850h
call die
loc_7D065:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 4858h
call die
loc_7D084:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aMysqlClientIni_0; "mysql_client_init(&con)"
mov esi, 485Ah
call die
loc_7D09C:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aMysqlRealConne_1; "mysql_real_connect(&con, opt_host, opt_"...
mov esi, 485Eh
call die
loc_7D0B4:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aStmt0; "stmt != 0"
mov esi, 4861h
call die
loc_7D0D3:
mov rdi, rbx
call print_st_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
mov esi, 4864h
call die
loc_7D0F3:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aRc1; "rc == 1"
mov esi, 4867h
call die
loc_7D10B:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 486Eh
call die
loc_7D12A:
call ___stack_chk_fail
| unsigned long long test_bug44495()
{
int v0; // ecx
long long v1; // rax
long long v2; // rbx
_BYTE v4[1272]; // [rsp+8h] [rbp-508h] BYREF
unsigned long long v5; // [rsp+500h] [rbp-10h]
v5 = __readfsqword(0x28u);
if ( opt_silent <= 1 )
{
__fprintf_chk(stdout, 1LL, "\n\n#####################################\n");
v0 = test_count++;
__fprintf_chk(stdout, 1LL, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_44495");
__fprintf_chk(stdout, 1LL, " \n#####################################\n");
fflush(stdout);
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"DROP PROCEDURE IF EXISTS p1") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 18512, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(
mysql,
(long long)"CREATE PROCEDURE p1(IN arg VARCHAR(25)) BEGIN SET @stmt = CONCAT('SELECT \"', arg, '\"'"
"); PREPARE ps1 FROM @stmt; EXECUTE ps1; DROP PREPARE ps1;END;") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 18520, "r == 0");
}
if ( !mysql_client_init((long long)v4) )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 18522, "mysql_client_init(&con)");
if ( !wrap_mysql_real_connect(
(long long)v4,
opt_host,
opt_user,
opt_password,
(int)current_db,
opt_port,
opt_unix_socket,
0x20000LL) )
die(
"/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",
18526,
"mysql_real_connect(&con, opt_host, opt_user, opt_password, current_db, opt_port, opt_unix_socket, CLIENT_MULTI_RESULTS)");
v1 = mysql_simple_prepare((long long)v4, (long long)"CALL p1('abc')");
if ( !v1 )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 18529, "stmt != 0");
}
v2 = v1;
if ( (unsigned int)wrap_mysql_stmt_execute(v1) )
{
print_st_error(v2);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 18532, "rc == 0");
}
if ( (unsigned int)my_process_stmt_result(v2) != 1 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 18535, "rc == 1");
wrap_mysql_stmt_close(v2);
wrap_mysql_close((long long)v4);
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"DROP PROCEDURE p1") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 18542, "r == 0");
}
return __readfsqword(0x28u);
}
| test_bug44495:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x508
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x10],RAX
CMP byte ptr [0x0051a4c1],0x1
JG 0x0017cf28
MOV RBX,qword ptr [0x0049ffc0]
MOV RDI,qword ptr [RBX]
LEA RDX,[0x1df4c4]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00139240
MOV RDI,qword ptr [RBX]
MOV ECX,dword ptr [0x0051a70c]
LEA EAX,[RCX + 0x1]
MOV dword ptr [0x0051a70c],EAX
MOV R8D,dword ptr [0x0051a708]
MOV R9D,dword ptr [0x0051a4ec]
SUB RSP,0x8
LEA R10,[0x1f5459]
LEA RDX,[0x1e07cc]
MOV ESI,0x1
XOR EAX,EAX
PUSH R10
CALL 0x00139240
ADD RSP,0x10
MOV RDI,qword ptr [RBX]
LEA RDX,[0x1df4fc]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00139240
MOV RDI,qword ptr [RBX]
CALL 0x001394b0
LAB_0017cf28:
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1f38de]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x0017d046
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1f5464]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x0017d065
LEA RDI,[RBP + -0x508]
CALL 0x0013d9b1
TEST RAX,RAX
JZ 0x0017d084
MOV RSI,qword ptr [0x0051a728]
MOV RDX,qword ptr [0x0051b768]
MOV RCX,qword ptr [0x0051a720]
MOV R9D,dword ptr [0x0051b758]
LEA R8,[0x4a0a10]
LEA RDI,[RBP + -0x508]
PUSH 0x20000
PUSH qword ptr [0x0051b760]
CALL 0x0013ac6c
ADD RSP,0x10
TEST RAX,RAX
JZ 0x0017d09c
LEA RSI,[0x1f5573]
LEA RDI,[RBP + -0x508]
CALL 0x0013ba15
TEST RAX,RAX
JZ 0x0017d0b4
MOV RBX,RAX
MOV RDI,RAX
CALL 0x0013b510
TEST EAX,EAX
JNZ 0x0017d0d3
MOV RDI,RBX
CALL 0x0013bc81
CMP EAX,0x1
JNZ 0x0017d0f3
MOV RDI,RBX
CALL 0x0013b639
LEA RDI,[RBP + -0x508]
CALL 0x0013b059
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1f3fff]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x0017d10b
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x0017d12a
ADD RSP,0x508
POP RBX
POP RBP
RET
LAB_0017d046:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x4850
CALL 0x0013bb30
LAB_0017d065:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x4858
CALL 0x0013bb30
LAB_0017d084:
LEA RDI,[0x1dedac]
LEA RDX,[0x1f27cc]
MOV ESI,0x485a
CALL 0x0013bb30
LAB_0017d09c:
LEA RDI,[0x1dedac]
LEA RDX,[0x1f54fb]
MOV ESI,0x485e
CALL 0x0013bb30
LAB_0017d0b4:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1deb0a]
MOV ESI,0x4861
CALL 0x0013bb30
LAB_0017d0d3:
MOV RDI,RBX
CALL 0x0013bbbe
LEA RDI,[0x1dedac]
LEA RDX,[0x1ea967]
MOV ESI,0x4864
CALL 0x0013bb30
LAB_0017d0f3:
LEA RDI,[0x1dedac]
LEA RDX,[0x1e102a]
MOV ESI,0x4867
CALL 0x0013bb30
LAB_0017d10b:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x486e
CALL 0x0013bb30
LAB_0017d12a:
CALL 0x00139290
|
void test_bug44495(void)
{
int *puVar1;
int iVar2;
long lVar3;
long in_FS_OFFSET;
int1 local_510 [1272];
long local_18;
puVar1 = PTR_stdout_0049ffc0;
local_18 = *(long *)(in_FS_OFFSET + 0x28);
if (opt_silent < '\x02') {
__fprintf_chk(*(int8 *)PTR_stdout_0049ffc0,1,"\n\n#####################################\n"
);
iVar2 = test_count;
test_count = test_count + 1;
__fprintf_chk(*(int8 *)puVar1,1,"%u of (%u/%u): %s",iVar2,iter_count,opt_count,
"test_44495");
__fprintf_chk(*(int8 *)puVar1,1," \n#####################################\n");
fflush(*(FILE **)puVar1);
}
iVar2 = wrap_mysql_query(mysql,"DROP PROCEDURE IF EXISTS p1");
if (iVar2 != 0) {
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4850,"r == 0");
}
iVar2 = wrap_mysql_query(mysql,
"CREATE PROCEDURE p1(IN arg VARCHAR(25)) BEGIN SET @stmt = CONCAT(\'SELECT \"\', arg, \'\"\'); PREPARE ps1 FROM @stmt; EXECUTE ps1; DROP PREPARE ps1;END;"
);
if (iVar2 != 0) {
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4858,"r == 0");
}
lVar3 = mysql_client_init(local_510);
if (lVar3 == 0) {
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x485a,
"mysql_client_init(&con)");
}
lVar3 = wrap_mysql_real_connect
(local_510,opt_host,opt_user,opt_password,current_db,opt_port,opt_unix_socket,
0x20000);
if (lVar3 == 0) {
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x485e,
"mysql_real_connect(&con, opt_host, opt_user, opt_password, current_db, opt_port, opt_unix_socket, CLIENT_MULTI_RESULTS)"
);
}
lVar3 = mysql_simple_prepare(local_510,"CALL p1(\'abc\')");
if (lVar3 == 0) {
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4861,"stmt != 0");
}
iVar2 = wrap_mysql_stmt_execute(lVar3);
if (iVar2 != 0) {
print_st_error(lVar3);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4864,"rc == 0");
}
iVar2 = my_process_stmt_result(lVar3);
if (iVar2 == 1) {
wrap_mysql_stmt_close(lVar3);
wrap_mysql_close(local_510);
iVar2 = wrap_mysql_query(mysql,"DROP PROCEDURE p1");
if (iVar2 != 0) {
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x486e,"r == 0");
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_18) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4867,"rc == 1");
}
| |
33,853 | reset_events_stages_history_long() | eloqsql/storage/perfschema/pfs_events_stages.cc | void reset_events_stages_history_long(void)
{
PFS_atomic::store_u32(&events_stages_history_long_index.m_u32, 0);
events_stages_history_long_full= false;
PFS_events_stages *pfs= events_stages_history_long_array;
PFS_events_stages *pfs_last= pfs + events_stages_history_long_size;
for ( ; pfs < pfs_last; pfs++)
pfs->m_class= NULL;
} | O0 | cpp | reset_events_stages_history_long():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x3b9ae1(%rip), %rdi # 0x4109c0
xorl %esi, %esi
callq 0x32120
movb $0x0, 0x3b9a93(%rip) # 0x410980
movq 0x3b9b0c(%rip), %rax # 0x410a00
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
imulq $0x68, 0x3b997c(%rip), %rcx # 0x410880
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x56f2f
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x8(%rbp)
jmp 0x56f0b
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _Z32reset_events_stages_history_longv:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rdi, events_stages_history_long_index; this
xor esi, esi; unsigned int *
call _ZN10PFS_atomic9store_u32EPjj; PFS_atomic::store_u32(uint *,uint)
mov cs:events_stages_history_long_full, 0
mov rax, cs:events_stages_history_long_array
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
imul rcx, cs:events_stages_history_long_size, 68h ; 'h'
add rax, rcx
mov [rbp+var_10], rax
loc_56F0B:
mov rax, [rbp+var_8]
cmp rax, [rbp+var_10]
jnb short loc_56F2F
mov rax, [rbp+var_8]
mov qword ptr [rax+30h], 0
mov rax, [rbp+var_8]
add rax, 68h ; 'h'
mov [rbp+var_8], rax
jmp short loc_56F0B
loc_56F2F:
add rsp, 10h
pop rbp
retn
| char *reset_events_stages_history_long(void)
{
char *result; // rax
char *v1; // [rsp+0h] [rbp-10h]
char *v2; // [rsp+8h] [rbp-8h]
PFS_atomic::store_u32((PFS_atomic *)&events_stages_history_long_index, 0LL);
events_stages_history_long_full = 0;
v2 = (char *)events_stages_history_long_array;
v1 = (char *)events_stages_history_long_array + 104 * events_stages_history_long_size;
while ( 1 )
{
result = v2;
if ( v2 >= v1 )
break;
*((_QWORD *)v2 + 6) = 0LL;
v2 += 104;
}
return result;
}
| reset_events_stages_history_long:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RDI,[0x5109c0]
XOR ESI,ESI
CALL 0x00132120
MOV byte ptr [0x00510980],0x0
MOV RAX,qword ptr [0x00510a00]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
IMUL RCX,qword ptr [0x00510880],0x68
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
LAB_00156f0b:
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x10]
JNC 0x00156f2f
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x68
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00156f0b
LAB_00156f2f:
ADD RSP,0x10
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* reset_events_stages_history_long() */
void reset_events_stages_history_long(void)
{
ulong uVar1;
ulong local_10;
PFS_atomic::store_u32((uint *)events_stages_history_long_index,0);
events_stages_history_long_full = 0;
uVar1 = events_stages_history_long_array + events_stages_history_long_size * 0x68;
for (local_10 = events_stages_history_long_array; local_10 < uVar1; local_10 = local_10 + 0x68) {
*(int8 *)(local_10 + 0x30) = 0;
}
return;
}
| |
33,854 | insert_events_stages_history_long(PFS_events_stages*) | eloqsql/storage/perfschema/pfs_events_stages.cc | void insert_events_stages_history_long(PFS_events_stages *stage)
{
if (unlikely(events_stages_history_long_size == 0))
return;
assert(events_stages_history_long_array != NULL);
uint index= PFS_atomic::add_u32(&events_stages_history_long_index.m_u32, 1);
index= index % events_stages_history_long_size;
if (index == 0)
events_stages_history_long_full= true;
/* See related comment in insert_events_stages_history. */
copy_events_stages(&events_stages_history_long_array[index], stage);
} | O0 | cpp | insert_events_stages_history_long(PFS_events_stages*):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, 0x3b8ebc(%rip) # 0x40d880
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x549d3
jmp 0x54a21
leaq 0x3b8fe6(%rip), %rdi # 0x40d9c0
movl $0x1, %esi
callq 0x37ac0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x3b8e8b(%rip) # 0x40d880
movl %edx, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x54a07
movb $0x1, 0x3b8f79(%rip) # 0x40d980
movq 0x3b8ff2(%rip), %rdi # 0x40da00
movl -0xc(%rbp), %eax
imulq $0x68, %rax, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x54980
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _Z33insert_events_stages_history_longP17PFS_events_stages:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
cmp cs:events_stages_history_long_size, 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_549D3
jmp short loc_54A21
loc_549D3:
lea rdi, events_stages_history_long_index; this
mov esi, (offset dword_0+1); unsigned int *
call _ZN10PFS_atomic7add_u32EPjj; PFS_atomic::add_u32(uint *,uint)
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
xor ecx, ecx
mov edx, ecx
div cs:events_stages_history_long_size
mov eax, edx
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jnz short loc_54A07
mov cs:events_stages_history_long_full, 1
loc_54A07:
mov rdi, cs:events_stages_history_long_array
mov eax, [rbp+var_C]
imul rax, 68h ; 'h'
add rdi, rax
mov rsi, [rbp+var_8]
call _ZL18copy_events_stagesP17PFS_events_stagesPKS_; copy_events_stages(PFS_events_stages *,PFS_events_stages const*)
loc_54A21:
add rsp, 10h
pop rbp
retn
| long long insert_events_stages_history_long(long long a1)
{
long long result; // rax
unsigned int v2; // [rsp+4h] [rbp-Ch]
result = events_stages_history_long_size == 0;
if ( events_stages_history_long_size )
{
v2 = (unsigned int)PFS_atomic::add_u32(
(PFS_atomic *)&events_stages_history_long_index,
(unsigned int *)((char *)&dword_0 + 1))
% events_stages_history_long_size;
if ( !v2 )
events_stages_history_long_full = 1;
return copy_events_stages(104LL * v2 + events_stages_history_long_array, a1);
}
return result;
}
| insert_events_stages_history_long:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
CMP qword ptr [0x0050d880],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001549d3
JMP 0x00154a21
LAB_001549d3:
LEA RDI,[0x50d9c0]
MOV ESI,0x1
CALL 0x00137ac0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
XOR ECX,ECX
MOV EDX,ECX
DIV qword ptr [0x0050d880]
MOV EAX,EDX
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x00154a07
MOV byte ptr [0x0050d980],0x1
LAB_00154a07:
MOV RDI,qword ptr [0x0050da00]
MOV EAX,dword ptr [RBP + -0xc]
IMUL RAX,RAX,0x68
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00154980
LAB_00154a21:
ADD RSP,0x10
POP RBP
RET
|
/* insert_events_stages_history_long(PFS_events_stages*) */
void insert_events_stages_history_long(PFS_events_stages *param_1)
{
uint uVar1;
if (events_stages_history_long_size != 0) {
uVar1 = PFS_atomic::add_u32((uint *)events_stages_history_long_index,1);
if ((int)((ulong)uVar1 % events_stages_history_long_size) == 0) {
events_stages_history_long_full = 1;
}
copy_events_stages((PFS_events_stages *)
(events_stages_history_long_array +
((ulong)uVar1 % events_stages_history_long_size & 0xffffffff) * 0x68),param_1
);
}
return;
}
| |
33,855 | insert_events_stages_history_long(PFS_events_stages*) | eloqsql/storage/perfschema/pfs_events_stages.cc | void insert_events_stages_history_long(PFS_events_stages *stage)
{
if (unlikely(events_stages_history_long_size == 0))
return;
assert(events_stages_history_long_array != NULL);
uint index= PFS_atomic::add_u32(&events_stages_history_long_index.m_u32, 1);
index= index % events_stages_history_long_size;
if (index == 0)
events_stages_history_long_full= true;
/* See related comment in insert_events_stages_history. */
copy_events_stages(&events_stages_history_long_array[index], stage);
} | O3 | cpp | insert_events_stages_history_long(PFS_events_stages*):
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0x3a54e9(%rip) # 0x3d05c0
je 0x2b119
movq %rdi, %rsi
movl $0x1, %eax
lock
xaddl %eax, 0x3a5617(%rip) # 0x3d0700
xorl %edx, %edx
divq 0x3a54ce(%rip) # 0x3d05c0
testq %rdx, %rdx
jne 0x2b0fe
movb $0x1, 0x3a55c2(%rip) # 0x3d06c0
imulq $0x68, %rdx, %rdi
addq 0x3a5637(%rip), %rdi # 0x3d0740
movabsq $0x68, %rdx
popq %rbp
jmp 0x26290
popq %rbp
retq
| _Z33insert_events_stages_history_longP17PFS_events_stages:
push rbp
mov rbp, rsp
cmp cs:events_stages_history_long_size, 0
jz short loc_2B119
mov rsi, rdi
mov eax, 1
lock xadd cs:events_stages_history_long_index, eax
xor edx, edx
div cs:events_stages_history_long_size
test rdx, rdx
jnz short loc_2B0FE
mov cs:events_stages_history_long_full, 1
loc_2B0FE:
imul rdi, rdx, 68h ; 'h'
add rdi, cs:events_stages_history_long_array
mov rdx, 68h ; 'h'
pop rbp
jmp _memcpy
loc_2B119:
pop rbp
retn
| long long insert_events_stages_history_long(long long a1)
{
unsigned long long v1; // rdx
long long result; // rax
if ( events_stages_history_long_size )
{
v1 = (unsigned int)_InterlockedExchangeAdd(&events_stages_history_long_index, 1u)
% (unsigned long long)events_stages_history_long_size;
if ( !v1 )
events_stages_history_long_full = 1;
return memcpy(events_stages_history_long_array + 104 * v1, a1, 104LL);
}
return result;
}
| insert_events_stages_history_long:
PUSH RBP
MOV RBP,RSP
CMP qword ptr [0x004d05c0],0x0
JZ 0x0012b119
MOV RSI,RDI
MOV EAX,0x1
XADD.LOCK dword ptr [0x004d0700],EAX
XOR EDX,EDX
DIV qword ptr [0x004d05c0]
TEST RDX,RDX
JNZ 0x0012b0fe
MOV byte ptr [0x004d06c0],0x1
LAB_0012b0fe:
IMUL RDI,RDX,0x68
ADD RDI,qword ptr [0x004d0740]
MOV RDX,0x68
POP RBP
JMP 0x00126290
LAB_0012b119:
POP RBP
RET
|
/* insert_events_stages_history_long(PFS_events_stages*) */
void insert_events_stages_history_long(PFS_events_stages *param_1)
{
ulong uVar1;
if (events_stages_history_long_size != 0) {
LOCK();
UNLOCK();
uVar1 = (ulong)events_stages_history_long_index;
if (uVar1 % events_stages_history_long_size == 0) {
events_stages_history_long_full = 1;
}
events_stages_history_long_index = events_stages_history_long_index + 1;
memcpy((void *)((uVar1 % events_stages_history_long_size) * 0x68 +
events_stages_history_long_array),param_1,0x68);
return;
}
return;
}
| |
33,856 | rb_delete_fixup | eloqsql/mysys/tree.c | static void rb_delete_fixup(TREE *tree, TREE_ELEMENT ***parent)
{
TREE_ELEMENT *x,*w,*par;
x= **parent;
while (x != tree->root && x->colour == BLACK)
{
if (x == (par=parent[-1][0])->left)
{
w=par->right;
if (w->colour == RED)
{
w->colour=BLACK;
par->colour=RED;
left_rotate(parent[-1],par);
parent[0]= &w->left;
*++parent= &par->left;
w=par->right;
}
if (w->left->colour == BLACK && w->right->colour == BLACK)
{
w->colour=RED;
x=par;
parent--;
}
else
{
if (w->right->colour == BLACK)
{
w->left->colour=BLACK;
w->colour=RED;
right_rotate(&par->right,w);
w=par->right;
}
w->colour=par->colour;
par->colour=BLACK;
w->right->colour=BLACK;
left_rotate(parent[-1],par);
x=tree->root;
break;
}
}
else
{
w=par->left;
if (w->colour == RED)
{
w->colour=BLACK;
par->colour=RED;
right_rotate(parent[-1],par);
parent[0]= &w->right;
*++parent= &par->right;
w=par->left;
}
if (w->right->colour == BLACK && w->left->colour == BLACK)
{
w->colour=RED;
x=par;
parent--;
}
else
{
if (w->left->colour == BLACK)
{
w->right->colour=BLACK;
w->colour=RED;
left_rotate(&par->left,w);
w=par->left;
}
w->colour=par->colour;
par->colour=BLACK;
w->left->colour=BLACK;
right_rotate(parent[-1],par);
x=tree->root;
break;
}
}
}
x->colour=BLACK;
} | O0 | c | rb_delete_fixup:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0x29(%rbp)
je 0x33063
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
shrl $0x1f, %eax
cmpl $0x1, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x3306f
jmp 0x333da
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x8(%rcx), %rcx
movq (%rcx), %rcx
movq %rcx, -0x28(%rbp)
cmpq (%rcx), %rax
jne 0x33233
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x3310e
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq -0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x34010
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x10(%rbp)
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %eax
shrl $0x1f, %eax
cmpl $0x1, %eax
jne 0x3315f
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %eax
shrl $0x1f, %eax
cmpl $0x1, %eax
jne 0x3315f
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0x3322e
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %eax
shrl $0x1f, %eax
cmpl $0x1, %eax
jne 0x331bb
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x20(%rbp), %rsi
callq 0x34050
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %edx
shrl $0x1f, %edx
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq -0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x34010
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x333da
jmp 0x333d5
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x332bc
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq -0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x34050
movq -0x20(%rbp), %rcx
addq $0x8, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
addq $0x8, %rcx
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x10(%rbp)
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %eax
shrl $0x1f, %eax
cmpl $0x1, %eax
jne 0x3330d
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %eax
shrl $0x1f, %eax
cmpl $0x1, %eax
jne 0x3330d
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0x333d3
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %eax
shrl $0x1f, %eax
cmpl $0x1, %eax
jne 0x33364
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x34010
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %edx
shrl $0x1f, %edx
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq -0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x34050
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x333da
jmp 0x333d5
jmp 0x3303e
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| rb_delete_fixup:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax]
mov [rbp+var_18], rax
loc_3303E:
mov rcx, [rbp+var_18]
mov rdx, [rbp+var_8]
xor eax, eax
cmp rcx, [rdx]
mov [rbp+var_29], al
jz short loc_33063
mov rax, [rbp+var_18]
mov eax, [rax+10h]
shr eax, 1Fh
cmp eax, 1
setz al
mov [rbp+var_29], al
loc_33063:
mov al, [rbp+var_29]
test al, 1
jnz short loc_3306F
jmp loc_333DA
loc_3306F:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx-8]
mov rcx, [rcx]
mov [rbp+var_28], rcx
cmp rax, [rcx]
jnz loc_33233
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov eax, [rax+10h]
shr eax, 1Fh
cmp eax, 0
jnz short loc_3310E
mov rax, [rbp+var_20]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
mov rax, [rbp+var_28]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 0
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov rdi, [rax-8]
mov rsi, [rbp+var_28]
call left_rotate
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 8
mov [rbp+var_10], rdx
mov [rax+8], rcx
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov [rbp+var_20], rax
loc_3310E:
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax+10h]
shr eax, 1Fh
cmp eax, 1
jnz short loc_3315F
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov eax, [rax+10h]
shr eax, 1Fh
cmp eax, 1
jnz short loc_3315F
mov rax, [rbp+var_20]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 0
mov [rax+10h], ecx
mov rax, [rbp+var_28]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_10], rax
jmp loc_3322E
loc_3315F:
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov eax, [rax+10h]
shr eax, 1Fh
cmp eax, 1
jnz short loc_331BB
mov rax, [rbp+var_20]
mov rax, [rax]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
mov rax, [rbp+var_20]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 0
mov [rax+10h], ecx
mov rdi, [rbp+var_28]
add rdi, 8
mov rsi, [rbp+var_20]
call right_rotate
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov [rbp+var_20], rax
loc_331BB:
mov rax, [rbp+var_28]
mov edx, [rax+10h]
shr edx, 1Fh
mov rax, [rbp+var_20]
mov ecx, [rax+10h]
and edx, 1
shl edx, 1Fh
and ecx, 7FFFFFFFh
or ecx, edx
mov [rax+10h], ecx
mov rax, [rbp+var_28]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov rdi, [rax-8]
mov rsi, [rbp+var_28]
call left_rotate
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
jmp loc_333DA
loc_3322E:
jmp loc_333D5
loc_33233:
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov eax, [rax+10h]
shr eax, 1Fh
cmp eax, 0
jnz short loc_332BC
mov rax, [rbp+var_20]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
mov rax, [rbp+var_28]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 0
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov rdi, [rax-8]
mov rsi, [rbp+var_28]
call right_rotate
mov rcx, [rbp+var_20]
add rcx, 8
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+var_28]
add rcx, 8
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 8
mov [rbp+var_10], rdx
mov [rax+8], rcx
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_20], rax
loc_332BC:
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov eax, [rax+10h]
shr eax, 1Fh
cmp eax, 1
jnz short loc_3330D
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax+10h]
shr eax, 1Fh
cmp eax, 1
jnz short loc_3330D
mov rax, [rbp+var_20]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 0
mov [rax+10h], ecx
mov rax, [rbp+var_28]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_10], rax
jmp loc_333D3
loc_3330D:
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax+10h]
shr eax, 1Fh
cmp eax, 1
jnz short loc_33364
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
mov rax, [rbp+var_20]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 0
mov [rax+10h], ecx
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
call left_rotate
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_20], rax
loc_33364:
mov rax, [rbp+var_28]
mov edx, [rax+10h]
shr edx, 1Fh
mov rax, [rbp+var_20]
mov ecx, [rax+10h]
and edx, 1
shl edx, 1Fh
and ecx, 7FFFFFFFh
or ecx, edx
mov [rax+10h], ecx
mov rax, [rbp+var_28]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
mov rax, [rbp+var_20]
mov rax, [rax]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov rdi, [rax-8]
mov rsi, [rbp+var_28]
call right_rotate
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_333DA
loc_333D3:
jmp short $+2
loc_333D5:
jmp loc_3303E
loc_333DA:
mov rax, [rbp+var_18]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
add rsp, 30h
pop rbp
retn
| long long * rb_delete_fixup(long long **a1, _QWORD **a2)
{
_QWORD *v2; // rax
_QWORD *v3; // rax
long long *result; // rax
bool v5; // [rsp+7h] [rbp-29h]
long long *v6; // [rsp+8h] [rbp-28h]
long long v7; // [rsp+10h] [rbp-20h]
long long v8; // [rsp+10h] [rbp-20h]
long long *v9; // [rsp+18h] [rbp-18h]
_QWORD *v10; // [rsp+20h] [rbp-10h]
v10 = a2;
v9 = (long long *)**a2;
while ( 1 )
{
v5 = 0;
if ( v9 != *a1 )
v5 = *((_DWORD *)v9 + 4) >> 31 == 1;
if ( !v5 )
break;
v6 = *(long long **)*(v10 - 1);
if ( v9 == (long long *)*v6 )
{
v7 = v6[1];
if ( *(int *)(v7 + 16) >= 0 )
{
*(_DWORD *)(v7 + 16) = *(_DWORD *)(v7 + 16) & 0x7FFFFFFF | 0x80000000;
*((_DWORD *)v6 + 4) &= ~0x80000000;
left_rotate(*(v10 - 1), v6);
*v10 = v7;
v2 = v10++;
v2[1] = v6;
v7 = v6[1];
}
if ( *(_DWORD *)(*(_QWORD *)v7 + 16LL) >> 31 != 1 || *(_DWORD *)(*(_QWORD *)(v7 + 8) + 16LL) >> 31 != 1 )
{
if ( *(_DWORD *)(*(_QWORD *)(v7 + 8) + 16LL) >> 31 == 1 )
{
*(_DWORD *)(*(_QWORD *)v7 + 16LL) = *(_DWORD *)(*(_QWORD *)v7 + 16LL) & 0x7FFFFFFF | 0x80000000;
*(_DWORD *)(v7 + 16) &= ~0x80000000;
right_rotate(v6 + 1, v7);
v7 = v6[1];
}
*(_DWORD *)(v7 + 16) = (*((_DWORD *)v6 + 4) >> 31 << 31) | *(_DWORD *)(v7 + 16) & 0x7FFFFFFF;
*((_DWORD *)v6 + 4) = v6[2] & 0x7FFFFFFF | 0x80000000;
*(_DWORD *)(*(_QWORD *)(v7 + 8) + 16LL) = *(_DWORD *)(*(_QWORD *)(v7 + 8) + 16LL) & 0x7FFFFFFF | 0x80000000;
left_rotate(*(v10 - 1), v6);
v9 = *a1;
break;
}
*(_DWORD *)(v7 + 16) &= ~0x80000000;
v9 = v6;
--v10;
}
else
{
v8 = *v6;
if ( *(int *)(*v6 + 16) >= 0 )
{
*(_DWORD *)(v8 + 16) = *(_DWORD *)(v8 + 16) & 0x7FFFFFFF | 0x80000000;
*((_DWORD *)v6 + 4) &= ~0x80000000;
right_rotate(*(v10 - 1), v6);
*v10 = v8 + 8;
v3 = v10++;
v3[1] = v6 + 1;
v8 = *v6;
}
if ( *(_DWORD *)(*(_QWORD *)(v8 + 8) + 16LL) >> 31 != 1 || *(_DWORD *)(*(_QWORD *)v8 + 16LL) >> 31 != 1 )
{
if ( *(_DWORD *)(*(_QWORD *)v8 + 16LL) >> 31 == 1 )
{
*(_DWORD *)(*(_QWORD *)(v8 + 8) + 16LL) = *(_DWORD *)(*(_QWORD *)(v8 + 8) + 16LL) & 0x7FFFFFFF | 0x80000000;
*(_DWORD *)(v8 + 16) &= ~0x80000000;
left_rotate(v6, v8);
v8 = *v6;
}
*(_DWORD *)(v8 + 16) = (*((_DWORD *)v6 + 4) >> 31 << 31) | *(_DWORD *)(v8 + 16) & 0x7FFFFFFF;
*((_DWORD *)v6 + 4) = v6[2] & 0x7FFFFFFF | 0x80000000;
*(_DWORD *)(*(_QWORD *)v8 + 16LL) = *(_DWORD *)(*(_QWORD *)v8 + 16LL) & 0x7FFFFFFF | 0x80000000;
right_rotate(*(v10 - 1), v6);
v9 = *a1;
break;
}
*(_DWORD *)(v8 + 16) &= ~0x80000000;
v9 = v6;
--v10;
}
}
result = v9;
*((_DWORD *)v9 + 4) = v9[2] & 0x7FFFFFFF | 0x80000000;
return result;
}
| rb_delete_fixup:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_0013303e:
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP RCX,qword ptr [RDX]
MOV byte ptr [RBP + -0x29],AL
JZ 0x00133063
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x10]
SHR EAX,0x1f
CMP EAX,0x1
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_00133063:
MOV AL,byte ptr [RBP + -0x29]
TEST AL,0x1
JNZ 0x0013306f
JMP 0x001333da
LAB_0013306f:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + -0x8]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RBP + -0x28],RCX
CMP RAX,qword ptr [RCX]
JNZ 0x00133233
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x10]
SHR EAX,0x1f
CMP EAX,0x0
JNZ 0x0013310e
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x0
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + -0x8]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00134010
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RBP + -0x10],RDX
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
LAB_0013310e:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x10]
SHR EAX,0x1f
CMP EAX,0x1
JNZ 0x0013315f
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RAX + 0x10]
SHR EAX,0x1f
CMP EAX,0x1
JNZ 0x0013315f
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x0
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,-0x8
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0013322e
LAB_0013315f:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RAX + 0x10]
SHR EAX,0x1f
CMP EAX,0x1
JNZ 0x001331bb
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x0
MOV dword ptr [RAX + 0x10],ECX
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x8
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00134050
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
LAB_001331bb:
MOV RAX,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RAX + 0x10]
SHR EDX,0x1f
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x10]
AND EDX,0x1
SHL EDX,0x1f
AND ECX,0x7fffffff
OR ECX,EDX
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + -0x8]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00134010
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001333da
LAB_0013322e:
JMP 0x001333d5
LAB_00133233:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x10]
SHR EAX,0x1f
CMP EAX,0x0
JNZ 0x001332bc
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x0
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + -0x8]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00134050
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,0x8
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,0x8
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RBP + -0x10],RDX
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
LAB_001332bc:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RAX + 0x10]
SHR EAX,0x1f
CMP EAX,0x1
JNZ 0x0013330d
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x10]
SHR EAX,0x1f
CMP EAX,0x1
JNZ 0x0013330d
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x0
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,-0x8
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001333d3
LAB_0013330d:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x10]
SHR EAX,0x1f
CMP EAX,0x1
JNZ 0x00133364
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x0
MOV dword ptr [RAX + 0x10],ECX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00134010
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
LAB_00133364:
MOV RAX,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RAX + 0x10]
SHR EDX,0x1f
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x10]
AND EDX,0x1
SHL EDX,0x1f
AND ECX,0x7fffffff
OR ECX,EDX
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + -0x8]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00134050
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001333da
LAB_001333d3:
JMP 0x001333d5
LAB_001333d5:
JMP 0x0013303e
LAB_001333da:
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
ADD RSP,0x30
POP RBP
RET
|
void rb_delete_fixup(long *param_1,long *param_2)
{
long *plVar1;
bool bVar2;
long *local_28;
long *local_20;
long *local_18;
local_20 = *(long **)*param_2;
local_18 = param_2;
do {
bVar2 = false;
if (local_20 != (long *)*param_1) {
bVar2 = (int)local_20[2] < 0;
}
if (!bVar2) goto LAB_001333da;
plVar1 = *(long **)local_18[-1];
if (local_20 == (long *)*plVar1) {
local_28 = (long *)plVar1[1];
if (-1 < (int)local_28[2]) {
*(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff | 0x80000000;
*(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff;
left_rotate(local_18[-1],plVar1);
*local_18 = (long)local_28;
local_18[1] = (long)plVar1;
local_28 = (long *)plVar1[1];
local_18 = local_18 + 1;
}
if ((-1 < *(int *)(*local_28 + 0x10)) || (-1 < *(int *)(local_28[1] + 0x10))) {
if (*(int *)(local_28[1] + 0x10) < 0) {
*(uint *)(*local_28 + 0x10) = *(uint *)(*local_28 + 0x10) & 0x7fffffff | 0x80000000;
*(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff;
right_rotate(plVar1 + 1,local_28);
local_28 = (long *)plVar1[1];
}
*(uint *)(local_28 + 2) =
*(uint *)(local_28 + 2) & 0x7fffffff | *(uint *)(plVar1 + 2) & 0x80000000;
*(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff | 0x80000000;
*(uint *)(local_28[1] + 0x10) = *(uint *)(local_28[1] + 0x10) & 0x7fffffff | 0x80000000;
left_rotate(local_18[-1],plVar1);
local_20 = (long *)*param_1;
LAB_001333da:
*(uint *)(local_20 + 2) = *(uint *)(local_20 + 2) & 0x7fffffff | 0x80000000;
return;
}
*(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff;
}
else {
local_28 = (long *)*plVar1;
if (-1 < (int)local_28[2]) {
*(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff | 0x80000000;
*(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff;
right_rotate(local_18[-1],plVar1);
*local_18 = (long)(local_28 + 1);
local_18[1] = (long)(plVar1 + 1);
local_28 = (long *)*plVar1;
local_18 = local_18 + 1;
}
if ((-1 < *(int *)(local_28[1] + 0x10)) || (-1 < *(int *)(*local_28 + 0x10))) {
if (*(int *)(*local_28 + 0x10) < 0) {
*(uint *)(local_28[1] + 0x10) = *(uint *)(local_28[1] + 0x10) & 0x7fffffff | 0x80000000;
*(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff;
left_rotate(plVar1,local_28);
local_28 = (long *)*plVar1;
}
*(uint *)(local_28 + 2) =
*(uint *)(local_28 + 2) & 0x7fffffff | *(uint *)(plVar1 + 2) & 0x80000000;
*(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff | 0x80000000;
*(uint *)(*local_28 + 0x10) = *(uint *)(*local_28 + 0x10) & 0x7fffffff | 0x80000000;
right_rotate(local_18[-1],plVar1);
local_20 = (long *)*param_1;
goto LAB_001333da;
}
*(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff;
}
local_18 = local_18 + -1;
local_20 = plVar1;
} while( true );
}
| |
33,857 | maria_ftparser_call_initializer | eloqsql/storage/maria/ma_ft_parser.c | MYSQL_FTPARSER_PARAM *maria_ftparser_call_initializer(MARIA_HA *info,
uint keynr, uint paramnr)
{
uint32 ftparser_nr;
struct st_mysql_ftparser *parser;
if (!maria_ftparser_alloc_param(info))
return 0;
if (keynr == NO_SUCH_KEY)
{
ftparser_nr= 0;
parser= &ft_default_parser;
}
else
{
ftparser_nr= info->s->keyinfo[keynr].ftkey_nr;
parser= info->s->keyinfo[keynr].parser;
}
DBUG_ASSERT(paramnr < MAX_PARAM_NR);
ftparser_nr= ftparser_nr*MAX_PARAM_NR + paramnr;
if (! info->ftparser_param[ftparser_nr].mysql_add_word)
{
/* Note, that mysql_add_word is used here as a flag:
mysql_add_word == 0 - parser is not initialized
mysql_add_word != 0 - parser is initialized, or no
initialization needed. */
info->ftparser_param[ftparser_nr].mysql_add_word=
(int (*)(struct st_mysql_ftparser_param *, const char *,
int, MYSQL_FTPARSER_BOOLEAN_INFO *)) 1;
if (parser->init && parser->init(&info->ftparser_param[ftparser_nr]))
return 0;
}
return &info->ftparser_param[ftparser_nr];
} | O0 | c | maria_ftparser_call_initializer:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4b950
cmpq $0x0, %rax
jne 0x4b9fe
movq $0x0, -0x8(%rbp)
jmp 0x4baff
cmpl $-0x1, -0x14(%rbp)
jne 0x4ba18
movl $0x0, -0x1c(%rbp)
leaq 0x27276e(%rip), %rax # 0x2be180
movq %rax, -0x28(%rbp)
jmp 0x4ba62
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movl 0xbc(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movq 0xd0(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x4ba64
jmp 0x4ba66
movl -0x1c(%rbp), %eax
shll %eax
addl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x368(%rax), %rax
movl -0x1c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0x4bae6
movq -0x10(%rbp), %rax
movq 0x368(%rax), %rax
movl -0x1c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x1, %ecx
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x4bae4
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x368(%rcx), %rdi
movl -0x1c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rdi
callq *%rax
cmpl $0x0, %eax
je 0x4bae4
movq $0x0, -0x8(%rbp)
jmp 0x4baff
jmp 0x4bae6
movq -0x10(%rbp), %rax
movq 0x368(%rax), %rax
movl -0x1c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| maria_ftparser_call_initializer:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov rdi, [rbp+var_10]
call maria_ftparser_alloc_param
cmp rax, 0
jnz short loc_4B9FE
mov [rbp+var_8], 0
jmp loc_4BAFF
loc_4B9FE:
cmp [rbp+var_14], 0FFFFFFFFh
jnz short loc_4BA18
mov [rbp+var_1C], 0
lea rax, ft_default_parser
mov [rbp+var_28], rax
jmp short loc_4BA62
loc_4BA18:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+570h]
mov ecx, [rbp+var_14]
imul rcx, 118h
add rax, rcx
mov eax, [rax+0BCh]
mov [rbp+var_1C], eax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+570h]
mov ecx, [rbp+var_14]
imul rcx, 118h
add rax, rcx
mov rax, [rax+0D0h]
mov [rbp+var_28], rax
loc_4BA62:
jmp short $+2
loc_4BA64:
jmp short $+2
loc_4BA66:
mov eax, [rbp+var_1C]
shl eax, 1
add eax, [rbp+var_18]
mov [rbp+var_1C], eax
mov rax, [rbp+var_10]
mov rax, [rax+368h]
mov ecx, [rbp+var_1C]
shl rcx, 6
add rax, rcx
cmp qword ptr [rax+8], 0
jnz short loc_4BAE6
mov rax, [rbp+var_10]
mov rax, [rax+368h]
mov ecx, [rbp+var_1C]
shl rcx, 6
add rax, rcx
mov ecx, 1
mov [rax+8], rcx
mov rax, [rbp+var_28]
cmp qword ptr [rax+10h], 0
jz short loc_4BAE4
mov rax, [rbp+var_28]
mov rax, [rax+10h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+368h]
mov ecx, [rbp+var_1C]
shl rcx, 6
add rdi, rcx
call rax
cmp eax, 0
jz short loc_4BAE4
mov [rbp+var_8], 0
jmp short loc_4BAFF
loc_4BAE4:
jmp short $+2
loc_4BAE6:
mov rax, [rbp+var_10]
mov rax, [rax+368h]
mov ecx, [rbp+var_1C]
shl rcx, 6
add rax, rcx
mov [rbp+var_8], rax
loc_4BAFF:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| unsigned long long maria_ftparser_call_initializer(_QWORD *a1, unsigned int a2, int a3)
{
_QWORD *v4; // [rsp+8h] [rbp-28h]
int v5; // [rsp+14h] [rbp-1Ch]
unsigned int v6; // [rsp+14h] [rbp-1Ch]
if ( !maria_ftparser_alloc_param(a1) )
return 0LL;
if ( a2 == -1 )
{
v5 = 0;
v4 = &ft_default_parser;
}
else
{
v5 = *(_DWORD *)(280LL * a2 + *(_QWORD *)(*a1 + 1392LL) + 188);
v4 = *(_QWORD **)(280LL * a2 + *(_QWORD *)(*a1 + 1392LL) + 208);
}
v6 = a3 + 2 * v5;
if ( !*(_QWORD *)(((unsigned long long)v6 << 6) + a1[109] + 8)
&& (*(_QWORD *)(((unsigned long long)v6 << 6) + a1[109] + 8) = 1LL, v4[2])
&& ((unsigned int ( *)(unsigned long long))v4[2])(((unsigned long long)v6 << 6) + a1[109]) )
{
return 0LL;
}
else
{
return ((unsigned long long)v6 << 6) + a1[109];
}
}
| maria_ftparser_call_initializer:
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 RDI,qword ptr [RBP + -0x10]
CALL 0x0014b950
CMP RAX,0x0
JNZ 0x0014b9fe
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014baff
LAB_0014b9fe:
CMP dword ptr [RBP + -0x14],-0x1
JNZ 0x0014ba18
MOV dword ptr [RBP + -0x1c],0x0
LEA RAX,[0x3be180]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0014ba62
LAB_0014ba18:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0xbc]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0xd0]
MOV qword ptr [RBP + -0x28],RAX
LAB_0014ba62:
JMP 0x0014ba64
LAB_0014ba64:
JMP 0x0014ba66
LAB_0014ba66:
MOV EAX,dword ptr [RBP + -0x1c]
SHL EAX,0x1
ADD EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x368]
MOV ECX,dword ptr [RBP + -0x1c]
SHL RCX,0x6
ADD RAX,RCX
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x0014bae6
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x368]
MOV ECX,dword ptr [RBP + -0x1c]
SHL RCX,0x6
ADD RAX,RCX
MOV ECX,0x1
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0014bae4
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x368]
MOV ECX,dword ptr [RBP + -0x1c]
SHL RCX,0x6
ADD RDI,RCX
CALL RAX
CMP EAX,0x0
JZ 0x0014bae4
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014baff
LAB_0014bae4:
JMP 0x0014bae6
LAB_0014bae6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x368]
MOV ECX,dword ptr [RBP + -0x1c]
SHL RCX,0x6
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_0014baff:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long maria_ftparser_call_initializer(long *param_1,uint param_2,int param_3)
{
uint uVar1;
int iVar2;
long lVar3;
int1 *local_30;
int local_24;
long local_10;
lVar3 = maria_ftparser_alloc_param(param_1);
if (lVar3 == 0) {
local_10 = 0;
}
else {
if (param_2 == 0xffffffff) {
local_24 = 0;
local_30 = ft_default_parser;
}
else {
local_24 = *(int *)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xbc);
local_30 = *(int1 **)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xd0);
}
uVar1 = local_24 * 2 + param_3;
if (((*(long *)(param_1[0x6d] + (ulong)uVar1 * 0x40 + 8) == 0) &&
(*(int8 *)(param_1[0x6d] + (ulong)uVar1 * 0x40 + 8) = 1,
*(long *)(local_30 + 0x10) != 0)) &&
(iVar2 = (**(code **)(local_30 + 0x10))(param_1[0x6d] + (ulong)uVar1 * 0x40), iVar2 != 0)) {
local_10 = 0;
}
else {
local_10 = param_1[0x6d] + (ulong)uVar1 * 0x40;
}
}
return local_10;
}
| |
33,858 | maria_log_remove | eloqsql/storage/maria/unittest/ma_maria_log_cleanup.c | my_bool maria_log_remove(const char *testdir)
{
MY_DIR *dirp;
uint i;
MY_STAT stat_buff;
char file_name[FN_REFLEN];
/* Removes control file */
if (fn_format(file_name, CONTROL_FILE_BASE_NAME,
maria_data_root, "", MYF(MY_WME)) == NullS)
return 1;
if (my_stat(file_name, &stat_buff, MYF(0)) &&
my_delete(file_name, MYF(MY_WME)) != 0)
return 1;
/* Finds and removes transaction log files */
if (!(dirp = my_dir(maria_data_root, MYF(MY_DONT_SORT))))
return 1;
for (i= 0; i < dirp->number_of_files; i++)
{
char *file= dirp->dir_entry[i].name;
if (strncmp(file, "aria_log.", 9) == 0 &&
file[9] >= '0' && file[9] <= '9' &&
file[10] >= '0' && file[10] <= '9' &&
file[11] >= '0' && file[11] <= '9' &&
file[12] >= '0' && file[12] <= '9' &&
file[13] >= '0' && file[13] <= '9' &&
file[14] >= '0' && file[14] <= '9' &&
file[15] >= '0' && file[15] <= '9' &&
file[16] >= '0' && file[16] <= '9' &&
file[17] == '\0')
{
if (fn_format(file_name, file,
maria_data_root, "", MYF(MY_WME)) == NullS ||
my_delete(file_name, MYF(MY_WME)) != 0)
{
my_dirend(dirp);
return 1;
}
}
}
my_dirend(dirp);
if (testdir)
rmdir(testdir);
return 0;
} | O3 | c | maria_log_remove:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp # imm = 0x2A8
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq 0x3d26f5(%rip), %r15 # 0x405d10
movq (%r15), %rdx
leaq 0xad53e(%rip), %rsi # 0xe0b63
leaq 0xb4aca(%rip), %rcx # 0xe80f6
leaq -0x230(%rbp), %rdi
movl $0x10, %r8d
callq 0x98434
movb $0x1, %bl
testq %rax, %rax
je 0x3379e
leaq -0x230(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
xorl %edx, %edx
callq 0xa60c7
testq %rax, %rax
je 0x3367c
leaq -0x230(%rbp), %rdi
movl $0x10, %esi
callq 0xa1a24
testl %eax, %eax
jne 0x3379e
movq (%r15), %rdi
xorl %esi, %esi
callq 0xa5df9
testq %rax, %rax
je 0x3379e
movq %rax, %r15
movq %r14, -0x238(%rbp)
movl 0x8(%rax), %r12d
testl %r12d, %r12d
je 0x33783
xorl %r14d, %r14d
xorl %ebx, %ebx
movq (%r15), %rax
movq (%rax,%r14), %r13
movl $0x9, %edx
movq %r13, %rdi
leaq 0xad4b3(%rip), %rsi # 0xe0b74
callq 0x2a1d0
testl %eax, %eax
jne 0x33770
movb 0x9(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x33770
movb 0xa(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x33770
movb 0xb(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x33770
movb 0xc(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x33770
movb 0xd(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x33770
movb 0xe(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x33770
movb 0xf(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x33770
movb 0x10(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x33770
cmpb $0x0, 0x11(%r13)
jne 0x33770
leaq 0x3d25dc(%rip), %rax # 0x405d10
movq (%rax), %rdx
leaq -0x230(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
leaq 0xb49ab(%rip), %rcx # 0xe80f6
movl $0x10, %r8d
callq 0x98434
testq %rax, %rax
je 0x337c1
movl $0x10, %esi
movq %r12, %rdi
callq 0xa1a24
testl %eax, %eax
jne 0x337c1
movl 0x8(%r15), %r12d
incq %rbx
movl %r12d, %eax
addq $0x10, %r14
cmpq %rax, %rbx
jb 0x336ab
movq %r15, %rdi
callq 0xa5dc8
movq -0x238(%rbp), %rdi
testq %rdi, %rdi
je 0x3379c
callq 0x2a380
xorl %ebx, %ebx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x337cd
movl %ebx, %eax
addq $0x2a8, %rsp # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0xa5dc8
movb $0x1, %bl
jmp 0x3379e
callq 0x2a270
| maria_log_remove:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2A8h
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea r15, maria_data_root
mov rdx, [r15]
lea rsi, aAriaLogControl; "aria_log_control"
lea rcx, asc_E80F2+4; ""
lea rdi, [rbp+var_230]
mov r8d, 10h
call fn_format
mov bl, 1
test rax, rax
jz loc_3379E
lea rdi, [rbp+var_230]
lea rsi, [rbp+var_2C8]
xor edx, edx
call my_stat
test rax, rax
jz short loc_3367C
lea rdi, [rbp+var_230]
mov esi, 10h
call my_delete
test eax, eax
jnz loc_3379E
loc_3367C:
mov rdi, [r15]
xor esi, esi
call my_dir
test rax, rax
jz loc_3379E
mov r15, rax
mov [rbp+var_238], r14
mov r12d, [rax+8]
test r12d, r12d
jz loc_33783
xor r14d, r14d
xor ebx, ebx
loc_336AB:
mov rax, [r15]
mov r13, [rax+r14]
mov edx, 9
mov rdi, r13
lea rsi, aAriaLog; "aria_log."
call _strncmp
test eax, eax
jnz loc_33770
mov al, [r13+9]
add al, 0D0h
cmp al, 9
ja loc_33770
mov al, [r13+0Ah]
add al, 0D0h
cmp al, 9
ja loc_33770
mov al, [r13+0Bh]
add al, 0D0h
cmp al, 9
ja short loc_33770
mov al, [r13+0Ch]
add al, 0D0h
cmp al, 9
ja short loc_33770
mov al, [r13+0Dh]
add al, 0D0h
cmp al, 9
ja short loc_33770
mov al, [r13+0Eh]
add al, 0D0h
cmp al, 9
ja short loc_33770
mov al, [r13+0Fh]
add al, 0D0h
cmp al, 9
ja short loc_33770
mov al, [r13+10h]
add al, 0D0h
cmp al, 9
ja short loc_33770
cmp byte ptr [r13+11h], 0
jnz short loc_33770
lea rax, maria_data_root
mov rdx, [rax]
lea r12, [rbp+var_230]
mov rdi, r12
mov rsi, r13
lea rcx, asc_E80F2+4; ""
mov r8d, 10h
call fn_format
test rax, rax
jz short loc_337C1
mov esi, 10h
mov rdi, r12
call my_delete
test eax, eax
jnz short loc_337C1
mov r12d, [r15+8]
loc_33770:
inc rbx
mov eax, r12d
add r14, 10h
cmp rbx, rax
jb loc_336AB
loc_33783:
mov rdi, r15
call my_dirend
mov rdi, [rbp+var_238]
test rdi, rdi
jz short loc_3379C
call _rmdir
loc_3379C:
xor ebx, ebx
loc_3379E:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_337CD
mov eax, ebx
add rsp, 2A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_337C1:
mov rdi, r15
call my_dirend
mov bl, 1
jmp short loc_3379E
loc_337CD:
call ___stack_chk_fail
| long long maria_log_remove(long long a1)
{
unsigned long long i; // rbx
long long v2; // rax
long long v3; // rcx
long long v4; // r15
unsigned int v5; // r12d
long long v6; // r14
_BYTE *v7; // r13
_BYTE v9[144]; // [rsp+8h] [rbp-2C8h] BYREF
long long v10; // [rsp+98h] [rbp-238h]
_BYTE v11[512]; // [rsp+A0h] [rbp-230h] BYREF
unsigned long long v12; // [rsp+2A0h] [rbp-30h]
v12 = __readfsqword(0x28u);
LOBYTE(i) = 1;
if ( fn_format(v11, "aria_log_control", *(_QWORD *)&maria_data_root, "", 16LL)
&& (!my_stat(v11, v9, 0LL) || !(unsigned int)my_delete(v11, 16LL)) )
{
v2 = my_dir(*(_QWORD *)&maria_data_root, 0LL);
if ( v2 )
{
v4 = v2;
v10 = a1;
v5 = *(_DWORD *)(v2 + 8);
if ( v5 )
{
v6 = 0LL;
for ( i = 0LL; i < v5; ++i )
{
v7 = *(_BYTE **)(*(_QWORD *)v4 + v6);
if ( !(unsigned int)strncmp(v7, "aria_log.", 9LL, v3)
&& (unsigned __int8)(v7[9] - 48) <= 9u
&& (unsigned __int8)(v7[10] - 48) <= 9u
&& (unsigned __int8)(v7[11] - 48) <= 9u
&& (unsigned __int8)(v7[12] - 48) <= 9u
&& (unsigned __int8)(v7[13] - 48) <= 9u
&& (unsigned __int8)(v7[14] - 48) <= 9u
&& (unsigned __int8)(v7[15] - 48) <= 9u
&& (unsigned __int8)(v7[16] - 48) <= 9u
&& !v7[17] )
{
if ( !fn_format(v11, v7, *(_QWORD *)&maria_data_root, "", 16LL) || (unsigned int)my_delete(v11, 16LL) )
{
my_dirend(v4);
LOBYTE(i) = 1;
return (unsigned int)i;
}
v5 = *(_DWORD *)(v4 + 8);
}
v6 += 16LL;
}
}
my_dirend(v4);
if ( v10 )
rmdir();
LODWORD(i) = 0;
}
}
return (unsigned int)i;
}
| maria_log_remove:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2a8
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA R15,[0x505d10]
MOV RDX,qword ptr [R15]
LEA RSI,[0x1e0b63]
LEA RCX,[0x1e80f6]
LEA RDI,[RBP + -0x230]
MOV R8D,0x10
CALL 0x00198434
MOV BL,0x1
TEST RAX,RAX
JZ 0x0013379e
LEA RDI,[RBP + -0x230]
LEA RSI,[RBP + -0x2c8]
XOR EDX,EDX
CALL 0x001a60c7
TEST RAX,RAX
JZ 0x0013367c
LEA RDI,[RBP + -0x230]
MOV ESI,0x10
CALL 0x001a1a24
TEST EAX,EAX
JNZ 0x0013379e
LAB_0013367c:
MOV RDI,qword ptr [R15]
XOR ESI,ESI
CALL 0x001a5df9
TEST RAX,RAX
JZ 0x0013379e
MOV R15,RAX
MOV qword ptr [RBP + -0x238],R14
MOV R12D,dword ptr [RAX + 0x8]
TEST R12D,R12D
JZ 0x00133783
XOR R14D,R14D
XOR EBX,EBX
LAB_001336ab:
MOV RAX,qword ptr [R15]
MOV R13,qword ptr [RAX + R14*0x1]
MOV EDX,0x9
MOV RDI,R13
LEA RSI,[0x1e0b74]
CALL 0x0012a1d0
TEST EAX,EAX
JNZ 0x00133770
MOV AL,byte ptr [R13 + 0x9]
ADD AL,0xd0
CMP AL,0x9
JA 0x00133770
MOV AL,byte ptr [R13 + 0xa]
ADD AL,0xd0
CMP AL,0x9
JA 0x00133770
MOV AL,byte ptr [R13 + 0xb]
ADD AL,0xd0
CMP AL,0x9
JA 0x00133770
MOV AL,byte ptr [R13 + 0xc]
ADD AL,0xd0
CMP AL,0x9
JA 0x00133770
MOV AL,byte ptr [R13 + 0xd]
ADD AL,0xd0
CMP AL,0x9
JA 0x00133770
MOV AL,byte ptr [R13 + 0xe]
ADD AL,0xd0
CMP AL,0x9
JA 0x00133770
MOV AL,byte ptr [R13 + 0xf]
ADD AL,0xd0
CMP AL,0x9
JA 0x00133770
MOV AL,byte ptr [R13 + 0x10]
ADD AL,0xd0
CMP AL,0x9
JA 0x00133770
CMP byte ptr [R13 + 0x11],0x0
JNZ 0x00133770
LEA RAX,[0x505d10]
MOV RDX,qword ptr [RAX]
LEA R12,[RBP + -0x230]
MOV RDI,R12
MOV RSI,R13
LEA RCX,[0x1e80f6]
MOV R8D,0x10
CALL 0x00198434
TEST RAX,RAX
JZ 0x001337c1
MOV ESI,0x10
MOV RDI,R12
CALL 0x001a1a24
TEST EAX,EAX
JNZ 0x001337c1
MOV R12D,dword ptr [R15 + 0x8]
LAB_00133770:
INC RBX
MOV EAX,R12D
ADD R14,0x10
CMP RBX,RAX
JC 0x001336ab
LAB_00133783:
MOV RDI,R15
CALL 0x001a5dc8
MOV RDI,qword ptr [RBP + -0x238]
TEST RDI,RDI
JZ 0x0013379c
CALL 0x0012a380
LAB_0013379c:
XOR EBX,EBX
LAB_0013379e:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001337cd
MOV EAX,EBX
ADD RSP,0x2a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001337c1:
MOV RDI,R15
CALL 0x001a5dc8
MOV BL,0x1
JMP 0x0013379e
LAB_001337cd:
CALL 0x0012a270
|
ulong maria_log_remove(char *param_1)
{
char *__s1;
int iVar1;
long lVar2;
long *plVar3;
long lVar4;
int8 unaff_RBX;
ulong uVar5;
uint uVar6;
long in_FS_OFFSET;
int1 local_2d0 [144];
char *local_240;
int1 local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = fn_format(local_238,"aria_log_control",maria_data_root,&DAT_001e80f6,0x10);
uVar5 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if (lVar2 != 0) {
lVar2 = my_stat(local_238,local_2d0,0);
if (lVar2 != 0) {
iVar1 = my_delete(local_238,0x10);
if (iVar1 != 0) goto LAB_0013379e;
}
plVar3 = (long *)my_dir(maria_data_root,0);
if (plVar3 != (long *)0x0) {
uVar6 = *(uint *)(plVar3 + 1);
local_240 = param_1;
if (uVar6 != 0) {
lVar2 = 0;
uVar5 = 0;
do {
__s1 = *(char **)(*plVar3 + lVar2);
iVar1 = strncmp(__s1,"aria_log.",9);
if ((((((iVar1 == 0) && ((byte)(__s1[9] - 0x30U) < 10)) && ((byte)(__s1[10] - 0x30U) < 10)
) && (((byte)(__s1[0xb] - 0x30U) < 10 && ((byte)(__s1[0xc] - 0x30U) < 10)))) &&
(((byte)(__s1[0xd] - 0x30U) < 10 &&
(((byte)(__s1[0xe] - 0x30U) < 10 && ((byte)(__s1[0xf] - 0x30U) < 10)))))) &&
(((byte)(__s1[0x10] - 0x30U) < 10 && (__s1[0x11] == '\0')))) {
lVar4 = fn_format(local_238,__s1,maria_data_root,&DAT_001e80f6,0x10);
if (lVar4 != 0) {
iVar1 = my_delete(local_238,0x10);
if (iVar1 == 0) {
uVar6 = *(uint *)(plVar3 + 1);
goto LAB_00133770;
}
}
my_dirend(plVar3);
uVar5 = CONCAT71((int7)(uVar5 >> 8),1);
goto LAB_0013379e;
}
LAB_00133770:
uVar5 = uVar5 + 1;
lVar2 = lVar2 + 0x10;
} while (uVar5 < uVar6);
}
my_dirend(plVar3);
if (local_240 != (char *)0x0) {
rmdir(local_240);
}
uVar5 = 0;
}
}
LAB_0013379e:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar5 & 0xffffffff;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
33,859 | minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&) | llama.cpp/common/minja/minja.hpp | static void destructuring_assign(const std::vector<std::string> & var_names, const std::shared_ptr<Context> & context, Value& item) {
if (var_names.size() == 1) {
Value name(var_names[0]);
context->set(name, item);
} else {
if (!item.is_array() || item.size() != var_names.size()) {
throw std::runtime_error("Mismatched number of variables and items in destructuring assignment");
}
for (size_t i = 0; i < var_names.size(); ++i) {
context->set(var_names[i], item.at(i));
}
}
} | O3 | cpp | minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rax
subq %rsi, %rax
cmpq $0x20, %rax
jne 0xae6db
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xbadba
movq (%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
movq %r12, %rdx
callq *0x28(%rax)
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8400e
movq %rbx, %rdi
callq 0x88728
leaq 0x40(%rsp), %rdi
callq 0x6f712
leaq 0x30(%rsp), %rdi
callq 0x6f712
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x6f712
movq -0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xae7ef
movq 0xb28d4(%rip), %rax # 0x160f98
cmpb $0x0, (%rax)
je 0xae7da
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xae7e4
movq %rbx, (%rsp)
cmpq $0x0, 0x10(%r12)
je 0xae7fe
movq %rdi, %r15
movq %r12, %rdi
callq 0xc237c
movq (%r15), %rsi
movq 0x8(%r15), %rcx
movq %rcx, %rdx
subq %rsi, %rdx
sarq $0x5, %rdx
cmpq %rdx, %rax
jne 0xae7fe
cmpq %rsi, %rcx
je 0xae7ef
xorl %ebx, %ebx
leaq 0x8(%rsp), %rbp
xorl %r13d, %r13d
movq (%rsp), %rax
movq (%rax), %r14
addq %rbx, %rsi
movq %rbp, %rdi
callq 0xbadba
movq %r12, %rdi
movq %r13, %rsi
callq 0xc21ec
movq (%r14), %rcx
movq %r14, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq *0x28(%rcx)
leaq 0x48(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x8400e
movq %r14, %rdi
callq 0x88728
leaq 0x40(%rsp), %rdi
callq 0x6f712
leaq 0x30(%rsp), %rdi
callq 0x6f712
leaq 0x20(%rsp), %rdi
callq 0x6f712
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xae7ba
movq 0xb2803(%rip), %rax # 0x160f98
cmpb $0x0, (%rax)
je 0xae7a5
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xae7af
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xae7ba
movq (%rdi), %rax
callq *0x18(%rax)
incq %r13
movq (%r15), %rsi
movq 0x8(%r15), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %rbx
cmpq %rax, %r13
jb 0xae723
jmp 0xae7ef
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xae7ef
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20660
movq %rax, %r14
leaq 0x724f4(%rip), %rsi # 0x120d06
movq %rax, %rdi
callq 0x20430
movq 0xb279f(%rip), %rsi # 0x160fc0
movq 0xb2758(%rip), %rdx # 0x160f80
movq %r14, %rdi
callq 0x20a60
movq %rax, %rbx
movq %r14, %rdi
callq 0x20f00
jmp 0xae84c
jmp 0xae83f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb5050
movq %rbx, %rdi
callq 0x20b00
| _ZN5minjaL20destructuring_assignERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt10shared_ptrINS_7ContextEERNS_5ValueE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r12, rdx
mov rbx, rsi
mov rsi, [rdi]
mov rax, [rdi+8]
sub rax, rsi
cmp rax, 20h ; ' '
jnz short loc_AE6DB
lea r14, [rsp+88h+var_80]
mov rdi, r14
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, [rbx]
mov rax, [rdi]
mov rsi, r14
mov rdx, r12
call qword ptr [rax+28h]
lea rbx, [rsp+88h+var_40]
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rbx, [rsp+88h+var_68]
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [rbx-10h]
test rdi, rdi
jz loc_AE7EF
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz loc_AE7DA
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp loc_AE7E4
loc_AE6DB:
mov [rsp+88h+var_88], rbx
cmp qword ptr [r12+10h], 0
jz loc_AE7FE
mov r15, rdi
mov rdi, r12; this
call _ZNK5minja5Value4sizeEv; minja::Value::size(void)
mov rsi, [r15]
mov rcx, [r15+8]
mov rdx, rcx
sub rdx, rsi
sar rdx, 5
cmp rax, rdx
jnz loc_AE7FE
cmp rcx, rsi
jz loc_AE7EF
xor ebx, ebx
lea rbp, [rsp+88h+var_80]
xor r13d, r13d
loc_AE723:
mov rax, [rsp+88h+var_88]
mov r14, [rax]
add rsi, rbx
mov rdi, rbp
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, r12; this
mov rsi, r13; unsigned __int64
call _ZN5minja5Value2atEm; minja::Value::at(ulong)
mov rcx, [r14]
mov rdi, r14
mov rsi, rbp
mov rdx, rax
call qword ptr [rcx+28h]
lea r14, [rsp+88h+var_40]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_68]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [rsp+88h+var_78]
test rdi, rdi
jz short loc_AE7BA
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_AE7A5
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_AE7AF
loc_AE7A5:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_AE7AF:
cmp eax, 1
jnz short loc_AE7BA
mov rax, [rdi]
call qword ptr [rax+18h]
loc_AE7BA:
inc r13
mov rsi, [r15]
mov rax, [r15+8]
sub rax, rsi
sar rax, 5
add rbx, 20h ; ' '
cmp r13, rax
jb loc_AE723
jmp short loc_AE7EF
loc_AE7DA:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_AE7E4:
cmp eax, 1
jnz short loc_AE7EF
mov rax, [rdi]
call qword ptr [rax+18h]
loc_AE7EF:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_AE7FE:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aMismatchedNumb; "Mismatched number of variables and item"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_AE84C
jmp short $+2
loc_AE83F:
mov rbx, rax
lea rdi, [rsp+88h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_AE84C:
mov rdi, rbx
call __Unwind_Resume
| void minja::destructuring_assign(_QWORD *a1, _QWORD *a2, minja::Value *a3)
{
long long v4; // rdi
signed __int32 v5; // eax
long long v7; // rax
long long v8; // rsi
long long v9; // rbx
unsigned long long v10; // r13
long long v11; // r14
long long v12; // rax
long long v13; // rdi
signed __int32 v14; // eax
std::runtime_error *exception; // r14
_BYTE v17[8]; // [rsp+8h] [rbp-80h] BYREF
long long v18; // [rsp+10h] [rbp-78h]
volatile signed __int32 *v19[2]; // [rsp+20h] [rbp-68h] BYREF
volatile signed __int32 *v20[2]; // [rsp+30h] [rbp-58h] BYREF
volatile signed __int32 *v21; // [rsp+40h] [rbp-48h] BYREF
char v22[64]; // [rsp+48h] [rbp-40h] BYREF
if ( a1[1] - *a1 == 32LL )
{
minja::Value::Value(v17, *a1);
(*(void ( **)(_QWORD, _BYTE *, minja::Value *))(*(_QWORD *)*a2 + 40LL))(*a2, v17, a3);
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(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>::data::~data(v22);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v21);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v20);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v19);
v4 = v18;
if ( v18 )
{
if ( _libc_single_threaded )
{
v5 = *(_DWORD *)(v18 + 12);
*(_DWORD *)(v18 + 12) = v5 - 1;
}
else
{
v5 = _InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF);
}
if ( v5 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v4 + 24LL))(v4, 0LL);
}
}
else
{
if ( !*((_QWORD *)a3 + 2) || (v7 = minja::Value::size(a3), v8 = *a1, v7 != (long long)(a1[1] - *a1) >> 5) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(
exception,
"Mismatched number of variables and items in destructuring assignment");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( a1[1] != v8 )
{
v9 = 0LL;
v10 = 0LL;
do
{
v11 = *a2;
minja::Value::Value(v17, v9 + v8);
v12 = minja::Value::at(a3, v10);
(*(void ( **)(long long, _BYTE *, long long))(*(_QWORD *)v11 + 40LL))(v11, v17, v12);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(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>::data::~data(v22);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v21);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v20);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v19);
v13 = v18;
if ( v18 )
{
if ( _libc_single_threaded )
{
v14 = *(_DWORD *)(v18 + 12);
*(_DWORD *)(v18 + 12) = v14 - 1;
}
else
{
v14 = _InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF);
}
if ( v14 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v13 + 24LL))(v13, 0LL);
}
++v10;
v8 = *a1;
v9 += 32LL;
}
while ( v10 < (long long)(a1[1] - *a1) >> 5 );
}
}
}
| destructuring_assign:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R12,RDX
MOV RBX,RSI
MOV RSI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,RSI
CMP RAX,0x20
JNZ 0x001ae6db
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x001badba
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
LAB_001ae66f:
MOV RSI,R14
MOV RDX,R12
CALL qword ptr [RAX + 0x28]
LAB_001ae678:
LEA RBX,[RSP + 0x48]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0018400e
MOV RDI,RBX
CALL 0x00188728
LEA RDI,[RSP + 0x40]
CALL 0x0016f712
LEA RDI,[RSP + 0x30]
CALL 0x0016f712
LEA RBX,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0016f712
MOV RDI,qword ptr [RBX + -0x10]
TEST RDI,RDI
JZ 0x001ae7ef
MOV RAX,qword ptr [0x00260f98]
CMP byte ptr [RAX],0x0
JZ 0x001ae7da
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001ae7e4
LAB_001ae6db:
MOV qword ptr [RSP],RBX
CMP qword ptr [R12 + 0x10],0x0
JZ 0x001ae7fe
MOV R15,RDI
MOV RDI,R12
CALL 0x001c237c
MOV RSI,qword ptr [R15]
MOV RCX,qword ptr [R15 + 0x8]
MOV RDX,RCX
SUB RDX,RSI
SAR RDX,0x5
CMP RAX,RDX
JNZ 0x001ae7fe
CMP RCX,RSI
JZ 0x001ae7ef
XOR EBX,EBX
LEA RBP,[RSP + 0x8]
XOR R13D,R13D
LAB_001ae723:
MOV RAX,qword ptr [RSP]
MOV R14,qword ptr [RAX]
ADD RSI,RBX
MOV RDI,RBP
CALL 0x001badba
LAB_001ae735:
MOV RDI,R12
MOV RSI,R13
CALL 0x001c21ec
MOV RCX,qword ptr [R14]
MOV RDI,R14
MOV RSI,RBP
MOV RDX,RAX
CALL qword ptr [RCX + 0x28]
LAB_001ae74f:
LEA R14,[RSP + 0x48]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0018400e
MOV RDI,R14
CALL 0x00188728
LEA RDI,[RSP + 0x40]
CALL 0x0016f712
LEA RDI,[RSP + 0x30]
CALL 0x0016f712
LEA RDI,[RSP + 0x20]
CALL 0x0016f712
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001ae7ba
MOV RAX,qword ptr [0x00260f98]
CMP byte ptr [RAX],0x0
JZ 0x001ae7a5
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001ae7af
LAB_001ae7a5:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001ae7af:
CMP EAX,0x1
JNZ 0x001ae7ba
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001ae7ba:
INC R13
MOV RSI,qword ptr [R15]
MOV RAX,qword ptr [R15 + 0x8]
SUB RAX,RSI
SAR RAX,0x5
ADD RBX,0x20
CMP R13,RAX
JC 0x001ae723
JMP 0x001ae7ef
LAB_001ae7da:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001ae7e4:
CMP EAX,0x1
JNZ 0x001ae7ef
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001ae7ef:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ae7fe:
MOV EDI,0x10
CALL 0x00120660
MOV R14,RAX
LAB_001ae80b:
LEA RSI,[0x220d06]
MOV RDI,RAX
CALL 0x00120430
LAB_001ae81a:
MOV RSI,qword ptr [0x00260fc0]
MOV RDX,qword ptr [0x00260f80]
MOV RDI,R14
CALL 0x00120a60
|
/* minja::destructuring_assign(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string
> > const&, std::shared_ptr<minja::Context> const&, minja::Value&) */
void minja::destructuring_assign(vector *param_1,shared_ptr *param_2,Value *param_3)
{
int *piVar1;
long *plVar2;
int iVar3;
long lVar4;
int8 uVar5;
runtime_error *this;
long lVar6;
ulong uVar7;
Value local_80 [8];
long *local_78;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_68 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [8];
data local_40 [16];
if (*(long *)(param_1 + 8) - (long)*(string **)param_1 == 0x20) {
Value::Value(local_80,*(string **)param_1);
/* try { // try from 001ae66f to 001ae677 has its CatchHandler @ 001ae83d */
(**(code **)(**(long **)param_2 + 0x28))(*(long **)param_2,local_80,param_3);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_68);
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_00260f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
return;
}
if (*(long *)(param_3 + 0x10) != 0) {
lVar4 = Value::size(param_3);
lVar6 = *(long *)param_1;
if (lVar4 == *(long *)(param_1 + 8) - lVar6 >> 5) {
if (*(long *)(param_1 + 8) == lVar6) {
return;
}
lVar4 = 0;
uVar7 = 0;
do {
plVar2 = *(long **)param_2;
Value::Value(local_80,(string *)(lVar6 + lVar4));
/* try { // try from 001ae735 to 001ae74e has its CatchHandler @ 001ae83f */
uVar5 = Value::at(param_3,uVar7);
(**(code **)(*plVar2 + 0x28))(plVar2,local_80,uVar5);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_68);
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_00260f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
uVar7 = uVar7 + 1;
lVar6 = *(long *)param_1;
lVar4 = lVar4 + 0x20;
} while (uVar7 < (ulong)(*(long *)(param_1 + 8) - lVar6 >> 5));
return;
}
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001ae80b to 001ae819 has its CatchHandler @ 001ae830 */
std::runtime_error::runtime_error
(this,"Mismatched number of variables and items in destructuring assignment");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00260fc0,PTR__runtime_error_00260f80);
}
| |
33,860 | testing::Message& testing::Message::operator<<<char [12]>(char const (&) [12]) | seiftnesse[P]memoryallocator/build_O2/_deps/googletest-src/googletest/include/gtest/gtest-message.h | inline Message& operator<<(const T& val) {
// Some libraries overload << for STL containers. These
// overloads are defined in the global namespace instead of ::std.
//
// C++'s symbol lookup rule (i.e. Koenig lookup) says that these
// overloads are visible in either the std namespace or the global
// namespace, but not other namespaces, including the testing
// namespace which Google Test's Message class is in.
//
// To allow STL containers (and other types that has a << operator
// defined in the global namespace) to be used in Google Test
// assertions, testing::Message must access the custom << operator
// from the global namespace. With this using declaration,
// overloads of << defined in the global namespace and those
// visible via Koenig lookup are both exposed in this function.
using ::operator<<;
*ss_ << val;
return *this;
} | O2 | c | testing::Message& testing::Message::operator<<<char [12]>(char const (&) [12]):
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
addq $0x10, %rdi
movq (%rsi), %rsi
callq 0x94a0
movq %rbx, %rax
popq %rbx
retq
| _ZN7testing7MessagelsIlEERS0_RKT_:
push rbx
mov rbx, rdi
mov rdi, [rdi]
add rdi, 10h
mov rsi, [rsi]
call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long)
mov rax, rbx
pop rbx
retn
| _QWORD * testing::Message::operator<<<long>(_QWORD *a1, _QWORD *a2)
{
std::ostream::_M_insert<long>(*a1 + 16LL, *a2);
return a1;
}
| operator<<:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
ADD RDI,0x10
MOV RSI,qword ptr [RSI]
CALL 0x001094a0
MOV RAX,RBX
POP RBX
RET
|
/* testing::Message& testing::Message::TEMPNAMEPLACEHOLDERVALUE(long const&) */
Message * __thiscall testing::Message::operator<<(Message *this,long *param_1)
{
std::ostream::_M_insert<long>(*(long *)this + 0x10);
return this;
}
| |
33,861 | unpack_filename | eloqsql/mysys/mf_pack.c | size_t unpack_filename(char * to, const char *from)
{
size_t length, n_length, buff_length;
char buff[FN_REFLEN + 1];
DBUG_ENTER("unpack_filename");
length=dirname_part(buff, from, &buff_length);/* copy & convert dirname */
n_length=unpack_dirname(buff,buff);
if (n_length+strlen(from+length) < FN_REFLEN)
{
(void) strmov(buff+n_length,from+length);
length= system_filename(to,buff); /* Fix to usably filename */
}
else
length= system_filename(to,from); /* Fix to usably filename */
DBUG_RETURN(length);
} | O3 | c | unpack_filename:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp # imm = 0x220
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
leaq -0x230(%rbp), %r12
leaq -0x238(%rbp), %rdx
movq %r12, %rdi
callq 0x95bb9
movq %rax, %r15
movq %r12, %rdi
movq %r12, %rsi
callq 0x9c746
movq %rax, %r12
addq %r14, %r15
movq %r15, %rdi
callq 0x29340
addq %r12, %rax
cmpq $0x1ff, %rax # imm = 0x1FF
ja 0x9c968
leaq (%r12,%rbp), %rdi
addq $-0x230, %rdi # imm = 0xFDD0
movq %r15, %rsi
callq 0x29350
leaq -0x230(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
movq %rbx, %rdi
jmp 0x9c973
movl $0x1ff, %edx # imm = 0x1FF
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd85a0
movq %fs:0x28, %rcx
cmpq -0x28(%rbp), %rcx
jne 0x9c99a
subq %rbx, %rax
addq $0x220, %rsp # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x29250
nop
| unpack_filename:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 220h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
lea r12, [rbp+var_230]
lea rdx, [rbp+var_238]
mov rdi, r12
call dirname_part
mov r15, rax
mov rdi, r12
mov rsi, r12
call unpack_dirname
mov r12, rax
add r15, r14
mov rdi, r15
call _strlen
add rax, r12
cmp rax, 1FFh
ja short loc_9C968
lea rdi, [r12+rbp]
add rdi, 0FFFFFFFFFFFFFDD0h
mov rsi, r15
call _strcpy
lea rsi, [rbp+var_230]
mov edx, 1FFh
mov rdi, rbx
jmp short loc_9C973
loc_9C968:
mov edx, 1FFh
mov rdi, rbx
mov rsi, r14
loc_9C973:
call strmake
mov rcx, fs:28h
cmp rcx, [rbp+var_28]
jnz short loc_9C99A
sub rax, rbx
add rsp, 220h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_9C99A:
call ___stack_chk_fail
| long long unpack_filename(long long a1, _BYTE *a2)
{
long long v2; // r15
long long v3; // r12
_BYTE *v4; // r15
long long v6; // [rsp+8h] [rbp-238h] BYREF
_BYTE v7[520]; // [rsp+10h] [rbp-230h] BYREF
unsigned long long v8; // [rsp+218h] [rbp-28h]
v8 = __readfsqword(0x28u);
v2 = dirname_part((long long)v7, a2, &v6);
v3 = unpack_dirname((long long)v7, v7);
v4 = &a2[v2];
if ( (unsigned long long)(v3 + strlen(v4)) <= 0x1FF )
{
strcpy(&v7[v3], v4);
a2 = v7;
}
return strmake(a1, a2, 511LL) - a1;
}
| unpack_filename:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x220
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
LEA R12,[RBP + -0x230]
LEA RDX,[RBP + -0x238]
MOV RDI,R12
CALL 0x00195bb9
MOV R15,RAX
MOV RDI,R12
MOV RSI,R12
CALL 0x0019c746
MOV R12,RAX
ADD R15,R14
MOV RDI,R15
CALL 0x00129340
ADD RAX,R12
CMP RAX,0x1ff
JA 0x0019c968
LEA RDI,[R12 + RBP*0x1]
ADD RDI,-0x230
MOV RSI,R15
CALL 0x00129350
LEA RSI,[RBP + -0x230]
MOV EDX,0x1ff
MOV RDI,RBX
JMP 0x0019c973
LAB_0019c968:
MOV EDX,0x1ff
MOV RDI,RBX
MOV RSI,R14
LAB_0019c973:
CALL 0x001d85a0
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x28]
JNZ 0x0019c99a
SUB RAX,RBX
ADD RSP,0x220
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0019c99a:
CALL 0x00129250
|
long unpack_filename(long param_1,char *param_2)
{
long lVar1;
long lVar2;
size_t sVar3;
long in_FS_OFFSET;
int1 local_240 [8];
char local_238 [520];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = dirname_part(local_238,param_2,local_240);
lVar2 = unpack_dirname(local_238,local_238);
sVar3 = strlen(param_2 + lVar1);
if (sVar3 + lVar2 < 0x200) {
strcpy(local_238 + lVar2,param_2 + lVar1);
param_2 = local_238;
}
lVar1 = strmake(param_1,param_2,0x1ff);
if (*(long *)(in_FS_OFFSET + 0x28) != local_30) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar1 - param_1;
}
| |
33,862 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint() | monkey531[P]llama/common/json.hpp | int get_codepoint()
{
// this function only makes sense after reading `\u`
JSON_ASSERT(current == 'u');
int codepoint = 0;
const auto factors = { 12u, 8u, 4u, 0u };
for (const auto factor : factors)
{
get();
if (current >= '0' && current <= '9')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor);
}
else if (current >= 'A' && current <= 'F')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor);
}
else if (current >= 'a' && current <= 'f')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor);
}
else
{
return -1;
}
}
JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF);
return codepoint;
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint():
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x75, 0x14(%rax)
je 0xa620a
leaq 0x169184(%rip), %rdi # 0x20f374
movl $0x1d79, %esi # imm = 0x1D79
leaq 0x162f4e(%rip), %rdx # 0x20914a
leaq 0x169ea4(%rip), %rcx # 0x2100a7
movb $0x0, %al
callq 0x5aed0
movl $0x0, 0x54(%rsp)
movl $0xc, 0x30(%rsp)
movl $0x8, 0x34(%rsp)
movl $0x4, 0x38(%rsp)
movl $0x0, 0x3c(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, 0x40(%rsp)
movq $0x4, 0x48(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0xa65f0
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0xa6600
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0xa6348
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x14(%rsp)
callq 0xa5380
movq 0x8(%rsp), %rax
cmpl $0x30, 0x14(%rax)
jl 0xa62c3
movq 0x8(%rsp), %rax
cmpl $0x39, 0x14(%rax)
jg 0xa62c3
movq 0x8(%rsp), %rax
movl 0x14(%rax), %eax
subl $0x30, %eax
movl 0x14(%rsp), %ecx
shll %cl, %eax
addl 0x54(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0xa6333
movq 0x8(%rsp), %rax
cmpl $0x41, 0x14(%rax)
jl 0xa62f4
movq 0x8(%rsp), %rax
cmpl $0x46, 0x14(%rax)
jg 0xa62f4
movq 0x8(%rsp), %rax
movl 0x14(%rax), %eax
subl $0x37, %eax
movl 0x14(%rsp), %ecx
shll %cl, %eax
addl 0x54(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0xa6331
movq 0x8(%rsp), %rax
cmpl $0x61, 0x14(%rax)
jl 0xa6325
movq 0x8(%rsp), %rax
cmpl $0x66, 0x14(%rax)
jg 0xa6325
movq 0x8(%rsp), %rax
movl 0x14(%rax), %eax
subl $0x57, %eax
movl 0x14(%rsp), %ecx
shll %cl, %eax
addl 0x54(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0xa632f
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0xa6383
jmp 0xa6331
jmp 0xa6333
jmp 0xa6335
movq 0x20(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x20(%rsp)
jmp 0xa626d
xorl %eax, %eax
cmpl 0x54(%rsp), %eax
jg 0xa635a
cmpl $0xffff, 0x54(%rsp) # imm = 0xFFFF
jle 0xa637b
leaq 0x169013(%rip), %rdi # 0x20f374
movl $0x1d93, %esi # imm = 0x1D93
leaq 0x162ddd(%rip), %rdx # 0x20914a
leaq 0x169d42(%rip), %rcx # 0x2100b6
movb $0x0, %al
callq 0x5aed0
movl 0x54(%rsp), %eax
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopl (%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov rax, [rsp+68h+var_10]
mov [rsp+68h+var_60], rax
cmp dword ptr [rax+14h], 75h ; 'u'
jz short loc_A620A
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1D79h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCurrentU; "current == 'u'"
mov al, 0
call _ggml_abort
loc_A620A:
mov [rsp+68h+var_14], 0
mov [rsp+68h+var_38], 0Ch
mov [rsp+68h+var_34], 8
mov [rsp+68h+var_30], 4
mov [rsp+68h+var_2C], 0
lea rax, [rsp+68h+var_38]
mov [rsp+68h+var_28], rax
mov [rsp+68h+var_20], 4
lea rax, [rsp+68h+var_28]
mov [rsp+68h+var_40], rax
mov rdi, [rsp+68h+var_40]
call _ZNKSt16initializer_listIjE5beginEv; std::initializer_list<uint>::begin(void)
mov [rsp+68h+var_48], rax
mov rdi, [rsp+68h+var_40]
call _ZNKSt16initializer_listIjE3endEv; std::initializer_list<uint>::end(void)
mov [rsp+68h+var_50], rax
loc_A626D:
mov rax, [rsp+68h+var_48]
cmp rax, [rsp+68h+var_50]
jz loc_A6348
mov rdi, [rsp+68h+var_60]
mov rax, [rsp+68h+var_48]
mov eax, [rax]
mov [rsp+68h+var_54], eax
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
mov rax, [rsp+68h+var_60]
cmp dword ptr [rax+14h], 30h ; '0'
jl short loc_A62C3
mov rax, [rsp+68h+var_60]
cmp dword ptr [rax+14h], 39h ; '9'
jg short loc_A62C3
mov rax, [rsp+68h+var_60]
mov eax, [rax+14h]
sub eax, 30h ; '0'
mov ecx, [rsp+68h+var_54]
shl eax, cl
add eax, [rsp+68h+var_14]
mov [rsp+68h+var_14], eax
jmp short loc_A6333
loc_A62C3:
mov rax, [rsp+68h+var_60]
cmp dword ptr [rax+14h], 41h ; 'A'
jl short loc_A62F4
mov rax, [rsp+68h+var_60]
cmp dword ptr [rax+14h], 46h ; 'F'
jg short loc_A62F4
mov rax, [rsp+68h+var_60]
mov eax, [rax+14h]
sub eax, 37h ; '7'
mov ecx, [rsp+68h+var_54]
shl eax, cl
add eax, [rsp+68h+var_14]
mov [rsp+68h+var_14], eax
jmp short loc_A6331
loc_A62F4:
mov rax, [rsp+68h+var_60]
cmp dword ptr [rax+14h], 61h ; 'a'
jl short loc_A6325
mov rax, [rsp+68h+var_60]
cmp dword ptr [rax+14h], 66h ; 'f'
jg short loc_A6325
mov rax, [rsp+68h+var_60]
mov eax, [rax+14h]
sub eax, 57h ; 'W'
mov ecx, [rsp+68h+var_54]
shl eax, cl
add eax, [rsp+68h+var_14]
mov [rsp+68h+var_14], eax
jmp short loc_A632F
loc_A6325:
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp short loc_A6383
loc_A632F:
jmp short $+2
loc_A6331:
jmp short $+2
loc_A6333:
jmp short $+2
loc_A6335:
mov rax, [rsp+68h+var_48]
add rax, 4
mov [rsp+68h+var_48], rax
jmp loc_A626D
loc_A6348:
xor eax, eax
cmp eax, [rsp+68h+var_14]
jg short loc_A635A
cmp [rsp+68h+var_14], 0FFFFh
jle short loc_A637B
loc_A635A:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1D93h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, a0x0000Codepoin; "0x0000 <= codepoint && codepoint <= 0xF"...
mov al, 0
call _ggml_abort
loc_A637B:
mov eax, [rsp+68h+var_14]
mov [rsp+68h+var_4], eax
loc_A6383:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(
long long a1)
{
int v2; // [rsp+14h] [rbp-54h]
long long v3; // [rsp+18h] [rbp-50h]
int *v4; // [rsp+20h] [rbp-48h]
_DWORD v5[4]; // [rsp+30h] [rbp-38h] BYREF
_QWORD v6[2]; // [rsp+40h] [rbp-28h] BYREF
unsigned int v7; // [rsp+54h] [rbp-14h]
long long v8; // [rsp+58h] [rbp-10h]
v8 = a1;
if ( *(_DWORD *)(a1 + 20) != 117 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7545LL,
"GGML_ASSERT(%s) failed",
"current == 'u'");
v7 = 0;
v5[0] = 12;
v5[1] = 8;
v5[2] = 4;
v5[3] = 0;
v6[0] = v5;
v6[1] = 4LL;
v4 = (int *)std::initializer_list<unsigned int>::begin(v6);
v3 = std::initializer_list<unsigned int>::end(v6);
while ( v4 != (int *)v3 )
{
v2 = *v4;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( *(int *)(a1 + 20) < 48 || *(int *)(a1 + 20) > 57 )
{
if ( *(int *)(a1 + 20) < 65 || *(int *)(a1 + 20) > 70 )
{
if ( *(int *)(a1 + 20) < 97 || *(int *)(a1 + 20) > 102 )
return (unsigned int)-1;
v7 += (*(_DWORD *)(a1 + 20) - 87) << v2;
}
else
{
v7 += (*(_DWORD *)(a1 + 20) - 55) << v2;
}
}
else
{
v7 += (*(_DWORD *)(a1 + 20) - 48) << v2;
}
++v4;
}
if ( v7 >= 0x10000 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7571LL,
"GGML_ASSERT(%s) failed",
"0x0000 <= codepoint && codepoint <= 0xFFFF");
return v7;
}
| get_codepoint:
SUB RSP,0x68
MOV qword ptr [RSP + 0x58],RDI
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RAX + 0x14],0x75
JZ 0x001a620a
LEA RDI,[0x30f374]
MOV ESI,0x1d79
LEA RDX,[0x30914a]
LEA RCX,[0x3100a7]
MOV AL,0x0
CALL 0x0015aed0
LAB_001a620a:
MOV dword ptr [RSP + 0x54],0x0
MOV dword ptr [RSP + 0x30],0xc
MOV dword ptr [RSP + 0x34],0x8
MOV dword ptr [RSP + 0x38],0x4
MOV dword ptr [RSP + 0x3c],0x0
LEA RAX,[RSP + 0x30]
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],0x4
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001a65f0
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001a6600
MOV qword ptr [RSP + 0x18],RAX
LAB_001a626d:
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,qword ptr [RSP + 0x18]
JZ 0x001a6348
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x14],EAX
CALL 0x001a5380
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x14],0x30
JL 0x001a62c3
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x14],0x39
JG 0x001a62c3
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x14]
SUB EAX,0x30
MOV ECX,dword ptr [RSP + 0x14]
SHL EAX,CL
ADD EAX,dword ptr [RSP + 0x54]
MOV dword ptr [RSP + 0x54],EAX
JMP 0x001a6333
LAB_001a62c3:
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x14],0x41
JL 0x001a62f4
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x14],0x46
JG 0x001a62f4
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x14]
SUB EAX,0x37
MOV ECX,dword ptr [RSP + 0x14]
SHL EAX,CL
ADD EAX,dword ptr [RSP + 0x54]
MOV dword ptr [RSP + 0x54],EAX
JMP 0x001a6331
LAB_001a62f4:
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x14],0x61
JL 0x001a6325
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x14],0x66
JG 0x001a6325
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x14]
SUB EAX,0x57
MOV ECX,dword ptr [RSP + 0x14]
SHL EAX,CL
ADD EAX,dword ptr [RSP + 0x54]
MOV dword ptr [RSP + 0x54],EAX
JMP 0x001a632f
LAB_001a6325:
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x001a6383
LAB_001a632f:
JMP 0x001a6331
LAB_001a6331:
JMP 0x001a6333
LAB_001a6333:
JMP 0x001a6335
LAB_001a6335:
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x4
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001a626d
LAB_001a6348:
XOR EAX,EAX
CMP EAX,dword ptr [RSP + 0x54]
JG 0x001a635a
CMP dword ptr [RSP + 0x54],0xffff
JLE 0x001a637b
LAB_001a635a:
LEA RDI,[0x30f374]
MOV ESI,0x1d93
LEA RDX,[0x30914a]
LEA RCX,[0x3100b6]
MOV AL,0x0
CALL 0x0015aed0
LAB_001a637b:
MOV EAX,dword ptr [RSP + 0x54]
MOV dword ptr [RSP + 0x64],EAX
LAB_001a6383:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::get_codepoint() */
int __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::get_codepoint(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int4 uVar1;
int iVar2;
int4 *puVar3;
byte bVar4;
int4 *local_48;
int4 local_38;
int4 local_34;
int4 local_30;
int4 local_2c;
int4 *local_28;
int8 local_20;
int local_14;
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*local_10;
local_10 = this;
if (*(int *)(this + 0x14) != 0x75) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1d79,
"GGML_ASSERT(%s) failed","current == \'u\'");
}
local_14 = 0;
local_38 = 0xc;
local_34 = 8;
local_30 = 4;
local_2c = 0;
local_28 = &local_38;
local_20 = 4;
local_48 = (int4 *)
std::initializer_list<unsigned_int>::begin((initializer_list<unsigned_int> *)&local_28)
;
puVar3 = (int4 *)
std::initializer_list<unsigned_int>::end((initializer_list<unsigned_int> *)&local_28);
do {
if (local_48 == puVar3) {
if ((local_14 < 0) || (0xffff < local_14)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
0x1d93,"GGML_ASSERT(%s) failed","0x0000 <= codepoint && codepoint <= 0xFFFF");
}
return local_14;
}
uVar1 = *local_48;
get(this);
bVar4 = (byte)uVar1;
if ((*(int *)(this + 0x14) < 0x30) || (0x39 < *(int *)(this + 0x14))) {
if ((*(int *)(this + 0x14) < 0x41) || (0x46 < *(int *)(this + 0x14))) {
if ((*(int *)(this + 0x14) < 0x61) || (0x66 < *(int *)(this + 0x14))) {
return -1;
}
iVar2 = *(int *)(this + 0x14) + -0x57 << (bVar4 & 0x1f);
}
else {
iVar2 = *(int *)(this + 0x14) + -0x37 << (bVar4 & 0x1f);
}
}
else {
iVar2 = *(int *)(this + 0x14) + -0x30 << (bVar4 & 0x1f);
}
local_14 = iVar2 + local_14;
local_48 = local_48 + 1;
} while( true );
}
| |
33,863 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint() | monkey531[P]llama/common/json.hpp | int get_codepoint()
{
// this function only makes sense after reading `\u`
JSON_ASSERT(current == 'u');
int codepoint = 0;
const auto factors = { 12u, 8u, 4u, 0u };
for (const auto factor : factors)
{
get();
if (current >= '0' && current <= '9')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor);
}
else if (current >= 'A' && current <= 'F')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor);
}
else if (current >= 'a' && current <= 'f')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor);
}
else
{
return -1;
}
}
JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF);
return codepoint;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint():
pushq %rbx
subq $0x10, %rsp
cmpl $0x75, 0x14(%rdi)
jne 0x596e4
leaq 0x14(%rdi), %rsi
leaq 0xc(%rsp), %rbx
movq %rbx, %rdx
callq 0x1b3de
movl (%rbx), %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x926de(%rip), %rdi # 0xebdc9
leaq 0x8cb18(%rip), %rdx # 0xe620a
leaq 0x933e8(%rip), %rcx # 0xecae1
movl $0x1d79, %esi # imm = 0x1D79
xorl %eax, %eax
callq 0x1aec0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv:
push rbx
sub rsp, 10h
cmp dword ptr [rdi+14h], 75h ; 'u'
jnz short loc_596E4
lea rsi, [rdi+14h]
lea rbx, [rsp+18h+var_C]
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv_cold_1; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(void) [clone]
mov eax, [rbx]
add rsp, 10h
pop rbx
retn
loc_596E4:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCurrentU; "current == 'u'"
mov esi, 1D79h
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(
__m128i *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9)
{
long long v10; // rdx
long long v11; // rcx
long long v12; // r8
long long v13; // r9
unsigned int v14[3]; // [rsp+Ch] [rbp-Ch] BYREF
if ( a1[1].m128i_i32[1] == 117 )
{
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(
a1,
&a1[1].m128i_u32[1],
v14);
return v14[0];
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7545LL,
"GGML_ASSERT(%s) failed",
"current == 'u'");
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7545LL,
v10,
v11,
v12,
v13,
a7,
a8,
a9);
}
}
| get_codepoint:
PUSH RBX
SUB RSP,0x10
CMP dword ptr [RDI + 0x14],0x75
JNZ 0x001596e4
LEA RSI,[RDI + 0x14]
LEA RBX,[RSP + 0xc]
MOV RDX,RBX
CALL 0x0011b3de
MOV EAX,dword ptr [RBX]
ADD RSP,0x10
POP RBX
RET
LAB_001596e4:
LEA RDI,[0x1ebdc9]
LEA RDX,[0x1e620a]
LEA RCX,[0x1ecae1]
MOV ESI,0x1d79
XOR EAX,EAX
CALL 0x0011aec0
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::get_codepoint() */
int4 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::get_codepoint(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int4 local_c;
if (*(int *)(this + 0x14) == 0x75) {
get_codepoint();
return local_c;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1d79,
"GGML_ASSERT(%s) failed","current == \'u\'");
}
| |
33,864 | ma_enlarge_root | eloqsql/storage/maria/ma_write.c | my_bool _ma_enlarge_root(MARIA_HA *info, MARIA_KEY *key, my_off_t *root)
{
uint t_length, nod_flag;
MARIA_KEY_PARAM s_temp;
MARIA_SHARE *share= info->s;
MARIA_PINNED_PAGE tmp_page_link, *page_link= &tmp_page_link;
MARIA_KEYDEF *keyinfo= key->keyinfo;
MARIA_PAGE page;
my_bool res= 0;
DBUG_ENTER("_ma_enlarge_root");
page.info= info;
page.keyinfo= keyinfo;
page.buff= info->buff;
page.flag= 0;
nod_flag= (*root != HA_OFFSET_ERROR) ? share->base.key_reflength : 0;
/* Store pointer to prev page if nod */
_ma_kpointer(info, page.buff + share->keypage_header, *root);
t_length= (*keyinfo->pack_key)(key, nod_flag, (uchar*) 0,
(uchar*) 0, (uchar*) 0, &s_temp);
page.size= share->keypage_header + t_length + nod_flag;
bzero(page.buff, share->keypage_header);
_ma_store_keynr(share, page.buff, keyinfo->key_nr);
if (nod_flag)
page.flag|= KEYPAGE_FLAG_ISNOD;
if (key->flag & (SEARCH_USER_KEY_HAS_TRANSID | SEARCH_PAGE_KEY_HAS_TRANSID))
page.flag|= KEYPAGE_FLAG_HAS_TRANSID;
(*keyinfo->store_key)(keyinfo, page.buff + share->keypage_header +
nod_flag, &s_temp);
/* Mark that info->buff was used */
info->keyread_buff_used= info->page_changed= 1;
if ((page.pos= _ma_new(info, PAGECACHE_PRIORITY_HIGH, &page_link)) ==
HA_OFFSET_ERROR)
DBUG_RETURN(1);
*root= page.pos;
page_store_info(share, &page);
/*
Clear unitialized part of page to avoid valgrind/purify warnings
and to get a clean page that is easier to compress and compare with
pages generated with redo
*/
bzero(page.buff + page.size, share->block_size - page.size);
if (share->now_transactional && _ma_log_new(&page, 1))
res= 1;
if (_ma_write_keypage(&page, page_link->write_lock,
PAGECACHE_PRIORITY_HIGH))
res= 1;
DBUG_RETURN(res);
} | O0 | c | ma_enlarge_root:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xa8(%rbp)
movb $0x0, -0xe1(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rax
movq 0x378(%rax), %rax
movq %rax, -0xd0(%rbp)
movl $0x0, -0xb4(%rbp)
movq -0x20(%rbp), %rax
cmpq $-0x1, (%rax)
je 0x67fc7
movq -0x80(%rbp), %rax
movl 0x3e4(%rax), %eax
movl %eax, -0xec(%rbp)
jmp 0x67fd1
xorl %eax, %eax
movl %eax, -0xec(%rbp)
jmp 0x67fd1
movl -0xec(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0x80(%rbp), %rax
movl 0x744(%rax), %eax
addq %rax, %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
callq 0x95850
movq -0xa8(%rbp), %rax
movq 0xf0(%rax), %rax
movq -0x18(%rbp), %rdi
movl -0x28(%rbp), %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq -0x78(%rbp), %r9
movq %r8, %rdx
movq %r8, %rcx
callq *%rax
movl %eax, -0x24(%rbp)
movq -0x80(%rbp), %rax
movl 0x744(%rax), %eax
addl -0x24(%rbp), %eax
addl -0x28(%rbp), %eax
movl %eax, -0xc0(%rbp)
movq -0xd0(%rbp), %rdi
movq -0x80(%rbp), %rax
movl 0x744(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2a0
movq -0xa8(%rbp), %rax
movb 0xa5(%rax), %dl
movq -0xd0(%rbp), %rax
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
subl $0x1, %ecx
subl $0x1, %ecx
subl $0x2, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
cmpl $0x0, -0x28(%rbp)
je 0x68098
movl -0xb4(%rbp), %eax
orl $0x1, %eax
movl %eax, -0xb4(%rbp)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x180000, %eax # imm = 0x180000
cmpl $0x0, %eax
je 0x680b8
movl -0xb4(%rbp), %eax
orl $0x2, %eax
movl %eax, -0xb4(%rbp)
movq -0xa8(%rbp), %rax
movq 0xf8(%rax), %rax
movq -0xa8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
addq %rcx, %rsi
movl -0x28(%rbp), %ecx
addq %rcx, %rsi
leaq -0x78(%rbp), %rdx
callq *%rax
movq -0x10(%rbp), %rax
movb $0x1, 0x684(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x685(%rax)
movq -0x10(%rbp), %rdi
movl $0x6, %esi
leaq -0xa0(%rbp), %rdx
callq 0x9a0d0
movq %rax, -0xc8(%rbp)
cmpq $-0x1, %rax
jne 0x68130
jmp 0x68127
movb $0x1, -0x1(%rbp)
jmp 0x68237
movq -0xc8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0xb4(%rbp), %eax
movb %al, %dl
movq -0xd0(%rbp), %rax
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
subl $0x2, %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl -0xc0(%rbp), %eax
movl %eax, -0xe8(%rbp)
movl -0xe8(%rbp), %eax
movb %al, %dl
movq -0xd0(%rbp), %rax
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
movb %dl, -0x1(%rax,%rcx)
movl -0xe8(%rbp), %eax
shrl $0x8, %eax
movb %al, %dl
movq -0xd0(%rbp), %rax
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
movb %dl, -0x2(%rax,%rcx)
movq -0xd0(%rbp), %rdi
movl -0xc0(%rbp), %eax
addq %rax, %rdi
movq -0x80(%rbp), %rax
movl 0x7bc(%rax), %eax
subl -0xc0(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2a0
movq -0x80(%rbp), %rax
movsbl 0x7e7(%rax), %eax
cmpl $0x0, %eax
je 0x68206
leaq -0xe0(%rbp), %rdi
movl $0x1, %esi
callq 0x68250
movsbl %al, %eax
cmpl $0x0, %eax
je 0x68206
movb $0x1, -0xe1(%rbp)
movq -0xa0(%rbp), %rax
movl 0xc(%rax), %esi
leaq -0xe0(%rbp), %rdi
movl $0x6, %edx
callq 0x99b00
cmpb $0x0, %al
je 0x6822c
movb $0x1, -0xe1(%rbp)
jmp 0x6822e
movb -0xe1(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_enlarge_root:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_80], rax
lea rax, [rbp+var_98]
mov [rbp+var_A0], rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_A8], rax
mov [rbp+var_E1], 0
mov rax, [rbp+var_10]
mov [rbp+var_E0], rax
mov rax, [rbp+var_A8]
mov [rbp+var_D8], rax
mov rax, [rbp+var_10]
mov rax, [rax+378h]
mov [rbp+var_D0], rax
mov [rbp+var_B4], 0
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh
jz short loc_67FC7
mov rax, [rbp+var_80]
mov eax, [rax+3E4h]
mov [rbp+var_EC], eax
jmp short loc_67FD1
loc_67FC7:
xor eax, eax
mov [rbp+var_EC], eax
jmp short $+2
loc_67FD1:
mov eax, [rbp+var_EC]
mov [rbp+var_28], eax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_D0]
mov rax, [rbp+var_80]
mov eax, [rax+744h]
add rsi, rax
mov rax, [rbp+var_20]
mov rdx, [rax]
call _ma_kpointer
mov rax, [rbp+var_A8]
mov rax, [rax+0F0h]
mov rdi, [rbp+var_18]
mov esi, [rbp+var_28]
xor ecx, ecx
mov r8d, ecx
lea r9, [rbp+var_78]
mov rdx, r8
mov rcx, r8
call rax
mov [rbp+var_24], eax
mov rax, [rbp+var_80]
mov eax, [rax+744h]
add eax, [rbp+var_24]
add eax, [rbp+var_28]
mov [rbp+var_C0], eax
mov rdi, [rbp+var_D0]
mov rax, [rbp+var_80]
mov eax, [rax+744h]
mov edx, eax
xor esi, esi
call _memset
mov rax, [rbp+var_A8]
mov dl, [rax+0A5h]
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
sub ecx, 1
sub ecx, 1
sub ecx, 2
mov ecx, ecx
mov [rax+rcx], dl
cmp [rbp+var_28], 0
jz short loc_68098
mov eax, [rbp+var_B4]
or eax, 1
mov [rbp+var_B4], eax
loc_68098:
mov rax, [rbp+var_18]
mov eax, [rax+18h]
and eax, 180000h
cmp eax, 0
jz short loc_680B8
mov eax, [rbp+var_B4]
or eax, 2
mov [rbp+var_B4], eax
loc_680B8:
mov rax, [rbp+var_A8]
mov rax, [rax+0F8h]
mov rdi, [rbp+var_A8]
mov rsi, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
add rsi, rcx
mov ecx, [rbp+var_28]
add rsi, rcx
lea rdx, [rbp+var_78]
call rax
mov rax, [rbp+var_10]
mov byte ptr [rax+684h], 1
mov rax, [rbp+var_10]
mov byte ptr [rax+685h], 1
mov rdi, [rbp+var_10]
mov esi, 6
lea rdx, [rbp+var_A0]
call _ma_new
mov [rbp+var_C8], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_68130
jmp short $+2
loc_68127:
mov [rbp+var_1], 1
jmp loc_68237
loc_68130:
mov rcx, [rbp+var_C8]
mov rax, [rbp+var_20]
mov [rax], rcx
mov eax, [rbp+var_B4]
mov dl, al
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
sub ecx, 2
sub ecx, 1
mov ecx, ecx
mov [rax+rcx], dl
mov eax, [rbp+var_C0]
mov [rbp+var_E8], eax
mov eax, [rbp+var_E8]
mov dl, al
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
mov [rax+rcx-1], dl
mov eax, [rbp+var_E8]
shr eax, 8
mov dl, al
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
mov [rax+rcx-2], dl
mov rdi, [rbp+var_D0]
mov eax, [rbp+var_C0]
add rdi, rax
mov rax, [rbp+var_80]
mov eax, [rax+7BCh]
sub eax, [rbp+var_C0]
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
mov rax, [rbp+var_80]
movsx eax, byte ptr [rax+7E7h]
cmp eax, 0
jz short loc_68206
lea rdi, [rbp+var_E0]
mov esi, 1
call _ma_log_new
movsx eax, al
cmp eax, 0
jz short loc_68206
mov [rbp+var_E1], 1
loc_68206:
mov rax, [rbp+var_A0]
mov esi, [rax+0Ch]
lea rdi, [rbp+var_E0]
mov edx, 6
call _ma_write_keypage
cmp al, 0
jz short loc_6822C
mov [rbp+var_E1], 1
loc_6822C:
jmp short $+2
loc_6822E:
mov al, [rbp+var_E1]
mov [rbp+var_1], al
loc_68237:
mov al, [rbp+var_1]
add rsp, 0F0h
pop rbp
retn
| char ma_enlarge_root(_QWORD *a1, long long a2, long long *a3)
{
unsigned int v4; // [rsp+4h] [rbp-ECh]
char v5; // [rsp+9h] [rbp-E7h]
char v6; // [rsp+Fh] [rbp-E1h]
_QWORD v7[2]; // [rsp+10h] [rbp-E0h] BYREF
long long v8; // [rsp+20h] [rbp-D0h]
long long v9; // [rsp+28h] [rbp-C8h]
unsigned int v10; // [rsp+30h] [rbp-C0h]
int v11; // [rsp+3Ch] [rbp-B4h]
long long v12; // [rsp+48h] [rbp-A8h]
char *v13; // [rsp+50h] [rbp-A0h] BYREF
char v14; // [rsp+58h] [rbp-98h] BYREF
long long v15; // [rsp+70h] [rbp-80h]
_BYTE v16[80]; // [rsp+78h] [rbp-78h] BYREF
unsigned int v17; // [rsp+C8h] [rbp-28h]
int v18; // [rsp+CCh] [rbp-24h]
long long *v19; // [rsp+D0h] [rbp-20h]
long long v20; // [rsp+D8h] [rbp-18h]
_QWORD *v21; // [rsp+E0h] [rbp-10h]
v21 = a1;
v20 = a2;
v19 = a3;
v15 = *a1;
v13 = &v14;
v12 = *(_QWORD *)(a2 + 8);
v6 = 0;
v7[0] = a1;
v7[1] = v12;
v8 = a1[111];
v11 = 0;
if ( *a3 == -1 )
v4 = 0;
else
v4 = *(_DWORD *)(v15 + 996);
v17 = v4;
ma_kpointer(v21, *(unsigned int *)(v15 + 1860) + v8, *v19);
v18 = (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, _BYTE *))(v12 + 240))(
v20,
v17,
0LL,
0LL,
0LL,
v16);
v10 = v17 + v18 + *(_DWORD *)(v15 + 1860);
memset(v8, 0LL, *(unsigned int *)(v15 + 1860));
*(_BYTE *)(v8 + (unsigned int)(*(_DWORD *)(v15 + 1860) - 4)) = *(_BYTE *)(v12 + 165);
if ( v17 )
v11 |= 1u;
if ( (*(_DWORD *)(v20 + 24) & 0x180000) != 0 )
v11 |= 2u;
(*(void ( **)(long long, long long, _BYTE *))(v12 + 248))(v12, v17 + *(unsigned int *)(v15 + 1860) + v8, v16);
*((_BYTE *)v21 + 1668) = 1;
*((_BYTE *)v21 + 1669) = 1;
v9 = ma_new(v21, 6LL, &v13);
if ( v9 == -1 )
return 1;
*v19 = v9;
*(_BYTE *)(v8 + (unsigned int)(*(_DWORD *)(v15 + 1860) - 3)) = v11;
v5 = BYTE1(v10);
*(_BYTE *)(v8 + *(unsigned int *)(v15 + 1860) - 1) = v10;
*(_BYTE *)(v8 + *(unsigned int *)(v15 + 1860) - 2) = v5;
memset(v10 + v8, 0LL, *(_DWORD *)(v15 + 1980) - v10);
if ( *(_BYTE *)(v15 + 2023) && (unsigned __int8)ma_log_new(v7, 1LL) )
v6 = 1;
if ( (unsigned __int8)ma_write_keypage(v7, *((unsigned int *)v13 + 3), 6LL) )
return 1;
return v6;
}
| _ma_enlarge_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x80],RAX
LEA RAX,[RBP + -0x98]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0xa8],RAX
MOV byte ptr [RBP + -0xe1],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xe0],RAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0xd8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x378]
MOV qword ptr [RBP + -0xd0],RAX
MOV dword ptr [RBP + -0xb4],0x0
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],-0x1
JZ 0x00167fc7
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x3e4]
MOV dword ptr [RBP + -0xec],EAX
JMP 0x00167fd1
LAB_00167fc7:
XOR EAX,EAX
MOV dword ptr [RBP + -0xec],EAX
JMP 0x00167fd1
LAB_00167fd1:
MOV EAX,dword ptr [RBP + -0xec]
MOV dword ptr [RBP + -0x28],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0xd0]
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x744]
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX]
CALL 0x00195850
MOV RAX,qword ptr [RBP + -0xa8]
MOV RAX,qword ptr [RAX + 0xf0]
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x28]
XOR ECX,ECX
MOV R8D,ECX
LEA R9,[RBP + -0x78]
MOV RDX,R8
MOV RCX,R8
CALL RAX
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x744]
ADD EAX,dword ptr [RBP + -0x24]
ADD EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0xc0],EAX
MOV RDI,qword ptr [RBP + -0xd0]
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x744]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2a0
MOV RAX,qword ptr [RBP + -0xa8]
MOV DL,byte ptr [RAX + 0xa5]
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
SUB ECX,0x1
SUB ECX,0x1
SUB ECX,0x2
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
CMP dword ptr [RBP + -0x28],0x0
JZ 0x00168098
MOV EAX,dword ptr [RBP + -0xb4]
OR EAX,0x1
MOV dword ptr [RBP + -0xb4],EAX
LAB_00168098:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x18]
AND EAX,0x180000
CMP EAX,0x0
JZ 0x001680b8
MOV EAX,dword ptr [RBP + -0xb4]
OR EAX,0x2
MOV dword ptr [RBP + -0xb4],EAX
LAB_001680b8:
MOV RAX,qword ptr [RBP + -0xa8]
MOV RAX,qword ptr [RAX + 0xf8]
MOV RDI,qword ptr [RBP + -0xa8]
MOV RSI,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
ADD RSI,RCX
MOV ECX,dword ptr [RBP + -0x28]
ADD RSI,RCX
LEA RDX,[RBP + -0x78]
CALL RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x684],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x685],0x1
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x6
LEA RDX,[RBP + -0xa0]
CALL 0x0019a0d0
MOV qword ptr [RBP + -0xc8],RAX
CMP RAX,-0x1
JNZ 0x00168130
JMP 0x00168127
LAB_00168127:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00168237
LAB_00168130:
MOV RCX,qword ptr [RBP + -0xc8]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0xb4]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
SUB ECX,0x2
SUB ECX,0x1
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0xc0]
MOV dword ptr [RBP + -0xe8],EAX
MOV EAX,dword ptr [RBP + -0xe8]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
MOV byte ptr [RAX + RCX*0x1 + -0x1],DL
MOV EAX,dword ptr [RBP + -0xe8]
SHR EAX,0x8
MOV DL,AL
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
MOV byte ptr [RAX + RCX*0x1 + -0x2],DL
MOV RDI,qword ptr [RBP + -0xd0]
MOV EAX,dword ptr [RBP + -0xc0]
ADD RDI,RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x7bc]
SUB EAX,dword ptr [RBP + -0xc0]
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2a0
MOV RAX,qword ptr [RBP + -0x80]
MOVSX EAX,byte ptr [RAX + 0x7e7]
CMP EAX,0x0
JZ 0x00168206
LEA RDI,[RBP + -0xe0]
MOV ESI,0x1
CALL 0x00168250
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00168206
MOV byte ptr [RBP + -0xe1],0x1
LAB_00168206:
MOV RAX,qword ptr [RBP + -0xa0]
MOV ESI,dword ptr [RAX + 0xc]
LEA RDI,[RBP + -0xe0]
MOV EDX,0x6
CALL 0x00199b00
CMP AL,0x0
JZ 0x0016822c
MOV byte ptr [RBP + -0xe1],0x1
LAB_0016822c:
JMP 0x0016822e
LAB_0016822e:
MOV AL,byte ptr [RBP + -0xe1]
MOV byte ptr [RBP + -0x1],AL
LAB_00168237:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0xf0
POP RBP
RET
|
int8 _ma_enlarge_root(long *param_1,long param_2,long *param_3)
{
char cVar1;
int8 uVar2;
int7 uVar3;
uint local_f4;
int1 local_e9;
long *local_e8;
long local_e0;
void *local_d8;
long local_d0;
uint local_c8;
uint local_bc;
long local_b0;
int1 *local_a8;
int1 local_a0 [24];
long local_88;
int1 local_80 [80];
uint local_30;
int local_2c;
long *local_28;
long local_20;
long *local_18;
int1 local_9;
local_88 = *param_1;
local_a8 = local_a0;
local_e0 = *(long *)(param_2 + 8);
local_e9 = 0;
local_d8 = (void *)param_1[0x6f];
local_bc = 0;
if (*param_3 == -1) {
local_f4 = 0;
}
else {
local_f4 = *(uint *)(local_88 + 0x3e4);
}
local_30 = local_f4;
local_e8 = param_1;
local_b0 = local_e0;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
_ma_kpointer(param_1,(long)local_d8 + (ulong)*(uint *)(local_88 + 0x744),*param_3);
local_2c = (**(code **)(local_b0 + 0xf0))(local_20,local_30,0,0,0,local_80);
local_c8 = *(int *)(local_88 + 0x744) + local_2c + local_30;
memset(local_d8,0,(ulong)*(uint *)(local_88 + 0x744));
*(int1 *)((long)local_d8 + (ulong)(*(int *)(local_88 + 0x744) - 4)) =
*(int1 *)(local_b0 + 0xa5);
if (local_30 != 0) {
local_bc = local_bc | 1;
}
if ((*(uint *)(local_20 + 0x18) & 0x180000) != 0) {
local_bc = local_bc | 2;
}
(**(code **)(local_b0 + 0xf8))
(local_b0,(long)local_d8 + (ulong)local_30 + (ulong)*(uint *)(local_88 + 0x744),local_80
);
*(int1 *)((long)local_18 + 0x684) = 1;
*(int1 *)((long)local_18 + 0x685) = 1;
local_d0 = _ma_new(local_18,6,&local_a8);
if (local_d0 == -1) {
local_9 = 1;
uVar3 = 0xffffffffffffff;
}
else {
*local_28 = local_d0;
*(char *)((long)local_d8 + (ulong)(*(int *)(local_88 + 0x744) - 3)) = (char)local_bc;
*(char *)((long)local_d8 + ((ulong)*(uint *)(local_88 + 0x744) - 1)) = (char)local_c8;
*(char *)((long)local_d8 + ((ulong)*(uint *)(local_88 + 0x744) - 2)) = (char)(local_c8 >> 8);
memset((void *)((long)local_d8 + (ulong)local_c8),0,
(ulong)(*(int *)(local_88 + 0x7bc) - local_c8));
if (*(char *)(local_88 + 0x7e7) != '\0') {
cVar1 = _ma_log_new(&local_e8,1);
if (cVar1 != '\0') {
local_e9 = 1;
}
}
uVar2 = _ma_write_keypage(&local_e8,*(int4 *)(local_a8 + 0xc),6);
if ((char)uVar2 != '\0') {
local_e9 = 1;
}
uVar3 = (int7)((ulong)uVar2 >> 8);
local_9 = local_e9;
}
return CONCAT71(uVar3,local_9);
}
| |
33,865 | strmake_root | eloqsql/mysys/my_alloc.c | char *strmake_root(MEM_ROOT *root, const char *str, size_t len)
{
char *pos;
if ((pos=alloc_root(root,len+1)))
{
if (len)
memcpy(pos,str,len);
pos[len]=0;
}
return pos;
} | O0 | c | strmake_root:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
callq 0xed460
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xedd63
cmpq $0x0, -0x18(%rbp)
je 0xedd57
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2a090
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| strmake_root:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
add rsi, 1
call alloc_root
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_EDD63
cmp [rbp+var_18], 0
jz short loc_EDD57
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _memcpy
loc_EDD57:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
mov byte ptr [rax+rcx], 0
loc_EDD63:
mov rax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
| char * strmake_root(_QWORD **a1, long long a2, long long a3)
{
char *v4; // [rsp+0h] [rbp-20h]
v4 = alloc_root(a1, a3 + 1);
if ( v4 )
{
if ( a3 )
memcpy(v4, a2, a3);
v4[a3] = 0;
}
return v4;
}
| strmake_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x1
CALL 0x001ed460
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x001edd63
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001edd57
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0012a090
LAB_001edd57:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_001edd63:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
void * strmake_root(int8 param_1,void *param_2,size_t param_3)
{
void *__dest;
__dest = (void *)alloc_root(param_1,param_3 + 1);
if (__dest != (void *)0x0) {
if (param_3 != 0) {
memcpy(__dest,param_2,param_3);
}
*(int1 *)((long)__dest + param_3) = 0;
}
return __dest;
}
| |
33,866 | mysql_load_plugin_v | eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c | struct st_mysql_client_plugin * STDCALL
mysql_load_plugin_v(MYSQL *mysql, const char *name, int type,
int argc, va_list args)
{
const char *errmsg;
#ifdef _WIN32
char errbuf[1024];
#endif
char dlpath[FN_REFLEN+1];
void *sym, *dlhandle = NULL;
struct st_mysql_client_plugin *plugin;
char *env_plugin_dir= getenv("MARIADB_PLUGIN_DIR");
CLEAR_CLIENT_ERROR(mysql);
if (is_not_initialized(mysql, name))
return NULL;
pthread_mutex_lock(&LOCK_load_client_plugin);
/* make sure the plugin wasn't loaded meanwhile */
if (type >= 0 && find_plugin(name, type))
{
errmsg= "it is already loaded";
goto err;
}
/* Compile dll path */
#ifndef WIN32
snprintf(dlpath, sizeof(dlpath) - 1, "%s/%s%s",
mysql->options.extension && mysql->options.extension->plugin_dir ?
mysql->options.extension->plugin_dir : (env_plugin_dir) ? env_plugin_dir :
MARIADB_PLUGINDIR, name, SO_EXT);
#else
{
char *p= (mysql->options.extension && mysql->options.extension->plugin_dir) ?
mysql->options.extension->plugin_dir : env_plugin_dir;
snprintf(dlpath, sizeof(dlpath), "%s%s%s%s", p ? p : "", p ? "\\" : "", name, SO_EXT);
}
#endif
if (strpbrk(name, "()[]!@#$%^&/*;.,'?\\"))
{
errmsg= "invalid plugin name";
goto err;
}
/* Open new dll handle */
if (!(dlhandle= dlopen((const char *)dlpath, RTLD_NOW)))
{
#ifdef _WIN32
char winmsg[255];
size_t len;
winmsg[0] = 0;
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
winmsg, 255, NULL);
len= strlen(winmsg);
while (len > 0 && (winmsg[len - 1] == '\n' || winmsg[len - 1] == '\r'))
len--;
if (len)
winmsg[len] = 0;
snprintf(errbuf, sizeof(errbuf), "%s Library path is '%s'", winmsg, dlpath);
errmsg= errbuf;
#else
errmsg= dlerror();
#endif
goto err;
}
if (!(sym= dlsym(dlhandle, plugin_declarations_sym)))
{
errmsg= "not a plugin";
(void)dlclose(dlhandle);
goto err;
}
plugin= (struct st_mysql_client_plugin*)sym;
if (type >=0 && type != plugin->type)
{
errmsg= "type mismatch";
goto err;
}
if (strcmp(name, plugin->name))
{
errmsg= "name mismatch";
goto err;
}
if (type < 0 && find_plugin(name, plugin->type))
{
errmsg= "it is already loaded";
goto err;
}
plugin= add_plugin(mysql, plugin, dlhandle, argc, args);
pthread_mutex_unlock(&LOCK_load_client_plugin);
return plugin;
err:
if (dlhandle)
dlclose(dlhandle);
pthread_mutex_unlock(&LOCK_load_client_plugin);
my_set_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, SQLSTATE_UNKNOWN,
ER(CR_AUTH_PLUGIN_CANNOT_LOAD), name, errmsg);
return NULL;
} | O0 | c | mysql_load_plugin_v:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp # imm = 0x280
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x220(%rbp)
movq %rsi, -0x228(%rbp)
movl %edx, -0x22c(%rbp)
movl %ecx, -0x230(%rbp)
movq %r8, -0x238(%rbp)
movq $0x0, -0x250(%rbp)
leaq 0x88a0e(%rip), %rdi # 0x146e19
callq 0x3a7a0
movq %rax, -0x260(%rbp)
movq -0x220(%rbp), %rax
movl $0x0, 0x90(%rax)
movq -0x220(%rbp), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x7f11f(%rip), %rsi # 0x13d55c
callq 0x3a410
movq -0x220(%rbp), %rax
movb $0x0, 0x97(%rax)
movq -0x220(%rbp), %rax
cmpq $0x0, 0x2a0(%rax)
je 0xbe476
movq -0x220(%rbp), %rax
movq 0x2a0(%rax), %rax
movl $0x0, 0x4(%rax)
jmp 0xbe478
movq -0x220(%rbp), %rdi
movq -0x228(%rbp), %rsi
callq 0xbe2a0
cmpl $0x0, %eax
je 0xbe4a0
movq $0x0, -0x218(%rbp)
jmp 0xbe779
leaq 0x3b0971(%rip), %rdi # 0x46ee18
callq 0x3a270
cmpl $0x0, -0x22c(%rbp)
jl 0xbe4e0
movq -0x228(%rbp), %rdi
movl -0x22c(%rbp), %esi
callq 0xbe310
cmpq $0x0, %rax
je 0xbe4e0
leaq 0x88958(%rip), %rax # 0x146e2c
movq %rax, -0x240(%rbp)
jmp 0xbe713
leaq -0x210(%rbp), %rax
movq %rax, -0x268(%rbp)
movq -0x220(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0xbe52d
movq -0x220(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, (%rax)
je 0xbe52d
movq -0x220(%rbp), %rax
movq 0x480(%rax), %rax
movq (%rax), %rax
movq %rax, -0x270(%rbp)
jmp 0xbe565
cmpq $0x0, -0x260(%rbp)
je 0xbe547
movq -0x260(%rbp), %rax
movq %rax, -0x278(%rbp)
jmp 0xbe557
leaq 0x888fb(%rip), %rax # 0x146e49
movq %rax, -0x278(%rbp)
jmp 0xbe557
movq -0x278(%rbp), %rax
movq %rax, -0x270(%rbp)
movq -0x268(%rbp), %rdi
movq -0x270(%rbp), %rcx
movq -0x228(%rbp), %r8
movl $0x200, %esi # imm = 0x200
leaq 0x888bb(%rip), %rdx # 0x146e41
leaq 0x888da(%rip), %r9 # 0x146e67
movb $0x0, %al
callq 0x3a4c0
movq -0x228(%rbp), %rdi
leaq 0x888c9(%rip), %rsi # 0x146e6b
callq 0x3a550
cmpq $0x0, %rax
je 0xbe5c0
leaq 0x888cb(%rip), %rax # 0x146e7f
movq %rax, -0x240(%rbp)
jmp 0xbe713
leaq -0x210(%rbp), %rdi
movl $0x2, %esi
callq 0x3a8d0
movq %rax, -0x250(%rbp)
cmpq $0x0, %rax
jne 0xbe5ef
callq 0x3a350
movq %rax, -0x240(%rbp)
jmp 0xbe713
movq -0x250(%rbp), %rdi
leaq 0x88896(%rip), %rsi # 0x146e93
callq 0x3a1b0
movq %rax, -0x248(%rbp)
cmpq $0x0, %rax
jne 0xbe62e
leaq 0x8889f(%rip), %rax # 0x146eb5
movq %rax, -0x240(%rbp)
movq -0x250(%rbp), %rdi
callq 0x3aa90
jmp 0xbe713
movq -0x248(%rbp), %rax
movq %rax, -0x258(%rbp)
cmpl $0x0, -0x22c(%rbp)
jl 0xbe669
movl -0x22c(%rbp), %eax
movq -0x258(%rbp), %rcx
cmpl (%rcx), %eax
je 0xbe669
leaq 0x88865(%rip), %rax # 0x146ec2
movq %rax, -0x240(%rbp)
jmp 0xbe713
movq -0x228(%rbp), %rdi
movq -0x258(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3a880
cmpl $0x0, %eax
je 0xbe695
leaq 0x88844(%rip), %rax # 0x146ed0
movq %rax, -0x240(%rbp)
jmp 0xbe713
cmpl $0x0, -0x22c(%rbp)
jge 0xbe6c9
movq -0x228(%rbp), %rdi
movq -0x258(%rbp), %rax
movl (%rax), %esi
callq 0xbe310
cmpq $0x0, %rax
je 0xbe6c9
leaq 0x8876c(%rip), %rax # 0x146e2c
movq %rax, -0x240(%rbp)
jmp 0xbe713
movq -0x220(%rbp), %rdi
movq -0x258(%rbp), %rsi
movq -0x250(%rbp), %rdx
movl -0x230(%rbp), %ecx
movq -0x238(%rbp), %r8
callq 0xbde50
movq %rax, -0x258(%rbp)
leaq 0x3b071a(%rip), %rdi # 0x46ee18
callq 0x3a240
movq -0x258(%rbp), %rax
movq %rax, -0x218(%rbp)
jmp 0xbe779
cmpq $0x0, -0x250(%rbp)
je 0xbe729
movq -0x250(%rbp), %rdi
callq 0x3aa90
leaq 0x3b06e8(%rip), %rdi # 0x46ee18
callq 0x3a240
movq -0x220(%rbp), %rdi
leaq 0x1f42ad(%rip), %rax # 0x2b29f0
movq (%rax), %rdx
leaq 0x1f42b3(%rip), %rax # 0x2b2a00
movq 0x1d8(%rax), %rcx
movq -0x228(%rbp), %r8
movq -0x240(%rbp), %r9
movl $0x80b, %esi # imm = 0x80B
movb $0x0, %al
callq 0x9e610
movq $0x0, -0x218(%rbp)
movq -0x218(%rbp), %rax
movq %rax, -0x280(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xbe7a9
movq -0x280(%rbp), %rax
addq $0x280, %rsp # imm = 0x280
popq %rbp
retq
callq 0x3a2a0
nop
| mysql_load_plugin_v:
push rbp
mov rbp, rsp
sub rsp, 280h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_220], rdi
mov [rbp+var_228], rsi
mov [rbp+var_22C], edx
mov [rbp+var_230], ecx
mov [rbp+var_238], r8
mov [rbp+var_250], 0
lea rdi, aMariadbPluginD; "MARIADB_PLUGIN_DIR"
call _getenv
mov [rbp+var_260], rax
mov rax, [rbp+var_220]
mov dword ptr [rax+90h], 0
mov rdi, [rbp+var_220]
add rdi, 297h
lea rsi, aSetGlobalQuery_0+1Eh; "00000"
call _strcpy
mov rax, [rbp+var_220]
mov byte ptr [rax+97h], 0
mov rax, [rbp+var_220]
cmp qword ptr [rax+2A0h], 0
jz short loc_BE476
mov rax, [rbp+var_220]
mov rax, [rax+2A0h]
mov dword ptr [rax+4], 0
loc_BE476:
jmp short $+2
loc_BE478:
mov rdi, [rbp+var_220]
mov rsi, [rbp+var_228]
call is_not_initialized
cmp eax, 0
jz short loc_BE4A0
mov [rbp+var_218], 0
jmp loc_BE779
loc_BE4A0:
lea rdi, LOCK_load_client_plugin
call _pthread_mutex_lock
cmp [rbp+var_22C], 0
jl short loc_BE4E0
mov rdi, [rbp+var_228]
mov esi, [rbp+var_22C]
call find_plugin
cmp rax, 0
jz short loc_BE4E0
lea rax, aItIsAlreadyLoa; "it is already loaded"
mov [rbp+var_240], rax
jmp loc_BE713
loc_BE4E0:
lea rax, [rbp+var_210]
mov [rbp+var_268], rax
mov rax, [rbp+var_220]
cmp qword ptr [rax+480h], 0
jz short loc_BE52D
mov rax, [rbp+var_220]
mov rax, [rax+480h]
cmp qword ptr [rax], 0
jz short loc_BE52D
mov rax, [rbp+var_220]
mov rax, [rax+480h]
mov rax, [rax]
mov [rbp+var_270], rax
jmp short loc_BE565
loc_BE52D:
cmp [rbp+var_260], 0
jz short loc_BE547
mov rax, [rbp+var_260]
mov [rbp+var_278], rax
jmp short loc_BE557
loc_BE547:
lea rax, aHomeMonoInstal; "/home/mono/install/lib/plugin"
mov [rbp+var_278], rax
jmp short $+2
loc_BE557:
mov rax, [rbp+var_278]
mov [rbp+var_270], rax
loc_BE565:
mov rdi, [rbp+var_268]
mov rcx, [rbp+var_270]
mov r8, [rbp+var_228]
mov esi, 200h
lea rdx, aSSS; "%s/%s%s"
lea r9, aSo; ".so"
mov al, 0
call _snprintf
mov rdi, [rbp+var_228]
lea rsi, asc_146E6B; "()[]!@#$%^&/*;.,'?\\"
call _strpbrk
cmp rax, 0
jz short loc_BE5C0
lea rax, aInvalidPluginN; "invalid plugin name"
mov [rbp+var_240], rax
jmp loc_BE713
loc_BE5C0:
lea rdi, [rbp+var_210]
mov esi, 2
call _dlopen
mov [rbp+var_250], rax
cmp rax, 0
jnz short loc_BE5EF
call _dlerror
mov [rbp+var_240], rax
jmp loc_BE713
loc_BE5EF:
mov rdi, [rbp+var_250]
lea rsi, aMysqlClientPlu; "_mysql_client_plugin_declaration_"
call _dlsym
mov [rbp+var_248], rax
cmp rax, 0
jnz short loc_BE62E
lea rax, aNotAPlugin; "not a plugin"
mov [rbp+var_240], rax
mov rdi, [rbp+var_250]
call _dlclose
jmp loc_BE713
loc_BE62E:
mov rax, [rbp+var_248]
mov [rbp+var_258], rax
cmp [rbp+var_22C], 0
jl short loc_BE669
mov eax, [rbp+var_22C]
mov rcx, [rbp+var_258]
cmp eax, [rcx]
jz short loc_BE669
lea rax, aTypeMismatch; "type mismatch"
mov [rbp+var_240], rax
jmp loc_BE713
loc_BE669:
mov rdi, [rbp+var_228]
mov rax, [rbp+var_258]
mov rsi, [rax+8]
call _strcmp
cmp eax, 0
jz short loc_BE695
lea rax, aNameMismatch; "name mismatch"
mov [rbp+var_240], rax
jmp short loc_BE713
loc_BE695:
cmp [rbp+var_22C], 0
jge short loc_BE6C9
mov rdi, [rbp+var_228]
mov rax, [rbp+var_258]
mov esi, [rax]
call find_plugin
cmp rax, 0
jz short loc_BE6C9
lea rax, aItIsAlreadyLoa; "it is already loaded"
mov [rbp+var_240], rax
jmp short loc_BE713
loc_BE6C9:
mov rdi, [rbp+var_220]
mov rsi, [rbp+var_258]
mov rdx, [rbp+var_250]
mov ecx, [rbp+var_230]
mov r8, [rbp+var_238]
call add_plugin
mov [rbp+var_258], rax
lea rdi, LOCK_load_client_plugin
call _pthread_mutex_unlock
mov rax, [rbp+var_258]
mov [rbp+var_218], rax
jmp short loc_BE779
loc_BE713:
cmp [rbp+var_250], 0
jz short loc_BE729
mov rdi, [rbp+var_250]
call _dlclose
loc_BE729:
lea rdi, LOCK_load_client_plugin
call _pthread_mutex_unlock
mov rdi, [rbp+var_220]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+1D8h]
mov r8, [rbp+var_228]
mov r9, [rbp+var_240]
mov esi, 80Bh
mov al, 0
call my_set_error
mov [rbp+var_218], 0
loc_BE779:
mov rax, [rbp+var_218]
mov [rbp+var_280], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_BE7A9
mov rax, [rbp+var_280]
add rsp, 280h
pop rbp
retn
loc_BE7A9:
call ___stack_chk_fail
| void (** mysql_load_plugin_v(long long a1, const char *a2, signed int a3, unsigned int a4, long long a5))(void)
{
const char *v6; // [rsp+8h] [rbp-278h]
long long v7; // [rsp+20h] [rbp-260h]
void (**v8)(void); // [rsp+28h] [rbp-258h]
long long v9; // [rsp+30h] [rbp-250h]
long long v10; // [rsp+38h] [rbp-248h]
const char *v11; // [rsp+40h] [rbp-240h]
_BYTE v16[520]; // [rsp+70h] [rbp-210h] BYREF
unsigned long long v17; // [rsp+278h] [rbp-8h]
v17 = __readfsqword(0x28u);
v9 = 0LL;
v7 = getenv("MARIADB_PLUGIN_DIR");
*(_DWORD *)(a1 + 144) = 0;
strcpy(a1 + 663, "00000");
*(_BYTE *)(a1 + 151) = 0;
if ( *(_QWORD *)(a1 + 672) )
*(_DWORD *)(*(_QWORD *)(a1 + 672) + 4LL) = 0;
if ( (unsigned int)is_not_initialized(a1, (long long)a2) )
return 0LL;
pthread_mutex_lock(&LOCK_load_client_plugin);
if ( a3 >= 0 && find_plugin((long long)a2, a3) )
{
v11 = "it is already loaded";
}
else
{
if ( *(_QWORD *)(a1 + 1152) && **(_QWORD **)(a1 + 1152) )
{
snprintf(v16, 512LL, "%s/%s%s", **(const char ***)(a1 + 1152), a2, ".so");
}
else
{
if ( v7 )
v6 = (const char *)v7;
else
v6 = "/home/mono/install/lib/plugin";
snprintf(v16, 512LL, "%s/%s%s", v6, a2, ".so");
}
if ( strpbrk(a2, "()[]!@#$%^&/*;.,'?\\") )
{
v11 = "invalid plugin name";
}
else
{
v9 = dlopen(v16, 2LL);
if ( v9 )
{
v10 = dlsym(v9, "_mysql_client_plugin_declaration_");
if ( v10 )
{
if ( a3 < 0 || a3 == *(_DWORD *)v10 )
{
if ( !(unsigned int)strcmp(a2, *(_QWORD *)(v10 + 8)) )
{
if ( a3 >= 0 || !find_plugin((long long)a2, *(_DWORD *)v10) )
{
v8 = add_plugin(a1, (void (**)(void))v10, v9, a4, a5);
pthread_mutex_unlock(&LOCK_load_client_plugin);
return v8;
}
v11 = "it is already loaded";
}
else
{
v11 = "name mismatch";
}
}
else
{
v11 = "type mismatch";
}
}
else
{
v11 = "not a plugin";
dlclose(v9);
}
}
else
{
v11 = (const char *)dlerror();
}
}
}
if ( v9 )
dlclose(v9);
pthread_mutex_unlock(&LOCK_load_client_plugin);
my_set_error(a1, 0x80Bu, (long long)SQLSTATE_UNKNOWN, (long long)client_errors[59], a2, v11);
return 0LL;
}
| mysql_load_plugin_v:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x280
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x220],RDI
MOV qword ptr [RBP + -0x228],RSI
MOV dword ptr [RBP + -0x22c],EDX
MOV dword ptr [RBP + -0x230],ECX
MOV qword ptr [RBP + -0x238],R8
MOV qword ptr [RBP + -0x250],0x0
LEA RDI,[0x246e19]
CALL 0x0013a7a0
MOV qword ptr [RBP + -0x260],RAX
MOV RAX,qword ptr [RBP + -0x220]
MOV dword ptr [RAX + 0x90],0x0
MOV RDI,qword ptr [RBP + -0x220]
ADD RDI,0x297
LEA RSI,[0x23d55c]
CALL 0x0013a410
MOV RAX,qword ptr [RBP + -0x220]
MOV byte ptr [RAX + 0x97],0x0
MOV RAX,qword ptr [RBP + -0x220]
CMP qword ptr [RAX + 0x2a0],0x0
JZ 0x001be476
MOV RAX,qword ptr [RBP + -0x220]
MOV RAX,qword ptr [RAX + 0x2a0]
MOV dword ptr [RAX + 0x4],0x0
LAB_001be476:
JMP 0x001be478
LAB_001be478:
MOV RDI,qword ptr [RBP + -0x220]
MOV RSI,qword ptr [RBP + -0x228]
CALL 0x001be2a0
CMP EAX,0x0
JZ 0x001be4a0
MOV qword ptr [RBP + -0x218],0x0
JMP 0x001be779
LAB_001be4a0:
LEA RDI,[0x56ee18]
CALL 0x0013a270
CMP dword ptr [RBP + -0x22c],0x0
JL 0x001be4e0
MOV RDI,qword ptr [RBP + -0x228]
MOV ESI,dword ptr [RBP + -0x22c]
CALL 0x001be310
CMP RAX,0x0
JZ 0x001be4e0
LEA RAX,[0x246e2c]
MOV qword ptr [RBP + -0x240],RAX
JMP 0x001be713
LAB_001be4e0:
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x268],RAX
MOV RAX,qword ptr [RBP + -0x220]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x001be52d
MOV RAX,qword ptr [RBP + -0x220]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX],0x0
JZ 0x001be52d
MOV RAX,qword ptr [RBP + -0x220]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x270],RAX
JMP 0x001be565
LAB_001be52d:
CMP qword ptr [RBP + -0x260],0x0
JZ 0x001be547
MOV RAX,qword ptr [RBP + -0x260]
MOV qword ptr [RBP + -0x278],RAX
JMP 0x001be557
LAB_001be547:
LEA RAX,[0x246e49]
MOV qword ptr [RBP + -0x278],RAX
JMP 0x001be557
LAB_001be557:
MOV RAX,qword ptr [RBP + -0x278]
MOV qword ptr [RBP + -0x270],RAX
LAB_001be565:
MOV RDI,qword ptr [RBP + -0x268]
MOV RCX,qword ptr [RBP + -0x270]
MOV R8,qword ptr [RBP + -0x228]
MOV ESI,0x200
LEA RDX,[0x246e41]
LEA R9,[0x246e67]
MOV AL,0x0
CALL 0x0013a4c0
MOV RDI,qword ptr [RBP + -0x228]
LEA RSI,[0x246e6b]
CALL 0x0013a550
CMP RAX,0x0
JZ 0x001be5c0
LEA RAX,[0x246e7f]
MOV qword ptr [RBP + -0x240],RAX
JMP 0x001be713
LAB_001be5c0:
LEA RDI,[RBP + -0x210]
MOV ESI,0x2
CALL 0x0013a8d0
MOV qword ptr [RBP + -0x250],RAX
CMP RAX,0x0
JNZ 0x001be5ef
CALL 0x0013a350
MOV qword ptr [RBP + -0x240],RAX
JMP 0x001be713
LAB_001be5ef:
MOV RDI,qword ptr [RBP + -0x250]
LEA RSI,[0x246e93]
CALL 0x0013a1b0
MOV qword ptr [RBP + -0x248],RAX
CMP RAX,0x0
JNZ 0x001be62e
LEA RAX,[0x246eb5]
MOV qword ptr [RBP + -0x240],RAX
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x0013aa90
JMP 0x001be713
LAB_001be62e:
MOV RAX,qword ptr [RBP + -0x248]
MOV qword ptr [RBP + -0x258],RAX
CMP dword ptr [RBP + -0x22c],0x0
JL 0x001be669
MOV EAX,dword ptr [RBP + -0x22c]
MOV RCX,qword ptr [RBP + -0x258]
CMP EAX,dword ptr [RCX]
JZ 0x001be669
LEA RAX,[0x246ec2]
MOV qword ptr [RBP + -0x240],RAX
JMP 0x001be713
LAB_001be669:
MOV RDI,qword ptr [RBP + -0x228]
MOV RAX,qword ptr [RBP + -0x258]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x0013a880
CMP EAX,0x0
JZ 0x001be695
LEA RAX,[0x246ed0]
MOV qword ptr [RBP + -0x240],RAX
JMP 0x001be713
LAB_001be695:
CMP dword ptr [RBP + -0x22c],0x0
JGE 0x001be6c9
MOV RDI,qword ptr [RBP + -0x228]
MOV RAX,qword ptr [RBP + -0x258]
MOV ESI,dword ptr [RAX]
CALL 0x001be310
CMP RAX,0x0
JZ 0x001be6c9
LEA RAX,[0x246e2c]
MOV qword ptr [RBP + -0x240],RAX
JMP 0x001be713
LAB_001be6c9:
MOV RDI,qword ptr [RBP + -0x220]
MOV RSI,qword ptr [RBP + -0x258]
MOV RDX,qword ptr [RBP + -0x250]
MOV ECX,dword ptr [RBP + -0x230]
MOV R8,qword ptr [RBP + -0x238]
CALL 0x001bde50
MOV qword ptr [RBP + -0x258],RAX
LEA RDI,[0x56ee18]
CALL 0x0013a240
MOV RAX,qword ptr [RBP + -0x258]
MOV qword ptr [RBP + -0x218],RAX
JMP 0x001be779
LAB_001be713:
CMP qword ptr [RBP + -0x250],0x0
JZ 0x001be729
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x0013aa90
LAB_001be729:
LEA RDI,[0x56ee18]
CALL 0x0013a240
MOV RDI,qword ptr [RBP + -0x220]
LEA RAX,[0x3b29f0]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x3b2a00]
MOV RCX,qword ptr [RAX + 0x1d8]
MOV R8,qword ptr [RBP + -0x228]
MOV R9,qword ptr [RBP + -0x240]
MOV ESI,0x80b
MOV AL,0x0
CALL 0x0019e610
MOV qword ptr [RBP + -0x218],0x0
LAB_001be779:
MOV RAX,qword ptr [RBP + -0x218]
MOV qword ptr [RBP + -0x280],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001be7a9
MOV RAX,qword ptr [RBP + -0x280]
ADD RSP,0x280
POP RBP
RET
LAB_001be7a9:
CALL 0x0013a2a0
|
int8
mysql_load_plugin_v(long param_1,char *param_2,int param_3,int4 param_4,int8 param_5)
{
int iVar1;
long lVar2;
char *pcVar3;
int *piVar4;
long in_FS_OFFSET;
char *local_280;
char *local_278;
long local_258;
char *local_248;
int8 local_220;
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_258 = 0;
local_280 = getenv("MARIADB_PLUGIN_DIR");
*(int4 *)(param_1 + 0x90) = 0;
strcpy((char *)(param_1 + 0x297),"00000");
*(int1 *)(param_1 + 0x97) = 0;
if (*(long *)(param_1 + 0x2a0) != 0) {
*(int4 *)(*(long *)(param_1 + 0x2a0) + 4) = 0;
}
iVar1 = is_not_initialized(param_1,param_2);
if (iVar1 == 0) {
pthread_mutex_lock((pthread_mutex_t *)LOCK_load_client_plugin);
if ((param_3 < 0) || (lVar2 = find_plugin(param_2,param_3), lVar2 == 0)) {
if ((*(long *)(param_1 + 0x480) == 0) || (**(long **)(param_1 + 0x480) == 0)) {
if (local_280 == (char *)0x0) {
local_280 = "/home/mono/install/lib/plugin";
}
local_278 = local_280;
}
else {
local_278 = (char *)**(int8 **)(param_1 + 0x480);
}
snprintf(local_218,0x200,"%s/%s%s",local_278,param_2,&DAT_00246e67);
pcVar3 = strpbrk(param_2,"()[]!@#$%^&/*;.,\'?\\");
if (pcVar3 == (char *)0x0) {
local_258 = dlopen(local_218,2);
if (local_258 == 0) {
local_248 = (char *)dlerror();
}
else {
piVar4 = (int *)dlsym(local_258,"_mysql_client_plugin_declaration_");
if (piVar4 == (int *)0x0) {
local_248 = "not a plugin";
dlclose(local_258);
}
else if ((param_3 < 0) || (param_3 == *piVar4)) {
iVar1 = strcmp(param_2,*(char **)(piVar4 + 2));
if (iVar1 == 0) {
if ((-1 < param_3) || (lVar2 = find_plugin(param_2,*piVar4), lVar2 == 0)) {
local_220 = add_plugin(param_1,piVar4,local_258,param_4,param_5);
pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin);
goto LAB_001be779;
}
local_248 = "it is already loaded";
}
else {
local_248 = "name mismatch";
}
}
else {
local_248 = "type mismatch";
}
}
}
else {
local_248 = "invalid plugin name";
}
}
else {
local_248 = "it is already loaded";
}
if (local_258 != 0) {
dlclose(local_258);
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin);
my_set_error(param_1,0x80b,SQLSTATE_UNKNOWN,PTR_s_Plugin__s_could_not_be_loaded____003b2bd8,
param_2,local_248);
local_220 = 0;
}
else {
local_220 = 0;
}
LAB_001be779:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_220;
}
| |
33,867 | minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&) | monkey531[P]llama/common/minja.hpp | Expression(const Location & location) : location(location) {} | O3 | cpp | minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&):
leaq 0x8878b(%rip), %rax # 0xda288
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x51b2e
movq 0x8a479(%rip), %r9 # 0xdbf98
cmpb $0x0, (%r9)
je 0x51b2a
incl 0x8(%rax)
jmp 0x51b2e
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rdi)
leaq 0x88cf3(%rip), %rax # 0xda830
addq $0x10, %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movups (%rdx), %xmm0
movq %rax, 0x8(%rdx)
movups %xmm0, 0x20(%rdi)
movq %rax, (%rdx)
movq %rax, 0x38(%rdi)
movups (%rcx), %xmm0
movq %rax, 0x8(%rcx)
movups %xmm0, 0x30(%rdi)
movq %rax, (%rcx)
movups (%r8), %xmm0
movups %xmm0, 0x40(%rdi)
movq 0x10(%r8), %rcx
movq %rcx, 0x50(%rdi)
movq %rax, 0x10(%r8)
xorps %xmm0, %xmm0
movups %xmm0, (%r8)
movups 0x18(%r8), %xmm1
movups %xmm1, 0x58(%rdi)
movq 0x28(%r8), %rcx
movq %rcx, 0x68(%rdi)
movq %rax, 0x28(%r8)
movups %xmm0, 0x18(%r8)
retq
| _ZN5minja14MethodCallExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEOS4_INS_12VariableExprEEONS_19ArgumentsExpressionE:
lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rax, 10h
mov [rdi], rax
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_51B2E
mov r9, cs:__libc_single_threaded_ptr
cmp byte ptr [r9], 0
jz short loc_51B2A
inc dword ptr [rax+8]
jmp short loc_51B2E
loc_51B2A:
lock inc dword ptr [rax+8]
loc_51B2E:
mov rax, [rsi+10h]
mov [rdi+18h], rax
lea rax, _ZTVN5minja14MethodCallExprE; `vtable for'minja::MethodCallExpr
add rax, 10h
mov [rdi], rax
xor eax, eax
mov [rdi+28h], rax
movups xmm0, xmmword ptr [rdx]
mov [rdx+8], rax
movups xmmword ptr [rdi+20h], xmm0
mov [rdx], rax
mov [rdi+38h], rax
movups xmm0, xmmword ptr [rcx]
mov [rcx+8], rax
movups xmmword ptr [rdi+30h], xmm0
mov [rcx], rax
movups xmm0, xmmword ptr [r8]
movups xmmword ptr [rdi+40h], xmm0
mov rcx, [r8+10h]
mov [rdi+50h], rcx
mov [r8+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r8], xmm0
movups xmm1, xmmword ptr [r8+18h]
movups xmmword ptr [rdi+58h], xmm1
mov rcx, [r8+28h]
mov [rdi+68h], rcx
mov [r8+28h], rax
movups xmmword ptr [r8+18h], xmm0
retn
| long long minja::MethodCallExpr::MethodCallExpr(
long long a1,
_QWORD *a2,
__int128 *a3,
__int128 *a4,
long long a5)
{
long long v5; // rax
long long result; // rax
__int128 v7; // xmm0
__int128 v8; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::Expression + 2;
*(_QWORD *)(a1 + 8) = *a2;
v5 = a2[1];
*(_QWORD *)(a1 + 16) = v5;
if ( v5 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v5 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v5 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::MethodCallExpr + 2;
result = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
v7 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v7;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v8 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v8;
*(_QWORD *)a4 = 0LL;
*(_OWORD *)(a1 + 64) = *(_OWORD *)a5;
*(_QWORD *)(a1 + 80) = *(_QWORD *)(a5 + 16);
*(_QWORD *)(a5 + 16) = 0LL;
*(_OWORD *)a5 = 0LL;
*(_OWORD *)(a1 + 88) = *(_OWORD *)(a5 + 24);
*(_QWORD *)(a1 + 104) = *(_QWORD *)(a5 + 40);
*(_QWORD *)(a5 + 40) = 0LL;
*(_OWORD *)(a5 + 24) = 0LL;
return result;
}
| MethodCallExpr:
LEA RAX,[0x1da288]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x00151b2e
MOV R9,qword ptr [0x001dbf98]
CMP byte ptr [R9],0x0
JZ 0x00151b2a
INC dword ptr [RAX + 0x8]
JMP 0x00151b2e
LAB_00151b2a:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00151b2e:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x18],RAX
LEA RAX,[0x1da830]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x28],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOV qword ptr [RDX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOV qword ptr [RDX],RAX
MOV qword ptr [RDI + 0x38],RAX
MOVUPS XMM0,xmmword ptr [RCX]
MOV qword ptr [RCX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV qword ptr [RCX],RAX
MOVUPS XMM0,xmmword ptr [R8]
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOV RCX,qword ptr [R8 + 0x10]
MOV qword ptr [RDI + 0x50],RCX
MOV qword ptr [R8 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R8],XMM0
MOVUPS XMM1,xmmword ptr [R8 + 0x18]
MOVUPS xmmword ptr [RDI + 0x58],XMM1
MOV RCX,qword ptr [R8 + 0x28]
MOV qword ptr [RDI + 0x68],RCX
MOV qword ptr [R8 + 0x28],RAX
MOVUPS xmmword ptr [R8 + 0x18],XMM0
RET
|
/* minja::MethodCallExpr::MethodCallExpr(minja::Location const&,
std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::VariableExpr>&&,
minja::ArgumentsExpression&&) */
void __thiscall
minja::MethodCallExpr::MethodCallExpr
(MethodCallExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3,
ArgumentsExpression *param_4)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_001da298;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_001dbf98 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_evaluate_001da840;
*(int8 *)(this + 0x28) = 0;
uVar2 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar2;
*(int8 *)param_2 = 0;
*(int8 *)(this + 0x38) = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x30) = *(int8 *)param_3;
*(int8 *)(this + 0x38) = uVar2;
*(int8 *)param_3 = 0;
uVar2 = *(int8 *)(param_4 + 8);
*(int8 *)(this + 0x40) = *(int8 *)param_4;
*(int8 *)(this + 0x48) = uVar2;
*(int8 *)(this + 0x50) = *(int8 *)(param_4 + 0x10);
*(int8 *)(param_4 + 0x10) = 0;
*(int8 *)param_4 = 0;
*(int8 *)(param_4 + 8) = 0;
uVar2 = *(int8 *)(param_4 + 0x20);
*(int8 *)(this + 0x58) = *(int8 *)(param_4 + 0x18);
*(int8 *)(this + 0x60) = uVar2;
*(int8 *)(this + 0x68) = *(int8 *)(param_4 + 0x28);
*(int8 *)(param_4 + 0x28) = 0;
*(int8 *)(param_4 + 0x18) = 0;
*(int8 *)(param_4 + 0x20) = 0;
return;
}
| |
33,868 | google::protobuf::io::EpsCopyOutputStream::Skip(int, unsigned char**) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.cc | bool EpsCopyOutputStream::Skip(int count, uint8_t** pp) {
if (count < 0) return false;
if (had_error_) {
*pp = buffer_;
return false;
}
int size = Flush(*pp);
if (had_error_) {
*pp = buffer_;
return false;
}
void* data = buffer_end_;
while (count > size) {
count -= size;
if (!stream_->Next(&data, &size)) {
*pp = Error();
return false;
}
}
*pp = SetInitialBuffer(static_cast<uint8_t*>(data) + count, size - count);
return true;
} | O0 | cpp | google::protobuf::io::EpsCopyOutputStream::Skip(int, unsigned char**):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x0, 0x24(%rsp)
jge 0x20b8c
movb $0x0, 0x37(%rsp)
jmp 0x20c77
movq (%rsp), %rax
testb $0x1, 0x38(%rax)
je 0x20bb0
movq (%rsp), %rcx
addq $0x10, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movb $0x0, 0x37(%rsp)
jmp 0x20c77
movq (%rsp), %rdi
movq 0x18(%rsp), %rax
movq (%rax), %rsi
callq 0x206a0
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0x14(%rsp)
testb $0x1, 0x38(%rax)
je 0x20beb
movq (%rsp), %rcx
addq $0x10, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movb $0x0, 0x37(%rsp)
jmp 0x20c77
movq (%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x14(%rsp), %eax
jle 0x20c49
movq (%rsp), %rax
movl 0x14(%rsp), %edx
movl 0x24(%rsp), %ecx
subl %edx, %ecx
movl %ecx, 0x24(%rsp)
movq 0x30(%rax), %rdi
movq (%rdi), %rax
leaq 0x8(%rsp), %rsi
leaq 0x14(%rsp), %rdx
callq *0x10(%rax)
testb $0x1, %al
jne 0x20c47
movq (%rsp), %rdi
callq 0x22770
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movb $0x0, 0x37(%rsp)
jmp 0x20c77
jmp 0x20bf8
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movslq 0x24(%rsp), %rax
addq %rax, %rsi
movl 0x14(%rsp), %edx
subl 0x24(%rsp), %edx
callq 0x1d460
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf2io19EpsCopyOutputStream4SkipEiPPh:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_14], esi
mov [rsp+38h+var_20], rdx
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_38], rax
cmp [rsp+38h+var_14], 0
jge short loc_20B8C
mov [rsp+38h+var_1], 0
jmp loc_20C77
loc_20B8C:
mov rax, [rsp+38h+var_38]
test byte ptr [rax+38h], 1
jz short loc_20BB0
mov rcx, [rsp+38h+var_38]
add rcx, 10h
mov rax, [rsp+38h+var_20]
mov [rax], rcx
mov [rsp+38h+var_1], 0
jmp loc_20C77
loc_20BB0:
mov rdi, [rsp+38h+var_38]; this
mov rax, [rsp+38h+var_20]
mov rsi, [rax]; unsigned __int8 *
call _ZN6google8protobuf2io19EpsCopyOutputStream5FlushEPh; google::protobuf::io::EpsCopyOutputStream::Flush(uchar *)
mov ecx, eax
mov rax, [rsp+38h+var_38]
mov [rsp+38h+var_24], ecx
test byte ptr [rax+38h], 1
jz short loc_20BEB
mov rcx, [rsp+38h+var_38]
add rcx, 10h
mov rax, [rsp+38h+var_20]
mov [rax], rcx
mov [rsp+38h+var_1], 0
jmp loc_20C77
loc_20BEB:
mov rax, [rsp+38h+var_38]
mov rax, [rax+8]
mov [rsp+38h+var_30], rax
loc_20BF8:
mov eax, [rsp+38h+var_14]
cmp eax, [rsp+38h+var_24]
jle short loc_20C49
mov rax, [rsp+38h+var_38]
mov edx, [rsp+38h+var_24]
mov ecx, [rsp+38h+var_14]
sub ecx, edx
mov [rsp+38h+var_14], ecx
mov rdi, [rax+30h]
mov rax, [rdi]
lea rsi, [rsp+38h+var_30]
lea rdx, [rsp+38h+var_24]
call qword ptr [rax+10h]
test al, 1
jnz short loc_20C47
mov rdi, [rsp+38h+var_38]; this
call _ZN6google8protobuf2io19EpsCopyOutputStream5ErrorEv; google::protobuf::io::EpsCopyOutputStream::Error(void)
mov rcx, rax
mov rax, [rsp+38h+var_20]
mov [rax], rcx
mov [rsp+38h+var_1], 0
jmp short loc_20C77
loc_20C47:
jmp short loc_20BF8
loc_20C49:
mov rdi, [rsp+38h+var_38]; this
mov rsi, [rsp+38h+var_30]
movsxd rax, [rsp+38h+var_14]
add rsi, rax; void *
mov edx, [rsp+38h+var_24]
sub edx, [rsp+38h+var_14]; int
call _ZN6google8protobuf2io19EpsCopyOutputStream16SetInitialBufferEPvi; google::protobuf::io::EpsCopyOutputStream::SetInitialBuffer(void *,int)
mov rcx, rax
mov rax, [rsp+38h+var_20]
mov [rax], rcx
mov [rsp+38h+var_1], 1
loc_20C77:
mov al, [rsp+38h+var_1]
and al, 1
add rsp, 38h
retn
| char google::protobuf::io::EpsCopyOutputStream::Skip(
google::protobuf::io::EpsCopyOutputStream *this,
int a2,
unsigned __int8 **a3)
{
long long v3; // rcx
char *v4; // rcx
long long v6; // [rsp+8h] [rbp-30h] BYREF
int v7; // [rsp+14h] [rbp-24h] BYREF
unsigned __int8 **v8; // [rsp+18h] [rbp-20h]
int v9; // [rsp+24h] [rbp-14h]
google::protobuf::io::EpsCopyOutputStream *v10; // [rsp+28h] [rbp-10h]
v10 = this;
v9 = a2;
v8 = a3;
if ( a2 < 0 )
return 0;
if ( (*((_BYTE *)this + 56) & 1) != 0 )
{
*v8 = (unsigned __int8 *)this + 16;
return 0;
}
else
{
v7 = google::protobuf::io::EpsCopyOutputStream::Flush(this, *v8);
if ( (*((_BYTE *)this + 56) & 1) != 0 )
{
*v8 = (unsigned __int8 *)this + 16;
return 0;
}
else
{
v6 = *((_QWORD *)this + 1);
while ( v9 > v7 )
{
v9 -= v7;
if ( ((*(long long ( **)(_QWORD, long long *, int *))(**((_QWORD **)this + 6) + 16LL))(
*((_QWORD *)this + 6),
&v6,
&v7) & 1) == 0 )
{
v3 = google::protobuf::io::EpsCopyOutputStream::Error(this);
*v8 = (unsigned __int8 *)v3;
return 0;
}
}
v4 = google::protobuf::io::EpsCopyOutputStream::SetInitialBuffer(this, (char *)(v9 + v6), v7 - v9);
*v8 = (unsigned __int8 *)v4;
return 1;
}
}
}
| Skip:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV dword ptr [RSP + 0x24],ESI
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP],RAX
CMP dword ptr [RSP + 0x24],0x0
JGE 0x00120b8c
MOV byte ptr [RSP + 0x37],0x0
JMP 0x00120c77
LAB_00120b8c:
MOV RAX,qword ptr [RSP]
TEST byte ptr [RAX + 0x38],0x1
JZ 0x00120bb0
MOV RCX,qword ptr [RSP]
ADD RCX,0x10
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX],RCX
MOV byte ptr [RSP + 0x37],0x0
JMP 0x00120c77
LAB_00120bb0:
MOV RDI,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RAX]
CALL 0x001206a0
MOV ECX,EAX
MOV RAX,qword ptr [RSP]
MOV dword ptr [RSP + 0x14],ECX
TEST byte ptr [RAX + 0x38],0x1
JZ 0x00120beb
MOV RCX,qword ptr [RSP]
ADD RCX,0x10
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX],RCX
MOV byte ptr [RSP + 0x37],0x0
JMP 0x00120c77
LAB_00120beb:
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RAX
LAB_00120bf8:
MOV EAX,dword ptr [RSP + 0x24]
CMP EAX,dword ptr [RSP + 0x14]
JLE 0x00120c49
MOV RAX,qword ptr [RSP]
MOV EDX,dword ptr [RSP + 0x14]
MOV ECX,dword ptr [RSP + 0x24]
SUB ECX,EDX
MOV dword ptr [RSP + 0x24],ECX
MOV RDI,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RDI]
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x14]
CALL qword ptr [RAX + 0x10]
TEST AL,0x1
JNZ 0x00120c47
MOV RDI,qword ptr [RSP]
CALL 0x00122770
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX],RCX
MOV byte ptr [RSP + 0x37],0x0
JMP 0x00120c77
LAB_00120c47:
JMP 0x00120bf8
LAB_00120c49:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x8]
MOVSXD RAX,dword ptr [RSP + 0x24]
ADD RSI,RAX
MOV EDX,dword ptr [RSP + 0x14]
SUB EDX,dword ptr [RSP + 0x24]
CALL 0x0011d460
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX],RCX
MOV byte ptr [RSP + 0x37],0x1
LAB_00120c77:
MOV AL,byte ptr [RSP + 0x37]
AND AL,0x1
ADD RSP,0x38
RET
|
/* google::protobuf::io::EpsCopyOutputStream::Skip(int, unsigned char**) */
int1 __thiscall
google::protobuf::io::EpsCopyOutputStream::Skip
(EpsCopyOutputStream *this,int param_1,uchar **param_2)
{
ulong uVar1;
uchar *puVar2;
long local_30;
int local_24;
uchar **local_20;
int local_14;
EpsCopyOutputStream *local_10;
if (-1 < param_1) {
if (((byte)this[0x38] & 1) == 0) {
local_20 = param_2;
local_14 = param_1;
local_10 = this;
local_24 = Flush(this,*param_2);
if (((byte)this[0x38] & 1) == 0) {
local_30 = *(long *)(this + 8);
do {
if (local_14 <= local_24) {
puVar2 = (uchar *)SetInitialBuffer(this,(void *)(local_30 + local_14),
local_24 - local_14);
*local_20 = puVar2;
return 1;
}
local_14 = local_14 - local_24;
uVar1 = (**(code **)(**(long **)(this + 0x30) + 0x10))
(*(long **)(this + 0x30),&local_30,&local_24);
} while ((uVar1 & 1) != 0);
puVar2 = (uchar *)Error(this);
*local_20 = puVar2;
}
else {
*local_20 = (uchar *)(this + 0x10);
}
}
else {
*param_2 = (uchar *)(this + 0x10);
}
}
return 0;
}
| |
33,869 | google::protobuf::io::EpsCopyOutputStream::Skip(int, unsigned char**) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.cc | bool EpsCopyOutputStream::Skip(int count, uint8_t** pp) {
if (count < 0) return false;
if (had_error_) {
*pp = buffer_;
return false;
}
int size = Flush(*pp);
if (had_error_) {
*pp = buffer_;
return false;
}
void* data = buffer_end_;
while (count > size) {
count -= size;
if (!stream_->Next(&data, &size)) {
*pp = Error();
return false;
}
}
*pp = SetInitialBuffer(static_cast<uint8_t*>(data) + count, size - count);
return true;
} | O3 | cpp | google::protobuf::io::EpsCopyOutputStream::Skip(int, unsigned char**):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testl %esi, %esi
js 0x15c2f
movq %rdx, %r15
movq %rdi, %r14
cmpb $0x1, 0x38(%rdi)
je 0x15c28
movl %esi, %ebx
movq (%r15), %rsi
movq %r14, %rdi
callq 0x15a5a
movl %eax, 0x4(%rsp)
cmpb $0x1, 0x38(%r14)
jne 0x15c42
addq $0x10, %r14
movq %r14, (%r15)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, 0x8(%rsp)
movq 0x8(%r14), %rax
leaq 0x10(%rsp), %r12
movq %rax, (%r12)
leaq 0x4(%rsp), %r13
movl %ebx, %r15d
movl 0x4(%rsp), %ecx
subl %ecx, %r15d
setle %bpl
jle 0x15c92
movq 0x30(%r14), %rdi
movq (%rdi), %rax
movq %r12, %rsi
movq %r13, %rdx
callq *0x10(%rax)
movl %r15d, %ebx
testb %al, %al
jne 0x15c5c
movb $0x1, 0x38(%r14)
leaq 0x10(%r14), %rax
leaq 0x20(%r14), %rcx
movq %rcx, (%r14)
jmp 0x15cc5
movslq %ebx, %rdx
addq 0x10(%rsp), %rdx
subl %ebx, %ecx
leaq 0x10(%r14), %rax
xorl %esi, %esi
cmpl $0x11, %ecx
leaq -0x10(%rcx,%rdx), %rdi
movslq %ecx, %rcx
leaq 0x10(%r14,%rcx), %rcx
cmovgeq %rdi, %rcx
cmovlq %rdx, %rsi
cmovgeq %rdx, %rax
movq %rcx, (%r14)
movq %rsi, 0x8(%r14)
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
jmp 0x15c31
| _ZN6google8protobuf2io19EpsCopyOutputStream4SkipEiPPh:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
test esi, esi
js short loc_15C2F
mov r15, rdx
mov r14, rdi
cmp byte ptr [rdi+38h], 1
jz short loc_15C28
mov ebx, esi
mov rsi, [r15]; unsigned __int8 *
mov rdi, r14; this
call _ZN6google8protobuf2io19EpsCopyOutputStream5FlushEPh; google::protobuf::io::EpsCopyOutputStream::Flush(uchar *)
mov [rsp+48h+var_44], eax
cmp byte ptr [r14+38h], 1
jnz short loc_15C42
loc_15C28:
add r14, 10h
mov [r15], r14
loc_15C2F:
xor ebp, ebp
loc_15C31:
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_15C42:
mov [rsp+48h+var_40], r15
mov rax, [r14+8]
lea r12, [rsp+48h+var_38]
mov [r12], rax
lea r13, [rsp+48h+var_44]
mov r15d, ebx
loc_15C5C:
mov ecx, [rsp+48h+var_44]
sub r15d, ecx
setle bpl
jle short loc_15C92
mov rdi, [r14+30h]
mov rax, [rdi]
mov rsi, r12
mov rdx, r13
call qword ptr [rax+10h]
mov ebx, r15d
test al, al
jnz short loc_15C5C
mov byte ptr [r14+38h], 1
lea rax, [r14+10h]
lea rcx, [r14+20h]
mov [r14], rcx
jmp short loc_15CC5
loc_15C92:
movsxd rdx, ebx
add rdx, [rsp+48h+var_38]
sub ecx, ebx
lea rax, [r14+10h]
xor esi, esi
cmp ecx, 11h
lea rdi, [rcx+rdx-10h]
movsxd rcx, ecx
lea rcx, [r14+rcx+10h]
cmovge rcx, rdi
cmovl rsi, rdx
cmovge rax, rdx
mov [r14], rcx
mov [r14+8], rsi
loc_15CC5:
mov rcx, [rsp+48h+var_40]
mov [rcx], rax
jmp loc_15C31
| long long google::protobuf::io::EpsCopyOutputStream::Skip(
google::protobuf::io::EpsCopyOutputStream *this,
int a2,
unsigned __int8 **a3)
{
unsigned int v3; // ebp
int v6; // ebx
int v8; // r15d
unsigned __int8 *v9; // rax
long long v10; // rcx
long long v11; // rsi
bool v12; // cc
long long v13; // rdi
char *v14; // rcx
int v15; // [rsp+4h] [rbp-44h] BYREF
unsigned __int8 **v16; // [rsp+8h] [rbp-40h]
long long v17[7]; // [rsp+10h] [rbp-38h] BYREF
if ( a2 < 0 )
return 0;
if ( *((_BYTE *)this + 56) == 1
|| (v6 = a2, v15 = google::protobuf::io::EpsCopyOutputStream::Flush(this, *a3), *((_BYTE *)this + 56) == 1) )
{
*a3 = (unsigned __int8 *)this + 16;
return 0;
}
v16 = a3;
v17[0] = *((_QWORD *)this + 1);
v8 = a2;
while ( 1 )
{
v12 = v8 <= v15;
v8 -= v15;
LOBYTE(v3) = v12;
if ( v12 )
break;
v6 = v8;
if ( !(*(unsigned __int8 ( **)(_QWORD, long long *, int *))(**((_QWORD **)this + 6) + 16LL))(
*((_QWORD *)this + 6),
v17,
&v15) )
{
*((_BYTE *)this + 56) = 1;
v9 = (unsigned __int8 *)this + 16;
*(_QWORD *)this = (char *)this + 32;
goto LABEL_17;
}
}
v10 = (unsigned int)(v15 - v6);
v9 = (unsigned __int8 *)this + 16;
v11 = 0LL;
v12 = (int)v10 < 17;
v13 = v10 + v17[0] + v6 - 16;
v14 = (char *)this + (int)v10 + 16;
if ( v12 )
v11 = v17[0] + v6;
else
v14 = (char *)v13;
if ( !v12 )
v9 = (unsigned __int8 *)(v17[0] + v6);
*(_QWORD *)this = v14;
*((_QWORD *)this + 1) = v11;
LABEL_17:
*v16 = v9;
return v3;
}
| Skip:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
TEST ESI,ESI
JS 0x00115c2f
MOV R15,RDX
MOV R14,RDI
CMP byte ptr [RDI + 0x38],0x1
JZ 0x00115c28
MOV EBX,ESI
MOV RSI,qword ptr [R15]
MOV RDI,R14
CALL 0x00115a5a
MOV dword ptr [RSP + 0x4],EAX
CMP byte ptr [R14 + 0x38],0x1
JNZ 0x00115c42
LAB_00115c28:
ADD R14,0x10
MOV qword ptr [R15],R14
LAB_00115c2f:
XOR EBP,EBP
LAB_00115c31:
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00115c42:
MOV qword ptr [RSP + 0x8],R15
MOV RAX,qword ptr [R14 + 0x8]
LEA R12,[RSP + 0x10]
MOV qword ptr [R12],RAX
LEA R13,[RSP + 0x4]
MOV R15D,EBX
LAB_00115c5c:
MOV ECX,dword ptr [RSP + 0x4]
SUB R15D,ECX
SETLE BPL
JLE 0x00115c92
MOV RDI,qword ptr [R14 + 0x30]
MOV RAX,qword ptr [RDI]
MOV RSI,R12
MOV RDX,R13
CALL qword ptr [RAX + 0x10]
MOV EBX,R15D
TEST AL,AL
JNZ 0x00115c5c
MOV byte ptr [R14 + 0x38],0x1
LEA RAX,[R14 + 0x10]
LEA RCX,[R14 + 0x20]
MOV qword ptr [R14],RCX
JMP 0x00115cc5
LAB_00115c92:
MOVSXD RDX,EBX
ADD RDX,qword ptr [RSP + 0x10]
SUB ECX,EBX
LEA RAX,[R14 + 0x10]
XOR ESI,ESI
CMP ECX,0x11
LEA RDI,[RCX + RDX*0x1 + -0x10]
MOVSXD RCX,ECX
LEA RCX,[R14 + RCX*0x1 + 0x10]
CMOVGE RCX,RDI
CMOVL RSI,RDX
CMOVGE RAX,RDX
MOV qword ptr [R14],RCX
MOV qword ptr [R14 + 0x8],RSI
LAB_00115cc5:
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RCX],RAX
JMP 0x00115c31
|
/* google::protobuf::io::EpsCopyOutputStream::Skip(int, unsigned char**) */
ulong __thiscall
google::protobuf::io::EpsCopyOutputStream::Skip
(EpsCopyOutputStream *this,int param_1,uchar **param_2)
{
EpsCopyOutputStream *pEVar1;
char cVar2;
EpsCopyOutputStream *pEVar3;
uint uVar4;
EpsCopyOutputStream *pEVar5;
ulong unaff_RBP;
EpsCopyOutputStream *pEVar6;
int iVar7;
int local_44;
uchar **local_40;
long local_38;
if (-1 < param_1) {
if ((this[0x38] != (EpsCopyOutputStream)0x1) &&
(local_44 = Flush(this,*param_2), this[0x38] != (EpsCopyOutputStream)0x1)) {
local_38 = *(long *)(this + 8);
local_40 = param_2;
do {
iVar7 = param_1 - local_44;
unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),iVar7 == 0 || param_1 < local_44);
if (iVar7 == 0 || param_1 < local_44) {
pEVar5 = (EpsCopyOutputStream *)(param_1 + local_38);
uVar4 = local_44 - param_1;
pEVar6 = (EpsCopyOutputStream *)0x0;
pEVar1 = pEVar5 + ((ulong)uVar4 - 0x10);
pEVar3 = pEVar5;
if ((int)uVar4 < 0x11) {
pEVar3 = this + 0x10;
pEVar1 = this + (long)(int)uVar4 + 0x10;
pEVar6 = pEVar5;
}
*(EpsCopyOutputStream **)this = pEVar1;
*(EpsCopyOutputStream **)(this + 8) = pEVar6;
goto LAB_00115cc5;
}
cVar2 = (**(code **)(**(long **)(this + 0x30) + 0x10))
(*(long **)(this + 0x30),&local_38,&local_44);
param_1 = iVar7;
} while (cVar2 != '\0');
this[0x38] = (EpsCopyOutputStream)0x1;
pEVar3 = this + 0x10;
*(EpsCopyOutputStream **)this = this + 0x20;
LAB_00115cc5:
*local_40 = (uchar *)pEVar3;
goto LAB_00115c31;
}
*param_2 = (uchar *)(this + 0x10);
}
unaff_RBP = 0;
LAB_00115c31:
return unaff_RBP & 0xffffffff;
}
| |
33,870 | 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>::max_size() const | monkey531[P]llama/common/json.hpp | size_type max_size() const noexcept
{
switch (m_data.m_type)
{
case value_t::array:
{
// delegate call to array_t::max_size()
return m_data.m_value.array->max_size();
}
case value_t::object:
{
// delegate call to object_t::max_size()
return m_data.m_value.object->max_size();
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
// all other types have max_size() == size()
return size();
}
}
} | O0 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::max_size() const:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movzbl (%rax), %eax
movq %rax, 0x10(%rsp)
subq $0x9, %rax
ja 0xf4122
movq 0x10(%rsp), %rax
leaq 0xf1e33(%rip), %rcx # 0x1e5f20
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xdfa80
movq %rax, 0x20(%rsp)
jmp 0xf4131
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xf4c60
movq %rax, 0x20(%rsp)
jmp 0xf4131
jmp 0xf4122
movq 0x8(%rsp), %rdi
callq 0xf4c80
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_20], rax
movzx eax, byte ptr [rax]
mov [rsp+28h+var_18], rax
sub rax, 9; switch 10 cases
ja short def_F40F4; jumptable 00000000000F40F4 default case
mov rax, [rsp+28h+var_18]
lea rcx, jpt_F40F4
movsxd rax, ds:(jpt_F40F4 - 1E5F20h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_F40F6:
mov rax, [rsp+28h+var_20]; jumptable 00000000000F40F4 case 2
mov rdi, [rax+8]
call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE8max_sizeEv; 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>>::max_size(void)
mov [rsp+28h+var_8], rax
jmp short loc_F4131
loc_F410B:
mov rax, [rsp+28h+var_20]; jumptable 00000000000F40F4 case 1
mov rdi, [rax+8]
call _ZNKSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE8max_sizeEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::max_size(void)
mov [rsp+28h+var_8], rax
jmp short loc_F4131
loc_F4120:
jmp short $+2; jumptable 00000000000F40F4 cases 0,3-9
def_F40F4:
mov rdi, [rsp+28h+var_20]; jumptable 00000000000F40F4 default case
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv; 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>::size(void)
mov [rsp+28h+var_8], rax
loc_F4131:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::max_size(
long long a1)
{
long long v2; // [rsp+20h] [rbp-8h]
switch ( *(_BYTE *)a1 )
{
case 1:
v2 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::max_size(*(_QWORD *)(a1 + 8));
break;
case 2:
v2 = 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>>::max_size(*(_QWORD *)(a1 + 8));
break;
default:
v2 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size(a1);
break;
}
return v2;
}
| max_size:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
SUB RAX,0x9
JA 0x001f4122
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[0x2e5f20]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_2:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001dfa80
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001f4131
caseD_1:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001f4c60
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001f4131
caseD_0:
JMP 0x001f4122
default:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001f4c80
MOV qword ptr [RSP + 0x20],RAX
LAB_001f4131:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
/* 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>::max_size() const */
int8 __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::max_size(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this)
{
int8 local_8;
switch(*this) {
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0:
case (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>
)0x3:
case (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>
)0x4:
case (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>
)0x5:
case (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>
)0x6:
case (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>
)0x7:
case (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>
)0x8:
case (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>
)0x9:
default:
local_8 = size(this);
break;
case (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>
)0x1:
local_8 = std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::max_size(*(vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8));
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2:
local_8 = 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>>>
::max_size(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8));
}
return local_8;
}
| |
33,871 | 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>::max_size() const | monkey531[P]llama/common/json.hpp | size_type max_size() const noexcept
{
switch (m_data.m_type)
{
case value_t::array:
{
// delegate call to array_t::max_size()
return m_data.m_value.array->max_size();
}
case value_t::object:
{
// delegate call to object_t::max_size()
return m_data.m_value.object->max_size();
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
// all other types have max_size() == size()
return size();
}
}
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::max_size() const:
movzbl (%rdi), %eax
cmpl $0x2, %eax
je 0x564ca
cmpl $0x1, %eax
jne 0x56766
movabsq $0x2aaaaaaaaaaaaaa, %rax # imm = 0x2AAAAAAAAAAAAAA
retq
movabsq $0x7ffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFF
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv:
movzx eax, byte ptr [rdi]
cmp eax, 2
jz short loc_564CA
cmp eax, 1
jnz _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv; 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>::size(void)
mov rax, 2AAAAAAAAAAAAAAh
retn
loc_564CA:
mov rax, 7FFFFFFFFFFFFFFh
retn
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::max_size(
unsigned __int8 *a1)
{
int v1; // eax
v1 = *a1;
if ( v1 == 2 )
return 0x7FFFFFFFFFFFFFFLL;
if ( v1 == 1 )
return 0x2AAAAAAAAAAAAAALL;
return 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>::size();
}
| max_size:
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x2
JZ 0x001564ca
CMP EAX,0x1
JNZ 0x00156766
MOV RAX,0x2aaaaaaaaaaaaaa
RET
LAB_001564ca:
MOV RAX,0x7ffffffffffffff
RET
|
/* 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>::max_size() const */
ulong __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::max_size(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this)
{
basic_json<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>
bVar1;
ulong uVar2;
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return 0x7ffffffffffffff;
}
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
return 0x2aaaaaaaaaaaaaa;
}
bVar1 = *this;
uVar2 = (ulong)(byte)bVar1;
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
if (bVar1 == (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>
)0x1) {
return ((*(long **)(this + 8))[1] - **(long **)(this + 8)) / 0x30;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4;
}
uVar2 = 1;
}
return uVar2;
}
| |
33,872 | minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&) | monkey531[P]llama/common/minja.hpp | TemplateToken(Type type, const Location & location, SpaceHandling pre, SpaceHandling post) : type(type), location(location), pre_space(pre), post_space(post) {} | O1 | cpp | minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&):
leaq 0x7390b(%rip), %rax # 0xec468
addq $0x10, %rax
movq %rax, (%rdi)
movl $0xd, 0x8(%rdi)
movq (%rsi), %rax
movq %rax, 0x10(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x18(%rdi)
testq %rax, %rax
je 0x78b95
movq 0x75412(%rip), %r10 # 0xedf98
cmpb $0x0, (%r10)
je 0x78b91
incl 0x8(%rax)
jmp 0x78b95
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x20(%rdi)
movl %edx, 0x28(%rdi)
movl %ecx, 0x2c(%rdi)
leaq 0x743ae(%rip), %rax # 0xecf58
addq $0x10, %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x38(%rdi)
movups (%r8), %xmm0
movq %rax, 0x8(%r8)
movups %xmm0, 0x30(%rdi)
movq %rax, (%r8)
movups (%r9), %xmm0
movups %xmm0, 0x40(%rdi)
movq 0x10(%r9), %rcx
movq %rcx, 0x50(%rdi)
movq %rax, 0x10(%r9)
xorps %xmm0, %xmm0
movups %xmm0, (%r9)
retq
| _ZN5minja18MacroTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_INS_10ExpressionEEESaISJ_EE:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rdi], rax
mov dword ptr [rdi+8], 0Dh
mov rax, [rsi]
mov [rdi+10h], rax
mov rax, [rsi+8]
mov [rdi+18h], rax
test rax, rax
jz short loc_78B95
mov r10, cs:__libc_single_threaded_ptr
cmp byte ptr [r10], 0
jz short loc_78B91
inc dword ptr [rax+8]
jmp short loc_78B95
loc_78B91:
lock inc dword ptr [rax+8]
loc_78B95:
mov rax, [rsi+10h]
mov [rdi+20h], rax
mov [rdi+28h], edx
mov [rdi+2Ch], ecx
lea rax, _ZTVN5minja18MacroTemplateTokenE; `vtable for'minja::MacroTemplateToken
add rax, 10h
mov [rdi], rax
xor eax, eax
mov [rdi+38h], rax
movups xmm0, xmmword ptr [r8]
mov [r8+8], rax
movups xmmword ptr [rdi+30h], xmm0
mov [r8], rax
movups xmm0, xmmword ptr [r9]
movups xmmword ptr [rdi+40h], xmm0
mov rcx, [r9+10h]
mov [rdi+50h], rcx
mov [r9+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r9], xmm0
retn
| long long minja::MacroTemplateToken::MacroTemplateToken(
long long a1,
_QWORD *a2,
int a3,
int a4,
__int128 *a5,
long long a6)
{
long long v6; // rax
long long result; // rax
__int128 v8; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateToken + 2;
*(_DWORD *)(a1 + 8) = 13;
*(_QWORD *)(a1 + 16) = *a2;
v6 = a2[1];
*(_QWORD *)(a1 + 24) = v6;
if ( v6 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v6 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v6 + 8));
}
*(_QWORD *)(a1 + 32) = a2[2];
*(_DWORD *)(a1 + 40) = a3;
*(_DWORD *)(a1 + 44) = a4;
*(_QWORD *)a1 = &`vtable for'minja::MacroTemplateToken + 2;
result = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v8 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v8;
*(_QWORD *)a5 = 0LL;
*(_OWORD *)(a1 + 64) = *(_OWORD *)a6;
*(_QWORD *)(a1 + 80) = *(_QWORD *)(a6 + 16);
*(_QWORD *)(a6 + 16) = 0LL;
*(_OWORD *)a6 = 0LL;
return result;
}
| MacroTemplateToken:
LEA RAX,[0x1ec468]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV dword ptr [RDI + 0x8],0xd
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x18],RAX
TEST RAX,RAX
JZ 0x00178b95
MOV R10,qword ptr [0x001edf98]
CMP byte ptr [R10],0x0
JZ 0x00178b91
INC dword ptr [RAX + 0x8]
JMP 0x00178b95
LAB_00178b91:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00178b95:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x20],RAX
MOV dword ptr [RDI + 0x28],EDX
MOV dword ptr [RDI + 0x2c],ECX
LEA RAX,[0x1ecf58]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x38],RAX
MOVUPS XMM0,xmmword ptr [R8]
MOV qword ptr [R8 + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV qword ptr [R8],RAX
MOVUPS XMM0,xmmword ptr [R9]
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOV RCX,qword ptr [R9 + 0x10]
MOV qword ptr [RDI + 0x50],RCX
MOV qword ptr [R9 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R9],XMM0
RET
|
/* minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling,
minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&,
std::vector<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> >,
std::allocator<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> > > >&&) */
void __thiscall
minja::MacroTemplateToken::MacroTemplateToken
(MacroTemplateToken *this,int8 *param_1,int4 param_3,int4 param_4,
int8 *param_5,int8 *param_6)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR__TemplateToken_001ec478;
*(int4 *)(this + 8) = 0xd;
*(int8 *)(this + 0x10) = *param_1;
lVar1 = param_1[1];
*(long *)(this + 0x18) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_001edf98 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x20) = param_1[2];
*(int4 *)(this + 0x28) = param_3;
*(int4 *)(this + 0x2c) = param_4;
*(int ***)this = &PTR__MacroTemplateToken_001ecf68;
*(int8 *)(this + 0x38) = 0;
uVar2 = param_5[1];
param_5[1] = 0;
*(int8 *)(this + 0x30) = *param_5;
*(int8 *)(this + 0x38) = uVar2;
*param_5 = 0;
uVar2 = param_6[1];
*(int8 *)(this + 0x40) = *param_6;
*(int8 *)(this + 0x48) = uVar2;
*(int8 *)(this + 0x50) = param_6[2];
param_6[2] = 0;
*param_6 = 0;
param_6[1] = 0;
return;
}
| |
33,873 | find_head | eloqsql/storage/maria/ma_bitmap.c | static my_bool find_head(MARIA_HA *info, uint length, uint position)
{
MARIA_FILE_BITMAP *bitmap= &info->s->bitmap;
MARIA_BITMAP_BLOCK *block;
/*
There is always place for the head block in bitmap_blocks as these are
preallocated at _ma_init_block_record().
*/
block= dynamic_element(&info->bitmap_blocks, position, MARIA_BITMAP_BLOCK *);
if (info->s->base.extra_options & MA_EXTRA_OPTIONS_INSERT_ORDER)
{
if (bitmap->page != info->s->last_insert_bitmap &&
_ma_change_bitmap_page(info, bitmap,
info->s->last_insert_bitmap))
return 1;
/* Don't allocate any blocks from earlier pages */
info->s->state.first_bitmap_with_space= info->s->last_insert_bitmap;
}
/*
We need to have DIRENTRY_SIZE here to take into account that we may
need an extra directory entry for the row
*/
while (allocate_head(bitmap, length + DIR_ENTRY_SIZE, block))
if (move_to_next_bitmap(info, bitmap))
return 1;
return 0;
} | O3 | c | find_head:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %r14d
movq %rdi, %r15
movq (%rdi), %r12
leaq 0xa10(%r12), %r13
movl %edx, %eax
leaq (%rax,%rax,2), %rbx
shlq $0x3, %rbx
addq 0x2c0(%rdi), %rbx
testb $0x2, 0x428(%r12)
je 0x40316
movq 0xa20(%r12), %rax
movq 0xc30(%r12), %rdx
movq %r12, %rcx
cmpq %rdx, %rax
je 0x4030f
movq %r15, %rdi
movq %r13, %rsi
callq 0x40c31
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x405cf
movq (%r15), %rcx
movq 0xc30(%rcx), %rax
movq %rax, 0xd0(%rcx)
movq %r13, -0x58(%rbp)
addl $0x4, %r14d
movq %r15, -0x60(%rbp)
movq %rbx, -0x38(%rbp)
movl %r14d, -0x44(%rbp)
movl $0x3, %eax
cmpl %r14d, 0xb24(%r12)
jae 0x40355
movl $0x2, %eax
cmpl %r14d, 0xb20(%r12)
jae 0x40355
xorl %eax, %eax
cmpl %r14d, 0xb1c(%r12)
setae %al
movq 0xa10(%r12), %rdx
movl 0x428(%rdx), %r9d
testb $0x2, %r9b
je 0x40397
movq 0xa20(%r12), %rcx
cmpq 0xc30(%rdx), %rcx
jne 0x40397
movl 0xc28(%rdx), %r8d
movl %r8d, %ecx
shrl $0x3, %ecx
andl $-0x2, %ecx
leal (%rcx,%rcx,2), %ecx
andl $0xf, %r8d
xorl %r14d, %r14d
jmp 0x403b7
movl 0xa38(%r12), %ecx
movl $0xaaaaaaab, %esi # imm = 0xAAAAAAAB
imulq %rsi, %rcx
shrq $0x22, %rcx
addl %ecx, %ecx
leal (%rcx,%rcx,2), %ecx
xorl %r8d, %r8d
movb $0x1, %r14b
movq 0xa18(%r12), %rdi
movl 0xa34(%r12), %esi
movl %ecx, %r11d
addq %rdi, %r11
cmpl %esi, %ecx
jae 0x404c0
movl %r9d, -0x2c(%rbp)
movq %rdx, -0x40(%rbp)
movq %rsi, -0x50(%rbp)
addq %rdi, %rsi
movq %rsi, -0x68(%rbp)
movl $0xffffffff, %r10d # imm = 0xFFFFFFFF
xorl %esi, %esi
movl (%r11), %ecx
movzwl 0x4(%r11), %ebx
shlq $0x20, %rbx
orq %rcx, %rbx
testq %rbx, %rbx
sete %cl
testq %rsi, %rsi
setne %r9b
andb %cl, %r9b
movq %rbx, %rcx
notq %rcx
movabsq $0x924924924924, %rdx # imm = 0x924924924924
testq %rcx, %rdx
sete %cl
orb %r9b, %cl
jne 0x4049a
leal (%r8,%r8,2), %ecx
shrq %cl, %rbx
movl %r11d, %ecx
subl %edi, %ecx
movl %ebx, %r9d
andl $0x7, %r9d
cmpl $0x4, %r9d
setb %r13b
testb %r14b, %r14b
setne %dl
andb %r13b, %dl
cmpb $0x1, %dl
jne 0x4045e
movl %ecx, 0xa38(%r12)
xorl %r14d, %r14d
cmpl %eax, %r9d
setbe %dl
cmpl %r10d, %r9d
setg %r13b
andb %dl, %r13b
cmpb $0x1, %r13b
jne 0x4048d
cmpl %eax, %r9d
je 0x404f4
cmpb $0x0, 0xa32(%r12)
movq %r11, %rsi
movl %r9d, %r10d
movl %r8d, %r15d
jne 0x404fc
incl %r8d
shrq $0x3, %rbx
cmpl $0x10, %r8d
jne 0x40436
addq $0x6, %r11
xorl %r8d, %r8d
cmpq -0x68(%rbp), %r11
jb 0x403f0
testq %rsi, %rsi
movq -0x38(%rbp), %rbx
movq -0x40(%rbp), %rdx
movl -0x2c(%rbp), %r9d
jne 0x405fc
movl 0xb38(%r12), %eax
addq %rdi, %rax
cmpq %rax, %r11
jb 0x405de
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x41cb8
testb %al, %al
movl -0x44(%rbp), %r14d
je 0x4032a
movb $0x1, %al
jmp 0x405cf
movl %r8d, %r15d
movl %eax, %r10d
jmp 0x40502
movl %r8d, %r15d
movl %r9d, %r10d
movq %r11, %rsi
movq -0x38(%rbp), %rbx
movq -0x40(%rbp), %rdx
movl -0x2c(%rbp), %r9d
testb $0x2, %r9b
jne 0x40521
movq 0xa20(%r12), %rax
jmp 0x40556
movl %esi, %eax
subl %edi, %eax
movl $0xaaaaaaab, %ecx # imm = 0xAAAAAAAB
imulq %rax, %rcx
shrq $0x20, %rcx
andl $-0x4, %ecx
leal (%r15,%rcx,4), %eax
movl %eax, 0xc28(%rdx)
movq 0xa20(%r12), %rax
movq %rax, 0xc30(%rdx)
movq 0xa18(%r12), %rdi
movq %rsi, %rcx
subl %edi, %ecx
movl $0xaaaaaaab, %edx # imm = 0xAAAAAAAB
imulq %rcx, %rdx
shrq $0x20, %rdx
andl $-0x4, %edx
leal (%r15,%rdx,4), %ecx
addq %rcx, %rax
incq %rax
movq %rax, (%rbx)
movl $0xffff, 0x8(%rbx) # imm = 0xFFFF
movl %r10d, %eax
movl 0xb18(%r12,%rax,4), %eax
movl %eax, 0xc(%rbx)
movl $0x0, 0x10(%rbx)
movb %r10b, 0x15(%rbx)
movb $0x4, 0x14(%rbx)
leal (%r15,%r15,2), %ecx
movl %ecx, %eax
shrl $0x3, %eax
andb $0x7, %cl
movl $0x7, %edx
shll %cl, %edx
movzwl (%rsi,%rax), %edi
notl %edx
andl %edi, %edx
movl $0x4, %edi
shll %cl, %edi
orl %edx, %edi
movw %di, (%rsi,%rax)
movb $0x1, 0xa30(%r12)
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r11d, %eax
subl %edi, %eax
addl $0x6, %eax
xorl %r15d, %r15d
xorl %r10d, %r10d
movq %r11, %rsi
movl %eax, 0xa34(%r12)
jmp 0x40511
movl %esi, %eax
subl %edi, %eax
addl $0x6, %eax
cmpl %eax, -0x50(%rbp)
jae 0x40511
jmp 0x405ef
| find_head:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14d, esi
mov r15, rdi
mov r12, [rdi]
lea r13, [r12+0A10h]
mov eax, edx
lea rbx, [rax+rax*2]
shl rbx, 3
add rbx, [rdi+2C0h]
test byte ptr [r12+428h], 2
jz short loc_40316
mov rax, [r12+0A20h]
mov rdx, [r12+0C30h]
mov rcx, r12
cmp rax, rdx
jz short loc_4030F
mov rdi, r15
mov rsi, r13
call _ma_change_bitmap_page
mov ecx, eax
mov al, 1
test cl, cl
jnz loc_405CF
mov rcx, [r15]
mov rax, [rcx+0C30h]
loc_4030F:
mov [rcx+0D0h], rax
loc_40316:
mov [rbp+var_58], r13
add r14d, 4
mov [rbp+var_60], r15
mov [rbp+var_38], rbx
mov [rbp+var_44], r14d
loc_4032A:
mov eax, 3
cmp [r12+0B24h], r14d
jnb short loc_40355
mov eax, 2
cmp [r12+0B20h], r14d
jnb short loc_40355
xor eax, eax
cmp [r12+0B1Ch], r14d
setnb al
loc_40355:
mov rdx, [r12+0A10h]
mov r9d, [rdx+428h]
test r9b, 2
jz short loc_40397
mov rcx, [r12+0A20h]
cmp rcx, [rdx+0C30h]
jnz short loc_40397
mov r8d, [rdx+0C28h]
mov ecx, r8d
shr ecx, 3
and ecx, 0FFFFFFFEh
lea ecx, [rcx+rcx*2]
and r8d, 0Fh
xor r14d, r14d
jmp short loc_403B7
loc_40397:
mov ecx, [r12+0A38h]
mov esi, 0AAAAAAABh
imul rcx, rsi
shr rcx, 22h
add ecx, ecx
lea ecx, [rcx+rcx*2]
xor r8d, r8d
mov r14b, 1
loc_403B7:
mov rdi, [r12+0A18h]
mov esi, [r12+0A34h]
mov r11d, ecx
add r11, rdi
cmp ecx, esi
jnb loc_404C0
mov [rbp+var_2C], r9d
mov [rbp+var_40], rdx
mov [rbp+var_50], rsi
add rsi, rdi
mov [rbp+var_68], rsi
mov r10d, 0FFFFFFFFh
xor esi, esi
loc_403F0:
mov ecx, [r11]
movzx ebx, word ptr [r11+4]
shl rbx, 20h
or rbx, rcx
test rbx, rbx
setz cl
test rsi, rsi
setnz r9b
and r9b, cl
mov rcx, rbx
not rcx
mov rdx, 924924924924h
test rdx, rcx
setz cl
or cl, r9b
jnz short loc_4049A
lea ecx, [r8+r8*2]
shr rbx, cl
mov ecx, r11d
sub ecx, edi
loc_40436:
mov r9d, ebx
and r9d, 7
cmp r9d, 4
setb r13b
test r14b, r14b
setnz dl
and dl, r13b
cmp dl, 1
jnz short loc_4045E
mov [r12+0A38h], ecx
xor r14d, r14d
loc_4045E:
cmp r9d, eax
setbe dl
cmp r9d, r10d
setnle r13b
and r13b, dl
cmp r13b, 1
jnz short loc_4048D
cmp r9d, eax
jz short loc_404F4
cmp byte ptr [r12+0A32h], 0
mov rsi, r11
mov r10d, r9d
mov r15d, r8d
jnz short loc_404FC
loc_4048D:
inc r8d
shr rbx, 3
cmp r8d, 10h
jnz short loc_40436
loc_4049A:
add r11, 6
xor r8d, r8d
cmp r11, [rbp+var_68]
jb loc_403F0
test rsi, rsi
mov rbx, [rbp+var_38]
mov rdx, [rbp+var_40]
mov r9d, [rbp+var_2C]
jnz loc_405FC
loc_404C0:
mov eax, [r12+0B38h]
add rax, rdi
cmp r11, rax
jb loc_405DE
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_58]
call move_to_next_bitmap
test al, al
mov r14d, [rbp+var_44]
jz loc_4032A
mov al, 1
jmp loc_405CF
loc_404F4:
mov r15d, r8d
mov r10d, eax
jmp short loc_40502
loc_404FC:
mov r15d, r8d
mov r10d, r9d
loc_40502:
mov rsi, r11
mov rbx, [rbp+var_38]
mov rdx, [rbp+var_40]
mov r9d, [rbp+var_2C]
loc_40511:
test r9b, 2
jnz short loc_40521
mov rax, [r12+0A20h]
jmp short loc_40556
loc_40521:
mov eax, esi
sub eax, edi
mov ecx, 0AAAAAAABh
imul rcx, rax
shr rcx, 20h
and ecx, 0FFFFFFFCh
lea eax, [r15+rcx*4]
mov [rdx+0C28h], eax
mov rax, [r12+0A20h]
mov [rdx+0C30h], rax
mov rdi, [r12+0A18h]
loc_40556:
mov rcx, rsi
sub ecx, edi
mov edx, 0AAAAAAABh
imul rdx, rcx
shr rdx, 20h
and edx, 0FFFFFFFCh
lea ecx, [r15+rdx*4]
add rax, rcx
inc rax
mov [rbx], rax
mov dword ptr [rbx+8], 0FFFFh
mov eax, r10d
mov eax, [r12+rax*4+0B18h]
mov [rbx+0Ch], eax
mov dword ptr [rbx+10h], 0
mov [rbx+15h], r10b
mov byte ptr [rbx+14h], 4
lea ecx, [r15+r15*2]
mov eax, ecx
shr eax, 3
and cl, 7
mov edx, 7
shl edx, cl
movzx edi, word ptr [rsi+rax]
not edx
and edx, edi
mov edi, 4
shl edi, cl
or edi, edx
mov [rsi+rax], di
mov byte ptr [r12+0A30h], 1
xor eax, eax
loc_405CF:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_405DE:
mov eax, r11d
sub eax, edi
add eax, 6
xor r15d, r15d
xor r10d, r10d
mov rsi, r11
loc_405EF:
mov [r12+0A34h], eax
jmp loc_40511
loc_405FC:
mov eax, esi
sub eax, edi
add eax, 6
cmp dword ptr [rbp+var_50], eax
jnb loc_40511
jmp short loc_405EF
| char find_head(_QWORD *a1, int a2, unsigned int a3)
{
int v3; // r15d
long long v4; // r12
long long v5; // r13
long long v6; // rbx
long long v7; // rax
long long v8; // rdx
long long v9; // rcx
char v10; // cl
char result; // al
unsigned int v12; // r14d
unsigned int v13; // eax
long long v14; // rdx
long long v15; // r9
unsigned long long v16; // rcx
long long v17; // r8
char v18; // r14
long long v19; // rdi
long long v20; // rsi
unsigned int *v21; // r11
int v22; // r10d
unsigned int *v23; // rsi
unsigned long long v24; // rbx
unsigned long long v25; // rbx
unsigned int v26; // r9d
long long v27; // rax
unsigned int v28; // eax
unsigned long long v29; // [rsp+8h] [rbp-68h]
unsigned int v31; // [rsp+20h] [rbp-50h]
unsigned int v32; // [rsp+2Ch] [rbp-44h]
long long v33; // [rsp+38h] [rbp-38h]
unsigned int v34; // [rsp+44h] [rbp-2Ch]
v3 = (int)a1;
v4 = *a1;
v5 = *a1 + 2576LL;
v6 = a1[88] + 24LL * a3;
if ( (*(_BYTE *)(*a1 + 1064LL) & 2) != 0 )
{
v7 = *(_QWORD *)(v4 + 2592);
v8 = *(_QWORD *)(v4 + 3120);
v9 = *a1;
if ( v7 != v8 )
{
v10 = ma_change_bitmap_page(a1, *a1 + 2576LL, v8, v9);
result = 1;
if ( v10 )
return result;
v9 = *a1;
v7 = *(_QWORD *)(*a1 + 3120LL);
}
*(_QWORD *)(v9 + 208) = v7;
}
v12 = a2 + 4;
v33 = v6;
v32 = a2 + 4;
while ( 1 )
{
v13 = 3;
if ( *(_DWORD *)(v4 + 2852) < v12 )
{
v13 = 2;
if ( *(_DWORD *)(v4 + 2848) < v12 )
v13 = *(_DWORD *)(v4 + 2844) >= v12;
}
v14 = *(_QWORD *)(v4 + 2576);
v15 = *(unsigned int *)(v14 + 1064);
if ( (v15 & 2) != 0 && *(_QWORD *)(v4 + 2592) == *(_QWORD *)(v14 + 3120) )
{
v16 = 3 * ((*(_DWORD *)(v14 + 3112) >> 3) & 0xFFFFFFFE);
v17 = *(_DWORD *)(v14 + 3112) & 0xF;
v18 = 0;
}
else
{
v16 = 6 * (*(_DWORD *)(v4 + 2616) / 6u);
v17 = 0LL;
v18 = 1;
}
v19 = *(_QWORD *)(v4 + 2584);
v20 = *(unsigned int *)(v4 + 2612);
v21 = (unsigned int *)(v19 + (unsigned int)v16);
if ( (unsigned int)v16 < (unsigned int)v20 )
break;
LABEL_26:
if ( (unsigned long long)v21 < v19 + (unsigned long long)*(unsigned int *)(v4 + 2872) )
{
v28 = (_DWORD)v21 - v19 + 6;
v3 = 0;
v22 = 0;
v23 = v21;
LABEL_38:
*(_DWORD *)(v4 + 2612) = v28;
goto LABEL_32;
}
v12 = v32;
if ( (unsigned __int8)move_to_next_bitmap(a1, v5, v14, v16, v17, v15) )
return 1;
}
v34 = *(_DWORD *)(v14 + 1064);
v31 = *(_DWORD *)(v4 + 2612);
v29 = v19 + v20;
v22 = -1;
v23 = 0LL;
do
{
v24 = *v21 | ((unsigned long long)*((unsigned __int16 *)v21 + 2) << 32);
v16 = ~v24;
LOBYTE(v16) = v24 == 0 && v23 != 0LL || (~v24 & 0x924924924924LL) == 0;
if ( !(_BYTE)v16 )
{
v25 = v24 >> (3 * (unsigned __int8)v17);
v16 = (unsigned int)((_DWORD)v21 - v19);
while ( 1 )
{
v26 = v25 & 7;
if ( v26 < 4 && v18 != 0 )
{
*(_DWORD *)(v4 + 2616) = v16;
v18 = 0;
}
if ( v26 <= v13 && (int)v26 > v22 )
{
if ( v26 == v13 )
{
v3 = v17;
v22 = v13;
goto LABEL_31;
}
v23 = v21;
v22 = v25 & 7;
v3 = v17;
if ( *(_BYTE *)(v4 + 2610) )
break;
}
LODWORD(v17) = v17 + 1;
v25 >>= 3;
if ( (_DWORD)v17 == 16 )
goto LABEL_24;
}
v3 = v17;
v22 = v25 & 7;
LABEL_31:
v23 = v21;
v6 = v33;
LOBYTE(v15) = v34;
goto LABEL_32;
}
LABEL_24:
v21 = (unsigned int *)((char *)v21 + 6);
v17 = 0LL;
}
while ( (unsigned long long)v21 < v29 );
v6 = v33;
v15 = v34;
if ( !v23 )
goto LABEL_26;
v28 = (_DWORD)v23 - v19 + 6;
if ( v31 < v28 )
goto LABEL_38;
LABEL_32:
if ( (v15 & 2) != 0 )
{
*(_DWORD *)(v14 + 3112) = v3
+ 4
* (((2863311531u * (unsigned long long)(unsigned int)((_DWORD)v23 - v19)) >> 32) & 0xFFFFFFFC);
v27 = *(_QWORD *)(v4 + 2592);
*(_QWORD *)(v14 + 3120) = v27;
v19 = *(_QWORD *)(v4 + 2584);
}
else
{
v27 = *(_QWORD *)(v4 + 2592);
}
*(_QWORD *)v6 = v3
+ 4 * (((2863311531u * (unsigned long long)(unsigned int)((_DWORD)v23 - v19)) >> 32) & 0xFFFFFFFC)
+ v27
+ 1;
*(_DWORD *)(v6 + 8) = 0xFFFF;
*(_DWORD *)(v6 + 12) = *(_DWORD *)(v4 + 4LL * (unsigned int)v22 + 2840);
*(_DWORD *)(v6 + 16) = 0;
*(_BYTE *)(v6 + 21) = v22;
*(_BYTE *)(v6 + 20) = 4;
*(_WORD *)((char *)v23 + ((unsigned int)(3 * v3) >> 3)) = *(_WORD *)((_BYTE *)v23 + ((unsigned int)(3 * v3) >> 3)) & ~(7 << ((3 * v3) & 7)) | (4 << ((3 * v3) & 7));
*(_BYTE *)(v4 + 2608) = 1;
return 0;
}
| find_head:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14D,ESI
MOV R15,RDI
MOV R12,qword ptr [RDI]
LEA R13,[R12 + 0xa10]
MOV EAX,EDX
LEA RBX,[RAX + RAX*0x2]
SHL RBX,0x3
ADD RBX,qword ptr [RDI + 0x2c0]
TEST byte ptr [R12 + 0x428],0x2
JZ 0x00140316
MOV RAX,qword ptr [R12 + 0xa20]
MOV RDX,qword ptr [R12 + 0xc30]
MOV RCX,R12
CMP RAX,RDX
JZ 0x0014030f
MOV RDI,R15
MOV RSI,R13
CALL 0x00140c31
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x001405cf
MOV RCX,qword ptr [R15]
MOV RAX,qword ptr [RCX + 0xc30]
LAB_0014030f:
MOV qword ptr [RCX + 0xd0],RAX
LAB_00140316:
MOV qword ptr [RBP + -0x58],R13
ADD R14D,0x4
MOV qword ptr [RBP + -0x60],R15
MOV qword ptr [RBP + -0x38],RBX
MOV dword ptr [RBP + -0x44],R14D
LAB_0014032a:
MOV EAX,0x3
CMP dword ptr [R12 + 0xb24],R14D
JNC 0x00140355
MOV EAX,0x2
CMP dword ptr [R12 + 0xb20],R14D
JNC 0x00140355
XOR EAX,EAX
CMP dword ptr [R12 + 0xb1c],R14D
SETNC AL
LAB_00140355:
MOV RDX,qword ptr [R12 + 0xa10]
MOV R9D,dword ptr [RDX + 0x428]
TEST R9B,0x2
JZ 0x00140397
MOV RCX,qword ptr [R12 + 0xa20]
CMP RCX,qword ptr [RDX + 0xc30]
JNZ 0x00140397
MOV R8D,dword ptr [RDX + 0xc28]
MOV ECX,R8D
SHR ECX,0x3
AND ECX,0xfffffffe
LEA ECX,[RCX + RCX*0x2]
AND R8D,0xf
XOR R14D,R14D
JMP 0x001403b7
LAB_00140397:
MOV ECX,dword ptr [R12 + 0xa38]
MOV ESI,0xaaaaaaab
IMUL RCX,RSI
SHR RCX,0x22
ADD ECX,ECX
LEA ECX,[RCX + RCX*0x2]
XOR R8D,R8D
MOV R14B,0x1
LAB_001403b7:
MOV RDI,qword ptr [R12 + 0xa18]
MOV ESI,dword ptr [R12 + 0xa34]
MOV R11D,ECX
ADD R11,RDI
CMP ECX,ESI
JNC 0x001404c0
MOV dword ptr [RBP + -0x2c],R9D
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x50],RSI
ADD RSI,RDI
MOV qword ptr [RBP + -0x68],RSI
MOV R10D,0xffffffff
XOR ESI,ESI
LAB_001403f0:
MOV ECX,dword ptr [R11]
MOVZX EBX,word ptr [R11 + 0x4]
SHL RBX,0x20
OR RBX,RCX
TEST RBX,RBX
SETZ CL
TEST RSI,RSI
SETNZ R9B
AND R9B,CL
MOV RCX,RBX
NOT RCX
MOV RDX,0x924924924924
TEST RDX,RCX
SETZ CL
OR CL,R9B
JNZ 0x0014049a
LEA ECX,[R8 + R8*0x2]
SHR RBX,CL
MOV ECX,R11D
SUB ECX,EDI
LAB_00140436:
MOV R9D,EBX
AND R9D,0x7
CMP R9D,0x4
SETC R13B
TEST R14B,R14B
SETNZ DL
AND DL,R13B
CMP DL,0x1
JNZ 0x0014045e
MOV dword ptr [R12 + 0xa38],ECX
XOR R14D,R14D
LAB_0014045e:
CMP R9D,EAX
SETBE DL
CMP R9D,R10D
SETG R13B
AND R13B,DL
CMP R13B,0x1
JNZ 0x0014048d
CMP R9D,EAX
JZ 0x001404f4
CMP byte ptr [R12 + 0xa32],0x0
MOV RSI,R11
MOV R10D,R9D
MOV R15D,R8D
JNZ 0x001404fc
LAB_0014048d:
INC R8D
SHR RBX,0x3
CMP R8D,0x10
JNZ 0x00140436
LAB_0014049a:
ADD R11,0x6
XOR R8D,R8D
CMP R11,qword ptr [RBP + -0x68]
JC 0x001403f0
TEST RSI,RSI
MOV RBX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x40]
MOV R9D,dword ptr [RBP + -0x2c]
JNZ 0x001405fc
LAB_001404c0:
MOV EAX,dword ptr [R12 + 0xb38]
ADD RAX,RDI
CMP R11,RAX
JC 0x001405de
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x58]
CALL 0x00141cb8
TEST AL,AL
MOV R14D,dword ptr [RBP + -0x44]
JZ 0x0014032a
MOV AL,0x1
JMP 0x001405cf
LAB_001404f4:
MOV R15D,R8D
MOV R10D,EAX
JMP 0x00140502
LAB_001404fc:
MOV R15D,R8D
MOV R10D,R9D
LAB_00140502:
MOV RSI,R11
MOV RBX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x40]
MOV R9D,dword ptr [RBP + -0x2c]
LAB_00140511:
TEST R9B,0x2
JNZ 0x00140521
MOV RAX,qword ptr [R12 + 0xa20]
JMP 0x00140556
LAB_00140521:
MOV EAX,ESI
SUB EAX,EDI
MOV ECX,0xaaaaaaab
IMUL RCX,RAX
SHR RCX,0x20
AND ECX,0xfffffffc
LEA EAX,[R15 + RCX*0x4]
MOV dword ptr [RDX + 0xc28],EAX
MOV RAX,qword ptr [R12 + 0xa20]
MOV qword ptr [RDX + 0xc30],RAX
MOV RDI,qword ptr [R12 + 0xa18]
LAB_00140556:
MOV RCX,RSI
SUB ECX,EDI
MOV EDX,0xaaaaaaab
IMUL RDX,RCX
SHR RDX,0x20
AND EDX,0xfffffffc
LEA ECX,[R15 + RDX*0x4]
ADD RAX,RCX
INC RAX
MOV qword ptr [RBX],RAX
MOV dword ptr [RBX + 0x8],0xffff
MOV EAX,R10D
MOV EAX,dword ptr [R12 + RAX*0x4 + 0xb18]
MOV dword ptr [RBX + 0xc],EAX
MOV dword ptr [RBX + 0x10],0x0
MOV byte ptr [RBX + 0x15],R10B
MOV byte ptr [RBX + 0x14],0x4
LEA ECX,[R15 + R15*0x2]
MOV EAX,ECX
SHR EAX,0x3
AND CL,0x7
MOV EDX,0x7
SHL EDX,CL
MOVZX EDI,word ptr [RSI + RAX*0x1]
NOT EDX
AND EDX,EDI
MOV EDI,0x4
SHL EDI,CL
OR EDI,EDX
MOV word ptr [RSI + RAX*0x1],DI
MOV byte ptr [R12 + 0xa30],0x1
XOR EAX,EAX
LAB_001405cf:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001405de:
MOV EAX,R11D
SUB EAX,EDI
ADD EAX,0x6
XOR R15D,R15D
XOR R10D,R10D
MOV RSI,R11
LAB_001405ef:
MOV dword ptr [R12 + 0xa34],EAX
JMP 0x00140511
LAB_001405fc:
MOV EAX,ESI
SUB EAX,EDI
ADD EAX,0x6
CMP dword ptr [RBP + -0x50],EAX
JNC 0x00140511
JMP 0x001405ef
|
int8 find_head(long *param_1,int param_2,ulong param_3)
{
uint uVar1;
uint uVar2;
long lVar3;
uint6 uVar4;
uint uVar5;
bool bVar6;
char cVar7;
uint uVar8;
long lVar9;
long lVar10;
byte bVar11;
long lVar12;
long *plVar13;
ulong uVar14;
uint6 *puVar15;
int iVar16;
long *plVar17;
uint uVar18;
ulong uVar19;
uint6 *puVar20;
uint uVar21;
int iVar22;
long *plVar23;
lVar3 = *param_1;
plVar13 = (long *)((param_3 & 0xffffffff) * 0x18 + param_1[0x58]);
if ((*(byte *)(lVar3 + 0x428) & 2) != 0) {
lVar9 = *(long *)(lVar3 + 0xa20);
lVar12 = lVar3;
if (lVar9 != *(long *)(lVar3 + 0xc30)) {
cVar7 = _ma_change_bitmap_page(param_1,lVar3 + 0xa10);
if (cVar7 != '\0') {
return 1;
}
lVar12 = *param_1;
lVar9 = *(long *)(lVar12 + 0xc30);
}
*(long *)(lVar12 + 0xd0) = lVar9;
}
uVar21 = param_2 + 4;
plVar23 = param_1;
while( true ) {
uVar8 = 3;
if ((*(uint *)(lVar3 + 0xb24) < uVar21) && (uVar8 = 2, *(uint *)(lVar3 + 0xb20) < uVar21)) {
uVar8 = (uint)(uVar21 <= *(uint *)(lVar3 + 0xb1c));
}
lVar9 = *(long *)(lVar3 + 0xa10);
uVar1 = *(uint *)(lVar9 + 0x428);
if (((uVar1 & 2) == 0) || (*(long *)(lVar3 + 0xa20) != *(long *)(lVar9 + 0xc30))) {
uVar18 = (*(uint *)(lVar3 + 0xa38) / 6) * 6;
plVar17 = (long *)0x0;
bVar6 = true;
}
else {
uVar18 = (*(uint *)(lVar9 + 0xc28) >> 3 & 0xfffffffe) * 3;
plVar17 = (long *)(ulong)(*(uint *)(lVar9 + 0xc28) & 0xf);
bVar6 = false;
}
lVar12 = *(long *)(lVar3 + 0xa18);
uVar2 = *(uint *)(lVar3 + 0xa34);
puVar20 = (uint6 *)((ulong)uVar18 + lVar12);
iVar16 = (int)lVar12;
if (uVar18 < uVar2) break;
LAB_001404c0:
puVar15 = puVar20;
if (puVar15 < (uint6 *)((ulong)*(uint *)(lVar3 + 0xb38) + lVar12)) {
uVar21 = ((int)puVar15 - iVar16) + 6;
iVar22 = 0;
uVar19 = 0;
goto LAB_001405ef;
}
cVar7 = move_to_next_bitmap(param_1,lVar3 + 0xa10);
if (cVar7 != '\0') {
return 1;
}
}
uVar19 = 0xffffffff;
puVar15 = (uint6 *)0x0;
do {
uVar4 = *puVar20;
if ((~(ulong)uVar4 & 0x924924924924) != 0 && (puVar15 == (uint6 *)0x0 || (ulong)uVar4 != 0)) {
uVar14 = (ulong)(uVar4 >> (char)plVar17 * '\x03');
do {
iVar22 = (int)plVar17;
uVar18 = (uint)uVar14 & 7;
if (bVar6 && uVar18 < 4) {
*(int *)(lVar3 + 0xa38) = (int)puVar20 - iVar16;
bVar6 = false;
}
if (((int)uVar19 < (int)uVar18 && uVar18 <= uVar8) &&
((uVar5 = uVar8, uVar18 == uVar8 ||
(uVar19 = (ulong)uVar18, puVar15 = puVar20, plVar23 = plVar17, uVar5 = uVar18,
*(char *)(lVar3 + 0xa32) != '\0')))) {
uVar19 = (ulong)uVar5;
goto LAB_00140511;
}
plVar17 = (long *)(ulong)(iVar22 + 1U);
uVar14 = uVar14 >> 3;
} while (iVar22 + 1U != 0x10);
}
iVar22 = (int)plVar23;
puVar20 = (uint6 *)((long)puVar20 + 6);
plVar17 = (long *)0x0;
} while (puVar20 < (uint6 *)((ulong)uVar2 + lVar12));
if (puVar15 == (uint6 *)0x0) goto LAB_001404c0;
uVar21 = ((int)puVar15 - iVar16) + 6;
puVar20 = puVar15;
if (uVar21 <= uVar2) goto LAB_00140511;
LAB_001405ef:
*(uint *)(lVar3 + 0xa34) = uVar21;
puVar20 = puVar15;
LAB_00140511:
if ((uVar1 & 2) == 0) {
lVar10 = *(long *)(lVar3 + 0xa20);
}
else {
*(uint *)(lVar9 + 0xc28) =
iVar22 + ((uint)((ulong)(uint)((int)puVar20 - iVar16) * 0xaaaaaaab >> 0x20) & 0xfffffffc) *
4;
lVar10 = *(long *)(lVar3 + 0xa20);
*(long *)(lVar9 + 0xc30) = lVar10;
lVar12 = *(long *)(lVar3 + 0xa18);
}
*plVar13 = lVar10 + (ulong)(iVar22 + ((uint)((ulong)(uint)((int)puVar20 - (int)lVar12) *
0xaaaaaaab >> 0x20) & 0xfffffffc) * 4) + 1;
*(int4 *)(plVar13 + 1) = 0xffff;
*(int4 *)((long)plVar13 + 0xc) = *(int4 *)(lVar3 + 0xb18 + uVar19 * 4);
*(int4 *)(plVar13 + 2) = 0;
*(char *)((long)plVar13 + 0x15) = (char)uVar19;
*(int1 *)((long)plVar13 + 0x14) = 4;
uVar19 = (ulong)((uint)(iVar22 * 3) >> 3);
bVar11 = (byte)(iVar22 * 3) & 7;
*(ushort *)((long)puVar20 + uVar19) =
(ushort)(4 << bVar11) | ~(ushort)(7 << bVar11) & *(ushort *)((long)puVar20 + uVar19);
*(int1 *)(lVar3 + 0xa30) = 1;
return 0;
}
| |
33,874 | OpenSubdiv::v3_6_0::Vtr::internal::Level::getTopologyErrorString(OpenSubdiv::v3_6_0::Vtr::internal::Level::TopologyError) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | char const *
Level::getTopologyErrorString(TopologyError errCode) {
switch (errCode) {
case TOPOLOGY_MISSING_EDGE_FACES :
return "MISSING_EDGE_FACES";
case TOPOLOGY_MISSING_EDGE_VERTS :
return "MISSING_EDGE_VERTS";
case TOPOLOGY_MISSING_FACE_EDGES :
return "MISSING_FACE_EDGES";
case TOPOLOGY_MISSING_FACE_VERTS :
return "MISSING_FACE_VERTS";
case TOPOLOGY_MISSING_VERT_FACES :
return "MISSING_VERT_FACES";
case TOPOLOGY_MISSING_VERT_EDGES :
return "MISSING_VERT_EDGES";
case TOPOLOGY_FAILED_CORRELATION_EDGE_FACE :
return "FAILED_CORRELATION_EDGE_FACE";
case TOPOLOGY_FAILED_CORRELATION_FACE_VERT :
return "FAILED_CORRELATION_FACE_VERT";
case TOPOLOGY_FAILED_CORRELATION_FACE_EDGE :
return "FAILED_CORRELATION_FACE_EDGE";
case TOPOLOGY_FAILED_ORIENTATION_INCIDENT_EDGE :
return "FAILED_ORIENTATION_INCIDENT_EDGE";
case TOPOLOGY_FAILED_ORIENTATION_INCIDENT_FACE :
return "FAILED_ORIENTATION_INCIDENT_FACE";
case TOPOLOGY_FAILED_ORIENTATION_INCIDENT_FACES_EDGES :
return "FAILED_ORIENTATION_INCIDENT_FACES_EDGES";
case TOPOLOGY_DEGENERATE_EDGE :
return "DEGENERATE_EDGE";
case TOPOLOGY_NON_MANIFOLD_EDGE :
return "NON_MANIFOLD_EDGE";
case TOPOLOGY_INVALID_CREASE_EDGE :
return "INVALID_CREASE_EDGE";
case TOPOLOGY_INVALID_CREASE_VERT :
return "INVALID_CREASE_VERT";
default:
assert(0);
}
return 0;
} | O1 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::Level::getTopologyErrorString(OpenSubdiv::v3_6_0::Vtr::internal::Level::TopologyError):
cmpl $0x10, %edi
jae 0x4158a
movl %edi, %eax
leaq 0x723de(%rip), %rcx # 0xb3960
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
retq
pushq %rax
leaq 0x70aa7(%rip), %rdi # 0xb2039
leaq 0x7145d(%rip), %rsi # 0xb29f6
leaq 0x714ad(%rip), %rcx # 0xb2a4d
movl $0x77, %edx
callq 0x39560
| _ZN10OpenSubdiv6v3_6_03Vtr8internal5Level22getTopologyErrorStringENS3_13TopologyErrorE:
cmp edi, 10h
jnb short loc_4158A
mov eax, edi
lea rcx, unk_B3960
movsxd rax, dword ptr [rcx+rax*4]
add rax, rcx
retn
loc_4158A:
push rax
lea rdi, aVspanSize0+0Fh; "0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aStaticConstCha; "static const char *OpenSubdiv::v3_6_0::"...
mov edx, 77h ; 'w'
call ___assert_fail
| char * OpenSubdiv::v3_6_0::Vtr::internal::Level::getTopologyErrorString(unsigned int a1)
{
if ( a1 >= 0x10 )
__assert_fail(
"0",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp",
119LL,
"static const char *OpenSubdiv::v3_6_0::Vtr::internal::Level::getTopologyErrorString(TopologyError)");
return (char *)dword_B3960 + dword_B3960[a1];
}
| getTopologyErrorString:
CMP EDI,0x10
JNC 0x0014158a
MOV EAX,EDI
LEA RCX,[0x1b3960]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
RET
LAB_0014158a:
PUSH RAX
LEA RDI,[0x1b2039]
LEA RSI,[0x1b29f6]
LEA RCX,[0x1b2a4d]
MOV EDX,0x77
CALL 0x00139560
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::getTopologyErrorString(OpenSubdiv::v3_6_0::Vtr::internal::Level::TopologyError)
*/
int * OpenSubdiv::v3_6_0::Vtr::internal::Level::getTopologyErrorString(uint param_1)
{
if (param_1 < 0x10) {
return &DAT_001b3960 + *(int *)(&DAT_001b3960 + (ulong)param_1 * 4);
}
/* WARNING: Subroutine does not return */
__assert_fail("0",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp"
,0x77,
"static const char *OpenSubdiv::v3_6_0::Vtr::internal::Level::getTopologyErrorString(TopologyError)"
);
}
| |
33,875 | OpenSubdiv::v3_6_0::Vtr::internal::Level::getTopologyErrorString(OpenSubdiv::v3_6_0::Vtr::internal::Level::TopologyError) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | char const *
Level::getTopologyErrorString(TopologyError errCode) {
switch (errCode) {
case TOPOLOGY_MISSING_EDGE_FACES :
return "MISSING_EDGE_FACES";
case TOPOLOGY_MISSING_EDGE_VERTS :
return "MISSING_EDGE_VERTS";
case TOPOLOGY_MISSING_FACE_EDGES :
return "MISSING_FACE_EDGES";
case TOPOLOGY_MISSING_FACE_VERTS :
return "MISSING_FACE_VERTS";
case TOPOLOGY_MISSING_VERT_FACES :
return "MISSING_VERT_FACES";
case TOPOLOGY_MISSING_VERT_EDGES :
return "MISSING_VERT_EDGES";
case TOPOLOGY_FAILED_CORRELATION_EDGE_FACE :
return "FAILED_CORRELATION_EDGE_FACE";
case TOPOLOGY_FAILED_CORRELATION_FACE_VERT :
return "FAILED_CORRELATION_FACE_VERT";
case TOPOLOGY_FAILED_CORRELATION_FACE_EDGE :
return "FAILED_CORRELATION_FACE_EDGE";
case TOPOLOGY_FAILED_ORIENTATION_INCIDENT_EDGE :
return "FAILED_ORIENTATION_INCIDENT_EDGE";
case TOPOLOGY_FAILED_ORIENTATION_INCIDENT_FACE :
return "FAILED_ORIENTATION_INCIDENT_FACE";
case TOPOLOGY_FAILED_ORIENTATION_INCIDENT_FACES_EDGES :
return "FAILED_ORIENTATION_INCIDENT_FACES_EDGES";
case TOPOLOGY_DEGENERATE_EDGE :
return "DEGENERATE_EDGE";
case TOPOLOGY_NON_MANIFOLD_EDGE :
return "NON_MANIFOLD_EDGE";
case TOPOLOGY_INVALID_CREASE_EDGE :
return "INVALID_CREASE_EDGE";
case TOPOLOGY_INVALID_CREASE_VERT :
return "INVALID_CREASE_VERT";
default:
assert(0);
}
return 0;
} | O3 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::Level::getTopologyErrorString(OpenSubdiv::v3_6_0::Vtr::internal::Level::TopologyError):
cmpl $0x10, %edi
jae 0x42b2a
movl %edi, %eax
leaq 0x73e9e(%rip), %rcx # 0xb69c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
retq
pushq %rax
leaq 0x7255d(%rip), %rdi # 0xb508f
leaq 0x72f31(%rip), %rsi # 0xb5a6a
leaq 0x72f81(%rip), %rcx # 0xb5ac1
movl $0x77, %edx
callq 0x39540
| _ZN10OpenSubdiv6v3_6_03Vtr8internal5Level22getTopologyErrorStringENS3_13TopologyErrorE:
cmp edi, 10h
jnb short loc_42B2A
mov eax, edi
lea rcx, unk_B69C0
movsxd rax, dword ptr [rcx+rax*4]
add rax, rcx
retn
loc_42B2A:
push rax
lea rdi, aVspanSize0+0Fh; "0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aStaticConstCha; "static const char *OpenSubdiv::v3_6_0::"...
mov edx, 77h ; 'w'
call ___assert_fail
| char * OpenSubdiv::v3_6_0::Vtr::internal::Level::getTopologyErrorString(unsigned int a1)
{
if ( a1 >= 0x10 )
__assert_fail(
"0",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp",
119LL,
"static const char *OpenSubdiv::v3_6_0::Vtr::internal::Level::getTopologyErrorString(TopologyError)");
return (char *)dword_B69C0 + dword_B69C0[a1];
}
| getTopologyErrorString:
CMP EDI,0x10
JNC 0x00142b2a
MOV EAX,EDI
LEA RCX,[0x1b69c0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
RET
LAB_00142b2a:
PUSH RAX
LEA RDI,[0x1b508f]
LEA RSI,[0x1b5a6a]
LEA RCX,[0x1b5ac1]
MOV EDX,0x77
CALL 0x00139540
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::getTopologyErrorString(OpenSubdiv::v3_6_0::Vtr::internal::Level::TopologyError)
*/
int * OpenSubdiv::v3_6_0::Vtr::internal::Level::getTopologyErrorString(uint param_1)
{
if (param_1 < 0x10) {
return &DAT_001b69c0 + *(int *)(&DAT_001b69c0 + (ulong)param_1 * 4);
}
/* WARNING: Subroutine does not return */
__assert_fail("0",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp"
,0x77,
"static const char *OpenSubdiv::v3_6_0::Vtr::internal::Level::getTopologyErrorString(TopologyError)"
);
}
| |
33,876 | psi_prlock_rdlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_prlock_rdlock(mysql_prlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)
(&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line);
int result= rw_pr_rdlock(&that->m_prlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
return result;
} | O0 | c | psi_prlock_rdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1c965e(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x1a0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x68(%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 0xfa250
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xf6aad
leaq 0x1c961e(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x1a8(%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_prlock_rdlock:
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+1A0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+68h]
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 rw_pr_rdlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_F6AAD
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_F6AAD:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_prlock_rdlock(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[52])(
v6,
*(_QWORD *)(a1 + 104),
0LL,
a2,
a3);
v4 = rw_pr_rdlock(v9);
if ( v5 )
((void ( *)(long long, _QWORD))PSI_server[53])(v5, v4);
return v4;
}
| psi_prlock_rdlock:
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,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x68]
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 0x001fa250
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001f6aad
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a8]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_001f6aad:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_prlock_rdlock(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 + 0x1a0))
(local_50,*(int8 *)(param_1 + 0x68),0,param_2,param_3);
uVar1 = rw_pr_rdlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1a8))(lVar2,uVar1);
}
return uVar1;
}
| |
33,877 | psi_prlock_rdlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_prlock_rdlock(mysql_prlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)
(&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line);
int result= rw_pr_rdlock(&that->m_prlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
return result;
} | O3 | c | psi_prlock_rdlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x357214(%rip), %r15 # 0x386010
movq (%r15), %rax
movq 0x68(%rdi), %rsi
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *0x1a0(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0xa4577
movl %eax, %r14d
testq %rbx, %rbx
je 0x2ee31
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1a8(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| psi_prlock_rdlock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+68h]
lea rdi, [rbp+var_48]
xor edx, edx
call qword ptr [rax+1A0h]
mov rbx, rax
mov rdi, r14
call rw_pr_rdlock
mov r14d, eax
test rbx, rbx
jz short loc_2EE31
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1A8h]
loc_2EE31:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long psi_prlock_rdlock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[52])(
v6,
*(_QWORD *)(a1 + 104),
0LL,
a2,
a3);
v4 = rw_pr_rdlock(a1);
if ( v3 )
((void ( *)(long long, _QWORD))PSI_server[53])(v3, v4);
return v4;
}
| psi_prlock_rdlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x486010]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x68]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL qword ptr [RAX + 0x1a0]
MOV RBX,RAX
MOV RDI,R14
CALL 0x001a4577
MOV R14D,EAX
TEST RBX,RBX
JZ 0x0012ee31
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1a8]
LAB_0012ee31:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 psi_prlock_rdlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 0x1a0))
(local_50,*(int8 *)(param_1 + 0x68),0,param_2,param_3);
uVar1 = rw_pr_rdlock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1a8))(lVar2,uVar1);
}
return uVar1;
}
| |
33,878 | void testing::internal::PrintCharAndCodeTo<wchar_t>(wchar_t, std::ostream*) | seiftnesse[P]memoryallocator/build_O3/_deps/googletest-src/googletest/src/gtest-printers.cc | void PrintCharAndCodeTo(Char c, ostream* os) {
// First, print c as a literal in the most readable form we can find.
*os << GetCharWidthPrefix(c) << "'";
const CharFormat format = PrintAsCharLiteralTo(c, os);
*os << "'";
// To aid user debugging, we also print c's code in decimal, unless
// it's 0 (in which case c was printed as '\\0', making the code
// obvious).
if (c == 0) return;
*os << " (" << static_cast<int>(c);
// For more convenience, we print c's code again in hexadecimal,
// unless c was already printed in the form '\x##' or the code is in
// [1, 9].
if (format == kHexEscape || (1 <= c && c <= 9)) {
// Do nothing.
} else {
*os << ", 0x" << String::FormatHexInt(static_cast<int>(c));
}
*os << ")";
} | O3 | cpp | void testing::internal::PrintCharAndCodeTo<wchar_t>(wchar_t, std::ostream*):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movl %edi, %r14d
leaq 0xb18d(%rip), %rsi # 0x407cf
movl $0x1, %edx
movq %rbx, %rdi
callq 0x95a0
leaq 0xd5dc(%rip), %rsi # 0x42c32
movl $0x1, %edx
movq %rbx, %rdi
callq 0x95a0
cmpl $0xd, %r14d
ja 0x356ae
movl %r14d, %eax
leaq 0xcb9d(%rip), %rcx # 0x42210
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xd9e8(%rip), %rsi # 0x4306b
movl $0x2, %edx
movq %rbx, %rdi
callq 0x95a0
leaq 0xd59b(%rip), %rsi # 0x42c32
movl $0x1, %edx
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x95a0
cmpl $0x27, %r14d
je 0x3571e
cmpl $0x5c, %r14d
jne 0x356c3
leaq 0xf2f5(%rip), %rsi # 0x449b6
jmp 0x35725
leal -0x20(%r14), %eax
cmpl $0x5e, %eax
ja 0x357e0
leaq 0x8(%rsp), %rsi
movb %r14b, (%rsi)
movl $0x1, %edx
jmp 0x3572a
leaq 0xf2d6(%rip), %rsi # 0x449bc
jmp 0x35725
leaq 0xe2df(%rip), %rsi # 0x439ce
jmp 0x35725
leaq 0xe2d9(%rip), %rsi # 0x439d1
jmp 0x35725
leaq 0xf2b8(%rip), %rsi # 0x449b9
jmp 0x35725
leaq 0xe2c1(%rip), %rsi # 0x439cb
jmp 0x35725
leaq 0xe2b2(%rip), %rsi # 0x439c5
jmp 0x35725
leaq 0xe2ac(%rip), %rsi # 0x439c8
jmp 0x35725
leaq 0xf28e(%rip), %rsi # 0x449b3
movl $0x2, %edx
movq %rbx, %rdi
callq 0x95a0
leaq 0xd4f9(%rip), %rsi # 0x42c32
movl $0x1, %edx
movq %rbx, %rdi
callq 0x95a0
xorl %ebp, %ebp
leaq 0xb05f(%rip), %rsi # 0x407ae
movl $0x2, %edx
movq %rbx, %rdi
callq 0x95a0
movq %rbx, %rdi
movl %r14d, %esi
callq 0x9960
cmpl $0xa, %r14d
setb %al
orb %bpl, %al
jne 0x357c1
leaq 0xf234(%rip), %rsi # 0x449ae
movl $0x4, %edx
movq %rbx, %rdi
callq 0x95a0
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl %r14d, %esi
callq 0x22f9a
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x95a0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x357c1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
leaq 0xdcb4(%rip), %rsi # 0x4347c
movl $0x1, %edx
movq %rbx, %rdi
callq 0x95a0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ebp
leaq 0xf1cd(%rip), %rsi # 0x449bf
movl $0x2, %edx
movq %rbx, %rdi
callq 0x95a0
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rbx,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
orl $0x4000, 0x18(%rbx,%rax) # imm = 0x4000
movq %rbx, %rdi
movl %r14d, %esi
callq 0x9960
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl %ebp, 0x18(%rbx,%rax)
leaq 0xd3f5(%rip), %rsi # 0x42c32
movl $0x1, %edx
movq %rbx, %rdi
callq 0x95a0
movb $0x1, %bpl
testl %r14d, %r14d
jne 0x35748
jmp 0x357d5
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x35879
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
movq %rbx, %rdi
callq 0x99a0
nop
| _ZN7testing8internal18PrintCharAndCodeToIwEEvT_PSo:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
mov rbx, rsi
mov r14d, edi
lea rsi, aNull_0+3; "L"
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aUnknownTypePar+25h; "'"
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
cmp r14d, 0Dh; switch 14 cases
ja short def_3567A; jumptable 000000000003567A default case
mov eax, r14d
lea rcx, jpt_3567A
movsxd rax, ds:(jpt_3567A - 42210h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_3567C:
lea rsi, a0; jumptable 000000000003567A case 0
mov edx, 2
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aUnknownTypePar+25h; "'"
mov edx, 1
mov rdi, rbx
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
def_3567A:
cmp r14d, 27h ; '''; jumptable 000000000003567A default case
jz short loc_3571E
cmp r14d, 5Ch ; '\'
jnz short loc_356C3; jumptable 000000000003567A cases 1-6
lea rsi, asc_449B6; "\\\\"
jmp short loc_35725
loc_356C3:
lea eax, [r14-20h]; jumptable 000000000003567A cases 1-6
cmp eax, 5Eh ; '^'
ja loc_357E0
lea rsi, [rsp+48h+var_40]
mov [rsi], r14b
mov edx, 1
jmp short loc_3572A
loc_356DF:
lea rsi, aV; jumptable 000000000003567A case 11
jmp short loc_35725
loc_356E8:
lea rsi, asc_439CE; jumptable 000000000003567A case 12
jmp short loc_35725
loc_356F1:
lea rsi, aR; jumptable 000000000003567A case 13
jmp short loc_35725
loc_356FA:
lea rsi, aA_0; jumptable 000000000003567A case 7
jmp short loc_35725
loc_35703:
lea rsi, aN; jumptable 000000000003567A case 10
jmp short loc_35725
loc_3570C:
lea rsi, aB; jumptable 000000000003567A case 8
jmp short loc_35725
loc_35715:
lea rsi, aT; jumptable 000000000003567A case 9
jmp short loc_35725
loc_3571E:
lea rsi, asc_449B3; "\\'"
loc_35725:
mov edx, 2
loc_3572A:
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aUnknownTypePar+25h; "'"
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
xor ebp, ebp
loc_35748:
lea rsi, aExpected+9; " ("
mov edx, 2
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rbx
mov esi, r14d
call __ZNSolsEi; std::ostream::operator<<(int)
cmp r14d, 0Ah
setb al
or al, bpl
jnz short loc_357C1
lea rsi, a0x; ", 0x"
mov edx, 4
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea r15, [rsp+48h+var_40]
mov rdi, r15
mov esi, r14d
call _ZN7testing8internal6String15FormatHexUInt32B5cxx11Ej; testing::internal::String::FormatHexUInt32(uint)
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_357C1
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_357C1:
lea rsi, aTeardowntestsu+12h; ")"
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_357D5:
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_357E0:
mov rax, [rbx]
mov rax, [rax-18h]
mov ebp, [rbx+rax+18h]
lea rsi, asc_449BF; "\\x"
mov edx, 2
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rcx, [rax-18h]
mov edx, [rbx+rcx+18h]
and edx, 0FFFFFFB5h
or edx, 8
mov [rbx+rcx+18h], edx
mov rax, [rax-18h]
or dword ptr [rbx+rax+18h], 4000h
mov rdi, rbx
mov esi, r14d
call __ZNSolsEi; std::ostream::operator<<(int)
mov rax, [rbx]
mov rax, [rax-18h]
mov [rbx+rax+18h], ebp
lea rsi, aUnknownTypePar+25h; "'"
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov bpl, 1
test r14d, r14d
jnz loc_35748
jmp loc_357D5
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_35879
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_35879:
mov rdi, rbx
call __Unwind_Resume
| long long testing::internal::PrintCharAndCodeTo<wchar_t>(unsigned int a1, long long *a2)
{
long long result; // rax
const char *v4; // rsi
long long v5; // rdx
char v6; // bp
int v7; // ebp
long long v8; // rax
void *v9[2]; // [rsp+8h] [rbp-40h] BYREF
long long v10; // [rsp+18h] [rbp-30h] BYREF
std::__ostream_insert<char,std::char_traits<char>>(a2, "L", 1LL);
std::__ostream_insert<char,std::char_traits<char>>(a2, "'", 1LL);
switch ( a1 )
{
case 0u:
std::__ostream_insert<char,std::char_traits<char>>(a2, "\\0", 2LL);
return std::__ostream_insert<char,std::char_traits<char>>(a2, "'", 1LL);
case 1u:
case 2u:
case 3u:
case 4u:
case 5u:
case 6u:
goto LABEL_6;
case 7u:
v4 = "\\a";
goto LABEL_16;
case 8u:
v4 = "\\b";
goto LABEL_16;
case 9u:
v4 = "\\t";
goto LABEL_16;
case 0xAu:
v4 = "\\n";
goto LABEL_16;
case 0xBu:
v4 = "\\v";
goto LABEL_16;
case 0xCu:
v4 = "\\f";
goto LABEL_16;
case 0xDu:
v4 = "\\r";
goto LABEL_16;
default:
if ( a1 == 39 )
{
v4 = "\\'";
goto LABEL_16;
}
if ( a1 == 92 )
{
v4 = "\\\\";
LABEL_16:
v5 = 2LL;
goto LABEL_17;
}
LABEL_6:
if ( a1 - 32 <= 0x5E )
{
v4 = (const char *)v9;
LOBYTE(v9[0]) = a1;
v5 = 1LL;
LABEL_17:
std::__ostream_insert<char,std::char_traits<char>>(a2, v4, v5);
std::__ostream_insert<char,std::char_traits<char>>(a2, "'", 1LL);
v6 = 0;
goto LABEL_18;
}
v7 = *(_DWORD *)((char *)a2 + *(_QWORD *)(*a2 - 24) + 24);
std::__ostream_insert<char,std::char_traits<char>>(a2, "\\x", 2LL);
v8 = *a2;
*(_DWORD *)((char *)a2 + *(_QWORD *)(*a2 - 24) + 24) = *(_DWORD *)((_BYTE *)a2 + *(_QWORD *)(*a2 - 24) + 24) & 0xFFFFFFB5 | 8;
*(_DWORD *)((char *)a2 + *(_QWORD *)(v8 - 24) + 24) |= 0x4000u;
std::ostream::operator<<(a2, a1);
*(_DWORD *)((char *)a2 + *(_QWORD *)(*a2 - 24) + 24) = v7;
result = std::__ostream_insert<char,std::char_traits<char>>(a2, "'", 1LL);
v6 = 1;
if ( !a1 )
return result;
LABEL_18:
std::__ostream_insert<char,std::char_traits<char>>(a2, " (", 2LL);
std::ostream::operator<<(a2, a1);
if ( !((unsigned __int8)v6 | (a1 < 0xA)) )
{
std::__ostream_insert<char,std::char_traits<char>>(a2, ", 0x", 4LL);
testing::internal::String::FormatHexUInt32[abi:cxx11]((long long)v9, a1);
std::__ostream_insert<char,std::char_traits<char>>(a2, v9[0], v9[1]);
if ( v9[0] != &v10 )
operator delete(v9[0], v10 + 1);
}
return std::__ostream_insert<char,std::char_traits<char>>(a2, ")", 1LL);
}
}
| PrintCharAndCodeTo<wchar_t>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV R14D,EDI
LEA RSI,[0x1407cf]
MOV EDX,0x1
MOV RDI,RBX
CALL 0x001095a0
LEA RSI,[0x142c32]
MOV EDX,0x1
MOV RDI,RBX
CALL 0x001095a0
CMP R14D,0xd
JA 0x001356ae
MOV EAX,R14D
LEA RCX,[0x142210]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RSI,[0x14306b]
MOV EDX,0x2
MOV RDI,RBX
CALL 0x001095a0
LEA RSI,[0x142c32]
MOV EDX,0x1
MOV RDI,RBX
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001095a0
default:
CMP R14D,0x27
JZ 0x0013571e
CMP R14D,0x5c
JNZ 0x001356c3
LEA RSI,[0x1449b6]
JMP 0x00135725
caseD_1:
LEA EAX,[R14 + -0x20]
CMP EAX,0x5e
JA 0x001357e0
LEA RSI,[RSP + 0x8]
MOV byte ptr [RSI],R14B
MOV EDX,0x1
JMP 0x0013572a
caseD_b:
LEA RSI,[0x1449bc]
JMP 0x00135725
caseD_c:
LEA RSI,[0x1439ce]
JMP 0x00135725
caseD_d:
LEA RSI,[0x1439d1]
JMP 0x00135725
caseD_7:
LEA RSI,[0x1449b9]
JMP 0x00135725
caseD_a:
LEA RSI,[0x1439cb]
JMP 0x00135725
caseD_8:
LEA RSI,[0x1439c5]
JMP 0x00135725
caseD_9:
LEA RSI,[0x1439c8]
JMP 0x00135725
LAB_0013571e:
LEA RSI,[0x1449b3]
LAB_00135725:
MOV EDX,0x2
LAB_0013572a:
MOV RDI,RBX
CALL 0x001095a0
LEA RSI,[0x142c32]
MOV EDX,0x1
MOV RDI,RBX
CALL 0x001095a0
XOR EBP,EBP
LAB_00135748:
LEA RSI,[0x1407ae]
MOV EDX,0x2
MOV RDI,RBX
CALL 0x001095a0
MOV RDI,RBX
MOV ESI,R14D
CALL 0x00109960
CMP R14D,0xa
SETC AL
OR AL,BPL
JNZ 0x001357c1
LEA RSI,[0x1449ae]
MOV EDX,0x4
MOV RDI,RBX
CALL 0x001095a0
LEA R15,[RSP + 0x8]
MOV RDI,R15
MOV ESI,R14D
CALL 0x00122f9a
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LAB_0013579e:
MOV RDI,RBX
CALL 0x001095a0
LAB_001357a6:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001357c1
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001094c0
LAB_001357c1:
LEA RSI,[0x14347c]
MOV EDX,0x1
MOV RDI,RBX
CALL 0x001095a0
LAB_001357d5:
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001357e0:
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
MOV EBP,dword ptr [RBX + RAX*0x1 + 0x18]
LEA RSI,[0x1449bf]
MOV EDX,0x2
MOV RDI,RBX
CALL 0x001095a0
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX + -0x18]
MOV EDX,dword ptr [RBX + RCX*0x1 + 0x18]
AND EDX,0xffffffb5
OR EDX,0x8
MOV dword ptr [RBX + RCX*0x1 + 0x18],EDX
MOV RAX,qword ptr [RAX + -0x18]
OR dword ptr [RBX + RAX*0x1 + 0x18],0x4000
MOV RDI,RBX
MOV ESI,R14D
CALL 0x00109960
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
MOV dword ptr [RBX + RAX*0x1 + 0x18],EBP
LEA RSI,[0x142c32]
MOV EDX,0x1
MOV RDI,RBX
CALL 0x001095a0
MOV BPL,0x1
TEST R14D,R14D
JNZ 0x00135748
JMP 0x001357d5
|
/* void testing::internal::PrintCharAndCodeTo<wchar_t>(wchar_t, std::ostream*) */
void testing::internal::PrintCharAndCodeTo<wchar_t>(wchar_t param_1,ostream *param_2)
{
int4 uVar1;
long lVar2;
bool bVar3;
long lVar4;
char *pcVar5;
char local_40;
int7 uStack_3f;
long local_38;
long local_30 [2];
std::__ostream_insert<char,std::char_traits<char>>(param_2,"L",1);
std::__ostream_insert<char,std::char_traits<char>>(param_2,"\'",1);
switch(param_1) {
case L'\0':
std::__ostream_insert<char,std::char_traits<char>>(param_2,"\\0",2);
std::__ostream_insert<char,std::char_traits<char>>(param_2,"\'",1);
return;
case L'\x01':
case L'\x02':
case L'\x03':
case L'\x04':
case L'\x05':
case L'\x06':
switchD_0013567a_caseD_1:
if (0x5e < (uint)(param_1 + L'\xffffffe0')) {
uVar1 = *(int4 *)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0x18);
std::__ostream_insert<char,std::char_traits<char>>(param_2,"\\x",2);
lVar4 = *(long *)param_2;
lVar2 = *(long *)(lVar4 + -0x18);
*(uint *)(param_2 + lVar2 + 0x18) = *(uint *)(param_2 + lVar2 + 0x18) & 0xffffffb5 | 8;
*(uint *)(param_2 + *(long *)(lVar4 + -0x18) + 0x18) =
*(uint *)(param_2 + *(long *)(lVar4 + -0x18) + 0x18) | 0x4000;
std::ostream::operator<<(param_2,param_1);
*(int4 *)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0x18) = uVar1;
std::__ostream_insert<char,std::char_traits<char>>(param_2,"\'",1);
bVar3 = true;
if (param_1 == L'\0') {
return;
}
goto LAB_00135748;
}
pcVar5 = &local_40;
local_40 = (char)param_1;
lVar4 = 1;
goto LAB_0013572a;
case L'\a':
pcVar5 = "\\a";
break;
case L'\b':
pcVar5 = "\\b";
break;
case L'\t':
pcVar5 = "\\t";
break;
case L'\n':
pcVar5 = "\\n";
break;
case L'\v':
pcVar5 = "\\v";
break;
case L'\f':
pcVar5 = "\\f";
break;
case L'\r':
pcVar5 = "\\r";
break;
default:
if (param_1 == L'\'') {
pcVar5 = "\\\'";
}
else {
if (param_1 != L'\\') goto switchD_0013567a_caseD_1;
pcVar5 = "\\\\";
}
}
lVar4 = 2;
LAB_0013572a:
std::__ostream_insert<char,std::char_traits<char>>(param_2,pcVar5,lVar4);
std::__ostream_insert<char,std::char_traits<char>>(param_2,"\'",1);
bVar3 = false;
LAB_00135748:
std::__ostream_insert<char,std::char_traits<char>>(param_2," (",2);
std::ostream::operator<<(param_2,param_1);
if (9 < (uint)param_1 && !bVar3) {
std::__ostream_insert<char,std::char_traits<char>>(param_2,", 0x",4);
String::FormatHexUInt32_abi_cxx11_((uint)&local_40);
/* try { // try from 0013579e to 001357a5 has its CatchHandler @ 0013585b */
std::__ostream_insert<char,std::char_traits<char>>
(param_2,(char *)CONCAT71(uStack_3f,local_40),local_38);
if ((long *)CONCAT71(uStack_3f,local_40) != local_30) {
operator_delete((long *)CONCAT71(uStack_3f,local_40),local_30[0] + 1);
}
}
std::__ostream_insert<char,std::char_traits<char>>(param_2,")",1);
return;
}
| |
33,879 | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)) | monkey531[P]llama/common/arg.h | common_arg(
const std::initializer_list<const char *> & args,
const char * value_hint,
const std::string & help,
void (*handler)(common_params & params, const std::string &)
) : args(args), value_hint(value_hint), help(help), handler_string(handler) {} | O2 | c | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
andl $0x0, (%rsi)
pushq $0x1
popq %rdx
leaq 0x3(%rsp), %rcx
leaq 0x2(%rsp), %r8
callq 0x64678
leaq 0x38(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
andq $0x0, 0x40(%rbx)
movq %rax, 0x48(%rbx)
movq %rax, 0x50(%rbx)
andq $0x0, 0x58(%rbx)
leaq 0x60(%rbx), %r13
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
leaq 0x1(%rsp), %rcx
movq %r13, %rdi
callq 0x646be
movq %r12, 0x78(%rbx)
leaq 0x90(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rbx)
movq %r15, %rsi
callq 0x27120
movb $0x0, 0xb0(%rbx)
andq $0x0, 0xb8(%rbx)
movq %r14, 0xc0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xc8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r13, %rdi
callq 0x649fa
jmp 0x61716
movq %rax, %r14
leaq 0x30(%rbx), %rdi
callq 0x64742
movq %rbx, %rdi
callq 0x64742
movq %r14, %rdi
callq 0x27660
| _ZN10common_argC2ERKSt16initializer_listIPKcES2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rcx
mov r12, rdx
mov rbp, rsi
mov rbx, rdi
lea rsi, [rsp+38h+var_34]
and dword ptr [rsi], 0
push 1
pop rdx
lea rcx, [rsp+38h+var_35]
lea r8, [rsp+38h+var_36]
call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&)
lea rax, [rbx+38h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+30h], xmm0
and qword ptr [rbx+40h], 0
mov [rbx+48h], rax
mov [rbx+50h], rax
and qword ptr [rbx+58h], 0
lea r13, [rbx+60h]
mov rsi, [rbp+0]
mov rdx, [rbp+8]
lea rcx, [rsp+38h+var_37]
mov rdi, r13
call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&)
mov [rbx+78h], r12
lea rdi, [rbx+90h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+80h], xmm0
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov byte ptr [rbx+0B0h], 0
and qword ptr [rbx+0B8h], 0
mov [rbx+0C0h], r14
xorps xmm0, xmm0
movups xmmword ptr [rbx+0C8h], xmm0
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, r13
call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base()
jmp short loc_61716
mov r14, rax
loc_61716:
lea rdi, [rbx+30h]
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, rbx
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
| long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5)
{
int v5; // eax
long long result; // rax
int v10; // [rsp+0h] [rbp-38h] BYREF
_DWORD v11[13]; // [rsp+4h] [rbp-34h] BYREF
v10 = v5;
v11[0] = 0;
std::set<llama_example>::set(a1, v11, 1LL, (char *)&v10 + 3, (char *)&v10 + 2);
*(_OWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 64) = 0LL;
*(_QWORD *)(a1 + 72) = a1 + 56;
*(_QWORD *)(a1 + 80) = a1 + 56;
*(_QWORD *)(a1 + 88) = 0LL;
std::vector<char const*>::vector(a1 + 96, *a2, a2[1], (char *)&v10 + 1);
*(_QWORD *)(a1 + 120) = a3;
*(_OWORD *)(a1 + 128) = 0LL;
result = std::string::basic_string(a1 + 144, a4);
*(_BYTE *)(a1 + 176) = 0;
*(_QWORD *)(a1 + 184) = 0LL;
*(_QWORD *)(a1 + 192) = a5;
*(_OWORD *)(a1 + 200) = 0LL;
return result;
}
| common_arg:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV RBP,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x4]
AND dword ptr [RSI],0x0
PUSH 0x1
POP RDX
LEA RCX,[RSP + 0x3]
LEA R8,[RSP + 0x2]
CALL 0x00164678
LEA RAX,[RBX + 0x38]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
AND qword ptr [RBX + 0x40],0x0
MOV qword ptr [RBX + 0x48],RAX
MOV qword ptr [RBX + 0x50],RAX
AND qword ptr [RBX + 0x58],0x0
LEA R13,[RBX + 0x60]
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
LAB_001616ad:
LEA RCX,[RSP + 0x1]
MOV RDI,R13
CALL 0x001646be
MOV qword ptr [RBX + 0x78],R12
LEA RDI,[RBX + 0x90]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x80],XMM0
LAB_001616cf:
MOV RSI,R15
CALL 0x00127120
LAB_001616d7:
MOV byte ptr [RBX + 0xb0],0x0
AND qword ptr [RBX + 0xb8],0x0
MOV qword ptr [RBX + 0xc0],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0xc8],XMM0
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*,
std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&)) */
void __thiscall
common_arg::common_arg
(common_arg *this,initializer_list *param_1,char *param_2,string *param_3,
_func_void_common_params_ptr_string_ptr *param_4)
{
int4 in_EAX;
int8 in_R9;
std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set
(this,&stack0xffffffffffffffcc,1,&stack0xffffffffffffffcb,&stack0xffffffffffffffca,in_R9
,in_EAX);
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(common_arg **)(this + 0x48) = this + 0x38;
*(common_arg **)(this + 0x50) = this + 0x38;
*(int8 *)(this + 0x58) = 0;
/* try { // try from 001616ad to 001616b9 has its CatchHandler @ 00161713 */
std::vector<char_const*,std::allocator<char_const*>>::vector
((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1
,*(int8 *)(param_1 + 8),&stack0xffffffffffffffc9);
*(char **)(this + 0x78) = param_2;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
/* try { // try from 001616cf to 001616d6 has its CatchHandler @ 00161706 */
std::__cxx11::string::string((string *)(this + 0x90),param_3);
this[0xb0] = (common_arg)0x0;
*(int8 *)(this + 0xb8) = 0;
*(_func_void_common_params_ptr_string_ptr **)(this + 0xc0) = param_4;
*(int8 *)(this + 200) = 0;
*(int8 *)(this + 0xd0) = 0;
return;
}
| |
33,880 | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)) | monkey531[P]llama/common/arg.h | common_arg(
const std::initializer_list<const char *> & args,
const char * value_hint,
const std::string & help,
void (*handler)(common_params & params, const std::string &)
) : args(args), value_hint(value_hint), help(help), handler_string(handler) {} | O3 | c | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x3(%rsp), %rcx
leaq 0x2(%rsp), %r8
movl $0x1, %edx
callq 0x8876e
leaq 0x38(%rbx), %rax
xorl %ecx, %ecx
movq %rcx, 0x40(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movq %rax, 0x48(%rbx)
movq %rax, 0x50(%rbx)
movq %rcx, 0x58(%rbx)
leaq 0x60(%rbx), %r13
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
leaq 0x1(%rsp), %rcx
movq %r13, %rdi
callq 0x887f0
movq %r12, 0x78(%rbx)
leaq 0x90(%rbx), %rdi
leaq 0xa0(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rbx)
movq %rax, 0x90(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
callq 0x26600
movb $0x0, 0xb0(%rbx)
movq $0x0, 0xb8(%rbx)
movq %r14, 0xc0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xc8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r13), %rdi
testq %rdi, %rdi
je 0x85626
movq 0x70(%rbx), %rsi
subq %rdi, %rsi
callq 0x1dc50
jmp 0x85626
movq %rax, %r14
leaq 0x30(%rbx), %rdi
callq 0x88836
movq %rbx, %rdi
callq 0x88836
movq %r14, %rdi
callq 0x1e660
nop
| _ZN10common_argC2ERKSt16initializer_listIPKcES2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rcx
mov r12, rdx
mov rbp, rsi
mov rbx, rdi
lea rsi, [rsp+38h+var_34]
mov dword ptr [rsi], 0
lea rcx, [rsp+38h+var_35]
lea r8, [rsp+38h+var_36]
mov edx, 1
call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&)
lea rax, [rbx+38h]
xor ecx, ecx
mov [rbx+40h], rcx
xorps xmm0, xmm0
movups xmmword ptr [rbx+30h], xmm0
mov [rbx+48h], rax
mov [rbx+50h], rax
mov [rbx+58h], rcx
lea r13, [rbx+60h]
mov rsi, [rbp+0]
mov rdx, [rbp+8]
lea rcx, [rsp+38h+var_37]
mov rdi, r13
call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&)
mov [rbx+78h], r12
lea rdi, [rbx+90h]
lea rax, [rbx+0A0h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+80h], xmm0
mov [rbx+90h], rax
mov rsi, [r15]
mov rdx, [r15+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov byte ptr [rbx+0B0h], 0
mov qword ptr [rbx+0B8h], 0
mov [rbx+0C0h], r14
xorps xmm0, xmm0
movups xmmword ptr [rbx+0C8h], xmm0
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [r13+0]; void *
test rdi, rdi
jz short loc_85626
mov rsi, [rbx+70h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_85626
mov r14, rax
loc_85626:
lea rdi, [rbx+30h]
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, rbx
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
| long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5)
{
int v5; // eax
long long result; // rax
int v10; // [rsp+0h] [rbp-38h] BYREF
_DWORD v11[13]; // [rsp+4h] [rbp-34h] BYREF
v10 = v5;
v11[0] = 0;
std::set<llama_example>::set(a1, v11, 1LL, (char *)&v10 + 3, (char *)&v10 + 2);
*(_QWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 72) = a1 + 56;
*(_QWORD *)(a1 + 80) = a1 + 56;
*(_QWORD *)(a1 + 88) = 0LL;
std::vector<char const*>::vector(a1 + 96, *a2, a2[1], (char *)&v10 + 1);
*(_QWORD *)(a1 + 120) = a3;
*(_OWORD *)(a1 + 128) = 0LL;
*(_QWORD *)(a1 + 144) = a1 + 160;
result = std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a4, *(_QWORD *)a4 + *(_QWORD *)(a4 + 8));
*(_BYTE *)(a1 + 176) = 0;
*(_QWORD *)(a1 + 184) = 0LL;
*(_QWORD *)(a1 + 192) = a5;
*(_OWORD *)(a1 + 200) = 0LL;
return result;
}
| common_arg:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV RBP,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x4]
MOV dword ptr [RSI],0x0
LEA RCX,[RSP + 0x3]
LEA R8,[RSP + 0x2]
MOV EDX,0x1
CALL 0x0018876e
LEA RAX,[RBX + 0x38]
XOR ECX,ECX
MOV qword ptr [RBX + 0x40],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV qword ptr [RBX + 0x48],RAX
MOV qword ptr [RBX + 0x50],RAX
MOV qword ptr [RBX + 0x58],RCX
LEA R13,[RBX + 0x60]
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
LAB_00185598:
LEA RCX,[RSP + 0x1]
MOV RDI,R13
CALL 0x001887f0
MOV qword ptr [RBX + 0x78],R12
LEA RDI,[RBX + 0x90]
LEA RAX,[RBX + 0xa0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x80],XMM0
MOV qword ptr [RBX + 0x90],RAX
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LAB_001855d2:
CALL 0x00126600
LAB_001855d7:
MOV byte ptr [RBX + 0xb0],0x0
MOV qword ptr [RBX + 0xb8],0x0
MOV qword ptr [RBX + 0xc0],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0xc8],XMM0
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*,
std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&)) */
void __thiscall
common_arg::common_arg
(common_arg *this,initializer_list *param_1,char *param_2,string *param_3,
_func_void_common_params_ptr_string_ptr *param_4)
{
int4 in_EAX;
int8 in_R9;
std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set
(this,&stack0xffffffffffffffcc,1,&stack0xffffffffffffffcb,&stack0xffffffffffffffca,in_R9
,in_EAX);
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(common_arg **)(this + 0x48) = this + 0x38;
*(common_arg **)(this + 0x50) = this + 0x38;
*(int8 *)(this + 0x58) = 0;
/* try { // try from 00185598 to 001855a4 has its CatchHandler @ 00185623 */
std::vector<char_const*,std::allocator<char_const*>>::vector
((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1
,*(int8 *)(param_1 + 8),&stack0xffffffffffffffc9);
*(char **)(this + 0x78) = param_2;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
*(common_arg **)(this + 0x90) = this + 0xa0;
/* try { // try from 001855d2 to 001855d6 has its CatchHandler @ 00185609 */
std::__cxx11::string::_M_construct<char*>
(this + 0x90,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3);
this[0xb0] = (common_arg)0x0;
*(int8 *)(this + 0xb8) = 0;
*(_func_void_common_params_ptr_string_ptr **)(this + 0xc0) = param_4;
*(int8 *)(this + 200) = 0;
*(int8 *)(this + 0xd0) = 0;
return;
}
| |
33,881 | dbuf_put_leb128 | bluesky950520[P]quickjs/quickjs.c | static void dbuf_put_leb128(DynBuf *s, uint32_t v)
{
uint32_t a;
for(;;) {
a = v & 0x7f;
v >>= 7;
if (v != 0) {
dbuf_putc(s, a | 0x80);
} else {
dbuf_putc(s, a);
break;
}
}
} | O0 | c | dbuf_put_leb128:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl 0xc(%rsp), %eax
andl $0x7f, %eax
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %eax
shrl $0x7, %eax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0x7f722
movq 0x10(%rsp), %rdi
movl 0x8(%rsp), %eax
orl $0x80, %eax
movzbl %al, %esi
callq 0x249c0
jmp 0x7f735
movq 0x10(%rsp), %rdi
movl 0x8(%rsp), %eax
movzbl %al, %esi
callq 0x249c0
jmp 0x7f737
jmp 0x7f6ed
addq $0x18, %rsp
retq
nopl (%rax)
| dbuf_put_leb128:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_C], esi
loc_7F6ED:
mov eax, [rsp+18h+var_C]
and eax, 7Fh
mov [rsp+18h+var_10], eax
mov eax, [rsp+18h+var_C]
shr eax, 7
mov [rsp+18h+var_C], eax
cmp [rsp+18h+var_C], 0
jz short loc_7F722
mov rdi, [rsp+18h+var_8]
mov eax, [rsp+18h+var_10]
or eax, 80h
movzx esi, al
call dbuf_putc
jmp short loc_7F735
loc_7F722:
mov rdi, [rsp+18h+var_8]
mov eax, [rsp+18h+var_10]
movzx esi, al
call dbuf_putc
jmp short loc_7F737
loc_7F735:
jmp short loc_7F6ED
loc_7F737:
add rsp, 18h
retn
| long long dbuf_put_leb128(_QWORD *a1, unsigned int a2)
{
char v3; // [rsp+8h] [rbp-10h]
while ( 1 )
{
v3 = a2 & 0x7F;
a2 >>= 7;
if ( !a2 )
break;
dbuf_putc(a1, v3 | 0x80);
}
return dbuf_putc(a1, v3);
}
| dbuf_put_leb128:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV dword ptr [RSP + 0xc],ESI
LAB_0017f6ed:
MOV EAX,dword ptr [RSP + 0xc]
AND EAX,0x7f
MOV dword ptr [RSP + 0x8],EAX
MOV EAX,dword ptr [RSP + 0xc]
SHR EAX,0x7
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x0
JZ 0x0017f722
MOV RDI,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSP + 0x8]
OR EAX,0x80
MOVZX ESI,AL
CALL 0x001249c0
JMP 0x0017f735
LAB_0017f722:
MOV RDI,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSP + 0x8]
MOVZX ESI,AL
CALL 0x001249c0
JMP 0x0017f737
LAB_0017f735:
JMP 0x0017f6ed
LAB_0017f737:
ADD RSP,0x18
RET
|
void dbuf_put_leb128(int8 param_1,uint param_2)
{
uint uVar1;
int4 local_c;
local_c = param_2;
while( true ) {
uVar1 = local_c & 0x7f;
local_c = local_c >> 7;
if (local_c == 0) break;
dbuf_putc(param_1,uVar1 | 0x80);
}
dbuf_putc(param_1,uVar1);
return;
}
| |
33,882 | js_dump_obj | bluesky950520[P]quickjs/quickjs-libc.c | static void js_dump_obj(JSContext *ctx, FILE *f, JSValue val)
{
const char *str;
str = JS_ToCString(ctx, val);
if (str) {
fprintf(f, "%s\n", str);
JS_FreeCString(ctx, str);
} else {
fprintf(f, "[exception]\n");
}
} | O1 | c | js_dump_obj:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x24c53
testq %rax, %rax
je 0x19557
movq %rax, %r15
leaq 0x8975e(%rip), %rsi # 0xa2c98
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe5b0
movq %r14, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x24f39
leaq 0x86e5e(%rip), %rdi # 0xa03bc
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0xe950
| js_dump_obj:
push r15
push r14
push rbx
mov rbx, rsi
mov r14, rdi
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_19557
mov r15, rax
lea rsi, a3u2uS+0Eh; "%s\n"
mov rdi, rbx
mov rdx, rax
xor eax, eax
call _fprintf
mov rdi, r14
mov rsi, r15
pop rbx
pop r14
pop r15
jmp JS_FreeCString
loc_19557:
lea rdi, aException; "[exception]\n"
mov esi, 0Ch
mov edx, 1
mov rcx, rbx
pop rbx
pop r14
pop r15
jmp _fwrite
| long long js_dump_obj(long long a1, long long a2, long long a3, long long a4)
{
const char *v4; // rax
const char *v5; // r15
v4 = (const char *)JS_ToCStringLen2(a1, 0LL, a3, a4, 0LL);
if ( !v4 )
return fwrite("[exception]\n", 12LL, 1LL, a2);
v5 = v4;
fprintf(a2, "%s\n", v4);
return JS_FreeCString(a1, v5);
}
| js_dump_obj:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
XOR ESI,ESI
XOR R8D,R8D
CALL 0x00124c53
TEST RAX,RAX
JZ 0x00119557
MOV R15,RAX
LEA RSI,[0x1a2c98]
MOV RDI,RBX
MOV RDX,RAX
XOR EAX,EAX
CALL 0x0010e5b0
MOV RDI,R14
MOV RSI,R15
POP RBX
POP R14
POP R15
JMP 0x00124f39
LAB_00119557:
LEA RDI,[0x1a03bc]
MOV ESI,0xc
MOV EDX,0x1
MOV RCX,RBX
POP RBX
POP R14
POP R15
JMP 0x0010e950
|
void js_dump_obj(int8 param_1,FILE *param_2,int8 param_3,int8 param_4)
{
long lVar1;
lVar1 = JS_ToCStringLen2(param_1,0,param_3,param_4,0);
if (lVar1 != 0) {
fprintf(param_2,"%s\n",lVar1);
JS_FreeCString(param_1,lVar1);
return;
}
fwrite("[exception]\n",0xc,1,param_2);
return;
}
| |
33,883 | my_once_free | eloqsql/mysys/my_once.c | void my_once_free(void)
{
reg1 USED_MEM *next,*old;
DBUG_ENTER("my_once_free");
for (next=my_once_root_block ; next ; )
{
old=next; next= next->next ;
free((uchar*) old);
}
my_once_root_block=0;
DBUG_VOID_RETURN;
} | O3 | c | my_once_free:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0xb68786(%rip), %rbx # 0xc08690
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x9ff22
movq (%rdi), %r14
callq 0x29160
movq %r14, %rdi
testq %r14, %r14
jne 0x9ff12
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
| my_once_free:
push rbp
mov rbp, rsp
push r14
push rbx
lea rbx, my_once_root_block
mov rdi, [rbx]
test rdi, rdi
jz short loc_9FF22
loc_9FF12:
mov r14, [rdi]
call _free
mov rdi, r14
test r14, r14
jnz short loc_9FF12
loc_9FF22:
mov qword ptr [rbx], 0
pop rbx
pop r14
pop rbp
retn
| long long my_once_free()
{
_QWORD *v0; // rdi
_QWORD *v1; // r14
long long result; // rax
v0 = (_QWORD *)my_once_root_block;
if ( my_once_root_block )
{
do
{
v1 = (_QWORD *)*v0;
result = free(v0);
v0 = v1;
}
while ( v1 );
}
my_once_root_block = 0LL;
return result;
}
| my_once_free:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA RBX,[0xd08690]
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x0019ff22
LAB_0019ff12:
MOV R14,qword ptr [RDI]
CALL 0x00129160
MOV RDI,R14
TEST R14,R14
JNZ 0x0019ff12
LAB_0019ff22:
MOV qword ptr [RBX],0x0
POP RBX
POP R14
POP RBP
RET
|
void my_once_free(void)
{
long *plVar1;
long *__ptr;
__ptr = my_once_root_block;
if (my_once_root_block != (long *)0x0) {
do {
plVar1 = (long *)*__ptr;
free(__ptr);
__ptr = plVar1;
} while (plVar1 != (long *)0x0);
}
my_once_root_block = (long *)0x0;
return;
}
| |
33,884 | list_free | eloqsql/mysys/list.c | void list_free(LIST *root, uint free_data)
{
LIST *next;
while (root)
{
next=root->next;
if (free_data)
my_free(root->data);
my_free(root);
root=next;
}
} | O0 | c | list_free:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xe1338
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xe1325
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xf9d70
movq -0x8(%rbp), %rdi
callq 0xf9d70
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe12ff
addq $0x20, %rsp
popq %rbp
retq
nop
| list_free:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
loc_E12FF:
cmp [rbp+var_8], 0
jz short loc_E1338
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_18], rax
cmp [rbp+var_C], 0
jz short loc_E1325
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
call my_free
loc_E1325:
mov rdi, [rbp+var_8]
call my_free
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_E12FF
loc_E1338:
add rsp, 20h
pop rbp
retn
| long long list_free(long long a1, int a2)
{
long long result; // rax
long long v3; // [rsp+8h] [rbp-18h]
while ( a1 )
{
v3 = *(_QWORD *)(a1 + 8);
if ( a2 )
my_free(*(_QWORD *)(a1 + 16));
my_free(a1);
result = v3;
a1 = v3;
}
return result;
}
| list_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
LAB_001e12ff:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001e1338
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x001e1325
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x001f9d70
LAB_001e1325:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001f9d70
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001e12ff
LAB_001e1338:
ADD RSP,0x20
POP RBP
RET
|
void list_free(long param_1,int param_2)
{
long lVar1;
int8 local_10;
local_10 = param_1;
while (local_10 != 0) {
lVar1 = *(long *)(local_10 + 8);
if (param_2 != 0) {
my_free(*(int8 *)(local_10 + 0x10));
}
my_free(local_10);
local_10 = lVar1;
}
return;
}
| |
33,885 | js_string_slice | bluesky950520[P]quickjs/quickjs.c | static JSValue js_string_slice(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str, ret;
int len, start, end;
JSString *p;
str = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(str))
return str;
p = JS_VALUE_GET_STRING(str);
len = p->len;
if (JS_ToInt32Clamp(ctx, &start, argv[0], 0, len, len)) {
JS_FreeValue(ctx, str);
return JS_EXCEPTION;
}
end = len;
if (!JS_IsUndefined(argv[1])) {
if (JS_ToInt32Clamp(ctx, &end, argv[1], 0, len, len)) {
JS_FreeValue(ctx, str);
return JS_EXCEPTION;
}
}
ret = js_sub_string(ctx, p, start, max_int(end, start));
JS_FreeValue(ctx, str);
return ret;
} | O1 | c | js_string_slice:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %rbp
movq %rdi, %r14
callq 0x425ff
movq %rdx, %rbx
movq %rax, 0x18(%rsp)
cmpl $0x6, %ebx
jne 0x7c0e3
movq %rax, %r15
jmp 0x7c189
movq 0x18(%rsp), %r13
movl $0x7fffffff, %r12d # imm = 0x7FFFFFFF
andl 0x4(%r13), %r12d
movq (%rbp), %rdx
movq 0x8(%rbp), %rcx
movl %r12d, (%rsp)
leaq 0x14(%rsp), %rsi
xorl %r15d, %r15d
movq %r14, %rdi
xorl %r8d, %r8d
movl %r12d, %r9d
callq 0x27756
testl %eax, %eax
je 0x7c120
movl $0x6, %r12d
jmp 0x7c175
movq %r13, 0x20(%rsp)
movl %r12d, 0x10(%rsp)
movq 0x18(%rbp), %rcx
cmpl $0x3, %ecx
je 0x7c155
movq 0x10(%rbp), %rdx
movl %r12d, (%rsp)
leaq 0x10(%rsp), %rsi
xorl %r15d, %r15d
movq %r14, %rdi
xorl %r8d, %r8d
movl %r12d, %r9d
callq 0x27756
testl %eax, %eax
jne 0x7c118
movl 0x14(%rsp), %edx
movl 0x10(%rsp), %ecx
cmpl %edx, %ecx
cmovlel %edx, %ecx
movq %r14, %rdi
movq 0x20(%rsp), %rsi
callq 0x347cf
movq %rax, %r15
movq %rdx, %r12
movq 0x18(%rsp), %rsi
movq 0x18(%r14), %rdi
movq %rbx, %rdx
callq 0x1d8c6
movq %r12, %rbx
movq %r15, %rax
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_string_slice:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbp, r8
mov r14, rdi
call JS_ToStringCheckObject
mov rbx, rdx
mov [rsp+58h+var_40], rax
cmp ebx, 6
jnz short loc_7C0E3
mov r15, rax
jmp loc_7C189
loc_7C0E3:
mov r13, [rsp+58h+var_40]
mov r12d, 7FFFFFFFh
and r12d, [r13+4]
mov rdx, [rbp+0]
mov rcx, [rbp+8]
mov [rsp+58h+var_58], r12d
lea rsi, [rsp+58h+var_44]
xor r15d, r15d
mov rdi, r14
xor r8d, r8d
mov r9d, r12d
call JS_ToInt32Clamp
test eax, eax
jz short loc_7C120
loc_7C118:
mov r12d, 6
jmp short loc_7C175
loc_7C120:
mov [rsp+58h+var_38], r13
mov [rsp+58h+var_48], r12d
mov rcx, [rbp+18h]
cmp ecx, 3
jz short loc_7C155
mov rdx, [rbp+10h]
mov [rsp+58h+var_58], r12d
lea rsi, [rsp+58h+var_48]
xor r15d, r15d
mov rdi, r14
xor r8d, r8d
mov r9d, r12d
call JS_ToInt32Clamp
test eax, eax
jnz short loc_7C118
loc_7C155:
mov edx, [rsp+58h+var_44]
mov ecx, [rsp+58h+var_48]
cmp ecx, edx
cmovle ecx, edx
mov rdi, r14
mov rsi, [rsp+58h+var_38]
call js_sub_string
mov r15, rax
mov r12, rdx
loc_7C175:
mov rsi, [rsp+58h+var_40]
mov rdi, [r14+18h]
mov rdx, rbx
call JS_FreeValueRT
mov rbx, r12
loc_7C189:
mov rax, r15
mov rdx, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _DWORD * js_string_slice(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
_DWORD *v15; // rax
long long v16; // rdx
long long v17; // rbx
long long v18; // r15
_DWORD *v19; // r13
int v20; // r12d
long long v21; // rcx
int v22; // ecx
int v24; // [rsp+10h] [rbp-48h] BYREF
int v25; // [rsp+14h] [rbp-44h] BYREF
_DWORD *v26; // [rsp+18h] [rbp-40h]
_DWORD *v27; // [rsp+20h] [rbp-38h]
v15 = (_DWORD *)JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v17 = v16;
v26 = v15;
if ( (_DWORD)v16 == 6 )
return v15;
v19 = v26;
v20 = v26[1] & 0x7FFFFFFF;
v18 = 0LL;
if ( !(unsigned int)JS_ToInt32Clamp(a1, &v25, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), 0, v20, v20) )
{
v27 = v19;
v24 = v20;
v21 = *(_QWORD *)(a5 + 24);
if ( (_DWORD)v21 == 3
|| (v18 = 0LL, !(unsigned int)JS_ToInt32Clamp(a1, &v24, *(_DWORD **)(a5 + 16), v21, 0, v20, v20)) )
{
v22 = v24;
if ( v24 <= v25 )
v22 = v25;
v18 = js_sub_string(a1, (long long)v27, v25, v22);
}
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v26, v17);
return (_DWORD *)v18;
}
| |||
33,886 | js_string_slice | bluesky950520[P]quickjs/quickjs.c | static JSValue js_string_slice(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str, ret;
int len, start, end;
JSString *p;
str = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(str))
return str;
p = JS_VALUE_GET_STRING(str);
len = p->len;
if (JS_ToInt32Clamp(ctx, &start, argv[0], 0, len, len)) {
JS_FreeValue(ctx, str);
return JS_EXCEPTION;
}
end = len;
if (!JS_IsUndefined(argv[1])) {
if (JS_ToInt32Clamp(ctx, &end, argv[1], 0, len, len)) {
JS_FreeValue(ctx, str);
return JS_EXCEPTION;
}
}
ret = js_sub_string(ctx, p, start, max_int(end, start));
JS_FreeValue(ctx, str);
return ret;
} | O2 | c | js_string_slice:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movq %rdi, %r15
callq 0x3a290
movq %rax, %rbx
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x684d7
movl $0x7fffffff, %ebp # imm = 0x7FFFFFFF
andl 0x4(%rbx), %ebp
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movl %ebp, (%rsp)
leaq 0x14(%rsp), %rsi
xorl %r13d, %r13d
movq %r15, %rdi
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x213d5
testl %eax, %eax
je 0x68473
pushq $0x6
popq %r12
jmp 0x684c3
movl %ebp, 0x10(%rsp)
movq 0x18(%r12), %rcx
cmpl $0x3, %ecx
je 0x684a7
movq 0x10(%r12), %rdx
movl %ebp, (%rsp)
leaq 0x10(%rsp), %rsi
xorl %r13d, %r13d
movq %r15, %rdi
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x213d5
testl %eax, %eax
jne 0x6846d
movl 0x10(%rsp), %ebp
movl 0x14(%rsp), %edx
cmpl %edx, %ebp
cmovlel %edx, %ebp
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %ecx
callq 0x2e21d
movq %rax, %r13
movq %rdx, %r12
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1801e
movq %r13, %rbx
movq %r12, %r14
movq %rbx, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_string_slice:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, r8
mov r15, rdi
call JS_ToStringCheckObject
mov rbx, rax
mov r14, rdx
cmp r14d, 6
jz loc_684D7
mov ebp, 7FFFFFFFh
and ebp, [rbx+4]
mov rdx, [r12]
mov rcx, [r12+8]
mov [rsp+48h+var_48], ebp
lea rsi, [rsp+48h+var_34]
xor r13d, r13d
mov rdi, r15
xor r8d, r8d
mov r9d, ebp
call JS_ToInt32Clamp
test eax, eax
jz short loc_68473
loc_6846D:
push 6
pop r12
jmp short loc_684C3
loc_68473:
mov [rsp+48h+var_38], ebp
mov rcx, [r12+18h]
cmp ecx, 3
jz short loc_684A7
mov rdx, [r12+10h]
mov [rsp+48h+var_48], ebp
lea rsi, [rsp+48h+var_38]
xor r13d, r13d
mov rdi, r15
xor r8d, r8d
mov r9d, ebp
call JS_ToInt32Clamp
test eax, eax
jnz short loc_6846D
mov ebp, [rsp+48h+var_38]
loc_684A7:
mov edx, [rsp+48h+var_34]
cmp ebp, edx
cmovle ebp, edx
mov rdi, r15
mov rsi, rbx
mov ecx, ebp
call js_sub_string
mov r13, rax
mov r12, rdx
loc_684C3:
mov rdi, r15
mov rsi, rbx
mov rdx, r14
call JS_FreeValue
mov rbx, r13
mov r14, r12
loc_684D7:
mov rax, rbx
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _DWORD * js_string_slice(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v15; // rax
_DWORD *v16; // rbx
long long v17; // rdx
long long v18; // r14
int v19; // ebp
long long v20; // r13
long long v21; // rcx
int v23; // [rsp+10h] [rbp-38h] BYREF
unsigned int v24[13]; // [rsp+14h] [rbp-34h] BYREF
v15 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v16 = (_DWORD *)v15;
v18 = v17;
if ( (_DWORD)v17 != 6 )
{
v19 = *(_DWORD *)(v15 + 4) & 0x7FFFFFFF;
v20 = 0LL;
if ( (unsigned int)JS_ToInt32Clamp(a1, (int *)v24, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), 0, v19, v19) )
{
LABEL_10:
JS_FreeValue(a1, (long long)v16, v18);
return (_DWORD *)v20;
}
v23 = v19;
v21 = *(_QWORD *)(a5 + 24);
if ( (_DWORD)v21 != 3 )
{
v20 = 0LL;
if ( (unsigned int)JS_ToInt32Clamp(a1, &v23, *(_DWORD **)(a5 + 16), v21, 0, v19, v19) )
goto LABEL_10;
v19 = v23;
}
if ( v19 <= (int)v24[0] )
v19 = v24[0];
v20 = js_sub_string(a1, v16, v24[0], v19);
goto LABEL_10;
}
return v16;
}
| js_string_slice:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,R8
MOV R15,RDI
CALL 0x0013a290
MOV RBX,RAX
MOV R14,RDX
CMP R14D,0x6
JZ 0x001684d7
MOV EBP,0x7fffffff
AND EBP,dword ptr [RBX + 0x4]
MOV RDX,qword ptr [R12]
MOV RCX,qword ptr [R12 + 0x8]
MOV dword ptr [RSP],EBP
LEA RSI,[RSP + 0x14]
XOR R13D,R13D
MOV RDI,R15
XOR R8D,R8D
MOV R9D,EBP
CALL 0x001213d5
TEST EAX,EAX
JZ 0x00168473
LAB_0016846d:
PUSH 0x6
POP R12
JMP 0x001684c3
LAB_00168473:
MOV dword ptr [RSP + 0x10],EBP
MOV RCX,qword ptr [R12 + 0x18]
CMP ECX,0x3
JZ 0x001684a7
MOV RDX,qword ptr [R12 + 0x10]
MOV dword ptr [RSP],EBP
LEA RSI,[RSP + 0x10]
XOR R13D,R13D
MOV RDI,R15
XOR R8D,R8D
MOV R9D,EBP
CALL 0x001213d5
TEST EAX,EAX
JNZ 0x0016846d
MOV EBP,dword ptr [RSP + 0x10]
LAB_001684a7:
MOV EDX,dword ptr [RSP + 0x14]
CMP EBP,EDX
CMOVLE EBP,EDX
MOV RDI,R15
MOV RSI,RBX
MOV ECX,EBP
CALL 0x0012e21d
MOV R13,RAX
MOV R12,RDX
LAB_001684c3:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
CALL 0x0011801e
MOV RBX,R13
MOV R14,R12
LAB_001684d7:
MOV RAX,RBX
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_string_slice(int8 param_1)
{
int iVar1;
long lVar2;
int8 uVar3;
uint uVar4;
int8 *in_R8;
int1 auVar5 [16];
uint local_38;
uint local_34;
auVar5 = JS_ToStringCheckObject();
uVar3 = auVar5._8_8_;
lVar2 = auVar5._0_8_;
if (auVar5._8_4_ != 6) {
uVar4 = *(uint *)(lVar2 + 4) & 0x7fffffff;
iVar1 = JS_ToInt32Clamp(param_1,&local_34,*in_R8,in_R8[1],0,uVar4,uVar4);
if ((iVar1 == 0) &&
((local_38 = uVar4, (int)in_R8[3] == 3 ||
(iVar1 = JS_ToInt32Clamp(param_1,&local_38,in_R8[2],in_R8[3],0,uVar4,uVar4), iVar1 == 0))))
{
uVar4 = local_38;
if ((int)local_38 <= (int)local_34) {
uVar4 = local_34;
}
auVar5 = js_sub_string(param_1,lVar2,local_34,uVar4);
}
else {
auVar5 = ZEXT816(6) << 0x40;
}
JS_FreeValue(param_1,lVar2,uVar3);
}
return auVar5;
}
| |
33,887 | 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 */
} | O0 | c | bitmap_get_first:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0xb4ae6
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movl $0x0, -0x1c(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0xb4b39
movq -0x30(%rbp), %rax
cmpl $-0x1, (%rax)
je 0xb4b20
jmp 0xb4b56
jmp 0xb4b22
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb4b0b
movq -0x30(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
orl 0x18(%rcx), %eax
cmpl $-0x1, %eax
jne 0xb4b54
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb4bd0
jmp 0xb4b56
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
je 0xb4bb7
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl -0x24(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xb4baa
movl -0x1c(%rbp), %eax
shll $0x5, %eax
movl -0x20(%rbp), %ecx
shll $0x3, %ecx
addl %ecx, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xb4bd0
jmp 0xb4bac
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xb4b7a
jmp 0xb4bb9
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xb4b65
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| bitmap_get_first:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_38], rax
jmp short $+2
loc_B4AE6:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov ecx, [rax+18h]
mov rax, [rbp+var_10]
mov rax, [rax+8]
or ecx, [rax]
mov [rax], ecx
mov [rbp+var_1C], 0
loc_B4B0B:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb short loc_B4B39
mov rax, [rbp+var_30]
cmp dword ptr [rax], 0FFFFFFFFh
jz short loc_B4B20
jmp short loc_B4B56
loc_B4B20:
jmp short $+2
loc_B4B22:
mov rax, [rbp+var_30]
add rax, 4
mov [rbp+var_30], rax
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_B4B0B
loc_B4B39:
mov rax, [rbp+var_30]
mov eax, [rax]
mov rcx, [rbp+var_10]
or eax, [rcx+18h]
cmp eax, 0FFFFFFFFh
jnz short loc_B4B54
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_B4BD0
loc_B4B54:
jmp short $+2
loc_B4B56:
mov rax, [rbp+var_30]
mov [rbp+var_18], rax
mov [rbp+var_20], 0
loc_B4B65:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jz short loc_B4BB7
mov [rbp+var_24], 0
loc_B4B7A:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov ecx, [rbp+var_24]
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_B4BAA
mov eax, [rbp+var_1C]
shl eax, 5
mov ecx, [rbp+var_20]
shl ecx, 3
add eax, ecx
add eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_B4BD0
loc_B4BAA:
jmp short $+2
loc_B4BAC:
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp short loc_B4B7A
loc_B4BB7:
jmp short $+2
loc_B4BB9:
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_B4B65
loc_B4BD0:
mov eax, [rbp+var_4]
pop rbp
retn
| long long bitmap_get_first(long long a1)
{
unsigned __int8 *v2; // [rsp+0h] [rbp-38h]
unsigned __int8 *v3; // [rsp+8h] [rbp-30h]
int i; // [rsp+14h] [rbp-24h]
int v5; // [rsp+18h] [rbp-20h]
int v6; // [rsp+1Ch] [rbp-1Ch]
unsigned __int8 *v7; // [rsp+20h] [rbp-18h]
v2 = *(unsigned __int8 **)(a1 + 8);
v3 = *(unsigned __int8 **)a1;
*(_DWORD *)v2 |= *(_DWORD *)(a1 + 24);
v6 = 0;
while ( v3 < v2 )
{
if ( *(_DWORD *)v3 != -1 )
goto LABEL_7;
v3 += 4;
++v6;
}
if ( (*(_DWORD *)(a1 + 24) | *(_DWORD *)v3) == -1 )
return (unsigned int)-1;
LABEL_7:
v7 = v3;
v5 = 0;
while ( *v7 == 255 )
{
++v5;
++v7;
}
for ( i = 0; ((1 << i) & *v7) != 0; ++i )
;
return (unsigned int)(i + 8 * v5 + 32 * v6);
}
| bitmap_get_first:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001b4ae6
LAB_001b4ae6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
OR ECX,dword ptr [RAX]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x1c],0x0
LAB_001b4b0b:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x001b4b39
MOV RAX,qword ptr [RBP + -0x30]
CMP dword ptr [RAX],-0x1
JZ 0x001b4b20
JMP 0x001b4b56
LAB_001b4b20:
JMP 0x001b4b22
LAB_001b4b22:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x4
MOV qword ptr [RBP + -0x30],RAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001b4b0b
LAB_001b4b39:
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
OR EAX,dword ptr [RCX + 0x18]
CMP EAX,-0x1
JNZ 0x001b4b54
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001b4bd0
LAB_001b4b54:
JMP 0x001b4b56
LAB_001b4b56:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x20],0x0
LAB_001b4b65:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JZ 0x001b4bb7
MOV dword ptr [RBP + -0x24],0x0
LAB_001b4b7a:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV ECX,dword ptr [RBP + -0x24]
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x001b4baa
MOV EAX,dword ptr [RBP + -0x1c]
SHL EAX,0x5
MOV ECX,dword ptr [RBP + -0x20]
SHL ECX,0x3
ADD EAX,ECX
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001b4bd0
LAB_001b4baa:
JMP 0x001b4bac
LAB_001b4bac:
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x001b4b7a
LAB_001b4bb7:
JMP 0x001b4bb9
LAB_001b4bb9:
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001b4b65
LAB_001b4bd0:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int bitmap_get_first(int8 *param_1)
{
uint *puVar1;
uint *local_38;
int local_2c;
int local_28;
int local_24;
uint *local_20;
int local_c;
puVar1 = (uint *)param_1[1];
local_38 = (uint *)*param_1;
*(uint *)param_1[1] = *(uint *)(param_1 + 3) | *(uint *)param_1[1];
local_24 = 0;
for (; local_38 < puVar1; local_38 = local_38 + 1) {
if (*local_38 != 0xffffffff) goto LAB_001b4b56;
local_24 = local_24 + 1;
}
if ((*local_38 | *(uint *)(param_1 + 3)) == 0xffffffff) {
local_c = -1;
}
else {
LAB_001b4b56:
local_28 = 0;
for (local_20 = local_38; (byte)*local_20 == 0xff; local_20 = (uint *)((long)local_20 + 1)) {
local_28 = local_28 + 1;
}
local_2c = 0;
while (((uint)(byte)*local_20 & 1 << ((byte)local_2c & 0x1f)) != 0) {
local_2c = local_2c + 1;
}
local_c = local_24 * 0x20 + local_28 * 8 + local_2c;
}
return local_c;
}
| |
33,888 | my_hash_free | eloqsql/mysys/hash.c | void my_hash_free(HASH *hash)
{
DBUG_ENTER("my_hash_free");
DBUG_PRINT("enter",("hash:%p elements: %ld",
hash, hash->records));
my_hash_free_elements(hash);
hash->free= 0;
delete_dynamic(&hash->array);
hash->blength= 0;
DBUG_VOID_RETURN;
} | O0 | c | my_hash_free:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x37d1e
movq -0x8(%rbp), %rdi
callq 0x37d60
movq -0x8(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0x3d290
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0x37d4e
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_free:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_37D1E:
mov rdi, [rbp+var_8]
call my_hash_free_elements
mov rax, [rbp+var_8]
mov qword ptr [rax+60h], 0
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
call delete_dynamic
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
jmp short $+2
loc_37D4E:
add rsp, 10h
pop rbp
retn
| long long my_hash_free(long long a1)
{
long long result; // rax
my_hash_free_elements(a1);
*(_QWORD *)(a1 + 96) = 0LL;
delete_dynamic(a1 + 40);
result = a1;
*(_QWORD *)(a1 + 16) = 0LL;
return result;
}
| my_hash_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x00137d1e
LAB_00137d1e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00137d60
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x60],0x0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
CALL 0x0013d290
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
JMP 0x00137d4e
LAB_00137d4e:
ADD RSP,0x10
POP RBP
RET
|
void my_hash_free(long param_1)
{
my_hash_free_elements(param_1);
*(int8 *)(param_1 + 0x60) = 0;
delete_dynamic(param_1 + 0x28);
*(int8 *)(param_1 + 0x10) = 0;
return;
}
| |
33,889 | my_hash_free | eloqsql/mysys/hash.c | void my_hash_free(HASH *hash)
{
DBUG_ENTER("my_hash_free");
DBUG_PRINT("enter",("hash:%p elements: %ld",
hash, hash->records));
my_hash_free_elements(hash);
hash->free= 0;
delete_dynamic(&hash->array);
hash->blength= 0;
DBUG_VOID_RETURN;
} | O3 | c | my_hash_free:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x18(%rdi), %r14d
testq %r14, %r14
je 0x2fba5
movq $0x0, 0x18(%rbx)
cmpq $0x0, 0x60(%rbx)
je 0x2fba5
movq 0x28(%rbx), %r15
shlq $0x4, %r14
addq %r15, %r14
movq 0x8(%r15), %rdi
addq $0x10, %r15
callq *0x60(%rbx)
cmpq %r14, %r15
jb 0x2fb95
xorl %r14d, %r14d
movq %r14, 0x60(%rbx)
leaq 0x28(%rbx), %rdi
callq 0x32cd4
movq %r14, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_hash_free:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r14d, [rdi+18h]
test r14, r14
jz short loc_2FBA5
mov qword ptr [rbx+18h], 0
cmp qword ptr [rbx+60h], 0
jz short loc_2FBA5
mov r15, [rbx+28h]
shl r14, 4
add r14, r15
loc_2FB95:
mov rdi, [r15+8]
add r15, 10h
call qword ptr [rbx+60h]
cmp r15, r14
jb short loc_2FB95
loc_2FBA5:
xor r14d, r14d
mov [rbx+60h], r14
lea rdi, [rbx+28h]
call delete_dynamic
mov [rbx+10h], r14
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_hash_free(long long a1)
{
long long v2; // r14
unsigned long long v3; // r15
unsigned long long v4; // r14
long long v5; // rdi
long long result; // rax
v2 = *(unsigned int *)(a1 + 24);
if ( *(_DWORD *)(a1 + 24) )
{
*(_QWORD *)(a1 + 24) = 0LL;
if ( *(_QWORD *)(a1 + 96) )
{
v3 = *(_QWORD *)(a1 + 40);
v4 = v3 + 16 * v2;
do
{
v5 = *(_QWORD *)(v3 + 8);
v3 += 16LL;
(*(void ( **)(long long))(a1 + 96))(v5);
}
while ( v3 < v4 );
}
}
*(_QWORD *)(a1 + 96) = 0LL;
result = delete_dynamic(a1 + 40);
*(_QWORD *)(a1 + 16) = 0LL;
return result;
}
| my_hash_free:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14D,dword ptr [RDI + 0x18]
TEST R14,R14
JZ 0x0012fba5
MOV qword ptr [RBX + 0x18],0x0
CMP qword ptr [RBX + 0x60],0x0
JZ 0x0012fba5
MOV R15,qword ptr [RBX + 0x28]
SHL R14,0x4
ADD R14,R15
LAB_0012fb95:
MOV RDI,qword ptr [R15 + 0x8]
ADD R15,0x10
CALL qword ptr [RBX + 0x60]
CMP R15,R14
JC 0x0012fb95
LAB_0012fba5:
XOR R14D,R14D
MOV qword ptr [RBX + 0x60],R14
LEA RDI,[RBX + 0x28]
CALL 0x00132cd4
MOV qword ptr [RBX + 0x10],R14
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void my_hash_free(long param_1)
{
int8 *puVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
uVar2 = *(uint *)(param_1 + 0x18);
if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0))
{
uVar4 = *(ulong *)(param_1 + 0x28);
uVar3 = (ulong)uVar2 * 0x10 + uVar4;
do {
puVar1 = (int8 *)(uVar4 + 8);
uVar4 = uVar4 + 0x10;
(**(code **)(param_1 + 0x60))(*puVar1);
} while (uVar4 < uVar3);
}
*(int8 *)(param_1 + 0x60) = 0;
delete_dynamic(param_1 + 0x28);
*(int8 *)(param_1 + 0x10) = 0;
return;
}
| |
33,890 | my_casedn_8bit | eloqsql/strings/ctype-simple.c | size_t my_casedn_8bit(CHARSET_INFO * cs, const char *src, size_t srclen,
char *dst, size_t dstlen __attribute__((unused)))
{
const char *end= src + srclen;
register const uchar *map=cs->to_lower;
DBUG_ASSERT(srclen <= dstlen);
for ( ; src != end ; src++)
*dst++= (char) map[(uchar) *src];
return srclen;
} | O3 | c | my_casedn_8bit:
movq %rdx, %rax
testq %rdx, %rdx
je 0x5b1a8
pushq %rbp
movq %rsp, %rbp
movq 0x48(%rdi), %rdx
xorl %edi, %edi
movzbl (%rsi,%rdi), %r8d
movb (%rdx,%r8), %r8b
movb %r8b, (%rcx,%rdi)
incq %rdi
cmpq %rdi, %rax
jne 0x5b192
popq %rbp
retq
| my_casedn_8bit:
mov rax, rdx
test rdx, rdx
jz short locret_5B1A8
push rbp
mov rbp, rsp
mov rdx, [rdi+48h]
xor edi, edi
loc_5B192:
movzx r8d, byte ptr [rsi+rdi]
mov r8b, [rdx+r8]
mov [rcx+rdi], r8b
inc rdi
cmp rax, rdi
jnz short loc_5B192
pop rbp
locret_5B1A8:
retn
| long long my_casedn_8bit(long long a1, long long a2, long long a3, long long a4)
{
long long result; // rax
long long v5; // rdx
long long v6; // rdi
result = a3;
if ( a3 )
{
v5 = *(_QWORD *)(a1 + 72);
v6 = 0LL;
do
{
*(_BYTE *)(a4 + v6) = *(_BYTE *)(v5 + *(unsigned __int8 *)(a2 + v6));
++v6;
}
while ( result != v6 );
}
return result;
}
| my_casedn_8bit:
MOV RAX,RDX
TEST RDX,RDX
JZ 0x0015b1a8
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI + 0x48]
XOR EDI,EDI
LAB_0015b192:
MOVZX R8D,byte ptr [RSI + RDI*0x1]
MOV R8B,byte ptr [RDX + R8*0x1]
MOV byte ptr [RCX + RDI*0x1],R8B
INC RDI
CMP RAX,RDI
JNZ 0x0015b192
POP RBP
LAB_0015b1a8:
RET
|
void my_casedn_8bit(long param_1,long param_2,long param_3,long param_4)
{
long lVar1;
long lVar2;
if (param_3 != 0) {
lVar1 = *(long *)(param_1 + 0x48);
lVar2 = 0;
do {
*(int1 *)(param_4 + lVar2) = *(int1 *)(lVar1 + (ulong)*(byte *)(param_2 + lVar2));
lVar2 = lVar2 + 1;
} while (param_3 != lVar2);
}
return;
}
| |
33,891 | google::protobuf::StrCat[abi:cxx11](google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc | std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
const AlphaNum &d) {
std::string result;
result.resize(a.size() + b.size() + c.size() + d.size());
char *const begin = &*result.begin();
char *out = Append4(begin, a, b, c, d);
GOOGLE_DCHECK_EQ(out, begin + result.size());
return result;
} | O0 | cpp | google::protobuf::StrCat[abi:cxx11](google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&):
subq $0xf8, %rsp
movq %rdi, 0x48(%rsp)
movq %rdi, %rax
movq %rax, 0x50(%rsp)
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
movq %rcx, 0xd8(%rsp)
movq %r8, 0xd0(%rsp)
movb $0x0, 0xcf(%rsp)
callq 0x13620
movq 0xe8(%rsp), %rdi
callq 0x30a80
movq %rax, 0x58(%rsp)
jmp 0x2b55d
movq 0xe0(%rsp), %rdi
callq 0x30a80
movq %rax, 0x40(%rsp)
jmp 0x2b571
movq 0x40(%rsp), %rcx
movq 0x58(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0xd8(%rsp), %rdi
callq 0x30a80
movq %rax, 0x38(%rsp)
jmp 0x2b597
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0xd0(%rsp), %rdi
callq 0x30a80
movq %rax, 0x28(%rsp)
jmp 0x2b5bd
movq 0x48(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %rsi
addq %rax, %rsi
callq 0x13600
jmp 0x2b5d6
movq 0x48(%rsp), %rdi
callq 0x133b0
movq %rax, 0xa8(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x30a90
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
movq 0xd8(%rsp), %rcx
movq 0xd0(%rsp), %r8
callq 0x2b770
movq %rax, 0x18(%rsp)
jmp 0x2b631
movq 0x18(%rsp), %rax
movq %rax, 0xa0(%rsp)
xorl %eax, %eax
testb $0x1, %al
jne 0x2b649
jmp 0x2b72b
movq 0x48(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x147d0
movq 0x8(%rsp), %rcx
movq %rax, %rdx
movq 0x10(%rsp), %rax
addq %rdx, %rcx
movb $0x0, 0x67(%rsp)
cmpq %rcx, %rax
jne 0x2b689
jmp 0x2b6d4
leaq 0x1c1600(%rip), %rdx # 0x1ecc90
leaq 0x68(%rsp), %rdi
movl $0x3, %esi
movl $0x5d9, %ecx # imm = 0x5D9
callq 0x237e0
jmp 0x2b6a6
movb $0x1, 0x67(%rsp)
leaq 0x1c183f(%rip), %rsi # 0x1ecef1
leaq 0x68(%rsp), %rdi
callq 0x230a0
movq %rax, (%rsp)
jmp 0x2b6c2
movq (%rsp), %rsi
leaq 0x66(%rsp), %rdi
callq 0x23250
jmp 0x2b6d2
jmp 0x2b6d4
testb $0x1, 0x67(%rsp)
jne 0x2b6dd
jmp 0x2b6e7
leaq 0x68(%rsp), %rdi
callq 0x23820
jmp 0x2b63e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc0(%rsp)
movl %eax, 0xbc(%rsp)
jmp 0x2b754
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc0(%rsp)
movl %eax, 0xbc(%rsp)
testb $0x1, 0x67(%rsp)
jne 0x2b71f
jmp 0x2b729
leaq 0x68(%rsp), %rdi
callq 0x23820
jmp 0x2b754
movb $0x1, 0xcf(%rsp)
testb $0x1, 0xcf(%rsp)
jne 0x2b747
movq 0x48(%rsp), %rdi
callq 0x13290
movq 0x50(%rsp), %rax
addq $0xf8, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x13290
movq 0xc0(%rsp), %rdi
callq 0x13750
nopl (%rax,%rax)
| _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_S4_S4_:
sub rsp, 0F8h
mov [rsp+0F8h+var_B0], rdi
mov rax, rdi
mov [rsp+0F8h+var_A8], rax
mov [rsp+0F8h+var_8], rdi
mov [rsp+0F8h+var_10], rsi
mov [rsp+0F8h+var_18], rdx
mov [rsp+0F8h+var_20], rcx
mov [rsp+0F8h+var_28], r8
mov [rsp+0F8h+var_29], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rdi, [rsp+0F8h+var_10]; this
call _ZNK6google8protobuf7strings8AlphaNum4sizeEv; google::protobuf::strings::AlphaNum::size(void)
mov [rsp+0F8h+var_A0], rax
jmp short $+2
loc_2B55D:
mov rdi, [rsp+0F8h+var_18]; this
call _ZNK6google8protobuf7strings8AlphaNum4sizeEv; google::protobuf::strings::AlphaNum::size(void)
mov [rsp+0F8h+var_B8], rax
jmp short $+2
loc_2B571:
mov rcx, [rsp+0F8h+var_B8]
mov rax, [rsp+0F8h+var_A0]
add rax, rcx
mov [rsp+0F8h+var_C8], rax
mov rdi, [rsp+0F8h+var_20]; this
call _ZNK6google8protobuf7strings8AlphaNum4sizeEv; google::protobuf::strings::AlphaNum::size(void)
mov [rsp+0F8h+var_C0], rax
jmp short $+2
loc_2B597:
mov rcx, [rsp+0F8h+var_C0]
mov rax, [rsp+0F8h+var_C8]
add rax, rcx
mov [rsp+0F8h+var_D8], rax
mov rdi, [rsp+0F8h+var_28]; this
call _ZNK6google8protobuf7strings8AlphaNum4sizeEv; google::protobuf::strings::AlphaNum::size(void)
mov [rsp+0F8h+var_D0], rax
jmp short $+2
loc_2B5BD:
mov rdi, [rsp+0F8h+var_B0]
mov rax, [rsp+0F8h+var_D0]
mov rsi, [rsp+0F8h+var_D8]
add rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
jmp short $+2
loc_2B5D6:
mov rdi, [rsp+0F8h+var_B0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov [rsp+0F8h+var_50], rax
lea rdi, [rsp+0F8h+var_50]
call _ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char *,std::string>::operator*(void)
mov [rsp+0F8h+var_48], rax
mov rdi, [rsp+0F8h+var_48]; this
mov rsi, [rsp+0F8h+var_10]; char *
mov rdx, [rsp+0F8h+var_18]; google::protobuf::strings::AlphaNum *
mov rcx, [rsp+0F8h+var_20]; google::protobuf::strings::AlphaNum *
mov r8, [rsp+0F8h+var_28]; google::protobuf::strings::AlphaNum *
call _ZN6google8protobufL7Append4EPcRKNS0_7strings8AlphaNumES5_S5_S5_; google::protobuf::Append4(char *,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&)
mov [rsp+0F8h+var_E0], rax
jmp short $+2
loc_2B631:
mov rax, [rsp+0F8h+var_E0]
mov [rsp+0F8h+var_58], rax
loc_2B63E:
xor eax, eax
test al, 1
jnz short loc_2B649
jmp loc_2B72B
loc_2B649:
mov rdi, [rsp+0F8h+var_B0]
mov rax, [rsp+0F8h+var_58]
mov [rsp+0F8h+var_E8], rax
mov rax, [rsp+0F8h+var_48]
mov [rsp+0F8h+var_F0], rax
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, [rsp+0F8h+var_F0]
mov rdx, rax
mov rax, [rsp+0F8h+var_E8]
add rcx, rdx
mov [rsp+0F8h+var_91], 0
cmp rax, rcx
jnz short loc_2B689
jmp short loc_2B6D4
loc_2B689:
lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+0F8h+var_90]
mov esi, 3
mov ecx, 5D9h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
jmp short $+2
loc_2B6A6:
mov [rsp+0F8h+var_91], 1
lea rsi, aCheckFailedOut; "CHECK failed: (out) == (begin + result."...
lea rdi, [rsp+0F8h+var_90]
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+0F8h+var_F8], rax
jmp short $+2
loc_2B6C2:
mov rsi, [rsp+0F8h+var_F8]
lea rdi, [rsp+0F8h+var_92]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_2B6D2:
jmp short $+2
loc_2B6D4:
test [rsp+0F8h+var_91], 1
jnz short loc_2B6DD
jmp short loc_2B6E7
loc_2B6DD:
lea rdi, [rsp+0F8h+var_90]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_2B6E7:
jmp loc_2B63E
mov rcx, rax
mov eax, edx
mov [rsp+arg_B8], rcx
mov [rsp+arg_B4], eax
jmp short loc_2B754
mov rcx, rax
mov eax, edx
mov [rsp+arg_B8], rcx
mov [rsp+arg_B4], eax
test [rsp+arg_5F], 1
jnz short loc_2B71F
jmp short loc_2B729
loc_2B71F:
lea rdi, [rsp+arg_60]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_2B729:
jmp short loc_2B754
loc_2B72B:
mov [rsp+0F8h+var_29], 1
test [rsp+0F8h+var_29], 1
jnz short loc_2B747
mov rdi, [rsp+0F8h+var_B0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_2B747:
mov rax, [rsp+0F8h+var_A8]
add rsp, 0F8h
retn
loc_2B754:
mov rdi, [rsp+arg_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+arg_B8]
call __Unwind_Resume
| long long google::protobuf::StrCat[abi:cxx11](
long long a1,
google::protobuf::strings::AlphaNum *a2,
google::protobuf::strings::AlphaNum *a3,
google::protobuf::strings::AlphaNum *a4,
google::protobuf::strings::AlphaNum *a5)
{
const google::protobuf::strings::AlphaNum *v5; // r9
long long v7; // [rsp+20h] [rbp-D8h]
long long v8; // [rsp+28h] [rbp-D0h]
long long v9; // [rsp+30h] [rbp-C8h]
long long v10; // [rsp+58h] [rbp-A0h]
long long v11; // [rsp+A8h] [rbp-50h] BYREF
google::protobuf *v12; // [rsp+B0h] [rbp-48h]
char v13; // [rsp+CFh] [rbp-29h]
google::protobuf::strings::AlphaNum *v14; // [rsp+D0h] [rbp-28h]
google::protobuf::strings::AlphaNum *v15; // [rsp+D8h] [rbp-20h]
google::protobuf::strings::AlphaNum *v16; // [rsp+E0h] [rbp-18h]
google::protobuf::strings::AlphaNum *v17; // [rsp+E8h] [rbp-10h]
long long v18; // [rsp+F0h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = a5;
v13 = 0;
std::string::basic_string(a1);
v10 = google::protobuf::strings::AlphaNum::size(a2);
v9 = google::protobuf::strings::AlphaNum::size(v16) + v10;
v7 = google::protobuf::strings::AlphaNum::size(v15) + v9;
v8 = google::protobuf::strings::AlphaNum::size(v14);
std::string::resize(a1, v8 + v7);
v11 = std::string::begin(a1);
v12 = (google::protobuf *)__gnu_cxx::__normal_iterator<char *,std::string>::operator*(&v11);
google::protobuf::Append4(v12, (char *)v17, v16, v15, v14, v5);
return a1;
}
| StrCat[abi:cxx11]:
SUB RSP,0xf8
MOV qword ptr [RSP + 0x48],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0xf0],RDI
MOV qword ptr [RSP + 0xe8],RSI
MOV qword ptr [RSP + 0xe0],RDX
MOV qword ptr [RSP + 0xd8],RCX
MOV qword ptr [RSP + 0xd0],R8
MOV byte ptr [RSP + 0xcf],0x0
CALL 0x00113620
MOV RDI,qword ptr [RSP + 0xe8]
LAB_0012b551:
CALL 0x00130a80
MOV qword ptr [RSP + 0x58],RAX
JMP 0x0012b55d
LAB_0012b55d:
MOV RDI,qword ptr [RSP + 0xe0]
CALL 0x00130a80
MOV qword ptr [RSP + 0x40],RAX
JMP 0x0012b571
LAB_0012b571:
MOV RCX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x58]
ADD RAX,RCX
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0xd8]
CALL 0x00130a80
MOV qword ptr [RSP + 0x38],RAX
JMP 0x0012b597
LAB_0012b597:
MOV RCX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x30]
ADD RAX,RCX
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0xd0]
CALL 0x00130a80
MOV qword ptr [RSP + 0x28],RAX
JMP 0x0012b5bd
LAB_0012b5bd:
MOV RDI,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x20]
ADD RSI,RAX
CALL 0x00113600
JMP 0x0012b5d6
LAB_0012b5d6:
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x001133b0
MOV qword ptr [RSP + 0xa8],RAX
LEA RDI,[RSP + 0xa8]
CALL 0x00130a90
MOV qword ptr [RSP + 0xb0],RAX
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xe8]
MOV RDX,qword ptr [RSP + 0xe0]
MOV RCX,qword ptr [RSP + 0xd8]
MOV R8,qword ptr [RSP + 0xd0]
CALL 0x0012b770
MOV qword ptr [RSP + 0x18],RAX
JMP 0x0012b631
LAB_0012b631:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0xa0],RAX
LAB_0012b63e:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x0012b649
JMP 0x0012b72b
LAB_0012b649:
MOV RDI,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x8],RAX
CALL 0x001147d0
MOV RCX,qword ptr [RSP + 0x8]
MOV RDX,RAX
MOV RAX,qword ptr [RSP + 0x10]
ADD RCX,RDX
MOV byte ptr [RSP + 0x67],0x0
CMP RAX,RCX
JNZ 0x0012b689
JMP 0x0012b6d4
LAB_0012b689:
LEA RDX,[0x2ecc90]
LEA RDI,[RSP + 0x68]
MOV ESI,0x3
MOV ECX,0x5d9
CALL 0x001237e0
JMP 0x0012b6a6
LAB_0012b6a6:
MOV byte ptr [RSP + 0x67],0x1
LAB_0012b6ab:
LEA RSI,[0x2ecef1]
LEA RDI,[RSP + 0x68]
CALL 0x001230a0
MOV qword ptr [RSP],RAX
JMP 0x0012b6c2
LAB_0012b6c2:
MOV RSI,qword ptr [RSP]
LEA RDI,[RSP + 0x66]
CALL 0x00123250
LAB_0012b6d0:
JMP 0x0012b6d2
LAB_0012b6d2:
JMP 0x0012b6d4
LAB_0012b6d4:
TEST byte ptr [RSP + 0x67],0x1
JNZ 0x0012b6dd
JMP 0x0012b6e7
LAB_0012b6dd:
LEA RDI,[RSP + 0x68]
CALL 0x00123820
LAB_0012b6e7:
JMP 0x0012b63e
LAB_0012b72b:
MOV byte ptr [RSP + 0xcf],0x1
TEST byte ptr [RSP + 0xcf],0x1
JNZ 0x0012b747
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x00113290
LAB_0012b747:
MOV RAX,qword ptr [RSP + 0x50]
ADD RSP,0xf8
RET
|
/* WARNING: Removing unreachable block (ram,0x0012b649) */
/* WARNING: Removing unreachable block (ram,0x0012b689) */
/* WARNING: Removing unreachable block (ram,0x0012b687) */
/* WARNING: Removing unreachable block (ram,0x0012b6d4) */
/* WARNING: Removing unreachable block (ram,0x0012b6dd) */
/* WARNING: Removing unreachable block (ram,0x0012b6db) */
/* WARNING: Removing unreachable block (ram,0x0012b6e7) */
/* WARNING: Removing unreachable block (ram,0x0012b73d) */
/* google::protobuf::StrCat[abi:cxx11](google::protobuf::strings::AlphaNum const&,
google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&,
google::protobuf::strings::AlphaNum const&) */
protobuf * __thiscall
google::protobuf::StrCat_abi_cxx11_
(protobuf *this,AlphaNum *param_1,AlphaNum *param_2,AlphaNum *param_3,AlphaNum *param_4)
{
int8 local_50;
char *local_48;
int1 local_29;
AlphaNum *local_28;
AlphaNum *local_20;
AlphaNum *local_18;
AlphaNum *local_10;
protobuf *local_8;
local_29 = 0;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
std::__cxx11::string::string((string *)this);
/* try { // try from 0012b551 to 0012b6a3 has its CatchHandler @ 0012b6ec */
strings::AlphaNum::size(local_10);
strings::AlphaNum::size(local_18);
strings::AlphaNum::size(local_20);
strings::AlphaNum::size(local_28);
std::__cxx11::string::resize((ulong)this);
local_50 = std::__cxx11::string::begin();
local_48 = (char *)__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>::operator*
((__normal_iterator<char*,std::__cxx11::string> *)&local_50);
Append4(local_48,local_10,local_18,local_20,local_28);
return this;
}
| |
33,892 | google::protobuf::StrCat[abi:cxx11](google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc | std::string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
const AlphaNum &d) {
std::string result;
result.resize(a.size() + b.size() + c.size() + d.size());
char *const begin = &*result.begin();
char *out = Append4(begin, a, b, c, d);
GOOGLE_DCHECK_EQ(out, begin + result.size());
return result;
} | O3 | cpp | google::protobuf::StrCat[abi:cxx11](google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x10(%rdi), %rbp
movq %rbp, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rdx), %rsi
addq 0x8(%r13), %rsi
addq 0x8(%rcx), %rsi
addq 0x8(%r8), %rsi
xorl %edx, %edx
callq 0xf0f0
movq (%rbx), %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x19a70
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %rbp, %rdi
je 0x19a68
callq 0xf330
movq %r14, %rdi
callq 0xf570
| _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_S4_S4_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rbx, rdi
lea rbp, [rdi+10h]
mov [rdi], rbp
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rsi, [rdx+8]
add rsi, [r13+8]
add rsi, [rcx+8]
add rsi, [r8+8]
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rdi, [rbx]
mov rsi, r13
mov rdx, r12
mov rcx, r15
mov r8, r14
call _ZN6google8protobufL7Append4EPcRKNS0_7strings8AlphaNumES5_S5_S5_; google::protobuf::Append4(char *,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&)
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, rbp
jz short loc_19A68
call __ZdlPv; operator delete(void *)
loc_19A68:
mov rdi, r14
call __Unwind_Resume
| long long google::protobuf::StrCat[abi:cxx11](long long a1, long long a2, long long a3, long long a4, long long a5)
{
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
std::string::resize(a1, *(_QWORD *)(a5 + 8) + *(_QWORD *)(a4 + 8) + *(_QWORD *)(a2 + 8) + *(_QWORD *)(a3 + 8), 0LL);
google::protobuf::Append4(*(_QWORD *)a1, a2, a3, a4, a5);
return a1;
}
| StrCat[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RBX,RDI
LEA RBP,[RDI + 0x10]
MOV qword ptr [RDI],RBP
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RSI,qword ptr [RDX + 0x8]
ADD RSI,qword ptr [R13 + 0x8]
ADD RSI,qword ptr [RCX + 0x8]
ADD RSI,qword ptr [R8 + 0x8]
LAB_00119a2b:
XOR EDX,EDX
CALL 0x0010f0f0
LAB_00119a32:
MOV RDI,qword ptr [RBX]
MOV RSI,R13
MOV RDX,R12
MOV RCX,R15
MOV R8,R14
CALL 0x00119a70
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::StrCat[abi:cxx11](google::protobuf::strings::AlphaNum const&,
google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&,
google::protobuf::strings::AlphaNum const&) */
protobuf * __thiscall
google::protobuf::StrCat_abi_cxx11_
(protobuf *this,AlphaNum *param_1,AlphaNum *param_2,AlphaNum *param_3,AlphaNum *param_4)
{
*(protobuf **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (protobuf)0x0;
/* try { // try from 00119a2b to 00119a31 has its CatchHandler @ 00119a58 */
std::__cxx11::string::resize
((ulong)this,
(char)*(int8 *)(param_2 + 8) + (char)*(int8 *)(param_1 + 8) +
(char)*(int8 *)(param_3 + 8) + (char)*(int8 *)(param_4 + 8));
Append4(*(char **)this,param_1,param_2,param_3,param_4);
return this;
}
| |
33,893 | std::enable_if<!std::is_array<httplib::detail::gzip_compressor>::value, std::unique_ptr<httplib::detail::gzip_compressor, std::default_delete<httplib::detail::gzip_compressor>>>::type httplib::detail::make_unique<httplib::detail::gzip_compressor>() | nickolajgrishuk[P]metricz-cpp/build_O1/_deps/httplib-src/httplib.h | typename std::enable_if<!std::is_array<T>::value, std::unique_ptr<T>>::type
make_unique(Args &&...args) {
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
} | O1 | c | std::enable_if<!std::is_array<httplib::detail::gzip_compressor>::value, std::unique_ptr<httplib::detail::gzip_compressor, std::default_delete<httplib::detail::gzip_compressor>>>::type httplib::detail::make_unique<httplib::detail::gzip_compressor>():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x80, %edi
callq 0x8550
movq %rax, %r14
leaq 0x21972(%rip), %rax # 0x3f100
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
leaq 0x10(%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x40(%r14)
movups %xmm0, 0x50(%r14)
movups %xmm0, 0x60(%r14)
movups %xmm0, 0x70(%r14)
leaq 0x10bb1(%rip), %rax # 0x2e378
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
movl $0x8, %edx
movl $0x1f, %ecx
movl $0x8, %r8d
xorl %r9d, %r9d
pushq $0x70
pushq %rax
callq 0x8070
addq $0x10, %rsp
testl %eax, %eax
sete 0x8(%r14)
movq %r14, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x8520
movq %rbx, %rdi
callq 0x8990
| _ZN7httplib6detail11make_uniqueINS0_15gzip_compressorEJEEENSt9enable_ifIXntsr3std8is_arrayIT_EE5valueESt10unique_ptrIS4_St14default_deleteIS4_EEE4typeEDpOT0_:
push r14
push rbx
push rax
mov rbx, rdi
mov edi, 80h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea rax, off_3F100
mov [r14], rax
mov byte ptr [r14+8], 0
lea rdi, [r14+10h]
xorps xmm0, xmm0
movups xmmword ptr [r14+10h], xmm0
movups xmmword ptr [r14+20h], xmm0
movups xmmword ptr [r14+30h], xmm0
movups xmmword ptr [r14+40h], xmm0
movups xmmword ptr [r14+50h], xmm0
movups xmmword ptr [r14+60h], xmm0
movups xmmword ptr [r14+70h], xmm0
lea rax, a1211; "1.2.11"
mov esi, 0FFFFFFFFh
mov edx, 8
mov ecx, 1Fh
mov r8d, 8
xor r9d, r9d
push 70h ; 'p'
push rax
call _deflateInit2_
add rsp, 10h
test eax, eax
setz byte ptr [r14+8]
mov [rbx], r14
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, r14; void *
call __ZdlPv; operator delete(void *)
mov rdi, rbx
call __Unwind_Resume
| _QWORD * httplib::detail::make_unique<httplib::detail::gzip_compressor>(_QWORD *a1)
{
long long v1; // r14
v1 = operator new(0x80uLL);
*(_QWORD *)v1 = off_3F100;
*(_BYTE *)(v1 + 8) = 0;
*(_OWORD *)(v1 + 16) = 0LL;
*(_OWORD *)(v1 + 32) = 0LL;
*(_OWORD *)(v1 + 48) = 0LL;
*(_OWORD *)(v1 + 64) = 0LL;
*(_OWORD *)(v1 + 80) = 0LL;
*(_OWORD *)(v1 + 96) = 0LL;
*(_OWORD *)(v1 + 112) = 0LL;
*(_BYTE *)(v1 + 8) = (unsigned int)deflateInit2_(v1 + 16, 0xFFFFFFFFLL, 8LL, 31LL, 8LL, 0LL, "1.2.11", 112LL) == 0;
*a1 = v1;
return a1;
}
| make_unique<httplib::detail::gzip_compressor>:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EDI,0x80
CALL 0x00108550
MOV R14,RAX
LEA RAX,[0x13f100]
MOV qword ptr [R14],RAX
MOV byte ptr [R14 + 0x8],0x0
LEA RDI,[R14 + 0x10]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x10],XMM0
MOVUPS xmmword ptr [R14 + 0x20],XMM0
MOVUPS xmmword ptr [R14 + 0x30],XMM0
MOVUPS xmmword ptr [R14 + 0x40],XMM0
MOVUPS xmmword ptr [R14 + 0x50],XMM0
MOVUPS xmmword ptr [R14 + 0x60],XMM0
MOVUPS xmmword ptr [R14 + 0x70],XMM0
LAB_0011d7c0:
LEA RAX,[0x12e378]
MOV ESI,0xffffffff
MOV EDX,0x8
MOV ECX,0x1f
MOV R8D,0x8
XOR R9D,R9D
PUSH 0x70
PUSH RAX
CALL 0x00108070
ADD RSP,0x10
LAB_0011d7eb:
TEST EAX,EAX
SETZ byte ptr [R14 + 0x8]
MOV qword ptr [RBX],R14
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* std::enable_if<!std::is_array<httplib::detail::gzip_compressor>::value,
std::unique_ptr<httplib::detail::gzip_compressor,
std::default_delete<httplib::detail::gzip_compressor> > >::type
httplib::detail::make_unique<httplib::detail::gzip_compressor>() */
detail * __thiscall httplib::detail::make_unique<httplib::detail::gzip_compressor>(detail *this)
{
int iVar1;
int8 *puVar2;
puVar2 = (int8 *)operator_new(0x80);
*puVar2 = &PTR__gzip_compressor_0013f100;
*(int1 *)(puVar2 + 1) = 0;
puVar2[2] = 0;
puVar2[3] = 0;
puVar2[4] = 0;
puVar2[5] = 0;
puVar2[6] = 0;
puVar2[7] = 0;
puVar2[8] = 0;
puVar2[9] = 0;
puVar2[10] = 0;
puVar2[0xb] = 0;
puVar2[0xc] = 0;
puVar2[0xd] = 0;
puVar2[0xe] = 0;
puVar2[0xf] = 0;
/* try { // try from 0011d7c0 to 0011d7ea has its CatchHandler @ 0011d800 */
iVar1 = deflateInit2_(puVar2 + 2,0xffffffff,8,0x1f,8,0,"1.2.11",0x70);
*(bool *)(puVar2 + 1) = iVar1 == 0;
*(int8 **)this = puVar2;
return this;
}
| |
33,894 | mi_new | eloqsql/storage/myisam/mi_page.c | my_off_t _mi_new(register MI_INFO *info, MI_KEYDEF *keyinfo, int level)
{
my_off_t pos;
uchar buff[8];
DBUG_ENTER("_mi_new");
if ((pos= info->s->state.key_del[keyinfo->block_size_index]) ==
HA_OFFSET_ERROR)
{
if (info->state->key_file_length >=
info->s->base.max_key_file_length - keyinfo->block_length)
{
my_errno=HA_ERR_INDEX_FILE_FULL;
DBUG_RETURN(HA_OFFSET_ERROR);
}
pos=info->state->key_file_length;
info->state->key_file_length+= keyinfo->block_length;
}
else
{
if (!key_cache_read(info->s->key_cache,
info->s->kfile, pos, level,
buff,
(uint) sizeof(buff),
(uint) keyinfo->block_length,0))
pos= HA_OFFSET_ERROR;
else
info->s->state.key_del[keyinfo->block_size_index]= mi_sizekorr(buff);
}
info->s->state.changed|= STATE_NOT_SORTED_PAGES;
DBUG_PRINT("exit",("Pos: %ld",(long) pos));
DBUG_RETURN(pos);
} | O3 | c | mi_new:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ecx
movq %rsi, %r15
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
movq (%rdi), %rax
movq 0xa0(%rax), %rdx
movzwl 0x18(%rsi), %esi
movq (%rdx,%rsi,8), %rbx
cmpq $-0x1, %rbx
je 0x8a28c
movq 0x278(%rax), %rdi
movl 0x350(%rax), %esi
movzwl 0xe(%r15), %eax
leaq -0x28(%rbp), %r8
movq %rbx, %rdx
movl $0x8, %r9d
pushq $0x0
pushq %rax
callq 0x9e684
addq $0x10, %rsp
testq %rax, %rax
je 0x8a2b1
movq -0x28(%rbp), %rax
bswapq %rax
movq (%r14), %rcx
movq 0xa0(%rcx), %rcx
movzwl 0x18(%r15), %edx
movq %rax, (%rcx,%rdx,8)
jmp 0x8a2b8
movq 0x8(%r14), %rcx
movq 0x20(%rcx), %rbx
movq 0x118(%rax), %rdx
movzwl 0xe(%r15), %eax
subq %rax, %rdx
cmpq %rdx, %rbx
jae 0x8a2df
addq %rbx, %rax
movq %rax, 0x20(%rcx)
jmp 0x8a2b8
movq $-0x1, %rbx
movq (%r14), %rax
orb $0x20, 0xf0(%rax)
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x8a2f3
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0xa7c22
movl $0x88, (%rax)
movq $-0x1, %rbx
jmp 0x8a2c2
callq 0x29220
| _mi_new:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 18h
mov ecx, edx
mov r15, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
mov rax, [rdi]
mov rdx, [rax+0A0h]
movzx esi, word ptr [rsi+18h]
mov rbx, [rdx+rsi*8]
cmp rbx, 0FFFFFFFFFFFFFFFFh
jz short loc_8A28C
mov rdi, [rax+278h]
mov esi, [rax+350h]
movzx eax, word ptr [r15+0Eh]
lea r8, [rbp+var_28]
mov rdx, rbx
mov r9d, 8
push 0
push rax
call key_cache_read
add rsp, 10h
test rax, rax
jz short loc_8A2B1
mov rax, [rbp+var_28]
bswap rax
mov rcx, [r14]
mov rcx, [rcx+0A0h]
movzx edx, word ptr [r15+18h]
mov [rcx+rdx*8], rax
jmp short loc_8A2B8
loc_8A28C:
mov rcx, [r14+8]
mov rbx, [rcx+20h]
mov rdx, [rax+118h]
movzx eax, word ptr [r15+0Eh]
sub rdx, rax
cmp rbx, rdx
jnb short loc_8A2DF
add rax, rbx
mov [rcx+20h], rax
jmp short loc_8A2B8
loc_8A2B1:
mov rbx, 0FFFFFFFFFFFFFFFFh
loc_8A2B8:
mov rax, [r14]
or byte ptr [rax+0F0h], 20h
loc_8A2C2:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_8A2F3
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_8A2DF:
call _my_thread_var
mov dword ptr [rax], 88h
mov rbx, 0FFFFFFFFFFFFFFFFh
jmp short loc_8A2C2
loc_8A2F3:
call ___stack_chk_fail
| long long mi_new(_QWORD *a1, long long a2)
{
long long v3; // rax
const char *v4; // rsi
unsigned long long v5; // rbx
long long v6; // rcx
long long v7; // rdx
long long v8; // rax
unsigned long long v10; // [rsp+8h] [rbp-28h]
v3 = *a1;
v4 = (const char *)*(unsigned __int16 *)(a2 + 24);
v5 = *(_QWORD *)(*(_QWORD *)(*a1 + 160LL) + 8LL * (_QWORD)v4);
if ( v5 == -1LL )
{
v6 = a1[1];
v5 = *(_QWORD *)(v6 + 32);
v7 = *(_QWORD *)(v3 + 280);
v8 = *(unsigned __int16 *)(a2 + 14);
if ( v5 >= v7 - v8 )
{
*(_DWORD *)my_thread_var(a1, v4) = 136;
return -1LL;
}
*(_QWORD *)(v6 + 32) = v5 + v8;
}
else if ( key_cache_read(*(_QWORD *)(v3 + 632), *(unsigned int *)(v3 + 848), v5) )
{
*(_QWORD *)(*(_QWORD *)(*a1 + 160LL) + 8LL * *(unsigned __int16 *)(a2 + 24)) = _byteswap_uint64(v10);
}
else
{
v5 = -1LL;
}
*(_BYTE *)(*a1 + 240LL) |= 0x20u;
return v5;
}
| _mi_new:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV ECX,EDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RDI]
MOV RDX,qword ptr [RAX + 0xa0]
MOVZX ESI,word ptr [RSI + 0x18]
MOV RBX,qword ptr [RDX + RSI*0x8]
CMP RBX,-0x1
JZ 0x0018a28c
MOV RDI,qword ptr [RAX + 0x278]
MOV ESI,dword ptr [RAX + 0x350]
MOVZX EAX,word ptr [R15 + 0xe]
LEA R8,[RBP + -0x28]
MOV RDX,RBX
MOV R9D,0x8
PUSH 0x0
PUSH RAX
CALL 0x0019e684
ADD RSP,0x10
TEST RAX,RAX
JZ 0x0018a2b1
MOV RAX,qword ptr [RBP + -0x28]
BSWAP RAX
MOV RCX,qword ptr [R14]
MOV RCX,qword ptr [RCX + 0xa0]
MOVZX EDX,word ptr [R15 + 0x18]
MOV qword ptr [RCX + RDX*0x8],RAX
JMP 0x0018a2b8
LAB_0018a28c:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x20]
MOV RDX,qword ptr [RAX + 0x118]
MOVZX EAX,word ptr [R15 + 0xe]
SUB RDX,RAX
CMP RBX,RDX
JNC 0x0018a2df
ADD RAX,RBX
MOV qword ptr [RCX + 0x20],RAX
JMP 0x0018a2b8
LAB_0018a2b1:
MOV RBX,-0x1
LAB_0018a2b8:
MOV RAX,qword ptr [R14]
OR byte ptr [RAX + 0xf0],0x20
LAB_0018a2c2:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0018a2f3
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0018a2df:
CALL 0x001a7c22
MOV dword ptr [RAX],0x88
MOV RBX,-0x1
JMP 0x0018a2c2
LAB_0018a2f3:
CALL 0x00129220
|
ulong _mi_new(long *param_1,long param_2,int4 param_3)
{
long lVar1;
int4 *puVar2;
ulong uVar3;
long in_FS_OFFSET;
ulong local_30;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *param_1;
uVar3 = *(ulong *)(*(long *)(lVar1 + 0xa0) + (ulong)*(ushort *)(param_2 + 0x18) * 8);
if (uVar3 == 0xffffffffffffffff) {
uVar3 = *(ulong *)(param_1[1] + 0x20);
if (*(long *)(lVar1 + 0x118) - (ulong)*(ushort *)(param_2 + 0xe) <= uVar3) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x88;
uVar3 = 0xffffffffffffffff;
goto LAB_0018a2c2;
}
*(ulong *)(param_1[1] + 0x20) = *(ushort *)(param_2 + 0xe) + uVar3;
}
else {
lVar1 = key_cache_read(*(int8 *)(lVar1 + 0x278),*(int4 *)(lVar1 + 0x350),uVar3,
param_3,&local_30,8,*(int2 *)(param_2 + 0xe),0);
if (lVar1 == 0) {
uVar3 = 0xffffffffffffffff;
}
else {
*(ulong *)(*(long *)(*param_1 + 0xa0) + (ulong)*(ushort *)(param_2 + 0x18) * 8) =
local_30 >> 0x38 | (local_30 & 0xff000000000000) >> 0x28 |
(local_30 & 0xff0000000000) >> 0x18 | (local_30 & 0xff00000000) >> 8 |
(local_30 & 0xff000000) << 8 | (local_30 & 0xff0000) << 0x18 |
(local_30 & 0xff00) << 0x28 | local_30 << 0x38;
}
}
*(byte *)(*param_1 + 0xf0) = *(byte *)(*param_1 + 0xf0) | 0x20;
LAB_0018a2c2:
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return uVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
33,895 | mi_keydef_write | eloqsql/storage/myisam/mi_open.c | uint mi_keydef_write(File file, MI_KEYDEF *keydef)
{
uchar buff[MI_KEYDEF_SIZE];
uchar *ptr=buff;
*ptr++ = (uchar) keydef->keysegs;
*ptr++ = keydef->key_alg; /* Rtree or Btree */
mi_int2store(ptr,keydef->flag); ptr +=2;
mi_int2store(ptr,keydef->block_length); ptr +=2;
mi_int2store(ptr,keydef->keylength); ptr +=2;
mi_int2store(ptr,keydef->minlength); ptr +=2;
mi_int2store(ptr,keydef->maxlength); ptr +=2;
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
} | O3 | c | mi_keydef_write:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movb 0x8(%rsi), %al
movb %al, -0x24(%rbp)
movb 0xc(%rsi), %al
movb %al, -0x23(%rbp)
movzwl 0xa(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x22(%rbp)
movzwl 0xe(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x20(%rbp)
movzwl 0x12(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x1e(%rbp)
movzwl 0x14(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x1c(%rbp)
movzwl 0x16(%rsi), %eax
rolw $0x8, %ax
movl %edi, %ebx
movw %ax, -0x1a(%rbp)
leaq 0x3051a2(%rip), %rax # 0x385010
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x7fec1
leaq -0x24(%rbp), %rsi
movl $0xc, %edx
movl $0x4, %ecx
movl %ebx, %edi
callq 0x2efe4
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %cl
movq %fs:0x28, %rdx
cmpq -0x18(%rbp), %rdx
jne 0x7fedb
movb %cl, %al
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x24(%rbp), %rdx
leaq -0x30(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rcx
callq 0x2e1e7
movq (%r14), %rcx
jmp 0x7fe9f
callq 0x29260
| mi_keydef_write:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_18], rax
mov al, [rsi+8]
mov [rbp+var_24], al
mov al, [rsi+0Ch]
mov [rbp+var_23], al
movzx eax, word ptr [rsi+0Ah]
rol ax, 8
mov [rbp+var_22], ax
movzx eax, word ptr [rsi+0Eh]
rol ax, 8
mov [rbp+var_20], ax
movzx eax, word ptr [rsi+12h]
rol ax, 8
mov [rbp+var_1E], ax
movzx eax, word ptr [rsi+14h]
rol ax, 8
mov [rbp+var_1C], ax
movzx eax, word ptr [rsi+16h]
rol ax, 8
mov ebx, edi
mov [rbp+var_1A], ax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
mov esi, ebx
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_7FEC1
lea rsi, [rbp+var_24]
mov edx, 0Ch
mov ecx, 4
mov edi, ebx
call my_write
mov rcx, rax
loc_7FE9F:
xor eax, eax
test rcx, rcx
setnz cl
mov rdx, fs:28h
cmp rdx, [rbp+var_18]
jnz short loc_7FEDB
mov al, cl
add rsp, 70h
pop rbx
pop r14
pop rbp
retn
loc_7FEC1:
lea rdx, [rbp+var_24]
lea r14, [rbp+var_30]
mov rdi, rax
mov esi, ebx
mov rcx, r14
call mi_keydef_write_cold_1
mov rcx, [r14]
jmp short loc_7FE9F
loc_7FEDB:
call ___stack_chk_fail
| bool mi_keydef_write(unsigned int a1, long long a2)
{
long long v2; // rax
long long v3; // rcx
_BYTE v6[72]; // [rsp+8h] [rbp-78h] BYREF
long long v7; // [rsp+50h] [rbp-30h] BYREF
_BYTE v8[2]; // [rsp+5Ch] [rbp-24h] BYREF
__int16 v9; // [rsp+5Eh] [rbp-22h]
__int16 v10; // [rsp+60h] [rbp-20h]
__int16 v11; // [rsp+62h] [rbp-1Eh]
__int16 v12; // [rsp+64h] [rbp-1Ch]
__int16 v13; // [rsp+66h] [rbp-1Ah]
unsigned long long v14; // [rsp+68h] [rbp-18h]
v14 = __readfsqword(0x28u);
v8[0] = *(_BYTE *)(a2 + 8);
v8[1] = *(_BYTE *)(a2 + 12);
v9 = __ROL2__(*(_WORD *)(a2 + 10), 8);
v10 = __ROL2__(*(_WORD *)(a2 + 14), 8);
v11 = __ROL2__(*(_WORD *)(a2 + 18), 8);
v12 = __ROL2__(*(_WORD *)(a2 + 20), 8);
v13 = __ROL2__(*(_WORD *)(a2 + 22), 8);
v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, a1, 7LL);
if ( v2 )
{
mi_keydef_write_cold_1(v2, a1, (long long)v8, &v7);
v3 = v7;
}
else
{
v3 = my_write(a1, (long long)v8, 12LL, 4LL);
}
return v3 != 0;
}
| mi_keydef_write:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV AL,byte ptr [RSI + 0x8]
MOV byte ptr [RBP + -0x24],AL
MOV AL,byte ptr [RSI + 0xc]
MOV byte ptr [RBP + -0x23],AL
MOVZX EAX,word ptr [RSI + 0xa]
ROL AX,0x8
MOV word ptr [RBP + -0x22],AX
MOVZX EAX,word ptr [RSI + 0xe]
ROL AX,0x8
MOV word ptr [RBP + -0x20],AX
MOVZX EAX,word ptr [RSI + 0x12]
ROL AX,0x8
MOV word ptr [RBP + -0x1e],AX
MOVZX EAX,word ptr [RSI + 0x14]
ROL AX,0x8
MOV word ptr [RBP + -0x1c],AX
MOVZX EAX,word ptr [RSI + 0x16]
ROL AX,0x8
MOV EBX,EDI
MOV word ptr [RBP + -0x1a],AX
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0017fec1
LEA RSI,[RBP + -0x24]
MOV EDX,0xc
MOV ECX,0x4
MOV EDI,EBX
CALL 0x0012efe4
MOV RCX,RAX
LAB_0017fe9f:
XOR EAX,EAX
TEST RCX,RCX
SETNZ CL
MOV RDX,qword ptr FS:[0x28]
CMP RDX,qword ptr [RBP + -0x18]
JNZ 0x0017fedb
MOV AL,CL
ADD RSP,0x70
POP RBX
POP R14
POP RBP
RET
LAB_0017fec1:
LEA RDX,[RBP + -0x24]
LEA R14,[RBP + -0x30]
MOV RDI,RAX
MOV ESI,EBX
MOV RCX,R14
CALL 0x0012e1e7
MOV RCX,qword ptr [R14]
JMP 0x0017fe9f
LAB_0017fedb:
CALL 0x00129260
|
bool mi_keydef_write(int4 param_1,long param_2)
{
long lVar1;
long in_FS_OFFSET;
int1 local_80 [72];
long local_38;
int1 local_2c;
int1 local_2b;
ushort local_2a;
ushort local_28;
ushort local_26;
ushort local_24;
ushort local_22;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_2c = *(int1 *)(param_2 + 8);
local_2b = *(int1 *)(param_2 + 0xc);
local_2a = *(ushort *)(param_2 + 10) << 8 | *(ushort *)(param_2 + 10) >> 8;
local_28 = *(ushort *)(param_2 + 0xe) << 8 | *(ushort *)(param_2 + 0xe) >> 8;
local_26 = *(ushort *)(param_2 + 0x12) << 8 | *(ushort *)(param_2 + 0x12) >> 8;
local_24 = *(ushort *)(param_2 + 0x14) << 8 | *(ushort *)(param_2 + 0x14) >> 8;
local_22 = *(ushort *)(param_2 + 0x16) << 8 | *(ushort *)(param_2 + 0x16) >> 8;
lVar1 = (**(code **)(PSI_server + 0x158))(local_80,param_1,7);
if (lVar1 == 0) {
local_38 = my_write(param_1,&local_2c,0xc,4);
}
else {
mi_keydef_write_cold_1(lVar1,param_1,&local_2c,&local_38);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return local_38 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
33,896 | my_strntoll_8bit | eloqsql/strings/ctype-simple.c | longlong my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *nptr, size_t l, int base,
char **endptr,int *err)
{
int negative;
register ulonglong cutoff;
register uint cutlim;
register ulonglong i;
register const char *s, *e;
const char *save;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for(; s<e && my_isspace(cs,*s); s++);
if (s == e)
{
goto noconv;
}
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
overflow = 0;
i = 0;
for ( ; s != e; s++)
{
register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (ulonglong) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (negative)
{
if (i > (ulonglong) LONGLONG_MIN)
overflow = 1;
}
else if (i > (ulonglong) LONGLONG_MAX)
overflow = 1;
if (overflow)
{
err[0]= ERANGE;
return negative ? LONGLONG_MIN : LONGLONG_MAX;
}
return (negative ? -((longlong) i) : (longlong) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
} | O0 | c | my_strntoll_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rcx
xorl %eax, %eax
cmpq -0x68(%rbp), %rcx
movb %al, -0x76(%rbp)
jae 0x2a7b8
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x60(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x76(%rbp)
movb -0x76(%rbp), %al
testb $0x1, %al
jne 0x2a7c1
jmp 0x2a7d1
jmp 0x2a7c3
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x2a789
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
jne 0x2a7e0
jmp 0x2a9f6
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x2a801
movl $0x1, -0x3c(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x2a82b
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x2a822
movl $0x0, -0x3c(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x2a829
movl $0x0, -0x3c(%rbp)
jmp 0x2a82b
movq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movslq -0x24(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x48(%rbp)
movslq -0x24(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x4c(%rbp)
movl $0x0, -0x74(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
je 0x2a945
movq -0x60(%rbp), %rax
movb (%rax), %al
movb %al, -0x75(%rbp)
movzbl -0x75(%rbp), %eax
cmpl $0x30, %eax
jl 0x2a8a0
movzbl -0x75(%rbp), %eax
cmpl $0x39, %eax
jg 0x2a8a0
movzbl -0x75(%rbp), %eax
subl $0x30, %eax
movb %al, -0x75(%rbp)
jmp 0x2a8e8
movzbl -0x75(%rbp), %eax
cmpl $0x41, %eax
jl 0x2a8c1
movzbl -0x75(%rbp), %eax
cmpl $0x5a, %eax
jg 0x2a8c1
movzbl -0x75(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movb %al, -0x75(%rbp)
jmp 0x2a8e6
movzbl -0x75(%rbp), %eax
cmpl $0x61, %eax
jl 0x2a8e2
movzbl -0x75(%rbp), %eax
cmpl $0x7a, %eax
jg 0x2a8e2
movzbl -0x75(%rbp), %eax
subl $0x61, %eax
addl $0xa, %eax
movb %al, -0x75(%rbp)
jmp 0x2a8e4
jmp 0x2a945
jmp 0x2a8e6
jmp 0x2a8e8
movzbl -0x75(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0x2a8f3
jmp 0x2a945
movq -0x58(%rbp), %rax
cmpq -0x48(%rbp), %rax
ja 0x2a910
movq -0x58(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x2a919
movzbl -0x75(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jbe 0x2a919
movl $0x1, -0x74(%rbp)
jmp 0x2a932
movslq -0x24(%rbp), %rax
imulq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movzbl -0x75(%rbp), %eax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x2a934
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x2a86b
movq -0x60(%rbp), %rax
cmpq -0x70(%rbp), %rax
jne 0x2a954
jmp 0x2a9f6
cmpq $0x0, -0x30(%rbp)
je 0x2a966
movq -0x60(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x0, -0x3c(%rbp)
je 0x2a985
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x58(%rbp)
jbe 0x2a983
movl $0x1, -0x74(%rbp)
jmp 0x2a99e
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x58(%rbp)
jbe 0x2a99c
movl $0x1, -0x74(%rbp)
jmp 0x2a99e
cmpl $0x0, -0x74(%rbp)
je 0x2a9d2
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movl -0x3c(%rbp), %edx
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x2aa1a
cmpl $0x0, -0x3c(%rbp)
je 0x2a9e4
xorl %eax, %eax
subq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x2a9ec
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2aa1a
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x2aa12
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
| my_strntoll_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_68], rax
loc_2A789:
mov rcx, [rbp+var_60]
xor eax, eax
cmp rcx, [rbp+var_68]
mov [rbp+var_76], al
jnb short loc_2A7B8
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_60]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
setnz al
mov [rbp+var_76], al
loc_2A7B8:
mov al, [rbp+var_76]
test al, 1
jnz short loc_2A7C1
jmp short loc_2A7D1
loc_2A7C1:
jmp short $+2
loc_2A7C3:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_2A789
loc_2A7D1:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_68]
jnz short loc_2A7E0
jmp loc_2A9F6
loc_2A7E0:
mov rax, [rbp+var_60]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jnz short loc_2A801
mov [rbp+var_3C], 1
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_2A82B
loc_2A801:
mov rax, [rbp+var_60]
movsx eax, byte ptr [rax]
cmp eax, 2Bh ; '+'
jnz short loc_2A822
mov [rbp+var_3C], 0
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_2A829
loc_2A822:
mov [rbp+var_3C], 0
loc_2A829:
jmp short $+2
loc_2A82B:
mov rax, [rbp+var_60]
mov [rbp+var_70], rax
movsxd rcx, [rbp+var_24]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov [rbp+var_48], rax
movsxd rcx, [rbp+var_24]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_4C], eax
mov [rbp+var_74], 0
mov [rbp+var_58], 0
loc_2A86B:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_68]
jz loc_2A945
mov rax, [rbp+var_60]
mov al, [rax]
mov [rbp+var_75], al
movzx eax, [rbp+var_75]
cmp eax, 30h ; '0'
jl short loc_2A8A0
movzx eax, [rbp+var_75]
cmp eax, 39h ; '9'
jg short loc_2A8A0
movzx eax, [rbp+var_75]
sub eax, 30h ; '0'
mov [rbp+var_75], al
jmp short loc_2A8E8
loc_2A8A0:
movzx eax, [rbp+var_75]
cmp eax, 41h ; 'A'
jl short loc_2A8C1
movzx eax, [rbp+var_75]
cmp eax, 5Ah ; 'Z'
jg short loc_2A8C1
movzx eax, [rbp+var_75]
sub eax, 41h ; 'A'
add eax, 0Ah
mov [rbp+var_75], al
jmp short loc_2A8E6
loc_2A8C1:
movzx eax, [rbp+var_75]
cmp eax, 61h ; 'a'
jl short loc_2A8E2
movzx eax, [rbp+var_75]
cmp eax, 7Ah ; 'z'
jg short loc_2A8E2
movzx eax, [rbp+var_75]
sub eax, 61h ; 'a'
add eax, 0Ah
mov [rbp+var_75], al
jmp short loc_2A8E4
loc_2A8E2:
jmp short loc_2A945
loc_2A8E4:
jmp short $+2
loc_2A8E6:
jmp short $+2
loc_2A8E8:
movzx eax, [rbp+var_75]
cmp eax, [rbp+var_24]
jl short loc_2A8F3
jmp short loc_2A945
loc_2A8F3:
mov rax, [rbp+var_58]
cmp rax, [rbp+var_48]
ja short loc_2A910
mov rax, [rbp+var_58]
cmp rax, [rbp+var_48]
jnz short loc_2A919
movzx eax, [rbp+var_75]
cmp eax, [rbp+var_4C]
jbe short loc_2A919
loc_2A910:
mov [rbp+var_74], 1
jmp short loc_2A932
loc_2A919:
movsxd rax, [rbp+var_24]
imul rax, [rbp+var_58]
mov [rbp+var_58], rax
movzx eax, [rbp+var_75]
add rax, [rbp+var_58]
mov [rbp+var_58], rax
loc_2A932:
jmp short $+2
loc_2A934:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp loc_2A86B
loc_2A945:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_70]
jnz short loc_2A954
jmp loc_2A9F6
loc_2A954:
cmp [rbp+var_30], 0
jz short loc_2A966
mov rcx, [rbp+var_60]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_2A966:
cmp [rbp+var_3C], 0
jz short loc_2A985
mov rax, 8000000000000000h
cmp [rbp+var_58], rax
jbe short loc_2A983
mov [rbp+var_74], 1
loc_2A983:
jmp short loc_2A99E
loc_2A985:
mov rax, 7FFFFFFFFFFFFFFFh
cmp [rbp+var_58], rax
jbe short loc_2A99C
mov [rbp+var_74], 1
loc_2A99C:
jmp short $+2
loc_2A99E:
cmp [rbp+var_74], 0
jz short loc_2A9D2
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov edx, [rbp+var_3C]
mov rax, 7FFFFFFFFFFFFFFFh
mov rcx, 8000000000000000h
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_8], rax
jmp short loc_2AA1A
loc_2A9D2:
cmp [rbp+var_3C], 0
jz short loc_2A9E4
xor eax, eax
sub rax, [rbp+var_58]
mov [rbp+var_80], rax
jmp short loc_2A9EC
loc_2A9E4:
mov rax, [rbp+var_58]
mov [rbp+var_80], rax
loc_2A9EC:
mov rax, [rbp+var_80]
mov [rbp+var_8], rax
jmp short loc_2AA1A
loc_2A9F6:
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
cmp [rbp+var_30], 0
jz short loc_2AA12
mov rcx, [rbp+var_18]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_2AA12:
mov [rbp+var_8], 0
loc_2AA1A:
mov rax, [rbp+var_8]
pop rbp
retn
| unsigned long long my_strntoll_8bit(long long a1, _BYTE *a2, long long a3, int a4, _QWORD *a5, _DWORD *a6)
{
long long v6; // rax
bool v9; // [rsp+Ah] [rbp-76h]
unsigned __int8 v10; // [rsp+Bh] [rbp-75h]
unsigned __int8 v11; // [rsp+Bh] [rbp-75h]
int v12; // [rsp+Ch] [rbp-74h]
_BYTE *v13; // [rsp+10h] [rbp-70h]
_BYTE *v14; // [rsp+18h] [rbp-68h]
_BYTE *v15; // [rsp+20h] [rbp-60h]
unsigned long long v16; // [rsp+28h] [rbp-58h]
unsigned long long v17; // [rsp+38h] [rbp-48h]
int v18; // [rsp+44h] [rbp-3Ch]
*a6 = 0;
v15 = a2;
v14 = &a2[a3];
while ( 1 )
{
v9 = 0;
if ( v15 < v14 )
v9 = (*(_BYTE *)(*(_QWORD *)(a1 + 64) + (unsigned __int8)*v15 + 1LL) & 8) != 0;
if ( !v9 )
break;
++v15;
}
if ( v15 == v14 )
goto LABEL_47;
if ( *v15 == 45 )
{
v18 = 1;
++v15;
}
else
{
v18 = 0;
if ( *v15 == 43 )
++v15;
}
v13 = v15;
v17 = 0xFFFFFFFFFFFFFFFFLL / a4;
v12 = 0;
v16 = 0LL;
while ( v15 != v14 )
{
v10 = *v15;
if ( (unsigned __int8)*v15 < 0x30u || v10 > 0x39u )
{
if ( v10 < 0x41u || v10 > 0x5Au )
{
if ( v10 < 0x61u || v10 > 0x7Au )
break;
v11 = v10 - 97 + 10;
}
else
{
v11 = v10 - 65 + 10;
}
}
else
{
v11 = v10 - 48;
}
if ( v11 >= a4 )
break;
if ( v16 > v17 || v16 == v17 && v11 > (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4) )
v12 = 1;
else
v16 = v16 * a4 + v11;
++v15;
}
if ( v15 == v13 )
{
LABEL_47:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v15;
if ( v18 )
{
if ( v16 > 0x8000000000000000LL )
v12 = 1;
}
else if ( v16 > 0x7FFFFFFFFFFFFFFFLL )
{
v12 = 1;
}
if ( v12 )
{
*a6 = 34;
v6 = 0x7FFFFFFFFFFFFFFFLL;
if ( v18 )
return 0x8000000000000000LL;
return v6;
}
else if ( v18 )
{
return -(long long)v16;
}
else
{
return v16;
}
}
}
| my_strntoll_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x68],RAX
LAB_0012a789:
MOV RCX,qword ptr [RBP + -0x60]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x68]
MOV byte ptr [RBP + -0x76],AL
JNC 0x0012a7b8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x60]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x76],AL
LAB_0012a7b8:
MOV AL,byte ptr [RBP + -0x76]
TEST AL,0x1
JNZ 0x0012a7c1
JMP 0x0012a7d1
LAB_0012a7c1:
JMP 0x0012a7c3
LAB_0012a7c3:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0012a789
LAB_0012a7d1:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x0012a7e0
JMP 0x0012a9f6
LAB_0012a7e0:
MOV RAX,qword ptr [RBP + -0x60]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JNZ 0x0012a801
MOV dword ptr [RBP + -0x3c],0x1
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0012a82b
LAB_0012a801:
MOV RAX,qword ptr [RBP + -0x60]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2b
JNZ 0x0012a822
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0012a829
LAB_0012a822:
MOV dword ptr [RBP + -0x3c],0x0
LAB_0012a829:
JMP 0x0012a82b
LAB_0012a82b:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x70],RAX
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV RAX,-0x1
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x48],RAX
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV RAX,-0x1
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x4c],EAX
MOV dword ptr [RBP + -0x74],0x0
MOV qword ptr [RBP + -0x58],0x0
LAB_0012a86b:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x68]
JZ 0x0012a945
MOV RAX,qword ptr [RBP + -0x60]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x75],AL
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x30
JL 0x0012a8a0
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x39
JG 0x0012a8a0
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x30
MOV byte ptr [RBP + -0x75],AL
JMP 0x0012a8e8
LAB_0012a8a0:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x41
JL 0x0012a8c1
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x5a
JG 0x0012a8c1
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x41
ADD EAX,0xa
MOV byte ptr [RBP + -0x75],AL
JMP 0x0012a8e6
LAB_0012a8c1:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x61
JL 0x0012a8e2
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x7a
JG 0x0012a8e2
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x61
ADD EAX,0xa
MOV byte ptr [RBP + -0x75],AL
JMP 0x0012a8e4
LAB_0012a8e2:
JMP 0x0012a945
LAB_0012a8e4:
JMP 0x0012a8e6
LAB_0012a8e6:
JMP 0x0012a8e8
LAB_0012a8e8:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x0012a8f3
JMP 0x0012a945
LAB_0012a8f3:
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x48]
JA 0x0012a910
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x0012a919
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,dword ptr [RBP + -0x4c]
JBE 0x0012a919
LAB_0012a910:
MOV dword ptr [RBP + -0x74],0x1
JMP 0x0012a932
LAB_0012a919:
MOVSXD RAX,dword ptr [RBP + -0x24]
IMUL RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
MOVZX EAX,byte ptr [RBP + -0x75]
ADD RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
LAB_0012a932:
JMP 0x0012a934
LAB_0012a934:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0012a86b
LAB_0012a945:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x70]
JNZ 0x0012a954
JMP 0x0012a9f6
LAB_0012a954:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0012a966
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_0012a966:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x0012a985
MOV RAX,-0x8000000000000000
CMP qword ptr [RBP + -0x58],RAX
JBE 0x0012a983
MOV dword ptr [RBP + -0x74],0x1
LAB_0012a983:
JMP 0x0012a99e
LAB_0012a985:
MOV RAX,0x7fffffffffffffff
CMP qword ptr [RBP + -0x58],RAX
JBE 0x0012a99c
MOV dword ptr [RBP + -0x74],0x1
LAB_0012a99c:
JMP 0x0012a99e
LAB_0012a99e:
CMP dword ptr [RBP + -0x74],0x0
JZ 0x0012a9d2
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x22
MOV EDX,dword ptr [RBP + -0x3c]
MOV RAX,0x7fffffffffffffff
MOV RCX,-0x8000000000000000
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012aa1a
LAB_0012a9d2:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x0012a9e4
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0012a9ec
LAB_0012a9e4:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x80],RAX
LAB_0012a9ec:
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012aa1a
LAB_0012a9f6:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x21
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0012aa12
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_0012aa12:
MOV qword ptr [RBP + -0x8],0x0
LAB_0012aa1a:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
ulong my_strntoll_8bit(long param_1,byte *param_2,long param_3,int param_4,int8 *param_5,
int4 *param_6)
{
int1 auVar1 [16];
int1 auVar2 [16];
bool bVar3;
byte *pbVar4;
byte *pbVar5;
ulong uVar6;
bool bVar7;
ulong local_88;
byte local_7d;
byte *local_68;
ulong local_60;
*param_6 = 0;
pbVar5 = param_2 + param_3;
local_68 = param_2;
while( true ) {
bVar7 = false;
if (local_68 < pbVar5) {
bVar7 = (*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_68) & 8) != 0;
}
if (!bVar7) break;
local_68 = local_68 + 1;
}
if (local_68 != pbVar5) {
if (*local_68 == 0x2d) {
bVar7 = true;
local_68 = local_68 + 1;
}
else {
if (*local_68 == 0x2b) {
local_68 = local_68 + 1;
}
bVar7 = false;
}
pbVar4 = local_68;
auVar1._8_8_ = 0;
auVar1._0_8_ = (long)param_4;
uVar6 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar1,0);
auVar2._8_8_ = 0;
auVar2._0_8_ = (long)param_4;
bVar3 = false;
local_60 = 0;
for (; local_68 != pbVar5; local_68 = local_68 + 1) {
local_7d = *local_68;
if ((local_7d < 0x30) || (0x39 < local_7d)) {
if ((local_7d < 0x41) || (0x5a < local_7d)) {
if ((local_7d < 0x61) || (0x7a < local_7d)) break;
local_7d = local_7d + 0xa9;
}
else {
local_7d = local_7d - 0x37;
}
}
else {
local_7d = local_7d - 0x30;
}
if (param_4 <= (int)(uint)local_7d) break;
if ((uVar6 < local_60) ||
((local_60 == uVar6 &&
(SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar2,0) < (uint)local_7d)))
) {
bVar3 = true;
}
else {
local_60 = (ulong)local_7d + (long)param_4 * local_60;
}
}
if (local_68 != pbVar4) {
if (param_5 != (int8 *)0x0) {
*param_5 = local_68;
}
if (bVar7) {
if (0x8000000000000000 < local_60) {
bVar3 = true;
}
}
else if (0x7fffffffffffffff < local_60) {
bVar3 = true;
}
if (bVar3) {
*param_6 = 0x22;
if (!bVar7) {
return 0x7fffffffffffffff;
}
return 0x8000000000000000;
}
if (bVar7) {
local_88 = -local_60;
}
else {
local_88 = local_60;
}
return local_88;
}
}
*param_6 = 0x21;
if (param_5 != (int8 *)0x0) {
*param_5 = param_2;
}
return 0;
}
| |
33,897 | nglog::ErrnoLogMessage::~ErrnoLogMessage() | ng-log[P]ng-log/src/logging.cc | ErrnoLogMessage::~ErrnoLogMessage() {
// Don't access errno directly because it may have been altered
// while streaming the message.
stream() << ": " << StrError(preserved_errno()) << " [" << preserved_errno()
<< "]";
} | O1 | cpp | nglog::ErrnoLogMessage::~ErrnoLogMessage():
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl $0x7538, %r14d # imm = 0x7538
addq 0x8(%rdi), %r14
leaq 0x17935(%rip), %rsi # 0x23cfc
movl $0x2, %edx
movq %r14, %rdi
callq 0x7600
movq 0x8(%rbx), %rax
movl (%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0xc497
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x7600
movq %rax, %r14
leaq 0x175f5(%rip), %rsi # 0x239f5
movl $0x2, %edx
movq %rax, %rdi
callq 0x7600
movq 0x8(%rbx), %rax
movl (%rax), %esi
movq %r14, %rdi
callq 0x7990
leaq 0x178f3(%rip), %rsi # 0x23d15
movl $0x1, %edx
movq %rax, %rdi
callq 0x7600
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc44a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x906c
movq %rbx, %rdi
callq 0xbb88
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0xc45c
movq %rax, %r14
jmp 0xc47f
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc47f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x906c
movq %rbx, %rdi
callq 0xbb88
movq %r14, %rdi
callq 0x79b0
movq %rax, %rdi
callq 0x98b5
| _ZN5nglog15ErrnoLogMessageD2Ev:
push r14; Alternative name is 'nglog::ErrnoLogMessage::~ErrnoLogMessage()'
push rbx
sub rsp, 28h
mov rbx, rdi
mov r14d, 7538h
add r14, [rdi+8]
lea rsi, aRunningDuratio+1Ah; ": "
mov edx, 2
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx+8]
mov esi, [rax]
lea rdi, [rsp+38h+var_30]
call _ZN5nglog8StrErrorB5cxx11Ei; nglog::StrError(int)
mov rsi, [rsp+38h+var_30]
mov rdx, [rsp+38h+var_28]
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r14, rax
lea rsi, asc_239F5; " ["
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)
mov rax, [rbx+8]
mov esi, [rax]
mov rdi, r14
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, aLogLineFormatI+16h; "]"
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)
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C44A
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_C44A:
mov rdi, rbx; this
call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage()
add rsp, 28h
pop rbx
pop r14
retn
jmp short $+2
loc_C45C:
mov r14, rax
jmp short loc_C47F
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C47F
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_C47F:
mov rdi, rbx; this
call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage()
mov rdi, r14
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| void nglog::ErrnoLogMessage::~ErrnoLogMessage(nglog::ErrnoLogMessage *this)
{
long long v1; // r14
long long v2; // r14
long long v3; // rax
void *v4[2]; // [rsp+8h] [rbp-30h] BYREF
long long v5; // [rsp+18h] [rbp-20h] BYREF
v1 = *((_QWORD *)this + 1) + 30008LL;
std::__ostream_insert<char,std::char_traits<char>>(v1, ": ", 2LL);
nglog::StrError[abi:cxx11](v4, **((unsigned int **)this + 1));
v2 = std::__ostream_insert<char,std::char_traits<char>>(v1, v4[0], v4[1]);
std::__ostream_insert<char,std::char_traits<char>>(v2, " [", 2LL);
v3 = std::ostream::operator<<(v2, **((unsigned int **)this + 1));
std::__ostream_insert<char,std::char_traits<char>>(v3, "]", 1LL);
if ( v4[0] != &v5 )
operator delete(v4[0]);
nglog::LogMessage::~LogMessage(this);
}
| ~ErrnoLogMessage:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV R14D,0x7538
ADD R14,qword ptr [RDI + 0x8]
LAB_0010c3c0:
LEA RSI,[0x123cfc]
MOV EDX,0x2
MOV RDI,R14
CALL 0x00107600
MOV RAX,qword ptr [RBX + 0x8]
MOV ESI,dword ptr [RAX]
LAB_0010c3da:
LEA RDI,[RSP + 0x8]
CALL 0x0010c497
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0010c3ee:
MOV RDI,R14
CALL 0x00107600
MOV R14,RAX
LEA RSI,[0x1239f5]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00107600
MOV RAX,qword ptr [RBX + 0x8]
MOV ESI,dword ptr [RAX]
MOV RDI,R14
CALL 0x00107990
LEA RSI,[0x123d15]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00107600
LAB_0010c42f:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0010c44a
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0010906c
LAB_0010c44a:
MOV RDI,RBX
CALL 0x0010bb88
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* nglog::ErrnoLogMessage::~ErrnoLogMessage() */
void __thiscall nglog::ErrnoLogMessage::~ErrnoLogMessage(ErrnoLogMessage *this)
{
long lVar1;
ostream *poVar2;
long *local_30;
long local_28;
long local_20 [2];
lVar1 = *(long *)(this + 8);
/* try { // try from 0010c3c0 to 0010c3d3 has its CatchHandler @ 0010c45c */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)(lVar1 + 0x7538),": ",2);
/* try { // try from 0010c3da to 0010c3e3 has its CatchHandler @ 0010c45a */
StrError_abi_cxx11_((nglog *)&local_30,**(int **)(this + 8));
/* try { // try from 0010c3ee to 0010c42e has its CatchHandler @ 0010c461 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(lVar1 + 0x7538),(char *)local_30,local_28);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," [",2);
poVar2 = (ostream *)std::ostream::operator<<(poVar2,**(int **)(this + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"]",1);
if (local_30 != local_20) {
operator_delete(local_30,local_20[0] + 1);
}
LogMessage::~LogMessage((LogMessage *)this);
return;
}
| |
33,898 | ft_add_word | eloqsql/storage/myisam/ft_parser.c | static int ft_add_word(MYSQL_FTPARSER_PARAM *param,
const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
{
TREE *wtree;
FT_WORD w;
MY_FT_PARSER_PARAM *ft_param=param->mysql_ftparam;
DBUG_ENTER("ft_add_word");
wtree= ft_param->wtree;
if (param->flags & MYSQL_FTFLAGS_NEED_COPY)
{
uchar *ptr;
DBUG_ASSERT(wtree->with_delete == 0);
ptr= (uchar *)alloc_root(ft_param->mem_root, word_len);
memcpy(ptr, word, word_len);
w.pos= ptr;
}
else
w.pos= (uchar*) word;
w.len= word_len;
if (!tree_insert(wtree, &w, 0, wtree->custom_arg))
{
delete_tree(wtree, 0);
DBUG_RETURN(1);
}
DBUG_RETURN(0);
} | O0 | c | ft_add_word:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x34(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x62621
jmp 0x625ef
jmp 0x625f1
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x7b8f0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x28290
movq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x62629
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x230(%rax), %rcx
leaq -0x48(%rbp), %rsi
xorl %edx, %edx
callq 0x87390
cmpq $0x0, %rax
jne 0x62665
movq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0x871c0
movl $0x1, -0x4(%rbp)
jmp 0x6266e
jmp 0x62667
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| ft_add_word:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov eax, [rax+34h]
and eax, 1
cmp eax, 0
jz short loc_62621
jmp short $+2
loc_625EF:
jmp short $+2
loc_625F1:
mov rax, [rbp+var_50]
mov rdi, [rax+8]
movsxd rsi, [rbp+var_1C]
call alloc_root
mov [rbp+var_58], rax
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_18]
movsxd rdx, [rbp+var_1C]
call _memcpy
mov rax, [rbp+var_58]
mov [rbp+var_48], rax
jmp short loc_62629
loc_62621:
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
loc_62629:
movsxd rax, [rbp+var_1C]
mov [rbp+var_38], rax
mov rdi, [rbp+var_30]
mov rax, [rbp+var_30]
mov rcx, [rax+230h]
lea rsi, [rbp+var_48]
xor edx, edx
call tree_insert
cmp rax, 0
jnz short loc_62665
mov rdi, [rbp+var_30]
xor esi, esi
call delete_tree
mov [rbp+var_4], 1
jmp short loc_6266E
loc_62665:
jmp short $+2
loc_62667:
mov [rbp+var_4], 0
loc_6266E:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long ft_add_word(long long a1, long long a2, int a3, long long a4)
{
long long v5; // [rsp+8h] [rbp-58h]
long long *v6; // [rsp+10h] [rbp-50h]
_QWORD v7[3]; // [rsp+18h] [rbp-48h] BYREF
long long v8; // [rsp+30h] [rbp-30h]
long long v9; // [rsp+38h] [rbp-28h]
int v10; // [rsp+44h] [rbp-1Ch]
long long v11; // [rsp+48h] [rbp-18h]
long long v12; // [rsp+50h] [rbp-10h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = a4;
v6 = *(long long **)(a1 + 24);
v8 = *v6;
if ( (*(_DWORD *)(a1 + 52) & 1) != 0 )
{
v5 = alloc_root(v6[1], v10);
memcpy(v5, v11, v10);
v7[0] = v5;
}
else
{
v7[0] = v11;
}
v7[2] = v10;
if ( tree_insert(v8, v7, 0LL, *(_QWORD *)(v8 + 560)) )
{
return 0;
}
else
{
delete_tree(v8, 0LL);
return 1;
}
}
| ft_add_word:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x34]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00162621
JMP 0x001625ef
LAB_001625ef:
JMP 0x001625f1
LAB_001625f1:
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x8]
MOVSXD RSI,dword ptr [RBP + -0x1c]
CALL 0x0017b8f0
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x18]
MOVSXD RDX,dword ptr [RBP + -0x1c]
CALL 0x00128290
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00162629
LAB_00162621:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
LAB_00162629:
MOVSXD RAX,dword ptr [RBP + -0x1c]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX + 0x230]
LEA RSI,[RBP + -0x48]
XOR EDX,EDX
CALL 0x00187390
CMP RAX,0x0
JNZ 0x00162665
MOV RDI,qword ptr [RBP + -0x30]
XOR ESI,ESI
CALL 0x001871c0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0016266e
LAB_00162665:
JMP 0x00162667
LAB_00162667:
MOV dword ptr [RBP + -0x4],0x0
LAB_0016266e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
bool ft_add_word(long param_1,void *param_2,int param_3,int8 param_4)
{
void *__dest;
long lVar1;
void *local_50 [2];
long local_40;
long local_38;
int8 local_30;
int local_24;
void *local_20;
long local_18;
local_38 = **(long **)(param_1 + 0x18);
local_50[0] = param_2;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((*(uint *)(param_1 + 0x34) & 1) != 0) {
__dest = (void *)alloc_root((*(long **)(param_1 + 0x18))[1],(long)param_3);
memcpy(__dest,local_20,(long)local_24);
local_50[0] = __dest;
}
local_40 = (long)local_24;
lVar1 = tree_insert(local_38,local_50,0,*(int8 *)(local_38 + 0x230));
if (lVar1 == 0) {
delete_tree(local_38,0);
}
return lVar1 == 0;
}
| |
33,899 | my_strxfrm_flag_normalize | eloqsql/strings/ctype-simple.c | uint my_strxfrm_flag_normalize(uint flags, uint maximum)
{
DBUG_ASSERT(maximum >= 1 && maximum <= MY_STRXFRM_NLEVELS);
/* If levels are omitted, then 1-maximum is assumed*/
if (!(flags & MY_STRXFRM_LEVEL_ALL))
{
static uint def_level_flags[]= {0, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F };
uint flag_pad= flags &
(MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN);
flags= def_level_flags[maximum] | flag_pad;
}
else
{
uint i;
uint flag_lev= flags & MY_STRXFRM_LEVEL_ALL;
uint flag_dsc= (flags >> MY_STRXFRM_DESC_SHIFT) & MY_STRXFRM_LEVEL_ALL;
uint flag_rev= (flags >> MY_STRXFRM_REVERSE_SHIFT) & MY_STRXFRM_LEVEL_ALL;
uint flag_pad= flags &
(MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN);
/*
If any level number is greater than the maximum,
it is treated as the maximum.
*/
for (maximum--, flags= 0, i= 0; i < MY_STRXFRM_NLEVELS; i++)
{
uint src_bit= 1 << i;
if (flag_lev & src_bit)
{
uint dst_bit= 1 << MY_MIN(i, maximum);
flags|= dst_bit;
flags|= (flag_dsc & dst_bit) << MY_STRXFRM_DESC_SHIFT;
flags|= (flag_rev & dst_bit) << MY_STRXFRM_REVERSE_SHIFT;
}
}
flags|= flag_pad;
}
return flags;
} | O0 | c | my_strxfrm_flag_normalize:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
jmp 0x4612c
movl -0x4(%rbp), %eax
andl $0x3f, %eax
cmpl $0x0, %eax
jne 0x4615c
movl -0x4(%rbp), %eax
andl $0xc0, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x22eb82(%rip), %rax # 0x274cd0
movl (%rax,%rcx,4), %eax
orl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4621d
movl -0x4(%rbp), %eax
andl $0x3f, %eax
movl %eax, -0x14(%rbp)
movl -0x4(%rbp), %eax
shrl $0x8, %eax
andl $0x3f, %eax
movl %eax, -0x18(%rbp)
movl -0x4(%rbp), %eax
shrl $0x10, %eax
andl $0x3f, %eax
movl %eax, -0x1c(%rbp)
movl -0x4(%rbp), %eax
andl $0xc0, %eax
movl %eax, -0x20(%rbp)
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
movl $0x0, -0x4(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x6, -0x10(%rbp)
jae 0x46214
movl -0x10(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %eax
andl -0x24(%rbp), %eax
cmpl $0x0, %eax
je 0x46207
movl -0x10(%rbp), %eax
cmpl -0x8(%rbp), %eax
jae 0x461cd
movl -0x10(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x461d3
movl -0x8(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x18(%rbp), %eax
andl -0x28(%rbp), %eax
shll $0x8, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x1c(%rbp), %eax
andl -0x28(%rbp), %eax
shll $0x10, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x46209
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x4619f
movl -0x20(%rbp), %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strxfrm_flag_normalize:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
jmp short $+2
loc_4612C:
mov eax, [rbp+var_4]
and eax, 3Fh
cmp eax, 0
jnz short loc_4615C
mov eax, [rbp+var_4]
and eax, 0C0h
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
mov ecx, eax
lea rax, my_strxfrm_flag_normalize_def_level_flags
mov eax, [rax+rcx*4]
or eax, [rbp+var_C]
mov [rbp+var_4], eax
jmp loc_4621D
loc_4615C:
mov eax, [rbp+var_4]
and eax, 3Fh
mov [rbp+var_14], eax
mov eax, [rbp+var_4]
shr eax, 8
and eax, 3Fh
mov [rbp+var_18], eax
mov eax, [rbp+var_4]
shr eax, 10h
and eax, 3Fh
mov [rbp+var_1C], eax
mov eax, [rbp+var_4]
and eax, 0C0h
mov [rbp+var_20], eax
mov eax, [rbp+var_8]
add eax, 0FFFFFFFFh
mov [rbp+var_8], eax
mov [rbp+var_4], 0
mov [rbp+var_10], 0
loc_4619F:
cmp [rbp+var_10], 6
jnb short loc_46214
mov ecx, [rbp+var_10]
mov eax, 1
shl eax, cl
mov [rbp+var_24], eax
mov eax, [rbp+var_14]
and eax, [rbp+var_24]
cmp eax, 0
jz short loc_46207
mov eax, [rbp+var_10]
cmp eax, [rbp+var_8]
jnb short loc_461CD
mov eax, [rbp+var_10]
mov [rbp+var_2C], eax
jmp short loc_461D3
loc_461CD:
mov eax, [rbp+var_8]
mov [rbp+var_2C], eax
loc_461D3:
mov ecx, [rbp+var_2C]
mov eax, 1
shl eax, cl
mov [rbp+var_28], eax
mov eax, [rbp+var_28]
or eax, [rbp+var_4]
mov [rbp+var_4], eax
mov eax, [rbp+var_18]
and eax, [rbp+var_28]
shl eax, 8
or eax, [rbp+var_4]
mov [rbp+var_4], eax
mov eax, [rbp+var_1C]
and eax, [rbp+var_28]
shl eax, 10h
or eax, [rbp+var_4]
mov [rbp+var_4], eax
loc_46207:
jmp short $+2
loc_46209:
mov eax, [rbp+var_10]
add eax, 1
mov [rbp+var_10], eax
jmp short loc_4619F
loc_46214:
mov eax, [rbp+var_20]
or eax, [rbp+var_4]
mov [rbp+var_4], eax
loc_4621D:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_strxfrm_flag_normalize(unsigned int a1, int a2)
{
char v3; // [rsp+0h] [rbp-2Ch]
unsigned int i; // [rsp+1Ch] [rbp-10h]
int v6; // [rsp+28h] [rbp-4h]
if ( (a1 & 0x3F) != 0 )
{
v6 = 0;
for ( i = 0; i < 6; ++i )
{
if ( ((1 << i) & a1 & 0x3F) != 0 )
{
if ( i >= a2 - 1 )
v3 = a2 - 1;
else
v3 = i;
v6 |= (1 << v3) | (((1 << v3) & (a1 >> 8) & 0x3F) << 8) | (((1 << v3) & HIWORD(a1) & 0x3F) << 16);
}
}
return v6 | a1 & 0xC0;
}
else
{
return a1 & 0xC0 | my_strxfrm_flag_normalize_def_level_flags[a2];
}
}
| my_strxfrm_flag_normalize:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
JMP 0x0014612c
LAB_0014612c:
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0x3f
CMP EAX,0x0
JNZ 0x0014615c
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0xc0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
MOV ECX,EAX
LEA RAX,[0x374cd0]
MOV EAX,dword ptr [RAX + RCX*0x4]
OR EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0014621d
LAB_0014615c:
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0x3f
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x4]
SHR EAX,0x8
AND EAX,0x3f
MOV dword ptr [RBP + -0x18],EAX
MOV EAX,dword ptr [RBP + -0x4]
SHR EAX,0x10
AND EAX,0x3f
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0xc0
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x8],EAX
MOV dword ptr [RBP + -0x4],0x0
MOV dword ptr [RBP + -0x10],0x0
LAB_0014619f:
CMP dword ptr [RBP + -0x10],0x6
JNC 0x00146214
MOV ECX,dword ptr [RBP + -0x10]
MOV EAX,0x1
SHL EAX,CL
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,dword ptr [RBP + -0x24]
CMP EAX,0x0
JZ 0x00146207
MOV EAX,dword ptr [RBP + -0x10]
CMP EAX,dword ptr [RBP + -0x8]
JNC 0x001461cd
MOV EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001461d3
LAB_001461cd:
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x2c],EAX
LAB_001461d3:
MOV ECX,dword ptr [RBP + -0x2c]
MOV EAX,0x1
SHL EAX,CL
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [RBP + -0x28]
OR EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,dword ptr [RBP + -0x28]
SHL EAX,0x8
OR EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,dword ptr [RBP + -0x28]
SHL EAX,0x10
OR EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
LAB_00146207:
JMP 0x00146209
LAB_00146209:
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,0x1
MOV dword ptr [RBP + -0x10],EAX
JMP 0x0014619f
LAB_00146214:
MOV EAX,dword ptr [RBP + -0x20]
OR EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
LAB_0014621d:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint my_strxfrm_flag_normalize(uint param_1,uint param_2)
{
uint uVar1;
uint local_34;
uint local_18;
uint local_c;
if ((param_1 & 0x3f) == 0) {
local_c = *(uint *)(my_strxfrm_flag_normalize_def_level_flags + (ulong)param_2 * 4) |
param_1 & 0xc0;
}
else {
local_c = 0;
for (local_18 = 0; local_18 < 6; local_18 = local_18 + 1) {
if ((param_1 & 0x3f & 1 << ((byte)local_18 & 0x1f)) != 0) {
local_34 = param_2 - 1;
if (local_18 < param_2 - 1) {
local_34 = local_18;
}
uVar1 = 1 << ((byte)local_34 & 0x1f);
local_c = (param_1 >> 0x10 & 0x3f & uVar1) << 0x10 |
(param_1 >> 8 & 0x3f & uVar1) << 8 | uVar1 | local_c;
}
}
local_c = param_1 & 0xc0 | local_c;
}
return local_c;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
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++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
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.