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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
52,500 | bf_divrem | bluesky950520[P]quickjs/libbf.c | int bf_divrem(bf_t *q, bf_t *r, const bf_t *a, const bf_t *b,
limb_t prec, bf_flags_t flags, int rnd_mode)
{
bf_t a1_s, *a1 = &a1_s;
bf_t b1_s, *b1 = &b1_s;
int q_sign, ret;
BOOL is_ceil, is_rndn;
assert(q != a && q != b);
assert(r != a && r != b);
assert(q != r);
if (a->len == 0 || b->len == 0) {
bf_set_zero(q, 0);
if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF || b->expn == BF_EXP_ZERO) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_set(r, a);
return bf_round(r, prec, flags);
}
}
q_sign = a->sign ^ b->sign;
is_rndn = (rnd_mode == BF_RNDN || rnd_mode == BF_RNDNA);
switch(rnd_mode) {
default:
case BF_RNDZ:
case BF_RNDN:
case BF_RNDNA:
is_ceil = FALSE;
break;
case BF_RNDD:
is_ceil = q_sign;
break;
case BF_RNDU:
is_ceil = q_sign ^ 1;
break;
case BF_RNDA:
is_ceil = TRUE;
break;
case BF_DIVREM_EUCLIDIAN:
is_ceil = a->sign;
break;
}
a1->expn = a->expn;
a1->tab = a->tab;
a1->len = a->len;
a1->sign = 0;
b1->expn = b->expn;
b1->tab = b->tab;
b1->len = b->len;
b1->sign = 0;
/* XXX: could improve to avoid having a large 'q' */
bf_tdivremu(q, r, a1, b1);
if (bf_is_nan(q) || bf_is_nan(r))
goto fail;
if (r->len != 0) {
if (is_rndn) {
int res;
b1->expn--;
res = bf_cmpu(r, b1);
b1->expn++;
if (res > 0 ||
(res == 0 &&
(rnd_mode == BF_RNDNA ||
get_bit(q->tab, q->len, q->len * LIMB_BITS - q->expn)))) {
goto do_sub_r;
}
} else if (is_ceil) {
do_sub_r:
ret = bf_add_si(q, q, 1, BF_PREC_INF, BF_RNDZ);
ret |= bf_sub(r, r, b1, BF_PREC_INF, BF_RNDZ);
if (ret & BF_ST_MEM_ERROR)
goto fail;
}
}
r->sign ^= a->sign;
q->sign = q_sign;
return bf_round(r, prec, flags);
fail:
bf_set_nan(q);
bf_set_nan(r);
return BF_ST_MEM_ERROR;
} | O0 | c | bf_divrem:
subq $0xb8, %rsp
movl 0xc0(%rsp), %eax
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq %rdx, 0x98(%rsp)
movq %rcx, 0x90(%rsp)
movq %r8, 0x88(%rsp)
movl %r9d, 0x84(%rsp)
leaq 0x58(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x98(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0xe8d24
movq 0x90(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xe8e0a
movq 0xa8(%rsp), %rdi
xorl %esi, %esi
callq 0xe6240
movq 0x98(%rsp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, 0x10(%rax)
je 0xe8d63
movq 0x90(%rsp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, 0x10(%rax)
jne 0xe8d80
movq 0xa0(%rsp), %rdi
callq 0xe61a0
movl $0x0, 0xb4(%rsp)
jmp 0xe9130
movq 0x98(%rsp), %rax
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rcx, 0x10(%rax)
je 0xe8db0
movq 0x90(%rsp), %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
cmpq %rcx, 0x10(%rax)
jne 0xe8dcd
movq 0xa0(%rsp), %rdi
callq 0xe61a0
movl $0x1, 0xb4(%rsp)
jmp 0xe9130
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0xe62c0
movq 0xa0(%rsp), %rdi
movq 0x88(%rsp), %rsi
movl 0x84(%rsp), %edx
callq 0xe6d10
movl %eax, 0xb4(%rsp)
jmp 0xe9130
movq 0x98(%rsp), %rax
movl 0x8(%rax), %eax
movq 0x90(%rsp), %rcx
xorl 0x8(%rcx), %eax
movl %eax, 0x1c(%rsp)
movb $0x1, %al
cmpl $0x0, 0xc0(%rsp)
movb %al, 0xb(%rsp)
je 0xe8e43
cmpl $0x4, 0xc0(%rsp)
sete %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
movzbl %al, %eax
andl $0x1, %eax
movl %eax, 0x10(%rsp)
movl 0xc0(%rsp), %eax
movq %rax, (%rsp)
subq $0x6, %rax
ja 0xe8e76
movq (%rsp), %rax
leaq 0x28a93(%rip), %rcx # 0x111900
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xe8e78
movl $0x0, 0x14(%rsp)
jmp 0xe8eb2
movl 0x1c(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0xe8eb2
movl 0x1c(%rsp), %eax
xorl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0xe8eb2
movl $0x1, 0x14(%rsp)
jmp 0xe8eb2
movq 0x98(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x14(%rsp)
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x98(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x98(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x50(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x90(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x90(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x20(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0xa8(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0xe9140
movq 0xa8(%rsp), %rdi
callq 0xe9250
cmpl $0x0, %eax
jne 0xe8f8b
movq 0xa0(%rsp), %rdi
callq 0xe9250
cmpl $0x0, %eax
je 0xe8f90
jmp 0xe910b
movq 0xa0(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0xe90be
cmpl $0x0, 0x10(%rsp)
je 0xe9041
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0xa0(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xe6f40
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
cmpl $0x0, 0xc(%rsp)
jg 0xe903d
cmpl $0x0, 0xc(%rsp)
jne 0xe903f
cmpl $0x4, 0xc0(%rsp)
je 0xe903d
movq 0xa8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0xa8(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0xa8(%rsp), %rax
movq 0x18(%rax), %rdx
shlq $0x6, %rdx
movq 0xa8(%rsp), %rax
subq 0x10(%rax), %rdx
callq 0xe6ca0
cmpq $0x0, %rax
je 0xe903f
jmp 0xe904a
jmp 0xe90bc
cmpl $0x0, 0x14(%rsp)
je 0xe90ba
jmp 0xe904a
movq 0xa8(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movl $0x1, %edx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0xe9280
movl %eax, 0x18(%rsp)
movq 0xa0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0x20(%rsp), %rdx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0xe9300
orl 0x18(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xe90b8
jmp 0xe910b
jmp 0xe90ba
jmp 0xe90bc
jmp 0xe90be
movq 0x98(%rsp), %rax
movl 0x8(%rax), %ecx
movq 0xa0(%rsp), %rax
xorl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movl 0x1c(%rsp), %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0xa0(%rsp), %rdi
movq 0x88(%rsp), %rsi
movl 0x84(%rsp), %edx
callq 0xe6d10
movl %eax, 0xb4(%rsp)
jmp 0xe9130
movq 0xa8(%rsp), %rdi
callq 0xe61a0
movq 0xa0(%rsp), %rdi
callq 0xe61a0
movl $0x20, 0xb4(%rsp)
movl 0xb4(%rsp), %eax
addq $0xb8, %rsp
retq
nop
| bf_divrem:
sub rsp, 0B8h
mov eax, [rsp+0B8h+arg_0]
mov [rsp+0B8h+var_10], rdi
mov [rsp+0B8h+var_18], rsi
mov [rsp+0B8h+var_20], rdx
mov [rsp+0B8h+var_28], rcx
mov [rsp+0B8h+var_30], r8
mov [rsp+0B8h+var_34], r9d
lea rax, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_68], rax
lea rax, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_98], rax
mov rax, [rsp+0B8h+var_20]
cmp qword ptr [rax+18h], 0
jz short loc_E8D24
mov rax, [rsp+0B8h+var_28]
cmp qword ptr [rax+18h], 0
jnz loc_E8E0A
loc_E8D24:
mov rdi, [rsp+0B8h+var_10]
xor esi, esi
call bf_set_zero
mov rax, [rsp+0B8h+var_20]
mov rcx, 7FFFFFFFFFFFFFFFh
cmp [rax+10h], rcx
jz short loc_E8D63
mov rax, [rsp+0B8h+var_28]
mov rcx, 7FFFFFFFFFFFFFFFh
cmp [rax+10h], rcx
jnz short loc_E8D80
loc_E8D63:
mov rdi, [rsp+0B8h+var_18]
call bf_set_nan
mov [rsp+0B8h+var_4], 0
jmp loc_E9130
loc_E8D80:
mov rax, [rsp+0B8h+var_20]
mov rcx, 7FFFFFFFFFFFFFFEh
cmp [rax+10h], rcx
jz short loc_E8DB0
mov rax, [rsp+0B8h+var_28]
mov rcx, 8000000000000000h
cmp [rax+10h], rcx
jnz short loc_E8DCD
loc_E8DB0:
mov rdi, [rsp+0B8h+var_18]
call bf_set_nan
mov [rsp+0B8h+var_4], 1
jmp loc_E9130
loc_E8DCD:
mov rdi, [rsp+0B8h+var_18]
mov rsi, [rsp+0B8h+var_20]
call bf_set
mov rdi, [rsp+0B8h+var_18]
mov rsi, [rsp+0B8h+var_30]
mov edx, [rsp+0B8h+var_34]
call bf_round
mov [rsp+0B8h+var_4], eax
jmp loc_E9130
loc_E8E0A:
mov rax, [rsp+0B8h+var_20]
mov eax, [rax+8]
mov rcx, [rsp+0B8h+var_28]
xor eax, [rcx+8]
mov [rsp+0B8h+var_9C], eax
mov al, 1
cmp [rsp+0B8h+arg_0], 0
mov [rsp+0B8h+var_AD], al
jz short loc_E8E43
cmp [rsp+0B8h+arg_0], 4
setz al
mov [rsp+0B8h+var_AD], al
loc_E8E43:
mov al, [rsp+0B8h+var_AD]
movzx eax, al
and eax, 1
mov [rsp+0B8h+var_A8], eax
mov eax, [rsp+0B8h+arg_0]
mov [rsp+0B8h+var_B8], rax
sub rax, 6; switch 7 cases
ja short def_E8E74; jumptable 00000000000E8E74 default case
mov rax, [rsp+0B8h+var_B8]
lea rcx, jpt_E8E74
movsxd rax, ds:(jpt_E8E74 - 111900h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
def_E8E74:
jmp short $+2; jumptable 00000000000E8E74 default case
loc_E8E78:
mov [rsp+0B8h+var_A4], 0; jumptable 00000000000E8E74 cases 0,1,4
jmp short loc_E8EB2
loc_E8E82:
mov eax, [rsp+0B8h+var_9C]; jumptable 00000000000E8E74 case 2
mov [rsp+0B8h+var_A4], eax
jmp short loc_E8EB2
loc_E8E8C:
mov eax, [rsp+0B8h+var_9C]; jumptable 00000000000E8E74 case 3
xor eax, 1
mov [rsp+0B8h+var_A4], eax
jmp short loc_E8EB2
loc_E8E99:
mov [rsp+0B8h+var_A4], 1; jumptable 00000000000E8E74 case 5
jmp short loc_E8EB2
loc_E8EA3:
mov rax, [rsp+0B8h+var_20]; jumptable 00000000000E8E74 case 6
mov eax, [rax+8]
mov [rsp+0B8h+var_A4], eax
loc_E8EB2:
mov rax, [rsp+0B8h+var_20]
mov rcx, [rax+10h]
mov rax, [rsp+0B8h+var_68]
mov [rax+10h], rcx
mov rax, [rsp+0B8h+var_20]
mov rcx, [rax+20h]
mov rax, [rsp+0B8h+var_68]
mov [rax+20h], rcx
mov rax, [rsp+0B8h+var_20]
mov rcx, [rax+18h]
mov rax, [rsp+0B8h+var_68]
mov [rax+18h], rcx
mov rax, [rsp+0B8h+var_68]
mov dword ptr [rax+8], 0
mov rax, [rsp+0B8h+var_28]
mov rcx, [rax+10h]
mov rax, [rsp+0B8h+var_98]
mov [rax+10h], rcx
mov rax, [rsp+0B8h+var_28]
mov rcx, [rax+20h]
mov rax, [rsp+0B8h+var_98]
mov [rax+20h], rcx
mov rax, [rsp+0B8h+var_28]
mov rcx, [rax+18h]
mov rax, [rsp+0B8h+var_98]
mov [rax+18h], rcx
mov rax, [rsp+0B8h+var_98]
mov dword ptr [rax+8], 0
mov rdi, [rsp+0B8h+var_10]
mov rsi, [rsp+0B8h+var_18]
mov rdx, [rsp+0B8h+var_68]
mov rcx, [rsp+0B8h+var_98]
call bf_tdivremu
mov rdi, [rsp+0B8h+var_10]
call bf_is_nan
cmp eax, 0
jnz short loc_E8F8B
mov rdi, [rsp+0B8h+var_18]
call bf_is_nan
cmp eax, 0
jz short loc_E8F90
loc_E8F8B:
jmp loc_E910B
loc_E8F90:
mov rax, [rsp+0B8h+var_18]
cmp qword ptr [rax+18h], 0
jz loc_E90BE
cmp [rsp+0B8h+var_A8], 0
jz loc_E9041
mov rax, [rsp+0B8h+var_98]
mov rcx, [rax+10h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+10h], rcx
mov rdi, [rsp+0B8h+var_18]
mov rsi, [rsp+0B8h+var_98]
call bf_cmpu
mov [rsp+0B8h+var_AC], eax
mov rax, [rsp+0B8h+var_98]
mov rcx, [rax+10h]
add rcx, 1
mov [rax+10h], rcx
cmp [rsp+0B8h+var_AC], 0
jg short loc_E903D
cmp [rsp+0B8h+var_AC], 0
jnz short loc_E903F
cmp [rsp+0B8h+arg_0], 4
jz short loc_E903D
mov rax, [rsp+0B8h+var_10]
mov rdi, [rax+20h]
mov rax, [rsp+0B8h+var_10]
mov rsi, [rax+18h]
mov rax, [rsp+0B8h+var_10]
mov rdx, [rax+18h]
shl rdx, 6
mov rax, [rsp+0B8h+var_10]
sub rdx, [rax+10h]
call get_bit
cmp rax, 0
jz short loc_E903F
loc_E903D:
jmp short loc_E904A
loc_E903F:
jmp short loc_E90BC
loc_E9041:
cmp [rsp+0B8h+var_A4], 0
jz short loc_E90BA
jmp short $+2
loc_E904A:
mov rdi, [rsp+0B8h+var_10]
mov rsi, [rsp+0B8h+var_10]
mov edx, 1
mov rcx, 3FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_add_si
mov [rsp+0B8h+var_A0], eax
mov rdi, [rsp+0B8h+var_18]
mov rsi, [rsp+0B8h+var_18]
mov rdx, [rsp+0B8h+var_98]
mov rcx, 3FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_sub
or eax, [rsp+0B8h+var_A0]
mov [rsp+0B8h+var_A0], eax
mov eax, [rsp+0B8h+var_A0]
and eax, 20h
cmp eax, 0
jz short loc_E90B8
jmp short loc_E910B
loc_E90B8:
jmp short $+2
loc_E90BA:
jmp short $+2
loc_E90BC:
jmp short $+2
loc_E90BE:
mov rax, [rsp+0B8h+var_20]
mov ecx, [rax+8]
mov rax, [rsp+0B8h+var_18]
xor ecx, [rax+8]
mov [rax+8], ecx
mov ecx, [rsp+0B8h+var_9C]
mov rax, [rsp+0B8h+var_10]
mov [rax+8], ecx
mov rdi, [rsp+0B8h+var_18]
mov rsi, [rsp+0B8h+var_30]
mov edx, [rsp+0B8h+var_34]
call bf_round
mov [rsp+0B8h+var_4], eax
jmp short loc_E9130
loc_E910B:
mov rdi, [rsp+0B8h+var_10]
call bf_set_nan
mov rdi, [rsp+0B8h+var_18]
call bf_set_nan
mov [rsp+0B8h+var_4], 20h ; ' '
loc_E9130:
mov eax, [rsp+0B8h+var_4]
add rsp, 0B8h
retn
| long long bf_divrem(long long a1, _QWORD *a2, long long a3, long long a4, long long a5, unsigned int a6, int a7)
{
bool v8; // [rsp+Bh] [rbp-ADh]
int v9; // [rsp+Ch] [rbp-ACh]
int v10; // [rsp+14h] [rbp-A4h]
unsigned __int8 v11; // [rsp+18h] [rbp-A0h]
int v12; // [rsp+1Ch] [rbp-9Ch]
_BYTE v13[8]; // [rsp+28h] [rbp-90h] BYREF
int v14; // [rsp+30h] [rbp-88h]
long long v15; // [rsp+38h] [rbp-80h]
long long v16; // [rsp+40h] [rbp-78h]
long long v17; // [rsp+48h] [rbp-70h]
char *v18; // [rsp+50h] [rbp-68h]
char v19; // [rsp+58h] [rbp-60h] BYREF
unsigned int v20; // [rsp+84h] [rbp-34h]
long long v21; // [rsp+88h] [rbp-30h]
long long v22; // [rsp+90h] [rbp-28h]
long long v23; // [rsp+98h] [rbp-20h]
_QWORD *v24; // [rsp+A0h] [rbp-18h]
long long v25; // [rsp+A8h] [rbp-10h]
v25 = a1;
v24 = a2;
v23 = a3;
v22 = a4;
v21 = a5;
v20 = a6;
v18 = &v19;
if ( *(_QWORD *)(a3 + 24) && *(_QWORD *)(v22 + 24) )
{
v12 = *(_DWORD *)(v22 + 8) ^ *(_DWORD *)(v23 + 8);
v8 = 1;
if ( a7 )
v8 = a7 == 4;
switch ( a7 )
{
case 2:
v10 = *(_DWORD *)(v22 + 8) ^ *(_DWORD *)(v23 + 8);
break;
case 3:
v10 = v12 ^ 1;
break;
case 5:
v10 = 1;
break;
case 6:
v10 = *(_DWORD *)(v23 + 8);
break;
default:
v10 = 0;
break;
}
*((_QWORD *)v18 + 2) = *(_QWORD *)(v23 + 16);
*((_QWORD *)v18 + 4) = *(_QWORD *)(v23 + 32);
*((_QWORD *)v18 + 3) = *(_QWORD *)(v23 + 24);
*((_DWORD *)v18 + 2) = 0;
v15 = *(_QWORD *)(v22 + 16);
v17 = *(_QWORD *)(v22 + 32);
v16 = *(_QWORD *)(v22 + 24);
v14 = 0;
bf_tdivremu(v25, v24, v18, v13);
if ( (unsigned int)bf_is_nan(v25) || (unsigned int)bf_is_nan(v24) )
goto LABEL_32;
if ( v24[3] )
{
if ( v8 )
{
--v15;
v9 = bf_cmpu((long long)v24, (long long)v13);
++v15;
if ( v9 <= 0
&& (v9
|| a7 != 4
&& !get_bit(
*(_QWORD *)(v25 + 32),
*(_QWORD *)(v25 + 24),
(*(_QWORD *)(v25 + 24) << 6) - *(_QWORD *)(v25 + 16))) )
{
goto LABEL_31;
}
}
else if ( !v10 )
{
goto LABEL_31;
}
v11 = bf_add_si(v25, v25, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1LL);
if ( ((v11 | (unsigned __int8)bf_sub(v24, v24, v13, 0x3FFFFFFFFFFFFFFFLL, 1LL)) & 0x20) != 0 )
{
LABEL_32:
bf_set_nan(v25);
bf_set_nan((long long)v24);
return 32;
}
}
LABEL_31:
*((_DWORD *)v24 + 2) ^= *(_DWORD *)(v23 + 8);
*(_DWORD *)(v25 + 8) = v12;
return (unsigned int)bf_round(v24, v21, v20);
}
bf_set_zero(v25, 0);
if ( *(_QWORD *)(v23 + 16) == 0x7FFFFFFFFFFFFFFFLL || *(_QWORD *)(v22 + 16) == 0x7FFFFFFFFFFFFFFFLL )
{
bf_set_nan((long long)v24);
return 0;
}
else if ( *(_QWORD *)(v23 + 16) == 0x7FFFFFFFFFFFFFFELL || *(_QWORD *)(v22 + 16) == 0x8000000000000000LL )
{
bf_set_nan((long long)v24);
return 1;
}
else
{
bf_set((long long)v24, v23);
return (unsigned int)bf_round(v24, v21, v20);
}
}
| bf_divrem:
SUB RSP,0xb8
MOV EAX,dword ptr [RSP + 0xc0]
MOV qword ptr [RSP + 0xa8],RDI
MOV qword ptr [RSP + 0xa0],RSI
MOV qword ptr [RSP + 0x98],RDX
MOV qword ptr [RSP + 0x90],RCX
MOV qword ptr [RSP + 0x88],R8
MOV dword ptr [RSP + 0x84],R9D
LEA RAX,[RSP + 0x58]
MOV qword ptr [RSP + 0x50],RAX
LEA RAX,[RSP + 0x28]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x98]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x001e8d24
MOV RAX,qword ptr [RSP + 0x90]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x001e8e0a
LAB_001e8d24:
MOV RDI,qword ptr [RSP + 0xa8]
XOR ESI,ESI
CALL 0x001e6240
MOV RAX,qword ptr [RSP + 0x98]
MOV RCX,0x7fffffffffffffff
CMP qword ptr [RAX + 0x10],RCX
JZ 0x001e8d63
MOV RAX,qword ptr [RSP + 0x90]
MOV RCX,0x7fffffffffffffff
CMP qword ptr [RAX + 0x10],RCX
JNZ 0x001e8d80
LAB_001e8d63:
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001e61a0
MOV dword ptr [RSP + 0xb4],0x0
JMP 0x001e9130
LAB_001e8d80:
MOV RAX,qword ptr [RSP + 0x98]
MOV RCX,0x7ffffffffffffffe
CMP qword ptr [RAX + 0x10],RCX
JZ 0x001e8db0
MOV RAX,qword ptr [RSP + 0x90]
MOV RCX,-0x8000000000000000
CMP qword ptr [RAX + 0x10],RCX
JNZ 0x001e8dcd
LAB_001e8db0:
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001e61a0
MOV dword ptr [RSP + 0xb4],0x1
JMP 0x001e9130
LAB_001e8dcd:
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x98]
CALL 0x001e62c0
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x88]
MOV EDX,dword ptr [RSP + 0x84]
CALL 0x001e6d10
MOV dword ptr [RSP + 0xb4],EAX
JMP 0x001e9130
LAB_001e8e0a:
MOV RAX,qword ptr [RSP + 0x98]
MOV EAX,dword ptr [RAX + 0x8]
MOV RCX,qword ptr [RSP + 0x90]
XOR EAX,dword ptr [RCX + 0x8]
MOV dword ptr [RSP + 0x1c],EAX
MOV AL,0x1
CMP dword ptr [RSP + 0xc0],0x0
MOV byte ptr [RSP + 0xb],AL
JZ 0x001e8e43
CMP dword ptr [RSP + 0xc0],0x4
SETZ AL
MOV byte ptr [RSP + 0xb],AL
LAB_001e8e43:
MOV AL,byte ptr [RSP + 0xb]
MOVZX EAX,AL
AND EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RSP + 0xc0]
MOV qword ptr [RSP],RAX
SUB RAX,0x6
JA 0x001e8e76
MOV RAX,qword ptr [RSP]
LEA RCX,[0x211900]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
LAB_001e8e76:
JMP 0x001e8e78
caseD_0:
MOV dword ptr [RSP + 0x14],0x0
JMP 0x001e8eb2
caseD_2:
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x14],EAX
JMP 0x001e8eb2
caseD_3:
MOV EAX,dword ptr [RSP + 0x1c]
XOR EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x001e8eb2
caseD_5:
MOV dword ptr [RSP + 0x14],0x1
JMP 0x001e8eb2
caseD_6:
MOV RAX,qword ptr [RSP + 0x98]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RSP + 0x14],EAX
LAB_001e8eb2:
MOV RAX,qword ptr [RSP + 0x98]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP + 0x98]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RSP + 0x98]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RSP + 0x50]
MOV dword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RSP + 0x90]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP + 0x90]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RSP + 0x90]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RSP + 0x20]
MOV dword ptr [RAX + 0x8],0x0
MOV RDI,qword ptr [RSP + 0xa8]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x20]
CALL 0x001e9140
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x001e9250
CMP EAX,0x0
JNZ 0x001e8f8b
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001e9250
CMP EAX,0x0
JZ 0x001e8f90
LAB_001e8f8b:
JMP 0x001e910b
LAB_001e8f90:
MOV RAX,qword ptr [RSP + 0xa0]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x001e90be
CMP dword ptr [RSP + 0x10],0x0
JZ 0x001e9041
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RAX + 0x10]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x10],RCX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001e6f40
MOV dword ptr [RSP + 0xc],EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RAX + 0x10]
ADD RCX,0x1
MOV qword ptr [RAX + 0x10],RCX
CMP dword ptr [RSP + 0xc],0x0
JG 0x001e903d
CMP dword ptr [RSP + 0xc],0x0
JNZ 0x001e903f
CMP dword ptr [RSP + 0xc0],0x4
JZ 0x001e903d
MOV RAX,qword ptr [RSP + 0xa8]
MOV RDI,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0xa8]
MOV RSI,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RAX + 0x18]
SHL RDX,0x6
MOV RAX,qword ptr [RSP + 0xa8]
SUB RDX,qword ptr [RAX + 0x10]
CALL 0x001e6ca0
CMP RAX,0x0
JZ 0x001e903f
LAB_001e903d:
JMP 0x001e904a
LAB_001e903f:
JMP 0x001e90bc
LAB_001e9041:
CMP dword ptr [RSP + 0x14],0x0
JZ 0x001e90ba
JMP 0x001e904a
LAB_001e904a:
MOV RDI,qword ptr [RSP + 0xa8]
MOV RSI,qword ptr [RSP + 0xa8]
MOV EDX,0x1
MOV RCX,0x3fffffffffffffff
MOV R8D,0x1
CALL 0x001e9280
MOV dword ptr [RSP + 0x18],EAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,0x3fffffffffffffff
MOV R8D,0x1
CALL 0x001e9300
OR EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x18],EAX
MOV EAX,dword ptr [RSP + 0x18]
AND EAX,0x20
CMP EAX,0x0
JZ 0x001e90b8
JMP 0x001e910b
LAB_001e90b8:
JMP 0x001e90ba
LAB_001e90ba:
JMP 0x001e90bc
LAB_001e90bc:
JMP 0x001e90be
LAB_001e90be:
MOV RAX,qword ptr [RSP + 0x98]
MOV ECX,dword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0xa0]
XOR ECX,dword ptr [RAX + 0x8]
MOV dword ptr [RAX + 0x8],ECX
MOV ECX,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RSP + 0xa8]
MOV dword ptr [RAX + 0x8],ECX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x88]
MOV EDX,dword ptr [RSP + 0x84]
CALL 0x001e6d10
MOV dword ptr [RSP + 0xb4],EAX
JMP 0x001e9130
LAB_001e910b:
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x001e61a0
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001e61a0
MOV dword ptr [RSP + 0xb4],0x20
LAB_001e9130:
MOV EAX,dword ptr [RSP + 0xb4]
ADD RSP,0xb8
RET
|
int4
bf_divrem(long param_1,long param_2,long param_3,long param_4,int8 param_5,int4 param_6,
int param_7)
{
int4 uVar1;
uint uVar2;
int iVar3;
uint uVar4;
uint uVar5;
long lVar6;
uint local_a4;
int1 local_90 [8];
int4 local_88;
long local_80;
int8 local_78;
int8 local_70;
int1 *local_68;
int1 local_60 [8];
int4 local_58;
int8 local_50;
int8 local_48;
int8 local_40;
int4 local_34;
int8 local_30;
long local_28;
long local_20;
long local_18;
long local_10;
int4 local_4;
local_68 = local_60;
local_34 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
if ((*(long *)(param_3 + 0x18) == 0) || (*(long *)(param_4 + 0x18) == 0)) {
bf_set_zero(param_1,0);
if ((*(long *)(local_20 + 0x10) != 0x7fffffffffffffff) &&
(*(long *)(local_28 + 0x10) != 0x7fffffffffffffff)) {
if ((*(long *)(local_20 + 0x10) != 0x7ffffffffffffffe) &&
(*(long *)(local_28 + 0x10) != -0x8000000000000000)) {
bf_set(local_18,local_20);
uVar1 = bf_round(local_18,local_30,local_34);
return uVar1;
}
bf_set_nan(local_18);
return 1;
}
bf_set_nan(local_18);
return 0;
}
uVar2 = *(uint *)(param_3 + 8) ^ *(uint *)(param_4 + 8);
switch(param_7) {
default:
local_a4 = 0;
break;
case 2:
local_a4 = uVar2;
break;
case 3:
local_a4 = uVar2 ^ 1;
break;
case 5:
local_a4 = 1;
break;
case 6:
local_a4 = *(uint *)(param_3 + 8);
}
local_50 = *(int8 *)(param_3 + 0x10);
local_40 = *(int8 *)(param_3 + 0x20);
local_48 = *(int8 *)(param_3 + 0x18);
local_58 = 0;
local_80 = *(long *)(param_4 + 0x10);
local_70 = *(int8 *)(param_4 + 0x20);
local_78 = *(int8 *)(param_4 + 0x18);
local_88 = 0;
bf_tdivremu(param_1,param_2,local_68,local_90);
iVar3 = bf_is_nan(local_10);
if ((iVar3 == 0) && (iVar3 = bf_is_nan(local_18), iVar3 == 0)) {
if (*(long *)(local_18 + 0x18) != 0) {
if (param_7 == 0 || param_7 == 4) {
local_80 = local_80 + -1;
iVar3 = bf_cmpu(local_18,local_90);
local_80 = local_80 + 1;
if ((0 < iVar3) ||
((iVar3 == 0 &&
((param_7 == 4 ||
(lVar6 = get_bit(*(int8 *)(local_10 + 0x20),*(int8 *)(local_10 + 0x18),
*(long *)(local_10 + 0x18) * 0x40 - *(long *)(local_10 + 0x10)),
lVar6 != 0)))))) {
LAB_001e904a:
uVar4 = bf_add_si(local_10,local_10,1,0x3fffffffffffffff,1);
uVar5 = bf_sub(local_18,local_18,local_90,0x3fffffffffffffff,1);
if (((uVar5 | uVar4) & 0x20) != 0) goto LAB_001e910b;
}
}
else if (local_a4 != 0) goto LAB_001e904a;
}
*(uint *)(local_18 + 8) = *(uint *)(local_20 + 8) ^ *(uint *)(local_18 + 8);
*(uint *)(local_10 + 8) = uVar2;
local_4 = bf_round(local_18,local_30,local_34);
}
else {
LAB_001e910b:
bf_set_nan(local_10);
bf_set_nan(local_18);
local_4 = 0x20;
}
return local_4;
}
| |
52,501 | bf_divrem | bluesky950520[P]quickjs/libbf.c | int bf_divrem(bf_t *q, bf_t *r, const bf_t *a, const bf_t *b,
limb_t prec, bf_flags_t flags, int rnd_mode)
{
bf_t a1_s, *a1 = &a1_s;
bf_t b1_s, *b1 = &b1_s;
int q_sign, ret;
BOOL is_ceil, is_rndn;
assert(q != a && q != b);
assert(r != a && r != b);
assert(q != r);
if (a->len == 0 || b->len == 0) {
bf_set_zero(q, 0);
if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF || b->expn == BF_EXP_ZERO) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_set(r, a);
return bf_round(r, prec, flags);
}
}
q_sign = a->sign ^ b->sign;
is_rndn = (rnd_mode == BF_RNDN || rnd_mode == BF_RNDNA);
switch(rnd_mode) {
default:
case BF_RNDZ:
case BF_RNDN:
case BF_RNDNA:
is_ceil = FALSE;
break;
case BF_RNDD:
is_ceil = q_sign;
break;
case BF_RNDU:
is_ceil = q_sign ^ 1;
break;
case BF_RNDA:
is_ceil = TRUE;
break;
case BF_DIVREM_EUCLIDIAN:
is_ceil = a->sign;
break;
}
a1->expn = a->expn;
a1->tab = a->tab;
a1->len = a->len;
a1->sign = 0;
b1->expn = b->expn;
b1->tab = b->tab;
b1->len = b->len;
b1->sign = 0;
/* XXX: could improve to avoid having a large 'q' */
bf_tdivremu(q, r, a1, b1);
if (bf_is_nan(q) || bf_is_nan(r))
goto fail;
if (r->len != 0) {
if (is_rndn) {
int res;
b1->expn--;
res = bf_cmpu(r, b1);
b1->expn++;
if (res > 0 ||
(res == 0 &&
(rnd_mode == BF_RNDNA ||
get_bit(q->tab, q->len, q->len * LIMB_BITS - q->expn)))) {
goto do_sub_r;
}
} else if (is_ceil) {
do_sub_r:
ret = bf_add_si(q, q, 1, BF_PREC_INF, BF_RNDZ);
ret |= bf_sub(r, r, b1, BF_PREC_INF, BF_RNDZ);
if (ret & BF_ST_MEM_ERROR)
goto fail;
}
}
r->sign ^= a->sign;
q->sign = q_sign;
return bf_round(r, prec, flags);
fail:
bf_set_nan(q);
bf_set_nan(r);
return BF_ST_MEM_ERROR;
} | O1 | c | bf_divrem:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, %ebp
movq %r8, 0x20(%rsp)
movq %rcx, %r13
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
movabsq $0x7fffffffffffffff, %r14 # imm = 0x7FFFFFFFFFFFFFFF
movq 0x18(%rdx), %rcx
testq %rcx, %rcx
je 0x86b57
movq 0x18(%r13), %rax
testq %rax, %rax
je 0x86b57
movl %ebp, 0xc(%rsp)
movl 0xb0(%rsp), %edi
movl 0x8(%r15), %esi
movl 0x8(%r13), %r9d
xorl %esi, %r9d
xorl %edx, %edx
movq %rdi, 0x18(%rsp)
addl $-0x2, %edi
movl $0x0, %r8d
cmpl $0x4, %edi
ja 0x86c39
leaq 0x1bd5d(%rip), %r8 # 0xa28a0
movslq (%r8,%rdi,4), %rdi
addq %r8, %rdi
xorl %r8d, %r8d
jmpq *%rdi
movl %r9d, %r8d
jmp 0x86c39
cmpq $0x0, 0x18(%r12)
je 0x86b7e
movq (%r12), %rax
movq 0x20(%r12), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%r12)
movq $0x0, 0x18(%r12)
leaq 0x1(%r14), %rax
movq %rax, 0x10(%r12)
movl $0x0, 0x8(%r12)
movq 0x10(%r15), %rcx
cmpq %r14, %rcx
je 0x86ba2
movq 0x10(%r13), %rdx
cmpq %r14, %rdx
jne 0x86bd6
cmpq $0x0, 0x18(%rbx)
je 0x86bc4
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r14, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
xorl %eax, %eax
jmp 0x86df0
leaq -0x1(%r14), %rsi
cmpq %rsi, %rcx
setne %cl
cmpq %rax, %rdx
setne %al
testb %al, %cl
jne 0x86e98
cmpq $0x0, 0x18(%rbx)
je 0x86c10
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r14, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x1, %eax
jmp 0x86df0
movl $0x1, %r8d
jmp 0x86c39
movl %r9d, %r8d
xorl $0x1, %r8d
jmp 0x86c39
movl %esi, %r8d
movl %r8d, 0x10(%rsp)
movl %r9d, 0x14(%rsp)
movq 0x10(%r15), %rbp
leaq 0x50(%rsp), %rdi
movq %rbp, 0x10(%rdi)
movq 0x20(%r15), %rsi
movq %rsi, 0x20(%rdi)
movq %rcx, 0x18(%rdi)
movl %edx, 0x8(%rdi)
movq 0x10(%r13), %r14
leaq 0x28(%rsp), %rsi
movq %r14, 0x10(%rsi)
movq 0x20(%r13), %rcx
movq %rcx, 0x20(%rsi)
movq %rax, 0x18(%rsi)
movl %edx, 0x8(%rsi)
callq 0x8542a
testl %eax, %eax
js 0x86d25
subq %r14, %rbp
cmpq $0x2, %rbp
movl $0x1, %ecx
cmovgeq %rbp, %rcx
incq %rcx
leaq 0xf51(%rip), %r9 # 0x87bf3
leaq 0x50(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %r12, %rdi
movl $0x1, %r8d
callq 0x87b3a
movq 0x18(%r12), %rcx
testq %rcx, %rcx
je 0x86cd6
movq %r12, %rdi
xorl %esi, %esi
movl $0x11, %edx
xorl %r8d, %r8d
callq 0x84e26
leaq 0x28(%rsp), %rdx
movabsq $0x3fffffffffffffff, %r13 # imm = 0x3FFFFFFFFFFFFFFF
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rcx
movl $0x1, %r8d
callq 0x86711
leaq 0xedc(%rip), %r9 # 0x87bdc
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
movq %rbx, %rdx
movq %r13, %rcx
movl $0x1, %r8d
callq 0x87b3a
movabsq $0x7fffffffffffffff, %r14 # imm = 0x7FFFFFFFFFFFFFFF
jmp 0x86d75
movl $0x0, 0x8(%r12)
movabsq $0x7fffffffffffffff, %r14 # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x1(%r14), %rax
movq %rax, 0x10(%r12)
cmpq $0x0, 0x18(%r12)
je 0x86d68
movq (%r12), %rax
movq 0x20(%r12), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%r12)
movq $0x0, 0x18(%r12)
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x84c8d
movl 0xc(%rsp), %ebp
movq 0x10(%r12), %r13
cmpq %r14, %r13
je 0x86d89
cmpq %r14, 0x10(%rbx)
jne 0x86dff
cmpq $0x0, 0x18(%r12)
je 0x86db0
movq (%r12), %rax
movq 0x20(%r12), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%r12)
movq $0x0, 0x18(%r12)
movq %r14, 0x10(%r12)
movl $0x0, 0x8(%r12)
cmpq $0x0, 0x18(%rbx)
je 0x86de0
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r14, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x20, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x18(%rbx)
je 0x86f2c
testl $0xfffffffb, 0x18(%rsp) # imm = 0xFFFFFFFB
jne 0x86ed0
leaq 0x28(%rsp), %r14
movq 0x10(%r14), %rbp
leaq -0x1(%rbp), %rax
movq %rax, 0x10(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8542a
movq %rbp, 0x10(%r14)
movl 0xc(%rsp), %ebp
movabsq $0x7fffffffffffffff, %r14 # imm = 0x7FFFFFFFFFFFFFFF
testl %eax, %eax
jg 0x86ed7
jne 0x86f2c
cmpl $0x4, 0x18(%rsp)
je 0x86ed7
movq 0x18(%r12), %rdx
movq %rdx, %rax
shlq $0x6, %rax
subq %r13, %rax
movq %rax, %rcx
sarq $0x6, %rcx
sets %sil
cmpq %rdx, %rcx
setae %dl
orb %sil, %dl
jne 0x86f2c
movq 0x20(%r12), %rdx
movq (%rdx,%rcx,8), %rcx
btq %rax, %rcx
jb 0x86ed7
jmp 0x86f2c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x84c8d
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x86bcf
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movl %ebp, %edx
xorl %r8d, %r8d
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x84e26
cmpl $0x0, 0x10(%rsp)
je 0x86f2c
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %edx
movq %r12, %rdi
movq %r12, %rsi
movl $0x1, %r8d
callq 0x86f60
movl %eax, %r13d
leaq 0xcdb(%rip), %r9 # 0x87bdc
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movq %rbx, %rsi
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0x87b3a
orl %r13d, %eax
testb $0x20, %al
jne 0x86d89
movl 0x8(%r15), %eax
xorl %eax, 0x8(%rbx)
movl 0x14(%rsp), %eax
movl %eax, 0x8(%r12)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x86bcf
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movl %ebp, %edx
xorl %r8d, %r8d
callq 0x84e26
jmp 0x86df0
| bf_divrem:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov ebp, r9d
mov [rsp+0A8h+var_88], r8
mov r13, rcx
mov r15, rdx
mov rbx, rsi
mov r12, rdi
mov r14, 7FFFFFFFFFFFFFFFh
mov rcx, [rdx+18h]
test rcx, rcx
jz short loc_86B57
mov rax, [r13+18h]
test rax, rax
jz short loc_86B57
mov [rsp+0A8h+var_9C], ebp
mov edi, [rsp+0A8h+arg_0]
mov esi, [r15+8]
mov r9d, [r13+8]
xor r9d, esi
xor edx, edx
mov [rsp+0A8h+var_90], rdi
add edi, 0FFFFFFFEh; switch 5 cases
mov r8d, 0
cmp edi, 4
ja def_86B4D; jumptable 0000000000086B4D default case, case 4
lea r8, jpt_86B4D
movsxd rdi, ds:(jpt_86B4D - 0A28A0h)[r8+rdi*4]
add rdi, r8
xor r8d, r8d
jmp rdi; switch jump
loc_86B4F:
mov r8d, r9d; jumptable 0000000000086B4D case 2
jmp def_86B4D; jumptable 0000000000086B4D default case, case 4
loc_86B57:
cmp qword ptr [r12+18h], 0
jz short loc_86B7E
mov rax, [r12]
mov rsi, [r12+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [r12+20h], rax
mov qword ptr [r12+18h], 0
loc_86B7E:
lea rax, [r14+1]
mov [r12+10h], rax
mov dword ptr [r12+8], 0
mov rcx, [r15+10h]
cmp rcx, r14
jz short loc_86BA2
mov rdx, [r13+10h]
cmp rdx, r14
jnz short loc_86BD6
loc_86BA2:
cmp qword ptr [rbx+18h], 0
jz short loc_86BC4
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_86BC4:
mov [rbx+10h], r14
mov dword ptr [rbx+8], 0
loc_86BCF:
xor eax, eax
jmp loc_86DF0
loc_86BD6:
lea rsi, [r14-1]
cmp rcx, rsi
setnz cl
cmp rdx, rax
setnz al
test cl, al
jnz loc_86E98
cmp qword ptr [rbx+18h], 0
jz short loc_86C10
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_86C10:
mov [rbx+10h], r14
mov dword ptr [rbx+8], 0
mov eax, 1
jmp loc_86DF0
loc_86C25:
mov r8d, 1; jumptable 0000000000086B4D case 5
jmp short def_86B4D; jumptable 0000000000086B4D default case, case 4
loc_86C2D:
mov r8d, r9d; jumptable 0000000000086B4D case 3
xor r8d, 1
jmp short def_86B4D; jumptable 0000000000086B4D default case, case 4
loc_86C36:
mov r8d, esi; jumptable 0000000000086B4D case 6
def_86B4D:
mov [rsp+0A8h+var_98], r8d; jumptable 0000000000086B4D default case, case 4
mov [rsp+0A8h+var_94], r9d
mov rbp, [r15+10h]
lea rdi, [rsp+0A8h+var_58]
mov [rdi+10h], rbp
mov rsi, [r15+20h]
mov [rdi+20h], rsi
mov [rdi+18h], rcx
mov [rdi+8], edx
mov r14, [r13+10h]
lea rsi, [rsp+0A8h+var_80]
mov [rsi+10h], r14
mov rcx, [r13+20h]
mov [rsi+20h], rcx
mov [rsi+18h], rax
mov [rsi+8], edx
call bf_cmpu
test eax, eax
js loc_86D25
sub rbp, r14
cmp rbp, 2
mov ecx, 1
cmovge rcx, rbp
inc rcx
lea r9, __bf_div
lea rsi, [rsp+0A8h+var_58]
lea rdx, [rsp+0A8h+var_80]
mov rdi, r12
mov r8d, 1
call bf_op2
mov rcx, [r12+18h]
test rcx, rcx
jz short loc_86CD6
mov rdi, r12
xor esi, esi
mov edx, 11h
xor r8d, r8d
call __bf_round
loc_86CD6:
lea rdx, [rsp+0A8h+var_80]
mov r13, 3FFFFFFFFFFFFFFFh
mov rdi, rbx
mov rsi, r12
mov rcx, r13
mov r8d, 1
call bf_mul
lea r9, __bf_sub
lea rsi, [rsp+0A8h+var_58]
mov rdi, rbx
mov rdx, rbx
mov rcx, r13
mov r8d, 1
call bf_op2
mov r14, 7FFFFFFFFFFFFFFFh
jmp short loc_86D75
loc_86D25:
mov dword ptr [r12+8], 0
mov r14, 7FFFFFFFFFFFFFFFh
lea rax, [r14+1]
mov [r12+10h], rax
cmp qword ptr [r12+18h], 0
jz short loc_86D68
mov rax, [r12]
mov rsi, [r12+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [r12+20h], rax
mov qword ptr [r12+18h], 0
loc_86D68:
lea rsi, [rsp+0A8h+var_58]
mov rdi, rbx
call bf_set
loc_86D75:
mov ebp, [rsp+0A8h+var_9C]
mov r13, [r12+10h]
cmp r13, r14
jz short loc_86D89
cmp [rbx+10h], r14
jnz short loc_86DFF
loc_86D89:
cmp qword ptr [r12+18h], 0
jz short loc_86DB0
mov rax, [r12]
mov rsi, [r12+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [r12+20h], rax
mov qword ptr [r12+18h], 0
loc_86DB0:
mov [r12+10h], r14
mov dword ptr [r12+8], 0
cmp qword ptr [rbx+18h], 0
jz short loc_86DE0
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_86DE0:
mov [rbx+10h], r14
mov dword ptr [rbx+8], 0
mov eax, 20h ; ' '
loc_86DF0:
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_86DFF:
cmp qword ptr [rbx+18h], 0
jz loc_86F2C
test dword ptr [rsp+0A8h+var_90], 0FFFFFFFBh
jnz loc_86ED0
lea r14, [rsp+0A8h+var_80]
mov rbp, [r14+10h]
lea rax, [rbp-1]
mov [r14+10h], rax
mov rdi, rbx
mov rsi, r14
call bf_cmpu
mov [r14+10h], rbp
mov ebp, [rsp+0A8h+var_9C]
mov r14, 7FFFFFFFFFFFFFFFh
test eax, eax
jg loc_86ED7
jnz loc_86F2C
cmp dword ptr [rsp+0A8h+var_90], 4
jz short loc_86ED7
mov rdx, [r12+18h]
mov rax, rdx
shl rax, 6
sub rax, r13
mov rcx, rax
sar rcx, 6
sets sil
cmp rcx, rdx
setnb dl
or dl, sil
jnz loc_86F2C
mov rdx, [r12+20h]
mov rcx, [rdx+rcx*8]
bt rcx, rax
jb short loc_86ED7
jmp loc_86F2C
loc_86E98:
mov rdi, rbx
mov rsi, r15
call bf_set
mov rcx, [rbx+18h]
test rcx, rcx
jz loc_86BCF
mov rdi, rbx
mov rsi, [rsp+0A8h+var_88]
mov edx, ebp
xor r8d, r8d
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp __bf_round
loc_86ED0:
cmp [rsp+0A8h+var_98], 0
jz short loc_86F2C
loc_86ED7:
mov rcx, 3FFFFFFFFFFFFFFFh
mov edx, 1
mov rdi, r12
mov rsi, r12
mov r8d, 1
call bf_add_si
mov r13d, eax
lea r9, __bf_sub
lea rdx, [rsp+0A8h+var_80]
mov rdi, rbx
mov rsi, rbx
mov rcx, 3FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_op2
or eax, r13d
test al, 20h
jnz loc_86D89
loc_86F2C:
mov eax, [r15+8]
xor [rbx+8], eax
mov eax, [rsp+0A8h+var_94]
mov [r12+8], eax
mov rcx, [rbx+18h]
test rcx, rcx
jz loc_86BCF
mov rdi, rbx
mov rsi, [rsp+0A8h+var_88]
mov edx, ebp
xor r8d, r8d
call __bf_round
jmp loc_86DF0
| long long bf_divrem(_QWORD **a1, __int128 *a2, long long a3, long long a4, long long a5, unsigned int a6, int a7)
{
long long v11; // rcx
long long v12; // rax
int v13; // esi
int v14; // r8d
long long v15; // rcx
long long v16; // rdx
long long v18; // rbp
long long v19; // r14
long long v20; // rbp
long long v21; // rcx
unsigned long long v22; // rcx
unsigned int v23; // ebp
_QWORD *v24; // r13
long long v25; // rbp
int v26; // eax
long long v27; // rcx
long long v28; // rcx
unsigned long long v29; // rcx
unsigned __int8 v30; // r13
unsigned long long v31; // rcx
int v33; // [rsp+10h] [rbp-98h]
int v34; // [rsp+14h] [rbp-94h]
long long v36; // [rsp+28h] [rbp-80h] BYREF
int v37; // [rsp+30h] [rbp-78h]
long long v38; // [rsp+38h] [rbp-70h]
long long v39; // [rsp+40h] [rbp-68h]
long long v40; // [rsp+48h] [rbp-60h]
long long v41; // [rsp+50h] [rbp-58h] BYREF
int v42; // [rsp+58h] [rbp-50h]
long long v43; // [rsp+60h] [rbp-48h]
long long v44; // [rsp+68h] [rbp-40h]
long long v45; // [rsp+70h] [rbp-38h]
v11 = *(_QWORD *)(a3 + 24);
if ( v11 )
{
v12 = *(_QWORD *)(a4 + 24);
if ( v12 )
{
v13 = *(_DWORD *)(a3 + 8);
v14 = 0;
switch ( a7 )
{
case 2:
v14 = v13 ^ *(_DWORD *)(a4 + 8);
break;
case 3:
v14 = v13 ^ *(_DWORD *)(a4 + 8) ^ 1;
break;
case 5:
v14 = 1;
break;
case 6:
v14 = *(_DWORD *)(a3 + 8);
break;
default:
break;
}
v33 = v14;
v34 = v13 ^ *(_DWORD *)(a4 + 8);
v18 = *(_QWORD *)(a3 + 16);
v43 = v18;
v45 = *(_QWORD *)(a3 + 32);
v44 = v11;
v42 = 0;
v19 = *(_QWORD *)(a4 + 16);
v38 = v19;
v40 = *(_QWORD *)(a4 + 32);
v39 = v12;
v37 = 0;
if ( (int)bf_cmpu(&v41, &v36) < 0 )
{
*((_DWORD *)a1 + 2) = 0;
a1[2] = (_QWORD *)0x8000000000000000LL;
if ( a1[3] )
{
a1[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL);
a1[3] = 0LL;
}
bf_set(a2, (long long)&v41);
}
else
{
v20 = v18 - v19;
v21 = 1LL;
if ( v20 >= 2 )
v21 = v20;
bf_op2(a1, &v41, &v36, v21 + 1, 1LL, _bf_div);
v22 = (unsigned long long)a1[3];
if ( v22 )
_bf_round((long long)a1, 0LL, 17LL, v22, 0);
bf_mul(a2, (long long)a1, (long long)&v36, 0x3FFFFFFFFFFFFFFFLL, 1u);
bf_op2(a2, &v41, a2, 0x3FFFFFFFFFFFFFFFLL, 1LL, _bf_sub);
}
v23 = a6;
v24 = a1[2];
if ( v24 == (_QWORD *)0x7FFFFFFFFFFFFFFFLL || *((_QWORD *)a2 + 2) == 0x7FFFFFFFFFFFFFFFLL )
goto LABEL_31;
if ( !*((_QWORD *)a2 + 3) )
goto LABEL_48;
if ( (a7 & 0xFFFFFFFB) != 0 )
{
if ( !v33 )
goto LABEL_48;
}
else
{
v25 = v38--;
v26 = bf_cmpu(a2, &v36);
v38 = v25;
v23 = a6;
if ( v26 <= 0 )
{
if ( v26
|| a7 != 4
&& ((v27 = (long long)(((_QWORD)a1[3] << 6) - (_QWORD)v24) >> 6, v27 < 0 || v27 >= (unsigned long long)a1[3])
|| (v28 = a1[4][v27], !_bittest64(&v28, ((_QWORD)a1[3] << 6) - (_QWORD)v24))) )
{
LABEL_48:
*((_DWORD *)a2 + 2) ^= *(_DWORD *)(a3 + 8);
*((_DWORD *)a1 + 2) = v34;
v31 = *((_QWORD *)a2 + 3);
if ( v31 )
return _bf_round((long long)a2, a5, v23, v31, 0);
return 0LL;
}
}
}
v30 = bf_add_si(a1, a1, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1LL);
if ( ((v30 | (unsigned __int8)bf_op2(a2, a2, &v36, 0x3FFFFFFFFFFFFFFFLL, 1LL, _bf_sub)) & 0x20) != 0 )
{
LABEL_31:
if ( a1[3] )
{
a1[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL);
a1[3] = 0LL;
}
a1[2] = (_QWORD *)0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a1 + 2) = 0;
if ( *((_QWORD *)a2 + 3) )
{
*((_QWORD *)a2 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a2 + 8LL))(
**(_QWORD **)a2,
*((_QWORD *)a2 + 4),
0LL);
*((_QWORD *)a2 + 3) = 0LL;
}
*((_QWORD *)a2 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a2 + 2) = 0;
return 32LL;
}
goto LABEL_48;
}
}
if ( a1[3] )
{
a1[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL);
a1[3] = 0LL;
}
a1[2] = (_QWORD *)0x8000000000000000LL;
*((_DWORD *)a1 + 2) = 0;
v15 = *(_QWORD *)(a3 + 16);
if ( v15 == 0x7FFFFFFFFFFFFFFFLL || (v16 = *(_QWORD *)(a4 + 16), v16 == 0x7FFFFFFFFFFFFFFFLL) )
{
if ( *((_QWORD *)a2 + 3) )
{
*((_QWORD *)a2 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a2 + 8LL))(
**(_QWORD **)a2,
*((_QWORD *)a2 + 4),
0LL);
*((_QWORD *)a2 + 3) = 0LL;
}
*((_QWORD *)a2 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a2 + 2) = 0;
return 0LL;
}
if ( v16 != 0x8000000000000000LL && v15 != 0x7FFFFFFFFFFFFFFELL )
{
bf_set(a2, a3);
v29 = *((_QWORD *)a2 + 3);
if ( v29 )
return _bf_round((long long)a2, a5, a6, v29, 0);
return 0LL;
}
if ( *((_QWORD *)a2 + 3) )
{
*((_QWORD *)a2 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a2 + 8LL))(
**(_QWORD **)a2,
*((_QWORD *)a2 + 4),
0LL);
*((_QWORD *)a2 + 3) = 0LL;
}
*((_QWORD *)a2 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a2 + 2) = 0;
return 1LL;
}
| bf_divrem:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV EBP,R9D
MOV qword ptr [RSP + 0x20],R8
MOV R13,RCX
MOV R15,RDX
MOV RBX,RSI
MOV R12,RDI
MOV R14,0x7fffffffffffffff
MOV RCX,qword ptr [RDX + 0x18]
TEST RCX,RCX
JZ 0x00186b57
MOV RAX,qword ptr [R13 + 0x18]
TEST RAX,RAX
JZ 0x00186b57
MOV dword ptr [RSP + 0xc],EBP
MOV EDI,dword ptr [RSP + 0xb0]
MOV ESI,dword ptr [R15 + 0x8]
MOV R9D,dword ptr [R13 + 0x8]
XOR R9D,ESI
XOR EDX,EDX
MOV qword ptr [RSP + 0x18],RDI
ADD EDI,-0x2
MOV R8D,0x0
CMP EDI,0x4
JA 0x00186c39
LEA R8,[0x1a28a0]
MOVSXD RDI,dword ptr [R8 + RDI*0x4]
ADD RDI,R8
XOR R8D,R8D
switchD:
JMP RDI
caseD_2:
MOV R8D,R9D
JMP 0x00186c39
LAB_00186b57:
CMP qword ptr [R12 + 0x18],0x0
JZ 0x00186b7e
MOV RAX,qword ptr [R12]
MOV RSI,qword ptr [R12 + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [R12 + 0x20],RAX
MOV qword ptr [R12 + 0x18],0x0
LAB_00186b7e:
LEA RAX,[R14 + 0x1]
MOV qword ptr [R12 + 0x10],RAX
MOV dword ptr [R12 + 0x8],0x0
MOV RCX,qword ptr [R15 + 0x10]
CMP RCX,R14
JZ 0x00186ba2
MOV RDX,qword ptr [R13 + 0x10]
CMP RDX,R14
JNZ 0x00186bd6
LAB_00186ba2:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x00186bc4
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_00186bc4:
MOV qword ptr [RBX + 0x10],R14
MOV dword ptr [RBX + 0x8],0x0
LAB_00186bcf:
XOR EAX,EAX
JMP 0x00186df0
LAB_00186bd6:
LEA RSI,[R14 + -0x1]
CMP RCX,RSI
SETNZ CL
CMP RDX,RAX
SETNZ AL
TEST CL,AL
JNZ 0x00186e98
CMP qword ptr [RBX + 0x18],0x0
JZ 0x00186c10
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_00186c10:
MOV qword ptr [RBX + 0x10],R14
MOV dword ptr [RBX + 0x8],0x0
MOV EAX,0x1
JMP 0x00186df0
caseD_5:
MOV R8D,0x1
JMP 0x00186c39
caseD_3:
MOV R8D,R9D
XOR R8D,0x1
JMP 0x00186c39
caseD_6:
MOV R8D,ESI
caseD_4:
MOV dword ptr [RSP + 0x10],R8D
MOV dword ptr [RSP + 0x14],R9D
MOV RBP,qword ptr [R15 + 0x10]
LEA RDI,[RSP + 0x50]
MOV qword ptr [RDI + 0x10],RBP
MOV RSI,qword ptr [R15 + 0x20]
MOV qword ptr [RDI + 0x20],RSI
MOV qword ptr [RDI + 0x18],RCX
MOV dword ptr [RDI + 0x8],EDX
MOV R14,qword ptr [R13 + 0x10]
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI + 0x10],R14
MOV RCX,qword ptr [R13 + 0x20]
MOV qword ptr [RSI + 0x20],RCX
MOV qword ptr [RSI + 0x18],RAX
MOV dword ptr [RSI + 0x8],EDX
CALL 0x0018542a
TEST EAX,EAX
JS 0x00186d25
SUB RBP,R14
CMP RBP,0x2
MOV ECX,0x1
CMOVGE RCX,RBP
INC RCX
LEA R9,[0x187bf3]
LEA RSI,[RSP + 0x50]
LEA RDX,[RSP + 0x28]
MOV RDI,R12
MOV R8D,0x1
CALL 0x00187b3a
MOV RCX,qword ptr [R12 + 0x18]
TEST RCX,RCX
JZ 0x00186cd6
MOV RDI,R12
XOR ESI,ESI
MOV EDX,0x11
XOR R8D,R8D
CALL 0x00184e26
LAB_00186cd6:
LEA RDX,[RSP + 0x28]
MOV R13,0x3fffffffffffffff
MOV RDI,RBX
MOV RSI,R12
MOV RCX,R13
MOV R8D,0x1
CALL 0x00186711
LEA R9,[0x187bdc]
LEA RSI,[RSP + 0x50]
MOV RDI,RBX
MOV RDX,RBX
MOV RCX,R13
MOV R8D,0x1
CALL 0x00187b3a
MOV R14,0x7fffffffffffffff
JMP 0x00186d75
LAB_00186d25:
MOV dword ptr [R12 + 0x8],0x0
MOV R14,0x7fffffffffffffff
LEA RAX,[R14 + 0x1]
MOV qword ptr [R12 + 0x10],RAX
CMP qword ptr [R12 + 0x18],0x0
JZ 0x00186d68
MOV RAX,qword ptr [R12]
MOV RSI,qword ptr [R12 + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [R12 + 0x20],RAX
MOV qword ptr [R12 + 0x18],0x0
LAB_00186d68:
LEA RSI,[RSP + 0x50]
MOV RDI,RBX
CALL 0x00184c8d
LAB_00186d75:
MOV EBP,dword ptr [RSP + 0xc]
MOV R13,qword ptr [R12 + 0x10]
CMP R13,R14
JZ 0x00186d89
CMP qword ptr [RBX + 0x10],R14
JNZ 0x00186dff
LAB_00186d89:
CMP qword ptr [R12 + 0x18],0x0
JZ 0x00186db0
MOV RAX,qword ptr [R12]
MOV RSI,qword ptr [R12 + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [R12 + 0x20],RAX
MOV qword ptr [R12 + 0x18],0x0
LAB_00186db0:
MOV qword ptr [R12 + 0x10],R14
MOV dword ptr [R12 + 0x8],0x0
CMP qword ptr [RBX + 0x18],0x0
JZ 0x00186de0
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_00186de0:
MOV qword ptr [RBX + 0x10],R14
MOV dword ptr [RBX + 0x8],0x0
MOV EAX,0x20
LAB_00186df0:
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00186dff:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x00186f2c
TEST dword ptr [RSP + 0x18],0xfffffffb
JNZ 0x00186ed0
LEA R14,[RSP + 0x28]
MOV RBP,qword ptr [R14 + 0x10]
LEA RAX,[RBP + -0x1]
MOV qword ptr [R14 + 0x10],RAX
MOV RDI,RBX
MOV RSI,R14
CALL 0x0018542a
MOV qword ptr [R14 + 0x10],RBP
MOV EBP,dword ptr [RSP + 0xc]
MOV R14,0x7fffffffffffffff
TEST EAX,EAX
JG 0x00186ed7
JNZ 0x00186f2c
CMP dword ptr [RSP + 0x18],0x4
JZ 0x00186ed7
MOV RDX,qword ptr [R12 + 0x18]
MOV RAX,RDX
SHL RAX,0x6
SUB RAX,R13
MOV RCX,RAX
SAR RCX,0x6
SETS SIL
CMP RCX,RDX
SETNC DL
OR DL,SIL
JNZ 0x00186f2c
MOV RDX,qword ptr [R12 + 0x20]
MOV RCX,qword ptr [RDX + RCX*0x8]
BT RCX,RAX
JC 0x00186ed7
JMP 0x00186f2c
LAB_00186e98:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00184c8d
MOV RCX,qword ptr [RBX + 0x18]
TEST RCX,RCX
JZ 0x00186bcf
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x20]
MOV EDX,EBP
XOR R8D,R8D
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00184e26
LAB_00186ed0:
CMP dword ptr [RSP + 0x10],0x0
JZ 0x00186f2c
LAB_00186ed7:
MOV RCX,0x3fffffffffffffff
MOV EDX,0x1
MOV RDI,R12
MOV RSI,R12
MOV R8D,0x1
CALL 0x00186f60
MOV R13D,EAX
LEA R9,[0x187bdc]
LEA RDX,[RSP + 0x28]
MOV RDI,RBX
MOV RSI,RBX
MOV RCX,0x3fffffffffffffff
MOV R8D,0x1
CALL 0x00187b3a
OR EAX,R13D
TEST AL,0x20
JNZ 0x00186d89
LAB_00186f2c:
MOV EAX,dword ptr [R15 + 0x8]
XOR dword ptr [RBX + 0x8],EAX
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [R12 + 0x8],EAX
MOV RCX,qword ptr [RBX + 0x18]
TEST RCX,RCX
JZ 0x00186bcf
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x20]
MOV EDX,EBP
XOR R8D,R8D
CALL 0x00184e26
JMP 0x00186df0
|
int8
bf_divrem(long *param_1,long *param_2,long param_3,long param_4,int8 param_5,
int4 param_6,uint param_7)
{
int iVar1;
uint uVar2;
uint uVar3;
ulong uVar4;
int8 uVar5;
long lVar6;
ulong uVar7;
long lVar8;
uint uVar9;
int1 local_80 [8];
int4 local_78;
long local_70;
long local_68;
int8 local_60;
int1 local_58 [8];
int4 local_50;
long local_48;
long local_40;
int8 local_38;
local_40 = *(long *)(param_3 + 0x18);
if ((local_40 == 0) || (local_68 = *(long *)(param_4 + 0x18), local_68 == 0)) {
if (param_1[3] != 0) {
lVar8 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar8;
param_1[3] = 0;
}
param_1[2] = -0x8000000000000000;
*(int4 *)(param_1 + 1) = 0;
if ((*(long *)(param_3 + 0x10) == 0x7fffffffffffffff) ||
(*(long *)(param_4 + 0x10) == 0x7fffffffffffffff)) {
if (param_2[3] != 0) {
lVar8 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0);
param_2[4] = lVar8;
param_2[3] = 0;
}
param_2[2] = 0x7fffffffffffffff;
*(int4 *)(param_2 + 1) = 0;
return 0;
}
if (*(long *)(param_3 + 0x10) == 0x7ffffffffffffffe ||
*(long *)(param_4 + 0x10) == -0x8000000000000000) {
if (param_2[3] != 0) {
lVar8 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0);
param_2[4] = lVar8;
param_2[3] = 0;
}
param_2[2] = 0x7fffffffffffffff;
*(int4 *)(param_2 + 1) = 0;
return 1;
}
bf_set(param_2,param_3);
if (param_2[3] == 0) {
return 0;
}
uVar5 = __bf_round(param_2,param_5,param_6,param_2[3],0);
return uVar5;
}
uVar9 = *(uint *)(param_4 + 8) ^ *(uint *)(param_3 + 8);
uVar2 = 0;
switch(param_7) {
case 2:
uVar2 = uVar9;
break;
case 3:
uVar2 = uVar9 ^ 1;
break;
case 5:
uVar2 = 1;
break;
case 6:
uVar2 = *(uint *)(param_3 + 8);
}
lVar8 = *(long *)(param_3 + 0x10);
local_38 = *(int8 *)(param_3 + 0x20);
local_50 = 0;
lVar6 = *(long *)(param_4 + 0x10);
local_60 = *(int8 *)(param_4 + 0x20);
local_78 = 0;
local_70 = lVar6;
local_48 = lVar8;
iVar1 = bf_cmpu();
if (iVar1 < 0) {
*(int4 *)(param_1 + 1) = 0;
param_1[2] = -0x8000000000000000;
if (param_1[3] != 0) {
lVar8 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar8;
param_1[3] = 0;
}
bf_set(param_2,local_58);
}
else {
lVar8 = lVar8 - lVar6;
lVar6 = 1;
if (1 < lVar8) {
lVar6 = lVar8;
}
bf_op2(param_1,local_58,local_80,lVar6 + 1,1,__bf_div);
if (param_1[3] != 0) {
__bf_round(param_1,0,0x11,param_1[3],0);
}
bf_mul(param_2,param_1,local_80,0x3fffffffffffffff,1);
bf_op2(param_2,local_58,param_2,0x3fffffffffffffff,1,__bf_sub);
}
lVar6 = local_70;
lVar8 = param_1[2];
if ((lVar8 != 0x7fffffffffffffff) && (param_2[2] != 0x7fffffffffffffff)) {
local_70 = lVar6;
if (param_2[3] != 0) {
if ((param_7 & 0xfffffffb) == 0) {
local_70 = local_70 + -1;
iVar1 = bf_cmpu(param_2,local_80);
if (iVar1 < 1) {
local_70 = lVar6;
if (iVar1 != 0) goto LAB_00186f2c;
if (param_7 != 4) {
uVar4 = param_1[3] * 0x40 - lVar8;
uVar7 = (long)uVar4 >> 6;
if (((ulong)param_1[3] <= uVar7 || (long)uVar7 < 0) ||
((*(ulong *)(param_1[4] + uVar7 * 8) >> (uVar4 & 0x3f) & 1) == 0)) goto LAB_00186f2c;
}
}
}
else if (uVar2 == 0) goto LAB_00186f2c;
local_70 = lVar6;
uVar2 = bf_add_si(param_1,param_1,1,0x3fffffffffffffff,1);
uVar3 = bf_op2(param_2,param_2,local_80,0x3fffffffffffffff,1,__bf_sub);
if (((uVar3 | uVar2) & 0x20) != 0) goto LAB_00186d89;
}
LAB_00186f2c:
*(uint *)(param_2 + 1) = *(uint *)(param_2 + 1) ^ *(uint *)(param_3 + 8);
*(uint *)(param_1 + 1) = uVar9;
if (param_2[3] == 0) {
return 0;
}
uVar5 = __bf_round(param_2,param_5,param_6,param_2[3],0);
return uVar5;
}
LAB_00186d89:
if (param_1[3] != 0) {
lVar8 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar8;
param_1[3] = 0;
}
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
if (param_2[3] != 0) {
lVar8 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0);
param_2[4] = lVar8;
param_2[3] = 0;
}
param_2[2] = 0x7fffffffffffffff;
*(int4 *)(param_2 + 1) = 0;
return 0x20;
}
| |
52,502 | bf_divrem | bluesky950520[P]quickjs/libbf.c | int bf_divrem(bf_t *q, bf_t *r, const bf_t *a, const bf_t *b,
limb_t prec, bf_flags_t flags, int rnd_mode)
{
bf_t a1_s, *a1 = &a1_s;
bf_t b1_s, *b1 = &b1_s;
int q_sign, ret;
BOOL is_ceil, is_rndn;
assert(q != a && q != b);
assert(r != a && r != b);
assert(q != r);
if (a->len == 0 || b->len == 0) {
bf_set_zero(q, 0);
if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF || b->expn == BF_EXP_ZERO) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_set(r, a);
return bf_round(r, prec, flags);
}
}
q_sign = a->sign ^ b->sign;
is_rndn = (rnd_mode == BF_RNDN || rnd_mode == BF_RNDNA);
switch(rnd_mode) {
default:
case BF_RNDZ:
case BF_RNDN:
case BF_RNDNA:
is_ceil = FALSE;
break;
case BF_RNDD:
is_ceil = q_sign;
break;
case BF_RNDU:
is_ceil = q_sign ^ 1;
break;
case BF_RNDA:
is_ceil = TRUE;
break;
case BF_DIVREM_EUCLIDIAN:
is_ceil = a->sign;
break;
}
a1->expn = a->expn;
a1->tab = a->tab;
a1->len = a->len;
a1->sign = 0;
b1->expn = b->expn;
b1->tab = b->tab;
b1->len = b->len;
b1->sign = 0;
/* XXX: could improve to avoid having a large 'q' */
bf_tdivremu(q, r, a1, b1);
if (bf_is_nan(q) || bf_is_nan(r))
goto fail;
if (r->len != 0) {
if (is_rndn) {
int res;
b1->expn--;
res = bf_cmpu(r, b1);
b1->expn++;
if (res > 0 ||
(res == 0 &&
(rnd_mode == BF_RNDNA ||
get_bit(q->tab, q->len, q->len * LIMB_BITS - q->expn)))) {
goto do_sub_r;
}
} else if (is_ceil) {
do_sub_r:
ret = bf_add_si(q, q, 1, BF_PREC_INF, BF_RNDZ);
ret |= bf_sub(r, r, b1, BF_PREC_INF, BF_RNDZ);
if (ret & BF_ST_MEM_ERROR)
goto fail;
}
}
r->sign ^= a->sign;
q->sign = q_sign;
return bf_round(r, prec, flags);
fail:
bf_set_nan(q);
bf_set_nan(r);
return BF_ST_MEM_ERROR;
} | O3 | c | bf_divrem:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, %ebp
movq %r8, 0x18(%rsp)
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
movabsq $0x7fffffffffffffff, %r14 # imm = 0x7FFFFFFFFFFFFFFF
movq 0x18(%rdx), %rcx
testq %rcx, %rcx
je 0x895b7
movq 0x18(%r13), %rax
testq %rax, %rax
je 0x895b7
movl %ebp, 0x8(%rsp)
movl 0xb0(%rsp), %edi
movl 0x8(%r12), %esi
movl 0x8(%r13), %r9d
xorl %esi, %r9d
xorl %edx, %edx
movq %rdi, 0x10(%rsp)
addl $-0x2, %edi
movl $0x0, %r8d
cmpl $0x4, %edi
ja 0x89693
leaq 0x1c2ad(%rip), %r8 # 0xa5850
movslq (%r8,%rdi,4), %rdi
addq %r8, %rdi
xorl %r8d, %r8d
jmpq *%rdi
movl %r9d, %r8d
jmp 0x89693
cmpq $0x0, 0x18(%r15)
je 0x895d9
movq (%r15), %rax
movq 0x20(%r15), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%r15)
movq $0x0, 0x18(%r15)
leaq 0x1(%r14), %rax
movq %rax, 0x10(%r15)
movl $0x0, 0x8(%r15)
movq 0x10(%r12), %rcx
cmpq %r14, %rcx
je 0x895fc
movq 0x10(%r13), %rdx
cmpq %r14, %rdx
jne 0x89630
cmpq $0x0, 0x18(%rbx)
je 0x8961e
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r14, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
xorl %eax, %eax
jmp 0x8983c
leaq -0x1(%r14), %rsi
cmpq %rsi, %rcx
setne %cl
cmpq %rax, %rdx
setne %al
testb %al, %cl
jne 0x898fa
cmpq $0x0, 0x18(%rbx)
je 0x8966a
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r14, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x1, %eax
jmp 0x8983c
movl $0x1, %r8d
jmp 0x89693
movl %r9d, %r8d
xorl $0x1, %r8d
jmp 0x89693
movl %esi, %r8d
movl %r8d, 0xc(%rsp)
movl %r9d, 0x4(%rsp)
movq 0x10(%r12), %rbp
leaq 0x50(%rsp), %rdi
movq %rbp, 0x10(%rdi)
movq 0x20(%r12), %rsi
movq %rsi, 0x20(%rdi)
movq %rcx, 0x18(%rdi)
movl %edx, 0x8(%rdi)
movq 0x10(%r13), %r14
leaq 0x28(%rsp), %rsi
movq %r14, 0x10(%rsi)
movq 0x20(%r13), %rcx
movq %rcx, 0x20(%rsi)
movq %rax, 0x18(%rsi)
movl %edx, 0x8(%rsi)
callq 0x87e60
testl %eax, %eax
js 0x89780
subq %r14, %rbp
cmpq $0x2, %rbp
movl $0x1, %ecx
cmovgeq %rbp, %rcx
incq %rcx
leaq 0xff4(%rip), %r9 # 0x8a6f2
leaq 0x50(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %r15, %rdi
movl $0x1, %r8d
callq 0x8a639
movq 0x18(%r15), %rcx
testq %rcx, %rcx
je 0x89731
movq %r15, %rdi
xorl %esi, %esi
movl $0x11, %edx
xorl %r8d, %r8d
callq 0x8787f
leaq 0x28(%rsp), %rdx
movabsq $0x3fffffffffffffff, %r13 # imm = 0x3FFFFFFFFFFFFFFF
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rcx
movl $0x1, %r8d
callq 0x89178
leaq 0xf80(%rip), %r9 # 0x8a6db
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
movq %rbx, %rdx
movq %r13, %rcx
movl $0x1, %r8d
callq 0x8a639
movabsq $0x7fffffffffffffff, %r14 # imm = 0x7FFFFFFFFFFFFFFF
jmp 0x897c9
movl $0x0, 0x8(%r15)
movabsq $0x7fffffffffffffff, %r14 # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x1(%r14), %rax
movq %rax, 0x10(%r15)
cmpq $0x0, 0x18(%r15)
je 0x897bc
movq (%r15), %rax
movq 0x20(%r15), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%r15)
movq $0x0, 0x18(%r15)
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x876d6
movl 0x8(%rsp), %ebp
movq 0x10(%r15), %r13
cmpq %r14, %r13
je 0x897dc
cmpq %r14, 0x10(%rbx)
jne 0x8984b
cmpq $0x0, 0x18(%r15)
je 0x897fe
movq (%r15), %rax
movq 0x20(%r15), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%r15)
movq $0x0, 0x18(%r15)
movq %r14, 0x10(%r15)
movl $0x0, 0x8(%r15)
cmpq $0x0, 0x18(%rbx)
je 0x8982c
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r14, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x20, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x89932
movq %rax, 0x20(%rsp)
testl $0xfffffffb, 0x10(%rsp) # imm = 0xFFFFFFFB
jne 0x89947
leaq 0x28(%rsp), %r14
movq 0x10(%r14), %rbp
leaq -0x1(%rbp), %rax
movq %rax, 0x10(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x87e60
movq %rbp, 0x10(%r14)
movl 0x8(%rsp), %ebp
movabsq $0x7fffffffffffffff, %r14 # imm = 0x7FFFFFFFFFFFFFFF
testl %eax, %eax
jg 0x8994e
jne 0x898e0
cmpl $0x4, 0x10(%rsp)
je 0x8994e
movq 0x18(%r15), %rdx
movq %rdx, %rax
shlq $0x6, %rax
subq %r13, %rax
movq %rax, %rcx
sarq $0x6, %rcx
sets %sil
cmpq %rdx, %rcx
setae %dl
orb %sil, %dl
jne 0x898e0
movq 0x20(%r15), %rdx
movq (%rdx,%rcx,8), %rcx
btq %rax, %rcx
jb 0x8994e
movl 0x8(%r12), %eax
xorl %eax, 0x8(%rbx)
movl 0x4(%rsp), %eax
movl %eax, 0x8(%r15)
movq 0x20(%rsp), %rcx
jmp 0x899c0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x876d6
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x89629
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movl %ebp, %edx
xorl %r8d, %r8d
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8787f
movl 0x8(%r12), %eax
xorl %eax, 0x8(%rbx)
movl 0x4(%rsp), %eax
movl %eax, 0x8(%r15)
jmp 0x89629
cmpl $0x0, 0xc(%rsp)
je 0x898e0
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %edx
movq %r15, %rdi
movq %r15, %rsi
movl $0x1, %r8d
callq 0x899d7
movl %eax, %r13d
leaq 0xd63(%rip), %r9 # 0x8a6db
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movq %rbx, %rsi
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0x8a639
orl %r13d, %eax
testb $0x20, %al
jne 0x897dc
movq 0x18(%rbx), %rcx
movl 0x8(%r12), %eax
xorl %eax, 0x8(%rbx)
movl 0x4(%rsp), %eax
movl %eax, 0x8(%r15)
testq %rcx, %rcx
je 0x89629
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movl %ebp, %edx
xorl %r8d, %r8d
callq 0x8787f
jmp 0x8983c
| bf_divrem:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov ebp, r9d
mov [rsp+0A8h+var_90], r8
mov r13, rcx
mov r12, rdx
mov rbx, rsi
mov r15, rdi
mov r14, 7FFFFFFFFFFFFFFFh
mov rcx, [rdx+18h]
test rcx, rcx
jz short loc_895B7
mov rax, [r13+18h]
test rax, rax
jz short loc_895B7
mov [rsp+0A8h+var_A0], ebp
mov edi, [rsp+0A8h+arg_0]
mov esi, [r12+8]
mov r9d, [r13+8]
xor r9d, esi
xor edx, edx
mov [rsp+0A8h+var_98], rdi
add edi, 0FFFFFFFEh; switch 5 cases
mov r8d, 0
cmp edi, 4
ja def_895AD; jumptable 00000000000895AD default case, case 4
lea r8, jpt_895AD
movsxd rdi, ds:(jpt_895AD - 0A5850h)[r8+rdi*4]
add rdi, r8
xor r8d, r8d
jmp rdi; switch jump
loc_895AF:
mov r8d, r9d; jumptable 00000000000895AD case 2
jmp def_895AD; jumptable 00000000000895AD default case, case 4
loc_895B7:
cmp qword ptr [r15+18h], 0
jz short loc_895D9
mov rax, [r15]
mov rsi, [r15+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [r15+20h], rax
mov qword ptr [r15+18h], 0
loc_895D9:
lea rax, [r14+1]
mov [r15+10h], rax
mov dword ptr [r15+8], 0
mov rcx, [r12+10h]
cmp rcx, r14
jz short loc_895FC
mov rdx, [r13+10h]
cmp rdx, r14
jnz short loc_89630
loc_895FC:
cmp qword ptr [rbx+18h], 0
jz short loc_8961E
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8961E:
mov [rbx+10h], r14
mov dword ptr [rbx+8], 0
loc_89629:
xor eax, eax
jmp loc_8983C
loc_89630:
lea rsi, [r14-1]
cmp rcx, rsi
setnz cl
cmp rdx, rax
setnz al
test cl, al
jnz loc_898FA
cmp qword ptr [rbx+18h], 0
jz short loc_8966A
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8966A:
mov [rbx+10h], r14
mov dword ptr [rbx+8], 0
mov eax, 1
jmp loc_8983C
loc_8967F:
mov r8d, 1; jumptable 00000000000895AD case 5
jmp short def_895AD; jumptable 00000000000895AD default case, case 4
loc_89687:
mov r8d, r9d; jumptable 00000000000895AD case 3
xor r8d, 1
jmp short def_895AD; jumptable 00000000000895AD default case, case 4
loc_89690:
mov r8d, esi; jumptable 00000000000895AD case 6
def_895AD:
mov [rsp+0A8h+var_9C], r8d; jumptable 00000000000895AD default case, case 4
mov [rsp+0A8h+var_A4], r9d
mov rbp, [r12+10h]
lea rdi, [rsp+0A8h+var_58]
mov [rdi+10h], rbp
mov rsi, [r12+20h]
mov [rdi+20h], rsi
mov [rdi+18h], rcx
mov [rdi+8], edx
mov r14, [r13+10h]
lea rsi, [rsp+0A8h+var_80]
mov [rsi+10h], r14
mov rcx, [r13+20h]
mov [rsi+20h], rcx
mov [rsi+18h], rax
mov [rsi+8], edx
call bf_cmpu
test eax, eax
js loc_89780
sub rbp, r14
cmp rbp, 2
mov ecx, 1
cmovge rcx, rbp
inc rcx
lea r9, __bf_div
lea rsi, [rsp+0A8h+var_58]
lea rdx, [rsp+0A8h+var_80]
mov rdi, r15
mov r8d, 1
call bf_op2
mov rcx, [r15+18h]
test rcx, rcx
jz short loc_89731
mov rdi, r15
xor esi, esi
mov edx, 11h
xor r8d, r8d
call __bf_round
loc_89731:
lea rdx, [rsp+0A8h+var_80]
mov r13, 3FFFFFFFFFFFFFFFh
mov rdi, rbx
mov rsi, r15
mov rcx, r13
mov r8d, 1
call bf_mul
lea r9, __bf_sub
lea rsi, [rsp+0A8h+var_58]
mov rdi, rbx
mov rdx, rbx
mov rcx, r13
mov r8d, 1
call bf_op2
mov r14, 7FFFFFFFFFFFFFFFh
jmp short loc_897C9
loc_89780:
mov dword ptr [r15+8], 0
mov r14, 7FFFFFFFFFFFFFFFh
lea rax, [r14+1]
mov [r15+10h], rax
cmp qword ptr [r15+18h], 0
jz short loc_897BC
mov rax, [r15]
mov rsi, [r15+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [r15+20h], rax
mov qword ptr [r15+18h], 0
loc_897BC:
lea rsi, [rsp+0A8h+var_58]
mov rdi, rbx
call bf_set
loc_897C9:
mov ebp, [rsp+0A8h+var_A0]
mov r13, [r15+10h]
cmp r13, r14
jz short loc_897DC
cmp [rbx+10h], r14
jnz short loc_8984B
loc_897DC:
cmp qword ptr [r15+18h], 0
jz short loc_897FE
mov rax, [r15]
mov rsi, [r15+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [r15+20h], rax
mov qword ptr [r15+18h], 0
loc_897FE:
mov [r15+10h], r14
mov dword ptr [r15+8], 0
cmp qword ptr [rbx+18h], 0
jz short loc_8982C
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8982C:
mov [rbx+10h], r14
mov dword ptr [rbx+8], 0
mov eax, 20h ; ' '
loc_8983C:
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8984B:
mov rax, [rbx+18h]
test rax, rax
jz loc_89932
mov [rsp+0A8h+var_88], rax
test dword ptr [rsp+0A8h+var_98], 0FFFFFFFBh
jnz loc_89947
lea r14, [rsp+0A8h+var_80]
mov rbp, [r14+10h]
lea rax, [rbp-1]
mov [r14+10h], rax
mov rdi, rbx
mov rsi, r14
call bf_cmpu
mov [r14+10h], rbp
mov ebp, [rsp+0A8h+var_A0]
mov r14, 7FFFFFFFFFFFFFFFh
test eax, eax
jg loc_8994E
jnz short loc_898E0
cmp dword ptr [rsp+0A8h+var_98], 4
jz loc_8994E
mov rdx, [r15+18h]
mov rax, rdx
shl rax, 6
sub rax, r13
mov rcx, rax
sar rcx, 6
sets sil
cmp rcx, rdx
setnb dl
or dl, sil
jnz short loc_898E0
mov rdx, [r15+20h]
mov rcx, [rdx+rcx*8]
bt rcx, rax
jb short loc_8994E
loc_898E0:
mov eax, [r12+8]
xor [rbx+8], eax
mov eax, [rsp+0A8h+var_A4]
mov [r15+8], eax
mov rcx, [rsp+0A8h+var_88]
jmp loc_899C0
loc_898FA:
mov rdi, rbx
mov rsi, r12
call bf_set
mov rcx, [rbx+18h]
test rcx, rcx
jz loc_89629
mov rdi, rbx
mov rsi, [rsp+0A8h+var_90]
mov edx, ebp
xor r8d, r8d
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp __bf_round
loc_89932:
mov eax, [r12+8]
xor [rbx+8], eax
mov eax, [rsp+0A8h+var_A4]
mov [r15+8], eax
jmp loc_89629
loc_89947:
cmp [rsp+0A8h+var_9C], 0
jz short loc_898E0
loc_8994E:
mov rcx, 3FFFFFFFFFFFFFFFh
mov edx, 1
mov rdi, r15
mov rsi, r15
mov r8d, 1
call bf_add_si
mov r13d, eax
lea r9, __bf_sub
lea rdx, [rsp+0A8h+var_80]
mov rdi, rbx
mov rsi, rbx
mov rcx, 3FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_op2
or eax, r13d
test al, 20h
jnz loc_897DC
mov rcx, [rbx+18h]
mov eax, [r12+8]
xor [rbx+8], eax
mov eax, [rsp+0A8h+var_A4]
mov [r15+8], eax
test rcx, rcx
jz loc_89629
loc_899C0:
mov rdi, rbx
mov rsi, [rsp+0A8h+var_90]
mov edx, ebp
xor r8d, r8d
call __bf_round
jmp loc_8983C
| long long bf_divrem(_QWORD **a1, __int128 *a2, long long a3, long long a4, long long a5, unsigned int a6, int a7)
{
long long v11; // rcx
long long v12; // rax
int v13; // esi
int v14; // r8d
long long v15; // rcx
long long v16; // rdx
long long v18; // rbp
long long v19; // r14
long long v20; // rbp
long long v21; // rcx
unsigned long long v22; // rcx
unsigned int v23; // ebp
_QWORD *v24; // r13
long long v25; // rbp
int v26; // eax
long long v27; // rcx
long long v28; // rcx
unsigned long long v29; // rcx
unsigned long long v30; // rcx
unsigned __int8 v31; // r13
int v32; // [rsp+4h] [rbp-A4h]
int v34; // [rsp+Ch] [rbp-9Ch]
_QWORD *v36; // [rsp+20h] [rbp-88h]
long long v37; // [rsp+28h] [rbp-80h] BYREF
int v38; // [rsp+30h] [rbp-78h]
long long v39; // [rsp+38h] [rbp-70h]
long long v40; // [rsp+40h] [rbp-68h]
long long v41; // [rsp+48h] [rbp-60h]
long long v42; // [rsp+50h] [rbp-58h] BYREF
int v43; // [rsp+58h] [rbp-50h]
long long v44; // [rsp+60h] [rbp-48h]
long long v45; // [rsp+68h] [rbp-40h]
long long v46; // [rsp+70h] [rbp-38h]
v11 = *(_QWORD *)(a3 + 24);
if ( v11 )
{
v12 = *(_QWORD *)(a4 + 24);
if ( v12 )
{
v13 = *(_DWORD *)(a3 + 8);
v14 = 0;
switch ( a7 )
{
case 2:
v14 = v13 ^ *(_DWORD *)(a4 + 8);
break;
case 3:
v14 = v13 ^ *(_DWORD *)(a4 + 8) ^ 1;
break;
case 5:
v14 = 1;
break;
case 6:
v14 = *(_DWORD *)(a3 + 8);
break;
default:
break;
}
v34 = v14;
v32 = v13 ^ *(_DWORD *)(a4 + 8);
v18 = *(_QWORD *)(a3 + 16);
v44 = v18;
v46 = *(_QWORD *)(a3 + 32);
v45 = v11;
v43 = 0;
v19 = *(_QWORD *)(a4 + 16);
v39 = v19;
v41 = *(_QWORD *)(a4 + 32);
v40 = v12;
v38 = 0;
if ( (int)bf_cmpu(&v42, &v37) < 0 )
{
*((_DWORD *)a1 + 2) = 0;
a1[2] = (_QWORD *)0x8000000000000000LL;
if ( a1[3] )
{
a1[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL);
a1[3] = 0LL;
}
bf_set(a2, (long long)&v42);
}
else
{
v20 = v18 - v19;
v21 = 1LL;
if ( v20 >= 2 )
v21 = v20;
bf_op2(a1, &v42, &v37, v21 + 1, 1LL, _bf_div);
v22 = (unsigned long long)a1[3];
if ( v22 )
_bf_round(a1, 0LL, 0x11u, v22, 0);
bf_mul(a2, (long long)a1, (long long)&v37, 0x3FFFFFFFFFFFFFFFLL, 1u);
bf_op2(a2, &v42, a2, 0x3FFFFFFFFFFFFFFFLL, 1LL, _bf_sub);
}
v23 = a6;
v24 = a1[2];
if ( v24 == (_QWORD *)0x7FFFFFFFFFFFFFFFLL || *((_QWORD *)a2 + 2) == 0x7FFFFFFFFFFFFFFFLL )
goto LABEL_31;
if ( *((_QWORD *)a2 + 3) )
{
v36 = (_QWORD *)*((_QWORD *)a2 + 3);
if ( (a7 & 0xFFFFFFFB) != 0 )
{
if ( !v34 )
{
LABEL_43:
*((_DWORD *)a2 + 2) ^= *(_DWORD *)(a3 + 8);
*((_DWORD *)a1 + 2) = v32;
v29 = (unsigned long long)v36;
return _bf_round((_QWORD **)a2, a5, v23, v29, 0);
}
}
else
{
v25 = v39--;
v26 = bf_cmpu(a2, &v37);
v39 = v25;
v23 = a6;
if ( v26 <= 0 )
{
if ( v26 )
goto LABEL_43;
if ( a7 != 4 )
{
v27 = (long long)(((_QWORD)a1[3] << 6) - (_QWORD)v24) >> 6;
if ( v27 < 0 || v27 >= (unsigned long long)a1[3] )
goto LABEL_43;
v28 = a1[4][v27];
if ( !_bittest64(&v28, ((_QWORD)a1[3] << 6) - (_QWORD)v24) )
goto LABEL_43;
}
}
}
v31 = bf_add_si(a1, a1, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1LL);
if ( ((v31 | (unsigned __int8)bf_op2(a2, a2, &v37, 0x3FFFFFFFFFFFFFFFLL, 1LL, _bf_sub)) & 0x20) != 0 )
{
LABEL_31:
if ( a1[3] )
{
a1[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL);
a1[3] = 0LL;
}
a1[2] = (_QWORD *)0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a1 + 2) = 0;
if ( *((_QWORD *)a2 + 3) )
{
*((_QWORD *)a2 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a2 + 8LL))(
**(_QWORD **)a2,
*((_QWORD *)a2 + 4),
0LL);
*((_QWORD *)a2 + 3) = 0LL;
}
*((_QWORD *)a2 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a2 + 2) = 0;
return 32LL;
}
v29 = *((_QWORD *)a2 + 3);
*((_DWORD *)a2 + 2) ^= *(_DWORD *)(a3 + 8);
*((_DWORD *)a1 + 2) = v32;
if ( v29 )
return _bf_round((_QWORD **)a2, a5, v23, v29, 0);
}
else
{
*((_DWORD *)a2 + 2) ^= *(_DWORD *)(a3 + 8);
*((_DWORD *)a1 + 2) = v32;
}
return 0LL;
}
}
if ( a1[3] )
{
a1[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL);
a1[3] = 0LL;
}
a1[2] = (_QWORD *)0x8000000000000000LL;
*((_DWORD *)a1 + 2) = 0;
v15 = *(_QWORD *)(a3 + 16);
if ( v15 == 0x7FFFFFFFFFFFFFFFLL || (v16 = *(_QWORD *)(a4 + 16), v16 == 0x7FFFFFFFFFFFFFFFLL) )
{
if ( *((_QWORD *)a2 + 3) )
{
*((_QWORD *)a2 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a2 + 8LL))(
**(_QWORD **)a2,
*((_QWORD *)a2 + 4),
0LL);
*((_QWORD *)a2 + 3) = 0LL;
}
*((_QWORD *)a2 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a2 + 2) = 0;
return 0LL;
}
if ( v16 != 0x8000000000000000LL && v15 != 0x7FFFFFFFFFFFFFFELL )
{
bf_set(a2, a3);
v30 = *((_QWORD *)a2 + 3);
if ( v30 )
return _bf_round((_QWORD **)a2, a5, a6, v30, 0);
return 0LL;
}
if ( *((_QWORD *)a2 + 3) )
{
*((_QWORD *)a2 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a2 + 8LL))(
**(_QWORD **)a2,
*((_QWORD *)a2 + 4),
0LL);
*((_QWORD *)a2 + 3) = 0LL;
}
*((_QWORD *)a2 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a2 + 2) = 0;
return 1LL;
}
| bf_divrem:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV EBP,R9D
MOV qword ptr [RSP + 0x18],R8
MOV R13,RCX
MOV R12,RDX
MOV RBX,RSI
MOV R15,RDI
MOV R14,0x7fffffffffffffff
MOV RCX,qword ptr [RDX + 0x18]
TEST RCX,RCX
JZ 0x001895b7
MOV RAX,qword ptr [R13 + 0x18]
TEST RAX,RAX
JZ 0x001895b7
MOV dword ptr [RSP + 0x8],EBP
MOV EDI,dword ptr [RSP + 0xb0]
MOV ESI,dword ptr [R12 + 0x8]
MOV R9D,dword ptr [R13 + 0x8]
XOR R9D,ESI
XOR EDX,EDX
MOV qword ptr [RSP + 0x10],RDI
ADD EDI,-0x2
MOV R8D,0x0
CMP EDI,0x4
JA 0x00189693
LEA R8,[0x1a5850]
MOVSXD RDI,dword ptr [R8 + RDI*0x4]
ADD RDI,R8
XOR R8D,R8D
switchD:
JMP RDI
caseD_2:
MOV R8D,R9D
JMP 0x00189693
LAB_001895b7:
CMP qword ptr [R15 + 0x18],0x0
JZ 0x001895d9
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [R15 + 0x20],RAX
MOV qword ptr [R15 + 0x18],0x0
LAB_001895d9:
LEA RAX,[R14 + 0x1]
MOV qword ptr [R15 + 0x10],RAX
MOV dword ptr [R15 + 0x8],0x0
MOV RCX,qword ptr [R12 + 0x10]
CMP RCX,R14
JZ 0x001895fc
MOV RDX,qword ptr [R13 + 0x10]
CMP RDX,R14
JNZ 0x00189630
LAB_001895fc:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018961e
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018961e:
MOV qword ptr [RBX + 0x10],R14
MOV dword ptr [RBX + 0x8],0x0
LAB_00189629:
XOR EAX,EAX
JMP 0x0018983c
LAB_00189630:
LEA RSI,[R14 + -0x1]
CMP RCX,RSI
SETNZ CL
CMP RDX,RAX
SETNZ AL
TEST CL,AL
JNZ 0x001898fa
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018966a
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018966a:
MOV qword ptr [RBX + 0x10],R14
MOV dword ptr [RBX + 0x8],0x0
MOV EAX,0x1
JMP 0x0018983c
caseD_5:
MOV R8D,0x1
JMP 0x00189693
caseD_3:
MOV R8D,R9D
XOR R8D,0x1
JMP 0x00189693
caseD_6:
MOV R8D,ESI
caseD_4:
MOV dword ptr [RSP + 0xc],R8D
MOV dword ptr [RSP + 0x4],R9D
MOV RBP,qword ptr [R12 + 0x10]
LEA RDI,[RSP + 0x50]
MOV qword ptr [RDI + 0x10],RBP
MOV RSI,qword ptr [R12 + 0x20]
MOV qword ptr [RDI + 0x20],RSI
MOV qword ptr [RDI + 0x18],RCX
MOV dword ptr [RDI + 0x8],EDX
MOV R14,qword ptr [R13 + 0x10]
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI + 0x10],R14
MOV RCX,qword ptr [R13 + 0x20]
MOV qword ptr [RSI + 0x20],RCX
MOV qword ptr [RSI + 0x18],RAX
MOV dword ptr [RSI + 0x8],EDX
CALL 0x00187e60
TEST EAX,EAX
JS 0x00189780
SUB RBP,R14
CMP RBP,0x2
MOV ECX,0x1
CMOVGE RCX,RBP
INC RCX
LEA R9,[0x18a6f2]
LEA RSI,[RSP + 0x50]
LEA RDX,[RSP + 0x28]
MOV RDI,R15
MOV R8D,0x1
CALL 0x0018a639
MOV RCX,qword ptr [R15 + 0x18]
TEST RCX,RCX
JZ 0x00189731
MOV RDI,R15
XOR ESI,ESI
MOV EDX,0x11
XOR R8D,R8D
CALL 0x0018787f
LAB_00189731:
LEA RDX,[RSP + 0x28]
MOV R13,0x3fffffffffffffff
MOV RDI,RBX
MOV RSI,R15
MOV RCX,R13
MOV R8D,0x1
CALL 0x00189178
LEA R9,[0x18a6db]
LEA RSI,[RSP + 0x50]
MOV RDI,RBX
MOV RDX,RBX
MOV RCX,R13
MOV R8D,0x1
CALL 0x0018a639
MOV R14,0x7fffffffffffffff
JMP 0x001897c9
LAB_00189780:
MOV dword ptr [R15 + 0x8],0x0
MOV R14,0x7fffffffffffffff
LEA RAX,[R14 + 0x1]
MOV qword ptr [R15 + 0x10],RAX
CMP qword ptr [R15 + 0x18],0x0
JZ 0x001897bc
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [R15 + 0x20],RAX
MOV qword ptr [R15 + 0x18],0x0
LAB_001897bc:
LEA RSI,[RSP + 0x50]
MOV RDI,RBX
CALL 0x001876d6
LAB_001897c9:
MOV EBP,dword ptr [RSP + 0x8]
MOV R13,qword ptr [R15 + 0x10]
CMP R13,R14
JZ 0x001897dc
CMP qword ptr [RBX + 0x10],R14
JNZ 0x0018984b
LAB_001897dc:
CMP qword ptr [R15 + 0x18],0x0
JZ 0x001897fe
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [R15 + 0x20],RAX
MOV qword ptr [R15 + 0x18],0x0
LAB_001897fe:
MOV qword ptr [R15 + 0x10],R14
MOV dword ptr [R15 + 0x8],0x0
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018982c
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018982c:
MOV qword ptr [RBX + 0x10],R14
MOV dword ptr [RBX + 0x8],0x0
MOV EAX,0x20
LAB_0018983c:
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018984b:
MOV RAX,qword ptr [RBX + 0x18]
TEST RAX,RAX
JZ 0x00189932
MOV qword ptr [RSP + 0x20],RAX
TEST dword ptr [RSP + 0x10],0xfffffffb
JNZ 0x00189947
LEA R14,[RSP + 0x28]
MOV RBP,qword ptr [R14 + 0x10]
LEA RAX,[RBP + -0x1]
MOV qword ptr [R14 + 0x10],RAX
MOV RDI,RBX
MOV RSI,R14
CALL 0x00187e60
MOV qword ptr [R14 + 0x10],RBP
MOV EBP,dword ptr [RSP + 0x8]
MOV R14,0x7fffffffffffffff
TEST EAX,EAX
JG 0x0018994e
JNZ 0x001898e0
CMP dword ptr [RSP + 0x10],0x4
JZ 0x0018994e
MOV RDX,qword ptr [R15 + 0x18]
MOV RAX,RDX
SHL RAX,0x6
SUB RAX,R13
MOV RCX,RAX
SAR RCX,0x6
SETS SIL
CMP RCX,RDX
SETNC DL
OR DL,SIL
JNZ 0x001898e0
MOV RDX,qword ptr [R15 + 0x20]
MOV RCX,qword ptr [RDX + RCX*0x8]
BT RCX,RAX
JC 0x0018994e
LAB_001898e0:
MOV EAX,dword ptr [R12 + 0x8]
XOR dword ptr [RBX + 0x8],EAX
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R15 + 0x8],EAX
MOV RCX,qword ptr [RSP + 0x20]
JMP 0x001899c0
LAB_001898fa:
MOV RDI,RBX
MOV RSI,R12
CALL 0x001876d6
MOV RCX,qword ptr [RBX + 0x18]
TEST RCX,RCX
JZ 0x00189629
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x18]
MOV EDX,EBP
XOR R8D,R8D
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018787f
LAB_00189932:
MOV EAX,dword ptr [R12 + 0x8]
XOR dword ptr [RBX + 0x8],EAX
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R15 + 0x8],EAX
JMP 0x00189629
LAB_00189947:
CMP dword ptr [RSP + 0xc],0x0
JZ 0x001898e0
LAB_0018994e:
MOV RCX,0x3fffffffffffffff
MOV EDX,0x1
MOV RDI,R15
MOV RSI,R15
MOV R8D,0x1
CALL 0x001899d7
MOV R13D,EAX
LEA R9,[0x18a6db]
LEA RDX,[RSP + 0x28]
MOV RDI,RBX
MOV RSI,RBX
MOV RCX,0x3fffffffffffffff
MOV R8D,0x1
CALL 0x0018a639
OR EAX,R13D
TEST AL,0x20
JNZ 0x001897dc
MOV RCX,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [R12 + 0x8]
XOR dword ptr [RBX + 0x8],EAX
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R15 + 0x8],EAX
TEST RCX,RCX
JZ 0x00189629
LAB_001899c0:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x18]
MOV EDX,EBP
XOR R8D,R8D
CALL 0x0018787f
JMP 0x0018983c
|
int8
bf_divrem(long *param_1,long *param_2,long param_3,long param_4,int8 param_5,
int4 param_6,uint param_7)
{
int iVar1;
uint uVar2;
uint uVar3;
int8 uVar4;
ulong uVar5;
long lVar6;
ulong uVar7;
long lVar8;
long lVar9;
uint uVar10;
int1 local_80 [8];
int4 local_78;
long local_70;
long local_68;
int8 local_60;
int1 local_58 [8];
int4 local_50;
long local_48;
long local_40;
int8 local_38;
local_40 = *(long *)(param_3 + 0x18);
if ((local_40 == 0) || (local_68 = *(long *)(param_4 + 0x18), local_68 == 0)) {
if (param_1[3] != 0) {
lVar9 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar9;
param_1[3] = 0;
}
param_1[2] = -0x8000000000000000;
*(int4 *)(param_1 + 1) = 0;
if ((*(long *)(param_3 + 0x10) == 0x7fffffffffffffff) ||
(*(long *)(param_4 + 0x10) == 0x7fffffffffffffff)) {
if (param_2[3] != 0) {
lVar9 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0);
param_2[4] = lVar9;
param_2[3] = 0;
}
param_2[2] = 0x7fffffffffffffff;
*(int4 *)(param_2 + 1) = 0;
return 0;
}
if (*(long *)(param_3 + 0x10) == 0x7ffffffffffffffe ||
*(long *)(param_4 + 0x10) == -0x8000000000000000) {
if (param_2[3] != 0) {
lVar9 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0);
param_2[4] = lVar9;
param_2[3] = 0;
}
param_2[2] = 0x7fffffffffffffff;
*(int4 *)(param_2 + 1) = 0;
return 1;
}
bf_set(param_2,param_3);
if (param_2[3] == 0) {
return 0;
}
uVar4 = __bf_round(param_2,param_5,param_6,param_2[3],0);
return uVar4;
}
uVar10 = *(uint *)(param_4 + 8) ^ *(uint *)(param_3 + 8);
uVar2 = 0;
switch(param_7) {
case 2:
uVar2 = uVar10;
break;
case 3:
uVar2 = uVar10 ^ 1;
break;
case 5:
uVar2 = 1;
break;
case 6:
uVar2 = *(uint *)(param_3 + 8);
}
lVar9 = *(long *)(param_3 + 0x10);
local_38 = *(int8 *)(param_3 + 0x20);
local_50 = 0;
lVar6 = *(long *)(param_4 + 0x10);
local_60 = *(int8 *)(param_4 + 0x20);
local_78 = 0;
local_70 = lVar6;
local_48 = lVar9;
iVar1 = bf_cmpu();
if (iVar1 < 0) {
*(int4 *)(param_1 + 1) = 0;
param_1[2] = -0x8000000000000000;
if (param_1[3] != 0) {
lVar9 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar9;
param_1[3] = 0;
}
bf_set(param_2,local_58);
}
else {
lVar9 = lVar9 - lVar6;
lVar6 = 1;
if (1 < lVar9) {
lVar6 = lVar9;
}
bf_op2(param_1,local_58,local_80,lVar6 + 1,1,__bf_div);
if (param_1[3] != 0) {
__bf_round(param_1,0,0x11,param_1[3],0);
}
bf_mul(param_2,param_1,local_80,0x3fffffffffffffff,1);
bf_op2(param_2,local_58,param_2,0x3fffffffffffffff,1,__bf_sub);
}
lVar6 = local_70;
lVar9 = param_1[2];
if ((lVar9 == 0x7fffffffffffffff) || (param_2[2] == 0x7fffffffffffffff)) {
LAB_001897dc:
if (param_1[3] != 0) {
lVar9 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar9;
param_1[3] = 0;
}
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
if (param_2[3] != 0) {
lVar9 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0);
param_2[4] = lVar9;
param_2[3] = 0;
}
param_2[2] = 0x7fffffffffffffff;
*(int4 *)(param_2 + 1) = 0;
uVar4 = 0x20;
}
else {
lVar8 = param_2[3];
if (lVar8 == 0) {
*(uint *)(param_2 + 1) = *(uint *)(param_2 + 1) ^ *(uint *)(param_3 + 8);
*(uint *)(param_1 + 1) = uVar10;
return 0;
}
if ((param_7 & 0xfffffffb) == 0) {
local_70 = local_70 + -1;
iVar1 = bf_cmpu(param_2,local_80);
if (0 < iVar1) goto LAB_0018994e;
if (iVar1 == 0) {
if (param_7 != 4) {
uVar5 = param_1[3] * 0x40 - lVar9;
uVar7 = (long)uVar5 >> 6;
if (((ulong)param_1[3] <= uVar7 || (long)uVar7 < 0) ||
((*(ulong *)(param_1[4] + uVar7 * 8) >> (uVar5 & 0x3f) & 1) == 0)) goto LAB_001898e0;
}
goto LAB_0018994e;
}
LAB_001898e0:
*(uint *)(param_2 + 1) = *(uint *)(param_2 + 1) ^ *(uint *)(param_3 + 8);
*(uint *)(param_1 + 1) = uVar10;
local_70 = lVar6;
}
else {
if (uVar2 == 0) goto LAB_001898e0;
LAB_0018994e:
local_70 = lVar6;
uVar2 = bf_add_si(param_1,param_1,1,0x3fffffffffffffff,1);
uVar3 = bf_op2(param_2,param_2,local_80,0x3fffffffffffffff,1,__bf_sub);
if (((uVar3 | uVar2) & 0x20) != 0) goto LAB_001897dc;
lVar8 = param_2[3];
*(uint *)(param_2 + 1) = *(uint *)(param_2 + 1) ^ *(uint *)(param_3 + 8);
*(uint *)(param_1 + 1) = uVar10;
if (lVar8 == 0) {
return 0;
}
}
uVar4 = __bf_round(param_2,param_5,param_6,lVar8,0);
}
return uVar4;
}
| |
52,503 | test_get_rows::build_graph(ggml_context*) | monkey531[P]llama/tests/test-backend-ops.cpp | ggml_tensor * build_graph(ggml_context * ctx) override {
ggml_tensor * in = ggml_new_tensor_3d(ctx, type, n, m, b);
ggml_set_name(in, "in");
ggml_tensor * rows = ggml_new_tensor_2d(ctx, GGML_TYPE_I32, r, b);
ggml_set_name(rows, "rows");
if (v) {
rows = ggml_view_2d(ctx, rows, r/2, b, rows->nb[1], 0);
ggml_set_name(rows, "view_of_rows");
}
const bool grad_supported = ggml_is_matrix(in) && ggml_is_vector(rows);
if (grad_supported) {
ggml_set_param(ctx, in);
// rows is a constant input -> no gradients
}
ggml_tensor * out = ggml_get_rows(ctx, in, rows);
ggml_set_name(out, "out");
return out;
} | O3 | cpp | test_get_rows::build_graph(ggml_context*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r12
movl 0x38(%rdi), %esi
movslq 0x3c(%rdi), %rdx
movslq 0x40(%rdi), %rcx
movslq 0x48(%rdi), %r8
movq %rbx, %rdi
callq 0xd6a0
movq %rax, %r14
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b8ae
leaq 0x280b6(%rip), %rsi # 0x44b92
movq %r14, %rdi
callq 0xdb10
movslq 0x44(%r12), %rdx
movslq 0x48(%r12), %rcx
movq %rbx, %rdi
movl $0x1a, %esi
callq 0xd7b0
movq %rax, %r15
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b8ae
leaq 0x2808d(%rip), %rsi # 0x44b9d
movq %r15, %rdi
callq 0xdb10
cmpb $0x1, 0x4c(%r12)
jne 0x1cb5a
movl 0x44(%r12), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movslq %ecx, %rdx
movslq 0x48(%r12), %rcx
movq 0x38(%r15), %r8
movq %rbx, %rdi
movq %r15, %rsi
xorl %r9d, %r9d
callq 0xd780
movq %rax, %r15
leaq 0x28043(%rip), %rsi # 0x44b95
movq %rax, %rdi
callq 0xdb10
movq %r14, %rdi
callq 0xd5a0
testb %al, %al
je 0x1cb7d
movq %r15, %rdi
callq 0xd910
testb %al, %al
je 0x1cb7d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xda90
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xd1e0
movq %rax, %rbx
leaq 0x28599(%rip), %rsi # 0x4512e
movq %rax, %rdi
callq 0xdb10
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN13test_get_rows11build_graphEP12ggml_context:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rsi
mov r12, rdi
mov esi, [rdi+38h]
movsxd rdx, dword ptr [rdi+3Ch]
movsxd rcx, dword ptr [rdi+40h]
movsxd r8, dword ptr [rdi+48h]
mov rdi, rbx
call _ggml_new_tensor_3d
mov r14, rax
mov rdi, r12
mov rsi, rbx
call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *)
lea rsi, aIn; "in"
mov rdi, r14
call _ggml_set_name
movsxd rdx, dword ptr [r12+44h]
movsxd rcx, dword ptr [r12+48h]
mov rdi, rbx
mov esi, 1Ah
call _ggml_new_tensor_2d
mov r15, rax
mov rdi, r12
mov rsi, rbx
call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *)
lea rsi, aViewOfRows+8; "rows"
mov rdi, r15
call _ggml_set_name
cmp byte ptr [r12+4Ch], 1
jnz short loc_1CB5A
mov eax, [r12+44h]
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
movsxd rdx, ecx
movsxd rcx, dword ptr [r12+48h]
mov r8, [r15+38h]
mov rdi, rbx
mov rsi, r15
xor r9d, r9d
call _ggml_view_2d
mov r15, rax
lea rsi, aViewOfRows; "view_of_rows"
mov rdi, rax
call _ggml_set_name
loc_1CB5A:
mov rdi, r14
call _ggml_is_matrix
test al, al
jz short loc_1CB7D
mov rdi, r15
call _ggml_is_vector
test al, al
jz short loc_1CB7D
mov rdi, rbx
mov rsi, r14
call _ggml_set_param
loc_1CB7D:
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call _ggml_get_rows
mov rbx, rax
lea rsi, aSumOfOut+7; "out"
mov rdi, rax
call _ggml_set_name
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long test_get_rows::build_graph(long long a1, long long a2)
{
long long v2; // r14
long long v3; // r15
long long rows; // rbx
v2 = ggml_new_tensor_3d(a2, *(unsigned int *)(a1 + 56), *(int *)(a1 + 60), *(int *)(a1 + 64), *(int *)(a1 + 72));
test_case::add_sentinel(a1, a2);
ggml_set_name(v2, "in");
v3 = ggml_new_tensor_2d(a2, 26LL, *(int *)(a1 + 68), *(int *)(a1 + 72));
test_case::add_sentinel(a1, a2);
ggml_set_name(v3, "rows");
if ( *(_BYTE *)(a1 + 76) == 1 )
{
v3 = ggml_view_2d(a2, v3, *(_DWORD *)(a1 + 68) / 2, *(int *)(a1 + 72), *(_QWORD *)(v3 + 56), 0LL);
ggml_set_name(v3, "view_of_rows");
}
if ( (unsigned __int8)ggml_is_matrix(v2) && (unsigned __int8)ggml_is_vector(v3) )
ggml_set_param(a2, v2);
rows = ggml_get_rows(a2, v2, v3);
ggml_set_name(rows, "out");
return rows;
}
| build_graph:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R12,RDI
MOV ESI,dword ptr [RDI + 0x38]
MOVSXD RDX,dword ptr [RDI + 0x3c]
MOVSXD RCX,dword ptr [RDI + 0x40]
MOVSXD R8,dword ptr [RDI + 0x48]
MOV RDI,RBX
CALL 0x0010d6a0
MOV R14,RAX
MOV RDI,R12
MOV RSI,RBX
CALL 0x0011b8ae
LEA RSI,[0x144b92]
MOV RDI,R14
CALL 0x0010db10
MOVSXD RDX,dword ptr [R12 + 0x44]
MOVSXD RCX,dword ptr [R12 + 0x48]
MOV RDI,RBX
MOV ESI,0x1a
CALL 0x0010d7b0
MOV R15,RAX
MOV RDI,R12
MOV RSI,RBX
CALL 0x0011b8ae
LEA RSI,[0x144b9d]
MOV RDI,R15
CALL 0x0010db10
CMP byte ptr [R12 + 0x4c],0x1
JNZ 0x0011cb5a
MOV EAX,dword ptr [R12 + 0x44]
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
MOVSXD RDX,ECX
MOVSXD RCX,dword ptr [R12 + 0x48]
MOV R8,qword ptr [R15 + 0x38]
MOV RDI,RBX
MOV RSI,R15
XOR R9D,R9D
CALL 0x0010d780
MOV R15,RAX
LEA RSI,[0x144b95]
MOV RDI,RAX
CALL 0x0010db10
LAB_0011cb5a:
MOV RDI,R14
CALL 0x0010d5a0
TEST AL,AL
JZ 0x0011cb7d
MOV RDI,R15
CALL 0x0010d910
TEST AL,AL
JZ 0x0011cb7d
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010da90
LAB_0011cb7d:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0010d1e0
MOV RBX,RAX
LEA RSI,[0x14512e]
MOV RDI,RAX
CALL 0x0010db10
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* test_get_rows::build_graph(ggml_context*) */
int8 __thiscall test_get_rows::build_graph(test_get_rows *this,ggml_context *param_1)
{
char cVar1;
int8 uVar2;
long lVar3;
uVar2 = ggml_new_tensor_3d(param_1,*(int4 *)(this + 0x38),(long)*(int *)(this + 0x3c),
(long)*(int *)(this + 0x40),(long)*(int *)(this + 0x48));
test_case::add_sentinel((test_case *)this,param_1);
ggml_set_name(uVar2,&DAT_00144b92);
lVar3 = ggml_new_tensor_2d(param_1,0x1a,(long)*(int *)(this + 0x44),(long)*(int *)(this + 0x48));
test_case::add_sentinel((test_case *)this,param_1);
ggml_set_name(lVar3,"rows");
if (this[0x4c] == (test_get_rows)0x1) {
lVar3 = ggml_view_2d(param_1,lVar3,(long)(*(int *)(this + 0x44) / 2),(long)*(int *)(this + 0x48)
,*(int8 *)(lVar3 + 0x38),0);
ggml_set_name(lVar3,"view_of_rows");
}
cVar1 = ggml_is_matrix(uVar2);
if (cVar1 != '\0') {
cVar1 = ggml_is_vector(lVar3);
if (cVar1 != '\0') {
ggml_set_param(param_1,uVar2);
}
}
uVar2 = ggml_get_rows(param_1,uVar2,lVar3);
ggml_set_name(uVar2,"out");
return uVar2;
}
| |
52,504 | my_wc_mb_tis620 | eloqsql/strings/ctype-tis620.c | static
int my_wc_mb_tis620(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc,
uchar *str,
uchar *end __attribute__((unused)))
{
const uchar *pl;
if (str >= end)
return MY_CS_TOOSMALL;
pl= uni_to_cs[(wc>>8) & 0xFF];
str[0]= pl ? pl[wc & 0xFF] : '\0';
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
} | O3 | c | my_wc_mb_tis620:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x42f36
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq %rsi, %rbx
movzbl %bh, %eax
leaq 0x2b1251(%rip), %rcx # 0x2f4160
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0x42f20
movzbl %bl, %ecx
movb (%rax,%rcx), %al
jmp 0x42f22
xorl %eax, %eax
movb %al, (%rdx)
testb %al, %al
setne %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
movzbl %cl, %eax
popq %rbx
popq %rbp
retq
| my_wc_mb_tis620:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_42F36
push rbp
mov rbp, rsp
push rbx
mov rbx, rsi
movzx eax, bh
lea rcx, uni_to_cs_0
mov rax, [rcx+rax*8]
test rax, rax
jz short loc_42F20
movzx ecx, bl
mov al, [rax+rcx]
jmp short loc_42F22
loc_42F20:
xor eax, eax
loc_42F22:
mov [rdx], al
test al, al
setnz al
test rbx, rbx
setz cl
or cl, al
movzx eax, cl
pop rbx
pop rbp
locret_42F36:
retn
| long long my_wc_mb_tis620(long long a1, long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rax
char v6; // al
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = (long long)*(&uni_to_cs_0 + BYTE1(a2));
if ( v5 )
v6 = *(_BYTE *)(v5 + (unsigned __int8)a2);
else
v6 = 0;
*a3 = v6;
return (v6 != 0) | (unsigned __int8)(a2 == 0);
}
return result;
}
| my_wc_mb_tis620:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00142f36
PUSH RBP
MOV RBP,RSP
PUSH RBX
MOV RBX,RSI
MOVZX EAX,BH
LEA RCX,[0x3f4160]
MOV RAX,qword ptr [RCX + RAX*0x8]
TEST RAX,RAX
JZ 0x00142f20
MOVZX ECX,BL
MOV AL,byte ptr [RAX + RCX*0x1]
JMP 0x00142f22
LAB_00142f20:
XOR EAX,EAX
LAB_00142f22:
MOV byte ptr [RDX],AL
TEST AL,AL
SETNZ AL
TEST RBX,RBX
SETZ CL
OR CL,AL
MOVZX EAX,CL
POP RBX
POP RBP
LAB_00142f36:
RET
|
ulong my_wc_mb_tis620(int8 param_1,ulong param_2,char *param_3,char *param_4)
{
char cVar1;
ulong uVar2;
uVar2 = 0xffffff9b;
if (param_3 < param_4) {
if (*(long *)(uni_to_cs + (param_2 >> 8 & 0xff) * 8) == 0) {
cVar1 = '\0';
}
else {
cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8 & 0xff) * 8) + (param_2 & 0xff));
}
*param_3 = cVar1;
uVar2 = (ulong)(param_2 == 0 || cVar1 != '\0');
}
return uVar2;
}
| |
52,505 | minja::Value::get(minja::Value const&) | monkey531[P]llama/common/minja.hpp | Value get(const Value& key) {
if (array_) {
if (!key.is_number_integer()) {
return Value();
}
auto index = key.get<int>();
return array_->at(index < 0 ? array_->size() + index : index);
} else if (object_) {
if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump());
auto it = object_->find(key.primitive_);
if (it == object_->end()) return Value();
return it->second;
}
return Value();
} | O1 | cpp | minja::Value::get(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x10(%rsi)
je 0x52216
movb 0x40(%r15), %al
addb $-0x5, %al
cmpb $0x2, %al
jae 0x522cd
movq %r15, %rdi
callq 0x524ce
movq 0x10(%r14), %rdx
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
testl %eax, %eax
js 0x52273
movl %eax, %esi
jmp 0x52288
movq 0x20(%r14), %r13
testq %r13, %r13
je 0x522cd
cmpq $0x0, 0x10(%r15)
jne 0x52329
cmpq $0x0, 0x20(%r15)
jne 0x52329
cmpq $0x0, 0x30(%r15)
jne 0x52329
movq (%r13), %r12
movq 0x8(%r13), %rsi
cmpq %rsi, %r12
je 0x522b5
addq $0x40, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x4edaf
testb %al, %al
jne 0x522b2
addq $0x60, %r12
movq 0x8(%r13), %rsi
cmpq %rsi, %r12
jne 0x52255
jmp 0x522b5
movq 0x8(%rdx), %rdi
subq (%rdx), %rdi
sarq $0x4, %rdi
imulq %rcx, %rdi
movslq %eax, %rsi
addq %rdi, %rsi
movq (%rdx), %rax
movq 0x8(%rdx), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0x5231b
leaq (%rsi,%rsi,4), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rbx, %rdi
movq %rax, %rsi
jmp 0x522c6
movq %r12, %rsi
movq 0x20(%r14), %rax
cmpq 0x8(%rax), %rsi
je 0x522cd
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x4f48a
jmp 0x52309
leaq 0x40(%rbx), %r14
movq $0x0, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movb $0x0, 0x40(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x3dcd2
movq %r14, %rdi
movl $0x1, %esi
callq 0x3dcd2
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5beed(%rip), %rdi # 0xae20f
xorl %eax, %eax
callq 0x189d0
movl $0x10, %edi
callq 0x18350
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x3dfda
leaq 0x5bd50(%rip), %rsi # 0xae0a1
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x248bf
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x18a80
xorl %ebp, %ebp
movq 0x8cc77(%rip), %rsi # 0xdeff0
movq 0x8cbf0(%rip), %rdx # 0xdef70
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x523ae
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x523ae
movq %rax, %r14
movb $0x1, %bpl
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x523d1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x523d1
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x523de
movq %rbx, %rdi
callq 0x184f0
movq %r14, %rdi
callq 0x18bb0
| _ZN5minja5Value3getERKS0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
cmp qword ptr [rsi+10h], 0
jz short loc_52216
mov al, [r15+40h]
add al, 0FBh
cmp al, 2
jnb loc_522CD
mov rdi, r15
call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void)
mov rdx, [r14+10h]
mov rcx, 0CCCCCCCCCCCCCCCDh
test eax, eax
js short loc_52273
mov esi, eax
jmp short loc_52288
loc_52216:
mov r13, [r14+20h]
test r13, r13
jz loc_522CD
cmp qword ptr [r15+10h], 0
jnz loc_52329
cmp qword ptr [r15+20h], 0
jnz loc_52329
cmp qword ptr [r15+30h], 0
jnz loc_52329
mov r12, [r13+0]
mov rsi, [r13+8]
cmp r12, rsi
jz short loc_522B5
add r15, 40h ; '@'
loc_52255:
mov rdi, r12
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_522B2
add r12, 60h ; '`'
mov rsi, [r13+8]
cmp r12, rsi
jnz short loc_52255
jmp short loc_522B5
loc_52273:
mov rdi, [rdx+8]
sub rdi, [rdx]
sar rdi, 4
imul rdi, rcx
movsxd rsi, eax
add rsi, rdi
loc_52288:
mov rax, [rdx]
mov rdx, [rdx+8]
sub rdx, rax
sar rdx, 4
imul rdx, rcx
cmp rdx, rsi
jbe short loc_5231B
lea rcx, [rsi+rsi*4]
shl rcx, 4
add rax, rcx
mov rdi, rbx
mov rsi, rax
jmp short loc_522C6
loc_522B2:
mov rsi, r12
loc_522B5:
mov rax, [r14+20h]
cmp rsi, [rax+8]
jz short loc_522CD
add rsi, 10h; minja::Value *
mov rdi, rbx; this
loc_522C6:
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
jmp short loc_52309
loc_522CD:
lea r14, [rbx+40h]
mov qword ptr [rbx+48h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+30h], xmm0
mov byte ptr [rbx+40h], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_52309:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5231B:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
loc_52329:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+78h+var_70]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+78h+var_50]
lea rdx, [rsp+78h+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_50]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+78h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_523AE
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_523AE
mov r14, rax
mov bpl, 1
loc_523AE:
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_523D1
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_523D1
mov r14, rax
mov bpl, 1
loc_523D1:
test bpl, bpl
jz short loc_523DE
mov rdi, rbx; void *
call ___cxa_free_exception
loc_523DE:
mov rdi, r14
call __Unwind_Resume
| minja::Value * minja::Value::get(minja::Value *this, const minja::Value *a2, long long a3, __m128d a4)
{
int v5; // eax
long long *v6; // rdx
unsigned long long v7; // rsi
unsigned __int8 **v8; // r13
unsigned __int8 *v9; // r12
unsigned __int8 *v10; // rsi
unsigned __int8 *v11; // r15
long long v12; // rax
unsigned long long v13; // rdx
const minja::Value *v14; // rsi
void *exception; // rbx
_BYTE v17[16]; // [rsp+8h] [rbp-70h] BYREF
_BYTE v18[16]; // [rsp+28h] [rbp-50h] BYREF
if ( *((_QWORD *)a2 + 2) )
{
if ( (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) < 2u )
{
v5 = minja::Value::get<int>(a3);
v6 = (long long *)*((_QWORD *)a2 + 2);
if ( v5 < 0 )
v7 = 0xCCCCCCCCCCCCCCCDLL * ((v6[1] - *v6) >> 4) + v5;
else
v7 = (unsigned int)v5;
v12 = *v6;
v13 = 0xCCCCCCCCCCCCCCCDLL * ((v6[1] - *v6) >> 4);
if ( v13 <= v7 )
std::__throw_out_of_range_fmt(
"vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)",
v7,
v13);
v14 = (const minja::Value *)(80 * v7 + v12);
goto LABEL_20;
}
LABEL_21:
*((_QWORD *)this + 9) = 0LL;
*(_OWORD *)this = 0LL;
*((_OWORD *)this + 1) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 3) = 0LL;
*((_BYTE *)this + 64) = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64);
return this;
}
v8 = (unsigned __int8 **)*((_QWORD *)a2 + 4);
if ( !v8 )
goto LABEL_21;
if ( *(_QWORD *)(a3 + 16) || *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 48) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v17, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v18, (long long)"Unashable type: ", (long long)v17);
std::runtime_error::runtime_error(exception, v18);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v9 = *v8;
v10 = v8[1];
if ( *v8 != v10 )
{
v11 = (unsigned __int8 *)(a3 + 64);
while ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v9, v11, a4) )
{
v9 += 96;
v10 = v8[1];
if ( v9 == v10 )
goto LABEL_18;
}
v10 = v9;
}
LABEL_18:
if ( v10 == *(unsigned __int8 **)(*((_QWORD *)a2 + 4) + 8LL) )
goto LABEL_21;
v14 = (const minja::Value *)(v10 + 16);
LABEL_20:
minja::Value::Value(this, v14);
return this;
}
| get:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
CMP qword ptr [RSI + 0x10],0x0
JZ 0x00152216
MOV AL,byte ptr [R15 + 0x40]
ADD AL,0xfb
CMP AL,0x2
JNC 0x001522cd
MOV RDI,R15
CALL 0x001524ce
MOV RDX,qword ptr [R14 + 0x10]
MOV RCX,-0x3333333333333333
TEST EAX,EAX
JS 0x00152273
MOV ESI,EAX
JMP 0x00152288
LAB_00152216:
MOV R13,qword ptr [R14 + 0x20]
TEST R13,R13
JZ 0x001522cd
CMP qword ptr [R15 + 0x10],0x0
JNZ 0x00152329
CMP qword ptr [R15 + 0x20],0x0
JNZ 0x00152329
CMP qword ptr [R15 + 0x30],0x0
JNZ 0x00152329
MOV R12,qword ptr [R13]
MOV RSI,qword ptr [R13 + 0x8]
CMP R12,RSI
JZ 0x001522b5
ADD R15,0x40
LAB_00152255:
MOV RDI,R12
MOV RSI,R15
CALL 0x0014edaf
TEST AL,AL
JNZ 0x001522b2
ADD R12,0x60
MOV RSI,qword ptr [R13 + 0x8]
CMP R12,RSI
JNZ 0x00152255
JMP 0x001522b5
LAB_00152273:
MOV RDI,qword ptr [RDX + 0x8]
SUB RDI,qword ptr [RDX]
SAR RDI,0x4
IMUL RDI,RCX
MOVSXD RSI,EAX
ADD RSI,RDI
LAB_00152288:
MOV RAX,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
SUB RDX,RAX
SAR RDX,0x4
IMUL RDX,RCX
CMP RDX,RSI
JBE 0x0015231b
LEA RCX,[RSI + RSI*0x4]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,RBX
MOV RSI,RAX
JMP 0x001522c6
LAB_001522b2:
MOV RSI,R12
LAB_001522b5:
MOV RAX,qword ptr [R14 + 0x20]
CMP RSI,qword ptr [RAX + 0x8]
JZ 0x001522cd
ADD RSI,0x10
MOV RDI,RBX
LAB_001522c6:
CALL 0x0014f48a
JMP 0x00152309
LAB_001522cd:
LEA R14,[RBX + 0x40]
MOV qword ptr [RBX + 0x48],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV byte ptr [RBX + 0x40],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013dcd2
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013dcd2
LAB_00152309:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015231b:
LEA RDI,[0x1ae20f]
XOR EAX,EAX
CALL 0x001189d0
LAB_00152329:
MOV EDI,0x10
CALL 0x00118350
MOV RBX,RAX
LAB_00152336:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0013dfda
LAB_0015234a:
LEA RSI,[0x1ae0a1]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x001248bf
MOV BPL,0x1
LAB_00152363:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00118a80
XOR EBP,EBP
MOV RSI,qword ptr [0x001deff0]
MOV RDX,qword ptr [0x001def70]
MOV RDI,RBX
CALL 0x00118b30
|
/* minja::Value::get(minja::Value const&) */
Value * minja::Value::get(Value *param_1)
{
long *plVar1;
char cVar2;
uint uVar3;
Value *pVVar4;
runtime_error *this;
Value *in_RDX;
ulong uVar5;
long in_RSI;
ulong uVar6;
basic_json *pbVar7;
bool bVar8;
basic_json *pbVar9;
int1 local_70 [32];
string local_50 [32];
if (*(long *)(in_RSI + 0x10) == 0) {
plVar1 = *(long **)(in_RSI + 0x20);
if (plVar1 != (long *)0x0) {
if (((*(long *)(in_RDX + 0x10) != 0) || (*(long *)(in_RDX + 0x20) != 0)) ||
(*(long *)(in_RDX + 0x30) != 0)) goto LAB_00152329;
pbVar7 = (basic_json *)plVar1[1];
if ((basic_json *)*plVar1 != pbVar7) {
pbVar9 = (basic_json *)*plVar1;
do {
pbVar7 = pbVar9;
cVar2 = nlohmann::json_abi_v3_11_3::operator==(pbVar7,(basic_json *)(in_RDX + 0x40));
if (cVar2 != '\0') break;
pbVar9 = pbVar7 + 0x60;
pbVar7 = (basic_json *)plVar1[1];
} while (pbVar9 != pbVar7);
}
if (pbVar7 != *(basic_json **)(*(long *)(in_RSI + 0x20) + 8)) {
pVVar4 = (Value *)(pbVar7 + 0x10);
goto LAB_001522c6;
}
}
}
else if ((byte)((char)in_RDX[0x40] - 5U) < 2) {
uVar3 = get<int>(in_RDX);
plVar1 = *(long **)(in_RSI + 0x10);
if ((int)uVar3 < 0) {
uVar6 = (long)(int)uVar3 + (plVar1[1] - *plVar1 >> 4) * -0x3333333333333333;
}
else {
uVar6 = (ulong)uVar3;
}
uVar5 = (plVar1[1] - *plVar1 >> 4) * -0x3333333333333333;
if (uVar6 <= uVar5 && uVar5 - uVar6 != 0) {
pVVar4 = (Value *)(*plVar1 + uVar6 * 0x50);
LAB_001522c6:
Value(param_1,pVVar4);
return param_1;
}
std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)");
LAB_00152329:
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00152336 to 00152349 has its CatchHandler @ 001523cb */
dump_abi_cxx11_((int)local_70,SUB81(in_RSI,0));
/* try { // try from 0015234a to 0015235f has its CatchHandler @ 001523a8 */
std::operator+((char *)local_50,(string *)"Unashable type: ");
/* try { // try from 00152363 to 00152387 has its CatchHandler @ 00152388 */
std::runtime_error::runtime_error(this,local_50);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001deff0,PTR__runtime_error_001def70);
}
bVar8 = (bool)((char)param_1 + '@');
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(param_1 + 0x20) = 0;
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x38) = 0;
param_1[0x40] = (Value)0x0;
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(bVar8);
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(bVar8);
return param_1;
}
| |
52,506 | google::protobuf::compiler::csharp::MessageFieldGenerator::WriteToString(google::protobuf::io::Printer*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/csharp/csharp_message_field.cc | void MessageFieldGenerator::WriteToString(io::Printer* printer) {
variables_["field_name"] = GetFieldName(descriptor_);
printer->Print(
variables_,
"PrintField(\"$field_name$\", has$property_name$, $name$_, writer);\n");
} | O0 | cpp | google::protobuf::compiler::csharp::MessageFieldGenerator::WriteToString(google::protobuf::io::Printer*):
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rax), %rsi
leaq 0x58(%rsp), %rdi
callq 0x68bd0
movq 0x8(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x10(%rsp)
leaq 0x37(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x21a00
movq 0x18(%rsp), %rdx
leaq 0x35f029(%rip), %rsi # 0x3ca341
leaq 0x38(%rsp), %rdi
callq 0x21890
jmp 0x6b324
movq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x38dc0
movq %rax, (%rsp)
jmp 0x6b339
movq (%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x215e0
leaq 0x38(%rsp), %rdi
callq 0x21cc8
leaq 0x37(%rsp), %rdi
callq 0x21cb0
leaq 0x58(%rsp), %rdi
callq 0x21cc8
movq 0x8(%rsp), %rsi
movq 0x78(%rsp), %rdi
addq $0x20, %rsi
leaq 0x341ae6(%rip), %rdx # 0x3ace60
callq 0x3235f0
addq $0x88, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0x6b3af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x21cc8
leaq 0x37(%rsp), %rdi
callq 0x21cb0
leaq 0x58(%rsp), %rdi
callq 0x21cc8
movq 0x28(%rsp), %rdi
callq 0x21700
nopl (%rax)
| _ZN6google8protobuf8compiler6csharp21MessageFieldGenerator13WriteToStringEPNS0_2io7PrinterE:
sub rsp, 88h
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov rax, [rsp+88h+var_8]
mov [rsp+88h+var_80], rax
mov rsi, [rax+10h]
lea rdi, [rsp+88h+var_30]
call _ZN6google8protobuf8compiler6csharp12GetFieldNameB5cxx11EPKNS0_15FieldDescriptorE; google::protobuf::compiler::csharp::GetFieldName(google::protobuf::FieldDescriptor const*)
mov rax, [rsp+88h+var_80]
add rax, 20h ; ' '
mov [rsp+88h+var_78], rax
lea rdi, [rsp+88h+var_51]
mov [rsp+88h+var_70], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+88h+var_70]
lea rsi, aBitFieldName+4; "field_name"
lea rdi, [rsp+88h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
jmp short $+2
loc_6B324:
mov rdi, [rsp+88h+var_78]
lea rsi, [rsp+88h+var_50]
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&)
mov [rsp+88h+var_88], rax
jmp short $+2
loc_6B339:
mov rdi, [rsp+88h+var_88]
lea rsi, [rsp+88h+var_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rsp+88h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+88h+var_51]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+88h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rsi, [rsp+88h+var_80]
mov rdi, [rsp+88h+var_10]
add rsi, 20h ; ' '
lea rdx, aPrintfieldFiel; "PrintField(\"$field_name$\", has$proper"...
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
add rsp, 88h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
jmp short loc_6B3AF
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_6B3AF:
lea rdi, [rsp+arg_2F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+arg_20]
call __Unwind_Resume
| WriteToString:
SUB RSP,0x88
MOV qword ptr [RSP + 0x80],RDI
MOV qword ptr [RSP + 0x78],RSI
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,qword ptr [RAX + 0x10]
LEA RDI,[RSP + 0x58]
CALL 0x00168bd0
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x20
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x37]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00121a00
MOV RDX,qword ptr [RSP + 0x18]
LAB_0016b311:
LEA RSI,[0x4ca341]
LEA RDI,[RSP + 0x38]
CALL 0x00121890
JMP 0x0016b324
LAB_0016b324:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x38]
CALL 0x00138dc0
LAB_0016b333:
MOV qword ptr [RSP],RAX
JMP 0x0016b339
LAB_0016b339:
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0x58]
CALL 0x001215e0
LEA RDI,[RSP + 0x38]
CALL 0x00121cc8
LEA RDI,[RSP + 0x37]
CALL 0x00121cb0
LEA RDI,[RSP + 0x58]
CALL 0x00121cc8
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x78]
ADD RSI,0x20
LEA RDX,[0x4ace60]
CALL 0x004235f0
ADD RSP,0x88
RET
|
/* google::protobuf::compiler::csharp::MessageFieldGenerator::WriteToString(google::protobuf::io::Printer*)
*/
void __thiscall
google::protobuf::compiler::csharp::MessageFieldGenerator::WriteToString
(MessageFieldGenerator *this,Printer *param_1)
{
string *this_00;
allocator local_51;
string local_50 [32];
csharp local_30 [32];
Printer *local_10;
MessageFieldGenerator *local_8;
local_10 = param_1;
local_8 = this;
GetFieldName_abi_cxx11_(local_30,*(FieldDescriptor **)(this + 0x10));
std::allocator<char>::allocator();
/* try { // try from 0016b311 to 0016b321 has its CatchHandler @ 0016b387 */
std::__cxx11::string::string(local_50,"field_name",&local_51);
/* try { // try from 0016b324 to 0016b332 has its CatchHandler @ 0016b397 */
this_00 = (string *)
std::
map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)(this + 0x20),local_50);
std::__cxx11::string::operator=(this_00,(string *)local_30);
std::__cxx11::string::~string(local_50);
std::allocator<char>::~allocator((allocator<char> *)&local_51);
std::__cxx11::string::~string((string *)local_30);
io::Printer::Print(local_10,(map *)(this + 0x20),
"PrintField(\"$field_name$\", has$property_name$, $name$_, writer);\n");
return;
}
| ||
52,507 | stbiw__jpg_DCT | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image-write.h | static void stbiw__jpg_DCT(float *d0p, float *d1p, float *d2p, float *d3p, float *d4p, float *d5p, float *d6p, float *d7p) {
float d0 = *d0p, d1 = *d1p, d2 = *d2p, d3 = *d3p, d4 = *d4p, d5 = *d5p, d6 = *d6p, d7 = *d7p;
float z1, z2, z3, z4, z5, z11, z13;
float tmp0 = d0 + d7;
float tmp7 = d0 - d7;
float tmp1 = d1 + d6;
float tmp6 = d1 - d6;
float tmp2 = d2 + d5;
float tmp5 = d2 - d5;
float tmp3 = d3 + d4;
float tmp4 = d3 - d4;
// Even part
float tmp10 = tmp0 + tmp3; // phase 2
float tmp13 = tmp0 - tmp3;
float tmp11 = tmp1 + tmp2;
float tmp12 = tmp1 - tmp2;
d0 = tmp10 + tmp11; // phase 3
d4 = tmp10 - tmp11;
z1 = (tmp12 + tmp13) * 0.707106781f; // c4
d2 = tmp13 + z1; // phase 5
d6 = tmp13 - z1;
// Odd part
tmp10 = tmp4 + tmp5; // phase 2
tmp11 = tmp5 + tmp6;
tmp12 = tmp6 + tmp7;
// The rotator is modified from fig 4-8 to avoid extra negations.
z5 = (tmp10 - tmp12) * 0.382683433f; // c6
z2 = tmp10 * 0.541196100f + z5; // c2-c6
z4 = tmp12 * 1.306562965f + z5; // c2+c6
z3 = tmp11 * 0.707106781f; // c4
z11 = tmp7 + z3; // phase 5
z13 = tmp7 - z3;
*d5p = z13 + z2; // phase 6
*d3p = z13 - z2;
*d1p = z11 + z4;
*d7p = z11 - z4;
*d0p = d0; *d2p = d2; *d4p = d4; *d6p = d6;
} | O1 | c | stbiw__jpg_DCT:
movq 0x10(%rsp), %r10
movq 0x8(%rsp), %rax
movss (%rdi), %xmm2
movss (%rsi), %xmm0
movss (%rdx), %xmm4
movss (%rcx), %xmm3
movss (%r8), %xmm5
movss (%r9), %xmm6
movss (%rax), %xmm7
movss (%r10), %xmm8
movaps %xmm2, %xmm1
addss %xmm8, %xmm1
subss %xmm8, %xmm2
movaps %xmm0, %xmm8
addss %xmm7, %xmm8
subss %xmm7, %xmm0
movaps %xmm4, %xmm7
addss %xmm6, %xmm7
subss %xmm6, %xmm4
movaps %xmm3, %xmm6
addss %xmm5, %xmm6
subss %xmm5, %xmm3
movaps %xmm6, %xmm5
addss %xmm1, %xmm5
subss %xmm6, %xmm1
movaps %xmm7, %xmm9
addss %xmm8, %xmm9
subss %xmm7, %xmm8
movaps %xmm9, %xmm6
addss %xmm5, %xmm6
subss %xmm9, %xmm5
addss %xmm1, %xmm8
movss 0x8b17(%rip), %xmm9 # 0x23f84
mulss %xmm9, %xmm8
movaps %xmm1, %xmm7
addss %xmm8, %xmm7
subss %xmm8, %xmm1
addss %xmm4, %xmm3
addss %xmm0, %xmm4
addss %xmm2, %xmm0
movaps %xmm3, %xmm8
subss %xmm0, %xmm8
mulss 0x8aeb(%rip), %xmm8 # 0x23f88
mulss 0x8ae7(%rip), %xmm3 # 0x23f8c
mulss 0x8ae3(%rip), %xmm0 # 0x23f90
addss %xmm8, %xmm3
addss %xmm8, %xmm0
mulss %xmm9, %xmm4
movaps %xmm2, %xmm8
addss %xmm4, %xmm8
subss %xmm4, %xmm2
movaps %xmm2, %xmm4
addss %xmm3, %xmm4
movss %xmm4, (%r9)
subss %xmm3, %xmm2
movss %xmm2, (%rcx)
movaps %xmm8, %xmm2
addss %xmm0, %xmm2
movss %xmm2, (%rsi)
subss %xmm0, %xmm8
movss %xmm8, (%r10)
movss %xmm6, (%rdi)
movss %xmm7, (%rdx)
movss %xmm5, (%r8)
movss %xmm1, (%rax)
retq
nopl (%rax)
| stbiw__jpg_DCT:
mov r10, [rsp+arg_8]
mov rax, [rsp+arg_0]
movss xmm2, dword ptr [rdi]
movss xmm0, dword ptr [rsi]
movss xmm4, dword ptr [rdx]
movss xmm3, dword ptr [rcx]
movss xmm5, dword ptr [r8]
movss xmm6, dword ptr [r9]
movss xmm7, dword ptr [rax]
movss xmm8, dword ptr [r10]
movaps xmm1, xmm2
addss xmm1, xmm8
subss xmm2, xmm8
movaps xmm8, xmm0
addss xmm8, xmm7
subss xmm0, xmm7
movaps xmm7, xmm4
addss xmm7, xmm6
subss xmm4, xmm6
movaps xmm6, xmm3
addss xmm6, xmm5
subss xmm3, xmm5
movaps xmm5, xmm6
addss xmm5, xmm1
subss xmm1, xmm6
movaps xmm9, xmm7
addss xmm9, xmm8
subss xmm8, xmm7
movaps xmm6, xmm9
addss xmm6, xmm5
subss xmm5, xmm9
addss xmm8, xmm1
movss xmm9, cs:dword_23F84
mulss xmm8, xmm9
movaps xmm7, xmm1
addss xmm7, xmm8
subss xmm1, xmm8
addss xmm3, xmm4
addss xmm4, xmm0
addss xmm0, xmm2
movaps xmm8, xmm3
subss xmm8, xmm0
mulss xmm8, cs:dword_23F88
mulss xmm3, cs:dword_23F8C
mulss xmm0, cs:dword_23F90
addss xmm3, xmm8
addss xmm0, xmm8
mulss xmm4, xmm9
movaps xmm8, xmm2
addss xmm8, xmm4
subss xmm2, xmm4
movaps xmm4, xmm2
addss xmm4, xmm3
movss dword ptr [r9], xmm4
subss xmm2, xmm3
movss dword ptr [rcx], xmm2
movaps xmm2, xmm8
addss xmm2, xmm0
movss dword ptr [rsi], xmm2
subss xmm8, xmm0
movss dword ptr [r10], xmm8
movss dword ptr [rdi], xmm6
movss dword ptr [rdx], xmm7
movss dword ptr [r8], xmm5
movss dword ptr [rax], xmm1
retn
| float * stbiw__jpg_DCT(
float *a1,
float *a2,
float *a3,
float *a4,
float *a5,
float *a6,
float *a7,
float *a8)
{
float *result; // rax
float v9; // xmm1_4
float v10; // xmm2_4
float v11; // xmm8_4
float v12; // xmm0_4
float v13; // xmm7_4
float v14; // xmm4_4
float v15; // xmm6_4
float v16; // xmm5_4
float v17; // xmm1_4
float v18; // xmm6_4
float v19; // xmm5_4
float v20; // xmm8_4
float v21; // xmm7_4
float v22; // xmm1_4
float v23; // xmm3_4
float v24; // xmm4_4
float v25; // xmm0_4
float v26; // xmm8_4
float v27; // xmm3_4
float v28; // xmm0_4
float v29; // xmm4_4
float v30; // xmm8_4
float v31; // xmm2_4
result = a7;
v9 = *a1 + *a8;
v10 = *a1 - *a8;
v11 = *a2 + *a7;
v12 = *a2 - *a7;
v13 = *a3 + *a6;
v14 = *a3 - *a6;
v15 = *a4 + *a5;
v16 = v15 + v9;
v17 = v9 - v15;
v18 = (float)(v13 + v11) + v16;
v19 = v16 - (float)(v13 + v11);
v20 = (float)((float)(v11 - v13) + v17) * 0.70710677;
v21 = v17 + v20;
v22 = v17 - v20;
v23 = (float)(*a4 - *a5) + v14;
v24 = v14 + v12;
v25 = v12 + v10;
v26 = (float)(v23 - v25) * 0.38268343;
v27 = (float)(v23 * 0.54119611) + v26;
v28 = (float)(v25 * 1.306563) + v26;
v29 = v24 * 0.70710677;
v30 = v10 + v29;
v31 = v10 - v29;
*a6 = v31 + v27;
*a4 = v31 - v27;
*a2 = v30 + v28;
*a8 = v30 - v28;
*a1 = v18;
*a3 = v21;
*a5 = v19;
*a7 = v22;
return result;
}
| stbiw__jpg_DCT:
MOV R10,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
MOVSS XMM2,dword ptr [RDI]
MOVSS XMM0,dword ptr [RSI]
MOVSS XMM4,dword ptr [RDX]
MOVSS XMM3,dword ptr [RCX]
MOVSS XMM5,dword ptr [R8]
MOVSS XMM6,dword ptr [R9]
MOVSS XMM7,dword ptr [RAX]
MOVSS XMM8,dword ptr [R10]
MOVAPS XMM1,XMM2
ADDSS XMM1,XMM8
SUBSS XMM2,XMM8
MOVAPS XMM8,XMM0
ADDSS XMM8,XMM7
SUBSS XMM0,XMM7
MOVAPS XMM7,XMM4
ADDSS XMM7,XMM6
SUBSS XMM4,XMM6
MOVAPS XMM6,XMM3
ADDSS XMM6,XMM5
SUBSS XMM3,XMM5
MOVAPS XMM5,XMM6
ADDSS XMM5,XMM1
SUBSS XMM1,XMM6
MOVAPS XMM9,XMM7
ADDSS XMM9,XMM8
SUBSS XMM8,XMM7
MOVAPS XMM6,XMM9
ADDSS XMM6,XMM5
SUBSS XMM5,XMM9
ADDSS XMM8,XMM1
MOVSS XMM9,dword ptr [0x00123f84]
MULSS XMM8,XMM9
MOVAPS XMM7,XMM1
ADDSS XMM7,XMM8
SUBSS XMM1,XMM8
ADDSS XMM3,XMM4
ADDSS XMM4,XMM0
ADDSS XMM0,XMM2
MOVAPS XMM8,XMM3
SUBSS XMM8,XMM0
MULSS XMM8,dword ptr [0x00123f88]
MULSS XMM3,dword ptr [0x00123f8c]
MULSS XMM0,dword ptr [0x00123f90]
ADDSS XMM3,XMM8
ADDSS XMM0,XMM8
MULSS XMM4,XMM9
MOVAPS XMM8,XMM2
ADDSS XMM8,XMM4
SUBSS XMM2,XMM4
MOVAPS XMM4,XMM2
ADDSS XMM4,XMM3
MOVSS dword ptr [R9],XMM4
SUBSS XMM2,XMM3
MOVSS dword ptr [RCX],XMM2
MOVAPS XMM2,XMM8
ADDSS XMM2,XMM0
MOVSS dword ptr [RSI],XMM2
SUBSS XMM8,XMM0
MOVSS dword ptr [R10],XMM8
MOVSS dword ptr [RDI],XMM6
MOVSS dword ptr [RDX],XMM7
MOVSS dword ptr [R8],XMM5
MOVSS dword ptr [RAX],XMM1
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void stbiw__jpg_DCT(float *param_1,float *param_2,float *param_3,float *param_4,float *param_5,
float *param_6,float *param_7,float *param_8)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
float fVar7;
float fVar8;
float fVar9;
float fVar10;
fVar2 = *param_1 + *param_8;
fVar3 = *param_1 - *param_8;
fVar8 = *param_2 + *param_7;
fVar1 = *param_2 - *param_7;
fVar7 = *param_3 + *param_6;
fVar4 = *param_3 - *param_6;
fVar6 = *param_4 + *param_5;
fVar5 = fVar6 + fVar2;
fVar2 = fVar2 - fVar6;
fVar10 = fVar7 + fVar8;
fVar9 = ((fVar8 - fVar7) + fVar2) * DAT_00123f84;
fVar8 = (*param_4 - *param_5) + fVar4;
fVar6 = fVar1 + fVar3;
fVar7 = (fVar8 - fVar6) * _DAT_00123f88;
fVar8 = fVar8 * _DAT_00123f8c + fVar7;
fVar7 = fVar6 * _DAT_00123f90 + fVar7;
fVar1 = (fVar4 + fVar1) * DAT_00123f84;
fVar6 = fVar3 + fVar1;
fVar3 = fVar3 - fVar1;
*param_6 = fVar3 + fVar8;
*param_4 = fVar3 - fVar8;
*param_2 = fVar6 + fVar7;
*param_8 = fVar6 - fVar7;
*param_1 = fVar10 + fVar5;
*param_3 = fVar2 + fVar9;
*param_5 = fVar5 - fVar10;
*param_7 = fVar2 - fVar9;
return;
}
| |
52,508 | fn_ext | eloqsql/mysys/mf_fn_ext.c | char *fn_ext(const char *name)
{
register const char *pos, *gpos;
DBUG_ENTER("fn_ext");
DBUG_PRINT("mfunkt",("name: '%s'",name));
#if defined(FN_DEVCHAR) || defined(BASKSLASH_MBTAIL)
{
char buff[FN_REFLEN];
size_t res_length;
gpos= name+ dirname_part(buff,(char*) name, &res_length);
}
#else
if (!(gpos= strrchr(name, FN_LIBCHAR)))
gpos= name;
#endif
pos= strchr(gpos, FN_EXTCHAR);
DBUG_RETURN((char*) (pos ? pos : strend(gpos)));
} | O3 | c | fn_ext:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x2f, %esi
callq 0x3ab10
movq %rax, %rbx
testq %rax, %rax
cmoveq %r14, %rbx
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x3a5d0
testq %rax, %rax
je 0x7adfd
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xb68f8
| fn_ext:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rdi
mov esi, 2Fh ; '/'
call _strrchr
mov rbx, rax
test rax, rax
cmovz rbx, r14
mov rdi, rbx
mov esi, 2Eh ; '.'
call _strchr
test rax, rax
jz short loc_7ADFD
pop rbx
pop r14
pop rbp
retn
loc_7ADFD:
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp strend
| long long fn_ext(long long a1)
{
long long v1; // rdx
long long v2; // rcx
long long v3; // rbx
long long result; // rax
v3 = strrchr(a1, 47LL);
if ( !v3 )
v3 = a1;
result = strchr(v3, 46LL, v1, v2);
if ( !result )
return strend(v3);
return result;
}
| fn_ext:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RDI
MOV ESI,0x2f
CALL 0x0013ab10
MOV RBX,RAX
TEST RAX,RAX
CMOVZ RBX,R14
MOV RDI,RBX
MOV ESI,0x2e
CALL 0x0013a5d0
TEST RAX,RAX
JZ 0x0017adfd
POP RBX
POP R14
POP RBP
RET
LAB_0017adfd:
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x001b68f8
|
void fn_ext(char *param_1)
{
char *__s;
char *pcVar1;
__s = strrchr(param_1,0x2f);
if (__s == (char *)0x0) {
__s = param_1;
}
pcVar1 = strchr(__s,0x2e);
if (pcVar1 != (char *)0x0) {
return;
}
strend(__s);
return;
}
| |
52,509 | sha256_process | eloqsql/storage/maria/libmarias3/src/sha256-internal.c | int sha256_process(struct sha256_state *md, const unsigned char *in,
unsigned long inlen)
{
unsigned long n;
if (md->curlen >= sizeof(md->buf))
return -1;
while (inlen > 0)
{
if (md->curlen == 0 && inlen >= SHA256_BLOCK_SIZE)
{
if (sha256_compress(md, (unsigned char *) in) < 0)
return -1;
md->length += SHA256_BLOCK_SIZE * 8;
in += SHA256_BLOCK_SIZE;
inlen -= SHA256_BLOCK_SIZE;
}
else
{
n = MIN(inlen, (SHA256_BLOCK_SIZE - md->curlen));
memcpy(md->buf + md->curlen, in, n);
md->curlen += n;
in += n;
inlen -= n;
if (md->curlen == SHA256_BLOCK_SIZE)
{
if (sha256_compress(md, md->buf) < 0)
return -1;
md->length += 8 * SHA256_BLOCK_SIZE;
md->curlen = 0;
}
}
}
return 0;
} | O0 | c | sha256_process:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
cmpq $0x40, %rax
jb 0x3168d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x317d0
jmp 0x3168f
cmpq $0x0, -0x20(%rbp)
jbe 0x317c9
movq -0x10(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x316f7
cmpq $0x40, -0x20(%rbp)
jb 0x316f7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x31930
cmpl $0x0, %eax
jge 0x316c9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x317d0
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x200, %rcx # imm = 0x200
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
subq $0x40, %rax
movq %rax, -0x20(%rbp)
jmp 0x317c4
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rdx
movl $0x40, %ecx
subl 0x28(%rdx), %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x31718
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x3172a
movq -0x10(%rbp), %rcx
movl $0x40, %eax
subl 0x28(%rcx), %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
addq $0x2c, %rdi
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x270d0
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x28(%rax), %ecx
addq %rdx, %rcx
movl %ecx, 0x28(%rax)
movq -0x28(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x40, 0x28(%rax)
jne 0x317c2
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x2c, %rsi
callq 0x31930
cmpl $0x0, %eax
jge 0x317a6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x317d0
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x200, %rcx # imm = 0x200
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x28(%rax)
jmp 0x317c4
jmp 0x3168f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| sha256_process:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov eax, [rax+28h]
cmp rax, 40h ; '@'
jb short loc_3168D
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_317D0
loc_3168D:
jmp short $+2
loc_3168F:
cmp [rbp+var_20], 0
jbe loc_317C9
mov rax, [rbp+var_10]
cmp dword ptr [rax+28h], 0
jnz short loc_316F7
cmp [rbp+var_20], 40h ; '@'
jb short loc_316F7
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call sha256_compress
cmp eax, 0
jge short loc_316C9
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_317D0
loc_316C9:
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 200h
mov [rax], rcx
mov rax, [rbp+var_18]
add rax, 40h ; '@'
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
sub rax, 40h ; '@'
mov [rbp+var_20], rax
jmp loc_317C4
loc_316F7:
mov rax, [rbp+var_20]
mov rdx, [rbp+var_10]
mov ecx, 40h ; '@'
sub ecx, [rdx+28h]
mov ecx, ecx
cmp rax, rcx
jnb short loc_31718
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
jmp short loc_3172A
loc_31718:
mov rcx, [rbp+var_10]
mov eax, 40h ; '@'
sub eax, [rcx+28h]
mov eax, eax
mov [rbp+var_30], rax
loc_3172A:
mov rax, [rbp+var_30]
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
add rdi, 2Ch ; ','
mov rax, [rbp+var_10]
mov eax, [rax+28h]
add rdi, rax
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call _memcpy
mov rdx, [rbp+var_28]
mov rax, [rbp+var_10]
mov ecx, [rax+28h]
add rcx, rdx
mov [rax+28h], ecx
mov rax, [rbp+var_28]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rcx, [rbp+var_28]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
cmp dword ptr [rax+28h], 40h ; '@'
jnz short loc_317C2
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 2Ch ; ','
call sha256_compress
cmp eax, 0
jge short loc_317A6
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_317D0
loc_317A6:
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 200h
mov [rax], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 0
loc_317C2:
jmp short $+2
loc_317C4:
jmp loc_3168F
loc_317C9:
mov [rbp+var_4], 0
loc_317D0:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long sha256_process(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v4; // [rsp+0h] [rbp-30h]
if ( *(unsigned int *)(a1 + 40) < 0x40uLL )
{
while ( a3 )
{
if ( *(_DWORD *)(a1 + 40) || a3 < 0x40 )
{
if ( a3 >= (unsigned int)(64 - *(_DWORD *)(a1 + 40)) )
v4 = (unsigned int)(64 - *(_DWORD *)(a1 + 40));
else
v4 = a3;
memcpy(*(unsigned int *)(a1 + 40) + a1 + 44, a2, v4);
*(_DWORD *)(a1 + 40) += v4;
a2 += v4;
a3 -= v4;
if ( *(_DWORD *)(a1 + 40) == 64 )
{
if ( (int)sha256_compress(a1, a1 + 44) < 0 )
return (unsigned int)-1;
*(_QWORD *)a1 += 512LL;
*(_DWORD *)(a1 + 40) = 0;
}
}
else
{
if ( (int)sha256_compress(a1, a2) < 0 )
return (unsigned int)-1;
*(_QWORD *)a1 += 512LL;
a2 += 64LL;
a3 -= 64LL;
}
}
return 0;
}
else
{
return (unsigned int)-1;
}
}
| sha256_process:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x28]
CMP RAX,0x40
JC 0x0013168d
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001317d0
LAB_0013168d:
JMP 0x0013168f
LAB_0013168f:
CMP qword ptr [RBP + -0x20],0x0
JBE 0x001317c9
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x28],0x0
JNZ 0x001316f7
CMP qword ptr [RBP + -0x20],0x40
JC 0x001316f7
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00131930
CMP EAX,0x0
JGE 0x001316c9
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001317d0
LAB_001316c9:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x200
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x40
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,0x40
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001317c4
LAB_001316f7:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,0x40
SUB ECX,dword ptr [RDX + 0x28]
MOV ECX,ECX
CMP RAX,RCX
JNC 0x00131718
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0013172a
LAB_00131718:
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,0x40
SUB EAX,dword ptr [RCX + 0x28]
MOV EAX,EAX
MOV qword ptr [RBP + -0x30],RAX
LAB_0013172a:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x2c
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x28]
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001270d0
MOV RDX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x28]
ADD RCX,RDX
MOV dword ptr [RAX + 0x28],ECX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x28],0x40
JNZ 0x001317c2
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x2c
CALL 0x00131930
CMP EAX,0x0
JGE 0x001317a6
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001317d0
LAB_001317a6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x200
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x0
LAB_001317c2:
JMP 0x001317c4
LAB_001317c4:
JMP 0x0013168f
LAB_001317c9:
MOV dword ptr [RBP + -0x4],0x0
LAB_001317d0:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 sha256_process(long *param_1,void *param_2,ulong param_3)
{
int iVar1;
size_t local_38;
ulong local_28;
void *local_20;
int4 local_c;
local_28 = param_3;
local_20 = param_2;
if (*(uint *)(param_1 + 5) < 0x40) {
while (local_28 != 0) {
if (((int)param_1[5] == 0) && (0x3f < local_28)) {
iVar1 = sha256_compress(param_1,local_20);
if (iVar1 < 0) {
return 0xffffffff;
}
*param_1 = *param_1 + 0x200;
local_20 = (void *)((long)local_20 + 0x40);
local_28 = local_28 - 0x40;
}
else {
if (local_28 < 0x40 - (int)param_1[5]) {
local_38 = local_28;
}
else {
local_38 = (size_t)(0x40 - (int)param_1[5]);
}
memcpy((void *)((long)param_1 + (ulong)*(uint *)(param_1 + 5) + 0x2c),local_20,local_38);
*(int *)(param_1 + 5) = (int)param_1[5] + (int)local_38;
local_20 = (void *)(local_38 + (long)local_20);
local_28 = local_28 - local_38;
if ((int)param_1[5] == 0x40) {
iVar1 = sha256_compress(param_1,(long)param_1 + 0x2c);
if (iVar1 < 0) {
return 0xffffffff;
}
*param_1 = *param_1 + 0x200;
*(int4 *)(param_1 + 5) = 0;
}
}
}
local_c = 0;
}
else {
local_c = 0xffffffff;
}
return local_c;
}
| |
52,510 | compact_properties | bluesky950520[P]quickjs/quickjs.c | static int compact_properties(JSContext *ctx, JSObject *p)
{
JSShape *sh, *old_sh;
void *sh_alloc;
intptr_t h;
uint32_t new_hash_size, i, j, new_hash_mask, new_size;
JSShapeProperty *old_pr, *pr;
JSProperty *prop, *new_prop;
sh = p->shape;
assert(!sh->is_hashed);
new_size = max_int(JS_PROP_INITIAL_SIZE,
sh->prop_count - sh->deleted_prop_count);
assert(new_size <= sh->prop_size);
new_hash_size = sh->prop_hash_mask + 1;
while ((new_hash_size / 2) >= new_size)
new_hash_size = new_hash_size / 2;
new_hash_mask = new_hash_size - 1;
/* 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);
memcpy(sh, old_sh, sizeof(JSShape));
list_add_tail(&sh->header.link, &ctx->rt->gc_obj_list);
memset(prop_hash_end(sh) - new_hash_size, 0,
sizeof(prop_hash_end(sh)[0]) * new_hash_size);
j = 0;
old_pr = old_sh->prop;
pr = sh->prop;
prop = p->prop;
for(i = 0; i < sh->prop_count; i++) {
if (old_pr->atom != JS_ATOM_NULL) {
pr->atom = old_pr->atom;
pr->flags = old_pr->flags;
h = ((uintptr_t)old_pr->atom & new_hash_mask);
pr->hash_next = prop_hash_end(sh)[-h - 1];
prop_hash_end(sh)[-h - 1] = j + 1;
prop[j] = prop[i];
j++;
pr++;
}
old_pr++;
}
assert(j == (sh->prop_count - sh->deleted_prop_count));
sh->prop_hash_mask = new_hash_mask;
sh->prop_size = new_size;
sh->deleted_prop_count = 0;
sh->prop_count = j;
p->shape = sh;
js_free(ctx, get_alloc_from_shape(old_sh));
/* reduce the size of the object properties */
new_prop = js_realloc(ctx, p->prop, sizeof(new_prop[0]) * new_size);
if (new_prop)
p->prop = new_prop;
return 0;
} | O0 | c | compact_properties:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movl 0x28(%rax), %esi
movq 0x68(%rsp), %rax
subl 0x2c(%rax), %esi
movl $0x2, %edi
callq 0x63600
movl %eax, 0x3c(%rsp)
movq 0x68(%rsp), %rax
movl 0x20(%rax), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
shrl %eax
cmpl 0x3c(%rsp), %eax
jb 0x67c94
movl 0x4c(%rsp), %eax
shrl %eax
movl %eax, 0x4c(%rsp)
jmp 0x67c7c
movl 0x4c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x40(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, %edi
movl 0x3c(%rsp), %eax
movl %eax, %esi
callq 0x32330
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x27fa0
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
jne 0x67cee
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
jmp 0x67f6e
movq 0x58(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %esi
callq 0x63f20
movq %rax, 0x68(%rsp)
movq 0x60(%rsp), %rdi
addq $0x8, %rdi
callq 0x29f20
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
movl $0x40, %edx
callq 0xe610
movq 0x68(%rsp), %rdi
addq $0x8, %rdi
movq 0x78(%rsp), %rax
movq 0x18(%rax), %rsi
addq $0x98, %rsi
callq 0x29d40
movq 0x68(%rsp), %rdi
callq 0x63ba0
movq %rax, %rdi
movl 0x4c(%rsp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
shlq $0x2, %rax
addq %rax, %rdi
movl 0x4c(%rsp), %eax
movl %eax, %edx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0xe370
movl $0x0, 0x44(%rsp)
movq 0x60(%rsp), %rax
addq $0x40, %rax
movq %rax, 0x30(%rsp)
movq 0x68(%rsp), %rax
addq $0x40, %rax
movq %rax, 0x28(%rsp)
movq 0x70(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0x48(%rsp)
movl 0x48(%rsp), %eax
movq 0x68(%rsp), %rcx
cmpl 0x28(%rcx), %eax
jae 0x67ece
movq 0x30(%rsp), %rax
cmpl $0x0, 0x4(%rax)
je 0x67eb0
movq 0x30(%rsp), %rax
movl 0x4(%rax), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x30(%rsp), %rax
movl (%rax), %edx
shrl $0x1a, %edx
movq 0x28(%rsp), %rax
movl (%rax), %ecx
andl $0x3f, %edx
shll $0x1a, %edx
andl $0x3ffffff, %ecx # imm = 0x3FFFFFF
orl %edx, %ecx
movl %ecx, (%rax)
movq 0x30(%rsp), %rax
movl 0x4(%rax), %eax
movl 0x40(%rsp), %ecx
andq %rcx, %rax
movq %rax, 0x50(%rsp)
movq 0x68(%rsp), %rdi
callq 0x63ba0
xorl %ecx, %ecx
subq 0x50(%rsp), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %edx
movq 0x28(%rsp), %rax
movl (%rax), %ecx
andl $0x3ffffff, %edx # imm = 0x3FFFFFF
andl $0xfc000000, %ecx # imm = 0xFC000000
orl %edx, %ecx
movl %ecx, (%rax)
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movq 0x68(%rsp), %rdi
callq 0x63ba0
movl 0xc(%rsp), %edx
xorl %ecx, %ecx
subq 0x50(%rsp), %rcx
subq $0x1, %rcx
movl %edx, (%rax,%rcx,4)
movq 0x20(%rsp), %rax
movl 0x44(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x20(%rsp), %rcx
movl 0x48(%rsp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
movq 0x28(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x30(%rsp)
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x67dad
movl 0x40(%rsp), %ecx
movq 0x68(%rsp), %rax
movl %ecx, 0x20(%rax)
movl 0x3c(%rsp), %ecx
movq 0x68(%rsp), %rax
movl %ecx, 0x24(%rax)
movq 0x68(%rsp), %rax
movl $0x0, 0x2c(%rax)
movl 0x44(%rsp), %ecx
movq 0x68(%rsp), %rax
movl %ecx, 0x28(%rax)
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x78(%rsp), %rax
movq %rax, (%rsp)
movq 0x60(%rsp), %rdi
callq 0x63b50
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x280a0
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rax
movq 0x20(%rax), %rsi
movl 0x3c(%rsp), %eax
movl %eax, %edx
shlq $0x4, %rdx
callq 0x280d0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x67f63
movq 0x18(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x20(%rax)
movl $0x0, 0x84(%rsp)
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopl (%rax)
| compact_properties:
sub rsp, 88h
mov [rsp+88h+var_10], rdi
mov [rsp+88h+var_18], rsi
mov rax, [rsp+88h+var_18]
mov rax, [rax+18h]
mov [rsp+88h+var_20], rax
mov rax, [rsp+88h+var_20]
mov esi, [rax+28h]
mov rax, [rsp+88h+var_20]
sub esi, [rax+2Ch]
mov edi, 2
call max_int_1
mov [rsp+88h+var_4C], eax
mov rax, [rsp+88h+var_20]
mov eax, [rax+20h]
add eax, 1
mov [rsp+88h+var_3C], eax
loc_67C7C:
mov eax, [rsp+88h+var_3C]
shr eax, 1
cmp eax, [rsp+88h+var_4C]
jb short loc_67C94
mov eax, [rsp+88h+var_3C]
shr eax, 1
mov [rsp+88h+var_3C], eax
jmp short loc_67C7C
loc_67C94:
mov eax, [rsp+88h+var_3C]
sub eax, 1
mov [rsp+88h+var_48], eax
mov rax, [rsp+88h+var_20]
mov [rsp+88h+var_28], rax
mov rax, [rsp+88h+var_10]
mov [rsp+88h+var_78], rax
mov eax, [rsp+88h+var_3C]
mov edi, eax
mov eax, [rsp+88h+var_4C]
mov esi, eax
call get_shape_size
mov rdi, [rsp+88h+var_78]
mov rsi, rax
call js_malloc
mov [rsp+88h+var_30], rax
cmp [rsp+88h+var_30], 0
jnz short loc_67CEE
mov [rsp+88h+var_4], 0FFFFFFFFh
jmp loc_67F6E
loc_67CEE:
mov rdi, [rsp+88h+var_30]
mov eax, [rsp+88h+var_3C]
mov esi, eax
call get_shape_from_alloc
mov [rsp+88h+var_20], rax
mov rdi, [rsp+88h+var_28]
add rdi, 8
call list_del_1
mov rdi, [rsp+88h+var_20]
mov rsi, [rsp+88h+var_28]
mov edx, 40h ; '@'
call _memcpy
mov rdi, [rsp+88h+var_20]
add rdi, 8
mov rax, [rsp+88h+var_10]
mov rsi, [rax+18h]
add rsi, 98h
call list_add_tail_1
mov rdi, [rsp+88h+var_20]
call prop_hash_end
mov rdi, rax
mov eax, [rsp+88h+var_3C]
mov ecx, eax
xor eax, eax
sub rax, rcx
shl rax, 2
add rdi, rax
mov eax, [rsp+88h+var_3C]
mov edx, eax
shl rdx, 2
xor esi, esi
call _memset
mov [rsp+88h+var_44], 0
mov rax, [rsp+88h+var_28]
add rax, 40h ; '@'
mov [rsp+88h+var_58], rax
mov rax, [rsp+88h+var_20]
add rax, 40h ; '@'
mov [rsp+88h+var_60], rax
mov rax, [rsp+88h+var_18]
mov rax, [rax+20h]
mov [rsp+88h+var_68], rax
mov [rsp+88h+var_40], 0
loc_67DAD:
mov eax, [rsp+88h+var_40]
mov rcx, [rsp+88h+var_20]
cmp eax, [rcx+28h]
jnb loc_67ECE
mov rax, [rsp+88h+var_58]
cmp dword ptr [rax+4], 0
jz loc_67EB0
mov rax, [rsp+88h+var_58]
mov ecx, [rax+4]
mov rax, [rsp+88h+var_60]
mov [rax+4], ecx
mov rax, [rsp+88h+var_58]
mov edx, [rax]
shr edx, 1Ah
mov rax, [rsp+88h+var_60]
mov ecx, [rax]
and edx, 3Fh
shl edx, 1Ah
and ecx, 3FFFFFFh
or ecx, edx
mov [rax], ecx
mov rax, [rsp+88h+var_58]
mov eax, [rax+4]
mov ecx, [rsp+88h+var_48]
and rax, rcx
mov [rsp+88h+var_38], rax
mov rdi, [rsp+88h+var_20]
call prop_hash_end
xor ecx, ecx
sub rcx, [rsp+88h+var_38]
sub rcx, 1
mov edx, [rax+rcx*4]
mov rax, [rsp+88h+var_60]
mov ecx, [rax]
and edx, 3FFFFFFh
and ecx, 0FC000000h
or ecx, edx
mov [rax], ecx
mov eax, [rsp+88h+var_44]
add eax, 1
mov [rsp+88h+var_7C], eax
mov rdi, [rsp+88h+var_20]
call prop_hash_end
mov edx, [rsp+88h+var_7C]
xor ecx, ecx
sub rcx, [rsp+88h+var_38]
sub rcx, 1
mov [rax+rcx*4], edx
mov rax, [rsp+88h+var_68]
mov ecx, [rsp+88h+var_44]
shl rcx, 4
add rax, rcx
mov rcx, [rsp+88h+var_68]
mov edx, [rsp+88h+var_40]
shl rdx, 4
add rcx, rdx
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov eax, [rsp+88h+var_44]
add eax, 1
mov [rsp+88h+var_44], eax
mov rax, [rsp+88h+var_60]
add rax, 8
mov [rsp+88h+var_60], rax
loc_67EB0:
mov rax, [rsp+88h+var_58]
add rax, 8
mov [rsp+88h+var_58], rax
mov eax, [rsp+88h+var_40]
add eax, 1
mov [rsp+88h+var_40], eax
jmp loc_67DAD
loc_67ECE:
mov ecx, [rsp+88h+var_48]
mov rax, [rsp+88h+var_20]
mov [rax+20h], ecx
mov ecx, [rsp+88h+var_4C]
mov rax, [rsp+88h+var_20]
mov [rax+24h], ecx
mov rax, [rsp+88h+var_20]
mov dword ptr [rax+2Ch], 0
mov ecx, [rsp+88h+var_44]
mov rax, [rsp+88h+var_20]
mov [rax+28h], ecx
mov rcx, [rsp+88h+var_20]
mov rax, [rsp+88h+var_18]
mov [rax+18h], rcx
mov rax, [rsp+88h+var_10]
mov [rsp+88h+var_88], rax
mov rdi, [rsp+88h+var_28]
call get_alloc_from_shape
mov rdi, [rsp+88h+var_88]
mov rsi, rax
call js_free
mov rdi, [rsp+88h+var_10]
mov rax, [rsp+88h+var_18]
mov rsi, [rax+20h]
mov eax, [rsp+88h+var_4C]
mov edx, eax
shl rdx, 4
call js_realloc
mov [rsp+88h+var_70], rax
cmp [rsp+88h+var_70], 0
jz short loc_67F63
mov rcx, [rsp+88h+var_70]
mov rax, [rsp+88h+var_18]
mov [rax+20h], rcx
loc_67F63:
mov [rsp+88h+var_4], 0
loc_67F6E:
mov eax, [rsp+88h+var_4]
add rsp, 88h
retn
| long long compact_properties(long long a1, long long a2)
{
long long shape_size; // rax
long long v3; // rax
_QWORD *v4; // rax
_QWORD *v5; // rcx
long long alloc_from_shape; // rax
long long v8; // [rsp+18h] [rbp-70h]
long long v9; // [rsp+20h] [rbp-68h]
_DWORD *v10; // [rsp+28h] [rbp-60h]
_DWORD *v11; // [rsp+30h] [rbp-58h]
unsigned int v12; // [rsp+3Ch] [rbp-4Ch]
unsigned int v13; // [rsp+40h] [rbp-48h]
unsigned int v14; // [rsp+44h] [rbp-44h]
unsigned int j; // [rsp+48h] [rbp-40h]
unsigned int i; // [rsp+4Ch] [rbp-3Ch]
long long v17; // [rsp+50h] [rbp-38h]
long long v18; // [rsp+58h] [rbp-30h]
long long v19; // [rsp+60h] [rbp-28h]
_DWORD *v20; // [rsp+68h] [rbp-20h]
_DWORD *shape_from_alloc; // [rsp+68h] [rbp-20h]
v20 = *(_DWORD **)(a2 + 24);
v12 = max_int_1(2u, v20[10] - v20[11]);
for ( i = v20[8] + 1; i >> 1 >= v12; i >>= 1 )
;
v13 = i - 1;
v19 = (long long)v20;
shape_size = get_shape_size(i, v12);
v18 = js_malloc(a1, shape_size);
if ( v18 )
{
shape_from_alloc = (_DWORD *)get_shape_from_alloc(v18, i);
list_del_1((_QWORD *)(v19 + 8));
memcpy(shape_from_alloc, v19, 64LL);
list_add_tail_1((long long)(shape_from_alloc + 2), (_QWORD *)(*(_QWORD *)(a1 + 24) + 152LL));
v3 = prop_hash_end((long long)shape_from_alloc);
memset(-4LL * i + v3, 0LL, 4LL * i);
v14 = 0;
v11 = (_DWORD *)(v19 + 64);
v10 = shape_from_alloc + 16;
v9 = *(_QWORD *)(a2 + 32);
for ( j = 0; j < shape_from_alloc[10]; ++j )
{
if ( v11[1] )
{
v10[1] = v11[1];
*v10 = ((unsigned __int8)HIBYTE(*v11) >> 2 << 26) | *v10 & 0x3FFFFFF;
v17 = v13 & v11[1];
*v10 = *(_DWORD *)(prop_hash_end((long long)shape_from_alloc) + 4 * (-v17 - 1)) & 0x3FFFFFF | *v10 & 0xFC000000;
*(_DWORD *)(prop_hash_end((long long)shape_from_alloc) + 4 * (-v17 - 1)) = v14 + 1;
v4 = (_QWORD *)(16LL * v14 + v9);
v5 = (_QWORD *)(16LL * j + v9);
*v4 = *v5;
v4[1] = v5[1];
++v14;
v10 += 2;
}
v11 += 2;
}
shape_from_alloc[8] = v13;
shape_from_alloc[9] = v12;
shape_from_alloc[11] = 0;
shape_from_alloc[10] = v14;
*(_QWORD *)(a2 + 24) = shape_from_alloc;
alloc_from_shape = get_alloc_from_shape(v19);
js_free(a1, alloc_from_shape);
v8 = js_realloc(a1, *(_QWORD *)(a2 + 32), 16LL * v12);
if ( v8 )
*(_QWORD *)(a2 + 32) = v8;
return 0;
}
else
{
return (unsigned int)-1;
}
}
| compact_properties:
SUB RSP,0x88
MOV qword ptr [RSP + 0x78],RDI
MOV qword ptr [RSP + 0x70],RSI
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV ESI,dword ptr [RAX + 0x28]
MOV RAX,qword ptr [RSP + 0x68]
SUB ESI,dword ptr [RAX + 0x2c]
MOV EDI,0x2
CALL 0x00163600
MOV dword ptr [RSP + 0x3c],EAX
MOV RAX,qword ptr [RSP + 0x68]
MOV EAX,dword ptr [RAX + 0x20]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4c],EAX
LAB_00167c7c:
MOV EAX,dword ptr [RSP + 0x4c]
SHR EAX,0x1
CMP EAX,dword ptr [RSP + 0x3c]
JC 0x00167c94
MOV EAX,dword ptr [RSP + 0x4c]
SHR EAX,0x1
MOV dword ptr [RSP + 0x4c],EAX
JMP 0x00167c7c
LAB_00167c94:
MOV EAX,dword ptr [RSP + 0x4c]
SUB EAX,0x1
MOV dword ptr [RSP + 0x40],EAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x10],RAX
MOV EAX,dword ptr [RSP + 0x4c]
MOV EDI,EAX
MOV EAX,dword ptr [RSP + 0x3c]
MOV ESI,EAX
CALL 0x00132330
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RAX
CALL 0x00127fa0
MOV qword ptr [RSP + 0x58],RAX
CMP qword ptr [RSP + 0x58],0x0
JNZ 0x00167cee
MOV dword ptr [RSP + 0x84],0xffffffff
JMP 0x00167f6e
LAB_00167cee:
MOV RDI,qword ptr [RSP + 0x58]
MOV EAX,dword ptr [RSP + 0x4c]
MOV ESI,EAX
CALL 0x00163f20
MOV qword ptr [RSP + 0x68],RAX
MOV RDI,qword ptr [RSP + 0x60]
ADD RDI,0x8
CALL 0x00129f20
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x60]
MOV EDX,0x40
CALL 0x0010e610
MOV RDI,qword ptr [RSP + 0x68]
ADD RDI,0x8
MOV RAX,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RAX + 0x18]
ADD RSI,0x98
CALL 0x00129d40
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x00163ba0
MOV RDI,RAX
MOV EAX,dword ptr [RSP + 0x4c]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
SHL RAX,0x2
ADD RDI,RAX
MOV EAX,dword ptr [RSP + 0x4c]
MOV EDX,EAX
SHL RDX,0x2
XOR ESI,ESI
CALL 0x0010e370
MOV dword ptr [RSP + 0x44],0x0
MOV RAX,qword ptr [RSP + 0x60]
ADD RAX,0x40
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x68]
ADD RAX,0x40
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x48],0x0
LAB_00167dad:
MOV EAX,dword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x68]
CMP EAX,dword ptr [RCX + 0x28]
JNC 0x00167ece
MOV RAX,qword ptr [RSP + 0x30]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x00167eb0
MOV RAX,qword ptr [RSP + 0x30]
MOV ECX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RSP + 0x28]
MOV dword ptr [RAX + 0x4],ECX
MOV RAX,qword ptr [RSP + 0x30]
MOV EDX,dword ptr [RAX]
SHR EDX,0x1a
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RAX]
AND EDX,0x3f
SHL EDX,0x1a
AND ECX,0x3ffffff
OR ECX,EDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RAX + 0x4]
MOV ECX,dword ptr [RSP + 0x40]
AND RAX,RCX
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x00163ba0
XOR ECX,ECX
SUB RCX,qword ptr [RSP + 0x50]
SUB RCX,0x1
MOV EDX,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RAX]
AND EDX,0x3ffffff
AND ECX,0xfc000000
OR ECX,EDX
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RSP + 0x44]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x00163ba0
MOV EDX,dword ptr [RSP + 0xc]
XOR ECX,ECX
SUB RCX,qword ptr [RSP + 0x50]
SUB RCX,0x1
MOV dword ptr [RAX + RCX*0x4],EDX
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x44]
SHL RCX,0x4
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x20]
MOV EDX,dword ptr [RSP + 0x48]
SHL RDX,0x4
ADD RCX,RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RSP + 0x44]
ADD EAX,0x1
MOV dword ptr [RSP + 0x44],EAX
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x8
MOV qword ptr [RSP + 0x28],RAX
LAB_00167eb0:
MOV RAX,qword ptr [RSP + 0x30]
ADD RAX,0x8
MOV qword ptr [RSP + 0x30],RAX
MOV EAX,dword ptr [RSP + 0x48]
ADD EAX,0x1
MOV dword ptr [RSP + 0x48],EAX
JMP 0x00167dad
LAB_00167ece:
MOV ECX,dword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x68]
MOV dword ptr [RAX + 0x20],ECX
MOV ECX,dword ptr [RSP + 0x3c]
MOV RAX,qword ptr [RSP + 0x68]
MOV dword ptr [RAX + 0x24],ECX
MOV RAX,qword ptr [RSP + 0x68]
MOV dword ptr [RAX + 0x2c],0x0
MOV ECX,dword ptr [RSP + 0x44]
MOV RAX,qword ptr [RSP + 0x68]
MOV dword ptr [RAX + 0x28],ECX
MOV RCX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00163b50
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
CALL 0x001280a0
MOV RDI,qword ptr [RSP + 0x78]
MOV RAX,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RAX + 0x20]
MOV EAX,dword ptr [RSP + 0x3c]
MOV EDX,EAX
SHL RDX,0x4
CALL 0x001280d0
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],0x0
JZ 0x00167f63
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RAX + 0x20],RCX
LAB_00167f63:
MOV dword ptr [RSP + 0x84],0x0
LAB_00167f6e:
MOV EAX,dword ptr [RSP + 0x84]
ADD RSP,0x88
RET
|
int4 compact_properties(int8 param_1,long param_2)
{
void *__src;
uint uVar1;
int8 uVar2;
long lVar3;
void *__dest;
ulong uVar4;
long lVar5;
int8 *puVar6;
int8 *puVar7;
uint *local_60;
uint *local_58;
uint local_44;
uint local_40;
uint local_3c;
int4 local_4;
__src = *(void **)(param_2 + 0x18);
uVar1 = max_int(2,*(int *)((long)__src + 0x28) - *(int *)((long)__src + 0x2c));
for (local_3c = *(int *)((long)__src + 0x20) + 1; uVar1 <= local_3c >> 1; local_3c = local_3c >> 1
) {
}
uVar2 = get_shape_size(local_3c,uVar1);
lVar3 = js_malloc(param_1,uVar2);
if (lVar3 == 0) {
local_4 = 0xffffffff;
}
else {
__dest = (void *)get_shape_from_alloc(lVar3,local_3c);
list_del((long)__src + 8);
memcpy(__dest,__src,0x40);
list_add_tail((long)__dest + 8);
lVar3 = prop_hash_end(__dest);
memset((void *)(lVar3 + (ulong)local_3c * -4),0,(ulong)local_3c << 2);
local_44 = 0;
local_58 = (uint *)((long)__src + 0x40);
local_60 = (uint *)((long)__dest + 0x40);
lVar3 = *(long *)(param_2 + 0x20);
for (local_40 = 0; local_40 < *(uint *)((long)__dest + 0x28); local_40 = local_40 + 1) {
if (local_58[1] != 0) {
local_60[1] = local_58[1];
*local_60 = *local_60 & 0x3ffffff | *local_58 & 0xfc000000;
uVar4 = (ulong)(local_58[1] & local_3c - 1);
lVar5 = prop_hash_end(__dest);
*local_60 = *local_60 & 0xfc000000 | *(uint *)(lVar5 + (-1 - uVar4) * 4) & 0x3ffffff;
lVar5 = prop_hash_end(__dest);
*(uint *)(lVar5 + (-1 - uVar4) * 4) = local_44 + 1;
puVar6 = (int8 *)(lVar3 + (ulong)local_44 * 0x10);
puVar7 = (int8 *)(lVar3 + (ulong)local_40 * 0x10);
*puVar6 = *puVar7;
puVar6[1] = puVar7[1];
local_44 = local_44 + 1;
local_60 = local_60 + 2;
}
local_58 = local_58 + 2;
}
*(uint *)((long)__dest + 0x20) = local_3c - 1;
*(uint *)((long)__dest + 0x24) = uVar1;
*(int4 *)((long)__dest + 0x2c) = 0;
*(uint *)((long)__dest + 0x28) = local_44;
*(void **)(param_2 + 0x18) = __dest;
uVar2 = get_alloc_from_shape(__src);
js_free(param_1,uVar2);
lVar3 = js_realloc(param_1,*(int8 *)(param_2 + 0x20),(ulong)uVar1 << 4);
if (lVar3 != 0) {
*(long *)(param_2 + 0x20) = lVar3;
}
local_4 = 0;
}
return local_4;
}
| |
52,511 | trnman_free_trn | eloqsql/storage/maria/trnman.c | static void trnman_free_trn(TRN *trn)
{
/*
union is to solve strict aliasing issue.
without it gcc 3.4.3 doesn't notice that updating *(void **)&tmp
modifies the value of tmp.
*/
union { TRN *trn; void *v; } tmp;
DBUG_ASSERT(trn != &dummy_transaction_object);
mysql_mutex_lock(&trn->state_lock);
trn->short_id= 0;
mysql_mutex_unlock(&trn->state_lock);
tmp.trn= pool;
do
{
/*
without this volatile cast gcc-3.4.4 moves the assignment
down after the loop at -O2
*/
*(TRN * volatile *)&(trn->next)= tmp.trn;
} while (!my_atomic_casptr((void **)(char*)&pool, &tmp.v, trn));
} | O0 | c | trnman_free_trn:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x4c46e
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
leaq 0x104229(%rip), %rsi # 0x1506a6
movl $0x22d, %edx # imm = 0x22D
callq 0x4c390
movq -0x8(%rbp), %rax
movw $0x0, 0xac(%rax)
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
callq 0x4c400
movq 0x42aba0(%rip), %rax # 0x477048
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
lock
cmpxchgq %rcx, 0x42ab77(%rip) # 0x477048
movq %rax, %rcx
sete %al
movb %al, -0x29(%rbp)
movq %rcx, -0x28(%rbp)
testb $0x1, %al
jne 0x4c4ea
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x4c4ac
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| trnman_free_trn:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
jmp short $+2
loc_4C46E:
mov rdi, [rbp+var_8]
add rdi, 10h
lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 22Dh
call inline_mysql_mutex_lock_7
mov rax, [rbp+var_8]
mov word ptr [rax+0ACh], 0
mov rdi, [rbp+var_8]
add rdi, 10h
call inline_mysql_mutex_unlock_7
mov rax, cs:pool
mov [rbp+var_10], rax
loc_4C4AC:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+68h], rcx
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rcx, [rbp+var_18]
lock cmpxchg cs:pool, rcx
mov rcx, rax
setz al
mov [rbp+var_29], al
mov [rbp+var_28], rcx
test al, 1
jnz short loc_4C4EA
mov rax, [rbp+var_28]
mov [rbp+var_10], rax
loc_4C4EA:
mov al, [rbp+var_29]
and al, 1
mov [rbp+var_19], al
mov al, [rbp+var_19]
xor al, 0FFh
test al, 1
jnz short loc_4C4AC
add rsp, 30h
pop rbp
retn
| char trnman_free_trn(signed long long a1)
{
signed long long v1; // rax
signed long long v2; // rtt
char result; // al
bool v4; // [rsp+7h] [rbp-29h]
signed long long v5; // [rsp+20h] [rbp-10h]
inline_mysql_mutex_lock_7(a1 + 16, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 0x22Du);
*(_WORD *)(a1 + 172) = 0;
inline_mysql_mutex_unlock_7(a1 + 16);
v5 = pool;
do
{
*(_QWORD *)(a1 + 104) = v5;
v2 = v5;
v1 = _InterlockedCompareExchange64(&pool, a1, v5);
v4 = v2 == v1;
if ( v2 != v1 )
v5 = v1;
result = ~v4;
}
while ( !v4 );
return result;
}
| trnman_free_trn:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0014c46e
LAB_0014c46e:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x10
LEA RSI,[0x2506a6]
MOV EDX,0x22d
CALL 0x0014c390
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0xac],0x0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x10
CALL 0x0014c400
MOV RAX,qword ptr [0x00577048]
MOV qword ptr [RBP + -0x10],RAX
LAB_0014c4ac:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x68],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
CMPXCHG.LOCK qword ptr [0x00577048],RCX
MOV RCX,RAX
SETZ AL
MOV byte ptr [RBP + -0x29],AL
MOV qword ptr [RBP + -0x28],RCX
TEST AL,0x1
JNZ 0x0014c4ea
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x10],RAX
LAB_0014c4ea:
MOV AL,byte ptr [RBP + -0x29]
AND AL,0x1
MOV byte ptr [RBP + -0x19],AL
MOV AL,byte ptr [RBP + -0x19]
XOR AL,0xff
TEST AL,0x1
JNZ 0x0014c4ac
ADD RSP,0x30
POP RBP
RET
|
void trnman_free_trn(long param_1)
{
long lVar1;
bool bVar2;
long local_18;
inline_mysql_mutex_lock
(param_1 + 0x10,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x22d)
;
*(int2 *)(param_1 + 0xac) = 0;
inline_mysql_mutex_unlock(param_1 + 0x10);
local_18 = pool;
do {
*(long *)(param_1 + 0x68) = local_18;
LOCK();
bVar2 = local_18 != pool;
lVar1 = param_1;
if (bVar2) {
local_18 = pool;
lVar1 = pool;
}
pool = lVar1;
UNLOCK();
} while (bVar2);
return;
}
| |
52,512 | ma_readinfo | eloqsql/storage/maria/ma_locking.c | int _ma_readinfo(register MARIA_HA *info __attribute__ ((unused)),
int lock_type __attribute__ ((unused)),
int check_keybuffer __attribute__ ((unused)))
{
#ifdef MARIA_EXTERNAL_LOCKING
DBUG_ENTER("_ma_readinfo");
if (info->lock_type == F_UNLCK)
{
MARIA_SHARE *share= info->s;
if (!share->tot_locks)
{
/* should not be done for transactional tables */
if (_ma_state_info_read_dsk(share->kfile.file, &share->state))
{
if (!my_errno)
my_errno= HA_ERR_FILE_TOO_SHORT;
DBUG_RETURN(1);
}
}
if (check_keybuffer)
VOID(_ma_test_if_changed(info));
info->invalidator=share->invalidator;
}
else if (lock_type == F_WRLCK && info->lock_type == F_RDLCK)
{
my_errno=EACCES; /* Not allowed to change */
DBUG_RETURN(-1); /* when have read_lock() */
}
DBUG_RETURN(0);
#else
return 0;
#endif /* defined(MARIA_EXTERNAL_LOCKING) */
} | O3 | c | ma_readinfo:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
popq %rbp
retq
| _ma_readinfo:
push rbp
mov rbp, rsp
xor eax, eax
pop rbp
retn
| long long ma_readinfo()
{
return 0LL;
}
| _ma_readinfo:
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
POP RBP
RET
|
int8 _ma_readinfo(void)
{
return 0;
}
| |
52,513 | ggml_silu_back | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | struct ggml_tensor * ggml_silu_back(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b) {
struct ggml_tensor * result = ggml_dup_tensor(ctx, a);
result->op = GGML_OP_SILU_BACK;
result->src[0] = a;
result->src[1] = b;
return result;
} | O3 | c | ggml_silu_back:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl (%rsi), %esi
leaq 0x10(%r14), %rcx
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1a57f
movl $0x15, 0x50(%rax)
movq %r14, 0x98(%rax)
movq %rbx, 0xa0(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| ggml_silu_back:
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov esi, [rsi]
lea rcx, [r14+10h]
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov dword ptr [rax+50h], 15h
mov [rax+98h], r14
mov [rax+0A0h], rbx
add rsp, 8
pop rbx
pop r14
retn
| long long ggml_silu_back(long long a1, long long a2, long long a3, double a4)
{
long long result; // rax
result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4u, (long long *)(a2 + 16), 0LL, 0LL, a4);
*(_DWORD *)(result + 80) = 21;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
return result;
}
| ggml_silu_back:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV ESI,dword ptr [RSI]
LEA RCX,[R14 + 0x10]
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011a57f
MOV dword ptr [RAX + 0x50],0x15
MOV qword ptr [RAX + 0x98],R14
MOV qword ptr [RAX + 0xa0],RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
void ggml_silu_back(int8 param_1,int4 *param_2,int8 param_3)
{
long lVar1;
lVar1 = ggml_new_tensor_impl(param_1,*param_2,4,param_2 + 4,0,0);
*(int4 *)(lVar1 + 0x50) = 0x15;
*(int4 **)(lVar1 + 0x98) = param_2;
*(int8 *)(lVar1 + 0xa0) = param_3;
return;
}
| |
52,514 | my_error_unregister | eloqsql/mysys/my_error.c | my_bool my_error_unregister(uint first, uint last)
{
struct my_err_head *meh_p;
struct my_err_head **search_meh_pp;
/* Search for the registration in the list. */
for (search_meh_pp= &my_errmsgs_list;
*search_meh_pp;
search_meh_pp= &(*search_meh_pp)->meh_next)
{
if (((*search_meh_pp)->meh_first == first) &&
((*search_meh_pp)->meh_last == last))
break;
}
if (! *search_meh_pp)
return TRUE;
/* Remove header from the chain. */
meh_p= *search_meh_pp;
*search_meh_pp= meh_p->meh_next;
my_free(meh_p);
return FALSE;
} | O3 | c | my_error_unregister:
movq 0x2c66e9(%rip), %r8 # 0x2f2978
movb $0x1, %al
testq %r8, %r8
je 0x2c2cd
pushq %rbp
movq %rsp, %rbp
leaq 0x2c66d7(%rip), %rdx # 0x2f2978
movq %r8, %rcx
cmpl %edi, 0x10(%r8)
jne 0x2c2af
cmpl %esi, 0x14(%rcx)
je 0x2c2bc
movq (%rcx), %r8
movq %rcx, %rdx
testq %r8, %r8
jne 0x2c2a1
jmp 0x2c2cc
movq (%rcx), %rax
movq %rax, (%rdx)
movq %rcx, %rdi
callq 0x2cbc2
xorl %eax, %eax
popq %rbp
retq
| my_error_unregister:
mov r8, cs:my_errmsgs_list
mov al, 1
test r8, r8
jz short locret_2C2CD
push rbp
mov rbp, rsp
lea rdx, my_errmsgs_list
loc_2C2A1:
mov rcx, r8
cmp [r8+10h], edi
jnz short loc_2C2AF
cmp [rcx+14h], esi
jz short loc_2C2BC
loc_2C2AF:
mov r8, [rcx]
mov rdx, rcx
test r8, r8
jnz short loc_2C2A1
jmp short loc_2C2CC
loc_2C2BC:
mov rax, [rcx]
mov [rdx], rax
mov rdi, rcx
call my_free
xor eax, eax
loc_2C2CC:
pop rbp
locret_2C2CD:
retn
| char my_error_unregister(int a1, int a2)
{
long long *v2; // r8
char result; // al
long long **v4; // rdx
long long *v5; // rcx
v2 = my_errmsgs_list;
result = 1;
if ( my_errmsgs_list )
{
v4 = &my_errmsgs_list;
while ( 1 )
{
v5 = v2;
if ( *((_DWORD *)v2 + 4) == a1 && *((_DWORD *)v2 + 5) == a2 )
break;
v2 = (long long *)*v2;
v4 = (long long **)v5;
if ( !*v5 )
return result;
}
*v4 = (long long *)*v2;
my_free(v2);
return 0;
}
return result;
}
| my_error_unregister:
MOV R8,qword ptr [0x003f2978]
MOV AL,0x1
TEST R8,R8
JZ 0x0012c2cd
PUSH RBP
MOV RBP,RSP
LEA RDX,[0x3f2978]
LAB_0012c2a1:
MOV RCX,R8
CMP dword ptr [R8 + 0x10],EDI
JNZ 0x0012c2af
CMP dword ptr [RCX + 0x14],ESI
JZ 0x0012c2bc
LAB_0012c2af:
MOV R8,qword ptr [RCX]
MOV RDX,RCX
TEST R8,R8
JNZ 0x0012c2a1
JMP 0x0012c2cc
LAB_0012c2bc:
MOV RAX,qword ptr [RCX]
MOV qword ptr [RDX],RAX
MOV RDI,RCX
CALL 0x0012cbc2
XOR EAX,EAX
LAB_0012c2cc:
POP RBP
LAB_0012c2cd:
RET
|
int8 my_error_unregister(int param_1,int param_2)
{
int **ppuVar1;
int **ppuVar2;
int **ppuVar3;
if (my_errmsgs_list != (int *)0x0) {
ppuVar2 = &my_errmsgs_list;
ppuVar3 = (int **)my_errmsgs_list;
do {
if ((*(int *)(ppuVar3 + 2) == param_1) && (*(int *)((long)ppuVar3 + 0x14) == param_2)) {
*ppuVar2 = *ppuVar3;
my_free(ppuVar3);
return 0;
}
ppuVar1 = (int **)*ppuVar3;
ppuVar2 = ppuVar3;
ppuVar3 = ppuVar1;
} while (ppuVar1 != (int **)0x0);
}
return 1;
}
| |
52,515 | my_fill_mb2 | eloqsql/strings/ctype-ucs2.c | static void
my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill)
{
char buf[10], *last;
size_t buflen, remainder;
DBUG_ASSERT((slen % 2) == 0);
buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf,
(uchar*) buf + sizeof(buf));
DBUG_ASSERT(buflen > 0);
/*
"last" in the last position where a sequence of "buflen" bytes can start.
*/
for (last= s + slen - buflen; s <= last; s+= buflen)
{
/* Enough space for the character */
memcpy(s, buf, buflen);
}
/*
If there are some more space which is not enough
for the whole multibyte character, then add trailing zeros.
*/
if ((remainder= last + buflen - s) > 0)
bzero(s, (size_t) remainder);
} | O0 | c | my_fill_mb2:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
jmp 0x5b7a6
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rsi
leaq -0x12(%rbp), %rdx
leaq -0x12(%rbp), %rcx
addq $0xa, %rcx
callq *%rax
cltq
movq %rax, -0x48(%rbp)
jmp 0x5b7d3
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
xorl %ecx, %ecx
subq -0x48(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x5b811
movq -0x28(%rbp), %rdi
leaq -0x12(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x24230
movq -0x48(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x5b7e8
movq -0x40(%rbp), %rax
addq -0x48(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
jbe 0x5b839
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rdx
xorl %esi, %esi
callq 0x24190
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5b851
addq $0x50, %rsp
popq %rbp
retq
callq 0x242f0
nopw %cs:(%rax,%rax)
| my_fill_mb2:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
mov [rbp+var_34], ecx
jmp short $+2
loc_5B7A6:
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
mov rax, [rax+30h]
mov rdi, [rbp+var_20]
movsxd rsi, [rbp+var_34]
lea rdx, [rbp+var_12]
lea rcx, [rbp+var_12]
add rcx, 0Ah
call rax
cdqe
mov [rbp+var_48], rax
jmp short $+2
loc_5B7D3:
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
xor ecx, ecx
sub rcx, [rbp+var_48]
add rax, rcx
mov [rbp+var_40], rax
loc_5B7E8:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_40]
ja short loc_5B811
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_12]
mov rdx, [rbp+var_48]
call _memcpy
mov rax, [rbp+var_48]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
jmp short loc_5B7E8
loc_5B811:
mov rax, [rbp+var_40]
add rax, [rbp+var_48]
mov rcx, [rbp+var_28]
sub rax, rcx
mov [rbp+var_50], rax
cmp rax, 0
jbe short loc_5B839
mov rdi, [rbp+var_28]
mov rdx, [rbp+var_50]
xor esi, esi
call _memset
loc_5B839:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5B851
add rsp, 50h
pop rbp
retn
loc_5B851:
call ___stack_chk_fail
| unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4)
{
long long i; // [rsp+8h] [rbp-48h]
unsigned long long v7; // [rsp+28h] [rbp-28h]
_BYTE v8[10]; // [rsp+3Eh] [rbp-12h] BYREF
unsigned long long v9; // [rsp+48h] [rbp-8h] BYREF
v9 = __readfsqword(0x28u);
v7 = a2;
for ( i = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
a4,
v8,
&v9); v7 <= a3 + a2 - i; v7 += i )
memcpy(v7, v8, i);
if ( a3 + a2 != v7 )
memset(v7, 0LL, a3 + a2 - v7);
return __readfsqword(0x28u);
}
| my_fill_mb2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
MOV dword ptr [RBP + -0x34],ECX
JMP 0x0015b7a6
LAB_0015b7a6:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x20]
MOVSXD RSI,dword ptr [RBP + -0x34]
LEA RDX,[RBP + -0x12]
LEA RCX,[RBP + -0x12]
ADD RCX,0xa
CALL RAX
CDQE
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0015b7d3
LAB_0015b7d3:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
XOR ECX,ECX
SUB RCX,qword ptr [RBP + -0x48]
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_0015b7e8:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x0015b811
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x12]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x00124230
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0015b7e8
LAB_0015b811:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,0x0
JBE 0x0015b839
MOV RDI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x50]
XOR ESI,ESI
CALL 0x00124190
LAB_0015b839:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015b851
ADD RSP,0x50
POP RBP
RET
LAB_0015b851:
CALL 0x001242f0
|
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4)
{
int iVar1;
size_t sVar2;
void *pvVar3;
long in_FS_OFFSET;
void *local_30;
int1 local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_1a);
sVar2 = (size_t)iVar1;
pvVar3 = (void *)((long)param_2 + (param_3 - sVar2));
for (local_30 = param_2; local_30 <= pvVar3; local_30 = (void *)(sVar2 + (long)local_30)) {
memcpy(local_30,local_1a,sVar2);
}
sVar2 = (long)pvVar3 + (sVar2 - (long)local_30);
if (sVar2 != 0) {
memset(local_30,0,sVar2);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
52,516 | lre_case_folding_entry | bluesky950520[P]quickjs/libunicode.c | static int lre_case_folding_entry(uint32_t c, uint32_t idx, uint32_t v, BOOL is_unicode)
{
uint32_t res[LRE_CC_RES_LEN_MAX];
int len;
if (is_unicode) {
len = lre_case_conv_entry(res, c, 2, idx, v);
if (len == 1) {
c = res[0];
} else {
/* handle the few specific multi-character cases (see
unicode_gen.c:dump_case_folding_special_cases()) */
if (c == 0xfb06) {
c = 0xfb05;
} else if (c == 0x01fd3) {
c = 0x390;
} else if (c == 0x01fe3) {
c = 0x3b0;
}
}
} else {
if (likely(c < 128)) {
if (c >= 'a' && c <= 'z')
c = c - 'a' + 'A';
} else {
/* legacy regexp: to upper case if single char >= 128 */
len = lre_case_conv_entry(res, c, FALSE, idx, v);
if (len == 1 && res[0] >= 128)
c = res[0];
}
}
return c;
} | O1 | c | lre_case_folding_entry:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %r8d
movl %esi, %eax
movl %edi, %ebx
testl %ecx, %ecx
je 0x97889
leaq 0xc(%rsp), %rdi
movl %ebx, %esi
movl $0x2, %edx
movl %eax, %ecx
callq 0x97523
cmpl $0x1, %eax
jne 0x9789c
movl 0xc(%rsp), %ecx
jmp 0x978c8
cmpl $0x7f, %ebx
ja 0x978d2
leal -0x61(%rbx), %eax
leal -0x20(%rbx), %ecx
cmpl $0x1a, %eax
cmovael %ebx, %ecx
jmp 0x978c8
cmpl $0xfb06, %ebx # imm = 0xFB06
je 0x978b3
cmpl $0x1fd3, %ebx # imm = 0x1FD3
jne 0x978ba
movl $0x390, %ecx # imm = 0x390
jmp 0x978c8
movl $0xfb05, %ecx # imm = 0xFB05
jmp 0x978c8
cmpl $0x1fe3, %ebx # imm = 0x1FE3
movl $0x3b0, %ecx # imm = 0x3B0
cmovnel %ebx, %ecx
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0xc(%rsp), %r14
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl %eax, %ecx
callq 0x97523
movl (%r14), %ecx
cmpl $0x7f, %ecx
cmovbel %ebx, %ecx
cmpl $0x1, %eax
jmp 0x978c5
| lre_case_folding_entry:
push r14
push rbx
sub rsp, 18h
mov r8d, edx
mov eax, esi
mov ebx, edi
test ecx, ecx
jz short loc_97889
lea rdi, [rsp+28h+var_1C]
mov esi, ebx
mov edx, 2
mov ecx, eax
call lre_case_conv_entry
cmp eax, 1
jnz short loc_9789C
mov ecx, [rsp+28h+var_1C]
jmp short loc_978C8
loc_97889:
cmp ebx, 7Fh
ja short loc_978D2
lea eax, [rbx-61h]
lea ecx, [rbx-20h]
cmp eax, 1Ah
cmovnb ecx, ebx
jmp short loc_978C8
loc_9789C:
cmp ebx, 0FB06h
jz short loc_978B3
cmp ebx, 1FD3h
jnz short loc_978BA
mov ecx, 390h
jmp short loc_978C8
loc_978B3:
mov ecx, 0FB05h
jmp short loc_978C8
loc_978BA:
cmp ebx, 1FE3h
mov ecx, 3B0h
loc_978C5:
cmovnz ecx, ebx
loc_978C8:
mov eax, ecx
add rsp, 18h
pop rbx
pop r14
retn
loc_978D2:
lea r14, [rsp+28h+var_1C]
mov rdi, r14
mov esi, ebx
xor edx, edx
mov ecx, eax
call lre_case_conv_entry
mov ecx, [r14]
cmp ecx, 7Fh
cmovbe ecx, ebx
cmp eax, 1
jmp short loc_978C5
| long long lre_case_folding_entry(unsigned int a1, int a2, unsigned int a3, int a4)
{
unsigned int v4; // ecx
bool v5; // zf
int v7; // eax
_DWORD v8[7]; // [rsp+Ch] [rbp-1Ch] BYREF
if ( a4 )
{
if ( (unsigned int)lre_case_conv_entry(v8, a1, 2, a2, a3) == 1 )
return v8[0];
if ( a1 == 64262 )
return 64261;
if ( a1 == 8147 )
return 912;
v5 = a1 == 8163;
v4 = 944;
goto LABEL_13;
}
if ( a1 > 0x7F )
{
v7 = lre_case_conv_entry(v8, a1, 0, a2, a3);
v4 = v8[0];
if ( v8[0] <= 0x7Fu )
v4 = a1;
v5 = v7 == 1;
LABEL_13:
if ( !v5 )
return a1;
return v4;
}
v4 = a1 - 32;
if ( a1 - 97 >= 0x1A )
return a1;
return v4;
}
| lre_case_folding_entry:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV R8D,EDX
MOV EAX,ESI
MOV EBX,EDI
TEST ECX,ECX
JZ 0x00197889
LEA RDI,[RSP + 0xc]
MOV ESI,EBX
MOV EDX,0x2
MOV ECX,EAX
CALL 0x00197523
CMP EAX,0x1
JNZ 0x0019789c
MOV ECX,dword ptr [RSP + 0xc]
JMP 0x001978c8
LAB_00197889:
CMP EBX,0x7f
JA 0x001978d2
LEA EAX,[RBX + -0x61]
LEA ECX,[RBX + -0x20]
CMP EAX,0x1a
CMOVNC ECX,EBX
JMP 0x001978c8
LAB_0019789c:
CMP EBX,0xfb06
JZ 0x001978b3
CMP EBX,0x1fd3
JNZ 0x001978ba
MOV ECX,0x390
JMP 0x001978c8
LAB_001978b3:
MOV ECX,0xfb05
JMP 0x001978c8
LAB_001978ba:
CMP EBX,0x1fe3
MOV ECX,0x3b0
LAB_001978c5:
CMOVNZ ECX,EBX
LAB_001978c8:
MOV EAX,ECX
ADD RSP,0x18
POP RBX
POP R14
RET
LAB_001978d2:
LEA R14,[RSP + 0xc]
MOV RDI,R14
MOV ESI,EBX
XOR EDX,EDX
MOV ECX,EAX
CALL 0x00197523
MOV ECX,dword ptr [R14]
CMP ECX,0x7f
CMOVBE ECX,EBX
CMP EAX,0x1
JMP 0x001978c5
|
uint lre_case_folding_entry(uint param_1,int4 param_2,int4 param_3,int param_4)
{
int iVar1;
bool bVar2;
uint local_1c [3];
if (param_4 == 0) {
if (param_1 < 0x80) {
if (param_1 - 0x61 < 0x1a) {
return param_1 - 0x20;
}
return param_1;
}
iVar1 = lre_case_conv_entry(local_1c,param_1,0,param_2,param_3);
if (local_1c[0] < 0x80) {
local_1c[0] = param_1;
}
bVar2 = iVar1 == 1;
}
else {
iVar1 = lre_case_conv_entry(local_1c,param_1,2,param_2,param_3);
if (iVar1 == 1) {
return local_1c[0];
}
if (param_1 == 0xfb06) {
return 0xfb05;
}
if (param_1 == 0x1fd3) {
return 0x390;
}
bVar2 = param_1 == 0x1fe3;
local_1c[0] = 0x3b0;
}
if (!bVar2) {
local_1c[0] = param_1;
}
return local_1c[0];
}
| |
52,517 | mbedtls_entropy_update_manual | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/entropy.c | int mbedtls_entropy_update_manual(mbedtls_entropy_context *ctx,
const unsigned char *data, size_t len)
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
#if defined(MBEDTLS_THREADING_C)
if ((ret = mbedtls_mutex_lock(&ctx->mutex)) != 0) {
return ret;
}
#endif
ret = entropy_update(ctx, MBEDTLS_ENTROPY_SOURCE_MANUAL, data, len);
#if defined(MBEDTLS_THREADING_C)
if (mbedtls_mutex_unlock(&ctx->mutex) != 0) {
return MBEDTLS_ERR_THREADING_MUTEX_ERROR;
}
#endif
return ret;
} | O3 | c | mbedtls_entropy_update_manual:
movq %rdx, %rcx
movq %rsi, %rdx
movl $0x14, %esi
jmp 0x88fb3
| mbedtls_entropy_update_manual:
mov rcx, rdx
mov rdx, rsi
mov esi, 14h
jmp short $+2
| long long mbedtls_entropy_update_manual(long long a1, long long a2, long long a3)
{
return entropy_update(a1, 20LL, a2, a3);
}
| mbedtls_entropy_update_manual:
MOV RCX,RDX
MOV RDX,RSI
MOV ESI,0x14
JMP 0x00188fb3
|
void mbedtls_entropy_update_manual(int8 param_1,int8 param_2,int8 param_3)
{
entropy_update(param_1,0x14,param_2,param_3);
return;
}
| |
52,518 | google::protobuf::compiler::python::Generator::FixForeignFieldsInDescriptors() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/python/generator.cc | void Generator::FixForeignFieldsInDescriptors() const {
for (int i = 0; i < file_->message_type_count(); ++i) {
FixForeignFieldsInDescriptor(*file_->message_type(i), nullptr);
}
for (int i = 0; i < file_->message_type_count(); ++i) {
AddMessageToFileDescriptor(*file_->message_type(i));
}
for (int i = 0; i < file_->enum_type_count(); ++i) {
AddEnumToFileDescriptor(*file_->enum_type(i));
}
for (int i = 0; i < file_->extension_count(); ++i) {
AddExtensionToFileDescriptor(*file_->extension(i));
}
// TODO(jieluo): Move this register to PrintFileDescriptor() when
// FieldDescriptor.file is added in generated file.
printer_->Print("_sym_db.RegisterFileDescriptor($name$)\n", "name",
kDescriptorKey);
printer_->Print("\n");
} | O0 | cpp | google::protobuf::compiler::python::Generator::FixForeignFieldsInDescriptors() const:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x18(%rsp), %rax
movl 0x2c(%rsp), %ecx
movl %ecx, 0x14(%rsp)
movq 0x30(%rax), %rdi
callq 0x380f0
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0xb5a7b
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rdi
movl 0x2c(%rsp), %esi
callq 0x38100
movq 0x18(%rsp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xb9f30
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0xb5a2b
movl $0x0, 0x28(%rsp)
movq 0x18(%rsp), %rax
movl 0x28(%rsp), %ecx
movl %ecx, 0x10(%rsp)
movq 0x30(%rax), %rdi
callq 0x380f0
movl %eax, %ecx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jge 0xb5acf
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rdi
movl 0x28(%rsp), %esi
callq 0x38100
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0xba9c0
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0xb5a83
movl $0x0, 0x24(%rsp)
movq 0x18(%rsp), %rax
movl 0x24(%rsp), %ecx
movl %ecx, 0xc(%rsp)
movq 0x30(%rax), %rdi
callq 0x58b10
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0xb5b23
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rdi
movl 0x24(%rsp), %esi
callq 0x6e920
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0xbb090
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0xb5ad7
movl $0x0, 0x20(%rsp)
movq 0x18(%rsp), %rax
movl 0x20(%rsp), %ecx
movl %ecx, 0x8(%rsp)
movq 0x30(%rax), %rdi
callq 0x58ae0
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0xb5b77
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rdi
movl 0x20(%rsp), %esi
callq 0x58af0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0xbb3f0
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0xb5b2b
movq 0x18(%rsp), %rax
movq 0x58(%rax), %rdi
leaq 0x300f47(%rip), %rsi # 0x3b6ace
leaq 0x30002f(%rip), %rdx # 0x3b5bbd
leaq 0x30043f(%rip), %rcx # 0x3b5fd4
callq 0xc0040
movq 0x18(%rsp), %rax
movq 0x58(%rax), %rdi
leaq 0x30c1d7(%rip), %rsi # 0x3c1d81
callq 0x39230
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZNK6google8protobuf8compiler6python9Generator29FixForeignFieldsInDescriptorsEv:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov rax, [rsp+38h+var_8]
mov [rsp+38h+var_20], rax
mov [rsp+38h+var_C], 0
loc_B5A2B:
mov rax, [rsp+38h+var_20]
mov ecx, [rsp+38h+var_C]
mov [rsp+38h+var_24], ecx
mov rdi, [rax+30h]; this
call _ZNK6google8protobuf14FileDescriptor18message_type_countEv; google::protobuf::FileDescriptor::message_type_count(void)
mov ecx, eax
mov eax, [rsp+38h+var_24]
cmp eax, ecx
jge short loc_B5A7B
mov rax, [rsp+38h+var_20]
mov rdi, [rax+30h]; this
mov esi, [rsp+38h+var_C]; int
call _ZNK6google8protobuf14FileDescriptor12message_typeEi; google::protobuf::FileDescriptor::message_type(int)
mov rdi, [rsp+38h+var_20]; this
mov rsi, rax; google::protobuf::Descriptor *
xor eax, eax
mov edx, eax; google::protobuf::Descriptor *
call _ZNK6google8protobuf8compiler6python9Generator28FixForeignFieldsInDescriptorERKNS0_10DescriptorEPS5_; google::protobuf::compiler::python::Generator::FixForeignFieldsInDescriptor(google::protobuf::Descriptor const&,google::protobuf::Descriptor const*)
mov eax, [rsp+38h+var_C]
add eax, 1
mov [rsp+38h+var_C], eax
jmp short loc_B5A2B
loc_B5A7B:
mov [rsp+38h+var_10], 0
loc_B5A83:
mov rax, [rsp+38h+var_20]
mov ecx, [rsp+38h+var_10]
mov [rsp+38h+var_28], ecx
mov rdi, [rax+30h]; this
call _ZNK6google8protobuf14FileDescriptor18message_type_countEv; google::protobuf::FileDescriptor::message_type_count(void)
mov ecx, eax
mov eax, [rsp+38h+var_28]
cmp eax, ecx
jge short loc_B5ACF
mov rax, [rsp+38h+var_20]
mov rdi, [rax+30h]; this
mov esi, [rsp+38h+var_10]; int
call _ZNK6google8protobuf14FileDescriptor12message_typeEi; google::protobuf::FileDescriptor::message_type(int)
mov rdi, [rsp+38h+var_20]; this
mov rsi, rax; google::protobuf::Descriptor *
call _ZNK6google8protobuf8compiler6python9Generator26AddMessageToFileDescriptorERKNS0_10DescriptorE; google::protobuf::compiler::python::Generator::AddMessageToFileDescriptor(google::protobuf::Descriptor const&)
mov eax, [rsp+38h+var_10]
add eax, 1
mov [rsp+38h+var_10], eax
jmp short loc_B5A83
loc_B5ACF:
mov [rsp+38h+var_14], 0
loc_B5AD7:
mov rax, [rsp+38h+var_20]
mov ecx, [rsp+38h+var_14]
mov [rsp+38h+var_2C], ecx
mov rdi, [rax+30h]; this
call _ZNK6google8protobuf14FileDescriptor15enum_type_countEv; google::protobuf::FileDescriptor::enum_type_count(void)
mov ecx, eax
mov eax, [rsp+38h+var_2C]
cmp eax, ecx
jge short loc_B5B23
mov rax, [rsp+38h+var_20]
mov rdi, [rax+30h]; this
mov esi, [rsp+38h+var_14]; int
call _ZNK6google8protobuf14FileDescriptor9enum_typeEi; google::protobuf::FileDescriptor::enum_type(int)
mov rdi, [rsp+38h+var_20]; this
mov rsi, rax; google::protobuf::EnumDescriptor *
call _ZNK6google8protobuf8compiler6python9Generator23AddEnumToFileDescriptorERKNS0_14EnumDescriptorE; google::protobuf::compiler::python::Generator::AddEnumToFileDescriptor(google::protobuf::EnumDescriptor const&)
mov eax, [rsp+38h+var_14]
add eax, 1
mov [rsp+38h+var_14], eax
jmp short loc_B5AD7
loc_B5B23:
mov [rsp+38h+var_18], 0
loc_B5B2B:
mov rax, [rsp+38h+var_20]
mov ecx, [rsp+38h+var_18]
mov [rsp+38h+var_30], ecx
mov rdi, [rax+30h]; this
call _ZNK6google8protobuf14FileDescriptor15extension_countEv; google::protobuf::FileDescriptor::extension_count(void)
mov ecx, eax
mov eax, [rsp+38h+var_30]
cmp eax, ecx
jge short loc_B5B77
mov rax, [rsp+38h+var_20]
mov rdi, [rax+30h]; this
mov esi, [rsp+38h+var_18]; int
call _ZNK6google8protobuf14FileDescriptor9extensionEi; google::protobuf::FileDescriptor::extension(int)
mov rdi, [rsp+38h+var_20]; this
mov rsi, rax; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8compiler6python9Generator28AddExtensionToFileDescriptorERKNS0_15FieldDescriptorE; google::protobuf::compiler::python::Generator::AddExtensionToFileDescriptor(google::protobuf::FieldDescriptor const&)
mov eax, [rsp+38h+var_18]
add eax, 1
mov [rsp+38h+var_18], eax
jmp short loc_B5B2B
loc_B5B77:
mov rax, [rsp+38h+var_20]
mov rdi, [rax+58h]
lea rsi, aSymDbRegisterf; "_sym_db.RegisterFileDescriptor($name$)"...
lea rdx, aGoogleProtobuf_24+34h; "name"
lea rcx, _ZN6google8protobuf8compiler6python12_GLOBAL__N_114kDescriptorKeyE; "DESCRIPTOR"
call _ZN6google8protobuf2io7Printer5PrintIJA5_cA11_cEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [5],char [11]>(char const*,char [5],char [11] const&)
mov rax, [rsp+38h+var_20]
mov rdi, [rax+58h]
lea rsi, aConstProtoNsMe_0+0E5h; "\n"
call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_
add rsp, 38h
retn
| FixForeignFieldsInDescriptors:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x18],RAX
MOV dword ptr [RSP + 0x2c],0x0
LAB_001b5a2b:
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x14],ECX
MOV RDI,qword ptr [RAX + 0x30]
CALL 0x001380f0
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,ECX
JGE 0x001b5a7b
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x30]
MOV ESI,dword ptr [RSP + 0x2c]
CALL 0x00138100
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,RAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001b9f30
MOV EAX,dword ptr [RSP + 0x2c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x001b5a2b
LAB_001b5a7b:
MOV dword ptr [RSP + 0x28],0x0
LAB_001b5a83:
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x10],ECX
MOV RDI,qword ptr [RAX + 0x30]
CALL 0x001380f0
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x10]
CMP EAX,ECX
JGE 0x001b5acf
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x30]
MOV ESI,dword ptr [RSP + 0x28]
CALL 0x00138100
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,RAX
CALL 0x001ba9c0
MOV EAX,dword ptr [RSP + 0x28]
ADD EAX,0x1
MOV dword ptr [RSP + 0x28],EAX
JMP 0x001b5a83
LAB_001b5acf:
MOV dword ptr [RSP + 0x24],0x0
LAB_001b5ad7:
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x24]
MOV dword ptr [RSP + 0xc],ECX
MOV RDI,qword ptr [RAX + 0x30]
CALL 0x00158b10
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,ECX
JGE 0x001b5b23
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x30]
MOV ESI,dword ptr [RSP + 0x24]
CALL 0x0016e920
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,RAX
CALL 0x001bb090
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x1
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001b5ad7
LAB_001b5b23:
MOV dword ptr [RSP + 0x20],0x0
LAB_001b5b2b:
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0x8],ECX
MOV RDI,qword ptr [RAX + 0x30]
CALL 0x00158ae0
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x8]
CMP EAX,ECX
JGE 0x001b5b77
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x30]
MOV ESI,dword ptr [RSP + 0x20]
CALL 0x00158af0
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,RAX
CALL 0x001bb3f0
MOV EAX,dword ptr [RSP + 0x20]
ADD EAX,0x1
MOV dword ptr [RSP + 0x20],EAX
JMP 0x001b5b2b
LAB_001b5b77:
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x58]
LEA RSI,[0x4b6ace]
LEA RDX,[0x4b5bbd]
LEA RCX,[0x4b5fd4]
CALL 0x001c0040
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x58]
LEA RSI,[0x4c1d81]
CALL 0x00139230
ADD RSP,0x38
RET
|
/* google::protobuf::compiler::python::Generator::FixForeignFieldsInDescriptors() const */
void __thiscall
google::protobuf::compiler::python::Generator::FixForeignFieldsInDescriptors(Generator *this)
{
int iVar1;
Descriptor *pDVar2;
EnumDescriptor *pEVar3;
FieldDescriptor *pFVar4;
int local_18;
int local_14;
int local_10;
int local_c;
local_c = 0;
while( true ) {
iVar1 = FileDescriptor::message_type_count(*(FileDescriptor **)(this + 0x30));
if (iVar1 <= local_c) break;
pDVar2 = (Descriptor *)FileDescriptor::message_type(*(FileDescriptor **)(this + 0x30),local_c);
FixForeignFieldsInDescriptor(this,pDVar2,(Descriptor *)0x0);
local_c = local_c + 1;
}
local_10 = 0;
while( true ) {
iVar1 = FileDescriptor::message_type_count(*(FileDescriptor **)(this + 0x30));
if (iVar1 <= local_10) break;
pDVar2 = (Descriptor *)FileDescriptor::message_type(*(FileDescriptor **)(this + 0x30),local_10);
AddMessageToFileDescriptor(this,pDVar2);
local_10 = local_10 + 1;
}
local_14 = 0;
while( true ) {
iVar1 = FileDescriptor::enum_type_count(*(FileDescriptor **)(this + 0x30));
if (iVar1 <= local_14) break;
pEVar3 = (EnumDescriptor *)FileDescriptor::enum_type(*(FileDescriptor **)(this + 0x30),local_14)
;
AddEnumToFileDescriptor(this,pEVar3);
local_14 = local_14 + 1;
}
local_18 = 0;
while( true ) {
iVar1 = FileDescriptor::extension_count(*(FileDescriptor **)(this + 0x30));
if (iVar1 <= local_18) break;
pFVar4 = (FieldDescriptor *)
FileDescriptor::extension(*(FileDescriptor **)(this + 0x30),local_18);
AddExtensionToFileDescriptor(this,pFVar4);
local_18 = local_18 + 1;
}
io::Printer::Print<char[5],char[11]>
(*(Printer **)(this + 0x58),"_sym_db.RegisterFileDescriptor($name$)\n","name",
"DESCRIPTOR");
io::Printer::Print<>(*(Printer **)(this + 0x58),"\n");
return;
}
| ||
52,519 | google::protobuf::compiler::python::Generator::FixForeignFieldsInDescriptors() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/python/generator.cc | void Generator::FixForeignFieldsInDescriptors() const {
for (int i = 0; i < file_->message_type_count(); ++i) {
FixForeignFieldsInDescriptor(*file_->message_type(i), nullptr);
}
for (int i = 0; i < file_->message_type_count(); ++i) {
AddMessageToFileDescriptor(*file_->message_type(i));
}
for (int i = 0; i < file_->enum_type_count(); ++i) {
AddEnumToFileDescriptor(*file_->enum_type(i));
}
for (int i = 0; i < file_->extension_count(); ++i) {
AddExtensionToFileDescriptor(*file_->extension(i));
}
// TODO(jieluo): Move this register to PrintFileDescriptor() when
// FieldDescriptor.file is added in generated file.
printer_->Print("_sym_db.RegisterFileDescriptor($name$)\n", "name",
kDescriptorKey);
printer_->Print("\n");
} | O3 | cpp | google::protobuf::compiler::python::Generator::FixForeignFieldsInDescriptors() const:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rax
cmpl $0x0, 0x34(%rax)
jle 0x6685c
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x58(%rax), %rsi
addq %r14, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x695d4
incq %r15
movq 0x30(%rbx), %rax
movslq 0x34(%rax), %rcx
addq $0x88, %r14
cmpq %rcx, %r15
jl 0x66804
testl %ecx, %ecx
jle 0x6685c
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x58(%rax), %rsi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x69b94
incq %r15
movq 0x30(%rbx), %rax
movslq 0x34(%rax), %rcx
addq $0x88, %r14
cmpq %rcx, %r15
jl 0x66836
cmpl $0x0, 0x38(%rax)
jle 0x6688b
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x60(%rax), %rsi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x69f14
incq %r15
movq 0x30(%rbx), %rax
movslq 0x38(%rax), %rcx
addq $0x48, %r14
cmpq %rcx, %r15
jl 0x66868
cmpl $0x0, 0x4(%rax)
jle 0x668ba
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x70(%rax), %rsi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x6a0d6
incq %r15
movq 0x30(%rbx), %rax
movslq 0x4(%rax), %rcx
addq $0x48, %r14
cmpq %rcx, %r15
jl 0x66897
movq 0x58(%rbx), %rdi
leaq 0x141b8d(%rip), %rsi # 0x1a8452
leaq 0x13644f(%rip), %rdx # 0x19cd1b
leaq 0x141085(%rip), %rcx # 0x1a7958
callq 0x6cfb0
movq 0x58(%rbx), %rdi
leaq 0x14ca9a(%rip), %rsi # 0x1b337d
popq %rbx
popq %r14
popq %r15
jmp 0x2e40a
nop
| _ZNK6google8protobuf8compiler6python9Generator29FixForeignFieldsInDescriptorsEv:
push r15; int
push r14; int
push rbx; int
mov rbx, rdi
mov rax, [rdi+30h]
cmp dword ptr [rax+34h], 0
jle short loc_6685C
xor r14d, r14d
xor r15d, r15d
loc_66804:
mov rsi, [rax+58h]
add rsi, r14; google::protobuf::Descriptor *
mov rdi, rbx; this
xor edx, edx; google::protobuf::Descriptor *
call _ZNK6google8protobuf8compiler6python9Generator28FixForeignFieldsInDescriptorERKNS0_10DescriptorEPS5_; google::protobuf::compiler::python::Generator::FixForeignFieldsInDescriptor(google::protobuf::Descriptor const&,google::protobuf::Descriptor const*)
inc r15
mov rax, [rbx+30h]
movsxd rcx, dword ptr [rax+34h]
add r14, 88h
cmp r15, rcx
jl short loc_66804
test ecx, ecx
jle short loc_6685C
xor r14d, r14d
xor r15d, r15d
loc_66836:
mov rsi, [rax+58h]
add rsi, r14; google::protobuf::Descriptor *
mov rdi, rbx; this
call _ZNK6google8protobuf8compiler6python9Generator26AddMessageToFileDescriptorERKNS0_10DescriptorE; google::protobuf::compiler::python::Generator::AddMessageToFileDescriptor(google::protobuf::Descriptor const&)
inc r15
mov rax, [rbx+30h]
movsxd rcx, dword ptr [rax+34h]
add r14, 88h
cmp r15, rcx
jl short loc_66836
loc_6685C:
cmp dword ptr [rax+38h], 0
jle short loc_6688B
xor r14d, r14d
xor r15d, r15d
loc_66868:
mov rsi, [rax+60h]
add rsi, r14; google::protobuf::EnumDescriptor *
mov rdi, rbx; this
call _ZNK6google8protobuf8compiler6python9Generator23AddEnumToFileDescriptorERKNS0_14EnumDescriptorE; google::protobuf::compiler::python::Generator::AddEnumToFileDescriptor(google::protobuf::EnumDescriptor const&)
inc r15
mov rax, [rbx+30h]
movsxd rcx, dword ptr [rax+38h]
add r14, 48h ; 'H'
cmp r15, rcx
jl short loc_66868
loc_6688B:
cmp dword ptr [rax+4], 0
jle short loc_668BA
xor r14d, r14d
xor r15d, r15d
loc_66897:
mov rsi, [rax+70h]
add rsi, r14; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
call _ZNK6google8protobuf8compiler6python9Generator28AddExtensionToFileDescriptorERKNS0_15FieldDescriptorE; google::protobuf::compiler::python::Generator::AddExtensionToFileDescriptor(google::protobuf::FieldDescriptor const&)
inc r15
mov rax, [rbx+30h]
movsxd rcx, dword ptr [rax+4]
add r14, 48h ; 'H'
cmp r15, rcx
jl short loc_66897
loc_668BA:
mov rdi, [rbx+58h]; this
lea rsi, aSymDbRegisterf; "_sym_db.RegisterFileDescriptor($name$)"...
lea rdx, aAnnotationPrag+12h; "name"
lea rcx, _ZN6google8protobuf8compiler6python12_GLOBAL__N_114kDescriptorKeyE; "DESCRIPTOR"
call _ZN6google8protobuf2io7Printer5PrintIJA5_cA11_cEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [5],char [11]>(char const*,char [5],char [11] const&)
mov rdi, [rbx+58h]
lea rsi, aConstProtoNsMe_0+0E5h; "\n"
pop rbx
pop r14
pop r15
jmp _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_
| FixForeignFieldsInDescriptors:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x30]
CMP dword ptr [RAX + 0x34],0x0
JLE 0x0016685c
XOR R14D,R14D
XOR R15D,R15D
LAB_00166804:
MOV RSI,qword ptr [RAX + 0x58]
ADD RSI,R14
MOV RDI,RBX
XOR EDX,EDX
CALL 0x001695d4
INC R15
MOV RAX,qword ptr [RBX + 0x30]
MOVSXD RCX,dword ptr [RAX + 0x34]
ADD R14,0x88
CMP R15,RCX
JL 0x00166804
TEST ECX,ECX
JLE 0x0016685c
XOR R14D,R14D
XOR R15D,R15D
LAB_00166836:
MOV RSI,qword ptr [RAX + 0x58]
ADD RSI,R14
MOV RDI,RBX
CALL 0x00169b94
INC R15
MOV RAX,qword ptr [RBX + 0x30]
MOVSXD RCX,dword ptr [RAX + 0x34]
ADD R14,0x88
CMP R15,RCX
JL 0x00166836
LAB_0016685c:
CMP dword ptr [RAX + 0x38],0x0
JLE 0x0016688b
XOR R14D,R14D
XOR R15D,R15D
LAB_00166868:
MOV RSI,qword ptr [RAX + 0x60]
ADD RSI,R14
MOV RDI,RBX
CALL 0x00169f14
INC R15
MOV RAX,qword ptr [RBX + 0x30]
MOVSXD RCX,dword ptr [RAX + 0x38]
ADD R14,0x48
CMP R15,RCX
JL 0x00166868
LAB_0016688b:
CMP dword ptr [RAX + 0x4],0x0
JLE 0x001668ba
XOR R14D,R14D
XOR R15D,R15D
LAB_00166897:
MOV RSI,qword ptr [RAX + 0x70]
ADD RSI,R14
MOV RDI,RBX
CALL 0x0016a0d6
INC R15
MOV RAX,qword ptr [RBX + 0x30]
MOVSXD RCX,dword ptr [RAX + 0x4]
ADD R14,0x48
CMP R15,RCX
JL 0x00166897
LAB_001668ba:
MOV RDI,qword ptr [RBX + 0x58]
LEA RSI,[0x2a8452]
LEA RDX,[0x29cd1b]
LEA RCX,[0x2a7958]
CALL 0x0016cfb0
MOV RDI,qword ptr [RBX + 0x58]
LEA RSI,[0x2b337d]
POP RBX
POP R14
POP R15
JMP 0x0012e40a
|
/* google::protobuf::compiler::python::Generator::FixForeignFieldsInDescriptors() const */
void __thiscall
google::protobuf::compiler::python::Generator::FixForeignFieldsInDescriptors(Generator *this)
{
long lVar1;
long lVar2;
long lVar3;
lVar1 = *(long *)(this + 0x30);
if (0 < *(int *)(lVar1 + 0x34)) {
lVar2 = 0;
lVar3 = 0;
do {
FixForeignFieldsInDescriptor
(this,(Descriptor *)(*(long *)(lVar1 + 0x58) + lVar2),(Descriptor *)0x0);
lVar3 = lVar3 + 1;
lVar1 = *(long *)(this + 0x30);
lVar2 = lVar2 + 0x88;
} while (lVar3 < *(int *)(lVar1 + 0x34));
if (0 < *(int *)(lVar1 + 0x34)) {
lVar2 = 0;
do {
AddMessageToFileDescriptor((Descriptor *)this);
lVar2 = lVar2 + 1;
lVar1 = *(long *)(this + 0x30);
} while (lVar2 < *(int *)(lVar1 + 0x34));
}
}
if (0 < *(int *)(lVar1 + 0x38)) {
lVar2 = 0;
do {
AddEnumToFileDescriptor((EnumDescriptor *)this);
lVar2 = lVar2 + 1;
lVar1 = *(long *)(this + 0x30);
} while (lVar2 < *(int *)(lVar1 + 0x38));
}
if (0 < *(int *)(lVar1 + 4)) {
lVar2 = 0;
lVar3 = 0;
do {
AddExtensionToFileDescriptor(this,(FieldDescriptor *)(*(long *)(lVar1 + 0x70) + lVar2));
lVar3 = lVar3 + 1;
lVar1 = *(long *)(this + 0x30);
lVar2 = lVar2 + 0x48;
} while (lVar3 < *(int *)(lVar1 + 4));
}
io::Printer::Print<char[5],char[11]>
(*(Printer **)(this + 0x58),"_sym_db.RegisterFileDescriptor($name$)\n","name",
"DESCRIPTOR");
io::Printer::Print<>(*(Printer **)(this + 0x58),"\n");
return;
}
| ||
52,520 | std::unordered_map<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>, google::protobuf::FieldDescriptor const*, google::protobuf::(anonymous namespace)::PointerStringPairHash, std::equal_to<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>>, std::allocator<std::pair<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece> const, google::protobuf::FieldDescriptor const*>>>::value_type::second_type google::protobuf::FindPtrOrNull<std::unordered_map<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>, google::protobuf::FieldDescriptor const*, google::protobuf::(anonymous namespace)::PointerStringPairHash, std::equal_to<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>>, std::allocator<std::pair<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece> const, google::protobuf::FieldDescriptor const*>>>>(std::unordered_map<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>, google::protobuf::FieldDescriptor const*, google::protobuf::(anonymous namespace)::PointerStringPairHash, std::equal_to<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>>, std::allocator<std::pair<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece> const, google::protobuf::FieldDescriptor const*>>> const&, std::unordered_map<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>, google::protobuf::FieldDescriptor const*, google::protobuf::(anonymous namespace)::PointerStringPairHash, std::equal_to<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>>, std::allocator<std::pair<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece> const, google::protobuf::FieldDescriptor const*>>>::value_type::first_type const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/map_util.h | typename Collection::value_type::second_type
FindPtrOrNull(const Collection& collection,
const typename Collection::value_type::first_type& key) {
typename Collection::const_iterator it = collection.find(key);
if (it == collection.end()) {
return typename Collection::value_type::second_type();
}
return it->second;
} | O3 | c | std::unordered_map<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>, google::protobuf::FieldDescriptor const*, google::protobuf::(anonymous namespace)::PointerStringPairHash, std::equal_to<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>>, std::allocator<std::pair<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece> const, google::protobuf::FieldDescriptor const*>>>::value_type::second_type google::protobuf::FindPtrOrNull<std::unordered_map<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>, google::protobuf::FieldDescriptor const*, google::protobuf::(anonymous namespace)::PointerStringPairHash, std::equal_to<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>>, std::allocator<std::pair<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece> const, google::protobuf::FieldDescriptor const*>>>>(std::unordered_map<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>, google::protobuf::FieldDescriptor const*, google::protobuf::(anonymous namespace)::PointerStringPairHash, std::equal_to<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>>, std::allocator<std::pair<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece> const, google::protobuf::FieldDescriptor const*>>> const&, std::unordered_map<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>, google::protobuf::FieldDescriptor const*, google::protobuf::(anonymous namespace)::PointerStringPairHash, std::equal_to<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>>, std::allocator<std::pair<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece> const, google::protobuf::FieldDescriptor const*>>>::value_type::first_type const&):
pushq %rbx
movq %rsi, %rcx
movq (%rsi), %rax
movq 0x10(%rsi), %rdx
testq %rdx, %rdx
jle 0xdd60e
movq 0x8(%rcx), %r8
addq %r8, %rdx
xorl %esi, %esi
leaq (%rsi,%rsi,4), %r9
movsbq (%r8), %rsi
addq %r9, %rsi
incq %r8
cmpq %rdx, %r8
jb 0xdd5f9
jmp 0xdd610
xorl %esi, %esi
imulq $0x1000193, %rax, %r8 # imm = 0x1000193
xorq %rsi, %r8
xorl %ebx, %ebx
movq %r8, %rax
xorl %edx, %edx
divq 0x8(%rdi)
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0xdd642
testq %rax, %rax
je 0xdd63c
movq 0x20(%rax), %rbx
movq %rbx, %rax
popq %rbx
retq
nop
| _ZN6google8protobuf13FindPtrOrNullISt13unordered_mapISt4pairIPKvNS0_20stringpiece_internal11StringPieceEEPKNS0_15FieldDescriptorENS0_12_GLOBAL__N_121PointerStringPairHashESt8equal_toIS8_ESaIS3_IKS8_SB_EEEEENT_10value_type11second_typeERKSK_RKNSL_10first_typeE:
push rbx
mov rcx, rsi
mov rax, [rsi]
mov rdx, [rsi+10h]
test rdx, rdx
jle short loc_DD60E
mov r8, [rcx+8]
add rdx, r8
xor esi, esi
loc_DD5F9:
lea r9, [rsi+rsi*4]
movsx rsi, byte ptr [r8]
add rsi, r9
inc r8
cmp r8, rdx
jb short loc_DD5F9
jmp short loc_DD610
loc_DD60E:
xor esi, esi
loc_DD610:
imul r8, rax, 1000193h
xor r8, rsi
xor ebx, ebx
mov rax, r8
xor edx, edx
div qword ptr [rdi+8]
mov rsi, rdx
mov rdx, rcx
mov rcx, r8
call _ZNKSt10_HashtableISt4pairIPKvN6google8protobuf20stringpiece_internal11StringPieceEES0_IKS7_PKNS4_15FieldDescriptorEESaISC_ENSt8__detail10_Select1stESt8equal_toIS7_ENS4_12_GLOBAL__N_121PointerStringPairHashENSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_policyENSE_17_Hashtable_traitsILb1ELb0ELb1EEEE12_M_find_nodeEmRS8_m; std::_Hashtable<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>,std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>,std::allocator<std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>>,std::__detail::_Select1st,std::equal_to<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>>,google::protobuf::`anonymous namespace'::PointerStringPairHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_M_find_node(ulong,std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const&,ulong)
test rax, rax
jz short loc_DD63C
mov rbx, [rax+20h]
loc_DD63C:
mov rax, rbx
pop rbx
retn
| long long google::protobuf::FindPtrOrNull<std::unordered_map<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor const*,google::protobuf::`anonymous namespace'::PointerStringPairHash,std::equal_to<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>>>>(
long long a1,
long long *a2)
{
long long v3; // rax
long long v4; // rdx
char *v5; // r8
char *v6; // rdx
long long v7; // rsi
long long v8; // rbx
long long node; // rax
v3 = *a2;
v4 = a2[2];
if ( v4 <= 0 )
{
v7 = 0LL;
}
else
{
v5 = (char *)a2[1];
v6 = &v5[v4];
v7 = 0LL;
do
v7 = 5 * v7 + *v5++;
while ( v5 < v6 );
}
v8 = 0LL;
node = std::_Hashtable<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>,std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>,std::allocator<std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>>,std::__detail::_Select1st,std::equal_to<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>>,google::protobuf::`anonymous namespace'::PointerStringPairHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_M_find_node(
a1,
(v7 ^ (unsigned long long)(16777619 * v3)) % *(_QWORD *)(a1 + 8),
a2,
v7 ^ (16777619 * v3));
if ( node )
return *(_QWORD *)(node + 32);
return v8;
}
| FindPtrOrNull<std::unordered_map<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor_const*,google::protobuf::(anonymous_namespace)::PointerStringPairHash,std::equal_to<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>const,google::protobuf::FieldDescriptor_const*>>>>:
PUSH RBX
MOV RCX,RSI
MOV RAX,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x10]
TEST RDX,RDX
JLE 0x001dd60e
MOV R8,qword ptr [RCX + 0x8]
ADD RDX,R8
XOR ESI,ESI
LAB_001dd5f9:
LEA R9,[RSI + RSI*0x4]
MOVSX RSI,byte ptr [R8]
ADD RSI,R9
INC R8
CMP R8,RDX
JC 0x001dd5f9
JMP 0x001dd610
LAB_001dd60e:
XOR ESI,ESI
LAB_001dd610:
IMUL R8,RAX,0x1000193
XOR R8,RSI
XOR EBX,EBX
MOV RAX,R8
XOR EDX,EDX
DIV qword ptr [RDI + 0x8]
MOV RSI,RDX
MOV RDX,RCX
MOV RCX,R8
CALL 0x001dd642
TEST RAX,RAX
JZ 0x001dd63c
MOV RBX,qword ptr [RAX + 0x20]
LAB_001dd63c:
MOV RAX,RBX
POP RBX
RET
|
/* std::unordered_map<std::pair<void const*, google::protobuf::stringpiece_internal::StringPiece>,
google::protobuf::FieldDescriptor const*, google::protobuf::(anonymous
namespace)::PointerStringPairHash, std::equal_to<std::pair<void const*,
google::protobuf::stringpiece_internal::StringPiece> >, std::allocator<std::pair<std::pair<void
const*, google::protobuf::stringpiece_internal::StringPiece> const,
google::protobuf::FieldDescriptor const*> > >::value_type::second_type
google::protobuf::FindPtrOrNull<std::unordered_map<std::pair<void const*,
google::protobuf::stringpiece_internal::StringPiece>, google::protobuf::FieldDescriptor const*,
google::protobuf::(anonymous namespace)::PointerStringPairHash, std::equal_to<std::pair<void
const*, google::protobuf::stringpiece_internal::StringPiece> >,
std::allocator<std::pair<std::pair<void const*,
google::protobuf::stringpiece_internal::StringPiece> const, google::protobuf::FieldDescriptor
const*> > > >(std::unordered_map<std::pair<void const*,
google::protobuf::stringpiece_internal::StringPiece>, google::protobuf::FieldDescriptor const*,
google::protobuf::(anonymous namespace)::PointerStringPairHash, std::equal_to<std::pair<void
const*, google::protobuf::stringpiece_internal::StringPiece> >,
std::allocator<std::pair<std::pair<void const*,
google::protobuf::stringpiece_internal::StringPiece> const, google::protobuf::FieldDescriptor
const*> > > const&, std::unordered_map<std::pair<void const*,
google::protobuf::stringpiece_internal::StringPiece>, google::protobuf::FieldDescriptor const*,
google::protobuf::(anonymous namespace)::PointerStringPairHash, std::equal_to<std::pair<void
const*, google::protobuf::stringpiece_internal::StringPiece> >,
std::allocator<std::pair<std::pair<void const*,
google::protobuf::stringpiece_internal::StringPiece> const, google::protobuf::FieldDescriptor
const*> > >::value_type::first_type const&) */
int8
google::protobuf::
FindPtrOrNull<std::unordered_map<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor_const*,google::protobuf::(anonymous_namespace)::PointerStringPairHash,std::equal_to<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>const,google::protobuf::FieldDescriptor_const*>>>>
(unordered_map *param_1,first_type *param_2)
{
long lVar1;
char *pcVar2;
int8 uVar3;
ulong uVar4;
char *pcVar5;
if (*(long *)(param_2 + 0x10) < 1) {
uVar4 = 0;
}
else {
pcVar5 = *(char **)(param_2 + 8);
pcVar2 = pcVar5 + *(long *)(param_2 + 0x10);
uVar4 = 0;
do {
uVar4 = (long)*pcVar5 + uVar4 * 5;
pcVar5 = pcVar5 + 1;
} while (pcVar5 < pcVar2);
}
uVar4 = *(long *)param_2 * 0x1000193 ^ uVar4;
uVar3 = 0;
lVar1 = std::
_Hashtable<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>,std::pair<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>const,google::protobuf::FieldDescriptor_const*>,std::allocator<std::pair<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>const,google::protobuf::FieldDescriptor_const*>>,std::__detail::_Select1st,std::equal_to<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>>,google::protobuf::(anonymous_namespace)::PointerStringPairHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::_M_find_node((_Hashtable<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>,std::pair<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>const,google::protobuf::FieldDescriptor_const*>,std::allocator<std::pair<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>const,google::protobuf::FieldDescriptor_const*>>,std::__detail::_Select1st,std::equal_to<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>>,google::protobuf::(anonymous_namespace)::PointerStringPairHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)param_1,uVar4 % *(ulong *)(param_1 + 8),(pair *)param_2,uVar4);
if (lVar1 != 0) {
uVar3 = *(int8 *)(lVar1 + 0x20);
}
return uVar3;
}
| |
52,521 | file_exists | tsotchke[P]eshkol/src/core/utils/file_io.c | bool file_exists(const char* path) {
assert(path != NULL);
// Check if the file exists
if (access(path, F_OK) != 0) {
set_last_error(errno_to_file_error(errno));
return false;
}
set_last_error(FILE_ERROR_NONE);
return true;
} | O0 | c | file_exists:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4f55
jmp 0x4f74
leaq 0x2fec(%rip), %rdi # 0x7f48
leaq 0x2e6e(%rip), %rsi # 0x7dd1
movl $0x15b, %edx # imm = 0x15B
leaq 0x2f45(%rip), %rcx # 0x7eb4
callq 0x2170
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x22a0
cmpl $0x0, %eax
je 0x4f9d
callq 0x2060
movl (%rax), %edi
callq 0x4940
movl %eax, %edi
callq 0x4920
movb $0x0, -0x1(%rbp)
jmp 0x4fa8
xorl %edi, %edi
callq 0x4920
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| file_exists:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0
jz short loc_4F55
jmp short loc_4F74
loc_4F55:
lea rdi, aSrcPathNull+4; "path != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 15Bh
lea rcx, aBoolFileExists; "_Bool file_exists(const char *)"
call ___assert_fail
loc_4F74:
mov rdi, [rbp+var_10]
xor esi, esi
call _access
cmp eax, 0
jz short loc_4F9D
call ___errno_location
mov edi, [rax]
call errno_to_file_error
mov edi, eax
call set_last_error
mov [rbp+var_1], 0
jmp short loc_4FA8
loc_4F9D:
xor edi, edi
call set_last_error
mov [rbp+var_1], 1
loc_4FA8:
mov al, [rbp+var_1]
and al, 1
add rsp, 10h
pop rbp
retn
| char file_exists(long long a1)
{
int *v1; // rax
unsigned int v2; // eax
if ( !a1 )
__assert_fail(
"path != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/file_io.c",
347LL,
"_Bool file_exists(const char *)");
if ( (unsigned int)access(a1, 0LL) )
{
v1 = (int *)__errno_location();
v2 = errno_to_file_error(*v1);
set_last_error(v2);
return 0;
}
else
{
set_last_error(0);
return 1;
}
}
| file_exists:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00104f55
JMP 0x00104f74
LAB_00104f55:
LEA RDI,[0x107f12]
LEA RSI,[0x107dad]
MOV EDX,0x15b
LEA RCX,[0x107e7e]
CALL 0x00102170
LAB_00104f74:
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x001022a0
CMP EAX,0x0
JZ 0x00104f9d
CALL 0x00102060
MOV EDI,dword ptr [RAX]
CALL 0x00104940
MOV EDI,EAX
CALL 0x00104920
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00104fa8
LAB_00104f9d:
XOR EDI,EDI
CALL 0x00104920
MOV byte ptr [RBP + -0x1],0x1
LAB_00104fa8:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x10
POP RBP
RET
|
bool file_exists(char *param_1)
{
int iVar1;
int4 uVar2;
int *piVar3;
if (param_1 != (char *)0x0) {
iVar1 = access(param_1,0);
if (iVar1 == 0) {
set_last_error(0);
}
else {
piVar3 = __errno_location();
uVar2 = errno_to_file_error(*piVar3);
set_last_error(uVar2);
}
return iVar1 == 0;
}
/* WARNING: Subroutine does not return */
__assert_fail("path != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/file_io.c",
0x15b,"_Bool file_exists(const char *)");
}
| |
52,522 | file_exists | tsotchke[P]eshkol/src/core/utils/file_io.c | bool file_exists(const char* path) {
assert(path != NULL);
// Check if the file exists
if (access(path, F_OK) != 0) {
set_last_error(errno_to_file_error(errno));
return false;
}
set_last_error(FILE_ERROR_NONE);
return true;
} | O3 | c | file_exists:
pushq %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x436c
xorl %ebp, %ebp
xorl %esi, %esi
callq 0x2290
movl %eax, %ebx
testl %eax, %eax
je 0x435a
callq 0x2060
movl (%rax), %edi
callq 0x4002
movl %eax, %ebp
testl %ebx, %ebx
sete %al
movl %ebp, 0x4e1f(%rip) # 0x9184
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x2bb1(%rip), %rdi # 0x6f24
leaq 0x2a33(%rip), %rsi # 0x6dad
leaq 0x2b0f(%rip), %rcx # 0x6e90
movl $0x15b, %edx # imm = 0x15B
callq 0x2170
| file_exists:
push rbp
push rbx
push rax
test rdi, rdi
jz short loc_436C
xor ebp, ebp
xor esi, esi
call _access
mov ebx, eax
test eax, eax
jz short loc_435A
call ___errno_location
mov edi, [rax]
call errno_to_file_error
mov ebp, eax
loc_435A:
test ebx, ebx
setz al
mov cs:g_last_error, ebp
add rsp, 8
pop rbx
pop rbp
retn
loc_436C:
lea rdi, aSrcPathNull+4; "path != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolFileExists; "_Bool file_exists(const char *)"
mov edx, 15Bh
call ___assert_fail
| bool file_exists(long long a1)
{
int v1; // ebp
int v2; // ebx
unsigned int *v3; // rax
bool result; // al
if ( !a1 )
__assert_fail(
"path != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/file_io.c",
347LL,
"_Bool file_exists(const char *)");
v1 = 0;
v2 = access(a1, 0LL);
if ( v2 )
{
v3 = (unsigned int *)__errno_location(a1);
v1 = errno_to_file_error(*v3);
}
result = v2 == 0;
g_last_error = v1;
return result;
}
| file_exists:
PUSH RBP
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x0010436c
XOR EBP,EBP
XOR ESI,ESI
CALL 0x00102290
MOV EBX,EAX
TEST EAX,EAX
JZ 0x0010435a
CALL 0x00102060
MOV EDI,dword ptr [RAX]
CALL 0x00104002
MOV EBP,EAX
LAB_0010435a:
TEST EBX,EBX
SETZ AL
MOV dword ptr [0x00109184],EBP
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_0010436c:
LEA RDI,[0x106f24]
LEA RSI,[0x106dad]
LEA RCX,[0x106e90]
MOV EDX,0x15b
CALL 0x00102170
|
bool file_exists(char *param_1)
{
int iVar1;
int4 uVar2;
int *piVar3;
if (param_1 != (char *)0x0) {
uVar2 = 0;
iVar1 = access(param_1,0);
if (iVar1 != 0) {
piVar3 = __errno_location();
uVar2 = errno_to_file_error(*piVar3);
}
g_last_error = uVar2;
return iVar1 == 0;
}
/* WARNING: Subroutine does not return */
__assert_fail("path != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/file_io.c"
,0x15b,"_Bool file_exists(const char *)");
}
| |
52,523 | copy_decode_table | eloqsql/storage/maria/ma_packrec.c | static uint copy_decode_table(uint16 *to_pos, uint offset,
uint16 *decode_table)
{
uint prev_offset= offset;
DBUG_ENTER("copy_decode_table");
/* Descent on the left side. */
if (!(*decode_table & IS_CHAR))
{
/* Set a pointer to the next target node. */
to_pos[offset]=2;
/* Copy the left hand subtree there. */
offset=copy_decode_table(to_pos,offset+2,decode_table+ *decode_table);
}
else
{
/* Copy the uchar value. */
to_pos[offset]= *decode_table;
/* Step behind this node. */
offset+=2;
}
/* Descent on the right side. */
decode_table++;
if (!(*decode_table & IS_CHAR))
{
/* Set a pointer to the next free target node. */
to_pos[prev_offset+1]=(uint16) (offset-prev_offset-1);
/* Copy the right hand subtree to the entry of that node. */
offset=copy_decode_table(to_pos,offset,decode_table+ *decode_table);
}
else
{
/* Copy the uchar value. */
to_pos[prev_offset+1]= *decode_table;
}
DBUG_RETURN(offset);
} | O0 | c | copy_decode_table:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0x37dbe
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movw $0x2, (%rax,%rcx,2)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x2, %esi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
cltq
shlq %rax
addq %rax, %rdx
callq 0x37d60
movl %eax, -0xc(%rbp)
jmp 0x37dd9
movq -0x18(%rbp), %rax
movw (%rax), %dx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movw %dx, (%rax,%rcx,2)
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0x37e36
movl -0xc(%rbp), %eax
subl -0x1c(%rbp), %eax
subl $0x1, %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movw %dx, (%rax,%rcx,2)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
cltq
shlq %rax
addq %rax, %rdx
callq 0x37d60
movl %eax, -0xc(%rbp)
jmp 0x37e4d
movq -0x18(%rbp), %rax
movw (%rax), %dx
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movw %dx, (%rax,%rcx,2)
jmp 0x37e4f
movl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
| copy_decode_table:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov eax, [rbp+var_C]
mov [rbp+var_1C], eax
mov rax, [rbp+var_18]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jnz short loc_37DBE
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
mov word ptr [rax+rcx*2], 2
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
add esi, 2
mov rdx, [rbp+var_18]
mov rax, [rbp+var_18]
movzx eax, word ptr [rax]
cdqe
shl rax, 1
add rdx, rax
call copy_decode_table
mov [rbp+var_C], eax
jmp short loc_37DD9
loc_37DBE:
mov rax, [rbp+var_18]
mov dx, [rax]
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
mov [rax+rcx*2], dx
mov eax, [rbp+var_C]
add eax, 2
mov [rbp+var_C], eax
loc_37DD9:
mov rax, [rbp+var_18]
add rax, 2
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jnz short loc_37E36
mov eax, [rbp+var_C]
sub eax, [rbp+var_1C]
sub eax, 1
mov dx, ax
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
add ecx, 1
mov ecx, ecx
mov [rax+rcx*2], dx
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov rax, [rbp+var_18]
movzx eax, word ptr [rax]
cdqe
shl rax, 1
add rdx, rax
call copy_decode_table
mov [rbp+var_C], eax
jmp short loc_37E4D
loc_37E36:
mov rax, [rbp+var_18]
mov dx, [rax]
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
add ecx, 1
mov ecx, ecx
mov [rax+rcx*2], dx
loc_37E4D:
jmp short $+2
loc_37E4F:
mov eax, [rbp+var_C]
mov [rbp+var_20], eax
mov eax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
| long long copy_decode_table(long long a1, unsigned int a2, _WORD *a3)
{
_WORD *v5; // [rsp+8h] [rbp-18h]
unsigned int v6; // [rsp+14h] [rbp-Ch]
if ( (*a3 & 0x8000) != 0 )
{
*(_WORD *)(a1 + 2LL * a2) = *a3;
v6 = a2 + 2;
}
else
{
*(_WORD *)(a1 + 2LL * a2) = 2;
v6 = copy_decode_table(a1, a2 + 2, &a3[(unsigned __int16)*a3]);
}
v5 = a3 + 1;
if ( (*v5 & 0x8000) != 0 )
{
*(_WORD *)(a1 + 2LL * (a2 + 1)) = *v5;
}
else
{
*(_WORD *)(a1 + 2LL * (a2 + 1)) = v6 - a2 - 1;
return (unsigned int)copy_decode_table(a1, v6, &v5[(unsigned __int16)*v5]);
}
return v6;
}
| copy_decode_table:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x00137dbe
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
MOV word ptr [RAX + RCX*0x2],0x2
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
ADD ESI,0x2
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
CDQE
SHL RAX,0x1
ADD RDX,RAX
CALL 0x00137d60
MOV dword ptr [RBP + -0xc],EAX
JMP 0x00137dd9
LAB_00137dbe:
MOV RAX,qword ptr [RBP + -0x18]
MOV DX,word ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
MOV word ptr [RAX + RCX*0x2],DX
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x2
MOV dword ptr [RBP + -0xc],EAX
LAB_00137dd9:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x00137e36
MOV EAX,dword ptr [RBP + -0xc]
SUB EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x1
MOV DX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x1
MOV ECX,ECX
MOV word ptr [RAX + RCX*0x2],DX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
CDQE
SHL RAX,0x1
ADD RDX,RAX
CALL 0x00137d60
MOV dword ptr [RBP + -0xc],EAX
JMP 0x00137e4d
LAB_00137e36:
MOV RAX,qword ptr [RBP + -0x18]
MOV DX,word ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x1
MOV ECX,ECX
MOV word ptr [RAX + RCX*0x2],DX
LAB_00137e4d:
JMP 0x00137e4f
LAB_00137e4f:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
int copy_decode_table(long param_1,uint param_2,ushort *param_3)
{
int local_14;
if ((*param_3 & 0x8000) == 0) {
*(int2 *)(param_1 + (ulong)param_2 * 2) = 2;
local_14 = copy_decode_table(param_1,param_2 + 2,param_3 + (int)(uint)*param_3);
}
else {
*(ushort *)(param_1 + (ulong)param_2 * 2) = *param_3;
local_14 = param_2 + 2;
}
param_3 = param_3 + 1;
if ((*param_3 & 0x8000) == 0) {
*(short *)(param_1 + (ulong)(param_2 + 1) * 2) = ((short)local_14 - (short)param_2) + -1;
local_14 = copy_decode_table(param_1,local_14,param_3 + (int)(uint)*param_3);
}
else {
*(ushort *)(param_1 + (ulong)(param_2 + 1) * 2) = *param_3;
}
return local_14;
}
| |
52,524 | ma_duplicate_resultset_metadata | eloqsql/libmariadb/libmariadb/mariadb_lib.c | MYSQL_FIELD *ma_duplicate_resultset_metadata(MYSQL_FIELD *fields, size_t count,
MA_MEM_ROOT *memroot)
{
size_t i;
MYSQL_FIELD *result=
(MYSQL_FIELD *) ma_alloc_root(memroot, sizeof(MYSQL_FIELD) * count);
if (!result)
return NULL;
for (i= 0; i < count; i++)
{
if (ma_deep_copy_field(&fields[i], &result[i], memroot))
return NULL;
}
return result;
} | O0 | c | ma_duplicate_resultset_metadata:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
shlq $0x7, %rsi
callq 0x2c8b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x26f0a
movq $0x0, -0x8(%rbp)
jmp 0x26f6a
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x26f62
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
shlq $0x7, %rax
addq %rax, %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rax
shlq $0x7, %rax
addq %rax, %rsi
movq -0x20(%rbp), %rdx
callq 0x26f80
cmpl $0x0, %eax
je 0x26f52
movq $0x0, -0x8(%rbp)
jmp 0x26f6a
jmp 0x26f54
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x26f12
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_duplicate_resultset_metadata:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_18]
shl rsi, 7
call ma_alloc_root
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_26F0A
mov [rbp+var_8], 0
jmp short loc_26F6A
loc_26F0A:
mov [rbp+var_28], 0
loc_26F12:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
jnb short loc_26F62
mov rdi, [rbp+var_10]
mov rax, [rbp+var_28]
shl rax, 7
add rdi, rax
mov rsi, [rbp+var_30]
mov rax, [rbp+var_28]
shl rax, 7
add rsi, rax
mov rdx, [rbp+var_20]
call ma_deep_copy_field
cmp eax, 0
jz short loc_26F52
mov [rbp+var_8], 0
jmp short loc_26F6A
loc_26F52:
jmp short $+2
loc_26F54:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_26F12
loc_26F62:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_26F6A:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long ma_duplicate_resultset_metadata(long long a1, unsigned long long a2, long long a3)
{
long long v4; // [rsp+0h] [rbp-30h]
unsigned long long i; // [rsp+8h] [rbp-28h]
v4 = ma_alloc_root(a3, a2 << 7);
if ( !v4 )
return 0LL;
for ( i = 0LL; i < a2; ++i )
{
if ( (unsigned int)ma_deep_copy_field((i << 7) + a1, (i << 7) + v4, a3) )
return 0LL;
}
return v4;
}
| ma_duplicate_resultset_metadata:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x18]
SHL RSI,0x7
CALL 0x0012c8b0
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00126f0a
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00126f6a
LAB_00126f0a:
MOV qword ptr [RBP + -0x28],0x0
LAB_00126f12:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x00126f62
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x7
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x7
ADD RSI,RAX
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00126f80
CMP EAX,0x0
JZ 0x00126f52
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00126f6a
LAB_00126f52:
JMP 0x00126f54
LAB_00126f54:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00126f12
LAB_00126f62:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_00126f6a:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long ma_duplicate_resultset_metadata(long param_1,ulong param_2,int8 param_3)
{
int iVar1;
ulong local_30;
long local_10;
local_10 = ma_alloc_root(param_3,param_2 << 7);
if (local_10 == 0) {
local_10 = 0;
}
else {
for (local_30 = 0; local_30 < param_2; local_30 = local_30 + 1) {
iVar1 = ma_deep_copy_field(param_1 + local_30 * 0x80,local_10 + local_30 * 0x80,param_3);
if (iVar1 != 0) {
return 0;
}
}
}
return local_10;
}
| |
52,525 | nglog::LogMessage::SendToSyslogAndLog() | ng-log[P]ng-log/src/logging.cc | void LogMessage::SendToSyslogAndLog() {
#ifdef HAVE_SYSLOG_H
// Before any calls to syslog(), make a single call to openlog()
static bool openlog_already_called = false;
if (!openlog_already_called) {
openlog(tools::ProgramInvocationShortName(),
LOG_CONS | LOG_NDELAY | LOG_PID, LOG_USER);
openlog_already_called = true;
}
// This array maps Google severity levels to syslog levels
const int SEVERITY_TO_LEVEL[] = {LOG_INFO, LOG_WARNING, LOG_ERR, LOG_EMERG};
syslog(LOG_USER | SEVERITY_TO_LEVEL[static_cast<int>(data_->severity_)],
"%.*s", static_cast<int>(data_->num_chars_to_syslog_),
data_->message_text_ + data_->num_prefix_chars_);
SendToLog();
#else
LOG(ERROR) << "No syslog support: message=" << data_->message_text_;
#endif
} | O0 | cpp | nglog::LogMessage::SendToSyslogAndLog():
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
testb $0x1, 0x7075e(%rip) # 0x7fdf9
jne 0xf6bb
callq 0x4ac20
movq %rax, %rdi
movl $0xb, %esi
movl $0x8, %edx
callq 0x95f0
movb $0x1, 0x7073e(%rip) # 0x7fdf9
movq -0x28(%rbp), %rax
movq 0x3f07a(%rip), %rcx # 0x4e740
movq %rcx, -0x20(%rbp)
movq 0x3f077(%rip), %rcx # 0x4e748
movq %rcx, -0x18(%rbp)
movq 0x8(%rax), %rcx
movslq 0x7698(%rcx), %rcx
movl -0x20(%rbp,%rcx,4), %edi
orl $0x8, %edi
movq 0x8(%rax), %rcx
movq 0x76c8(%rcx), %rcx
movl %ecx, %edx
movq 0x8(%rax), %rcx
addq $0x4, %rcx
movq 0x8(%rax), %rax
addq 0x76b8(%rax), %rcx
leaq 0x3e082(%rip), %rsi # 0x4d790
movb $0x0, %al
callq 0x90f0
movq -0x28(%rbp), %rdi
callq 0xe1e0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN5nglog10LogMessage18SendToSyslogAndLogEv:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
test cs:_ZZN5nglog10LogMessage18SendToSyslogAndLogEvE22openlog_already_called, 1; nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called
jnz short loc_F6BB
call _ZN5nglog5tools26ProgramInvocationShortNameEv; nglog::tools::ProgramInvocationShortName(void)
mov rdi, rax
mov esi, 0Bh
mov edx, 8
call _openlog
mov cs:_ZZN5nglog10LogMessage18SendToSyslogAndLogEvE22openlog_already_called, 1; nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called
loc_F6BB:
mov rax, [rbp+var_28]
mov rcx, cs:qword_4E740
mov [rbp+var_20], rcx
mov rcx, cs:qword_4E748
mov [rbp+var_18], rcx
mov rcx, [rax+8]
movsxd rcx, dword ptr [rcx+7698h]
mov edi, dword ptr [rbp+rcx*4+var_20]
or edi, 8
mov rcx, [rax+8]
mov rcx, [rcx+76C8h]
mov edx, ecx
mov rcx, [rax+8]
add rcx, 4
mov rax, [rax+8]
add rcx, [rax+76B8h]
lea rsi, aS; "%.*s"
mov al, 0
call _syslog
mov rdi, [rbp+var_28]; this
call _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void)
add rsp, 30h
pop rbp
retn
| nglog::LogDestination * nglog::LogMessage::SendToSyslogAndLog(nglog::LogMessage *this)
{
long long v1; // rax
_QWORD v3[4]; // [rsp+10h] [rbp-20h]
v3[3] = this;
if ( (nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called & 1) == 0 )
{
v1 = nglog::tools::ProgramInvocationShortName(this);
openlog(v1, 11LL, 8LL);
nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called = 1;
}
v3[0] = 0x400000006LL;
v3[1] = 3LL;
syslog(
*((_DWORD *)v3 + *(int *)(*((_QWORD *)this + 1) + 30360LL)) | 8u,
"%.*s",
*(_QWORD *)(*((_QWORD *)this + 1) + 30408LL),
(const char *)(*(_QWORD *)(*((_QWORD *)this + 1) + 30392LL) + *((_QWORD *)this + 1) + 4LL));
return nglog::LogMessage::SendToLog(this);
}
| SendToSyslogAndLog:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
TEST byte ptr [0x0017fdf9],0x1
JNZ 0x0010f6bb
CALL 0x0014ac20
MOV RDI,RAX
MOV ESI,0xb
MOV EDX,0x8
CALL 0x001095f0
MOV byte ptr [0x0017fdf9],0x1
LAB_0010f6bb:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [0x0014e740]
MOV qword ptr [RBP + -0x20],RCX
MOV RCX,qword ptr [0x0014e748]
MOV qword ptr [RBP + -0x18],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RCX + 0x7698]
MOV EDI,dword ptr [RBP + RCX*0x4 + -0x20]
OR EDI,0x8
MOV RCX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RCX + 0x76c8]
MOV EDX,ECX
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,0x4
MOV RAX,qword ptr [RAX + 0x8]
ADD RCX,qword ptr [RAX + 0x76b8]
LEA RSI,[0x14d790]
MOV AL,0x0
CALL 0x001090f0
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0010e1e0
ADD RSP,0x30
POP RBP
RET
|
/* nglog::LogMessage::SendToSyslogAndLog() */
void __thiscall nglog::LogMessage::SendToSyslogAndLog(LogMessage *this)
{
char *__ident;
int8 local_28;
int8 local_20;
LogMessage *local_10;
local_10 = this;
if ((SendToSyslogAndLog()::openlog_already_called & 1) == 0) {
__ident = (char *)tools::ProgramInvocationShortName();
openlog(__ident,0xb,8);
SendToSyslogAndLog()::openlog_already_called = 1;
}
local_28 = DAT_0014e740;
local_20 = DAT_0014e748;
syslog(*(uint *)((long)&local_28 + (long)*(int *)(*(long *)(this + 8) + 0x7698) * 4) | 8,"%.*s",
*(ulong *)(*(long *)(this + 8) + 0x76c8) & 0xffffffff,
*(long *)(this + 8) + 4 + *(long *)(*(long *)(this + 8) + 0x76b8));
SendToLog(this);
return;
}
| |
52,526 | nglog::LogMessage::SendToSyslogAndLog() | ng-log[P]ng-log/src/logging.cc | void LogMessage::SendToSyslogAndLog() {
#ifdef HAVE_SYSLOG_H
// Before any calls to syslog(), make a single call to openlog()
static bool openlog_already_called = false;
if (!openlog_already_called) {
openlog(tools::ProgramInvocationShortName(),
LOG_CONS | LOG_NDELAY | LOG_PID, LOG_USER);
openlog_already_called = true;
}
// This array maps Google severity levels to syslog levels
const int SEVERITY_TO_LEVEL[] = {LOG_INFO, LOG_WARNING, LOG_ERR, LOG_EMERG};
syslog(LOG_USER | SEVERITY_TO_LEVEL[static_cast<int>(data_->severity_)],
"%.*s", static_cast<int>(data_->num_chars_to_syslog_),
data_->message_text_ + data_->num_prefix_chars_);
SendToLog();
#else
LOG(ERROR) << "No syslog support: message=" << data_->message_text_;
#endif
} | O2 | cpp | nglog::LogMessage::SendToSyslogAndLog():
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x329c8(%rip) # 0x3cc59
jne 0xa2ad
callq 0x1c77d
pushq $0xb
popq %rsi
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x74b0
movb $0x1, 0x329ac(%rip) # 0x3cc59
movq 0x8(%rbx), %rax
movslq 0x7698(%rax), %rcx
leaq 0x14391(%rip), %rdx # 0x1e650
movl (%rdx,%rcx,4), %edi
orl $0x8, %edi
movl 0x76c8(%rax), %edx
movq 0x76b8(%rax), %rcx
addq %rax, %rcx
addq $0x4, %rcx
leaq 0x133c0(%rip), %rsi # 0x1d6a0
xorl %eax, %eax
callq 0x70b0
movq %rbx, %rdi
popq %rbx
jmp 0x9750
| _ZN5nglog10LogMessage18SendToSyslogAndLogEv:
push rbx
mov rbx, rdi
cmp cs:_ZZN5nglog10LogMessage18SendToSyslogAndLogEvE22openlog_already_called, 0; nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called
jnz short loc_A2AD
call _ZN5nglog5tools26ProgramInvocationShortNameEv; nglog::tools::ProgramInvocationShortName(void)
push 0Bh
pop rsi
push 8
pop rdx
mov rdi, rax
call _openlog
mov cs:_ZZN5nglog10LogMessage18SendToSyslogAndLogEvE22openlog_already_called, 1; nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called
loc_A2AD:
mov rax, [rbx+8]
movsxd rcx, dword ptr [rax+7698h]
lea rdx, unk_1E650
mov edi, [rdx+rcx*4]
or edi, 8
mov edx, [rax+76C8h]
mov rcx, [rax+76B8h]
add rcx, rax
add rcx, 4
lea rsi, aS; "%.*s"
xor eax, eax
call _syslog
mov rdi, rbx; this
pop rbx
jmp _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void)
| long long nglog::LogMessage::SendToSyslogAndLog(nglog::LogMessage *this)
{
long long v1; // rax
if ( !nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called )
{
v1 = nglog::tools::ProgramInvocationShortName(this);
openlog(v1, 11LL, 8LL);
nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called = 1;
}
syslog(
dword_1E650[*(int *)(*((_QWORD *)this + 1) + 30360LL)] | 8u,
"%.*s",
*(_DWORD *)(*((_QWORD *)this + 1) + 30408LL),
(const char *)(*((_QWORD *)this + 1) + *(_QWORD *)(*((_QWORD *)this + 1) + 30392LL) + 4LL));
return nglog::LogMessage::SendToLog(this);
}
| SendToSyslogAndLog:
PUSH RBX
MOV RBX,RDI
CMP byte ptr [0x0013cc59],0x0
JNZ 0x0010a2ad
CALL 0x0011c77d
PUSH 0xb
POP RSI
PUSH 0x8
POP RDX
MOV RDI,RAX
CALL 0x001074b0
MOV byte ptr [0x0013cc59],0x1
LAB_0010a2ad:
MOV RAX,qword ptr [RBX + 0x8]
MOVSXD RCX,dword ptr [RAX + 0x7698]
LEA RDX,[0x11e650]
MOV EDI,dword ptr [RDX + RCX*0x4]
OR EDI,0x8
MOV EDX,dword ptr [RAX + 0x76c8]
MOV RCX,qword ptr [RAX + 0x76b8]
ADD RCX,RAX
ADD RCX,0x4
LEA RSI,[0x11d6a0]
XOR EAX,EAX
CALL 0x001070b0
MOV RDI,RBX
POP RBX
JMP 0x00109750
|
/* nglog::LogMessage::SendToSyslogAndLog() */
void __thiscall nglog::LogMessage::SendToSyslogAndLog(LogMessage *this)
{
long lVar1;
char *__ident;
if (SendToSyslogAndLog()::openlog_already_called == '\0') {
__ident = (char *)tools::ProgramInvocationShortName();
openlog(__ident,0xb,8);
SendToSyslogAndLog()::openlog_already_called = '\x01';
}
lVar1 = *(long *)(this + 8);
syslog(*(uint *)(&DAT_0011e650 + (long)*(int *)(lVar1 + 0x7698) * 4) | 8,"%.*s",
(ulong)*(uint *)(lVar1 + 0x76c8),*(long *)(lVar1 + 0x76b8) + lVar1 + 4);
SendToLog(this);
return;
}
| |
52,527 | init_available_charsets | eloqsql/mysys/charset.c | static void init_available_charsets(void)
{
char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
struct charset_info_st **cs;
MY_CHARSET_LOADER loader;
DBUG_ENTER("init_available_charsets");
bzero((char*) &all_charsets,sizeof(all_charsets));
bzero((char*) &my_collation_statistics, sizeof(my_collation_statistics));
my_hash_init2(key_memory_charsets, &charset_name_hash, 16,
&my_charset_latin1, 64, 0, 0, get_charset_key,
0, 0, HASH_UNIQUE);
init_compiled_charsets(MYF(0));
/* Copy compiled charsets */
for (cs= (struct charset_info_st**) all_charsets;
cs < (struct charset_info_st**) all_charsets +
array_elements(all_charsets)-1 ;
cs++)
{
if (*cs)
{
DBUG_ASSERT(cs[0]->mbmaxlen <= MY_CS_MBMAXLEN);
if (cs[0]->m_ctype)
if (init_state_maps(*cs))
*cs= NULL;
}
}
my_charset_loader_init_mysys(&loader);
strmov(get_charsets_dir(fname), MY_CHARSET_INDEX);
my_read_charset_file(&loader, fname, MYF(0));
DBUG_VOID_RETURN;
} | O3 | c | init_available_charsets:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x300, %rsp # imm = 0x300
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq 0x33e65f(%rip), %rbx # 0x366980
movl $0x4000, %edx # imm = 0x4000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x24180
leaq 0x3426b9(%rip), %rdi # 0x36a9f0
movl $0x4000, %edx # imm = 0x4000
xorl %esi, %esi
callq 0x24180
leaq 0x33e332(%rip), %rax # 0x36667c
movl (%rax), %edi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
leaq 0x10fc(%rip), %rax # 0x29457
movq %rax, 0x8(%rsp)
movl $0x1, 0x20(%rsp)
movq $0x0, (%rsp)
leaq 0x342609(%rip), %rsi # 0x36a980
leaq 0x2ed3f2(%rip), %rcx # 0x315770
movl $0x40, %r8d
movl $0x10, %edx
xorl %r9d, %r9d
callq 0x297b5
xorl %edi, %edi
callq 0x2c850
movq $-0x8, %r14
movq 0x8(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x283c2
cmpq $0x0, 0x40(%rdi)
je 0x283c2
callq 0x292a2
testb %al, %al
je 0x283c2
movq $0x0, 0x8(%rbx,%r14)
addq $0x8, %r14
cmpq $0x3ff0, %r14 # imm = 0x3FF0
jb 0x2839f
leaq -0x2e0(%rbp), %rbx
movb $0x0, (%rbx)
leaq -0x8ae(%rip), %rax # 0x27b32
movq %rax, 0x80(%rbx)
leaq -0x8ad(%rip), %rax # 0x27b41
movq %rax, 0x88(%rbx)
leaq -0x8a0(%rip), %rax # 0x27b5c
movq %rax, 0x90(%rbx)
leaq 0x34f0(%rip), %rax # 0x2b8fa
movq %rax, 0x98(%rbx)
leaq 0x2c7410(%rip), %rax # 0x2ef828
movq (%rax), %rax
movq %rax, 0xa0(%rbx)
leaq -0x8af(%rip), %rax # 0x27b7a
movq %rax, 0xa8(%rbx)
leaq -0x230(%rbp), %r14
movq %r14, %rdi
callq 0x280bf
movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49
movq %rcx, (%rax)
movw $0x6c, 0x8(%rax)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x29468
movq %fs:0x28, %rax
cmpq -0x18(%rbp), %rax
jne 0x2847a
addq $0x300, %rsp # imm = 0x300
popq %rbx
popq %r14
popq %rbp
retq
callq 0x24320
| init_available_charsets:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 300h
mov rax, fs:28h
mov [rbp+var_18], rax
lea rbx, all_charsets
mov edx, 4000h
mov rdi, rbx
xor esi, esi
call _memset
lea rdi, my_collation_statistics
mov edx, 4000h
xor esi, esi
call _memset
lea rax, key_memory_charsets
mov edi, [rax]
xorps xmm0, xmm0
movups [rsp+310h+var_300], xmm0
lea rax, get_charset_key
mov [rsp+310h+var_308], rax
mov [rsp+310h+var_2F0], 1
mov [rsp+310h+var_310], 0
lea rsi, charset_name_hash
lea rcx, my_charset_latin1
mov r8d, 40h ; '@'
mov edx, 10h
xor r9d, r9d
call my_hash_init2
xor edi, edi
call init_compiled_charsets
mov r14, 0FFFFFFFFFFFFFFF8h
loc_2839F:
mov rdi, [rbx+r14+8]
test rdi, rdi
jz short loc_283C2
cmp qword ptr [rdi+40h], 0
jz short loc_283C2
call init_state_maps
test al, al
jz short loc_283C2
mov qword ptr [rbx+r14+8], 0
loc_283C2:
add r14, 8
cmp r14, 3FF0h
jb short loc_2839F
lea rbx, [rbp+var_2E0]
mov byte ptr [rbx], 0
lea rax, my_once_alloc_c
mov [rbx+80h], rax
lea rax, my_malloc_c
mov [rbx+88h], rax
lea rax, my_realloc_c
mov [rbx+90h], rax
lea rax, my_free
mov [rbx+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rbx+0A0h], rax
lea rax, add_collation
mov [rbx+0A8h], rax
lea r14, [rbp+var_230]
mov rdi, r14
call get_charsets_dir
mov rcx, 6D782E7865646E49h
mov [rax], rcx
mov word ptr [rax+8], 6Ch ; 'l'
mov rdi, rbx
mov rsi, r14
xor edx, edx
call my_read_charset_file
mov rax, fs:28h
cmp rax, [rbp+var_18]
jnz short loc_2847A
add rsp, 300h
pop rbx
pop r14
pop rbp
retn
loc_2847A:
call ___stack_chk_fail
| unsigned long long init_available_charsets()
{
unsigned long long v0; // r14
long long v1; // rdi
_BYTE v3[128]; // [rsp+30h] [rbp-2E0h] BYREF
long long ( *v4)(long long); // [rsp+B0h] [rbp-260h]
long long ( *v5)(long long); // [rsp+B8h] [rbp-258h]
long long ( *v6)(long long, long long); // [rsp+C0h] [rbp-250h]
long long ( *v7)(_QWORD); // [rsp+C8h] [rbp-248h]
long long ( *v8)(); // [rsp+D0h] [rbp-240h]
long long ( *v9)(unsigned int *); // [rsp+D8h] [rbp-238h]
_BYTE v10[536]; // [rsp+E0h] [rbp-230h] BYREF
unsigned long long v11; // [rsp+2F8h] [rbp-18h]
v11 = __readfsqword(0x28u);
memset(all_charsets, 0LL, sizeof(all_charsets));
memset(my_collation_statistics, 0LL, sizeof(my_collation_statistics));
my_hash_init2(
key_memory_charsets,
(unsigned int)&charset_name_hash,
16,
(unsigned int)&my_charset_latin1,
64,
0,
0LL,
(long long)get_charset_key,
0LL,
0LL,
1);
init_compiled_charsets(0LL);
v0 = 0x1FFFFFFFFFFFFFFFLL;
do
{
v1 = all_charsets[v0 + 1];
if ( v1 && *(_QWORD *)(v1 + 64) && (unsigned __int8)init_state_maps(v1) )
all_charsets[v0 + 1] = 0LL;
++v0;
}
while ( v0 < 2046 );
v3[0] = 0;
v4 = my_once_alloc_c;
v5 = my_malloc_c;
v6 = my_realloc_c;
v7 = my_free;
v8 = my_charset_error_reporter;
v9 = add_collation;
strcpy((char *)get_charsets_dir((long long)v10), "Index.xml");
my_read_charset_file(v3, v10, 0LL);
return __readfsqword(0x28u);
}
| init_available_charsets:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x300
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA RBX,[0x466980]
MOV EDX,0x4000
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00124180
LEA RDI,[0x46a9f0]
MOV EDX,0x4000
XOR ESI,ESI
CALL 0x00124180
LEA RAX,[0x46667c]
MOV EDI,dword ptr [RAX]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x10],XMM0
LEA RAX,[0x129457]
MOV qword ptr [RSP + 0x8],RAX
MOV dword ptr [RSP + 0x20],0x1
MOV qword ptr [RSP],0x0
LEA RSI,[0x46a980]
LEA RCX,[0x415770]
MOV R8D,0x40
MOV EDX,0x10
XOR R9D,R9D
CALL 0x001297b5
XOR EDI,EDI
CALL 0x0012c850
MOV R14,-0x8
LAB_0012839f:
MOV RDI,qword ptr [RBX + R14*0x1 + 0x8]
TEST RDI,RDI
JZ 0x001283c2
CMP qword ptr [RDI + 0x40],0x0
JZ 0x001283c2
CALL 0x001292a2
TEST AL,AL
JZ 0x001283c2
MOV qword ptr [RBX + R14*0x1 + 0x8],0x0
LAB_001283c2:
ADD R14,0x8
CMP R14,0x3ff0
JC 0x0012839f
LEA RBX,[RBP + -0x2e0]
MOV byte ptr [RBX],0x0
LEA RAX,[0x127b32]
MOV qword ptr [RBX + 0x80],RAX
LEA RAX,[0x127b41]
MOV qword ptr [RBX + 0x88],RAX
LEA RAX,[0x127b5c]
MOV qword ptr [RBX + 0x90],RAX
LEA RAX,[0x12b8fa]
MOV qword ptr [RBX + 0x98],RAX
LEA RAX,[0x3ef828]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBX + 0xa0],RAX
LEA RAX,[0x127b7a]
MOV qword ptr [RBX + 0xa8],RAX
LEA R14,[RBP + -0x230]
MOV RDI,R14
CALL 0x001280bf
MOV RCX,0x6d782e7865646e49
MOV qword ptr [RAX],RCX
MOV word ptr [RAX + 0x8],0x6c
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x00129468
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x0012847a
ADD RSP,0x300
POP RBX
POP R14
POP RBP
RET
LAB_0012847a:
CALL 0x00124320
|
void init_available_charsets(void)
{
char cVar1;
int8 *puVar2;
ulong uVar3;
long in_FS_OFFSET;
int1 local_2e8 [128];
code *local_268;
code *local_260;
code *local_258;
code *local_250;
int *local_248;
code *local_240;
int1 local_238 [536];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
memset(&all_charsets,0,0x4000);
memset(my_collation_statistics,0,0x4000);
my_hash_init2(key_memory_charsets,charset_name_hash,0x10,&my_charset_latin1,0x40,0,0,
get_charset_key,0,0,1);
init_compiled_charsets(0);
uVar3 = 0xfffffffffffffff8;
do {
if ((*(long *)((long)&DAT_00466988 + uVar3) != 0) &&
(*(long *)(*(long *)((long)&DAT_00466988 + uVar3) + 0x40) != 0)) {
cVar1 = init_state_maps();
if (cVar1 != '\0') {
*(int8 *)((long)&DAT_00466988 + uVar3) = 0;
}
}
uVar3 = uVar3 + 8;
} while (uVar3 < 0x3ff0);
local_2e8[0] = 0;
local_268 = my_once_alloc_c;
local_260 = my_malloc_c;
local_258 = my_realloc_c;
local_250 = my_free;
local_248 = my_charset_error_reporter;
local_240 = add_collation;
puVar2 = (int8 *)get_charsets_dir(local_238);
*puVar2 = 0x6d782e7865646e49;
*(int2 *)(puVar2 + 1) = 0x6c;
my_read_charset_file(local_2e8,local_238,0);
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
52,528 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_token_string() const | llama.cpp/common/./json.hpp | std::string get_token_string() const
{
// escape control characters
std::string result;
for (const auto c : token_string)
{
if (static_cast<unsigned char>(c) <= '\x1F')
{
// escape control characters
std::array<char, 9> cs{{}};
static_cast<void>((std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
result += cs.data();
}
else
{
// add character as is
result.push_back(static_cast<std::string::value_type>(c));
}
}
return result;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_token_string() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x38(%rsi), %r13
movq 0x40(%rsi), %rbp
cmpq %rbp, %r13
je 0x2d2df
leaq 0x99cbd(%rip), %r14 # 0xc6f4d
leaq 0x8(%rsp), %r15
movzbl (%r13), %ecx
cmpl $0x1f, %ecx
ja 0x2d2cc
movb $0x0, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movl $0x9, %esi
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1c630
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c810
jmp 0x2d2d7
movsbl %cl, %esi
movq %rbx, %rdi
callq 0x1cd90
incq %r13
cmpq %rbp, %r13
jne 0x2d295
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2d2f3
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x2d30a
movq (%r12), %rsi
incq %rsi
callq 0x1c110
movq %r14, %rdi
callq 0x1c7d0
| _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov r13, [rsi+38h]
mov rbp, [rsi+40h]
cmp r13, rbp
jz short loc_2D2DF
lea r14, aU4x; "<U+%.4X>"
lea r15, [rsp+48h+var_40]
loc_2D295:
movzx ecx, byte ptr [r13+0]
cmp ecx, 1Fh
ja short loc_2D2CC
mov [rsp+48h+var_38], 0
mov [rsp+48h+var_40], 0
mov esi, 9
mov rdi, r15
mov rdx, r14
xor eax, eax
call _snprintf
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
jmp short loc_2D2D7
loc_2D2CC:
movsx esi, cl
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
loc_2D2D7:
inc r13
cmp r13, rbp
jnz short loc_2D295
loc_2D2DF:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_2D2F3:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_2D30A
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2D30A:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(
long long a1,
long long a2)
{
unsigned __int8 *v2; // r13
unsigned __int8 *i; // rbp
unsigned int v4; // ecx
long long v6; // [rsp+8h] [rbp-40h] BYREF
char v7; // [rsp+10h] [rbp-38h]
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v2 = *(unsigned __int8 **)(a2 + 56);
for ( i = *(unsigned __int8 **)(a2 + 64); v2 != i; ++v2 )
{
v4 = *v2;
if ( v4 > 0x1F )
{
std::string::push_back(a1, (unsigned int)(char)v4);
}
else
{
v7 = 0;
v6 = 0LL;
snprintf(&v6, 9LL, "<U+%.4X>", v4);
std::string::append(a1, &v6);
}
}
return a1;
}
| get_token_string:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV R13,qword ptr [RSI + 0x38]
MOV RBP,qword ptr [RSI + 0x40]
CMP R13,RBP
JZ 0x0012d2df
LEA R14,[0x1c6f4d]
LEA R15,[RSP + 0x8]
LAB_0012d295:
MOVZX ECX,byte ptr [R13]
CMP ECX,0x1f
JA 0x0012d2cc
MOV byte ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x8],0x0
MOV ESI,0x9
MOV RDI,R15
MOV RDX,R14
XOR EAX,EAX
CALL 0x0011c630
LAB_0012d2bf:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011c810
JMP 0x0012d2d7
LAB_0012d2cc:
MOVSX ESI,CL
MOV RDI,RBX
CALL 0x0011cd90
LAB_0012d2d7:
INC R13
CMP R13,RBP
JNZ 0x0012d295
LAB_0012d2df:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::get_token_string() const */
void nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::get_token_string(void)
{
byte *pbVar1;
long in_RSI;
long *in_RDI;
byte *pbVar2;
char local_40 [16];
*in_RDI = (long)(in_RDI + 2);
in_RDI[1] = 0;
*(int1 *)(in_RDI + 2) = 0;
pbVar2 = *(byte **)(in_RSI + 0x38);
pbVar1 = *(byte **)(in_RSI + 0x40);
if (pbVar2 != pbVar1) {
do {
if (*pbVar2 < 0x20) {
local_40[8] = 0;
local_40[0] = '\0';
local_40[1] = '\0';
local_40[2] = '\0';
local_40[3] = '\0';
local_40[4] = '\0';
local_40[5] = '\0';
local_40[6] = '\0';
local_40[7] = '\0';
snprintf(local_40,9,"<U+%.4X>");
/* try { // try from 0012d2bf to 0012d2c9 has its CatchHandler @ 0012d2f3 */
std::__cxx11::string::append((char *)in_RDI);
}
else {
/* try { // try from 0012d2cc to 0012d2d6 has its CatchHandler @ 0012d2f1 */
std::__cxx11::string::push_back((char)in_RDI);
}
pbVar2 = pbVar2 + 1;
} while (pbVar2 != pbVar1);
}
return;
}
| |
52,529 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | monkey531[P]llama/common/json.hpp | const_reference operator[](const typename object_t::key_type& key) const
{
// const operator[] only works for objects
if (JSON_HEDLEY_LIKELY(is_object()))
{
auto it = m_data.m_value.object->find(key);
JSON_ASSERT(it != m_data.m_value.object->end());
return it->second;
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x7e04e
movq 0x8(%r14), %rdi
callq 0x7e0f2
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x7e0aa
addq $0x20, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23460
movq %rax, %rbx
movq %r14, %rdi
callq 0x42c00
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x35e34(%rip), %rsi # 0xb3ea4
leaq 0x10(%rsp), %rdi
callq 0x7dde1
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x62b82
xorl %ebp, %ebp
leaq 0x7bead(%rip), %rsi # 0xf9f48
leaq -0x3e822(%rip), %rdx # 0x3f880
movq %rbx, %rdi
callq 0x23f20
leaq 0x30d45(%rip), %rdi # 0xaedf6
leaq 0x30d88(%rip), %rdx # 0xaee40
leaq 0x35e18(%rip), %rcx # 0xb3ed7
movl $0x53ca, %esi # imm = 0x53CA
xorl %eax, %eax
callq 0x23ed0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x241d8
testb %bpl, %bpl
jne 0x7e0e2
jmp 0x7e0ea
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23fa0
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_7E04E
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findERSH_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::find(std::string const&)
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_7E0AA
add rax, 20h ; ' '
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_7E04E:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_7E0AA:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aItMDataMValueO; "it != m_data.m_value.object->end()"
mov esi, 53CAh
xor eax, eax
call _ggml_abort
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7E0E2
jmp short loc_7E0EA
mov r14, rax
loc_7E0E2:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_7E0EA:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1)
{
void *v1; // rbx
char v2; // bp
long long v3; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
long long v6; // r14
const char *v7; // [rsp+8h] [rbp-40h] BYREF
_BYTE v8[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(
(long long)v8,
(long long)"cannot use operator[] with a string argument with ",
&v7);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
305,
(long long)v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v3 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::find(*(_QWORD *)(a1 + 8));
if ( v3 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v6 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
21450LL,
"GGML_ASSERT(%s) failed",
"it != m_data.m_value.object->end()");
std::string::~string(v8);
if ( v2 )
__cxa_free_exception(v1);
_Unwind_Resume(v6);
}
return v3 + 32;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0017e04e
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x0017e0f2
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x0017e0aa
ADD RAX,0x20
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0017e04e:
PUSH 0x20
POP RDI
CALL 0x00123460
MOV RBX,RAX
MOV RDI,R14
CALL 0x00142c00
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0017e069:
LEA RSI,[0x1b3ea4]
LEA RDI,[RSP + 0x10]
CALL 0x0017dde1
MOV BPL,0x1
LAB_0017e07d:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x00162b82
XOR EBP,EBP
LEA RSI,[0x1f9f48]
LEA RDX,[0x13f880]
MOV RDI,RBX
CALL 0x00123f20
LAB_0017e0aa:
LEA RDI,[0x1aedf6]
LEA RDX,[0x1aee40]
LEA RCX,[0x1b3ed7]
MOV ESI,0x53ca
XOR EAX,EAX
CALL 0x00123ed0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](std::__cxx11::string const&) const */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,string *param_1)
{
long lVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 0017e069 to 0017e079 has its CatchHandler @ 0017e0df */
detail::concat<std::__cxx11::string,char_const(&)[51],char_const*>
(local_38,"cannot use operator[] with a string argument with ",&local_40);
/* try { // try from 0017e07d to 0017e0a9 has its CatchHandler @ 0017e0cb */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
lVar1 = ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::find(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8),param_1);
if (lVar1 != *(long *)(*(long *)(this + 8) + 8)) {
return lVar1 + 0x20;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x53ca,
"GGML_ASSERT(%s) failed","it != m_data.m_value.object->end()");
}
| |
52,530 | xconf_print_usage | xtate/src/xconf.c | void xconf_print_usage() {
printf("\n");
printf("Welcome to " XTATE_NAME_TITLE_CASE "!");
printf("\n");
xprint(XTATE_DESCRIPTION, 2, 80);
printf("\n");
printf("\n");
printf(" Author : " XTATE_AUTHOR "\n");
printf(" Github : " XTATE_GITHUB_URL "\n");
printf(" Contact: " XTATE_CONTACT "\n");
printf("\n");
printf("usage format:\n");
printf(" " XTATE_NAME " [options] [-ip IPs -p PORTs [-scan SCANMODULE "
"[-probe PROBEMODULE]]]\n");
printf("\n");
printf("basic use examples of " XTATE_NAME ":\n");
printf("\n");
printf(" " XTATE_NAME " -p 80,8000-8100 -ip 10.0.0.0/8 --rate 10000\n");
xprint("use default TcpSyn ScanModule to scan web ports on 10.x.x.x at "
"10kpps.\n",
6, 80);
printf("\n");
printf(" " XTATE_NAME
" -p u:80 -ip 10.0.0.0/8 -scan udp -probe echo -show info\n");
xprint("use UdpProbe ScanModule to scan UDP 80 port with echo ProbeModule "
"and also show info results.\n",
6, 80);
printf("\n");
printf(" " XTATE_NAME
" -ip 10.0.0.0/8 -scan icmp-echo -scan-arg \"-ttl\"\n");
xprint("use IcmpEcho ScanModule to do ping scan and record TTL.\n", 6, 80);
printf("\n");
printf(" " XTATE_NAME " -p 80 -ip 10.0.0.0/8 -scan zbanner -probe http "
"-scan-arg \"-banner\"\n");
xprint("use ZBanner ScanModule to grab http banners with http ProbeModule "
"and ScanModule-specific param.\n",
6, 80);
printf("\n");
printf(" " XTATE_NAME
" -p s:38412 -ip 10.0.0.0/8 -scan sctp-init -show fail\n");
xprint("use SctpInit ScanModule to scan SCTP 38412(36412) port and show "
"fail results.\n",
6, 80);
printf("\n");
printf(" " XTATE_NAME " -ip 192.168.0.1/24 -scan arp-req -lan\n");
xprint("do ARP scan with LAN mode in local network.\n", 6, 80);
printf("\n");
printf(" " XTATE_NAME
" -ip fe80::1/120 -scan ndp-ns -src-ip fe80::2 -fake-router-mac\n");
xprint("do NDP NS scan with a link-local source IP in local network.\n", 6,
80);
printf("\n");
printf(" " XTATE_NAME " -list-scan\n");
xprint("list all ScanModules and other types of module are the same.\n", 6,
80);
printf("\n");
printf(" " XTATE_NAME " -help-scan tcp-syn\n");
xprint("see help of TcpSyn ScanModule in detail.\n", 6, 80);
printf("\n");
printf(" " XTATE_NAME " -interactive\n");
xprint("set params and do scanning in an user-friendly interactive mode.\n",
6, 80);
printf("\n");
printf(" " XTATE_NAME " -version\n");
xprint("print version and compilation info.\n", 6, 80);
printf("\n");
printf(" " XTATE_NAME " -intro\n");
xprint("show the design and architecture of " XTATE_NAME_TITLE_CASE ".\n",
6, 80);
printf("\n");
printf(" " XTATE_NAME " -usage\n");
xprint("display this usage text of using examples.\n", 6, 80);
printf("\n");
printf(" " XTATE_NAME " -help\n");
xprint("display detailed help text of all parameters.\n", 6, 80);
printf("\n");
} | O3 | c | xconf_print_usage:
pushq %rax
movl $0xa, %edi
callq 0x15d00
leaq 0x221ac(%rip), %rdi # 0x7dfa3
xorl %eax, %eax
callq 0x150b0
movl $0xa, %edi
callq 0x15d00
leaq 0x221a6(%rip), %rdi # 0x7dfb5
movl $0x2, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
callq 0x15d00
movl $0xa, %edi
callq 0x15d00
leaq 0x24c2e(%rip), %rdi # 0x80a67
callq 0x15ba0
leaq 0x24c38(%rip), %rdi # 0x80a7d
callq 0x15ba0
leaq 0x24c59(%rip), %rdi # 0x80aaa
callq 0x15ba0
movl $0xa, %edi
callq 0x15d00
leaq 0x248f4(%rip), %rdi # 0x8075b
callq 0x15ba0
leaq 0x248f6(%rip), %rdi # 0x80769
callq 0x15ba0
movl $0xa, %edi
callq 0x15d00
leaq 0x2492d(%rip), %rdi # 0x807b6
callq 0x15ba0
movl $0xa, %edi
callq 0x15d00
leaq 0x24934(%rip), %rdi # 0x807d3
callq 0x15ba0
leaq 0x221a8(%rip), %rdi # 0x7e053
movl $0x6, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
callq 0x15d00
leaq 0x2493c(%rip), %rdi # 0x80807
callq 0x15ba0
leaq 0x221c4(%rip), %rdi # 0x7e09b
movl $0x6, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
callq 0x15d00
leaq 0x24950(%rip), %rdi # 0x80847
callq 0x15ba0
leaq 0x221f7(%rip), %rdi # 0x7e0fa
movl $0x6, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
callq 0x15d00
leaq 0x2495c(%rip), %rdi # 0x8087f
callq 0x15ba0
leaq 0x22204(%rip), %rdi # 0x7e133
movl $0x6, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
callq 0x15d00
leaq 0x2497b(%rip), %rdi # 0x808ca
callq 0x15ba0
leaq 0x2223a(%rip), %rdi # 0x7e195
movl $0x6, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
callq 0x15d00
leaq 0x2498c(%rip), %rdi # 0x80907
callq 0x15ba0
leaq 0x2225d(%rip), %rdi # 0x7e1e4
movl $0x6, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
callq 0x15d00
leaq 0x2498e(%rip), %rdi # 0x80935
callq 0x15ba0
leaq 0x2225e(%rip), %rdi # 0x7e211
movl $0x6, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
callq 0x15d00
leaq 0x249a8(%rip), %rdi # 0x8097b
callq 0x15ba0
leaq 0x22270(%rip), %rdi # 0x7e24f
movl $0x6, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
callq 0x15d00
leaq 0x2498f(%rip), %rdi # 0x8098e
callq 0x15ba0
leaq 0x22282(%rip), %rdi # 0x7e28d
movl $0x6, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
callq 0x15d00
leaq 0x2497e(%rip), %rdi # 0x809a9
callq 0x15ba0
leaq 0x22280(%rip), %rdi # 0x7e2b7
movl $0x6, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
callq 0x15d00
leaq 0x24967(%rip), %rdi # 0x809be
callq 0x15ba0
leaq 0x22296(%rip), %rdi # 0x7e2f9
movl $0x6, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
callq 0x15d00
leaq 0x2494c(%rip), %rdi # 0x809cf
callq 0x15ba0
leaq 0x2228f(%rip), %rdi # 0x7e31e
movl $0x6, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
callq 0x15d00
leaq 0x2492f(%rip), %rdi # 0x809de
callq 0x15ba0
leaq 0x2228f(%rip), %rdi # 0x7e34a
movl $0x6, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
callq 0x15d00
leaq 0x24912(%rip), %rdi # 0x809ed
callq 0x15ba0
leaq 0x2228f(%rip), %rdi # 0x7e376
movl $0x6, %esi
movl $0x50, %edx
callq 0x54a9c
movl $0xa, %edi
popq %rax
jmp 0x15d00
| xconf_print_usage:
push rax
mov edi, 0Ah
call _putchar
lea rdi, aWelcomeToXtate; "Welcome to Xtate!"
xor eax, eax
call _printf
mov edi, 0Ah
call _putchar
lea rdi, aAModularAllSta; "A modular all-stack network scanner for"...
mov esi, 2
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
call _putchar
mov edi, 0Ah
call _putchar
lea rdi, aAuthorAlvinChe; " Author : Alvin Chen"
call _puts
lea rdi, aGithubHttpsGit; " Github : https://github.com/babycoff/"...
call _puts
lea rdi, aContactChenchi; " Contact: chenchiyu14@nudt.edu.cn"
call _puts
mov edi, 0Ah
call _putchar
lea rdi, aUsageFormat; "usage format:"
call _puts
lea rdi, aXtateOptionsIp; " xtate [options] [-ip IPs -p PORTs [-s"...
call _puts
mov edi, 0Ah
call _putchar
lea rdi, aBasicUseExampl; "basic use examples of xtate:"
call _puts
mov edi, 0Ah
call _putchar
lea rdi, aXtateP80800081; " xtate -p 80,8000-8100 -ip 10.0.0.0/8 "...
call _puts
lea rdi, aUseDefaultTcps; "use default TcpSyn ScanModule to scan w"...
mov esi, 6
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
call _putchar
lea rdi, aXtatePU80Ip100; " xtate -p u:80 -ip 10.0.0.0/8 -scan ud"...
call _puts
lea rdi, aUseUdpprobeSca; "use UdpProbe ScanModule to scan UDP 80 "...
mov esi, 6
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
call _putchar
lea rdi, aXtateIp100008S; " xtate -ip 10.0.0.0/8 -scan icmp-echo "...
call _puts
lea rdi, aUseIcmpechoSca; "use IcmpEcho ScanModule to do ping scan"...
mov esi, 6
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
call _putchar
lea rdi, aXtateP80Ip1000; " xtate -p 80 -ip 10.0.0.0/8 -scan zban"...
call _puts
lea rdi, aUseZbannerScan; "use ZBanner ScanModule to grab http ban"...
mov esi, 6
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
call _putchar
lea rdi, aXtatePS38412Ip; " xtate -p s:38412 -ip 10.0.0.0/8 -scan"...
call _puts
lea rdi, aUseSctpinitSca; "use SctpInit ScanModule to scan SCTP 38"...
mov esi, 6
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
call _putchar
lea rdi, aXtateIp1921680; " xtate -ip 192.168.0.1/24 -scan arp-re"...
call _puts
lea rdi, aDoArpScanWithL; "do ARP scan with LAN mode in local netw"...
mov esi, 6
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
call _putchar
lea rdi, aXtateIpFe80112; " xtate -ip fe80::1/120 -scan ndp-ns -s"...
call _puts
lea rdi, aDoNdpNsScanWit; "do NDP NS scan with a link-local source"...
mov esi, 6
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
call _putchar
lea rdi, aXtateListScan; " xtate -list-scan"
call _puts
lea rdi, aListAllScanmod; "list all ScanModules and other types of"...
mov esi, 6
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
call _putchar
lea rdi, aXtateHelpScanT; " xtate -help-scan tcp-syn"
call _puts
lea rdi, aSeeHelpOfTcpsy; "see help of TcpSyn ScanModule in detail"...
mov esi, 6
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
call _putchar
lea rdi, aXtateInteracti_0; " xtate -interactive"
call _puts
lea rdi, aSetParamsAndDo; "set params and do scanning in an user-f"...
mov esi, 6
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
call _putchar
lea rdi, aXtateVersion; " xtate -version"
call _puts
lea rdi, aPrintVersionAn; "print version and compilation info.\n"
mov esi, 6
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
call _putchar
lea rdi, aXtateIntro; " xtate -intro"
call _puts
lea rdi, aShowTheDesignA; "show the design and architecture of Xta"...
mov esi, 6
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
call _putchar
lea rdi, aXtateUsage_0; " xtate -usage"
call _puts
lea rdi, aDisplayThisUsa; "display this usage text of using exampl"...
mov esi, 6
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
call _putchar
lea rdi, aXtateHelp_0; " xtate -help"
call _puts
lea rdi, aDisplayDetaile; "display detailed help text of all param"...
mov esi, 6
mov edx, 50h ; 'P'
call xprint
mov edi, 0Ah
pop rax
jmp _putchar
| long long xconf_print_usage()
{
putchar(10LL);
printf("Welcome to Xtate!");
putchar(10LL);
xprint((long long)"A modular all-stack network scanner for next-generation internet surveys.", 2u, 0x50u);
putchar(10LL);
putchar(10LL);
puts(" Author : Alvin Chen");
puts(" Github : https://github.com/babycoff/xtate");
puts(" Contact: chenchiyu14@nudt.edu.cn");
putchar(10LL);
puts("usage format:");
puts(" xtate [options] [-ip IPs -p PORTs [-scan SCANMODULE [-probe PROBEMODULE]]]");
putchar(10LL);
puts("basic use examples of xtate:");
putchar(10LL);
puts(" xtate -p 80,8000-8100 -ip 10.0.0.0/8 --rate 10000");
xprint((long long)"use default TcpSyn ScanModule to scan web ports on 10.x.x.x at 10kpps.\n", 6u, 0x50u);
putchar(10LL);
puts(" xtate -p u:80 -ip 10.0.0.0/8 -scan udp -probe echo -show info");
xprint(
(long long)"use UdpProbe ScanModule to scan UDP 80 port with echo ProbeModule and also show info results.\n",
6u,
0x50u);
putchar(10LL);
puts(" xtate -ip 10.0.0.0/8 -scan icmp-echo -scan-arg \"-ttl\"");
xprint((long long)"use IcmpEcho ScanModule to do ping scan and record TTL.\n", 6u, 0x50u);
putchar(10LL);
puts(" xtate -p 80 -ip 10.0.0.0/8 -scan zbanner -probe http -scan-arg \"-banner\"");
xprint(
(long long)"use ZBanner ScanModule to grab http banners with http ProbeModule and ScanModule-specific param.\n",
6u,
0x50u);
putchar(10LL);
puts(" xtate -p s:38412 -ip 10.0.0.0/8 -scan sctp-init -show fail");
xprint((long long)"use SctpInit ScanModule to scan SCTP 38412(36412) port and show fail results.\n", 6u, 0x50u);
putchar(10LL);
puts(" xtate -ip 192.168.0.1/24 -scan arp-req -lan");
xprint((long long)"do ARP scan with LAN mode in local network.\n", 6u, 0x50u);
putchar(10LL);
puts(" xtate -ip fe80::1/120 -scan ndp-ns -src-ip fe80::2 -fake-router-mac");
xprint((long long)"do NDP NS scan with a link-local source IP in local network.\n", 6u, 0x50u);
putchar(10LL);
puts(" xtate -list-scan");
xprint((long long)"list all ScanModules and other types of module are the same.\n", 6u, 0x50u);
putchar(10LL);
puts(" xtate -help-scan tcp-syn");
xprint((long long)"see help of TcpSyn ScanModule in detail.\n", 6u, 0x50u);
putchar(10LL);
puts(" xtate -interactive");
xprint((long long)"set params and do scanning in an user-friendly interactive mode.\n", 6u, 0x50u);
putchar(10LL);
puts(" xtate -version");
xprint((long long)"print version and compilation info.\n", 6u, 0x50u);
putchar(10LL);
puts(" xtate -intro");
xprint((long long)"show the design and architecture of Xtate.\n", 6u, 0x50u);
putchar(10LL);
puts(" xtate -usage");
xprint((long long)"display this usage text of using examples.\n", 6u, 0x50u);
putchar(10LL);
puts(" xtate -help");
xprint((long long)"display detailed help text of all parameters.\n", 6u, 0x50u);
return putchar(10LL);
}
| xconf_print_usage:
PUSH RAX
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x17dfa3]
XOR EAX,EAX
CALL 0x001150b0
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x17dfb5]
MOV ESI,0x2
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
CALL 0x00115d00
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x180a67]
CALL 0x00115ba0
LEA RDI,[0x180a7d]
CALL 0x00115ba0
LEA RDI,[0x180aaa]
CALL 0x00115ba0
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x18075b]
CALL 0x00115ba0
LEA RDI,[0x180769]
CALL 0x00115ba0
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x1807b6]
CALL 0x00115ba0
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x1807d3]
CALL 0x00115ba0
LEA RDI,[0x17e053]
MOV ESI,0x6
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x180807]
CALL 0x00115ba0
LEA RDI,[0x17e09b]
MOV ESI,0x6
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x180847]
CALL 0x00115ba0
LEA RDI,[0x17e0fa]
MOV ESI,0x6
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x18087f]
CALL 0x00115ba0
LEA RDI,[0x17e133]
MOV ESI,0x6
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x1808ca]
CALL 0x00115ba0
LEA RDI,[0x17e195]
MOV ESI,0x6
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x180907]
CALL 0x00115ba0
LEA RDI,[0x17e1e4]
MOV ESI,0x6
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x180935]
CALL 0x00115ba0
LEA RDI,[0x17e211]
MOV ESI,0x6
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x18097b]
CALL 0x00115ba0
LEA RDI,[0x17e24f]
MOV ESI,0x6
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x18098e]
CALL 0x00115ba0
LEA RDI,[0x17e28d]
MOV ESI,0x6
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x1809a9]
CALL 0x00115ba0
LEA RDI,[0x17e2b7]
MOV ESI,0x6
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x1809be]
CALL 0x00115ba0
LEA RDI,[0x17e2f9]
MOV ESI,0x6
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x1809cf]
CALL 0x00115ba0
LEA RDI,[0x17e31e]
MOV ESI,0x6
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x1809de]
CALL 0x00115ba0
LEA RDI,[0x17e34a]
MOV ESI,0x6
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
CALL 0x00115d00
LEA RDI,[0x1809ed]
CALL 0x00115ba0
LEA RDI,[0x17e376]
MOV ESI,0x6
MOV EDX,0x50
CALL 0x00154a9c
MOV EDI,0xa
POP RAX
JMP 0x00115d00
|
void xconf_print_usage(void)
{
putchar(10);
printf("Welcome to Xtate!");
putchar(10);
xprint("A modular all-stack network scanner for next-generation internet surveys.",2,0x50);
putchar(10);
putchar(10);
puts(" Author : Alvin Chen");
puts(" Github : https://github.com/babycoff/xtate");
puts(" Contact: chenchiyu14@nudt.edu.cn");
putchar(10);
puts("usage format:");
puts(" xtate [options] [-ip IPs -p PORTs [-scan SCANMODULE [-probe PROBEMODULE]]]");
putchar(10);
puts("basic use examples of xtate:");
putchar(10);
puts(" xtate -p 80,8000-8100 -ip 10.0.0.0/8 --rate 10000");
xprint("use default TcpSyn ScanModule to scan web ports on 10.x.x.x at 10kpps.\n",6,0x50);
putchar(10);
puts(" xtate -p u:80 -ip 10.0.0.0/8 -scan udp -probe echo -show info");
xprint("use UdpProbe ScanModule to scan UDP 80 port with echo ProbeModule and also show info results.\n"
,6,0x50);
putchar(10);
puts(" xtate -ip 10.0.0.0/8 -scan icmp-echo -scan-arg \"-ttl\"");
xprint("use IcmpEcho ScanModule to do ping scan and record TTL.\n",6,0x50);
putchar(10);
puts(" xtate -p 80 -ip 10.0.0.0/8 -scan zbanner -probe http -scan-arg \"-banner\"");
xprint("use ZBanner ScanModule to grab http banners with http ProbeModule and ScanModule-specific param.\n"
,6,0x50);
putchar(10);
puts(" xtate -p s:38412 -ip 10.0.0.0/8 -scan sctp-init -show fail");
xprint("use SctpInit ScanModule to scan SCTP 38412(36412) port and show fail results.\n",6,0x50);
putchar(10);
puts(" xtate -ip 192.168.0.1/24 -scan arp-req -lan");
xprint("do ARP scan with LAN mode in local network.\n",6,0x50);
putchar(10);
puts(" xtate -ip fe80::1/120 -scan ndp-ns -src-ip fe80::2 -fake-router-mac");
xprint("do NDP NS scan with a link-local source IP in local network.\n",6,0x50);
putchar(10);
puts(" xtate -list-scan");
xprint("list all ScanModules and other types of module are the same.\n",6,0x50);
putchar(10);
puts(" xtate -help-scan tcp-syn");
xprint("see help of TcpSyn ScanModule in detail.\n",6,0x50);
putchar(10);
puts(" xtate -interactive");
xprint("set params and do scanning in an user-friendly interactive mode.\n",6,0x50);
putchar(10);
puts(" xtate -version");
xprint("print version and compilation info.\n",6,0x50);
putchar(10);
puts(" xtate -intro");
xprint("show the design and architecture of Xtate.\n",6,0x50);
putchar(10);
puts(" xtate -usage");
xprint("display this usage text of using examples.\n",6,0x50);
putchar(10);
puts(" xtate -help");
xprint("display detailed help text of all parameters.\n",6,0x50);
putchar(10);
return;
}
| |
52,531 | starter_compile | navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/starter.c | static int32_t
_starter_compile (const char* buffer, uint32_t length, void* ctx,
STARTER_OUT_FP log, bool verbose)
{
#if STARTER_DEBUG_MEM
uint32_t mem_used, mem_avail ;
#endif
int32_t result = ENGINE_FAIL ;
uint32_t timer = engine_timestamp() ;
PARSE_CB_IF parser_cb = {
statemachine,
stringtable,
version,
name,
} ;
PARSE_LOG_IF log_cb = {
parser_log,
parser_report,
parser_error
} ;
_starter_log_ctx = ctx ;
_starter_log = log ;
if (!verbose) {
log_cb.Log = 0 ;
}
ParseInit () ;
starter_parser_init () ;
_starter_loaded_size = 0 ;
if (ParseAnalyse (buffer, length, &parser_cb, &log_cb)) {
ParseComplete (&parser_cb, &log_cb) ;
log_cb.Log = 0 ;
const STRINGTABLE_T* stringtable = engine_get_stringtable () ;
if (machine_stringtable_validate (stringtable, &log_cb) != ENGINE_OK) {
ParseDestroy ();
starter_stop () ;
return ENGINE_FAIL ;
}
int idx = 0 ;
const STATEMACHINE_T* statemachine ;
for (statemachine = engine_get_statemachine (idx++) ; statemachine; ) {
if (machine_validate (statemachine, stringtable, &log_cb) != ENGINE_OK) {
ParseDestroy ();
starter_stop () ;
return ENGINE_FAIL ;
}
statemachine = engine_get_statemachine (idx++) ;
}
timer = engine_timestamp() - timer ;
parser_report ("'%s' v%d compiled %d bytes in %d.%03d seconds!\r\n",
engine_get_name(), engine_get_version(),
_starter_loaded_size, timer/1000, timer%1000 ) ;
result = ENGINE_OK ;
} else {
parser_error ("STATEMACHINE validation FAIL!!!\r\n") ;
}
ParseDestroy ();
if (result != ENGINE_OK) {
starter_stop () ;
}
#if STARTER_DEBUG_MEM
heap_stats (HEAP_SPACE_EXTERNAL, &mem_used, &mem_avail) ;
engine_port_log (0,
"STATEMACHINE PARSING mem usegae stop: %.6d / %.6d\r\n",
mem_used, mem_avail) ;
#endif
return result ;
} | O3 | c | starter_compile:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r8d, %r12d
movq %rcx, %r13
movq %rdx, %rbx
movl %esi, -0x30(%rbp)
movq %rdi, -0x58(%rbp)
callq 0xdebf
movl %eax, -0x2c(%rbp)
movups 0x2cf6e(%rip), %xmm0 # 0x3d8b8
movaps %xmm0, -0x70(%rbp)
movups 0x2cf53(%rip), %xmm0 # 0x3d8a8
movaps %xmm0, -0x80(%rbp)
movq 0x2cf78(%rip), %rax # 0x3d8d8
movq %rax, -0x40(%rbp)
movups 0x2cf5d(%rip), %xmm0 # 0x3d8c8
movaps %xmm0, -0x50(%rbp)
movq %rbx, 0x2feea(%rip) # 0x40860
movq %r13, 0x2feeb(%rip) # 0x40868
testl %r12d, %r12d
jne 0x1098a
movq $0x0, -0x50(%rbp)
callq 0xcb39
leaq 0x1166a(%rip), %rbx # 0x22000
cmpq 0x2d62b(%rip), %rbx # 0x3dfc8
jae 0x109ed
xorl %r12d, %r12d
leaq 0x2ff9f(%rip), %r14 # 0x40948
leaq 0x15faa(%rip), %r13 # 0x2695a
leaq 0x11cc1(%rip), %r15 # 0x22678
movq 0x8(%rbx), %rdi
movl %r12d, %esi
callq 0xcddf
testl %eax, %eax
je 0x109d5
addq $0x18, %rbx
incl %r12d
cmpq %r15, %rbx
jb 0x109b7
jmp 0x109ed
movq (%r14), %rax
testq %rax, %rax
je 0x109c7
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x109c7
movq %r13, %rdi
callq *%rax
jmp 0x109c7
leaq 0x11c84(%rip), %rbx # 0x22678
cmpq 0x2d5f5(%rip), %rbx # 0x3dff0
jae 0x10a4a
xorl %r12d, %r12d
leaq 0x2ff41(%rip), %r14 # 0x40948
leaq 0x15f69(%rip), %r13 # 0x26977
leaq 0x11cf3(%rip), %r15 # 0x22708
movq (%rbx), %rdi
movl %r12d, %esi
callq 0xce3d
testl %eax, %eax
je 0x10a32
addq $0x10, %rbx
incl %r12d
cmpq %r15, %rbx
jb 0x10a15
jmp 0x10a4a
movq (%r14), %rax
testq %rax, %rax
je 0x10a24
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x10a24
movq %r13, %rdi
callq *%rax
jmp 0x10a24
leaq 0x11cb7(%rip), %rbx # 0x22708
cmpq 0x2d580(%rip), %rbx # 0x3dfd8
jae 0x10aa2
leaq 0x2fee7(%rip), %r14 # 0x40948
leaq 0x15f2b(%rip), %r12 # 0x26993
leaq 0x11eb5(%rip), %r15 # 0x22924
movq 0x4(%rbx), %rdi
movswl (%rbx), %esi
callq 0xce0e
testl %eax, %eax
je 0x10a8a
addq $0x14, %rbx
cmpq %r15, %rbx
jb 0x10a6f
jmp 0x10aa2
movq (%r14), %rax
testq %rax, %rax
je 0x10a7f
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x10a7f
movq %r12, %rdi
callq *%rax
jmp 0x10a7f
movl $0x0, 0x2fdc4(%rip) # 0x40870
leaq -0x80(%rbp), %rdx
leaq -0x50(%rbp), %rcx
movq -0x58(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0xcf1b
testl %eax, %eax
je 0x10b87
leaq -0x80(%rbp), %rdi
leaq -0x50(%rbp), %rbx
movq %rbx, %rsi
callq 0xd030
movq $0x0, (%rbx)
callq 0xe4d1
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0xa341
testl %eax, %eax
jne 0x10b95
xorl %r14d, %r14d
xorl %edi, %edi
callq 0xe475
testq %rax, %rax
je 0x10b39
movl $0x1, %r13d
leaq -0x50(%rbp), %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xa1ed
testl %eax, %eax
jne 0x10b95
leal 0x1(%r13), %ebx
movl %r13d, %edi
callq 0xe475
movl %ebx, %r13d
testq %rax, %rax
jne 0x10b13
callq 0xdebf
movl %eax, %ebx
subl -0x2c(%rbp), %ebx
callq 0xe52e
movq %rax, %r15
callq 0xe522
movl 0x2fd1a(%rip), %ecx # 0x40870
imulq $0x10624dd3, %rbx, %r8 # imm = 0x10624DD3
shrq $0x26, %r8
imull $0x3e8, %r8d, %edx # imm = 0x3E8
subl %edx, %ebx
leaq 0x15d96(%rip), %rdi # 0x26907
movq %r15, %rsi
movl %eax, %edx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x10ce7
callq 0xcd6d
jmp 0x10ba5
leaq 0x15daa(%rip), %rdi # 0x26938
xorl %eax, %eax
callq 0x10d62
callq 0xcd6d
callq 0x10bd2
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _starter_compile:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r12d, r8d
mov r13, rcx
mov rbx, rdx
mov [rbp+var_30], esi
mov [rbp+var_58], rdi
call engine_timestamp
mov [rbp+var_2C], eax
movups xmm0, xmmword ptr cs:off_3D8B8
movaps [rbp+var_70], xmm0
movups xmm0, xmmword ptr cs:off_3D8A8
movaps [rbp+var_80], xmm0
mov rax, cs:off_3D8D8
mov [rbp+var_40], rax
movups xmm0, xmmword ptr cs:off_3D8C8
movaps [rbp+var_50], xmm0
mov cs:_starter_log_ctx, rbx
mov cs:_starter_log, r13
test r12d, r12d
jnz short loc_1098A
mov qword ptr [rbp+var_50], 0
loc_1098A:
call ParseInit
lea rbx, __engine_action_base__
cmp rbx, cs:__engine_event_base___ptr
jnb short loc_109ED
xor r12d, r12d
lea r14, _qoraal_instance
lea r13, aEngEFailAdding; "ENG :E: fail adding action!"
lea r15, __engine_event_base__
loc_109B7:
mov rdi, [rbx+8]
mov esi, r12d
call ParserAddAction
test eax, eax
jz short loc_109D5
loc_109C7:
add rbx, 18h
inc r12d
cmp rbx, r15
jb short loc_109B7
jmp short loc_109ED
loc_109D5:
mov rax, [r14]
test rax, rax
jz short loc_109C7
mov rax, [rax+18h]
test rax, rax
jz short loc_109C7
mov rdi, r13
call rax
jmp short loc_109C7
loc_109ED:
lea rbx, __engine_event_base__
cmp rbx, cs:__engine_event_end___ptr
jnb short loc_10A4A
xor r12d, r12d
lea r14, _qoraal_instance
lea r13, aEngEFailAdding_0; "ENG :E: fail adding event!"
lea r15, __engine_event_end__
loc_10A15:
mov rdi, [rbx]
mov esi, r12d
call ParserAddEvent
test eax, eax
jz short loc_10A32
loc_10A24:
add rbx, 10h
inc r12d
cmp rbx, r15
jb short loc_10A15
jmp short loc_10A4A
loc_10A32:
mov rax, [r14]
test rax, rax
jz short loc_10A24
mov rax, [rax+18h]
test rax, rax
jz short loc_10A24
mov rdi, r13
call rax
jmp short loc_10A24
loc_10A4A:
lea rbx, __engine_event_end__
cmp rbx, cs:__engine_cmd_base___ptr
jnb short loc_10AA2
lea r14, _qoraal_instance
lea r12, aEngEFailAdding_1; "ENG :E: fail adding const!"
lea r15, __engine_cmd_base__
loc_10A6F:
mov rdi, [rbx+4]
movsx esi, word ptr [rbx]
call ParserAddConst
test eax, eax
jz short loc_10A8A
loc_10A7F:
add rbx, 14h
cmp rbx, r15
jb short loc_10A6F
jmp short loc_10AA2
loc_10A8A:
mov rax, [r14]
test rax, rax
jz short loc_10A7F
mov rax, [rax+18h]
test rax, rax
jz short loc_10A7F
mov rdi, r12
call rax
jmp short loc_10A7F
loc_10AA2:
mov cs:_starter_loaded_size, 0
lea rdx, [rbp+var_80]
lea rcx, [rbp+var_50]
mov rdi, [rbp+var_58]
mov esi, [rbp+var_30]
call ParseAnalyse
test eax, eax
jz loc_10B87
lea rdi, [rbp+var_80]
lea rbx, [rbp+var_50]
mov rsi, rbx
call ParseComplete
mov qword ptr [rbx], 0
call engine_get_stringtable
mov r15, rax
mov rdi, rax
mov rsi, rbx
call machine_stringtable_validate
test eax, eax
jnz loc_10B95
xor r14d, r14d
xor edi, edi
call engine_get_statemachine
test rax, rax
jz short loc_10B39
mov r13d, 1
lea r12, [rbp+var_50]
loc_10B13:
mov rdi, rax
mov rsi, r15
mov rdx, r12
call machine_validate
test eax, eax
jnz short loc_10B95
lea ebx, [r13+1]
mov edi, r13d
call engine_get_statemachine
mov r13d, ebx
test rax, rax
jnz short loc_10B13
loc_10B39:
call engine_timestamp
mov ebx, eax
sub ebx, [rbp+var_2C]
call engine_get_name
mov r15, rax
call engine_get_version
mov ecx, cs:_starter_loaded_size
imul r8, rbx, 10624DD3h
shr r8, 26h
imul edx, r8d, 3E8h
sub ebx, edx
lea rdi, aSVDCompiledDBy; "'%s' v%d compiled %d bytes in %d.%03d s"...
mov rsi, r15
mov edx, eax
mov r9d, ebx
xor eax, eax
call parser_report
call ParseDestroy
jmp short loc_10BA5
loc_10B87:
lea rdi, aStatemachineVa; "STATEMACHINE validation FAIL!!!\r\n"
xor eax, eax
call parser_error
loc_10B95:
call ParseDestroy
call starter_stop
mov r14d, 0FFFFFFFFh
loc_10BA5:
mov eax, r14d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long starter_compile(
long long a1,
int a2,
long long a3,
long long a4,
int a5,
double a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long ( **v16)(); // rbx
unsigned int v17; // r12d
long long v18; // rdx
long long v19; // rcx
long long v20; // r8
long long v21; // r9
void ( *v22)(char *, _QWORD, long long, long long, long long, long long, _QWORD, _QWORD, _QWORD, _QWORD); // rax
long long *v23; // rbx
unsigned __int16 v24; // r12
void ( *v25)(char *); // rax
long long ( *__ptr32 *v26)(); // rbx
void ( *v27)(char *); // rax
int v28; // esi
int v29; // edx
int v30; // ecx
int v31; // r8d
int v32; // r9d
unsigned __int16 *stringtable; // r15
long long v34; // rdx
long long v35; // rcx
long long v36; // r8
long long v37; // r9
__m128 v38; // xmm4
__m128 v39; // xmm5
unsigned int v40; // r14d
long long v41; // rdi
const char *statemachine; // rax
unsigned int v43; // r13d
long long v44; // rdx
long long v45; // rcx
long long v46; // r8
long long v47; // r9
__m128 v48; // xmm4
__m128 v49; // xmm5
int v50; // eax
unsigned int v51; // ebx
unsigned int name; // r15d
int version; // eax
__int128 v55; // [rsp+0h] [rbp-80h] BYREF
__int128 v56; // [rsp+10h] [rbp-70h]
long long v57; // [rsp+28h] [rbp-58h]
__int128 v58; // [rsp+30h] [rbp-50h] BYREF
long long ( *v59)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, char); // [rsp+40h] [rbp-40h]
int v60; // [rsp+50h] [rbp-30h]
int v61; // [rsp+54h] [rbp-2Ch]
v60 = a2;
v57 = a1;
v61 = engine_timestamp(a1);
v56 = *(_OWORD *)off_3D8B8;
v55 = *(_OWORD *)off_3D8A8;
v59 = parser_error;
v58 = *(_OWORD *)off_3D8C8;
starter_log_ctx = a3;
starter_log = a4;
if ( !a5 )
*(_QWORD *)&v58 = 0LL;
ParseInit();
v16 = &_engine_action_base__;
if ( &_engine_action_base__ < (long long ( **)())_engine_event_base__ )
{
v17 = 0;
do
{
if ( !(unsigned int)ParserAddAction((long long)v16[1], v17) )
{
if ( qoraal_instance )
{
v22 = *(void ( **)(char *, _QWORD, long long, long long, long long, long long, _QWORD, _QWORD, _QWORD, _QWORD))(qoraal_instance + 24);
if ( v22 )
v22(aEngEFailAdding, v17, v18, v19, v20, v21, v55, *((_QWORD *)&v55 + 1), v56, *((_QWORD *)&v56 + 1));
}
}
v16 += 3;
++v17;
}
while ( v16 < (long long ( **)())_engine_event_base__ );
}
v23 = (long long *)_engine_event_base__;
if ( _engine_event_base__ < (char **)&_engine_event_end__ )
{
v24 = 0;
do
{
if ( !(unsigned int)ParserAddEvent(*v23, v24) )
{
if ( qoraal_instance )
{
v25 = *(void ( **)(char *))(qoraal_instance + 24);
if ( v25 )
v25(aEngEFailAdding_0);
}
}
v23 += 2;
++v24;
}
while ( v23 < (long long *)&_engine_event_end__ );
}
v26 = (long long ( *__ptr32 *)())&_engine_event_end__;
if ( &_engine_event_end__ < (_UNKNOWN *)&_engine_cmd_base__ )
{
do
{
if ( !(unsigned int)ParserAddConst(*(_QWORD *)(v26 + 1), *(_WORD *)v26) )
{
if ( qoraal_instance )
{
v27 = *(void ( **)(char *))(qoraal_instance + 24);
if ( v27 )
v27(aEngEFailAdding_1);
}
}
v26 += 5;
}
while ( v26 < &_engine_cmd_base__ );
}
starter_loaded_size = 0;
v28 = v60;
if ( !(unsigned int)ParseAnalyse(v57, v60, (long long)&v55, (long long)&v58) )
{
parser_error((unsigned int)aStatemachineVa, v28, v29, v30, v31, v32, v55);
goto LABEL_34;
}
ParseComplete((long long)&v55, (void (**)(const char *, ...))&v58);
*(_QWORD *)&v58 = 0LL;
stringtable = (unsigned __int16 *)engine_get_stringtable();
if ( (unsigned int)machine_stringtable_validate(stringtable, (long long)&v58) )
{
LABEL_34:
ParseDestroy();
starter_stop();
return (unsigned int)-1;
}
v40 = 0;
v41 = 0LL;
statemachine = (const char *)engine_get_statemachine(
0,
*(__m128 *)off_3D8C8,
a7,
a8,
a9,
v38,
v39,
a12,
a13,
(long long)&v58,
v34,
v35,
v36,
v37);
if ( statemachine )
{
v43 = 1;
while ( !(unsigned int)machine_validate(statemachine, (long long)stringtable, (void (**)(const char *, ...))&v58) )
{
v41 = v43;
statemachine = (const char *)engine_get_statemachine(
v43++,
*(__m128 *)off_3D8C8,
a7,
a8,
a9,
v48,
v49,
a12,
a13,
(long long)stringtable,
v44,
v45,
v46,
v47);
if ( !statemachine )
goto LABEL_32;
}
goto LABEL_34;
}
LABEL_32:
v50 = engine_timestamp(v41);
v51 = v50 - v61;
name = (unsigned int)engine_get_name();
version = engine_get_version();
parser_report((unsigned int)aSVDCompiledDBy, name, version, starter_loaded_size, v51 / 0x3E8, v51 % 0x3E8, v55);
ParseDestroy();
return v40;
}
| _starter_compile:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R12D,R8D
MOV R13,RCX
MOV RBX,RDX
MOV dword ptr [RBP + -0x30],ESI
MOV qword ptr [RBP + -0x58],RDI
CALL 0x0010debf
MOV dword ptr [RBP + -0x2c],EAX
MOVUPS XMM0,xmmword ptr [0x0013d8b8]
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOVUPS XMM0,xmmword ptr [0x0013d8a8]
MOVAPS xmmword ptr [RBP + -0x80],XMM0
MOV RAX,qword ptr [0x0013d8d8]
MOV qword ptr [RBP + -0x40],RAX
MOVUPS XMM0,xmmword ptr [0x0013d8c8]
MOVAPS xmmword ptr [RBP + -0x50],XMM0
MOV qword ptr [0x00140860],RBX
MOV qword ptr [0x00140868],R13
TEST R12D,R12D
JNZ 0x0011098a
MOV qword ptr [RBP + -0x50],0x0
LAB_0011098a:
CALL 0x0010cb39
LEA RBX,[0x122000]
CMP RBX,qword ptr [0x0013dfc8]
JNC 0x001109ed
XOR R12D,R12D
LEA R14,[0x140948]
LEA R13,[0x12695a]
LEA R15,[0x122678]
LAB_001109b7:
MOV RDI,qword ptr [RBX + 0x8]
MOV ESI,R12D
CALL 0x0010cddf
TEST EAX,EAX
JZ 0x001109d5
LAB_001109c7:
ADD RBX,0x18
INC R12D
CMP RBX,R15
JC 0x001109b7
JMP 0x001109ed
LAB_001109d5:
MOV RAX,qword ptr [R14]
TEST RAX,RAX
JZ 0x001109c7
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JZ 0x001109c7
MOV RDI,R13
CALL RAX
JMP 0x001109c7
LAB_001109ed:
LEA RBX,[0x122678]
CMP RBX,qword ptr [0x0013dff0]
JNC 0x00110a4a
XOR R12D,R12D
LEA R14,[0x140948]
LEA R13,[0x126977]
LEA R15,[0x122708]
LAB_00110a15:
MOV RDI,qword ptr [RBX]
MOV ESI,R12D
CALL 0x0010ce3d
TEST EAX,EAX
JZ 0x00110a32
LAB_00110a24:
ADD RBX,0x10
INC R12D
CMP RBX,R15
JC 0x00110a15
JMP 0x00110a4a
LAB_00110a32:
MOV RAX,qword ptr [R14]
TEST RAX,RAX
JZ 0x00110a24
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JZ 0x00110a24
MOV RDI,R13
CALL RAX
JMP 0x00110a24
LAB_00110a4a:
LEA RBX,[0x122708]
CMP RBX,qword ptr [0x0013dfd8]
JNC 0x00110aa2
LEA R14,[0x140948]
LEA R12,[0x126993]
LEA R15,[0x122924]
LAB_00110a6f:
MOV RDI,qword ptr [RBX + 0x4]
MOVSX ESI,word ptr [RBX]
CALL 0x0010ce0e
TEST EAX,EAX
JZ 0x00110a8a
LAB_00110a7f:
ADD RBX,0x14
CMP RBX,R15
JC 0x00110a6f
JMP 0x00110aa2
LAB_00110a8a:
MOV RAX,qword ptr [R14]
TEST RAX,RAX
JZ 0x00110a7f
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JZ 0x00110a7f
MOV RDI,R12
CALL RAX
JMP 0x00110a7f
LAB_00110aa2:
MOV dword ptr [0x00140870],0x0
LEA RDX,[RBP + -0x80]
LEA RCX,[RBP + -0x50]
MOV RDI,qword ptr [RBP + -0x58]
MOV ESI,dword ptr [RBP + -0x30]
CALL 0x0010cf1b
TEST EAX,EAX
JZ 0x00110b87
LEA RDI,[RBP + -0x80]
LEA RBX,[RBP + -0x50]
MOV RSI,RBX
CALL 0x0010d030
MOV qword ptr [RBX],0x0
CALL 0x0010e4d1
MOV R15,RAX
MOV RDI,RAX
MOV RSI,RBX
CALL 0x0010a341
TEST EAX,EAX
JNZ 0x00110b95
XOR R14D,R14D
XOR EDI,EDI
CALL 0x0010e475
TEST RAX,RAX
JZ 0x00110b39
MOV R13D,0x1
LEA R12,[RBP + -0x50]
LAB_00110b13:
MOV RDI,RAX
MOV RSI,R15
MOV RDX,R12
CALL 0x0010a1ed
TEST EAX,EAX
JNZ 0x00110b95
LEA EBX,[R13 + 0x1]
MOV EDI,R13D
CALL 0x0010e475
MOV R13D,EBX
TEST RAX,RAX
JNZ 0x00110b13
LAB_00110b39:
CALL 0x0010debf
MOV EBX,EAX
SUB EBX,dword ptr [RBP + -0x2c]
CALL 0x0010e52e
MOV R15,RAX
CALL 0x0010e522
MOV ECX,dword ptr [0x00140870]
IMUL R8,RBX,0x10624dd3
SHR R8,0x26
IMUL EDX,R8D,0x3e8
SUB EBX,EDX
LEA RDI,[0x126907]
MOV RSI,R15
MOV EDX,EAX
MOV R9D,EBX
XOR EAX,EAX
CALL 0x00110ce7
CALL 0x0010cd6d
JMP 0x00110ba5
LAB_00110b87:
LEA RDI,[0x126938]
XOR EAX,EAX
CALL 0x00110d62
LAB_00110b95:
CALL 0x0010cd6d
CALL 0x00110bd2
MOV R14D,0xffffffff
LAB_00110ba5:
MOV EAX,R14D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
_starter_compile(int8 param_1,int4 param_2,int8 param_3,int8 param_4,
int param_5)
{
int iVar1;
int4 uVar2;
int8 uVar3;
long lVar4;
uint uVar5;
int1 *puVar6;
int **ppuVar7;
int iVar8;
int *local_88;
int *puStack_80;
int *local_78;
int *puStack_70;
int8 local_60;
int8 local_58;
int4 uStack_50;
int4 uStack_4c;
int *local_48;
int4 local_38;
int local_34;
local_60 = param_1;
local_38 = param_2;
local_34 = engine_timestamp();
local_78 = PTR_version_0013d8b8;
puStack_70 = PTR_name_0013d8c0;
local_88 = PTR_statemachine_0013d8a8;
puStack_80 = PTR_stringtable_0013d8b0;
local_48 = PTR_parser_error_0013d8d8;
local_58 = CONCAT44(PTR_parser_log_0013d8c8._4_4_,PTR_parser_log_0013d8c8._0_4_);
uStack_50 = PTR_parser_report_0013d8d0._0_4_;
uStack_4c = PTR_parser_report_0013d8d0._4_4_;
if (param_5 == 0) {
local_58 = 0;
}
_starter_log_ctx = param_3;
_starter_log = param_4;
ParseInit();
puVar6 = __engine_action_a_add;
if (__engine_action_a_add < PTR___engine_event__console_char_0013dfc8) {
iVar8 = 0;
do {
iVar1 = ParserAddAction(*(int **)((long)puVar6 + 8),iVar8);
if (((iVar1 == 0) && (_qoraal_instance != 0)) &&
(*(code **)(_qoraal_instance + 0x18) != (code *)0x0)) {
(**(code **)(_qoraal_instance + 0x18))(s_ENG__E__fail_adding_action__0012695a);
}
puVar6 = (int1 *)((long)puVar6 + 0x18);
iVar8 = iVar8 + 1;
} while (puVar6 < &__engine_event__console_char);
}
ppuVar7 = &__engine_event__console_char;
if (&__engine_event__console_char < PTR___engine_const_CSS_0013dff0) {
iVar8 = 0;
do {
iVar1 = ParserAddEvent(*ppuVar7,iVar8);
if (((iVar1 == 0) && (_qoraal_instance != 0)) &&
(*(code **)(_qoraal_instance + 0x18) != (code *)0x0)) {
(**(code **)(_qoraal_instance + 0x18))(s_ENG__E__fail_adding_event__00126977);
}
ppuVar7 = ppuVar7 + 2;
iVar8 = iVar8 + 1;
} while (ppuVar7 < &__engine_const_CSS);
}
ppuVar7 = (int **)&__engine_const_CSS;
if (&__engine_const_CSS < PTR___engine_cmd_part_console_cmd_0013dfd8) {
do {
iVar8 = ParserAddConst(*(int8 *)((long)ppuVar7 + 4),(int)*(short *)ppuVar7);
if (((iVar8 == 0) && (_qoraal_instance != 0)) &&
(*(code **)(_qoraal_instance + 0x18) != (code *)0x0)) {
(**(code **)(_qoraal_instance + 0x18))(s_ENG__E__fail_adding_const__00126993);
}
ppuVar7 = (int **)((long)ppuVar7 + 0x14);
} while (ppuVar7 < &__engine_cmd_part_console_cmd);
}
_starter_loaded_size = 0;
iVar8 = ParseAnalyse(local_60,local_38,&local_88,&local_58);
if (iVar8 == 0) {
parser_error(s_STATEMACHINE_validation_FAIL____00126938);
}
else {
ParseComplete(&local_88,&local_58);
local_58 = 0;
uVar3 = engine_get_stringtable();
iVar8 = machine_stringtable_validate(uVar3,&local_58);
if (iVar8 == 0) {
lVar4 = engine_get_statemachine(0);
if (lVar4 != 0) {
iVar8 = 1;
do {
iVar1 = machine_validate(lVar4,uVar3,&local_58);
if (iVar1 != 0) goto LAB_00110b95;
lVar4 = engine_get_statemachine(iVar8);
iVar8 = iVar8 + 1;
} while (lVar4 != 0);
}
iVar8 = engine_timestamp();
uVar5 = iVar8 - local_34;
uVar3 = engine_get_name();
uVar2 = engine_get_version();
parser_report(s___s__v_d_compiled__d_bytes_in__d_00126907,uVar3,uVar2,_starter_loaded_size,
(ulong)uVar5 / 1000,uVar5 % 1000);
ParseDestroy();
return 0;
}
}
LAB_00110b95:
ParseDestroy();
starter_stop();
return 0xffffffff;
}
| |
52,532 | dequantize_row_iq3_xxs | monkey531[P]llama/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
leaq 0xff(%rdx), %rax
testq %rdx, %rdx
cmovnsq %rdx, %rax
movq %rax, -0x8(%rsp)
cmpq $0x100, %rdx # imm = 0x100
jl 0x326b0
sarq $0x8, -0x8(%rsp)
leaq 0x3(%rdi), %rdx
xorl %r8d, %r8d
movss 0x17ba9(%rip), %xmm0 # 0x4a0fc
leaq 0x1fea6(%rip), %r10 # 0x52400
leaq 0x1ce1f(%rip), %r11 # 0x4f380
pxor %xmm1, %xmm1
movd 0x1c223(%rip), %xmm2 # 0x4e790
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 0x17b04(%rip), %xmm3 # 0x4a080
movd 0x1c21c(%rip), %xmm4 # 0x4e7a0
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
leaq (%rdi,%rcx), %rbx
movzwl (%rdi,%rcx), %ecx
movq 0x37a09(%rip), %rax # 0x69fa8
movss (%rax,%rcx,4), %xmm5
movq %rdx, %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 0x325d0
incq %r15
addq $0x8, %r14
cmpq $0x8, %r15
jne 0x325aa
incq %r8
addq $0x62, %rdx
cmpq -0x8(%rsp), %r8
jne 0x3258c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| dequantize_row_iq3_xxs:
push rbp
push r15
push r14
push r13
push r12
push rbx
lea rax, [rdx+0FFh]
test rdx, rdx
cmovns rax, rdx
mov [rsp+30h+var_38], rax
cmp rdx, 100h
jl loc_326B0
sar [rsp+30h+var_38], 8
lea rdx, [rdi+3]
xor r8d, r8d
movss xmm0, cs:dword_4A0FC
lea r10, iq3xxs_grid
lea r11, ksigns_iq2xs
pxor xmm1, xmm1
movd xmm2, dword ptr cs:xmmword_4E790
punpcklbw xmm2, xmm2
punpcklwd xmm2, xmm2
movaps xmm3, cs:xmmword_4A080
movd xmm4, dword ptr cs:xmmword_4E7A0
punpcklbw xmm4, xmm4
punpcklwd xmm4, xmm4
loc_3258C:
imul rcx, r8, 62h ; 'b'
lea rbx, [rdi+rcx]
movzx ecx, word ptr [rdi+rcx]
mov rax, cs:ggml_table_f32_f16_ptr
movss xmm5, dword ptr [rax+rcx*4]
mov r14, rdx
xor r15d, r15d
loc_325AA:
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_325D0:
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_325D0
inc r15
add r14, 8
cmp r15, 8
jnz loc_325AA
inc r8
add rdx, 62h ; 'b'
cmp r8, [rsp+30h+var_38]
jnz loc_3258C
loc_326B0:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long dequantize_row_iq3_xxs(long long a1, __m128 *a2, long long a3)
{
long long result; // rax
unsigned __int8 *v4; // rdx
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 v21; // r13
__m128i v22; // xmm7
__m128i v23; // xmm7
__m128 v24; // xmm8
__m128i v25; // xmm7
__m128i v26; // xmm7
__m128 v27; // xmm9
__m128 v28; // xmm8
__m128 v29; // xmm7
long long v30; // [rsp+0h] [rbp-38h]
result = a3 + 255;
if ( a3 >= 0 )
result = a3;
if ( a3 >= 256 )
{
v30 = result >> 8;
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);
v21 = *v19;
v22 = _mm_cvtsi32_si128(ksigns_iq2xs[(v16 >> j) & 0x7F]);
v23 = _mm_shufflelo_epi16(_mm_unpacklo_epi8(v22, v22), 0);
v24 = _mm_mul_ps(
_mm_cvtepi32_ps(
_mm_unpacklo_epi16(
_mm_unpacklo_epi8(_mm_cvtsi32_si128(iq3xxs_grid[result]), (__m128i)0LL),
(__m128i)0LL)),
v18);
v25 = _mm_unpacklo_epi8(v23, v23);
v26 = _mm_unpacklo_epi16(v25, v25);
v27 = (__m128)_mm_cmpeq_epi8(_mm_and_si128(v8, v26), (__m128i)0LL);
*a2 = _mm_or_ps(_mm_andnot_ps(v27, _mm_xor_ps(v24, (__m128)xmmword_4A080)), _mm_and_ps(v24, v27));
v28 = _mm_mul_ps(
_mm_cvtepi32_ps(
_mm_unpacklo_epi16(
_mm_unpacklo_epi8(_mm_cvtsi32_si128(iq3xxs_grid[v21]), (__m128i)0LL),
(__m128i)0LL)),
v18);
v29 = (__m128)_mm_cmpeq_epi8(_mm_and_si128(v26, v11), (__m128i)0LL);
a2[1] = _mm_or_ps(_mm_andnot_ps(v29, _mm_xor_ps(v28, (__m128)xmmword_4A080)), _mm_and_ps(v28, v29));
a2 += 2;
v19 += 2;
}
v14 += 8;
}
++v5;
v4 += 98;
}
while ( v5 != v30 );
}
return result;
}
| dequantize_row_iq3_xxs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
LEA RAX,[RDX + 0xff]
TEST RDX,RDX
CMOVNS RAX,RDX
MOV qword ptr [RSP + -0x8],RAX
CMP RDX,0x100
JL 0x001326b0
SAR qword ptr [RSP + -0x8],0x8
LEA RDX,[RDI + 0x3]
XOR R8D,R8D
MOVSS XMM0,dword ptr [0x0014a0fc]
LEA R10,[0x152400]
LEA R11,[0x14f380]
PXOR XMM1,XMM1
MOVD XMM2,dword ptr [0x0014e790]
PUNPCKLBW XMM2,XMM2
PUNPCKLWD XMM2,XMM2
MOVAPS XMM3,xmmword ptr [0x0014a080]
MOVD XMM4,dword ptr [0x0014e7a0]
PUNPCKLBW XMM4,XMM4
PUNPCKLWD XMM4,XMM4
LAB_0013258c:
IMUL RCX,R8,0x62
LEA RBX,[RDI + RCX*0x1]
MOVZX ECX,word ptr [RDI + RCX*0x1]
MOV RAX,qword ptr [0x00169fa8]
MOVSS XMM5,dword ptr [RAX + RCX*0x4]
MOV R14,RDX
XOR R15D,R15D
LAB_001325aa:
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_001325d0:
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 0x001325d0
INC R15
ADD R14,0x8
CMP R15,0x8
JNZ 0x001325aa
INC R8
ADD RDX,0x62
CMP R8,qword ptr [RSP + -0x8]
JNZ 0x0013258c
LAB_001326b0:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* 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;
long lVar24;
byte *pbVar25;
long lVar26;
byte *pbVar27;
byte *pbVar28;
long lVar29;
int1 uVar33;
int1 auVar30 [16];
int1 auVar35 [16];
float fVar39;
uint uVar40;
uint uVar56;
int1 auVar42 [16];
int1 auVar43 [16];
int1 auVar51 [16];
int1 auVar54 [16];
float fVar57;
float fVar58;
float fVar59;
float fVar60;
int1 auVar61 [12];
int1 auVar31 [16];
int1 auVar32 [16];
int2 uVar34;
int1 auVar36 [16];
int1 auVar37 [16];
int1 auVar38 [16];
int1 auVar44 [16];
int1 auVar41 [12];
int1 auVar45 [16];
int1 auVar46 [16];
int1 auVar52 [16];
int1 auVar47 [16];
int1 auVar48 [16];
int1 auVar53 [16];
int1 auVar55 [16];
int1 auVar49 [16];
int1 auVar50 [16];
int1 auVar62 [16];
fVar22 = DAT_0014a0fc;
uVar21 = _UNK_0014a08c;
uVar20 = _UNK_0014a088;
uVar19 = _UNK_0014a084;
uVar18 = _DAT_0014a080;
lVar23 = param_3 + 0xff;
if (-1 < param_3) {
lVar23 = param_3;
}
if (0xff < param_3) {
pbVar25 = (byte *)(param_1 + 3);
lVar26 = 0;
uVar33 = (int1)((uint)DAT_0014e790 >> 0x18);
uVar34 = CONCAT11(uVar33,uVar33);
uVar33 = (int1)((uint)DAT_0014e790 >> 0x10);
uVar4 = CONCAT31(CONCAT21(uVar34,uVar33),uVar33);
uVar33 = (int1)((uint)DAT_0014e790 >> 8);
uVar12 = CONCAT51(CONCAT41(uVar4,uVar33),uVar33);
auVar30._0_2_ = CONCAT11((char)DAT_0014e790,(char)DAT_0014e790);
uVar11 = CONCAT62(uVar12,auVar30._0_2_);
auVar32._8_4_ = 0;
auVar32._0_8_ = uVar11;
auVar32._12_2_ = uVar34;
auVar32._14_2_ = uVar34;
uVar34 = (int2)uVar4;
auVar31._12_4_ = auVar32._12_4_;
auVar31._8_2_ = 0;
auVar31._0_8_ = uVar11;
auVar31._10_2_ = uVar34;
auVar42._10_6_ = auVar31._10_6_;
auVar42._8_2_ = uVar34;
auVar42._0_8_ = uVar11;
uVar34 = (int2)uVar12;
auVar30._8_8_ = auVar42._8_8_;
auVar30._6_2_ = uVar34;
auVar30._4_2_ = uVar34;
auVar30._2_2_ = auVar30._0_2_;
uVar33 = (int1)((uint)DAT_0014e7a0 >> 0x18);
uVar34 = CONCAT11(uVar33,uVar33);
uVar33 = (int1)((uint)DAT_0014e7a0 >> 0x10);
uVar4 = CONCAT31(CONCAT21(uVar34,uVar33),uVar33);
uVar33 = (int1)((uint)DAT_0014e7a0 >> 8);
uVar12 = CONCAT51(CONCAT41(uVar4,uVar33),uVar33);
auVar35._0_2_ = CONCAT11((char)DAT_0014e7a0,(char)DAT_0014e7a0);
uVar11 = CONCAT62(uVar12,auVar35._0_2_);
auVar38._8_4_ = 0;
auVar38._0_8_ = uVar11;
auVar38._12_2_ = uVar34;
auVar38._14_2_ = uVar34;
uVar34 = (int2)uVar4;
auVar37._12_4_ = auVar38._12_4_;
auVar37._8_2_ = 0;
auVar37._0_8_ = uVar11;
auVar37._10_2_ = uVar34;
auVar36._10_6_ = auVar37._10_6_;
auVar36._8_2_ = uVar34;
auVar36._0_8_ = uVar11;
uVar34 = (int2)uVar12;
auVar35._8_8_ = auVar36._8_8_;
auVar35._6_2_ = uVar34;
auVar35._4_2_ = uVar34;
auVar35._2_2_ = auVar35._0_2_;
do {
fVar1 = *(float *)(PTR_ggml_table_f32_f16_00169fa8 +
(ulong)*(ushort *)(param_1 + lVar26 * 0x62) * 4);
lVar29 = 0;
pbVar28 = pbVar25;
do {
uVar3 = *(uint *)(param_1 + lVar26 * 0x62 + 0x42 + lVar29 * 4);
fVar39 = ((float)(uVar3 >> 0x1c) + fVar22) * fVar1 * fVar22;
lVar24 = 0;
pbVar27 = pbVar28;
do {
bVar2 = *pbVar27;
auVar42 = ZEXT216(CONCAT11(ksigns_iq2xs[uVar3 >> ((byte)lVar24 & 0x1f) & 0x7f],
ksigns_iq2xs[uVar3 >> ((byte)lVar24 & 0x1f) & 0x7f]));
auVar42 = pshuflw(auVar42,auVar42,0);
uVar4 = *(int4 *)(iq3xxs_grid + (ulong)pbVar27[-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);
fVar57 = (float)(int)uVar11 * fVar39;
fVar58 = (float)auVar7._4_4_ * fVar39;
fVar59 = (float)auVar6._8_4_ * fVar39;
fVar60 = (float)(uint3)(auVar5._10_3_ >> 0x10) * fVar39;
auVar50._0_14_ = auVar42._0_14_;
auVar50[0xe] = auVar42[7];
auVar50[0xf] = auVar42[7];
auVar49._14_2_ = auVar50._14_2_;
auVar49._0_13_ = auVar42._0_13_;
auVar49[0xd] = auVar42[6];
auVar48._13_3_ = auVar49._13_3_;
auVar48._0_12_ = auVar42._0_12_;
auVar48[0xc] = auVar42[6];
auVar47._12_4_ = auVar48._12_4_;
auVar47._0_11_ = auVar42._0_11_;
auVar47[0xb] = auVar42[5];
auVar46._11_5_ = auVar47._11_5_;
auVar46._0_10_ = auVar42._0_10_;
auVar46[10] = auVar42[5];
auVar45._10_6_ = auVar46._10_6_;
auVar45._0_9_ = auVar42._0_9_;
auVar45[9] = auVar42[4];
auVar44._9_7_ = auVar45._9_7_;
auVar44._0_8_ = auVar42._0_8_;
auVar44[8] = auVar42[4];
Var16 = CONCAT91(CONCAT81(auVar44._8_8_,auVar42[3]),auVar42[3]);
auVar15._2_10_ = Var16;
auVar15[1] = auVar42[2];
auVar15[0] = auVar42[2];
auVar14._2_12_ = auVar15;
auVar14[1] = auVar42[1];
auVar14[0] = auVar42[1];
auVar43._0_2_ = CONCAT11(auVar42[0],auVar42[0]);
auVar43._2_14_ = auVar14;
uVar34 = (int2)Var16;
auVar53._0_12_ = auVar43._0_12_;
auVar53._12_2_ = uVar34;
auVar53._14_2_ = uVar34;
auVar52._12_4_ = auVar53._12_4_;
auVar52._0_10_ = auVar43._0_10_;
auVar52._10_2_ = auVar15._0_2_;
auVar51._10_6_ = auVar52._10_6_;
auVar51._0_8_ = auVar43._0_8_;
auVar51._8_2_ = auVar15._0_2_;
auVar54._8_8_ = auVar51._8_8_;
auVar54._6_2_ = auVar14._0_2_;
auVar54._4_2_ = auVar14._0_2_;
auVar54._2_2_ = auVar43._0_2_;
auVar54._0_2_ = auVar43._0_2_;
auVar42 = auVar30 & auVar54;
uVar40 = CONCAT13(-(auVar42[3] == '\0'),
CONCAT12(-(auVar42[2] == '\0'),
CONCAT11(-(auVar42[1] == '\0'),-(auVar42[0] == '\0'))));
auVar61._0_8_ =
CONCAT17(-(auVar42[7] == '\0'),
CONCAT16(-(auVar42[6] == '\0'),
CONCAT15(-(auVar42[5] == '\0'),
CONCAT14(-(auVar42[4] == '\0'),uVar40))));
auVar61[8] = -(auVar42[8] == '\0');
auVar61[9] = -(auVar42[9] == '\0');
auVar61[10] = -(auVar42[10] == '\0');
auVar61[0xb] = -(auVar42[0xb] == '\0');
auVar62[0xc] = -(auVar42[0xc] == '\0');
auVar62._0_12_ = auVar61;
auVar62[0xd] = -(auVar42[0xd] == '\0');
auVar62[0xe] = -(auVar42[0xe] == '\0');
auVar62[0xf] = -(auVar42[0xf] == '\0');
uVar56 = (uint)((ulong)auVar61._0_8_ >> 0x20);
*param_2 = ~uVar40 & ((uint)fVar57 ^ uVar18) | (uint)fVar57 & uVar40;
param_2[1] = ~uVar56 & ((uint)fVar58 ^ uVar19) | (uint)fVar58 & uVar56;
param_2[2] = ~auVar61._8_4_ & ((uint)fVar59 ^ uVar20) | (uint)fVar59 & auVar61._8_4_;
param_2[3] = ~auVar62._12_4_ & ((uint)fVar60 ^ uVar21) | (uint)fVar60 & auVar62._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);
fVar57 = (float)(int)uVar11 * fVar39;
fVar58 = (float)auVar10._4_4_ * fVar39;
fVar59 = (float)auVar9._8_4_ * fVar39;
fVar60 = (float)(uint3)(auVar8._10_3_ >> 0x10) * fVar39;
auVar54 = auVar54 & auVar35;
uVar40 = CONCAT13(-(auVar54[3] == '\0'),
CONCAT12(-(auVar54[2] == '\0'),
CONCAT11(-(auVar54[1] == '\0'),-(auVar54[0] == '\0'))));
auVar41._0_8_ =
CONCAT17(-(auVar54[7] == '\0'),
CONCAT16(-(auVar54[6] == '\0'),
CONCAT15(-(auVar54[5] == '\0'),
CONCAT14(-(auVar54[4] == '\0'),uVar40))));
auVar41[8] = -(auVar54[8] == '\0');
auVar41[9] = -(auVar54[9] == '\0');
auVar41[10] = -(auVar54[10] == '\0');
auVar41[0xb] = -(auVar54[0xb] == '\0');
auVar55[0xc] = -(auVar54[0xc] == '\0');
auVar55._0_12_ = auVar41;
auVar55[0xd] = -(auVar54[0xd] == '\0');
auVar55[0xe] = -(auVar54[0xe] == '\0');
auVar55[0xf] = -(auVar54[0xf] == '\0');
uVar56 = (uint)((ulong)auVar41._0_8_ >> 0x20);
param_2[4] = ~uVar40 & ((uint)fVar57 ^ uVar18) | (uint)fVar57 & uVar40;
param_2[5] = ~uVar56 & ((uint)fVar58 ^ uVar19) | (uint)fVar58 & uVar56;
param_2[6] = ~auVar41._8_4_ & ((uint)fVar59 ^ uVar20) | (uint)fVar59 & auVar41._8_4_;
param_2[7] = ~auVar55._12_4_ & ((uint)fVar60 ^ uVar21) | (uint)fVar60 & auVar55._12_4_;
param_2 = param_2 + 8;
lVar24 = lVar24 + 7;
pbVar27 = pbVar27 + 2;
} while (lVar24 != 0x1c);
lVar29 = lVar29 + 1;
pbVar28 = pbVar28 + 8;
} while (lVar29 != 8);
lVar26 = lVar26 + 1;
pbVar25 = pbVar25 + 0x62;
} while (lVar26 != lVar23 >> 8);
}
return;
}
| |
52,533 | gguf_set_val_i32 | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_set_val_i32(struct gguf_context * ctx, const char * key, int32_t val) {
gguf_check_reserved_keys(key, val);
gguf_remove_key(ctx, key);
ctx->kv.emplace_back(key, val);
} | O1 | cpp | gguf_set_val_i32:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
leaq 0x18(%rsp), %r14
leaq 0xb(%rsp), %rdx
movq %r14, %rdi
callq 0x18d70
leaq 0x1d40d(%rip), %rsi # 0x5d061
movq %r14, %rdi
callq 0x18220
testl %eax, %eax
je 0x3fca7
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3fc7b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x180e0
leaq 0x10(%rsp), %r14
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x186c0
addq $0x8, %rbx
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x173f0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x1d33f(%rip), %rdi # 0x5cfed
leaq 0x1de41(%rip), %rdx # 0x5daf6
movl $0x3a3, %esi # imm = 0x3A3
xorl %eax, %eax
callq 0x18ce0
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3fcdf
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x180e0
movq %rbx, %rdi
callq 0x18ea0
| gguf_set_val_i32:
push r14
push rbx
sub rsp, 38h
mov rbx, rdi
mov [rsp+48h+var_38], rsi
mov [rsp+48h+var_3C], edx
lea r14, [rsp+48h+var_30]
lea rdx, [rsp+48h+var_3D]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aGeneralAlignme; "general.alignment"
mov rdi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_3FCA7
lea rax, [rsp+48h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3FC7B
mov rsi, [rsp+48h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3FC7B:
lea r14, [rsp+48h+var_38]
mov rsi, [r14]
mov rdi, rbx
call _gguf_remove_key
add rbx, 8
lea rdx, [rsp+48h+var_3C]
mov rdi, rbx
mov rsi, r14
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRiEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,int &>(char const*&,int &)
add rsp, 38h
pop rbx
pop r14
retn
loc_3FCA7:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGeneralAlignme_0; "general.alignment must be type u32"
mov esi, 3A3h
xor eax, eax
call _ggml_abort
mov rbx, rax
lea rax, [rsp+48h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3FCDF
mov rsi, [rsp+48h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3FCDF:
mov rdi, rbx
call __Unwind_Resume
| long long gguf_set_val_i32(long long a1, long long a2, int a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
char v7; // [rsp+Bh] [rbp-3Dh] BYREF
int v8; // [rsp+Ch] [rbp-3Ch] BYREF
long long v9; // [rsp+10h] [rbp-38h] BYREF
void *v10[2]; // [rsp+18h] [rbp-30h] BYREF
long long v11; // [rsp+28h] [rbp-20h] BYREF
v9 = a2;
v8 = a3;
std::string::basic_string<std::allocator<char>>(v10, a2, &v7);
if ( !(unsigned int)std::string::compare(v10, "general.alignment") )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
931,
(unsigned int)"general.alignment must be type u32",
v3,
v4,
v5);
if ( v10[0] != &v11 )
operator delete(v10[0], v11 + 1);
gguf_remove_key(a1, v9);
return std::vector<gguf_kv>::emplace_back<char const*&,int &>(a1 + 8, &v9, &v8);
}
| gguf_set_val_i32:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV qword ptr [RSP + 0x10],RSI
MOV dword ptr [RSP + 0xc],EDX
LEA R14,[RSP + 0x18]
LEA RDX,[RSP + 0xb]
MOV RDI,R14
CALL 0x00118d70
LEA RSI,[0x15d061]
MOV RDI,R14
CALL 0x00118220
TEST EAX,EAX
JZ 0x0013fca7
LEA RAX,[RSP + 0x28]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0013fc7b
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x001180e0
LAB_0013fc7b:
LEA R14,[RSP + 0x10]
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x001186c0
ADD RBX,0x8
LEA RDX,[RSP + 0xc]
MOV RDI,RBX
MOV RSI,R14
CALL 0x001173f0
ADD RSP,0x38
POP RBX
POP R14
RET
LAB_0013fca7:
LEA RDI,[0x15cfed]
LEA RDX,[0x15daf6]
MOV ESI,0x3a3
XOR EAX,EAX
CALL 0x00118ce0
|
void gguf_set_val_i32(long param_1,char *param_2,int param_3)
{
int iVar1;
allocator local_3d;
int local_3c;
char *local_38;
long *local_30 [2];
long local_20 [2];
local_3c = param_3;
local_38 = param_2;
std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_2,&local_3d);
iVar1 = std::__cxx11::string::compare((string *)local_30,"general.alignment");
if (iVar1 != 0) {
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
gguf_remove_key(param_1,local_38);
std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,int&>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_38,&local_3c);
return;
}
/* try { // try from 0013fca7 to 0013fcc0 has its CatchHandler @ 0013fcc1 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
0x3a3,"general.alignment must be type u32");
}
| |
52,534 | gguf_set_val_i32 | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_set_val_i32(struct gguf_context * ctx, const char * key, int32_t val) {
gguf_check_reserved_keys(key, val);
gguf_remove_key(ctx, key);
ctx->kv.emplace_back(key, val);
} | O2 | cpp | gguf_set_val_i32:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
leaq 0x10(%rsp), %r15
leaq 0x3(%rsp), %rdx
movq %r15, %rdi
callq 0x1fa80
leaq 0x1d615(%rip), %rsi # 0x5f2c1
movq %r15, %rdi
callq 0x20210
testb %al, %al
jne 0x41ced
leaq 0x10(%rsp), %rdi
callq 0x1eab0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1f0d0
addq $0x8, %rbx
leaq 0x8(%rsp), %rsi
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
callq 0x1d630
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1d559(%rip), %rdi # 0x5f24d
leaq 0x1e900(%rip), %rdx # 0x605fb
movl $0x3a3, %esi # imm = 0x3A3
xorl %eax, %eax
callq 0x1f9b0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1eab0
movq %rbx, %rdi
callq 0x1fc10
| gguf_set_val_i32:
push r15
push r14
push rbx
sub rsp, 30h
mov r14, rsi
mov rbx, rdi
mov [rsp+48h+var_40], rsi
mov [rsp+48h+var_44], edx
lea r15, [rsp+48h+var_38]
lea rdx, [rsp+48h+var_45]
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aGeneralAlignme; "general.alignment"
mov rdi, r15
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_41CED
lea rdi, [rsp+48h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
mov rsi, r14
call _gguf_remove_key
add rbx, 8
lea rsi, [rsp+48h+var_40]
lea rdx, [rsp+48h+var_44]
mov rdi, rbx
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRiEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,int &>(char const*&,int &)
add rsp, 30h
pop rbx
pop r14
pop r15
retn
loc_41CED:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGeneralAlignme_0; "general.alignment must be type u32"
mov esi, 3A3h
xor eax, eax
call _ggml_abort
mov rbx, rax
lea rdi, [rsp+48h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long gguf_set_val_i32(
long long a1,
long long a2,
int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v11; // rcx
long long v12; // r8
long long v13; // r9
__m128 v14; // xmm4
__m128 v15; // xmm5
long long v16; // rdx
char v18; // [rsp+0h] [rbp-48h]
char v19; // [rsp+3h] [rbp-45h] BYREF
int v20; // [rsp+4h] [rbp-44h] BYREF
long long v21; // [rsp+8h] [rbp-40h] BYREF
_BYTE v22[56]; // [rsp+10h] [rbp-38h] BYREF
v21 = a2;
v20 = a3;
std::string::basic_string<std::allocator<char>>(v22, a2, &v19);
if ( (unsigned __int8)std::operator==<char>(v22, "general.alignment") )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
931,
(long long)"general.alignment must be type u32",
v11,
v12,
v13,
a4,
a5,
a6,
a7,
v14,
v15,
a10,
a11,
v18);
std::string::~string(v22);
gguf_remove_key(a1, a2, v16);
return std::vector<gguf_kv>::emplace_back<char const*&,int &>(a1 + 8, &v21, &v20);
}
| gguf_set_val_i32:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
MOV RBX,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV dword ptr [RSP + 0x4],EDX
LEA R15,[RSP + 0x10]
LEA RDX,[RSP + 0x3]
MOV RDI,R15
CALL 0x0011fa80
LEA RSI,[0x15f2c1]
MOV RDI,R15
CALL 0x00120210
TEST AL,AL
JNZ 0x00141ced
LEA RDI,[RSP + 0x10]
CALL 0x0011eab0
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011f0d0
ADD RBX,0x8
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x4]
MOV RDI,RBX
CALL 0x0011d630
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
LAB_00141ced:
LEA RDI,[0x15f24d]
LEA RDX,[0x1605fb]
MOV ESI,0x3a3
XOR EAX,EAX
CALL 0x0011f9b0
|
void gguf_set_val_i32(long param_1,char *param_2,int param_3)
{
bool bVar1;
allocator local_45;
int local_44;
char *local_40;
string local_38 [32];
local_44 = param_3;
local_40 = param_2;
std::__cxx11::string::string<std::allocator<char>>(local_38,param_2,&local_45);
bVar1 = std::operator==(local_38,"general.alignment");
if (!bVar1) {
std::__cxx11::string::~string(local_38);
gguf_remove_key(param_1,param_2);
std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,int&>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_40,&local_44);
return;
}
/* try { // try from 00141ced to 00141d06 has its CatchHandler @ 00141d07 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
0x3a3,"general.alignment must be type u32");
}
| |
52,535 | gguf_set_val_i32 | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_set_val_i32(struct gguf_context * ctx, const char * key, int32_t val) {
gguf_check_reserved_keys(key, val);
gguf_remove_key(ctx, key);
ctx->kv.emplace_back(key, val);
} | O3 | cpp | gguf_set_val_i32:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
leaq 0x10(%rsp), %r15
leaq 0x3(%rsp), %rdx
movq %r15, %rdi
callq 0x17d60
leaq 0x1e25d(%rip), %rsi # 0x5d551
movq %r15, %rdi
callq 0x17210
testl %eax, %eax
je 0x3f346
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f31b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x170d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x176b0
addq $0x8, %rbx
leaq 0x8(%rsp), %rsi
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
callq 0x163f0
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1e190(%rip), %rdi # 0x5d4dd
leaq 0x1ec92(%rip), %rdx # 0x5dfe6
movl $0x3a3, %esi # imm = 0x3A3
xorl %eax, %eax
callq 0x17cd0
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f37e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x170d0
movq %rbx, %rdi
callq 0x17e90
| gguf_set_val_i32:
push r15
push r14
push rbx
sub rsp, 30h
mov r14, rsi
mov rbx, rdi
mov [rsp+48h+var_40], rsi
mov [rsp+48h+var_44], edx
lea r15, [rsp+48h+var_38]
lea rdx, [rsp+48h+var_45]
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aGeneralAlignme; "general.alignment"
mov rdi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_3F346
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3F31B
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3F31B:
mov rdi, rbx
mov rsi, r14
call _gguf_remove_key
add rbx, 8
lea rsi, [rsp+48h+var_40]
lea rdx, [rsp+48h+var_44]
mov rdi, rbx
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRiEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,int &>(char const*&,int &)
add rsp, 30h
pop rbx
pop r14
pop r15
retn
loc_3F346:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGeneralAlignme_0; "general.alignment must be type u32"
mov esi, 3A3h
xor eax, eax
call _ggml_abort
mov rbx, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3F37E
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3F37E:
mov rdi, rbx
call __Unwind_Resume
| long long gguf_set_val_i32(long long a1, long long a2, int a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
char v7; // [rsp+3h] [rbp-45h] BYREF
int v8; // [rsp+4h] [rbp-44h] BYREF
long long v9; // [rsp+8h] [rbp-40h] BYREF
void *v10[2]; // [rsp+10h] [rbp-38h] BYREF
long long v11; // [rsp+20h] [rbp-28h] BYREF
v9 = a2;
v8 = a3;
std::string::basic_string<std::allocator<char>>(v10, a2, &v7);
if ( !(unsigned int)std::string::compare(v10, "general.alignment") )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
931,
(unsigned int)"general.alignment must be type u32",
v3,
v4,
v5);
if ( v10[0] != &v11 )
operator delete(v10[0], v11 + 1);
gguf_remove_key(a1, a2);
return std::vector<gguf_kv>::emplace_back<char const*&,int &>(a1 + 8, &v9, &v8);
}
| gguf_set_val_i32:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
MOV RBX,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV dword ptr [RSP + 0x4],EDX
LEA R15,[RSP + 0x10]
LEA RDX,[RSP + 0x3]
MOV RDI,R15
CALL 0x00117d60
LEA RSI,[0x15d551]
MOV RDI,R15
CALL 0x00117210
TEST EAX,EAX
JZ 0x0013f346
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0013f31b
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001170d0
LAB_0013f31b:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001176b0
ADD RBX,0x8
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x4]
MOV RDI,RBX
CALL 0x001163f0
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
LAB_0013f346:
LEA RDI,[0x15d4dd]
LEA RDX,[0x15dfe6]
MOV ESI,0x3a3
XOR EAX,EAX
CALL 0x00117cd0
|
void gguf_set_val_i32(long param_1,char *param_2,int param_3)
{
int iVar1;
allocator local_45;
int local_44;
char *local_40;
long *local_38 [2];
long local_28 [2];
local_44 = param_3;
local_40 = param_2;
std::__cxx11::string::string<std::allocator<char>>((string *)local_38,param_2,&local_45);
iVar1 = std::__cxx11::string::compare((string *)local_38,"general.alignment");
if (iVar1 != 0) {
if (local_38[0] != local_28) {
operator_delete(local_38[0],local_28[0] + 1);
}
gguf_remove_key(param_1,param_2);
std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,int&>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_40,&local_44);
return;
}
/* try { // try from 0013f346 to 0013f35f has its CatchHandler @ 0013f360 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
0x3a3,"general.alignment must be type u32");
}
| |
52,536 | store_extent_info | eloqsql/storage/maria/ma_blockrec.c | static void store_extent_info(uchar *to,
uchar *row_extents_second_part,
MARIA_BITMAP_BLOCK *first_block,
uint count)
{
MARIA_BITMAP_BLOCK *block, *end_block;
uint copy_length;
my_bool first_found= 0;
DBUG_ENTER("store_extent_info");
DBUG_PRINT("enter", ("count: %u", count));
for (block= first_block, end_block= first_block+count ;
block < end_block; block++)
{
/* The following is only false for marker (unused) blocks */
if (likely(block->used & BLOCKUSED_USED))
{
uint page_count= block->page_count;
DBUG_ASSERT(page_count != 0);
page_store(to, block->page);
if (block->sub_blocks)
{
/*
Set a bit so that we later know that this was the first block
for a blob
*/
page_count|= START_EXTENT_BIT;
}
pagerange_store(to + PAGE_STORE_SIZE, page_count);
DBUG_DUMP("extent", to, ROW_EXTENT_SIZE);
to+= ROW_EXTENT_SIZE;
if (!first_found)
{
first_found= 1;
to= row_extents_second_part;
}
}
}
copy_length= (count - 1) * ROW_EXTENT_SIZE;
/*
In some unlikely cases we have allocated to many blocks. Clear this
data.
*/
bzero(to, (size_t) (row_extents_second_part + copy_length - to));
DBUG_VOID_RETURN;
} | O0 | c | store_extent_info:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movb $0x0, -0x35(%rbp)
jmp 0x5fd8d
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x5fe77
movq -0x28(%rbp), %rax
movzbl 0x14(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5fe64
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0x5fde3
jmp 0x5fde5
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movq -0x48(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x5fe25
movl -0x3c(%rbp), %eax
orl $0x4000, %eax # imm = 0x4000
movl %eax, -0x3c(%rbp)
jmp 0x5fe27
movq -0x8(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x50(%rbp)
movl -0x3c(%rbp), %eax
movw %ax, %cx
movq -0x50(%rbp), %rax
movw %cx, (%rax)
jmp 0x5fe42
jmp 0x5fe44
movq -0x8(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x8(%rbp)
cmpb $0x0, -0x35(%rbp)
jne 0x5fe62
movb $0x1, -0x35(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5fe64
jmp 0x5fe66
movq -0x28(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x28(%rbp)
jmp 0x5fda7
movl -0x1c(%rbp), %eax
subl $0x1, %eax
imull $0x7, %eax, %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x34(%rbp), %eax
addq %rax, %rdx
movq -0x8(%rbp), %rax
subq %rax, %rdx
xorl %esi, %esi
callq 0x29280
jmp 0x5fea1
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| store_extent_info:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_35], 0
jmp short $+2
loc_5FD8D:
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_1C]
imul rcx, 18h
add rax, rcx
mov [rbp+var_30], rax
loc_5FDA7:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnb loc_5FE77
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax+14h]
and eax, 1
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz loc_5FE64
mov rax, [rbp+var_28]
mov eax, [rax+8]
mov [rbp+var_3C], eax
jmp short $+2
loc_5FDE3:
jmp short $+2
loc_5FDE5:
mov rax, [rbp+var_8]
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov ecx, eax
mov rax, [rbp+var_48]
mov [rax], ecx
mov rax, [rbp+var_28]
mov rax, [rax]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_48]
mov [rax+4], cl
mov rax, [rbp+var_28]
cmp dword ptr [rax+10h], 0
jz short loc_5FE25
mov eax, [rbp+var_3C]
or eax, 4000h
mov [rbp+var_3C], eax
loc_5FE25:
jmp short $+2
loc_5FE27:
mov rax, [rbp+var_8]
add rax, 5
mov [rbp+var_50], rax
mov eax, [rbp+var_3C]
mov cx, ax
mov rax, [rbp+var_50]
mov [rax], cx
jmp short $+2
loc_5FE42:
jmp short $+2
loc_5FE44:
mov rax, [rbp+var_8]
add rax, 7
mov [rbp+var_8], rax
cmp [rbp+var_35], 0
jnz short loc_5FE62
mov [rbp+var_35], 1
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_5FE62:
jmp short $+2
loc_5FE64:
jmp short $+2
loc_5FE66:
mov rax, [rbp+var_28]
add rax, 18h
mov [rbp+var_28], rax
jmp loc_5FDA7
loc_5FE77:
mov eax, [rbp+var_1C]
sub eax, 1
imul eax, 7
mov [rbp+var_34], eax
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov eax, [rbp+var_34]
add rdx, rax
mov rax, [rbp+var_8]
sub rdx, rax
xor esi, esi
call _memset
jmp short $+2
loc_5FEA1:
add rsp, 50h
pop rbp
retn
| long long store_extent_info(long long a1, long long a2, unsigned long long a3, unsigned int a4)
{
int v5; // [rsp+14h] [rbp-3Ch]
char v6; // [rsp+1Bh] [rbp-35h]
unsigned long long i; // [rsp+28h] [rbp-28h]
v6 = 0;
for ( i = a3; i < 24LL * a4 + a3; i += 24LL )
{
if ( (*(_BYTE *)(i + 20) & 1) != 0 )
{
v5 = *(_DWORD *)(i + 8);
*(_DWORD *)a1 = *(_QWORD *)i;
*(_BYTE *)(a1 + 4) = BYTE4(*(_QWORD *)i);
if ( *(_DWORD *)(i + 16) )
LOWORD(v5) = v5 | 0x4000;
*(_WORD *)(a1 + 5) = v5;
a1 += 7LL;
if ( !v6 )
{
v6 = 1;
a1 = a2;
}
}
}
return memset(a1, 0LL, 7 * (a4 - 1) + a2 - a1);
}
| store_extent_info:
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 dword ptr [RBP + -0x1c],ECX
MOV byte ptr [RBP + -0x35],0x0
JMP 0x0015fd8d
LAB_0015fd8d:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
LAB_0015fda7:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x0015fe77
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + 0x14]
AND EAX,0x1
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0015fe64
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0015fde3
LAB_0015fde3:
JMP 0x0015fde5
LAB_0015fde5:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x48]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x10],0x0
JZ 0x0015fe25
MOV EAX,dword ptr [RBP + -0x3c]
OR EAX,0x4000
MOV dword ptr [RBP + -0x3c],EAX
LAB_0015fe25:
JMP 0x0015fe27
LAB_0015fe27:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x5
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x50]
MOV word ptr [RAX],CX
JMP 0x0015fe42
LAB_0015fe42:
JMP 0x0015fe44
LAB_0015fe44:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x7
MOV qword ptr [RBP + -0x8],RAX
CMP byte ptr [RBP + -0x35],0x0
JNZ 0x0015fe62
MOV byte ptr [RBP + -0x35],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_0015fe62:
JMP 0x0015fe64
LAB_0015fe64:
JMP 0x0015fe66
LAB_0015fe66:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x18
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0015fda7
LAB_0015fe77:
MOV EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x1
IMUL EAX,EAX,0x7
MOV dword ptr [RBP + -0x34],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x34]
ADD RDX,RAX
MOV RAX,qword ptr [RBP + -0x8]
SUB RDX,RAX
XOR ESI,ESI
CALL 0x00129280
JMP 0x0015fea1
LAB_0015fea1:
ADD RSP,0x50
POP RBP
RET
|
void store_extent_info(int4 *param_1,int4 *param_2,int8 *param_3,uint param_4)
{
bool bVar1;
ushort local_44;
int8 *local_30;
int4 *local_10;
bVar1 = false;
local_10 = param_1;
for (local_30 = param_3; local_30 < param_3 + (ulong)param_4 * 3; local_30 = local_30 + 3) {
if ((*(byte *)((long)local_30 + 0x14) & 1) != 0) {
local_44 = (ushort)*(int4 *)(local_30 + 1);
*local_10 = (int)*local_30;
*(char *)(local_10 + 1) = (char)((ulong)*local_30 >> 0x20);
if (*(int *)(local_30 + 2) != 0) {
local_44 = local_44 | 0x4000;
}
*(ushort *)((long)local_10 + 5) = local_44;
local_10 = (int4 *)((long)local_10 + 7);
if (!bVar1) {
bVar1 = true;
local_10 = param_2;
}
}
}
memset(local_10,0,(long)param_2 + ((ulong)((param_4 - 1) * 7) - (long)local_10));
return;
}
| |
52,537 | print_memory_stats() | seiftnesse[P]memoryallocator/tests/enhanced_test.cpp | void print_memory_stats() {
size_t allocated = 0;
size_t freed = 0;
size_t count = 0;
size_t peak = 0;
HeapGetStats(&allocated, &freed, &count, &peak);
std::cout << "Memory stats:" << std::endl;
std::cout << " Allocated: " << allocated << " bytes" << std::endl;
std::cout << " Freed: " << freed << " bytes" << std::endl;
std::cout << " Active allocations: " << count << std::endl;
std::cout << " Peak usage: " << peak << " bytes" << std::endl;
std::cout << " Fragmentation: " << HeapGetFragmentation() * 100.0f << "%" << std::endl;
} | O3 | cpp | print_memory_stats():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %eax, %eax
leaq 0x20(%rsp), %r12
movq %rax, (%r12)
leaq 0x18(%rsp), %r13
movq %rax, (%r13)
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2dc4
movq 0x3d02(%rip), %rbx # 0x4fc8
leaq 0x1d3b(%rip), %rsi # 0x3008
movl $0xd, %edx
movq %rbx, %rdi
callq 0x10f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
leaq 0x1d0e(%rip), %rsi # 0x3016
movl $0xd, %edx
movq %rbx, %rdi
callq 0x10f0
movq (%r12), %rsi
movq %rbx, %rdi
callq 0x1080
movq %rax, %rbp
leaq 0x1cf9(%rip), %r12 # 0x3024
movl $0x6, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x10f0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x10c0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
leaq 0x1cc1(%rip), %rsi # 0x302b
movl $0x9, %edx
movq %rbx, %rdi
callq 0x10f0
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x1080
movq %rax, %r13
movl $0x6, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x10f0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x10c0
movsbl %al, %esi
movq %r13, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
leaq 0x1c70(%rip), %rsi # 0x3035
movl $0x16, %edx
movq %rbx, %rdi
callq 0x10f0
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x1080
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x10c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
leaq 0x1c3e(%rip), %rsi # 0x304c
movl $0xe, %edx
movq %rbx, %rdi
callq 0x10f0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x1080
movq %rax, %r14
movl $0x6, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x10f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
leaq 0x1bf4(%rip), %rsi # 0x305b
movl $0x11, %edx
movq %rbx, %rdi
callq 0x10f0
callq 0x2e63
mulss 0x1b83(%rip), %xmm0 # 0x3004
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1110
movq %rax, %rbx
leaq 0x1bd6(%rip), %rsi # 0x306d
movl $0x1, %edx
movq %rax, %rdi
callq 0x10f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z18print_memory_statsv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
xor eax, eax
lea r12, [rsp+58h+var_38]
mov [r12], rax
lea r13, [rsp+58h+var_40]
mov [r13+0], rax
lea r15, [rsp+58h+var_48]
mov [r15], rax
lea r14, [rsp+58h+var_50]
mov [r14], rax
mov rdi, r12
mov rsi, r13
mov rdx, r15
mov rcx, r14
call HeapGetStats
mov rbx, cs:_ZSt4cout_ptr
lea rsi, aMemoryStats; "Memory stats:"
mov edx, 0Dh
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rsi, aAllocated; " Allocated: "
mov edx, 0Dh
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 rsi, [r12]
mov rdi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rbp, rax
lea r12, aBytes; " bytes"
mov edx, 6
mov rdi, rax
mov rsi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbp+0]
mov rdi, [rax-18h]
add rdi, rbp
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbp; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rsi, aFreed; " Freed: "
mov edx, 9
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 rsi, [r13+0]
mov rdi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r13, rax
mov edx, 6
mov rdi, rax
mov rsi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [r13+0]
mov rdi, [rax-18h]
add rdi, r13
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r13; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rsi, aActiveAllocati; " Active allocations: "
mov edx, 16h
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 rsi, [r15]
mov rdi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r15, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, r15
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r15; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rsi, aPeakUsage; " Peak usage: "
mov edx, 0Eh
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 rsi, [r14]
mov rdi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
mov edx, 6
mov rdi, rax
mov rsi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [r14]
mov rdi, [rax-18h]
add rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r14; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rsi, aFragmentation; " Fragmentation: "
mov edx, 11h
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)
call HeapGetFragmentation
mulss xmm0, cs:dword_3004
cvtss2sd xmm0, xmm0
mov rdi, rbx
call __ZNSo9_M_insertIdEERSoT_; std::ostream::_M_insert<double>(double)
mov rbx, rax
lea rsi, asc_306D; "%"
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long print_memory_stats(void)
{
char v0; // al
std::ostream *v1; // rax
std::ostream *v2; // rbp
char v3; // al
std::ostream *v4; // rax
std::ostream *v5; // r13
char v6; // al
std::ostream *v7; // rax
std::ostream *v8; // r15
char v9; // al
std::ostream *v10; // rax
std::ostream *v11; // r14
char v12; // al
std::ostream *v13; // rax
float Fragmentation; // xmm0_4
std::ostream *v15; // rbx
char v16; // al
std::ostream *v17; // rax
long long v19; // [rsp+8h] [rbp-50h] BYREF
long long v20; // [rsp+10h] [rbp-48h] BYREF
long long v21; // [rsp+18h] [rbp-40h] BYREF
_QWORD v22[7]; // [rsp+20h] [rbp-38h] BYREF
v22[0] = 0LL;
v21 = 0LL;
v20 = 0LL;
v19 = 0LL;
HeapGetStats(v22, &v21, &v20, &v19);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Memory stats:", 13LL);
v0 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL);
v1 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v0);
std::ostream::flush(v1);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, " Allocated: ", 13LL);
v2 = (std::ostream *)std::ostream::_M_insert<unsigned long>(&std::cout, v22[0]);
std::__ostream_insert<char,std::char_traits<char>>(v2, " bytes", 6LL);
v3 = std::ios::widen((char *)v2 + *(_QWORD *)(*(_QWORD *)v2 - 24LL), 10LL);
v4 = (std::ostream *)std::ostream::put(v2, v3);
std::ostream::flush(v4);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, " Freed: ", 9LL);
v5 = (std::ostream *)std::ostream::_M_insert<unsigned long>(&std::cout, v21);
std::__ostream_insert<char,std::char_traits<char>>(v5, " bytes", 6LL);
v6 = std::ios::widen((char *)v5 + *(_QWORD *)(*(_QWORD *)v5 - 24LL), 10LL);
v7 = (std::ostream *)std::ostream::put(v5, v6);
std::ostream::flush(v7);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, " Active allocations: ", 22LL);
v8 = (std::ostream *)std::ostream::_M_insert<unsigned long>(&std::cout, v20);
v9 = std::ios::widen((char *)v8 + *(_QWORD *)(*(_QWORD *)v8 - 24LL), 10LL);
v10 = (std::ostream *)std::ostream::put(v8, v9);
std::ostream::flush(v10);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, " Peak usage: ", 14LL);
v11 = (std::ostream *)std::ostream::_M_insert<unsigned long>(&std::cout, v19);
std::__ostream_insert<char,std::char_traits<char>>(v11, " bytes", 6LL);
v12 = std::ios::widen((char *)v11 + *(_QWORD *)(*(_QWORD *)v11 - 24LL), 10LL);
v13 = (std::ostream *)std::ostream::put(v11, v12);
std::ostream::flush(v13);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, " Fragmentation: ", 17LL);
Fragmentation = HeapGetFragmentation();
v15 = (std::ostream *)std::ostream::_M_insert<double>(&std::cout, (float)(Fragmentation * 100.0));
std::__ostream_insert<char,std::char_traits<char>>(v15, "%", 1LL);
v16 = std::ios::widen((char *)v15 + *(_QWORD *)(*(_QWORD *)v15 - 24LL), 10LL);
v17 = (std::ostream *)std::ostream::put(v15, v16);
return std::ostream::flush(v17);
}
| print_memory_stats:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
XOR EAX,EAX
LEA R12,[RSP + 0x20]
MOV qword ptr [R12],RAX
LEA R13,[RSP + 0x18]
MOV qword ptr [R13],RAX
LEA R15,[RSP + 0x10]
MOV qword ptr [R15],RAX
LEA R14,[RSP + 0x8]
MOV qword ptr [R14],RAX
MOV RDI,R12
MOV RSI,R13
MOV RDX,R15
MOV RCX,R14
CALL 0x00102dc4
MOV RBX,qword ptr [0x00104fc8]
LEA RSI,[0x103008]
MOV EDX,0xd
MOV RDI,RBX
CALL 0x001010f0
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x001010c0
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101090
LEA RSI,[0x103016]
MOV EDX,0xd
MOV RDI,RBX
CALL 0x001010f0
MOV RSI,qword ptr [R12]
MOV RDI,RBX
CALL 0x00101080
MOV RBP,RAX
LEA R12,[0x103024]
MOV EDX,0x6
MOV RDI,RAX
MOV RSI,R12
CALL 0x001010f0
MOV RAX,qword ptr [RBP]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBP
MOV ESI,0xa
CALL 0x001010c0
MOVSX ESI,AL
MOV RDI,RBP
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101090
LEA RSI,[0x10302b]
MOV EDX,0x9
MOV RDI,RBX
CALL 0x001010f0
MOV RSI,qword ptr [R13]
MOV RDI,RBX
CALL 0x00101080
MOV R13,RAX
MOV EDX,0x6
MOV RDI,RAX
MOV RSI,R12
CALL 0x001010f0
MOV RAX,qword ptr [R13]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R13
MOV ESI,0xa
CALL 0x001010c0
MOVSX ESI,AL
MOV RDI,R13
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101090
LEA RSI,[0x103035]
MOV EDX,0x16
MOV RDI,RBX
CALL 0x001010f0
MOV RSI,qword ptr [R15]
MOV RDI,RBX
CALL 0x00101080
MOV R15,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R15
MOV ESI,0xa
CALL 0x001010c0
MOVSX ESI,AL
MOV RDI,R15
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101090
LEA RSI,[0x10304c]
MOV EDX,0xe
MOV RDI,RBX
CALL 0x001010f0
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x00101080
MOV R14,RAX
MOV EDX,0x6
MOV RDI,RAX
MOV RSI,R12
CALL 0x001010f0
MOV RAX,qword ptr [R14]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R14
MOV ESI,0xa
CALL 0x001010c0
MOVSX ESI,AL
MOV RDI,R14
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101090
LEA RSI,[0x10305b]
MOV EDX,0x11
MOV RDI,RBX
CALL 0x001010f0
CALL 0x00102e63
MULSS XMM0,dword ptr [0x00103004]
CVTSS2SD XMM0,XMM0
MOV RDI,RBX
CALL 0x00101110
MOV RBX,RAX
LEA RSI,[0x10306d]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001010f0
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x001010c0
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101090
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* print_memory_stats() */
void print_memory_stats(void)
{
int *puVar1;
ostream *poVar2;
float fVar3;
int8 local_50;
int8 local_48;
int8 local_40;
int8 local_38;
local_38 = 0;
local_40 = 0;
local_48 = 0;
local_50 = 0;
HeapGetStats(&local_38,&local_40,&local_48,&local_50);
puVar1 = PTR_cout_00104fc8;
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00104fc8,"Memory stats:",0xd);
std::ios::widen((char)*(int8 *)(*(long *)puVar1 + -0x18) + (char)puVar1);
std::ostream::put((char)puVar1);
std::ostream::flush();
std::__ostream_insert<char,std::char_traits<char>>((ostream *)puVar1," Allocated: ",0xd);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)puVar1);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," bytes",6);
std::ios::widen((char)*(int8 *)(*(long *)poVar2 + -0x18) + (char)poVar2);
std::ostream::put((char)poVar2);
std::ostream::flush();
std::__ostream_insert<char,std::char_traits<char>>((ostream *)puVar1," Freed: ",9);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)puVar1);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," bytes",6);
std::ios::widen((char)*(int8 *)(*(long *)poVar2 + -0x18) + (char)poVar2);
std::ostream::put((char)poVar2);
std::ostream::flush();
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)puVar1," Active allocations: ",0x16);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)puVar1);
std::ios::widen((char)*(int8 *)(*(long *)poVar2 + -0x18) + (char)poVar2);
std::ostream::put((char)poVar2);
std::ostream::flush();
std::__ostream_insert<char,std::char_traits<char>>((ostream *)puVar1," Peak usage: ",0xe);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)puVar1);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," bytes",6);
std::ios::widen((char)*(int8 *)(*(long *)poVar2 + -0x18) + (char)poVar2);
std::ostream::put((char)poVar2);
std::ostream::flush();
std::__ostream_insert<char,std::char_traits<char>>((ostream *)puVar1," Fragmentation: ",0x11);
fVar3 = (float)HeapGetFragmentation();
poVar2 = std::ostream::_M_insert<double>((double)(fVar3 * _DAT_00103004));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"%",1);
std::ios::widen((char)*(int8 *)(*(long *)poVar2 + -0x18) + (char)poVar2);
std::ostream::put((char)poVar2);
std::ostream::flush();
return;
}
| |
52,538 | is_backtrace_needed | bluesky950520[P]quickjs/quickjs.c | static BOOL is_backtrace_needed(JSContext *ctx, JSValue obj)
{
JSObject *p;
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
return FALSE;
p = JS_VALUE_GET_OBJ(obj);
if (p->class_id != JS_CLASS_ERROR)
return FALSE;
if (find_own_property1(p, JS_ATOM_stack))
return FALSE;
return TRUE;
} | O0 | c | is_backtrace_needed:
subq $0x68, %rsp
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x20(%rsp), %rax
cmpl $-0x1, %eax
je 0x6c29a
movl $0x0, 0x2c(%rsp)
jmp 0x6c39a
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0x3, %eax
je 0x6c2bf
movl $0x0, 0x2c(%rsp)
jmp 0x6c39a
movq 0x8(%rsp), %rax
movq %rax, 0x58(%rsp)
movl $0x36, 0x54(%rsp)
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x48(%rsp)
movl 0x54(%rsp), %eax
movq 0x48(%rsp), %rcx
movl 0x20(%rcx), %ecx
andq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rdi
callq 0x5c5f0
xorl %ecx, %ecx
subq 0x30(%rsp), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %eax
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rdi
callq 0x2afc0
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x6c377
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
subq $0x1, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movl 0x4(%rax), %eax
cmpl 0x54(%rsp), %eax
sete %al
testb $0x1, %al
jne 0x6c356
jmp 0x6c362
movq 0x40(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x6c380
movq 0x40(%rsp), %rax
movl (%rax), %eax
andl $0x3ffffff, %eax # imm = 0x3FFFFFF
movl %eax, %eax
movq %rax, 0x30(%rsp)
jmp 0x6c31f
movq $0x0, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x6c392
movl $0x0, 0x2c(%rsp)
jmp 0x6c39a
movl $0x1, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
| is_backtrace_needed:
sub rsp, 68h
mov [rsp+68h+var_50], rsi
mov [rsp+68h+var_48], rdx
mov [rsp+68h+var_58], rdi
mov rax, [rsp+68h+var_48]
cmp eax, 0FFFFFFFFh
jz short loc_6C29A
mov [rsp+68h+var_3C], 0
jmp loc_6C39A
loc_6C29A:
mov rax, [rsp+68h+var_50]
mov [rsp+68h+var_60], rax
mov rax, [rsp+68h+var_60]
movzx eax, word ptr [rax+6]
cmp eax, 3
jz short loc_6C2BF
mov [rsp+68h+var_3C], 0
jmp loc_6C39A
loc_6C2BF:
mov rax, [rsp+68h+var_60]
mov [rsp+68h+var_10], rax
mov [rsp+68h+var_14], 36h ; '6'
mov rax, [rsp+68h+var_10]
mov rax, [rax+18h]
mov [rsp+68h+var_20], rax
mov eax, [rsp+68h+var_14]
mov rcx, [rsp+68h+var_20]
mov ecx, [rcx+20h]
and rax, rcx
mov [rsp+68h+var_38], rax
mov rdi, [rsp+68h+var_20]
call prop_hash_end
xor ecx, ecx
sub rcx, [rsp+68h+var_38]
sub rcx, 1
mov eax, [rax+rcx*4]
mov [rsp+68h+var_38], rax
mov rdi, [rsp+68h+var_20]
call get_shape_prop
mov [rsp+68h+var_30], rax
loc_6C31F:
cmp [rsp+68h+var_38], 0
jz short loc_6C377
mov rax, [rsp+68h+var_30]
mov rcx, [rsp+68h+var_38]
sub rcx, 1
shl rcx, 3
add rax, rcx
mov [rsp+68h+var_28], rax
mov rax, [rsp+68h+var_28]
mov eax, [rax+4]
cmp eax, [rsp+68h+var_14]
setz al
test al, 1
jnz short loc_6C356
jmp short loc_6C362
loc_6C356:
mov rax, [rsp+68h+var_28]
mov [rsp+68h+var_8], rax
jmp short loc_6C380
loc_6C362:
mov rax, [rsp+68h+var_28]
mov eax, [rax]
and eax, 3FFFFFFh
mov eax, eax
mov [rsp+68h+var_38], rax
jmp short loc_6C31F
loc_6C377:
mov [rsp+68h+var_8], 0
loc_6C380:
cmp [rsp+68h+var_8], 0
jz short loc_6C392
mov [rsp+68h+var_3C], 0
jmp short loc_6C39A
loc_6C392:
mov [rsp+68h+var_3C], 1
loc_6C39A:
mov eax, [rsp+68h+var_3C]
add rsp, 68h
retn
| _BOOL8 is_backtrace_needed(long long a1, long long a2, int a3)
{
long long v5; // [rsp+30h] [rbp-38h]
long long v6; // [rsp+30h] [rbp-38h]
long long shape_prop; // [rsp+38h] [rbp-30h]
_DWORD *v8; // [rsp+40h] [rbp-28h]
long long v9; // [rsp+48h] [rbp-20h]
long long v10; // [rsp+60h] [rbp-8h]
if ( a3 == -1 )
{
if ( *(_WORD *)(a2 + 6) == 3 )
{
v9 = *(_QWORD *)(a2 + 24);
v5 = *(_DWORD *)(v9 + 32) & 0x36LL;
v6 = *(unsigned int *)(prop_hash_end(v9) + 4 * (-v5 - 1));
shape_prop = get_shape_prop(v9);
while ( v6 )
{
v8 = (_DWORD *)(8 * (v6 - 1) + shape_prop);
if ( v8[1] == 54 )
{
v10 = 8 * (v6 - 1) + shape_prop;
return v10 == 0;
}
v6 = *v8 & 0x3FFFFFF;
}
v10 = 0LL;
return v10 == 0;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
| is_backtrace_needed:
SUB RSP,0x68
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x20]
CMP EAX,-0x1
JZ 0x0016c29a
MOV dword ptr [RSP + 0x2c],0x0
JMP 0x0016c39a
LAB_0016c29a:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0x3
JZ 0x0016c2bf
MOV dword ptr [RSP + 0x2c],0x0
JMP 0x0016c39a
LAB_0016c2bf:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x58],RAX
MOV dword ptr [RSP + 0x54],0x36
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x48],RAX
MOV EAX,dword ptr [RSP + 0x54]
MOV RCX,qword ptr [RSP + 0x48]
MOV ECX,dword ptr [RCX + 0x20]
AND RAX,RCX
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x0015c5f0
XOR ECX,ECX
SUB RCX,qword ptr [RSP + 0x30]
SUB RCX,0x1
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x0012afc0
MOV qword ptr [RSP + 0x38],RAX
LAB_0016c31f:
CMP qword ptr [RSP + 0x30],0x0
JZ 0x0016c377
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x30]
SUB RCX,0x1
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RSP + 0x54]
SETZ AL
TEST AL,0x1
JNZ 0x0016c356
JMP 0x0016c362
LAB_0016c356:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x0016c380
LAB_0016c362:
MOV RAX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RAX]
AND EAX,0x3ffffff
MOV EAX,EAX
MOV qword ptr [RSP + 0x30],RAX
JMP 0x0016c31f
LAB_0016c377:
MOV qword ptr [RSP + 0x60],0x0
LAB_0016c380:
CMP qword ptr [RSP + 0x60],0x0
JZ 0x0016c392
MOV dword ptr [RSP + 0x2c],0x0
JMP 0x0016c39a
LAB_0016c392:
MOV dword ptr [RSP + 0x2c],0x1
LAB_0016c39a:
MOV EAX,dword ptr [RSP + 0x2c]
ADD RSP,0x68
RET
|
int4 is_backtrace_needed(int8 param_1,long param_2,int param_3)
{
uint uVar1;
long lVar2;
long lVar3;
int4 local_3c;
ulong local_38;
uint *local_8;
if (param_3 == -1) {
if (*(short *)(param_2 + 6) == 3) {
lVar3 = *(long *)(param_2 + 0x18);
uVar1 = *(uint *)(lVar3 + 0x20);
lVar2 = prop_hash_end(lVar3);
uVar1 = *(uint *)(lVar2 + (-1 - (ulong)(uVar1 & 0x36)) * 4);
lVar3 = get_shape_prop(lVar3);
while (local_38 = (ulong)uVar1, local_38 != 0) {
local_8 = (uint *)(lVar3 + (local_38 - 1) * 8);
if (local_8[1] == 0x36) goto LAB_0016c380;
uVar1 = *local_8 & 0x3ffffff;
}
local_8 = (uint *)0x0;
LAB_0016c380:
if (local_8 == (uint *)0x0) {
local_3c = 1;
}
else {
local_3c = 0;
}
}
else {
local_3c = 0;
}
}
else {
local_3c = 0;
}
return local_3c;
}
| |
52,539 | ftxui::(anonymous namespace)::InputBase::MoveCursorColumn(int) | Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/input.cpp | void MoveCursorColumn(int columns) {
while (columns > 0) {
if (cursor_position() == (int)content().size() ||
content()[cursor_position()] == '\n') {
return;
}
columns -= GlyphWidth(content(), cursor_position());
cursor_position() = GlyphNext(content(), cursor_position());
}
} | O3 | cpp | ftxui::(anonymous namespace)::InputBase::MoveCursorColumn(int):
testl %esi, %esi
jle 0x2be36
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x28(%rdi), %r15
addq $0xf8, %r14
movq %r14, %rdi
callq 0x2c5ba
movl (%rax), %ebp
movq %r15, %rdi
callq 0x2c188
cmpl 0x8(%rax), %ebp
je 0x2be28
movq %r15, %rdi
callq 0x2c188
movq %rax, %r12
movq %r14, %rdi
callq 0x2c5ba
movslq (%rax), %rax
movq (%r12), %rcx
cmpb $0xa, (%rcx,%rax)
je 0x2be28
movq %r15, %rdi
callq 0x2c188
movq %rax, %r12
movq %r14, %rdi
callq 0x2c5ba
movslq (%rax), %rsi
movq %r12, %rdi
callq 0x2bccf
movq %rax, %r12
movq %r15, %rdi
callq 0x2c188
movq %rax, %r13
movq %r14, %rdi
callq 0x2c5ba
movslq (%rax), %rsi
movq %r13, %rdi
callq 0x3abbc
movq %rax, %r13
movq %r14, %rdi
callq 0x2c5ba
movl %r13d, (%rax)
subl %r12d, %ebx
jg 0x2bd9b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5ftxui12_GLOBAL__N_19InputBase16MoveCursorColumnEi:
test esi, esi
jle locret_2BE36
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, esi
mov r14, rdi
lea r15, [rdi+28h]
add r14, 0F8h
loc_2BD9B:
mov rdi, r14
call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void)
mov ebp, [rax]
mov rdi, r15
call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void)
cmp ebp, [rax+8]
jz short loc_2BE28
mov rdi, r15
call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void)
mov r12, rax
mov rdi, r14
call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void)
movsxd rax, dword ptr [rax]
mov rcx, [r12]
cmp byte ptr [rcx+rax], 0Ah
jz short loc_2BE28
mov rdi, r15
call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void)
mov r12, rax
mov rdi, r14
call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void)
movsxd rsi, dword ptr [rax]
mov rdi, r12
call _ZN5ftxui12_GLOBAL__N_110GlyphWidthERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::`anonymous namespace'::GlyphWidth(std::string const&,ulong)
mov r12, rax
mov rdi, r15
call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void)
mov r13, rax
mov rdi, r14
call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void)
movsxd rsi, dword ptr [rax]
mov rdi, r13
call _ZN5ftxui9GlyphNextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::GlyphNext(std::string const&,ulong)
mov r13, rax
mov rdi, r14
call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void)
mov [rax], r13d
sub ebx, r12d
jg loc_2BD9B
loc_2BE28:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_2BE36:
retn
| long long ftxui::`anonymous namespace'::InputBase::MoveCursorColumn(
ftxui::_anonymous_namespace_::InputBase *this,
int a2)
{
int v2; // ebx
char *v3; // r15
char *v4; // r14
int v5; // ebp
long long result; // rax
_QWORD *v7; // r12
long long v8; // r12
int *v9; // rax
long long v10; // r13
int *v11; // rax
bool v12; // cc
if ( a2 > 0 )
{
v2 = a2;
v3 = (char *)this + 40;
v4 = (char *)this + 248;
do
{
v5 = *(_DWORD *)ftxui::Ref<int>::Address(v4);
result = ftxui::Ref<std::string>::Address(v3);
if ( v5 == *(_DWORD *)(result + 8) )
break;
v7 = (_QWORD *)ftxui::Ref<std::string>::Address(v3);
result = *(int *)ftxui::Ref<int>::Address(v4);
if ( *(_BYTE *)(*v7 + result) == 10 )
break;
v8 = ftxui::Ref<std::string>::Address(v3);
v9 = (int *)ftxui::Ref<int>::Address(v4);
LODWORD(v8) = ftxui::`anonymous namespace'::GlyphWidth(v8, *v9);
v10 = ftxui::Ref<std::string>::Address(v3);
v11 = (int *)ftxui::Ref<int>::Address(v4);
LODWORD(v10) = ftxui::GlyphNext(v10, *v11);
result = ftxui::Ref<int>::Address(v4);
*(_DWORD *)result = v10;
v12 = v2 <= (int)v8;
v2 -= v8;
}
while ( !v12 );
}
return result;
}
| MoveCursorColumn:
TEST ESI,ESI
JLE 0x0012be36
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
LEA R15,[RDI + 0x28]
ADD R14,0xf8
LAB_0012bd9b:
MOV RDI,R14
CALL 0x0012c5ba
MOV EBP,dword ptr [RAX]
MOV RDI,R15
CALL 0x0012c188
CMP EBP,dword ptr [RAX + 0x8]
JZ 0x0012be28
MOV RDI,R15
CALL 0x0012c188
MOV R12,RAX
MOV RDI,R14
CALL 0x0012c5ba
MOVSXD RAX,dword ptr [RAX]
MOV RCX,qword ptr [R12]
CMP byte ptr [RCX + RAX*0x1],0xa
JZ 0x0012be28
MOV RDI,R15
CALL 0x0012c188
MOV R12,RAX
MOV RDI,R14
CALL 0x0012c5ba
MOVSXD RSI,dword ptr [RAX]
MOV RDI,R12
CALL 0x0012bccf
MOV R12,RAX
MOV RDI,R15
CALL 0x0012c188
MOV R13,RAX
MOV RDI,R14
CALL 0x0012c5ba
MOVSXD RSI,dword ptr [RAX]
MOV RDI,R13
CALL 0x0013abbc
MOV R13,RAX
MOV RDI,R14
CALL 0x0012c5ba
MOV dword ptr [RAX],R13D
SUB EBX,R12D
JG 0x0012bd9b
LAB_0012be28:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_0012be36:
RET
|
/* ftxui::(anonymous namespace)::InputBase::MoveCursorColumn(int) */
void __thiscall
ftxui::(anonymous_namespace)::InputBase::MoveCursorColumn(InputBase *this,int param_1)
{
Ref<std::__cxx11::string> *this_00;
bool bVar1;
int iVar2;
int4 uVar3;
int *piVar4;
long lVar5;
long *plVar6;
string *psVar7;
int4 *puVar8;
int iVar9;
Ref<int> *this_01;
if (0 < param_1) {
this_00 = (Ref<std::__cxx11::string> *)(this + 0x28);
this_01 = (Ref<int> *)(this + 0xf8);
do {
piVar4 = (int *)Ref<int>::Address(this_01);
iVar2 = *piVar4;
lVar5 = Ref<std::__cxx11::string>::Address(this_00);
if (iVar2 == *(int *)(lVar5 + 8)) {
return;
}
plVar6 = (long *)Ref<std::__cxx11::string>::Address(this_00);
piVar4 = (int *)Ref<int>::Address(this_01);
if (*(char *)(*plVar6 + (long)*piVar4) == '\n') {
return;
}
psVar7 = (string *)Ref<std::__cxx11::string>::Address(this_00);
piVar4 = (int *)Ref<int>::Address(this_01);
iVar2 = GlyphWidth(psVar7,(long)*piVar4);
psVar7 = (string *)Ref<std::__cxx11::string>::Address(this_00);
piVar4 = (int *)Ref<int>::Address(this_01);
uVar3 = GlyphNext(psVar7,(long)*piVar4);
puVar8 = (int4 *)Ref<int>::Address(this_01);
*puVar8 = uVar3;
iVar9 = param_1 - iVar2;
bVar1 = iVar2 <= param_1;
param_1 = iVar9;
} while (iVar9 != 0 && bVar1);
}
return;
}
| |
52,540 | OpenSubdiv::v3_6_0::Bfr::Surface<float>::ApplyStencilFromMesh(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp | void
Surface<REAL>::ApplyStencilFromMesh(REAL const stencil[],
REAL const meshPoints[], PointDescriptor const & pointDesc,
REAL result[]) const {
//
// Assemble parameters of the point combination operation and apply:
//
typedef points::Combine1<REAL> PointCombiner;
typename PointCombiner::Parameters combParams;
combParams.pointData = meshPoints;
combParams.pointSize = pointDesc.size;
combParams.pointStride = pointDesc.stride;
combParams.srcCount = GetNumControlPoints();
combParams.srcIndices = _data.getCVIndices();
combParams.resultCount = 1;
combParams.resultArray = &result;
combParams.weightArray = &stencil;
PointCombiner::Apply(combParams);
} | O1 | cpp | OpenSubdiv::v3_6_0::Bfr::Surface<float>::ApplyStencilFromMesh(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*) const:
subq $0x48, %rsp
leaq 0x10(%rsp), %r9
movq %rsi, (%r9)
leaq 0x8(%rsp), %rsi
movq %r8, (%rsi)
leaq 0x18(%rsp), %rax
movq %rdx, (%rax)
movl (%rcx), %edx
movl %edx, 0x8(%rax)
movl 0x4(%rcx), %ecx
movl %ecx, 0xc(%rax)
movl 0x8(%rdi), %ecx
movl %ecx, 0x18(%rax)
movq (%rdi), %rcx
movq %rcx, 0x10(%rax)
movl $0x1, 0x1c(%rax)
movq %rsi, 0x20(%rax)
movq %r9, 0x28(%rax)
movq %rax, %rdi
callq 0x39960
addq $0x48, %rsp
retq
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE20ApplyStencilFromMeshEPKdS5_RKNS3_15PointDescriptorEPd:
sub rsp, 48h
lea r9, [rsp+48h+var_38]
mov [r9], rsi
lea rsi, [rsp+48h+var_40]
mov [rsi], r8
lea rax, [rsp+48h+var_30]
mov [rax], rdx
mov edx, [rcx]
mov [rax+8], edx
mov ecx, [rcx+4]
mov [rax+0Ch], ecx
mov ecx, [rdi+8]
mov [rax+18h], ecx
mov rcx, [rdi]
mov [rax+10h], rcx
mov dword ptr [rax+1Ch], 1
mov [rax+20h], rsi
mov [rax+28h], r9
mov rdi, rax
call __ZN10OpenSubdiv6v3_6_03Bfr6points8Combine1IdE5ApplyERKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::Combine1<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&)
add rsp, 48h
retn
| long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::ApplyStencilFromMesh(
long long *a1,
long long a2,
long long a3,
int *a4,
long long a5)
{
long long v6; // [rsp+8h] [rbp-40h] BYREF
long long v7; // [rsp+10h] [rbp-38h] BYREF
long long v8; // [rsp+18h] [rbp-30h] BYREF
int v9; // [rsp+20h] [rbp-28h]
int v10; // [rsp+24h] [rbp-24h]
long long v11; // [rsp+28h] [rbp-20h]
int v12; // [rsp+30h] [rbp-18h]
int v13; // [rsp+34h] [rbp-14h]
long long *v14; // [rsp+38h] [rbp-10h]
long long *v15; // [rsp+40h] [rbp-8h]
v7 = a2;
v6 = a5;
v8 = a3;
v9 = *a4;
v10 = a4[1];
v12 = *((_DWORD *)a1 + 2);
v11 = *a1;
v13 = 1;
v14 = &v6;
v15 = &v7;
return OpenSubdiv::v3_6_0::Bfr::points::Combine1<double>::Apply(&v8);
}
| ApplyStencilFromMesh:
SUB RSP,0x48
LEA R9,[RSP + 0x10]
MOV qword ptr [R9],RSI
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],R8
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX],RDX
MOV EDX,dword ptr [RCX]
MOV dword ptr [RAX + 0x8],EDX
MOV ECX,dword ptr [RCX + 0x4]
MOV dword ptr [RAX + 0xc],ECX
MOV ECX,dword ptr [RDI + 0x8]
MOV dword ptr [RAX + 0x18],ECX
MOV RCX,qword ptr [RDI]
MOV qword ptr [RAX + 0x10],RCX
MOV dword ptr [RAX + 0x1c],0x1
MOV qword ptr [RAX + 0x20],RSI
MOV qword ptr [RAX + 0x28],R9
MOV RDI,RAX
CALL 0x00139960
ADD RSP,0x48
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Surface<double>::ApplyStencilFromMesh(double const*, double const*,
OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*) const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Surface<double>::ApplyStencilFromMesh
(Surface<double> *this,double *param_1,double *param_2,PointDescriptor *param_3,
double *param_4)
{
double *local_40;
double *local_38;
double *local_30;
int4 local_28;
int4 local_24;
int8 local_20;
int4 local_18;
int4 local_14;
double **local_10;
double **local_8;
local_8 = &local_38;
local_10 = &local_40;
local_28 = *(int4 *)param_3;
local_24 = *(int4 *)(param_3 + 4);
local_18 = *(int4 *)(this + 8);
local_20 = *(int8 *)this;
local_14 = 1;
local_40 = param_4;
local_38 = param_1;
local_30 = param_2;
points::Combine1<double>::Apply((CommonCombinationParameters *)&local_30);
return;
}
| |
52,541 | OpenSubdiv::v3_6_0::Bfr::Surface<float>::ApplyStencilFromMesh(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp | void
Surface<REAL>::ApplyStencilFromMesh(REAL const stencil[],
REAL const meshPoints[], PointDescriptor const & pointDesc,
REAL result[]) const {
//
// Assemble parameters of the point combination operation and apply:
//
typedef points::Combine1<REAL> PointCombiner;
typename PointCombiner::Parameters combParams;
combParams.pointData = meshPoints;
combParams.pointSize = pointDesc.size;
combParams.pointStride = pointDesc.stride;
combParams.srcCount = GetNumControlPoints();
combParams.srcIndices = _data.getCVIndices();
combParams.resultCount = 1;
combParams.resultArray = &result;
combParams.weightArray = &stencil;
PointCombiner::Apply(combParams);
} | O2 | cpp | OpenSubdiv::v3_6_0::Bfr::Surface<float>::ApplyStencilFromMesh(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*) const:
subq $0x48, %rsp
leaq 0x10(%rsp), %r9
movq %rsi, (%r9)
leaq 0x8(%rsp), %rsi
movq %r8, (%rsi)
leaq 0x18(%rsp), %rax
movq %rdx, (%rax)
movq (%rcx), %rcx
movq %rcx, 0x8(%rax)
movl 0x8(%rdi), %ecx
movl %ecx, 0x18(%rax)
movq (%rdi), %rcx
movq %rcx, 0x10(%rax)
movl $0x1, 0x1c(%rax)
movq %rsi, 0x20(%rax)
movq %r9, 0x28(%rax)
movq %rax, %rdi
callq 0x51950
addq $0x48, %rsp
retq
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE20ApplyStencilFromMeshEPKdS5_RKNS3_15PointDescriptorEPd:
sub rsp, 48h
lea r9, [rsp+48h+var_38]
mov [r9], rsi
lea rsi, [rsp+48h+var_40]
mov [rsi], r8
lea rax, [rsp+48h+var_30]
mov [rax], rdx
mov rcx, [rcx]
mov [rax+8], rcx
mov ecx, [rdi+8]
mov [rax+18h], ecx
mov rcx, [rdi]
mov [rax+10h], rcx
mov dword ptr [rax+1Ch], 1
mov [rax+20h], rsi
mov [rax+28h], r9
mov rdi, rax
call __ZN10OpenSubdiv6v3_6_03Bfr6points8Combine1IdE5ApplyERKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::Combine1<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&)
add rsp, 48h
retn
| long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::ApplyStencilFromMesh(
long long a1,
long long a2,
long long a3,
_QWORD *a4,
long long a5)
{
long long v6; // [rsp+8h] [rbp-40h] BYREF
long long v7; // [rsp+10h] [rbp-38h] BYREF
_QWORD v8[3]; // [rsp+18h] [rbp-30h] BYREF
int v9; // [rsp+30h] [rbp-18h]
int v10; // [rsp+34h] [rbp-14h]
long long *v11; // [rsp+38h] [rbp-10h]
long long *v12; // [rsp+40h] [rbp-8h]
v7 = a2;
v6 = a5;
v8[0] = a3;
v8[1] = *a4;
v9 = *(_DWORD *)(a1 + 8);
v8[2] = *(_QWORD *)a1;
v10 = 1;
v11 = &v6;
v12 = &v7;
return OpenSubdiv::v3_6_0::Bfr::points::Combine1<double>::Apply(v8);
}
| ApplyStencilFromMesh:
SUB RSP,0x48
LEA R9,[RSP + 0x10]
MOV qword ptr [R9],RSI
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],R8
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX]
MOV qword ptr [RAX + 0x8],RCX
MOV ECX,dword ptr [RDI + 0x8]
MOV dword ptr [RAX + 0x18],ECX
MOV RCX,qword ptr [RDI]
MOV qword ptr [RAX + 0x10],RCX
MOV dword ptr [RAX + 0x1c],0x1
MOV qword ptr [RAX + 0x20],RSI
MOV qword ptr [RAX + 0x28],R9
MOV RDI,RAX
CALL 0x00151950
ADD RSP,0x48
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Surface<double>::ApplyStencilFromMesh(double const*, double const*,
OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*) const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Surface<double>::ApplyStencilFromMesh
(Surface<double> *this,double *param_1,double *param_2,PointDescriptor *param_3,
double *param_4)
{
double *local_40;
double *local_38;
double *local_30;
int8 local_28;
int8 local_20;
int4 local_18;
int4 local_14;
double **local_10;
double **local_8;
local_8 = &local_38;
local_10 = &local_40;
local_28 = *(int8 *)param_3;
local_18 = *(int4 *)(this + 8);
local_20 = *(int8 *)this;
local_14 = 1;
local_40 = param_4;
local_38 = param_1;
local_30 = param_2;
points::Combine1<double>::Apply((CommonCombinationParameters *)&local_30);
return;
}
| |
52,542 | translog_scanner_eol | eloqsql/storage/maria/ma_loghandler.c | static my_bool translog_scanner_eol(TRANSLOG_SCANNER_DATA *scanner)
{
DBUG_ENTER("translog_scanner_eol");
DBUG_PRINT("enter",
("Horizon: " LSN_FMT " Current: (%u, 0x%x+0x%x=0x%x)",
LSN_IN_PARTS(scanner->horizon),
LSN_IN_PARTS(scanner->page_addr),
(uint) scanner->page_offset,
(uint) (LSN_OFFSET(scanner->page_addr) + scanner->page_offset)));
if (scanner->horizon > (scanner->page_addr +
scanner->page_offset))
{
DBUG_PRINT("info", ("Horizon is not reached"));
DBUG_RETURN(0);
}
if (scanner->fixed_horizon)
{
DBUG_PRINT("info", ("Horizon is fixed and reached"));
DBUG_RETURN(1);
}
scanner->horizon= translog_get_horizon();
DBUG_PRINT("info",
("Horizon is re-read, EOL: %d",
scanner->horizon <= (scanner->page_addr +
scanner->page_offset)));
DBUG_RETURN(scanner->horizon <= (scanner->page_addr +
scanner->page_offset));
} | O3 | c | translog_scanner_eol:
movl 0x2028(%rdi), %eax
addq 0x2000(%rdi), %rax
cmpq %rax, 0x2008(%rdi)
jle 0x70c4c
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x1, %al
cmpb $0x0, 0x202c(%rdi)
jne 0x70c7f
callq 0x6cab4
movq %rax, 0x2008(%rbx)
movl 0x2028(%rbx), %ecx
addq 0x2000(%rbx), %rcx
cmpq %rcx, %rax
setle %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| translog_scanner_eol:
mov eax, [rdi+2028h]
add rax, [rdi+2000h]
cmp [rdi+2008h], rax
jle short loc_70C4C
xor eax, eax
retn
loc_70C4C:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov al, 1
cmp byte ptr [rdi+202Ch], 0
jnz short loc_70C7F
call translog_get_horizon
mov [rbx+2008h], rax
mov ecx, [rbx+2028h]
add rcx, [rbx+2000h]
cmp rax, rcx
setle al
loc_70C7F:
add rsp, 8
pop rbx
pop rbp
retn
| bool translog_scanner_eol(long long a1)
{
bool result; // al
long long horizon; // rax
if ( *(_QWORD *)(a1 + 8200) > (signed long long)(*(_QWORD *)(a1 + 0x2000) + *(unsigned int *)(a1 + 8232)) )
return 0;
result = 1;
if ( !*(_BYTE *)(a1 + 8236) )
{
horizon = translog_get_horizon();
*(_QWORD *)(a1 + 8200) = horizon;
return horizon <= *(_QWORD *)(a1 + 0x2000) + *(unsigned int *)(a1 + 8232);
}
return result;
}
| translog_scanner_eol:
MOV EAX,dword ptr [RDI + 0x2028]
ADD RAX,qword ptr [RDI + 0x2000]
CMP qword ptr [RDI + 0x2008],RAX
JLE 0x00170c4c
XOR EAX,EAX
RET
LAB_00170c4c:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV AL,0x1
CMP byte ptr [RDI + 0x202c],0x0
JNZ 0x00170c7f
CALL 0x0016cab4
MOV qword ptr [RBX + 0x2008],RAX
MOV ECX,dword ptr [RBX + 0x2028]
ADD RCX,qword ptr [RBX + 0x2000]
CMP RAX,RCX
SETLE AL
LAB_00170c7f:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
bool translog_scanner_eol(long param_1)
{
bool bVar1;
long lVar2;
if ((long)((ulong)*(uint *)(param_1 + 0x2028) + *(long *)(param_1 + 0x2000)) <
*(long *)(param_1 + 0x2008)) {
return false;
}
bVar1 = true;
if (*(char *)(param_1 + 0x202c) == '\0') {
lVar2 = translog_get_horizon();
*(long *)(param_1 + 0x2008) = lVar2;
bVar1 = lVar2 <= (long)((ulong)*(uint *)(param_1 + 0x2028) + *(long *)(param_1 + 0x2000));
}
return bVar1;
}
| |
52,543 | mi_ft_del | eloqsql/storage/myisam/ft_update.c | int _mi_ft_del(MI_INFO *info, uint keynr, uchar *keybuf, const uchar *record,
my_off_t pos)
{
int error= -1;
FT_WORD *wlist;
DBUG_ENTER("_mi_ft_del");
DBUG_PRINT("enter",("keynr: %d",keynr));
if ((wlist=_mi_ft_parserecord(info, keynr, record, &info->ft_memroot)))
error=_mi_ft_erase(info,keynr,keybuf,wlist,pos);
free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE));
DBUG_PRINT("exit",("Return: %d",error));
DBUG_RETURN(error);
} | O3 | c | mi_ft_del:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %r13
leaq 0x90(%rdi), %rbx
movq %rcx, %rdx
movq %rbx, %rcx
callq 0x7423f
testq %rax, %rax
je 0x747de
movq %r13, %rdi
movl %r12d, %esi
movq %r15, %rdx
movq %rax, %rcx
movq %r14, %r8
callq 0x7462c
movl %eax, %r14d
jmp 0x747e4
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movl $0x2, %esi
movq %rbx, %rdi
callq 0x9ceeb
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_ft_del:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rdx
mov r12d, esi
mov r13, rdi
lea rbx, [rdi+90h]
mov rdx, rcx
mov rcx, rbx
call _mi_ft_parserecord
test rax, rax
jz short loc_747DE
mov rdi, r13
mov esi, r12d
mov rdx, r15
mov rcx, rax
mov r8, r14
call _mi_ft_erase
mov r14d, eax
jmp short loc_747E4
loc_747DE:
mov r14d, 0FFFFFFFFh
loc_747E4:
mov esi, 2
mov rdi, rbx
call free_root
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_ft_del(_QWORD *a1, unsigned int a2, long long a3, long long a4, long long a5, __m128i a6)
{
_QWORD *v8; // rax
unsigned int v9; // r14d
v8 = mi_ft_parserecord(a1, a2, a4, (long long)(a1 + 18));
if ( v8 )
v9 = mi_ft_erase((long long)a1, a2, a3, v8, a5, a6);
else
v9 = -1;
free_root(a1 + 18, 2LL);
return v9;
}
| _mi_ft_del:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RDX
MOV R12D,ESI
MOV R13,RDI
LEA RBX,[RDI + 0x90]
MOV RDX,RCX
MOV RCX,RBX
CALL 0x0017423f
TEST RAX,RAX
JZ 0x001747de
MOV RDI,R13
MOV ESI,R12D
MOV RDX,R15
MOV RCX,RAX
MOV R8,R14
CALL 0x0017462c
MOV R14D,EAX
JMP 0x001747e4
LAB_001747de:
MOV R14D,0xffffffff
LAB_001747e4:
MOV ESI,0x2
MOV RDI,RBX
CALL 0x0019ceeb
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
_mi_ft_del(long param_1,ulong param_2,int8 param_3,int8 param_4,int8 param_5)
{
int4 uVar1;
long lVar2;
lVar2 = _mi_ft_parserecord(param_1,param_2,param_4,param_1 + 0x90);
if (lVar2 == 0) {
uVar1 = 0xffffffff;
}
else {
uVar1 = _mi_ft_erase(param_1,param_2 & 0xffffffff,param_3,lVar2,param_5);
}
free_root(param_1 + 0x90,2);
return uVar1;
}
| |
52,544 | ma_pvio_tls_compare_fp | eloqsql/libmariadb/libmariadb/ma_tls.c | static my_bool ma_pvio_tls_compare_fp(const char *cert_fp,
unsigned int cert_fp_len,
const char *fp, unsigned int fp_len)
{
char *p= (char *)fp,
*c;
/* check length */
if (cert_fp_len != 20)
return 1;
/* We support two formats:
2 digits hex numbers, separated by colons (length=59)
20 * 2 digits hex numbers without separators (length = 40)
*/
if (fp_len != (strchr(fp, ':') ? 59 : 40))
return 1;
for(c= (char *)cert_fp; c < cert_fp + cert_fp_len; c++)
{
signed char d1, d2;
if (*p == ':')
p++;
if (p - fp > (int)fp_len -1)
return 1;
if ((d1 = ma_hex2int(*p)) == - 1 ||
(d2 = ma_hex2int(*(p+1))) == -1 ||
(char)(d1 * 16 + d2) != *c)
return 1;
p+= 2;
}
return 0;
} | O3 | c | ma_pvio_tls_compare_fp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movb $0x1, %bl
cmpl $0x14, %esi
jne 0x1daaf
movl %ecx, %r14d
movq %rdx, %r15
movq %rdi, %r12
movq %rdx, %rdi
movl $0x3a, %esi
callq 0x13180
testq %rax, %rax
movl $0x28, %eax
movl $0x3b, %ecx
cmovel %eax, %ecx
cmpl %r14d, %ecx
jne 0x1daaf
decl %r14d
xorl %eax, %eax
movq %r15, %rdx
xorl %ecx, %ecx
cmpb $0x3a, (%rdx)
sete %cl
addq %rdx, %rcx
movq %rcx, %rdx
subq %r15, %rdx
cmpq %r14, %rdx
jg 0x1daaf
movb (%rcx), %sil
leal -0x30(%rsi), %edx
cmpb $0xa, %dl
jb 0x1da62
leal -0x41(%rsi), %edx
cmpb $0x5, %dl
ja 0x1da54
addb $-0x37, %sil
jmp 0x1da60
leal -0x67(%rsi), %edx
cmpb $-0x6, %dl
jb 0x1daaf
addb $-0x57, %sil
movl %esi, %edx
movb 0x1(%rcx), %sil
leal -0x30(%rsi), %edi
cmpb $0xa, %dil
jb 0x1da8d
leal -0x41(%rsi), %edi
cmpb $0x5, %dil
ja 0x1da7e
addb $-0x37, %sil
jmp 0x1da8b
leal -0x67(%rsi), %edi
cmpb $-0x6, %dil
jb 0x1daaf
addb $-0x57, %sil
movl %esi, %edi
shlb $0x4, %dl
addb %dil, %dl
cmpb (%r12,%rax), %dl
jne 0x1daaf
addq $0x2, %rcx
incq %rax
movq %rcx, %rdx
cmpq $0x14, %rax
jne 0x1da25
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| ma_pvio_tls_compare_fp:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov bl, 1
cmp esi, 14h
jnz loc_1DAAF
mov r14d, ecx
mov r15, rdx
mov r12, rdi
mov rdi, rdx
mov esi, 3Ah ; ':'
call _strchr
test rax, rax
mov eax, 28h ; '('
mov ecx, 3Bh ; ';'
cmovz ecx, eax
cmp ecx, r14d
jnz loc_1DAAF
dec r14d
xor eax, eax
mov rdx, r15
loc_1DA25:
xor ecx, ecx
cmp byte ptr [rdx], 3Ah ; ':'
setz cl
add rcx, rdx
mov rdx, rcx
sub rdx, r15
cmp rdx, r14
jg short loc_1DAAF
mov sil, [rcx]
lea edx, [rsi-30h]
cmp dl, 0Ah
jb short loc_1DA62
lea edx, [rsi-41h]
cmp dl, 5
ja short loc_1DA54
add sil, 0C9h
jmp short loc_1DA60
loc_1DA54:
lea edx, [rsi-67h]
cmp dl, 0FAh
jb short loc_1DAAF
add sil, 0A9h
loc_1DA60:
mov edx, esi
loc_1DA62:
mov sil, [rcx+1]
lea edi, [rsi-30h]
cmp dil, 0Ah
jb short loc_1DA8D
lea edi, [rsi-41h]
cmp dil, 5
ja short loc_1DA7E
add sil, 0C9h
jmp short loc_1DA8B
loc_1DA7E:
lea edi, [rsi-67h]
cmp dil, 0FAh
jb short loc_1DAAF
add sil, 0A9h
loc_1DA8B:
mov edi, esi
loc_1DA8D:
shl dl, 4
add dl, dil
cmp dl, [r12+rax]
jnz short loc_1DAAF
add rcx, 2
inc rax
mov rdx, rcx
cmp rax, 14h
jnz loc_1DA25
xor ebx, ebx
loc_1DAAF:
mov eax, ebx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ma_pvio_tls_compare_fp(long long a1, int a2, _BYTE *a3, int a4)
{
unsigned int v4; // ebx
long long v8; // rax
int v9; // ecx
long long v10; // r14
long long v11; // rax
_BYTE *v12; // rdx
char *v13; // rcx
char v14; // si
unsigned __int8 v15; // dl
unsigned __int8 v16; // si
char v17; // si
char v18; // di
char v19; // si
LOBYTE(v4) = 1;
if ( a2 == 20 )
{
v8 = strchr(a3, 58LL);
v9 = 59;
if ( !v8 )
v9 = 40;
if ( v9 == a4 )
{
v10 = (unsigned int)(a4 - 1);
v11 = 0LL;
v12 = a3;
while ( 1 )
{
v13 = &v12[*v12 == 58];
if ( v13 - a3 > v10 )
break;
v14 = *v13;
v15 = *v13 - 48;
if ( v15 >= 0xAu )
{
if ( (unsigned __int8)(v14 - 65) > 5u )
{
if ( (unsigned __int8)(v14 - 103) < 0xFAu )
return v4;
v16 = v14 - 87;
}
else
{
v16 = v14 - 55;
}
v15 = v16;
}
v17 = v13[1];
v18 = v17 - 48;
if ( (unsigned __int8)(v17 - 48) >= 0xAu )
{
if ( (unsigned __int8)(v17 - 65) > 5u )
{
if ( (unsigned __int8)(v17 - 103) < 0xFAu )
return v4;
v19 = v17 - 87;
}
else
{
v19 = v17 - 55;
}
v18 = v19;
}
if ( v18 + 16 * v15 != *(_BYTE *)(a1 + v11) )
break;
++v11;
v12 = v13 + 2;
if ( v11 == 20 )
return 0;
}
}
}
return v4;
}
| ma_pvio_tls_compare_fp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV BL,0x1
CMP ESI,0x14
JNZ 0x0011daaf
MOV R14D,ECX
MOV R15,RDX
MOV R12,RDI
MOV RDI,RDX
MOV ESI,0x3a
CALL 0x00113180
TEST RAX,RAX
MOV EAX,0x28
MOV ECX,0x3b
CMOVZ ECX,EAX
CMP ECX,R14D
JNZ 0x0011daaf
DEC R14D
XOR EAX,EAX
MOV RDX,R15
LAB_0011da25:
XOR ECX,ECX
CMP byte ptr [RDX],0x3a
SETZ CL
ADD RCX,RDX
MOV RDX,RCX
SUB RDX,R15
CMP RDX,R14
JG 0x0011daaf
MOV SIL,byte ptr [RCX]
LEA EDX,[RSI + -0x30]
CMP DL,0xa
JC 0x0011da62
LEA EDX,[RSI + -0x41]
CMP DL,0x5
JA 0x0011da54
ADD SIL,0xc9
JMP 0x0011da60
LAB_0011da54:
LEA EDX,[RSI + -0x67]
CMP DL,0xfa
JC 0x0011daaf
ADD SIL,0xa9
LAB_0011da60:
MOV EDX,ESI
LAB_0011da62:
MOV SIL,byte ptr [RCX + 0x1]
LEA EDI,[RSI + -0x30]
CMP DIL,0xa
JC 0x0011da8d
LEA EDI,[RSI + -0x41]
CMP DIL,0x5
JA 0x0011da7e
ADD SIL,0xc9
JMP 0x0011da8b
LAB_0011da7e:
LEA EDI,[RSI + -0x67]
CMP DIL,0xfa
JC 0x0011daaf
ADD SIL,0xa9
LAB_0011da8b:
MOV EDI,ESI
LAB_0011da8d:
SHL DL,0x4
ADD DL,DIL
CMP DL,byte ptr [R12 + RAX*0x1]
JNZ 0x0011daaf
ADD RCX,0x2
INC RAX
MOV RDX,RCX
CMP RAX,0x14
JNZ 0x0011da25
XOR EBX,EBX
LAB_0011daaf:
MOV EAX,EBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
ulong ma_pvio_tls_compare_fp(long param_1,int param_2,char *param_3,int param_4)
{
char cVar1;
char *pcVar2;
long lVar3;
int iVar4;
int8 unaff_RBX;
ulong uVar5;
byte bVar6;
byte bVar7;
uVar5 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if (param_2 == 0x14) {
pcVar2 = strchr(param_3,0x3a);
iVar4 = 0x3b;
if (pcVar2 == (char *)0x0) {
iVar4 = 0x28;
}
if (iVar4 == param_4) {
lVar3 = 0;
pcVar2 = param_3;
do {
pcVar2 = pcVar2 + (*pcVar2 == ':');
if ((long)(ulong)(param_4 - 1) < (long)pcVar2 - (long)param_3) goto LAB_0011daaf;
cVar1 = *pcVar2;
bVar6 = cVar1 - 0x30;
if (9 < bVar6) {
if ((byte)(cVar1 + 0xbfU) < 6) {
bVar6 = cVar1 - 0x37;
}
else {
if ((byte)(cVar1 + 0x99U) < 0xfa) goto LAB_0011daaf;
bVar6 = cVar1 + 0xa9;
}
}
cVar1 = pcVar2[1];
bVar7 = cVar1 - 0x30;
if (9 < bVar7) {
if ((byte)(cVar1 + 0xbfU) < 6) {
bVar7 = cVar1 - 0x37;
}
else {
if ((byte)(cVar1 + 0x99U) < 0xfa) goto LAB_0011daaf;
bVar7 = cVar1 + 0xa9;
}
}
if ((byte)(bVar6 * '\x10' + bVar7) != *(char *)(param_1 + lVar3)) goto LAB_0011daaf;
pcVar2 = pcVar2 + 2;
lVar3 = lVar3 + 1;
} while (lVar3 != 0x14);
uVar5 = 0;
}
}
LAB_0011daaf:
return uVar5 & 0xffffffff;
}
| |
52,545 | mz_zip_extract_archive_file_to_heap_v2 | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | void *mz_zip_extract_archive_file_to_heap_v2(const char *pZip_filename,
const char *pArchive_name,
const char *pComment,
size_t *pSize, mz_uint flags,
mz_zip_error *pErr) {
mz_uint32 file_index;
mz_zip_archive zip_archive;
void *p = NULL;
if (pSize)
*pSize = 0;
if ((!pZip_filename) || (!pArchive_name)) {
if (pErr)
*pErr = MZ_ZIP_INVALID_PARAMETER;
return NULL;
}
mz_zip_zero_struct(&zip_archive);
if (!mz_zip_reader_init_file_v2(
&zip_archive, pZip_filename,
flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY, 0, 0)) {
if (pErr)
*pErr = zip_archive.m_last_error;
return NULL;
}
if (mz_zip_reader_locate_file_v2(&zip_archive, pArchive_name, pComment, flags,
&file_index)) {
p = mz_zip_reader_extract_to_heap(&zip_archive, file_index, pSize, flags);
}
mz_zip_reader_end_internal(&zip_archive, p != NULL);
if (pErr)
*pErr = zip_archive.m_last_error;
return p;
} | O1 | c | mz_zip_extract_archive_file_to_heap_v2:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %r9, %rbx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rsi
testq %rcx, %rcx
je 0x8a42e
movq $0x0, (%r14)
testq %rsi, %rsi
setne %al
testq %r12, %r12
setne %cl
testb %cl, %al
je 0x8a4aa
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, 0x60(%rdi)
movaps %xmm0, 0x50(%rdi)
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movl %ebp, %edx
orl $0x800, %edx # imm = 0x800
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x83e47
testl %eax, %eax
je 0x8a4b9
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %r8
movq %r12, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x84330
testl %eax, %eax
je 0x8a4c7
movl 0xc(%rsp), %esi
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x84ccf
movq %rax, %r14
jmp 0x8a4ca
movl $0x18, %eax
xorl %r14d, %r14d
testq %rbx, %rbx
jne 0x8a4e6
jmp 0x8a4e8
testq %rbx, %rbx
je 0x8a4fb
movl 0x2c(%rsp), %eax
xorl %r14d, %r14d
jmp 0x8a4e6
xorl %r14d, %r14d
xorl %esi, %esi
testq %r14, %r14
setne %sil
leaq 0x10(%rsp), %rdi
callq 0x83479
testq %rbx, %rbx
je 0x8a4e8
movl 0x2c(%rsp), %eax
movl %eax, (%rbx)
movq %r14, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x8a4e8
| mz_zip_extract_archive_file_to_heap_v2:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 80h
mov rbx, r9
mov ebp, r8d
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rsi, rdi
test rcx, rcx
jz short loc_8A42E
mov qword ptr [r14], 0
loc_8A42E:
test rsi, rsi
setnz al
test r12, r12
setnz cl
test al, cl
jz short loc_8A4AA
xorps xmm0, xmm0
lea rdi, [rsp+0A8h+var_98]
movaps xmmword ptr [rdi+60h], xmm0
movaps xmmword ptr [rdi+50h], xmm0
movaps xmmword ptr [rdi+40h], xmm0
movaps xmmword ptr [rdi+30h], xmm0
movaps xmmword ptr [rdi+20h], xmm0
movaps xmmword ptr [rdi+10h], xmm0
movaps xmmword ptr [rdi], xmm0
mov edx, ebp
or edx, 800h
xor ecx, ecx
xor r8d, r8d
call mz_zip_reader_init_file_v2
test eax, eax
jz short loc_8A4B9
lea rdi, [rsp+0A8h+var_98]
lea r8, [rsp+0A8h+var_9C]
mov rsi, r12
mov rdx, r15
mov ecx, ebp
call mz_zip_reader_locate_file_v2
test eax, eax
jz short loc_8A4C7
mov esi, [rsp+0A8h+var_9C]
lea rdi, [rsp+0A8h+var_98]
mov rdx, r14
mov ecx, ebp
call mz_zip_reader_extract_to_heap
mov r14, rax
jmp short loc_8A4CA
loc_8A4AA:
mov eax, 18h
xor r14d, r14d
test rbx, rbx
jnz short loc_8A4E6
jmp short loc_8A4E8
loc_8A4B9:
test rbx, rbx
jz short loc_8A4FB
mov eax, [rsp+0A8h+var_7C]
xor r14d, r14d
jmp short loc_8A4E6
loc_8A4C7:
xor r14d, r14d
loc_8A4CA:
xor esi, esi
test r14, r14
setnz sil
lea rdi, [rsp+0A8h+var_98]
call mz_zip_reader_end_internal
test rbx, rbx
jz short loc_8A4E8
mov eax, [rsp+0A8h+var_7C]
loc_8A4E6:
mov [rbx], eax
loc_8A4E8:
mov rax, r14
add rsp, 80h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_8A4FB:
xor r14d, r14d
jmp short loc_8A4E8
| _BYTE * mz_zip_extract_archive_file_to_heap_v2(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned long long *a4,
int a5,
int *a6)
{
__int16 v7; // bp
_BYTE *v10; // r14
int v11; // eax
unsigned int v13; // [rsp+Ch] [rbp-9Ch] BYREF
__int128 v14; // [rsp+10h] [rbp-98h] BYREF
__int128 v15; // [rsp+20h] [rbp-88h]
__int128 v16; // [rsp+30h] [rbp-78h]
__int128 v17; // [rsp+40h] [rbp-68h]
__int128 v18; // [rsp+50h] [rbp-58h]
__int128 v19; // [rsp+60h] [rbp-48h]
__int128 v20; // [rsp+70h] [rbp-38h]
v7 = a5;
if ( a4 )
*a4 = 0LL;
if ( a2 == 0LL || a1 == 0 )
{
v11 = 24;
v10 = 0LL;
if ( !a6 )
return v10;
goto LABEL_14;
}
v20 = 0LL;
v19 = 0LL;
v18 = 0LL;
v17 = 0LL;
v16 = 0LL;
v15 = 0LL;
v14 = 0LL;
if ( !(unsigned int)mz_zip_reader_init_file_v2((long long)&v14, a1, a5 | 0x800u, 0LL, 0LL) )
{
if ( !a6 )
return 0LL;
v11 = HIDWORD(v15);
v10 = 0LL;
goto LABEL_14;
}
if ( (unsigned int)mz_zip_reader_locate_file_v2((long long)&v14, a2, a3, v7, &v13) )
v10 = mz_zip_reader_extract_to_heap((long long)&v14, v13, a4, v7);
else
v10 = 0LL;
mz_zip_reader_end_internal((long long)&v14, v10 != 0LL);
if ( a6 )
{
v11 = HIDWORD(v15);
LABEL_14:
*a6 = v11;
}
return v10;
}
| |||
52,546 | mz_zip_extract_archive_file_to_heap_v2 | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | void *mz_zip_extract_archive_file_to_heap_v2(const char *pZip_filename,
const char *pArchive_name,
const char *pComment,
size_t *pSize, mz_uint flags,
mz_zip_error *pErr) {
mz_uint32 file_index;
mz_zip_archive zip_archive;
void *p = NULL;
if (pSize)
*pSize = 0;
if ((!pZip_filename) || (!pArchive_name)) {
if (pErr)
*pErr = MZ_ZIP_INVALID_PARAMETER;
return NULL;
}
mz_zip_zero_struct(&zip_archive);
if (!mz_zip_reader_init_file_v2(
&zip_archive, pZip_filename,
flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY, 0, 0)) {
if (pErr)
*pErr = zip_archive.m_last_error;
return NULL;
}
if (mz_zip_reader_locate_file_v2(&zip_archive, pArchive_name, pComment, flags,
&file_index)) {
p = mz_zip_reader_extract_to_heap(&zip_archive, file_index, pSize, flags);
}
mz_zip_reader_end_internal(&zip_archive, p != NULL);
if (pErr)
*pErr = zip_archive.m_last_error;
return p;
} | O2 | c | mz_zip_extract_archive_file_to_heap_v2:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %r9, %rbx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rsi
testq %rcx, %rcx
je 0x645fd
andq $0x0, (%r14)
testq %rsi, %rsi
setne %al
testq %r12, %r12
setne %cl
testb %cl, %al
je 0x64679
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, 0x60(%rdi)
movaps %xmm0, 0x50(%rdi)
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movl %ebp, %edx
orl $0x800, %edx # imm = 0x800
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x5e5e1
testl %eax, %eax
je 0x64686
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %r8
movq %r12, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x5ea94
testl %eax, %eax
je 0x64694
movl 0xc(%rsp), %esi
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x5f39c
movq %rax, %r14
jmp 0x64697
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x646b5
pushq $0x18
popq %rax
jmp 0x646b3
testq %rbx, %rbx
je 0x646c8
movl 0x2c(%rsp), %eax
xorl %r14d, %r14d
jmp 0x646b3
xorl %r14d, %r14d
xorl %esi, %esi
testq %r14, %r14
setne %sil
leaq 0x10(%rsp), %rdi
callq 0x5d92b
testq %rbx, %rbx
je 0x646b5
movl 0x2c(%rsp), %eax
movl %eax, (%rbx)
movq %r14, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x646b5
| mz_zip_extract_archive_file_to_heap_v2:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 80h
mov rbx, r9
mov ebp, r8d
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rsi, rdi
test rcx, rcx
jz short loc_645FD
and qword ptr [r14], 0
loc_645FD:
test rsi, rsi
setnz al
test r12, r12
setnz cl
test al, cl
jz short loc_64679
xorps xmm0, xmm0
lea rdi, [rsp+0A8h+var_98]
movaps xmmword ptr [rdi+60h], xmm0
movaps xmmword ptr [rdi+50h], xmm0
movaps xmmword ptr [rdi+40h], xmm0
movaps xmmword ptr [rdi+30h], xmm0
movaps xmmword ptr [rdi+20h], xmm0
movaps xmmword ptr [rdi+10h], xmm0
movaps xmmword ptr [rdi], xmm0
mov edx, ebp
or edx, 800h
xor ecx, ecx
xor r8d, r8d
call mz_zip_reader_init_file_v2
test eax, eax
jz short loc_64686
lea rdi, [rsp+0A8h+var_98]
lea r8, [rsp+0A8h+var_9C]
mov rsi, r12
mov rdx, r15
mov ecx, ebp
call mz_zip_reader_locate_file_v2
test eax, eax
jz short loc_64694
mov esi, [rsp+0A8h+var_9C]
lea rdi, [rsp+0A8h+var_98]
mov rdx, r14
mov ecx, ebp
call mz_zip_reader_extract_to_heap
mov r14, rax
jmp short loc_64697
loc_64679:
xor r14d, r14d
test rbx, rbx
jz short loc_646B5
push 18h
pop rax
jmp short loc_646B3
loc_64686:
test rbx, rbx
jz short loc_646C8
mov eax, [rsp+0A8h+var_7C]
xor r14d, r14d
jmp short loc_646B3
loc_64694:
xor r14d, r14d
loc_64697:
xor esi, esi
test r14, r14
setnz sil
lea rdi, [rsp+0A8h+var_98]
call mz_zip_reader_end_internal
test rbx, rbx
jz short loc_646B5
mov eax, [rsp+0A8h+var_7C]
loc_646B3:
mov [rbx], eax
loc_646B5:
mov rax, r14
add rsp, 80h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_646C8:
xor r14d, r14d
jmp short loc_646B5
| _BYTE * mz_zip_extract_archive_file_to_heap_v2(
long long a1,
long long a2,
long long a3,
unsigned long long *a4,
int a5,
int *a6)
{
__int16 v7; // bp
_BYTE *v10; // r14
int v11; // eax
unsigned int v13; // [rsp+Ch] [rbp-9Ch] BYREF
__int128 v14; // [rsp+10h] [rbp-98h] BYREF
__int128 v15; // [rsp+20h] [rbp-88h]
__int128 v16; // [rsp+30h] [rbp-78h]
__int128 v17; // [rsp+40h] [rbp-68h]
__int128 v18; // [rsp+50h] [rbp-58h]
__int128 v19; // [rsp+60h] [rbp-48h]
__int128 v20; // [rsp+70h] [rbp-38h]
v7 = a5;
if ( a4 )
*a4 = 0LL;
if ( a2 != 0 && a1 != 0 )
{
v20 = 0LL;
v19 = 0LL;
v18 = 0LL;
v17 = 0LL;
v16 = 0LL;
v15 = 0LL;
v14 = 0LL;
if ( !(unsigned int)mz_zip_reader_init_file_v2((long long)&v14, a1, a5 | 0x800u, 0LL, 0LL) )
{
if ( !a6 )
return 0LL;
v11 = HIDWORD(v15);
v10 = 0LL;
goto LABEL_14;
}
if ( (unsigned int)mz_zip_reader_locate_file_v2((long long)&v14, a2, a3, v7, &v13) )
v10 = mz_zip_reader_extract_to_heap((long long)&v14, v13, a4, v7);
else
v10 = 0LL;
mz_zip_reader_end_internal((long long)&v14, v10 != 0LL);
if ( a6 )
{
v11 = HIDWORD(v15);
goto LABEL_14;
}
}
else
{
v10 = 0LL;
if ( a6 )
{
v11 = 24;
LABEL_14:
*a6 = v11;
}
}
return v10;
}
| mz_zip_extract_archive_file_to_heap_v2:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x80
MOV RBX,R9
MOV EBP,R8D
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RSI,RDI
TEST RCX,RCX
JZ 0x001645fd
AND qword ptr [R14],0x0
LAB_001645fd:
TEST RSI,RSI
SETNZ AL
TEST R12,R12
SETNZ CL
TEST AL,CL
JZ 0x00164679
XORPS XMM0,XMM0
LEA RDI,[RSP + 0x10]
MOVAPS xmmword ptr [RDI + 0x60],XMM0
MOVAPS xmmword ptr [RDI + 0x50],XMM0
MOVAPS xmmword ptr [RDI + 0x40],XMM0
MOVAPS xmmword ptr [RDI + 0x30],XMM0
MOVAPS xmmword ptr [RDI + 0x20],XMM0
MOVAPS xmmword ptr [RDI + 0x10],XMM0
MOVAPS xmmword ptr [RDI],XMM0
MOV EDX,EBP
OR EDX,0x800
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0015e5e1
TEST EAX,EAX
JZ 0x00164686
LEA RDI,[RSP + 0x10]
LEA R8,[RSP + 0xc]
MOV RSI,R12
MOV RDX,R15
MOV ECX,EBP
CALL 0x0015ea94
TEST EAX,EAX
JZ 0x00164694
MOV ESI,dword ptr [RSP + 0xc]
LEA RDI,[RSP + 0x10]
MOV RDX,R14
MOV ECX,EBP
CALL 0x0015f39c
MOV R14,RAX
JMP 0x00164697
LAB_00164679:
XOR R14D,R14D
TEST RBX,RBX
JZ 0x001646b5
PUSH 0x18
POP RAX
JMP 0x001646b3
LAB_00164686:
TEST RBX,RBX
JZ 0x001646c8
MOV EAX,dword ptr [RSP + 0x2c]
XOR R14D,R14D
JMP 0x001646b3
LAB_00164694:
XOR R14D,R14D
LAB_00164697:
XOR ESI,ESI
TEST R14,R14
SETNZ SIL
LEA RDI,[RSP + 0x10]
CALL 0x0015d92b
TEST RBX,RBX
JZ 0x001646b5
MOV EAX,dword ptr [RSP + 0x2c]
LAB_001646b3:
MOV dword ptr [RBX],EAX
LAB_001646b5:
MOV RAX,R14
ADD RSP,0x80
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001646c8:
XOR R14D,R14D
JMP 0x001646b5
|
long mz_zip_extract_archive_file_to_heap_v2
(long param_1,long param_2,int8 param_3,int8 *param_4,uint param_5,
int4 *param_6)
{
int iVar1;
long lVar2;
int4 local_9c;
int8 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;
int8 uStack_30;
if (param_4 != (int8 *)0x0) {
*param_4 = 0;
}
if (param_1 == 0 || param_2 == 0) {
lVar2 = 0;
if (param_6 == (int4 *)0x0) {
return 0;
}
uStack_80._4_4_ = 0x18;
}
else {
local_38 = 0;
uStack_30 = 0;
local_48 = 0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
local_68 = 0;
uStack_60 = 0;
local_78 = 0;
uStack_70 = 0;
local_88 = 0;
uStack_80 = 0;
local_98 = 0;
uStack_90 = 0;
iVar1 = mz_zip_reader_init_file_v2(&local_98,param_1,param_5 | 0x800,0,0);
if (iVar1 == 0) {
if (param_6 == (int4 *)0x0) {
return 0;
}
lVar2 = 0;
}
else {
iVar1 = mz_zip_reader_locate_file_v2(&local_98,param_2,param_3,param_5,&local_9c);
if (iVar1 == 0) {
lVar2 = 0;
}
else {
lVar2 = mz_zip_reader_extract_to_heap(&local_98,local_9c,param_4,param_5);
}
mz_zip_reader_end_internal(&local_98,lVar2 != 0);
if (param_6 == (int4 *)0x0) {
return lVar2;
}
}
}
*param_6 = uStack_80._4_4_;
return lVar2;
}
| |
52,547 | mz_zip_extract_archive_file_to_heap_v2 | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | void *mz_zip_extract_archive_file_to_heap_v2(const char *pZip_filename,
const char *pArchive_name,
const char *pComment,
size_t *pSize, mz_uint flags,
mz_zip_error *pErr) {
mz_uint32 file_index;
mz_zip_archive zip_archive;
void *p = NULL;
if (pSize)
*pSize = 0;
if ((!pZip_filename) || (!pArchive_name)) {
if (pErr)
*pErr = MZ_ZIP_INVALID_PARAMETER;
return NULL;
}
mz_zip_zero_struct(&zip_archive);
if (!mz_zip_reader_init_file_v2(
&zip_archive, pZip_filename,
flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY, 0, 0)) {
if (pErr)
*pErr = zip_archive.m_last_error;
return NULL;
}
if (mz_zip_reader_locate_file_v2(&zip_archive, pArchive_name, pComment, flags,
&file_index)) {
p = mz_zip_reader_extract_to_heap(&zip_archive, file_index, pSize, flags);
}
mz_zip_reader_end_internal(&zip_archive, p != NULL);
if (pErr)
*pErr = zip_archive.m_last_error;
return p;
} | O3 | c | mz_zip_extract_archive_file_to_heap_v2:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %r9, %rbx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rsi
testq %rcx, %rcx
je 0x89181
movq $0x0, (%r14)
testq %rsi, %rsi
setne %al
testq %r12, %r12
setne %cl
testb %cl, %al
je 0x891fd
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, 0x60(%rdi)
movaps %xmm0, 0x50(%rdi)
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movl %ebp, %edx
orl $0x800, %edx # imm = 0x800
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x82eca
testl %eax, %eax
je 0x8920c
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %r8
movq %r12, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x833b0
testl %eax, %eax
je 0x8921a
movl 0xc(%rsp), %esi
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x83cf0
movq %rax, %r14
jmp 0x8921d
movl $0x18, %eax
xorl %r14d, %r14d
testq %rbx, %rbx
jne 0x89239
jmp 0x8923b
testq %rbx, %rbx
je 0x8924e
movl 0x2c(%rsp), %eax
xorl %r14d, %r14d
jmp 0x89239
xorl %r14d, %r14d
xorl %esi, %esi
testq %r14, %r14
setne %sil
leaq 0x10(%rsp), %rdi
callq 0x824b0
testq %rbx, %rbx
je 0x8923b
movl 0x2c(%rsp), %eax
movl %eax, (%rbx)
movq %r14, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x8923b
| mz_zip_extract_archive_file_to_heap_v2:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 80h
mov rbx, r9
mov ebp, r8d
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rsi, rdi
test rcx, rcx
jz short loc_89181
mov qword ptr [r14], 0
loc_89181:
test rsi, rsi
setnz al
test r12, r12
setnz cl
test al, cl
jz short loc_891FD
xorps xmm0, xmm0
lea rdi, [rsp+0A8h+var_98]
movaps xmmword ptr [rdi+60h], xmm0
movaps xmmword ptr [rdi+50h], xmm0
movaps xmmword ptr [rdi+40h], xmm0
movaps xmmword ptr [rdi+30h], xmm0
movaps xmmword ptr [rdi+20h], xmm0
movaps xmmword ptr [rdi+10h], xmm0
movaps xmmword ptr [rdi], xmm0
mov edx, ebp
or edx, 800h
xor ecx, ecx
xor r8d, r8d
call mz_zip_reader_init_file_v2
test eax, eax
jz short loc_8920C
lea rdi, [rsp+0A8h+var_98]
lea r8, [rsp+0A8h+var_9C]
mov rsi, r12
mov rdx, r15
mov ecx, ebp
call mz_zip_reader_locate_file_v2
test eax, eax
jz short loc_8921A
mov esi, [rsp+0A8h+var_9C]
lea rdi, [rsp+0A8h+var_98]
mov rdx, r14
mov ecx, ebp
call mz_zip_reader_extract_to_heap
mov r14, rax
jmp short loc_8921D
loc_891FD:
mov eax, 18h
xor r14d, r14d
test rbx, rbx
jnz short loc_89239
jmp short loc_8923B
loc_8920C:
test rbx, rbx
jz short loc_8924E
mov eax, [rsp+0A8h+var_7C]
xor r14d, r14d
jmp short loc_89239
loc_8921A:
xor r14d, r14d
loc_8921D:
xor esi, esi
test r14, r14
setnz sil
lea rdi, [rsp+0A8h+var_98]
call mz_zip_reader_end_internal
test rbx, rbx
jz short loc_8923B
mov eax, [rsp+0A8h+var_7C]
loc_89239:
mov [rbx], eax
loc_8923B:
mov rax, r14
add rsp, 80h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_8924E:
xor r14d, r14d
jmp short loc_8923B
| _BYTE * mz_zip_extract_archive_file_to_heap_v2(
long long a1,
_BYTE *a2,
long long a3,
unsigned long long *a4,
int a5,
int *a6)
{
__int16 v7; // bp
_BYTE *v10; // r14
int v11; // eax
unsigned int v13; // [rsp+Ch] [rbp-9Ch] BYREF
__int128 v14; // [rsp+10h] [rbp-98h] BYREF
__int128 v15; // [rsp+20h] [rbp-88h]
__int128 v16; // [rsp+30h] [rbp-78h]
__int128 v17; // [rsp+40h] [rbp-68h]
__int128 v18; // [rsp+50h] [rbp-58h]
__int128 v19; // [rsp+60h] [rbp-48h]
__int128 v20; // [rsp+70h] [rbp-38h]
v7 = a5;
if ( a4 )
*a4 = 0LL;
if ( a2 == 0LL || a1 == 0 )
{
v11 = 24;
v10 = 0LL;
if ( !a6 )
return v10;
goto LABEL_14;
}
v20 = 0LL;
v19 = 0LL;
v18 = 0LL;
v17 = 0LL;
v16 = 0LL;
v15 = 0LL;
v14 = 0LL;
if ( !(unsigned int)mz_zip_reader_init_file_v2((long long)&v14, a1, a5 | 0x800u, 0LL, 0LL) )
{
if ( !a6 )
return 0LL;
v11 = HIDWORD(v15);
v10 = 0LL;
goto LABEL_14;
}
if ( (unsigned int)mz_zip_reader_locate_file_v2((long long)&v14, a2, a3, v7, &v13) )
v10 = mz_zip_reader_extract_to_heap((long long)&v14, v13, a4, v7);
else
v10 = 0LL;
mz_zip_reader_end_internal((long long)&v14, v10 != 0LL);
if ( a6 )
{
v11 = HIDWORD(v15);
LABEL_14:
*a6 = v11;
}
return v10;
}
| |||
52,548 | func_uni_ksc5601_onechar | eloqsql/strings/ctype-euc_kr.c | static int func_uni_ksc5601_onechar(int code){
if ((code>=0x00A1)&&(code<=0x0167))
return(tab_uni_ksc56010[code-0x00A1]);
if ((code>=0x02C7)&&(code<=0x0451))
return(tab_uni_ksc56011[code-0x02C7]);
if ((code>=0x2015)&&(code<=0x2312))
return(tab_uni_ksc56012[code-0x2015]);
if ((code>=0x2460)&&(code<=0x266D))
return(tab_uni_ksc56013[code-0x2460]);
if ((code>=0x3000)&&(code<=0x327F))
return(tab_uni_ksc56014[code-0x3000]);
if ((code>=0x3380)&&(code<=0x33DD))
return(tab_uni_ksc56015[code-0x3380]);
if ((code>=0x4E00)&&(code<=0x947F))
return(tab_uni_ksc56016[code-0x4E00]);
if ((code>=0x9577)&&(code<=0x9F9C))
return(tab_uni_ksc56017[code-0x9577]);
if ((code>=0xAC00)&&(code<=0xD7A3))
return(tab_uni_ksc56018[code-0xAC00]);
if ((code>=0xF900)&&(code<=0xFA0B))
return(tab_uni_ksc56019[code-0xF900]);
if ((code>=0xFF01)&&(code<=0xFFE6))
return(tab_uni_ksc560110[code-0xFF01]);
return(0);
} | O0 | c | func_uni_ksc5601_onechar:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0xa1, -0x8(%rbp)
jl 0x39827
cmpl $0x167, -0x8(%rbp) # imm = 0x167
jg 0x39827
movl -0x8(%rbp), %eax
subl $0xa1, %eax
movslq %eax, %rcx
leaq 0xab6c5(%rip), %rax # 0xe4ee0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x39a05
cmpl $0x2c7, -0x8(%rbp) # imm = 0x2C7
jl 0x39857
cmpl $0x451, -0x8(%rbp) # imm = 0x451
jg 0x39857
movl -0x8(%rbp), %eax
subl $0x2c7, %eax # imm = 0x2C7
movslq %eax, %rcx
leaq 0xab825(%rip), %rax # 0xe5070
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x39a05
cmpl $0x2015, -0x8(%rbp) # imm = 0x2015
jl 0x39887
cmpl $0x2312, -0x8(%rbp) # imm = 0x2312
jg 0x39887
movl -0x8(%rbp), %eax
subl $0x2015, %eax # imm = 0x2015
movslq %eax, %rcx
leaq 0xabb15(%rip), %rax # 0xe5390
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x39a05
cmpl $0x2460, -0x8(%rbp) # imm = 0x2460
jl 0x398b7
cmpl $0x266d, -0x8(%rbp) # imm = 0x266D
jg 0x398b7
movl -0x8(%rbp), %eax
subl $0x2460, %eax # imm = 0x2460
movslq %eax, %rcx
leaq 0xac0e5(%rip), %rax # 0xe5990
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x39a05
cmpl $0x3000, -0x8(%rbp) # imm = 0x3000
jl 0x398e7
cmpl $0x327f, -0x8(%rbp) # imm = 0x327F
jg 0x398e7
movl -0x8(%rbp), %eax
subl $0x3000, %eax # imm = 0x3000
movslq %eax, %rcx
leaq 0xac4d5(%rip), %rax # 0xe5db0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x39a05
cmpl $0x3380, -0x8(%rbp) # imm = 0x3380
jl 0x39917
cmpl $0x33dd, -0x8(%rbp) # imm = 0x33DD
jg 0x39917
movl -0x8(%rbp), %eax
subl $0x3380, %eax # imm = 0x3380
movslq %eax, %rcx
leaq 0xac9a5(%rip), %rax # 0xe62b0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x39a05
cmpl $0x4e00, -0x8(%rbp) # imm = 0x4E00
jl 0x39947
cmpl $0x947f, -0x8(%rbp) # imm = 0x947F
jg 0x39947
movl -0x8(%rbp), %eax
subl $0x4e00, %eax # imm = 0x4E00
movslq %eax, %rcx
leaq 0xaca35(%rip), %rax # 0xe6370
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x39a05
cmpl $0x9577, -0x8(%rbp) # imm = 0x9577
jl 0x39977
cmpl $0x9f9c, -0x8(%rbp) # imm = 0x9F9C
jg 0x39977
movl -0x8(%rbp), %eax
subl $0x9577, %eax # imm = 0x9577
movslq %eax, %rcx
leaq 0xb5705(%rip), %rax # 0xef070
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x39a05
cmpl $0xac00, -0x8(%rbp) # imm = 0xAC00
jl 0x399a4
cmpl $0xd7a3, -0x8(%rbp) # imm = 0xD7A3
jg 0x399a4
movl -0x8(%rbp), %eax
subl $0xac00, %eax # imm = 0xAC00
movslq %eax, %rcx
leaq 0xb6b25(%rip), %rax # 0xf04c0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x39a05
cmpl $0xf900, -0x8(%rbp) # imm = 0xF900
jl 0x399d1
cmpl $0xfa0b, -0x8(%rbp) # imm = 0xFA0B
jg 0x399d1
movl -0x8(%rbp), %eax
subl $0xf900, %eax # imm = 0xF900
movslq %eax, %rcx
leaq 0xbc248(%rip), %rax # 0xf5c10
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x39a05
cmpl $0xff01, -0x8(%rbp) # imm = 0xFF01
jl 0x399fe
cmpl $0xffe6, -0x8(%rbp) # imm = 0xFFE6
jg 0x399fe
movl -0x8(%rbp), %eax
subl $0xff01, %eax # imm = 0xFF01
movslq %eax, %rcx
leaq 0xbc43b(%rip), %rax # 0xf5e30
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x39a05
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| func_uni_ksc5601_onechar:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
cmp [rbp+var_8], 0A1h
jl short loc_39827
cmp [rbp+var_8], 167h
jg short loc_39827
mov eax, [rbp+var_8]
sub eax, 0A1h
movsxd rcx, eax
lea rax, tab_uni_ksc56010
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_39A05
loc_39827:
cmp [rbp+var_8], 2C7h
jl short loc_39857
cmp [rbp+var_8], 451h
jg short loc_39857
mov eax, [rbp+var_8]
sub eax, 2C7h
movsxd rcx, eax
lea rax, tab_uni_ksc56011
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_39A05
loc_39857:
cmp [rbp+var_8], 2015h
jl short loc_39887
cmp [rbp+var_8], 2312h
jg short loc_39887
mov eax, [rbp+var_8]
sub eax, 2015h
movsxd rcx, eax
lea rax, tab_uni_ksc56012
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_39A05
loc_39887:
cmp [rbp+var_8], 2460h
jl short loc_398B7
cmp [rbp+var_8], 266Dh
jg short loc_398B7
mov eax, [rbp+var_8]
sub eax, 2460h
movsxd rcx, eax
lea rax, tab_uni_ksc56013
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_39A05
loc_398B7:
cmp [rbp+var_8], 3000h
jl short loc_398E7
cmp [rbp+var_8], 327Fh
jg short loc_398E7
mov eax, [rbp+var_8]
sub eax, 3000h
movsxd rcx, eax
lea rax, tab_uni_ksc56014
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_39A05
loc_398E7:
cmp [rbp+var_8], 3380h
jl short loc_39917
cmp [rbp+var_8], 33DDh
jg short loc_39917
mov eax, [rbp+var_8]
sub eax, 3380h
movsxd rcx, eax
lea rax, tab_uni_ksc56015
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_39A05
loc_39917:
cmp [rbp+var_8], 4E00h
jl short loc_39947
cmp [rbp+var_8], 947Fh
jg short loc_39947
mov eax, [rbp+var_8]
sub eax, 4E00h
movsxd rcx, eax
lea rax, tab_uni_ksc56016
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_39A05
loc_39947:
cmp [rbp+var_8], 9577h
jl short loc_39977
cmp [rbp+var_8], 9F9Ch
jg short loc_39977
mov eax, [rbp+var_8]
sub eax, 9577h
movsxd rcx, eax
lea rax, tab_uni_ksc56017
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_39A05
loc_39977:
cmp [rbp+var_8], 0AC00h
jl short loc_399A4
cmp [rbp+var_8], 0D7A3h
jg short loc_399A4
mov eax, [rbp+var_8]
sub eax, 0AC00h
movsxd rcx, eax
lea rax, tab_uni_ksc56018
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_39A05
loc_399A4:
cmp [rbp+var_8], 0F900h
jl short loc_399D1
cmp [rbp+var_8], 0FA0Bh
jg short loc_399D1
mov eax, [rbp+var_8]
sub eax, 0F900h
movsxd rcx, eax
lea rax, tab_uni_ksc56019
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_39A05
loc_399D1:
cmp [rbp+var_8], 0FF01h
jl short loc_399FE
cmp [rbp+var_8], 0FFE6h
jg short loc_399FE
mov eax, [rbp+var_8]
sub eax, 0FF01h
movsxd rcx, eax
lea rax, tab_uni_ksc560110
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_39A05
loc_399FE:
mov [rbp+var_4], 0
loc_39A05:
mov eax, [rbp+var_4]
pop rbp
retn
| long long func_uni_ksc5601_onechar(int a1)
{
if ( a1 < 161 || a1 > 359 )
{
if ( a1 < 711 || a1 > 1105 )
{
if ( a1 < 8213 || a1 > 8978 )
{
if ( a1 < 9312 || a1 > 9837 )
{
if ( a1 < 12288 || a1 > 12927 )
{
if ( a1 < 13184 || a1 > 13277 )
{
if ( a1 < 19968 || a1 > 38015 )
{
if ( a1 < 38263 || a1 > 40860 )
{
if ( a1 < 44032 || a1 > 55203 )
{
if ( a1 < 63744 || a1 > 64011 )
{
if ( a1 < 65281 || a1 > 65510 )
return 0;
else
return tab_uni_ksc560110[a1 - 65281];
}
else
{
return tab_uni_ksc56019[a1 - 63744];
}
}
else
{
return tab_uni_ksc56018[a1 - 44032];
}
}
else
{
return tab_uni_ksc56017[a1 - 38263];
}
}
else
{
return tab_uni_ksc56016[a1 - 19968];
}
}
else
{
return tab_uni_ksc56015[a1 - 13184];
}
}
else
{
return tab_uni_ksc56014[a1 - 12288];
}
}
else
{
return tab_uni_ksc56013[a1 - 9312];
}
}
else
{
return tab_uni_ksc56012[a1 - 8213];
}
}
else
{
return tab_uni_ksc56011[a1 - 711];
}
}
else
{
return tab_uni_ksc56010[a1 - 161];
}
}
| func_uni_ksc5601_onechar:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
CMP dword ptr [RBP + -0x8],0xa1
JL 0x00139827
CMP dword ptr [RBP + -0x8],0x167
JG 0x00139827
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xa1
MOVSXD RCX,EAX
LEA RAX,[0x1e4ee0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00139a05
LAB_00139827:
CMP dword ptr [RBP + -0x8],0x2c7
JL 0x00139857
CMP dword ptr [RBP + -0x8],0x451
JG 0x00139857
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2c7
MOVSXD RCX,EAX
LEA RAX,[0x1e5070]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00139a05
LAB_00139857:
CMP dword ptr [RBP + -0x8],0x2015
JL 0x00139887
CMP dword ptr [RBP + -0x8],0x2312
JG 0x00139887
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2015
MOVSXD RCX,EAX
LEA RAX,[0x1e5390]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00139a05
LAB_00139887:
CMP dword ptr [RBP + -0x8],0x2460
JL 0x001398b7
CMP dword ptr [RBP + -0x8],0x266d
JG 0x001398b7
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2460
MOVSXD RCX,EAX
LEA RAX,[0x1e5990]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00139a05
LAB_001398b7:
CMP dword ptr [RBP + -0x8],0x3000
JL 0x001398e7
CMP dword ptr [RBP + -0x8],0x327f
JG 0x001398e7
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x3000
MOVSXD RCX,EAX
LEA RAX,[0x1e5db0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00139a05
LAB_001398e7:
CMP dword ptr [RBP + -0x8],0x3380
JL 0x00139917
CMP dword ptr [RBP + -0x8],0x33dd
JG 0x00139917
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x3380
MOVSXD RCX,EAX
LEA RAX,[0x1e62b0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00139a05
LAB_00139917:
CMP dword ptr [RBP + -0x8],0x4e00
JL 0x00139947
CMP dword ptr [RBP + -0x8],0x947f
JG 0x00139947
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x4e00
MOVSXD RCX,EAX
LEA RAX,[0x1e6370]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00139a05
LAB_00139947:
CMP dword ptr [RBP + -0x8],0x9577
JL 0x00139977
CMP dword ptr [RBP + -0x8],0x9f9c
JG 0x00139977
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x9577
MOVSXD RCX,EAX
LEA RAX,[0x1ef070]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00139a05
LAB_00139977:
CMP dword ptr [RBP + -0x8],0xac00
JL 0x001399a4
CMP dword ptr [RBP + -0x8],0xd7a3
JG 0x001399a4
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xac00
MOVSXD RCX,EAX
LEA RAX,[0x1f04c0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00139a05
LAB_001399a4:
CMP dword ptr [RBP + -0x8],0xf900
JL 0x001399d1
CMP dword ptr [RBP + -0x8],0xfa0b
JG 0x001399d1
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xf900
MOVSXD RCX,EAX
LEA RAX,[0x1f5c10]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00139a05
LAB_001399d1:
CMP dword ptr [RBP + -0x8],0xff01
JL 0x001399fe
CMP dword ptr [RBP + -0x8],0xffe6
JG 0x001399fe
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xff01
MOVSXD RCX,EAX
LEA RAX,[0x1f5e30]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00139a05
LAB_001399fe:
MOV dword ptr [RBP + -0x4],0x0
LAB_00139a05:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int2 func_uni_ksc5601_onechar(int param_1)
{
int2 uVar1;
if ((param_1 < 0xa1) || (0x167 < param_1)) {
if ((param_1 < 0x2c7) || (0x451 < param_1)) {
if ((param_1 < 0x2015) || (0x2312 < param_1)) {
if ((param_1 < 0x2460) || (0x266d < param_1)) {
if ((param_1 < 0x3000) || (0x327f < param_1)) {
if ((param_1 < 0x3380) || (0x33dd < param_1)) {
if ((param_1 < 0x4e00) || (0x947f < param_1)) {
if ((param_1 < 0x9577) || (0x9f9c < param_1)) {
if ((param_1 < 0xac00) || (0xd7a3 < param_1)) {
if ((param_1 < 0xf900) || (0xfa0b < param_1)) {
if ((param_1 < 0xff01) || (0xffe6 < param_1)) {
uVar1 = 0;
}
else {
uVar1 = *(int2 *)(tab_uni_ksc560110 + (long)(param_1 + -0xff01) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_ksc56019 + (long)(param_1 + -0xf900) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_ksc56018 + (long)(param_1 + -0xac00) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_ksc56017 + (long)(param_1 + -0x9577) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_ksc56016 + (long)(param_1 + -0x4e00) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_ksc56015 + (long)(param_1 + -0x3380) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_ksc56014 + (long)(param_1 + -0x3000) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_ksc56013 + (long)(param_1 + -0x2460) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_ksc56012 + (long)(param_1 + -0x2015) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_ksc56011 + (long)(param_1 + -0x2c7) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_ksc56010 + (long)(param_1 + -0xa1) * 2);
}
return uVar1;
}
| |
52,549 | Cache::writeBlockToLowerLevel(Cache::Block&) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp | void Cache::writeBlockToLowerLevel(Cache::Block &b) {
uint32_t addrBegin = this->getAddr(b);
if (this->lowerCache == nullptr) {
for (uint32_t i = 0; i < b.size; ++i) {
this->memory->setByteNoCache(addrBegin + i, b.data[i]);
}
} else {
for (uint32_t i = 0; i < b.size; ++i) {
this->lowerCache->setByte(addrBegin + i, b.data[i]);
}
}
} | O0 | cpp | Cache::writeBlockToLowerLevel(Cache::Block&):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq 0x38(%rsp), %rsi
callq 0x55b0
movl %eax, %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0x34(%rsp)
cmpq $0x0, 0x30(%rax)
jne 0x5538
movl $0x0, 0x30(%rsp)
movl 0x30(%rsp), %eax
movq 0x38(%rsp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x5536
movq 0x20(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x10(%rsp)
movl 0x34(%rsp), %eax
addl 0x30(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
movl 0x30(%rsp), %eax
movl %eax, %esi
callq 0x5730
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %esi
movzbl (%rax), %edx
callq 0x3680
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x54dc
jmp 0x559c
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movq 0x38(%rsp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x559a
movq 0x20(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, (%rsp)
movl 0x34(%rsp), %eax
addl 0x2c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
movl 0x2c(%rsp), %eax
movl %eax, %esi
callq 0x5730
movq (%rsp), %rdi
movl 0xc(%rsp), %esi
xorl %ecx, %ecx
movzbl (%rax), %edx
callq 0x4e40
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x5540
jmp 0x559c
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN5Cache22writeBlockToLowerLevelERNS_5BlockE:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rdi, [rsp+48h+var_8]
mov [rsp+48h+var_28], rdi
mov rsi, [rsp+48h+var_10]
call _ZN5Cache7getAddrERNS_5BlockE; Cache::getAddr(Cache::Block &)
mov ecx, eax
mov rax, [rsp+48h+var_28]
mov [rsp+48h+var_14], ecx
cmp qword ptr [rax+30h], 0
jnz short loc_5538
mov [rsp+48h+var_18], 0
loc_54DC:
mov eax, [rsp+48h+var_18]
mov rcx, [rsp+48h+var_10]
cmp eax, [rcx+0Ch]
jnb short loc_5536
mov rax, [rsp+48h+var_28]
mov rax, [rax+28h]
mov [rsp+48h+var_38], rax
mov eax, [rsp+48h+var_14]
add eax, [rsp+48h+var_18]
mov [rsp+48h+var_2C], eax
mov rdi, [rsp+48h+var_10]
add rdi, 18h
mov eax, [rsp+48h+var_18]
mov esi, eax
call _ZNSt6vectorIhSaIhEEixEm; std::vector<uchar>::operator[](ulong)
mov rdi, [rsp+48h+var_38]; this
mov esi, [rsp+48h+var_2C]; unsigned int
movzx edx, byte ptr [rax]; unsigned __int8
call _ZN13MemoryManager14setByteNoCacheEjh; MemoryManager::setByteNoCache(uint,uchar)
mov eax, [rsp+48h+var_18]
add eax, 1
mov [rsp+48h+var_18], eax
jmp short loc_54DC
loc_5536:
jmp short loc_559C
loc_5538:
mov [rsp+48h+var_1C], 0
loc_5540:
mov eax, [rsp+48h+var_1C]
mov rcx, [rsp+48h+var_10]
cmp eax, [rcx+0Ch]
jnb short loc_559A
mov rax, [rsp+48h+var_28]
mov rax, [rax+30h]
mov [rsp+48h+var_48], rax
mov eax, [rsp+48h+var_14]
add eax, [rsp+48h+var_1C]
mov [rsp+48h+var_3C], eax
mov rdi, [rsp+48h+var_10]
add rdi, 18h
mov eax, [rsp+48h+var_1C]
mov esi, eax
call _ZNSt6vectorIhSaIhEEixEm; std::vector<uchar>::operator[](ulong)
mov rdi, [rsp+48h+var_48]; this
mov esi, [rsp+48h+var_3C]; unsigned int
xor ecx, ecx; unsigned int *
movzx edx, byte ptr [rax]; unsigned __int8
call _ZN5Cache7setByteEjhPj; Cache::setByte(uint,uchar,uint *)
mov eax, [rsp+48h+var_1C]
add eax, 1
mov [rsp+48h+var_1C], eax
jmp short loc_5540
loc_559A:
jmp short $+2
loc_559C:
add rsp, 48h
retn
| long long Cache::writeBlockToLowerLevel(MemoryManager **this, Cache::Block *a2)
{
long long result; // rax
char *v3; // rax
char *v4; // rax
Cache *v5; // [rsp+0h] [rbp-48h]
MemoryManager *v6; // [rsp+10h] [rbp-38h]
unsigned int i; // [rsp+2Ch] [rbp-1Ch]
unsigned int j; // [rsp+30h] [rbp-18h]
int Addr; // [rsp+34h] [rbp-14h]
Addr = Cache::getAddr((Cache *)this, a2);
if ( this[6] )
{
for ( i = 0; ; ++i )
{
result = i;
if ( i >= *((_DWORD *)a2 + 3) )
break;
v5 = this[6];
v4 = (char *)std::vector<unsigned char>::operator[]((char *)a2 + 24, i);
Cache::setByte(v5, i + Addr, *v4, 0LL);
}
}
else
{
for ( j = 0; ; ++j )
{
result = j;
if ( j >= *((_DWORD *)a2 + 3) )
break;
v6 = this[5];
v3 = (char *)std::vector<unsigned char>::operator[]((char *)a2 + 24, j);
MemoryManager::setByteNoCache(v6, j + Addr, *v3);
}
}
return result;
}
| writeBlockToLowerLevel:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV RDI,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x20],RDI
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x001055b0
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0x34],ECX
CMP qword ptr [RAX + 0x30],0x0
JNZ 0x00105538
MOV dword ptr [RSP + 0x30],0x0
LAB_001054dc:
MOV EAX,dword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x38]
CMP EAX,dword ptr [RCX + 0xc]
JNC 0x00105536
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RSP + 0x10],RAX
MOV EAX,dword ptr [RSP + 0x34]
ADD EAX,dword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x1c],EAX
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0x18
MOV EAX,dword ptr [RSP + 0x30]
MOV ESI,EAX
CALL 0x00105730
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x1c]
MOVZX EDX,byte ptr [RAX]
CALL 0x00103680
MOV EAX,dword ptr [RSP + 0x30]
ADD EAX,0x1
MOV dword ptr [RSP + 0x30],EAX
JMP 0x001054dc
LAB_00105536:
JMP 0x0010559c
LAB_00105538:
MOV dword ptr [RSP + 0x2c],0x0
LAB_00105540:
MOV EAX,dword ptr [RSP + 0x2c]
MOV RCX,qword ptr [RSP + 0x38]
CMP EAX,dword ptr [RCX + 0xc]
JNC 0x0010559a
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP],RAX
MOV EAX,dword ptr [RSP + 0x34]
ADD EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0x18
MOV EAX,dword ptr [RSP + 0x2c]
MOV ESI,EAX
CALL 0x00105730
MOV RDI,qword ptr [RSP]
MOV ESI,dword ptr [RSP + 0xc]
XOR ECX,ECX
MOVZX EDX,byte ptr [RAX]
CALL 0x00104e40
MOV EAX,dword ptr [RSP + 0x2c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x00105540
LAB_0010559a:
JMP 0x0010559c
LAB_0010559c:
ADD RSP,0x48
RET
|
/* Cache::writeBlockToLowerLevel(Cache::Block&) */
void __thiscall Cache::writeBlockToLowerLevel(Cache *this,Block *param_1)
{
MemoryManager *this_00;
Cache *this_01;
int iVar1;
uchar *puVar2;
uint local_1c;
uint local_18;
iVar1 = getAddr(this,param_1);
if (*(long *)(this + 0x30) == 0) {
for (local_18 = 0; local_18 < *(uint *)(param_1 + 0xc); local_18 = local_18 + 1) {
this_00 = *(MemoryManager **)(this + 0x28);
puVar2 = (uchar *)std::vector<unsigned_char,std::allocator<unsigned_char>>::operator[]
((vector<unsigned_char,std::allocator<unsigned_char>> *)
(param_1 + 0x18),(ulong)local_18);
MemoryManager::setByteNoCache(this_00,iVar1 + local_18,*puVar2);
}
}
else {
for (local_1c = 0; local_1c < *(uint *)(param_1 + 0xc); local_1c = local_1c + 1) {
this_01 = *(Cache **)(this + 0x30);
puVar2 = (uchar *)std::vector<unsigned_char,std::allocator<unsigned_char>>::operator[]
((vector<unsigned_char,std::allocator<unsigned_char>> *)
(param_1 + 0x18),(ulong)local_1c);
setByte(this_01,iVar1 + local_1c,*puVar2,(uint *)0x0);
}
}
return;
}
| |
52,550 | Cache::writeBlockToLowerLevel(Cache::Block&) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp | void Cache::writeBlockToLowerLevel(Cache::Block &b) {
uint32_t addrBegin = this->getAddr(b);
if (this->lowerCache == nullptr) {
for (uint32_t i = 0; i < b.size; ++i) {
this->memory->setByteNoCache(addrBegin + i, b.data[i]);
}
} else {
for (uint32_t i = 0; i < b.size; ++i) {
this->lowerCache->setByte(addrBegin + i, b.data[i]);
}
}
} | O1 | cpp | Cache::writeBlockToLowerLevel(Cache::Block&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4244
cmpq $0x0, 0x30(%r14)
movl 0xc(%rbx), %ecx
je 0x420c
testl %ecx, %ecx
je 0x4237
movl %eax, %r15d
xorl %r12d, %r12d
movq 0x30(%r14), %rdi
leal (%r15,%r12), %esi
movq 0x18(%rbx), %rax
movzbl (%rax,%r12), %edx
xorl %ecx, %ecx
callq 0x3dba
incq %r12
movl 0xc(%rbx), %eax
cmpq %rax, %r12
jb 0x41e7
jmp 0x4237
testl %ecx, %ecx
je 0x4237
movl %eax, %r15d
xorl %r12d, %r12d
movq 0x28(%r14), %rdi
leal (%r15,%r12), %esi
movq 0x18(%rbx), %rax
movzbl (%rax,%r12), %edx
callq 0x2fa0
incq %r12
movl 0xc(%rbx), %eax
cmpq %rax, %r12
jb 0x4216
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
| _ZN5Cache22writeBlockToLowerLevelERNS_5BlockE:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
call _ZN5Cache7getAddrERNS_5BlockE; Cache::getAddr(Cache::Block &)
cmp qword ptr [r14+30h], 0
mov ecx, [rbx+0Ch]
jz short loc_420C
test ecx, ecx
jz short loc_4237
mov r15d, eax
xor r12d, r12d
loc_41E7:
mov rdi, [r14+30h]; this
lea esi, [r15+r12]; unsigned int
mov rax, [rbx+18h]
movzx edx, byte ptr [rax+r12]; unsigned __int8
xor ecx, ecx; unsigned int *
call _ZN5Cache7setByteEjhPj; Cache::setByte(uint,uchar,uint *)
inc r12
mov eax, [rbx+0Ch]
cmp r12, rax
jb short loc_41E7
jmp short loc_4237
loc_420C:
test ecx, ecx
jz short loc_4237
mov r15d, eax
xor r12d, r12d
loc_4216:
mov rdi, [r14+28h]; this
lea esi, [r15+r12]; unsigned int
mov rax, [rbx+18h]
movzx edx, byte ptr [rax+r12]; unsigned __int8
call _ZN13MemoryManager14setByteNoCacheEjh; MemoryManager::setByteNoCache(uint,uchar)
inc r12
mov eax, [rbx+0Ch]
cmp r12, rax
jb short loc_4216
loc_4237:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| unsigned long long Cache::writeBlockToLowerLevel(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
unsigned long long result; // rax
long long v11; // r8
long long v12; // r9
__m128 v13; // xmm4
__m128 v14; // xmm5
long long v15; // rcx
int v16; // r15d
unsigned long long v17; // r12
int v18; // r15d
unsigned long long v19; // r12
result = Cache::getAddr(a1);
v15 = *(unsigned int *)(a2 + 12);
if ( *(_QWORD *)(a1 + 48) )
{
if ( (_DWORD)v15 )
{
v16 = result;
v17 = 0LL;
do
{
Cache::setByte(
*(Cache **)(a1 + 48),
v16 + v17,
*(_BYTE *)(*(_QWORD *)(a2 + 24) + v17),
0LL,
*(double *)a3.m128_u64,
*(double *)a4.m128_u64,
a5,
a6,
*(double *)v13.m128_u64,
*(double *)v14.m128_u64,
a9,
a10);
++v17;
result = *(unsigned int *)(a2 + 12);
}
while ( v17 < result );
}
}
else if ( (_DWORD)v15 )
{
v18 = result;
v19 = 0LL;
do
{
MemoryManager::setByteNoCache(
*(MemoryManager **)(a1 + 40),
(unsigned int)(v18 + v19),
*(unsigned __int8 *)(*(_QWORD *)(a2 + 24) + v19),
v15,
v11,
v12,
a3,
a4,
a5,
a6,
v13,
v14,
a9,
a10);
++v19;
result = *(unsigned int *)(a2 + 12);
}
while ( v19 < result );
}
return result;
}
| writeBlockToLowerLevel:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
CALL 0x00104244
CMP qword ptr [R14 + 0x30],0x0
MOV ECX,dword ptr [RBX + 0xc]
JZ 0x0010420c
TEST ECX,ECX
JZ 0x00104237
MOV R15D,EAX
XOR R12D,R12D
LAB_001041e7:
MOV RDI,qword ptr [R14 + 0x30]
LEA ESI,[R15 + R12*0x1]
MOV RAX,qword ptr [RBX + 0x18]
MOVZX EDX,byte ptr [RAX + R12*0x1]
XOR ECX,ECX
CALL 0x00103dba
INC R12
MOV EAX,dword ptr [RBX + 0xc]
CMP R12,RAX
JC 0x001041e7
JMP 0x00104237
LAB_0010420c:
TEST ECX,ECX
JZ 0x00104237
MOV R15D,EAX
XOR R12D,R12D
LAB_00104216:
MOV RDI,qword ptr [R14 + 0x28]
LEA ESI,[R15 + R12*0x1]
MOV RAX,qword ptr [RBX + 0x18]
MOVZX EDX,byte ptr [RAX + R12*0x1]
CALL 0x00102fa0
INC R12
MOV EAX,dword ptr [RBX + 0xc]
CMP R12,RAX
JC 0x00104216
LAB_00104237:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Cache::writeBlockToLowerLevel(Cache::Block&) */
void __thiscall Cache::writeBlockToLowerLevel(Cache *this,Block *param_1)
{
int iVar1;
ulong uVar2;
iVar1 = getAddr(this,param_1);
if (*(long *)(this + 0x30) == 0) {
if (*(int *)(param_1 + 0xc) != 0) {
uVar2 = 0;
do {
MemoryManager::setByteNoCache
(*(MemoryManager **)(this + 0x28),iVar1 + (int)uVar2,
*(uchar *)(*(long *)(param_1 + 0x18) + uVar2));
uVar2 = uVar2 + 1;
} while (uVar2 < *(uint *)(param_1 + 0xc));
}
}
else if (*(int *)(param_1 + 0xc) != 0) {
uVar2 = 0;
do {
setByte(*(Cache **)(this + 0x30),iVar1 + (int)uVar2,
*(uchar *)(*(long *)(param_1 + 0x18) + uVar2),(uint *)0x0);
uVar2 = uVar2 + 1;
} while (uVar2 < *(uint *)(param_1 + 0xc));
}
return;
}
| |
52,551 | Cache::writeBlockToLowerLevel(Cache::Block&) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp | void Cache::writeBlockToLowerLevel(Cache::Block &b) {
uint32_t addrBegin = this->getAddr(b);
if (this->lowerCache == nullptr) {
for (uint32_t i = 0; i < b.size; ++i) {
this->memory->setByteNoCache(addrBegin + i, b.data[i]);
}
} else {
for (uint32_t i = 0; i < b.size; ++i) {
this->lowerCache->setByte(addrBegin + i, b.data[i]);
}
}
} | O2 | cpp | Cache::writeBlockToLowerLevel(Cache::Block&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3dc2
cmpq $0x0, 0x30(%r14)
je 0x3d8d
movl %eax, %r15d
xorl %r12d, %r12d
movl 0xc(%rbx), %eax
cmpq %rax, %r12
jae 0x3db6
movq 0x30(%r14), %rdi
leal (%r15,%r12), %esi
movq 0x18(%rbx), %rax
movzbl (%rax,%r12), %edx
xorl %ecx, %ecx
callq 0x39e6
incq %r12
jmp 0x3d68
movl %eax, %r15d
xorl %r12d, %r12d
movl 0xc(%rbx), %eax
cmpq %rax, %r12
jae 0x3db6
movq 0x28(%r14), %rdi
leal (%r15,%r12), %esi
movq 0x18(%rbx), %rax
movzbl (%rax,%r12), %edx
callq 0x2ca4
incq %r12
jmp 0x3d93
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN5Cache22writeBlockToLowerLevelERNS_5BlockE:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
call _ZN5Cache7getAddrERNS_5BlockE; Cache::getAddr(Cache::Block &)
cmp qword ptr [r14+30h], 0
jz short loc_3D8D
mov r15d, eax
xor r12d, r12d
loc_3D68:
mov eax, [rbx+0Ch]
cmp r12, rax
jnb short loc_3DB6
mov rdi, [r14+30h]; this
lea esi, [r15+r12]; unsigned int
mov rax, [rbx+18h]
movzx edx, byte ptr [rax+r12]; unsigned __int8
xor ecx, ecx; unsigned int *
call _ZN5Cache7setByteEjhPj; Cache::setByte(uint,uchar,uint *)
inc r12
jmp short loc_3D68
loc_3D8D:
mov r15d, eax
xor r12d, r12d
loc_3D93:
mov eax, [rbx+0Ch]
cmp r12, rax
jnb short loc_3DB6
mov rdi, [r14+28h]; this
lea esi, [r15+r12]; unsigned int
mov rax, [rbx+18h]
movzx edx, byte ptr [rax+r12]; unsigned __int8
call _ZN13MemoryManager14setByteNoCacheEjh; MemoryManager::setByteNoCache(uint,uchar)
inc r12
jmp short loc_3D93
loc_3DB6:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| unsigned long long Cache::writeBlockToLowerLevel(long long a1, long long a2)
{
int Addr; // eax
int v3; // r15d
unsigned long long i; // r12
unsigned long long result; // rax
int v6; // r15d
unsigned long long j; // r12
Addr = Cache::getAddr(a1);
if ( *(_QWORD *)(a1 + 48) )
{
v3 = Addr;
for ( i = 0LL; ; ++i )
{
result = *(unsigned int *)(a2 + 12);
if ( i >= result )
break;
Cache::setByte(*(Cache **)(a1 + 48), v3 + i, *(_BYTE *)(*(_QWORD *)(a2 + 24) + i), 0LL);
}
}
else
{
v6 = Addr;
for ( j = 0LL; ; ++j )
{
result = *(unsigned int *)(a2 + 12);
if ( j >= result )
break;
MemoryManager::setByteNoCache(*(MemoryManager **)(a1 + 40), v6 + j, *(_BYTE *)(*(_QWORD *)(a2 + 24) + j));
}
}
return result;
}
| writeBlockToLowerLevel:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
CALL 0x00103dc2
CMP qword ptr [R14 + 0x30],0x0
JZ 0x00103d8d
MOV R15D,EAX
XOR R12D,R12D
LAB_00103d68:
MOV EAX,dword ptr [RBX + 0xc]
CMP R12,RAX
JNC 0x00103db6
MOV RDI,qword ptr [R14 + 0x30]
LEA ESI,[R15 + R12*0x1]
MOV RAX,qword ptr [RBX + 0x18]
MOVZX EDX,byte ptr [RAX + R12*0x1]
XOR ECX,ECX
CALL 0x001039e6
INC R12
JMP 0x00103d68
LAB_00103d8d:
MOV R15D,EAX
XOR R12D,R12D
LAB_00103d93:
MOV EAX,dword ptr [RBX + 0xc]
CMP R12,RAX
JNC 0x00103db6
MOV RDI,qword ptr [R14 + 0x28]
LEA ESI,[R15 + R12*0x1]
MOV RAX,qword ptr [RBX + 0x18]
MOVZX EDX,byte ptr [RAX + R12*0x1]
CALL 0x00102ca4
INC R12
JMP 0x00103d93
LAB_00103db6:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Cache::writeBlockToLowerLevel(Cache::Block&) */
void __thiscall Cache::writeBlockToLowerLevel(Cache *this,Block *param_1)
{
int iVar1;
ulong uVar2;
iVar1 = getAddr(this,param_1);
if (*(long *)(this + 0x30) == 0) {
for (uVar2 = 0; uVar2 < *(uint *)(param_1 + 0xc); uVar2 = uVar2 + 1) {
MemoryManager::setByteNoCache
(*(MemoryManager **)(this + 0x28),iVar1 + (int)uVar2,
*(uchar *)(*(long *)(param_1 + 0x18) + uVar2));
}
}
else {
for (uVar2 = 0; uVar2 < *(uint *)(param_1 + 0xc); uVar2 = uVar2 + 1) {
setByte(*(Cache **)(this + 0x30),iVar1 + (int)uVar2,
*(uchar *)(*(long *)(param_1 + 0x18) + uVar2),(uint *)0x0);
}
}
return;
}
| |
52,552 | Cache::writeBlockToLowerLevel(Cache::Block&) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp | void Cache::writeBlockToLowerLevel(Cache::Block &b) {
uint32_t addrBegin = this->getAddr(b);
if (this->lowerCache == nullptr) {
for (uint32_t i = 0; i < b.size; ++i) {
this->memory->setByteNoCache(addrBegin + i, b.data[i]);
}
} else {
for (uint32_t i = 0; i < b.size; ++i) {
this->lowerCache->setByte(addrBegin + i, b.data[i]);
}
}
} | O3 | cpp | Cache::writeBlockToLowerLevel(Cache::Block&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x40f6
cmpq $0x0, 0x30(%r14)
movl 0xc(%rbx), %ecx
je 0x40be
testl %ecx, %ecx
je 0x40e9
movl %eax, %r15d
xorl %r12d, %r12d
movq 0x30(%r14), %rdi
leal (%r15,%r12), %esi
movq 0x18(%rbx), %rax
movzbl (%rax,%r12), %edx
xorl %ecx, %ecx
callq 0x3cc2
incq %r12
movl 0xc(%rbx), %eax
cmpq %rax, %r12
jb 0x4099
jmp 0x40e9
testl %ecx, %ecx
je 0x40e9
movl %eax, %r15d
xorl %r12d, %r12d
movq 0x28(%r14), %rdi
leal (%r15,%r12), %esi
movq 0x18(%rbx), %rax
movzbl (%rax,%r12), %edx
callq 0x2f9c
incq %r12
movl 0xc(%rbx), %eax
cmpq %rax, %r12
jb 0x40c8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
| _ZN5Cache22writeBlockToLowerLevelERNS_5BlockE:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
call _ZN5Cache7getAddrERNS_5BlockE; Cache::getAddr(Cache::Block &)
cmp qword ptr [r14+30h], 0
mov ecx, [rbx+0Ch]
jz short loc_40BE
test ecx, ecx
jz short loc_40E9
mov r15d, eax
xor r12d, r12d
loc_4099:
mov rdi, [r14+30h]; this
lea esi, [r15+r12]; unsigned int
mov rax, [rbx+18h]
movzx edx, byte ptr [rax+r12]; unsigned __int8
xor ecx, ecx; unsigned int *
call _ZN5Cache7setByteEjhPj; Cache::setByte(uint,uchar,uint *)
inc r12
mov eax, [rbx+0Ch]
cmp r12, rax
jb short loc_4099
jmp short loc_40E9
loc_40BE:
test ecx, ecx
jz short loc_40E9
mov r15d, eax
xor r12d, r12d
loc_40C8:
mov rdi, [r14+28h]; this
lea esi, [r15+r12]; unsigned int
mov rax, [rbx+18h]
movzx edx, byte ptr [rax+r12]; unsigned __int8
call _ZN13MemoryManager14setByteNoCacheEjh; MemoryManager::setByteNoCache(uint,uchar)
inc r12
mov eax, [rbx+0Ch]
cmp r12, rax
jb short loc_40C8
loc_40E9:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| unsigned long long Cache::writeBlockToLowerLevel(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
unsigned long long result; // rax
long long v11; // r8
long long v12; // r9
__m128 v13; // xmm4
__m128 v14; // xmm5
long long v15; // rcx
int v16; // r15d
unsigned long long v17; // r12
int v18; // r15d
unsigned long long v19; // r12
result = Cache::getAddr(a1);
v15 = *(unsigned int *)(a2 + 12);
if ( *(_QWORD *)(a1 + 48) )
{
if ( (_DWORD)v15 )
{
v16 = result;
v17 = 0LL;
do
{
Cache::setByte(
*(Cache **)(a1 + 48),
v16 + v17,
*(_BYTE *)(*(_QWORD *)(a2 + 24) + v17),
0LL,
*(double *)a3.m128_u64,
a4,
a5,
a6,
*(double *)v13.m128_u64,
*(double *)v14.m128_u64,
a9,
a10);
++v17;
result = *(unsigned int *)(a2 + 12);
}
while ( v17 < result );
}
}
else if ( (_DWORD)v15 )
{
v18 = result;
v19 = 0LL;
do
{
MemoryManager::setByteNoCache(
*(MemoryManager **)(a1 + 40),
(unsigned int)(v18 + v19),
*(unsigned __int8 *)(*(_QWORD *)(a2 + 24) + v19),
v15,
v11,
v12,
a3,
a4,
a5,
a6,
v13,
v14,
a9,
a10);
++v19;
result = *(unsigned int *)(a2 + 12);
}
while ( v19 < result );
}
return result;
}
| writeBlockToLowerLevel:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
CALL 0x001040f6
CMP qword ptr [R14 + 0x30],0x0
MOV ECX,dword ptr [RBX + 0xc]
JZ 0x001040be
TEST ECX,ECX
JZ 0x001040e9
MOV R15D,EAX
XOR R12D,R12D
LAB_00104099:
MOV RDI,qword ptr [R14 + 0x30]
LEA ESI,[R15 + R12*0x1]
MOV RAX,qword ptr [RBX + 0x18]
MOVZX EDX,byte ptr [RAX + R12*0x1]
XOR ECX,ECX
CALL 0x00103cc2
INC R12
MOV EAX,dword ptr [RBX + 0xc]
CMP R12,RAX
JC 0x00104099
JMP 0x001040e9
LAB_001040be:
TEST ECX,ECX
JZ 0x001040e9
MOV R15D,EAX
XOR R12D,R12D
LAB_001040c8:
MOV RDI,qword ptr [R14 + 0x28]
LEA ESI,[R15 + R12*0x1]
MOV RAX,qword ptr [RBX + 0x18]
MOVZX EDX,byte ptr [RAX + R12*0x1]
CALL 0x00102f9c
INC R12
MOV EAX,dword ptr [RBX + 0xc]
CMP R12,RAX
JC 0x001040c8
LAB_001040e9:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Cache::writeBlockToLowerLevel(Cache::Block&) */
void __thiscall Cache::writeBlockToLowerLevel(Cache *this,Block *param_1)
{
int iVar1;
ulong uVar2;
iVar1 = getAddr(this,param_1);
if (*(long *)(this + 0x30) == 0) {
if (*(int *)(param_1 + 0xc) != 0) {
uVar2 = 0;
do {
MemoryManager::setByteNoCache
(*(MemoryManager **)(this + 0x28),iVar1 + (int)uVar2,
*(uchar *)(*(long *)(param_1 + 0x18) + uVar2));
uVar2 = uVar2 + 1;
} while (uVar2 < *(uint *)(param_1 + 0xc));
}
}
else if (*(int *)(param_1 + 0xc) != 0) {
uVar2 = 0;
do {
setByte(*(Cache **)(this + 0x30),iVar1 + (int)uVar2,
*(uchar *)(*(long *)(param_1 + 0x18) + uVar2),(uint *)0x0);
uVar2 = uVar2 + 1;
} while (uVar2 < *(uint *)(param_1 + 0xc));
}
return;
}
| |
52,553 | aimrt::runtime::core::channel::FrameworkAsyncChannelFilterManager::CreateFilterCollector(std::basic_string_view<char, std::char_traits<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) | aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/../core/channel/channel_framework_async_filter.h | void CreateFilterCollector(
std::string_view topic_name, const std::vector<std::string>& filter_name_vec) {
if (filter_name_vec.empty()) [[unlikely]]
return;
auto collector_ptr = std::make_unique<FrameworkAsyncChannelFilterCollector>();
for (const auto& name : filter_name_vec) {
auto find_itr = filter_map_.find(name);
AIMRT_ASSERT(find_itr != filter_map_.end(), "Can not find filter: {}", name);
collector_ptr->RegisterFilter(find_itr->second);
}
auto emplace_ret = filter_collector_map_.emplace(topic_name, std::move(collector_ptr));
AIMRT_ASSERT(emplace_ret.second, "Func {} set filter collector failed.", topic_name);
filter_names_map_.emplace(topic_name, filter_name_vec);
} | O3 | c | aimrt::runtime::core::channel::FrameworkAsyncChannelFilterManager::CreateFilterCollector(std::basic_string_view<char, std::char_traits<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq (%rcx), %r15
movq 0x8(%rcx), %r12
cmpq %r12, %r15
je 0x4336c
movq %rcx, %rbx
movq %rdi, %r14
movl $0x20, %edi
callq 0x1f220
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x38e(%rip), %rcx # 0x43682
movq %rcx, 0x18(%rax)
leaq 0x399(%rip), %rcx # 0x43698
movq %rcx, 0x10(%rax)
movq %rax, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x436b0
testq %rax, %rax
je 0x43378
movq 0x8(%rsp), %rdi
addq $0x28, %rax
movq %rax, %rsi
callq 0x435f0
addq $0x20, %r15
cmpq %r12, %r15
jne 0x43308
leaq 0x38(%r14), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x43d34
testb $0x1, %dl
je 0x4341d
addq $0x70, %r14
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x4416a
leaq 0x8(%rsp), %rdi
callq 0x20565
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x28, %edi
callq 0x1e7e0
movq %rax, %r14
movups (%r15), %xmm0
leaq 0x40(%rsp), %r8
movaps %xmm0, (%r8)
leaq 0x42a61(%rip), %rsi # 0x85dfa
leaq 0x10(%rsp), %rdi
movl $0x17, %edx
movl $0xd, %ecx
callq 0x25059
leaq 0x6b09c(%rip), %rax # 0xae450
movq %rax, (%r14)
movq %r14, %rax
addq $0x18, %rax
movq %rax, 0x8(%r14)
leaq 0x20(%rsp), %r15
movq -0x10(%r15), %rcx
cmpq %r15, %rcx
jne 0x433d9
movups (%r15), %xmm0
movups %xmm0, (%rax)
jmp 0x433e6
movq %rcx, 0x8(%r14)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%r14)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%r14)
movq %r15, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
leaq 0x6af77(%rip), %rsi # 0xae380
leaq -0x1f6dc(%rip), %rdx # 0x23d34
movq %r14, %rdi
callq 0x1fec0
jmp 0x434c6
movl $0x28, %edi
callq 0x1e7e0
movq %rax, %r14
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
leaq 0x40(%rsp), %r8
movq %rcx, (%r8)
movq %rax, 0x8(%r8)
leaq 0x429cb(%rip), %rsi # 0x85e12
leaq 0x10(%rsp), %rdi
movl $0x24, %edx
movl $0xd, %ecx
callq 0x25059
leaq 0x6afee(%rip), %rax # 0xae450
movq %rax, (%r14)
movq %r14, %rax
addq $0x18, %rax
movq %rax, 0x8(%r14)
leaq 0x20(%rsp), %r15
movq -0x10(%r15), %rcx
cmpq %r15, %rcx
jne 0x43487
movups (%r15), %xmm0
movups %xmm0, (%rax)
jmp 0x43494
movq %rcx, 0x8(%r14)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%r14)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%r14)
movq %r15, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
leaq 0x6aec9(%rip), %rsi # 0xae380
leaq -0x1f78a(%rip), %rdx # 0x23d34
movq %r14, %rdi
callq 0x1fec0
jmp 0x434cc
jmp 0x434d1
jmp 0x434ed
movq %rax, %rbx
jmp 0x434f8
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x434f8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1f250
jmp 0x434f8
movq %rax, %rbx
movq %r14, %rdi
callq 0x1ebc0
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x4350c
leaq 0x8(%rsp), %rdi
callq 0x445ca
movq %rbx, %rdi
callq 0x1ffd0
| _ZN5aimrt7runtime4core7channel34FrameworkAsyncChannelFilterManager21CreateFilterCollectorESt17basic_string_viewIcSt11char_traitsIcEERKSt6vectorINSt7__cxx1112basic_stringIcS6_SaIcEEESaISC_EE:
push r15
push r14
push r12
push rbx
sub rsp, 58h
mov [rsp+78h+var_48], rsi
mov [rsp+78h+var_40], rdx
mov r15, [rcx]
mov r12, [rcx+8]
cmp r15, r12
jz loc_4336C
mov rbx, rcx
mov r14, rdi
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
lea rcx, _ZNSt17_Function_handlerIFvRN5aimrt7runtime4core7channel10MsgWrapperEOSt8functionIFvS5_EEEZNS3_36FrameworkAsyncChannelFilterCollectorC1EvEUlS5_S9_E_E9_M_invokeERKSt9_Any_dataS5_S9_; std::_Function_handler<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &)> &&),aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector::FrameworkAsyncChannelFilterCollector(void)::{lambda(aimrt::runtime::core::channel::MsgWrapper &,std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &)> &)#1}>::_M_invoke(std::_Any_data const&,aimrt::runtime::core::channel::MsgWrapper &,std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &)> &)
mov [rax+18h], rcx
lea rcx, _ZNSt17_Function_handlerIFvRN5aimrt7runtime4core7channel10MsgWrapperEOSt8functionIFvS5_EEEZNS3_36FrameworkAsyncChannelFilterCollectorC1EvEUlS5_S9_E_E10_M_managerERSt9_Any_dataRKSE_St18_Manager_operation; std::_Function_handler<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &)> &&),aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector::FrameworkAsyncChannelFilterCollector(void)::{lambda(aimrt::runtime::core::channel::MsgWrapper &,std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &)> &)#1}>::_M_manager(std::_Any_data &,std::_Function_handler<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &)> &&),aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector::FrameworkAsyncChannelFilterCollector(void)::{lambda(aimrt::runtime::core::channel::MsgWrapper &,std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &)> &)#1}> const&,std::_Manager_operation)
mov [rax+10h], rcx
mov qword ptr [rsp+78h+var_70], rax; int
loc_43308:
mov rdi, r14
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St8functionIFvRN5aimrt7runtime4core7channel10MsgWrapperEOS8_IFvSE_EEEEESaISK_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSM_18_Mod_range_hashingENSM_20_Default_ranged_hashENSM_20_Prime_rehash_policyENSM_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function&&<void ()(aimrt::runtime::core::channel::MsgWrapper &)>)>>,std::allocator<std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function&&<void ()(aimrt::runtime::core::channel::MsgWrapper &)>)>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::allocator<std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function&&<void ()(aimrt::runtime::core::channel::MsgWrapper &)>)>>::_Mod_range_hashing,std::allocator<std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function&&<void ()(aimrt::runtime::core::channel::MsgWrapper &)>)>>::_Default_ranged_hash,std::allocator<std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function&&<void ()(aimrt::runtime::core::channel::MsgWrapper &)>)>>::_Prime_rehash_policy,std::allocator<std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function&&<void ()(aimrt::runtime::core::channel::MsgWrapper &)>)>>::_Hashtable_traits<true,false,true>>::find(std::string const&)
test rax, rax
jz short loc_43378
mov rdi, qword ptr [rsp+78h+var_70]
add rax, 28h ; '('
mov rsi, rax
call _ZN5aimrt7runtime4core7channel36FrameworkAsyncChannelFilterCollector14RegisterFilterERKSt8functionIFvRNS2_10MsgWrapperEOS4_IFvS6_EEEE; aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector::RegisterFilter(std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function&&<void ()(aimrt::runtime::core::channel::MsgWrapper &)>)> const&)
add r15, 20h ; ' '
cmp r15, r12
jnz short loc_43308
lea rdi, [r14+38h]
lea rsi, [rsp+78h+var_48]
lea rdx, [rsp+78h+var_70]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10unique_ptrIN5aimrt7runtime4core7channel36FrameworkAsyncChannelFilterCollectorESt14default_deleteISD_EEESaISH_ENSt8__detail10_Select1stESt8equal_toIvENS9_6common4util10StringHashENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEE10_M_emplaceIJRSt17basic_string_viewIcS3_ESG_EEES6_INSJ_14_Node_iteratorISH_Lb0ELb1EEEbESt17integral_constantIbLb1EEDpOT_; std::_Hashtable<std::string,std::pair<std::string const,std::unique_ptr<aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector>>,std::allocator<std::pair<std::string const,std::unique_ptr<aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector>>>,std::__detail::_Select1st,std::equal_to<void>,aimrt::common::util::StringHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_M_emplace<std::string_view &,std::unique_ptr<aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector>>(std::integral_constant<bool,true>,std::string_view &,std::unique_ptr<aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector> &&)
test dl, 1
jz loc_4341D
add r14, 70h ; 'p'
lea rsi, [rsp+78h+var_48]
mov rdi, r14
mov rdx, rbx
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St6vectorIS5_SaIS5_EEESaISB_ENSt8__detail10_Select1stESt8equal_toIvEN5aimrt6common4util10StringHashENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE10_M_emplaceIJRSt17basic_string_viewIcS3_ERKSA_EEES6_INSD_14_Node_iteratorISB_Lb0ELb1EEEbESt17integral_constantIbLb1EEDpOT_; std::_Hashtable<std::string,std::pair<std::string const,std::vector<std::string>>,std::allocator<std::pair<std::string const,std::vector<std::string>>>,std::__detail::_Select1st,std::equal_to<void>,aimrt::common::util::StringHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_M_emplace<std::string_view &,std::vector<std::string> const&>(std::integral_constant<bool,true>,std::string_view &,std::vector<std::string> const&)
lea rdi, [rsp+78h+var_70]
call _ZN5aimrt7runtime4core7channel34FrameworkAsyncChannelFilterManager21CreateFilterCollectorESt17basic_string_viewIcSt11char_traitsIcEERKSt6vectorINSt7__cxx1112basic_stringIcS6_SaIcEEESaISC_EE_cold_1; aimrt::runtime::core::channel::FrameworkAsyncChannelFilterManager::CreateFilterCollector(std::string_view,std::vector<std::string> const&) [clone]
loc_4336C:
add rsp, 58h
pop rbx
pop r12
pop r14
pop r15
retn
loc_43378:
mov edi, 28h ; '('; thrown_size
call ___cxa_allocate_exception
mov r14, rax
movups xmm0, xmmword ptr [r15]
lea r8, [rsp+78h+var_38]; int
movaps xmmword ptr [r8], xmm0
lea rsi, aCanNotFindFilt; "Can not find filter: {}"
lea rdi, [rsp+78h+var_68]; int
mov edx, 17h; int
mov ecx, 0Dh; int
call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
lea rax, off_AE450
mov [r14], rax
mov rax, r14
add rax, 18h
mov [r14+8], rax
lea r15, [rsp+78h+var_58]
mov rcx, [r15-10h]
cmp rcx, r15
jnz short loc_433D9
movups xmm0, xmmword ptr [r15]
movups xmmword ptr [rax], xmm0
jmp short loc_433E6
loc_433D9:
mov [r14+8], rcx
mov rax, [rsp+78h+var_58]
mov [r14+18h], rax
loc_433E6:
mov rax, [rsp+78h+var_60]
mov [r14+10h], rax
mov [rsp+78h+var_68], r15
mov [rsp+78h+var_60], 0
mov byte ptr [rsp+78h+var_58], 0
lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo
lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_434C6
loc_4341D:
mov edi, 28h ; '('; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rax, [rsp+78h+var_48]
mov rcx, [rsp+78h+var_40]
lea r8, [rsp+78h+var_38]; int
mov [r8], rcx
mov [r8+8], rax
lea rsi, aFuncSetFilterC; "Func {} set filter collector failed."
lea rdi, [rsp+78h+var_68]; int
mov edx, 24h ; '$'; int
mov ecx, 0Dh; int
call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
lea rax, off_AE450
mov [r14], rax
mov rax, r14
add rax, 18h
mov [r14+8], rax
lea r15, [rsp+78h+var_58]
mov rcx, [r15-10h]
cmp rcx, r15
jnz short loc_43487
movups xmm0, xmmword ptr [r15]
movups xmmword ptr [rax], xmm0
jmp short loc_43494
loc_43487:
mov [r14+8], rcx
mov rax, [rsp+78h+var_58]
mov [r14+18h], rax
loc_43494:
mov rax, [rsp+78h+var_60]
mov [r14+10h], rax
mov [rsp+78h+var_68], r15
mov [rsp+78h+var_60], 0
mov byte ptr [rsp+78h+var_58], 0
lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo
lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_434C6:
jmp short loc_434CC
jmp short loc_434D1
jmp short loc_434ED
loc_434CC:
mov rbx, rax
jmp short loc_434F8
loc_434D1:
mov rbx, rax
mov rdi, [rsp+78h+var_68]; void *
cmp rdi, r15
jz short loc_434F8
mov rsi, [rsp+78h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_434F8
loc_434ED:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
loc_434F8:
mov rsi, qword ptr [rsp+78h+var_70]
test rsi, rsi
jz short loc_4350C
lea rdi, [rsp+78h+var_70]
call _ZNKSt14default_deleteIN5aimrt7runtime4core7channel36FrameworkAsyncChannelFilterCollectorEEclEPS4_; std::default_delete<aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector>::operator()(aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector*)
loc_4350C:
mov rdi, rbx
call __Unwind_Resume
| void aimrt::runtime::core::channel::FrameworkAsyncChannelFilterManager::CreateFilterCollector(
long long a1,
long long a2,
long long a3,
__int128 **a4)
{
__int128 *v4; // r15
__int128 *v5; // r12
long long v7; // rax
long long v8; // rax
char v9; // dl
char *exception; // r14
char *v11; // r14
int v12[2]; // [rsp+8h] [rbp-70h] BYREF
void *v13; // [rsp+10h] [rbp-68h] BYREF
long long v14; // [rsp+18h] [rbp-60h]
__int128 v15; // [rsp+20h] [rbp-58h] BYREF
long long v16; // [rsp+30h] [rbp-48h] BYREF
long long v17; // [rsp+38h] [rbp-40h]
__int128 v18; // [rsp+40h] [rbp-38h]
v16 = a2;
v17 = a3;
v4 = *a4;
v5 = a4[1];
if ( *a4 != v5 )
{
v7 = operator new(0x20uLL);
*(_OWORD *)v7 = 0LL;
*(_QWORD *)(v7 + 24) = std::_Function_handler<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &)> &&),aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector::FrameworkAsyncChannelFilterCollector(void)::{lambda(aimrt::runtime::core::channel::MsgWrapper &,std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &)> &)#1}>::_M_invoke;
*(_QWORD *)(v7 + 16) = std::_Function_handler<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &)> &&),aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector::FrameworkAsyncChannelFilterCollector(void)::{lambda(aimrt::runtime::core::channel::MsgWrapper &,std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &)> &)#1}>::_M_manager;
*(_QWORD *)v12 = v7;
do
{
v8 = std::_Hashtable<std::string,std::pair<std::string const,std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function&&<void ()(aimrt::runtime::core::channel::MsgWrapper &)>)>>,std::allocator<std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function&&<void ()(aimrt::runtime::core::channel::MsgWrapper &)>)>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::allocator<std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function&&<void ()(aimrt::runtime::core::channel::MsgWrapper &)>)>>::_Mod_range_hashing,std::allocator<std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function&&<void ()(aimrt::runtime::core::channel::MsgWrapper &)>)>>::_Default_ranged_hash,std::allocator<std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function&&<void ()(aimrt::runtime::core::channel::MsgWrapper &)>)>>::_Prime_rehash_policy,std::allocator<std::function<void ()(aimrt::runtime::core::channel::MsgWrapper &,std::function&&<void ()(aimrt::runtime::core::channel::MsgWrapper &)>)>>::_Hashtable_traits<true,false,true>>::find(
a1,
v4);
if ( !v8 )
{
exception = (char *)__cxa_allocate_exception(0x28uLL);
v18 = *v4;
fmt::v10::vformat[abi:cxx11](&v13);
*(_QWORD *)exception = off_AE450;
*((_QWORD *)exception + 1) = exception + 24;
if ( v13 == &v15 )
{
*(_OWORD *)(exception + 24) = v15;
}
else
{
*((_QWORD *)exception + 1) = v13;
*((_QWORD *)exception + 3) = v15;
}
*((_QWORD *)exception + 2) = v14;
v13 = &v15;
v14 = 0LL;
LOBYTE(v15) = 0;
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException,
(void (*)(void *))aimrt::common::util::AimRTException::~AimRTException);
}
aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector::RegisterFilter(*(_QWORD *)v12, v8 + 40);
v4 += 2;
}
while ( v4 != v5 );
std::_Hashtable<std::string,std::pair<std::string const,std::unique_ptr<aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector>>,std::allocator<std::pair<std::string const,std::unique_ptr<aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector>>>,std::__detail::_Select1st,std::equal_to<void>,aimrt::common::util::StringHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_M_emplace<std::string_view &,std::unique_ptr<aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector>>(
a1 + 56,
&v16,
v12);
if ( (v9 & 1) == 0 )
{
v11 = (char *)__cxa_allocate_exception(0x28uLL);
*(_QWORD *)&v18 = v17;
*((_QWORD *)&v18 + 1) = v16;
fmt::v10::vformat[abi:cxx11](&v13);
*(_QWORD *)v11 = off_AE450;
*((_QWORD *)v11 + 1) = v11 + 24;
if ( v13 == &v15 )
{
*(_OWORD *)(v11 + 24) = v15;
}
else
{
*((_QWORD *)v11 + 1) = v13;
*((_QWORD *)v11 + 3) = v15;
}
*((_QWORD *)v11 + 2) = v14;
v13 = &v15;
v14 = 0LL;
LOBYTE(v15) = 0;
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException,
(void (*)(void *))aimrt::common::util::AimRTException::~AimRTException);
}
std::_Hashtable<std::string,std::pair<std::string const,std::vector<std::string>>,std::allocator<std::pair<std::string const,std::vector<std::string>>>,std::__detail::_Select1st,std::equal_to<void>,aimrt::common::util::StringHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_M_emplace<std::string_view &,std::vector<std::string> const&>(
a1 + 112,
&v16,
a4);
aimrt::runtime::core::channel::FrameworkAsyncChannelFilterManager::CreateFilterCollector(v12);
}
}
| CreateFilterCollector:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP + 0x30],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV R15,qword ptr [RCX]
MOV R12,qword ptr [RCX + 0x8]
CMP R15,R12
JZ 0x0014336c
MOV RBX,RCX
MOV R14,RDI
MOV EDI,0x20
CALL 0x0011f220
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
LEA RCX,[0x143682]
MOV qword ptr [RAX + 0x18],RCX
LEA RCX,[0x143698]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RSP + 0x8],RAX
LAB_00143308:
MOV RDI,R14
MOV RSI,R15
CALL 0x001436b0
TEST RAX,RAX
JZ 0x00143378
MOV RDI,qword ptr [RSP + 0x8]
ADD RAX,0x28
MOV RSI,RAX
CALL 0x001435f0
ADD R15,0x20
CMP R15,R12
JNZ 0x00143308
LEA RDI,[R14 + 0x38]
LAB_00143336:
LEA RSI,[RSP + 0x30]
LEA RDX,[RSP + 0x8]
CALL 0x00143d34
TEST DL,0x1
JZ 0x0014341d
ADD R14,0x70
LEA RSI,[RSP + 0x30]
MOV RDI,R14
MOV RDX,RBX
CALL 0x0014416a
LAB_00143362:
LEA RDI,[RSP + 0x8]
CALL 0x00120565
LAB_0014336c:
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00143378:
MOV EDI,0x28
CALL 0x0011e7e0
MOV R14,RAX
MOVUPS XMM0,xmmword ptr [R15]
LEA R8,[RSP + 0x40]
MOVAPS xmmword ptr [R8],XMM0
LAB_00143392:
LEA RSI,[0x185dfa]
LEA RDI,[RSP + 0x10]
MOV EDX,0x17
MOV ECX,0xd
CALL 0x00125059
LEA RAX,[0x1ae450]
MOV qword ptr [R14],RAX
MOV RAX,R14
ADD RAX,0x18
MOV qword ptr [R14 + 0x8],RAX
LEA R15,[RSP + 0x20]
MOV RCX,qword ptr [R15 + -0x10]
CMP RCX,R15
JNZ 0x001433d9
MOVUPS XMM0,xmmword ptr [R15]
MOVUPS xmmword ptr [RAX],XMM0
JMP 0x001433e6
LAB_001433d9:
MOV qword ptr [R14 + 0x8],RCX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [R14 + 0x18],RAX
LAB_001433e6:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [R14 + 0x10],RAX
MOV qword ptr [RSP + 0x10],R15
MOV qword ptr [RSP + 0x18],0x0
MOV byte ptr [RSP + 0x20],0x0
LAB_00143402:
LEA RSI,[0x1ae380]
LEA RDX,[0x123d34]
MOV RDI,R14
CALL 0x0011fec0
LAB_0014341d:
MOV EDI,0x28
CALL 0x0011e7e0
MOV R14,RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x38]
LEA R8,[RSP + 0x40]
MOV qword ptr [R8],RCX
MOV qword ptr [R8 + 0x8],RAX
LAB_00143440:
LEA RSI,[0x185e12]
LEA RDI,[RSP + 0x10]
MOV EDX,0x24
MOV ECX,0xd
CALL 0x00125059
LEA RAX,[0x1ae450]
MOV qword ptr [R14],RAX
MOV RAX,R14
ADD RAX,0x18
MOV qword ptr [R14 + 0x8],RAX
LEA R15,[RSP + 0x20]
MOV RCX,qword ptr [R15 + -0x10]
CMP RCX,R15
JNZ 0x00143487
MOVUPS XMM0,xmmword ptr [R15]
MOVUPS xmmword ptr [RAX],XMM0
JMP 0x00143494
LAB_00143487:
MOV qword ptr [R14 + 0x8],RCX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [R14 + 0x18],RAX
LAB_00143494:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [R14 + 0x10],RAX
MOV qword ptr [RSP + 0x10],R15
MOV qword ptr [RSP + 0x18],0x0
MOV byte ptr [RSP + 0x20],0x0
LAB_001434b0:
LEA RSI,[0x1ae380]
LEA RDX,[0x123d34]
MOV RDI,R14
CALL 0x0011fec0
|
/* aimrt::runtime::core::channel::FrameworkAsyncChannelFilterManager::CreateFilterCollector(std::basic_string_view<char,
std::char_traits<char> >, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string >
> const&) */
void aimrt::runtime::core::channel::FrameworkAsyncChannelFilterManager::CreateFilterCollector
(_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::function<void(aimrt::runtime::core::channel::MsgWrapper&,std::function<void(aimrt::runtime::core::channel::MsgWrapper&)>&&)>>,std::allocator<std::pair<std::__cxx11::string_const,std::function<void(aimrt::runtime::core::channel::MsgWrapper&,std::function<void(aimrt::runtime::core::channel::MsgWrapper&)>&&)>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*param_1,int8 param_2,int8 param_3,long *param_4)
{
string *psVar1;
long lVar2;
int8 *puVar3;
ulong extraout_RDX;
string *psVar4;
FrameworkAsyncChannelFilterCollector *local_70;
uint *local_68;
int8 local_60;
uint local_58;
int4 uStack_54;
int4 uStack_50;
int4 uStack_4c;
int8 local_48;
int8 local_40;
int8 local_38;
int8 uStack_30;
psVar4 = (string *)*param_4;
psVar1 = (string *)param_4[1];
if (psVar4 != psVar1) {
local_48 = param_2;
local_40 = param_3;
local_70 = (FrameworkAsyncChannelFilterCollector *)operator_new(0x20);
*(int8 *)local_70 = 0;
*(int8 *)(local_70 + 8) = 0;
*(code **)(local_70 + 0x18) =
std::
_Function_handler<void(aimrt::runtime::core::channel::MsgWrapper&,std::function<void(aimrt::runtime::core::channel::MsgWrapper&)>&&),aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector::FrameworkAsyncChannelFilterCollector()::{lambda(aimrt::runtime::core::channel::MsgWrapper&,std::function<void(aimrt::runtime::core::channel::MsgWrapper&)>&&)#1}>
::_M_invoke;
*(code **)(local_70 + 0x10) =
std::
_Function_handler<void(aimrt::runtime::core::channel::MsgWrapper&,std::function<void(aimrt::runtime::core::channel::MsgWrapper&)>&&),aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector::FrameworkAsyncChannelFilterCollector()::{lambda(aimrt::runtime::core::channel::MsgWrapper&,std::function<void(aimrt::runtime::core::channel::MsgWrapper&)>&&)#1}>
::_M_manager;
do {
/* try { // try from 00143308 to 00143328 has its CatchHandler @ 001434cc */
lVar2 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::function<void(aimrt::runtime::core::channel::MsgWrapper&,std::function<void(aimrt::runtime::core::channel::MsgWrapper&)>&&)>>,std::allocator<std::pair<std::__cxx11::string_const,std::function<void(aimrt::runtime::core::channel::MsgWrapper&,std::function<void(aimrt::runtime::core::channel::MsgWrapper&)>&&)>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find(param_1,psVar4);
if (lVar2 == 0) {
puVar3 = (int8 *)__cxa_allocate_exception(0x28);
local_38 = *(int8 *)psVar4;
uStack_30 = *(int8 *)(psVar4 + 8);
/* try { // try from 00143392 to 001433ac has its CatchHandler @ 001434ed */
fmt::v10::vformat_abi_cxx11_(&local_68,"Can not find filter: {}",0x17,0xd);
*puVar3 = &PTR__AimRTException_001ae450;
puVar3[1] = puVar3 + 3;
if (local_68 == &local_58) {
*(uint *)(puVar3 + 3) = local_58;
*(int4 *)((long)puVar3 + 0x1c) = uStack_54;
*(int4 *)(puVar3 + 4) = uStack_50;
*(int4 *)((long)puVar3 + 0x24) = uStack_4c;
}
else {
puVar3[1] = local_68;
puVar3[3] = CONCAT44(uStack_54,local_58);
}
puVar3[2] = local_60;
local_60 = 0;
local_58 = local_58 & 0xffffff00;
local_68 = &local_58;
/* try { // try from 00143402 to 00143417 has its CatchHandler @ 001434d1 */
/* WARNING: Subroutine does not return */
__cxa_throw(puVar3,&common::util::AimRTException::typeinfo,
common::util::AimRTException::~AimRTException);
}
FrameworkAsyncChannelFilterCollector::RegisterFilter(local_70,(function *)(lVar2 + 0x28));
psVar4 = psVar4 + 0x20;
} while (psVar4 != psVar1);
/* try { // try from 00143336 to 00143361 has its CatchHandler @ 001434c6 */
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::unique_ptr<aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector,std::default_delete<aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector>>>,std::allocator<std::pair<std::__cxx11::string_const,std::unique_ptr<aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector,std::default_delete<aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector>>>>,std::__detail::_Select1st,std::equal_to<void>,aimrt::common::util::StringHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::
_M_emplace<std::basic_string_view<char,std::char_traits<char>>&,std::unique_ptr<aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector,std::default_delete<aimrt::runtime::core::channel::FrameworkAsyncChannelFilterCollector>>>
(param_1 + 0x38,&local_48,&local_70);
if ((extraout_RDX & 1) == 0) {
puVar3 = (int8 *)__cxa_allocate_exception(0x28);
local_38 = local_40;
uStack_30 = local_48;
/* try { // try from 00143440 to 0014345a has its CatchHandler @ 001434ca */
fmt::v10::vformat_abi_cxx11_(&local_68,"Func {} set filter collector failed.",0x24,0xd);
*puVar3 = &PTR__AimRTException_001ae450;
puVar3[1] = puVar3 + 3;
if (local_68 == &local_58) {
*(uint *)(puVar3 + 3) = local_58;
*(int4 *)((long)puVar3 + 0x1c) = uStack_54;
*(int4 *)(puVar3 + 4) = uStack_50;
*(int4 *)((long)puVar3 + 0x24) = uStack_4c;
}
else {
puVar3[1] = local_68;
puVar3[3] = CONCAT44(uStack_54,local_58);
}
puVar3[2] = local_60;
local_60 = 0;
local_58 = local_58 & 0xffffff00;
local_68 = &local_58;
/* try { // try from 001434b0 to 001434c5 has its CatchHandler @ 001434c8 */
/* WARNING: Subroutine does not return */
__cxa_throw(puVar3,&common::util::AimRTException::typeinfo,
common::util::AimRTException::~AimRTException);
}
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>,std::__detail::_Select1st,std::equal_to<void>,aimrt::common::util::StringHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::
_M_emplace<std::basic_string_view<char,std::char_traits<char>>&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&>
(param_1 + 0x70,&local_48,param_4);
CreateFilterCollector(&local_70);
}
return;
}
| |
52,554 | delete_finrec_weakref | bluesky950520[P]quickjs/quickjs.c | static void delete_finrec_weakref(JSRuntime *rt, JSFinRecEntry *fre)
{
JSWeakRefRecord **pwr, *wr;
pwr = get_first_weak_ref(fre->target);
for(;;) {
wr = *pwr;
assert(wr != NULL);
if (wr->kind == JS_WEAK_REF_KIND_FINALIZATION_REGISTRY_ENTRY && wr->u.fin_rec_entry == fre)
break;
pwr = &wr->next_weak_ref;
}
*pwr = wr->next_weak_ref;
js_free_rt(rt, wr);
} | O3 | c | delete_finrec_weakref:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rsi), %rax
movl 0x28(%rsi), %edx
movl $0x28, %ecx
cmpl $-0x1, %edx
je 0x8ad8a
cmpl $-0x8, %edx
jne 0x8add9
movl $0x10, %ecx
addq %rcx, %rax
movq (%rax), %r14
cmpl $0x2, (%r14)
jne 0x8ad9c
cmpq %rsi, 0x10(%r14)
je 0x8ada5
addq $0x8, %r14
movq %r14, %rax
jmp 0x8ad8d
movq 0x8(%r14), %rcx
movq %rcx, (%rax)
decq 0x28(%rbx)
movq %r14, %rdi
callq *0x20(%rbx)
movq 0x10(%rbx), %rcx
movq 0x30(%rbx), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%rbx)
movq 0x40(%rbx), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
callq 0xe090
| delete_finrec_weakref:
push r14
push rbx
push rax
mov rbx, rdi
mov rax, [rsi+20h]
mov edx, [rsi+28h]
mov ecx, 28h ; '('
cmp edx, 0FFFFFFFFh
jz short loc_8AD8A
cmp edx, 0FFFFFFF8h
jnz short loc_8ADD9
mov ecx, 10h
loc_8AD8A:
add rax, rcx
loc_8AD8D:
mov r14, [rax]
cmp dword ptr [r14], 2
jnz short loc_8AD9C
cmp [r14+10h], rsi
jz short loc_8ADA5
loc_8AD9C:
add r14, 8
mov rax, r14
jmp short loc_8AD8D
loc_8ADA5:
mov rcx, [r14+8]
mov [rax], rcx
dec qword ptr [rbx+28h]
mov rdi, r14
call qword ptr [rbx+20h]
mov rcx, [rbx+10h]
mov rdx, [rbx+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rdx
mov rdi, [rbx+40h]
mov rsi, r14
add rsp, 8
pop rbx
pop r14
jmp rcx
loc_8ADD9:
call _abort
| long long delete_finrec_weakref(long long a1, long long a2)
{
long long v2; // rdx
long long v3; // rcx
_QWORD *i; // rax
_DWORD *v5; // r14
long long v6; // rax
long long ( *v7)(_QWORD, _DWORD *); // rcx
v2 = *(unsigned int *)(a2 + 40);
v3 = 40LL;
if ( (_DWORD)v2 != -1 )
{
if ( (_DWORD)v2 != -8 )
abort((const char *)a1, a2, v2, 40LL);
v3 = 16LL;
}
for ( i = (_QWORD *)(v3 + *(_QWORD *)(a2 + 32)); ; i = v5 + 2 )
{
v5 = (_DWORD *)*i;
if ( *(_DWORD *)*i == 2 && *((_QWORD *)v5 + 2) == a2 )
break;
}
*i = *((_QWORD *)v5 + 1);
--*(_QWORD *)(a1 + 40);
v6 = (*(long long ( **)(_DWORD *))(a1 + 32))(v5);
v7 = *(long long ( **)(_QWORD, _DWORD *))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v6 - 8;
return v7(*(_QWORD *)(a1 + 64), v5);
}
| delete_finrec_weakref:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x20]
MOV EDX,dword ptr [RSI + 0x28]
MOV ECX,0x28
CMP EDX,-0x1
JZ 0x0018ad8a
CMP EDX,-0x8
JNZ 0x0018add9
MOV ECX,0x10
LAB_0018ad8a:
ADD RAX,RCX
LAB_0018ad8d:
MOV R14,qword ptr [RAX]
CMP dword ptr [R14],0x2
JNZ 0x0018ad9c
CMP qword ptr [R14 + 0x10],RSI
JZ 0x0018ada5
LAB_0018ad9c:
ADD R14,0x8
MOV RAX,R14
JMP 0x0018ad8d
LAB_0018ada5:
MOV RCX,qword ptr [R14 + 0x8]
MOV qword ptr [RAX],RCX
DEC qword ptr [RBX + 0x28]
MOV RDI,R14
CALL qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [RBX + 0x30],RDX
MOV RDI,qword ptr [RBX + 0x40]
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
LAB_0018add9:
CALL 0x0010e090
|
void delete_finrec_weakref(long param_1,long param_2)
{
int *piVar1;
int *piVar2;
long lVar3;
lVar3 = 0x28;
if (*(int *)(param_2 + 0x28) != -1) {
if (*(int *)(param_2 + 0x28) != -8) {
/* WARNING: Subroutine does not return */
abort();
}
lVar3 = 0x10;
}
piVar2 = (int *)(*(long *)(param_2 + 0x20) + lVar3);
while ((piVar1 = *(int **)piVar2, *piVar1 != 2 || (*(long *)(piVar1 + 4) != param_2))) {
piVar2 = piVar1 + 2;
}
*(int8 *)piVar2 = *(int8 *)(piVar1 + 2);
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar3 = (**(code **)(param_1 + 0x20))(piVar1);
lVar3 = (*(long *)(param_1 + 0x30) - lVar3) + -8;
*(long *)(param_1 + 0x30) = lVar3;
/* WARNING: Could not recover jumptable at 0x0018add7. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),piVar1,lVar3,*(code **)(param_1 + 0x10));
return;
}
| |
52,555 | evmone::baseline::analyze(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>, bool) | corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evmone/baseline_analysis.cpp | CodeAnalysis analyze(bytes_view code, bool eof_enabled)
{
if (eof_enabled && is_eof_container(code))
return analyze_eof1(code);
return analyze_legacy(code);
} | O1 | cpp | evmone::baseline::analyze(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
testl %ecx, %ecx
je 0x547e0
movq %r14, %rdi
movq %r15, %rsi
callq 0x46a47
testb %al, %al
je 0x547e0
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x46a70
movq 0x28(%r12), %rdx
movzwl (%rdx), %r8d
movq %r14, %rsi
subq %r8, %rsi
jb 0x5490c
leaq 0x30(%rsp), %rax
movq 0x8(%rax), %rdi
movzwl -0x2(%rdi), %ecx
movq -0x10(%rax), %r9
movzwl -0x2(%r9), %r10d
subq %r8, %rcx
addq %r10, %rcx
cmpq %rcx, %rsi
cmovbq %rsi, %rcx
addq %r15, %r8
movups -0x28(%rax), %xmm0
leaq 0x80(%rsp), %r12
movaps %xmm0, (%r12)
movq -0x18(%rax), %rsi
movq %rsi, 0x10(%r12)
movq %r9, 0x18(%r12)
movq -0x8(%rax), %rsi
movq %rsi, 0x20(%r12)
xorl %esi, %esi
movq %rsi, -0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x18(%rax)
movq %rdx, 0x28(%r12)
movq %rdi, 0x30(%r12)
movq 0x10(%rax), %rdx
movq %rdx, 0x38(%r12)
movq %rsi, 0x10(%rax)
movups %xmm0, (%rax)
movq 0x18(%rax), %rdx
movq %rdx, 0x40(%r12)
movups 0x20(%rax), %xmm1
movups %xmm1, 0x48(%r12)
movups 0x30(%rax), %xmm1
movups %xmm1, 0x58(%r12)
movups %xmm0, 0x20(%rax)
movq %rsi, 0x30(%rax)
movups 0x40(%rax), %xmm1
movups %xmm1, 0x68(%r12)
movups %xmm0, 0x38(%rax)
movq %rsi, 0x48(%rax)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %r9
callq 0x5494a
movq 0x60(%r12), %rdi
testq %rdi, %rdi
je 0x54724
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x220c0
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x54741
movq 0xd8(%rsp), %rsi
subq %rdi, %rsi
callq 0x220c0
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x5475e
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x220c0
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x5477b
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x220c0
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x54792
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x220c0
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x547a9
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x220c0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x547c0
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x220c0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x548f7
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x220c0
jmp 0x548f7
leaq 0x21(%r14), %r13
movq %r13, %rdi
callq 0x22250
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x22190
testq %r14, %r14
je 0x5480f
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x22090
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r12,%r14)
movups %xmm0, (%r12,%r14)
xorl %eax, %eax
movb %al, 0x20(%r12,%r14)
leaq 0x80(%rsp), %rdx
movb %al, (%rdx)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rcx
movq %r14, %rsi
callq 0x497b8
testq %r14, %r14
je 0x5487b
movq 0x8(%rsp), %r13
xorl %ebp, %ebp
movsbq (%r15,%rbp), %rax
cmpq $0x60, %rax
jl 0x54860
addq %rax, %rbp
addq $-0x5f, %rbp
jmp 0x54864
cmpb $0x5b, %al
je 0x5486e
incq %rbp
cmpq %r14, %rbp
jb 0x5484c
jmp 0x5487b
movq %rbp, %rdi
movq %r13, %rsi
callq 0x234b7
jmp 0x54864
movq %r14, (%rbx)
movq %r12, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movq %r12, 0x18(%rbx)
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rbx)
movups 0x8(%rsp), %xmm0
movups 0x18(%rsp), %xmm1
movups %xmm1, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movb $0x0, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x70(%rbx)
movups %xmm0, 0x7a(%rbx)
movups %xmm0, 0x8c(%rbx)
movups %xmm0, 0x9c(%rbx)
movups %xmm0, 0xac(%rbx)
movl %eax, 0xbc(%rbx)
movq %r12, 0xc0(%rbx)
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32a60(%rip), %rdi # 0x87373
leaq 0x32a3f(%rip), %rsi # 0x87359
movq %r8, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x22050
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4975c
jmp 0x54941
movq %rax, %rbx
movq %r12, %rdi
callq 0x221d0
movq %rbx, %rdi
callq 0x22310
nop
| _ZN6evmone8baseline7analyzeESt17basic_string_viewIhN4evmc11byte_traitsIhEEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
test ecx, ecx
jz loc_547E0
mov rdi, r14
mov rsi, r15
call _ZN6evmone16is_eof_containerESt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::is_eof_container(std::basic_string_view<uchar,evmc::byte_traits<uchar>>)
test al, al
jz loc_547E0
lea r12, [rsp+128h+var_120]
mov rdi, r12
mov rsi, r14
mov rdx, r15
call _ZN6evmone22read_valid_eof1_headerESt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::read_valid_eof1_header(std::basic_string_view<uchar,evmc::byte_traits<uchar>>)
mov rdx, [r12+28h]
movzx r8d, word ptr [rdx]
mov rsi, r14
sub rsi, r8
jb loc_5490C
lea rax, [rsp+128h+var_F8]
mov rdi, [rax+8]
movzx ecx, word ptr [rdi-2]
mov r9, [rax-10h]
movzx r10d, word ptr [r9-2]
sub rcx, r8
add rcx, r10
cmp rsi, rcx
cmovb rcx, rsi
add r8, r15
movups xmm0, xmmword ptr [rax-28h]
lea r12, [rsp+128h+var_A8]
movaps xmmword ptr [r12], xmm0
mov rsi, [rax-18h]
mov [r12+10h], rsi
mov [r12+18h], r9
mov rsi, [rax-8]
mov [r12+20h], rsi
xor esi, esi
mov [rax-8], rsi
xorps xmm0, xmm0
movups xmmword ptr [rax-18h], xmm0
mov [r12+28h], rdx
mov [r12+30h], rdi
mov rdx, [rax+10h]
mov [r12+38h], rdx
mov [rax+10h], rsi
movups xmmword ptr [rax], xmm0
mov rdx, [rax+18h]
mov [r12+40h], rdx
movups xmm1, xmmword ptr [rax+20h]
movups xmmword ptr [r12+48h], xmm1
movups xmm1, xmmword ptr [rax+30h]
movups xmmword ptr [r12+58h], xmm1
movups xmmword ptr [rax+20h], xmm0
mov [rax+30h], rsi
movups xmm1, xmmword ptr [rax+40h]
movups xmmword ptr [r12+68h], xmm1
movups xmmword ptr [rax+38h], xmm0
mov [rax+48h], rsi
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov r9, r12
call _ZN6evmone8baseline12CodeAnalysisC2ESt17basic_string_viewIhN4evmc11byte_traitsIhEEES6_NS_10EOF1HeaderE; evmone::baseline::CodeAnalysis::CodeAnalysis(std::basic_string_view<uchar,evmc::byte_traits<uchar>>,std::basic_string_view<uchar,evmc::byte_traits<uchar>>,evmone::EOF1Header)
mov rdi, [r12+60h]; void *
test rdi, rdi
jz short loc_54724
mov rsi, [rsp+128h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_54724:
mov rdi, [rsp+128h+var_60]; void *
test rdi, rdi
jz short loc_54741
mov rsi, [rsp+128h+var_50]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_54741:
mov rdi, [rsp+128h+var_80]; void *
test rdi, rdi
jz short loc_5475E
mov rsi, [rsp+128h+var_70]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5475E:
mov rdi, [rsp+128h+var_98]; void *
test rdi, rdi
jz short loc_5477B
mov rsi, [rsp+128h+var_88]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5477B:
mov rdi, [rsp+128h+var_C0]; void *
test rdi, rdi
jz short loc_54792
mov rsi, [rsp+128h+var_B0]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_54792:
mov rdi, [rsp+128h+var_D8]; void *
test rdi, rdi
jz short loc_547A9
mov rsi, [rsp+128h+var_C8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_547A9:
mov rdi, [rsp+128h+var_F8]; void *
test rdi, rdi
jz short loc_547C0
mov rsi, [rsp+128h+var_E8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_547C0:
mov rdi, [rsp+128h+var_110]; void *
test rdi, rdi
jz loc_548F7
mov rsi, [rsp+128h+var_100]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_548F7
loc_547E0:
lea r13, [r14+21h]
mov rdi, r13; unsigned __int64
call __Znam; operator new[](ulong)
mov r12, rax
mov rdi, rax
xor esi, esi
mov rdx, r13
call _memset
test r14, r14
jz short loc_5480F
mov rdi, r12
mov rsi, r15
mov rdx, r14
call _memcpy
loc_5480F:
xorps xmm0, xmm0
movups xmmword ptr [r12+r14+10h], xmm0
movups xmmword ptr [r12+r14], xmm0
xor eax, eax
mov [r12+r14+20h], al
lea rdx, [rsp+128h+var_A8]
mov [rdx], al
lea rdi, [rsp+128h+var_120]
lea rcx, [rsp+128h+var_121]
mov rsi, r14
call _ZNSt6vectorIbSaIbEEC2EmRKbRKS0_; std::vector<bool>::vector(ulong,bool const&,std::allocator<bool> const&)
test r14, r14
jz short loc_5487B
mov r13, qword ptr [rsp+128h+var_120]
xor ebp, ebp
loc_5484C:
movsx rax, byte ptr [r15+rbp]
cmp rax, 60h ; '`'
jl short loc_54860
add rbp, rax
add rbp, 0FFFFFFFFFFFFFFA1h
jmp short loc_54864
loc_54860:
cmp al, 5Bh ; '['
jz short loc_5486E
loc_54864:
inc rbp
cmp rbp, r14
jb short loc_5484C
jmp short loc_5487B
loc_5486E:
mov rdi, rbp
mov rsi, r13
call _ZN6evmone8baseline7analyzeESt17basic_string_viewIhN4evmc11byte_traitsIhEEEb_cold_1; evmone::baseline::analyze(std::basic_string_view<uchar,evmc::byte_traits<uchar>>,bool) [clone]
jmp short loc_54864
loc_5487B:
mov [rbx], r14
mov [rbx+8], r12
mov [rbx+10h], r14
mov [rbx+18h], r12
mov rax, [rsp+128h+var_100]
mov [rbx+40h], rax
movups xmm0, [rsp+128h+var_120]
movups xmm1, xmmword ptr [rsp+128h+var_110]
movups xmmword ptr [rbx+30h], xmm1
movups xmmword ptr [rbx+20h], xmm0
xor eax, eax
mov qword ptr [rsp+128h+var_120], rax
mov dword ptr [rsp+128h+var_120+8], eax
mov [rsp+128h+var_110], rax
mov dword ptr [rsp+128h+var_110+8], eax
mov [rsp+128h+var_100], rax
mov byte ptr [rbx+48h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx+50h], xmm0
movups xmmword ptr [rbx+60h], xmm0
movups xmmword ptr [rbx+70h], xmm0
movups xmmword ptr [rbx+7Ah], xmm0
movups xmmword ptr [rbx+8Ch], xmm0
movups xmmword ptr [rbx+9Ch], xmm0
movups xmmword ptr [rbx+0ACh], xmm0
mov [rbx+0BCh], eax
mov [rbx+0C0h], r12
loc_548F7:
mov rax, rbx
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5490C:
lea rdi, aSPosWhichIsZuS; "%s: __pos (which is %zu) > __size (whic"...
lea rsi, aBasicStringVie; "basic_string_view::substr"
mov rdx, r8
mov rcx, r14
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
mov rbx, rax
lea rdi, [rsp+128h+var_120]; this
call _ZN6evmone10EOF1HeaderD2Ev; evmone::EOF1Header::~EOF1Header()
jmp short loc_54941
mov rbx, rax
mov rdi, r12; void *
call __ZdaPv; operator delete[](void *)
loc_54941:
mov rdi, rbx
call __Unwind_Resume
| long long evmone::baseline::analyze(long long a1, unsigned long long a2, long long a3, int a4)
{
unsigned long long v5; // r8
unsigned long long v6; // rcx
long long v7; // r12
long long v8; // r13
unsigned long long i; // rbp
long long v10; // rax
__int128 v11; // xmm0
__int128 v13; // [rsp+8h] [rbp-120h] BYREF
void *v14[2]; // [rsp+18h] [rbp-110h]
long long v15; // [rsp+28h] [rbp-100h]
__int128 v16; // [rsp+30h] [rbp-F8h]
long long v17; // [rsp+40h] [rbp-E8h]
long long v18; // [rsp+48h] [rbp-E0h]
__int128 v19; // [rsp+50h] [rbp-D8h]
__m256i v20; // [rsp+60h] [rbp-C8h] BYREF
__int128 v21; // [rsp+80h] [rbp-A8h] BYREF
void *v22; // [rsp+90h] [rbp-98h]
void *v23; // [rsp+98h] [rbp-90h]
long long v24; // [rsp+A0h] [rbp-88h]
__int128 v25; // [rsp+A8h] [rbp-80h]
long long v26; // [rsp+B8h] [rbp-70h]
long long v27; // [rsp+C0h] [rbp-68h]
__int128 v28; // [rsp+C8h] [rbp-60h]
__m256i v29; // [rsp+D8h] [rbp-50h]
if ( a4 && (unsigned __int8)evmone::is_eof_container(a2, a3) )
{
evmone::read_valid_eof1_header((long long)&v13, a2, a3);
v5 = *(unsigned __int16 *)v16;
if ( a2 < v5 )
std::__throw_out_of_range_fmt(
"%s: __pos (which is %zu) > __size (which is %zu)",
"basic_string_view::substr",
*(unsigned __int16 *)v16,
a2);
v6 = *((unsigned __int16 *)v14[1] - 1) + *(unsigned __int16 *)(*((_QWORD *)&v16 + 1) - 2LL) - v5;
if ( a2 - v5 < v6 )
v6 = a2 - v5;
v21 = v13;
v22 = v14[0];
v23 = v14[1];
v24 = v15;
v15 = 0LL;
*(_OWORD *)v14 = 0LL;
v25 = v16;
v26 = v17;
v17 = 0LL;
v16 = 0LL;
v27 = v18;
v28 = v19;
v29 = v20;
v19 = 0LL;
memset(&v20, 0, sizeof(v20));
evmone::baseline::CodeAnalysis::CodeAnalysis(a1, a2, a3, v6, a3 + v5, &v21);
if ( v29.m256i_i64[1] )
operator delete((void *)v29.m256i_i64[1], v29.m256i_i64[3] - v29.m256i_i64[1]);
if ( (_QWORD)v28 )
operator delete((void *)v28, v29.m256i_i64[0] - v28);
if ( (_QWORD)v25 )
operator delete((void *)v25, v26 - v25);
if ( v22 )
operator delete(v22, v24 - (_QWORD)v22);
if ( v20.m256i_i64[1] )
operator delete((void *)v20.m256i_i64[1], v20.m256i_i64[3] - v20.m256i_i64[1]);
if ( (_QWORD)v19 )
operator delete((void *)v19, v20.m256i_i64[0] - v19);
if ( (_QWORD)v16 )
operator delete((void *)v16, v17 - v16);
if ( v14[0] )
operator delete(v14[0], v15 - (unsigned long long)v14[0]);
}
else
{
v7 = operator new[](a2 + 33);
memset(v7, 0LL, a2 + 33);
if ( a2 )
memcpy(v7);
*(_OWORD *)(v7 + a2 + 16) = 0LL;
*(_OWORD *)(v7 + a2) = 0LL;
*(_BYTE *)(v7 + a2 + 32) = 0;
LOBYTE(v21) = 0;
std::vector<bool>::vector((long long *)&v13, a2, &v21);
if ( a2 )
{
v8 = v13;
for ( i = 0LL; i < a2; ++i )
{
v10 = *(char *)(a3 + i);
if ( v10 < 96 )
{
if ( (_BYTE)v10 == 91 )
evmone::baseline::analyze(i, v8);
}
else
{
i = v10 + i - 95;
}
}
}
*(_QWORD *)a1 = a2;
*(_QWORD *)(a1 + 8) = v7;
*(_QWORD *)(a1 + 16) = a2;
*(_QWORD *)(a1 + 24) = v7;
*(_QWORD *)(a1 + 64) = v15;
v11 = v13;
*(_OWORD *)(a1 + 48) = *(_OWORD *)v14;
*(_OWORD *)(a1 + 32) = v11;
*(_QWORD *)&v13 = 0LL;
DWORD2(v13) = 0;
v14[0] = 0LL;
LODWORD(v14[1]) = 0;
v15 = 0LL;
*(_BYTE *)(a1 + 72) = 0;
*(_OWORD *)(a1 + 80) = 0LL;
*(_OWORD *)(a1 + 96) = 0LL;
*(_OWORD *)(a1 + 112) = 0LL;
*(_OWORD *)(a1 + 122) = 0LL;
*(_OWORD *)(a1 + 140) = 0LL;
*(_OWORD *)(a1 + 156) = 0LL;
*(_OWORD *)(a1 + 172) = 0LL;
*(_DWORD *)(a1 + 188) = 0;
*(_QWORD *)(a1 + 192) = v7;
}
return a1;
}
| analyze:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
TEST ECX,ECX
JZ 0x001547e0
MOV RDI,R14
MOV RSI,R15
CALL 0x00146a47
TEST AL,AL
JZ 0x001547e0
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R14
MOV RDX,R15
CALL 0x00146a70
MOV RDX,qword ptr [R12 + 0x28]
MOVZX R8D,word ptr [RDX]
MOV RSI,R14
SUB RSI,R8
JC 0x0015490c
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + 0x8]
MOVZX ECX,word ptr [RDI + -0x2]
MOV R9,qword ptr [RAX + -0x10]
MOVZX R10D,word ptr [R9 + -0x2]
SUB RCX,R8
ADD RCX,R10
CMP RSI,RCX
CMOVC RCX,RSI
ADD R8,R15
MOVUPS XMM0,xmmword ptr [RAX + -0x28]
LEA R12,[RSP + 0x80]
MOVAPS xmmword ptr [R12],XMM0
MOV RSI,qword ptr [RAX + -0x18]
MOV qword ptr [R12 + 0x10],RSI
MOV qword ptr [R12 + 0x18],R9
MOV RSI,qword ptr [RAX + -0x8]
MOV qword ptr [R12 + 0x20],RSI
XOR ESI,ESI
MOV qword ptr [RAX + -0x8],RSI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x18],XMM0
MOV qword ptr [R12 + 0x28],RDX
MOV qword ptr [R12 + 0x30],RDI
MOV RDX,qword ptr [RAX + 0x10]
MOV qword ptr [R12 + 0x38],RDX
MOV qword ptr [RAX + 0x10],RSI
MOVUPS xmmword ptr [RAX],XMM0
MOV RDX,qword ptr [RAX + 0x18]
MOV qword ptr [R12 + 0x40],RDX
MOVUPS XMM1,xmmword ptr [RAX + 0x20]
MOVUPS xmmword ptr [R12 + 0x48],XMM1
MOVUPS XMM1,xmmword ptr [RAX + 0x30]
MOVUPS xmmword ptr [R12 + 0x58],XMM1
MOVUPS xmmword ptr [RAX + 0x20],XMM0
MOV qword ptr [RAX + 0x30],RSI
MOVUPS XMM1,xmmword ptr [RAX + 0x40]
MOVUPS xmmword ptr [R12 + 0x68],XMM1
MOVUPS xmmword ptr [RAX + 0x38],XMM0
MOV qword ptr [RAX + 0x48],RSI
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV R9,R12
CALL 0x0015494a
MOV RDI,qword ptr [R12 + 0x60]
TEST RDI,RDI
JZ 0x00154724
MOV RSI,qword ptr [RSP + 0xf0]
SUB RSI,RDI
CALL 0x001220c0
LAB_00154724:
MOV RDI,qword ptr [RSP + 0xc8]
TEST RDI,RDI
JZ 0x00154741
MOV RSI,qword ptr [RSP + 0xd8]
SUB RSI,RDI
CALL 0x001220c0
LAB_00154741:
MOV RDI,qword ptr [RSP + 0xa8]
TEST RDI,RDI
JZ 0x0015475e
MOV RSI,qword ptr [RSP + 0xb8]
SUB RSI,RDI
CALL 0x001220c0
LAB_0015475e:
MOV RDI,qword ptr [RSP + 0x90]
TEST RDI,RDI
JZ 0x0015477b
MOV RSI,qword ptr [RSP + 0xa0]
SUB RSI,RDI
CALL 0x001220c0
LAB_0015477b:
MOV RDI,qword ptr [RSP + 0x68]
TEST RDI,RDI
JZ 0x00154792
MOV RSI,qword ptr [RSP + 0x78]
SUB RSI,RDI
CALL 0x001220c0
LAB_00154792:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x001547a9
MOV RSI,qword ptr [RSP + 0x60]
SUB RSI,RDI
CALL 0x001220c0
LAB_001547a9:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x001547c0
MOV RSI,qword ptr [RSP + 0x40]
SUB RSI,RDI
CALL 0x001220c0
LAB_001547c0:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x001548f7
MOV RSI,qword ptr [RSP + 0x28]
SUB RSI,RDI
CALL 0x001220c0
JMP 0x001548f7
LAB_001547e0:
LEA R13,[R14 + 0x21]
MOV RDI,R13
CALL 0x00122250
MOV R12,RAX
MOV RDI,RAX
XOR ESI,ESI
MOV RDX,R13
CALL 0x00122190
TEST R14,R14
JZ 0x0015480f
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x00122090
LAB_0015480f:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12 + R14*0x1 + 0x10],XMM0
MOVUPS xmmword ptr [R12 + R14*0x1],XMM0
XOR EAX,EAX
MOV byte ptr [R12 + R14*0x1 + 0x20],AL
LEA RDX,[RSP + 0x80]
MOV byte ptr [RDX],AL
LAB_0015482e:
LEA RDI,[RSP + 0x8]
LEA RCX,[RSP + 0x7]
MOV RSI,R14
CALL 0x001497b8
LAB_00154840:
TEST R14,R14
JZ 0x0015487b
MOV R13,qword ptr [RSP + 0x8]
XOR EBP,EBP
LAB_0015484c:
MOVSX RAX,byte ptr [R15 + RBP*0x1]
CMP RAX,0x60
JL 0x00154860
ADD RBP,RAX
ADD RBP,-0x5f
JMP 0x00154864
LAB_00154860:
CMP AL,0x5b
JZ 0x0015486e
LAB_00154864:
INC RBP
CMP RBP,R14
JC 0x0015484c
JMP 0x0015487b
LAB_0015486e:
MOV RDI,RBP
MOV RSI,R13
CALL 0x001234b7
JMP 0x00154864
LAB_0015487b:
MOV qword ptr [RBX],R14
MOV qword ptr [RBX + 0x8],R12
MOV qword ptr [RBX + 0x10],R14
MOV qword ptr [RBX + 0x18],R12
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RBX + 0x40],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
MOVUPS XMM1,xmmword ptr [RSP + 0x18]
MOVUPS xmmword ptr [RBX + 0x30],XMM1
MOVUPS xmmword ptr [RBX + 0x20],XMM0
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RAX
MOV dword ptr [RSP + 0x10],EAX
MOV qword ptr [RSP + 0x18],RAX
MOV dword ptr [RSP + 0x20],EAX
MOV qword ptr [RSP + 0x28],RAX
MOV byte ptr [RBX + 0x48],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x50],XMM0
MOVUPS xmmword ptr [RBX + 0x60],XMM0
MOVUPS xmmword ptr [RBX + 0x70],XMM0
MOVUPS xmmword ptr [RBX + 0x7a],XMM0
MOVUPS xmmword ptr [RBX + 0x8c],XMM0
MOVUPS xmmword ptr [RBX + 0x9c],XMM0
MOVUPS xmmword ptr [RBX + 0xac],XMM0
MOV dword ptr [RBX + 0xbc],EAX
MOV qword ptr [RBX + 0xc0],R12
LAB_001548f7:
MOV RAX,RBX
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015490c:
LEA RDI,[0x187373]
LEA RSI,[0x187359]
MOV RDX,R8
MOV RCX,R14
XOR EAX,EAX
CALL 0x00122050
|
/* evmone::baseline::analyze(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>
>, bool) */
CodeAnalysis *
evmone::baseline::analyze(CodeAnalysis *param_1,evmone *param_2,void *param_3,int param_4)
{
evmone eVar1;
char cVar2;
void *__s;
ulong uVar3;
evmone *peVar4;
ulong local_120;
int4 uStack_118;
int4 uStack_114;
void *local_110;
long lStack_108;
long local_100;
ushort *local_f8;
long lStack_f0;
long local_e8;
int8 local_e0;
void *local_d8;
int8 uStack_d0;
long local_c8;
void *pvStack_c0;
int8 local_b8;
int8 uStack_b0;
ulong local_a8 [2];
void *local_98;
long local_90;
long local_88;
ushort *local_80;
long local_78;
long local_70;
int8 local_68;
void *local_60;
int8 uStack_58;
long local_50;
void *pvStack_48;
int4 local_40;
int4 uStack_3c;
int4 uStack_38;
int4 uStack_34;
if ((param_4 == 0) || (cVar2 = is_eof_container(param_2), cVar2 == '\0')) {
__s = operator_new__((ulong)(param_2 + 0x21));
memset(__s,0,(size_t)(param_2 + 0x21));
if (param_2 != (evmone *)0x0) {
memcpy(__s,param_3,(size_t)param_2);
}
*(int8 *)(param_2 + (long)__s + 0x10) = 0;
*(int8 *)(param_2 + (long)__s + 0x10 + 8) = 0;
*(int8 *)((long)__s + (long)param_2) = 0;
*(int8 *)((evmone *)((long)__s + (long)param_2) + 8) = 0;
param_2[(long)__s + 0x20] = (evmone)0x0;
local_a8[0] = local_a8[0] & 0xffffffffffffff00;
/* try { // try from 0015482e to 0015483f has its CatchHandler @ 00154936 */
std::vector<bool,std::allocator<bool>>::vector
((ulong)&local_120,(bool *)param_2,(allocator *)local_a8);
uVar3 = local_120;
if (param_2 != (evmone *)0x0) {
peVar4 = (evmone *)0x0;
do {
eVar1 = *(evmone *)((long)param_3 + (long)peVar4);
if ((long)(char)eVar1 < 0x60) {
if (eVar1 == (evmone)0x5b) {
analyze(peVar4,uVar3);
}
}
else {
peVar4 = peVar4 + (long)(char)eVar1 + -0x5f;
}
peVar4 = peVar4 + 1;
} while (peVar4 < param_2);
}
*(evmone **)param_1 = param_2;
*(void **)(param_1 + 8) = __s;
*(evmone **)(param_1 + 0x10) = param_2;
*(void **)(param_1 + 0x18) = __s;
*(long *)(param_1 + 0x40) = local_100;
*(void **)(param_1 + 0x30) = local_110;
*(long *)(param_1 + 0x38) = lStack_108;
*(ulong *)(param_1 + 0x20) = local_120;
*(ulong *)(param_1 + 0x28) = CONCAT44(uStack_114,uStack_118);
param_1[0x48] = (CodeAnalysis)0x0;
*(int8 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x68) = 0;
*(int8 *)(param_1 + 0x70) = 0;
*(int8 *)(param_1 + 0x78) = 0;
*(int8 *)(param_1 + 0x7a) = 0;
*(int8 *)(param_1 + 0x82) = 0;
*(int8 *)(param_1 + 0x8c) = 0;
*(int8 *)(param_1 + 0x94) = 0;
*(int8 *)(param_1 + 0x9c) = 0;
*(int8 *)(param_1 + 0xa4) = 0;
*(int8 *)(param_1 + 0xac) = 0;
*(int8 *)(param_1 + 0xb4) = 0;
*(int4 *)(param_1 + 0xbc) = 0;
*(void **)(param_1 + 0xc0) = __s;
}
else {
read_valid_eof1_header(&local_120,param_2,param_3);
peVar4 = (evmone *)(ulong)*local_f8;
if (param_2 < peVar4) {
/* try { // try from 0015490c to 00154926 has its CatchHandler @ 00154927 */
/* WARNING: Subroutine does not return */
std::__throw_out_of_range_fmt
("%s: __pos (which is %zu) > __size (which is %zu)","basic_string_view::substr",
peVar4,param_2);
}
uVar3 = ((ulong)*(ushort *)(lStack_f0 + -2) - (long)peVar4) +
(ulong)*(ushort *)(lStack_108 + -2);
if ((ulong)((long)param_2 - (long)peVar4) < uVar3) {
uVar3 = (long)param_2 - (long)peVar4;
}
local_a8[0] = local_120;
local_98 = local_110;
local_90 = lStack_108;
local_88 = local_100;
local_100 = 0;
local_110 = (void *)0x0;
lStack_108 = 0;
local_80 = local_f8;
local_78 = lStack_f0;
local_70 = local_e8;
local_e8 = 0;
local_f8 = (ushort *)0x0;
lStack_f0 = 0;
local_68 = local_e0;
local_60 = local_d8;
uStack_58 = uStack_d0;
local_50 = local_c8;
pvStack_48 = pvStack_c0;
local_d8 = (void *)0x0;
uStack_d0 = 0;
local_c8 = 0;
local_40 = (int4)local_b8;
uStack_3c = local_b8._4_4_;
uStack_38 = (int4)uStack_b0;
uStack_34 = uStack_b0._4_4_;
pvStack_c0 = (void *)0x0;
local_b8 = 0;
uStack_b0 = 0;
CodeAnalysis::CodeAnalysis(param_1,param_2,param_3,uVar3,peVar4 + (long)param_3,local_a8);
if (pvStack_48 != (void *)0x0) {
operator_delete(pvStack_48,CONCAT44(uStack_34,uStack_38) - (long)pvStack_48);
}
if (local_60 != (void *)0x0) {
operator_delete(local_60,local_50 - (long)local_60);
}
if (local_80 != (ushort *)0x0) {
operator_delete(local_80,local_70 - (long)local_80);
}
if (local_98 != (void *)0x0) {
operator_delete(local_98,local_88 - (long)local_98);
}
if (pvStack_c0 != (void *)0x0) {
operator_delete(pvStack_c0,uStack_b0 - (long)pvStack_c0);
}
if (local_d8 != (void *)0x0) {
operator_delete(local_d8,local_c8 - (long)local_d8);
}
if (local_f8 != (ushort *)0x0) {
operator_delete(local_f8,local_e8 - (long)local_f8);
}
if (local_110 != (void *)0x0) {
operator_delete(local_110,local_100 - (long)local_110);
}
}
return param_1;
}
| |
52,556 | my_wc_mb_euc_kr | eloqsql/strings/ctype-euc_kr.c | static int
my_wc_mb_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_ksc5601_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
} | O0 | c | my_wc_mb_euc_kr:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
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 0x8921b
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x89294
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x8923b
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x89294
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x895c0
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x89257
movl $0x0, -0x4(%rbp)
jmp 0x89294
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x8926e
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x89294
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_wc_mb_euc_kr:
push rbp
mov rbp, rsp
sub rsp, 30h
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_8921B
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_89294
loc_8921B:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_8923B
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_89294
loc_8923B:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_ksc5601_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_89257
mov [rbp+var_4], 0
jmp short loc_89294
loc_89257:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_8926E
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_89294
loc_8926E:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_89294:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_wc_mb_euc_kr(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_ksc5601_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = BYTE1(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_euc_kr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0018921b
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00189294
LAB_0018921b:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x0018923b
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00189294
LAB_0018923b:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x001895c0
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x00189257
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00189294
LAB_00189257:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0018926e
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00189294
LAB_0018926e:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_00189294:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_euc_kr(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
int iVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
iVar1 = func_uni_ksc5601_onechar(param_2);
if (iVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uint)iVar1 >> 8);
param_3[1] = (char)iVar1;
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
52,557 | js_async_function_free | bluesky950520[P]quickjs/quickjs.c | static void js_async_function_free(JSRuntime *rt, JSAsyncFunctionData *s)
{
if (--s->header.ref_count == 0) {
js_async_function_free0(rt, s);
}
} | O1 | c | js_async_function_free:
decl (%rsi)
je 0x52b90
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, 0x38(%rsi)
je 0x52bb3
leaq 0x40(%rbx), %rsi
movq %r14, %rdi
callq 0x3b4ca
movl $0x0, 0x38(%rbx)
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
movq %r14, %rdi
callq 0x1d8c6
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movq %r14, %rdi
callq 0x1d8c6
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
decq 0x28(%r14)
movq %rbx, %rdi
callq *0x20(%r14)
movq 0x10(%r14), %rcx
movq 0x30(%r14), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%r14)
movq 0x40(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
| js_async_function_free:
dec dword ptr [rsi]
jz short loc_52B90
retn
loc_52B90:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
cmp dword ptr [rsi+38h], 0
jz short loc_52BB3
lea rsi, [rbx+40h]
mov rdi, r14
call async_func_free
mov dword ptr [rbx+38h], 0
loc_52BB3:
mov rsi, [rbx+18h]
mov rdx, [rbx+20h]
mov rdi, r14
call JS_FreeValueRT
mov rsi, [rbx+28h]
mov rdx, [rbx+30h]
mov rdi, r14
call JS_FreeValueRT
mov rax, [rbx+8]
mov rcx, [rbx+10h]
mov [rax+8], rcx
mov [rcx], rax
xorps xmm0, xmm0
movups xmmword ptr [rbx+8], xmm0
dec qword ptr [r14+28h]
mov rdi, rbx
call qword ptr [r14+20h]
mov rcx, [r14+10h]
mov rdx, [r14+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rdx
mov rdi, [r14+40h]
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp rcx
| long long js_async_function_free(long long a1, long long a2)
{
long long v3; // rax
_QWORD *v4; // rcx
long long v5; // rax
long long ( *v6)(_QWORD, long long); // rcx
long long result; // rax
if ( (*(_DWORD *)a2)-- == 1 )
{
if ( *(_DWORD *)(a2 + 56) )
{
async_func_free(a1, a2 + 64);
*(_DWORD *)(a2 + 56) = 0;
}
JS_FreeValueRT(a1, *(_DWORD **)(a2 + 24), *(_QWORD *)(a2 + 32));
JS_FreeValueRT(a1, *(_DWORD **)(a2 + 40), *(_QWORD *)(a2 + 48));
v3 = *(_QWORD *)(a2 + 8);
v4 = *(_QWORD **)(a2 + 16);
*(_QWORD *)(v3 + 8) = v4;
*v4 = v3;
*(_OWORD *)(a2 + 8) = 0LL;
--*(_QWORD *)(a1 + 40);
v5 = (*(long long ( **)(long long))(a1 + 32))(a2);
v6 = *(long long ( **)(_QWORD, long long))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v5 - 8;
return v6(*(_QWORD *)(a1 + 64), a2);
}
return result;
}
| |||
52,558 | js_async_function_free | bluesky950520[P]quickjs/quickjs.c | static void js_async_function_free(JSRuntime *rt, JSAsyncFunctionData *s)
{
if (--s->header.ref_count == 0) {
js_async_function_free0(rt, s);
}
} | O2 | c | js_async_function_free:
decl (%rsi)
je 0x46f64
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x46fbb
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
movq %r14, %rdi
callq 0x18031
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movq %r14, %rdi
callq 0x18031
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x170cb
| js_async_function_free:
dec dword ptr [rsi]
jz short loc_46F64
retn
loc_46F64:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
call js_async_function_terminate
mov rsi, [rbx+18h]
mov rdx, [rbx+20h]
mov rdi, r14
call JS_FreeValueRT
mov rsi, [rbx+28h]
mov rdx, [rbx+30h]
mov rdi, r14
call JS_FreeValueRT
mov rax, [rbx+8]
mov rcx, [rbx+10h]
mov [rax+8], rcx
mov [rcx], rax
xorps xmm0, xmm0
movups xmmword ptr [rbx+8], xmm0
mov rdi, r14
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp js_free_rt
| long long js_async_function_free(long long a1, long long a2)
{
long long v3; // rax
_QWORD *v4; // rcx
long long result; // rax
if ( (*(_DWORD *)a2)-- == 1 )
{
js_async_function_terminate(a1);
JS_FreeValueRT(a1, *(unsigned int **)(a2 + 24), *(_QWORD *)(a2 + 32));
JS_FreeValueRT(a1, *(unsigned int **)(a2 + 40), *(_QWORD *)(a2 + 48));
v3 = *(_QWORD *)(a2 + 8);
v4 = *(_QWORD **)(a2 + 16);
*(_QWORD *)(v3 + 8) = v4;
*v4 = v3;
*(_OWORD *)(a2 + 8) = 0LL;
return js_free_rt(a1, a2);
}
return result;
}
| js_async_function_free:
DEC dword ptr [RSI]
JZ 0x00146f64
RET
LAB_00146f64:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
CALL 0x00146fbb
MOV RSI,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RBX + 0x20]
MOV RDI,R14
CALL 0x00118031
MOV RSI,qword ptr [RBX + 0x28]
MOV RDX,qword ptr [RBX + 0x30]
MOV RDI,R14
CALL 0x00118031
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RCX],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x8],XMM0
MOV RDI,R14
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x001170cb
|
void js_async_function_free(int8 param_1,int *param_2)
{
long lVar1;
long *plVar2;
*param_2 = *param_2 + -1;
if (*param_2 != 0) {
return;
}
js_async_function_terminate();
JS_FreeValueRT(param_1,*(int8 *)(param_2 + 6),*(int8 *)(param_2 + 8));
JS_FreeValueRT(param_1,*(int8 *)(param_2 + 10),*(int8 *)(param_2 + 0xc));
lVar1 = *(long *)(param_2 + 2);
plVar2 = *(long **)(param_2 + 4);
*(long **)(lVar1 + 8) = plVar2;
*plVar2 = lVar1;
param_2[2] = 0;
param_2[3] = 0;
param_2[4] = 0;
param_2[5] = 0;
js_free_rt(param_1,param_2);
return;
}
| |
52,559 | MemoryManager::copyFrom(void const*, unsigned int, unsigned int) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp | bool MemoryManager::copyFrom(const void *src, uint32_t dest, uint32_t len) {
for (uint32_t i = 0; i < len; ++i) {
if (!this->isAddrExist(dest + i)) {
dbgprintf("Data copy to invalid addr 0x%x!\n", dest + i);
return false;
}
this->setByte(dest + i, ((uint8_t *)src)[i]);
}
return true;
} | O0 | cpp | MemoryManager::copyFrom(void const*, unsigned int, unsigned int):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movl %ecx, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x18(%rsp), %eax
jae 0x7125
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
addl 0x14(%rsp), %esi
callq 0x7140
testb $0x1, %al
jne 0x70f5
movl 0x1c(%rsp), %esi
addl 0x14(%rsp), %esi
leaq 0x3fc8(%rip), %rdi # 0xb0af
movb $0x0, %al
callq 0x6930
movb $0x0, 0x37(%rsp)
jmp 0x712a
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
addl 0x14(%rsp), %esi
movq 0x20(%rsp), %rax
movl 0x14(%rsp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
movzbl (%rax,%rdx), %edx
callq 0x7160
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x70b8
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN13MemoryManager8copyFromEPKvjj:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_1C], edx
mov [rsp+38h+var_20], ecx
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_30], rax
mov [rsp+38h+var_24], 0
loc_70B8:
mov eax, [rsp+38h+var_24]
cmp eax, [rsp+38h+var_20]
jnb short loc_7125
mov rdi, [rsp+38h+var_30]; this
mov esi, [rsp+38h+var_1C]
add esi, [rsp+38h+var_24]; unsigned int
call _ZN13MemoryManager11isAddrExistEj; MemoryManager::isAddrExist(uint)
test al, 1
jnz short loc_70F5
mov esi, [rsp+38h+var_1C]
add esi, [rsp+38h+var_24]
lea rdi, aDataCopyToInva; "Data copy to invalid addr 0x%x!\n"
mov al, 0
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
mov [rsp+38h+var_1], 0
jmp short loc_712A
loc_70F5:
mov rdi, [rsp+38h+var_30]; this
mov esi, [rsp+38h+var_1C]
add esi, [rsp+38h+var_24]; unsigned int
mov rax, [rsp+38h+var_18]
mov ecx, [rsp+38h+var_24]
mov edx, ecx
xor ecx, ecx; unsigned int *
movzx edx, byte ptr [rax+rdx]; unsigned __int8
call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *)
mov eax, [rsp+38h+var_24]
add eax, 1
mov [rsp+38h+var_24], eax
jmp short loc_70B8
loc_7125:
mov [rsp+38h+var_1], 1
loc_712A:
mov al, [rsp+38h+var_1]
and al, 1
add rsp, 38h
retn
| char MemoryManager::copyFrom(
MemoryManager *this,
_BYTE *a2,
int a3,
unsigned int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
long long v13; // rcx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
char v19; // [rsp+0h] [rbp-38h]
unsigned int i; // [rsp+14h] [rbp-24h]
for ( i = 0; i < a4; ++i )
{
if ( (MemoryManager::isAddrExist(this, i + a3) & 1) == 0 )
{
dbgprintf(
"Data copy to invalid addr 0x%x!\n",
i + a3,
v12,
v13,
v14,
v15,
a5,
a6,
a7,
a8,
v16,
v17,
a11,
a12,
v19);
return 0;
}
MemoryManager::setByte(this, i + a3, a2[i], 0LL);
}
return 1;
}
| copyFrom:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV dword ptr [RSP + 0x1c],EDX
MOV dword ptr [RSP + 0x18],ECX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
MOV dword ptr [RSP + 0x14],0x0
LAB_001070b8:
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,dword ptr [RSP + 0x18]
JNC 0x00107125
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x1c]
ADD ESI,dword ptr [RSP + 0x14]
CALL 0x00107140
TEST AL,0x1
JNZ 0x001070f5
MOV ESI,dword ptr [RSP + 0x1c]
ADD ESI,dword ptr [RSP + 0x14]
LEA RDI,[0x10b0af]
MOV AL,0x0
CALL 0x00106930
MOV byte ptr [RSP + 0x37],0x0
JMP 0x0010712a
LAB_001070f5:
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x1c]
ADD ESI,dword ptr [RSP + 0x14]
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x14]
MOV EDX,ECX
XOR ECX,ECX
MOVZX EDX,byte ptr [RAX + RDX*0x1]
CALL 0x00107160
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x001070b8
LAB_00107125:
MOV byte ptr [RSP + 0x37],0x1
LAB_0010712a:
MOV AL,byte ptr [RSP + 0x37]
AND AL,0x1
ADD RSP,0x38
RET
|
/* MemoryManager::copyFrom(void const*, unsigned int, unsigned int) */
int1 __thiscall
MemoryManager::copyFrom(MemoryManager *this,void *param_1,uint param_2,uint param_3)
{
ulong uVar1;
uint local_24;
local_24 = 0;
while( true ) {
if (param_3 <= local_24) {
return 1;
}
uVar1 = isAddrExist(this,param_2 + local_24);
if ((uVar1 & 1) == 0) break;
setByte(this,param_2 + local_24,*(uchar *)((long)param_1 + (ulong)local_24),(uint *)0x0);
local_24 = local_24 + 1;
}
dbgprintf("Data copy to invalid addr 0x%x!\n",(ulong)(param_2 + local_24));
return 0;
}
| |
52,560 | MemoryManager::copyFrom(void const*, unsigned int, unsigned int) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp | bool MemoryManager::copyFrom(const void *src, uint32_t dest, uint32_t len) {
for (uint32_t i = 0; i < len; ++i) {
if (!this->isAddrExist(dest + i)) {
dbgprintf("Data copy to invalid addr 0x%x!\n", dest + i);
return false;
}
this->setByte(dest + i, ((uint8_t *)src)[i]);
}
return true;
} | O1 | cpp | MemoryManager::copyFrom(void const*, unsigned int, unsigned int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %ecx, %ecx
sete %bpl
je 0x28aa
cmpl $-0x1, %edx
je 0x288a
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r12d
movl %ecx, %eax
movabsq $-0xffffffff, %rbp # imm = 0xFFFFFFFF00000001
addq %r12, %rbp
movq %rax, (%rsp)
leaq -0x1(%rax), %r15
xorl %r13d, %r13d
movzbl (%rbx,%r13), %edx
leal (%r12,%r13), %esi
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x28c4
cmpq %r13, %r15
je 0x289f
incq %r13
movq %rbp, %rax
addq %r13, %rax
jne 0x285f
cmpq (%rsp), %r13
setae %bpl
leaq 0x1845(%rip), %rdi # 0x40d6
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x21f0
jmp 0x28aa
incq %r13
cmpq (%rsp), %r13
setae %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN13MemoryManager8copyFromEPKvjj:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test ecx, ecx
setz bpl
jz short loc_28AA
cmp edx, 0FFFFFFFFh
jz short loc_288A
mov rbx, rsi
mov r14, rdi
mov r12d, edx
mov eax, ecx
mov rbp, 0FFFFFFFF00000001h
add rbp, r12
mov [rsp+38h+var_38], rax
lea r15, [rax-1]
xor r13d, r13d
loc_285F:
movzx edx, byte ptr [rbx+r13]; unsigned __int8
lea esi, [r12+r13]; unsigned int
mov rdi, r14; this
xor ecx, ecx; unsigned int *
call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *)
cmp r15, r13
jz short loc_289F
inc r13
mov rax, rbp
add rax, r13
jnz short loc_285F
cmp r13, [rsp+38h+var_38]
setnb bpl
loc_288A:
lea rdi, aDataCopyToInva; "Data copy to invalid addr 0x%x!\n"
mov esi, 0FFFFFFFFh
xor eax, eax
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
jmp short loc_28AA
loc_289F:
inc r13
cmp r13, [rsp+38h+var_38]
setnb bpl
loc_28AA:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long MemoryManager::copyFrom(
MemoryManager *this,
_BYTE *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
long long v15; // rbp
int v16; // r12d
long long v17; // r15
unsigned long long v18; // r13
unsigned long long v20; // [rsp+0h] [rbp-38h]
LOBYTE(v20) = v14;
LOBYTE(v15) = (_DWORD)a4 == 0;
if ( (_DWORD)a4 )
{
if ( (_DWORD)a3 == -1 )
{
LABEL_7:
dbgprintf(
"Data copy to invalid addr 0x%x!\n",
0xFFFFFFFFLL,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
}
else
{
v16 = a3;
v15 = (unsigned int)a3 - 0xFFFFFFFFLL;
v20 = (unsigned int)a4;
v17 = (unsigned int)a4 - 1LL;
v18 = 0LL;
while ( 1 )
{
MemoryManager::setByte(this, v16 + v18, a2[v18], 0LL);
if ( v17 == v18 )
break;
if ( !(++v18 + v15) )
{
LOBYTE(v15) = v18 >= v20;
goto LABEL_7;
}
}
LOBYTE(v15) = v18 + 1 >= v20;
}
}
return (unsigned int)v15;
}
| copyFrom:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST ECX,ECX
SETZ BPL
JZ 0x001028aa
CMP EDX,-0x1
JZ 0x0010288a
MOV RBX,RSI
MOV R14,RDI
MOV R12D,EDX
MOV EAX,ECX
MOV RBP,-0xffffffff
ADD RBP,R12
MOV qword ptr [RSP],RAX
LEA R15,[RAX + -0x1]
XOR R13D,R13D
LAB_0010285f:
MOVZX EDX,byte ptr [RBX + R13*0x1]
LEA ESI,[R12 + R13*0x1]
MOV RDI,R14
XOR ECX,ECX
CALL 0x001028c4
CMP R15,R13
JZ 0x0010289f
INC R13
MOV RAX,RBP
ADD RAX,R13
JNZ 0x0010285f
CMP R13,qword ptr [RSP]
SETNC BPL
LAB_0010288a:
LEA RDI,[0x1040d6]
MOV ESI,0xffffffff
XOR EAX,EAX
CALL 0x001021f0
JMP 0x001028aa
LAB_0010289f:
INC R13
CMP R13,qword ptr [RSP]
SETNC BPL
LAB_001028aa:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MemoryManager::copyFrom(void const*, unsigned int, unsigned int) */
ulong __thiscall
MemoryManager::copyFrom(MemoryManager *this,void *param_1,uint param_2,uint param_3)
{
int8 unaff_RBP;
ulong uVar1;
int7 uVar2;
ulong uVar3;
uVar1 = CONCAT71((int7)((ulong)unaff_RBP >> 8),param_3 == 0);
if (param_3 != 0) {
if (param_2 != 0xffffffff) {
uVar1 = (ulong)param_3;
uVar3 = 0;
do {
setByte((uint)this,(char)param_2 + (char)uVar3,
(uint *)(ulong)*(byte *)((long)param_1 + uVar3));
uVar2 = (int7)((ulong)param_2 - 0xffffffff >> 8);
if (uVar1 - 1 == uVar3) {
uVar1 = CONCAT71(uVar2,uVar1 <= uVar3 + 1);
goto LAB_001028aa;
}
uVar3 = uVar3 + 1;
} while (((ulong)param_2 - 0xffffffff) + uVar3 != 0);
uVar1 = CONCAT71(uVar2,uVar1 <= uVar3);
}
dbgprintf("Data copy to invalid addr 0x%x!\n",0xffffffff);
}
LAB_001028aa:
return uVar1 & 0xffffffff;
}
| |
52,561 | MemoryManager::copyFrom(void const*, unsigned int, unsigned int) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp | bool MemoryManager::copyFrom(const void *src, uint32_t dest, uint32_t len) {
for (uint32_t i = 0; i < len; ++i) {
if (!this->isAddrExist(dest + i)) {
dbgprintf("Data copy to invalid addr 0x%x!\n", dest + i);
return false;
}
this->setByte(dest + i, ((uint8_t *)src)[i]);
}
return true;
} | O2 | cpp | MemoryManager::copyFrom(void const*, unsigned int, unsigned int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %ecx, %r15d
movl %edx, %r13d
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
xorq %r13, %rbp
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x37c1
cmpq %r12, %rbp
je 0x37b0
movzbl (%rbx,%r12), %edx
leal (%r12,%r13), %esi
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x37de
incq %r12
jmp 0x378e
leaq 0x191f(%rip), %rdi # 0x50d6
pushq $-0x1
popq %rsi
xorl %eax, %eax
callq 0x35f4
cmpq %r15, %r12
setae %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN13MemoryManager8copyFromEPKvjj:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov r15d, ecx
mov r13d, edx
mov ebp, 0FFFFFFFFh
xor rbp, r13
xor r12d, r12d
loc_378E:
cmp r15, r12
jz short loc_37C1
cmp rbp, r12
jz short loc_37B0
movzx edx, byte ptr [rbx+r12]; unsigned __int8
lea esi, [r12+r13]; unsigned int
mov rdi, r14; this
xor ecx, ecx; unsigned int *
call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *)
inc r12
jmp short loc_378E
loc_37B0:
lea rdi, aDataCopyToInva; "Data copy to invalid addr 0x%x!\n"
push 0FFFFFFFFFFFFFFFFh
pop rsi
xor eax, eax
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
loc_37C1:
cmp r12, r15
setnb al
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| bool MemoryManager::copyFrom(
MemoryManager *this,
_BYTE *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
unsigned long long v15; // r15
int v16; // r13d
long long v17; // rbp
unsigned long long i; // r12
char v20; // [rsp-8h] [rbp-38h]
v20 = v14;
v15 = (unsigned int)a4;
v16 = a3;
v17 = (unsigned int)a3 ^ 0xFFFFFFFFLL;
for ( i = 0LL; v15 != i; ++i )
{
if ( v17 == i )
{
dbgprintf("Data copy to invalid addr 0x%x!\n", -1LL, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20);
return i >= v15;
}
MemoryManager::setByte(this, i + v16, a2[i], 0LL);
}
return i >= v15;
}
| copyFrom:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV R15D,ECX
MOV R13D,EDX
MOV EBP,0xffffffff
XOR RBP,R13
XOR R12D,R12D
LAB_0010378e:
CMP R15,R12
JZ 0x001037c1
CMP RBP,R12
JZ 0x001037b0
MOVZX EDX,byte ptr [RBX + R12*0x1]
LEA ESI,[R12 + R13*0x1]
MOV RDI,R14
XOR ECX,ECX
CALL 0x001037de
INC R12
JMP 0x0010378e
LAB_001037b0:
LEA RDI,[0x1050d6]
PUSH -0x1
POP RSI
XOR EAX,EAX
CALL 0x001035f4
LAB_001037c1:
CMP R12,R15
SETNC AL
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MemoryManager::copyFrom(void const*, unsigned int, unsigned int) */
bool __thiscall MemoryManager::copyFrom(MemoryManager *this,void *param_1,uint param_2,uint param_3)
{
ulong uVar1;
uVar1 = 0;
do {
if (param_3 == uVar1) {
LAB_001037c1:
return param_3 <= uVar1;
}
if (((ulong)param_2 ^ 0xffffffff) == uVar1) {
dbgprintf("Data copy to invalid addr 0x%x!\n",0xffffffffffffffff);
goto LAB_001037c1;
}
setByte(this,(int)uVar1 + param_2,*(uchar *)((long)param_1 + uVar1),(uint *)0x0);
uVar1 = uVar1 + 1;
} while( true );
}
| |
52,562 | MemoryManager::copyFrom(void const*, unsigned int, unsigned int) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp | bool MemoryManager::copyFrom(const void *src, uint32_t dest, uint32_t len) {
for (uint32_t i = 0; i < len; ++i) {
if (!this->isAddrExist(dest + i)) {
dbgprintf("Data copy to invalid addr 0x%x!\n", dest + i);
return false;
}
this->setByte(dest + i, ((uint8_t *)src)[i]);
}
return true;
} | O3 | cpp | MemoryManager::copyFrom(void const*, unsigned int, unsigned int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb $0x1, %bl
testl %ecx, %ecx
je 0x2893
cmpl $-0x1, %edx
je 0x28a4
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %r12d
movl %ecx, %eax
movabsq $-0xffffffff, %rbp # imm = 0xFFFFFFFF00000001
addq %r12, %rbp
movq %rax, (%rsp)
leaq -0x1(%rax), %rbx
xorl %r13d, %r13d
movzbl (%r14,%r13), %edx
leal (%r12,%r13), %esi
movq %r15, %rdi
xorl %ecx, %ecx
callq 0x28c4
cmpq %r13, %rbx
je 0x2891
incq %r13
movq %rbp, %rax
addq %r13, %rax
jne 0x2865
cmpq (%rsp), %r13
setae %bl
jmp 0x28a6
movb $0x1, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
leaq 0x1829(%rip), %rdi # 0x40d6
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x21f0
jmp 0x2893
nop
| _ZN13MemoryManager8copyFromEPKvjj:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov bl, 1
test ecx, ecx
jz short loc_2893
cmp edx, 0FFFFFFFFh
jz short loc_28A4
mov r14, rsi
mov r15, rdi
mov r12d, edx
mov eax, ecx
mov rbp, 0FFFFFFFF00000001h
add rbp, r12
mov [rsp+38h+var_38], rax
lea rbx, [rax-1]
xor r13d, r13d
loc_2865:
movzx edx, byte ptr [r14+r13]; unsigned __int8
lea esi, [r12+r13]; unsigned int
mov rdi, r15; this
xor ecx, ecx; unsigned int *
call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *)
cmp rbx, r13
jz short loc_2891
inc r13
mov rax, rbp
add rax, r13
jnz short loc_2865
cmp r13, [rsp+38h+var_38]
setnb bl
jmp short loc_28A6
loc_2891:
mov bl, 1
loc_2893:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_28A4:
xor ebx, ebx
loc_28A6:
lea rdi, aDataCopyToInva; "Data copy to invalid addr 0x%x!\n"
mov esi, 0FFFFFFFFh
xor eax, eax
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
jmp short loc_2893
| long long MemoryManager::copyFrom(
MemoryManager *this,
_BYTE *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
long long v15; // rbx
int v16; // r12d
long long v17; // rbp
unsigned long long v18; // r13
unsigned long long v20; // [rsp+0h] [rbp-38h]
LOBYTE(v20) = v14;
LOBYTE(v15) = 1;
if ( (_DWORD)a4 )
{
if ( (_DWORD)a3 == -1 )
{
LODWORD(v15) = 0;
LABEL_10:
dbgprintf(
"Data copy to invalid addr 0x%x!\n",
0xFFFFFFFFLL,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
}
else
{
v16 = a3;
v17 = (unsigned int)a3 - 0xFFFFFFFFLL;
v20 = (unsigned int)a4;
v15 = (unsigned int)a4 - 1LL;
v18 = 0LL;
while ( 1 )
{
MemoryManager::setByte(this, v16 + v18, a2[v18], 0LL);
if ( v15 == v18 )
break;
if ( !(++v18 + v17) )
{
LOBYTE(v15) = v18 >= v20;
goto LABEL_10;
}
}
LOBYTE(v15) = 1;
}
}
return (unsigned int)v15;
}
| copyFrom:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV BL,0x1
TEST ECX,ECX
JZ 0x00102893
CMP EDX,-0x1
JZ 0x001028a4
MOV R14,RSI
MOV R15,RDI
MOV R12D,EDX
MOV EAX,ECX
MOV RBP,-0xffffffff
ADD RBP,R12
MOV qword ptr [RSP],RAX
LEA RBX,[RAX + -0x1]
XOR R13D,R13D
LAB_00102865:
MOVZX EDX,byte ptr [R14 + R13*0x1]
LEA ESI,[R12 + R13*0x1]
MOV RDI,R15
XOR ECX,ECX
CALL 0x001028c4
CMP RBX,R13
JZ 0x00102891
INC R13
MOV RAX,RBP
ADD RAX,R13
JNZ 0x00102865
CMP R13,qword ptr [RSP]
SETNC BL
JMP 0x001028a6
LAB_00102891:
MOV BL,0x1
LAB_00102893:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001028a4:
XOR EBX,EBX
LAB_001028a6:
LEA RDI,[0x1040d6]
MOV ESI,0xffffffff
XOR EAX,EAX
CALL 0x001021f0
JMP 0x00102893
|
/* MemoryManager::copyFrom(void const*, unsigned int, unsigned int) */
ulong __thiscall
MemoryManager::copyFrom(MemoryManager *this,void *param_1,uint param_2,uint param_3)
{
int8 unaff_RBX;
ulong uVar1;
int7 uVar2;
ulong uVar3;
uVar1 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if (param_3 != 0) {
if (param_2 == 0xffffffff) {
uVar1 = 0;
}
else {
uVar1 = (ulong)param_3 - 1;
uVar3 = 0;
do {
setByte((uint)this,(char)param_2 + (char)uVar3,
(uint *)(ulong)*(byte *)((long)param_1 + uVar3));
uVar2 = (int7)(uVar1 >> 8);
if (uVar1 == uVar3) {
uVar1 = CONCAT71(uVar2,1);
goto LAB_00102893;
}
uVar3 = uVar3 + 1;
} while (((ulong)param_2 - 0xffffffff) + uVar3 != 0);
uVar1 = CONCAT71(uVar2,param_3 <= uVar3);
}
dbgprintf("Data copy to invalid addr 0x%x!\n",0xffffffff);
}
LAB_00102893:
return uVar1 & 0xffffffff;
}
| |
52,563 | GetCurrentMonitor | csit-sgu[P]mit-game-2025-team-tyler/Libraries/raylib/src/platforms/rcore_desktop_glfw.c | int GetCurrentMonitor(void)
{
int index = 0;
int monitorCount = 0;
GLFWmonitor **monitors = glfwGetMonitors(&monitorCount);
GLFWmonitor *monitor = NULL;
if (monitorCount >= 1)
{
if (IsWindowFullscreen())
{
// Get the handle of the monitor that the specified window is in full screen on
monitor = glfwGetWindowMonitor(platform.handle);
for (int i = 0; i < monitorCount; i++)
{
if (monitors[i] == monitor)
{
index = i;
break;
}
}
}
else
{
// In case the window is between two monitors, we use below logic
// to try to detect the "current monitor" for that window, note that
// this is probably an overengineered solution for a very side case
// trying to match SDL behaviour
int closestDist = 0x7FFFFFFF;
// Window center position
int wcx = 0;
int wcy = 0;
glfwGetWindowPos(platform.handle, &wcx, &wcy);
wcx += (int)CORE.Window.screen.width/2;
wcy += (int)CORE.Window.screen.height/2;
for (int i = 0; i < monitorCount; i++)
{
// Monitor top-left position
int mx = 0;
int my = 0;
monitor = monitors[i];
glfwGetMonitorPos(monitor, &mx, &my);
const GLFWvidmode *mode = glfwGetVideoMode(monitor);
if (mode)
{
const int right = mx + mode->width - 1;
const int bottom = my + mode->height - 1;
if ((wcx >= mx) &&
(wcx <= right) &&
(wcy >= my) &&
(wcy <= bottom))
{
index = i;
break;
}
int xclosest = wcx;
if (wcx < mx) xclosest = mx;
else if (wcx > right) xclosest = right;
int yclosest = wcy;
if (wcy < my) yclosest = my;
else if (wcy > bottom) yclosest = bottom;
int dx = wcx - xclosest;
int dy = wcy - yclosest;
int dist = (dx*dx) + (dy*dy);
if (dist < closestDist)
{
index = i;
closestDist = dist;
}
}
else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor");
}
}
}
return index;
} | O3 | c | GetCurrentMonitor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x4(%rsp), %r15
movl $0x0, (%r15)
movq %r15, %rdi
callq 0xbf116
xorl %r12d, %r12d
cmpl $0x0, (%r15)
jle 0x6f82d
movq %rax, %r14
cmpb $0x1, 0xcc500(%rip) # 0x13bbcd
jne 0x6f706
movq 0xccfd2(%rip), %rdi # 0x13c6a8
callq 0xc1948
movslq 0x4(%rsp), %rcx
testq %rcx, %rcx
jle 0x6f82d
xorl %r12d, %r12d
cmpq %rax, (%r14,%r12,8)
je 0x6f82d
incq %r12
cmpq %r12, %rcx
jne 0x6f6ec
xorl %r12d, %r12d
jmp 0x6f82d
xorl %r12d, %r12d
leaq 0x14(%rsp), %r15
movl %r12d, (%r15)
leaq 0x10(%rsp), %rbx
movl %r12d, (%rbx)
movq 0xccf88(%rip), %rdi # 0x13c6a8
movq %r15, %rsi
movq %rbx, %rdx
callq 0xc0f0b
movl 0xcc4bb(%rip), %eax # 0x13bbec
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %ecx, (%r15)
movl 0xcc4ad(%rip), %eax # 0x13bbf0
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %ecx, (%rbx)
cmpl %r12d, 0x4(%rsp)
jle 0x6f82d
movl $0x7fffffff, %r13d # imm = 0x7FFFFFFF
xorl %r15d, %r15d
xorl %ebx, %ebx
xorl %r12d, %r12d
movl %r15d, 0xc(%rsp)
movl %r15d, 0x8(%rsp)
movq (%r14,%rbx,8), %rbp
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0xbf1ae
movq %rbp, %rdi
callq 0xbf4ff
testq %rax, %rax
je 0x6f804
movl 0xc(%rsp), %edi
movl (%rax), %r9d
movl 0x4(%rax), %esi
leal (%r9,%rdi), %r10d
movl 0x8(%rsp), %edx
leal (%rsi,%rdx), %r8d
movl 0x14(%rsp), %ecx
movl 0x10(%rsp), %eax
cmpl %edi, %ecx
jl 0x6f7c4
cmpl %r10d, %ecx
jge 0x6f7c4
cmpl %edx, %eax
jl 0x6f7c4
cmpl %r8d, %eax
jl 0x6f82a
movl %ecx, %r11d
cmpl %r10d, %ecx
jl 0x6f7d3
leal (%r9,%rdi), %r11d
decl %r11d
cmpl %edi, %ecx
cmovll %edi, %r11d
movl %eax, %edi
cmpl %r8d, %eax
jl 0x6f7e5
leal (%rsi,%rdx), %edi
decl %edi
cmpl %edx, %eax
cmovll %edx, %edi
subl %r11d, %ecx
subl %edi, %eax
imull %ecx, %ecx
imull %eax, %eax
addl %ecx, %eax
cmpl %r13d, %eax
cmovll %eax, %r13d
cmovll %ebx, %r12d
jmp 0x6f817
movl $0x4, %edi
leaq 0x700bd(%rip), %rsi # 0xdf8cd
xorl %eax, %eax
callq 0xb9e53
incq %rbx
movslq 0x4(%rsp), %rax
cmpq %rax, %rbx
jl 0x6f767
jmp 0x6f82d
movl %ebx, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| GetCurrentMonitor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
lea r15, [rsp+48h+var_44]
mov dword ptr [r15], 0
mov rdi, r15
call glfwGetMonitors
xor r12d, r12d
cmp dword ptr [r15], 0
jle loc_6F82D
mov r14, rax
cmp cs:byte_13BBCD, 1
jnz short loc_6F706
mov rdi, cs:platform_0
call glfwGetWindowMonitor
movsxd rcx, [rsp+48h+var_44]
test rcx, rcx
jle loc_6F82D
xor r12d, r12d
loc_6F6EC:
cmp [r14+r12*8], rax
jz loc_6F82D
inc r12
cmp rcx, r12
jnz short loc_6F6EC
xor r12d, r12d
jmp loc_6F82D
loc_6F706:
xor r12d, r12d
lea r15, [rsp+48h+var_34]
mov [r15], r12d
lea rbx, [rsp+48h+var_38]
mov [rbx], r12d
mov rdi, cs:platform_0
mov rsi, r15
mov rdx, rbx
call glfwGetWindowPos
mov eax, dword ptr cs:qword_13BBEC
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
add [r15], ecx
mov eax, dword ptr cs:qword_13BBEC+4
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
add [rbx], ecx
cmp [rsp+48h+var_44], r12d
jle loc_6F82D
mov r13d, 7FFFFFFFh
xor r15d, r15d
xor ebx, ebx
xor r12d, r12d
loc_6F767:
mov [rsp+48h+var_3C], r15d
mov [rsp+48h+var_40], r15d
mov rbp, [r14+rbx*8]
mov rdi, rbp
lea rsi, [rsp+48h+var_3C]
lea rdx, [rsp+48h+var_40]
call glfwGetMonitorPos
mov rdi, rbp
call glfwGetVideoMode
test rax, rax
jz short loc_6F804
mov edi, [rsp+48h+var_3C]
mov r9d, [rax]
mov esi, [rax+4]
lea r10d, [r9+rdi]
mov edx, [rsp+48h+var_40]
lea r8d, [rsi+rdx]
mov ecx, [rsp+48h+var_34]
mov eax, [rsp+48h+var_38]
cmp ecx, edi
jl short loc_6F7C4
cmp ecx, r10d
jge short loc_6F7C4
cmp eax, edx
jl short loc_6F7C4
cmp eax, r8d
jl short loc_6F82A
loc_6F7C4:
mov r11d, ecx
cmp ecx, r10d
jl short loc_6F7D3
lea r11d, [r9+rdi]
dec r11d
loc_6F7D3:
cmp ecx, edi
cmovl r11d, edi
mov edi, eax
cmp eax, r8d
jl short loc_6F7E5
lea edi, [rsi+rdx]
dec edi
loc_6F7E5:
cmp eax, edx
cmovl edi, edx
sub ecx, r11d
sub eax, edi
imul ecx, ecx
imul eax, eax
add eax, ecx
cmp eax, r13d
cmovl r13d, eax
cmovl r12d, ebx
jmp short loc_6F817
loc_6F804:
mov edi, 4
lea rsi, aGlfwFailedToFi; "GLFW: Failed to find video mode for sel"...
xor eax, eax
call TraceLog
loc_6F817:
inc rbx
movsxd rax, [rsp+48h+var_44]
cmp rbx, rax
jl loc_6F767
jmp short loc_6F82D
loc_6F82A:
mov r12d, ebx
loc_6F82D:
mov eax, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long GetCurrentMonitor()
{
long long Monitors; // rax
long long v1; // r12
long long v2; // r14
long long WindowMonitor; // rax
int v4; // r13d
long long v5; // rbx
long long v6; // rbp
_DWORD *VideoMode; // rax
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v12; // esi
int v13; // r10d
int v14; // r8d
int v15; // r11d
int v16; // edi
int v18; // [rsp+4h] [rbp-44h] BYREF
int v19; // [rsp+8h] [rbp-40h] BYREF
int v20; // [rsp+Ch] [rbp-3Ch] BYREF
int v21; // [rsp+10h] [rbp-38h] BYREF
int v22[13]; // [rsp+14h] [rbp-34h] BYREF
v18 = 0;
Monitors = glfwGetMonitors(&v18);
LODWORD(v1) = 0;
if ( v18 > 0 )
{
v2 = Monitors;
if ( byte_13BBCD == 1 )
{
WindowMonitor = glfwGetWindowMonitor(platform_0);
if ( v18 > 0 )
{
v1 = 0LL;
while ( *(_QWORD *)(v2 + 8 * v1) != WindowMonitor )
{
if ( v18 == ++v1 )
{
LODWORD(v1) = 0;
return (unsigned int)v1;
}
}
}
}
else
{
LODWORD(v1) = 0;
v22[0] = 0;
v21 = 0;
glfwGetWindowPos(platform_0, v22, &v21);
v22[0] += (int)qword_13BBEC / 2;
v21 += SHIDWORD(qword_13BBEC) / 2;
if ( v18 > 0 )
{
v4 = 0x7FFFFFFF;
v5 = 0LL;
LODWORD(v1) = 0;
do
{
v20 = 0;
v19 = 0;
v6 = *(_QWORD *)(v2 + 8 * v5);
glfwGetMonitorPos(v6, &v20, &v19);
VideoMode = (_DWORD *)glfwGetVideoMode(v6);
if ( VideoMode )
{
v12 = VideoMode[1];
v13 = *VideoMode + v20;
v14 = v12 + v19;
if ( v22[0] >= v20 && v22[0] < v13 && v21 >= v19 && v21 < v14 )
{
LODWORD(v1) = v5;
return (unsigned int)v1;
}
v15 = v22[0];
if ( v22[0] >= v13 )
v15 = *VideoMode + v20 - 1;
if ( v22[0] < v20 )
v15 = v20;
v16 = v21;
if ( v21 >= v14 )
v16 = v12 + v19 - 1;
if ( v21 < v19 )
v16 = v19;
if ( (v22[0] - v15) * (v22[0] - v15) + (v21 - v16) * (v21 - v16) < v4 )
{
v4 = (v22[0] - v15) * (v22[0] - v15) + (v21 - v16) * (v21 - v16);
LODWORD(v1) = v5;
}
}
else
{
TraceLog(4, (unsigned int)"GLFW: Failed to find video mode for selected monitor", v8, v9, v10, v11);
}
++v5;
}
while ( v5 < v18 );
}
}
}
return (unsigned int)v1;
}
| GetCurrentMonitor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
LEA R15,[RSP + 0x4]
MOV dword ptr [R15],0x0
MOV RDI,R15
CALL 0x001bf116
XOR R12D,R12D
CMP dword ptr [R15],0x0
JLE 0x0016f82d
MOV R14,RAX
CMP byte ptr [0x0023bbcd],0x1
JNZ 0x0016f706
MOV RDI,qword ptr [0x0023c6a8]
CALL 0x001c1948
MOVSXD RCX,dword ptr [RSP + 0x4]
TEST RCX,RCX
JLE 0x0016f82d
XOR R12D,R12D
LAB_0016f6ec:
CMP qword ptr [R14 + R12*0x8],RAX
JZ 0x0016f82d
INC R12
CMP RCX,R12
JNZ 0x0016f6ec
XOR R12D,R12D
JMP 0x0016f82d
LAB_0016f706:
XOR R12D,R12D
LEA R15,[RSP + 0x14]
MOV dword ptr [R15],R12D
LEA RBX,[RSP + 0x10]
MOV dword ptr [RBX],R12D
MOV RDI,qword ptr [0x0023c6a8]
MOV RSI,R15
MOV RDX,RBX
CALL 0x001c0f0b
MOV EAX,dword ptr [0x0023bbec]
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
ADD dword ptr [R15],ECX
MOV EAX,dword ptr [0x0023bbf0]
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
ADD dword ptr [RBX],ECX
CMP dword ptr [RSP + 0x4],R12D
JLE 0x0016f82d
MOV R13D,0x7fffffff
XOR R15D,R15D
XOR EBX,EBX
XOR R12D,R12D
LAB_0016f767:
MOV dword ptr [RSP + 0xc],R15D
MOV dword ptr [RSP + 0x8],R15D
MOV RBP,qword ptr [R14 + RBX*0x8]
MOV RDI,RBP
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0x8]
CALL 0x001bf1ae
MOV RDI,RBP
CALL 0x001bf4ff
TEST RAX,RAX
JZ 0x0016f804
MOV EDI,dword ptr [RSP + 0xc]
MOV R9D,dword ptr [RAX]
MOV ESI,dword ptr [RAX + 0x4]
LEA R10D,[R9 + RDI*0x1]
MOV EDX,dword ptr [RSP + 0x8]
LEA R8D,[RSI + RDX*0x1]
MOV ECX,dword ptr [RSP + 0x14]
MOV EAX,dword ptr [RSP + 0x10]
CMP ECX,EDI
JL 0x0016f7c4
CMP ECX,R10D
JGE 0x0016f7c4
CMP EAX,EDX
JL 0x0016f7c4
CMP EAX,R8D
JL 0x0016f82a
LAB_0016f7c4:
MOV R11D,ECX
CMP ECX,R10D
JL 0x0016f7d3
LEA R11D,[R9 + RDI*0x1]
DEC R11D
LAB_0016f7d3:
CMP ECX,EDI
CMOVL R11D,EDI
MOV EDI,EAX
CMP EAX,R8D
JL 0x0016f7e5
LEA EDI,[RSI + RDX*0x1]
DEC EDI
LAB_0016f7e5:
CMP EAX,EDX
CMOVL EDI,EDX
SUB ECX,R11D
SUB EAX,EDI
IMUL ECX,ECX
IMUL EAX,EAX
ADD EAX,ECX
CMP EAX,R13D
CMOVL R13D,EAX
CMOVL R12D,EBX
JMP 0x0016f817
LAB_0016f804:
MOV EDI,0x4
LEA RSI,[0x1df8cd]
XOR EAX,EAX
CALL 0x001b9e53
LAB_0016f817:
INC RBX
MOVSXD RAX,dword ptr [RSP + 0x4]
CMP RBX,RAX
JL 0x0016f767
JMP 0x0016f82d
LAB_0016f82a:
MOV R12D,EBX
LAB_0016f82d:
MOV EAX,R12D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong GetCurrentMonitor(void)
{
int iVar1;
int8 uVar2;
long lVar3;
long lVar4;
int *piVar5;
ulong uVar6;
int iVar7;
int iVar8;
ulong uVar9;
int iVar10;
int local_44;
int local_40;
int local_3c;
int local_38;
int local_34;
local_44 = 0;
lVar3 = glfwGetMonitors(&local_44);
uVar9 = 0;
if (0 < local_44) {
if (DAT_0023bbcd == '\x01') {
lVar4 = glfwGetWindowMonitor(platform_0);
if (0 < (long)local_44) {
uVar9 = 0;
do {
if (*(long *)(lVar3 + uVar9 * 8) == lVar4) goto LAB_0016f82d;
uVar9 = uVar9 + 1;
} while ((long)local_44 != uVar9);
uVar9 = 0;
}
}
else {
uVar9 = 0;
local_34 = 0;
local_38 = 0;
glfwGetWindowPos(platform_0,&local_34,&local_38);
local_34 = local_34 + DAT_0023bbec / 2;
local_38 = local_38 + DAT_0023bbf0 / 2;
if (0 < local_44) {
iVar10 = 0x7fffffff;
uVar6 = 0;
uVar9 = 0;
do {
local_3c = 0;
local_40 = 0;
uVar2 = *(int8 *)(lVar3 + uVar6 * 8);
glfwGetMonitorPos(uVar2,&local_3c,&local_40);
piVar5 = (int *)glfwGetVideoMode(uVar2);
if (piVar5 == (int *)0x0) {
TraceLog(4,"GLFW: Failed to find video mode for selected monitor");
}
else {
iVar7 = *piVar5 + local_3c;
iVar1 = piVar5[1] + local_40;
if ((((local_3c <= local_34) && (local_34 < iVar7)) && (local_40 <= local_38)) &&
(local_38 < iVar1)) {
uVar9 = uVar6 & 0xffffffff;
break;
}
iVar8 = local_34;
if (iVar7 <= local_34) {
iVar8 = *piVar5 + local_3c + -1;
}
if (local_34 < local_3c) {
iVar8 = local_3c;
}
iVar7 = local_38;
if (iVar1 <= local_38) {
iVar7 = piVar5[1] + local_40 + -1;
}
if (local_38 < local_40) {
iVar7 = local_40;
}
iVar7 = (local_38 - iVar7) * (local_38 - iVar7) +
(local_34 - iVar8) * (local_34 - iVar8);
if (iVar7 < iVar10) {
uVar9 = uVar6 & 0xffffffff;
iVar10 = iVar7;
}
}
uVar6 = uVar6 + 1;
} while ((long)uVar6 < (long)local_44);
}
}
}
LAB_0016f82d:
return uVar9 & 0xffffffff;
}
| |
52,564 | nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*) | ng-log[P]ng-log/src/logging.cc | void InstallPrefixFormatter(PrefixFormatterCallback callback, void* data) {
if (callback != nullptr) {
g_prefix_formatter = std::make_unique<PrefixFormatter>(callback, data);
} else {
g_prefix_formatter = nullptr;
}
} | O3 | cpp | nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*):
testq %rdi, %rdi
je 0xf0a7
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x18, %edi
callq 0x92e0
movl $0x0, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x23b47(%rip), %rdi # 0x32bd0
movq %rax, 0x23b40(%rip) # 0x32bd0
testq %rdi, %rdi
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r14
je 0xf0be
movl $0x18, %esi
jmp 0x932c
movq 0x23b22(%rip), %rdi # 0x32bd0
movq $0x0, 0x23b17(%rip) # 0x32bd0
testq %rdi, %rdi
jne 0xf09d
retq
| _ZN5nglog22InstallPrefixFormatterEPFvRSoRKNS_10LogMessageEPvES4_:
test rdi, rdi
jz short loc_F0A7
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov edi, 18h; unsigned __int64
call _Znwm; operator new(ulong)
mov dword ptr [rax], 0
mov [rax+8], r14
mov [rax+10h], rbx
mov rdi, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; void *
mov cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE, rax; nglog::`anonymous namespace'::g_prefix_formatter
test rdi, rdi
lea rsp, [rsp+8]
pop rbx
pop r14
jz short locret_F0BE
loc_F09D:
mov esi, 18h; unsigned __int64
jmp _ZdlPvm; operator delete(void *,ulong)
loc_F0A7:
mov rdi, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; nglog::`anonymous namespace'::g_prefix_formatter
mov cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE, 0; nglog::`anonymous namespace'::g_prefix_formatter
test rdi, rdi
jnz short loc_F09D
locret_F0BE:
retn
| void nglog::InstallPrefixFormatter(
nglog *this,
void (*a2)(std::ostream *, const nglog::LogMessage *, void *),
void *a3)
{
_QWORD *v3; // rax
void *v4; // rdi
if ( this )
{
v3 = (_QWORD *)operator new(24LL);
*(_DWORD *)v3 = 0;
v3[1] = this;
v3[2] = a2;
v4 = nglog::`anonymous namespace'::g_prefix_formatter;
nglog::`anonymous namespace'::g_prefix_formatter = v3;
if ( !v4 )
return;
goto LABEL_3;
}
v4 = nglog::`anonymous namespace'::g_prefix_formatter;
nglog::`anonymous namespace'::g_prefix_formatter = 0LL;
if ( v4 )
LABEL_3:
operator delete(v4);
}
| InstallPrefixFormatter:
TEST RDI,RDI
JZ 0x0010f0a7
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV EDI,0x18
CALL 0x001092e0
MOV dword ptr [RAX],0x0
MOV qword ptr [RAX + 0x8],R14
MOV qword ptr [RAX + 0x10],RBX
MOV RDI,qword ptr [0x00132bd0]
MOV qword ptr [0x00132bd0],RAX
TEST RDI,RDI
LEA RSP,[RSP + 0x8]
POP RBX
POP R14
JZ 0x0010f0be
LAB_0010f09d:
MOV ESI,0x18
JMP 0x0010932c
LAB_0010f0a7:
MOV RDI,qword ptr [0x00132bd0]
MOV qword ptr [0x00132bd0],0x0
TEST RDI,RDI
JNZ 0x0010f09d
LAB_0010f0be:
RET
|
/* nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*) */
void nglog::InstallPrefixFormatter
(_func_void_ostream_ptr_LogMessage_ptr_void_ptr *param_1,void *param_2)
{
int4 *puVar1;
void *pvVar2;
bool bVar3;
pvVar2 = (anonymous_namespace)::g_prefix_formatter;
if (param_1 == (_func_void_ostream_ptr_LogMessage_ptr_void_ptr *)0x0) {
(anonymous_namespace)::g_prefix_formatter = (int4 *)0x0;
if (pvVar2 == (void *)0x0) {
(anonymous_namespace)::g_prefix_formatter = (int4 *)0x0;
return;
}
}
else {
puVar1 = (int4 *)operator_new(0x18);
*puVar1 = 0;
*(_func_void_ostream_ptr_LogMessage_ptr_void_ptr **)(puVar1 + 2) = param_1;
*(void **)(puVar1 + 4) = param_2;
bVar3 = (anonymous_namespace)::g_prefix_formatter == (int4 *)0x0;
pvVar2 = (anonymous_namespace)::g_prefix_formatter;
(anonymous_namespace)::g_prefix_formatter = puVar1;
if (bVar3) {
return;
}
}
operator_delete(pvVar2,0x18);
return;
}
| |
52,565 | PycData::get64() | Pyarmor-Static-Unpack-1shot/data.cpp | Pyc_INT64 PycData::get64()
{
/* Ensure endianness */
Pyc_INT64 result = (Pyc_INT64)(getByte() & 0xFF);
result |= (Pyc_INT64)(getByte() & 0xFF) << 8;
result |= (Pyc_INT64)(getByte() & 0xFF) << 16;
result |= (Pyc_INT64)(getByte() & 0xFF) << 24;
result |= (Pyc_INT64)(getByte() & 0xFF) << 32;
result |= (Pyc_INT64)(getByte() & 0xFF) << 40;
result |= (Pyc_INT64)(getByte() & 0xFF) << 48;
result |= (Pyc_INT64)(getByte() & 0xFF) << 56;
return result;
} | O3 | cpp | PycData::get64():
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %r14d
movl $0xff, %r12d
andl %r12d, %r14d
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
shll $0x8, %eax
movzwl %ax, %r15d
orl %r14d, %r15d
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movl %eax, %r14d
andl %r12d, %r14d
shll $0x10, %r14d
orl %r15d, %r14d
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movl %eax, %r15d
shll $0x18, %r15d
orl %r14d, %r15d
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movl %eax, %r14d
andl %r12d, %r14d
shlq $0x20, %r14
orq %r15, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movl %eax, %r15d
andl %r12d, %r15d
shlq $0x28, %r15
orq %r14, %r15
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movl %eax, %r14d
andl %r12d, %r14d
shlq $0x30, %r14
orq %r15, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
shlq $0x38, %rax
orq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN7PycData5get64Ev:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
mov rax, [rdi]
call qword ptr [rax+20h]
mov r14d, eax
mov r12d, 0FFh
and r14d, r12d
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+20h]
shl eax, 8
movzx r15d, ax
or r15d, r14d
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+20h]
mov r14d, eax
and r14d, r12d
shl r14d, 10h
or r14d, r15d
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+20h]
mov r15d, eax
shl r15d, 18h
or r15d, r14d
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+20h]
mov r14d, eax
and r14d, r12d
shl r14, 20h
or r14, r15
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+20h]
mov r15d, eax
and r15d, r12d
shl r15, 28h
or r15, r14
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+20h]
mov r14d, eax
and r14d, r12d
shl r14, 30h
or r14, r15
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+20h]
shl rax, 38h
or rax, r14
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| unsigned long long PycData::get64(PycData *this)
{
int v2; // r14d
int v3; // r15d
int v4; // r14d
long long v5; // r15
unsigned long long v6; // r14
unsigned long long v7; // r15
unsigned long long v8; // r14
v2 = (*(unsigned __int8 ( **)(PycData *))(*(_QWORD *)this + 32LL))(this);
v3 = v2 | (unsigned __int16)((*(unsigned __int16 ( **)(PycData *))(*(_QWORD *)this + 32LL))(this) << 8);
v4 = v3 | ((*(unsigned __int8 ( **)(PycData *))(*(_QWORD *)this + 32LL))(this) << 16);
v5 = v4 | ((*(unsigned int ( **)(PycData *))(*(_QWORD *)this + 32LL))(this) << 24);
v6 = v5 | ((unsigned long long)(*(unsigned __int8 ( **)(PycData *))(*(_QWORD *)this + 32LL))(this) << 32);
v7 = v6 | ((unsigned long long)(*(unsigned __int8 ( **)(PycData *))(*(_QWORD *)this + 32LL))(this) << 40);
v8 = v7 | ((unsigned long long)(*(unsigned __int8 ( **)(PycData *))(*(_QWORD *)this + 32LL))(this) << 48);
return v8 | ((*(long long ( **)(PycData *))(*(_QWORD *)this + 32LL))(this) << 56);
}
| get64:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x20]
MOV R14D,EAX
MOV R12D,0xff
AND R14D,R12D
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x20]
SHL EAX,0x8
MOVZX R15D,AX
OR R15D,R14D
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x20]
MOV R14D,EAX
AND R14D,R12D
SHL R14D,0x10
OR R14D,R15D
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x20]
MOV R15D,EAX
SHL R15D,0x18
OR R15D,R14D
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x20]
MOV R14D,EAX
AND R14D,R12D
SHL R14,0x20
OR R14,R15
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x20]
MOV R15D,EAX
AND R15D,R12D
SHL R15,0x28
OR R15,R14
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x20]
MOV R14D,EAX
AND R14D,R12D
SHL R14,0x30
OR R14,R15
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x20]
SHL RAX,0x38
OR RAX,R14
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* PycData::get64() */
ulong __thiscall PycData::get64(PycData *this)
{
uint uVar1;
uint uVar2;
uint uVar3;
int iVar4;
int4 uVar5;
uint uVar6;
uint uVar7;
long lVar8;
uVar1 = (**(code **)(*(long *)this + 0x20))();
uVar2 = (**(code **)(*(long *)this + 0x20))(this);
uVar3 = (**(code **)(*(long *)this + 0x20))(this);
iVar4 = (**(code **)(*(long *)this + 0x20))(this);
uVar5 = (**(code **)(*(long *)this + 0x20))(this);
uVar6 = (**(code **)(*(long *)this + 0x20))(this);
uVar7 = (**(code **)(*(long *)this + 0x20))(this);
lVar8 = (**(code **)(*(long *)this + 0x20))(this);
return lVar8 << 0x38 |
(ulong)(uVar7 & 0xff) << 0x30 |
(ulong)(uVar6 & 0xff) << 0x28 |
CONCAT44(uVar5,iVar4 << 0x18 | (uVar3 & 0xff) << 0x10 | (uVar2 & 0xff) << 8 | uVar1 & 0xff)
& 0xffffffffff;
}
| |
52,566 | my_open_parent_dir_nosymlinks | eloqsql/mysys/my_symlink.c | const char *my_open_parent_dir_nosymlinks(const char *pathname, int *pdfd)
{
char buf[FN_REFLEN + 1];
char *s= buf, *e= buf+1, *end= strnmov(buf, pathname, sizeof(buf));
int fd, dfd= -1;
if (*end)
{
errno= ENAMETOOLONG;
return NULL;
}
if (*s != '/') /* not an absolute path */
{
errno= ENOENT;
return NULL;
}
for (;;)
{
if (*e == '/') /* '//' in the path */
{
errno= ENOENT;
goto err;
}
while (*e && *e != '/')
e++;
*e= 0;
if (!memcmp(s, ".", 2) || !memcmp(s, "..", 3))
{
errno= ENOENT;
goto err;
}
if (++e >= end)
{
*pdfd= dfd;
return pathname + (s - buf);
}
fd = openat(dfd, s, O_NOFOLLOW | O_PATH | O_CLOEXEC);
if (fd < 0)
goto err;
if (dfd >= 0)
close(dfd);
dfd= fd;
s= e;
}
err:
if (dfd >= 0)
close(dfd);
return NULL;
} | O0 | c | my_open_parent_dir_nosymlinks:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp # imm = 0x260
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x220(%rbp)
movq %rsi, -0x228(%rbp)
leaq -0x210(%rbp), %rax
movq %rax, -0x230(%rbp)
leaq -0x210(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x238(%rbp)
leaq -0x210(%rbp), %rdi
movq -0x220(%rbp), %rsi
movl $0x201, %edx # imm = 0x201
callq 0xace70
movq %rax, -0x240(%rbp)
movl $0xffffffff, -0x248(%rbp) # imm = 0xFFFFFFFF
movq -0x240(%rbp), %rax
cmpb $0x0, (%rax)
je 0x5ac26
callq 0x26050
movl $0x24, (%rax)
movq $0x0, -0x218(%rbp)
jmp 0x5adda
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x5ac50
callq 0x26050
movl $0x2, (%rax)
movq $0x0, -0x218(%rbp)
jmp 0x5adda
jmp 0x5ac52
movq -0x238(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x5ac71
callq 0x26050
movl $0x2, (%rax)
jmp 0x5adbb
jmp 0x5ac73
movq -0x238(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x249(%rbp)
je 0x5aca0
movq -0x238(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
setne %al
movb %al, -0x249(%rbp)
movb -0x249(%rbp), %al
testb $0x1, %al
jne 0x5acac
jmp 0x5acc0
movq -0x238(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x238(%rbp)
jmp 0x5ac73
movq -0x238(%rbp), %rax
movb $0x0, (%rax)
movq -0x230(%rbp), %rax
movw (%rax), %ax
subw $0x2e, %ax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x5ad00
movq -0x230(%rbp), %rdi
leaq 0x55ba5(%rip), %rsi # 0xb0896
movl $0x3, %edx
callq 0x26160
cmpl $0x0, %eax
jne 0x5ad10
callq 0x26050
movl $0x2, (%rax)
jmp 0x5adbb
movq -0x238(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x238(%rbp)
cmpq -0x240(%rbp), %rax
jb 0x5ad5e
movl -0x248(%rbp), %ecx
movq -0x228(%rbp), %rax
movl %ecx, (%rax)
movq -0x220(%rbp), %rax
movq -0x230(%rbp), %rcx
leaq -0x210(%rbp), %rdx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x218(%rbp)
jmp 0x5adda
movl -0x248(%rbp), %edi
movq -0x230(%rbp), %rsi
movl $0x2a0000, %edx # imm = 0x2A0000
movb $0x0, %al
callq 0x26300
movl %eax, -0x244(%rbp)
cmpl $0x0, -0x244(%rbp)
jge 0x5ad88
jmp 0x5adbb
cmpl $0x0, -0x248(%rbp)
jl 0x5ad9c
movl -0x248(%rbp), %edi
callq 0x26640
movl -0x244(%rbp), %eax
movl %eax, -0x248(%rbp)
movq -0x238(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0x5ac52
cmpl $0x0, -0x248(%rbp)
jl 0x5adcf
movl -0x248(%rbp), %edi
callq 0x26640
movq $0x0, -0x218(%rbp)
movq -0x218(%rbp), %rax
movq %rax, -0x258(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5ae0a
movq -0x258(%rbp), %rax
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
callq 0x26360
nop
| my_open_parent_dir_nosymlinks:
push rbp
mov rbp, rsp
sub rsp, 260h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_220], rdi
mov [rbp+var_228], rsi
lea rax, [rbp+var_210]
mov [rbp+var_230], rax
lea rax, [rbp+var_210]
add rax, 1
mov [rbp+var_238], rax
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_220]
mov edx, 201h
call strnmov
mov [rbp+var_240], rax
mov [rbp+var_248], 0FFFFFFFFh
mov rax, [rbp+var_240]
cmp byte ptr [rax], 0
jz short loc_5AC26
call ___errno_location
mov dword ptr [rax], 24h ; '$'
mov [rbp+var_218], 0
jmp loc_5ADDA
loc_5AC26:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jz short loc_5AC50
call ___errno_location
mov dword ptr [rax], 2
mov [rbp+var_218], 0
jmp loc_5ADDA
loc_5AC50:
jmp short $+2
loc_5AC52:
mov rax, [rbp+var_238]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_5AC71
call ___errno_location
mov dword ptr [rax], 2
jmp loc_5ADBB
loc_5AC71:
jmp short $+2
loc_5AC73:
mov rax, [rbp+var_238]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_249], al
jz short loc_5ACA0
mov rax, [rbp+var_238]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
setnz al
mov [rbp+var_249], al
loc_5ACA0:
mov al, [rbp+var_249]
test al, 1
jnz short loc_5ACAC
jmp short loc_5ACC0
loc_5ACAC:
mov rax, [rbp+var_238]
add rax, 1
mov [rbp+var_238], rax
jmp short loc_5AC73
loc_5ACC0:
mov rax, [rbp+var_238]
mov byte ptr [rax], 0
mov rax, [rbp+var_230]
mov ax, [rax]
sub ax, 2Eh ; '.'
setnz al
movzx eax, al
cmp eax, 0
jz short loc_5AD00
mov rdi, [rbp+var_230]
lea rsi, asc_B0896; ".."
mov edx, 3
call _memcmp
cmp eax, 0
jnz short loc_5AD10
loc_5AD00:
call ___errno_location
mov dword ptr [rax], 2
jmp loc_5ADBB
loc_5AD10:
mov rax, [rbp+var_238]
add rax, 1
mov [rbp+var_238], rax
cmp rax, [rbp+var_240]
jb short loc_5AD5E
mov ecx, [rbp+var_248]
mov rax, [rbp+var_228]
mov [rax], ecx
mov rax, [rbp+var_220]
mov rcx, [rbp+var_230]
lea rdx, [rbp+var_210]
sub rcx, rdx
add rax, rcx
mov [rbp+var_218], rax
jmp short loc_5ADDA
loc_5AD5E:
mov edi, [rbp+var_248]
mov rsi, [rbp+var_230]
mov edx, offset unk_2A0000
mov al, 0
call _openat64
mov [rbp+var_244], eax
cmp [rbp+var_244], 0
jge short loc_5AD88
jmp short loc_5ADBB
loc_5AD88:
cmp [rbp+var_248], 0
jl short loc_5AD9C
mov edi, [rbp+var_248]
call _close
loc_5AD9C:
mov eax, [rbp+var_244]
mov [rbp+var_248], eax
mov rax, [rbp+var_238]
mov [rbp+var_230], rax
jmp loc_5AC52
loc_5ADBB:
cmp [rbp+var_248], 0
jl short loc_5ADCF
mov edi, [rbp+var_248]
call _close
loc_5ADCF:
mov [rbp+var_218], 0
loc_5ADDA:
mov rax, [rbp+var_218]
mov [rbp+var_258], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5AE0A
mov rax, [rbp+var_258]
add rsp, 260h
pop rbp
retn
loc_5AE0A:
call ___stack_chk_fail
| long long my_open_parent_dir_nosymlinks(long long a1, int *a2)
{
bool v3; // [rsp+17h] [rbp-249h]
int v4; // [rsp+18h] [rbp-248h]
int v5; // [rsp+1Ch] [rbp-244h]
const char *v6; // [rsp+20h] [rbp-240h]
const char *v7; // [rsp+28h] [rbp-238h]
const char *v8; // [rsp+30h] [rbp-230h]
char v10; // [rsp+50h] [rbp-210h] BYREF
_BYTE v11[527]; // [rsp+51h] [rbp-20Fh] BYREF
*(_QWORD *)&v11[519] = __readfsqword(0x28u);
v8 = &v10;
v7 = v11;
v6 = (const char *)strnmov(&v10, a1, 513LL);
v4 = -1;
if ( *v6 )
{
*(_DWORD *)__errno_location() = 36;
return 0LL;
}
else if ( v10 == 47 )
{
while ( *v7 != 47 )
{
while ( 1 )
{
v3 = 0;
if ( *v7 )
v3 = *v7 != 47;
if ( !v3 )
break;
++v7;
}
*v7 = 0;
if ( *(_WORD *)v8 == 46 || !(unsigned int)strcmp(v8, "..") )
break;
if ( ++v7 >= v6 )
{
*a2 = v4;
return v8 - &v10 + a1;
}
v5 = openat64((unsigned int)v4, v8, &unk_2A0000);
if ( v5 < 0 )
goto LABEL_20;
if ( v4 >= 0 )
close((unsigned int)v4);
v4 = v5;
v8 = v7;
}
*(_DWORD *)__errno_location() = 2;
LABEL_20:
if ( v4 >= 0 )
close((unsigned int)v4);
return 0LL;
}
else
{
*(_DWORD *)__errno_location() = 2;
return 0LL;
}
}
| my_open_parent_dir_nosymlinks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x260
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x220],RDI
MOV qword ptr [RBP + -0x228],RSI
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x230],RAX
LEA RAX,[RBP + -0x210]
ADD RAX,0x1
MOV qword ptr [RBP + -0x238],RAX
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x220]
MOV EDX,0x201
CALL 0x001ace70
MOV qword ptr [RBP + -0x240],RAX
MOV dword ptr [RBP + -0x248],0xffffffff
MOV RAX,qword ptr [RBP + -0x240]
CMP byte ptr [RAX],0x0
JZ 0x0015ac26
CALL 0x00126050
MOV dword ptr [RAX],0x24
MOV qword ptr [RBP + -0x218],0x0
JMP 0x0015adda
LAB_0015ac26:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JZ 0x0015ac50
CALL 0x00126050
MOV dword ptr [RAX],0x2
MOV qword ptr [RBP + -0x218],0x0
JMP 0x0015adda
LAB_0015ac50:
JMP 0x0015ac52
LAB_0015ac52:
MOV RAX,qword ptr [RBP + -0x238]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0015ac71
CALL 0x00126050
MOV dword ptr [RAX],0x2
JMP 0x0015adbb
LAB_0015ac71:
JMP 0x0015ac73
LAB_0015ac73:
MOV RAX,qword ptr [RBP + -0x238]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x249],AL
JZ 0x0015aca0
MOV RAX,qword ptr [RBP + -0x238]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
SETNZ AL
MOV byte ptr [RBP + -0x249],AL
LAB_0015aca0:
MOV AL,byte ptr [RBP + -0x249]
TEST AL,0x1
JNZ 0x0015acac
JMP 0x0015acc0
LAB_0015acac:
MOV RAX,qword ptr [RBP + -0x238]
ADD RAX,0x1
MOV qword ptr [RBP + -0x238],RAX
JMP 0x0015ac73
LAB_0015acc0:
MOV RAX,qword ptr [RBP + -0x238]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x230]
MOV AX,word ptr [RAX]
SUB AX,0x2e
SETNZ AL
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0015ad00
MOV RDI,qword ptr [RBP + -0x230]
LEA RSI,[0x1b0896]
MOV EDX,0x3
CALL 0x00126160
CMP EAX,0x0
JNZ 0x0015ad10
LAB_0015ad00:
CALL 0x00126050
MOV dword ptr [RAX],0x2
JMP 0x0015adbb
LAB_0015ad10:
MOV RAX,qword ptr [RBP + -0x238]
ADD RAX,0x1
MOV qword ptr [RBP + -0x238],RAX
CMP RAX,qword ptr [RBP + -0x240]
JC 0x0015ad5e
MOV ECX,dword ptr [RBP + -0x248]
MOV RAX,qword ptr [RBP + -0x228]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x220]
MOV RCX,qword ptr [RBP + -0x230]
LEA RDX,[RBP + -0x210]
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x218],RAX
JMP 0x0015adda
LAB_0015ad5e:
MOV EDI,dword ptr [RBP + -0x248]
MOV RSI,qword ptr [RBP + -0x230]
MOV EDX,0x2a0000
MOV AL,0x0
CALL 0x00126300
MOV dword ptr [RBP + -0x244],EAX
CMP dword ptr [RBP + -0x244],0x0
JGE 0x0015ad88
JMP 0x0015adbb
LAB_0015ad88:
CMP dword ptr [RBP + -0x248],0x0
JL 0x0015ad9c
MOV EDI,dword ptr [RBP + -0x248]
CALL 0x00126640
LAB_0015ad9c:
MOV EAX,dword ptr [RBP + -0x244]
MOV dword ptr [RBP + -0x248],EAX
MOV RAX,qword ptr [RBP + -0x238]
MOV qword ptr [RBP + -0x230],RAX
JMP 0x0015ac52
LAB_0015adbb:
CMP dword ptr [RBP + -0x248],0x0
JL 0x0015adcf
MOV EDI,dword ptr [RBP + -0x248]
CALL 0x00126640
LAB_0015adcf:
MOV qword ptr [RBP + -0x218],0x0
LAB_0015adda:
MOV RAX,qword ptr [RBP + -0x218]
MOV qword ptr [RBP + -0x258],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015ae0a
MOV RAX,qword ptr [RBP + -0x258]
ADD RSP,0x260
POP RBP
RET
LAB_0015ae0a:
CALL 0x00126360
|
long my_open_parent_dir_nosymlinks(long param_1,int *param_2)
{
int iVar1;
short *psVar2;
int *piVar3;
long in_FS_OFFSET;
bool bVar4;
int local_250;
short *local_240;
short *local_238;
long local_220;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_238 = (short *)local_218;
local_240 = (short *)(local_218 + 1);
psVar2 = (short *)strnmov(local_218,param_1,0x201);
local_250 = -1;
if ((char)*psVar2 == '\0') {
iVar1 = local_250;
if (local_218[0] == '/') {
while (local_250 = iVar1, (char)*local_240 != '/') {
while( true ) {
bVar4 = false;
if ((char)*local_240 != '\0') {
bVar4 = (char)*local_240 != '/';
}
if (!bVar4) break;
local_240 = (short *)((long)local_240 + 1);
}
*(char *)local_240 = '\0';
if ((*local_238 == 0x2e) || (iVar1 = memcmp(local_238,&DAT_001b0896,3), iVar1 == 0)) {
piVar3 = __errno_location();
*piVar3 = 2;
goto LAB_0015adbb;
}
local_240 = (short *)((long)local_240 + 1);
if (psVar2 <= local_240) {
*param_2 = local_250;
local_220 = (long)local_238 + (param_1 - (long)local_218);
goto LAB_0015adda;
}
iVar1 = openat64(local_250,(char *)local_238,0x2a0000);
if (iVar1 < 0) goto LAB_0015adbb;
local_238 = local_240;
if (-1 < local_250) {
close(local_250);
}
}
piVar3 = __errno_location();
*piVar3 = 2;
LAB_0015adbb:
if (-1 < local_250) {
close(local_250);
}
local_220 = 0;
}
else {
piVar3 = __errno_location();
*piVar3 = 2;
local_220 = 0;
}
}
else {
piVar3 = __errno_location();
*piVar3 = 0x24;
local_220 = 0;
}
LAB_0015adda:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_220;
}
| |
52,567 | setval | eloqsql/mysys/my_getopt.c | static int setval(const struct my_option *opts, void *value, char *argument,
my_bool set_maximum_value)
{
int err= 0, res= 0;
DBUG_ENTER("setval");
if (!argument)
argument= enabled_my_option;
if (value)
{
if (set_maximum_value && !(value= opts->u_max_value))
{
my_getopt_error_reporter(ERROR_LEVEL,
"%s: Maximum value of '%s' cannot be set",
my_progname, opts->name);
DBUG_RETURN(EXIT_NO_PTR_TO_VARIABLE);
}
switch ((opts->var_type & GET_TYPE_MASK)) {
case GET_BOOL: /* If argument differs from 0, enable option, else disable */
*((my_bool*) value)= get_bool_argument(opts, argument);
break;
case GET_INT:
*((int*) value)= (int) getopt_ll(argument, opts, &err);
break;
case GET_UINT:
*((uint*) value)= (uint) getopt_ull(argument, opts, &err);
break;
case GET_LONG:
*((long*) value)= (long) getopt_ll(argument, opts, &err);
break;
case GET_ULONG:
*((long*) value)= (long) getopt_ull(argument, opts, &err);
break;
case GET_LL:
*((longlong*) value)= getopt_ll(argument, opts, &err);
break;
case GET_ULL:
*((ulonglong*) value)= getopt_ull(argument, opts, &err);
break;
case GET_DOUBLE:
*((double*) value)= getopt_double(argument, opts, &err);
break;
case GET_STR:
/* If no argument or --enable-string-option, set string to "" */
*((char**) value)= argument == enabled_my_option ? (char*) "" : argument;
break;
case GET_STR_ALLOC:
my_free(*((char**) value));
if (!(*((char**) value)= my_strdup(key_memory_defaults,
argument == enabled_my_option ? "" :
argument, MYF(MY_WME))))
{
res= EXIT_OUT_OF_MEMORY;
goto ret;
};
break;
case GET_ENUM:
{
int type= find_type(argument, opts->typelib, FIND_TYPE_BASIC);
if (type == 0)
{
/*
Accept an integer representation of the enumerated item.
*/
char *endptr;
ulong arg= strtoul(argument, &endptr, 10);
if (*endptr || arg >= opts->typelib->count)
{
res= EXIT_ARGUMENT_INVALID;
goto ret;
}
*(ulong*)value= arg;
}
else if (type < 0)
{
res= EXIT_AMBIGUOUS_OPTION;
goto ret;
}
else
*(ulong*)value= type - 1;
}
break;
case GET_SET:
*((ulonglong*)value)= find_typeset(argument, opts->typelib, &err);
if (err)
{
/* Accept an integer representation of the set */
char *endptr;
ulonglong arg= (ulonglong) strtol(argument, &endptr, 10);
if (*endptr || (arg >> 1) >= (1ULL << (opts->typelib->count-1)))
{
res= EXIT_ARGUMENT_INVALID;
goto ret;
};
*(ulonglong*)value= arg;
err= 0;
}
break;
case GET_FLAGSET:
{
char *error;
uint error_len;
*((ulonglong*)value)=
find_set_from_flags(opts->typelib, opts->typelib->count,
*(ulonglong *)value, opts->def_value,
argument, (uint)strlen(argument),
&error, &error_len);
if (error)
{
res= EXIT_ARGUMENT_INVALID;
goto ret;
};
}
break;
case GET_BIT:
{
uint tmp;
ulonglong bit= (opts->block_size >= 0 ?
opts->block_size :
-opts->block_size);
/*
This sets a bit stored in a longlong.
The bit to set is stored in block_size. If block_size is positive
then setting the bit means value is true. If block_size is negatitive,
then setting the bit means value is false.
*/
tmp= get_bool_argument(opts, argument);
if (opts->block_size < 0)
tmp= !tmp;
if (tmp)
(*(ulonglong*)value)|= bit;
else
(*(ulonglong*)value)&= ~bit;
break;
}
case GET_NO_ARG: /* get_one_option has taken care of the value already */
default: /* dummy default to avoid compiler warnings */
break;
}
if (err)
{
res= EXIT_UNKNOWN_SUFFIX;
goto ret;
};
}
DBUG_RETURN(0);
ret:
my_getopt_error_reporter(ERROR_LEVEL,
"%s: Error while setting value '%s' to '%s'",
my_progname, argument, opts->name);
DBUG_RETURN(res);
} | O3 | c | setval:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movl $0x0, -0x2c(%rbp)
testq %rdx, %rdx
leaq 0x2cd561(%rip), %r13 # 0x2f65f0
movq (%r13), %rax
cmoveq %rax, %rbx
xorl %r15d, %r15d
testq %rsi, %rsi
je 0x29375
movq %rsi, %r12
movq %rdi, %r14
testb %cl, %cl
je 0x290b6
movq 0x20(%r14), %r12
testq %r12, %r12
je 0x290ef
movq 0x30(%r14), %rcx
andl $0x3f, %ecx
addq $-0x2, %rcx
cmpq $0xe, %rcx
ja 0x29341
leaq 0x3e162(%rip), %rdx # 0x67234
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq -0x2c(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2a0b5
jmp 0x2933d
leaq 0x2cd4ea(%rip), %r8 # 0x2f65e0
leaq 0x344493(%rip), %rax # 0x36d590
movq (%rax), %rdx
movq (%r14), %rcx
leaq 0x390ab(%rip), %rsi # 0x621b5
xorl %edi, %edi
xorl %eax, %eax
callq *(%r8)
movl $0xa, %r15d
jmp 0x29375
leaq -0x2c(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2a215
jmp 0x2933d
movq 0x60(%r14), %rax
movq %rax, %r13
negq %r13
cmovsq %rax, %r13
movq %r14, %rdi
movq %rbx, %rsi
callq 0x29fc1
movq 0x60(%r14), %rcx
shrq $0x3f, %rcx
cmpb %cl, %al
jne 0x293c3
notq %r13
andq (%r12), %r13
jmp 0x293c7
movq 0x28(%r14), %rsi
leaq -0x2c(%rbp), %r13
movq %rbx, %rdi
movq %r13, %rdx
callq 0x2cb7c
movq %rax, (%r12)
cmpl $0x0, (%r13)
je 0x29375
leaq -0x40(%rbp), %r13
movq %rbx, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x24730
movq (%r13), %rcx
cmpb $0x0, (%rcx)
jne 0x29429
movq %rax, %rdx
shrq %rdx
movq 0x28(%r14), %rcx
movb (%rcx), %cl
decb %cl
shrq %cl, %rdx
testq %rdx, %rdx
jne 0x29429
movq %rax, (%r12)
jmp 0x29375
movq %r14, %rdi
movq %rbx, %rsi
callq 0x29fc1
movb %al, (%r12)
jmp 0x29341
movq 0x28(%r14), %r13
movq 0x40(%r14), %rax
movq %rax, -0x38(%rbp)
movl (%r13), %eax
movl %eax, -0x44(%rbp)
movq (%r12), %rax
movq %rax, -0x50(%rbp)
movq %rbx, %rdi
callq 0x24150
leaq -0x30(%rbp), %r10
leaq -0x40(%rbp), %r11
movq %r13, %rdi
movl -0x44(%rbp), %esi
movq -0x50(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq %rbx, %r8
movl %eax, %r9d
pushq %r10
pushq %r11
movq %r11, %r13
callq 0x2cd2b
addq $0x10, %rsp
movq %rax, (%r12)
cmpq $0x0, (%r13)
movl $0xd, %r12d
jne 0x2934d
jmp 0x29341
leaq 0x3e8(%rbx), %rax
leaq -0x40(%rbp), %r13
movq %rax, (%r13)
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x5be60
movq (%r13), %rax
cmpb $0x0, (%rax)
jne 0x293d0
cmpl $0x0, -0x30(%rbp)
jne 0x293d0
movsd 0x48(%r14), %xmm1
movsd 0x50(%r14), %xmm4
movapd %xmm4, %xmm2
cmpltpd %xmm0, %xmm2
xorpd %xmm3, %xmm3
cmpneqpd %xmm4, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %eax
testb $0x1, %al
jne 0x292ab
movapd %xmm0, %xmm4
ucomisd %xmm4, %xmm1
seta %cl
orb %cl, %al
maxsd %xmm4, %xmm1
testb $0x1, %al
je 0x293f2
leaq 0x2cd319(%rip), %rcx # 0x2f65e0
movq (%r14), %rdx
leaq 0x38cbe(%rip), %rsi # 0x61f8f
movl $0x1, %edi
movb $0x2, %al
movsd %xmm1, -0x38(%rbp)
callq *(%rcx)
movsd -0x38(%rbp), %xmm1
jmp 0x293f2
leaq -0x2c(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2a215
jmp 0x29309
leaq -0x2c(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2a0b5
movl %eax, (%r12)
jmp 0x29341
cmpq %rax, %rbx
leaq 0x3d01d(%rip), %rax # 0x66336
cmovneq %rbx, %rax
jmp 0x2933d
movq 0x28(%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2c995
testl %eax, %eax
je 0x293fd
js 0x29434
decl %eax
movq %rax, (%r12)
movl $0x9, %r12d
cmpl $0x0, -0x2c(%rbp)
je 0x29375
leaq 0x2cd28c(%rip), %r9 # 0x2f65e0
leaq 0x344235(%rip), %rax # 0x36d590
movq (%rax), %rdx
movq (%r14), %r8
leaq 0x38e75(%rip), %rsi # 0x621dd
xorl %edi, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq *(%r9)
movl %r12d, %r15d
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rdi
callq 0x2afd2
leaq 0x344b41(%rip), %rax # 0x36ded8
cmpq (%r13), %rbx
movl (%rax), %edi
leaq 0x3cf92(%rip), %rsi # 0x66336
cmovneq %rbx, %rsi
movl $0x10, %edx
callq 0x2b068
movq %rax, (%r12)
testq %rax, %rax
jne 0x29341
movl $0x8, %r12d
jmp 0x2934d
orq (%r12), %r13
movq %r13, (%r12)
jmp 0x29341
leaq 0x2cd209(%rip), %rcx # 0x2f65e0
movq (%r14), %rdx
leaq 0x38f40(%rip), %rsi # 0x62321
xorl %edi, %edi
xorl %eax, %eax
callq *(%rcx)
movl $0xd, -0x2c(%rbp)
xorpd %xmm1, %xmm1
movsd %xmm1, (%r12)
jmp 0x29341
leaq -0x40(%rbp), %r13
movq %rbx, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x244c0
movq (%r13), %rcx
cmpb $0x0, (%rcx)
jne 0x29429
movq 0x28(%r14), %rcx
movl (%rcx), %ecx
cmpq %rcx, %rax
jb 0x2933d
movl $0xd, %r12d
jmp 0x2934d
movl $0x3, %r12d
jmp 0x2934d
| setval:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov [rbp+var_2C], 0
test rdx, rdx
lea r13, enabled_my_option
mov rax, [r13+0]
cmovz rbx, rax
xor r15d, r15d
test rsi, rsi
jz loc_29375
mov r12, rsi
mov r14, rdi
test cl, cl
jz short loc_290B6
mov r12, [r14+20h]
test r12, r12
jz short loc_290EF
loc_290B6:
mov rcx, [r14+30h]
and ecx, 3Fh
add rcx, 0FFFFFFFFFFFFFFFEh; switch 15 cases
cmp rcx, 0Eh
ja def_290D9; jumptable 00000000000290D9 default case, case 11
lea rdx, jpt_290D9
movsxd rcx, ds:(jpt_290D9 - 67234h)[rdx+rcx*4]
add rcx, rdx
jmp rcx; switch jump
loc_290DB:
lea rdx, [rbp+var_2C]; jumptable 00000000000290D9 cases 5,7
mov rdi, rbx
mov rsi, r14
call getopt_ll
jmp loc_2933D
loc_290EF:
lea r8, my_getopt_error_reporter
lea rax, my_progname
mov rdx, [rax]
mov rcx, [r14]
lea rsi, aSMaximumValueO; "%s: Maximum value of '%s' cannot be set"
xor edi, edi
xor eax, eax
call qword ptr [r8]
mov r15d, 0Ah
jmp loc_29375
loc_2911C:
lea rdx, [rbp+var_2C]; jumptable 00000000000290D9 cases 6,8
mov rdi, rbx
mov rsi, r14
call getopt_ull
jmp loc_2933D
loc_29130:
mov rax, [r14+60h]; jumptable 00000000000290D9 case 16
mov r13, rax
neg r13
cmovs r13, rax
mov rdi, r14
mov rsi, rbx
call get_bool_argument
mov rcx, [r14+60h]
shr rcx, 3Fh
cmp al, cl
jnz loc_293C3
not r13
and r13, [r12]
jmp loc_293C7
loc_29165:
mov rsi, [r14+28h]; jumptable 00000000000290D9 case 13
lea r13, [rbp+var_2C]
mov rdi, rbx
mov rdx, r13
call find_typeset
mov [r12], rax
cmp dword ptr [r13+0], 0
jz loc_29375
lea r13, [rbp+var_40]
mov rdi, rbx
mov rsi, r13
mov edx, 0Ah
call ___isoc23_strtol
mov rcx, [r13+0]
cmp byte ptr [rcx], 0
jnz loc_29429
mov rdx, rax
shr rdx, 1
mov rcx, [r14+28h]
mov cl, [rcx]
dec cl
shr rdx, cl
test rdx, rdx
jnz loc_29429
mov [r12], rax
jmp loc_29375
loc_291CB:
mov rdi, r14; jumptable 00000000000290D9 case 2
mov rsi, rbx
call get_bool_argument
mov [r12], al
jmp def_290D9; jumptable 00000000000290D9 default case, case 11
loc_291DF:
mov r13, [r14+28h]; jumptable 00000000000290D9 case 15
mov rax, [r14+40h]
mov [rbp+var_38], rax
mov eax, [r13+0]
mov [rbp+var_44], eax
mov rax, [r12]
mov [rbp+var_50], rax
mov rdi, rbx
call _strlen
lea r10, [rbp+var_30]
lea r11, [rbp+var_40]
mov rdi, r13
mov esi, [rbp+var_44]
mov rdx, [rbp+var_50]
mov rcx, [rbp+var_38]
mov r8, rbx
mov r9d, eax
push r10
push r11
mov r13, r11
call find_set_from_flags
add rsp, 10h
mov [r12], rax
cmp qword ptr [r13+0], 0
mov r12d, 0Dh
jnz loc_2934D
jmp def_290D9; jumptable 00000000000290D9 default case, case 11
loc_29248:
lea rax, [rbx+3E8h]; jumptable 00000000000290D9 case 14
lea r13, [rbp+var_40]
mov [r13+0], rax
lea rdx, [rbp+var_30]
mov rdi, rbx
mov rsi, r13
call my_strtod
mov rax, [r13+0]
cmp byte ptr [rax], 0
jnz loc_293D0
cmp [rbp+var_30], 0
jnz loc_293D0
movsd xmm1, qword ptr [r14+48h]
movsd xmm4, qword ptr [r14+50h]
movapd xmm2, xmm4
cmpltpd xmm2, xmm0
xorpd xmm3, xmm3
cmpneqpd xmm3, xmm4
andpd xmm3, xmm2
movd eax, xmm3
test al, 1
jnz short loc_292AB
movapd xmm4, xmm0
loc_292AB:
ucomisd xmm1, xmm4
setnbe cl
or al, cl
maxsd xmm1, xmm4
test al, 1
jz loc_293F2
lea rcx, my_getopt_error_reporter
mov rdx, [r14]
lea rsi, aOptionSValueGA; "option '%s': value %g adjusted to %g"
mov edi, 1
mov al, 2
movsd [rbp+var_38], xmm1
call qword ptr [rcx]
movsd xmm1, [rbp+var_38]
jmp loc_293F2
loc_292E9:
lea rdx, [rbp+var_2C]; jumptable 00000000000290D9 case 4
mov rdi, rbx
mov rsi, r14
call getopt_ull
jmp short loc_29309
loc_292FA:
lea rdx, [rbp+var_2C]; jumptable 00000000000290D9 case 3
mov rdi, rbx
mov rsi, r14
call getopt_ll
loc_29309:
mov [r12], eax
jmp short def_290D9; jumptable 00000000000290D9 default case, case 11
loc_2930F:
cmp rbx, rax; jumptable 00000000000290D9 case 9
lea rax, asc_66332+4; ""
cmovnz rax, rbx
jmp short loc_2933D
loc_2931F:
mov rsi, [r14+28h]; jumptable 00000000000290D9 case 12
mov rdi, rbx
xor edx, edx
call find_type
test eax, eax
jz loc_293FD
js loc_29434
dec eax
loc_2933D:
mov [r12], rax
def_290D9:
mov r12d, 9; jumptable 00000000000290D9 default case, case 11
cmp [rbp+var_2C], 0
jz short loc_29375
loc_2934D:
lea r9, my_getopt_error_reporter
lea rax, my_progname
mov rdx, [rax]
mov r8, [r14]
lea rsi, aSErrorWhileSet; "%s: Error while setting value '%s' to '"...
xor edi, edi
mov rcx, rbx
xor eax, eax
call qword ptr [r9]
mov r15d, r12d
loc_29375:
mov eax, r15d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_29387:
mov rdi, [r12]; jumptable 00000000000290D9 case 10
call my_free
lea rax, key_memory_defaults
cmp rbx, [r13+0]
mov edi, [rax]
lea rsi, asc_66332+4; ""
cmovnz rsi, rbx
mov edx, 10h
call my_strdup
mov [r12], rax
test rax, rax
jnz short def_290D9; jumptable 00000000000290D9 default case, case 11
mov r12d, 8
jmp short loc_2934D
loc_293C3:
or r13, [r12]
loc_293C7:
mov [r12], r13
jmp def_290D9; jumptable 00000000000290D9 default case, case 11
loc_293D0:
lea rcx, my_getopt_error_reporter
mov rdx, [r14]
lea rsi, aInvalidDecimal; "Invalid decimal value for option '%s'\n"
xor edi, edi
xor eax, eax
call qword ptr [rcx]
mov [rbp+var_2C], 0Dh
xorpd xmm1, xmm1
loc_293F2:
movsd qword ptr [r12], xmm1
jmp def_290D9; jumptable 00000000000290D9 default case, case 11
loc_293FD:
lea r13, [rbp+var_40]
mov rdi, rbx
mov rsi, r13
mov edx, 0Ah
call ___isoc23_strtoul
mov rcx, [r13+0]
cmp byte ptr [rcx], 0
jnz short loc_29429
mov rcx, [r14+28h]
mov ecx, [rcx]
cmp rax, rcx
jb loc_2933D
loc_29429:
mov r12d, 0Dh
jmp loc_2934D
loc_29434:
mov r12d, 3
jmp loc_2934D
| long long setval(const char **a1, char *a2, char *a3, char a4, __m128d a5)
{
char *v5; // rbx
unsigned int v6; // r15d
char *v7; // r12
unsigned long long v8; // rax
long long v9; // r13
long long v10; // r13
unsigned long long v11; // rax
const char *v12; // r13
int v13; // eax
unsigned int v14; // r12d
double v15; // xmm1_8
__m128d v16; // xmm4
char v17; // al
char v18; // al
double v19; // xmm1_8
const char *v20; // rdx
int v21; // eax
int type; // eax
char *v24; // rsi
long long v25; // rax
long long v26; // [rsp+0h] [rbp-50h]
int v27; // [rsp+Ch] [rbp-44h]
_BYTE *v28; // [rsp+10h] [rbp-40h] BYREF
double v29; // [rsp+18h] [rbp-38h]
int v30; // [rsp+20h] [rbp-30h] BYREF
_DWORD v31[11]; // [rsp+24h] [rbp-2Ch] BYREF
v5 = a3;
v31[0] = 0;
if ( !a3 )
v5 = (char *)enabled_my_option;
v6 = 0;
if ( !a2 )
return v6;
v7 = a2;
if ( a4 )
{
v7 = (char *)a1[4];
if ( !v7 )
{
my_getopt_error_reporter(0, "%s: Maximum value of '%s' cannot be set", my_progname, *a1);
return 10;
}
}
switch ( (unsigned long long)a1[6] & 0x3F )
{
case 2uLL:
*v7 = get_bool_argument(a1, v5);
goto LABEL_37;
case 3uLL:
v21 = getopt_ll(v5, a1, v31);
goto LABEL_29;
case 4uLL:
v21 = getopt_ull(v5, a1, v31);
LABEL_29:
*(_DWORD *)v7 = v21;
goto LABEL_37;
case 5uLL:
case 7uLL:
v8 = getopt_ll(v5, a1, v31);
goto LABEL_36;
case 6uLL:
case 8uLL:
v8 = getopt_ull(v5, a1, v31);
goto LABEL_36;
case 9uLL:
v8 = (unsigned long long)"";
if ( v5 != (char *)enabled_my_option )
v8 = (unsigned long long)v5;
goto LABEL_36;
case 0xAuLL:
my_free(*(_QWORD *)v7);
v24 = "";
if ( v5 != (char *)enabled_my_option )
v24 = v5;
v25 = my_strdup(key_memory_defaults, v24, 16LL);
*(_QWORD *)v7 = v25;
if ( v25 )
goto LABEL_37;
v14 = 8;
goto LABEL_38;
case 0xCuLL:
type = find_type(v5, a1[5], 0LL);
if ( !type )
{
v8 = __isoc23_strtoul(v5, &v28, 10LL);
if ( !*v28 && v8 < *(unsigned int *)a1[5] )
goto LABEL_36;
LABEL_50:
v14 = 13;
LABEL_38:
my_getopt_error_reporter(0, "%s: Error while setting value '%s' to '%s'", my_progname, v5, *a1);
return v14;
}
if ( type < 0 )
{
v14 = 3;
goto LABEL_38;
}
v8 = (unsigned int)(type - 1);
LABEL_36:
*(_QWORD *)v7 = v8;
LABEL_37:
v14 = 9;
if ( v31[0] )
goto LABEL_38;
return v6;
case 0xDuLL:
*(_QWORD *)v7 = find_typeset(v5, a1[5], v31);
if ( !v31[0] )
return v6;
v11 = __isoc23_strtol(v5, &v28, 10LL);
if ( *v28 || v11 >> 1 >> (*a1[5] - 1) )
goto LABEL_50;
*(_QWORD *)v7 = v11;
return v6;
case 0xEuLL:
v28 = v5 + 1000;
my_strtod(v5, &v28, &v30);
if ( *v28 || v30 )
{
my_getopt_error_reporter(0, "Invalid decimal value for option '%s'\n", *a1);
v31[0] = 13;
v19 = 0.0;
}
else
{
v15 = *((double *)a1 + 9);
v16 = (__m128d)(unsigned long long)a1[10];
v17 = _mm_cvtsi128_si32((__m128i)_mm_and_pd(_mm_cmpneq_pd((__m128d)0LL, v16), _mm_cmplt_pd(v16, a5)));
if ( (v17 & 1) == 0 )
v16.m128d_f64[0] = a5.m128d_f64[0];
v18 = (v15 > v16.m128d_f64[0]) | v17;
v19 = fmax(v15, v16.m128d_f64[0]);
if ( (v18 & 1) != 0 )
{
v20 = *a1;
v29 = v19;
my_getopt_error_reporter(1, "option '%s': value %g adjusted to %g", v20, a5.m128d_f64[0], v19);
v19 = v29;
}
}
*(double *)v7 = v19;
goto LABEL_37;
case 0xFuLL:
v12 = a1[5];
v29 = *((double *)a1 + 8);
v27 = *(_DWORD *)v12;
v26 = *(_QWORD *)v7;
v13 = strlen(v5);
*(_QWORD *)v7 = find_set_from_flags(
(_DWORD)v12,
v27,
v26,
LODWORD(v29),
(_DWORD)v5,
v13,
(long long)&v28,
(long long)&v30);
v14 = 13;
if ( !v28 )
goto LABEL_37;
goto LABEL_38;
case 0x10uLL:
v9 = -(long long)a1[12];
if ( (long long)a1[12] > 0 )
v9 = (long long)a1[12];
if ( (unsigned __int8)get_bool_argument(a1, v5) == (long long)a1[12] < 0 )
v10 = *(_QWORD *)v7 & ~v9;
else
v10 = *(_QWORD *)v7 | v9;
*(_QWORD *)v7 = v10;
goto LABEL_37;
default:
goto LABEL_37;
}
}
| setval:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV dword ptr [RBP + -0x2c],0x0
TEST RDX,RDX
LEA R13,[0x3f65f0]
MOV RAX,qword ptr [R13]
CMOVZ RBX,RAX
XOR R15D,R15D
TEST RSI,RSI
JZ 0x00129375
MOV R12,RSI
MOV R14,RDI
TEST CL,CL
JZ 0x001290b6
MOV R12,qword ptr [R14 + 0x20]
TEST R12,R12
JZ 0x001290ef
LAB_001290b6:
MOV RCX,qword ptr [R14 + 0x30]
AND ECX,0x3f
ADD RCX,-0x2
CMP RCX,0xe
JA 0x00129341
LEA RDX,[0x167234]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_5:
LEA RDX,[RBP + -0x2c]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012a0b5
JMP 0x0012933d
LAB_001290ef:
LEA R8,[0x3f65e0]
LEA RAX,[0x46d590]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [R14]
LEA RSI,[0x1621b5]
XOR EDI,EDI
XOR EAX,EAX
CALL qword ptr [R8]
MOV R15D,0xa
JMP 0x00129375
caseD_6:
LEA RDX,[RBP + -0x2c]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012a215
JMP 0x0012933d
caseD_10:
MOV RAX,qword ptr [R14 + 0x60]
MOV R13,RAX
NEG R13
CMOVS R13,RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x00129fc1
MOV RCX,qword ptr [R14 + 0x60]
SHR RCX,0x3f
CMP AL,CL
JNZ 0x001293c3
NOT R13
AND R13,qword ptr [R12]
JMP 0x001293c7
caseD_d:
MOV RSI,qword ptr [R14 + 0x28]
LEA R13,[RBP + -0x2c]
MOV RDI,RBX
MOV RDX,R13
CALL 0x0012cb7c
MOV qword ptr [R12],RAX
CMP dword ptr [R13],0x0
JZ 0x00129375
LEA R13,[RBP + -0x40]
MOV RDI,RBX
MOV RSI,R13
MOV EDX,0xa
CALL 0x00124730
MOV RCX,qword ptr [R13]
CMP byte ptr [RCX],0x0
JNZ 0x00129429
MOV RDX,RAX
SHR RDX,0x1
MOV RCX,qword ptr [R14 + 0x28]
MOV CL,byte ptr [RCX]
DEC CL
SHR RDX,CL
TEST RDX,RDX
JNZ 0x00129429
MOV qword ptr [R12],RAX
JMP 0x00129375
caseD_2:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00129fc1
MOV byte ptr [R12],AL
JMP 0x00129341
caseD_f:
MOV R13,qword ptr [R14 + 0x28]
MOV RAX,qword ptr [R14 + 0x40]
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [R13]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [R12]
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,RBX
CALL 0x00124150
LEA R10,[RBP + -0x30]
LEA R11,[RBP + -0x40]
MOV RDI,R13
MOV ESI,dword ptr [RBP + -0x44]
MOV RDX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x38]
MOV R8,RBX
MOV R9D,EAX
PUSH R10
PUSH R11
MOV R13,R11
CALL 0x0012cd2b
ADD RSP,0x10
MOV qword ptr [R12],RAX
CMP qword ptr [R13],0x0
MOV R12D,0xd
JNZ 0x0012934d
JMP 0x00129341
caseD_e:
LEA RAX,[RBX + 0x3e8]
LEA R13,[RBP + -0x40]
MOV qword ptr [R13],RAX
LEA RDX,[RBP + -0x30]
MOV RDI,RBX
MOV RSI,R13
CALL 0x0015be60
MOV RAX,qword ptr [R13]
CMP byte ptr [RAX],0x0
JNZ 0x001293d0
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x001293d0
MOVSD XMM1,qword ptr [R14 + 0x48]
MOVSD XMM4,qword ptr [R14 + 0x50]
MOVAPD XMM2,XMM4
CMPLTPD XMM2,XMM0
XORPD XMM3,XMM3
CMPNEQPD XMM3,XMM4
ANDPD XMM3,XMM2
MOVD EAX,XMM3
TEST AL,0x1
JNZ 0x001292ab
MOVAPD XMM4,XMM0
LAB_001292ab:
UCOMISD XMM1,XMM4
SETA CL
OR AL,CL
MAXSD XMM1,XMM4
TEST AL,0x1
JZ 0x001293f2
LEA RCX,[0x3f65e0]
MOV RDX,qword ptr [R14]
LEA RSI,[0x161f8f]
MOV EDI,0x1
MOV AL,0x2
MOVSD qword ptr [RBP + -0x38],XMM1
CALL qword ptr [RCX]
MOVSD XMM1,qword ptr [RBP + -0x38]
JMP 0x001293f2
caseD_4:
LEA RDX,[RBP + -0x2c]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012a215
JMP 0x00129309
caseD_3:
LEA RDX,[RBP + -0x2c]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012a0b5
LAB_00129309:
MOV dword ptr [R12],EAX
JMP 0x00129341
caseD_9:
CMP RBX,RAX
LEA RAX,[0x166336]
CMOVNZ RAX,RBX
JMP 0x0012933d
caseD_c:
MOV RSI,qword ptr [R14 + 0x28]
MOV RDI,RBX
XOR EDX,EDX
CALL 0x0012c995
TEST EAX,EAX
JZ 0x001293fd
JS 0x00129434
DEC EAX
LAB_0012933d:
MOV qword ptr [R12],RAX
caseD_b:
MOV R12D,0x9
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x00129375
LAB_0012934d:
LEA R9,[0x3f65e0]
LEA RAX,[0x46d590]
MOV RDX,qword ptr [RAX]
MOV R8,qword ptr [R14]
LEA RSI,[0x1621dd]
XOR EDI,EDI
MOV RCX,RBX
XOR EAX,EAX
CALL qword ptr [R9]
MOV R15D,R12D
LAB_00129375:
MOV EAX,R15D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
caseD_a:
MOV RDI,qword ptr [R12]
CALL 0x0012afd2
LEA RAX,[0x46ded8]
CMP RBX,qword ptr [R13]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x166336]
CMOVNZ RSI,RBX
MOV EDX,0x10
CALL 0x0012b068
MOV qword ptr [R12],RAX
TEST RAX,RAX
JNZ 0x00129341
MOV R12D,0x8
JMP 0x0012934d
LAB_001293c3:
OR R13,qword ptr [R12]
LAB_001293c7:
MOV qword ptr [R12],R13
JMP 0x00129341
LAB_001293d0:
LEA RCX,[0x3f65e0]
MOV RDX,qword ptr [R14]
LEA RSI,[0x162321]
XOR EDI,EDI
XOR EAX,EAX
CALL qword ptr [RCX]
MOV dword ptr [RBP + -0x2c],0xd
XORPD XMM1,XMM1
LAB_001293f2:
MOVSD qword ptr [R12],XMM1
JMP 0x00129341
LAB_001293fd:
LEA R13,[RBP + -0x40]
MOV RDI,RBX
MOV RSI,R13
MOV EDX,0xa
CALL 0x001244c0
MOV RCX,qword ptr [R13]
CMP byte ptr [RCX],0x0
JNZ 0x00129429
MOV RCX,qword ptr [R14 + 0x28]
MOV ECX,dword ptr [RCX]
CMP RAX,RCX
JC 0x0012933d
LAB_00129429:
MOV R12D,0xd
JMP 0x0012934d
LAB_00129434:
MOV R12D,0x3
JMP 0x0012934d
|
int4 setval(int8 *param_1,double *param_2,char *param_3,char param_4)
{
double dVar1;
double dVar2;
ulong uVar3;
int4 *puVar4;
char cVar5;
int1 uVar6;
int4 uVar7;
int iVar8;
size_t sVar9;
char *pcVar10;
ulong uVar11;
double dVar12;
int4 uVar13;
double dVar14;
double dVar15;
char *local_48;
double local_40;
int local_38;
int local_34;
local_34 = 0;
if (param_3 == (char *)0x0) {
param_3 = enabled_my_option;
}
if (param_2 == (double *)0x0) {
return 0;
}
if ((param_4 != '\0') && (param_2 = (double *)param_1[4], param_2 == (double *)0x0)) {
(*(code *)my_getopt_error_reporter)
(0,"%s: Maximum value of \'%s\' cannot be set",my_progname,*param_1);
return 10;
}
switch((uint)param_1[6] & 0x3f) {
case 2:
uVar6 = get_bool_argument(param_1,param_3);
*(int1 *)param_2 = uVar6;
break;
case 3:
uVar7 = getopt_ll(param_3,param_1,&local_34);
goto LAB_00129309;
case 4:
uVar7 = getopt_ull(param_3,param_1,&local_34);
LAB_00129309:
*(int4 *)param_2 = uVar7;
break;
case 5:
case 7:
pcVar10 = (char *)getopt_ll(param_3,param_1,&local_34);
goto LAB_0012933d;
case 6:
case 8:
pcVar10 = (char *)getopt_ull(param_3,param_1,&local_34);
goto LAB_0012933d;
case 9:
pcVar10 = "";
if (param_3 != enabled_my_option) {
pcVar10 = param_3;
}
goto LAB_0012933d;
case 10:
my_free(*param_2);
pcVar10 = "";
if (param_3 != enabled_my_option) {
pcVar10 = param_3;
}
dVar12 = (double)my_strdup(key_memory_defaults,pcVar10,0x10);
*param_2 = dVar12;
if (dVar12 != 0.0) break;
uVar7 = 8;
goto LAB_0012934d;
case 0xc:
iVar8 = find_type(param_3,param_1[5],0);
if (iVar8 == 0) {
pcVar10 = (char *)__isoc23_strtoul(param_3,&local_48,10);
if ((*local_48 != '\0') || ((char *)(ulong)*(uint *)param_1[5] <= pcVar10)) goto LAB_00129429;
}
else {
if (iVar8 < 0) {
uVar7 = 3;
goto LAB_0012934d;
}
pcVar10 = (char *)(ulong)(iVar8 - 1);
}
LAB_0012933d:
*param_2 = (double)pcVar10;
break;
case 0xd:
dVar12 = (double)find_typeset(param_3,param_1[5],&local_34);
*param_2 = dVar12;
if (local_34 == 0) {
return 0;
}
dVar12 = (double)__isoc23_strtol(param_3,&local_48,10);
if ((*local_48 == '\0') && (((ulong)dVar12 >> 1) >> (*(char *)param_1[5] - 1U & 0x3f) == 0)) {
*param_2 = dVar12;
return 0;
}
LAB_00129429:
uVar7 = 0xd;
goto LAB_0012934d;
case 0xe:
local_48 = param_3 + 1000;
dVar12 = (double)my_strtod(param_3,&local_48,&local_38);
if ((*local_48 == '\0') && (local_38 == 0)) {
dVar1 = (double)param_1[9];
dVar2 = (double)param_1[10];
dVar15 = dVar2;
if (dVar2 == 0.0 || dVar2 >= dVar12) {
dVar15 = dVar12;
}
dVar14 = dVar1;
if (dVar1 <= dVar15) {
dVar14 = dVar15;
}
if (dVar2 != 0.0 && dVar2 < dVar12 || dVar15 < dVar1) {
local_40 = dVar14;
(*(code *)my_getopt_error_reporter)(1,"option \'%s\': value %g adjusted to %g",*param_1);
dVar14 = local_40;
}
}
else {
(*(code *)my_getopt_error_reporter)(0,"Invalid decimal value for option \'%s\'\n",*param_1);
local_34 = 0xd;
dVar14 = 0.0;
}
*param_2 = dVar14;
break;
case 0xf:
puVar4 = (int4 *)param_1[5];
local_40 = (double)param_1[8];
uVar7 = *puVar4;
dVar12 = *param_2;
sVar9 = strlen(param_3);
dVar12 = (double)find_set_from_flags(puVar4,uVar7,dVar12,local_40,param_3,sVar9 & 0xffffffff,
&local_48,&local_38);
*param_2 = dVar12;
uVar7 = 0xd;
if (local_48 == (char *)0x0) break;
goto LAB_0012934d;
case 0x10:
uVar3 = param_1[0xc];
uVar11 = -uVar3;
if (0 < (long)uVar3) {
uVar11 = uVar3;
}
cVar5 = get_bool_argument(param_1,param_3);
if (cVar5 == (char)-(char)((long)param_1[0xc] >> 0x3f)) {
dVar12 = (double)(~uVar11 & (ulong)*param_2);
}
else {
dVar12 = (double)(uVar11 | (ulong)*param_2);
}
*param_2 = dVar12;
}
uVar7 = 9;
uVar13 = 0;
if (local_34 != 0) {
LAB_0012934d:
(*(code *)my_getopt_error_reporter)
(0,"%s: Error while setting value \'%s\' to \'%s\'",my_progname,param_3,*param_1);
uVar13 = uVar7;
}
return uVar13;
}
| |
52,568 | testing::internal::SuiteApiResolver<FindPeaksCppTest>::GetSetUpCaseOrSuite(char const*, int) | giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/include/gtest/internal/gtest-internal.h | static SetUpTearDownSuiteFuncType GetSetUpCaseOrSuite(const char* filename,
int line_num) {
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
SetUpTearDownSuiteFuncType test_case_fp =
GetNotDefaultOrNull(&T::SetUpTestCase, &Test::SetUpTestCase);
SetUpTearDownSuiteFuncType test_suite_fp =
GetNotDefaultOrNull(&T::SetUpTestSuite, &Test::SetUpTestSuite);
GTEST_CHECK_(!test_case_fp || !test_suite_fp)
<< "Test can not provide both SetUpTestSuite and SetUpTestCase, please "
"make sure there is only one present at "
<< filename << ":" << line_num;
return test_case_fp != nullptr ? test_case_fp : test_suite_fp;
#else
(void)(filename);
(void)(line_num);
return &T::SetUpTestSuite;
#endif
} | O3 | c | testing::internal::SuiteApiResolver<FindPeaksCppTest>::GetSetUpCaseOrSuite(char const*, int):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
movl $0x1, %edi
callq 0x118c8
testb %al, %al
jne 0xd39d
leaq 0x331af(%rip), %rdx # 0x4049c
leaq 0xc(%rsp), %rdi
movl $0x3, %esi
movl $0x201, %ecx # imm = 0x201
callq 0x16b08
movq 0x4bce0(%rip), %rdi # 0x58fe8
leaq 0x3321c(%rip), %rsi # 0x4052b
movl $0x32, %edx
callq 0x85b0
movq 0x4bcc8(%rip), %r15 # 0x58fe8
leaq 0x33237(%rip), %rsi # 0x4055e
movl $0x6a, %edx
movq %r15, %rdi
callq 0x85b0
testq %r14, %r14
je 0xd355
movq %r14, %rdi
callq 0x8200
movq 0x4bca0(%rip), %rdi # 0x58fe8
movq %r14, %rsi
movq %rax, %rdx
callq 0x85b0
jmp 0xd36d
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x8930
movq 0x4bc74(%rip), %rdi # 0x58fe8
leaq 0x364f6(%rip), %rsi # 0x43871
movl $0x1, %edx
callq 0x85b0
movq 0x4bc5c(%rip), %rdi # 0x58fe8
movl %ebx, %esi
callq 0x8950
leaq 0xc(%rsp), %rdi
callq 0x16c4a
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0xc(%rsp), %rdi
callq 0x16c4a
movq %rbx, %rdi
callq 0x8990
| _ZN7testing8internal16SuiteApiResolverI16FindPeaksCppTestE19GetSetUpCaseOrSuiteEPKci:
push r15
push r14
push rbx
sub rsp, 10h
mov ebx, esi
mov r14, rdi
mov edi, (offset dword_0+1); this
call _ZN7testing8internal6IsTrueEb; testing::internal::IsTrue(bool)
test al, al
jnz loc_D39D
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+28h+var_1C]
mov esi, 3
mov ecx, 201h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aConditionTestC; "Condition !test_case_fp || !test_suite_"...
mov edx, 32h ; '2'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, cs:_ZSt4cerr_ptr
lea rsi, aTestCanNotProv; "Test can not provide both SetUpTestSuit"...
mov edx, 6Ah ; 'j'
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
test r14, r14
jz short loc_D355
mov rdi, r14
call _strlen
mov rdi, cs:_ZSt4cerr_ptr
mov rsi, r14
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_D36D
loc_D355:
mov rax, [r15]
mov rax, [rax-18h]
lea rdi, [r15+rax]
mov esi, [r15+rax+20h]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_D36D:
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aTrace+6; ":"
mov edx, 1
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+28h+var_1C]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
loc_D39D:
xor eax, eax
add rsp, 10h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_4]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
mov rdi, rbx
call __Unwind_Resume
| long long testing::internal::SuiteApiResolver<FindPeaksCppTest>::GetSetUpCaseOrSuite(long long a1, BOOL a2)
{
long long v2; // rax
_BYTE v4[28]; // [rsp+Ch] [rbp-1Ch] BYREF
if ( !(unsigned __int8)testing::internal::IsTrue((testing::internal *)((char *)&dword_0 + 1), a2) )
{
testing::internal::GTestLog::GTestLog(
v4,
3LL,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/include/gte"
"st/internal/gtest-internal.h",
513LL);
std::__ostream_insert<char,std::char_traits<char>>(
&std::cerr,
"Condition !test_case_fp || !test_suite_fp failed. ",
50LL);
std::__ostream_insert<char,std::char_traits<char>>(
&std::cerr,
"Test can not provide both SetUpTestSuite and SetUpTestCase, please make sure there is only one present at ",
106LL);
if ( a1 )
{
v2 = strlen(a1);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, a1, v2);
}
else
{
std::ios::clear(
(char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL),
*(_DWORD *)((char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL) + 32) | 1u);
}
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, ":", 1LL);
std::ostream::operator<<(&std::cerr, a2);
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v4);
}
return 0LL;
}
| GetSetUpCaseOrSuite:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV EBX,ESI
MOV R14,RDI
MOV EDI,0x1
CALL 0x001118c8
TEST AL,AL
JNZ 0x0010d39d
LEA RDX,[0x14049c]
LEA RDI,[RSP + 0xc]
MOV ESI,0x3
MOV ECX,0x201
CALL 0x00116b08
LAB_0010d301:
MOV RDI,qword ptr [0x00158fe8]
LEA RSI,[0x14052b]
MOV EDX,0x32
CALL 0x001085b0
MOV R15,qword ptr [0x00158fe8]
LEA RSI,[0x14055e]
MOV EDX,0x6a
MOV RDI,R15
CALL 0x001085b0
TEST R14,R14
JZ 0x0010d355
MOV RDI,R14
CALL 0x00108200
MOV RDI,qword ptr [0x00158fe8]
MOV RSI,R14
MOV RDX,RAX
CALL 0x001085b0
JMP 0x0010d36d
LAB_0010d355:
MOV RAX,qword ptr [R15]
MOV RAX,qword ptr [RAX + -0x18]
LEA RDI,[R15 + RAX*0x1]
MOV ESI,dword ptr [R15 + RAX*0x1 + 0x20]
OR ESI,0x1
CALL 0x00108930
LAB_0010d36d:
MOV RDI,qword ptr [0x00158fe8]
LEA RSI,[0x143871]
MOV EDX,0x1
CALL 0x001085b0
MOV RDI,qword ptr [0x00158fe8]
MOV ESI,EBX
CALL 0x00108950
LAB_0010d393:
LEA RDI,[RSP + 0xc]
CALL 0x00116c4a
LAB_0010d39d:
XOR EAX,EAX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* testing::internal::SuiteApiResolver<FindPeaksCppTest>::GetSetUpCaseOrSuite(char const*, int) */
int8
testing::internal::SuiteApiResolver<FindPeaksCppTest>::GetSetUpCaseOrSuite
(char *param_1,int param_2)
{
int *puVar1;
char cVar2;
size_t sVar3;
GTestLog local_1c [4];
cVar2 = IsTrue(true);
if (cVar2 == '\0') {
GTestLog::GTestLog(local_1c,3,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/include/gtest/internal/gtest-internal.h"
,0x201);
/* try { // try from 0010d301 to 0010d392 has its CatchHandler @ 0010d3a9 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00158fe8,"Condition !test_case_fp || !test_suite_fp failed. ",
0x32);
puVar1 = PTR_cerr_00158fe8;
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00158fe8,
"Test can not provide both SetUpTestSuite and SetUpTestCase, please make sure there is only one present at "
,0x6a);
if (param_1 == (char *)0x0) {
std::ios::clear(puVar1 + *(long *)(*(long *)puVar1 + -0x18),
*(uint *)(puVar1 + *(long *)(*(long *)puVar1 + -0x18) + 0x20) | 1);
}
else {
sVar3 = strlen(param_1);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_00158fe8,param_1,sVar3)
;
}
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_00158fe8,":",1);
std::ostream::operator<<((ostream *)PTR_cerr_00158fe8,param_2);
GTestLog::~GTestLog(local_1c);
}
return 0;
}
| |
52,569 | 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>>>>>::get_codepoint() | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | int get_codepoint()
{
// this function only makes sense after reading `\u`
JSON_ASSERT(current == 'u');
int codepoint = 0;
const auto factors = { 12u, 8u, 4u, 0u };
for (const auto factor : factors)
{
get();
if (current >= '0' && current <= '9')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor);
}
else if (current >= 'A' && current <= 'F')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor);
}
else if (current >= 'a' && current <= 'f')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor);
}
else
{
return -1;
}
}
JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF);
return codepoint;
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<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>>>>>::get_codepoint():
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpl $0x75, 0x14(%rax)
jne 0x7683c
jmp 0x7685b
leaq 0x189c7(%rip), %rdi # 0x8f20a
leaq 0x166b9(%rip), %rsi # 0x8cf03
movl $0x1c1b, %edx # imm = 0x1C1B
leaq 0x189c3(%rip), %rcx # 0x8f219
callq 0x5d1f0
movl $0x0, -0x14(%rbp)
movl $0xc, -0x38(%rbp)
movl $0x8, -0x34(%rbp)
movl $0x4, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x4, -0x20(%rbp)
leaq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x5ff40
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x5ead0
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
je 0x76971
movq -0x60(%rbp), %rdi
movq -0x48(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x54(%rbp)
callq 0x5c450
movq -0x60(%rbp), %rax
cmpl $0x30, 0x14(%rax)
jl 0x768fb
movq -0x60(%rbp), %rax
cmpl $0x39, 0x14(%rax)
jg 0x768fb
movq -0x60(%rbp), %rax
movl 0x14(%rax), %eax
subl $0x30, %eax
movl -0x54(%rbp), %ecx
shll %cl, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x7695e
movq -0x60(%rbp), %rax
cmpl $0x41, 0x14(%rax)
jl 0x76926
movq -0x60(%rbp), %rax
cmpl $0x46, 0x14(%rax)
jg 0x76926
movq -0x60(%rbp), %rax
movl 0x14(%rax), %eax
subl $0x37, %eax
movl -0x54(%rbp), %ecx
shll %cl, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x7695c
movq -0x60(%rbp), %rax
cmpl $0x61, 0x14(%rax)
jl 0x76951
movq -0x60(%rbp), %rax
cmpl $0x66, 0x14(%rax)
jg 0x76951
movq -0x60(%rbp), %rax
movl 0x14(%rax), %eax
subl $0x57, %eax
movl -0x54(%rbp), %ecx
shll %cl, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x7695a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x769ba
jmp 0x7695c
jmp 0x7695e
jmp 0x76960
movq -0x48(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x48(%rbp)
jmp 0x768b0
xorl %eax, %eax
xorl %ecx, %ecx
cmpl -0x14(%rbp), %ecx
movb %al, -0x61(%rbp)
jg 0x7698a
cmpl $0xffff, -0x14(%rbp) # imm = 0xFFFF
setle %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x76993
jmp 0x76995
jmp 0x769b4
leaq 0x189dc(%rip), %rdi # 0x8f378
leaq 0x16560(%rip), %rsi # 0x8cf03
movl $0x1c35, %edx # imm = 0x1C35
leaq 0x1886a(%rip), %rcx # 0x8f219
callq 0x5d1f0
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov [rbp+var_60], rax
cmp dword ptr [rax+14h], 75h ; 'u'
jnz short loc_7683C
jmp short loc_7685B
loc_7683C:
lea rdi, aCurrentU; "current == 'u'"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 1C1Bh
lea rcx, aIntNlohmannDet; "int nlohmann::detail::lexer<nlohmann::b"...
call ___assert_fail
loc_7685B:
mov [rbp+var_14], 0
mov [rbp+var_38], 0Ch
mov [rbp+var_34], 8
mov [rbp+var_30], 4
mov [rbp+var_2C], 0
lea rax, [rbp+var_38]
mov [rbp+var_28], rax
mov [rbp+var_20], 4
lea rax, [rbp+var_28]
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
call __ZNKSt16initializer_listIjE5beginEv; std::initializer_list<uint>::begin(void)
mov [rbp+var_48], rax
mov rdi, [rbp+var_40]
call __ZNKSt16initializer_listIjE3endEv; std::initializer_list<uint>::end(void)
mov [rbp+var_50], rax
loc_768B0:
mov rax, [rbp+var_48]
cmp rax, [rbp+var_50]
jz loc_76971
mov rdi, [rbp+var_60]
mov rax, [rbp+var_48]
mov eax, [rax]
mov [rbp+var_54], eax
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 rax, [rbp+var_60]
cmp dword ptr [rax+14h], 30h ; '0'
jl short loc_768FB
mov rax, [rbp+var_60]
cmp dword ptr [rax+14h], 39h ; '9'
jg short loc_768FB
mov rax, [rbp+var_60]
mov eax, [rax+14h]
sub eax, 30h ; '0'
mov ecx, [rbp+var_54]
shl eax, cl
add eax, [rbp+var_14]
mov [rbp+var_14], eax
jmp short loc_7695E
loc_768FB:
mov rax, [rbp+var_60]
cmp dword ptr [rax+14h], 41h ; 'A'
jl short loc_76926
mov rax, [rbp+var_60]
cmp dword ptr [rax+14h], 46h ; 'F'
jg short loc_76926
mov rax, [rbp+var_60]
mov eax, [rax+14h]
sub eax, 37h ; '7'
mov ecx, [rbp+var_54]
shl eax, cl
add eax, [rbp+var_14]
mov [rbp+var_14], eax
jmp short loc_7695C
loc_76926:
mov rax, [rbp+var_60]
cmp dword ptr [rax+14h], 61h ; 'a'
jl short loc_76951
mov rax, [rbp+var_60]
cmp dword ptr [rax+14h], 66h ; 'f'
jg short loc_76951
mov rax, [rbp+var_60]
mov eax, [rax+14h]
sub eax, 57h ; 'W'
mov ecx, [rbp+var_54]
shl eax, cl
add eax, [rbp+var_14]
mov [rbp+var_14], eax
jmp short loc_7695A
loc_76951:
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_769BA
loc_7695A:
jmp short $+2
loc_7695C:
jmp short $+2
loc_7695E:
jmp short $+2
loc_76960:
mov rax, [rbp+var_48]
add rax, 4
mov [rbp+var_48], rax
jmp loc_768B0
loc_76971:
xor eax, eax
xor ecx, ecx
cmp ecx, [rbp+var_14]
mov [rbp+var_61], al
jg short loc_7698A
cmp [rbp+var_14], 0FFFFh
setle al
mov [rbp+var_61], al
loc_7698A:
mov al, [rbp+var_61]
test al, 1
jnz short loc_76993
jmp short loc_76995
loc_76993:
jmp short loc_769B4
loc_76995:
lea rdi, a0x0000Codepoin; "0x0000 <= codepoint && codepoint <= 0xF"...
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 1C35h
lea rcx, aIntNlohmannDet; "int nlohmann::detail::lexer<nlohmann::b"...
call ___assert_fail
loc_769B4:
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
loc_769BA:
mov eax, [rbp+var_4]
add rsp, 70h
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>>>::get_codepoint(
long long a1)
{
bool v2; // [rsp+Fh] [rbp-61h]
int v3; // [rsp+1Ch] [rbp-54h]
long long v4; // [rsp+20h] [rbp-50h]
int *v5; // [rsp+28h] [rbp-48h]
_DWORD v6[4]; // [rsp+38h] [rbp-38h] BYREF
_QWORD v7[2]; // [rsp+48h] [rbp-28h] BYREF
int v8; // [rsp+5Ch] [rbp-14h]
long long v9; // [rsp+60h] [rbp-10h]
v9 = a1;
if ( *(_DWORD *)(a1 + 20) != 117 )
__assert_fail(
"current == 'u'",
"/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp",
7195LL,
"int nlohmann::detail::lexer<nlohmann::basic_json<>, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_i"
"terator<const char *, std::basic_string<char>>>>::get_codepoint() [BasicJsonType = nlohmann::basic_json<>, InputAd"
"apterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>]");
v8 = 0;
v6[0] = 12;
v6[1] = 8;
v6[2] = 4;
v6[3] = 0;
v7[0] = v6;
v7[1] = 4LL;
v5 = (int *)std::initializer_list<unsigned int>::begin(v7);
v4 = std::initializer_list<unsigned int>::end(v7);
while ( v5 != (int *)v4 )
{
v3 = *v5;
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(a1);
if ( *(int *)(a1 + 20) < 48 || *(int *)(a1 + 20) > 57 )
{
if ( *(int *)(a1 + 20) < 65 || *(int *)(a1 + 20) > 70 )
{
if ( *(int *)(a1 + 20) < 97 || *(int *)(a1 + 20) > 102 )
return (unsigned int)-1;
v8 += (*(_DWORD *)(a1 + 20) - 87) << v3;
}
else
{
v8 += (*(_DWORD *)(a1 + 20) - 55) << v3;
}
}
else
{
v8 += (*(_DWORD *)(a1 + 20) - 48) << v3;
}
++v5;
}
v2 = 0;
if ( v8 >= 0 )
v2 = v8 <= 0xFFFF;
if ( !v2 )
__assert_fail(
"0x0000 <= codepoint && codepoint <= 0xFFFF",
"/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp",
7221LL,
"int nlohmann::detail::lexer<nlohmann::basic_json<>, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_i"
"terator<const char *, std::basic_string<char>>>>::get_codepoint() [BasicJsonType = nlohmann::basic_json<>, InputAd"
"apterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>]");
return (unsigned int)v8;
}
| get_codepoint:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x60],RAX
CMP dword ptr [RAX + 0x14],0x75
JNZ 0x0017683c
JMP 0x0017685b
LAB_0017683c:
LEA RDI,[0x18f20a]
LEA RSI,[0x18cf03]
MOV EDX,0x1c1b
LEA RCX,[0x18f219]
CALL 0x0015d1f0
LAB_0017685b:
MOV dword ptr [RBP + -0x14],0x0
MOV dword ptr [RBP + -0x38],0xc
MOV dword ptr [RBP + -0x34],0x8
MOV dword ptr [RBP + -0x30],0x4
MOV dword ptr [RBP + -0x2c],0x0
LEA RAX,[RBP + -0x38]
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x20],0x4
LEA RAX,[RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x0015ff40
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x0015ead0
MOV qword ptr [RBP + -0x50],RAX
LAB_001768b0:
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x50]
JZ 0x00176971
MOV RDI,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x54],EAX
CALL 0x0015c450
MOV RAX,qword ptr [RBP + -0x60]
CMP dword ptr [RAX + 0x14],0x30
JL 0x001768fb
MOV RAX,qword ptr [RBP + -0x60]
CMP dword ptr [RAX + 0x14],0x39
JG 0x001768fb
MOV RAX,qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RAX + 0x14]
SUB EAX,0x30
MOV ECX,dword ptr [RBP + -0x54]
SHL EAX,CL
ADD EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0017695e
LAB_001768fb:
MOV RAX,qword ptr [RBP + -0x60]
CMP dword ptr [RAX + 0x14],0x41
JL 0x00176926
MOV RAX,qword ptr [RBP + -0x60]
CMP dword ptr [RAX + 0x14],0x46
JG 0x00176926
MOV RAX,qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RAX + 0x14]
SUB EAX,0x37
MOV ECX,dword ptr [RBP + -0x54]
SHL EAX,CL
ADD EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0017695c
LAB_00176926:
MOV RAX,qword ptr [RBP + -0x60]
CMP dword ptr [RAX + 0x14],0x61
JL 0x00176951
MOV RAX,qword ptr [RBP + -0x60]
CMP dword ptr [RAX + 0x14],0x66
JG 0x00176951
MOV RAX,qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RAX + 0x14]
SUB EAX,0x57
MOV ECX,dword ptr [RBP + -0x54]
SHL EAX,CL
ADD EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0017695a
LAB_00176951:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001769ba
LAB_0017695a:
JMP 0x0017695c
LAB_0017695c:
JMP 0x0017695e
LAB_0017695e:
JMP 0x00176960
LAB_00176960:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x4
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001768b0
LAB_00176971:
XOR EAX,EAX
XOR ECX,ECX
CMP ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RBP + -0x61],AL
JG 0x0017698a
CMP dword ptr [RBP + -0x14],0xffff
SETLE AL
MOV byte ptr [RBP + -0x61],AL
LAB_0017698a:
MOV AL,byte ptr [RBP + -0x61]
TEST AL,0x1
JNZ 0x00176993
JMP 0x00176995
LAB_00176993:
JMP 0x001769b4
LAB_00176995:
LEA RDI,[0x18f378]
LEA RSI,[0x18cf03]
MOV EDX,0x1c35
LEA RCX,[0x18f219]
CALL 0x0015d1f0
LAB_001769b4:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
LAB_001769ba:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
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 > > >::get_codepoint() */
uint __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>>>
::get_codepoint(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;
int iVar2;
int4 *puVar3;
byte bVar4;
bool local_69;
int4 *local_50;
int4 local_40;
int4 local_3c;
int4 local_38;
int4 local_34;
int4 *local_30;
int8 local_28;
uint local_1c;
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 (*(int *)(this + 0x14) != 0x75) {
/* WARNING: Subroutine does not return */
__assert_fail("current == \'u\'",
"/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp"
,0x1c1b,
"int nlohmann::detail::lexer<nlohmann::basic_json<>, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>>::get_codepoint() [BasicJsonType = nlohmann::basic_json<>, InputAdapterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>]"
);
}
local_1c = 0;
local_40 = 0xc;
local_3c = 8;
local_38 = 4;
local_34 = 0;
local_30 = &local_40;
local_28 = 4;
local_50 = (int4 *)
std::initializer_list<unsigned_int>::begin((initializer_list<unsigned_int> *)&local_30)
;
puVar3 = (int4 *)
std::initializer_list<unsigned_int>::end((initializer_list<unsigned_int> *)&local_30);
do {
if (local_50 == puVar3) {
local_69 = local_1c < 0x10000;
if (local_69) {
return local_1c;
}
/* WARNING: Subroutine does not return */
__assert_fail("0x0000 <= codepoint && codepoint <= 0xFFFF",
"/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp"
,0x1c35,
"int nlohmann::detail::lexer<nlohmann::basic_json<>, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>>::get_codepoint() [BasicJsonType = nlohmann::basic_json<>, InputAdapterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>]"
);
}
uVar1 = *local_50;
get(this);
bVar4 = (byte)uVar1;
if ((*(int *)(this + 0x14) < 0x30) || (0x39 < *(int *)(this + 0x14))) {
if ((*(int *)(this + 0x14) < 0x41) || (0x46 < *(int *)(this + 0x14))) {
if ((*(int *)(this + 0x14) < 0x61) || (0x66 < *(int *)(this + 0x14))) {
return 0xffffffff;
}
iVar2 = *(int *)(this + 0x14) + -0x57 << (bVar4 & 0x1f);
}
else {
iVar2 = *(int *)(this + 0x14) + -0x37 << (bVar4 & 0x1f);
}
}
else {
iVar2 = *(int *)(this + 0x14) + -0x30 << (bVar4 & 0x1f);
}
local_1c = iVar2 + local_1c;
local_50 = local_50 + 1;
} while( true );
}
| |
52,570 | 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>>>>>::get_codepoint() | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | int get_codepoint()
{
// this function only makes sense after reading `\u`
JSON_ASSERT(current == 'u');
int codepoint = 0;
const auto factors = { 12u, 8u, 4u, 0u };
for (const auto factor : factors)
{
get();
if (current >= '0' && current <= '9')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor);
}
else if (current >= 'A' && current <= 'F')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor);
}
else if (current >= 'a' && current <= 'f')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor);
}
else
{
return -1;
}
}
JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF);
return codepoint;
} | 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>>>>>::get_codepoint():
pushq %rbx
subq $0x10, %rsp
cmpl $0x75, 0x14(%rdi)
jne 0x18ed2
leaq 0x14(%rdi), %rsi
leaq 0xc(%rsp), %rbx
movq %rbx, %rdx
callq 0x12304
movl (%rbx), %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0xb2f4(%rip), %rdi # 0x241cd
leaq 0x9997(%rip), %rsi # 0x22877
leaq 0xb2f5(%rip), %rcx # 0x241dc
movl $0x1c1b, %edx # imm = 0x1C1B
callq 0x11620
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv:
push rbx
sub rsp, 10h
cmp dword ptr [rdi+14h], 75h ; 'u'
jnz short loc_18ED2
lea rsi, [rdi+14h]
lea rbx, [rsp+18h+var_C]
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv_cold_1; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<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_codepoint(void) [clone]
mov eax, [rbx]
add rsp, 10h
pop rbx
retn
loc_18ED2:
lea rdi, aCurrentU; "current == 'u'"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntNlohmannDet; "int nlohmann::detail::lexer<nlohmann::b"...
mov edx, 1C1Bh
call ___assert_fail
| 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>>>::get_codepoint(
long long a1)
{
unsigned int v2[3]; // [rsp+Ch] [rbp-Ch] BYREF
if ( *(_DWORD *)(a1 + 20) != 117 )
__assert_fail(
"current == 'u'",
"/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp",
7195LL,
"int nlohmann::detail::lexer<nlohmann::basic_json<>, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_i"
"terator<const char *, std::basic_string<char>>>>::get_codepoint() [BasicJsonType = nlohmann::basic_json<>, InputAd"
"apterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>]");
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_codepoint(
(unsigned __int8 **)a1,
(int *)(a1 + 20),
v2);
return v2[0];
}
| get_codepoint:
PUSH RBX
SUB RSP,0x10
CMP dword ptr [RDI + 0x14],0x75
JNZ 0x00118ed2
LEA RSI,[RDI + 0x14]
LEA RBX,[RSP + 0xc]
MOV RDX,RBX
CALL 0x00112304
MOV EAX,dword ptr [RBX]
ADD RSP,0x10
POP RBX
RET
LAB_00118ed2:
LEA RDI,[0x1241cd]
LEA RSI,[0x122877]
LEA RCX,[0x1241dc]
MOV EDX,0x1c1b
CALL 0x00111620
|
/* 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 > > >::get_codepoint() */
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>>>
::get_codepoint(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 local_c;
if (*(int *)(this + 0x14) == 0x75) {
get_codepoint();
return local_c;
}
/* WARNING: Subroutine does not return */
__assert_fail("current == \'u\'",
"/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp"
,0x1c1b,
"int nlohmann::detail::lexer<nlohmann::basic_json<>, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>>::get_codepoint() [BasicJsonType = nlohmann::basic_json<>, InputAdapterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>]"
);
}
| |
52,571 | 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>>>>>::get_codepoint() | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | int get_codepoint()
{
// this function only makes sense after reading `\u`
JSON_ASSERT(current == 'u');
int codepoint = 0;
const auto factors = { 12u, 8u, 4u, 0u };
for (const auto factor : factors)
{
get();
if (current >= '0' && current <= '9')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor);
}
else if (current >= 'A' && current <= 'F')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor);
}
else if (current >= 'a' && current <= 'f')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor);
}
else
{
return -1;
}
}
JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF);
return codepoint;
} | O2 | 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>>>>>::get_codepoint():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpl $0x75, 0x14(%rdi)
jne 0x23eab
movq %rdi, %rbx
movaps 0x7262(%rip), %xmm0 # 0x2b0a0
movaps %xmm0, (%rsp)
xorl %r15d, %r15d
pushq $-0x1
popq %r12
xorl %ebp, %ebp
cmpq $0x10, %r15
je 0x23e8f
movl (%rsp,%r15), %r14d
movq %rbx, %rdi
callq 0x1c6c0
movl 0x14(%rbx), %eax
leal -0x30(%rax), %edx
cmpl $0xa, %edx
jb 0x23e82
leal -0x41(%rax), %ecx
cmpl $0x5, %ecx
ja 0x23e75
addl $-0x37, %eax
jmp 0x23e80
leal -0x61(%rax), %ecx
cmpl $0x5, %ecx
ja 0x23ea6
addl $-0x57, %eax
movl %eax, %edx
movl %r14d, %ecx
shll %cl, %edx
addl %edx, %ebp
addq $0x4, %r15
jmp 0x23e4b
cmpl $0x10000, %ebp # imm = 0x10000
jae 0x23eca
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %r12d, %ebp
jmp 0x23e97
leaq 0x9696(%rip), %rdi # 0x2d548
leaq 0x79ae(%rip), %rsi # 0x2b867
leaq 0x9697(%rip), %rcx # 0x2d557
movl $0x1c1b, %edx # imm = 0x1C1B
callq 0x1cb30
leaq 0x97e5(%rip), %rdi # 0x2d6b6
leaq 0x798f(%rip), %rsi # 0x2b867
leaq 0x9678(%rip), %rcx # 0x2d557
movl $0x1c35, %edx # imm = 0x1C35
callq 0x1cb30
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
cmp dword ptr [rdi+14h], 75h ; 'u'
jnz short loc_23EAB
mov rbx, rdi
movaps xmm0, cs:xmmword_2B0A0
movaps [rsp+38h+var_38], xmm0
xor r15d, r15d
push 0FFFFFFFFFFFFFFFFh
pop r12
xor ebp, ebp
loc_23E4B:
cmp r15, 10h
jz short loc_23E8F
mov r14d, dword ptr [rsp+r15+38h+var_38]
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]
lea edx, [rax-30h]
cmp edx, 0Ah
jb short loc_23E82
lea ecx, [rax-41h]
cmp ecx, 5
ja short loc_23E75
add eax, 0FFFFFFC9h
jmp short loc_23E80
loc_23E75:
lea ecx, [rax-61h]
cmp ecx, 5
ja short loc_23EA6
add eax, 0FFFFFFA9h
loc_23E80:
mov edx, eax
loc_23E82:
mov ecx, r14d
shl edx, cl
add ebp, edx
add r15, 4
jmp short loc_23E4B
loc_23E8F:
cmp ebp, 10000h
jnb short loc_23ECA
loc_23E97:
mov eax, ebp
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_23EA6:
mov ebp, r12d
jmp short loc_23E97
loc_23EAB:
lea rdi, aCurrentU; "current == 'u'"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntNlohmannDet; "int nlohmann::detail::lexer<nlohmann::b"...
mov edx, 1C1Bh
call ___assert_fail
loc_23ECA:
lea rdi, a0x0000Codepoin; "0x0000 <= codepoint && codepoint <= 0xF"...
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntNlohmannDet; "int nlohmann::detail::lexer<nlohmann::b"...
mov edx, 1C35h
call ___assert_fail
| 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>>>::get_codepoint(
long long a1)
{
long long v1; // r15
unsigned int v2; // ebp
int v3; // r14d
int v4; // eax
int v5; // edx
int v6; // eax
_OWORD v8[3]; // [rsp+0h] [rbp-38h]
if ( *(_DWORD *)(a1 + 20) != 117 )
__assert_fail(
"current == 'u'",
"/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp",
7195LL,
"int nlohmann::detail::lexer<nlohmann::basic_json<>, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_i"
"terator<const char *, std::basic_string<char>>>>::get_codepoint() [BasicJsonType = nlohmann::basic_json<>, InputAd"
"apterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>]");
v8[0] = xmmword_2B0A0;
v1 = 0LL;
v2 = 0;
while ( v1 != 16 )
{
v3 = *(_DWORD *)((char *)v8 + v1);
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(a1);
v4 = *(_DWORD *)(a1 + 20);
v5 = v4 - 48;
if ( (unsigned int)(v4 - 48) >= 0xA )
{
if ( (unsigned int)(v4 - 65) > 5 )
{
if ( (unsigned int)(v4 - 97) > 5 )
return (unsigned int)-1;
v6 = v4 - 87;
}
else
{
v6 = v4 - 55;
}
v5 = v6;
}
v2 += v5 << v3;
v1 += 4LL;
}
if ( v2 >= 0x10000 )
__assert_fail(
"0x0000 <= codepoint && codepoint <= 0xFFFF",
"/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp",
7221LL,
"int nlohmann::detail::lexer<nlohmann::basic_json<>, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_i"
"terator<const char *, std::basic_string<char>>>>::get_codepoint() [BasicJsonType = nlohmann::basic_json<>, InputAd"
"apterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>]");
return v2;
}
| get_codepoint:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
CMP dword ptr [RDI + 0x14],0x75
JNZ 0x00123eab
MOV RBX,RDI
MOVAPS XMM0,xmmword ptr [0x0012b0a0]
MOVAPS xmmword ptr [RSP],XMM0
XOR R15D,R15D
PUSH -0x1
POP R12
XOR EBP,EBP
LAB_00123e4b:
CMP R15,0x10
JZ 0x00123e8f
MOV R14D,dword ptr [RSP + R15*0x1]
MOV RDI,RBX
CALL 0x0011c6c0
MOV EAX,dword ptr [RBX + 0x14]
LEA EDX,[RAX + -0x30]
CMP EDX,0xa
JC 0x00123e82
LEA ECX,[RAX + -0x41]
CMP ECX,0x5
JA 0x00123e75
ADD EAX,-0x37
JMP 0x00123e80
LAB_00123e75:
LEA ECX,[RAX + -0x61]
CMP ECX,0x5
JA 0x00123ea6
ADD EAX,-0x57
LAB_00123e80:
MOV EDX,EAX
LAB_00123e82:
MOV ECX,R14D
SHL EDX,CL
ADD EBP,EDX
ADD R15,0x4
JMP 0x00123e4b
LAB_00123e8f:
CMP EBP,0x10000
JNC 0x00123eca
LAB_00123e97:
MOV EAX,EBP
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00123ea6:
MOV EBP,R12D
JMP 0x00123e97
LAB_00123eab:
LEA RDI,[0x12d548]
LEA RSI,[0x12b867]
LEA RCX,[0x12d557]
MOV EDX,0x1c1b
CALL 0x0011cb30
LAB_00123eca:
LEA RDI,[0x12d6b6]
LEA RSI,[0x12b867]
LEA RCX,[0x12d557]
MOV EDX,0x1c35
CALL 0x0011cb30
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* 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 > > >::get_codepoint() */
uint __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>>>
::get_codepoint(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;
int iVar2;
uint uVar3;
uint uVar4;
long lVar5;
int8 local_38;
int8 uStack_30;
if (*(int *)(this + 0x14) != 0x75) {
/* WARNING: Subroutine does not return */
__assert_fail("current == \'u\'",
"/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp"
,0x1c1b,
"int nlohmann::detail::lexer<nlohmann::basic_json<>, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>>::get_codepoint() [BasicJsonType = nlohmann::basic_json<>, InputAdapterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>]"
);
}
local_38 = _DAT_0012b0a0;
uStack_30 = _UNK_0012b0a8;
lVar5 = 0;
uVar4 = 0;
do {
if (lVar5 == 0x10) {
if (uVar4 < 0x10000) {
return uVar4;
}
/* WARNING: Subroutine does not return */
__assert_fail("0x0000 <= codepoint && codepoint <= 0xFFFF",
"/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp"
,0x1c35,
"int nlohmann::detail::lexer<nlohmann::basic_json<>, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>>::get_codepoint() [BasicJsonType = nlohmann::basic_json<>, InputAdapterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>]"
);
}
uVar1 = *(int4 *)((long)&local_38 + lVar5);
get(this);
iVar2 = *(int *)(this + 0x14);
uVar3 = iVar2 - 0x30;
if (9 < uVar3) {
if (iVar2 - 0x41U < 6) {
uVar3 = iVar2 - 0x37;
}
else {
if (5 < iVar2 - 0x61U) {
return 0xffffffff;
}
uVar3 = iVar2 - 0x57;
}
}
uVar4 = uVar4 + (uVar3 << ((byte)uVar1 & 0x1f));
lVar5 = lVar5 + 4;
} while( true );
}
| |
52,572 | 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>>>>>::get_codepoint() | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | int get_codepoint()
{
// this function only makes sense after reading `\u`
JSON_ASSERT(current == 'u');
int codepoint = 0;
const auto factors = { 12u, 8u, 4u, 0u };
for (const auto factor : factors)
{
get();
if (current >= '0' && current <= '9')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor);
}
else if (current >= 'A' && current <= 'F')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor);
}
else if (current >= 'a' && current <= 'f')
{
codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor);
}
else
{
return -1;
}
}
JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF);
return codepoint;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<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>>>>>::get_codepoint():
pushq %rbx
subq $0x10, %rsp
cmpl $0x75, 0x14(%rdi)
jne 0x18d24
leaq 0x14(%rdi), %rsi
leaq 0xc(%rsp), %rbx
movq %rbx, %rdx
callq 0x122d5
movl (%rbx), %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0xa4a2(%rip), %rdi # 0x231cd
leaq 0x8b45(%rip), %rsi # 0x21877
leaq 0xa4a3(%rip), %rcx # 0x231dc
movl $0x1c1b, %edx # imm = 0x1C1B
callq 0x11610
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv:
push rbx
sub rsp, 10h
cmp dword ptr [rdi+14h], 75h ; 'u'
jnz short loc_18D24
lea rsi, [rdi+14h]
lea rbx, [rsp+18h+var_C]
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv_cold_1; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<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_codepoint(void) [clone]
mov eax, [rbx]
add rsp, 10h
pop rbx
retn
loc_18D24:
lea rdi, aCurrentU; "current == 'u'"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntNlohmannDet; "int nlohmann::detail::lexer<nlohmann::b"...
mov edx, 1C1Bh
call ___assert_fail
| 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>>>::get_codepoint(
__m128i *a1)
{
unsigned int v2[3]; // [rsp+Ch] [rbp-Ch] BYREF
if ( a1[1].m128i_i32[1] != 117 )
__assert_fail(
"current == 'u'",
"/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp",
7195LL,
"int nlohmann::detail::lexer<nlohmann::basic_json<>, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_i"
"terator<const char *, std::basic_string<char>>>>::get_codepoint() [BasicJsonType = nlohmann::basic_json<>, InputAd"
"apterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>]");
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_codepoint(
a1,
&a1[1].m128i_u32[1],
v2);
return v2[0];
}
| get_codepoint:
PUSH RBX
SUB RSP,0x10
CMP dword ptr [RDI + 0x14],0x75
JNZ 0x00118d24
LEA RSI,[RDI + 0x14]
LEA RBX,[RSP + 0xc]
MOV RDX,RBX
CALL 0x001122d5
MOV EAX,dword ptr [RBX]
ADD RSP,0x10
POP RBX
RET
LAB_00118d24:
LEA RDI,[0x1231cd]
LEA RSI,[0x121877]
LEA RCX,[0x1231dc]
MOV EDX,0x1c1b
CALL 0x00111610
|
/* 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 > > >::get_codepoint() */
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>>>
::get_codepoint(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 local_c;
if (*(int *)(this + 0x14) == 0x75) {
get_codepoint();
return local_c;
}
/* WARNING: Subroutine does not return */
__assert_fail("current == \'u\'",
"/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp"
,0x1c1b,
"int nlohmann::detail::lexer<nlohmann::basic_json<>, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>>::get_codepoint() [BasicJsonType = nlohmann::basic_json<>, InputAdapterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>]"
);
}
| |
52,573 | ma_read_dynamic_record | eloqsql/storage/maria/ma_dynrec.c | int _ma_read_dynamic_record(MARIA_HA *info, uchar *buf,
MARIA_RECORD_POS filepos)
{
int block_of_record;
uint b_type;
MARIA_BLOCK_INFO block_info;
File file;
uchar *UNINIT_VAR(to);
uint UNINIT_VAR(left_length);
MARIA_SHARE *share= info->s;
myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("_ma_read_dynamic_record");
if (filepos == HA_OFFSET_ERROR)
goto err;
file= info->dfile.file;
block_of_record= 0; /* First block of record is numbered as zero. */
block_info.second_read= 0;
do
{
/* A corrupted table can have wrong pointers. (Bug# 19835) */
if (filepos == HA_OFFSET_ERROR)
goto panic;
if (info->opt_flag & WRITE_CACHE_USED &&
(info->rec_cache.pos_in_file < filepos +
MARIA_BLOCK_INFO_HEADER_LENGTH) &&
flush_io_cache(&info->rec_cache))
goto err;
info->rec_cache.seek_not_done=1;
if ((b_type= _ma_get_block_info(info, &block_info, file, filepos)) &
(BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR |
BLOCK_FATAL_ERROR))
{
if (b_type & (BLOCK_SYNC_ERROR | BLOCK_DELETED))
my_errno=HA_ERR_RECORD_DELETED;
goto err;
}
if (block_of_record++ == 0) /* First block */
{
info->cur_row.total_length= block_info.rec_len;
if (block_info.rec_len > (uint) share->base.max_pack_length)
goto panic;
if (share->base.blobs)
{
if (_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size,
block_info.rec_len +
share->base.extra_rec_buff_size, flag))
goto err;
}
to= info->rec_buff;
left_length=block_info.rec_len;
}
if (left_length < block_info.data_len || ! block_info.data_len)
goto panic; /* Wrong linked record */
/* copy information that is already read */
{
uint offset= (uint) (block_info.filepos - filepos);
uint prefetch_len= (sizeof(block_info.header) - offset);
filepos+= sizeof(block_info.header);
if (prefetch_len > block_info.data_len)
prefetch_len= block_info.data_len;
if (prefetch_len)
{
memcpy(to, block_info.header + offset, prefetch_len);
block_info.data_len-= prefetch_len;
left_length-= prefetch_len;
to+= prefetch_len;
}
}
/* read rest of record from file */
if (block_info.data_len)
{
if (info->opt_flag & WRITE_CACHE_USED &&
info->rec_cache.pos_in_file < filepos + block_info.data_len &&
flush_io_cache(&info->rec_cache))
goto err;
/*
What a pity that this method is not called 'file_pread' and that
there is no equivalent without seeking. We are at the right
position already. :(
*/
if (share->file_read(info, to, block_info.data_len,
filepos, MYF(MY_NABP)))
goto panic;
left_length-=block_info.data_len;
to+=block_info.data_len;
}
filepos= block_info.next_filepos;
} while (left_length);
info->update|= HA_STATE_AKTIV; /* We have a aktive record */
fast_ma_writeinfo(info);
DBUG_RETURN(_ma_rec_unpack(info,buf,info->rec_buff,block_info.rec_len) !=
MY_FILE_ERROR ? 0 : my_errno);
err:
fast_ma_writeinfo(info);
DBUG_RETURN(my_errno);
panic:
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
goto err;
} | O0 | c | ma_read_dynamic_record:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x70(%rbp)
movq %rsi, -0x78(%rbp)
movq %rdx, -0x80(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
movl -0x9c(%rbp), %eax
movl %eax, -0x9c(%rbp)
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movsbl 0x7d9(%rax), %edx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpl $0x0, %edx
cmovnel %ecx, %eax
orl $0x10, %eax
movl %eax, %eax
movq %rax, -0xb0(%rbp)
cmpq $-0x1, -0x80(%rbp)
jne 0x85d9f
jmp 0x86118
movq -0x70(%rbp), %rax
movl 0x480(%rax), %eax
movl %eax, -0x8c(%rbp)
movl $0x0, -0x84(%rbp)
movl $0x0, -0x10(%rbp)
cmpq $-0x1, -0x80(%rbp)
jne 0x85dcc
jmp 0x86141
movq -0x70(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x85e15
movq -0x70(%rbp), %rax
movq 0x4b8(%rax), %rax
movq -0x80(%rbp), %rcx
addq $0x14, %rcx
cmpq %rcx, %rax
jae 0x85e15
movq -0x70(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
movl $0x1, %esi
callq 0x1069c0
cmpl $0x0, %eax
je 0x85e15
jmp 0x86118
movq -0x70(%rbp), %rax
movl $0x1, 0x598(%rax)
movq -0x70(%rbp), %rdi
movl -0x8c(%rbp), %edx
movq -0x80(%rbp), %rcx
leaq -0x60(%rbp), %rsi
callq 0x84140
movl %eax, -0x88(%rbp)
andl $0x3c, %eax
cmpl $0x0, %eax
je 0x85e66
movl -0x88(%rbp), %eax
andl $0x14, %eax
cmpl $0x0, %eax
je 0x85e61
callq 0x122520
movl $0x86, (%rax)
jmp 0x86118
movl -0x84(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x84(%rbp)
cmpl $0x0, %eax
jne 0x85f1a
movq -0x48(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x110(%rax)
movq -0x48(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq 0x3b0(%rcx), %rcx
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x85ead
jmp 0x86141
movq -0xa8(%rbp), %rax
cmpl $0x0, 0x3f0(%rax)
je 0x85efe
movq -0x70(%rbp), %rdi
addq $0x3a0, %rdi # imm = 0x3A0
movq -0x70(%rbp), %rsi
addq $0x460, %rsi # imm = 0x460
movq -0x48(%rbp), %rdx
movq -0xa8(%rbp), %rax
movl 0x424(%rax), %eax
addq %rax, %rdx
movq -0xb0(%rbp), %rcx
callq 0x6a800
cmpb $0x0, %al
je 0x85efc
jmp 0x86118
jmp 0x85efe
movq -0x70(%rbp), %rax
movq 0x3a0(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x48(%rbp), %rax
movl %eax, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
cmpq -0x40(%rbp), %rax
jb 0x85f2d
cmpq $0x0, -0x40(%rbp)
jne 0x85f32
jmp 0x86141
movq -0x28(%rbp), %rax
subq -0x80(%rbp), %rax
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
movl %eax, %ecx
movl $0x14, %eax
subq %rcx, %rax
movl %eax, -0xb8(%rbp)
movq -0x80(%rbp), %rax
addq $0x14, %rax
movq %rax, -0x80(%rbp)
movl -0xb8(%rbp), %eax
cmpq -0x40(%rbp), %rax
jbe 0x85f78
movq -0x40(%rbp), %rax
movl %eax, -0xb8(%rbp)
cmpl $0x0, -0xb8(%rbp)
je 0x85fe2
movq -0x98(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl -0xb4(%rbp), %eax
addq %rax, %rsi
movl -0xb8(%rbp), %eax
movl %eax, %edx
callq 0x2a0c0
movl -0xb8(%rbp), %eax
movl %eax, %ecx
movq -0x40(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movl -0xb8(%rbp), %ecx
movl -0x9c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x9c(%rbp)
movl -0xb8(%rbp), %ecx
movq -0x98(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x8608f
movq -0x70(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x86036
movq -0x70(%rbp), %rax
movq 0x4b8(%rax), %rax
movq -0x80(%rbp), %rcx
addq -0x40(%rbp), %rcx
cmpq %rcx, %rax
jae 0x86036
movq -0x70(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
movl $0x1, %esi
callq 0x1069c0
cmpl $0x0, %eax
je 0x86036
jmp 0x86118
movq -0xa8(%rbp), %rax
movq 0x6e0(%rax), %rax
movq -0x70(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x80(%rbp), %rcx
movl $0x4, %r8d
callq *%rax
cmpq $0x0, %rax
je 0x8606a
jmp 0x86141
movq -0x40(%rbp), %rcx
movl -0x9c(%rbp), %eax
subq %rcx, %rax
movl %eax, -0x9c(%rbp)
movq -0x40(%rbp), %rax
addq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpl $0x0, -0x9c(%rbp)
jne 0x85dc0
movq -0x70(%rbp), %rax
movl 0x624(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x624(%rax)
movq -0x70(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x860d2
movq -0x70(%rbp), %rdi
xorl %esi, %esi
callq 0x7c070
jmp 0x860d4
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rax
movq 0x3a0(%rax), %rdx
movq -0x48(%rbp), %rcx
callq 0x85640
cmpq $-0x1, %rax
je 0x86100
xorl %eax, %eax
movl %eax, -0xbc(%rbp)
jmp 0x8610d
callq 0x122520
movl (%rax), %eax
movl %eax, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
movl %eax, -0x64(%rbp)
jmp 0x86151
movq -0x70(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x86133
movq -0x70(%rbp), %rdi
xorl %esi, %esi
callq 0x7c070
jmp 0x86135
callq 0x122520
movl (%rax), %eax
movl %eax, -0x64(%rbp)
jmp 0x86151
movq -0x70(%rbp), %rdi
movl $0x7f, %esi
callq 0x70210
jmp 0x86118
movl -0x64(%rbp), %eax
movl %eax, -0xc0(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x8617b
movl -0xc0(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
callq 0x2a290
| _ma_read_dynamic_record:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_70], rdi
mov [rbp+var_78], rsi
mov [rbp+var_80], rdx
mov rax, [rbp+var_98]
mov [rbp+var_98], rax
mov eax, [rbp+var_9C]
mov [rbp+var_9C], eax
mov rax, [rbp+var_70]
mov rax, [rax]
mov [rbp+var_A8], rax
mov rax, [rbp+var_A8]
movsx edx, byte ptr [rax+7D9h]
xor eax, eax
mov ecx, 10000h
cmp edx, 0
cmovnz eax, ecx
or eax, 10h
mov eax, eax
mov [rbp+var_B0], rax
cmp [rbp+var_80], 0FFFFFFFFFFFFFFFFh
jnz short loc_85D9F
jmp loc_86118
loc_85D9F:
mov rax, [rbp+var_70]
mov eax, [rax+480h]
mov [rbp+var_8C], eax
mov [rbp+var_84], 0
mov [rbp+var_10], 0
loc_85DC0:
cmp [rbp+var_80], 0FFFFFFFFFFFFFFFFh
jnz short loc_85DCC
jmp loc_86141
loc_85DCC:
mov rax, [rbp+var_70]
mov eax, [rax+61Ch]
and eax, 10h
cmp eax, 0
jz short loc_85E15
mov rax, [rbp+var_70]
mov rax, [rax+4B8h]
mov rcx, [rbp+var_80]
add rcx, 14h
cmp rax, rcx
jnb short loc_85E15
mov rdi, [rbp+var_70]
add rdi, 4B8h
mov esi, 1
call my_b_flush_io_cache
cmp eax, 0
jz short loc_85E15
jmp loc_86118
loc_85E15:
mov rax, [rbp+var_70]
mov dword ptr [rax+598h], 1
mov rdi, [rbp+var_70]
mov edx, [rbp+var_8C]
mov rcx, [rbp+var_80]
lea rsi, [rbp+var_60]
call _ma_get_block_info
mov [rbp+var_88], eax
and eax, 3Ch
cmp eax, 0
jz short loc_85E66
mov eax, [rbp+var_88]
and eax, 14h
cmp eax, 0
jz short loc_85E61
call _my_thread_var
mov dword ptr [rax], 86h
loc_85E61:
jmp loc_86118
loc_85E66:
mov eax, [rbp+var_84]
mov ecx, eax
add ecx, 1
mov [rbp+var_84], ecx
cmp eax, 0
jnz loc_85F1A
mov rcx, [rbp+var_48]
mov rax, [rbp+var_70]
mov [rax+110h], rcx
mov rax, [rbp+var_48]
mov rcx, [rbp+var_A8]
mov rcx, [rcx+3B0h]
mov ecx, ecx
cmp rax, rcx
jbe short loc_85EAD
jmp loc_86141
loc_85EAD:
mov rax, [rbp+var_A8]
cmp dword ptr [rax+3F0h], 0
jz short loc_85EFE
mov rdi, [rbp+var_70]
add rdi, 3A0h
mov rsi, [rbp+var_70]
add rsi, 460h
mov rdx, [rbp+var_48]
mov rax, [rbp+var_A8]
mov eax, [rax+424h]
add rdx, rax
mov rcx, [rbp+var_B0]
call _ma_alloc_buffer
cmp al, 0
jz short loc_85EFC
jmp loc_86118
loc_85EFC:
jmp short $+2
loc_85EFE:
mov rax, [rbp+var_70]
mov rax, [rax+3A0h]
mov [rbp+var_98], rax
mov rax, [rbp+var_48]
mov [rbp+var_9C], eax
loc_85F1A:
mov eax, [rbp+var_9C]
cmp rax, [rbp+var_40]
jb short loc_85F2D
cmp [rbp+var_40], 0
jnz short loc_85F32
loc_85F2D:
jmp loc_86141
loc_85F32:
mov rax, [rbp+var_28]
sub rax, [rbp+var_80]
mov [rbp+var_B4], eax
mov eax, [rbp+var_B4]
mov ecx, eax
mov eax, 14h
sub rax, rcx
mov [rbp+var_B8], eax
mov rax, [rbp+var_80]
add rax, 14h
mov [rbp+var_80], rax
mov eax, [rbp+var_B8]
cmp rax, [rbp+var_40]
jbe short loc_85F78
mov rax, [rbp+var_40]
mov [rbp+var_B8], eax
loc_85F78:
cmp [rbp+var_B8], 0
jz short loc_85FE2
mov rdi, [rbp+var_98]
lea rsi, [rbp+var_60]
mov eax, [rbp+var_B4]
add rsi, rax
mov eax, [rbp+var_B8]
mov edx, eax
call _memcpy
mov eax, [rbp+var_B8]
mov ecx, eax
mov rax, [rbp+var_40]
sub rax, rcx
mov [rbp+var_40], rax
mov ecx, [rbp+var_B8]
mov eax, [rbp+var_9C]
sub eax, ecx
mov [rbp+var_9C], eax
mov ecx, [rbp+var_B8]
mov rax, [rbp+var_98]
mov ecx, ecx
add rax, rcx
mov [rbp+var_98], rax
loc_85FE2:
cmp [rbp+var_40], 0
jz loc_8608F
mov rax, [rbp+var_70]
mov eax, [rax+61Ch]
and eax, 10h
cmp eax, 0
jz short loc_86036
mov rax, [rbp+var_70]
mov rax, [rax+4B8h]
mov rcx, [rbp+var_80]
add rcx, [rbp+var_40]
cmp rax, rcx
jnb short loc_86036
mov rdi, [rbp+var_70]
add rdi, 4B8h
mov esi, 1
call my_b_flush_io_cache
cmp eax, 0
jz short loc_86036
jmp loc_86118
loc_86036:
mov rax, [rbp+var_A8]
mov rax, [rax+6E0h]
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_98]
mov rdx, [rbp+var_40]
mov rcx, [rbp+var_80]
mov r8d, 4
call rax
cmp rax, 0
jz short loc_8606A
jmp loc_86141
loc_8606A:
mov rcx, [rbp+var_40]
mov eax, [rbp+var_9C]
sub rax, rcx
mov [rbp+var_9C], eax
mov rax, [rbp+var_40]
add rax, [rbp+var_98]
mov [rbp+var_98], rax
loc_8608F:
mov rax, [rbp+var_20]
mov [rbp+var_80], rax
cmp [rbp+var_9C], 0
jnz loc_85DC0
mov rax, [rbp+var_70]
mov ecx, [rax+624h]
or ecx, 2
mov [rax+624h], ecx
mov rax, [rbp+var_70]
mov rax, [rax]
cmp dword ptr [rax+7B8h], 0
jnz short loc_860D2
mov rdi, [rbp+var_70]
xor esi, esi
call _ma_writeinfo
loc_860D2:
jmp short $+2
loc_860D4:
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_78]
mov rax, [rbp+var_70]
mov rdx, [rax+3A0h]
mov rcx, [rbp+var_48]
call _ma_rec_unpack
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_86100
xor eax, eax
mov [rbp+var_BC], eax
jmp short loc_8610D
loc_86100:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_BC], eax
loc_8610D:
mov eax, [rbp+var_BC]
mov [rbp+var_64], eax
jmp short loc_86151
loc_86118:
mov rax, [rbp+var_70]
mov rax, [rax]
cmp dword ptr [rax+7B8h], 0
jnz short loc_86133
mov rdi, [rbp+var_70]
xor esi, esi
call _ma_writeinfo
loc_86133:
jmp short $+2
loc_86135:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_64], eax
jmp short loc_86151
loc_86141:
mov rdi, [rbp+var_70]
mov esi, 7Fh
call _ma_set_fatal_error
jmp short loc_86118
loc_86151:
mov eax, [rbp+var_64]
mov [rbp+var_C0], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_8617B
mov eax, [rbp+var_C0]
add rsp, 0C0h
pop rbp
retn
loc_8617B:
call ___stack_chk_fail
| long long ma_read_dynamic_record(
_DWORD *a1,
unsigned __int8 *a2,
long long a3,
long long a4,
long long a5,
long long a6)
{
long long v6; // rdx
int v7; // eax
unsigned long long v8; // rcx
int v9; // eax
long long v10; // rcx
long long v11; // rdx
long long v12; // rcx
long long v13; // r8
long long v14; // r9
unsigned int v17; // [rsp+8h] [rbp-B8h]
int v18; // [rsp+Ch] [rbp-B4h]
long long v19; // [rsp+10h] [rbp-B0h]
long long v20; // [rsp+18h] [rbp-A8h]
unsigned int v21; // [rsp+24h] [rbp-9Ch]
long long v22; // [rsp+28h] [rbp-98h]
unsigned int v23; // [rsp+34h] [rbp-8Ch]
char block_info; // [rsp+38h] [rbp-88h]
int v25; // [rsp+3Ch] [rbp-84h]
long long v27; // [rsp+40h] [rbp-80h]
unsigned __int8 *v28; // [rsp+48h] [rbp-78h]
long long v29; // [rsp+50h] [rbp-70h]
unsigned __int8 v31[24]; // [rsp+60h] [rbp-60h] BYREF
unsigned long long v32; // [rsp+78h] [rbp-48h]
unsigned long long v33; // [rsp+80h] [rbp-40h]
long long v34; // [rsp+98h] [rbp-28h]
long long v35; // [rsp+A0h] [rbp-20h]
int v36; // [rsp+B0h] [rbp-10h]
unsigned long long v37; // [rsp+B8h] [rbp-8h]
v37 = __readfsqword(0x28u);
v29 = (long long)a1;
v28 = a2;
v20 = *(_QWORD *)a1;
v6 = (unsigned int)*(char *)(*(_QWORD *)a1 + 2009LL);
v7 = 0;
v8 = 0x10000LL;
if ( *(_BYTE *)(*(_QWORD *)a1 + 2009LL) )
v7 = 0x10000;
v19 = v7 | 0x10u;
if ( a3 == -1 )
{
LABEL_38:
if ( !*(_DWORD *)(*(_QWORD *)v29 + 1976LL) )
{
a1 = (_DWORD *)v29;
a2 = 0LL;
ma_writeinfo((long long *)v29, 0LL, v6, v8, a5, a6);
}
return *(unsigned int *)my_thread_var(a1, a2, v6, v8, a5, a6);
}
else
{
v23 = a1[288];
v25 = 0;
v36 = 0;
do
{
if ( a3 == -1 )
{
LABEL_41:
a1 = (_DWORD *)v29;
a2 = (_BYTE *)(&dword_7C + 3);
ma_set_fatal_error((_DWORD *)v29, 0x7Fu, v6, v8, a5, a6);
goto LABEL_38;
}
if ( (*(_DWORD *)(v29 + 1564) & 0x10) != 0 && *(_QWORD *)(v29 + 1208) < (unsigned long long)(a3 + 20) )
{
a1 = (_DWORD *)(v29 + 1208);
a2 = (_BYTE *)(&dword_0 + 1);
if ( (unsigned int)my_b_flush_io_cache(v29 + 1208, 1LL) )
goto LABEL_38;
}
*(_DWORD *)(v29 + 1432) = 1;
a1 = (_DWORD *)v29;
a2 = v31;
block_info = ma_get_block_info(v29, v31, v23, a3, a5, a6);
if ( (block_info & 0x3C) != 0 )
{
if ( (block_info & 0x14) != 0 )
*(_DWORD *)my_thread_var(v29, v31, v6, v8, a5, a6) = 134;
goto LABEL_38;
}
v9 = v25;
v8 = (unsigned int)++v25;
if ( !v9 )
{
*(_QWORD *)(v29 + 272) = v32;
v8 = (unsigned int)*(_QWORD *)(v20 + 944);
if ( v32 > v8 )
goto LABEL_41;
if ( *(_DWORD *)(v20 + 1008) )
{
a1 = (_DWORD *)(v29 + 928);
a2 = (unsigned __int8 *)(v29 + 1120);
if ( ma_alloc_buffer(
(long long *)(v29 + 928),
(unsigned long long *)(v29 + 1120),
*(unsigned int *)(v20 + 1060) + v32,
v19) )
{
goto LABEL_38;
}
}
v22 = *(_QWORD *)(v29 + 928);
v21 = v32;
}
if ( v21 < v33 || !v33 )
goto LABEL_41;
v18 = v34 - a3;
v8 = (unsigned int)(v34 - a3);
v17 = 20 - v8;
v27 = a3 + 20;
if ( (unsigned int)(20 - v8) > v33 )
v17 = v33;
if ( v17 )
{
memcpy(v22, &v31[v18], v17);
v33 -= v17;
v21 -= v17;
v8 = v17;
v22 += v17;
}
if ( v33 )
{
if ( (*(_DWORD *)(v29 + 1564) & 0x10) != 0 && *(_QWORD *)(v29 + 1208) < v33 + v27 )
{
a1 = (_DWORD *)(v29 + 1208);
a2 = (_BYTE *)(&dword_0 + 1);
if ( (unsigned int)my_b_flush_io_cache(v29 + 1208, 1LL) )
goto LABEL_38;
}
if ( (*(long long ( **)(long long, long long, unsigned long long, long long, long long))(v20 + 1760))(
v29,
v22,
v33,
v27,
4LL) )
{
goto LABEL_41;
}
v8 = v33;
v21 -= v33;
v22 += v33;
}
a3 = v35;
}
while ( v21 );
v10 = *(_DWORD *)(v29 + 1572) | 2u;
*(_DWORD *)(v29 + 1572) = v10;
if ( !*(_DWORD *)(*(_QWORD *)v29 + 1976LL) )
ma_writeinfo((long long *)v29, 0LL, v6, v10, a5, a6);
if ( ma_rec_unpack((_DWORD *)v29, v28, *(_QWORD *)(v29 + 928), v32, a5, a6) == -1 )
return *(unsigned int *)my_thread_var(v29, v28, v11, v12, v13, v14);
else
return 0;
}
}
| _ma_read_dynamic_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x70],RDI
MOV qword ptr [RBP + -0x78],RSI
MOV qword ptr [RBP + -0x80],RDX
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x98],RAX
MOV EAX,dword ptr [RBP + -0x9c]
MOV dword ptr [RBP + -0x9c],EAX
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0xa8]
MOVSX EDX,byte ptr [RAX + 0x7d9]
XOR EAX,EAX
MOV ECX,0x10000
CMP EDX,0x0
CMOVNZ EAX,ECX
OR EAX,0x10
MOV EAX,EAX
MOV qword ptr [RBP + -0xb0],RAX
CMP qword ptr [RBP + -0x80],-0x1
JNZ 0x00185d9f
JMP 0x00186118
LAB_00185d9f:
MOV RAX,qword ptr [RBP + -0x70]
MOV EAX,dword ptr [RAX + 0x480]
MOV dword ptr [RBP + -0x8c],EAX
MOV dword ptr [RBP + -0x84],0x0
MOV dword ptr [RBP + -0x10],0x0
LAB_00185dc0:
CMP qword ptr [RBP + -0x80],-0x1
JNZ 0x00185dcc
JMP 0x00186141
LAB_00185dcc:
MOV RAX,qword ptr [RBP + -0x70]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x10
CMP EAX,0x0
JZ 0x00185e15
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x4b8]
MOV RCX,qword ptr [RBP + -0x80]
ADD RCX,0x14
CMP RAX,RCX
JNC 0x00185e15
MOV RDI,qword ptr [RBP + -0x70]
ADD RDI,0x4b8
MOV ESI,0x1
CALL 0x002069c0
CMP EAX,0x0
JZ 0x00185e15
JMP 0x00186118
LAB_00185e15:
MOV RAX,qword ptr [RBP + -0x70]
MOV dword ptr [RAX + 0x598],0x1
MOV RDI,qword ptr [RBP + -0x70]
MOV EDX,dword ptr [RBP + -0x8c]
MOV RCX,qword ptr [RBP + -0x80]
LEA RSI,[RBP + -0x60]
CALL 0x00184140
MOV dword ptr [RBP + -0x88],EAX
AND EAX,0x3c
CMP EAX,0x0
JZ 0x00185e66
MOV EAX,dword ptr [RBP + -0x88]
AND EAX,0x14
CMP EAX,0x0
JZ 0x00185e61
CALL 0x00222520
MOV dword ptr [RAX],0x86
LAB_00185e61:
JMP 0x00186118
LAB_00185e66:
MOV EAX,dword ptr [RBP + -0x84]
MOV ECX,EAX
ADD ECX,0x1
MOV dword ptr [RBP + -0x84],ECX
CMP EAX,0x0
JNZ 0x00185f1a
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RAX + 0x110],RCX
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0xa8]
MOV RCX,qword ptr [RCX + 0x3b0]
MOV ECX,ECX
CMP RAX,RCX
JBE 0x00185ead
JMP 0x00186141
LAB_00185ead:
MOV RAX,qword ptr [RBP + -0xa8]
CMP dword ptr [RAX + 0x3f0],0x0
JZ 0x00185efe
MOV RDI,qword ptr [RBP + -0x70]
ADD RDI,0x3a0
MOV RSI,qword ptr [RBP + -0x70]
ADD RSI,0x460
MOV RDX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0xa8]
MOV EAX,dword ptr [RAX + 0x424]
ADD RDX,RAX
MOV RCX,qword ptr [RBP + -0xb0]
CALL 0x0016a800
CMP AL,0x0
JZ 0x00185efc
JMP 0x00186118
LAB_00185efc:
JMP 0x00185efe
LAB_00185efe:
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x9c],EAX
LAB_00185f1a:
MOV EAX,dword ptr [RBP + -0x9c]
CMP RAX,qword ptr [RBP + -0x40]
JC 0x00185f2d
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x00185f32
LAB_00185f2d:
JMP 0x00186141
LAB_00185f32:
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,qword ptr [RBP + -0x80]
MOV dword ptr [RBP + -0xb4],EAX
MOV EAX,dword ptr [RBP + -0xb4]
MOV ECX,EAX
MOV EAX,0x14
SUB RAX,RCX
MOV dword ptr [RBP + -0xb8],EAX
MOV RAX,qword ptr [RBP + -0x80]
ADD RAX,0x14
MOV qword ptr [RBP + -0x80],RAX
MOV EAX,dword ptr [RBP + -0xb8]
CMP RAX,qword ptr [RBP + -0x40]
JBE 0x00185f78
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0xb8],EAX
LAB_00185f78:
CMP dword ptr [RBP + -0xb8],0x0
JZ 0x00185fe2
MOV RDI,qword ptr [RBP + -0x98]
LEA RSI,[RBP + -0x60]
MOV EAX,dword ptr [RBP + -0xb4]
ADD RSI,RAX
MOV EAX,dword ptr [RBP + -0xb8]
MOV EDX,EAX
CALL 0x0012a0c0
MOV EAX,dword ptr [RBP + -0xb8]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV ECX,dword ptr [RBP + -0xb8]
MOV EAX,dword ptr [RBP + -0x9c]
SUB EAX,ECX
MOV dword ptr [RBP + -0x9c],EAX
MOV ECX,dword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RBP + -0x98]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x98],RAX
LAB_00185fe2:
CMP qword ptr [RBP + -0x40],0x0
JZ 0x0018608f
MOV RAX,qword ptr [RBP + -0x70]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x10
CMP EAX,0x0
JZ 0x00186036
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x4b8]
MOV RCX,qword ptr [RBP + -0x80]
ADD RCX,qword ptr [RBP + -0x40]
CMP RAX,RCX
JNC 0x00186036
MOV RDI,qword ptr [RBP + -0x70]
ADD RDI,0x4b8
MOV ESI,0x1
CALL 0x002069c0
CMP EAX,0x0
JZ 0x00186036
JMP 0x00186118
LAB_00186036:
MOV RAX,qword ptr [RBP + -0xa8]
MOV RAX,qword ptr [RAX + 0x6e0]
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x98]
MOV RDX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x80]
MOV R8D,0x4
CALL RAX
CMP RAX,0x0
JZ 0x0018606a
JMP 0x00186141
LAB_0018606a:
MOV RCX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x9c]
SUB RAX,RCX
MOV dword ptr [RBP + -0x9c],EAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x98],RAX
LAB_0018608f:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x80],RAX
CMP dword ptr [RBP + -0x9c],0x0
JNZ 0x00185dc0
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,dword ptr [RAX + 0x624]
OR ECX,0x2
MOV dword ptr [RAX + 0x624],ECX
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x001860d2
MOV RDI,qword ptr [RBP + -0x70]
XOR ESI,ESI
CALL 0x0017c070
LAB_001860d2:
JMP 0x001860d4
LAB_001860d4:
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x70]
MOV RDX,qword ptr [RAX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x00185640
CMP RAX,-0x1
JZ 0x00186100
XOR EAX,EAX
MOV dword ptr [RBP + -0xbc],EAX
JMP 0x0018610d
LAB_00186100:
CALL 0x00222520
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0xbc],EAX
LAB_0018610d:
MOV EAX,dword ptr [RBP + -0xbc]
MOV dword ptr [RBP + -0x64],EAX
JMP 0x00186151
LAB_00186118:
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00186133
MOV RDI,qword ptr [RBP + -0x70]
XOR ESI,ESI
CALL 0x0017c070
LAB_00186133:
JMP 0x00186135
LAB_00186135:
CALL 0x00222520
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x64],EAX
JMP 0x00186151
LAB_00186141:
MOV RDI,qword ptr [RBP + -0x70]
MOV ESI,0x7f
CALL 0x00170210
JMP 0x00186118
LAB_00186151:
MOV EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0xc0],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0018617b
MOV EAX,dword ptr [RBP + -0xc0]
ADD RSP,0xc0
POP RBP
RET
LAB_0018617b:
CALL 0x0012a290
|
int4 _ma_read_dynamic_record(long *param_1,int8 param_2,long param_3)
{
long lVar1;
char cVar2;
uint uVar3;
int iVar4;
uint uVar5;
long lVar6;
long lVar7;
int4 *puVar8;
long in_FS_OFFSET;
int4 local_c4;
uint local_c0;
uint local_a4;
void *local_a0;
int local_8c;
long local_88;
int4 local_6c;
int1 local_68 [24];
ulong local_50;
ulong local_48;
int8 local_30;
long local_28;
int4 local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
lVar7 = *param_1;
uVar3 = 0;
if (*(char *)(lVar7 + 0x7d9) != '\0') {
uVar3 = 0x10000;
}
if (param_3 == -1) {
LAB_00186118:
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
puVar8 = (int4 *)_my_thread_var();
local_6c = *puVar8;
}
else {
lVar1 = param_1[0x90];
local_8c = 0;
local_18 = 0;
local_88 = param_3;
do {
if (local_88 == -1) {
LAB_00186141:
_ma_set_fatal_error(param_1,0x7f);
goto LAB_00186118;
}
if ((((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) &&
((ulong)param_1[0x97] < local_88 + 0x14U)) &&
(iVar4 = my_b_flush_io_cache(param_1 + 0x97,1), iVar4 != 0)) goto LAB_00186118;
*(int4 *)(param_1 + 0xb3) = 1;
uVar5 = _ma_get_block_info(param_1,local_68,(int)lVar1,local_88);
if ((uVar5 & 0x3c) != 0) {
if ((uVar5 & 0x14) != 0) {
puVar8 = (int4 *)_my_thread_var();
*puVar8 = 0x86;
}
goto LAB_00186118;
}
if (local_8c == 0) {
param_1[0x22] = local_50;
if ((*(ulong *)(lVar7 + 0x3b0) & 0xffffffff) < local_50) goto LAB_00186141;
if ((*(int *)(lVar7 + 0x3f0) != 0) &&
(cVar2 = _ma_alloc_buffer(param_1 + 0x74,param_1 + 0x8c,
local_50 + *(uint *)(lVar7 + 0x424),uVar3 | 0x10),
cVar2 != '\0')) goto LAB_00186118;
local_a0 = (void *)param_1[0x74];
local_a4 = (uint)local_50;
}
if ((local_a4 < local_48) || (local_48 == 0)) goto LAB_00186141;
uVar5 = (int)local_30 - (int)local_88;
local_c0 = 0x14 - uVar5;
if (local_48 < local_c0) {
local_c0 = (uint)local_48;
}
if (local_c0 != 0) {
memcpy(local_a0,local_68 + uVar5,(ulong)local_c0);
local_48 = local_48 - local_c0;
local_a4 = local_a4 - local_c0;
local_a0 = (void *)((long)local_a0 + (ulong)local_c0);
}
if (local_48 != 0) {
if ((((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) &&
((ulong)param_1[0x97] < local_88 + 0x14 + local_48)) &&
(iVar4 = my_b_flush_io_cache(param_1 + 0x97,1), iVar4 != 0)) goto LAB_00186118;
lVar6 = (**(code **)(lVar7 + 0x6e0))(param_1,local_a0,local_48,local_88 + 0x14,4);
if (lVar6 != 0) goto LAB_00186141;
local_a4 = local_a4 - (int)local_48;
local_a0 = (void *)(local_48 + (long)local_a0);
}
local_88 = local_28;
local_8c = local_8c + 1;
} while (local_a4 != 0);
*(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 2;
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
lVar7 = _ma_rec_unpack(param_1,param_2,param_1[0x74],local_50);
if (lVar7 == -1) {
puVar8 = (int4 *)_my_thread_var();
local_c4 = *puVar8;
}
else {
local_c4 = 0;
}
local_6c = local_c4;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_6c;
}
| |
52,574 | ma_control_file_write_and_force | eloqsql/storage/maria/ma_control_file.c | int ma_control_file_write_and_force(LSN last_checkpoint_lsn_arg,
uint32 last_logno_arg,
TrID max_trid_arg,
uint8 recovery_failures_arg)
{
uchar buffer[CF_MAX_SIZE];
uint32 sum;
my_bool no_need_sync;
DBUG_ENTER("ma_control_file_write_and_force");
/*
We don't need to sync if this is just an increase of
recovery_failures: it's even good if that counter is not increased on disk
in case of power or hardware failure (less false positives when removing
logs).
*/
no_need_sync= ((last_checkpoint_lsn == last_checkpoint_lsn_arg) &&
(last_logno == last_logno_arg) &&
(max_trid_in_control_file == max_trid_arg) &&
(recovery_failures_arg > 0));
if (control_file_fd < 0)
DBUG_RETURN(1);
#ifndef DBUG_OFF
if (maria_multi_threaded)
translog_lock_handler_assert_owner();
#endif
lsn_store(buffer + CF_LSN_OFFSET, last_checkpoint_lsn_arg);
int4store(buffer + CF_FILENO_OFFSET, last_logno_arg);
transid_store(buffer + CF_MAX_TRID_OFFSET, max_trid_arg);
(buffer + CF_RECOV_FAIL_OFFSET)[0]= recovery_failures_arg;
if (cf_changeable_size > CF_CHANGEABLE_TOTAL_SIZE)
{
/*
More room than needed for us. Must be a newer version. Clear part which
we cannot maintain, so that any future version notices we didn't
maintain its extra data.
*/
uint zeroed= cf_changeable_size - CF_CHANGEABLE_TOTAL_SIZE;
char msg[150];
bzero(buffer + CF_CHANGEABLE_TOTAL_SIZE, zeroed);
my_snprintf(msg, sizeof(msg),
"Control file must be from a newer version; zero-ing out %u"
" unknown bytes in control file at offset %u", zeroed,
cf_changeable_size + cf_create_time_size);
ma_message_no_user(ME_WARNING, msg);
}
else
{
/* not enough room for what we need to store: enlarge */
cf_changeable_size= CF_CHANGEABLE_TOTAL_SIZE;
}
/* Note that the create-time portion is not touched */
/* Checksum is stored first */
compile_time_assert(CF_CHECKSUM_OFFSET == 0);
sum= my_checksum(0, buffer + CF_CHECKSUM_SIZE,
cf_changeable_size - CF_CHECKSUM_SIZE);
int4store(buffer, sum);
if (my_pwrite(control_file_fd, buffer, cf_changeable_size,
cf_create_time_size, MYF(MY_FNABP | MY_WME)) ||
(!no_need_sync && mysql_file_sync(control_file_fd, MYF(MY_WME))))
DBUG_RETURN(1);
last_checkpoint_lsn= last_checkpoint_lsn_arg;
last_logno= last_logno_arg;
max_trid_in_control_file= max_trid_arg;
recovery_failures= recovery_failures_arg;
cf_changeable_size= CF_CHANGEABLE_TOTAL_SIZE; /* no more warning */
DBUG_RETURN(0);
} | O0 | c | ma_control_file_write_and_force:
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp # imm = 0x310
movb %cl, %al
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x2c0(%rbp)
movl %esi, -0x2c4(%rbp)
movq %rdx, -0x2d0(%rbp)
movb %al, -0x2d1(%rbp)
movq 0x4298ed(%rip), %rcx # 0x478168
xorl %eax, %eax
cmpq -0x2c0(%rbp), %rcx
movb %al, -0x309(%rbp)
jne 0x4e8cd
movl 0x4298de(%rip), %ecx # 0x478170
xorl %eax, %eax
cmpl -0x2c4(%rbp), %ecx
movb %al, -0x309(%rbp)
jne 0x4e8cd
movq 0x4298cf(%rip), %rcx # 0x478178
xorl %eax, %eax
cmpq -0x2d0(%rbp), %rcx
movb %al, -0x309(%rbp)
jne 0x4e8cd
movzbl -0x2d1(%rbp), %eax
cmpl $0x0, %eax
setg %al
movb %al, -0x309(%rbp)
movb -0x309(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x2d9(%rbp)
cmpl $0x0, 0x26eadb(%rip) # 0x2bd3c0
jge 0x4e8f8
jmp 0x4e8e9
movl $0x1, -0x2b4(%rbp)
jmp 0x4eb58
jmp 0x4e8fa
jmp 0x4e8fc
movq -0x2c0(%rbp), %rax
sarq $0x20, %rax
movb %al, -0x20c(%rbp)
movq -0x2c0(%rbp), %rax
sarq $0x20, %rax
shrl $0x8, %eax
movb %al, -0x20b(%rbp)
movq -0x2c0(%rbp), %rax
sarq $0x20, %rax
shrl $0x10, %eax
movb %al, -0x20a(%rbp)
jmp 0x4e937
leaq -0x210(%rbp), %rax
addq $0x4, %rax
addq $0x3, %rax
movq %rax, -0x2e8(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x2c0(%rbp), %rax
movl %eax, %ecx
movq -0x2e8(%rbp), %rax
movl %ecx, (%rax)
jmp 0x4e96b
jmp 0x4e96d
leaq -0x210(%rbp), %rax
addq $0xb, %rax
movq %rax, -0x2f0(%rbp)
movl -0x2c4(%rbp), %ecx
movq -0x2f0(%rbp), %rax
movl %ecx, (%rax)
jmp 0x4e990
leaq -0x210(%rbp), %rax
addq $0xf, %rax
movq %rax, -0x2f8(%rbp)
movq -0x2d0(%rbp), %rax
movl %eax, %ecx
movq -0x2f8(%rbp), %rax
movl %ecx, (%rax)
movq -0x2d0(%rbp), %rax
shrq $0x20, %rax
movw %ax, %cx
movq -0x2f8(%rbp), %rax
movw %cx, 0x4(%rax)
movb -0x2d1(%rbp), %al
movb %al, -0x1fb(%rbp)
cmpl $0x16, 0x4297a8(%rip) # 0x478188
jbe 0x4ea5a
movl 0x4297a0(%rip), %eax # 0x478188
subl $0x16, %eax
movl %eax, -0x2fc(%rbp)
leaq -0x210(%rbp), %rdi
addq $0x16, %rdi
movl -0x2fc(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
leaq -0x2b0(%rbp), %rdi
movl -0x2fc(%rbp), %ecx
movl 0x429769(%rip), %r8d # 0x478188
addl 0x42975e(%rip), %r8d # 0x478184
movl $0x96, %esi
leaq 0x10310b(%rip), %rdx # 0x151b3d
movb $0x0, %al
callq 0x14d330
leaq -0x2b0(%rbp), %rcx
movl $0xa8, %edi
leaq 0x103157(%rip), %rsi # 0x151ba3
movl $0x800, %edx # imm = 0x800
movb $0x0, %al
callq 0xefcc0
jmp 0x4ea64
movl $0x16, 0x429724(%rip) # 0x478188
jmp 0x4ea66
jmp 0x4ea68
leaq -0x210(%rbp), %rsi
addq $0x4, %rsi
movl 0x42970f(%rip), %eax # 0x478188
subl $0x4, %eax
movl %eax, %eax
movl %eax, %edx
xorl %edi, %edi
callq 0x102200
movl %eax, -0x2d8(%rbp)
leaq -0x210(%rbp), %rax
movq %rax, -0x308(%rbp)
movl -0x2d8(%rbp), %ecx
movq -0x308(%rbp), %rax
movl %ecx, (%rax)
movl 0x26e910(%rip), %edi # 0x2bd3c0
leaq -0x210(%rbp), %rsi
movl 0x4296cb(%rip), %eax # 0x478188
movl %eax, %edx
movl 0x4296bf(%rip), %eax # 0x478184
movl %eax, %ecx
movl $0x12, %r8d
callq 0xf4890
cmpq $0x0, %rax
jne 0x4eb02
cmpb $0x0, -0x2d9(%rbp)
jne 0x4eb10
movl 0x26e8d9(%rip), %edx # 0x2bd3c0
leaq 0x102df6(%rip), %rdi # 0x1518e4
movl $0x22c, %esi # imm = 0x22C
movl $0x10, %ecx
callq 0x4eb90
cmpl $0x0, %eax
je 0x4eb10
jmp 0x4eb04
movl $0x1, -0x2b4(%rbp)
jmp 0x4eb58
movq -0x2c0(%rbp), %rax
movq %rax, 0x42964a(%rip) # 0x478168
movl -0x2c4(%rbp), %eax
movl %eax, 0x429646(%rip) # 0x478170
movq -0x2d0(%rbp), %rax
movq %rax, 0x429640(%rip) # 0x478178
movb -0x2d1(%rbp), %al
movb %al, 0x42963c(%rip) # 0x478180
movl $0x16, 0x42963a(%rip) # 0x478188
movl $0x0, -0x2b4(%rbp)
movl -0x2b4(%rbp), %eax
movl %eax, -0x310(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4eb85
movl -0x310(%rbp), %eax
addq $0x310, %rsp # imm = 0x310
popq %rbp
retq
callq 0x2a270
nopw (%rax,%rax)
| ma_control_file_write_and_force:
push rbp
mov rbp, rsp
sub rsp, 310h
mov al, cl
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_2C0], rdi
mov [rbp+var_2C4], esi
mov [rbp+var_2D0], rdx
mov [rbp+var_2D1], al
mov rcx, cs:last_checkpoint_lsn
xor eax, eax
cmp rcx, [rbp+var_2C0]
mov [rbp+var_309], al
jnz short loc_4E8CD
mov ecx, cs:last_logno
xor eax, eax
cmp ecx, [rbp+var_2C4]
mov [rbp+var_309], al
jnz short loc_4E8CD
mov rcx, cs:max_trid_in_control_file
xor eax, eax
cmp rcx, [rbp+var_2D0]
mov [rbp+var_309], al
jnz short loc_4E8CD
movzx eax, [rbp+var_2D1]
cmp eax, 0
setnle al
mov [rbp+var_309], al
loc_4E8CD:
mov al, [rbp+var_309]
and al, 1
movzx eax, al
mov [rbp+var_2D9], al
cmp cs:control_file_fd, 0
jge short loc_4E8F8
jmp short $+2
loc_4E8E9:
mov [rbp+var_2B4], 1
jmp loc_4EB58
loc_4E8F8:
jmp short $+2
loc_4E8FA:
jmp short $+2
loc_4E8FC:
mov rax, [rbp+var_2C0]
sar rax, 20h
mov [rbp+var_20C], al
mov rax, [rbp+var_2C0]
sar rax, 20h
shr eax, 8
mov [rbp+var_20B], al
mov rax, [rbp+var_2C0]
sar rax, 20h
shr eax, 10h
mov [rbp+var_20A], al
jmp short $+2
loc_4E937:
lea rax, [rbp+var_210]
add rax, 4
add rax, 3
mov [rbp+var_2E8], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_2C0]
mov ecx, eax
mov rax, [rbp+var_2E8]
mov [rax], ecx
jmp short $+2
loc_4E96B:
jmp short $+2
loc_4E96D:
lea rax, [rbp+var_210]
add rax, 0Bh
mov [rbp+var_2F0], rax
mov ecx, [rbp+var_2C4]
mov rax, [rbp+var_2F0]
mov [rax], ecx
jmp short $+2
loc_4E990:
lea rax, [rbp+var_210]
add rax, 0Fh
mov [rbp+var_2F8], rax
mov rax, [rbp+var_2D0]
mov ecx, eax
mov rax, [rbp+var_2F8]
mov [rax], ecx
mov rax, [rbp+var_2D0]
shr rax, 20h
mov cx, ax
mov rax, [rbp+var_2F8]
mov [rax+4], cx
mov al, [rbp+var_2D1]
mov [rbp+var_1FB], al
cmp cs:cf_changeable_size, 16h
jbe short loc_4EA5A
mov eax, cs:cf_changeable_size
sub eax, 16h
mov [rbp+var_2FC], eax
lea rdi, [rbp+var_210]
add rdi, 16h
mov eax, [rbp+var_2FC]
mov edx, eax
xor esi, esi
call _memset
lea rdi, [rbp+var_2B0]
mov ecx, [rbp+var_2FC]
mov r8d, cs:cf_changeable_size
add r8d, cs:cf_create_time_size
mov esi, 96h
lea rdx, aControlFileMus; "Control file must be from a newer versi"...
mov al, 0
call my_snprintf
lea rcx, [rbp+var_2B0]
mov edi, 0A8h
lea rsi, aAriaEngineS; "Aria engine: %s"
mov edx, 800h
mov al, 0
call my_printf_error
jmp short loc_4EA64
loc_4EA5A:
mov cs:cf_changeable_size, 16h
loc_4EA64:
jmp short $+2
loc_4EA66:
jmp short $+2
loc_4EA68:
lea rsi, [rbp+var_210]
add rsi, 4
mov eax, cs:cf_changeable_size
sub eax, 4
mov eax, eax
mov edx, eax
xor edi, edi
call my_checksum
mov [rbp+var_2D8], eax
lea rax, [rbp+var_210]
mov [rbp+var_308], rax
mov ecx, [rbp+var_2D8]
mov rax, [rbp+var_308]
mov [rax], ecx
mov edi, cs:control_file_fd
lea rsi, [rbp+var_210]
mov eax, cs:cf_changeable_size
mov edx, eax
mov eax, cs:cf_create_time_size
mov ecx, eax
mov r8d, 12h
call my_pwrite
cmp rax, 0
jnz short loc_4EB02
cmp [rbp+var_2D9], 0
jnz short loc_4EB10
mov edx, cs:control_file_fd
lea rdi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 22Ch
mov ecx, 10h
call inline_mysql_file_sync_2
cmp eax, 0
jz short loc_4EB10
loc_4EB02:
jmp short $+2
loc_4EB04:
mov [rbp+var_2B4], 1
jmp short loc_4EB58
loc_4EB10:
mov rax, [rbp+var_2C0]
mov cs:last_checkpoint_lsn, rax
mov eax, [rbp+var_2C4]
mov cs:last_logno, eax
mov rax, [rbp+var_2D0]
mov cs:max_trid_in_control_file, rax
mov al, [rbp+var_2D1]
mov cs:recovery_failures, al
mov cs:cf_changeable_size, 16h
mov [rbp+var_2B4], 0
loc_4EB58:
mov eax, [rbp+var_2B4]
mov [rbp+var_310], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_4EB85
mov eax, [rbp+var_310]
add rsp, 310h
pop rbp
retn
loc_4EB85:
call ___stack_chk_fail
| long long ma_control_file_write_and_force(long long a1, int a2, long long a3, char a4)
{
int v4; // r9d
int v5; // r8d
int v6; // r9d
bool v8; // [rsp+7h] [rbp-309h]
int v9; // [rsp+14h] [rbp-2FCh]
_BYTE v13[160]; // [rsp+60h] [rbp-2B0h] BYREF
int v14; // [rsp+100h] [rbp-210h] BYREF
__int16 v15; // [rsp+104h] [rbp-20Ch] BYREF
char v16; // [rsp+106h] [rbp-20Ah]
int v17; // [rsp+107h] [rbp-209h]
int v18; // [rsp+10Bh] [rbp-205h]
int v19; // [rsp+10Fh] [rbp-201h]
__int16 v20; // [rsp+113h] [rbp-1FDh]
char v21; // [rsp+115h] [rbp-1FBh]
_BYTE v22[506]; // [rsp+116h] [rbp-1FAh] BYREF
*(_QWORD *)&v22[498] = __readfsqword(0x28u);
v8 = 0;
if ( last_checkpoint_lsn == a1 )
{
v8 = 0;
if ( last_logno == a2 )
{
v8 = 0;
if ( max_trid_in_control_file == a3 )
v8 = a4 != 0;
}
}
if ( control_file_fd >= 0 )
{
v15 = WORD2(a1);
v16 = BYTE6(a1);
v17 = a1;
v18 = a2;
v19 = a3;
v20 = WORD2(a3);
v21 = a4;
if ( (unsigned int)cf_changeable_size <= 0x16 )
{
cf_changeable_size = 22;
}
else
{
v9 = cf_changeable_size - 22;
memset(v22, 0LL, (unsigned int)(cf_changeable_size - 22));
my_snprintf(
(unsigned int)v13,
150,
(unsigned int)"Control file must be from a newer version; zero-ing out %u unknown bytes in control file at offset %u",
v9,
cf_create_time_size + cf_changeable_size,
v4);
my_printf_error(168, (unsigned int)"Aria engine: %s", 2048, (unsigned int)v13, v5, v6);
}
v14 = my_checksum(0LL, &v15, (unsigned int)(cf_changeable_size - 4));
if ( my_pwrite(
(unsigned int)control_file_fd,
&v14,
(unsigned int)cf_changeable_size,
(unsigned int)cf_create_time_size)
|| !v8
&& (unsigned int)inline_mysql_file_sync_2(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c",
556LL,
(unsigned int)control_file_fd,
16LL) )
{
return 1;
}
else
{
last_checkpoint_lsn = a1;
last_logno = a2;
max_trid_in_control_file = a3;
recovery_failures = a4;
cf_changeable_size = 22;
return 0;
}
}
else
{
return 1;
}
}
| ma_control_file_write_and_force:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x310
MOV AL,CL
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x2c0],RDI
MOV dword ptr [RBP + -0x2c4],ESI
MOV qword ptr [RBP + -0x2d0],RDX
MOV byte ptr [RBP + -0x2d1],AL
MOV RCX,qword ptr [0x00578168]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x2c0]
MOV byte ptr [RBP + -0x309],AL
JNZ 0x0014e8cd
MOV ECX,dword ptr [0x00578170]
XOR EAX,EAX
CMP ECX,dword ptr [RBP + -0x2c4]
MOV byte ptr [RBP + -0x309],AL
JNZ 0x0014e8cd
MOV RCX,qword ptr [0x00578178]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x2d0]
MOV byte ptr [RBP + -0x309],AL
JNZ 0x0014e8cd
MOVZX EAX,byte ptr [RBP + -0x2d1]
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x309],AL
LAB_0014e8cd:
MOV AL,byte ptr [RBP + -0x309]
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x2d9],AL
CMP dword ptr [0x003bd3c0],0x0
JGE 0x0014e8f8
JMP 0x0014e8e9
LAB_0014e8e9:
MOV dword ptr [RBP + -0x2b4],0x1
JMP 0x0014eb58
LAB_0014e8f8:
JMP 0x0014e8fa
LAB_0014e8fa:
JMP 0x0014e8fc
LAB_0014e8fc:
MOV RAX,qword ptr [RBP + -0x2c0]
SAR RAX,0x20
MOV byte ptr [RBP + -0x20c],AL
MOV RAX,qword ptr [RBP + -0x2c0]
SAR RAX,0x20
SHR EAX,0x8
MOV byte ptr [RBP + -0x20b],AL
MOV RAX,qword ptr [RBP + -0x2c0]
SAR RAX,0x20
SHR EAX,0x10
MOV byte ptr [RBP + -0x20a],AL
JMP 0x0014e937
LAB_0014e937:
LEA RAX,[RBP + -0x210]
ADD RAX,0x4
ADD RAX,0x3
MOV qword ptr [RBP + -0x2e8],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x2c0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x2e8]
MOV dword ptr [RAX],ECX
JMP 0x0014e96b
LAB_0014e96b:
JMP 0x0014e96d
LAB_0014e96d:
LEA RAX,[RBP + -0x210]
ADD RAX,0xb
MOV qword ptr [RBP + -0x2f0],RAX
MOV ECX,dword ptr [RBP + -0x2c4]
MOV RAX,qword ptr [RBP + -0x2f0]
MOV dword ptr [RAX],ECX
JMP 0x0014e990
LAB_0014e990:
LEA RAX,[RBP + -0x210]
ADD RAX,0xf
MOV qword ptr [RBP + -0x2f8],RAX
MOV RAX,qword ptr [RBP + -0x2d0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x2f8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x2d0]
SHR RAX,0x20
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x2f8]
MOV word ptr [RAX + 0x4],CX
MOV AL,byte ptr [RBP + -0x2d1]
MOV byte ptr [RBP + -0x1fb],AL
CMP dword ptr [0x00578188],0x16
JBE 0x0014ea5a
MOV EAX,dword ptr [0x00578188]
SUB EAX,0x16
MOV dword ptr [RBP + -0x2fc],EAX
LEA RDI,[RBP + -0x210]
ADD RDI,0x16
MOV EAX,dword ptr [RBP + -0x2fc]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
LEA RDI,[RBP + -0x2b0]
MOV ECX,dword ptr [RBP + -0x2fc]
MOV R8D,dword ptr [0x00578188]
ADD R8D,dword ptr [0x00578184]
MOV ESI,0x96
LEA RDX,[0x251b3d]
MOV AL,0x0
CALL 0x0024d330
LEA RCX,[RBP + -0x2b0]
MOV EDI,0xa8
LEA RSI,[0x251ba3]
MOV EDX,0x800
MOV AL,0x0
CALL 0x001efcc0
JMP 0x0014ea64
LAB_0014ea5a:
MOV dword ptr [0x00578188],0x16
LAB_0014ea64:
JMP 0x0014ea66
LAB_0014ea66:
JMP 0x0014ea68
LAB_0014ea68:
LEA RSI,[RBP + -0x210]
ADD RSI,0x4
MOV EAX,dword ptr [0x00578188]
SUB EAX,0x4
MOV EAX,EAX
MOV EDX,EAX
XOR EDI,EDI
CALL 0x00202200
MOV dword ptr [RBP + -0x2d8],EAX
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x308],RAX
MOV ECX,dword ptr [RBP + -0x2d8]
MOV RAX,qword ptr [RBP + -0x308]
MOV dword ptr [RAX],ECX
MOV EDI,dword ptr [0x003bd3c0]
LEA RSI,[RBP + -0x210]
MOV EAX,dword ptr [0x00578188]
MOV EDX,EAX
MOV EAX,dword ptr [0x00578184]
MOV ECX,EAX
MOV R8D,0x12
CALL 0x001f4890
CMP RAX,0x0
JNZ 0x0014eb02
CMP byte ptr [RBP + -0x2d9],0x0
JNZ 0x0014eb10
MOV EDX,dword ptr [0x003bd3c0]
LEA RDI,[0x2518e4]
MOV ESI,0x22c
MOV ECX,0x10
CALL 0x0014eb90
CMP EAX,0x0
JZ 0x0014eb10
LAB_0014eb02:
JMP 0x0014eb04
LAB_0014eb04:
MOV dword ptr [RBP + -0x2b4],0x1
JMP 0x0014eb58
LAB_0014eb10:
MOV RAX,qword ptr [RBP + -0x2c0]
MOV qword ptr [0x00578168],RAX
MOV EAX,dword ptr [RBP + -0x2c4]
MOV dword ptr [0x00578170],EAX
MOV RAX,qword ptr [RBP + -0x2d0]
MOV qword ptr [0x00578178],RAX
MOV AL,byte ptr [RBP + -0x2d1]
MOV byte ptr [0x00578180],AL
MOV dword ptr [0x00578188],0x16
MOV dword ptr [RBP + -0x2b4],0x0
LAB_0014eb58:
MOV EAX,dword ptr [RBP + -0x2b4]
MOV dword ptr [RBP + -0x310],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0014eb85
MOV EAX,dword ptr [RBP + -0x310]
ADD RSP,0x310
POP RBP
RET
LAB_0014eb85:
CALL 0x0012a270
|
int4 ma_control_file_write_and_force(long param_1,int param_2,long param_3,char param_4)
{
bool bVar1;
uint uVar2;
int iVar3;
long lVar4;
long in_FS_OFFSET;
int4 local_2bc;
int1 local_2b8 [160];
int4 local_218;
int1 local_214;
int1 local_213;
int1 local_212;
int4 local_211;
int local_20d;
int4 local_209;
int2 local_205;
char local_203;
int1 auStack_202 [498];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
bVar1 = false;
if (((last_checkpoint_lsn == param_1) && (bVar1 = false, last_logno == param_2)) &&
(bVar1 = false, max_trid_in_control_file == param_3)) {
bVar1 = param_4 != '\0';
}
if (control_file_fd < 0) {
local_2bc = 1;
goto LAB_0014eb58;
}
local_214 = (int1)((ulong)param_1 >> 0x20);
local_213 = (int1)((ulong)param_1 >> 0x28);
local_212 = (int1)((ulong)param_1 >> 0x30);
local_211 = (int4)param_1;
local_209 = (int4)param_3;
local_205 = (int2)((ulong)param_3 >> 0x20);
local_203 = param_4;
local_20d = param_2;
if (cf_changeable_size < 0x17) {
cf_changeable_size = 0x16;
}
else {
uVar2 = cf_changeable_size - 0x16;
memset(auStack_202,0,(ulong)uVar2);
my_snprintf(local_2b8,0x96,
"Control file must be from a newer version; zero-ing out %u unknown bytes in control file at offset %u"
,uVar2,cf_changeable_size + cf_create_time_size);
my_printf_error(0xa8,"Aria engine: %s",0x800,local_2b8);
}
local_218 = my_checksum(0,&local_214,cf_changeable_size - 4);
lVar4 = my_pwrite(control_file_fd,&local_218,cf_changeable_size,cf_create_time_size,0x12);
if (lVar4 == 0) {
if (!bVar1) {
iVar3 = inline_mysql_file_sync
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c",
0x22c,control_file_fd,0x10);
if (iVar3 != 0) goto LAB_0014eb02;
}
cf_changeable_size = 0x16;
local_2bc = 0;
last_checkpoint_lsn = param_1;
last_logno = param_2;
max_trid_in_control_file = param_3;
recovery_failures = param_4;
}
else {
LAB_0014eb02:
local_2bc = 1;
}
LAB_0014eb58:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_2bc;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
52,575 | spdlog::details::D_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&) | AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h | void format(const details::log_msg &, const std::tm &tm_time, memory_buf_t &dest) override {
const size_t field_size = 10;
ScopedPadder p(field_size, padinfo_, dest);
fmt_helper::pad2(tm_time.tm_mon + 1, dest);
dest.push_back('/');
fmt_helper::pad2(tm_time.tm_mday, dest);
dest.push_back('/');
fmt_helper::pad2(tm_time.tm_year % 100, dest);
} | O3 | c | spdlog::details::D_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movl 0x10(%rdx), %eax
incl %eax
cmpl $0x63, %eax
ja 0x38928
movzbl %al, %ebp
imull $0xcd, %ebp, %r15d
shrl $0xb, %r15d
leal (%r15,%r15), %eax
leal (%rax,%rax,4), %eax
subb %al, %bpl
orb $0x30, %r15b
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x388ec
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb %r15b, (%rcx,%rax)
orb $0x30, %bpl
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x3891a
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb %bpl, (%rcx,%rax)
jmp 0x3894c
movl %eax, %eax
movq %rsp, %r8
movq %rax, (%r8)
leaq 0x49234(%rip), %rsi # 0x81b6b
movl $0x5, %edx
movl $0x1, %ecx
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0x4163d
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x3896a
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb $0x2f, (%rcx,%rax)
movl 0xc(%r14), %r15d
cmpq $0x63, %r15
ja 0x389f7
movzbl %r15b, %eax
imull $0xcd, %eax, %r12d
shrl $0xb, %r12d
leal (%r12,%r12), %eax
leal (%rax,%rax,4), %eax
subb %al, %r15b
orb $0x30, %r12b
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x389bb
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb %r12b, (%rcx,%rax)
orb $0x30, %r15b
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x389e9
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb %r15b, (%rcx,%rax)
jmp 0x38a19
movq %rsp, %r8
movq %r15, (%r8)
leaq 0x49167(%rip), %rsi # 0x81b6b
movl $0x5, %edx
movl $0x1, %ecx
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0x4163d
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x38a37
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb $0x2f, (%rcx,%rax)
movslq 0x14(%r14), %rax
imulq $0x51eb851f, %rax, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x64, %ecx, %ecx
subl %ecx, %eax
cmpl $0x63, %eax
ja 0x38adb
movzbl %al, %ebp
imull $0xcd, %ebp, %r14d
shrl $0xb, %r14d
leal (%r14,%r14), %eax
leal (%rax,%rax,4), %eax
subb %al, %bpl
orb $0x30, %r14b
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x38a9f
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb %r14b, (%rcx,%rax)
orb $0x30, %bpl
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x38acd
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb %bpl, (%rcx,%rax)
jmp 0x38aff
movl %eax, %eax
movq %rsp, %r8
movq %rax, (%r8)
leaq 0x49081(%rip), %rsi # 0x81b6b
movl $0x5, %edx
movl $0x1, %ecx
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0x4163d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZN6spdlog7details11D_formatterINS0_18null_scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rcx
mov r14, rdx
mov eax, [rdx+10h]
inc eax
cmp eax, 63h ; 'c'
ja short loc_38928
movzx ebp, al
imul r15d, ebp, 0CDh
shr r15d, 0Bh
lea eax, [r15+r15]
lea eax, [rax+rax*4]
sub bpl, al
or r15b, 30h
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_388EC
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_388EC:
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov [rcx+rax], r15b
or bpl, 30h
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_3891A
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_3891A:
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov [rcx+rax], bpl
jmp short loc_3894C
loc_38928:
mov eax, eax
mov r8, rsp
mov [r8], rax
lea rsi, a02; "{:02}"
mov edx, 5
mov ecx, 1
mov rdi, rbx; int
xor r9d, r9d
call _ZN3fmt3v106detail10vformat_toIcEEvRNS1_6bufferIT_EENS0_17basic_string_viewIS4_EENS1_12vformat_argsIS4_E4typeENS1_10locale_refE; fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)
loc_3894C:
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_3896A
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_3896A:
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov byte ptr [rcx+rax], 2Fh ; '/'
mov r15d, [r14+0Ch]
cmp r15, 63h ; 'c'
ja short loc_389F7
movzx eax, r15b
imul r12d, eax, 0CDh
shr r12d, 0Bh
lea eax, [r12+r12]
lea eax, [rax+rax*4]
sub r15b, al
or r12b, 30h
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_389BB
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_389BB:
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov [rcx+rax], r12b
or r15b, 30h
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_389E9
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_389E9:
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov [rcx+rax], r15b
jmp short loc_38A19
loc_389F7:
mov r8, rsp
mov [r8], r15
lea rsi, a02; "{:02}"
mov edx, 5
mov ecx, 1
mov rdi, rbx; int
xor r9d, r9d
call _ZN3fmt3v106detail10vformat_toIcEEvRNS1_6bufferIT_EENS0_17basic_string_viewIS4_EENS1_12vformat_argsIS4_E4typeENS1_10locale_refE; fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)
loc_38A19:
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_38A37
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_38A37:
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov byte ptr [rcx+rax], 2Fh ; '/'
movsxd rax, dword ptr [r14+14h]
imul rcx, rax, 51EB851Fh
mov rdx, rcx
shr rdx, 3Fh
sar rcx, 25h
add ecx, edx
imul ecx, 64h ; 'd'
sub eax, ecx
cmp eax, 63h ; 'c'
ja short loc_38ADB
movzx ebp, al
imul r14d, ebp, 0CDh
shr r14d, 0Bh
lea eax, [r14+r14]
lea eax, [rax+rax*4]
sub bpl, al
or r14b, 30h
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_38A9F
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_38A9F:
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov [rcx+rax], r14b
or bpl, 30h
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_38ACD
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_38ACD:
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov [rcx+rax], bpl
jmp short loc_38AFF
loc_38ADB:
mov eax, eax
mov r8, rsp
mov [r8], rax
lea rsi, a02; "{:02}"
mov edx, 5
mov ecx, 1
mov rdi, rbx; int
xor r9d, r9d
call _ZN3fmt3v106detail10vformat_toIcEEvRNS1_6bufferIT_EENS0_17basic_string_viewIS4_EENS1_12vformat_argsIS4_E4typeENS1_10locale_refE; fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)
loc_38AFF:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long spdlog::details::D_formatter<spdlog::details::null_scoped_padder>::format(
long long a1,
long long a2,
unsigned int *a3,
long long a4)
{
unsigned int v6; // eax
char v7; // bp
char v8; // r15
long long v9; // rax
long long v10; // rsi
long long v11; // rcx
char v12; // bp
long long v13; // rax
long long v14; // rsi
long long v15; // rcx
long long v16; // rax
long long v17; // rsi
long long v18; // rcx
unsigned long long v19; // r15
char v20; // r12
char v21; // r15
char v22; // r12
long long v23; // rax
long long v24; // rsi
long long v25; // rcx
char v26; // r15
long long v27; // rax
long long v28; // rsi
long long v29; // rcx
long long v30; // rax
long long v31; // rsi
long long v32; // rcx
unsigned int v33; // eax
char v34; // bp
char v35; // r14
long long v36; // rax
long long v37; // rsi
long long v38; // rcx
char v39; // bp
long long result; // rax
long long v41; // rsi
long long v42; // rcx
v6 = a3[4] + 1;
if ( v6 > 0x63 )
{
fmt::v10::detail::vformat_to<char>(a4);
}
else
{
v7 = (unsigned __int8)v6 % 0xAu;
v8 = ((unsigned __int8)v6 / 0xAu) | 0x30;
v9 = *(_QWORD *)(a4 + 16);
v10 = v9 + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v9 + 1) )
{
(**(void ( ***)(long long))a4)(a4);
v9 = *(_QWORD *)(a4 + 16);
v10 = v9 + 1;
}
v11 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v10;
*(_BYTE *)(v11 + v9) = v8;
v12 = v7 | 0x30;
v13 = *(_QWORD *)(a4 + 16);
v14 = v13 + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v13 + 1) )
{
(**(void ( ***)(long long))a4)(a4);
v13 = *(_QWORD *)(a4 + 16);
v14 = v13 + 1;
}
v15 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v14;
*(_BYTE *)(v15 + v13) = v12;
}
v16 = *(_QWORD *)(a4 + 16);
v17 = v16 + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v16 + 1) )
{
(**(void ( ***)(long long))a4)(a4);
v16 = *(_QWORD *)(a4 + 16);
v17 = v16 + 1;
}
v18 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v17;
*(_BYTE *)(v18 + v16) = 47;
v19 = a3[3];
if ( v19 > 0x63 )
{
fmt::v10::detail::vformat_to<char>(a4);
}
else
{
v20 = (unsigned __int8)v19 / 0xAu;
v21 = (unsigned __int8)v19 % 0xAu;
v22 = v20 | 0x30;
v23 = *(_QWORD *)(a4 + 16);
v24 = v23 + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v23 + 1) )
{
(**(void ( ***)(long long))a4)(a4);
v23 = *(_QWORD *)(a4 + 16);
v24 = v23 + 1;
}
v25 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v24;
*(_BYTE *)(v25 + v23) = v22;
v26 = v21 | 0x30;
v27 = *(_QWORD *)(a4 + 16);
v28 = v27 + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v27 + 1) )
{
(**(void ( ***)(long long))a4)(a4);
v27 = *(_QWORD *)(a4 + 16);
v28 = v27 + 1;
}
v29 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v28;
*(_BYTE *)(v29 + v27) = v26;
}
v30 = *(_QWORD *)(a4 + 16);
v31 = v30 + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v30 + 1) )
{
(**(void ( ***)(long long))a4)(a4);
v30 = *(_QWORD *)(a4 + 16);
v31 = v30 + 1;
}
v32 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v31;
*(_BYTE *)(v32 + v30) = 47;
v33 = (int)a3[5] % 100;
if ( v33 > 0x63 )
return fmt::v10::detail::vformat_to<char>(a4);
v34 = (unsigned __int8)v33 % 0xAu;
v35 = ((unsigned __int8)v33 / 0xAu) | 0x30;
v36 = *(_QWORD *)(a4 + 16);
v37 = v36 + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v36 + 1) )
{
(**(void ( ***)(long long))a4)(a4);
v36 = *(_QWORD *)(a4 + 16);
v37 = v36 + 1;
}
v38 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v37;
*(_BYTE *)(v38 + v36) = v35;
v39 = v34 | 0x30;
result = *(_QWORD *)(a4 + 16);
v41 = result + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(result + 1) )
{
(**(void ( ***)(long long))a4)(a4);
result = *(_QWORD *)(a4 + 16);
v41 = result + 1;
}
v42 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v41;
*(_BYTE *)(v42 + result) = v39;
return result;
}
| format:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RCX
MOV R14,RDX
MOV EAX,dword ptr [RDX + 0x10]
INC EAX
CMP EAX,0x63
JA 0x00138928
MOVZX EBP,AL
IMUL R15D,EBP,0xcd
SHR R15D,0xb
LEA EAX,[R15 + R15*0x1]
LEA EAX,[RAX + RAX*0x4]
SUB BPL,AL
OR R15B,0x30
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x001388ec
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_001388ec:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],R15B
OR BPL,0x30
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x0013891a
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_0013891a:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],BPL
JMP 0x0013894c
LAB_00138928:
MOV EAX,EAX
MOV R8,RSP
MOV qword ptr [R8],RAX
LEA RSI,[0x181b6b]
MOV EDX,0x5
MOV ECX,0x1
MOV RDI,RBX
XOR R9D,R9D
CALL 0x0014163d
LAB_0013894c:
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x0013896a
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_0013896a:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],0x2f
MOV R15D,dword ptr [R14 + 0xc]
CMP R15,0x63
JA 0x001389f7
MOVZX EAX,R15B
IMUL R12D,EAX,0xcd
SHR R12D,0xb
LEA EAX,[R12 + R12*0x1]
LEA EAX,[RAX + RAX*0x4]
SUB R15B,AL
OR R12B,0x30
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x001389bb
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_001389bb:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],R12B
OR R15B,0x30
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x001389e9
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_001389e9:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],R15B
JMP 0x00138a19
LAB_001389f7:
MOV R8,RSP
MOV qword ptr [R8],R15
LEA RSI,[0x181b6b]
MOV EDX,0x5
MOV ECX,0x1
MOV RDI,RBX
XOR R9D,R9D
CALL 0x0014163d
LAB_00138a19:
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x00138a37
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_00138a37:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],0x2f
MOVSXD RAX,dword ptr [R14 + 0x14]
IMUL RCX,RAX,0x51eb851f
MOV RDX,RCX
SHR RDX,0x3f
SAR RCX,0x25
ADD ECX,EDX
IMUL ECX,ECX,0x64
SUB EAX,ECX
CMP EAX,0x63
JA 0x00138adb
MOVZX EBP,AL
IMUL R14D,EBP,0xcd
SHR R14D,0xb
LEA EAX,[R14 + R14*0x1]
LEA EAX,[RAX + RAX*0x4]
SUB BPL,AL
OR R14B,0x30
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x00138a9f
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_00138a9f:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],R14B
OR BPL,0x30
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x00138acd
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_00138acd:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],BPL
JMP 0x00138aff
LAB_00138adb:
MOV EAX,EAX
MOV R8,RSP
MOV qword ptr [R8],RAX
LEA RSI,[0x181b6b]
MOV EDX,0x5
MOV ECX,0x1
MOV RDI,RBX
XOR R9D,R9D
CALL 0x0014163d
LAB_00138aff:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* spdlog::details::D_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg
const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */
void __thiscall
spdlog::details::D_formatter<spdlog::details::null_scoped_padder>::format
(D_formatter<spdlog::details::null_scoped_padder> *this,log_msg *param_1,tm *param_2,
basic_memory_buffer *param_3)
{
byte bVar1;
uint uVar2;
long lVar3;
ulong uVar4;
ulong local_38 [2];
uVar2 = param_2->tm_mon + 1;
if (uVar2 < 100) {
bVar1 = (byte)((uVar2 & 0xff) / 10);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
*(ulong *)(param_3 + 0x10) = uVar4;
*(byte *)(*(long *)(param_3 + 8) + lVar3) = bVar1 | 0x30;
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
*(ulong *)(param_3 + 0x10) = uVar4;
*(byte *)(*(long *)(param_3 + 8) + lVar3) = (char)uVar2 + bVar1 * -10 | 0x30;
}
else {
local_38[0] = (ulong)uVar2;
fmt::v10::detail::vformat_to<char>(param_3,"{:02}",5,1,local_38,0);
}
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
*(ulong *)(param_3 + 0x10) = uVar4;
*(int1 *)(*(long *)(param_3 + 8) + lVar3) = 0x2f;
uVar2 = param_2->tm_mday;
if ((ulong)uVar2 < 100) {
bVar1 = (byte)((uVar2 & 0xff) / 10);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
*(ulong *)(param_3 + 0x10) = uVar4;
*(byte *)(*(long *)(param_3 + 8) + lVar3) = bVar1 | 0x30;
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
*(ulong *)(param_3 + 0x10) = uVar4;
*(byte *)(*(long *)(param_3 + 8) + lVar3) = (char)uVar2 + bVar1 * -10 | 0x30;
}
else {
local_38[0] = (ulong)uVar2;
fmt::v10::detail::vformat_to<char>(param_3,"{:02}",5,1,local_38,0);
}
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
*(ulong *)(param_3 + 0x10) = uVar4;
*(int1 *)(*(long *)(param_3 + 8) + lVar3) = 0x2f;
uVar2 = param_2->tm_year % 100;
if (uVar2 < 100) {
bVar1 = (byte)((uVar2 & 0xff) / 10);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
*(ulong *)(param_3 + 0x10) = uVar4;
*(byte *)(*(long *)(param_3 + 8) + lVar3) = bVar1 | 0x30;
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
*(ulong *)(param_3 + 0x10) = uVar4;
*(byte *)(*(long *)(param_3 + 8) + lVar3) = (char)uVar2 + bVar1 * -10 | 0x30;
}
else {
local_38[0] = (ulong)uVar2;
fmt::v10::detail::vformat_to<char>(param_3,"{:02}",5,1,local_38,0);
}
return;
}
| |
52,576 | test_frm_bug | eloqsql/libmariadb/unittest/libmariadb/misc.c | static int test_frm_bug(MYSQL *mysql)
{
MYSQL_STMT *stmt;
MYSQL_BIND my_bind[2];
MYSQL_RES *result;
MYSQL_ROW row;
FILE *test_file;
char data_dir[FN_REFLEN];
char test_frm[1024];
int rc;
SKIP_MYSQL(mysql);
mysql_autocommit(mysql, TRUE);
rc= mysql_query(mysql, "drop table if exists test_frm_bug");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "flush tables");
check_mysql_rc(rc, mysql);
stmt= mysql_stmt_init(mysql);
FAIL_IF(!stmt, mysql_error(mysql));
rc= mysql_stmt_prepare(stmt, SL("show variables like 'datadir'"));
check_stmt_rc(rc, stmt);
rc= mysql_stmt_execute(stmt);
check_stmt_rc(rc, stmt);
memset(my_bind, '\0', sizeof(my_bind));
my_bind[0].buffer_type= MYSQL_TYPE_STRING;
my_bind[0].buffer= data_dir;
my_bind[0].buffer_length= FN_REFLEN;
my_bind[1]= my_bind[0];
rc= mysql_stmt_bind_result(stmt, my_bind);
check_stmt_rc(rc, stmt);
rc= mysql_stmt_fetch(stmt);
check_stmt_rc(rc, stmt);
rc= mysql_stmt_fetch(stmt);
FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA");
snprintf(test_frm, sizeof(test_frm)-1, "%s/%s/test_frm_bug.frm", data_dir, schema);
if (!(test_file= fopen(test_frm, "w")))
{
mysql_stmt_close(stmt);
diag("Can't write to file %s -> SKIP", test_frm);
return SKIP;
}
rc= mysql_query(mysql, "SHOW TABLE STATUS like 'test_frm_bug'");
check_mysql_rc(rc, mysql);
result= mysql_store_result(mysql);
FAIL_IF(!result, "Invalid result set");/* It can't be NULL */
rc= 0;
while (mysql_fetch_row(result))
rc++;
FAIL_UNLESS(rc == 1, "rowcount != 1");
mysql_data_seek(result, 0);
row= mysql_fetch_row(result);
FAIL_IF(!row, "couldn't fetch row");
FAIL_UNLESS(row[17] != 0, "row[17] != 0");
mysql_free_result(result);
mysql_stmt_close(stmt);
fclose(test_file);
mysql_query(mysql, "drop table if exists test_frm_bug");
unlink(test_frm);
return OK;
} | O3 | c | test_frm_bug:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6f8, %rsp # imm = 0x6F8
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
callq 0x1a1a3
testb %al, %al
je 0x1788c
movl $0x1, %ebx
movq %r14, %rdi
movl $0x1, %esi
callq 0x20e19
leaq 0x22d45(%rip), %rsi # 0x3a591
movq %r14, %rdi
callq 0x1ee15
testl %eax, %eax
je 0x1789e
movl %eax, %r15d
movq %r14, %rdi
callq 0x20e8e
movq %rax, %r12
movq %r14, %rdi
callq 0x20e79
leaq 0x219f0(%rip), %rdi # 0x39265
leaq 0x220f2(%rip), %r8 # 0x3996e
movl %r15d, %esi
movq %r12, %rdx
movl %eax, %ecx
movl $0xfa, %r9d
jmp 0x178e3
leaq 0x22168(%rip), %rdi # 0x399fb
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1970b
jmp 0x178ea
leaq 0x22d0e(%rip), %rsi # 0x3a5b3
movq %r14, %rdi
callq 0x1ee15
testl %eax, %eax
je 0x17911
movl %eax, %r15d
movq %r14, %rdi
callq 0x20e8e
movq %rax, %r12
movq %r14, %rdi
callq 0x20e79
leaq 0x21997(%rip), %rdi # 0x39265
leaq 0x22099(%rip), %r8 # 0x3996e
movl %r15d, %esi
movq %r12, %rdx
movl %eax, %ecx
movl $0xfd, %r9d
xorl %eax, %eax
callq 0x1970b
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x17c63
movl %ebx, %eax
addq $0x6f8, %rsp # imm = 0x6F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x254d4
testq %rax, %rax
je 0x1795c
movq %rax, %r15
leaq 0x22c98(%rip), %rsi # 0x3a5c0
movl $0x1d, %edx
movq %rax, %rdi
callq 0x25898
testl %eax, %eax
je 0x1797f
movq %r15, %rdi
callq 0x24f74
leaq 0x217d8(%rip), %rdi # 0x39120
leaq 0x2201f(%rip), %rdx # 0x3996e
movq %rax, %rsi
movl $0x102, %ecx # imm = 0x102
jmp 0x17b25
movq %r14, %rdi
callq 0x20e8e
leaq 0x217b5(%rip), %rdi # 0x39120
leaq 0x21ffc(%rip), %rdx # 0x3996e
movq %rax, %rsi
movl $0x100, %ecx # imm = 0x100
jmp 0x17b25
movq %r15, %rdi
callq 0x26469
testl %eax, %eax
je 0x179ae
movq %r15, %rdi
callq 0x24f74
leaq 0x21786(%rip), %rdi # 0x39120
leaq 0x21fcd(%rip), %rdx # 0x3996e
movq %rax, %rsi
movl $0x105, %ecx # imm = 0x105
jmp 0x17b25
leaq -0x710(%rbp), %r12
movl $0xe0, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x13270
movl $0xfe, 0x60(%r12)
leaq -0x230(%rbp), %rax
movq %rax, 0x10(%r12)
movq $0x200, 0x40(%r12) # imm = 0x200
leaq -0x6a0(%rbp), %rdi
movl $0xe, %ecx
movq %r12, %rsi
rep movsq (%rsi), %es:(%rdi)
movq %r15, %rdi
movq %r12, %rsi
callq 0x24c3c
testb %al, %al
je 0x17a26
movq %r15, %rdi
callq 0x24f74
leaq 0x2170e(%rip), %rdi # 0x39120
leaq 0x21f55(%rip), %rdx # 0x3996e
movq %rax, %rsi
movl $0x10e, %ecx # imm = 0x10E
jmp 0x17b25
movq %r15, %rdi
callq 0x24f8f
testl %eax, %eax
je 0x17a55
movq %r15, %rdi
callq 0x24f74
leaq 0x216df(%rip), %rdi # 0x39120
leaq 0x21f26(%rip), %rdx # 0x3996e
movq %rax, %rsi
movl $0x111, %ecx # imm = 0x111
jmp 0x17b25
movq %r15, %rdi
callq 0x24f8f
cmpl $0x64, %eax
jne 0x17b0b
movq 0x389db(%rip), %rax # 0x50448
movq %rax, (%rsp)
leaq 0x22b7a(%rip), %r8 # 0x3a5f2
leaq -0x630(%rbp), %rbx
leaq -0x230(%rbp), %r9
movl $0x3ff, %esi # imm = 0x3FF
movl $0x400, %ecx # imm = 0x400
movq %rbx, %rdi
movl $0x1, %edx
xorl %eax, %eax
callq 0x132d0
leaq 0x25cc4(%rip), %rsi # 0x3d76a
movq %rbx, %rdi
callq 0x13530
testq %rax, %rax
je 0x17b31
movq %rax, %rbx
leaq 0x22b6b(%rip), %rsi # 0x3a628
movq %r14, %rdi
callq 0x1ee15
testl %eax, %eax
je 0x17b58
movl %eax, %r12d
movq %r14, %rdi
callq 0x20e8e
movq %rax, %rbx
movq %r14, %rdi
callq 0x20e79
leaq 0x2177b(%rip), %rdi # 0x39265
leaq 0x21e7d(%rip), %r8 # 0x3996e
movl %r12d, %esi
movq %rbx, %rdx
movl %eax, %ecx
movl $0x120, %r9d # imm = 0x120
xorl %eax, %eax
callq 0x1970b
jmp 0x17bc0
leaq 0x2160e(%rip), %rdi # 0x39120
leaq 0x22ac5(%rip), %rsi # 0x3a5de
leaq 0x21e4e(%rip), %rdx # 0x3996e
movl $0x114, %ecx # imm = 0x114
xorl %eax, %eax
callq 0x1970b
jmp 0x178ea
movq %r15, %rdi
callq 0x24ee5
leaq 0x22ac9(%rip), %rdi # 0x3a609
leaq -0x630(%rbp), %rsi
xorl %eax, %eax
callq 0x1970b
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
jmp 0x178ea
movq %r14, %rdi
callq 0x1fd0d
testq %rax, %rax
je 0x17b9f
movq %rax, %r12
movl $0x2, %r13d
movq %r12, %rdi
callq 0x1ff10
decl %r13d
testq %rax, %rax
jne 0x17b6e
testl %r13d, %r13d
je 0x17bca
leaq 0x21596(%rip), %rdi # 0x39120
leaq 0x22abd(%rip), %rsi # 0x3a64e
leaq 0x21dd6(%rip), %rdx # 0x3996e
movl $0x128, %ecx # imm = 0x128
jmp 0x17bb9
leaq 0x2157a(%rip), %rdi # 0x39120
leaq 0x216da(%rip), %rsi # 0x39287
leaq 0x21dba(%rip), %rdx # 0x3996e
movl $0x123, %ecx # imm = 0x123
xorl %eax, %eax
callq 0x1970b
movl $0x1, %ebx
jmp 0x178ea
movq %r12, %rdi
xorl %esi, %esi
callq 0x2002a
movq %r12, %rdi
callq 0x1ff10
testq %rax, %rax
je 0x17c25
cmpq $0x0, 0x88(%rax)
je 0x17c44
movq %r12, %rdi
callq 0x1aac2
movq %r15, %rdi
callq 0x24ee5
movq %rbx, %rdi
callq 0x13470
leaq 0x22987(%rip), %rsi # 0x3a591
movq %r14, %rdi
callq 0x1ee15
leaq -0x630(%rbp), %rdi
callq 0x131d0
xorl %ebx, %ebx
jmp 0x178ea
leaq 0x214f4(%rip), %rdi # 0x39120
leaq 0x22a29(%rip), %rsi # 0x3a65c
leaq 0x21d34(%rip), %rdx # 0x3996e
movl $0x12d, %ecx # imm = 0x12D
jmp 0x17bb9
leaq 0x214d5(%rip), %rdi # 0x39120
leaq 0x22a1d(%rip), %rsi # 0x3a66f
leaq 0x21d15(%rip), %rdx # 0x3996e
movl $0x12f, %ecx # imm = 0x12F
jmp 0x17bb9
callq 0x13510
| test_frm_bug:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 6F8h
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
call mariadb_connection
test al, al
jz short loc_1788C
mov ebx, 1
mov rdi, r14
mov esi, 1
call mysql_autocommit
lea rsi, aDropTableIfExi_5; "drop table if exists test_frm_bug"
mov rdi, r14
call mysql_query
test eax, eax
jz short loc_1789E
mov r15d, eax
mov rdi, r14
call mysql_error
mov r12, rax
mov rdi, r14
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r15d
mov rdx, r12
mov ecx, eax
mov r9d, 0FAh
jmp short loc_178E3
loc_1788C:
lea rdi, aSkipTestForNon; "Skip test for non MariaDB server"
xor ebx, ebx
xor eax, eax
call diag
jmp short loc_178EA
loc_1789E:
lea rsi, aFlushTables; "flush tables"
mov rdi, r14
call mysql_query
test eax, eax
jz short loc_17911
mov r15d, eax
mov rdi, r14
call mysql_error
mov r12, rax
mov rdi, r14
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r15d
mov rdx, r12
mov ecx, eax
mov r9d, 0FDh
loc_178E3:
xor eax, eax
call diag
loc_178EA:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_17C63
mov eax, ebx
add rsp, 6F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_17911:
mov rdi, r14
call mysql_stmt_init
test rax, rax
jz short loc_1795C
mov r15, rax
lea rsi, aShowVariablesL_0; "show variables like 'datadir'"
mov edx, 1Dh
mov rdi, rax
call mysql_stmt_prepare
test eax, eax
jz short loc_1797F
mov rdi, r15
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 102h
jmp loc_17B25
loc_1795C:
mov rdi, r14
call mysql_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 100h
jmp loc_17B25
loc_1797F:
mov rdi, r15
call mysql_stmt_execute
test eax, eax
jz short loc_179AE
mov rdi, r15
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 105h
jmp loc_17B25
loc_179AE:
lea r12, [rbp+var_710]
mov edx, 0E0h
mov rdi, r12
xor esi, esi
call _memset
mov dword ptr [r12+60h], 0FEh
lea rax, [rbp+var_230]
mov [r12+10h], rax
mov qword ptr [r12+40h], 200h
lea rdi, [rbp+var_6A0]
mov ecx, 0Eh
mov rsi, r12
rep movsq
mov rdi, r15
mov rsi, r12
call mysql_stmt_bind_result
test al, al
jz short loc_17A26
mov rdi, r15
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 10Eh
jmp loc_17B25
loc_17A26:
mov rdi, r15
call mysql_stmt_fetch
test eax, eax
jz short loc_17A55
mov rdi, r15
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 111h
jmp loc_17B25
loc_17A55:
mov rdi, r15
call mysql_stmt_fetch
cmp eax, 64h ; 'd'
jnz loc_17B0B
mov rax, cs:schema
mov [rsp+720h+var_720], rax
lea r8, aSSTestFrmBugFr; "%s/%s/test_frm_bug.frm"
lea rbx, [rbp+var_630]
lea r9, [rbp+var_230]
mov esi, 3FFh
mov ecx, 400h
mov rdi, rbx
mov edx, 1
xor eax, eax
call ___snprintf_chk
lea rsi, aHebrew_1+5; "w"
mov rdi, rbx
call _fopen64
test rax, rax
jz short loc_17B31
mov rbx, rax
lea rsi, aShowTableStatu; "SHOW TABLE STATUS like 'test_frm_bug'"
mov rdi, r14
call mysql_query
test eax, eax
jz loc_17B58
mov r12d, eax
mov rdi, r14
call mysql_error
mov rbx, rax
mov rdi, r14
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r12d
mov rdx, rbx
mov ecx, eax
mov r9d, 120h
xor eax, eax
call diag
jmp loc_17BC0
loc_17B0B:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aRcMysqlNoData; "rc != MYSQL_NO_DATA"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 114h
loc_17B25:
xor eax, eax
call diag
jmp loc_178EA
loc_17B31:
mov rdi, r15
call mysql_stmt_close
lea rdi, aCanTWriteToFil; "Can't write to file %s -> SKIP"
lea rsi, [rbp+var_630]
xor eax, eax
call diag
mov ebx, 0FFFFFFFFh
jmp loc_178EA
loc_17B58:
mov rdi, r14
call mysql_store_result
test rax, rax
jz short loc_17B9F
mov r12, rax
mov r13d, 2
loc_17B6E:
mov rdi, r12
call mysql_fetch_row
dec r13d
test rax, rax
jnz short loc_17B6E
test r13d, r13d
jz short loc_17BCA
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aRowcount1; "rowcount != 1"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 128h
jmp short loc_17BB9
loc_17B9F:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aInvalidResultS; "Invalid result set"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 123h
loc_17BB9:
xor eax, eax
call diag
loc_17BC0:
mov ebx, 1
jmp loc_178EA
loc_17BCA:
mov rdi, r12
xor esi, esi
call mysql_data_seek
mov rdi, r12
call mysql_fetch_row
test rax, rax
jz short loc_17C25
cmp qword ptr [rax+88h], 0
jz short loc_17C44
mov rdi, r12
call mysql_free_result
mov rdi, r15
call mysql_stmt_close
mov rdi, rbx
call _fclose
lea rsi, aDropTableIfExi_5; "drop table if exists test_frm_bug"
mov rdi, r14
call mysql_query
lea rdi, [rbp+var_630]
call _unlink
xor ebx, ebx
jmp loc_178EA
loc_17C25:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aCouldnTFetchRo; "couldn't fetch row"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 12Dh
jmp loc_17BB9
loc_17C44:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aRow170; "row[17] != 0"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 12Fh
jmp loc_17BB9
loc_17C63:
call ___stack_chk_fail
| long long test_frm_bug(long long a1, int a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
unsigned int v6; // ebx
int v7; // eax
int v8; // r15d
int v9; // r12d
int v10; // eax
int v11; // esi
int v12; // edx
int v13; // ecx
int v14; // r9d
int v15; // eax
int v16; // r15d
int v17; // r12d
int v18; // eax
long long v20; // rax
long long v21; // r15
const char *v22; // rsi
int v23; // r8d
int v24; // r9d
int v25; // ecx
long long v26; // rdx
long long v27; // r8
long long v28; // r9
long long v29; // rax
long long v30; // rbx
int v31; // eax
int v32; // r12d
int v33; // ebx
int v34; // eax
int v35; // edx
int v36; // ecx
int v37; // r8d
int v38; // r9d
long long v39; // rax
int v40; // r8d
int v41; // r9d
long long v42; // r12
int v43; // r13d
const char *v44; // rsi
int v45; // ecx
long long row; // rax
_QWORD v47[14]; // [rsp+10h] [rbp-710h] BYREF
_BYTE v48[112]; // [rsp+80h] [rbp-6A0h] BYREF
_BYTE v49[1024]; // [rsp+F0h] [rbp-630h] BYREF
char v50[512]; // [rsp+4F0h] [rbp-230h] BYREF
unsigned long long v51; // [rsp+6F0h] [rbp-30h]
v51 = __readfsqword(0x28u);
if ( (unsigned __int8)mariadb_connection(a1) )
{
v6 = 1;
mysql_autocommit(a1, 1LL);
v7 = mysql_query(a1, "drop table if exists test_frm_bug");
if ( v7 )
{
v8 = v7;
v9 = mysql_error(a1);
v10 = mysql_errno(a1);
v11 = v8;
v12 = v9;
v13 = v10;
v14 = 250;
LABEL_7:
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v11,
v12,
v13,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c",
v14);
return v6;
}
v15 = mysql_query(a1, "flush tables");
if ( v15 )
{
v16 = v15;
v17 = mysql_error(a1);
v18 = mysql_errno(a1);
v11 = v16;
v12 = v17;
v13 = v18;
v14 = 253;
goto LABEL_7;
}
v20 = mysql_stmt_init(a1);
if ( !v20 )
{
LODWORD(v22) = mysql_error(a1);
v25 = 256;
goto LABEL_24;
}
v21 = v20;
if ( (unsigned int)mysql_stmt_prepare(v20, "show variables like 'datadir'", 29LL) )
{
LODWORD(v22) = mysql_stmt_error(v21);
v25 = 258;
LABEL_24:
diag(
(unsigned int)"Error: %s (%s: %d)",
(_DWORD)v22,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c",
v25,
v23,
v24);
return v6;
}
if ( (unsigned int)mysql_stmt_execute(v21) )
{
LODWORD(v22) = mysql_stmt_error(v21);
v25 = 261;
goto LABEL_24;
}
memset(v47, 0LL, 224LL);
LODWORD(v47[12]) = 254;
v47[2] = v50;
v47[8] = 512LL;
qmemcpy(v48, v47, sizeof(v48));
if ( (unsigned __int8)mysql_stmt_bind_result(v21, v47, v26, 0LL, v27, v28) )
{
LODWORD(v22) = mysql_stmt_error(v21);
v25 = 270;
goto LABEL_24;
}
if ( (unsigned int)mysql_stmt_fetch(v21) )
{
LODWORD(v22) = mysql_stmt_error(v21);
v25 = 273;
goto LABEL_24;
}
if ( (unsigned int)mysql_stmt_fetch(v21) != 100 )
{
v22 = "rc != MYSQL_NO_DATA";
v25 = 276;
goto LABEL_24;
}
__snprintf_chk(v49, 1023LL, 1LL, 1024LL, "%s/%s/test_frm_bug.frm", v50, (const char *)schema);
v29 = fopen64(v49, "w");
if ( v29 )
{
v30 = v29;
v31 = mysql_query(a1, "SHOW TABLE STATUS like 'test_frm_bug'");
if ( v31 )
{
v32 = v31;
v33 = mysql_error(a1);
v34 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v32,
v33,
v34,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c",
288);
}
else
{
v39 = mysql_store_result(a1);
if ( v39 )
{
v42 = v39;
v43 = 2;
do
--v43;
while ( mysql_fetch_row(v42) );
if ( v43 )
{
v44 = "rowcount != 1";
v45 = 296;
}
else
{
mysql_data_seek(v42, 0LL);
row = mysql_fetch_row(v42);
if ( row )
{
if ( *(_QWORD *)(row + 136) )
{
mysql_free_result(v42);
mysql_stmt_close(v21);
fclose(v30);
mysql_query(a1, "drop table if exists test_frm_bug");
unlink(v49);
return 0;
}
v44 = "row[17] != 0";
v45 = 303;
}
else
{
v44 = "couldn't fetch row";
v45 = 301;
}
}
}
else
{
v44 = "Invalid result set";
v45 = 291;
}
diag(
(unsigned int)"Error: %s (%s: %d)",
(_DWORD)v44,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c",
v45,
v40,
v41);
}
return 1;
}
else
{
mysql_stmt_close(v21);
diag((unsigned int)"Can't write to file %s -> SKIP", (unsigned int)v49, v35, v36, v37, v38);
return (unsigned int)-1;
}
}
else
{
v6 = 0;
diag((unsigned int)"Skip test for non MariaDB server", a2, v2, v3, v4, v5);
}
return v6;
}
| test_frm_bug:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x6f8
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x0011a1a3
TEST AL,AL
JZ 0x0011788c
MOV EBX,0x1
MOV RDI,R14
MOV ESI,0x1
CALL 0x00120e19
LEA RSI,[0x13a591]
MOV RDI,R14
CALL 0x0011ee15
TEST EAX,EAX
JZ 0x0011789e
MOV R15D,EAX
MOV RDI,R14
CALL 0x00120e8e
MOV R12,RAX
MOV RDI,R14
CALL 0x00120e79
LEA RDI,[0x139265]
LEA R8,[0x13996e]
MOV ESI,R15D
MOV RDX,R12
MOV ECX,EAX
MOV R9D,0xfa
JMP 0x001178e3
LAB_0011788c:
LEA RDI,[0x1399fb]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x0011970b
JMP 0x001178ea
LAB_0011789e:
LEA RSI,[0x13a5b3]
MOV RDI,R14
CALL 0x0011ee15
TEST EAX,EAX
JZ 0x00117911
MOV R15D,EAX
MOV RDI,R14
CALL 0x00120e8e
MOV R12,RAX
MOV RDI,R14
CALL 0x00120e79
LEA RDI,[0x139265]
LEA R8,[0x13996e]
MOV ESI,R15D
MOV RDX,R12
MOV ECX,EAX
MOV R9D,0xfd
LAB_001178e3:
XOR EAX,EAX
CALL 0x0011970b
LAB_001178ea:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00117c63
MOV EAX,EBX
ADD RSP,0x6f8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00117911:
MOV RDI,R14
CALL 0x001254d4
TEST RAX,RAX
JZ 0x0011795c
MOV R15,RAX
LEA RSI,[0x13a5c0]
MOV EDX,0x1d
MOV RDI,RAX
CALL 0x00125898
TEST EAX,EAX
JZ 0x0011797f
MOV RDI,R15
CALL 0x00124f74
LEA RDI,[0x139120]
LEA RDX,[0x13996e]
MOV RSI,RAX
MOV ECX,0x102
JMP 0x00117b25
LAB_0011795c:
MOV RDI,R14
CALL 0x00120e8e
LEA RDI,[0x139120]
LEA RDX,[0x13996e]
MOV RSI,RAX
MOV ECX,0x100
JMP 0x00117b25
LAB_0011797f:
MOV RDI,R15
CALL 0x00126469
TEST EAX,EAX
JZ 0x001179ae
MOV RDI,R15
CALL 0x00124f74
LEA RDI,[0x139120]
LEA RDX,[0x13996e]
MOV RSI,RAX
MOV ECX,0x105
JMP 0x00117b25
LAB_001179ae:
LEA R12,[RBP + -0x710]
MOV EDX,0xe0
MOV RDI,R12
XOR ESI,ESI
CALL 0x00113270
MOV dword ptr [R12 + 0x60],0xfe
LEA RAX,[RBP + -0x230]
MOV qword ptr [R12 + 0x10],RAX
MOV qword ptr [R12 + 0x40],0x200
LEA RDI,[RBP + -0x6a0]
MOV ECX,0xe
MOV RSI,R12
MOVSQ.REP RDI,RSI
MOV RDI,R15
MOV RSI,R12
CALL 0x00124c3c
TEST AL,AL
JZ 0x00117a26
MOV RDI,R15
CALL 0x00124f74
LEA RDI,[0x139120]
LEA RDX,[0x13996e]
MOV RSI,RAX
MOV ECX,0x10e
JMP 0x00117b25
LAB_00117a26:
MOV RDI,R15
CALL 0x00124f8f
TEST EAX,EAX
JZ 0x00117a55
MOV RDI,R15
CALL 0x00124f74
LEA RDI,[0x139120]
LEA RDX,[0x13996e]
MOV RSI,RAX
MOV ECX,0x111
JMP 0x00117b25
LAB_00117a55:
MOV RDI,R15
CALL 0x00124f8f
CMP EAX,0x64
JNZ 0x00117b0b
MOV RAX,qword ptr [0x00150448]
MOV qword ptr [RSP],RAX
LEA R8,[0x13a5f2]
LEA RBX,[RBP + -0x630]
LEA R9,[RBP + -0x230]
MOV ESI,0x3ff
MOV ECX,0x400
MOV RDI,RBX
MOV EDX,0x1
XOR EAX,EAX
CALL 0x001132d0
LEA RSI,[0x13d76a]
MOV RDI,RBX
CALL 0x00113530
TEST RAX,RAX
JZ 0x00117b31
MOV RBX,RAX
LEA RSI,[0x13a628]
MOV RDI,R14
CALL 0x0011ee15
TEST EAX,EAX
JZ 0x00117b58
MOV R12D,EAX
MOV RDI,R14
CALL 0x00120e8e
MOV RBX,RAX
MOV RDI,R14
CALL 0x00120e79
LEA RDI,[0x139265]
LEA R8,[0x13996e]
MOV ESI,R12D
MOV RDX,RBX
MOV ECX,EAX
MOV R9D,0x120
XOR EAX,EAX
CALL 0x0011970b
JMP 0x00117bc0
LAB_00117b0b:
LEA RDI,[0x139120]
LEA RSI,[0x13a5de]
LEA RDX,[0x13996e]
MOV ECX,0x114
LAB_00117b25:
XOR EAX,EAX
CALL 0x0011970b
JMP 0x001178ea
LAB_00117b31:
MOV RDI,R15
CALL 0x00124ee5
LEA RDI,[0x13a609]
LEA RSI,[RBP + -0x630]
XOR EAX,EAX
CALL 0x0011970b
MOV EBX,0xffffffff
JMP 0x001178ea
LAB_00117b58:
MOV RDI,R14
CALL 0x0011fd0d
TEST RAX,RAX
JZ 0x00117b9f
MOV R12,RAX
MOV R13D,0x2
LAB_00117b6e:
MOV RDI,R12
CALL 0x0011ff10
DEC R13D
TEST RAX,RAX
JNZ 0x00117b6e
TEST R13D,R13D
JZ 0x00117bca
LEA RDI,[0x139120]
LEA RSI,[0x13a64e]
LEA RDX,[0x13996e]
MOV ECX,0x128
JMP 0x00117bb9
LAB_00117b9f:
LEA RDI,[0x139120]
LEA RSI,[0x139287]
LEA RDX,[0x13996e]
MOV ECX,0x123
LAB_00117bb9:
XOR EAX,EAX
CALL 0x0011970b
LAB_00117bc0:
MOV EBX,0x1
JMP 0x001178ea
LAB_00117bca:
MOV RDI,R12
XOR ESI,ESI
CALL 0x0012002a
MOV RDI,R12
CALL 0x0011ff10
TEST RAX,RAX
JZ 0x00117c25
CMP qword ptr [RAX + 0x88],0x0
JZ 0x00117c44
MOV RDI,R12
CALL 0x0011aac2
MOV RDI,R15
CALL 0x00124ee5
MOV RDI,RBX
CALL 0x00113470
LEA RSI,[0x13a591]
MOV RDI,R14
CALL 0x0011ee15
LEA RDI,[RBP + -0x630]
CALL 0x001131d0
XOR EBX,EBX
JMP 0x001178ea
LAB_00117c25:
LEA RDI,[0x139120]
LEA RSI,[0x13a65c]
LEA RDX,[0x13996e]
MOV ECX,0x12d
JMP 0x00117bb9
LAB_00117c44:
LEA RDI,[0x139120]
LEA RSI,[0x13a66f]
LEA RDX,[0x13996e]
MOV ECX,0x12f
JMP 0x00117bb9
LAB_00117c63:
CALL 0x00113510
|
int8 test_frm_bug(int8 param_1)
{
char cVar1;
int iVar2;
int4 uVar3;
int8 uVar4;
long lVar5;
char *pcVar6;
FILE *__stream;
long lVar7;
long lVar8;
int8 uVar9;
int8 *puVar10;
int8 *puVar11;
int8 uVar12;
long in_FS_OFFSET;
byte bVar13;
int8 local_718 [2];
int1 *local_708;
int8 local_6d8;
int4 local_6b8;
int8 local_6a8 [14];
char local_638 [1024];
int1 local_238 [512];
long local_38;
bVar13 = 0;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
cVar1 = mariadb_connection();
if (cVar1 == '\0') {
uVar9 = 0;
diag("Skip test for non MariaDB server");
goto LAB_001178ea;
}
uVar9 = 1;
mysql_autocommit(param_1,1);
iVar2 = mysql_query(param_1,"drop table if exists test_frm_bug");
if (iVar2 == 0) {
iVar2 = mysql_query(param_1,"flush tables");
if (iVar2 == 0) {
lVar5 = mysql_stmt_init(param_1);
if (lVar5 == 0) {
pcVar6 = (char *)mysql_error(param_1);
uVar4 = 0x100;
}
else {
iVar2 = mysql_stmt_prepare(lVar5,"show variables like \'datadir\'",0x1d);
if (iVar2 == 0) {
iVar2 = mysql_stmt_execute(lVar5);
if (iVar2 == 0) {
memset(local_718,0,0xe0);
local_6b8 = 0xfe;
local_708 = local_238;
local_6d8 = 0x200;
puVar10 = local_718;
puVar11 = local_6a8;
for (lVar8 = 0xe; lVar8 != 0; lVar8 = lVar8 + -1) {
*puVar11 = *puVar10;
puVar10 = puVar10 + (ulong)bVar13 * -2 + 1;
puVar11 = puVar11 + (ulong)bVar13 * -2 + 1;
}
cVar1 = mysql_stmt_bind_result(lVar5,local_718);
if (cVar1 == '\0') {
iVar2 = mysql_stmt_fetch(lVar5);
if (iVar2 == 0) {
iVar2 = mysql_stmt_fetch(lVar5);
if (iVar2 == 100) {
__snprintf_chk(local_638,0x3ff,1,0x400,"%s/%s/test_frm_bug.frm",local_238,schema);
__stream = fopen64(local_638,"w");
if (__stream == (FILE *)0x0) {
mysql_stmt_close(lVar5);
diag("Can\'t write to file %s -> SKIP",local_638);
uVar9 = 0xffffffff;
}
else {
iVar2 = mysql_query(param_1,"SHOW TABLE STATUS like \'test_frm_bug\'");
if (iVar2 == 0) {
lVar8 = mysql_store_result(param_1);
if (lVar8 == 0) {
pcVar6 = "Invalid result set";
uVar9 = 0x123;
}
else {
iVar2 = 2;
do {
lVar7 = mysql_fetch_row(lVar8);
iVar2 = iVar2 + -1;
} while (lVar7 != 0);
if (iVar2 == 0) {
mysql_data_seek(lVar8,0);
lVar7 = mysql_fetch_row(lVar8);
if (lVar7 == 0) {
pcVar6 = "couldn\'t fetch row";
uVar9 = 0x12d;
}
else {
if (*(long *)(lVar7 + 0x88) != 0) {
mysql_free_result(lVar8);
mysql_stmt_close(lVar5);
fclose(__stream);
mysql_query(param_1,"drop table if exists test_frm_bug");
unlink(local_638);
uVar9 = 0;
goto LAB_001178ea;
}
pcVar6 = "row[17] != 0";
uVar9 = 0x12f;
}
}
else {
pcVar6 = "rowcount != 1";
uVar9 = 0x128;
}
}
diag("Error: %s (%s: %d)",pcVar6,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c"
,uVar9);
}
else {
uVar9 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar9,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c"
,0x120);
}
uVar9 = 1;
}
goto LAB_001178ea;
}
pcVar6 = "rc != MYSQL_NO_DATA";
uVar4 = 0x114;
}
else {
pcVar6 = (char *)mysql_stmt_error(lVar5);
uVar4 = 0x111;
}
}
else {
pcVar6 = (char *)mysql_stmt_error(lVar5);
uVar4 = 0x10e;
}
}
else {
pcVar6 = (char *)mysql_stmt_error(lVar5);
uVar4 = 0x105;
}
}
else {
pcVar6 = (char *)mysql_stmt_error(lVar5);
uVar4 = 0x102;
}
}
diag("Error: %s (%s: %d)",pcVar6,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c",uVar4);
goto LAB_001178ea;
}
uVar4 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
uVar12 = 0xfd;
}
else {
uVar4 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
uVar12 = 0xfa;
}
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c",uVar12);
LAB_001178ea:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar9;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
52,577 | rak_type_to_cstr | fabiosvm[P]rak/src/value.c | const char *rak_type_to_cstr(RakType type)
{
char *cstr = NULL;
switch (type)
{
case RAK_TYPE_NIL: cstr = "nil"; break;
case RAK_TYPE_BOOL: cstr = "bool"; break;
case RAK_TYPE_NUMBER: cstr = "number"; break;
case RAK_TYPE_STRING: cstr = "string"; break;
case RAK_TYPE_ARRAY: cstr = "array"; break;
case RAK_TYPE_RANGE: cstr = "range"; break;
case RAK_TYPE_RECORD: cstr = "record"; break;
case RAK_TYPE_CLOSURE: cstr = "closure"; break;
}
return cstr;
} | O2 | c | rak_type_to_cstr:
cmpl $0x7, %edi
ja 0x6a5a
movl %edi, %eax
leaq 0x2f4e(%rip), %rcx # 0x99a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
retq
xorl %eax, %eax
retq
| rak_type_to_cstr:
cmp edi, 7
ja short loc_6A5A
mov eax, edi
lea rcx, unk_99A0
movsxd rax, dword ptr [rcx+rax*4]
add rax, rcx
retn
loc_6A5A:
xor eax, eax
retn
| char * rak_type_to_cstr(unsigned int a1)
{
if ( a1 > 7 )
return 0LL;
else
return (char *)dword_99A0 + dword_99A0[a1];
}
| rak_type_to_cstr:
CMP EDI,0x7
JA 0x00106a5a
MOV EAX,EDI
LEA RCX,[0x1099a0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
RET
LAB_00106a5a:
XOR EAX,EAX
RET
|
int * rak_type_to_cstr(uint param_1)
{
if (param_1 < 8) {
return &DAT_001099a0 + *(int *)(&DAT_001099a0 + (ulong)param_1 * 4);
}
return (int *)0x0;
}
| |
52,578 | rak_type_to_cstr | fabiosvm[P]rak/src/value.c | const char *rak_type_to_cstr(RakType type)
{
char *cstr = NULL;
switch (type)
{
case RAK_TYPE_NIL: cstr = "nil"; break;
case RAK_TYPE_BOOL: cstr = "bool"; break;
case RAK_TYPE_NUMBER: cstr = "number"; break;
case RAK_TYPE_STRING: cstr = "string"; break;
case RAK_TYPE_ARRAY: cstr = "array"; break;
case RAK_TYPE_RANGE: cstr = "range"; break;
case RAK_TYPE_RECORD: cstr = "record"; break;
case RAK_TYPE_CLOSURE: cstr = "closure"; break;
}
return cstr;
} | O3 | c | rak_type_to_cstr:
cmpl $0x7, %edi
ja 0x816a
movl %edi, %eax
leaq 0x27f6(%rip), %rcx # 0xa958
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
retq
xorl %eax, %eax
retq
| rak_type_to_cstr:
cmp edi, 7
ja short loc_816A
mov eax, edi
lea rcx, unk_A958
movsxd rax, dword ptr [rcx+rax*4]
add rax, rcx
retn
loc_816A:
xor eax, eax
retn
| char * rak_type_to_cstr(unsigned int a1)
{
if ( a1 > 7 )
return 0LL;
else
return (char *)dword_A958 + dword_A958[a1];
}
| rak_type_to_cstr:
CMP EDI,0x7
JA 0x0010816a
MOV EAX,EDI
LEA RCX,[0x10a958]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
RET
LAB_0010816a:
XOR EAX,EAX
RET
|
int * rak_type_to_cstr(uint param_1)
{
if (param_1 < 8) {
return &DAT_0010a958 + *(int *)(&DAT_0010a958 + (ulong)param_1 * 4);
}
return (int *)0x0;
}
| |
52,579 | my_end | eloqsql/mysys/my_init.c | void my_end(int infoflag)
{
/*
this code is suboptimal to workaround a bug in
Sun CC: Sun C++ 5.6 2004/06/02 for x86, and should not be
optimized until this compiler is not in use anymore
*/
FILE *info_file= DBUG_FILE;
my_bool print_info= (info_file != stderr);
if (!my_init_done)
return;
/*
We do not use DBUG_ENTER here, as after cleanup DBUG is no longer
operational, so we cannot use DBUG_RETURN.
*/
DBUG_PRINT("info",("Shutting down: infoflag: %d print_info: %d",
infoflag, print_info));
if (!info_file)
{
info_file= stderr;
print_info= 0;
}
if ((infoflag & MY_CHECK_ERROR) || print_info)
{ /* Test if some file is left open */
char ebuff[512];
uint i, open_files, open_streams;
for (open_streams= open_files= i= 0 ; i < my_file_limit ; i++)
{
if (my_file_info[i].type == UNOPEN)
continue;
if (my_file_info[i].type == STREAM_BY_FOPEN ||
my_file_info[i].type == STREAM_BY_FDOPEN)
open_streams++;
else
open_files++;
#ifdef EXTRA_DEBUG
fprintf(stderr, EE(EE_FILE_NOT_CLOSED), my_file_info[i].name, i);
fputc('\n', stderr);
#endif
}
if (open_files || open_streams)
{
my_snprintf(ebuff, sizeof(ebuff), EE(EE_OPEN_WARNING),
open_files, open_streams);
my_message_stderr(EE_OPEN_WARNING, ebuff, ME_BELL);
DBUG_PRINT("error", ("%s", ebuff));
}
#ifdef CHECK_UNLIKELY
end_my_likely(info_file);
#endif
}
free_charsets();
my_error_unregister_all();
my_once_free();
if ((infoflag & MY_GIVE_INFO) || print_info)
{
#ifdef HAVE_GETRUSAGE
struct rusage rus;
#ifdef HAVE_valgrind
/* Purify assumes that rus is uninitialized after getrusage call */
bzero((char*) &rus, sizeof(rus));
#endif
if (!getrusage(RUSAGE_SELF, &rus))
fprintf(info_file,"\n\
User time %.2f, System time %.2f\n\
Maximum resident set size %ld, Integral resident set size %ld\n\
Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n\
Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n\
Voluntary context switches %ld, Involuntary context switches %ld\n",
(rus.ru_utime.tv_sec * SCALE_SEC +
rus.ru_utime.tv_usec / SCALE_USEC) / 100.0,
(rus.ru_stime.tv_sec * SCALE_SEC +
rus.ru_stime.tv_usec / SCALE_USEC) / 100.0,
rus.ru_maxrss, rus.ru_idrss,
rus.ru_minflt, rus.ru_majflt,
rus.ru_nswap, rus.ru_inblock, rus.ru_oublock,
rus.ru_msgsnd, rus.ru_msgrcv, rus.ru_nsignals,
rus.ru_nvcsw, rus.ru_nivcsw);
#endif
#if defined(_MSC_VER)
_CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE );
_CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR );
_CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE );
_CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDERR );
_CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE );
_CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR );
_CrtCheckMemory();
#endif
}
my_thread_end();
my_thread_global_end();
if (!(infoflag & MY_DONT_FREE_DBUG))
DBUG_END(); /* Must be done as late as possible */
my_mutex_end();
#if defined(SAFE_MUTEX)
/*
Check on destroying of mutexes. A few may be left that will get cleaned
up by C++ destructors
*/
safe_mutex_end((infoflag & (MY_GIVE_INFO | MY_CHECK_ERROR)) ? stderr :
(FILE *) 0);
#endif /* defined(SAFE_MUTEX) */
#ifdef _WIN32
WSACleanup();
#endif
/* At very last, delete mysys key, it is used everywhere including DBUG */
pthread_key_delete(THR_KEY_mysys);
my_init_done= my_thr_key_mysys_exists= 0;
} | O0 | c | my_end:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp # imm = 0x308
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movl %edi, -0x234(%rbp)
movq 0x1cce72(%rip), %rax # 0x2c7fe0
movq (%rax), %rax
movq %rax, -0x240(%rbp)
movq -0x240(%rbp), %rax
movq 0x1cce5a(%rip), %rcx # 0x2c7fe0
cmpq (%rcx), %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x241(%rbp)
leaq 0xb92b32(%rip), %rax # 0xc8dcd0
cmpb $0x0, (%rax)
jne 0xfb1a8
jmp 0xfb4a1
jmp 0xfb1aa
jmp 0xfb1ac
cmpq $0x0, -0x240(%rbp)
jne 0xfb1ce
movq 0x1cce23(%rip), %rax # 0x2c7fe0
movq (%rax), %rax
movq %rax, -0x240(%rbp)
movb $0x0, -0x241(%rbp)
movl -0x234(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xfb1ec
movsbl -0x241(%rbp), %eax
cmpl $0x0, %eax
je 0xfb30a
movl $0x0, -0x248(%rbp)
movl $0x0, -0x24c(%rbp)
movl $0x0, -0x250(%rbp)
movl -0x248(%rbp), %eax
leaq 0x1cfd79(%rip), %rcx # 0x2caf90
cmpl (%rcx), %eax
jae 0xfb2ae
leaq 0x1cfd72(%rip), %rax # 0x2caf98
movq (%rax), %rax
movl -0x248(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jne 0xfb23e
jmp 0xfb29a
leaq 0x1cfd53(%rip), %rax # 0x2caf98
movq (%rax), %rax
movl -0x248(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x3, 0x8(%rax)
je 0xfb278
leaq 0x1cfd36(%rip), %rax # 0x2caf98
movq (%rax), %rax
movl -0x248(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x4, 0x8(%rax)
jne 0xfb289
movl -0x250(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x250(%rbp)
jmp 0xfb298
movl -0x24c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24c(%rbp)
jmp 0xfb29a
movl -0x248(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x248(%rbp)
jmp 0xfb20a
cmpl $0x0, -0x24c(%rbp)
jne 0xfb2c0
cmpl $0x0, -0x250(%rbp)
je 0xfb308
leaq -0x230(%rbp), %rdi
leaq 0x1d0222(%rip), %rax # 0x2cb4f0
movq 0x90(%rax), %rdx
movl -0x24c(%rbp), %ecx
movl -0x250(%rbp), %r8d
movl $0x200, %esi # imm = 0x200
movb $0x0, %al
callq 0x1563d0
leaq -0x230(%rbp), %rsi
movl $0x13, %edi
movl $0x4, %edx
callq 0xfc580
jmp 0xfb306
jmp 0xfb308
jmp 0xfb30a
callq 0xdd680
callq 0xf4420
callq 0xfc9d0
movl -0x234(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0xfb337
movsbl -0x241(%rbp), %eax
cmpl $0x0, %eax
je 0xfb45c
xorl %edi, %edi
leaq -0x2e0(%rbp), %rsi
callq 0x2a900
cmpl $0x0, %eax
jne 0xfb45a
movq -0x240(%rbp), %rdi
imulq $0x64, -0x2e0(%rbp), %rax
movq %rax, -0x2f0(%rbp)
movq -0x2d8(%rbp), %rax
movl $0x2710, %ecx # imm = 0x2710
cqto
idivq %rcx
movq %rax, %rcx
movq -0x2f0(%rbp), %rax
addq %rcx, %rax
cvtsi2sd %rax, %xmm0
movsd 0x67d89(%rip), %xmm1 # 0x163118
divsd %xmm1, %xmm0
imulq $0x64, -0x2d0(%rbp), %rax
movq %rax, -0x2e8(%rbp)
movq -0x2c8(%rbp), %rax
movl $0x2710, %ecx # imm = 0x2710
cqto
idivq %rcx
movq %rax, %rcx
movq -0x2e8(%rbp), %rax
addq %rcx, %rax
cvtsi2sd %rax, %xmm1
movsd 0x67d4b(%rip), %xmm2 # 0x163118
divsd %xmm2, %xmm1
movq -0x2c0(%rbp), %rdx
movq -0x2b0(%rbp), %rcx
movq -0x2a0(%rbp), %r8
movq -0x298(%rbp), %r9
movq -0x290(%rbp), %r13
movq -0x288(%rbp), %r12
movq -0x280(%rbp), %r15
movq -0x278(%rbp), %r14
movq -0x270(%rbp), %rbx
movq -0x268(%rbp), %r11
movq -0x260(%rbp), %r10
movq -0x258(%rbp), %rax
leaq 0x631a4(%rip), %rsi # 0x15e5d0
movq %r13, (%rsp)
movq %r12, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movq %rbx, 0x20(%rsp)
movq %r11, 0x28(%rsp)
movq %r10, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movb $0x2, %al
callq 0x2a180
jmp 0xfb45c
callq 0xfed60
callq 0xfead0
movl -0x234(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0xfb47a
jmp 0xfb476
jmp 0xfb478
jmp 0xfb47a
callq 0x102660
leaq 0xb9354e(%rip), %rax # 0xc8e9d4
movl (%rax), %edi
callq 0x2a770
leaq 0xb93278(%rip), %rax # 0xc8e70c
movb $0x0, (%rax)
leaq 0xb92832(%rip), %rax # 0xc8dcd0
movb $0x0, (%rax)
movq %fs:0x28, %rax
movq -0x30(%rbp), %rcx
cmpq %rcx, %rax
jne 0xfb4c5
addq $0x308, %rsp # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a270
nopw (%rax,%rax)
| my_end:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 308h
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_234], edi
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rbp+var_240], rax
mov rax, [rbp+var_240]
mov rcx, cs:stderr_ptr
cmp rax, [rcx]
setnz al
and al, 1
movzx eax, al
mov [rbp+var_241], al
lea rax, my_init_done
cmp byte ptr [rax], 0
jnz short loc_FB1A8
jmp loc_FB4A1
loc_FB1A8:
jmp short $+2
loc_FB1AA:
jmp short $+2
loc_FB1AC:
cmp [rbp+var_240], 0
jnz short loc_FB1CE
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rbp+var_240], rax
mov [rbp+var_241], 0
loc_FB1CE:
mov eax, [rbp+var_234]
and eax, 1
cmp eax, 0
jnz short loc_FB1EC
movsx eax, [rbp+var_241]
cmp eax, 0
jz loc_FB30A
loc_FB1EC:
mov [rbp+var_248], 0
mov [rbp+var_24C], 0
mov [rbp+var_250], 0
loc_FB20A:
mov eax, [rbp+var_248]
lea rcx, my_file_limit
cmp eax, [rcx]
jnb loc_FB2AE
lea rax, my_file_info
mov rax, [rax]
mov ecx, [rbp+var_248]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+8], 0
jnz short loc_FB23E
jmp short loc_FB29A
loc_FB23E:
lea rax, my_file_info
mov rax, [rax]
mov ecx, [rbp+var_248]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+8], 3
jz short loc_FB278
lea rax, my_file_info
mov rax, [rax]
mov ecx, [rbp+var_248]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+8], 4
jnz short loc_FB289
loc_FB278:
mov eax, [rbp+var_250]
add eax, 1
mov [rbp+var_250], eax
jmp short loc_FB298
loc_FB289:
mov eax, [rbp+var_24C]
add eax, 1
mov [rbp+var_24C], eax
loc_FB298:
jmp short $+2
loc_FB29A:
mov eax, [rbp+var_248]
add eax, 1
mov [rbp+var_248], eax
jmp loc_FB20A
loc_FB2AE:
cmp [rbp+var_24C], 0
jnz short loc_FB2C0
cmp [rbp+var_250], 0
jz short loc_FB308
loc_FB2C0:
lea rdi, [rbp+var_230]
lea rax, globerrs
mov rdx, [rax+90h]
mov ecx, [rbp+var_24C]
mov r8d, [rbp+var_250]
mov esi, 200h
mov al, 0
call my_snprintf
lea rsi, [rbp+var_230]
mov edi, 13h
mov edx, 4
call my_message_stderr
jmp short $+2
loc_FB306:
jmp short $+2
loc_FB308:
jmp short $+2
loc_FB30A:
call free_charsets
call my_error_unregister_all
call my_once_free
mov eax, [rbp+var_234]
and eax, 2
cmp eax, 0
jnz short loc_FB337
movsx eax, [rbp+var_241]
cmp eax, 0
jz loc_FB45C
loc_FB337:
xor edi, edi
lea rsi, [rbp+var_2E0]
call _getrusage
cmp eax, 0
jnz loc_FB45A
mov rdi, [rbp+var_240]
imul rax, [rbp+var_2E0], 64h ; 'd'
mov [rbp+var_2F0], rax
mov rax, [rbp+var_2D8]
mov ecx, 2710h
cqo
idiv rcx
mov rcx, rax
mov rax, [rbp+var_2F0]
add rax, rcx
cvtsi2sd xmm0, rax
movsd xmm1, cs:qword_163118
divsd xmm0, xmm1
imul rax, [rbp+var_2D0], 64h ; 'd'
mov [rbp+var_2E8], rax
mov rax, [rbp+var_2C8]
mov ecx, 2710h
cqo
idiv rcx
mov rcx, rax
mov rax, [rbp+var_2E8]
add rax, rcx
cvtsi2sd xmm1, rax
movsd xmm2, cs:qword_163118
divsd xmm1, xmm2
mov rdx, [rbp+var_2C0]
mov rcx, [rbp+var_2B0]
mov r8, [rbp+var_2A0]
mov r9, [rbp+var_298]
mov r13, [rbp+var_290]
mov r12, [rbp+var_288]
mov r15, [rbp+var_280]
mov r14, [rbp+var_278]
mov rbx, [rbp+var_270]
mov r11, [rbp+var_268]
mov r10, [rbp+var_260]
mov rax, [rbp+var_258]
lea rsi, aUserTime2fSyst; "\nUser time %.2f, System time %.2f\nMax"...
mov [rsp+330h+var_330], r13
mov [rsp+330h+var_328], r12
mov [rsp+330h+var_320], r15
mov [rsp+330h+var_318], r14
mov [rsp+330h+var_310], rbx
mov [rsp+330h+var_308], r11
mov [rsp+330h+var_300], r10
mov [rsp+330h+var_2F8], rax
mov al, 2
call _fprintf
loc_FB45A:
jmp short $+2
loc_FB45C:
call my_thread_end
call my_thread_global_end
mov eax, [rbp+var_234]
and eax, 4
cmp eax, 0
jnz short loc_FB47A
jmp short $+2
loc_FB476:
jmp short $+2
loc_FB478:
jmp short $+2
loc_FB47A:
call my_mutex_end
lea rax, THR_KEY_mysys
mov edi, [rax]
call _pthread_key_delete
lea rax, my_thr_key_mysys_exists
mov byte ptr [rax], 0
lea rax, my_init_done
mov byte ptr [rax], 0
loc_FB4A1:
mov rax, fs:28h
mov rcx, [rbp+var_30]
cmp rax, rcx
jnz short loc_FB4C5
add rsp, 308h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_FB4C5:
call ___stack_chk_fail
| unsigned long long my_end(int a1, long long a2, long long a3, long long a4, long long a5, int a6)
{
_QWORD v7[2]; // [rsp+50h] [rbp-2E0h] BYREF
long long v8; // [rsp+60h] [rbp-2D0h]
long long v9; // [rsp+68h] [rbp-2C8h]
long long v10; // [rsp+70h] [rbp-2C0h]
long long v11; // [rsp+80h] [rbp-2B0h]
long long v12; // [rsp+90h] [rbp-2A0h]
long long v13; // [rsp+98h] [rbp-298h]
long long v14; // [rsp+A0h] [rbp-290h]
long long v15; // [rsp+A8h] [rbp-288h]
long long v16; // [rsp+B0h] [rbp-280h]
long long v17; // [rsp+B8h] [rbp-278h]
long long v18; // [rsp+C0h] [rbp-270h]
long long v19; // [rsp+C8h] [rbp-268h]
long long v20; // [rsp+D0h] [rbp-260h]
long long v21; // [rsp+D8h] [rbp-258h]
int v22; // [rsp+E0h] [rbp-250h]
int v23; // [rsp+E4h] [rbp-24Ch]
unsigned int v24; // [rsp+E8h] [rbp-248h]
char v25; // [rsp+EFh] [rbp-241h]
long long v26; // [rsp+F0h] [rbp-240h]
int v27; // [rsp+FCh] [rbp-234h]
_BYTE v28[512]; // [rsp+100h] [rbp-230h] BYREF
unsigned long long v29; // [rsp+300h] [rbp-30h]
v29 = __readfsqword(0x28u);
v27 = a1;
v26 = stderr;
v25 = 0;
if ( my_init_done )
{
if ( !v26 )
{
v26 = stderr;
v25 = 0;
}
if ( (v27 & 1) != 0 )
{
v24 = 0;
v23 = 0;
v22 = 0;
while ( v24 < my_file_limit[0] )
{
if ( *((_DWORD *)my_file_info + 4 * v24 + 2) )
{
if ( *((_DWORD *)my_file_info + 4 * v24 + 2) == 3 || *((_DWORD *)my_file_info + 4 * v24 + 2) == 4 )
++v22;
else
++v23;
}
++v24;
}
if ( v23 || v22 )
{
my_snprintf((unsigned int)v28, 512, (unsigned int)globerrs[18], v23, v22, a6);
my_message_stderr(19LL, v28, 4LL);
}
}
free_charsets();
my_error_unregister_all();
my_once_free();
if ( (v27 & 2) != 0 && !(unsigned int)getrusage(0LL, v7) )
fprintf(
v26,
"\n"
"User time %.2f, System time %.2f\n"
"Maximum resident set size %ld, Integral resident set size %ld\n"
"Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n"
"Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n"
"Voluntary context switches %ld, Involuntary context switches %ld\n",
(double)(int)(v7[1] / 10000LL + 100 * LODWORD(v7[0])) / 100.0,
(double)(int)(v9 / 10000 + 100 * v8) / 100.0,
v10,
v11,
v12,
v13,
v14,
v15,
v16,
v17,
v18,
v19,
v20,
v21);
my_thread_end();
my_thread_global_end();
my_mutex_end();
pthread_key_delete(THR_KEY_mysys);
my_thr_key_mysys_exists = 0;
my_init_done = 0;
}
return __readfsqword(0x28u);
}
| my_end:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x308
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV dword ptr [RBP + -0x234],EDI
MOV RAX,qword ptr [0x003c7fe0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x240],RAX
MOV RAX,qword ptr [RBP + -0x240]
MOV RCX,qword ptr [0x003c7fe0]
CMP RAX,qword ptr [RCX]
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x241],AL
LEA RAX,[0xd8dcd0]
CMP byte ptr [RAX],0x0
JNZ 0x001fb1a8
JMP 0x001fb4a1
LAB_001fb1a8:
JMP 0x001fb1aa
LAB_001fb1aa:
JMP 0x001fb1ac
LAB_001fb1ac:
CMP qword ptr [RBP + -0x240],0x0
JNZ 0x001fb1ce
MOV RAX,qword ptr [0x003c7fe0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x240],RAX
MOV byte ptr [RBP + -0x241],0x0
LAB_001fb1ce:
MOV EAX,dword ptr [RBP + -0x234]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x001fb1ec
MOVSX EAX,byte ptr [RBP + -0x241]
CMP EAX,0x0
JZ 0x001fb30a
LAB_001fb1ec:
MOV dword ptr [RBP + -0x248],0x0
MOV dword ptr [RBP + -0x24c],0x0
MOV dword ptr [RBP + -0x250],0x0
LAB_001fb20a:
MOV EAX,dword ptr [RBP + -0x248]
LEA RCX,[0x3caf90]
CMP EAX,dword ptr [RCX]
JNC 0x001fb2ae
LEA RAX,[0x3caf98]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x248]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x8],0x0
JNZ 0x001fb23e
JMP 0x001fb29a
LAB_001fb23e:
LEA RAX,[0x3caf98]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x248]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x8],0x3
JZ 0x001fb278
LEA RAX,[0x3caf98]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x248]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x8],0x4
JNZ 0x001fb289
LAB_001fb278:
MOV EAX,dword ptr [RBP + -0x250]
ADD EAX,0x1
MOV dword ptr [RBP + -0x250],EAX
JMP 0x001fb298
LAB_001fb289:
MOV EAX,dword ptr [RBP + -0x24c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24c],EAX
LAB_001fb298:
JMP 0x001fb29a
LAB_001fb29a:
MOV EAX,dword ptr [RBP + -0x248]
ADD EAX,0x1
MOV dword ptr [RBP + -0x248],EAX
JMP 0x001fb20a
LAB_001fb2ae:
CMP dword ptr [RBP + -0x24c],0x0
JNZ 0x001fb2c0
CMP dword ptr [RBP + -0x250],0x0
JZ 0x001fb308
LAB_001fb2c0:
LEA RDI,[RBP + -0x230]
LEA RAX,[0x3cb4f0]
MOV RDX,qword ptr [RAX + 0x90]
MOV ECX,dword ptr [RBP + -0x24c]
MOV R8D,dword ptr [RBP + -0x250]
MOV ESI,0x200
MOV AL,0x0
CALL 0x002563d0
LEA RSI,[RBP + -0x230]
MOV EDI,0x13
MOV EDX,0x4
CALL 0x001fc580
JMP 0x001fb306
LAB_001fb306:
JMP 0x001fb308
LAB_001fb308:
JMP 0x001fb30a
LAB_001fb30a:
CALL 0x001dd680
CALL 0x001f4420
CALL 0x001fc9d0
MOV EAX,dword ptr [RBP + -0x234]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x001fb337
MOVSX EAX,byte ptr [RBP + -0x241]
CMP EAX,0x0
JZ 0x001fb45c
LAB_001fb337:
XOR EDI,EDI
LEA RSI,[RBP + -0x2e0]
CALL 0x0012a900
CMP EAX,0x0
JNZ 0x001fb45a
MOV RDI,qword ptr [RBP + -0x240]
IMUL RAX,qword ptr [RBP + -0x2e0],0x64
MOV qword ptr [RBP + -0x2f0],RAX
MOV RAX,qword ptr [RBP + -0x2d8]
MOV ECX,0x2710
CQO
IDIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x2f0]
ADD RAX,RCX
CVTSI2SD XMM0,RAX
MOVSD XMM1,qword ptr [0x00263118]
DIVSD XMM0,XMM1
IMUL RAX,qword ptr [RBP + -0x2d0],0x64
MOV qword ptr [RBP + -0x2e8],RAX
MOV RAX,qword ptr [RBP + -0x2c8]
MOV ECX,0x2710
CQO
IDIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x2e8]
ADD RAX,RCX
CVTSI2SD XMM1,RAX
MOVSD XMM2,qword ptr [0x00263118]
DIVSD XMM1,XMM2
MOV RDX,qword ptr [RBP + -0x2c0]
MOV RCX,qword ptr [RBP + -0x2b0]
MOV R8,qword ptr [RBP + -0x2a0]
MOV R9,qword ptr [RBP + -0x298]
MOV R13,qword ptr [RBP + -0x290]
MOV R12,qword ptr [RBP + -0x288]
MOV R15,qword ptr [RBP + -0x280]
MOV R14,qword ptr [RBP + -0x278]
MOV RBX,qword ptr [RBP + -0x270]
MOV R11,qword ptr [RBP + -0x268]
MOV R10,qword ptr [RBP + -0x260]
MOV RAX,qword ptr [RBP + -0x258]
LEA RSI,[0x25e5d0]
MOV qword ptr [RSP],R13
MOV qword ptr [RSP + 0x8],R12
MOV qword ptr [RSP + 0x10],R15
MOV qword ptr [RSP + 0x18],R14
MOV qword ptr [RSP + 0x20],RBX
MOV qword ptr [RSP + 0x28],R11
MOV qword ptr [RSP + 0x30],R10
MOV qword ptr [RSP + 0x38],RAX
MOV AL,0x2
CALL 0x0012a180
LAB_001fb45a:
JMP 0x001fb45c
LAB_001fb45c:
CALL 0x001fed60
CALL 0x001fead0
MOV EAX,dword ptr [RBP + -0x234]
AND EAX,0x4
CMP EAX,0x0
JNZ 0x001fb47a
JMP 0x001fb476
LAB_001fb476:
JMP 0x001fb478
LAB_001fb478:
JMP 0x001fb47a
LAB_001fb47a:
CALL 0x00202660
LEA RAX,[0xd8e9d4]
MOV EDI,dword ptr [RAX]
CALL 0x0012a770
LEA RAX,[0xd8e70c]
MOV byte ptr [RAX],0x0
LEA RAX,[0xd8dcd0]
MOV byte ptr [RAX],0x0
LAB_001fb4a1:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x30]
CMP RAX,RCX
JNZ 0x001fb4c5
ADD RSP,0x308
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001fb4c5:
CALL 0x0012a270
|
void my_end(uint param_1)
{
int iVar1;
long in_FS_OFFSET;
bool bVar2;
bool bVar3;
rusage local_2e8;
int local_258;
int local_254;
uint local_250;
bool local_249;
FILE *local_248;
uint local_23c;
int1 local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_248 = *(FILE **)PTR_stderr_003c7fe0;
bVar2 = local_248 != *(FILE **)PTR_stderr_003c7fe0;
local_249 = bVar2;
local_23c = param_1;
if (my_init_done != '\0') {
bVar3 = local_248 == (FILE *)0x0;
if (bVar3) {
local_248 = *(FILE **)PTR_stderr_003c7fe0;
}
bVar3 = !bVar3;
local_249 = bVar3 && bVar2;
if (((param_1 & 1) != 0) || (bVar3 && bVar2)) {
local_254 = 0;
local_258 = 0;
for (local_250 = 0; local_250 < my_file_limit; local_250 = local_250 + 1) {
if (*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) != 0) {
if ((*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) == 3) ||
(*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) == 4)) {
local_258 = local_258 + 1;
}
else {
local_254 = local_254 + 1;
}
}
}
if ((local_254 != 0) || (local_258 != 0)) {
my_snprintf(local_238,0x200,globerrs._144_8_,local_254,local_258);
my_message_stderr(0x13,local_238,4);
}
}
free_charsets();
my_error_unregister_all();
my_once_free();
if ((((local_23c & 2) != 0) || (local_249 != false)) &&
(iVar1 = getrusage(RUSAGE_SELF,&local_2e8), iVar1 == 0)) {
fprintf(local_248,
"\nUser time %.2f, System time %.2f\nMaximum resident set size %ld, Integral resident set size %ld\nNon-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\nBlocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\nVoluntary context switches %ld, Involuntary context switches %ld\n"
,(double)(local_2e8.ru_utime.tv_sec * 100 + local_2e8.ru_utime.tv_usec / 10000) /
DAT_00263118,
(double)(local_2e8.ru_stime.tv_sec * 100 + local_2e8.ru_stime.tv_usec / 10000) /
DAT_00263118,local_2e8.ru_maxrss,local_2e8.ru_idrss,local_2e8.ru_minflt,
local_2e8.ru_majflt,local_2e8.ru_nswap,local_2e8.ru_inblock,local_2e8.ru_oublock,
local_2e8.ru_msgsnd,local_2e8.ru_msgrcv,local_2e8.ru_nsignals,local_2e8.ru_nvcsw,
local_2e8.ru_nivcsw);
}
my_thread_end();
my_thread_global_end();
my_mutex_end();
pthread_key_delete(THR_KEY_mysys);
my_thr_key_mysys_exists = 0;
my_init_done = '\0';
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
52,580 | ma_read_bitmap_page | eloqsql/storage/maria/ma_bitmap.c | static my_bool _ma_read_bitmap_page(MARIA_HA *info,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page)
{
MARIA_SHARE *share= info->s;
my_bool res;
DBUG_ENTER("_ma_read_bitmap_page");
DBUG_PRINT("enter", ("page: %lld data_file_length: %lld",
(longlong) page,
(longlong) share->state.state.data_file_length));
DBUG_ASSERT(page % bitmap->pages_covered == 0);
DBUG_ASSERT(!bitmap->changed);
bitmap->page= page;
if ((page + 1) * bitmap->block_size > share->state.state.data_file_length)
{
/* Inexistent or half-created page */
res= _ma_bitmap_create_missing(info, bitmap, page);
if (!res)
adjust_total_size(info, page);
DBUG_RETURN(res);
}
adjust_total_size(info, page);
bitmap->full_head_size= bitmap->full_tail_size= 0;
DBUG_ASSERT(share->pagecache->block_size == bitmap->block_size);
res= pagecache_read(share->pagecache,
&bitmap->file, page, 0,
bitmap->map, PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED, 0) == NULL;
if (!res)
{
/* Calculate used_size */
const uchar *data, *end= bitmap->map;
for (data= bitmap->map + bitmap->total_size; --data >= end && *data == 0; )
{}
bitmap->used_size= (uint) ((data + 1) - end);
DBUG_ASSERT(bitmap->used_size <= bitmap->total_size);
}
else
{
_ma_set_fatal_error(info, my_errno);
}
/*
We can't check maria_bitmap_marker here as if the bitmap page
previously had a true checksum and the user switched mode to not checksum
this may have any value, except maria_normal_page_marker.
Using maria_normal_page_marker gives us a protection against bugs
when running without any checksums.
*/
#ifndef DBUG_OFF
if (!res)
{
memcpy(bitmap->map + bitmap->block_size, bitmap->map, bitmap->block_size);
_ma_check_bitmap(bitmap);
}
#endif
DBUG_RETURN(res);
} | O0 | c | ma_read_bitmap_page:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x662a1
jmp 0x662a3
jmp 0x662a5
jmp 0x662a7
jmp 0x662a9
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq -0x18(%rbp), %rcx
movl 0x134(%rcx), %ecx
imulq %rcx, %rax
movq -0x28(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jbe 0x66309
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x66420
movb %al, -0x29(%rbp)
cmpb $0x0, -0x29(%rbp)
jne 0x662fc
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x666a0
jmp 0x662fe
movb -0x29(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x66414
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x666a0
movq -0x18(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x28(%rax)
jmp 0x6632e
movq -0x28(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x40, %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %r8
xorl %ecx, %ecx
movl $0x1, %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x3d1d0
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x29(%rbp)
cmpb $0x0, -0x29(%rbp)
jne 0x663f4
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x128(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
addq $-0x1, %rcx
movq %rcx, -0x38(%rbp)
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x41(%rbp)
jb 0x663cd
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x663d6
jmp 0x663d8
jmp 0x663a6
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x663f2
jmp 0x6640c
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
callq 0xf6250
movq -0x50(%rbp), %rdi
movl (%rax), %esi
callq 0x43f60
jmp 0x6640e
movb -0x29(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_read_bitmap_page:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
jmp short $+2
loc_662A1:
jmp short $+2
loc_662A3:
jmp short $+2
loc_662A5:
jmp short $+2
loc_662A7:
jmp short $+2
loc_662A9:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
mov [rax+10h], rcx
mov rax, [rbp+var_20]
add rax, 1
mov rcx, [rbp+var_18]
mov ecx, [rcx+134h]
imul rax, rcx
mov rcx, [rbp+var_28]
cmp rax, [rcx+40h]
jbe short loc_66309
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _ma_bitmap_create_missing
mov [rbp+var_29], al
cmp [rbp+var_29], 0
jnz short loc_662FC
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call adjust_total_size
loc_662FC:
jmp short $+2
loc_662FE:
mov al, [rbp+var_29]
mov [rbp+var_1], al
jmp loc_66414
loc_66309:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call adjust_total_size
mov rax, [rbp+var_18]
mov dword ptr [rax+2Ch], 0
mov rax, [rbp+var_18]
mov dword ptr [rax+28h], 0
jmp short $+2
loc_6632E:
mov rax, [rbp+var_28]
mov rdi, [rax+600h]
mov rsi, [rbp+var_18]
add rsi, 40h ; '@'
mov rdx, [rbp+var_20]
mov rax, [rbp+var_18]
mov r8, [rax+8]
xor ecx, ecx
mov r9d, 1
xor eax, eax
mov [rsp+60h+var_60], 0
mov [rsp+60h+var_58], 0
call pagecache_read
cmp rax, 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_29], al
cmp [rbp+var_29], 0
jnz short loc_663F4
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rcx, [rbp+var_18]
mov ecx, [rcx+128h]
add rax, rcx
mov [rbp+var_38], rax
loc_663A6:
mov rcx, [rbp+var_38]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rcx
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_41], al
jb short loc_663CD
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
cmp eax, 0
setz al
mov [rbp+var_41], al
loc_663CD:
mov al, [rbp+var_41]
test al, 1
jnz short loc_663D6
jmp short loc_663D8
loc_663D6:
jmp short loc_663A6
loc_663D8:
mov rax, [rbp+var_38]
add rax, 1
mov rcx, [rbp+var_40]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+24h], ecx
jmp short $+2
loc_663F2:
jmp short loc_6640C
loc_663F4:
mov rax, [rbp+var_10]
mov [rbp+var_50], rax
call _my_thread_var
mov rdi, [rbp+var_50]
mov esi, [rax]
call _ma_set_fatal_error
loc_6640C:
jmp short $+2
loc_6640E:
mov al, [rbp+var_29]
mov [rbp+var_1], al
loc_66414:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
| bool ma_read_bitmap_page(_DWORD *a1, long long a2, long long a3)
{
long long v3; // rax
int *v4; // rax
long long v5; // rdx
long long v6; // rcx
long long v7; // r8
int v8; // r9d
bool v10; // [rsp+1Fh] [rbp-41h]
unsigned long long v11; // [rsp+20h] [rbp-40h]
_BYTE *v12; // [rsp+28h] [rbp-38h]
char missing; // [rsp+37h] [rbp-29h]
bool v14; // [rsp+37h] [rbp-29h]
long long v15; // [rsp+38h] [rbp-28h]
v15 = *(_QWORD *)a1;
*(_QWORD *)(a2 + 16) = a3;
if ( (unsigned long long)*(unsigned int *)(a2 + 308) * (a3 + 1) <= *(_QWORD *)(v15 + 64) )
{
adjust_total_size(a1, a3);
*(_DWORD *)(a2 + 44) = 0;
*(_DWORD *)(a2 + 40) = 0;
v3 = pagecache_read(*(_QWORD **)(v15 + 1536), a2 + 64, a3, 0, *(_QWORD *)(a2 + 8), 1, 0, 0LL);
v14 = v3 == 0;
if ( v3 )
{
v11 = *(_QWORD *)(a2 + 8);
v12 = (_BYTE *)(*(unsigned int *)(a2 + 296) + v11);
do
{
--v12;
v10 = 0;
if ( (unsigned long long)v12 >= v11 )
v10 = *v12 == 0;
}
while ( v10 );
*(_DWORD *)(a2 + 36) = (_DWORD)v12 + 1 - v11;
}
else
{
v4 = (int *)my_thread_var();
ma_set_fatal_error(a1, *v4, v5, v6, v7, v8);
}
return v14;
}
else
{
missing = ma_bitmap_create_missing(a1, a2, a3);
if ( !missing )
adjust_total_size(a1, a3);
return missing;
}
}
| _ma_read_bitmap_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001662a1
LAB_001662a1:
JMP 0x001662a3
LAB_001662a3:
JMP 0x001662a5
LAB_001662a5:
JMP 0x001662a7
LAB_001662a7:
JMP 0x001662a9
LAB_001662a9:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x134]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX + 0x40]
JBE 0x00166309
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00166420
MOV byte ptr [RBP + -0x29],AL
CMP byte ptr [RBP + -0x29],0x0
JNZ 0x001662fc
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001666a0
LAB_001662fc:
JMP 0x001662fe
LAB_001662fe:
MOV AL,byte ptr [RBP + -0x29]
MOV byte ptr [RBP + -0x1],AL
JMP 0x00166414
LAB_00166309:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001666a0
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2c],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x28],0x0
JMP 0x0016632e
LAB_0016632e:
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x40
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RAX + 0x8]
XOR ECX,ECX
MOV R9D,0x1
XOR EAX,EAX
MOV dword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
CALL 0x0013d1d0
CMP RAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x29],AL
CMP byte ptr [RBP + -0x29],0x0
JNZ 0x001663f4
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x128]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001663a6:
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,-0x1
MOV qword ptr [RBP + -0x38],RCX
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x41],AL
JC 0x001663cd
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
SETZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_001663cd:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x001663d6
JMP 0x001663d8
LAB_001663d6:
JMP 0x001663a6
LAB_001663d8:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x001663f2
LAB_001663f2:
JMP 0x0016640c
LAB_001663f4:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x50],RAX
CALL 0x001f6250
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RAX]
CALL 0x00143f60
LAB_0016640c:
JMP 0x0016640e
LAB_0016640e:
MOV AL,byte ptr [RBP + -0x29]
MOV byte ptr [RBP + -0x1],AL
LAB_00166414:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int8 _ma_read_bitmap_page(long *param_1,long param_2,long param_3)
{
ulong uVar1;
ulong uVar2;
int8 uVar3;
int7 uVar6;
long lVar4;
int4 *puVar5;
bool bVar7;
char *local_40;
char local_9;
lVar4 = *param_1;
*(long *)(param_2 + 0x10) = param_3;
uVar2 = (param_3 + 1) * (ulong)*(uint *)(param_2 + 0x134);
uVar1 = *(ulong *)(lVar4 + 0x40);
if (uVar2 < uVar1 || uVar2 - uVar1 == 0) {
adjust_total_size(param_1,param_3);
*(int4 *)(param_2 + 0x2c) = 0;
*(int4 *)(param_2 + 0x28) = 0;
lVar4 = pagecache_read(*(int8 *)(lVar4 + 0x600),param_2 + 0x40,param_3,0,
*(int8 *)(param_2 + 8),1,0,0);
local_9 = lVar4 == 0;
if ((bool)local_9) {
puVar5 = (int4 *)_my_thread_var();
param_2 = _ma_set_fatal_error(param_1,*puVar5);
}
else {
local_40 = (char *)(*(long *)(param_2 + 8) + (ulong)*(uint *)(param_2 + 0x128));
do {
local_40 = local_40 + -1;
bVar7 = false;
if (*(char **)(param_2 + 8) <= local_40) {
bVar7 = *local_40 == '\0';
}
} while (bVar7);
*(int *)(param_2 + 0x24) = ((int)local_40 + 1) - (int)*(char **)(param_2 + 8);
}
uVar6 = (int7)((ulong)param_2 >> 8);
}
else {
uVar3 = _ma_bitmap_create_missing(param_1,param_2,param_3);
local_9 = (char)uVar3;
if (local_9 == '\0') {
uVar3 = adjust_total_size(param_1,param_3);
}
uVar6 = (int7)((ulong)uVar3 >> 8);
}
return CONCAT71(uVar6,local_9);
}
| |
52,581 | lre_exec | bluesky950520[P]quickjs/libregexp.c | int lre_exec(uint8_t **capture,
const uint8_t *bc_buf, const uint8_t *cbuf, int cindex, int clen,
int cbuf_type, void *opaque)
{
REExecContext s_s, *s = &s_s;
int re_flags, i, alloca_size, ret;
StackInt *stack_buf;
re_flags = lre_get_flags(bc_buf);
s->multi_line = (re_flags & LRE_FLAG_MULTILINE) != 0;
s->ignore_case = (re_flags & LRE_FLAG_IGNORECASE) != 0;
s->is_unicode = (re_flags & LRE_FLAG_UNICODE) != 0;
s->capture_count = bc_buf[RE_HEADER_CAPTURE_COUNT];
s->stack_size_max = bc_buf[RE_HEADER_STACK_SIZE];
s->cbuf = cbuf;
s->cbuf_end = cbuf + (clen << cbuf_type);
s->cbuf_type = cbuf_type;
if (s->cbuf_type == 1 && s->is_unicode)
s->cbuf_type = 2;
s->opaque = opaque;
s->state_size = sizeof(REExecState) +
s->capture_count * sizeof(capture[0]) * 2 +
s->stack_size_max * sizeof(stack_buf[0]);
s->state_stack = NULL;
s->state_stack_len = 0;
s->state_stack_size = 0;
for(i = 0; i < s->capture_count * 2; i++)
capture[i] = NULL;
alloca_size = s->stack_size_max * sizeof(stack_buf[0]);
stack_buf = alloca(alloca_size);
ret = lre_exec_backtrack(s, capture, stack_buf, 0, bc_buf + RE_HEADER_LEN,
cbuf + (cindex << cbuf_type), FALSE);
lre_realloc(s->opaque, s->state_stack, 0);
return ret;
} | O0 | c | lre_exec:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
callq 0xfc9f0
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x84(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x84(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl -0x20(%rbp), %eax
movl -0x24(%rbp), %ecx
shll %cl, %eax
movq -0xa0(%rbp), %rcx
cltq
addq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x24(%rbp), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x80(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jne 0xfcb07
movq -0x80(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0xfcb07
movq -0x80(%rbp), %rax
movl $0x2, 0x10(%rax)
movq 0x10(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x80(%rbp), %rax
movslq 0x14(%rax), %rcx
shlq $0x3, %rcx
shlq %rcx
addq $0x20, %rcx
movq -0x80(%rbp), %rax
movslq 0x18(%rax), %rax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x80(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x80(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x80(%rbp), %rax
movq $0x0, 0x40(%rax)
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
movq -0x80(%rbp), %rcx
movl 0x14(%rcx), %ecx
shll %ecx
cmpl %ecx, %eax
jge 0xfcba2
movq -0x8(%rbp), %rax
movslq -0x88(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0xfcb6b
movq -0x80(%rbp), %rax
movl 0x18(%rax), %eax
shll $0x3, %eax
movl %eax, -0x8c(%rbp)
movslq -0x8c(%rbp), %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x98(%rbp)
movq -0x80(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x98(%rbp), %rdx
movq -0x10(%rbp), %r8
addq $0x8, %r8
movq -0x18(%rbp), %r9
movl -0x1c(%rbp), %eax
movl -0x24(%rbp), %ecx
shll %cl, %eax
cltq
addq %rax, %r9
xorl %ecx, %ecx
subq $0x10, %rsp
movl $0x0, (%rsp)
callq 0xfcc40
addq $0x10, %rsp
movl %eax, -0x90(%rbp)
movq -0x80(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x80(%rbp), %rax
movq 0x38(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x4ca60
movl -0x90(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax)
| lre_exec:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_20], r8d
mov [rbp+var_24], r9d
lea rax, [rbp+var_78]
mov [rbp+var_80], rax
mov rdi, [rbp+var_10]
call lre_get_flags
mov [rbp+var_84], eax
mov eax, [rbp+var_84]
and eax, 4
cmp eax, 0
setnz al
and al, 1
movzx ecx, al
mov rax, [rbp+var_80]
mov [rax+1Ch], ecx
mov eax, [rbp+var_84]
and eax, 2
cmp eax, 0
setnz al
and al, 1
movzx ecx, al
mov rax, [rbp+var_80]
mov [rax+20h], ecx
mov eax, [rbp+var_84]
and eax, 10h
cmp eax, 0
setnz al
and al, 1
movzx ecx, al
mov rax, [rbp+var_80]
mov [rax+24h], ecx
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+2]
mov rax, [rbp+var_80]
mov [rax+14h], ecx
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+3]
mov rax, [rbp+var_80]
mov [rax+18h], ecx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_80]
mov [rax], rcx
mov rax, [rbp+var_18]
mov [rbp+var_A0], rax
mov eax, [rbp+var_20]
mov ecx, [rbp+var_24]
shl eax, cl
mov rcx, [rbp+var_A0]
cdqe
add rcx, rax
mov rax, [rbp+var_80]
mov [rax+8], rcx
mov ecx, [rbp+var_24]
mov rax, [rbp+var_80]
mov [rax+10h], ecx
mov rax, [rbp+var_80]
cmp dword ptr [rax+10h], 1
jnz short loc_FCB07
mov rax, [rbp+var_80]
cmp dword ptr [rax+24h], 0
jz short loc_FCB07
mov rax, [rbp+var_80]
mov dword ptr [rax+10h], 2
loc_FCB07:
mov rcx, [rbp+arg_0]
mov rax, [rbp+var_80]
mov [rax+28h], rcx
mov rax, [rbp+var_80]
movsxd rcx, dword ptr [rax+14h]
shl rcx, 3
shl rcx, 1
add rcx, 20h ; ' '
mov rax, [rbp+var_80]
movsxd rax, dword ptr [rax+18h]
shl rax, 3
add rcx, rax
mov rax, [rbp+var_80]
mov [rax+30h], rcx
mov rax, [rbp+var_80]
mov qword ptr [rax+38h], 0
mov rax, [rbp+var_80]
mov qword ptr [rax+48h], 0
mov rax, [rbp+var_80]
mov qword ptr [rax+40h], 0
mov [rbp+var_88], 0
loc_FCB6B:
mov eax, [rbp+var_88]
mov rcx, [rbp+var_80]
mov ecx, [rcx+14h]
shl ecx, 1
cmp eax, ecx
jge short loc_FCBA2
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_88]
mov qword ptr [rax+rcx*8], 0
mov eax, [rbp+var_88]
add eax, 1
mov [rbp+var_88], eax
jmp short loc_FCB6B
loc_FCBA2:
mov rax, [rbp+var_80]
mov eax, [rax+18h]
shl eax, 3
mov [rbp+var_8C], eax
movsxd rcx, [rbp+var_8C]
add rcx, 0Fh
and rcx, 0FFFFFFFFFFFFFFF0h
mov rax, rsp
sub rax, rcx
mov rsp, rax
mov [rbp+var_98], rax
mov rdi, [rbp+var_80]
mov rsi, [rbp+var_8]
mov rdx, [rbp+var_98]
mov r8, [rbp+var_10]
add r8, 8
mov r9, [rbp+var_18]
mov eax, [rbp+var_1C]
mov ecx, [rbp+var_24]
shl eax, cl
cdqe
add r9, rax
xor ecx, ecx
sub rsp, 10h
mov [rsp+0B0h+var_B0], 0
call lre_exec_backtrack
add rsp, 10h
mov [rbp+var_90], eax
mov rax, [rbp+var_80]
mov rdi, [rax+28h]
mov rax, [rbp+var_80]
mov rsi, [rax+38h]
xor eax, eax
mov edx, eax
call lre_realloc
mov eax, [rbp+var_90]
mov rsp, rbp
pop rbp
retn
| long long lre_exec(long long a1, long long a2, long long a3, int a4, int a5, int a6, long long a7)
{
long long v8; // [rsp+10h] [rbp-A0h] BYREF
char *v9; // [rsp+18h] [rbp-98h]
unsigned int v10; // [rsp+20h] [rbp-90h]
int v11; // [rsp+24h] [rbp-8Ch]
int i; // [rsp+28h] [rbp-88h]
int flags; // [rsp+2Ch] [rbp-84h]
_QWORD *v14; // [rsp+30h] [rbp-80h]
_QWORD v15[2]; // [rsp+38h] [rbp-78h] BYREF
int v16; // [rsp+48h] [rbp-68h]
int v17; // [rsp+4Ch] [rbp-64h]
int v18; // [rsp+50h] [rbp-60h]
BOOL v19; // [rsp+54h] [rbp-5Ch]
BOOL v20; // [rsp+58h] [rbp-58h]
BOOL v21; // [rsp+5Ch] [rbp-54h]
int v22; // [rsp+8Ch] [rbp-24h]
int v23; // [rsp+90h] [rbp-20h]
int v24; // [rsp+94h] [rbp-1Ch]
long long v25; // [rsp+98h] [rbp-18h]
long long v26; // [rsp+A0h] [rbp-10h]
long long v27; // [rsp+A8h] [rbp-8h]
v27 = a1;
v26 = a2;
v25 = a3;
v24 = a4;
v23 = a5;
v22 = a6;
v14 = v15;
flags = lre_get_flags(a2);
v19 = (flags & 4) != 0;
v20 = (flags & 2) != 0;
v21 = (flags & 0x10) != 0;
v17 = *(unsigned __int8 *)(v26 + 2);
v18 = *(unsigned __int8 *)(v26 + 3);
v15[0] = v25;
v8 = v25;
v15[1] = (v23 << v22) + v25;
v16 = v22;
if ( v22 == 1 && *((_DWORD *)v14 + 9) )
*((_DWORD *)v14 + 4) = 2;
v14[5] = a7;
v14[6] = 8LL * *((int *)v14 + 6) + 16LL * *((int *)v14 + 5) + 32;
v14[7] = 0LL;
v14[9] = 0LL;
v14[8] = 0LL;
for ( i = 0; i < 2 * *((_DWORD *)v14 + 5); ++i )
*(_QWORD *)(v27 + 8LL * i) = 0LL;
v11 = 8 * *((_DWORD *)v14 + 6);
v9 = (char *)&v8 - ((v11 + 15LL) & 0xFFFFFFFFFFFFFFF0LL);
v10 = lre_exec_backtrack((_DWORD)v14, v27, (_DWORD)v9, 0, (int)v26 + 8, (v24 << v22) + (int)v25, 0);
lre_realloc(v14[5], v14[7], 0LL);
return v10;
}
| lre_exec:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV dword ptr [RBP + -0x20],R8D
MOV dword ptr [RBP + -0x24],R9D
LEA RAX,[RBP + -0x78]
MOV qword ptr [RBP + -0x80],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001fc9f0
MOV dword ptr [RBP + -0x84],EAX
MOV EAX,dword ptr [RBP + -0x84]
AND EAX,0x4
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX ECX,AL
MOV RAX,qword ptr [RBP + -0x80]
MOV dword ptr [RAX + 0x1c],ECX
MOV EAX,dword ptr [RBP + -0x84]
AND EAX,0x2
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX ECX,AL
MOV RAX,qword ptr [RBP + -0x80]
MOV dword ptr [RAX + 0x20],ECX
MOV EAX,dword ptr [RBP + -0x84]
AND EAX,0x10
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX ECX,AL
MOV RAX,qword ptr [RBP + -0x80]
MOV dword ptr [RAX + 0x24],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x2]
MOV RAX,qword ptr [RBP + -0x80]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x3]
MOV RAX,qword ptr [RBP + -0x80]
MOV dword ptr [RAX + 0x18],ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0xa0],RAX
MOV EAX,dword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x24]
SHL EAX,CL
MOV RCX,qword ptr [RBP + -0xa0]
CDQE
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RAX + 0x8],RCX
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x80]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x80]
CMP dword ptr [RAX + 0x10],0x1
JNZ 0x001fcb07
MOV RAX,qword ptr [RBP + -0x80]
CMP dword ptr [RAX + 0x24],0x0
JZ 0x001fcb07
MOV RAX,qword ptr [RBP + -0x80]
MOV dword ptr [RAX + 0x10],0x2
LAB_001fcb07:
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x80]
MOVSXD RCX,dword ptr [RAX + 0x14]
SHL RCX,0x3
SHL RCX,0x1
ADD RCX,0x20
MOV RAX,qword ptr [RBP + -0x80]
MOVSXD RAX,dword ptr [RAX + 0x18]
SHL RAX,0x3
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RAX + 0x30],RCX
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RAX + 0x38],0x0
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RAX + 0x48],0x0
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RAX + 0x40],0x0
MOV dword ptr [RBP + -0x88],0x0
LAB_001fcb6b:
MOV EAX,dword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x14]
SHL ECX,0x1
CMP EAX,ECX
JGE 0x001fcba2
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x88]
MOV qword ptr [RAX + RCX*0x8],0x0
MOV EAX,dword ptr [RBP + -0x88]
ADD EAX,0x1
MOV dword ptr [RBP + -0x88],EAX
JMP 0x001fcb6b
LAB_001fcba2:
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x18]
SHL EAX,0x3
MOV dword ptr [RBP + -0x8c],EAX
MOVSXD RCX,dword ptr [RBP + -0x8c]
ADD RCX,0xf
AND RCX,-0x10
MOV RAX,RSP
SUB RAX,RCX
MOV RSP,RAX
MOV qword ptr [RBP + -0x98],RAX
MOV RDI,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x98]
MOV R8,qword ptr [RBP + -0x10]
ADD R8,0x8
MOV R9,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,dword ptr [RBP + -0x24]
SHL EAX,CL
CDQE
ADD R9,RAX
XOR ECX,ECX
SUB RSP,0x10
MOV dword ptr [RSP],0x0
CALL 0x001fcc40
ADD RSP,0x10
MOV dword ptr [RBP + -0x90],EAX
MOV RAX,qword ptr [RBP + -0x80]
MOV RDI,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RAX + 0x38]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0014ca60
MOV EAX,dword ptr [RBP + -0x90]
MOV RSP,RBP
POP RBP
RET
|
int4
lre_exec(long param_1,long param_2,long param_3,int param_4,int param_5,int4 param_6,
long param_7)
{
long lVar1;
long lVar2;
long *plVar3;
long lVar4;
long lVar5;
int8 uStack_c0;
int4 auStack_b8 [2];
int8 uStack_b0;
long local_a8;
long local_a0;
int4 local_98;
int local_94;
int local_90;
uint local_8c;
long *local_88;
long local_80 [10];
int4 local_2c;
int local_28;
int local_24;
long local_20;
long local_18;
long local_10;
local_88 = local_80;
uStack_b0 = 0x1fca37;
local_2c = param_6;
local_28 = param_5;
local_24 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_8c = lre_get_flags(param_2);
*(uint *)((long)local_88 + 0x1c) = (uint)((local_8c & 4) != 0);
*(uint *)(local_88 + 4) = (uint)((local_8c & 2) != 0);
*(uint *)((long)local_88 + 0x24) = (uint)((local_8c & 0x10) != 0);
*(uint *)((long)local_88 + 0x14) = (uint)*(byte *)(local_18 + 2);
*(uint *)(local_88 + 3) = (uint)*(byte *)(local_18 + 3);
*local_88 = local_20;
local_a8 = local_20;
local_88[1] = local_20 + (local_28 << ((byte)local_2c & 0x1f));
*(int4 *)(local_88 + 2) = local_2c;
if (((int)local_88[2] == 1) && (*(int *)((long)local_88 + 0x24) != 0)) {
*(int4 *)(local_88 + 2) = 2;
}
plVar3 = local_88;
local_88[5] = param_7;
local_88[6] = (long)*(int *)((long)local_88 + 0x14) * 0x10 + 0x20 + (long)(int)local_88[3] * 8;
local_88[7] = 0;
local_88[9] = 0;
local_88[8] = 0;
lVar1 = local_10;
for (local_90 = 0;
SBORROW4(local_90,*(int *)((long)local_88 + 0x14) * 2) !=
local_90 + *(int *)((long)local_88 + 0x14) * -2 < 0; local_90 = local_90 + 1) {
*(int8 *)(local_10 + (long)local_90 * 8) = 0;
}
local_94 = (int)local_88[3] << 3;
lVar2 = -((long)local_94 + 0xfU & 0xfffffffffffffff0);
lVar4 = local_18 + 8;
lVar5 = local_20 + (local_24 << ((byte)local_2c & 0x1f));
local_a0 = (long)&local_a8 + lVar2;
*(int4 *)((long)auStack_b8 + lVar2) = 0;
*(int8 *)((long)&uStack_c0 + lVar2) = 0x1fcc0b;
local_98 = lre_exec_backtrack(plVar3,lVar1,(long)&local_a8 + lVar2,0,lVar4,lVar5);
lVar1 = local_88[5];
lVar4 = local_88[7];
*(int8 *)((long)&uStack_b0 + lVar2) = 0x1fcc2e;
lre_realloc(lVar1,lVar4,0);
return local_98;
}
| |
52,582 | lre_exec | bluesky950520[P]quickjs/libregexp.c | int lre_exec(uint8_t **capture,
const uint8_t *bc_buf, const uint8_t *cbuf, int cindex, int clen,
int cbuf_type, void *opaque)
{
REExecContext s_s, *s = &s_s;
int re_flags, i, alloca_size, ret;
StackInt *stack_buf;
re_flags = lre_get_flags(bc_buf);
s->multi_line = (re_flags & LRE_FLAG_MULTILINE) != 0;
s->ignore_case = (re_flags & LRE_FLAG_IGNORECASE) != 0;
s->is_unicode = (re_flags & LRE_FLAG_UNICODE) != 0;
s->capture_count = bc_buf[RE_HEADER_CAPTURE_COUNT];
s->stack_size_max = bc_buf[RE_HEADER_STACK_SIZE];
s->cbuf = cbuf;
s->cbuf_end = cbuf + (clen << cbuf_type);
s->cbuf_type = cbuf_type;
if (s->cbuf_type == 1 && s->is_unicode)
s->cbuf_type = 2;
s->opaque = opaque;
s->state_size = sizeof(REExecState) +
s->capture_count * sizeof(capture[0]) * 2 +
s->stack_size_max * sizeof(stack_buf[0]);
s->state_stack = NULL;
s->state_stack_len = 0;
s->state_stack_size = 0;
for(i = 0; i < s->capture_count * 2; i++)
capture[i] = NULL;
alloca_size = s->stack_size_max * sizeof(stack_buf[0]);
stack_buf = alloca(alloca_size);
ret = lre_exec_backtrack(s, capture, stack_buf, 0, bc_buf + RE_HEADER_LEN,
cbuf + (cindex << cbuf_type), FALSE);
lre_realloc(s->opaque, s->state_stack, 0);
return ret;
} | O1 | c | lre_exec:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, %r13d
movl %ecx, %ebx
movq %rdx, %r11
movq %rsi, %r14
movq %rdi, %r9
movq 0x10(%rbp), %rax
movzwl (%rsi), %edx
movl %edx, %ecx
shrl $0x2, %ecx
andl $0x1, %ecx
movl %ecx, -0x64(%rbp)
movl %edx, %esi
shrl %esi
andl $0x1, %esi
movl %r13d, %ecx
shll %cl, %r8d
movl %esi, -0x60(%rbp)
shrl $0x4, %edx
movslq %r8d, %rsi
addq %r11, %rsi
andl $0x1, %edx
movl $0x2, %edi
cmovel %r13d, %edi
movl %edx, -0x5c(%rbp)
cmpl $0x1, %r13d
cmovnel %r13d, %edi
movzbl 0x2(%r14), %ecx
movl %ecx, %edx
shll $0x4, %edx
movl %ecx, -0x6c(%rbp)
movzbl 0x3(%r14), %r15d
movl %r15d, -0x68(%rbp)
movq %r11, -0x80(%rbp)
movq %rsi, -0x78(%rbp)
movl %edi, -0x70(%rbp)
movq %rax, -0x58(%rbp)
leaq 0x20(%rdx,%r15,8), %rax
movq %rax, -0x50(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
testl %ecx, %ecx
je 0x941b9
leal -0x2(,%rcx,2), %eax
leaq 0x10(,%rax,8), %rdx
movq %r9, %rdi
xorl %esi, %esi
movq %r9, %r12
movq %r11, -0x30(%rbp)
callq 0xe340
movq -0x30(%rbp), %r11
movq %r12, %r9
leal 0xf(,%r15,8), %eax
andl $-0x10, %eax
movq %rsp, %rdx
subq %rax, %rdx
movq %rdx, %rsp
movl %r13d, %ecx
shll %cl, %ebx
addq $0x8, %r14
movslq %ebx, %rax
addq %rax, %r11
subq $0x8, %rsp
leaq -0x80(%rbp), %r12
movq %r12, %rdi
movq %r9, %rsi
xorl %ecx, %ecx
movq %r14, %r8
movq %r11, %r9
pushq $0x0
callq 0x94222
addq $0x10, %rsp
movq %rax, %rbx
movq 0x28(%r12), %rdi
movq 0x38(%r12), %rsi
xorl %edx, %edx
callq 0x32936
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| lre_exec:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r13d, r9d
mov ebx, ecx
mov r11, rdx
mov r14, rsi
mov r9, rdi
mov rax, [rbp+arg_0]
movzx edx, word ptr [rsi]
mov ecx, edx
shr ecx, 2
and ecx, 1
mov [rbp+var_64], ecx
mov esi, edx
shr esi, 1
and esi, 1
mov ecx, r13d
shl r8d, cl
mov [rbp+var_60], esi
shr edx, 4
movsxd rsi, r8d
add rsi, r11
and edx, 1
mov edi, 2
cmovz edi, r13d
mov [rbp+var_5C], edx
cmp r13d, 1
cmovnz edi, r13d
movzx ecx, byte ptr [r14+2]
mov edx, ecx
shl edx, 4
mov [rbp+var_6C], ecx
movzx r15d, byte ptr [r14+3]
mov [rbp+var_68], r15d
mov [rbp+var_80], r11
mov [rbp+var_78], rsi
mov [rbp+var_70], edi
mov [rbp+var_58], rax
lea rax, [rdx+r15*8+20h]
mov [rbp+var_50], rax
xorps xmm0, xmm0
movups [rbp+var_48], xmm0
mov [rbp+var_38], 0
test ecx, ecx
jz short loc_941B9
lea eax, ds:0FFFFFFFFFFFFFFFEh[rcx*2]
lea rdx, ds:10h[rax*8]
mov rdi, r9
xor esi, esi
mov r12, r9
mov [rbp+var_30], r11
call _memset
mov r11, [rbp+var_30]
mov r9, r12
loc_941B9:
lea eax, ds:0Fh[r15*8]
and eax, 0FFFFFFF0h
mov rdx, rsp
sub rdx, rax
mov rsp, rdx
mov ecx, r13d
shl ebx, cl
add r14, 8
movsxd rax, ebx
add r11, rax
sub rsp, 8
lea r12, [rbp+var_80]
mov rdi, r12
mov rsi, r9
xor ecx, ecx
mov r8, r14
mov r9, r11
push 0
call lre_exec_backtrack
add rsp, 10h
mov rbx, rax
mov rdi, [r12+28h]
mov rsi, [r12+38h]
xor edx, edx
call lre_realloc
mov eax, ebx
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long lre_exec(long long a1, unsigned __int16 *a2, long long a3, int a4, int a5, int a6, long long a7)
{
unsigned int v11; // edx
int v12; // r8d
int v13; // edx
int v14; // edi
int v15; // ecx
long long v16; // r15
int v17; // r12d
unsigned int v18; // ebx
_QWORD v20[2]; // [rsp+0h] [rbp-80h] BYREF
int v21; // [rsp+10h] [rbp-70h]
int v22; // [rsp+14h] [rbp-6Ch]
int v23; // [rsp+18h] [rbp-68h]
int v24; // [rsp+1Ch] [rbp-64h]
int v25; // [rsp+20h] [rbp-60h]
int v26; // [rsp+24h] [rbp-5Ch]
long long v27; // [rsp+28h] [rbp-58h]
long long v28; // [rsp+30h] [rbp-50h]
__int128 v29; // [rsp+38h] [rbp-48h]
long long v30; // [rsp+48h] [rbp-38h]
long long v31; // [rsp+50h] [rbp-30h]
v11 = *a2;
v24 = (v11 >> 2) & 1;
v12 = a5 << a6;
v25 = (v11 >> 1) & 1;
v13 = (v11 >> 4) & 1;
v14 = 2;
if ( !v13 )
v14 = a6;
v26 = v13;
if ( a6 != 1 )
v14 = a6;
v15 = *((unsigned __int8 *)a2 + 2);
v22 = v15;
v16 = *((unsigned __int8 *)a2 + 3);
v23 = *((unsigned __int8 *)a2 + 3);
v20[0] = a3;
v20[1] = a3 + v12;
v21 = v14;
v27 = a7;
v28 = (unsigned int)(16 * v15) + 8 * v16 + 32;
v29 = 0LL;
v30 = 0LL;
if ( v15 )
{
v17 = a1;
v31 = a3;
memset(a1, 0LL, 8LL * (unsigned int)(2 * v15 - 2) + 16);
LODWORD(a3) = v31;
LODWORD(a1) = v17;
}
v18 = lre_exec_backtrack(
(unsigned int)v20,
a1,
(unsigned int)v20 - ((8 * v16 + 15) & 0xFFFFFFF0),
0,
(int)a2 + 8,
(a4 << a6) + (int)a3,
0);
lre_realloc(v27, v29, 0LL);
return v18;
}
| lre_exec:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R13D,R9D
MOV EBX,ECX
MOV R11,RDX
MOV R14,RSI
MOV R9,RDI
MOV RAX,qword ptr [RBP + 0x10]
MOVZX EDX,word ptr [RSI]
MOV ECX,EDX
SHR ECX,0x2
AND ECX,0x1
MOV dword ptr [RBP + -0x64],ECX
MOV ESI,EDX
SHR ESI,0x1
AND ESI,0x1
MOV ECX,R13D
SHL R8D,CL
MOV dword ptr [RBP + -0x60],ESI
SHR EDX,0x4
MOVSXD RSI,R8D
ADD RSI,R11
AND EDX,0x1
MOV EDI,0x2
CMOVZ EDI,R13D
MOV dword ptr [RBP + -0x5c],EDX
CMP R13D,0x1
CMOVNZ EDI,R13D
MOVZX ECX,byte ptr [R14 + 0x2]
MOV EDX,ECX
SHL EDX,0x4
MOV dword ptr [RBP + -0x6c],ECX
MOVZX R15D,byte ptr [R14 + 0x3]
MOV dword ptr [RBP + -0x68],R15D
MOV qword ptr [RBP + -0x80],R11
MOV qword ptr [RBP + -0x78],RSI
MOV dword ptr [RBP + -0x70],EDI
MOV qword ptr [RBP + -0x58],RAX
LEA RAX,[RDX + R15*0x8 + 0x20]
MOV qword ptr [RBP + -0x50],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBP + -0x48],XMM0
MOV qword ptr [RBP + -0x38],0x0
TEST ECX,ECX
JZ 0x001941b9
LEA EAX,[-0x2 + RCX*0x2]
LEA RDX,[0x10 + RAX*0x8]
MOV RDI,R9
XOR ESI,ESI
MOV R12,R9
MOV qword ptr [RBP + -0x30],R11
CALL 0x0010e340
MOV R11,qword ptr [RBP + -0x30]
MOV R9,R12
LAB_001941b9:
LEA EAX,[0xf + R15*0x8]
AND EAX,0xfffffff0
MOV RDX,RSP
SUB RDX,RAX
MOV RSP,RDX
MOV ECX,R13D
SHL EBX,CL
ADD R14,0x8
MOVSXD RAX,EBX
ADD R11,RAX
SUB RSP,0x8
LEA R12,[RBP + -0x80]
MOV RDI,R12
MOV RSI,R9
XOR ECX,ECX
MOV R8,R14
MOV R9,R11
PUSH 0x0
CALL 0x00194222
ADD RSP,0x10
MOV RBX,RAX
MOV RDI,qword ptr [R12 + 0x28]
MOV RSI,qword ptr [R12 + 0x38]
XOR EDX,EDX
CALL 0x00132936
MOV EAX,EBX
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
lre_exec(void *param_1,ushort *param_2,long param_3,int param_4,int param_5,int param_6,
int8 param_7)
{
byte bVar1;
byte bVar2;
ushort uVar3;
long lVar4;
int8 uVar5;
int8 uVar6;
int4 uVar7;
int8 auStack_a0 [3];
long local_88;
long local_80;
int local_78;
uint local_74;
uint local_70;
uint local_6c;
uint local_68;
uint local_64;
int8 local_60;
long local_58;
int8 local_50;
int8 uStack_48;
int8 local_40;
long local_38;
uVar3 = *param_2;
local_6c = uVar3 >> 2 & 1;
local_68 = uVar3 >> 1 & 1;
local_80 = (param_5 << ((byte)param_6 & 0x1f)) + param_3;
local_64 = uVar3 >> 4 & 1;
local_78 = 2;
if ((uVar3 >> 4 & 1) == 0) {
local_78 = param_6;
}
if (param_6 != 1) {
local_78 = param_6;
}
bVar1 = (byte)param_2[1];
local_74 = (uint)bVar1;
bVar2 = *(byte *)((long)param_2 + 3);
local_70 = (uint)bVar2;
local_60 = param_7;
local_58 = (ulong)bVar1 * 0x10 + 0x20 + (ulong)bVar2 * 8;
local_50 = 0;
uStack_48 = 0;
local_40 = 0;
local_88 = param_3;
if (bVar1 != 0) {
auStack_a0[2] = 0x1941b2;
local_38 = param_3;
memset(param_1,0,(ulong)((uint)bVar1 * 2 - 2) * 8 + 0x10);
param_3 = local_38;
}
lVar4 = -(ulong)((uint)bVar2 * 8 + 0xf & 0xfffffff0);
*(int8 *)((long)auStack_a0 + lVar4 + 8) = 0;
*(int8 *)((long)auStack_a0 + lVar4) = 0x1941f9;
uVar7 = lre_exec_backtrack(&local_88,param_1,(long)&local_88 + lVar4,0,param_2 + 4,
param_3 + (param_4 << ((byte)param_6 & 0x1f)));
uVar6 = local_50;
uVar5 = local_60;
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x194211;
lre_realloc(uVar5,uVar6,0);
return uVar7;
}
| |
52,583 | lre_exec | bluesky950520[P]quickjs/libregexp.c | int lre_exec(uint8_t **capture,
const uint8_t *bc_buf, const uint8_t *cbuf, int cindex, int clen,
int cbuf_type, void *opaque)
{
REExecContext s_s, *s = &s_s;
int re_flags, i, alloca_size, ret;
StackInt *stack_buf;
re_flags = lre_get_flags(bc_buf);
s->multi_line = (re_flags & LRE_FLAG_MULTILINE) != 0;
s->ignore_case = (re_flags & LRE_FLAG_IGNORECASE) != 0;
s->is_unicode = (re_flags & LRE_FLAG_UNICODE) != 0;
s->capture_count = bc_buf[RE_HEADER_CAPTURE_COUNT];
s->stack_size_max = bc_buf[RE_HEADER_STACK_SIZE];
s->cbuf = cbuf;
s->cbuf_end = cbuf + (clen << cbuf_type);
s->cbuf_type = cbuf_type;
if (s->cbuf_type == 1 && s->is_unicode)
s->cbuf_type = 2;
s->opaque = opaque;
s->state_size = sizeof(REExecState) +
s->capture_count * sizeof(capture[0]) * 2 +
s->stack_size_max * sizeof(stack_buf[0]);
s->state_stack = NULL;
s->state_stack_len = 0;
s->state_stack_size = 0;
for(i = 0; i < s->capture_count * 2; i++)
capture[i] = NULL;
alloca_size = s->stack_size_max * sizeof(stack_buf[0]);
stack_buf = alloca(alloca_size);
ret = lre_exec_backtrack(s, capture, stack_buf, 0, bc_buf + RE_HEADER_LEN,
cbuf + (cindex << cbuf_type), FALSE);
lre_realloc(s->opaque, s->state_stack, 0);
return ret;
} | O3 | c | lre_exec:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, %r13d
movl %ecx, %ebx
movq %rdx, %r11
movq %rsi, %r14
movq %rdi, %r9
movq 0x10(%rbp), %rax
movzwl (%rsi), %edx
movl %edx, %ecx
shrl $0x2, %ecx
andl $0x1, %ecx
movl %ecx, -0x64(%rbp)
movl %edx, %esi
shrl %esi
andl $0x1, %esi
movl %r13d, %ecx
shll %cl, %r8d
movl %esi, -0x60(%rbp)
shrl $0x4, %edx
movslq %r8d, %rsi
addq %r11, %rsi
andl $0x1, %edx
movl $0x2, %edi
cmovel %r13d, %edi
movl %edx, -0x5c(%rbp)
cmpl $0x1, %r13d
cmovnel %r13d, %edi
movzbl 0x2(%r14), %ecx
movl %ecx, %edx
shll $0x4, %edx
movl %ecx, -0x6c(%rbp)
movzbl 0x3(%r14), %r15d
movl %r15d, -0x68(%rbp)
movq %r11, -0x80(%rbp)
movq %rsi, -0x78(%rbp)
movl %edi, -0x70(%rbp)
movq %rax, -0x58(%rbp)
leaq 0x20(%rdx,%r15,8), %rax
movq %rax, -0x50(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
testl %ecx, %ecx
je 0x96c96
leal -0x2(,%rcx,2), %eax
leaq 0x10(,%rax,8), %rdx
movq %r9, %rdi
xorl %esi, %esi
movq %r9, %r12
movq %r11, -0x30(%rbp)
callq 0xe340
movq -0x30(%rbp), %r11
movq %r12, %r9
leal 0xf(,%r15,8), %eax
andl $-0x10, %eax
movq %rsp, %rdx
subq %rax, %rdx
movq %rdx, %rsp
movl %r13d, %ecx
shll %cl, %ebx
addq $0x8, %r14
movslq %ebx, %rax
addq %rax, %r11
subq $0x8, %rsp
leaq -0x80(%rbp), %r12
movq %r12, %rdi
movq %r9, %rsi
xorl %ecx, %ecx
movq %r14, %r8
movq %r11, %r9
pushq $0x0
callq 0x96cff
addq $0x10, %rsp
movq %rax, %rbx
movq 0x28(%r12), %rdi
movq 0x38(%r12), %rsi
xorl %edx, %edx
callq 0x3375b
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| lre_exec:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r13d, r9d
mov ebx, ecx
mov r11, rdx
mov r14, rsi
mov r9, rdi
mov rax, [rbp+arg_0]
movzx edx, word ptr [rsi]
mov ecx, edx
shr ecx, 2
and ecx, 1
mov [rbp+var_64], ecx
mov esi, edx
shr esi, 1
and esi, 1
mov ecx, r13d
shl r8d, cl
mov [rbp+var_60], esi
shr edx, 4
movsxd rsi, r8d
add rsi, r11
and edx, 1
mov edi, 2
cmovz edi, r13d
mov [rbp+var_5C], edx
cmp r13d, 1
cmovnz edi, r13d
movzx ecx, byte ptr [r14+2]
mov edx, ecx
shl edx, 4
mov [rbp+var_6C], ecx
movzx r15d, byte ptr [r14+3]
mov [rbp+var_68], r15d
mov [rbp+var_80], r11
mov [rbp+var_78], rsi
mov [rbp+var_70], edi
mov [rbp+var_58], rax
lea rax, [rdx+r15*8+20h]
mov [rbp+var_50], rax
xorps xmm0, xmm0
movups [rbp+var_48], xmm0
mov [rbp+var_38], 0
test ecx, ecx
jz short loc_96C96
lea eax, ds:0FFFFFFFFFFFFFFFEh[rcx*2]
lea rdx, ds:10h[rax*8]
mov rdi, r9
xor esi, esi
mov r12, r9
mov [rbp+var_30], r11
call _memset
mov r11, [rbp+var_30]
mov r9, r12
loc_96C96:
lea eax, ds:0Fh[r15*8]
and eax, 0FFFFFFF0h
mov rdx, rsp
sub rdx, rax
mov rsp, rdx
mov ecx, r13d
shl ebx, cl
add r14, 8
movsxd rax, ebx
add r11, rax
sub rsp, 8
lea r12, [rbp+var_80]
mov rdi, r12
mov rsi, r9
xor ecx, ecx
mov r8, r14
mov r9, r11
push 0
call lre_exec_backtrack
add rsp, 10h
mov rbx, rax
mov rdi, [r12+28h]
mov rsi, [r12+38h]
xor edx, edx
call lre_realloc
mov eax, ebx
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long lre_exec(long long a1, unsigned __int16 *a2, long long a3, int a4, int a5, int a6, long long a7)
{
unsigned int v11; // edx
int v12; // r8d
int v13; // edx
int v14; // edi
int v15; // ecx
long long v16; // r15
int v17; // r12d
unsigned int v18; // ebx
_QWORD v20[2]; // [rsp+0h] [rbp-80h] BYREF
int v21; // [rsp+10h] [rbp-70h]
int v22; // [rsp+14h] [rbp-6Ch]
int v23; // [rsp+18h] [rbp-68h]
int v24; // [rsp+1Ch] [rbp-64h]
int v25; // [rsp+20h] [rbp-60h]
int v26; // [rsp+24h] [rbp-5Ch]
long long v27; // [rsp+28h] [rbp-58h]
long long v28; // [rsp+30h] [rbp-50h]
__int128 v29; // [rsp+38h] [rbp-48h]
long long v30; // [rsp+48h] [rbp-38h]
long long v31; // [rsp+50h] [rbp-30h]
v11 = *a2;
v24 = (v11 >> 2) & 1;
v12 = a5 << a6;
v25 = (v11 >> 1) & 1;
v13 = (v11 >> 4) & 1;
v14 = 2;
if ( !v13 )
v14 = a6;
v26 = v13;
if ( a6 != 1 )
v14 = a6;
v15 = *((unsigned __int8 *)a2 + 2);
v22 = v15;
v16 = *((unsigned __int8 *)a2 + 3);
v23 = *((unsigned __int8 *)a2 + 3);
v20[0] = a3;
v20[1] = a3 + v12;
v21 = v14;
v27 = a7;
v28 = (unsigned int)(16 * v15) + 8 * v16 + 32;
v29 = 0LL;
v30 = 0LL;
if ( v15 )
{
v17 = a1;
v31 = a3;
memset(a1, 0LL, 8LL * (unsigned int)(2 * v15 - 2) + 16);
LODWORD(a3) = v31;
LODWORD(a1) = v17;
}
v18 = lre_exec_backtrack(
(unsigned int)v20,
a1,
(unsigned int)v20 - ((8 * v16 + 15) & 0xFFFFFFF0),
0,
(int)a2 + 8,
(a4 << a6) + (int)a3,
0);
lre_realloc(v27, v29, 0LL);
return v18;
}
| lre_exec:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R13D,R9D
MOV EBX,ECX
MOV R11,RDX
MOV R14,RSI
MOV R9,RDI
MOV RAX,qword ptr [RBP + 0x10]
MOVZX EDX,word ptr [RSI]
MOV ECX,EDX
SHR ECX,0x2
AND ECX,0x1
MOV dword ptr [RBP + -0x64],ECX
MOV ESI,EDX
SHR ESI,0x1
AND ESI,0x1
MOV ECX,R13D
SHL R8D,CL
MOV dword ptr [RBP + -0x60],ESI
SHR EDX,0x4
MOVSXD RSI,R8D
ADD RSI,R11
AND EDX,0x1
MOV EDI,0x2
CMOVZ EDI,R13D
MOV dword ptr [RBP + -0x5c],EDX
CMP R13D,0x1
CMOVNZ EDI,R13D
MOVZX ECX,byte ptr [R14 + 0x2]
MOV EDX,ECX
SHL EDX,0x4
MOV dword ptr [RBP + -0x6c],ECX
MOVZX R15D,byte ptr [R14 + 0x3]
MOV dword ptr [RBP + -0x68],R15D
MOV qword ptr [RBP + -0x80],R11
MOV qword ptr [RBP + -0x78],RSI
MOV dword ptr [RBP + -0x70],EDI
MOV qword ptr [RBP + -0x58],RAX
LEA RAX,[RDX + R15*0x8 + 0x20]
MOV qword ptr [RBP + -0x50],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBP + -0x48],XMM0
MOV qword ptr [RBP + -0x38],0x0
TEST ECX,ECX
JZ 0x00196c96
LEA EAX,[-0x2 + RCX*0x2]
LEA RDX,[0x10 + RAX*0x8]
MOV RDI,R9
XOR ESI,ESI
MOV R12,R9
MOV qword ptr [RBP + -0x30],R11
CALL 0x0010e340
MOV R11,qword ptr [RBP + -0x30]
MOV R9,R12
LAB_00196c96:
LEA EAX,[0xf + R15*0x8]
AND EAX,0xfffffff0
MOV RDX,RSP
SUB RDX,RAX
MOV RSP,RDX
MOV ECX,R13D
SHL EBX,CL
ADD R14,0x8
MOVSXD RAX,EBX
ADD R11,RAX
SUB RSP,0x8
LEA R12,[RBP + -0x80]
MOV RDI,R12
MOV RSI,R9
XOR ECX,ECX
MOV R8,R14
MOV R9,R11
PUSH 0x0
CALL 0x00196cff
ADD RSP,0x10
MOV RBX,RAX
MOV RDI,qword ptr [R12 + 0x28]
MOV RSI,qword ptr [R12 + 0x38]
XOR EDX,EDX
CALL 0x0013375b
MOV EAX,EBX
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
lre_exec(void *param_1,ushort *param_2,long param_3,int param_4,int param_5,int param_6,
int8 param_7)
{
byte bVar1;
byte bVar2;
ushort uVar3;
long lVar4;
int8 uVar5;
int8 uVar6;
int4 uVar7;
int8 auStack_a0 [3];
long local_88;
long local_80;
int local_78;
uint local_74;
uint local_70;
uint local_6c;
uint local_68;
uint local_64;
int8 local_60;
long local_58;
int8 local_50;
int8 uStack_48;
int8 local_40;
long local_38;
uVar3 = *param_2;
local_6c = uVar3 >> 2 & 1;
local_68 = uVar3 >> 1 & 1;
local_80 = (param_5 << ((byte)param_6 & 0x1f)) + param_3;
local_64 = uVar3 >> 4 & 1;
local_78 = 2;
if ((uVar3 >> 4 & 1) == 0) {
local_78 = param_6;
}
if (param_6 != 1) {
local_78 = param_6;
}
bVar1 = (byte)param_2[1];
local_74 = (uint)bVar1;
bVar2 = *(byte *)((long)param_2 + 3);
local_70 = (uint)bVar2;
local_60 = param_7;
local_58 = (ulong)bVar1 * 0x10 + 0x20 + (ulong)bVar2 * 8;
local_50 = 0;
uStack_48 = 0;
local_40 = 0;
local_88 = param_3;
if (bVar1 != 0) {
auStack_a0[2] = 0x196c8f;
local_38 = param_3;
memset(param_1,0,(ulong)((uint)bVar1 * 2 - 2) * 8 + 0x10);
param_3 = local_38;
}
lVar4 = -(ulong)((uint)bVar2 * 8 + 0xf & 0xfffffff0);
*(int8 *)((long)auStack_a0 + lVar4 + 8) = 0;
*(int8 *)((long)auStack_a0 + lVar4) = 0x196cd6;
uVar7 = lre_exec_backtrack(&local_88,param_1,(long)&local_88 + lVar4,0,param_2 + 4,
param_3 + (param_4 << ((byte)param_6 & 0x1f)));
uVar6 = local_50;
uVar5 = local_60;
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x196cee;
lre_realloc(uVar5,uVar6,0);
return uVar7;
}
| |
52,584 | buffer_append | corpus-core[P]colibri-stateless/src/util/bytes.c | uint32_t buffer_append(buffer_t* buffer, bytes_t data) {
if (buffer->allocated < 0 && buffer->data.len + data.len > (uint32_t) (0 - buffer->allocated))
data.len = ((uint32_t) (0 - buffer->allocated)) - buffer->data.len;
if (!data.len) return 0;
buffer_grow(buffer, buffer->data.len + data.len);
if (data.data)
memcpy(buffer->data.data + buffer->data.len, data.data, data.len);
else
memset(buffer->data.data + buffer->data.len, 0, data.len);
buffer->data.len += data.len;
return data.len;
} | O0 | c | buffer_append:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %esi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jge 0x18c15
movq -0x20(%rbp), %rax
movl (%rax), %eax
addl -0x18(%rbp), %eax
movq -0x20(%rbp), %rdx
xorl %ecx, %ecx
subl 0x10(%rdx), %ecx
cmpl %ecx, %eax
jbe 0x18c15
movq -0x20(%rbp), %rcx
xorl %eax, %eax
subl 0x10(%rcx), %eax
movq -0x20(%rbp), %rcx
subl (%rcx), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x18c24
movl $0x0, -0x4(%rbp)
jmp 0x18c90
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
addl -0x18(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x18af0
cmpq $0x0, -0x10(%rbp)
je 0x18c62
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %eax
movl %eax, %edx
callq 0x5060
jmp 0x18c7f
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
addq %rax, %rdi
movl -0x18(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x5110
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| buffer_append:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], esi
mov [rbp+var_10], rdx
mov [rbp+var_20], rdi
mov rax, [rbp+var_20]
cmp dword ptr [rax+10h], 0
jge short loc_18C15
mov rax, [rbp+var_20]
mov eax, [rax]
add eax, [rbp+var_18]
mov rdx, [rbp+var_20]
xor ecx, ecx
sub ecx, [rdx+10h]
cmp eax, ecx
jbe short loc_18C15
mov rcx, [rbp+var_20]
xor eax, eax
sub eax, [rcx+10h]
mov rcx, [rbp+var_20]
sub eax, [rcx]
mov [rbp+var_18], eax
loc_18C15:
cmp [rbp+var_18], 0
jnz short loc_18C24
mov [rbp+var_4], 0
jmp short loc_18C90
loc_18C24:
mov rdi, [rbp+var_20]
mov rax, [rbp+var_20]
mov eax, [rax]
add eax, [rbp+var_18]
mov eax, eax
mov esi, eax
call buffer_grow
cmp [rbp+var_10], 0
jz short loc_18C62
mov rax, [rbp+var_20]
mov rdi, [rax+8]
mov rax, [rbp+var_20]
mov eax, [rax]
add rdi, rax
mov rsi, [rbp+var_10]
mov eax, [rbp+var_18]
mov edx, eax
call _memcpy
jmp short loc_18C7F
loc_18C62:
mov rax, [rbp+var_20]
mov rdi, [rax+8]
mov rax, [rbp+var_20]
mov eax, [rax]
add rdi, rax
mov eax, [rbp+var_18]
mov edx, eax
xor esi, esi
call _memset
loc_18C7F:
mov ecx, [rbp+var_18]
mov rax, [rbp+var_20]
add ecx, [rax]
mov [rax], ecx
mov eax, [rbp+var_18]
mov [rbp+var_4], eax
loc_18C90:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long buffer_append(unsigned int *a1, unsigned int a2, long long a3)
{
unsigned int v4; // [rsp+8h] [rbp-18h]
v4 = a2;
if ( (a1[4] & 0x80000000) != 0 && a2 + *a1 > -a1[4] )
v4 = -a1[4] - *a1;
if ( v4 )
{
buffer_grow((unsigned long long)a1, v4 + *a1);
if ( a3 )
memcpy(*a1 + *((_QWORD *)a1 + 1), a3, v4);
else
memset(*a1 + *((_QWORD *)a1 + 1), 0LL, v4);
*a1 += v4;
return v4;
}
else
{
return 0;
}
}
| buffer_append:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x18],ESI
MOV qword ptr [RBP + -0x10],RDX
MOV qword ptr [RBP + -0x20],RDI
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x10],0x0
JGE 0x00118c15
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
ADD EAX,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
XOR ECX,ECX
SUB ECX,dword ptr [RDX + 0x10]
CMP EAX,ECX
JBE 0x00118c15
MOV RCX,qword ptr [RBP + -0x20]
XOR EAX,EAX
SUB EAX,dword ptr [RCX + 0x10]
MOV RCX,qword ptr [RBP + -0x20]
SUB EAX,dword ptr [RCX]
MOV dword ptr [RBP + -0x18],EAX
LAB_00118c15:
CMP dword ptr [RBP + -0x18],0x0
JNZ 0x00118c24
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00118c90
LAB_00118c24:
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
ADD EAX,dword ptr [RBP + -0x18]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x00118af0
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00118c62
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x18]
MOV EDX,EAX
CALL 0x00105060
JMP 0x00118c7f
LAB_00118c62:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
ADD RDI,RAX
MOV EAX,dword ptr [RBP + -0x18]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x00105110
LAB_00118c7f:
MOV ECX,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
ADD ECX,dword ptr [RAX]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x4],EAX
LAB_00118c90:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
uint buffer_append(uint *param_1,uint param_2,void *param_3)
{
uint local_20;
uint local_c;
local_20 = param_2;
if ((int)param_1[4] < 0) {
if (-param_1[4] < *param_1 + param_2) {
local_20 = -*param_1 - param_1[4];
}
}
if (local_20 == 0) {
local_c = 0;
}
else {
buffer_grow(param_1);
if (param_3 == (void *)0x0) {
memset((void *)(*(long *)(param_1 + 2) + (ulong)*param_1),0,(ulong)local_20);
}
else {
memcpy((void *)(*(long *)(param_1 + 2) + (ulong)*param_1),param_3,(ulong)local_20);
}
*param_1 = local_20 + *param_1;
local_c = local_20;
}
return local_c;
}
| |
52,585 | buffer_append | corpus-core[P]colibri-stateless/src/util/bytes.c | uint32_t buffer_append(buffer_t* buffer, bytes_t data) {
if (buffer->allocated < 0 && buffer->data.len + data.len > (uint32_t) (0 - buffer->allocated))
data.len = ((uint32_t) (0 - buffer->allocated)) - buffer->data.len;
if (!data.len) return 0;
buffer_grow(buffer, buffer->data.len + data.len);
if (data.data)
memcpy(buffer->data.data + buffer->data.len, data.data, data.len);
else
memset(buffer->data.data + buffer->data.len, 0, data.len);
buffer->data.len += data.len;
return data.len;
} | O1 | c | buffer_append:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
movl 0x10(%rdi), %eax
testl %eax, %eax
jns 0x12971
movl (%r14), %ecx
negl %eax
movl %eax, %edx
subl %ecx, %edx
addl %ebx, %ecx
cmpl %eax, %ecx
cmoval %edx, %ebx
testl %ebx, %ebx
je 0x1299a
movl (%r14), %esi
addl %ebx, %esi
movq %r14, %rdi
callq 0x128e1
movl (%r14), %edi
addq 0x8(%r14), %rdi
movl %ebx, %edx
testq %r15, %r15
je 0x1299e
movq %r15, %rsi
callq 0x5060
jmp 0x129a5
xorl %ebx, %ebx
jmp 0x129a8
xorl %esi, %esi
callq 0x5110
addl %ebx, (%r14)
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
| buffer_append:
push r15
push r14
push rbx
mov r15, rdx
mov ebx, esi
mov r14, rdi
mov eax, [rdi+10h]
test eax, eax
jns short loc_12971
mov ecx, [r14]
neg eax
mov edx, eax
sub edx, ecx
add ecx, ebx
cmp ecx, eax
cmova ebx, edx
loc_12971:
test ebx, ebx
jz short loc_1299A
mov esi, [r14]
add esi, ebx
mov rdi, r14
call buffer_grow
mov edi, [r14]
add rdi, [r14+8]
mov edx, ebx
test r15, r15
jz short loc_1299E
mov rsi, r15
call _memcpy
jmp short loc_129A5
loc_1299A:
xor ebx, ebx
jmp short loc_129A8
loc_1299E:
xor esi, esi
call _memset
loc_129A5:
add [r14], ebx
loc_129A8:
mov eax, ebx
pop rbx
pop r14
pop r15
retn
| long long buffer_append(unsigned int *a1, unsigned int a2, long long a3)
{
unsigned int v4; // ebx
int v6; // eax
unsigned int v7; // eax
long long v8; // rdi
v4 = a2;
v6 = a1[4];
if ( v6 < 0 )
{
v7 = -v6;
if ( a2 + *a1 > v7 )
v4 = v7 - *a1;
}
if ( v4 )
{
buffer_grow((long long)a1, v4 + *a1);
v8 = *((_QWORD *)a1 + 1) + *a1;
if ( a3 )
memcpy(v8, a3, v4);
else
memset(v8, 0LL, v4);
*a1 += v4;
}
else
{
return 0;
}
return v4;
}
| buffer_append:
PUSH R15
PUSH R14
PUSH RBX
MOV R15,RDX
MOV EBX,ESI
MOV R14,RDI
MOV EAX,dword ptr [RDI + 0x10]
TEST EAX,EAX
JNS 0x00112971
MOV ECX,dword ptr [R14]
NEG EAX
MOV EDX,EAX
SUB EDX,ECX
ADD ECX,EBX
CMP ECX,EAX
CMOVA EBX,EDX
LAB_00112971:
TEST EBX,EBX
JZ 0x0011299a
MOV ESI,dword ptr [R14]
ADD ESI,EBX
MOV RDI,R14
CALL 0x001128e1
MOV EDI,dword ptr [R14]
ADD RDI,qword ptr [R14 + 0x8]
MOV EDX,EBX
TEST R15,R15
JZ 0x0011299e
MOV RSI,R15
CALL 0x00105060
JMP 0x001129a5
LAB_0011299a:
XOR EBX,EBX
JMP 0x001129a8
LAB_0011299e:
XOR ESI,ESI
CALL 0x00105110
LAB_001129a5:
ADD dword ptr [R14],EBX
LAB_001129a8:
MOV EAX,EBX
POP RBX
POP R14
POP R15
RET
|
uint buffer_append(uint *param_1,uint param_2,void *param_3)
{
uint uVar1;
if ((int)param_1[4] < 0) {
uVar1 = -param_1[4];
if (uVar1 < *param_1 + param_2) {
param_2 = uVar1 - *param_1;
}
}
if (param_2 == 0) {
param_2 = 0;
}
else {
buffer_grow(param_1);
if (param_3 == (void *)0x0) {
memset((void *)((ulong)*param_1 + *(long *)(param_1 + 2)),0,(ulong)param_2);
}
else {
memcpy((void *)((ulong)*param_1 + *(long *)(param_1 + 2)),param_3,(ulong)param_2);
}
*param_1 = *param_1 + param_2;
}
return param_2;
}
| |
52,586 | pfs_lock::set_dirty(pfs_dirty_state*) | eloqsql/storage/perfschema/pfs_lock.h | void set_dirty(pfs_dirty_state *copy_ptr)
{
/* Do not set the version to 0, read the previous value. */
uint32 copy= PFS_atomic::load_u32(&m_version_state);
/* Increment the version, set the DIRTY state */
uint32 new_val= (copy & VERSION_MASK) + VERSION_INC + PFS_LOCK_DIRTY;
PFS_atomic::store_u32(&m_version_state, new_val);
copy_ptr->m_version_state= new_val;
} | O0 | c | pfs_lock::set_dirty(pfs_dirty_state*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x36d00
movq -0x20(%rbp), %rdi
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $-0x4, %eax
addl $0x4, %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %esi
callq 0x36cb0
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN8pfs_lock9set_dirtyEP15pfs_dirty_state:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; this
mov [rbp+var_20], rdi
call _ZN10PFS_atomic8load_u32EPj; PFS_atomic::load_u32(uint *)
mov rdi, [rbp+var_20]; this
mov dword ptr [rbp+var_18+4], eax
mov eax, dword ptr [rbp+var_18+4]
and eax, 0FFFFFFFCh
add eax, 4
add eax, 1
mov dword ptr [rbp+var_18], eax
mov esi, dword ptr [rbp+var_18]; unsigned int *
call _ZN10PFS_atomic9store_u32EPjj; PFS_atomic::store_u32(uint *,uint)
mov ecx, dword ptr [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax], ecx
add rsp, 20h
pop rbp
retn
| unsigned int * pfs_lock::set_dirty(PFS_atomic *a1, unsigned int *a2)
{
unsigned int *result; // rax
unsigned int v3; // [rsp+8h] [rbp-18h]
v3 = (PFS_atomic::load_u32(a1, a2) & 0xFFFFFFFC) + 5;
PFS_atomic::store_u32(a1, (unsigned int *)v3);
result = a2;
*a2 = v3;
return result;
}
| set_dirty:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RDI
CALL 0x00136d00
MOV RDI,qword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0xfffffffc
ADD EAX,0x4
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
MOV ESI,dword ptr [RBP + -0x18]
CALL 0x00136cb0
MOV ECX,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
ADD RSP,0x20
POP RBP
RET
|
/* pfs_lock::set_dirty(pfs_dirty_state*) */
void __thiscall pfs_lock::set_dirty(pfs_lock *this,pfs_dirty_state *param_1)
{
uint uVar1;
uVar1 = PFS_atomic::load_u32((uint *)this);
uVar1 = (uVar1 & 0xfffffffc) + 5;
PFS_atomic::store_u32((uint *)this,uVar1);
*(uint *)param_1 = uVar1;
return;
}
| |
52,587 | dirname_part | eloqsql/mysys/mf_dirname.c | size_t dirname_part(char *to, const char *name, size_t *to_res_length)
{
size_t length;
DBUG_ENTER("dirname_part");
DBUG_PRINT("enter",("'%s'",name));
length=dirname_length(name);
*to_res_length= (size_t) (convert_dirname(to, name, name+length) - to);
DBUG_RETURN(length);
} | O0 | c | dirname_part:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0xdf3f6
movq -0x10(%rbp), %rdi
callq 0xdf360
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq -0x20(%rbp), %rdx
callq 0xdf440
movq %rax, %rcx
movq -0x8(%rbp), %rax
subq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| dirname_part:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_DF3F6:
mov rdi, [rbp+var_10]
call dirname_length
mov [rbp+var_20], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
add rdx, [rbp+var_20]
call convert_dirname
mov rcx, rax
mov rax, [rbp+var_8]
sub rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 30h
pop rbp
retn
| long long dirname_part(long long a1, _BYTE *a2, _QWORD *a3)
{
long long v4; // [rsp+10h] [rbp-20h]
v4 = dirname_length(a2);
*a3 = convert_dirname(a1, a2, &a2[v4]) - a1;
return v4;
}
| dirname_part:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x001df3f6
LAB_001df3f6:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001df360
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,qword ptr [RBP + -0x20]
CALL 0x001df440
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x30
POP RBP
RET
|
long dirname_part(long param_1,long param_2,long *param_3)
{
long lVar1;
long lVar2;
lVar1 = dirname_length(param_2);
lVar2 = convert_dirname(param_1,param_2,param_2 + lVar1);
*param_3 = lVar2 - param_1;
return lVar1;
}
| |
52,588 | alaya::SQ4Space<float, float, unsigned int, alaya::SequentialStorage<unsigned char, unsigned int>>::SQ4Space(unsigned int, unsigned long, alaya::MetricType) | AlayaLite/include/space/sq4_space.hpp | SQ4Space(IDType capacity, size_t dim, MetricType metric)
: capacity_(capacity), dim_(dim), metric_(metric), quantizer_(dim) {
data_size_ = ((dim + 1) / 2) * sizeof(uint8_t);
data_storage_.init(data_size_, capacity);
set_metric_function();
} | O0 | cpp | alaya::SQ4Space<float, float, unsigned int, alaya::SequentialStorage<unsigned char, unsigned int>>::SQ4Space(unsigned int, unsigned long, alaya::MetricType):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq %rdx, 0x30(%rsp)
movl %ecx, 0x2c(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, (%rdi)
movl $0x0, 0x10(%rdi)
movl 0x30(%rsp), %eax
movl %eax, 0x14(%rdi)
movl $0x0, 0x18(%rdi)
movl $0x0, 0x1c(%rdi)
movl 0x3c(%rsp), %eax
movl %eax, 0x20(%rdi)
addq $0x28, %rdi
movq %rdi, (%rsp)
callq 0x28880
movq 0x8(%rsp), %rdi
addq $0x60, %rdi
movq %rdi, 0x10(%rsp)
movl 0x30(%rsp), %eax
movl %eax, 0x28(%rsp)
leaq 0x28(%rsp), %rsi
callq 0x1f800
jmp 0x31158
movq 0x8(%rsp), %rax
movq 0x30(%rsp), %rcx
incq %rcx
shrq %rcx
movl %ecx, 0x10(%rax)
movq %rax, %rdi
addq $0x28, %rdi
movl 0x10(%rax), %eax
movl %eax, %esi
movl 0x3c(%rsp), %eax
movl %eax, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x28960
jmp 0x3118c
movq 0x8(%rsp), %rdi
callq 0x311e0
jmp 0x31198
addq $0x48, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
jmp 0x311c5
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
callq 0x1ef20
movq (%rsp), %rdi
callq 0x279f0
movq 0x20(%rsp), %rdi
callq 0x16cf0
nopl (%rax,%rax)
| _ZN5alaya8SQ4SpaceIffjNS_17SequentialStorageIhjEEEC2EjmNS_10MetricTypeE:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_C], esi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_1C], ecx
mov rdi, [rsp+48h+var_8]
mov [rsp+48h+var_40], rdi
mov eax, [rsp+48h+var_1C]
mov [rdi], eax
mov dword ptr [rdi+10h], 0
mov eax, dword ptr [rsp+48h+var_18]
mov [rdi+14h], eax
mov dword ptr [rdi+18h], 0
mov dword ptr [rdi+1Ch], 0
mov eax, [rsp+48h+var_C]
mov [rdi+20h], eax
add rdi, 28h ; '('
mov [rsp+48h+var_48], rdi
call _ZN5alaya17SequentialStorageIhjEC2Ev; alaya::SequentialStorage<uchar,uint>::SequentialStorage(void)
mov rdi, [rsp+48h+var_40]
add rdi, 60h ; '`'
mov [rsp+48h+var_38], rdi
mov eax, dword ptr [rsp+48h+var_18]
mov [rsp+48h+var_20], eax
lea rsi, [rsp+48h+var_20]
call _ZN5alaya12SQ4QuantizerIfEC2ERKj; alaya::SQ4Quantizer<float>::SQ4Quantizer(uint const&)
jmp short $+2
loc_31158:
mov rax, [rsp+48h+var_40]
mov rcx, [rsp+48h+var_18]
inc rcx
shr rcx, 1
mov [rax+10h], ecx
mov rdi, rax
add rdi, 28h ; '('
mov eax, [rax+10h]
mov esi, eax
mov eax, [rsp+48h+var_C]
mov edx, eax
xor ecx, ecx
mov r8d, 40h ; '@'
call _ZN5alaya17SequentialStorageIhjE4initEmmcm; alaya::SequentialStorage<uchar,uint>::init(ulong,ulong,char,ulong)
jmp short $+2
loc_3118C:
mov rdi, [rsp+48h+var_40]
call _ZN5alaya8SQ4SpaceIffjNS_17SequentialStorageIhjEEE19set_metric_functionEv; alaya::SQ4Space<float,float,uint,alaya::SequentialStorage<uchar,uint>>::set_metric_function(void)
jmp short $+2
loc_31198:
add rsp, 48h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
jmp short loc_311C5
mov rdi, [rsp+arg_8]
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
call _ZN5alaya12SQ4QuantizerIfED2Ev; alaya::SQ4Quantizer<float>::~SQ4Quantizer()
loc_311C5:
mov rdi, [rsp+0]
call _ZN5alaya17SequentialStorageIhjED2Ev; alaya::SequentialStorage<uchar,uint>::~SequentialStorage()
mov rdi, [rsp+arg_18]
call __Unwind_Resume
| long long alaya::SQ4Space<float,float,unsigned int,alaya::SequentialStorage<unsigned char,unsigned int>>::SQ4Space(
long long a1,
unsigned int a2,
long long a3,
int a4)
{
int v5[2]; // [rsp+28h] [rbp-20h] BYREF
long long v6; // [rsp+30h] [rbp-18h]
unsigned int v7; // [rsp+3Ch] [rbp-Ch]
long long v8; // [rsp+40h] [rbp-8h]
v8 = a1;
v7 = a2;
v6 = a3;
v5[1] = a4;
*(_DWORD *)a1 = a4;
*(_DWORD *)(a1 + 16) = 0;
*(_QWORD *)(a1 + 20) = (unsigned int)v6;
*(_DWORD *)(a1 + 28) = 0;
*(_DWORD *)(a1 + 32) = v7;
alaya::SequentialStorage<unsigned char,unsigned int>::SequentialStorage((_QWORD *)(a1 + 40));
v5[0] = v6;
alaya::SQ4Quantizer<float>::SQ4Quantizer((int *)(a1 + 96), v5);
*(_DWORD *)(a1 + 16) = (unsigned long long)(v6 + 1) >> 1;
alaya::SequentialStorage<unsigned char,unsigned int>::init(
(_QWORD *)(a1 + 40),
*(unsigned int *)(a1 + 16),
v7,
0,
64LL);
return alaya::SQ4Space<float,float,unsigned int,alaya::SequentialStorage<unsigned char,unsigned int>>::set_metric_function(a1);
}
| SQ4Space:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV dword ptr [RSP + 0x3c],ESI
MOV qword ptr [RSP + 0x30],RDX
MOV dword ptr [RSP + 0x2c],ECX
MOV RDI,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x8],RDI
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RDI],EAX
MOV dword ptr [RDI + 0x10],0x0
MOV EAX,dword ptr [RSP + 0x30]
MOV dword ptr [RDI + 0x14],EAX
MOV dword ptr [RDI + 0x18],0x0
MOV dword ptr [RDI + 0x1c],0x0
MOV EAX,dword ptr [RSP + 0x3c]
MOV dword ptr [RDI + 0x20],EAX
ADD RDI,0x28
MOV qword ptr [RSP],RDI
CALL 0x00128880
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x60
MOV qword ptr [RSP + 0x10],RDI
MOV EAX,dword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x28],EAX
LAB_0013114c:
LEA RSI,[RSP + 0x28]
CALL 0x0011f800
JMP 0x00131158
LAB_00131158:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x30]
INC RCX
SHR RCX,0x1
MOV dword ptr [RAX + 0x10],ECX
MOV RDI,RAX
ADD RDI,0x28
MOV EAX,dword ptr [RAX + 0x10]
MOV ESI,EAX
MOV EAX,dword ptr [RSP + 0x3c]
MOV EDX,EAX
LAB_0013117d:
XOR ECX,ECX
MOV R8D,0x40
CALL 0x00128960
JMP 0x0013118c
LAB_0013118c:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001311e0
LAB_00131196:
JMP 0x00131198
LAB_00131198:
ADD RSP,0x48
RET
|
/* alaya::SQ4Space<float, float, unsigned int, alaya::SequentialStorage<unsigned char, unsigned int>
>::SQ4Space(unsigned int, unsigned long, alaya::MetricType) */
void __thiscall
alaya::SQ4Space<float,float,unsigned_int,alaya::SequentialStorage<unsigned_char,unsigned_int>>::
SQ4Space(SQ4Space<float,float,unsigned_int,alaya::SequentialStorage<unsigned_char,unsigned_int>>
*this,uint param_1,long param_2,int4 param_4)
{
uint local_20;
int4 local_1c;
long local_18;
uint local_c;
SQ4Space<float,float,unsigned_int,alaya::SequentialStorage<unsigned_char,unsigned_int>> *local_8;
*(int4 *)this = param_4;
*(int4 *)(this + 0x10) = 0;
local_18._0_4_ = (uint)param_2;
*(uint *)(this + 0x14) = (uint)local_18;
*(int4 *)(this + 0x18) = 0;
*(int4 *)(this + 0x1c) = 0;
*(uint *)(this + 0x20) = param_1;
local_1c = param_4;
local_18 = param_2;
local_c = param_1;
local_8 = this;
SequentialStorage<unsigned_char,unsigned_int>::SequentialStorage
((SequentialStorage<unsigned_char,unsigned_int> *)(this + 0x28));
local_20 = (uint)local_18;
/* try { // try from 0013114c to 00131155 has its CatchHandler @ 0013119d */
SQ4Quantizer<float>::SQ4Quantizer((SQ4Quantizer<float> *)(this + 0x60),&local_20);
*(int *)(this + 0x10) = (int)(local_18 + 1U >> 1);
/* try { // try from 0013117d to 00131195 has its CatchHandler @ 001311ad */
SequentialStorage<unsigned_char,unsigned_int>::init
((SequentialStorage<unsigned_char,unsigned_int> *)(this + 0x28),
(ulong)*(uint *)(this + 0x10),(ulong)local_c,'\0',0x40);
set_metric_function(this);
return;
}
| |
52,589 | my_uca_implicit_weight_put | eloqsql/strings/ctype-uca.c | static inline void
my_uca_implicit_weight_put(uint16 *to, my_wc_t code, uint level)
{
switch (level) {
case 1: to[0]= 0x0020; to[1]= 0; break; /* Secondary level */
case 2: to[0]= 0x0002; to[1]= 0; break; /* Tertiary level */
case 3: to[0]= 0x0001; to[1]= 0; break; /* Quaternary level */
default:
DBUG_ASSERT(0);
case 0:
break;
}
/* Primary level */
to[0]= (uint16)(code >> 15) + my_uca_implicit_weight_base(code);
to[1]= (code & 0x7FFF) | 0x8000;
to[2]= 0;
} | O0 | c | my_uca_implicit_weight_put:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x3, %rax
ja 0x62633
movq -0x20(%rbp), %rax
leaq 0xf4941(%rip), %rcx # 0x156f2c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movw $0x20, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0x6263b
movq -0x8(%rbp), %rax
movw $0x2, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0x6263b
movq -0x8(%rbp), %rax
movw $0x1, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0x6263b
jmp 0x62635
jmp 0x62637
jmp 0x62639
jmp 0x6263b
movq -0x10(%rbp), %rax
shrq $0xf, %rax
movzwl %ax, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x626a0
movw %ax, %cx
movl -0x24(%rbp), %eax
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, (%rax)
movq -0x10(%rbp), %rax
andq $0x7fff, %rax # imm = 0x7FFF
orq $0x8000, %rax # imm = 0x8000
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x4(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uca_implicit_weight_put:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov eax, [rbp+var_14]
mov [rbp+var_20], rax
sub rax, 3; switch 4 cases
ja short def_625F2; jumptable 00000000000625F2 default case
mov rax, [rbp+var_20]
lea rcx, jpt_625F2
movsxd rax, ds:(jpt_625F2 - 156F2Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_625F4:
mov rax, [rbp+var_8]; jumptable 00000000000625F2 case 1
mov word ptr [rax], 20h ; ' '
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_6263B
loc_62609:
mov rax, [rbp+var_8]; jumptable 00000000000625F2 case 2
mov word ptr [rax], 2
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_6263B
loc_6261E:
mov rax, [rbp+var_8]; jumptable 00000000000625F2 case 3
mov word ptr [rax], 1
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_6263B
def_625F2:
jmp short $+2; jumptable 00000000000625F2 default case
loc_62635:
jmp short $+2
loc_62637:
jmp short $+2; jumptable 00000000000625F2 case 0
loc_62639:
jmp short $+2; jumptable 00000000000625F2 case 0
loc_6263B:
mov rax, [rbp+var_10]
shr rax, 0Fh
movzx eax, ax
mov [rbp+var_24], eax
mov rdi, [rbp+var_10]
call my_uca_implicit_weight_base
mov cx, ax
mov eax, [rbp+var_24]
movzx ecx, cx
add eax, ecx
mov cx, ax
mov rax, [rbp+var_8]
mov [rax], cx
mov rax, [rbp+var_10]
and rax, 7FFFh
or rax, 8000h
mov cx, ax
mov rax, [rbp+var_8]
mov [rax+2], cx
mov rax, [rbp+var_8]
mov word ptr [rax+4], 0
add rsp, 30h
pop rbp
retn
| _WORD * my_uca_implicit_weight_put(_WORD *a1, unsigned long long a2, int a3)
{
_WORD *result; // rax
switch ( a3 )
{
case 1:
*a1 = 32;
a1[1] = 0;
break;
case 2:
*a1 = 2;
a1[1] = 0;
break;
case 3:
*a1 = 1;
a1[1] = 0;
break;
default:
break;
}
*a1 = my_uca_implicit_weight_base(a2) + (a2 >> 15);
a1[1] = a2 & 0x7FFF | 0x8000;
result = a1;
a1[2] = 0;
return result;
}
| my_uca_implicit_weight_put:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV EAX,dword ptr [RBP + -0x14]
MOV qword ptr [RBP + -0x20],RAX
SUB RAX,0x3
JA 0x00162633
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x256f2c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x20
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x0016263b
caseD_2:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x2
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x0016263b
caseD_3:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x0016263b
LAB_00162633:
JMP 0x00162635
LAB_00162635:
JMP 0x00162637
LAB_00162637:
JMP 0x00162639
caseD_0:
JMP 0x0016263b
LAB_0016263b:
MOV RAX,qword ptr [RBP + -0x10]
SHR RAX,0xf
MOVZX EAX,AX
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001626a0
MOV CX,AX
MOV EAX,dword ptr [RBP + -0x24]
MOVZX ECX,CX
ADD EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x7fff
OR RAX,0x8000
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],CX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x4],0x0
ADD RSP,0x30
POP RBP
RET
|
void my_uca_implicit_weight_put(short *param_1,ulong param_2,int4 param_3)
{
short sVar1;
switch(param_3) {
default:
break;
case 1:
*param_1 = 0x20;
param_1[1] = 0;
break;
case 2:
*param_1 = 2;
param_1[1] = 0;
break;
case 3:
*param_1 = 1;
param_1[1] = 0;
}
sVar1 = my_uca_implicit_weight_base(param_2);
*param_1 = (short)(param_2 >> 0xf) + sVar1;
param_1[1] = (ushort)param_2 & 0x7fff | 0x8000;
param_1[2] = 0;
return;
}
| |
52,590 | UCIAdapter::handlePosition(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&) | Razamindset[P]pawnstar-chess-engine/src/main.cpp | void handlePosition(std::istringstream& iss) {
std::string token;
iss >> token;
if (token == "startpos") {
engine->setPosition(
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"); // Standard
// starting
// FEN
// Process any moves that come after "startpos moves"
iss >> token; // Skip "moves" token if present
if (token == "moves") {
std::string move;
while (iss >> move) {
engine->makeMove(move);
}
}
} else if (token == "fen") {
std::string fen;
// Collect all parts of the FEN string
for (int i = 0; i < 6; i++) {
iss >> token;
fen += token + " ";
}
engine->setPosition(fen);
// Process any moves after the FEN
iss >> token; // Check for "moves" token
if (token == "moves") {
std::string move;
while (iss >> move) {
engine->makeMove(move);
}
}
}
} | O0 | cpp | UCIAdapter::handlePosition(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp # imm = 0x180
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x3410
movq -0x138(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x33b0
jmp 0xe250
leaq -0x30(%rbp), %rdi
leaq 0x14bb1(%rip), %rsi # 0x22e0c
callq 0xe160
testb $0x1, %al
jne 0xe269
jmp 0xe41b
movq -0x140(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x150(%rbp)
leaq -0x61(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x34e0
movq -0x148(%rbp), %rdx
leaq 0x1441e(%rip), %rsi # 0x226b6
leaq -0x60(%rbp), %rdi
callq 0xe9e0
jmp 0xe2a3
movq -0x150(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xf3c0
jmp 0xe2b5
leaq -0x60(%rbp), %rdi
callq 0x3180
leaq -0x61(%rbp), %rdi
callq 0x3320
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x33b0
jmp 0xe2d6
leaq -0x30(%rbp), %rdi
leaq 0x14b34(%rip), %rsi # 0x22e15
callq 0xe160
testb $0x1, %al
jne 0xe2ef
jmp 0xe416
leaq -0x88(%rbp), %rdi
callq 0x3410
movq -0x10(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x33b0
movq %rax, -0x158(%rbp)
jmp 0xe314
movq -0x158(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x33a0
movb %al, -0x159(%rbp)
jmp 0xe332
movb -0x159(%rbp), %al
testb $0x1, %al
jne 0xe341
jmp 0xe3f7
movq -0x140(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x168(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x30f0
jmp 0xe367
movq -0x168(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xf4c0
jmp 0xe37c
leaq -0xa8(%rbp), %rdi
callq 0x3180
jmp 0xe2fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xe62e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xe3c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3180
leaq -0x61(%rbp), %rdi
callq 0x3320
jmp 0xe62e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xe405
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x3180
jmp 0xe405
leaq -0x88(%rbp), %rdi
callq 0x3180
jmp 0xe416
leaq -0x88(%rbp), %rdi
callq 0x3180
jmp 0xe62e
jmp 0xe61c
leaq -0x30(%rbp), %rdi
leaq 0x149f5(%rip), %rsi # 0x22e1b
callq 0xe160
testb $0x1, %al
jne 0xe434
jmp 0xe61a
leaq -0xc8(%rbp), %rdi
callq 0x3410
movl $0x0, -0xcc(%rbp)
cmpl $0x6, -0xcc(%rbp)
jge 0xe4df
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x33b0
jmp 0xe466
leaq 0x16b9b(%rip), %rdx # 0x25008
leaq -0xf0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xea90
jmp 0xe47f
leaq -0xc8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x33c0
jmp 0xe494
leaq -0xf0(%rbp), %rdi
callq 0x3180
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0xe44a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xe60c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x3180
jmp 0xe60c
movq -0x140(%rbp), %rax
movq (%rax), %rdi
leaq -0xc8(%rbp), %rsi
callq 0xf3c0
jmp 0xe4f7
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x33b0
jmp 0xe506
leaq -0x30(%rbp), %rdi
leaq 0x14904(%rip), %rsi # 0x22e15
callq 0xe160
testb $0x1, %al
jne 0xe51f
jmp 0xe5fe
leaq -0x110(%rbp), %rdi
callq 0x3410
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x33b0
movq %rax, -0x170(%rbp)
jmp 0xe544
movq -0x170(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x33a0
movb %al, -0x171(%rbp)
jmp 0xe562
movb -0x171(%rbp), %al
testb $0x1, %al
jne 0xe56e
jmp 0xe5e2
movq -0x140(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x180(%rbp)
leaq -0x130(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x30f0
jmp 0xe594
movq -0x180(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0xf4c0
jmp 0xe5a9
leaq -0x130(%rbp), %rdi
callq 0x3180
jmp 0xe52b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xe5f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x3180
jmp 0xe5f0
leaq -0x110(%rbp), %rdi
callq 0x3180
jmp 0xe5fe
leaq -0x110(%rbp), %rdi
callq 0x3180
jmp 0xe60c
leaq -0xc8(%rbp), %rdi
callq 0x3180
jmp 0xe61a
leaq -0xc8(%rbp), %rdi
callq 0x3180
jmp 0xe62e
jmp 0xe61c
leaq -0x30(%rbp), %rdi
callq 0x3180
addq $0x180, %rsp # imm = 0x180
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x3180
movq -0x38(%rbp), %rdi
callq 0x34d0
| _ZN10UCIAdapter14handlePositionERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 180h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_140], rax
lea rdi, [rbp+var_30]
mov [rbp+var_138], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rsi, [rbp+var_138]
mov rdi, [rbp+var_10]
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
jmp short $+2
loc_E250:
lea rdi, [rbp+var_30]
lea rsi, aStartpos; "startpos"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, 1
jnz short loc_E269
jmp loc_E41B
loc_E269:
mov rax, [rbp+var_140]
mov rax, [rax]
mov [rbp+var_150], rax
lea rdi, [rbp+var_61]
mov [rbp+var_148], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_148]
lea rsi, aRnbqkbnrPppppp; "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQ"...
lea rdi, [rbp+var_60]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_E2A3:
mov rdi, [rbp+var_150]
lea rsi, [rbp+var_60]
call _ZN6Engine11setPositionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::setPosition(std::string const&)
jmp short $+2
loc_E2B5:
lea rdi, [rbp+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_61]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_30]
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
jmp short $+2
loc_E2D6:
lea rdi, [rbp+var_30]
lea rsi, aMoves; "moves"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, 1
jnz short loc_E2EF
jmp loc_E416
loc_E2EF:
lea rdi, [rbp+var_88]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
loc_E2FB:
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_88]
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
mov [rbp+var_158], rax
jmp short $+2
loc_E314:
mov rdi, [rbp+var_158]
mov rax, [rdi]
mov rax, [rax-18h]
add rdi, rax
call __ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv; std::ios::operator bool(void)
mov [rbp+var_159], al
jmp short $+2
loc_E332:
mov al, [rbp+var_159]
test al, 1
jnz short loc_E341
jmp loc_E3F7
loc_E341:
mov rax, [rbp+var_140]
mov rax, [rax]
mov [rbp+var_168], rax
lea rdi, [rbp+var_A8]
lea rsi, [rbp+var_88]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_E367:
mov rdi, [rbp+var_168]
lea rsi, [rbp+var_A8]
call _ZN6Engine8makeMoveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::makeMove(std::string)
jmp short $+2
loc_E37C:
lea rdi, [rbp+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_E2FB
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp loc_E62E
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp short loc_E3C1
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_E3C1:
lea rdi, [rbp+var_61]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_E62E
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp short loc_E405
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_E405
loc_E3F7:
lea rdi, [rbp+var_88]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_E416
loc_E405:
lea rdi, [rbp+var_88]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_E62E
loc_E416:
jmp loc_E61C
loc_E41B:
lea rdi, [rbp+var_30]
lea rsi, aFen; "fen"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, 1
jnz short loc_E434
jmp loc_E61A
loc_E434:
lea rdi, [rbp+var_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov [rbp+var_CC], 0
loc_E44A:
cmp [rbp+var_CC], 6
jge loc_E4DF
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_30]
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
jmp short $+2
loc_E466:
lea rdx, aEp+3; " "
lea rdi, [rbp+var_F0]
lea rsi, [rbp+var_30]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
jmp short $+2
loc_E47F:
lea rdi, [rbp+var_C8]
lea rsi, [rbp+var_F0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_E494:
lea rdi, [rbp+var_F0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov eax, [rbp+var_CC]
add eax, 1
mov [rbp+var_CC], eax
jmp short loc_E44A
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp loc_E60C
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_F0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_E60C
loc_E4DF:
mov rax, [rbp+var_140]
mov rdi, [rax]
lea rsi, [rbp+var_C8]
call _ZN6Engine11setPositionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::setPosition(std::string const&)
jmp short $+2
loc_E4F7:
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_30]
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
jmp short $+2
loc_E506:
lea rdi, [rbp+var_30]
lea rsi, aMoves; "moves"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, 1
jnz short loc_E51F
jmp loc_E5FE
loc_E51F:
lea rdi, [rbp+var_110]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
loc_E52B:
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_110]
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
mov [rbp+var_170], rax
jmp short $+2
loc_E544:
mov rdi, [rbp+var_170]
mov rax, [rdi]
mov rax, [rax-18h]
add rdi, rax
call __ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv; std::ios::operator bool(void)
mov [rbp+var_171], al
jmp short $+2
loc_E562:
mov al, [rbp+var_171]
test al, 1
jnz short loc_E56E
jmp short loc_E5E2
loc_E56E:
mov rax, [rbp+var_140]
mov rax, [rax]
mov [rbp+var_180], rax
lea rdi, [rbp+var_130]
lea rsi, [rbp+var_110]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_E594:
mov rdi, [rbp+var_180]
lea rsi, [rbp+var_130]
call _ZN6Engine8makeMoveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::makeMove(std::string)
jmp short $+2
loc_E5A9:
lea rdi, [rbp+var_130]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_E52B
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp short loc_E5F0
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_130]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_E5F0
loc_E5E2:
lea rdi, [rbp+var_110]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_E5FE
loc_E5F0:
lea rdi, [rbp+var_110]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_E60C
loc_E5FE:
lea rdi, [rbp+var_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_E61A
loc_E60C:
lea rdi, [rbp+var_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_E62E
loc_E61A:
jmp short $+2
loc_E61C:
lea rdi, [rbp+var_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
add rsp, 180h
pop rbp
retn
loc_E62E:
lea rdi, [rbp+var_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_38]
call __Unwind_Resume
| long long UCIAdapter::handlePosition(_QWORD *a1, long long a2)
{
long long v3; // [rsp+0h] [rbp-180h]
_QWORD *v4; // [rsp+10h] [rbp-170h]
long long v5; // [rsp+18h] [rbp-168h]
_QWORD *v6; // [rsp+28h] [rbp-158h]
long long v7; // [rsp+30h] [rbp-150h]
_BYTE v8[32]; // [rsp+50h] [rbp-130h] BYREF
_BYTE v9[32]; // [rsp+70h] [rbp-110h] BYREF
_BYTE v10[36]; // [rsp+90h] [rbp-F0h] BYREF
int i; // [rsp+B4h] [rbp-CCh]
_BYTE v12[32]; // [rsp+B8h] [rbp-C8h] BYREF
_BYTE v13[32]; // [rsp+D8h] [rbp-A8h] BYREF
_BYTE v14[39]; // [rsp+F8h] [rbp-88h] BYREF
char v15; // [rsp+11Fh] [rbp-61h] BYREF
_BYTE v16[36]; // [rsp+120h] [rbp-60h] BYREF
_BYTE v17[32]; // [rsp+150h] [rbp-30h] BYREF
long long v18; // [rsp+170h] [rbp-10h]
_QWORD *v19; // [rsp+178h] [rbp-8h]
v19 = a1;
v18 = a2;
std::string::basic_string(v17);
std::operator>><char>(v18, v17);
if ( std::operator==<char>((long long)v17, (long long)"startpos") )
{
v7 = *a1;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(
v16,
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
&v15);
Engine::setPosition(v7, v16);
std::string::~string(v16);
std::allocator<char>::~allocator(&v15);
std::operator>><char>(v18, v17);
if ( std::operator==<char>((long long)v17, (long long)"moves") )
{
std::string::basic_string(v14);
while ( 1 )
{
v6 = (_QWORD *)std::operator>><char>(v18, v14);
if ( (std::ios::operator bool((char *)v6 + *(_QWORD *)(*v6 - 24LL)) & 1) == 0 )
break;
v5 = *a1;
std::string::basic_string(v13, v14);
Engine::makeMove(v5, v13);
std::string::~string(v13);
}
std::string::~string(v14);
}
}
else if ( std::operator==<char>((long long)v17, (long long)"fen") )
{
std::string::basic_string(v12);
for ( i = 0; i < 6; ++i )
{
std::operator>><char>(v18, v17);
std::operator+<char>(v10, v17, " ");
std::string::operator+=(v12, v10);
std::string::~string(v10);
}
Engine::setPosition(*a1, v12);
std::operator>><char>(v18, v17);
if ( std::operator==<char>((long long)v17, (long long)"moves") )
{
std::string::basic_string(v9);
while ( 1 )
{
v4 = (_QWORD *)std::operator>><char>(v18, v9);
if ( (std::ios::operator bool((char *)v4 + *(_QWORD *)(*v4 - 24LL)) & 1) == 0 )
break;
v3 = *a1;
std::string::basic_string(v8, v9);
Engine::makeMove(v3, v8);
std::string::~string(v8);
}
std::string::~string(v9);
}
std::string::~string(v12);
}
return std::string::~string(v17);
}
| handlePosition:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x180
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x140],RAX
LEA RDI,[RBP + -0x30]
MOV qword ptr [RBP + -0x138],RDI
CALL 0x00103410
MOV RSI,qword ptr [RBP + -0x138]
MOV RDI,qword ptr [RBP + -0x10]
LAB_0010e249:
CALL 0x001033b0
JMP 0x0010e250
LAB_0010e250:
LEA RDI,[RBP + -0x30]
LEA RSI,[0x122e0c]
CALL 0x0010e160
TEST AL,0x1
JNZ 0x0010e269
JMP 0x0010e41b
LAB_0010e269:
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x150],RAX
LEA RDI,[RBP + -0x61]
MOV qword ptr [RBP + -0x148],RDI
CALL 0x001034e0
MOV RDX,qword ptr [RBP + -0x148]
LAB_0010e291:
LEA RSI,[0x1226b6]
LEA RDI,[RBP + -0x60]
CALL 0x0010e9e0
JMP 0x0010e2a3
LAB_0010e2a3:
MOV RDI,qword ptr [RBP + -0x150]
LEA RSI,[RBP + -0x60]
CALL 0x0010f3c0
JMP 0x0010e2b5
LAB_0010e2b5:
LEA RDI,[RBP + -0x60]
CALL 0x00103180
LEA RDI,[RBP + -0x61]
CALL 0x00103320
MOV RDI,qword ptr [RBP + -0x10]
LAB_0010e2cb:
LEA RSI,[RBP + -0x30]
CALL 0x001033b0
JMP 0x0010e2d6
LAB_0010e2d6:
LEA RDI,[RBP + -0x30]
LEA RSI,[0x122e15]
CALL 0x0010e160
TEST AL,0x1
JNZ 0x0010e2ef
JMP 0x0010e416
LAB_0010e2ef:
LEA RDI,[RBP + -0x88]
CALL 0x00103410
LAB_0010e2fb:
MOV RDI,qword ptr [RBP + -0x10]
LAB_0010e2ff:
LEA RSI,[RBP + -0x88]
CALL 0x001033b0
MOV qword ptr [RBP + -0x158],RAX
JMP 0x0010e314
LAB_0010e314:
MOV RDI,qword ptr [RBP + -0x158]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
ADD RDI,RAX
CALL 0x001033a0
MOV byte ptr [RBP + -0x159],AL
JMP 0x0010e332
LAB_0010e332:
MOV AL,byte ptr [RBP + -0x159]
TEST AL,0x1
JNZ 0x0010e341
JMP 0x0010e3f7
LAB_0010e341:
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x168],RAX
LEA RDI,[RBP + -0xa8]
LEA RSI,[RBP + -0x88]
CALL 0x001030f0
JMP 0x0010e367
LAB_0010e367:
MOV RDI,qword ptr [RBP + -0x168]
LEA RSI,[RBP + -0xa8]
CALL 0x0010f4c0
JMP 0x0010e37c
LAB_0010e37c:
LEA RDI,[RBP + -0xa8]
CALL 0x00103180
JMP 0x0010e2fb
LAB_0010e3f7:
LEA RDI,[RBP + -0x88]
CALL 0x00103180
JMP 0x0010e416
LAB_0010e416:
JMP 0x0010e61c
LAB_0010e41b:
LEA RDI,[RBP + -0x30]
LEA RSI,[0x122e1b]
CALL 0x0010e160
TEST AL,0x1
JNZ 0x0010e434
JMP 0x0010e61a
LAB_0010e434:
LEA RDI,[RBP + -0xc8]
CALL 0x00103410
MOV dword ptr [RBP + -0xcc],0x0
LAB_0010e44a:
CMP dword ptr [RBP + -0xcc],0x6
JGE 0x0010e4df
MOV RDI,qword ptr [RBP + -0x10]
LAB_0010e45b:
LEA RSI,[RBP + -0x30]
CALL 0x001033b0
JMP 0x0010e466
LAB_0010e466:
LEA RDX,[0x125008]
LEA RDI,[RBP + -0xf0]
LEA RSI,[RBP + -0x30]
CALL 0x0010ea90
JMP 0x0010e47f
LAB_0010e47f:
LEA RDI,[RBP + -0xc8]
LEA RSI,[RBP + -0xf0]
CALL 0x001033c0
JMP 0x0010e494
LAB_0010e494:
LEA RDI,[RBP + -0xf0]
CALL 0x00103180
MOV EAX,dword ptr [RBP + -0xcc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xcc],EAX
JMP 0x0010e44a
LAB_0010e4df:
MOV RAX,qword ptr [RBP + -0x140]
MOV RDI,qword ptr [RAX]
LAB_0010e4e9:
LEA RSI,[RBP + -0xc8]
CALL 0x0010f3c0
JMP 0x0010e4f7
LAB_0010e4f7:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x30]
CALL 0x001033b0
JMP 0x0010e506
LAB_0010e506:
LEA RDI,[RBP + -0x30]
LEA RSI,[0x122e15]
CALL 0x0010e160
TEST AL,0x1
JNZ 0x0010e51f
JMP 0x0010e5fe
LAB_0010e51f:
LEA RDI,[RBP + -0x110]
CALL 0x00103410
LAB_0010e52b:
MOV RDI,qword ptr [RBP + -0x10]
LAB_0010e52f:
LEA RSI,[RBP + -0x110]
CALL 0x001033b0
MOV qword ptr [RBP + -0x170],RAX
JMP 0x0010e544
LAB_0010e544:
MOV RDI,qword ptr [RBP + -0x170]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
ADD RDI,RAX
CALL 0x001033a0
MOV byte ptr [RBP + -0x171],AL
JMP 0x0010e562
LAB_0010e562:
MOV AL,byte ptr [RBP + -0x171]
TEST AL,0x1
JNZ 0x0010e56e
JMP 0x0010e5e2
LAB_0010e56e:
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x180],RAX
LEA RDI,[RBP + -0x130]
LEA RSI,[RBP + -0x110]
CALL 0x001030f0
JMP 0x0010e594
LAB_0010e594:
MOV RDI,qword ptr [RBP + -0x180]
LEA RSI,[RBP + -0x130]
CALL 0x0010f4c0
LAB_0010e5a7:
JMP 0x0010e5a9
LAB_0010e5a9:
LEA RDI,[RBP + -0x130]
CALL 0x00103180
JMP 0x0010e52b
LAB_0010e5e2:
LEA RDI,[RBP + -0x110]
CALL 0x00103180
JMP 0x0010e5fe
LAB_0010e5fe:
LEA RDI,[RBP + -0xc8]
CALL 0x00103180
JMP 0x0010e61a
LAB_0010e61a:
JMP 0x0010e61c
LAB_0010e61c:
LEA RDI,[RBP + -0x30]
CALL 0x00103180
ADD RSP,0x180
POP RBP
RET
|
/* UCIAdapter::handlePosition(std::__cxx11::istringstream&) */
void __thiscall UCIAdapter::handlePosition(UCIAdapter *this,istringstream *param_1)
{
Engine *this_00;
int8 uVar1;
bool bVar2;
istream *piVar3;
string local_138 [32];
string local_118 [32];
string local_f8 [36];
int local_d4;
string local_d0 [32];
string local_b0 [32];
string local_90 [39];
allocator local_69;
string local_68 [48];
string local_38 [32];
istream *local_18;
UCIAdapter *local_10;
local_18 = (istream *)param_1;
local_10 = this;
std::__cxx11::string::string(local_38);
/* try { // try from 0010e249 to 0010e24d has its CatchHandler @ 0010e38d */
std::operator>>(local_18,local_38);
bVar2 = std::operator==(local_38,"startpos");
if (bVar2) {
this_00 = *(Engine **)this;
std::allocator<char>::allocator();
/* try { // try from 0010e291 to 0010e2a0 has its CatchHandler @ 0010e39e */
std::__cxx11::string::string<std::allocator<char>>
(local_68,"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",&local_69);
/* try { // try from 0010e2a3 to 0010e2b2 has its CatchHandler @ 0010e3ac */
Engine::setPosition(this_00,local_68);
std::__cxx11::string::~string(local_68);
std::allocator<char>::~allocator((allocator<char> *)&local_69);
/* try { // try from 0010e2cb to 0010e2d3 has its CatchHandler @ 0010e38d */
std::operator>>(local_18,local_38);
bVar2 = std::operator==(local_38,"moves");
if (bVar2) {
std::__cxx11::string::string(local_90);
while( true ) {
/* try { // try from 0010e2ff to 0010e364 has its CatchHandler @ 0010e3cf */
piVar3 = std::operator>>(local_18,local_90);
bVar2 = std::ios::operator_cast_to_bool
((ios *)(piVar3 + *(long *)(*(long *)piVar3 + -0x18)));
if (!bVar2) break;
uVar1 = *(int8 *)this;
std::__cxx11::string::string(local_b0,local_90);
/* try { // try from 0010e367 to 0010e379 has its CatchHandler @ 0010e3dd */
Engine::makeMove(uVar1,local_b0);
std::__cxx11::string::~string(local_b0);
}
std::__cxx11::string::~string(local_90);
}
}
else {
bVar2 = std::operator==(local_38,"fen");
if (bVar2) {
std::__cxx11::string::string(local_d0);
for (local_d4 = 0; local_d4 < 6; local_d4 = local_d4 + 1) {
/* try { // try from 0010e45b to 0010e47c has its CatchHandler @ 0010e4b1 */
std::operator>>(local_18,local_38);
std::operator+(local_f8,(char *)local_38);
/* try { // try from 0010e47f to 0010e491 has its CatchHandler @ 0010e4c2 */
std::__cxx11::string::operator+=(local_d0,local_f8);
std::__cxx11::string::~string(local_f8);
}
/* try { // try from 0010e4e9 to 0010e503 has its CatchHandler @ 0010e4b1 */
Engine::setPosition(*(Engine **)this,local_d0);
std::operator>>(local_18,local_38);
bVar2 = std::operator==(local_38,"moves");
if (bVar2) {
std::__cxx11::string::string(local_118);
while( true ) {
/* try { // try from 0010e52f to 0010e591 has its CatchHandler @ 0010e5ba */
piVar3 = std::operator>>(local_18,local_118);
bVar2 = std::ios::operator_cast_to_bool
((ios *)(piVar3 + *(long *)(*(long *)piVar3 + -0x18)));
if (!bVar2) break;
uVar1 = *(int8 *)this;
std::__cxx11::string::string(local_138,local_118);
/* try { // try from 0010e594 to 0010e5a6 has its CatchHandler @ 0010e5c8 */
Engine::makeMove(uVar1,local_138);
std::__cxx11::string::~string(local_138);
}
std::__cxx11::string::~string(local_118);
}
std::__cxx11::string::~string(local_d0);
}
}
std::__cxx11::string::~string(local_38);
return;
}
| |
52,591 | UCIAdapter::handlePosition(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&) | Razamindset[P]pawnstar-chess-engine/src/main.cpp | void handlePosition(std::istringstream& iss) {
std::string token;
iss >> token;
if (token == "startpos") {
engine->setPosition(
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"); // Standard
// starting
// FEN
// Process any moves that come after "startpos moves"
iss >> token; // Skip "moves" token if present
if (token == "moves") {
std::string move;
while (iss >> move) {
engine->makeMove(move);
}
}
} else if (token == "fen") {
std::string fen;
// Collect all parts of the FEN string
for (int i = 0; i < 6; i++) {
iss >> token;
fen += token + " ";
}
engine->setPosition(fen);
// Process any moves after the FEN
iss >> token; // Check for "moves" token
if (token == "moves") {
std::string move;
while (iss >> move) {
engine->makeMove(move);
}
}
}
} | O1 | cpp | UCIAdapter::handlePosition(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %rbx
movq %rdi, 0x40(%rsp)
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
movb $0x0, (%rbp)
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x3280
leaq 0x8848(%rip), %rsi # 0xeb90
leaq 0x48(%rsp), %rdi
callq 0x3060
testl %eax, %eax
je 0x64c7
leaq 0x883e(%rip), %rsi # 0xeb9f
leaq 0x48(%rsp), %rdi
callq 0x3060
testl %eax, %eax
jne 0x661c
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl $0x6, %r14d
leaq 0x48(%rsp), %r15
movq %rsp, %r12
leaq 0xa8fc(%rip), %r13 # 0x10c98
leaq 0x20(%rsp), %rbp
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3280
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x6afc
movq %r12, %rdi
movq %r13, %rsi
callq 0x33b0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbp, %rdi
callq 0x3070
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6401
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3210
decl %r14d
jne 0x63a1
movq 0x40(%rsp), %rax
movq (%rax), %rdi
leaq 0x20(%rsp), %rsi
callq 0x6c0c
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x3280
leaq 0x876d(%rip), %rsi # 0xeb99
leaq 0x48(%rsp), %rdi
callq 0x3060
testl %eax, %eax
leaq 0x58(%rsp), %rbp
jne 0x6600
movq %rsp, %r15
leaq 0x10(%rsp), %rax
movq %rax, (%r15)
movq $0x0, 0x8(%r15)
movb $0x0, 0x10(%r15)
leaq 0x78(%rsp), %r14
leaq 0x68(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3280
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x65e5
movq 0x40(%rsp), %rax
movq (%rax), %r13
movq %r14, 0x68(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x6afc
movq %r13, %rdi
movq %r12, %rsi
callq 0x6c6c
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x6465
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3210
jmp 0x6465
movq 0x40(%rsp), %rax
movq (%rax), %r15
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x80f6(%rip), %rsi # 0xe5d5
leaq 0x8127(%rip), %rdx # 0xe60d
leaq 0x20(%rsp), %rdi
callq 0x50dc
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x6c0c
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x6514
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3210
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x3280
leaq 0x8671(%rip), %rsi # 0xeb99
leaq 0x48(%rsp), %rdi
callq 0x3060
testl %eax, %eax
jne 0x661c
leaq 0x20(%rsp), %r15
movq %r14, (%r15)
movq $0x0, 0x8(%r15)
movb $0x0, 0x10(%r15)
leaq 0x98(%rsp), %rbp
leaq 0x88(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3280
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x65c7
movq 0x40(%rsp), %rax
movq (%rax), %r13
movq %rbp, 0x88(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x6afc
movq %r13, %rdi
movq %r12, %rsi
callq 0x6c6c
movq 0x88(%rsp), %rdi
cmpq %rbp, %rdi
je 0x655f
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3210
jmp 0x655f
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x65de
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3210
leaq 0x58(%rsp), %rbp
jmp 0x661c
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6600
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x661c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6633
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3210
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x66fd
jmp 0x664e
jmp 0x6698
movq %rax, %rbx
jmp 0x66d9
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x66a2
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3210
jmp 0x66a2
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6700
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3210
jmp 0x6700
jmp 0x669f
jmp 0x6698
movq %rax, %rbx
jmp 0x66bd
jmp 0x669f
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x66bd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x66d9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x66f5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3210
movq %rbx, %rdi
callq 0x3360
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
jne 0x66cc
jmp 0x66d9
| _ZN10UCIAdapter14handlePositionERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov rbx, rsi
mov [rsp+0D8h+var_98], rdi
lea rbp, [rsp+0D8h+var_80]
mov [rbp-10h], rbp
mov qword ptr [rbp-8], 0
mov byte ptr [rbp+0], 0
lea rsi, [rsp+0D8h+var_90]
mov rdi, rbx
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aStartpos; "startpos"
lea rdi, [rsp+0D8h+var_90]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_64C7
lea rsi, aFen; "fen"
lea rdi, [rsp+0D8h+var_90]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz loc_661C
lea rax, [rsp+0D8h+var_A8]
mov [rax-10h], rax
mov qword ptr [rax-8], 0
mov byte ptr [rax], 0
mov r14d, 6
lea r15, [rsp+0D8h+var_90]
mov r12, rsp
lea r13, aEp+3; " "
lea rbp, [rsp+0D8h+var_B8]
loc_63A1:
mov rdi, rbx
mov rsi, r15
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rax, [rsp+0D8h+var_C8]
mov [rsp+0D8h+var_D8], rax
mov rsi, [rsp+0D8h+var_90]
mov rdx, [rsp+0D8h+var_88]
add rdx, rsi
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rdi, r12
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+0D8h+var_D8]
mov rdx, [rsp+0D8h+var_D0]
mov rdi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0D8h+var_D8]; void *
lea rax, [rsp+0D8h+var_C8]
cmp rdi, rax
jz short loc_6401
mov rsi, [rsp+0D8h+var_C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6401:
dec r14d
jnz short loc_63A1
mov rax, [rsp+0D8h+var_98]
mov rdi, [rax]
lea rsi, [rsp+0D8h+var_B8]
call _ZN6Engine11setPositionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::setPosition(std::string const&)
lea rsi, [rsp+0D8h+var_90]
mov rdi, rbx
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aMoves; "moves"
lea rdi, [rsp+0D8h+var_90]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
lea rbp, [rsp+0D8h+var_80]
jnz loc_6600
mov r15, rsp
lea rax, [rsp+0D8h+var_C8]
mov [r15], rax
mov qword ptr [r15+8], 0
mov byte ptr [r15+10h], 0
lea r14, [rsp+0D8h+var_60]
lea r12, [rsp+0D8h+var_70]
loc_6465:
mov rdi, rbx
mov rsi, r15
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz loc_65E5
mov rax, [rsp+0D8h+var_98]
mov r13, [rax]
mov [rsp+0D8h+var_70], r14
mov rsi, [rsp+0D8h+var_D8]
mov rdx, [rsp+0D8h+var_D0]
add rdx, rsi
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rdi, r13
mov rsi, r12
call _ZN6Engine8makeMoveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::makeMove(std::string)
mov rdi, [rsp+0D8h+var_70]; void *
cmp rdi, r14
jz short loc_6465
mov rsi, [rsp+0D8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6465
loc_64C7:
mov rax, [rsp+0D8h+var_98]
mov r15, [rax]
lea r14, [rsp+0D8h+var_A8]
mov [r14-10h], r14
lea rsi, aRnbqkbnrPppppp; "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQ"...
lea rdx, aRnbqkbnrPppppp+38h; ""
lea rdi, [rsp+0D8h+var_B8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+0D8h+var_B8]
mov rdi, r15
call _ZN6Engine11setPositionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::setPosition(std::string const&)
mov rdi, [rsp+0D8h+var_B8]; void *
cmp rdi, r14
jz short loc_6514
mov rsi, [rsp+0D8h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6514:
lea rsi, [rsp+0D8h+var_90]
mov rdi, rbx
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aMoves; "moves"
lea rdi, [rsp+0D8h+var_90]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz loc_661C
lea r15, [rsp+0D8h+var_B8]
mov [r15], r14
mov qword ptr [r15+8], 0
mov byte ptr [r15+10h], 0
lea rbp, [rsp+0D8h+var_40]
lea r12, [rsp+0D8h+var_50]
loc_655F:
mov rdi, rbx
mov rsi, r15
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_65C7
mov rax, [rsp+0D8h+var_98]
mov r13, [rax]
mov [rsp+0D8h+var_50], rbp
mov rsi, [rsp+0D8h+var_B8]
mov rdx, [rsp+0D8h+var_B0]
add rdx, rsi
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rdi, r13
mov rsi, r12
call _ZN6Engine8makeMoveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::makeMove(std::string)
mov rdi, [rsp+0D8h+var_50]; void *
cmp rdi, rbp
jz short loc_655F
mov rsi, [rsp+0D8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_655F
loc_65C7:
mov rdi, [rsp+0D8h+var_B8]; void *
cmp rdi, r14
jz short loc_65DE
mov rsi, [rsp+0D8h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65DE:
lea rbp, [rsp+0D8h+var_80]
jmp short loc_661C
loc_65E5:
mov rdi, [rsp+0D8h+var_D8]; void *
lea rax, [rsp+0D8h+var_C8]
cmp rdi, rax
jz short loc_6600
mov rsi, [rsp+0D8h+var_C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6600:
mov rdi, [rsp+0D8h+var_B8]; void *
lea rax, [rsp+0D8h+var_A8]
cmp rdi, rax
jz short loc_661C
mov rsi, [rsp+0D8h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_661C:
mov rdi, [rsp+0D8h+var_90]; void *
cmp rdi, rbp
jz short loc_6633
mov rsi, [rsp+0D8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6633:
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp loc_66FD
jmp short loc_664E
jmp short loc_6698
loc_664E:
mov rbx, rax
jmp loc_66D9
mov rbx, rax
mov rdi, [rsp+arg_60]; void *
cmp rdi, r14
jz short loc_66A2
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_66A2
mov rbx, rax
mov rdi, [rsp+arg_80]; void *
cmp rdi, rbp
jz short loc_6700
mov rsi, [rsp+arg_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6700
jmp short loc_669F
jmp short $+2
loc_6698:
mov rbx, rax
jmp short loc_66BD
jmp short $+2
loc_669F:
mov rbx, rax
loc_66A2:
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_66BD
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_66BD:
mov rdi, [rsp+arg_18]; void *
lea rax, [rsp+arg_28]
cmp rdi, rax
jz short loc_66D9
loc_66CC:
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_66D9:
mov rdi, [rsp+arg_40]; void *
lea rax, [rsp+arg_50]
cmp rdi, rax
jz short loc_66F5
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_66F5:
mov rdi, rbx
call __Unwind_Resume
loc_66FD:
mov rbx, rax
loc_6700:
mov rdi, [rsp+arg_18]
cmp rdi, r14
jnz short loc_66CC
jmp short loc_66D9
| void UCIAdapter::handlePosition(_QWORD *a1, long long a2)
{
int v2; // r14d
_QWORD *v3; // rax
long long v4; // r13
long long v5; // r15
_QWORD *v6; // rax
long long v7; // r13
void *v8; // [rsp+0h] [rbp-D8h] BYREF
long long v9; // [rsp+8h] [rbp-D0h]
_QWORD v10[2]; // [rsp+10h] [rbp-C8h] BYREF
void *v11; // [rsp+20h] [rbp-B8h] BYREF
long long v12; // [rsp+28h] [rbp-B0h]
_QWORD v13[2]; // [rsp+30h] [rbp-A8h] BYREF
_QWORD *v14; // [rsp+40h] [rbp-98h]
void *v15; // [rsp+48h] [rbp-90h] BYREF
long long v16; // [rsp+50h] [rbp-88h]
_QWORD v17[2]; // [rsp+58h] [rbp-80h] BYREF
void *v18[2]; // [rsp+68h] [rbp-70h] BYREF
_QWORD v19[2]; // [rsp+78h] [rbp-60h] BYREF
void *v20[2]; // [rsp+88h] [rbp-50h] BYREF
_QWORD v21[8]; // [rsp+98h] [rbp-40h] BYREF
v14 = a1;
v15 = v17;
v16 = 0LL;
LOBYTE(v17[0]) = 0;
std::operator>><char>(a2, &v15);
if ( !(unsigned int)std::string::compare(&v15, "startpos") )
{
v5 = *v14;
v11 = v13;
std::string::_M_construct<char const*>(
&v11,
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
(long long)"");
Engine::setPosition(v5, &v11);
if ( v11 != v13 )
operator delete(v11, v13[0] + 1LL);
std::operator>><char>(a2, &v15);
if ( !(unsigned int)std::string::compare(&v15, "moves") )
{
v11 = v13;
v12 = 0LL;
LOBYTE(v13[0]) = 0;
while ( 1 )
{
v6 = (_QWORD *)std::operator>><char>(a2, &v11);
if ( (*((_BYTE *)v6 + *(_QWORD *)(*v6 - 24LL) + 32) & 5) != 0 )
break;
v7 = *v14;
v20[0] = v21;
std::string::_M_construct<char *>(v20, v11, (char *)v11 + v12);
Engine::makeMove(v7, v20);
if ( v20[0] != v21 )
operator delete(v20[0], v21[0] + 1LL);
}
if ( v11 != v13 )
operator delete(v11, v13[0] + 1LL);
}
}
else if ( !(unsigned int)std::string::compare(&v15, "fen") )
{
v11 = v13;
v12 = 0LL;
LOBYTE(v13[0]) = 0;
v2 = 6;
do
{
std::operator>><char>(a2, &v15);
v8 = v10;
std::string::_M_construct<char *>(&v8, v15, (char *)v15 + v16);
std::string::append(&v8, " ");
std::string::_M_append(&v11, v8, v9);
if ( v8 != v10 )
operator delete(v8, v10[0] + 1LL);
--v2;
}
while ( v2 );
Engine::setPosition(*v14, &v11);
std::operator>><char>(a2, &v15);
if ( !(unsigned int)std::string::compare(&v15, "moves") )
{
v8 = v10;
v9 = 0LL;
LOBYTE(v10[0]) = 0;
while ( 1 )
{
v3 = (_QWORD *)std::operator>><char>(a2, &v8);
if ( (*((_BYTE *)v3 + *(_QWORD *)(*v3 - 24LL) + 32) & 5) != 0 )
break;
v4 = *v14;
v18[0] = v19;
std::string::_M_construct<char *>(v18, v8, (char *)v8 + v9);
Engine::makeMove(v4, v18);
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
}
if ( v8 != v10 )
operator delete(v8, v10[0] + 1LL);
}
if ( v11 != v13 )
operator delete(v11, v13[0] + 1LL);
}
if ( v15 != v17 )
operator delete(v15, v17[0] + 1LL);
}
| handlePosition:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV RBX,RSI
MOV qword ptr [RSP + 0x40],RDI
LEA RBP,[RSP + 0x58]
MOV qword ptr [RBP + -0x10],RBP
MOV qword ptr [RBP + -0x8],0x0
MOV byte ptr [RBP],0x0
LAB_00106334:
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00103280
LEA RSI,[0x10eb90]
LEA RDI,[RSP + 0x48]
CALL 0x00103060
TEST EAX,EAX
JZ 0x001064c7
LEA RSI,[0x10eb9f]
LEA RDI,[RSP + 0x48]
CALL 0x00103060
TEST EAX,EAX
JNZ 0x0010661c
LEA RAX,[RSP + 0x30]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
MOV R14D,0x6
LEA R15,[RSP + 0x48]
MOV R12,RSP
LEA R13,[0x110c98]
LEA RBP,[RSP + 0x20]
LAB_001063a1:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00103280
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
ADD RDX,RSI
LAB_001063c2:
MOV RDI,R12
CALL 0x00106afc
LAB_001063ca:
MOV RDI,R12
MOV RSI,R13
CALL 0x001033b0
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
LAB_001063de:
MOV RDI,RBP
CALL 0x00103070
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x00106401
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00103210
LAB_00106401:
DEC R14D
JNZ 0x001063a1
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,qword ptr [RAX]
LAB_0010640e:
LEA RSI,[RSP + 0x20]
CALL 0x00106c0c
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00103280
LEA RSI,[0x10eb99]
LEA RDI,[RSP + 0x48]
CALL 0x00103060
TEST EAX,EAX
LEA RBP,[RSP + 0x58]
JNZ 0x00106600
MOV R15,RSP
LEA RAX,[RSP + 0x10]
MOV qword ptr [R15],RAX
MOV qword ptr [R15 + 0x8],0x0
MOV byte ptr [R15 + 0x10],0x0
LEA R14,[RSP + 0x78]
LEA R12,[RSP + 0x68]
LAB_00106465:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00103280
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x001065e5
MOV RAX,qword ptr [RSP + 0x40]
MOV R13,qword ptr [RAX]
MOV qword ptr [RSP + 0x68],R14
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
ADD RDX,RSI
MOV RDI,R12
CALL 0x00106afc
LAB_001064a3:
MOV RDI,R13
MOV RSI,R12
CALL 0x00106c6c
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x00106465
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x00103210
JMP 0x00106465
LAB_001064c7:
MOV RAX,qword ptr [RSP + 0x40]
MOV R15,qword ptr [RAX]
LEA R14,[RSP + 0x30]
MOV qword ptr [R14 + -0x10],R14
LAB_001064d8:
LEA RSI,[0x10e5d5]
LEA RDX,[0x10e60d]
LEA RDI,[RSP + 0x20]
CALL 0x001050dc
LAB_001064f0:
LEA RSI,[RSP + 0x20]
MOV RDI,R15
CALL 0x00106c0c
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R14
JZ 0x00106514
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x00103210
LAB_00106514:
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00103280
LEA RSI,[0x10eb99]
LEA RDI,[RSP + 0x48]
CALL 0x00103060
TEST EAX,EAX
JNZ 0x0010661c
LEA R15,[RSP + 0x20]
MOV qword ptr [R15],R14
MOV qword ptr [R15 + 0x8],0x0
MOV byte ptr [R15 + 0x10],0x0
LEA RBP,[RSP + 0x98]
LEA R12,[RSP + 0x88]
LAB_0010655f:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00103280
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x001065c7
MOV RAX,qword ptr [RSP + 0x40]
MOV R13,qword ptr [RAX]
MOV qword ptr [RSP + 0x88],RBP
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
ADD RDX,RSI
MOV RDI,R12
CALL 0x00106afc
LAB_0010659d:
MOV RDI,R13
MOV RSI,R12
CALL 0x00106c6c
LAB_001065a8:
MOV RDI,qword ptr [RSP + 0x88]
CMP RDI,RBP
JZ 0x0010655f
MOV RSI,qword ptr [RSP + 0x98]
INC RSI
CALL 0x00103210
JMP 0x0010655f
LAB_001065c7:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R14
JZ 0x001065de
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x00103210
LAB_001065de:
LEA RBP,[RSP + 0x58]
JMP 0x0010661c
LAB_001065e5:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x00106600
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00103210
LAB_00106600:
MOV RDI,qword ptr [RSP + 0x20]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x0010661c
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x00103210
LAB_0010661c:
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,RBP
JZ 0x00106633
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x00103210
LAB_00106633:
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* UCIAdapter::handlePosition(std::__cxx11::istringstream&) */
void __thiscall UCIAdapter::handlePosition(UCIAdapter *this,istringstream *param_1)
{
int8 uVar1;
Engine *this_00;
int iVar2;
istream *piVar3;
int1 *local_d8;
long local_d0;
int1 local_c8;
int7 uStack_c7;
int1 *local_b8;
long local_b0;
int1 local_a8;
int7 uStack_a7;
UCIAdapter *local_98;
int1 *local_90;
long local_88;
int1 local_80;
int7 uStack_7f;
long *local_70 [2];
long local_60 [2];
long *local_50 [2];
long local_40 [2];
local_90 = &local_80;
local_88 = 0;
local_80 = 0;
/* try { // try from 00106334 to 00106340 has its CatchHandler @ 0010664e */
local_98 = this;
std::operator>>((istream *)param_1,(string *)&local_90);
iVar2 = std::__cxx11::string::compare((char *)&local_90);
if (iVar2 == 0) {
this_00 = *(Engine **)local_98;
/* try { // try from 001064d8 to 001064ef has its CatchHandler @ 0010664a */
local_b8 = &local_a8;
std::__cxx11::string::_M_construct<char_const*>(&local_b8,&DAT_0010e5d5,&DAT_0010e60d);
/* try { // try from 001064f0 to 001064fc has its CatchHandler @ 00106645 */
Engine::setPosition(this_00,(string *)&local_b8);
if (local_b8 != &local_a8) {
operator_delete(local_b8,CONCAT71(uStack_a7,local_a8) + 1);
}
/* try { // try from 00106514 to 00106520 has its CatchHandler @ 0010664e */
std::operator>>((istream *)param_1,(string *)&local_90);
iVar2 = std::__cxx11::string::compare((char *)&local_90);
if (iVar2 == 0) {
local_b0 = 0;
local_a8 = 0;
local_b8 = &local_a8;
/* try { // try from 0010655f to 0010659c has its CatchHandler @ 001066fd */
while (piVar3 = std::operator>>((istream *)param_1,(string *)&local_b8),
((byte)piVar3[*(long *)(*(long *)piVar3 + -0x18) + 0x20] & 5) == 0) {
uVar1 = *(int8 *)local_98;
local_50[0] = local_40;
std::__cxx11::string::_M_construct<char*>(local_50,local_b8,local_b8 + local_b0);
/* try { // try from 0010659d to 001065a7 has its CatchHandler @ 00106672 */
Engine::makeMove(uVar1,local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
}
if (local_b8 != &local_a8) {
operator_delete(local_b8,CONCAT71(uStack_a7,local_a8) + 1);
}
}
}
else {
iVar2 = std::__cxx11::string::compare((char *)&local_90);
if (iVar2 == 0) {
local_b8 = &local_a8;
local_b0 = 0;
local_a8 = 0;
iVar2 = 6;
do {
/* try { // try from 001063a1 to 001063ab has its CatchHandler @ 00106696 */
std::operator>>((istream *)param_1,(string *)&local_90);
local_d8 = &local_c8;
/* try { // try from 001063c2 to 001063c9 has its CatchHandler @ 00106698 */
std::__cxx11::string::_M_construct<char*>(&local_d8,local_90,local_90 + local_88);
/* try { // try from 001063ca to 001063d4 has its CatchHandler @ 0010669d */
std::__cxx11::string::append((char *)&local_d8);
/* try { // try from 001063de to 001063e5 has its CatchHandler @ 0010669f */
std::__cxx11::string::_M_append((char *)&local_b8,(ulong)local_d8);
if (local_d8 != &local_c8) {
operator_delete(local_d8,CONCAT71(uStack_c7,local_c8) + 1);
}
iVar2 = iVar2 + -1;
} while (iVar2 != 0);
/* try { // try from 0010640e to 00106424 has its CatchHandler @ 0010664c */
Engine::setPosition(*(Engine **)local_98,(string *)&local_b8);
std::operator>>((istream *)param_1,(string *)&local_90);
iVar2 = std::__cxx11::string::compare((char *)&local_90);
if (iVar2 == 0) {
local_d8 = &local_c8;
local_d0 = 0;
local_c8 = 0;
/* try { // try from 00106465 to 001064a2 has its CatchHandler @ 00106694 */
while (piVar3 = std::operator>>((istream *)param_1,(string *)&local_d8),
((byte)piVar3[*(long *)(*(long *)piVar3 + -0x18) + 0x20] & 5) == 0) {
uVar1 = *(int8 *)local_98;
local_70[0] = local_60;
std::__cxx11::string::_M_construct<char*>(local_70,local_d8,local_d8 + local_d0);
/* try { // try from 001064a3 to 001064ad has its CatchHandler @ 00106656 */
Engine::makeMove(uVar1,local_70);
if (local_70[0] != local_60) {
operator_delete(local_70[0],local_60[0] + 1);
}
}
if (local_d8 != &local_c8) {
operator_delete(local_d8,CONCAT71(uStack_c7,local_c8) + 1);
}
}
if (local_b8 != &local_a8) {
operator_delete(local_b8,CONCAT71(uStack_a7,local_a8) + 1);
}
}
}
if (local_90 != &local_80) {
operator_delete(local_90,CONCAT71(uStack_7f,local_80) + 1);
}
return;
}
| |
52,592 | UCIAdapter::handlePosition(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&) | Razamindset[P]pawnstar-chess-engine/src/main.cpp | void handlePosition(std::istringstream& iss) {
std::string token;
iss >> token;
if (token == "startpos") {
engine->setPosition(
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"); // Standard
// starting
// FEN
// Process any moves that come after "startpos moves"
iss >> token; // Skip "moves" token if present
if (token == "moves") {
std::string move;
while (iss >> move) {
engine->makeMove(move);
}
}
} else if (token == "fen") {
std::string fen;
// Collect all parts of the FEN string
for (int i = 0; i < 6; i++) {
iss >> token;
fen += token + " ";
}
engine->setPosition(fen);
// Process any moves after the FEN
iss >> token; // Check for "moves" token
if (token == "moves") {
std::string move;
while (iss >> move) {
engine->makeMove(move);
}
}
}
} | O2 | cpp | UCIAdapter::handlePosition(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %rbx
movq %rdi, (%rsp)
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x2290
leaq 0x873f(%rip), %rsi # 0xddb2
leaq 0x28(%rsp), %rdi
callq 0x55da
testb %al, %al
je 0x5741
movq (%rsp), %rax
movq (%rax), %r15
leaq 0x7f9f(%rip), %rsi # 0xd632
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5b44
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x5cb0
leaq 0x8(%rsp), %rdi
callq 0x20d0
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x2290
leaq 0x86ee(%rip), %rsi # 0xddbb
leaq 0x28(%rsp), %rdi
callq 0x55da
testb %al, %al
je 0x585b
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rsp), %r15
leaq 0x88(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2290
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5851
movq (%rsp), %rax
movq (%rax), %r13
movq %r12, %rdi
movq %r15, %rsi
callq 0x22c0
movq %r13, %rdi
movq %r12, %rsi
callq 0x5d0c
movq %r12, %rdi
callq 0x20d0
jmp 0x56fd
leaq 0x8679(%rip), %rsi # 0xddc1
leaq 0x28(%rsp), %rdi
callq 0x55da
testb %al, %al
je 0x585b
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
pushq $0x6
popq %r14
leaq 0x28(%rsp), %r15
leaq 0xa73d(%rip), %r12 # 0xfeb8
leaq 0x48(%rsp), %r13
leaq 0x8(%rsp), %rbp
subl $0x1, %r14d
jb 0x57b9
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2290
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x5b7f
movq %rbp, %rdi
movq %r13, %rsi
callq 0x23c0
movq %r13, %rdi
callq 0x20d0
jmp 0x5785
movq (%rsp), %rax
movq (%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5cb0
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x2290
leaq 0x85dd(%rip), %rsi # 0xddbb
leaq 0x28(%rsp), %rdi
callq 0x55da
testb %al, %al
je 0x5851
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x48(%rsp), %r15
leaq 0x68(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2290
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5847
movq (%rsp), %rax
movq (%rax), %r13
movq %r12, %rdi
movq %r15, %rsi
callq 0x22c0
movq %r13, %rdi
movq %r12, %rsi
callq 0x5d0c
movq %r12, %rdi
callq 0x20d0
jmp 0x5807
leaq 0x48(%rsp), %rdi
callq 0x20d0
leaq 0x8(%rsp), %rdi
callq 0x20d0
leaq 0x28(%rsp), %rdi
callq 0x20d0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x58b3
jmp 0x58b3
jmp 0x587d
movq %rax, %rbx
jmp 0x58c0
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x20d0
jmp 0x58a7
jmp 0x58b3
jmp 0x58b3
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
jmp 0x58ac
jmp 0x58a4
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x20d0
jmp 0x58b6
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20d0
leaq 0x28(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2360
| _ZN10UCIAdapter14handlePositionERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov rbx, rsi
mov [rsp+0D8h+var_D8], rdi
lea rax, [rsp+0D8h+var_A0]
mov [rax-10h], rax
and qword ptr [rax-8], 0
mov byte ptr [rax], 0
lea rsi, [rsp+0D8h+var_B0]
mov rdi, rbx
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aStartpos; "startpos"
lea rdi, [rsp+0D8h+var_B0]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz loc_5741
mov rax, [rsp+0D8h+var_D8]
mov r15, [rax]
lea rsi, aRnbqkbnrPppppp; "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQ"...
lea rdi, [rsp+0D8h+var_D0]
lea rdx, [rsp+0D8h+var_90]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, [rsp+0D8h+var_D0]
mov rdi, r15
call _ZN6Engine11setPositionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::setPosition(std::string const&)
lea rdi, [rsp+0D8h+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rsi, [rsp+0D8h+var_B0]
mov rdi, rbx
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aMoves; "moves"
lea rdi, [rsp+0D8h+var_B0]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz loc_585B
lea rax, [rsp+0D8h+var_C0]
mov [rax-10h], rax
and qword ptr [rax-8], 0
mov byte ptr [rax], 0
lea r15, [rsp+0D8h+var_D0]
lea r12, [rsp+0D8h+var_50]
loc_56FD:
mov rdi, rbx
mov rsi, r15
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz loc_5851
mov rax, [rsp+0D8h+var_D8]
mov r13, [rax]
mov rdi, r12
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov rdi, r13
mov rsi, r12
call _ZN6Engine8makeMoveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::makeMove(std::string)
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_56FD
loc_5741:
lea rsi, aFen; "fen"
lea rdi, [rsp+0D8h+var_B0]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz loc_585B
lea rax, [rsp+0D8h+var_C0]
mov [rax-10h], rax
and qword ptr [rax-8], 0
mov byte ptr [rax], 0
push 6
pop r14
lea r15, [rsp+0D8h+var_B0]
lea r12, aEp+3; " "
lea r13, [rsp+0D8h+var_90]
lea rbp, [rsp+0D8h+var_D0]
loc_5785:
sub r14d, 1
jb short loc_57B9
mov rdi, rbx
mov rsi, r15
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
mov rdi, r13
mov rsi, r15
mov rdx, r12
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
mov rdi, rbp
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
mov rdi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_5785
loc_57B9:
mov rax, [rsp+0D8h+var_D8]
mov rdi, [rax]
lea rsi, [rsp+0D8h+var_D0]
call _ZN6Engine11setPositionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::setPosition(std::string const&)
lea rsi, [rsp+0D8h+var_B0]
mov rdi, rbx
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aMoves; "moves"
lea rdi, [rsp+0D8h+var_B0]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_5851
lea rax, [rsp+0D8h+var_80]
mov [rax-10h], rax
and qword ptr [rax-8], 0
mov byte ptr [rax], 0
lea r15, [rsp+0D8h+var_90]
lea r12, [rsp+0D8h+var_70]
loc_5807:
mov rdi, rbx
mov rsi, r15
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_5847
mov rax, [rsp+0D8h+var_D8]
mov r13, [rax]
mov rdi, r12
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov rdi, r13
mov rsi, r12
call _ZN6Engine8makeMoveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::makeMove(std::string)
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_5807
loc_5847:
lea rdi, [rsp+0D8h+var_90]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_5851:
lea rdi, [rsp+0D8h+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_585B:
lea rdi, [rsp+0D8h+var_B0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_58B3
jmp short loc_58B3
jmp short $+2
loc_587D:
mov rbx, rax
jmp short loc_58C0
mov rbx, rax
lea rdi, [rsp+arg_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_58A7
jmp short loc_58B3
jmp short loc_58B3
mov rbx, rax
lea rdi, [rsp+arg_80]
jmp short loc_58AC
jmp short $+2
loc_58A4:
mov rbx, rax
loc_58A7:
lea rdi, [rsp+arg_40]
loc_58AC:
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_58B6
loc_58B3:
mov rbx, rax
loc_58B6:
lea rdi, [rsp+arg_0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_58C0:
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long UCIAdapter::handlePosition(_QWORD *a1, long long a2)
{
long long v3; // r15
long long v4; // rdx
long long v5; // rcx
long long v6; // r8
long long v7; // r9
const char *v8; // rsi
long long v9; // rdx
long long v10; // rcx
long long v11; // r8
long long v12; // r9
_QWORD *v13; // rax
long long v14; // rdx
long long v15; // r8
long long v16; // r9
long long v17; // rcx
long long v18; // r13
long long v19; // rdx
long long v20; // rcx
long long v21; // r8
long long v22; // r9
int v23; // r14d
long long v25; // rdx
long long v26; // rcx
long long v27; // r8
long long v28; // r9
_QWORD *v29; // rax
long long v30; // rdx
long long v31; // r8
long long v32; // r9
long long v33; // rcx
long long v34; // r13
long long v35; // rdx
long long v36; // rcx
long long v37; // r8
long long v38; // r9
_BYTE *v40; // [rsp+8h] [rbp-D0h] BYREF
long long v41; // [rsp+10h] [rbp-C8h]
_BYTE v42[16]; // [rsp+18h] [rbp-C0h] BYREF
_QWORD v43[2]; // [rsp+28h] [rbp-B0h] BYREF
char v44; // [rsp+38h] [rbp-A0h] BYREF
_QWORD v45[2]; // [rsp+48h] [rbp-90h] BYREF
char v46; // [rsp+58h] [rbp-80h] BYREF
_BYTE v47[32]; // [rsp+68h] [rbp-70h] BYREF
_BYTE v48[80]; // [rsp+88h] [rbp-50h] BYREF
v43[0] = &v44;
v43[1] = 0LL;
v44 = 0;
std::operator>><char>(a2, v43);
if ( std::operator==<char>((long long)v43) )
{
v3 = *a1;
std::string::basic_string<std::allocator<char>>(
&v40,
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
v45);
Engine::setPosition(v3, &v40);
std::string::~string(&v40, &v40, v4, v5, v6, v7);
std::operator>><char>(a2, v43);
v8 = "moves";
if ( std::operator==<char>((long long)v43) )
{
v40 = v42;
v41 = 0LL;
v42[0] = 0;
while ( 1 )
{
v8 = (const char *)&v40;
v13 = (_QWORD *)std::operator>><char>(a2, &v40);
v17 = *(_QWORD *)(*v13 - 24LL);
if ( (*((_BYTE *)v13 + v17 + 32) & 5) != 0 )
break;
v18 = *a1;
std::string::basic_string(v48, &v40);
Engine::makeMove(v18, v48);
std::string::~string(v48, v48, v19, v20, v21, v22);
}
LABEL_15:
std::string::~string(&v40, v8, v14, v17, v15, v16);
}
}
else
{
v8 = "fen";
if ( std::operator==<char>((long long)v43) )
{
v40 = v42;
v41 = 0LL;
v42[0] = 0;
v23 = 6;
while ( v23-- != 0 )
{
std::operator>><char>(a2, v43);
std::operator+<char>(v45, v43, " ");
std::string::append(&v40, v45);
std::string::~string(v45, v45, v25, v26, v27, v28);
}
Engine::setPosition(*a1, &v40);
std::operator>><char>(a2, v43);
v8 = "moves";
if ( std::operator==<char>((long long)v43) )
{
v45[0] = &v46;
v45[1] = 0LL;
v46 = 0;
while ( 1 )
{
v8 = (const char *)v45;
v29 = (_QWORD *)std::operator>><char>(a2, v45);
v33 = *(_QWORD *)(*v29 - 24LL);
if ( (*((_BYTE *)v29 + v33 + 32) & 5) != 0 )
break;
v34 = *a1;
std::string::basic_string(v47, v45);
Engine::makeMove(v34, v47);
std::string::~string(v47, v47, v35, v36, v37, v38);
}
std::string::~string(v45, v45, v30, v33, v31, v32);
}
goto LABEL_15;
}
}
return std::string::~string(v43, v8, v9, v10, v11, v12);
}
| handlePosition:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV RBX,RSI
MOV qword ptr [RSP],RDI
LEA RAX,[RSP + 0x38]
MOV qword ptr [RAX + -0x10],RAX
AND qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
LAB_0010565f:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00102290
LEA RSI,[0x10ddb2]
LEA RDI,[RSP + 0x28]
CALL 0x001055da
TEST AL,AL
JZ 0x00105741
MOV RAX,qword ptr [RSP]
MOV R15,qword ptr [RAX]
LAB_0010568c:
LEA RSI,[0x10d632]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x48]
CALL 0x00105b44
LAB_001056a2:
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x00105cb0
LEA RDI,[RSP + 0x8]
CALL 0x001020d0
LAB_001056b9:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00102290
LEA RSI,[0x10ddbb]
LEA RDI,[RSP + 0x28]
CALL 0x001055da
TEST AL,AL
JZ 0x0010585b
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
AND qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
LEA R15,[RSP + 0x8]
LEA R12,[RSP + 0x88]
LAB_001056fd:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00102290
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00105851
MOV RAX,qword ptr [RSP]
MOV R13,qword ptr [RAX]
MOV RDI,R12
MOV RSI,R15
CALL 0x001022c0
LAB_0010572c:
MOV RDI,R13
MOV RSI,R12
CALL 0x00105d0c
MOV RDI,R12
CALL 0x001020d0
JMP 0x001056fd
LAB_00105741:
LEA RSI,[0x10ddc1]
LEA RDI,[RSP + 0x28]
CALL 0x001055da
TEST AL,AL
JZ 0x0010585b
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
AND qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
PUSH 0x6
POP R14
LEA R15,[RSP + 0x28]
LEA R12,[0x10feb8]
LEA R13,[RSP + 0x48]
LEA RBP,[RSP + 0x8]
LAB_00105785:
SUB R14D,0x1
JC 0x001057b9
LAB_0010578b:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00102290
LAB_00105796:
MOV RDI,R13
MOV RSI,R15
MOV RDX,R12
CALL 0x00105b7f
LAB_001057a4:
MOV RDI,RBP
MOV RSI,R13
CALL 0x001023c0
MOV RDI,R13
CALL 0x001020d0
JMP 0x00105785
LAB_001057b9:
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX]
LAB_001057c0:
LEA RSI,[RSP + 0x8]
CALL 0x00105cb0
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00102290
LEA RSI,[0x10ddbb]
LEA RDI,[RSP + 0x28]
CALL 0x001055da
TEST AL,AL
JZ 0x00105851
LEA RAX,[RSP + 0x58]
MOV qword ptr [RAX + -0x10],RAX
AND qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
LEA R15,[RSP + 0x48]
LEA R12,[RSP + 0x68]
LAB_00105807:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00102290
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00105847
MOV RAX,qword ptr [RSP]
MOV R13,qword ptr [RAX]
MOV RDI,R12
MOV RSI,R15
CALL 0x001022c0
LAB_00105832:
MOV RDI,R13
MOV RSI,R12
CALL 0x00105d0c
LAB_0010583d:
MOV RDI,R12
CALL 0x001020d0
JMP 0x00105807
LAB_00105847:
LEA RDI,[RSP + 0x48]
CALL 0x001020d0
LAB_00105851:
LEA RDI,[RSP + 0x8]
CALL 0x001020d0
LAB_0010585b:
LEA RDI,[RSP + 0x28]
CALL 0x001020d0
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* UCIAdapter::handlePosition(std::__cxx11::istringstream&) */
void __thiscall UCIAdapter::handlePosition(UCIAdapter *this,istringstream *param_1)
{
Engine *this_00;
int8 uVar1;
bool bVar2;
istream *piVar3;
int iVar4;
int1 *local_d0;
int8 local_c8;
int1 local_c0 [16];
int1 *local_b0;
int8 local_a8;
int1 local_a0 [16];
int1 *local_90;
int8 local_88;
int1 local_80 [16];
string local_70 [32];
string local_50 [32];
local_b0 = local_a0;
local_a8 = 0;
local_a0[0] = 0;
/* try { // try from 0010565f to 0010566b has its CatchHandler @ 0010587d */
std::operator>>((istream *)param_1,(string *)&local_b0);
bVar2 = std::operator==((string *)&local_b0,"startpos");
if (bVar2) {
this_00 = *(Engine **)this;
/* try { // try from 0010568c to 001056a1 has its CatchHandler @ 0010587b */
std::__cxx11::string::string<std::allocator<char>>
((string *)&local_d0,"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
(allocator *)&local_90);
/* try { // try from 001056a2 to 001056ae has its CatchHandler @ 00105879 */
Engine::setPosition(this_00,(string *)&local_d0);
std::__cxx11::string::~string((string *)&local_d0);
/* try { // try from 001056b9 to 001056c5 has its CatchHandler @ 0010587d */
std::operator>>((istream *)param_1,(string *)&local_b0);
bVar2 = std::operator==((string *)&local_b0,"moves");
if (!bVar2) goto LAB_0010585b;
local_d0 = local_c0;
local_c8 = 0;
local_c0[0] = 0;
while( true ) {
/* try { // try from 001056fd to 0010572b has its CatchHandler @ 001058b3 */
piVar3 = std::operator>>((istream *)param_1,(string *)&local_d0);
if (((byte)piVar3[*(long *)(*(long *)piVar3 + -0x18) + 0x20] & 5) != 0) break;
uVar1 = *(int8 *)this;
std::__cxx11::string::string(local_50,(string *)&local_d0);
/* try { // try from 0010572c to 00105736 has its CatchHandler @ 00105895 */
Engine::makeMove(uVar1,local_50);
std::__cxx11::string::~string(local_50);
}
}
else {
bVar2 = std::operator==((string *)&local_b0,"fen");
if (!bVar2) goto LAB_0010585b;
local_d0 = local_c0;
local_c8 = 0;
local_c0[0] = 0;
iVar4 = 6;
while (bVar2 = iVar4 != 0, iVar4 = iVar4 + -1, bVar2) {
/* try { // try from 0010578b to 00105795 has its CatchHandler @ 00105891 */
std::operator>>((istream *)param_1,(string *)&local_b0);
/* try { // try from 00105796 to 001057a3 has its CatchHandler @ 00105893 */
std::operator+((string *)&local_90,(char *)&local_b0);
/* try { // try from 001057a4 to 001057ae has its CatchHandler @ 001058a2 */
std::__cxx11::string::append((string *)&local_d0);
std::__cxx11::string::~string((string *)&local_90);
}
/* try { // try from 001057c0 to 001057d6 has its CatchHandler @ 00105877 */
Engine::setPosition(*(Engine **)this,(string *)&local_d0);
std::operator>>((istream *)param_1,(string *)&local_b0);
bVar2 = std::operator==((string *)&local_b0,"moves");
if (bVar2) {
local_90 = local_80;
local_88 = 0;
local_80[0] = 0;
while( true ) {
/* try { // try from 00105807 to 00105831 has its CatchHandler @ 001058a4 */
piVar3 = std::operator>>((istream *)param_1,(string *)&local_90);
if (((byte)piVar3[*(long *)(*(long *)piVar3 + -0x18) + 0x20] & 5) != 0) break;
uVar1 = *(int8 *)this;
std::__cxx11::string::string(local_70,(string *)&local_90);
/* try { // try from 00105832 to 0010583c has its CatchHandler @ 00105882 */
Engine::makeMove(uVar1,local_70);
std::__cxx11::string::~string(local_70);
}
std::__cxx11::string::~string((string *)&local_90);
}
}
std::__cxx11::string::~string((string *)&local_d0);
LAB_0010585b:
std::__cxx11::string::~string((string *)&local_b0);
return;
}
| |
52,593 | UCIAdapter::handlePosition(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&) | Razamindset[P]pawnstar-chess-engine/src/main.cpp | void handlePosition(std::istringstream& iss) {
std::string token;
iss >> token;
if (token == "startpos") {
engine->setPosition(
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"); // Standard
// starting
// FEN
// Process any moves that come after "startpos moves"
iss >> token; // Skip "moves" token if present
if (token == "moves") {
std::string move;
while (iss >> move) {
engine->makeMove(move);
}
}
} else if (token == "fen") {
std::string fen;
// Collect all parts of the FEN string
for (int i = 0; i < 6; i++) {
iss >> token;
fen += token + " ";
}
engine->setPosition(fen);
// Process any moves after the FEN
iss >> token; // Check for "moves" token
if (token == "moves") {
std::string move;
while (iss >> move) {
engine->makeMove(move);
}
}
}
} | O3 | cpp | UCIAdapter::handlePosition(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %rbx
movq %rdi, 0x40(%rsp)
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
movb $0x0, (%rbp)
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x2270
leaq 0x799d(%rip), %rsi # 0xcb57
leaq 0x48(%rsp), %rdi
callq 0x2060
testl %eax, %eax
je 0x5339
leaq 0x7993(%rip), %rsi # 0xcb66
leaq 0x48(%rsp), %rdi
callq 0x2060
testl %eax, %eax
jne 0x548e
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl $0x6, %r14d
leaq 0x48(%rsp), %r15
movq %rsp, %r12
leaq 0x9a5a(%rip), %r13 # 0xec68
leaq 0x20(%rsp), %rbp
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2270
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x596e
movq %r12, %rdi
movq %r13, %rsi
callq 0x23a0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbp, %rdi
callq 0x2070
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x5273
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2210
decl %r14d
jne 0x5213
movq 0x40(%rsp), %rax
movq (%rax), %rdi
leaq 0x20(%rsp), %rsi
callq 0x5a84
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x2270
leaq 0x78c2(%rip), %rsi # 0xcb60
leaq 0x48(%rsp), %rdi
callq 0x2060
testl %eax, %eax
leaq 0x58(%rsp), %rbp
jne 0x5472
movq %rsp, %r15
leaq 0x10(%rsp), %rax
movq %rax, (%r15)
movq $0x0, 0x8(%r15)
movb $0x0, 0x10(%r15)
leaq 0x78(%rsp), %r14
leaq 0x68(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2270
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5457
movq 0x40(%rsp), %rax
movq (%rax), %r13
movq %r14, 0x68(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x596e
movq %r13, %rdi
movq %r12, %rsi
callq 0x5ae4
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x52d7
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x52d7
movq 0x40(%rsp), %rax
movq (%rax), %r15
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x7260(%rip), %rsi # 0xc5b1
leaq 0x7291(%rip), %rdx # 0xc5e9
leaq 0x20(%rsp), %rdi
callq 0x3ff8
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x5a84
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x5386
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2210
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x2270
leaq 0x77c6(%rip), %rsi # 0xcb60
leaq 0x48(%rsp), %rdi
callq 0x2060
testl %eax, %eax
jne 0x548e
leaq 0x20(%rsp), %r15
movq %r14, (%r15)
movq $0x0, 0x8(%r15)
movb $0x0, 0x10(%r15)
leaq 0x98(%rsp), %rbp
leaq 0x88(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2270
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5439
movq 0x40(%rsp), %rax
movq (%rax), %r13
movq %rbp, 0x88(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x596e
movq %r13, %rdi
movq %r12, %rsi
callq 0x5ae4
movq 0x88(%rsp), %rdi
cmpq %rbp, %rdi
je 0x53d1
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x53d1
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x5450
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2210
leaq 0x58(%rsp), %rbp
jmp 0x548e
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x5472
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x548e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x54a5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2210
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x556f
jmp 0x54c0
jmp 0x550a
movq %rax, %rbx
jmp 0x554b
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x5514
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x5514
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5572
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x5572
jmp 0x5511
jmp 0x550a
movq %rax, %rbx
jmp 0x552f
jmp 0x5511
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x552f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x554b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2210
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x5567
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2350
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
jne 0x553e
jmp 0x554b
| _ZN10UCIAdapter14handlePositionERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov rbx, rsi
mov [rsp+0D8h+var_98], rdi
lea rbp, [rsp+0D8h+var_80]
mov [rbp-10h], rbp
mov qword ptr [rbp-8], 0
mov byte ptr [rbp+0], 0
lea rsi, [rsp+0D8h+var_90]
mov rdi, rbx
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aStartpos; "startpos"
lea rdi, [rsp+0D8h+var_90]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_5339
lea rsi, aFen; "fen"
lea rdi, [rsp+0D8h+var_90]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz loc_548E
lea rax, [rsp+0D8h+var_A8]
mov [rax-10h], rax
mov qword ptr [rax-8], 0
mov byte ptr [rax], 0
mov r14d, 6
lea r15, [rsp+0D8h+var_90]
mov r12, rsp
lea r13, aEp+3; " "
lea rbp, [rsp+0D8h+var_B8]
loc_5213:
mov rdi, rbx
mov rsi, r15
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rax, [rsp+0D8h+var_C8]
mov [rsp+0D8h+var_D8], rax
mov rsi, [rsp+0D8h+var_90]
mov rdx, [rsp+0D8h+var_88]
add rdx, rsi
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rdi, r12
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+0D8h+var_D8]
mov rdx, [rsp+0D8h+var_D0]
mov rdi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0D8h+var_D8]; void *
lea rax, [rsp+0D8h+var_C8]
cmp rdi, rax
jz short loc_5273
mov rsi, [rsp+0D8h+var_C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5273:
dec r14d
jnz short loc_5213
mov rax, [rsp+0D8h+var_98]
mov rdi, [rax]
lea rsi, [rsp+0D8h+var_B8]
call _ZN6Engine11setPositionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::setPosition(std::string const&)
lea rsi, [rsp+0D8h+var_90]
mov rdi, rbx
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aMoves; "moves"
lea rdi, [rsp+0D8h+var_90]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
lea rbp, [rsp+0D8h+var_80]
jnz loc_5472
mov r15, rsp
lea rax, [rsp+0D8h+var_C8]
mov [r15], rax
mov qword ptr [r15+8], 0
mov byte ptr [r15+10h], 0
lea r14, [rsp+0D8h+var_60]
lea r12, [rsp+0D8h+var_70]
loc_52D7:
mov rdi, rbx
mov rsi, r15
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz loc_5457
mov rax, [rsp+0D8h+var_98]
mov r13, [rax]
mov [rsp+0D8h+var_70], r14
mov rsi, [rsp+0D8h+var_D8]
mov rdx, [rsp+0D8h+var_D0]
add rdx, rsi
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rdi, r13
mov rsi, r12
call _ZN6Engine8makeMoveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::makeMove(std::string)
mov rdi, [rsp+0D8h+var_70]; void *
cmp rdi, r14
jz short loc_52D7
mov rsi, [rsp+0D8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_52D7
loc_5339:
mov rax, [rsp+0D8h+var_98]
mov r15, [rax]
lea r14, [rsp+0D8h+var_A8]
mov [r14-10h], r14
lea rsi, aRnbqkbnrPppppp; "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQ"...
lea rdx, aRnbqkbnrPppppp+38h; ""
lea rdi, [rsp+0D8h+var_B8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+0D8h+var_B8]
mov rdi, r15
call _ZN6Engine11setPositionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::setPosition(std::string const&)
mov rdi, [rsp+0D8h+var_B8]; void *
cmp rdi, r14
jz short loc_5386
mov rsi, [rsp+0D8h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5386:
lea rsi, [rsp+0D8h+var_90]
mov rdi, rbx
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aMoves; "moves"
lea rdi, [rsp+0D8h+var_90]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz loc_548E
lea r15, [rsp+0D8h+var_B8]
mov [r15], r14
mov qword ptr [r15+8], 0
mov byte ptr [r15+10h], 0
lea rbp, [rsp+0D8h+var_40]
lea r12, [rsp+0D8h+var_50]
loc_53D1:
mov rdi, rbx
mov rsi, r15
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_5439
mov rax, [rsp+0D8h+var_98]
mov r13, [rax]
mov [rsp+0D8h+var_50], rbp
mov rsi, [rsp+0D8h+var_B8]
mov rdx, [rsp+0D8h+var_B0]
add rdx, rsi
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rdi, r13
mov rsi, r12
call _ZN6Engine8makeMoveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Engine::makeMove(std::string)
mov rdi, [rsp+0D8h+var_50]; void *
cmp rdi, rbp
jz short loc_53D1
mov rsi, [rsp+0D8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_53D1
loc_5439:
mov rdi, [rsp+0D8h+var_B8]; void *
cmp rdi, r14
jz short loc_5450
mov rsi, [rsp+0D8h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5450:
lea rbp, [rsp+0D8h+var_80]
jmp short loc_548E
loc_5457:
mov rdi, [rsp+0D8h+var_D8]; void *
lea rax, [rsp+0D8h+var_C8]
cmp rdi, rax
jz short loc_5472
mov rsi, [rsp+0D8h+var_C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5472:
mov rdi, [rsp+0D8h+var_B8]; void *
lea rax, [rsp+0D8h+var_A8]
cmp rdi, rax
jz short loc_548E
mov rsi, [rsp+0D8h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_548E:
mov rdi, [rsp+0D8h+var_90]; void *
cmp rdi, rbp
jz short loc_54A5
mov rsi, [rsp+0D8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_54A5:
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp loc_556F
jmp short loc_54C0
jmp short loc_550A
loc_54C0:
mov rbx, rax
jmp loc_554B
mov rbx, rax
mov rdi, [rsp+arg_60]; void *
cmp rdi, r14
jz short loc_5514
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5514
mov rbx, rax
mov rdi, [rsp+arg_80]; void *
cmp rdi, rbp
jz short loc_5572
mov rsi, [rsp+arg_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5572
jmp short loc_5511
jmp short $+2
loc_550A:
mov rbx, rax
jmp short loc_552F
jmp short $+2
loc_5511:
mov rbx, rax
loc_5514:
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_552F
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_552F:
mov rdi, [rsp+arg_18]; void *
lea rax, [rsp+arg_28]
cmp rdi, rax
jz short loc_554B
loc_553E:
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_554B:
mov rdi, [rsp+arg_40]; void *
lea rax, [rsp+arg_50]
cmp rdi, rax
jz short loc_5567
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5567:
mov rdi, rbx
call __Unwind_Resume
loc_556F:
mov rbx, rax
loc_5572:
mov rdi, [rsp+arg_18]
cmp rdi, r14
jnz short loc_553E
jmp short loc_554B
| void UCIAdapter::handlePosition(_QWORD *a1, long long a2)
{
int v2; // r14d
_QWORD *v3; // rax
long long v4; // r13
long long v5; // r15
_QWORD *v6; // rax
long long v7; // r13
void *v8; // [rsp+0h] [rbp-D8h] BYREF
long long v9; // [rsp+8h] [rbp-D0h]
_QWORD v10[2]; // [rsp+10h] [rbp-C8h] BYREF
void *v11; // [rsp+20h] [rbp-B8h] BYREF
long long v12; // [rsp+28h] [rbp-B0h]
_QWORD v13[2]; // [rsp+30h] [rbp-A8h] BYREF
_QWORD *v14; // [rsp+40h] [rbp-98h]
void *v15; // [rsp+48h] [rbp-90h] BYREF
long long v16; // [rsp+50h] [rbp-88h]
_QWORD v17[2]; // [rsp+58h] [rbp-80h] BYREF
void *v18[2]; // [rsp+68h] [rbp-70h] BYREF
_QWORD v19[2]; // [rsp+78h] [rbp-60h] BYREF
void *v20[2]; // [rsp+88h] [rbp-50h] BYREF
_QWORD v21[8]; // [rsp+98h] [rbp-40h] BYREF
v14 = a1;
v15 = v17;
v16 = 0LL;
LOBYTE(v17[0]) = 0;
std::operator>><char>(a2, &v15);
if ( !(unsigned int)std::string::compare(&v15, "startpos") )
{
v5 = *v14;
v11 = v13;
std::string::_M_construct<char const*>(
(long long)&v11,
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
(long long)"");
Engine::setPosition(v5, &v11);
if ( v11 != v13 )
operator delete(v11, v13[0] + 1LL);
std::operator>><char>(a2, &v15);
if ( !(unsigned int)std::string::compare(&v15, "moves") )
{
v11 = v13;
v12 = 0LL;
LOBYTE(v13[0]) = 0;
while ( 1 )
{
v6 = (_QWORD *)std::operator>><char>(a2, &v11);
if ( (*((_BYTE *)v6 + *(_QWORD *)(*v6 - 24LL) + 32) & 5) != 0 )
break;
v7 = *v14;
v20[0] = v21;
std::string::_M_construct<char *>(v20, v11, (char *)v11 + v12);
Engine::makeMove(v7, v20);
if ( v20[0] != v21 )
operator delete(v20[0], v21[0] + 1LL);
}
if ( v11 != v13 )
operator delete(v11, v13[0] + 1LL);
}
}
else if ( !(unsigned int)std::string::compare(&v15, "fen") )
{
v11 = v13;
v12 = 0LL;
LOBYTE(v13[0]) = 0;
v2 = 6;
do
{
std::operator>><char>(a2, &v15);
v8 = v10;
std::string::_M_construct<char *>(&v8, v15, (char *)v15 + v16);
std::string::append(&v8, " ");
std::string::_M_append(&v11, v8, v9);
if ( v8 != v10 )
operator delete(v8, v10[0] + 1LL);
--v2;
}
while ( v2 );
Engine::setPosition(*v14, &v11);
std::operator>><char>(a2, &v15);
if ( !(unsigned int)std::string::compare(&v15, "moves") )
{
v8 = v10;
v9 = 0LL;
LOBYTE(v10[0]) = 0;
while ( 1 )
{
v3 = (_QWORD *)std::operator>><char>(a2, &v8);
if ( (*((_BYTE *)v3 + *(_QWORD *)(*v3 - 24LL) + 32) & 5) != 0 )
break;
v4 = *v14;
v18[0] = v19;
std::string::_M_construct<char *>(v18, v8, (char *)v8 + v9);
Engine::makeMove(v4, v18);
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
}
if ( v8 != v10 )
operator delete(v8, v10[0] + 1LL);
}
if ( v11 != v13 )
operator delete(v11, v13[0] + 1LL);
}
if ( v15 != v17 )
operator delete(v15, v17[0] + 1LL);
}
| handlePosition:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV RBX,RSI
MOV qword ptr [RSP + 0x40],RDI
LEA RBP,[RSP + 0x58]
MOV qword ptr [RBP + -0x10],RBP
MOV qword ptr [RBP + -0x8],0x0
MOV byte ptr [RBP],0x0
LAB_001051a6:
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00102270
LEA RSI,[0x10cb57]
LEA RDI,[RSP + 0x48]
CALL 0x00102060
TEST EAX,EAX
JZ 0x00105339
LEA RSI,[0x10cb66]
LEA RDI,[RSP + 0x48]
CALL 0x00102060
TEST EAX,EAX
JNZ 0x0010548e
LEA RAX,[RSP + 0x30]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
MOV R14D,0x6
LEA R15,[RSP + 0x48]
MOV R12,RSP
LEA R13,[0x10ec68]
LEA RBP,[RSP + 0x20]
LAB_00105213:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00102270
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
ADD RDX,RSI
LAB_00105234:
MOV RDI,R12
CALL 0x0010596e
LAB_0010523c:
MOV RDI,R12
MOV RSI,R13
CALL 0x001023a0
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
LAB_00105250:
MOV RDI,RBP
CALL 0x00102070
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x00105273
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00102210
LAB_00105273:
DEC R14D
JNZ 0x00105213
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,qword ptr [RAX]
LAB_00105280:
LEA RSI,[RSP + 0x20]
CALL 0x00105a84
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00102270
LEA RSI,[0x10cb60]
LEA RDI,[RSP + 0x48]
CALL 0x00102060
TEST EAX,EAX
LEA RBP,[RSP + 0x58]
JNZ 0x00105472
MOV R15,RSP
LEA RAX,[RSP + 0x10]
MOV qword ptr [R15],RAX
MOV qword ptr [R15 + 0x8],0x0
MOV byte ptr [R15 + 0x10],0x0
LEA R14,[RSP + 0x78]
LEA R12,[RSP + 0x68]
LAB_001052d7:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00102270
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00105457
MOV RAX,qword ptr [RSP + 0x40]
MOV R13,qword ptr [RAX]
MOV qword ptr [RSP + 0x68],R14
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
ADD RDX,RSI
MOV RDI,R12
CALL 0x0010596e
LAB_00105315:
MOV RDI,R13
MOV RSI,R12
CALL 0x00105ae4
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x001052d7
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x00102210
JMP 0x001052d7
LAB_00105339:
MOV RAX,qword ptr [RSP + 0x40]
MOV R15,qword ptr [RAX]
LEA R14,[RSP + 0x30]
MOV qword ptr [R14 + -0x10],R14
LAB_0010534a:
LEA RSI,[0x10c5b1]
LEA RDX,[0x10c5e9]
LEA RDI,[RSP + 0x20]
CALL 0x00103ff8
LAB_00105362:
LEA RSI,[RSP + 0x20]
MOV RDI,R15
CALL 0x00105a84
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R14
JZ 0x00105386
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x00102210
LAB_00105386:
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00102270
LEA RSI,[0x10cb60]
LEA RDI,[RSP + 0x48]
CALL 0x00102060
TEST EAX,EAX
JNZ 0x0010548e
LEA R15,[RSP + 0x20]
MOV qword ptr [R15],R14
MOV qword ptr [R15 + 0x8],0x0
MOV byte ptr [R15 + 0x10],0x0
LEA RBP,[RSP + 0x98]
LEA R12,[RSP + 0x88]
LAB_001053d1:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00102270
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00105439
MOV RAX,qword ptr [RSP + 0x40]
MOV R13,qword ptr [RAX]
MOV qword ptr [RSP + 0x88],RBP
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
ADD RDX,RSI
MOV RDI,R12
CALL 0x0010596e
LAB_0010540f:
MOV RDI,R13
MOV RSI,R12
CALL 0x00105ae4
LAB_0010541a:
MOV RDI,qword ptr [RSP + 0x88]
CMP RDI,RBP
JZ 0x001053d1
MOV RSI,qword ptr [RSP + 0x98]
INC RSI
CALL 0x00102210
JMP 0x001053d1
LAB_00105439:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R14
JZ 0x00105450
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x00102210
LAB_00105450:
LEA RBP,[RSP + 0x58]
JMP 0x0010548e
LAB_00105457:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x00105472
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00102210
LAB_00105472:
MOV RDI,qword ptr [RSP + 0x20]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x0010548e
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x00102210
LAB_0010548e:
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,RBP
JZ 0x001054a5
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x00102210
LAB_001054a5:
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* UCIAdapter::handlePosition(std::__cxx11::istringstream&) */
void __thiscall UCIAdapter::handlePosition(UCIAdapter *this,istringstream *param_1)
{
int8 uVar1;
Engine *this_00;
int iVar2;
istream *piVar3;
int1 *local_d8;
long local_d0;
int1 local_c8;
int7 uStack_c7;
int1 *local_b8;
long local_b0;
int1 local_a8;
int7 uStack_a7;
UCIAdapter *local_98;
int1 *local_90;
long local_88;
int1 local_80;
int7 uStack_7f;
long *local_70 [2];
long local_60 [2];
long *local_50 [2];
long local_40 [2];
local_90 = &local_80;
local_88 = 0;
local_80 = 0;
/* try { // try from 001051a6 to 001051b2 has its CatchHandler @ 001054c0 */
local_98 = this;
std::operator>>((istream *)param_1,(string *)&local_90);
iVar2 = std::__cxx11::string::compare((char *)&local_90);
if (iVar2 == 0) {
this_00 = *(Engine **)local_98;
/* try { // try from 0010534a to 00105361 has its CatchHandler @ 001054bc */
local_b8 = &local_a8;
std::__cxx11::string::_M_construct<char_const*>(&local_b8,&DAT_0010c5b1,&DAT_0010c5e9);
/* try { // try from 00105362 to 0010536e has its CatchHandler @ 001054b7 */
Engine::setPosition(this_00,(string *)&local_b8);
if (local_b8 != &local_a8) {
operator_delete(local_b8,CONCAT71(uStack_a7,local_a8) + 1);
}
/* try { // try from 00105386 to 00105392 has its CatchHandler @ 001054c0 */
std::operator>>((istream *)param_1,(string *)&local_90);
iVar2 = std::__cxx11::string::compare((char *)&local_90);
if (iVar2 == 0) {
local_b0 = 0;
local_a8 = 0;
local_b8 = &local_a8;
/* try { // try from 001053d1 to 0010540e has its CatchHandler @ 0010556f */
while (piVar3 = std::operator>>((istream *)param_1,(string *)&local_b8),
((byte)piVar3[*(long *)(*(long *)piVar3 + -0x18) + 0x20] & 5) == 0) {
uVar1 = *(int8 *)local_98;
local_50[0] = local_40;
std::__cxx11::string::_M_construct<char*>(local_50,local_b8,local_b8 + local_b0);
/* try { // try from 0010540f to 00105419 has its CatchHandler @ 001054e4 */
Engine::makeMove(uVar1,local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
}
if (local_b8 != &local_a8) {
operator_delete(local_b8,CONCAT71(uStack_a7,local_a8) + 1);
}
}
}
else {
iVar2 = std::__cxx11::string::compare((char *)&local_90);
if (iVar2 == 0) {
local_b8 = &local_a8;
local_b0 = 0;
local_a8 = 0;
iVar2 = 6;
do {
/* try { // try from 00105213 to 0010521d has its CatchHandler @ 00105508 */
std::operator>>((istream *)param_1,(string *)&local_90);
local_d8 = &local_c8;
/* try { // try from 00105234 to 0010523b has its CatchHandler @ 0010550a */
std::__cxx11::string::_M_construct<char*>(&local_d8,local_90,local_90 + local_88);
/* try { // try from 0010523c to 00105246 has its CatchHandler @ 0010550f */
std::__cxx11::string::append((char *)&local_d8);
/* try { // try from 00105250 to 00105257 has its CatchHandler @ 00105511 */
std::__cxx11::string::_M_append((char *)&local_b8,(ulong)local_d8);
if (local_d8 != &local_c8) {
operator_delete(local_d8,CONCAT71(uStack_c7,local_c8) + 1);
}
iVar2 = iVar2 + -1;
} while (iVar2 != 0);
/* try { // try from 00105280 to 00105296 has its CatchHandler @ 001054be */
Engine::setPosition(*(Engine **)local_98,(string *)&local_b8);
std::operator>>((istream *)param_1,(string *)&local_90);
iVar2 = std::__cxx11::string::compare((char *)&local_90);
if (iVar2 == 0) {
local_d8 = &local_c8;
local_d0 = 0;
local_c8 = 0;
/* try { // try from 001052d7 to 00105314 has its CatchHandler @ 00105506 */
while (piVar3 = std::operator>>((istream *)param_1,(string *)&local_d8),
((byte)piVar3[*(long *)(*(long *)piVar3 + -0x18) + 0x20] & 5) == 0) {
uVar1 = *(int8 *)local_98;
local_70[0] = local_60;
std::__cxx11::string::_M_construct<char*>(local_70,local_d8,local_d8 + local_d0);
/* try { // try from 00105315 to 0010531f has its CatchHandler @ 001054c8 */
Engine::makeMove(uVar1,local_70);
if (local_70[0] != local_60) {
operator_delete(local_70[0],local_60[0] + 1);
}
}
if (local_d8 != &local_c8) {
operator_delete(local_d8,CONCAT71(uStack_c7,local_c8) + 1);
}
}
if (local_b8 != &local_a8) {
operator_delete(local_b8,CONCAT71(uStack_a7,local_a8) + 1);
}
}
}
if (local_90 != &local_80) {
operator_delete(local_90,CONCAT71(uStack_7f,local_80) + 1);
}
return;
}
| |
52,594 | google::protobuf::internal::ReadVarintZigZag64(char const**) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.h | inline int64_t ReadVarintZigZag64(const char** p) {
uint64_t tmp;
*p = VarintParse(*p, &tmp);
return WireFormatLite::ZigZagDecode64(tmp);
} | O3 | c | google::protobuf::internal::ReadVarintZigZag64(char const**):
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movsbq (%rdi), %rax
leaq 0x1(%rdi), %rcx
testq %rax, %rax
jns 0x8fa6d
movzbl %al, %eax
movzbl (%rcx), %ecx
movl %ecx, %edx
shll $0x7, %edx
leal (%rax,%rdx), %esi
addl $-0x80, %esi
testb %cl, %cl
js 0x8fa62
movl %esi, %eax
addq $0x2, %rdi
movq %rdi, %rcx
jmp 0x8fa6d
callq 0x9f216
movq %rax, %rcx
movq %rdx, %rax
movq %rcx, (%rbx)
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
negq %rax
xorq %rcx, %rax
popq %rbx
retq
nop
| _ZN6google8protobuf8internal18ReadVarintZigZag64EPPKc:
push rbx
mov rbx, rdi
mov rdi, [rdi]; this
movsx rax, byte ptr [rdi]
lea rcx, [rdi+1]
test rax, rax
jns short loc_8FA6D
movzx eax, al
movzx ecx, byte ptr [rcx]
mov edx, ecx
shl edx, 7; unsigned int
lea esi, [rax+rdx]
add esi, 0FFFFFF80h; char *
test cl, cl
js short loc_8FA62
mov eax, esi
add rdi, 2
mov rcx, rdi
jmp short loc_8FA6D
loc_8FA62:
call _ZN6google8protobuf8internal17VarintParseSlow64EPKcj; google::protobuf::internal::VarintParseSlow64(char const*,uint)
mov rcx, rax
mov rax, rdx
loc_8FA6D:
mov [rbx], rcx
mov rcx, rax
shr rcx, 1
and eax, 1
neg rax
xor rax, rcx
pop rbx
retn
| unsigned long long google::protobuf::internal::ReadVarintZigZag64(
google::protobuf::internal **this,
const char **a2)
{
google::protobuf::internal *v3; // rdi
long long v4; // rax
google::protobuf::internal *v5; // rcx
int v6; // ecx
const char *v7; // rsi
long long v8; // rdx
v3 = *this;
v4 = *(char *)v3;
v5 = (google::protobuf::internal *)((char *)v3 + 1);
if ( v4 < 0 )
{
v6 = *(unsigned __int8 *)v5;
v7 = (const char *)((unsigned int)(unsigned __int8)v4 + (v6 << 7) - 128);
if ( (v6 & 0x80u) != 0 )
{
v5 = (google::protobuf::internal *)google::protobuf::internal::VarintParseSlow64(v3, v7, v6 << 7);
v4 = v8;
}
else
{
v4 = (unsigned int)v7;
v5 = (google::protobuf::internal *)((char *)v3 + 2);
}
}
*this = v5;
return ((unsigned long long)v4 >> 1) ^ -(v4 & 1);
}
| ReadVarintZigZag64:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
MOVSX RAX,byte ptr [RDI]
LEA RCX,[RDI + 0x1]
TEST RAX,RAX
JNS 0x0018fa6d
MOVZX EAX,AL
MOVZX ECX,byte ptr [RCX]
MOV EDX,ECX
SHL EDX,0x7
LEA ESI,[RAX + RDX*0x1]
ADD ESI,-0x80
TEST CL,CL
JS 0x0018fa62
MOV EAX,ESI
ADD RDI,0x2
MOV RCX,RDI
JMP 0x0018fa6d
LAB_0018fa62:
CALL 0x0019f216
MOV RCX,RAX
MOV RAX,RDX
LAB_0018fa6d:
MOV qword ptr [RBX],RCX
MOV RCX,RAX
SHR RCX,0x1
AND EAX,0x1
NEG RAX
XOR RAX,RCX
POP RBX
RET
|
/* google::protobuf::internal::ReadVarintZigZag64(char const**) */
ulong google::protobuf::internal::ReadVarintZigZag64(char **param_1)
{
byte bVar1;
byte bVar2;
byte *pbVar3;
uint uVar4;
int1 auVar5 [16];
pbVar3 = (byte *)*param_1;
bVar1 = *pbVar3;
auVar5._8_8_ = (long)(char)bVar1;
auVar5._0_8_ = pbVar3 + 1;
if ((long)(char)bVar1 < 0) {
bVar2 = pbVar3[1];
uVar4 = ((uint)bVar1 + (uint)bVar2 * 0x80) - 0x80;
if ((char)bVar2 < '\0') {
auVar5 = VarintParseSlow64((char *)pbVar3,uVar4);
}
else {
auVar5._8_4_ = uVar4;
auVar5._0_8_ = pbVar3 + 2;
auVar5._12_4_ = 0;
}
}
*param_1 = auVar5._0_8_;
return -(ulong)(auVar5._8_4_ & 1) ^ auVar5._8_8_ >> 1;
}
| |
52,595 | my_is_printable | eloqsql/strings/ctype.c | static inline my_bool
my_is_printable(my_wc_t wc)
{
/*
Blocks:
U+0000 .. U+001F control
U+0020 .. U+007E printable
U+007F .. U+009F control
U+00A0 .. U+00FF printable
U+0100 .. U+10FFFF As of Unicode-6.1.0, this range does not have any
characters of the "Cc" (Other, control) category.
Should be mostly safe to print.
Except for the surrogate halfs,
which are encoding components, not real characters.
*/
if (wc >= 0x20 && wc <= 0x7E) /* Quickly detect ASCII printable */
return TRUE;
if (wc <= 0x9F) /* The rest of U+0000..U+009F are control characters */
{
/* NL, CR, TAB are Ok */
return (wc == '\r' || wc == '\n' || wc == '\t');
}
/*
Surrogate halfs (when alone) print badly in terminals:
SELECT _ucs2 0xD800;
Let's escape them as well.
*/
if (wc >= 0xD800 && wc <= 0xDFFF)
return FALSE;
return TRUE;
} | O0 | c | my_is_printable:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x20, -0x10(%rbp)
jb 0x6b85c
cmpq $0x7e, -0x10(%rbp)
ja 0x6b85c
movb $0x1, -0x1(%rbp)
jmp 0x6b8b4
cmpq $0x9f, -0x10(%rbp)
ja 0x6b896
movb $0x1, %al
cmpq $0xd, -0x10(%rbp)
movb %al, -0x11(%rbp)
je 0x6b889
movb $0x1, %al
cmpq $0xa, -0x10(%rbp)
movb %al, -0x11(%rbp)
je 0x6b889
cmpq $0x9, -0x10(%rbp)
sete %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
jmp 0x6b8b4
cmpq $0xd800, -0x10(%rbp) # imm = 0xD800
jb 0x6b8b0
cmpq $0xdfff, -0x10(%rbp) # imm = 0xDFFF
ja 0x6b8b0
movb $0x0, -0x1(%rbp)
jmp 0x6b8b4
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax)
| my_is_printable:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
cmp [rbp+var_10], 20h ; ' '
jb short loc_6B85C
cmp [rbp+var_10], 7Eh ; '~'
ja short loc_6B85C
mov [rbp+var_1], 1
jmp short loc_6B8B4
loc_6B85C:
cmp [rbp+var_10], 9Fh
ja short loc_6B896
mov al, 1
cmp [rbp+var_10], 0Dh
mov [rbp+var_11], al
jz short loc_6B889
mov al, 1
cmp [rbp+var_10], 0Ah
mov [rbp+var_11], al
jz short loc_6B889
cmp [rbp+var_10], 9
setz al
mov [rbp+var_11], al
loc_6B889:
mov al, [rbp+var_11]
and al, 1
movzx eax, al
mov [rbp+var_1], al
jmp short loc_6B8B4
loc_6B896:
cmp [rbp+var_10], 0D800h
jb short loc_6B8B0
cmp [rbp+var_10], 0DFFFh
ja short loc_6B8B0
mov [rbp+var_1], 0
jmp short loc_6B8B4
loc_6B8B0:
mov [rbp+var_1], 1
loc_6B8B4:
mov al, [rbp+var_1]
pop rbp
retn
| bool my_is_printable(unsigned long long a1)
{
bool v2; // [rsp+1h] [rbp-11h]
if ( a1 >= 0x20 && a1 <= 0x7E )
return 1;
if ( a1 > 0x9F )
return a1 < 0xD800 || a1 > 0xDFFF;
v2 = 1;
if ( a1 != 13 )
{
v2 = 1;
if ( a1 != 10 )
return a1 == 9;
}
return v2;
}
| my_is_printable:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x20
JC 0x0016b85c
CMP qword ptr [RBP + -0x10],0x7e
JA 0x0016b85c
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0016b8b4
LAB_0016b85c:
CMP qword ptr [RBP + -0x10],0x9f
JA 0x0016b896
MOV AL,0x1
CMP qword ptr [RBP + -0x10],0xd
MOV byte ptr [RBP + -0x11],AL
JZ 0x0016b889
MOV AL,0x1
CMP qword ptr [RBP + -0x10],0xa
MOV byte ptr [RBP + -0x11],AL
JZ 0x0016b889
CMP qword ptr [RBP + -0x10],0x9
SETZ AL
MOV byte ptr [RBP + -0x11],AL
LAB_0016b889:
MOV AL,byte ptr [RBP + -0x11]
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
JMP 0x0016b8b4
LAB_0016b896:
CMP qword ptr [RBP + -0x10],0xd800
JC 0x0016b8b0
CMP qword ptr [RBP + -0x10],0xdfff
JA 0x0016b8b0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0016b8b4
LAB_0016b8b0:
MOV byte ptr [RBP + -0x1],0x1
LAB_0016b8b4:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
bool my_is_printable(ulong param_1)
{
int1 local_19;
int1 local_9;
if ((param_1 < 0x20) || (0x7e < param_1)) {
if (param_1 < 0xa0) {
local_19 = true;
if ((param_1 != 0xd) && (local_19 = true, param_1 != 10)) {
local_19 = param_1 == 9;
}
local_9 = local_19;
}
else if ((param_1 < 0xd800) || (0xdfff < param_1)) {
local_9 = true;
}
else {
local_9 = false;
}
}
else {
local_9 = true;
}
return local_9;
}
| |
52,596 | minja::LoopControlException::LoopControlException(minja::LoopControlType) | monkey531[P]llama/common/minja.hpp | LoopControlException(LoopControlType control_type)
: std::runtime_error((control_type == LoopControlType::Continue ? "continue" : "break") + std::string(" outside of a loop")),
control_type(control_type) {} | O2 | cpp | minja::LoopControlException::LoopControlException(minja::LoopControlType):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x3de8f(%rip), %rsi # 0xb9f4e
leaq 0x30(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rdi
callq 0x2a75e
cmpl $0x1, %ebx
leaq 0x3cb3c(%rip), %rax # 0xb8c17
leaq 0x3cb2f(%rip), %rsi # 0xb8c11
cmoveq %rax, %rsi
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0x5d362
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x24b20
leaq 0x10(%rsp), %rdi
callq 0x25258
leaq 0x30(%rsp), %rdi
callq 0x25258
leaq 0x86efd(%rip), %rax # 0x103018
addq $0x10, %rax
movq %rax, (%r14)
movl %ebx, 0x10(%r14)
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x25258
jmp 0x7c142
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x25258
movq %rbx, %rdi
callq 0x24fe0
| _ZN5minja20LoopControlExceptionC2ENS_15LoopControlTypeE:
push r15
push r14
push rbx
sub rsp, 50h
mov ebx, esi
mov r14, rdi
lea rsi, aOutsideOfALoop; " outside of a loop"
lea r15, [rsp+68h+var_38]
lea rdx, [rsp+68h+var_59]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
cmp ebx, 1
lea rax, aContinue; "continue"
lea rsi, aBreak; "break"
cmovz rsi, rax
lea rdi, [rsp+68h+var_58]
mov rdx, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rsi, [rsp+68h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
lea rdi, [rsp+68h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+68h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rax, _ZTVN5minja20LoopControlExceptionE; `vtable for'minja::LoopControlException
add rax, 10h
mov [r14], rax
mov [r14+10h], ebx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_7C142
mov rbx, rax
loc_7C142:
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long * minja::LoopControlException::LoopControlException(long long a1, int a2)
{
const char *v3; // rsi
long long *result; // rax
_BYTE v5[32]; // [rsp+10h] [rbp-58h] BYREF
_QWORD v6[7]; // [rsp+30h] [rbp-38h] BYREF
std::string::basic_string<std::allocator<char>>(v6, (long long)" outside of a loop");
v3 = "break";
if ( a2 == 1 )
v3 = "continue";
std::operator+<char>((long long)v5, (long long)v3, (long long)v6);
std::runtime_error::runtime_error(a1);
std::string::~string(v5);
std::string::~string(v6);
result = &`vtable for'minja::LoopControlException + 2;
*(_QWORD *)a1 = &`vtable for'minja::LoopControlException + 2;
*(_DWORD *)(a1 + 16) = a2;
return result;
}
| LoopControlException:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV EBX,ESI
MOV R14,RDI
LEA RSI,[0x1b9f4e]
LEA R15,[RSP + 0x30]
LEA RDX,[RSP + 0xf]
MOV RDI,R15
CALL 0x0012a75e
CMP EBX,0x1
LEA RAX,[0x1b8c17]
LEA RSI,[0x1b8c11]
CMOVZ RSI,RAX
LAB_0017c0e6:
LEA RDI,[RSP + 0x10]
MOV RDX,R15
CALL 0x0015d362
LAB_0017c0f3:
LEA RSI,[RSP + 0x10]
MOV RDI,R14
CALL 0x00124b20
LAB_0017c100:
LEA RDI,[RSP + 0x10]
CALL 0x00125258
LEA RDI,[RSP + 0x30]
CALL 0x00125258
LEA RAX,[0x203018]
ADD RAX,0x10
MOV qword ptr [R14],RAX
MOV dword ptr [R14 + 0x10],EBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* minja::LoopControlException::LoopControlException(minja::LoopControlType) */
void __thiscall
minja::LoopControlException::LoopControlException(LoopControlException *this,int param_2)
{
char *pcVar1;
allocator local_59;
string local_58 [32];
string local_38 [32];
std::__cxx11::string::string<std::allocator<char>>(local_38," outside of a loop",&local_59);
pcVar1 = "break";
if (param_2 == 1) {
pcVar1 = "continue";
}
/* try { // try from 0017c0e6 to 0017c0f2 has its CatchHandler @ 0017c13f */
std::operator+((char *)local_58,(string *)pcVar1);
/* try { // try from 0017c0f3 to 0017c0ff has its CatchHandler @ 0017c130 */
std::runtime_error::runtime_error((runtime_error *)this,local_58);
std::__cxx11::string::~string(local_58);
std::__cxx11::string::~string(local_38);
*(int ***)this = &PTR__runtime_error_00203028;
*(int *)(this + 0x10) = param_2;
return;
}
| |
52,597 | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::createUnOrderedEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*, short*, int const*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp | int UnorderedSubset::createUnOrderedEdges(Edge* edges, short* feEdges, Index const* fvIndices) const {
// Optional map to help construction for high valence:
std::map<Index, int> edgeMap;
bool useMap = (_vdesc.numFaces > 16);
// Iterate through the face-edge pairs to find connecting edges:
Index vCorner = _vdesc.getFaceIndexAtCorner(0, fvIndices);
int numFaceEdges = 2 * _vdesc.numFaces;
int numEdges = 0;
// Don't rely on the tag yet to determine presence of sharpness:
bool hasSharpness = _vdesc.hasEdgeSharpness;
for (int feIndex = 0; feIndex < numFaceEdges; ++feIndex) {
Index vIndex = (feIndex & 1) ?
_vdesc.getFaceIndexTrailing((feIndex >> 1), fvIndices) :
_vdesc.getFaceIndexLeading((feIndex >> 1), fvIndices);
int eIndex = -1;
if (vIndex != vCorner) {
if (useMap) {
if (auto eFound = edgeMap.find(vIndex); eFound != edgeMap.end())
eIndex = eFound->second;
else
edgeMap[vIndex] = numEdges;
} else {
for (int j = 0; j < numEdges; ++j)
if (edges[j].endVertex == vIndex) {
eIndex = j;
break;
}
}
// Update an existing edge or create a new one
if (eIndex >= 0) {
edges[eIndex].addFace(feIndex >> 1, feIndex & 1);
} else {
// Index of the new (pre-allocated, but not initialized) edge:
eIndex = numEdges++;
Edge& e = edges[eIndex] = {};
e.endVertex = vIndex;
e.boundary = true;
e.setFace(feIndex >> 1, feIndex & 1);
if (hasSharpness)
e.setSharpness(_vdesc.faceEdgeSharpness[feIndex]);
}
} else {
// If degenerate, create unique edge (non-manifold)
eIndex = numEdges++;
edges[eIndex].endVertex = vIndex;
edges[eIndex].setDegenerate();
}
assert(eIndex >= 0);
feEdges[feIndex] = (short)eIndex;
}
return numEdges;
} | O2 | cpp | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::createUnOrderedEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*, short*, int const*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, 0x20(%rsp)
movq %rdx, 0x38(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0x50(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movzwl 0x4(%rdi), %eax
movq %rax, 0x30(%rsp)
xorl %r15d, %r15d
cmpw $0x0, 0x6(%rdi)
je 0xba650
xorl %eax, %eax
jmp 0xba657
movq 0x10(%rdi), %rax
movslq (%rax), %rax
movq 0x20(%rsp), %rcx
movl (%rcx,%rax,4), %r13d
movq 0x30(%rsp), %rax
addl %eax, %eax
movq %rax, 0x40(%rsp)
movb 0x8(%rdi), %al
movb %al, 0xb(%rsp)
xorl %r12d, %r12d
movq %rdi, 0x18(%rsp)
movl %r13d, 0x2c(%rsp)
cmpq 0x40(%rsp), %r12
je 0xba80b
movl %r12d, %r14d
shrl %r14d
movl %r12d, %ebp
andl $0x1, %ebp
je 0xba6a8
movl %r14d, %esi
movq 0x20(%rsp), %rdx
callq 0x4f780
jmp 0xba6cb
movzwl 0x6(%rdi), %eax
testl %eax, %eax
je 0xba6b6
imull %r14d, %eax
jmp 0xba6c0
movq 0x10(%rdi), %rax
movl %r14d, %ecx
movl (%rax,%rcx,4), %eax
cltq
movq 0x20(%rsp), %rcx
movl 0x4(%rcx,%rax,4), %eax
movl %eax, 0xc(%rsp)
movslq %r15d, %rbx
cmpl %r13d, %eax
jne 0xba6fa
shlq $0x4, %rbx
movq 0x10(%rsp), %rcx
movl %r13d, (%rcx,%rbx)
movb 0xc(%rcx,%rbx), %al
andb $-0x18, %al
orb $0x14, %al
movb %al, 0xc(%rcx,%rbx)
movq 0x18(%rsp), %rdi
jmp 0xba7e5
cmpw $0x10, 0x30(%rsp)
jbe 0xba744
leaq 0x48(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x554a0
leaq 0x50(%rsp), %rcx
cmpq %rcx, %rax
je 0xba76a
movl 0x24(%rax), %r13d
testl %r13d, %r13d
js 0xba77c
movl %r13d, %edi
shlq $0x4, %rdi
addq 0x10(%rsp), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x54c40
movq 0x18(%rsp), %rdi
jmp 0xba7f4
testl %r15d, %r15d
movl $0x0, %ecx
cmovgl %r15d, %ecx
movq 0x10(%rsp), %rdx
xorl %r13d, %r13d
cmpq %r13, %rcx
je 0xba77c
cmpl %eax, (%rdx)
je 0xba71f
incq %r13
addq $0x10, %rdx
jmp 0xba758
leaq 0x48(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x511d0
movl %r15d, (%rax)
xorl %ecx, %ecx
testl %ebp, %ebp
sete %cl
shlq $0x4, %rbx
movq 0x10(%rsp), %rsi
orq $-0x1, 0x4(%rsi,%rbx)
leaq (%rsi,%rbx), %rax
shlb $0x3, %bpl
incb %bpl
movl 0xc(%rsp), %edx
movl %edx, (%rsi,%rbx)
movb %bpl, 0xc(%rsi,%rbx)
movl %r14d, 0x4(%rax,%rcx,4)
testb $0x10, 0xb(%rsp)
movq 0x18(%rsp), %rdi
je 0xba7e5
movq 0x68(%rdi), %rcx
movss (%rcx,%r12,4), %xmm0
ucomiss 0x3325(%rip), %xmm0 # 0xbdaf0
jbe 0xba7e5
ucomiss 0x1830(%rip), %xmm0 # 0xbc004
pushq $0x40
popq %rcx
movl $0x80, %edx
cmovbl %edx, %ecx
orb %bpl, %cl
movb %cl, 0xc(%rax)
testl %r15d, %r15d
js 0xba827
movl %r15d, %r13d
leal 0x1(%r15), %eax
movl %eax, %r15d
movq 0x38(%rsp), %rax
movw %r13w, (%rax,%r12,2)
incq %r12
movl 0x2c(%rsp), %r13d
jmp 0xba680
leaq 0x48(%rsp), %rdi
callq 0x506c0
movl %r15d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe626(%rip), %rdi # 0xc8e54
leaq 0x1658f(%rip), %rsi # 0xd0dc4
leaq 0x165e9(%rip), %rcx # 0xd0e25
movl $0x112, %edx # imm = 0x112
callq 0x512a0
jmp 0xba84a
jmp 0xba84a
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x506c0
movq %rbx, %rdi
callq 0x55300
nop
| _ZNK10OpenSubdiv6v3_6_03Tmr15UnorderedSubset20createUnOrderedEdgesEPNS2_4EdgeEPsPKi:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov [rsp+0A8h+var_88], rcx
mov [rsp+0A8h+var_70], rdx
mov [rsp+0A8h+var_98], rsi
lea rax, [rsp+0A8h+var_58]
and dword ptr [rax], 0
and qword ptr [rax+8], 0
mov [rax+10h], rax
mov [rax+18h], rax
and qword ptr [rax+20h], 0
movzx eax, word ptr [rdi+4]
mov [rsp+0A8h+var_78], rax
xor r15d, r15d
cmp word ptr [rdi+6], 0
jz short loc_BA650
xor eax, eax
jmp short loc_BA657
loc_BA650:
mov rax, [rdi+10h]
movsxd rax, dword ptr [rax]
loc_BA657:
mov rcx, [rsp+0A8h+var_88]
mov r13d, [rcx+rax*4]
mov rax, [rsp+0A8h+var_78]
add eax, eax
mov [rsp+0A8h+var_68], rax
mov al, [rdi+8]
mov [rsp+0A8h+var_9D], al
xor r12d, r12d
mov [rsp+0A8h+var_90], rdi
mov [rsp+0A8h+var_7C], r13d
loc_BA680:
cmp r12, [rsp+0A8h+var_68]
jz loc_BA80B
mov r14d, r12d
shr r14d, 1
mov ebp, r12d
and ebp, 1
jz short loc_BA6A8
mov esi, r14d; int
mov rdx, [rsp+0A8h+var_88]; int *
call __ZNK10OpenSubdiv6v3_6_03Tmr15UnorderedSubset16VertexDescriptor20getFaceIndexTrailingEiPKi; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::getFaceIndexTrailing(int,int const*)
jmp short loc_BA6CB
loc_BA6A8:
movzx eax, word ptr [rdi+6]
test eax, eax
jz short loc_BA6B6
imul eax, r14d
jmp short loc_BA6C0
loc_BA6B6:
mov rax, [rdi+10h]
mov ecx, r14d
mov eax, [rax+rcx*4]
loc_BA6C0:
cdqe
mov rcx, [rsp+0A8h+var_88]
mov eax, [rcx+rax*4+4]
loc_BA6CB:
mov [rsp+0A8h+var_9C], eax
movsxd rbx, r15d
cmp eax, r13d
jnz short loc_BA6FA
shl rbx, 4
mov rcx, [rsp+0A8h+var_98]
mov [rcx+rbx], r13d
mov al, [rcx+rbx+0Ch]
and al, 0E8h
or al, 14h
mov [rcx+rbx+0Ch], al
mov rdi, [rsp+0A8h+var_90]
jmp loc_BA7E5
loc_BA6FA:
cmp word ptr [rsp+0A8h+var_78], 10h
jbe short loc_BA744
lea rdi, [rsp+0A8h+var_60]
lea rsi, [rsp+0A8h+var_9C]
call __ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE4findERS1_; std::_Rb_tree<int,std::pair<int const,int>,std::_Select1st<std::pair<int const,int>>,std::less<int>,std::allocator<std::pair<int const,int>>>::find(int const&)
lea rcx, [rsp+0A8h+var_58]
cmp rax, rcx
jz short loc_BA76A
mov r13d, [rax+24h]
loc_BA71F:
test r13d, r13d
js short loc_BA77C
mov edi, r13d
shl rdi, 4
add rdi, [rsp+0A8h+var_98]; this
mov esi, r14d; int
mov edx, ebp; bool
call __ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset4Edge7addFaceEib; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace(int,bool)
mov rdi, [rsp+0A8h+var_90]
jmp loc_BA7F4
loc_BA744:
test r15d, r15d
mov ecx, 0
cmovg ecx, r15d
mov rdx, [rsp+0A8h+var_98]
xor r13d, r13d
loc_BA758:
cmp rcx, r13
jz short loc_BA77C
cmp [rdx], eax
jz short loc_BA71F
inc r13
add rdx, 10h
jmp short loc_BA758
loc_BA76A:
lea rdi, [rsp+0A8h+var_60]
lea rsi, [rsp+0A8h+var_9C]
call __ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_; std::map<int,int>::operator[](int const&)
mov [rax], r15d
loc_BA77C:
xor ecx, ecx
test ebp, ebp
setz cl
shl rbx, 4
mov rsi, [rsp+0A8h+var_98]
or qword ptr [rsi+rbx+4], 0FFFFFFFFFFFFFFFFh
lea rax, [rsi+rbx]
shl bpl, 3
inc bpl
mov edx, [rsp+0A8h+var_9C]
mov [rsi+rbx], edx
mov [rsi+rbx+0Ch], bpl
mov [rax+rcx*4+4], r14d
test [rsp+0A8h+var_9D], 10h
mov rdi, [rsp+0A8h+var_90]
jz short loc_BA7E5
mov rcx, [rdi+68h]
movss xmm0, dword ptr [rcx+r12*4]
ucomiss xmm0, cs:dword_BDAF0
jbe short loc_BA7E5
ucomiss xmm0, cs:dword_BC004
push 40h ; '@'
pop rcx
mov edx, 80h
cmovb ecx, edx
or cl, bpl
mov [rax+0Ch], cl
loc_BA7E5:
test r15d, r15d
js short loc_BA827
mov r13d, r15d
lea eax, [r15+1]
mov r15d, eax
loc_BA7F4:
mov rax, [rsp+0A8h+var_70]
mov [rax+r12*2], r13w
inc r12
mov r13d, [rsp+0A8h+var_7C]
jmp loc_BA680
loc_BA80B:
lea rdi, [rsp+0A8h+var_60]
call __ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EED2Ev; std::_Rb_tree<int,std::pair<int const,int>,std::_Select1st<std::pair<int const,int>>,std::less<int>,std::allocator<std::pair<int const,int>>>::~_Rb_tree()
mov eax, r15d
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_BA827:
lea rdi, aEindex0; "eIndex >= 0"
lea rsi, aWorkspaceLlm4b_55; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntOpensubdivV_51; "int OpenSubdiv::v3_6_0::Tmr::UnorderedS"...
mov edx, 112h
call ___assert_fail
jmp short loc_BA84A
jmp short $+2
loc_BA84A:
mov rbx, rax
lea rdi, [rsp+0A8h+var_60]
call __ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EED2Ev; std::_Rb_tree<int,std::pair<int const,int>,std::_Select1st<std::pair<int const,int>>,std::less<int>,std::allocator<std::pair<int const,int>>>::~_Rb_tree()
mov rdi, rbx
call __Unwind_Resume
| long long OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::createUnOrderedEdges(
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset *this,
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *a2,
__int16 *a3,
int *a4)
{
int v4; // r15d
long long v5; // rax
int v6; // r13d
long long v7; // r12
unsigned int v8; // r14d
int v9; // ebp
int FaceIndexTrailing; // eax
int v11; // eax
long long v12; // rbx
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *v13; // rcx
int *v14; // rax
long long i; // r13
long long v16; // rcx
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *v17; // rdx
_BOOL8 v18; // rcx
long long v19; // rbx
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *v20; // rsi
char v21; // bp
float v22; // xmm0_4
char v23; // cl
char v25; // [rsp+Bh] [rbp-9Dh]
int v26; // [rsp+Ch] [rbp-9Ch] BYREF
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *v27; // [rsp+10h] [rbp-98h]
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset *v28; // [rsp+18h] [rbp-90h]
int *v29; // [rsp+20h] [rbp-88h]
int v30; // [rsp+2Ch] [rbp-7Ch]
long long v31; // [rsp+30h] [rbp-78h]
__int16 *v32; // [rsp+38h] [rbp-70h]
long long v33; // [rsp+40h] [rbp-68h]
_BYTE v34[8]; // [rsp+48h] [rbp-60h] BYREF
int v35; // [rsp+50h] [rbp-58h] BYREF
long long v36; // [rsp+58h] [rbp-50h]
int *v37; // [rsp+60h] [rbp-48h]
int *v38; // [rsp+68h] [rbp-40h]
long long v39; // [rsp+70h] [rbp-38h]
v29 = a4;
v32 = a3;
v27 = a2;
v35 = 0;
v36 = 0LL;
v37 = &v35;
v38 = &v35;
v39 = 0LL;
v31 = *((unsigned __int16 *)this + 2);
v4 = 0;
if ( *((_WORD *)this + 3) )
v5 = 0LL;
else
v5 = **((int **)this + 2);
v6 = v29[v5];
v33 = (unsigned int)(2 * v31);
v25 = *((_BYTE *)this + 8);
v7 = 0LL;
v28 = this;
v30 = v6;
while ( v7 != v33 )
{
v8 = (unsigned int)v7 >> 1;
v9 = v7 & 1;
if ( (v7 & 1) != 0 )
{
FaceIndexTrailing = OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::getFaceIndexTrailing(
this,
v8,
v29);
}
else
{
if ( *((_WORD *)this + 3) )
v11 = v8 * *((unsigned __int16 *)this + 3);
else
v11 = *(_DWORD *)(*((_QWORD *)this + 2) + 4LL * v8);
FaceIndexTrailing = v29[v11 + 1];
}
v26 = FaceIndexTrailing;
if ( FaceIndexTrailing == v6 )
{
v12 = 16LL * v4;
v13 = v27;
*(_DWORD *)((char *)v27 + v12) = v6;
*((_BYTE *)v13 + v12 + 12) = *((_BYTE *)v13 + v12 + 12) & 0xE8 | 0x14;
this = v28;
}
else
{
if ( (unsigned __int16)v31 <= 0x10u )
{
v16 = 0LL;
if ( v4 > 0 )
v16 = (unsigned int)v4;
v17 = v27;
for ( i = 0LL; v16 != i; ++i )
{
if ( *(_DWORD *)v17 == FaceIndexTrailing )
goto LABEL_17;
v17 = (OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *)((char *)v17 + 16);
}
}
else
{
v14 = (int *)std::_Rb_tree<int,std::pair<int const,int>,std::_Select1st<std::pair<int const,int>>,std::less<int>,std::allocator<std::pair<int const,int>>>::find(
v34,
&v26);
if ( v14 == &v35 )
{
*(_DWORD *)std::map<int,int>::operator[](v34, &v26) = v4;
}
else
{
LODWORD(i) = v14[9];
LABEL_17:
if ( (int)i >= 0 )
{
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge::addFace(
(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *)((char *)v27 + 16 * (unsigned int)i),
v8,
v7 & 1);
this = v28;
goto LABEL_33;
}
}
}
v18 = v9 == 0;
v19 = 16LL * v4;
v20 = v27;
*(_QWORD *)((char *)v27 + v19 + 4) = -1LL;
v21 = 8 * v9 + 1;
*(_DWORD *)((char *)v20 + v19) = v26;
*((_BYTE *)v20 + v19 + 12) = v21;
*(_DWORD *)((char *)v20 + 4 * v18 + v19 + 4) = v8;
this = v28;
if ( (v25 & 0x10) != 0 )
{
v22 = *(float *)(*((_QWORD *)v28 + 13) + 4 * v7);
if ( v22 > 0.0 )
{
v23 = 64;
if ( v22 < 10.0 )
v23 = 0x80;
*((_BYTE *)v20 + v19 + 12) = v21 | v23;
}
}
}
if ( v4 < 0 )
__assert_fail(
"eIndex >= 0",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp",
274LL,
"int OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::createUnOrderedEdges(Edge *, short *, const Index *) const");
LOWORD(i) = v4++;
LABEL_33:
v32[v7++] = i;
v6 = v30;
}
std::_Rb_tree<int,std::pair<int const,int>,std::_Select1st<std::pair<int const,int>>,std::less<int>,std::allocator<std::pair<int const,int>>>::~_Rb_tree(v34);
return (unsigned int)v4;
}
| createUnOrderedEdges:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x10],RSI
LEA RAX,[RSP + 0x50]
AND dword ptr [RAX],0x0
AND qword ptr [RAX + 0x8],0x0
MOV qword ptr [RAX + 0x10],RAX
MOV qword ptr [RAX + 0x18],RAX
AND qword ptr [RAX + 0x20],0x0
MOVZX EAX,word ptr [RDI + 0x4]
MOV qword ptr [RSP + 0x30],RAX
XOR R15D,R15D
CMP word ptr [RDI + 0x6],0x0
JZ 0x001ba650
XOR EAX,EAX
JMP 0x001ba657
LAB_001ba650:
MOV RAX,qword ptr [RDI + 0x10]
MOVSXD RAX,dword ptr [RAX]
LAB_001ba657:
MOV RCX,qword ptr [RSP + 0x20]
MOV R13D,dword ptr [RCX + RAX*0x4]
MOV RAX,qword ptr [RSP + 0x30]
ADD EAX,EAX
MOV qword ptr [RSP + 0x40],RAX
MOV AL,byte ptr [RDI + 0x8]
MOV byte ptr [RSP + 0xb],AL
XOR R12D,R12D
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x2c],R13D
LAB_001ba680:
CMP R12,qword ptr [RSP + 0x40]
JZ 0x001ba80b
MOV R14D,R12D
SHR R14D,0x1
MOV EBP,R12D
AND EBP,0x1
JZ 0x001ba6a8
LAB_001ba699:
MOV ESI,R14D
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x0014f780
JMP 0x001ba6cb
LAB_001ba6a8:
MOVZX EAX,word ptr [RDI + 0x6]
TEST EAX,EAX
JZ 0x001ba6b6
IMUL EAX,R14D
JMP 0x001ba6c0
LAB_001ba6b6:
MOV RAX,qword ptr [RDI + 0x10]
MOV ECX,R14D
MOV EAX,dword ptr [RAX + RCX*0x4]
LAB_001ba6c0:
CDQE
MOV RCX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4]
LAB_001ba6cb:
MOV dword ptr [RSP + 0xc],EAX
MOVSXD RBX,R15D
CMP EAX,R13D
JNZ 0x001ba6fa
SHL RBX,0x4
MOV RCX,qword ptr [RSP + 0x10]
MOV dword ptr [RCX + RBX*0x1],R13D
MOV AL,byte ptr [RCX + RBX*0x1 + 0xc]
AND AL,0xe8
OR AL,0x14
MOV byte ptr [RCX + RBX*0x1 + 0xc],AL
MOV RDI,qword ptr [RSP + 0x18]
JMP 0x001ba7e5
LAB_001ba6fa:
CMP word ptr [RSP + 0x30],0x10
JBE 0x001ba744
LAB_001ba702:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0xc]
CALL 0x001554a0
LEA RCX,[RSP + 0x50]
CMP RAX,RCX
JZ 0x001ba76a
MOV R13D,dword ptr [RAX + 0x24]
LAB_001ba71f:
TEST R13D,R13D
JS 0x001ba77c
MOV EDI,R13D
SHL RDI,0x4
ADD RDI,qword ptr [RSP + 0x10]
LAB_001ba730:
MOV ESI,R14D
MOV EDX,EBP
CALL 0x00154c40
MOV RDI,qword ptr [RSP + 0x18]
JMP 0x001ba7f4
LAB_001ba744:
TEST R15D,R15D
MOV ECX,0x0
CMOVG ECX,R15D
MOV RDX,qword ptr [RSP + 0x10]
XOR R13D,R13D
LAB_001ba758:
CMP RCX,R13
JZ 0x001ba77c
CMP dword ptr [RDX],EAX
JZ 0x001ba71f
INC R13
ADD RDX,0x10
JMP 0x001ba758
LAB_001ba76a:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0xc]
CALL 0x001511d0
LAB_001ba779:
MOV dword ptr [RAX],R15D
LAB_001ba77c:
XOR ECX,ECX
TEST EBP,EBP
SETZ CL
SHL RBX,0x4
MOV RSI,qword ptr [RSP + 0x10]
OR qword ptr [RSI + RBX*0x1 + 0x4],-0x1
LEA RAX,[RSI + RBX*0x1]
SHL BPL,0x3
INC BPL
MOV EDX,dword ptr [RSP + 0xc]
MOV dword ptr [RSI + RBX*0x1],EDX
MOV byte ptr [RSI + RBX*0x1 + 0xc],BPL
MOV dword ptr [RAX + RCX*0x4 + 0x4],R14D
TEST byte ptr [RSP + 0xb],0x10
MOV RDI,qword ptr [RSP + 0x18]
JZ 0x001ba7e5
MOV RCX,qword ptr [RDI + 0x68]
MOVSS XMM0,dword ptr [RCX + R12*0x4]
UCOMISS XMM0,dword ptr [0x001bdaf0]
JBE 0x001ba7e5
UCOMISS XMM0,dword ptr [0x001bc004]
PUSH 0x40
POP RCX
MOV EDX,0x80
CMOVC ECX,EDX
OR CL,BPL
MOV byte ptr [RAX + 0xc],CL
LAB_001ba7e5:
TEST R15D,R15D
JS 0x001ba827
MOV R13D,R15D
LEA EAX,[R15 + 0x1]
MOV R15D,EAX
LAB_001ba7f4:
MOV RAX,qword ptr [RSP + 0x38]
MOV word ptr [RAX + R12*0x2],R13W
INC R12
MOV R13D,dword ptr [RSP + 0x2c]
JMP 0x001ba680
LAB_001ba80b:
LEA RDI,[RSP + 0x48]
CALL 0x001506c0
MOV EAX,R15D
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ba827:
LEA RDI,[0x1c8e54]
LEA RSI,[0x1d0dc4]
LEA RCX,[0x1d0e25]
MOV EDX,0x112
CALL 0x001512a0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::createUnOrderedEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*,
short*, int const*) const */
ulong __thiscall
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::createUnOrderedEdges
(UnorderedSubset *this,Edge *param_1,short *param_2,int *param_3)
{
float fVar1;
UnorderedSubset UVar2;
int iVar3;
int iVar4;
int4 *puVar5;
int *piVar6;
byte bVar7;
ulong uVar8;
bool bVar9;
Edge *pEVar10;
long lVar11;
Edge EVar12;
ulong uVar13;
ulong uVar14;
int iVar15;
int iVar16;
ulong uVar17;
int local_9c;
Edge *local_98;
VertexDescriptor *local_90;
int *local_88;
int local_7c;
ulong local_78;
short *local_70;
ulong local_68;
_Rb_tree<int,std::pair<int_const,int>,std::_Select1st<std::pair<int_const,int>>,std::less<int>,std::allocator<std::pair<int_const,int>>>
local_60 [8];
int4 local_58 [2];
int8 local_50;
int4 *local_48;
int4 *local_40;
int8 local_38;
local_48 = local_58;
local_58[0] = 0;
local_50 = 0;
local_38 = 0;
local_78 = (ulong)*(ushort *)(this + 4);
uVar17 = 0;
if (*(short *)(this + 6) == 0) {
lVar11 = (long)**(int **)(this + 0x10);
}
else {
lVar11 = 0;
}
local_7c = param_3[lVar11];
local_68 = (ulong)((uint)*(ushort *)(this + 4) * 2);
UVar2 = this[8];
uVar13 = 0;
local_98 = param_1;
local_90 = (VertexDescriptor *)this;
local_88 = param_3;
local_70 = param_2;
local_40 = local_48;
do {
iVar3 = local_7c;
iVar16 = (int)uVar17;
if (uVar13 == local_68) {
std::
_Rb_tree<int,std::pair<int_const,int>,std::_Select1st<std::pair<int_const,int>>,std::less<int>,std::allocator<std::pair<int_const,int>>>
::~_Rb_tree(local_60);
return uVar17;
}
uVar8 = uVar13 >> 1 & 0x7fffffff;
bVar9 = (bool)((byte)uVar13 & 1);
iVar15 = (int)uVar8;
if ((uVar13 & 1) == 0) {
if (*(ushort *)(local_90 + 6) == 0) {
iVar4 = *(int *)(*(long *)(local_90 + 0x10) + uVar8 * 4);
}
else {
iVar4 = (uint)*(ushort *)(local_90 + 6) * iVar15;
}
local_9c = local_88[(long)iVar4 + 1];
}
else {
/* try { // try from 001ba699 to 001ba6a5 has its CatchHandler @ 001ba84a */
local_9c = VertexDescriptor::getFaceIndexTrailing(local_90,iVar15,local_88);
}
if (local_9c == iVar3) {
lVar11 = (long)iVar16 * 0x10;
*(int *)(local_98 + lVar11) = iVar3;
local_98[lVar11 + 0xc] = (Edge)((byte)local_98[lVar11 + 0xc] & 0xe8 | 0x14);
LAB_001ba7e5:
if (iVar16 < 0) {
/* WARNING: Subroutine does not return */
__assert_fail("eIndex >= 0",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp"
,0x112,
"int OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::createUnOrderedEdges(Edge *, short *, const Index *) const"
);
}
uVar14 = uVar17;
uVar17 = (ulong)(iVar16 + 1);
}
else {
if ((ushort)local_78 < 0x11) {
uVar8 = 0;
if (0 < iVar16) {
uVar8 = uVar17;
}
pEVar10 = local_98;
for (uVar14 = 0; uVar8 != uVar14; uVar14 = uVar14 + 1) {
if (*(int *)pEVar10 == local_9c) goto LAB_001ba71f;
pEVar10 = pEVar10 + 0x10;
}
LAB_001ba77c:
lVar11 = (long)iVar16 * 0x10;
*(int8 *)(local_98 + lVar11 + 4) = 0xffffffffffffffff;
EVar12 = (Edge)(bVar9 * '\b' + 1);
*(int *)(local_98 + lVar11) = local_9c;
local_98[lVar11 + 0xc] = EVar12;
*(int *)(local_98 + (ulong)((uVar13 & 1) == 0) * 4 + lVar11 + 4) = iVar15;
if ((((byte)UVar2 & 0x10) != 0) &&
(fVar1 = *(float *)(*(long *)(local_90 + 0x68) + uVar13 * 4), _DAT_001bdaf0 < fVar1)) {
bVar7 = 0x40;
if (fVar1 < DAT_001bc004) {
bVar7 = 0x80;
}
local_98[lVar11 + 0xc] = (Edge)(bVar7 | (byte)EVar12);
}
goto LAB_001ba7e5;
}
/* try { // try from 001ba702 to 001ba710 has its CatchHandler @ 001ba848 */
puVar5 = (int4 *)
std::
_Rb_tree<int,std::pair<int_const,int>,std::_Select1st<std::pair<int_const,int>>,std::less<int>,std::allocator<std::pair<int_const,int>>>
::find(local_60,&local_9c);
if (puVar5 == local_58) {
/* try { // try from 001ba76a to 001ba778 has its CatchHandler @ 001ba848 */
piVar6 = (int *)std::map<int,int,std::less<int>,std::allocator<std::pair<int_const,int>>>::
operator[]((map<int,int,std::less<int>,std::allocator<std::pair<int_const,int>>>
*)local_60,&local_9c);
*piVar6 = iVar16;
goto LAB_001ba77c;
}
uVar14 = (ulong)(uint)puVar5[9];
LAB_001ba71f:
if ((int)uVar14 < 0) goto LAB_001ba77c;
/* try { // try from 001ba730 to 001ba739 has its CatchHandler @ 001ba846 */
Edge::addFace(local_98 + (uVar14 & 0xffffffff) * 0x10,iVar15,bVar9);
}
local_70[uVar13] = (short)uVar14;
uVar13 = uVar13 + 1;
} while( true );
}
| |
52,598 | flux::parser::Parser::throwStatement() | kvthweatt[P]FluxLang/src/parser/parser.cpp | std::unique_ptr<Stmt> Parser::throwStatement() {
auto start = previous_; // 'throw' keyword
// Parse the message (optional)
std::unique_ptr<Expr> message;
if (match(lexer::TokenType::LEFT_PAREN)) {
// If there's a message, parse it
if (!check(lexer::TokenType::RIGHT_PAREN)) {
message = expression();
if (!message) {
error("Expected expression for throw message");
}
}
consume(lexer::TokenType::RIGHT_PAREN, "Expected ')' after throw message");
}
// Parse the optional code block
std::unique_ptr<Stmt> body;
if (match(lexer::TokenType::LEFT_BRACE)) {
// Parse the code block
std::vector<std::unique_ptr<Stmt>> statements;
while (!check(lexer::TokenType::RIGHT_BRACE) &&
!check(lexer::TokenType::END_OF_FILE)) {
auto stmt = statement();
if (stmt) {
statements.push_back(std::move(stmt));
} else if (!check(lexer::TokenType::RIGHT_BRACE)) {
// Skip problematic tokens
advance();
}
}
auto closeBrace = consume(lexer::TokenType::RIGHT_BRACE, "Expected '}' after throw block");
body = std::make_unique<BlockStmt>(
std::move(statements),
makeRange(start, closeBrace)
);
}
// Consume the semicolon
consume(lexer::TokenType::SEMICOLON, "Expected ';' after throw statement");
// Create and return the throw statement
return std::make_unique<ThrowStmt>(
start,
std::move(message),
std::move(body),
makeRange(start, previous_)
);
} | O2 | cpp | flux::parser::Parser::throwStatement():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp # imm = 0x248
movq %rsi, %r14
movq %rdi, %rbx
addq $0x68, %rsi
leaq 0xc8(%rsp), %rdi
callq 0xa5ae
andq $0x0, 0x10(%rsp)
xorl %r15d, %r15d
pushq $0x5d
popq %rsi
movq %r14, %rdi
callq 0x12eaa
testb %al, %al
je 0x19c77
cmpl $0x5e, 0x8(%r14)
jne 0x19c1c
xorl %r15d, %r15d
jmp 0x19c4d
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x17cf0
movq 0x40(%rsp), %r15
movq %r15, 0x10(%rsp)
testq %r15, %r15
jne 0x19c4d
xorl %r15d, %r15d
leaq 0xb111(%rip), %rdx # 0x24d53
pushq $0x25
popq %rsi
movq %r14, %rdi
callq 0x12ca0
leaq 0xb125(%rip), %r8 # 0x24d79
leaq 0x1e8(%rsp), %rdi
pushq $0x5e
popq %rdx
pushq $0x20
popq %rcx
movq %r14, %rsi
callq 0x12f2a
leaq 0x228(%rsp), %rdi
callq 0x60e0
andq $0x0, 0x8(%rsp)
xorl %r15d, %r15d
pushq $0x5f
popq %rsi
movq %r14, %rdi
callq 0x12eaa
testb %al, %al
je 0x19d0e
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
andq $0x0, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0x1c8(%rsp), %r12
leaq 0x40(%rsp), %r13
leaq 0x188(%rsp), %rbp
movl 0x8(%r14), %eax
testl %eax, %eax
je 0x19d13
cmpl $0x60, %eax
je 0x19d13
movq %r13, %rdi
movq %r14, %rsi
callq 0x12976
cmpq $0x0, 0x40(%rsp)
je 0x19ce2
movq %r15, %rdi
movq %r13, %rsi
callq 0x10e40
jmp 0x19cfc
cmpl $0x60, 0x8(%r14)
je 0x19cb5
movq %rbp, %rdi
movq %r14, %rsi
callq 0x122ec
movq %r12, %rdi
callq 0x60e0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x19cb5
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x19cb5
xorl %r15d, %r15d
jmp 0x19d79
leaq 0xb080(%rip), %r8 # 0x24d9a
leaq 0x40(%rsp), %rdi
pushq $0x60
popq %rdx
pushq $0x1e
popq %rcx
movq %r14, %rsi
callq 0x12f2a
movups 0xe0(%rsp), %xmm0
leaq 0xa0(%rsp), %rdx
movaps %xmm0, (%rdx)
movups 0x68(%rsp), %xmm0
movaps %xmm0, 0x10(%rdx)
leaq 0x18(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1f86d
movq 0x18(%rsp), %r15
movq %r15, 0x8(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x60e0
leaq 0x20(%rsp), %rdi
callq 0xe290
leaq 0xb039(%rip), %r8 # 0x24db9
leaq 0x128(%rsp), %rdi
pushq $0x58
popq %rdx
pushq $0x22
popq %rcx
movq %r14, %rsi
callq 0x12f2a
leaq 0x168(%rsp), %rdi
callq 0x60e0
leaq 0xc8(%rsp), %rsi
movups 0x18(%rsi), %xmm0
leaq 0x40(%rsp), %r8
movaps %xmm0, (%r8)
movups 0x90(%r14), %xmm0
movaps %xmm0, 0x10(%r8)
leaq 0xa0(%rsp), %rdi
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0x206f2
movq 0xa0(%rsp), %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x19df7
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x19e07
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x108(%rsp), %rdi
callq 0x60e0
movq %rbx, %rax
addq $0x248, %rsp # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x19e99
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x60e0
jmp 0x19e7c
jmp 0x19e79
movq %rax, %rbx
movq 0x8(%rsp), %r15
jmp 0x19e54
movq %rax, %rbx
jmp 0x19e8b
movq %rax, %rbx
testq %r15, %r15
je 0x19e86
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
jmp 0x19e86
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x19e7c
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x19e7c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xe290
movq 0x10(%rsp), %r15
testq %r15, %r15
je 0x19e99
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
leaq 0x108(%rsp), %rdi
callq 0x60e0
movq %rbx, %rdi
callq 0x63e0
| _ZN4flux6parser6Parser14throwStatementEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 248h
mov r14, rsi
mov rbx, rdi
add rsi, 68h ; 'h'; flux::lexer::Token *
lea rdi, [rsp+278h+var_1B0]; this
call _ZN4flux5lexer5TokenC2ERKS1_; flux::lexer::Token::Token(flux::lexer::Token const&)
and [rsp+278h+var_268], 0
xor r15d, r15d
push 5Dh ; ']'
pop rsi
mov rdi, r14
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz short loc_19C77
cmp dword ptr [r14+8], 5Eh ; '^'
jnz short loc_19C1C
xor r15d, r15d
jmp short loc_19C4D
loc_19C1C:
lea rdi, [rsp+278h+var_238]; this
mov rsi, r14
call _ZN4flux6parser6Parser10expressionEv; flux::parser::Parser::expression(void)
mov r15, [rsp+278h+var_238]
mov [rsp+278h+var_268], r15
test r15, r15
jnz short loc_19C4D
xor r15d, r15d
lea rdx, aExpectedExpres_1; "Expected expression for throw message"
push 25h ; '%'
pop rsi
mov rdi, r14
call _ZN4flux6parser6Parser5errorESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::error(std::string_view)
loc_19C4D:
lea r8, aExpectedAfterT_2; "Expected ')' after throw message"
lea rdi, [rsp+278h+var_90]; this
push 5Eh ; '^'
pop rdx
push 20h ; ' '
pop rcx
mov rsi, r14
call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view)
lea rdi, [rsp+278h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_19C77:
and [rsp+278h+var_270], 0
xor r15d, r15d
push 5Fh ; '_'
pop rsi
mov rdi, r14
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz short loc_19D0E
xorps xmm0, xmm0
lea r15, [rsp+278h+var_258]
and qword ptr [r15+10h], 0
movaps xmmword ptr [r15], xmm0
lea r12, [rsp+278h+var_B0]
lea r13, [rsp+278h+var_238]
lea rbp, [rsp+278h+var_F0]
loc_19CB5:
mov eax, [r14+8]
test eax, eax
jz short loc_19D13
cmp eax, 60h ; '`'
jz short loc_19D13
mov rdi, r13; this
mov rsi, r14
call _ZN4flux6parser6Parser9statementEv; flux::parser::Parser::statement(void)
cmp [rsp+278h+var_238], 0
jz short loc_19CE2
mov rdi, r15
mov rsi, r13
call _ZNSt6vectorISt10unique_ptrIN4flux6parser4StmtESt14default_deleteIS3_EESaIS6_EE12emplace_backIJS6_EEERS6_DpOT_; std::vector<std::unique_ptr<flux::parser::Stmt>>::emplace_back<std::unique_ptr<flux::parser::Stmt>>(std::unique_ptr<flux::parser::Stmt> &&)
jmp short loc_19CFC
loc_19CE2:
cmp dword ptr [r14+8], 60h ; '`'
jz short loc_19CB5
mov rdi, rbp; this
mov rsi, r14
call _ZN4flux6parser6Parser7advanceEv; flux::parser::Parser::advance(void)
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_19CFC:
mov rdi, [rsp+278h+var_238]
test rdi, rdi
jz short loc_19CB5
mov rax, [rdi]
call qword ptr [rax+8]
jmp short loc_19CB5
loc_19D0E:
xor r15d, r15d
jmp short loc_19D79
loc_19D13:
lea r8, aExpectedAfterT_3; "Expected '}' after throw block"
lea rdi, [rsp+278h+var_238]; this
push 60h ; '`'
pop rdx
push 1Eh
pop rcx
mov rsi, r14
call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view)
movups xmm0, [rsp+278h+var_198]
lea rdx, [rsp+278h+var_1D8]
movaps xmmword ptr [rdx], xmm0
movups xmm0, [rsp+278h+var_210]
movaps xmmword ptr [rdx+10h], xmm0
lea rdi, [rsp+278h+var_260]
lea rsi, [rsp+278h+var_258]
call _ZSt11make_uniqueIN4flux6parser9BlockStmtEJSt6vectorISt10unique_ptrINS1_4StmtESt14default_deleteIS5_EESaIS8_EENS0_6common11SourceRangeEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<flux::parser::BlockStmt,std::vector<std::unique_ptr<flux::parser::Stmt>>,flux::common::SourceRange>(std::vector<std::unique_ptr<flux::parser::Stmt>>,flux::common::SourceRange &&)
mov r15, [rsp+278h+var_260]
mov [rsp+278h+var_270], r15
lea rdi, [rsp+278h+var_1F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+278h+var_258]
call _ZNSt6vectorISt10unique_ptrIN4flux6parser4StmtESt14default_deleteIS3_EESaIS6_EED2Ev; std::vector<std::unique_ptr<flux::parser::Stmt>>::~vector()
loc_19D79:
lea r8, aExpectedAfterT_4; "Expected ';' after throw statement"
lea rdi, [rsp+278h+var_150]; this
push 58h ; 'X'
pop rdx
push 22h ; '"'
pop rcx
mov rsi, r14
call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view)
lea rdi, [rsp+278h+var_110]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rsi, [rsp+278h+var_1B0]
movups xmm0, xmmword ptr [rsi+18h]
lea r8, [rsp+278h+var_238]
movaps xmmword ptr [r8], xmm0
movups xmm0, xmmword ptr [r14+90h]
movaps xmmword ptr [r8+10h], xmm0
lea rdi, [rsp+278h+var_1D8]
lea rdx, [rsp+278h+var_268]
lea rcx, [rsp+278h+var_270]
call _ZSt11make_uniqueIN4flux6parser9ThrowStmtEJRNS0_5lexer5TokenESt10unique_ptrINS1_4ExprESt14default_deleteIS7_EES6_INS1_4StmtES8_ISB_EENS0_6common11SourceRangeEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<flux::parser::ThrowStmt,flux::lexer::Token &,std::unique_ptr<flux::parser::Expr>,std::unique_ptr<flux::parser::Stmt>,flux::common::SourceRange>(flux::lexer::Token &,std::unique_ptr<flux::parser::Expr>,std::unique_ptr<flux::parser::Stmt>,flux::common::SourceRange &&)
mov rax, [rsp+278h+var_1D8]
mov [rbx], rax
mov rdi, [rsp+278h+var_270]
test rdi, rdi
jz short loc_19DF7
mov rax, [rdi]
call qword ptr [rax+8]
loc_19DF7:
mov rdi, [rsp+278h+var_268]
test rdi, rdi
jz short loc_19E07
mov rax, [rdi]
call qword ptr [rax+8]
loc_19E07:
lea rdi, [rsp+278h+var_170]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 248h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
jmp short loc_19E99
mov rbx, rax
lea rdi, [rsp+arg_78]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_19E7C
jmp short loc_19E79
mov rbx, rax
mov r15, [rsp+arg_0]
jmp short loc_19E54
mov rbx, rax
jmp short loc_19E8B
mov rbx, rax
loc_19E54:
test r15, r15
jz short loc_19E86
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+8]
jmp short loc_19E86
mov rbx, rax
mov rdi, [rsp+arg_38]
test rdi, rdi
jz short loc_19E7C
mov rax, [rdi]
call qword ptr [rax+8]
jmp short loc_19E7C
loc_19E79:
mov rbx, rax
loc_19E7C:
lea rdi, [rsp+arg_18]
call _ZNSt6vectorISt10unique_ptrIN4flux6parser4StmtESt14default_deleteIS3_EESaIS6_EED2Ev; std::vector<std::unique_ptr<flux::parser::Stmt>>::~vector()
loc_19E86:
mov r15, [rsp+arg_8]
loc_19E8B:
test r15, r15
jz short loc_19E99
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+8]
loc_19E99:
lea rdi, [rsp+arg_100]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| flux::parser::Parser * flux::parser::Parser::throwStatement(flux::parser::Parser *this, long long a2)
{
long long v2; // rcx
int v3; // r8d
int v4; // r9d
int v5; // eax
int v6; // r9d
long long v8; // [rsp+0h] [rbp-278h]
long long v9; // [rsp+8h] [rbp-270h] BYREF
long long v10; // [rsp+10h] [rbp-268h] BYREF
long long v11; // [rsp+18h] [rbp-260h] BYREF
__int128 v12; // [rsp+20h] [rbp-258h] BYREF
long long v13; // [rsp+30h] [rbp-248h]
int v14; // [rsp+38h] [rbp-240h]
_OWORD v15[4]; // [rsp+40h] [rbp-238h] BYREF
_BYTE v16[32]; // [rsp+80h] [rbp-1F8h] BYREF
_OWORD v17[2]; // [rsp+A0h] [rbp-1D8h] BYREF
_BYTE v18[24]; // [rsp+C8h] [rbp-1B0h] BYREF
__int128 v19; // [rsp+E0h] [rbp-198h]
_BYTE v20[32]; // [rsp+108h] [rbp-170h] BYREF
_BYTE v21[64]; // [rsp+128h] [rbp-150h] BYREF
_BYTE v22[32]; // [rsp+168h] [rbp-110h] BYREF
_BYTE v23[64]; // [rsp+188h] [rbp-F0h] BYREF
_BYTE v24[32]; // [rsp+1C8h] [rbp-B0h] BYREF
_BYTE v25[64]; // [rsp+1E8h] [rbp-90h] BYREF
_BYTE v26[80]; // [rsp+228h] [rbp-50h] BYREF
flux::lexer::Token::Token((flux::lexer::Token *)v18, (const flux::lexer::Token *)(a2 + 104));
v10 = 0LL;
if ( flux::parser::Parser::match(a2, 93) )
{
if ( *(_DWORD *)(a2 + 8) != 94 )
{
flux::parser::Parser::expression((flux::parser::Parser *)v15);
v10 = *(_QWORD *)&v15[0];
if ( !*(_QWORD *)&v15[0] )
flux::parser::Parser::error(
a2,
37,
(int)"Expected expression for throw message",
v2,
v3,
v4,
v8,
v9,
0,
v11,
v12,
SDWORD2(v12),
v13,
v14,
0,
SBYTE8(v15[0]));
}
flux::parser::Parser::consume(
(flux::parser::Parser *)v25,
a2,
94,
32LL,
(long long)"Expected ')' after throw message");
std::string::~string(v26);
}
v9 = 0LL;
if ( flux::parser::Parser::match(a2, 95) )
{
v13 = 0LL;
v12 = 0LL;
while ( 1 )
{
while ( 1 )
{
v5 = *(_DWORD *)(a2 + 8);
if ( !v5 || v5 == 96 )
{
flux::parser::Parser::consume(
(flux::parser::Parser *)v15,
a2,
96,
30LL,
(long long)"Expected '}' after throw block");
v17[0] = v19;
v17[1] = *(_OWORD *)((char *)&v15[2] + 8);
std::make_unique<flux::parser::BlockStmt,std::vector<std::unique_ptr<flux::parser::Stmt>>,flux::common::SourceRange>(
&v11,
&v12);
v9 = v11;
std::string::~string(v16);
std::vector<std::unique_ptr<flux::parser::Stmt>>::~vector(&v12);
goto LABEL_18;
}
flux::parser::Parser::statement((flux::parser::Parser *)v15, a2);
if ( !*(_QWORD *)&v15[0] )
break;
std::vector<std::unique_ptr<flux::parser::Stmt>>::emplace_back<std::unique_ptr<flux::parser::Stmt>>(
(long long)&v12,
v15);
LABEL_14:
if ( *(_QWORD *)&v15[0] )
(*(void ( **)(_QWORD))(**(_QWORD **)&v15[0] + 8LL))(*(_QWORD *)&v15[0]);
}
if ( *(_DWORD *)(a2 + 8) != 96 )
{
flux::parser::Parser::advance((flux::parser::Parser *)v23, a2);
std::string::~string(v24);
goto LABEL_14;
}
}
}
LABEL_18:
flux::parser::Parser::consume(
(flux::parser::Parser *)v21,
a2,
88,
34LL,
(long long)"Expected ';' after throw statement");
std::string::~string(v22);
v15[0] = v19;
v15[1] = *(_OWORD *)(a2 + 144);
std::make_unique<flux::parser::ThrowStmt,flux::lexer::Token &,std::unique_ptr<flux::parser::Expr>,std::unique_ptr<flux::parser::Stmt>,flux::common::SourceRange>(
(unsigned int)v17,
(unsigned int)v18,
(unsigned int)&v10,
(unsigned int)&v9,
(unsigned int)v15,
v6,
v8);
*(_QWORD *)this = *(_QWORD *)&v17[0];
if ( v9 )
(*(void ( **)(long long))(*(_QWORD *)v9 + 8LL))(v9);
if ( v10 )
(*(void ( **)(long long))(*(_QWORD *)v10 + 8LL))(v10);
std::string::~string(v20);
return this;
}
| throwStatement:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x248
MOV R14,RSI
MOV RBX,RDI
ADD RSI,0x68
LEA RDI,[RSP + 0xc8]
CALL 0x0010a5ae
AND qword ptr [RSP + 0x10],0x0
XOR R15D,R15D
LAB_00119c01:
PUSH 0x5d
POP RSI
MOV RDI,R14
CALL 0x00112eaa
TEST AL,AL
JZ 0x00119c77
CMP dword ptr [R14 + 0x8],0x5e
JNZ 0x00119c1c
XOR R15D,R15D
JMP 0x00119c4d
LAB_00119c1c:
LEA RDI,[RSP + 0x40]
MOV RSI,R14
CALL 0x00117cf0
MOV R15,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x10],R15
TEST R15,R15
JNZ 0x00119c4d
XOR R15D,R15D
LAB_00119c3b:
LEA RDX,[0x124d53]
PUSH 0x25
POP RSI
MOV RDI,R14
CALL 0x00112ca0
LAB_00119c4d:
LEA R8,[0x124d79]
LEA RDI,[RSP + 0x1e8]
PUSH 0x5e
POP RDX
PUSH 0x20
POP RCX
MOV RSI,R14
CALL 0x00112f2a
LEA RDI,[RSP + 0x228]
CALL 0x001060e0
LAB_00119c77:
AND qword ptr [RSP + 0x8],0x0
XOR R15D,R15D
LAB_00119c80:
PUSH 0x5f
POP RSI
MOV RDI,R14
CALL 0x00112eaa
TEST AL,AL
JZ 0x00119d0e
XORPS XMM0,XMM0
LEA R15,[RSP + 0x20]
AND qword ptr [R15 + 0x10],0x0
MOVAPS xmmword ptr [R15],XMM0
LEA R12,[RSP + 0x1c8]
LEA R13,[RSP + 0x40]
LEA RBP,[RSP + 0x188]
LAB_00119cb5:
MOV EAX,dword ptr [R14 + 0x8]
TEST EAX,EAX
JZ 0x00119d13
CMP EAX,0x60
JZ 0x00119d13
LAB_00119cc2:
MOV RDI,R13
MOV RSI,R14
CALL 0x00112976
CMP qword ptr [RSP + 0x40],0x0
JZ 0x00119ce2
LAB_00119cd5:
MOV RDI,R15
MOV RSI,R13
CALL 0x00110e40
JMP 0x00119cfc
LAB_00119ce2:
CMP dword ptr [R14 + 0x8],0x60
JZ 0x00119cb5
MOV RDI,RBP
MOV RSI,R14
CALL 0x001122ec
LAB_00119cf4:
MOV RDI,R12
CALL 0x001060e0
LAB_00119cfc:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x00119cb5
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
JMP 0x00119cb5
LAB_00119d0e:
XOR R15D,R15D
JMP 0x00119d79
LAB_00119d13:
LEA R8,[0x124d9a]
LEA RDI,[RSP + 0x40]
PUSH 0x60
POP RDX
PUSH 0x1e
POP RCX
MOV RSI,R14
CALL 0x00112f2a
MOVUPS XMM0,xmmword ptr [RSP + 0xe0]
LEA RDX,[RSP + 0xa0]
MOVAPS xmmword ptr [RDX],XMM0
MOVUPS XMM0,xmmword ptr [RSP + 0x68]
MOVAPS xmmword ptr [RDX + 0x10],XMM0
LAB_00119d49:
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x20]
CALL 0x0011f86d
MOV R15,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],R15
LEA RDI,[RSP + 0x80]
CALL 0x001060e0
LEA RDI,[RSP + 0x20]
CALL 0x0010e290
LAB_00119d79:
LEA R8,[0x124db9]
LEA RDI,[RSP + 0x128]
PUSH 0x58
POP RDX
PUSH 0x22
POP RCX
MOV RSI,R14
CALL 0x00112f2a
LEA RDI,[RSP + 0x168]
CALL 0x001060e0
LEA RSI,[RSP + 0xc8]
MOVUPS XMM0,xmmword ptr [RSI + 0x18]
LEA R8,[RSP + 0x40]
MOVAPS xmmword ptr [R8],XMM0
MOVUPS XMM0,xmmword ptr [R14 + 0x90]
MOVAPS xmmword ptr [R8 + 0x10],XMM0
LAB_00119dc5:
LEA RDI,[RSP + 0xa0]
LEA RDX,[RSP + 0x10]
LEA RCX,[RSP + 0x8]
CALL 0x001206f2
LAB_00119ddc:
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00119df7
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_00119df7:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x00119e07
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_00119e07:
LEA RDI,[RSP + 0x108]
CALL 0x001060e0
MOV RAX,RBX
ADD RSP,0x248
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* flux::parser::Parser::throwStatement() */
void flux::parser::Parser::throwStatement(void)
{
char cVar1;
long in_RSI;
int8 *in_RDI;
long *local_270;
long *local_268;
long *local_260;
int8 local_258;
int8 uStack_250;
int8 local_248;
long *local_238;
int8 uStack_230;
int8 local_228;
int8 uStack_220;
int8 local_210;
int8 uStack_208;
string local_1f8 [32];
long *local_1d8;
int8 uStack_1d0;
int8 local_1c8;
int8 uStack_1c0;
Token local_1b0 [24];
long *local_198;
int8 uStack_190;
string local_170 [32];
int1 local_150 [64];
string local_110 [96];
string local_b0 [32];
int1 local_90 [64];
string local_50 [32];
lexer::Token::Token(local_1b0,(Token *)(in_RSI + 0x68));
local_268 = (long *)0x0;
/* try { // try from 00119c01 to 00119c0b has its CatchHandler @ 00119e4c */
cVar1 = match();
if (cVar1 != '\0') {
if (*(int *)(in_RSI + 8) != 0x5e) {
/* try { // try from 00119c1c to 00119c28 has its CatchHandler @ 00119e29 */
expression((Parser *)&local_238);
local_268 = local_238;
if (local_238 == (long *)0x0) {
/* try { // try from 00119c3b to 00119c69 has its CatchHandler @ 00119e4c */
error();
}
}
consume(local_90);
std::__cxx11::string::~string(local_50);
}
local_270 = (long *)0x0;
/* try { // try from 00119c80 to 00119c8a has its CatchHandler @ 00119e51 */
cVar1 = match();
if (cVar1 != '\0') {
local_248 = 0;
local_258 = 0;
uStack_250 = 0;
LAB_00119cb5:
if ((*(int *)(in_RSI + 8) != 0) && (*(int *)(in_RSI + 8) != 0x60)) {
/* try { // try from 00119cc2 to 00119ccc has its CatchHandler @ 00119e79 */
statement();
if (local_238 == (long *)0x0) goto LAB_00119ce2;
/* try { // try from 00119cd5 to 00119cf3 has its CatchHandler @ 00119e64 */
std::
vector<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>,std::allocator<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>>>
::emplace_back<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>>
((vector<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>,std::allocator<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>>>
*)&local_258,(unique_ptr *)&local_238);
goto LAB_00119cfc;
}
/* try { // try from 00119d13 to 00119d2c has its CatchHandler @ 00119e40 */
consume(&local_238);
local_1d8 = local_198;
uStack_1d0 = uStack_190;
local_1c8 = local_210;
uStack_1c0 = uStack_208;
/* try { // try from 00119d49 to 00119d57 has its CatchHandler @ 00119e2e */
std::
make_unique<flux::parser::BlockStmt,std::vector<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>,std::allocator<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>>>,flux::common::SourceRange>
((vector *)&local_260,(SourceRange *)&local_258);
local_270 = local_260;
std::__cxx11::string::~string(local_1f8);
std::
vector<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>,std::allocator<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>>>
::~vector((vector<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>,std::allocator<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>>>
*)&local_258);
}
/* try { // try from 00119d79 to 00119d95 has its CatchHandler @ 00119e51 */
consume(local_150);
std::__cxx11::string::~string(local_110);
local_238 = local_198;
uStack_230 = uStack_190;
local_228 = *(int8 *)(in_RSI + 0x90);
uStack_220 = *(int8 *)(in_RSI + 0x98);
/* try { // try from 00119dc5 to 00119ddb has its CatchHandler @ 00119e42 */
std::
make_unique<flux::parser::ThrowStmt,flux::lexer::Token&,std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>,std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>,flux::common::SourceRange>
((Token *)&local_1d8,(unique_ptr *)local_1b0,(unique_ptr *)&local_268,
(SourceRange *)&local_270);
*in_RDI = local_1d8;
if (local_270 != (long *)0x0) {
(**(code **)(*local_270 + 8))();
}
if (local_268 != (long *)0x0) {
(**(code **)(*local_268 + 8))();
}
std::__cxx11::string::~string(local_170);
return;
LAB_00119ce2:
if (*(int *)(in_RSI + 8) != 0x60) {
advance();
std::__cxx11::string::~string(local_b0);
LAB_00119cfc:
if (local_238 != (long *)0x0) {
(**(code **)(*local_238 + 8))();
}
}
goto LAB_00119cb5;
}
| |
52,599 | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t&&, bool) | llama.cpp/common/json.hpp | std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
} | O3 | cpp | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t&&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movl 0x38(%rdi), %ecx
cmpq %rax, 0x20(%rdi)
sete %dl
testl %ecx, %ecx
sete %dil
andb %dl, %dil
cmpb $0x1, %dil
je 0x8bf0e
movl %ecx, %ecx
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
leaq -0x1(%rcx), %rdx
addq $0x3e, %rcx
testq %rdx, %rdx
cmovnsq %rdx, %rcx
sarq $0x6, %rcx
leaq (%rax,%rcx,8), %rax
leaq 0x3f(%r15), %rcx
andq %rdx, %rcx
xorl %edi, %edi
cmpq %r15, %rcx
setbe %dil
movq -0x8(%rax,%rdi,8), %rax
btq %rdx, %rax
jae 0x8bda1
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq (%rsi), %rsi
movq %r14, %rdi
callq 0x8bfa8
movq %r14, %rdi
movl $0x1, %esi
callq 0x851fe
testb %bpl, %bpl
jne 0x8bd4e
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
shrq $0x3, %rax
movl %eax, 0xc(%rsp)
movb $0x5, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x8bf2f
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq *0x98(%rbx)
testb %al, %al
je 0x8bee2
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x8bdab
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x8bee2
movzbl (%rax), %ecx
cmpl $0x1, %ecx
je 0x8be05
cmpl $0x2, %ecx
jne 0x8bf34
movq 0x8(%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x89014
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x8bede
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x8befe
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x851fe
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x851fe
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x8736a
movq %r15, %rdi
xorl %esi, %esi
callq 0x851fe
movq %r15, %rdi
callq 0x89918
movq (%rbx), %r14
jmp 0x8bede
movq 0x58(%rbx), %rax
movl 0x60(%rbx), %ecx
cmpq %rax, 0x48(%rbx)
sete %dl
testl %ecx, %ecx
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x8bf42
movl %ecx, %esi
leaq -0x1(%rsi), %rcx
movq %rsi, %rdx
addq $0x3e, %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
leaq (%rax,%rdx,8), %rdi
leaq 0x3f(%r15), %rdx
andq %rcx, %rdx
xorl %r8d, %r8d
cmpq %r15, %rdx
setbe %r8b
movl $0x1, %edx
shlq %cl, %rdx
andq -0x8(%rdi,%r8,8), %rdx
subl $0x1, %esi
movl %esi, 0x60(%rbx)
jae 0x8be77
movl $0x3f, 0x60(%rbx)
addq $-0x8, %rax
movq %rax, 0x58(%rbx)
testq %rdx, %rdx
je 0x8bee2
cmpq $0x0, 0x70(%rbx)
je 0x8bf63
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x851fe
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x851fe
movq 0x70(%rbx), %rdi
movq %r15, %rsi
callq 0x8736a
movq %r15, %rdi
xorl %esi, %esi
callq 0x851fe
movq %r15, %rdi
callq 0x89918
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x8bee7
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x851fe
movq %r15, %rdi
callq 0x89918
movl %ebx, %eax
movq %r14, %rdx
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8f663(%rip), %rdi # 0x11b578
leaq 0x8f697(%rip), %rdx # 0x11b5b3
leaq 0x905c2(%rip), %rcx # 0x11c4e5
movl $0x1c28, %esi # imm = 0x1C28
xorl %eax, %eax
callq 0x21e70
callq 0x222a0
leaq 0x905be(%rip), %rcx # 0x11c4f9
movl $0x1c4b, %esi # imm = 0x1C4B
jmp 0x8bf4e
leaq 0x905ee(%rip), %rcx # 0x11c537
movl $0x1c57, %esi # imm = 0x1C57
leaq 0x8f623(%rip), %rdi # 0x11b578
leaq 0x8f657(%rip), %rdx # 0x11b5b3
xorl %eax, %eax
callq 0x21e70
leaq 0x8f60e(%rip), %rdi # 0x11b578
leaq 0x8f642(%rip), %rdx # 0x11b5b3
leaq 0x905d7(%rip), %rcx # 0x11c54f
movl $0x1c60, %esi # imm = 0x1C60
xorl %eax, %eax
callq 0x21e70
jmp 0x8bf86
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x851fe
movq %r14, %rdi
callq 0x89918
movq %rbx, %rdi
callq 0x21af0
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRlEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov ebp, edx
mov rbx, rdi
mov rax, [rdi+30h]
mov ecx, [rdi+38h]
cmp [rdi+20h], rax
setz dl
test ecx, ecx
setz dil
and dil, dl
cmp dil, 1
jz loc_8BF0E
mov ecx, ecx
mov r15, 8000000000000000h
lea rdx, [rcx-1]
add rcx, 3Eh ; '>'
test rdx, rdx
cmovns rcx, rdx
sar rcx, 6
lea rax, [rax+rcx*8]
lea rcx, [r15+3Fh]
and rcx, rdx
xor edi, edi
cmp rcx, r15
setbe dil
mov rax, [rax+rdi*8-8]
bt rax, rdx
jnb loc_8BDA1
xorps xmm0, xmm0
lea r14, [rsp+68h+var_58]
movaps xmmword ptr [r14], xmm0
mov rsi, [rsi]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_integer_t)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
test bpl, bpl
jnz short loc_8BD4E
mov rax, [rbx+10h]
sub rax, [rbx+8]
shr rax, 3
mov [rsp+68h+var_5C], eax
mov [rsp+68h+var_5D], 5
cmp qword ptr [rbx+90h], 0
jz loc_8BF2F
lea rdi, [rbx+80h]
lea rsi, [rsp+68h+var_5C]
lea rdx, [rsp+68h+var_5D]
lea rcx, [rsp+68h+var_58]
call qword ptr [rbx+98h]
test al, al
jz loc_8BEE2
loc_8BD4E:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_8BDAB
mov rax, [rax-8]
test rax, rax
jz loc_8BEE2
movzx ecx, byte ptr [rax]
cmp ecx, 1
jz loc_8BE05
cmp ecx, 2
jnz loc_8BF34
mov rdi, [rax+8]
lea rsi, [rsp+68h+var_58]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_8BEDE
loc_8BDA1:
xor ebx, ebx
xor r14d, r14d
jmp loc_8BEFE
loc_8BDAB:
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_38]
movaps xmmword ptr [r15], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rbx]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx]
jmp loc_8BEDE
loc_8BE05:
mov rax, [rbx+58h]
mov ecx, [rbx+60h]
cmp [rbx+48h], rax
setz dl
test ecx, ecx
setz sil
and sil, dl
cmp sil, 1
jz loc_8BF42
mov esi, ecx
lea rcx, [rsi-1]
mov rdx, rsi
add rdx, 3Eh ; '>'
test rcx, rcx
cmovns rdx, rcx
sar rdx, 6
lea rdi, [rax+rdx*8]
lea rdx, [r15+3Fh]
and rdx, rcx
xor r8d, r8d
cmp rdx, r15
setbe r8b
mov edx, 1
shl rdx, cl
and rdx, [rdi+r8*8-8]
sub esi, 1
mov [rbx+60h], esi
jnb short loc_8BE77
mov dword ptr [rbx+60h], 3Fh ; '?'
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbx+58h], rax
loc_8BE77:
test rdx, rdx
jz short loc_8BEE2
cmp qword ptr [rbx+70h], 0
jz loc_8BF63
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_48]
movaps xmmword ptr [r15], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rbx+70h]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx+70h]
loc_8BEDE:
mov bl, 1
jmp short loc_8BEE7
loc_8BEE2:
xor ebx, ebx
xor r14d, r14d
loc_8BEE7:
lea r15, [rsp+68h+var_58]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_8BEFE:
mov eax, ebx
mov rdx, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_8BF0E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1C28h
xor eax, eax
call _ggml_abort
loc_8BF2F:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_8BF34:
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
mov esi, 1C4Bh
jmp short loc_8BF4E
loc_8BF42:
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
mov esi, 1C57h
loc_8BF4E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
xor eax, eax
call _ggml_abort
loc_8BF63:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
mov esi, 1C60h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_8BF86:
mov rbx, rax
lea r14, [rsp+68h+var_58]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<long &>(
long long a1,
_QWORD *a2,
char a3)
{
unsigned int v4; // ebx
long long v5; // rax
unsigned int v6; // ecx
signed long long v7; // rdx
long long v8; // rcx
long long v9; // rax
long long v10; // rax
unsigned __int8 *v11; // rax
int v12; // ecx
long long v13; // rax
unsigned int v14; // ecx
long long v15; // rsi
long long v16; // rcx
long long v17; // rdx
long long v18; // rdx
const char *v20; // rcx
long long v21; // rsi
long long v22; // rax
long long v23; // rbx
char v24; // [rsp+Bh] [rbp-5Dh] BYREF
int v25; // [rsp+Ch] [rbp-5Ch] BYREF
__int128 v26; // [rsp+10h] [rbp-58h] BYREF
__int128 v27; // [rsp+20h] [rbp-48h] BYREF
_OWORD v28[3]; // [rsp+30h] [rbp-38h] BYREF
v4 = a1;
v5 = *(_QWORD *)(a1 + 48);
v6 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
goto LABEL_28;
}
v7 = v6 - 1LL;
v8 = v6 + 62LL;
if ( v7 >= 0 )
v8 = v7;
v9 = *(_QWORD *)(v5 + 8 * (v8 >> 6) + 8LL * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8);
if ( _bittest64(&v9, v7) )
{
v26 = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
&v26,
*a2);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
if ( a3 )
{
LABEL_8:
v10 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v10 )
{
v28[0] = v26;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
LOBYTE(v26) = 0;
*((_QWORD *)&v26 + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v28);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)a1,
(long long)v28);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v28);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v28);
goto LABEL_23;
}
v11 = *(unsigned __int8 **)(v10 - 8);
if ( v11 )
{
v12 = *v11;
if ( v12 != 1 )
{
if ( v12 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*((_QWORD *)v11 + 1),
(long long)&v26);
LABEL_23:
LOBYTE(v4) = 1;
LABEL_25:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26);
return v4;
}
v20 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
v21 = 7243LL;
goto LABEL_31;
}
v13 = *(_QWORD *)(a1 + 88);
v14 = *(_DWORD *)(a1 + 96);
if ( *(_QWORD *)(a1 + 72) == v13 && v14 == 0 )
{
v20 = "!key_keep_stack.empty()";
v21 = 7255LL;
LABEL_31:
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", v21, "GGML_ASSERT(%s) failed", v20);
goto LABEL_32;
}
v15 = v14;
v16 = v14 - 1LL;
v17 = v15 + 62;
if ( v16 >= 0 )
v17 = v16;
v18 = *(_QWORD *)(v13 + 8 * (v17 >> 6) + 8LL * ((v16 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v16);
*(_DWORD *)(a1 + 96) = v15 - 1;
if ( !(_DWORD)v15 )
{
*(_DWORD *)(a1 + 96) = 63;
*(_QWORD *)(a1 + 88) = v13 - 8;
}
if ( v18 )
{
if ( *(_QWORD *)(a1 + 112) )
{
v27 = v26;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
LOBYTE(v26) = 0;
*((_QWORD *)&v26 + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(a1 + 112),
(long long)&v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v27);
goto LABEL_23;
}
LABEL_32:
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
v23 = v22;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26);
_Unwind_Resume(v23);
}
}
LABEL_24:
v4 = 0;
goto LABEL_25;
}
v25 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3;
v24 = 5;
if ( *(_QWORD *)(a1 + 144) )
{
if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))(
a1 + 128,
&v25,
&v24,
&v26) )
goto LABEL_24;
goto LABEL_8;
}
LABEL_28:
std::__throw_bad_function_call();
}
return 0;
}
| handle_value<long&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV EBP,EDX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x30]
MOV ECX,dword ptr [RDI + 0x38]
CMP qword ptr [RDI + 0x20],RAX
SETZ DL
TEST ECX,ECX
SETZ DIL
AND DIL,DL
CMP DIL,0x1
JZ 0x0018bf0e
MOV ECX,ECX
MOV R15,-0x8000000000000000
LEA RDX,[RCX + -0x1]
ADD RCX,0x3e
TEST RDX,RDX
CMOVNS RCX,RDX
SAR RCX,0x6
LEA RAX,[RAX + RCX*0x8]
LEA RCX,[R15 + 0x3f]
AND RCX,RDX
XOR EDI,EDI
CMP RCX,R15
SETBE DIL
MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8]
BT RAX,RDX
JNC 0x0018bda1
XORPS XMM0,XMM0
LEA R14,[RSP + 0x10]
MOVAPS xmmword ptr [R14],XMM0
MOV RSI,qword ptr [RSI]
MOV RDI,R14
CALL 0x0018bfa8
MOV RDI,R14
MOV ESI,0x1
CALL 0x001851fe
TEST BPL,BPL
JNZ 0x0018bd4e
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x5
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0018bf2f
LEA RDI,[RBX + 0x80]
LAB_0018bd31:
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
LEA RCX,[RSP + 0x10]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JZ 0x0018bee2
LAB_0018bd4e:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0018bdab
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x0018bee2
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x1
JZ 0x0018be05
CMP ECX,0x2
JNZ 0x0018bf34
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x10]
CALL 0x00189014
LAB_0018bd88:
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x0018bede
LAB_0018bda1:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x0018befe
LAB_0018bdab:
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x30]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x001851fe
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x001851fe
MOV RDI,qword ptr [RBX]
MOV RSI,R15
CALL 0x0018736a
MOV RDI,R15
XOR ESI,ESI
CALL 0x001851fe
MOV RDI,R15
CALL 0x00189918
MOV R14,qword ptr [RBX]
JMP 0x0018bede
LAB_0018be05:
MOV RAX,qword ptr [RBX + 0x58]
MOV ECX,dword ptr [RBX + 0x60]
CMP qword ptr [RBX + 0x48],RAX
SETZ DL
TEST ECX,ECX
SETZ SIL
AND SIL,DL
CMP SIL,0x1
JZ 0x0018bf42
MOV ESI,ECX
LEA RCX,[RSI + -0x1]
MOV RDX,RSI
ADD RDX,0x3e
TEST RCX,RCX
CMOVNS RDX,RCX
SAR RDX,0x6
LEA RDI,[RAX + RDX*0x8]
LEA RDX,[R15 + 0x3f]
AND RDX,RCX
XOR R8D,R8D
CMP RDX,R15
SETBE R8B
MOV EDX,0x1
SHL RDX,CL
AND RDX,qword ptr [RDI + R8*0x8 + -0x8]
SUB ESI,0x1
MOV dword ptr [RBX + 0x60],ESI
JNC 0x0018be77
MOV dword ptr [RBX + 0x60],0x3f
ADD RAX,-0x8
MOV qword ptr [RBX + 0x58],RAX
LAB_0018be77:
TEST RDX,RDX
JZ 0x0018bee2
CMP qword ptr [RBX + 0x70],0x0
JZ 0x0018bf63
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x20]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x001851fe
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x001851fe
MOV RDI,qword ptr [RBX + 0x70]
MOV RSI,R15
CALL 0x0018736a
MOV RDI,R15
XOR ESI,ESI
CALL 0x001851fe
MOV RDI,R15
CALL 0x00189918
MOV R14,qword ptr [RBX + 0x70]
LAB_0018bede:
MOV BL,0x1
JMP 0x0018bee7
LAB_0018bee2:
XOR EBX,EBX
XOR R14D,R14D
LAB_0018bee7:
LEA R15,[RSP + 0x10]
MOV RDI,R15
XOR ESI,ESI
CALL 0x001851fe
MOV RDI,R15
CALL 0x00189918
LAB_0018befe:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0018bf0e:
LEA RDI,[0x21b578]
LEA RDX,[0x21b5b3]
LEA RCX,[0x21c4e5]
MOV ESI,0x1c28
XOR EAX,EAX
CALL 0x00121e70
LAB_0018bf2f:
CALL 0x001222a0
LAB_0018bf34:
LEA RCX,[0x21c4f9]
MOV ESI,0x1c4b
JMP 0x0018bf4e
LAB_0018bf42:
LEA RCX,[0x21c537]
MOV ESI,0x1c57
LAB_0018bf4e:
LEA RDI,[0x21b578]
LEA RDX,[0x21b5b3]
XOR EAX,EAX
CALL 0x00121e70
LAB_0018bf63:
LEA RDI,[0x21b578]
LEA RDX,[0x21b5b3]
LEA RCX,[0x21c54f]
MOV ESI,0x1c60
XOR EAX,EAX
CALL 0x00121e70
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<long&>(long&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<long&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,long *param_1,bool param_2)
{
uint uVar1;
char cVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
int8 uVar6;
bool bVar7;
long lVar8;
int1 auVar9 [16];
int1 local_5d;
int4 local_5c;
ulong local_58;
int8 uStack_50;
ulong local_48;
int8 uStack_40;
ulong local_38;
int8 uStack_30;
uVar1 = *(uint *)(this + 0x38);
if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) &
1) == 0) {
uVar5 = 0;
lVar8 = 0;
goto LAB_0018befe;
}
local_58 = 0;
uStack_50 = 0;
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(&local_58,*param_1);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
if (param_2) {
LAB_0018bd4e:
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
local_38 = local_58;
uStack_30 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_38,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)this,(data *)&local_38);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_38);
lVar8 = *(long *)this;
}
else {
pcVar4 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar4 == (char *)0x0) goto LAB_0018bee2;
if (*pcVar4 == '\x01') {
lVar8 = *(long *)(this + 0x58);
uVar1 = *(uint *)(this + 0x60);
if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) {
pcVar4 = "!key_keep_stack.empty()";
uVar6 = 0x1c57;
goto LAB_0018bf4e;
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8);
*(uint *)(this + 0x60) = uVar1 - 1;
if (uVar1 == 0) {
*(int4 *)(this + 0x60) = 0x3f;
*(long *)(this + 0x58) = lVar8 + -8;
}
if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_0018bee2;
if (*(long *)(this + 0x70) == 0) {
/* try { // try from 0018bf63 to 0018bf83 has its CatchHandler @ 0018bf84 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1c60,
"GGML_ASSERT(%s) failed","object_element");
}
local_48 = local_58;
uStack_40 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_48,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(this + 0x70),(data *)&local_48);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_48);
lVar8 = *(long *)(this + 0x70);
}
else {
if (*pcVar4 != '\x02') {
pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
uVar6 = 0x1c4b;
LAB_0018bf4e:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar6,
"GGML_ASSERT(%s) failed",pcVar4);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(pcVar4 + 8),(basic_json *)&local_58);
lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
}
uVar5 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
local_5c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3);
local_5d = 5;
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 0018bf2f to 0018bf62 has its CatchHandler @ 0018bf86 */
std::__throw_bad_function_call();
}
/* try { // try from 0018bd31 to 0018bd87 has its CatchHandler @ 0018bf86 */
cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_5c,&local_5d,&local_58);
if (cVar2 != '\0') goto LAB_0018bd4e;
LAB_0018bee2:
uVar5 = 0;
lVar8 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_58,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_58);
LAB_0018befe:
auVar9._0_8_ = uVar5 & 0xffffffff;
auVar9._8_8_ = lVar8;
return auVar9;
}
|
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.