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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
35,900 | my_wildcmp_mb_impl | eloqsql/strings/ctype-mb.c | static
int my_wildcmp_mb_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (*wildstr != w_many && *wildstr != w_one)
{
int l;
if (*wildstr == escape && wildstr+1 != wildend)
wildstr++;
if ((l = my_ismbchar(cs, wildstr, wildend)))
{
if (str+l > str_end || memcmp(str, wildstr, l) != 0)
return 1;
str += l;
wildstr += l;
}
else
if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++))
return(1); /* No match */
if (wildstr == wildend)
return (str != str_end); /* Match if both are at end */
result=1; /* Found an anchor char */
}
if (*wildstr == w_one)
{
do
{
if (str == str_end) /* Skip one char if possible */
return (result);
INC_PTR(cs,str,str_end);
} while (++wildstr < wildend && *wildstr == w_one);
if (wildstr == wildend)
break;
}
if (*wildstr == w_many)
{ /* Found w_many */
uchar cmp;
const char* mb = wildstr;
int mb_len=0;
wildstr++;
/* Remove any '%' and '_' from the wild search string */
for (; wildstr != wildend ; wildstr++)
{
if (*wildstr == w_many)
continue;
if (*wildstr == w_one)
{
if (str == str_end)
return (-1);
INC_PTR(cs,str,str_end);
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return(0); /* Ok if w_many is last */
if (str == str_end)
return -1;
if ((cmp= *wildstr) == escape && wildstr+1 != wildend)
cmp= *++wildstr;
mb=wildstr;
mb_len= my_ismbchar(cs, wildstr, wildend);
INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */
cmp=likeconv(cs,cmp);
do
{
for (;;)
{
if (str >= str_end)
return -1;
if (mb_len)
{
if (str+mb_len <= str_end && memcmp(str, mb, mb_len) == 0)
{
str += mb_len;
break;
}
}
else if (!my_ismbchar(cs, str, str_end) &&
likeconv(cs,*str) == cmp)
{
str++;
break;
}
INC_PTR(cs,str, str_end);
}
{
int tmp=my_wildcmp_mb_impl(cs,str,str_end,wildstr,wildend,escape,w_one,
w_many, recurse_level + 1);
if (tmp <= 0)
return (tmp);
}
} while (str != str_end);
return(-1);
}
}
return (str != str_end ? 1 : 0);
} | O3 | c | my_wildcmp_mb_impl:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, -0x44(%rbp)
movq %r8, -0x40(%rbp)
movq %rcx, %r15
movq %rdx, -0x58(%rbp)
movq %rsi, %r12
movq %rdi, -0x38(%rbp)
movl 0x20(%rbp), %eax
movq %rax, -0x68(%rbp)
leaq 0xb556c4(%rip), %rax # 0xc08998
movq (%rax), %rax
testq %rax, %rax
je 0xb32ef
movl 0x20(%rbp), %edi
callq *%rax
movl $0x1, %r14d
testl %eax, %eax
jne 0xb348a
movl 0x10(%rbp), %edi
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
cmpq -0x40(%rbp), %r15
je 0xb347c
movb (%r15), %al
movsbl %al, %ecx
movl 0x18(%rbp), %edx
cmpl %edx, %ecx
sete %sil
cmpl %edi, %ecx
sete %dl
orb %dl, %sil
movq -0x58(%rbp), %r13
je 0xb33b8
testb %dl, %dl
je 0xb33a5
incq %r15
movq %r15, %rax
movq -0x38(%rbp), %rbx
cmpq %r13, %r12
je 0xb348a
movq %rax, %r15
movq 0xb8(%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jl 0xb3380
movq 0xb8(%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
movl $0x0, %ecx
cmovll %ecx, %eax
addq %rax, %r12
cmpq -0x40(%rbp), %r15
movl 0x10(%rbp), %edi
jae 0xb3398
movsbl (%r15), %ecx
leaq 0x1(%r15), %rax
cmpl %edi, %ecx
je 0xb3331
cmpq -0x40(%rbp), %r15
je 0xb3480
movb (%r15), %al
movsbl %al, %eax
movl 0x18(%rbp), %ecx
cmpl %ecx, %eax
jne 0xb32f8
jmp 0xb349c
leaq 0x1(%r15), %rbx
movq -0x40(%rbp), %rdx
cmpq %rdx, %rbx
cmoveq %r15, %rbx
cmpl -0x44(%rbp), %ecx
cmovneq %r15, %rbx
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
callq *0xc0(%rax)
cmpl $0x2, %eax
jge 0xb341c
movl $0x1, %r14d
cmpq %r13, %r12
je 0xb348a
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movzbl (%rbx), %ecx
movb (%rax,%rcx), %cl
movzbl (%r12), %edx
cmpb (%rax,%rdx), %cl
movl 0x10(%rbp), %edi
jne 0xb348a
incq %rbx
incq %r12
movq %rbx, %r15
jmp 0xb344f
movl %eax, %r15d
movq %r13, %rax
leaq (%r12,%r15), %r13
movl $0x1, %r14d
cmpq %rax, %r13
ja 0xb348a
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x29560
testl %eax, %eax
movl 0x10(%rbp), %edi
jne 0xb348a
addq %r15, %rbx
movq %rbx, %r15
movq %r13, %r12
cmpq -0x40(%rbp), %r15
movq -0x58(%rbp), %r13
je 0xb3480
movb (%r15), %al
movsbl %al, %ecx
cmpl %edi, %ecx
sete %dl
movl 0x18(%rbp), %esi
cmpl %esi, %ecx
je 0xb3323
cmpl %edi, %ecx
jne 0xb33b8
jmp 0xb3323
movq -0x58(%rbp), %r13
xorl %r14d, %r14d
cmpq %r13, %r12
setne %r14b
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1(%r15), %rax
cmpq -0x40(%rbp), %rax
je 0xb352c
addq $0x2, %r15
xorl %r13d, %r13d
xorl %r14d, %r14d
movb -0x1(%r15), %bl
movsbl %bl, %eax
movl 0x18(%rbp), %ecx
cmpl %ecx, %eax
je 0xb351a
cmpl %edi, %eax
jne 0xb3534
movq -0x58(%rbp), %rbx
cmpq %rbx, %r12
je 0xb36fe
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %r12, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jl 0xb3514
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %r12, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
cmovll %r13d, %eax
addq %rax, %r12
movl 0x10(%rbp), %edi
leaq 0x1(%r15), %rax
cmpq -0x40(%rbp), %r15
movq %rax, %r15
jne 0xb34b4
jmp 0xb348a
xorl %r14d, %r14d
jmp 0xb348a
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movq -0x58(%rbp), %r13
cmpq %r13, %r12
je 0xb348a
movzbl %bl, %eax
leaq -0x1(%r15), %rcx
movq %rcx, -0x50(%rbp)
cmpl -0x44(%rbp), %eax
jne 0xb3564
cmpq -0x40(%rbp), %r15
je 0xb3564
movb (%r15), %bl
movq %r15, -0x50(%rbp)
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq *0xc0(%rax)
xorl %ecx, %ecx
cmpl $0x2, %eax
movl %eax, %r15d
cmovll %ecx, %eax
movl %eax, -0x60(%rbp)
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq *0xc0(%rax)
movl $0x1, %ecx
cmpl $0x2, %eax
jl 0xb35d4
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq *0xc0(%rax)
movl %eax, %ecx
cmpl $0x2, %eax
movl $0x0, %eax
cmovll %eax, %ecx
addq -0x50(%rbp), %rcx
movq %rcx, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movzbl %bl, %ecx
movb (%rax,%rcx), %al
movb %al, -0x29(%rbp)
movl -0x60(%rbp), %eax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
incl %eax
movq %rax, -0x68(%rbp)
cmpq %r13, %r12
jae 0xb348a
movq %r12, %rbx
cmpl $0x2, %r15d
jge 0xb3641
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x1, %eax
jg 0xb3662
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movzbl (%rbx), %ecx
movb -0x29(%rbp), %dl
cmpb %dl, (%rax,%rcx)
jne 0xb3662
jmp 0xb36b8
movq -0x60(%rbp), %rax
leaq (%rbx,%rax), %r12
cmpq %r13, %r12
ja 0xb3662
movq %rbx, %rdi
movq -0x50(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x29560
testl %eax, %eax
je 0xb36be
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jl 0xb36a7
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
movl $0x0, %ecx
cmovll %ecx, %eax
addq %rax, %rbx
cmpq %r13, %rbx
jb 0xb360a
jmp 0xb348a
incq %rbx
movq %rbx, %r12
subq $0x8, %rsp
movq -0x38(%rbp), %rdi
movq %r12, %rsi
movq %r13, %rdx
movq -0x70(%rbp), %rcx
movq -0x40(%rbp), %r8
movl -0x44(%rbp), %r9d
pushq -0x68(%rbp)
movl 0x18(%rbp), %eax
pushq %rax
movl 0x10(%rbp), %eax
pushq %rax
callq 0xb329f
addq $0x20, %rsp
testl %eax, %eax
jle 0xb3709
cmpq %r13, %r12
jne 0xb35fe
jmp 0xb348a
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0xb348a
movl %eax, %r14d
jmp 0xb348a
| my_wildcmp_mb_impl:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_44], r9d
mov [rbp+var_40], r8
mov r15, rcx
mov [rbp+var_58], rdx
mov r12, rsi
mov [rbp+var_38], rdi
mov eax, [rbp+arg_10]
mov [rbp+var_68], rax
lea rax, my_string_stack_guard
mov rax, [rax]
test rax, rax
jz short loc_B32EF
mov edi, [rbp+arg_10]
call rax
mov r14d, 1
test eax, eax
jnz loc_B348A
loc_B32EF:
mov edi, [rbp+arg_0]
mov r14d, 0FFFFFFFFh
loc_B32F8:
cmp r15, [rbp+var_40]
jz loc_B347C
mov al, [r15]
movsx ecx, al
mov edx, [rbp+arg_8]
cmp ecx, edx
setz sil
cmp ecx, edi
setz dl
or sil, dl
mov r13, [rbp+var_58]
jz loc_B33B8
loc_B3323:
test dl, dl
jz short loc_B33A5
inc r15
mov rax, r15
mov rbx, [rbp+var_38]
loc_B3331:
cmp r12, r13
jz loc_B348A
mov r15, rax
mov rax, [rbx+0B8h]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call qword ptr [rax+0C0h]
mov ecx, eax
mov eax, 1
cmp ecx, 2
jl short loc_B3380
mov rax, [rbx+0B8h]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 2
mov ecx, 0
cmovl eax, ecx
loc_B3380:
add r12, rax
cmp r15, [rbp+var_40]
mov edi, [rbp+arg_0]
jnb short loc_B3398
movsx ecx, byte ptr [r15]
lea rax, [r15+1]
cmp ecx, edi
jz short loc_B3331
loc_B3398:
cmp r15, [rbp+var_40]
jz loc_B3480
mov al, [r15]
loc_B33A5:
movsx eax, al
mov ecx, [rbp+arg_8]
cmp eax, ecx
jnz loc_B32F8
jmp loc_B349C
loc_B33B8:
lea rbx, [r15+1]
mov rdx, [rbp+var_40]
cmp rbx, rdx
cmovz rbx, r15
cmp ecx, [rbp+var_44]
cmovnz rbx, r15
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
call qword ptr [rax+0C0h]
cmp eax, 2
jge short loc_B341C
mov r14d, 1
cmp r12, r13
jz loc_B348A
mov rax, [rbp+var_38]
mov rax, [rax+58h]
movzx ecx, byte ptr [rbx]
mov cl, [rax+rcx]
movzx edx, byte ptr [r12]
cmp cl, [rax+rdx]
mov edi, [rbp+arg_0]
jnz short loc_B348A
inc rbx
inc r12
mov r15, rbx
jmp short loc_B344F
loc_B341C:
mov r15d, eax
mov rax, r13
lea r13, [r12+r15]
mov r14d, 1
cmp r13, rax
ja short loc_B348A
mov rdi, r12
mov rsi, rbx
mov rdx, r15
call _bcmp
test eax, eax
mov edi, [rbp+arg_0]
jnz short loc_B348A
add rbx, r15
mov r15, rbx
mov r12, r13
loc_B344F:
cmp r15, [rbp+var_40]
mov r13, [rbp+var_58]
jz short loc_B3480
mov al, [r15]
movsx ecx, al
cmp ecx, edi
setz dl
mov esi, [rbp+arg_8]
cmp ecx, esi
jz loc_B3323
cmp ecx, edi
jnz loc_B33B8
jmp loc_B3323
loc_B347C:
mov r13, [rbp+var_58]
loc_B3480:
xor r14d, r14d
cmp r12, r13
setnz r14b
loc_B348A:
mov eax, r14d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B349C:
lea rax, [r15+1]
cmp rax, [rbp+var_40]
jz loc_B352C
add r15, 2
xor r13d, r13d
xor r14d, r14d
loc_B34B4:
mov bl, [r15-1]
movsx eax, bl
mov ecx, [rbp+arg_8]
cmp eax, ecx
jz short loc_B351A
cmp eax, edi
jnz short loc_B3534
mov rbx, [rbp+var_58]
cmp r12, rbx
jz loc_B36FE
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, r12
mov rdx, rbx
call qword ptr [rax+0C0h]
mov ecx, eax
mov eax, 1
cmp ecx, 2
jl short loc_B3514
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, r12
mov rdx, rbx
call qword ptr [rax+0C0h]
cmp eax, 2
cmovl eax, r13d
loc_B3514:
add r12, rax
mov edi, [rbp+arg_0]
loc_B351A:
lea rax, [r15+1]
cmp r15, [rbp+var_40]
mov r15, rax
jnz short loc_B34B4
jmp loc_B348A
loc_B352C:
xor r14d, r14d
jmp loc_B348A
loc_B3534:
mov r14d, 0FFFFFFFFh
mov r13, [rbp+var_58]
cmp r12, r13
jz loc_B348A
movzx eax, bl
lea rcx, [r15-1]
mov [rbp+var_50], rcx
cmp eax, [rbp+var_44]
jnz short loc_B3564
cmp r15, [rbp+var_40]
jz short loc_B3564
mov bl, [r15]
mov [rbp+var_50], r15
loc_B3564:
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
call qword ptr [rax+0C0h]
xor ecx, ecx
cmp eax, 2
mov r15d, eax
cmovl eax, ecx
mov dword ptr [rbp+var_60], eax
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
call qword ptr [rax+0C0h]
mov ecx, 1
cmp eax, 2
jl short loc_B35D4
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
call qword ptr [rax+0C0h]
mov ecx, eax
cmp eax, 2
mov eax, 0
cmovl ecx, eax
loc_B35D4:
add rcx, [rbp+var_50]
mov [rbp+var_70], rcx
mov rax, [rbp+var_38]
mov rax, [rax+58h]
movzx ecx, bl
mov al, [rax+rcx]
mov [rbp+var_29], al
mov eax, dword ptr [rbp+var_60]
mov [rbp+var_60], rax
mov rax, [rbp+var_68]
inc eax
mov [rbp+var_68], rax
loc_B35FE:
cmp r12, r13
jnb loc_B348A
mov rbx, r12
loc_B360A:
cmp r15d, 2
jge short loc_B3641
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 1
jg short loc_B3662
mov rax, [rbp+var_38]
mov rax, [rax+58h]
movzx ecx, byte ptr [rbx]
mov dl, [rbp+var_29]
cmp [rax+rcx], dl
jnz short loc_B3662
jmp short loc_B36B8
loc_B3641:
mov rax, [rbp+var_60]
lea r12, [rbx+rax]
cmp r12, r13
ja short loc_B3662
mov rdi, rbx
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_60]
call _bcmp
test eax, eax
jz short loc_B36BE
loc_B3662:
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r13
call qword ptr [rax+0C0h]
mov ecx, eax
mov eax, 1
cmp ecx, 2
jl short loc_B36A7
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 2
mov ecx, 0
cmovl eax, ecx
loc_B36A7:
add rbx, rax
cmp rbx, r13
jb loc_B360A
jmp loc_B348A
loc_B36B8:
inc rbx
mov r12, rbx
loc_B36BE:
sub rsp, 8
mov rdi, [rbp+var_38]
mov rsi, r12
mov rdx, r13
mov rcx, [rbp+var_70]
mov r8, [rbp+var_40]
mov r9d, [rbp+var_44]
push [rbp+var_68]
mov eax, [rbp+arg_8]
push rax
mov eax, [rbp+arg_0]
push rax
call my_wildcmp_mb_impl
add rsp, 20h
test eax, eax
jle short loc_B3709
cmp r12, r13
jnz loc_B35FE
jmp loc_B348A
loc_B36FE:
mov r14d, 0FFFFFFFFh
jmp loc_B348A
loc_B3709:
mov r14d, eax
jmp loc_B348A
| long long my_wildcmp_mb_impl(
long long a1,
unsigned __int8 *a2,
unsigned __int8 *a3,
char *a4,
char *a5,
int a6,
int a7,
int a8,
unsigned int a9)
{
unsigned int v11; // r14d
int v12; // edi
char v13; // al
int v14; // ecx
bool v15; // dl
unsigned __int8 *v16; // r13
char *v17; // rax
int v18; // ecx
long long v19; // rax
unsigned __int8 *v20; // rbx
int v21; // eax
long long v22; // r15
unsigned __int8 *v23; // rax
unsigned __int8 *v24; // r13
char *v26; // r15
unsigned __int8 v27; // bl
int v28; // ecx
long long v29; // rax
int v31; // eax
int v32; // r15d
int v33; // eax
int v34; // ecx
unsigned __int8 *v35; // rbx
int v36; // ecx
long long v37; // rax
int v38; // eax
int v39; // [rsp+0h] [rbp-70h]
unsigned int v40; // [rsp+10h] [rbp-60h]
char *v42; // [rsp+20h] [rbp-50h]
char v46; // [rsp+47h] [rbp-29h]
if ( !my_string_stack_guard || (v11 = 1, !(unsigned int)my_string_stack_guard(a9)) )
{
v12 = a7;
v11 = -1;
do
{
if ( a4 == a5 )
{
v16 = a3;
return a2 != v16;
}
v13 = *a4;
v14 = *a4;
v15 = v14 == v12;
v16 = a3;
if ( v14 != v12 && v14 != a8 )
{
do
{
v20 = (unsigned __int8 *)(a4 + 1);
if ( a4 + 1 == a5 )
v20 = (unsigned __int8 *)a4;
if ( v14 != a6 )
v20 = (unsigned __int8 *)a4;
v21 = (*(long long ( **)(long long, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v20);
if ( v21 >= 2 )
{
v22 = (unsigned int)v21;
v23 = v16;
v24 = &a2[v22];
v11 = 1;
if ( &a2[v22] > v23 )
return v11;
v12 = a7;
if ( (unsigned int)bcmp(a2, v20, v22) )
return v11;
a4 = (char *)&v20[v22];
a2 = v24;
}
else
{
v11 = 1;
if ( a2 == v16 )
return v11;
v12 = a7;
if ( *(_BYTE *)(*(_QWORD *)(a1 + 88) + *v20) != *(_BYTE *)(*(_QWORD *)(a1 + 88) + *a2) )
return v11;
++a2;
a4 = (char *)(v20 + 1);
}
v16 = a3;
if ( a4 == a5 )
return a2 != v16;
v13 = *a4;
v14 = *a4;
v15 = v14 == v12;
}
while ( v14 != a8 && v14 != v12 );
}
if ( v15 )
{
v17 = a4 + 1;
do
{
if ( a2 == v16 )
return v11;
a4 = v17;
v18 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
a2,
v16);
v19 = 1LL;
if ( v18 >= 2 )
{
v19 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184)
+ 192LL))(
a1,
a2,
v16);
if ( (int)v19 < 2 )
v19 = 0LL;
}
a2 += v19;
v12 = a7;
if ( a4 >= a5 )
break;
v17 = a4 + 1;
}
while ( *a4 == a7 );
if ( a4 == a5 )
return a2 != v16;
v13 = *a4;
}
}
while ( v13 != a8 );
if ( a4 + 1 == a5 )
{
return 0;
}
else
{
v26 = a4 + 2;
v11 = 0;
while ( 1 )
{
v27 = *(v26 - 1);
if ( (char)v27 == a8 )
goto LABEL_45;
if ( (char)v27 != v12 )
break;
if ( a2 == a3 )
return (unsigned int)-1;
v28 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
a2,
a3);
v29 = 1LL;
if ( v28 >= 2 )
{
v29 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
a2,
a3);
if ( (int)v29 < 2 )
v29 = 0LL;
}
a2 += v29;
v12 = a7;
LABEL_45:
if ( v26++ == a5 )
return v11;
}
v11 = -1;
if ( a2 != a3 )
{
v42 = v26 - 1;
if ( v27 == a6 && v26 != a5 )
{
v27 = *v26;
v42 = v26;
}
v31 = (*(long long ( **)(long long, char *, char *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v42, a5);
v32 = v31;
if ( v31 < 2 )
v31 = 0;
v40 = v31;
v33 = (*(long long ( **)(long long, char *, char *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v42, a5);
v34 = 1;
if ( v33 >= 2 )
{
v34 = (*(long long ( **)(long long, char *, char *, long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v42,
a5,
1LL);
if ( v34 < 2 )
v34 = 0;
}
v39 = (_DWORD)v42 + v34;
v46 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v27);
do
{
if ( a2 >= a3 )
return v11;
v35 = a2;
while ( v32 >= 2 )
{
a2 = &v35[v40];
if ( a2 <= a3 && !(unsigned int)bcmp(v35, v42, v40) )
goto LABEL_71;
LABEL_66:
v36 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184)
+ 192LL))(
a1,
v35,
a3);
v37 = 1LL;
if ( v36 >= 2 )
{
v37 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184)
+ 192LL))(
a1,
v35,
a3);
if ( (int)v37 < 2 )
v37 = 0LL;
}
v35 += v37;
if ( v35 >= a3 )
return v11;
}
if ( (*(int ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v35,
a3) > 1
|| *(_BYTE *)(*(_QWORD *)(a1 + 88) + *v35) != v46 )
{
goto LABEL_66;
}
a2 = v35 + 1;
LABEL_71:
v38 = my_wildcmp_mb_impl(a1, (_DWORD)a2, (_DWORD)a3, v39, (_DWORD)a5, a6, a7, a8, a9 + 1);
if ( v38 <= 0 )
return (unsigned int)v38;
}
while ( a2 != a3 );
}
}
}
return v11;
}
| my_wildcmp_mb_impl:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x44],R9D
MOV qword ptr [RBP + -0x40],R8
MOV R15,RCX
MOV qword ptr [RBP + -0x58],RDX
MOV R12,RSI
MOV qword ptr [RBP + -0x38],RDI
MOV EAX,dword ptr [RBP + 0x20]
MOV qword ptr [RBP + -0x68],RAX
LEA RAX,[0xd08998]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001b32ef
MOV EDI,dword ptr [RBP + 0x20]
CALL RAX
MOV R14D,0x1
TEST EAX,EAX
JNZ 0x001b348a
LAB_001b32ef:
MOV EDI,dword ptr [RBP + 0x10]
MOV R14D,0xffffffff
LAB_001b32f8:
CMP R15,qword ptr [RBP + -0x40]
JZ 0x001b347c
MOV AL,byte ptr [R15]
MOVSX ECX,AL
MOV EDX,dword ptr [RBP + 0x18]
CMP ECX,EDX
SETZ SIL
CMP ECX,EDI
SETZ DL
OR SIL,DL
MOV R13,qword ptr [RBP + -0x58]
JZ 0x001b33b8
LAB_001b3323:
TEST DL,DL
JZ 0x001b33a5
INC R15
MOV RAX,R15
MOV RBX,qword ptr [RBP + -0x38]
LAB_001b3331:
CMP R12,R13
JZ 0x001b348a
MOV R15,RAX
MOV RAX,qword ptr [RBX + 0xb8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
MOV EAX,0x1
CMP ECX,0x2
JL 0x001b3380
MOV RAX,qword ptr [RBX + 0xb8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
MOV ECX,0x0
CMOVL EAX,ECX
LAB_001b3380:
ADD R12,RAX
CMP R15,qword ptr [RBP + -0x40]
MOV EDI,dword ptr [RBP + 0x10]
JNC 0x001b3398
MOVSX ECX,byte ptr [R15]
LEA RAX,[R15 + 0x1]
CMP ECX,EDI
JZ 0x001b3331
LAB_001b3398:
CMP R15,qword ptr [RBP + -0x40]
JZ 0x001b3480
MOV AL,byte ptr [R15]
LAB_001b33a5:
MOVSX EAX,AL
MOV ECX,dword ptr [RBP + 0x18]
CMP EAX,ECX
JNZ 0x001b32f8
JMP 0x001b349c
LAB_001b33b8:
LEA RBX,[R15 + 0x1]
MOV RDX,qword ptr [RBP + -0x40]
CMP RBX,RDX
CMOVZ RBX,R15
CMP ECX,dword ptr [RBP + -0x44]
CMOVNZ RBX,R15
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
JGE 0x001b341c
MOV R14D,0x1
CMP R12,R13
JZ 0x001b348a
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX ECX,byte ptr [RBX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOVZX EDX,byte ptr [R12]
CMP CL,byte ptr [RAX + RDX*0x1]
MOV EDI,dword ptr [RBP + 0x10]
JNZ 0x001b348a
INC RBX
INC R12
MOV R15,RBX
JMP 0x001b344f
LAB_001b341c:
MOV R15D,EAX
MOV RAX,R13
LEA R13,[R12 + R15*0x1]
MOV R14D,0x1
CMP R13,RAX
JA 0x001b348a
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R15
CALL 0x00129560
TEST EAX,EAX
MOV EDI,dword ptr [RBP + 0x10]
JNZ 0x001b348a
ADD RBX,R15
MOV R15,RBX
MOV R12,R13
LAB_001b344f:
CMP R15,qword ptr [RBP + -0x40]
MOV R13,qword ptr [RBP + -0x58]
JZ 0x001b3480
MOV AL,byte ptr [R15]
MOVSX ECX,AL
CMP ECX,EDI
SETZ DL
MOV ESI,dword ptr [RBP + 0x18]
CMP ECX,ESI
JZ 0x001b3323
CMP ECX,EDI
JNZ 0x001b33b8
JMP 0x001b3323
LAB_001b347c:
MOV R13,qword ptr [RBP + -0x58]
LAB_001b3480:
XOR R14D,R14D
CMP R12,R13
SETNZ R14B
LAB_001b348a:
MOV EAX,R14D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b349c:
LEA RAX,[R15 + 0x1]
CMP RAX,qword ptr [RBP + -0x40]
JZ 0x001b352c
ADD R15,0x2
XOR R13D,R13D
XOR R14D,R14D
LAB_001b34b4:
MOV BL,byte ptr [R15 + -0x1]
MOVSX EAX,BL
MOV ECX,dword ptr [RBP + 0x18]
CMP EAX,ECX
JZ 0x001b351a
CMP EAX,EDI
JNZ 0x001b3534
MOV RBX,qword ptr [RBP + -0x58]
CMP R12,RBX
JZ 0x001b36fe
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R12
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
MOV EAX,0x1
CMP ECX,0x2
JL 0x001b3514
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R12
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
CMOVL EAX,R13D
LAB_001b3514:
ADD R12,RAX
MOV EDI,dword ptr [RBP + 0x10]
LAB_001b351a:
LEA RAX,[R15 + 0x1]
CMP R15,qword ptr [RBP + -0x40]
MOV R15,RAX
JNZ 0x001b34b4
JMP 0x001b348a
LAB_001b352c:
XOR R14D,R14D
JMP 0x001b348a
LAB_001b3534:
MOV R14D,0xffffffff
MOV R13,qword ptr [RBP + -0x58]
CMP R12,R13
JZ 0x001b348a
MOVZX EAX,BL
LEA RCX,[R15 + -0x1]
MOV qword ptr [RBP + -0x50],RCX
CMP EAX,dword ptr [RBP + -0x44]
JNZ 0x001b3564
CMP R15,qword ptr [RBP + -0x40]
JZ 0x001b3564
MOV BL,byte ptr [R15]
MOV qword ptr [RBP + -0x50],R15
LAB_001b3564:
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0xc0]
XOR ECX,ECX
CMP EAX,0x2
MOV R15D,EAX
CMOVL EAX,ECX
MOV dword ptr [RBP + -0x60],EAX
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0xc0]
MOV ECX,0x1
CMP EAX,0x2
JL 0x001b35d4
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
CMP EAX,0x2
MOV EAX,0x0
CMOVL ECX,EAX
LAB_001b35d4:
ADD RCX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x70],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX ECX,BL
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x29],AL
MOV EAX,dword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x68]
INC EAX
MOV qword ptr [RBP + -0x68],RAX
LAB_001b35fe:
CMP R12,R13
JNC 0x001b348a
MOV RBX,R12
LAB_001b360a:
CMP R15D,0x2
JGE 0x001b3641
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x1
JG 0x001b3662
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX ECX,byte ptr [RBX]
MOV DL,byte ptr [RBP + -0x29]
CMP byte ptr [RAX + RCX*0x1],DL
JNZ 0x001b3662
JMP 0x001b36b8
LAB_001b3641:
MOV RAX,qword ptr [RBP + -0x60]
LEA R12,[RBX + RAX*0x1]
CMP R12,R13
JA 0x001b3662
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x60]
CALL 0x00129560
TEST EAX,EAX
JZ 0x001b36be
LAB_001b3662:
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
MOV EAX,0x1
CMP ECX,0x2
JL 0x001b36a7
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
MOV ECX,0x0
CMOVL EAX,ECX
LAB_001b36a7:
ADD RBX,RAX
CMP RBX,R13
JC 0x001b360a
JMP 0x001b348a
LAB_001b36b8:
INC RBX
MOV R12,RBX
LAB_001b36be:
SUB RSP,0x8
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,R12
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x70]
MOV R8,qword ptr [RBP + -0x40]
MOV R9D,dword ptr [RBP + -0x44]
PUSH qword ptr [RBP + -0x68]
MOV EAX,dword ptr [RBP + 0x18]
PUSH RAX
MOV EAX,dword ptr [RBP + 0x10]
PUSH RAX
CALL 0x001b329f
ADD RSP,0x20
TEST EAX,EAX
JLE 0x001b3709
CMP R12,R13
JNZ 0x001b35fe
JMP 0x001b348a
LAB_001b36fe:
MOV R14D,0xffffffff
JMP 0x001b348a
LAB_001b3709:
MOV R14D,EAX
JMP 0x001b348a
|
uint my_wildcmp_mb_impl(long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,
uint param_6,uint param_7,uint param_8,int param_9)
{
char cVar1;
byte bVar2;
int iVar3;
uint uVar4;
uint uVar5;
ulong uVar6;
ulong uVar7;
uint uVar8;
byte *__s2;
byte *pbVar9;
bool bVar10;
byte *local_58;
if ((my_string_stack_guard != (code *)0x0) &&
(iVar3 = (*my_string_stack_guard)(param_9), iVar3 != 0)) {
return 1;
}
uVar4 = 0xffffffff;
do {
if (param_4 == param_5) {
LAB_001b3480:
return (uint)(param_2 != param_3);
}
bVar2 = *param_4;
uVar8 = (uint)(char)bVar2;
bVar10 = uVar8 == param_7;
pbVar9 = param_2;
if (uVar8 != param_8 && !bVar10) {
do {
__s2 = param_4 + 1;
if (param_4 + 1 == param_5) {
__s2 = param_4;
}
if (uVar8 != param_6) {
__s2 = param_4;
}
uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,__s2);
if ((int)uVar4 < 2) {
if (pbVar9 == param_3) {
return 1;
}
if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*__s2) !=
*(char *)(*(long *)(param_1 + 0x58) + (ulong)*pbVar9)) {
return 1;
}
param_4 = __s2 + 1;
param_2 = pbVar9 + 1;
}
else {
uVar6 = (ulong)uVar4;
param_2 = pbVar9 + uVar6;
if (param_3 < param_2) {
return 1;
}
iVar3 = bcmp(pbVar9,__s2,uVar6);
if (iVar3 != 0) {
return 1;
}
param_4 = __s2 + uVar6;
}
uVar4 = 1;
if (param_4 == param_5) goto LAB_001b3480;
bVar2 = *param_4;
uVar8 = (uint)(char)bVar2;
bVar10 = uVar8 == param_7;
} while ((uVar8 != param_8) && (pbVar9 = param_2, uVar8 != param_7));
}
if (bVar10) {
do {
param_4 = param_4 + 1;
if (param_2 == param_3) {
return uVar4;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = 1;
if (1 < iVar3) {
uVar8 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = (ulong)uVar8;
if ((int)uVar8 < 2) {
uVar6 = 0;
}
}
param_2 = param_2 + uVar6;
} while ((param_4 < param_5) && ((int)(char)*param_4 == param_7));
if (param_4 == param_5) goto LAB_001b3480;
bVar2 = *param_4;
}
} while ((int)(char)bVar2 != param_8);
if (param_4 + 1 != param_5) {
pbVar9 = param_4 + 2;
do {
bVar2 = pbVar9[-1];
if ((int)(char)bVar2 != param_8) {
if ((int)(char)bVar2 != param_7) {
if (param_2 == param_3) {
return 0xffffffff;
}
local_58 = pbVar9 + -1;
if ((bVar2 == param_6) && (pbVar9 != param_5)) {
bVar2 = *pbVar9;
local_58 = pbVar9;
}
uVar8 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5);
uVar4 = uVar8;
if ((int)uVar8 < 2) {
uVar4 = 0;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5);
uVar6 = 1;
if (1 < iVar3) {
uVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5);
uVar6 = (ulong)uVar5;
if ((int)uVar5 < 2) {
uVar6 = 0;
}
}
cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)bVar2);
goto LAB_001b35fe;
}
if (param_2 == param_3) {
return 0xffffffff;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = 1;
if (1 < iVar3) {
uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = (ulong)uVar4;
if ((int)uVar4 < 2) {
uVar6 = 0;
}
}
param_2 = param_2 + uVar6;
}
bVar10 = pbVar9 != param_5;
pbVar9 = pbVar9 + 1;
} while (bVar10);
}
return 0;
LAB_001b35fe:
if (param_3 <= param_2) {
return 0xffffffff;
}
do {
if ((int)uVar8 < 2) {
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
if ((iVar3 < 2) && (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_2) == cVar1)) break;
}
else {
pbVar9 = param_2 + uVar4;
if ((pbVar9 <= param_3) && (iVar3 = bcmp(param_2,local_58,(ulong)uVar4), iVar3 == 0))
goto LAB_001b36be;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar7 = 1;
if (1 < iVar3) {
uVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar7 = (ulong)uVar5;
if ((int)uVar5 < 2) {
uVar7 = 0;
}
}
param_2 = param_2 + uVar7;
if (param_3 <= param_2) {
return 0xffffffff;
}
} while( true );
pbVar9 = param_2 + 1;
LAB_001b36be:
uVar5 = my_wildcmp_mb_impl(param_1,pbVar9,param_3,local_58 + uVar6,param_5,param_6,param_7,param_8
,param_9 + 1);
if ((int)uVar5 < 1) {
return uVar5;
}
param_2 = pbVar9;
if (pbVar9 == param_3) {
return 0xffffffff;
}
goto LAB_001b35fe;
}
| |
35,901 | my_wc_mb_8bit | eloqsql/strings/ctype-simple.c | int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc,
uchar *str,
uchar *end)
{
MY_UNI_IDX *idx;
if (str >= end)
return MY_CS_TOOSMALL;
for (idx=cs->tab_from_uni; idx->tab ; idx++)
{
if (idx->from <= wc && idx->to >= wc)
{
str[0]= idx->tab[wc - idx->from];
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
}
}
return MY_CS_ILUNI;
} | O0 | c | my_wc_mb_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x5536a
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x55403
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x553fc
movq -0x30(%rbp), %rax
movzwl (%rax), %eax
cmpq -0x18(%rbp), %rax
ja 0x553e9
movq -0x30(%rbp), %rax
movzwl 0x2(%rax), %eax
cmpq -0x18(%rbp), %rax
jb 0x553e9
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rdx
movzwl (%rdx), %edx
subq %rdx, %rcx
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x31(%rbp)
jne 0x553d4
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x55403
jmp 0x553eb
movq -0x30(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x30(%rbp)
jmp 0x55376
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| my_wc_mb_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_5536A
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_55403
loc_5536A:
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov [rbp+var_30], rax
loc_55376:
mov rax, [rbp+var_30]
cmp qword ptr [rax+8], 0
jz short loc_553FC
mov rax, [rbp+var_30]
movzx eax, word ptr [rax]
cmp rax, [rbp+var_18]
ja short loc_553E9
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+2]
cmp rax, [rbp+var_18]
jb short loc_553E9
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov rcx, [rbp+var_18]
mov rdx, [rbp+var_30]
movzx edx, word ptr [rdx]
sub rcx, rdx
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov [rax], cl
mov rcx, [rbp+var_20]
xor eax, eax
cmp byte ptr [rcx], 0
mov [rbp+var_31], al
jnz short loc_553D4
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_31], al
loc_553D4:
mov dl, [rbp+var_31]
mov eax, 1
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_4], eax
jmp short loc_55403
loc_553E9:
jmp short $+2
loc_553EB:
mov rax, [rbp+var_30]
add rax, 10h
mov [rbp+var_30], rax
jmp loc_55376
loc_553FC:
mov [rbp+var_4], 0
loc_55403:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_8bit(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
bool v5; // [rsp+1h] [rbp-31h]
unsigned __int16 *i; // [rsp+2h] [rbp-30h]
if ( (unsigned long long)a3 < a4 )
{
for ( i = *(unsigned __int16 **)(a1 + 112); ; i += 8 )
{
if ( !*((_QWORD *)i + 1) )
return 0;
if ( *i <= a2 && i[1] >= a2 )
break;
}
*a3 = *(_BYTE *)(*((_QWORD *)i + 1) + a2 - *i);
v5 = 0;
if ( !*a3 )
v5 = a2 != 0;
return !v5;
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_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 qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0015536a
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00155403
LAB_0015536a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV qword ptr [RBP + -0x30],RAX
LAB_00155376:
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001553fc
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x001553e9
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0x2]
CMP RAX,qword ptr [RBP + -0x18]
JC 0x001553e9
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOVZX EDX,word ptr [RDX]
SUB RCX,RDX
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x20]
XOR EAX,EAX
CMP byte ptr [RCX],0x0
MOV byte ptr [RBP + -0x31],AL
JNZ 0x001553d4
CMP qword ptr [RBP + -0x18],0x0
SETNZ AL
MOV byte ptr [RBP + -0x31],AL
LAB_001553d4:
MOV DL,byte ptr [RBP + -0x31]
MOV EAX,0x1
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00155403
LAB_001553e9:
JMP 0x001553eb
LAB_001553eb:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x10
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00155376
LAB_001553fc:
MOV dword ptr [RBP + -0x4],0x0
LAB_00155403:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint my_wc_mb_8bit(long param_1,ulong param_2,char *param_3,char *param_4)
{
ushort *local_38;
uint local_c;
if (param_3 < param_4) {
for (local_38 = *(ushort **)(param_1 + 0x70); *(long *)(local_38 + 4) != 0;
local_38 = local_38 + 8) {
if ((*local_38 <= param_2) && (param_2 <= local_38[1])) {
*param_3 = *(char *)(*(long *)(local_38 + 4) + (param_2 - *local_38));
return (uint)(*param_3 != '\0' || param_2 == 0);
}
}
local_c = 0;
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
35,902 | set_dynamic | eloqsql/mysys/array.c | my_bool set_dynamic(DYNAMIC_ARRAY *array, const void *element, uint idx)
{
if (idx >= array->elements)
{
if (idx >= array->max_element && allocate_dynamic(array, idx))
return TRUE;
bzero((uchar*) (array->buffer+array->elements*array->size_of_element),
(idx - array->elements)*array->size_of_element);
array->elements=idx+1;
}
memcpy(array->buffer+(idx * array->size_of_element),element,
(size_t) array->size_of_element);
return FALSE;
} | O3 | c | set_dynamic:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movl 0x8(%rdi), %eax
cmpl %edx, %eax
ja 0x2c50a
cmpl %r14d, 0xc(%r15)
ja 0x2c4e7
movq %r15, %rdi
movl %r14d, %esi
callq 0x2c52d
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x2c522
movl 0x8(%r15), %eax
movl 0x14(%r15), %ecx
movl %r14d, %edx
subl %eax, %edx
imull %ecx, %edx
movl %ecx, %edi
imull %eax, %edi
addq (%r15), %rdi
xorl %esi, %esi
callq 0x24180
leal 0x1(%r14), %eax
movl %eax, 0x8(%r15)
movl 0x14(%r15), %edx
imull %edx, %r14d
addq (%r15), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24240
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| set_dynamic:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14d, edx
mov rbx, rsi
mov r15, rdi
mov eax, [rdi+8]
cmp eax, edx
ja short loc_2C50A
cmp [r15+0Ch], r14d
ja short loc_2C4E7
mov rdi, r15
mov esi, r14d
call allocate_dynamic
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_2C522
mov eax, [r15+8]
loc_2C4E7:
mov ecx, [r15+14h]
mov edx, r14d
sub edx, eax
imul edx, ecx
mov edi, ecx
imul edi, eax
add rdi, [r15]
xor esi, esi
call _memset
lea eax, [r14+1]
mov [r15+8], eax
loc_2C50A:
mov edx, [r15+14h]
imul r14d, edx
add r14, [r15]
mov rdi, r14
mov rsi, rbx
call _memcpy
xor eax, eax
loc_2C522:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| char set_dynamic(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // eax
char dynamic; // cl
char result; // al
v4 = *(_DWORD *)(a1 + 8);
if ( v4 <= a3 )
{
if ( *(_DWORD *)(a1 + 12) <= a3 )
{
dynamic = allocate_dynamic(a1, a3);
result = 1;
if ( dynamic )
return result;
v4 = *(_DWORD *)(a1 + 8);
}
memset(*(_QWORD *)a1 + v4 * *(_DWORD *)(a1 + 20), 0LL, *(_DWORD *)(a1 + 20) * (a3 - v4));
*(_DWORD *)(a1 + 8) = a3 + 1;
}
memcpy(*(_QWORD *)a1 + *(_DWORD *)(a1 + 20) * a3, a2, *(unsigned int *)(a1 + 20));
return 0;
}
| set_dynamic:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14D,EDX
MOV RBX,RSI
MOV R15,RDI
MOV EAX,dword ptr [RDI + 0x8]
CMP EAX,EDX
JA 0x0012c50a
CMP dword ptr [R15 + 0xc],R14D
JA 0x0012c4e7
MOV RDI,R15
MOV ESI,R14D
CALL 0x0012c52d
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x0012c522
MOV EAX,dword ptr [R15 + 0x8]
LAB_0012c4e7:
MOV ECX,dword ptr [R15 + 0x14]
MOV EDX,R14D
SUB EDX,EAX
IMUL EDX,ECX
MOV EDI,ECX
IMUL EDI,EAX
ADD RDI,qword ptr [R15]
XOR ESI,ESI
CALL 0x00124180
LEA EAX,[R14 + 0x1]
MOV dword ptr [R15 + 0x8],EAX
LAB_0012c50a:
MOV EDX,dword ptr [R15 + 0x14]
IMUL R14D,EDX
ADD R14,qword ptr [R15]
MOV RDI,R14
MOV RSI,RBX
CALL 0x00124240
XOR EAX,EAX
LAB_0012c522:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 set_dynamic(long *param_1,void *param_2,uint param_3)
{
char cVar1;
uint uVar2;
uVar2 = *(uint *)(param_1 + 1);
if (uVar2 <= param_3) {
if (*(uint *)((long)param_1 + 0xc) <= param_3) {
cVar1 = allocate_dynamic(param_1);
if (cVar1 != '\0') {
return 1;
}
uVar2 = *(uint *)(param_1 + 1);
}
memset((void *)((ulong)(*(int *)((long)param_1 + 0x14) * uVar2) + *param_1),0,
(ulong)((param_3 - uVar2) * *(int *)((long)param_1 + 0x14)));
*(uint *)(param_1 + 1) = param_3 + 1;
}
memcpy((void *)((ulong)(param_3 * *(uint *)((long)param_1 + 0x14)) + *param_1),param_2,
(ulong)*(uint *)((long)param_1 + 0x14));
return 0;
}
| |
35,903 | my_hash_sort_ucs2_nopad | eloqsql/strings/ctype-ucs2.c | static void
my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
const uchar *e=s+slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0)
{
my_tosort_ucs2(uni_plane, &wc);
MY_HASH_ADD_16(m1, m2, wc);
s+=res;
}
*nr1= m1;
*nr2= m2;
} | O0 | c | my_hash_sort_ucs2_nopad:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x13ecda
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x1395b0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x13ece6
jmp 0x13ed80
movq -0x48(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x13eda0
jmp 0x13ecf5
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
andq $0xff, %rcx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x13ed31
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
shrq $0x8, %rcx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x13ed6a
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x13ecaa
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| my_hash_sort_ucs2_nopad:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_58], rax
loc_13ECAA:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_59], al
jnb short loc_13ECDA
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_ucs2_uni
mov [rbp+var_34], eax
cmp eax, 0
setnle al
mov [rbp+var_59], al
loc_13ECDA:
mov al, [rbp+var_59]
test al, 1
jnz short loc_13ECE6
jmp loc_13ED80
loc_13ECE6:
mov rdi, [rbp+var_48]
lea rsi, [rbp+var_30]
call my_tosort_ucs2
jmp short $+2
loc_13ECF5:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
and rcx, 0FFh
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_13ED31:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
shr rcx, 8
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_13ED6A:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp loc_13ECAA
loc_13ED80:
mov rcx, [rbp+var_50]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_58]
mov rax, [rbp+var_28]
mov [rax], rcx
add rsp, 60h
pop rbp
retn
| _QWORD * my_hash_sort_ucs2_nopad(
long long a1,
unsigned long long a2,
long long a3,
unsigned long long *a4,
_QWORD *a5,
long long a6)
{
_QWORD *result; // rax
bool v7; // [rsp+7h] [rbp-59h]
long long v8; // [rsp+8h] [rbp-58h]
long long v9; // [rsp+8h] [rbp-58h]
unsigned long long v10; // [rsp+10h] [rbp-50h]
long long v11; // [rsp+10h] [rbp-50h]
long long v12; // [rsp+18h] [rbp-48h]
unsigned long long v13; // [rsp+20h] [rbp-40h]
int v14; // [rsp+2Ch] [rbp-34h]
unsigned long long v15; // [rsp+30h] [rbp-30h] BYREF
_QWORD *v16; // [rsp+38h] [rbp-28h]
unsigned long long *v17; // [rsp+40h] [rbp-20h]
long long v18; // [rsp+48h] [rbp-18h]
unsigned long long v19; // [rsp+50h] [rbp-10h]
long long v20; // [rsp+58h] [rbp-8h]
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v13 = a3 + a2;
v12 = *(_QWORD *)(a1 + 120);
v10 = *a4;
v8 = *a5;
while ( 1 )
{
v7 = 0;
if ( v19 < v13 )
{
v14 = my_ucs2_uni(v20, (long long)&v15, v19, v13, (long long)a5, a6);
v7 = v14 > 0;
}
if ( !v7 )
break;
my_tosort_ucs2(v12, &v15);
v11 = v10 ^ ((v10 << 8) + (unsigned __int8)v15 * (v8 + (v10 & 0x3F)));
v9 = v8 + 3;
v10 = v11 ^ ((v11 << 8) + (v15 >> 8) * (v9 + (v11 & 0x3F)));
v8 = v9 + 3;
v19 += v14;
}
*v17 = v10;
result = v16;
*v16 = v8;
return result;
}
| |||
35,904 | my_hash_sort_ucs2_nopad | eloqsql/strings/ctype-ucs2.c | static void
my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
const uchar *e=s+slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0)
{
my_tosort_ucs2(uni_plane, &wc);
MY_HASH_ADD_16(m1, m2, wc);
s+=res;
}
*nr1= m1;
*nr2= m2;
} | O3 | c | my_hash_sort_ucs2_nopad:
movq (%rcx), %r9
movq (%r8), %rax
cmpq $0x2, %rdx
jl 0xcde91
pushq %rbp
movq %rsp, %rbp
pushq %rbx
addq %rsi, %rdx
movq 0x78(%rdi), %rdi
movq 0x8(%rdi), %rdi
movzbl (%rsi), %r10d
movzbl 0x1(%rsi), %r11d
movq (%rdi,%r10,8), %rbx
testq %rbx, %rbx
je 0xcde2d
leaq (%r11,%r11,2), %r10
movl 0x8(%rbx,%r10,4), %r10d
jmp 0xcde34
shll $0x8, %r10d
orq %r11, %r10
movl %r9d, %r11d
andl $0x3f, %r11d
addq %rax, %r11
movzbl %r10b, %ebx
imulq %r11, %rbx
movq %r9, %r11
shlq $0x8, %r11
addq %rbx, %r11
xorq %r9, %r11
movl %r11d, %r9d
andl $0x3f, %r9d
addq %rax, %r9
addq $0x3, %r9
shrl $0x8, %r10d
imulq %r9, %r10
movq %r11, %r9
shlq $0x8, %r9
addq %r10, %r9
xorq %r11, %r9
addq $0x6, %rax
leaq 0x2(%rsi), %r10
cmpq %rdx, %r10
jae 0xcde8f
addq $0x4, %rsi
cmpq %rdx, %rsi
movq %r10, %rsi
jbe 0xcde10
popq %rbx
popq %rbp
movq %r9, (%rcx)
movq %rax, (%r8)
retq
| my_hash_sort_ucs2_nopad:
mov r9, [rcx]
mov rax, [r8]
cmp rdx, 2
jl loc_CDE91
push rbp
mov rbp, rsp
push rbx
add rdx, rsi
mov rdi, [rdi+78h]
mov rdi, [rdi+8]
loc_CDE10:
movzx r10d, byte ptr [rsi]
movzx r11d, byte ptr [rsi+1]
mov rbx, [rdi+r10*8]
test rbx, rbx
jz short loc_CDE2D
lea r10, [r11+r11*2]
mov r10d, [rbx+r10*4+8]
jmp short loc_CDE34
loc_CDE2D:
shl r10d, 8
or r10, r11
loc_CDE34:
mov r11d, r9d
and r11d, 3Fh
add r11, rax
movzx ebx, r10b
imul rbx, r11
mov r11, r9
shl r11, 8
add r11, rbx
xor r11, r9
mov r9d, r11d
and r9d, 3Fh
add r9, rax
add r9, 3
shr r10d, 8
imul r10, r9
mov r9, r11
shl r9, 8
add r9, r10
xor r9, r11
add rax, 6
lea r10, [rsi+2]
cmp r10, rdx
jnb short loc_CDE8F
add rsi, 4
cmp rsi, rdx
mov rsi, r10
jbe short loc_CDE10
loc_CDE8F:
pop rbx
pop rbp
loc_CDE91:
mov [rcx], r9
mov [r8], rax
retn
| long long my_hash_sort_ucs2_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5)
{
long long v5; // r9
long long result; // rax
unsigned long long v7; // rdx
long long v8; // rdi
long long v9; // r10
long long v10; // r11
long long v11; // rbx
unsigned int v12; // r10d
long long v13; // rbx
bool v14; // cc
v5 = *a4;
result = *a5;
if ( a3 >= 2 )
{
v7 = (unsigned long long)&a2[a3];
v8 = *(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL);
do
{
v9 = *a2;
v10 = a2[1];
v11 = *(_QWORD *)(v8 + 8 * v9);
if ( v11 )
v12 = *(_DWORD *)(v11 + 12 * v10 + 8);
else
v12 = v10 | ((_DWORD)v9 << 8);
v13 = (result + (v5 & 0x3F)) * (unsigned __int8)v12;
v5 ^= (v13 + (v5 << 8)) ^ ((result + (((unsigned __int8)v5 ^ (unsigned __int8)v13) & 0x3F) + 3) * (v12 >> 8)
+ ((v5 ^ (v13 + (v5 << 8))) << 8));
result += 6LL;
if ( (unsigned long long)(a2 + 2) >= v7 )
break;
v14 = (unsigned long long)(a2 + 4) <= v7;
a2 += 2;
}
while ( v14 );
}
*a4 = v5;
*a5 = result;
return result;
}
| my_hash_sort_ucs2_nopad:
MOV R9,qword ptr [RCX]
MOV RAX,qword ptr [R8]
CMP RDX,0x2
JL 0x001cde91
PUSH RBP
MOV RBP,RSP
PUSH RBX
ADD RDX,RSI
MOV RDI,qword ptr [RDI + 0x78]
MOV RDI,qword ptr [RDI + 0x8]
LAB_001cde10:
MOVZX R10D,byte ptr [RSI]
MOVZX R11D,byte ptr [RSI + 0x1]
MOV RBX,qword ptr [RDI + R10*0x8]
TEST RBX,RBX
JZ 0x001cde2d
LEA R10,[R11 + R11*0x2]
MOV R10D,dword ptr [RBX + R10*0x4 + 0x8]
JMP 0x001cde34
LAB_001cde2d:
SHL R10D,0x8
OR R10,R11
LAB_001cde34:
MOV R11D,R9D
AND R11D,0x3f
ADD R11,RAX
MOVZX EBX,R10B
IMUL RBX,R11
MOV R11,R9
SHL R11,0x8
ADD R11,RBX
XOR R11,R9
MOV R9D,R11D
AND R9D,0x3f
ADD R9,RAX
ADD R9,0x3
SHR R10D,0x8
IMUL R10,R9
MOV R9,R11
SHL R9,0x8
ADD R9,R10
XOR R9,R11
ADD RAX,0x6
LEA R10,[RSI + 0x2]
CMP R10,RDX
JNC 0x001cde8f
ADD RSI,0x4
CMP RSI,RDX
MOV RSI,R10
JBE 0x001cde10
LAB_001cde8f:
POP RBX
POP RBP
LAB_001cde91:
MOV qword ptr [RCX],R9
MOV qword ptr [R8],RAX
RET
|
void my_hash_sort_ucs2_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
long lVar1;
long lVar2;
byte *pbVar3;
byte *pbVar4;
ulong uVar5;
ulong uVar6;
uVar6 = *param_4;
lVar2 = *param_5;
if (1 < param_3) {
pbVar3 = param_2;
do {
lVar1 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*pbVar3 * 8);
if (lVar1 == 0) {
uVar5 = (ulong)CONCAT11(*pbVar3,pbVar3[1]);
}
else {
uVar5 = (ulong)*(uint *)(lVar1 + 8 + (ulong)pbVar3[1] * 0xc);
}
uVar6 = uVar6 * 0x100 + (uVar5 & 0xff) * ((ulong)((uint)uVar6 & 0x3f) + lVar2) ^ uVar6;
uVar6 = uVar6 * 0x100 + (uVar5 >> 8) * ((ulong)((uint)uVar6 & 0x3f) + lVar2 + 3) ^ uVar6;
lVar2 = lVar2 + 6;
} while ((pbVar3 + 2 < param_2 + param_3) &&
(pbVar4 = pbVar3 + 4, pbVar3 = pbVar3 + 2, pbVar4 <= param_2 + param_3));
}
*param_4 = uVar6;
*param_5 = lVar2;
return;
}
| |
35,905 | my_mb_wc_utf16_quick | eloqsql/strings/ctype-utf16.h | static inline int
my_mb_wc_utf16_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
/*
High bytes: 0xD[89AB] = B'110110??'
Low bytes: 0xD[CDEF] = B'110111??'
Surrogate mask: 0xFC = B'11111100'
*/
if (MY_UTF16_HIGH_HEAD(*s)) /* Surrogate head */
{
if (s + 4 > e)
return MY_CS_TOOSMALL4;
if (!MY_UTF16_LOW_HEAD(s[2])) /* Broken surrigate pair */
return MY_CS_ILSEQ;
*pwc= MY_UTF16_WC4(s[0], s[1], s[2], s[3]);
return 4;
}
if (MY_UTF16_LOW_HEAD(*s)) /* Low surrogate part without high part */
return MY_CS_ILSEQ;
*pwc= MY_UTF16_WC2(s[0], s[1]);
return 2;
} | O0 | c | my_mb_wc_utf16_quick:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x2, %rax
cmpq -0x20(%rbp), %rax
jbe 0xa93ba
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0xa9498
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0xfc, %eax
cmpl $0xd8, %eax
jne 0xa9457
movq -0x18(%rbp), %rax
addq $0x4, %rax
cmpq -0x20(%rbp), %rax
jbe 0xa93eb
movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98
jmp 0xa9498
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
andl $0xfc, %eax
cmpl $0xdc, %eax
je 0xa940b
movl $0x0, -0x4(%rbp)
jmp 0xa9498
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0x3, %eax
shll $0x12, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0xa, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
andl $0x3, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
addl %ecx, %eax
addl $0x10000, %eax # imm = 0x10000
movslq %eax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0xa9498
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0xfc, %eax
cmpl $0xdc, %eax
jne 0xa9473
movl $0x0, -0x4(%rbp)
jmp 0xa9498
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
| my_mb_wc_utf16_quick:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
add rax, 2
cmp rax, [rbp+var_20]
jbe short loc_A93BA
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_A9498
loc_A93BA:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
and eax, 0FCh
cmp eax, 0D8h
jnz loc_A9457
mov rax, [rbp+var_18]
add rax, 4
cmp rax, [rbp+var_20]
jbe short loc_A93EB
mov [rbp+var_4], 0FFFFFF98h
jmp loc_A9498
loc_A93EB:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
and eax, 0FCh
cmp eax, 0DCh
jz short loc_A940B
mov [rbp+var_4], 0
jmp loc_A9498
loc_A940B:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
and eax, 3
shl eax, 12h
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 0Ah
add eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
and ecx, 3
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+3]
add eax, ecx
add eax, 10000h
movsxd rcx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 4
jmp short loc_A9498
loc_A9457:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
and eax, 0FCh
cmp eax, 0DCh
jnz short loc_A9473
mov [rbp+var_4], 0
jmp short loc_A9498
loc_A9473:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
shl eax, 8
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
add eax, ecx
movsxd rcx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 2
loc_A9498:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_utf16_quick(_QWORD *a1, unsigned __int8 *a2, unsigned long long a3)
{
if ( (unsigned long long)(a2 + 2) <= a3 )
{
if ( (*a2 & 0xFC) == 0xD8 )
{
if ( (unsigned long long)(a2 + 4) <= a3 )
{
if ( (a2[2] & 0xFC) == 0xDC )
{
*a1 = a2[3] + ((a2[2] & 3) << 8) + (a2[1] << 10) + ((*a2 & 3) << 18) + 0x10000;
return 4;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-104;
}
}
else if ( (*a2 & 0xFC) == 0xDC )
{
return 0;
}
else
{
*a1 = a2[1] + (*a2 << 8);
return 2;
}
}
else
{
return (unsigned int)-102;
}
}
| my_mb_wc_utf16_quick:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x001a93ba
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001a9498
LAB_001a93ba:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
AND EAX,0xfc
CMP EAX,0xd8
JNZ 0x001a9457
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x001a93eb
MOV dword ptr [RBP + -0x4],0xffffff98
JMP 0x001a9498
LAB_001a93eb:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
AND EAX,0xfc
CMP EAX,0xdc
JZ 0x001a940b
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001a9498
LAB_001a940b:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x3
SHL EAX,0x12
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0xa
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
AND ECX,0x3
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x3]
ADD EAX,ECX
ADD EAX,0x10000
MOVSXD RCX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x4
JMP 0x001a9498
LAB_001a9457:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
AND EAX,0xfc
CMP EAX,0xdc
JNZ 0x001a9473
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001a9498
LAB_001a9473:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
ADD EAX,ECX
MOVSXD RCX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
LAB_001a9498:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_utf16_quick(long *param_1,byte *param_2,byte *param_3)
{
int4 local_c;
if (param_3 < param_2 + 2) {
local_c = 0xffffff9a;
}
else if ((*param_2 & 0xfc) == 0xd8) {
if (param_3 < param_2 + 4) {
local_c = 0xffffff98;
}
else if ((param_2[2] & 0xfc) == 0xdc) {
*param_1 = (long)(int)((*param_2 & 3) * 0x40000 + (uint)param_2[1] * 0x400 +
(param_2[2] & 3) * 0x100 + (uint)param_2[3] + 0x10000);
local_c = 4;
}
else {
local_c = 0;
}
}
else if ((*param_2 & 0xfc) == 0xdc) {
local_c = 0;
}
else {
*param_1 = (long)(int)((uint)*param_2 * 0x100 + (uint)param_2[1]);
local_c = 2;
}
return local_c;
}
| |
35,906 | recursive_free | eloqsql/mysys/lf_dynarray.c | static void recursive_free(void **alloc, int level)
{
if (!alloc)
return;
if (level)
{
int i;
for (i= 0; i < LF_DYNARRAY_LEVEL_LENGTH; i++)
recursive_free(alloc[i], level-1);
my_free(alloc);
}
else
my_free(alloc[-1]);
} | O3 | c | recursive_free:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xa5a92
movl %esi, %r14d
movq %rdi, %rbx
testl %esi, %esi
je 0xa5a9d
decl %r14d
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
movl %r14d, %esi
callq 0xa5a56
incq %r15
cmpq $0x100, %r15 # imm = 0x100
jne 0xa5a75
movq %rbx, %rdi
jmp 0xa5aa1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq -0x8(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9ffb6
| recursive_free:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
test rdi, rdi
jz short loc_A5A92
mov r14d, esi
mov rbx, rdi
test esi, esi
jz short loc_A5A9D
dec r14d
xor r15d, r15d
loc_A5A75:
mov rdi, [rbx+r15*8]
mov esi, r14d
call recursive_free
inc r15
cmp r15, 100h
jnz short loc_A5A75
mov rdi, rbx
jmp short loc_A5AA1
loc_A5A92:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_A5A9D:
mov rdi, [rbx-8]
loc_A5AA1:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp my_free
| long long recursive_free(long long a1, int a2)
{
long long i; // r15
long long result; // rax
if ( a1 )
{
if ( a2 )
{
for ( i = 0LL; i != 256; ++i )
recursive_free(*(_QWORD *)(a1 + 8 * i), (unsigned int)(a2 - 1));
return my_free(a1);
}
else
{
return my_free(*(_QWORD *)(a1 - 8));
}
}
return result;
}
| recursive_free:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x001a5a92
MOV R14D,ESI
MOV RBX,RDI
TEST ESI,ESI
JZ 0x001a5a9d
DEC R14D
XOR R15D,R15D
LAB_001a5a75:
MOV RDI,qword ptr [RBX + R15*0x8]
MOV ESI,R14D
CALL 0x001a5a56
INC R15
CMP R15,0x100
JNZ 0x001a5a75
MOV RDI,RBX
JMP 0x001a5aa1
LAB_001a5a92:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001a5a9d:
MOV RDI,qword ptr [RBX + -0x8]
LAB_001a5aa1:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0019ffb6
|
void recursive_free(long param_1,int param_2)
{
long lVar1;
if (param_1 == 0) {
return;
}
if (param_2 == 0) {
param_1 = *(long *)(param_1 + -8);
}
else {
lVar1 = 0;
do {
recursive_free(*(int8 *)(param_1 + lVar1 * 8),param_2 + -1);
lVar1 = lVar1 + 1;
} while (lVar1 != 0x100);
}
my_free(param_1);
return;
}
| |
35,907 | pixie_create_rwlock | xtate/src/pixie/pixie-threads.c | void *pixie_create_rwlock() {
#if defined(_WIN32)
PSRWLOCK p_rwlock;
p_rwlock = CALLOC(1, sizeof(SRWLOCK));
if (p_rwlock == NULL) {
return NULL;
}
InitializeSRWLock(p_rwlock);
return p_rwlock;
#else
int res;
pthread_rwlock_t *p_rwlock;
p_rwlock = CALLOC(1, sizeof(pthread_rwlock_t));
if (p_rwlock == NULL) {
return NULL;
}
res = pthread_rwlock_init(p_rwlock, NULL);
if (res != 0) {
FREE(p_rwlock);
}
return p_rwlock;
#endif
} | O3 | c | pixie_create_rwlock:
pushq %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x5080b
testq %rax, %rax
je 0x265ad
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x151d0
testl %eax, %eax
je 0x265af
movq %rbx, %rdi
callq 0x151e0
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
| pixie_create_rwlock:
push rbx
mov edi, 1
mov esi, 38h ; '8'
call CALLOC
test rax, rax
jz short loc_265AD
mov rbx, rax
mov rdi, rax
xor esi, esi
call _pthread_rwlock_init
test eax, eax
jz short loc_265AF
mov rdi, rbx
call _free
loc_265AD:
xor ebx, ebx
loc_265AF:
mov rax, rbx
pop rbx
retn
| long long pixie_create_rwlock()
{
long long v0; // rax
long long v1; // rbx
v0 = CALLOC(1LL, 56LL);
if ( !v0 )
return 0LL;
v1 = v0;
if ( (unsigned int)pthread_rwlock_init(v0, 0LL) )
{
free(v1);
return 0LL;
}
return v1;
}
| pixie_create_rwlock:
PUSH RBX
MOV EDI,0x1
MOV ESI,0x38
CALL 0x0015080b
TEST RAX,RAX
JZ 0x001265ad
MOV RBX,RAX
MOV RDI,RAX
XOR ESI,ESI
CALL 0x001151d0
TEST EAX,EAX
JZ 0x001265af
MOV RDI,RBX
CALL 0x001151e0
LAB_001265ad:
XOR EBX,EBX
LAB_001265af:
MOV RAX,RBX
POP RBX
RET
|
pthread_rwlock_t * pixie_create_rwlock(void)
{
int iVar1;
pthread_rwlock_t *__rwlock;
__rwlock = (pthread_rwlock_t *)CALLOC(1);
if (__rwlock != (pthread_rwlock_t *)0x0) {
iVar1 = pthread_rwlock_init(__rwlock,(pthread_rwlockattr_t *)0x0);
if (iVar1 == 0) {
return __rwlock;
}
free(__rwlock);
}
return (pthread_rwlock_t *)0x0;
}
| |
35,908 | bc_get_u16 | bluesky950520[P]quickjs/quickjs.c | static int bc_get_u16(BCReaderState *s, uint16_t *pval)
{
uint16_t v;
if (unlikely(s->buf_end - s->ptr < 2)) {
*pval = 0; /* avoid warning */
return bc_read_error_end(s);
}
v = get_u16(s->ptr);
if (is_be())
v = bswap16(v);
*pval = v;
s->ptr += 2;
return 0;
} | O0 | c | bc_get_u16:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
setl %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x7bcd5
movq 0x10(%rsp), %rax
movw $0x0, (%rax)
movq 0x18(%rsp), %rdi
callq 0x791d0
movl %eax, 0x24(%rsp)
jmp 0x7bd26
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x63900
movw %ax, 0xe(%rsp)
callq 0x2b9a0
cmpb $0x0, %al
je 0x7bd00
movzwl 0xe(%rsp), %edi
callq 0x78290
movw %ax, 0xe(%rsp)
movw 0xe(%rsp), %cx
movq 0x10(%rsp), %rax
movw %cx, (%rax)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x2, %rcx
movq %rcx, 0x10(%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
| bc_get_u16:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rax, [rsp+28h+var_10]
mov rax, [rax+18h]
mov rcx, [rsp+28h+var_10]
mov rcx, [rcx+10h]
sub rax, rcx
cmp rax, 2
setl al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_7BCD5
mov rax, [rsp+28h+var_18]
mov word ptr [rax], 0
mov rdi, [rsp+28h+var_10]
call bc_read_error_end
mov [rsp+28h+var_4], eax
jmp short loc_7BD26
loc_7BCD5:
mov rax, [rsp+28h+var_10]
mov rdi, [rax+10h]
call get_u16
mov [rsp+28h+var_1A], ax
call is_be_0
cmp al, 0
jz short loc_7BD00
movzx edi, [rsp+28h+var_1A]
call bswap16
mov [rsp+28h+var_1A], ax
loc_7BD00:
mov cx, [rsp+28h+var_1A]
mov rax, [rsp+28h+var_18]
mov [rax], cx
mov rax, [rsp+28h+var_10]
mov rcx, [rax+10h]
add rcx, 2
mov [rax+10h], rcx
mov [rsp+28h+var_4], 0
loc_7BD26:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long bc_get_u16(
long long a1,
unsigned __int16 *a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
long long a14)
{
long long v14; // rcx
unsigned __int16 u16; // [rsp+Eh] [rbp-1Ah]
v14 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 24) - v14 >= 2 )
{
u16 = get_u16(*(unsigned __int16 **)(a1 + 16));
if ( is_be_0() )
u16 = bswap16(u16);
*a2 = u16;
*(_QWORD *)(a1 + 16) += 2LL;
return 0;
}
else
{
*a2 = 0;
return (unsigned int)bc_read_error_end(a1, a4, a5, a6, a7, a8, a9, a10, a11, (long long)a2, a3, v14, a13, a14);
}
}
| bc_get_u16:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RCX + 0x10]
SUB RAX,RCX
CMP RAX,0x2
SETL AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0017bcd5
MOV RAX,qword ptr [RSP + 0x10]
MOV word ptr [RAX],0x0
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001791d0
MOV dword ptr [RSP + 0x24],EAX
JMP 0x0017bd26
LAB_0017bcd5:
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x00163900
MOV word ptr [RSP + 0xe],AX
CALL 0x0012b9a0
CMP AL,0x0
JZ 0x0017bd00
MOVZX EDI,word ptr [RSP + 0xe]
CALL 0x00178290
MOV word ptr [RSP + 0xe],AX
LAB_0017bd00:
MOV CX,word ptr [RSP + 0xe]
MOV RAX,qword ptr [RSP + 0x10]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RAX + 0x10]
ADD RCX,0x2
MOV qword ptr [RAX + 0x10],RCX
MOV dword ptr [RSP + 0x24],0x0
LAB_0017bd26:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 bc_get_u16(long param_1,int2 *param_2)
{
char cVar1;
int2 local_1a;
int4 local_4;
if (*(long *)(param_1 + 0x18) - *(long *)(param_1 + 0x10) < 2) {
*param_2 = 0;
local_4 = bc_read_error_end(param_1);
}
else {
local_1a = get_u16(*(int8 *)(param_1 + 0x10));
cVar1 = is_be();
if (cVar1 != '\0') {
local_1a = bswap16(local_1a);
}
*param_2 = local_1a;
*(long *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + 2;
local_4 = 0;
}
return local_4;
}
| |
35,909 | JS_NewAtomLen | bluesky950520[P]quickjs/quickjs.c | JSAtom JS_NewAtomLen(JSContext *ctx, const char *str, size_t len)
{
JSValue val;
if (len == 0 || !is_digit(*str)) {
// TODO(chqrlie): this does not work if `str` has UTF-8 encoded contents
// bug example: `({ "\u00c3\u00a9": 1 }).\u00e9` evaluates to `1`.
JSAtom atom = __JS_FindAtom(ctx->rt, str, len, JS_ATOM_TYPE_STRING);
if (atom)
return atom;
}
val = JS_NewStringLen(ctx, str, len);
if (JS_IsException(val))
return JS_ATOM_NULL;
return JS_NewAtomStr(ctx, JS_VALUE_GET_STRING(val));
} | O1 | c | JS_NewAtomLen:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
testq %rdx, %rdx
je 0x1fde3
movzbl (%r15), %eax
addl $-0x3a, %eax
cmpl $-0xb, %eax
ja 0x1fdf6
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1fe30
testl %eax, %eax
jne 0x1fe10
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ff07
movq %rax, 0x8(%rsp)
xorl %eax, %eax
cmpl $0x6, %edx
jne 0x1fe1a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x20038
| JS_NewAtomLen:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
test rdx, rdx
jz short loc_1FDE3
movzx eax, byte ptr [r15]
add eax, 0FFFFFFC6h
cmp eax, 0FFFFFFF5h
ja short loc_1FDF6
loc_1FDE3:
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r14
call __JS_FindAtom
test eax, eax
jnz short loc_1FE10
loc_1FDF6:
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_NewStringLen
mov [rsp+28h+var_20], rax
xor eax, eax
cmp edx, 6
jnz short loc_1FE1A
loc_1FE10:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_1FE1A:
mov rsi, [rsp+28h+var_20]
mov rdi, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
jmp JS_NewAtomStr
| long long JS_NewAtomLen(long long a1, unsigned __int8 *a2, long long a3)
{
long long result; // rax
int v5; // edx
long long v6; // [rsp+8h] [rbp-20h]
if ( a3 && (unsigned int)*a2 - 58 > 0xFFFFFFF5
|| (result = _JS_FindAtom(*(_QWORD *)(a1 + 24), a2, a3), !(_DWORD)result) )
{
v6 = JS_NewStringLen(a1, a2, a3);
result = 0LL;
if ( v5 != 6 )
return JS_NewAtomStr(a1, v6);
}
return result;
}
| JS_NewAtomLen:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
TEST RDX,RDX
JZ 0x0011fde3
MOVZX EAX,byte ptr [R15]
ADD EAX,-0x3a
CMP EAX,-0xb
JA 0x0011fdf6
LAB_0011fde3:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R14
CALL 0x0011fe30
TEST EAX,EAX
JNZ 0x0011fe10
LAB_0011fdf6:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0011ff07
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
CMP EDX,0x6
JNZ 0x0011fe1a
LAB_0011fe10:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
LAB_0011fe1a:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
JMP 0x00120038
|
int8 JS_NewAtomLen(long param_1,byte *param_2,long param_3)
{
int8 uVar1;
int1 auVar2 [12];
if (((param_3 == 0) || (*param_2 - 0x3a < 0xfffffff6)) &&
(uVar1 = __JS_FindAtom(*(int8 *)(param_1 + 0x18),param_2,param_3), (int)uVar1 != 0)) {
return uVar1;
}
auVar2 = JS_NewStringLen(param_1,param_2,param_3);
if (auVar2._8_4_ == 6) {
return 0;
}
uVar1 = JS_NewAtomStr(param_1,auVar2._0_8_);
return uVar1;
}
| |
35,910 | JS_NewAtomLen | bluesky950520[P]quickjs/quickjs.c | JSAtom JS_NewAtomLen(JSContext *ctx, const char *str, size_t len)
{
JSValue val;
if (len == 0 || !is_digit(*str)) {
// TODO(chqrlie): this does not work if `str` has UTF-8 encoded contents
// bug example: `({ "\u00c3\u00a9": 1 }).\u00e9` evaluates to `1`.
JSAtom atom = __JS_FindAtom(ctx->rt, str, len, JS_ATOM_TYPE_STRING);
if (atom)
return atom;
}
val = JS_NewStringLen(ctx, str, len);
if (JS_IsException(val))
return JS_ATOM_NULL;
return JS_NewAtomStr(ctx, JS_VALUE_GET_STRING(val));
} | O2 | c | JS_NewAtomLen:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
testq %rdx, %rdx
je 0x1a1e6
movzbl (%r15), %eax
addl $-0x3a, %eax
cmpl $-0xb, %eax
ja 0x1a1f9
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1a224
testl %eax, %eax
jne 0x1a211
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1a2ea
movq %rax, %rsi
xorl %eax, %eax
cmpl $0x6, %edx
jne 0x1a217
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1a40c
| JS_NewAtomLen:
push r15
push r14
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
test rdx, rdx
jz short loc_1A1E6
movzx eax, byte ptr [r15]
add eax, 0FFFFFFC6h
cmp eax, 0FFFFFFF5h
ja short loc_1A1F9
loc_1A1E6:
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r14
call __JS_FindAtom
test eax, eax
jnz short loc_1A211
loc_1A1F9:
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_NewStringLen
mov rsi, rax
xor eax, eax
cmp edx, 6
jnz short loc_1A217
loc_1A211:
pop rbx
pop r14
pop r15
retn
loc_1A217:
mov rdi, rbx
pop rbx
pop r14
pop r15
jmp JS_NewAtomStr
| long long JS_NewAtomLen(long long a1, unsigned __int8 *a2, long long a3)
{
long long result; // rax
long long v5; // rsi
int v6; // edx
if ( a3 && (unsigned int)*a2 - 58 > 0xFFFFFFF5
|| (result = _JS_FindAtom(*(_QWORD *)(a1 + 24), a2, a3), !(_DWORD)result) )
{
v5 = JS_NewStringLen(a1, a2, a3);
result = 0LL;
if ( v6 != 6 )
return JS_NewAtomStr(a1, v5);
}
return result;
}
| JS_NewAtomLen:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
TEST RDX,RDX
JZ 0x0011a1e6
MOVZX EAX,byte ptr [R15]
ADD EAX,-0x3a
CMP EAX,-0xb
JA 0x0011a1f9
LAB_0011a1e6:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R14
CALL 0x0011a224
TEST EAX,EAX
JNZ 0x0011a211
LAB_0011a1f9:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0011a2ea
MOV RSI,RAX
XOR EAX,EAX
CMP EDX,0x6
JNZ 0x0011a217
LAB_0011a211:
POP RBX
POP R14
POP R15
RET
LAB_0011a217:
MOV RDI,RBX
POP RBX
POP R14
POP R15
JMP 0x0011a40c
|
int8 JS_NewAtomLen(long param_1,byte *param_2,long param_3)
{
int8 uVar1;
int1 auVar2 [12];
if (((param_3 == 0) || (*param_2 - 0x3a < 0xfffffff6)) &&
(uVar1 = __JS_FindAtom(*(int8 *)(param_1 + 0x18),param_2,param_3), (int)uVar1 != 0)) {
return uVar1;
}
auVar2 = JS_NewStringLen(param_1,param_2,param_3);
if (auVar2._8_4_ == 6) {
return 0;
}
uVar1 = JS_NewAtomStr(param_1,auVar2._0_8_);
return uVar1;
}
| |
35,911 | google::protobuf::DescriptorPool::DescriptorPool(google::protobuf::DescriptorDatabase*, google::protobuf::DescriptorPool::ErrorCollector*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | DescriptorPool::DescriptorPool(DescriptorDatabase* fallback_database,
ErrorCollector* error_collector)
: mutex_(new internal::WrappedMutex),
fallback_database_(fallback_database),
default_error_collector_(error_collector),
underlay_(nullptr),
tables_(new Tables),
enforce_dependencies_(true),
lazily_build_dependencies_(false),
allow_unknown_(false),
enforce_weak_(false),
disallow_enforce_utf8_(false) {} | O0 | cpp | google::protobuf::DescriptorPool::DescriptorPool(google::protobuf::DescriptorDatabase*, google::protobuf::DescriptorPool::ErrorCollector*):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movl $0x28, %edi
callq 0x13450
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x28(%rsp)
callq 0x72b80
jmp 0x3466e
movq 0x20(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x28(%rsp), %rdx
movq %rdx, (%rcx)
movq 0x48(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x40(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq $0x0, 0x18(%rax)
addq $0x20, %rax
movq %rax, 0x8(%rsp)
movl $0x228, %edi # imm = 0x228
callq 0x13450
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
callq 0x31f00
jmp 0x346bf
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x74300
movq 0x20(%rsp), %rdi
movb $0x1, 0x28(%rdi)
movb $0x0, 0x29(%rdi)
movb $0x0, 0x2a(%rdi)
movb $0x0, 0x2b(%rdi)
movb $0x0, 0x2c(%rdi)
addq $0x30, %rdi
callq 0x74330
addq $0x58, %rsp
retq
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
callq 0x13400
jmp 0x34727
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
callq 0x13400
movq 0x38(%rsp), %rdi
callq 0x13750
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf14DescriptorPoolC2EPNS0_18DescriptorDatabaseEPNS1_14ErrorCollectorE:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov [rsp+58h+var_18], rdx
mov rax, [rsp+58h+var_8]
mov [rsp+58h+var_40], rax
mov [rsp+58h+var_38], rax
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax; this
mov rax, rdi
mov [rsp+58h+var_30], rax
call _ZN6google8protobuf8internal12WrappedMutexC2Ev; google::protobuf::internal::WrappedMutex::WrappedMutex(void)
jmp short $+2
loc_3466E:
mov rax, [rsp+58h+var_38]
mov rcx, [rsp+58h+var_40]
mov rdx, [rsp+58h+var_30]
mov [rcx], rdx
mov rcx, [rsp+58h+var_10]
mov [rax+8], rcx
mov rcx, [rsp+58h+var_18]
mov [rax+10h], rcx
mov qword ptr [rax+18h], 0
add rax, 20h ; ' '
mov [rsp+58h+var_50], rax
mov edi, 228h; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax; this
mov rax, rdi
mov [rsp+58h+var_48], rax
call _ZN6google8protobuf14DescriptorPool6TablesC2Ev; google::protobuf::DescriptorPool::Tables::Tables(void)
jmp short $+2
loc_346BF:
mov rsi, [rsp+58h+var_48]
mov rdi, [rsp+58h+var_50]
call _ZNSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEC2IS5_vEEPS3_; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::unique_ptr<std::default_delete<google::protobuf::DescriptorPool::Tables>,void>(google::protobuf::DescriptorPool::Tables*)
mov rdi, [rsp+58h+var_38]
mov byte ptr [rdi+28h], 1
mov byte ptr [rdi+29h], 0
mov byte ptr [rdi+2Ah], 0
mov byte ptr [rdi+2Bh], 0
mov byte ptr [rdi+2Ch], 0
add rdi, 30h ; '0'
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbSt4lessIS5_ESaISt4pairIKS5_bEEEC2Ev; std::map<std::string,bool>::map(void)
add rsp, 58h
retn
mov rdi, [rsp+arg_20]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
call __ZdlPv; operator delete(void *)
jmp short loc_34727
mov rdi, [rsp+arg_8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
call __ZdlPv; operator delete(void *)
loc_34727:
mov rdi, [rsp+arg_30]
call __Unwind_Resume
| long long google::protobuf::DescriptorPool::DescriptorPool(
google::protobuf::DescriptorPool *this,
google::protobuf::DescriptorDatabase *a2,
google::protobuf::DescriptorPool::ErrorCollector *a3)
{
google::protobuf::DescriptorPool::Tables *v4; // [rsp+10h] [rbp-48h]
google::protobuf::internal::WrappedMutex *v5; // [rsp+28h] [rbp-30h]
v5 = (google::protobuf::internal::WrappedMutex *)operator new(0x28uLL);
google::protobuf::internal::WrappedMutex::WrappedMutex(v5);
*(_QWORD *)this = v5;
*((_QWORD *)this + 1) = a2;
*((_QWORD *)this + 2) = a3;
*((_QWORD *)this + 3) = 0LL;
v4 = (google::protobuf::DescriptorPool::Tables *)operator new(0x228uLL);
google::protobuf::DescriptorPool::Tables::Tables(v4);
std::unique_ptr<google::protobuf::DescriptorPool::Tables>::unique_ptr<std::default_delete<google::protobuf::DescriptorPool::Tables>,void>(
(char *)this + 32,
v4);
*((_BYTE *)this + 40) = 1;
*((_BYTE *)this + 41) = 0;
*((_BYTE *)this + 42) = 0;
*((_BYTE *)this + 43) = 0;
*((_BYTE *)this + 44) = 0;
return std::map<std::string,bool>::map((char *)this + 48);
}
| DescriptorPool:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RAX
MOV EDI,0x28
CALL 0x00113450
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x28],RAX
LAB_00134667:
CALL 0x00172b80
LAB_0013466c:
JMP 0x0013466e
LAB_0013466e:
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x28]
MOV qword ptr [RCX],RDX
MOV RCX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],0x0
ADD RAX,0x20
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,0x228
CALL 0x00113450
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RAX
LAB_001346b8:
CALL 0x00131f00
LAB_001346bd:
JMP 0x001346bf
LAB_001346bf:
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00174300
MOV RDI,qword ptr [RSP + 0x20]
MOV byte ptr [RDI + 0x28],0x1
MOV byte ptr [RDI + 0x29],0x0
MOV byte ptr [RDI + 0x2a],0x0
MOV byte ptr [RDI + 0x2b],0x0
MOV byte ptr [RDI + 0x2c],0x0
ADD RDI,0x30
CALL 0x00174330
ADD RSP,0x58
RET
|
/* google::protobuf::DescriptorPool::DescriptorPool(google::protobuf::DescriptorDatabase*,
google::protobuf::DescriptorPool::ErrorCollector*) */
void __thiscall
google::protobuf::DescriptorPool::DescriptorPool
(DescriptorPool *this,DescriptorDatabase *param_1,ErrorCollector *param_2)
{
WrappedMutex *this_00;
Tables *this_01;
this_00 = (WrappedMutex *)operator_new(0x28);
/* try { // try from 00134667 to 0013466b has its CatchHandler @ 001346f5 */
internal::WrappedMutex::WrappedMutex(this_00);
*(WrappedMutex **)this = this_00;
*(DescriptorDatabase **)(this + 8) = param_1;
*(ErrorCollector **)(this + 0x10) = param_2;
*(int8 *)(this + 0x18) = 0;
this_01 = (Tables *)operator_new(0x228);
/* try { // try from 001346b8 to 001346bc has its CatchHandler @ 0013470f */
Tables::Tables(this_01);
std::
unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>
::unique_ptr<std::default_delete<google::protobuf::DescriptorPool::Tables>,void>
((unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>
*)(this + 0x20),this_01);
this[0x28] = (DescriptorPool)0x1;
this[0x29] = (DescriptorPool)0x0;
this[0x2a] = (DescriptorPool)0x0;
this[0x2b] = (DescriptorPool)0x0;
this[0x2c] = (DescriptorPool)0x0;
std::
map<std::__cxx11::string,bool,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,bool>>>
::map((map<std::__cxx11::string,bool,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,bool>>>
*)(this + 0x30));
return;
}
| |
35,912 | psi_cond_wait | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_cond_wait(mysql_cond_t *that, mysql_mutex_t *mutex,
const char *file, uint line)
{
PSI_cond_locker_state state;
PSI_cond_locker *locker= PSI_COND_CALL(start_cond_wait)
(&state, that->m_psi, mutex->m_psi, PSI_COND_WAIT, file, line);
int result= my_cond_wait(&that->m_cond, &mutex->m_mutex);
if (locker)
PSI_COND_CALL(end_cond_wait)(locker, result);
return result;
} | O3 | c | psi_cond_wait:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %ecx, %r9d
movq %rdx, %r8
movq %rsi, %r14
movq %rdi, %r15
leaq 0x360c76(%rip), %r12 # 0x390ed8
movq (%r12), %rax
movq 0x30(%rdi), %rsi
movq 0x40(%r14), %rdx
leaq -0x58(%rbp), %rdi
xorl %ecx, %ecx
callq *0x1c0(%rax)
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2a410
movl %eax, %r14d
testq %rbx, %rbx
je 0x302a0
movq (%r12), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1c8(%rax)
movl %r14d, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| psi_cond_wait:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov r9d, ecx
mov r8, rdx
mov r14, rsi
mov r15, rdi
lea r12, PSI_server
mov rax, [r12]
mov rsi, [rdi+30h]
mov rdx, [r14+40h]
lea rdi, [rbp+var_58]
xor ecx, ecx
call qword ptr [rax+1C0h]
mov rbx, rax
mov rdi, r15
mov rsi, r14
call _pthread_cond_wait
mov r14d, eax
test rbx, rbx
jz short loc_302A0
mov rax, [r12]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1C8h]
loc_302A0:
mov eax, r14d
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long psi_cond_wait(long long a1, long long a2, long long a3, unsigned int a4)
{
long long v4; // rbx
unsigned int v5; // r14d
_BYTE v7[88]; // [rsp+8h] [rbp-58h] BYREF
v4 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, _QWORD, long long, _QWORD))PSI_server[56])(
v7,
*(_QWORD *)(a1 + 48),
*(_QWORD *)(a2 + 64),
0LL,
a3,
a4);
v5 = pthread_cond_wait(a1, a2);
if ( v4 )
((void ( *)(long long, _QWORD))PSI_server[57])(v4, v5);
return v5;
}
| psi_cond_wait:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R9D,ECX
MOV R8,RDX
MOV R14,RSI
MOV R15,RDI
LEA R12,[0x490ed8]
MOV RAX,qword ptr [R12]
MOV RSI,qword ptr [RDI + 0x30]
MOV RDX,qword ptr [R14 + 0x40]
LEA RDI,[RBP + -0x58]
XOR ECX,ECX
CALL qword ptr [RAX + 0x1c0]
MOV RBX,RAX
MOV RDI,R15
MOV RSI,R14
CALL 0x0012a410
MOV R14D,EAX
TEST RBX,RBX
JZ 0x001302a0
MOV RAX,qword ptr [R12]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1c8]
LAB_001302a0:
MOV EAX,R14D
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int psi_cond_wait(pthread_cond_t *param_1,pthread_mutex_t *param_2,int8 param_3,
int4 param_4)
{
int iVar1;
long lVar2;
int1 local_60 [56];
lVar2 = (**(code **)(PSI_server + 0x1c0))
(local_60,param_1[1].__align,*(int8 *)((long)param_2 + 0x40),0,param_3,
param_4);
iVar1 = pthread_cond_wait(param_1,param_2);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1c8))(lVar2,iVar1);
}
return iVar1;
}
| |
35,913 | my_b_safe_write | eloqsql/mysys/mf_iocache.c | int my_b_safe_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
/*
Sasha: We are not writing this with the ? operator to avoid hitting
a possible compiler bug. At least gcc 2.95 cannot deal with
several layers of ternary operators that evaluated comma(,) operator
expressions inside - I do have a test case if somebody wants it
*/
if (info->type == SEQ_READ_APPEND)
return my_b_append(info, Buffer, Count);
return my_b_write(info, Buffer, Count);
} | O0 | c | my_b_safe_write:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x3, 0xb0(%rax)
jne 0xe6dc7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xe6a70
movl %eax, -0x4(%rbp)
jmp 0xe6ddb
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xe6df0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_b_safe_write:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
cmp dword ptr [rax+0B0h], 3
jnz short loc_E6DC7
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_b_append
mov [rbp+var_4], eax
jmp short loc_E6DDB
loc_E6DC7:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_b_write_3
mov [rbp+var_4], eax
loc_E6DDB:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long my_b_safe_write(long long a1, long long a2, unsigned long long a3)
{
if ( *(_DWORD *)(a1 + 176) == 3 )
return (unsigned int)my_b_append(a1, a2, a3);
else
return (unsigned int)my_b_write_3(a1, a2, a3);
}
| my_b_safe_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0xb0],0x3
JNZ 0x001e6dc7
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001e6a70
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001e6ddb
LAB_001e6dc7:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001e6df0
MOV dword ptr [RBP + -0x4],EAX
LAB_001e6ddb:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 my_b_safe_write(long param_1,int8 param_2,int8 param_3)
{
int4 local_c;
if (*(int *)(param_1 + 0xb0) == 3) {
local_c = my_b_append(param_1,param_2,param_3);
}
else {
local_c = my_b_write(param_1,param_2,param_3);
}
return local_c;
}
| |
35,914 | my_b_safe_write | eloqsql/mysys/mf_iocache.c | int my_b_safe_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
/*
Sasha: We are not writing this with the ? operator to avoid hitting
a possible compiler bug. At least gcc 2.95 cannot deal with
several layers of ternary operators that evaluated comma(,) operator
expressions inside - I do have a test case if somebody wants it
*/
if (info->type == SEQ_READ_APPEND)
return my_b_append(info, Buffer, Count);
return my_b_write(info, Buffer, Count);
} | O3 | c | my_b_safe_write:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
cmpl $0x3, 0xb0(%rdi)
jne 0x9b076
movq %r14, %rdi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x9ae1e
movq 0x40(%r14), %rdi
leaq (%rdi,%rbx), %rax
cmpq 0x48(%r14), %rax
jbe 0x9b093
movq %r14, %rdi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x9a617
testq %rbx, %rbx
je 0x9b0a4
movq %rbx, %rdx
callq 0x2a0a0
addq %rbx, 0x40(%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| my_b_safe_write:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdx
mov r14, rdi
cmp dword ptr [rdi+0B0h], 3
jnz short loc_9B076
mov rdi, r14
mov rdx, rbx
pop rbx
pop r14
pop rbp
jmp my_b_append
loc_9B076:
mov rdi, [r14+40h]
lea rax, [rdi+rbx]
cmp rax, [r14+48h]
jbe short loc_9B093
mov rdi, r14
mov rdx, rbx
pop rbx
pop r14
pop rbp
jmp _my_b_write
loc_9B093:
test rbx, rbx
jz short loc_9B0A4
mov rdx, rbx
call _memcpy
add [r14+40h], rbx
loc_9B0A4:
xor eax, eax
pop rbx
pop r14
pop rbp
retn
| long long my_b_safe_write(long long a1, const char *a2, unsigned long long a3)
{
long long v6; // rdi
if ( *(_DWORD *)(a1 + 176) == 3 )
return my_b_append(a1, (long long)a2, a3);
v6 = *(_QWORD *)(a1 + 64);
if ( v6 + a3 > *(_QWORD *)(a1 + 72) )
return my_b_write(a1, a2, a3);
if ( a3 )
{
memcpy(v6, a2, a3);
*(_QWORD *)(a1 + 64) += a3;
}
return 0LL;
}
| my_b_safe_write:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RDI
CMP dword ptr [RDI + 0xb0],0x3
JNZ 0x0019b076
MOV RDI,R14
MOV RDX,RBX
POP RBX
POP R14
POP RBP
JMP 0x0019ae1e
LAB_0019b076:
MOV RDI,qword ptr [R14 + 0x40]
LEA RAX,[RDI + RBX*0x1]
CMP RAX,qword ptr [R14 + 0x48]
JBE 0x0019b093
MOV RDI,R14
MOV RDX,RBX
POP RBX
POP R14
POP RBP
JMP 0x0019a617
LAB_0019b093:
TEST RBX,RBX
JZ 0x0019b0a4
MOV RDX,RBX
CALL 0x0012a0a0
ADD qword ptr [R14 + 0x40],RBX
LAB_0019b0a4:
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
int8 my_b_safe_write(long param_1,void *param_2,size_t param_3)
{
int8 uVar1;
if (*(int *)(param_1 + 0xb0) == 3) {
uVar1 = my_b_append(param_1,param_2,param_3);
return uVar1;
}
if (*(ulong *)(param_1 + 0x48) < (long)*(void **)(param_1 + 0x40) + param_3) {
uVar1 = _my_b_write(param_1,param_2,param_3);
return uVar1;
}
if (param_3 != 0) {
memcpy(*(void **)(param_1 + 0x40),param_2,param_3);
*(long *)(param_1 + 0x40) = *(long *)(param_1 + 0x40) + param_3;
}
return 0;
}
| |
35,915 | walk_and_copy | eloqsql/storage/myisam/ft_parser.c | static int walk_and_copy(FT_WORD *word,uint32 count,FT_DOCSTAT *docstat)
{
word->weight=LWS_IN_USE;
docstat->sum+=word->weight;
memcpy((docstat->list)++, word, sizeof(FT_WORD));
return 0;
} | O3 | c | walk_and_copy:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
testl %esi, %esi
je 0x73835
movl %esi, %eax
cvtsi2sd %rax, %xmm0
callq 0x29150
addsd 0x6d785(%rip), %xmm0 # 0xe0fb8
jmp 0x73839
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rbx)
addsd 0x10(%r14), %xmm0
movsd %xmm0, 0x10(%r14)
movq (%r14), %rax
leaq 0x18(%rax), %rcx
movq %rcx, (%r14)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
movups (%rbx), %xmm0
movups %xmm0, (%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| walk_and_copy_1:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rdx
mov rbx, rdi
test esi, esi
jz short loc_73835
mov eax, esi
cvtsi2sd xmm0, rax
call _log
addsd xmm0, cs:qword_E0FB8
jmp short loc_73839
loc_73835:
xorpd xmm0, xmm0
loc_73839:
movsd qword ptr [rbx+8], xmm0
addsd xmm0, qword ptr [r14+10h]
movsd qword ptr [r14+10h], xmm0
mov rax, [r14]
lea rcx, [rax+18h]
mov [r14], rcx
mov rcx, [rbx+10h]
mov [rax+10h], rcx
movups xmm0, xmmword ptr [rbx]
movups xmmword ptr [rax], xmm0
xor eax, eax
pop rbx
pop r14
pop rbp
retn
| long long walk_and_copy_1(long long a1, int a2, double *a3)
{
double v4; // xmm0_8
double v5; // rax
if ( a2 )
v4 = log((double)a2) + 1.0;
else
v4 = 0.0;
*(double *)(a1 + 8) = v4;
a3[2] = v4 + a3[2];
v5 = *a3;
*(_QWORD *)a3 += 24LL;
*(_QWORD *)(*(_QWORD *)&v5 + 16LL) = *(_QWORD *)(a1 + 16);
**(_OWORD **)&v5 = *(_OWORD *)a1;
return 0LL;
}
| walk_and_copy:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RDX
MOV RBX,RDI
TEST ESI,ESI
JZ 0x00173835
MOV EAX,ESI
CVTSI2SD XMM0,RAX
CALL 0x00129150
ADDSD XMM0,qword ptr [0x001e0fb8]
JMP 0x00173839
LAB_00173835:
XORPD XMM0,XMM0
LAB_00173839:
MOVSD qword ptr [RBX + 0x8],XMM0
ADDSD XMM0,qword ptr [R14 + 0x10]
MOVSD qword ptr [R14 + 0x10],XMM0
MOV RAX,qword ptr [R14]
LEA RCX,[RAX + 0x18]
MOV qword ptr [R14],RCX
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS xmmword ptr [RAX],XMM0
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
int8 walk_and_copy(int8 *param_1,uint param_2,long *param_3)
{
int8 *puVar1;
double dVar2;
int8 uVar3;
if (param_2 == 0) {
dVar2 = 0.0;
}
else {
dVar2 = log((double)param_2);
dVar2 = dVar2 + DAT_001e0fb8;
}
param_1[1] = dVar2;
param_3[2] = (long)(dVar2 + (double)param_3[2]);
puVar1 = (int8 *)*param_3;
*param_3 = (long)(puVar1 + 3);
puVar1[2] = param_1[2];
uVar3 = param_1[1];
*puVar1 = *param_1;
puVar1[1] = uVar3;
return 0;
}
| |
35,916 | google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set_heavy.cc | size_t ExtensionSet::SpaceUsedExcludingSelfLong() const {
size_t total_size =
(is_large() ? map_.large->size() : flat_capacity_) * sizeof(KeyValue);
ForEach([&total_size](int /* number */, const Extension& ext) {
total_size += ext.SpaceUsedExcludingSelfLong();
});
return total_size;
} | O0 | cpp | google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong() const:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x487ac0
testb $0x1, %al
jne 0x55ecae
jmp 0x55ecc3
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x5611a0
movq %rax, 0x8(%rsp)
jmp 0x55ecd1
movq 0x10(%rsp), %rax
movzwl 0x8(%rax), %eax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
shlq $0x5, %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rsi
callq 0x55ed10
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
addq $0x38, %rsp
retq
nopw (%rax,%rax)
| _ZNK6google8protobuf8internal12ExtensionSet26SpaceUsedExcludingSelfLongEv:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov rdi, [rsp+38h+var_8]; this
mov [rsp+38h+var_28], rdi
call _ZNK6google8protobuf8internal12ExtensionSet8is_largeEv; google::protobuf::internal::ExtensionSet::is_large(void)
test al, 1
jnz short loc_55ECAE
jmp short loc_55ECC3
loc_55ECAE:
mov rax, [rsp+38h+var_28]
mov rdi, [rax+10h]
call _ZNKSt3mapIiN6google8protobuf8internal12ExtensionSet9ExtensionESt4lessIiESaISt4pairIKiS4_EEE4sizeEv; std::map<int,google::protobuf::internal::ExtensionSet::Extension>::size(void)
mov [rsp+38h+var_30], rax
jmp short loc_55ECD1
loc_55ECC3:
mov rax, [rsp+38h+var_28]
movzx eax, word ptr [rax+8]
mov [rsp+38h+var_30], rax
loc_55ECD1:
mov rdi, [rsp+38h+var_28]
mov rax, [rsp+38h+var_30]
shl rax, 5
mov [rsp+38h+var_10], rax
lea rax, [rsp+38h+var_10]
mov [rsp+38h+var_18], rax
mov rsi, [rsp+38h+var_18]
call _ZNK6google8protobuf8internal12ExtensionSet7ForEachIZNKS2_26SpaceUsedExcludingSelfLongEvE3$_0EET_S5_; google::protobuf::internal::ExtensionSet::ForEach<google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong(void)::$_0>(google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong(void)::$_0)
mov [rsp+38h+var_20], rax
mov rax, [rsp+38h+var_10]
add rsp, 38h
retn
| long long google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong(
google::protobuf::internal::ExtensionSet *this)
{
long long v2; // [rsp+8h] [rbp-30h]
_QWORD v3[2]; // [rsp+28h] [rbp-10h] BYREF
v3[1] = this;
if ( google::protobuf::internal::ExtensionSet::is_large(this) )
v2 = std::map<int,google::protobuf::internal::ExtensionSet::Extension>::size(*((_QWORD *)this + 2));
else
v2 = *((unsigned __int16 *)this + 4);
v3[0] = 32 * v2;
google::protobuf::internal::ExtensionSet::ForEach<google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong(void)::$_0>(
this,
v3);
return v3[0];
}
| __move_merge<google::protobuf::Message_const**,__gnu_cxx::__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>>,__gnu_cxx::__ops::_Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator>>:
SUB RSP,0x78
MOV qword ptr [RSP + 0x68],R8
MOV qword ptr [RSP + 0x60],R9
MOV qword ptr [RSP + 0x58],RDI
MOV qword ptr [RSP + 0x50],RSI
MOV qword ptr [RSP + 0x48],RDX
MOV qword ptr [RSP + 0x40],RCX
LAB_0055ecb2:
MOV RCX,qword ptr [RSP + 0x58]
XOR EAX,EAX
CMP RCX,qword ptr [RSP + 0x50]
MOV byte ptr [RSP + 0x2f],AL
JZ 0x0055ecd5
MOV RAX,qword ptr [RSP + 0x48]
CMP RAX,qword ptr [RSP + 0x40]
SETNZ AL
MOV byte ptr [RSP + 0x2f],AL
LAB_0055ecd5:
MOV AL,byte ptr [RSP + 0x2f]
TEST AL,0x1
JNZ 0x0055ece2
JMP 0x0055ed67
LAB_0055ece2:
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x58]
LEA RDI,[RSP + 0x60]
CALL 0x0055edd0
TEST AL,0x1
JNZ 0x0055ecfc
JMP 0x0055ed2b
LAB_0055ecfc:
MOV RAX,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x20],RAX
LEA RDI,[RSP + 0x68]
CALL 0x0055ca70
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0x48]
ADD RAX,0x8
MOV qword ptr [RSP + 0x48],RAX
JMP 0x0055ed58
LAB_0055ed2b:
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x68]
CALL 0x0055ca70
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0x58]
ADD RAX,0x8
MOV qword ptr [RSP + 0x58],RAX
LAB_0055ed58:
LEA RDI,[RSP + 0x68]
CALL 0x0055cbe0
JMP 0x0055ecb2
LAB_0055ed67:
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x30],RAX
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x0055ee10
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x38],RAX
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x0055ee10
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x70]
ADD RSP,0x78
RET
|
/* __gnu_cxx::__normal_iterator<google::protobuf::Message const**,
std::vector<google::protobuf::Message const*, std::allocator<google::protobuf::Message const*> >
> std::__move_merge<google::protobuf::Message const**,
__gnu_cxx::__normal_iterator<google::protobuf::Message const**,
std::vector<google::protobuf::Message const*, std::allocator<google::protobuf::Message const*> >
>,
__gnu_cxx::__ops::_Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator>
>(google::protobuf::Message const**, google::protobuf::Message const**, google::protobuf::Message
const**, google::protobuf::Message const**,
__gnu_cxx::__normal_iterator<google::protobuf::Message const**,
std::vector<google::protobuf::Message const*, std::allocator<google::protobuf::Message const*> >
>,
__gnu_cxx::__ops::_Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator>)
*/
int8
std::
__move_merge<google::protobuf::Message_const**,__gnu_cxx::__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>>,__gnu_cxx::__ops::_Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator>>
(Message **param_1,Message **param_2,Message **param_3,Message **param_4,
int8 param_5,int8 param_6)
{
Message *pMVar1;
bool bVar2;
int8 *puVar3;
int8 uVar4;
Message **local_30;
Message **local_20;
int8 local_18;
int8 local_10 [2];
local_30 = param_3;
local_20 = param_1;
local_18 = param_6;
local_10[0] = param_5;
while (local_20 != param_2 && local_30 != param_4) {
bVar2 = __gnu_cxx::__ops::
_Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator>::
operator()((_Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator>
*)&local_18,local_30,local_20);
if (bVar2) {
pMVar1 = *local_30;
puVar3 = (int8 *)
__gnu_cxx::
__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>>
::operator*((__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>>
*)local_10);
*puVar3 = pMVar1;
local_30 = local_30 + 1;
}
else {
pMVar1 = *local_20;
puVar3 = (int8 *)
__gnu_cxx::
__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>>
::operator*((__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>>
*)local_10);
*puVar3 = pMVar1;
local_20 = local_20 + 1;
}
__gnu_cxx::
__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>>
::operator++((__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>>
*)local_10);
}
uVar4 = move<google::protobuf::Message_const**,__gnu_cxx::__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>>>
(local_20,param_2,local_10[0]);
uVar4 = move<google::protobuf::Message_const**,__gnu_cxx::__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>>>
(local_30,param_4,uVar4);
return uVar4;
}
| |
35,917 | nglog::LogDestination::SetLogFilenameExtension(char const*) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::SetLogFilenameExtension(const char* ext) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
std::lock_guard<std::mutex> l{log_mutex};
for (int severity = 0; severity < NUM_SEVERITIES; ++severity) {
log_destination(static_cast<LogSeverity>(severity))
->fileobject_.SetExtension(ext);
}
} | O2 | cpp | nglog::LogDestination::SetLogFilenameExtension(char const*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x305ab(%rip), %rdi # 0x40db8
callq 0x1cc5e
xorl %r14d, %r14d
cmpl $0x4, %r14d
je 0x10886
movl %r14d, %edi
callq 0x103c8
movq %rax, %r12
leaq 0x8(%rax), %r15
movq %r15, %rdi
callq 0x1cc5e
leaq 0x78(%r12), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x112b2
testb %al, %al
je 0x10879
cmpq $0x0, 0x98(%r12)
je 0x1086e
movq %r12, %rdi
addq $0x98, %rdi
xorl %esi, %esi
callq 0xb0c6
movl $0x1f, 0xb0(%r12)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x8ad0
movq %r15, %rdi
callq 0x8450
incl %r14d
jmp 0x10815
leaq 0x3052b(%rip), %rdi # 0x40db8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x8450
movq %rax, %rbx
movq %r15, %rdi
callq 0x8450
jmp 0x108ab
movq %rax, %rbx
leaq 0x30506(%rip), %rdi # 0x40db8
callq 0x8450
movq %rbx, %rdi
callq 0x8a40
nop
| _ZN5nglog14LogDestination23SetLogFilenameExtensionEPKc:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdi
lea rdi, _ZN5nglogL9log_mutexE; this
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
xor r14d, r14d
loc_10815:
cmp r14d, 4
jz short loc_10886
mov edi, r14d
call _ZN5nglog14LogDestination15log_destinationENS_11LogSeverityE; nglog::LogDestination::log_destination(nglog::LogSeverity)
mov r12, rax
lea r15, [rax+8]
mov rdi, r15; this
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
lea r13, [r12+78h]
mov rdi, r13
mov rsi, rbx
call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator!=<char>(std::string const&,char const*)
test al, al
jz short loc_10879
cmp qword ptr [r12+98h], 0
jz short loc_1086E
mov rdi, r12
add rdi, 98h
xor esi, esi
call _ZNSt15__uniq_ptr_implI8_IO_FILESt14default_deleteIS0_EE5resetEPS0_; std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset(_IO_FILE*)
mov dword ptr [r12+0B0h], 1Fh
loc_1086E:
mov rdi, r13
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
loc_10879:
mov rdi, r15
call _pthread_mutex_unlock
inc r14d
jmp short loc_10815
loc_10886:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp _pthread_mutex_unlock
mov rbx, rax
mov rdi, r15
call _pthread_mutex_unlock
jmp short loc_108AB
mov rbx, rax
loc_108AB:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogDestination::SetLogFilenameExtension(nglog::LogDestination *this, const char *a2)
{
int i; // r14d
long long v3; // r12
std::mutex::lock((std::mutex *)&nglog::log_mutex);
for ( i = 0; i != 4; ++i )
{
v3 = nglog::LogDestination::log_destination(i);
std::mutex::lock((std::mutex *)(v3 + 8));
if ( (unsigned __int8)std::operator!=<char>(v3 + 120, this) )
{
if ( *(_QWORD *)(v3 + 152) )
{
std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset((_QWORD *)(v3 + 152), 0LL);
*(_DWORD *)(v3 + 176) = 31;
}
std::string::assign(v3 + 120, this);
}
pthread_mutex_unlock(v3 + 8);
}
return pthread_mutex_unlock(&nglog::log_mutex);
}
| SetLogFilenameExtension:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDI
LEA RDI,[0x140db8]
CALL 0x0011cc5e
XOR R14D,R14D
LAB_00110815:
CMP R14D,0x4
JZ 0x00110886
LAB_0011081b:
MOV EDI,R14D
CALL 0x001103c8
MOV R12,RAX
LEA R15,[RAX + 0x8]
MOV RDI,R15
CALL 0x0011cc5e
LEA R13,[R12 + 0x78]
LAB_00110837:
MOV RDI,R13
MOV RSI,RBX
CALL 0x001112b2
TEST AL,AL
JZ 0x00110879
CMP qword ptr [R12 + 0x98],0x0
JZ 0x0011086e
MOV RDI,R12
ADD RDI,0x98
XOR ESI,ESI
CALL 0x0010b0c6
MOV dword ptr [R12 + 0xb0],0x1f
LAB_0011086e:
MOV RDI,R13
MOV RSI,RBX
CALL 0x00108ad0
LAB_00110879:
MOV RDI,R15
CALL 0x00108450
INC R14D
JMP 0x00110815
LAB_00110886:
LEA RDI,[0x140db8]
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x00108450
|
/* nglog::LogDestination::SetLogFilenameExtension(char const*) */
void nglog::LogDestination::SetLogFilenameExtension(char *param_1)
{
bool bVar1;
long lVar2;
int iVar3;
std::mutex::lock((mutex *)log_mutex);
for (iVar3 = 0; iVar3 != 4; iVar3 = iVar3 + 1) {
/* try { // try from 0011081b to 00110831 has its CatchHandler @ 001108a8 */
lVar2 = log_destination(iVar3);
std::mutex::lock((mutex *)&((pthread_mutex_t *)(lVar2 + 8))->__data);
/* try { // try from 00110837 to 00110878 has its CatchHandler @ 0011089b */
bVar1 = std::operator!=((string *)(lVar2 + 0x78),param_1);
if (bVar1) {
if (*(long *)(lVar2 + 0x98) != 0) {
std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset
((__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>> *)(lVar2 + 0x98),
(_IO_FILE *)0x0);
*(int4 *)(lVar2 + 0xb0) = 0x1f;
}
std::__cxx11::string::assign((char *)(lVar2 + 0x78));
}
pthread_mutex_unlock((pthread_mutex_t *)(lVar2 + 8));
}
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return;
}
| |
35,918 | findopt | eloqsql/mysys/my_getopt.c | static int findopt(char *optpat, uint length,
const struct my_option **opt_res,
const char **ffname)
{
uint count;
const struct my_option *opt= *opt_res;
DBUG_ENTER("findopt");
for (count= 0; opt->name; opt++)
{
if (!getopt_compare_strings(opt->name, optpat, length)) /* match found */
{
(*opt_res)= opt;
if (!opt->name[length]) /* Exact match */
DBUG_RETURN(1);
if (!my_getopt_prefix_matching)
continue;
if (!count)
{
/* We only need to know one prev */
count= 1;
*ffname= opt->name;
}
else if (strcmp(*ffname, opt->name))
{
/*
The above test is to not count same option twice
(see mysql.cc, option "help")
*/
count++;
}
}
}
if (count == 1)
my_getopt_error_reporter(INFORMATION_LEVEL,
"Using unique option prefix '%.*s' is error-prone "
"and can break in the future. "
"Please use the full name '%s' instead.",
length, optpat, *ffname);
DBUG_RETURN(count);
} | O3 | c | findopt:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, -0x38(%rbp)
movq (%rdx), %r15
movq (%r15), %rax
testq %rax, %rax
je 0x2e38b
movq %rdx, %r12
movl %esi, %r10d
movq %rdi, %rbx
movl %esi, %r13d
leaq 0x2cc066(%rip), %rcx # 0x2fa329
movb (%rcx), %r9b
xorl %edi, %edi
movl $0x5f, %r14d
movl %esi, -0x3c(%rbp)
movb %r9b, -0x29(%rbp)
testl %r10d, %r10d
je 0x2e302
xorl %ecx, %ecx
movzbl (%rax,%rcx), %r8d
cmpb $0x2d, %r8b
cmovel %r14d, %r8d
movzbl (%rbx,%rcx), %esi
cmpb $0x2d, %sil
cmovel %r14d, %esi
cmpb %sil, %r8b
jne 0x2e349
incq %rcx
cmpq %rcx, %r13
jne 0x2e2dc
movq %r15, (%r12)
movq (%r15), %rsi
cmpb $0x0, (%rsi,%r13)
je 0x2e384
testb %r9b, %r9b
je 0x2e349
testl %edi, %edi
je 0x2e33d
movq -0x38(%rbp), %rax
movq %rdi, -0x48(%rbp)
movq (%rax), %rdi
callq 0x244d0
movb -0x29(%rbp), %r9b
movq -0x48(%rbp), %rdi
movl -0x3c(%rbp), %r10d
cmpl $0x1, %eax
sbbl $-0x1, %edi
jmp 0x2e349
movq -0x38(%rbp), %rax
movq %rsi, (%rax)
movl $0x1, %edi
movq 0x70(%r15), %rax
addq $0x70, %r15
testq %rax, %rax
jne 0x2e2d5
cmpl $0x1, %edi
jne 0x2e38d
leaq 0x2cbfa2(%rip), %r9 # 0x2fa308
movq -0x38(%rbp), %rax
movq (%rax), %r8
leaq 0x36997(%rip), %rsi # 0x64d0b
movl $0x2, %edi
movl %r10d, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq *(%r9)
movl $0x1, %edi
jmp 0x2e38d
xorl %edi, %edi
movl %edi, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| findopt:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp+var_38], rcx
mov r15, [rdx]
mov rax, [r15]
test rax, rax
jz loc_2E38B
mov r12, rdx
mov r10d, esi
mov rbx, rdi
mov r13d, esi
lea rcx, my_getopt_prefix_matching
mov r9b, [rcx]
xor edi, edi
mov r14d, 5Fh ; '_'
mov [rbp+var_3C], esi
mov [rbp+var_29], r9b
loc_2E2D5:
test r10d, r10d
jz short loc_2E302
xor ecx, ecx
loc_2E2DC:
movzx r8d, byte ptr [rax+rcx]
cmp r8b, 2Dh ; '-'
cmovz r8d, r14d
movzx esi, byte ptr [rbx+rcx]
cmp sil, 2Dh ; '-'
cmovz esi, r14d
cmp r8b, sil
jnz short loc_2E349
inc rcx
cmp r13, rcx
jnz short loc_2E2DC
loc_2E302:
mov [r12], r15
mov rsi, [r15]
cmp byte ptr [rsi+r13], 0
jz short loc_2E384
test r9b, r9b
jz short loc_2E349
test edi, edi
jz short loc_2E33D
mov rax, [rbp+var_38]
mov [rbp+var_48], rdi
mov rdi, [rax]
call _strcmp
mov r9b, [rbp+var_29]
mov rdi, [rbp+var_48]
mov r10d, [rbp+var_3C]
cmp eax, 1
sbb edi, 0FFFFFFFFh
jmp short loc_2E349
loc_2E33D:
mov rax, [rbp+var_38]
mov [rax], rsi
mov edi, 1
loc_2E349:
mov rax, [r15+70h]
add r15, 70h ; 'p'
test rax, rax
jnz loc_2E2D5
cmp edi, 1
jnz short loc_2E38D
lea r9, my_getopt_error_reporter
mov rax, [rbp+var_38]
mov r8, [rax]
lea rsi, aUsingUniqueOpt; "Using unique option prefix '%.*s' is er"...
mov edi, 2
mov edx, r10d
mov rcx, rbx
xor eax, eax
call qword ptr [r9]
loc_2E384:
mov edi, 1
jmp short loc_2E38D
loc_2E38B:
xor edi, edi
loc_2E38D:
mov eax, edi
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long findopt(const char *a1, unsigned int a2, long long **a3, const char **a4)
{
long long *v4; // r15
long long v5; // rax
int v7; // r10d
long long v9; // r13
char v10; // r9
unsigned int v11; // edi
long long v12; // rcx
char v13; // r8
char v14; // si
const char *v15; // rsi
int v16; // eax
char v20; // [rsp+27h] [rbp-29h]
v4 = *a3;
v5 = **a3;
if ( v5 )
{
v7 = a2;
v9 = a2;
v10 = my_getopt_prefix_matching;
v11 = 0;
v20 = my_getopt_prefix_matching;
do
{
if ( v7 )
{
v12 = 0LL;
while ( 1 )
{
v13 = *(_BYTE *)(v5 + v12);
if ( v13 == 45 )
v13 = 95;
v14 = a1[v12];
if ( v14 == 45 )
v14 = 95;
if ( v13 != v14 )
break;
if ( v9 == ++v12 )
goto LABEL_11;
}
}
else
{
LABEL_11:
*a3 = v4;
v15 = (const char *)*v4;
if ( !*(_BYTE *)(*v4 + v9) )
return 1;
if ( v10 )
{
if ( v11 )
{
v16 = strcmp(*a4, v15);
v10 = v20;
v7 = a2;
v11 -= (v16 == 0) - 1;
}
else
{
*a4 = v15;
v11 = 1;
}
}
}
v5 = v4[14];
v4 += 14;
}
while ( v5 );
if ( v11 != 1 )
return v11;
my_getopt_error_reporter(
2,
"Using unique option prefix '%.*s' is error-prone and can break in the future. Please use the full name '%s' instead.",
v7,
a1,
*a4);
return 1;
}
else
{
return 0;
}
}
| findopt:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x38],RCX
MOV R15,qword ptr [RDX]
MOV RAX,qword ptr [R15]
TEST RAX,RAX
JZ 0x0012e38b
MOV R12,RDX
MOV R10D,ESI
MOV RBX,RDI
MOV R13D,ESI
LEA RCX,[0x3fa329]
MOV R9B,byte ptr [RCX]
XOR EDI,EDI
MOV R14D,0x5f
MOV dword ptr [RBP + -0x3c],ESI
MOV byte ptr [RBP + -0x29],R9B
LAB_0012e2d5:
TEST R10D,R10D
JZ 0x0012e302
XOR ECX,ECX
LAB_0012e2dc:
MOVZX R8D,byte ptr [RAX + RCX*0x1]
CMP R8B,0x2d
CMOVZ R8D,R14D
MOVZX ESI,byte ptr [RBX + RCX*0x1]
CMP SIL,0x2d
CMOVZ ESI,R14D
CMP R8B,SIL
JNZ 0x0012e349
INC RCX
CMP R13,RCX
JNZ 0x0012e2dc
LAB_0012e302:
MOV qword ptr [R12],R15
MOV RSI,qword ptr [R15]
CMP byte ptr [RSI + R13*0x1],0x0
JZ 0x0012e384
TEST R9B,R9B
JZ 0x0012e349
TEST EDI,EDI
JZ 0x0012e33d
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],RDI
MOV RDI,qword ptr [RAX]
CALL 0x001244d0
MOV R9B,byte ptr [RBP + -0x29]
MOV RDI,qword ptr [RBP + -0x48]
MOV R10D,dword ptr [RBP + -0x3c]
CMP EAX,0x1
SBB EDI,-0x1
JMP 0x0012e349
LAB_0012e33d:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RSI
MOV EDI,0x1
LAB_0012e349:
MOV RAX,qword ptr [R15 + 0x70]
ADD R15,0x70
TEST RAX,RAX
JNZ 0x0012e2d5
CMP EDI,0x1
JNZ 0x0012e38d
LEA R9,[0x3fa308]
MOV RAX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RAX]
LEA RSI,[0x164d0b]
MOV EDI,0x2
MOV EDX,R10D
MOV RCX,RBX
XOR EAX,EAX
CALL qword ptr [R9]
LAB_0012e384:
MOV EDI,0x1
JMP 0x0012e38d
LAB_0012e38b:
XOR EDI,EDI
LAB_0012e38d:
MOV EAX,EDI
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int findopt(long param_1,uint param_2,int8 *param_3,int8 *param_4)
{
char *__s2;
char cVar1;
int iVar2;
long lVar3;
ulong uVar4;
char cVar5;
int iVar6;
char cVar7;
long *plVar8;
cVar1 = my_getopt_prefix_matching;
plVar8 = (long *)*param_3;
lVar3 = *plVar8;
if (lVar3 == 0) {
iVar6 = 0;
}
else {
iVar6 = 0;
do {
if (param_2 != 0) {
uVar4 = 0;
do {
cVar7 = *(char *)(lVar3 + uVar4);
if (*(char *)(lVar3 + uVar4) == '-') {
cVar7 = '_';
}
cVar5 = *(char *)(param_1 + uVar4);
if (cVar5 == '-') {
cVar5 = '_';
}
if (cVar7 != cVar5) goto LAB_0012e349;
uVar4 = uVar4 + 1;
} while (param_2 != uVar4);
}
*param_3 = plVar8;
__s2 = (char *)*plVar8;
if (__s2[param_2] == '\0') goto LAB_0012e384;
if (cVar1 != '\0') {
if (iVar6 == 0) {
*param_4 = __s2;
iVar6 = 1;
}
else {
iVar2 = strcmp((char *)*param_4,__s2);
iVar6 = (iVar6 + 1) - (uint)(iVar2 == 0);
}
}
LAB_0012e349:
lVar3 = plVar8[0xe];
plVar8 = plVar8 + 0xe;
} while (lVar3 != 0);
if (iVar6 == 1) {
(*(code *)my_getopt_error_reporter)
(2,
"Using unique option prefix \'%.*s\' is error-prone and can break in the future. Please use the full name \'%s\' instead."
,param_2,param_1,*param_4);
LAB_0012e384:
iVar6 = 1;
}
}
return iVar6;
}
| |
35,919 | test_bug15518 | eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c | static int test_bug15518(MYSQL *mysql)
{
MYSQL_STMT *stmt;
int rc;
stmt= mysql_stmt_init(mysql);
/*
The prepare of foo should fail with errno 1064 since
it's not a valid query
*/
rc= mysql_stmt_prepare(stmt, "foo", 3);
FAIL_UNLESS(rc && mysql_stmt_errno(stmt) && mysql_errno(mysql), "Error expected");
/*
Use the same stmt and reprepare with another query that
succeeds
*/
rc= mysql_stmt_prepare(stmt, "SHOW STATUS", 12);
FAIL_UNLESS(!rc || mysql_stmt_errno(stmt) || mysql_errno(mysql), "Error not expected");
rc= mysql_stmt_close(stmt);
check_mysql_rc(rc, mysql);
/*
part2, when connection to server has been closed
after first prepare
*/
stmt= mysql_stmt_init(mysql);
rc= mysql_stmt_prepare(stmt, "foo", 3);
FAIL_UNLESS(rc && mysql_stmt_errno(stmt) && mysql_errno(mysql), "Error expected");
/* Close connection to server */
mysql_close(mysql);
/*
Use the same stmt and reprepare with another query that
succeeds. The prepare should fail with error 2013 since
connection to server has been closed.
*/
rc= mysql_stmt_prepare(stmt, "SHOW STATUS", 12);
FAIL_UNLESS(rc && mysql_stmt_errno(stmt), "Error expected");
mysql_stmt_close(stmt);
return OK;
} | O0 | c | test_bug15518:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x44950
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x4739e(%rip), %rsi # 0x68172
movl $0x3, %edx
callq 0x45070
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x20e03
movq -0x18(%rbp), %rdi
callq 0x43fb0
cmpl $0x0, %eax
je 0x20e03
movq -0x10(%rbp), %rdi
callq 0x3c3c0
cmpl $0x0, %eax
jne 0x20e30
leaq 0x44786(%rip), %rdi # 0x65590
leaq 0x46978(%rip), %rsi # 0x67789
leaq 0x45255(%rip), %rdx # 0x6606d
movl $0x2e0, %ecx # imm = 0x2E0
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x20fe2
jmp 0x20e32
movq -0x18(%rbp), %rdi
leaq 0x47339(%rip), %rsi # 0x68176
movl $0xc, %edx
callq 0x45070
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x20e99
movq -0x18(%rbp), %rdi
callq 0x43fb0
cmpl $0x0, %eax
jne 0x20e99
movq -0x10(%rbp), %rdi
callq 0x3c3c0
cmpl $0x0, %eax
jne 0x20e99
leaq 0x4471d(%rip), %rdi # 0x65590
leaq 0x47308(%rip), %rsi # 0x68182
leaq 0x451ec(%rip), %rdx # 0x6606d
movl $0x2e7, %ecx # imm = 0x2E7
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x20fe2
jmp 0x20e9b
movq -0x18(%rbp), %rdi
callq 0x43eb0
movsbl %al, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x20efc
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x2c(%rbp), %esi
movq -0x28(%rbp), %rdx
movl %eax, %ecx
leaq 0x447f9(%rip), %rdi # 0x656d5
leaq 0x4518a(%rip), %r8 # 0x6606d
movl $0x2ea, %r9d # imm = 0x2EA
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x20fe2
jmp 0x20efe
movq -0x10(%rbp), %rdi
callq 0x44950
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x4725c(%rip), %rsi # 0x68172
movl $0x3, %edx
callq 0x45070
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x20f45
movq -0x18(%rbp), %rdi
callq 0x43fb0
cmpl $0x0, %eax
je 0x20f45
movq -0x10(%rbp), %rdi
callq 0x3c3c0
cmpl $0x0, %eax
jne 0x20f6f
leaq 0x44644(%rip), %rdi # 0x65590
leaq 0x46836(%rip), %rsi # 0x67789
leaq 0x45113(%rip), %rdx # 0x6606d
movl $0x2f1, %ecx # imm = 0x2F1
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x20fe2
jmp 0x20f71
movq -0x10(%rbp), %rdi
callq 0x381f0
movq -0x18(%rbp), %rdi
leaq 0x471f1(%rip), %rsi # 0x68176
movl $0xc, %edx
callq 0x45070
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x20fa6
movq -0x18(%rbp), %rdi
callq 0x43fb0
cmpl $0x0, %eax
jne 0x20fd0
leaq 0x445e3(%rip), %rdi # 0x65590
leaq 0x467d5(%rip), %rsi # 0x67789
leaq 0x450b2(%rip), %rdx # 0x6606d
movl $0x2fc, %ecx # imm = 0x2FC
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x20fe2
jmp 0x20fd2
movq -0x18(%rbp), %rdi
callq 0x43eb0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| test_bug15518:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
call mysql_stmt_init
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
lea rsi, aFoo; "foo"
mov edx, 3
call mysql_stmt_prepare
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_20E03
mov rdi, [rbp+var_18]
call mysql_stmt_errno
cmp eax, 0
jz short loc_20E03
mov rdi, [rbp+var_10]
call mysql_errno
cmp eax, 0
jnz short loc_20E30
loc_20E03:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aNoErrorExpecte+3; "Error expected"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 2E0h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_20FE2
loc_20E30:
jmp short $+2
loc_20E32:
mov rdi, [rbp+var_18]
lea rsi, aShowStatus; "SHOW STATUS"
mov edx, 0Ch
call mysql_stmt_prepare
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_20E99
mov rdi, [rbp+var_18]
call mysql_stmt_errno
cmp eax, 0
jnz short loc_20E99
mov rdi, [rbp+var_10]
call mysql_errno
cmp eax, 0
jnz short loc_20E99
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aErrorNotExpect; "Error not expected"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 2E7h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_20FE2
loc_20E99:
jmp short $+2
loc_20E9B:
mov rdi, [rbp+var_18]
call mysql_stmt_close
movsx eax, al
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_20EFC
mov eax, [rbp+var_1C]
mov [rbp+var_2C], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_2C]
mov rdx, [rbp+var_28]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 2EAh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_20FE2
loc_20EFC:
jmp short $+2
loc_20EFE:
mov rdi, [rbp+var_10]
call mysql_stmt_init
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
lea rsi, aFoo; "foo"
mov edx, 3
call mysql_stmt_prepare
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_20F45
mov rdi, [rbp+var_18]
call mysql_stmt_errno
cmp eax, 0
jz short loc_20F45
mov rdi, [rbp+var_10]
call mysql_errno
cmp eax, 0
jnz short loc_20F6F
loc_20F45:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aNoErrorExpecte+3; "Error expected"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 2F1h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_20FE2
loc_20F6F:
jmp short $+2
loc_20F71:
mov rdi, [rbp+var_10]
call mysql_close
mov rdi, [rbp+var_18]
lea rsi, aShowStatus; "SHOW STATUS"
mov edx, 0Ch
call mysql_stmt_prepare
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_20FA6
mov rdi, [rbp+var_18]
call mysql_stmt_errno
cmp eax, 0
jnz short loc_20FD0
loc_20FA6:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aNoErrorExpecte+3; "Error expected"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 2FCh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_20FE2
loc_20FD0:
jmp short $+2
loc_20FD2:
mov rdi, [rbp+var_18]
call mysql_stmt_close
mov [rbp+var_4], 0
loc_20FE2:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long test_bug15518(long long a1)
{
int v1; // r8d
int v2; // r9d
int v3; // r8d
int v4; // r9d
char v5; // al
int v6; // eax
int v7; // r8d
int v8; // r9d
int v9; // r8d
int v10; // r9d
int v12; // [rsp+8h] [rbp-28h]
int v13; // [rsp+14h] [rbp-1Ch]
long long v14; // [rsp+18h] [rbp-18h]
long long v15; // [rsp+18h] [rbp-18h]
v14 = mysql_stmt_init(a1);
if ( (unsigned int)mysql_stmt_prepare(v14, "foo", 3LL)
&& (unsigned int)mysql_stmt_errno(v14)
&& (unsigned int)mysql_errno(a1) )
{
if ( !(unsigned int)mysql_stmt_prepare(v14, "SHOW STATUS", 12LL)
|| (unsigned int)mysql_stmt_errno(v14)
|| (unsigned int)mysql_errno(a1) )
{
v5 = mysql_stmt_close(v14);
v13 = v5;
if ( v5 )
{
v12 = mysql_error(a1);
v6 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v13,
v12,
v6,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
746);
return 1;
}
else
{
v15 = mysql_stmt_init(a1);
if ( (unsigned int)mysql_stmt_prepare(v15, "foo", 3LL)
&& (unsigned int)mysql_stmt_errno(v15)
&& (unsigned int)mysql_errno(a1) )
{
mysql_close(a1);
if ( (unsigned int)mysql_stmt_prepare(v15, "SHOW STATUS", 12LL) && (unsigned int)mysql_stmt_errno(v15) )
{
mysql_stmt_close(v15);
return 0;
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Error expected",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
764,
v9,
v10);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Error expected",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
753,
v7,
v8);
return 1;
}
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Error not expected",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
743,
v3,
v4);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Error expected",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
736,
v1,
v2);
return 1;
}
}
| test_bug15518:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00144950
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x168172]
MOV EDX,0x3
CALL 0x00145070
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00120e03
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fb0
CMP EAX,0x0
JZ 0x00120e03
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
CMP EAX,0x0
JNZ 0x00120e30
LAB_00120e03:
LEA RDI,[0x165590]
LEA RSI,[0x167789]
LEA RDX,[0x16606d]
MOV ECX,0x2e0
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00120fe2
LAB_00120e30:
JMP 0x00120e32
LAB_00120e32:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x168176]
MOV EDX,0xc
CALL 0x00145070
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00120e99
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fb0
CMP EAX,0x0
JNZ 0x00120e99
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
CMP EAX,0x0
JNZ 0x00120e99
LEA RDI,[0x165590]
LEA RSI,[0x168182]
LEA RDX,[0x16606d]
MOV ECX,0x2e7
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00120fe2
LAB_00120e99:
JMP 0x00120e9b
LAB_00120e9b:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143eb0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00120efc
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x2c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x2c]
MOV RDX,qword ptr [RBP + -0x28]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x2ea
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00120fe2
LAB_00120efc:
JMP 0x00120efe
LAB_00120efe:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00144950
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x168172]
MOV EDX,0x3
CALL 0x00145070
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00120f45
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fb0
CMP EAX,0x0
JZ 0x00120f45
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
CMP EAX,0x0
JNZ 0x00120f6f
LAB_00120f45:
LEA RDI,[0x165590]
LEA RSI,[0x167789]
LEA RDX,[0x16606d]
MOV ECX,0x2f1
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00120fe2
LAB_00120f6f:
JMP 0x00120f71
LAB_00120f71:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001381f0
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x168176]
MOV EDX,0xc
CALL 0x00145070
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00120fa6
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fb0
CMP EAX,0x0
JNZ 0x00120fd0
LAB_00120fa6:
LEA RDI,[0x165590]
LEA RSI,[0x167789]
LEA RDX,[0x16606d]
MOV ECX,0x2fc
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00120fe2
LAB_00120fd0:
JMP 0x00120fd2
LAB_00120fd2:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143eb0
MOV dword ptr [RBP + -0x4],0x0
LAB_00120fe2:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 test_bug15518(int8 param_1)
{
char cVar1;
int iVar2;
int4 uVar3;
int8 uVar4;
uVar4 = mysql_stmt_init(param_1);
iVar2 = mysql_stmt_prepare(uVar4,&DAT_00168172,3);
if (((iVar2 == 0) || (iVar2 = mysql_stmt_errno(uVar4), iVar2 == 0)) ||
(iVar2 = mysql_errno(param_1), iVar2 == 0)) {
diag("Error: %s (%s: %d)","Error expected",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x2e0);
return 1;
}
iVar2 = mysql_stmt_prepare(uVar4,"SHOW STATUS",0xc);
if (((iVar2 != 0) && (iVar2 = mysql_stmt_errno(uVar4), iVar2 == 0)) &&
(iVar2 = mysql_errno(param_1), iVar2 == 0)) {
diag("Error: %s (%s: %d)","Error not expected",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x2e7);
return 1;
}
cVar1 = mysql_stmt_close(uVar4);
if (cVar1 != 0) {
uVar4 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",(int)cVar1,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x2ea);
return 1;
}
uVar4 = mysql_stmt_init(param_1);
iVar2 = mysql_stmt_prepare(uVar4,&DAT_00168172,3);
if (((iVar2 != 0) && (iVar2 = mysql_stmt_errno(uVar4), iVar2 != 0)) &&
(iVar2 = mysql_errno(param_1), iVar2 != 0)) {
mysql_close(param_1);
iVar2 = mysql_stmt_prepare(uVar4,"SHOW STATUS",0xc);
if ((iVar2 != 0) && (iVar2 = mysql_stmt_errno(uVar4), iVar2 != 0)) {
mysql_stmt_close(uVar4);
return 0;
}
diag("Error: %s (%s: %d)","Error expected",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x2fc);
return 1;
}
diag("Error: %s (%s: %d)","Error expected",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x2f1);
return 1;
}
| |
35,920 | chachapoly_crypt_and_tag | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/chachapoly.c | static int chachapoly_crypt_and_tag(mbedtls_chachapoly_context *ctx,
mbedtls_chachapoly_mode_t mode,
size_t length,
const unsigned char nonce[12],
const unsigned char *aad,
size_t aad_len,
const unsigned char *input,
unsigned char *output,
unsigned char tag[16])
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
ret = mbedtls_chachapoly_starts(ctx, nonce, mode);
if (ret != 0) {
goto cleanup;
}
ret = mbedtls_chachapoly_update_aad(ctx, aad, aad_len);
if (ret != 0) {
goto cleanup;
}
ret = mbedtls_chachapoly_update(ctx, length, input, output);
if (ret != 0) {
goto cleanup;
}
ret = mbedtls_chachapoly_finish(ctx, tag);
cleanup:
return ret;
} | O3 | c | chachapoly_crypt_and_tag:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movq %r8, %rbp
movq %rdx, %r12
movl %esi, %edx
movq %rdi, %rbx
movq 0x70(%rsp), %r15
movq 0x68(%rsp), %r13
movq 0x60(%rsp), %r14
movq %rcx, %rsi
callq 0xa01fa
testl %eax, %eax
jne 0xa0502
movq 0x20(%rsp), %rdx
movq %r14, 0x8(%rsp)
movq %r13, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq %r15, (%rsp)
movl $0xffffffac, %eax # imm = 0xFFFFFFAC
cmpl $0x1, 0xe8(%rbx)
jne 0xa0502
addq %rdx, 0xd8(%rbx)
leaq 0x88(%rbx), %rdi
movq %rbp, %rsi
callq 0xa07cb
testl %eax, %eax
jne 0xa0502
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
callq 0xa02ab
testl %eax, %eax
je 0xa0511
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq (%rsp), %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa0390
| chachapoly_crypt_and_tag:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rsp+58h+var_38], r9
mov rbp, r8
mov r12, rdx
mov edx, esi
mov rbx, rdi
mov r15, [rsp+58h+arg_10]
mov r13, [rsp+58h+arg_8]
mov r14, [rsp+58h+arg_0]
mov rsi, rcx
call mbedtls_chachapoly_starts
test eax, eax
jnz short loc_A0502
mov rdx, [rsp+58h+var_38]
mov [rsp+58h+var_50], r14
mov [rsp+58h+var_48], r13
mov [rsp+58h+var_40], r12
mov [rsp+58h+var_58], r15
mov eax, 0FFFFFFACh
cmp dword ptr [rbx+0E8h], 1
jnz short loc_A0502
add [rbx+0D8h], rdx
lea rdi, [rbx+88h]
mov rsi, rbp
call mbedtls_poly1305_update
test eax, eax
jnz short loc_A0502
mov rdi, rbx
mov rsi, [rsp+58h+var_40]
mov rdx, [rsp+58h+var_50]
mov rcx, [rsp+58h+var_48]
call mbedtls_chachapoly_update
test eax, eax
jz short loc_A0511
loc_A0502:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A0511:
mov rdi, rbx
mov rsi, [rsp+58h+var_58]
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp mbedtls_chachapoly_finish
| long long chachapoly_crypt_and_tag(
long long a1,
int a2,
long long a3,
_DWORD *a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9)
{
long long result; // rax
result = mbedtls_chachapoly_starts(a1, a4, a2);
if ( !(_DWORD)result )
{
result = 4294967212LL;
if ( *(_DWORD *)(a1 + 232) == 1 )
{
*(_QWORD *)(a1 + 216) += a6;
result = mbedtls_poly1305_update(a1 + 136);
if ( !(_DWORD)result )
{
result = mbedtls_chachapoly_update(a1, a3, a7, a8);
if ( !(_DWORD)result )
return mbedtls_chachapoly_finish((_DWORD *)a1, a9);
}
}
}
return result;
}
| chachapoly_crypt_and_tag:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],R9
MOV RBP,R8
MOV R12,RDX
MOV EDX,ESI
MOV RBX,RDI
MOV R15,qword ptr [RSP + 0x70]
MOV R13,qword ptr [RSP + 0x68]
MOV R14,qword ptr [RSP + 0x60]
MOV RSI,RCX
CALL 0x001a01fa
TEST EAX,EAX
JNZ 0x001a0502
MOV RDX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],R14
MOV qword ptr [RSP + 0x10],R13
MOV qword ptr [RSP + 0x18],R12
MOV qword ptr [RSP],R15
MOV EAX,0xffffffac
CMP dword ptr [RBX + 0xe8],0x1
JNZ 0x001a0502
ADD qword ptr [RBX + 0xd8],RDX
LEA RDI,[RBX + 0x88]
MOV RSI,RBP
CALL 0x001a07cb
TEST EAX,EAX
JNZ 0x001a0502
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x10]
CALL 0x001a02ab
TEST EAX,EAX
JZ 0x001a0511
LAB_001a0502:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a0511:
MOV RDI,RBX
MOV RSI,qword ptr [RSP]
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001a0390
|
int8
chachapoly_crypt_and_tag
(long param_1,int4 param_2,int8 param_3,int8 param_4,int8 param_5,
long param_6,int8 param_7,int8 param_8,int8 param_9)
{
int8 uVar1;
uVar1 = mbedtls_chachapoly_starts(param_1,param_4,param_2);
if ((int)uVar1 == 0) {
uVar1 = 0xffffffac;
if (*(int *)(param_1 + 0xe8) == 1) {
*(long *)(param_1 + 0xd8) = *(long *)(param_1 + 0xd8) + param_6;
uVar1 = mbedtls_poly1305_update(param_1 + 0x88,param_5);
if ((int)uVar1 == 0) {
uVar1 = mbedtls_chachapoly_update(param_1,param_3,param_7,param_8);
if ((int)uVar1 == 0) {
uVar1 = mbedtls_chachapoly_finish(param_1,param_9);
return uVar1;
}
}
}
}
return uVar1;
}
| |
35,921 | js_os_utimes | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_utimes(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *path;
int64_t atime, mtime;
int ret;
if (JS_ToInt64(ctx, &atime, argv[1]))
return JS_EXCEPTION;
if (JS_ToInt64(ctx, &mtime, argv[2]))
return JS_EXCEPTION;
path = JS_ToCString(ctx, argv[0]);
if (!path)
return JS_EXCEPTION;
#if defined(_WIN32)
{
struct _utimbuf times;
times.actime = atime / 1000;
times.modtime = mtime / 1000;
ret = js_get_errno(_utime(path, ×));
}
#else
{
struct timeval times[2];
ms_to_timeval(×[0], atime);
ms_to_timeval(×[1], mtime);
ret = js_get_errno(utimes(path, times));
}
#endif
JS_FreeCString(ctx, path);
return JS_NewInt32(ctx, ret);
} | O0 | c | js_os_utimes:
subq $0xa8, %rsp
movq %rsi, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq %rdi, 0x60(%rsp)
movl %ecx, 0x5c(%rsp)
movq %r8, 0x50(%rsp)
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
leaq 0x40(%rsp), %rsi
callq 0x3eee0
cmpl $0x0, %eax
je 0x214a9
movl $0x0, 0x78(%rsp)
movq $0x6, 0x80(%rsp)
jmp 0x215bb
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rdx
movq 0x28(%rax), %rcx
leaq 0x38(%rsp), %rsi
callq 0x3eee0
cmpl $0x0, %eax
je 0x214e3
movl $0x0, 0x78(%rsp)
movq $0x6, 0x80(%rsp)
jmp 0x215bb
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x1aad0
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x2151f
movl $0x0, 0x78(%rsp)
movq $0x6, 0x80(%rsp)
jmp 0x215bb
movq 0x40(%rsp), %rsi
leaq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x233e0
leaq 0x20(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x233e0
movq 0x8(%rsp), %rsi
movq 0x48(%rsp), %rdi
callq 0xe530
movslq %eax, %rdi
callq 0x19d40
movl %eax, 0x34(%rsp)
movq 0x60(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x30140
movq 0x60(%rsp), %rcx
movl 0x34(%rsp), %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
movl 0x8c(%rsp), %eax
movl %eax, 0x98(%rsp)
movq $0x0, 0xa0(%rsp)
movq 0x98(%rsp), %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rdx
addq $0xa8, %rsp
retq
| js_os_utimes:
sub rsp, 0A8h
mov [rsp+0A8h+var_40], rsi
mov [rsp+0A8h+var_38], rdx
mov [rsp+0A8h+var_48], rdi
mov [rsp+0A8h+var_4C], ecx
mov [rsp+0A8h+var_58], r8
mov rdi, [rsp+0A8h+var_48]
mov rax, [rsp+0A8h+var_58]
mov rdx, [rax+10h]
mov rcx, [rax+18h]
lea rsi, [rsp+0A8h+var_68]
call JS_ToInt64
cmp eax, 0
jz short loc_214A9
mov dword ptr [rsp+0A8h+var_30], 0
mov [rsp+0A8h+var_28], 6
jmp loc_215BB
loc_214A9:
mov rdi, [rsp+0A8h+var_48]
mov rax, [rsp+0A8h+var_58]
mov rdx, [rax+20h]
mov rcx, [rax+28h]
lea rsi, [rsp+0A8h+var_70]
call JS_ToInt64
cmp eax, 0
jz short loc_214E3
mov dword ptr [rsp+0A8h+var_30], 0
mov [rsp+0A8h+var_28], 6
jmp loc_215BB
loc_214E3:
mov rdi, [rsp+0A8h+var_48]
mov rax, [rsp+0A8h+var_58]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString_0
mov [rsp+0A8h+var_60], rax
cmp [rsp+0A8h+var_60], 0
jnz short loc_2151F
mov dword ptr [rsp+0A8h+var_30], 0
mov [rsp+0A8h+var_28], 6
jmp loc_215BB
loc_2151F:
mov rsi, [rsp+0A8h+var_68]
lea rdi, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_A0], rdi
call ms_to_timeval
lea rdi, [rsp+0A8h+var_88]
mov rsi, [rsp+0A8h+var_70]
call ms_to_timeval
mov rsi, [rsp+0A8h+var_A0]
mov rdi, [rsp+0A8h+var_60]
call _utimes
movsxd rdi, eax
call js_get_errno
mov [rsp+0A8h+var_74], eax
mov rdi, [rsp+0A8h+var_48]
mov rsi, [rsp+0A8h+var_60]
call JS_FreeCString
mov rcx, [rsp+0A8h+var_48]
mov eax, [rsp+0A8h+var_74]
mov [rsp+0A8h+var_18], rcx
mov [rsp+0A8h+var_1C], eax
mov eax, [rsp+0A8h+var_1C]
mov dword ptr [rsp+0A8h+var_10], eax
mov [rsp+0A8h+var_8], 0
mov rcx, [rsp+0A8h+var_10]
mov rax, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_30], rcx
mov [rsp+0A8h+var_28], rax
loc_215BB:
mov rax, [rsp+0A8h+var_30]
mov rdx, [rsp+0A8h+var_28]
add rsp, 0A8h
retn
| long long js_os_utimes(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v5; // rcx
long long v6; // r8
long long v7; // r9
int v8; // eax
_BYTE v10[16]; // [rsp+10h] [rbp-98h] BYREF
_BYTE v11[20]; // [rsp+20h] [rbp-88h] BYREF
int errno; // [rsp+34h] [rbp-74h]
long long v13; // [rsp+38h] [rbp-70h] BYREF
long long v14; // [rsp+40h] [rbp-68h] BYREF
long long v15; // [rsp+48h] [rbp-60h]
long long *v16; // [rsp+50h] [rbp-58h]
int v17; // [rsp+5Ch] [rbp-4Ch]
long long v18; // [rsp+60h] [rbp-48h]
long long v19; // [rsp+68h] [rbp-40h]
long long v20; // [rsp+70h] [rbp-38h]
long long v21; // [rsp+78h] [rbp-30h]
long long v22; // [rsp+80h] [rbp-28h]
int v23; // [rsp+8Ch] [rbp-1Ch]
long long v24; // [rsp+90h] [rbp-18h]
long long v25; // [rsp+98h] [rbp-10h]
long long v26; // [rsp+A0h] [rbp-8h]
v19 = a2;
v20 = a3;
v18 = a1;
v17 = a4;
v16 = a5;
if ( (unsigned int)JS_ToInt64(a1, &v14, a5[2], a5[3]) )
{
LODWORD(v21) = 0;
v22 = 6LL;
}
else if ( (unsigned int)JS_ToInt64(v18, &v13, v16[4], v16[5]) )
{
LODWORD(v21) = 0;
v22 = 6LL;
}
else
{
v15 = JS_ToCString_0(v18, *v16, v16[1], v5, v6, v7);
if ( v15 )
{
ms_to_timeval(v10, v14);
ms_to_timeval(v11, v13);
v8 = utimes(v15, v10);
errno = js_get_errno(v8);
JS_FreeCString(v18, v15);
v24 = v18;
v23 = errno;
LODWORD(v25) = errno;
v26 = 0LL;
v21 = v25;
v22 = 0LL;
}
else
{
LODWORD(v21) = 0;
v22 = 6LL;
}
}
return v21;
}
| js_os_utimes:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x68],RSI
MOV qword ptr [RSP + 0x70],RDX
MOV qword ptr [RSP + 0x60],RDI
MOV dword ptr [RSP + 0x5c],ECX
MOV qword ptr [RSP + 0x50],R8
MOV RDI,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x18]
LEA RSI,[RSP + 0x40]
CALL 0x0013eee0
CMP EAX,0x0
JZ 0x001214a9
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x6
JMP 0x001215bb
LAB_001214a9:
MOV RDI,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RAX + 0x28]
LEA RSI,[RSP + 0x38]
CALL 0x0013eee0
CMP EAX,0x0
JZ 0x001214e3
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x6
JMP 0x001215bb
LAB_001214e3:
MOV RDI,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0011aad0
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
JNZ 0x0012151f
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x6
JMP 0x001215bb
LAB_0012151f:
MOV RSI,qword ptr [RSP + 0x40]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001233e0
LEA RDI,[RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x001233e0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x0010e530
MOVSXD RDI,EAX
CALL 0x00119d40
MOV dword ptr [RSP + 0x34],EAX
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00130140
MOV RCX,qword ptr [RSP + 0x60]
MOV EAX,dword ptr [RSP + 0x34]
MOV qword ptr [RSP + 0x90],RCX
MOV dword ptr [RSP + 0x8c],EAX
MOV EAX,dword ptr [RSP + 0x8c]
MOV dword ptr [RSP + 0x98],EAX
MOV qword ptr [RSP + 0xa0],0x0
MOV RCX,qword ptr [RSP + 0x98]
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x78],RCX
MOV qword ptr [RSP + 0x80],RAX
LAB_001215bb:
MOV RAX,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
ADD RSP,0xa8
RET
|
int1 [16]
js_os_utimes(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
timeval local_98;
int1 local_88 [20];
int4 local_74;
int8 local_70;
int8 local_68;
char *local_60;
int8 *local_58;
int4 local_4c;
int8 local_48;
int8 local_40;
int8 local_38;
int4 local_30;
int4 uStack_2c;
int8 local_28;
int4 uStack_c;
local_58 = param_5;
local_4c = param_4;
local_48 = param_1;
local_40 = param_2;
local_38 = param_3;
iVar2 = JS_ToInt64(param_1,&local_68,param_5[2],param_5[3]);
if (iVar2 == 0) {
iVar2 = JS_ToInt64(local_48,&local_70,local_58[4],local_58[5]);
if (iVar2 == 0) {
local_60 = (char *)JS_ToCString(local_48,*local_58,local_58[1]);
if (local_60 == (char *)0x0) {
local_30 = 0;
local_28 = 6;
}
else {
ms_to_timeval(&local_98,local_68);
ms_to_timeval(local_88,local_70);
iVar2 = utimes(local_60,&local_98);
local_74 = js_get_errno((long)iVar2);
JS_FreeCString(local_48,local_60);
local_30 = local_74;
uStack_2c = uStack_c;
local_28 = 0;
}
}
else {
local_30 = 0;
local_28 = 6;
}
}
else {
local_30 = 0;
local_28 = 6;
}
auVar1._4_4_ = uStack_2c;
auVar1._0_4_ = local_30;
auVar1._8_8_ = local_28;
return auVar1;
}
| |
35,922 | js_os_utimes | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_utimes(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *path;
int64_t atime, mtime;
int ret;
if (JS_ToInt64(ctx, &atime, argv[1]))
return JS_EXCEPTION;
if (JS_ToInt64(ctx, &mtime, argv[2]))
return JS_EXCEPTION;
path = JS_ToCString(ctx, argv[0]);
if (!path)
return JS_EXCEPTION;
#if defined(_WIN32)
{
struct _utimbuf times;
times.actime = atime / 1000;
times.modtime = mtime / 1000;
ret = js_get_errno(_utime(path, ×));
}
#else
{
struct timeval times[2];
ms_to_timeval(×[0], atime);
ms_to_timeval(×[1], mtime);
ret = js_get_errno(utimes(path, times));
}
#endif
JS_FreeCString(ctx, path);
return JS_NewInt32(ctx, ret);
} | O2 | c | js_os_utimes:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r15
movq %rdi, %rbx
movq 0x10(%r8), %rdx
movq 0x18(%r8), %rcx
leaq 0x8(%rsp), %rsi
callq 0x250ae
pushq $0x6
popq %r14
testl %eax, %eax
jne 0x18310
movq 0x20(%r15), %rdx
movq 0x28(%r15), %rcx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x250ae
testl %eax, %eax
je 0x18321
xorl %eax, %eax
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x1561c
testq %rax, %rax
je 0x18310
movq %rax, %r15
movq 0x8(%rsp), %rax
movl $0x3e8, %ecx # imm = 0x3E8
xorl %edx, %edx
divq %rcx
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
imulq $0x3e8, %rdx, %rax # imm = 0x3E8
movq %rax, 0x8(%rsi)
movq (%rsp), %rax
xorl %edx, %edx
divq %rcx
xorl %r14d, %r14d
movq %rax, 0x10(%rsi)
imulq $0x3e8, %rdx, %rax # imm = 0x3E8
movq %rax, 0x18(%rsi)
movq %r15, %rdi
callq 0xe550
movslq %eax, %rdi
callq 0x14f5b
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1ec07
movl %r12d, %eax
jmp 0x18312
| js_os_utimes:
push r15
push r14
push r12
push rbx
sub rsp, 38h
mov r15, r8
mov rbx, rdi
mov rdx, [r8+10h]
mov rcx, [r8+18h]
lea rsi, [rsp+58h+var_50]
call JS_ToInt64
push 6
pop r14
test eax, eax
jnz short loc_18310
mov rdx, [r15+20h]
mov rcx, [r15+28h]
mov rsi, rsp
mov rdi, rbx
call JS_ToInt64
test eax, eax
jz short loc_18321
loc_18310:
xor eax, eax
loc_18312:
mov rdx, r14
add rsp, 38h
pop rbx
pop r12
pop r14
pop r15
retn
loc_18321:
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
call JS_ToCString_0
test rax, rax
jz short loc_18310
mov r15, rax
mov rax, [rsp+58h+var_50]
mov ecx, 3E8h
xor edx, edx
div rcx
lea rsi, [rsp+58h+var_48]
mov [rsi], rax
imul rax, rdx, 3E8h
mov [rsi+8], rax
mov rax, [rsp+58h+var_58]
xor edx, edx
div rcx
xor r14d, r14d
mov [rsi+10h], rax
imul rax, rdx, 3E8h
mov [rsi+18h], rax
mov rdi, r15
call _utimes
movsxd rdi, eax
call js_get_errno
mov r12, rax
mov rdi, rbx
mov rsi, r15
call JS_FreeCString
mov eax, r12d
jmp loc_18312
| long long js_os_utimes(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
long long v7; // rax
long long v8; // r15
int v9; // eax
unsigned int errno; // r12d
unsigned long long v11; // [rsp+0h] [rbp-58h] BYREF
_QWORD v12[10]; // [rsp+8h] [rbp-50h] BYREF
if ( (unsigned int)JS_ToInt64(a1, v12, a5[2], a5[3]) )
return 0LL;
if ( (unsigned int)JS_ToInt64(a1, &v11, a5[4], a5[5]) )
return 0LL;
v7 = JS_ToCString_0(a1, *a5, a5[1]);
if ( !v7 )
return 0LL;
v8 = v7;
v12[1] = v12[0] / 0x3E8uLL;
v12[2] = 1000 * (v12[0] % 0x3E8uLL);
v12[3] = v11 / 0x3E8;
v12[4] = 1000 * (v11 % 0x3E8);
v9 = utimes(v7);
errno = js_get_errno(v9);
JS_FreeCString(a1, v8);
return errno;
}
| js_os_utimes:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15,R8
MOV RBX,RDI
MOV RDX,qword ptr [R8 + 0x10]
MOV RCX,qword ptr [R8 + 0x18]
LEA RSI,[RSP + 0x8]
CALL 0x001250ae
PUSH 0x6
POP R14
TEST EAX,EAX
JNZ 0x00118310
MOV RDX,qword ptr [R15 + 0x20]
MOV RCX,qword ptr [R15 + 0x28]
MOV RSI,RSP
MOV RDI,RBX
CALL 0x001250ae
TEST EAX,EAX
JZ 0x00118321
LAB_00118310:
XOR EAX,EAX
LAB_00118312:
MOV RDX,R14
ADD RSP,0x38
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00118321:
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,RBX
CALL 0x0011561c
TEST RAX,RAX
JZ 0x00118310
MOV R15,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,0x3e8
XOR EDX,EDX
DIV RCX
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RAX
IMUL RAX,RDX,0x3e8
MOV qword ptr [RSI + 0x8],RAX
MOV RAX,qword ptr [RSP]
XOR EDX,EDX
DIV RCX
XOR R14D,R14D
MOV qword ptr [RSI + 0x10],RAX
IMUL RAX,RDX,0x3e8
MOV qword ptr [RSI + 0x18],RAX
MOV RDI,R15
CALL 0x0010e550
MOVSXD RDI,EAX
CALL 0x00114f5b
MOV R12,RAX
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011ec07
MOV EAX,R12D
JMP 0x00118312
|
int4 js_os_utimes(int8 param_1)
{
int iVar1;
int4 uVar2;
char *__file;
int8 *in_R8;
ulong local_58;
ulong local_50;
timeval local_48;
ulong local_38;
long local_30;
iVar1 = JS_ToInt64(param_1,&local_50,in_R8[2],in_R8[3]);
if (((iVar1 == 0) && (iVar1 = JS_ToInt64(param_1,&local_58,in_R8[4],in_R8[5]), iVar1 == 0)) &&
(__file = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]), __file != (char *)0x0)) {
local_48.tv_sec = local_50 / 1000;
local_48.tv_usec = (local_50 % 1000) * 1000;
local_38 = local_58 / 1000;
local_30 = (local_58 % 1000) * 1000;
iVar1 = utimes(__file,&local_48);
uVar2 = js_get_errno((long)iVar1);
JS_FreeCString(param_1,__file);
return uVar2;
}
return 0;
}
| |
35,923 | SET_generate_module | xtate/src/xconf.c | static ConfRes SET_generate_module(void *conf, const char *name,
const char *value) {
XConf *xconf = (XConf *)conf;
if (xconf->echo) {
if (xconf->generator) {
fprintf(xconf->echo, "generate-module = %s\n",
xconf->generator->name);
}
return 0;
}
xconf->generator = get_generate_module_by_name(value);
if (!xconf->generator) {
LOG(LEVEL_ERROR, "fail %s: no such generate module\n", value);
return Conf_ERR;
}
if (xconf->op == Op_Default)
xconf->op = Op_Scan;
return Conf_OK;
} | O3 | c | SET_generate_module:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x2a8(%rdi), %rdi
testq %rdi, %rdi
je 0x5a08a
movq 0x500(%r14), %rax
testq %rax, %rax
je 0x5a0ba
movq (%rax), %rdx
leaq 0x24e79(%rip), %rsi # 0x7eef8
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x15220
jmp 0x5a0d9
movq %rdx, %rbx
movq %rdx, %rdi
callq 0x1fffc
movq %rax, 0x500(%r14)
testq %rax, %rax
je 0x5a0be
xorl %ebx, %ebx
cmpl $0x0, 0x6b0(%r14)
jne 0x5a0d9
movl $0x1, 0x6b0(%r14)
jmp 0x5a0d9
xorl %ebx, %ebx
jmp 0x5a0d9
leaq 0x24e49(%rip), %rsi # 0x7ef0e
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
movq %rbx, %rdx
xorl %eax, %eax
callq 0x536da
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| SET_generate_module:
push r14
push rbx
push rax
mov r14, rdi
mov rdi, [rdi+2A8h]
test rdi, rdi
jz short loc_5A08A
mov rax, [r14+500h]
test rax, rax
jz short loc_5A0BA
mov rdx, [rax]
lea rsi, aGenerateModule; "generate-module = %s\n"
xor ebx, ebx
xor eax, eax
call _fprintf
jmp short loc_5A0D9
loc_5A08A:
mov rbx, rdx
mov rdi, rdx
call get_generate_module_by_name
mov [r14+500h], rax
test rax, rax
jz short loc_5A0BE
xor ebx, ebx
cmp dword ptr [r14+6B0h], 0
jnz short loc_5A0D9
mov dword ptr [r14+6B0h], 1
jmp short loc_5A0D9
loc_5A0BA:
xor ebx, ebx
jmp short loc_5A0D9
loc_5A0BE:
lea rsi, aFailSNoSuchGen; "fail %s: no such generate module\n"
mov edi, 0FFFFFFFFh
mov rdx, rbx
xor eax, eax
call LOG
mov ebx, 1
loc_5A0D9:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
retn
| long long SET_generate_module(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11)
{
char v11; // al
long long v13; // rdi
const char **v14; // rax
unsigned int v15; // ebx
_UNKNOWN **module_by_name; // rax
long long v18; // rcx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
char v24; // [rsp-8h] [rbp-18h]
v24 = v11;
v13 = *(_QWORD *)(a1 + 680);
if ( v13 )
{
v14 = *(const char ***)(a1 + 1280);
v15 = 0;
if ( v14 )
fprintf(v13, "generate-module = %s\n", *v14);
}
else
{
module_by_name = get_generate_module_by_name(a11);
*(_QWORD *)(a1 + 1280) = module_by_name;
if ( module_by_name )
{
v15 = 0;
if ( !*(_DWORD *)(a1 + 1712) )
*(_DWORD *)(a1 + 1712) = 1;
}
else
{
LOG(-1, (long long)"fail %s: no such generate module\n", a11, v18, v19, v20, a2, a3, a4, a5, v21, v22, a8, a9, v24);
return 1;
}
}
return v15;
}
| SET_generate_module:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x2a8]
TEST RDI,RDI
JZ 0x0015a08a
MOV RAX,qword ptr [R14 + 0x500]
TEST RAX,RAX
JZ 0x0015a0ba
MOV RDX,qword ptr [RAX]
LEA RSI,[0x17eef8]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x00115220
JMP 0x0015a0d9
LAB_0015a08a:
MOV RBX,RDX
MOV RDI,RDX
CALL 0x0011fffc
MOV qword ptr [R14 + 0x500],RAX
TEST RAX,RAX
JZ 0x0015a0be
XOR EBX,EBX
CMP dword ptr [R14 + 0x6b0],0x0
JNZ 0x0015a0d9
MOV dword ptr [R14 + 0x6b0],0x1
JMP 0x0015a0d9
LAB_0015a0ba:
XOR EBX,EBX
JMP 0x0015a0d9
LAB_0015a0be:
LEA RSI,[0x17ef0e]
MOV EDI,0xffffffff
MOV RDX,RBX
XOR EAX,EAX
CALL 0x001536da
MOV EBX,0x1
LAB_0015a0d9:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
int8 SET_generate_module(long param_1,int8 param_2,int8 param_3)
{
long lVar1;
int8 uVar2;
if (*(FILE **)(param_1 + 0x2a8) == (FILE *)0x0) {
lVar1 = get_generate_module_by_name(param_3);
*(long *)(param_1 + 0x500) = lVar1;
if (lVar1 == 0) {
LOG(0xffffffff,"fail %s: no such generate module\n",param_3);
uVar2 = 1;
}
else {
uVar2 = 0;
if (*(int *)(param_1 + 0x6b0) == 0) {
*(int4 *)(param_1 + 0x6b0) = 1;
uVar2 = 0;
}
}
}
else if (*(int8 **)(param_1 + 0x500) == (int8 *)0x0) {
uVar2 = 0;
}
else {
fprintf(*(FILE **)(param_1 + 0x2a8),"generate-module = %s\n",**(int8 **)(param_1 + 0x500))
;
uVar2 = 0;
}
return uVar2;
}
| |
35,924 | nglog::tools::InitializeLoggingUtilities(char const*) | ng-log[P]ng-log/src/utilities.cc | bool IsLoggingInitialized() {
return g_program_invocation_short_name != nullptr;
} | O2 | cpp | nglog::tools::InitializeLoggingUtilities(char const*):
pushq %rbx
subq $0x60, %rsp
cmpq $0x0, 0x25227(%rip) # 0x42b60
je 0x1d94d
andq $0x0, 0x2521d(%rip) # 0x42b60
addq $0x60, %rsp
popq %rbx
jmp 0x7560
leaq 0x398c(%rip), %rsi # 0x212e0
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x134, %edx # imm = 0x134
callq 0xd1aa
movq %rbx, %rdi
callq 0xaae2
leaq 0x3a03(%rip), %rsi # 0x21376
movq %rax, %rdi
callq 0x7570
leaq 0x3a1a(%rip), %rsi # 0x2139c
movq %rax, %rdi
callq 0x7570
movq %rsp, %rdi
callq 0xd1b8
movq %rsp, %rdi
callq 0xd1b8
movq %rax, %rdi
callq 0x995b
| _ZN5nglog5tools24ShutdownLoggingUtilitiesEv:
push rbx
sub rsp, 60h
cmp cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name
jz short loc_1D94D
and cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name
add rsp, 60h
pop rbx
jmp _closelog
loc_1D94D:
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov rbx, rsp
mov rdi, rbx; this
mov edx, 134h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedIsl_0; "Check failed: IsLoggingInitialized() "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rsi, aYouCalledShutd; "You called ShutdownLogging() without ca"...
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rsp; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rsp; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rax
call __clang_call_terminate
| long long nglog::tools::ShutdownLoggingUtilities(nglog::tools *this)
{
long long v2; // rax
long long v3; // rax
_BYTE v4[104]; // [rsp+0h] [rbp-68h] BYREF
if ( !nglog::g_program_invocation_short_name )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v4,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
308);
v2 = nglog::LogMessage::stream((nglog::LogMessage *)v4);
v3 = std::operator<<<std::char_traits<char>>(v2, "Check failed: IsLoggingInitialized() ");
std::operator<<<std::char_traits<char>>(
v3,
"You called ShutdownLogging() without calling InitializeLogging() first!");
nglog::LogMessageFatal::~LogMessageFatal(
(nglog::LogMessageFatal *)v4,
(nglog::internal::LogMessageData *)"You called ShutdownLogging() without calling InitializeLogging() first!");
}
nglog::g_program_invocation_short_name = 0LL;
return closelog(this);
}
| ShutdownLoggingUtilities:
PUSH RBX
SUB RSP,0x60
CMP qword ptr [0x00142b60],0x0
JZ 0x0011d94d
AND qword ptr [0x00142b60],0x0
ADD RSP,0x60
POP RBX
JMP 0x00107560
LAB_0011d94d:
LEA RSI,[0x1212e0]
MOV RBX,RSP
MOV RDI,RBX
MOV EDX,0x134
CALL 0x0010d1aa
LAB_0011d964:
MOV RDI,RBX
CALL 0x0010aae2
LEA RSI,[0x121376]
MOV RDI,RAX
CALL 0x00107570
LEA RSI,[0x12139c]
MOV RDI,RAX
CALL 0x00107570
LAB_0011d98a:
MOV RDI,RSP
CALL 0x0010d1b8
LAB_0011d992:
MOV RDI,RSP
CALL 0x0010d1b8
LAB_0011d99a:
MOV RDI,RAX
CALL 0x0010995b
|
/* nglog::tools::ShutdownLoggingUtilities() */
void nglog::tools::ShutdownLoggingUtilities(void)
{
ostream *poVar1;
int8 uVar2;
LogMessageFatal aLStack_68 [96];
if (g_program_invocation_short_name != 0) {
g_program_invocation_short_name = 0;
closelog();
return;
}
LogMessageFatal::LogMessageFatal
(aLStack_68,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
0x134);
/* try { // try from 0011d964 to 0011d989 has its CatchHandler @ 0011d992 */
poVar1 = (ostream *)LogMessage::stream((LogMessage *)aLStack_68);
poVar1 = std::operator<<(poVar1,"Check failed: IsLoggingInitialized() ");
std::operator<<(poVar1,"You called ShutdownLogging() without calling InitializeLogging() first!");
LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 0011d964 with catch @ 0011d992
try { // try from 0011d992 to 0011d999 has its CatchHandler @ 0011d99a */
uVar2 = LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 0011d992 with catch @ 0011d99a
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar2);
}
| |
35,925 | nglog::tools::InitializeLoggingUtilities(char const*) | ng-log[P]ng-log/src/utilities.cc | bool IsLoggingInitialized() {
return g_program_invocation_short_name != nullptr;
} | O3 | cpp | nglog::tools::InitializeLoggingUtilities(char const*):
pushq %rbx
subq $0x60, %rsp
cmpq $0x0, 0x21961(%rip) # 0x43b10
jne 0x221e1
movq %rdi, %rbx
movl $0x2f, %esi
callq 0x75a0
leaq 0x1(%rax), %rcx
testq %rax, %rax
cmoveq %rbx, %rcx
movq %rcx, 0x21940(%rip) # 0x43b10
leaq 0x6c(%rip), %rdi # 0x22243
addq $0x60, %rsp
popq %rbx
jmp 0xc0c9
leaq 0x30e0(%rip), %rsi # 0x252c8
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x12b, %edx # imm = 0x12B
callq 0xefae
movq %rbx, %rdi
callq 0xb726
movq %rax, %rbx
leaq 0x3107(%rip), %rsi # 0x25311
movl $0x26, %edx
movq %rax, %rdi
callq 0x75e0
leaq 0x311a(%rip), %rsi # 0x25338
movl $0x25, %edx
movq %rbx, %rdi
callq 0x75e0
movq %rsp, %rdi
callq 0xeff2
movq %rsp, %rdi
callq 0xeff2
movq %rax, %rdi
callq 0x9f3d
| _ZN5nglog5tools26InitializeLoggingUtilitiesEPKc:
push rbx
sub rsp, 60h
cmp cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name
jnz short loc_221E1
mov rbx, rdi
mov esi, (offset qword_28+7); void (*)(void)
call _strrchr
lea rcx, [rax+1]
test rax, rax
cmovz rcx, rbx
mov cs:_ZN5nglogL31g_program_invocation_short_nameE, rcx; nglog::g_program_invocation_short_name
lea rdi, _ZN5nglogL21DumpStackTraceAndExitEv; this
add rsp, 60h
pop rbx
jmp _ZN5nglog22InstallFailureFunctionEPFvvE; nglog::InstallFailureFunction(void (*)(void))
loc_221E1:
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
mov rbx, rsp
mov rdi, rbx; this
mov edx, 12Bh; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov rbx, rax
lea rsi, aCheckFailedIsl; "Check failed: !IsLoggingInitialized() "
mov edx, 26h ; '&'
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 rsi, aYouCalledIniti; "You called InitializeLogging() twice!"
mov edx, 25h ; '%'
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, rsp; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rsp; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rax
call __clang_call_terminate
| long long ( * nglog::tools::InitializeLoggingUtilities(nglog::tools *this, const char *a2))(_QWORD)
{
long long v2; // rax
nglog::tools *v3; // rcx
long long v5; // rbx
_BYTE v6[104]; // [rsp+0h] [rbp-68h] BYREF
if ( nglog::g_program_invocation_short_name )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v6,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
299);
v5 = nglog::LogMessage::stream((nglog::LogMessage *)v6);
std::__ostream_insert<char,std::char_traits<char>>(v5, "Check failed: !IsLoggingInitialized() ", 38LL);
std::__ostream_insert<char,std::char_traits<char>>(v5, "You called InitializeLogging() twice!", 37LL);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v6);
}
v2 = strrchr(this, (char *)&qword_28 + 7);
v3 = (nglog::tools *)(v2 + 1);
if ( !v2 )
v3 = this;
nglog::g_program_invocation_short_name = (long long)v3;
return nglog::InstallFailureFunction((nglog *)nglog::DumpStackTraceAndExit, (void (*)(void))((char *)&qword_28 + 7));
}
| InitializeLoggingUtilities:
PUSH RBX
SUB RSP,0x60
CMP qword ptr [0x00143b10],0x0
JNZ 0x001221e1
MOV RBX,RDI
MOV ESI,0x2f
CALL 0x001075a0
LEA RCX,[RAX + 0x1]
TEST RAX,RAX
CMOVZ RCX,RBX
MOV qword ptr [0x00143b10],RCX
LEA RDI,[0x122243]
ADD RSP,0x60
POP RBX
JMP 0x0010c0c9
LAB_001221e1:
LEA RSI,[0x1252c8]
MOV RBX,RSP
MOV RDI,RBX
MOV EDX,0x12b
CALL 0x0010efae
LAB_001221f8:
MOV RDI,RBX
CALL 0x0010b726
MOV RBX,RAX
LEA RSI,[0x125311]
MOV EDX,0x26
MOV RDI,RAX
CALL 0x001075e0
LEA RSI,[0x125338]
MOV EDX,0x25
MOV RDI,RBX
CALL 0x001075e0
LAB_0012222b:
MOV RDI,RSP
CALL 0x0010eff2
LAB_00122233:
MOV RDI,RSP
CALL 0x0010eff2
LAB_0012223b:
MOV RDI,RAX
CALL 0x00109f3d
|
/* nglog::tools::InitializeLoggingUtilities(char const*) */
void nglog::tools::InitializeLoggingUtilities(char *param_1)
{
char *pcVar1;
ostream *poVar2;
int8 uVar3;
LogMessageFatal aLStack_68 [96];
if (g_program_invocation_short_name == (char *)0x0) {
pcVar1 = strrchr(param_1,0x2f);
g_program_invocation_short_name = pcVar1 + 1;
if (pcVar1 == (char *)0x0) {
g_program_invocation_short_name = param_1;
}
InstallFailureFunction(DumpStackTraceAndExit);
return;
}
LogMessageFatal::LogMessageFatal
(aLStack_68,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
299);
/* try { // try from 001221f8 to 0012222a has its CatchHandler @ 00122233 */
poVar2 = (ostream *)LogMessage::stream((LogMessage *)aLStack_68);
std::__ostream_insert<char,std::char_traits<char>>
(poVar2,"Check failed: !IsLoggingInitialized() ",0x26);
std::__ostream_insert<char,std::char_traits<char>>
(poVar2,"You called InitializeLogging() twice!",0x25);
LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 001221f8 with catch @ 00122233
try { // try from 00122233 to 0012223a has its CatchHandler @ 0012223b */
uVar3 = LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 00122233 with catch @ 0012223b
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar3);
}
| |
35,926 | PlayAutomationEvent | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c | void PlayAutomationEvent(AutomationEvent event)
{
#if defined(SUPPORT_AUTOMATION_EVENTS)
// WARNING: When should event be played? After/before/replace PollInputEvents()? -> Up to the user!
if (!automationEventRecording) // TODO: Allow recording events while playing?
{
switch (event.type)
{
// Input event
case INPUT_KEY_UP: CORE.Input.Keyboard.currentKeyState[event.params[0]] = false; break; // param[0]: key
case INPUT_KEY_DOWN: { // param[0]: key
CORE.Input.Keyboard.currentKeyState[event.params[0]] = true;
if (CORE.Input.Keyboard.previousKeyState[event.params[0]] == false)
{
if (CORE.Input.Keyboard.keyPressedQueueCount < MAX_KEY_PRESSED_QUEUE)
{
// Add character to the queue
CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount] = event.params[0];
CORE.Input.Keyboard.keyPressedQueueCount++;
}
}
} break;
case INPUT_MOUSE_BUTTON_UP: CORE.Input.Mouse.currentButtonState[event.params[0]] = false; break; // param[0]: key
case INPUT_MOUSE_BUTTON_DOWN: CORE.Input.Mouse.currentButtonState[event.params[0]] = true; break; // param[0]: key
case INPUT_MOUSE_POSITION: // param[0]: x, param[1]: y
{
CORE.Input.Mouse.currentPosition.x = (float)event.params[0];
CORE.Input.Mouse.currentPosition.y = (float)event.params[1];
} break;
case INPUT_MOUSE_WHEEL_MOTION: // param[0]: x delta, param[1]: y delta
{
CORE.Input.Mouse.currentWheelMove.x = (float)event.params[0];
CORE.Input.Mouse.currentWheelMove.y = (float)event.params[1];
} break;
case INPUT_TOUCH_UP: CORE.Input.Touch.currentTouchState[event.params[0]] = false; break; // param[0]: id
case INPUT_TOUCH_DOWN: CORE.Input.Touch.currentTouchState[event.params[0]] = true; break; // param[0]: id
case INPUT_TOUCH_POSITION: // param[0]: id, param[1]: x, param[2]: y
{
CORE.Input.Touch.position[event.params[0]].x = (float)event.params[1];
CORE.Input.Touch.position[event.params[0]].y = (float)event.params[2];
} break;
case INPUT_GAMEPAD_CONNECT: CORE.Input.Gamepad.ready[event.params[0]] = true; break; // param[0]: gamepad
case INPUT_GAMEPAD_DISCONNECT: CORE.Input.Gamepad.ready[event.params[0]] = false; break; // param[0]: gamepad
case INPUT_GAMEPAD_BUTTON_UP: CORE.Input.Gamepad.currentButtonState[event.params[0]][event.params[1]] = false; break; // param[0]: gamepad, param[1]: button
case INPUT_GAMEPAD_BUTTON_DOWN: CORE.Input.Gamepad.currentButtonState[event.params[0]][event.params[1]] = true; break; // param[0]: gamepad, param[1]: button
case INPUT_GAMEPAD_AXIS_MOTION: // param[0]: gamepad, param[1]: axis, param[2]: delta
{
CORE.Input.Gamepad.axisState[event.params[0]][event.params[1]] = ((float)event.params[2]/32768.0f);
} break;
#if defined(SUPPORT_GESTURES_SYSTEM)
case INPUT_GESTURE: GESTURES.current = event.params[0]; break; // param[0]: gesture (enum Gesture) -> rgestures.h: GESTURES.current
#endif
// Window event
case WINDOW_CLOSE: CORE.Window.shouldClose = true; break;
case WINDOW_MAXIMIZE: MaximizeWindow(); break;
case WINDOW_MINIMIZE: MinimizeWindow(); break;
case WINDOW_RESIZE: SetWindowSize(event.params[0], event.params[1]); break;
// Custom event
#if defined(SUPPORT_SCREEN_CAPTURE)
case ACTION_TAKE_SCREENSHOT:
{
TakeScreenshot(TextFormat("screenshot%03i.png", screenshotCounter));
screenshotCounter++;
} break;
#endif
case ACTION_SETTARGETFPS: SetTargetFPS(event.params[0]); break;
default: break;
}
TRACELOG(LOG_INFO, "AUTOMATION PLAY: Frame: %i | Event type: %i | Event parameters: %i, %i, %i", event.frame, event.type, event.params[0], event.params[1], event.params[2]);
}
#endif
} | O0 | c | PlayAutomationEvent:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
testb $0x1, 0x1480a5(%rip) # 0x21b7fc
jne 0xd3a84
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0x16, %eax
ja 0xd3a58
movq -0x10(%rbp), %rax
leaq 0xdfe08(%rip), %rcx # 0x1b3588
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rcx
leaq 0x1474e8(%rip), %rax # 0x21ac80
movb $0x0, 0xc4(%rax,%rcx)
jmp 0xd3a5a
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rdx
leaq 0x1474cc(%rip), %rcx # 0x21ac80
movb $0x1, 0xc4(%rcx,%rdx)
movslq 0x8(%rax), %rcx
leaq 0x1474b9(%rip), %rax # 0x21ac80
movsbl 0x2c4(%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0xd380a
cmpl $0x10, 0x147ba9(%rip) # 0x21b384
jge 0xd3808
movq -0x8(%rbp), %rax
movl 0x8(%rax), %edx
movslq 0x147b99(%rip), %rcx # 0x21b384
leaq 0x14748e(%rip), %rax # 0x21ac80
movl %edx, 0x6c4(%rax,%rcx,4)
movl 0x147b85(%rip), %eax # 0x21b384
addl $0x1, %eax
movl %eax, 0x147b7c(%rip) # 0x21b384
jmp 0xd380a
jmp 0xd3a5a
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rcx
leaq 0x147462(%rip), %rax # 0x21ac80
movb $0x0, 0x772(%rax,%rcx)
jmp 0xd3a5a
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rcx
leaq 0x147446(%rip), %rax # 0x21ac80
movb $0x1, 0x772(%rax,%rcx)
jmp 0xd3a5a
movq -0x8(%rbp), %rax
cvtsi2ssl 0x8(%rax), %xmm0
movss %xmm0, 0x147b84(%rip) # 0x21b3dc
cvtsi2ssl 0xc(%rax), %xmm0
movss %xmm0, 0x147b7b(%rip) # 0x21b3e0
jmp 0xd3a5a
movq -0x8(%rbp), %rax
cvtsi2ssl 0x8(%rax), %xmm0
movss %xmm0, 0x147b89(%rip) # 0x21b404
cvtsi2ssl 0xc(%rax), %xmm0
movss %xmm0, 0x147b80(%rip) # 0x21b408
jmp 0xd3a5a
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rcx
leaq 0x1473e4(%rip), %rax # 0x21ac80
movb $0x0, 0x7f8(%rax,%rcx)
jmp 0xd3a5a
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rcx
leaq 0x1473c8(%rip), %rax # 0x21ac80
movb $0x1, 0x7f8(%rax,%rcx)
jmp 0xd3a5a
movq -0x8(%rbp), %rax
cvtsi2ssl 0xc(%rax), %xmm0
movslq 0x8(%rax), %rdx
leaq 0x1473a7(%rip), %rcx # 0x21ac80
movss %xmm0, 0x7b8(%rcx,%rdx,8)
cvtsi2ssl 0x10(%rax), %xmm0
movslq 0x8(%rax), %rcx
leaq 0x14738e(%rip), %rax # 0x21ac80
movss %xmm0, 0x7bc(%rax,%rcx,8)
jmp 0xd3a5a
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rcx
leaq 0x147371(%rip), %rax # 0x21ac80
movb $0x1, 0x81c(%rax,%rcx)
jmp 0xd3a5a
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rcx
leaq 0x147355(%rip), %rax # 0x21ac80
movb $0x0, 0x81c(%rax,%rcx)
jmp 0xd3a5a
movq -0x8(%rbp), %rcx
movslq 0x8(%rcx), %rdx
leaq 0x147339(%rip), %rax # 0x21ac80
addq $0xc0, %rax
addq $0x748, %rax # imm = 0x748
addq $0x118, %rax # imm = 0x118
shlq $0x5, %rdx
addq %rdx, %rax
movslq 0xc(%rcx), %rcx
movb $0x0, (%rax,%rcx)
jmp 0xd3a5a
movq -0x8(%rbp), %rcx
movslq 0x8(%rcx), %rdx
leaq 0x147304(%rip), %rax # 0x21ac80
addq $0xc0, %rax
addq $0x748, %rax # imm = 0x748
addq $0x118, %rax # imm = 0x118
shlq $0x5, %rdx
addq %rdx, %rax
movslq 0xc(%rcx), %rcx
movb $0x1, (%rax,%rcx)
jmp 0xd3a5a
movq -0x8(%rbp), %rcx
cvtsi2ssl 0x10(%rcx), %xmm0
movss 0xd45bd(%rip), %xmm1 # 0x1a7f70
divss %xmm1, %xmm0
movslq 0x8(%rcx), %rdx
leaq 0x1472be(%rip), %rax # 0x21ac80
addq $0xc0, %rax
addq $0x748, %rax # imm = 0x748
addq $0x218, %rax # imm = 0x218
shlq $0x5, %rdx
addq %rdx, %rax
movslq 0xc(%rcx), %rcx
movss %xmm0, (%rax,%rcx,4)
jmp 0xd3a5a
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x1401bd(%rip) # 0x213bb0
jmp 0xd3a5a
movb $0x1, 0x147292(%rip) # 0x21ac8e
jmp 0xd3a5a
callq 0xc92c0
jmp 0xd3a5a
callq 0xc9300
jmp 0xd3a5a
movq -0x8(%rbp), %rax
movl 0x8(%rax), %edi
movl 0xc(%rax), %esi
callq 0xc9ff0
jmp 0xd3a5a
movl 0x147ddd(%rip), %esi # 0x21b800
leaq 0xe209a(%rip), %rdi # 0x1b5ac4
movb $0x0, %al
callq 0xe5c90
movq %rax, %rdi
callq 0xce8e0
movl 0x147dc1(%rip), %eax # 0x21b800
addl $0x1, %eax
movl %eax, 0x147db8(%rip) # 0x21b800
jmp 0xd3a5a
movq -0x8(%rbp), %rax
movl 0x8(%rax), %edi
callq 0xd0d70
jmp 0xd3a5a
jmp 0xd3a5a
movq -0x8(%rbp), %rax
movl (%rax), %edx
movl 0x4(%rax), %ecx
movl 0x8(%rax), %r8d
movl 0xc(%rax), %r9d
movl 0x10(%rax), %eax
movl $0x3, %edi
leaq 0xe2609(%rip), %rsi # 0x1b6083
movl %eax, (%rsp)
movb $0x0, %al
callq 0x182c40
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| PlayAutomationEvent:
push rbp
mov rbp, rsp
sub rsp, 20h
lea rax, [rbp+arg_0]
mov [rbp+var_8], rax
test cs:automationEventRecording, 1
jnz loc_D3A84
mov rax, [rbp+var_8]
mov eax, [rax+4]
dec eax; switch 23 cases
mov ecx, eax
mov [rbp+var_10], rcx
sub eax, 16h
ja def_D3787; jumptable 00000000000D3787 default case, cases 3,4
mov rax, [rbp+var_10]
lea rcx, jpt_D3787
movsxd rax, ds:(jpt_D3787 - 1B3588h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_D3789:
mov rax, [rbp+var_8]; jumptable 00000000000D3787 case 1
movsxd rcx, dword ptr [rax+8]
lea rax, CORE
mov byte ptr [rax+rcx+0C4h], 0
jmp loc_D3A5A
loc_D37A5:
mov rax, [rbp+var_8]; jumptable 00000000000D3787 case 2
movsxd rdx, dword ptr [rax+8]
lea rcx, CORE
mov byte ptr [rcx+rdx+0C4h], 1
movsxd rcx, dword ptr [rax+8]
lea rax, CORE
movsx eax, byte ptr [rax+rcx+2C4h]
cmp eax, 0
jnz short loc_D380A
cmp cs:dword_21B384, 10h
jge short loc_D3808
mov rax, [rbp+var_8]
mov edx, [rax+8]
movsxd rcx, cs:dword_21B384
lea rax, CORE
mov [rax+rcx*4+6C4h], edx
mov eax, cs:dword_21B384
add eax, 1
mov cs:dword_21B384, eax
loc_D3808:
jmp short $+2
loc_D380A:
jmp loc_D3A5A
loc_D380F:
mov rax, [rbp+var_8]; jumptable 00000000000D3787 case 5
movsxd rcx, dword ptr [rax+8]
lea rax, CORE
mov byte ptr [rax+rcx+772h], 0
jmp loc_D3A5A
loc_D382B:
mov rax, [rbp+var_8]; jumptable 00000000000D3787 case 6
movsxd rcx, dword ptr [rax+8]
lea rax, CORE
mov byte ptr [rax+rcx+772h], 1
jmp loc_D3A5A
loc_D3847:
mov rax, [rbp+var_8]; jumptable 00000000000D3787 case 7
cvtsi2ss xmm0, dword ptr [rax+8]
movss dword ptr cs:qword_21B3DC, xmm0
cvtsi2ss xmm0, dword ptr [rax+0Ch]
movss dword ptr cs:qword_21B3DC+4, xmm0
jmp loc_D3A5A
loc_D386A:
mov rax, [rbp+var_8]; jumptable 00000000000D3787 case 8
cvtsi2ss xmm0, dword ptr [rax+8]
movss dword ptr cs:qword_21B404, xmm0
cvtsi2ss xmm0, dword ptr [rax+0Ch]
movss dword ptr cs:qword_21B404+4, xmm0
jmp loc_D3A5A
loc_D388D:
mov rax, [rbp+var_8]; jumptable 00000000000D3787 case 14
movsxd rcx, dword ptr [rax+8]
lea rax, CORE
mov byte ptr [rax+rcx+7F8h], 0
jmp loc_D3A5A
loc_D38A9:
mov rax, [rbp+var_8]; jumptable 00000000000D3787 case 15
movsxd rcx, dword ptr [rax+8]
lea rax, CORE
mov byte ptr [rax+rcx+7F8h], 1
jmp loc_D3A5A
loc_D38C5:
mov rax, [rbp+var_8]; jumptable 00000000000D3787 case 16
cvtsi2ss xmm0, dword ptr [rax+0Ch]
movsxd rdx, dword ptr [rax+8]
lea rcx, CORE
movss dword ptr [rcx+rdx*8+7B8h], xmm0
cvtsi2ss xmm0, dword ptr [rax+10h]
movsxd rcx, dword ptr [rax+8]
lea rax, CORE
movss dword ptr [rax+rcx*8+7BCh], xmm0
jmp loc_D3A5A
loc_D3900:
mov rax, [rbp+var_8]; jumptable 00000000000D3787 case 9
movsxd rcx, dword ptr [rax+8]
lea rax, CORE
mov byte ptr [rax+rcx+81Ch], 1
jmp loc_D3A5A
loc_D391C:
mov rax, [rbp+var_8]; jumptable 00000000000D3787 case 10
movsxd rcx, dword ptr [rax+8]
lea rax, CORE
mov byte ptr [rax+rcx+81Ch], 0
jmp loc_D3A5A
loc_D3938:
mov rcx, [rbp+var_8]; jumptable 00000000000D3787 case 11
movsxd rdx, dword ptr [rcx+8]
lea rax, CORE
add rax, 0C0h
add rax, 748h
add rax, 118h
shl rdx, 5
add rax, rdx
movsxd rcx, dword ptr [rcx+0Ch]
mov byte ptr [rax+rcx], 0
jmp loc_D3A5A
loc_D396D:
mov rcx, [rbp+var_8]; jumptable 00000000000D3787 case 12
movsxd rdx, dword ptr [rcx+8]
lea rax, CORE
add rax, 0C0h
add rax, 748h
add rax, 118h
shl rdx, 5
add rax, rdx
movsxd rcx, dword ptr [rcx+0Ch]
mov byte ptr [rax+rcx], 1
jmp loc_D3A5A
loc_D39A2:
mov rcx, [rbp+var_8]; jumptable 00000000000D3787 case 13
cvtsi2ss xmm0, dword ptr [rcx+10h]
movss xmm1, cs:dword_1A7F70
divss xmm0, xmm1
movsxd rdx, dword ptr [rcx+8]
lea rax, CORE
add rax, 0C0h
add rax, 748h
add rax, 218h
shl rdx, 5
add rax, rdx
movsxd rcx, dword ptr [rcx+0Ch]
movss dword ptr [rax+rcx*4], xmm0
jmp short loc_D3A5A
loc_D39E6:
mov rax, [rbp+var_8]; jumptable 00000000000D3787 case 17
mov eax, [rax+8]
mov cs:GESTURES, eax
jmp short loc_D3A5A
loc_D39F5:
mov cs:byte_21AC8E, 1; jumptable 00000000000D3787 case 18
jmp short loc_D3A5A
loc_D39FE:
call MaximizeWindow; jumptable 00000000000D3787 case 19
jmp short loc_D3A5A
loc_D3A05:
call MinimizeWindow; jumptable 00000000000D3787 case 20
jmp short loc_D3A5A
loc_D3A0C:
mov rax, [rbp+var_8]; jumptable 00000000000D3787 case 21
mov edi, [rax+8]
mov esi, [rax+0Ch]
call SetWindowSize
jmp short loc_D3A5A
loc_D3A1D:
mov esi, cs:screenshotCounter; jumptable 00000000000D3787 case 22
lea rdi, aScreenshot03iP; "screenshot%03i.png"
mov al, 0
call TextFormat
mov rdi, rax
call TakeScreenshot
mov eax, cs:screenshotCounter
add eax, 1
mov cs:screenshotCounter, eax
jmp short loc_D3A5A
loc_D3A4A:
mov rax, [rbp+var_8]; jumptable 00000000000D3787 case 23
mov edi, [rax+8]
call SetTargetFPS
jmp short loc_D3A5A
def_D3787:
jmp short $+2; jumptable 00000000000D3787 default case, cases 3,4
loc_D3A5A:
mov rax, [rbp+var_8]
mov edx, [rax]
mov ecx, [rax+4]
mov r8d, [rax+8]
mov r9d, [rax+0Ch]
mov eax, [rax+10h]
mov edi, 3
lea rsi, aAutomationPlay; "AUTOMATION PLAY: Frame: %i | Event type"...
mov [rsp+20h+var_20], eax
mov al, 0
call TraceLog
loc_D3A84:
add rsp, 20h
pop rbp
retn
| long long * PlayAutomationEvent(
long long a1,
long long a2,
int a3,
long long a4,
int a5,
int a6,
long long a7,
long long a8,
int a9)
{
long long *result; // rax
int v10; // ecx
long long v11; // rax
result = &a7;
if ( (automationEventRecording & 1) == 0 )
{
v10 = HIDWORD(a7) - 1;
switch ( HIDWORD(a7) )
{
case 1:
*((_BYTE *)&CORE[24] + (int)a8 + 4) = 0;
break;
case 2:
*((_BYTE *)&CORE[24] + (int)a8 + 4) = 1;
if ( !*((_BYTE *)&CORE[88] + (int)a8 + 4) && dword_21B384 < 16 )
*((_DWORD *)&CORE[216] + ++dword_21B384) = a8;
break;
case 5:
*((_BYTE *)&CORE[238] + (int)a8 + 2) = 0;
break;
case 6:
*((_BYTE *)&CORE[238] + (int)a8 + 2) = 1;
break;
case 7:
*(float *)&qword_21B3DC = (float)(int)a8;
*((float *)&qword_21B3DC + 1) = (float)SHIDWORD(a8);
break;
case 8:
*(float *)&qword_21B404 = (float)(int)a8;
*((float *)&qword_21B404 + 1) = (float)SHIDWORD(a8);
break;
case 9:
*((_BYTE *)&CORE[259] + (int)a8 + 4) = 1;
break;
case 0xA:
*((_BYTE *)&CORE[259] + (int)a8 + 4) = 0;
break;
case 0xB:
*((_BYTE *)&CORE[4 * (int)a8 + 292] + SHIDWORD(a8)) = 0;
break;
case 0xC:
*((_BYTE *)&CORE[4 * (int)a8 + 292] + SHIDWORD(a8)) = 1;
break;
case 0xD:
*((float *)&CORE[4 * (int)a8 + 324] + SHIDWORD(a8)) = (float)a9 / 32768.0;
break;
case 0xE:
*((_BYTE *)&CORE[255] + (int)a8) = 0;
break;
case 0xF:
*((_BYTE *)&CORE[255] + (int)a8) = 1;
break;
case 0x10:
*(float *)&CORE[(int)a8 + 247] = (float)SHIDWORD(a8);
*((float *)&CORE[(int)a8 + 247] + 1) = (float)a9;
break;
case 0x11:
GESTURES = a8;
break;
case 0x12:
byte_21AC8E = 1;
break;
case 0x13:
MaximizeWindow();
break;
case 0x14:
MinimizeWindow();
break;
case 0x15:
SetWindowSize(a8, HIDWORD(a8));
break;
case 0x16:
v11 = TextFormat((unsigned int)"screenshot%03i.png", screenshotCounter, a3, v10, a5, a6);
TakeScreenshot(v11);
++screenshotCounter;
break;
case 0x17:
SetTargetFPS(a8, a2, a3, v10, a5, a6);
break;
default:
return (long long *)TraceLog(
3,
(unsigned int)"AUTOMATION PLAY: Frame: %i | Event type: %i | Event parameters: %i, %i, %i",
a7,
HIDWORD(a7),
a8,
HIDWORD(a8));
}
return (long long *)TraceLog(
3,
(unsigned int)"AUTOMATION PLAY: Frame: %i | Event type: %i | Event parameters: %i, %i, %i",
a7,
HIDWORD(a7),
a8,
HIDWORD(a8));
}
return result;
}
| PlayAutomationEvent:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x8],RAX
TEST byte ptr [0x0031b7fc],0x1
JNZ 0x001d3a84
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x4]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x10],RCX
SUB EAX,0x16
JA 0x001d3a58
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2b3588]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RAX + 0x8]
LEA RAX,[0x31ac80]
MOV byte ptr [RAX + RCX*0x1 + 0xc4],0x0
JMP 0x001d3a5a
caseD_2:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RAX + 0x8]
LEA RCX,[0x31ac80]
MOV byte ptr [RCX + RDX*0x1 + 0xc4],0x1
MOVSXD RCX,dword ptr [RAX + 0x8]
LEA RAX,[0x31ac80]
MOVSX EAX,byte ptr [RAX + RCX*0x1 + 0x2c4]
CMP EAX,0x0
JNZ 0x001d380a
CMP dword ptr [0x0031b384],0x10
JGE 0x001d3808
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [0x0031b384]
LEA RAX,[0x31ac80]
MOV dword ptr [RAX + RCX*0x4 + 0x6c4],EDX
MOV EAX,dword ptr [0x0031b384]
ADD EAX,0x1
MOV dword ptr [0x0031b384],EAX
LAB_001d3808:
JMP 0x001d380a
LAB_001d380a:
JMP 0x001d3a5a
caseD_5:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RAX + 0x8]
LEA RAX,[0x31ac80]
MOV byte ptr [RAX + RCX*0x1 + 0x772],0x0
JMP 0x001d3a5a
caseD_6:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RAX + 0x8]
LEA RAX,[0x31ac80]
MOV byte ptr [RAX + RCX*0x1 + 0x772],0x1
JMP 0x001d3a5a
caseD_7:
MOV RAX,qword ptr [RBP + -0x8]
CVTSI2SS XMM0,dword ptr [RAX + 0x8]
MOVSS dword ptr [0x0031b3dc],XMM0
CVTSI2SS XMM0,dword ptr [RAX + 0xc]
MOVSS dword ptr [0x0031b3e0],XMM0
JMP 0x001d3a5a
caseD_8:
MOV RAX,qword ptr [RBP + -0x8]
CVTSI2SS XMM0,dword ptr [RAX + 0x8]
MOVSS dword ptr [0x0031b404],XMM0
CVTSI2SS XMM0,dword ptr [RAX + 0xc]
MOVSS dword ptr [0x0031b408],XMM0
JMP 0x001d3a5a
caseD_e:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RAX + 0x8]
LEA RAX,[0x31ac80]
MOV byte ptr [RAX + RCX*0x1 + 0x7f8],0x0
JMP 0x001d3a5a
caseD_f:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RAX + 0x8]
LEA RAX,[0x31ac80]
MOV byte ptr [RAX + RCX*0x1 + 0x7f8],0x1
JMP 0x001d3a5a
caseD_10:
MOV RAX,qword ptr [RBP + -0x8]
CVTSI2SS XMM0,dword ptr [RAX + 0xc]
MOVSXD RDX,dword ptr [RAX + 0x8]
LEA RCX,[0x31ac80]
MOVSS dword ptr [RCX + RDX*0x8 + 0x7b8],XMM0
CVTSI2SS XMM0,dword ptr [RAX + 0x10]
MOVSXD RCX,dword ptr [RAX + 0x8]
LEA RAX,[0x31ac80]
MOVSS dword ptr [RAX + RCX*0x8 + 0x7bc],XMM0
JMP 0x001d3a5a
caseD_9:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RAX + 0x8]
LEA RAX,[0x31ac80]
MOV byte ptr [RAX + RCX*0x1 + 0x81c],0x1
JMP 0x001d3a5a
caseD_a:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RAX + 0x8]
LEA RAX,[0x31ac80]
MOV byte ptr [RAX + RCX*0x1 + 0x81c],0x0
JMP 0x001d3a5a
caseD_b:
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RCX + 0x8]
LEA RAX,[0x31ac80]
ADD RAX,0xc0
ADD RAX,0x748
ADD RAX,0x118
SHL RDX,0x5
ADD RAX,RDX
MOVSXD RCX,dword ptr [RCX + 0xc]
MOV byte ptr [RAX + RCX*0x1],0x0
JMP 0x001d3a5a
caseD_c:
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RCX + 0x8]
LEA RAX,[0x31ac80]
ADD RAX,0xc0
ADD RAX,0x748
ADD RAX,0x118
SHL RDX,0x5
ADD RAX,RDX
MOVSXD RCX,dword ptr [RCX + 0xc]
MOV byte ptr [RAX + RCX*0x1],0x1
JMP 0x001d3a5a
caseD_d:
MOV RCX,qword ptr [RBP + -0x8]
CVTSI2SS XMM0,dword ptr [RCX + 0x10]
MOVSS XMM1,dword ptr [0x002a7f70]
DIVSS XMM0,XMM1
MOVSXD RDX,dword ptr [RCX + 0x8]
LEA RAX,[0x31ac80]
ADD RAX,0xc0
ADD RAX,0x748
ADD RAX,0x218
SHL RDX,0x5
ADD RAX,RDX
MOVSXD RCX,dword ptr [RCX + 0xc]
MOVSS dword ptr [RAX + RCX*0x4],XMM0
JMP 0x001d3a5a
caseD_11:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [0x00313bb0],EAX
JMP 0x001d3a5a
caseD_12:
MOV byte ptr [0x0031ac8e],0x1
JMP 0x001d3a5a
caseD_13:
CALL 0x001c92c0
JMP 0x001d3a5a
caseD_14:
CALL 0x001c9300
JMP 0x001d3a5a
caseD_15:
MOV RAX,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RAX + 0x8]
MOV ESI,dword ptr [RAX + 0xc]
CALL 0x001c9ff0
JMP 0x001d3a5a
caseD_16:
MOV ESI,dword ptr [0x0031b800]
LEA RDI,[0x2b5ac4]
MOV AL,0x0
CALL 0x001e5c90
MOV RDI,RAX
CALL 0x001ce8e0
MOV EAX,dword ptr [0x0031b800]
ADD EAX,0x1
MOV dword ptr [0x0031b800],EAX
JMP 0x001d3a5a
caseD_17:
MOV RAX,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RAX + 0x8]
CALL 0x001d0d70
JMP 0x001d3a5a
caseD_3:
JMP 0x001d3a5a
LAB_001d3a5a:
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x4]
MOV R8D,dword ptr [RAX + 0x8]
MOV R9D,dword ptr [RAX + 0xc]
MOV EAX,dword ptr [RAX + 0x10]
MOV EDI,0x3
LEA RSI,[0x2b6083]
MOV dword ptr [RSP],EAX
MOV AL,0x0
CALL 0x00282c40
LAB_001d3a84:
ADD RSP,0x20
POP RBP
RET
|
void PlayAutomationEvent(void)
{
int8 uVar1;
int4 uStack0000000000000008;
int4 uStack000000000000000c;
int iStack0000000000000010;
int iStack0000000000000014;
int in_stack_00000018;
if ((automationEventRecording & 1) == 0) {
switch(uStack000000000000000c) {
case 1:
(&DAT_0031ad44)[iStack0000000000000010] = 0;
break;
case 2:
(&DAT_0031ad44)[iStack0000000000000010] = 1;
if (((&DAT_0031af44)[iStack0000000000000010] == '\0') && (DAT_0031b384 < 0x10)) {
*(int *)(&DAT_0031b344 + (long)DAT_0031b384 * 4) = iStack0000000000000010;
DAT_0031b384 = DAT_0031b384 + 1;
}
break;
default:
break;
case 5:
(&DAT_0031b3f2)[iStack0000000000000010] = 0;
break;
case 6:
(&DAT_0031b3f2)[iStack0000000000000010] = 1;
break;
case 7:
DAT_0031b3dc._0_4_ = (float)iStack0000000000000010;
DAT_0031b3dc._4_4_ = (float)iStack0000000000000014;
break;
case 8:
DAT_0031b404._0_4_ = (float)iStack0000000000000010;
DAT_0031b404._4_4_ = (float)iStack0000000000000014;
break;
case 9:
(&DAT_0031b49c)[iStack0000000000000010] = 1;
break;
case 10:
(&DAT_0031b49c)[iStack0000000000000010] = 0;
break;
case 0xb:
*(int1 *)((long)iStack0000000000000010 * 0x20 + 0x31b5a0 + (long)iStack0000000000000014)
= 0;
break;
case 0xc:
*(int1 *)((long)iStack0000000000000010 * 0x20 + 0x31b5a0 + (long)iStack0000000000000014)
= 1;
break;
case 0xd:
*(float *)((long)iStack0000000000000010 * 0x20 + 0x31b6a0 + (long)iStack0000000000000014 * 4)
= (float)in_stack_00000018 / DAT_002a7f70;
break;
case 0xe:
(&DAT_0031b478)[iStack0000000000000010] = 0;
break;
case 0xf:
(&DAT_0031b478)[iStack0000000000000010] = 1;
break;
case 0x10:
*(float *)(&DAT_0031b438 + iStack0000000000000010) = (float)iStack0000000000000014;
*(float *)((long)&DAT_0031b438 + (long)iStack0000000000000010 * 8 + 4) =
(float)in_stack_00000018;
break;
case 0x11:
GESTURES = iStack0000000000000010;
break;
case 0x12:
DAT_0031ac8e = 1;
break;
case 0x13:
MaximizeWindow();
break;
case 0x14:
MinimizeWindow();
break;
case 0x15:
SetWindowSize(iStack0000000000000010,iStack0000000000000014);
break;
case 0x16:
uVar1 = TextFormat("screenshot%03i.png",screenshotCounter);
TakeScreenshot(uVar1);
screenshotCounter = screenshotCounter + 1;
break;
case 0x17:
SetTargetFPS(iStack0000000000000010);
}
TraceLog(3,"AUTOMATION PLAY: Frame: %i | Event type: %i | Event parameters: %i, %i, %i",
uStack0000000000000008,uStack000000000000000c,iStack0000000000000010,
iStack0000000000000014,in_stack_00000018);
}
return;
}
| |
35,927 | PlayAutomationEvent | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c | void PlayAutomationEvent(AutomationEvent event)
{
#if defined(SUPPORT_AUTOMATION_EVENTS)
// WARNING: When should event be played? After/before/replace PollInputEvents()? -> Up to the user!
if (!automationEventRecording) // TODO: Allow recording events while playing?
{
switch (event.type)
{
// Input event
case INPUT_KEY_UP: CORE.Input.Keyboard.currentKeyState[event.params[0]] = false; break; // param[0]: key
case INPUT_KEY_DOWN: { // param[0]: key
CORE.Input.Keyboard.currentKeyState[event.params[0]] = true;
if (CORE.Input.Keyboard.previousKeyState[event.params[0]] == false)
{
if (CORE.Input.Keyboard.keyPressedQueueCount < MAX_KEY_PRESSED_QUEUE)
{
// Add character to the queue
CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount] = event.params[0];
CORE.Input.Keyboard.keyPressedQueueCount++;
}
}
} break;
case INPUT_MOUSE_BUTTON_UP: CORE.Input.Mouse.currentButtonState[event.params[0]] = false; break; // param[0]: key
case INPUT_MOUSE_BUTTON_DOWN: CORE.Input.Mouse.currentButtonState[event.params[0]] = true; break; // param[0]: key
case INPUT_MOUSE_POSITION: // param[0]: x, param[1]: y
{
CORE.Input.Mouse.currentPosition.x = (float)event.params[0];
CORE.Input.Mouse.currentPosition.y = (float)event.params[1];
} break;
case INPUT_MOUSE_WHEEL_MOTION: // param[0]: x delta, param[1]: y delta
{
CORE.Input.Mouse.currentWheelMove.x = (float)event.params[0];
CORE.Input.Mouse.currentWheelMove.y = (float)event.params[1];
} break;
case INPUT_TOUCH_UP: CORE.Input.Touch.currentTouchState[event.params[0]] = false; break; // param[0]: id
case INPUT_TOUCH_DOWN: CORE.Input.Touch.currentTouchState[event.params[0]] = true; break; // param[0]: id
case INPUT_TOUCH_POSITION: // param[0]: id, param[1]: x, param[2]: y
{
CORE.Input.Touch.position[event.params[0]].x = (float)event.params[1];
CORE.Input.Touch.position[event.params[0]].y = (float)event.params[2];
} break;
case INPUT_GAMEPAD_CONNECT: CORE.Input.Gamepad.ready[event.params[0]] = true; break; // param[0]: gamepad
case INPUT_GAMEPAD_DISCONNECT: CORE.Input.Gamepad.ready[event.params[0]] = false; break; // param[0]: gamepad
case INPUT_GAMEPAD_BUTTON_UP: CORE.Input.Gamepad.currentButtonState[event.params[0]][event.params[1]] = false; break; // param[0]: gamepad, param[1]: button
case INPUT_GAMEPAD_BUTTON_DOWN: CORE.Input.Gamepad.currentButtonState[event.params[0]][event.params[1]] = true; break; // param[0]: gamepad, param[1]: button
case INPUT_GAMEPAD_AXIS_MOTION: // param[0]: gamepad, param[1]: axis, param[2]: delta
{
CORE.Input.Gamepad.axisState[event.params[0]][event.params[1]] = ((float)event.params[2]/32768.0f);
} break;
#if defined(SUPPORT_GESTURES_SYSTEM)
case INPUT_GESTURE: GESTURES.current = event.params[0]; break; // param[0]: gesture (enum Gesture) -> rgestures.h: GESTURES.current
#endif
// Window event
case WINDOW_CLOSE: CORE.Window.shouldClose = true; break;
case WINDOW_MAXIMIZE: MaximizeWindow(); break;
case WINDOW_MINIMIZE: MinimizeWindow(); break;
case WINDOW_RESIZE: SetWindowSize(event.params[0], event.params[1]); break;
// Custom event
#if defined(SUPPORT_SCREEN_CAPTURE)
case ACTION_TAKE_SCREENSHOT:
{
TakeScreenshot(TextFormat("screenshot%03i.png", screenshotCounter));
screenshotCounter++;
} break;
#endif
case ACTION_SETTARGETFPS: SetTargetFPS(event.params[0]); break;
default: break;
}
TRACELOG(LOG_INFO, "AUTOMATION PLAY: Frame: %i | Event type: %i | Event parameters: %i, %i, %i", event.frame, event.type, event.params[0], event.params[1], event.params[2]);
}
#endif
} | O2 | c | PlayAutomationEvent:
cmpb $0x0, 0xc3b78(%rip) # 0x12875c
jne 0x64e54
pushq %r14
pushq %rbx
pushq %rax
leaq 0x20(%rsp), %r14
movl 0x4(%r14), %ebx
leal -0x1(%rbx), %eax
cmpl $0x16, %eax
ja 0x64e28
leaq 0x5ebda(%rip), %rcx # 0xc37e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq 0x8(%r14), %rax
leaq 0xc2fc2(%rip), %rcx # 0x127be0
movb $0x0, 0xc4(%rax,%rcx)
jmp 0x64e28
movl 0x8(%r14), %edi
movl 0xc(%r14), %esi
callq 0x5ebe8
jmp 0x64e28
movslq 0x8(%r14), %rax
leaq 0xc2f98(%rip), %rcx # 0x127be0
movsd 0xc(%r14), %xmm0
cvtdq2ps %xmm0, %xmm0
movlps %xmm0, 0x7b8(%rcx,%rax,8)
jmp 0x64e28
cvtsi2ssl 0x10(%r14), %xmm0
mulss 0x54a40(%rip), %xmm0 # 0xb96ac
movslq 0x8(%r14), %rax
movslq 0xc(%r14), %rcx
shlq $0x5, %rax
leaq 0xc2f61(%rip), %rdx # 0x127be0
addq %rax, %rdx
movss %xmm0, 0xa20(%rdx,%rcx,4)
jmp 0x64e28
movslq 0x8(%r14), %rax
leaq 0xc2f45(%rip), %rcx # 0x127be0
movb $0x1, 0x7f8(%rax,%rcx)
jmp 0x64e28
movl 0xc3ab2(%rip), %esi # 0x128760
leaq 0x61532(%rip), %rdi # 0xc61e7
xorl %eax, %eax
callq 0x719ab
movq %rax, %rdi
callq 0x61628
incl 0xc3a96(%rip) # 0x128760
jmp 0x64e28
movslq 0x8(%r14), %rax
leaq 0xc2f06(%rip), %rcx # 0x127be0
movb $0x0, 0x772(%rax,%rcx)
jmp 0x64e28
movsd 0x8(%r14), %xmm0
cvtdq2ps %xmm0, %xmm0
movlps %xmm0, 0xc366d(%rip) # 0x128364
jmp 0x64e28
movslq 0x8(%r14), %rax
leaq 0xc2ed9(%rip), %rcx # 0x127be0
movb $0x0, 0x7f8(%rax,%rcx)
jmp 0x64e28
movslq 0x8(%r14), %rax
leaq 0xc2ec1(%rip), %rcx # 0x127be0
movb $0x1, 0xc4(%rax,%rcx)
cmpb $0x0, 0x2c4(%rax,%rcx)
sete %sil
movl 0xc35ab(%rip), %edx # 0x1282e4
cmpl $0x10, %edx
setl %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x64e28
movslq %edx, %rdx
movl %eax, 0x6c4(%rcx,%rdx,4)
incl 0xc3587(%rip) # 0x1282e4
jmp 0x64e28
movslq 0x8(%r14), %rax
leaq 0xc2e73(%rip), %rcx # 0x127be0
movb $0x1, 0x81c(%rax,%rcx)
jmp 0x64e28
movslq 0x8(%r14), %rax
leaq 0xc2e5b(%rip), %rcx # 0x127be0
movb $0x0, 0x81c(%rax,%rcx)
jmp 0x64e28
movl 0x8(%r14), %eax
movl %eax, 0xbda24(%rip) # 0x1227c0
jmp 0x64e28
movb $0x1, 0xc2e46(%rip) # 0x127bee
jmp 0x64e28
movslq 0x8(%r14), %rax
leaq 0xc2e2b(%rip), %rcx # 0x127be0
movb $0x1, 0x772(%rax,%rcx)
jmp 0x64e28
movsd 0x8(%r14), %xmm0
cvtdq2ps %xmm0, %xmm0
movlps %xmm0, 0xc356d(%rip) # 0x12833c
jmp 0x64e28
movslq 0x8(%r14), %rax
movslq 0xc(%r14), %rcx
shlq $0x5, %rax
leaq 0xc2dfc(%rip), %rdx # 0x127be0
addq %rax, %rdx
movb $0x1, 0x920(%rcx,%rdx)
jmp 0x64e28
movslq 0x8(%r14), %rax
movslq 0xc(%r14), %rcx
shlq $0x5, %rax
leaq 0xc2ddc(%rip), %rdx # 0x127be0
addq %rax, %rdx
movb $0x0, 0x920(%rcx,%rdx)
jmp 0x64e28
callq 0x5e428
jmp 0x64e28
callq 0x5e3fc
jmp 0x64e28
movl 0x8(%r14), %edi
callq 0x634a2
movl (%r14), %edx
movl 0x8(%r14), %r8d
movl 0xc(%r14), %r9d
movl 0x10(%r14), %eax
movl %eax, (%rsp)
leaq 0x6192f(%rip), %rsi # 0xc6770
pushq $0x3
popq %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0xa128b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| PlayAutomationEvent:
cmp cs:automationEventRecording, 0
jnz locret_64E54
push r14
push rbx
push rax
lea r14, [rsp+18h+arg_0]
mov ebx, [r14+4]
lea eax, [rbx-1]; switch 23 cases
cmp eax, 16h
ja def_64C11; jumptable 0000000000064C11 default case, cases 3,4
lea rcx, jpt_64C11
movsxd rax, ds:(jpt_64C11 - 0C37E4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_64C13:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000064C11 case 1
lea rcx, CORE
mov byte ptr [rax+rcx+0C4h], 0
jmp def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64C2B:
mov edi, [r14+8]; jumptable 0000000000064C11 case 21
mov esi, [r14+0Ch]
call SetWindowSize
jmp def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64C3D:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000064C11 case 16
lea rcx, CORE
movsd xmm0, qword ptr [r14+0Ch]
cvtdq2ps xmm0, xmm0
movlps qword ptr [rcx+rax*8+7B8h], xmm0
jmp def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64C5E:
cvtsi2ss xmm0, dword ptr [r14+10h]; jumptable 0000000000064C11 case 13
mulss xmm0, cs:dword_B96AC
movsxd rax, dword ptr [r14+8]
movsxd rcx, dword ptr [r14+0Ch]
shl rax, 5
lea rdx, CORE
add rdx, rax
movss dword ptr [rdx+rcx*4+0A20h], xmm0
jmp def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64C90:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000064C11 case 15
lea rcx, CORE
mov byte ptr [rax+rcx+7F8h], 1
jmp def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64CA8:
mov esi, cs:screenshotCounter; jumptable 0000000000064C11 case 22
lea rdi, aScreenshot03iP; "screenshot%03i.png"
xor eax, eax
call TextFormat
mov rdi, rax
call TakeScreenshot
inc cs:screenshotCounter
jmp def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64CCF:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000064C11 case 5
lea rcx, CORE
mov byte ptr [rax+rcx+772h], 0
jmp def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64CE7:
movsd xmm0, qword ptr [r14+8]; jumptable 0000000000064C11 case 8
cvtdq2ps xmm0, xmm0
movlps cs:qword_128364, xmm0
jmp def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64CFC:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000064C11 case 14
lea rcx, CORE
mov byte ptr [rax+rcx+7F8h], 0
jmp def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64D14:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000064C11 case 2
lea rcx, CORE
mov byte ptr [rax+rcx+0C4h], 1
cmp byte ptr [rax+rcx+2C4h], 0
setz sil
mov edx, cs:dword_1282E4
cmp edx, 10h
setl dil
and dil, sil
cmp dil, 1
jnz def_64C11; jumptable 0000000000064C11 default case, cases 3,4
movsxd rdx, edx
mov [rcx+rdx*4+6C4h], eax
inc cs:dword_1282E4
jmp def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64D62:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000064C11 case 9
lea rcx, CORE
mov byte ptr [rax+rcx+81Ch], 1
jmp def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64D7A:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000064C11 case 10
lea rcx, CORE
mov byte ptr [rax+rcx+81Ch], 0
jmp def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64D92:
mov eax, [r14+8]; jumptable 0000000000064C11 case 17
mov cs:GESTURES, eax
jmp def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64DA1:
mov cs:byte_127BEE, 1; jumptable 0000000000064C11 case 18
jmp short def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64DAA:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000064C11 case 6
lea rcx, CORE
mov byte ptr [rax+rcx+772h], 1
jmp short def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64DBF:
movsd xmm0, qword ptr [r14+8]; jumptable 0000000000064C11 case 7
cvtdq2ps xmm0, xmm0
movlps cs:qword_12833C, xmm0
jmp short def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64DD1:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000064C11 case 12
movsxd rcx, dword ptr [r14+0Ch]
shl rax, 5
lea rdx, CORE
add rdx, rax
mov byte ptr [rcx+rdx+920h], 1
jmp short def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64DF1:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000064C11 case 11
movsxd rcx, dword ptr [r14+0Ch]
shl rax, 5
lea rdx, CORE
add rdx, rax
mov byte ptr [rcx+rdx+920h], 0
jmp short def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64E11:
call MinimizeWindow; jumptable 0000000000064C11 case 20
jmp short def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64E18:
call MaximizeWindow; jumptable 0000000000064C11 case 19
jmp short def_64C11; jumptable 0000000000064C11 default case, cases 3,4
loc_64E1F:
mov edi, [r14+8]; jumptable 0000000000064C11 case 23
call SetTargetFPS
def_64C11:
mov edx, [r14]; jumptable 0000000000064C11 default case, cases 3,4
mov r8d, [r14+8]
mov r9d, [r14+0Ch]
mov eax, [r14+10h]
mov [rsp+18h+var_18], eax
lea rsi, aAutomationPlay; "AUTOMATION PLAY: Frame: %i | Event type"...
push 3
pop rdi
mov ecx, ebx
xor eax, eax
call TraceLog
add rsp, 8
pop rbx
pop r14
locret_64E54:
retn
| long long PlayAutomationEvent(
long long a1,
long long a2,
int a3,
int a4,
int a5,
int a6,
__m128 a7,
long long a8,
__int128 a9)
{
long long v9; // rax
long long result; // rax
if ( !automationEventRecording )
{
switch ( HIDWORD(a8) )
{
case 1:
*((_BYTE *)&CORE[24] + (int)a9 + 4) = 0;
break;
case 2:
*((_BYTE *)&CORE[24] + (int)a9 + 4) = 1;
if ( *((_BYTE *)&CORE[88] + (int)a9 + 4) == 0 && dword_1282E4 < 16 )
*((_DWORD *)&CORE[216] + ++dword_1282E4) = a9;
break;
case 5:
*((_BYTE *)&CORE[238] + (int)a9 + 2) = 0;
break;
case 6:
*((_BYTE *)&CORE[238] + (int)a9 + 2) = 1;
break;
case 7:
_mm_storel_ps((double *)&qword_12833C, _mm_cvtepi32_ps((__m128i)(unsigned long long)a9));
break;
case 8:
_mm_storel_ps((double *)&qword_128364, _mm_cvtepi32_ps((__m128i)(unsigned long long)a9));
break;
case 9:
*((_BYTE *)&CORE[259] + (int)a9 + 4) = 1;
break;
case 0xA:
*((_BYTE *)&CORE[259] + (int)a9 + 4) = 0;
break;
case 0xB:
*((_BYTE *)&CORE[4 * (int)a9 + 292] + SDWORD1(a9)) = 0;
break;
case 0xC:
*((_BYTE *)&CORE[4 * (int)a9 + 292] + SDWORD1(a9)) = 1;
break;
case 0xD:
*((float *)&CORE[4 * (int)a9 + 324] + SDWORD1(a9)) = (float)SDWORD2(a9) * 0.000030517578;
break;
case 0xE:
*((_BYTE *)&CORE[255] + (int)a9) = 0;
break;
case 0xF:
*((_BYTE *)&CORE[255] + (int)a9) = 1;
break;
case 0x10:
_mm_storel_ps((double *)&CORE[(int)a9 + 247], _mm_cvtepi32_ps((__m128i)*(unsigned long long *)((char *)&a9 + 4)));
break;
case 0x11:
GESTURES = a9;
break;
case 0x12:
byte_127BEE = 1;
break;
case 0x13:
MaximizeWindow();
break;
case 0x14:
MinimizeWindow(a1);
break;
case 0x15:
SetWindowSize(a9, DWORD1(a9));
break;
case 0x16:
v9 = TextFormat((unsigned int)"screenshot%03i.png", screenshotCounter, a3, a4, a5, a6);
TakeScreenshot(v9, a7);
++screenshotCounter;
break;
case 0x17:
SetTargetFPS(a9, a2, a3, a4, a5, a6);
break;
default:
return TraceLog(
3,
(unsigned int)"AUTOMATION PLAY: Frame: %i | Event type: %i | Event parameters: %i, %i, %i",
a8,
HIDWORD(a8),
a9,
DWORD1(a9));
}
return TraceLog(
3,
(unsigned int)"AUTOMATION PLAY: Frame: %i | Event type: %i | Event parameters: %i, %i, %i",
a8,
HIDWORD(a8),
a9,
DWORD1(a9));
}
return result;
}
| PlayAutomationEvent:
CMP byte ptr [0x0022875c],0x0
JNZ 0x00164e54
PUSH R14
PUSH RBX
PUSH RAX
LEA R14,[RSP + 0x20]
MOV EBX,dword ptr [R14 + 0x4]
LEA EAX,[RBX + -0x1]
CMP EAX,0x16
JA 0x00164e28
LEA RCX,[0x1c37e4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x227be0]
MOV byte ptr [RAX + RCX*0x1 + 0xc4],0x0
JMP 0x00164e28
caseD_15:
MOV EDI,dword ptr [R14 + 0x8]
MOV ESI,dword ptr [R14 + 0xc]
CALL 0x0015ebe8
JMP 0x00164e28
caseD_10:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x227be0]
MOVSD XMM0,qword ptr [R14 + 0xc]
CVTDQ2PS XMM0,XMM0
MOVLPS qword ptr [RCX + RAX*0x8 + 0x7b8],XMM0
JMP 0x00164e28
caseD_d:
CVTSI2SS XMM0,dword ptr [R14 + 0x10]
MULSS XMM0,dword ptr [0x001b96ac]
MOVSXD RAX,dword ptr [R14 + 0x8]
MOVSXD RCX,dword ptr [R14 + 0xc]
SHL RAX,0x5
LEA RDX,[0x227be0]
ADD RDX,RAX
MOVSS dword ptr [RDX + RCX*0x4 + 0xa20],XMM0
JMP 0x00164e28
caseD_f:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x227be0]
MOV byte ptr [RAX + RCX*0x1 + 0x7f8],0x1
JMP 0x00164e28
caseD_16:
MOV ESI,dword ptr [0x00228760]
LEA RDI,[0x1c61e7]
XOR EAX,EAX
CALL 0x001719ab
MOV RDI,RAX
CALL 0x00161628
INC dword ptr [0x00228760]
JMP 0x00164e28
caseD_5:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x227be0]
MOV byte ptr [RAX + RCX*0x1 + 0x772],0x0
JMP 0x00164e28
caseD_8:
MOVSD XMM0,qword ptr [R14 + 0x8]
CVTDQ2PS XMM0,XMM0
MOVLPS qword ptr [0x00228364],XMM0
JMP 0x00164e28
caseD_e:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x227be0]
MOV byte ptr [RAX + RCX*0x1 + 0x7f8],0x0
JMP 0x00164e28
caseD_2:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x227be0]
MOV byte ptr [RAX + RCX*0x1 + 0xc4],0x1
CMP byte ptr [RAX + RCX*0x1 + 0x2c4],0x0
SETZ SIL
MOV EDX,dword ptr [0x002282e4]
CMP EDX,0x10
SETL DIL
AND DIL,SIL
CMP DIL,0x1
JNZ 0x00164e28
MOVSXD RDX,EDX
MOV dword ptr [RCX + RDX*0x4 + 0x6c4],EAX
INC dword ptr [0x002282e4]
JMP 0x00164e28
caseD_9:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x227be0]
MOV byte ptr [RAX + RCX*0x1 + 0x81c],0x1
JMP 0x00164e28
caseD_a:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x227be0]
MOV byte ptr [RAX + RCX*0x1 + 0x81c],0x0
JMP 0x00164e28
caseD_11:
MOV EAX,dword ptr [R14 + 0x8]
MOV dword ptr [0x002227c0],EAX
JMP 0x00164e28
caseD_12:
MOV byte ptr [0x00227bee],0x1
JMP 0x00164e28
caseD_6:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x227be0]
MOV byte ptr [RAX + RCX*0x1 + 0x772],0x1
JMP 0x00164e28
caseD_7:
MOVSD XMM0,qword ptr [R14 + 0x8]
CVTDQ2PS XMM0,XMM0
MOVLPS qword ptr [0x0022833c],XMM0
JMP 0x00164e28
caseD_c:
MOVSXD RAX,dword ptr [R14 + 0x8]
MOVSXD RCX,dword ptr [R14 + 0xc]
SHL RAX,0x5
LEA RDX,[0x227be0]
ADD RDX,RAX
MOV byte ptr [RCX + RDX*0x1 + 0x920],0x1
JMP 0x00164e28
caseD_b:
MOVSXD RAX,dword ptr [R14 + 0x8]
MOVSXD RCX,dword ptr [R14 + 0xc]
SHL RAX,0x5
LEA RDX,[0x227be0]
ADD RDX,RAX
MOV byte ptr [RCX + RDX*0x1 + 0x920],0x0
JMP 0x00164e28
caseD_14:
CALL 0x0015e428
JMP 0x00164e28
caseD_13:
CALL 0x0015e3fc
JMP 0x00164e28
caseD_17:
MOV EDI,dword ptr [R14 + 0x8]
CALL 0x001634a2
caseD_3:
MOV EDX,dword ptr [R14]
MOV R8D,dword ptr [R14 + 0x8]
MOV R9D,dword ptr [R14 + 0xc]
MOV EAX,dword ptr [R14 + 0x10]
MOV dword ptr [RSP],EAX
LEA RSI,[0x1c6770]
PUSH 0x3
POP RDI
MOV ECX,EBX
XOR EAX,EAX
CALL 0x001a128b
ADD RSP,0x8
POP RBX
POP R14
LAB_00164e54:
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void PlayAutomationEvent(void)
{
int8 in_RAX;
int8 uVar1;
int4 uStack0000000000000008;
int4 uStack000000000000000c;
int iStack0000000000000010;
int iStack0000000000000014;
int in_stack_00000018;
int4 uVar2;
uVar2 = (int4)((ulong)in_RAX >> 0x20);
if (automationEventRecording == '\0') {
switch(uStack000000000000000c) {
case 1:
(&DAT_00227ca4)[iStack0000000000000010] = 0;
break;
case 2:
(&DAT_00227ca4)[iStack0000000000000010] = 1;
if (DAT_002282e4 < 0x10 && (&DAT_00227ea4)[iStack0000000000000010] == '\0') {
(&DAT_002282a4)[DAT_002282e4] = iStack0000000000000010;
DAT_002282e4 = DAT_002282e4 + 1;
}
break;
case 5:
(&DAT_00228352)[iStack0000000000000010] = 0;
break;
case 6:
(&DAT_00228352)[iStack0000000000000010] = 1;
break;
case 7:
DAT_0022833c = CONCAT44((float)iStack0000000000000014,(float)iStack0000000000000010);
break;
case 8:
_DAT_00228364 = CONCAT44((float)iStack0000000000000014,(float)iStack0000000000000010);
break;
case 9:
(&DAT_002283fc)[iStack0000000000000010] = 1;
break;
case 10:
(&DAT_002283fc)[iStack0000000000000010] = 0;
break;
case 0xb:
(&DAT_00228500)[(long)iStack0000000000000014 + (long)iStack0000000000000010 * 0x20] = 0;
break;
case 0xc:
(&DAT_00228500)[(long)iStack0000000000000014 + (long)iStack0000000000000010 * 0x20] = 1;
break;
case 0xd:
(&DAT_00228600)[(long)iStack0000000000000010 * 8 + (long)iStack0000000000000014] =
(float)in_stack_00000018 * DAT_001b96ac;
break;
case 0xe:
(&DAT_002283d8)[iStack0000000000000010] = 0;
break;
case 0xf:
(&DAT_002283d8)[iStack0000000000000010] = 1;
break;
case 0x10:
*(ulong *)(&DAT_00228398 + (long)iStack0000000000000010 * 8) =
CONCAT44((float)in_stack_00000018,(float)iStack0000000000000014);
break;
case 0x11:
GESTURES = iStack0000000000000010;
break;
case 0x12:
DAT_00227bee = 1;
break;
case 0x13:
MaximizeWindow();
break;
case 0x14:
MinimizeWindow();
break;
case 0x15:
SetWindowSize(iStack0000000000000010,iStack0000000000000014);
break;
case 0x16:
uVar1 = TextFormat("screenshot%03i.png",screenshotCounter);
TakeScreenshot(uVar1);
screenshotCounter = screenshotCounter + 1;
break;
case 0x17:
SetTargetFPS(iStack0000000000000010);
}
TraceLog(3,"AUTOMATION PLAY: Frame: %i | Event type: %i | Event parameters: %i, %i, %i",
uStack0000000000000008,uStack000000000000000c,iStack0000000000000010,
iStack0000000000000014,CONCAT44(uVar2,in_stack_00000018));
}
return;
}
| |
35,928 | PlayAutomationEvent | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c | void PlayAutomationEvent(AutomationEvent event)
{
#if defined(SUPPORT_AUTOMATION_EVENTS)
// WARNING: When should event be played? After/before/replace PollInputEvents()? -> Up to the user!
if (!automationEventRecording) // TODO: Allow recording events while playing?
{
switch (event.type)
{
// Input event
case INPUT_KEY_UP: CORE.Input.Keyboard.currentKeyState[event.params[0]] = false; break; // param[0]: key
case INPUT_KEY_DOWN: { // param[0]: key
CORE.Input.Keyboard.currentKeyState[event.params[0]] = true;
if (CORE.Input.Keyboard.previousKeyState[event.params[0]] == false)
{
if (CORE.Input.Keyboard.keyPressedQueueCount < MAX_KEY_PRESSED_QUEUE)
{
// Add character to the queue
CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount] = event.params[0];
CORE.Input.Keyboard.keyPressedQueueCount++;
}
}
} break;
case INPUT_MOUSE_BUTTON_UP: CORE.Input.Mouse.currentButtonState[event.params[0]] = false; break; // param[0]: key
case INPUT_MOUSE_BUTTON_DOWN: CORE.Input.Mouse.currentButtonState[event.params[0]] = true; break; // param[0]: key
case INPUT_MOUSE_POSITION: // param[0]: x, param[1]: y
{
CORE.Input.Mouse.currentPosition.x = (float)event.params[0];
CORE.Input.Mouse.currentPosition.y = (float)event.params[1];
} break;
case INPUT_MOUSE_WHEEL_MOTION: // param[0]: x delta, param[1]: y delta
{
CORE.Input.Mouse.currentWheelMove.x = (float)event.params[0];
CORE.Input.Mouse.currentWheelMove.y = (float)event.params[1];
} break;
case INPUT_TOUCH_UP: CORE.Input.Touch.currentTouchState[event.params[0]] = false; break; // param[0]: id
case INPUT_TOUCH_DOWN: CORE.Input.Touch.currentTouchState[event.params[0]] = true; break; // param[0]: id
case INPUT_TOUCH_POSITION: // param[0]: id, param[1]: x, param[2]: y
{
CORE.Input.Touch.position[event.params[0]].x = (float)event.params[1];
CORE.Input.Touch.position[event.params[0]].y = (float)event.params[2];
} break;
case INPUT_GAMEPAD_CONNECT: CORE.Input.Gamepad.ready[event.params[0]] = true; break; // param[0]: gamepad
case INPUT_GAMEPAD_DISCONNECT: CORE.Input.Gamepad.ready[event.params[0]] = false; break; // param[0]: gamepad
case INPUT_GAMEPAD_BUTTON_UP: CORE.Input.Gamepad.currentButtonState[event.params[0]][event.params[1]] = false; break; // param[0]: gamepad, param[1]: button
case INPUT_GAMEPAD_BUTTON_DOWN: CORE.Input.Gamepad.currentButtonState[event.params[0]][event.params[1]] = true; break; // param[0]: gamepad, param[1]: button
case INPUT_GAMEPAD_AXIS_MOTION: // param[0]: gamepad, param[1]: axis, param[2]: delta
{
CORE.Input.Gamepad.axisState[event.params[0]][event.params[1]] = ((float)event.params[2]/32768.0f);
} break;
#if defined(SUPPORT_GESTURES_SYSTEM)
case INPUT_GESTURE: GESTURES.current = event.params[0]; break; // param[0]: gesture (enum Gesture) -> rgestures.h: GESTURES.current
#endif
// Window event
case WINDOW_CLOSE: CORE.Window.shouldClose = true; break;
case WINDOW_MAXIMIZE: MaximizeWindow(); break;
case WINDOW_MINIMIZE: MinimizeWindow(); break;
case WINDOW_RESIZE: SetWindowSize(event.params[0], event.params[1]); break;
// Custom event
#if defined(SUPPORT_SCREEN_CAPTURE)
case ACTION_TAKE_SCREENSHOT:
{
TakeScreenshot(TextFormat("screenshot%03i.png", screenshotCounter));
screenshotCounter++;
} break;
#endif
case ACTION_SETTARGETFPS: SetTargetFPS(event.params[0]); break;
default: break;
}
TRACELOG(LOG_INFO, "AUTOMATION PLAY: Frame: %i | Event type: %i | Event parameters: %i, %i, %i", event.frame, event.type, event.params[0], event.params[1], event.params[2]);
}
#endif
} | O3 | c | PlayAutomationEvent:
cmpb $0x0, 0xc5438(%rip) # 0x13c73c
jne 0x775e0
pushq %r14
pushq %rbx
pushq %rax
leaq 0x20(%rsp), %r14
movl 0x4(%r14), %ebx
leal -0x1(%rbx), %eax
cmpl $0x16, %eax
ja 0x775b2
leaq 0x6633a(%rip), %rcx # 0xdd664
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq 0x8(%r14), %rax
leaq 0xc4882(%rip), %rcx # 0x13bbc0
movb $0x0, 0xc4(%rax,%rcx)
jmp 0x775b2
movl 0x8(%r14), %esi
movl 0xc(%r14), %edx
movl %esi, 0xc4893(%rip) # 0x13bbec
movl %edx, 0xc4891(%rip) # 0x13bbf0
movq 0xc5342(%rip), %rdi # 0x13c6a8
callq 0xc0f7b
jmp 0x775b2
movslq 0x8(%r14), %rax
leaq 0xc4845(%rip), %rcx # 0x13bbc0
movsd 0xc(%r14), %xmm0
cvtdq2ps %xmm0, %xmm0
movlps %xmm0, 0x7b8(%rcx,%rax,8)
jmp 0x775b2
cvtsi2ssl 0x10(%r14), %xmm0
mulss 0x5c78d(%rip), %xmm0 # 0xd3b2c
movslq 0x8(%r14), %rax
movslq 0xc(%r14), %rcx
shlq $0x5, %rax
leaq 0xc480e(%rip), %rdx # 0x13bbc0
addq %rax, %rdx
movss %xmm0, 0xa20(%rdx,%rcx,4)
jmp 0x775b2
movslq 0x8(%r14), %rax
leaq 0xc47f2(%rip), %rcx # 0x13bbc0
movb $0x1, 0x7f8(%rax,%rcx)
jmp 0x775b2
movl 0xc535f(%rip), %esi # 0x13c740
leaq 0x68c77(%rip), %rdi # 0xe005f
xorl %eax, %eax
callq 0x84cfb
movq %rax, %rdi
callq 0x72deb
incl 0xc5343(%rip) # 0x13c740
jmp 0x775b2
movslq 0x8(%r14), %rax
leaq 0xc47b3(%rip), %rcx # 0x13bbc0
movb $0x0, 0x772(%rax,%rcx)
jmp 0x775b2
movsd 0x8(%r14), %xmm0
cvtdq2ps %xmm0, %xmm0
movlps %xmm0, 0xc4f1a(%rip) # 0x13c344
jmp 0x775b2
movslq 0x8(%r14), %rax
leaq 0xc4786(%rip), %rcx # 0x13bbc0
movb $0x0, 0x7f8(%rax,%rcx)
jmp 0x775b2
movslq 0x8(%r14), %rax
leaq 0xc476e(%rip), %rcx # 0x13bbc0
movb $0x1, 0xc4(%rax,%rcx)
cmpb $0x0, 0x2c4(%rax,%rcx)
sete %sil
movl 0xc4e58(%rip), %edx # 0x13c2c4
cmpl $0x10, %edx
setl %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x775b2
movslq %edx, %rdx
movl %eax, 0x6c4(%rcx,%rdx,4)
incl 0xc4e34(%rip) # 0x13c2c4
jmp 0x775b2
movslq 0x8(%r14), %rax
leaq 0xc4720(%rip), %rcx # 0x13bbc0
movb $0x1, 0x81c(%rax,%rcx)
jmp 0x775b2
movslq 0x8(%r14), %rax
leaq 0xc4708(%rip), %rcx # 0x13bbc0
movb $0x0, 0x81c(%rax,%rcx)
jmp 0x775b2
movl 0x8(%r14), %eax
movl %eax, 0xbf301(%rip) # 0x1367d0
jmp 0x775b2
movb $0x1, 0xc46f3(%rip) # 0x13bbce
jmp 0x775b2
movslq 0x8(%r14), %rax
leaq 0xc46d5(%rip), %rcx # 0x13bbc0
movb $0x1, 0x772(%rax,%rcx)
jmp 0x775b2
movsd 0x8(%r14), %xmm0
cvtdq2ps %xmm0, %xmm0
movlps %xmm0, 0xc4e14(%rip) # 0x13c31c
jmp 0x775b2
movslq 0x8(%r14), %rax
movslq 0xc(%r14), %rcx
shlq $0x5, %rax
leaq 0xc46a0(%rip), %rdx # 0x13bbc0
addq %rax, %rdx
movb $0x1, 0x920(%rcx,%rdx)
jmp 0x775b2
movslq 0x8(%r14), %rax
movslq 0xc(%r14), %rcx
shlq $0x5, %rax
leaq 0xc467d(%rip), %rdx # 0x13bbc0
addq %rax, %rdx
movb $0x0, 0x920(%rcx,%rdx)
jmp 0x775b2
movq 0xc5151(%rip), %rdi # 0x13c6a8
callq 0xc144a
jmp 0x775b2
callq 0x6f989
jmp 0x775b2
movl 0x8(%r14), %eax
xorpd %xmm0, %xmm0
testl %eax, %eax
jle 0x77581
cvtsi2sd %eax, %xmm1
movsd 0x5c703(%rip), %xmm0 # 0xd3c80
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsd2ss %xmm0, %xmm1
movsd %xmm0, 0xc50f8(%rip) # 0x13c688
mulss 0x57ab8(%rip), %xmm1 # 0xcf050
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq 0x68b5c(%rip), %rsi # 0xe0102
movl $0x3, %edi
movb $0x1, %al
callq 0xb9db7
movl (%r14), %edx
movl 0x8(%r14), %r8d
movl 0xc(%r14), %r9d
movl 0x10(%r14), %eax
movl %eax, (%rsp)
leaq 0x6901d(%rip), %rsi # 0xe05e8
movl $0x3, %edi
movl %ebx, %ecx
xorl %eax, %eax
callq 0xb9db7
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| PlayAutomationEvent:
cmp cs:automationEventRecording, 0
jnz locret_775E0
push r14
push rbx
push rax
lea r14, [rsp+18h+arg_0]
mov ebx, [r14+4]
lea eax, [rbx-1]; switch 23 cases
cmp eax, 16h
ja def_77331; jumptable 0000000000077331 default case, cases 3,4
lea rcx, jpt_77331
movsxd rax, ds:(jpt_77331 - 0DD664h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_77333:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000077331 case 1
lea rcx, CORE
mov byte ptr [rax+rcx+0C4h], 0
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_7734B:
mov esi, [r14+8]; jumptable 0000000000077331 case 21
mov edx, [r14+0Ch]
mov dword ptr cs:qword_13BBEC, esi
mov dword ptr cs:qword_13BBEC+4, edx
mov rdi, cs:platform_0
call glfwSetWindowSize
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_77370:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000077331 case 16
lea rcx, CORE
movsd xmm0, qword ptr [r14+0Ch]
cvtdq2ps xmm0, xmm0
movlps qword ptr [rcx+rax*8+7B8h], xmm0
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_77391:
cvtsi2ss xmm0, dword ptr [r14+10h]; jumptable 0000000000077331 case 13
mulss xmm0, cs:dword_D3B2C
movsxd rax, dword ptr [r14+8]
movsxd rcx, dword ptr [r14+0Ch]
shl rax, 5
lea rdx, CORE
add rdx, rax
movss dword ptr [rdx+rcx*4+0A20h], xmm0
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_773C3:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000077331 case 15
lea rcx, CORE
mov byte ptr [rax+rcx+7F8h], 1
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_773DB:
mov esi, cs:screenshotCounter; jumptable 0000000000077331 case 22
lea rdi, aScreenshot03iP; "screenshot%03i.png"
xor eax, eax
call TextFormat
mov rdi, rax
call TakeScreenshot
inc cs:screenshotCounter
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_77402:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000077331 case 5
lea rcx, CORE
mov byte ptr [rax+rcx+772h], 0
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_7741A:
movsd xmm0, qword ptr [r14+8]; jumptable 0000000000077331 case 8
cvtdq2ps xmm0, xmm0
movlps cs:qword_13C344, xmm0
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_7742F:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000077331 case 14
lea rcx, CORE
mov byte ptr [rax+rcx+7F8h], 0
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_77447:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000077331 case 2
lea rcx, CORE
mov byte ptr [rax+rcx+0C4h], 1
cmp byte ptr [rax+rcx+2C4h], 0
setz sil
mov edx, cs:dword_13C2C4
cmp edx, 10h
setl dil
and dil, sil
cmp dil, 1
jnz def_77331; jumptable 0000000000077331 default case, cases 3,4
movsxd rdx, edx
mov [rcx+rdx*4+6C4h], eax
inc cs:dword_13C2C4
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_77495:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000077331 case 9
lea rcx, CORE
mov byte ptr [rax+rcx+81Ch], 1
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_774AD:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000077331 case 10
lea rcx, CORE
mov byte ptr [rax+rcx+81Ch], 0
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_774C5:
mov eax, [r14+8]; jumptable 0000000000077331 case 17
mov cs:GESTURES, eax
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_774D4:
mov cs:byte_13BBCE, 1; jumptable 0000000000077331 case 18
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_774E0:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000077331 case 6
lea rcx, CORE
mov byte ptr [rax+rcx+772h], 1
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_774F8:
movsd xmm0, qword ptr [r14+8]; jumptable 0000000000077331 case 7
cvtdq2ps xmm0, xmm0
movlps qword ptr cs:xmmword_13C31C, xmm0
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_7750D:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000077331 case 12
movsxd rcx, dword ptr [r14+0Ch]
shl rax, 5
lea rdx, CORE
add rdx, rax
mov byte ptr [rcx+rdx+920h], 1
jmp def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_77530:
movsxd rax, dword ptr [r14+8]; jumptable 0000000000077331 case 11
movsxd rcx, dword ptr [r14+0Ch]
shl rax, 5
lea rdx, CORE
add rdx, rax
mov byte ptr [rcx+rdx+920h], 0
jmp short def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_77550:
mov rdi, cs:platform_0; jumptable 0000000000077331 case 20
call glfwIconifyWindow
jmp short def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_7755E:
call MaximizeWindow; jumptable 0000000000077331 case 19
jmp short def_77331; jumptable 0000000000077331 default case, cases 3,4
loc_77565:
mov eax, [r14+8]; jumptable 0000000000077331 case 23
xorpd xmm0, xmm0
test eax, eax
jle short loc_77581
cvtsi2sd xmm1, eax
movsd xmm0, cs:qword_D3C80
divsd xmm0, xmm1
loc_77581:
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd cs:qword_13C688, xmm0
mulss xmm1, cs:dword_CF050
xorps xmm0, xmm0
cvtss2sd xmm0, xmm1
lea rsi, aTimerTargetTim; "TIMER: Target time per frame: %02.03f m"...
mov edi, 3
mov al, 1
call TraceLog
def_77331:
mov edx, [r14]; jumptable 0000000000077331 default case, cases 3,4
mov r8d, [r14+8]
mov r9d, [r14+0Ch]
mov eax, [r14+10h]
mov [rsp+18h+var_18], eax
lea rsi, aAutomationPlay; "AUTOMATION PLAY: Frame: %i | Event type"...
mov edi, 3
mov ecx, ebx
xor eax, eax
call TraceLog
add rsp, 8
pop rbx
pop r14
locret_775E0:
retn
| long long PlayAutomationEvent(long long a1, long long a2, int a3, int a4, int a5, int a6, long long a7, __int128 a8)
{
long long v8; // rax
double v9; // xmm0_8
long long result; // rax
if ( !automationEventRecording )
{
switch ( HIDWORD(a7) )
{
case 1:
*((_BYTE *)&CORE[24] + (int)a8 + 4) = 0;
break;
case 2:
*((_BYTE *)&CORE[24] + (int)a8 + 4) = 1;
if ( *((_BYTE *)&CORE[88] + (int)a8 + 4) == 0 && dword_13C2C4 < 16 )
*((_DWORD *)&CORE[216] + ++dword_13C2C4) = a8;
break;
case 5:
*((_BYTE *)&CORE[238] + (int)a8 + 2) = 0;
break;
case 6:
*((_BYTE *)&CORE[238] + (int)a8 + 2) = 1;
break;
case 7:
_mm_storel_ps((double *)&xmmword_13C31C, _mm_cvtepi32_ps((__m128i)(unsigned long long)a8));
break;
case 8:
_mm_storel_ps((double *)&qword_13C344, _mm_cvtepi32_ps((__m128i)(unsigned long long)a8));
break;
case 9:
*((_BYTE *)&CORE[259] + (int)a8 + 4) = 1;
break;
case 0xA:
*((_BYTE *)&CORE[259] + (int)a8 + 4) = 0;
break;
case 0xB:
*((_BYTE *)&CORE[4 * (int)a8 + 292] + SDWORD1(a8)) = 0;
break;
case 0xC:
*((_BYTE *)&CORE[4 * (int)a8 + 292] + SDWORD1(a8)) = 1;
break;
case 0xD:
*((float *)&CORE[4 * (int)a8 + 324] + SDWORD1(a8)) = (float)SDWORD2(a8) * 0.000030517578;
break;
case 0xE:
*((_BYTE *)&CORE[255] + (int)a8) = 0;
break;
case 0xF:
*((_BYTE *)&CORE[255] + (int)a8) = 1;
break;
case 0x10:
_mm_storel_ps((double *)&CORE[(int)a8 + 247], _mm_cvtepi32_ps((__m128i)*(unsigned long long *)((char *)&a8 + 4)));
break;
case 0x11:
GESTURES = a8;
break;
case 0x12:
byte_13BBCE = 1;
break;
case 0x13:
MaximizeWindow();
break;
case 0x14:
glfwIconifyWindow(platform_0);
break;
case 0x15:
qword_13BBEC = a8;
glfwSetWindowSize(platform_0, (unsigned int)a8, DWORD1(a8));
break;
case 0x16:
v8 = TextFormat((unsigned int)"screenshot%03i.png", screenshotCounter, a3, a4, a5, a6);
TakeScreenshot(v8);
++screenshotCounter;
break;
case 0x17:
v9 = 0.0;
if ( (int)a8 > 0 )
v9 = 1.0 / (double)(int)a8;
qword_13C688 = *(_QWORD *)&v9;
TraceLog(3, (unsigned int)"TIMER: Target time per frame: %02.03f milliseconds", a3, a4, a5, a6);
break;
default:
return TraceLog(
3,
(unsigned int)"AUTOMATION PLAY: Frame: %i | Event type: %i | Event parameters: %i, %i, %i",
a7,
HIDWORD(a7),
a8,
DWORD1(a8));
}
return TraceLog(
3,
(unsigned int)"AUTOMATION PLAY: Frame: %i | Event type: %i | Event parameters: %i, %i, %i",
a7,
HIDWORD(a7),
a8,
DWORD1(a8));
}
return result;
}
| PlayAutomationEvent:
CMP byte ptr [0x0023c73c],0x0
JNZ 0x001775e0
PUSH R14
PUSH RBX
PUSH RAX
LEA R14,[RSP + 0x20]
MOV EBX,dword ptr [R14 + 0x4]
LEA EAX,[RBX + -0x1]
CMP EAX,0x16
JA 0x001775b2
LEA RCX,[0x1dd664]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x23bbc0]
MOV byte ptr [RAX + RCX*0x1 + 0xc4],0x0
JMP 0x001775b2
caseD_15:
MOV ESI,dword ptr [R14 + 0x8]
MOV EDX,dword ptr [R14 + 0xc]
MOV dword ptr [0x0023bbec],ESI
MOV dword ptr [0x0023bbf0],EDX
MOV RDI,qword ptr [0x0023c6a8]
CALL 0x001c0f7b
JMP 0x001775b2
caseD_10:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x23bbc0]
MOVSD XMM0,qword ptr [R14 + 0xc]
CVTDQ2PS XMM0,XMM0
MOVLPS qword ptr [RCX + RAX*0x8 + 0x7b8],XMM0
JMP 0x001775b2
caseD_d:
CVTSI2SS XMM0,dword ptr [R14 + 0x10]
MULSS XMM0,dword ptr [0x001d3b2c]
MOVSXD RAX,dword ptr [R14 + 0x8]
MOVSXD RCX,dword ptr [R14 + 0xc]
SHL RAX,0x5
LEA RDX,[0x23bbc0]
ADD RDX,RAX
MOVSS dword ptr [RDX + RCX*0x4 + 0xa20],XMM0
JMP 0x001775b2
caseD_f:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x23bbc0]
MOV byte ptr [RAX + RCX*0x1 + 0x7f8],0x1
JMP 0x001775b2
caseD_16:
MOV ESI,dword ptr [0x0023c740]
LEA RDI,[0x1e005f]
XOR EAX,EAX
CALL 0x00184cfb
MOV RDI,RAX
CALL 0x00172deb
INC dword ptr [0x0023c740]
JMP 0x001775b2
caseD_5:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x23bbc0]
MOV byte ptr [RAX + RCX*0x1 + 0x772],0x0
JMP 0x001775b2
caseD_8:
MOVSD XMM0,qword ptr [R14 + 0x8]
CVTDQ2PS XMM0,XMM0
MOVLPS qword ptr [0x0023c344],XMM0
JMP 0x001775b2
caseD_e:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x23bbc0]
MOV byte ptr [RAX + RCX*0x1 + 0x7f8],0x0
JMP 0x001775b2
caseD_2:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x23bbc0]
MOV byte ptr [RAX + RCX*0x1 + 0xc4],0x1
CMP byte ptr [RAX + RCX*0x1 + 0x2c4],0x0
SETZ SIL
MOV EDX,dword ptr [0x0023c2c4]
CMP EDX,0x10
SETL DIL
AND DIL,SIL
CMP DIL,0x1
JNZ 0x001775b2
MOVSXD RDX,EDX
MOV dword ptr [RCX + RDX*0x4 + 0x6c4],EAX
INC dword ptr [0x0023c2c4]
JMP 0x001775b2
caseD_9:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x23bbc0]
MOV byte ptr [RAX + RCX*0x1 + 0x81c],0x1
JMP 0x001775b2
caseD_a:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x23bbc0]
MOV byte ptr [RAX + RCX*0x1 + 0x81c],0x0
JMP 0x001775b2
caseD_11:
MOV EAX,dword ptr [R14 + 0x8]
MOV dword ptr [0x002367d0],EAX
JMP 0x001775b2
caseD_12:
MOV byte ptr [0x0023bbce],0x1
JMP 0x001775b2
caseD_6:
MOVSXD RAX,dword ptr [R14 + 0x8]
LEA RCX,[0x23bbc0]
MOV byte ptr [RAX + RCX*0x1 + 0x772],0x1
JMP 0x001775b2
caseD_7:
MOVSD XMM0,qword ptr [R14 + 0x8]
CVTDQ2PS XMM0,XMM0
MOVLPS qword ptr [0x0023c31c],XMM0
JMP 0x001775b2
caseD_c:
MOVSXD RAX,dword ptr [R14 + 0x8]
MOVSXD RCX,dword ptr [R14 + 0xc]
SHL RAX,0x5
LEA RDX,[0x23bbc0]
ADD RDX,RAX
MOV byte ptr [RCX + RDX*0x1 + 0x920],0x1
JMP 0x001775b2
caseD_b:
MOVSXD RAX,dword ptr [R14 + 0x8]
MOVSXD RCX,dword ptr [R14 + 0xc]
SHL RAX,0x5
LEA RDX,[0x23bbc0]
ADD RDX,RAX
MOV byte ptr [RCX + RDX*0x1 + 0x920],0x0
JMP 0x001775b2
caseD_14:
MOV RDI,qword ptr [0x0023c6a8]
CALL 0x001c144a
JMP 0x001775b2
caseD_13:
CALL 0x0016f989
JMP 0x001775b2
caseD_17:
MOV EAX,dword ptr [R14 + 0x8]
XORPD XMM0,XMM0
TEST EAX,EAX
JLE 0x00177581
CVTSI2SD XMM1,EAX
MOVSD XMM0,qword ptr [0x001d3c80]
DIVSD XMM0,XMM1
LAB_00177581:
XORPS XMM1,XMM1
CVTSD2SS XMM1,XMM0
MOVSD qword ptr [0x0023c688],XMM0
MULSS XMM1,dword ptr [0x001cf050]
XORPS XMM0,XMM0
CVTSS2SD XMM0,XMM1
LEA RSI,[0x1e0102]
MOV EDI,0x3
MOV AL,0x1
CALL 0x001b9db7
caseD_3:
MOV EDX,dword ptr [R14]
MOV R8D,dword ptr [R14 + 0x8]
MOV R9D,dword ptr [R14 + 0xc]
MOV EAX,dword ptr [R14 + 0x10]
MOV dword ptr [RSP],EAX
LEA RSI,[0x1e05e8]
MOV EDI,0x3
MOV ECX,EBX
XOR EAX,EAX
CALL 0x001b9db7
ADD RSP,0x8
POP RBX
POP R14
LAB_001775e0:
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void PlayAutomationEvent(void)
{
int8 in_RAX;
int8 uVar1;
int4 uStack0000000000000008;
int4 uStack000000000000000c;
int iStack0000000000000010;
int iStack0000000000000014;
int in_stack_00000018;
int4 uVar2;
uVar2 = (int4)((ulong)in_RAX >> 0x20);
if (automationEventRecording == '\0') {
switch(uStack000000000000000c) {
case 1:
(&DAT_0023bc84)[iStack0000000000000010] = 0;
break;
case 2:
(&DAT_0023bc84)[iStack0000000000000010] = 1;
if (_DAT_0023c2c4 < 0x10 && (&DAT_0023be84)[iStack0000000000000010] == '\0') {
*(int *)(&DAT_0023c284 + (long)_DAT_0023c2c4 * 4) = iStack0000000000000010;
_DAT_0023c2c4 = _DAT_0023c2c4 + 1;
}
break;
case 5:
*(int1 *)((long)&DAT_0023c332 + (long)iStack0000000000000010) = 0;
break;
case 6:
*(int1 *)((long)&DAT_0023c332 + (long)iStack0000000000000010) = 1;
break;
case 7:
DAT_0023c31c = CONCAT44((float)iStack0000000000000014,(float)iStack0000000000000010);
break;
case 8:
DAT_0023c344 = CONCAT44((float)iStack0000000000000014,(float)iStack0000000000000010);
break;
case 9:
(&DAT_0023c3dc)[iStack0000000000000010] = 1;
break;
case 10:
(&DAT_0023c3dc)[iStack0000000000000010] = 0;
break;
case 0xb:
(&DAT_0023c4e0)[(long)iStack0000000000000014 + (long)iStack0000000000000010 * 0x20] = 0;
break;
case 0xc:
(&DAT_0023c4e0)[(long)iStack0000000000000014 + (long)iStack0000000000000010 * 0x20] = 1;
break;
case 0xd:
(&DAT_0023c5e0)[(long)iStack0000000000000010 * 8 + (long)iStack0000000000000014] =
(float)in_stack_00000018 * DAT_001d3b2c;
break;
case 0xe:
*(int1 *)((long)&DAT_0023c3b8 + (long)iStack0000000000000010) = 0;
break;
case 0xf:
*(int1 *)((long)&DAT_0023c3b8 + (long)iStack0000000000000010) = 1;
break;
case 0x10:
*(ulong *)(&DAT_0023c378 + (long)iStack0000000000000010 * 8) =
CONCAT44((float)in_stack_00000018,(float)iStack0000000000000014);
break;
case 0x11:
GESTURES = iStack0000000000000010;
break;
case 0x12:
DAT_0023bbce = 1;
break;
case 0x13:
MaximizeWindow();
break;
case 0x14:
glfwIconifyWindow(platform_0);
break;
case 0x15:
DAT_0023bbec = iStack0000000000000010;
DAT_0023bbf0 = iStack0000000000000014;
glfwSetWindowSize(platform_0);
break;
case 0x16:
uVar1 = TextFormat("screenshot%03i.png",screenshotCounter);
TakeScreenshot(uVar1);
screenshotCounter = screenshotCounter + 1;
break;
case 0x17:
DAT_0023c688 = 0.0;
if (0 < iStack0000000000000010) {
DAT_0023c688 = DAT_001d3c80 / (double)iStack0000000000000010;
}
TraceLog((double)((float)DAT_0023c688 * _DAT_001cf050),3,
"TIMER: Target time per frame: %02.03f milliseconds");
}
TraceLog(3,"AUTOMATION PLAY: Frame: %i | Event type: %i | Event parameters: %i, %i, %i",
uStack0000000000000008,uStack000000000000000c,iStack0000000000000010,
iStack0000000000000014,CONCAT44(uVar2,in_stack_00000018));
}
return;
}
| |
35,929 | add_var_this | bluesky950520[P]quickjs/quickjs.c | static int add_var_this(JSContext *ctx, JSFunctionDef *fd)
{
int idx;
idx = add_var(ctx, fd, JS_ATOM_this);
if (idx >= 0 && fd->is_derived_class_constructor) {
JSVarDef *vd = &fd->vars[idx];
/* XXX: should have is_this flag or var type */
vd->is_lexical = 1; /* used to trigger 'uninitialized' checks
in a derived class constructor */
}
return idx;
} | O1 | c | add_var_this:
pushq %rbx
movq %rsi, %rbx
movl $0x8, %edx
callq 0x5de5e
testl %eax, %eax
js 0x6dae0
cmpl $0x0, 0x78(%rbx)
je 0x6dae0
movq 0x90(%rbx), %rcx
movl %eax, %edx
shlq $0x4, %rdx
orl $0x2, 0xc(%rcx,%rdx)
popq %rbx
retq
| add_var_this:
push rbx
mov rbx, rsi
mov edx, 8
call add_var
test eax, eax
js short loc_6DAE0
cmp dword ptr [rbx+78h], 0
jz short loc_6DAE0
mov rcx, [rbx+90h]
mov edx, eax
shl rdx, 4
or dword ptr [rcx+rdx+0Ch], 2
loc_6DAE0:
pop rbx
retn
| long long add_var_this(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
long long result; // rax
result = add_var(a1, a2, 8, a12, a3, a4, a5, a6, a7, a8, a9, a10, a13, a14);
if ( (int)result >= 0 )
{
if ( *(_DWORD *)(a2 + 120) )
*(_DWORD *)(*(_QWORD *)(a2 + 144) + 16LL * (unsigned int)result + 12) |= 2u;
}
return result;
}
| add_var_this:
PUSH RBX
MOV RBX,RSI
MOV EDX,0x8
CALL 0x0015de5e
TEST EAX,EAX
JS 0x0016dae0
CMP dword ptr [RBX + 0x78],0x0
JZ 0x0016dae0
MOV RCX,qword ptr [RBX + 0x90]
MOV EDX,EAX
SHL RDX,0x4
OR dword ptr [RCX + RDX*0x1 + 0xc],0x2
LAB_0016dae0:
POP RBX
RET
|
void add_var_this(int8 param_1,long param_2)
{
uint *puVar1;
uint uVar2;
uVar2 = add_var(param_1,param_2,8);
if ((-1 < (int)uVar2) && (*(int *)(param_2 + 0x78) != 0)) {
puVar1 = (uint *)(*(long *)(param_2 + 0x90) + 0xc + (ulong)uVar2 * 0x10);
*puVar1 = *puVar1 | 2;
}
return;
}
| |
35,930 | glfwGetGammaRamp | untodesu[P]riteg/build_O3/_deps/glfw-src/src/monitor.c | GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* handle)
{
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
assert(monitor != NULL);
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
_glfwFreeGammaArrays(&monitor->currentRamp);
if (!_glfwPlatformGetGammaRamp(monitor, &monitor->currentRamp))
return NULL;
return &monitor->currentRamp;
} | O3 | c | glfwGetGammaRamp:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1c453
leaq 0x8c229(%rip), %rax # 0xa8638
cmpl $0x0, (%rax)
je 0x1c438
movq %rdi, %rbx
leaq 0x68(%rdi), %r14
movq %r14, %rdi
callq 0x1bbb9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x214c3
xorl %ebx, %ebx
testl %eax, %eax
cmovneq %r14, %rbx
jmp 0x1c448
xorl %ebx, %ebx
movl $0x10001, %edi # imm = 0x10001
xorl %esi, %esi
xorl %eax, %eax
callq 0x18e91
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x67136(%rip), %rdi # 0x83590
leaq 0x670ab(%rip), %rsi # 0x8350c
leaq 0x6739d(%rip), %rcx # 0x83805
movl $0x1f3, %edx # imm = 0x1F3
callq 0xc540
| glfwGetGammaRamp:
push r14
push rbx
push rax
test rdi, rdi
jz short loc_1C453
lea rax, _glfw
cmp dword ptr [rax], 0
jz short loc_1C438
mov rbx, rdi
lea r14, [rdi+68h]
mov rdi, r14
call _glfwFreeGammaArrays
mov rdi, rbx
mov rsi, r14
call _glfwPlatformGetGammaRamp
xor ebx, ebx
test eax, eax
cmovnz rbx, r14
jmp short loc_1C448
loc_1C438:
xor ebx, ebx
mov edi, offset loc_10001
xor esi, esi
xor eax, eax
call _glfwInputError
loc_1C448:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
loc_1C453:
lea rdi, aMonitorNull; "monitor != NULL"
lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aConstGlfwgamma; "const GLFWgammaramp *glfwGetGammaRamp(G"...
mov edx, 1F3h
call ___assert_fail
| long long glfwGetGammaRamp(long long a1)
{
long long v1; // rbx
if ( !a1 )
__assert_fail(
"monitor != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/monitor.c",
499LL,
"const GLFWgammaramp *glfwGetGammaRamp(GLFWmonitor *)");
if ( glfw[0] )
{
glfwFreeGammaArrays((_QWORD *)(a1 + 104));
v1 = 0LL;
if ( (unsigned int)glfwPlatformGetGammaRamp(a1, a1 + 104) )
return a1 + 104;
}
else
{
v1 = 0LL;
glfwInputError((unsigned int)&loc_10001, 0LL);
}
return v1;
}
| glfwGetGammaRamp:
PUSH R14
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x0011c453
LEA RAX,[0x1a8638]
CMP dword ptr [RAX],0x0
JZ 0x0011c438
MOV RBX,RDI
LEA R14,[RDI + 0x68]
MOV RDI,R14
CALL 0x0011bbb9
MOV RDI,RBX
MOV RSI,R14
CALL 0x001214c3
XOR EBX,EBX
TEST EAX,EAX
CMOVNZ RBX,R14
JMP 0x0011c448
LAB_0011c438:
XOR EBX,EBX
MOV EDI,0x10001
XOR ESI,ESI
XOR EAX,EAX
CALL 0x00118e91
LAB_0011c448:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0011c453:
LEA RDI,[0x183590]
LEA RSI,[0x18350c]
LEA RCX,[0x183805]
MOV EDX,0x1f3
CALL 0x0010c540
|
long glfwGetGammaRamp(long param_1)
{
long lVar1;
int iVar2;
long lVar3;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("monitor != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/monitor.c"
,499,"const GLFWgammaramp *glfwGetGammaRamp(GLFWmonitor *)");
}
if (_glfw == 0) {
_glfwInputError(0x10001,0);
lVar3 = 0;
}
else {
lVar1 = param_1 + 0x68;
_glfwFreeGammaArrays(lVar1);
iVar2 = _glfwPlatformGetGammaRamp(param_1,lVar1);
lVar3 = 0;
if (iVar2 != 0) {
lVar3 = lVar1;
}
}
return lVar3;
}
| |
35,931 | list_add | eloqsql/libmariadb/libmariadb/ma_list.c | LIST *list_add(LIST *root, LIST *element)
{
if (root)
{
if (root->prev) /* If add in mid of list */
root->prev->next= element;
element->prev=root->prev;
root->prev=element;
}
else
element->prev=0;
element->next=root;
return(element); /* New root */
} | O3 | c | list_add:
movq %rsi, %rax
testq %rdi, %rdi
je 0x1d81d
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x1d826
movq %rax, 0x8(%rcx)
movq (%rdi), %rcx
jmp 0x1d828
movq $0x0, (%rax)
jmp 0x1d82f
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rax, (%rdi)
popq %rbp
movq %rdi, 0x8(%rax)
retq
| list_add:
mov rax, rsi
test rdi, rdi
jz short loc_1D81D
push rbp
mov rbp, rsp
mov rcx, [rdi]
test rcx, rcx
jz short loc_1D826
mov [rcx+8], rax
mov rcx, [rdi]
jmp short loc_1D828
loc_1D81D:
mov qword ptr [rax], 0
jmp short loc_1D82F
loc_1D826:
xor ecx, ecx
loc_1D828:
mov [rax], rcx
mov [rdi], rax
pop rbp
loc_1D82F:
mov [rax+8], rdi
retn
| _QWORD * list_add(long long *a1, _QWORD *a2)
{
_QWORD *result; // rax
long long v3; // rcx
result = a2;
if ( a1 )
{
if ( *a1 )
{
*(_QWORD *)(*a1 + 8) = a2;
v3 = *a1;
}
else
{
v3 = 0LL;
}
*a2 = v3;
*a1 = (long long)a2;
}
else
{
*a2 = 0LL;
}
a2[1] = a1;
return result;
}
| list_add:
MOV RAX,RSI
TEST RDI,RDI
JZ 0x0011d81d
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RDI]
TEST RCX,RCX
JZ 0x0011d826
MOV qword ptr [RCX + 0x8],RAX
MOV RCX,qword ptr [RDI]
JMP 0x0011d828
LAB_0011d81d:
MOV qword ptr [RAX],0x0
JMP 0x0011d82f
LAB_0011d826:
XOR ECX,ECX
LAB_0011d828:
MOV qword ptr [RAX],RCX
MOV qword ptr [RDI],RAX
POP RBP
LAB_0011d82f:
MOV qword ptr [RAX + 0x8],RDI
RET
|
void list_add(long *param_1,long *param_2)
{
long lVar1;
if (param_1 == (long *)0x0) {
*param_2 = 0;
}
else {
if (*param_1 == 0) {
lVar1 = 0;
}
else {
*(long **)(*param_1 + 8) = param_2;
lVar1 = *param_1;
}
*param_2 = lVar1;
*param_1 = (long)param_2;
}
param_2[1] = (long)param_1;
return;
}
| |
35,932 | convert_froma_string | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static void convert_froma_string(MYSQL_BIND *r_param, char *buffer, size_t len)
{
int error= 0;
switch (r_param->buffer_type)
{
case MYSQL_TYPE_TINY:
{
longlong val= my_atoll(buffer, buffer + len, &error);
*r_param->error= error ? 1 : r_param->is_unsigned ? NUMERIC_TRUNCATION(val, 0, UINT_MAX8) : NUMERIC_TRUNCATION(val, INT_MIN8, INT_MAX8) || error > 0;
int1store(r_param->buffer, (uchar) val);
r_param->buffer_length= sizeof(uchar);
}
break;
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_SHORT:
{
longlong val= my_atoll(buffer, buffer + len, &error);
*r_param->error= error ? 1 : r_param->is_unsigned ? NUMERIC_TRUNCATION(val, 0, UINT_MAX16) : NUMERIC_TRUNCATION(val, INT_MIN16, INT_MAX16) || error > 0;
shortstore(r_param->buffer, (short)val);
r_param->buffer_length= sizeof(short);
}
break;
case MYSQL_TYPE_LONG:
{
longlong val= my_atoll(buffer, buffer + len, &error);
*r_param->error=error ? 1 : r_param->is_unsigned ? NUMERIC_TRUNCATION(val, 0, UINT_MAX32) : NUMERIC_TRUNCATION(val, INT_MIN32, INT_MAX32) || error > 0;
longstore(r_param->buffer, (int32)val);
r_param->buffer_length= sizeof(uint32);
}
break;
case MYSQL_TYPE_LONGLONG:
{
longlong val= r_param->is_unsigned ? (longlong)my_atoull(buffer, buffer + len, &error) : my_atoll(buffer, buffer + len, &error);
*r_param->error= error > 0; /* no need to check for truncation */
longlongstore(r_param->buffer, val);
r_param->buffer_length= sizeof(longlong);
}
break;
case MYSQL_TYPE_DOUBLE:
{
double val= my_atod(buffer, buffer + len, &error);
*r_param->error= error > 0; /* no need to check for truncation */
doublestore((uchar *)r_param->buffer, val);
r_param->buffer_length= sizeof(double);
}
break;
case MYSQL_TYPE_FLOAT:
{
float val= (float)my_atod(buffer, buffer + len, &error);
*r_param->error= error > 0; /* no need to check for truncation */
floatstore((uchar *)r_param->buffer, val);
r_param->buffer_length= sizeof(float);
}
break;
case MYSQL_TYPE_TIME:
case MYSQL_TYPE_DATE:
case MYSQL_TYPE_DATETIME:
case MYSQL_TYPE_TIMESTAMP:
{
MYSQL_TIME *tm= (MYSQL_TIME *)r_param->buffer;
str_to_TIME(buffer, len, tm);
break;
}
break;
case MYSQL_TYPE_TINY_BLOB:
case MYSQL_TYPE_MEDIUM_BLOB:
case MYSQL_TYPE_LONG_BLOB:
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_NEWDECIMAL:
default:
{
if (len >= r_param->offset)
{
char *start= buffer + r_param->offset; /* stmt_fetch_column sets offset */
char *end= buffer + len;
size_t copylen= 0;
if (start < end)
{
copylen= end - start;
if (r_param->buffer_length)
memcpy(r_param->buffer, start, MIN(copylen, r_param->buffer_length));
}
if (copylen < r_param->buffer_length)
((char *)r_param->buffer)[copylen]= 0;
*r_param->error= (copylen > r_param->buffer_length);
}
*r_param->length= (ulong)len;
}
break;
}
} | O3 | c | convert_froma_string:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movl $0x0, -0x2c(%rbp)
movl 0x60(%rdi), %eax
decl %eax
cmpl $0xc, %eax
ja 0x283c9
leaq 0x1507c(%rip), %rcx # 0x3d270
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rbx), %rdx
movq %r14, %rdi
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x26948
addq %r14, %r12
leaq -0x2c(%rbp), %r15
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x28550
movb $0x1, %cl
cmpl $0x0, (%r15)
jne 0x28427
cmpb $0x0, 0x65(%rbx)
je 0x2841d
cmpq $0x10000, %rax # imm = 0x10000
setae %cl
jmp 0x28427
addq %r14, %r12
leaq -0x2c(%rbp), %r15
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x28550
movb $0x1, %cl
cmpl $0x0, (%r15)
jne 0x284f1
cmpb $0x0, 0x65(%rbx)
je 0x284e7
cmpq $0x100, %rax # imm = 0x100
setae %cl
jmp 0x284f1
addq %r14, %r12
leaq -0x2c(%rbp), %r15
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x28550
movb $0x1, %cl
cmpl $0x0, (%r15)
jne 0x28510
cmpb $0x0, 0x65(%rbx)
je 0x28507
movq %rax, %rcx
shrq $0x20, %rcx
jmp 0x2850d
leaq (%r14,%r12), %r15
cmpb $0x0, 0x65(%rbx)
je 0x283ff
testq %r12, %r12
jle 0x282f4
callq 0x134c0
movq (%rax), %rax
movsbq (%r14), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x282f4
incq %r14
decq %r12
jne 0x282de
movq %r15, %r14
movq %r15, %rax
subq %r14, %rax
testq %rax, %rax
jle 0x28475
xorl %r13d, %r13d
movabsq $0x1999999999999999, %rcx # imm = 0x1999999999999999
xorl %eax, %eax
xorl %r12d, %r12d
movsbq (%r14,%rax), %rdx
leal -0x3a(%rdx), %esi
cmpb $-0xa, %sil
jb 0x28487
cmpq %rcx, %r12
ja 0x2847a
leaq (%r12,%r12), %rsi
leaq (%rsi,%rsi,4), %rsi
movl $0x2f, %edi
subq %rdx, %rdi
cmpq %rdi, %rsi
ja 0x2847a
leaq (%rsi,%rdx), %r12
addq $-0x30, %r12
leaq (%r14,%rax), %rdx
incq %rdx
incq %rax
cmpq %r15, %rdx
jb 0x28315
addq %rax, %r14
xorl %r13d, %r13d
jmp 0x2849e
addq %r14, %r12
leaq -0x2c(%rbp), %r15
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x26896
cvtsd2ss %xmm0, %xmm0
cmpl $0x0, (%r15)
movq 0x18(%rbx), %rax
setg (%rax)
movq 0x10(%rbx), %rax
movss %xmm0, (%rax)
jmp 0x28539
addq %r14, %r12
leaq -0x2c(%rbp), %r15
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x26896
cmpl $0x0, (%r15)
movq 0x18(%rbx), %rax
setg (%rax)
movq 0x10(%rbx), %rax
movsd %xmm0, (%rax)
jmp 0x284dd
movq 0x48(%rbx), %rax
cmpq %rax, %r12
jb 0x2846a
movq %r12, %r15
subq %rax, %r15
jle 0x28447
movq 0x40(%rbx), %rdx
testq %rdx, %rdx
je 0x2844a
addq %rax, %r14
movq 0x10(%rbx), %rdi
cmpq %rdx, %r15
cmovbq %r15, %rdx
movq %r14, %rsi
callq 0x13390
jmp 0x2844a
leaq -0x2c(%rbp), %r13
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x28550
movq %rax, %r12
movl (%r13), %eax
jmp 0x284cd
movswq %ax, %rcx
cmpq %rax, %rcx
setne %cl
movq 0x18(%rbx), %rdx
movb %cl, (%rdx)
movq 0x10(%rbx), %rcx
movb %al, (%rcx)
movq 0x10(%rbx), %rcx
movb %ah, 0x1(%rcx)
movq $0x2, 0x40(%rbx)
jmp 0x28541
xorl %r15d, %r15d
movq 0x40(%rbx), %rax
cmpq %rax, %r15
jae 0x28460
movq 0x10(%rbx), %rax
movb $0x0, (%rax,%r15)
movq 0x40(%rbx), %rax
cmpq %rax, %r15
movq 0x18(%rbx), %rax
seta (%rax)
movq (%rbx), %rax
movq %r12, (%rax)
jmp 0x28541
xorl %r12d, %r12d
jmp 0x28491
movl $0x22, -0x2c(%rbp)
movl $0x22, %r13d
testq %rax, %rax
je 0x28491
addq %rax, %r14
jmp 0x2849e
movl $0x22, -0x2c(%rbp)
movl $0x22, %r13d
cmpq %r15, %r14
jae 0x284c1
callq 0x134c0
movq (%rax), %rax
movsbq (%r14), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x284c1
incq %r14
cmpq %r15, %r14
jne 0x284ab
movq %r15, %r14
cmpq %r15, %r14
movl $0x1, %eax
cmovel %r13d, %eax
testl %eax, %eax
movq 0x18(%rbx), %rax
setg (%rax)
movq 0x10(%rbx), %rax
movq %r12, (%rax)
movq $0x8, 0x40(%rbx)
jmp 0x28541
movsbq %al, %rcx
cmpq %rax, %rcx
setne %cl
movq 0x18(%rbx), %rdx
movb %cl, (%rdx)
movq 0x10(%rbx), %rcx
movb %al, (%rcx)
movq $0x1, 0x40(%rbx)
jmp 0x28541
movslq %eax, %rcx
cmpq %rax, %rcx
setne %cl
movq 0x18(%rbx), %rdx
movb %cl, (%rdx)
movq 0x10(%rbx), %rcx
movb %al, (%rcx)
movq 0x10(%rbx), %rcx
movb %ah, 0x1(%rcx)
movl %eax, %ecx
shrl $0x10, %ecx
movq 0x10(%rbx), %rdx
movb %cl, 0x2(%rdx)
shrl $0x18, %eax
movq 0x10(%rbx), %rcx
movb %al, 0x3(%rcx)
movq $0x4, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| convert_froma_string:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rdx
mov r14, rsi
mov rbx, rdi
mov [rbp+var_2C], 0
mov eax, [rdi+60h]
dec eax; switch 13 cases
cmp eax, 0Ch
ja def_281FB; jumptable 00000000000281FB default case, cases 6,9
lea rcx, jpt_281FB
movsxd rax, ds:(jpt_281FB - 3D270h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_281FD:
mov rdx, [rbx+10h]; jumptable 00000000000281FB cases 7,10-12
mov rdi, r14
mov rsi, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp str_to_TIME
loc_2821A:
add r12, r14; jumptable 00000000000281FB cases 2,13
lea r15, [rbp+var_2C]
mov rdi, r14
mov rsi, r12
mov rdx, r15
call my_atoll
mov cl, 1
cmp dword ptr [r15], 0
jnz loc_28427
cmp byte ptr [rbx+65h], 0
jz loc_2841D
cmp rax, 10000h
setnb cl
jmp loc_28427
loc_28253:
add r12, r14; jumptable 00000000000281FB case 1
lea r15, [rbp+var_2C]
mov rdi, r14
mov rsi, r12
mov rdx, r15
call my_atoll
mov cl, 1
cmp dword ptr [r15], 0
jnz loc_284F1
cmp byte ptr [rbx+65h], 0
jz loc_284E7
cmp rax, 100h
setnb cl
jmp loc_284F1
loc_2828C:
add r12, r14; jumptable 00000000000281FB case 3
lea r15, [rbp+var_2C]
mov rdi, r14
mov rsi, r12
mov rdx, r15
call my_atoll
mov cl, 1
cmp dword ptr [r15], 0
jnz loc_28510
cmp byte ptr [rbx+65h], 0
jz loc_28507
mov rcx, rax
shr rcx, 20h
jmp loc_2850D
loc_282C3:
lea r15, [r14+r12]; jumptable 00000000000281FB case 8
cmp byte ptr [rbx+65h], 0
jz loc_283FF
test r12, r12
jle short loc_282F4
call ___ctype_b_loc
mov rax, [rax]
loc_282DE:
movsx rcx, byte ptr [r14]
test byte ptr [rax+rcx*2+1], 20h
jz short loc_282F4
inc r14
dec r12
jnz short loc_282DE
mov r14, r15
loc_282F4:
mov rax, r15
sub rax, r14
test rax, rax
jle loc_28475
xor r13d, r13d
mov rcx, 1999999999999999h
xor eax, eax
xor r12d, r12d
loc_28315:
movsx rdx, byte ptr [r14+rax]
lea esi, [rdx-3Ah]
cmp sil, 0F6h
jb loc_28487
cmp r12, rcx
ja loc_2847A
lea rsi, [r12+r12]
lea rsi, [rsi+rsi*4]
mov edi, 2Fh ; '/'
sub rdi, rdx
cmp rsi, rdi
ja loc_2847A
lea r12, [rsi+rdx]
add r12, 0FFFFFFFFFFFFFFD0h
lea rdx, [r14+rax]
inc rdx
inc rax
cmp rdx, r15
jb short loc_28315
add r14, rax
xor r13d, r13d
jmp loc_2849E
loc_2836B:
add r12, r14; jumptable 00000000000281FB case 4
lea r15, [rbp+var_2C]
mov rdi, r14
mov rsi, r12
mov rdx, r15
call my_atod
cvtsd2ss xmm0, xmm0
cmp dword ptr [r15], 0
mov rax, [rbx+18h]
setnle byte ptr [rax]
mov rax, [rbx+10h]
movss dword ptr [rax], xmm0
jmp loc_28539
loc_2839C:
add r12, r14; jumptable 00000000000281FB case 5
lea r15, [rbp+var_2C]
mov rdi, r14
mov rsi, r12
mov rdx, r15
call my_atod
cmp dword ptr [r15], 0
mov rax, [rbx+18h]
setnle byte ptr [rax]
mov rax, [rbx+10h]
movsd qword ptr [rax], xmm0
jmp loc_284DD
def_281FB:
mov rax, [rbx+48h]; jumptable 00000000000281FB default case, cases 6,9
cmp r12, rax
jb loc_2846A
mov r15, r12
sub r15, rax
jle short loc_28447
mov rdx, [rbx+40h]
test rdx, rdx
jz short loc_2844A
add r14, rax
mov rdi, [rbx+10h]
cmp r15, rdx
cmovb rdx, r15
mov rsi, r14
call _memcpy
jmp short loc_2844A
loc_283FF:
lea r13, [rbp+var_2C]
mov rdi, r14
mov rsi, r15
mov rdx, r13
call my_atoll
mov r12, rax
mov eax, [r13+0]
jmp loc_284CD
loc_2841D:
movsx rcx, ax
cmp rcx, rax
setnz cl
loc_28427:
mov rdx, [rbx+18h]
mov [rdx], cl
mov rcx, [rbx+10h]
mov [rcx], al
mov rcx, [rbx+10h]
mov [rcx+1], ah
mov qword ptr [rbx+40h], 2
jmp loc_28541
loc_28447:
xor r15d, r15d
loc_2844A:
mov rax, [rbx+40h]
cmp r15, rax
jnb short loc_28460
mov rax, [rbx+10h]
mov byte ptr [rax+r15], 0
mov rax, [rbx+40h]
loc_28460:
cmp r15, rax
mov rax, [rbx+18h]
setnbe byte ptr [rax]
loc_2846A:
mov rax, [rbx]
mov [rax], r12
jmp loc_28541
loc_28475:
xor r12d, r12d
jmp short loc_28491
loc_2847A:
mov [rbp+var_2C], 22h ; '"'
mov r13d, 22h ; '"'
loc_28487:
test rax, rax
jz short loc_28491
add r14, rax
jmp short loc_2849E
loc_28491:
mov [rbp+var_2C], 22h ; '"'
mov r13d, 22h ; '"'
loc_2849E:
cmp r14, r15
jnb short loc_284C1
call ___ctype_b_loc
mov rax, [rax]
loc_284AB:
movsx rcx, byte ptr [r14]
test byte ptr [rax+rcx*2+1], 20h
jz short loc_284C1
inc r14
cmp r14, r15
jnz short loc_284AB
mov r14, r15
loc_284C1:
cmp r14, r15
mov eax, 1
cmovz eax, r13d
loc_284CD:
test eax, eax
mov rax, [rbx+18h]
setnle byte ptr [rax]
mov rax, [rbx+10h]
mov [rax], r12
loc_284DD:
mov qword ptr [rbx+40h], 8
jmp short loc_28541
loc_284E7:
movsx rcx, al
cmp rcx, rax
setnz cl
loc_284F1:
mov rdx, [rbx+18h]
mov [rdx], cl
mov rcx, [rbx+10h]
mov [rcx], al
mov qword ptr [rbx+40h], 1
jmp short loc_28541
loc_28507:
movsxd rcx, eax
cmp rcx, rax
loc_2850D:
setnz cl
loc_28510:
mov rdx, [rbx+18h]
mov [rdx], cl
mov rcx, [rbx+10h]
mov [rcx], al
mov rcx, [rbx+10h]
mov [rcx+1], ah
mov ecx, eax
shr ecx, 10h
mov rdx, [rbx+10h]
mov [rdx+2], cl
shr eax, 18h
mov rcx, [rbx+10h]
mov [rcx+3], al
loc_28539:
mov qword ptr [rbx+40h], 4
loc_28541:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long convert_froma_string(long long a1, char *a2, long long a3, double a4)
{
long long v4; // r12
char *v5; // r14
long long v6; // rbx
unsigned long long result; // rax
bool v8; // cl
bool v9; // cl
unsigned long long v10; // rax
bool v11; // cl
bool v12; // zf
char *v13; // r15
long long v14; // rax
int v15; // r13d
long long v16; // rax
unsigned long long v17; // r12
long long v18; // rdx
unsigned long long v19; // rdx
float v20; // xmm0_4
unsigned long long v21; // rax
unsigned long long v22; // r15
unsigned long long v23; // rdx
long long v24; // rdi
int v25; // eax
unsigned long long v26; // rax
long long v27; // rax
_DWORD v28[11]; // [rsp+0h] [rbp-2Ch] BYREF
v4 = a3;
v5 = a2;
v6 = a1;
v28[0] = 0;
switch ( *(_DWORD *)(a1 + 96) )
{
case 1:
result = my_atoll(a2, &a2[a3], v28);
v9 = 1;
if ( !v28[0] )
{
if ( *(_BYTE *)(a1 + 101) )
v9 = result >= 0x100;
else
v9 = (char)result != result;
}
**(_BYTE **)(a1 + 24) = v9;
**(_BYTE **)(a1 + 16) = result;
*(_QWORD *)(a1 + 64) = 1LL;
return result;
case 2:
case 0xD:
result = my_atoll(a2, &a2[a3], v28);
v8 = 1;
if ( !v28[0] )
{
if ( *(_BYTE *)(a1 + 101) )
v8 = result >= 0x10000;
else
v8 = (__int16)result != result;
}
**(_BYTE **)(a1 + 24) = v8;
**(_WORD **)(a1 + 16) = result;
*(_QWORD *)(a1 + 64) = 2LL;
return result;
case 3:
v10 = my_atoll(a2, &a2[a3], v28);
v11 = 1;
if ( !v28[0] )
{
if ( *(_BYTE *)(a1 + 101) )
v12 = HIDWORD(v10) == 0;
else
v12 = (int)v10 == v10;
v11 = !v12;
}
**(_BYTE **)(a1 + 24) = v11;
**(_WORD **)(a1 + 16) = v10;
*(_BYTE *)(*(_QWORD *)(a1 + 16) + 2LL) = BYTE2(v10);
result = BYTE3(v10);
*(_BYTE *)(*(_QWORD *)(a1 + 16) + 3LL) = result;
goto LABEL_60;
case 4:
my_atod((long long)a2, (_DWORD)a2 + a3, v28);
v20 = a4;
**(_BYTE **)(a1 + 24) = v28[0] > 0;
result = *(_QWORD *)(a1 + 16);
*(float *)result = v20;
LABEL_60:
*(_QWORD *)(a1 + 64) = 4LL;
return result;
case 5:
my_atod((long long)a2, (_DWORD)a2 + a3, v28);
**(_BYTE **)(a1 + 24) = v28[0] > 0;
result = *(_QWORD *)(a1 + 16);
*(double *)result = a4;
goto LABEL_54;
case 7:
case 0xA:
case 0xB:
case 0xC:
return str_to_TIME(a2, a3, *(_QWORD *)(a1 + 16));
case 8:
v13 = &a2[a3];
if ( !*(_BYTE *)(a1 + 101) )
{
v17 = my_atoll(a2, &a2[a3], v28);
v25 = v28[0];
goto LABEL_53;
}
if ( a3 <= 0 )
goto LABEL_18;
v14 = *(_QWORD *)__ctype_b_loc(a1);
break;
default:
v21 = *(_QWORD *)(a1 + 72);
if ( a3 >= v21 )
{
v22 = a3 - v21;
if ( a3 <= (long long)v21 )
{
v22 = 0LL;
}
else
{
v23 = *(_QWORD *)(a1 + 64);
if ( v23 )
{
v24 = *(_QWORD *)(a1 + 16);
if ( v22 < v23 )
v23 = v4 - v21;
memcpy(v24, &a2[v21], v23);
}
}
v26 = *(_QWORD *)(v6 + 64);
if ( v22 < v26 )
{
*(_BYTE *)(*(_QWORD *)(v6 + 16) + v22) = 0;
v26 = *(_QWORD *)(v6 + 64);
}
**(_BYTE **)(v6 + 24) = v22 > v26;
}
result = *(_QWORD *)v6;
**(_QWORD **)v6 = v4;
return result;
}
while ( (*(_BYTE *)(v14 + 2LL * *v5 + 1) & 0x20) != 0 )
{
++v5;
if ( !--v4 )
{
v5 = v13;
break;
}
}
LABEL_18:
if ( v13 - v5 <= 0 )
{
v17 = 0LL;
}
else
{
v15 = 0;
v16 = 0LL;
v17 = 0LL;
while ( 1 )
{
v18 = v5[v16];
if ( (unsigned __int8)(v18 - 58) < 0xF6u )
break;
if ( v17 > 0x1999999999999999LL || (a1 = 47 - v18, 10 * v17 > 47 - v18) )
{
v28[0] = 34;
v15 = 34;
break;
}
v17 = 10 * v17 + v18 - 48;
v19 = (unsigned long long)&v5[++v16];
if ( v19 >= (unsigned long long)v13 )
{
v5 += v16;
v15 = 0;
goto LABEL_46;
}
}
if ( v16 )
{
v5 += v16;
goto LABEL_46;
}
}
v28[0] = 34;
v15 = 34;
LABEL_46:
if ( v5 < v13 )
{
v27 = *(_QWORD *)__ctype_b_loc(a1);
while ( (*(_BYTE *)(v27 + 2LL * *v5 + 1) & 0x20) != 0 )
{
if ( ++v5 == v13 )
{
v5 = v13;
break;
}
}
}
v25 = 1;
if ( v5 == v13 )
v25 = v15;
LABEL_53:
**(_BYTE **)(v6 + 24) = v25 > 0;
result = *(_QWORD *)(v6 + 16);
*(_QWORD *)result = v17;
LABEL_54:
*(_QWORD *)(v6 + 64) = 8LL;
return result;
}
| convert_froma_string:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RDX
MOV R14,RSI
MOV RBX,RDI
MOV dword ptr [RBP + -0x2c],0x0
MOV EAX,dword ptr [RDI + 0x60]
DEC EAX
CMP EAX,0xc
JA 0x001283c9
LEA RCX,[0x13d270]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_7:
MOV RDX,qword ptr [RBX + 0x10]
MOV RDI,R14
MOV RSI,R12
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00126948
caseD_2:
ADD R12,R14
LEA R15,[RBP + -0x2c]
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00128550
MOV CL,0x1
CMP dword ptr [R15],0x0
JNZ 0x00128427
CMP byte ptr [RBX + 0x65],0x0
JZ 0x0012841d
CMP RAX,0x10000
SETNC CL
JMP 0x00128427
caseD_1:
ADD R12,R14
LEA R15,[RBP + -0x2c]
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00128550
MOV CL,0x1
CMP dword ptr [R15],0x0
JNZ 0x001284f1
CMP byte ptr [RBX + 0x65],0x0
JZ 0x001284e7
CMP RAX,0x100
SETNC CL
JMP 0x001284f1
caseD_3:
ADD R12,R14
LEA R15,[RBP + -0x2c]
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00128550
MOV CL,0x1
CMP dword ptr [R15],0x0
JNZ 0x00128510
CMP byte ptr [RBX + 0x65],0x0
JZ 0x00128507
MOV RCX,RAX
SHR RCX,0x20
JMP 0x0012850d
caseD_8:
LEA R15,[R14 + R12*0x1]
CMP byte ptr [RBX + 0x65],0x0
JZ 0x001283ff
TEST R12,R12
JLE 0x001282f4
CALL 0x001134c0
MOV RAX,qword ptr [RAX]
LAB_001282de:
MOVSX RCX,byte ptr [R14]
TEST byte ptr [RAX + RCX*0x2 + 0x1],0x20
JZ 0x001282f4
INC R14
DEC R12
JNZ 0x001282de
MOV R14,R15
LAB_001282f4:
MOV RAX,R15
SUB RAX,R14
TEST RAX,RAX
JLE 0x00128475
XOR R13D,R13D
MOV RCX,0x1999999999999999
XOR EAX,EAX
XOR R12D,R12D
LAB_00128315:
MOVSX RDX,byte ptr [R14 + RAX*0x1]
LEA ESI,[RDX + -0x3a]
CMP SIL,0xf6
JC 0x00128487
CMP R12,RCX
JA 0x0012847a
LEA RSI,[R12 + R12*0x1]
LEA RSI,[RSI + RSI*0x4]
MOV EDI,0x2f
SUB RDI,RDX
CMP RSI,RDI
JA 0x0012847a
LEA R12,[RSI + RDX*0x1]
ADD R12,-0x30
LEA RDX,[R14 + RAX*0x1]
INC RDX
INC RAX
CMP RDX,R15
JC 0x00128315
ADD R14,RAX
XOR R13D,R13D
JMP 0x0012849e
caseD_4:
ADD R12,R14
LEA R15,[RBP + -0x2c]
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00126896
CVTSD2SS XMM0,XMM0
CMP dword ptr [R15],0x0
MOV RAX,qword ptr [RBX + 0x18]
SETG byte ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
MOVSS dword ptr [RAX],XMM0
JMP 0x00128539
caseD_5:
ADD R12,R14
LEA R15,[RBP + -0x2c]
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00126896
CMP dword ptr [R15],0x0
MOV RAX,qword ptr [RBX + 0x18]
SETG byte ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
MOVSD qword ptr [RAX],XMM0
JMP 0x001284dd
caseD_6:
MOV RAX,qword ptr [RBX + 0x48]
CMP R12,RAX
JC 0x0012846a
MOV R15,R12
SUB R15,RAX
JLE 0x00128447
MOV RDX,qword ptr [RBX + 0x40]
TEST RDX,RDX
JZ 0x0012844a
ADD R14,RAX
MOV RDI,qword ptr [RBX + 0x10]
CMP R15,RDX
CMOVC RDX,R15
MOV RSI,R14
CALL 0x00113390
JMP 0x0012844a
LAB_001283ff:
LEA R13,[RBP + -0x2c]
MOV RDI,R14
MOV RSI,R15
MOV RDX,R13
CALL 0x00128550
MOV R12,RAX
MOV EAX,dword ptr [R13]
JMP 0x001284cd
LAB_0012841d:
MOVSX RCX,AX
CMP RCX,RAX
SETNZ CL
LAB_00128427:
MOV RDX,qword ptr [RBX + 0x18]
MOV byte ptr [RDX],CL
MOV RCX,qword ptr [RBX + 0x10]
MOV byte ptr [RCX],AL
MOV RCX,qword ptr [RBX + 0x10]
MOV byte ptr [RCX + 0x1],AH
MOV qword ptr [RBX + 0x40],0x2
JMP 0x00128541
LAB_00128447:
XOR R15D,R15D
LAB_0012844a:
MOV RAX,qword ptr [RBX + 0x40]
CMP R15,RAX
JNC 0x00128460
MOV RAX,qword ptr [RBX + 0x10]
MOV byte ptr [RAX + R15*0x1],0x0
MOV RAX,qword ptr [RBX + 0x40]
LAB_00128460:
CMP R15,RAX
MOV RAX,qword ptr [RBX + 0x18]
SETA byte ptr [RAX]
LAB_0012846a:
MOV RAX,qword ptr [RBX]
MOV qword ptr [RAX],R12
JMP 0x00128541
LAB_00128475:
XOR R12D,R12D
JMP 0x00128491
LAB_0012847a:
MOV dword ptr [RBP + -0x2c],0x22
MOV R13D,0x22
LAB_00128487:
TEST RAX,RAX
JZ 0x00128491
ADD R14,RAX
JMP 0x0012849e
LAB_00128491:
MOV dword ptr [RBP + -0x2c],0x22
MOV R13D,0x22
LAB_0012849e:
CMP R14,R15
JNC 0x001284c1
CALL 0x001134c0
MOV RAX,qword ptr [RAX]
LAB_001284ab:
MOVSX RCX,byte ptr [R14]
TEST byte ptr [RAX + RCX*0x2 + 0x1],0x20
JZ 0x001284c1
INC R14
CMP R14,R15
JNZ 0x001284ab
MOV R14,R15
LAB_001284c1:
CMP R14,R15
MOV EAX,0x1
CMOVZ EAX,R13D
LAB_001284cd:
TEST EAX,EAX
MOV RAX,qword ptr [RBX + 0x18]
SETG byte ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX],R12
LAB_001284dd:
MOV qword ptr [RBX + 0x40],0x8
JMP 0x00128541
LAB_001284e7:
MOVSX RCX,AL
CMP RCX,RAX
SETNZ CL
LAB_001284f1:
MOV RDX,qword ptr [RBX + 0x18]
MOV byte ptr [RDX],CL
MOV RCX,qword ptr [RBX + 0x10]
MOV byte ptr [RCX],AL
MOV qword ptr [RBX + 0x40],0x1
JMP 0x00128541
LAB_00128507:
MOVSXD RCX,EAX
CMP RCX,RAX
LAB_0012850d:
SETNZ CL
LAB_00128510:
MOV RDX,qword ptr [RBX + 0x18]
MOV byte ptr [RDX],CL
MOV RCX,qword ptr [RBX + 0x10]
MOV byte ptr [RCX],AL
MOV RCX,qword ptr [RBX + 0x10]
MOV byte ptr [RCX + 0x1],AH
MOV ECX,EAX
SHR ECX,0x10
MOV RDX,qword ptr [RBX + 0x10]
MOV byte ptr [RDX + 0x2],CL
SHR EAX,0x18
MOV RCX,qword ptr [RBX + 0x10]
MOV byte ptr [RCX + 0x3],AL
LAB_00128539:
MOV qword ptr [RBX + 0x40],0x4
LAB_00128541:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void convert_froma_string(int8 *param_1,char *param_2,ulong param_3)
{
char *pcVar1;
char cVar2;
int8 uVar3;
double dVar4;
long lVar5;
uint in_EAX;
ulong uVar6;
ushort **ppuVar7;
long lVar8;
ulong __n;
int iVar9;
char *pcVar10;
char *pcVar11;
ulong uVar12;
bool bVar13;
int8 uStack_38;
uStack_38 = (ulong)in_EAX;
switch(*(int4 *)(param_1 + 0xc)) {
case 1:
uVar6 = my_atoll(param_2,param_2 + param_3,(long)&uStack_38 + 4);
bVar13 = true;
if (uStack_38._4_4_ == 0) {
if (*(char *)((long)param_1 + 0x65) == '\0') {
bVar13 = (long)(char)uVar6 != uVar6;
}
else {
bVar13 = 0xff < uVar6;
}
}
*(bool *)param_1[3] = bVar13;
*(char *)param_1[2] = (char)uVar6;
param_1[8] = 1;
break;
case 2:
case 0xd:
uVar6 = my_atoll(param_2,param_2 + param_3,(long)&uStack_38 + 4);
bVar13 = true;
if (uStack_38._4_4_ == 0) {
if (*(char *)((long)param_1 + 0x65) == '\0') {
bVar13 = (long)(short)uVar6 != uVar6;
}
else {
bVar13 = 0xffff < uVar6;
}
}
*(bool *)param_1[3] = bVar13;
*(char *)param_1[2] = (char)uVar6;
*(char *)(param_1[2] + 1) = (char)(uVar6 >> 8);
param_1[8] = 2;
break;
case 3:
uVar6 = my_atoll(param_2,param_2 + param_3,(long)&uStack_38 + 4);
bVar13 = true;
if (uStack_38._4_4_ == 0) {
if (*(char *)((long)param_1 + 0x65) == '\0') {
bVar13 = (long)(int)uVar6 == uVar6;
}
else {
bVar13 = uVar6 >> 0x20 == 0;
}
bVar13 = !bVar13;
}
*(bool *)param_1[3] = bVar13;
*(char *)param_1[2] = (char)uVar6;
*(char *)(param_1[2] + 1) = (char)(uVar6 >> 8);
*(char *)(param_1[2] + 2) = (char)(uVar6 >> 0x10);
*(char *)(param_1[2] + 3) = (char)(uVar6 >> 0x18);
goto LAB_00128539;
case 4:
dVar4 = (double)my_atod(param_2,param_2 + param_3,(long)&uStack_38 + 4);
*(bool *)param_1[3] = 0 < uStack_38._4_4_;
*(float *)param_1[2] = (float)dVar4;
LAB_00128539:
param_1[8] = 4;
break;
case 5:
uVar3 = my_atod(param_2,param_2 + param_3,(long)&uStack_38 + 4);
*(bool *)param_1[3] = 0 < uStack_38._4_4_;
*(int8 *)param_1[2] = uVar3;
goto LAB_001284dd;
default:
uVar6 = param_1[9];
if (uVar6 <= param_3) {
uVar12 = param_3 - uVar6;
if (uVar12 == 0 || (long)param_3 < (long)uVar6) {
uVar12 = 0;
}
else {
__n = param_1[8];
if (__n != 0) {
if (uVar12 < __n) {
__n = uVar12;
}
memcpy((void *)param_1[2],param_2 + uVar6,__n);
}
}
uVar6 = param_1[8];
if (uVar12 < uVar6) {
*(int1 *)(param_1[2] + uVar12) = 0;
uVar6 = param_1[8];
}
*(bool *)param_1[3] = uVar6 < uVar12;
}
*(ulong *)*param_1 = param_3;
break;
case 7:
case 10:
case 0xb:
case 0xc:
str_to_TIME(param_2,param_3,param_1[2]);
return;
case 8:
pcVar1 = param_2 + param_3;
if (*(char *)((long)param_1 + 0x65) == '\0') {
uVar6 = my_atoll(param_2,pcVar1,(long)&uStack_38 + 4);
}
else {
pcVar10 = param_2;
if (0 < (long)param_3) {
ppuVar7 = __ctype_b_loc();
do {
pcVar10 = param_2;
if ((*(byte *)((long)*ppuVar7 + (long)*param_2 * 2 + 1) & 0x20) == 0) break;
param_2 = param_2 + 1;
param_3 = param_3 - 1;
pcVar10 = pcVar1;
} while (param_3 != 0);
}
if (pcVar1 == pcVar10 || (long)pcVar1 - (long)pcVar10 < 0) {
uVar6 = 0;
LAB_00128491:
uStack_38 = CONCAT44(0x22,(int4)uStack_38);
iVar9 = 0x22;
}
else {
iVar9 = 0;
lVar8 = 0;
uVar6 = 0;
do {
cVar2 = pcVar10[lVar8];
if ((byte)(cVar2 - 0x3aU) < 0xf6) {
LAB_00128487:
if (lVar8 == 0) goto LAB_00128491;
pcVar10 = pcVar10 + lVar8;
goto LAB_0012849e;
}
if ((0x1999999999999999 < uVar6) || (0x2fU - (long)cVar2 < uVar6 * 10)) {
uStack_38 = CONCAT44(0x22,(int4)uStack_38);
iVar9 = 0x22;
goto LAB_00128487;
}
uVar6 = (uVar6 * 10 + (long)cVar2) - 0x30;
lVar5 = lVar8 + 1;
lVar8 = lVar8 + 1;
} while (pcVar10 + lVar5 < pcVar1);
pcVar10 = pcVar10 + lVar8;
iVar9 = 0;
}
LAB_0012849e:
pcVar11 = pcVar10;
if (pcVar10 < pcVar1) {
ppuVar7 = __ctype_b_loc();
do {
pcVar11 = pcVar10;
if ((*(byte *)((long)*ppuVar7 + (long)*pcVar10 * 2 + 1) & 0x20) == 0) break;
pcVar10 = pcVar10 + 1;
pcVar11 = pcVar1;
} while (pcVar10 != pcVar1);
}
uStack_38._4_4_ = 1;
if (pcVar11 == pcVar1) {
uStack_38._4_4_ = iVar9;
}
}
*(bool *)param_1[3] = 0 < uStack_38._4_4_;
*(ulong *)param_1[2] = uVar6;
LAB_001284dd:
param_1[8] = 8;
}
return;
}
| |
35,933 | minja::Value::dump(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, int, int, bool) const::'lambda'(int)::operator()(int) const | monkey531[P]llama/common/minja.hpp | void dump(std::ostringstream & out, int indent = -1, int level = 0, bool to_json = false) const {
auto print_indent = [&](int level) {
if (indent > 0) {
out << "\n";
for (int i = 0, n = level * indent; i < n; ++i) out << ' ';
}
};
auto print_sub_sep = [&]() {
out << ',';
if (indent < 0) out << ' ';
else print_indent(level + 1);
};
auto string_quote = to_json ? '"' : '\'';
if (is_null()) out << "null";
else if (array_) {
out << "[";
print_indent(level + 1);
for (size_t i = 0; i < array_->size(); ++i) {
if (i) print_sub_sep();
(*array_)[i].dump(out, indent, level + 1, to_json);
}
print_indent(level);
out << "]";
} else if (object_) {
out << "{";
print_indent(level + 1);
for (auto begin = object_->begin(), it = begin; it != object_->end(); ++it) {
if (it != begin) print_sub_sep();
if (it->first.is_string()) {
dump_string(it->first, out, string_quote);
} else {
out << string_quote << it->first.dump() << string_quote;
}
out << ": ";
it->second.dump(out, indent, level + 1, to_json);
}
print_indent(level);
out << "}";
} else if (callable_) {
throw std::runtime_error("Cannot dump callable to JSON");
} else if (is_boolean() && !to_json) {
out << (this->to_bool() ? "True" : "False");
} else if (is_string() && !to_json) {
dump_string(primitive_, out, string_quote);
} else {
out << primitive_.dump();
}
} | O2 | cpp | minja::Value::dump(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, int, int, bool) const::'lambda'(int)::operator()(int) const:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rax
cmpl $0x0, (%rax)
jle 0x3e942
movl %esi, %ebp
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0x4f55c(%rip), %rsi # 0x8de74
callq 0x206a0
movq (%rbx), %rax
imull (%rax), %ebp
xorl %r14d, %r14d
testl %ebp, %ebp
cmovgl %ebp, %r14d
pushq $0x20
popq %rbp
subl $0x1, %r14d
jb 0x3e942
movq 0x8(%rbx), %rdi
movl %ebp, %esi
callq 0x207d0
jmp 0x3e92f
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUliE_clEi:
push rbp
push r14
push rbx
mov rax, [rdi]
cmp dword ptr [rax], 0
jle short loc_3E942
mov ebp, esi
mov rbx, rdi
mov rdi, [rdi+8]
lea rsi, aEndIndexOutOfB+18h; "\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rax, [rbx]
imul ebp, [rax]
xor r14d, r14d
test ebp, ebp
cmovg r14d, ebp
push 20h ; ' '
pop rbp
loc_3E92F:
sub r14d, 1
jb short loc_3E942
mov rdi, [rbx+8]
mov esi, ebp
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
jmp short loc_3E92F
loc_3E942:
pop rbx
pop r14
pop rbp
retn
| int * minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(int)#1}::operator()(
int **a1,
int a2)
{
int *result; // rax
int v3; // r14d
result = *a1;
if ( **a1 > 0 )
{
std::operator<<<std::char_traits<char>>(a1[1], "\n");
result = *a1;
v3 = 0;
if ( **a1 * a2 > 0 )
v3 = **a1 * a2;
while ( v3-- != 0 )
result = (int *)std::operator<<<std::char_traits<char>>(a1[1], 32LL);
}
return result;
}
| operator():
PUSH RBP
PUSH R14
PUSH RBX
MOV RAX,qword ptr [RDI]
CMP dword ptr [RAX],0x0
JLE 0x0013e942
MOV EBP,ESI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
LEA RSI,[0x18de74]
CALL 0x001206a0
MOV RAX,qword ptr [RBX]
IMUL EBP,dword ptr [RAX]
XOR R14D,R14D
TEST EBP,EBP
CMOVG R14D,EBP
PUSH 0x20
POP RBP
LAB_0013e92f:
SUB R14D,0x1
JC 0x0013e942
MOV RDI,qword ptr [RBX + 0x8]
MOV ESI,EBP
CALL 0x001207d0
JMP 0x0013e92f
LAB_0013e942:
POP RBX
POP R14
POP RBP
RET
|
/* minja::Value::dump(std::__cxx11::ostringstream&, int, int, bool)
const::{lambda(int)#1}::TEMPNAMEPLACEHOLDERVALUE(int) const */
_func_dump_ostringstream_ptr_int_int_bool * __thiscall
const::{lambda(int)#1}::operator()(_lambda_int__1_ *this,int param_1)
{
ostream *poVar1;
int iVar2;
poVar1 = *(ostream **)this;
if (0 < *(int *)poVar1) {
std::operator<<(*(ostream **)(this + 8),"\n");
poVar1 = *(ostream **)this;
iVar2 = 0;
if (0 < param_1 * *(int *)poVar1) {
iVar2 = param_1 * *(int *)poVar1;
}
while (iVar2 != 0) {
poVar1 = std::operator<<(*(ostream **)(this + 8),' ');
iVar2 = iVar2 + -1;
}
}
return (_func_dump_ostringstream_ptr_int_int_bool *)poVar1;
}
| |
35,934 | nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, unsigned long) | monkey531[P]llama/common/./json.hpp | explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0)
noexcept(std::is_nothrow_move_constructible<IteratorType>::value
&& std::is_nothrow_default_constructible<string_type>::value)
: anchor(std::move(it))
, array_index(array_index_)
{} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, unsigned long):
pushq %rbx
movq %rdi, %rbx
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups %xmm1, 0x10(%rdi)
movups %xmm0, (%rdi)
movq %rdx, 0x20(%rdi)
movq $0x0, 0x28(%rdi)
addq $0x30, %rdi
leaq 0x40(%rbx), %rax
movq %rax, 0x30(%rbx)
leaq 0xbe32f(%rip), %rsi # 0x147cb6
leaq 0xbe329(%rip), %rdx # 0x147cb7
callq 0x4b514
leaq 0x60(%rbx), %rax
movq %rax, 0x50(%rbx)
movq $0x0, 0x58(%rbx)
movb $0x0, 0x60(%rbx)
popq %rbx
retq
movq %rax, %rdi
callq 0x3f24b
nop
| _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m:
push rbx
mov rbx, rdi
movups xmm0, xmmword ptr [rsi]
movups xmm1, xmmword ptr [rsi+10h]
movups xmmword ptr [rdi+10h], xmm1
movups xmmword ptr [rdi], xmm0
mov [rdi+20h], rdx
mov qword ptr [rdi+28h], 0
add rdi, 30h ; '0'
lea rax, [rbx+40h]
mov [rbx+30h], rax
lea rsi, aMinExp0+0Ah; "0"
lea rdx, aMinExp0+0Bh; ""
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 rax, [rbx+60h]
mov [rbx+50h], rax
mov qword ptr [rbx+58h], 0
mov byte ptr [rbx+60h], 0
pop rbx
retn
mov rdi, rax
call __clang_call_terminate
| long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::iteration_proxy_value(
long long a1,
__int128 *a2,
long long a3)
{
__int128 v3; // xmm0
long long result; // rax
v3 = *a2;
*(_OWORD *)(a1 + 16) = a2[1];
*(_OWORD *)a1 = v3;
*(_QWORD *)(a1 + 32) = a3;
*(_QWORD *)(a1 + 40) = 0LL;
*(_QWORD *)(a1 + 48) = a1 + 64;
std::string::_M_construct<char const*>(a1 + 48, "0", (long long)"");
result = a1 + 96;
*(_QWORD *)(a1 + 80) = a1 + 96;
*(_QWORD *)(a1 + 88) = 0LL;
*(_BYTE *)(a1 + 96) = 0;
return result;
}
| iteration_proxy_value:
PUSH RBX
MOV RBX,RDI
MOVUPS XMM0,xmmword ptr [RSI]
MOVUPS XMM1,xmmword ptr [RSI + 0x10]
MOVUPS xmmword ptr [RDI + 0x10],XMM1
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x20],RDX
MOV qword ptr [RDI + 0x28],0x0
ADD RDI,0x30
LEA RAX,[RBX + 0x40]
MOV qword ptr [RBX + 0x30],RAX
LAB_00189980:
LEA RSI,[0x247cb6]
LEA RDX,[0x247cb7]
CALL 0x0014b514
LEA RAX,[RBX + 0x60]
MOV qword ptr [RBX + 0x50],RAX
MOV qword ptr [RBX + 0x58],0x0
MOV byte ptr [RBX + 0x60],0x0
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>
>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>, unsigned long) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::iteration_proxy_value
(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*this,int4 *param_2,int8 param_3)
{
int4 uVar1;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int4 uVar5;
int4 uVar6;
int4 uVar7;
uVar1 = *param_2;
uVar2 = param_2[1];
uVar3 = param_2[2];
uVar4 = param_2[3];
uVar5 = param_2[5];
uVar6 = param_2[6];
uVar7 = param_2[7];
*(int4 *)(this + 0x10) = param_2[4];
*(int4 *)(this + 0x14) = uVar5;
*(int4 *)(this + 0x18) = uVar6;
*(int4 *)(this + 0x1c) = uVar7;
*(int4 *)this = uVar1;
*(int4 *)(this + 4) = uVar2;
*(int4 *)(this + 8) = uVar3;
*(int4 *)(this + 0xc) = uVar4;
*(int8 *)(this + 0x20) = param_3;
*(int8 *)(this + 0x28) = 0;
*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x30) = this + 0x40;
/* try { // try from 00189980 to 00189992 has its CatchHandler @ 001899a9 */
std::__cxx11::string::_M_construct<char_const*>(this + 0x30,"0","");
*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x50) = this + 0x60;
*(int8 *)(this + 0x58) = 0;
this[0x60] = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
)0x0;
return;
}
| |
35,935 | strmake | eloqsql/strings/strmake.c | char *strmake(register char *dst, register const char *src, size_t length)
{
while (length--)
{
if (! (*dst++ = *src++))
{
#ifdef EXTRA_DEBUG
/*
'length' is the maximum length of the string; the buffer needs
to be one character larger to accommodate the terminating
'\0'. This is easy to get wrong, so we make sure we write to
the entire length of the buffer to identify incorrect
buffer-sizes. We only initialism the "unused" part of the
buffer here, a) for efficiency, and b) because dst==src is
allowed, so initializing the entire buffer would overwrite the
source-string. Also, we write a character rather than '\0' as
this makes spotting these problems in the results easier.
If we are using purify/valgrind, we only set one character at
end to be able to detect also wrong accesses after the end of
dst.
*/
if (length)
{
#ifdef HAVE_valgrind
dst[length-1]= 'Z';
#else
bfill(dst, length-1, (int) 'Z');
#endif /* HAVE_valgrind */
}
#endif /* EXTRA_DEBUG */
return dst-1;
}
}
*dst=0;
return dst;
} | O0 | c | strmake:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x20(%rbp)
cmpq $0x0, %rax
je 0x14ddbb
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %al
movq -0x10(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %al, (%rcx)
cmpb $0x0, %al
jne 0x14ddb9
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x14ddca
jmp 0x14dd70
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
| strmake:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
loc_14DD70:
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rcx
cmp rax, 0
jz short loc_14DDBB
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov al, [rax]
mov rcx, [rbp+var_10]
mov rdx, rcx
add rdx, 1
mov [rbp+var_10], rdx
mov [rcx], al
cmp al, 0
jnz short loc_14DDB9
mov rax, [rbp+var_10]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_8], rax
jmp short loc_14DDCA
loc_14DDB9:
jmp short loc_14DD70
loc_14DDBB:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_14DDCA:
mov rax, [rbp+var_8]
pop rbp
retn
| _BYTE * strmake(_BYTE *a1, _BYTE *a2, long long a3)
{
_BYTE *v4; // rax
_BYTE *v5; // rcx
while ( a3-- )
{
v4 = a2++;
LOBYTE(v4) = *v4;
v5 = a1++;
*v5 = (_BYTE)v4;
if ( !(_BYTE)v4 )
return a1 - 1;
}
*a1 = 0;
return a1;
}
| |||
35,936 | strmake | eloqsql/strings/strmake.c | char *strmake(register char *dst, register const char *src, size_t length)
{
while (length--)
{
if (! (*dst++ = *src++))
{
#ifdef EXTRA_DEBUG
/*
'length' is the maximum length of the string; the buffer needs
to be one character larger to accommodate the terminating
'\0'. This is easy to get wrong, so we make sure we write to
the entire length of the buffer to identify incorrect
buffer-sizes. We only initialism the "unused" part of the
buffer here, a) for efficiency, and b) because dst==src is
allowed, so initializing the entire buffer would overwrite the
source-string. Also, we write a character rather than '\0' as
this makes spotting these problems in the results easier.
If we are using purify/valgrind, we only set one character at
end to be able to detect also wrong accesses after the end of
dst.
*/
if (length)
{
#ifdef HAVE_valgrind
dst[length-1]= 'Z';
#else
bfill(dst, length-1, (int) 'Z');
#endif /* HAVE_valgrind */
}
#endif /* EXTRA_DEBUG */
return dst-1;
}
}
*dst=0;
return dst;
} | O3 | c | strmake:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
xorl %edi, %edi
movq %rdi, %rcx
cmpq %rdi, %rdx
je 0xd7130
movb (%rsi,%rcx), %r8b
movb %r8b, (%rax,%rcx)
leaq 0x1(%rcx), %rdi
testb %r8b, %r8b
jne 0xd7115
jmp 0xd7134
movb $0x0, (%rax,%rcx)
addq %rcx, %rax
popq %rbp
retq
nopl (%rax)
| strmake:
push rbp
mov rbp, rsp
mov rax, rdi
xor edi, edi
loc_D7115:
mov rcx, rdi
cmp rdx, rdi
jz short loc_D7130
mov r8b, [rsi+rcx]
mov [rax+rcx], r8b
lea rdi, [rcx+1]
test r8b, r8b
jnz short loc_D7115
jmp short loc_D7134
loc_D7130:
mov byte ptr [rax+rcx], 0
loc_D7134:
add rax, rcx
pop rbp
retn
| long long strmake(long long a1, long long a2, long long a3)
{
long long v4; // rdi
long long v5; // rcx
char v6; // r8
v4 = 0LL;
while ( 1 )
{
v5 = v4;
if ( a3 == v4 )
break;
v6 = *(_BYTE *)(a2 + v4);
*(_BYTE *)(a1 + v4++) = v6;
if ( !v6 )
return v5 + a1;
}
*(_BYTE *)(a1 + v4) = 0;
return v5 + a1;
}
| strmake:
PUSH RBP
MOV RBP,RSP
MOV RAX,RDI
XOR EDI,EDI
LAB_001d7115:
MOV RCX,RDI
CMP RDX,RDI
JZ 0x001d7130
MOV R8B,byte ptr [RSI + RCX*0x1]
MOV byte ptr [RAX + RCX*0x1],R8B
LEA RDI,[RCX + 0x1]
TEST R8B,R8B
JNZ 0x001d7115
JMP 0x001d7134
LAB_001d7130:
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_001d7134:
ADD RAX,RCX
POP RBP
RET
|
long strmake(long param_1,long param_2,long param_3)
{
char cVar1;
long lVar2;
long lVar3;
lVar2 = 0;
do {
lVar3 = lVar2;
if (param_3 == lVar3) {
*(int1 *)(param_1 + lVar3) = 0;
break;
}
cVar1 = *(char *)(param_2 + lVar3);
*(char *)(param_1 + lVar3) = cVar1;
lVar2 = lVar3 + 1;
} while (cVar1 != '\0');
return param_1 + lVar3;
}
| |
35,937 | ma_write_dynamic_record | eloqsql/storage/maria/ma_dynrec.c | my_bool _ma_write_dynamic_record(MARIA_HA *info, const uchar *record)
{
ulong reclength= _ma_rec_pack(info,info->rec_buff + MARIA_REC_BUFF_OFFSET,
record);
if (!reclength)
return 1;
return (write_dynamic_record(info,info->rec_buff + MARIA_REC_BUFF_OFFSET,
reclength));
} | O3 | c | ma_write_dynamic_record:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rdx
movq %rdi, %rbx
movq 0x3a0(%rdi), %rsi
addq $0x18, %rsi
callq 0x3d511
testl %eax, %eax
je 0x3d508
movl %eax, %edx
movq 0x3a0(%rbx), %rsi
addq $0x18, %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3d879
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _ma_write_dynamic_record:
push rbp
mov rbp, rsp
push rbx
push rax
mov rdx, rsi
mov rbx, rdi
mov rsi, [rdi+3A0h]
add rsi, 18h
call _ma_rec_pack
test eax, eax
jz short loc_3D508
mov edx, eax
mov rsi, [rbx+3A0h]
add rsi, 18h
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp write_dynamic_record
loc_3D508:
mov al, 1
add rsp, 8
pop rbx
pop rbp
retn
| int ma_write_dynamic_record(long long a1, long long a2)
{
unsigned int v2; // eax
v2 = ma_rec_pack(a1, *(_QWORD *)(a1 + 928) + 24LL, a2);
if ( v2 )
return write_dynamic_record(a1, *(_QWORD *)(a1 + 928) + 24LL, v2);
else
return 1;
}
| _ma_write_dynamic_record:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RDX,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RDI + 0x3a0]
ADD RSI,0x18
CALL 0x0013d511
TEST EAX,EAX
JZ 0x0013d508
MOV EDX,EAX
MOV RSI,qword ptr [RBX + 0x3a0]
ADD RSI,0x18
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x0013d879
LAB_0013d508:
MOV AL,0x1
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int4 _ma_write_dynamic_record(long param_1,int8 param_2)
{
int iVar1;
int4 uVar2;
iVar1 = _ma_rec_pack(param_1,*(long *)(param_1 + 0x3a0) + 0x18,param_2);
if (iVar1 != 0) {
uVar2 = write_dynamic_record(param_1,*(long *)(param_1 + 0x3a0) + 0x18,iVar1);
return uVar2;
}
return 1;
}
| |
35,938 | js_os_remove | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_remove(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *filename;
int ret;
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
#if defined(_WIN32)
{
struct stat st;
if (stat(filename, &st) == 0 && S_ISDIR(st.st_mode)) {
ret = rmdir(filename);
} else {
ret = unlink(filename);
}
}
#else
ret = remove(filename);
#endif
ret = js_get_errno(ret);
JS_FreeCString(ctx, filename);
return JS_NewInt32(ctx, ret);
} | O0 | c | js_os_remove:
subq $0x68, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x147e0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x186a2
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0x18704
movq 0x8(%rsp), %rdi
callq 0xe0d0
movl %eax, 0x4(%rsp)
movslq 0x4(%rsp), %rdi
callq 0x13a50
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x29e50
movq 0x20(%rsp), %rcx
movl 0x4(%rsp), %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, 0x58(%rsp)
movq $0x0, 0x60(%rsp)
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
| js_os_remove:
sub rsp, 68h
mov [rsp+68h+var_40], rsi
mov [rsp+68h+var_38], rdx
mov [rsp+68h+var_48], rdi
mov [rsp+68h+var_4C], ecx
mov [rsp+68h+var_58], r8
mov rdi, [rsp+68h+var_48]
mov rax, [rsp+68h+var_58]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+68h+var_60], rax
cmp [rsp+68h+var_60], 0
jnz short loc_186A2
mov dword ptr [rsp+68h+var_30], 0
mov [rsp+68h+var_28], 6
loc_186A0:
jmp short loc_18704
loc_186A2:
mov rdi, [rsp+68h+var_60]
call _remove
mov [rsp+68h+var_64], eax
movsxd rdi, [rsp+68h+var_64]
call js_get_errno
mov [rsp+68h+var_64], eax
mov rdi, [rsp+68h+var_48]
mov rsi, [rsp+68h+var_60]
call JS_FreeCString
mov rcx, [rsp+68h+var_48]
mov eax, [rsp+68h+var_64]
mov [rsp+68h+var_18], rcx
mov [rsp+68h+var_1C], eax
mov eax, [rsp+68h+var_1C]
mov dword ptr [rsp+68h+var_10], eax
mov [rsp+68h+var_8], 0
mov rcx, [rsp+68h+var_10]
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_30], rcx
mov [rsp+68h+var_28], rax
loc_18704:
mov rax, [rsp+68h+var_30]
mov rdx, [rsp+68h+var_28]
add rsp, 68h
retn
| long long js_os_remove(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
int v5; // eax
int errno; // [rsp+4h] [rbp-64h]
long long v8; // [rsp+8h] [rbp-60h]
long long v9; // [rsp+38h] [rbp-30h]
long long v10; // [rsp+58h] [rbp-10h]
v8 = JS_ToCString(a1, *a5, a5[1]);
if ( v8 )
{
v5 = remove(v8);
errno = js_get_errno(v5);
JS_FreeCString(a1, v8);
LODWORD(v10) = errno;
return v10;
}
else
{
LODWORD(v9) = 0;
}
return v9;
}
| js_os_remove:
SUB RSP,0x68
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV qword ptr [RSP + 0x10],R8
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x001147e0
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x001186a2
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x00118704
LAB_001186a2:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0010e0d0
MOV dword ptr [RSP + 0x4],EAX
MOVSXD RDI,dword ptr [RSP + 0x4]
CALL 0x00113a50
MOV dword ptr [RSP + 0x4],EAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00129e50
MOV RCX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x4]
MOV qword ptr [RSP + 0x50],RCX
MOV dword ptr [RSP + 0x4c],EAX
MOV EAX,dword ptr [RSP + 0x4c]
MOV dword ptr [RSP + 0x58],EAX
MOV qword ptr [RSP + 0x60],0x0
MOV RCX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x40],RAX
LAB_00118704:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x68
RET
|
int1 [16] js_os_remove(int8 param_1)
{
int1 auVar1 [16];
int iVar2;
char *__filename;
int8 *in_R8;
int4 local_30;
int4 uStack_2c;
int8 local_28;
int4 uStack_c;
__filename = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]);
if (__filename == (char *)0x0) {
local_30 = 0;
local_28 = 6;
}
else {
iVar2 = remove(__filename);
local_30 = js_get_errno((long)iVar2);
JS_FreeCString(param_1,__filename);
uStack_2c = uStack_c;
local_28 = 0;
}
auVar1._4_4_ = uStack_2c;
auVar1._0_4_ = local_30;
auVar1._8_8_ = local_28;
return auVar1;
}
| |
35,939 | js_os_remove | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_remove(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *filename;
int ret;
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
#if defined(_WIN32)
{
struct stat st;
if (stat(filename, &st) == 0 && S_ISDIR(st.st_mode)) {
ret = rmdir(filename);
} else {
ret = unlink(filename);
}
}
#else
ret = remove(filename);
#endif
ret = js_get_errno(ret);
JS_FreeCString(ctx, filename);
return JS_NewInt32(ctx, ret);
} | O1 | c | js_os_remove:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%r8), %rdx
movq 0x8(%r8), %rcx
xorl %r15d, %r15d
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x20bf7
testq %rax, %rax
je 0x18cf4
movq %rax, %r14
movq %rax, %rdi
callq 0xe0d0
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x18ce2
callq 0xe0b0
xorl %ebp, %ebp
subl (%rax), %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20edd
movl %ebp, %r15d
xorl %edx, %edx
jmp 0x18cf9
movl $0x6, %edx
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| js_os_remove:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov rdx, [r8]
mov rcx, [r8+8]
xor r15d, r15d
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_18CF4
mov r14, rax
mov rdi, rax
call _remove
mov ebp, eax
cmp eax, 0FFFFFFFFh
jnz short loc_18CE2
call ___errno_location
xor ebp, ebp
sub ebp, [rax]
loc_18CE2:
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
mov r15d, ebp
xor edx, edx
jmp short loc_18CF9
loc_18CF4:
mov edx, 6
loc_18CF9:
mov rax, r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long js_os_remove(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long v6; // r15
long long v7; // rax
long long v8; // r14
long long v9; // rdi
unsigned int v10; // ebp
v6 = 0LL;
v7 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL);
if ( v7 )
{
v8 = v7;
v9 = v7;
v10 = remove(v7);
if ( v10 == -1 )
v10 = -*(_DWORD *)__errno_location(v9);
JS_FreeCString(a1, v8);
return v10;
}
return v6;
}
| |||
35,940 | js_os_remove | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_remove(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *filename;
int ret;
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
#if defined(_WIN32)
{
struct stat st;
if (stat(filename, &st) == 0 && S_ISDIR(st.st_mode)) {
ret = rmdir(filename);
} else {
ret = unlink(filename);
}
}
#else
ret = remove(filename);
#endif
ret = js_get_errno(ret);
JS_FreeCString(ctx, filename);
return JS_NewInt32(ctx, ret);
} | O2 | c | js_os_remove:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%r8), %rsi
movq 0x8(%r8), %rdx
callq 0x11a6c
testq %rax, %rax
je 0x13983
movq %rax, %r14
movq %rax, %rdi
callq 0xe0d0
movslq %eax, %rdi
callq 0x113ab
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1b057
movl %r15d, %eax
xorl %edx, %edx
jmp 0x13988
pushq $0x6
popq %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
| js_os_remove:
push r15
push r14
push rbx
mov rbx, rdi
mov rsi, [r8]
mov rdx, [r8+8]
call JS_ToCString
test rax, rax
jz short loc_13983
mov r14, rax
mov rdi, rax
call _remove
movsxd rdi, eax
call js_get_errno
mov r15, rax
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
mov eax, r15d
xor edx, edx
jmp short loc_13988
loc_13983:
push 6
pop rdx
xor eax, eax
loc_13988:
pop rbx
pop r14
pop r15
retn
| long long js_os_remove(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
long long v5; // rax
long long v6; // r14
int v7; // eax
unsigned int errno; // r15d
v5 = JS_ToCString(a1, *a5, a5[1]);
if ( !v5 )
return 0LL;
v6 = v5;
v7 = remove(v5);
errno = js_get_errno(v7);
JS_FreeCString(a1, v6);
return errno;
}
| js_os_remove:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
CALL 0x00111a6c
TEST RAX,RAX
JZ 0x00113983
MOV R14,RAX
MOV RDI,RAX
CALL 0x0010e0d0
MOVSXD RDI,EAX
CALL 0x001113ab
MOV R15,RAX
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011b057
MOV EAX,R15D
XOR EDX,EDX
JMP 0x00113988
LAB_00113983:
PUSH 0x6
POP RDX
XOR EAX,EAX
LAB_00113988:
POP RBX
POP R14
POP R15
RET
|
int4 js_os_remove(int8 param_1)
{
int iVar1;
int4 uVar2;
char *__filename;
int8 *in_R8;
__filename = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]);
if (__filename == (char *)0x0) {
uVar2 = 0;
}
else {
iVar1 = remove(__filename);
uVar2 = js_get_errno((long)iVar1);
JS_FreeCString(param_1,__filename);
}
return uVar2;
}
| |
35,941 | IdleScreenImpl::setLogoPosition() | LumonMDR/src/UI/Widgets/IdleScreen.cpp | void setLogoPosition()
{
ImVec2 windowSize = ImGui::GetWindowSize();
ImVec2 windowPos = ImGui::GetWindowPos();
ImVec2 minPosition = ImVec2(windowPos.x, windowPos.y);
ImVec2 maxPosition = ImVec2(windowPos.x + windowSize.x - scale*logoSize.x, windowPos.y + windowSize.y - scale*logoSize.y);
if (currentLogoPosition.x >= maxPosition.x) {
nextOffset.x = -1;
} else if (currentLogoPosition.x < minPosition.x) {
nextOffset.x = 1;
}
if (currentLogoPosition.y >= maxPosition.y) {
nextOffset.y = -1;
} else if (currentLogoPosition.y < minPosition.y) {
nextOffset.y = 1;
}
currentLogoPosition = ImVec2(currentLogoPosition.x + speed*nextOffset.x, currentLogoPosition.y + speed*nextOffset.y);
} | O3 | cpp | IdleScreenImpl::setLogoPosition():
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x33612
movaps %xmm0, (%rsp)
callq 0x335a0
movaps (%rsp), %xmm5
addps %xmm0, %xmm5
movss 0x1c(%rbx), %xmm2
movss 0x60(%rbx), %xmm1
movss 0x50(%rbx), %xmm3
mulss %xmm2, %xmm3
movaps %xmm5, %xmm4
subss %xmm3, %xmm4
movaps %xmm5, %xmm3
mulss 0x54(%rbx), %xmm2
shufps $0x55, %xmm5, %xmm3 # xmm3 = xmm3[1,1],xmm5[1,1]
subss %xmm2, %xmm3
ucomiss %xmm4, %xmm1
jae 0x19c97
ucomiss %xmm1, %xmm0
jbe 0x19ca4
movss 0x856ff(%rip), %xmm2 # 0x9f394
jmp 0x19c9f
movss 0x85709(%rip), %xmm2 # 0x9f3a8
movss %xmm2, 0x68(%rbx)
movss 0x64(%rbx), %xmm2
ucomiss %xmm3, %xmm2
jae 0x19cc8
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
ucomiss %xmm2, %xmm0
jbe 0x19cd9
movl $0x3f800000, 0x6c(%rbx) # imm = 0x3F800000
movss 0x856ce(%rip), %xmm0 # 0x9f394
jmp 0x19cde
movl $0xbf800000, 0x6c(%rbx) # imm = 0xBF800000
movss 0x856d1(%rip), %xmm0 # 0x9f3a8
jmp 0x19cde
movss 0x6c(%rbx), %xmm0
movups 0x18(%rbx), %xmm3
unpcklps %xmm3, %xmm3 # xmm3 = xmm3[0,0,1,1]
movss 0x68(%rbx), %xmm4
unpcklps %xmm0, %xmm4 # xmm4 = xmm4[0],xmm0[0],xmm4[1],xmm0[1]
mulps %xmm3, %xmm4
unpcklps %xmm2, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
addps %xmm4, %xmm1
movlps %xmm1, 0x60(%rbx)
addq $0x10, %rsp
popq %rbx
retq
| _ZN14IdleScreenImpl15setLogoPositionEv:
push rbx
sub rsp, 10h
mov rbx, rdi
call _ZN5ImGui13GetWindowSizeEv; ImGui::GetWindowSize(void)
movaps [rsp+18h+var_18], xmm0
call _ZN5ImGui12GetWindowPosEv; ImGui::GetWindowPos(void)
movaps xmm5, [rsp+18h+var_18]
addps xmm5, xmm0
movss xmm2, dword ptr [rbx+1Ch]
movss xmm1, dword ptr [rbx+60h]
movss xmm3, dword ptr [rbx+50h]
mulss xmm3, xmm2
movaps xmm4, xmm5
subss xmm4, xmm3
movaps xmm3, xmm5
mulss xmm2, dword ptr [rbx+54h]
shufps xmm3, xmm5, 55h ; 'U'
subss xmm3, xmm2
ucomiss xmm1, xmm4
jnb short loc_19C97
ucomiss xmm0, xmm1
jbe short loc_19CA4
movss xmm2, cs:flt_9F394
jmp short loc_19C9F
loc_19C97:
movss xmm2, cs:flt_9F3A8
loc_19C9F:
movss dword ptr [rbx+68h], xmm2
loc_19CA4:
movss xmm2, dword ptr [rbx+64h]
ucomiss xmm2, xmm3
jnb short loc_19CC8
shufps xmm0, xmm0, 55h ; 'U'
ucomiss xmm0, xmm2
jbe short loc_19CD9
mov dword ptr [rbx+6Ch], 3F800000h
movss xmm0, cs:flt_9F394
jmp short loc_19CDE
loc_19CC8:
mov dword ptr [rbx+6Ch], 0BF800000h
movss xmm0, cs:flt_9F3A8
jmp short loc_19CDE
loc_19CD9:
movss xmm0, dword ptr [rbx+6Ch]
loc_19CDE:
movups xmm3, xmmword ptr [rbx+18h]
unpcklps xmm3, xmm3
movss xmm4, dword ptr [rbx+68h]
unpcklps xmm4, xmm0
mulps xmm4, xmm3
unpcklps xmm1, xmm2
addps xmm1, xmm4
movlps qword ptr [rbx+60h], xmm1
add rsp, 10h
pop rbx
retn
| long long IdleScreenImpl::setLogoPosition(IdleScreenImpl *this, __m128 a2)
{
long long result; // rax
__m128 v3; // xmm5
float v4; // xmm2_4
__m128 v5; // xmm1
float v6; // xmm3_4
int v7; // xmm2_4
__m128 v8; // xmm2
__m128 v9; // xmm0
ImGui::GetWindowSize(this);
result = ImGui::GetWindowPos(this);
v3 = _mm_add_ps(a2, a2);
v4 = *((float *)this + 7);
v5 = (__m128)*((unsigned int *)this + 24);
v6 = _mm_shuffle_ps(v3, v3, 85).m128_f32[0] - (float)(v4 * *((float *)this + 21));
if ( v5.m128_f32[0] >= (float)(v3.m128_f32[0] - (float)(*((float *)this + 20) * v4)) )
{
v7 = -1082130432;
}
else
{
if ( a2.m128_f32[0] <= v5.m128_f32[0] )
goto LABEL_6;
v7 = 1065353216;
}
*((_DWORD *)this + 26) = v7;
LABEL_6:
v8 = (__m128)*((unsigned int *)this + 25);
if ( v8.m128_f32[0] >= v6 )
{
*((_DWORD *)this + 27) = -1082130432;
v9 = (__m128)0xBF800000;
}
else if ( _mm_shuffle_ps(a2, a2, 85).m128_f32[0] <= v8.m128_f32[0] )
{
v9 = (__m128)*((unsigned int *)this + 27);
}
else
{
*((_DWORD *)this + 27) = 1065353216;
v9 = (__m128)0x3F800000u;
}
_mm_storel_ps(
(double *)this + 12,
_mm_add_ps(
_mm_unpacklo_ps(v5, v8),
_mm_mul_ps(
_mm_unpacklo_ps((__m128)*((unsigned int *)this + 26), v9),
_mm_unpacklo_ps(*(__m128 *)((char *)this + 24), *(__m128 *)((char *)this + 24)))));
return result;
}
| setLogoPosition:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
CALL 0x00133612
MOVAPS xmmword ptr [RSP],XMM0
CALL 0x001335a0
MOVAPS XMM5,xmmword ptr [RSP]
ADDPS XMM5,XMM0
MOVSS XMM2,dword ptr [RBX + 0x1c]
MOVSS XMM1,dword ptr [RBX + 0x60]
MOVSS XMM3,dword ptr [RBX + 0x50]
MULSS XMM3,XMM2
MOVAPS XMM4,XMM5
SUBSS XMM4,XMM3
MOVAPS XMM3,XMM5
MULSS XMM2,dword ptr [RBX + 0x54]
SHUFPS XMM3,XMM5,0x55
SUBSS XMM3,XMM2
UCOMISS XMM1,XMM4
JNC 0x00119c97
UCOMISS XMM0,XMM1
JBE 0x00119ca4
MOVSS XMM2,dword ptr [0x0019f394]
JMP 0x00119c9f
LAB_00119c97:
MOVSS XMM2,dword ptr [0x0019f3a8]
LAB_00119c9f:
MOVSS dword ptr [RBX + 0x68],XMM2
LAB_00119ca4:
MOVSS XMM2,dword ptr [RBX + 0x64]
UCOMISS XMM2,XMM3
JNC 0x00119cc8
SHUFPS XMM0,XMM0,0x55
UCOMISS XMM0,XMM2
JBE 0x00119cd9
MOV dword ptr [RBX + 0x6c],0x3f800000
MOVSS XMM0,dword ptr [0x0019f394]
JMP 0x00119cde
LAB_00119cc8:
MOV dword ptr [RBX + 0x6c],0xbf800000
MOVSS XMM0,dword ptr [0x0019f3a8]
JMP 0x00119cde
LAB_00119cd9:
MOVSS XMM0,dword ptr [RBX + 0x6c]
LAB_00119cde:
MOVUPS XMM3,xmmword ptr [RBX + 0x18]
UNPCKLPS XMM3,XMM3
MOVSS XMM4,dword ptr [RBX + 0x68]
UNPCKLPS XMM4,XMM0
MULPS XMM4,XMM3
UNPCKLPS XMM1,XMM2
ADDPS XMM1,XMM4
MOVLPS qword ptr [RBX + 0x60],XMM1
ADD RSP,0x10
POP RBX
RET
|
/* IdleScreenImpl::setLogoPosition() */
void __thiscall IdleScreenImpl::setLogoPosition(IdleScreenImpl *this)
{
float fVar1;
float fVar2;
int8 uVar3;
int8 uVar4;
float fVar5;
uVar3 = ImGui::GetWindowSize();
uVar4 = ImGui::GetWindowPos();
fVar2 = (float)((ulong)uVar4 >> 0x20);
fVar1 = *(float *)(this + 0x60);
fVar5 = DAT_0019f3a8;
if ((((float)uVar3 + (float)uVar4) - *(float *)(this + 0x50) * *(float *)(this + 0x1c) <= fVar1)
|| (fVar5 = DAT_0019f394, fVar1 < (float)uVar4)) {
*(float *)(this + 0x68) = fVar5;
}
fVar5 = *(float *)(this + 100);
if (((float)((ulong)uVar3 >> 0x20) + fVar2) - *(float *)(this + 0x1c) * *(float *)(this + 0x54) <=
fVar5) {
*(int4 *)(this + 0x6c) = 0xbf800000;
fVar2 = DAT_0019f3a8;
}
else if (fVar2 <= fVar5) {
fVar2 = *(float *)(this + 0x6c);
}
else {
*(int4 *)(this + 0x6c) = 0x3f800000;
fVar2 = DAT_0019f394;
}
*(ulong *)(this + 0x60) =
CONCAT44(fVar5 + fVar2 * *(float *)(this + 0x18),
fVar1 + *(float *)(this + 0x68) * *(float *)(this + 0x18));
return;
}
| |
35,942 | testing::internal::MutexBase::Unlock() | giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h | void Unlock() {
// Since the lock is being released the owner_ field should no longer be
// considered valid. We don't protect writing to has_owner_ here, as it's
// the caller's responsibility to ensure that the current thread holds the
// mutex when this is called.
has_owner_ = false;
GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));
} | O3 | c | testing::internal::MutexBase::Unlock():
pushq %rbx
subq $0x10, %rsp
movb $0x0, 0x28(%rdi)
callq 0x83a0
testl %eax, %eax
je 0x36e09
movl %eax, %ebx
leaq 0xd28d(%rip), %rdx # 0x4403a
leaq 0xc(%rsp), %rdi
movl $0x3, %esi
movl $0x6a6, %ecx # imm = 0x6A6
callq 0x16b08
movq 0x22220(%rip), %rdi # 0x58fe8
leaq 0xd325(%rip), %rsi # 0x440f4
movl $0x1d, %edx
callq 0x85b0
movq 0x22208(%rip), %rdi # 0x58fe8
leaq 0xd2fa(%rip), %rsi # 0x440e1
movl $0x12, %edx
callq 0x85b0
movq 0x221f0(%rip), %rdi # 0x58fe8
movl %ebx, %esi
callq 0x8950
leaq 0xc(%rsp), %rdi
callq 0x16c4a
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0xc(%rsp), %rdi
callq 0x16c4a
movq %rbx, %rdi
callq 0x8990
| _ZN7testing8internal9MutexBase6UnlockEv:
push rbx
sub rsp, 10h
mov byte ptr [rdi+28h], 0
call _pthread_mutex_unlock
test eax, eax
jz short loc_36E09
mov ebx, eax
lea rdx, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+18h+var_C]
mov esi, 3
mov ecx, 6A6h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aPthreadMutexUn_0; "pthread_mutex_unlock(&mutex_)"
mov edx, 1Dh
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, cs:_ZSt4cerr_ptr
lea rsi, aFailedWithErro; "failed with error "
mov edx, 12h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, cs:_ZSt4cerr_ptr
mov esi, ebx
call __ZNSolsEi; std::ostream::operator<<(int)
lea rdi, [rsp+18h+var_C]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
loc_36E09:
add rsp, 10h
pop rbx
retn
mov rbx, rax
lea rdi, [rsp+arg_4]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
mov rdi, rbx
call __Unwind_Resume
| void testing::internal::MutexBase::Unlock(testing::internal::MutexBase *this)
{
unsigned int v1; // eax
unsigned int v2; // ebx
long long v3; // rdx
long long v4; // rcx
_DWORD v5[3]; // [rsp+Ch] [rbp-Ch] BYREF
*((_BYTE *)this + 40) = 0;
v1 = pthread_mutex_unlock();
if ( v1 )
{
v2 = v1;
testing::internal::GTestLog::GTestLog(
v5,
3,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/include/gte"
"st/internal/gtest-port.h",
1702);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "pthread_mutex_unlock(&mutex_)", 29LL);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "failed with error ", 18LL);
std::ostream::operator<<(&std::cerr, v2);
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v5, v2, v3, v4);
}
}
| Unlock:
PUSH RBX
SUB RSP,0x10
MOV byte ptr [RDI + 0x28],0x0
CALL 0x001083a0
TEST EAX,EAX
JZ 0x00136e09
MOV EBX,EAX
LEA RDX,[0x14403a]
LEA RDI,[RSP + 0xc]
MOV ESI,0x3
MOV ECX,0x6a6
CALL 0x00116b08
LAB_00136dc1:
MOV RDI,qword ptr [0x00158fe8]
LEA RSI,[0x1440f4]
MOV EDX,0x1d
CALL 0x001085b0
MOV RDI,qword ptr [0x00158fe8]
LEA RSI,[0x1440e1]
MOV EDX,0x12
CALL 0x001085b0
MOV RDI,qword ptr [0x00158fe8]
MOV ESI,EBX
CALL 0x00108950
LAB_00136dff:
LEA RDI,[RSP + 0xc]
CALL 0x00116c4a
LAB_00136e09:
ADD RSP,0x10
POP RBX
RET
|
/* testing::internal::MutexBase::Unlock() */
void __thiscall testing::internal::MutexBase::Unlock(MutexBase *this)
{
int iVar1;
GTestLog local_c [4];
this[0x28] = (MutexBase)0x0;
iVar1 = pthread_mutex_unlock((pthread_mutex_t *)this);
if (iVar1 != 0) {
GTestLog::GTestLog(local_c,3,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h"
,0x6a6);
/* try { // try from 00136dc1 to 00136dfe has its CatchHandler @ 00136e0f */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00158fe8,"pthread_mutex_unlock(&mutex_)",0x1d);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00158fe8,"failed with error ",0x12);
std::ostream::operator<<((ostream *)PTR_cerr_00158fe8,iVar1);
GTestLog::~GTestLog(local_c);
}
return;
}
| |
35,943 | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>) | monkey531[P]llama/common/json.hpp | iterator erase(iterator first, iterator last)
{
if (first == last)
{
return first;
}
const auto elements_affected = std::distance(first, last);
const auto offset = std::distance(Container::begin(), first);
// This is the start situation. We need to delete elements_affected
// elements (3 in this example: e, f, g), and need to return an
// iterator past the last deleted element (h in this example).
// Note that offset is the distance from the start of the vector
// to first. We will need this later.
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// first last
// Since we cannot move const Keys, we re-construct them in place.
// We start at first and re-construct (viz. copy) the elements from
// the back of the vector. Example for first iteration:
// ,--------.
// v | destroy e and re-construct with h
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// it it + elements_affected
for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it)
{
it->~value_type(); // destroy but keep allocation
new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it
}
// [ a, b, c, d, h, i, j, h, i, j ]
// ^ ^
// first last
// remove the unneeded elements at the end of the vector
Container::resize(this->size() - static_cast<size_type>(elements_affected));
// [ a, b, c, d, h, i, j ]
// ^ ^
// first last
// first is now pointing past the last deleted element, but we cannot
// use this iterator, because it may have been invalidated by the
// resize call. Instead, we can return begin() + offset.
return Container::begin() + offset;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq %rdx, %rsi
je 0x6d871
movq %rdi, %r14
subq %rbx, %rdx
pushq $0x60
popq %rcx
movq %rdx, %rax
cqto
idivq %rcx
movq %rax, %r15
movq (%rdi), %rax
movq %rax, (%rsp)
imulq $0x60, %r15, %r13
addq %rbx, %r13
movq %r13, %r12
negq %r12
movq %rbx, %rbp
cmpq 0x8(%r14), %r13
je 0x6d84b
movq %rbp, %rdi
callq 0x677cc
movq %rbp, %rdi
movq %r13, %rsi
callq 0x6d884
addq $0x60, %rbp
addq $0x60, %r13
addq $-0x60, %r12
jmp 0x6d824
subq (%rsp), %rbx
addq (%r14), %r12
negq %r12
movq %r12, %rax
cqto
pushq $0x60
popq %rcx
idivq %rcx
subq %r15, %rax
movq %r14, %rdi
movq %rax, %rsi
callq 0x6d8ae
addq (%r14), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
cmp rsi, rdx
jz short loc_6D871
mov r14, rdi
sub rdx, rbx
push 60h ; '`'
pop rcx
mov rax, rdx
cqo
idiv rcx
mov r15, rax
mov rax, [rdi]
mov [rsp+38h+var_38], rax
imul r13, r15, 60h ; '`'
add r13, rbx
mov r12, r13
neg r12
mov rbp, rbx
loc_6D824:
cmp r13, [r14+8]
jz short loc_6D84B
mov rdi, rbp
call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEED2Ev; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::~pair()
mov rdi, rbp
mov rsi, r13
call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::pair(std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>&&)
add rbp, 60h ; '`'
add r13, 60h ; '`'
add r12, 0FFFFFFFFFFFFFFA0h
jmp short loc_6D824
loc_6D84B:
sub rbx, [rsp+38h+var_38]
add r12, [r14]
neg r12
mov rax, r12
cqo
push 60h ; '`'
pop rcx
idiv rcx
sub rax, r15
mov rdi, r14
mov rsi, rax
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::resize(ulong)
add rbx, [r14]
loc_6D871:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase(
long long *a1,
long long a2,
long long a3)
{
long long v3; // rbx
long long v4; // r15
long long v5; // r13
long long v6; // r12
long long v7; // rbp
long long v9; // [rsp+0h] [rbp-38h]
v3 = a2;
if ( a2 != a3 )
{
v4 = (a3 - a2) / 96;
v9 = *a1;
v5 = a2 + 96 * v4;
v6 = -v5;
v7 = a2;
while ( v5 != a1[1] )
{
std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::~pair(v7);
std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::pair(
v7,
v5);
v7 += 96LL;
v5 += 96LL;
v6 -= 96LL;
}
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::resize(
a1,
-(*a1 + v6) / 96 - v4,
-(*a1 + v6) % 96);
return *a1 + a2 - v9;
}
return v3;
}
| erase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
CMP RSI,RDX
JZ 0x0016d871
MOV R14,RDI
SUB RDX,RBX
PUSH 0x60
POP RCX
MOV RAX,RDX
CQO
IDIV RCX
MOV R15,RAX
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP],RAX
IMUL R13,R15,0x60
ADD R13,RBX
MOV R12,R13
NEG R12
MOV RBP,RBX
LAB_0016d824:
CMP R13,qword ptr [R14 + 0x8]
JZ 0x0016d84b
MOV RDI,RBP
CALL 0x001677cc
MOV RDI,RBP
MOV RSI,R13
CALL 0x0016d884
ADD RBP,0x60
ADD R13,0x60
ADD R12,-0x60
JMP 0x0016d824
LAB_0016d84b:
SUB RBX,qword ptr [RSP]
ADD R12,qword ptr [R14]
NEG R12
MOV RAX,R12
CQO
PUSH 0x60
POP RCX
IDIV RCX
SUB RAX,R15
MOV RDI,R14
MOV RSI,RAX
CALL 0x0016d8ae
ADD RBX,qword ptr [R14]
LAB_0016d871:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>*,
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> > > >,
__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>*,
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> > > >) */
pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
* __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::erase(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
*param_2,
pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
*param_3)
{
long lVar1;
long lVar2;
pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
*this_00;
long lVar3;
pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
*ppVar4;
if (param_2 != param_3) {
lVar2 = ((long)param_3 - (long)param_2) / 0x60;
lVar1 = *(long *)this;
ppVar4 = param_2 + lVar2 * 0x60;
lVar3 = -(long)ppVar4;
this_00 = param_2;
for (; ppVar4 != *(pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
**)(this + 8); ppVar4 = ppVar4 + 0x60) {
std::
pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
::~pair(this_00);
std::
pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
::pair(this_00,ppVar4);
this_00 = this_00 + 0x60;
lVar3 = lVar3 + -0x60;
}
std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::resize((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this,-(lVar3 + *(long *)this) / 0x60 - lVar2);
param_2 = param_2 + (*(long *)this - lVar1);
}
return param_2;
}
| |
35,944 | sha256_update | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/sha256.h | static void sha256_update(SHA256_CTX *ctx, const void *_inp, size_t len)
{
size_t n;
const unsigned char *inp = _inp;
ctx->N += len;
if ((len != 0) & ((n = ctx->off) != 0)) {
size_t rem = sizeof(ctx->buf) - n;
if (rem > len) {
sha256_bcopy(ctx->buf + n, inp, len);
ctx->off += len;
return;
} else {
sha256_bcopy(ctx->buf + n, inp, rem);
inp += rem;
len -= rem;
sha256_block_data_order(ctx->h, ctx->buf, 1);
vec_zero(ctx->buf, sizeof(ctx->buf));
ctx->off = 0;
}
}
n = len / sizeof(ctx->buf);
if (n > 0) {
sha256_block_data_order(ctx->h, inp, n);
n *= sizeof(ctx->buf);
inp += n;
len -= n;
}
if (len)
sha256_bcopy(ctx->buf, inp, ctx->off = len);
} | O3 | c | sha256_update:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rdi, %rbx
addq %rdx, 0x20(%rdi)
movq %rsi, %r14
testq %rdx, %rdx
sete %cl
movq 0x68(%rdi), %rax
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x255de
movl $0x40, %r13d
subq %rax, %r13
movq %r12, %r15
leaq (%rbx,%rax), %rdi
addq $0x28, %rdi
subq %r13, %r15
jae 0x255e3
movq %r14, %rsi
movq %r12, %rdx
callq 0x2c7f0
addq %r12, 0x68(%rbx)
jmp 0x2566f
movq %r12, %r15
jmp 0x25620
leaq 0x28(%rbx), %r12
movq %r14, %rsi
movq %r13, %rdx
callq 0x2c7f0
addq %r13, %r14
movl $0x1, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2a440
xorl %eax, %eax
movq $0x0, (%r12,%rax,8)
incq %rax
cmpq $0x8, %rax
jne 0x25607
movq $0x0, 0x68(%rbx)
cmpq $0x40, %r15
jb 0x25646
movq %r15, %rdx
shrq $0x6, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2a440
movq %r15, %rax
andq $-0x40, %rax
addq %rax, %r14
andl $0x3f, %r15d
testq %r15, %r15
je 0x2566f
movq %r15, 0x68(%rbx)
addq $0x28, %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2c7f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| sha256_update:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rdx
mov rbx, rdi
add [rdi+20h], rdx
mov r14, rsi
test rdx, rdx
setz cl
mov rax, [rdi+68h]
test rax, rax
setz dl
or dl, cl
jnz short loc_255DE
mov r13d, 40h ; '@'
sub r13, rax
mov r15, r12
lea rdi, [rbx+rax]
add rdi, 28h ; '('
sub r15, r13
jnb short loc_255E3
mov rsi, r14
mov rdx, r12
call blst_sha256_bcopy
add [rbx+68h], r12
jmp loc_2566F
loc_255DE:
mov r15, r12
jmp short loc_25620
loc_255E3:
lea r12, [rbx+28h]
mov rsi, r14
mov rdx, r13
call blst_sha256_bcopy
add r14, r13
mov edx, 1
mov rdi, rbx
mov rsi, r12
call blst_sha256_block_data_order
xor eax, eax
loc_25607:
mov qword ptr [r12+rax*8], 0
inc rax
cmp rax, 8
jnz short loc_25607
mov qword ptr [rbx+68h], 0
loc_25620:
cmp r15, 40h ; '@'
jb short loc_25646
mov rdx, r15
shr rdx, 6
mov rdi, rbx
mov rsi, r14
call blst_sha256_block_data_order
mov rax, r15
and rax, 0FFFFFFFFFFFFFFC0h
add r14, rax
and r15d, 3Fh
loc_25646:
test r15, r15
jz short loc_2566F
mov [rbx+68h], r15
add rbx, 28h ; '('
mov rdi, rbx
mov rsi, r14
mov rdx, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp blst_sha256_bcopy
loc_2566F:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| sha256_update:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RDX
MOV RBX,RDI
ADD qword ptr [RDI + 0x20],RDX
MOV R14,RSI
TEST RDX,RDX
SETZ CL
MOV RAX,qword ptr [RDI + 0x68]
TEST RAX,RAX
SETZ DL
OR DL,CL
JNZ 0x001255de
MOV R13D,0x40
SUB R13,RAX
MOV R15,R12
LEA RDI,[RBX + RAX*0x1]
ADD RDI,0x28
SUB R15,R13
JNC 0x001255e3
MOV RSI,R14
MOV RDX,R12
CALL 0x0012c7f0
ADD qword ptr [RBX + 0x68],R12
JMP 0x0012566f
LAB_001255de:
MOV R15,R12
JMP 0x00125620
LAB_001255e3:
LEA R12,[RBX + 0x28]
MOV RSI,R14
MOV RDX,R13
CALL 0x0012c7f0
ADD R14,R13
MOV EDX,0x1
MOV RDI,RBX
MOV RSI,R12
CALL 0x0012a440
XOR EAX,EAX
LAB_00125607:
MOV qword ptr [R12 + RAX*0x8],0x0
INC RAX
CMP RAX,0x8
JNZ 0x00125607
MOV qword ptr [RBX + 0x68],0x0
LAB_00125620:
CMP R15,0x40
JC 0x00125646
MOV RDX,R15
SHR RDX,0x6
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012a440
MOV RAX,R15
AND RAX,-0x40
ADD R14,RAX
AND R15D,0x3f
LAB_00125646:
TEST R15,R15
JZ 0x0012566f
MOV qword ptr [RBX + 0x68],R15
ADD RBX,0x28
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0012c7f0
LAB_0012566f:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void sha256_update(long param_1,long param_2,ulong param_3)
{
long lVar1;
ulong uVar2;
*(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + param_3;
lVar1 = *(long *)(param_1 + 0x68);
if (lVar1 != 0 && param_3 != 0) {
uVar2 = 0x40 - lVar1;
lVar1 = param_1 + lVar1 + 0x28;
if (param_3 < uVar2) {
blst_sha256_bcopy(lVar1,param_2,param_3);
*(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + param_3;
return;
}
blst_sha256_bcopy(lVar1,param_2,uVar2);
param_2 = param_2 + uVar2;
blst_sha256_block_data_order(param_1,param_1 + 0x28,1);
lVar1 = 0;
do {
*(int8 *)(param_1 + 0x28 + lVar1 * 8) = 0;
lVar1 = lVar1 + 1;
} while (lVar1 != 8);
*(int8 *)(param_1 + 0x68) = 0;
param_3 = param_3 - uVar2;
}
if (0x3f < param_3) {
blst_sha256_block_data_order(param_1,param_2,param_3 >> 6);
param_2 = param_2 + (param_3 & 0xffffffffffffffc0);
param_3 = (ulong)((uint)param_3 & 0x3f);
}
if (param_3 == 0) {
return;
}
*(ulong *)(param_1 + 0x68) = param_3;
blst_sha256_bcopy(param_1 + 0x28,param_2,param_3);
return;
}
| ||
35,945 | my_uca_scanner_next_implicit | eloqsql/strings/ctype-uca.c | static inline int
my_uca_scanner_next_implicit(my_uca_scanner *scanner)
{
switch (scanner->level->levelno) {
case 0: return my_uca_scanner_next_implicit_primary(scanner);/* Primary level*/
case 1: scanner->wbeg= nochar; return 0x0020; /* Secondary level */
case 2: scanner->wbeg= nochar; return 0x0002; /* Tertiary level */
default: scanner->wbeg= nochar; break;
}
DBUG_ASSERT(0);
return 0;
} | O0 | c | my_uca_scanner_next_implicit:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x30(%rax), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x53424
jmp 0x53410
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x53432
jmp 0x5341a
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x53449
jmp 0x53460
movq -0x10(%rbp), %rdi
callq 0x53770
movl %eax, -0x4(%rbp)
jmp 0x53479
movq -0x10(%rbp), %rax
leaq 0x15f243(%rip), %rcx # 0x1b2680
movq %rcx, (%rax)
movl $0x20, -0x4(%rbp)
jmp 0x53479
movq -0x10(%rbp), %rax
leaq 0x15f22c(%rip), %rcx # 0x1b2680
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x53479
movq -0x10(%rbp), %rax
leaq 0x15f215(%rip), %rcx # 0x1b2680
movq %rcx, (%rax)
jmp 0x53470
jmp 0x53472
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uca_scanner_next_implicit:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov eax, [rax+30h]
mov [rbp+var_14], eax
test eax, eax
jz short loc_53424
jmp short $+2
loc_53410:
mov eax, [rbp+var_14]
sub eax, 1
jz short loc_53432
jmp short $+2
loc_5341A:
mov eax, [rbp+var_14]
sub eax, 2
jz short loc_53449
jmp short loc_53460
loc_53424:
mov rdi, [rbp+var_10]
call my_uca_scanner_next_implicit_primary
mov [rbp+var_4], eax
jmp short loc_53479
loc_53432:
mov rax, [rbp+var_10]
lea rcx, nochar
mov [rax], rcx
mov [rbp+var_4], 20h ; ' '
jmp short loc_53479
loc_53449:
mov rax, [rbp+var_10]
lea rcx, nochar
mov [rax], rcx
mov [rbp+var_4], 2
jmp short loc_53479
loc_53460:
mov rax, [rbp+var_10]
lea rcx, nochar
mov [rax], rcx
jmp short $+2
loc_53470:
jmp short $+2
loc_53472:
mov [rbp+var_4], 0
loc_53479:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long my_uca_scanner_next_implicit(_QWORD *a1)
{
int v2; // [rsp+Ch] [rbp-14h]
v2 = *(_DWORD *)(a1[3] + 48LL);
if ( v2 )
{
if ( v2 == 1 )
{
*a1 = &nochar;
return 32;
}
else
{
*a1 = &nochar;
if ( v2 == 2 )
return 2;
else
return 0;
}
}
else
{
return (unsigned int)my_uca_scanner_next_implicit_primary(a1);
}
}
| my_uca_scanner_next_implicit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [RAX + 0x30]
MOV dword ptr [RBP + -0x14],EAX
TEST EAX,EAX
JZ 0x00153424
JMP 0x00153410
LAB_00153410:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
JZ 0x00153432
JMP 0x0015341a
LAB_0015341a:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x2
JZ 0x00153449
JMP 0x00153460
LAB_00153424:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00153770
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00153479
LAB_00153432:
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2b2680]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x20
JMP 0x00153479
LAB_00153449:
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2b2680]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00153479
LAB_00153460:
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2b2680]
MOV qword ptr [RAX],RCX
JMP 0x00153470
LAB_00153470:
JMP 0x00153472
LAB_00153472:
MOV dword ptr [RBP + -0x4],0x0
LAB_00153479:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 my_uca_scanner_next_implicit(int8 *param_1)
{
int iVar1;
int4 local_c;
iVar1 = *(int *)(param_1[3] + 0x30);
if (iVar1 == 0) {
local_c = my_uca_scanner_next_implicit_primary(param_1);
}
else if (iVar1 == 1) {
*param_1 = &nochar;
local_c = 0x20;
}
else if (iVar1 == 2) {
*param_1 = &nochar;
local_c = 2;
}
else {
*param_1 = &nochar;
local_c = 0;
}
return local_c;
}
| |
35,946 | my_casedn_ucs2 | eloqsql/strings/ctype-ucs2.c | static size_t my_casedn_ucs2(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= my_ucs2_uni(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0)
{
my_tolower_ucs2(uni_plane, &wc);
if (res != my_uni_ucs2(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O3 | c | my_casedn_ucs2:
movq %rdx, %rax
cmpq $0x2, %rdx
jl 0xc5366
pushq %rbp
movq %rsp, %rbp
leaq (%rsi,%rax), %rdx
addq %rcx, %r8
movq 0x78(%rdi), %rdi
addq $0x2, %rcx
movzbl (%rsi), %r9d
movzbl 0x1(%rsi), %r10d
movq 0x8(%rdi), %r11
movq (%r11,%r9,8), %r11
testq %r11, %r11
je 0xc532d
leaq (%r10,%r10,2), %r9
movl 0x4(%r11,%r9,4), %r9d
jmp 0xc5334
shll $0x8, %r9d
orq %r10, %r9
cmpq %r8, %rcx
ja 0xc5365
cmpl $0xffff, %r9d # imm = 0xFFFF
ja 0xc5365
rolw $0x8, %r9w
movw %r9w, -0x2(%rcx)
leaq 0x2(%rsi), %r9
cmpq %rdx, %r9
jae 0xc5365
addq $0x4, %rsi
addq $0x2, %rcx
cmpq %rdx, %rsi
movq %r9, %rsi
jbe 0xc530c
popq %rbp
retq
| my_casedn_ucs2:
mov rax, rdx
cmp rdx, 2
jl short locret_C5366
push rbp
mov rbp, rsp
lea rdx, [rsi+rax]
add r8, rcx
mov rdi, [rdi+78h]
add rcx, 2
loc_C530C:
movzx r9d, byte ptr [rsi]
movzx r10d, byte ptr [rsi+1]
mov r11, [rdi+8]
mov r11, [r11+r9*8]
test r11, r11
jz short loc_C532D
lea r9, [r10+r10*2]
mov r9d, [r11+r9*4+4]
jmp short loc_C5334
loc_C532D:
shl r9d, 8
or r9, r10
loc_C5334:
cmp rcx, r8
ja short loc_C5365
cmp r9d, 0FFFFh
ja short loc_C5365
rol r9w, 8
mov [rcx-2], r9w
lea r9, [rsi+2]
cmp r9, rdx
jnb short loc_C5365
add rsi, 4
add rcx, 2
cmp rsi, rdx
mov rsi, r9
jbe short loc_C530C
loc_C5365:
pop rbp
locret_C5366:
retn
| long long my_casedn_ucs2(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5)
{
long long result; // rax
unsigned long long v6; // rdx
unsigned long long v7; // r8
long long v8; // rdi
unsigned long long v9; // rcx
long long v10; // r9
long long v11; // r10
long long v12; // r11
unsigned int v13; // r9d
bool v14; // cc
result = a3;
if ( a3 >= 2 )
{
v6 = (unsigned long long)&a2[a3];
v7 = a4 + a5;
v8 = *(_QWORD *)(a1 + 120);
v9 = a4 + 2;
do
{
v10 = *a2;
v11 = a2[1];
v12 = *(_QWORD *)(*(_QWORD *)(v8 + 8) + 8 * v10);
if ( v12 )
v13 = *(_DWORD *)(v12 + 12 * v11 + 4);
else
v13 = v11 | ((_DWORD)v10 << 8);
if ( v9 > v7 )
break;
if ( v13 > 0xFFFF )
break;
*(_WORD *)(v9 - 2) = __ROL2__(v13, 8);
if ( (unsigned long long)(a2 + 2) >= v6 )
break;
v9 += 2LL;
v14 = (unsigned long long)(a2 + 4) <= v6;
a2 += 2;
}
while ( v14 );
}
return result;
}
| my_casedn_ucs2:
MOV RAX,RDX
CMP RDX,0x2
JL 0x001c5366
PUSH RBP
MOV RBP,RSP
LEA RDX,[RSI + RAX*0x1]
ADD R8,RCX
MOV RDI,qword ptr [RDI + 0x78]
ADD RCX,0x2
LAB_001c530c:
MOVZX R9D,byte ptr [RSI]
MOVZX R10D,byte ptr [RSI + 0x1]
MOV R11,qword ptr [RDI + 0x8]
MOV R11,qword ptr [R11 + R9*0x8]
TEST R11,R11
JZ 0x001c532d
LEA R9,[R10 + R10*0x2]
MOV R9D,dword ptr [R11 + R9*0x4 + 0x4]
JMP 0x001c5334
LAB_001c532d:
SHL R9D,0x8
OR R9,R10
LAB_001c5334:
CMP RCX,R8
JA 0x001c5365
CMP R9D,0xffff
JA 0x001c5365
ROL R9W,0x8
MOV word ptr [RCX + -0x2],R9W
LEA R9,[RSI + 0x2]
CMP R9,RDX
JNC 0x001c5365
ADD RSI,0x4
ADD RCX,0x2
CMP RSI,RDX
MOV RSI,R9
JBE 0x001c530c
LAB_001c5365:
POP RBP
LAB_001c5366:
RET
|
void my_casedn_ucs2(long param_1,byte *param_2,long param_3,long param_4,long param_5)
{
long lVar1;
long lVar2;
ulong uVar3;
byte *pbVar4;
byte *pbVar5;
uint uVar6;
if (1 < param_3) {
lVar1 = *(long *)(param_1 + 0x78);
uVar3 = param_4 + 2;
pbVar4 = param_2;
while( true ) {
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (ulong)*pbVar4 * 8);
if (lVar2 == 0) {
uVar6 = (uint)CONCAT11(*pbVar4,pbVar4[1]);
}
else {
uVar6 = *(uint *)(lVar2 + 4 + (ulong)pbVar4[1] * 0xc);
}
if (((ulong)(param_5 + param_4) < uVar3) || (0xffff < uVar6)) break;
*(ushort *)(uVar3 - 2) = (ushort)uVar6 << 8 | (ushort)uVar6 >> 8;
if (param_2 + param_3 <= pbVar4 + 2) {
return;
}
pbVar5 = pbVar4 + 4;
uVar3 = uVar3 + 2;
pbVar4 = pbVar4 + 2;
if (param_2 + param_3 < pbVar5) {
return;
}
}
}
return;
}
| |
35,947 | cs_enter | eloqsql/strings/ctype.c | static int cs_enter(MY_XML_PARSER *st,const char *attr, size_t len)
{
struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data;
const struct my_cs_file_section_st *s= cs_file_sec(attr,len);
int state= s ? s->state : 0;
switch (state) {
case 0:
i->loader->reporter(WARNING_LEVEL, "Unknown LDML tag: '%.*s'", len, attr);
break;
case _CS_CHARSET:
my_charset_file_reset_charset(i);
break;
case _CS_COLLATION:
my_charset_file_reset_collation(i);
break;
case _CS_RESET:
return tailoring_append(st, " &", 0, NULL);
default:
break;
}
return MY_XML_OK;
} | O3 | c | cs_enter:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq 0x140(%rdi), %rbx
leaq 0x29a455(%rip), %r13 # 0x2ee550
leaq 0x8603(%rip), %r12 # 0x5c705
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x24130
testl %eax, %eax
jne 0x5411b
cmpb $0x0, (%r12,%r15)
je 0x5415b
movq 0x18(%r13), %r12
addq $0x10, %r13
testq %r12, %r12
jne 0x54102
movq 0x7a8(%rbx), %r8
leaq 0xae3d(%rip), %rsi # 0x5ef73
movl $0x1, %edi
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq *0xa0(%r8)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl (%r13), %eax
cmpl $0x8, %eax
jg 0x54185
testl %eax, %eax
je 0x54128
cmpl $0x8, %eax
jne 0x5414a
addq $0x6e0, %rbx # imm = 0x6E0
movl $0xc8, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x24170
jmp 0x5414a
cmpl $0x9, %eax
je 0x541b2
cmpl $0x12d, %eax # imm = 0x12D
jne 0x5414a
leaq 0xadf4(%rip), %rsi # 0x5ef8c
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x55354
movq $0x0, 0x690(%rbx)
movb $0x0, 0x6a0(%rbx)
jmp 0x5414a
| cs_enter:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r14, rsi
mov rbx, [rdi+140h]
lea r13, sec
lea r12, aIndexXml+6; "xml"
loc_54102:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _strncmp
test eax, eax
jnz short loc_5411B
cmp byte ptr [r12+r15], 0
jz short loc_5415B
loc_5411B:
mov r12, [r13+18h]
add r13, 10h
test r12, r12
jnz short loc_54102
loc_54128:
mov r8, [rbx+7A8h]
lea rsi, aUnknownLdmlTag; "Unknown LDML tag: '%.*s'"
mov edi, 1
mov rdx, r15
mov rcx, r14
xor eax, eax
call qword ptr [r8+0A0h]
loc_5414A:
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5415B:
mov eax, [r13+0]
cmp eax, 8
jg short loc_54185
test eax, eax
jz short loc_54128
cmp eax, 8
jnz short loc_5414A
add rbx, 6E0h
mov edx, 0C8h
mov rdi, rbx
xor esi, esi
call _memset
jmp short loc_5414A
loc_54185:
cmp eax, 9
jz short loc_541B2
cmp eax, 12Dh
jnz short loc_5414A
lea rsi, asc_5EF8C; " &"
mov rdi, rbx
xor edx, edx
xor ecx, ecx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp tailoring_append
loc_541B2:
mov qword ptr [rbx+690h], 0
mov byte ptr [rbx+6A0h], 0
jmp short loc_5414A
| long long cs_enter(long long a1, const char *a2, long long a3)
{
long long v4; // rbx
char *v5; // r13
char *v6; // r12
int v8; // eax
v4 = *(_QWORD *)(a1 + 320);
v5 = (char *)&sec;
v6 = "xml";
while ( (unsigned int)strncmp(a2, v6, a3) || v6[a3] )
{
v6 = (char *)*((_QWORD *)v5 + 3);
v5 += 16;
if ( !v6 )
goto LABEL_5;
}
v8 = *(_DWORD *)v5;
if ( *(int *)v5 <= 8 )
{
if ( v8 )
{
if ( v8 == 8 )
memset(v4 + 1760, 0LL, 200LL);
}
else
{
LABEL_5:
(*(void (**)(long long, const char *, ...))(*(_QWORD *)(v4 + 1960) + 160LL))(
1LL,
"Unknown LDML tag: '%.*s'",
a3,
a2);
}
return 0LL;
}
if ( v8 == 9 )
{
*(_QWORD *)(v4 + 1680) = 0LL;
*(_BYTE *)(v4 + 1696) = 0;
return 0LL;
}
if ( v8 != 301 )
return 0LL;
return tailoring_append(v4, " &", 0LL, 0LL);
}
| cs_enter:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R14,RSI
MOV RBX,qword ptr [RDI + 0x140]
LEA R13,[0x3ee550]
LEA R12,[0x15c705]
LAB_00154102:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00124130
TEST EAX,EAX
JNZ 0x0015411b
CMP byte ptr [R12 + R15*0x1],0x0
JZ 0x0015415b
LAB_0015411b:
MOV R12,qword ptr [R13 + 0x18]
ADD R13,0x10
TEST R12,R12
JNZ 0x00154102
LAB_00154128:
MOV R8,qword ptr [RBX + 0x7a8]
LEA RSI,[0x15ef73]
MOV EDI,0x1
MOV RDX,R15
MOV RCX,R14
XOR EAX,EAX
CALL qword ptr [R8 + 0xa0]
LAB_0015414a:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015415b:
MOV EAX,dword ptr [R13]
CMP EAX,0x8
JG 0x00154185
TEST EAX,EAX
JZ 0x00154128
CMP EAX,0x8
JNZ 0x0015414a
ADD RBX,0x6e0
MOV EDX,0xc8
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00124170
JMP 0x0015414a
LAB_00154185:
CMP EAX,0x9
JZ 0x001541b2
CMP EAX,0x12d
JNZ 0x0015414a
LEA RSI,[0x15ef8c]
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00155354
LAB_001541b2:
MOV qword ptr [RBX + 0x690],0x0
MOV byte ptr [RBX + 0x6a0],0x0
JMP 0x0015414a
|
int8 cs_enter(long param_1,char *param_2,size_t param_3)
{
long lVar1;
int iVar2;
int8 uVar3;
char *__s2;
int *piVar4;
lVar1 = *(long *)(param_1 + 0x140);
piVar4 = &sec;
__s2 = "xml";
while ((iVar2 = strncmp(param_2,__s2,param_3), iVar2 != 0 || (__s2[param_3] != '\0'))) {
__s2 = *(char **)(piVar4 + 6);
piVar4 = piVar4 + 4;
if (__s2 == (char *)0x0) {
LAB_00154128:
(**(code **)(*(long *)(lVar1 + 0x7a8) + 0xa0))(1,"Unknown LDML tag: \'%.*s\'",param_3,param_2)
;
return 0;
}
}
iVar2 = *piVar4;
if (8 < iVar2) {
if (iVar2 == 9) {
*(int8 *)(lVar1 + 0x690) = 0;
*(int1 *)(lVar1 + 0x6a0) = 0;
return 0;
}
if (iVar2 != 0x12d) {
return 0;
}
uVar3 = tailoring_append(lVar1,&DAT_0015ef8c,0,0);
return uVar3;
}
if (iVar2 != 0) {
if (iVar2 != 8) {
return 0;
}
memset((void *)(lVar1 + 0x6e0),0,200);
return 0;
}
goto LAB_00154128;
}
| |
35,948 | mju_subQuat | aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_util_spatial.c | void mju_subQuat(mjtNum res[3], const mjtNum qa[4], const mjtNum qb[4]) {
// qdif = neg(qb)*qa
mjtNum qneg[4], qdif[4];
mju_negQuat(qneg, qb);
mju_mulQuat(qdif, qneg, qa);
// convert to 3D velocity
mju_quat2Vel(res, qdif, 1);
} | O3 | c | mju_subQuat:
subq $0x28, %rsp
vmovddup 0x11813c(%rip), %xmm0 # xmm0 = mem[0,0]
vmovsd 0x8(%rdx), %xmm1
vmovsd 0x10(%rdx), %xmm2
vxorpd %xmm0, %xmm1, %xmm3
vxorpd %xmm0, %xmm2, %xmm4
vmovupd (%rsi), %ymm5
vperm2f128 $0x1, %ymm5, %ymm5, %ymm6 # ymm6 = ymm5[2,3,0,1]
vunpcklpd %xmm3, %xmm1, %xmm1 # xmm1 = xmm1[0],xmm3[0]
vinsertf128 $0x1, %xmm1, %ymm1, %ymm1
vshufpd $0x5, %ymm5, %ymm5, %ymm3 # ymm3 = ymm5[1,0,3,2]
vmulpd %ymm1, %ymm3, %ymm1
vbroadcastsd (%rdx), %ymm3
vshufpd $0x5, %ymm6, %ymm6, %ymm7 # ymm7 = ymm6[1,0,3,2]
vmulpd %ymm5, %ymm3, %ymm3
vaddpd %ymm1, %ymm3, %ymm1
vunpcklpd %xmm2, %xmm4, %xmm3 # xmm3 = xmm4[0],xmm2[0]
vunpcklpd %xmm4, %xmm2, %xmm2 # xmm2 = xmm2[0],xmm4[0]
vinsertf128 $0x1, %xmm3, %ymm2, %ymm2
vmulpd %ymm6, %ymm2, %ymm2
vaddpd %ymm1, %ymm2, %ymm1
vmovddup 0x18(%rdx), %xmm2 # xmm2 = mem[0,0]
vxorpd %xmm0, %xmm2, %xmm0
vinsertf128 $0x1, %xmm0, %ymm2, %ymm0
vshufpd $0xc, %ymm0, %ymm0, %ymm0 # ymm0 = ymm0[0,0,3,3]
vmulpd %ymm7, %ymm0, %ymm0
vaddpd %ymm1, %ymm0, %ymm0
movq %rsp, %rsi
vmovupd %ymm0, (%rsi)
vmovsd 0x1180ea(%rip), %xmm0 # 0x1bcbd0
vzeroupper
callq 0x2d660
addq $0x28, %rsp
retq
| mju_subQuat:
sub rsp, 28h
vmovddup xmm0, cs:qword_1BCBA0
vmovsd xmm1, qword ptr [rdx+8]
vmovsd xmm2, qword ptr [rdx+10h]
vxorpd xmm3, xmm1, xmm0
vxorpd xmm4, xmm2, xmm0
vmovupd ymm5, ymmword ptr [rsi]
vperm2f128 ymm6, ymm5, ymm5, 1
vunpcklpd xmm1, xmm1, xmm3
vinsertf128 ymm1, ymm1, xmm1, 1
vshufpd ymm3, ymm5, ymm5, 5
vmulpd ymm1, ymm3, ymm1
vbroadcastsd ymm3, qword ptr [rdx]
vshufpd ymm7, ymm6, ymm6, 5
vmulpd ymm3, ymm3, ymm5
vaddpd ymm1, ymm3, ymm1
vunpcklpd xmm3, xmm4, xmm2
vunpcklpd xmm2, xmm2, xmm4
vinsertf128 ymm2, ymm2, xmm3, 1
vmulpd ymm2, ymm2, ymm6
vaddpd ymm1, ymm2, ymm1
vmovddup xmm2, qword ptr [rdx+18h]
vxorpd xmm0, xmm2, xmm0
vinsertf128 ymm0, ymm2, xmm0, 1
vshufpd ymm0, ymm0, ymm0, 0Ch
vmulpd ymm0, ymm0, ymm7
vaddpd ymm0, ymm0, ymm1
mov rsi, rsp
vmovupd ymmword ptr [rsi], ymm0
vmovsd xmm0, cs:qword_1BCBD0
vzeroupper
call _mju_quat2Vel
add rsp, 28h
retn
| double mju_subQuat(long long a1, long long _RSI, long long _RDX, long long a4, long long a5)
{
_BYTE v36[40]; // [rsp+0h] [rbp-28h] BYREF
__asm
{
vmovddup xmm0, cs:qword_1BCBA0
vmovsd xmm1, qword ptr [rdx+8]
vmovsd xmm2, qword ptr [rdx+10h]
vxorpd xmm3, xmm1, xmm0
vxorpd xmm4, xmm2, xmm0
vmovupd ymm5, ymmword ptr [rsi]
vperm2f128 ymm6, ymm5, ymm5, 1
vunpcklpd xmm1, xmm1, xmm3
vinsertf128 ymm1, ymm1, xmm1, 1
vshufpd ymm3, ymm5, ymm5, 5
vmulpd ymm1, ymm3, ymm1
vbroadcastsd ymm3, qword ptr [rdx]
vshufpd ymm7, ymm6, ymm6, 5
vmulpd ymm3, ymm3, ymm5
vaddpd ymm1, ymm3, ymm1
vunpcklpd xmm3, xmm4, xmm2
vunpcklpd xmm2, xmm2, xmm4
vinsertf128 ymm2, ymm2, xmm3, 1
vmulpd ymm2, ymm2, ymm6
vaddpd ymm1, ymm2, ymm1
vmovddup xmm2, qword ptr [rdx+18h]
vxorpd xmm0, xmm2, xmm0
vinsertf128 ymm0, ymm2, xmm0, 1
vshufpd ymm0, ymm0, ymm0, 0Ch
vmulpd ymm0, ymm0, ymm7
vaddpd ymm0, ymm0, ymm1
}
_RSI = v36;
__asm
{
vmovupd ymmword ptr [rsi], ymm0
vmovsd xmm0, cs:qword_1BCBD0
vzeroupper
}
return mju_quat2Vel(a1, v36, _RDX, a4, a5, *(double *)&_XMM0);
}
| mju_subQuat:
SUB RSP,0x28
VMOVDDUP XMM0,qword ptr [0x002bcba0]
VMOVSD XMM1,qword ptr [RDX + 0x8]
VMOVSD XMM2,qword ptr [RDX + 0x10]
VXORPD XMM3,XMM1,XMM0
VXORPD XMM4,XMM2,XMM0
VMOVUPD YMM5,ymmword ptr [RSI]
VPERM2F128 YMM6,YMM5,YMM5,0x1
VUNPCKLPD XMM1,XMM1,XMM3
VINSERTF128 YMM1,YMM1,XMM1,0x1
VSHUFPD YMM3,YMM5,YMM5,0x5
VMULPD YMM1,YMM3,YMM1
VBROADCASTSD YMM3,qword ptr [RDX]
VSHUFPD YMM7,YMM6,YMM6,0x5
VMULPD YMM3,YMM3,YMM5
VADDPD YMM1,YMM3,YMM1
VUNPCKLPD XMM3,XMM4,XMM2
VUNPCKLPD XMM2,XMM2,XMM4
VINSERTF128 YMM2,YMM2,XMM3,0x1
VMULPD YMM2,YMM2,YMM6
VADDPD YMM1,YMM2,YMM1
VMOVDDUP XMM2,qword ptr [RDX + 0x18]
VXORPD XMM0,XMM2,XMM0
VINSERTF128 YMM0,YMM2,XMM0,0x1
VSHUFPD YMM0,YMM0,YMM0,0xc
VMULPD YMM0,YMM0,YMM7
VADDPD YMM0,YMM0,YMM1
MOV RSI,RSP
VMOVUPD ymmword ptr [RSI],YMM0
VMOVSD XMM0,qword ptr [0x002bcbd0]
VZEROUPPER
CALL 0x0012d660
ADD RSP,0x28
RET
|
void mju_subQuat(int8 param_1,int1 (*param_2) [32],long param_3)
{
ulong uVar1;
int1 auVar2 [32];
int1 auVar3 [32];
int1 auVar4 [16];
int1 auVar5 [16];
int1 auVar6 [16];
int1 auVar7 [16];
auVar4._8_8_ = 0;
auVar4._0_8_ = *(ulong *)(param_3 + 8);
auVar5._8_8_ = 0;
auVar5._0_8_ = *(ulong *)(param_3 + 0x10);
auVar6._0_8_ = *(ulong *)(param_3 + 8) ^ DAT_002bcba0;
auVar6._8_8_ = DAT_002bcba0;
auVar7._0_8_ = *(ulong *)(param_3 + 0x10) ^ DAT_002bcba0;
auVar7._8_8_ = DAT_002bcba0;
auVar3 = *param_2;
auVar2 = vperm2f128_avx(auVar3,auVar3,1);
vunpcklpd_avx(auVar4,auVar6);
vshufpd_avx(auVar3,auVar3,5);
vshufpd_avx(auVar2,auVar2,5);
vunpcklpd_avx(auVar7,auVar5);
vunpcklpd_avx(auVar5,auVar7);
uVar1 = *(ulong *)(param_3 + 0x18);
auVar3._8_8_ = uVar1;
auVar3._0_8_ = uVar1;
auVar3._24_8_ = uVar1 ^ DAT_002bcba0;
auVar3._16_8_ = uVar1 ^ DAT_002bcba0;
vshufpd_avx(auVar3,auVar3,0xc);
mju_quat2Vel();
return;
}
| |
35,949 | mysql_stmt_send_long_data_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_stmt_send_long_data_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_stmt_send_long_data,
(parms->stmt, parms->param_number, parms->data, parms->length),
parms->stmt->mysql,
my_bool,
r_my_bool)
} | O3 | c | mysql_stmt_send_long_data_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x38(%rax), %rcx
movq 0x480(%rcx), %rcx
movq 0x28(%rcx), %rbx
movl 0x8(%rdi), %esi
movq 0x10(%rdi), %rdx
movq 0x18(%rdi), %rcx
movq %rax, %rdi
callq 0x17980
movb %al, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_stmt_send_long_data_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi]
mov rcx, [rax+38h]
mov rcx, [rcx+480h]
mov rbx, [rcx+28h]
mov esi, [rdi+8]
mov rdx, [rdi+10h]
mov rcx, [rdi+18h]
mov rdi, rax
call _mysql_stmt_send_long_data@libmariadbclient_18
mov [rbx+8], al
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_stmt_send_long_data_start_internal(long long a1)
{
long long v1; // rbx
long long result; // rax
v1 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 56LL) + 1152LL) + 40LL);
result = mysql_stmt_send_long_data_libmariadbclient_18(
*(_QWORD *)a1,
*(_DWORD *)(a1 + 8),
*(_QWORD *)(a1 + 16),
*(_QWORD *)(a1 + 24));
*(_BYTE *)(v1 + 8) = result;
*(_DWORD *)v1 = 0;
return result;
}
| mysql_stmt_send_long_data_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RAX + 0x38]
MOV RCX,qword ptr [RCX + 0x480]
MOV RBX,qword ptr [RCX + 0x28]
MOV ESI,dword ptr [RDI + 0x8]
MOV RDX,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RDI + 0x18]
MOV RDI,RAX
CALL 0x00117980
MOV byte ptr [RBX + 0x8],AL
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_stmt_send_long_data_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28);
uVar2 = mysql_stmt_send_long_data(*param_1,(int)param_1[1],param_1[2],param_1[3]);
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
35,950 | js_finrec_finalizer | bluesky950520[P]quickjs/quickjs.c | static void js_finrec_finalizer(JSRuntime *rt, JSValue val)
{
JSFinalizationRegistryData *frd = JS_GetOpaque(val, JS_CLASS_FINALIZATION_REGISTRY);
if (frd) {
struct list_head *el, *el1;
/* first pass to remove the weak ref entries and avoid having them modified
by freeing a token / held value. */
list_for_each_safe(el, el1, &frd->entries) {
JSFinRecEntry *fre = list_entry(el, JSFinRecEntry, link);
delete_finrec_weakref(rt, fre);
}
/* second pass to actually free all objects. */
list_for_each_safe(el, el1, &frd->entries) {
JSFinRecEntry *fre = list_entry(el, JSFinRecEntry, link);
list_del(&fre->link);
JS_FreeValueRT(rt, fre->held_val);
JS_FreeValueRT(rt, fre->token);
js_free_rt(rt, fre);
}
JS_FreeValueRT(rt, frd->cb);
js_free_rt(rt, frd);
}
} | O2 | c | js_finrec_finalizer:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $-0x1, %edx
jne 0x72a0f
cmpw $0x3b, 0x6(%rsi)
jne 0x72a0f
movq 0x30(%rsi), %r14
testq %r14, %r14
je 0x72a0f
movq %rdi, %rbx
movq 0x8(%r14), %rsi
cmpq %r14, %rsi
je 0x72a1b
movq 0x8(%rsi), %r15
movq %rbx, %rdi
callq 0x72b12
movq %r15, %rsi
jmp 0x729f9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%r14), %r15
cmpq %r14, %r15
je 0x72a6a
movq (%r15), %rax
movq 0x8(%r15), %r12
movq %r12, 0x8(%rax)
movq %rax, (%r12)
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq 0x30(%r15), %rsi
movq 0x38(%r15), %rdx
movq %rbx, %rdi
callq 0x1bbe1
movq 0x40(%r15), %rsi
movq 0x48(%r15), %rdx
movq %rbx, %rdi
callq 0x1bbe1
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1ac7b
movq %r12, %r15
jmp 0x72a1f
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdx
movq %rbx, %rdi
callq 0x1bbe1
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1ac7b
| js_finrec_finalizer:
push r15
push r14
push r12
push rbx
push rax
cmp edx, 0FFFFFFFFh
jnz short loc_72A0F
cmp word ptr [rsi+6], 3Bh ; ';'
jnz short loc_72A0F
mov r14, [rsi+30h]
test r14, r14
jz short loc_72A0F
mov rbx, rdi
mov rsi, [r14+8]
loc_729F9:
cmp rsi, r14
jz short loc_72A1B
mov r15, [rsi+8]
mov rdi, rbx
call delete_finrec_weakref
mov rsi, r15
jmp short loc_729F9
loc_72A0F:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_72A1B:
mov r15, [r14+8]
loc_72A1F:
cmp r15, r14
jz short loc_72A6A
mov rax, [r15]
mov r12, [r15+8]
mov [rax+8], r12
mov [r12], rax
xorps xmm0, xmm0
movups xmmword ptr [r15], xmm0
mov rsi, [r15+30h]
mov rdx, [r15+38h]
mov rdi, rbx
call JS_FreeValueRT
mov rsi, [r15+40h]
mov rdx, [r15+48h]
mov rdi, rbx
call JS_FreeValueRT
mov rdi, rbx
mov rsi, r15
call js_free_rt
mov r15, r12
jmp short loc_72A1F
loc_72A6A:
mov rsi, [r14+18h]
mov rdx, [r14+20h]
mov rdi, rbx
call JS_FreeValueRT
mov rdi, rbx
mov rsi, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp js_free_rt
| long long js_finrec_finalizer(long long a1, long long a2, int a3)
{
long long v3; // r14
long long i; // rsi
long long v5; // r15
long long j; // r15
long long v7; // rax
_QWORD *v8; // r12
long long result; // rax
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 59 )
{
v3 = *(_QWORD *)(a2 + 48);
if ( v3 )
{
for ( i = *(_QWORD *)(v3 + 8); i != v3; i = v5 )
{
v5 = *(_QWORD *)(i + 8);
delete_finrec_weakref(a1);
}
for ( j = *(_QWORD *)(v3 + 8); j != v3; j = (long long)v8 )
{
v7 = *(_QWORD *)j;
v8 = *(_QWORD **)(j + 8);
*(_QWORD *)(v7 + 8) = v8;
*v8 = v7;
*(_OWORD *)j = 0LL;
JS_FreeValueRT(a1, *(unsigned int **)(j + 48), *(_QWORD *)(j + 56));
JS_FreeValueRT(a1, *(unsigned int **)(j + 64), *(_QWORD *)(j + 72));
js_free_rt(a1, j);
}
JS_FreeValueRT(a1, *(unsigned int **)(v3 + 24), *(_QWORD *)(v3 + 32));
return js_free_rt(a1, v3);
}
}
return result;
}
| js_finrec_finalizer:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
CMP EDX,-0x1
JNZ 0x00172a0f
CMP word ptr [RSI + 0x6],0x3b
JNZ 0x00172a0f
MOV R14,qword ptr [RSI + 0x30]
TEST R14,R14
JZ 0x00172a0f
MOV RBX,RDI
MOV RSI,qword ptr [R14 + 0x8]
LAB_001729f9:
CMP RSI,R14
JZ 0x00172a1b
MOV R15,qword ptr [RSI + 0x8]
MOV RDI,RBX
CALL 0x00172b12
MOV RSI,R15
JMP 0x001729f9
LAB_00172a0f:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00172a1b:
MOV R15,qword ptr [R14 + 0x8]
LAB_00172a1f:
CMP R15,R14
JZ 0x00172a6a
MOV RAX,qword ptr [R15]
MOV R12,qword ptr [R15 + 0x8]
MOV qword ptr [RAX + 0x8],R12
MOV qword ptr [R12],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15],XMM0
MOV RSI,qword ptr [R15 + 0x30]
MOV RDX,qword ptr [R15 + 0x38]
MOV RDI,RBX
CALL 0x0011bbe1
MOV RSI,qword ptr [R15 + 0x40]
MOV RDX,qword ptr [R15 + 0x48]
MOV RDI,RBX
CALL 0x0011bbe1
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011ac7b
MOV R15,R12
JMP 0x00172a1f
LAB_00172a6a:
MOV RSI,qword ptr [R14 + 0x18]
MOV RDX,qword ptr [R14 + 0x20]
MOV RDI,RBX
CALL 0x0011bbe1
MOV RDI,RBX
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x0011ac7b
|
void js_finrec_finalizer(int8 param_1,long param_2,int param_3)
{
long *plVar1;
long lVar2;
long *plVar3;
long *plVar4;
if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0x3b)) &&
(plVar1 = *(long **)(param_2 + 0x30), plVar1 != (long *)0x0)) {
plVar4 = (long *)plVar1[1];
while (plVar4 != plVar1) {
plVar4 = (long *)plVar4[1];
delete_finrec_weakref(param_1);
}
plVar4 = (long *)plVar1[1];
while (plVar4 != plVar1) {
lVar2 = *plVar4;
plVar3 = (long *)plVar4[1];
*(long **)(lVar2 + 8) = plVar3;
*plVar3 = lVar2;
*plVar4 = 0;
plVar4[1] = 0;
JS_FreeValueRT(param_1,plVar4[6],plVar4[7]);
JS_FreeValueRT(param_1,plVar4[8],plVar4[9]);
js_free_rt(param_1,plVar4);
plVar4 = plVar3;
}
JS_FreeValueRT(param_1,plVar1[3],plVar1[4]);
js_free_rt(param_1,plVar1);
return;
}
return;
}
| |
35,951 | bitmap_get_first_set | eloqsql/mysys/my_bitmap.c | uint bitmap_get_first_set(const MY_BITMAP *map)
{
uint i;
my_bitmap_map *data_ptr= map->bitmap, *end= map->last_word_ptr;
DBUG_ASSERT(map->bitmap);
for (i=0; data_ptr < end; data_ptr++, i++)
if (*data_ptr)
goto found;
if (!(*data_ptr & ~map->last_word_mask))
return MY_BIT_NONE;
found:
return get_first_set(*data_ptr, i);
} | O0 | c | bitmap_get_first_set:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0xef065
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xef09a
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0xef081
jmp 0xef0bc
jmp 0xef083
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xef06c
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xef0ba
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xef0cd
jmp 0xef0bc
movq -0x20(%rbp), %rax
movl (%rax), %edi
movl -0x14(%rbp), %esi
callq 0xef0e0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| bitmap_get_first_set:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_28], rax
jmp short $+2
loc_EF065:
mov [rbp+var_14], 0
loc_EF06C:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jnb short loc_EF09A
mov rax, [rbp+var_20]
cmp dword ptr [rax], 0
jz short loc_EF081
jmp short loc_EF0BC
loc_EF081:
jmp short $+2
loc_EF083:
mov rax, [rbp+var_20]
add rax, 4
mov [rbp+var_20], rax
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_EF06C
loc_EF09A:
mov rax, [rbp+var_20]
mov eax, [rax]
mov rcx, [rbp+var_10]
mov ecx, [rcx+18h]
xor ecx, 0FFFFFFFFh
and eax, ecx
cmp eax, 0
jnz short loc_EF0BA
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_EF0CD
loc_EF0BA:
jmp short $+2
loc_EF0BC:
mov rax, [rbp+var_20]
mov edi, [rax]
mov esi, [rbp+var_14]
call get_first_set
mov [rbp+var_4], eax
loc_EF0CD:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long bitmap_get_first_set(long long a1)
{
_DWORD *v2; // [rsp+10h] [rbp-20h]
unsigned int v3; // [rsp+1Ch] [rbp-14h]
v2 = *(_DWORD **)a1;
v3 = 0;
while ( (unsigned long long)v2 < *(_QWORD *)(a1 + 8) )
{
if ( *v2 )
return (unsigned int)get_first_set((unsigned int)*v2, v3);
++v2;
++v3;
}
if ( (~*(_DWORD *)(a1 + 24) & *v2) == 0 )
return (unsigned int)-1;
return (unsigned int)get_first_set((unsigned int)*v2, v3);
}
| bitmap_get_first_set:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001ef065
LAB_001ef065:
MOV dword ptr [RBP + -0x14],0x0
LAB_001ef06c:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x001ef09a
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x0
JZ 0x001ef081
JMP 0x001ef0bc
LAB_001ef081:
JMP 0x001ef083
LAB_001ef083:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x4
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001ef06c
LAB_001ef09a:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x18]
XOR ECX,0xffffffff
AND EAX,ECX
CMP EAX,0x0
JNZ 0x001ef0ba
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001ef0cd
LAB_001ef0ba:
JMP 0x001ef0bc
LAB_001ef0bc:
MOV RAX,qword ptr [RBP + -0x20]
MOV EDI,dword ptr [RAX]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x001ef0e0
MOV dword ptr [RBP + -0x4],EAX
LAB_001ef0cd:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 bitmap_get_first_set(int8 *param_1)
{
uint *local_28;
int local_1c;
int4 local_c;
local_28 = (uint *)*param_1;
local_1c = 0;
for (; local_28 < (uint *)param_1[1]; local_28 = local_28 + 1) {
if (*local_28 != 0) goto LAB_001ef0bc;
local_1c = local_1c + 1;
}
if ((*local_28 & (*(uint *)(param_1 + 3) ^ 0xffffffff)) == 0) {
local_c = 0xffffffff;
}
else {
LAB_001ef0bc:
local_c = get_first_set(*local_28,local_1c);
}
return local_c;
}
| |
35,952 | test_mdev_20516 | eloqsql/tests/mysql_client_test.c | static void test_mdev_20516()
{
MYSQL_STMT *stmt;
int rc;
unsigned long cursor= CURSOR_TYPE_READ_ONLY;
const char* query=
"CREATE VIEW v1 AS SELECT * FROM t1";
myheader("test_mdev_20516");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE t1(a INT)");
myquery(rc);
stmt= mysql_stmt_init(mysql);
check_stmt(stmt);
rc= mysql_stmt_prepare(stmt, query, strlen(query));
check_execute(stmt, rc);
rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, &cursor);
check_execute(stmt, rc);
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "DROP TABLE t1");
myquery(rc);
} | O0 | c | test_mdev_20516:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq $0x1, -0x18(%rbp)
leaq 0xef372(%rip), %rax # 0x12f609
movq %rax, -0x20(%rbp)
jmp 0x4029d
movsbl 0x42a22d(%rip), %eax # 0x46a4d1
cmpl $0x2, %eax
jge 0x40325
movq 0x26ed28(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0xee06a(%rip), %rsi # 0x12e324
movb $0x0, %al
callq 0x3a1c0
movq 0x26ed10(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
movl 0x42a44b(%rip), %edx # 0x46a71c
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x42a440(%rip) # 0x46a71c
movl 0x42a436(%rip), %ecx # 0x46a718
movl 0x42a213(%rip), %r8d # 0x46a4fc
leaq 0xef33c(%rip), %rsi # 0x12f62c
leaq 0xee2d6(%rip), %r9 # 0x12e5cd
movb $0x0, %al
callq 0x3a1c0
movq 0x26ecd3(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0xee04d(%rip), %rsi # 0x12e35c
movb $0x0, %al
callq 0x3a1c0
movq 0x26ecbb(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
callq 0x3a4a0
movq 0x42a1ac(%rip), %rdi # 0x46a4d8
leaq 0xef30b(%rip), %rsi # 0x12f63e
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x40350
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x24(%rbp)
jne 0x40358
jmp 0x40370
leaq 0xed8ad(%rip), %rdi # 0x12dc0c
movl $0x51c4, %esi # imm = 0x51C4
leaq 0x103c04(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x42a161(%rip), %rdi # 0x46a4d8
leaq 0xef2d8(%rip), %rsi # 0x12f656
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x4039b
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x28(%rbp)
jne 0x403a3
jmp 0x403bb
leaq 0xed862(%rip), %rdi # 0x12dc0c
movl $0x51c7, %esi # imm = 0x51C7
leaq 0x103bb9(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x42a116(%rip), %rdi # 0x46a4d8
callq 0xb2790
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x403db
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpq $0x0, -0x8(%rbp)
je 0x403e4
jmp 0x403fc
leaq 0xed821(%rip), %rdi # 0x12dc0c
movl $0x51ca, %esi # imm = 0x51CA
leaq 0xed573(%rip), %rdx # 0x12d96a
callq 0x3c010
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3a400
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %rax, %rdx
callq 0x3b810
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x4043b
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xc(%rbp)
jne 0x40443
jmp 0x4045b
leaq 0xed7c2(%rip), %rdi # 0x12dc0c
movl $0x51cd, %esi # imm = 0x51CD
leaq 0xf93b6(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x8(%rbp), %rdi
movl $0x1, %esi
leaq -0x18(%rbp), %rdx
callq 0xb0970
movsbl %al, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x40486
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xc(%rbp)
jne 0x4048e
jmp 0x404a6
leaq 0xed777(%rip), %rdi # 0x12dc0c
movl $0x51d0, %esi # imm = 0x51D0
leaq 0xf936b(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b8a0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x404c5
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xc(%rbp)
jne 0x404cd
jmp 0x404e5
leaq 0xed738(%rip), %rdi # 0x12dc0c
movl $0x51d3, %esi # imm = 0x51D3
leaq 0xf932c(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b9f0
movq 0x429fe3(%rip), %rdi # 0x46a4d8
leaq 0xef171(%rip), %rsi # 0x12f66d
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x40519
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x2c(%rbp)
jne 0x40521
jmp 0x40539
leaq 0xed6e4(%rip), %rdi # 0x12dc0c
movl $0x51d7, %esi # imm = 0x51D7
leaq 0x103a3b(%rip), %rdx # 0x143f6f
callq 0x3c010
addq $0x40, %rsp
popq %rbp
retq
nop
| test_mdev_20516:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_18], 1
lea rax, aCreateViewV1As; "CREATE VIEW v1 AS SELECT * FROM t1"
mov [rbp+var_20], rax
jmp short $+2
loc_4029D:
movsx eax, cs:opt_silent
cmp eax, 2
jge short loc_40325
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E324; "\n\n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
mov edx, cs:test_count
mov eax, edx
add eax, 1
mov cs:test_count, eax
mov ecx, cs:iter_count
mov r8d, cs:opt_count
lea rsi, aUOfUUS; "%u of (%u/%u): %s"
lea r9, aTestMdev20516; "test_mdev_20516"
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E35C; " \n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
loc_40325:
mov rdi, cs:mysql
lea rsi, aDropTableIfExi; "DROP TABLE IF EXISTS t1"
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jz short loc_40350
xor eax, eax
mov edi, eax
call print_error
loc_40350:
cmp [rbp+var_24], 0
jnz short loc_40358
jmp short loc_40370
loc_40358:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 51C4h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_40370:
mov rdi, cs:mysql
lea rsi, aCreateTableT1A_2; "CREATE TABLE t1(a INT)"
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_28], eax
cmp [rbp+var_28], 0
jz short loc_4039B
xor eax, eax
mov edi, eax
call print_error
loc_4039B:
cmp [rbp+var_28], 0
jnz short loc_403A3
jmp short loc_403BB
loc_403A3:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 51C7h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_403BB:
mov rdi, cs:mysql
call mysql_stmt_init
mov [rbp+var_8], rax
cmp [rbp+var_8], 0
jnz short loc_403DB
xor eax, eax
mov edi, eax
call print_error
loc_403DB:
cmp [rbp+var_8], 0
jz short loc_403E4
jmp short loc_403FC
loc_403E4:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 51CAh
lea rdx, aStmt0; "stmt != 0"
call die
loc_403FC:
mov rax, [rbp+var_8]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov rdi, [rbp+var_20]
call _strlen
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_38]
mov rdx, rax
call wrap_mysql_stmt_prepare
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jz short loc_4043B
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call print_st_error
loc_4043B:
cmp [rbp+var_C], 0
jnz short loc_40443
jmp short loc_4045B
loc_40443:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 51CDh
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_4045B:
mov rdi, [rbp+var_8]
mov esi, 1
lea rdx, [rbp+var_18]
call mysql_stmt_attr_set
movsx eax, al
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jz short loc_40486
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call print_st_error
loc_40486:
cmp [rbp+var_C], 0
jnz short loc_4048E
jmp short loc_404A6
loc_4048E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 51D0h
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_404A6:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_execute
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jz short loc_404C5
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call print_st_error
loc_404C5:
cmp [rbp+var_C], 0
jnz short loc_404CD
jmp short loc_404E5
loc_404CD:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 51D3h
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_404E5:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_close
mov rdi, cs:mysql
lea rsi, aDropTableT1; "DROP TABLE t1"
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jz short loc_40519
xor eax, eax
mov edi, eax
call print_error
loc_40519:
cmp [rbp+var_2C], 0
jnz short loc_40521
jmp short loc_40539
loc_40521:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 51D7h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_40539:
add rsp, 40h
pop rbp
retn
| void test_mdev_20516()
{
int v0; // edx
long long v1; // rax
char v2; // al
int v3; // [rsp+14h] [rbp-2Ch]
long long v4; // [rsp+28h] [rbp-18h] BYREF
int v5; // [rsp+34h] [rbp-Ch]
long long v6; // [rsp+38h] [rbp-8h]
v4 = 1LL;
if ( opt_silent < 2 )
{
fprintf(stdout, "\n\n#####################################\n");
v0 = test_count++;
fprintf(stdout, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_mdev_20516");
fprintf(stdout, " \n#####################################\n");
fflush(stdout);
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"DROP TABLE IF EXISTS t1") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20932, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"CREATE TABLE t1(a INT)") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20935, "r == 0");
}
v6 = mysql_stmt_init(mysql);
if ( !v6 )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20938, "stmt != 0");
}
v1 = strlen("CREATE VIEW v1 AS SELECT * FROM t1");
v5 = wrap_mysql_stmt_prepare(v6, (long long)"CREATE VIEW v1 AS SELECT * FROM t1", v1);
if ( v5 )
{
print_st_error(v6, 0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20941, "rc == 0");
}
v2 = mysql_stmt_attr_set(v6, 1LL, &v4);
v5 = v2;
if ( v2 )
print_st_error(v6, 0LL);
if ( v5 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20944, "rc == 0");
v5 = wrap_mysql_stmt_execute(v6);
if ( v5 )
print_st_error(v6, 0LL);
if ( v5 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20947, "rc == 0");
wrap_mysql_stmt_close(v6);
v5 = wrap_mysql_query(mysql, (long long)"DROP TABLE t1");
v3 = v5;
if ( v5 )
print_error(0LL);
if ( v3 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20951, "r == 0");
}
| test_mdev_20516:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x18],0x1
LEA RAX,[0x22f609]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0014029d
LAB_0014029d:
MOVSX EAX,byte ptr [0x0056a4d1]
CMP EAX,0x2
JGE 0x00140325
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e324]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [0x0056a71c]
MOV EAX,EDX
ADD EAX,0x1
MOV dword ptr [0x0056a71c],EAX
MOV ECX,dword ptr [0x0056a718]
MOV R8D,dword ptr [0x0056a4fc]
LEA RSI,[0x22f62c]
LEA R9,[0x22e5cd]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e35c]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
CALL 0x0013a4a0
LAB_00140325:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x22f63e]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00140350
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00140350:
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x00140358
JMP 0x00140370
LAB_00140358:
LEA RDI,[0x22dc0c]
MOV ESI,0x51c4
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_00140370:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x22f656]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x28],EAX
CMP dword ptr [RBP + -0x28],0x0
JZ 0x0014039b
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0014039b:
CMP dword ptr [RBP + -0x28],0x0
JNZ 0x001403a3
JMP 0x001403bb
LAB_001403a3:
LEA RDI,[0x22dc0c]
MOV ESI,0x51c7
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_001403bb:
MOV RDI,qword ptr [0x0056a4d8]
CALL 0x001b2790
MOV qword ptr [RBP + -0x8],RAX
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x001403db
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_001403db:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001403e4
JMP 0x001403fc
LAB_001403e4:
LEA RDI,[0x22dc0c]
MOV ESI,0x51ca
LEA RDX,[0x22d96a]
CALL 0x0013c010
LAB_001403fc:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0013a400
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,RAX
CALL 0x0013b810
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x0014043b
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_0014043b:
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x00140443
JMP 0x0014045b
LAB_00140443:
LEA RDI,[0x22dc0c]
MOV ESI,0x51cd
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_0014045b:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x1
LEA RDX,[RBP + -0x18]
CALL 0x001b0970
MOVSX EAX,AL
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00140486
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_00140486:
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x0014048e
JMP 0x001404a6
LAB_0014048e:
LEA RDI,[0x22dc0c]
MOV ESI,0x51d0
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_001404a6:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b8a0
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x001404c5
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_001404c5:
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x001404cd
JMP 0x001404e5
LAB_001404cd:
LEA RDI,[0x22dc0c]
MOV ESI,0x51d3
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_001404e5:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b9f0
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x22f66d]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x00140519
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00140519:
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x00140521
JMP 0x00140539
LAB_00140521:
LEA RDI,[0x22dc0c]
MOV ESI,0x51d7
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_00140539:
ADD RSP,0x40
POP RBP
RET
|
void test_mdev_20516(void)
{
long lVar1;
char cVar2;
size_t sVar3;
ulong uVar4;
int8 local_20;
int local_14;
long local_10;
local_20 = 1;
if (opt_silent < '\x02') {
fprintf(*(FILE **)PTR_stdout_003aefd8,"\n\n#####################################\n");
uVar4 = (ulong)test_count;
test_count = test_count + 1;
fprintf(*(FILE **)PTR_stdout_003aefd8,"%u of (%u/%u): %s",uVar4,(ulong)iter_count,
(ulong)opt_count,"test_mdev_20516");
fprintf(*(FILE **)PTR_stdout_003aefd8," \n#####################################\n");
fflush(*(FILE **)PTR_stdout_003aefd8);
}
local_14 = wrap_mysql_query(mysql,"DROP TABLE IF EXISTS t1");
if (local_14 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x51c4,"r == 0");
}
local_14 = wrap_mysql_query(mysql,"CREATE TABLE t1(a INT)");
if (local_14 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x51c7,"r == 0");
}
local_10 = mysql_stmt_init(mysql);
if (local_10 == 0) {
print_error(0);
}
if (local_10 == 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x51ca,"stmt != 0");
}
lVar1 = local_10;
sVar3 = strlen("CREATE VIEW v1 AS SELECT * FROM t1");
local_14 = wrap_mysql_stmt_prepare(lVar1,"CREATE VIEW v1 AS SELECT * FROM t1",sVar3);
if (local_14 != 0) {
print_st_error(local_10,0);
}
if (local_14 != 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x51cd,"rc == 0");
}
cVar2 = mysql_stmt_attr_set(local_10,1,&local_20);
local_14 = (int)cVar2;
if (local_14 != 0) {
print_st_error(local_10,0);
}
if (local_14 != 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x51d0,"rc == 0");
}
local_14 = wrap_mysql_stmt_execute(local_10);
if (local_14 != 0) {
print_st_error(local_10,0);
}
if (local_14 != 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x51d3,"rc == 0");
}
wrap_mysql_stmt_close(local_10);
local_14 = wrap_mysql_query(mysql,"DROP TABLE t1");
if (local_14 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x51d7,"r == 0");
}
return;
}
| |
35,953 | free_full_pages | eloqsql/storage/maria/ma_blockrec.c | static my_bool free_full_pages(MARIA_HA *info, MARIA_ROW *row)
{
uchar log_data[FILEID_STORE_SIZE + PAGERANGE_STORE_SIZE];
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2];
LSN lsn;
size_t extents_length;
uchar *extents= row->extents;
DBUG_ENTER("free_full_pages");
if (info->s->now_transactional)
{
/* Compact events by removing filler and tail events */
uchar *new_block= 0;
uchar *end, *to, *compact_extent_info;
my_bool res, buff_alloced;
uint extents_count;
alloc_on_stack(*info->stack_end_ptr, compact_extent_info, buff_alloced,
row->extents_count * ROW_EXTENT_SIZE);
if (!compact_extent_info)
DBUG_RETURN(1);
to= compact_extent_info;
for (end= extents + row->extents_count * ROW_EXTENT_SIZE ;
extents < end ;
extents+= ROW_EXTENT_SIZE)
{
uint page_count= uint2korr(extents + ROW_EXTENT_PAGE_SIZE);
page_count&= ~START_EXTENT_BIT;
if (! (page_count & TAIL_BIT) && page_count != 0)
{
/* Found correct extent */
if (!new_block)
new_block= extents; /* First extent in range */
continue;
}
/* Found extent to remove, copy everything found so far */
if (new_block)
{
size_t length= (size_t) (extents - new_block);
memcpy(to, new_block, length);
to+= length;
new_block= 0;
}
}
if (new_block)
{
size_t length= (size_t) (extents - new_block);
memcpy(to, new_block, length);
to+= length;
}
if (!unlikely(extents_length= (uint) (to - compact_extent_info)))
{
/*
No ranges. This happens in the rear case when we have a allocated
place for a blob on a tail page but it did fit into the main page.
*/
stack_alloc_free(compact_extent_info, buff_alloced);
DBUG_RETURN(0);
}
extents_count= (uint) (extents_length / ROW_EXTENT_SIZE);
pagerange_store(log_data + FILEID_STORE_SIZE, extents_count);
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data);
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= compact_extent_info;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= extents_length;
res= translog_write_record(&lsn, LOGREC_REDO_FREE_BLOCKS, info->trn,
info,
(translog_size_t) (sizeof(log_data) +
extents_length),
TRANSLOG_INTERNAL_PARTS + 2, log_array,
log_data, NULL);
stack_alloc_free(compact_extent_info, buff_alloced);
if (res)
DBUG_RETURN(1);
}
DBUG_RETURN(_ma_bitmap_free_full_pages(info, row->extents,
row->extents_count));
} | O0 | c | free_full_pages:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, 0x7e7(%rax)
je 0x76eee
movq $0x0, -0x80(%rbp)
movq -0x20(%rbp), %rax
imull $0x7, 0xac(%rax), %eax
movl %eax, %eax
movq %rax, -0xa8(%rbp)
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movq (%rax), %rax
leaq -0xa8(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
cmpq -0xa8(%rbp), %rax
jbe 0x76c6a
movq -0xb0(%rbp), %rcx
subq -0xa8(%rbp), %rcx
movl $0x10000, %eax # imm = 0x10000
cmpq %rcx, %rax
jb 0x76c36
movq -0xb0(%rbp), %rcx
subq -0xa8(%rbp), %rcx
movl $0x8000, %eax # imm = 0x8000
cmpq %rcx, %rax
jae 0x76c6a
movl $0x1000, %eax # imm = 0x1000
cmpq -0xa8(%rbp), %rax
ja 0x76c6a
movb $0x0, -0x9a(%rbp)
movq -0x20(%rbp), %rax
movl 0xac(%rax), %ecx
movl %ecx, %eax
shll $0x3, %eax
subl %ecx, %eax
movl %eax, %ecx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x98(%rbp)
jmp 0x76c93
movb $0x1, -0x9a(%rbp)
movq -0x20(%rbp), %rax
imull $0x7, 0xac(%rax), %eax
movl %eax, %eax
movl %eax, %esi
xorl %edi, %edi
movl $0x10010, %edx # imm = 0x10010
callq 0xf3860
movq %rax, -0x98(%rbp)
jmp 0x76c95
cmpq $0x0, -0x98(%rbp)
jne 0x76caa
jmp 0x76ca1
movb $0x1, -0xd(%rbp)
jmp 0x76f0e
movq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x78(%rbp), %rax
movq -0x20(%rbp), %rcx
imull $0x7, 0xac(%rcx), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jae 0x76d8d
movq -0x78(%rbp), %rax
movzwl 0x5(%rax), %eax
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
andl $0xffffbfff, %eax # imm = 0xFFFFBFFF
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0x76d2d
cmpl $0x0, -0xb4(%rbp)
je 0x76d2d
cmpq $0x0, -0x80(%rbp)
jne 0x76d2b
movq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x76d7c
cmpq $0x0, -0x80(%rbp)
je 0x76d7a
movq -0x78(%rbp), %rax
movq -0x80(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0x90(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0xc0(%rbp), %rdx
callq 0x2a090
movq -0xc0(%rbp), %rax
addq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x0, -0x80(%rbp)
jmp 0x76d7c
movq -0x78(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x78(%rbp)
jmp 0x76cd3
cmpq $0x0, -0x80(%rbp)
je 0x76dd2
movq -0x78(%rbp), %rax
movq -0x80(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xc8(%rbp)
movq -0x90(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0xc8(%rbp), %rdx
callq 0x2a090
movq -0xc8(%rbp), %rax
addq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq -0x98(%rbp), %rcx
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x70(%rbp)
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
jne 0x76e19
movq -0x98(%rbp), %rdi
movsbl -0x9a(%rbp), %esi
callq 0x78960
movb $0x0, -0xd(%rbp)
jmp 0x76f0e
movq -0x70(%rbp), %rax
movl $0x7, %ecx
xorl %edx, %edx
divq %rcx
movl %eax, -0xa0(%rbp)
leaq -0xc(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xd0(%rbp)
movl -0xa0(%rbp), %eax
movw %ax, %cx
movq -0xd0(%rbp), %rax
movw %cx, (%rax)
leaq -0xc(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x4, -0x38(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x18(%rbp), %rcx
movq -0x70(%rbp), %rax
addq $0x4, %rax
movl %eax, %r8d
leaq -0x60(%rbp), %r10
leaq -0xc(%rbp), %rax
leaq -0x68(%rbp), %rdi
movl $0x8, %esi
movl $0x4, %r9d
xorl %r11d, %r11d
subq $0x20, %rsp
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x53ff0
addq $0x20, %rsp
movb %al, -0x99(%rbp)
movq -0x98(%rbp), %rdi
movsbl -0x9a(%rbp), %esi
callq 0x78960
cmpb $0x0, -0x99(%rbp)
je 0x76eec
jmp 0x76ee6
movb $0x1, -0xd(%rbp)
jmp 0x76f0e
jmp 0x76eee
jmp 0x76ef0
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rax
movl 0xac(%rax), %edx
callq 0x43ee0
movb %al, -0xd(%rbp)
movb -0xd(%rbp), %al
movb %al, -0xd1(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x76f34
movb -0xd1(%rbp), %al
movq %rbp, %rsp
popq %rbp
retq
callq 0x2a270
nopl (%rax)
| free_full_pages:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov [rbp+var_78], rax
mov rax, [rbp+var_18]
mov rax, [rax]
cmp byte ptr [rax+7E7h], 0
jz loc_76EEE
mov [rbp+var_80], 0
mov rax, [rbp+var_20]
imul eax, [rax+0ACh], 7
mov eax, eax
mov [rbp+var_A8], rax
mov rax, [rbp+var_18]
mov rax, [rax+78h]
mov rax, [rax]
lea rcx, [rbp+var_A8]
sub rax, rcx
mov [rbp+var_B0], rax
mov rax, [rbp+var_B0]
cmp rax, [rbp+var_A8]
jbe short loc_76C6A
mov rcx, [rbp+var_B0]
sub rcx, [rbp+var_A8]
mov eax, 10000h
cmp rax, rcx
jb short loc_76C36
mov rcx, [rbp+var_B0]
sub rcx, [rbp+var_A8]
mov eax, 8000h
cmp rax, rcx
jnb short loc_76C6A
mov eax, 1000h
cmp rax, [rbp+var_A8]
ja short loc_76C6A
loc_76C36:
mov [rbp+var_9A], 0
mov rax, [rbp+var_20]
mov ecx, [rax+0ACh]
mov eax, ecx
shl eax, 3
sub eax, ecx
mov ecx, eax
add rcx, 0Fh
and rcx, 0FFFFFFFFFFFFFFF0h
mov rax, rsp
sub rax, rcx
mov rsp, rax
mov [rbp+var_98], rax
jmp short loc_76C93
loc_76C6A:
mov [rbp+var_9A], 1
mov rax, [rbp+var_20]
imul eax, [rax+0ACh], 7
mov eax, eax
mov esi, eax
xor edi, edi
mov edx, offset stru_10010
call my_malloc
mov [rbp+var_98], rax
loc_76C93:
jmp short $+2
loc_76C95:
cmp [rbp+var_98], 0
jnz short loc_76CAA
jmp short $+2
loc_76CA1:
mov [rbp+var_D], 1
jmp loc_76F0E
loc_76CAA:
mov rax, [rbp+var_98]
mov [rbp+var_90], rax
mov rax, [rbp+var_78]
mov rcx, [rbp+var_20]
imul ecx, [rcx+0ACh], 7
mov ecx, ecx
add rax, rcx
mov [rbp+var_88], rax
loc_76CD3:
mov rax, [rbp+var_78]
cmp rax, [rbp+var_88]
jnb loc_76D8D
mov rax, [rbp+var_78]
movzx eax, word ptr [rax+5]
mov [rbp+var_B4], eax
mov eax, [rbp+var_B4]
and eax, 0FFFFBFFFh
mov [rbp+var_B4], eax
mov eax, [rbp+var_B4]
and eax, 8000h
cmp eax, 0
jnz short loc_76D2D
cmp [rbp+var_B4], 0
jz short loc_76D2D
cmp [rbp+var_80], 0
jnz short loc_76D2B
mov rax, [rbp+var_78]
mov [rbp+var_80], rax
loc_76D2B:
jmp short loc_76D7C
loc_76D2D:
cmp [rbp+var_80], 0
jz short loc_76D7A
mov rax, [rbp+var_78]
mov rcx, [rbp+var_80]
sub rax, rcx
mov [rbp+var_C0], rax
mov rdi, [rbp+var_90]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_C0]
call _memcpy
mov rax, [rbp+var_C0]
add rax, [rbp+var_90]
mov [rbp+var_90], rax
mov [rbp+var_80], 0
loc_76D7A:
jmp short $+2
loc_76D7C:
mov rax, [rbp+var_78]
add rax, 7
mov [rbp+var_78], rax
jmp loc_76CD3
loc_76D8D:
cmp [rbp+var_80], 0
jz short loc_76DD2
mov rax, [rbp+var_78]
mov rcx, [rbp+var_80]
sub rax, rcx
mov [rbp+var_C8], rax
mov rdi, [rbp+var_90]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_C8]
call _memcpy
mov rax, [rbp+var_C8]
add rax, [rbp+var_90]
mov [rbp+var_90], rax
loc_76DD2:
mov rax, [rbp+var_90]
mov rcx, [rbp+var_98]
sub rax, rcx
mov eax, eax
mov [rbp+var_70], rax
cmp rax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jnz short loc_76E19
mov rdi, [rbp+var_98]
movsx esi, [rbp+var_9A]
call stack_alloc_free_1
mov [rbp+var_D], 0
jmp loc_76F0E
loc_76E19:
mov rax, [rbp+var_70]
mov ecx, 7
xor edx, edx
div rcx
mov [rbp+var_A0], eax
lea rax, [rbp+var_C]
add rax, 2
mov [rbp+var_D0], rax
mov eax, [rbp+var_A0]
mov cx, ax
mov rax, [rbp+var_D0]
mov [rax], cx
lea rax, [rbp+var_C]
mov [rbp+var_40], rax
mov [rbp+var_38], 4
mov rax, [rbp+var_98]
mov [rbp+var_30], rax
mov rax, [rbp+var_70]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov rdx, [rax+8]
mov rcx, [rbp+var_18]
mov rax, [rbp+var_70]
add rax, 4
mov r8d, eax
lea r10, [rbp+var_60]
lea rax, [rbp+var_C]
lea rdi, [rbp+var_68]
mov esi, 8
mov r9d, 4
xor r11d, r11d
sub rsp, 20h
mov [rsp+100h+var_100], r10
mov [rsp+100h+var_F8], rax
mov [rsp+100h+var_F0], 0
call translog_write_record
add rsp, 20h
mov [rbp+var_99], al
mov rdi, [rbp+var_98]
movsx esi, [rbp+var_9A]
call stack_alloc_free_1
cmp [rbp+var_99], 0
jz short loc_76EEC
jmp short $+2
loc_76EE6:
mov [rbp+var_D], 1
jmp short loc_76F0E
loc_76EEC:
jmp short $+2
loc_76EEE:
jmp short $+2
loc_76EF0:
mov rdi, [rbp+var_18]
mov rax, [rbp+var_20]
mov rsi, [rax+10h]
mov rax, [rbp+var_20]
mov edx, [rax+0ACh]
call _ma_bitmap_free_full_pages
mov [rbp+var_D], al
loc_76F0E:
mov al, [rbp+var_D]
mov [rbp+var_D1], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_76F34
mov al, [rbp+var_D1]
mov rsp, rbp
pop rbp
retn
loc_76F34:
call ___stack_chk_fail
| char free_full_pages(long long *a1, long long a2)
{
_QWORD v3[3]; // [rsp+20h] [rbp-E0h] BYREF
unsigned long long v4; // [rsp+38h] [rbp-C8h]
unsigned long long v5; // [rsp+40h] [rbp-C0h]
int v6; // [rsp+4Ch] [rbp-B4h]
unsigned long long v7; // [rsp+50h] [rbp-B0h]
unsigned long long v8; // [rsp+58h] [rbp-A8h] BYREF
int v9; // [rsp+60h] [rbp-A0h]
char v10; // [rsp+66h] [rbp-9Ah]
char v11; // [rsp+67h] [rbp-99h]
char *v12; // [rsp+68h] [rbp-98h]
char *v13; // [rsp+70h] [rbp-90h]
unsigned long long v14; // [rsp+78h] [rbp-88h]
unsigned long long v15; // [rsp+80h] [rbp-80h]
unsigned long long v16; // [rsp+88h] [rbp-78h]
unsigned long long v17; // [rsp+90h] [rbp-70h]
_BYTE v18[8]; // [rsp+98h] [rbp-68h] BYREF
_QWORD v19[8]; // [rsp+A0h] [rbp-60h] BYREF
long long v20; // [rsp+E0h] [rbp-20h]
long long *v21; // [rsp+E8h] [rbp-18h]
__int16 v23; // [rsp+F4h] [rbp-Ch] BYREF
__int16 v24; // [rsp+F6h] [rbp-Ah] BYREF
unsigned long long v25; // [rsp+F8h] [rbp-8h]
v25 = __readfsqword(0x28u);
v21 = a1;
v20 = a2;
v16 = *(_QWORD *)(a2 + 16);
if ( !*(_BYTE *)(*a1 + 2023) )
return ma_bitmap_free_full_pages(v21, *(_QWORD *)(v20 + 16), *(_DWORD *)(v20 + 172));
v15 = 0LL;
v8 = (unsigned int)(7 * *(_DWORD *)(v20 + 172));
v7 = *(_QWORD *)v21[15] - (_QWORD)&v8;
if ( v7 <= v8 || v7 - v8 <= 0x10000 && (v7 - v8 <= 0x8000 || v8 < 0x1000) )
{
v10 = 1;
v12 = (char *)my_malloc(0LL, (unsigned int)(7 * *(_DWORD *)(v20 + 172)), &stru_10010);
}
else
{
v10 = 0;
v12 = (char *)v3 - (((unsigned int)(7 * *(_DWORD *)(v20 + 172)) + 15LL) & 0xFFFFFFFFFFFFFFF0LL);
}
if ( v12 )
{
v13 = v12;
v14 = (unsigned int)(7 * *(_DWORD *)(v20 + 172)) + v16;
while ( v16 < v14 )
{
v6 = *(unsigned __int16 *)(v16 + 5);
v6 &= ~0x4000u;
if ( (v6 & 0x8000) != 0 || !v6 )
{
if ( v15 )
{
v5 = v16 - v15;
memcpy(v13, v15, v16 - v15);
v13 += v5;
v15 = 0LL;
}
}
else if ( !v15 )
{
v15 = v16;
}
v16 += 7LL;
}
if ( v15 )
{
v4 = v16 - v15;
memcpy(v13, v15, v16 - v15);
v13 += v4;
}
v17 = (unsigned int)((_DWORD)v13 - (_DWORD)v12);
if ( (_DWORD)v13 == (_DWORD)v12 )
{
stack_alloc_free_1(v12, (unsigned int)v10);
return 0;
}
v9 = v17 / 7;
v3[2] = &v24;
v24 = v17 / 7;
v19[4] = &v23;
v19[5] = 4LL;
v19[6] = v12;
v19[7] = v17;
v11 = translog_write_record((long long)v18, 8u, v21[1], v21, v17 + 4, 4u, v19, &v23, 0LL);
stack_alloc_free_1(v12, (unsigned int)v10);
if ( v11 )
return 1;
return ma_bitmap_free_full_pages(v21, *(_QWORD *)(v20 + 16), *(_DWORD *)(v20 + 172));
}
return 1;
}
| free_full_pages:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
CMP byte ptr [RAX + 0x7e7],0x0
JZ 0x00176eee
MOV qword ptr [RBP + -0x80],0x0
MOV RAX,qword ptr [RBP + -0x20]
IMUL EAX,dword ptr [RAX + 0xac],0x7
MOV EAX,EAX
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RAX]
LEA RCX,[RBP + -0xa8]
SUB RAX,RCX
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0xb0]
CMP RAX,qword ptr [RBP + -0xa8]
JBE 0x00176c6a
MOV RCX,qword ptr [RBP + -0xb0]
SUB RCX,qword ptr [RBP + -0xa8]
MOV EAX,0x10000
CMP RAX,RCX
JC 0x00176c36
MOV RCX,qword ptr [RBP + -0xb0]
SUB RCX,qword ptr [RBP + -0xa8]
MOV EAX,0x8000
CMP RAX,RCX
JNC 0x00176c6a
MOV EAX,0x1000
CMP RAX,qword ptr [RBP + -0xa8]
JA 0x00176c6a
LAB_00176c36:
MOV byte ptr [RBP + -0x9a],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0xac]
MOV EAX,ECX
SHL EAX,0x3
SUB EAX,ECX
MOV ECX,EAX
ADD RCX,0xf
AND RCX,-0x10
MOV RAX,RSP
SUB RAX,RCX
MOV RSP,RAX
MOV qword ptr [RBP + -0x98],RAX
JMP 0x00176c93
LAB_00176c6a:
MOV byte ptr [RBP + -0x9a],0x1
MOV RAX,qword ptr [RBP + -0x20]
IMUL EAX,dword ptr [RAX + 0xac],0x7
MOV EAX,EAX
MOV ESI,EAX
XOR EDI,EDI
MOV EDX,0x10010
CALL 0x001f3860
MOV qword ptr [RBP + -0x98],RAX
LAB_00176c93:
JMP 0x00176c95
LAB_00176c95:
CMP qword ptr [RBP + -0x98],0x0
JNZ 0x00176caa
JMP 0x00176ca1
LAB_00176ca1:
MOV byte ptr [RBP + -0xd],0x1
JMP 0x00176f0e
LAB_00176caa:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x20]
IMUL ECX,dword ptr [RCX + 0xac],0x7
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x88],RAX
LAB_00176cd3:
MOV RAX,qword ptr [RBP + -0x78]
CMP RAX,qword ptr [RBP + -0x88]
JNC 0x00176d8d
MOV RAX,qword ptr [RBP + -0x78]
MOVZX EAX,word ptr [RAX + 0x5]
MOV dword ptr [RBP + -0xb4],EAX
MOV EAX,dword ptr [RBP + -0xb4]
AND EAX,0xffffbfff
MOV dword ptr [RBP + -0xb4],EAX
MOV EAX,dword ptr [RBP + -0xb4]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x00176d2d
CMP dword ptr [RBP + -0xb4],0x0
JZ 0x00176d2d
CMP qword ptr [RBP + -0x80],0x0
JNZ 0x00176d2b
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x80],RAX
LAB_00176d2b:
JMP 0x00176d7c
LAB_00176d2d:
CMP qword ptr [RBP + -0x80],0x0
JZ 0x00176d7a
MOV RAX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x80]
SUB RAX,RCX
MOV qword ptr [RBP + -0xc0],RAX
MOV RDI,qword ptr [RBP + -0x90]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0xc0]
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0xc0]
ADD RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x90],RAX
MOV qword ptr [RBP + -0x80],0x0
LAB_00176d7a:
JMP 0x00176d7c
LAB_00176d7c:
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,0x7
MOV qword ptr [RBP + -0x78],RAX
JMP 0x00176cd3
LAB_00176d8d:
CMP qword ptr [RBP + -0x80],0x0
JZ 0x00176dd2
MOV RAX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x80]
SUB RAX,RCX
MOV qword ptr [RBP + -0xc8],RAX
MOV RDI,qword ptr [RBP + -0x90]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0xc8]
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0xc8]
ADD RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x90],RAX
LAB_00176dd2:
MOV RAX,qword ptr [RBP + -0x90]
MOV RCX,qword ptr [RBP + -0x98]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x70],RAX
CMP RAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JNZ 0x00176e19
MOV RDI,qword ptr [RBP + -0x98]
MOVSX ESI,byte ptr [RBP + -0x9a]
CALL 0x00178960
MOV byte ptr [RBP + -0xd],0x0
JMP 0x00176f0e
LAB_00176e19:
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,0x7
XOR EDX,EDX
DIV RCX
MOV dword ptr [RBP + -0xa0],EAX
LEA RAX,[RBP + -0xc]
ADD RAX,0x2
MOV qword ptr [RBP + -0xd0],RAX
MOV EAX,dword ptr [RBP + -0xa0]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xd0]
MOV word ptr [RAX],CX
LEA RAX,[RBP + -0xc]
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x38],0x4
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x70]
ADD RAX,0x4
MOV R8D,EAX
LEA R10,[RBP + -0x60]
LEA RAX,[RBP + -0xc]
LEA RDI,[RBP + -0x68]
MOV ESI,0x8
MOV R9D,0x4
XOR R11D,R11D
SUB RSP,0x20
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
CALL 0x00153ff0
ADD RSP,0x20
MOV byte ptr [RBP + -0x99],AL
MOV RDI,qword ptr [RBP + -0x98]
MOVSX ESI,byte ptr [RBP + -0x9a]
CALL 0x00178960
CMP byte ptr [RBP + -0x99],0x0
JZ 0x00176eec
JMP 0x00176ee6
LAB_00176ee6:
MOV byte ptr [RBP + -0xd],0x1
JMP 0x00176f0e
LAB_00176eec:
JMP 0x00176eee
LAB_00176eee:
JMP 0x00176ef0
LAB_00176ef0:
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RAX + 0xac]
CALL 0x00143ee0
MOV byte ptr [RBP + -0xd],AL
LAB_00176f0e:
MOV AL,byte ptr [RBP + -0xd]
MOV byte ptr [RBP + -0xd1],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00176f34
MOV AL,byte ptr [RBP + -0xd1]
MOV RSP,RBP
POP RBP
RET
LAB_00176f34:
CALL 0x0012a270
|
int8 free_full_pages(long *param_1,long param_2)
{
ushort uVar1;
int4 uVar2;
long lVar3;
int8 uVar4;
int1 auVar5 [16];
int1 *puVar6;
void *__src;
long *plVar7;
uint uVar8;
size_t sVar9;
int1 *puVar10;
int iVar11;
long in_FS_OFFSET;
int1 auStack_e8 [15];
int1 local_d9;
int2 *local_d8;
size_t local_d0;
size_t local_c8;
uint local_bc;
ulong local_b8;
ulong local_b0;
int4 local_a8;
char local_a2;
char local_a1;
int1 *local_a0;
int1 *local_98;
void *local_90;
void *local_88;
void *local_80;
ulong local_78;
int1 local_70 [8];
int1 local_68 [32];
int1 *local_48;
int8 local_40;
int1 *local_38;
ulong local_30;
long local_28;
long *local_20;
int1 local_15;
int1 local_14 [2];
int2 local_12;
long local_10;
puVar10 = auStack_e8;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_80 = *(void **)(param_2 + 0x10);
local_28 = param_2;
local_20 = param_1;
if (*(char *)(*param_1 + 0x7e7) != '\0') {
local_88 = (void *)0x0;
local_b0 = (ulong)(uint)(*(int *)(param_2 + 0xac) * 7);
local_b8 = *(long *)param_1[0xf] - (long)&local_b0;
if ((local_b0 < local_b8) &&
((0x10000 < local_b8 - local_b0 || ((0x8000 < local_b8 - local_b0 && (0xfff < local_b0))))))
{
local_a2 = '\0';
local_a0 = auStack_e8 +
-((ulong)(uint)(*(int *)(param_2 + 0xac) * 7) + 0xf & 0xfffffffffffffff0);
puVar10 = local_a0;
}
else {
local_a2 = '\x01';
local_a0 = (int1 *)my_malloc(0,*(int *)(param_2 + 0xac) * 7,0x10010);
puVar10 = auStack_e8;
}
if (local_a0 == (int1 *)0x0) {
local_15 = 1;
goto LAB_00176f0e;
}
local_98 = local_a0;
local_90 = (void *)((long)local_80 + (ulong)(uint)(*(int *)(local_28 + 0xac) * 7));
for (; __src = local_88, puVar6 = local_98, local_80 < local_90;
local_80 = (void *)((long)local_80 + 7)) {
uVar1 = *(ushort *)((long)local_80 + 5);
local_bc = uVar1 & 0xffffbfff;
if (((uVar1 & 0x8000) == 0) && ((uVar1 & 0xbfff) != 0)) {
if (local_88 == (void *)0x0) {
local_88 = local_80;
}
}
else if (local_88 != (void *)0x0) {
sVar9 = (long)local_80 - (long)local_88;
local_c8 = sVar9;
*(int8 *)(puVar10 + -8) = 0x176d5d;
memcpy(puVar6,__src,sVar9);
local_98 = local_98 + local_c8;
local_88 = (void *)0x0;
}
}
if (local_88 != (void *)0x0) {
sVar9 = (long)local_80 - (long)local_88;
local_d0 = sVar9;
*(int8 *)(puVar10 + -8) = 0x176dbd;
memcpy(puVar6,__src,sVar9);
local_98 = local_98 + local_d0;
}
plVar7 = local_20;
puVar6 = local_a0;
uVar8 = (int)local_98 - (int)local_a0;
local_78 = CONCAT44(0,uVar8);
if (local_78 == 0) {
iVar11 = (int)local_a2;
*(int8 *)(puVar10 + -8) = 0x176e10;
stack_alloc_free(puVar6,iVar11);
local_15 = 0;
goto LAB_00176f0e;
}
auVar5._8_8_ = 0;
auVar5._0_8_ = local_78;
local_a8 = SUB164(auVar5 / ZEXT816(7),0);
local_d8 = &local_12;
local_12 = SUB162(auVar5 / ZEXT816(7),0);
local_48 = local_14;
local_40 = 4;
local_38 = local_a0;
lVar3 = local_20[1];
local_30 = local_78;
*(int1 **)(puVar10 + -0x20) = local_68;
*(int1 **)(puVar10 + -0x18) = local_14;
*(int8 *)(puVar10 + -0x10) = 0;
*(int8 *)(puVar10 + -0x28) = 0x176ebe;
local_a1 = translog_write_record(local_70,8,lVar3,plVar7,uVar8 + 4,4);
puVar6 = local_a0;
iVar11 = (int)local_a2;
*(int8 *)(puVar10 + -8) = 0x176edb;
stack_alloc_free(puVar6,iVar11);
if (local_a1 != '\0') {
local_15 = 1;
goto LAB_00176f0e;
}
}
plVar7 = local_20;
uVar4 = *(int8 *)(local_28 + 0x10);
uVar2 = *(int4 *)(local_28 + 0xac);
*(int8 *)(puVar10 + -8) = 0x176f0b;
local_15 = _ma_bitmap_free_full_pages(plVar7,uVar4,uVar2);
LAB_00176f0e:
local_d9 = local_15;
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
*(int8 *)(puVar10 + -8) = 0x176f39;
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_15);
}
| |
35,954 | free_full_pages | eloqsql/storage/maria/ma_blockrec.c | static my_bool free_full_pages(MARIA_HA *info, MARIA_ROW *row)
{
uchar log_data[FILEID_STORE_SIZE + PAGERANGE_STORE_SIZE];
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2];
LSN lsn;
size_t extents_length;
uchar *extents= row->extents;
DBUG_ENTER("free_full_pages");
if (info->s->now_transactional)
{
/* Compact events by removing filler and tail events */
uchar *new_block= 0;
uchar *end, *to, *compact_extent_info;
my_bool res, buff_alloced;
uint extents_count;
alloc_on_stack(*info->stack_end_ptr, compact_extent_info, buff_alloced,
row->extents_count * ROW_EXTENT_SIZE);
if (!compact_extent_info)
DBUG_RETURN(1);
to= compact_extent_info;
for (end= extents + row->extents_count * ROW_EXTENT_SIZE ;
extents < end ;
extents+= ROW_EXTENT_SIZE)
{
uint page_count= uint2korr(extents + ROW_EXTENT_PAGE_SIZE);
page_count&= ~START_EXTENT_BIT;
if (! (page_count & TAIL_BIT) && page_count != 0)
{
/* Found correct extent */
if (!new_block)
new_block= extents; /* First extent in range */
continue;
}
/* Found extent to remove, copy everything found so far */
if (new_block)
{
size_t length= (size_t) (extents - new_block);
memcpy(to, new_block, length);
to+= length;
new_block= 0;
}
}
if (new_block)
{
size_t length= (size_t) (extents - new_block);
memcpy(to, new_block, length);
to+= length;
}
if (!unlikely(extents_length= (uint) (to - compact_extent_info)))
{
/*
No ranges. This happens in the rear case when we have a allocated
place for a blob on a tail page but it did fit into the main page.
*/
stack_alloc_free(compact_extent_info, buff_alloced);
DBUG_RETURN(0);
}
extents_count= (uint) (extents_length / ROW_EXTENT_SIZE);
pagerange_store(log_data + FILEID_STORE_SIZE, extents_count);
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data);
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= compact_extent_info;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= extents_length;
res= translog_write_record(&lsn, LOGREC_REDO_FREE_BLOCKS, info->trn,
info,
(translog_size_t) (sizeof(log_data) +
extents_length),
TRANSLOG_INTERNAL_PARTS + 2, log_array,
log_data, NULL);
stack_alloc_free(compact_extent_info, buff_alloced);
if (res)
DBUG_RETURN(1);
}
DBUG_RETURN(_ma_bitmap_free_full_pages(info, row->extents,
row->extents_count));
} | O3 | c | free_full_pages:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x10(%rsi), %r14
movq (%rdi), %rax
cmpb $0x0, 0x7e7(%rax)
je 0x5d9d8
movl 0xac(%r15), %eax
leal (,%rax,8), %r13d
subl %eax, %r13d
leaq -0xa0(%rbp), %r12
movq %r13, (%r12)
movq 0x78(%rbx), %rcx
movq (%rcx), %rcx
subq %r12, %rcx
subq %r13, %rcx
jbe 0x5d867
cmpq $0x10000, %rcx # imm = 0x10000
ja 0x5d84a
cmpl $0x1000, %r13d # imm = 0x1000
jb 0x5d867
cmpq $0x8001, %rcx # imm = 0x8001
jb 0x5d867
movq %r15, -0x48(%rbp)
movq %rbx, -0x40(%rbp)
movq %rsp, %rdi
leaq 0xf(%r13), %rcx
andq $-0x10, %rcx
subq %rcx, %rdi
movq %rdi, %rsp
movb $0x1, %bl
jmp 0x5d89e
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
movq %r13, %rsi
callq 0x9fdb1
testq %rax, %rax
je 0x5d940
movq %rax, %rdi
movq %rbx, -0x40(%rbp)
movq %r15, -0x48(%rbp)
movl 0xac(%r15), %eax
leal (,%rax,8), %r13d
subl %eax, %r13d
xorl %ebx, %ebx
movq %rdi, %r15
testl %eax, %eax
je 0x5d923
movl %ebx, -0x38(%rbp)
addq %r14, %r13
xorl %esi, %esi
movq %r14, %r12
movq %rdi, -0x50(%rbp)
movq %rdi, %r15
movzwl 0x5(%r14), %eax
testw %ax, %ax
sets %cl
testl $0xbfff, %eax # imm = 0xBFFF
sete %al
orb %cl, %al
jne 0x5d8d7
testq %rsi, %rsi
cmoveq %r14, %rsi
jmp 0x5d8f2
testq %rsi, %rsi
je 0x5d8f0
movq %r12, %rbx
subq %rsi, %rbx
movq %r15, %rdi
movq %rbx, %rdx
callq 0x29080
addq %rbx, %r15
xorl %esi, %esi
addq $0x7, %r14
addq $0x7, %r12
cmpq %r13, %r14
jb 0x5d8b7
testq %rsi, %rsi
je 0x5d915
subq %rsi, %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x29080
addq %r12, %r15
leaq -0xa0(%rbp), %r12
movq -0x50(%rbp), %rdi
movl -0x38(%rbp), %ebx
subq %rdi, %r15
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
andq %r15, %rax
jne 0x5d947
testb %bl, %bl
jne 0x5d939
callq 0x9ffde
xorl %eax, %eax
jmp 0x5d9ea
movb $0x1, %al
jmp 0x5d9ea
movq %rdi, %r13
movl %r15d, %ecx
imulq $0x24924925, %rcx, %rcx # imm = 0x24924925
shrq $0x20, %rcx
movl %r15d, %edx
subl %ecx, %edx
shrl %edx
addl %ecx, %edx
shrl $0x2, %edx
leaq -0x34(%rbp), %r10
movw %dx, 0x2(%r10)
movq %r10, -0x80(%rbp)
movq $0x4, -0x78(%rbp)
movq %rdi, -0x70(%rbp)
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rcx
movq 0x8(%rcx), %rdx
addl $0x4, %r15d
subq $0x8, %rsp
leaq -0x58(%rbp), %rdi
movl $0x8, %esi
movq %rcx, -0x40(%rbp)
movl %r15d, %r8d
movl $0x4, %r9d
pushq $0x0
pushq %r10
pushq %r12
callq 0x2a8ac
addq $0x20, %rsp
movl %eax, %r14d
testb %bl, %bl
jne 0x5d9c5
movq %r13, %rdi
callq 0x9ffde
movb $0x1, %al
testb %r14b, %r14b
jne 0x5d9ea
movq -0x48(%rbp), %r15
movq 0x10(%r15), %r14
movq -0x40(%rbp), %rbx
movl 0xac(%r15), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x41b57
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x5da08
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| free_full_pages:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r15, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r14, [rsi+10h]
mov rax, [rdi]
cmp byte ptr [rax+7E7h], 0
jz loc_5D9D8
mov eax, [r15+0ACh]
lea r13d, ds:0[rax*8]
sub r13d, eax
lea r12, [rbp+var_A0]
mov [r12], r13
mov rcx, [rbx+78h]
mov rcx, [rcx]
sub rcx, r12
sub rcx, r13
jbe short loc_5D867
cmp rcx, offset stru_10000
ja short loc_5D84A
cmp r13d, 1000h
jb short loc_5D867
cmp rcx, 8001h
jb short loc_5D867
loc_5D84A:
mov [rbp+var_48], r15
mov [rbp+var_40], rbx
mov rdi, rsp
lea rcx, [r13+0Fh]
and rcx, 0FFFFFFFFFFFFFFF0h
sub rdi, rcx
mov rsp, rdi
mov bl, 1
jmp short loc_5D89E
loc_5D867:
mov edx, 10010h
xor edi, edi
mov rsi, r13
call my_malloc
test rax, rax
jz loc_5D940
mov rdi, rax
mov [rbp+var_40], rbx
mov [rbp+var_48], r15
mov eax, [r15+0ACh]
lea r13d, ds:0[rax*8]
sub r13d, eax
xor ebx, ebx
loc_5D89E:
mov r15, rdi
test eax, eax
jz short loc_5D923
mov [rbp+var_38], ebx
add r13, r14
xor esi, esi
mov r12, r14
mov [rbp+var_50], rdi
mov r15, rdi
loc_5D8B7:
movzx eax, word ptr [r14+5]
test ax, ax
sets cl
test eax, 0BFFFh
setz al
or al, cl
jnz short loc_5D8D7
test rsi, rsi
cmovz rsi, r14
jmp short loc_5D8F2
loc_5D8D7:
test rsi, rsi
jz short loc_5D8F0
mov rbx, r12
sub rbx, rsi
mov rdi, r15
mov rdx, rbx
call _memcpy
add r15, rbx
loc_5D8F0:
xor esi, esi
loc_5D8F2:
add r14, 7
add r12, 7
cmp r14, r13
jb short loc_5D8B7
test rsi, rsi
jz short loc_5D915
sub r12, rsi
mov rdi, r15
mov rdx, r12
call _memcpy
add r15, r12
loc_5D915:
lea r12, [rbp+var_A0]
mov rdi, [rbp+var_50]
mov ebx, [rbp+var_38]
loc_5D923:
sub r15, rdi
mov eax, 0FFFFFFFFh
and rax, r15
jnz short loc_5D947
test bl, bl
jnz short loc_5D939
call my_free
loc_5D939:
xor eax, eax
jmp loc_5D9EA
loc_5D940:
mov al, 1
jmp loc_5D9EA
loc_5D947:
mov r13, rdi
mov ecx, r15d
imul rcx, 24924925h
shr rcx, 20h
mov edx, r15d
sub edx, ecx
shr edx, 1
add edx, ecx
shr edx, 2
lea r10, [rbp+var_34]
mov [r10+2], dx
mov [rbp+var_80], r10
mov [rbp+var_78], 4
mov [rbp+var_70], rdi
mov [rbp+var_68], rax
mov rcx, [rbp+var_40]
mov rdx, [rcx+8]
add r15d, 4
sub rsp, 8
lea rdi, [rbp+var_58]
mov esi, 8
mov [rbp+var_40], rcx
mov r8d, r15d
mov r9d, 4
push 0
push r10
push r12
call translog_write_record
add rsp, 20h
mov r14d, eax
test bl, bl
jnz short loc_5D9C5
mov rdi, r13
call my_free
loc_5D9C5:
mov al, 1
test r14b, r14b
jnz short loc_5D9EA
mov r15, [rbp+var_48]
mov r14, [r15+10h]
mov rbx, [rbp+var_40]
loc_5D9D8:
mov edx, [r15+0ACh]
mov rdi, rbx
mov rsi, r14
call _ma_bitmap_free_full_pages
loc_5D9EA:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_5DA08
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5DA08:
call ___stack_chk_fail
| char free_full_pages(long long *a1, long long a2)
{
long long v2; // r15
long long *v3; // rbx
unsigned long long v4; // r14
int v5; // eax
unsigned long long v6; // r13
unsigned long long v7; // rcx
bool v8; // cc
unsigned long long v9; // rcx
char *v10; // rdi
long long v11; // rax
char *v12; // r15
unsigned long long v13; // r13
unsigned long long v14; // rsi
unsigned long long v15; // r12
unsigned long long v16; // r12
unsigned int v17; // r15d
char result; // al
char v19; // r14
_OWORD v20[2]; // [rsp+0h] [rbp-A0h] BYREF
_WORD *v21; // [rsp+20h] [rbp-80h]
long long v22; // [rsp+28h] [rbp-78h]
char *v23; // [rsp+30h] [rbp-70h]
long long v24; // [rsp+38h] [rbp-68h]
char v25[8]; // [rsp+48h] [rbp-58h] BYREF
char *v26; // [rsp+50h] [rbp-50h]
long long v27; // [rsp+58h] [rbp-48h]
long long *v28; // [rsp+60h] [rbp-40h]
int v29; // [rsp+68h] [rbp-38h]
_WORD v30[2]; // [rsp+6Ch] [rbp-34h] BYREF
unsigned long long v31; // [rsp+70h] [rbp-30h]
v2 = a2;
v3 = a1;
v31 = __readfsqword(0x28u);
v4 = *(_QWORD *)(a2 + 16);
if ( !*(_BYTE *)(*a1 + 2023) )
return ma_bitmap_free_full_pages(v3, (unsigned int *)v4, *(_DWORD *)(v2 + 172));
v5 = *(_DWORD *)(a2 + 172);
v6 = (unsigned int)(7 * v5);
*(_QWORD *)&v20[0] = v6;
v7 = *(_QWORD *)a1[15] - (_QWORD)v20;
v8 = v7 <= v6;
v9 = v7 - v6;
if ( v8 || v9 <= (unsigned long long)&stru_10000 && ((unsigned int)v6 < 0x1000 || v9 < 0x8001) )
{
v11 = my_malloc(0LL, (unsigned int)(7 * v5), 65552LL);
if ( !v11 )
return 1;
v10 = (char *)v11;
v28 = v3;
v27 = a2;
v5 = *(_DWORD *)(a2 + 172);
v6 = (unsigned int)(7 * v5);
LODWORD(v3) = 0;
}
else
{
v27 = a2;
v28 = a1;
v10 = (char *)v20 - ((v6 + 15) & 0xFFFFFFFFFFFFFFF0LL);
LOBYTE(v3) = 1;
}
LODWORD(v12) = (_DWORD)v10;
if ( v5 )
{
v29 = (int)v3;
v13 = v4 + v6;
v14 = 0LL;
v15 = v4;
v26 = v10;
v12 = v10;
do
{
if ( *(__int16 *)(v4 + 5) < 0 || (*(_WORD *)(v4 + 5) & 0xBFFF) == 0 )
{
if ( v14 )
{
memcpy(v12, v14, v15 - v14);
v12 += v15 - v14;
}
v14 = 0LL;
}
else if ( !v14 )
{
v14 = v4;
}
v4 += 7LL;
v15 += 7LL;
}
while ( v4 < v13 );
if ( v14 )
{
v16 = v15 - v14;
memcpy(v12, v14, v16);
LODWORD(v12) = v16 + (_DWORD)v12;
}
v10 = v26;
LOBYTE(v3) = v29;
}
v17 = (_DWORD)v12 - (_DWORD)v10;
if ( !v17 )
{
if ( !(_BYTE)v3 )
my_free(v10);
return 0;
}
v30[1] = v17 / 7;
v21 = v30;
v22 = 4LL;
v23 = v10;
v24 = v17;
v19 = translog_write_record((unsigned long long)v25, &byte_8, v28[1], v28, v17 + 4, 4, v20, v30, 0LL);
if ( !(_BYTE)v3 )
my_free(v10);
result = 1;
if ( !v19 )
{
v2 = v27;
v4 = *(_QWORD *)(v27 + 16);
v3 = v28;
return ma_bitmap_free_full_pages(v3, (unsigned int *)v4, *(_DWORD *)(v2 + 172));
}
return result;
}
| free_full_pages:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R15,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R14,qword ptr [RSI + 0x10]
MOV RAX,qword ptr [RDI]
CMP byte ptr [RAX + 0x7e7],0x0
JZ 0x0015d9d8
MOV EAX,dword ptr [R15 + 0xac]
LEA R13D,[RAX*0x8]
SUB R13D,EAX
LEA R12,[RBP + -0xa0]
MOV qword ptr [R12],R13
MOV RCX,qword ptr [RBX + 0x78]
MOV RCX,qword ptr [RCX]
SUB RCX,R12
SUB RCX,R13
JBE 0x0015d867
CMP RCX,0x10000
JA 0x0015d84a
CMP R13D,0x1000
JC 0x0015d867
CMP RCX,0x8001
JC 0x0015d867
LAB_0015d84a:
MOV qword ptr [RBP + -0x48],R15
MOV qword ptr [RBP + -0x40],RBX
MOV RDI,RSP
LEA RCX,[R13 + 0xf]
AND RCX,-0x10
SUB RDI,RCX
MOV RSP,RDI
MOV BL,0x1
JMP 0x0015d89e
LAB_0015d867:
MOV EDX,0x10010
XOR EDI,EDI
MOV RSI,R13
CALL 0x0019fdb1
TEST RAX,RAX
JZ 0x0015d940
MOV RDI,RAX
MOV qword ptr [RBP + -0x40],RBX
MOV qword ptr [RBP + -0x48],R15
MOV EAX,dword ptr [R15 + 0xac]
LEA R13D,[RAX*0x8]
SUB R13D,EAX
XOR EBX,EBX
LAB_0015d89e:
MOV R15,RDI
TEST EAX,EAX
JZ 0x0015d923
MOV dword ptr [RBP + -0x38],EBX
ADD R13,R14
XOR ESI,ESI
MOV R12,R14
MOV qword ptr [RBP + -0x50],RDI
MOV R15,RDI
LAB_0015d8b7:
MOVZX EAX,word ptr [R14 + 0x5]
TEST AX,AX
SETS CL
TEST EAX,0xbfff
SETZ AL
OR AL,CL
JNZ 0x0015d8d7
TEST RSI,RSI
CMOVZ RSI,R14
JMP 0x0015d8f2
LAB_0015d8d7:
TEST RSI,RSI
JZ 0x0015d8f0
MOV RBX,R12
SUB RBX,RSI
MOV RDI,R15
MOV RDX,RBX
CALL 0x00129080
ADD R15,RBX
LAB_0015d8f0:
XOR ESI,ESI
LAB_0015d8f2:
ADD R14,0x7
ADD R12,0x7
CMP R14,R13
JC 0x0015d8b7
TEST RSI,RSI
JZ 0x0015d915
SUB R12,RSI
MOV RDI,R15
MOV RDX,R12
CALL 0x00129080
ADD R15,R12
LAB_0015d915:
LEA R12,[RBP + -0xa0]
MOV RDI,qword ptr [RBP + -0x50]
MOV EBX,dword ptr [RBP + -0x38]
LAB_0015d923:
SUB R15,RDI
MOV EAX,0xffffffff
AND RAX,R15
JNZ 0x0015d947
TEST BL,BL
JNZ 0x0015d939
CALL 0x0019ffde
LAB_0015d939:
XOR EAX,EAX
JMP 0x0015d9ea
LAB_0015d940:
MOV AL,0x1
JMP 0x0015d9ea
LAB_0015d947:
MOV R13,RDI
MOV ECX,R15D
IMUL RCX,RCX,0x24924925
SHR RCX,0x20
MOV EDX,R15D
SUB EDX,ECX
SHR EDX,0x1
ADD EDX,ECX
SHR EDX,0x2
LEA R10,[RBP + -0x34]
MOV word ptr [R10 + 0x2],DX
MOV qword ptr [RBP + -0x80],R10
MOV qword ptr [RBP + -0x78],0x4
MOV qword ptr [RBP + -0x70],RDI
MOV qword ptr [RBP + -0x68],RAX
MOV RCX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RCX + 0x8]
ADD R15D,0x4
SUB RSP,0x8
LEA RDI,[RBP + -0x58]
MOV ESI,0x8
MOV qword ptr [RBP + -0x40],RCX
MOV R8D,R15D
MOV R9D,0x4
PUSH 0x0
PUSH R10
PUSH R12
CALL 0x0012a8ac
ADD RSP,0x20
MOV R14D,EAX
TEST BL,BL
JNZ 0x0015d9c5
MOV RDI,R13
CALL 0x0019ffde
LAB_0015d9c5:
MOV AL,0x1
TEST R14B,R14B
JNZ 0x0015d9ea
MOV R15,qword ptr [RBP + -0x48]
MOV R14,qword ptr [R15 + 0x10]
MOV RBX,qword ptr [RBP + -0x40]
LAB_0015d9d8:
MOV EDX,dword ptr [R15 + 0xac]
MOV RDI,RBX
MOV RSI,R14
CALL 0x00141b57
LAB_0015d9ea:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x0015da08
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015da08:
CALL 0x00129270
|
int8 free_full_pages(long *param_1,long param_2)
{
int4 uVar1;
long lVar2;
long *plVar3;
ulong *puVar4;
char cVar5;
int8 uVar6;
int iVar7;
ulong uVar8;
ulong *puVar9;
void *__src;
int1 *puVar10;
void *pvVar11;
void *pvVar12;
void *pvVar13;
int1 *__dest;
ulong uVar14;
long in_FS_OFFSET;
ulong local_a8 [4];
int1 *local_88;
int8 local_80;
int1 *local_78;
ulong local_70;
int1 local_60 [8];
int1 *local_58;
long local_50;
long *local_48;
uint local_40;
int1 local_3c [2];
int2 local_3a;
long local_38;
puVar9 = local_a8;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pvVar11 = *(void **)(param_2 + 0x10);
puVar4 = local_a8;
if (*(char *)(*param_1 + 0x7e7) != '\0') {
iVar7 = *(int *)(param_2 + 0xac);
uVar14 = (ulong)(uint)(iVar7 * 7);
uVar8 = (*(long *)param_1[0xf] - (long)local_a8) - uVar14;
local_a8[0] = uVar14;
if ((uVar14 < (ulong)(*(long *)param_1[0xf] - (long)local_a8)) &&
((0x10000 < uVar8 || ((0xfff < (uint)(iVar7 * 7) && (0x8000 < uVar8)))))) {
__dest = (int1 *)((long)local_a8 - (uVar14 + 0xf & 0xfffffffffffffff0));
uVar8 = CONCAT71((int7)((ulong)param_1 >> 8),1);
puVar9 = (ulong *)__dest;
}
else {
__dest = (int1 *)my_malloc(0,uVar14,0x10010);
if (__dest == (int1 *)0x0) {
uVar6 = 1;
goto LAB_0015d9ea;
}
iVar7 = *(int *)(param_2 + 0xac);
uVar14 = (ulong)(uint)(iVar7 * 7);
uVar8 = 0;
puVar9 = local_a8;
}
puVar10 = __dest;
local_50 = param_2;
local_48 = param_1;
if (iVar7 != 0) {
local_40 = (uint)uVar8;
pvVar12 = (void *)(uVar14 + (long)pvVar11);
__src = (void *)0x0;
pvVar13 = pvVar11;
local_58 = __dest;
do {
if ((*(ushort *)((long)pvVar13 + 5) & 0xbfff) == 0 ||
(short)*(ushort *)((long)pvVar13 + 5) < 0) {
if (__src != (void *)0x0) {
*(int8 *)((long)puVar9 + -8) = 0x15d8ed;
memcpy(__dest,__src,(long)pvVar11 - (long)__src);
__dest = __dest + ((long)pvVar11 - (long)__src);
}
__src = (void *)0x0;
}
else if (__src == (void *)0x0) {
__src = pvVar13;
}
pvVar13 = (void *)((long)pvVar13 + 7);
pvVar11 = (void *)((long)pvVar11 + 7);
} while (pvVar13 < pvVar12);
if (__src != (void *)0x0) {
*(int8 *)((long)puVar9 + -8) = 0x15d912;
memcpy(__dest,__src,(long)pvVar11 - (long)__src);
__dest = __dest + ((long)pvVar11 - (long)__src);
}
uVar8 = (ulong)local_40;
puVar10 = local_58;
}
plVar3 = local_48;
uVar14 = (long)__dest - (long)puVar10;
if ((uVar14 & 0xffffffff) == 0) {
if ((char)uVar8 == '\0') {
*(int8 *)((long)puVar9 + -8) = 0x15d939;
my_free();
}
uVar6 = 0;
goto LAB_0015d9ea;
}
iVar7 = (int)((uVar14 & 0xffffffff) * 0x24924925 >> 0x20);
local_3a = (int2)(((uint)((int)uVar14 - iVar7) >> 1) + iVar7 >> 2);
local_80 = 4;
lVar2 = local_48[1];
local_88 = local_3c;
local_78 = puVar10;
local_70 = uVar14 & 0xffffffff;
*(int8 *)((long)puVar9 + -0x10) = 0;
*(int1 **)((long)puVar9 + -0x18) = local_3c;
*(ulong **)((long)puVar9 + -0x20) = local_a8;
*(int8 *)((long)puVar9 + -0x28) = 0x15d9b2;
cVar5 = translog_write_record(local_60,8,lVar2,plVar3,(int)uVar14 + 4,4);
if ((char)uVar8 == '\0') {
*(int8 *)((long)puVar9 + -8) = 0x15d9c5;
my_free(puVar10);
}
uVar6 = 1;
if (cVar5 != '\0') goto LAB_0015d9ea;
pvVar11 = *(void **)(local_50 + 0x10);
param_1 = local_48;
puVar4 = puVar9;
param_2 = local_50;
}
puVar9 = puVar4;
uVar1 = *(int4 *)(param_2 + 0xac);
*(int8 *)((long)puVar9 + -8) = 0x15d9ea;
uVar6 = _ma_bitmap_free_full_pages(param_1,pvVar11,uVar1);
LAB_0015d9ea:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)((long)puVar9 + -8) = _ma_read_block_record2;
__stack_chk_fail();
}
return uVar6;
}
| |
35,955 | minja::CallExpr::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 (!object) throw std::runtime_error("CallExpr.object is null");
auto obj = object->evaluate(context);
if (!obj.is_callable()) {
throw std::runtime_error("Object is not callable: " + obj.dump(2));
}
auto vargs = args.evaluate(context);
return obj.call(context, vargs);
} | O3 | cpp | minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %r15
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x99c76
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x50(%rsp), %r12
movq %r12, %rdi
callq 0x8aca0
cmpq $0x0, 0x30(%r12)
je 0x99ca8
addq $0x30, %r15
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x9721a
leaq 0x50(%rsp), %rsi
movq %rsp, %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x9859a
leaq 0x18(%rsp), %rdi
callq 0x998e2
movq %rsp, %rdi
callq 0x92774
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5d774
movq %r14, %rdi
callq 0x62bf0
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x99c0f
callq 0x725dc
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x99c1e
callq 0x725dc
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x99c2d
callq 0x725dc
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x99c63
movq 0x97342(%rip), %rax # 0x130f80
cmpb $0x0, (%rax)
je 0x99c4e
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x99c58
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x99c63
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1b460
movq %rax, %rbx
leaq 0x5adf0(%rip), %rsi # 0xf4a7a
movq %rax, %rdi
callq 0x1b340
movq 0x9734f(%rip), %rsi # 0x130fe8
movq 0x972b8(%rip), %rdx # 0x130f58
movq %rbx, %rdi
callq 0x1bfb0
movl $0x10, %edi
callq 0x1b460
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x8b2b4
leaq 0x5b043(%rip), %rsi # 0xf4d15
movq %rsp, %rdi
leaq 0x30(%rsp), %rdx
callq 0x7db09
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1beb0
xorl %ebp, %ebp
movq 0x972f2(%rip), %rsi # 0x130fe8
movq 0x9725b(%rip), %rdx # 0x130f58
movq %rbx, %rdi
callq 0x1bfb0
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99d23
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b910
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99d3e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1b910
testb %bpl, %bpl
jne 0x99d68
jmp 0x99d99
movq %rax, %r14
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99d68
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0x99d68
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b6a0
jmp 0x99d99
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b6a0
jmp 0x99da3
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x998e2
movq %rsp, %rdi
callq 0x92774
jmp 0x99d99
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x8af92
movq %r14, %rdi
callq 0x1c030
nop
| _ZNK5minja8CallExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 0A0h
mov r15, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz loc_99C76
mov r14, rdx
mov rbx, rdi
lea r12, [rsp+0C8h+var_78]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
cmp qword ptr [r12+30h], 0
jz loc_99CA8
add r15, 30h ; '0'
mov rdi, rsp
mov rsi, r15
mov rdx, r14
call _ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)
lea rsi, [rsp+0C8h+var_78]
mov rcx, rsp
mov rdi, rbx
mov rdx, r14
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
lea rdi, [rsp+0C8h+var_B0]
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector()
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
lea r14, [rsp+0C8h+var_38]
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_99C0F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_99C0F:
mov rdi, [rsp+0C8h+var_50]
test rdi, rdi
jz short loc_99C1E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_99C1E:
mov rdi, [rsp+0C8h+var_60]
test rdi, rdi
jz short loc_99C2D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_99C2D:
mov rdi, [rsp+0C8h+var_70]
test rdi, rdi
jz short loc_99C63
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_99C4E
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_99C58
loc_99C4E:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_99C58:
cmp eax, 1
jnz short loc_99C63
mov rax, [rdi]
call qword ptr [rax+18h]
loc_99C63:
mov rax, rbx
add rsp, 0A0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_99C76:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aMethodcallexpr+6; char *
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_99CA8:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+0C8h+var_98]
lea rsi, [rsp+0C8h+var_78]
mov edx, 2
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aObjectIsNotCal; "Object is not callable: "
mov rdi, rsp
lea rdx, [rsp+0C8h+var_98]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
mov rsi, rsp
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+0C8h+var_B8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_99D23
mov rsi, [rsp+0C8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_99D23:
lea rax, [rsp+0C8h+var_88]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_99D3E
mov rsi, [rsp+0C8h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_99D3E:
test bpl, bpl
jnz short loc_99D68
jmp short loc_99D99
mov r14, rax
lea rax, [rsp+0C8h+var_88]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_99D68
mov rsi, [rsp+0C8h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_99D68
mov r14, rax
loc_99D68:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_99D99
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_99DA3
mov r14, rax
lea rdi, [rsp+0C8h+var_B0]
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector()
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
jmp short loc_99D99
mov r14, rax
loc_99D99:
lea rdi, [rsp+0C8h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_99DA3:
mov rdi, r14
call __Unwind_Resume
| long long minja::CallExpr::do_evaluate(long long a1, long long a2, long long a3)
{
void (***v4)(void); // rsi
long long v7; // rdi
signed __int32 v8; // eax
std::runtime_error *exception; // rbx
void *v11; // rbx
__int128 v12; // [rsp+0h] [rbp-C8h] BYREF
char *v13; // [rsp+18h] [rbp-B0h] BYREF
_BYTE v14[16]; // [rsp+30h] [rbp-98h] BYREF
_BYTE v15[8]; // [rsp+50h] [rbp-78h] BYREF
long long v16; // [rsp+58h] [rbp-70h]
volatile signed __int32 *v17; // [rsp+68h] [rbp-60h]
volatile signed __int32 *v18; // [rsp+78h] [rbp-50h]
long long v19; // [rsp+80h] [rbp-48h]
volatile signed __int32 *v20; // [rsp+88h] [rbp-40h]
char v21[56]; // [rsp+90h] [rbp-38h] BYREF
v4 = *(void (****)(void))(a2 + 32);
if ( !v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "CallExpr.object is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v15, v4);
if ( !v19 )
{
v11 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v14, (long long)v15, 2u, 0);
std::operator+<char>((long long)&v12, (long long)"Object is not callable: ", (long long)v14);
std::runtime_error::runtime_error(v11, &v12);
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::ArgumentsExpression::evaluate(&v12, (_QWORD *)(a2 + 48), a3);
minja::Value::call(a1, (long long)v15);
std::vector<std::pair<std::string,minja::Value>>::~vector(&v13);
std::vector<minja::Value>::~vector(&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(v21);
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(v21);
if ( v20 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20);
if ( v18 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18);
if ( v17 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
v7 = v16;
if ( v16 )
{
if ( _libc_single_threaded )
{
v8 = *(_DWORD *)(v16 + 12);
*(_DWORD *)(v16 + 12) = v8 - 1;
}
else
{
v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(v16 + 12), 0xFFFFFFFF);
}
if ( v8 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL);
}
return a1;
}
| do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xa0
MOV R15,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x00199c76
MOV R14,RDX
MOV RBX,RDI
LEA R12,[RSP + 0x50]
MOV RDI,R12
CALL 0x0018aca0
CMP qword ptr [R12 + 0x30],0x0
JZ 0x00199ca8
ADD R15,0x30
LAB_00199bb4:
MOV RDI,RSP
MOV RSI,R15
MOV RDX,R14
CALL 0x0019721a
LAB_00199bc2:
LEA RSI,[RSP + 0x50]
MOV RCX,RSP
MOV RDI,RBX
MOV RDX,R14
CALL 0x0019859a
LAB_00199bd5:
LEA RDI,[RSP + 0x18]
CALL 0x001998e2
MOV RDI,RSP
CALL 0x00192774
LEA R14,[RSP + 0x90]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015d774
MOV RDI,R14
CALL 0x00162bf0
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x00199c0f
CALL 0x001725dc
LAB_00199c0f:
MOV RDI,qword ptr [RSP + 0x78]
TEST RDI,RDI
JZ 0x00199c1e
CALL 0x001725dc
LAB_00199c1e:
MOV RDI,qword ptr [RSP + 0x68]
TEST RDI,RDI
JZ 0x00199c2d
CALL 0x001725dc
LAB_00199c2d:
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x00199c63
MOV RAX,qword ptr [0x00230f80]
CMP byte ptr [RAX],0x0
JZ 0x00199c4e
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00199c58
LAB_00199c4e:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00199c58:
CMP EAX,0x1
JNZ 0x00199c63
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_00199c63:
MOV RAX,RBX
ADD RSP,0xa0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00199c76:
MOV EDI,0x10
CALL 0x0011b460
MOV RBX,RAX
LAB_00199c83:
LEA RSI,[0x1f4a7a]
MOV RDI,RAX
CALL 0x0011b340
LAB_00199c92:
MOV RSI,qword ptr [0x00230fe8]
MOV RDX,qword ptr [0x00230f58]
MOV RDI,RBX
CALL 0x0011bfb0
LAB_00199ca8:
MOV EDI,0x10
CALL 0x0011b460
MOV RBX,RAX
LAB_00199cb5:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x50]
MOV EDX,0x2
XOR ECX,ECX
CALL 0x0018b2b4
LAB_00199ccb:
LEA RSI,[0x1f4d15]
MOV RDI,RSP
LEA RDX,[RSP + 0x30]
CALL 0x0017db09
MOV BPL,0x1
LAB_00199ce2:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x0011beb0
XOR EBP,EBP
MOV RSI,qword ptr [0x00230fe8]
MOV RDX,qword ptr [0x00230f58]
MOV RDI,RBX
CALL 0x0011bfb0
|
/* minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
CallExpr * __thiscall minja::CallExpr::do_evaluate(CallExpr *this,shared_ptr *param_1)
{
int *piVar1;
int iVar2;
runtime_error *prVar3;
shared_ptr asStack_c8 [24];
vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
local_b0 [24];
int1 local_98 [32];
Expression local_78 [8];
long *local_70;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
long local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
data local_38 [16];
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00199c83 to 00199c91 has its CatchHandler @ 00199d72 */
std::runtime_error::runtime_error(prVar3,"CallExpr.object is null");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f58);
}
Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20));
if (local_48 != 0) {
/* try { // try from 00199bb4 to 00199bc1 has its CatchHandler @ 00199d96 */
ArgumentsExpression::evaluate(asStack_c8);
/* try { // try from 00199bc2 to 00199bd4 has its CatchHandler @ 00199d7f */
Value::call((shared_ptr *)this,(ArgumentsValue *)local_78);
std::
vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
::~vector(local_b0);
std::vector<minja::Value,std::allocator<minja::Value>>::~vector
((vector<minja::Value,std::allocator<minja::Value>> *)asStack_c8);
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_38,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_38);
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
if (local_70 != (long *)0x0) {
if (*PTR___libc_single_threaded_00230f80 == '\0') {
LOCK();
piVar1 = (int *)((long)local_70 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_70 + 0xc);
*(int *)((long)local_70 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_70 + 0x18))();
}
}
return this;
}
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00199cb5 to 00199cca has its CatchHandler @ 00199d65 */
Value::dump_abi_cxx11_((int)local_98,SUB81(local_78,0));
/* try { // try from 00199ccb to 00199cde has its CatchHandler @ 00199d45 */
std::operator+((char *)asStack_c8,(string *)"Object is not callable: ");
/* try { // try from 00199ce2 to 00199d04 has its CatchHandler @ 00199d05 */
std::runtime_error::runtime_error(prVar3,(string *)asStack_c8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f58);
}
| |
35,956 | my_vfprintf | eloqsql/strings/my_vsnprintf.c | int my_vfprintf(FILE *stream, const char* format, va_list args)
{
char cvtbuf[1024];
int alloc= 0;
char *p= cvtbuf;
size_t cur_len= sizeof(cvtbuf), actual;
int ret;
/*
We do not know how much buffer we need.
So start with a reasonably-sized stack-allocated buffer, and increase
it exponentially until it is big enough.
*/
for (;;)
{
size_t new_len;
actual= my_vsnprintf(p, cur_len, format, args);
if (actual < cur_len - 1)
break;
/*
Not enough space (or just enough with nothing to spare - but we cannot
distinguish this case from the return value). Allocate a bigger buffer
and try again.
*/
if (alloc)
my_free(p);
else
alloc= 1;
new_len= cur_len*2;
if (new_len < cur_len)
return 0; /* Overflow */
cur_len= new_len;
p= my_malloc(PSI_INSTRUMENT_ME, cur_len, MYF(MY_FAE));
if (!p)
return 0;
}
ret= (int) actual;
if (fputs(p, stream) < 0)
ret= -1;
if (alloc)
my_free(p);
return ret;
} | O3 | c | my_vfprintf:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp # imm = 0x418
movq %rdx, -0x440(%rbp)
movq %rsi, %r12
movq %rdi, -0x438(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movb $0x1, %bl
movl $0x400, %r13d # imm = 0x400
leaq -0x430(%rbp), %r14
leaq 0x2d4bbc(%rip), %rdi # 0x3acf60
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq -0x440(%rbp), %r8
callq 0xd70f4
movq %rax, %r15
leaq -0x1(%r13), %rax
cmpq %rax, %r15
jb 0xd83f5
testb $0x1, %bl
jne 0xd83d2
movq %r14, %rdi
callq 0xa1586
testq %r13, %r13
js 0xd8422
addq %r13, %r13
xorl %ebx, %ebx
movl $0x8, %edx
xorl %edi, %edi
movq %r13, %rsi
callq 0xa1359
movq %rax, %r14
testq %rax, %rax
jne 0xd839d
jmp 0xd8424
movq %r14, %rdi
movq -0x438(%rbp), %rsi
callq 0x29290
testl %eax, %eax
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
cmovnsl %r15d, %r12d
testb $0x1, %bl
jne 0xd841d
movq %r14, %rdi
callq 0xa1586
movl %r12d, %ebx
jmp 0xd8424
xorl %ebx, %ebx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xd8447
movl %ebx, %eax
addq $0x418, %rsp # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29220
| my_vfprintf:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 418h
mov [rbp+var_440], rdx
mov r12, rsi
mov [rbp+var_438], rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov bl, 1
mov r13d, 400h
lea r14, [rbp+var_430]
loc_D839D:
lea rdi, my_charset_latin1
mov rsi, r14
mov rdx, r13
mov rcx, r12
mov r8, [rbp+var_440]
call my_vsnprintf_ex
mov r15, rax
lea rax, [r13-1]
cmp r15, rax
jb short loc_D83F5
test bl, 1
jnz short loc_D83D2
mov rdi, r14
call my_free
loc_D83D2:
test r13, r13
js short loc_D8422
add r13, r13
xor ebx, ebx
mov edx, 8
xor edi, edi
mov rsi, r13
call my_malloc
mov r14, rax
test rax, rax
jnz short loc_D839D
jmp short loc_D8424
loc_D83F5:
mov rdi, r14
mov rsi, [rbp+var_438]
call _fputs
test eax, eax
mov r12d, 0FFFFFFFFh
cmovns r12d, r15d
test bl, 1
jnz short loc_D841D
mov rdi, r14
call my_free
loc_D841D:
mov ebx, r12d
jmp short loc_D8424
loc_D8422:
xor ebx, ebx
loc_D8424:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_D8447
mov eax, ebx
add rsp, 418h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D8447:
call ___stack_chk_fail
| long long my_vfprintf(long long a1, unsigned __int8 *a2, unsigned int *a3)
{
unsigned int v3; // ebx
long long v4; // r13
char *v5; // r14
unsigned long long v6; // r15
unsigned int v7; // r12d
char v10; // [rsp+10h] [rbp-430h] BYREF
unsigned long long v11; // [rsp+410h] [rbp-30h]
v11 = __readfsqword(0x28u);
LOBYTE(v3) = 1;
v4 = 1024LL;
v5 = &v10;
while ( 1 )
{
v6 = my_vsnprintf_ex((long long)my_charset_latin1, (unsigned long long)v5, v4, a2, a3);
if ( v6 < v4 - 1 )
break;
if ( (v3 & 1) == 0 )
my_free((long long)v5);
if ( v4 < 0 )
return 0;
v4 *= 2LL;
v3 = 0;
v5 = (char *)my_malloc(0, v4, 8);
if ( !v5 )
return v3;
}
v7 = -1;
if ( (int)fputs(v5, a1) >= 0 )
v7 = v6;
if ( (v3 & 1) == 0 )
my_free((long long)v5);
return v7;
}
| my_vfprintf:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x418
MOV qword ptr [RBP + -0x440],RDX
MOV R12,RSI
MOV qword ptr [RBP + -0x438],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV BL,0x1
MOV R13D,0x400
LEA R14,[RBP + -0x430]
LAB_001d839d:
LEA RDI,[0x4acf60]
MOV RSI,R14
MOV RDX,R13
MOV RCX,R12
MOV R8,qword ptr [RBP + -0x440]
CALL 0x001d70f4
MOV R15,RAX
LEA RAX,[R13 + -0x1]
CMP R15,RAX
JC 0x001d83f5
TEST BL,0x1
JNZ 0x001d83d2
MOV RDI,R14
CALL 0x001a1586
LAB_001d83d2:
TEST R13,R13
JS 0x001d8422
ADD R13,R13
XOR EBX,EBX
MOV EDX,0x8
XOR EDI,EDI
MOV RSI,R13
CALL 0x001a1359
MOV R14,RAX
TEST RAX,RAX
JNZ 0x001d839d
JMP 0x001d8424
LAB_001d83f5:
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x438]
CALL 0x00129290
TEST EAX,EAX
MOV R12D,0xffffffff
CMOVNS R12D,R15D
TEST BL,0x1
JNZ 0x001d841d
MOV RDI,R14
CALL 0x001a1586
LAB_001d841d:
MOV EBX,R12D
JMP 0x001d8424
LAB_001d8422:
XOR EBX,EBX
LAB_001d8424:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001d8447
MOV EAX,EBX
ADD RSP,0x418
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d8447:
CALL 0x00129220
|
ulong my_vfprintf(FILE *param_1,int8 param_2,int8 param_3)
{
int iVar1;
ulong uVar2;
char *__s;
ulong uVar3;
ulong uVar4;
long lVar5;
long in_FS_OFFSET;
char local_438 [1024];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar5 = 0x400;
__s = local_438;
uVar3 = 1;
do {
uVar2 = my_vsnprintf_ex(&my_charset_latin1,__s,lVar5,param_2,param_3);
if (uVar2 < lVar5 - 1U) {
iVar1 = fputs(__s,param_1);
uVar4 = 0xffffffff;
if (-1 < iVar1) {
uVar4 = uVar2 & 0xffffffff;
}
if (uVar3 == 0) {
my_free(__s);
}
break;
}
if ((char)uVar3 == '\0') {
my_free(__s);
}
if (lVar5 < 0) {
uVar4 = 0;
break;
}
lVar5 = lVar5 * 2;
uVar4 = 0;
__s = (char *)my_malloc(0,lVar5,8);
uVar3 = uVar4;
} while (__s != (char *)0x0);
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar4;
}
| |
35,957 | 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);
} | O3 | c | my_init_mysys_psi_keys:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2ebf4f(%rip), %r14 # 0x36ffe8
movq (%r14), %rax
leaq 0x3cf2e(%rip), %rbx # 0xc0fd1
leaq 0x2eb716(%rip), %rsi # 0x36f7c0
movq %rbx, %rdi
movl $0x13, %edx
callq *(%rax)
movq (%r14), %rax
leaq 0x2eb8d2(%rip), %rsi # 0x36f990
movq %rbx, %rdi
movl $0x7, %edx
callq *0x10(%rax)
movq (%r14), %rax
leaq 0x2eb96d(%rip), %rsi # 0x36fa40
movq %rbx, %rdi
movl $0x1, %edx
callq *0x8(%rax)
movq (%r14), %rax
leaq 0x2eb978(%rip), %rsi # 0x36fa60
movq %rbx, %rdi
movl $0x1, %edx
callq *0x18(%rax)
movq (%r14), %rax
leaq 0x2eb983(%rip), %rsi # 0x36fa80
movq %rbx, %rdi
movl $0x2, %edx
callq *0x20(%rax)
movq (%r14), %rax
movq 0x28(%rax), %rax
leaq 0x2eb69a(%rip), %rsi # 0x36f7b0
movq %rbx, %rdi
movl $0x1, %edx
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
| my_init_mysys_psi_keys:
push rbp
mov rbp, rsp
push r14
push rbx
lea r14, PSI_server
mov rax, [r14]
lea rbx, aMysys; "mysys"
lea rsi, all_mysys_mutexes
mov rdi, rbx
mov edx, 13h
call qword ptr [rax]
mov rax, [r14]
lea rsi, all_mysys_conds
mov rdi, rbx
mov edx, 7
call qword ptr [rax+10h]
mov rax, [r14]
lea rsi, all_mysys_rwlocks
mov rdi, rbx
mov edx, 1
call qword ptr [rax+8]
mov rax, [r14]
lea rsi, all_mysys_threads
mov rdi, rbx
mov edx, 1
call qword ptr [rax+18h]
mov rax, [r14]
lea rsi, all_mysys_files
mov rdi, rbx
mov edx, 2
call qword ptr [rax+20h]
mov rax, [r14]
mov rax, [rax+28h]
lea rsi, all_mysys_stages
mov rdi, rbx
mov edx, 1
pop rbx
pop r14
pop rbp
jmp rax
| long long my_init_mysys_psi_keys()
{
(*(void ( **)(const char *, _UNKNOWN **, long long))PSI_server)("mysys", &all_mysys_mutexes, 19LL);
(*((void ( **)(const char *, _UNKNOWN **, long long))PSI_server + 2))("mysys", &all_mysys_conds, 7LL);
(*((void ( **)(const char *, _UNKNOWN **, long long))PSI_server + 1))("mysys", &all_mysys_rwlocks, 1LL);
(*((void ( **)(const char *, _UNKNOWN **, long long))PSI_server + 3))("mysys", &all_mysys_threads, 1LL);
(*((void ( **)(const char *, _UNKNOWN **, long long))PSI_server + 4))("mysys", &all_mysys_files, 2LL);
return (*((long long ( **)(const char *, _UNKNOWN **, long long))PSI_server + 5))(
"mysys",
&all_mysys_stages,
1LL);
}
| my_init_mysys_psi_keys:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA R14,[0x46ffe8]
MOV RAX,qword ptr [R14]
LEA RBX,[0x1c0fd1]
LEA RSI,[0x46f7c0]
MOV RDI,RBX
MOV EDX,0x13
CALL qword ptr [RAX]
MOV RAX,qword ptr [R14]
LEA RSI,[0x46f990]
MOV RDI,RBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x10]
MOV RAX,qword ptr [R14]
LEA RSI,[0x46fa40]
MOV RDI,RBX
MOV EDX,0x1
CALL qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R14]
LEA RSI,[0x46fa60]
MOV RDI,RBX
MOV EDX,0x1
CALL qword ptr [RAX + 0x18]
MOV RAX,qword ptr [R14]
LEA RSI,[0x46fa80]
MOV RDI,RBX
MOV EDX,0x2
CALL qword ptr [RAX + 0x20]
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x28]
LEA RSI,[0x46f7b0]
MOV RDI,RBX
MOV EDX,0x1
POP RBX
POP R14
POP RBP
JMP RAX
|
void my_init_mysys_psi_keys(void)
{
(**(code **)PSI_server)("mysys",all_mysys_mutexes,0x13);
(**(code **)(PSI_server + 0x10))("mysys",all_mysys_conds,7);
(**(code **)(PSI_server + 8))("mysys",all_mysys_rwlocks,1);
(**(code **)(PSI_server + 0x18))("mysys",all_mysys_threads,1);
(**(code **)(PSI_server + 0x20))("mysys",all_mysys_files,2);
/* WARNING: Could not recover jumptable at 0x00184122. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(PSI_server + 0x28))("mysys",&all_mysys_stages,1);
return;
}
| |
35,958 | my_wildcmp_bin_impl | eloqsql/strings/ctype-bin.c | static
int my_wildcmp_bin_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (*wildstr != w_many && *wildstr != w_one)
{
if (*wildstr == escape && wildstr+1 != wildend)
wildstr++;
if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++))
return(1); /* No match */
if (wildstr == wildend)
return(str != str_end); /* Match if both are at end */
result=1; /* Found an anchor char */
}
if (*wildstr == w_one)
{
do
{
if (str == str_end) /* Skip one char if possible */
return(result);
INC_PTR(cs,str,str_end);
} while (++wildstr < wildend && *wildstr == w_one);
if (wildstr == wildend)
break;
}
if (*wildstr == w_many)
{ /* Found w_many */
uchar cmp;
wildstr++;
/* Remove any '%' and '_' from the wild search string */
for (; wildstr != wildend ; wildstr++)
{
if (*wildstr == w_many)
continue;
if (*wildstr == w_one)
{
if (str == str_end)
return(-1);
INC_PTR(cs,str,str_end);
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return(0); /* match if w_many is last */
if (str == str_end)
return(-1);
if ((cmp= *wildstr) == escape && wildstr+1 != wildend)
cmp= *++wildstr;
INC_PTR(cs,wildstr,wildend); /* This is compared through cmp */
cmp=likeconv(cs,cmp);
do
{
while (str != str_end && (uchar) likeconv(cs,*str) != cmp)
str++;
if (str++ == str_end)
return(-1);
{
int tmp=my_wildcmp_bin_impl(cs,str,str_end,wildstr,wildend,escape,w_one,
w_many, recurse_level + 1);
if (tmp <= 0)
return(tmp);
}
} while (str != str_end);
return(-1);
}
}
return(str != str_end ? 1 : 0);
} | O0 | c | my_wildcmp_bin_impl:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
leaq 0x359251(%rip), %rax # 0x396628
cmpq $0x0, (%rax)
je 0x3d3fd
leaq 0x359244(%rip), %rax # 0x396628
movq (%rax), %rax
movl 0x20(%rbp), %edi
callq *%rax
cmpl $0x0, %eax
je 0x3d3fd
movl $0x1, -0x4(%rbp)
jmp 0x3d6fa
jmp 0x3d3ff
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x3d6e2
jmp 0x3d40f
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl 0x18(%rbp), %ecx
movb %al, -0x41(%rbp)
je 0x3d430
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x10(%rbp), %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x3d43c
jmp 0x3d4ce
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl -0x34(%rbp), %eax
jne 0x3d462
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
je 0x3d462
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x3d494
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movsbl (%rax), %eax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x3d4a0
movl $0x1, -0x4(%rbp)
jmp 0x3d6fa
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x3d4c2
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x3d6fa
movl $0x1, -0x38(%rbp)
jmp 0x3d40f
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x10(%rbp), %eax
jne 0x3d53c
jmp 0x3d4dc
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x3d4f1
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3d6fa
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
xorl %eax, %eax
cmpq -0x30(%rbp), %rcx
movb %al, -0x42(%rbp)
jae 0x3d524
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x10(%rbp), %eax
sete %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
testb $0x1, %al
jne 0x3d4dc
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x3d53a
jmp 0x3d6e2
jmp 0x3d53c
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x18(%rbp), %eax
jne 0x3d6dd
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x3d5b0
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x18(%rbp), %eax
jne 0x3d570
jmp 0x3d5a2
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x10(%rbp), %eax
jne 0x3d5a0
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x3d592
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3d6fa
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3d5a2
jmp 0x3d5b0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x3d558
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x3d5c6
movl $0x0, -0x4(%rbp)
jmp 0x3d6fa
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x3d5dc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3d6fa
movq -0x28(%rbp), %rax
movb (%rax), %al
movb %al, -0x39(%rbp)
movzbl %al, %eax
cmpl -0x34(%rbp), %eax
jne 0x3d610
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
je 0x3d610
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb 0x1(%rax), %al
movb %al, -0x39(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movb -0x39(%rbp), %al
movb %al, -0x39(%rbp)
jmp 0x3d624
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x43(%rbp)
je 0x3d646
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movzbl -0x39(%rbp), %ecx
cmpl %ecx, %eax
setne %al
movb %al, -0x43(%rbp)
movb -0x43(%rbp), %al
testb $0x1, %al
jne 0x3d64f
jmp 0x3d65d
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3d624
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
cmpq -0x20(%rbp), %rax
jne 0x3d67b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3d6fa
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movl -0x34(%rbp), %r9d
movl 0x10(%rbp), %r11d
movl 0x18(%rbp), %r10d
movl 0x20(%rbp), %eax
addl $0x1, %eax
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x3d3a0
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jg 0x3d6c4
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3d6fa
jmp 0x3d6c6
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x3d622
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3d6fa
jmp 0x3d3ff
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_wildcmp_bin_impl:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_10]
mov eax, [rbp+arg_8]
mov eax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_34], r9d
mov [rbp+var_38], 0FFFFFFFFh
lea rax, my_string_stack_guard
cmp qword ptr [rax], 0
jz short loc_3D3FD
lea rax, my_string_stack_guard
mov rax, [rax]
mov edi, [rbp+arg_10]
call rax
cmp eax, 0
jz short loc_3D3FD
mov [rbp+var_4], 1
jmp loc_3D6FA
loc_3D3FD:
jmp short $+2
loc_3D3FF:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jz loc_3D6E2
jmp short $+2
loc_3D40F:
mov rax, [rbp+var_28]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, [rbp+arg_8]
mov [rbp+var_41], al
jz short loc_3D430
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_0]
setnz al
mov [rbp+var_41], al
loc_3D430:
mov al, [rbp+var_41]
test al, 1
jnz short loc_3D43C
jmp loc_3D4CE
loc_3D43C:
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+var_34]
jnz short loc_3D462
mov rax, [rbp+var_28]
add rax, 1
cmp rax, [rbp+var_30]
jz short loc_3D462
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
loc_3D462:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jz short loc_3D494
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
movsx eax, byte ptr [rax]
mov rcx, [rbp+var_18]
mov rdx, rcx
add rdx, 1
mov [rbp+var_18], rdx
movsx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_3D4A0
loc_3D494:
mov [rbp+var_4], 1
jmp loc_3D6FA
loc_3D4A0:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnz short loc_3D4C2
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
setnz al
and al, 1
movzx eax, al
mov [rbp+var_4], eax
jmp loc_3D6FA
loc_3D4C2:
mov [rbp+var_38], 1
jmp loc_3D40F
loc_3D4CE:
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_0]
jnz short loc_3D53C
jmp short $+2
loc_3D4DC:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_3D4F1
mov eax, [rbp+var_38]
mov [rbp+var_4], eax
jmp loc_3D6FA
loc_3D4F1:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
mov rcx, [rbp+var_28]
add rcx, 1
mov [rbp+var_28], rcx
xor eax, eax
cmp rcx, [rbp+var_30]
mov [rbp+var_42], al
jnb short loc_3D524
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_0]
setz al
mov [rbp+var_42], al
loc_3D524:
mov al, [rbp+var_42]
test al, 1
jnz short loc_3D4DC
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnz short loc_3D53A
jmp loc_3D6E2
loc_3D53A:
jmp short $+2
loc_3D53C:
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_8]
jnz loc_3D6DD
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
loc_3D558:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jz short loc_3D5B0
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_8]
jnz short loc_3D570
jmp short loc_3D5A2
loc_3D570:
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_0]
jnz short loc_3D5A0
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_3D592
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_3D6FA
loc_3D592:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_3D5A2
loc_3D5A0:
jmp short loc_3D5B0
loc_3D5A2:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_3D558
loc_3D5B0:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnz short loc_3D5C6
mov [rbp+var_4], 0
jmp loc_3D6FA
loc_3D5C6:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_3D5DC
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_3D6FA
loc_3D5DC:
mov rax, [rbp+var_28]
mov al, [rax]
mov [rbp+var_39], al
movzx eax, al
cmp eax, [rbp+var_34]
jnz short loc_3D610
mov rax, [rbp+var_28]
add rax, 1
cmp rax, [rbp+var_30]
jz short loc_3D610
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov al, [rax+1]
mov [rbp+var_39], al
loc_3D610:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov al, [rbp+var_39]
mov [rbp+var_39], al
loc_3D622:
jmp short $+2
loc_3D624:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_20]
mov [rbp+var_43], al
jz short loc_3D646
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
movzx ecx, [rbp+var_39]
cmp eax, ecx
setnz al
mov [rbp+var_43], al
loc_3D646:
mov al, [rbp+var_43]
test al, 1
jnz short loc_3D64F
jmp short loc_3D65D
loc_3D64F:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_3D624
loc_3D65D:
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
cmp rax, [rbp+var_20]
jnz short loc_3D67B
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_3D6FA
loc_3D67B:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9d, [rbp+var_34]
mov r11d, [rbp+arg_0]
mov r10d, [rbp+arg_8]
mov eax, [rbp+arg_10]
add eax, 1
mov [rsp+60h+var_60], r11d
mov [rsp+60h+var_58], r10d
mov [rsp+60h+var_50], eax
call my_wildcmp_bin_impl
mov [rbp+var_40], eax
cmp [rbp+var_40], 0
jg short loc_3D6C4
mov eax, [rbp+var_40]
mov [rbp+var_4], eax
jmp short loc_3D6FA
loc_3D6C4:
jmp short $+2
loc_3D6C6:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz loc_3D622
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_3D6FA
loc_3D6DD:
jmp loc_3D3FF
loc_3D6E2:
mov rdx, [rbp+var_18]
mov rsi, [rbp+var_20]
xor eax, eax
mov ecx, 1
cmp rdx, rsi
cmovnz eax, ecx
mov [rbp+var_4], eax
loc_3D6FA:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long my_wildcmp_bin_impl(
int a1,
unsigned __int8 *a2,
unsigned __int8 *a3,
char *a4,
char *a5,
int a6,
int a7,
int a8,
unsigned int a9)
{
char *v9; // rax
unsigned __int8 *v10; // rcx
char *v11; // rax
unsigned __int8 *v12; // rax
bool v14; // [rsp+1Dh] [rbp-43h]
bool v15; // [rsp+1Eh] [rbp-42h]
bool v16; // [rsp+1Fh] [rbp-41h]
int v17; // [rsp+20h] [rbp-40h]
unsigned __int8 v18; // [rsp+27h] [rbp-39h]
unsigned int v19; // [rsp+28h] [rbp-38h]
char *i; // [rsp+38h] [rbp-28h]
int v24; // [rsp+38h] [rbp-28h]
v19 = -1;
if ( my_string_stack_guard && (unsigned int)my_string_stack_guard(a9) )
{
return 1;
}
else
{
do
{
if ( a4 != a5 )
{
while ( 1 )
{
v16 = 0;
if ( *a4 != a8 )
v16 = *a4 != a7;
if ( !v16 )
break;
if ( *a4 == a6 && a4 + 1 != a5 )
++a4;
if ( a2 == a3 )
return 1;
v9 = a4++;
v10 = a2++;
if ( *v9 != (char)*v10 )
return 1;
if ( a4 == a5 )
return a2 != a3;
v19 = 1;
}
if ( *a4 != a7 )
continue;
do
{
if ( a2 == a3 )
return v19;
++a2;
++a4;
v15 = 0;
if ( a4 < a5 )
v15 = *a4 == a7;
}
while ( v15 );
if ( a4 != a5 )
continue;
}
return a2 != a3;
}
while ( *a4 != a8 );
for ( i = a4 + 1; i != a5; ++i )
{
if ( *i != a8 )
{
if ( *i != a7 )
break;
if ( a2 == a3 )
return (unsigned int)-1;
++a2;
}
}
if ( i == a5 )
{
return 0;
}
else if ( a2 == a3 )
{
return (unsigned int)-1;
}
else
{
v18 = *i;
if ( (unsigned __int8)*i == a6 && i + 1 != a5 )
{
v11 = i;
LODWORD(i) = (_DWORD)i + 1;
v18 = v11[1];
}
v24 = (_DWORD)i + 1;
do
{
while ( 1 )
{
v14 = 0;
if ( a2 != a3 )
v14 = *a2 != v18;
if ( !v14 )
break;
++a2;
}
v12 = a2++;
if ( v12 == a3 )
return (unsigned int)-1;
v17 = my_wildcmp_bin_impl(a1, (_DWORD)a2, (_DWORD)a3, v24, (_DWORD)a5, a6, a7, a8, a9 + 1);
if ( v17 <= 0 )
return (unsigned int)v17;
}
while ( a2 != a3 );
return (unsigned int)-1;
}
}
}
| my_wildcmp_bin_impl:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x20]
MOV EAX,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x34],R9D
MOV dword ptr [RBP + -0x38],0xffffffff
LEA RAX,[0x496628]
CMP qword ptr [RAX],0x0
JZ 0x0013d3fd
LEA RAX,[0x496628]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RBP + 0x20]
CALL RAX
CMP EAX,0x0
JZ 0x0013d3fd
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013d6fa
LAB_0013d3fd:
JMP 0x0013d3ff
LAB_0013d3ff:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x0013d6e2
JMP 0x0013d40f
LAB_0013d40f:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,dword ptr [RBP + 0x18]
MOV byte ptr [RBP + -0x41],AL
JZ 0x0013d430
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x10]
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_0013d430:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x0013d43c
JMP 0x0013d4ce
LAB_0013d43c:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + -0x34]
JNZ 0x0013d462
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x0013d462
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
LAB_0013d462:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x0013d494
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOVSX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x18],RDX
MOVSX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x0013d4a0
LAB_0013d494:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013d6fa
LAB_0013d4a0:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0013d4c2
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013d6fa
LAB_0013d4c2:
MOV dword ptr [RBP + -0x38],0x1
JMP 0x0013d40f
LAB_0013d4ce:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x10]
JNZ 0x0013d53c
JMP 0x0013d4dc
LAB_0013d4dc:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0013d4f1
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013d6fa
LAB_0013d4f1:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x30]
MOV byte ptr [RBP + -0x42],AL
JNC 0x0013d524
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x10]
SETZ AL
MOV byte ptr [RBP + -0x42],AL
LAB_0013d524:
MOV AL,byte ptr [RBP + -0x42]
TEST AL,0x1
JNZ 0x0013d4dc
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0013d53a
JMP 0x0013d6e2
LAB_0013d53a:
JMP 0x0013d53c
LAB_0013d53c:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x18]
JNZ 0x0013d6dd
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
LAB_0013d558:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x0013d5b0
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x18]
JNZ 0x0013d570
JMP 0x0013d5a2
LAB_0013d570:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x10]
JNZ 0x0013d5a0
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0013d592
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0013d6fa
LAB_0013d592:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013d5a2
LAB_0013d5a0:
JMP 0x0013d5b0
LAB_0013d5a2:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0013d558
LAB_0013d5b0:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0013d5c6
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013d6fa
LAB_0013d5c6:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0013d5dc
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0013d6fa
LAB_0013d5dc:
MOV RAX,qword ptr [RBP + -0x28]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x39],AL
MOVZX EAX,AL
CMP EAX,dword ptr [RBP + -0x34]
JNZ 0x0013d610
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x0013d610
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOV AL,byte ptr [RAX + 0x1]
MOV byte ptr [RBP + -0x39],AL
LAB_0013d610:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV AL,byte ptr [RBP + -0x39]
MOV byte ptr [RBP + -0x39],AL
LAB_0013d622:
JMP 0x0013d624
LAB_0013d624:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x20]
MOV byte ptr [RBP + -0x43],AL
JZ 0x0013d646
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOVZX ECX,byte ptr [RBP + -0x39]
CMP EAX,ECX
SETNZ AL
MOV byte ptr [RBP + -0x43],AL
LAB_0013d646:
MOV AL,byte ptr [RBP + -0x43]
TEST AL,0x1
JNZ 0x0013d64f
JMP 0x0013d65d
LAB_0013d64f:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013d624
LAB_0013d65d:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0013d67b
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0013d6fa
LAB_0013d67b:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9D,dword ptr [RBP + -0x34]
MOV R11D,dword ptr [RBP + 0x10]
MOV R10D,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x20]
ADD EAX,0x1
MOV dword ptr [RSP],R11D
MOV dword ptr [RSP + 0x8],R10D
MOV dword ptr [RSP + 0x10],EAX
CALL 0x0013d3a0
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x40],0x0
JG 0x0013d6c4
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013d6fa
LAB_0013d6c4:
JMP 0x0013d6c6
LAB_0013d6c6:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0013d622
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0013d6fa
LAB_0013d6dd:
JMP 0x0013d3ff
LAB_0013d6e2:
MOV RDX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
XOR EAX,EAX
MOV ECX,0x1
CMP RDX,RSI
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_0013d6fa:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
uint my_wildcmp_bin_impl(int8 param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,
uint param_6,int param_7,int param_8,int param_9)
{
int iVar1;
uint uVar2;
byte *pbVar3;
bool bVar4;
byte local_41;
uint local_40;
byte *local_30;
byte *local_20;
uint local_c;
local_40 = 0xffffffff;
local_30 = param_4;
local_20 = param_2;
if ((my_string_stack_guard == (code *)0x0) ||
(iVar1 = (*my_string_stack_guard)(param_9), iVar1 == 0)) {
do {
if (local_30 == param_5) {
LAB_0013d6e2:
return (uint)(local_20 != param_3);
}
while( true ) {
bVar4 = false;
if ((char)*local_30 != param_8) {
bVar4 = (char)*local_30 != param_7;
}
if (!bVar4) break;
if (((int)(char)*local_30 == param_6) && (local_30 + 1 != param_5)) {
local_30 = local_30 + 1;
}
if (local_20 == param_3) {
return 1;
}
if (*local_30 != *local_20) {
return 1;
}
if (local_30 + 1 == param_5) {
return (uint)(local_20 + 1 != param_3);
}
local_40 = 1;
local_30 = local_30 + 1;
local_20 = local_20 + 1;
}
if ((char)*local_30 == param_7) {
do {
if (local_20 == param_3) {
return local_40;
}
local_20 = local_20 + 1;
local_30 = local_30 + 1;
bVar4 = false;
if (local_30 < param_5) {
bVar4 = (char)*local_30 == param_7;
}
} while (bVar4);
if (local_30 == param_5) goto LAB_0013d6e2;
}
} while ((char)*local_30 != param_8);
while (pbVar3 = local_30, local_30 = pbVar3 + 1, local_30 != param_5) {
if ((char)*local_30 != param_8) {
if ((char)*local_30 != param_7) break;
if (local_20 == param_3) {
return 0xffffffff;
}
local_20 = local_20 + 1;
}
}
if (local_30 == param_5) {
local_c = 0;
}
else if (local_20 == param_3) {
local_c = 0xffffffff;
}
else {
local_41 = *local_30;
if ((local_41 == param_6) && (pbVar3 + 2 != param_5)) {
local_30 = pbVar3 + 2;
local_41 = pbVar3[2];
}
do {
while( true ) {
bVar4 = false;
if (local_20 != param_3) {
bVar4 = *local_20 != local_41;
}
if (!bVar4) break;
local_20 = local_20 + 1;
}
pbVar3 = local_20 + 1;
if (local_20 == param_3) {
return 0xffffffff;
}
uVar2 = my_wildcmp_bin_impl(param_1,pbVar3,param_3,local_30 + 1,param_5,param_6,param_7,
param_8,param_9 + 1);
if ((int)uVar2 < 1) {
return uVar2;
}
local_20 = pbVar3;
} while (pbVar3 != param_3);
local_c = 0xffffffff;
}
}
else {
local_c = 1;
}
return local_c;
}
| |
35,959 | testing::internal::(anonymous namespace)::ContainsUnprintableControlCodes(char const*, unsigned long) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-printers.cc | bool ContainsUnprintableControlCodes(const char* str, size_t length) {
const unsigned char* s = reinterpret_cast<const unsigned char*>(str);
for (size_t i = 0; i < length; i++) {
unsigned char ch = *s++;
if (std::iscntrl(ch)) {
switch (ch) {
case '\t':
case '\n':
case '\r':
break;
default:
return true;
}
}
}
return false;
} | O0 | cpp | testing::internal::(anonymous namespace)::ContainsUnprintableControlCodes(char const*, unsigned long):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0xdd0de
movq 0x18(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rsp)
movb (%rax), %al
movb %al, 0xf(%rsp)
movzbl 0xf(%rsp), %edi
callq 0x14ad0
cmpl $0x0, %eax
je 0xdd0cc
movzbl 0xf(%rsp), %eax
movl %eax, 0x8(%rsp)
addl $-0x9, %eax
subl $0x2, %eax
jb 0xdd0c1
jmp 0xdd0b6
movl 0x8(%rsp), %eax
subl $0xd, %eax
jne 0xdd0c3
jmp 0xdd0c1
jmp 0xdd0ca
movb $0x1, 0x37(%rsp)
jmp 0xdd0e3
jmp 0xdd0cc
jmp 0xdd0ce
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0xdd071
movb $0x0, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nop
| _ZN7testing8internal12_GLOBAL__N_131ContainsUnprintableControlCodesEPKcm:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_20], rax
mov [rsp+38h+var_28], 0
loc_DD071:
mov rax, [rsp+38h+var_28]
cmp rax, [rsp+38h+var_18]
jnb short loc_DD0DE
mov rax, [rsp+38h+var_20]
mov rcx, rax
add rcx, 1
mov [rsp+38h+var_20], rcx
mov al, [rax]
mov [rsp+38h+var_29], al
movzx edi, [rsp+38h+var_29]
call _iscntrl
cmp eax, 0
jz short loc_DD0CC
movzx eax, [rsp+38h+var_29]
mov [rsp+38h+var_30], eax
add eax, 0FFFFFFF7h
sub eax, 2
jb short loc_DD0C1
jmp short $+2
loc_DD0B6:
mov eax, [rsp+38h+var_30]
sub eax, 0Dh
jnz short loc_DD0C3
jmp short $+2
loc_DD0C1:
jmp short loc_DD0CA
loc_DD0C3:
mov [rsp+38h+var_1], 1
jmp short loc_DD0E3
loc_DD0CA:
jmp short $+2
loc_DD0CC:
jmp short $+2
loc_DD0CE:
mov rax, [rsp+38h+var_28]
add rax, 1
mov [rsp+38h+var_28], rax
jmp short loc_DD071
loc_DD0DE:
mov [rsp+38h+var_1], 0
loc_DD0E3:
mov al, [rsp+38h+var_1]
and al, 1
add rsp, 38h
retn
| char testing::internal::`anonymous namespace'::ContainsUnprintableControlCodes(
testing::internal::_anonymous_namespace_ *this,
const char *a2)
{
testing::internal::_anonymous_namespace_ *v2; // rax
unsigned __int8 v4; // [rsp+Fh] [rbp-29h]
unsigned long long i; // [rsp+10h] [rbp-28h]
for ( i = 0LL; i < (unsigned long long)a2; ++i )
{
v2 = this;
this = (testing::internal::_anonymous_namespace_ *)((char *)this + 1);
v4 = *(_BYTE *)v2;
if ( (unsigned int)iscntrl(*(unsigned __int8 *)v2) && (unsigned int)v4 - 9 >= 2 && v4 != 13 )
return 1;
}
return 0;
}
| ContainsUnprintableControlCodes:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x10],0x0
LAB_001dd071:
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,qword ptr [RSP + 0x20]
JNC 0x001dd0de
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RSP + 0x18],RCX
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0xf],AL
MOVZX EDI,byte ptr [RSP + 0xf]
CALL 0x00114ad0
CMP EAX,0x0
JZ 0x001dd0cc
MOVZX EAX,byte ptr [RSP + 0xf]
MOV dword ptr [RSP + 0x8],EAX
ADD EAX,-0x9
SUB EAX,0x2
JC 0x001dd0c1
JMP 0x001dd0b6
LAB_001dd0b6:
MOV EAX,dword ptr [RSP + 0x8]
SUB EAX,0xd
JNZ 0x001dd0c3
JMP 0x001dd0c1
LAB_001dd0c1:
JMP 0x001dd0ca
LAB_001dd0c3:
MOV byte ptr [RSP + 0x37],0x1
JMP 0x001dd0e3
LAB_001dd0ca:
JMP 0x001dd0cc
LAB_001dd0cc:
JMP 0x001dd0ce
LAB_001dd0ce:
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001dd071
LAB_001dd0de:
MOV byte ptr [RSP + 0x37],0x0
LAB_001dd0e3:
MOV AL,byte ptr [RSP + 0x37]
AND AL,0x1
ADD RSP,0x38
RET
|
/* testing::internal::(anonymous namespace)::ContainsUnprintableControlCodes(char const*, unsigned
long) */
int8
testing::internal::(anonymous_namespace)::ContainsUnprintableControlCodes
(char *param_1,ulong param_2)
{
byte bVar1;
int iVar2;
uint uVar3;
ulong local_28;
byte *local_20;
int1 local_1;
local_28 = 0;
local_20 = (byte *)param_1;
do {
if (param_2 <= local_28) {
local_1 = 0;
LAB_001dd0e3:
return CONCAT71((int7)(local_28 >> 8),local_1);
}
bVar1 = *local_20;
iVar2 = iscntrl((uint)bVar1);
if (((iVar2 != 0) && (1 < bVar1 - 9)) && (uVar3 = bVar1 - 0xd, uVar3 != 0)) {
local_1 = 1;
local_28 = (ulong)uVar3;
goto LAB_001dd0e3;
}
local_28 = local_28 + 1;
local_20 = local_20 + 1;
} while( true );
}
| |
35,960 | ggml_backend_tensor_set_async | llama.cpp/ggml/src/ggml-backend.cpp | void ggml_backend_tensor_set_async(ggml_backend_t backend, struct ggml_tensor * tensor, const void * data, size_t offset, size_t size) {
GGML_ASSERT(tensor->data != NULL && "tensor not allocated");
GGML_ASSERT(offset + size <= ggml_nbytes(tensor) && "tensor write out of bounds");
if (backend->iface.set_tensor_async == NULL) {
ggml_backend_tensor_set(tensor, data, offset, size);
} else {
backend->iface.set_tensor_async(backend, tensor, data, offset, size);
}
} | O3 | cpp | ggml_backend_tensor_set_async:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0xf8(%rsi)
je 0x2528b
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq (%r8,%rcx), %rbp
movq %rsi, %rdi
callq 0x161b0
cmpq %rax, %rbp
ja 0x252a7
movq 0x18(%r13), %rax
testq %rax, %rax
je 0x2526c
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x16870
leaq 0x28060(%rip), %rdi # 0x4d2f2
leaq 0x253b5(%rip), %rdx # 0x4a64e
leaq 0x280cc(%rip), %rcx # 0x4d36c
movl $0xeb, %esi
jmp 0x252c1
leaq 0x28044(%rip), %rdi # 0x4d2f2
leaq 0x25399(%rip), %rdx # 0x4a64e
leaq 0x280df(%rip), %rcx # 0x4d39b
movl $0xec, %esi
xorl %eax, %eax
callq 0x17c80
| ggml_backend_tensor_set_async:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
cmp qword ptr [rsi+0F8h], 0
jz short loc_2528B
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov r13, rdi
lea rbp, [r8+rcx]
mov rdi, rsi
call _ggml_nbytes
cmp rbp, rax
ja short loc_252A7
mov rax, [r13+18h]
test rax, rax
jz short loc_2526C
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, r14
mov r8, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp rax
loc_2526C:
mov rdi, r12
mov rsi, r15
mov rdx, r14
mov rcx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _ggml_backend_tensor_set
loc_2528B:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorDataNull; "tensor->data != NULL && \"tensor not al"...
mov esi, 0EBh
jmp short loc_252C1
loc_252A7:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aOffsetSizeGgml; "offset + size <= ggml_nbytes(tensor) &&"...
mov esi, 0ECh
loc_252C1:
xor eax, eax
call _ggml_abort
| long long ggml_backend_tensor_set_async(long long a1, long long a2, long long a3, long long a4, long long a5, int a6)
{
long long ( *v9)(long long, long long, long long, long long, long long); // rax
const char *v11; // rcx
int v12; // esi
if ( !*(_QWORD *)(a2 + 248) )
{
v11 = "tensor->data != NULL && \"tensor not allocated\"";
v12 = 235;
goto LABEL_8;
}
if ( a5 + a4 > ggml_nbytes((unsigned int *)a2) )
{
v11 = "offset + size <= ggml_nbytes(tensor) && \"tensor write out of bounds\"";
v12 = 236;
LABEL_8:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-backend.cpp",
v12,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v11,
a5,
a6);
}
v9 = *(long long ( **)(long long, long long, long long, long long, long long))(a1 + 24);
if ( v9 )
return v9(a1, a2, a3, a4, a5);
else
return ggml_backend_tensor_set(a2, a3, a4, a5);
}
| ggml_backend_tensor_set_async:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
CMP qword ptr [RSI + 0xf8],0x0
JZ 0x0012528b
MOV RBX,R8
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV R13,RDI
LEA RBP,[R8 + RCX*0x1]
MOV RDI,RSI
CALL 0x001161b0
CMP RBP,RAX
JA 0x001252a7
MOV RAX,qword ptr [R13 + 0x18]
TEST RAX,RAX
JZ 0x0012526c
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
MOV R8,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP RAX
LAB_0012526c:
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00116870
LAB_0012528b:
LEA RDI,[0x14d2f2]
LEA RDX,[0x14a64e]
LEA RCX,[0x14d36c]
MOV ESI,0xeb
JMP 0x001252c1
LAB_001252a7:
LEA RDI,[0x14d2f2]
LEA RDX,[0x14a64e]
LEA RCX,[0x14d39b]
MOV ESI,0xec
LAB_001252c1:
XOR EAX,EAX
CALL 0x00117c80
|
void ggml_backend_tensor_set_async
(long param_1,long param_2,int8 param_3,long param_4,long param_5)
{
ulong uVar1;
char *pcVar2;
int8 uVar3;
if (*(long *)(param_2 + 0xf8) == 0) {
pcVar2 = "tensor->data != NULL && \"tensor not allocated\"";
uVar3 = 0xeb;
}
else {
uVar1 = ggml_nbytes(param_2);
if ((ulong)(param_5 + param_4) <= uVar1) {
if (*(code **)(param_1 + 0x18) != (code *)0x0) {
/* WARNING: Could not recover jumptable at 0x0012526a. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x18))(param_1,param_2,param_3,param_4,param_5);
return;
}
ggml_backend_tensor_set(param_2,param_3,param_4,param_5);
return;
}
pcVar2 = "offset + size <= ggml_nbytes(tensor) && \"tensor write out of bounds\"";
uVar3 = 0xec;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-backend.cpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
| |
35,961 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> minja::Value::get<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const | monkey531[P]llama/common/minja.hpp | T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
} | O2 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> minja::Value::get<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x6d634
testb %al, %al
je 0x80a5a
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x65f46
movq %r14, %rdi
movq %r12, %rsi
callq 0x6d2e6
movq %rbx, %rdi
movq %rax, %rsi
callq 0x63b8a
leaq 0x8(%rsp), %rdi
callq 0x62f68
jmp 0x80a65
movq %rbx, %rdi
movq %r12, %rsi
callq 0x23b60
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x62f68
movq %rbx, %rdi
callq 0x23fc0
| _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_RKS7_S8_:
push r15
push r14
push r12
push rbx
sub rsp, 58h
mov r12, rcx
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov rdi, rsi
mov rsi, rdx
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, al
jz short loc_80A5A
lea r12, [rsp+78h+var_70]
mov rdi, r12
mov rsi, r15
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, r14; this
mov rsi, r12; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rbx
mov rsi, rax
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
lea rdi, [rsp+78h+var_70]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_80A65
loc_80A5A:
mov rdi, rbx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_; std::string::basic_string(std::string&&)
loc_80A65:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
| long long minja::Value::get<std::string>(long long a1, minja::Value *a2, long long a3, long long a4)
{
minja::Value *v6; // rax
_BYTE v8[112]; // [rsp+8h] [rbp-70h] BYREF
if ( minja::Value::contains((long long)a2) )
{
minja::Value::Value((long long)v8, a3);
v6 = (minja::Value *)minja::Value::at(a2, (const minja::Value *)v8);
minja::Value::get<std::string>(a1, v6);
minja::Value::~Value((minja::Value *)v8);
}
else
{
std::string::basic_string(a1, a4);
}
return a1;
}
| get<std::__cxx11::string>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R12,RCX
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV RSI,RDX
CALL 0x0016d634
TEST AL,AL
JZ 0x00180a5a
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R15
CALL 0x00165f46
LAB_00180a38:
MOV RDI,R14
MOV RSI,R12
CALL 0x0016d2e6
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00163b8a
LAB_00180a4e:
LEA RDI,[RSP + 0x8]
CALL 0x00162f68
JMP 0x00180a65
LAB_00180a5a:
MOV RDI,RBX
MOV RSI,R12
CALL 0x00123b60
LAB_00180a65:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
|
/* std::__cxx11::string minja::Value::get<std::__cxx11::string >(std::__cxx11::string const&,
std::__cxx11::string) const */
string * minja::Value::get<std::__cxx11::string>
(string *param_1,string *param_2,string *param_3,string *param_4)
{
char cVar1;
Value local_70 [80];
cVar1 = contains(param_2);
if (cVar1 == '\0') {
std::__cxx11::string::string(param_1,param_4);
}
else {
Value(local_70,param_3);
/* try { // try from 00180a38 to 00180a4d has its CatchHandler @ 00180a74 */
at((Value *)param_2,local_70);
get<std::__cxx11::string>();
~Value(local_70);
}
return param_1;
}
| |
35,962 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> minja::Value::get<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const | monkey531[P]llama/common/minja.hpp | T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
} | O3 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> minja::Value::get<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
callq 0x93514
testb %al, %al
je 0xb40f4
movq %rsp, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8a0b4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x930b6
movq %rax, %rdi
callq 0x870b6
movl %eax, %ebx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x586c0
movq %r14, %rdi
callq 0x5dbae
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0xb40a0
callq 0x6d59a
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xb40af
callq 0x6d59a
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xb40be
callq 0x6d59a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xb40f4
movq 0x77eb9(%rip), %rax # 0x12bf88
cmpb $0x0, (%rax)
je 0xb40df
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xb40e9
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xb40f4
movq (%rdi), %rax
callq *0x18(%rax)
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x86056
movq %rbx, %rdi
callq 0x1afc0
nop
| _ZNK5minja5Value3getIbEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_:
push r15
push r14
push rbx
sub rsp, 50h
mov ebx, edx
mov r15, rsi
mov r14, rdi
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, al
jz loc_B40F4
mov rbx, rsp
mov rdi, rbx
mov rsi, r15
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, r14; this
mov rsi, rbx; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rax
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
mov ebx, eax
lea r14, [rsp+68h+var_28]
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_B40A0
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_B40A0:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_B40AF
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_B40AF:
mov rdi, [rsp+68h+var_50]
test rdi, rdi
jz short loc_B40BE
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_B40BE:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_B40F4
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_B40DF
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_B40E9
loc_B40DF:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_B40E9:
cmp eax, 1
jnz short loc_B40F4
mov rax, [rdi]
call qword ptr [rax+18h]
loc_B40F4:
mov eax, ebx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
| long long minja::Value::get<bool>(minja::Value *this, long long a2, unsigned int a3)
{
_QWORD *v4; // rax
unsigned int v5; // eax
long long v6; // rdi
signed __int32 v7; // eax
long long v9; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+8h] [rbp-60h]
volatile signed __int32 *v11; // [rsp+18h] [rbp-50h]
volatile signed __int32 *v12; // [rsp+28h] [rbp-40h]
volatile signed __int32 *v13; // [rsp+38h] [rbp-30h]
char v14[40]; // [rsp+40h] [rbp-28h] BYREF
if ( minja::Value::contains((long long)this, a2) )
{
minja::Value::Value((long long)&v9, a2);
v4 = (_QWORD *)minja::Value::at(this, (const minja::Value *)&v9);
LOBYTE(v5) = minja::Value::get<bool>(v4);
a3 = v5;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v14);
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(v14);
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
if ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
v6 = v10;
if ( v10 )
{
if ( _libc_single_threaded )
{
v7 = *(_DWORD *)(v10 + 12);
*(_DWORD *)(v10 + 12) = v7 - 1;
}
else
{
v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v10 + 12), 0xFFFFFFFF);
}
if ( v7 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL);
}
}
return a3;
}
| get<bool>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV EBX,EDX
MOV R15,RSI
MOV R14,RDI
CALL 0x00193514
TEST AL,AL
JZ 0x001b40f4
MOV RBX,RSP
MOV RDI,RBX
MOV RSI,R15
CALL 0x0018a0b4
LAB_001b4066:
MOV RDI,R14
MOV RSI,RBX
CALL 0x001930b6
MOV RDI,RAX
CALL 0x001870b6
LAB_001b4079:
MOV EBX,EAX
LEA R14,[RSP + 0x40]
MOV RDI,R14
XOR ESI,ESI
CALL 0x001586c0
MOV RDI,R14
CALL 0x0015dbae
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x001b40a0
CALL 0x0016d59a
LAB_001b40a0:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x001b40af
CALL 0x0016d59a
LAB_001b40af:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x001b40be
CALL 0x0016d59a
LAB_001b40be:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001b40f4
MOV RAX,qword ptr [0x0022bf88]
CMP byte ptr [RAX],0x0
JZ 0x001b40df
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001b40e9
LAB_001b40df:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001b40e9:
CMP EAX,0x1
JNZ 0x001b40f4
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001b40f4:
MOV EAX,EBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* bool minja::Value::get<bool>(std::__cxx11::string const&, bool) const */
bool __thiscall minja::Value::get<bool>(Value *this,string *param_1,bool param_2)
{
int *piVar1;
char cVar2;
int iVar3;
Value *this_00;
Value aVStack_68 [8];
long *local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
data local_28 [16];
cVar2 = contains(this,param_1);
if (cVar2 != '\0') {
Value(aVStack_68,param_1);
/* try { // try from 001b4066 to 001b4078 has its CatchHandler @ 001b4100 */
this_00 = (Value *)at(this,aVStack_68);
param_2 = get<bool>(this_00);
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_28,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_28);
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
if (local_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
piVar1 = (int *)((long)local_60 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_60 + 0xc);
*(int *)((long)local_60 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_60 + 0x18))();
}
}
}
return param_2;
}
| |
35,963 | ma_compact_keypage | eloqsql/storage/maria/ma_page.c | my_bool _ma_compact_keypage(MARIA_PAGE *ma_page, TrID min_read_from)
{
MARIA_HA *info= ma_page->info;
MARIA_SHARE *share= info->s;
MARIA_KEY key;
uchar *page, *endpos, *start_of_empty_space;
uint page_flag, nod_flag, saved_space;
my_bool page_has_transid;
DBUG_ENTER("_ma_compact_keypage");
page_flag= ma_page->flag;
if (!(page_flag & KEYPAGE_FLAG_HAS_TRANSID))
DBUG_RETURN(0); /* No transaction id on page */
nod_flag= ma_page->node;
page= ma_page->buff;
endpos= page + ma_page->size;
key.data= info->lastkey_buff;
key.keyinfo= (MARIA_KEYDEF*) ma_page->keyinfo;
page_has_transid= 0;
page+= share->keypage_header + nod_flag;
key.data[0]= 0; /* safety */
start_of_empty_space= 0;
saved_space= 0;
do
{
if (!(page= (*ma_page->keyinfo->skip_key)(&key, 0, 0, page)))
{
DBUG_PRINT("error",("Couldn't find last key: page_pos: %p",
page));
_ma_set_fatal_error(info, HA_ERR_CRASHED);
DBUG_RETURN(1);
}
if (key_has_transid(page-1))
{
uint transid_length;
transid_length= transid_packed_length(page);
if (min_read_from == ~(TrID) 0 ||
min_read_from < transid_get_packed(share, page))
{
page[-1]&= 254; /* Remove transid marker */
transid_length= transid_packed_length(page);
if (start_of_empty_space)
{
/* Move block before the transid up in page */
uint copy_length= (uint) (page - start_of_empty_space) - saved_space;
memmove(start_of_empty_space, start_of_empty_space + saved_space,
copy_length);
start_of_empty_space+= copy_length;
}
else
start_of_empty_space= page;
saved_space+= transid_length;
}
else
page_has_transid= 1; /* At least one id left */
page+= transid_length;
}
page+= nod_flag;
} while (page < endpos);
DBUG_ASSERT(page == endpos);
if (start_of_empty_space)
{
/*
Move last block down
This is always true if any transid was removed
*/
uint copy_length= (uint) (endpos - start_of_empty_space) - saved_space;
if (copy_length)
memmove(start_of_empty_space, start_of_empty_space + saved_space,
copy_length);
ma_page->size= (uint) (start_of_empty_space + copy_length - ma_page->buff);
page_store_size(share, ma_page);
}
if (!page_has_transid)
{
ma_page->flag&= ~KEYPAGE_FLAG_HAS_TRANSID;
_ma_store_keypage_flag(share, ma_page->buff, ma_page->flag);
/* Clear packed transid (in case of zerofill) */
bzero(ma_page->buff + LSN_STORE_SIZE, TRANSID_SIZE);
}
if (share->now_transactional)
{
if (_ma_log_compact_keypage(ma_page, min_read_from))
DBUG_RETURN(1);
}
DBUG_RETURN(0);
} | O3 | c | ma_compact_keypage:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
xorl %ecx, %ecx
testb $0x2, 0x2c(%rdi)
je 0x416c7
movq %rsi, %r12
movq %rdi, %r14
movq $0x0, -0x60(%rbp)
movq (%rdi), %rcx
movq (%rcx), %rsi
movl 0x28(%rdi), %edi
movq 0x10(%r14), %rax
movl 0x20(%r14), %r13d
addq %rax, %r13
movq %rcx, -0x70(%rbp)
movq 0x388(%rcx), %rcx
leaq -0xb8(%rbp), %r8
movq %rcx, (%r8)
movq 0x8(%r14), %rdx
movq %rdx, 0x8(%r8)
movq %rsi, -0x58(%rbp)
movl 0x744(%rsi), %r15d
movq %rdi, -0x90(%rbp)
addl %edi, %r15d
addq %rax, %r15
movb $0x0, (%rcx)
movq $0x0, -0x68(%rbp)
xorl %ebx, %ebx
movq %r12, -0x80(%rbp)
movq %r14, -0x78(%rbp)
movq %r13, -0x88(%rbp)
movq 0x8(%r14), %rax
leaq -0xb8(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %rcx
callq *0xe8(%rax)
testq %rax, %rax
je 0x415a6
movq %rax, %r15
movb -0x1(%rax), %al
testb $0x1, %al
je 0x41580
cmpq $-0x1, %r12
je 0x4150b
movzbl (%r15), %eax
leal -0xf8(%rax), %r13d
cmpl $0xf3, %eax
movl $0x1, %eax
cmovbl %eax, %r13d
movq -0x58(%rbp), %rdi
movq %r15, %rsi
callq 0x42ef9
cmpq %r12, %rax
jbe 0x4155d
movb -0x1(%r15), %al
andb $-0x2, %al
movb %al, -0x1(%r15)
movzbl (%r15), %eax
leal -0xf8(%rax), %r13d
cmpl $0xf3, %eax
movl $0x1, %eax
cmovbl %eax, %r13d
testq %rbx, %rbx
je 0x41565
movl %r15d, %r14d
subl %ebx, %r14d
movq -0x60(%rbp), %r12
subl %r12d, %r14d
movl %r12d, %esi
addq %rbx, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2b150
movq %r12, %rax
addq %r14, %rbx
movq -0x78(%rbp), %r14
movq -0x80(%rbp), %r12
jmp 0x4156c
movb $0x1, %al
movq %rax, -0x68(%rbp)
jmp 0x41573
movq %r15, %rbx
movq -0x60(%rbp), %rax
addl %r13d, %eax
movq %rax, -0x60(%rbp)
movl %r13d, %eax
addq %rax, %r15
movq -0x88(%rbp), %r13
addq -0x90(%rbp), %r15
cmpq %r13, %r15
jb 0x414a8
testq %rbx, %rbx
je 0x415f8
subl %ebx, %r13d
movq -0x60(%rbp), %rax
subl %eax, %r13d
jne 0x415bb
movl %r13d, %r15d
jmp 0x415ce
movq -0x70(%rbp), %rdi
movl $0x7e, %esi
callq 0x3dca8
movb $0x1, %cl
jmp 0x416c7
movl %eax, %esi
addq %rbx, %rsi
movl %r13d, %r15d
movq %rbx, %rdi
movq %r15, %rdx
callq 0x2b150
addq %r15, %rbx
movq 0x10(%r14), %rax
subq %rax, %rbx
movl %ebx, 0x20(%r14)
movq -0x58(%rbp), %rdx
movl 0x744(%rdx), %ecx
movb %bl, -0x1(%rax,%rcx)
movq 0x10(%r14), %rax
movl 0x744(%rdx), %ecx
movb %bh, -0x2(%rax,%rcx)
cmpb $0x0, -0x68(%rbp)
jne 0x4162e
movl 0x2c(%r14), %eax
andl $-0x3, %eax
movl %eax, 0x2c(%r14)
movq 0x10(%r14), %rcx
movq -0x58(%rbp), %rdx
movl 0x744(%rdx), %edx
addl $-0x3, %edx
movb %al, (%rcx,%rdx)
movq 0x10(%r14), %rax
movw $0x0, 0xb(%rax)
movl $0x0, 0x7(%rax)
movq -0x58(%rbp), %rax
cmpb $0x0, 0x7e7(%rax)
je 0x416c5
movq (%r14), %rcx
movq 0x18(%r14), %rax
movq (%rcx), %rdx
movl 0x7bc(%rdx), %esi
xorl %edx, %edx
divq %rsi
leaq -0x50(%rbp), %r10
movl %eax, 0x2(%r10)
shrq $0x20, %rax
movb %al, 0x6(%r10)
movb $0xb, 0x7(%r10)
movl %r12d, 0x8(%r10)
shrq $0x20, %r12
movw %r12w, 0xc(%r10)
leaq -0xf0(%rbp), %rax
movq %r10, 0x20(%rax)
movq $0xe, 0x28(%rax)
movl 0x20(%r14), %edx
movl %edx, 0x24(%r14)
movq 0x8(%rcx), %rdx
subq $0x8, %rsp
leaq -0x98(%rbp), %rdi
movl $0xc, %esi
movl $0xe, %r8d
movl $0x3, %r9d
pushq $0x0
pushq %r10
pushq %rax
callq 0x2d77c
addq $0x20, %rsp
movb $0x1, %cl
testb %al, %al
jne 0x416c7
xorl %ecx, %ecx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x416ea
movl %ecx, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2b280
nop
| _ma_compact_keypage:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov rax, fs:28h
mov [rbp+var_30], rax
xor ecx, ecx
test byte ptr [rdi+2Ch], 2
jz loc_416C7
mov r12, rsi
mov r14, rdi
mov [rbp+var_60], 0
mov rcx, [rdi]
mov rsi, [rcx]
mov edi, [rdi+28h]
mov rax, [r14+10h]
mov r13d, [r14+20h]
add r13, rax
mov [rbp+var_70], rcx
mov rcx, [rcx+388h]
lea r8, [rbp+var_B8]
mov [r8], rcx
mov rdx, [r14+8]
mov [r8+8], rdx
mov [rbp+var_58], rsi
mov r15d, [rsi+744h]
mov [rbp+var_90], rdi
add r15d, edi
add r15, rax
mov byte ptr [rcx], 0
mov [rbp+var_68], 0
xor ebx, ebx
mov [rbp+var_80], r12
mov [rbp+var_78], r14
mov [rbp+var_88], r13
loc_414A8:
mov rax, [r14+8]
lea rdi, [rbp+var_B8]
xor esi, esi
xor edx, edx
mov rcx, r15
call qword ptr [rax+0E8h]
test rax, rax
jz loc_415A6
mov r15, rax
mov al, [rax-1]
test al, 1
jz loc_41580
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_4150B
movzx eax, byte ptr [r15]
lea r13d, [rax-0F8h]
cmp eax, 0F3h
mov eax, 1
cmovb r13d, eax
mov rdi, [rbp+var_58]
mov rsi, r15
call transid_get_packed
cmp rax, r12
jbe short loc_4155D
mov al, [r15-1]
loc_4150B:
and al, 0FEh
mov [r15-1], al
movzx eax, byte ptr [r15]
lea r13d, [rax-0F8h]
cmp eax, 0F3h
mov eax, 1
cmovb r13d, eax
test rbx, rbx
jz short loc_41565
mov r14d, r15d
sub r14d, ebx
mov r12, [rbp+var_60]
sub r14d, r12d
mov esi, r12d
add rsi, rbx
mov rdi, rbx
mov rdx, r14
call _memmove
mov rax, r12
add rbx, r14
mov r14, [rbp+var_78]
mov r12, [rbp+var_80]
jmp short loc_4156C
loc_4155D:
mov al, 1
mov [rbp+var_68], rax
jmp short loc_41573
loc_41565:
mov rbx, r15
mov rax, [rbp+var_60]
loc_4156C:
add eax, r13d
mov [rbp+var_60], rax
loc_41573:
mov eax, r13d
add r15, rax
mov r13, [rbp+var_88]
loc_41580:
add r15, [rbp+var_90]
cmp r15, r13
jb loc_414A8
test rbx, rbx
jz short loc_415F8
sub r13d, ebx
mov rax, [rbp+var_60]
sub r13d, eax
jnz short loc_415BB
mov r15d, r13d
jmp short loc_415CE
loc_415A6:
mov rdi, [rbp+var_70]
mov esi, 7Eh ; '~'
call _ma_set_fatal_error
mov cl, 1
jmp loc_416C7
loc_415BB:
mov esi, eax
add rsi, rbx
mov r15d, r13d
mov rdi, rbx
mov rdx, r15
call _memmove
loc_415CE:
add rbx, r15
mov rax, [r14+10h]
sub rbx, rax
mov [r14+20h], ebx
mov rdx, [rbp+var_58]
mov ecx, [rdx+744h]
mov [rax+rcx-1], bl
mov rax, [r14+10h]
mov ecx, [rdx+744h]
mov [rax+rcx-2], bh
loc_415F8:
cmp byte ptr [rbp+var_68], 0
jnz short loc_4162E
mov eax, [r14+2Ch]
and eax, 0FFFFFFFDh
mov [r14+2Ch], eax
mov rcx, [r14+10h]
mov rdx, [rbp+var_58]
mov edx, [rdx+744h]
add edx, 0FFFFFFFDh
mov [rcx+rdx], al
mov rax, [r14+10h]
mov word ptr [rax+0Bh], 0
mov dword ptr [rax+7], 0
loc_4162E:
mov rax, [rbp+var_58]
cmp byte ptr [rax+7E7h], 0
jz loc_416C5
mov rcx, [r14]
mov rax, [r14+18h]
mov rdx, [rcx]
mov esi, [rdx+7BCh]
xor edx, edx
div rsi
lea r10, [rbp+var_50]
mov [r10+2], eax
shr rax, 20h
mov [r10+6], al
mov byte ptr [r10+7], 0Bh
mov [r10+8], r12d
shr r12, 20h
mov [r10+0Ch], r12w
lea rax, [rbp+var_F0]
mov [rax+20h], r10
mov qword ptr [rax+28h], 0Eh
mov edx, [r14+20h]
mov [r14+24h], edx
mov rdx, [rcx+8]
sub rsp, 8
lea rdi, [rbp+var_98]
mov esi, 0Ch
mov r8d, 0Eh
mov r9d, 3
push 0
push r10
push rax
call translog_write_record
add rsp, 20h
mov cl, 1
test al, al
jnz short loc_416C7
loc_416C5:
xor ecx, ecx
loc_416C7:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_416EA
mov eax, ecx
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_416EA:
call ___stack_chk_fail
| long long ma_compact_keypage(long long **a1, unsigned long long a2)
{
unsigned int v2; // ecx
long long **v4; // r14
long long *v5; // rcx
long long v6; // rsi
long long v7; // rdi
long long *v8; // rax
unsigned long long v9; // r13
int v10; // r15d
unsigned __int8 *v11; // r15
unsigned __int8 *v12; // rbx
long long v13; // rax
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
int v17; // r9d
unsigned __int8 *v18; // r15
char v19; // al
unsigned int v20; // eax
unsigned int v21; // r13d
unsigned long long packed; // rax
unsigned int v23; // eax
int v24; // r12d
long long v25; // r14
int v26; // eax
unsigned int v27; // r13d
unsigned int v28; // r15d
long long *v29; // rax
unsigned int v30; // ebx
long long v31; // rdx
unsigned int v32; // eax
long long *v33; // rax
long long *v34; // rcx
unsigned long long v35; // rax
char v36; // al
__int128 v38; // [rsp+0h] [rbp-F0h] BYREF
__int16 *v39; // [rsp+20h] [rbp-D0h]
long long v40; // [rsp+28h] [rbp-C8h]
_QWORD v41[4]; // [rsp+38h] [rbp-B8h] BYREF
char v42[8]; // [rsp+58h] [rbp-98h] BYREF
long long v43; // [rsp+60h] [rbp-90h]
unsigned long long v44; // [rsp+68h] [rbp-88h]
unsigned long long v45; // [rsp+70h] [rbp-80h]
long long **v46; // [rsp+78h] [rbp-78h]
long long *v47; // [rsp+80h] [rbp-70h]
unsigned long long v48; // [rsp+88h] [rbp-68h]
long long v49; // [rsp+90h] [rbp-60h]
long long v50; // [rsp+98h] [rbp-58h]
__int16 v51; // [rsp+A0h] [rbp-50h] BYREF
int v52; // [rsp+A2h] [rbp-4Eh]
char v53; // [rsp+A6h] [rbp-4Ah]
char v54; // [rsp+A7h] [rbp-49h]
int v55; // [rsp+A8h] [rbp-48h]
__int16 v56; // [rsp+ACh] [rbp-44h]
unsigned long long v57; // [rsp+C0h] [rbp-30h]
v57 = __readfsqword(0x28u);
v2 = 0;
if ( (*((_BYTE *)a1 + 44) & 2) == 0 )
return v2;
v4 = a1;
v49 = 0LL;
v5 = *a1;
v6 = **a1;
v7 = *((unsigned int *)a1 + 10);
v8 = v4[2];
v9 = (unsigned long long)v8 + *((unsigned int *)v4 + 8);
v47 = v5;
v41[0] = v5[113];
v41[1] = v4[1];
v50 = v6;
v10 = *(_DWORD *)(v6 + 1860);
v43 = v7;
v11 = (unsigned __int8 *)v8 + (unsigned int)(v7 + v10);
*(_BYTE *)v41[0] = 0;
v48 = 0LL;
v12 = 0LL;
v45 = a2;
v46 = v4;
v44 = v9;
do
{
v13 = ((long long ( *)(_QWORD *, _QWORD, _QWORD, unsigned __int8 *))v4[1][29])(v41, 0LL, 0LL, v11);
if ( !v13 )
{
ma_set_fatal_error(v47, 126, v14, v15, v16, v17);
LOBYTE(v2) = 1;
return v2;
}
v18 = (unsigned __int8 *)v13;
v19 = *(_BYTE *)(v13 - 1);
if ( (v19 & 1) != 0 )
{
if ( a2 != -1LL )
{
v20 = *v18;
v21 = v20 - 248;
if ( v20 < 0xF3 )
v21 = 1;
packed = transid_get_packed(v50, v18);
if ( packed <= a2 )
{
LOBYTE(packed) = 1;
v48 = packed;
LABEL_17:
v18 += v21;
v9 = v44;
goto LABEL_18;
}
v19 = *(v18 - 1);
}
*(v18 - 1) = v19 & 0xFE;
v23 = *v18;
v21 = v23 - 248;
if ( v23 < 0xF3 )
v21 = 1;
if ( v12 )
{
v24 = v49;
v25 = (unsigned int)((_DWORD)v18 - (_DWORD)v12 - v49);
memmove(v12, &v12[(unsigned int)v49], v25);
v26 = v24;
v12 += v25;
v4 = v46;
a2 = v45;
}
else
{
v12 = v18;
v26 = v49;
}
v49 = v21 + v26;
goto LABEL_17;
}
LABEL_18:
v11 = &v18[v43];
}
while ( (unsigned long long)v11 < v9 );
if ( v12 )
{
v27 = v9 - (_DWORD)v12 - v49;
if ( v27 )
{
v28 = v27;
memmove(v12, &v12[(unsigned int)v49], v27);
}
else
{
v28 = 0;
}
v29 = v4[2];
v30 = v28 + (_DWORD)v12 - (_DWORD)v29;
*((_DWORD *)v4 + 8) = v30;
v31 = v50;
*((_BYTE *)v29 + *(unsigned int *)(v50 + 1860) - 1) = v30;
*((_BYTE *)v4[2] + *(unsigned int *)(v31 + 1860) - 2) = BYTE1(v30);
}
if ( !(_BYTE)v48 )
{
v32 = *((_DWORD *)v4 + 11) & 0xFFFFFFFD;
*((_DWORD *)v4 + 11) = v32;
*((_BYTE *)v4[2] + (unsigned int)(*(_DWORD *)(v50 + 1860) - 3)) = v32;
v33 = v4[2];
*(_WORD *)((char *)v33 + 11) = 0;
*(_DWORD *)((char *)v33 + 7) = 0;
}
if ( !*(_BYTE *)(v50 + 2023) )
return 0;
v34 = *v4;
v35 = (unsigned long long)v4[3] / *(unsigned int *)(**v4 + 1980);
v52 = v35;
v53 = BYTE4(v35);
v54 = 11;
v55 = a2;
v56 = WORD2(a2);
v39 = &v51;
v40 = 14LL;
*((_DWORD *)v4 + 9) = *((_DWORD *)v4 + 8);
v36 = translog_write_record((unsigned long long)v42, &byte_9[3], v34[1], v34, 0xEu, 3, &v38, &v51, 0LL);
LOBYTE(v2) = 1;
if ( !v36 )
return 0;
return v2;
}
| _ma_compact_keypage:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
XOR ECX,ECX
TEST byte ptr [RDI + 0x2c],0x2
JZ 0x001416c7
MOV R12,RSI
MOV R14,RDI
MOV qword ptr [RBP + -0x60],0x0
MOV RCX,qword ptr [RDI]
MOV RSI,qword ptr [RCX]
MOV EDI,dword ptr [RDI + 0x28]
MOV RAX,qword ptr [R14 + 0x10]
MOV R13D,dword ptr [R14 + 0x20]
ADD R13,RAX
MOV qword ptr [RBP + -0x70],RCX
MOV RCX,qword ptr [RCX + 0x388]
LEA R8,[RBP + -0xb8]
MOV qword ptr [R8],RCX
MOV RDX,qword ptr [R14 + 0x8]
MOV qword ptr [R8 + 0x8],RDX
MOV qword ptr [RBP + -0x58],RSI
MOV R15D,dword ptr [RSI + 0x744]
MOV qword ptr [RBP + -0x90],RDI
ADD R15D,EDI
ADD R15,RAX
MOV byte ptr [RCX],0x0
MOV qword ptr [RBP + -0x68],0x0
XOR EBX,EBX
MOV qword ptr [RBP + -0x80],R12
MOV qword ptr [RBP + -0x78],R14
MOV qword ptr [RBP + -0x88],R13
LAB_001414a8:
MOV RAX,qword ptr [R14 + 0x8]
LEA RDI,[RBP + -0xb8]
XOR ESI,ESI
XOR EDX,EDX
MOV RCX,R15
CALL qword ptr [RAX + 0xe8]
TEST RAX,RAX
JZ 0x001415a6
MOV R15,RAX
MOV AL,byte ptr [RAX + -0x1]
TEST AL,0x1
JZ 0x00141580
CMP R12,-0x1
JZ 0x0014150b
MOVZX EAX,byte ptr [R15]
LEA R13D,[RAX + -0xf8]
CMP EAX,0xf3
MOV EAX,0x1
CMOVC R13D,EAX
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,R15
CALL 0x00142ef9
CMP RAX,R12
JBE 0x0014155d
MOV AL,byte ptr [R15 + -0x1]
LAB_0014150b:
AND AL,0xfe
MOV byte ptr [R15 + -0x1],AL
MOVZX EAX,byte ptr [R15]
LEA R13D,[RAX + -0xf8]
CMP EAX,0xf3
MOV EAX,0x1
CMOVC R13D,EAX
TEST RBX,RBX
JZ 0x00141565
MOV R14D,R15D
SUB R14D,EBX
MOV R12,qword ptr [RBP + -0x60]
SUB R14D,R12D
MOV ESI,R12D
ADD RSI,RBX
MOV RDI,RBX
MOV RDX,R14
CALL 0x0012b150
MOV RAX,R12
ADD RBX,R14
MOV R14,qword ptr [RBP + -0x78]
MOV R12,qword ptr [RBP + -0x80]
JMP 0x0014156c
LAB_0014155d:
MOV AL,0x1
MOV qword ptr [RBP + -0x68],RAX
JMP 0x00141573
LAB_00141565:
MOV RBX,R15
MOV RAX,qword ptr [RBP + -0x60]
LAB_0014156c:
ADD EAX,R13D
MOV qword ptr [RBP + -0x60],RAX
LAB_00141573:
MOV EAX,R13D
ADD R15,RAX
MOV R13,qword ptr [RBP + -0x88]
LAB_00141580:
ADD R15,qword ptr [RBP + -0x90]
CMP R15,R13
JC 0x001414a8
TEST RBX,RBX
JZ 0x001415f8
SUB R13D,EBX
MOV RAX,qword ptr [RBP + -0x60]
SUB R13D,EAX
JNZ 0x001415bb
MOV R15D,R13D
JMP 0x001415ce
LAB_001415a6:
MOV RDI,qword ptr [RBP + -0x70]
MOV ESI,0x7e
CALL 0x0013dca8
MOV CL,0x1
JMP 0x001416c7
LAB_001415bb:
MOV ESI,EAX
ADD RSI,RBX
MOV R15D,R13D
MOV RDI,RBX
MOV RDX,R15
CALL 0x0012b150
LAB_001415ce:
ADD RBX,R15
MOV RAX,qword ptr [R14 + 0x10]
SUB RBX,RAX
MOV dword ptr [R14 + 0x20],EBX
MOV RDX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RDX + 0x744]
MOV byte ptr [RAX + RCX*0x1 + -0x1],BL
MOV RAX,qword ptr [R14 + 0x10]
MOV ECX,dword ptr [RDX + 0x744]
MOV byte ptr [RAX + RCX*0x1 + -0x2],BH
LAB_001415f8:
CMP byte ptr [RBP + -0x68],0x0
JNZ 0x0014162e
MOV EAX,dword ptr [R14 + 0x2c]
AND EAX,0xfffffffd
MOV dword ptr [R14 + 0x2c],EAX
MOV RCX,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [RBP + -0x58]
MOV EDX,dword ptr [RDX + 0x744]
ADD EDX,-0x3
MOV byte ptr [RCX + RDX*0x1],AL
MOV RAX,qword ptr [R14 + 0x10]
MOV word ptr [RAX + 0xb],0x0
MOV dword ptr [RAX + 0x7],0x0
LAB_0014162e:
MOV RAX,qword ptr [RBP + -0x58]
CMP byte ptr [RAX + 0x7e7],0x0
JZ 0x001416c5
MOV RCX,qword ptr [R14]
MOV RAX,qword ptr [R14 + 0x18]
MOV RDX,qword ptr [RCX]
MOV ESI,dword ptr [RDX + 0x7bc]
XOR EDX,EDX
DIV RSI
LEA R10,[RBP + -0x50]
MOV dword ptr [R10 + 0x2],EAX
SHR RAX,0x20
MOV byte ptr [R10 + 0x6],AL
MOV byte ptr [R10 + 0x7],0xb
MOV dword ptr [R10 + 0x8],R12D
SHR R12,0x20
MOV word ptr [R10 + 0xc],R12W
LEA RAX,[RBP + -0xf0]
MOV qword ptr [RAX + 0x20],R10
MOV qword ptr [RAX + 0x28],0xe
MOV EDX,dword ptr [R14 + 0x20]
MOV dword ptr [R14 + 0x24],EDX
MOV RDX,qword ptr [RCX + 0x8]
SUB RSP,0x8
LEA RDI,[RBP + -0x98]
MOV ESI,0xc
MOV R8D,0xe
MOV R9D,0x3
PUSH 0x0
PUSH R10
PUSH RAX
CALL 0x0012d77c
ADD RSP,0x20
MOV CL,0x1
TEST AL,AL
JNZ 0x001416c7
LAB_001416c5:
XOR ECX,ECX
LAB_001416c7:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001416ea
MOV EAX,ECX
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001416ea:
CALL 0x0012b280
|
ulong _ma_compact_keypage(long *param_1,ulong param_2)
{
long lVar1;
int1 auVar2 [16];
byte bVar3;
char cVar4;
byte *pbVar5;
ulong uVar6;
long *plVar7;
byte *pbVar8;
int iVar9;
uint uVar10;
byte *pbVar11;
byte *pbVar12;
long in_FS_OFFSET;
int1 local_f8 [32];
int1 *local_d8;
int8 local_d0;
int1 *local_c0;
long local_b8;
int1 local_a0 [8];
ulong local_98;
byte *local_90;
ulong local_88;
long *local_80;
long *local_78;
int8 local_70;
ulong local_68;
long local_60;
int1 local_58 [2];
int4 local_56;
int1 local_52;
int1 local_51;
int4 local_50;
int2 local_4c;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar6 = 0;
if ((*(byte *)((long)param_1 + 0x2c) & 2) != 0) {
local_68 = 0;
local_78 = (long *)*param_1;
local_60 = *local_78;
local_98 = (ulong)*(uint *)(param_1 + 5);
pbVar11 = (byte *)((ulong)*(uint *)(param_1 + 4) + param_1[2]);
local_c0 = (int1 *)local_78[0x71];
local_b8 = param_1[1];
pbVar12 = (byte *)((ulong)(*(int *)(local_60 + 0x744) + *(uint *)(param_1 + 5)) + param_1[2]);
*local_c0 = 0;
local_70 = 0;
pbVar8 = (byte *)0x0;
local_90 = pbVar11;
local_88 = param_2;
local_80 = param_1;
do {
pbVar5 = (byte *)(**(code **)(param_1[1] + 0xe8))(&local_c0,0,0,pbVar12);
if (pbVar5 == (byte *)0x0) {
_ma_set_fatal_error(local_78,0x7e);
uVar6 = CONCAT71((int7)((ulong)pbVar12 >> 8),1);
goto LAB_001416c7;
}
bVar3 = pbVar5[-1];
if ((bVar3 & 1) != 0) {
if (param_2 == 0xffffffffffffffff) {
LAB_0014150b:
pbVar5[-1] = bVar3 & 0xfe;
uVar10 = *pbVar5 - 0xf8;
if (*pbVar5 < 0xf3) {
uVar10 = 1;
}
iVar9 = (int)local_68;
pbVar11 = pbVar5;
if (pbVar8 != (byte *)0x0) {
uVar6 = (ulong)(uint)(((int)pbVar5 - (int)pbVar8) - iVar9);
memmove(pbVar8,pbVar8 + (local_68 & 0xffffffff),uVar6);
pbVar11 = pbVar8 + uVar6;
param_2 = local_88;
param_1 = local_80;
}
local_68 = (ulong)(iVar9 + uVar10);
pbVar8 = pbVar11;
}
else {
uVar10 = *pbVar5 - 0xf8;
if (*pbVar5 < 0xf3) {
uVar10 = 1;
}
uVar6 = transid_get_packed(local_60);
if (param_2 < uVar6) {
bVar3 = pbVar5[-1];
goto LAB_0014150b;
}
local_70 = CONCAT71((int7)(uVar6 >> 8),1);
}
pbVar5 = pbVar5 + uVar10;
pbVar11 = local_90;
}
pbVar12 = pbVar5 + local_98;
} while (pbVar12 < pbVar11);
if (pbVar8 != (byte *)0x0) {
uVar10 = ((int)pbVar11 - (int)pbVar8) - (int)local_68;
if (uVar10 != 0) {
memmove(pbVar8,pbVar8 + (local_68 & 0xffffffff),(ulong)uVar10);
}
pbVar8 = pbVar8 + ((ulong)uVar10 - param_1[2]);
*(int *)(param_1 + 4) = (int)pbVar8;
*(char *)(param_1[2] + -1 + (ulong)*(uint *)(local_60 + 0x744)) = (char)pbVar8;
*(char *)(param_1[2] + -2 + (ulong)*(uint *)(local_60 + 0x744)) = (char)((ulong)pbVar8 >> 8);
}
if ((char)local_70 == '\0') {
uVar10 = *(uint *)((long)param_1 + 0x2c) & 0xfffffffd;
*(uint *)((long)param_1 + 0x2c) = uVar10;
*(char *)(param_1[2] + (ulong)(*(int *)(local_60 + 0x744) - 3)) = (char)uVar10;
lVar1 = param_1[2];
*(int2 *)(lVar1 + 0xb) = 0;
*(int4 *)(lVar1 + 7) = 0;
}
if (*(char *)(local_60 + 0x7e7) != '\0') {
plVar7 = (long *)*param_1;
auVar2._8_8_ = 0;
auVar2._0_8_ = param_1[3];
auVar2 = auVar2 / ZEXT416(*(uint *)(*plVar7 + 0x7bc));
local_d8 = local_58;
local_56 = auVar2._0_4_;
local_52 = auVar2[4];
local_51 = 0xb;
local_50 = (int4)param_2;
local_4c = (int2)(param_2 >> 0x20);
local_d0 = 0xe;
*(int *)((long)param_1 + 0x24) = (int)param_1[4];
cVar4 = translog_write_record(local_a0,0xc,plVar7[1],plVar7,0xe,3,local_f8,local_d8,0);
uVar6 = CONCAT71((int7)((ulong)plVar7 >> 8),1);
if (cVar4 != '\0') goto LAB_001416c7;
}
uVar6 = 0;
}
LAB_001416c7:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar6 & 0xffffffff;
}
| |
35,964 | my_printv_error | eloqsql/mysys/my_error.c | void my_printv_error(uint error, const char *format, myf MyFlags, va_list ap)
{
char ebuff[ERRMSGSIZE];
DBUG_ENTER("my_printv_error");
DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s",
error, MyFlags, errno, format));
(void) my_vsnprintf(ebuff, sizeof(ebuff), format, ap);
(*error_handler_hook)(error, ebuff, MyFlags);
DBUG_VOID_RETURN;
} | O0 | c | my_printv_error:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp # imm = 0x230
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x214(%rbp)
movq %rsi, -0x220(%rbp)
movq %rdx, -0x228(%rbp)
movq %rcx, -0x230(%rbp)
jmp 0x2e305
leaq -0x210(%rbp), %rdi
movq -0x220(%rbp), %rdx
movq -0x230(%rbp), %rcx
movl $0x200, %esi # imm = 0x200
callq 0x763f0
leaq 0x19f105(%rip), %rax # 0x1cd430
movq (%rax), %rax
movl -0x214(%rbp), %edi
leaq -0x210(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq *%rax
jmp 0x2e346
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2e361
addq $0x230, %rsp # imm = 0x230
popq %rbp
retq
callq 0x242e0
nopw %cs:(%rax,%rax)
| my_printv_error:
push rbp
mov rbp, rsp
sub rsp, 230h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_214], edi
mov [rbp+var_220], rsi
mov [rbp+var_228], rdx
mov [rbp+var_230], rcx
jmp short $+2
loc_2E305:
lea rdi, [rbp+var_210]
mov rdx, [rbp+var_220]
mov rcx, [rbp+var_230]
mov esi, 200h
call my_vsnprintf
lea rax, error_handler_hook
mov rax, [rax]
mov edi, [rbp+var_214]
lea rsi, [rbp+var_210]
mov rdx, [rbp+var_228]
call rax
jmp short $+2
loc_2E346:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2E361
add rsp, 230h
pop rbp
retn
loc_2E361:
call ___stack_chk_fail
| unsigned long long my_printv_error(unsigned int a1, long long a2, __int16 a3, long long a4)
{
_BYTE v6[520]; // [rsp+20h] [rbp-210h] BYREF
unsigned long long v7; // [rsp+228h] [rbp-8h]
v7 = __readfsqword(0x28u);
my_vsnprintf(v6, 512LL, a2, a4);
error_handler_hook(a1, (long long)v6, a3);
return __readfsqword(0x28u);
}
| my_printv_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x230
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x214],EDI
MOV qword ptr [RBP + -0x220],RSI
MOV qword ptr [RBP + -0x228],RDX
MOV qword ptr [RBP + -0x230],RCX
JMP 0x0012e305
LAB_0012e305:
LEA RDI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x220]
MOV RCX,qword ptr [RBP + -0x230]
MOV ESI,0x200
CALL 0x001763f0
LEA RAX,[0x2cd430]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RBP + -0x214]
LEA RSI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x228]
CALL RAX
JMP 0x0012e346
LAB_0012e346:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012e361
ADD RSP,0x230
POP RBP
RET
LAB_0012e361:
CALL 0x001242e0
|
void my_printv_error(int4 param_1,int8 param_2,int8 param_3,int8 param_4)
{
long in_FS_OFFSET;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
my_vsnprintf(local_218,0x200,param_2,param_4);
(*(code *)error_handler_hook)(param_1,local_218,param_3);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
35,965 | tofp16 | bluesky950520[P]quickjs/cutils.h | static inline uint16_t tofp16(double d) {
uint16_t f, s;
double t;
int e;
s = 0;
if (copysign(1, d) < 0) { // preserve sign when |d| is negative zero
d = -d;
s = 0x8000;
}
if (isinf(d))
return s | 0x7C00;
if (isnan(d))
return s | 0x7C01;
if (d == 0)
return s | 0;
d = 2 * frexp(d, &e);
e--;
if (e > 15)
return s | 0x7C00; // out of range, return +/-infinity
if (e < -25) {
d = 0;
e = 0;
} else if (e < -14) {
d = scalbn(d, e + 14);
e = 0;
} else {
d -= 1;
e += 15;
}
d *= 1024.;
f = (uint16_t)d;
t = d - f;
if (t < 0.5)
goto done;
if (t == 0.5)
if ((f & 1) == 0)
goto done;
// adjust for rounding
if (++f == 1024) {
f = 0;
if (++e == 31)
return s | 0x7C00; // out of range, return +/-infinity
}
done:
return s | (e << 10) | f;
} | O1 | c | tofp16:
pushq %r14
pushq %rbx
pushq %rax
movq %xmm0, %rax
movq %rax, %rbx
shrq $0x30, %rbx
andl $0x8000, %ebx # imm = 0x8000
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jne 0x3dcd3
orl $0x7c00, %ebx # imm = 0x7C00
jmp 0x3ddb2
ucomisd %xmm0, %xmm0
jp 0x3ddbc
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x3dced
jnp 0x3ddb2
andpd 0x60a7b(%rip), %xmm0 # 0x9e770
leaq 0x4(%rsp), %r14
movq %r14, %rdi
callq 0xe4b0
movl (%r14), %edi
leal -0x1(%rdi), %eax
movl %eax, (%r14)
cmpl $0x11, %edi
jge 0x3dcc8
cmpl $-0x19, %edi
jg 0x3dd23
movl $0x0, 0x4(%rsp)
xorpd %xmm0, %xmm0
jmp 0x3dd4d
addsd %xmm0, %xmm0
cmpl $-0xe, %edi
jg 0x3dd3e
addl $0xd, %edi
callq 0xe670
movl $0x0, 0x4(%rsp)
jmp 0x3dd4d
addsd 0x60b42(%rip), %xmm0 # 0x9e888
addl $0xe, %edi
movl %edi, 0x4(%rsp)
mulsd 0x60b3b(%rip), %xmm0 # 0x9e890
cvttsd2si %xmm0, %eax
movzwl %ax, %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
subsd %xmm1, %xmm0
movsd 0x60b29(%rip), %xmm1 # 0x9e898
ucomisd %xmm0, %xmm1
ja 0x3dda7
testb $0x1, %al
jne 0x3dd85
ucomisd 0x60b17(%rip), %xmm0 # 0x9e898
jne 0x3dd85
jnp 0x3dda7
incl %eax
movzwl %ax, %ecx
cmpl $0x400, %ecx # imm = 0x400
jne 0x3dda7
movl 0x4(%rsp), %eax
incl %eax
movl %eax, 0x4(%rsp)
cmpl $0x1f, %eax
je 0x3dcc8
xorl %eax, %eax
movl 0x4(%rsp), %ecx
shll $0xa, %ecx
orl %ecx, %ebx
orl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
orl $0x7c01, %ebx # imm = 0x7C01
jmp 0x3ddb2
| tofp16:
push r14
push rbx
push rax
movq rax, xmm0
mov rbx, rax
shr rbx, 30h
and ebx, 8000h
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jnz short loc_3DCD3
loc_3DCC8:
or ebx, 7C00h
jmp loc_3DDB2
loc_3DCD3:
ucomisd xmm0, xmm0
jp loc_3DDBC
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_3DCED
jnp loc_3DDB2
loc_3DCED:
andpd xmm0, cs:xmmword_9E770
lea r14, [rsp+18h+var_14]
mov rdi, r14
call _frexp
mov edi, [r14]
lea eax, [rdi-1]
mov [r14], eax
cmp edi, 11h
jge short loc_3DCC8
cmp edi, 0FFFFFFE7h
jg short loc_3DD23
mov [rsp+18h+var_14], 0
xorpd xmm0, xmm0
jmp short loc_3DD4D
loc_3DD23:
addsd xmm0, xmm0
cmp edi, 0FFFFFFF2h
jg short loc_3DD3E
add edi, 0Dh
call _scalbn
mov [rsp+18h+var_14], 0
jmp short loc_3DD4D
loc_3DD3E:
addsd xmm0, cs:qword_9E888
add edi, 0Eh
mov [rsp+18h+var_14], edi
loc_3DD4D:
mulsd xmm0, cs:qword_9E890
cvttsd2si eax, xmm0
movzx ecx, ax
xorps xmm1, xmm1
cvtsi2sd xmm1, ecx
subsd xmm0, xmm1
movsd xmm1, cs:qword_9E898
ucomisd xmm1, xmm0
ja short loc_3DDA7
test al, 1
jnz short loc_3DD85
ucomisd xmm0, cs:qword_9E898
jnz short loc_3DD85
jnp short loc_3DDA7
loc_3DD85:
inc eax
movzx ecx, ax
cmp ecx, 400h
jnz short loc_3DDA7
mov eax, [rsp+18h+var_14]
inc eax
mov [rsp+18h+var_14], eax
cmp eax, 1Fh
jz loc_3DCC8
xor eax, eax
loc_3DDA7:
mov ecx, [rsp+18h+var_14]
shl ecx, 0Ah
or ebx, ecx
or ebx, eax
loc_3DDB2:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
retn
loc_3DDBC:
or ebx, 7C01h
jmp short loc_3DDB2
| long long tofp16(double a1)
{
long long v1; // rax
long long v2; // rbx
double v3; // xmm0_8
int v4; // edi
double v5; // xmm0_8
double v6; // xmm0_8
int v7; // eax
double v8; // xmm0_8
int v10[5]; // [rsp+0h] [rbp-14h] BYREF
v10[0] = HIDWORD(v1);
v2 = HIWORD(*(_QWORD *)&a1) & 0x8000LL;
if ( (*(_QWORD *)&a1 & 0x7FFFFFFFFFFFFFFFLL) != 0x7FF0000000000000LL )
{
if ( a1 == 0.0 )
return (unsigned int)v2;
v3 = frexp(fabs(a1), v10);
v4 = v10[0]--;
if ( v4 < 17 )
{
if ( v4 > -25 )
{
v5 = v3 + v3;
if ( v4 > -14 )
{
v5 = v5 + -1.0;
v10[0] = v4 + 14;
}
else
{
scalbn((unsigned int)(v4 + 13), v5);
v10[0] = 0;
}
}
else
{
v10[0] = 0;
v5 = 0.0;
}
v6 = v5 * 1024.0;
v7 = (int)v6;
v8 = v6 - (double)(unsigned __int16)(int)v6;
if ( v8 < 0.5 || (v7 & 1) == 0 && v8 == 0.5 )
goto LABEL_16;
if ( (unsigned __int16)++v7 != 1024 )
goto LABEL_16;
if ( ++v10[0] != 31 )
{
v7 = 0;
LABEL_16:
LODWORD(v2) = v7 | (v10[0] << 10) | v2;
return (unsigned int)v2;
}
}
}
LODWORD(v2) = v2 | 0x7C00;
return (unsigned int)v2;
}
| |||
35,966 | tofp16 | bluesky950520[P]quickjs/cutils.h | static inline uint16_t tofp16(double d) {
uint16_t f, s;
double t;
int e;
s = 0;
if (copysign(1, d) < 0) { // preserve sign when |d| is negative zero
d = -d;
s = 0x8000;
}
if (isinf(d))
return s | 0x7C00;
if (isnan(d))
return s | 0x7C01;
if (d == 0)
return s | 0;
d = 2 * frexp(d, &e);
e--;
if (e > 15)
return s | 0x7C00; // out of range, return +/-infinity
if (e < -25) {
d = 0;
e = 0;
} else if (e < -14) {
d = scalbn(d, e + 14);
e = 0;
} else {
d -= 1;
e += 15;
}
d *= 1024.;
f = (uint16_t)d;
t = d - f;
if (t < 0.5)
goto done;
if (t == 0.5)
if ((f & 1) == 0)
goto done;
// adjust for rounding
if (++f == 1024) {
f = 0;
if (++e == 31)
return s | 0x7C00; // out of range, return +/-infinity
}
done:
return s | (e << 10) | f;
} | O2 | c | tofp16:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %xmm0, %rax
movq %rax, %rbx
shrq $0x30, %rbx
andl $0x8000, %ebx # imm = 0x8000
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jne 0x364a8
orl $0x7c00, %ebx # imm = 0x7C00
jmp 0x36567
ucomisd %xmm0, %xmm0
jp 0x36572
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x364c2
jnp 0x36567
andpd 0x4f236(%rip), %xmm0 # 0x85700
leaq 0xc(%rsp), %r14
movq %r14, %rdi
callq 0xe4c0
movl (%r14), %edi
cmpl $0x11, %edi
jge 0x3649d
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
xorl %ebp, %ebp
cmpl $-0x18, %edi
jl 0x36516
addsd %xmm1, %xmm1
cmpl $-0xe, %edi
jg 0x36505
addl $0xd, %edi
movapd %xmm1, %xmm0
callq 0xe690
jmp 0x36516
addsd 0x4f343(%rip), %xmm1 # 0x85850
addl $0xe, %edi
movl %edi, %ebp
movapd %xmm1, %xmm0
mulsd 0x4f33a(%rip), %xmm0 # 0x85858
cvttsd2si %xmm0, %eax
movzwl %ax, %ecx
cvtsi2sd %ecx, %xmm1
subsd %xmm1, %xmm0
movsd 0x4f32b(%rip), %xmm1 # 0x85860
ucomisd %xmm0, %xmm1
ja 0x36560
testb $0x1, %al
jne 0x3654b
ucomisd 0x4f319(%rip), %xmm0 # 0x85860
jne 0x3654b
jnp 0x36560
incl %eax
cmpw $0x400, %ax # imm = 0x400
jne 0x36560
incl %ebp
cmpl $0x1f, %ebp
je 0x3649d
xorl %eax, %eax
shll $0xa, %ebp
orl %ebp, %ebx
orl %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
orl $0x7c01, %ebx # imm = 0x7C01
jmp 0x36567
| tofp16:
push rbp
push r14
push rbx
sub rsp, 10h
movq rax, xmm0
mov rbx, rax
shr rbx, 30h
and ebx, 8000h
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jnz short loc_364A8
loc_3649D:
or ebx, 7C00h
jmp loc_36567
loc_364A8:
ucomisd xmm0, xmm0
jp loc_36572
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_364C2
jnp loc_36567
loc_364C2:
andpd xmm0, cs:xmmword_85700
lea r14, [rsp+28h+var_1C]
mov rdi, r14
call _frexp
mov edi, [r14]
cmp edi, 11h
jge short loc_3649D
movapd xmm1, xmm0
xorpd xmm0, xmm0
xor ebp, ebp
cmp edi, 0FFFFFFE8h
jl short loc_36516
addsd xmm1, xmm1
cmp edi, 0FFFFFFF2h
jg short loc_36505
add edi, 0Dh
movapd xmm0, xmm1
call _scalbn
jmp short loc_36516
loc_36505:
addsd xmm1, cs:qword_85850
add edi, 0Eh
mov ebp, edi
movapd xmm0, xmm1
loc_36516:
mulsd xmm0, cs:qword_85858
cvttsd2si eax, xmm0
movzx ecx, ax
cvtsi2sd xmm1, ecx
subsd xmm0, xmm1
movsd xmm1, cs:qword_85860
ucomisd xmm1, xmm0
ja short loc_36560
test al, 1
jnz short loc_3654B
ucomisd xmm0, cs:qword_85860
jnz short loc_3654B
jnp short loc_36560
loc_3654B:
inc eax
cmp ax, 400h
jnz short loc_36560
inc ebp
cmp ebp, 1Fh
jz loc_3649D
xor eax, eax
loc_36560:
shl ebp, 0Ah
or ebx, ebp
or ebx, eax
loc_36567:
mov eax, ebx
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
loc_36572:
or ebx, 7C01h
jmp short loc_36567
| long long tofp16(double a1)
{
long long v1; // rbx
double v2; // xmm0_8
double v3; // xmm1_8
double v4; // xmm0_8
int v5; // ebp
double v6; // xmm1_8
double v7; // xmm0_8
int v8; // eax
double v9; // xmm0_8
int v11[7]; // [rsp+Ch] [rbp-1Ch] BYREF
v1 = HIWORD(*(_QWORD *)&a1) & 0x8000LL;
if ( (*(_QWORD *)&a1 & 0x7FFFFFFFFFFFFFFFLL) != 0x7FF0000000000000LL )
{
if ( a1 == 0.0 )
return (unsigned int)v1;
v2 = frexp(fabs(a1), v11);
if ( v11[0] < 17 )
{
v3 = v2;
v4 = 0.0;
v5 = 0;
if ( v11[0] >= -24 )
{
v6 = v3 + v3;
if ( v11[0] > -14 )
{
v5 = v11[0] + 14;
v4 = v6 + -1.0;
}
else
{
v4 = v6;
scalbn((unsigned int)(v11[0] + 13), v6);
}
}
v7 = v4 * 1024.0;
v8 = (int)v7;
v9 = v7 - (double)(unsigned __int16)(int)v7;
if ( v9 < 0.5 || (v8 & 1) == 0 && v9 == 0.5 )
goto LABEL_15;
if ( (_WORD)++v8 != 1024 )
goto LABEL_15;
if ( ++v5 != 31 )
{
v8 = 0;
LABEL_15:
LODWORD(v1) = v8 | (v5 << 10) | v1;
return (unsigned int)v1;
}
}
}
LODWORD(v1) = v1 | 0x7C00;
return (unsigned int)v1;
}
| tofp16:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOVQ RAX,XMM0
MOV RBX,RAX
SHR RBX,0x30
AND EBX,0x8000
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JNZ 0x001364a8
LAB_0013649d:
OR EBX,0x7c00
JMP 0x00136567
LAB_001364a8:
UCOMISD XMM0,XMM0
JP 0x00136572
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x001364c2
JNP 0x00136567
LAB_001364c2:
ANDPD XMM0,xmmword ptr [0x00185700]
LEA R14,[RSP + 0xc]
MOV RDI,R14
CALL 0x0010e4c0
MOV EDI,dword ptr [R14]
CMP EDI,0x11
JGE 0x0013649d
MOVAPD XMM1,XMM0
XORPD XMM0,XMM0
XOR EBP,EBP
CMP EDI,-0x18
JL 0x00136516
ADDSD XMM1,XMM1
CMP EDI,-0xe
JG 0x00136505
ADD EDI,0xd
MOVAPD XMM0,XMM1
CALL 0x0010e690
JMP 0x00136516
LAB_00136505:
ADDSD XMM1,qword ptr [0x00185850]
ADD EDI,0xe
MOV EBP,EDI
MOVAPD XMM0,XMM1
LAB_00136516:
MULSD XMM0,qword ptr [0x00185858]
CVTTSD2SI EAX,XMM0
MOVZX ECX,AX
CVTSI2SD XMM1,ECX
SUBSD XMM0,XMM1
MOVSD XMM1,qword ptr [0x00185860]
UCOMISD XMM1,XMM0
JA 0x00136560
TEST AL,0x1
JNZ 0x0013654b
UCOMISD XMM0,qword ptr [0x00185860]
JNZ 0x0013654b
JNP 0x00136560
LAB_0013654b:
INC EAX
CMP AX,0x400
JNZ 0x00136560
INC EBP
CMP EBP,0x1f
JZ 0x0013649d
XOR EAX,EAX
LAB_00136560:
SHL EBP,0xa
OR EBX,EBP
OR EBX,EAX
LAB_00136567:
MOV EAX,EBX
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
LAB_00136572:
OR EBX,0x7c01
JMP 0x00136567
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
uint tofp16(double param_1)
{
uint uVar1;
uint uVar2;
int iVar3;
double dVar4;
double dVar5;
int local_1c;
uVar2 = (ushort)((ulong)param_1 >> 0x30) & 0x8000;
if (ABS(param_1) != INFINITY) {
if (NAN(param_1)) {
return uVar2 | 0x7c01;
}
if ((param_1 == 0.0) && (!NAN(param_1))) {
return uVar2;
}
dVar4 = frexp((double)((ulong)param_1 & _DAT_00185700),&local_1c);
if (local_1c < 0x11) {
dVar5 = 0.0;
iVar3 = 0;
if (-0x19 < local_1c) {
if (local_1c < -0xd) {
dVar5 = scalbn(dVar4 + dVar4,local_1c + 0xd);
iVar3 = 0;
}
else {
dVar5 = dVar4 + dVar4 + _DAT_00185850;
iVar3 = local_1c + 0xe;
}
}
uVar1 = (uint)(dVar5 * _DAT_00185858);
dVar4 = dVar5 * _DAT_00185858 - (double)(uVar1 & 0xffff);
if (DAT_00185860 <= dVar4) {
if ((uVar1 & 1) == 0) {
if ((dVar4 == DAT_00185860) && (!NAN(dVar4) && !NAN(DAT_00185860))) goto LAB_00136560;
}
uVar1 = uVar1 + 1;
if ((short)uVar1 == 0x400) {
iVar3 = iVar3 + 1;
if (iVar3 == 0x1f) goto LAB_0013649d;
uVar1 = 0;
}
}
LAB_00136560:
return uVar2 | iVar3 << 10 | uVar1;
}
}
LAB_0013649d:
return uVar2 | 0x7c00;
}
| |
35,967 | LoadAudioBuffer | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c | AudioBuffer *LoadAudioBuffer(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 sizeInFrames, int usage)
{
AudioBuffer *audioBuffer = (AudioBuffer *)RL_CALLOC(1, sizeof(AudioBuffer));
if (audioBuffer == NULL)
{
TRACELOG(LOG_WARNING, "AUDIO: Failed to allocate memory for buffer");
return NULL;
}
if (sizeInFrames > 0) audioBuffer->data = RL_CALLOC(sizeInFrames*channels*ma_get_bytes_per_sample(format), 1);
// Audio data runs through a format converter
ma_data_converter_config converterConfig = ma_data_converter_config_init(format, AUDIO_DEVICE_FORMAT, channels, AUDIO_DEVICE_CHANNELS, sampleRate, AUDIO.System.device.sampleRate);
converterConfig.allowDynamicSampleRate = true;
ma_result result = ma_data_converter_init(&converterConfig, NULL, &audioBuffer->converter);
if (result != MA_SUCCESS)
{
TRACELOG(LOG_WARNING, "AUDIO: Failed to create data conversion pipeline");
RL_FREE(audioBuffer);
return NULL;
}
// Init audio buffer values
audioBuffer->volume = 1.0f;
audioBuffer->pitch = 1.0f;
audioBuffer->pan = 0.5f;
audioBuffer->callback = NULL;
audioBuffer->processor = NULL;
audioBuffer->playing = false;
audioBuffer->paused = false;
audioBuffer->looping = false;
audioBuffer->usage = usage;
audioBuffer->frameCursorPos = 0;
audioBuffer->sizeInFrames = sizeInFrames;
// Buffers should be marked as processed by default so that a call to
// UpdateAudioStream() immediately after initialization works correctly
audioBuffer->isSubBufferProcessed[0] = true;
audioBuffer->isSubBufferProcessed[1] = true;
// Track audio buffer to linked list next position
TrackAudioBuffer(audioBuffer);
return audioBuffer;
} | O0 | c | LoadAudioBuffer:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl $0x1, %edi
movl $0x188, %esi # imm = 0x188
callq 0xa340
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x79ea5
movl $0x4, %edi
leaq 0x130686(%rip), %rsi # 0x1aa517
movb $0x0, %al
callq 0x182c40
movq $0x0, -0x8(%rbp)
jmp 0x7a02e
cmpl $0x0, -0x18(%rbp)
jbe 0x79ee7
movl -0x18(%rbp), %eax
imull -0x10(%rbp), %eax
movl %eax, -0xa8(%rbp)
movl -0xc(%rbp), %edi
callq 0x35a10
movl %eax, %ecx
movl -0xa8(%rbp), %eax
imull %ecx, %eax
movl %eax, %eax
movl %eax, %edi
movl $0x1, %esi
callq 0xa340
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x170(%rax)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %ecx
movl -0x14(%rbp), %r9d
movl 0x19ce3d(%rip), %eax # 0x216d34
leaq -0xa0(%rbp), %rdi
movl $0x5, %edx
movl $0x2, %r8d
movl %eax, (%rsp)
callq 0x4d870
movl $0x1, -0x60(%rbp)
movq -0x28(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4e190
movl %eax, -0xa4(%rbp)
cmpl $0x0, -0xa4(%rbp)
je 0x79f64
movl $0x4, %edi
leaq 0x1305fc(%rip), %rsi # 0x1aa543
movb $0x0, %al
callq 0x182c40
movq -0x28(%rbp), %rdi
callq 0xa640
movq $0x0, -0x8(%rbp)
jmp 0x7a02e
movq -0x28(%rbp), %rax
movss 0x12a184(%rip), %xmm0 # 0x1a40f4
movss %xmm0, 0x148(%rax)
movq -0x28(%rbp), %rax
movss 0x12a170(%rip), %xmm0 # 0x1a40f4
movss %xmm0, 0x14c(%rax)
movq -0x28(%rbp), %rax
movss 0x12a158(%rip), %xmm0 # 0x1a40f0
movss %xmm0, 0x150(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x138(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x140(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x154(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x155(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x156(%rax)
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x158(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x164(%rax)
movl -0x18(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x160(%rax)
movq -0x28(%rbp), %rax
movb $0x1, 0x15c(%rax)
movq -0x28(%rbp), %rax
movb $0x1, 0x15d(%rax)
movq -0x28(%rbp), %rdi
callq 0x7a040
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| LoadAudioBuffer:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_C], edi
mov [rbp+var_10], esi
mov [rbp+var_14], edx
mov [rbp+var_18], ecx
mov [rbp+var_1C], r8d
mov edi, 1
mov esi, 188h
call _calloc
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_79EA5
mov edi, 4
lea rsi, aAudioFailedToA; "AUDIO: Failed to allocate memory for bu"...
mov al, 0
call TraceLog
mov [rbp+var_8], 0
jmp loc_7A02E
loc_79EA5:
cmp [rbp+var_18], 0
jbe short loc_79EE7
mov eax, [rbp+var_18]
imul eax, [rbp+var_10]
mov [rbp+var_A8], eax
mov edi, [rbp+var_C]
call ma_get_bytes_per_sample
mov ecx, eax
mov eax, [rbp+var_A8]
imul eax, ecx
mov eax, eax
mov edi, eax
mov esi, 1
call _calloc
mov rcx, rax
mov rax, [rbp+var_28]
mov [rax+170h], rcx
loc_79EE7:
mov esi, [rbp+var_C]
mov ecx, [rbp+var_10]
mov r9d, [rbp+var_14]
mov eax, cs:dword_216D34
lea rdi, [rbp+var_A0]
mov edx, 5
mov r8d, 2
mov [rsp+0B0h+var_B0], eax
call ma_data_converter_config_init
mov [rbp+var_60], 1
mov rdx, [rbp+var_28]
lea rdi, [rbp+var_A0]
xor eax, eax
mov esi, eax
call ma_data_converter_init
mov [rbp+var_A4], eax
cmp [rbp+var_A4], 0
jz short loc_79F64
mov edi, 4
lea rsi, aAudioFailedToC_0; "AUDIO: Failed to create data conversion"...
mov al, 0
call TraceLog
mov rdi, [rbp+var_28]
call _free
mov [rbp+var_8], 0
jmp loc_7A02E
loc_79F64:
mov rax, [rbp+var_28]
movss xmm0, cs:dword_1A40F4
movss dword ptr [rax+148h], xmm0
mov rax, [rbp+var_28]
movss xmm0, cs:dword_1A40F4
movss dword ptr [rax+14Ch], xmm0
mov rax, [rbp+var_28]
movss xmm0, cs:dword_1A40F0
movss dword ptr [rax+150h], xmm0
mov rax, [rbp+var_28]
mov qword ptr [rax+138h], 0
mov rax, [rbp+var_28]
mov qword ptr [rax+140h], 0
mov rax, [rbp+var_28]
mov byte ptr [rax+154h], 0
mov rax, [rbp+var_28]
mov byte ptr [rax+155h], 0
mov rax, [rbp+var_28]
mov byte ptr [rax+156h], 0
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_28]
mov [rax+158h], ecx
mov rax, [rbp+var_28]
mov dword ptr [rax+164h], 0
mov ecx, [rbp+var_18]
mov rax, [rbp+var_28]
mov [rax+160h], ecx
mov rax, [rbp+var_28]
mov byte ptr [rax+15Ch], 1
mov rax, [rbp+var_28]
mov byte ptr [rax+15Dh], 1
mov rdi, [rbp+var_28]
call TrackAudioBuffer
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_7A02E:
mov rax, [rbp+var_8]
add rsp, 0B0h
pop rbp
retn
| long long LoadAudioBuffer(unsigned int a1, int a2, int a3, int a4, int a5)
{
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
int bytes_per_sample; // eax
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
_DWORD v15[30]; // [rsp+10h] [rbp-A0h] BYREF
long long v16; // [rsp+88h] [rbp-28h]
int v17; // [rsp+94h] [rbp-1Ch]
int v18; // [rsp+98h] [rbp-18h]
int v19; // [rsp+9Ch] [rbp-14h]
int v20; // [rsp+A0h] [rbp-10h]
unsigned int v21; // [rsp+A4h] [rbp-Ch]
v21 = a1;
v20 = a2;
v19 = a3;
v18 = a4;
v17 = a5;
v16 = calloc(1LL, 392LL);
if ( v16 )
{
if ( v18 )
{
bytes_per_sample = ma_get_bytes_per_sample(v21);
*(_QWORD *)(v16 + 368) = calloc((unsigned int)(bytes_per_sample * v20 * v18), 1LL);
}
ma_data_converter_config_init(v15, v21, 5, v20, 2, v19, dword_216D34);
v15[16] = 1;
if ( (unsigned int)ma_data_converter_init(v15, 0LL, v16) )
{
TraceLog(4, (unsigned int)"AUDIO: Failed to create data conversion pipeline", v10, v11, v12, v13);
free(v16);
return 0LL;
}
else
{
*(_DWORD *)(v16 + 328) = 1065353216;
*(_DWORD *)(v16 + 332) = 1065353216;
*(_DWORD *)(v16 + 336) = 1056964608;
*(_QWORD *)(v16 + 312) = 0LL;
*(_QWORD *)(v16 + 320) = 0LL;
*(_BYTE *)(v16 + 340) = 0;
*(_BYTE *)(v16 + 341) = 0;
*(_BYTE *)(v16 + 342) = 0;
*(_DWORD *)(v16 + 344) = v17;
*(_DWORD *)(v16 + 356) = 0;
*(_DWORD *)(v16 + 352) = v18;
*(_BYTE *)(v16 + 348) = 1;
*(_BYTE *)(v16 + 349) = 1;
TrackAudioBuffer(v16);
return v16;
}
}
else
{
TraceLog(4, (unsigned int)"AUDIO: Failed to allocate memory for buffer", v5, v6, v7, v8);
return 0LL;
}
}
| LoadAudioBuffer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV dword ptr [RBP + -0xc],EDI
MOV dword ptr [RBP + -0x10],ESI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],ECX
MOV dword ptr [RBP + -0x1c],R8D
MOV EDI,0x1
MOV ESI,0x188
CALL 0x0010a340
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x00179ea5
MOV EDI,0x4
LEA RSI,[0x2aa517]
MOV AL,0x0
CALL 0x00282c40
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0017a02e
LAB_00179ea5:
CMP dword ptr [RBP + -0x18],0x0
JBE 0x00179ee7
MOV EAX,dword ptr [RBP + -0x18]
IMUL EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0xa8],EAX
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x00135a10
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0xa8]
IMUL EAX,ECX
MOV EAX,EAX
MOV EDI,EAX
MOV ESI,0x1
CALL 0x0010a340
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x170],RCX
LAB_00179ee7:
MOV ESI,dword ptr [RBP + -0xc]
MOV ECX,dword ptr [RBP + -0x10]
MOV R9D,dword ptr [RBP + -0x14]
MOV EAX,dword ptr [0x00316d34]
LEA RDI,[RBP + -0xa0]
MOV EDX,0x5
MOV R8D,0x2
MOV dword ptr [RSP],EAX
CALL 0x0014d870
MOV dword ptr [RBP + -0x60],0x1
MOV RDX,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0xa0]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0014e190
MOV dword ptr [RBP + -0xa4],EAX
CMP dword ptr [RBP + -0xa4],0x0
JZ 0x00179f64
MOV EDI,0x4
LEA RSI,[0x2aa543]
MOV AL,0x0
CALL 0x00282c40
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0010a640
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0017a02e
LAB_00179f64:
MOV RAX,qword ptr [RBP + -0x28]
MOVSS XMM0,dword ptr [0x002a40f4]
MOVSS dword ptr [RAX + 0x148],XMM0
MOV RAX,qword ptr [RBP + -0x28]
MOVSS XMM0,dword ptr [0x002a40f4]
MOVSS dword ptr [RAX + 0x14c],XMM0
MOV RAX,qword ptr [RBP + -0x28]
MOVSS XMM0,dword ptr [0x002a40f0]
MOVSS dword ptr [RAX + 0x150],XMM0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x138],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x140],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x154],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x155],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x156],0x0
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x158],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x164],0x0
MOV ECX,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x160],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x15c],0x1
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x15d],0x1
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0017a040
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_0017a02e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xb0
POP RBP
RET
|
void * LoadAudioBuffer(int4 param_1,int param_2,int4 param_3,int param_4,
int4 param_5)
{
int iVar1;
int iVar2;
void *pvVar3;
int1 local_a8 [64];
int4 local_68;
void *local_30;
int4 local_24;
int local_20;
int4 local_1c;
int local_18;
int4 local_14;
void *local_10;
local_24 = param_5;
local_20 = param_4;
local_1c = param_3;
local_18 = param_2;
local_14 = param_1;
local_30 = calloc(1,0x188);
if (local_30 == (void *)0x0) {
TraceLog(4,"AUDIO: Failed to allocate memory for buffer");
local_10 = (void *)0x0;
}
else {
if (local_20 != 0) {
iVar1 = local_20 * local_18;
iVar2 = ma_get_bytes_per_sample(local_14);
pvVar3 = calloc((ulong)(uint)(iVar1 * iVar2),1);
*(void **)((long)local_30 + 0x170) = pvVar3;
}
ma_data_converter_config_init(local_a8,local_14,5,local_18,2,local_1c,AUDIO._1028_4_);
local_68 = 1;
iVar1 = ma_data_converter_init(local_a8,0,local_30);
if (iVar1 == 0) {
*(int4 *)((long)local_30 + 0x148) = DAT_002a40f4;
*(int4 *)((long)local_30 + 0x14c) = DAT_002a40f4;
*(int4 *)((long)local_30 + 0x150) = DAT_002a40f0;
*(int8 *)((long)local_30 + 0x138) = 0;
*(int8 *)((long)local_30 + 0x140) = 0;
*(int1 *)((long)local_30 + 0x154) = 0;
*(int1 *)((long)local_30 + 0x155) = 0;
*(int1 *)((long)local_30 + 0x156) = 0;
*(int4 *)((long)local_30 + 0x158) = local_24;
*(int4 *)((long)local_30 + 0x164) = 0;
*(int *)((long)local_30 + 0x160) = local_20;
*(int1 *)((long)local_30 + 0x15c) = 1;
*(int1 *)((long)local_30 + 0x15d) = 1;
TrackAudioBuffer(local_30);
local_10 = local_30;
}
else {
TraceLog(4,"AUDIO: Failed to create data conversion pipeline");
free(local_30);
local_10 = (void *)0x0;
}
}
return local_10;
}
| |
35,968 | LoadAudioBuffer | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c | AudioBuffer *LoadAudioBuffer(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 sizeInFrames, int usage)
{
AudioBuffer *audioBuffer = (AudioBuffer *)RL_CALLOC(1, sizeof(AudioBuffer));
if (audioBuffer == NULL)
{
TRACELOG(LOG_WARNING, "AUDIO: Failed to allocate memory for buffer");
return NULL;
}
if (sizeInFrames > 0) audioBuffer->data = RL_CALLOC(sizeInFrames*channels*ma_get_bytes_per_sample(format), 1);
// Audio data runs through a format converter
ma_data_converter_config converterConfig = ma_data_converter_config_init(format, AUDIO_DEVICE_FORMAT, channels, AUDIO_DEVICE_CHANNELS, sampleRate, AUDIO.System.device.sampleRate);
converterConfig.allowDynamicSampleRate = true;
ma_result result = ma_data_converter_init(&converterConfig, NULL, &audioBuffer->converter);
if (result != MA_SUCCESS)
{
TRACELOG(LOG_WARNING, "AUDIO: Failed to create data conversion pipeline");
RL_FREE(audioBuffer);
return NULL;
}
// Init audio buffer values
audioBuffer->volume = 1.0f;
audioBuffer->pitch = 1.0f;
audioBuffer->pan = 0.5f;
audioBuffer->callback = NULL;
audioBuffer->processor = NULL;
audioBuffer->playing = false;
audioBuffer->paused = false;
audioBuffer->looping = false;
audioBuffer->usage = usage;
audioBuffer->frameCursorPos = 0;
audioBuffer->sizeInFrames = sizeInFrames;
// Buffers should be marked as processed by default so that a call to
// UpdateAudioStream() immediately after initialization works correctly
audioBuffer->isSubBufferProcessed[0] = true;
audioBuffer->isSubBufferProcessed[1] = true;
// Track audio buffer to linked list next position
TrackAudioBuffer(audioBuffer);
return audioBuffer;
} | O1 | c | LoadAudioBuffer:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r8d, %r14d
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movl %edi, %r13d
movl $0x1, %edi
movl $0x188, %esi # imm = 0x188
callq 0x9330
testq %rax, %rax
je 0x431e5
movq %rax, %rbx
testl %ebp, %ebp
je 0x43162
movl %ebp, %edi
imull %r12d, %edi
movl %r13d, %eax
leaq 0x92ae3(%rip), %rcx # 0xd5c30
imull (%rcx,%rax,4), %edi
movl $0x1, %esi
callq 0x9330
movq %rax, 0x170(%rbx)
movl 0xfaafc(%rip), %eax # 0x13dc64
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x50(%rdi)
movaps %xmm0, 0x60(%rdi)
movq $0x0, 0x70(%rdi)
movl $0x1, %ecx
movl %ecx, 0x70(%rdi)
movl %r13d, (%rdi)
movl $0x5, 0x4(%rdi)
movl %r12d, 0x8(%rdi)
movl $0x2, 0xc(%rdi)
movl %r15d, 0x10(%rdi)
movl %eax, 0x14(%rdi)
movl %ecx, 0x40(%rdi)
xorl %esi, %esi
movq %rbx, %rdx
callq 0x26672
testl %eax, %eax
je 0x431fc
leaq 0x98cae(%rip), %rsi # 0xdbe7b
movl $0x4, %edi
xorl %eax, %eax
callq 0xbfa73
movq %rbx, %rdi
callq 0x9650
xorl %ebx, %ebx
jmp 0x43259
leaq 0x98c63(%rip), %rsi # 0xdbe4f
xorl %ebx, %ebx
movl $0x4, %edi
xorl %eax, %eax
callq 0xbfa73
jmp 0x43259
movabsq $0x3f8000003f800000, %rax # imm = 0x3F8000003F800000
movq %rax, 0x148(%rbx)
movl $0x3f000000, 0x150(%rbx) # imm = 0x3F000000
movw $0x0, 0x154(%rbx)
movb $0x0, 0x156(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x138(%rbx)
movl %r14d, 0x158(%rbx)
movl $0x0, 0x164(%rbx)
movl %ebp, 0x160(%rbx)
movw $0x101, 0x15c(%rbx) # imm = 0x101
movq %rbx, %rdi
callq 0x4326b
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| LoadAudioBuffer:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r14d, r8d
mov ebp, ecx
mov r15d, edx
mov r12d, esi
mov r13d, edi
mov edi, 1
mov esi, 188h
call _calloc
test rax, rax
jz loc_431E5
mov rbx, rax
test ebp, ebp
jz short loc_43162
mov edi, ebp
imul edi, r12d
mov eax, r13d
lea rcx, dword_D5C30
imul edi, [rcx+rax*4]
mov esi, 1
call _calloc
mov [rbx+170h], rax
loc_43162:
mov eax, cs:dword_13DC64
xorps xmm0, xmm0
mov rdi, rsp
movaps xmmword ptr [rdi], xmm0
movaps xmmword ptr [rdi+10h], xmm0
movaps xmmword ptr [rdi+40h], xmm0
movaps xmmword ptr [rdi+20h], xmm0
movaps xmmword ptr [rdi+30h], xmm0
movaps xmmword ptr [rdi+50h], xmm0
movaps xmmword ptr [rdi+60h], xmm0
mov qword ptr [rdi+70h], 0
mov ecx, 1
mov [rdi+70h], ecx
mov [rdi], r13d
mov dword ptr [rdi+4], 5
mov [rdi+8], r12d
mov dword ptr [rdi+0Ch], 2
mov [rdi+10h], r15d
mov [rdi+14h], eax
mov [rdi+40h], ecx
xor esi, esi
mov rdx, rbx
call ma_data_converter_init
test eax, eax
jz short loc_431FC
lea rsi, aAudioFailedToC_0; "AUDIO: Failed to create data conversion"...
mov edi, 4
xor eax, eax
call TraceLog
mov rdi, rbx
call _free
xor ebx, ebx
jmp short loc_43259
loc_431E5:
lea rsi, aAudioFailedToA; "AUDIO: Failed to allocate memory for bu"...
xor ebx, ebx
mov edi, 4
xor eax, eax
call TraceLog
jmp short loc_43259
loc_431FC:
mov rax, 3F8000003F800000h
mov [rbx+148h], rax
mov dword ptr [rbx+150h], 3F000000h
mov word ptr [rbx+154h], 0
mov byte ptr [rbx+156h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx+138h], xmm0
mov [rbx+158h], r14d
mov dword ptr [rbx+164h], 0
mov [rbx+160h], ebp
mov word ptr [rbx+15Ch], 101h
mov rdi, rbx
call TrackAudioBuffer
loc_43259:
mov rax, rbx
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LoadAudioBuffer(int a1, int a2, unsigned int a3, int a4, int a5)
{
long long v8; // rax
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
long long v13; // rbx
int v14; // edx
int v15; // ecx
int v16; // r8d
int v17; // r9d
_DWORD v19[4]; // [rsp+0h] [rbp-A8h] BYREF
__int128 v20; // [rsp+10h] [rbp-98h]
__int128 v21; // [rsp+20h] [rbp-88h]
__int128 v22; // [rsp+30h] [rbp-78h]
__int128 v23; // [rsp+40h] [rbp-68h]
__int128 v24; // [rsp+50h] [rbp-58h]
__int128 v25; // [rsp+60h] [rbp-48h]
long long v26; // [rsp+70h] [rbp-38h]
v8 = calloc(1LL, 392LL);
if ( v8 )
{
v13 = v8;
if ( a4 )
*(_QWORD *)(v8 + 368) = calloc((unsigned int)(dword_D5C30[a1] * a2 * a4), 1LL);
v20 = 0LL;
v23 = 0LL;
v21 = 0LL;
v22 = 0LL;
v24 = 0LL;
v25 = 0LL;
v26 = 1LL;
v19[0] = a1;
v19[1] = 5;
v19[2] = a2;
v19[3] = 2;
*(_QWORD *)&v20 = __PAIR64__(dword_13DC64, a3);
LODWORD(v23) = 1;
if ( (unsigned int)ma_data_converter_init((long long)v19, 0LL, v13) )
{
TraceLog(4, (unsigned int)"AUDIO: Failed to create data conversion pipeline", v14, v15, v16, v17);
free(v13);
return 0LL;
}
else
{
*(_QWORD *)(v13 + 328) = 0x3F8000003F800000LL;
*(_DWORD *)(v13 + 336) = 1056964608;
*(_WORD *)(v13 + 340) = 0;
*(_BYTE *)(v13 + 342) = 0;
*(_OWORD *)(v13 + 312) = 0LL;
*(_DWORD *)(v13 + 344) = a5;
*(_DWORD *)(v13 + 356) = 0;
*(_DWORD *)(v13 + 352) = a4;
*(_WORD *)(v13 + 348) = 257;
TrackAudioBuffer(v13);
}
}
else
{
v13 = 0LL;
TraceLog(4, (unsigned int)"AUDIO: Failed to allocate memory for buffer", v9, v10, v11, v12);
}
return v13;
}
| LoadAudioBuffer:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R14D,R8D
MOV EBP,ECX
MOV R15D,EDX
MOV R12D,ESI
MOV R13D,EDI
MOV EDI,0x1
MOV ESI,0x188
CALL 0x00109330
TEST RAX,RAX
JZ 0x001431e5
MOV RBX,RAX
TEST EBP,EBP
JZ 0x00143162
MOV EDI,EBP
IMUL EDI,R12D
MOV EAX,R13D
LEA RCX,[0x1d5c30]
IMUL EDI,dword ptr [RCX + RAX*0x4]
MOV ESI,0x1
CALL 0x00109330
MOV qword ptr [RBX + 0x170],RAX
LAB_00143162:
MOV EAX,dword ptr [0x0023dc64]
XORPS XMM0,XMM0
MOV RDI,RSP
MOVAPS xmmword ptr [RDI],XMM0
MOVAPS xmmword ptr [RDI + 0x10],XMM0
MOVAPS xmmword ptr [RDI + 0x40],XMM0
MOVAPS xmmword ptr [RDI + 0x20],XMM0
MOVAPS xmmword ptr [RDI + 0x30],XMM0
MOVAPS xmmword ptr [RDI + 0x50],XMM0
MOVAPS xmmword ptr [RDI + 0x60],XMM0
MOV qword ptr [RDI + 0x70],0x0
MOV ECX,0x1
MOV dword ptr [RDI + 0x70],ECX
MOV dword ptr [RDI],R13D
MOV dword ptr [RDI + 0x4],0x5
MOV dword ptr [RDI + 0x8],R12D
MOV dword ptr [RDI + 0xc],0x2
MOV dword ptr [RDI + 0x10],R15D
MOV dword ptr [RDI + 0x14],EAX
MOV dword ptr [RDI + 0x40],ECX
XOR ESI,ESI
MOV RDX,RBX
CALL 0x00126672
TEST EAX,EAX
JZ 0x001431fc
LEA RSI,[0x1dbe7b]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001bfa73
MOV RDI,RBX
CALL 0x00109650
XOR EBX,EBX
JMP 0x00143259
LAB_001431e5:
LEA RSI,[0x1dbe4f]
XOR EBX,EBX
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001bfa73
JMP 0x00143259
LAB_001431fc:
MOV RAX,0x3f8000003f800000
MOV qword ptr [RBX + 0x148],RAX
MOV dword ptr [RBX + 0x150],0x3f000000
MOV word ptr [RBX + 0x154],0x0
MOV byte ptr [RBX + 0x156],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x138],XMM0
MOV dword ptr [RBX + 0x158],R14D
MOV dword ptr [RBX + 0x164],0x0
MOV dword ptr [RBX + 0x160],EBP
MOV word ptr [RBX + 0x15c],0x101
MOV RDI,RBX
CALL 0x0014326b
LAB_00143259:
MOV RAX,RBX
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void * LoadAudioBuffer(uint param_1,int param_2,int4 param_3,int param_4,int4 param_5)
{
int iVar1;
void *__ptr;
void *pvVar2;
uint local_a8;
int4 uStack_a4;
int iStack_a0;
int4 uStack_9c;
int4 local_98;
int8 uStack_90;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
int8 local_38;
__ptr = calloc(1,0x188);
if (__ptr == (void *)0x0) {
__ptr = (void *)0x0;
TraceLog(4,"AUDIO: Failed to allocate memory for buffer");
}
else {
if (param_4 != 0) {
pvVar2 = calloc((ulong)(uint)(param_4 * param_2 * (&DAT_001d5c30)[param_1]),1);
*(void **)((long)__ptr + 0x170) = pvVar2;
}
uStack_90 = 0;
uStack_60 = 0;
local_88 = 0;
uStack_80 = 0;
local_78 = 0;
uStack_70 = 0;
local_58 = 0;
uStack_50 = 0;
local_48 = 0;
uStack_40 = 0;
local_38 = 1;
_local_a8 = CONCAT44(5,param_1);
_iStack_a0 = CONCAT44(2,param_2);
_local_98 = CONCAT44(AUDIO._1028_4_,param_3);
local_68 = 1;
iVar1 = ma_data_converter_init(&local_a8,0,__ptr);
if (iVar1 == 0) {
*(int8 *)((long)__ptr + 0x148) = 0x3f8000003f800000;
*(int4 *)((long)__ptr + 0x150) = 0x3f000000;
*(int2 *)((long)__ptr + 0x154) = 0;
*(int1 *)((long)__ptr + 0x156) = 0;
*(int8 *)((long)__ptr + 0x138) = 0;
*(int8 *)((long)__ptr + 0x140) = 0;
*(int4 *)((long)__ptr + 0x158) = param_5;
*(int4 *)((long)__ptr + 0x164) = 0;
*(int *)((long)__ptr + 0x160) = param_4;
*(int2 *)((long)__ptr + 0x15c) = 0x101;
TrackAudioBuffer(__ptr);
}
else {
TraceLog(4,"AUDIO: Failed to create data conversion pipeline");
free(__ptr);
__ptr = (void *)0x0;
}
}
return __ptr;
}
| |
35,969 | my_close | eloqsql/mysys/my_open.c | int my_close(File fd, myf MyFlags)
{
int err;
char *name= NULL;
DBUG_ENTER("my_close");
DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE)))
MyFlags|= my_global_flags;
if ((uint) fd < my_file_limit && my_file_info[fd].type != UNOPEN)
{
name= my_file_info[fd].name;
my_file_info[fd].name= NULL;
my_file_info[fd].type= UNOPEN;
}
#ifndef _WIN32
err= close(fd);
#else
err= my_win_close(fd);
#endif
if (err)
{
DBUG_PRINT("error",("Got error %d on close",err));
my_errno=errno;
if (MyFlags & (MY_FAE | MY_WME))
my_error(EE_BADCLOSE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
name,errno);
}
if (name)
{
my_free(name);
}
my_atomic_add32_explicit(&my_file_opened, -1, MY_MEMORY_ORDER_RELAXED);
DBUG_RETURN(err);
} | O3 | c | my_close:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
xorl %ebx, %ebx
movl $0x0, %r14d
testb $0x18, %r12b
jne 0xa0586
leaq 0xb67c45(%rip), %rax # 0xc081c8
movq (%rax), %r14
leaq 0x2e5583(%rip), %rax # 0x385b10
cmpl %edi, (%rax)
jbe 0xa05c5
leaq 0x2e5580(%rip), %rax # 0x385b18
movq (%rax), %rdx
movslq %edi, %rcx
shlq $0x4, %rcx
cmpl $0x0, 0x8(%rdx,%rcx)
je 0xa05c3
addq %rcx, %rdx
movq (%rdx), %rbx
movq $0x0, (%rdx)
movq (%rax), %rax
movl $0x0, 0x8(%rax,%rcx)
jmp 0xa05c5
xorl %ebx, %ebx
callq 0x291b0
movl %eax, %r15d
testl %eax, %eax
je 0xa060e
orq %r12, %r14
callq 0x297b0
movq %rax, %r12
movl (%rax), %r13d
callq 0xa1afa
movl %r13d, (%rax)
testb $0x18, %r14b
je 0xa060e
andl $0x440, %r14d # imm = 0x440
orq $0x4, %r14
movl (%r12), %ecx
movl $0x4, %edi
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9e1af
testq %rbx, %rbx
je 0xa061b
movq %rbx, %rdi
callq 0x9ffb6
leaq 0xb67bb2(%rip), %rax # 0xc081d4
lock
decl (%rax)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| my_close:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rsi
xor ebx, ebx
mov r14d, 0
test r12b, 18h
jnz short loc_A0586
lea rax, my_global_flags
mov r14, [rax]
loc_A0586:
lea rax, my_file_limit
cmp [rax], edi
jbe short loc_A05C5
lea rax, my_file_info
mov rdx, [rax]
movsxd rcx, edi
shl rcx, 4
cmp dword ptr [rdx+rcx+8], 0
jz short loc_A05C3
add rdx, rcx
mov rbx, [rdx]
mov qword ptr [rdx], 0
mov rax, [rax]
mov dword ptr [rax+rcx+8], 0
jmp short loc_A05C5
loc_A05C3:
xor ebx, ebx
loc_A05C5:
call _close
mov r15d, eax
test eax, eax
jz short loc_A060E
or r14, r12
call ___errno_location
mov r12, rax
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r14b, 18h
jz short loc_A060E
and r14d, 440h
or r14, 4
mov ecx, [r12]
mov edi, 4
mov rsi, r14
mov rdx, rbx
xor eax, eax
call my_error
loc_A060E:
test rbx, rbx
jz short loc_A061B
mov rdi, rbx
call my_free
loc_A061B:
lea rax, my_file_opened
lock dec dword ptr [rax]
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_close(long long a1, const char *a2)
{
long long v2; // rbx
__int16 v3; // r14
long long v4; // rcx
unsigned int v5; // r15d
__int16 v6; // r14
unsigned int *v7; // r12
unsigned int v8; // r13d
v2 = 0LL;
v3 = 0;
if ( ((unsigned __int8)a2 & 0x18) == 0 )
v3 = my_global_flags;
if ( my_file_limit > (unsigned int)a1 )
{
v4 = 16LL * (int)a1;
if ( *(_DWORD *)((char *)my_file_info + v4 + 8) )
{
v2 = *(_QWORD *)((char *)my_file_info + v4);
*(_QWORD *)((char *)my_file_info + v4) = 0LL;
*(_DWORD *)((char *)my_file_info + v4 + 8) = 0;
}
else
{
v2 = 0LL;
}
}
v5 = close(a1);
if ( v5 )
{
v6 = (unsigned __int16)a2 | v3;
v7 = (unsigned int *)__errno_location(a1);
v8 = *v7;
*(_DWORD *)my_thread_var(a1, a2) = v8;
if ( (v6 & 0x18) != 0 )
my_error(4u, v6 & 0x440 | 4LL, v2, *v7);
}
if ( v2 )
my_free(v2);
_InterlockedDecrement(my_file_opened);
return v5;
}
| my_close:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RSI
XOR EBX,EBX
MOV R14D,0x0
TEST R12B,0x18
JNZ 0x001a0586
LEA RAX,[0xd081c8]
MOV R14,qword ptr [RAX]
LAB_001a0586:
LEA RAX,[0x485b10]
CMP dword ptr [RAX],EDI
JBE 0x001a05c5
LEA RAX,[0x485b18]
MOV RDX,qword ptr [RAX]
MOVSXD RCX,EDI
SHL RCX,0x4
CMP dword ptr [RDX + RCX*0x1 + 0x8],0x0
JZ 0x001a05c3
ADD RDX,RCX
MOV RBX,qword ptr [RDX]
MOV qword ptr [RDX],0x0
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX + RCX*0x1 + 0x8],0x0
JMP 0x001a05c5
LAB_001a05c3:
XOR EBX,EBX
LAB_001a05c5:
CALL 0x001291b0
MOV R15D,EAX
TEST EAX,EAX
JZ 0x001a060e
OR R14,R12
CALL 0x001297b0
MOV R12,RAX
MOV R13D,dword ptr [RAX]
CALL 0x001a1afa
MOV dword ptr [RAX],R13D
TEST R14B,0x18
JZ 0x001a060e
AND R14D,0x440
OR R14,0x4
MOV ECX,dword ptr [R12]
MOV EDI,0x4
MOV RSI,R14
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0019e1af
LAB_001a060e:
TEST RBX,RBX
JZ 0x001a061b
MOV RDI,RBX
CALL 0x0019ffb6
LAB_001a061b:
LEA RAX,[0xd081d4]
DEC.LOCK dword ptr [RAX]
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_close(uint param_1,ulong param_2)
{
int iVar1;
int iVar2;
int *piVar3;
int *piVar4;
long lVar5;
long lVar6;
ulong uVar7;
lVar6 = 0;
uVar7 = 0;
if ((param_2 & 0x18) == 0) {
uVar7 = my_global_flags;
}
if (param_1 < my_file_limit) {
lVar5 = (long)(int)param_1 * 0x10;
if (*(int *)(my_file_info + lVar5 + 8) == 0) {
lVar6 = 0;
}
else {
lVar6 = *(long *)(my_file_info + lVar5);
*(long *)(my_file_info + lVar5) = 0;
*(int4 *)(my_file_info + lVar5 + 8) = 0;
}
}
iVar2 = close(param_1);
if (iVar2 != 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if (((uVar7 | param_2) & 0x18) != 0) {
my_error(4,(uint)(uVar7 | param_2) & 0x440 | 4,lVar6,*piVar3);
}
}
if (lVar6 != 0) {
my_free(lVar6);
}
LOCK();
my_file_opened = my_file_opened + -1;
UNLOCK();
return iVar2;
}
| |
35,970 | mi_put_key_in_record | eloqsql/storage/myisam/mi_key.c | static int _mi_put_key_in_record(register MI_INFO *info, uint keynr,
my_bool unpack_blobs, uchar *record)
{
reg2 uchar *key;
uchar *pos,*key_end;
reg1 HA_KEYSEG *keyseg;
uchar *blob_ptr;
DBUG_ENTER("_mi_put_key_in_record");
blob_ptr= (uchar*) info->lastkey2; /* Place to put blob parts */
key=(uchar*) info->lastkey; /* KEy that was read */
key_end=key+info->lastkey_length;
for (keyseg=info->s->keyinfo[keynr].seg ; keyseg->type ;keyseg++)
{
if (keyseg->null_bit)
{
if (!*key++)
{
record[keyseg->null_pos]|= keyseg->null_bit;
continue;
}
record[keyseg->null_pos]&= ~keyseg->null_bit;
}
if (keyseg->type == HA_KEYTYPE_BIT)
{
uint length= keyseg->length;
if (keyseg->bit_length)
{
uchar bits= *key++;
set_rec_bits(bits, record + keyseg->bit_pos, keyseg->bit_start,
keyseg->bit_length);
length--;
}
else
{
clr_rec_bits(record + keyseg->bit_pos, keyseg->bit_start,
keyseg->bit_length);
}
memcpy(record + keyseg->start, (uchar*) key, length);
key+= length;
continue;
}
if (keyseg->flag & HA_SPACE_PACK)
{
uint length;
get_key_length(length,key);
#ifdef CHECK_KEYS
if (length > keyseg->length || key+length > key_end)
goto err;
#endif
pos= record+keyseg->start;
if (keyseg->type != (int) HA_KEYTYPE_NUM)
{
memcpy(pos,key,(size_t) length);
my_ci_fill(keyseg->charset, (char*) pos + length,
keyseg->length - length,
' ');
}
else
{
bfill(pos,keyseg->length-length,' ');
memcpy(pos+keyseg->length-length,key,(size_t) length);
}
key+=length;
continue;
}
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint length;
get_key_length(length,key);
#ifdef CHECK_KEYS
if (length > keyseg->length || key+length > key_end)
goto err;
#endif
/* Store key length */
if (keyseg->bit_start == 1)
*(uchar*) (record+keyseg->start)= (uchar) length;
else
int2store(record+keyseg->start, length);
/* And key data */
memcpy(record+keyseg->start + keyseg->bit_start, (uchar*) key, length);
key+= length;
}
else if (keyseg->flag & HA_BLOB_PART)
{
uint length;
get_key_length(length,key);
#ifdef CHECK_KEYS
if (length > keyseg->length || key+length > key_end)
goto err;
#endif
if (unpack_blobs)
{
memcpy(record+keyseg->start+keyseg->bit_start,
&blob_ptr, sizeof(char *));
memcpy(blob_ptr,key,length);
blob_ptr+=length;
/* The above changed info->lastkey2. Inform mi_rnext_same(). */
info->update&= ~HA_STATE_RNEXT_SAME;
_mi_store_blob_length(record+keyseg->start,
(uint) keyseg->bit_start,length);
}
key+=length;
}
else if (keyseg->flag & HA_SWAP_KEY)
{
uchar *to= record+keyseg->start+keyseg->length;
uchar *end= key+keyseg->length;
#ifdef CHECK_KEYS
if (end > key_end)
goto err;
#endif
do
{
*--to= *key++;
} while (key != end);
continue;
}
else
{
#ifdef CHECK_KEYS
if (key+keyseg->length > key_end)
goto err;
#endif
memcpy(record+keyseg->start,(uchar*) key,
(size_t) keyseg->length);
key+= keyseg->length;
}
}
DBUG_RETURN(0);
err:
DBUG_RETURN(1); /* Crashed row */
} | O3 | c | mi_put_key_in_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r12
movl %edx, -0x44(%rbp)
movq (%rdi), %rax
movq 0x218(%rax), %rax
movl %esi, %ecx
imulq $0x70, %rcx, %rcx
movq 0x28(%rax,%rcx), %r15
movb 0x18(%r15), %cl
testb %cl, %cl
je 0x96a26
movq 0x108(%rdi), %r13
movl 0x1d8(%rdi), %eax
addq %r13, %rax
movq %rax, -0x40(%rbp)
leaq 0x18(%r15), %rax
movq %rdi, -0x60(%rbp)
movq 0x110(%rdi), %rdx
movq %rdx, -0x50(%rbp)
leaq -0x1(%r12), %rdx
movq %rdx, -0x58(%rbp)
movq %r12, -0x30(%rbp)
movb 0x19(%r15), %dl
testb %dl, %dl
je 0x966d8
leaq 0x1(%r13), %rbx
cmpb $0x0, (%r13)
je 0x967aa
notb %dl
movl 0xc(%r15), %ecx
andb %dl, (%r12,%rcx)
movb (%rax), %cl
movq %rbx, %r13
cmpb $0x13, %cl
jne 0x9675a
movzwl 0x14(%r15), %esi
movzbl 0x1b(%r15), %eax
testl %eax, %eax
je 0x967cb
movzbl (%r13), %edi
movzwl 0x10(%r15), %r8d
movzbl 0x1a(%r15), %edx
movl $0xffffffff, %r9d # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r9d
notl %r9d
movl %edx, %ecx
shll %cl, %r9d
movzbl (%r12,%r8), %ecx
notl %r9d
andl %ecx, %r9d
movl %edi, %r10d
movl %edx, %ecx
shll %cl, %r10d
orl %r9d, %r10d
movb %r10b, (%r12,%r8)
addl %edx, %eax
cmpl $0x9, %eax
jb 0x96750
movzbl 0x1(%r12,%r8), %r9d
addb $-0x8, %al
movl %eax, %ecx
shrl %cl, %r9d
shll %cl, %r9d
movb $0x8, %cl
subb %dl, %cl
shrl %cl, %edi
orl %r9d, %edi
movb %dil, 0x1(%r12,%r8)
incq %r13
decl %esi
jmp 0x967e9
movzwl 0x12(%r15), %eax
testb $0x1, %al
jne 0x967b7
testb $0x8, %al
jne 0x96809
testb $0x20, %al
jne 0x968c7
movzwl 0x14(%r15), %edx
leaq (%rdx,%r13), %rcx
testb $0x40, %al
jne 0x96956
cmpq -0x40(%rbp), %rcx
ja 0x96a37
movl 0x8(%r15), %edi
addq %r12, %rdi
movq %r13, %rsi
callq 0x2a0b0
movzwl 0x14(%r15), %ebx
addq %r13, %rbx
jmp 0x96a09
movl 0xc(%r15), %eax
orb %dl, (%r12,%rax)
jmp 0x96a09
movzbl (%r13), %edi
cmpl $0xff, %edi
je 0x96824
movl $0x1, %esi
jmp 0x96835
movzbl 0x1a(%r15), %ecx
cmpl $0x9, %ecx
jb 0x967e9
addb $-0x8, %cl
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
shll %cl, %eax
movzwl 0x10(%r15), %ecx
andb %al, 0x1(%r12,%rcx)
movl 0x8(%r15), %edi
addq %r12, %rdi
movl %esi, %r14d
movq %r13, %rsi
movq %r14, %rdx
callq 0x2a0b0
addq %r14, %r13
movq %r13, %rbx
jmp 0x96a09
movzbl (%r13), %ecx
cmpl $0xff, %ecx
je 0x968e2
movl $0x1, %edx
jmp 0x968f3
movzwl 0x1(%r13), %eax
rolw $0x8, %ax
movzwl %ax, %edi
movl $0x3, %esi
movzwl 0x14(%r15), %edx
movl $0x1, %eax
subl %edi, %edx
jb 0x96a28
addq %rsi, %r13
movl %edi, %r14d
leaq (%r14,%r13), %rbx
cmpq -0x40(%rbp), %rbx
ja 0x96a28
movl 0x8(%r15), %r12d
addq -0x30(%rbp), %r12
cmpb $0x7, %cl
jne 0x9688d
movq %r12, %rdi
movl $0x20, %esi
callq 0x2a2e0
movzwl 0x14(%r15), %edi
addq %r12, %rdi
subq %r14, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x2a0b0
jmp 0x968be
movl %edi, -0x34(%rbp)
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x2a0b0
movq (%r15), %rdi
addq %r14, %r12
movzwl 0x14(%r15), %edx
subl -0x34(%rbp), %edx
movq 0xb8(%rdi), %rax
movq %r12, %rsi
movl $0x20, %ecx
callq *0x78(%rax)
movq -0x30(%rbp), %r12
jmp 0x96a09
movzbl (%r13), %esi
cmpl $0xff, %esi
je 0x9697c
movl $0x1, %ecx
jmp 0x9698d
movzwl 0x1(%r13), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
movl $0x3, %edx
movzwl 0x14(%r15), %esi
movl $0x1, %eax
cmpl %esi, %ecx
ja 0x96a28
addq %rdx, %r13
movl %ecx, %edx
leaq (%rdx,%r13), %rbx
cmpq -0x40(%rbp), %rbx
ja 0x96a28
cmpb $0x1, 0x1a(%r15)
jne 0x9692d
movl 0x8(%r15), %eax
movq -0x30(%rbp), %r12
movb %cl, (%r12,%rax)
jmp 0x9693a
movl 0x8(%r15), %eax
movq -0x30(%rbp), %r12
movw %cx, (%r12,%rax)
movl 0x8(%r15), %eax
addq %r12, %rax
movzbl 0x1a(%r15), %edi
addq %rax, %rdi
movq %r13, %rsi
callq 0x2a0b0
jmp 0x96a09
cmpq -0x40(%rbp), %rcx
ja 0x96a37
movl 0x8(%r15), %eax
addq -0x58(%rbp), %rax
movb (%r13), %cl
incq %r13
movb %cl, (%rax,%rdx)
decq %rdx
jne 0x96968
jmp 0x96801
movzwl 0x1(%r13), %eax
rolw $0x8, %ax
movzwl %ax, %esi
movl $0x3, %ecx
movzwl 0x14(%r15), %edx
movl $0x1, %eax
cmpl %edx, %esi
ja 0x96a28
addq %rcx, %r13
movl %esi, %r12d
leaq (%r12,%r13), %rbx
cmpq -0x40(%rbp), %rbx
ja 0x96a28
cmpb $0x0, -0x44(%rbp)
je 0x968be
movl 0x8(%r15), %eax
addq -0x30(%rbp), %rax
movzbl 0x1a(%r15), %ecx
movq -0x50(%rbp), %r14
movq %r14, (%rcx,%rax)
movq %r14, %rdi
movl %esi, -0x34(%rbp)
movq %r13, %rsi
movq %r12, %rdx
callq 0x2a0b0
movq -0x60(%rbp), %rax
andb $-0x11, 0x1d1(%rax)
addq %r12, %r14
movq %r14, -0x50(%rbp)
movq -0x30(%rbp), %r12
movl 0x8(%r15), %edi
addq %r12, %rdi
movzbl 0x1a(%r15), %esi
movl -0x34(%rbp), %edx
callq 0x93f57
leaq 0x20(%r15), %rdx
movb 0x38(%r15), %cl
addq $0x38, %r15
movq %r15, %rax
movq %rbx, %r13
movq %rdx, %r15
testb %cl, %cl
jne 0x966b2
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x96a28
| _mi_put_key_in_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12, rcx
mov [rbp+var_44], edx
mov rax, [rdi]
mov rax, [rax+218h]
mov ecx, esi
imul rcx, 70h ; 'p'
mov r15, [rax+rcx+28h]
mov cl, [r15+18h]
test cl, cl
jz loc_96A26
mov r13, [rdi+108h]
mov eax, [rdi+1D8h]
add rax, r13
mov [rbp+var_40], rax
lea rax, [r15+18h]
mov [rbp+var_60], rdi
mov rdx, [rdi+110h]
mov [rbp+var_50], rdx
lea rdx, [r12-1]
mov [rbp+var_58], rdx
mov [rbp+var_30], r12
loc_966B2:
mov dl, [r15+19h]
test dl, dl
jz short loc_966D8
lea rbx, [r13+1]
cmp byte ptr [r13+0], 0
jz loc_967AA
not dl
mov ecx, [r15+0Ch]
and [r12+rcx], dl
mov cl, [rax]
mov r13, rbx
loc_966D8:
cmp cl, 13h
jnz short loc_9675A
movzx esi, word ptr [r15+14h]
movzx eax, byte ptr [r15+1Bh]
test eax, eax
jz loc_967CB
movzx edi, byte ptr [r13+0]
movzx r8d, word ptr [r15+10h]
movzx edx, byte ptr [r15+1Ah]
mov r9d, 0FFFFFFFFh
mov ecx, eax
shl r9d, cl
not r9d
mov ecx, edx
shl r9d, cl
movzx ecx, byte ptr [r12+r8]
not r9d
and r9d, ecx
mov r10d, edi
mov ecx, edx
shl r10d, cl
or r10d, r9d
mov [r12+r8], r10b
add eax, edx
cmp eax, 9
jb short loc_96750
movzx r9d, byte ptr [r12+r8+1]
add al, 0F8h
mov ecx, eax
shr r9d, cl
shl r9d, cl
mov cl, 8
sub cl, dl
shr edi, cl
or edi, r9d
mov [r12+r8+1], dil
loc_96750:
inc r13
dec esi
jmp loc_967E9
loc_9675A:
movzx eax, word ptr [r15+12h]
test al, 1
jnz short loc_967B7
test al, 8
jnz loc_96809
test al, 20h
jnz loc_968C7
movzx edx, word ptr [r15+14h]
lea rcx, [rdx+r13]
test al, 40h
jnz loc_96956
cmp rcx, [rbp+var_40]
ja loc_96A37
mov edi, [r15+8]
add rdi, r12
mov rsi, r13
call _memcpy
movzx ebx, word ptr [r15+14h]
add rbx, r13
jmp loc_96A09
loc_967AA:
mov eax, [r15+0Ch]
or [r12+rax], dl
jmp loc_96A09
loc_967B7:
movzx edi, byte ptr [r13+0]
cmp edi, 0FFh
jz short loc_96824
mov esi, 1
jmp short loc_96835
loc_967CB:
movzx ecx, byte ptr [r15+1Ah]
cmp ecx, 9
jb short loc_967E9
add cl, 0F8h
mov eax, 0FFFFFFFFh
shl eax, cl
movzx ecx, word ptr [r15+10h]
and [r12+rcx+1], al
loc_967E9:
mov edi, [r15+8]
add rdi, r12
mov r14d, esi
mov rsi, r13
mov rdx, r14
call _memcpy
add r13, r14
loc_96801:
mov rbx, r13
jmp loc_96A09
loc_96809:
movzx ecx, byte ptr [r13+0]
cmp ecx, 0FFh
jz loc_968E2
mov edx, 1
jmp loc_968F3
loc_96824:
movzx eax, word ptr [r13+1]
rol ax, 8
movzx edi, ax
mov esi, 3
loc_96835:
movzx edx, word ptr [r15+14h]
mov eax, 1
sub edx, edi
jb loc_96A28
add r13, rsi
mov r14d, edi
lea rbx, [r14+r13]
cmp rbx, [rbp+var_40]
ja loc_96A28
mov r12d, [r15+8]
add r12, [rbp+var_30]
cmp cl, 7
jnz short loc_9688D
mov rdi, r12
mov esi, 20h ; ' '
call _memset
movzx edi, word ptr [r15+14h]
add rdi, r12
sub rdi, r14
mov rsi, r13
mov rdx, r14
call _memcpy
jmp short loc_968BE
loc_9688D:
mov [rbp+var_34], edi
mov rdi, r12
mov rsi, r13
mov rdx, r14
call _memcpy
mov rdi, [r15]
add r12, r14
movzx edx, word ptr [r15+14h]
sub edx, [rbp+var_34]
mov rax, [rdi+0B8h]
mov rsi, r12
mov ecx, 20h ; ' '
call qword ptr [rax+78h]
loc_968BE:
mov r12, [rbp+var_30]
jmp loc_96A09
loc_968C7:
movzx esi, byte ptr [r13+0]
cmp esi, 0FFh
jz loc_9697C
mov ecx, 1
jmp loc_9698D
loc_968E2:
movzx eax, word ptr [r13+1]
rol ax, 8
movzx ecx, ax
mov edx, 3
loc_968F3:
movzx esi, word ptr [r15+14h]
mov eax, 1
cmp ecx, esi
ja loc_96A28
add r13, rdx
mov edx, ecx
lea rbx, [rdx+r13]
cmp rbx, [rbp+var_40]
ja loc_96A28
cmp byte ptr [r15+1Ah], 1
jnz short loc_9692D
mov eax, [r15+8]
mov r12, [rbp+var_30]
mov [r12+rax], cl
jmp short loc_9693A
loc_9692D:
mov eax, [r15+8]
mov r12, [rbp+var_30]
mov [r12+rax], cx
loc_9693A:
mov eax, [r15+8]
add rax, r12
movzx edi, byte ptr [r15+1Ah]
add rdi, rax
mov rsi, r13
call _memcpy
jmp loc_96A09
loc_96956:
cmp rcx, [rbp+var_40]
ja loc_96A37
mov eax, [r15+8]
add rax, [rbp+var_58]
loc_96968:
mov cl, [r13+0]
inc r13
mov [rax+rdx], cl
dec rdx
jnz short loc_96968
jmp loc_96801
loc_9697C:
movzx eax, word ptr [r13+1]
rol ax, 8
movzx esi, ax
mov ecx, 3
loc_9698D:
movzx edx, word ptr [r15+14h]
mov eax, 1
cmp esi, edx
ja loc_96A28
add r13, rcx
mov r12d, esi
lea rbx, [r12+r13]
cmp rbx, [rbp+var_40]
ja short loc_96A28
cmp byte ptr [rbp+var_44], 0
jz loc_968BE
mov eax, [r15+8]
add rax, [rbp+var_30]
movzx ecx, byte ptr [r15+1Ah]
mov r14, [rbp+var_50]
mov [rcx+rax], r14
mov rdi, r14
mov [rbp+var_34], esi
mov rsi, r13
mov rdx, r12
call _memcpy
mov rax, [rbp+var_60]
and byte ptr [rax+1D1h], 0EFh
add r14, r12
mov [rbp+var_50], r14
mov r12, [rbp+var_30]
mov edi, [r15+8]
add rdi, r12
movzx esi, byte ptr [r15+1Ah]
mov edx, [rbp+var_34]
call _mi_store_blob_length
loc_96A09:
lea rdx, [r15+20h]
mov cl, [r15+38h]
add r15, 38h ; '8'
mov rax, r15
mov r13, rbx
mov r15, rdx
test cl, cl
jnz loc_966B2
loc_96A26:
xor eax, eax
loc_96A28:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_96A37:
mov eax, 1
jmp short loc_96A28
| long long mi_put_key_in_record(long long a1, unsigned int a2, char a3, long long a4)
{
_QWORD *v5; // r15
char v6; // cl
unsigned __int8 *v7; // r13
char *v8; // rax
char v9; // dl
unsigned __int8 *v10; // rbx
unsigned int v11; // esi
int v12; // eax
unsigned int v13; // edi
long long v14; // r8
int v15; // edx
unsigned int v16; // eax
__int16 v17; // ax
long long v18; // rdx
unsigned __int8 *v19; // rcx
unsigned int v20; // edi
long long v21; // rsi
unsigned int v22; // ecx
unsigned int v23; // ecx
long long v24; // rdx
unsigned int v25; // edx
long long result; // rax
bool v27; // cf
long long v28; // rdx
unsigned __int8 *v29; // r13
long long v30; // r12
unsigned int v31; // esi
long long v32; // rcx
unsigned __int8 *v33; // r13
long long v34; // rax
char v35; // cl
unsigned __int8 *v36; // r13
long long v38; // [rsp+8h] [rbp-58h]
long long v39; // [rsp+10h] [rbp-50h]
unsigned __int8 *v41; // [rsp+20h] [rbp-40h]
long long v42; // [rsp+30h] [rbp-30h]
v5 = *(_QWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112LL * a2 + 40);
v6 = *((_BYTE *)v5 + 24);
if ( v6 )
{
v7 = *(unsigned __int8 **)(a1 + 264);
v41 = &v7[*(unsigned int *)(a1 + 472)];
v8 = (char *)(v5 + 3);
v39 = *(_QWORD *)(a1 + 272);
v38 = a4 - 1;
v42 = a4;
do
{
v9 = *((_BYTE *)v5 + 25);
if ( v9 )
{
v10 = v7 + 1;
if ( !*v7 )
{
*(_BYTE *)(a4 + *((unsigned int *)v5 + 3)) |= v9;
goto LABEL_51;
}
*(_BYTE *)(a4 + *((unsigned int *)v5 + 3)) &= ~v9;
v6 = *v8;
++v7;
}
if ( v6 == 19 )
{
v11 = *((unsigned __int16 *)v5 + 10);
v12 = *((unsigned __int8 *)v5 + 27);
if ( *((_BYTE *)v5 + 27) )
{
v13 = *v7;
v14 = *((unsigned __int16 *)v5 + 8);
v15 = *((unsigned __int8 *)v5 + 26);
*(_BYTE *)(a4 + v14) = *(_BYTE *)(a4 + v14) & ~(~(-1 << v12) << *((_BYTE *)v5 + 26)) | (*v7 << *((_BYTE *)v5 + 26));
v16 = v15 + v12;
if ( v16 >= 9 )
*(_BYTE *)(a4 + v14 + 1) = (*(unsigned __int8 *)(a4 + v14 + 1) >> (v16 - 8) << (v16 - 8)) | (v13 >> (8 - v15));
++v7;
--v11;
}
else
{
v22 = *((unsigned __int8 *)v5 + 26);
if ( v22 >= 9 )
*(_BYTE *)(a4 + *((unsigned __int16 *)v5 + 8) + 1) &= -1 << (v22 - 8);
}
memcpy(a4 + *((unsigned int *)v5 + 2), v7, v11);
v7 += v11;
LABEL_23:
v10 = v7;
goto LABEL_51;
}
v17 = *((_WORD *)v5 + 9);
if ( (v17 & 1) != 0 )
{
v20 = *v7;
if ( v20 == 255 )
{
v20 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8);
v21 = 3LL;
}
else
{
v21 = 1LL;
}
v25 = *((unsigned __int16 *)v5 + 10);
result = 1LL;
v27 = v25 < v20;
v28 = v25 - v20;
if ( v27 )
return result;
v29 = &v7[v21];
v10 = &v29[v20];
if ( v10 > v41 )
return result;
v30 = v42 + *((unsigned int *)v5 + 2);
if ( v6 == 7 )
{
memset(v42 + *((unsigned int *)v5 + 2), 32LL, v28);
memcpy(v30 + *((unsigned __int16 *)v5 + 10) - v20, v29, v20);
}
else
{
memcpy(v30, v29, v20);
(*(void ( **)(_QWORD, long long, _QWORD, long long))(*(_QWORD *)(*v5 + 184LL) + 120LL))(
*v5,
v20 + v30,
*((unsigned __int16 *)v5 + 10) - v20,
32LL);
}
LABEL_32:
a4 = v42;
goto LABEL_51;
}
if ( (v17 & 8) != 0 )
{
v23 = *v7;
if ( v23 == 255 )
{
v23 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8);
v24 = 3LL;
}
else
{
v24 = 1LL;
}
result = 1LL;
if ( v23 > *((unsigned __int16 *)v5 + 10) )
return result;
v33 = &v7[v24];
v10 = &v33[v23];
if ( v10 > v41 )
return result;
a4 = v42;
if ( *((_BYTE *)v5 + 26) == 1 )
*(_BYTE *)(v42 + *((unsigned int *)v5 + 2)) = v23;
else
*(_WORD *)(v42 + *((unsigned int *)v5 + 2)) = v23;
memcpy(v42 + *((unsigned int *)v5 + 2) + *((unsigned __int8 *)v5 + 26), v33, v23);
}
else
{
if ( (v17 & 0x20) != 0 )
{
v31 = *v7;
if ( v31 == 255 )
{
v31 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8);
v32 = 3LL;
}
else
{
v32 = 1LL;
}
result = 1LL;
if ( v31 > *((unsigned __int16 *)v5 + 10) )
return result;
v36 = &v7[v32];
v10 = &v36[v31];
if ( v10 > v41 )
return result;
if ( a3 )
{
*(_QWORD *)(*((unsigned __int8 *)v5 + 26) + v42 + *((unsigned int *)v5 + 2)) = v39;
memcpy(v39, v36, v31);
*(_BYTE *)(a1 + 465) &= ~0x10u;
v39 += v31;
a4 = v42;
mi_store_blob_length((_BYTE *)(v42 + *((unsigned int *)v5 + 2)), *((unsigned __int8 *)v5 + 26), v31);
goto LABEL_51;
}
goto LABEL_32;
}
v18 = *((unsigned __int16 *)v5 + 10);
v19 = &v7[v18];
if ( (v17 & 0x40) != 0 )
{
if ( v19 > v41 )
return 1LL;
v34 = v38 + *((unsigned int *)v5 + 2);
do
{
v35 = *v7++;
*(_BYTE *)(v34 + v18--) = v35;
}
while ( v18 );
goto LABEL_23;
}
if ( v19 > v41 )
return 1LL;
memcpy(a4 + *((unsigned int *)v5 + 2), v7, v18);
v10 = &v7[*((unsigned __int16 *)v5 + 10)];
}
LABEL_51:
v6 = *((_BYTE *)v5 + 56);
v8 = (char *)(v5 + 7);
v7 = v10;
v5 += 4;
}
while ( v6 );
}
return 0LL;
}
| _mi_put_key_in_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12,RCX
MOV dword ptr [RBP + -0x44],EDX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x218]
MOV ECX,ESI
IMUL RCX,RCX,0x70
MOV R15,qword ptr [RAX + RCX*0x1 + 0x28]
MOV CL,byte ptr [R15 + 0x18]
TEST CL,CL
JZ 0x00196a26
MOV R13,qword ptr [RDI + 0x108]
MOV EAX,dword ptr [RDI + 0x1d8]
ADD RAX,R13
MOV qword ptr [RBP + -0x40],RAX
LEA RAX,[R15 + 0x18]
MOV qword ptr [RBP + -0x60],RDI
MOV RDX,qword ptr [RDI + 0x110]
MOV qword ptr [RBP + -0x50],RDX
LEA RDX,[R12 + -0x1]
MOV qword ptr [RBP + -0x58],RDX
MOV qword ptr [RBP + -0x30],R12
LAB_001966b2:
MOV DL,byte ptr [R15 + 0x19]
TEST DL,DL
JZ 0x001966d8
LEA RBX,[R13 + 0x1]
CMP byte ptr [R13],0x0
JZ 0x001967aa
NOT DL
MOV ECX,dword ptr [R15 + 0xc]
AND byte ptr [R12 + RCX*0x1],DL
MOV CL,byte ptr [RAX]
MOV R13,RBX
LAB_001966d8:
CMP CL,0x13
JNZ 0x0019675a
MOVZX ESI,word ptr [R15 + 0x14]
MOVZX EAX,byte ptr [R15 + 0x1b]
TEST EAX,EAX
JZ 0x001967cb
MOVZX EDI,byte ptr [R13]
MOVZX R8D,word ptr [R15 + 0x10]
MOVZX EDX,byte ptr [R15 + 0x1a]
MOV R9D,0xffffffff
MOV ECX,EAX
SHL R9D,CL
NOT R9D
MOV ECX,EDX
SHL R9D,CL
MOVZX ECX,byte ptr [R12 + R8*0x1]
NOT R9D
AND R9D,ECX
MOV R10D,EDI
MOV ECX,EDX
SHL R10D,CL
OR R10D,R9D
MOV byte ptr [R12 + R8*0x1],R10B
ADD EAX,EDX
CMP EAX,0x9
JC 0x00196750
MOVZX R9D,byte ptr [R12 + R8*0x1 + 0x1]
ADD AL,0xf8
MOV ECX,EAX
SHR R9D,CL
SHL R9D,CL
MOV CL,0x8
SUB CL,DL
SHR EDI,CL
OR EDI,R9D
MOV byte ptr [R12 + R8*0x1 + 0x1],DIL
LAB_00196750:
INC R13
DEC ESI
JMP 0x001967e9
LAB_0019675a:
MOVZX EAX,word ptr [R15 + 0x12]
TEST AL,0x1
JNZ 0x001967b7
TEST AL,0x8
JNZ 0x00196809
TEST AL,0x20
JNZ 0x001968c7
MOVZX EDX,word ptr [R15 + 0x14]
LEA RCX,[RDX + R13*0x1]
TEST AL,0x40
JNZ 0x00196956
CMP RCX,qword ptr [RBP + -0x40]
JA 0x00196a37
MOV EDI,dword ptr [R15 + 0x8]
ADD RDI,R12
MOV RSI,R13
CALL 0x0012a0b0
MOVZX EBX,word ptr [R15 + 0x14]
ADD RBX,R13
JMP 0x00196a09
LAB_001967aa:
MOV EAX,dword ptr [R15 + 0xc]
OR byte ptr [R12 + RAX*0x1],DL
JMP 0x00196a09
LAB_001967b7:
MOVZX EDI,byte ptr [R13]
CMP EDI,0xff
JZ 0x00196824
MOV ESI,0x1
JMP 0x00196835
LAB_001967cb:
MOVZX ECX,byte ptr [R15 + 0x1a]
CMP ECX,0x9
JC 0x001967e9
ADD CL,0xf8
MOV EAX,0xffffffff
SHL EAX,CL
MOVZX ECX,word ptr [R15 + 0x10]
AND byte ptr [R12 + RCX*0x1 + 0x1],AL
LAB_001967e9:
MOV EDI,dword ptr [R15 + 0x8]
ADD RDI,R12
MOV R14D,ESI
MOV RSI,R13
MOV RDX,R14
CALL 0x0012a0b0
ADD R13,R14
LAB_00196801:
MOV RBX,R13
JMP 0x00196a09
LAB_00196809:
MOVZX ECX,byte ptr [R13]
CMP ECX,0xff
JZ 0x001968e2
MOV EDX,0x1
JMP 0x001968f3
LAB_00196824:
MOVZX EAX,word ptr [R13 + 0x1]
ROL AX,0x8
MOVZX EDI,AX
MOV ESI,0x3
LAB_00196835:
MOVZX EDX,word ptr [R15 + 0x14]
MOV EAX,0x1
SUB EDX,EDI
JC 0x00196a28
ADD R13,RSI
MOV R14D,EDI
LEA RBX,[R14 + R13*0x1]
CMP RBX,qword ptr [RBP + -0x40]
JA 0x00196a28
MOV R12D,dword ptr [R15 + 0x8]
ADD R12,qword ptr [RBP + -0x30]
CMP CL,0x7
JNZ 0x0019688d
MOV RDI,R12
MOV ESI,0x20
CALL 0x0012a2e0
MOVZX EDI,word ptr [R15 + 0x14]
ADD RDI,R12
SUB RDI,R14
MOV RSI,R13
MOV RDX,R14
CALL 0x0012a0b0
JMP 0x001968be
LAB_0019688d:
MOV dword ptr [RBP + -0x34],EDI
MOV RDI,R12
MOV RSI,R13
MOV RDX,R14
CALL 0x0012a0b0
MOV RDI,qword ptr [R15]
ADD R12,R14
MOVZX EDX,word ptr [R15 + 0x14]
SUB EDX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R12
MOV ECX,0x20
CALL qword ptr [RAX + 0x78]
LAB_001968be:
MOV R12,qword ptr [RBP + -0x30]
JMP 0x00196a09
LAB_001968c7:
MOVZX ESI,byte ptr [R13]
CMP ESI,0xff
JZ 0x0019697c
MOV ECX,0x1
JMP 0x0019698d
LAB_001968e2:
MOVZX EAX,word ptr [R13 + 0x1]
ROL AX,0x8
MOVZX ECX,AX
MOV EDX,0x3
LAB_001968f3:
MOVZX ESI,word ptr [R15 + 0x14]
MOV EAX,0x1
CMP ECX,ESI
JA 0x00196a28
ADD R13,RDX
MOV EDX,ECX
LEA RBX,[RDX + R13*0x1]
CMP RBX,qword ptr [RBP + -0x40]
JA 0x00196a28
CMP byte ptr [R15 + 0x1a],0x1
JNZ 0x0019692d
MOV EAX,dword ptr [R15 + 0x8]
MOV R12,qword ptr [RBP + -0x30]
MOV byte ptr [R12 + RAX*0x1],CL
JMP 0x0019693a
LAB_0019692d:
MOV EAX,dword ptr [R15 + 0x8]
MOV R12,qword ptr [RBP + -0x30]
MOV word ptr [R12 + RAX*0x1],CX
LAB_0019693a:
MOV EAX,dword ptr [R15 + 0x8]
ADD RAX,R12
MOVZX EDI,byte ptr [R15 + 0x1a]
ADD RDI,RAX
MOV RSI,R13
CALL 0x0012a0b0
JMP 0x00196a09
LAB_00196956:
CMP RCX,qword ptr [RBP + -0x40]
JA 0x00196a37
MOV EAX,dword ptr [R15 + 0x8]
ADD RAX,qword ptr [RBP + -0x58]
LAB_00196968:
MOV CL,byte ptr [R13]
INC R13
MOV byte ptr [RAX + RDX*0x1],CL
DEC RDX
JNZ 0x00196968
JMP 0x00196801
LAB_0019697c:
MOVZX EAX,word ptr [R13 + 0x1]
ROL AX,0x8
MOVZX ESI,AX
MOV ECX,0x3
LAB_0019698d:
MOVZX EDX,word ptr [R15 + 0x14]
MOV EAX,0x1
CMP ESI,EDX
JA 0x00196a28
ADD R13,RCX
MOV R12D,ESI
LEA RBX,[R12 + R13*0x1]
CMP RBX,qword ptr [RBP + -0x40]
JA 0x00196a28
CMP byte ptr [RBP + -0x44],0x0
JZ 0x001968be
MOV EAX,dword ptr [R15 + 0x8]
ADD RAX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [R15 + 0x1a]
MOV R14,qword ptr [RBP + -0x50]
MOV qword ptr [RCX + RAX*0x1],R14
MOV RDI,R14
MOV dword ptr [RBP + -0x34],ESI
MOV RSI,R13
MOV RDX,R12
CALL 0x0012a0b0
MOV RAX,qword ptr [RBP + -0x60]
AND byte ptr [RAX + 0x1d1],0xef
ADD R14,R12
MOV qword ptr [RBP + -0x50],R14
MOV R12,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [R15 + 0x8]
ADD RDI,R12
MOVZX ESI,byte ptr [R15 + 0x1a]
MOV EDX,dword ptr [RBP + -0x34]
CALL 0x00193f57
LAB_00196a09:
LEA RDX,[R15 + 0x20]
MOV CL,byte ptr [R15 + 0x38]
ADD R15,0x38
MOV RAX,R15
MOV R13,RBX
MOV R15,RDX
TEST CL,CL
JNZ 0x001966b2
LAB_00196a26:
XOR EAX,EAX
LAB_00196a28:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00196a37:
MOV EAX,0x1
JMP 0x00196a28
|
int8 _mi_put_key_in_record(long *param_1,ulong param_2,char param_3,long param_4)
{
byte bVar1;
byte bVar2;
ushort uVar3;
byte bVar4;
byte *pbVar5;
long *plVar6;
char cVar7;
long lVar8;
ulong uVar9;
uint uVar10;
void *__dest;
byte *__src;
byte *pbVar11;
long *plVar12;
void *local_58;
plVar12 = *(long **)(*(long *)(*param_1 + 0x218) + 0x28 + (param_2 & 0xffffffff) * 0x70);
cVar7 = (char)plVar12[3];
if (cVar7 != '\0') {
pbVar5 = (byte *)param_1[0x21] + *(uint *)(param_1 + 0x3b);
plVar6 = plVar12 + 3;
local_58 = (void *)param_1[0x22];
pbVar11 = (byte *)param_1[0x21];
do {
bVar4 = *(byte *)((long)plVar12 + 0x19);
__src = pbVar11;
if (bVar4 == 0) {
LAB_001966d8:
if (cVar7 == '\x13') {
uVar3 = *(ushort *)((long)plVar12 + 0x14);
uVar10 = (uint)uVar3;
bVar4 = *(byte *)((long)plVar12 + 0x1b);
if (bVar4 == 0) {
if (8 < *(byte *)((long)plVar12 + 0x1a)) {
pbVar11 = (byte *)(param_4 + 1 + (ulong)*(ushort *)(plVar12 + 2));
*pbVar11 = *pbVar11 & (byte)(-1 << (*(byte *)((long)plVar12 + 0x1a) - 8 & 0x1f));
}
}
else {
bVar1 = *__src;
uVar9 = (ulong)*(ushort *)(plVar12 + 2);
bVar2 = *(byte *)((long)plVar12 + 0x1a);
*(byte *)(param_4 + uVar9) =
bVar1 << (bVar2 & 0x1f) |
~(byte)(~(-1 << (bVar4 & 0x1f)) << (bVar2 & 0x1f)) & *(byte *)(param_4 + uVar9);
if (8 < (uint)bVar4 + (uint)bVar2) {
bVar4 = (char)((uint)bVar4 + (uint)bVar2) - 8;
*(byte *)(param_4 + 1 + uVar9) =
bVar1 >> (8 - bVar2 & 0x1f) |
(*(byte *)(param_4 + 1 + uVar9) >> (bVar4 & 0x1f)) << (bVar4 & 0x1f);
}
__src = __src + 1;
uVar10 = uVar3 - 1;
}
memcpy((void *)((ulong)*(uint *)(plVar12 + 1) + param_4),__src,(ulong)uVar10);
__src = __src + uVar10;
}
else {
uVar3 = *(ushort *)((long)plVar12 + 0x12);
if ((uVar3 & 1) == 0) {
if ((uVar3 & 8) == 0) {
if ((uVar3 & 0x20) == 0) {
uVar9 = (ulong)*(ushort *)((long)plVar12 + 0x14);
if ((uVar3 & 0x40) == 0) {
if (pbVar5 < __src + uVar9) {
return 1;
}
memcpy((void *)((ulong)*(uint *)(plVar12 + 1) + param_4),__src,uVar9);
__src = __src + *(ushort *)((long)plVar12 + 0x14);
}
else {
if (pbVar5 < __src + uVar9) {
return 1;
}
uVar10 = *(uint *)(plVar12 + 1);
do {
bVar4 = *__src;
__src = __src + 1;
*(byte *)((ulong)uVar10 + param_4 + -1 + uVar9) = bVar4;
uVar9 = uVar9 - 1;
} while (uVar9 != 0);
}
}
else {
uVar10 = (uint)*__src;
if (*__src == 0xff) {
uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8)
;
lVar8 = 3;
}
else {
lVar8 = 1;
}
if (*(ushort *)((long)plVar12 + 0x14) < uVar10) {
return 1;
}
pbVar11 = __src + lVar8;
uVar9 = (ulong)uVar10;
__src = pbVar11 + uVar9;
if (pbVar5 < __src) {
return 1;
}
if (param_3 != '\0') {
*(void **)((ulong)*(byte *)((long)plVar12 + 0x1a) +
(ulong)*(uint *)(plVar12 + 1) + param_4) = local_58;
memcpy(local_58,pbVar11,uVar9);
*(byte *)((long)param_1 + 0x1d1) = *(byte *)((long)param_1 + 0x1d1) & 0xef;
local_58 = (void *)((long)local_58 + uVar9);
_mi_store_blob_length
((ulong)*(uint *)(plVar12 + 1) + param_4,
*(int1 *)((long)plVar12 + 0x1a),uVar10);
}
}
}
else {
uVar10 = (uint)*__src;
if (*__src == 0xff) {
uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8);
lVar8 = 3;
}
else {
lVar8 = 1;
}
if (*(ushort *)((long)plVar12 + 0x14) < uVar10) {
return 1;
}
pbVar11 = __src + lVar8;
__src = pbVar11 + uVar10;
if (pbVar5 < __src) {
return 1;
}
if (*(char *)((long)plVar12 + 0x1a) == '\x01') {
*(char *)(param_4 + (ulong)*(uint *)(plVar12 + 1)) = (char)uVar10;
}
else {
*(short *)(param_4 + (ulong)*(uint *)(plVar12 + 1)) = (short)uVar10;
}
memcpy((void *)((ulong)*(byte *)((long)plVar12 + 0x1a) +
(ulong)*(uint *)(plVar12 + 1) + param_4),pbVar11,(ulong)uVar10);
}
}
else {
uVar10 = (uint)*__src;
if (*__src == 0xff) {
uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8);
lVar8 = 3;
}
else {
lVar8 = 1;
}
if (*(ushort *)((long)plVar12 + 0x14) < uVar10) {
return 1;
}
pbVar11 = __src + lVar8;
uVar9 = (ulong)uVar10;
__src = pbVar11 + uVar9;
if (pbVar5 < __src) {
return 1;
}
__dest = (void *)((ulong)*(uint *)(plVar12 + 1) + param_4);
if (cVar7 == '\a') {
memset(__dest,0x20,(ulong)(*(ushort *)((long)plVar12 + 0x14) - uVar10));
memcpy((void *)((long)__dest + (*(ushort *)((long)plVar12 + 0x14) - uVar9)),pbVar11,
uVar9);
}
else {
memcpy(__dest,pbVar11,uVar9);
(**(code **)(*(long *)(*plVar12 + 0xb8) + 0x78))
(*plVar12,(long)__dest + uVar9,*(ushort *)((long)plVar12 + 0x14) - uVar10,
0x20);
}
}
}
}
else {
__src = pbVar11 + 1;
if (*pbVar11 != 0) {
pbVar11 = (byte *)(param_4 + (ulong)*(uint *)((long)plVar12 + 0xc));
*pbVar11 = *pbVar11 & ~bVar4;
cVar7 = (char)*plVar6;
goto LAB_001966d8;
}
pbVar11 = (byte *)(param_4 + (ulong)*(uint *)((long)plVar12 + 0xc));
*pbVar11 = *pbVar11 | bVar4;
}
cVar7 = (char)plVar12[7];
plVar6 = plVar12 + 7;
pbVar11 = __src;
plVar12 = plVar12 + 4;
} while (cVar7 != '\0');
}
return 0;
}
| |
35,971 | dequantize_row_iq3_xxs | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | void dequantize_row_iq3_xxs(const block_iq3_xxs * restrict x, float * restrict y, int64_t k) {
assert(k % QK_K == 0);
const int64_t nb = k / QK_K;
uint32_t aux32;
for (int i = 0; i < nb; i++) {
const float d = GGML_FP16_TO_FP32(x[i].d);
const uint8_t * qs = x[i].qs;
const uint8_t * scales_and_signs = qs + QK_K/4;
for (int ib32 = 0; ib32 < QK_K/32; ++ib32) {
memcpy(&aux32, scales_and_signs + 4*ib32, sizeof(uint32_t));
const float db = d * (0.5f + (aux32 >> 28)) * 0.5f;
for (int l = 0; l < 4; ++l) {
const uint8_t signs = ksigns_iq2xs[(aux32 >> 7*l) & 127];
const uint8_t * grid1 = (const uint8_t *)(iq3xxs_grid + qs[2*l+0]);
const uint8_t * grid2 = (const uint8_t *)(iq3xxs_grid + qs[2*l+1]);
for (int j = 0; j < 4; ++j) {
y[j+0] = db * grid1[j] * (signs & kmask_iq2xs[j+0] ? -1.f : 1.f);
y[j+4] = db * grid2[j] * (signs & kmask_iq2xs[j+4] ? -1.f : 1.f);
}
y += 8;
}
qs += 8;
}
}
} | O0 | c | dequantize_row_iq3_xxs:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x100, %ecx # imm = 0x100
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0x78e1d
jmp 0x78e3c
leaq 0x48320(%rip), %rdi # 0xc1144
leaq 0x47f31(%rip), %rsi # 0xc0d5c
movl $0x8ed, %edx # imm = 0x8ED
leaq 0x4887c(%rip), %rcx # 0xc16b3
callq 0x44810
movq -0x18(%rbp), %rax
movl $0x100, %ecx # imm = 0x100
cqto
idivq %rcx
movq %rax, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movslq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x790d9
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x62, %rcx, %rcx
addq %rcx, %rax
movzwl (%rax), %edi
callq 0x6e6e0
movss %xmm0, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x62, %rcx, %rcx
addq %rcx, %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
cmpl $0x8, -0x44(%rbp)
jge 0x790c9
movq -0x40(%rbp), %rax
movl -0x44(%rbp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx), %eax
movl %eax, -0x24(%rbp)
movss -0x2c(%rbp), %xmm0
movl -0x24(%rbp), %eax
shrl $0x1c, %eax
cvtsi2ss %eax, %xmm2
movss 0x38543(%rip), %xmm1 # 0xb1420
addss %xmm2, %xmm1
mulss %xmm1, %xmm0
movss 0x38533(%rip), %xmm1 # 0xb1420
mulss %xmm1, %xmm0
movss %xmm0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
cmpl $0x4, -0x4c(%rbp)
jge 0x790af
movl -0x24(%rbp), %eax
imull $0x7, -0x4c(%rbp), %ecx
shrl %cl, %eax
andl $0x7f, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x3dd62(%rip), %rax # 0xb6c80
movb (%rax,%rcx), %al
movb %al, -0x4d(%rbp)
movq -0x38(%rbp), %rax
movl -0x4c(%rbp), %ecx
shll %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movslq %eax, %rcx
leaq 0x40dcf(%rip), %rax # 0xb9d10
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movl -0x4c(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movslq %eax, %rcx
leaq 0x40da7(%rip), %rax # 0xb9d10
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
cmpl $0x4, -0x64(%rbp)
jge 0x79095
movss -0x48(%rbp), %xmm0
movq -0x58(%rbp), %rax
movslq -0x64(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x70(%rbp)
movzbl -0x4d(%rbp), %eax
movl -0x64(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rdx
leaq 0x3dd49(%rip), %rcx # 0xb6d00
movzbl (%rcx,%rdx), %ecx
andl %ecx, %eax
movss 0x3d3af(%rip), %xmm0 # 0xb6374
movss 0x3845b(%rip), %xmm1 # 0xb1428
movss %xmm1, -0x6c(%rbp)
cmpl $0x0, %eax
movss %xmm0, -0x68(%rbp)
jne 0x78fe6
movss -0x6c(%rbp), %xmm0
movss %xmm0, -0x68(%rbp)
movss -0x70(%rbp), %xmm0
movss -0x68(%rbp), %xmm1
mulss %xmm1, %xmm0
movq -0x10(%rbp), %rax
movl -0x64(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss -0x48(%rbp), %xmm0
movq -0x60(%rbp), %rax
movslq -0x64(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x7c(%rbp)
movzbl -0x4d(%rbp), %eax
movl -0x64(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rdx
leaq 0x3dcc8(%rip), %rcx # 0xb6d00
movzbl (%rcx,%rdx), %ecx
andl %ecx, %eax
movss 0x3d32e(%rip), %xmm0 # 0xb6374
movss 0x383da(%rip), %xmm1 # 0xb1428
movss %xmm1, -0x78(%rbp)
cmpl $0x0, %eax
movss %xmm0, -0x74(%rbp)
jne 0x79067
movss -0x78(%rbp), %xmm0
movss %xmm0, -0x74(%rbp)
movss -0x7c(%rbp), %xmm0
movss -0x74(%rbp), %xmm1
mulss %xmm1, %xmm0
movq -0x10(%rbp), %rax
movl -0x64(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x78f7b
movq -0x10(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x10(%rbp)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x78efd
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x78ea9
jmp 0x790cb
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x78e55
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| dequantize_row_iq3_xxs:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_18]
mov ecx, 100h
cqo
idiv rcx
cmp rdx, 0
jnz short loc_78E1D
jmp short loc_78E3C
loc_78E1D:
lea rdi, aKQkK0; "k % QK_K == 0"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov edx, 8EDh
lea rcx, aVoidDequantize_14; "void dequantize_row_iq3_xxs(const block"...
call ___assert_fail
loc_78E3C:
mov rax, [rbp+var_18]
mov ecx, 100h
cqo
idiv rcx
mov [rbp+var_20], rax
mov [rbp+var_28], 0
loc_78E55:
movsxd rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jge loc_790D9
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_28]
imul rcx, 62h ; 'b'
add rax, rcx
movzx edi, word ptr [rax]
call ggml_lookup_fp16_to_fp32_0
movss [rbp+var_2C], xmm0
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_28]
imul rcx, 62h ; 'b'
add rax, rcx
add rax, 2
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
add rax, 40h ; '@'
mov [rbp+var_40], rax
mov [rbp+var_44], 0
loc_78EA9:
cmp [rbp+var_44], 8
jge loc_790C9
mov rax, [rbp+var_40]
mov ecx, [rbp+var_44]
shl ecx, 2
movsxd rcx, ecx
mov eax, [rax+rcx]
mov [rbp+var_24], eax
movss xmm0, [rbp+var_2C]
mov eax, [rbp+var_24]
shr eax, 1Ch
cvtsi2ss xmm2, eax
movss xmm1, cs:dword_B1420
addss xmm1, xmm2
mulss xmm0, xmm1
movss xmm1, cs:dword_B1420
mulss xmm0, xmm1
movss [rbp+var_48], xmm0
mov [rbp+var_4C], 0
loc_78EFD:
cmp [rbp+var_4C], 4
jge loc_790AF
mov eax, [rbp+var_24]
imul ecx, [rbp+var_4C], 7
shr eax, cl
and eax, 7Fh
mov eax, eax
mov ecx, eax
lea rax, ksigns_iq2xs
mov al, [rax+rcx]
mov [rbp+var_4D], al
mov rax, [rbp+var_38]
mov ecx, [rbp+var_4C]
shl ecx, 1
add ecx, 0
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
movsxd rcx, eax
lea rax, iq3xxs_grid
shl rcx, 2
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_38]
mov ecx, [rbp+var_4C]
shl ecx, 1
add ecx, 1
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
movsxd rcx, eax
lea rax, iq3xxs_grid
shl rcx, 2
add rax, rcx
mov [rbp+var_60], rax
mov [rbp+var_64], 0
loc_78F7B:
cmp [rbp+var_64], 4
jge loc_79095
movss xmm0, [rbp+var_48]
mov rax, [rbp+var_58]
movsxd rcx, [rbp+var_64]
movzx eax, byte ptr [rax+rcx]
cvtsi2ss xmm1, eax
mulss xmm0, xmm1
movss [rbp+var_70], xmm0
movzx eax, [rbp+var_4D]
mov ecx, [rbp+var_64]
add ecx, 0
movsxd rdx, ecx
lea rcx, kmask_iq2xs
movzx ecx, byte ptr [rcx+rdx]
and eax, ecx
movss xmm0, cs:dword_B6374
movss xmm1, cs:dword_B1428
movss [rbp+var_6C], xmm1
cmp eax, 0
movss [rbp+var_68], xmm0
jnz short loc_78FE6
movss xmm0, [rbp+var_6C]
movss [rbp+var_68], xmm0
loc_78FE6:
movss xmm0, [rbp+var_70]
movss xmm1, [rbp+var_68]
mulss xmm0, xmm1
mov rax, [rbp+var_10]
mov ecx, [rbp+var_64]
add ecx, 0
movsxd rcx, ecx
movss dword ptr [rax+rcx*4], xmm0
movss xmm0, [rbp+var_48]
mov rax, [rbp+var_60]
movsxd rcx, [rbp+var_64]
movzx eax, byte ptr [rax+rcx]
cvtsi2ss xmm1, eax
mulss xmm0, xmm1
movss [rbp+var_7C], xmm0
movzx eax, [rbp+var_4D]
mov ecx, [rbp+var_64]
add ecx, 4
movsxd rdx, ecx
lea rcx, kmask_iq2xs
movzx ecx, byte ptr [rcx+rdx]
and eax, ecx
movss xmm0, cs:dword_B6374
movss xmm1, cs:dword_B1428
movss [rbp+var_78], xmm1
cmp eax, 0
movss [rbp+var_74], xmm0
jnz short loc_79067
movss xmm0, [rbp+var_78]
movss [rbp+var_74], xmm0
loc_79067:
movss xmm0, [rbp+var_7C]
movss xmm1, [rbp+var_74]
mulss xmm0, xmm1
mov rax, [rbp+var_10]
mov ecx, [rbp+var_64]
add ecx, 4
movsxd rcx, ecx
movss dword ptr [rax+rcx*4], xmm0
mov eax, [rbp+var_64]
add eax, 1
mov [rbp+var_64], eax
jmp loc_78F7B
loc_79095:
mov rax, [rbp+var_10]
add rax, 20h ; ' '
mov [rbp+var_10], rax
mov eax, [rbp+var_4C]
add eax, 1
mov [rbp+var_4C], eax
jmp loc_78EFD
loc_790AF:
mov rax, [rbp+var_38]
add rax, 8
mov [rbp+var_38], rax
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp loc_78EA9
loc_790C9:
jmp short $+2
loc_790CB:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp loc_78E55
loc_790D9:
add rsp, 80h
pop rbp
retn
| long long dequantize_row_iq3_xxs(long long a1, long long a2, long long a3)
{
long long result; // rax
long long v4; // rcx
float v5; // [rsp+Ch] [rbp-74h]
float v6; // [rsp+18h] [rbp-68h]
int m; // [rsp+1Ch] [rbp-64h]
char *v8; // [rsp+20h] [rbp-60h]
char *v9; // [rsp+28h] [rbp-58h]
unsigned __int8 v10; // [rsp+33h] [rbp-4Dh]
int k; // [rsp+34h] [rbp-4Ch]
float v12; // [rsp+38h] [rbp-48h]
int j; // [rsp+3Ch] [rbp-44h]
long long v14; // [rsp+48h] [rbp-38h]
float v15; // [rsp+54h] [rbp-2Ch]
int i; // [rsp+58h] [rbp-28h]
unsigned int v17; // [rsp+5Ch] [rbp-24h]
if ( a3 % 256 )
__assert_fail(
"k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2285LL,
"void dequantize_row_iq3_xxs(const block_iq3_xxs *restrict, float *restrict, int64_t)");
for ( i = 0; ; ++i )
{
result = i;
if ( i >= a3 / 256 )
break;
v15 = ggml_lookup_fp16_to_fp32_0(*(_WORD *)(98LL * i + a1));
v4 = 98LL * i;
v14 = v4 + a1 + 2;
for ( j = 0; j < 8; ++j )
{
v17 = *(_DWORD *)(v4 + a1 + 66 + 4 * j);
v12 = (float)(v15 * (float)((float)(v17 >> 28) + 0.5)) * 0.5;
for ( k = 0; k < 4; ++k )
{
v10 = ksigns_iq2xs[(v17 >> (7 * k)) & 0x7F];
v9 = (char *)&iq3xxs_grid + 4 * *(unsigned __int8 *)(v14 + 2 * k);
v8 = (char *)&iq3xxs_grid + 4 * *(unsigned __int8 *)(v14 + 2 * k + 1);
for ( m = 0; m < 4; ++m )
{
v6 = -1.0;
if ( (kmask_iq2xs[m] & v10) == 0 )
v6 = 1.0;
*(float *)(a2 + 4LL * m) = (float)(v12 * (float)(unsigned __int8)v9[m]) * v6;
v5 = -1.0;
if ( (kmask_iq2xs[m + 4] & v10) == 0 )
v5 = 1.0;
*(float *)(a2 + 4LL * (m + 4)) = (float)(v12 * (float)(unsigned __int8)v8[m]) * v5;
}
a2 += 32LL;
}
v14 += 8LL;
}
}
return result;
}
| dequantize_row_iq3_xxs:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,0x100
CQO
IDIV RCX
CMP RDX,0x0
JNZ 0x00178e1d
JMP 0x00178e3c
LAB_00178e1d:
LEA RDI,[0x1c1144]
LEA RSI,[0x1c0d5c]
MOV EDX,0x8ed
LEA RCX,[0x1c16b3]
CALL 0x00144810
LAB_00178e3c:
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,0x100
CQO
IDIV RCX
MOV qword ptr [RBP + -0x20],RAX
MOV dword ptr [RBP + -0x28],0x0
LAB_00178e55:
MOVSXD RAX,dword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x20]
JGE 0x001790d9
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x28]
IMUL RCX,RCX,0x62
ADD RAX,RCX
MOVZX EDI,word ptr [RAX]
CALL 0x0016e6e0
MOVSS dword ptr [RBP + -0x2c],XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x28]
IMUL RCX,RCX,0x62
ADD RAX,RCX
ADD RAX,0x2
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x40
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x44],0x0
LAB_00178ea9:
CMP dword ptr [RBP + -0x44],0x8
JGE 0x001790c9
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x44]
SHL ECX,0x2
MOVSXD RCX,ECX
MOV EAX,dword ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x24],EAX
MOVSS XMM0,dword ptr [RBP + -0x2c]
MOV EAX,dword ptr [RBP + -0x24]
SHR EAX,0x1c
CVTSI2SS XMM2,EAX
MOVSS XMM1,dword ptr [0x001b1420]
ADDSS XMM1,XMM2
MULSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x001b1420]
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x48],XMM0
MOV dword ptr [RBP + -0x4c],0x0
LAB_00178efd:
CMP dword ptr [RBP + -0x4c],0x4
JGE 0x001790af
MOV EAX,dword ptr [RBP + -0x24]
IMUL ECX,dword ptr [RBP + -0x4c],0x7
SHR EAX,CL
AND EAX,0x7f
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x1b6c80]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x4d],AL
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x4c]
SHL ECX,0x1
ADD ECX,0x0
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOVSXD RCX,EAX
LEA RAX,[0x1b9d10]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x4c]
SHL ECX,0x1
ADD ECX,0x1
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOVSXD RCX,EAX
LEA RAX,[0x1b9d10]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV dword ptr [RBP + -0x64],0x0
LAB_00178f7b:
CMP dword ptr [RBP + -0x64],0x4
JGE 0x00179095
MOVSS XMM0,dword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x58]
MOVSXD RCX,dword ptr [RBP + -0x64]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CVTSI2SS XMM1,EAX
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x70],XMM0
MOVZX EAX,byte ptr [RBP + -0x4d]
MOV ECX,dword ptr [RBP + -0x64]
ADD ECX,0x0
MOVSXD RDX,ECX
LEA RCX,[0x1b6d00]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
AND EAX,ECX
MOVSS XMM0,dword ptr [0x001b6374]
MOVSS XMM1,dword ptr [0x001b1428]
MOVSS dword ptr [RBP + -0x6c],XMM1
CMP EAX,0x0
MOVSS dword ptr [RBP + -0x68],XMM0
JNZ 0x00178fe6
MOVSS XMM0,dword ptr [RBP + -0x6c]
MOVSS dword ptr [RBP + -0x68],XMM0
LAB_00178fe6:
MOVSS XMM0,dword ptr [RBP + -0x70]
MOVSS XMM1,dword ptr [RBP + -0x68]
MULSS XMM0,XMM1
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x64]
ADD ECX,0x0
MOVSXD RCX,ECX
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOVSS XMM0,dword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x60]
MOVSXD RCX,dword ptr [RBP + -0x64]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CVTSI2SS XMM1,EAX
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x7c],XMM0
MOVZX EAX,byte ptr [RBP + -0x4d]
MOV ECX,dword ptr [RBP + -0x64]
ADD ECX,0x4
MOVSXD RDX,ECX
LEA RCX,[0x1b6d00]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
AND EAX,ECX
MOVSS XMM0,dword ptr [0x001b6374]
MOVSS XMM1,dword ptr [0x001b1428]
MOVSS dword ptr [RBP + -0x78],XMM1
CMP EAX,0x0
MOVSS dword ptr [RBP + -0x74],XMM0
JNZ 0x00179067
MOVSS XMM0,dword ptr [RBP + -0x78]
MOVSS dword ptr [RBP + -0x74],XMM0
LAB_00179067:
MOVSS XMM0,dword ptr [RBP + -0x7c]
MOVSS XMM1,dword ptr [RBP + -0x74]
MULSS XMM0,XMM1
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x64]
ADD ECX,0x4
MOVSXD RCX,ECX
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOV EAX,dword ptr [RBP + -0x64]
ADD EAX,0x1
MOV dword ptr [RBP + -0x64],EAX
JMP 0x00178f7b
LAB_00179095:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x20
MOV qword ptr [RBP + -0x10],RAX
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x00178efd
LAB_001790af:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x8
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
JMP 0x00178ea9
LAB_001790c9:
JMP 0x001790cb
LAB_001790cb:
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00178e55
LAB_001790d9:
ADD RSP,0x80
POP RBP
RET
|
void dequantize_row_iq3_xxs(long param_1,long param_2,long param_3)
{
byte bVar1;
byte bVar2;
byte bVar3;
uint uVar4;
long lVar5;
float fVar6;
float fVar7;
float local_7c;
float local_70;
int local_6c;
int local_54;
int local_4c;
long local_40;
int local_30;
long local_18;
if (param_3 % 0x100 == 0) {
local_18 = param_2;
for (local_30 = 0; (long)local_30 < param_3 / 0x100; local_30 = local_30 + 1) {
fVar6 = (float)ggml_lookup_fp16_to_fp32(*(int2 *)(param_1 + (long)local_30 * 0x62));
lVar5 = param_1 + (long)local_30 * 0x62;
local_40 = lVar5 + 2;
for (local_4c = 0; local_4c < 8; local_4c = local_4c + 1) {
uVar4 = *(uint *)(lVar5 + 0x42 + (long)(local_4c << 2));
fVar7 = fVar6 * (DAT_001b1420 + (float)(uVar4 >> 0x1c)) * DAT_001b1420;
for (local_54 = 0; local_54 < 4; local_54 = local_54 + 1) {
bVar1 = ksigns_iq2xs[uVar4 >> ((char)local_54 * '\a' & 0x1fU) & 0x7f];
bVar2 = *(byte *)(local_40 + (local_54 << 1));
bVar3 = *(byte *)(local_40 + (local_54 * 2 + 1));
for (local_6c = 0; local_6c < 4; local_6c = local_6c + 1) {
local_70 = DAT_001b6374;
if ((bVar1 & *(byte *)((long)&kmask_iq2xs + (long)local_6c)) == 0) {
local_70 = DAT_001b1428;
}
*(float *)(local_18 + (long)local_6c * 4) =
fVar7 * (float)(byte)iq3xxs_grid[(long)local_6c + (long)(int)(uint)bVar2 * 4] *
local_70;
local_7c = DAT_001b6374;
if ((bVar1 & *(byte *)((long)&kmask_iq2xs + (long)(local_6c + 4))) == 0) {
local_7c = DAT_001b1428;
}
*(float *)(local_18 + (long)(local_6c + 4) * 4) =
fVar7 * (float)(byte)iq3xxs_grid[(long)local_6c + (long)(int)(uint)bVar3 * 4] *
local_7c;
}
local_18 = local_18 + 0x20;
}
local_40 = local_40 + 8;
}
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0x8ed,
"void dequantize_row_iq3_xxs(const block_iq3_xxs *restrict, float *restrict, int64_t)"
);
}
| |
35,972 | dequantize_row_iq3_xxs | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | void dequantize_row_iq3_xxs(const block_iq3_xxs * restrict x, float * restrict y, int64_t k) {
assert(k % QK_K == 0);
const int64_t nb = k / QK_K;
uint32_t aux32;
for (int i = 0; i < nb; i++) {
const float d = GGML_FP16_TO_FP32(x[i].d);
const uint8_t * qs = x[i].qs;
const uint8_t * scales_and_signs = qs + QK_K/4;
for (int ib32 = 0; ib32 < QK_K/32; ++ib32) {
memcpy(&aux32, scales_and_signs + 4*ib32, sizeof(uint32_t));
const float db = d * (0.5f + (aux32 >> 28)) * 0.5f;
for (int l = 0; l < 4; ++l) {
const uint8_t signs = ksigns_iq2xs[(aux32 >> 7*l) & 127];
const uint8_t * grid1 = (const uint8_t *)(iq3xxs_grid + qs[2*l+0]);
const uint8_t * grid2 = (const uint8_t *)(iq3xxs_grid + qs[2*l+1]);
for (int j = 0; j < 4; ++j) {
y[j+0] = db * grid1[j] * (signs & kmask_iq2xs[j+0] ? -1.f : 1.f);
y[j+4] = db * grid2[j] * (signs & kmask_iq2xs[j+4] ? -1.f : 1.f);
}
y += 8;
}
qs += 8;
}
}
} | O2 | c | dequantize_row_iq3_xxs:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
testb %dl, %dl
jne 0x37bd8
sarq $0x8, %rdx
xorl %edi, %edi
testq %rdx, %rdx
cmovleq %rdi, %rdx
movss 0x165ad(%rip), %xmm0 # 0x4e06c
leaq 0x1befa(%rip), %r9 # 0x539c0
leaq 0x1ef73(%rip), %r10 # 0x56a40
leaq 0x1b60c(%rip), %r11 # 0x530e0
movaps 0x1b3c5(%rip), %xmm1 # 0x52ea0
movq %rdx, 0x8(%rsp)
cmpq %rdx, %rdi
je 0x37bc9
imulq $0x62, %rdi, %rax
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax), %rbx
leaq (%rcx,%rax), %r14
addq $0x2, %r14
movzwl -0x2(%r14), %eax
movq 0x3b49e(%rip), %rcx # 0x72fa8
movss (%rcx,%rax,4), %xmm2
xorl %r15d, %r15d
cmpq $0x8, %r15
je 0x37bbc
movl 0x42(%rbx,%r15,4), %ebp
movl %ebp, %eax
shrl $0x1c, %eax
cvtsi2ss %eax, %xmm3
addss %xmm0, %xmm3
mulss %xmm2, %xmm3
mulss %xmm0, %xmm3
xorl %r12d, %r12d
cmpq $0x4, %r12
je 0x37bb0
imull $0x7, %r12d, %ecx
movl %ebp, %eax
shrl %cl, %eax
andl $0x7f, %eax
movb (%rax,%r9), %cl
movzbl (%r14,%r12,2), %eax
leaq (%r10,%rax,4), %r13
movzbl 0x1(%r14,%r12,2), %eax
leaq (%r10,%rax,4), %r8
xorl %eax, %eax
cmpq $0x4, %rax
je 0x37ba7
movzbl (%r13,%rax), %edx
cvtsi2ss %edx, %xmm4
mulss %xmm3, %xmm4
testb %cl, (%rax,%r11)
je 0x37b80
xorps %xmm1, %xmm4
movzbl (%r8,%rax), %edx
cvtsi2ss %edx, %xmm5
movss %xmm4, (%rsi,%rax,4)
mulss %xmm3, %xmm5
testb %cl, 0x4(%rax,%r11)
je 0x37b9c
xorps %xmm1, %xmm5
movss %xmm5, 0x10(%rsi,%rax,4)
incq %rax
jmp 0x37b63
addq $0x20, %rsi
incq %r12
jmp 0x37b39
addq $0x8, %r14
incq %r15
jmp 0x37b12
incq %rdi
movq 0x8(%rsp), %rdx
jmp 0x37ae0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2626d(%rip), %rdi # 0x5de4c
leaq 0x25e7e(%rip), %rsi # 0x5da64
leaq 0x267ce(%rip), %rcx # 0x5e3bb
movl $0x8ed, %edx # imm = 0x8ED
callq 0x1dfb0
| dequantize_row_iq3_xxs:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_38], rdi
test dl, dl
jnz loc_37BD8
sar rdx, 8
xor edi, edi
test rdx, rdx
cmovle rdx, rdi
movss xmm0, cs:dword_4E06C
lea r9, ksigns_iq2xs
lea r10, iq3xxs_grid
lea r11, kmask_iq2xs
movaps xmm1, cs:xmmword_52EA0
mov [rsp+48h+var_40], rdx
loc_37AE0:
cmp rdi, rdx
jz loc_37BC9
imul rax, rdi, 62h ; 'b'
mov rcx, [rsp+48h+var_38]
lea rbx, [rcx+rax]
lea r14, [rcx+rax]
add r14, 2
movzx eax, word ptr [r14-2]
mov rcx, cs:ggml_table_f32_f16_ptr
movss xmm2, dword ptr [rcx+rax*4]
xor r15d, r15d
loc_37B12:
cmp r15, 8
jz loc_37BBC
mov ebp, [rbx+r15*4+42h]
mov eax, ebp
shr eax, 1Ch
cvtsi2ss xmm3, eax
addss xmm3, xmm0
mulss xmm3, xmm2
mulss xmm3, xmm0
xor r12d, r12d
loc_37B39:
cmp r12, 4
jz short loc_37BB0
imul ecx, r12d, 7
mov eax, ebp
shr eax, cl
and eax, 7Fh
mov cl, [rax+r9]
movzx eax, byte ptr [r14+r12*2]
lea r13, [r10+rax*4]
movzx eax, byte ptr [r14+r12*2+1]
lea r8, [r10+rax*4]
xor eax, eax
loc_37B63:
cmp rax, 4
jz short loc_37BA7
movzx edx, byte ptr [r13+rax+0]
cvtsi2ss xmm4, edx
mulss xmm4, xmm3
test [rax+r11], cl
jz short loc_37B80
xorps xmm4, xmm1
loc_37B80:
movzx edx, byte ptr [r8+rax]
cvtsi2ss xmm5, edx
movss dword ptr [rsi+rax*4], xmm4
mulss xmm5, xmm3
test [rax+r11+4], cl
jz short loc_37B9C
xorps xmm5, xmm1
loc_37B9C:
movss dword ptr [rsi+rax*4+10h], xmm5
inc rax
jmp short loc_37B63
loc_37BA7:
add rsi, 20h ; ' '
inc r12
jmp short loc_37B39
loc_37BB0:
add r14, 8
inc r15
jmp loc_37B12
loc_37BBC:
inc rdi
mov rdx, [rsp+48h+var_40]
jmp loc_37AE0
loc_37BC9:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_37BD8:
lea rdi, aKQkK0; "k % QK_K == 0"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidDequantize_14; "void dequantize_row_iq3_xxs(const block"...
mov edx, 8EDh
call ___assert_fail
| void dequantize_row_iq3_xxs(
long long a1,
long long a2,
long long a3,
double a4,
double a5,
double a6,
double a7,
__m128 a8,
__m128 a9)
{
long long v9; // rdx
long long v10; // rdi
unsigned __int16 *v11; // rbx
unsigned __int16 *v12; // r14
float v13; // xmm2_4
long long i; // r15
unsigned int v15; // ebp
float v16; // xmm3_4
long long j; // r12
unsigned __int8 v18; // cl
char *v19; // r13
char *v20; // r8
long long k; // rax
int v22; // edx
long long v23; // [rsp+8h] [rbp-40h]
if ( (_BYTE)a3 )
__assert_fail(
"k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2285LL,
"void dequantize_row_iq3_xxs(const block_iq3_xxs *restrict, float *restrict, int64_t)");
v9 = a3 >> 8;
v10 = 0LL;
if ( v9 <= 0 )
v9 = 0LL;
v23 = v9;
while ( v10 != v9 )
{
v11 = (unsigned __int16 *)(a1 + 98 * v10);
v12 = v11 + 1;
v13 = ggml_table_f32_f16[*v11];
for ( i = 0LL; i != 8; ++i )
{
v15 = *(_DWORD *)&v11[2 * i + 33];
v16 = (float)((float)((float)(v15 >> 28) + 0.5) * v13) * 0.5;
for ( j = 0LL; j != 4; ++j )
{
v18 = ksigns_iq2xs[(v15 >> (7 * j)) & 0x7F];
v19 = (char *)&iq3xxs_grid + 4 * LOBYTE(v12[j]);
v20 = (char *)&iq3xxs_grid + 4 * HIBYTE(v12[j]);
for ( k = 0LL; k != 4; ++k )
{
a8.m128_f32[0] = (float)(unsigned __int8)v19[k] * v16;
if ( (v18 & kmask_iq2xs[k]) != 0 )
a8 = _mm_xor_ps(a8, (__m128)xmmword_52EA0);
v22 = (unsigned __int8)v20[k];
*(_DWORD *)(a2 + 4 * k) = a8.m128_i32[0];
a9.m128_f32[0] = (float)v22 * v16;
if ( (v18 & kmask_iq2xs[k + 4]) != 0 )
a9 = _mm_xor_ps(a9, (__m128)xmmword_52EA0);
*(_DWORD *)(a2 + 4 * k + 16) = a9.m128_i32[0];
}
a2 += 32LL;
}
v12 += 4;
}
++v10;
v9 = v23;
}
}
| dequantize_row_iq3_xxs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
TEST DL,DL
JNZ 0x00137bd8
SAR RDX,0x8
XOR EDI,EDI
TEST RDX,RDX
CMOVLE RDX,RDI
MOVSS XMM0,dword ptr [0x0014e06c]
LEA R9,[0x1539c0]
LEA R10,[0x156a40]
LEA R11,[0x1530e0]
MOVAPS XMM1,xmmword ptr [0x00152ea0]
MOV qword ptr [RSP + 0x8],RDX
LAB_00137ae0:
CMP RDI,RDX
JZ 0x00137bc9
IMUL RAX,RDI,0x62
MOV RCX,qword ptr [RSP + 0x10]
LEA RBX,[RCX + RAX*0x1]
LEA R14,[RCX + RAX*0x1]
ADD R14,0x2
MOVZX EAX,word ptr [R14 + -0x2]
MOV RCX,qword ptr [0x00172fa8]
MOVSS XMM2,dword ptr [RCX + RAX*0x4]
XOR R15D,R15D
LAB_00137b12:
CMP R15,0x8
JZ 0x00137bbc
MOV EBP,dword ptr [RBX + R15*0x4 + 0x42]
MOV EAX,EBP
SHR EAX,0x1c
CVTSI2SS XMM3,EAX
ADDSS XMM3,XMM0
MULSS XMM3,XMM2
MULSS XMM3,XMM0
XOR R12D,R12D
LAB_00137b39:
CMP R12,0x4
JZ 0x00137bb0
IMUL ECX,R12D,0x7
MOV EAX,EBP
SHR EAX,CL
AND EAX,0x7f
MOV CL,byte ptr [RAX + R9*0x1]
MOVZX EAX,byte ptr [R14 + R12*0x2]
LEA R13,[R10 + RAX*0x4]
MOVZX EAX,byte ptr [R14 + R12*0x2 + 0x1]
LEA R8,[R10 + RAX*0x4]
XOR EAX,EAX
LAB_00137b63:
CMP RAX,0x4
JZ 0x00137ba7
MOVZX EDX,byte ptr [R13 + RAX*0x1]
CVTSI2SS XMM4,EDX
MULSS XMM4,XMM3
TEST byte ptr [RAX + R11*0x1],CL
JZ 0x00137b80
XORPS XMM4,XMM1
LAB_00137b80:
MOVZX EDX,byte ptr [R8 + RAX*0x1]
CVTSI2SS XMM5,EDX
MOVSS dword ptr [RSI + RAX*0x4],XMM4
MULSS XMM5,XMM3
TEST byte ptr [RAX + R11*0x1 + 0x4],CL
JZ 0x00137b9c
XORPS XMM5,XMM1
LAB_00137b9c:
MOVSS dword ptr [RSI + RAX*0x4 + 0x10],XMM5
INC RAX
JMP 0x00137b63
LAB_00137ba7:
ADD RSI,0x20
INC R12
JMP 0x00137b39
LAB_00137bb0:
ADD R14,0x8
INC R15
JMP 0x00137b12
LAB_00137bbc:
INC RDI
MOV RDX,qword ptr [RSP + 0x8]
JMP 0x00137ae0
LAB_00137bc9:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00137bd8:
LEA RDI,[0x15de4c]
LEA RSI,[0x15da64]
LEA RCX,[0x15e3bb]
MOV EDX,0x8ed
CALL 0x0011dfb0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void dequantize_row_iq3_xxs(long param_1,long param_2,long param_3)
{
ushort *puVar1;
float fVar2;
byte bVar3;
byte bVar4;
byte bVar5;
uint uVar6;
ushort uVar7;
float fVar8;
uint uVar9;
long lVar10;
long lVar11;
long lVar12;
long lVar13;
ushort *puVar14;
long lVar15;
float fVar16;
float fVar17;
uVar9 = _DAT_00152ea0;
fVar8 = DAT_0014e06c;
if ((char)param_3 != '\0') {
/* WARNING: Subroutine does not return */
__assert_fail("k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0x8ed,
"void dequantize_row_iq3_xxs(const block_iq3_xxs *restrict, float *restrict, int64_t)"
);
}
lVar12 = 0;
lVar11 = param_3 >> 8;
if (param_3 >> 8 < 1) {
lVar11 = lVar12;
}
for (; lVar12 != lVar11; lVar12 = lVar12 + 1) {
puVar1 = (ushort *)(param_1 + lVar12 * 0x62);
puVar14 = puVar1 + 1;
fVar2 = *(float *)(PTR_ggml_table_f32_f16_00172fa8 + (ulong)*puVar1 * 4);
for (lVar15 = 0; lVar15 != 8; lVar15 = lVar15 + 1) {
uVar6 = *(uint *)(param_1 + lVar12 * 0x62 + 0x42 + lVar15 * 4);
fVar16 = ((float)(uVar6 >> 0x1c) + fVar8) * fVar2 * fVar8;
for (lVar13 = 0; lVar13 != 4; lVar13 = lVar13 + 1) {
bVar3 = ksigns_iq2xs[uVar6 >> ((char)lVar13 * '\a' & 0x1fU) & 0x7f];
uVar7 = puVar14[lVar13];
bVar4 = *(byte *)((long)puVar14 + lVar13 * 2 + 1);
for (lVar10 = 0; lVar10 != 4; lVar10 = lVar10 + 1) {
fVar17 = (float)(byte)iq3xxs_grid[lVar10 + (ulong)(byte)uVar7 * 4] * fVar16;
if (((&kmask_iq2xs)[lVar10] & bVar3) != 0) {
fVar17 = (float)((uint)fVar17 ^ uVar9);
}
bVar5 = iq3xxs_grid[lVar10 + (ulong)bVar4 * 4];
*(float *)(param_2 + lVar10 * 4) = fVar17;
fVar17 = (float)bVar5 * fVar16;
if (((&DAT_001530e4)[lVar10] & bVar3) != 0) {
fVar17 = (float)((uint)fVar17 ^ uVar9);
}
*(float *)(param_2 + 0x10 + lVar10 * 4) = fVar17;
}
param_2 = param_2 + 0x20;
}
puVar14 = puVar14 + 4;
}
}
return;
}
| |
35,973 | dequantize_row_iq3_xxs | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | void dequantize_row_iq3_xxs(const block_iq3_xxs * restrict x, float * restrict y, int64_t k) {
assert(k % QK_K == 0);
const int64_t nb = k / QK_K;
uint32_t aux32;
for (int i = 0; i < nb; i++) {
const float d = GGML_FP16_TO_FP32(x[i].d);
const uint8_t * qs = x[i].qs;
const uint8_t * scales_and_signs = qs + QK_K/4;
for (int ib32 = 0; ib32 < QK_K/32; ++ib32) {
memcpy(&aux32, scales_and_signs + 4*ib32, sizeof(uint32_t));
const float db = d * (0.5f + (aux32 >> 28)) * 0.5f;
for (int l = 0; l < 4; ++l) {
const uint8_t signs = ksigns_iq2xs[(aux32 >> 7*l) & 127];
const uint8_t * grid1 = (const uint8_t *)(iq3xxs_grid + qs[2*l+0]);
const uint8_t * grid2 = (const uint8_t *)(iq3xxs_grid + qs[2*l+1]);
for (int j = 0; j < 4; ++j) {
y[j+0] = db * grid1[j] * (signs & kmask_iq2xs[j+0] ? -1.f : 1.f);
y[j+4] = db * grid2[j] * (signs & kmask_iq2xs[j+4] ? -1.f : 1.f);
}
y += 8;
}
qs += 8;
}
}
} | O3 | c | dequantize_row_iq3_xxs:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
testb %dl, %dl
jne 0x3378c
sarq $0x8, %rdx
testq %rdx, %rdx
jle 0x3377d
movq (%rsp), %rax
leaq 0x3(%rax), %rdi
xorl %r8d, %r8d
movss 0x18ade(%rip), %xmm0 # 0x4c0fc
leaq 0x216ab(%rip), %r10 # 0x54cd0
leaq 0x1e624(%rip), %r11 # 0x51c50
pxor %xmm1, %xmm1
movd 0x1da38(%rip), %xmm2 # 0x51070
punpcklbw %xmm2, %xmm2 # xmm2 = xmm2[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
punpcklwd %xmm2, %xmm2 # xmm2 = xmm2[0,0,1,1,2,2,3,3]
movaps 0x18a39(%rip), %xmm3 # 0x4c080
movd 0x1da31(%rip), %xmm4 # 0x51080
punpcklbw %xmm4, %xmm4 # xmm4 = xmm4[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
punpcklwd %xmm4, %xmm4 # xmm4 = xmm4[0,0,1,1,2,2,3,3]
imulq $0x62, %r8, %rcx
movq (%rsp), %rax
leaq (%rax,%rcx), %rbx
movzwl (%rax,%rcx), %ecx
movq 0x3a93a(%rip), %rax # 0x6dfa8
movss (%rax,%rcx,4), %xmm5
movq %rdi, %r14
xorl %r15d, %r15d
movl 0x42(%rbx,%r15,4), %ebp
movl %ebp, %ecx
shrl $0x1c, %ecx
xorps %xmm6, %xmm6
cvtsi2ss %ecx, %xmm6
addss %xmm0, %xmm6
mulss %xmm5, %xmm6
mulss %xmm0, %xmm6
shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0]
movq %r14, %r12
xorl %ecx, %ecx
movl %ebp, %r9d
shrl %cl, %r9d
movzbl -0x1(%r12), %eax
movzbl (%r12), %r13d
andl $0x7f, %r9d
movzbl (%r9,%r11), %r9d
movd %r9d, %xmm7
punpcklbw %xmm7, %xmm7 # xmm7 = xmm7[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0,4,5,6,7]
movd (%r10,%rax,4), %xmm8
punpcklbw %xmm1, %xmm8 # xmm8 = xmm8[0],xmm1[0],xmm8[1],xmm1[1],xmm8[2],xmm1[2],xmm8[3],xmm1[3],xmm8[4],xmm1[4],xmm8[5],xmm1[5],xmm8[6],xmm1[6],xmm8[7],xmm1[7]
punpcklwd %xmm1, %xmm8 # xmm8 = xmm8[0],xmm1[0],xmm8[1],xmm1[1],xmm8[2],xmm1[2],xmm8[3],xmm1[3]
cvtdq2ps %xmm8, %xmm8
mulps %xmm6, %xmm8
punpcklbw %xmm7, %xmm7 # xmm7 = xmm7[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
punpcklwd %xmm7, %xmm7 # xmm7 = xmm7[0,0,1,1,2,2,3,3]
movdqa %xmm2, %xmm9
pand %xmm7, %xmm9
pcmpeqb %xmm1, %xmm9
movaps %xmm8, %xmm10
xorps %xmm3, %xmm10
andps %xmm9, %xmm8
andnps %xmm10, %xmm9
orps %xmm8, %xmm9
movups %xmm9, (%rsi)
movd (%r10,%r13,4), %xmm8
punpcklbw %xmm1, %xmm8 # xmm8 = xmm8[0],xmm1[0],xmm8[1],xmm1[1],xmm8[2],xmm1[2],xmm8[3],xmm1[3],xmm8[4],xmm1[4],xmm8[5],xmm1[5],xmm8[6],xmm1[6],xmm8[7],xmm1[7]
punpcklwd %xmm1, %xmm8 # xmm8 = xmm8[0],xmm1[0],xmm8[1],xmm1[1],xmm8[2],xmm1[2],xmm8[3],xmm1[3]
cvtdq2ps %xmm8, %xmm8
mulps %xmm6, %xmm8
pand %xmm4, %xmm7
pcmpeqb %xmm1, %xmm7
movaps %xmm8, %xmm9
xorps %xmm3, %xmm9
andps %xmm7, %xmm8
andnps %xmm9, %xmm7
orps %xmm8, %xmm7
movups %xmm7, 0x10(%rsi)
addq $0x20, %rsi
addq $0x7, %rcx
addq $0x2, %r12
cmpq $0x1c, %rcx
jne 0x3369f
incq %r15
addq $0x8, %r14
cmpq $0x8, %r15
jne 0x33679
incq %r8
addq $0x62, %rdi
cmpq %rdx, %r8
jne 0x33657
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28949(%rip), %rdi # 0x5c0dc
leaq 0x2855a(%rip), %rsi # 0x5bcf4
leaq 0x28eaa(%rip), %rcx # 0x5c64b
movl $0x8ed, %edx # imm = 0x8ED
callq 0x16b00
| dequantize_row_iq3_xxs:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], rdi
test dl, dl
jnz loc_3378C
sar rdx, 8
test rdx, rdx
jle loc_3377D
mov rax, [rsp+38h+var_38]
lea rdi, [rax+3]
xor r8d, r8d
movss xmm0, cs:dword_4C0FC
lea r10, iq3xxs_grid
lea r11, ksigns_iq2xs
pxor xmm1, xmm1
movd xmm2, dword ptr cs:xmmword_51070
punpcklbw xmm2, xmm2
punpcklwd xmm2, xmm2
movaps xmm3, cs:xmmword_4C080
movd xmm4, dword ptr cs:xmmword_51080
punpcklbw xmm4, xmm4
punpcklwd xmm4, xmm4
loc_33657:
imul rcx, r8, 62h ; 'b'
mov rax, [rsp+38h+var_38]
lea rbx, [rax+rcx]
movzx ecx, word ptr [rax+rcx]
mov rax, cs:ggml_table_f32_f16_ptr
movss xmm5, dword ptr [rax+rcx*4]
mov r14, rdi
xor r15d, r15d
loc_33679:
mov ebp, [rbx+r15*4+42h]
mov ecx, ebp
shr ecx, 1Ch
xorps xmm6, xmm6
cvtsi2ss xmm6, ecx
addss xmm6, xmm0
mulss xmm6, xmm5
mulss xmm6, xmm0
shufps xmm6, xmm6, 0
mov r12, r14
xor ecx, ecx
loc_3369F:
mov r9d, ebp
shr r9d, cl
movzx eax, byte ptr [r12-1]
movzx r13d, byte ptr [r12]
and r9d, 7Fh
movzx r9d, byte ptr [r9+r11]
movd xmm7, r9d
punpcklbw xmm7, xmm7
pshuflw xmm7, xmm7, 0
movd xmm8, dword ptr [r10+rax*4]
punpcklbw xmm8, xmm1
punpcklwd xmm8, xmm1
cvtdq2ps xmm8, xmm8
mulps xmm8, xmm6
punpcklbw xmm7, xmm7
punpcklwd xmm7, xmm7
movdqa xmm9, xmm2
pand xmm9, xmm7
pcmpeqb xmm9, xmm1
movaps xmm10, xmm8
xorps xmm10, xmm3
andps xmm8, xmm9
andnps xmm9, xmm10
orps xmm9, xmm8
movups xmmword ptr [rsi], xmm9
movd xmm8, dword ptr [r10+r13*4]
punpcklbw xmm8, xmm1
punpcklwd xmm8, xmm1
cvtdq2ps xmm8, xmm8
mulps xmm8, xmm6
pand xmm7, xmm4
pcmpeqb xmm7, xmm1
movaps xmm9, xmm8
xorps xmm9, xmm3
andps xmm8, xmm7
andnps xmm7, xmm9
orps xmm7, xmm8
movups xmmword ptr [rsi+10h], xmm7
add rsi, 20h ; ' '
add rcx, 7
add r12, 2
cmp rcx, 1Ch
jnz loc_3369F
inc r15
add r14, 8
cmp r15, 8
jnz loc_33679
inc r8
add rdi, 62h ; 'b'
cmp r8, rdx
jnz loc_33657
loc_3377D:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3378C:
lea rdi, aKQkK0; "k % QK_K == 0"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidDequantize_14; "void dequantize_row_iq3_xxs(const block"...
mov edx, 8EDh
call ___assert_fail
| long long dequantize_row_iq3_xxs(long long a1, __m128 *a2, long long a3)
{
long long v3; // rdx
unsigned __int8 *v4; // rdi
long long v5; // r8
__m128i v6; // xmm2
__m128i v7; // xmm2
__m128i v8; // xmm2
__m128i v9; // xmm4
__m128i v10; // xmm4
__m128i v11; // xmm4
unsigned __int16 *v12; // rbx
float v13; // xmm5_4
unsigned __int8 *v14; // r14
long long i; // r15
unsigned int v16; // ebp
__m128 v17; // xmm6
__m128 v18; // xmm6
unsigned __int8 *v19; // r12
long long j; // rcx
long long result; // rax
long long v22; // r13
__m128i v23; // xmm7
__m128i v24; // xmm7
__m128 v25; // xmm8
__m128i v26; // xmm7
__m128i v27; // xmm7
__m128 v28; // xmm9
__m128 v29; // xmm8
__m128 v30; // xmm7
if ( (_BYTE)a3 )
__assert_fail(
"k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2285LL,
"void dequantize_row_iq3_xxs(const block_iq3_xxs *restrict, float *restrict, int64_t)");
v3 = a3 >> 8;
if ( v3 > 0 )
{
v4 = (unsigned __int8 *)(a1 + 3);
v5 = 0LL;
v6 = _mm_cvtsi32_si128(0x8040201u);
v7 = _mm_unpacklo_epi8(v6, v6);
v8 = _mm_unpacklo_epi16(v7, v7);
v9 = _mm_cvtsi32_si128(0x80402010);
v10 = _mm_unpacklo_epi8(v9, v9);
v11 = _mm_unpacklo_epi16(v10, v10);
do
{
v12 = (unsigned __int16 *)(a1 + 98 * v5);
v13 = ggml_table_f32_f16[*v12];
v14 = v4;
for ( i = 0LL; i != 8; ++i )
{
v16 = *(_DWORD *)&v12[2 * i + 33];
v17 = 0LL;
v17.m128_f32[0] = (float)((float)((float)(v16 >> 28) + 0.5) * v13) * 0.5;
v18 = _mm_shuffle_ps(v17, v17, 0);
v19 = v14;
for ( j = 0LL; j != 28; j += 7LL )
{
result = *(v19 - 1);
v22 = *v19;
v23 = _mm_cvtsi32_si128(ksigns_iq2xs[(v16 >> j) & 0x7F]);
v24 = _mm_shufflelo_epi16(_mm_unpacklo_epi8(v23, v23), 0);
v25 = _mm_mul_ps(
_mm_cvtepi32_ps(
_mm_unpacklo_epi16(
_mm_unpacklo_epi8(_mm_cvtsi32_si128(iq3xxs_grid[result]), (__m128i)0LL),
(__m128i)0LL)),
v18);
v26 = _mm_unpacklo_epi8(v24, v24);
v27 = _mm_unpacklo_epi16(v26, v26);
v28 = (__m128)_mm_cmpeq_epi8(_mm_and_si128(v8, v27), (__m128i)0LL);
*a2 = _mm_or_ps(_mm_andnot_ps(v28, _mm_xor_ps(v25, (__m128)xmmword_4C080)), _mm_and_ps(v25, v28));
v29 = _mm_mul_ps(
_mm_cvtepi32_ps(
_mm_unpacklo_epi16(
_mm_unpacklo_epi8(_mm_cvtsi32_si128(iq3xxs_grid[v22]), (__m128i)0LL),
(__m128i)0LL)),
v18);
v30 = (__m128)_mm_cmpeq_epi8(_mm_and_si128(v27, v11), (__m128i)0LL);
a2[1] = _mm_or_ps(_mm_andnot_ps(v30, _mm_xor_ps(v29, (__m128)xmmword_4C080)), _mm_and_ps(v29, v30));
a2 += 2;
v19 += 2;
}
v14 += 8;
}
++v5;
v4 += 98;
}
while ( v5 != v3 );
}
return result;
}
| dequantize_row_iq3_xxs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RDI
TEST DL,DL
JNZ 0x0013378c
SAR RDX,0x8
TEST RDX,RDX
JLE 0x0013377d
MOV RAX,qword ptr [RSP]
LEA RDI,[RAX + 0x3]
XOR R8D,R8D
MOVSS XMM0,dword ptr [0x0014c0fc]
LEA R10,[0x154cd0]
LEA R11,[0x151c50]
PXOR XMM1,XMM1
MOVD XMM2,dword ptr [0x00151070]
PUNPCKLBW XMM2,XMM2
PUNPCKLWD XMM2,XMM2
MOVAPS XMM3,xmmword ptr [0x0014c080]
MOVD XMM4,dword ptr [0x00151080]
PUNPCKLBW XMM4,XMM4
PUNPCKLWD XMM4,XMM4
LAB_00133657:
IMUL RCX,R8,0x62
MOV RAX,qword ptr [RSP]
LEA RBX,[RAX + RCX*0x1]
MOVZX ECX,word ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [0x0016dfa8]
MOVSS XMM5,dword ptr [RAX + RCX*0x4]
MOV R14,RDI
XOR R15D,R15D
LAB_00133679:
MOV EBP,dword ptr [RBX + R15*0x4 + 0x42]
MOV ECX,EBP
SHR ECX,0x1c
XORPS XMM6,XMM6
CVTSI2SS XMM6,ECX
ADDSS XMM6,XMM0
MULSS XMM6,XMM5
MULSS XMM6,XMM0
SHUFPS XMM6,XMM6,0x0
MOV R12,R14
XOR ECX,ECX
LAB_0013369f:
MOV R9D,EBP
SHR R9D,CL
MOVZX EAX,byte ptr [R12 + -0x1]
MOVZX R13D,byte ptr [R12]
AND R9D,0x7f
MOVZX R9D,byte ptr [R9 + R11*0x1]
MOVD XMM7,R9D
PUNPCKLBW XMM7,XMM7
PSHUFLW XMM7,XMM7,0x0
MOVD XMM8,dword ptr [R10 + RAX*0x4]
PUNPCKLBW XMM8,XMM1
PUNPCKLWD XMM8,XMM1
CVTDQ2PS XMM8,XMM8
MULPS XMM8,XMM6
PUNPCKLBW XMM7,XMM7
PUNPCKLWD XMM7,XMM7
MOVDQA XMM9,XMM2
PAND XMM9,XMM7
PCMPEQB XMM9,XMM1
MOVAPS XMM10,XMM8
XORPS XMM10,XMM3
ANDPS XMM8,XMM9
ANDNPS XMM9,XMM10
ORPS XMM9,XMM8
MOVUPS xmmword ptr [RSI],XMM9
MOVD XMM8,dword ptr [R10 + R13*0x4]
PUNPCKLBW XMM8,XMM1
PUNPCKLWD XMM8,XMM1
CVTDQ2PS XMM8,XMM8
MULPS XMM8,XMM6
PAND XMM7,XMM4
PCMPEQB XMM7,XMM1
MOVAPS XMM9,XMM8
XORPS XMM9,XMM3
ANDPS XMM8,XMM7
ANDNPS XMM7,XMM9
ORPS XMM7,XMM8
MOVUPS xmmword ptr [RSI + 0x10],XMM7
ADD RSI,0x20
ADD RCX,0x7
ADD R12,0x2
CMP RCX,0x1c
JNZ 0x0013369f
INC R15
ADD R14,0x8
CMP R15,0x8
JNZ 0x00133679
INC R8
ADD RDI,0x62
CMP R8,RDX
JNZ 0x00133657
LAB_0013377d:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013378c:
LEA RDI,[0x15c0dc]
LEA RSI,[0x15bcf4]
LEA RCX,[0x15c64b]
MOV EDX,0x8ed
CALL 0x00116b00
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void dequantize_row_iq3_xxs(long param_1,uint *param_2,long param_3)
{
float fVar1;
byte bVar2;
uint uVar3;
int4 uVar4;
int1 auVar5 [13];
int1 auVar6 [13];
int1 auVar7 [13];
int1 auVar8 [13];
int1 auVar9 [13];
int1 auVar10 [13];
ulong uVar11;
int6 uVar12;
int1 auVar13 [13];
int1 auVar14 [14];
int1 auVar15 [12];
unkbyte10 Var16;
int1 auVar17 [13];
uint uVar18;
uint uVar19;
uint uVar20;
uint uVar21;
float fVar22;
long lVar23;
byte *pbVar24;
long lVar25;
byte *pbVar26;
byte *pbVar27;
long lVar28;
int1 uVar32;
int1 auVar29 [16];
int1 auVar34 [16];
float fVar38;
uint uVar39;
uint uVar55;
int1 auVar41 [16];
int1 auVar42 [16];
int1 auVar50 [16];
int1 auVar53 [16];
float fVar56;
float fVar57;
float fVar58;
float fVar59;
int1 auVar60 [12];
int1 auVar30 [16];
int1 auVar31 [16];
int2 uVar33;
int1 auVar35 [16];
int1 auVar36 [16];
int1 auVar37 [16];
int1 auVar43 [16];
int1 auVar40 [12];
int1 auVar44 [16];
int1 auVar45 [16];
int1 auVar51 [16];
int1 auVar46 [16];
int1 auVar47 [16];
int1 auVar52 [16];
int1 auVar54 [16];
int1 auVar48 [16];
int1 auVar49 [16];
int1 auVar61 [16];
fVar22 = DAT_0014c0fc;
uVar21 = _UNK_0014c08c;
uVar20 = _UNK_0014c088;
uVar19 = _UNK_0014c084;
uVar18 = _DAT_0014c080;
if ((char)param_3 == '\0') {
if (0 < param_3 >> 8) {
pbVar24 = (byte *)(param_1 + 3);
lVar25 = 0;
uVar32 = (int1)((uint)DAT_00151070 >> 0x18);
uVar33 = CONCAT11(uVar32,uVar32);
uVar32 = (int1)((uint)DAT_00151070 >> 0x10);
uVar4 = CONCAT31(CONCAT21(uVar33,uVar32),uVar32);
uVar32 = (int1)((uint)DAT_00151070 >> 8);
uVar12 = CONCAT51(CONCAT41(uVar4,uVar32),uVar32);
auVar29._0_2_ = CONCAT11((char)DAT_00151070,(char)DAT_00151070);
uVar11 = CONCAT62(uVar12,auVar29._0_2_);
auVar31._8_4_ = 0;
auVar31._0_8_ = uVar11;
auVar31._12_2_ = uVar33;
auVar31._14_2_ = uVar33;
uVar33 = (int2)uVar4;
auVar30._12_4_ = auVar31._12_4_;
auVar30._8_2_ = 0;
auVar30._0_8_ = uVar11;
auVar30._10_2_ = uVar33;
auVar41._10_6_ = auVar30._10_6_;
auVar41._8_2_ = uVar33;
auVar41._0_8_ = uVar11;
uVar33 = (int2)uVar12;
auVar29._8_8_ = auVar41._8_8_;
auVar29._6_2_ = uVar33;
auVar29._4_2_ = uVar33;
auVar29._2_2_ = auVar29._0_2_;
uVar32 = (int1)((uint)DAT_00151080 >> 0x18);
uVar33 = CONCAT11(uVar32,uVar32);
uVar32 = (int1)((uint)DAT_00151080 >> 0x10);
uVar4 = CONCAT31(CONCAT21(uVar33,uVar32),uVar32);
uVar32 = (int1)((uint)DAT_00151080 >> 8);
uVar12 = CONCAT51(CONCAT41(uVar4,uVar32),uVar32);
auVar34._0_2_ = CONCAT11((char)DAT_00151080,(char)DAT_00151080);
uVar11 = CONCAT62(uVar12,auVar34._0_2_);
auVar37._8_4_ = 0;
auVar37._0_8_ = uVar11;
auVar37._12_2_ = uVar33;
auVar37._14_2_ = uVar33;
uVar33 = (int2)uVar4;
auVar36._12_4_ = auVar37._12_4_;
auVar36._8_2_ = 0;
auVar36._0_8_ = uVar11;
auVar36._10_2_ = uVar33;
auVar35._10_6_ = auVar36._10_6_;
auVar35._8_2_ = uVar33;
auVar35._0_8_ = uVar11;
uVar33 = (int2)uVar12;
auVar34._8_8_ = auVar35._8_8_;
auVar34._6_2_ = uVar33;
auVar34._4_2_ = uVar33;
auVar34._2_2_ = auVar34._0_2_;
do {
fVar1 = *(float *)(PTR_ggml_table_f32_f16_0016dfa8 +
(ulong)*(ushort *)(param_1 + lVar25 * 0x62) * 4);
lVar28 = 0;
pbVar27 = pbVar24;
do {
uVar3 = *(uint *)(param_1 + lVar25 * 0x62 + 0x42 + lVar28 * 4);
fVar38 = ((float)(uVar3 >> 0x1c) + fVar22) * fVar1 * fVar22;
lVar23 = 0;
pbVar26 = pbVar27;
do {
bVar2 = *pbVar26;
auVar41 = ZEXT216(CONCAT11(ksigns_iq2xs[uVar3 >> ((byte)lVar23 & 0x1f) & 0x7f],
ksigns_iq2xs[uVar3 >> ((byte)lVar23 & 0x1f) & 0x7f]));
auVar41 = pshuflw(auVar41,auVar41,0);
uVar4 = *(int4 *)(iq3xxs_grid + (ulong)pbVar26[-1] * 4);
uVar11 = (ulong)(ushort)uVar4 & 0xffffffffffff00ff;
auVar5._8_4_ = 0;
auVar5._0_8_ = uVar11;
auVar5[0xc] = (char)((uint)uVar4 >> 0x18);
auVar6[8] = (char)((uint)uVar4 >> 0x10);
auVar6._0_8_ = uVar11;
auVar6[9] = 0;
auVar6._10_3_ = auVar5._10_3_;
auVar13._5_8_ = 0;
auVar13._0_5_ = auVar6._8_5_;
auVar7[4] = (char)((uint)uVar4 >> 8);
auVar7._0_4_ = (int)uVar11;
auVar7[5] = 0;
auVar7._6_7_ = SUB137(auVar13 << 0x40,6);
fVar56 = (float)(int)uVar11 * fVar38;
fVar57 = (float)auVar7._4_4_ * fVar38;
fVar58 = (float)auVar6._8_4_ * fVar38;
fVar59 = (float)(uint3)(auVar5._10_3_ >> 0x10) * fVar38;
auVar49._0_14_ = auVar41._0_14_;
auVar49[0xe] = auVar41[7];
auVar49[0xf] = auVar41[7];
auVar48._14_2_ = auVar49._14_2_;
auVar48._0_13_ = auVar41._0_13_;
auVar48[0xd] = auVar41[6];
auVar47._13_3_ = auVar48._13_3_;
auVar47._0_12_ = auVar41._0_12_;
auVar47[0xc] = auVar41[6];
auVar46._12_4_ = auVar47._12_4_;
auVar46._0_11_ = auVar41._0_11_;
auVar46[0xb] = auVar41[5];
auVar45._11_5_ = auVar46._11_5_;
auVar45._0_10_ = auVar41._0_10_;
auVar45[10] = auVar41[5];
auVar44._10_6_ = auVar45._10_6_;
auVar44._0_9_ = auVar41._0_9_;
auVar44[9] = auVar41[4];
auVar43._9_7_ = auVar44._9_7_;
auVar43._0_8_ = auVar41._0_8_;
auVar43[8] = auVar41[4];
Var16 = CONCAT91(CONCAT81(auVar43._8_8_,auVar41[3]),auVar41[3]);
auVar15._2_10_ = Var16;
auVar15[1] = auVar41[2];
auVar15[0] = auVar41[2];
auVar14._2_12_ = auVar15;
auVar14[1] = auVar41[1];
auVar14[0] = auVar41[1];
auVar42._0_2_ = CONCAT11(auVar41[0],auVar41[0]);
auVar42._2_14_ = auVar14;
uVar33 = (int2)Var16;
auVar52._0_12_ = auVar42._0_12_;
auVar52._12_2_ = uVar33;
auVar52._14_2_ = uVar33;
auVar51._12_4_ = auVar52._12_4_;
auVar51._0_10_ = auVar42._0_10_;
auVar51._10_2_ = auVar15._0_2_;
auVar50._10_6_ = auVar51._10_6_;
auVar50._0_8_ = auVar42._0_8_;
auVar50._8_2_ = auVar15._0_2_;
auVar53._8_8_ = auVar50._8_8_;
auVar53._6_2_ = auVar14._0_2_;
auVar53._4_2_ = auVar14._0_2_;
auVar53._2_2_ = auVar42._0_2_;
auVar53._0_2_ = auVar42._0_2_;
auVar41 = auVar29 & auVar53;
uVar39 = CONCAT13(-(auVar41[3] == '\0'),
CONCAT12(-(auVar41[2] == '\0'),
CONCAT11(-(auVar41[1] == '\0'),-(auVar41[0] == '\0'))));
auVar60._0_8_ =
CONCAT17(-(auVar41[7] == '\0'),
CONCAT16(-(auVar41[6] == '\0'),
CONCAT15(-(auVar41[5] == '\0'),
CONCAT14(-(auVar41[4] == '\0'),uVar39))));
auVar60[8] = -(auVar41[8] == '\0');
auVar60[9] = -(auVar41[9] == '\0');
auVar60[10] = -(auVar41[10] == '\0');
auVar60[0xb] = -(auVar41[0xb] == '\0');
auVar61[0xc] = -(auVar41[0xc] == '\0');
auVar61._0_12_ = auVar60;
auVar61[0xd] = -(auVar41[0xd] == '\0');
auVar61[0xe] = -(auVar41[0xe] == '\0');
auVar61[0xf] = -(auVar41[0xf] == '\0');
uVar55 = (uint)((ulong)auVar60._0_8_ >> 0x20);
*param_2 = ~uVar39 & ((uint)fVar56 ^ uVar18) | (uint)fVar56 & uVar39;
param_2[1] = ~uVar55 & ((uint)fVar57 ^ uVar19) | (uint)fVar57 & uVar55;
param_2[2] = ~auVar60._8_4_ & ((uint)fVar58 ^ uVar20) | (uint)fVar58 & auVar60._8_4_;
param_2[3] = ~auVar61._12_4_ & ((uint)fVar59 ^ uVar21) | (uint)fVar59 & auVar61._12_4_;
uVar4 = *(int4 *)(iq3xxs_grid + (ulong)bVar2 * 4);
uVar11 = (ulong)(ushort)uVar4 & 0xffffffffffff00ff;
auVar8._8_4_ = 0;
auVar8._0_8_ = uVar11;
auVar8[0xc] = (char)((uint)uVar4 >> 0x18);
auVar9[8] = (char)((uint)uVar4 >> 0x10);
auVar9._0_8_ = uVar11;
auVar9[9] = 0;
auVar9._10_3_ = auVar8._10_3_;
auVar17._5_8_ = 0;
auVar17._0_5_ = auVar9._8_5_;
auVar10[4] = (char)((uint)uVar4 >> 8);
auVar10._0_4_ = (int)uVar11;
auVar10[5] = 0;
auVar10._6_7_ = SUB137(auVar17 << 0x40,6);
fVar56 = (float)(int)uVar11 * fVar38;
fVar57 = (float)auVar10._4_4_ * fVar38;
fVar58 = (float)auVar9._8_4_ * fVar38;
fVar59 = (float)(uint3)(auVar8._10_3_ >> 0x10) * fVar38;
auVar53 = auVar53 & auVar34;
uVar39 = CONCAT13(-(auVar53[3] == '\0'),
CONCAT12(-(auVar53[2] == '\0'),
CONCAT11(-(auVar53[1] == '\0'),-(auVar53[0] == '\0'))));
auVar40._0_8_ =
CONCAT17(-(auVar53[7] == '\0'),
CONCAT16(-(auVar53[6] == '\0'),
CONCAT15(-(auVar53[5] == '\0'),
CONCAT14(-(auVar53[4] == '\0'),uVar39))));
auVar40[8] = -(auVar53[8] == '\0');
auVar40[9] = -(auVar53[9] == '\0');
auVar40[10] = -(auVar53[10] == '\0');
auVar40[0xb] = -(auVar53[0xb] == '\0');
auVar54[0xc] = -(auVar53[0xc] == '\0');
auVar54._0_12_ = auVar40;
auVar54[0xd] = -(auVar53[0xd] == '\0');
auVar54[0xe] = -(auVar53[0xe] == '\0');
auVar54[0xf] = -(auVar53[0xf] == '\0');
uVar55 = (uint)((ulong)auVar40._0_8_ >> 0x20);
param_2[4] = ~uVar39 & ((uint)fVar56 ^ uVar18) | (uint)fVar56 & uVar39;
param_2[5] = ~uVar55 & ((uint)fVar57 ^ uVar19) | (uint)fVar57 & uVar55;
param_2[6] = ~auVar40._8_4_ & ((uint)fVar58 ^ uVar20) | (uint)fVar58 & auVar40._8_4_;
param_2[7] = ~auVar54._12_4_ & ((uint)fVar59 ^ uVar21) | (uint)fVar59 & auVar54._12_4_;
param_2 = param_2 + 8;
lVar23 = lVar23 + 7;
pbVar26 = pbVar26 + 2;
} while (lVar23 != 0x1c);
lVar28 = lVar28 + 1;
pbVar27 = pbVar27 + 8;
} while (lVar28 != 8);
lVar25 = lVar25 + 1;
pbVar24 = pbVar24 + 0x62;
} while (lVar25 != param_3 >> 8);
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0x8ed,
"void dequantize_row_iq3_xxs(const block_iq3_xxs *restrict, float *restrict, int64_t)"
);
}
| |
35,974 | link_block | eloqsql/mysys/mf_keycache.c | static void link_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block,
my_bool hot, my_bool at_end)
{
BLOCK_LINK *ins;
BLOCK_LINK **pins;
DBUG_ASSERT((block->status & ~BLOCK_CHANGED) == (BLOCK_READ | BLOCK_IN_USE));
DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/
DBUG_ASSERT(!block->requests);
DBUG_ASSERT(block->prev_changed && *block->prev_changed == block);
DBUG_ASSERT(!block->next_used);
DBUG_ASSERT(!block->prev_used);
if (!hot && keycache->waiting_for_block.last_thread)
{
/* Signal that in the LRU warm sub-chain an available block has appeared */
struct st_my_thread_var *last_thread=
keycache->waiting_for_block.last_thread;
struct st_my_thread_var *first_thread= last_thread->next;
struct st_my_thread_var *next_thread= first_thread;
HASH_LINK *hash_link= (HASH_LINK *) first_thread->keycache_link;
struct st_my_thread_var *thread;
do
{
thread= next_thread;
next_thread= thread->next;
/*
We notify about the event all threads that ask
for the same page as the first thread in the queue
*/
if ((HASH_LINK *) thread->keycache_link == hash_link)
{
KEYCACHE_DBUG_PRINT("link_block: signal",
("thread %ld", (ulong) thread->id));
keycache_pthread_cond_signal(&thread->suspend);
unlink_from_queue(&keycache->waiting_for_block, thread);
block->requests++;
}
}
while (thread != last_thread);
hash_link->block= block;
/*
NOTE: We assigned the block to the hash_link and signalled the
requesting thread(s). But it is possible that other threads runs
first. These threads see the hash_link assigned to a block which
is assigned to another hash_link and not marked BLOCK_IN_SWITCH.
This can be a problem for functions that do not select the block
via its hash_link: flush and free. They do only see a block which
is in a "normal" state and don't know that it will be evicted soon.
We cannot set BLOCK_IN_SWITCH here because only one of the
requesting threads must handle the eviction. All others must wait
for it to complete. If we set the flag here, the threads would not
know who is in charge of the eviction. Without the flag, the first
thread takes the stick and sets the flag.
But we need to note in the block that is has been selected for
eviction. It must not be freed. The evicting thread will not
expect the block in the free list. Before freeing we could also
check if block->requests > 1. But I think including another flag
in the check of block->status is slightly more efficient and
probably easier to read.
*/
block->status|= BLOCK_IN_EVICTION;
KEYCACHE_THREAD_TRACE("link_block: after signaling");
#if defined(KEYCACHE_DEBUG)
KEYCACHE_DBUG_PRINT("link_block",
("linked,unlinked block %u status=%x #requests=%u #available=%u",
BLOCK_NUMBER(block), block->status,
block->requests, keycache->blocks_available));
#endif
return;
}
pins= hot ? &keycache->used_ins : &keycache->used_last;
ins= *pins;
if (ins)
{
ins->next_used->prev_used= &block->next_used;
block->next_used= ins->next_used;
block->prev_used= &ins->next_used;
ins->next_used= block;
if (at_end)
*pins= block;
}
else
{
/* The LRU ring is empty. Let the block point to itself. */
keycache->used_last= keycache->used_ins= block->next_used= block;
block->prev_used= &block->next_used;
}
KEYCACHE_THREAD_TRACE("link_block");
#if defined(KEYCACHE_DEBUG)
keycache->blocks_available++;
KEYCACHE_DBUG_PRINT("link_block",
("linked block %u:%1u status=%x #requests=%u #available=%u",
BLOCK_NUMBER(block), at_end, block->status,
block->requests, keycache->blocks_available));
KEYCACHE_DBUG_ASSERT((ulong) keycache->blocks_available <=
keycache->blocks_used);
#endif
} | O0 | c | link_block:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %cl, %al
movb %dl, %cl
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %cl, -0x11(%rbp)
movb %al, -0x12(%rbp)
jmp 0xed37c
jmp 0xed37e
jmp 0xed380
jmp 0xed382
jmp 0xed384
jmp 0xed386
jmp 0xed388
jmp 0xed38a
jmp 0xed38c
jmp 0xed38e
jmp 0xed390
cmpb $0x0, -0x11(%rbp)
jne 0xed468
movq -0x8(%rbp), %rax
cmpq $0x0, 0x120(%rax)
je 0xed468
movq -0x8(%rbp), %rax
movq 0x120(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0xa8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x50(%rbp), %rax
movq 0xa8(%rax), %rax
cmpq -0x48(%rbp), %rax
jne 0xed43b
jmp 0xed40b
jmp 0xed40d
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
callq 0xed130
movq -0x8(%rbp), %rdi
addq $0x120, %rdi # imm = 0x120
movq -0x50(%rbp), %rsi
callq 0xed190
movq -0x10(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
jmp 0xed43d
movq -0x50(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0xed3e1
movq -0x10(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x50(%rax), %ecx
orl $0x80, %ecx
movl %ecx, 0x50(%rax)
jmp 0xed51d
movsbl -0x11(%rbp), %eax
cmpl $0x0, %eax
je 0xed481
movq -0x8(%rbp), %rax
addq $0xb8, %rax
movq %rax, -0x58(%rbp)
jmp 0xed48f
movq -0x8(%rbp), %rax
addq $0xb0, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xed4f0
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
cmpb $0x0, -0x12(%rbp)
je 0xed4ee
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0xed51d
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x8(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| link_block_0:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, cl
mov cl, dl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_11], cl
mov [rbp+var_12], al
jmp short $+2
loc_ED37C:
jmp short $+2
loc_ED37E:
jmp short $+2
loc_ED380:
jmp short $+2
loc_ED382:
jmp short $+2
loc_ED384:
jmp short $+2
loc_ED386:
jmp short $+2
loc_ED388:
jmp short $+2
loc_ED38A:
jmp short $+2
loc_ED38C:
jmp short $+2
loc_ED38E:
jmp short $+2
loc_ED390:
cmp [rbp+var_11], 0
jnz loc_ED468
mov rax, [rbp+var_8]
cmp qword ptr [rax+120h], 0
jz loc_ED468
mov rax, [rbp+var_8]
mov rax, [rax+120h]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax+88h]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
mov rax, [rax+0A8h]
mov [rbp+var_48], rax
loc_ED3E1:
mov rax, [rbp+var_40]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov rax, [rax+88h]
mov [rbp+var_40], rax
mov rax, [rbp+var_50]
mov rax, [rax+0A8h]
cmp rax, [rbp+var_48]
jnz short loc_ED43B
jmp short $+2
loc_ED40B:
jmp short $+2
loc_ED40D:
mov rdi, [rbp+var_50]
add rdi, 8
call inline_mysql_cond_signal_2
mov rdi, [rbp+var_8]
add rdi, 120h
mov rsi, [rbp+var_50]
call unlink_from_queue
mov rax, [rbp+var_10]
mov ecx, [rax+38h]
add ecx, 1
mov [rax+38h], ecx
loc_ED43B:
jmp short $+2
loc_ED43D:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_30]
jnz short loc_ED3E1
mov rcx, [rbp+var_10]
mov rax, [rbp+var_48]
mov [rax+10h], rcx
mov rax, [rbp+var_10]
mov ecx, [rax+50h]
or ecx, 80h
mov [rax+50h], ecx
jmp loc_ED51D
loc_ED468:
movsx eax, [rbp+var_11]
cmp eax, 0
jz short loc_ED481
mov rax, [rbp+var_8]
add rax, 0B8h
mov [rbp+var_58], rax
jmp short loc_ED48F
loc_ED481:
mov rax, [rbp+var_8]
add rax, 0B0h
mov [rbp+var_58], rax
loc_ED48F:
mov rax, [rbp+var_58]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jz short loc_ED4F0
mov rcx, [rbp+var_10]
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_20]
mov [rax], rcx
cmp [rbp+var_12], 0
jz short loc_ED4EE
mov rcx, [rbp+var_10]
mov rax, [rbp+var_28]
mov [rax], rcx
loc_ED4EE:
jmp short loc_ED51D
loc_ED4F0:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_8]
mov [rax+0B8h], rcx
mov rax, [rbp+var_8]
mov [rax+0B0h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_10]
mov [rax+8], rcx
loc_ED51D:
add rsp, 60h
pop rbp
retn
| _QWORD * link_block_0(_QWORD *a1, long long a2, char a3, char a4)
{
_QWORD *result; // rax
_QWORD *v5; // [rsp+8h] [rbp-58h]
long long v6; // [rsp+10h] [rbp-50h]
long long v7; // [rsp+18h] [rbp-48h]
long long v8; // [rsp+20h] [rbp-40h]
long long v9; // [rsp+30h] [rbp-30h]
_QWORD *v10; // [rsp+40h] [rbp-20h]
if ( a3 || !a1[36] )
{
if ( a3 )
v5 = a1 + 23;
else
v5 = a1 + 22;
v10 = (_QWORD *)*v5;
if ( *v5 )
{
*(_QWORD *)(*v10 + 8LL) = a2;
*(_QWORD *)a2 = *v10;
*(_QWORD *)(a2 + 8) = v10;
result = v10;
*v10 = a2;
if ( a4 )
{
result = v5;
*v5 = a2;
}
}
else
{
*(_QWORD *)a2 = a2;
a1[23] = a2;
a1[22] = a2;
result = (_QWORD *)a2;
*(_QWORD *)(a2 + 8) = a2;
}
}
else
{
v9 = a1[36];
v8 = *(_QWORD *)(v9 + 136);
v7 = *(_QWORD *)(v8 + 168);
do
{
v6 = v8;
v8 = *(_QWORD *)(v8 + 136);
if ( *(_QWORD *)(v6 + 168) == v7 )
{
inline_mysql_cond_signal_2(v6 + 8);
unlink_from_queue(a1 + 36, v6);
++*(_DWORD *)(a2 + 56);
}
}
while ( v6 != v9 );
*(_QWORD *)(v7 + 16) = a2;
result = (_QWORD *)a2;
*(_DWORD *)(a2 + 80) |= 0x80u;
}
return result;
}
| link_block:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,CL
MOV CL,DL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV byte ptr [RBP + -0x11],CL
MOV byte ptr [RBP + -0x12],AL
JMP 0x001ed37c
LAB_001ed37c:
JMP 0x001ed37e
LAB_001ed37e:
JMP 0x001ed380
LAB_001ed380:
JMP 0x001ed382
LAB_001ed382:
JMP 0x001ed384
LAB_001ed384:
JMP 0x001ed386
LAB_001ed386:
JMP 0x001ed388
LAB_001ed388:
JMP 0x001ed38a
LAB_001ed38a:
JMP 0x001ed38c
LAB_001ed38c:
JMP 0x001ed38e
LAB_001ed38e:
JMP 0x001ed390
LAB_001ed390:
CMP byte ptr [RBP + -0x11],0x0
JNZ 0x001ed468
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x120],0x0
JZ 0x001ed468
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x120]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x88]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0xa8]
MOV qword ptr [RBP + -0x48],RAX
LAB_001ed3e1:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX + 0x88]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX + 0xa8]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x001ed43b
JMP 0x001ed40b
LAB_001ed40b:
JMP 0x001ed40d
LAB_001ed40d:
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,0x8
CALL 0x001ed130
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x120
MOV RSI,qword ptr [RBP + -0x50]
CALL 0x001ed190
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x38]
ADD ECX,0x1
MOV dword ptr [RAX + 0x38],ECX
LAB_001ed43b:
JMP 0x001ed43d
LAB_001ed43d:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001ed3e1
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x50]
OR ECX,0x80
MOV dword ptr [RAX + 0x50],ECX
JMP 0x001ed51d
LAB_001ed468:
MOVSX EAX,byte ptr [RBP + -0x11]
CMP EAX,0x0
JZ 0x001ed481
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0xb8
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001ed48f
LAB_001ed481:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0xb0
MOV qword ptr [RBP + -0x58],RAX
LAB_001ed48f:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001ed4f0
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
CMP byte ptr [RBP + -0x12],0x0
JZ 0x001ed4ee
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
LAB_001ed4ee:
JMP 0x001ed51d
LAB_001ed4f0:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xb8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xb0],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
LAB_001ed51d:
ADD RSP,0x60
POP RBP
RET
|
void link_block(long param_1,long *param_2,char param_3,char param_4)
{
long lVar1;
long lVar2;
long lVar3;
long *plVar4;
bool bVar5;
long *local_60;
long local_48;
if ((param_3 == '\0') && (*(long *)(param_1 + 0x120) != 0)) {
lVar1 = *(long *)(param_1 + 0x120);
local_48 = *(long *)(lVar1 + 0x88);
lVar2 = *(long *)(local_48 + 0xa8);
do {
lVar3 = *(long *)(local_48 + 0x88);
if (*(long *)(local_48 + 0xa8) == lVar2) {
inline_mysql_cond_signal(local_48 + 8);
unlink_from_queue(param_1 + 0x120,local_48);
*(int *)(param_2 + 7) = (int)param_2[7] + 1;
}
bVar5 = local_48 != lVar1;
local_48 = lVar3;
} while (bVar5);
*(long **)(lVar2 + 0x10) = param_2;
*(uint *)(param_2 + 10) = *(uint *)(param_2 + 10) | 0x80;
}
else {
if (param_3 == '\0') {
local_60 = (long *)(param_1 + 0xb0);
}
else {
local_60 = (long *)(param_1 + 0xb8);
}
plVar4 = (long *)*local_60;
if (plVar4 == (long *)0x0) {
*param_2 = (long)param_2;
*(long **)(param_1 + 0xb8) = param_2;
*(long **)(param_1 + 0xb0) = param_2;
param_2[1] = (long)param_2;
}
else {
*(long **)(*plVar4 + 8) = param_2;
*param_2 = *plVar4;
param_2[1] = (long)plVar4;
*plVar4 = (long)param_2;
if (param_4 != '\0') {
*local_60 = (long)param_2;
}
}
}
return;
}
| |
35,975 | stbi__get32le | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static stbi__uint32 stbi__get32le(stbi__context *s)
{
stbi__uint32 z = stbi__get16le(s);
z += (stbi__uint32)stbi__get16le(s) << 16;
return z;
} | O1 | c | stbi__get32le:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x35662
movzbl %al, %ebp
movq %rbx, %rdi
callq 0x35662
movzbl %al, %r14d
shll $0x8, %r14d
orl %ebp, %r14d
movq %rbx, %rdi
callq 0x35662
movzbl %al, %ebp
movq %rbx, %rdi
callq 0x35662
movzbl %al, %eax
shll $0x18, %eax
shll $0x10, %ebp
orl %eax, %ebp
orl %r14d, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
| stbi__get32le:
push rbp
push r14
push rbx
mov rbx, rdi
call stbi__get8
movzx ebp, al
mov rdi, rbx
call stbi__get8
movzx r14d, al
shl r14d, 8
or r14d, ebp
mov rdi, rbx
call stbi__get8
movzx ebp, al
mov rdi, rbx
call stbi__get8
movzx eax, al
shl eax, 18h
shl ebp, 10h
or ebp, eax
or ebp, r14d
mov eax, ebp
pop rbx
pop r14
pop rbp
retn
| long long stbi__get32le(long long a1)
{
int v1; // ebp
int v2; // r14d
int v3; // ebp
v1 = (unsigned __int8)stbi__get8(a1);
v2 = v1 | ((unsigned __int8)stbi__get8(a1) << 8);
v3 = (unsigned __int8)stbi__get8(a1);
return v2 | ((unsigned __int8)stbi__get8(a1) << 24) | (unsigned int)(v3 << 16);
}
| stbi__get32le:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x00135662
MOVZX EBP,AL
MOV RDI,RBX
CALL 0x00135662
MOVZX R14D,AL
SHL R14D,0x8
OR R14D,EBP
MOV RDI,RBX
CALL 0x00135662
MOVZX EBP,AL
MOV RDI,RBX
CALL 0x00135662
MOVZX EAX,AL
SHL EAX,0x18
SHL EBP,0x10
OR EBP,EAX
OR EBP,R14D
MOV EAX,EBP
POP RBX
POP R14
POP RBP
RET
|
uint stbi__get32le(int8 param_1)
{
int1 uVar1;
int1 uVar2;
byte bVar3;
byte bVar4;
uVar1 = stbi__get8();
uVar2 = stbi__get8(param_1);
bVar3 = stbi__get8(param_1);
bVar4 = stbi__get8(param_1);
return (uint)bVar3 << 0x10 | (uint)bVar4 << 0x18 | (uint)CONCAT11(uVar2,uVar1);
}
| |
35,976 | translog_file_init | eloqsql/storage/maria/ma_loghandler.c | static void translog_file_init(TRANSLOG_FILE *file, uint32 number,
my_bool is_sync)
{
pagecache_file_set_null_hooks(&file->handler);
file->handler.post_read_hook= translog_page_validator;
file->handler.flush_log_callback= maria_flush_log_for_page_none;
file->handler.callback_data= (uchar*)file;
file->number= number;
file->was_recovered= 0;
file->is_sync= is_sync;
} | O0 | c | translog_file_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0xb7780
movq -0x8(%rbp), %rax
leaq 0x6994(%rip), %rcx # 0xae550
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
leaq 0x1b1e5(%rip), %rcx # 0xc2db0
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x50(%rax)
movb -0xd(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x51(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| translog_file_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_D], al
mov rdi, [rbp+var_8]
add rdi, 8
call pagecache_file_set_null_hooks
mov rax, [rbp+var_8]
lea rcx, translog_page_validator
mov [rax+28h], rcx
mov rax, [rbp+var_8]
lea rcx, maria_flush_log_for_page_none
mov [rax+40h], rcx
mov rcx, [rbp+var_8]
mov rax, [rbp+var_8]
mov [rax+48h], rcx
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rax], ecx
mov rax, [rbp+var_8]
mov byte ptr [rax+50h], 0
mov cl, [rbp+var_D]
mov rax, [rbp+var_8]
mov [rax+51h], cl
add rsp, 10h
pop rbp
retn
| long long translog_file_init(long long a1, int a2, char a3)
{
long long result; // rax
pagecache_file_set_null_hooks(a1 + 8);
*(_QWORD *)(a1 + 40) = translog_page_validator;
*(_QWORD *)(a1 + 64) = maria_flush_log_for_page_none;
*(_QWORD *)(a1 + 72) = a1;
*(_DWORD *)a1 = a2;
*(_BYTE *)(a1 + 80) = 0;
result = a1;
*(_BYTE *)(a1 + 81) = a3;
return result;
}
| translog_file_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV AL,DL
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV byte ptr [RBP + -0xd],AL
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8
CALL 0x001b7780
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1ae550]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1c2db0]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x48],RCX
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x50],0x0
MOV CL,byte ptr [RBP + -0xd]
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x51],CL
ADD RSP,0x10
POP RBP
RET
|
void translog_file_init(int4 *param_1,int4 param_2,int1 param_3)
{
pagecache_file_set_null_hooks(param_1 + 2);
*(code **)(param_1 + 10) = translog_page_validator;
*(code **)(param_1 + 0x10) = maria_flush_log_for_page_none;
*(int4 **)(param_1 + 0x12) = param_1;
*param_1 = param_2;
*(int1 *)(param_1 + 0x14) = 0;
*(int1 *)((long)param_1 + 0x51) = param_3;
return;
}
| |
35,977 | PycBuffer::getBuffer(int, void*) | Pyarmor-Static-Unpack-1shot/data.cpp | int PycBuffer::getBuffer(int bytes, void* buffer)
{
if (m_pos + bytes > m_size)
bytes = m_size - m_pos;
if (bytes != 0)
memcpy(buffer, (m_buffer + m_pos), bytes);
m_pos += bytes;
return bytes;
} | O3 | cpp | PycBuffer::getBuffer(int, void*):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x10(%rdi), %ecx
movl 0x14(%rdi), %eax
leal (%rax,%rsi), %edi
movl %ecx, %r14d
subl %eax, %r14d
cmpl %ecx, %edi
cmovlel %esi, %r14d
testl %r14d, %r14d
je 0x2fcea
movslq %eax, %rsi
addq 0x8(%rbx), %rsi
movslq %r14d, %rax
movq %rdx, %rdi
movq %rax, %rdx
callq 0x71c0
movl 0x14(%rbx), %eax
addl %r14d, %eax
movl %eax, 0x14(%rbx)
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
| _ZN9PycBuffer9getBufferEiPv:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov ecx, [rdi+10h]
mov eax, [rdi+14h]
lea edi, [rax+rsi]
mov r14d, ecx
sub r14d, eax
cmp edi, ecx
cmovle r14d, esi
test r14d, r14d
jz short loc_2FCEA
movsxd rsi, eax
add rsi, [rbx+8]
movsxd rax, r14d
mov rdi, rdx
mov rdx, rax
call _memcpy
mov eax, [rbx+14h]
loc_2FCEA:
add eax, r14d
mov [rbx+14h], eax
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
| long long PycBuffer::getBuffer(PycBuffer *this, unsigned int a2, void *a3)
{
int v3; // ecx
int v4; // eax
unsigned int v5; // r14d
v3 = *((_DWORD *)this + 4);
v4 = *((_DWORD *)this + 5);
v5 = v3 - v4;
if ( (int)(v4 + a2) <= v3 )
v5 = a2;
if ( v5 )
{
memcpy(a3, *((_QWORD *)this + 1) + v4, (int)v5);
v4 = *((_DWORD *)this + 5);
}
*((_DWORD *)this + 5) = v5 + v4;
return v5;
}
| getBuffer:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV ECX,dword ptr [RDI + 0x10]
MOV EAX,dword ptr [RDI + 0x14]
LEA EDI,[RAX + RSI*0x1]
MOV R14D,ECX
SUB R14D,EAX
CMP EDI,ECX
CMOVLE R14D,ESI
TEST R14D,R14D
JZ 0x0012fcea
MOVSXD RSI,EAX
ADD RSI,qword ptr [RBX + 0x8]
MOVSXD RAX,R14D
MOV RDI,RDX
MOV RDX,RAX
CALL 0x001071c0
MOV EAX,dword ptr [RBX + 0x14]
LAB_0012fcea:
ADD EAX,R14D
MOV dword ptr [RBX + 0x14],EAX
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
|
/* PycBuffer::getBuffer(int, void*) */
int __thiscall PycBuffer::getBuffer(PycBuffer *this,int param_1,void *param_2)
{
int iVar1;
int iVar2;
iVar1 = *(int *)(this + 0x14);
iVar2 = *(int *)(this + 0x10) - iVar1;
if (iVar1 + param_1 <= *(int *)(this + 0x10)) {
iVar2 = param_1;
}
if (iVar2 != 0) {
memcpy(param_2,(void *)((long)iVar1 + *(long *)(this + 8)),(long)iVar2);
iVar1 = *(int *)(this + 0x14);
}
*(int *)(this + 0x14) = iVar1 + iVar2;
return iVar2;
}
| |
35,978 | my_atod | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | double my_atod(const char *number, const char *end, int *error)
{
double val= 0.0;
char buffer[MAX_DBL_STR + 1];
int len= (int)(end - number);
*error= errno= 0;
if (len > MAX_DBL_STR)
{
*error= 1;
len= MAX_DBL_STR;
}
memcpy(buffer, number, len);
buffer[len]= '\0';
val= strtod(buffer, NULL);
if (errno)
*error= errno;
return val;
} | O0 | c | my_atod:
pushq %rbp
movq %rsp, %rbp
subq $0x470, %rsp # imm = 0x470
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x448(%rbp)
movq %rsi, -0x450(%rbp)
movq %rdx, -0x458(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x460(%rbp)
movq -0x450(%rbp), %rax
movq -0x448(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x464(%rbp)
callq 0x13050
movl $0x0, (%rax)
movq -0x458(%rbp), %rax
movl $0x0, (%rax)
cmpl $0x435, -0x464(%rbp) # imm = 0x435
jle 0x2e06a
movq -0x458(%rbp), %rax
movl $0x1, (%rax)
movl $0x435, -0x464(%rbp) # imm = 0x435
leaq -0x440(%rbp), %rdi
movq -0x448(%rbp), %rsi
movslq -0x464(%rbp), %rdx
callq 0x13360
movslq -0x464(%rbp), %rax
movb $0x0, -0x440(%rbp,%rax)
leaq -0x440(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x13330
movsd %xmm0, -0x460(%rbp)
callq 0x13050
cmpl $0x0, (%rax)
je 0x2e0c5
callq 0x13050
movl (%rax), %ecx
movq -0x458(%rbp), %rax
movl %ecx, (%rax)
movsd -0x460(%rbp), %xmm0
movsd %xmm0, -0x470(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2e0f8
movsd -0x470(%rbp), %xmm0
addq $0x470, %rsp # imm = 0x470
popq %rbp
retq
callq 0x134b0
nopl (%rax)
| my_atod:
push rbp
mov rbp, rsp
sub rsp, 470h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_448], rdi
mov [rbp+var_450], rsi
mov [rbp+var_458], rdx
xorps xmm0, xmm0
movsd [rbp+var_460], xmm0
mov rax, [rbp+var_450]
mov rcx, [rbp+var_448]
sub rax, rcx
mov [rbp+var_464], eax
call ___errno_location
mov dword ptr [rax], 0
mov rax, [rbp+var_458]
mov dword ptr [rax], 0
cmp [rbp+var_464], 435h
jle short loc_2E06A
mov rax, [rbp+var_458]
mov dword ptr [rax], 1
mov [rbp+var_464], 435h
loc_2E06A:
lea rdi, [rbp+var_440]
mov rsi, [rbp+var_448]
movsxd rdx, [rbp+var_464]
call _memcpy
movsxd rax, [rbp+var_464]
mov [rbp+rax+var_440], 0
lea rdi, [rbp+var_440]
xor eax, eax
mov esi, eax
call _strtod
movsd [rbp+var_460], xmm0
call ___errno_location
cmp dword ptr [rax], 0
jz short loc_2E0C5
call ___errno_location
mov ecx, [rax]
mov rax, [rbp+var_458]
mov [rax], ecx
loc_2E0C5:
movsd xmm0, [rbp+var_460]
movsd [rbp+var_470], xmm0
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2E0F8
movsd xmm0, [rbp+var_470]
add rsp, 470h
pop rbp
retn
loc_2E0F8:
call ___stack_chk_fail
| double my_atod(long long a1, int a2, _DWORD *a3)
{
int v4; // [rsp+Ch] [rbp-464h]
double v5; // [rsp+10h] [rbp-460h]
_BYTE v7[1080]; // [rsp+30h] [rbp-440h] BYREF
unsigned long long v8; // [rsp+468h] [rbp-8h]
v8 = __readfsqword(0x28u);
v4 = a2 - a1;
*(_DWORD *)__errno_location() = 0;
*a3 = 0;
if ( a2 - (int)a1 > 1077 )
{
*a3 = 1;
v4 = 1077;
}
memcpy(v7, a1, v4);
v7[v4] = 0;
v5 = strtod(v7, 0LL);
if ( *(_DWORD *)__errno_location() )
*a3 = *(_DWORD *)__errno_location();
return v5;
}
| my_atod:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x470
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x448],RDI
MOV qword ptr [RBP + -0x450],RSI
MOV qword ptr [RBP + -0x458],RDX
XORPS XMM0,XMM0
MOVSD qword ptr [RBP + -0x460],XMM0
MOV RAX,qword ptr [RBP + -0x450]
MOV RCX,qword ptr [RBP + -0x448]
SUB RAX,RCX
MOV dword ptr [RBP + -0x464],EAX
CALL 0x00113050
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x458]
MOV dword ptr [RAX],0x0
CMP dword ptr [RBP + -0x464],0x435
JLE 0x0012e06a
MOV RAX,qword ptr [RBP + -0x458]
MOV dword ptr [RAX],0x1
MOV dword ptr [RBP + -0x464],0x435
LAB_0012e06a:
LEA RDI,[RBP + -0x440]
MOV RSI,qword ptr [RBP + -0x448]
MOVSXD RDX,dword ptr [RBP + -0x464]
CALL 0x00113360
MOVSXD RAX,dword ptr [RBP + -0x464]
MOV byte ptr [RBP + RAX*0x1 + -0x440],0x0
LEA RDI,[RBP + -0x440]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00113330
MOVSD qword ptr [RBP + -0x460],XMM0
CALL 0x00113050
CMP dword ptr [RAX],0x0
JZ 0x0012e0c5
CALL 0x00113050
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x458]
MOV dword ptr [RAX],ECX
LAB_0012e0c5:
MOVSD XMM0,qword ptr [RBP + -0x460]
MOVSD qword ptr [RBP + -0x470],XMM0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012e0f8
MOVSD XMM0,qword ptr [RBP + -0x470]
ADD RSP,0x470
POP RBP
RET
LAB_0012e0f8:
CALL 0x001134b0
|
double my_atod(void *param_1,int param_2,int *param_3)
{
int *piVar1;
long in_FS_OFFSET;
double dVar2;
int local_46c;
char local_448 [1080];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_46c = param_2 - (int)param_1;
piVar1 = __errno_location();
*piVar1 = 0;
*param_3 = 0;
if (0x435 < local_46c) {
*param_3 = 1;
local_46c = 0x435;
}
memcpy(local_448,param_1,(long)local_46c);
local_448[local_46c] = '\0';
dVar2 = strtod(local_448,(char **)0x0);
piVar1 = __errno_location();
if (*piVar1 != 0) {
piVar1 = __errno_location();
*param_3 = *piVar1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return dVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
35,979 | my_atod | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | double my_atod(const char *number, const char *end, int *error)
{
double val= 0.0;
char buffer[MAX_DBL_STR + 1];
int len= (int)(end - number);
*error= errno= 0;
if (len > MAX_DBL_STR)
{
*error= 1;
len= MAX_DBL_STR;
}
memcpy(buffer, number, len);
buffer[len]= '\0';
val= strtod(buffer, NULL);
if (errno)
*error= errno;
return val;
} | O3 | c | my_atod:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x448, %rsp # imm = 0x448
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
subq %rdi, %r15
callq 0x13060
movq %rax, %r14
movl $0x0, (%rax)
xorl %eax, %eax
cmpl $0x436, %r15d # imm = 0x436
setge %al
movl %eax, (%rbx)
movslq %r15d, %rax
movl $0x435, %r15d # imm = 0x435
cmovlq %rax, %r15
leaq -0x470(%rbp), %r13
movl $0x436, %ecx # imm = 0x436
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x13770
movb $0x0, -0x470(%rbp,%r15)
movq %r13, %rdi
xorl %esi, %esi
callq 0x13350
movl (%r14), %eax
testl %eax, %eax
je 0x22f3e
movl %eax, (%rbx)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x22f5f
addq $0x448, %rsp # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x13500
| my_atod:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 448h
mov rbx, rdx
mov r15, rsi
mov r12, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
sub r15, rdi
call ___errno_location
mov r14, rax
mov dword ptr [rax], 0
xor eax, eax
cmp r15d, 436h
setnl al
mov [rbx], eax
movsxd rax, r15d
mov r15d, 435h
cmovl r15, rax
lea r13, [rbp+var_470]
mov ecx, 436h
mov rdi, r13
mov rsi, r12
mov rdx, r15
call ___memcpy_chk
mov [rbp+r15+var_470], 0
mov rdi, r13
xor esi, esi
call _strtod
mov eax, [r14]
test eax, eax
jz short loc_22F3E
mov [rbx], eax
loc_22F3E:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_22F5F
add rsp, 448h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_22F5F:
call ___stack_chk_fail
| unsigned long long my_atod(long long a1, int a2, _DWORD *a3)
{
_DWORD *v4; // r14
long long v5; // r15
_BYTE v7[1088]; // [rsp+0h] [rbp-470h] BYREF
unsigned long long v8; // [rsp+440h] [rbp-30h]
v8 = __readfsqword(0x28u);
v4 = (_DWORD *)__errno_location(a1);
*v4 = 0;
*a3 = a2 - (int)a1 >= 1078;
v5 = 1077LL;
if ( a2 - (int)a1 < 1078 )
v5 = a2 - (int)a1;
__memcpy_chk(v7, a1, v5, 1078LL);
v7[v5] = 0;
strtod(v7, 0LL);
if ( *v4 )
*a3 = *v4;
return __readfsqword(0x28u);
}
| my_atod:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x448
MOV RBX,RDX
MOV R15,RSI
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
SUB R15,RDI
CALL 0x00113060
MOV R14,RAX
MOV dword ptr [RAX],0x0
XOR EAX,EAX
CMP R15D,0x436
SETGE AL
MOV dword ptr [RBX],EAX
MOVSXD RAX,R15D
MOV R15D,0x435
CMOVL R15,RAX
LEA R13,[RBP + -0x470]
MOV ECX,0x436
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
CALL 0x00113770
MOV byte ptr [RBP + R15*0x1 + -0x470],0x0
MOV RDI,R13
XOR ESI,ESI
CALL 0x00113350
MOV EAX,dword ptr [R14]
TEST EAX,EAX
JZ 0x00122f3e
MOV dword ptr [RBX],EAX
LAB_00122f3e:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00122f5f
ADD RSP,0x448
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00122f5f:
CALL 0x00113500
|
void my_atod(int8 param_1,int param_2,uint *param_3)
{
uint *puVar1;
long lVar2;
long in_FS_OFFSET;
char local_478 [1088];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
param_2 = param_2 - (int)param_1;
puVar1 = (uint *)__errno_location();
*puVar1 = 0;
*param_3 = (uint)(0x435 < param_2);
lVar2 = 0x435;
if (param_2 < 0x436) {
lVar2 = (long)param_2;
}
__memcpy_chk(local_478,param_1,lVar2,0x436);
local_478[lVar2] = '\0';
strtod(local_478,(char **)0x0);
if (*puVar1 != 0) {
*param_3 = *puVar1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
35,980 | minja::ExpressionNode::~ExpressionNode() | monkey531[P]llama/common/./minja.hpp | ExpressionNode(const Location & location, std::shared_ptr<Expression> && e) : TemplateNode(location), expr(std::move(e)) {} | O3 | cpp | minja::ExpressionNode::~ExpressionNode():
pushq %rbx
movq %rdi, %rbx
leaq 0x8da3f(%rip), %rax # 0xef2c8
movq %rax, (%rdi)
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x6189a
callq 0x2f80e
leaq 0x8d747(%rip), %rax # 0xeefe8
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x618b3
popq %rbx
jmp 0x2f80e
popq %rbx
retq
nop
| _ZN5minja14ExpressionNodeD2Ev:
push rbx
mov rbx, rdi
lea rax, off_EF2C8
mov [rdi], rax
mov rdi, [rdi+28h]
test rdi, rdi
jz short loc_6189A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_6189A:
lea rax, off_EEFE8
mov [rbx], rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_618B3
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_618B3:
pop rbx
retn
| void minja::ExpressionNode::~ExpressionNode(minja::ExpressionNode *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &off_EF2C8;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 5);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &off_EEFE8;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
| ~ExpressionNode:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1ef2c8]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x28]
TEST RDI,RDI
JZ 0x0016189a
CALL 0x0012f80e
LAB_0016189a:
LEA RAX,[0x1eefe8]
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x001618b3
POP RBX
JMP 0x0012f80e
LAB_001618b3:
POP RBX
RET
|
/* minja::ExpressionNode::~ExpressionNode() */
void __thiscall minja::ExpressionNode::~ExpressionNode(ExpressionNode *this)
{
*(int ***)this = &PTR_do_render_001ef2c8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28));
}
*(int ***)this = &PTR___cxa_pure_virtual_001eefe8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10));
return;
}
return;
}
| |
35,981 | psi_mutex_lock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_mutex_lock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_LOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, FALSE, file, line);
# else
int result= pthread_mutex_lock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
} | O0 | c | psi_mutex_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1b82ee(%rip), %rax # 0x1ea0d8
movq (%rax), %rax
movq 0x190(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x25580
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x31e3d
leaq 0x1b82ae(%rip), %rax # 0x1ea0d8
movq (%rax), %rax
movq 0x198(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| psi_mutex_lock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+190h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+40h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
xor edx, edx
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_31E3D
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+198h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_31E3D:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_mutex_lock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[0] + 50))(
v6,
*(_QWORD *)(a1 + 64),
0LL,
a2,
a3);
v4 = pthread_mutex_lock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 51))(v5, v4);
return v4;
}
| psi_mutex_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x2ea0d8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x190]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00125580
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x00131e3d
LEA RAX,[0x2ea0d8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x198]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_00131e3d:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int psi_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
pthread_mutex_t *local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),0,param_2,param_3);
iVar1 = pthread_mutex_lock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
| |
35,982 | recip_sqrt_fp | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/sqrt.c | static bool_t recip_sqrt_fp(vec384 out, const vec384 inp)
{
vec384 t0, t1;
bool_t ret;
recip_sqrt_fp_3mod4(t0, inp);
mul_fp(t1, t0, inp);
sqr_fp(t1, t1);
ret = vec_is_equal(t1, inp, sizeof(t1));
vec_copy(out, t0, sizeof(t0));
return ret;
} | O3 | c | recip_sqrt_fp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x26260(%rip), %rdx # 0x8d170
leaq -0x90(%rbp), %r14
movl $0x17b, %ecx # imm = 0x17B
movq %r14, %rdi
callq 0x6685f
leaq 0x25d75(%rip), %rcx # 0x8cca0
leaq -0x60(%rbp), %r13
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %r8
callq 0x74ea0
movq %r13, %rdi
movq %r13, %rsi
leaq 0x25d49(%rip), %rdx # 0x8cca0
movq %r12, %rcx
callq 0x74720
movl $0x30, %edx
movq %r13, %rdi
movq %r15, %rsi
callq 0x70980
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movaps 0x20(%r14), %xmm2
movups %xmm0, (%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm2, 0x20(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| recip_sqrt_fp:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r15, rsi
mov rbx, rdi
lea rdx, recip_sqrt_fp_3mod4_BLS_12_381_P_minus_3_div_4
lea r14, [rbp+var_90]
mov ecx, 17Bh
mov rdi, r14
call exp_mont_384
lea rcx, BLS12_381_P
lea r13, [rbp+var_60]
mov r12, 89F3FFFCFFFCFFFDh
mov rdi, r13
mov rsi, r14
mov rdx, r15
mov r8, r12
call mul_mont_384
mov rdi, r13
mov rsi, r13
lea rdx, BLS12_381_P
mov rcx, r12
call sqr_mont_384
mov edx, 30h ; '0'
mov rdi, r13
mov rsi, r15
call vec_is_equal_16x
movaps xmm0, xmmword ptr [r14]
movaps xmm1, xmmword ptr [r14+10h]
movaps xmm2, xmmword ptr [r14+20h]
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx+20h], xmm2
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long recip_sqrt_fp(_OWORD *a1, _OWORD *a2)
{
long long result; // rax
__int128 v3; // xmm1
__int128 v4; // xmm2
_OWORD v5[3]; // [rsp+0h] [rbp-90h] BYREF
_BYTE v6[96]; // [rsp+30h] [rbp-60h] BYREF
exp_mont_384(v5, a2, (long long)&recip_sqrt_fp_3mod4_BLS_12_381_P_minus_3_div_4, 379LL);
mul_mont_384(v6, v5, a2, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
sqr_mont_384(v6, v6, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
result = vec_is_equal_16x(v6, a2, 48LL);
v3 = v5[1];
v4 = v5[2];
*a1 = v5[0];
a1[1] = v3;
a1[2] = v4;
return result;
}
| recip_sqrt_fp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R15,RSI
MOV RBX,RDI
LEA RDX,[0x18d170]
LEA R14,[RBP + -0x90]
MOV ECX,0x17b
MOV RDI,R14
CALL 0x0016685f
LEA RCX,[0x18cca0]
LEA R13,[RBP + -0x60]
MOV R12,-0x760c000300030003
MOV RDI,R13
MOV RSI,R14
MOV RDX,R15
MOV R8,R12
CALL 0x00174ea0
MOV RDI,R13
MOV RSI,R13
LEA RDX,[0x18cca0]
MOV RCX,R12
CALL 0x00174720
MOV EDX,0x30
MOV RDI,R13
MOV RSI,R15
CALL 0x00170980
MOVAPS XMM0,xmmword ptr [R14]
MOVAPS XMM1,xmmword ptr [R14 + 0x10]
MOVAPS XMM2,xmmword ptr [R14 + 0x20]
MOVUPS xmmword ptr [RBX],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX + 0x20],XMM2
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void recip_sqrt_fp(int8 *param_1,int8 param_2)
{
int8 local_98;
int8 uStack_90;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int1 local_68 [56];
exp_mont_384(&local_98,param_2,recip_sqrt_fp_3mod4_BLS_12_381_P_minus_3_div_4,0x17b);
mul_mont_384(local_68,&local_98,param_2,BLS12_381_P,0x89f3fffcfffcfffd);
sqr_mont_384(local_68,local_68,BLS12_381_P,0x89f3fffcfffcfffd);
vec_is_equal_16x(local_68,param_2,0x30);
*param_1 = local_98;
param_1[1] = uStack_90;
param_1[2] = local_88;
param_1[3] = uStack_80;
param_1[4] = local_78;
param_1[5] = uStack_70;
return;
}
| |
35,983 | CLI::Option::type_size(int, int) | MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/Option_inl.hpp | CLI11_INLINE Option *Option::type_size(int option_type_size_min, int option_type_size_max) {
if(option_type_size_min < 0 || option_type_size_max < 0) {
// this section is included for backwards compatibility
expected_max_ = detail::expected_max_vector_size;
option_type_size_min = (std::abs)(option_type_size_min);
option_type_size_max = (std::abs)(option_type_size_max);
}
if(option_type_size_min > option_type_size_max) {
type_size_max_ = option_type_size_min;
type_size_min_ = option_type_size_max;
} else {
type_size_min_ = option_type_size_min;
type_size_max_ = option_type_size_max;
}
if(type_size_max_ == 0) {
required_ = false;
}
if(type_size_max_ >= detail::expected_max_vector_size) {
inject_separator_ = true;
}
return this;
} | O2 | cpp | CLI::Option::type_size(int, int):
movq %rdi, %rax
movl %edx, %ecx
orl %esi, %ecx
jns 0x20e4f
movl $0x20000000, 0x174(%rax) # imm = 0x20000000
movl %esi, %ecx
negl %ecx
cmovnsl %ecx, %esi
movl %edx, %ecx
negl %ecx
cmovnsl %ecx, %edx
cmpl %edx, %esi
movl %edx, %ecx
cmovgl %esi, %ecx
cmovll %esi, %edx
movl %ecx, 0x168(%rax)
movl %edx, 0x16c(%rax)
testl %ecx, %ecx
je 0x20e79
cmpl $0x20000000, %ecx # imm = 0x20000000
jl 0x20e78
movb $0x1, 0x24c(%rax)
retq
movb $0x0, 0x20(%rax)
retq
| _ZN3CLI6Option9type_sizeEii:
mov rax, rdi
mov ecx, edx
or ecx, esi
jns short loc_20E4F
mov dword ptr [rax+174h], 20000000h
mov ecx, esi
neg ecx
cmovns esi, ecx
mov ecx, edx
neg ecx
cmovns edx, ecx
loc_20E4F:
cmp esi, edx
mov ecx, edx
cmovg ecx, esi
cmovl edx, esi
mov [rax+168h], ecx
mov [rax+16Ch], edx
test ecx, ecx
jz short loc_20E79
cmp ecx, 20000000h
jl short locret_20E78
mov byte ptr [rax+24Ch], 1
locret_20E78:
retn
loc_20E79:
mov byte ptr [rax+20h], 0
retn
| CLI::Option * CLI::Option::type_size(CLI::Option *this, int a2, int a3)
{
CLI::Option *result; // rax
int v4; // ecx
result = this;
if ( (a2 | a3) < 0 )
{
*((_DWORD *)this + 93) = 0x20000000;
if ( a2 <= 0 )
a2 = -a2;
if ( a3 <= 0 )
a3 = -a3;
}
v4 = a3;
if ( a2 > a3 )
v4 = a2;
if ( a2 < a3 )
a3 = a2;
*((_DWORD *)this + 90) = v4;
*((_DWORD *)this + 91) = a3;
if ( v4 )
{
if ( v4 >= 0x20000000 )
*((_BYTE *)this + 588) = 1;
}
else
{
*((_BYTE *)this + 32) = 0;
}
return result;
}
| type_size:
MOV RAX,RDI
MOV ECX,EDX
OR ECX,ESI
JNS 0x00120e4f
MOV dword ptr [RAX + 0x174],0x20000000
MOV ECX,ESI
NEG ECX
CMOVNS ESI,ECX
MOV ECX,EDX
NEG ECX
CMOVNS EDX,ECX
LAB_00120e4f:
CMP ESI,EDX
MOV ECX,EDX
CMOVG ECX,ESI
CMOVL EDX,ESI
MOV dword ptr [RAX + 0x168],ECX
MOV dword ptr [RAX + 0x16c],EDX
TEST ECX,ECX
JZ 0x00120e79
CMP ECX,0x20000000
JL 0x00120e78
MOV byte ptr [RAX + 0x24c],0x1
LAB_00120e78:
RET
LAB_00120e79:
MOV byte ptr [RAX + 0x20],0x0
RET
|
/* CLI::Option::type_size(int, int) */
void __thiscall CLI::Option::type_size(Option *this,int param_1,int param_2)
{
int iVar1;
if ((param_2 | param_1) < 0) {
*(int4 *)(this + 0x174) = 0x20000000;
if (param_1 < 1) {
param_1 = -param_1;
}
if (param_2 < 1) {
param_2 = -param_2;
}
}
iVar1 = param_2;
if (param_2 < param_1) {
iVar1 = param_1;
}
if (param_1 < param_2) {
param_2 = param_1;
}
*(int *)(this + 0x168) = iVar1;
*(int *)(this + 0x16c) = param_2;
if (iVar1 != 0) {
if (0x1fffffff < iVar1) {
this[0x24c] = (Option)0x1;
}
return;
}
this[0x20] = (Option)0x0;
return;
}
| |
35,984 | my_large_malloc | eloqsql/mysys/my_largepage.c | uchar *my_large_malloc(size_t *size, myf my_flags)
{
uchar *ptr= NULL;
#ifdef _WIN32
DWORD alloc_type= MEM_COMMIT | MEM_RESERVE;
size_t orig_size= *size;
DBUG_ENTER("my_large_malloc");
if (my_use_large_pages)
{
alloc_type|= MEM_LARGE_PAGES;
/* Align block size to my_large_page_size */
*size= MY_ALIGN(*size, (size_t) my_large_page_size);
}
ptr= VirtualAlloc(NULL, *size, alloc_type, PAGE_READWRITE);
if (!ptr)
{
if (my_flags & MY_WME)
{
if (my_use_large_pages)
{
my_printf_error(EE_OUTOFMEMORY,
"Couldn't allocate %zu bytes (MEM_LARGE_PAGES page "
"size %zu); Windows error %lu",
MYF(ME_WARNING | ME_ERROR_LOG_ONLY), *size,
my_large_page_size, GetLastError());
}
else
{
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG), *size);
}
}
if (my_use_large_pages)
{
*size= orig_size;
ptr= VirtualAlloc(NULL, *size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
if (!ptr && my_flags & MY_WME)
{
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG), *size);
}
}
}
#elif defined(HAVE_MMAP)
int mapflag;
int page_i= 0;
size_t large_page_size= 0;
size_t aligned_size= *size;
DBUG_ENTER("my_large_malloc");
while (1)
{
mapflag= MAP_PRIVATE | OS_MAP_ANON;
if (my_use_large_pages)
{
large_page_size= my_next_large_page_size(*size, &page_i);
/* this might be 0, in which case we do a standard mmap */
if (large_page_size)
{
#if defined(MAP_HUGETLB) /* linux 2.6.32 */
mapflag|= MAP_HUGETLB;
#if defined(MAP_HUGE_SHIFT) /* Linux-3.8+ */
mapflag|= my_bit_log2_size_t(large_page_size) << MAP_HUGE_SHIFT;
#else
# warning "No explicit large page (HUGETLB pages) support in Linux < 3.8"
#endif
#elif defined(MAP_ALIGNED)
mapflag|= MAP_ALIGNED(my_bit_log2_size_t(large_page_size));
#if defined(MAP_ALIGNED_SUPER)
mapflag|= MAP_ALIGNED_SUPER;
#endif
#endif
aligned_size= MY_ALIGN(*size, (size_t) large_page_size);
}
else
{
aligned_size= *size;
}
}
ptr= mmap(NULL, aligned_size, PROT_READ | PROT_WRITE, mapflag, -1, 0);
if (ptr == (void*) -1)
{
ptr= NULL;
if (my_flags & MY_WME)
{
if (large_page_size)
{
my_printf_error(EE_OUTOFMEMORY,
"Couldn't allocate %zu bytes (Large/HugeTLB memory "
"page size %zu); errno %u; continuing to smaller size",
MYF(ME_WARNING | ME_ERROR_LOG_ONLY),
aligned_size, large_page_size, errno);
}
else
{
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG), aligned_size);
}
}
/* try next smaller memory size */
if (large_page_size && errno == ENOMEM)
continue;
/* other errors are more serious */
break;
}
else /* success */
{
if (large_page_size)
{
/*
we do need to record the adjustment so that munmap gets called with
the right size. This is only the case for HUGETLB pages.
*/
*size= aligned_size;
}
break;
}
if (large_page_size == 0)
{
break; /* no more options to try */
}
}
#else
DBUG_RETURN(my_malloc_lock(*size, my_flags));
#endif /* defined(HAVE_MMAP) */
if (ptr != NULL)
{
MEM_MAKE_DEFINED(ptr, *size);
}
DBUG_RETURN(ptr);
} | O3 | c | my_large_malloc:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, -0x30(%rbp)
movq (%rdi), %rbx
xorl %r14d, %r14d
xorl %r13d, %r13d
movl $0x22, %ecx
cmpb $0x1, 0xb61112(%rip) # 0xc08d80
jne 0xa7cc5
movq -0x30(%rbp), %rax
movq (%rax), %rbx
cmpl $0x9, %r14d
movl $0x8, %edx
cmovgel %r14d, %edx
cmpl $0x7, %r14d
jg 0xa7cc2
movslq %r14d, %rsi
leaq 0xb610fc(%rip), %rax # 0xc08d90
leaq (%rax,%rsi,8), %rdi
subq %rdx, %rsi
xorl %eax, %eax
movq (%rdi), %r13
testq %r13, %r13
je 0xa7cbf
cmpq %rbx, %r13
jbe 0xa7d42
decq %rax
addq $0x8, %rdi
cmpq %rax, %rsi
jne 0xa7c9d
movl %edx, %r14d
jmp 0xa7cc2
subl %eax, %r14d
xorl %r13d, %r13d
xorl %edi, %edi
movq %rbx, %rsi
movl $0x3, %edx
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x295f0
cmpq $-0x1, %rax
jne 0xa80b9
testb $0x10, %r15b
jne 0xa7d00
testq %r13, %r13
je 0xa80b4
callq 0x297a0
movq %rax, %r12
jmp 0xa7d32
testq %r13, %r13
je 0xa80ca
callq 0x297a0
movq %rax, %r12
movl (%rax), %r9d
movl $0x880, %edx # imm = 0x880
movl $0x5, %edi
leaq 0x3493d(%rip), %rsi # 0xdc662
movq %rbx, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x9e2bd
cmpl $0xc, (%r12)
je 0xa7c62
jmp 0xa80b4
movq %r13, %rcx
shrq $0x20, %rcx
jne 0xa7d7f
cmpq $0x10000, %r13 # imm = 0x10000
jae 0xa7db6
cmpq $0x100, %r13 # imm = 0x100
jae 0xa7e17
cmpq $0x10, %r13
jae 0xa7ea5
cmpq $0x4, %r13
jae 0xa7fdf
movl %r13d, %ecx
shrl %ecx
jmp 0xa808d
movq %r13, %rdx
shrq $0x30, %rdx
jne 0xa7de8
movq %r13, %rdx
shrq $0x28, %rdx
jne 0xa7e3c
movq %r13, %rdx
shrq $0x24, %rdx
jne 0xa7ec9
movq %r13, %rdx
shrq $0x22, %rdx
jne 0xa7ff0
shrl %ecx
jmp 0xa808a
cmpq $0x1000000, %r13 # imm = 0x1000000
jae 0xa7e5e
cmpq $0x100000, %r13 # imm = 0x100000
jae 0xa7ef4
cmpq $0x40000, %r13 # imm = 0x40000
jae 0xa8008
movl %r13d, %ecx
shrl $0x11, %ecx
jmp 0xa806c
movq %r13, %rdx
shrq $0x38, %rdx
jne 0xa7e83
movq %r13, %rdx
shrq $0x34, %rdx
jne 0xa7f1b
movq %r13, %rdx
shrq $0x32, %rdx
jne 0xa8019
shrl $0x11, %ecx
jmp 0xa8087
cmpq $0x1000, %r13 # imm = 0x1000
jae 0xa7f46
cmpq $0x400, %r13 # imm = 0x400
jae 0xa802e
movl %r13d, %ecx
shrl $0x9, %ecx
jmp 0xa803d
movq %r13, %rdx
shrq $0x2c, %rdx
jne 0xa7f6d
movq %r13, %rdx
shrq $0x2a, %rdx
jne 0xa8042
shrl $0x9, %ecx
jmp 0xa8055
cmpq $0x10000000, %r13 # imm = 0x10000000
jae 0xa7f98
cmpq $0x4000000, %r13 # imm = 0x4000000
jae 0xa805a
movl %r13d, %ecx
shrl $0x19, %ecx
jmp 0xa8069
movq %r13, %rdx
shrq $0x3c, %rdx
jne 0xa7fbb
movq %r13, %rdx
shrq $0x3a, %rdx
jne 0xa8071
shrl $0x19, %ecx
jmp 0xa8084
cmpq $0x80, %r13
movl $0x3, %edx
sbbl $0x0, %edx
movl %r13d, %ecx
shrl $0x5, %ecx
cmpq $0x40, %r13
cmovael %edx, %ecx
orl $0x4, %ecx
jmp 0xa808d
movq %r13, %rdx
shrq $0x26, %rdx
movq %r13, %rsi
shrq $0x27, %rsi
cmpq $0x1, %rsi
movl $0x3, %esi
sbbl $0x0, %esi
shrl $0x5, %ecx
testq %rdx, %rdx
cmovnel %esi, %ecx
orl $0x4, %ecx
jmp 0xa808a
cmpq $0x800000, %r13 # imm = 0x800000
movl $0x3, %edx
sbbl $0x0, %edx
movl %r13d, %ecx
shrl $0x15, %ecx
cmpq $0x400000, %r13 # imm = 0x400000
cmovael %edx, %ecx
orl $0x4, %ecx
jmp 0xa806c
movq %r13, %rdx
shrq $0x36, %rdx
movq %r13, %rsi
shrq $0x37, %rsi
cmpq $0x1, %rsi
movl $0x3, %esi
sbbl $0x0, %esi
shrl $0x15, %ecx
testq %rdx, %rdx
cmovnel %esi, %ecx
orl $0x4, %ecx
jmp 0xa8087
cmpq $0x8000, %r13 # imm = 0x8000
movl $0x3, %edx
sbbl $0x0, %edx
movl %r13d, %ecx
shrl $0xd, %ecx
cmpq $0x4000, %r13 # imm = 0x4000
cmovael %edx, %ecx
orl $0x4, %ecx
jmp 0xa803d
movq %r13, %rdx
shrq $0x2e, %rdx
movq %r13, %rsi
shrq $0x2f, %rsi
cmpq $0x1, %rsi
movl $0x3, %esi
sbbl $0x0, %esi
shrl $0xd, %ecx
testq %rdx, %rdx
cmovnel %esi, %ecx
orl $0x4, %ecx
jmp 0xa8055
movl %r13d, %edx
notl %edx
shrl $0x1f, %edx
xorl $0x3, %edx
movl %r13d, %ecx
shrl $0x1d, %ecx
cmpq $0x40000000, %r13 # imm = 0x40000000
cmovael %edx, %ecx
orl $0x4, %ecx
jmp 0xa8069
movq %r13, %rdx
shrq $0x3e, %rdx
xorl %esi, %esi
testq %r13, %r13
setns %sil
xorl $0x3, %esi
shrl $0x1d, %ecx
testq %rdx, %rdx
cmovnel %esi, %ecx
orl $0x4, %ecx
jmp 0xa8084
cmpq $0x8, %r13
movl $0x3, %ecx
sbbl $0x0, %ecx
jmp 0xa808d
movq %r13, %rcx
shrq $0x23, %rcx
cmpq $0x1, %rcx
movl $0x3, %ecx
sbbl $0x0, %ecx
jmp 0xa808a
cmpq $0x80000, %r13 # imm = 0x80000
movl $0x3, %ecx
sbbl $0x0, %ecx
jmp 0xa806c
movq %r13, %rcx
shrq $0x33, %rcx
cmpq $0x1, %rcx
movl $0x3, %ecx
sbbl $0x0, %ecx
jmp 0xa8087
cmpq $0x800, %r13 # imm = 0x800
movl $0x3, %ecx
sbbl $0x0, %ecx
addl $0x8, %ecx
jmp 0xa808d
movq %r13, %rcx
shrq $0x2b, %rcx
cmpq $0x1, %rcx
movl $0x3, %ecx
sbbl $0x0, %ecx
addl $0x8, %ecx
jmp 0xa808a
cmpq $0x8000000, %r13 # imm = 0x8000000
movl $0x3, %ecx
sbbl $0x0, %ecx
addl $0x8, %ecx
addl $0x10, %ecx
jmp 0xa808d
movq %r13, %rcx
shrq $0x3b, %rcx
cmpq $0x1, %rcx
movl $0x3, %ecx
sbbl $0x0, %ecx
addl $0x8, %ecx
addl $0x10, %ecx
addl $0x20, %ecx
movl %r14d, %r14d
subq %rax, %r14
incq %r14
shll $0x1a, %ecx
orl $0x40022, %ecx # imm = 0x40022
leaq (%rbx,%r13), %rax
decq %rax
movq %r13, %rbx
negq %rbx
andq %rax, %rbx
jmp 0xa7cc5
xorl %r12d, %r12d
jmp 0xa80e1
movq %rax, %r12
testq %r13, %r13
je 0xa80e1
movq -0x30(%rbp), %rax
movq %rbx, (%rax)
jmp 0xa80e1
xorl %r12d, %r12d
movl $0x44, %esi
movl $0x5, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9e1a3
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_large_malloc:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rsi
mov [rbp+var_30], rdi
mov rbx, [rdi]
xor r14d, r14d
xor r13d, r13d
loc_A7C62:
mov ecx, 22h ; '"'
cmp cs:my_use_large_pages, 1
jnz short loc_A7CC5
mov rax, [rbp+var_30]
mov rbx, [rax]
cmp r14d, 9
mov edx, 8
cmovge edx, r14d
cmp r14d, 7
jg short loc_A7CC2
movsxd rsi, r14d
lea rax, my_large_page_sizes
lea rdi, [rax+rsi*8]
sub rsi, rdx
xor eax, eax
loc_A7C9D:
mov r13, [rdi]
test r13, r13
jz short loc_A7CBF
cmp r13, rbx
jbe loc_A7D42
dec rax
add rdi, 8
cmp rsi, rax
jnz short loc_A7C9D
mov r14d, edx
jmp short loc_A7CC2
loc_A7CBF:
sub r14d, eax
loc_A7CC2:
xor r13d, r13d
loc_A7CC5:
xor edi, edi
mov rsi, rbx
mov edx, 3
mov r8d, 0FFFFFFFFh
xor r9d, r9d
call _mmap64
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz loc_A80B9
test r15b, 10h
jnz short loc_A7D00
test r13, r13
jz loc_A80B4
call ___errno_location
mov r12, rax
jmp short loc_A7D32
loc_A7D00:
test r13, r13
jz loc_A80CA
call ___errno_location
mov r12, rax
mov r9d, [rax]
mov edx, 880h
mov edi, 5
lea rsi, aCouldnTAllocat; "Couldn't allocate %zu bytes (Large/Huge"...
mov rcx, rbx
mov r8, r13
xor eax, eax
call my_printf_error
loc_A7D32:
cmp dword ptr [r12], 0Ch
jz loc_A7C62
jmp loc_A80B4
loc_A7D42:
mov rcx, r13
shr rcx, 20h
jnz short loc_A7D7F
cmp r13, 10000h
jnb short loc_A7DB6
cmp r13, 100h
jnb loc_A7E17
cmp r13, 10h
jnb loc_A7EA5
cmp r13, 4
jnb loc_A7FDF
mov ecx, r13d
shr ecx, 1
jmp loc_A808D
loc_A7D7F:
mov rdx, r13
shr rdx, 30h
jnz short loc_A7DE8
mov rdx, r13
shr rdx, 28h
jnz loc_A7E3C
mov rdx, r13
shr rdx, 24h
jnz loc_A7EC9
mov rdx, r13
shr rdx, 22h
jnz loc_A7FF0
shr ecx, 1
jmp loc_A808A
loc_A7DB6:
cmp r13, 1000000h
jnb loc_A7E5E
cmp r13, offset xmmword_100000
jnb loc_A7EF4
cmp r13, 40000h
jnb loc_A8008
mov ecx, r13d
shr ecx, 11h
jmp loc_A806C
loc_A7DE8:
mov rdx, r13
shr rdx, 38h
jnz loc_A7E83
mov rdx, r13
shr rdx, 34h
jnz loc_A7F1B
mov rdx, r13
shr rdx, 32h
jnz loc_A8019
shr ecx, 11h
jmp loc_A8087
loc_A7E17:
cmp r13, 1000h
jnb loc_A7F46
cmp r13, 400h
jnb loc_A802E
mov ecx, r13d
shr ecx, 9
jmp loc_A803D
loc_A7E3C:
mov rdx, r13
shr rdx, 2Ch
jnz loc_A7F6D
mov rdx, r13
shr rdx, 2Ah
jnz loc_A8042
shr ecx, 9
jmp loc_A8055
loc_A7E5E:
cmp r13, 10000000h
jnb loc_A7F98
cmp r13, 4000000h
jnb loc_A805A
mov ecx, r13d
shr ecx, 19h
jmp loc_A8069
loc_A7E83:
mov rdx, r13
shr rdx, 3Ch
jnz loc_A7FBB
mov rdx, r13
shr rdx, 3Ah
jnz loc_A8071
shr ecx, 19h
jmp loc_A8084
loc_A7EA5:
cmp r13, 80h
mov edx, 3
sbb edx, 0
mov ecx, r13d
shr ecx, 5
cmp r13, 40h ; '@'
cmovnb ecx, edx
or ecx, 4
jmp loc_A808D
loc_A7EC9:
mov rdx, r13
shr rdx, 26h
mov rsi, r13
shr rsi, 27h
cmp rsi, 1
mov esi, 3
sbb esi, 0
shr ecx, 5
test rdx, rdx
cmovnz ecx, esi
or ecx, 4
jmp loc_A808A
loc_A7EF4:
cmp r13, offset unk_800000
mov edx, 3
sbb edx, 0
mov ecx, r13d
shr ecx, 15h
cmp r13, offset unk_400000
cmovnb ecx, edx
or ecx, 4
jmp loc_A806C
loc_A7F1B:
mov rdx, r13
shr rdx, 36h
mov rsi, r13
shr rsi, 37h
cmp rsi, 1
mov esi, 3
sbb esi, 0
shr ecx, 15h
test rdx, rdx
cmovnz ecx, esi
or ecx, 4
jmp loc_A8087
loc_A7F46:
cmp r13, 8000h
mov edx, 3
sbb edx, 0
mov ecx, r13d
shr ecx, 0Dh
cmp r13, 4000h
cmovnb ecx, edx
or ecx, 4
jmp loc_A803D
loc_A7F6D:
mov rdx, r13
shr rdx, 2Eh
mov rsi, r13
shr rsi, 2Fh
cmp rsi, 1
mov esi, 3
sbb esi, 0
shr ecx, 0Dh
test rdx, rdx
cmovnz ecx, esi
or ecx, 4
jmp loc_A8055
loc_A7F98:
mov edx, r13d
not edx
shr edx, 1Fh
xor edx, 3
mov ecx, r13d
shr ecx, 1Dh
cmp r13, 40000000h
cmovnb ecx, edx
or ecx, 4
jmp loc_A8069
loc_A7FBB:
mov rdx, r13
shr rdx, 3Eh
xor esi, esi
test r13, r13
setns sil
xor esi, 3
shr ecx, 1Dh
test rdx, rdx
cmovnz ecx, esi
or ecx, 4
jmp loc_A8084
loc_A7FDF:
cmp r13, 8
mov ecx, 3
sbb ecx, 0
jmp loc_A808D
loc_A7FF0:
mov rcx, r13
shr rcx, 23h
cmp rcx, 1
mov ecx, 3
sbb ecx, 0
jmp loc_A808A
loc_A8008:
cmp r13, offset loc_80000
mov ecx, 3
sbb ecx, 0
jmp short loc_A806C
loc_A8019:
mov rcx, r13
shr rcx, 33h
cmp rcx, 1
mov ecx, 3
sbb ecx, 0
jmp short loc_A8087
loc_A802E:
cmp r13, 800h
mov ecx, 3
sbb ecx, 0
loc_A803D:
add ecx, 8
jmp short loc_A808D
loc_A8042:
mov rcx, r13
shr rcx, 2Bh
cmp rcx, 1
mov ecx, 3
sbb ecx, 0
loc_A8055:
add ecx, 8
jmp short loc_A808A
loc_A805A:
cmp r13, 8000000h
mov ecx, 3
sbb ecx, 0
loc_A8069:
add ecx, 8
loc_A806C:
add ecx, 10h
jmp short loc_A808D
loc_A8071:
mov rcx, r13
shr rcx, 3Bh
cmp rcx, 1
mov ecx, 3
sbb ecx, 0
loc_A8084:
add ecx, 8
loc_A8087:
add ecx, 10h
loc_A808A:
add ecx, 20h ; ' '
loc_A808D:
mov r14d, r14d
sub r14, rax
inc r14
shl ecx, 1Ah
or ecx, 40022h
lea rax, [rbx+r13]
dec rax
mov rbx, r13
neg rbx
and rbx, rax
jmp loc_A7CC5
loc_A80B4:
xor r12d, r12d
jmp short loc_A80E1
loc_A80B9:
mov r12, rax
test r13, r13
jz short loc_A80E1
mov rax, [rbp+var_30]
mov [rax], rbx
jmp short loc_A80E1
loc_A80CA:
xor r12d, r12d
mov esi, 44h ; 'D'
mov edi, 5
mov rdx, rbx
xor eax, eax
call my_error
loc_A80E1:
mov rax, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_large_malloc(
unsigned long long *a1,
char a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
unsigned long long v10; // rbx
int v11; // r14d
unsigned long long v12; // r13
long long v13; // rcx
long long v14; // rdx
unsigned long long *v15; // rdi
long long v16; // rax
long long v17; // rax
_DWORD *v18; // r12
__m128 v19; // xmm4
__m128 v20; // xmm5
int v21; // ecx
int v22; // ecx
int v23; // ecx
int v24; // ecx
int v25; // ecx
int v26; // ecx
int v27; // ecx
int v28; // ecx
unsigned int v29; // ecx
int v30; // ecx
unsigned int v31; // ecx
int v32; // ecx
unsigned int v33; // ecx
int v34; // ecx
unsigned int v35; // ecx
int v36; // ecx
long long v37; // r12
unsigned long long *v39; // [rsp+0h] [rbp-30h]
v39 = a1;
v10 = *a1;
v11 = 0;
v12 = 0LL;
while ( 1 )
{
v13 = 34LL;
if ( my_use_large_pages == 1 )
{
v10 = *v39;
v14 = 8LL;
if ( v11 >= 9 )
v14 = (unsigned int)v11;
if ( v11 > 7 )
{
LABEL_12:
v12 = 0LL;
}
else
{
v15 = &my_large_page_sizes[v11];
v16 = 0LL;
while ( 1 )
{
v12 = *v15;
if ( !*v15 )
{
v11 -= v16;
goto LABEL_12;
}
if ( v12 <= v10 )
break;
--v16;
++v15;
if ( v11 - v14 == v16 )
{
v11 = v14;
goto LABEL_12;
}
}
if ( HIDWORD(v12) )
{
if ( HIWORD(v12) )
{
if ( HIBYTE(v12) )
{
if ( v12 >> 60 )
{
v36 = HIDWORD(v12) >> 29;
if ( v12 >> 62 )
v36 = ((v12 & 0x8000000000000000LL) == 0LL) ^ 3;
v28 = v36 | 4;
}
else if ( v12 >> 58 )
{
v28 = 3 - (v12 >> 59 == 0);
}
else
{
v28 = HIDWORD(v12) >> 25;
}
v24 = v28 + 8;
}
else if ( v12 >> 52 )
{
v32 = HIDWORD(v12) >> 21;
if ( v12 >> 54 )
v32 = 3 - (v12 >> 55 == 0);
v24 = v32 | 4;
}
else if ( v12 >> 50 )
{
v24 = 3 - (v12 >> 51 == 0);
}
else
{
v24 = HIDWORD(v12) >> 17;
}
v22 = v24 + 16;
}
else if ( v12 >> 40 )
{
if ( v12 >> 44 )
{
v34 = HIDWORD(v12) >> 13;
if ( v12 >> 46 )
v34 = 3 - (v12 >> 47 == 0);
v26 = v34 | 4;
}
else if ( v12 >> 42 )
{
v26 = 3 - (v12 >> 43 == 0);
}
else
{
v26 = HIDWORD(v12) >> 9;
}
v22 = v26 + 8;
}
else if ( v12 >> 36 )
{
v30 = HIDWORD(v12) >> 5;
if ( v12 >> 38 )
v30 = 3 - (v12 >> 39 == 0);
v22 = v30 | 4;
}
else if ( v12 >> 34 )
{
v22 = 3 - (v12 >> 35 == 0);
}
else
{
v22 = HIDWORD(v12) >> 1;
}
v21 = v22 + 32;
}
else if ( v12 >= 0x10000 )
{
if ( v12 >= 0x1000000 )
{
if ( v12 >= 0x10000000 )
{
v35 = (unsigned int)v12 >> 29;
if ( v12 >= 0x40000000 )
v35 = ((v12 & 0x80000000) == 0LL) ^ 3;
v27 = v35 | 4;
}
else if ( v12 >= 0x4000000 )
{
v27 = 3 - (v12 < 0x8000000);
}
else
{
v27 = (unsigned int)v12 >> 25;
}
v23 = v27 + 8;
}
else if ( v12 >= (unsigned long long)&xmmword_100000 )
{
v31 = (unsigned int)v12 >> 21;
if ( v12 >= (unsigned long long)&unk_400000 )
v31 = 3 - (v12 < (unsigned long long)&unk_800000);
v23 = v31 | 4;
}
else if ( v12 >= 0x40000 )
{
v23 = 3 - (v12 < (unsigned long long)&loc_80000);
}
else
{
v23 = (unsigned int)v12 >> 17;
}
v21 = v23 + 16;
}
else if ( v12 >= 0x100 )
{
if ( v12 >= 0x1000 )
{
v33 = (unsigned int)v12 >> 13;
if ( v12 >= 0x4000 )
v33 = 3 - (v12 < 0x8000);
v25 = v33 | 4;
}
else if ( v12 >= 0x400 )
{
v25 = 3 - (v12 < 0x800);
}
else
{
v25 = (unsigned int)v12 >> 9;
}
v21 = v25 + 8;
}
else if ( v12 >= 0x10 )
{
v29 = (unsigned int)v12 >> 5;
if ( v12 >= 0x40 )
v29 = 3 - (v12 < 0x80);
v21 = v29 | 4;
}
else if ( v12 >= 4 )
{
v21 = 3 - (v12 < 8);
}
else
{
v21 = (unsigned int)v12 >> 1;
}
v11 = v11 - v16 + 1;
v13 = (v21 << 26) | 0x40022u;
v10 = (v10 + v12 - 1) & -(long long)v12;
}
}
v17 = mmap64(0LL, v10, 3LL, v13, 0xFFFFFFFFLL, 0LL, v39);
if ( v17 != -1 )
break;
if ( (a2 & 0x10) != 0 )
{
if ( !v12 )
{
v37 = 0LL;
my_error(5u, 68LL, v10);
return v37;
}
v18 = (_DWORD *)__errno_location(0LL);
my_printf_error(
5,
(long long)"Couldn't allocate %zu bytes (Large/HugeTLB memory page size %zu); errno %u; continuing to smaller size",
2176,
v10,
v12,
(unsigned int)*v18,
a3,
a4,
a5,
a6,
v19,
v20,
a9,
a10,
(char)v39);
}
else
{
if ( !v12 )
return 0LL;
v18 = (_DWORD *)__errno_location(0LL);
}
if ( *v18 != 12 )
return 0LL;
}
v37 = v17;
if ( v12 )
*v39 = v10;
return v37;
}
| my_large_malloc:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RSI
MOV qword ptr [RBP + -0x30],RDI
MOV RBX,qword ptr [RDI]
XOR R14D,R14D
XOR R13D,R13D
LAB_001a7c62:
MOV ECX,0x22
CMP byte ptr [0x00d08d80],0x1
JNZ 0x001a7cc5
MOV RAX,qword ptr [RBP + -0x30]
MOV RBX,qword ptr [RAX]
CMP R14D,0x9
MOV EDX,0x8
CMOVGE EDX,R14D
CMP R14D,0x7
JG 0x001a7cc2
MOVSXD RSI,R14D
LEA RAX,[0xd08d90]
LEA RDI,[RAX + RSI*0x8]
SUB RSI,RDX
XOR EAX,EAX
LAB_001a7c9d:
MOV R13,qword ptr [RDI]
TEST R13,R13
JZ 0x001a7cbf
CMP R13,RBX
JBE 0x001a7d42
DEC RAX
ADD RDI,0x8
CMP RSI,RAX
JNZ 0x001a7c9d
MOV R14D,EDX
JMP 0x001a7cc2
LAB_001a7cbf:
SUB R14D,EAX
LAB_001a7cc2:
XOR R13D,R13D
LAB_001a7cc5:
XOR EDI,EDI
MOV RSI,RBX
MOV EDX,0x3
MOV R8D,0xffffffff
XOR R9D,R9D
CALL 0x001295f0
CMP RAX,-0x1
JNZ 0x001a80b9
TEST R15B,0x10
JNZ 0x001a7d00
TEST R13,R13
JZ 0x001a80b4
CALL 0x001297a0
MOV R12,RAX
JMP 0x001a7d32
LAB_001a7d00:
TEST R13,R13
JZ 0x001a80ca
CALL 0x001297a0
MOV R12,RAX
MOV R9D,dword ptr [RAX]
MOV EDX,0x880
MOV EDI,0x5
LEA RSI,[0x1dc662]
MOV RCX,RBX
MOV R8,R13
XOR EAX,EAX
CALL 0x0019e2bd
LAB_001a7d32:
CMP dword ptr [R12],0xc
JZ 0x001a7c62
JMP 0x001a80b4
LAB_001a7d42:
MOV RCX,R13
SHR RCX,0x20
JNZ 0x001a7d7f
CMP R13,0x10000
JNC 0x001a7db6
CMP R13,0x100
JNC 0x001a7e17
CMP R13,0x10
JNC 0x001a7ea5
CMP R13,0x4
JNC 0x001a7fdf
MOV ECX,R13D
SHR ECX,0x1
JMP 0x001a808d
LAB_001a7d7f:
MOV RDX,R13
SHR RDX,0x30
JNZ 0x001a7de8
MOV RDX,R13
SHR RDX,0x28
JNZ 0x001a7e3c
MOV RDX,R13
SHR RDX,0x24
JNZ 0x001a7ec9
MOV RDX,R13
SHR RDX,0x22
JNZ 0x001a7ff0
SHR ECX,0x1
JMP 0x001a808a
LAB_001a7db6:
CMP R13,0x1000000
JNC 0x001a7e5e
CMP R13,0x100000
JNC 0x001a7ef4
CMP R13,0x40000
JNC 0x001a8008
MOV ECX,R13D
SHR ECX,0x11
JMP 0x001a806c
LAB_001a7de8:
MOV RDX,R13
SHR RDX,0x38
JNZ 0x001a7e83
MOV RDX,R13
SHR RDX,0x34
JNZ 0x001a7f1b
MOV RDX,R13
SHR RDX,0x32
JNZ 0x001a8019
SHR ECX,0x11
JMP 0x001a8087
LAB_001a7e17:
CMP R13,0x1000
JNC 0x001a7f46
CMP R13,0x400
JNC 0x001a802e
MOV ECX,R13D
SHR ECX,0x9
JMP 0x001a803d
LAB_001a7e3c:
MOV RDX,R13
SHR RDX,0x2c
JNZ 0x001a7f6d
MOV RDX,R13
SHR RDX,0x2a
JNZ 0x001a8042
SHR ECX,0x9
JMP 0x001a8055
LAB_001a7e5e:
CMP R13,0x10000000
JNC 0x001a7f98
CMP R13,0x4000000
JNC 0x001a805a
MOV ECX,R13D
SHR ECX,0x19
JMP 0x001a8069
LAB_001a7e83:
MOV RDX,R13
SHR RDX,0x3c
JNZ 0x001a7fbb
MOV RDX,R13
SHR RDX,0x3a
JNZ 0x001a8071
SHR ECX,0x19
JMP 0x001a8084
LAB_001a7ea5:
CMP R13,0x80
MOV EDX,0x3
SBB EDX,0x0
MOV ECX,R13D
SHR ECX,0x5
CMP R13,0x40
CMOVNC ECX,EDX
OR ECX,0x4
JMP 0x001a808d
LAB_001a7ec9:
MOV RDX,R13
SHR RDX,0x26
MOV RSI,R13
SHR RSI,0x27
CMP RSI,0x1
MOV ESI,0x3
SBB ESI,0x0
SHR ECX,0x5
TEST RDX,RDX
CMOVNZ ECX,ESI
OR ECX,0x4
JMP 0x001a808a
LAB_001a7ef4:
CMP R13,0x800000
MOV EDX,0x3
SBB EDX,0x0
MOV ECX,R13D
SHR ECX,0x15
CMP R13,0x400000
CMOVNC ECX,EDX
OR ECX,0x4
JMP 0x001a806c
LAB_001a7f1b:
MOV RDX,R13
SHR RDX,0x36
MOV RSI,R13
SHR RSI,0x37
CMP RSI,0x1
MOV ESI,0x3
SBB ESI,0x0
SHR ECX,0x15
TEST RDX,RDX
CMOVNZ ECX,ESI
OR ECX,0x4
JMP 0x001a8087
LAB_001a7f46:
CMP R13,0x8000
MOV EDX,0x3
SBB EDX,0x0
MOV ECX,R13D
SHR ECX,0xd
CMP R13,0x4000
CMOVNC ECX,EDX
OR ECX,0x4
JMP 0x001a803d
LAB_001a7f6d:
MOV RDX,R13
SHR RDX,0x2e
MOV RSI,R13
SHR RSI,0x2f
CMP RSI,0x1
MOV ESI,0x3
SBB ESI,0x0
SHR ECX,0xd
TEST RDX,RDX
CMOVNZ ECX,ESI
OR ECX,0x4
JMP 0x001a8055
LAB_001a7f98:
MOV EDX,R13D
NOT EDX
SHR EDX,0x1f
XOR EDX,0x3
MOV ECX,R13D
SHR ECX,0x1d
CMP R13,0x40000000
CMOVNC ECX,EDX
OR ECX,0x4
JMP 0x001a8069
LAB_001a7fbb:
MOV RDX,R13
SHR RDX,0x3e
XOR ESI,ESI
TEST R13,R13
SETNS SIL
XOR ESI,0x3
SHR ECX,0x1d
TEST RDX,RDX
CMOVNZ ECX,ESI
OR ECX,0x4
JMP 0x001a8084
LAB_001a7fdf:
CMP R13,0x8
MOV ECX,0x3
SBB ECX,0x0
JMP 0x001a808d
LAB_001a7ff0:
MOV RCX,R13
SHR RCX,0x23
CMP RCX,0x1
MOV ECX,0x3
SBB ECX,0x0
JMP 0x001a808a
LAB_001a8008:
CMP R13,0x80000
MOV ECX,0x3
SBB ECX,0x0
JMP 0x001a806c
LAB_001a8019:
MOV RCX,R13
SHR RCX,0x33
CMP RCX,0x1
MOV ECX,0x3
SBB ECX,0x0
JMP 0x001a8087
LAB_001a802e:
CMP R13,0x800
MOV ECX,0x3
SBB ECX,0x0
LAB_001a803d:
ADD ECX,0x8
JMP 0x001a808d
LAB_001a8042:
MOV RCX,R13
SHR RCX,0x2b
CMP RCX,0x1
MOV ECX,0x3
SBB ECX,0x0
LAB_001a8055:
ADD ECX,0x8
JMP 0x001a808a
LAB_001a805a:
CMP R13,0x8000000
MOV ECX,0x3
SBB ECX,0x0
LAB_001a8069:
ADD ECX,0x8
LAB_001a806c:
ADD ECX,0x10
JMP 0x001a808d
LAB_001a8071:
MOV RCX,R13
SHR RCX,0x3b
CMP RCX,0x1
MOV ECX,0x3
SBB ECX,0x0
LAB_001a8084:
ADD ECX,0x8
LAB_001a8087:
ADD ECX,0x10
LAB_001a808a:
ADD ECX,0x20
LAB_001a808d:
MOV R14D,R14D
SUB R14,RAX
INC R14
SHL ECX,0x1a
OR ECX,0x40022
LEA RAX,[RBX + R13*0x1]
DEC RAX
MOV RBX,R13
NEG RBX
AND RBX,RAX
JMP 0x001a7cc5
LAB_001a80b4:
XOR R12D,R12D
JMP 0x001a80e1
LAB_001a80b9:
MOV R12,RAX
TEST R13,R13
JZ 0x001a80e1
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RBX
JMP 0x001a80e1
LAB_001a80ca:
XOR R12D,R12D
MOV ESI,0x44
MOV EDI,0x5
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0019e1a3
LAB_001a80e1:
MOV RAX,R12
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void * my_large_malloc(ulong *param_1,ulong param_2)
{
long lVar1;
void *pvVar2;
int *piVar3;
uint uVar4;
ulong uVar5;
ulong __len;
ulong *puVar6;
ulong uVar7;
int iVar8;
ulong uVar9;
__len = *param_1;
uVar9 = 0;
uVar7 = 0;
do {
uVar4 = 0x22;
if (my_use_large_pages == '\x01') {
__len = *param_1;
iVar8 = (int)uVar9;
uVar5 = 8;
if (8 < iVar8) {
uVar5 = uVar9 & 0xffffffff;
}
uVar7 = uVar9;
if (iVar8 < 8) {
puVar6 = &my_large_page_sizes + iVar8;
lVar1 = 0;
do {
uVar7 = *puVar6;
if (uVar7 == 0) {
uVar7 = (ulong)(uint)(iVar8 - (int)lVar1);
break;
}
if (uVar7 <= __len) {
if (uVar7 >> 0x20 == 0) {
if (uVar7 < 0x10000) {
if (uVar7 < 0x100) {
if (uVar7 < 0x10) {
if (uVar7 < 4) {
uVar4 = (uint)(uVar7 >> 1) & 0x7fffffff;
}
else {
uVar4 = 3 - (uVar7 < 8);
}
}
else {
uVar4 = (uint)(uVar7 >> 5) & 0x7ffffff;
if (0x3f < uVar7) {
uVar4 = 3 - (uVar7 < 0x80);
}
uVar4 = uVar4 | 4;
}
}
else {
if (uVar7 < 0x1000) {
if (uVar7 < 0x400) {
uVar4 = (uint)(uVar7 >> 9) & 0x7fffff;
}
else {
uVar4 = 3 - (uVar7 < 0x800);
}
}
else {
uVar4 = (uint)(uVar7 >> 0xd) & 0x7ffff;
if (0x3fff < uVar7) {
uVar4 = 3 - (uVar7 < 0x8000);
}
uVar4 = uVar4 | 4;
}
uVar4 = uVar4 + 8;
}
}
else {
if (uVar7 < 0x1000000) {
if (uVar7 < 0x100000) {
if (uVar7 < 0x40000) {
uVar4 = (uint)(uVar7 >> 0x11) & 0x7fff;
}
else {
uVar4 = 3 - (uVar7 < 0x80000);
}
}
else {
uVar4 = (uint)(uVar7 >> 0x15) & 0x7ff;
if (0x3fffff < uVar7) {
uVar4 = 3 - (uVar7 < 0x800000);
}
uVar4 = uVar4 | 4;
}
}
else {
if (uVar7 < 0x10000000) {
if (uVar7 < 0x4000000) {
uVar4 = (uint)(uVar7 >> 0x19) & 0x7f;
}
else {
uVar4 = 3 - (uVar7 < 0x8000000);
}
}
else {
uVar4 = (uint)(uVar7 >> 0x1d) & 7;
if (0x3fffffff < uVar7) {
uVar4 = ~(uint)uVar7 >> 0x1f ^ 3;
}
uVar4 = uVar4 | 4;
}
uVar4 = uVar4 + 8;
}
uVar4 = uVar4 + 0x10;
}
}
else {
uVar4 = (uint)(uVar7 >> 0x20);
if (uVar7 >> 0x30 == 0) {
if (uVar7 >> 0x28 == 0) {
if (uVar7 >> 0x24 == 0) {
if (uVar7 >> 0x22 == 0) {
uVar4 = uVar4 >> 1;
}
else {
uVar4 = 3 - (uVar7 >> 0x23 == 0);
}
}
else {
uVar4 = uVar4 >> 5;
if (uVar7 >> 0x26 != 0) {
uVar4 = 3 - (uVar7 >> 0x27 == 0);
}
uVar4 = uVar4 | 4;
}
}
else {
if (uVar7 >> 0x2c == 0) {
if (uVar7 >> 0x2a == 0) {
uVar4 = uVar4 >> 9;
}
else {
uVar4 = 3 - (uVar7 >> 0x2b == 0);
}
}
else {
uVar4 = uVar4 >> 0xd;
if (uVar7 >> 0x2e != 0) {
uVar4 = 3 - (uVar7 >> 0x2f == 0);
}
uVar4 = uVar4 | 4;
}
uVar4 = uVar4 + 8;
}
}
else {
if (uVar7 >> 0x38 == 0) {
if (uVar7 >> 0x34 == 0) {
if (uVar7 >> 0x32 == 0) {
uVar4 = uVar4 >> 0x11;
}
else {
uVar4 = 3 - (uVar7 >> 0x33 == 0);
}
}
else {
uVar4 = uVar4 >> 0x15;
if (uVar7 >> 0x36 != 0) {
uVar4 = 3 - (uVar7 >> 0x37 == 0);
}
uVar4 = uVar4 | 4;
}
}
else {
if (uVar7 >> 0x3c == 0) {
if (uVar7 >> 0x3a == 0) {
uVar4 = uVar4 >> 0x19;
}
else {
uVar4 = 3 - (uVar7 >> 0x3b == 0);
}
}
else {
uVar4 = uVar4 >> 0x1d;
if (uVar7 >> 0x3e != 0) {
uVar4 = -1 < (long)uVar7 ^ 3;
}
uVar4 = uVar4 | 4;
}
uVar4 = uVar4 + 8;
}
uVar4 = uVar4 + 0x10;
}
uVar4 = uVar4 + 0x20;
}
uVar9 = ((uVar9 & 0xffffffff) - lVar1) + 1;
uVar4 = uVar4 << 0x1a | 0x40022;
__len = -uVar7 & (__len + uVar7) - 1;
goto LAB_001a7cc5;
}
lVar1 = lVar1 + -1;
puVar6 = puVar6 + 1;
uVar7 = uVar5;
} while ((long)iVar8 - uVar5 != lVar1);
}
uVar9 = uVar7;
uVar7 = 0;
}
LAB_001a7cc5:
pvVar2 = mmap64((void *)0x0,__len,3,uVar4,-1,0);
if (pvVar2 != (void *)0xffffffffffffffff) {
if (uVar7 != 0) {
*param_1 = __len;
return pvVar2;
}
return pvVar2;
}
if ((param_2 & 0x10) == 0) {
if (uVar7 == 0) {
return (void *)0x0;
}
piVar3 = __errno_location();
}
else {
if (uVar7 == 0) {
my_error(5,0x44,__len);
return (void *)0x0;
}
piVar3 = __errno_location();
my_printf_error(5,
"Couldn\'t allocate %zu bytes (Large/HugeTLB memory page size %zu); errno %u; continuing to smaller size"
,0x880,__len,uVar7);
}
if (*piVar3 != 0xc) {
return (void *)0x0;
}
} while( true );
}
| |
35,985 | prepare_resize_simple_key_cache | eloqsql/mysys/mf_keycache.c | static
int prepare_resize_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache,
my_bool release_lock)
{
int res= 0;
DBUG_ENTER("prepare_resize_simple_key_cache");
keycache_pthread_mutex_lock(&keycache->cache_lock);
/*
We may need to wait for another thread which is doing a resize
already. This cannot happen in the MySQL server though. It allows
one resizer only. In set_var.cc keycache->in_init is used to block
multiple attempts.
*/
while (keycache->in_resize)
{
/* purecov: begin inspected */
wait_on_queue(&keycache->resize_queue, &keycache->cache_lock);
/* purecov: end */
}
/*
Mark the operation in progress. This blocks other threads from doing
a resize in parallel. It prohibits new blocks to enter the cache.
Read/write requests can bypass the cache during the flush phase.
*/
keycache->in_resize= 1;
/* Need to flush only if keycache is enabled. */
if (keycache->can_be_used && keycache->disk_blocks != -1)
{
/* Start the flush phase. */
keycache->resize_in_flush= 1;
if (flush_all_key_blocks(keycache))
{
/* TODO: if this happens, we should write a warning in the log file ! */
keycache->resize_in_flush= 0;
keycache->can_be_used= 0;
res= 1;
goto finish;
}
DBUG_SLOW_ASSERT(cache_empty(keycache));
/* End the flush phase. */
keycache->resize_in_flush= 0;
}
/*
Some direct read/write operations (bypassing the cache) may still be
unfinished. Wait until they are done. If the key cache can be used,
direct I/O is done in increments of key_cache_block_size. That is,
every block is checked if it is in the cache. We need to wait for
pending I/O before re-initializing the cache, because we may change
the block size. Otherwise they could check for blocks at file
positions where the new block division has none. We do also want to
wait for I/O done when (if) the cache was disabled. It must not
run in parallel with normal cache operation.
*/
while (keycache->cnt_for_resize_op)
wait_on_queue(&keycache->waiting_for_resize_cnt, &keycache->cache_lock);
end_simple_key_cache(keycache, 0);
finish:
if (release_lock)
keycache_pthread_mutex_unlock(&keycache->cache_lock);
DBUG_RETURN(res);
} | O3 | c | prepare_resize_simple_key_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r15d
movq %rdi, %r14
leaq 0xc0(%rdi), %rbx
cmpq $0x0, 0x100(%rdi)
jne 0x99767
movq %rbx, %rdi
callq 0x29210
cmpb $0x0, 0x1(%r14)
je 0x99602
leaq 0x108(%r14), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x97034
cmpb $0x0, 0x1(%r14)
jne 0x995f0
movb $0x1, 0x1(%r14)
cmpb $0x0, 0x3(%r14)
je 0x996fc
cmpl $-0x1, 0x48(%r14)
je 0x996fc
movl %r15d, -0x2c(%rbp)
movb $0x1, 0x2(%r14)
movl 0x3c(%r14), %ecx
movq %rcx, -0x38(%rbp)
testq %rcx, %rcx
je 0x99683
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0x128(%r14), %rax
movq (%rax,%r13,8), %rax
testq %rax, %rax
je 0x99669
incl %r15d
movq 0x20(%rax), %rax
movl 0x18(%rax), %esi
movq %r14, %rdi
movl $0x3, %edx
callq 0x997de
testl %eax, %eax
je 0x99639
jmp 0x9972b
incq %r13
movq -0x38(%rbp), %rcx
cmpq %rcx, %r13
jne 0x99639
xorl %r13d, %r13d
testl %r15d, %r15d
movl $0x0, %r15d
jne 0x99639
xorl %eax, %eax
testq %rcx, %rcx
je 0x996f3
xorl %r13d, %r13d
xorl %ecx, %ecx
movl %eax, -0x3c(%rbp)
movl %ecx, %r12d
xorl %r15d, %r15d
movq 0x130(%r14), %rax
movq (%rax,%r13,8), %rax
testq %rax, %rax
je 0x996c5
movq 0x20(%rax), %rax
movl 0x18(%rax), %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x997de
decl %r15d
testl %eax, %eax
je 0x99698
jmp 0x9972b
incq %r13
movl -0x3c(%rbp), %edx
movl %edx, %eax
subl %r15d, %eax
movl %r12d, %ecx
subl %r15d, %ecx
cmpq -0x38(%rbp), %r13
jne 0x9968f
movl %edx, %eax
subl %r15d, %eax
cmpl %r15d, %r12d
movq -0x38(%rbp), %rcx
jne 0x99685
cmpl %r15d, %edx
jne 0x9962e
movb $0x0, 0x2(%r14)
movl -0x2c(%rbp), %r15d
cmpq $0x0, 0x70(%r14)
je 0x9971c
leaq 0x110(%r14), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x97034
cmpq $0x0, 0x70(%r14)
jne 0x9970a
xorl %r12d, %r12d
movq %r14, %rdi
xorl %esi, %esi
callq 0x9949a
jmp 0x9973c
movw $0x0, 0x2(%r14)
movl $0x1, %r12d
movl -0x2c(%rbp), %r15d
testb %r15b, %r15b
je 0x99755
movq 0x100(%r14), %rdi
testq %rdi, %rdi
jne 0x99780
movq %rbx, %rdi
callq 0x291e0
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x41a76(%rip), %rsi # 0xdb1e4
movq %rbx, %rdi
movl $0x2a9, %edx # imm = 0x2A9
callq 0x2eb6f
jmp 0x995e2
leaq 0x2eb889(%rip), %rax # 0x385010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x9974d
| prepare_resize_simple_key_cache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15d, esi
mov r14, rdi
lea rbx, [rdi+0C0h]
cmp qword ptr [rdi+100h], 0
jnz loc_99767
mov rdi, rbx
call _pthread_mutex_lock
loc_995E2:
cmp byte ptr [r14+1], 0
jz short loc_99602
lea r12, [r14+108h]
loc_995F0:
mov rdi, r12
mov rsi, rbx
call wait_on_queue
cmp byte ptr [r14+1], 0
jnz short loc_995F0
loc_99602:
mov byte ptr [r14+1], 1
cmp byte ptr [r14+3], 0
jz loc_996FC
cmp dword ptr [r14+48h], 0FFFFFFFFh
jz loc_996FC
mov [rbp+var_2C], r15d
mov byte ptr [r14+2], 1
mov ecx, [r14+3Ch]
mov [rbp+var_38], rcx
loc_9962E:
test rcx, rcx
jz short loc_99683
xor r13d, r13d
xor r15d, r15d
loc_99639:
mov rax, [r14+128h]
mov rax, [rax+r13*8]
test rax, rax
jz short loc_99669
inc r15d
mov rax, [rax+20h]
mov esi, [rax+18h]
mov rdi, r14
mov edx, 3
call flush_key_blocks_int
test eax, eax
jz short loc_99639
jmp loc_9972B
loc_99669:
inc r13
mov rcx, [rbp+var_38]
cmp r13, rcx
jnz short loc_99639
xor r13d, r13d
test r15d, r15d
mov r15d, 0
jnz short loc_99639
loc_99683:
xor eax, eax
loc_99685:
test rcx, rcx
jz short loc_996F3
xor r13d, r13d
xor ecx, ecx
loc_9968F:
mov [rbp+var_3C], eax
mov r12d, ecx
xor r15d, r15d
loc_99698:
mov rax, [r14+130h]
mov rax, [rax+r13*8]
test rax, rax
jz short loc_996C5
mov rax, [rax+20h]
mov esi, [rax+18h]
mov rdi, r14
mov edx, 1
call flush_key_blocks_int
dec r15d
test eax, eax
jz short loc_99698
jmp short loc_9972B
loc_996C5:
inc r13
mov edx, [rbp+var_3C]
mov eax, edx
sub eax, r15d
mov ecx, r12d
sub ecx, r15d
cmp r13, [rbp+var_38]
jnz short loc_9968F
mov eax, edx
sub eax, r15d
cmp r12d, r15d
mov rcx, [rbp+var_38]
jnz short loc_99685
cmp edx, r15d
jnz loc_9962E
loc_996F3:
mov byte ptr [r14+2], 0
mov r15d, [rbp+var_2C]
loc_996FC:
cmp qword ptr [r14+70h], 0
jz short loc_9971C
lea r12, [r14+110h]
loc_9970A:
mov rdi, r12
mov rsi, rbx
call wait_on_queue
cmp qword ptr [r14+70h], 0
jnz short loc_9970A
loc_9971C:
xor r12d, r12d
mov rdi, r14
xor esi, esi
call end_simple_key_cache
jmp short loc_9973C
loc_9972B:
mov word ptr [r14+2], 0
mov r12d, 1
mov r15d, [rbp+var_2C]
loc_9973C:
test r15b, r15b
jz short loc_99755
mov rdi, [r14+100h]
test rdi, rdi
jnz short loc_99780
loc_9974D:
mov rdi, rbx
call _pthread_mutex_unlock
loc_99755:
mov eax, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_99767:
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 2A9h
call psi_mutex_lock
jmp loc_995E2
loc_99780:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_9974D
| long long prepare_resize_simple_key_cache(long long a1, char a2)
{
char v2; // r15
long long v3; // rbx
long long v4; // rcx
long long v5; // r13
int v6; // r15d
long long v7; // rax
bool v8; // zf
int v9; // eax
long long v10; // r13
int v11; // ecx
int v12; // r12d
int v13; // r15d
long long v14; // rax
unsigned int v15; // r12d
int v17; // [rsp+4h] [rbp-3Ch]
long long v18; // [rsp+8h] [rbp-38h]
v2 = a2;
v3 = a1 + 192;
if ( *(_QWORD *)(a1 + 256) )
psi_mutex_lock(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x2A9u);
else
pthread_mutex_lock(a1 + 192);
while ( *(_BYTE *)(a1 + 1) )
wait_on_queue((long long *)(a1 + 264), v3);
*(_BYTE *)(a1 + 1) = 1;
if ( !*(_BYTE *)(a1 + 3) || *(_DWORD *)(a1 + 72) == -1 )
{
LABEL_26:
while ( *(_QWORD *)(a1 + 112) )
wait_on_queue((long long *)(a1 + 272), v3);
v15 = 0;
end_simple_key_cache(a1, 0);
goto LABEL_30;
}
*(_BYTE *)(a1 + 2) = 1;
v4 = *(unsigned int *)(a1 + 60);
v18 = v4;
LABEL_8:
if ( !v4 )
{
LABEL_15:
v9 = 0;
while ( v4 )
{
v10 = 0LL;
v11 = 0;
do
{
v17 = v9;
v12 = v11;
v13 = 0;
while ( 1 )
{
v14 = *(_QWORD *)(*(_QWORD *)(a1 + 304) + 8 * v10);
if ( !v14 )
break;
--v13;
if ( (unsigned int)flush_key_blocks_int(a1, *(unsigned int *)(*(_QWORD *)(v14 + 32) + 24LL), 1LL) )
goto LABEL_29;
}
++v10;
v9 = v17 - v13;
v11 = v12 - v13;
}
while ( v10 != v18 );
v9 = v17 - v13;
v4 = v18;
if ( v12 == v13 )
{
if ( v17 != v13 )
goto LABEL_8;
break;
}
}
*(_BYTE *)(a1 + 2) = 0;
v2 = a2;
goto LABEL_26;
}
v5 = 0LL;
v6 = 0;
do
{
while ( 1 )
{
v7 = *(_QWORD *)(*(_QWORD *)(a1 + 296) + 8 * v5);
if ( v7 )
break;
++v5;
v4 = v18;
if ( v5 == v18 )
{
v5 = 0LL;
v8 = v6 == 0;
v6 = 0;
if ( v8 )
goto LABEL_15;
}
}
++v6;
}
while ( !(unsigned int)flush_key_blocks_int(a1, *(unsigned int *)(*(_QWORD *)(v7 + 32) + 24LL), 3LL) );
LABEL_29:
*(_WORD *)(a1 + 2) = 0;
v15 = 1;
v2 = a2;
LABEL_30:
if ( v2 )
{
if ( *(_QWORD *)(a1 + 256) )
PSI_server[44]();
pthread_mutex_unlock(v3);
}
return v15;
}
| prepare_resize_simple_key_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15D,ESI
MOV R14,RDI
LEA RBX,[RDI + 0xc0]
CMP qword ptr [RDI + 0x100],0x0
JNZ 0x00199767
MOV RDI,RBX
CALL 0x00129210
LAB_001995e2:
CMP byte ptr [R14 + 0x1],0x0
JZ 0x00199602
LEA R12,[R14 + 0x108]
LAB_001995f0:
MOV RDI,R12
MOV RSI,RBX
CALL 0x00197034
CMP byte ptr [R14 + 0x1],0x0
JNZ 0x001995f0
LAB_00199602:
MOV byte ptr [R14 + 0x1],0x1
CMP byte ptr [R14 + 0x3],0x0
JZ 0x001996fc
CMP dword ptr [R14 + 0x48],-0x1
JZ 0x001996fc
MOV dword ptr [RBP + -0x2c],R15D
MOV byte ptr [R14 + 0x2],0x1
MOV ECX,dword ptr [R14 + 0x3c]
MOV qword ptr [RBP + -0x38],RCX
LAB_0019962e:
TEST RCX,RCX
JZ 0x00199683
XOR R13D,R13D
XOR R15D,R15D
LAB_00199639:
MOV RAX,qword ptr [R14 + 0x128]
MOV RAX,qword ptr [RAX + R13*0x8]
TEST RAX,RAX
JZ 0x00199669
INC R15D
MOV RAX,qword ptr [RAX + 0x20]
MOV ESI,dword ptr [RAX + 0x18]
MOV RDI,R14
MOV EDX,0x3
CALL 0x001997de
TEST EAX,EAX
JZ 0x00199639
JMP 0x0019972b
LAB_00199669:
INC R13
MOV RCX,qword ptr [RBP + -0x38]
CMP R13,RCX
JNZ 0x00199639
XOR R13D,R13D
TEST R15D,R15D
MOV R15D,0x0
JNZ 0x00199639
LAB_00199683:
XOR EAX,EAX
LAB_00199685:
TEST RCX,RCX
JZ 0x001996f3
XOR R13D,R13D
XOR ECX,ECX
LAB_0019968f:
MOV dword ptr [RBP + -0x3c],EAX
MOV R12D,ECX
XOR R15D,R15D
LAB_00199698:
MOV RAX,qword ptr [R14 + 0x130]
MOV RAX,qword ptr [RAX + R13*0x8]
TEST RAX,RAX
JZ 0x001996c5
MOV RAX,qword ptr [RAX + 0x20]
MOV ESI,dword ptr [RAX + 0x18]
MOV RDI,R14
MOV EDX,0x1
CALL 0x001997de
DEC R15D
TEST EAX,EAX
JZ 0x00199698
JMP 0x0019972b
LAB_001996c5:
INC R13
MOV EDX,dword ptr [RBP + -0x3c]
MOV EAX,EDX
SUB EAX,R15D
MOV ECX,R12D
SUB ECX,R15D
CMP R13,qword ptr [RBP + -0x38]
JNZ 0x0019968f
MOV EAX,EDX
SUB EAX,R15D
CMP R12D,R15D
MOV RCX,qword ptr [RBP + -0x38]
JNZ 0x00199685
CMP EDX,R15D
JNZ 0x0019962e
LAB_001996f3:
MOV byte ptr [R14 + 0x2],0x0
MOV R15D,dword ptr [RBP + -0x2c]
LAB_001996fc:
CMP qword ptr [R14 + 0x70],0x0
JZ 0x0019971c
LEA R12,[R14 + 0x110]
LAB_0019970a:
MOV RDI,R12
MOV RSI,RBX
CALL 0x00197034
CMP qword ptr [R14 + 0x70],0x0
JNZ 0x0019970a
LAB_0019971c:
XOR R12D,R12D
MOV RDI,R14
XOR ESI,ESI
CALL 0x0019949a
JMP 0x0019973c
LAB_0019972b:
MOV word ptr [R14 + 0x2],0x0
MOV R12D,0x1
MOV R15D,dword ptr [RBP + -0x2c]
LAB_0019973c:
TEST R15B,R15B
JZ 0x00199755
MOV RDI,qword ptr [R14 + 0x100]
TEST RDI,RDI
JNZ 0x00199780
LAB_0019974d:
MOV RDI,RBX
CALL 0x001291e0
LAB_00199755:
MOV EAX,R12D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00199767:
LEA RSI,[0x1db1e4]
MOV RDI,RBX
MOV EDX,0x2a9
CALL 0x0012eb6f
JMP 0x001995e2
LAB_00199780:
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0019974d
|
int8 prepare_resize_simple_key_cache(long param_1,char param_2)
{
pthread_mutex_t *__mutex;
long lVar1;
int iVar2;
int iVar3;
int iVar4;
ulong uVar5;
int8 uVar6;
ulong uVar7;
int iVar8;
int iVar9;
bool bVar10;
__mutex = (pthread_mutex_t *)(param_1 + 0xc0);
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x2a9);
}
if (*(char *)(param_1 + 1) != '\0') {
do {
wait_on_queue(param_1 + 0x108,__mutex);
} while (*(char *)(param_1 + 1) != '\0');
}
*(int1 *)(param_1 + 1) = 1;
if ((*(char *)(param_1 + 3) != '\0') && (*(int *)(param_1 + 0x48) != -1)) {
*(int1 *)(param_1 + 2) = 1;
uVar5 = (ulong)*(uint *)(param_1 + 0x3c);
do {
if (uVar5 != 0) {
uVar7 = 0;
iVar8 = 0;
do {
do {
while (lVar1 = *(long *)(*(long *)(param_1 + 0x128) + uVar7 * 8), lVar1 != 0) {
iVar8 = iVar8 + 1;
iVar2 = flush_key_blocks_int
(param_1,*(int4 *)(*(long *)(lVar1 + 0x20) + 0x18),3);
if (iVar2 != 0) goto LAB_0019972b;
}
uVar7 = uVar7 + 1;
} while (uVar7 != uVar5);
uVar7 = 0;
bVar10 = iVar8 != 0;
iVar8 = 0;
} while (bVar10);
}
iVar8 = 0;
do {
if (uVar5 == 0) goto LAB_001996f3;
uVar7 = 0;
iVar2 = 0;
do {
iVar3 = iVar8;
iVar4 = iVar2;
iVar9 = 0;
while (lVar1 = *(long *)(*(long *)(param_1 + 0x130) + uVar7 * 8), lVar1 != 0) {
iVar8 = flush_key_blocks_int(param_1,*(int4 *)(*(long *)(lVar1 + 0x20) + 0x18),1);
iVar9 = iVar9 + -1;
if (iVar8 != 0) goto LAB_0019972b;
}
uVar7 = uVar7 + 1;
iVar2 = iVar4 - iVar9;
iVar8 = iVar3 - iVar9;
} while (uVar7 != uVar5);
iVar8 = iVar3 - iVar9;
} while (iVar4 != iVar9);
} while (iVar3 != iVar9);
LAB_001996f3:
*(int1 *)(param_1 + 2) = 0;
}
if (*(long *)(param_1 + 0x70) != 0) {
do {
wait_on_queue(param_1 + 0x110,__mutex);
} while (*(long *)(param_1 + 0x70) != 0);
}
uVar6 = 0;
end_simple_key_cache(param_1,0);
LAB_0019973c:
if (param_2 != '\0') {
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
}
return uVar6;
LAB_0019972b:
*(int2 *)(param_1 + 2) = 0;
uVar6 = 1;
goto LAB_0019973c;
}
| |
35,986 | minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
if (!filter) throw std::runtime_error("FilterNode.filter is null");
if (!body) throw std::runtime_error("FilterNode.body is null");
auto filter_value = filter->evaluate(context);
if (!filter_value.is_callable()) {
throw std::runtime_error("Filter must be a callable: " + filter_value.dump());
}
std::string rendered_body = body->render(context);
ArgumentsValue filter_args = {{Value(rendered_body)}, {}};
auto result = filter_value.call(context, filter_args);
out << result.to_str();
} | O2 | cpp | minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp # imm = 0x110
movq %rsi, %rbx
movq 0x20(%rdi), %rsi
testq %rsi, %rsi
je 0x7aa8f
movq %rdi, %r15
cmpq $0x0, 0x30(%rdi)
je 0x7aaab
movq %rdx, %r14
leaq 0xc0(%rsp), %r12
movq %r12, %rdi
callq 0x65f00
cmpq $0x0, 0x30(%r12)
je 0x7aadb
movq 0x30(%r15), %rsi
leaq 0xa0(%rsp), %rdi
movq %r14, %rdx
callq 0x795da
leaq 0x50(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x6916e
leaq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %rdx
movq %rsp, %rcx
callq 0x70666
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movups %xmm0, 0x18(%r15)
andq $0x0, 0x28(%r15)
leaq 0x50(%rsp), %rdi
callq 0x66190
leaq 0x50(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x70922
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
callq 0x7367a
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x23830
movq %rsp, %rdi
callq 0x24348
leaq 0x50(%rsp), %rdi
callq 0x66190
leaq 0x20(%rsp), %rdi
callq 0x70a06
leaq 0xa0(%rsp), %rdi
callq 0x24348
leaq 0xc0(%rsp), %rdi
callq 0x66190
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x234b0
movq %rax, %r14
leaq 0x3e05b(%rip), %rsi # 0xb8afc
movq %rax, %rdi
callq 0x23360
jmp 0x7aac5
pushq $0x10
popq %rdi
callq 0x234b0
movq %rax, %r14
leaq 0x3e059(%rip), %rsi # 0xb8b16
movq %rax, %rdi
callq 0x23360
movq 0x8751c(%rip), %rsi # 0x101fe8
movq 0x87475(%rip), %rdx # 0x101f48
movq %r14, %rdi
callq 0x24050
pushq $0x10
popq %rdi
callq 0x234b0
movq %rax, %r14
leaq 0x20(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
pushq $-0x1
popq %rdx
xorl %ecx, %ecx
callq 0x6637e
leaq 0x3e02a(%rip), %rsi # 0xb8b2e
leaq 0x50(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x5bb8a
movb $0x1, %bpl
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x23f50
xorl %ebp, %ebp
movq 0x874bc(%rip), %rsi # 0x101fe8
movq 0x87415(%rip), %rdx # 0x101f48
movq %r14, %rdi
callq 0x24050
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x24348
jmp 0x7ab50
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x20(%rsp), %rdi
callq 0x24348
testb %bpl, %bpl
jne 0x7ab64
jmp 0x7abc7
movq %rax, %rbx
movq %r14, %rdi
callq 0x236f0
jmp 0x7abc7
jmp 0x7ab70
movq %rax, %rbx
movq %r14, %rdi
callq 0x236f0
jmp 0x7abd4
movq %rax, %rbx
movq %rsp, %rdi
callq 0x24348
jmp 0x7ab8d
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x66190
jmp 0x7ab9c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x70a06
jmp 0x7abba
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x66190
jmp 0x7abba
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x24348
leaq 0xc0(%rsp), %rdi
callq 0x66190
movq %rbx, %rdi
callq 0x240e0
movq %rax, %rbx
jmp 0x7abc7
nop
| _ZNK5minja10FilterNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 110h
mov rbx, rsi
mov rsi, [rdi+20h]
test rsi, rsi
jz loc_7AA8F
mov r15, rdi
cmp qword ptr [rdi+30h], 0
jz loc_7AAAB
mov r14, rdx
lea r12, [rsp+138h+var_78]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
cmp qword ptr [r12+30h], 0
jz loc_7AADB
mov rsi, [r15+30h]
lea rdi, [rsp+138h+var_98]
mov rdx, r14
call _ZNK5minja12TemplateNode6renderB5cxx11ERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::shared_ptr<minja::Context> const&)
lea rdi, [rsp+138h+var_E8]
lea rsi, [rsp+138h+var_98]
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
lea rdi, [rsp+138h+var_118]
lea rsi, [rsp+138h+var_E8]
push 1
pop rdx
mov rcx, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<minja::Value>::vector(std::initializer_list<minja::Value>,std::allocator<minja::Value> const&)
xorps xmm0, xmm0
lea r15, [rsp+138h+var_118]
movups xmmword ptr [r15+18h], xmm0
and qword ptr [r15+28h], 0
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
lea rdi, [rsp+138h+var_E8]
lea rsi, [rsp+138h+var_78]
mov rdx, r14
mov rcx, r15
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
mov rdi, rsp; this
lea rsi, [rsp+138h+var_E8]; minja::Value *
call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void)
mov rsi, rsp
mov rdi, rbx
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
lea rdi, [rsp+138h+var_118]; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
lea rdi, [rsp+138h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+138h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
add rsp, 110h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_7AA8F:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFilternodeFilt; "FilterNode.filter is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_7AAC5
loc_7AAAB:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFilternodeBody; "FilterNode.body is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_7AAC5:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_7AADB:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rdi, [rsp+138h+var_118]
lea rsi, [rsp+138h+var_78]
push 0FFFFFFFFFFFFFFFFh
pop rdx
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aFilterMustBeAC; "Filter must be a callable: "
lea rdi, [rsp+138h+var_E8]
lea rdx, [rsp+138h+var_118]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+138h+var_E8]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, [rsp+138h+var_E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_7AB50
mov rbx, rax
mov bpl, 1
loc_7AB50:
lea rdi, [rsp+138h+var_118]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7AB64
jmp short loc_7ABC7
mov rbx, rax
loc_7AB64:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_7ABC7
jmp short $+2
loc_7AB70:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_7ABD4
mov rbx, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_7AB8D
mov rbx, rax
loc_7AB8D:
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_7AB9C
mov rbx, rax
loc_7AB9C:
lea rdi, [rsp+138h+var_118]; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
jmp short loc_7ABBA
mov rbx, rax
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_7ABBA
mov rbx, rax
loc_7ABBA:
lea rdi, [rsp+138h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_7ABC7:
lea rdi, [rsp+138h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_7ABD4:
mov rdi, rbx
call __Unwind_Resume
mov rbx, rax
jmp short loc_7ABC7
| void minja::FilterNode::do_render(long long a1, long long a2)
{
void (***v3)(void); // rsi
std::runtime_error *exception; // r14
void *v5; // r14
_BYTE v6[32]; // [rsp+0h] [rbp-138h] BYREF
_BYTE v7[24]; // [rsp+20h] [rbp-118h] BYREF
__int128 v8; // [rsp+38h] [rbp-100h]
long long v9; // [rsp+48h] [rbp-F0h]
_BYTE v10[80]; // [rsp+50h] [rbp-E8h] BYREF
_BYTE v11[32]; // [rsp+A0h] [rbp-98h] BYREF
_BYTE v12[48]; // [rsp+C0h] [rbp-78h] BYREF
long long v13; // [rsp+F0h] [rbp-48h]
v3 = *(void (****)(void))(a1 + 32);
if ( !v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterNode.filter is null");
goto LABEL_7;
}
if ( !*(_QWORD *)(a1 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterNode.body is null");
LABEL_7:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v12, v3);
if ( !v13 )
{
v5 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v7, (long long)v12, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v10, (long long)"Filter must be a callable: ", (long long)v7);
std::runtime_error::runtime_error(v5, v10);
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::TemplateNode::render[abi:cxx11]((long long)v11, *(long long ( ****)(_QWORD))(a1 + 48));
minja::Value::Value((long long)v10, (long long)v11);
std::vector<minja::Value>::vector((long long)v7, (long long)v10, 1LL);
v8 = 0LL;
v9 = 0LL;
minja::Value::~Value((minja::Value *)v10);
minja::Value::call((long long)v10, (long long)v12);
minja::Value::to_str[abi:cxx11]((std::__cxx11 *)v6, (minja::Value *)v10, 0.0);
std::operator<<<char>(a2, v6);
std::string::~string(v6);
minja::Value::~Value((minja::Value *)v10);
minja::ArgumentsValue::~ArgumentsValue((minja::ArgumentsValue *)v7);
std::string::~string(v11);
minja::Value::~Value((minja::Value *)v12);
}
| do_render:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x110
MOV RBX,RSI
MOV RSI,qword ptr [RDI + 0x20]
TEST RSI,RSI
JZ 0x0017aa8f
MOV R15,RDI
CMP qword ptr [RDI + 0x30],0x0
JZ 0x0017aaab
MOV R14,RDX
LEA R12,[RSP + 0xc0]
MOV RDI,R12
CALL 0x00165f00
CMP qword ptr [R12 + 0x30],0x0
JZ 0x0017aadb
MOV RSI,qword ptr [R15 + 0x30]
LAB_0017a9c6:
LEA RDI,[RSP + 0xa0]
MOV RDX,R14
CALL 0x001795da
LAB_0017a9d6:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xa0]
CALL 0x0016916e
LAB_0017a9e8:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x50]
PUSH 0x1
POP RDX
MOV RCX,RSP
CALL 0x00170666
XORPS XMM0,XMM0
LEA R15,[RSP + 0x20]
MOVUPS xmmword ptr [R15 + 0x18],XMM0
AND qword ptr [R15 + 0x28],0x0
LEA RDI,[RSP + 0x50]
CALL 0x00166190
LAB_0017aa19:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xc0]
MOV RDX,R14
MOV RCX,R15
CALL 0x00170922
LAB_0017aa31:
MOV RDI,RSP
LEA RSI,[RSP + 0x50]
CALL 0x0017367a
LAB_0017aa3e:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00123830
LAB_0017aa49:
MOV RDI,RSP
CALL 0x00124348
LEA RDI,[RSP + 0x50]
CALL 0x00166190
LEA RDI,[RSP + 0x20]
CALL 0x00170a06
LEA RDI,[RSP + 0xa0]
CALL 0x00124348
LEA RDI,[RSP + 0xc0]
CALL 0x00166190
ADD RSP,0x110
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0017aa8f:
PUSH 0x10
POP RDI
CALL 0x001234b0
MOV R14,RAX
LAB_0017aa9a:
LEA RSI,[0x1b8afc]
MOV RDI,RAX
CALL 0x00123360
LAB_0017aaa9:
JMP 0x0017aac5
LAB_0017aaab:
PUSH 0x10
POP RDI
CALL 0x001234b0
MOV R14,RAX
LAB_0017aab6:
LEA RSI,[0x1b8b16]
MOV RDI,RAX
CALL 0x00123360
LAB_0017aac5:
MOV RSI,qword ptr [0x00201fe8]
MOV RDX,qword ptr [0x00201f48]
MOV RDI,R14
CALL 0x00124050
LAB_0017aadb:
PUSH 0x10
POP RDI
CALL 0x001234b0
MOV R14,RAX
LAB_0017aae6:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0xc0]
PUSH -0x1
POP RDX
XOR ECX,ECX
CALL 0x0016637e
LAB_0017aafd:
LEA RSI,[0x1b8b2e]
LEA RDI,[RSP + 0x50]
LEA RDX,[RSP + 0x20]
CALL 0x0015bb8a
MOV BPL,0x1
LAB_0017ab16:
LEA RSI,[RSP + 0x50]
MOV RDI,R14
CALL 0x00123f50
XOR EBP,EBP
MOV RSI,qword ptr [0x00201fe8]
MOV RDX,qword ptr [0x00201f48]
MOV RDI,R14
CALL 0x00124050
|
/* minja::FilterNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context>
const&) const */
void minja::FilterNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
runtime_error *prVar1;
string asStack_138 [32];
vector<minja::Value,std::allocator<minja::Value>> local_118 [24];
int8 local_100;
int8 uStack_f8;
int8 local_f0;
Value local_e8 [80];
TemplateNode local_98 [32];
Expression local_78 [48];
long local_48;
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0017aa9a to 0017aaa8 has its CatchHandler @ 0017ab70 */
std::runtime_error::runtime_error(prVar1,"FilterNode.filter is null");
}
else {
if (*(long *)(param_1 + 0x30) != 0) {
Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20));
if (local_48 != 0) {
/* try { // try from 0017a9c6 to 0017a9d5 has its CatchHandler @ 0017abdc */
TemplateNode::render_abi_cxx11_(local_98,*(shared_ptr **)(param_1 + 0x30));
/* try { // try from 0017a9d6 to 0017a9e7 has its CatchHandler @ 0017abb7 */
Value::Value(local_e8,(string *)local_98);
/* try { // try from 0017a9e8 to 0017a9fc has its CatchHandler @ 0017aba8 */
std::vector<minja::Value,std::allocator<minja::Value>>::vector
(local_118,local_e8,1,asStack_138);
local_100 = 0;
uStack_f8 = 0;
local_f0 = 0;
Value::~Value(local_e8);
/* try { // try from 0017aa19 to 0017aa30 has its CatchHandler @ 0017ab99 */
Value::call(local_e8,(ArgumentsValue *)local_78);
/* try { // try from 0017aa31 to 0017aa3d has its CatchHandler @ 0017ab8a */
Value::to_str_abi_cxx11_();
/* try { // try from 0017aa3e to 0017aa48 has its CatchHandler @ 0017ab7d */
std::operator<<((ostream *)param_2,asStack_138);
std::__cxx11::string::~string(asStack_138);
Value::~Value(local_e8);
ArgumentsValue::~ArgumentsValue((ArgumentsValue *)local_118);
std::__cxx11::string::~string((string *)local_98);
Value::~Value((Value *)local_78);
return;
}
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0017aae6 to 0017aafc has its CatchHandler @ 0017ab61 */
Value::dump_abi_cxx11_((int)local_118,SUB81(local_78,0));
/* try { // try from 0017aafd to 0017ab12 has its CatchHandler @ 0017ab4a */
std::operator+((char *)local_e8,(string *)"Filter must be a callable: ");
/* try { // try from 0017ab16 to 0017ab3a has its CatchHandler @ 0017ab3b */
std::runtime_error::runtime_error(prVar1,(string *)local_e8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_00201fe8,PTR__runtime_error_00201f48);
}
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0017aab6 to 0017aac4 has its CatchHandler @ 0017ab6e */
std::runtime_error::runtime_error(prVar1,"FilterNode.body is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_00201fe8,PTR__runtime_error_00201f48);
}
| |
35,987 | wsrep_on_check(sys_var*, THD*, set_var*) | eloqsql/sql/wsrep_var.cc | bool wsrep_on_check(sys_var *self, THD* thd, set_var* var)
{
bool new_wsrep_on= (bool)var->save_result.ulonglong_value;
if (check_has_super(self, thd, var))
return true;
if (new_wsrep_on)
{
if (!WSREP_PROVIDER_EXISTS)
{
my_message(ER_WRONG_ARGUMENTS, "WSREP (galera) can't be enabled "
"if the wsrep_provider is unset or set to 'none'", MYF(0));
return true;
}
if (var->type == OPT_SESSION &&
!global_system_variables.wsrep_on)
{
my_message(ER_WRONG_ARGUMENTS,
"Can't enable @@session.wsrep_on, "
"while @@global.wsrep_on is disabled", MYF(0));
return true;
}
}
if (thd->in_active_multi_stmt_transaction())
{
my_error(ER_CANT_DO_THIS_DURING_AN_TRANSACTION, MYF(0));
return true;
}
if (var->type == OPT_GLOBAL)
{
/*
The global value is about to change. Cleanup
the transaction state and close the client
state. wsrep_on_update() will take care of
reopening it should wsrep_on be re-enabled.
*/
if (global_system_variables.wsrep_on && !new_wsrep_on)
{
wsrep_commit_empty(thd, true);
wsrep_after_statement(thd);
wsrep_after_command_ignore_result(thd);
wsrep_close(thd);
wsrep_cleanup(thd);
}
}
return false;
} | O0 | cpp | wsrep_on_check(sys_var*, THD*, set_var*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x20(%rax)
setne %al
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xb69150
testb $0x1, %al
jne 0xfdb21c
jmp 0xfdb225
movb $0x1, -0x1(%rbp)
jmp 0xfdb309
testb $0x1, -0x21(%rbp)
je 0xfdb28c
leaq 0x15f07f2(%rip), %rax # 0x25cba24
testb $0x1, (%rax)
jne 0xfdb255
movl $0x4ba, %edi # imm = 0x4BA
leaq 0x49c1fd(%rip), %rsi # 0x1477440
xorl %eax, %eax
movl %eax, %edx
callq 0x131c4f0
movb $0x1, -0x1(%rbp)
jmp 0xfdb309
movq -0x20(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jne 0xfdb28a
leaq 0xd6df9a(%rip), %rax # 0x1d49200
cmpb $0x0, 0x390(%rax)
jne 0xfdb28a
movl $0x4ba, %edi # imm = 0x4BA
leaq 0x49c215(%rip), %rsi # 0x1477490
xorl %eax, %eax
movl %eax, %edx
callq 0x131c4f0
movb $0x1, -0x1(%rbp)
jmp 0xfdb309
jmp 0xfdb28c
movq -0x18(%rbp), %rdi
callq 0x965210
testb $0x1, %al
jne 0xfdb29b
jmp 0xfdb2b1
movl $0x49b, %edi # imm = 0x49B
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0x131c1e0
movb $0x1, -0x1(%rbp)
jmp 0xfdb309
movq -0x20(%rbp), %rax
cmpl $0x2, 0x18(%rax)
jne 0xfdb305
leaq 0xd6df3e(%rip), %rax # 0x1d49200
cmpb $0x0, 0x390(%rax)
je 0xfdb303
testb $0x1, -0x21(%rbp)
jne 0xfdb303
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0xfce480
movq -0x18(%rbp), %rdi
callq 0xfdb320
movq -0x18(%rbp), %rdi
callq 0xfdb440
movq -0x18(%rbp), %rdi
callq 0xfdb470
movq -0x18(%rbp), %rdi
callq 0xfdb4c0
jmp 0xfdb305
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _Z14wsrep_on_checkP7sys_varP3THDP7set_var:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_20]
cmp qword ptr [rax+20h], 0
setnz al
and al, 1
mov [rbp+var_21], al
mov rdi, [rbp+var_10]; sys_var *
mov rsi, [rbp+var_18]; THD *
mov rdx, [rbp+var_20]; set_var *
call _Z15check_has_superP7sys_varP3THDP7set_var; check_has_super(sys_var *,THD *,set_var *)
test al, 1
jnz short loc_FDB21C
jmp short loc_FDB225
loc_FDB21C:
mov [rbp+var_1], 1
jmp loc_FDB309
loc_FDB225:
test [rbp+var_21], 1
jz short loc_FDB28C
lea rax, WSREP_PROVIDER_EXISTS_
test byte ptr [rax], 1
jnz short loc_FDB255
mov edi, 4BAh
lea rsi, aWsrepGaleraCan; "WSREP (galera) can't be enabled if the "...
xor eax, eax
mov edx, eax
call my_message
mov [rbp+var_1], 1
jmp loc_FDB309
loc_FDB255:
mov rax, [rbp+var_20]
cmp dword ptr [rax+18h], 1
jnz short loc_FDB28A
lea rax, global_system_variables
cmp byte ptr [rax+390h], 0
jnz short loc_FDB28A
mov edi, 4BAh
lea rsi, aCanTEnableSess; "Can't enable @@session.wsrep_on, while "...
xor eax, eax
mov edx, eax
call my_message
mov [rbp+var_1], 1
jmp short loc_FDB309
loc_FDB28A:
jmp short $+2
loc_FDB28C:
mov rdi, [rbp+var_18]; this
call _ZN3THD32in_active_multi_stmt_transactionEv; THD::in_active_multi_stmt_transaction(void)
test al, 1
jnz short loc_FDB29B
jmp short loc_FDB2B1
loc_FDB29B:
mov edi, 49Bh
xor eax, eax
mov esi, eax
mov al, 0
call my_error
mov [rbp+var_1], 1
jmp short loc_FDB309
loc_FDB2B1:
mov rax, [rbp+var_20]
cmp dword ptr [rax+18h], 2
jnz short loc_FDB305
lea rax, global_system_variables
cmp byte ptr [rax+390h], 0
jz short loc_FDB303
test [rbp+var_21], 1
jnz short loc_FDB303
mov rdi, [rbp+var_18]; THD *
mov esi, 1; bool
call _Z18wsrep_commit_emptyP3THDb; wsrep_commit_empty(THD *,bool)
mov rdi, [rbp+var_18]; THD *
call _ZL21wsrep_after_statementP3THD_6; wsrep_after_statement(THD *)
mov rdi, [rbp+var_18]; THD *
call _ZL33wsrep_after_command_ignore_resultP3THD_3; wsrep_after_command_ignore_result(THD *)
mov rdi, [rbp+var_18]; THD *
call _ZL11wsrep_closeP3THD_5; wsrep_close(THD *)
mov rdi, [rbp+var_18]; THD *
call _ZL13wsrep_cleanupP3THD; wsrep_cleanup(THD *)
loc_FDB303:
jmp short $+2
loc_FDB305:
mov [rbp+var_1], 0
loc_FDB309:
mov al, [rbp+var_1]
and al, 1
add rsp, 30h
pop rbp
retn
| char wsrep_on_check(sys_var *a1, THD *a2, set_var *a3)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
bool v8; // [rsp+Fh] [rbp-21h]
v8 = *((_QWORD *)a3 + 4) != 0LL;
if ( (check_has_super(a1, a2, a3) & 1) != 0 )
return 1;
if ( v8 )
{
if ( (WSREP_PROVIDER_EXISTS_ & 1) == 0 )
{
my_message(1210LL, "WSREP (galera) can't be enabled if the wsrep_provider is unset or set to 'none'", 0LL);
return 1;
}
if ( *((_DWORD *)a3 + 6) == 1 && !LOBYTE(global_system_variables[114]) )
{
my_message(1210LL, "Can't enable @@session.wsrep_on, while @@global.wsrep_on is disabled", 0LL);
return 1;
}
}
if ( THD::in_active_multi_stmt_transaction(a2) )
{
my_error(1179, 0, v3, v4, v5, v6);
return 1;
}
else
{
if ( *((_DWORD *)a3 + 6) == 2 && LOBYTE(global_system_variables[114]) && !v8 )
{
wsrep_commit_empty(a2, 1);
wsrep_after_statement(a2);
wsrep_after_command_ignore_result(a2);
wsrep_close(a2);
wsrep_cleanup(a2);
}
return 0;
}
}
| maria_rkey:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
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
MOV dword ptr [RBP + -0x34],R9D
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
MOV dword ptr [RBP + -0x84],0x1
JMP 0x00fdb219
LAB_00fdb219:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x1c]
CALL 0x00fdc3a0
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
JGE 0x00fdb23e
JMP 0x00fdb22f
LAB_00fdb22f:
CALL 0x01427140
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00fdb829
LAB_00fdb23e:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x624]
AND ECX,0x401
MOV dword ptr [RAX + 0x624],ECX
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x648],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x208]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x390]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x686]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00fdb30c
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX + 0x686]
AND ECX,0xfffffffe
MOV byte ptr [RAX + 0x686],CL
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x28]
JZ 0x00fdb2c1
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x008752b0
LAB_00fdb2c1:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x70],EAX
MOV dword ptr [RBP + -0x6c],0x0
MOV dword ptr [RBP + -0x68],0x0
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RCX + 0x67c]
MOVSXD RCX,ECX
SHL RCX,0x5
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00fdb369
LAB_00fdb30c:
JMP 0x00fdb30e
LAB_00fdb30e:
JMP 0x00fdb310
LAB_00fdb310:
MOV RDI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x40]
MOV R8,qword ptr [RBP + -0x28]
MOV R9,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x80]
LEA RAX,[RBP + -0x58]
MOV qword ptr [RSP],RAX
CALL 0x00fe6910
MOV ECX,dword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x654],ECX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RCX + 0xc0]
SUB RAX,RCX
SAR RAX,0x5
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x67c],CX
JMP 0x00fdb367
LAB_00fdb367:
JMP 0x00fdb369
LAB_00fdb369:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x664],0x2
JNZ 0x00fdb390
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
MOV EDX,0x1
CALL 0x00f94a00
CMP EAX,0x0
JZ 0x00fdb390
JMP 0x00fdb78b
LAB_00fdb390:
MOV RAX,qword ptr [RBP + -0x48]
CMP byte ptr [RAX + 0x7e3],0x0
JZ 0x00fdb3b6
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,0x8
LEA RSI,[0x154a53a]
MOV EDX,0x54
CALL 0x00fdb840
LAB_00fdb3b6:
MOV EAX,dword ptr [RBP + -0x34]
MOV ECX,EAX
LEA RAX,[0x1c6af10]
MOV EAX,dword ptr [RAX + RCX*0x4]
OR EAX,dword ptr [RBP + -0x68]
MOV dword ptr [RBP + -0x5c],EAX
CMP dword ptr [RBP + -0x34],0x0
JZ 0x00fdb3da
MOV EAX,dword ptr [RBP + -0x5c]
OR EAX,0x20
MOV dword ptr [RBP + -0x5c],EAX
LAB_00fdb3da:
MOV RAX,qword ptr [RBP + -0x50]
MOVZX EAX,byte ptr [RAX + 0xa4]
MOV dword ptr [RBP + -0xb4],EAX
SUB EAX,0x1
JZ 0x00fdb436
JMP 0x00fdb3f2
LAB_00fdb3f2:
MOV EAX,dword ptr [RBP + -0xb4]
SUB EAX,0x2
JNZ 0x00fdb438
JMP 0x00fdb3ff
LAB_00fdb3ff:
MOV RDI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x5c]
LEA RSI,[RBP + -0x80]
CALL 0x01024c60
CMP EAX,0x0
JGE 0x00fdb431
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x7e
CALL 0x00f941c0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x98],-0x1
LAB_00fdb431:
JMP 0x00fdb666
LAB_00fdb436:
JMP 0x00fdb438
LAB_00fdb438:
MOV RDI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x118]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RAX + RCX*0x8]
LEA RSI,[RBP + -0x80]
CALL 0x00fdc530
CMP EAX,0x0
JNZ 0x00fdb65e
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + 0x6d8]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00fdb4a0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x1c]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00fe7600
MOV dword ptr [RBP + -0x84],EAX
CMP EAX,0x0
JZ 0x00fdb4a0
JMP 0x00fdb666
LAB_00fdb4a0:
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x00fdb4ee
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RCX + 0xc0]
MOV RDX,qword ptr [RBP + -0x50]
MOVZX EDX,word ptr [RDX + 0xa0]
MOVSXD RDX,EDX
SHL RDX,0x5
ADD RCX,RDX
CMP RAX,RCX
JNZ 0x00fdb4ee
CALL 0x01427140
MOV dword ptr [RAX],0x78
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x98],-0x1
JMP 0x00fdb666
LAB_00fdb4ee:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x388]
MOV qword ptr [RBP + -0xa8],RAX
LAB_00fdb50b:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x210]
MOV dword ptr [RBP + -0x98],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x214]
MOV dword ptr [RBP + -0x94],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x218]
MOV dword ptr [RBP + -0x90],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x34]
MOV ECX,EAX
LEA RAX,[0x1c6af50]
MOV EDX,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x118]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RAX + RCX*0x8]
LEA RSI,[RBP + -0xa8]
CALL 0x00fe00d0
CMP EAX,0x0
JZ 0x00fdb57a
JMP 0x00fdb65c
LAB_00fdb57a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x3b0]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x3b8]
JC 0x00fdb5af
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x1c]
CALL 0x00fdb8b0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00fdb5af
JMP 0x00fdb5a8
LAB_00fdb5a8:
JMP 0x00fdb5aa
LAB_00fdb5aa:
JMP 0x00fdb65c
LAB_00fdb5af:
MOV EAX,dword ptr [RBP + -0x5c]
AND EAX,0x18
CMP EAX,0x0
JNZ 0x00fdb60a
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x200]
MOV RDX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RBP + -0x70]
LEA R9,[RBP + -0xb0]
MOV R8D,0x1
CALL 0x01421020
CMP EAX,0x0
JZ 0x00fdb60a
CALL 0x01427140
MOV dword ptr [RAX],0x78
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x98],-0x1
JMP 0x00fdb65c
LAB_00fdb60a:
JMP 0x00fdb60c
LAB_00fdb60c:
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + 0x6d8]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOV CL,AL
MOV AL,0x1
CMP CL,0x0
MOV byte ptr [RBP + -0xb5],AL
JZ 0x00fdb64e
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x1c]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00fe7600
MOV dword ptr [RBP + -0x84],EAX
CMP EAX,0x0
SETZ AL
MOV byte ptr [RBP + -0xb5],AL
LAB_00fdb64e:
MOV AL,byte ptr [RBP + -0xb5]
TEST AL,0x1
JNZ 0x00fdb50b
LAB_00fdb65c:
JMP 0x00fdb664
LAB_00fdb65e:
JMP 0x00fdb660
LAB_00fdb660:
JMP 0x00fdb662
LAB_00fdb662:
JMP 0x00fdb664
LAB_00fdb664:
JMP 0x00fdb666
LAB_00fdb666:
MOV RAX,qword ptr [RBP + -0x48]
CMP byte ptr [RAX + 0x7e3],0x0
JZ 0x00fdb680
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,0x8
CALL 0x00fdb970
LAB_00fdb680:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x98],-0x1
JNZ 0x00fdb6c2
CMP dword ptr [RBP + -0x84],0x2
JNZ 0x00fdb6a2
CALL 0x01427140
MOV dword ptr [RAX],0x78
LAB_00fdb6a2:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00fdb6bd
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00f94a20
LAB_00fdb6bd:
JMP 0x00fdb78b
LAB_00fdb6c2:
MOV RAX,qword ptr [RBP + -0x50]
MOVZX EAX,word ptr [RAX + 0xa2]
AND EAX,0x8
CMP EAX,0x0
JZ 0x00fdb6fb
MOV RDI,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x388]
MOV RDX,qword ptr [RBP + -0x58]
CALL 0x00fdffc0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x630],ECX
JMP 0x00fdb708
LAB_00fdb6fb:
MOV ECX,dword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x630],ECX
LAB_00fdb708:
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00fdb738
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00fdb72a
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00f94a20
LAB_00fdb72a:
JMP 0x00fdb72c
LAB_00fdb72c:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00fdb829
LAB_00fdb738:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x3d8]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX + 0x98]
CALL RAX
CMP EAX,0x0
JNZ 0x00fdb77c
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x624]
OR ECX,0x2
MOV dword ptr [RAX + 0x624],ECX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00fdb829
LAB_00fdb77c:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x98],-0x1
LAB_00fdb78b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x200]
MOV RSI,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x70]
MOV EDX,EAX
CALL 0x00876440
MOV ECX,dword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x210],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x3e0]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x214],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x218],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x200]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x210]
ADD RDI,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x3e0]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x008754f0
CMP dword ptr [RBP + -0x34],0x3
JNZ 0x00fdb81d
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x624]
OR ECX,0x10
MOV dword ptr [RAX + 0x624],ECX
LAB_00fdb81d:
JMP 0x00fdb81f
LAB_00fdb81f:
CALL 0x01427140
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
LAB_00fdb829:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xc0
POP RBP
RET
|
int4
maria_rkey(long *param_1,long param_2,int4 param_3,void *param_4,size_t param_5,uint param_6)
{
char cVar1;
int iVar2;
int4 uVar3;
int4 *puVar4;
bool bVar5;
int1 local_b8 [8];
long local_b0;
long local_a8;
int4 local_a0;
int4 local_9c;
int4 local_98;
int local_8c;
void *local_88;
long local_80;
uint local_78;
int4 local_74;
uint local_70;
uint local_64;
long local_60;
long local_58;
long local_50;
void *local_48;
uint local_3c;
size_t local_38;
void *local_30;
int local_24;
long local_20;
long *local_18;
local_50 = *param_1;
local_8c = 1;
local_3c = param_6;
local_38 = param_5;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
local_24 = _ma_check_index(param_1,param_3);
if (local_24 < 0) {
puVar4 = (int4 *)_my_thread_var();
return *puVar4;
}
*(uint *)((long)local_18 + 0x624) = *(uint *)((long)local_18 + 0x624) & 0x401;
*(uint *)(local_18 + 0xc9) = local_3c;
local_58 = local_18[0x41];
local_48 = (void *)local_18[0x72];
if ((*(byte *)((long)local_18 + 0x686) & 1) == 0) {
_ma_pack_key(local_18,&local_88,local_24,local_48,local_30,local_38,&local_60);
*(uint *)((long)local_18 + 0x654) = local_78;
*(short *)((long)local_18 + 0x67c) = (short)(local_60 - *(long *)(local_58 + 0xc0) >> 5);
}
else {
*(byte *)((long)local_18 + 0x686) = *(byte *)((long)local_18 + 0x686) & 0xfe;
if (local_48 != local_30) {
memmove(local_48,local_30,local_38);
}
local_88 = local_48;
local_80 = local_58;
local_78 = (uint)local_38;
local_74 = 0;
local_70 = 0;
local_60 = *(long *)(local_58 + 0xc0) +
(long)(int)(uint)*(ushort *)((long)local_18 + 0x67c) * 0x20;
}
if ((*(int *)((long)local_18 + 0x664) != 2) || (iVar2 = _ma_readinfo(local_18,0,1), iVar2 == 0)) {
if (*(char *)(local_50 + 0x7e3) != '\0') {
inline_mysql_rwlock_rdlock
(local_58 + 8,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_rkey.c",
0x54);
}
local_64 = *(uint *)(maria_read_vec + (ulong)local_3c * 4) | local_70;
if (local_3c != 0) {
local_64 = local_64 | 0x20;
}
if ((*(char *)(local_58 + 0xa4) == '\x01') || (*(char *)(local_58 + 0xa4) != '\x02')) {
iVar2 = _ma_search(local_18,&local_88,local_64,
*(int8 *)(*(long *)(*local_18 + 0x118) + (long)local_24 * 8));
if ((iVar2 == 0) &&
((cVar1 = (**(code **)(local_50 + 0x6d8))(local_18), cVar1 == '\0' ||
(local_8c = ma_check_index_cond(local_18,local_24,local_20), local_8c == 0)))) {
if ((local_3c == 0) &&
(local_60 ==
*(long *)(local_58 + 0xc0) + (long)(int)(uint)*(ushort *)(local_58 + 0xa0) * 0x20)) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x78;
local_18[0x13] = -1;
}
else {
local_a8 = local_58;
local_b0 = local_18[0x71];
do {
local_a0 = (int4)local_18[0x42];
local_9c = *(int4 *)((long)local_18 + 0x214);
local_98 = (int4)local_18[0x43];
iVar2 = _ma_search_next(local_18,&local_b0,
*(int4 *)(maria_readnext_vec + (ulong)local_3c * 4),
*(int8 *)
(*(long *)(*local_18 + 0x118) + (long)local_24 * 8));
if ((iVar2 != 0) ||
(((ulong)local_18[0x77] <= (ulong)local_18[0x76] &&
(cVar1 = ma_yield_and_check_if_killed(local_18,local_24), cVar1 != '\0')))) break;
if (((local_64 & 0x18) == 0) &&
(iVar2 = ha_key_cmp(*(int8 *)(local_58 + 0xc0),local_18[0x40],local_88,local_78
,1,local_b8), iVar2 != 0)) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x78;
local_18[0x13] = -1;
break;
}
cVar1 = (**(code **)(local_50 + 0x6d8))(local_18);
bVar5 = true;
if (cVar1 != '\0') {
local_8c = ma_check_index_cond(local_18,local_24,local_20);
bVar5 = local_8c == 0;
}
} while (bVar5);
}
}
}
else {
iVar2 = maria_rtree_find_first(local_18,&local_88,local_64);
if (iVar2 < 0) {
_ma_set_fatal_error(local_18,0x7e);
local_18[0x13] = -1;
}
}
if (*(char *)(local_50 + 0x7e3) != '\0') {
inline_mysql_rwlock_unlock(local_58 + 8);
}
if (local_18[0x13] == -1) {
if (local_8c == 2) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x78;
}
if (*(int *)(*local_18 + 0x7b8) == 0) {
_ma_writeinfo(local_18,0);
}
}
else {
if ((*(ushort *)(local_58 + 0xa2) & 8) == 0) {
*(uint *)(local_18 + 0xc6) = local_78;
}
else {
uVar3 = _ma_keylength_part(local_58,local_18[0x71],local_60);
*(int4 *)(local_18 + 0xc6) = uVar3;
}
if (local_20 == 0) {
if (*(int *)(*local_18 + 0x7b8) == 0) {
_ma_writeinfo(local_18,0);
}
return 0;
}
iVar2 = (*(code *)local_18[0x7b])(local_18,local_20,local_18[0x13]);
if (iVar2 == 0) {
*(uint *)((long)local_18 + 0x624) = *(uint *)((long)local_18 + 0x624) | 2;
return 0;
}
local_18[0x13] = -1;
}
}
memcpy((void *)local_18[0x40],local_48,(ulong)local_78);
*(uint *)(local_18 + 0x42) = local_78;
*(int4 *)((long)local_18 + 0x214) = *(int4 *)(*local_18 + 0x3e0);
*(int4 *)(local_18 + 0x43) = 0;
memset((void *)(local_18[0x40] + (ulong)*(uint *)(local_18 + 0x42)),0,
(ulong)*(uint *)(*local_18 + 0x3e0));
if (local_3c == 3) {
*(uint *)((long)local_18 + 0x624) = *(uint *)((long)local_18 + 0x624) | 0x10;
}
puVar4 = (int4 *)_my_thread_var();
return *puVar4;
}
| |
35,988 | sp_make_key | eloqsql/storage/myisam/sp_key.c | uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key,
const uchar *record, my_off_t filepos)
{
HA_KEYSEG *keyseg;
MI_KEYDEF *keyinfo = &info->s->keyinfo[keynr];
uint len = 0;
uchar *pos;
uint dlen;
uchar *dptr;
double mbr[SPDIMS * 2];
uint i;
keyseg = &keyinfo->seg[-1];
pos = (uchar*)record + keyseg->start;
dlen = _mi_calc_blob_length(keyseg->bit_start, pos);
memcpy(&dptr, pos + keyseg->bit_start, sizeof(char*));
if (!dptr)
{
my_errno= HA_ERR_NULL_IN_SPATIAL;
return 0;
}
sp_mbr_from_wkb(dptr + 4, dlen - 4, SPDIMS, mbr); /* SRID */
for (i = 0, keyseg = keyinfo->seg; keyseg->type; keyseg++, i++)
{
uint length = keyseg->length, start= keyseg->start;
double val;
DBUG_ASSERT(length == sizeof(double));
DBUG_ASSERT(!(start % sizeof(double)));
DBUG_ASSERT(start < sizeof(mbr));
DBUG_ASSERT(keyseg->type == HA_KEYTYPE_DOUBLE);
val= mbr[start / sizeof (double)];
if (isnan(val))
{
bzero(key, length);
key+= length;
len+= length;
continue;
}
if (keyseg->flag & HA_SWAP_KEY)
{
uchar buf[sizeof(double)];
float8store(buf, val);
pos= &buf[length];
while (pos > buf)
*key++ = *--pos;
}
else
{
float8store((uchar *)key, val);
key += length;
}
len+= length;
}
_mi_dpointer(info, key, filepos);
return len;
} | O3 | c | sp_make_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x48(%rbp)
movq %rdx, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rdi, -0x40(%rbp)
movq (%rdi), %rax
movq 0x218(%rax), %r15
movl %esi, %eax
imulq $0x70, %rax, %r12
movq 0x28(%r15,%r12), %r13
movl -0x18(%r13), %ebx
addq %rcx, %rbx
movzbl -0x6(%r13), %edi
movq %rbx, %rsi
callq 0x79b6d
movzbl -0x6(%r13), %ecx
movq (%rcx,%rbx), %rcx
testq %rcx, %rcx
je 0x8fae7
leaq (%r15,%r12), %rbx
addq $0x28, %rbx
leaq 0x4(%rcx), %rdx
addl $-0x4, %eax
leaq -0x38(%rbp), %r13
movq %rdx, (%r13)
movapd 0x4a6a9(%rip), %xmm0 # 0xda0f0
leaq -0x70(%rbp), %rdx
movapd %xmm0, (%rdx)
movapd %xmm0, 0x10(%rdx)
leaq (%rcx,%rax), %rsi
addq $0x4, %rsi
movq %r13, %rdi
movl $0x1, %ecx
callq 0x8fb30
movq (%rbx), %r15
cmpb $0x0, 0x18(%r15)
je 0x8faf7
xorl %r12d, %r12d
movzwl 0x14(%r15), %ebx
movl 0x8(%r15), %eax
andl $-0x8, %eax
movsd -0x70(%rbp,%rax), %xmm0
ucomisd %xmm0, %xmm0
jp 0x8fad5
testb $0x40, 0x12(%r15)
jne 0x8faa3
movsd %xmm0, (%r14)
addq %rbx, %r14
jmp 0x8fac5
movsd %xmm0, -0x38(%rbp)
testl %ebx, %ebx
je 0x8fac5
leaq (%rbx,%rbp), %rax
addq $-0x38, %rax
movb -0x1(%rax), %cl
decq %rax
movb %cl, (%r14)
incq %r14
cmpq %r13, %rax
ja 0x8fab4
addl %ebx, %r12d
cmpb $0x0, 0x38(%r15)
leaq 0x20(%r15), %r15
jne 0x8fa7a
jmp 0x8fafa
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x292c0
addq %rbx, %r14
jmp 0x8fac5
callq 0xa29fe
movl $0x9e, (%rax)
xorl %r12d, %r12d
jmp 0x8fb0a
xorl %r12d, %r12d
movq -0x40(%rbp), %rdi
movq %r14, %rsi
movq -0x48(%rbp), %rdx
callq 0x862d3
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x8fb2b
movl %r12d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| sp_make_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_48], r8
mov r14, rdx
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_40], rdi
mov rax, [rdi]
mov r15, [rax+218h]
mov eax, esi
imul r12, rax, 70h ; 'p'
mov r13, [r15+r12+28h]
mov ebx, [r13-18h]
add rbx, rcx
movzx edi, byte ptr [r13-6]
mov rsi, rbx
call _mi_calc_blob_length
movzx ecx, byte ptr [r13-6]
mov rcx, [rcx+rbx]
test rcx, rcx
jz loc_8FAE7
lea rbx, [r15+r12]
add rbx, 28h ; '('
lea rdx, [rcx+4]
add eax, 0FFFFFFFCh
lea r13, [rbp+var_38]
mov [r13+0], rdx
movapd xmm0, cs:xmmword_DA0F0
lea rdx, [rbp+var_70]
movapd xmmword ptr [rdx], xmm0
movapd xmmword ptr [rdx+10h], xmm0
lea rsi, [rcx+rax]
add rsi, 4
mov rdi, r13
mov ecx, 1
call sp_get_geometry_mbr_0
mov r15, [rbx]
cmp byte ptr [r15+18h], 0
jz loc_8FAF7
xor r12d, r12d
loc_8FA7A:
movzx ebx, word ptr [r15+14h]
mov eax, [r15+8]
and eax, 0FFFFFFF8h
movsd xmm0, [rbp+rax+var_70]
ucomisd xmm0, xmm0
jp short loc_8FAD5
test byte ptr [r15+12h], 40h
jnz short loc_8FAA3
movsd qword ptr [r14], xmm0
add r14, rbx
jmp short loc_8FAC5
loc_8FAA3:
movsd [rbp+var_38], xmm0
test ebx, ebx
jz short loc_8FAC5
lea rax, [rbx+rbp]
add rax, 0FFFFFFFFFFFFFFC8h
loc_8FAB4:
mov cl, [rax-1]
dec rax
mov [r14], cl
inc r14
cmp rax, r13
ja short loc_8FAB4
loc_8FAC5:
add r12d, ebx
cmp byte ptr [r15+38h], 0
lea r15, [r15+20h]
jnz short loc_8FA7A
jmp short loc_8FAFA
loc_8FAD5:
mov rdi, r14
xor esi, esi
mov rdx, rbx
call _memset
add r14, rbx
jmp short loc_8FAC5
loc_8FAE7:
call _my_thread_var
mov dword ptr [rax], 9Eh
xor r12d, r12d
jmp short loc_8FB0A
loc_8FAF7:
xor r12d, r12d
loc_8FAFA:
mov rdi, [rbp+var_40]
mov rsi, r14
mov rdx, [rbp+var_48]
call _mi_dpointer
loc_8FB0A:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_8FB2B
mov eax, r12d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8FB2B:
call ___stack_chk_fail
| long long sp_make_key(long long *a1, unsigned int a2, _QWORD *a3, long long a4, long long a5)
{
long long v6; // r15
long long v7; // r12
long long v8; // r13
unsigned __int8 *v9; // rbx
long long v10; // rdi
int v11; // eax
long long v12; // rcx
long long v13; // rbx
long long v14; // r15
unsigned int v15; // r12d
long long v16; // rbx
char *v17; // rax
char v18; // cl
bool v19; // zf
_OWORD v21[2]; // [rsp+0h] [rbp-70h] BYREF
long long v22; // [rsp+28h] [rbp-48h]
long long *v23; // [rsp+30h] [rbp-40h]
_QWORD v24[7]; // [rsp+38h] [rbp-38h] BYREF
v22 = a5;
v24[1] = __readfsqword(0x28u);
v23 = a1;
v6 = *(_QWORD *)(*a1 + 536);
v7 = 112LL * a2;
v8 = *(_QWORD *)(v6 + v7 + 40);
v9 = (unsigned __int8 *)(a4 + *(unsigned int *)(v8 - 24));
v10 = *(unsigned __int8 *)(v8 - 6);
v11 = mi_calc_blob_length(v10, v9);
v12 = *(_QWORD *)&v9[*(unsigned __int8 *)(v8 - 6)];
if ( v12 )
{
v13 = v6 + v7 + 40;
v24[0] = v12 + 4;
v21[0] = xmmword_DA0F0;
v21[1] = xmmword_DA0F0;
((void ( *)(_QWORD *, long long, _OWORD *, long long))sp_get_geometry_mbr_0)(
v24,
v12 + (unsigned int)(v11 - 4) + 4,
v21,
1LL);
v14 = *(_QWORD *)v13;
if ( *(_BYTE *)(*(_QWORD *)v13 + 24LL) )
{
v15 = 0;
do
{
v16 = *(unsigned __int16 *)(v14 + 20);
if ( (*(_BYTE *)(v14 + 18) & 0x40) != 0 )
{
v24[0] = *(_QWORD *)((char *)v21 + (*(_DWORD *)(v14 + 8) & 0xFFFFFFF8));
if ( (_DWORD)v16 )
{
v17 = (char *)v24 + v16;
do
{
v18 = *--v17;
*(_BYTE *)a3 = v18;
a3 = (_QWORD *)((char *)a3 + 1);
}
while ( v17 > (char *)v24 );
}
}
else
{
*a3 = *(_QWORD *)((char *)v21 + (*(_DWORD *)(v14 + 8) & 0xFFFFFFF8));
a3 = (_QWORD *)((char *)a3 + v16);
}
v15 += v16;
v19 = *(_BYTE *)(v14 + 56) == 0;
v14 += 32LL;
}
while ( !v19 );
}
else
{
v15 = 0;
}
mi_dpointer(v23, (long long)a3, v22);
}
else
{
*(_DWORD *)my_thread_var(v10, (const char *)v9) = 158;
return 0;
}
return v15;
}
| sp_make_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],R8
MOV R14,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x40],RDI
MOV RAX,qword ptr [RDI]
MOV R15,qword ptr [RAX + 0x218]
MOV EAX,ESI
IMUL R12,RAX,0x70
MOV R13,qword ptr [R15 + R12*0x1 + 0x28]
MOV EBX,dword ptr [R13 + -0x18]
ADD RBX,RCX
MOVZX EDI,byte ptr [R13 + -0x6]
MOV RSI,RBX
CALL 0x00179b6d
MOVZX ECX,byte ptr [R13 + -0x6]
MOV RCX,qword ptr [RCX + RBX*0x1]
TEST RCX,RCX
JZ 0x0018fae7
LEA RBX,[R15 + R12*0x1]
ADD RBX,0x28
LEA RDX,[RCX + 0x4]
ADD EAX,-0x4
LEA R13,[RBP + -0x38]
MOV qword ptr [R13],RDX
MOVAPD XMM0,xmmword ptr [0x001da0f0]
LEA RDX,[RBP + -0x70]
MOVAPD xmmword ptr [RDX],XMM0
MOVAPD xmmword ptr [RDX + 0x10],XMM0
LEA RSI,[RCX + RAX*0x1]
ADD RSI,0x4
MOV RDI,R13
MOV ECX,0x1
CALL 0x0018fb30
MOV R15,qword ptr [RBX]
CMP byte ptr [R15 + 0x18],0x0
JZ 0x0018faf7
XOR R12D,R12D
LAB_0018fa7a:
MOVZX EBX,word ptr [R15 + 0x14]
MOV EAX,dword ptr [R15 + 0x8]
AND EAX,0xfffffff8
MOVSD XMM0,qword ptr [RBP + RAX*0x1 + -0x70]
UCOMISD XMM0,XMM0
JP 0x0018fad5
TEST byte ptr [R15 + 0x12],0x40
JNZ 0x0018faa3
MOVSD qword ptr [R14],XMM0
ADD R14,RBX
JMP 0x0018fac5
LAB_0018faa3:
MOVSD qword ptr [RBP + -0x38],XMM0
TEST EBX,EBX
JZ 0x0018fac5
LEA RAX,[RBX + RBP*0x1]
ADD RAX,-0x38
LAB_0018fab4:
MOV CL,byte ptr [RAX + -0x1]
DEC RAX
MOV byte ptr [R14],CL
INC R14
CMP RAX,R13
JA 0x0018fab4
LAB_0018fac5:
ADD R12D,EBX
CMP byte ptr [R15 + 0x38],0x0
LEA R15,[R15 + 0x20]
JNZ 0x0018fa7a
JMP 0x0018fafa
LAB_0018fad5:
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
CALL 0x001292c0
ADD R14,RBX
JMP 0x0018fac5
LAB_0018fae7:
CALL 0x001a29fe
MOV dword ptr [RAX],0x9e
XOR R12D,R12D
JMP 0x0018fb0a
LAB_0018faf7:
XOR R12D,R12D
LAB_0018fafa:
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,R14
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x001862d3
LAB_0018fb0a:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0018fb2b
MOV EAX,R12D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018fb2b:
CALL 0x00129270
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int sp_make_key(long *param_1,ulong param_2,double *param_3,long param_4,int8 param_5)
{
int1 *puVar1;
char *pcVar2;
double dVar3;
ushort uVar4;
long lVar5;
int iVar6;
double *pdVar7;
int4 *puVar8;
ulong __n;
long lVar9;
long lVar10;
long in_FS_OFFSET;
double local_78 [5];
int8 local_50;
long *local_48;
double local_40;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar10 = *(long *)(*param_1 + 0x218);
lVar9 = (param_2 & 0xffffffff) * 0x70;
lVar5 = *(long *)(lVar10 + 0x28 + lVar9);
param_4 = (ulong)*(uint *)(lVar5 + -0x18) + param_4;
local_50 = param_5;
local_48 = param_1;
iVar6 = _mi_calc_blob_length(*(int1 *)(lVar5 + -6),param_4);
lVar5 = *(long *)((ulong)*(byte *)(lVar5 + -6) + param_4);
if (lVar5 == 0) {
puVar8 = (int4 *)_my_thread_var();
*puVar8 = 0x9e;
iVar6 = 0;
}
else {
local_40 = (double)(lVar5 + 4);
local_78[0] = _DAT_001da0f0;
local_78[1] = (double)_UNK_001da0f8;
local_78[2] = _DAT_001da0f0;
local_78[3] = (double)_UNK_001da0f8;
sp_get_geometry_mbr(&local_40,lVar5 + (ulong)(iVar6 - 4) + 4,local_78,1);
lVar10 = *(long *)(lVar10 + lVar9 + 0x28);
if (*(char *)(lVar10 + 0x18) == '\0') {
iVar6 = 0;
}
else {
iVar6 = 0;
do {
uVar4 = *(ushort *)(lVar10 + 0x14);
__n = (ulong)uVar4;
dVar3 = *(double *)((long)local_78 + (ulong)(*(uint *)(lVar10 + 8) & 0xfffffff8));
if (NAN(dVar3)) {
memset(param_3,0,__n);
param_3 = (double *)((long)param_3 + __n);
}
else if ((*(byte *)(lVar10 + 0x12) & 0x40) == 0) {
*param_3 = dVar3;
param_3 = (double *)((long)param_3 + __n);
}
else {
local_40 = dVar3;
if (uVar4 != 0) {
pdVar7 = (double *)((long)&local_40 + __n);
do {
puVar1 = (int1 *)((long)pdVar7 - 1);
pdVar7 = (double *)((long)pdVar7 - 1);
*(int1 *)param_3 = *puVar1;
param_3 = (double *)((long)param_3 + 1);
} while (&local_40 < pdVar7);
}
}
iVar6 = iVar6 + (uint)uVar4;
pcVar2 = (char *)(lVar10 + 0x38);
lVar10 = lVar10 + 0x20;
} while (*pcVar2 != '\0');
}
_mi_dpointer(local_48,param_3,local_50);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return iVar6;
}
| |
35,989 | inline_mysql_file_tell | eloqsql/include/mysql/psi/mysql_file.h | static inline my_off_t
inline_mysql_file_tell(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, myf flags)
{
my_off_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_TELL);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_tell(file, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_tell(file, flags);
return result;
} | O3 | c | inline_mysql_file_tell:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movl %edi, %ebx
leaq 0x3416a2(%rip), %rax # 0x3880c0
movq (%rax), %rax
leaq -0x60(%rbp), %rdi
movl %ebx, %esi
movl $0x9, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x46a49
movl %ebx, %edi
xorl %esi, %esi
callq 0xa1b30
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x18(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0x2a190
movq (%r14), %rax
jmp 0x46a40
| inline_mysql_file_tell:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov ebx, edi
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_60]
mov esi, ebx
mov edx, 9
call qword ptr [rax+158h]
test rax, rax
jnz short loc_46A49
mov edi, ebx
xor esi, esi
call my_tell
loc_46A40:
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_46A49:
lea r14, [rbp+var_18]
mov rdi, rax
mov esi, ebx
mov rdx, r14
call inline_mysql_file_tell_cold_1
mov rax, [r14]
jmp short loc_46A40
| long long inline_mysql_file_tell(unsigned int a1)
{
long long v1; // rax
_BYTE v3[72]; // [rsp+0h] [rbp-60h] BYREF
_QWORD v4[3]; // [rsp+48h] [rbp-18h] BYREF
v1 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v3, a1, 9LL);
if ( !v1 )
return my_tell(a1, 0LL);
inline_mysql_file_tell_cold_1(v1, a1, v4);
return v4[0];
}
| inline_mysql_file_tell:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV EBX,EDI
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x60]
MOV ESI,EBX
MOV EDX,0x9
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00146a49
MOV EDI,EBX
XOR ESI,ESI
CALL 0x001a1b30
LAB_00146a40:
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_00146a49:
LEA R14,[RBP + -0x18]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x0012a190
MOV RAX,qword ptr [R14]
JMP 0x00146a40
|
int8 inline_mysql_file_tell(int4 param_1)
{
long lVar1;
int1 local_68 [72];
int8 local_20;
lVar1 = (**(code **)(PSI_server + 0x158))(local_68,param_1,9);
if (lVar1 == 0) {
local_20 = my_tell(param_1,0);
}
else {
inline_mysql_file_tell_cold_1(lVar1,param_1,&local_20);
}
return local_20;
}
| |
35,990 | ps_fetch_bin | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static
void ps_fetch_bin(MYSQL_BIND *r_param,
const MYSQL_FIELD *field,
unsigned char **row)
{
if (field->charsetnr == 63)
{
ulong field_length= *r_param->length= net_field_length(row);
uchar *current_pos= (*row) + r_param->offset,
*end= (*row) + field_length;
size_t copylen= 0;
if (current_pos < end)
{
copylen= end - current_pos;
if (r_param->buffer_length)
memcpy(r_param->buffer, current_pos, MIN(copylen, r_param->buffer_length));
}
if (copylen < r_param->buffer_length &&
(r_param->buffer_type == MYSQL_TYPE_STRING ||
r_param->buffer_type == MYSQL_TYPE_JSON))
((char *)r_param->buffer)[copylen]= 0;
*r_param->error= copylen > r_param->buffer_length;
(*row)+= field_length;
}
else
ps_fetch_string(r_param, field, row);
} | O0 | c | ps_fetch_bin:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x3f, 0x6c(%rax)
jne 0x33d3a
movq -0x18(%rbp), %rdi
callq 0x1a960
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq %rax, (%rcx)
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
addq 0x48(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x33cd2
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x33cd0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x33cb3
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x33cbf
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rdx
callq 0x13370
jmp 0x33cd2
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x33d0a
movq -0x8(%rbp), %rax
cmpl $0xfe, 0x60(%rax)
je 0x33cfa
movq -0x8(%rbp), %rax
cmpl $0xf5, 0x60(%rax)
jne 0x33d0a
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x40(%rcx), %rax
seta %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x33d4b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x33bb0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ps_fetch_bin:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
cmp dword ptr [rax+6Ch], 3Fh ; '?'
jnz loc_33D3A
mov rdi, [rbp+var_18]
call net_field_length
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov [rcx], rax
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov rcx, [rbp+var_8]
add rax, [rcx+48h]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov rax, [rax]
add rax, [rbp+var_20]
mov [rbp+var_30], rax
mov [rbp+var_38], 0
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnb short loc_33CD2
mov rax, [rbp+var_30]
mov rcx, [rbp+var_28]
sub rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+40h], 0
jz short loc_33CD0
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
cmp rax, [rcx+40h]
jnb short loc_33CB3
mov rax, [rbp+var_38]
mov [rbp+var_50], rax
jmp short loc_33CBF
loc_33CB3:
mov rax, [rbp+var_8]
mov rax, [rax+40h]
mov [rbp+var_50], rax
loc_33CBF:
mov rsi, [rbp+var_40]
mov rdi, [rbp+var_48]
mov rdx, [rbp+var_50]
call _memcpy
loc_33CD0:
jmp short $+2
loc_33CD2:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
cmp rax, [rcx+40h]
jnb short loc_33D0A
mov rax, [rbp+var_8]
cmp dword ptr [rax+60h], 0FEh
jz short loc_33CFA
mov rax, [rbp+var_8]
cmp dword ptr [rax+60h], 0F5h
jnz short loc_33D0A
loc_33CFA:
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rcx, [rbp+var_38]
mov byte ptr [rax+rcx], 0
loc_33D0A:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
cmp rax, [rcx+40h]
setnbe al
and al, 1
movzx eax, al
mov cl, al
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rax], cl
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
add rcx, [rax]
mov [rax], rcx
jmp short loc_33D4B
loc_33D3A:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call ps_fetch_string
loc_33D4B:
add rsp, 50h
pop rbp
retn
| unsigned __int8 ** ps_fetch_bin(long long a1, long long a2, unsigned __int8 **a3)
{
long long v3; // rax
unsigned __int8 **result; // rax
long long v5; // [rsp+8h] [rbp-48h]
unsigned long long v6; // [rsp+18h] [rbp-38h]
unsigned __int8 *v7; // [rsp+20h] [rbp-30h]
unsigned __int8 *v8; // [rsp+28h] [rbp-28h]
long long v9; // [rsp+30h] [rbp-20h]
if ( *(_DWORD *)(a2 + 108) != 63 )
return ps_fetch_string(a1, a2, a3);
v3 = net_field_length(a3);
**(_QWORD **)a1 = v3;
v9 = v3;
v8 = &(*a3)[*(_QWORD *)(a1 + 72)];
v7 = &(*a3)[v3];
v6 = 0LL;
if ( v8 < v7 )
{
v6 = v7 - v8;
if ( *(_QWORD *)(a1 + 64) )
{
v5 = *(_QWORD *)(a1 + 16);
if ( v6 >= *(_QWORD *)(a1 + 64) )
memcpy(v5, v8, *(_QWORD *)(a1 + 64));
else
memcpy(v5, v8, v6);
}
}
if ( v6 < *(_QWORD *)(a1 + 64) && (*(_DWORD *)(a1 + 96) == 254 || *(_DWORD *)(a1 + 96) == 245) )
*(_BYTE *)(*(_QWORD *)(a1 + 16) + v6) = 0;
**(_BYTE **)(a1 + 24) = v6 > *(_QWORD *)(a1 + 64);
result = a3;
*a3 += v9;
return result;
}
| ps_fetch_bin:
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 RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x6c],0x3f
JNZ 0x00133d3a
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0011a960
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RCX],RAX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RCX + 0x48]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x00133cd2
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x00133cd0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x40]
JNC 0x00133cb3
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00133cbf
LAB_00133cb3:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x50],RAX
LAB_00133cbf:
MOV RSI,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x00113370
LAB_00133cd0:
JMP 0x00133cd2
LAB_00133cd2:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x40]
JNC 0x00133d0a
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x60],0xfe
JZ 0x00133cfa
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x60],0xf5
JNZ 0x00133d0a
LAB_00133cfa:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_00133d0a:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x40]
SETA AL
AND AL,0x1
MOVZX EAX,AL
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
JMP 0x00133d4b
LAB_00133d3a:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00133bb0
LAB_00133d4b:
ADD RSP,0x50
POP RBP
RET
|
void ps_fetch_bin(int8 *param_1,long param_2,long *param_3)
{
long lVar1;
void *__src;
size_t local_58;
ulong local_40;
if (*(int *)(param_2 + 0x6c) == 0x3f) {
lVar1 = net_field_length(param_3);
*(long *)*param_1 = lVar1;
__src = (void *)(*param_3 + param_1[9]);
local_40 = 0;
if ((__src < (void *)(*param_3 + lVar1)) &&
(local_40 = (*param_3 + lVar1) - (long)__src, param_1[8] != 0)) {
local_58 = local_40;
if ((ulong)param_1[8] <= local_40) {
local_58 = param_1[8];
}
memcpy((void *)param_1[2],__src,local_58);
}
if ((local_40 < (ulong)param_1[8]) &&
((*(int *)(param_1 + 0xc) == 0xfe || (*(int *)(param_1 + 0xc) == 0xf5)))) {
*(int1 *)(param_1[2] + local_40) = 0;
}
*(bool *)param_1[3] = (ulong)param_1[8] < local_40;
*param_3 = lVar1 + *param_3;
}
else {
ps_fetch_string(param_1,param_2,param_3);
}
return;
}
| |
35,991 | SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _generate_union_rule(const std::string & name, const std::vector<json> & alt_schemas) {
std::vector<std::string> rules;
for (size_t i = 0; i < alt_schemas.size(); i++) {
rules.push_back(visit(alt_schemas[i], name + (name.empty() ? "alternative-" : "-") + std::to_string(i)));
}
return string_join(rules, " | ");
} | O2 | cpp | SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, %r14
movq %rdx, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
xorl %r13d, %r13d
xorl %ebp, %ebp
movq (%r14), %rbx
movq 0x8(%r14), %rax
subq %rbx, %rax
sarq $0x4, %rax
cmpq %rax, %rbp
jae 0x908b5
movq 0x18(%rsp), %rsi
cmpq $0x0, 0x8(%rsi)
leaq 0x1f283(%rip), %rdx # 0xafaa3
leaq 0x2815c(%rip), %rax # 0xb8983
cmoveq %rax, %rdx
leaq 0x58(%rsp), %rdi
callq 0x384fb
leaq 0x78(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x41c6f
leaq 0x98(%rsp), %r15
movq %r15, %rdi
leaq 0x58(%rsp), %rsi
movq %r12, %rdx
callq 0x3956b
addq %r13, %rbx
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x8e954
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x3ad50
movq %r12, %rdi
callq 0x241f8
movq %r15, %rdi
callq 0x241f8
leaq 0x78(%rsp), %rdi
callq 0x241f8
leaq 0x58(%rsp), %rdi
callq 0x241f8
incq %rbp
addq $0x10, %r13
jmp 0x907f8
leaq 0x2827e(%rip), %rsi # 0xb8b3a
leaq 0x38(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x27686
leaq 0x20(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x53dda
leaq 0x38(%rsp), %rdi
callq 0x241f8
leaq 0x20(%rsp), %rdi
callq 0x276c2
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x90952
jmp 0x90959
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x241f8
jmp 0x9092c
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x241f8
jmp 0x90943
movq %rax, %rbx
jmp 0x9094d
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x241f8
leaq 0x58(%rsp), %rdi
callq 0x241f8
jmp 0x9095c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x276c2
movq %rbx, %rdi
callq 0x23fc0
| _ZN15SchemaConverter20_generate_union_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapES8_S5_blmdSaNSA_14adl_serializerES8_IhSaIhEEvEESaISG_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r14, rcx
mov [rsp+0E8h+var_D0], rdx
mov [rsp+0E8h+var_D8], rsi
mov [rsp+0E8h+var_E0], rdi
xorps xmm0, xmm0
lea rax, [rsp+0E8h+var_C8]
movaps xmmword ptr [rax], xmm0
and qword ptr [rax+10h], 0
xor r13d, r13d
xor ebp, ebp
loc_907F8:
mov rbx, [r14]
mov rax, [r14+8]
sub rax, rbx
sar rax, 4
cmp rbp, rax
jnb loc_908B5
mov rsi, [rsp+0E8h+var_D0]
cmp qword ptr [rsi+8], 0
lea rdx, asc_AFAA2+1; "-"
lea rax, aAlternative; "alternative-"
cmovz rdx, rax
lea rdi, [rsp+0E8h+var_90]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
lea r12, [rsp+0E8h+var_70]
mov rdi, r12; this
mov rsi, rbp; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea r15, [rsp+0E8h+var_50]
mov rdi, r15
lea rsi, [rsp+0E8h+var_90]
mov rdx, r12
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
add rbx, r13
lea r12, [rsp+0E8h+var_B0]
mov rdi, r12
mov rsi, [rsp+0E8h+var_D8]
mov rdx, rbx
mov rcx, r15
call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,std::string const&)
lea rdi, [rsp+0E8h+var_C8]
mov rsi, r12
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
inc rbp
add r13, 10h
jmp loc_907F8
loc_908B5:
lea rsi, asc_B8B39+1; " | "
lea rdi, [rsp+0E8h+var_B0]
lea rdx, [rsp+0E8h+var_50]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, [rsp+0E8h+var_C8]
lea rdx, [rsp+0E8h+var_B0]
mov rbx, [rsp+0E8h+var_E0]
mov rdi, rbx
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rdi, [rsp+0E8h+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_C8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, rbx
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_30]
jmp short loc_90952
jmp short loc_90959
mov rbx, rax
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_9092C
mov rbx, rax
loc_9092C:
lea rdi, [rsp+arg_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_90943
mov rbx, rax
jmp short loc_9094D
mov rbx, rax
loc_90943:
lea rdi, [rsp+arg_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_9094D:
lea rdi, [rsp+arg_50]; void *
loc_90952:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_9095C
loc_90959:
mov rbx, rax
loc_9095C:
lea rdi, [rsp+arg_18]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, rbx
call __Unwind_Resume
| long long SchemaConverter::_generate_union_rule(long long a1, long long a2, long long a3, long long *a4)
{
long long v5; // r13
unsigned long long i; // rbp
long long v7; // rbx
char *v8; // rdx
__int128 v11; // [rsp+20h] [rbp-C8h] BYREF
long long v12; // [rsp+30h] [rbp-B8h]
_QWORD v13[4]; // [rsp+38h] [rbp-B0h] BYREF
_QWORD v14[4]; // [rsp+58h] [rbp-90h] BYREF
_QWORD v15[4]; // [rsp+78h] [rbp-70h] BYREF
_BYTE v16[80]; // [rsp+98h] [rbp-50h] BYREF
v11 = 0LL;
v12 = 0LL;
v5 = 0LL;
for ( i = 0LL; ; ++i )
{
v7 = *a4;
if ( i >= (a4[1] - *a4) >> 4 )
break;
v8 = "-";
if ( !*(_QWORD *)(a3 + 8) )
v8 = "alternative-";
std::operator+<char>((long long)v14, a3, (long long)v8);
std::to_string((std::__cxx11 *)v15, i);
std::operator+<char>((long long)v16, v14, v15);
SchemaConverter::visit(v13, a2, (unsigned __int8 *)(v5 + v7), (long long)v16, (__m128d)0LL);
std::vector<std::string>::emplace_back<std::string>((long long)&v11, (long long)v13);
std::string::~string(v13);
std::string::~string(v16);
std::string::~string(v15);
std::string::~string(v14);
v5 += 16LL;
}
std::string::basic_string<std::allocator<char>>(v13, (long long)" | ");
string_join(a1, (long long *)&v11, (long long)v13);
std::string::~string(v13);
std::vector<std::string>::~vector((long long)&v11);
return a1;
}
| _generate_union_rule:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R14,RCX
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDI
XORPS XMM0,XMM0
LEA RAX,[RSP + 0x20]
MOVAPS xmmword ptr [RAX],XMM0
AND qword ptr [RAX + 0x10],0x0
XOR R13D,R13D
XOR EBP,EBP
LAB_001907f8:
MOV RBX,qword ptr [R14]
MOV RAX,qword ptr [R14 + 0x8]
SUB RAX,RBX
SAR RAX,0x4
CMP RBP,RAX
JNC 0x001908b5
MOV RSI,qword ptr [RSP + 0x18]
CMP qword ptr [RSI + 0x8],0x0
LEA RDX,[0x1afaa3]
LEA RAX,[0x1b8983]
CMOVZ RDX,RAX
LAB_0019082b:
LEA RDI,[RSP + 0x58]
CALL 0x001384fb
LAB_00190835:
LEA R12,[RSP + 0x78]
MOV RDI,R12
MOV RSI,RBP
CALL 0x00141c6f
LAB_00190845:
LEA R15,[RSP + 0x98]
MOV RDI,R15
LEA RSI,[RSP + 0x58]
MOV RDX,R12
CALL 0x0013956b
LAB_0019085d:
ADD RBX,R13
LEA R12,[RSP + 0x38]
MOV RDI,R12
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RBX
MOV RCX,R15
CALL 0x0018e954
LAB_00190878:
LEA RDI,[RSP + 0x20]
MOV RSI,R12
CALL 0x0013ad50
MOV RDI,R12
CALL 0x001241f8
MOV RDI,R15
CALL 0x001241f8
LEA RDI,[RSP + 0x78]
CALL 0x001241f8
LEA RDI,[RSP + 0x58]
CALL 0x001241f8
INC RBP
ADD R13,0x10
JMP 0x001907f8
LAB_001908b5:
LEA RSI,[0x1b8b3a]
LEA RDI,[RSP + 0x38]
LEA RDX,[RSP + 0x98]
CALL 0x00127686
LAB_001908ce:
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0x38]
MOV RBX,qword ptr [RSP + 0x8]
MOV RDI,RBX
CALL 0x00153dda
LAB_001908e5:
LEA RDI,[RSP + 0x38]
CALL 0x001241f8
LEA RDI,[RSP + 0x20]
CALL 0x001276c2
MOV RAX,RBX
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::_generate_union_rule(std::__cxx11::string const&,
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > const&) */
string * SchemaConverter::_generate_union_rule(string *param_1,vector *param_2)
{
long *in_RCX;
char *in_RDX;
ulong uVar1;
int8 local_c8;
int8 uStack_c0;
int8 local_b8;
string local_b0 [32];
string local_90 [32];
__cxx11 local_70 [32];
string local_50 [32];
local_c8 = 0;
uStack_c0 = 0;
local_b8 = 0;
for (uVar1 = 0; uVar1 < (ulong)(in_RCX[1] - *in_RCX >> 4); uVar1 = uVar1 + 1) {
/* try { // try from 0019082b to 00190834 has its CatchHandler @ 00190959 */
std::operator+(local_90,in_RDX);
/* try { // try from 00190835 to 00190844 has its CatchHandler @ 0019093b */
std::__cxx11::to_string(local_70,uVar1);
/* try { // try from 00190845 to 0019085c has its CatchHandler @ 00190940 */
std::operator+(local_50,local_90);
/* try { // try from 0019085d to 00190877 has its CatchHandler @ 00190929 */
visit(local_b0,(string *)param_2);
/* try { // try from 00190878 to 00190884 has its CatchHandler @ 0019091a */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c8,
local_b0);
std::__cxx11::string::~string(local_b0);
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string((string *)local_70);
std::__cxx11::string::~string(local_90);
}
/* try { // try from 001908b5 to 001908cd has its CatchHandler @ 00190918 */
std::__cxx11::string::string<std::allocator<char>>(local_b0," | ",(allocator *)local_50);
/* try { // try from 001908ce to 001908e4 has its CatchHandler @ 0019090e */
string_join(param_1,(string *)&local_c8);
std::__cxx11::string::~string(local_b0);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c8);
return param_1;
}
| |
35,992 | nglog::LogDestination::SetLogFilenameExtension(char const*) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::SetLogFilenameExtension(const char* ext) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
std::lock_guard<std::mutex> l{log_mutex};
for (int severity = 0; severity < NUM_SEVERITIES; ++severity) {
log_destination(static_cast<LogSeverity>(severity))
->fileobject_.SetExtension(ext);
}
} | O2 | cpp | nglog::LogDestination::SetLogFilenameExtension(char const*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x2e80b(%rip), %rdi # 0x3ccb8
callq 0x1aa54
xorl %r14d, %r14d
cmpl $0x4, %r14d
je 0xe526
movl %r14d, %edi
callq 0xe068
movq %rax, %r12
leaq 0x8(%rax), %r15
movq %r15, %rdi
callq 0x1aa54
leaq 0x78(%r12), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0xefca
testb %al, %al
je 0xe519
cmpq $0x0, 0x98(%r12)
je 0xe50e
movq %r12, %rdi
addq $0x98, %rdi
xorl %esi, %esi
callq 0xe78e
movl $0x1f, 0xb0(%r12)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x7a90
movq %r15, %rdi
callq 0x7450
incl %r14d
jmp 0xe4b5
leaq 0x2e78b(%rip), %rdi # 0x3ccb8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x7450
movq %rax, %rbx
movq %r15, %rdi
callq 0x7450
jmp 0xe54b
movq %rax, %rbx
leaq 0x2e766(%rip), %rdi # 0x3ccb8
callq 0x7450
movq %rbx, %rdi
callq 0x7a00
nop
| _ZN5nglog14LogDestination23SetLogFilenameExtensionEPKc:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdi
lea rdi, _ZN5nglogL9log_mutexE; this
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
xor r14d, r14d
loc_E4B5:
cmp r14d, 4
jz short loc_E526
mov edi, r14d
call _ZN5nglog14LogDestination15log_destinationENS_11LogSeverityE; nglog::LogDestination::log_destination(nglog::LogSeverity)
mov r12, rax
lea r15, [rax+8]
mov rdi, r15; this
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
lea r13, [r12+78h]
mov rdi, r13
mov rsi, rbx
call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator!=<char>(std::string const&,char const*)
test al, al
jz short loc_E519
cmp qword ptr [r12+98h], 0
jz short loc_E50E
mov rdi, r12
add rdi, 98h
xor esi, esi
call _ZNSt15__uniq_ptr_implI8_IO_FILESt14default_deleteIS0_EE5resetEPS0_; std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset(_IO_FILE*)
mov dword ptr [r12+0B0h], 1Fh
loc_E50E:
mov rdi, r13
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
loc_E519:
mov rdi, r15
call _pthread_mutex_unlock
inc r14d
jmp short loc_E4B5
loc_E526:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp _pthread_mutex_unlock
mov rbx, rax
mov rdi, r15
call _pthread_mutex_unlock
jmp short loc_E54B
mov rbx, rax
loc_E54B:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogDestination::SetLogFilenameExtension(nglog::LogDestination *this, const char *a2)
{
int i; // r14d
long long v3; // r12
std::mutex::lock((std::mutex *)&nglog::log_mutex);
for ( i = 0; i != 4; ++i )
{
v3 = nglog::LogDestination::log_destination(i);
std::mutex::lock((std::mutex *)(v3 + 8));
if ( (unsigned __int8)std::operator!=<char>(v3 + 120, this) )
{
if ( *(_QWORD *)(v3 + 152) )
{
std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset(v3 + 152, 0LL);
*(_DWORD *)(v3 + 176) = 31;
}
std::string::assign(v3 + 120, this);
}
pthread_mutex_unlock(v3 + 8);
}
return pthread_mutex_unlock(&nglog::log_mutex);
}
| SetLogFilenameExtension:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDI
LEA RDI,[0x13ccb8]
CALL 0x0011aa54
XOR R14D,R14D
LAB_0010e4b5:
CMP R14D,0x4
JZ 0x0010e526
LAB_0010e4bb:
MOV EDI,R14D
CALL 0x0010e068
MOV R12,RAX
LEA R15,[RAX + 0x8]
MOV RDI,R15
CALL 0x0011aa54
LEA R13,[R12 + 0x78]
LAB_0010e4d7:
MOV RDI,R13
MOV RSI,RBX
CALL 0x0010efca
TEST AL,AL
JZ 0x0010e519
CMP qword ptr [R12 + 0x98],0x0
JZ 0x0010e50e
MOV RDI,R12
ADD RDI,0x98
XOR ESI,ESI
CALL 0x0010e78e
MOV dword ptr [R12 + 0xb0],0x1f
LAB_0010e50e:
MOV RDI,R13
MOV RSI,RBX
CALL 0x00107a90
LAB_0010e519:
MOV RDI,R15
CALL 0x00107450
INC R14D
JMP 0x0010e4b5
LAB_0010e526:
LEA RDI,[0x13ccb8]
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x00107450
|
/* nglog::LogDestination::SetLogFilenameExtension(char const*) */
void nglog::LogDestination::SetLogFilenameExtension(char *param_1)
{
bool bVar1;
long lVar2;
int iVar3;
std::mutex::lock((mutex *)log_mutex);
for (iVar3 = 0; iVar3 != 4; iVar3 = iVar3 + 1) {
/* try { // try from 0010e4bb to 0010e4d1 has its CatchHandler @ 0010e548 */
lVar2 = log_destination(iVar3);
std::mutex::lock((mutex *)&((pthread_mutex_t *)(lVar2 + 8))->__data);
/* try { // try from 0010e4d7 to 0010e518 has its CatchHandler @ 0010e53b */
bVar1 = std::operator!=((string *)(lVar2 + 0x78),param_1);
if (bVar1) {
if (*(long *)(lVar2 + 0x98) != 0) {
std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset
((__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>> *)(lVar2 + 0x98),
(_IO_FILE *)0x0);
*(int4 *)(lVar2 + 0xb0) = 0x1f;
}
std::__cxx11::string::assign((char *)(lVar2 + 0x78));
}
pthread_mutex_unlock((pthread_mutex_t *)(lVar2 + 8));
}
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return;
}
| |
35,993 | nglog::LogDestination::SetLogFilenameExtension(char const*) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::SetLogFilenameExtension(const char* ext) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
std::lock_guard<std::mutex> l{log_mutex};
for (int severity = 0; severity < NUM_SEVERITIES; ++severity) {
log_destination(static_cast<LogSeverity>(severity))
->fileobject_.SetExtension(ext);
}
} | O3 | cpp | nglog::LogDestination::SetLogFilenameExtension(char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2df61(%rip), %rdi # 0x3ec58
callq 0x7820
testl %eax, %eax
jne 0x10dff
leaq 0x1ee95(%rip), %r14 # 0x2fba0
xorl %r15d, %r15d
movq (%r14), %r12
testq %r12, %r12
jne 0x10d4e
movl $0xd0, %edi
callq 0x7530
movq %rax, %r13
movq %rax, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x942c
movq $0x0, (%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x117da
movq %rsp, %rdi
callq 0x1033c
movq (%r14), %r12
leaq 0x8(%r12), %r13
movq %r13, %rdi
callq 0x7820
testl %eax, %eax
jne 0x10df8
leaq 0x78(%r12), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x7100
testl %eax, %eax
je 0x10dc4
movq 0x98(%r12), %rdi
testq %rdi, %rdi
je 0x10da1
movq $0x0, 0x98(%r12)
callq 0x7520
movl $0x1f, 0xb0(%r12)
movq 0x80(%r12), %r12
movq %rbx, %rdi
callq 0x71f0
movq %rbp, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x7880
movq %r13, %rdi
callq 0x73e0
incq %r15
addq $0x8, %r14
cmpq $0x4, %r15
jne 0x10d0e
leaq 0x2de74(%rip), %rdi # 0x3ec58
callq 0x73e0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x7350
movl %eax, %edi
callq 0x7350
jmp 0x10e27
movq %rax, %rbx
movl $0xd0, %esi
movq %r13, %rdi
callq 0x7540
jmp 0x10e2a
movq %rax, %rbx
movq %r13, %rdi
callq 0x73e0
jmp 0x10e2a
movq %rax, %rbx
leaq 0x2de27(%rip), %rdi # 0x3ec58
callq 0x73e0
movq %rbx, %rdi
callq 0x7980
| _ZN5nglog14LogDestination23SetLogFilenameExtensionEPKc:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_10DFF
lea r14, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
xor r15d, r15d
loc_10D0E:
mov r12, [r14]
test r12, r12
jnz short loc_10D4E
mov edi, 0D0h; unsigned __int64
call __Znwm; operator new(ulong)
mov r13, rax
mov rdi, rax
mov esi, r15d
xor edx, edx
call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*)
mov [rsp+38h+var_38], 0
mov rdi, r14
mov rsi, r13
call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*)
mov rdi, rsp
call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr()
mov r12, [r14]
loc_10D4E:
lea r13, [r12+8]
mov rdi, r13
call _pthread_mutex_lock
test eax, eax
jnz loc_10DF8
lea rbp, [r12+78h]
mov rdi, rbp
mov rsi, rbx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_10DC4
mov rdi, [r12+98h]
test rdi, rdi
jz short loc_10DA1
mov qword ptr [r12+98h], 0
call _fclose
mov dword ptr [r12+0B0h], 1Fh
loc_10DA1:
mov r12, [r12+80h]
mov rdi, rbx
call _strlen
mov rdi, rbp
xor esi, esi
mov rdx, r12
mov rcx, rbx
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
loc_10DC4:
mov rdi, r13
call _pthread_mutex_unlock
inc r15
add r14, 8
cmp r15, 4
jnz loc_10D0E
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_10DF8:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
loc_10DFF:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
jmp short loc_10E27
mov rbx, rax
mov esi, 0D0h; unsigned __int64
mov rdi, r13; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_10E2A
mov rbx, rax
mov rdi, r13
call _pthread_mutex_unlock
jmp short loc_10E2A
loc_10E27:
mov rbx, rax
loc_10E2A:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogDestination::SetLogFilenameExtension(nglog::LogDestination *this, const char *a2)
{
nglog::LogDestination *v2; // rax
int v4; // eax
long long *v5; // r14
long long i; // r15
long long v7; // r12
long long v8; // r13
long long v9; // r13
int v10; // eax
long long v11; // rbp
long long v12; // rdi
long long v13; // r12
long long v14; // rax
nglog::LogDestination *v16; // [rsp+0h] [rbp-38h] BYREF
v16 = v2;
v4 = pthread_mutex_lock(&nglog::log_mutex);
if ( v4 )
std::__throw_system_error(v4);
v5 = nglog::LogDestination::log_destinations_;
for ( i = 0LL; i != 4; ++i )
{
v7 = *v5;
if ( !*v5 )
{
v8 = operator new(0xD0uLL);
nglog::LogDestination::LogDestination(v8, i, 0LL);
v16 = 0LL;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(v5, v8);
std::unique_ptr<nglog::LogDestination>::~unique_ptr(&v16);
v7 = *v5;
}
v9 = v7 + 8;
v10 = pthread_mutex_lock(v7 + 8);
if ( v10 )
std::__throw_system_error(v10);
v11 = v7 + 120;
if ( (unsigned int)std::string::compare(v7 + 120, this) )
{
v12 = *(_QWORD *)(v7 + 152);
if ( v12 )
{
*(_QWORD *)(v7 + 152) = 0LL;
fclose(v12);
*(_DWORD *)(v7 + 176) = 31;
}
v13 = *(_QWORD *)(v7 + 128);
v14 = strlen(this);
std::string::_M_replace(v11, 0LL, v13, this, v14);
}
pthread_mutex_unlock(v9);
++v5;
}
return pthread_mutex_unlock(&nglog::log_mutex);
}
| SetLogFilenameExtension:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RDI,[0x13ec58]
CALL 0x00107820
TEST EAX,EAX
JNZ 0x00110dff
LEA R14,[0x12fba0]
XOR R15D,R15D
LAB_00110d0e:
MOV R12,qword ptr [R14]
TEST R12,R12
JNZ 0x00110d4e
LAB_00110d16:
MOV EDI,0xd0
CALL 0x00107530
LAB_00110d20:
MOV R13,RAX
MOV RDI,RAX
MOV ESI,R15D
XOR EDX,EDX
CALL 0x0010942c
MOV qword ptr [RSP],0x0
MOV RDI,R14
MOV RSI,R13
CALL 0x001117da
MOV RDI,RSP
CALL 0x0011033c
MOV R12,qword ptr [R14]
LAB_00110d4e:
LEA R13,[R12 + 0x8]
MOV RDI,R13
CALL 0x00107820
TEST EAX,EAX
JNZ 0x00110df8
LEA RBP,[R12 + 0x78]
MOV RDI,RBP
MOV RSI,RBX
CALL 0x00107100
TEST EAX,EAX
JZ 0x00110dc4
MOV RDI,qword ptr [R12 + 0x98]
TEST RDI,RDI
JZ 0x00110da1
MOV qword ptr [R12 + 0x98],0x0
CALL 0x00107520
MOV dword ptr [R12 + 0xb0],0x1f
LAB_00110da1:
MOV R12,qword ptr [R12 + 0x80]
MOV RDI,RBX
CALL 0x001071f0
LAB_00110db1:
MOV RDI,RBP
XOR ESI,ESI
MOV RDX,R12
MOV RCX,RBX
MOV R8,RAX
CALL 0x00107880
LAB_00110dc4:
MOV RDI,R13
CALL 0x001073e0
INC R15
ADD R14,0x8
CMP R15,0x4
JNZ 0x00110d0e
LEA RDI,[0x13ec58]
CALL 0x001073e0
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00110df8:
MOV EDI,EAX
CALL 0x00107350
LAB_00110dff:
MOV EDI,EAX
CALL 0x00107350
|
/* nglog::LogDestination::SetLogFilenameExtension(char const*) */
void nglog::LogDestination::SetLogFilenameExtension(char *param_1)
{
FILE *__stream;
char *pcVar1;
int iVar2;
int8 in_RAX;
LogDestination *pLVar3;
long lVar4;
__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *this;
ulong uVar5;
int8 local_38;
local_38 = in_RAX;
iVar2 = pthread_mutex_lock((pthread_mutex_t *)log_mutex);
if (iVar2 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar2);
}
this = (__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
&log_destinations_;
uVar5 = 0;
do {
lVar4 = *(long *)this;
if (lVar4 == 0) {
/* try { // try from 00110d16 to 00110d1f has its CatchHandler @ 00110e06 */
pLVar3 = (LogDestination *)operator_new(0xd0);
/* try { // try from 00110d20 to 00110d2f has its CatchHandler @ 00110e08 */
LogDestination(pLVar3,uVar5 & 0xffffffff,0);
local_38 = 0;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset
(this,pLVar3);
std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::~unique_ptr
((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
&local_38);
lVar4 = *(long *)this;
}
iVar2 = pthread_mutex_lock((pthread_mutex_t *)(lVar4 + 8));
if (iVar2 != 0) {
/* try { // try from 00110df8 to 00110dfe has its CatchHandler @ 00110e27 */
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar2);
}
iVar2 = std::__cxx11::string::compare((char *)(lVar4 + 0x78));
if (iVar2 != 0) {
__stream = *(FILE **)(lVar4 + 0x98);
if (__stream != (FILE *)0x0) {
*(int8 *)(lVar4 + 0x98) = 0;
fclose(__stream);
*(int4 *)(lVar4 + 0xb0) = 0x1f;
}
pcVar1 = *(char **)(lVar4 + 0x80);
strlen(param_1);
/* try { // try from 00110db1 to 00110dc3 has its CatchHandler @ 00110e1a */
std::__cxx11::string::_M_replace((ulong)(lVar4 + 0x78),0,pcVar1,(ulong)param_1);
}
pthread_mutex_unlock((pthread_mutex_t *)(lVar4 + 8));
uVar5 = uVar5 + 1;
this = this + 8;
} while (uVar5 != 4);
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return;
}
| |
35,994 | nlohmann::json_abi_v3_11_3::detail::lexer<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>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan() | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | token_type scan()
{
// initially, skip the BOM
if (position.chars_read_total == 0 && !skip_bom())
{
error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
return token_type::parse_error;
}
// read next character and ignore whitespace
skip_whitespace();
// ignore comments
while (ignore_comments && current == '/')
{
if (!scan_comment())
{
return token_type::parse_error;
}
// skip following whitespace
skip_whitespace();
}
switch (current)
{
// structural characters
case '[':
return token_type::begin_array;
case ']':
return token_type::end_array;
case '{':
return token_type::begin_object;
case '}':
return token_type::end_object;
case ':':
return token_type::name_separator;
case ',':
return token_type::value_separator;
// literals
case 't':
{
std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}};
return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true);
}
case 'f':
{
std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}};
return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false);
}
case 'n':
{
std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}};
return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null);
}
// string
case '\"':
return scan_string();
// number
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
return scan_number();
// end of input (the null byte is needed when parsing from
// string literals)
case '\0':
case char_traits<char_type>::eof():
return token_type::end_of_input;
// error
default:
error_message = "invalid literal";
return token_type::parse_error;
}
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<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>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan():
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, 0x20(%rax)
jne 0x74373
movq -0x28(%rbp), %rdi
callq 0x603a0
testb $0x1, %al
jne 0x74373
movq -0x28(%rbp), %rax
leaq 0x19eba(%rip), %rcx # 0x8e21d
movq %rcx, 0x70(%rax)
movl $0xe, -0x4(%rbp)
jmp 0x7452c
movq -0x28(%rbp), %rdi
callq 0x5feb0
movq -0x28(%rbp), %rcx
xorl %eax, %eax
testb $0x1, 0x10(%rcx)
movb %al, -0x29(%rbp)
je 0x74399
movq -0x28(%rbp), %rax
cmpl $0x2f, 0x14(%rax)
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x743a2
jmp 0x743c6
movq -0x28(%rbp), %rdi
callq 0x60b90
testb $0x1, %al
jne 0x743bb
movl $0xe, -0x4(%rbp)
jmp 0x7452c
movq -0x28(%rbp), %rdi
callq 0x5feb0
jmp 0x7437c
movq -0x28(%rbp), %rax
movl 0x14(%rax), %eax
incl %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x7e, %eax
ja 0x74516
movq -0x38(%rbp), %rax
leaq 0x17e67(%rip), %rcx # 0x8c250
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x8, -0x4(%rbp)
jmp 0x7452c
movl $0xa, -0x4(%rbp)
jmp 0x7452c
movl $0x9, -0x4(%rbp)
jmp 0x7452c
movl $0xb, -0x4(%rbp)
jmp 0x7452c
movl $0xc, -0x4(%rbp)
jmp 0x7452c
movl $0xd, -0x4(%rbp)
jmp 0x7452c
movl 0x1e5d3(%rip), %eax # 0x92a13
movl %eax, -0x14(%rbp)
leaq -0x14(%rbp), %rdi
callq 0x5b150
movq %rax, -0x40(%rbp)
leaq -0x14(%rbp), %rdi
callq 0x60ad0
movq -0x28(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %rax, %rdx
movl $0x1, %ecx
callq 0x5f7a0
movl %eax, -0x4(%rbp)
jmp 0x7452c
movl 0x1e5a0(%rip), %eax # 0x92a1c
movl %eax, -0x19(%rbp)
movb 0x1e59b(%rip), %al # 0x92a20
movb %al, -0x15(%rbp)
leaq -0x19(%rbp), %rdi
callq 0x5cfc0
movq %rax, -0x48(%rbp)
leaq -0x19(%rbp), %rdi
callq 0x5d030
movq -0x28(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %ecx
callq 0x5f7a0
movl %eax, -0x4(%rbp)
jmp 0x7452c
movl 0x1e559(%rip), %eax # 0x92a17
movl %eax, -0x1d(%rbp)
leaq -0x1d(%rbp), %rdi
callq 0x5b150
movq %rax, -0x50(%rbp)
leaq -0x1d(%rbp), %rdi
callq 0x60ad0
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq %rax, %rdx
movl $0x3, %ecx
callq 0x5f7a0
movl %eax, -0x4(%rbp)
jmp 0x7452c
movq -0x28(%rbp), %rdi
callq 0x5d670
movl %eax, -0x4(%rbp)
jmp 0x7452c
movq -0x28(%rbp), %rdi
callq 0x5ef80
movl %eax, -0x4(%rbp)
jmp 0x7452c
movl $0xf, -0x4(%rbp)
jmp 0x7452c
movq -0x28(%rbp), %rax
leaq 0x19d29(%rip), %rcx # 0x8e24a
movq %rcx, 0x70(%rax)
movl $0xe, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE4scanEv:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
cmp qword ptr [rax+20h], 0
jnz short loc_74373
mov rdi, [rbp+var_28]
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(void)
test al, 1
jnz short loc_74373
mov rax, [rbp+var_28]
lea rcx, aInvalidBomMust; "invalid BOM; must be 0xEF 0xBB 0xBF if "...
mov [rax+70h], rcx
mov [rbp+var_4], 0Eh
jmp loc_7452C
loc_74373:
mov rdi, [rbp+var_28]
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE15skip_whitespaceEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_whitespace(void)
loc_7437C:
mov rcx, [rbp+var_28]
xor eax, eax
test byte ptr [rcx+10h], 1
mov [rbp+var_29], al
jz short loc_74399
mov rax, [rbp+var_28]
cmp dword ptr [rax+14h], 2Fh ; '/'
setz al
mov [rbp+var_29], al
loc_74399:
mov al, [rbp+var_29]
test al, 1
jnz short loc_743A2
jmp short loc_743C6
loc_743A2:
mov rdi, [rbp+var_28]
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(void)
test al, 1
jnz short loc_743BB
mov [rbp+var_4], 0Eh
jmp loc_7452C
loc_743BB:
mov rdi, [rbp+var_28]
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE15skip_whitespaceEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_whitespace(void)
jmp short loc_7437C
loc_743C6:
mov rax, [rbp+var_28]
mov eax, [rax+14h]
inc eax; switch 127 cases
mov ecx, eax
mov [rbp+var_38], rcx
sub eax, 7Eh
ja def_743F0; jumptable 00000000000743F0 default case, cases 1-33,35-43,46,47,59-90,92,94-101,103-109,111-115,117-122,124
mov rax, [rbp+var_38]
lea rcx, jpt_743F0
movsxd rax, ds:(jpt_743F0 - 8C250h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_743F2:
mov [rbp+var_4], 8; jumptable 00000000000743F0 case 91
jmp loc_7452C
loc_743FE:
mov [rbp+var_4], 0Ah; jumptable 00000000000743F0 case 93
jmp loc_7452C
loc_7440A:
mov [rbp+var_4], 9; jumptable 00000000000743F0 case 123
jmp loc_7452C
loc_74416:
mov [rbp+var_4], 0Bh; jumptable 00000000000743F0 case 125
jmp loc_7452C
loc_74422:
mov [rbp+var_4], 0Ch; jumptable 00000000000743F0 case 58
jmp loc_7452C
loc_7442E:
mov [rbp+var_4], 0Dh; jumptable 00000000000743F0 case 44
jmp loc_7452C
loc_7443A:
mov eax, cs:dword_92A13; jumptable 00000000000743F0 case 116
mov [rbp+var_14], eax
lea rdi, [rbp+var_14]
call __ZNSt5arrayIcLm4EE4dataEv; std::array<char,4ul>::data(void)
mov [rbp+var_40], rax
lea rdi, [rbp+var_14]
call __ZNKSt5arrayIcLm4EE4sizeEv; std::array<char,4ul>::size(void)
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_40]
mov rdx, rax
mov ecx, 1
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_literalESK_mNS1_10lexer_baseISF_E10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type)
mov [rbp+var_4], eax
jmp loc_7452C
loc_74476:
mov eax, cs:dword_92A1C; jumptable 00000000000743F0 case 102
mov [rbp+var_19], eax
mov al, cs:byte_92A20
mov [rbp+var_15], al
lea rdi, [rbp+var_19]
call __ZNSt5arrayIcLm5EE4dataEv; std::array<char,5ul>::data(void)
mov [rbp+var_48], rax
lea rdi, [rbp+var_19]
call __ZNKSt5arrayIcLm5EE4sizeEv; std::array<char,5ul>::size(void)
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_48]
mov rdx, rax
mov ecx, 2
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_literalESK_mNS1_10lexer_baseISF_E10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type)
mov [rbp+var_4], eax
jmp short loc_7452C
loc_744B8:
mov eax, cs:dword_92A17; jumptable 00000000000743F0 case 110
mov [rbp+var_1D], eax
lea rdi, [rbp+var_1D]
call __ZNSt5arrayIcLm4EE4dataEv; std::array<char,4ul>::data(void)
mov [rbp+var_50], rax
lea rdi, [rbp+var_1D]
call __ZNKSt5arrayIcLm4EE4sizeEv; std::array<char,4ul>::size(void)
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_50]
mov rdx, rax
mov ecx, 3
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_literalESK_mNS1_10lexer_baseISF_E10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type)
mov [rbp+var_4], eax
jmp short loc_7452C
loc_744F1:
mov rdi, [rbp+var_28]; jumptable 00000000000743F0 case 34
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string(void)
mov [rbp+var_4], eax
jmp short loc_7452C
loc_744FF:
mov rdi, [rbp+var_28]; jumptable 00000000000743F0 cases 45,48-57
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(void)
mov [rbp+var_4], eax
jmp short loc_7452C
loc_7450D:
mov [rbp+var_4], 0Fh; jumptable 00000000000743F0 cases -1,0
jmp short loc_7452C
def_743F0:
mov rax, [rbp+var_28]; jumptable 00000000000743F0 default case, cases 1-33,35-43,46,47,59-90,92,94-101,103-109,111-115,117-122,124
lea rcx, aInvalidLiteral; "invalid literal"
mov [rax+70h], rcx
mov [rbp+var_4], 0Eh
loc_7452C:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan(
long long a1)
{
long long v1; // rax
long long v2; // rax
long long v3; // rax
long long v5; // [rsp+0h] [rbp-50h]
long long v6; // [rsp+8h] [rbp-48h]
long long v7; // [rsp+10h] [rbp-40h]
bool v8; // [rsp+27h] [rbp-29h]
int v9; // [rsp+33h] [rbp-1Dh] BYREF
_BYTE v10[5]; // [rsp+37h] [rbp-19h] BYREF
int v11; // [rsp+3Ch] [rbp-14h] BYREF
long long v12; // [rsp+40h] [rbp-10h]
unsigned int v13; // [rsp+4Ch] [rbp-4h]
v12 = a1;
if ( *(_QWORD *)(a1 + 32)
|| (nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(a1) & 1) != 0 )
{
while ( 1 )
{
nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_whitespace(a1);
v8 = 0;
if ( (*(_BYTE *)(a1 + 16) & 1) != 0 )
v8 = *(_DWORD *)(a1 + 20) == 47;
if ( !v8 )
break;
if ( (nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(a1) & 1) == 0 )
return 14;
}
switch ( *(_DWORD *)(a1 + 20) )
{
case 0xFFFFFFFF:
case 0:
v13 = 15;
break;
case 0x22:
v13 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string(a1);
break;
case 0x2C:
v13 = 13;
break;
case 0x2D:
case 0x30:
case 0x31:
case 0x32:
case 0x33:
case 0x34:
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39:
v13 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(a1);
break;
case 0x3A:
v13 = 12;
break;
case 0x5B:
v13 = 8;
break;
case 0x5D:
v13 = 10;
break;
case 0x66:
qmemcpy(v10, "false", sizeof(v10));
v6 = std::array<char,5ul>::data(v10);
v2 = std::array<char,5ul>::size(v10);
v13 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(
a1,
v6,
v2,
2LL);
break;
case 0x6E:
v9 = 1819047278;
v5 = std::array<char,4ul>::data(&v9);
v3 = std::array<char,4ul>::size(&v9);
v13 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(
a1,
v5,
v3,
3LL);
break;
case 0x74:
v11 = 1702195828;
v7 = std::array<char,4ul>::data(&v11);
v1 = std::array<char,4ul>::size(&v11);
v13 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(
a1,
v7,
v1,
1LL);
break;
case 0x7B:
v13 = 9;
break;
case 0x7D:
v13 = 11;
break;
default:
*(_QWORD *)(a1 + 112) = "invalid literal";
v13 = 14;
break;
}
}
else
{
*(_QWORD *)(a1 + 112) = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
return 14;
}
return v13;
}
| scan:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RAX + 0x20],0x0
JNZ 0x00174373
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001603a0
TEST AL,0x1
JNZ 0x00174373
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x18e21d]
MOV qword ptr [RAX + 0x70],RCX
MOV dword ptr [RBP + -0x4],0xe
JMP 0x0017452c
LAB_00174373:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0015feb0
LAB_0017437c:
MOV RCX,qword ptr [RBP + -0x28]
XOR EAX,EAX
TEST byte ptr [RCX + 0x10],0x1
MOV byte ptr [RBP + -0x29],AL
JZ 0x00174399
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x14],0x2f
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_00174399:
MOV AL,byte ptr [RBP + -0x29]
TEST AL,0x1
JNZ 0x001743a2
JMP 0x001743c6
LAB_001743a2:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00160b90
TEST AL,0x1
JNZ 0x001743bb
MOV dword ptr [RBP + -0x4],0xe
JMP 0x0017452c
LAB_001743bb:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0015feb0
JMP 0x0017437c
LAB_001743c6:
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x14]
INC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x38],RCX
SUB EAX,0x7e
JA 0x00174516
MOV RAX,qword ptr [RBP + -0x38]
LEA RCX,[0x18c250]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5b:
MOV dword ptr [RBP + -0x4],0x8
JMP 0x0017452c
caseD_5d:
MOV dword ptr [RBP + -0x4],0xa
JMP 0x0017452c
caseD_7b:
MOV dword ptr [RBP + -0x4],0x9
JMP 0x0017452c
caseD_7d:
MOV dword ptr [RBP + -0x4],0xb
JMP 0x0017452c
caseD_3a:
MOV dword ptr [RBP + -0x4],0xc
JMP 0x0017452c
caseD_2c:
MOV dword ptr [RBP + -0x4],0xd
JMP 0x0017452c
caseD_74:
MOV EAX,dword ptr [0x00192a13]
MOV dword ptr [RBP + -0x14],EAX
LEA RDI,[RBP + -0x14]
CALL 0x0015b150
MOV qword ptr [RBP + -0x40],RAX
LEA RDI,[RBP + -0x14]
CALL 0x00160ad0
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,RAX
MOV ECX,0x1
CALL 0x0015f7a0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017452c
caseD_66:
MOV EAX,dword ptr [0x00192a1c]
MOV dword ptr [RBP + -0x19],EAX
MOV AL,byte ptr [0x00192a20]
MOV byte ptr [RBP + -0x15],AL
LEA RDI,[RBP + -0x19]
CALL 0x0015cfc0
MOV qword ptr [RBP + -0x48],RAX
LEA RDI,[RBP + -0x19]
CALL 0x0015d030
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,RAX
MOV ECX,0x2
CALL 0x0015f7a0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017452c
caseD_6e:
MOV EAX,dword ptr [0x00192a17]
MOV dword ptr [RBP + -0x1d],EAX
LEA RDI,[RBP + -0x1d]
CALL 0x0015b150
MOV qword ptr [RBP + -0x50],RAX
LEA RDI,[RBP + -0x1d]
CALL 0x00160ad0
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,RAX
MOV ECX,0x3
CALL 0x0015f7a0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017452c
caseD_22:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0015d670
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017452c
caseD_2d:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0015ef80
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017452c
caseD_ffffffff:
MOV dword ptr [RBP + -0x4],0xf
JMP 0x0017452c
caseD_1:
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x18e24a]
MOV qword ptr [RAX + 0x70],RCX
MOV dword ptr [RBP + -0x4],0xe
LAB_0017452c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<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>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan() */
int4 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan(lexer<nlohmann::json_abi_v3_11_3::basic_json<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int4 uVar1;
ulong uVar2;
int8 uVar3;
int8 uVar4;
bool bVar5;
array<char,4ul> local_25 [4];
array<char,5ul> local_21 [4];
char local_1d;
array<char,4ul> local_1c [4];
lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*local_18;
local_18 = this;
if ((*(long *)(this + 0x20) == 0) && (uVar2 = skip_bom(this), (uVar2 & 1) == 0)) {
*(char **)(this + 0x70) = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
}
else {
skip_whitespace(this);
while( true ) {
bVar5 = false;
if (((byte)this[0x10] & 1) != 0) {
bVar5 = *(int *)(this + 0x14) == 0x2f;
}
if (!bVar5) {
switch(*(int4 *)(this + 0x14)) {
default:
*(char **)(this + 0x70) = "invalid literal";
return 0xe;
case 0x22:
uVar1 = scan_string(this);
return uVar1;
case 0x2c:
return 0xd;
case 0x2d:
case 0x30:
case 0x31:
case 0x32:
case 0x33:
case 0x34:
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39:
uVar1 = scan_number(this);
return uVar1;
case 0x3a:
return 0xc;
case 0x5b:
return 8;
case 0x5d:
return 10;
case 0x66:
local_21[0] = (array<char,5ul>)s_false_00192a1c[0];
local_21[1] = (array<char,5ul>)s_false_00192a1c[1];
local_21[2] = (array<char,5ul>)s_false_00192a1c[2];
local_21[3] = (array<char,5ul>)s_false_00192a1c[3];
local_1d = s_false_00192a1c[4];
uVar3 = std::array<char,5ul>::data(local_21);
uVar4 = std::array<char,5ul>::size();
uVar1 = scan_literal(this,uVar3,uVar4,2);
return uVar1;
case 0x6e:
local_25[0] = (array<char,4ul>)s_truenull_00192a13[4];
local_25[1] = (array<char,4ul>)s_truenull_00192a13[5];
local_25[2] = (array<char,4ul>)s_truenull_00192a13[6];
local_25[3] = (array<char,4ul>)s_truenull_00192a13[7];
uVar3 = std::array<char,4ul>::data(local_25);
uVar4 = std::array<char,4ul>::size();
uVar1 = scan_literal(this,uVar3,uVar4,3);
return uVar1;
case 0x74:
local_1c[0] = (array<char,4ul>)s_truenull_00192a13[0];
local_1c[1] = (array<char,4ul>)s_truenull_00192a13[1];
local_1c[2] = (array<char,4ul>)s_truenull_00192a13[2];
local_1c[3] = (array<char,4ul>)s_truenull_00192a13[3];
uVar3 = std::array<char,4ul>::data(local_1c);
uVar4 = std::array<char,4ul>::size();
uVar1 = scan_literal(this,uVar3,uVar4,1);
return uVar1;
case 0x7b:
return 9;
case 0x7d:
return 0xb;
case 0xffffffff:
case 0:
return 0xf;
}
}
uVar2 = scan_comment(this);
if ((uVar2 & 1) == 0) break;
skip_whitespace(this);
}
}
return 0xe;
}
| |
35,995 | nlohmann::json_abi_v3_11_3::detail::lexer<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>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan() | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | token_type scan()
{
// initially, skip the BOM
if (position.chars_read_total == 0 && !skip_bom())
{
error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
return token_type::parse_error;
}
// read next character and ignore whitespace
skip_whitespace();
// ignore comments
while (ignore_comments && current == '/')
{
if (!scan_comment())
{
return token_type::parse_error;
}
// skip following whitespace
skip_whitespace();
}
switch (current)
{
// structural characters
case '[':
return token_type::begin_array;
case ']':
return token_type::end_array;
case '{':
return token_type::begin_object;
case '}':
return token_type::end_object;
case ':':
return token_type::name_separator;
case ',':
return token_type::value_separator;
// literals
case 't':
{
std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}};
return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true);
}
case 'f':
{
std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}};
return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false);
}
case 'n':
{
std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}};
return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null);
}
// string
case '\"':
return scan_string();
// number
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
return scan_number();
// end of input (the null byte is needed when parsing from
// string literals)
case '\0':
case char_traits<char_type>::eof():
return token_type::end_of_input;
// error
default:
error_message = "invalid literal";
return token_type::parse_error;
}
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<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>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan():
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
jne 0x181bf
movq %rbx, %rdi
callq 0x11de0
testb %al, %al
je 0x18293
movabsq $0x100002600, %r14 # imm = 0x100002600
movq %rbx, %rdi
callq 0x11400
movl 0x14(%rbx), %eax
cmpq $0x20, %rax
ja 0x181e0
btq %rax, %r14
jb 0x181c9
movl 0x14(%rbx), %eax
cmpl $0x2f, %eax
sete %cl
andb 0x10(%rbx), %cl
cmpb $0x1, %cl
jne 0x18226
movq %rbx, %rdi
callq 0x11f50
testb %al, %al
je 0x1829e
movq %rbx, %rdi
callq 0x11400
movl 0x14(%rbx), %eax
cmpq $0x20, %rax
ja 0x18218
btq %rax, %r14
jb 0x18201
movl 0x14(%rbx), %eax
cmpb $0x1, 0x10(%rbx)
jne 0x18226
cmpl $0x2f, %eax
je 0x181f1
cmpl $0x5a, %eax
jg 0x18256
leal -0x22(%rax), %ecx
cmpl $0x18, %ecx
ja 0x182e0
leaq 0x9eca(%rip), %rax # 0x22108
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x11b40
cmpl $0x6d, %eax
jle 0x182ab
cmpl $0x7a, %eax
jg 0x182ee
cmpl $0x6e, %eax
je 0x18328
cmpl $0x74, %eax
jne 0x182ff
leaq 0xc(%rsp), %rsi
movl $0x65757274, (%rsi) # imm = 0x65757274
movl $0x4, %edx
movq %rbx, %rdi
movl $0x1, %ecx
jmp 0x18340
leaq 0xaf46(%rip), %rax # 0x231e0
movq %rax, 0x70(%rbx)
movl $0xe, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
cmpl $0x5b, %eax
je 0x18354
cmpl $0x5d, %eax
je 0x1835e
cmpl $0x66, %eax
jne 0x182ff
leaq 0x10(%rsp), %rsi
movb $0x65, 0x4(%rsi)
movl $0x736c6166, (%rsi) # imm = 0x736C6166
movl $0x5, %edx
movq %rbx, %rdi
movl $0x2, %ecx
jmp 0x18340
incl %eax
cmpl $0x2, %eax
jae 0x182ff
movl $0xf, %eax
jmp 0x182a3
cmpl $0x7b, %eax
je 0x1834a
cmpl $0x7d, %eax
jne 0x182ff
movl $0xb, %eax
jmp 0x182a3
leaq 0xaf07(%rip), %rax # 0x2320d
jmp 0x1829a
movl $0xc, %eax
jmp 0x182a3
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x11700
movl $0xd, %eax
jmp 0x182a3
leaq 0x8(%rsp), %rsi
movl $0x6c6c756e, (%rsi) # imm = 0x6C6C756E
movl $0x4, %edx
movq %rbx, %rdi
movl $0x3, %ecx
callq 0x11c50
jmp 0x182a3
movl $0x9, %eax
jmp 0x182a3
movl $0x8, %eax
jmp 0x182a3
movl $0xa, %eax
jmp 0x182a3
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE4scanEv:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
cmp qword ptr [rdi+20h], 0
jnz short loc_181BF
mov rdi, rbx
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(void)
test al, al
jz loc_18293
loc_181BF:
mov r14, 100002600h
loc_181C9:
mov rdi, rbx
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__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<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
mov eax, [rbx+14h]
cmp rax, 20h ; ' '
ja short loc_181E0
bt r14, rax
jb short loc_181C9
loc_181E0:
mov eax, [rbx+14h]
cmp eax, 2Fh ; '/'
setz cl
and cl, [rbx+10h]
cmp cl, 1
jnz short loc_18226
loc_181F1:
mov rdi, rbx
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(void)
test al, al
jz loc_1829E
loc_18201:
mov rdi, rbx
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__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<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
mov eax, [rbx+14h]
cmp rax, 20h ; ' '
ja short loc_18218
bt r14, rax
jb short loc_18201
loc_18218:
mov eax, [rbx+14h]
cmp byte ptr [rbx+10h], 1
jnz short loc_18226
cmp eax, 2Fh ; '/'
jz short loc_181F1
loc_18226:
cmp eax, 5Ah ; 'Z'
jg short loc_18256
lea ecx, [rax-22h]; switch 25 cases
cmp ecx, 18h
ja def_18245; jumptable 0000000000018245 default case
lea rax, jpt_18245
movsxd rcx, ds:(jpt_18245 - 22108h)[rax+rcx*4]
add rcx, rax
jmp rcx; switch jump
loc_18247:
mov rdi, rbx; jumptable 0000000000018245 cases 45,48-57
add rsp, 18h
pop rbx
pop r14
jmp __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(void)
loc_18256:
cmp eax, 6Dh ; 'm'
jle short loc_182AB
cmp eax, 7Ah ; 'z'
jg loc_182EE
cmp eax, 6Eh ; 'n'
jz loc_18328
cmp eax, 74h ; 't'
jnz loc_182FF; jumptable 0000000000018245 cases 35-43,46,47
lea rsi, [rsp+28h+var_1C]
mov dword ptr [rsi], 65757274h
mov edx, 4
mov rdi, rbx
mov ecx, 1
jmp loc_18340
loc_18293:
lea rax, aInvalidBomMust; "invalid BOM; must be 0xEF 0xBB 0xBF if "...
loc_1829A:
mov [rbx+70h], rax
loc_1829E:
mov eax, 0Eh
loc_182A3:
add rsp, 18h
pop rbx
pop r14
retn
loc_182AB:
cmp eax, 5Bh ; '['
jz loc_18354
cmp eax, 5Dh ; ']'
jz loc_1835E
cmp eax, 66h ; 'f'
jnz short loc_182FF; jumptable 0000000000018245 cases 35-43,46,47
lea rsi, [rsp+28h+var_18]
mov byte ptr [rsi+4], 65h ; 'e'
mov dword ptr [rsi], 736C6166h
mov edx, 5
mov rdi, rbx
mov ecx, 2
jmp short loc_18340
def_18245:
inc eax; jumptable 0000000000018245 default case
cmp eax, 2
jnb short loc_182FF; jumptable 0000000000018245 cases 35-43,46,47
mov eax, 0Fh
jmp short loc_182A3
loc_182EE:
cmp eax, 7Bh ; '{'
jz short loc_1834A
cmp eax, 7Dh ; '}'
jnz short loc_182FF; jumptable 0000000000018245 cases 35-43,46,47
mov eax, 0Bh
jmp short loc_182A3
loc_182FF:
lea rax, aInvalidLiteral; jumptable 0000000000018245 cases 35-43,46,47
jmp short loc_1829A
loc_18308:
mov eax, 0Ch; jumptable 0000000000018245 case 58
jmp short loc_182A3
loc_1830F:
mov rdi, rbx; jumptable 0000000000018245 case 34
add rsp, 18h
pop rbx
pop r14
jmp __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string(void)
loc_1831E:
mov eax, 0Dh; jumptable 0000000000018245 case 44
jmp loc_182A3
loc_18328:
lea rsi, [rsp+28h+var_20]
mov dword ptr [rsi], 6C6C756Eh
mov edx, 4
mov rdi, rbx
mov ecx, 3
loc_18340:
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_literalESK_mNS1_10lexer_baseISF_E10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type)
jmp loc_182A3
loc_1834A:
mov eax, 9
jmp loc_182A3
loc_18354:
mov eax, 8
jmp loc_182A3
loc_1835E:
mov eax, 0Ah
jmp loc_182A3
| long long nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan(
long long a1)
{
long long v1; // r14
unsigned long long v2; // rax
int v3; // eax
unsigned long long v4; // rax
long long result; // rax
int *v6; // rsi
long long v7; // rdx
long long v8; // rcx
const char *v9; // rax
int v10; // [rsp+8h] [rbp-20h] BYREF
int v11; // [rsp+Ch] [rbp-1Ch] BYREF
_BYTE v12[24]; // [rsp+10h] [rbp-18h] BYREF
if ( !*(_QWORD *)(a1 + 32)
&& !(unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(a1) )
{
v9 = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
goto LABEL_21;
}
v1 = 0x100002600LL;
do
{
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((unsigned __int8 **)a1);
v2 = *(unsigned int *)(a1 + 20);
}
while ( v2 <= 0x20 && _bittest64(&v1, v2) );
v3 = *(_DWORD *)(a1 + 20);
if ( (*(_BYTE *)(a1 + 16) & (v3 == 47)) == 1 )
{
while ( (unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(a1) )
{
do
{
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((unsigned __int8 **)a1);
v4 = *(unsigned int *)(a1 + 20);
}
while ( v4 <= 0x20 && _bittest64(&v1, v4) );
v3 = *(_DWORD *)(a1 + 20);
if ( *(_BYTE *)(a1 + 16) != 1 || v3 != 47 )
goto LABEL_12;
}
return 14LL;
}
LABEL_12:
if ( v3 > 90 )
{
if ( v3 <= 109 )
{
switch ( v3 )
{
case '[':
return 8LL;
case ']':
return 10LL;
case 'f':
v6 = (int *)v12;
qmemcpy(v12, "false", 5);
v7 = 5LL;
v8 = 2LL;
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(
a1,
v6,
v7,
v8);
}
}
else if ( v3 > 122 )
{
if ( v3 == 123 )
return 9LL;
if ( v3 == 125 )
return 11LL;
}
else
{
if ( v3 == 110 )
{
v6 = &v10;
v10 = 1819047278;
v7 = 4LL;
v8 = 3LL;
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(
a1,
v6,
v7,
v8);
}
if ( v3 == 116 )
{
v6 = &v11;
v11 = 1702195828;
v7 = 4LL;
v8 = 1LL;
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(
a1,
v6,
v7,
v8);
}
}
LABEL_33:
v9 = "invalid literal";
LABEL_21:
*(_QWORD *)(a1 + 112) = v9;
return 14LL;
}
switch ( v3 )
{
case '"':
result = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string(a1);
break;
case '#':
case '$':
case '%':
case '&':
case '\'':
case '(':
case ')':
case '*':
case '+':
case '.':
case '/':
goto LABEL_33;
case ',':
result = 13LL;
break;
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
result = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(a1);
break;
case ':':
result = 12LL;
break;
default:
if ( (unsigned int)(v3 + 1) >= 2 )
goto LABEL_33;
result = 15LL;
break;
}
return result;
}
| scan:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
CMP qword ptr [RDI + 0x20],0x0
JNZ 0x001181bf
MOV RDI,RBX
CALL 0x00111de0
TEST AL,AL
JZ 0x00118293
LAB_001181bf:
MOV R14,0x100002600
LAB_001181c9:
MOV RDI,RBX
CALL 0x00111400
MOV EAX,dword ptr [RBX + 0x14]
CMP RAX,0x20
JA 0x001181e0
BT R14,RAX
JC 0x001181c9
LAB_001181e0:
MOV EAX,dword ptr [RBX + 0x14]
CMP EAX,0x2f
SETZ CL
AND CL,byte ptr [RBX + 0x10]
CMP CL,0x1
JNZ 0x00118226
LAB_001181f1:
MOV RDI,RBX
CALL 0x00111f50
TEST AL,AL
JZ 0x0011829e
LAB_00118201:
MOV RDI,RBX
CALL 0x00111400
MOV EAX,dword ptr [RBX + 0x14]
CMP RAX,0x20
JA 0x00118218
BT R14,RAX
JC 0x00118201
LAB_00118218:
MOV EAX,dword ptr [RBX + 0x14]
CMP byte ptr [RBX + 0x10],0x1
JNZ 0x00118226
CMP EAX,0x2f
JZ 0x001181f1
LAB_00118226:
CMP EAX,0x5a
JG 0x00118256
LEA ECX,[RAX + -0x22]
CMP ECX,0x18
JA 0x001182e0
LEA RAX,[0x122108]
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_2d:
MOV RDI,RBX
ADD RSP,0x18
POP RBX
POP R14
JMP 0x00111b40
LAB_00118256:
CMP EAX,0x6d
JLE 0x001182ab
CMP EAX,0x7a
JG 0x001182ee
CMP EAX,0x6e
JZ 0x00118328
CMP EAX,0x74
JNZ 0x001182ff
LEA RSI,[RSP + 0xc]
MOV dword ptr [RSI],0x65757274
MOV EDX,0x4
MOV RDI,RBX
MOV ECX,0x1
JMP 0x00118340
LAB_00118293:
LEA RAX,[0x1231e0]
LAB_0011829a:
MOV qword ptr [RBX + 0x70],RAX
LAB_0011829e:
MOV EAX,0xe
LAB_001182a3:
ADD RSP,0x18
POP RBX
POP R14
RET
LAB_001182ab:
CMP EAX,0x5b
JZ 0x00118354
CMP EAX,0x5d
JZ 0x0011835e
CMP EAX,0x66
JNZ 0x001182ff
LEA RSI,[RSP + 0x10]
MOV byte ptr [RSI + 0x4],0x65
MOV dword ptr [RSI],0x736c6166
MOV EDX,0x5
MOV RDI,RBX
MOV ECX,0x2
JMP 0x00118340
default:
INC EAX
CMP EAX,0x2
JNC 0x001182ff
MOV EAX,0xf
JMP 0x001182a3
LAB_001182ee:
CMP EAX,0x7b
JZ 0x0011834a
CMP EAX,0x7d
JNZ 0x001182ff
MOV EAX,0xb
JMP 0x001182a3
caseD_23:
LEA RAX,[0x12320d]
JMP 0x0011829a
caseD_3a:
MOV EAX,0xc
JMP 0x001182a3
caseD_22:
MOV RDI,RBX
ADD RSP,0x18
POP RBX
POP R14
JMP 0x00111700
caseD_2c:
MOV EAX,0xd
JMP 0x001182a3
LAB_00118328:
LEA RSI,[RSP + 0x8]
MOV dword ptr [RSI],0x6c6c756e
MOV EDX,0x4
MOV RDI,RBX
MOV ECX,0x3
LAB_00118340:
CALL 0x00111c50
JMP 0x001182a3
LAB_0011834a:
MOV EAX,0x9
JMP 0x001182a3
LAB_00118354:
MOV EAX,0x8
JMP 0x001182a3
LAB_0011835e:
MOV EAX,0xa
JMP 0x001182a3
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<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>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan(lexer<nlohmann::json_abi_v3_11_3::basic_json<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
char cVar1;
int iVar2;
int8 uVar3;
char *pcVar4;
int8 uVar5;
int4 *puVar6;
int4 local_20;
int4 local_1c;
int4 local_18;
int1 local_14;
if ((*(long *)(this + 0x20) == 0) && (cVar1 = skip_bom(this), cVar1 == '\0')) {
pcVar4 = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
goto LAB_0011829a;
}
do {
get(this);
if (0x20 < (ulong)*(uint *)(this + 0x14)) break;
} while ((0x100002600U >> ((ulong)*(uint *)(this + 0x14) & 0x3f) & 1) != 0);
iVar2 = *(int *)(this + 0x14);
if ((iVar2 == 0x2f & (byte)this[0x10]) == 1) {
do {
cVar1 = scan_comment(this);
if (cVar1 == '\0') goto LAB_0011829e;
do {
get(this);
if (0x20 < (ulong)*(uint *)(this + 0x14)) break;
} while ((0x100002600U >> ((ulong)*(uint *)(this + 0x14) & 0x3f) & 1) != 0);
iVar2 = *(int *)(this + 0x14);
} while ((this[0x10] ==
(lexer<nlohmann::json_abi_v3_11_3::basic_json<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x1) && (iVar2 == 0x2f));
}
if (0x5a < iVar2) {
if (iVar2 < 0x6e) {
if (iVar2 == 0x5b) {
return 8;
}
if (iVar2 == 0x5d) {
return 10;
}
if (iVar2 == 0x66) {
puVar6 = &local_18;
local_14 = 0x65;
local_18 = 0x736c6166;
uVar5 = 5;
uVar3 = 2;
goto LAB_00118340;
}
}
else if (iVar2 < 0x7b) {
if (iVar2 == 0x6e) {
puVar6 = &local_20;
local_20 = 0x6c6c756e;
uVar5 = 4;
uVar3 = 3;
LAB_00118340:
uVar3 = scan_literal(this,puVar6,uVar5,uVar3);
return uVar3;
}
if (iVar2 == 0x74) {
puVar6 = &local_1c;
local_1c = 0x65757274;
uVar5 = 4;
uVar3 = 1;
goto LAB_00118340;
}
}
else {
if (iVar2 == 0x7b) {
return 9;
}
if (iVar2 == 0x7d) {
return 0xb;
}
}
goto switchD_00118245_caseD_23;
}
switch(iVar2) {
case 0x22:
uVar3 = scan_string(this);
return uVar3;
case 0x2c:
uVar3 = 0xd;
break;
case 0x2d:
case 0x30:
case 0x31:
case 0x32:
case 0x33:
case 0x34:
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39:
uVar3 = scan_number(this);
return uVar3;
case 0x3a:
uVar3 = 0xc;
break;
default:
if (iVar2 + 1U < 2) {
return 0xf;
}
case 0x23:
case 0x24:
case 0x25:
case 0x26:
case 0x27:
case 0x28:
case 0x29:
case 0x2a:
case 0x2b:
case 0x2e:
case 0x2f:
switchD_00118245_caseD_23:
pcVar4 = "invalid literal";
LAB_0011829a:
*(char **)(this + 0x70) = pcVar4;
LAB_0011829e:
uVar3 = 0xe;
}
return uVar3;
}
| |
35,996 | resize_properties | bluesky950520[P]quickjs/quickjs.c | static no_inline int resize_properties(JSContext *ctx, JSShape **psh,
JSObject *p, uint32_t count)
{
JSShape *sh;
uint32_t new_size, new_hash_size, new_hash_mask, i;
JSShapeProperty *pr;
void *sh_alloc;
intptr_t h;
sh = *psh;
new_size = max_int(count, sh->prop_size * 3 / 2);
/* Reallocate prop array first to avoid crash or size inconsistency
in case of memory allocation failure */
if (p) {
JSProperty *new_prop;
new_prop = js_realloc(ctx, p->prop, sizeof(new_prop[0]) * new_size);
if (unlikely(!new_prop))
return -1;
p->prop = new_prop;
}
new_hash_size = sh->prop_hash_mask + 1;
while (new_hash_size < new_size)
new_hash_size = 2 * new_hash_size;
if (new_hash_size != (sh->prop_hash_mask + 1)) {
JSShape *old_sh;
/* resize the hash table and the properties */
old_sh = sh;
sh_alloc = js_malloc(ctx, get_shape_size(new_hash_size, new_size));
if (!sh_alloc)
return -1;
sh = get_shape_from_alloc(sh_alloc, new_hash_size);
list_del(&old_sh->header.link);
/* copy all the fields and the properties */
memcpy(sh, old_sh,
sizeof(JSShape) + sizeof(sh->prop[0]) * old_sh->prop_count);
list_add_tail(&sh->header.link, &ctx->rt->gc_obj_list);
new_hash_mask = new_hash_size - 1;
sh->prop_hash_mask = new_hash_mask;
memset(prop_hash_end(sh) - new_hash_size, 0,
sizeof(prop_hash_end(sh)[0]) * new_hash_size);
for(i = 0, pr = sh->prop; i < sh->prop_count; i++, pr++) {
if (pr->atom != JS_ATOM_NULL) {
h = ((uintptr_t)pr->atom & new_hash_mask);
pr->hash_next = prop_hash_end(sh)[-h - 1];
prop_hash_end(sh)[-h - 1] = i + 1;
}
}
js_free(ctx, get_alloc_from_shape(old_sh));
} else {
/* only resize the properties */
list_del(&sh->header.link);
sh_alloc = js_realloc(ctx, get_alloc_from_shape(sh),
get_shape_size(new_hash_size, new_size));
if (unlikely(!sh_alloc)) {
/* insert again in the GC list */
list_add_tail(&sh->header.link, &ctx->rt->gc_obj_list);
return -1;
}
sh = get_shape_from_alloc(sh_alloc, new_hash_size);
list_add_tail(&sh->header.link, &ctx->rt->gc_obj_list);
}
*psh = sh;
sh->prop_size = new_size;
return 0;
} | O1 | c | resize_properties:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r15
movq %rsi, 0x20(%rsp)
movq (%rsi), %r14
movl 0x24(%r14), %eax
leal (%rax,%rax,2), %eax
movl %eax, %ebp
shrl $0x1f, %ebp
addl %eax, %ebp
sarl %ebp
cmpl %ebp, %ecx
cmovgl %ecx, %ebp
movl %ebp, %ebx
testq %rdx, %rdx
je 0x3c318
movq %rdx, %r12
movq 0x20(%rdx), %rsi
movq %rbx, %rdx
shlq $0x4, %rdx
movq %r15, %rdi
callq 0x1cbd8
testq %rax, %rax
je 0x3c513
movq %rax, 0x20(%r12)
movl 0x20(%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, %edx
movl %edx, %r13d
leal (,%r13,2), %edx
cmpl %ebp, %r13d
jb 0x3c321
cmpl %ecx, %r13d
jne 0x3c3cd
movq 0x8(%r14), %rcx
movq 0x10(%r14), %rdx
movq %rdx, 0x8(%rcx)
movq %rcx, (%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
notq %rax
leaq (%r14,%rax,4), %rsi
movl %r13d, %r13d
leaq (,%r13,4), %rax
leaq (%rax,%rbx,8), %rdx
addq $0x40, %rdx
movq %r15, %rdi
callq 0x1cbd8
testq %rax, %rax
je 0x3c51d
leaq (%rax,%r13,4), %r12
leaq (%rax,%r13,4), %rcx
addq $0x8, %rcx
movq 0x18(%r15), %rdx
leaq 0x98(%rdx), %rsi
movq 0x98(%rdx), %rdi
movq %rcx, 0x8(%rdi)
movq %rdi, 0x8(%rax,%r13,4)
movq %rsi, 0x10(%rax,%r13,4)
movq %rcx, 0x98(%rdx)
movq 0x20(%rsp), %rax
movq %r12, (%rax)
movl %ebp, 0x24(%r12)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r13d, %r12d
leaq (,%r12,4), %rax
movq %rax, 0x18(%rsp)
leaq (%rax,%rbx,8), %rsi
addq $0x40, %rsi
movq %r15, %rdi
callq 0xede6
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x3c504
movq %r12, 0x8(%rsp)
movq 0x10(%rsp), %rbx
leaq (%rbx,%r12,4), %r12
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movslq 0x28(%r14), %rax
leaq 0x40(,%rax,8), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0xe5b0
movq 0x8(%rsp), %rdi
leaq (%rbx,%rdi,4), %rax
addq $0x8, %rax
movq 0x18(%r15), %rcx
leaq 0x98(%rcx), %rdx
movq 0x98(%rcx), %rsi
movq %rax, 0x8(%rsi)
movq %rsi, 0x8(%rbx,%rdi,4)
movq %rdx, 0x10(%rbx,%rdi,4)
movq %rax, 0x98(%rcx)
decl %r13d
movl %r13d, 0x20(%rbx,%rdi,4)
movq %rbx, %rdi
xorl %esi, %esi
movq 0x18(%rsp), %rdx
callq 0xe350
movq 0x8(%rsp), %rax
cmpl $0x0, 0x28(%rbx,%rax,4)
je 0x3c4d0
xorl %eax, %eax
movl $0x3ffffff, %ecx # imm = 0x3FFFFFF
movl $0xfc000000, %edx # imm = 0xFC000000
movl 0x44(%r12,%rax,8), %esi
testl %esi, %esi
je 0x3c4c6
andl %r13d, %esi
notq %rsi
movl (%r12,%rsi,4), %edi
andl %ecx, %edi
movl 0x40(%r12,%rax,8), %r8d
andl %edx, %r8d
orl %edi, %r8d
movl %r8d, 0x40(%r12,%rax,8)
leal 0x1(%rax), %edi
movl %edi, (%r12,%rsi,4)
incq %rax
cmpl 0x28(%r12), %eax
jb 0x3c49a
movl 0x20(%r14), %eax
notq %rax
leaq (%r14,%rax,4), %r14
movq 0x18(%r15), %rbx
decq 0x28(%rbx)
movq %r14, %rdi
callq *0x20(%rbx)
movq 0x30(%rbx), %rcx
movq 0x40(%rbx), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%rbx)
movq %r14, %rsi
callq *0x10(%rbx)
jmp 0x3c507
movq %r14, %r12
cmpq $0x0, 0x10(%rsp)
jne 0x3c3af
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x3c3be
leaq 0x8(%r14), %rax
movq 0x18(%r15), %rcx
leaq 0x98(%rcx), %rdx
movq 0x98(%rcx), %rsi
movq %rax, 0x8(%rsi)
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rax, 0x98(%rcx)
jmp 0x3c513
| resize_properties:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rdi
mov [rsp+58h+var_38], rsi
mov r14, [rsi]
mov eax, [r14+24h]
lea eax, [rax+rax*2]
mov ebp, eax
shr ebp, 1Fh
add ebp, eax
sar ebp, 1
cmp ecx, ebp
cmovg ebp, ecx
mov ebx, ebp
test rdx, rdx
jz short loc_3C318
mov r12, rdx
mov rsi, [rdx+20h]
mov rdx, rbx
shl rdx, 4
mov rdi, r15
call js_realloc
test rax, rax
jz loc_3C513
mov [r12+20h], rax
loc_3C318:
mov eax, [r14+20h]
lea ecx, [rax+1]
mov edx, ecx
loc_3C321:
mov r13d, edx
lea edx, ds:0[r13*2]
cmp r13d, ebp
jb short loc_3C321
cmp r13d, ecx
jnz loc_3C3CD
mov rcx, [r14+8]
mov rdx, [r14+10h]
mov [rcx+8], rdx
mov [rdx], rcx
xorps xmm0, xmm0
movups xmmword ptr [r14+8], xmm0
not rax
lea rsi, [r14+rax*4]
mov r13d, r13d
lea rax, ds:0[r13*4]
lea rdx, [rax+rbx*8]
add rdx, 40h ; '@'
mov rdi, r15
call js_realloc
test rax, rax
jz loc_3C51D
lea r12, [rax+r13*4]
lea rcx, [rax+r13*4]
add rcx, 8
mov rdx, [r15+18h]
lea rsi, [rdx+98h]
mov rdi, [rdx+98h]
mov [rdi+8], rcx
mov [rax+r13*4+8], rdi
mov [rax+r13*4+10h], rsi
mov [rdx+98h], rcx
loc_3C3AF:
mov rax, [rsp+58h+var_38]
mov [rax], r12
mov [r12+24h], ebp
xor eax, eax
loc_3C3BE:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3C3CD:
mov r12d, r13d
lea rax, ds:0[r12*4]
mov [rsp+58h+var_40], rax
lea rsi, [rax+rbx*8]
add rsi, 40h ; '@'
mov rdi, r15
call js_malloc
mov [rsp+58h+var_48], rax
test rax, rax
jz loc_3C504
mov [rsp+58h+var_50], r12
mov rbx, [rsp+58h+var_48]
lea r12, [rbx+r12*4]
mov rax, [r14+8]
mov rcx, [r14+10h]
mov [rax+8], rcx
mov [rcx], rax
xorps xmm0, xmm0
movups xmmword ptr [r14+8], xmm0
movsxd rax, dword ptr [r14+28h]
lea rdx, ds:40h[rax*8]
mov rdi, r12
mov rsi, r14
call _memcpy
mov rdi, [rsp+58h+var_50]
lea rax, [rbx+rdi*4]
add rax, 8
mov rcx, [r15+18h]
lea rdx, [rcx+98h]
mov rsi, [rcx+98h]
mov [rsi+8], rax
mov [rbx+rdi*4+8], rsi
mov [rbx+rdi*4+10h], rdx
mov [rcx+98h], rax
dec r13d
mov [rbx+rdi*4+20h], r13d
mov rdi, rbx
xor esi, esi
mov rdx, [rsp+58h+var_40]
call _memset
mov rax, [rsp+58h+var_50]
cmp dword ptr [rbx+rax*4+28h], 0
jz short loc_3C4D0
xor eax, eax
mov ecx, 3FFFFFFh
mov edx, 0FC000000h
loc_3C49A:
mov esi, [r12+rax*8+44h]
test esi, esi
jz short loc_3C4C6
and esi, r13d
not rsi
mov edi, [r12+rsi*4]
and edi, ecx
mov r8d, [r12+rax*8+40h]
and r8d, edx
or r8d, edi
mov [r12+rax*8+40h], r8d
lea edi, [rax+1]
mov [r12+rsi*4], edi
loc_3C4C6:
inc rax
cmp eax, [r12+28h]
jb short loc_3C49A
loc_3C4D0:
mov eax, [r14+20h]
not rax
lea r14, [r14+rax*4]
mov rbx, [r15+18h]
dec qword ptr [rbx+28h]
mov rdi, r14
call qword ptr [rbx+20h]
mov rcx, [rbx+30h]
mov rdi, [rbx+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rcx
mov rsi, r14
call qword ptr [rbx+10h]
jmp short loc_3C507
loc_3C504:
mov r12, r14
loc_3C507:
cmp [rsp+58h+var_48], 0
jnz loc_3C3AF
loc_3C513:
mov eax, 0FFFFFFFFh
jmp loc_3C3BE
loc_3C51D:
lea rax, [r14+8]
mov rcx, [r15+18h]
lea rdx, [rcx+98h]
mov rsi, [rcx+98h]
mov [rsi+8], rax
mov [r14+8], rsi
mov [r14+10h], rdx
mov [rcx+98h], rax
jmp short loc_3C513
| long long resize_properties(long long a1, long long *a2, long long a3, signed int a4)
{
long long v4; // r14
unsigned int v5; // ebp
long long v7; // rax
long long v8; // rax
unsigned int v9; // edx
unsigned int v10; // r13d
long long v11; // rcx
_QWORD *v12; // rdx
long long v13; // rax
long long v14; // r12
long long *v15; // rsi
long long v16; // rdi
long long v18; // rax
_QWORD *v19; // rcx
long long v20; // rcx
long long v21; // rsi
unsigned int v22; // r13d
long long v23; // rax
int v24; // esi
unsigned long long v25; // rsi
unsigned long long v26; // r14
long long v27; // rbx
long long v28; // rax
long long v29; // rdi
long long *v30; // rdx
long long v31; // rsi
long long v32; // [rsp+8h] [rbp-50h]
long long v33; // [rsp+10h] [rbp-48h]
long long v34; // [rsp+18h] [rbp-40h]
v4 = *a2;
v5 = 3 * *(_DWORD *)(*a2 + 36) / 2;
if ( a4 > (int)v5 )
v5 = a4;
if ( a3 )
{
v7 = js_realloc(a1, *(_QWORD *)(a3 + 32), 16LL * v5);
if ( !v7 )
return 0xFFFFFFFFLL;
*(_QWORD *)(a3 + 32) = v7;
}
v8 = *(unsigned int *)(v4 + 32);
v9 = v8 + 1;
do
{
v10 = v9;
v9 *= 2;
}
while ( v10 < v5 );
if ( v10 == (_DWORD)v8 + 1 )
{
v11 = *(_QWORD *)(v4 + 8);
v12 = *(_QWORD **)(v4 + 16);
*(_QWORD *)(v11 + 8) = v12;
*v12 = v11;
*(_OWORD *)(v4 + 8) = 0LL;
v13 = js_realloc(a1, v4 + 4 * ~v8, 4LL * v10 + 8LL * v5 + 64);
if ( v13 )
{
v14 = v13 + 4LL * v10;
v15 = (long long *)(*(_QWORD *)(a1 + 24) + 152LL);
v16 = *v15;
*(_QWORD *)(v16 + 8) = v14 + 8;
*(_QWORD *)(v14 + 8) = v16;
*(_QWORD *)(v14 + 16) = v15;
*v15 = v14 + 8;
LABEL_11:
*a2 = v14;
*(_DWORD *)(v14 + 36) = v5;
return 0LL;
}
v30 = (long long *)(*(_QWORD *)(a1 + 24) + 152LL);
v31 = *v30;
*(_QWORD *)(v31 + 8) = v4 + 8;
*(_QWORD *)(v4 + 8) = v31;
*(_QWORD *)(v4 + 16) = v30;
*v30 = v4 + 8;
}
else
{
v34 = 4LL * v10;
v33 = js_malloc(a1, v34 + 8LL * v5 + 64);
if ( v33 )
{
v32 = v10;
v14 = v33 + 4LL * v10;
v18 = *(_QWORD *)(v4 + 8);
v19 = *(_QWORD **)(v4 + 16);
*(_QWORD *)(v18 + 8) = v19;
*v19 = v18;
*(_OWORD *)(v4 + 8) = 0LL;
memcpy(v14, v4, 8LL * *(int *)(v4 + 40) + 64);
v20 = *(_QWORD *)(a1 + 24);
v21 = *(_QWORD *)(v20 + 152);
*(_QWORD *)(v21 + 8) = v14 + 8;
*(_QWORD *)(v14 + 8) = v21;
*(_QWORD *)(v14 + 16) = v20 + 152;
*(_QWORD *)(v20 + 152) = v14 + 8;
v22 = v10 - 1;
*(_DWORD *)(v33 + 4 * v32 + 32) = v22;
memset(v33, 0LL, v34);
if ( *(_DWORD *)(v33 + 4 * v32 + 40) )
{
v23 = 0LL;
do
{
v24 = *(_DWORD *)(v14 + 8 * v23 + 68);
if ( v24 )
{
v25 = ~(unsigned long long)(v22 & v24);
*(_DWORD *)(v14 + 8 * v23 + 64) = *(_DWORD *)(v14 + 4 * v25) & 0x3FFFFFF | *(_DWORD *)(v14 + 8 * v23 + 64) & 0xFC000000;
*(_DWORD *)(v14 + 4 * v25) = v23 + 1;
}
++v23;
}
while ( (unsigned int)v23 < *(_DWORD *)(v14 + 40) );
}
v26 = v4 + 4 * ~(unsigned long long)*(unsigned int *)(v4 + 32);
v27 = *(_QWORD *)(a1 + 24);
--*(_QWORD *)(v27 + 40);
v28 = (*(long long ( **)(unsigned long long))(v27 + 32))(v26);
v29 = *(_QWORD *)(v27 + 64);
*(_QWORD *)(v27 + 48) = *(_QWORD *)(v27 + 48) - v28 - 8;
(*(void ( **)(long long, unsigned long long))(v27 + 16))(v29, v26);
}
else
{
v14 = v4;
}
if ( v33 )
goto LABEL_11;
}
return 0xFFFFFFFFLL;
}
| resize_properties:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RDI
MOV qword ptr [RSP + 0x20],RSI
MOV R14,qword ptr [RSI]
MOV EAX,dword ptr [R14 + 0x24]
LEA EAX,[RAX + RAX*0x2]
MOV EBP,EAX
SHR EBP,0x1f
ADD EBP,EAX
SAR EBP,0x1
CMP ECX,EBP
CMOVG EBP,ECX
MOV EBX,EBP
TEST RDX,RDX
JZ 0x0013c318
MOV R12,RDX
MOV RSI,qword ptr [RDX + 0x20]
MOV RDX,RBX
SHL RDX,0x4
MOV RDI,R15
CALL 0x0011cbd8
TEST RAX,RAX
JZ 0x0013c513
MOV qword ptr [R12 + 0x20],RAX
LAB_0013c318:
MOV EAX,dword ptr [R14 + 0x20]
LEA ECX,[RAX + 0x1]
MOV EDX,ECX
LAB_0013c321:
MOV R13D,EDX
LEA EDX,[R13*0x2]
CMP R13D,EBP
JC 0x0013c321
CMP R13D,ECX
JNZ 0x0013c3cd
MOV RCX,qword ptr [R14 + 0x8]
MOV RDX,qword ptr [R14 + 0x10]
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RDX],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x8],XMM0
NOT RAX
LEA RSI,[R14 + RAX*0x4]
MOV R13D,R13D
LEA RAX,[R13*0x4]
LEA RDX,[RAX + RBX*0x8]
ADD RDX,0x40
MOV RDI,R15
CALL 0x0011cbd8
TEST RAX,RAX
JZ 0x0013c51d
LEA R12,[RAX + R13*0x4]
LEA RCX,[RAX + R13*0x4]
ADD RCX,0x8
MOV RDX,qword ptr [R15 + 0x18]
LEA RSI,[RDX + 0x98]
MOV RDI,qword ptr [RDX + 0x98]
MOV qword ptr [RDI + 0x8],RCX
MOV qword ptr [RAX + R13*0x4 + 0x8],RDI
MOV qword ptr [RAX + R13*0x4 + 0x10],RSI
MOV qword ptr [RDX + 0x98],RCX
LAB_0013c3af:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX],R12
MOV dword ptr [R12 + 0x24],EBP
XOR EAX,EAX
LAB_0013c3be:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013c3cd:
MOV R12D,R13D
LEA RAX,[R12*0x4]
MOV qword ptr [RSP + 0x18],RAX
LEA RSI,[RAX + RBX*0x8]
ADD RSI,0x40
MOV RDI,R15
CALL 0x0010ede6
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x0013c504
MOV qword ptr [RSP + 0x8],R12
MOV RBX,qword ptr [RSP + 0x10]
LEA R12,[RBX + R12*0x4]
MOV RAX,qword ptr [R14 + 0x8]
MOV RCX,qword ptr [R14 + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RCX],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x8],XMM0
MOVSXD RAX,dword ptr [R14 + 0x28]
LEA RDX,[0x40 + RAX*0x8]
MOV RDI,R12
MOV RSI,R14
CALL 0x0010e5b0
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RBX + RDI*0x4]
ADD RAX,0x8
MOV RCX,qword ptr [R15 + 0x18]
LEA RDX,[RCX + 0x98]
MOV RSI,qword ptr [RCX + 0x98]
MOV qword ptr [RSI + 0x8],RAX
MOV qword ptr [RBX + RDI*0x4 + 0x8],RSI
MOV qword ptr [RBX + RDI*0x4 + 0x10],RDX
MOV qword ptr [RCX + 0x98],RAX
DEC R13D
MOV dword ptr [RBX + RDI*0x4 + 0x20],R13D
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x0010e350
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RBX + RAX*0x4 + 0x28],0x0
JZ 0x0013c4d0
XOR EAX,EAX
MOV ECX,0x3ffffff
MOV EDX,0xfc000000
LAB_0013c49a:
MOV ESI,dword ptr [R12 + RAX*0x8 + 0x44]
TEST ESI,ESI
JZ 0x0013c4c6
AND ESI,R13D
NOT RSI
MOV EDI,dword ptr [R12 + RSI*0x4]
AND EDI,ECX
MOV R8D,dword ptr [R12 + RAX*0x8 + 0x40]
AND R8D,EDX
OR R8D,EDI
MOV dword ptr [R12 + RAX*0x8 + 0x40],R8D
LEA EDI,[RAX + 0x1]
MOV dword ptr [R12 + RSI*0x4],EDI
LAB_0013c4c6:
INC RAX
CMP EAX,dword ptr [R12 + 0x28]
JC 0x0013c49a
LAB_0013c4d0:
MOV EAX,dword ptr [R14 + 0x20]
NOT RAX
LEA R14,[R14 + RAX*0x4]
MOV RBX,qword ptr [R15 + 0x18]
DEC qword ptr [RBX + 0x28]
MOV RDI,R14
CALL qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x30]
MOV RDI,qword ptr [RBX + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [RBX + 0x30],RCX
MOV RSI,R14
CALL qword ptr [RBX + 0x10]
JMP 0x0013c507
LAB_0013c504:
MOV R12,R14
LAB_0013c507:
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x0013c3af
LAB_0013c513:
MOV EAX,0xffffffff
JMP 0x0013c3be
LAB_0013c51d:
LEA RAX,[R14 + 0x8]
MOV RCX,qword ptr [R15 + 0x18]
LEA RDX,[RCX + 0x98]
MOV RSI,qword ptr [RCX + 0x98]
MOV qword ptr [RSI + 0x8],RAX
MOV qword ptr [R14 + 0x8],RSI
MOV qword ptr [R14 + 0x10],RDX
MOV qword ptr [RCX + 0x98],RAX
JMP 0x0013c513
|
int8 resize_properties(long param_1,int8 *param_2,long param_3,uint param_4)
{
void *__dest;
long *plVar1;
uint uVar2;
uint uVar3;
long lVar4;
void *__s;
long lVar5;
long lVar6;
uint uVar7;
long lVar8;
uint uVar9;
ulong uVar10;
ulong uVar11;
void *pvVar12;
pvVar12 = (void *)*param_2;
uVar9 = (*(int *)((long)pvVar12 + 0x24) * 3) / 2;
uVar10 = (ulong)uVar9;
if ((int)uVar9 < (int)param_4) {
uVar10 = (ulong)param_4;
}
if (param_3 != 0) {
lVar4 = js_realloc(param_1,*(int8 *)(param_3 + 0x20),uVar10 << 4);
if (lVar4 == 0) {
return 0xffffffff;
}
*(long *)(param_3 + 0x20) = lVar4;
}
uVar9 = *(uint *)((long)pvVar12 + 0x20);
uVar7 = uVar9 + 1;
uVar3 = uVar7;
do {
uVar2 = uVar3;
uVar11 = (ulong)uVar2;
uVar3 = uVar2 * 2;
} while (uVar2 < (uint)uVar10);
if (uVar2 == uVar7) {
lVar4 = *(long *)((long)pvVar12 + 8);
plVar1 = *(long **)((long)pvVar12 + 0x10);
*(long **)(lVar4 + 8) = plVar1;
*plVar1 = lVar4;
*(int8 *)((long)pvVar12 + 8) = 0;
*(int8 *)((long)pvVar12 + 0x10) = 0;
lVar4 = js_realloc(param_1,(void *)((long)pvVar12 + ~(ulong)uVar9 * 4),
uVar11 * 4 + uVar10 * 8 + 0x40);
if (lVar4 != 0) {
pvVar12 = (void *)(lVar4 + uVar11 * 4);
lVar8 = lVar4 + uVar11 * 4 + 8;
lVar6 = *(long *)(param_1 + 0x18);
lVar5 = *(long *)(lVar6 + 0x98);
*(long *)(lVar5 + 8) = lVar8;
*(long *)(lVar4 + 8 + uVar11 * 4) = lVar5;
*(long *)(lVar4 + 0x10 + uVar11 * 4) = lVar6 + 0x98;
*(long *)(lVar6 + 0x98) = lVar8;
LAB_0013c3af:
*param_2 = pvVar12;
*(uint *)((long)pvVar12 + 0x24) = (uint)uVar10;
return 0;
}
lVar4 = *(long *)(param_1 + 0x18);
lVar6 = *(long *)(lVar4 + 0x98);
*(long *)(lVar6 + 8) = (long)pvVar12 + 8;
*(long *)((long)pvVar12 + 8) = lVar6;
*(long *)((long)pvVar12 + 0x10) = lVar4 + 0x98;
*(long *)(lVar4 + 0x98) = (long)pvVar12 + 8;
}
else {
__s = (void *)js_malloc(param_1,uVar11 * 4 + uVar10 * 8 + 0x40);
if (__s != (void *)0x0) {
__dest = (void *)((long)__s + uVar11 * 4);
lVar4 = *(long *)((long)pvVar12 + 8);
plVar1 = *(long **)((long)pvVar12 + 0x10);
*(long **)(lVar4 + 8) = plVar1;
*plVar1 = lVar4;
*(int8 *)((long)pvVar12 + 8) = 0;
*(int8 *)((long)pvVar12 + 0x10) = 0;
memcpy(__dest,pvVar12,(long)*(int *)((long)pvVar12 + 0x28) * 8 + 0x40);
lVar5 = (long)__s + uVar11 * 4 + 8;
lVar4 = *(long *)(param_1 + 0x18);
lVar6 = *(long *)(lVar4 + 0x98);
*(long *)(lVar6 + 8) = lVar5;
*(long *)((long)__s + uVar11 * 4 + 8) = lVar6;
*(long *)((long)__s + uVar11 * 4 + 0x10) = lVar4 + 0x98;
*(long *)(lVar4 + 0x98) = lVar5;
*(uint *)((long)__s + uVar11 * 4 + 0x20) = uVar2 - 1;
memset(__s,0,uVar11 * 4);
if (*(int *)((long)__s + uVar11 * 4 + 0x28) != 0) {
lVar4 = 0;
do {
uVar9 = *(uint *)((long)__dest + lVar4 * 8 + 0x44);
if (uVar9 != 0) {
uVar11 = ~(ulong)(uVar9 & uVar2 - 1);
*(uint *)((long)__dest + lVar4 * 8 + 0x40) =
*(uint *)((long)__dest + lVar4 * 8 + 0x40) & 0xfc000000 |
*(uint *)((long)__dest + uVar11 * 4) & 0x3ffffff;
*(int *)((long)__dest + uVar11 * 4) = (int)lVar4 + 1;
}
lVar4 = lVar4 + 1;
} while ((uint)lVar4 < *(uint *)((long)__dest + 0x28));
}
pvVar12 = (void *)((long)pvVar12 + ~(ulong)*(uint *)((long)pvVar12 + 0x20) * 4);
lVar4 = *(long *)(param_1 + 0x18);
*(long *)(lVar4 + 0x28) = *(long *)(lVar4 + 0x28) + -1;
lVar6 = (**(code **)(lVar4 + 0x20))(pvVar12);
*(long *)(lVar4 + 0x30) = (*(long *)(lVar4 + 0x30) - lVar6) + -8;
(**(code **)(lVar4 + 0x10))(*(int8 *)(lVar4 + 0x40),pvVar12);
pvVar12 = __dest;
}
if (__s != (void *)0x0) goto LAB_0013c3af;
}
return 0xffffffff;
}
| |
35,997 | resize_properties | bluesky950520[P]quickjs/quickjs.c | static no_inline int resize_properties(JSContext *ctx, JSShape **psh,
JSObject *p, uint32_t count)
{
JSShape *sh;
uint32_t new_size, new_hash_size, new_hash_mask, i;
JSShapeProperty *pr;
void *sh_alloc;
intptr_t h;
sh = *psh;
new_size = max_int(count, sh->prop_size * 3 / 2);
/* Reallocate prop array first to avoid crash or size inconsistency
in case of memory allocation failure */
if (p) {
JSProperty *new_prop;
new_prop = js_realloc(ctx, p->prop, sizeof(new_prop[0]) * new_size);
if (unlikely(!new_prop))
return -1;
p->prop = new_prop;
}
new_hash_size = sh->prop_hash_mask + 1;
while (new_hash_size < new_size)
new_hash_size = 2 * new_hash_size;
if (new_hash_size != (sh->prop_hash_mask + 1)) {
JSShape *old_sh;
/* resize the hash table and the properties */
old_sh = sh;
sh_alloc = js_malloc(ctx, get_shape_size(new_hash_size, new_size));
if (!sh_alloc)
return -1;
sh = get_shape_from_alloc(sh_alloc, new_hash_size);
list_del(&old_sh->header.link);
/* copy all the fields and the properties */
memcpy(sh, old_sh,
sizeof(JSShape) + sizeof(sh->prop[0]) * old_sh->prop_count);
list_add_tail(&sh->header.link, &ctx->rt->gc_obj_list);
new_hash_mask = new_hash_size - 1;
sh->prop_hash_mask = new_hash_mask;
memset(prop_hash_end(sh) - new_hash_size, 0,
sizeof(prop_hash_end(sh)[0]) * new_hash_size);
for(i = 0, pr = sh->prop; i < sh->prop_count; i++, pr++) {
if (pr->atom != JS_ATOM_NULL) {
h = ((uintptr_t)pr->atom & new_hash_mask);
pr->hash_next = prop_hash_end(sh)[-h - 1];
prop_hash_end(sh)[-h - 1] = i + 1;
}
}
js_free(ctx, get_alloc_from_shape(old_sh));
} else {
/* only resize the properties */
list_del(&sh->header.link);
sh_alloc = js_realloc(ctx, get_alloc_from_shape(sh),
get_shape_size(new_hash_size, new_size));
if (unlikely(!sh_alloc)) {
/* insert again in the GC list */
list_add_tail(&sh->header.link, &ctx->rt->gc_obj_list);
return -1;
}
sh = get_shape_from_alloc(sh_alloc, new_hash_size);
list_add_tail(&sh->header.link, &ctx->rt->gc_obj_list);
}
*psh = sh;
sh->prop_size = new_size;
return 0;
} | O2 | c | resize_properties:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, 0x20(%rsp)
movq (%rsi), %r15
imull $0x3, 0x24(%r15), %eax
pushq $0x2
popq %rsi
cltd
idivl %esi
movl %eax, %ebp
cmpl %eax, %ecx
cmovgl %ecx, %ebp
movl %ebp, %r13d
pushq $-0x1
popq %r12
testq %rbx, %rbx
je 0x350f6
movq 0x20(%rbx), %rsi
movq %r13, %rdx
shlq $0x4, %rdx
movq %rdi, %r14
callq 0x17277
testq %rax, %rax
je 0x352b3
movq %rax, 0x20(%rbx)
movq %r14, %rdi
movq %r15, 0x8(%rsp)
movl 0x20(%r15), %eax
leal 0x1(%rax), %ecx
movl %ecx, %edx
movl %edx, %r15d
leal (%r15,%r15), %edx
cmpl %ebp, %r15d
jb 0x35104
cmpl %ecx, %r15d
jne 0x35193
movq 0x8(%rsp), %r15
movq 0x8(%r15), %rdx
movq 0x10(%r15), %rsi
movq %rsi, 0x8(%rdx)
movq %rdx, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r15)
notq %rax
leaq (%r15,%rax,4), %rsi
movl %ecx, %ebx
leaq (,%rbx,4), %rax
leaq (%rax,%r13,8), %rdx
addq $0x40, %rdx
movq %rdi, %r13
callq 0x17277
testq %rax, %rax
je 0x352c5
leaq (%rax,%rbx,4), %r12
leaq (%rax,%rbx,4), %rcx
addq $0x8, %rcx
movq 0x18(%r13), %rdx
leaq 0x98(%rdx), %rsi
movq 0x98(%rdx), %rdi
movq %rcx, 0x8(%rdi)
movq %rdi, 0x8(%rax,%rbx,4)
movq %rsi, 0x10(%rax,%rbx,4)
movq %rcx, 0x98(%rdx)
jmp 0x352a3
movl %r15d, %r14d
leaq (,%r14,4), %rax
movq %rax, 0x18(%rsp)
leaq (%rax,%r13,8), %rsi
addq $0x40, %rsi
movq %rdi, %r13
callq 0x17214
testq %rax, %rax
je 0x352b3
movq %rax, %rbx
leaq (%rax,%r14,4), %r12
movq 0x8(%rsp), %rsi
movq 0x8(%rsi), %rax
movq 0x10(%rsi), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
movslq 0x28(%rsi), %rax
leaq 0x40(,%rax,8), %rdx
movq %r12, %rdi
callq 0xe5c0
leaq (%rbx,%r14,4), %rax
addq $0x8, %rax
movq %r13, 0x10(%rsp)
movq 0x18(%r13), %rcx
leaq 0x98(%rcx), %rdx
movq 0x98(%rcx), %rsi
movq %rax, 0x8(%rsi)
movq %rsi, 0x8(%rbx,%r14,4)
movq %rdx, 0x10(%rbx,%r14,4)
movq %rax, 0x98(%rcx)
decl %r15d
movl %r15d, 0x20(%rbx,%r14,4)
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %esi, %esi
movq 0x18(%rsp), %rdx
callq 0xe360
leaq (%rbx,%r14,4), %rax
addq $0x40, %rax
movl $0x3ffffff, %ecx # imm = 0x3FFFFFF
movl $0xfc000000, %edx # imm = 0xFC000000
cmpl 0x28(%r12), %r13d
jae 0x3528a
movl 0x4(%rax), %esi
testl %esi, %esi
je 0x35281
andl %r15d, %esi
notq %rsi
movl (%r12,%rsi,4), %edi
andl %ecx, %edi
movl (%rax), %r8d
andl %edx, %r8d
orl %edi, %r8d
movl %r8d, (%rax)
incl %r13d
movl %r13d, (%r12,%rsi,4)
jmp 0x35284
incl %r13d
addq $0x8, %rax
jmp 0x35252
movq 0x8(%rsp), %rcx
movl 0x20(%rcx), %eax
notq %rax
leaq (%rcx,%rax,4), %rsi
movq 0x10(%rsp), %rdi
callq 0x1726e
movq 0x20(%rsp), %rax
movq %r12, (%rax)
movl %ebp, 0x24(%r12)
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%r15), %rax
movq 0x18(%r13), %rcx
leaq 0x98(%rcx), %rdx
movq 0x98(%rcx), %rsi
movq %rax, 0x8(%rsi)
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rax, 0x98(%rcx)
jmp 0x352b3
| resize_properties:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov [rsp+58h+var_38], rsi
mov r15, [rsi]
imul eax, [r15+24h], 3
push 2
pop rsi
cdq
idiv esi
mov ebp, eax
cmp ecx, eax
cmovg ebp, ecx
mov r13d, ebp
push 0FFFFFFFFFFFFFFFFh
pop r12
test rbx, rbx
jz short loc_350F6
mov rsi, [rbx+20h]
mov rdx, r13
shl rdx, 4
mov r14, rdi
call js_realloc
test rax, rax
jz loc_352B3
mov [rbx+20h], rax
mov rdi, r14
loc_350F6:
mov [rsp+58h+var_50], r15
mov eax, [r15+20h]
lea ecx, [rax+1]
mov edx, ecx
loc_35104:
mov r15d, edx
lea edx, [r15+r15]
cmp r15d, ebp
jb short loc_35104
cmp r15d, ecx
jnz short loc_35193
mov r15, [rsp+58h+var_50]
mov rdx, [r15+8]
mov rsi, [r15+10h]
mov [rdx+8], rsi
mov [rsi], rdx
xorps xmm0, xmm0
movups xmmword ptr [r15+8], xmm0
not rax
lea rsi, [r15+rax*4]
mov ebx, ecx
lea rax, ds:0[rbx*4]
lea rdx, [rax+r13*8]
add rdx, 40h ; '@'
mov r13, rdi
call js_realloc
test rax, rax
jz loc_352C5
lea r12, [rax+rbx*4]
lea rcx, [rax+rbx*4]
add rcx, 8
mov rdx, [r13+18h]
lea rsi, [rdx+98h]
mov rdi, [rdx+98h]
mov [rdi+8], rcx
mov [rax+rbx*4+8], rdi
mov [rax+rbx*4+10h], rsi
mov [rdx+98h], rcx
jmp loc_352A3
loc_35193:
mov r14d, r15d
lea rax, ds:0[r14*4]
mov [rsp+58h+var_40], rax
lea rsi, [rax+r13*8]
add rsi, 40h ; '@'
mov r13, rdi
call js_malloc
test rax, rax
jz loc_352B3
mov rbx, rax
lea r12, [rax+r14*4]
mov rsi, [rsp+58h+var_50]
mov rax, [rsi+8]
mov rcx, [rsi+10h]
mov [rax+8], rcx
mov [rcx], rax
xorps xmm0, xmm0
movups xmmword ptr [rsi+8], xmm0
movsxd rax, dword ptr [rsi+28h]
lea rdx, ds:40h[rax*8]
mov rdi, r12
call _memcpy
lea rax, [rbx+r14*4]
add rax, 8
mov [rsp+58h+var_48], r13
mov rcx, [r13+18h]
lea rdx, [rcx+98h]
mov rsi, [rcx+98h]
mov [rsi+8], rax
mov [rbx+r14*4+8], rsi
mov [rbx+r14*4+10h], rdx
mov [rcx+98h], rax
dec r15d
mov [rbx+r14*4+20h], r15d
xor r13d, r13d
mov rdi, rbx
xor esi, esi
mov rdx, [rsp+58h+var_40]
call _memset
lea rax, [rbx+r14*4]
add rax, 40h ; '@'
mov ecx, 3FFFFFFh
mov edx, 0FC000000h
loc_35252:
cmp r13d, [r12+28h]
jnb short loc_3528A
mov esi, [rax+4]
test esi, esi
jz short loc_35281
and esi, r15d
not rsi
mov edi, [r12+rsi*4]
and edi, ecx
mov r8d, [rax]
and r8d, edx
or r8d, edi
mov [rax], r8d
inc r13d
mov [r12+rsi*4], r13d
jmp short loc_35284
loc_35281:
inc r13d
loc_35284:
add rax, 8
jmp short loc_35252
loc_3528A:
mov rcx, [rsp+58h+var_50]
mov eax, [rcx+20h]
not rax
lea rsi, [rcx+rax*4]
mov rdi, [rsp+58h+var_48]
call js_free
loc_352A3:
mov rax, [rsp+58h+var_38]
mov [rax], r12
mov [r12+24h], ebp
xor r12d, r12d
loc_352B3:
mov eax, r12d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_352C5:
lea rax, [r15+8]
mov rcx, [r13+18h]
lea rdx, [rcx+98h]
mov rsi, [rcx+98h]
mov [rsi+8], rax
mov [r15+8], rsi
mov [r15+10h], rdx
mov [rcx+98h], rax
jmp short loc_352B3
| long long resize_properties(long long a1, long long *a2, long long a3, signed int a4)
{
long long v5; // r15
unsigned int v6; // ebp
unsigned int v7; // r12d
long long v8; // rax
long long v9; // rax
unsigned int v10; // ecx
unsigned int v11; // edx
unsigned int v12; // r15d
long long v13; // rdx
_QWORD *v14; // rsi
long long v15; // rbx
long long v16; // rax
long long v17; // r12
long long *v18; // rsi
long long v19; // rdi
long long v20; // r14
long long v21; // rax
long long v22; // rbx
long long v23; // rax
_QWORD *v24; // rcx
_QWORD *v25; // rax
long long v26; // rcx
long long v27; // rsi
unsigned int v28; // r15d
unsigned int v29; // r13d
unsigned int *v30; // rax
unsigned int v31; // esi
unsigned long long v32; // rsi
long long *v34; // rdx
long long v35; // rsi
long long v36; // [rsp+8h] [rbp-50h]
long long v37; // [rsp+18h] [rbp-40h]
v5 = *a2;
v6 = 3 * *(_DWORD *)(*a2 + 36) / 2;
if ( a4 > (int)v6 )
v6 = a4;
v7 = -1;
if ( a3 )
{
v8 = js_realloc(a1, *(_QWORD *)(a3 + 32), 16LL * v6);
if ( !v8 )
return v7;
*(_QWORD *)(a3 + 32) = v8;
}
v36 = v5;
v9 = *(unsigned int *)(v5 + 32);
v10 = v9 + 1;
v11 = v9 + 1;
do
{
v12 = v11;
v11 *= 2;
}
while ( v12 < v6 );
if ( v12 == v10 )
{
v13 = *(_QWORD *)(v36 + 8);
v14 = *(_QWORD **)(v36 + 16);
*(_QWORD *)(v13 + 8) = v14;
*v14 = v13;
*(_OWORD *)(v36 + 8) = 0LL;
v15 = v10;
v16 = js_realloc(a1, v36 + 4 * ~v9, 4LL * v10 + 8LL * v6 + 64);
if ( !v16 )
{
v34 = (long long *)(*(_QWORD *)(a1 + 24) + 152LL);
v35 = *v34;
*(_QWORD *)(v35 + 8) = v36 + 8;
*(_QWORD *)(v36 + 8) = v35;
*(_QWORD *)(v36 + 16) = v34;
*v34 = v36 + 8;
return v7;
}
v17 = v16 + 4 * v15;
v18 = (long long *)(*(_QWORD *)(a1 + 24) + 152LL);
v19 = *v18;
*(_QWORD *)(v19 + 8) = v17 + 8;
*(_QWORD *)(v17 + 8) = v19;
*(_QWORD *)(v17 + 16) = v18;
*v18 = v17 + 8;
goto LABEL_19;
}
v20 = v12;
v37 = 4LL * v12;
v21 = js_malloc(a1, v37 + 8LL * v6 + 64);
if ( v21 )
{
v22 = v21;
v17 = v21 + 4LL * v12;
v23 = *(_QWORD *)(v36 + 8);
v24 = *(_QWORD **)(v36 + 16);
*(_QWORD *)(v23 + 8) = v24;
*v24 = v23;
*(_OWORD *)(v36 + 8) = 0LL;
memcpy(v17, v36, 8LL * *(int *)(v36 + 40) + 64);
v25 = (_QWORD *)(v22 + 4LL * v12 + 8);
v26 = *(_QWORD *)(a1 + 24);
v27 = *(_QWORD *)(v26 + 152);
*(_QWORD *)(v27 + 8) = v25;
*v25 = v27;
*(_QWORD *)(v22 + 4LL * v12 + 16) = v26 + 152;
*(_QWORD *)(v26 + 152) = v25;
v28 = v12 - 1;
*(_DWORD *)(v22 + 4 * v20 + 32) = v28;
v29 = 0;
memset(v22, 0LL, v37);
v30 = (unsigned int *)(v22 + 4 * v20 + 64);
while ( v29 < *(_DWORD *)(v17 + 40) )
{
v31 = v30[1];
if ( v31 )
{
v32 = ~(unsigned long long)(v28 & v31);
*v30 = *(_DWORD *)(v17 + 4 * v32) & 0x3FFFFFF | *v30 & 0xFC000000;
*(_DWORD *)(v17 + 4 * v32) = ++v29;
}
else
{
++v29;
}
v30 += 2;
}
js_free(a1, v36 + 4 * ~(unsigned long long)*(unsigned int *)(v36 + 32));
LABEL_19:
*a2 = v17;
*(_DWORD *)(v17 + 36) = v6;
return 0;
}
return v7;
}
| resize_properties:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV qword ptr [RSP + 0x20],RSI
MOV R15,qword ptr [RSI]
IMUL EAX,dword ptr [R15 + 0x24],0x3
PUSH 0x2
POP RSI
CDQ
IDIV ESI
MOV EBP,EAX
CMP ECX,EAX
CMOVG EBP,ECX
MOV R13D,EBP
PUSH -0x1
POP R12
TEST RBX,RBX
JZ 0x001350f6
MOV RSI,qword ptr [RBX + 0x20]
MOV RDX,R13
SHL RDX,0x4
MOV R14,RDI
CALL 0x00117277
TEST RAX,RAX
JZ 0x001352b3
MOV qword ptr [RBX + 0x20],RAX
MOV RDI,R14
LAB_001350f6:
MOV qword ptr [RSP + 0x8],R15
MOV EAX,dword ptr [R15 + 0x20]
LEA ECX,[RAX + 0x1]
MOV EDX,ECX
LAB_00135104:
MOV R15D,EDX
LEA EDX,[R15 + R15*0x1]
CMP R15D,EBP
JC 0x00135104
CMP R15D,ECX
JNZ 0x00135193
MOV R15,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [R15 + 0x8]
MOV RSI,qword ptr [R15 + 0x10]
MOV qword ptr [RDX + 0x8],RSI
MOV qword ptr [RSI],RDX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x8],XMM0
NOT RAX
LEA RSI,[R15 + RAX*0x4]
MOV EBX,ECX
LEA RAX,[RBX*0x4]
LEA RDX,[RAX + R13*0x8]
ADD RDX,0x40
MOV R13,RDI
CALL 0x00117277
TEST RAX,RAX
JZ 0x001352c5
LEA R12,[RAX + RBX*0x4]
LEA RCX,[RAX + RBX*0x4]
ADD RCX,0x8
MOV RDX,qword ptr [R13 + 0x18]
LEA RSI,[RDX + 0x98]
MOV RDI,qword ptr [RDX + 0x98]
MOV qword ptr [RDI + 0x8],RCX
MOV qword ptr [RAX + RBX*0x4 + 0x8],RDI
MOV qword ptr [RAX + RBX*0x4 + 0x10],RSI
MOV qword ptr [RDX + 0x98],RCX
JMP 0x001352a3
LAB_00135193:
MOV R14D,R15D
LEA RAX,[R14*0x4]
MOV qword ptr [RSP + 0x18],RAX
LEA RSI,[RAX + R13*0x8]
ADD RSI,0x40
MOV R13,RDI
CALL 0x00117214
TEST RAX,RAX
JZ 0x001352b3
MOV RBX,RAX
LEA R12,[RAX + R14*0x4]
MOV RSI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSI + 0x8]
MOV RCX,qword ptr [RSI + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RCX],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x8],XMM0
MOVSXD RAX,dword ptr [RSI + 0x28]
LEA RDX,[0x40 + RAX*0x8]
MOV RDI,R12
CALL 0x0010e5c0
LEA RAX,[RBX + R14*0x4]
ADD RAX,0x8
MOV qword ptr [RSP + 0x10],R13
MOV RCX,qword ptr [R13 + 0x18]
LEA RDX,[RCX + 0x98]
MOV RSI,qword ptr [RCX + 0x98]
MOV qword ptr [RSI + 0x8],RAX
MOV qword ptr [RBX + R14*0x4 + 0x8],RSI
MOV qword ptr [RBX + R14*0x4 + 0x10],RDX
MOV qword ptr [RCX + 0x98],RAX
DEC R15D
MOV dword ptr [RBX + R14*0x4 + 0x20],R15D
XOR R13D,R13D
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x0010e360
LEA RAX,[RBX + R14*0x4]
ADD RAX,0x40
MOV ECX,0x3ffffff
MOV EDX,0xfc000000
LAB_00135252:
CMP R13D,dword ptr [R12 + 0x28]
JNC 0x0013528a
MOV ESI,dword ptr [RAX + 0x4]
TEST ESI,ESI
JZ 0x00135281
AND ESI,R15D
NOT RSI
MOV EDI,dword ptr [R12 + RSI*0x4]
AND EDI,ECX
MOV R8D,dword ptr [RAX]
AND R8D,EDX
OR R8D,EDI
MOV dword ptr [RAX],R8D
INC R13D
MOV dword ptr [R12 + RSI*0x4],R13D
JMP 0x00135284
LAB_00135281:
INC R13D
LAB_00135284:
ADD RAX,0x8
JMP 0x00135252
LAB_0013528a:
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RCX + 0x20]
NOT RAX
LEA RSI,[RCX + RAX*0x4]
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0011726e
LAB_001352a3:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX],R12
MOV dword ptr [R12 + 0x24],EBP
XOR R12D,R12D
LAB_001352b3:
MOV EAX,R12D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001352c5:
LEA RAX,[R15 + 0x8]
MOV RCX,qword ptr [R13 + 0x18]
LEA RDX,[RCX + 0x98]
MOV RSI,qword ptr [RCX + 0x98]
MOV qword ptr [RSI + 0x8],RAX
MOV qword ptr [R15 + 0x8],RSI
MOV qword ptr [R15 + 0x10],RDX
MOV qword ptr [RCX + 0x98],RAX
JMP 0x001352b3
|
int4 resize_properties(long param_1,int8 *param_2,long param_3,uint param_4)
{
void *__src;
long *plVar1;
long lVar2;
uint uVar3;
uint uVar4;
uint uVar5;
long lVar6;
void *__s;
long lVar7;
uint *puVar8;
uint uVar9;
long lVar10;
ulong uVar11;
ulong uVar12;
void *__dest;
uint uVar13;
__src = (void *)*param_2;
uVar5 = (*(int *)((long)__src + 0x24) * 3) / 2;
if ((int)uVar5 < (int)param_4) {
uVar5 = param_4;
}
uVar12 = (ulong)uVar5;
if (param_3 != 0) {
lVar6 = js_realloc(param_1,*(int8 *)(param_3 + 0x20),uVar12 << 4);
if (lVar6 == 0) {
return 0xffffffff;
}
*(long *)(param_3 + 0x20) = lVar6;
}
uVar13 = *(uint *)((long)__src + 0x20);
uVar9 = uVar13 + 1;
uVar4 = uVar9;
do {
uVar3 = uVar4;
uVar11 = (ulong)uVar3;
uVar4 = uVar3 * 2;
} while (uVar3 < uVar5);
if (uVar3 == uVar9) {
lVar6 = *(long *)((long)__src + 8);
plVar1 = *(long **)((long)__src + 0x10);
*(long **)(lVar6 + 8) = plVar1;
*plVar1 = lVar6;
*(int8 *)((long)__src + 8) = 0;
*(int8 *)((long)__src + 0x10) = 0;
uVar11 = (ulong)uVar9;
lVar6 = js_realloc(param_1,(void *)((long)__src + ~(ulong)uVar13 * 4),
uVar11 * 4 + uVar12 * 8 + 0x40);
if (lVar6 == 0) {
lVar6 = *(long *)(param_1 + 0x18);
lVar2 = *(long *)(lVar6 + 0x98);
*(long *)(lVar2 + 8) = (long)__src + 8;
*(long *)((long)__src + 8) = lVar2;
*(long *)((long)__src + 0x10) = lVar6 + 0x98;
*(long *)(lVar6 + 0x98) = (long)__src + 8;
return 0xffffffff;
}
__dest = (void *)(lVar6 + uVar11 * 4);
lVar10 = lVar6 + uVar11 * 4 + 8;
lVar2 = *(long *)(param_1 + 0x18);
lVar7 = *(long *)(lVar2 + 0x98);
*(long *)(lVar7 + 8) = lVar10;
*(long *)(lVar6 + 8 + uVar11 * 4) = lVar7;
*(long *)(lVar6 + 0x10 + uVar11 * 4) = lVar2 + 0x98;
*(long *)(lVar2 + 0x98) = lVar10;
}
else {
__s = (void *)js_malloc(param_1,uVar11 * 4 + uVar12 * 8 + 0x40);
if (__s == (void *)0x0) {
return 0xffffffff;
}
__dest = (void *)((long)__s + uVar11 * 4);
lVar6 = *(long *)((long)__src + 8);
plVar1 = *(long **)((long)__src + 0x10);
*(long **)(lVar6 + 8) = plVar1;
*plVar1 = lVar6;
*(int8 *)((long)__src + 8) = 0;
*(int8 *)((long)__src + 0x10) = 0;
memcpy(__dest,__src,(long)*(int *)((long)__src + 0x28) * 8 + 0x40);
lVar7 = (long)__s + uVar11 * 4 + 8;
lVar6 = *(long *)(param_1 + 0x18);
lVar2 = *(long *)(lVar6 + 0x98);
*(long *)(lVar2 + 8) = lVar7;
*(long *)((long)__s + uVar11 * 4 + 8) = lVar2;
*(long *)((long)__s + uVar11 * 4 + 0x10) = lVar6 + 0x98;
*(long *)(lVar6 + 0x98) = lVar7;
*(uint *)((long)__s + uVar11 * 4 + 0x20) = uVar3 - 1;
memset(__s,0,uVar11 * 4);
puVar8 = (uint *)((long)__s + uVar11 * 4 + 0x40);
for (uVar13 = 0; uVar13 < *(uint *)((long)__dest + 0x28); uVar13 = uVar13 + 1) {
if (puVar8[1] != 0) {
uVar12 = ~(ulong)(puVar8[1] & uVar3 - 1);
*puVar8 = *puVar8 & 0xfc000000 | *(uint *)((long)__dest + uVar12 * 4) & 0x3ffffff;
*(uint *)((long)__dest + uVar12 * 4) = uVar13 + 1;
}
puVar8 = puVar8 + 2;
}
js_free(param_1,(void *)((long)__src + ~(ulong)*(uint *)((long)__src + 0x20) * 4));
}
*param_2 = __dest;
*(uint *)((long)__dest + 0x24) = uVar5;
return 0;
}
| |
35,998 | resize_properties | bluesky950520[P]quickjs/quickjs.c | static no_inline int resize_properties(JSContext *ctx, JSShape **psh,
JSObject *p, uint32_t count)
{
JSShape *sh;
uint32_t new_size, new_hash_size, new_hash_mask, i;
JSShapeProperty *pr;
void *sh_alloc;
intptr_t h;
sh = *psh;
new_size = max_int(count, sh->prop_size * 3 / 2);
/* Reallocate prop array first to avoid crash or size inconsistency
in case of memory allocation failure */
if (p) {
JSProperty *new_prop;
new_prop = js_realloc(ctx, p->prop, sizeof(new_prop[0]) * new_size);
if (unlikely(!new_prop))
return -1;
p->prop = new_prop;
}
new_hash_size = sh->prop_hash_mask + 1;
while (new_hash_size < new_size)
new_hash_size = 2 * new_hash_size;
if (new_hash_size != (sh->prop_hash_mask + 1)) {
JSShape *old_sh;
/* resize the hash table and the properties */
old_sh = sh;
sh_alloc = js_malloc(ctx, get_shape_size(new_hash_size, new_size));
if (!sh_alloc)
return -1;
sh = get_shape_from_alloc(sh_alloc, new_hash_size);
list_del(&old_sh->header.link);
/* copy all the fields and the properties */
memcpy(sh, old_sh,
sizeof(JSShape) + sizeof(sh->prop[0]) * old_sh->prop_count);
list_add_tail(&sh->header.link, &ctx->rt->gc_obj_list);
new_hash_mask = new_hash_size - 1;
sh->prop_hash_mask = new_hash_mask;
memset(prop_hash_end(sh) - new_hash_size, 0,
sizeof(prop_hash_end(sh)[0]) * new_hash_size);
for(i = 0, pr = sh->prop; i < sh->prop_count; i++, pr++) {
if (pr->atom != JS_ATOM_NULL) {
h = ((uintptr_t)pr->atom & new_hash_mask);
pr->hash_next = prop_hash_end(sh)[-h - 1];
prop_hash_end(sh)[-h - 1] = i + 1;
}
}
js_free(ctx, get_alloc_from_shape(old_sh));
} else {
/* only resize the properties */
list_del(&sh->header.link);
sh_alloc = js_realloc(ctx, get_alloc_from_shape(sh),
get_shape_size(new_hash_size, new_size));
if (unlikely(!sh_alloc)) {
/* insert again in the GC list */
list_add_tail(&sh->header.link, &ctx->rt->gc_obj_list);
return -1;
}
sh = get_shape_from_alloc(sh_alloc, new_hash_size);
list_add_tail(&sh->header.link, &ctx->rt->gc_obj_list);
}
*psh = sh;
sh->prop_size = new_size;
return 0;
} | O3 | c | resize_properties:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbp
movq %rdi, %r14
movq (%rsi), %r15
movl 0x24(%r15), %eax
leal (%rax,%rax,2), %eax
movl %eax, %r13d
shrl $0x1f, %r13d
addl %eax, %r13d
sarl %r13d
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
movl %r13d, %ebx
testq %rdx, %rdx
je 0x3d9c6
movq %rdx, %r12
movq 0x20(%rdx), %rsi
movq %rbx, %rdx
shlq $0x4, %rdx
movq %r14, %rdi
callq 0x1d4c0
testq %rax, %rax
je 0x3dbe2
movq %rax, 0x20(%r12)
movq %rbp, 0x20(%rsp)
movl 0x20(%r15), %eax
leal 0x1(%rax), %ecx
movl %ecx, %edx
movl %edx, %ebp
leal (,%rbp,2), %edx
cmpl %r13d, %ebp
jb 0x3d9d4
cmpl %ecx, %ebp
jne 0x3da7c
movq 0x8(%r15), %rdx
movq 0x10(%r15), %rsi
movq %rsi, 0x8(%rdx)
movq %rdx, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r15)
notq %rax
leaq (%r15,%rax,4), %rsi
movl %ecx, %ebp
leaq (,%rbp,4), %rax
leaq (%rax,%rbx,8), %rdx
addq $0x40, %rdx
movq %r14, %rdi
callq 0x1d4c0
testq %rax, %rax
je 0x3dbb9
leaq (%rax,%rbp,4), %r12
leaq (%rax,%rbp,4), %rcx
addq $0x8, %rcx
movq 0x18(%r14), %rdx
leaq 0x98(%rdx), %rsi
movq 0x98(%rdx), %rdi
movq %rcx, 0x8(%rdi)
movq %rdi, 0x8(%rax,%rbp,4)
movq %rsi, 0x10(%rax,%rbp,4)
movq %rcx, 0x98(%rdx)
movq 0x20(%rsp), %rax
movq %r12, (%rax)
movl %r13d, 0x24(%r12)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %r12d
leaq (,%r12,4), %rax
movq %rax, 0x18(%rsp)
leaq (%rax,%rbx,8), %rsi
addq $0x40, %rsi
movq %r14, %rdi
callq 0xee12
testq %rax, %rax
je 0x3dbe2
movq %r12, %rbx
leaq (%rax,%r12,4), %r12
movq %rax, 0x8(%rsp)
movq 0x8(%r15), %rax
movq 0x10(%r15), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r15)
movslq 0x28(%r15), %rax
leaq 0x40(,%rax,8), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0xe5b0
movq %rbx, 0x10(%rsp)
movq 0x8(%rsp), %rdi
leaq (%rdi,%rbx,4), %rax
addq $0x8, %rax
movq 0x18(%r14), %rcx
leaq 0x98(%rcx), %rdx
movq 0x98(%rcx), %rsi
movq %rax, 0x8(%rsi)
movq %rsi, 0x8(%rdi,%rbx,4)
movq %rdx, 0x10(%rdi,%rbx,4)
movq %rax, 0x98(%rcx)
decl %ebp
movl %ebp, 0x20(%rdi,%rbx,4)
xorl %ebx, %ebx
xorl %esi, %esi
movq 0x18(%rsp), %rdx
callq 0xe350
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
movl 0x28(%rcx,%rax,4), %esi
testl %esi, %esi
je 0x3db82
leaq 0x40(%r12), %rax
movl $0x3ffffff, %ecx # imm = 0x3FFFFFF
movl $0xfc000000, %edx # imm = 0xFC000000
movl 0x4(%rax), %edi
testl %edi, %edi
je 0x3db78
andl %ebp, %edi
notq %rdi
movl (%r12,%rdi,4), %esi
andl %ecx, %esi
movl (%rax), %r8d
andl %edx, %r8d
orl %esi, %r8d
movl %r8d, (%rax)
incl %ebx
movl %ebx, (%r12,%rdi,4)
movl 0x28(%r12), %esi
jmp 0x3db7a
incl %ebx
addq $0x8, %rax
cmpl %esi, %ebx
jb 0x3db4d
movl 0x20(%r15), %eax
notq %rax
leaq (%r15,%rax,4), %r15
movq 0x18(%r14), %rbx
decq 0x28(%rbx)
movq %r15, %rdi
callq *0x20(%rbx)
movq 0x30(%rbx), %rcx
movq 0x40(%rbx), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%rbx)
movq %r15, %rsi
callq *0x10(%rbx)
jmp 0x3da5e
leaq 0x8(%r15), %rax
movq 0x18(%r14), %rcx
leaq 0x98(%rcx), %rdx
movq 0x98(%rcx), %rsi
movq %rax, 0x8(%rsi)
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rax, 0x98(%rcx)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x3da6d
| resize_properties:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbp, rsi
mov r14, rdi
mov r15, [rsi]
mov eax, [r15+24h]
lea eax, [rax+rax*2]
mov r13d, eax
shr r13d, 1Fh
add r13d, eax
sar r13d, 1
cmp ecx, r13d
cmovg r13d, ecx
mov ebx, r13d
test rdx, rdx
jz short loc_3D9C6
mov r12, rdx
mov rsi, [rdx+20h]
mov rdx, rbx
shl rdx, 4
mov rdi, r14
call js_realloc
test rax, rax
jz loc_3DBE2
mov [r12+20h], rax
loc_3D9C6:
mov [rsp+58h+var_38], rbp
mov eax, [r15+20h]
lea ecx, [rax+1]
mov edx, ecx
loc_3D9D4:
mov ebp, edx
lea edx, ds:0[rbp*2]
cmp ebp, r13d
jb short loc_3D9D4
cmp ebp, ecx
jnz loc_3DA7C
mov rdx, [r15+8]
mov rsi, [r15+10h]
mov [rdx+8], rsi
mov [rsi], rdx
xorps xmm0, xmm0
movups xmmword ptr [r15+8], xmm0
not rax
lea rsi, [r15+rax*4]
mov ebp, ecx
lea rax, ds:0[rbp*4]
lea rdx, [rax+rbx*8]
add rdx, 40h ; '@'
mov rdi, r14
call js_realloc
test rax, rax
jz loc_3DBB9
lea r12, [rax+rbp*4]
lea rcx, [rax+rbp*4]
add rcx, 8
mov rdx, [r14+18h]
lea rsi, [rdx+98h]
mov rdi, [rdx+98h]
mov [rdi+8], rcx
mov [rax+rbp*4+8], rdi
mov [rax+rbp*4+10h], rsi
mov [rdx+98h], rcx
loc_3DA5E:
mov rax, [rsp+58h+var_38]
mov [rax], r12
mov [r12+24h], r13d
xor eax, eax
loc_3DA6D:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3DA7C:
mov r12d, ebp
lea rax, ds:0[r12*4]
mov [rsp+58h+var_40], rax
lea rsi, [rax+rbx*8]
add rsi, 40h ; '@'
mov rdi, r14
call js_malloc
test rax, rax
jz loc_3DBE2
mov rbx, r12
lea r12, [rax+r12*4]
mov [rsp+58h+var_50], rax
mov rax, [r15+8]
mov rcx, [r15+10h]
mov [rax+8], rcx
mov [rcx], rax
xorps xmm0, xmm0
movups xmmword ptr [r15+8], xmm0
movsxd rax, dword ptr [r15+28h]
lea rdx, ds:40h[rax*8]
mov rdi, r12
mov rsi, r15
call _memcpy
mov [rsp+58h+var_48], rbx
mov rdi, [rsp+58h+var_50]
lea rax, [rdi+rbx*4]
add rax, 8
mov rcx, [r14+18h]
lea rdx, [rcx+98h]
mov rsi, [rcx+98h]
mov [rsi+8], rax
mov [rdi+rbx*4+8], rsi
mov [rdi+rbx*4+10h], rdx
mov [rcx+98h], rax
dec ebp
mov [rdi+rbx*4+20h], ebp
xor ebx, ebx
xor esi, esi
mov rdx, [rsp+58h+var_40]
call _memset
mov rax, [rsp+58h+var_48]
mov rcx, [rsp+58h+var_50]
mov esi, [rcx+rax*4+28h]
test esi, esi
jz short loc_3DB82
lea rax, [r12+40h]
mov ecx, 3FFFFFFh
mov edx, 0FC000000h
loc_3DB4D:
mov edi, [rax+4]
test edi, edi
jz short loc_3DB78
and edi, ebp
not rdi
mov esi, [r12+rdi*4]
and esi, ecx
mov r8d, [rax]
and r8d, edx
or r8d, esi
mov [rax], r8d
inc ebx
mov [r12+rdi*4], ebx
mov esi, [r12+28h]
jmp short loc_3DB7A
loc_3DB78:
inc ebx
loc_3DB7A:
add rax, 8
cmp ebx, esi
jb short loc_3DB4D
loc_3DB82:
mov eax, [r15+20h]
not rax
lea r15, [r15+rax*4]
mov rbx, [r14+18h]
dec qword ptr [rbx+28h]
mov rdi, r15
call qword ptr [rbx+20h]
mov rcx, [rbx+30h]
mov rdi, [rbx+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rcx
mov rsi, r15
call qword ptr [rbx+10h]
jmp loc_3DA5E
loc_3DBB9:
lea rax, [r15+8]
mov rcx, [r14+18h]
lea rdx, [rcx+98h]
mov rsi, [rcx+98h]
mov [rsi+8], rax
mov [r15+8], rsi
mov [r15+10h], rdx
mov [rcx+98h], rax
loc_3DBE2:
mov eax, 0FFFFFFFFh
jmp loc_3DA6D
| long long resize_properties(long long a1, long long *a2, long long a3, signed int a4)
{
long long v5; // r15
unsigned int v6; // r13d
long long v8; // rax
long long v9; // rax
unsigned int v10; // ecx
unsigned int v11; // edx
unsigned int v12; // ebp
long long v13; // rdx
_QWORD *v14; // rsi
long long v15; // rbp
long long v16; // rax
long long v17; // r12
long long *v18; // rsi
long long v19; // rdi
long long v21; // rax
long long v22; // rax
_QWORD *v23; // rcx
_QWORD *v24; // rax
long long v25; // rcx
long long v26; // rsi
unsigned int v27; // ebp
unsigned int v28; // ebx
unsigned int v29; // esi
unsigned int *v30; // rax
unsigned int v31; // edi
unsigned long long v32; // rdi
long long v33; // r15
long long v34; // rbx
long long v35; // rax
long long v36; // rdi
long long *v37; // rdx
long long v38; // rsi
long long v39; // [rsp+8h] [rbp-50h]
long long v40; // [rsp+10h] [rbp-48h]
long long v41; // [rsp+18h] [rbp-40h]
v5 = *a2;
v6 = 3 * *(_DWORD *)(*a2 + 36) / 2;
if ( a4 > (int)v6 )
v6 = a4;
if ( a3 )
{
v8 = js_realloc(a1, *(_QWORD *)(a3 + 32), 16LL * v6);
if ( !v8 )
return 0xFFFFFFFFLL;
*(_QWORD *)(a3 + 32) = v8;
}
v9 = *(unsigned int *)(v5 + 32);
v10 = v9 + 1;
v11 = v9 + 1;
do
{
v12 = v11;
v11 *= 2;
}
while ( v12 < v6 );
if ( v12 == v10 )
{
v13 = *(_QWORD *)(v5 + 8);
v14 = *(_QWORD **)(v5 + 16);
*(_QWORD *)(v13 + 8) = v14;
*v14 = v13;
*(_OWORD *)(v5 + 8) = 0LL;
v15 = v10;
v16 = js_realloc(a1, v5 + 4 * ~v9, 4LL * v10 + 8LL * v6 + 64);
if ( v16 )
{
v17 = v16 + 4 * v15;
v18 = (long long *)(*(_QWORD *)(a1 + 24) + 152LL);
v19 = *v18;
*(_QWORD *)(v19 + 8) = v17 + 8;
*(_QWORD *)(v17 + 8) = v19;
*(_QWORD *)(v17 + 16) = v18;
*v18 = v17 + 8;
LABEL_11:
*a2 = v17;
*(_DWORD *)(v17 + 36) = v6;
return 0LL;
}
v37 = (long long *)(*(_QWORD *)(a1 + 24) + 152LL);
v38 = *v37;
*(_QWORD *)(v38 + 8) = v5 + 8;
*(_QWORD *)(v5 + 8) = v38;
*(_QWORD *)(v5 + 16) = v37;
*v37 = v5 + 8;
}
else
{
v41 = 4LL * v12;
v21 = js_malloc(a1, v41 + 8LL * v6 + 64);
if ( v21 )
{
v17 = v21 + 4LL * v12;
v39 = v21;
v22 = *(_QWORD *)(v5 + 8);
v23 = *(_QWORD **)(v5 + 16);
*(_QWORD *)(v22 + 8) = v23;
*v23 = v22;
*(_OWORD *)(v5 + 8) = 0LL;
memcpy(v17, v5, 8LL * *(int *)(v5 + 40) + 64);
v40 = v12;
v24 = (_QWORD *)(v39 + 4LL * v12 + 8);
v25 = *(_QWORD *)(a1 + 24);
v26 = *(_QWORD *)(v25 + 152);
*(_QWORD *)(v26 + 8) = v24;
*v24 = v26;
*(_QWORD *)(v39 + 4LL * v12 + 16) = v25 + 152;
*(_QWORD *)(v25 + 152) = v24;
v27 = v12 - 1;
*(_DWORD *)(v39 + 4 * v40 + 32) = v27;
v28 = 0;
memset(v39, 0LL, v41);
v29 = *(_DWORD *)(v39 + 4 * v40 + 40);
if ( v29 )
{
v30 = (unsigned int *)(v17 + 64);
do
{
v31 = v30[1];
if ( v31 )
{
v32 = ~(unsigned long long)(v27 & v31);
*v30 = *(_DWORD *)(v17 + 4 * v32) & 0x3FFFFFF | *v30 & 0xFC000000;
*(_DWORD *)(v17 + 4 * v32) = ++v28;
v29 = *(_DWORD *)(v17 + 40);
}
else
{
++v28;
}
v30 += 2;
}
while ( v28 < v29 );
}
v33 = v5 + 4 * ~(unsigned long long)*(unsigned int *)(v5 + 32);
v34 = *(_QWORD *)(a1 + 24);
--*(_QWORD *)(v34 + 40);
v35 = (*(long long ( **)(long long))(v34 + 32))(v33);
v36 = *(_QWORD *)(v34 + 64);
*(_QWORD *)(v34 + 48) = *(_QWORD *)(v34 + 48) - v35 - 8;
(*(void ( **)(long long, long long))(v34 + 16))(v36, v33);
goto LABEL_11;
}
}
return 0xFFFFFFFFLL;
}
| resize_properties:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBP,RSI
MOV R14,RDI
MOV R15,qword ptr [RSI]
MOV EAX,dword ptr [R15 + 0x24]
LEA EAX,[RAX + RAX*0x2]
MOV R13D,EAX
SHR R13D,0x1f
ADD R13D,EAX
SAR R13D,0x1
CMP ECX,R13D
CMOVG R13D,ECX
MOV EBX,R13D
TEST RDX,RDX
JZ 0x0013d9c6
MOV R12,RDX
MOV RSI,qword ptr [RDX + 0x20]
MOV RDX,RBX
SHL RDX,0x4
MOV RDI,R14
CALL 0x0011d4c0
TEST RAX,RAX
JZ 0x0013dbe2
MOV qword ptr [R12 + 0x20],RAX
LAB_0013d9c6:
MOV qword ptr [RSP + 0x20],RBP
MOV EAX,dword ptr [R15 + 0x20]
LEA ECX,[RAX + 0x1]
MOV EDX,ECX
LAB_0013d9d4:
MOV EBP,EDX
LEA EDX,[RBP*0x2]
CMP EBP,R13D
JC 0x0013d9d4
CMP EBP,ECX
JNZ 0x0013da7c
MOV RDX,qword ptr [R15 + 0x8]
MOV RSI,qword ptr [R15 + 0x10]
MOV qword ptr [RDX + 0x8],RSI
MOV qword ptr [RSI],RDX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x8],XMM0
NOT RAX
LEA RSI,[R15 + RAX*0x4]
MOV EBP,ECX
LEA RAX,[RBP*0x4]
LEA RDX,[RAX + RBX*0x8]
ADD RDX,0x40
MOV RDI,R14
CALL 0x0011d4c0
TEST RAX,RAX
JZ 0x0013dbb9
LEA R12,[RAX + RBP*0x4]
LEA RCX,[RAX + RBP*0x4]
ADD RCX,0x8
MOV RDX,qword ptr [R14 + 0x18]
LEA RSI,[RDX + 0x98]
MOV RDI,qword ptr [RDX + 0x98]
MOV qword ptr [RDI + 0x8],RCX
MOV qword ptr [RAX + RBP*0x4 + 0x8],RDI
MOV qword ptr [RAX + RBP*0x4 + 0x10],RSI
MOV qword ptr [RDX + 0x98],RCX
LAB_0013da5e:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX],R12
MOV dword ptr [R12 + 0x24],R13D
XOR EAX,EAX
LAB_0013da6d:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013da7c:
MOV R12D,EBP
LEA RAX,[R12*0x4]
MOV qword ptr [RSP + 0x18],RAX
LEA RSI,[RAX + RBX*0x8]
ADD RSI,0x40
MOV RDI,R14
CALL 0x0010ee12
TEST RAX,RAX
JZ 0x0013dbe2
MOV RBX,R12
LEA R12,[RAX + R12*0x4]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [R15 + 0x8]
MOV RCX,qword ptr [R15 + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RCX],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x8],XMM0
MOVSXD RAX,dword ptr [R15 + 0x28]
LEA RDX,[0x40 + RAX*0x8]
MOV RDI,R12
MOV RSI,R15
CALL 0x0010e5b0
MOV qword ptr [RSP + 0x10],RBX
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RDI + RBX*0x4]
ADD RAX,0x8
MOV RCX,qword ptr [R14 + 0x18]
LEA RDX,[RCX + 0x98]
MOV RSI,qword ptr [RCX + 0x98]
MOV qword ptr [RSI + 0x8],RAX
MOV qword ptr [RDI + RBX*0x4 + 0x8],RSI
MOV qword ptr [RDI + RBX*0x4 + 0x10],RDX
MOV qword ptr [RCX + 0x98],RAX
DEC EBP
MOV dword ptr [RDI + RBX*0x4 + 0x20],EBP
XOR EBX,EBX
XOR ESI,ESI
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x0010e350
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RCX + RAX*0x4 + 0x28]
TEST ESI,ESI
JZ 0x0013db82
LEA RAX,[R12 + 0x40]
MOV ECX,0x3ffffff
MOV EDX,0xfc000000
LAB_0013db4d:
MOV EDI,dword ptr [RAX + 0x4]
TEST EDI,EDI
JZ 0x0013db78
AND EDI,EBP
NOT RDI
MOV ESI,dword ptr [R12 + RDI*0x4]
AND ESI,ECX
MOV R8D,dword ptr [RAX]
AND R8D,EDX
OR R8D,ESI
MOV dword ptr [RAX],R8D
INC EBX
MOV dword ptr [R12 + RDI*0x4],EBX
MOV ESI,dword ptr [R12 + 0x28]
JMP 0x0013db7a
LAB_0013db78:
INC EBX
LAB_0013db7a:
ADD RAX,0x8
CMP EBX,ESI
JC 0x0013db4d
LAB_0013db82:
MOV EAX,dword ptr [R15 + 0x20]
NOT RAX
LEA R15,[R15 + RAX*0x4]
MOV RBX,qword ptr [R14 + 0x18]
DEC qword ptr [RBX + 0x28]
MOV RDI,R15
CALL qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x30]
MOV RDI,qword ptr [RBX + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [RBX + 0x30],RCX
MOV RSI,R15
CALL qword ptr [RBX + 0x10]
JMP 0x0013da5e
LAB_0013dbb9:
LEA RAX,[R15 + 0x8]
MOV RCX,qword ptr [R14 + 0x18]
LEA RDX,[RCX + 0x98]
MOV RSI,qword ptr [RCX + 0x98]
MOV qword ptr [RSI + 0x8],RAX
MOV qword ptr [R15 + 0x8],RSI
MOV qword ptr [R15 + 0x10],RDX
MOV qword ptr [RCX + 0x98],RAX
LAB_0013dbe2:
MOV EAX,0xffffffff
JMP 0x0013da6d
|
int8 resize_properties(long param_1,int8 *param_2,long param_3,uint param_4)
{
void *pvVar1;
long *plVar2;
uint uVar3;
long lVar4;
void *__s;
long lVar5;
uint *puVar6;
long lVar7;
uint uVar8;
long lVar9;
uint uVar10;
ulong uVar11;
void *__dest;
uint uVar12;
ulong uVar13;
pvVar1 = (void *)*param_2;
uVar12 = (*(int *)((long)pvVar1 + 0x24) * 3) / 2;
uVar13 = (ulong)uVar12;
if ((int)uVar12 < (int)param_4) {
uVar13 = (ulong)param_4;
}
if (param_3 != 0) {
lVar4 = js_realloc(param_1,*(int8 *)(param_3 + 0x20),uVar13 << 4);
if (lVar4 == 0) {
return 0xffffffff;
}
*(long *)(param_3 + 0x20) = lVar4;
}
uVar12 = *(uint *)((long)pvVar1 + 0x20);
uVar8 = uVar12 + 1;
uVar10 = uVar8;
do {
uVar3 = uVar10;
uVar11 = (ulong)uVar3;
uVar10 = uVar3 * 2;
} while (uVar3 < (uint)uVar13);
if (uVar3 == uVar8) {
lVar4 = *(long *)((long)pvVar1 + 8);
plVar2 = *(long **)((long)pvVar1 + 0x10);
*(long **)(lVar4 + 8) = plVar2;
*plVar2 = lVar4;
*(int8 *)((long)pvVar1 + 8) = 0;
*(int8 *)((long)pvVar1 + 0x10) = 0;
uVar11 = (ulong)uVar8;
lVar4 = js_realloc(param_1,(void *)((long)pvVar1 + ~(ulong)uVar12 * 4),
uVar11 * 4 + uVar13 * 8 + 0x40);
if (lVar4 != 0) {
__dest = (void *)(lVar4 + uVar11 * 4);
lVar9 = lVar4 + uVar11 * 4 + 8;
lVar7 = *(long *)(param_1 + 0x18);
lVar5 = *(long *)(lVar7 + 0x98);
*(long *)(lVar5 + 8) = lVar9;
*(long *)(lVar4 + 8 + uVar11 * 4) = lVar5;
*(long *)(lVar4 + 0x10 + uVar11 * 4) = lVar7 + 0x98;
*(long *)(lVar7 + 0x98) = lVar9;
LAB_0013da5e:
*param_2 = __dest;
*(uint *)((long)__dest + 0x24) = (uint)uVar13;
return 0;
}
lVar4 = *(long *)(param_1 + 0x18);
lVar7 = *(long *)(lVar4 + 0x98);
*(long *)(lVar7 + 8) = (long)pvVar1 + 8;
*(long *)((long)pvVar1 + 8) = lVar7;
*(long *)((long)pvVar1 + 0x10) = lVar4 + 0x98;
*(long *)(lVar4 + 0x98) = (long)pvVar1 + 8;
}
else {
__s = (void *)js_malloc(param_1,uVar11 * 4 + uVar13 * 8 + 0x40);
if (__s != (void *)0x0) {
__dest = (void *)((long)__s + uVar11 * 4);
lVar4 = *(long *)((long)pvVar1 + 8);
plVar2 = *(long **)((long)pvVar1 + 0x10);
*(long **)(lVar4 + 8) = plVar2;
*plVar2 = lVar4;
*(int8 *)((long)pvVar1 + 8) = 0;
*(int8 *)((long)pvVar1 + 0x10) = 0;
memcpy(__dest,pvVar1,(long)*(int *)((long)pvVar1 + 0x28) * 8 + 0x40);
lVar5 = (long)__s + uVar11 * 4 + 8;
lVar4 = *(long *)(param_1 + 0x18);
lVar7 = *(long *)(lVar4 + 0x98);
*(long *)(lVar7 + 8) = lVar5;
*(long *)((long)__s + uVar11 * 4 + 8) = lVar7;
*(long *)((long)__s + uVar11 * 4 + 0x10) = lVar4 + 0x98;
*(long *)(lVar4 + 0x98) = lVar5;
*(uint *)((long)__s + uVar11 * 4 + 0x20) = uVar3 - 1;
uVar10 = 0;
memset(__s,0,uVar11 * 4);
uVar12 = *(uint *)((long)__s + uVar11 * 4 + 0x28);
if (uVar12 != 0) {
puVar6 = (uint *)((long)__dest + 0x40);
do {
if (puVar6[1] != 0) {
uVar11 = ~(ulong)(puVar6[1] & uVar3 - 1);
*puVar6 = *puVar6 & 0xfc000000 | *(uint *)((long)__dest + uVar11 * 4) & 0x3ffffff;
*(uint *)((long)__dest + uVar11 * 4) = uVar10 + 1;
uVar12 = *(uint *)((long)__dest + 0x28);
}
uVar10 = uVar10 + 1;
puVar6 = puVar6 + 2;
} while (uVar10 < uVar12);
}
pvVar1 = (void *)((long)pvVar1 + ~(ulong)*(uint *)((long)pvVar1 + 0x20) * 4);
lVar4 = *(long *)(param_1 + 0x18);
*(long *)(lVar4 + 0x28) = *(long *)(lVar4 + 0x28) + -1;
lVar7 = (**(code **)(lVar4 + 0x20))(pvVar1);
*(long *)(lVar4 + 0x30) = (*(long *)(lVar4 + 0x30) - lVar7) + -8;
(**(code **)(lVar4 + 0x10))(*(int8 *)(lVar4 + 0x40),pvVar1);
goto LAB_0013da5e;
}
}
return 0xffffffff;
}
| |
35,999 | MainWindow::closedoor(Elevetor&) | LeafBlue[P]myElevetor/mainwindow.cpp | void MainWindow::closedoor(Elevetor &thisele)
{
if(thisele.status != 5){
return;
}
QList<QWidget*> widlist = thisele.ele->findChildren<QWidget*>();
QWidget *left = widlist[0];
QWidget *right = widlist[1];
QPropertyAnimation *anim_left = new QPropertyAnimation(left,"geometry");
anim_left->setDuration(1000);
anim_left->setStartValue(QRect(0,0,0,thisele.ele->height()));
anim_left->setEndValue(QRect(0,0,thisele.ele->width()/2,thisele.ele->height()));
QPropertyAnimation *anim_right = new QPropertyAnimation(right,"geometry");
anim_right->setDuration(1000);
anim_right->setStartValue(QRect(thisele.ele->width(),0,0,thisele.ele->height()));
anim_right->setEndValue(QRect(thisele.ele->width()/2,0,thisele.ele->width()/2,thisele.ele->height()));
QParallelAnimationGroup *group_anime = new QParallelAnimationGroup(this);
group_anime->addAnimation(anim_left);
group_anime->addAnimation(anim_right);
connect(group_anime,&QParallelAnimationGroup::finished,[this,&thisele](){
after_closedoor(thisele);
});
group_anime->start();
} | O2 | cpp | MainWindow::closedoor(Elevetor&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
cmpl $0x5, 0x4c(%rsi)
jne 0x6b94
movq %rsi, %rbx
movq %rdi, %r14
movq 0x38(%rsi), %rsi
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rdx
movaps %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
leaq 0x60(%rsp), %rdi
pushq $0x1
popq %rcx
callq 0x718a
leaq 0x20(%rsp), %rdi
callq 0x7340
leaq 0x60(%rsp), %rdi
xorl %esi, %esi
callq 0x71d6
movq (%rax), %r12
leaq 0x60(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x71d6
movq (%rax), %r13
pushq $0x10
popq %rdi
callq 0x4390
movq %rax, %r15
leaq 0x3d59(%rip), %rsi # 0xa69b
leaq 0x20(%rsp), %rdi
pushq $-0x1
popq %rdx
callq 0x4510
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x4260
leaq 0x20(%rsp), %rdi
callq 0x7382
movq %r15, %rdi
movl $0x3e8, %esi # imm = 0x3E8
callq 0x4370
movq 0x38(%rbx), %rax
movq 0x20(%rax), %rax
movl 0x20(%rax), %ecx
subl 0x18(%rax), %ecx
leaq 0x50(%rsp), %rsi
andq $0x0, (%rsi)
orl $-0x1, 0x8(%rsi)
movl %ecx, 0xc(%rsi)
leaq 0x20(%rsp), %rdi
callq 0x4400
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x4220
leaq 0x20(%rsp), %rdi
callq 0x4170
movq 0x38(%rbx), %rax
movq 0x20(%rax), %rcx
movl 0x1c(%rcx), %eax
subl 0x14(%rcx), %eax
movl 0x20(%rcx), %edi
incl %eax
pushq $0x2
popq %rbp
cltd
idivl %ebp
subl 0x18(%rcx), %edi
leaq 0x50(%rsp), %rsi
andq $0x0, (%rsi)
decl %eax
movl %eax, 0x8(%rsi)
movl %edi, 0xc(%rsi)
leaq 0x20(%rsp), %rdi
callq 0x4400
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x44c0
leaq 0x20(%rsp), %rdi
callq 0x4170
pushq $0x10
popq %rdi
callq 0x4390
movq %rax, %r12
leaq 0x3c84(%rip), %rsi # 0xa69b
leaq 0x20(%rsp), %rdi
pushq $-0x1
popq %rdx
callq 0x4510
leaq 0x20(%rsp), %rdx
movq %r12, %rdi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x4260
leaq 0x20(%rsp), %rdi
callq 0x7382
movq %r12, %rdi
movl $0x3e8, %esi # imm = 0x3E8
callq 0x4370
movq 0x38(%rbx), %rax
movq 0x20(%rax), %rax
movl 0x1c(%rax), %ecx
movl 0x20(%rax), %edx
subl 0x14(%rax), %ecx
leal 0x1(%rcx), %edi
subl 0x18(%rax), %edx
leaq 0x50(%rsp), %rsi
movl %edi, (%rsi)
andl $0x0, 0x4(%rsi)
movl %ecx, 0x8(%rsi)
movl %edx, 0xc(%rsi)
leaq 0x20(%rsp), %rdi
callq 0x4400
leaq 0x20(%rsp), %rsi
movq %r12, %rdi
callq 0x4220
leaq 0x20(%rsp), %rdi
callq 0x4170
movq 0x38(%rbx), %rax
movq 0x20(%rax), %rcx
movl 0x1c(%rcx), %eax
movl 0x20(%rcx), %edi
subl 0x14(%rcx), %eax
incl %eax
cltd
idivl %ebp
subl 0x18(%rcx), %edi
leaq 0x50(%rsp), %rsi
movl %eax, (%rsi)
andl $0x0, 0x4(%rsi)
leal -0x1(,%rax,2), %eax
movl %eax, 0x8(%rsi)
movl %edi, 0xc(%rsi)
leaq 0x20(%rsp), %rdi
callq 0x4400
leaq 0x20(%rsp), %rsi
movq %r12, %rdi
callq 0x44c0
pushq $0x1
popq %rbp
leaq 0x20(%rsp), %rdi
callq 0x4170
pushq $0x10
popq %rdi
callq 0x4390
movq %rax, %r13
movq %rax, %rdi
movq %r14, %rsi
callq 0x4150
movq %r13, %rdi
movq %r15, %rsi
callq 0x4470
movq %r13, %rdi
movq %r12, %rsi
callq 0x4470
movq 0x84d2(%rip), %rax # 0xeff0
movq %rax, 0x20(%rsp)
andq $0x0, 0x28(%rsp)
pushq $0x20
popq %rdi
callq 0x4390
movl %ebp, (%rax)
leaq 0x34e(%rip), %rcx # 0x6e88
movq %rcx, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
movq 0x843b(%rip), %rcx # 0xef88
movq %rcx, 0x10(%rsp)
movl %ebp, (%rsp)
andq $0x0, 0x8(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movq %r13, %rsi
movq %r13, %rcx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x42a0
leaq 0x48(%rsp), %rdi
callq 0x41c0
movq %r13, %rdi
xorl %esi, %esi
callq 0x42f0
leaq 0x60(%rsp), %rdi
callq 0x73a4
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %r13, %rdi
jmp 0x6bfd
jmp 0x6bd4
jmp 0x6c1b
jmp 0x6bd4
jmp 0x6c1b
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x7382
jmp 0x6bc8
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %r12, %rdi
jmp 0x6bfd
jmp 0x6bd4
jmp 0x6c1b
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x4170
jmp 0x6c1e
jmp 0x6c1b
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x7382
jmp 0x6bf7
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %r15, %rdi
callq 0x4070
jmp 0x6c1e
jmp 0x6c1b
jmp 0x6c1b
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x7340
jmp 0x6c28
jmp 0x6c1b
jmp 0x6c1b
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x73a4
movq %rbx, %rdi
callq 0x41d0
| _ZN10MainWindow9closedoorER8Elevetor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
cmp dword ptr [rsi+4Ch], 5
jnz loc_6B94
mov rbx, rsi
mov r14, rdi
mov rsi, [rsi+38h]
xorps xmm0, xmm0
lea rdx, [rsp+0A8h+var_88]
movaps xmmword ptr [rdx], xmm0
and qword ptr [rdx+10h], 0
lea rdi, [rsp+0A8h+var_48]
push 1
pop rcx
call _ZNK7QObject12findChildrenIP7QWidgetEE5QListIT_ERK7QString6QFlagsIN2Qt15FindChildOptionEE; QObject::findChildren<QWidget *>(QString const&,QFlags<Qt::FindChildOption>)
lea rdi, [rsp+0A8h+var_88]
call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer()
lea rdi, [rsp+0A8h+var_48]
xor esi, esi
call _ZN5QListIP7QWidgetEixEx; QList<QWidget *>::operator[](long long)
mov r12, [rax]
lea rdi, [rsp+0A8h+var_48]
push 1
pop rsi
call _ZN5QListIP7QWidgetEixEx; QList<QWidget *>::operator[](long long)
mov r13, [rax]
push 10h
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
lea rsi, aGeometry; "geometry"
lea rdi, [rsp+0A8h+var_88]; this
push 0FFFFFFFFFFFFFFFFh
pop rdx; __int64
call __ZN10QByteArrayC1EPKcx; QByteArray::QByteArray(char const*,long long)
lea rdx, [rsp+0A8h+var_88]; QByteArray *
mov rdi, r15; this
mov rsi, r12; QObject *
xor ecx, ecx; QObject *
call __ZN18QPropertyAnimationC1EP7QObjectRK10QByteArrayS1_; QPropertyAnimation::QPropertyAnimation(QObject *,QByteArray const&,QObject *)
lea rdi, [rsp+0A8h+var_88]
call _ZN17QArrayDataPointerIcED2Ev; QArrayDataPointer<char>::~QArrayDataPointer()
mov rdi, r15; this
mov esi, 3E8h; int
call __ZN17QVariantAnimation11setDurationEi; QVariantAnimation::setDuration(int)
mov rax, [rbx+38h]
mov rax, [rax+20h]
mov ecx, [rax+20h]
sub ecx, [rax+18h]
lea rsi, [rsp+0A8h+var_58]
and qword ptr [rsi], 0
or dword ptr [rsi+8], 0FFFFFFFFh
mov [rsi+0Ch], ecx
lea rdi, [rsp+0A8h+var_88]
call __ZN8QVariantC1ERK5QRect; QVariant::QVariant(QRect const&)
lea rsi, [rsp+0A8h+var_88]; QVariant *
mov rdi, r15; this
call __ZN17QVariantAnimation13setStartValueERK8QVariant; QVariantAnimation::setStartValue(QVariant const&)
lea rdi, [rsp+0A8h+var_88]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov rax, [rbx+38h]
mov rcx, [rax+20h]
mov eax, [rcx+1Ch]
sub eax, [rcx+14h]
mov edi, [rcx+20h]
inc eax
push 2
pop rbp
cdq
idiv ebp
sub edi, [rcx+18h]
lea rsi, [rsp+0A8h+var_58]
and qword ptr [rsi], 0
dec eax
mov [rsi+8], eax
mov [rsi+0Ch], edi
lea rdi, [rsp+0A8h+var_88]
call __ZN8QVariantC1ERK5QRect; QVariant::QVariant(QRect const&)
lea rsi, [rsp+0A8h+var_88]; QVariant *
mov rdi, r15; this
call __ZN17QVariantAnimation11setEndValueERK8QVariant; QVariantAnimation::setEndValue(QVariant const&)
lea rdi, [rsp+0A8h+var_88]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
push 10h
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea rsi, aGeometry; "geometry"
lea rdi, [rsp+0A8h+var_88]; this
push 0FFFFFFFFFFFFFFFFh
pop rdx; __int64
call __ZN10QByteArrayC1EPKcx; QByteArray::QByteArray(char const*,long long)
lea rdx, [rsp+0A8h+var_88]; QByteArray *
mov rdi, r12; this
mov rsi, r13; QObject *
xor ecx, ecx; QObject *
call __ZN18QPropertyAnimationC1EP7QObjectRK10QByteArrayS1_; QPropertyAnimation::QPropertyAnimation(QObject *,QByteArray const&,QObject *)
lea rdi, [rsp+0A8h+var_88]
call _ZN17QArrayDataPointerIcED2Ev; QArrayDataPointer<char>::~QArrayDataPointer()
mov rdi, r12; this
mov esi, 3E8h; int
call __ZN17QVariantAnimation11setDurationEi; QVariantAnimation::setDuration(int)
mov rax, [rbx+38h]
mov rax, [rax+20h]
mov ecx, [rax+1Ch]
mov edx, [rax+20h]
sub ecx, [rax+14h]
lea edi, [rcx+1]
sub edx, [rax+18h]
lea rsi, [rsp+0A8h+var_58]
mov [rsi], edi
and dword ptr [rsi+4], 0
mov [rsi+8], ecx
mov [rsi+0Ch], edx
lea rdi, [rsp+0A8h+var_88]
call __ZN8QVariantC1ERK5QRect; QVariant::QVariant(QRect const&)
lea rsi, [rsp+0A8h+var_88]; QVariant *
mov rdi, r12; this
call __ZN17QVariantAnimation13setStartValueERK8QVariant; QVariantAnimation::setStartValue(QVariant const&)
lea rdi, [rsp+0A8h+var_88]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov rax, [rbx+38h]
mov rcx, [rax+20h]
mov eax, [rcx+1Ch]
mov edi, [rcx+20h]
sub eax, [rcx+14h]
inc eax
cdq
idiv ebp
sub edi, [rcx+18h]
lea rsi, [rsp+0A8h+var_58]
mov [rsi], eax
and dword ptr [rsi+4], 0
lea eax, ds:0FFFFFFFFFFFFFFFFh[rax*2]
mov [rsi+8], eax
mov [rsi+0Ch], edi
lea rdi, [rsp+0A8h+var_88]
call __ZN8QVariantC1ERK5QRect; QVariant::QVariant(QRect const&)
lea rsi, [rsp+0A8h+var_88]; QVariant *
mov rdi, r12; this
call __ZN17QVariantAnimation11setEndValueERK8QVariant; QVariantAnimation::setEndValue(QVariant const&)
push 1
pop rbp
lea rdi, [rsp+0A8h+var_88]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
push 10h
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
mov r13, rax
mov rdi, rax; this
mov rsi, r14; QObject *
call __ZN23QParallelAnimationGroupC1EP7QObject; QParallelAnimationGroup::QParallelAnimationGroup(QObject *)
mov rdi, r13; this
mov rsi, r15; QAbstractAnimation *
call __ZN15QAnimationGroup12addAnimationEP18QAbstractAnimation; QAnimationGroup::addAnimation(QAbstractAnimation *)
mov rdi, r13; this
mov rsi, r12; QAbstractAnimation *
call __ZN15QAnimationGroup12addAnimationEP18QAbstractAnimation; QAnimationGroup::addAnimation(QAbstractAnimation *)
mov rax, cs:_ZN18QAbstractAnimation8finishedEv_ptr
mov [rsp+0A8h+var_88], rax
and [rsp+0A8h+var_80], 0
push 20h ; ' '
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
mov [rax], ebp
lea rcx, _ZN9QtPrivate18QFunctorSlotObjectIZN10MainWindow9closedoorER8ElevetorE3$_0Li0ENS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb; QtPrivate::QFunctorSlotObject<MainWindow::closedoor(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl(int,QtPrivate::QSlotObjectBase *,QObject *,void **,bool *)
mov [rax+8], rcx
mov [rax+10h], r14
mov [rax+18h], rbx
mov rcx, cs:_ZN18QAbstractAnimation16staticMetaObjectE_ptr
mov [rsp+0A8h+var_98], rcx
mov [rsp+0A8h+var_A8], ebp
and [rsp+0A8h+var_A0], 0
lea rdi, [rsp+0A8h+var_60]
lea rdx, [rsp+0A8h+var_88]
mov rsi, r13
mov rcx, r13
xor r8d, r8d
mov r9, rax
call __ZN7QObject11connectImplEPKS_PPvS1_S3_PN9QtPrivate15QSlotObjectBaseEN2Qt14ConnectionTypeEPKiPK11QMetaObject; QObject::connectImpl(QObject const*,void **,QObject const*,void **,QtPrivate::QSlotObjectBase *,Qt::ConnectionType,int const*,QMetaObject const*)
lea rdi, [rsp+0A8h+var_60]; this
call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection()
mov rdi, r13
xor esi, esi
call __ZN18QAbstractAnimation5startENS_14DeletionPolicyE; QAbstractAnimation::start(QAbstractAnimation::DeletionPolicy)
lea rdi, [rsp+0A8h+var_48]
call _ZN17QArrayDataPointerIP7QWidgetED2Ev; QArrayDataPointer<QWidget *>::~QArrayDataPointer()
loc_6B94:
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
push 10h
pop rsi
mov rdi, r13
jmp short loc_6BFD
jmp short loc_6BD4
jmp short loc_6C1B
jmp short loc_6BD4
jmp short loc_6C1B
mov rbx, rax
lea rdi, [rsp+arg_18]
call _ZN17QArrayDataPointerIcED2Ev; QArrayDataPointer<char>::~QArrayDataPointer()
jmp short loc_6BC8
mov rbx, rax
loc_6BC8:
push 10h
pop rsi
mov rdi, r12
jmp short loc_6BFD
jmp short loc_6BD4
jmp short loc_6C1B
loc_6BD4:
mov rbx, rax
lea rdi, [rsp+arg_18]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
jmp short loc_6C1E
jmp short loc_6C1B
mov rbx, rax
lea rdi, [rsp+arg_18]
call _ZN17QArrayDataPointerIcED2Ev; QArrayDataPointer<char>::~QArrayDataPointer()
jmp short loc_6BF7
mov rbx, rax
loc_6BF7:
push 10h
pop rsi; unsigned __int64
mov rdi, r15; void *
loc_6BFD:
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6C1E
jmp short loc_6C1B
jmp short loc_6C1B
mov rbx, rax
lea rdi, [rsp+arg_18]
call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer()
jmp short loc_6C28
jmp short loc_6C1B
jmp short $+2
loc_6C1B:
mov rbx, rax
loc_6C1E:
lea rdi, [rsp+arg_58]
call _ZN17QArrayDataPointerIP7QWidgetED2Ev; QArrayDataPointer<QWidget *>::~QArrayDataPointer()
loc_6C28:
mov rdi, rbx
call __Unwind_Resume
| void MainWindow::closedoor(MainWindow *this, Elevetor *a2)
{
long long v4; // rsi
QObject *v5; // r12
QObject *v6; // r13
QPropertyAnimation *v7; // r15
int v8; // ecx
long long v9; // rdx
_DWORD *v10; // rcx
long long v11; // rdx
int v12; // eax
int v13; // edi
QPropertyAnimation *v14; // r12
_DWORD *v15; // rax
int v16; // ecx
long long v17; // rdx
_DWORD *v18; // rcx
long long v19; // rdx
int v20; // edi
QParallelAnimationGroup *v21; // r13
long long v22; // rax
__int128 v23; // [rsp+20h] [rbp-88h] BYREF
long long v24; // [rsp+30h] [rbp-78h]
_BYTE v25[8]; // [rsp+48h] [rbp-60h] BYREF
long long v26; // [rsp+50h] [rbp-58h] BYREF
int v27; // [rsp+58h] [rbp-50h]
int v28; // [rsp+5Ch] [rbp-4Ch]
_BYTE v29[72]; // [rsp+60h] [rbp-48h] BYREF
if ( *((_DWORD *)a2 + 19) == 5 )
{
v4 = *((_QWORD *)a2 + 7);
v23 = 0LL;
v24 = 0LL;
QObject::findChildren<QWidget *>(v29, v4, &v23, 1LL);
QArrayDataPointer<char16_t>::~QArrayDataPointer(&v23);
v5 = *(QObject **)QList<QWidget *>::operator[](v29, 0LL);
v6 = *(QObject **)QList<QWidget *>::operator[](v29, 1LL);
v7 = (QPropertyAnimation *)operator new(0x10uLL);
QByteArray::QByteArray((QByteArray *)&v23, "geometry", -1LL);
QPropertyAnimation::QPropertyAnimation(v7, v5, (const QByteArray *)&v23, 0LL);
QArrayDataPointer<char>::~QArrayDataPointer(&v23);
QVariantAnimation::setDuration(v7, 1000);
v8 = *(_DWORD *)(*(_QWORD *)(*((_QWORD *)a2 + 7) + 32LL) + 32LL)
- *(_DWORD *)(*(_QWORD *)(*((_QWORD *)a2 + 7) + 32LL) + 24LL);
v26 = 0LL;
v27 = -1;
v28 = v8;
QVariant::QVariant(&v23, &v26, v9);
QVariantAnimation::setStartValue(v7, (const QVariant *)&v23);
QVariant::~QVariant((QVariant *)&v23);
v10 = *(_DWORD **)(*((_QWORD *)a2 + 7) + 32LL);
v11 = (unsigned int)((v10[7] - v10[5] + 1) >> 31);
v12 = (v10[7] - v10[5] + 1) / 2;
LODWORD(v11) = (v10[7] - v10[5] + 1) % 2;
v13 = v10[8] - v10[6];
v26 = 0LL;
v27 = v12 - 1;
v28 = v13;
QVariant::QVariant(&v23, &v26, v11);
QVariantAnimation::setEndValue(v7, (const QVariant *)&v23);
QVariant::~QVariant((QVariant *)&v23);
v14 = (QPropertyAnimation *)operator new(0x10uLL);
QByteArray::QByteArray((QByteArray *)&v23, "geometry", -1LL);
QPropertyAnimation::QPropertyAnimation(v14, v6, (const QByteArray *)&v23, 0LL);
QArrayDataPointer<char>::~QArrayDataPointer(&v23);
QVariantAnimation::setDuration(v14, 1000);
v15 = *(_DWORD **)(*((_QWORD *)a2 + 7) + 32LL);
v16 = v15[7] - v15[5];
v17 = (unsigned int)(v15[8] - v15[6]);
v26 = (unsigned int)(v16 + 1);
v27 = v16;
v28 = v17;
QVariant::QVariant(&v23, &v26, v17);
QVariantAnimation::setStartValue(v14, (const QVariant *)&v23);
QVariant::~QVariant((QVariant *)&v23);
v18 = *(_DWORD **)(*((_QWORD *)a2 + 7) + 32LL);
v19 = (unsigned int)((v18[7] - v18[5] + 1) >> 31);
LODWORD(v19) = (v18[7] - v18[5] + 1) % 2;
v20 = v18[8] - v18[6];
v26 = (unsigned int)((v18[7] - v18[5] + 1) / 2);
v27 = 2 * v26 - 1;
v28 = v20;
QVariant::QVariant(&v23, &v26, v19);
QVariantAnimation::setEndValue(v14, (const QVariant *)&v23);
QVariant::~QVariant((QVariant *)&v23);
v21 = (QParallelAnimationGroup *)operator new(0x10uLL);
QParallelAnimationGroup::QParallelAnimationGroup(v21, this);
QAnimationGroup::addAnimation(v21, v7);
QAnimationGroup::addAnimation(v21, v14);
*(_QWORD *)&v23 = &QAbstractAnimation::finished;
*((_QWORD *)&v23 + 1) = 0LL;
v22 = operator new(0x20uLL);
*(_DWORD *)v22 = 1;
*(_QWORD *)(v22 + 8) = &QtPrivate::QFunctorSlotObject<MainWindow::closedoor(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl;
*(_QWORD *)(v22 + 16) = this;
*(_QWORD *)(v22 + 24) = a2;
QObject::connectImpl(v25, v21, &v23, v21, 0LL, v22, 1, 0LL, &QAbstractAnimation::staticMetaObject);
QMetaObject::Connection::~Connection((QMetaObject::Connection *)v25);
QAbstractAnimation::start(v21, 0LL);
QArrayDataPointer<QWidget *>::~QArrayDataPointer(v29);
}
}
| closedoor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
CMP dword ptr [RSI + 0x4c],0x5
JNZ 0x00106b94
MOV RBX,RSI
MOV R14,RDI
MOV RSI,qword ptr [RSI + 0x38]
XORPS XMM0,XMM0
LEA RDX,[RSP + 0x20]
MOVAPS xmmword ptr [RDX],XMM0
AND qword ptr [RDX + 0x10],0x0
LAB_001068fa:
LEA RDI,[RSP + 0x60]
PUSH 0x1
POP RCX
CALL 0x0010718a
LEA RDI,[RSP + 0x20]
CALL 0x00107340
LAB_00106911:
LEA RDI,[RSP + 0x60]
XOR ESI,ESI
CALL 0x001071d6
MOV R12,qword ptr [RAX]
LAB_00106920:
LEA RDI,[RSP + 0x60]
PUSH 0x1
POP RSI
CALL 0x001071d6
MOV R13,qword ptr [RAX]
LAB_00106930:
PUSH 0x10
POP RDI
CALL 0x00104390
LAB_00106938:
MOV R15,RAX
LEA RSI,[0x10a69b]
LEA RDI,[RSP + 0x20]
PUSH -0x1
POP RDX
CALL 0x00104510
LAB_0010694f:
LEA RDX,[RSP + 0x20]
MOV RDI,R15
MOV RSI,R12
XOR ECX,ECX
CALL 0x00104260
LEA RDI,[RSP + 0x20]
CALL 0x00107382
LAB_0010696b:
MOV RDI,R15
MOV ESI,0x3e8
CALL 0x00104370
MOV RAX,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOV ECX,dword ptr [RAX + 0x20]
SUB ECX,dword ptr [RAX + 0x18]
LEA RSI,[RSP + 0x50]
AND qword ptr [RSI],0x0
OR dword ptr [RSI + 0x8],0xffffffff
MOV dword ptr [RSI + 0xc],ECX
LAB_00106996:
LEA RDI,[RSP + 0x20]
CALL 0x00104400
LAB_001069a0:
LEA RSI,[RSP + 0x20]
MOV RDI,R15
CALL 0x00104220
LEA RDI,[RSP + 0x20]
CALL 0x00104170
MOV RAX,qword ptr [RBX + 0x38]
MOV RCX,qword ptr [RAX + 0x20]
MOV EAX,dword ptr [RCX + 0x1c]
SUB EAX,dword ptr [RCX + 0x14]
MOV EDI,dword ptr [RCX + 0x20]
INC EAX
PUSH 0x2
POP RBP
CDQ
IDIV EBP
SUB EDI,dword ptr [RCX + 0x18]
LEA RSI,[RSP + 0x50]
AND qword ptr [RSI],0x0
DEC EAX
MOV dword ptr [RSI + 0x8],EAX
MOV dword ptr [RSI + 0xc],EDI
LAB_001069e4:
LEA RDI,[RSP + 0x20]
CALL 0x00104400
LAB_001069ee:
LEA RSI,[RSP + 0x20]
MOV RDI,R15
CALL 0x001044c0
LEA RDI,[RSP + 0x20]
CALL 0x00104170
LAB_00106a05:
PUSH 0x10
POP RDI
CALL 0x00104390
LAB_00106a0d:
MOV R12,RAX
LEA RSI,[0x10a69b]
LEA RDI,[RSP + 0x20]
PUSH -0x1
POP RDX
CALL 0x00104510
LAB_00106a24:
LEA RDX,[RSP + 0x20]
MOV RDI,R12
MOV RSI,R13
XOR ECX,ECX
CALL 0x00104260
LEA RDI,[RSP + 0x20]
CALL 0x00107382
LAB_00106a40:
MOV RDI,R12
MOV ESI,0x3e8
CALL 0x00104370
MOV RAX,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOV ECX,dword ptr [RAX + 0x1c]
MOV EDX,dword ptr [RAX + 0x20]
SUB ECX,dword ptr [RAX + 0x14]
LEA EDI,[RCX + 0x1]
SUB EDX,dword ptr [RAX + 0x18]
LEA RSI,[RSP + 0x50]
MOV dword ptr [RSI],EDI
AND dword ptr [RSI + 0x4],0x0
MOV dword ptr [RSI + 0x8],ECX
MOV dword ptr [RSI + 0xc],EDX
LAB_00106a75:
LEA RDI,[RSP + 0x20]
CALL 0x00104400
LAB_00106a7f:
LEA RSI,[RSP + 0x20]
MOV RDI,R12
CALL 0x00104220
LEA RDI,[RSP + 0x20]
CALL 0x00104170
MOV RAX,qword ptr [RBX + 0x38]
MOV RCX,qword ptr [RAX + 0x20]
MOV EAX,dword ptr [RCX + 0x1c]
MOV EDI,dword ptr [RCX + 0x20]
SUB EAX,dword ptr [RCX + 0x14]
INC EAX
CDQ
IDIV EBP
SUB EDI,dword ptr [RCX + 0x18]
LEA RSI,[RSP + 0x50]
MOV dword ptr [RSI],EAX
AND dword ptr [RSI + 0x4],0x0
LEA EAX,[-0x1 + RAX*0x2]
MOV dword ptr [RSI + 0x8],EAX
MOV dword ptr [RSI + 0xc],EDI
LAB_00106ac7:
LEA RDI,[RSP + 0x20]
CALL 0x00104400
LAB_00106ad1:
LEA RSI,[RSP + 0x20]
MOV RDI,R12
CALL 0x001044c0
PUSH 0x1
POP RBP
LEA RDI,[RSP + 0x20]
CALL 0x00104170
LAB_00106aeb:
PUSH 0x10
POP RDI
CALL 0x00104390
LAB_00106af3:
MOV R13,RAX
MOV RDI,RAX
MOV RSI,R14
CALL 0x00104150
LAB_00106b01:
MOV RDI,R13
MOV RSI,R15
CALL 0x00104470
MOV RDI,R13
MOV RSI,R12
CALL 0x00104470
MOV RAX,qword ptr [0x0010eff0]
MOV qword ptr [RSP + 0x20],RAX
AND qword ptr [RSP + 0x28],0x0
PUSH 0x20
POP RDI
CALL 0x00104390
MOV dword ptr [RAX],EBP
LEA RCX,[0x106e88]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x10],R14
MOV qword ptr [RAX + 0x18],RBX
MOV RCX,qword ptr [0x0010ef88]
MOV qword ptr [RSP + 0x10],RCX
MOV dword ptr [RSP],EBP
AND qword ptr [RSP + 0x8],0x0
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x20]
MOV RSI,R13
MOV RCX,R13
XOR R8D,R8D
MOV R9,RAX
CALL 0x001042a0
LEA RDI,[RSP + 0x48]
CALL 0x001041c0
MOV RDI,R13
XOR ESI,ESI
CALL 0x001042f0
LAB_00106b8a:
LEA RDI,[RSP + 0x60]
CALL 0x001073a4
LAB_00106b94:
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MainWindow::closedoor(Elevetor&) */
void __thiscall MainWindow::closedoor(MainWindow *this,Elevetor *param_1)
{
QObject *pQVar1;
QObject *pQVar2;
long lVar3;
uint uVar4;
int8 *puVar5;
QPropertyAnimation *pQVar6;
QParallelAnimationGroup *this_00;
int4 *puVar7;
int *local_88;
int8 uStack_80;
int8 local_78;
Connection local_60 [8];
ulong local_58;
int local_50;
int local_4c;
QList<QWidget*> local_48 [24];
if (*(int *)(param_1 + 0x4c) == 5) {
local_88 = (int *)0x0;
uStack_80 = 0;
local_78 = 0;
/* try { // try from 001068fa to 00106906 has its CatchHandler @ 00106c08 */
QObject::findChildren<QWidget*>(local_48);
QArrayDataPointer<char16_t>::~QArrayDataPointer((QArrayDataPointer<char16_t> *)&local_88);
/* try { // try from 00106911 to 0010691c has its CatchHandler @ 00106c06 */
puVar5 = (int8 *)QList<QWidget*>::operator[](local_48,0);
pQVar1 = (QObject *)*puVar5;
/* try { // try from 00106920 to 0010692c has its CatchHandler @ 00106c04 */
puVar5 = (int8 *)QList<QWidget*>::operator[](local_48,1);
pQVar2 = (QObject *)*puVar5;
/* try { // try from 00106930 to 00106937 has its CatchHandler @ 00106c19 */
pQVar6 = (QPropertyAnimation *)operator_new(0x10);
/* try { // try from 00106938 to 0010694e has its CatchHandler @ 00106bf4 */
QByteArray::QByteArray((QByteArray *)&local_88,"geometry",-1);
/* try { // try from 0010694f to 00106960 has its CatchHandler @ 00106be5 */
QPropertyAnimation::QPropertyAnimation(pQVar6,pQVar1,(QByteArray *)&local_88,(QObject *)0x0);
QArrayDataPointer<char>::~QArrayDataPointer((QArrayDataPointer<char> *)&local_88);
/* try { // try from 0010696b to 00106977 has its CatchHandler @ 00106c19 */
QVariantAnimation::setDuration((int)pQVar6);
local_4c = *(int *)(*(long *)(*(long *)(param_1 + 0x38) + 0x20) + 0x20) -
*(int *)(*(long *)(*(long *)(param_1 + 0x38) + 0x20) + 0x18);
local_58 = 0;
local_50 = 0xffffffff;
/* try { // try from 00106996 to 0010699f has its CatchHandler @ 00106be3 */
QVariant::QVariant((QVariant *)&local_88,(QRect *)&local_58);
/* try { // try from 001069a0 to 001069ac has its CatchHandler @ 00106bd4 */
QVariantAnimation::setStartValue((QVariant *)pQVar6);
QVariant::~QVariant((QVariant *)&local_88);
lVar3 = *(long *)(*(long *)(param_1 + 0x38) + 0x20);
local_4c = *(int *)(lVar3 + 0x20) - *(int *)(lVar3 + 0x18);
local_58 = 0;
local_50 = ((*(int *)(lVar3 + 0x1c) - *(int *)(lVar3 + 0x14)) + 1) / 2 + -1;
/* try { // try from 001069e4 to 001069ed has its CatchHandler @ 00106bd2 */
QVariant::QVariant((QVariant *)&local_88,(QRect *)&local_58);
/* try { // try from 001069ee to 001069fa has its CatchHandler @ 00106bd0 */
QVariantAnimation::setEndValue((QVariant *)pQVar6);
QVariant::~QVariant((QVariant *)&local_88);
/* try { // try from 00106a05 to 00106a0c has its CatchHandler @ 00106c17 */
pQVar6 = (QPropertyAnimation *)operator_new(0x10);
/* try { // try from 00106a0d to 00106a23 has its CatchHandler @ 00106bc5 */
QByteArray::QByteArray((QByteArray *)&local_88,"geometry",-1);
/* try { // try from 00106a24 to 00106a35 has its CatchHandler @ 00106bb6 */
QPropertyAnimation::QPropertyAnimation(pQVar6,pQVar2,(QByteArray *)&local_88,(QObject *)0x0);
QArrayDataPointer<char>::~QArrayDataPointer((QArrayDataPointer<char> *)&local_88);
/* try { // try from 00106a40 to 00106a4c has its CatchHandler @ 00106c17 */
QVariantAnimation::setDuration((int)pQVar6);
lVar3 = *(long *)(*(long *)(param_1 + 0x38) + 0x20);
local_50 = *(int *)(lVar3 + 0x1c) - *(int *)(lVar3 + 0x14);
local_4c = *(int *)(lVar3 + 0x20) - *(int *)(lVar3 + 0x18);
local_58 = (ulong)(local_50 + 1);
/* try { // try from 00106a75 to 00106a7e has its CatchHandler @ 00106bb4 */
QVariant::QVariant((QVariant *)&local_88,(QRect *)&local_58);
/* try { // try from 00106a7f to 00106a8b has its CatchHandler @ 00106bb2 */
QVariantAnimation::setStartValue((QVariant *)pQVar6);
QVariant::~QVariant((QVariant *)&local_88);
lVar3 = *(long *)(*(long *)(param_1 + 0x38) + 0x20);
uVar4 = ((*(int *)(lVar3 + 0x1c) - *(int *)(lVar3 + 0x14)) + 1) / 2;
local_4c = *(int *)(lVar3 + 0x20) - *(int *)(lVar3 + 0x18);
local_58 = (ulong)uVar4;
local_50 = uVar4 * 2 + -1;
/* try { // try from 00106ac7 to 00106ad0 has its CatchHandler @ 00106bb0 */
QVariant::QVariant((QVariant *)&local_88,(QRect *)&local_58);
/* try { // try from 00106ad1 to 00106add has its CatchHandler @ 00106bae */
QVariantAnimation::setEndValue((QVariant *)pQVar6);
QVariant::~QVariant((QVariant *)&local_88);
/* try { // try from 00106aeb to 00106af2 has its CatchHandler @ 00106c1b */
this_00 = (QParallelAnimationGroup *)operator_new(0x10);
/* try { // try from 00106af3 to 00106b00 has its CatchHandler @ 00106ba3 */
QParallelAnimationGroup::QParallelAnimationGroup(this_00,(QObject *)this);
/* try { // try from 00106b01 to 00106b89 has its CatchHandler @ 00106c1b */
QAnimationGroup::addAnimation((QAbstractAnimation *)this_00);
QAnimationGroup::addAnimation((QAbstractAnimation *)this_00);
local_88 = PTR_finished_0010eff0;
uStack_80 = 0;
puVar7 = (int4 *)operator_new(0x20);
*puVar7 = 1;
*(code **)(puVar7 + 2) =
QtPrivate::
QFunctorSlotObject<MainWindow::closedoor(Elevetor&)::$_0,0,QtPrivate::List<>,void>::impl;
*(MainWindow **)(puVar7 + 4) = this;
*(Elevetor **)(puVar7 + 6) = param_1;
QObject::connectImpl
(local_60,this_00,&local_88,this_00,0,puVar7,1,0,PTR_staticMetaObject_0010ef88);
QMetaObject::Connection::~Connection(local_60);
QAbstractAnimation::start(this_00,0);
QArrayDataPointer<QWidget*>::~QArrayDataPointer((QArrayDataPointer<QWidget*> *)local_48);
}
return;
}
|
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.